!function(e){var t={};function n(r){var i;return(t[r]||(i=t[r]={i:r,l:!1,exports:{}},e[r].call(i.exports,i,i.exports,n),i.l=!0,i)).exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=428)}([function(e,t,n){"use strict";var r=n(6),i=(n(162),n(24)),o=n(209),a=n(210),s=n(102);if(Object(i.c)().get("IS_BROWSER")){Object(i.c)().setPlatform("browser",new
/**
 * @license
 * Copyright 2019 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
class{constructor(){this.messageName="setTimeoutCustom",this.functionRefs=[],this.handledMessageCount=0,this.hasEventListener=!1}fetch(e,t){return fetch(e,t)}now(){return performance.now()}encode(e,t){if("utf-8"!==t&&"utf8"!==t)throw new Error("Browser's encoder only supports utf-8, but got "+t);return null==this.textEncoder&&(this.textEncoder=new TextEncoder),this.textEncoder.encode(e)}decode(e,t){return new TextDecoder(t).decode(e)}setTimeoutCustom(e,t){"undefined"!=typeof window&&Object(i.c)().getBool("USE_SETTIMEOUTCUSTOM")?(this.functionRefs.push(e),setTimeout(()=>{window.postMessage({name:this.messageName,index:this.functionRefs.length-1},"*")},t),this.hasEventListener||(this.hasEventListener=!0,window.addEventListener("message",e=>{if(e.source===window&&e.data.name===this.messageName){e.stopPropagation();(0,this.functionRefs[e.data.index])(),this.handledMessageCount++,this.handledMessageCount===this.functionRefs.length&&(this.functionRefs=[],this.handledMessageCount=0)}},!0))):setTimeout(e,t)}});try{s.a.registerManager(a.a.URL_SCHEME,new a.b)}catch(e){}try{s.a.registerManager(o.a.URL_SCHEME,new o.b)}catch(e){}}n(364);a=n(58),s=n(15),o=n(79);var u=n(176),c=n(7),l=(r=(
/**
 * @license
 * Copyright 2020 Google Inc. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(r.b)(),{buffer:a.a,cast:s.a,clone:o.a,print:u.a}),Object(c.f)(r),n(167));n.d(t,"d",(function(){return l.d})),n.d(t,"e",(function(){return l.e})),n.d(t,"f",(function(){return l.f})),n.d(t,"g",(function(){return l.g})),n.d(t,"gc",(function(){return l.gc})),n.d(t,"rc",(function(){return l.rc})),n.d(t,"sc",(function(){return l.sc})),n.d(t,"zc",(function(){return l.zc})),n.d(t,"Uc",(function(){return l.Uc})),n.d(t,"zd",(function(){return l.zd})),n.d(t,"Ad",(function(){return l.Ad})),n.d(t,"Jd",(function(){return l.Jd})),n.d(t,"Ec",(function(){return l.Ec})),n.d(t,"ji",(function(){return l.ji})),n.d(t,"Hi",(function(){return l.Hi})),n.d(t,"Ic",(function(){return l.Ic})),n.d(t,"Me",(function(){return l.Me})),n.d(t,"Df",(function(){return l.Df})),n.d(t,"Ef",(function(){return l.Ef})),n.d(t,"Ki",(function(){return l.Ki})),n.d(t,"Li",(function(){return l.Li})),n.d(t,"Ni",(function(){return l.Ni})),n.d(t,"gb",(function(){return l.gb})),n.d(t,"hf",(function(){return l.hf})),n.d(t,"cb",(function(){return l.cb})),n.d(t,"Oi",(function(){return l.Oi})),n.d(t,"Dg",(function(){return l.Dg})),n.d(t,"pe",(function(){return l.pe})),n.d(t,"Lf",(function(){return l.Lf})),n.d(t,"kg",(function(){return l.kg})),n.d(t,"Dh",(function(){return l.Dh})),n.d(t,"ui",(function(){return l.ui})),n.d(t,"Ji",(function(){return l.Ji})),n.d(t,"de",(function(){return l.de})),n.d(t,"oe",(function(){return l.oe})),n.d(t,"ti",(function(){return l.ti})),n.d(t,"Rh",(function(){return l.Rh})),n.d(t,"yf",(function(){return l.yf})),n.d(t,"zh",(function(){return l.zh})),n.d(t,"Re",(function(){return l.Re})),n.d(t,"Rf",(function(){return l.Rf})),n.d(t,"Fb",(function(){return l.Fb})),n.d(t,"S",(function(){return l.S})),n.d(t,"Md",(function(){return l.Md})),n.d(t,"Nd",(function(){return l.Nd})),n.d(t,"Od",(function(){return l.Od})),n.d(t,"Pd",(function(){return l.Pd})),n.d(t,"Qd",(function(){return l.Qd})),n.d(t,"Rd",(function(){return l.Rd})),n.d(t,"Sd",(function(){return l.Sd})),n.d(t,"Td",(function(){return l.Td})),n.d(t,"Ud",(function(){return l.Ud})),n.d(t,"Vd",(function(){return l.Vd})),n.d(t,"Wd",(function(){return l.Wd})),n.d(t,"Xd",(function(){return l.Xd})),n.d(t,"Yd",(function(){return l.Yd})),n.d(t,"Zd",(function(){return l.Zd})),n.d(t,"ae",(function(){return l.ae})),n.d(t,"be",(function(){return l.be})),n.d(t,"ee",(function(){return l.ee})),n.d(t,"je",(function(){return l.je})),n.d(t,"fe",(function(){return l.fe})),n.d(t,"ge",(function(){return l.ge})),n.d(t,"he",(function(){return l.he})),n.d(t,"ie",(function(){return l.ie})),n.d(t,"ke",(function(){return l.ke})),n.d(t,"me",(function(){return l.me})),n.d(t,"ne",(function(){return l.ne})),n.d(t,"qe",(function(){return l.qe})),n.d(t,"re",(function(){return l.re})),n.d(t,"se",(function(){return l.se})),n.d(t,"te",(function(){return l.te})),n.d(t,"ue",(function(){return l.ue})),n.d(t,"ve",(function(){return l.ve})),n.d(t,"we",(function(){return l.we})),n.d(t,"xe",(function(){return l.xe})),n.d(t,"ye",(function(){return l.ye})),n.d(t,"ze",(function(){return l.ze})),n.d(t,"Ae",(function(){return l.Ae})),n.d(t,"Be",(function(){return l.Be})),n.d(t,"Ce",(function(){return l.Ce})),n.d(t,"De",(function(){return l.De})),n.d(t,"Ee",(function(){return l.Ee})),n.d(t,"Fe",(function(){return l.Fe})),n.d(t,"He",(function(){return l.He})),n.d(t,"Ie",(function(){return l.Ie})),n.d(t,"Ke",(function(){return l.Ke})),n.d(t,"Le",(function(){return l.Le})),n.d(t,"Ne",(function(){return l.Ne})),n.d(t,"Pe",(function(){return l.Pe})),n.d(t,"Qe",(function(){return l.Qe})),n.d(t,"Se",(function(){return l.Se})),n.d(t,"Te",(function(){return l.Te})),n.d(t,"Xe",(function(){return l.Xe})),n.d(t,"Ye",(function(){return l.Ye})),n.d(t,"Ze",(function(){return l.Ze})),n.d(t,"bf",(function(){return l.bf})),n.d(t,"cf",(function(){return l.cf})),n.d(t,"if",(function(){return l.if})),n.d(t,"jf",(function(){return l.jf})),n.d(t,"kf",(function(){return l.kf})),n.d(t,"lf",(function(){return l.lf})),n.d(t,"mf",(function(){return l.mf})),n.d(t,"nf",(function(){return l.nf})),n.d(t,"of",(function(){return l.of})),n.d(t,"qf",(function(){return l.qf})),n.d(t,"tf",(function(){return l.tf})),n.d(t,"uf",(function(){return l.uf})),n.d(t,"wf",(function(){return l.wf})),n.d(t,"Ff",(function(){return l.Ff})),n.d(t,"Gf",(function(){return l.Gf})),n.d(t,"If",(function(){return l.If})),n.d(t,"Nf",(function(){return l.Nf})),n.d(t,"Of",(function(){return l.Of})),n.d(t,"Pf",(function(){return l.Pf})),n.d(t,"Sf",(function(){return l.Sf})),n.d(t,"Tf",(function(){return l.Tf})),n.d(t,"Uf",(function(){return l.Uf})),n.d(t,"Wf",(function(){return l.Wf})),n.d(t,"Xf",(function(){return l.Xf})),n.d(t,"Yf",(function(){return l.Yf})),n.d(t,"Zf",(function(){return l.Zf})),n.d(t,"ag",(function(){return l.ag})),n.d(t,"bg",(function(){return l.bg})),n.d(t,"cg",(function(){return l.cg})),n.d(t,"dg",(function(){return l.dg})),n.d(t,"eg",(function(){return l.eg})),n.d(t,"fg",(function(){return l.fg})),n.d(t,"gg",(function(){return l.gg})),n.d(t,"ig",(function(){return l.ig})),n.d(t,"jg",(function(){return l.jg})),n.d(t,"lg",(function(){return l.lg})),n.d(t,"mg",(function(){return l.mg})),n.d(t,"ng",(function(){return l.ng})),n.d(t,"og",(function(){return l.og})),n.d(t,"pg",(function(){return l.pg})),n.d(t,"qg",(function(){return l.qg})),n.d(t,"sg",(function(){return l.sg})),n.d(t,"tg",(function(){return l.tg})),n.d(t,"ug",(function(){return l.ug})),n.d(t,"vg",(function(){return l.vg})),n.d(t,"wg",(function(){return l.wg})),n.d(t,"xg",(function(){return l.xg})),n.d(t,"zg",(function(){return l.zg})),n.d(t,"Ag",(function(){return l.Ag})),n.d(t,"Bg",(function(){return l.Bg})),n.d(t,"Cg",(function(){return l.Cg})),n.d(t,"Fg",(function(){return l.Fg})),n.d(t,"Gg",(function(){return l.Gg})),n.d(t,"Hg",(function(){return l.Hg})),n.d(t,"Ig",(function(){return l.Ig})),n.d(t,"Kg",(function(){return l.Kg})),n.d(t,"Lg",(function(){return l.Lg})),n.d(t,"Mg",(function(){return l.Mg})),n.d(t,"Ng",(function(){return l.Ng})),n.d(t,"Og",(function(){return l.Og})),n.d(t,"Pg",(function(){return l.Pg})),n.d(t,"Qg",(function(){return l.Qg})),n.d(t,"Rg",(function(){return l.Rg})),n.d(t,"Sg",(function(){return l.Sg})),n.d(t,"Tg",(function(){return l.Tg})),n.d(t,"Ug",(function(){return l.Ug})),n.d(t,"Wg",(function(){return l.Wg})),n.d(t,"Xg",(function(){return l.Xg})),n.d(t,"Yg",(function(){return l.Yg})),n.d(t,"Zg",(function(){return l.Zg})),n.d(t,"ah",(function(){return l.ah})),n.d(t,"bh",(function(){return l.bh})),n.d(t,"ch",(function(){return l.ch})),n.d(t,"dh",(function(){return l.dh})),n.d(t,"eh",(function(){return l.eh})),n.d(t,"gh",(function(){return l.gh})),n.d(t,"hh",(function(){return l.hh})),n.d(t,"lh",(function(){return l.lh})),n.d(t,"mh",(function(){return l.mh})),n.d(t,"oh",(function(){return l.oh})),n.d(t,"ph",(function(){return l.ph})),n.d(t,"qh",(function(){return l.qh})),n.d(t,"rh",(function(){return l.rh})),n.d(t,"sh",(function(){return l.sh})),n.d(t,"th",(function(){return l.th})),n.d(t,"vh",(function(){return l.vh})),n.d(t,"wh",(function(){return l.wh})),n.d(t,"xh",(function(){return l.xh})),n.d(t,"Bh",(function(){return l.Bh})),n.d(t,"Ch",(function(){return l.Ch})),n.d(t,"Gh",(function(){return l.Gh})),n.d(t,"Hh",(function(){return l.Hh})),n.d(t,"Ih",(function(){return l.Ih})),n.d(t,"Kh",(function(){return l.Kh})),n.d(t,"Lh",(function(){return l.Lh})),n.d(t,"Mh",(function(){return l.Mh})),n.d(t,"Nh",(function(){return l.Nh})),n.d(t,"Oh",(function(){return l.Oh})),n.d(t,"Ph",(function(){return l.Ph})),n.d(t,"Qh",(function(){return l.Qh})),n.d(t,"Sh",(function(){return l.Sh})),n.d(t,"Th",(function(){return l.Th})),n.d(t,"Uh",(function(){return l.Uh})),n.d(t,"pf",(function(){return l.pf})),n.d(t,"Hf",(function(){return l.Hf})),n.d(t,"Mf",(function(){return l.Mf})),n.d(t,"uh",(function(){return l.uh})),n.d(t,"Yh",(function(){return l.Yh})),n.d(t,"Zh",(function(){return l.Zh})),n.d(t,"ai",(function(){return l.ai})),n.d(t,"bi",(function(){return l.bi})),n.d(t,"ci",(function(){return l.ci})),n.d(t,"di",(function(){return l.di})),n.d(t,"ei",(function(){return l.ei})),n.d(t,"fi",(function(){return l.fi})),n.d(t,"hi",(function(){return l.hi})),n.d(t,"ii",(function(){return l.ii})),n.d(t,"ki",(function(){return l.ki})),n.d(t,"li",(function(){return l.li})),n.d(t,"mi",(function(){return l.mi})),n.d(t,"ni",(function(){return l.ni})),n.d(t,"oi",(function(){return l.oi})),n.d(t,"pi",(function(){return l.pi})),n.d(t,"qi",(function(){return l.qi})),n.d(t,"ri",(function(){return l.ri})),n.d(t,"si",(function(){return l.si})),n.d(t,"wi",(function(){return l.wi})),n.d(t,"yi",(function(){return l.yi})),n.d(t,"Bi",(function(){return l.Bi})),n.d(t,"Ci",(function(){return l.Ci})),n.d(t,"Fi",(function(){return l.Fi})),n.d(t,"Gi",(function(){return l.Gi})),n.d(t,"Ii",(function(){return l.Ii})),n.d(t,"Mi",(function(){return l.Mi})),n.d(t,"Pi",(function(){return l.Pi})),n.d(t,"Qi",(function(){return l.Qi})),n.d(t,"Ri",(function(){return l.Ri})),n.d(t,"Si",(function(){return l.Si})),n.d(t,"Jg",(function(){return l.Jg})),n.d(t,"oc",(function(){return l.oc})),n.d(t,"Jf",(function(){return l.Jf})),n.d(t,"Vf",(function(){return l.Vf})),n.d(t,"hg",(function(){return l.hg})),n.d(t,"Xh",(function(){return l.Xh})),n.d(t,"vf",(function(){return l.vf})),n.d(t,"Jh",(function(){return l.Jh})),n.d(t,"Vh",(function(){return l.Vh})),n.d(t,"gi",(function(){return l.gi})),n.d(t,"zi",(function(){return l.zi})),n.d(t,"ef",(function(){return l.ef})),n.d(t,"df",(function(){return l.df})),n.d(t,"Ue",(function(){return l.Ue})),n.d(t,"Oe",(function(){return l.Oe})),n.d(t,"We",(function(){return l.We})),n.d(t,"gf",(function(){return l.gf})),n.d(t,"rg",(function(){return l.rg})),n.d(t,"Vg",(function(){return l.Vg})),n.d(t,"vi",(function(){return l.vi})),n.d(t,"Ve",(function(){return l.Ve})),n.d(t,"Qf",(function(){return l.Qf})),n.d(t,"xi",(function(){return l.xi})),n.d(t,"Eh",(function(){return l.Eh})),n.d(t,"fh",(function(){return l.fh})),n.d(t,"zf",(function(){return l.zf})),n.d(t,"nh",(function(){return l.nh})),n.d(t,"rf",(function(){return l.rf})),n.d(t,"sf",(function(){return l.sf})),n.d(t,"ih",(function(){return l.ih})),n.d(t,"ce",(function(){return l.ce})),n.d(t,"Fh",(function(){return l.Fh})),n.d(t,"Bf",(function(){return l.Bf})),n.d(t,"Af",(function(){return l.Af})),n.d(t,"Cf",(function(){return l.Cf})),n.d(t,"kh",(function(){return l.kh})),n.d(t,"jh",(function(){return l.jh})),n.d(t,"Ei",(function(){return l.Ei})),n.d(t,"Di",(function(){return l.Di})),n.d(t,"Ge",(function(){return l.Ge})),n.d(t,"a",(function(){return l.a})),n.d(t,"b",(function(){return l.b})),n.d(t,"c",(function(){return l.c})),n.d(t,"h",(function(){return l.h})),n.d(t,"i",(function(){return l.i})),n.d(t,"j",(function(){return l.j})),n.d(t,"k",(function(){return l.k})),n.d(t,"l",(function(){return l.l})),n.d(t,"m",(function(){return l.m})),n.d(t,"n",(function(){return l.n})),n.d(t,"o",(function(){return l.o})),n.d(t,"p",(function(){return l.p})),n.d(t,"r",(function(){return l.r})),n.d(t,"q",(function(){return l.q})),n.d(t,"s",(function(){return l.s})),n.d(t,"v",(function(){return l.v})),n.d(t,"t",(function(){return l.t})),n.d(t,"u",(function(){return l.u})),n.d(t,"w",(function(){return l.w})),n.d(t,"x",(function(){return l.x})),n.d(t,"y",(function(){return l.y})),n.d(t,"A",(function(){return l.A})),n.d(t,"z",(function(){return l.z})),n.d(t,"B",(function(){return l.B})),n.d(t,"C",(function(){return l.C})),n.d(t,"D",(function(){return l.D})),n.d(t,"E",(function(){return l.E})),n.d(t,"F",(function(){return l.F})),n.d(t,"G",(function(){return l.G})),n.d(t,"H",(function(){return l.H})),n.d(t,"I",(function(){return l.I})),n.d(t,"J",(function(){return l.J})),n.d(t,"K",(function(){return l.K})),n.d(t,"L",(function(){return l.L})),n.d(t,"M",(function(){return l.M})),n.d(t,"N",(function(){return l.N})),n.d(t,"O",(function(){return l.O})),n.d(t,"Q",(function(){return l.Q})),n.d(t,"R",(function(){return l.R})),n.d(t,"P",(function(){return l.P})),n.d(t,"T",(function(){return l.T})),n.d(t,"U",(function(){return l.U})),n.d(t,"V",(function(){return l.V})),n.d(t,"W",(function(){return l.W})),n.d(t,"X",(function(){return l.X})),n.d(t,"Y",(function(){return l.Y})),n.d(t,"Z",(function(){return l.Z})),n.d(t,"bb",(function(){return l.bb})),n.d(t,"ab",(function(){return l.ab})),n.d(t,"Gc",(function(){return l.Gc})),n.d(t,"db",(function(){return l.db})),n.d(t,"eb",(function(){return l.eb})),n.d(t,"fb",(function(){return l.fb})),n.d(t,"ib",(function(){return l.ib})),n.d(t,"hb",(function(){return l.hb})),n.d(t,"jb",(function(){return l.jb})),n.d(t,"kb",(function(){return l.kb})),n.d(t,"lb",(function(){return l.lb})),n.d(t,"mb",(function(){return l.mb})),n.d(t,"nb",(function(){return l.nb})),n.d(t,"ob",(function(){return l.ob})),n.d(t,"pb",(function(){return l.pb})),n.d(t,"qb",(function(){return l.qb})),n.d(t,"sb",(function(){return l.sb})),n.d(t,"wb",(function(){return l.wb})),n.d(t,"vb",(function(){return l.vb})),n.d(t,"xb",(function(){return l.xb})),n.d(t,"yb",(function(){return l.yb})),n.d(t,"Ab",(function(){return l.Ab})),n.d(t,"zb",(function(){return l.zb})),n.d(t,"Bb",(function(){return l.Bb})),n.d(t,"Cb",(function(){return l.Cb})),n.d(t,"Db",(function(){return l.Db})),n.d(t,"Eb",(function(){return l.Eb})),n.d(t,"Ib",(function(){return l.Ib})),n.d(t,"Jb",(function(){return l.Jb})),n.d(t,"Kb",(function(){return l.Kb})),n.d(t,"Lb",(function(){return l.Lb})),n.d(t,"Mb",(function(){return l.Mb})),n.d(t,"Nb",(function(){return l.Nb})),n.d(t,"Pb",(function(){return l.Pb})),n.d(t,"Qb",(function(){return l.Qb})),n.d(t,"Rb",(function(){return l.Rb})),n.d(t,"Sb",(function(){return l.Sb})),n.d(t,"Ob",(function(){return l.Ob})),n.d(t,"Tb",(function(){return l.Tb})),n.d(t,"Gb",(function(){return l.Gb})),n.d(t,"Hb",(function(){return l.Hb})),n.d(t,"Ub",(function(){return l.Ub})),n.d(t,"ac",(function(){return l.ac})),n.d(t,"Vb",(function(){return l.Vb})),n.d(t,"Yb",(function(){return l.Yb})),n.d(t,"Wb",(function(){return l.Wb})),n.d(t,"Xb",(function(){return l.Xb})),n.d(t,"Zb",(function(){return l.Zb})),n.d(t,"bc",(function(){return l.bc})),n.d(t,"cc",(function(){return l.cc})),n.d(t,"dc",(function(){return l.dc})),n.d(t,"ec",(function(){return l.ec})),n.d(t,"fc",(function(){return l.fc})),n.d(t,"hc",(function(){return l.hc})),n.d(t,"ic",(function(){return l.ic})),n.d(t,"jc",(function(){return l.jc})),n.d(t,"nc",(function(){return l.nc})),n.d(t,"kc",(function(){return l.kc})),n.d(t,"lc",(function(){return l.lc})),n.d(t,"mc",(function(){return l.mc})),n.d(t,"qc",(function(){return l.qc})),n.d(t,"pc",(function(){return l.pc})),n.d(t,"tc",(function(){return l.tc})),n.d(t,"uc",(function(){return l.uc})),n.d(t,"vc",(function(){return l.vc})),n.d(t,"wc",(function(){return l.wc})),n.d(t,"xc",(function(){return l.xc})),n.d(t,"yc",(function(){return l.yc})),n.d(t,"Ac",(function(){return l.Ac})),n.d(t,"Bc",(function(){return l.Bc})),n.d(t,"Cc",(function(){return l.Cc})),n.d(t,"Dc",(function(){return l.Dc})),n.d(t,"Fc",(function(){return l.Fc})),n.d(t,"Hc",(function(){return l.Hc})),n.d(t,"Jc",(function(){return l.Jc})),n.d(t,"Lc",(function(){return l.Lc})),n.d(t,"Oc",(function(){return l.Oc})),n.d(t,"Pc",(function(){return l.Pc})),n.d(t,"Mc",(function(){return l.Mc})),n.d(t,"Nc",(function(){return l.Nc})),n.d(t,"Kc",(function(){return l.Kc})),n.d(t,"Qc",(function(){return l.Qc})),n.d(t,"Sc",(function(){return l.Sc})),n.d(t,"Tc",(function(){return l.Tc})),n.d(t,"Vc",(function(){return l.Vc})),n.d(t,"Wc",(function(){return l.Wc})),n.d(t,"Xc",(function(){return l.Xc})),n.d(t,"Yc",(function(){return l.Yc})),n.d(t,"dd",(function(){return l.dd})),n.d(t,"bd",(function(){return l.bd})),n.d(t,"cd",(function(){return l.cd})),n.d(t,"ad",(function(){return l.ad})),n.d(t,"Zc",(function(){return l.Zc})),n.d(t,"fd",(function(){return l.fd})),n.d(t,"nd",(function(){return l.nd})),n.d(t,"wd",(function(){return l.wd})),n.d(t,"gd",(function(){return l.gd})),n.d(t,"md",(function(){return l.md})),n.d(t,"ed",(function(){return l.ed})),n.d(t,"hd",(function(){return l.hd})),n.d(t,"id",(function(){return l.id})),n.d(t,"jd",(function(){return l.jd})),n.d(t,"kd",(function(){return l.kd})),n.d(t,"ld",(function(){return l.ld})),n.d(t,"pd",(function(){return l.pd})),n.d(t,"od",(function(){return l.od})),n.d(t,"rd",(function(){return l.rd})),n.d(t,"sd",(function(){return l.sd})),n.d(t,"td",(function(){return l.td})),n.d(t,"ud",(function(){return l.ud})),n.d(t,"vd",(function(){return l.vd})),n.d(t,"xd",(function(){return l.xd})),n.d(t,"yd",(function(){return l.yd})),n.d(t,"Bd",(function(){return l.Bd})),n.d(t,"Cd",(function(){return l.Cd})),n.d(t,"Dd",(function(){return l.Dd})),n.d(t,"Ed",(function(){return l.Ed})),n.d(t,"Fd",(function(){return l.Fd})),n.d(t,"Gd",(function(){return l.Gd})),n.d(t,"Hd",(function(){return l.Hd})),n.d(t,"Id",(function(){return l.Id})),n.d(t,"Kd",(function(){return l.Kd})),n.d(t,"qd",(function(){return l.qd})),n.d(t,"rb",(function(){return l.rb})),n.d(t,"Rc",(function(){return l.Rc})),n.d(t,"Ld",(function(){return l.Ld})),n.d(t,"tb",(function(){return l.tb})),n.d(t,"ub",(function(){return l.ub})),n.d(t,"le",(function(){return l.le})),n.d(t,"Ai",(function(){return l.Ai})),n.d(t,"Eg",(function(){return l.Eg})),n.d(t,"yg",(function(){return l.yg})),n.d(t,"yh",(function(){return l.yh})),n.d(t,"Ah",(function(){return l.Ah})),n.d(t,"Wh",(function(){return l.Wh})),n.d(t,"xf",(function(){return l.xf})),n.d(t,"af",(function(){return l.af})),n.d(t,"ff",(function(){return l.ff})),n.d(t,"Je",(function(){return l.Je})),n.d(t,"Kf",(function(){return l.Kf}))},function(e,t,n){"use strict";n.d(t,"o",(function(){return f})),n.d(t,"F",(function(){return d})),n.d(t,"d",(function(){return p})),n.d(t,"H",(function(){return m})),n.d(t,"m",(function(){return g})),n.d(t,"i",(function(){return A})),n.d(t,"q",(function(){return v})),n.d(t,"r",(function(){return b})),n.d(t,"I",(function(){return y})),n.d(t,"t",(function(){return w})),n.d(t,"k",(function(){return x})),n.d(t,"G",(function(){return C})),n.d(t,"L",(function(){return k})),n.d(t,"n",(function(){return E})),n.d(t,"E",(function(){return S})),n.d(t,"c",(function(){return _})),n.d(t,"h",(function(){return O})),n.d(t,"s",(function(){return T})),n.d(t,"v",(function(){return D})),n.d(t,"B",(function(){return B})),n.d(t,"C",(function(){return I})),n.d(t,"y",(function(){return M})),n.d(t,"z",(function(){return j})),n.d(t,"D",(function(){return F})),n.d(t,"u",(function(){return R})),n.d(t,"w",(function(){return P})),n.d(t,"x",(function(){return L})),n.d(t,"A",(function(){return U})),n.d(t,"l",(function(){return z})),n.d(t,"M",(function(){return H})),n.d(t,"N",(function(){return $})),n.d(t,"O",(function(){return Q})),n.d(t,"Q",(function(){return V})),n.d(t,"K",(function(){return q})),n.d(t,"b",(function(){return G})),n.d(t,"R",(function(){return W})),n.d(t,"P",(function(){return Y})),n.d(t,"f",(function(){return re})),n.d(t,"e",(function(){return ie})),n.d(t,"g",(function(){return oe})),n.d(t,"j",(function(){return ae})),n.d(t,"p",(function(){return se})),n.d(t,"J",(function(){return ue})),n.d(t,"a",(function(){return ce}));t=n(45);var r=k(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],(function(e,t){return e["[object "+t+"]"]=!0,e}),{}),i=k(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],(function(e,t){return e["[object "+t+"Array]"]=!0,e}),{}),o=Object.prototype.toString,a=(n=Array.prototype).forEach,s=n.filter,u=n.slice,c=n.map,l=(n=(n=function(){}.constructor)?n.prototype:null,"__proto__"),h=2311;function f(){return h++}function d(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t]}function p(e){if(null==e||"object"!=typeof e)return e;var t=e,n=o.call(e);if("[object Array]"===n){if(!X(e)){t=[];for(var a=0,s=e.length;a<s;a++)t[a]=p(e[a])}}else if(i[n]){if(!X(e)){var u=e.constructor;if(u.from)t=u.from(e);else for(t=new u(e.length),a=0,s=e.length;a<s;a++)t[a]=e[a]}}else if(!r[n]&&!X(e)&&!R(e))for(var c in t={},e)e.hasOwnProperty(c)&&c!==l&&(t[c]=p(e[c]));return t}function m(e,t,n){if(!j(t)||!j(e))return n?p(t):e;for(var r in t){var i,o;t.hasOwnProperty(r)&&r!==l&&(i=e[r],!j(o=t[r])||!j(i)||T(o)||T(i)||R(o)||R(i)||N(o)||N(i)||X(o)||X(i)?!n&&r in e||(e[r]=p(t[r])):m(i,o,n))}return e}function g(e,t){if(Object.assign)Object.assign(e,t);else for(var n in t)t.hasOwnProperty(n)&&n!==l&&(e[n]=t[n]);return e}function A(e,t,n){for(var r=S(t),i=0;i<r.length;i++){var o=r[i];(n?null!=t[o]:null==e[o])&&(e[o]=t[o])}return e}function v(e,t){if(e){if(e.indexOf)return e.indexOf(t);for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n}return-1}function b(e,t){var n,r=e.prototype;function i(){}for(n in i.prototype=t.prototype,e.prototype=new i,r)r.hasOwnProperty(n)&&(e.prototype[n]=r[n]);(e.prototype.constructor=e).superClass=t}function y(e,t,n){if(e="prototype"in e?e.prototype:e,t="prototype"in t?t.prototype:t,Object.getOwnPropertyNames)for(var r=Object.getOwnPropertyNames(t),i=0;i<r.length;i++){var o=r[i];"constructor"!==o&&(n?null!=t[o]:null==e[o])&&(e[o]=t[o])}else A(e,t,n)}function w(e){return!!e&&"string"!=typeof e&&"number"==typeof e.length}function x(e,t,n){if(e&&t)if(e.forEach&&e.forEach===a)e.forEach(t,n);else if(e.length===+e.length)for(var r=0,i=e.length;r<i;r++)t.call(n,e[r],r,e);else for(var o in e)e.hasOwnProperty(o)&&t.call(n,e[o],o,e)}function C(e,t,n){if(!e)return[];if(!t)return V(e);if(e.map&&e.map===c)return e.map(t,n);for(var r=[],i=0,o=e.length;i<o;i++)r.push(t.call(n,e[i],i,e));return r}function k(e,t,n,r){if(e&&t){for(var i=0,o=e.length;i<o;i++)n=t.call(r,n,e[i],i,e);return n}}function E(e,t,n){if(!e)return[];if(!t)return V(e);if(e.filter&&e.filter===s)return e.filter(t,n);for(var r=[],i=0,o=e.length;i<o;i++)t.call(n,e[i],i,e)&&r.push(e[i]);return r}function S(e){if(!e)return[];if(Object.keys)return Object.keys(e);var t,n=[];for(t in e)e.hasOwnProperty(t)&&n.push(t);return n}t.c.createCanvas;var _=n&&D(n.bind)?n.call.bind(n.bind):function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return function(){return e.apply(t,n.concat(u.call(arguments)))}};function O(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return function(){return e.apply(this,t.concat(u.call(arguments)))}}function T(e){return Array.isArray?Array.isArray(e):"[object Array]"===o.call(e)}function D(e){return"function"==typeof e}function B(e){return"string"==typeof e}function I(e){return"[object String]"===o.call(e)}function M(e){return"number"==typeof e}function j(e){var t=typeof e;return"function"==t||!!e&&"object"==t}function N(e){return r[o.call(e)]}function F(e){return!!i[o.call(e)]}function R(e){return"object"==typeof e&&"number"==typeof e.nodeType&&"object"==typeof e.ownerDocument}function P(e){return null!=e.colorStops}function L(e){return null!=e.image}function U(e){return"[object RegExp]"===o.call(e)}function z(e){return e!=e}function H(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,r=e.length;n<r;n++)if(null!=e[n])return e[n]}function $(e,t){return null!=e?e:t}function Q(e,t,n){return null!=e?e:null!=t?t:n}function V(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return u.apply(e,t)}function q(e){var t;return"number"==typeof e?[e,e,e,e]:2===(t=e.length)?[e[0],e[1],e[0],e[1]]:3===t?[e[0],e[1],e[2],e[1]]:e}function G(e,t){if(!e)throw new Error(t)}function W(e){return null==e?null:"function"==typeof e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var K="__ec_primitive__";function Y(e){e[K]=!0}function X(e){return e[K]}Z.prototype.delete=function(e){var t=this.has(e);return t&&delete this.data[e],t},Z.prototype.has=function(e){return this.data.hasOwnProperty(e)},Z.prototype.get=function(e){return this.data[e]},Z.prototype.set=function(e,t){return this.data[e]=t,this},Z.prototype.keys=function(){return S(this.data)},Z.prototype.forEach=function(e){var t,n=this.data;for(t in n)n.hasOwnProperty(t)&&e(n[t],t)};var J=Z;function Z(){this.data={}}var ee="function"==typeof Map;ne.prototype.hasKey=function(e){return this.data.has(e)},ne.prototype.get=function(e){return this.data.get(e)},ne.prototype.set=function(e,t){return this.data.set(e,t),t},ne.prototype.each=function(e,t){this.data.forEach((function(n,r){e.call(t,n,r)}))},ne.prototype.keys=function(){var e=this.data.keys();return ee?Array.from(e):e},ne.prototype.removeKey=function(e){this.data.delete(e)};var te=ne;function ne(e){var t=T(e),n=(this.data=new(ee?Map:J),this);function r(e,r){t?n.set(e,r):n.set(r,e)}e instanceof ne?e.each(r):e&&x(e,r)}function re(e){return new te(e)}function ie(e,t){for(var n=new e.constructor(e.length+t.length),r=0;r<e.length;r++)n[r]=e[r];var i=e.length;for(r=0;r<t.length;r++)n[r+i]=t[r];return n}function oe(e,t){var n;e=Object.create?Object.create(e):((n=function(){}).prototype=e,new n);return t&&g(e,t),e}function ae(e){(e=e.style).webkitUserSelect="none",e.userSelect="none",e.webkitTapHighlightColor="rgba(0,0,0,0)",e["-webkit-touch-callout"]="none"}function se(e,t){return e.hasOwnProperty(t)}function ue(){}var ce=180/Math.PI},function(e,t,n){"use strict";n.d(t,"d",(function(){return i})),n.d(t,"e",(function(){return o})),n.d(t,"f",(function(){return a})),n.d(t,"b",(function(){return s})),n.d(t,"g",(function(){return c})),n.d(t,"c",(function(){return l})),n.d(t,"a",(function(){return h}));var r=n(0);
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function i(e,t,n,i,a){var s=t.inputParams[e];if(s&&void 0!==s.inputIndexStart){var u=s.inputIndexStart,c=0===s.inputIndexEnd?void 0:void 0===s.inputIndexEnd?u+1:s.inputIndexEnd;if("tensor"===s.type)return o(t.inputNames[s.inputIndexStart],n,i,a);if("tensors"===s.type){return t.inputNames.slice(u,c).map(e=>o(e,n,i,a))}const e=o(t.inputNames.slice(u)[0],n,i,a);return c=e.dataSync(),"number"===s.type?c[0]:r.Ji.toNestedArray(e.shape,c)}return(u=t.attrParams[e])&&u.value}function o(e,t,n,r){const[i,o]=c(e);return null!=r&&null!=(e=r.getHashTableHandleByName(i))?e:void 0!==(r=n.currentContextIds.find(e=>!!t[u(i,e)]))?t[u(i,r)][o]:void 0}function a(e,t,n){return t[u(e,n.currentContextId)]}function s(e,t){var[e,n,r]=c(e);return[u(e,t&&t.currentContextId),n,r]}function u(e,t){return t?e+"-"+t:e}function c(e){var t,n=e.split(":");return 1===n.length?[e,0,void 0]:(e=n[0],t=3===n.length?n[1]:void 0,[e,Number(n[n.length-1]),t])}function l(e,t,n){let r=i("pad",e,t,n);if("explicit"!==r)return r;{r=i("explicitPaddings",e,t,n);const o=[[0,0],[0,0],[0,0],[0,0]];for(let e=0;e<4;e++)o[e][0]=r[2*e],o[e][1]=r[2*e+1];return o}}function h(e){return e.kept?e:Object(r.ue)(e)}},function(e,t,n){"use strict";n.d(t,"c",(function(){return u})),n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return h}));var r=n(6),i=n(24),o=n(7),a=n(10),s=n(12);
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function u(e,t){let n=e;if(Object(a.A)(e))return"string"===t?[]:[e.length];var r;if("object"==typeof e&&"texture"in e)return r=e.channels||"RGBA",[e.height,e.width*r.length];if(!Array.isArray(e))return[];const o=[];for(;Array.isArray(n)||Object(a.A)(n)&&"string"!==t;)o.push(n.length),n=n[0];return Array.isArray(e)&&Object(i.c)().getBool("TENSORLIKE_CHECK_SHAPE_CONSISTENCY")&&function e(t,n,r){if(r=r||[],!Array.isArray(t)&&!Object(a.A)(t))return void Object(a.b)(0===n.length,()=>`Element arr[${r.join("][")}] is a primitive, but should be an array/TypedArray of ${n[0]} elements`);Object(a.b)(0<n.length,()=>`Element arr[${r.join("][")}] should be a primitive, but is an array of ${t.length} elements`),Object(a.b)(t.length===n[0],()=>`Element arr[${r.join("][")}] should have ${n[0]} elements, but has ${t.length} elements`);const i=n.slice(1);for(let n=0;n<t.length;++n)e(t[n],i,r.concat(n))}(e,o,[]),o}function c(e,t,n,r){if("string_or_numeric"!==e){if(null==e)throw new Error("Expected dtype cannot be null.");if("numeric"!==e&&e!==t||"numeric"===e&&"string"===t)throw new Error(`Argument '${n}' passed to '${r}' must be ${e} tensor, but got ${t} tensor`)}}function l(e,t,n,i="numeric"){if(e instanceof o.a)return c(i,e.dtype,t,n),e;let l=Object(a.r)(e);if(c(i,l="string"!==l&&0<=["bool","int32","float32"].indexOf(i)?i:l,t,n),null==e||!Object(a.A)(e)&&!Array.isArray(e)&&"number"!=typeof e&&"boolean"!=typeof e&&"string"!=typeof e)throw i=null==e?"null":e.constructor.name,new Error(`Argument '${t}' passed to '${n}' must be a Tensor or TensorLike, but got '${i}'`);return t=u(e,l),Object(a.A)(e)||Array.isArray(e)||(e=[e]),n="string"!==l?Object(s.toTypedArray)(e,l):Object(a.m)(e,[],!0),r.a.makeTensor(n,t,l)}function h(e,t,n,r="numeric"){if(!Array.isArray(e))throw new Error(`Argument ${t} passed to ${n} must be a \`Tensor[]\` or \`TensorLike[]\``);return e.map((e,i)=>l(e,t+`[${i}]`,n,r))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return o})),n.d(t,"d",(function(){return a})),n.d(t,"e",(function(){return s})),n.d(t,"f",(function(){return u})),n.d(t,"g",(function(){return c})),n.d(t,"h",(function(){return l})),n.d(t,"i",(function(){return h})),n.d(t,"j",(function(){return f})),n.d(t,"k",(function(){return d})),n.d(t,"l",(function(){return p})),n.d(t,"n",(function(){return m})),n.d(t,"m",(function(){return g})),n.d(t,"o",(function(){return A})),n.d(t,"r",(function(){return v})),n.d(t,"p",(function(){return b})),n.d(t,"q",(function(){return y})),n.d(t,"s",(function(){return w})),n.d(t,"t",(function(){return x})),n.d(t,"u",(function(){return C})),n.d(t,"w",(function(){return k})),n.d(t,"v",(function(){return E})),n.d(t,"x",(function(){return S})),n.d(t,"y",(function(){return _})),n.d(t,"z",(function(){return O})),n.d(t,"A",(function(){return T})),n.d(t,"B",(function(){return D})),n.d(t,"C",(function(){return B})),n.d(t,"D",(function(){return I})),n.d(t,"E",(function(){return M})),n.d(t,"F",(function(){return j})),n.d(t,"G",(function(){return N})),n.d(t,"H",(function(){return F})),n.d(t,"I",(function(){return R})),n.d(t,"J",(function(){return P})),n.d(t,"K",(function(){return L})),n.d(t,"M",(function(){return U})),n.d(t,"N",(function(){return z})),n.d(t,"L",(function(){return H})),n.d(t,"O",(function(){return $})),n.d(t,"P",(function(){return Q})),n.d(t,"Q",(function(){return V})),n.d(t,"R",(function(){return q})),n.d(t,"S",(function(){return G})),n.d(t,"T",(function(){return W})),n.d(t,"U",(function(){return K})),n.d(t,"W",(function(){return Y})),n.d(t,"V",(function(){return X})),n.d(t,"sc",(function(){return J})),n.d(t,"X",(function(){return Z})),n.d(t,"Y",(function(){return ee})),n.d(t,"Z",(function(){return te})),n.d(t,"bb",(function(){return ne})),n.d(t,"ab",(function(){return re})),n.d(t,"cb",(function(){return ie})),n.d(t,"db",(function(){return oe})),n.d(t,"eb",(function(){return ae})),n.d(t,"fb",(function(){return se})),n.d(t,"gb",(function(){return ue})),n.d(t,"hb",(function(){return ce})),n.d(t,"ib",(function(){return le})),n.d(t,"jb",(function(){return he})),n.d(t,"lb",(function(){return fe})),n.d(t,"pb",(function(){return de})),n.d(t,"ob",(function(){return pe})),n.d(t,"qb",(function(){return me})),n.d(t,"rb",(function(){return ge})),n.d(t,"tb",(function(){return Ae})),n.d(t,"sb",(function(){return ve})),n.d(t,"ub",(function(){return be})),n.d(t,"vb",(function(){return ye})),n.d(t,"wb",(function(){return we})),n.d(t,"xb",(function(){return xe})),n.d(t,"Ab",(function(){return Ce})),n.d(t,"Bb",(function(){return ke})),n.d(t,"Cb",(function(){return Ee})),n.d(t,"Db",(function(){return Se})),n.d(t,"Eb",(function(){return _e})),n.d(t,"Fb",(function(){return Oe})),n.d(t,"Hb",(function(){return Te})),n.d(t,"Ib",(function(){return De})),n.d(t,"Jb",(function(){return Be})),n.d(t,"Kb",(function(){return Ie})),n.d(t,"Gb",(function(){return Me})),n.d(t,"Lb",(function(){return je})),n.d(t,"yb",(function(){return Ne})),n.d(t,"zb",(function(){return Fe})),n.d(t,"Mb",(function(){return Re})),n.d(t,"Sb",(function(){return Pe})),n.d(t,"Nb",(function(){return Le})),n.d(t,"Qb",(function(){return Ue})),n.d(t,"Ob",(function(){return ze})),n.d(t,"Pb",(function(){return He})),n.d(t,"Rb",(function(){return $e})),n.d(t,"Tb",(function(){return Qe})),n.d(t,"Ub",(function(){return Ve})),n.d(t,"Vb",(function(){return qe})),n.d(t,"Wb",(function(){return Ge})),n.d(t,"Xb",(function(){return We})),n.d(t,"Yb",(function(){return Ke})),n.d(t,"Zb",(function(){return Ye})),n.d(t,"ac",(function(){return Xe})),n.d(t,"ec",(function(){return Je})),n.d(t,"bc",(function(){return Ze})),n.d(t,"cc",(function(){return et})),n.d(t,"dc",(function(){return tt})),n.d(t,"gc",(function(){return nt})),n.d(t,"fc",(function(){return rt})),n.d(t,"hc",(function(){return it})),n.d(t,"ic",(function(){return ot})),n.d(t,"jc",(function(){return at})),n.d(t,"kc",(function(){return st})),n.d(t,"lc",(function(){return ut})),n.d(t,"mc",(function(){return ct})),n.d(t,"nc",(function(){return lt})),n.d(t,"oc",(function(){return ht})),n.d(t,"pc",(function(){return ft})),n.d(t,"qc",(function(){return dt})),n.d(t,"rc",(function(){return pt})),n.d(t,"tc",(function(){return mt})),n.d(t,"uc",(function(){return gt})),n.d(t,"wc",(function(){return At})),n.d(t,"zc",(function(){return vt})),n.d(t,"Ac",(function(){return bt})),n.d(t,"xc",(function(){return yt})),n.d(t,"yc",(function(){return wt})),n.d(t,"vc",(function(){return xt})),n.d(t,"Bc",(function(){return Ct})),n.d(t,"Dc",(function(){return kt})),n.d(t,"Ec",(function(){return Et})),n.d(t,"Fc",(function(){return St})),n.d(t,"Gc",(function(){return _t})),n.d(t,"Hc",(function(){return Ot})),n.d(t,"Ic",(function(){return Tt})),n.d(t,"Nc",(function(){return Dt})),n.d(t,"Lc",(function(){return Bt})),n.d(t,"Mc",(function(){return It})),n.d(t,"Kc",(function(){return Mt})),n.d(t,"Jc",(function(){return jt})),n.d(t,"Pc",(function(){return Nt})),n.d(t,"Xc",(function(){return Ft})),n.d(t,"gd",(function(){return Rt})),n.d(t,"Qc",(function(){return Pt})),n.d(t,"Wc",(function(){return Lt})),n.d(t,"Oc",(function(){return Ut})),n.d(t,"Rc",(function(){return zt})),n.d(t,"Sc",(function(){return Ht})),n.d(t,"Tc",(function(){return $t})),n.d(t,"Uc",(function(){return Qt})),n.d(t,"Vc",(function(){return Vt})),n.d(t,"Zc",(function(){return qt})),n.d(t,"Yc",(function(){return Gt})),n.d(t,"bd",(function(){return Wt})),n.d(t,"cd",(function(){return Kt})),n.d(t,"dd",(function(){return Yt})),n.d(t,"ed",(function(){return Xt})),n.d(t,"fd",(function(){return Jt})),n.d(t,"hd",(function(){return Zt})),n.d(t,"id",(function(){return en})),n.d(t,"jd",(function(){return tn})),n.d(t,"kd",(function(){return nn})),n.d(t,"ld",(function(){return rn})),n.d(t,"md",(function(){return on})),n.d(t,"nd",(function(){return an})),n.d(t,"od",(function(){return sn})),n.d(t,"pd",(function(){return un})),n.d(t,"qd",(function(){return cn})),n.d(t,"rd",(function(){return ln})),n.d(t,"ad",(function(){return hn})),n.d(t,"kb",(function(){return fn})),n.d(t,"Cc",(function(){return dn})),n.d(t,"sd",(function(){return pn})),n.d(t,"mb",(function(){return mn})),n.d(t,"nb",(function(){return gn}));const r="Abs",i="Acos",o="Acosh",a="Add",s="AddN",u="All",c="Any",l="ArgMax",h="ArgMin",f="Asin",d="Asinh",p="Atan",m="Atanh",g="Atan2",A="AvgPool",v="AvgPoolGrad",b="AvgPool3D",y="AvgPool3DGrad",w="BatchMatMul",x="BatchToSpaceND",C="Bincount",k="BroadcastTo",E="BroadcastArgs",S="Cast",_="Ceil",O="ClipByValue",T="Complex",D="ComplexAbs",B="Concat",I="Conv2D",M="Conv2DBackpropFilter",j="Conv2DBackpropInput",N="Conv3D",F="Conv3DBackpropFilterV2",R="Conv3DBackpropInputV2",P="Cos",L="Cosh",U="Cumprod",z="Cumsum",H="CropAndResize",$="DenseBincount",Q="DepthToSpace",V="DepthwiseConv2dNative",q="DepthwiseConv2dNativeBackpropFilter",G="DepthwiseConv2dNativeBackpropInput",W="Diag",K="Dilation2D",Y="Dilation2DBackpropInput",X="Dilation2DBackpropFilter",J="RealDiv",Z="Einsum",ee="Elu",te="EluGrad",ne="Erf",re="Equal",ie="Exp",oe="ExpandDims",ae="Expm1",se="FFT",ue="Fill",ce="FlipLeftRight",le="Floor",he="FloorDiv",fe="FusedBatchNorm",de="GatherV2",pe="GatherNd",me="Greater",ge="GreaterEqual",Ae="Identity",ve="IFFT",be="Imag",ye="IsFinite",we="IsInf",xe="IsNan",Ce="LeakyRelu",ke="Less",Ee="LessEqual",Se="LinSpace",_e="Log",Oe="Log1p",Te="LogicalAnd",De="LogicalNot",Be="LogicalOr",Ie="LogicalXor",Me="LogSoftmax",je="LowerBound",Ne="LRN",Fe="LRNGrad",Re="Max",Pe="Maximum",Le="MaxPool",Ue="MaxPoolGrad",ze="MaxPool3D",He="MaxPool3DGrad",$e="MaxPoolWithArgmax",Qe="Mean",Ve="Min",qe="Minimum",Ge="MirrorPad",We="Mod",Ke="Multinomial",Ye="Multiply",Xe="Neg",Je="NotEqual",Ze="NonMaxSuppressionV3",et="NonMaxSuppressionV4",tt="NonMaxSuppressionV5",nt="OnesLike",rt="OneHot",it="Pack",ot="PadV2",at="Pool",st="Pow",ut="Prelu",ct="Prod",lt="RaggedGather",ht="RaggedRange",ft="RaggedTensorToTensor",dt="Range",pt="Real",mt="Reciprocal",gt="Relu",At="Reshape",vt="ResizeNearestNeighbor",bt="ResizeNearestNeighborGrad",yt="ResizeBilinear",wt="ResizeBilinearGrad",xt="Relu6",Ct="Reverse",kt="Round",Et="Rsqrt",St="ScatterNd",_t="SearchSorted",Ot="Select",Tt="Selu",Dt="Slice",Bt="Sin",It="Sinh",Mt="Sign",jt="Sigmoid",Nt="Softplus",Ft="Sqrt",Rt="Sum",Pt="SpaceToBatchND",Lt="SplitV",Ut="Softmax",zt="SparseFillEmptyRows",Ht="SparseReshape",$t="SparseSegmentMean",Qt="SparseSegmentSum",Vt="SparseToDense",qt="SquaredDifference",Gt="Square",Wt="StridedSlice",Kt="StringNGrams",Yt="StringSplit",Xt="StringToHashBucketFast",Jt="Sub",Zt="Tan",en="Tanh",tn="Tile",nn="TopK",rn="Transform",on="Transpose",an="Unique",sn="Unpack",un="UnsortedSegmentSum",cn="UpperBound",ln="ZerosLike",hn="Step",fn="FromPixels",dn="RotateWithOffset",pn="_FusedMatMul",mn="FusedConv2D",gn="FusedDepthwiseConv2D"},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a}));var r=n(6),i=n(10);
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */const o="__op";function a(e){var t=Object.keys(e);if(1!==t.length)throw new Error("Please provide an object with a single key (operation name) mapping to a function. Got an object with "+t.length+" keys.");let n=t[0];const a=e[n];return n.endsWith("_")&&(n=n.substring(0,n.length-1)),n+=o,t=(...e)=>{r.a.startScope(n);try{var t=a(...e);return Object(i.x)(t),r.a.endScope(t),t}catch(e){throw r.a.endScope(null),e}},Object.defineProperty(t,"name",{value:n,configurable:!0}),t}},function(e,t,n){"use strict";var r=n(164),i=n(24),o=n(124),a=n(4),s=n(71),u=n(85),c=n(12),l=n(10);
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */class h{constructor(e,t){this.backendTimer=e,null==(this.logger=t)&&(this.logger=new f)}profileKernel(e,t,n){let r;var o=()=>{r=n()};let a;var s=c.now();if(this.backendTimer.timerAvailable())a=this.backendTimer.time(o);else{o();for(const e of r)e.dataSync();a=Promise.resolve({kernelMs:c.now()-s})}if(Object(i.c)().getBool("CHECK_COMPUTATION_FOR_ERRORS"))for(let e=0;e<r.length;e++){const t=r[e];t.data().then(e=>{var n=e;if("float32"===(e=t.dtype))for(let e=0;e<n.length;e++){var r=n[e];if(isNaN(r)||!isFinite(r))return}})}return{kernelName:e,outputs:r,inputs:t,timeMs:a.then(e=>e.kernelMs),extraInfo:a.then(e=>null!=e.getExtraProfileInfo?e.getExtraProfileInfo():"")}}logKernelProfile(e){const{kernelName:t,outputs:n,timeMs:r,inputs:i,extraInfo:o}=e;n.forEach(e=>{Promise.all([e.data(),r,o]).then(n=>{this.logger.logKernelProfile(t,e,n[0],n[1],i,n[2])})})}}class f{logKernelProfile(e,t,n,r,i,o){"number"==typeof r?l.L(r+"ms",9):r.error,l.L(e,25),t.rank,t.size,l.L(t.shape.toString(),14);let a="";for(const e in i){var s,u=i[e];null!=u&&(a+=e+`: ${s=(u=u.shape||t.shape).length}D ${0<s?u:""} `)}}}
/**
 * @license
 * Copyright 2017 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */var d=n(7),p=n(28);
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function m(e){return null!=e.kernelName}n.d(t,"b",(function(){return v})),n.d(t,"a",(function(){return b}));class g{constructor(){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,get kernelNames(){return Array.from(new Set(this.kernels.map(e=>e.name)))}}}dispose(){for(const e in this.registeredVariables)this.registeredVariables[e].dispose()}}class A{constructor(e){this.ENV=e,this.registry={},this.registryFactory={},this.pendingBackendInitId=0,this.state=new g}async ready(){if(null!=this.pendingBackendInit)return this.pendingBackendInit.then(()=>{});if(null==this.backendInstance){var e=this.getSortedBackends();for(let n=0;n<e.length;n++){var t=e[n];if(await this.initializeBackend(t).success)return void await this.setBackend(t)}throw new Error("Could not initialize any backends, all backend initializations failed.")}}get backend(){if(null!=this.pendingBackendInit)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(null==this.backendInstance){var{name:e,asyncInit:t}=this.initializeBackendsAndReturnBest();if(t)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}backendNames(){return Object.keys(this.registryFactory)}findBackend(e){if(!(e in this.registry)){if(!(e in this.registryFactory))return null;if(this.initializeBackend(e).asyncInit)return null}return this.registry[e]}findBackendFactory(e){return e in this.registryFactory?this.registryFactory[e].factory:null}registerBackend(e,t,n=1){return e in this.registryFactory?(u.b(e+" backend was already registered. Reusing existing backend factory."),!1):(this.registryFactory[e]={factory:t,priority:n},!0)}async setBackend(e){if(null==this.registryFactory[e])throw new Error(`Backend name '${e}' not found in registry`);if(this.backendName=e,null==this.registry[e]){this.backendInstance=null;var{success:t,asyncInit:n}=this.initializeBackend(e);if(!(n?await t:t))return!1}return this.backendInstance=this.registry[e],this.setupRegisteredKernels(),this.profiler=new h(this.backendInstance),!0}setupRegisteredKernels(){Object(s.d)(this.backendName).forEach(e=>{null!=e.setupFunc&&e.setupFunc(this.backendInstance)})}disposeRegisteredKernels(e){Object(s.d)(e).forEach(t=>{null!=t.disposeFunc&&t.disposeFunc(this.registry[e])})}initializeBackend(e){const t=this.registryFactory[e];if(null==t)throw new Error(`Cannot initialize backend ${e}, no registration found.`);try{const i=t.factory();if(!i||i instanceof r.b||"function"!=typeof i.then)return this.registry[e]=i,{success:!0,asyncInit:!1};{const t=++this.pendingBackendInitId;var n=i.then(n=>!(t<this.pendingBackendInitId||(this.registry[e]=n,this.pendingBackendInit=null))).catch(n=>(t<this.pendingBackendInitId||(this.pendingBackendInit=null,u.b(`Initialization of backend ${e} failed`),u.b(n.stack||n.message)),!1));return{success:this.pendingBackendInit=n,asyncInit:!0}}}catch(t){return u.b(`Initialization of backend ${e} failed`),u.b(t.stack||t.message),{success:!1,asyncInit:!1}}}removeBackend(e){if(!(e in this.registryFactory))throw new Error(e+" backend not found in registry");this.backendName===e&&null!=this.pendingBackendInit&&this.pendingBackendInitId++,e in this.registry&&(this.disposeRegisteredKernels(e),this.registry[e].dispose(),delete this.registry[e]),delete this.registryFactory[e],this.backendName===e&&(this.pendingBackendInit=null,this.backendName=null,this.backendInstance=null)}getSortedBackends(){if(0===Object.keys(this.registryFactory).length)throw new Error("No backend found in registry.");return Object.keys(this.registryFactory).sort((e,t)=>this.registryFactory[t].priority-this.registryFactory[e].priority)}initializeBackendsAndReturnBest(){var e=this.getSortedBackends();for(let i=0;i<e.length;i++){var t=e[i],{success:n,asyncInit:r}=this.initializeBackend(t);if(r||n)return{name:t,asyncInit:r}}throw new Error("Could not initialize any backends, all backend initializations failed.")}moveData(e,t){const n=this.state.tensorInfo.get(t),r=n.backend;var i=this.readSync(t),o=r.refCount(t);r.disposeData(t,!0),(n.backend=e).move(t,i,n.shape,n.dtype,o),this.shouldCheckForMemLeaks()&&this.state.numDataMovesStack[this.state.numDataMovesStack.length-1]++}tidy(e,t){let n,r=null;if(null==t){if("function"!=typeof e)throw new Error("Please provide a function to tidy()");t=e}else{if("string"!=typeof e&&!(e instanceof String))throw new Error("When calling with two arguments, the first argument to tidy() must be a string");if("function"!=typeof t)throw new Error("When calling with two arguments, the 2nd argument to tidy() must be a function");r=e}return this.scopedRun(()=>this.startScope(r),()=>this.endScope(n),()=>(n=t(),n))}scopedRun(e,t,n){e();try{var r=n();return t(),r}catch(e){throw t(),e}}nextTensorId(){return A.nextTensorId++}nextVariableId(){return A.nextVariableId++}clone(e){var t=b.runKernel(a.tb,{x:e});return this.addTapeNode(this.state.activeScope.name,{x:e},[t],e=>({x:()=>{var t={x:e};return b.runKernel(a.x,t,{dtype:"float32"})}}),[],{}),t}runKernel(e,t,n){if(null==this.backendName&&this.backend,null!=Object(s.c)(e,this.backendName))return this.runKernelFunc({kernelName:e,inputs:t,attrs:n});throw new Error(`Kernel '${e}' not registered for backend '${this.backendName}'`)}shouldCheckForMemLeaks(){return this.ENV.getBool("IS_TEST")}checkKernelForMemLeak(e,t,n){var r=this.backend.numDataIds();let i=0;if(n.forEach(e=>{i+="complex64"===e.dtype?3:1}),n=this.state.numDataMovesStack[this.state.numDataMovesStack.length-1],0<(r=r-t-i-n))throw new Error(`Backend '${this.backendName}' has an internal memory leak (${r} data ids) after running '${e}'`)}runKernelFunc(e){let t,n=[];const r=this.isTapeOn();var i=this.state.numBytes,o=this.state.numTensors;let a,u;this.shouldCheckForMemLeaks()&&this.state.numDataMovesStack.push(0),null==this.backendName&&this.backend;const c=m(e)?e.kernelName:null!=this.state.activeScope?this.state.activeScope.name:"";if(m(e)){const{kernelName:t,inputs:i,attrs:o}=e,c=(null==this.backendName&&this.backend,Object(s.c)(t,this.backendName));l.b(null!=c,()=>`Cannot find registered kernel '${t}' for backend '${this.backendName}'`),a=()=>{var e=this.backend.numDataIds();u=c.kernelFunc({inputs:i,attrs:o,backend:this.backend});const a=Array.isArray(u)?u:[u];this.shouldCheckForMemLeaks()&&this.checkKernelForMemLeak(t,e,a);var s;e=a.map(e=>null!=e.rank?e:this.makeTensorFromTensorInfo(e));return r&&(s=this.getTensorsForGradient(t,i,e),n=this.saveTensorsForBackwardMode(s)),e}}else{const t=e.forwardFunc,i=e=>{r&&(n=e.map(e=>this.keep(this.clone(e))))};a=()=>{var e=this.backend.numDataIds(),n=(u=this.tidy(()=>t(this.backend,i)),Array.isArray(u)?u:[u]);return this.shouldCheckForMemLeaks()&&this.checkKernelForMemLeak(c,e,n),n}}const{inputs:h,attrs:f}=e;let d;return e=m(e)?null:e.backwardsFunc,this.scopedRun(()=>this.state.kernelDepth++,()=>this.state.kernelDepth--,()=>{t=this.ENV.getBool("DEBUG")||this.state.profiling?(d=this.profiler.profileKernel(c,h,()=>a()),this.ENV.getBool("DEBUG")&&this.profiler.logKernelProfile(d),d.outputs):a()}),r&&this.addTapeNode(c,h,t,e,n,f),this.state.profiling&&this.state.activeProfile.kernels.push({name:c,bytesAdded:this.state.numBytes-i,totalBytesSnapshot:this.state.numBytes,tensorsAdded:this.state.numTensors-o,totalTensorsSnapshot:this.state.numTensors,inputShapes:Object.keys(h).map(e=>null!=h[e]?h[e].shape:null),outputShapes:t.map(e=>e.shape),kernelTimeMs:d.timeMs,extraInfo:d.extraInfo}),Array.isArray(u)?t:t[0]}saveTensorsForBackwardMode(e){return e.map(e=>this.keep(this.clone(e)))}getTensorsForGradient(e,t,n){if(null==(e=Object(s.b)(e)))return[];{const r=e.inputsToSave||[],i=e.outputsToSave||[];let o;return o=e.saveAllInputs?(l.b(Array.isArray(t),()=>"saveAllInputs is true, expected inputs to be an array."),Object.keys(t).map(e=>t[e])):r.map(e=>t[e]),e=n.filter((e,t)=>i[t]),o.concat(e)}}makeTensor(e,t,n,r){if(null==e)throw new Error("Values passed to engine.makeTensor() are null");r=r||this.backend;let i=e;if("string"===(n=n||"float32")&&l.z(e[0])&&(i=e.map(e=>c.encodeString(e))),e=r.write(i,t,n),t=new d.a(t,n,e,this.nextTensorId()),this.trackTensor(t,r),"string"===n){const t=this.state.tensorInfo.get(e);r=Object(l.f)(i),this.state.numBytes+=r-t.bytes,t.bytes=r}return t}makeTensorFromDataId(e,t,n,r){return this.makeTensorFromTensorInfo({dataId:e,shape:t,dtype:n=n||"float32"},r)}makeTensorFromTensorInfo(e,t){var{dataId:e,shape:n,dtype:r}=e,n=new d.a(n,r,e,this.nextTensorId());return this.trackTensor(n,t),n}makeVariable(e,t=!0,n,r){if(n=n||this.nextVariableId().toString(),null!=r&&r!==e.dtype&&(e=e.cast(r)),r=new d.c(e,t,n,this.nextTensorId()),null!=this.state.registeredVariables[r.name])throw new Error(`Variable with name ${r.name} was already registered`);return this.state.registeredVariables[r.name]=r,this.incRef(r,this.backend),r}trackTensor(e,t){this.state.numTensors++,"string"===e.dtype&&this.state.numStringTensors++;let n=0;"complex64"!==e.dtype&&"string"!==e.dtype&&(n=e.size*l.g(e.dtype)),this.state.numBytes+=n,this.state.tensorInfo.has(e.dataId)||(this.state.numDataBuffers++,this.state.tensorInfo.set(e.dataId,{backend:t||this.backend,dtype:e.dtype,shape:e.shape,bytes:n})),e instanceof d.c||this.track(e)}incRef(e,t){this.trackTensor(e,t),this.backend.incRef(e.dataId)}removeDataId(e,t){this.state.tensorInfo.has(e)&&this.state.tensorInfo.get(e).backend===t&&(this.state.tensorInfo.delete(e),this.state.numDataBuffers--)}disposeTensor(e){if(this.state.tensorInfo.has(e.dataId)){const n=this.state.tensorInfo.get(e.dataId);var t;this.state.numTensors--,"string"===e.dtype&&(this.state.numStringTensors--,this.state.numBytes-=n.bytes),"complex64"!==e.dtype&&"string"!==e.dtype&&(t=e.size*l.g(e.dtype),this.state.numBytes-=t),n.backend.disposeData(e.dataId)&&this.removeDataId(e.dataId,n.backend)}}disposeVariables(){for(const t in this.state.registeredVariables){var e=this.state.registeredVariables[t];this.disposeVariable(e)}}disposeVariable(e){this.disposeTensor(e),null!=this.state.registeredVariables[e.name]&&delete this.state.registeredVariables[e.name]}memory(){const e=this.backend.memory();return e.numTensors=this.state.numTensors,e.numDataBuffers=this.state.numDataBuffers,e.numBytes=this.state.numBytes,0<this.state.numStringTensors&&(e.unreliable=!0,null==e.reasons&&(e.reasons=[]),e.reasons.push("Memory usage by string tensors is approximate (2 bytes per character)")),e}async profile(e){this.state.profiling=!0;var t=this.state.numBytes,n=this.state.numTensors;this.state.activeProfile.kernels=[],this.state.activeProfile.result=await e(),this.state.profiling=!1,this.state.activeProfile.peakBytes=Math.max(...this.state.activeProfile.kernels.map(e=>e.totalBytesSnapshot)),this.state.activeProfile.newBytes=this.state.numBytes-t,this.state.activeProfile.newTensors=this.state.numTensors-n;for(const e of this.state.activeProfile.kernels)e.kernelTimeMs=await e.kernelTimeMs,e.extraInfo=await e.extraInfo;return this.state.activeProfile}isTapeOn(){return 0<this.state.gradientDepth&&0===this.state.kernelDepth}addTapeNode(e,t,n,r,i,o){const a={id:this.state.nextTapeNodeId++,kernelName:e,inputs:t,outputs:n,saved:i};t=Object(s.b)(e),null!=(r=null!=t?t.gradFunc:r)&&(a.gradient=e=>(e=e.map((e,t)=>{var r;return null==e?(t=n[t],r=l.F(t.size,t.dtype),this.makeTensor(r,t.shape,t.dtype)):e}),r(1<e.length?e:e[0],i,o))),this.state.activeTape.push(a)}keep(e){return e.kept=!0,e}startTape(){0===this.state.gradientDepth&&(this.state.activeTape=[]),this.state.gradientDepth++}endTape(){this.state.gradientDepth--}startScope(e){const t={track:[],name:"unnamed scope",id:this.state.nextScopeId++};e&&(t.name=e),this.state.scopeStack.push(t),this.state.activeScope=t}endScope(e){const t=Object(p.getTensorsInContainer)(e),n=new Set(t.map(e=>e.id));for(let e=0;e<this.state.activeScope.track.length;e++){const t=this.state.activeScope.track[e];t.kept||n.has(t.id)||t.dispose()}const r=this.state.scopeStack.pop();this.state.activeScope=0===this.state.scopeStack.length?null:this.state.scopeStack[this.state.scopeStack.length-1],t.forEach(e=>{e.kept||e.scopeId!==r.id||this.track(e)})}gradients(e,t,n,r=!1){if(l.b(0<t.length,()=>"gradients() received an empty list of xs."),null!=n&&"float32"!==n.dtype)throw new Error(`dy must have 'float32' dtype, but has '${n.dtype}'`);const i=this.scopedRun(()=>this.startTape(),()=>this.endTape(),()=>this.tidy("forward",e)),o=(l.b(i instanceof d.a,()=>"The result y returned by f() must be a tensor."),function(e,t,n){const r={},i={};for(let e=0;e<t.length;e++)r[t[e].id]=!0;for(let n=0;n<e.length;n++){const s=e[n];var o=s.inputs;for(const e in o){var a=o[e];let n=!1;for(let e=0;e<t.length;e++)if(r[a.id]){s.outputs.forEach(e=>r[e.id]=!0),n=!0,i[s.id]=!0;break}if(n)break}}const s={},u=(s[n.id]=!0,{});for(let t=e.length-1;0<=t;t--){var c=e[t],l=c.inputs;for(let e=0;e<c.outputs.length;e++)if(s[c.outputs[e].id]){for(const e in l)s[l[e].id]=!0,u[c.id]=!0;break}}const h=[];for(let t=0;t<e.length;t++){var f=e[t];if(i[f.id]&&u[f.id]){const e={};for(const t in f.inputs){var d=f.inputs[t];r[d.id]&&(e[t]=d)}const t=Object.assign({},f);t.inputs=e,t.outputs=f.outputs,h.push(t)}}return h}(this.state.activeTape,t,i));if(!r&&0===o.length&&0<t.length)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",()=>{const e={};e[i.id]=null==n?(r=i.shape,d=Object(l.D)(Object(l.O)(r),"float32"),b.makeTensor(d,r,"float32")):n;var r,a=e,s=o,u=e=>this.tidy(e),c=y;for(let e=s.length-1;0<=e;e--){const t=s[e],n=[];if(t.outputs.forEach(e=>{null!=(e=a[e.id])?n.push(e):n.push(null)}),null==t.gradient)throw new Error(`Cannot compute gradient: gradient function not found for ${t.kernelName}.`);const r=t.gradient(n);for(const e in t.inputs){if(!(e in r))throw new Error(`Cannot backprop through input ${e}. Available gradients found: ${Object.keys(r)}.`);var h=u(()=>r[e]());if("float32"!==h.dtype)throw new Error(`Error in gradient for op ${t.kernelName}. The gradient of input ${e} must have 'float32' dtype, but has '${h.dtype}'`);var f=t.inputs[e];if(!l.a(h.shape,f.shape))throw new Error(`Error in gradient for op ${t.kernelName}. The gradient of input '${e}' has shape '${h.shape}', which does not match the shape of the input '${f.shape}'`);if(null==a[f.id])a[f.id]=h;else{const e=a[f.id];a[f.id]=c(e,h),e.dispose()}}}var d=t.map(t=>e[t.id]);return 0===this.state.gradientDepth&&(this.state.activeTape.forEach(e=>{for(const t of e.saved)t.dispose()}),this.state.activeTape=null),{value:i,grads:d}})}customGrad(e){return l.b(l.u(e),()=>"The f passed in customGrad(f) must be a function."),(...t)=>{let n;l.b(t.every(e=>e instanceof d.a),()=>"The args passed in customGrad(f)(x1, x2,...) must all be tensors");const r={};return t.forEach((e,t)=>{r[t]=e}),this.runKernelFunc({forwardFunc:(r,i)=>(n=e(...t,i),l.b(n.value instanceof d.a,()=>"The function f passed in customGrad(f) must return an object where `obj.value` is a tensor"),l.b(l.u(n.gradFunc),()=>"The function f passed in customGrad(f) must return an object where `obj.gradFunc` is a function."),n.value),backwardsFunc:(e,r)=>{e=n.gradFunc(e,r);const i=Array.isArray(e)?e:[e],o=(l.b(i.length===t.length,()=>"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(...)."),l.b(i.every(e=>e instanceof d.a),()=>"The function f passed in customGrad(f) must return an object where `obj.gradFunc` is a function that returns a list of only tensors."),{});return i.forEach((e,t)=>{o[t]=()=>e}),o},inputs:r})}}readSync(e){return this.state.tensorInfo.get(e).backend.readSync(e)}read(e){return this.state.tensorInfo.get(e).backend.read(e)}readToGPU(e,t){return this.state.tensorInfo.get(e).backend.readToGPU(e,t)}async time(e){var t=Object(c.now)();const n=await this.backend.time(e);return n.wallMs=Object(c.now)()-t,n}track(e){return null!=this.state.activeScope&&(e.scopeId=this.state.activeScope.id,this.state.activeScope.track.push(e)),e}get registeredVariables(){return this.state.registeredVariables}reset(){this.pendingBackendInitId++,this.state.dispose(),this.ENV.reset(),this.state=new g;for(const e in this.registry)this.disposeRegisteredKernels(e),this.registry[e].dispose(),delete this.registry[e];this.backendName=null,this.backendInstance=null,this.pendingBackendInit=null}}function v(){const e=Object(o.b)();var t;return null==e._tfengine&&(t=new i.b(e),e._tfengine=new A(t)),Object(i.d)(e._tfengine.ENV),Object(d.g)(()=>e._tfengine),e._tfengine}A.nextTensorId=0,A.nextVariableId=0;const b=v();function y(e,t){return e={a:e,b:t},b.runKernel(a.d,e)}},function(e,t,n){"use strict";var r=n(124),i=n(10);
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function o(e,t,n){let r;return r=Array.isArray(e)?parseFloat(e[0].toFixed(7))+" + "+parseFloat(e[1].toFixed(7))+"j":Object(i.z)(e)?`'${e}'`:"bool"===n?a(e):parseFloat(e.toFixed(7)).toString(),Object(i.L)(r,t)}function a(e){return 0===e?"false":"true"}function s(e){const t=[];for(let n=0;n<e.length;n+=2)t.push([e[n],e[n+1]]);return t}var u=n(12);n.d(t,"b",(function(){return c})),n.d(t,"g",(function(){return d})),n.d(t,"f",(function(){return p})),n.d(t,"e",(function(){return m})),n.d(t,"a",(function(){return g})),n.d(t,"d",(function(){return A})),n.d(t,"c",(function(){return v}));
/**
 * @license
 * Copyright 2017 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
class c{constructor(e,t,n){if(this.dtype=t,this.shape=e.slice(),this.size=i.O(e),null!=n){const e=n.length;i.b(e===this.size,()=>`Length of values '${e}' does not match the size inferred by the shape '${this.size}'.`)}if("complex64"===t)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=n||i.n(t,this.size),this.strides=Object(i.j)(e)}set(e,...t){0===t.length&&(t=[0]),i.b(t.length===this.rank,()=>`The number of provided coordinates (${t.length}) must match the rank (${this.rank})`);var n=this.locToIndex(t);this.values[n]=e}get(...e){let t=0;for(const r of e=0===e.length?[0]:e){var n;if(r<0||r>=this.shape[t])throw n=`Requested out of range element at ${e}.   Buffer shape=`+this.shape,new Error(n);t++}let r=e[e.length-1];for(let t=0;t<e.length-1;++t)r+=this.strides[t]*e[t];return this.values[r]}locToIndex(e){if(0===this.rank)return 0;if(1===this.rank)return e[0];let t=e[e.length-1];for(let n=0;n<e.length-1;++n)t+=this.strides[n]*e[n];return t}indexToLoc(e){if(0===this.rank)return[];if(1===this.rank)return[e];const t=new Array(this.shape.length);for(let n=0;n<t.length-1;++n)t[n]=Math.floor(e/this.strides[n]),e-=t[n]*this.strides[n];return t[t.length-1]=e,t}get rank(){return this.shape.length}toTensor(){return l().makeTensor(this.values,this.shape,this.dtype)}}let l=null,h=null,f=null;function d(e){l=e}function p(e){h=e}function m(e){f=e}class g{constructor(e,t,n,r){this.kept=!1,this.isDisposedInternal=!1,this.shape=e.slice(),this.dtype=t||"float32",this.size=i.O(e),this.strides=Object(i.j)(e),this.dataId=n,this.id=r,this.rankType=this.rank<5?this.rank.toString():"higher"}get rank(){return this.shape.length}async buffer(){var e=await this.data();return h.buffer(this.shape,this.dtype,e)}bufferSync(){return h.buffer(this.shape,this.dtype,this.dataSync())}async array(){var e=await this.data();return Object(i.U)(this.shape,e,"complex64"===this.dtype)}arraySync(){return Object(i.U)(this.shape,this.dataSync(),"complex64"===this.dtype)}async data(){this.throwIfDisposed();var e=l().read(this.dataId);if("string"===this.dtype){const t=await e;try{return t.map(e=>u.decodeString(e))}catch(e){throw new Error("Failed to decode the string bytes into utf-8. To get the original bytes, call tensor.bytes().")}}return e}dataToGPU(e){return this.throwIfDisposed(),l().readToGPU(this.dataId,e)}dataSync(){this.throwIfDisposed();const e=l().readSync(this.dataId);if("string"===this.dtype)try{return e.map(e=>u.decodeString(e))}catch(e){throw new Error("Failed to decode the string bytes into utf-8. To get the original bytes, call tensor.bytes().")}return e}async bytes(){this.throwIfDisposed();var e=await l().read(this.dataId);return"string"===this.dtype?e:new Uint8Array(e.buffer)}dispose(){this.isDisposed||(l().disposeTensor(this),this.isDisposedInternal=!0)}get isDisposed(){return this.isDisposedInternal}throwIfDisposed(){if(this.isDisposed)throw new Error("Tensor is disposed.")}print(e=!1){return h.print(this,e)}clone(){return this.throwIfDisposed(),h.clone(this)}toString(e=!1){return function(e,t,n,r){var u=Object(i.j)(t),c=function(e,t,n,r){const a=Object(i.O)(t),u=r[r.length-1],c=new Array(u).fill(0),l=t.length,h="complex64"===n?s(e):e;if(1<l)for(let e=0;e<a/u;e++){var f=e*u;for(let e=0;e<u;e++)c[e]=Math.max(c[e],o(h[f+e],0,n).length)}return c}(e,t,n,u),l=t.length;const h=function e(t,n,r,i,u,c=!0){const l="complex64"===r?2:1,h=n[0],f=n.length;if(0===f){if("complex64"!==r)return"bool"===r?[a(t[0])]:[t[0].toString()];return[o(s(t)[0],0,r)]}if(1===f){if(h>20){const e=3*l;let n=Array.from(t.slice(0,e)),i=Array.from(t.slice((h-3)*l,h*l));return"complex64"===r&&(n=s(n),i=s(i)),["["+n.map((e,t)=>o(e,u[t],r)).join(", ")+", ..., "+i.map((e,t)=>o(e,u[h-3+t],r)).join(", ")+"]"]}return["["+("complex64"===r?s(t):Array.from(t)).map((e,t)=>o(e,u[t],r)).join(", ")+"]"]}const d=n.slice(1),p=i.slice(1),m=i[0]*l,g=[];if(h>20){for(let n=0;n<3;n++){const i=n*m,o=i+m;g.push(...e(t.slice(i,o),d,r,p,u,!1))}g.push("...");for(let n=h-3;n<h;n++){const i=n*m,o=i+m;g.push(...e(t.slice(i,o),d,r,p,u,n===h-1))}}else for(let n=0;n<h;n++){const i=n*m,o=i+m;g.push(...e(t.slice(i,o),d,r,p,u,n===h-1))}const A=2===f?",":"";g[0]="["+g[0]+A;for(let e=1;e<g.length-1;e++)g[e]=" "+g[e]+A;let v=",\n";for(let e=2;e<f;e++)v+="\n";return g[g.length-1]=" "+g[g.length-1]+"]"+(c?"":v),g}(e,t,n,u,c),f=["Tensor"];return r&&(f.push("  dtype: "+n),f.push("  rank: "+l),f.push(`  shape: [${t}]`),f.push("  values:")),f.push(h.map(e=>"    "+e).join("\n")),f.join("\n")}(this.dataSync(),this.shape,this.dtype,e)}cast(e){return this.throwIfDisposed(),h.cast(this,e)}variable(e=!0,t,n){return this.throwIfDisposed(),l().makeVariable(this,e,t,n)}}function A(){return Object(r.a)("Tensor",()=>g)}Object.defineProperty(g,Symbol.hasInstance,{value:e=>!!e&&null!=e.data&&null!=e.dataSync&&null!=e.throwIfDisposed}),A();class v extends g{constructor(e,t,n,r){super(e.shape,e.dtype,e.dataId,r),this.trainable=t,this.name=n}assign(e){if(e.dtype!==this.dtype)throw new Error(`dtype of the new value (${e.dtype}) and previous value (${this.dtype}) must match`);if(!i.a(e.shape,this.shape))throw new Error(`shape of the new value (${e.shape}) and previous value (${this.shape}) must match`);l().disposeTensor(this),this.dataId=e.dataId,l().incRef(this,null)}dispose(){l().disposeVariable(this),this.isDisposedInternal=!0}}Object.defineProperty(v,Symbol.hasInstance,{value:e=>e instanceof g&&null!=e.assign&&e.assign instanceof Function})},function(e,t,n){var r;
/*!
 * jQuery JavaScript Library v3.6.3
 * https://jquery.com/
 *
 * Includes Sizzle.js
 * https://sizzlejs.com/
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license
 * https://jquery.org/license
 *
 * Date: 2022-12-20T21:28Z
 */!function(t,n){"use strict";"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(e.document)return n(e);throw new Error("jQuery requires a window with a document")}:n(t)}("undefined"!=typeof window?window:this,(function(n,i){"use strict";function o(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item}function a(e){return null!=e&&e===e.window}var s=[],u=Object.getPrototypeOf,c=s.slice,l=s.flat?function(e){return s.flat.call(e)}:function(e){return s.concat.apply([],e)},h=s.push,f=s.indexOf,d={},p=d.toString,m=d.hasOwnProperty,g=m.toString,A=g.call(Object),v={},b=n.document,y={type:!0,src:!0,nonce:!0,noModule:!0};function w(e,t,n){var r,i,o=(n=n||b).createElement("script");if(o.text=e,t)for(r in y)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?d[p.call(e)]||"object":typeof e}var C=function(e,t){return new C.fn.init(e,t)};function k(e){var t=!!e&&"length"in e&&e.length,n=x(e);return!o(e)&&!a(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}function E(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&C(e).is(n))break;r.push(e)}return r}function S(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}C.fn=C.prototype={jquery:"3.6.3",constructor:C,length:0,toArray:function(){return c.call(this)},get:function(e){return null==e?c.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){return(e=C.merge(this.constructor(),e)).prevObject=this,e},each:function(e){return C.each(this,e)},map:function(e){return this.pushStack(C.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(c.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(C.grep(this,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(C.grep(this,(function(e,t){return t%2})))},eq:function(e){var t=this.length;e=+e+(e<0?t:0);return this.pushStack(0<=e&&e<t?[this[e]]:[])},end:function(){return this.prevObject||this.constructor()},push:h,sort:s.sort,splice:s.splice},C.extend=C.fn.extend=function(){var e,t,n,r,i,a=arguments[0]||{},s=1,u=arguments.length,c=!1;for("boolean"==typeof a&&(c=a,a=arguments[s]||{},s++),"object"==typeof a||o(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)n=e[t],"__proto__"!==t&&a!==n&&(c&&n&&(C.isPlainObject(n)||(r=Array.isArray(n)))?(i=a[t],i=r&&!Array.isArray(i)?[]:r||C.isPlainObject(i)?i:{},r=!1,a[t]=C.extend(c,i,n)):void 0!==n&&(a[t]=n));return a},C.extend({expando:"jQuery"+("3.6.3"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){return!(!e||"[object Object]"!==p.call(e)||(e=u(e))&&("function"!=typeof(e=m.call(e,"constructor")&&e.constructor)||g.call(e)!==A))},isEmptyObject:function(e){for(var t in e)return!1;return!0},globalEval:function(e,t,n){w(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(k(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},makeArray:function(e,t){return t=t||[],null!=e&&(k(Object(e))?C.merge(t,"string"==typeof e?[e]:e):h.call(t,e)),t},inArray:function(e,t,n){return null==t?-1:f.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!=a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(k(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return l(a)},guid:1,support:v}),"function"==typeof Symbol&&(C.fn[Symbol.iterator]=s[Symbol.iterator]),C.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(e,t){d["[object "+t+"]"]=t.toLowerCase()}));var _=
/*!
 * Sizzle CSS Selector Engine v2.3.9
 * https://sizzlejs.com/
 *
 * Copyright JS Foundation and other contributors
 * Released under the MIT license
 * https://js.foundation/
 *
 * Date: 2022-12-19
 */
function(e){function t(e,t){return e="0x"+e.slice(1)-65536,t||(e<0?String.fromCharCode(65536+e):String.fromCharCode(e>>10|55296,1023&e|56320))}function n(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e}function r(){m()}var i,o,a,s,u,c,l,h,f,d,p,m,g,A,v,b,y,w,x,C="sizzle"+ +new Date,k=e.document,E=0,S=0,_=ue(),O=ue(),T=ue(),D=ue(),B=function(e,t){return e===t&&(p=!0),0},I={}.hasOwnProperty,M=[],j=M.pop,N=M.push,F=M.push,R=M.slice,P=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",U="[\\x20\\t\\r\\n\\f]",z="(?:\\\\[\\da-fA-F]{1,6}"+U+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",H="\\["+U+"*("+z+")(?:"+U+"*([*^$|!~]?=)"+U+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+z+"))|)"+U+"*\\]",$=":("+z+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+H+")*)|.*)\\)|)",Q=new RegExp(U+"+","g"),V=new RegExp("^"+U+"+|((?:^|[^\\\\])(?:\\\\.)*)"+U+"+$","g"),q=new RegExp("^"+U+"*,"+U+"*"),G=new RegExp("^"+U+"*([>+~]|"+U+")"+U+"*"),W=new RegExp(U+"|>"),K=new RegExp($),Y=new RegExp("^"+z+"$"),X={ID:new RegExp("^#("+z+")"),CLASS:new RegExp("^\\.("+z+")"),TAG:new RegExp("^("+z+"|[*])"),ATTR:new RegExp("^"+H),PSEUDO:new RegExp("^"+$),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+U+"*(even|odd|(([+-]|)(\\d*)n|)"+U+"*(?:([+-]|)"+U+"*(\\d+)|))"+U+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+U+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+U+"*((?:-\\d)?\\d*)"+U+"*\\)|)(?=[^-]|$)","i")},J=/HTML$/i,Z=/^(?:input|select|textarea|button)$/i,ee=/^h\d$/i,te=/^[^{]+\{\s*\[native \w/,ne=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,re=/[+~]/,ie=new RegExp("\\\\[\\da-fA-F]{1,6}"+U+"?|\\\\([^\\r\\n\\f])","g"),oe=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ae=ve((function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{F.apply(M=R.call(k.childNodes),k.childNodes),M[k.childNodes.length].nodeType}catch(i){F={apply:M.length?function(e,t){N.apply(e,R.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function se(e,t,r,i){var a,s,u,l,f,d,p=t&&t.ownerDocument,A=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==A&&9!==A&&11!==A)return r;if(!i&&(m(t),t=t||g,v)){if(11!==A&&(l=ne.exec(e)))if(a=l[1]){if(9===A){if(!(d=t.getElementById(a)))return r;if(d.id===a)return r.push(d),r}else if(p&&(d=p.getElementById(a))&&x(t,d)&&d.id===a)return r.push(d),r}else{if(l[2])return F.apply(r,t.getElementsByTagName(e)),r;if((a=l[3])&&o.getElementsByClassName&&t.getElementsByClassName)return F.apply(r,t.getElementsByClassName(a)),r}if(o.qsa&&!D[e+" "]&&(!b||!b.test(e))&&(1!==A||"object"!==t.nodeName.toLowerCase())){if(d=e,p=t,1===A&&(W.test(e)||G.test(e))){for((p=re.test(e)&&me(t.parentNode)||t)===t&&o.scope||((u=t.getAttribute("id"))?u=u.replace(oe,n):t.setAttribute("id",u=C)),s=(f=c(e)).length;s--;)f[s]=(u?"#"+u:":scope")+" "+Ae(f[s]);d=f.join(",")}try{if(o.cssSupportsSelector&&!CSS.supports("selector(:is("+d+"))"))throw new Error;return F.apply(r,p.querySelectorAll(d)),r}catch(t){D(e,!0)}finally{u===C&&t.removeAttribute("id")}}}return h(e.replace(V,"$1"),t,r,i)}function ue(){var e=[];return function t(n,r){return e.push(n+" ")>a.cacheLength&&delete t[e.shift()],t[n+" "]=r}}function ce(e){return e[C]=!0,e}function le(e){var t=g.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t)}}function he(e,t){for(var n=e.split("|"),r=n.length;r--;)a.attrHandle[n[r]]=t}function fe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function de(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ae(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function pe(e){return ce((function(t){return t=+t,ce((function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))}))}))}function me(e){return e&&void 0!==e.getElementsByTagName&&e}for(i in o=se.support={},u=se.isXML=function(e){var t=e&&e.namespaceURI;e=e&&(e.ownerDocument||e).documentElement;return!J.test(t||e&&e.nodeName||"HTML")},m=se.setDocument=function(e){return(e=e?e.ownerDocument||e:k)!=g&&9===e.nodeType&&e.documentElement&&(A=(g=e).documentElement,v=!u(g),k!=g&&(e=g.defaultView)&&e.top!==e&&(e.addEventListener?e.addEventListener("unload",r,!1):e.attachEvent&&e.attachEvent("onunload",r)),o.scope=le((function(e){return A.appendChild(e).appendChild(g.createElement("div")),void 0!==e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length})),o.cssSupportsSelector=le((function(){return CSS.supports("selector(*)")&&g.querySelectorAll(":is(:jqfake)")&&!CSS.supports("selector(:is(*,:jqfake))")})),o.attributes=le((function(e){return e.className="i",!e.getAttribute("className")})),o.getElementsByTagName=le((function(e){return e.appendChild(g.createComment("")),!e.getElementsByTagName("*").length})),o.getElementsByClassName=te.test(g.getElementsByClassName),o.getById=le((function(e){return A.appendChild(e).id=C,!g.getElementsByName||!g.getElementsByName(C).length})),o.getById?(a.filter.ID=function(e){var n=e.replace(ie,t);return function(e){return e.getAttribute("id")===n}},a.find.ID=function(e,t){if(void 0!==t.getElementById&&v)return(t=t.getElementById(e))?[t]:[]}):(a.filter.ID=function(e){var n=e.replace(ie,t);return function(e){return(e=void 0!==e.getAttributeNode&&e.getAttributeNode("id"))&&e.value===n}},a.find.ID=function(e,t){if(void 0!==t.getElementById&&v){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),a.find.TAG=o.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):o.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"!==e)return o;for(;n=o[i++];)1===n.nodeType&&r.push(n);return r},a.find.CLASS=o.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&v)return t.getElementsByClassName(e)},y=[],b=[],(o.qsa=te.test(g.querySelectorAll))&&(le((function(e){var t;A.appendChild(e).innerHTML="<a id='"+C+"'></a><select id='"+C+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&b.push("[*^$]="+U+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||b.push("\\["+U+"*(?:value|"+L+")"),e.querySelectorAll("[id~="+C+"-]").length||b.push("~="),(t=g.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||b.push("\\["+U+"*name"+U+"*="+U+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||b.push(":checked"),e.querySelectorAll("a#"+C+"+*").length||b.push(".#.+[+~]"),e.querySelectorAll("\\\f"),b.push("[\\r\\n\\f]")})),le((function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=g.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&b.push("name"+U+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&b.push(":enabled",":disabled"),A.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&b.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),b.push(",.*:")}))),(o.matchesSelector=te.test(w=A.matches||A.webkitMatchesSelector||A.mozMatchesSelector||A.oMatchesSelector||A.msMatchesSelector))&&le((function(e){o.disconnectedMatch=w.call(e,"*"),w.call(e,"[s!='']:x"),y.push("!=",$)})),o.cssSupportsSelector||b.push(":has"),b=b.length&&new RegExp(b.join("|")),y=y.length&&new RegExp(y.join("|")),e=te.test(A.compareDocumentPosition),x=e||te.test(A.contains)?function(e,t){var n=9===e.nodeType&&e.documentElement||e;return e===(t=t&&t.parentNode)||!(!t||1!==t.nodeType||!(n.contains?n.contains(t):e.compareDocumentPosition&&16&e.compareDocumentPosition(t)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},B=e?function(e,t){var n;return e===t?(p=!0,0):(n=!e.compareDocumentPosition-!t.compareDocumentPosition)||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!o.sortDetached&&t.compareDocumentPosition(e)===n?e==g||e.ownerDocument==k&&x(k,e)?-1:t==g||t.ownerDocument==k&&x(k,t)?1:d?P(d,e)-P(d,t):0:4&n?-1:1)}:function(e,t){if(e===t)return p=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==g?-1:t==g?1:i?-1:o?1:d?P(d,e)-P(d,t):0;if(i===o)return fe(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;a[r]===s[r];)r++;return r?fe(a[r],s[r]):a[r]==k?-1:s[r]==k?1:0}),g},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(m(e),o.matchesSelector&&v&&!D[t+" "]&&(!y||!y.test(t))&&(!b||!b.test(t)))try{var n=w.call(e,t);if(n||o.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){D(t,!0)}return 0<se(t,g,null,[e]).length},se.contains=function(e,t){return(e.ownerDocument||e)!=g&&m(e),x(e,t)},se.attr=function(e,t){var n;return(e.ownerDocument||e)!=g&&m(e),void 0!==(n=(n=a.attrHandle[t.toLowerCase()])&&I.call(a.attrHandle,t.toLowerCase())?n(e,t,!v):void 0)?n:o.attributes||!v?e.getAttribute(t):(n=e.getAttributeNode(t))&&n.specified?n.value:null},se.escape=function(e){return(e+"").replace(oe,n)},se.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},se.uniqueSort=function(e){var t,n=[],r=0,i=0;if(p=!o.detectDuplicates,d=!o.sortStable&&e.slice(0),e.sort(B),p){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return d=null,e},s=se.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=s(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=s(t);return n},(a=se.selectors={cacheLength:50,createPseudo:ce,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(ie,t),e[3]=(e[3]||e[4]||e[5]||"").replace(ie,t),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return X.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&K.test(n)&&(t=c(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var n=e.replace(ie,t).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===n}},CLASS:function(e){var t=_[e+" "];return t||(t=new RegExp("(^|"+U+")"+e+"("+U+"|$)"))&&_(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(r){return null==(r=se.attr(r,e))?"!="===t:!t||(r+="","="===t?r===n:"!="===t?r!==n:"^="===t?n&&0===r.indexOf(n):"*="===t?n&&-1<r.indexOf(n):"$="===t?n&&r.slice(-n.length)===n:"~="===t?-1<(" "+r.replace(Q," ")+" ").indexOf(n):"|="===t&&(r===n||r.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var c,l,h,f,d,p,m=o!=a?"nextSibling":"previousSibling",g=t.parentNode,A=s&&t.nodeName.toLowerCase(),v=!u&&!s,b=!1;if(g){if(o){for(;m;){for(f=t;f=f[m];)if(s?f.nodeName.toLowerCase()===A:1===f.nodeType)return!1;p=m="only"===e&&!p&&"nextSibling"}return!0}if(p=[a?g.firstChild:g.lastChild],a&&v){for(b=(d=(c=(l=(h=(f=g)[C]||(f[C]={}))[f.uniqueID]||(h[f.uniqueID]={}))[e]||[])[0]===E&&c[1])&&c[2],f=d&&g.childNodes[d];f=++d&&f&&f[m]||(b=d=0)||p.pop();)if(1===f.nodeType&&++b&&f===t){l[e]=[E,d,b];break}}else if(!1===(b=v?d=(c=(l=(h=(f=t)[C]||(f[C]={}))[f.uniqueID]||(h[f.uniqueID]={}))[e]||[])[0]===E&&c[1]:b))for(;(f=++d&&f&&f[m]||(b=d=0)||p.pop())&&((s?f.nodeName.toLowerCase()!==A:1!==f.nodeType)||!++b||(v&&((l=(h=f[C]||(f[C]={}))[f.uniqueID]||(h[f.uniqueID]={}))[e]=[E,b]),f!==t)););return(b-=i)===r||b%r==0&&0<=b/r}}},PSEUDO:function(e,t){var n,r=a.pseudos[e]||a.setFilters[e.toLowerCase()]||se.error("unsupported pseudo: "+e);return r[C]?r(t):1<r.length?(n=[e,e,"",t],a.setFilters.hasOwnProperty(e.toLowerCase())?ce((function(e,n){for(var i,o=r(e,t),a=o.length;a--;)e[i=P(e,o[a])]=!(n[i]=o[a])})):function(e){return r(e,0,n)}):r}},pseudos:{not:ce((function(e){var t=[],n=[],r=l(e.replace(V,"$1"));return r[C]?ce((function(e,t,n,i){for(var o,a=r(e,null,i,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))})):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}})),has:ce((function(e){return function(t){return 0<se(e,t).length}})),contains:ce((function(e){return e=e.replace(ie,t),function(t){return-1<(t.textContent||s(t)).indexOf(e)}})),lang:ce((function(e){return Y.test(e||"")||se.error("unsupported lang: "+e),e=e.replace(ie,t).toLowerCase(),function(t){var n;do{if(n=v?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===A},focus:function(e){return e===g.activeElement&&(!g.hasFocus||g.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:de(!1),disabled:de(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!a.pseudos.empty(e)},header:function(e){return ee.test(e.nodeName)},input:function(e){return Z.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(e=e.getAttribute("type"))||"text"===e.toLowerCase())},first:pe((function(){return[0]})),last:pe((function(e,t){return[t-1]})),eq:pe((function(e,t,n){return[n<0?n+t:n]})),even:pe((function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e})),odd:pe((function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e})),lt:pe((function(e,t,n){for(var r=n<0?n+t:t<n?t:n;0<=--r;)e.push(r);return e})),gt:pe((function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e}))}}).pseudos.nth=a.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})a.pseudos[i]=function(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}(i);for(i in{submit:!0,reset:!0})a.pseudos[i]=function(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}(i);function ge(){}function Ae(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function ve(e,t,n){var r=t.dir,i=t.next,o=i||r,a=n&&"parentNode"===o,s=S++;return t.first?function(t,n,i){for(;t=t[r];)if(1===t.nodeType||a)return e(t,n,i);return!1}:function(t,n,u){var c,l,h=[E,s];if(u){for(;t=t[r];)if((1===t.nodeType||a)&&e(t,n,u))return!0}else for(;t=t[r];)if(1===t.nodeType||a)if(l=(l=t[C]||(t[C]={}))[t.uniqueID]||(l[t.uniqueID]={}),i&&i===t.nodeName.toLowerCase())t=t[r]||t;else{if((c=l[o])&&c[0]===E&&c[1]===s)return h[2]=c[2];if((l[o]=h)[2]=e(t,n,u))return!0}return!1}}function be(e){return 1<e.length?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function ye(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,c=null!=t;s<u;s++)!(o=e[s])||n&&!n(o,r,i)||(a.push(o),c&&t.push(s));return a}function we(e,t,n,r,i,o){return r&&!r[C]&&(r=we(r)),i&&!i[C]&&(i=we(i,o)),ce((function(o,a,s,u){var c,l,h,f=[],d=[],p=a.length,m=o||function(e,t,n){for(var r=0,i=t.length;r<i;r++)se(e,t[r],n);return n}(t||"*",s.nodeType?[s]:s,[]),g=!e||!o&&t?m:ye(m,f,e,s,u),A=n?i||(o?e:p||r)?[]:a:g;if(n&&n(g,A,s,u),r)for(c=ye(A,d),r(c,[],s,u),l=c.length;l--;)(h=c[l])&&(A[d[l]]=!(g[d[l]]=h));if(o){if(i||e){if(i){for(c=[],l=A.length;l--;)(h=A[l])&&c.push(g[l]=h);i(null,A=[],c,u)}for(l=A.length;l--;)(h=A[l])&&-1<(c=i?P(o,h):f[l])&&(o[c]=!(a[c]=h))}}else A=ye(A===a?A.splice(p,A.length):A),i?i(null,a,A,u):F.apply(a,A)}))}return ge.prototype=a.filters=a.pseudos,a.setFilters=new ge,c=se.tokenize=function(e,t){var n,r,i,o,s,u,c,l=O[e+" "];if(l)return t?0:l.slice(0);for(s=e,u=[],c=a.preFilter;s;){for(o in n&&!(r=q.exec(s))||(r&&(s=s.slice(r[0].length)||s),u.push(i=[])),n=!1,(r=G.exec(s))&&(n=r.shift(),i.push({value:n,type:r[0].replace(V," ")}),s=s.slice(n.length)),a.filter)!(r=X[o].exec(s))||c[o]&&!(r=c[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?se.error(e):O(e,u).slice(0)},l=se.compile=function(e,t){var n,r=[],i=[],o=T[e+" "];if(!o){for(n=(t=t||c(e)).length;n--;)((o=function e(t){for(var n,r,i,o=t.length,s=a.relative[t[0].type],u=s||a.relative[" "],c=s?1:0,l=ve((function(e){return e===n}),u,!0),h=ve((function(e){return-1<P(n,e)}),u,!0),d=[function(e,t,r){return e=!s&&(r||t!==f)||((n=t).nodeType?l:h)(e,t,r),n=null,e}];c<o;c++)if(r=a.relative[t[c].type])d=[ve(be(d),r)];else{if((r=a.filter[t[c].type].apply(null,t[c].matches))[C]){for(i=++c;i<o&&!a.relative[t[i].type];i++);return we(1<c&&be(d),1<c&&Ae(t.slice(0,c-1).concat({value:" "===t[c-2].type?"*":""})).replace(V,"$1"),r,c<i&&e(t.slice(c,i)),i<o&&e(t=t.slice(i)),i<o&&Ae(t))}d.push(r)}return be(d)}(t[n]))[C]?r:i).push(o);(o=T(e,function(e,t){function n(n,o,s,u,c){var l,h,d,p=0,A="0",b=n&&[],y=[],w=f,x=n||i&&a.find.TAG("*",c),C=E+=null==w?1:Math.random()||.1,k=x.length;for(c&&(f=o==g||o||c);A!==k&&null!=(l=x[A]);A++){if(i&&l){for(h=0,o||l.ownerDocument==g||(m(l),s=!v);d=e[h++];)if(d(l,o||g,s)){u.push(l);break}c&&(E=C)}r&&((l=!d&&l)&&p--,n&&b.push(l))}if(p+=A,r&&A!==p){for(h=0;d=t[h++];)d(b,y,o,s);if(n){if(0<p)for(;A--;)b[A]||y[A]||(y[A]=j.call(u));y=ye(y)}F.apply(u,y),c&&!n&&0<y.length&&1<p+t.length&&se.uniqueSort(u)}return c&&(E=C,f=w),b}var r=0<t.length,i=0<e.length;return r?ce(n):n}(i,r))).selector=e}return o},h=se.select=function(e,n,r,i){var o,s,u,h,f,d="function"==typeof e&&e,p=!i&&c(e=d.selector||e);if(r=r||[],1===p.length){if(2<(s=p[0]=p[0].slice(0)).length&&"ID"===(u=s[0]).type&&9===n.nodeType&&v&&a.relative[s[1].type]){if(!(n=(a.find.ID(u.matches[0].replace(ie,t),n)||[])[0]))return r;d&&(n=n.parentNode),e=e.slice(s.shift().value.length)}for(o=X.needsContext.test(e)?0:s.length;o--&&(u=s[o],!a.relative[h=u.type]);)if((f=a.find[h])&&(i=f(u.matches[0].replace(ie,t),re.test(s[0].type)&&me(n.parentNode)||n))){if(s.splice(o,1),e=i.length&&Ae(s))break;return F.apply(r,i),r}}return(d||l(e,p))(i,n,!v,r,!n||re.test(e)&&me(n.parentNode)||n),r},o.sortStable=C.split("").sort(B).join("")===C,o.detectDuplicates=!!p,m(),o.sortDetached=le((function(e){return 1&e.compareDocumentPosition(g.createElement("fieldset"))})),le((function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")}))||he("type|href|height|width",(function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)})),o.attributes&&le((function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}))||he("value",(function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue})),le((function(e){return null==e.getAttribute("disabled")}))||he(L,(function(e,t,n){if(!n)return!0===e[t]?t.toLowerCase():(n=e.getAttributeNode(t))&&n.specified?n.value:null})),se}(n),O=(C.find=_,C.expr=_.selectors,C.expr[":"]=C.expr.pseudos,C.uniqueSort=C.unique=_.uniqueSort,C.text=_.getText,C.isXMLDoc=_.isXML,C.contains=_.contains,C.escapeSelector=_.escape,C.expr.match.needsContext);function T(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}var D=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function B(e,t,n){return o(t)?C.grep(e,(function(e,r){return!!t.call(e,r,e)!==n})):t.nodeType?C.grep(e,(function(e){return e===t!==n})):"string"!=typeof t?C.grep(e,(function(e){return-1<f.call(t,e)!==n})):C.filter(t,e,n)}C.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?C.find.matchesSelector(r,e)?[r]:[]:C.find.matches(e,C.grep(t,(function(e){return 1===e.nodeType})))},C.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(C(e).filter((function(){for(t=0;t<r;t++)if(C.contains(i[t],this))return!0})));for(n=this.pushStack([]),t=0;t<r;t++)C.find(e,i[t],n);return 1<r?C.uniqueSort(n):n},filter:function(e){return this.pushStack(B(this,e||[],!1))},not:function(e){return this.pushStack(B(this,e||[],!0))},is:function(e){return!!B(this,"string"==typeof e&&O.test(e)?C(e):e||[],!1).length}});var I,M=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,j=((C.fn.init=function(e,t,n){if(e){if(n=n||I,"string"!=typeof e)return e.nodeType?(this[0]=e,this.length=1,this):o(e)?void 0!==n.ready?n.ready(e):e(C):C.makeArray(e,this);if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:M.exec(e))||!r[1]&&t)return(!t||t.jquery?t||n:this.constructor(t)).find(e);if(r[1]){if(t=t instanceof C?t[0]:t,C.merge(this,C.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:b,!0)),D.test(r[1])&&C.isPlainObject(t))for(var r in t)o(this[r])?this[r](t[r]):this.attr(r,t[r])}else(n=b.getElementById(r[2]))&&(this[0]=n,this.length=1)}return this}).prototype=C.fn,I=C(b),/^(?:parents|prev(?:Until|All))/),N={children:!0,contents:!0,next:!0,prev:!0};function F(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}C.fn.extend({has:function(e){var t=C(e,this),n=t.length;return this.filter((function(){for(var e=0;e<n;e++)if(C.contains(this,t[e]))return!0}))},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&C(e);if(!O.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?-1<a.index(n):1===n.nodeType&&C.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?C.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?f.call(C(e),this[0]):f.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(C.uniqueSort(C.merge(this.get(),C(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),C.each({parent:function(e){return(e=e.parentNode)&&11!==e.nodeType?e:null},parents:function(e){return E(e,"parentNode")},parentsUntil:function(e,t,n){return E(e,"parentNode",n)},next:function(e){return F(e,"nextSibling")},prev:function(e){return F(e,"previousSibling")},nextAll:function(e){return E(e,"nextSibling")},prevAll:function(e){return E(e,"previousSibling")},nextUntil:function(e,t,n){return E(e,"nextSibling",n)},prevUntil:function(e,t,n){return E(e,"previousSibling",n)},siblings:function(e){return S((e.parentNode||{}).firstChild,e)},children:function(e){return S(e.firstChild)},contents:function(e){return null!=e.contentDocument&&u(e.contentDocument)?e.contentDocument:(T(e,"template")&&(e=e.content||e),C.merge([],e.childNodes))}},(function(e,t){C.fn[e]=function(n,r){var i=C.map(this,t,n);return(r="Until"!==e.slice(-5)?n:r)&&"string"==typeof r&&(i=C.filter(r,i)),1<this.length&&(N[e]||C.uniqueSort(i),j.test(e)&&i.reverse()),this.pushStack(i)}}));var R=/[^\x20\t\r\n\f]+/g;function P(e){return e}function L(e){throw e}function U(e,t,n,r){var i;try{e&&o(i=e.promise)?i.call(e).done(t).fail(n):e&&o(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}C.Callbacks=function(e){var t,n;function r(){for(u=u||e.once,s=i=!0;l.length;h=-1)for(a=l.shift();++h<c.length;)!1===c[h].apply(a[0],a[1])&&e.stopOnFalse&&(h=c.length,a=!1);e.memory||(a=!1),i=!1,u&&(c=a?[]:"")}e="string"==typeof e?(t=e,n={},C.each(t.match(R)||[],(function(e,t){n[t]=!0})),n):C.extend({},e);var i,a,s,u,c=[],l=[],h=-1,f={add:function(){return c&&(a&&!i&&(h=c.length-1,l.push(a)),function t(n){C.each(n,(function(n,r){o(r)?e.unique&&f.has(r)||c.push(r):r&&r.length&&"string"!==x(r)&&t(r)}))}(arguments),a&&!i&&r()),this},remove:function(){return C.each(arguments,(function(e,t){for(var n;-1<(n=C.inArray(t,c,n));)c.splice(n,1),n<=h&&h--})),this},has:function(e){return e?-1<C.inArray(e,c):0<c.length},empty:function(){return c=c&&[],this},disable:function(){return u=l=[],c=a="",this},disabled:function(){return!c},lock:function(){return u=l=[],a||i||(c=a=""),this},locked:function(){return!!u},fireWith:function(e,t){return u||(t=[e,(t=t||[]).slice?t.slice():t],l.push(t),i||r()),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!s}};return f},C.extend({Deferred:function(e){var t=[["notify","progress",C.Callbacks("memory"),C.Callbacks("memory"),2],["resolve","done",C.Callbacks("once memory"),C.Callbacks("once memory"),0,"resolved"],["reject","fail",C.Callbacks("once memory"),C.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return a.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return C.Deferred((function(n){C.each(t,(function(t,r){var i=o(e[r[4]])&&e[r[4]];a[r[1]]((function(){var e=i&&i.apply(this,arguments);e&&o(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[e]:arguments)}))})),e=null})).promise()},then:function(e,r,i){var a=0;function s(e,t,r,i){return function(){function u(){var n,u;if(!(e<a)){if((n=r.apply(c,l))===t.promise())throw new TypeError("Thenable self-resolution");o(u=n&&("object"==typeof n||"function"==typeof n)&&n.then)?i?u.call(n,s(a,t,P,i),s(a,t,L,i)):(a++,u.call(n,s(a,t,P,i),s(a,t,L,i),s(a,t,P,t.notifyWith))):(r!==P&&(c=void 0,l=[n]),(i||t.resolveWith)(c,l))}}var c=this,l=arguments,h=i?u:function(){try{u()}catch(n){C.Deferred.exceptionHook&&C.Deferred.exceptionHook(n,h.stackTrace),a<=e+1&&(r!==L&&(c=void 0,l=[n]),t.rejectWith(c,l))}};e?h():(C.Deferred.getStackHook&&(h.stackTrace=C.Deferred.getStackHook()),n.setTimeout(h))}}return C.Deferred((function(n){t[0][3].add(s(0,n,o(i)?i:P,n.notifyWith)),t[1][3].add(s(0,n,o(e)?e:P)),t[2][3].add(s(0,n,o(r)?r:L))})).promise()},promise:function(e){return null!=e?C.extend(e,i):i}},a={};return C.each(t,(function(e,n){var o=n[2],s=n[5];i[n[1]]=o.add,s&&o.add((function(){r=s}),t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),o.add(n[3].fire),a[n[0]]=function(){return a[n[0]+"With"](this===a?void 0:this,arguments),this},a[n[0]+"With"]=o.fireWith})),i.promise(a),e&&e.call(a,a),a},when:function(e){function t(e){return function(t){i[e]=this,a[e]=1<arguments.length?c.call(arguments):t,--n||s.resolveWith(i,a)}}var n=arguments.length,r=n,i=Array(r),a=c.call(arguments),s=C.Deferred();if(n<=1&&(U(e,s.done(t(r)).resolve,s.reject,!n),"pending"===s.state()||o(a[r]&&a[r].then)))return s.then();for(;r--;)U(a[r],t(r),s.reject);return s.promise()}});var z=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/,H=(C.Deferred.exceptionHook=function(e,t){n.console&&n.console.warn&&e&&z.test(e.name)&&n.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},C.readyException=function(e){n.setTimeout((function(){throw e}))},C.Deferred());function $(){b.removeEventListener("DOMContentLoaded",$),n.removeEventListener("load",$),C.ready()}function Q(e,t,n,r,i,a,s){var u=0,c=e.length,l=null==n;if("object"===x(n))for(u in i=!0,n)Q(e,t,u,n[u],!0,a,s);else if(void 0!==r&&(i=!0,o(r)||(s=!0),t=l?s?(t.call(e,r),null):(l=t,function(e,t,n){return l.call(C(e),n)}):t))for(;u<c;u++)t(e[u],n,s?r:r.call(e[u],u,t(e[u],n)));return i?e:l?t.call(e):c?t(e[0],n):a}C.fn.ready=function(e){return H.then(e).catch((function(e){C.readyException(e)})),this},C.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--C.readyWait:C.isReady)||(C.isReady=!0)!==e&&0<--C.readyWait||H.resolveWith(b,[C])}}),C.ready.then=H.then,"complete"===b.readyState||"loading"!==b.readyState&&!b.documentElement.doScroll?n.setTimeout(C.ready):(b.addEventListener("DOMContentLoaded",$),n.addEventListener("load",$));var V=/^-ms-/,q=/-([a-z])/g;function G(e,t){return t.toUpperCase()}function W(e){return e.replace(V,"ms-").replace(q,G)}function K(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType}function Y(){this.expando=C.expando+Y.uid++}Y.uid=1,Y.prototype={cache:function(e){var t=e[this.expando];return t||(t={},K(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[W(t)]=n;else for(r in t)i[W(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][W(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(W):(t=W(t))in r?[t]:t.match(R)||[]).length;for(;n--;)delete r[t[n]]}void 0!==t&&!C.isEmptyObject(r)||(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){return void 0!==(e=e[this.expando])&&!C.isEmptyObject(e)}};var X=new Y,J=new Y,Z=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,ee=/[A-Z]/g;function te(e,t,n){var r,i;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(ee,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===(i=n)||"false"!==i&&("null"===i?null:i===+i+""?+i:Z.test(i)?JSON.parse(i):i)}catch(e){}J.set(e,t,n)}else n=void 0;return n}function ne(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&ae(e)&&"none"===C.css(e,"display")}C.extend({hasData:function(e){return J.hasData(e)||X.hasData(e)},data:function(e,t,n){return J.access(e,t,n)},removeData:function(e,t){J.remove(e,t)},_data:function(e,t,n){return X.access(e,t,n)},_removeData:function(e,t){X.remove(e,t)}}),C.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0!==e)return"object"==typeof e?this.each((function(){J.set(this,e)})):Q(this,(function(t){var n;if(o&&void 0===t)return void 0!==(n=J.get(o,e))||void 0!==(n=te(o,e))?n:void 0;this.each((function(){J.set(this,e,t)}))}),null,t,1<arguments.length,null,!0);if(this.length&&(i=J.get(o),1===o.nodeType&&!X.get(o,"hasDataAttrs"))){for(n=a.length;n--;)a[n]&&0===(r=a[n].name).indexOf("data-")&&(r=W(r.slice(5)),te(o,r,i[r]));X.set(o,"hasDataAttrs",!0)}return i},removeData:function(e){return this.each((function(){J.remove(this,e)}))}}),C.extend({queue:function(e,t,n){var r;if(e)return r=X.get(e,t=(t||"fx")+"queue"),n&&(!r||Array.isArray(n)?r=X.access(e,t,C.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=C.queue(e,t),r=n.length,i=n.shift(),o=C._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,(function(){C.dequeue(e,t)}),o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return X.get(e,n)||X.access(e,n,{empty:C.Callbacks("once memory").add((function(){X.remove(e,[t+"queue",n])}))})}}),C.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?C.queue(this[0],e):void 0===t?this:this.each((function(){var n=C.queue(this,e,t);C._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&C.dequeue(this,e)}))},dequeue:function(e){return this.each((function(){C.dequeue(this,e)}))},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){function n(){--i||o.resolveWith(a,[a])}var r,i=1,o=C.Deferred(),a=this,s=this.length;for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";s--;)(r=X.get(a[s],e+"queueHooks"))&&r.empty&&(i++,r.empty.add(n));return n(),o.promise(t)}});_=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source;var re=new RegExp("^(?:([+-])=|)("+_+")([a-z%]*)$","i"),ie=["Top","Right","Bottom","Left"],oe=b.documentElement,ae=function(e){return C.contains(e.ownerDocument,e)},se={composed:!0};function ue(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return C.css(e,t,"")},u=s(),c=n&&n[3]||(C.cssNumber[t]?"":"px"),l=e.nodeType&&(C.cssNumber[t]||"px"!==c&&+u)&&re.exec(C.css(e,t));if(l&&l[3]!==c){for(c=c||l[3],l=+(u/=2)||1;a--;)C.style(e,t,l+c),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),l/=o;C.style(e,t,(l*=2)+c),n=n||[]}return n&&(l=+l||+u||0,i=n[1]?l+(n[1]+1)*n[2]:+n[2],r&&(r.unit=c,r.start=l,r.end=i)),i}oe.getRootNode&&(ae=function(e){return C.contains(e.ownerDocument,e)||e.getRootNode(se)===e.ownerDocument});var ce={};function le(e,t){for(var n,r,i,o,a,s=[],u=0,c=e.length;u<c;u++)(r=e[u]).style&&(n=r.style.display,t?("none"===n&&(s[u]=X.get(r,"display")||null,s[u]||(r.style.display="")),""===r.style.display&&ne(r)&&(s[u]=(a=o=void 0,o=(i=r).ownerDocument,i=i.nodeName,(a=ce[i])||(o=o.body.appendChild(o.createElement(i)),a=C.css(o,"display"),o.parentNode.removeChild(o),ce[i]=a="none"===a?"block":a),a))):"none"!==n&&(s[u]="none",X.set(r,"display",n)));for(u=0;u<c;u++)null!=s[u]&&(e[u].style.display=s[u]);return e}C.fn.extend({show:function(){return le(this,!0)},hide:function(){return le(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each((function(){ne(this)?C(this).show():C(this).hide()}))}});var he=/^(?:checkbox|radio)$/i,fe=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,de=/^$|^module$|\/(?:java|ecma)script/i,pe=(ft=b.createDocumentFragment().appendChild(b.createElement("div")),(Ge=b.createElement("input")).setAttribute("type","radio"),Ge.setAttribute("checked","checked"),Ge.setAttribute("name","t"),ft.appendChild(Ge),v.checkClone=ft.cloneNode(!0).cloneNode(!0).lastChild.checked,ft.innerHTML="<textarea>x</textarea>",v.noCloneChecked=!!ft.cloneNode(!0).lastChild.defaultValue,ft.innerHTML="<option></option>",v.option=!!ft.lastChild,{thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]});function me(e,t){var n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&T(e,t)?C.merge([e],n):n}function ge(e,t){for(var n=0,r=e.length;n<r;n++)X.set(e[n],"globalEval",!t||X.get(t[n],"globalEval"))}pe.tbody=pe.tfoot=pe.colgroup=pe.caption=pe.thead,pe.th=pe.td,v.option||(pe.optgroup=pe.option=[1,"<select multiple='multiple'>","</select>"]);var Ae=/<|&#?\w+;/;function ve(e,t,n,r,i){for(var o,a,s,u,c,l=t.createDocumentFragment(),h=[],f=0,d=e.length;f<d;f++)if((o=e[f])||0===o)if("object"===x(o))C.merge(h,o.nodeType?[o]:o);else if(Ae.test(o)){for(a=a||l.appendChild(t.createElement("div")),s=(fe.exec(o)||["",""])[1].toLowerCase(),s=pe[s]||pe._default,a.innerHTML=s[1]+C.htmlPrefilter(o)+s[2],c=s[0];c--;)a=a.lastChild;C.merge(h,a.childNodes),(a=l.firstChild).textContent=""}else h.push(t.createTextNode(o));for(l.textContent="",f=0;o=h[f++];)if(r&&-1<C.inArray(o,r))i&&i.push(o);else if(u=ae(o),a=me(l.appendChild(o),"script"),u&&ge(a),n)for(c=0;o=a[c++];)de.test(o.type||"")&&n.push(o);return l}var be=/^([^.]*)(?:\.(.+)|)/;function ye(){return!0}function we(){return!1}function xe(e,t){return e===function(){try{return b.activeElement}catch(e){}}()==("focus"===t)}function Ce(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Ce(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=we;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return C().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=C.guid++)),e.each((function(){C.event.add(this,t,i,r,n)}))}function ke(e,t,n){n?(X.set(e,t,!1),C.event.add(e,t,{namespace:!1,handler:function(e){var r,i,o=X.get(this,t);if(1&e.isTrigger&&this[t]){if(o.length)(C.event.special[t]||{}).delegateType&&e.stopPropagation();else if(o=c.call(arguments),X.set(this,t,o),r=n(this,t),this[t](),o!==(i=X.get(this,t))||r?X.set(this,t,!1):i={},o!==i)return e.stopImmediatePropagation(),e.preventDefault(),i&&i.value}else o.length&&(X.set(this,t,{value:C.event.trigger(C.extend(o[0],C.Event.prototype),o.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===X.get(e,t)&&C.event.add(e,t,ye)}C.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,c,l,h,f,d,p=X.get(e);if(K(e))for(n.handler&&(n=(o=n).handler,i=o.selector),i&&C.find.matchesSelector(oe,i),n.guid||(n.guid=C.guid++),(s=p.events)||(s=p.events=Object.create(null)),(a=p.handle)||(a=p.handle=function(t){return void 0!==C&&C.event.triggered!==t.type?C.event.dispatch.apply(e,arguments):void 0}),u=(t=(t||"").match(R)||[""]).length;u--;)h=d=(f=be.exec(t[u])||[])[1],f=(f[2]||"").split(".").sort(),h&&(c=C.event.special[h]||{},h=(i?c.delegateType:c.bindType)||h,c=C.event.special[h]||{},d=C.extend({type:h,origType:d,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&C.expr.match.needsContext.test(i),namespace:f.join(".")},o),(l=s[h])||((l=s[h]=[]).delegateCount=0,c.setup&&!1!==c.setup.call(e,r,f,a)||e.addEventListener&&e.addEventListener(h,a)),c.add&&(c.add.call(e,d),d.handler.guid||(d.handler.guid=n.guid)),i?l.splice(l.delegateCount++,0,d):l.push(d),C.event.global[h]=!0)},remove:function(e,t,n,r,i){var o,a,s,u,c,l,h,f,d,p,m,g=X.hasData(e)&&X.get(e);if(g&&(u=g.events)){for(c=(t=(t||"").match(R)||[""]).length;c--;)if(d=m=(s=be.exec(t[c])||[])[1],p=(s[2]||"").split(".").sort(),d){for(h=C.event.special[d]||{},f=u[d=(r?h.delegateType:h.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=f.length;o--;)l=f[o],!i&&m!==l.origType||n&&n.guid!==l.guid||s&&!s.test(l.namespace)||r&&r!==l.selector&&("**"!==r||!l.selector)||(f.splice(o,1),l.selector&&f.delegateCount--,h.remove&&h.remove.call(e,l));a&&!f.length&&(h.teardown&&!1!==h.teardown.call(e,p,g.handle)||C.removeEvent(e,d,g.handle),delete u[d])}else for(d in u)C.event.remove(e,d+t[c],n,r,!0);C.isEmptyObject(u)&&X.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a=new Array(arguments.length),s=C.event.fix(e),u=(e=(X.get(this,"events")||Object.create(null))[s.type]||[],C.event.special[s.type]||{});for(a[0]=s,t=1;t<arguments.length;t++)a[t]=arguments[t];if(s.delegateTarget=this,!u.preDispatch||!1!==u.preDispatch.call(this,s)){for(o=C.event.handlers.call(this,s,e),t=0;(r=o[t++])&&!s.isPropagationStopped();)for(s.currentTarget=r.elem,n=0;(i=r.handlers[n++])&&!s.isImmediatePropagationStopped();)s.rnamespace&&!1!==i.namespace&&!s.rnamespace.test(i.namespace)||(s.handleObj=i,s.data=i.data,void 0!==(i=((C.event.special[i.origType]||{}).handle||i.handler).apply(r.elem,a))&&!1===(s.result=i)&&(s.preventDefault(),s.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,s),s.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,c=e.target;if(u&&c.nodeType&&!("click"===e.type&&1<=e.button))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==e.type||!0!==c.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?-1<C(i,this).index(c):C.find(i,this,null,[c]).length),a[i]&&o.push(r);o.length&&s.push({elem:c,handlers:o})}return c=this,u<t.length&&s.push({elem:c,handlers:t.slice(u)}),s},addProp:function(e,t){Object.defineProperty(C.Event.prototype,e,{enumerable:!0,configurable:!0,get:o(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[C.expando]?e:new C.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){return e=this||e,he.test(e.type)&&e.click&&T(e,"input")&&ke(e,"click",ye),!1},trigger:function(e){return e=this||e,he.test(e.type)&&e.click&&T(e,"input")&&ke(e,"click"),!0},_default:function(e){return e=e.target,he.test(e.type)&&e.click&&T(e,"input")&&X.get(e,"click")||T(e,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},C.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},C.Event=function(e,t){if(!(this instanceof C.Event))return new C.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?ye:we,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&C.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[C.expando]=!0},C.Event.prototype={constructor:C.Event,isDefaultPrevented:we,isPropagationStopped:we,isImmediatePropagationStopped:we,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=ye,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=ye,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=ye,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},C.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},C.event.addProp),C.each({focus:"focusin",blur:"focusout"},(function(e,t){C.event.special[e]={setup:function(){return ke(this,e,xe),!1},trigger:function(){return ke(this,e),!0},_default:function(t){return X.get(t.target,e)},delegateType:t}})),C.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(e,t){C.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=e.relatedTarget,i=e.handleObj;return r&&(r===this||C.contains(this,r))||(e.type=i.origType,n=i.handler.apply(this,arguments),e.type=t),n}}})),C.fn.extend({on:function(e,t,n,r){return Ce(this,e,t,n,r)},one:function(e,t,n,r){return Ce(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)r=e.handleObj,C(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler);else{if("object"!=typeof e)return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=we),this.each((function(){C.event.remove(this,e,n,t)}));for(i in e)this.off(i,t,e[i])}return this}});var Ee=/<script|<style|<link/i,Se=/checked\s*(?:[^=]|=\s*.checked.)/i,_e=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function Oe(e,t){return T(e,"table")&&T(11!==t.nodeType?t:t.firstChild,"tr")&&C(e).children("tbody")[0]||e}function Te(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function De(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Be(e,t){var n,r,i,o;if(1===t.nodeType){if(X.hasData(e)&&(o=X.get(e).events))for(i in X.remove(t,"handle events"),o)for(n=0,r=o[i].length;n<r;n++)C.event.add(t,i,o[i][n]);J.hasData(e)&&(e=J.access(e),e=C.extend({},e),J.set(t,e))}}function Ie(e,t,n,r){t=l(t);var i,a,s,u,c,h,f=0,d=e.length,p=d-1,m=t[0],g=o(m);if(g||1<d&&"string"==typeof m&&!v.checkClone&&Se.test(m))return e.each((function(i){var o=e.eq(i);g&&(t[0]=m.call(this,i,o.html())),Ie(o,t,n,r)}));if(d&&(a=(i=ve(t,e[0].ownerDocument,!1,e,r)).firstChild,1===i.childNodes.length&&(i=a),a||r)){for(u=(s=C.map(me(i,"script"),Te)).length;f<d;f++)c=i,f!==p&&(c=C.clone(c,!0,!0),u&&C.merge(s,me(c,"script"))),n.call(e[f],c,f);if(u)for(h=s[s.length-1].ownerDocument,C.map(s,De),f=0;f<u;f++)c=s[f],de.test(c.type||"")&&!X.access(c,"globalEval")&&C.contains(h,c)&&(c.src&&"module"!==(c.type||"").toLowerCase()?C._evalUrl&&!c.noModule&&C._evalUrl(c.src,{nonce:c.nonce||c.getAttribute("nonce")},h):w(c.textContent.replace(_e,""),c,h))}return e}function Me(e,t,n){for(var r,i=t?C.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||C.cleanData(me(r)),r.parentNode&&(n&&ae(r)&&ge(me(r,"script")),r.parentNode.removeChild(r));return e}function je(e){var t=e.ownerDocument.defaultView;return(t=t&&t.opener?t:n).getComputedStyle(e)}function Ne(e,t,n){var r,i={};for(r in t)i[r]=e.style[r],e.style[r]=t[r];for(r in n=n.call(e),t)e.style[r]=i[r];return n}C.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,o,a,s,u,c,l=e.cloneNode(!0),h=ae(e);if(!(v.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||C.isXMLDoc(e)))for(a=me(l),r=0,i=(o=me(e)).length;r<i;r++)s=o[r],void 0,"input"===(c=(u=a[r]).nodeName.toLowerCase())&&he.test(s.type)?u.checked=s.checked:"input"!==c&&"textarea"!==c||(u.defaultValue=s.defaultValue);if(t)if(n)for(o=o||me(e),a=a||me(l),r=0,i=o.length;r<i;r++)Be(o[r],a[r]);else Be(e,l);return 0<(a=me(l,"script")).length&&ge(a,!h&&me(e,"script")),l},cleanData:function(e){for(var t,n,r,i=C.event.special,o=0;void 0!==(n=e[o]);o++)if(K(n)){if(t=n[X.expando]){if(t.events)for(r in t.events)i[r]?C.event.remove(n,r):C.removeEvent(n,r,t.handle);n[X.expando]=void 0}n[J.expando]&&(n[J.expando]=void 0)}}}),C.fn.extend({detach:function(e){return Me(this,e,!0)},remove:function(e){return Me(this,e)},text:function(e){return Q(this,(function(e){return void 0===e?C.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return Ie(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Oe(this,e).appendChild(e)}))},prepend:function(){return Ie(this,arguments,(function(e){var t;1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(t=Oe(this,e)).insertBefore(e,t.firstChild)}))},before:function(){return Ie(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return Ie(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(C.cleanData(me(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return C.clone(this,e,t)}))},html:function(e){return Q(this,(function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Ee.test(e)&&!pe[(fe.exec(e)||["",""])[1].toLowerCase()]){e=C.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(C.cleanData(me(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)}),null,e,arguments.length)},replaceWith:function(){var e=[];return Ie(this,arguments,(function(t){var n=this.parentNode;C.inArray(this,e)<0&&(C.cleanData(me(this)),n&&n.replaceChild(t,this))}),e)}}),C.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(e,t){C.fn[e]=function(e){for(var n,r=[],i=C(e),o=i.length-1,a=0;a<=o;a++)n=a===o?this:this.clone(!0),C(i[a])[t](n),h.apply(r,n.get());return this.pushStack(r)}}));var Fe,Re,Pe,Le,Ue,ze,He,$e,Qe=new RegExp("^("+_+")(?!px)[a-z%]+$","i"),Ve=/^--/,qe=new RegExp(ie.join("|"),"i"),Ge="[\\x20\\t\\r\\n\\f]",We=new RegExp("^"+Ge+"+|((?:^|[^\\\\])(?:\\\\.)*)"+Ge+"+$","g");function Ke(){var e;$e&&(He.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",$e.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",oe.appendChild(He).appendChild($e),e=n.getComputedStyle($e),Fe="1%"!==e.top,ze=12===Ye(e.marginLeft),$e.style.right="60%",Le=36===Ye(e.right),Re=36===Ye(e.width),$e.style.position="absolute",Pe=12===Ye($e.offsetWidth/3),oe.removeChild(He),$e=null)}function Ye(e){return Math.round(parseFloat(e))}function Xe(e,t,n){var r,i=Ve.test(t),o=e.style;return(n=n||je(e))&&(r=n.getPropertyValue(t)||n[t],""!==(r=i&&r?r.replace(We,"$1")||void 0:r)||ae(e)||(r=C.style(e,t)),!v.pixelBoxStyles()&&Qe.test(r)&&qe.test(t)&&(i=o.width,e=o.minWidth,t=o.maxWidth,o.minWidth=o.maxWidth=o.width=r,r=n.width,o.width=i,o.minWidth=e,o.maxWidth=t)),void 0!==r?r+"":r}function Je(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}He=b.createElement("div"),($e=b.createElement("div")).style&&($e.style.backgroundClip="content-box",$e.cloneNode(!0).style.backgroundClip="",v.clearCloneStyle="content-box"===$e.style.backgroundClip,C.extend(v,{boxSizingReliable:function(){return Ke(),Re},pixelBoxStyles:function(){return Ke(),Le},pixelPosition:function(){return Ke(),Fe},reliableMarginLeft:function(){return Ke(),ze},scrollboxSize:function(){return Ke(),Pe},reliableTrDimensions:function(){var e,t,r;return null==Ue&&(e=b.createElement("table"),t=b.createElement("tr"),r=b.createElement("div"),e.style.cssText="position:absolute;left:-11111px;border-collapse:separate",t.style.cssText="border:1px solid",t.style.height="1px",r.style.height="9px",r.style.display="block",oe.appendChild(e).appendChild(t).appendChild(r),r=n.getComputedStyle(t),Ue=parseInt(r.height,10)+parseInt(r.borderTopWidth,10)+parseInt(r.borderBottomWidth,10)===t.offsetHeight,oe.removeChild(e)),Ue}}));var Ze=["Webkit","Moz","ms"],et=b.createElement("div").style,tt={};function nt(e){return C.cssProps[e]||tt[e]||(e in et?e:tt[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),n=Ze.length;n--;)if((e=Ze[n]+t)in et)return e}(e)||e)}var rt=/^(none|table(?!-c[ea]).+)/,it={position:"absolute",visibility:"hidden",display:"block"},ot={letterSpacing:"0",fontWeight:"400"};function at(e,t,n){var r=re.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function st(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(u+=C.css(e,n+ie[a],!0,i)),r?("content"===n&&(u-=C.css(e,"padding"+ie[a],!0,i)),"margin"!==n&&(u-=C.css(e,"border"+ie[a]+"Width",!0,i))):(u+=C.css(e,"padding"+ie[a],!0,i),"padding"!==n?u+=C.css(e,"border"+ie[a]+"Width",!0,i):s+=C.css(e,"border"+ie[a]+"Width",!0,i));return!r&&0<=o&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u}function ut(e,t,n){var r=je(e),i=(!v.boxSizingReliable()||n)&&"border-box"===C.css(e,"boxSizing",!1,r),o=i,a=Xe(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(Qe.test(a)){if(!n)return a;a="auto"}return(!v.boxSizingReliable()&&i||!v.reliableTrDimensions()&&T(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===C.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===C.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+st(e,t,n||(i?"border":"content"),o,r,a)+"px"}function ct(e,t,n,r,i){return new ct.prototype.init(e,t,n,r,i)}C.extend({cssHooks:{opacity:{get:function(e,t){if(t)return""===(t=Xe(e,"opacity"))?"1":t}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=W(t),u=Ve.test(t),c=e.style;if(u||(t=nt(s)),a=C.cssHooks[t]||C.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:c[t];"string"==(o=typeof n)&&(i=re.exec(n))&&i[1]&&(n=ue(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(C.cssNumber[s]?"":"px")),v.clearCloneStyle||""!==n||0!==t.indexOf("background")||(c[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?c.setProperty(t,n):c[t]=n))}},css:function(e,t,n,r){var i,o=W(t);return Ve.test(t)||(t=nt(o)),"normal"===(i=void 0===(i=(o=C.cssHooks[t]||C.cssHooks[o])&&"get"in o?o.get(e,!0,n):i)?Xe(e,t,r):i)&&t in ot&&(i=ot[t]),(""===n||n)&&(o=parseFloat(i),!0===n||isFinite(o))?o||0:i}}),C.each(["height","width"],(function(e,t){C.cssHooks[t]={get:function(e,n,r){if(n)return!rt.test(C.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?ut(e,t,r):Ne(e,it,(function(){return ut(e,t,r)}))},set:function(e,n,r){var i=je(e),o=!v.scrollboxSize()&&"absolute"===i.position,a=(o||r)&&"border-box"===C.css(e,"boxSizing",!1,i);r=r?st(e,t,r,a,i):0;return a&&o&&(r-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(i[t])-st(e,t,"border",!1,i)-.5)),r&&(a=re.exec(n))&&"px"!==(a[3]||"px")&&(e.style[t]=n,n=C.css(e,t)),at(0,n,r)}}})),C.cssHooks.marginLeft=Je(v.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(Xe(e,"marginLeft"))||e.getBoundingClientRect().left-Ne(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),C.each({margin:"",padding:"",border:"Width"},(function(e,t){C.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+ie[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(C.cssHooks[e+t].set=at)})),C.fn.extend({css:function(e,t){return Q(this,(function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=je(e),i=t.length;a<i;a++)o[t[a]]=C.css(e,t[a],!1,r);return o}return void 0!==n?C.style(e,t,n):C.css(e,t)}),e,t,1<arguments.length)}}),((C.Tween=ct).prototype={constructor:ct,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||C.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(C.cssNumber[n]?"":"px")},cur:function(){var e=ct.propHooks[this.prop];return(e&&e.get?e:ct.propHooks._default).get(this)},run:function(e){var t,n=ct.propHooks[this.prop];return this.options.duration?this.pos=t=C.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),(n&&n.set?n:ct.propHooks._default).set(this),this}}).init.prototype=ct.prototype,(ct.propHooks={_default:{get:function(e){return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(e=C.css(e.elem,e.prop,""))&&"auto"!==e?e:0},set:function(e){C.fx.step[e.prop]?C.fx.step[e.prop](e):1!==e.elem.nodeType||!C.cssHooks[e.prop]&&null==e.elem.style[nt(e.prop)]?e.elem[e.prop]=e.now:C.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=ct.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},C.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},C.fx=ct.prototype.init,C.fx.step={};var lt,ht,ft,dt=/^(?:toggle|show|hide)$/,pt=/queueHooks$/;function mt(){ht&&(!1===b.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(mt):n.setTimeout(mt,C.fx.interval),C.fx.tick())}function gt(){return n.setTimeout((function(){lt=void 0})),lt=Date.now()}function At(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=ie[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function vt(e,t,n){for(var r,i=(bt.tweeners[t]||[]).concat(bt.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function bt(e,t,n){var r,i,a,s,u,c,l,h=0,f=bt.prefilters.length,d=C.Deferred().always((function(){delete p.elem})),p=function(){if(!i){for(var t=lt||gt(),n=1-((t=Math.max(0,m.startTime+m.duration-t))/m.duration||0),r=0,o=m.tweens.length;r<o;r++)m.tweens[r].run(n);if(d.notifyWith(e,[m,n,t]),n<1&&o)return t;o||d.notifyWith(e,[m,1,0]),d.resolveWith(e,[m])}return!1},m=d.promise({elem:e,props:C.extend({},t),opts:C.extend(!0,{specialEasing:{},easing:C.easing._default},n),originalProperties:t,originalOptions:n,startTime:lt||gt(),duration:n.duration,tweens:[],createTween:function(t,n){return n=C.Tween(e,m.opts,t,n,m.opts.specialEasing[t]||m.opts.easing),m.tweens.push(n),n},stop:function(t){var n=0,r=t?m.tweens.length:0;if(!i){for(i=!0;n<r;n++)m.tweens[n].run(1);t?(d.notifyWith(e,[m,1,0]),d.resolveWith(e,[m,t])):d.rejectWith(e,[m,t])}return this}}),g=m.props,A=g,v=m.opts.specialEasing;for(a in A)if(u=v[s=W(a)],c=A[a],Array.isArray(c)&&(u=c[1],c=A[a]=c[0]),a!==s&&(A[s]=c,delete A[a]),(l=C.cssHooks[s])&&"expand"in l)for(a in c=l.expand(c),delete A[s],c)a in A||(A[a]=c[a],v[a]=u);else v[s]=u;for(;h<f;h++)if(r=bt.prefilters[h].call(m,e,g,m.opts))return o(r.stop)&&(C._queueHooks(m.elem,m.opts.queue).stop=r.stop.bind(r)),r;return C.map(g,vt,m),o(m.opts.start)&&m.opts.start.call(e,m),m.progress(m.opts.progress).done(m.opts.done,m.opts.complete).fail(m.opts.fail).always(m.opts.always),C.fx.timer(C.extend(p,{elem:e,anim:m,queue:m.opts.queue})),m}C.Animation=C.extend(bt,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return ue(n.elem,e,re.exec(t),n),n}]},tweener:function(e,t){for(var n,r=0,i=(e=o(e)?(t=e,["*"]):e.match(R)).length;r<i;r++)n=e[r],bt.tweeners[n]=bt.tweeners[n]||[],bt.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,c,l="width"in t||"height"in t,h=this,f={},d=e.style,p=e.nodeType&&ne(e),m=X.get(e,"fxshow");for(r in n.queue||(null==(a=C._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,h.always((function(){h.always((function(){a.unqueued--,C.queue(e,"fx").length||a.empty.fire()}))}))),t)if(i=t[r],dt.test(i)){if(delete t[r],o=o||"toggle"===i,i===(p?"hide":"show")){if("show"!==i||!m||void 0===m[r])continue;p=!0}f[r]=m&&m[r]||C.style(e,r)}if((u=!C.isEmptyObject(t))||!C.isEmptyObject(f))for(r in l&&1===e.nodeType&&(n.overflow=[d.overflow,d.overflowX,d.overflowY],null==(c=m&&m.display)&&(c=X.get(e,"display")),"none"===(l=C.css(e,"display"))&&(c?l=c:(le([e],!0),c=e.style.display||c,l=C.css(e,"display"),le([e]))),("inline"===l||"inline-block"===l&&null!=c)&&"none"===C.css(e,"float")&&(u||(h.done((function(){d.display=c})),null==c&&(l=d.display,c="none"===l?"":l)),d.display="inline-block")),n.overflow&&(d.overflow="hidden",h.always((function(){d.overflow=n.overflow[0],d.overflowX=n.overflow[1],d.overflowY=n.overflow[2]}))),u=!1,f)u||(m?"hidden"in m&&(p=m.hidden):m=X.access(e,"fxshow",{display:c}),o&&(m.hidden=!p),p&&le([e],!0),h.done((function(){for(r in p||le([e]),X.remove(e,"fxshow"),f)C.style(e,r,f[r])}))),u=vt(p?m[r]:0,r,h),r in m||(m[r]=u.start,p&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?bt.prefilters.unshift(e):bt.prefilters.push(e)}}),C.speed=function(e,t,n){var r=e&&"object"==typeof e?C.extend({},e):{complete:n||!n&&t||o(e)&&e,duration:e,easing:n&&t||t&&!o(t)&&t};return C.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in C.fx.speeds?r.duration=C.fx.speeds[r.duration]:r.duration=C.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){o(r.old)&&r.old.call(this),r.queue&&C.dequeue(this,r.queue)},r},C.fn.extend({fadeTo:function(e,t,n,r){return this.filter(ne).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){function i(){var t=bt(this,C.extend({},e),a);(o||X.get(this,"finish"))&&t.stop(!0)}var o=C.isEmptyObject(e),a=C.speed(t,n,r);return i.finish=i,o||!1===a.queue?this.each(i):this.queue(a.queue,i)},stop:function(e,t,n){function r(e){var t=e.stop;delete e.stop,t(n)}return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&this.queue(e||"fx",[]),this.each((function(){var t=!0,i=null!=e&&e+"queueHooks",o=C.timers,a=X.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&pt.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));!t&&n||C.dequeue(this,e)}))},finish:function(e){return!1!==e&&(e=e||"fx"),this.each((function(){var t,n=X.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=C.timers,a=r?r.length:0;for(n.finish=!0,C.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<a;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish}))}}),C.each(["toggle","show","hide"],(function(e,t){var n=C.fn[t];C.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(At(t,!0),e,r,i)}})),C.each({slideDown:At("show"),slideUp:At("hide"),slideToggle:At("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(e,t){C.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}})),C.timers=[],C.fx.tick=function(){var e,t=0,n=C.timers;for(lt=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||C.fx.stop(),lt=void 0},C.fx.timer=function(e){C.timers.push(e),C.fx.start()},C.fx.interval=13,C.fx.start=function(){ht||(ht=!0,mt())},C.fx.stop=function(){ht=null},C.fx.speeds={slow:600,fast:200,_default:400},C.fn.delay=function(e,t){return e=C.fx&&C.fx.speeds[e]||e,this.queue(t=t||"fx",(function(t,r){var i=n.setTimeout(t,e);r.stop=function(){n.clearTimeout(i)}}))},ft=b.createElement("input"),_=b.createElement("select").appendChild(b.createElement("option")),ft.type="checkbox",v.checkOn=""!==ft.value,v.optSelected=_.selected,(ft=b.createElement("input")).value="t",ft.type="radio",v.radioValue="t"===ft.value;var yt,wt=C.expr.attrHandle,xt=(C.fn.extend({attr:function(e,t){return Q(this,C.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each((function(){C.removeAttr(this,e)}))}}),C.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?C.prop(e,t,n):(1===o&&C.isXMLDoc(e)||(i=C.attrHooks[t.toLowerCase()]||(C.expr.match.bool.test(t)?yt:void 0)),void 0!==n?null===n?void C.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))||null!=(r=C.find.attr(e,t))?r:void 0)},attrHooks:{type:{set:function(e,t){var n;if(!v.radioValue&&"radio"===t&&T(e,"input"))return n=e.value,e.setAttribute("type",t),n&&(e.value=n),t}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(R);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),yt={set:function(e,t,n){return!1===t?C.removeAttr(e,n):e.setAttribute(n,n),n}},C.each(C.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=wt[t]||C.find.attr;wt[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=wt[a],wt[a]=i,i=null!=n(e,t,r)?a:null,wt[a]=o),i}})),/^(?:input|select|textarea|button)$/i),Ct=/^(?:a|area)$/i;function kt(e){return(e.match(R)||[]).join(" ")}function Et(e){return e.getAttribute&&e.getAttribute("class")||""}function St(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(R)||[]}function _t(e){e.stopPropagation()}C.fn.extend({prop:function(e,t){return Q(this,C.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each((function(){delete this[C.propFix[e]||e]}))}}),C.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&C.isXMLDoc(e)||(t=C.propFix[t]||t,i=C.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=C.find.attr(e,"tabindex");return t?parseInt(t,10):xt.test(e.nodeName)||Ct.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),v.optSelected||(C.propHooks.selected={get:function(e){return(e=e.parentNode)&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(e){(e=e.parentNode)&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),C.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){C.propFix[this.toLowerCase()]=this})),C.fn.extend({addClass:function(e){var t,n,r,i,a,s;return o(e)?this.each((function(t){C(this).addClass(e.call(this,t,Et(this)))})):(t=St(e)).length?this.each((function(){if(r=Et(this),n=1===this.nodeType&&" "+kt(r)+" "){for(a=0;a<t.length;a++)i=t[a],n.indexOf(" "+i+" ")<0&&(n+=i+" ");s=kt(n),r!==s&&this.setAttribute("class",s)}})):this},removeClass:function(e){var t,n,r,i,a,s;return o(e)?this.each((function(t){C(this).removeClass(e.call(this,t,Et(this)))})):arguments.length?(t=St(e)).length?this.each((function(){if(r=Et(this),n=1===this.nodeType&&" "+kt(r)+" "){for(a=0;a<t.length;a++)for(i=t[a];-1<n.indexOf(" "+i+" ");)n=n.replace(" "+i+" "," ");s=kt(n),r!==s&&this.setAttribute("class",s)}})):this:this.attr("class","")},toggleClass:function(e,t){var n,r,i,a,s=typeof e,u="string"==s||Array.isArray(e);return o(e)?this.each((function(n){C(this).toggleClass(e.call(this,n,Et(this),t),t)})):"boolean"==typeof t&&u?t?this.addClass(e):this.removeClass(e):(n=St(e),this.each((function(){if(u)for(a=C(this),i=0;i<n.length;i++)r=n[i],a.hasClass(r)?a.removeClass(r):a.addClass(r);else void 0!==e&&"boolean"!=s||((r=Et(this))&&X.set(this,"__className__",r),this.setAttribute&&this.setAttribute("class",!r&&!1!==e&&X.get(this,"__className__")||""))})))},hasClass:function(e){for(var t,n=0,r=" "+e+" ";t=this[n++];)if(1===t.nodeType&&-1<(" "+kt(Et(t))+" ").indexOf(r))return!0;return!1}});var Ot=/\r/g,Tt=(C.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=o(e),this.each((function(n){1===this.nodeType&&(null==(n=r?e.call(this,n,C(this).val()):e)?n="":"number"==typeof n?n+="":Array.isArray(n)&&(n=C.map(n,(function(e){return null==e?"":e+""}))),(t=C.valHooks[this.type]||C.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,n,"value")||(this.value=n))}))):i?(t=C.valHooks[i.type]||C.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(Ot,""):null==n?"":n:void 0}}),C.extend({valHooks:{option:{get:function(e){var t=C.find.attr(e,"value");return null!=t?t:kt(C.text(e))}},select:{get:function(e){for(var t,n=e.options,r=e.selectedIndex,i="select-one"===e.type,o=i?null:[],a=i?r+1:n.length,s=r<0?a:i?r:0;s<a;s++)if(((t=n[s]).selected||s===r)&&!t.disabled&&(!t.parentNode.disabled||!T(t.parentNode,"optgroup"))){if(t=C(t).val(),i)return t;o.push(t)}return o},set:function(e,t){for(var n,r,i=e.options,o=C.makeArray(t),a=i.length;a--;)((r=i[a]).selected=-1<C.inArray(C.valHooks.option.get(r),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),C.each(["radio","checkbox"],(function(){C.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<C.inArray(C(e).val(),t)}},v.checkOn||(C.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})})),v.focusin="onfocusin"in n,/^(?:focusinfocus|focusoutblur)$/),Dt=(C.extend(C.event,{trigger:function(e,t,r,i){var s,u,c,l,h,f,d,p=[r||b],g=m.call(e,"type")?e.type:e,A=m.call(e,"namespace")?e.namespace.split("."):[],v=d=u=r=r||b;if(3!==r.nodeType&&8!==r.nodeType&&!Tt.test(g+C.event.triggered)&&(-1<g.indexOf(".")&&(g=(A=g.split(".")).shift(),A.sort()),l=g.indexOf(":")<0&&"on"+g,(e=e[C.expando]?e:new C.Event(g,"object"==typeof e&&e)).isTrigger=i?2:3,e.namespace=A.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+A.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=r),t=null==t?[e]:C.makeArray(t,[e]),f=C.event.special[g]||{},i||!f.trigger||!1!==f.trigger.apply(r,t))){if(!i&&!f.noBubble&&!a(r)){for(c=f.delegateType||g,Tt.test(c+g)||(v=v.parentNode);v;v=v.parentNode)p.push(v),u=v;u===(r.ownerDocument||b)&&p.push(u.defaultView||u.parentWindow||n)}for(s=0;(v=p[s++])&&!e.isPropagationStopped();)d=v,e.type=1<s?c:f.bindType||g,(h=(X.get(v,"events")||Object.create(null))[e.type]&&X.get(v,"handle"))&&h.apply(v,t),(h=l&&v[l])&&h.apply&&K(v)&&(e.result=h.apply(v,t),!1===e.result&&e.preventDefault());return e.type=g,i||e.isDefaultPrevented()||f._default&&!1!==f._default.apply(p.pop(),t)||!K(r)||l&&o(r[g])&&!a(r)&&((u=r[l])&&(r[l]=null),C.event.triggered=g,e.isPropagationStopped()&&d.addEventListener(g,_t),r[g](),e.isPropagationStopped()&&d.removeEventListener(g,_t),C.event.triggered=void 0,u&&(r[l]=u)),e.result}},simulate:function(e,t,n){n=C.extend(new C.Event,n,{type:e,isSimulated:!0}),C.event.trigger(n,null,t)}}),C.fn.extend({trigger:function(e,t){return this.each((function(){C.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return C.event.trigger(e,t,n,!0)}}),v.focusin||C.each({focus:"focusin",blur:"focusout"},(function(e,t){function n(e){C.event.simulate(t,e.target,C.event.fix(e))}C.event.special[t]={setup:function(){var r=this.ownerDocument||this.document||this,i=X.access(r,t);i||r.addEventListener(e,n,!0),X.access(r,t,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,i=X.access(r,t)-1;i?X.access(r,t,i):(r.removeEventListener(e,n,!0),X.remove(r,t))}}})),n.location),Bt={guid:Date.now()},It=/\?/,Mt=(C.parseXML=function(e){var t,r;if(!e||"string"!=typeof e)return null;try{t=(new n.DOMParser).parseFromString(e,"text/xml")}catch(e){}return r=t&&t.getElementsByTagName("parsererror")[0],t&&!r||C.error("Invalid XML: "+(r?C.map(r.childNodes,(function(e){return e.textContent})).join("\n"):e)),t},/\[\]$/),jt=/\r?\n/g,Nt=/^(?:submit|button|image|reset|file)$/i,Ft=/^(?:input|select|textarea|keygen)/i;C.param=function(e,t){function n(e,t){t=o(t)?t():t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==t?"":t)}var r,i=[];if(null==e)return"";if(Array.isArray(e)||e.jquery&&!C.isPlainObject(e))C.each(e,(function(){n(this.name,this.value)}));else for(r in e)!function e(t,n,r,i){if(Array.isArray(n))C.each(n,(function(n,o){r||Mt.test(t)?i(t,o):e(t+"["+("object"==typeof o&&null!=o?n:"")+"]",o,r,i)}));else if(r||"object"!==x(n))i(t,n);else for(var o in n)e(t+"["+o+"]",n[o],r,i)}(r,e[r],t,n);return i.join("&")},C.fn.extend({serialize:function(){return C.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=C.prop(this,"elements");return e?C.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!C(this).is(":disabled")&&Ft.test(this.nodeName)&&!Nt.test(e)&&(this.checked||!he.test(e))})).map((function(e,t){var n=C(this).val();return null==n?null:Array.isArray(n)?C.map(n,(function(e){return{name:t.name,value:e.replace(jt,"\r\n")}})):{name:t.name,value:n.replace(jt,"\r\n")}})).get()}});var Rt=/%20/g,Pt=/#.*$/,Lt=/([?&])_=[^&]*/,Ut=/^(.*?):[ \t]*([^\r\n]*)$/gm,zt=/^(?:GET|HEAD)$/,Ht=/^\/\//,$t={},Qt={},Vt="*/".concat("*"),qt=b.createElement("a");function Gt(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,a=t.toLowerCase().match(R)||[];if(o(n))for(;r=a[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function Wt(e,t,n,r){var i={},o=e===Qt;function a(s){var u;return i[s]=!0,C.each(e[s]||[],(function(e,s){return"string"!=typeof(s=s(t,n,r))||o||i[s]?o?!(u=s):void 0:(t.dataTypes.unshift(s),a(s),!1)})),u}return a(t.dataTypes[0])||!i["*"]&&a("*")}function Kt(e,t){var n,r,i=C.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r=r||{})[n]=t[n]);return r&&C.extend(!0,e,r),e}qt.href=Dt.href,C.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Dt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Dt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Vt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":C.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Kt(Kt(e,C.ajaxSettings),t):Kt(C.ajaxSettings,e)},ajaxPrefilter:Gt($t),ajaxTransport:Gt(Qt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0);var r,i,o,a,s,u,c,l,h=C.ajaxSetup({},t=t||{}),f=h.context||h,d=h.context&&(f.nodeType||f.jquery)?C(f):C.event,p=C.Deferred(),m=C.Callbacks("once memory"),g=h.statusCode||{},A={},v={},y="canceled",w={readyState:0,getResponseHeader:function(e){var t;if(u){if(!a)for(a={};t=Ut.exec(o);)a[t[1].toLowerCase()+" "]=(a[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=a[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return u?o:null},setRequestHeader:function(e,t){return null==u&&(e=v[e.toLowerCase()]=v[e.toLowerCase()]||e,A[e]=t),this},overrideMimeType:function(e){return null==u&&(h.mimeType=e),this},statusCode:function(e){if(e)if(u)w.always(e[w.status]);else for(var t in e)g[t]=[g[t],e[t]];return this},abort:function(e){return e=e||y,r&&r.abort(e),x(0,e),this}};if(p.promise(w),h.url=((e||h.url||Dt.href)+"").replace(Ht,Dt.protocol+"//"),h.type=t.method||t.type||h.method||h.type,h.dataTypes=(h.dataType||"*").toLowerCase().match(R)||[""],null==h.crossDomain){e=b.createElement("a");try{e.href=h.url,e.href=e.href,h.crossDomain=qt.protocol+"//"+qt.host!=e.protocol+"//"+e.host}catch(e){h.crossDomain=!0}}if(h.data&&h.processData&&"string"!=typeof h.data&&(h.data=C.param(h.data,h.traditional)),Wt($t,h,t,w),!u){for(l in(c=C.event&&h.global)&&0==C.active++&&C.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!zt.test(h.type),i=h.url.replace(Pt,""),h.hasContent?h.data&&h.processData&&0===(h.contentType||"").indexOf("application/x-www-form-urlencoded")&&(h.data=h.data.replace(Rt,"+")):(e=h.url.slice(i.length),h.data&&(h.processData||"string"==typeof h.data)&&(i+=(It.test(i)?"&":"?")+h.data,delete h.data),!1===h.cache&&(i=i.replace(Lt,"$1"),e=(It.test(i)?"&":"?")+"_="+Bt.guid+++e),h.url=i+e),h.ifModified&&(C.lastModified[i]&&w.setRequestHeader("If-Modified-Since",C.lastModified[i]),C.etag[i]&&w.setRequestHeader("If-None-Match",C.etag[i])),(h.data&&h.hasContent&&!1!==h.contentType||t.contentType)&&w.setRequestHeader("Content-Type",h.contentType),w.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+Vt+"; q=0.01":""):h.accepts["*"]),h.headers)w.setRequestHeader(l,h.headers[l]);if(h.beforeSend&&(!1===h.beforeSend.call(f,w,h)||u))return w.abort();if(y="abort",m.add(h.complete),w.done(h.success),w.fail(h.error),r=Wt(Qt,h,t,w)){if(w.readyState=1,c&&d.trigger("ajaxSend",[w,h]),u)return w;h.async&&0<h.timeout&&(s=n.setTimeout((function(){w.abort("timeout")}),h.timeout));try{u=!1,r.send(A,x)}catch(e){if(u)throw e;x(-1,e)}}else x(-1,"No Transport")}return w;function x(e,t,a,l){var A,v,b,y=t;u||(u=!0,s&&n.clearTimeout(s),r=void 0,o=l||"",w.readyState=0<e?4:0,l=200<=e&&e<300||304===e,a&&(b=function(e,t,n){for(var r,i,o,a,s=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a=a||i}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(h,w,a)),!l&&-1<C.inArray("script",h.dataTypes)&&C.inArray("json",h.dataTypes)<0&&(h.converters["text script"]=function(){}),b=function(e,t,n,r){var i,o,a,s,u,c={},l=e.dataTypes.slice();if(l[1])for(a in e.converters)c[a.toLowerCase()]=e.converters[a];for(o=l.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=l.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=c[u+" "+o]||c["* "+o]))for(i in c)if((s=i.split(" "))[1]===o&&(a=c[u+" "+s[0]]||c["* "+s[0]])){!0===a?a=c[i]:!0!==c[i]&&(o=s[0],l.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(h,b,w,l),l?(h.ifModified&&((a=w.getResponseHeader("Last-Modified"))&&(C.lastModified[i]=a),(a=w.getResponseHeader("etag"))&&(C.etag[i]=a)),204===e||"HEAD"===h.type?y="nocontent":304===e?y="notmodified":(y=b.state,A=b.data,l=!(v=b.error))):(v=y,!e&&y||(y="error",e<0&&(e=0))),w.status=e,w.statusText=(t||y)+"",l?p.resolveWith(f,[A,y,w]):p.rejectWith(f,[w,y,v]),w.statusCode(g),g=void 0,c&&d.trigger(l?"ajaxSuccess":"ajaxError",[w,h,l?A:v]),m.fireWith(f,[w,y]),c&&(d.trigger("ajaxComplete",[w,h]),--C.active||C.event.trigger("ajaxStop")))}},getJSON:function(e,t,n){return C.get(e,t,n,"json")},getScript:function(e,t){return C.get(e,void 0,t,"script")}}),C.each(["get","post"],(function(e,t){C[t]=function(e,n,r,i){return o(n)&&(i=i||r,r=n,n=void 0),C.ajax(C.extend({url:e,type:t,dataType:i,data:n,success:r},C.isPlainObject(e)&&e))}})),C.ajaxPrefilter((function(e){for(var t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")})),C._evalUrl=function(e,t,n){return C.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){C.globalEval(e,t,n)}})},C.fn.extend({wrapAll:function(e){return this[0]&&(o(e)&&(e=e.call(this[0])),e=C(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return o(e)?this.each((function(t){C(this).wrapInner(e.call(this,t))})):this.each((function(){var t=C(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=o(e);return this.each((function(n){C(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){C(this).replaceWith(this.childNodes)})),this}}),C.expr.pseudos.hidden=function(e){return!C.expr.pseudos.visible(e)},C.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},C.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(e){}};var Yt={0:200,1223:204},Xt=C.ajaxSettings.xhr(),Jt=(v.cors=!!Xt&&"withCredentials"in Xt,v.ajax=Xt=!!Xt,C.ajaxTransport((function(e){var t,r;if(v.cors||Xt&&!e.crossDomain)return{send:function(i,o){var a,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(a in e.xhrFields)s[a]=e.xhrFields[a];for(a in e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)s.setRequestHeader(a,i[a]);t=function(e){return function(){t&&(t=r=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(Yt[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=t(),r=s.onerror=s.ontimeout=t("error"),void 0!==s.onabort?s.onabort=r:s.onreadystatechange=function(){4===s.readyState&&n.setTimeout((function(){t&&r()}))},t=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(i){if(t)throw i}},abort:function(){t&&t()}}})),C.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),C.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return C.globalEval(e),e}}}),C.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),C.ajaxTransport("script",(function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(r,i){t=C("<script>").attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i("error"===e.type?404:200,e.type)}),b.head.appendChild(t[0])},abort:function(){n&&n()}}})),[]),Zt=/(=)\?(?=&|$)|\?\?/,en=(C.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Jt.pop()||C.expando+"_"+Bt.guid++;return this[e]=!0,e}}),C.ajaxPrefilter("json jsonp",(function(e,t,r){var i,a,s,u=!1!==e.jsonp&&(Zt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Zt.test(e.data)&&"data");if(u||"jsonp"===e.dataTypes[0])return i=e.jsonpCallback=o(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,u?e[u]=e[u].replace(Zt,"$1"+i):!1!==e.jsonp&&(e.url+=(It.test(e.url)?"&":"?")+e.jsonp+"="+i),e.converters["script json"]=function(){return s||C.error(i+" was not called"),s[0]},e.dataTypes[0]="json",a=n[i],n[i]=function(){s=arguments},r.always((function(){void 0===a?C(n).removeProp(i):n[i]=a,e[i]&&(e.jsonpCallback=t.jsonpCallback,Jt.push(i)),s&&o(a)&&a(s[0]),s=a=void 0})),"script"})),v.createHTMLDocument=((Ge=b.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Ge.childNodes.length),C.parseHTML=function(e,t,n){var r;return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(v.createHTMLDocument?((r=(t=b.implementation.createHTMLDocument("")).createElement("base")).href=b.location.href,t.head.appendChild(r)):t=b),r=!n&&[],(n=D.exec(e))?[t.createElement(n[1])]:(n=ve([e],t,r),r&&r.length&&C(r).remove(),C.merge([],n.childNodes)))},C.fn.load=function(e,t,n){var r,i,a,s=this,u=e.indexOf(" ");return-1<u&&(r=kt(e.slice(u)),e=e.slice(0,u)),o(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<s.length&&C.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done((function(e){a=arguments,s.html(r?C("<div>").append(C.parseHTML(e)).find(r):e)})).always(n&&function(e,t){s.each((function(){n.apply(this,a||[e.responseText,t,e])}))}),this},C.expr.pseudos.animated=function(e){return C.grep(C.timers,(function(t){return e===t.elem})).length},C.offset={setOffset:function(e,t,n){var r,i,a,s,u=C.css(e,"position"),c=C(e),l={};"static"===u&&(e.style.position="relative"),a=c.offset(),r=C.css(e,"top"),s=C.css(e,"left"),u=("absolute"===u||"fixed"===u)&&-1<(r+s).indexOf("auto")?(i=(u=c.position()).top,u.left):(i=parseFloat(r)||0,parseFloat(s)||0),null!=(t=o(t)?t.call(e,n,C.extend({},a)):t).top&&(l.top=t.top-a.top+i),null!=t.left&&(l.left=t.left-a.left+u),"using"in t?t.using.call(e,l):c.css(l)}},C.fn.extend({offset:function(e){var t,n;return arguments.length?void 0===e?this:this.each((function(t){C.offset.setOffset(this,e,t)})):(n=this[0])?n.getClientRects().length?(t=n.getBoundingClientRect(),n=n.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===C.css(r,"position"))t=r.getBoundingClientRect();else{for(t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===C.css(e,"position");)e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=C(e).offset()).top+=C.css(e,"borderTopWidth",!0),i.left+=C.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-C.css(r,"marginTop",!0),left:t.left-i.left-C.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent;e&&"static"===C.css(e,"position");)e=e.offsetParent;return e||oe}))}}),C.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(e,t){var n="pageYOffset"===t;C.fn[e]=function(r){return Q(this,(function(e,r,i){var o;if(a(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===i)return o?o[t]:e[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):e[r]=i}),e,r,arguments.length)}})),C.each(["top","left"],(function(e,t){C.cssHooks[t]=Je(v.pixelPosition,(function(e,n){if(n)return n=Xe(e,t),Qe.test(n)?C(e).position()[t]+"px":n}))})),C.each({Height:"height",Width:"width"},(function(e,t){C.each({padding:"inner"+e,content:t,"":"outer"+e},(function(n,r){C.fn[r]=function(i,o){var s=arguments.length&&(n||"boolean"!=typeof i),u=n||(!0===i||!0===o?"margin":"border");return Q(this,(function(t,n,i){var o;return a(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?C.css(t,n,u):C.style(t,n,i,u)}),t,s?i:void 0,s)}}))})),C.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(e,t){C.fn[t]=function(e){return this.on(t,e)}})),C.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),C.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(e,t){C.fn[t]=function(e,n){return 0<arguments.length?this.on(t,null,e,n):this.trigger(t)}})),/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g),tn=(C.proxy=function(e,t){var n,r;if("string"==typeof t&&(r=e[t],t=e,e=r),o(e))return n=c.call(arguments,2),(r=function(){return e.apply(t||this,n.concat(c.call(arguments)))}).guid=e.guid=e.guid||C.guid++,r},C.holdReady=function(e){e?C.readyWait++:C.ready(!0)},C.isArray=Array.isArray,C.parseJSON=JSON.parse,C.nodeName=T,C.isFunction=o,C.isWindow=a,C.camelCase=W,C.type=x,C.now=Date.now,C.isNumeric=function(e){var t=C.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},C.trim=function(e){return null==e?"":(e+"").replace(en,"$1")},void 0!==(r=function(){return C}.apply(t,[]))&&(e.exports=r),n.jQuery),nn=n.$;return C.noConflict=function(e){return n.$===C&&(n.$=nn),e&&n.jQuery===C&&(n.jQuery=tn),C},void 0===i&&(n.jQuery=n.$=C),C}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({reshape_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t){return e=Object(o.a)(e,"x","reshape","string_or_numeric"),r.a.runKernel(i.wc,{x:e},{shape:t})}})},function(e,t,n){"use strict";
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function r(e){let t=e.length;for(var n;0<t;)n=Math.random()*t|0,s(e,--t,n)}function i(e,t){if(e.length!==t.length)throw new Error("Array sizes must match to be shuffled together First array length was "+e.length+"Second array length was "+t.length);let n=e.length;for(var r;0<n;)r=Math.random()*n|0,s(e,--n,r),s(t,n,r)}function o(e,t,n){return Math.max(e,Math.min(t,n))}function a(e){return e%2==0?e:e+1}function s(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function u(e){let t=0;for(let n=0;n<e.length;n++)t+=e[n];return t}function c(e,t){var n=Math.random();return t*n+(1-n)*e}function l(e,t){let n=0;for(let i=0;i<e.length;i++){var r=Number(e[i])-Number(t[i]);n+=r*r}return n}function h(e,t){if(!e)throw new Error("string"==typeof t?t:t())}function f(e,t,n=""){h(A(e,t),()=>n+` Shapes ${e} and ${t} must match`)}function d(e){h(null!=e,()=>"The input to the tensor constructor must be a non-null value.")}function p(e,t=[],n=!1){if(null==t&&(t=[]),Array.isArray(e)||I(e)&&!n)for(let r=0;r<e.length;++r)p(e[r],t,n);else t.push(e);return t}function m(e){if(0===e.length)return 1;let t=e[0];for(let n=1;n<e.length;n++)t*=e[n];return t}function g(e){return 0===e.length}function A(e,t){if(e!==t){if(null==e||null==t)return!1;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1}return!0}function v(e){return e%1==0}function b(e){return null!=Math.tanh?Math.tanh(e):e===1/0?1:e===-1/0?-1:((e=Math.exp(2*e))-1)/(e+1)}function y(e){var t=Math.ceil(Math.sqrt(e));return[t,Math.ceil(e/t)]}function w(e){const t=new Uint32Array(e);for(let n=0;n<e;++n)t[n]=n;return r(t),t}function x(e,t){return t<=e.length?e:e+" ".repeat(t-e.length)}function C(e,t=(e=>0),n,r){return new Promise((i,o)=>{let a=0;const s=()=>{var u;e()?i():(a++,u=t(a),null!=n&&a>=n?o():(null!=r?r:setTimeout)(s,u))};s()})}function k(e,t){let n=1,r=-1;for(let t=0;t<e.length;++t)if(0<=e[t])n*=e[t];else if(-1===e[t]){if(-1!==r)throw Error(`Shapes can only have 1 implicit size. Found -1 at dim ${r} and dim `+t);r=t}else if(e[t]<0)throw Error(`Shapes can not be < 0. Found ${e[t]} at dim `+t);if(-1===r){if(0<t&&t!==n)throw Error(`Size(${t}) must match the product of shape `+e);return e}if(0===n)throw Error(`Cannot infer the missing size in [${e}] when there are 0 elements`);if(t%n!=0)throw Error(`The implicit shape can't be a fractional number. Got ${t} / `+n);const i=e.slice();return i[r]=t/n,i}function E(e,t){const n=t.length;return h((e=null==e?t.map((e,t)=>t):[].concat(e)).every(e=>e>=-n&&e<n),()=>`All values in axis param must be in range [-${n}, ${n}) but got axis `+e),h(e.every(e=>v(e)),()=>"All values in axis param must be integers but got axis "+e),e.map(e=>e<0?n+e:e)}function S(e,t){const n=[],r=[];var i=null!=t&&Array.isArray(t)&&0===t.length,o=null==t||i?null:E(t,e).sort();let a=0;for(let t=0;t<e.length;++t){if(null!=o){if(o[a]===t&&1!==e[t])throw new Error(`Can't squeeze axis ${t} since its dim '${e[t]}' is not 1`);(null==o[a]||o[a]>t)&&1===e[t]&&(n.push(e[t]),r.push(t)),o[a]<=t&&a++}1!==e[t]&&(n.push(e[t]),r.push(t))}return{newShape:n,keptDims:r}}function _(e,t){let n=null;if(null==e||"float32"===e)n=new Float32Array(t);else if("int32"===e)n=new Int32Array(t);else{if("bool"!==e)throw new Error("Unknown data type "+e);n=new Uint8Array(t)}return n}function O(e,t){let n=null;if(null==e||"float32"===e)n=new Float32Array(t);else if("int32"===e)n=new Int32Array(t);else if("bool"===e)n=new Uint8Array(t);else{if("string"!==e)throw new Error("Unknown data type "+e);n=new Array(t)}return n}function T(e,t){for(let r=0;r<e.length;r++){var n=e[r];if(isNaN(n)||!isFinite(n))throw Error(`A tensor of type ${t} being uploaded contains ${n}.`)}}function D(e){return"bool"===e||"complex64"===e||"float32"===e||"int32"===e||"string"===e}function B(e,t){return!("complex64"===t||"float32"===t&&"complex64"!==e||"int32"===t&&"float32"!==e&&"complex64"!==e||"bool"===t&&"bool"===e)}function I(e){return e instanceof Float32Array||e instanceof Int32Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray}function M(e){if("float32"===e||"int32"===e)return 4;if("complex64"===e)return 8;if("bool"===e)return 1;throw new Error("Unknown dtype "+e)}function j(e){if(null==e)return 0;let t=0;return e.forEach(e=>t+=e.length),t}function N(e){return"string"==typeof e||e instanceof String}function F(e){return"boolean"==typeof e}function R(e){return"number"==typeof e}function P(e){return Array.isArray(e)?P(e[0]):e instanceof Float32Array?"float32":e instanceof Int32Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray?"int32":R(e)?"float32":N(e)?"string":F(e)?"bool":"float32"}function L(e){return!!(e&&e.constructor&&e.call&&e.apply)}function U(e,t){for(let n=t;n<e;++n)if(e%n==0)return n;return e}function z(e){var t=e.length;if(t<2)return[];const n=new Array(t-1);n[t-2]=e[t-1];for(let r=t-3;0<=r;--r)n[r]=n[r+1]*e[r+1];return n}function H(e,t,n=!1){if(0===e.length)return t[0];var r=e.reduce((e,t)=>e*t)*(n?2:1);if(0==r)return[];if(r!==t.length)throw new Error(`[${e}] does not match the input size ${t.length}${n?" for a complex tensor":""}.`);return function e(t,n,r,i=!1){const o=new Array;if(1===n.length){var a=n[0]*(i?2:1);for(let e=0;e<a;e++)o[e]=r[t+e]}else{var s=n[0];const a=n.slice(1);var u=a.reduce((e,t)=>e*t)*(i?2:1);for(let n=0;n<s;n++)o[n]=e(t+n*u,a,r,i)}return o}(0,e,t,n)}function $(e,t){const n=Q(e,t);for(let e=0;e<n.length;e++)n[e]=1;return n}function Q(e,t){if(null==t||"float32"===t||"complex64"===t)return new Float32Array(e);if("int32"===t)return new Int32Array(e);if("bool"===t)return new Uint8Array(e);throw new Error("Unknown data type "+t)}function V(e,t){var n=e.reduce((e,t)=>e*t,1);if(null==t||"float32"===t)return H(e,new Float32Array(n));if("int32"===t)return H(e,new Int32Array(n));if("bool"===t)return H(e,new Uint8Array(n));throw new Error("Unknown data type "+t)}function q(e){e.forEach(t=>{h(Number.isInteger(t)&&0<=t,()=>`Tensor must have a shape comprised of positive integers but got shape [${e}].`)})}function G(e,t,n){if(0===t)return 0;if(1===t)return e[0];let r=e[e.length-1];for(let t=0;t<e.length-1;++t)r+=n[t]*e[t];return r}function W(e,t,n){if(0===t)return[];if(1===t)return[e];const r=new Array(t);for(let t=0;t<r.length-1;++t)r[t]=Math.floor(e/n[t]),e-=r[t]*n[t];return r[r.length-1]=e,r}function K(e){return e&&e.then&&"function"==typeof e.then}n.d(t,"M",(function(){return r})),n.d(t,"N",(function(){return i})),n.d(t,"i",(function(){return o})),n.d(t,"H",(function(){return a})),n.d(t,"S",(function(){return s})),n.d(t,"R",(function(){return u})),n.d(t,"J",(function(){return c})),n.d(t,"l",(function(){return l})),n.d(t,"b",(function(){return h})),n.d(t,"e",(function(){return f})),n.d(t,"d",(function(){return d})),n.d(t,"m",(function(){return p})),n.d(t,"O",(function(){return m})),n.d(t,"y",(function(){return g})),n.d(t,"a",(function(){return A})),n.d(t,"v",(function(){return v})),n.d(t,"T",(function(){return b})),n.d(t,"P",(function(){return y})),n.d(t,"k",(function(){return w})),n.d(t,"L",(function(){return x})),n.d(t,"K",(function(){return C})),n.d(t,"s",(function(){return k})),n.d(t,"I",(function(){return E})),n.d(t,"Q",(function(){return S})),n.d(t,"o",(function(){return _})),n.d(t,"n",(function(){return O})),n.d(t,"h",(function(){return T})),n.d(t,"B",(function(){return D})),n.d(t,"p",(function(){return B})),n.d(t,"A",(function(){return I})),n.d(t,"g",(function(){return M})),n.d(t,"f",(function(){return j})),n.d(t,"z",(function(){return N})),n.d(t,"t",(function(){return F})),n.d(t,"w",(function(){return R})),n.d(t,"r",(function(){return P})),n.d(t,"u",(function(){return L})),n.d(t,"G",(function(){return U})),n.d(t,"j",(function(){return z})),n.d(t,"U",(function(){return H})),n.d(t,"D",(function(){return $})),n.d(t,"F",(function(){return Q})),n.d(t,"E",(function(){return V})),n.d(t,"c",(function(){return q})),n.d(t,"C",(function(){return G})),n.d(t,"q",(function(){return W})),n.d(t,"x",(function(){return K}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(6),i=n(4),o=n(28),a=n(3);t=n(5);const s=Object(t.b)({mul_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t){return e=Object(a.a)(e,"a","mul"),t=Object(a.a)(t,"b","mul"),[e,t]=Object(o.makeTypesMatch)(e,t),e={a:e,b:t},r.a.runKernel(i.Zb,e)}})},function(e,t,n){"use strict";n.r(t);var r=n(24),i=n(10),o=n(225);
/**
 * @license
 * Copyright 2021 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */const a=n.n(o).a||o;function s(e){return a.fromString(e,!0,16)}const u=s("c3a5c85c97cb3127"),c=s("b492b66fbe98f273"),l=s("9ae16a3b2f90404f");function h(e){return e.xor(e.shru(47))}function f(e,t,n){return e=e.slice(t,t+n),a.fromBytes(Array.from(e),!0,!0)}function d(e,t){return f(e,t,8)}function p(e,t){return f(e,t,4)}function m(e,t){return 0===t?e:e.shru(t).or(e.shl(64-t))}function g(e,t,n=s("9ddfea08eb382d69")){let r=e.xor(t).mul(n),i=(r=r.xor(r.shru(47)),t.xor(r).mul(n));return(i=i.xor(i.shru(47))).mul(n)}function A(e,t,n,r){return i=d(e,t),o=d(e,t+8),a=d(e,t+16),e=d(e,t+24),t=r,r=(r=n).add(i),t=m(t.add(r).add(e),21),r=(r=(i=r).add(o)).add(a),t=t.add(m(r,44)),[r.add(e),t.add(i)];var i,o,a}function v(e,t=e.length){var n,r;if(8<=t)return r=l.add(2*t),i=d(e,0).add(l),g(m(n=d(e,t-8),37).mul(r).add(i),m(i,25).add(n).mul(r),r);if(4<=t){var i=l.add(2*t);return g(p(e,0).shl(3).add(t),p(e,t-4),i)}return 0<t?(n=e[0]+(e[t>>1]<<8),r=t+(e[t-1]<<2),h(l.mul(n).xor(u.mul(r))).mul(l)):l}function b(e,t=e.length){var n=l.add(2*t);const r=d(e,0).mul(c),i=d(e,8);var o=d(e,t-8).mul(n);t=d(e,t-16).mul(l);return g(m(r.add(i),43).add(m(o,30)).add(t),r.add(m(i.add(l),18)).add(o),n)}function y(e,t=e.length){const n=a.fromNumber(81,!0);if(t<=32)return(t<=16?v:b)(e,t);if(t<=64)return function(e,t=e.length){var n=l.add(2*t);const r=d(e,0).mul(l),i=d(e,8);var o=d(e,t-8).mul(n),a=d(e,t-16).mul(l);const s=m(r.add(i),43).add(m(o,30)).add(a),u=g(s,r.add(m(i.add(l),18)).add(o),n),c=d(e,16).mul(n),h=d(e,24);return a=s.add(d(e,t-32)).mul(n),o=u.add(d(e,t-24)).mul(n),g(m(c.add(h),43).add(m(a,30)).add(o),c.add(m(h.add(r),18)).add(a),n)}(e,t);let r=n,i=n.mul(c).add(113),o=h(i.mul(l).add(113)).mul(l),s=[a.UZERO,a.UZERO],f=[a.UZERO,a.UZERO],p=(r=r.mul(l).add(d(e,0)),0);for(var y=64*(t-1>>6),w=y+(t-1&63)-63;r=m(r.add(i).add(s[0]).add(d(e,p+8)),37).mul(c),i=m(i.add(s[1]).add(d(e,p+48)),42).mul(c),r=r.xor(f[1]),i=i.add(s[0]).add(d(e,p+40)),o=m(o.add(f[0]),33).mul(c),s=A(e,p,s[1].mul(c),r.add(f[0])),f=A(e,p+32,o.add(f[1]),i.add(d(e,p+16))),[o,r]=[r,o],(p+=64)!==y;);var x=c.add(o.and(255).shl(1));return p=w,f[0]=f[0].add(t-1&63),s[0]=s[0].add(f[0]),f[0]=f[0].add(s[0]),r=m(r.add(i).add(s[0]).add(d(e,p+8)),37).mul(x),i=m(i.add(s[1]).add(d(e,p+48)),42).mul(x),r=r.xor(f[1].mul(9)),i=i.add(s[0].mul(9).add(d(e,p+40))),o=m(o.add(f[0]),33).mul(x),s=A(e,p,s[1].mul(x),r.add(f[0])),f=A(e,p+32,o.add(f[1]),i.add(d(e,p+16))),[o,r]=[r,o],g(g(s[0],f[0],x).add(h(i).mul(u)).add(o),g(s[1],f[1],x).add(r),x)}
/**
 * @license
 * Copyright 2017 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function w(e,t){return"string"===t?E(e):x([e],t)}function x(e,t){if("string"===t)throw new Error("Cannot convert a string[] to a TypedArray");if(Array.isArray(e)&&(e=i.m(e)),Object(r.c)().getBool("DEBUG")&&i.h(e,t),o=t,(n=e)instanceof Float32Array&&"float32"===o||n instanceof Int32Array&&"int32"===o||n instanceof Uint8Array&&"bool"===o)return e;var n,o;if(null==t||"float32"===t||"complex64"===t)return new Float32Array(e);if("int32"===t)return new Int32Array(e);if("bool"!==t)throw new Error("Unknown data type "+t);{const t=new Uint8Array(e.length);for(let n=0;n<t.length;++n)0!==Math.round(e[n])&&(t[n]=1);return t}}function C(){return Object(r.c)().platform.now()}function k(e,t){return Object(r.c)().platform.fetch(e,t)}function E(e,t="utf-8"){return t=t||"utf-8",Object(r.c)().platform.encode(e,t)}function S(e,t="utf-8"){return t=t||"utf-8",Object(r.c)().platform.decode(e,t)}n.d(t,"createScalarValue",(function(){return w})),n.d(t,"toTypedArray",(function(){return x})),n.d(t,"now",(function(){return C})),n.d(t,"fetch",(function(){return k})),n.d(t,"encodeString",(function(){return E})),n.d(t,"decodeString",(function(){return S})),n.d(t,"shuffle",(function(){return i.M})),n.d(t,"shuffleCombo",(function(){return i.N})),n.d(t,"clamp",(function(){return i.i})),n.d(t,"nearestLargerEven",(function(){return i.H})),n.d(t,"swap",(function(){return i.S})),n.d(t,"sum",(function(){return i.R})),n.d(t,"randUniform",(function(){return i.J})),n.d(t,"distSquared",(function(){return i.l})),n.d(t,"assert",(function(){return i.b})),n.d(t,"assertShapesMatch",(function(){return i.e})),n.d(t,"assertNonNull",(function(){return i.d})),n.d(t,"flatten",(function(){return i.m})),n.d(t,"sizeFromShape",(function(){return i.O})),n.d(t,"isScalarShape",(function(){return i.y})),n.d(t,"arraysEqual",(function(){return i.a})),n.d(t,"isInt",(function(){return i.v})),n.d(t,"tanh",(function(){return i.T})),n.d(t,"sizeToSquarishShape",(function(){return i.P})),n.d(t,"createShuffledIndices",(function(){return i.k})),n.d(t,"rightPad",(function(){return i.L})),n.d(t,"repeatedTry",(function(){return i.K})),n.d(t,"inferFromImplicitShape",(function(){return i.s})),n.d(t,"parseAxisParam",(function(){return i.I})),n.d(t,"squeezeShape",(function(){return i.Q})),n.d(t,"getTypedArrayFromDType",(function(){return i.o})),n.d(t,"getArrayFromDType",(function(){return i.n})),n.d(t,"checkConversionForErrors",(function(){return i.h})),n.d(t,"isValidDtype",(function(){return i.B})),n.d(t,"hasEncodingLoss",(function(){return i.p})),n.d(t,"isTypedArray",(function(){return i.A})),n.d(t,"bytesPerElement",(function(){return i.g})),n.d(t,"bytesFromStringArray",(function(){return i.f})),n.d(t,"isString",(function(){return i.z})),n.d(t,"isBoolean",(function(){return i.t})),n.d(t,"isNumber",(function(){return i.w})),n.d(t,"inferDtype",(function(){return i.r})),n.d(t,"isFunction",(function(){return i.u})),n.d(t,"nearestDivisor",(function(){return i.G})),n.d(t,"computeStrides",(function(){return i.j})),n.d(t,"toNestedArray",(function(){return i.U})),n.d(t,"makeOnesTypedArray",(function(){return i.D})),n.d(t,"makeZerosTypedArray",(function(){return i.F})),n.d(t,"makeZerosNestedTypedArray",(function(){return i.E})),n.d(t,"assertNonNegativeIntegerDimensions",(function(){return i.c})),n.d(t,"locToIndex",(function(){return i.C})),n.d(t,"indexToLoc",(function(){return i.q})),n.d(t,"isPromise",(function(){return i.x})),n.d(t,"hexToLong",(function(){return s})),n.d(t,"fingerPrint64",(function(){return y}))},function(e,t,n){"use strict";(function(e){var r,i=n(216);const o=Object.prototype.toString,a=Object.getPrototypeOf,s=(r=Object.create(null),e=>{const t=o.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())});var u=e=>(e=e.toLowerCase(),t=>s(t)===e),c=e=>t=>typeof t===e;const l=Array.isArray,h=c("undefined"),f=u("ArrayBuffer");var d=c("string");const p=c("function"),m=c("number"),g=e=>null!==e&&"object"==typeof e,A=e=>{var t;return"object"===s(e)&&!(null!==(t=a(e))&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)};c=u("Date");var v=u("File"),b=u("Blob"),y=u("FileList"),w=u("URLSearchParams");function x(e,t,{allOwnKeys:n=!1}={}){if(null!=e){let s;var r;if("object"!=typeof e&&(e=[e]),l(e))for(s=0,r=e.length;s<r;s++)t.call(null,e[s],s,e);else{var i,o=n?Object.getOwnPropertyNames(e):Object.keys(e),a=o.length;for(s=0;s<a;s++)i=o[s],t.call(null,e[i],i,e)}}}function C(e,t){t=t.toLowerCase();var n=Object.keys(e);let r,i=n.length;for(;0<i--;)if(t===(r=n[i]).toLowerCase())return r;return null}const k="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:e,E=e=>!h(e)&&e!==k;S="undefined"!=typeof Uint8Array&&a(Uint8Array);e=e=>S&&e instanceof S;var S,_,O=u("HTMLFormElement"),T=(_=Object.prototype.hasOwnProperty,(e,t)=>_.call(e,t)),D=u("RegExp");const B=(e,t)=>{var n=Object.getOwnPropertyDescriptors(e);const r={};x(n,(n,i)=>{!1!==t(n,i,e)&&(r[i]=n)}),Object.defineProperties(e,r)};var I="abcdefghijklmnopqrstuvwxyz",M="0123456789";const j={DIGIT:M,ALPHA:I,ALPHA_DIGIT:I+I.toUpperCase()+M};t.a={isArray:l,isArrayBuffer:f,isBuffer:function(e){return null!==e&&!h(e)&&null!==e.constructor&&!h(e.constructor)&&p(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{var t="[object FormData]";return e&&("function"==typeof FormData&&e instanceof FormData||o.call(e)===t||p(e.toString)&&e.toString()===t)},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&f(e.buffer)},isString:d,isNumber:m,isBoolean:e=>!0===e||!1===e,isObject:g,isPlainObject:A,isUndefined:h,isDate:c,isFile:v,isBlob:b,isRegExp:D,isFunction:p,isStream:e=>g(e)&&p(e.pipe),isURLSearchParams:w,isTypedArray:e,isFileList:y,forEach:x,merge:function e(){const t=(E(this)&&this||{}).caseless,n={};var r=(r,i)=>{i=t&&C(n,i)||i,A(n[i])&&A(r)?n[i]=e(n[i],r):A(r)?n[i]=e({},r):l(r)?n[i]=r.slice():n[i]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&x(arguments[e],r);return n},extend:(e,t,n,{allOwnKeys:r}={})=>(x(t,(t,r)=>{n&&p(t)?e[r]=Object(i.a)(t,n):e[r]=t},{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>65279===e.charCodeAt(0)?e.slice(1):e,inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{var i,o;let s;const u={};if(t=t||{},null!=e)do{for(s=(i=Object.getOwnPropertyNames(e)).length;0<s--;)o=i[s],r&&!r(o,e,t)||u[o]||(t[o]=e[o],u[o]=!0)}while((e=!1!==n&&a(e))&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:s,kindOfTest:u,endsWith:(e,t,n)=>(e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length,-1!==(e=e.indexOf(t,n))&&e===n),toArray:e=>{if(!e)return null;if(l(e))return e;let t=e.length;if(!m(t))return null;const n=new Array(t);for(;0<t--;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);for(;(r=n.next())&&!r.done;){var r=r.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{var n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:O,hasOwnProperty:T,hasOwnProp:T,reduceDescriptors:B,freezeMethods:e=>{B(e,(t,n)=>{if(p(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;var r=e[n];p(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={};var r=e=>{e.forEach(e=>{n[e]=!0})};return l(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:C,global:k,isContextDefined:E,ALPHABET:j,generateString:(e=16,t=j.ALPHA_DIGIT)=>{let n="";for(var r=t.length;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&p(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(g(e)){if(0<=t.indexOf(e))return;if(!("toJSON"in e)){t[r]=e;const i=l(e)?[]:{};return x(e,(e,t)=>{e=n(e,r+1),h(e)||(i[t]=e)}),t[r]=void 0,i}}return e};return n(e,0)}}}).call(this,n(67))},function(e,t,n){"use strict";function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(e,t)||function(e,t){var n;if(e)return"string"==typeof e?i(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"d",(function(){return a})),n.d(t,"c",(function(){return s})),n.d(t,"b",(function(){return u})),n.d(t,"e",(function(){return c})),n.d(t,"a",(function(){return l})),n(230);var o=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"];function a(e){for(var t="",n=e;n>=o.length;)n/=o.length,--n,t+=o[parseInt(n,10)%o.length];return t+o[e%=o.length]}function s(e){for(var t=0,n=0;n!==e.length;++n)t=26*t+e.charCodeAt(n)-64;return t-1}function u(e){var t="",n="";try{for(var r=0;r<e.length;r+=1)"0"<=e.charAt(r)&&e.charAt(r)<="9"?n+=e.charAt(r):t+=e.charAt(r)}catch(e){}return[s(t),parseInt(n,10)-1]}function c(e,t){return"".concat(a(e)).concat(t+1)}function l(e,t,n,i,o){var a,s=(e=r(u(e=e.toUpperCase()),2))[0];e=e[1];return(a=i?i(o,s,e,t,n):a)||c(s+t,e+n)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(6),i=n(4),o=n(3),a=n(10);t=n(5);const s=Object(t.b)({cast_:
/**
 * @license
 * Copyright 2020 Google Inc. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t){if(e=Object(o.a)(e,"x","cast"),!a.B(t))throw new Error("Failed to cast to unknown dtype "+t);if("string"===t&&"string"!==e.dtype||"string"!==t&&"string"===e.dtype)throw new Error("Only strings can be casted to strings");return r.a.runKernel(i.x,{x:e},{dtype:t})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(6),i=n(4),o=n(28),a=n(3);t=n(5);const s=Object(t.b)({add_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t){return e=Object(a.a)(e,"a","add"),t=Object(a.a)(t,"b","add"),[e,t]=Object(o.makeTypesMatch)(e,t),e={a:e,b:t},r.a.runKernel(i.d,e)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(6),i=n(4),o=n(28),a=n(3);t=n(5);const s=Object(t.b)({sub_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t){return e=Object(a.a)(e,"a","sub"),t=Object(a.a)(t,"b","sub"),[e,t]=Object(o.makeTypesMatch)(e,t),e={a:e,b:t},r.a.runKernel(i.fd,e)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(6),i=n(4),o=n(28),a=n(3),s=n(133);t=n(5);const u=Object(t.b)({div_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t){return e=Object(a.a)(e,"a","div"),t=Object(a.a)(t,"b","div"),[e,t]=Object(o.makeTypesMatch)(e,t),"int32"===e.dtype&&"int32"===t.dtype?Object(s.a)(e,t):r.a.runKernel(i.sc,{a:e,b:t},{})}})},function(e,t,n){e.exports=function(){var e=function(e,t){var n=Array.prototype.concat,r=Array.prototype.slice,i=Object.prototype.toString;function o(t,n){var r=t>n?t:n;return e.pow(10,17-~~(e.log(r>0?r:-r)*e.LOG10E))}var a=Array.isArray||function(e){return"[object Array]"===i.call(e)};function s(e){return"[object Function]"===i.call(e)}function u(e){return"number"==typeof e&&e-e==0}function c(){return new c._init(arguments)}function l(){return 0}function h(){return 1}function f(e,t){return e===t?1:0}c.fn=c.prototype,c._init=function(e){if(a(e[0]))if(a(e[0][0])){s(e[1])&&(e[0]=c.map(e[0],e[1]));for(var t=0;t<e[0].length;t++)this[t]=e[0][t];this.length=e[0].length}else this[0]=s(e[1])?c.map(e[0],e[1]):e[0],this.length=1;else if(u(e[0]))this[0]=c.seq.apply(null,e),this.length=1;else{if(e[0]instanceof c)return c(e[0].toArray());this[0]=[],this.length=1}return this},c._init.prototype=c.prototype,c._init.constructor=c,c.utils={calcRdx:o,isArray:a,isFunction:s,isNumber:u,toVector:function(e){return n.apply([],e)}},c._random_fn=e.random,c.setRandom=function(e){if("function"!=typeof e)throw new TypeError("fn is not a function");c._random_fn=e},c.extend=function(e){var t,n;if(1===arguments.length){for(n in e)c[n]=e[n];return this}for(t=1;t<arguments.length;t++)for(n in arguments[t])e[n]=arguments[t][n];return e},c.rows=function(e){return e.length||1},c.cols=function(e){return e[0].length||1},c.dimensions=function(e){return{rows:c.rows(e),cols:c.cols(e)}},c.row=function(e,t){return a(t)?t.map((function(t){return c.row(e,t)})):e[t]},c.rowa=function(e,t){return c.row(e,t)},c.col=function(e,t){if(a(t)){var n=c.arange(e.length).map((function(){return new Array(t.length)}));return t.forEach((function(t,r){c.arange(e.length).forEach((function(i){n[i][r]=e[i][t]}))})),n}for(var r=new Array(e.length),i=0;i<e.length;i++)r[i]=[e[i][t]];return r},c.cola=function(e,t){return c.col(e,t).map((function(e){return e[0]}))},c.diag=function(e){for(var t=c.rows(e),n=new Array(t),r=0;r<t;r++)n[r]=[e[r][r]];return n},c.antidiag=function(e){for(var t=c.rows(e)-1,n=new Array(t),r=0;t>=0;t--,r++)n[r]=[e[r][t]];return n},c.transpose=function(e){var t,n,r,i,o,s=[];for(a(e[0])||(e=[e]),n=e.length,r=e[0].length,o=0;o<r;o++){for(t=new Array(n),i=0;i<n;i++)t[i]=e[i][o];s.push(t)}return 1===s.length?s[0]:s},c.map=function(e,t,n){var r,i,o,s,u;for(a(e[0])||(e=[e]),i=e.length,o=e[0].length,s=n?e:new Array(i),r=0;r<i;r++)for(s[r]||(s[r]=new Array(o)),u=0;u<o;u++)s[r][u]=t(e[r][u],r,u);return 1===s.length?s[0]:s},c.cumreduce=function(e,t,n){var r,i,o,s,u;for(a(e[0])||(e=[e]),i=e.length,o=e[0].length,s=n?e:new Array(i),r=0;r<i;r++)for(s[r]||(s[r]=new Array(o)),o>0&&(s[r][0]=e[r][0]),u=1;u<o;u++)s[r][u]=t(s[r][u-1],e[r][u]);return 1===s.length?s[0]:s},c.alter=function(e,t){return c.map(e,t,!0)},c.create=function(e,t,n){var r,i,o=new Array(e);for(s(t)&&(n=t,t=e),r=0;r<e;r++)for(o[r]=new Array(t),i=0;i<t;i++)o[r][i]=n(r,i);return o},c.zeros=function(e,t){return u(t)||(t=e),c.create(e,t,l)},c.ones=function(e,t){return u(t)||(t=e),c.create(e,t,h)},c.rand=function(e,t){return u(t)||(t=e),c.create(e,t,c._random_fn)},c.identity=function(e,t){return u(t)||(t=e),c.create(e,t,f)},c.symmetric=function(e){var t,n,r=e.length;if(e.length!==e[0].length)return!1;for(t=0;t<r;t++)for(n=0;n<r;n++)if(e[n][t]!==e[t][n])return!1;return!0},c.clear=function(e){return c.alter(e,l)},c.seq=function(e,t,n,r){s(r)||(r=!1);var i,a=[],u=o(e,t),c=(t*u-e*u)/((n-1)*u),l=e;for(i=0;l<=t&&i<n;l=(e*u+c*u*++i)/u)a.push(r?r(l,i):l);return a},c.arange=function(e,n,r){var i,o=[];if(r=r||1,n===t&&(n=e,e=0),e===n||0===r)return[];if(e<n&&r<0)return[];if(e>n&&r>0)return[];if(r>0)for(i=e;i<n;i+=r)o.push(i);else for(i=e;i>n;i+=r)o.push(i);return o},c.slice=function(){function e(e,n,r,i){var o,a=[],s=e.length;if(n===t&&r===t&&i===t)return c.copy(e);if(i=i||1,(n=(n=n||0)>=0?n:s+n)===(r=(r=r||e.length)>=0?r:s+r)||0===i)return[];if(n<r&&i<0)return[];if(n>r&&i>0)return[];if(i>0)for(o=n;o<r;o+=i)a.push(e[o]);else for(o=n;o>r;o+=i)a.push(e[o]);return a}return function(t,n){var r,i;return u((n=n||{}).row)?u(n.col)?t[n.row][n.col]:e(c.rowa(t,n.row),(r=n.col||{}).start,r.end,r.step):u(n.col)?e(c.cola(t,n.col),(i=n.row||{}).start,i.end,i.step):(i=n.row||{},r=n.col||{},e(t,i.start,i.end,i.step).map((function(t){return e(t,r.start,r.end,r.step)})))}}(),c.sliceAssign=function(n,r,i){var o,a;if(u(r.row)){if(u(r.col))return n[r.row][r.col]=i;r.col=r.col||{},r.col.start=r.col.start||0,r.col.end=r.col.end||n[0].length,r.col.step=r.col.step||1,o=c.arange(r.col.start,e.min(n.length,r.col.end),r.col.step);var s=r.row;return o.forEach((function(e,t){n[s][e]=i[t]})),n}if(u(r.col)){r.row=r.row||{},r.row.start=r.row.start||0,r.row.end=r.row.end||n.length,r.row.step=r.row.step||1,a=c.arange(r.row.start,e.min(n[0].length,r.row.end),r.row.step);var l=r.col;return a.forEach((function(e,t){n[e][l]=i[t]})),n}return i[0].length===t&&(i=[i]),r.row.start=r.row.start||0,r.row.end=r.row.end||n.length,r.row.step=r.row.step||1,r.col.start=r.col.start||0,r.col.end=r.col.end||n[0].length,r.col.step=r.col.step||1,a=c.arange(r.row.start,e.min(n.length,r.row.end),r.row.step),o=c.arange(r.col.start,e.min(n[0].length,r.col.end),r.col.step),a.forEach((function(e,t){o.forEach((function(r,o){n[e][r]=i[t][o]}))})),n},c.diagonal=function(e){var t=c.zeros(e.length,e.length);return e.forEach((function(e,n){t[n][n]=e})),t},c.copy=function(e){return e.map((function(e){return u(e)?e:e.map((function(e){return e}))}))};var d=c.prototype;return d.length=0,d.push=Array.prototype.push,d.sort=Array.prototype.sort,d.splice=Array.prototype.splice,d.slice=Array.prototype.slice,d.toArray=function(){return this.length>1?r.call(this):r.call(this)[0]},d.map=function(e,t){return c(c.map(this,e,t))},d.cumreduce=function(e,t){return c(c.cumreduce(this,e,t))},d.alter=function(e){return c.alter(this,e),this},function(e){for(var t=0;t<e.length;t++)!function(e){d[e]=function(t){var n,r=this;return t?(setTimeout((function(){t.call(r,d[e].call(r))})),this):(n=c[e](this),a(n)?c(n):n)}}(e[t])}("transpose clear symmetric rows cols dimensions diag antidiag".split(" ")),function(e){for(var t=0;t<e.length;t++)!function(e){d[e]=function(t,n){var r=this;return n?(setTimeout((function(){n.call(r,d[e].call(r,t))})),this):c(c[e](this,t))}}(e[t])}("row col".split(" ")),function(e){for(var t=0;t<e.length;t++)!function(e){d[e]=function(){return c(c[e].apply(null,arguments))}}(e[t])}("create zeros ones rand identity".split(" ")),c}(Math),t=e,n=Math,r=t.utils.isFunction;function i(e,t){return e-t}function o(e,t,r){return n.max(t,n.min(e,r))}t.sum=function(e){for(var t=0,n=e.length;--n>=0;)t+=e[n];return t},t.sumsqrd=function(e){for(var t=0,n=e.length;--n>=0;)t+=e[n]*e[n];return t},t.sumsqerr=function(e){for(var n,r=t.mean(e),i=0,o=e.length;--o>=0;)i+=(n=e[o]-r)*n;return i},t.sumrow=function(e){for(var t=0,n=e.length;--n>=0;)t+=e[n];return t},t.product=function(e){for(var t=1,n=e.length;--n>=0;)t*=e[n];return t},t.min=function(e){for(var t=e[0],n=0;++n<e.length;)e[n]<t&&(t=e[n]);return t},t.max=function(e){for(var t=e[0],n=0;++n<e.length;)e[n]>t&&(t=e[n]);return t},t.unique=function(e){for(var t={},n=[],r=0;r<e.length;r++)t[e[r]]||(t[e[r]]=!0,n.push(e[r]));return n},t.mean=function(e){return t.sum(e)/e.length},t.meansqerr=function(e){return t.sumsqerr(e)/e.length},t.geomean=function(e){var r=e.map(n.log),i=t.mean(r);return n.exp(i)},t.median=function(e){var t=e.length,n=e.slice().sort(i);return 1&t?n[t/2|0]:(n[t/2-1]+n[t/2])/2},t.cumsum=function(e){return t.cumreduce(e,(function(e,t){return e+t}))},t.cumprod=function(e){return t.cumreduce(e,(function(e,t){return e*t}))},t.diff=function(e){var t,n=[],r=e.length;for(t=1;t<r;t++)n.push(e[t]-e[t-1]);return n},t.rank=function(e){var t,n=[],r={};for(t=0;t<e.length;t++){r[u=e[t]]?r[u]++:(r[u]=1,n.push(u))}var o=n.sort(i),a={},s=1;for(t=0;t<o.length;t++){var u,c=r[u=o[t]],l=(s+(s+c-1))/2;a[u]=l,s+=c}return e.map((function(e){return a[e]}))},t.mode=function(e){var t,n=e.length,r=e.slice().sort(i),o=1,a=0,s=0,u=[];for(t=0;t<n;t++)r[t]===r[t+1]?o++:(o>a?(u=[r[t]],a=o,s=0):o===a&&(u.push(r[t]),s++),o=1);return 0===s?u[0]:u},t.range=function(e){return t.max(e)-t.min(e)},t.variance=function(e,n){return t.sumsqerr(e)/(e.length-(n?1:0))},t.pooledvariance=function(e){return e.reduce((function(e,n){return e+t.sumsqerr(n)}),0)/(e.reduce((function(e,t){return e+t.length}),0)-e.length)},t.deviation=function(e){for(var n=t.mean(e),r=e.length,i=new Array(r),o=0;o<r;o++)i[o]=e[o]-n;return i},t.stdev=function(e,r){return n.sqrt(t.variance(e,r))},t.pooledstdev=function(e){return n.sqrt(t.pooledvariance(e))},t.meandev=function(e){for(var r=t.mean(e),i=[],o=e.length-1;o>=0;o--)i.push(n.abs(e[o]-r));return t.mean(i)},t.meddev=function(e){for(var r=t.median(e),i=[],o=e.length-1;o>=0;o--)i.push(n.abs(e[o]-r));return t.median(i)},t.coeffvar=function(e){return t.stdev(e)/t.mean(e)},t.quartiles=function(e){var t=e.length,r=e.slice().sort(i);return[r[n.round(t/4)-1],r[n.round(t/2)-1],r[n.round(3*t/4)-1]]},t.quantiles=function(e,t,r,a){var s,u,c,l,h,f=e.slice().sort(i),d=[t.length],p=e.length;for(void 0===r&&(r=3/8),void 0===a&&(a=3/8),s=0;s<t.length;s++)c=p*(u=t[s])+(r+u*(1-r-a)),l=n.floor(o(c,1,p-1)),h=o(c-l,0,1),d[s]=(1-h)*f[l-1]+h*f[l];return d},t.percentile=function(e,t,n){var r=e.slice().sort(i),o=t*(r.length+(n?1:-1))+(n?0:1),a=parseInt(o),s=o-a;return a+1<r.length?r[a-1]+s*(r[a]-r[a-1]):r[a-1]},t.percentileOfScore=function(e,t,n){var r,i,o=0,a=e.length,s=!1;for("strict"===n&&(s=!0),i=0;i<a;i++)r=e[i],(s&&r<t||!s&&r<=t)&&o++;return o/a},t.histogram=function(e,r){r=r||4;var i,o=t.min(e),a=(t.max(e)-o)/r,s=e.length,u=[];for(i=0;i<r;i++)u[i]=0;for(i=0;i<s;i++)u[n.min(n.floor((e[i]-o)/a),r-1)]+=1;return u},t.covariance=function(e,n){var r,i=t.mean(e),o=t.mean(n),a=e.length,s=new Array(a);for(r=0;r<a;r++)s[r]=(e[r]-i)*(n[r]-o);return t.sum(s)/(a-1)},t.corrcoeff=function(e,n){return t.covariance(e,n)/t.stdev(e,1)/t.stdev(n,1)},t.spearmancoeff=function(e,n){return e=t.rank(e),n=t.rank(n),t.corrcoeff(e,n)},t.stanMoment=function(e,r){for(var i=t.mean(e),o=t.stdev(e),a=e.length,s=0,u=0;u<a;u++)s+=n.pow((e[u]-i)/o,r);return s/e.length},t.skewness=function(e){return t.stanMoment(e,3)},t.kurtosis=function(e){return t.stanMoment(e,4)-3};for(var a=t.prototype,s="cumsum cumprod".split(" "),u=0;u<s.length;u++)!function(e){a[e]=function(n,i){var o=[],s=0,u=this;if(r(n)&&(i=n,n=!1),i)return setTimeout((function(){i.call(u,a[e].call(u,n))})),this;if(this.length>1){for(u=!0===n?this:this.transpose();s<u.length;s++)o[s]=t[e](u[s]);return o}return t[e](this[0],n)}}(s[u]);for(var c="sum sumsqrd sumsqerr sumrow product min max unique mean meansqerr geomean median diff rank mode range variance deviation stdev meandev meddev coeffvar quartiles histogram skewness kurtosis".split(" "),l=0;l<c.length;l++)!function(e){a[e]=function(n,i){var o=[],s=0,u=this;if(r(n)&&(i=n,n=!1),i)return setTimeout((function(){i.call(u,a[e].call(u,n))})),this;if(this.length>1){for("sumrow"!==e&&(u=!0===n?this:this.transpose());s<u.length;s++)o[s]=t[e](u[s]);return!0===n?t[e](t.utils.toVector(o)):o}return t[e](this[0],n)}}(c[l]);for(var h="quantiles percentileOfScore".split(" "),f=0;f<h.length;f++)!function(e){a[e]=function(){var n,i=[],o=0,s=this,u=Array.prototype.slice.call(arguments);if(r(u[u.length-1])){n=u[u.length-1];var c=u.slice(0,u.length-1);return setTimeout((function(){n.call(s,a[e].apply(s,c))})),this}n=void 0;var l=function(n){return t[e].apply(s,[n].concat(u))};if(this.length>1){for(s=s.transpose();o<s.length;o++)i[o]=l(s[o]);return i}return l(this[0])}}(h[f]);for(var d=e,p=Math,m=(d.gammaln=function(e){var t,n,r,i=0,o=[76.18009172947146,-86.50532032941678,24.01409824083091,-1.231739572450155,.001208650973866179,-5395239384953e-18],a=1.000000000190015;for(r=(n=t=e)+5.5,r-=(t+.5)*p.log(r);i<6;i++)a+=o[i]/++n;return p.log(2.5066282746310007*a/t)-r},d.loggam=function(e){var t,n,r,i,o,a,s,u=[.08333333333333333,-.002777777777777778,.0007936507936507937,-.0005952380952380952,.0008417508417508418,-.001917526917526918,.00641025641025641,-.02955065359477124,.1796443723688307,-1.3924322169059];if(t=e,s=0,1==e||2==e)return 0;for(e<=7&&(t=e+(s=p.floor(7-e))),n=1/(t*t),r=2*p.PI,o=u[9],a=8;a>=0;a--)o*=n,o+=u[a];if(i=o/t+.5*p.log(r)+(t-.5)*p.log(t)-t,e<=7)for(a=1;a<=s;a++)i-=p.log(t-1),t-=1;return i},d.gammafn=function(e){var t,n,r,i,o=[-1.716185138865495,24.76565080557592,-379.80425647094563,629.3311553128184,866.9662027904133,-31451.272968848367,-36144.413418691176,66456.14382024054],a=[-30.8402300119739,315.35062697960416,-1015.1563674902192,-3107.771671572311,22538.11842098015,4755.846277527881,-134659.9598649693,-115132.2596755535],s=!1,u=0,c=0,l=0,h=e;if(e>171.6243769536076)return 1/0;if(h<=0){if(!(i=h%1+36e-17))return 1/0;s=(1&h?-1:1)*p.PI/p.sin(p.PI*i),h=1-h}for(r=h,n=h<1?h++:(h-=u=(0|h)-1)-1,t=0;t<8;++t)l=(l+o[t])*n,c=c*n+a[t];if(i=l/c+1,r<h)i/=r;else if(r>h)for(t=0;t<u;++t)i*=h,h++;return s&&(i=s/i),i},d.gammap=function(e,t){return d.lowRegGamma(e,t)*d.gammafn(e)},d.lowRegGamma=function(e,t){var n,r=d.gammaln(e),i=e,o=1/e,a=o,s=t+1-e,u=1/1e-30,c=1/s,l=c,h=1,f=-~(8.5*p.log(e>=1?e:1/e)+.4*e+17);if(t<0||e<=0)return NaN;if(t<e+1){for(;h<=f;h++)o+=a*=t/++i;return o*p.exp(-t+e*p.log(t)-r)}for(;h<=f;h++)l*=(c=1/(c=(n=-h*(h-e))*c+(s+=2)))*(u=s+n/u);return 1-l*p.exp(-t+e*p.log(t)-r)},d.factorialln=function(e){return e<0?NaN:d.gammaln(e+1)},d.factorial=function(e){return e<0?NaN:d.gammafn(e+1)},d.combination=function(e,t){return e>170||t>170?p.exp(d.combinationln(e,t)):d.factorial(e)/d.factorial(t)/d.factorial(e-t)},d.combinationln=function(e,t){return d.factorialln(e)-d.factorialln(t)-d.factorialln(e-t)},d.permutation=function(e,t){return d.factorial(e)/d.factorial(e-t)},d.betafn=function(e,t){if(!(e<=0||t<=0))return e+t>170?p.exp(d.betaln(e,t)):d.gammafn(e)*d.gammafn(t)/d.gammafn(e+t)},d.betaln=function(e,t){return d.gammaln(e)+d.gammaln(t)-d.gammaln(e+t)},d.betacf=function(e,t,n){var r,i,o,a,s=1e-30,u=1,c=t+n,l=t+1,h=t-1,f=1,d=1-c*e/l;for(p.abs(d)<s&&(d=s),a=d=1/d;u<=100&&(d=1+(i=u*(n-u)*e/((h+(r=2*u))*(t+r)))*d,p.abs(d)<s&&(d=s),f=1+i/f,p.abs(f)<s&&(f=s),a*=(d=1/d)*f,d=1+(i=-(t+u)*(c+u)*e/((t+r)*(l+r)))*d,p.abs(d)<s&&(d=s),f=1+i/f,p.abs(f)<s&&(f=s),a*=o=(d=1/d)*f,!(p.abs(o-1)<3e-7));u++);return a},d.gammapinv=function(e,t){var n,r,i,o,a,s,u=0,c=t-1,l=d.gammaln(t);if(e>=1)return p.max(100,t+100*p.sqrt(t));if(e<=0)return 0;for(t>1?(a=p.log(c),s=p.exp(c*(a-1)-l),o=e<.5?e:1-e,n=(2.30753+.27061*(r=p.sqrt(-2*p.log(o))))/(1+r*(.99229+.04481*r))-r,e<.5&&(n=-n),n=p.max(.001,t*p.pow(1-1/(9*t)-n/(3*p.sqrt(t)),3))):n=e<(r=1-t*(.253+.12*t))?p.pow(e/r,1/t):1-p.log(1-(e-r)/(1-r));u<12;u++){if(n<=0)return 0;if((n-=r=(i=(d.lowRegGamma(t,n)-e)/(r=t>1?s*p.exp(-(n-c)+c*(p.log(n)-a)):p.exp(-n+c*p.log(n)-l)))/(1-.5*p.min(1,i*((t-1)/n-1))))<=0&&(n=.5*(n+r)),p.abs(r)<1e-8*n)break}return n},d.erf=function(e){var t,n,r,i,o=[-1.3026537197817094,.6419697923564902,.019476473204185836,-.00956151478680863,-.000946595344482036,.000366839497852761,42523324806907e-18,-20278578112534e-18,-1624290004647e-18,130365583558e-17,1.5626441722e-8,-8.5238095915e-8,6.529054439e-9,5.059343495e-9,-9.91364156e-10,-2.27365122e-10,96467911e-18,2394038e-18,-6886027e-18,894487e-18,313092e-18,-112708e-18,381e-18,7106e-18,-1523e-18,-94e-18,121e-18,-28e-18],a=o.length-1,s=!1,u=0,c=0;for(e<0&&(e=-e,s=!0),n=4*(t=2/(2+e))-2;a>0;a--)r=u,u=n*u-c+o[a],c=r;return i=t*p.exp(-e*e+.5*(o[0]+n*u)-c),s?i-1:1-i},d.erfc=function(e){return 1-d.erf(e)},d.erfcinv=function(e){var t,n,r,i,o=0;if(e>=2)return-100;if(e<=0)return 100;for(i=e<1?e:2-e,t=-.70711*((2.30753+.27061*(r=p.sqrt(-2*p.log(i/2))))/(1+r*(.99229+.04481*r))-r);o<2;o++)t+=(n=d.erfc(t)-i)/(1.1283791670955126*p.exp(-t*t)-t*n);return e<1?t:-t},d.ibetainv=function(e,t,n){var r,i,o,a,s,u,c,l,h,f,m=t-1,g=n-1,A=0;if(e<=0)return 0;if(e>=1)return 1;for(t>=1&&n>=1?(o=e<.5?e:1-e,u=(2.30753+.27061*(a=p.sqrt(-2*p.log(o))))/(1+a*(.99229+.04481*a))-a,e<.5&&(u=-u),c=(u*u-3)/6,l=2/(1/(2*t-1)+1/(2*n-1)),h=u*p.sqrt(c+l)/l-(1/(2*n-1)-1/(2*t-1))*(c+5/6-2/(3*l)),u=t/(t+n*p.exp(2*h))):(r=p.log(t/(t+n)),i=p.log(n/(t+n)),u=e<(a=p.exp(t*r)/t)/(h=a+(s=p.exp(n*i)/n))?p.pow(t*h*e,1/t):1-p.pow(n*h*(1-e),1/n)),f=-d.gammaln(t)-d.gammaln(n)+d.gammaln(t+n);A<10;A++){if(0===u||1===u)return u;if((u-=a=(s=(d.ibeta(u,t,n)-e)/(a=p.exp(m*p.log(u)+g*p.log(1-u)+f)))/(1-.5*p.min(1,s*(m/u-g/(1-u)))))<=0&&(u=.5*(u+a)),u>=1&&(u=.5*(u+a+1)),p.abs(a)<1e-8*u&&A>0)break}return u},d.ibeta=function(e,t,n){var r=0===e||1===e?0:p.exp(d.gammaln(t+n)-d.gammaln(t)-d.gammaln(n)+t*p.log(e)+n*p.log(1-e));return!(e<0||e>1)&&(e<(t+1)/(t+n+2)?r*d.betacf(e,t,n)/t:1-r*d.betacf(1-e,n,t)/n)},d.randn=function(e,t){var n,r,i,o,a;if(t||(t=e),e)return d.create(e,t,(function(){return d.randn()}));do{n=d._random_fn(),r=1.7156*(d._random_fn()-.5),a=(i=n-.449871)*i+(o=p.abs(r)+.386595)*(.196*o-.25472*i)}while(a>.27597&&(a>.27846||r*r>-4*p.log(n)*n*n));return r/n},d.randg=function(e,t,n){var r,i,o,a,s,u,c=e;if(n||(n=t),e||(e=1),t)return(u=d.zeros(t,n)).alter((function(){return d.randg(e)})),u;e<1&&(e+=1),r=e-1/3,i=1/p.sqrt(9*r);do{do{a=1+i*(s=d.randn())}while(a<=0);a*=a*a,o=d._random_fn()}while(o>1-.331*p.pow(s,4)&&p.log(o)>.5*s*s+r*(1-a+p.log(a)));if(e==c)return r*a;do{o=d._random_fn()}while(0===o);return p.pow(o,1/c)*r*a},"gammaln gammafn factorial factorialln".split(" ")),g=0;g<m.length;g++)!function(e){d.fn[e]=function(){return d(d.map(this,(function(t){return d[e](t)})))}}(m[g]);for(var A="randn".split(" "),v=0;v<A.length;v++)!function(e){d.fn[e]=function(){return d(d[e].apply(null,arguments))}}(A[v]);for(var b=e,y=Math,w="beta centralF cauchy chisquare exponential gamma invgamma kumaraswamy laplace lognormal noncentralt normal pareto studentt weibull uniform binomial negbin hypgeom poisson triangular tukey arcsine".split(" "),x=0;x<w.length;x++)!function(e){b[e]=function e(t,n,r){return this instanceof e?(this._a=t,this._b=n,this._c=r,this):new e(t,n,r)},b.fn[e]=function(t,n,r){var i=b[e](t,n,r);return i.data=this,i},b[e].prototype.sample=function(t){var n=this._a,r=this._b,i=this._c;return t?b.alter(t,(function(){return b[e].sample(n,r,i)})):b[e].sample(n,r,i)},function(t){for(var n=0;n<t.length;n++)!function(t){b[e].prototype[t]=function(n){var r=this._a,i=this._b,o=this._c;return n||0===n||(n=this.data),"number"!=typeof n?b.fn.map.call(n,(function(n){return b[e][t](n,r,i,o)})):b[e][t](n,r,i,o)}}(t[n])}("pdf cdf inv".split(" ")),function(t){for(var n=0;n<t.length;n++)!function(t){b[e].prototype[t]=function(){return b[e][t](this._a,this._b,this._c)}}(t[n])}("mean median mode variance".split(" "))}(w[x]);function C(e,t,n,r){for(var i,o=0,a=1,s=1,u=1,c=0,l=0;y.abs((s-l)/s)>r;)l=s,a=u+(i=-(t+c)*(t+n+c)*e/(t+2*c)/(t+2*c+1))*a,s=(o=s+i*o)+(i=(c+=1)*(n-c)*e/(t+2*c-1)/(t+2*c))*s,o/=u=a+i*u,a/=u,s/=u,u=1;return s/t}function k(e,t,n){var r=[.9815606342467192,.9041172563704749,.7699026741943047,.5873179542866175,.3678314989981802,.1252334085114689],i=[.04717533638651183,.10693932599531843,.16007832854334622,.20316742672306592,.2334925365383548,.24914704581340277],o=.5*e;if(o>=8)return 1;var a,s=2*b.normal.cdf(o,0,1,1,0)-1;s=s>=y.exp(-50/n)?y.pow(s,n):0;for(var u=o,c=(8-o)/(a=e>3?2:3),l=u+c,h=0,f=n-1,d=1;d<=a;d++){for(var p=0,m=.5*(l+u),g=.5*(l-u),A=1;A<=12;A++){var v,w=m+g*(6<A?r[(v=12-A+1)-1]:-r[(v=A)-1]),x=w*w;if(x>60)break;var C=.5*(2*b.normal.cdf(w,0,1,1,0))-.5*(2*b.normal.cdf(w,e,1,1,0));C>=y.exp(-30/f)&&(p+=C=i[v-1]*y.exp(-.5*x)*y.pow(C,f))}h+=p*=2*g*n/y.sqrt(2*y.PI),u=l,l+=c}return(s+=h)<=y.exp(-30/t)?0:(s=y.pow(s,t))>=1?1:s}b.extend(b.beta,{pdf:function(e,t,n){return e>1||e<0?0:1==t&&1==n?1:t<512&&n<512?y.pow(e,t-1)*y.pow(1-e,n-1)/b.betafn(t,n):y.exp((t-1)*y.log(e)+(n-1)*y.log(1-e)-b.betaln(t,n))},cdf:function(e,t,n){return e>1||e<0?1*(e>1):b.ibeta(e,t,n)},inv:function(e,t,n){return b.ibetainv(e,t,n)},mean:function(e,t){return e/(e+t)},median:function(e,t){return b.ibetainv(.5,e,t)},mode:function(e,t){return(e-1)/(e+t-2)},sample:function(e,t){var n=b.randg(e);return n/(n+b.randg(t))},variance:function(e,t){return e*t/(y.pow(e+t,2)*(e+t+1))}}),b.extend(b.centralF,{pdf:function(e,t,n){var r;return e<0?0:t<=2?0===e&&t<2?1/0:0===e&&2===t?1:1/b.betafn(t/2,n/2)*y.pow(t/n,t/2)*y.pow(e,t/2-1)*y.pow(1+t/n*e,-(t+n)/2):(r=t*e/(n+e*t),t*(n/(n+e*t))/2*b.binomial.pdf((t-2)/2,(t+n-2)/2,r))},cdf:function(e,t,n){return e<0?0:b.ibeta(t*e/(t*e+n),t/2,n/2)},inv:function(e,t,n){return n/(t*(1/b.ibetainv(e,t/2,n/2)-1))},mean:function(e,t){return t>2?t/(t-2):void 0},mode:function(e,t){return e>2?t*(e-2)/(e*(t+2)):void 0},sample:function(e,t){return 2*b.randg(e/2)/e/(2*b.randg(t/2)/t)},variance:function(e,t){if(!(t<=4))return 2*t*t*(e+t-2)/(e*(t-2)*(t-2)*(t-4))}}),b.extend(b.cauchy,{pdf:function(e,t,n){return n<0?0:n/(y.pow(e-t,2)+y.pow(n,2))/y.PI},cdf:function(e,t,n){return y.atan((e-t)/n)/y.PI+.5},inv:function(e,t,n){return t+n*y.tan(y.PI*(e-.5))},median:function(e){return e},mode:function(e){return e},sample:function(e,t){return b.randn()*y.sqrt(1/(2*b.randg(.5)))*t+e}}),b.extend(b.chisquare,{pdf:function(e,t){return e<0?0:0===e&&2===t?.5:y.exp((t/2-1)*y.log(e)-e/2-t/2*y.log(2)-b.gammaln(t/2))},cdf:function(e,t){return e<0?0:b.lowRegGamma(t/2,e/2)},inv:function(e,t){return 2*b.gammapinv(e,.5*t)},mean:function(e){return e},median:function(e){return e*y.pow(1-2/(9*e),3)},mode:function(e){return e-2>0?e-2:0},sample:function(e){return 2*b.randg(e/2)},variance:function(e){return 2*e}}),b.extend(b.exponential,{pdf:function(e,t){return e<0?0:t*y.exp(-t*e)},cdf:function(e,t){return e<0?0:1-y.exp(-t*e)},inv:function(e,t){return-y.log(1-e)/t},mean:function(e){return 1/e},median:function(e){return 1/e*y.log(2)},mode:function(){return 0},sample:function(e){return-1/e*y.log(b._random_fn())},variance:function(e){return y.pow(e,-2)}}),b.extend(b.gamma,{pdf:function(e,t,n){return e<0?0:0===e&&1===t?1/n:y.exp((t-1)*y.log(e)-e/n-b.gammaln(t)-t*y.log(n))},cdf:function(e,t,n){return e<0?0:b.lowRegGamma(t,e/n)},inv:function(e,t,n){return b.gammapinv(e,t)*n},mean:function(e,t){return e*t},mode:function(e,t){if(e>1)return(e-1)*t},sample:function(e,t){return b.randg(e)*t},variance:function(e,t){return e*t*t}}),b.extend(b.invgamma,{pdf:function(e,t,n){return e<=0?0:y.exp(-(t+1)*y.log(e)-n/e-b.gammaln(t)+t*y.log(n))},cdf:function(e,t,n){return e<=0?0:1-b.lowRegGamma(t,n/e)},inv:function(e,t,n){return n/b.gammapinv(1-e,t)},mean:function(e,t){return e>1?t/(e-1):void 0},mode:function(e,t){return t/(e+1)},sample:function(e,t){return t/b.randg(e)},variance:function(e,t){if(!(e<=2))return t*t/((e-1)*(e-1)*(e-2))}}),b.extend(b.kumaraswamy,{pdf:function(e,t,n){return 0===e&&1===t?n:1===e&&1===n?t:y.exp(y.log(t)+y.log(n)+(t-1)*y.log(e)+(n-1)*y.log(1-y.pow(e,t)))},cdf:function(e,t,n){return e<0?0:e>1?1:1-y.pow(1-y.pow(e,t),n)},inv:function(e,t,n){return y.pow(1-y.pow(1-e,1/n),1/t)},mean:function(e,t){return t*b.gammafn(1+1/e)*b.gammafn(t)/b.gammafn(1+1/e+t)},median:function(e,t){return y.pow(1-y.pow(2,-1/t),1/e)},mode:function(e,t){if(e>=1&&t>=1&&1!==e&&1!==t)return y.pow((e-1)/(e*t-1),1/e)},variance:function(){throw new Error("variance not yet implemented")}}),b.extend(b.lognormal,{pdf:function(e,t,n){return e<=0?0:y.exp(-y.log(e)-.5*y.log(2*y.PI)-y.log(n)-y.pow(y.log(e)-t,2)/(2*n*n))},cdf:function(e,t,n){return e<0?0:.5+.5*b.erf((y.log(e)-t)/y.sqrt(2*n*n))},inv:function(e,t,n){return y.exp(-1.4142135623730951*n*b.erfcinv(2*e)+t)},mean:function(e,t){return y.exp(e+t*t/2)},median:function(e){return y.exp(e)},mode:function(e,t){return y.exp(e-t*t)},sample:function(e,t){return y.exp(b.randn()*t+e)},variance:function(e,t){return(y.exp(t*t)-1)*y.exp(2*e+t*t)}}),b.extend(b.noncentralt,{pdf:function(e,t,n){return y.abs(n)<1e-14?b.studentt.pdf(e,t):y.abs(e)<1e-14?y.exp(b.gammaln((t+1)/2)-n*n/2-.5*y.log(y.PI*t)-b.gammaln(t/2)):t/e*(b.noncentralt.cdf(e*y.sqrt(1+2/t),t+2,n)-b.noncentralt.cdf(e,t,n))},cdf:function(e,t,n){var r=1e-14;if(y.abs(n)<r)return b.studentt.cdf(e,t);var i=!1;e<0&&(i=!0,n=-n);for(var o=b.normal.cdf(-n,0,1),a=r+1,s=a,u=e*e/(e*e+t),c=0,l=y.exp(-n*n/2),h=y.exp(-n*n/2-.5*y.log(2)-b.gammaln(1.5))*n;c<200||s>r||a>r;)s=a,c>0&&(l*=n*n/(2*c),h*=n*n/(2*(c+.5))),o+=.5*(a=l*b.beta.cdf(u,c+.5,t/2)+h*b.beta.cdf(u,c+1,t/2)),c++;return i?1-o:o}}),b.extend(b.normal,{pdf:function(e,t,n){return y.exp(-.5*y.log(2*y.PI)-y.log(n)-y.pow(e-t,2)/(2*n*n))},cdf:function(e,t,n){return.5*(1+b.erf((e-t)/y.sqrt(2*n*n)))},inv:function(e,t,n){return-1.4142135623730951*n*b.erfcinv(2*e)+t},mean:function(e){return e},median:function(e){return e},mode:function(e){return e},sample:function(e,t){return b.randn()*t+e},variance:function(e,t){return t*t}}),b.extend(b.pareto,{pdf:function(e,t,n){return e<t?0:n*y.pow(t,n)/y.pow(e,n+1)},cdf:function(e,t,n){return e<t?0:1-y.pow(t/e,n)},inv:function(e,t,n){return t/y.pow(1-e,1/n)},mean:function(e,t){if(!(t<=1))return t*y.pow(e,t)/(t-1)},median:function(e,t){return e*(t*y.SQRT2)},mode:function(e){return e},variance:function(e,t){if(!(t<=2))return e*e*t/(y.pow(t-1,2)*(t-2))}}),b.extend(b.studentt,{pdf:function(e,t){return t=t>1e100?1e100:t,1/(y.sqrt(t)*b.betafn(.5,t/2))*y.pow(1+e*e/t,-(t+1)/2)},cdf:function(e,t){var n=t/2;return b.ibeta((e+y.sqrt(e*e+t))/(2*y.sqrt(e*e+t)),n,n)},inv:function(e,t){var n=b.ibetainv(2*y.min(e,1-e),.5*t,.5);return n=y.sqrt(t*(1-n)/n),e>.5?n:-n},mean:function(e){return e>1?0:void 0},median:function(){return 0},mode:function(){return 0},sample:function(e){return b.randn()*y.sqrt(e/(2*b.randg(e/2)))},variance:function(e){return e>2?e/(e-2):e>1?1/0:void 0}}),b.extend(b.weibull,{pdf:function(e,t,n){return e<0||t<0||n<0?0:n/t*y.pow(e/t,n-1)*y.exp(-y.pow(e/t,n))},cdf:function(e,t,n){return e<0?0:1-y.exp(-y.pow(e/t,n))},inv:function(e,t,n){return t*y.pow(-y.log(1-e),1/n)},mean:function(e,t){return e*b.gammafn(1+1/t)},median:function(e,t){return e*y.pow(y.log(2),1/t)},mode:function(e,t){return t<=1?0:e*y.pow((t-1)/t,1/t)},sample:function(e,t){return e*y.pow(-y.log(b._random_fn()),1/t)},variance:function(e,t){return e*e*b.gammafn(1+2/t)-y.pow(b.weibull.mean(e,t),2)}}),b.extend(b.uniform,{pdf:function(e,t,n){return e<t||e>n?0:1/(n-t)},cdf:function(e,t,n){return e<t?0:e<n?(e-t)/(n-t):1},inv:function(e,t,n){return t+e*(n-t)},mean:function(e,t){return.5*(e+t)},median:function(e,t){return b.mean(e,t)},mode:function(){throw new Error("mode is not yet implemented")},sample:function(e,t){return e/2+t/2+(t/2-e/2)*(2*b._random_fn()-1)},variance:function(e,t){return y.pow(t-e,2)/12}}),b.extend(b.binomial,{pdf:function(e,t,n){return 0===n||1===n?t*n===e?1:0:b.combination(t,e)*y.pow(n,e)*y.pow(1-n,t-e)},cdf:function(e,t,n){var r,i=1e-10;if(e<0)return 0;if(e>=t)return 1;if(n<0||n>1||t<=0)return NaN;var o=n,a=(e=y.floor(e))+1,s=t-e,u=a+s,c=y.exp(b.gammaln(u)-b.gammaln(s)-b.gammaln(a)+a*y.log(o)+s*y.log(1-o));return r=o<(a+1)/(u+2)?c*C(o,a,s,i):1-c*C(1-o,s,a,i),y.round(1/i*(1-r))/(1/i)}}),b.extend(b.negbin,{pdf:function(e,t,n){return e===e>>>0&&(e<0?0:b.combination(e+t-1,t-1)*y.pow(1-n,e)*y.pow(n,t))},cdf:function(e,t,n){var r=0,i=0;if(e<0)return 0;for(;i<=e;i++)r+=b.negbin.pdf(i,t,n);return r}}),b.extend(b.hypgeom,{pdf:function(e,t,n,r){if(e!=e|0)return!1;if(e<0||e<n-(t-r))return 0;if(e>r||e>n)return 0;if(2*n>t)return 2*r>t?b.hypgeom.pdf(t-n-r+e,t,t-n,t-r):b.hypgeom.pdf(r-e,t,t-n,r);if(2*r>t)return b.hypgeom.pdf(n-e,t,n,t-r);if(n<r)return b.hypgeom.pdf(e,t,r,n);for(var i=1,o=0,a=0;a<e;a++){for(;i>1&&o<r;)i*=1-n/(t-o),o++;i*=(r-a)*(n-a)/((a+1)*(t-n-r+a+1))}for(;o<r;o++)i*=1-n/(t-o);return y.min(1,y.max(0,i))},cdf:function(e,t,n,r){if(e<0||e<n-(t-r))return 0;if(e>=r||e>=n)return 1;if(2*n>t)return 2*r>t?b.hypgeom.cdf(t-n-r+e,t,t-n,t-r):1-b.hypgeom.cdf(r-e-1,t,t-n,r);if(2*r>t)return 1-b.hypgeom.cdf(n-e-1,t,n,t-r);if(n<r)return b.hypgeom.cdf(e,t,r,n);for(var i=1,o=1,a=0,s=0;s<e;s++){for(;i>1&&a<r;){var u=1-n/(t-a);o*=u,i*=u,a++}i+=o*=(r-s)*(n-s)/((s+1)*(t-n-r+s+1))}for(;a<r;a++)i*=1-n/(t-a);return y.min(1,y.max(0,i))}}),b.extend(b.poisson,{pdf:function(e,t){return t<0||e%1!=0||e<0?0:y.pow(t,e)*y.exp(-t)/b.factorial(e)},cdf:function(e,t){var n=[],r=0;if(e<0)return 0;for(;r<=e;r++)n.push(b.poisson.pdf(r,t));return b.sum(n)},mean:function(e){return e},variance:function(e){return e},sampleSmall:function(e){var t=1,n=0,r=y.exp(-e);do{n++,t*=b._random_fn()}while(t>r);return n-1},sampleLarge:function(e){var t,n,r,i,o,a,s,u,c,l,h=e;for(i=y.sqrt(h),o=y.log(h),a=.02483*(s=.931+2.53*i)-.059,u=1.1239+1.1328/(s-3.4),c=.9277-3.6224/(s-2);;){if(n=y.random()-.5,r=y.random(),l=.5-y.abs(n),t=y.floor((2*a/l+s)*n+h+.43),l>=.07&&r<=c)return t;if(!(t<0||l<.013&&r>l)&&y.log(r)+y.log(u)-y.log(a/(l*l)+s)<=t*o-h-b.loggam(t+1))return t}},sample:function(e){return e<10?this.sampleSmall(e):this.sampleLarge(e)}}),b.extend(b.triangular,{pdf:function(e,t,n,r){return n<=t||r<t||r>n?NaN:e<t||e>n?0:e<r?2*(e-t)/((n-t)*(r-t)):e===r?2/(n-t):2*(n-e)/((n-t)*(n-r))},cdf:function(e,t,n,r){return n<=t||r<t||r>n?NaN:e<=t?0:e>=n?1:e<=r?y.pow(e-t,2)/((n-t)*(r-t)):1-y.pow(n-e,2)/((n-t)*(n-r))},inv:function(e,t,n,r){return n<=t||r<t||r>n?NaN:e<=(r-t)/(n-t)?t+(n-t)*y.sqrt(e*((r-t)/(n-t))):t+(n-t)*(1-y.sqrt((1-e)*(1-(r-t)/(n-t))))},mean:function(e,t,n){return(e+t+n)/3},median:function(e,t,n){return n<=(e+t)/2?t-y.sqrt((t-e)*(t-n))/y.sqrt(2):n>(e+t)/2?e+y.sqrt((t-e)*(n-e))/y.sqrt(2):void 0},mode:function(e,t,n){return n},sample:function(e,t,n){var r=b._random_fn();return r<(n-e)/(t-e)?e+y.sqrt(r*(t-e)*(n-e)):t-y.sqrt((1-r)*(t-e)*(t-n))},variance:function(e,t,n){return(e*e+t*t+n*n-e*t-e*n-t*n)/18}}),b.extend(b.arcsine,{pdf:function(e,t,n){return n<=t?NaN:e<=t||e>=n?0:2/y.PI*y.pow(y.pow(n-t,2)-y.pow(2*e-t-n,2),-.5)},cdf:function(e,t,n){return e<t?0:e<n?2/y.PI*y.asin(y.sqrt((e-t)/(n-t))):1},inv:function(e,t,n){return t+(.5-.5*y.cos(y.PI*e))*(n-t)},mean:function(e,t){return t<=e?NaN:(e+t)/2},median:function(e,t){return t<=e?NaN:(e+t)/2},mode:function(){throw new Error("mode is not yet implemented")},sample:function(e,t){return(e+t)/2+(t-e)/2*y.sin(2*y.PI*b.uniform.sample(0,1))},variance:function(e,t){return t<=e?NaN:y.pow(t-e,2)/8}}),b.extend(b.laplace,{pdf:function(e,t,n){return n<=0?0:y.exp(-y.abs(e-t)/n)/(2*n)},cdf:function(e,t,n){return n<=0?0:e<t?.5*y.exp((e-t)/n):1-.5*y.exp(-(e-t)/n)},mean:function(e){return e},median:function(e){return e},mode:function(e){return e},variance:function(e,t){return 2*t*t},sample:function(e,t){var n=b._random_fn()-.5;return e-t*function(e){return e/y.abs(e)}(n)*y.log(1-2*y.abs(n))}}),b.extend(b.tukey,{cdf:function(e,t,n){var r=t,i=[.9894009349916499,.9445750230732326,.8656312023878318,.755404408355003,.6178762444026438,.45801677765722737,.2816035507792589,.09501250983763744],o=[.027152459411754096,.062253523938647894,.09515851168249279,.12462897125553388,.14959598881657674,.16915651939500254,.18260341504492358,.1894506104550685];if(e<=0)return 0;if(n<2||r<2)return NaN;if(!Number.isFinite(e))return 1;if(n>25e3)return k(e,1,r);var a,s=.5*n,u=s*y.log(n)-n*y.log(2)-b.gammaln(s),c=s-1,l=.25*n;a=n<=100?1:n<=800?.5:n<=5e3?.25:.125,u+=y.log(a);for(var h=0,f=1;f<=50;f++){for(var d=0,p=(2*f-1)*a,m=1;m<=16;m++){var g,A;if(8<m?(g=m-8-1,A=u+c*y.log(p+i[g]*a)-(i[g]*a+p)*l):(g=m-1,A=u+c*y.log(p-i[g]*a)+(i[g]*a-p)*l),A>=-30)d+=k(8<m?e*y.sqrt(.5*(i[g]*a+p)):e*y.sqrt(.5*(-i[g]*a+p)),1,r)*o[g]*y.exp(A)}if(f*a>=1&&d<=1e-14)break;h+=d}if(d>1e-14)throw new Error("tukey.cdf failed to converge");return h>1&&(h=1),h},inv:function(e,t,n){if(n<2||t<2)return NaN;if(e<0||e>1)return NaN;if(0===e)return 0;if(1===e)return 1/0;var r,i=function(e,t,n){var r=.5-.5*e,i=y.sqrt(y.log(1/(r*r))),o=i+((((-453642210148e-16*i-.204231210125)*i-.342242088547)*i-1)*i+.322232421088)/((((.0038560700634*i+.10353775285)*i+.531103462366)*i+.588581570495)*i+.099348462606);n<120&&(o+=(o*o*o+o)/n/4);var a=.8832-.2368*o;return n<120&&(a+=-1.214/n+1.208*o/n),o*(a*y.log(t-1)+1.4142)}(e,t,n),o=b.tukey.cdf(i,t,n)-e;r=o>0?y.max(0,i-1):i+1;for(var a,s=b.tukey.cdf(r,t,n)-e,u=1;u<50;u++){if(a=r-s*(r-i)/(s-o),o=s,i=r,a<0&&(a=0,s=-e),s=b.tukey.cdf(a,t,n)-e,r=a,y.abs(r-i)<1e-4)return a}throw new Error("tukey.inv failed to converge")}});var E=e,S=Math,_=Array.prototype.push,O=E.utils.isArray;function T(e){return O(e)||e instanceof E}E.extend({add:function(e,t){return T(t)?(T(t[0])||(t=[t]),E.map(e,(function(e,n,r){return e+t[n][r]}))):E.map(e,(function(e){return e+t}))},subtract:function(e,t){return T(t)?(T(t[0])||(t=[t]),E.map(e,(function(e,n,r){return e-t[n][r]||0}))):E.map(e,(function(e){return e-t}))},divide:function(e,t){return T(t)?(T(t[0])||(t=[t]),E.multiply(e,E.inv(t))):E.map(e,(function(e){return e/t}))},multiply:function(e,t){var n,r,i,o,a,s,u,c;if(void 0===e.length&&void 0===t.length)return e*t;if(a=e.length,s=e[0].length,u=E.zeros(a,i=T(t)?t[0].length:s),c=0,T(t)){for(;c<i;c++)for(n=0;n<a;n++){for(o=0,r=0;r<s;r++)o+=e[n][r]*t[r][c];u[n][c]=o}return 1===a&&1===c?u[0][0]:u}return E.map(e,(function(e){return e*t}))},outer:function(e,t){return E.multiply(e.map((function(e){return[e]})),[t])},dot:function(e,t){T(e[0])||(e=[e]),T(t[0])||(t=[t]);for(var n,r,i=1===e[0].length&&1!==e.length?E.transpose(e):e,o=1===t[0].length&&1!==t.length?E.transpose(t):t,a=[],s=0,u=i.length,c=i[0].length;s<u;s++){for(a[s]=[],n=0,r=0;r<c;r++)n+=i[s][r]*o[s][r];a[s]=n}return 1===a.length?a[0]:a},pow:function(e,t){return E.map(e,(function(e){return S.pow(e,t)}))},exp:function(e){return E.map(e,(function(e){return S.exp(e)}))},log:function(e){return E.map(e,(function(e){return S.log(e)}))},abs:function(e){return E.map(e,(function(e){return S.abs(e)}))},norm:function(e,t){var n=0,r=0;for(isNaN(t)&&(t=2),T(e[0])&&(e=e[0]);r<e.length;r++)n+=S.pow(S.abs(e[r]),t);return S.pow(n,1/t)},angle:function(e,t){return S.acos(E.dot(e,t)/(E.norm(e)*E.norm(t)))},aug:function(e,t){var n,r=[];for(n=0;n<e.length;n++)r.push(e[n].slice());for(n=0;n<r.length;n++)_.apply(r[n],t[n]);return r},inv:function(e){for(var t,n=e.length,r=e[0].length,i=E.identity(n,r),o=E.gauss_jordan(e,i),a=[],s=0;s<n;s++)for(a[s]=[],t=r;t<o[0].length;t++)a[s][t-r]=o[s][t];return a},det:function e(t){if(2===t.length)return t[0][0]*t[1][1]-t[0][1]*t[1][0];for(var n=0,r=0;r<t.length;r++){for(var i=[],o=1;o<t.length;o++){i[o-1]=[];for(var a=0;a<t.length;a++)a<r?i[o-1][a]=t[o][a]:a>r&&(i[o-1][a-1]=t[o][a])}var s=r%2?-1:1;n+=e(i)*t[0][r]*s}return n},gauss_elimination:function(e,t){var n,r,i,o,a=0,s=0,u=e.length,c=e[0].length,l=1,h=0,f=[];for(n=(e=E.aug(e,t))[0].length,a=0;a<u;a++){for(r=e[a][a],s=a,o=a+1;o<c;o++)r<S.abs(e[o][a])&&(r=e[o][a],s=o);if(s!=a)for(o=0;o<n;o++)i=e[a][o],e[a][o]=e[s][o],e[s][o]=i;for(s=a+1;s<u;s++)for(l=e[s][a]/e[a][a],o=a;o<n;o++)e[s][o]=e[s][o]-l*e[a][o]}for(a=u-1;a>=0;a--){for(h=0,s=a+1;s<=u-1;s++)h+=f[s]*e[a][s];f[a]=(e[a][n-1]-h)/e[a][a]}return f},gauss_jordan:function(e,t){var n,r,i,o=E.aug(e,t),a=o.length,s=o[0].length,u=0;for(r=0;r<a;r++){var c=r;for(i=r+1;i<a;i++)S.abs(o[i][r])>S.abs(o[c][r])&&(c=i);var l=o[r];for(o[r]=o[c],o[c]=l,i=r+1;i<a;i++)for(u=o[i][r]/o[r][r],n=r;n<s;n++)o[i][n]-=o[r][n]*u}for(r=a-1;r>=0;r--){for(u=o[r][r],i=0;i<r;i++)for(n=s-1;n>r-1;n--)o[i][n]-=o[r][n]*o[i][r]/u;for(o[r][r]/=u,n=a;n<s;n++)o[r][n]/=u}return o},triaUpSolve:function(e,t){var n,r=e[0].length,i=E.zeros(1,r)[0],o=!1;return null!=t[0].length&&(t=t.map((function(e){return e[0]})),o=!0),E.arange(r-1,-1,-1).forEach((function(o){n=E.arange(o+1,r).map((function(t){return i[t]*e[o][t]})),i[o]=(t[o]-E.sum(n))/e[o][o]})),o?i.map((function(e){return[e]})):i},triaLowSolve:function(e,t){var n,r=e[0].length,i=E.zeros(1,r)[0],o=!1;return null!=t[0].length&&(t=t.map((function(e){return e[0]})),o=!0),E.arange(r).forEach((function(r){n=E.arange(r).map((function(t){return e[r][t]*i[t]})),i[r]=(t[r]-E.sum(n))/e[r][r]})),o?i.map((function(e){return[e]})):i},lu:function(e){var t,n=e.length,r=E.identity(n),i=E.zeros(e.length,e[0].length);return E.arange(n).forEach((function(t){i[0][t]=e[0][t]})),E.arange(1,n).forEach((function(o){E.arange(o).forEach((function(n){t=E.arange(n).map((function(e){return r[o][e]*i[e][n]})),r[o][n]=(e[o][n]-E.sum(t))/i[n][n]})),E.arange(o,n).forEach((function(n){t=E.arange(o).map((function(e){return r[o][e]*i[e][n]})),i[o][n]=e[t.length][n]-E.sum(t)}))})),[r,i]},cholesky:function(e){var t,n=e.length,r=E.zeros(e.length,e[0].length);return E.arange(n).forEach((function(i){t=E.arange(i).map((function(e){return S.pow(r[i][e],2)})),r[i][i]=S.sqrt(e[i][i]-E.sum(t)),E.arange(i+1,n).forEach((function(n){t=E.arange(i).map((function(e){return r[i][e]*r[n][e]})),r[n][i]=(e[i][n]-E.sum(t))/r[i][i]}))})),r},gauss_jacobi:function(e,t,n,r){for(var i,o,a,s,u=0,c=0,l=e.length,h=[],f=[],d=[];u<l;u++)for(h[u]=[],f[u]=[],d[u]=[],c=0;c<l;c++)u>c?(h[u][c]=e[u][c],f[u][c]=d[u][c]=0):u<c?(f[u][c]=e[u][c],h[u][c]=d[u][c]=0):(d[u][c]=e[u][c],h[u][c]=f[u][c]=0);for(a=E.multiply(E.multiply(E.inv(d),E.add(h,f)),-1),o=E.multiply(E.inv(d),t),i=n,s=E.add(E.multiply(a,n),o),u=2;S.abs(E.norm(E.subtract(s,i)))>r;)i=s,s=E.add(E.multiply(a,i),o),u++;return s},gauss_seidel:function(e,t,n,r){for(var i,o,a,s,u,c=0,l=e.length,h=[],f=[],d=[];c<l;c++)for(h[c]=[],f[c]=[],d[c]=[],i=0;i<l;i++)c>i?(h[c][i]=e[c][i],f[c][i]=d[c][i]=0):c<i?(f[c][i]=e[c][i],h[c][i]=d[c][i]=0):(d[c][i]=e[c][i],h[c][i]=f[c][i]=0);for(s=E.multiply(E.multiply(E.inv(E.add(d,h)),f),-1),a=E.multiply(E.inv(E.add(d,h)),t),o=n,u=E.add(E.multiply(s,n),a),c=2;S.abs(E.norm(E.subtract(u,o)))>r;)o=u,u=E.add(E.multiply(s,o),a),c+=1;return u},SOR:function(e,t,n,r,i){for(var o,a,s,u,c,l=0,h=e.length,f=[],d=[],p=[];l<h;l++)for(f[l]=[],d[l]=[],p[l]=[],o=0;o<h;o++)l>o?(f[l][o]=e[l][o],d[l][o]=p[l][o]=0):l<o?(d[l][o]=e[l][o],f[l][o]=p[l][o]=0):(p[l][o]=e[l][o],f[l][o]=d[l][o]=0);for(u=E.multiply(E.inv(E.add(p,E.multiply(f,i))),E.subtract(E.multiply(p,1-i),E.multiply(d,i))),s=E.multiply(E.multiply(E.inv(E.add(p,E.multiply(f,i))),t),i),a=n,c=E.add(E.multiply(u,n),s),l=2;S.abs(E.norm(E.subtract(c,a)))>r;)a=c,c=E.add(E.multiply(u,a),s),l++;return c},householder:function(e){for(var t,n,r,i,o=e.length,a=e[0].length,s=0,u=[],c=[];s<o-1;s++){for(t=0,i=s+1;i<a;i++)t+=e[i][s]*e[i][s];for(t=(e[s+1][s]>0?-1:1)*S.sqrt(t),n=S.sqrt((t*t-e[s+1][s]*t)/2),(u=E.zeros(o,1))[s+1][0]=(e[s+1][s]-t)/(2*n),r=s+2;r<o;r++)u[r][0]=e[r][s]/(2*n);c=E.subtract(E.identity(o,a),E.multiply(E.multiply(u,E.transpose(u)),2)),e=E.multiply(c,E.multiply(e,c))}return e},QR:function(){var e=E.sum,t=E.arange;return function(n){var r,i,o,a=n.length,s=n[0].length,u=E.zeros(s,s);for(n=E.copy(n),i=0;i<s;i++){for(u[i][i]=S.sqrt(e(t(a).map((function(e){return n[e][i]*n[e][i]})))),r=0;r<a;r++)n[r][i]=n[r][i]/u[i][i];for(o=i+1;o<s;o++)for(u[i][o]=e(t(a).map((function(e){return n[e][i]*n[e][o]}))),r=0;r<a;r++)n[r][o]=n[r][o]-n[r][i]*u[i][o]}return[n,u]}}(),lstsq:function(e,t){var n=!1;void 0===t[0].length&&(t=t.map((function(e){return[e]})),n=!0);var r=E.QR(e),i=r[0],o=r[1],a=e[0].length,s=E.slice(i,{col:{end:a}}),u=function(e){var t=(e=E.copy(e)).length,n=E.identity(t);return E.arange(t-1,-1,-1).forEach((function(t){E.sliceAssign(n,{row:t},E.divide(E.slice(n,{row:t}),e[t][t])),E.sliceAssign(e,{row:t},E.divide(E.slice(e,{row:t}),e[t][t])),E.arange(t).forEach((function(r){var i=E.multiply(e[r][t],-1),o=E.slice(e,{row:r}),a=E.multiply(E.slice(e,{row:t}),i);E.sliceAssign(e,{row:r},E.add(o,a));var s=E.slice(n,{row:r}),u=E.multiply(E.slice(n,{row:t}),i);E.sliceAssign(n,{row:r},E.add(s,u))}))})),n}(E.slice(o,{row:{end:a}})),c=E.transpose(s);void 0===c[0].length&&(c=[c]);var l=E.multiply(E.multiply(u,c),t);return void 0===l.length&&(l=[[l]]),n?l.map((function(e){return e[0]})):l},jacobi:function(e){for(var t,n,r,i,o,a,s,u=1,c=e.length,l=E.identity(c,c),h=[];1===u;){for(o=e[0][1],r=0,i=1,t=0;t<c;t++)for(n=0;n<c;n++)t!=n&&o<S.abs(e[t][n])&&(o=S.abs(e[t][n]),r=t,i=n);for(a=e[r][r]===e[i][i]?e[r][i]>0?S.PI/4:-S.PI/4:S.atan(2*e[r][i]/(e[r][r]-e[i][i]))/2,(s=E.identity(c,c))[r][r]=S.cos(a),s[r][i]=-S.sin(a),s[i][r]=S.sin(a),s[i][i]=S.cos(a),l=E.multiply(l,s),e=E.multiply(E.multiply(E.inv(s),e),s),u=0,t=1;t<c;t++)for(n=1;n<c;n++)t!=n&&S.abs(e[t][n])>.001&&(u=1)}for(t=0;t<c;t++)h.push(e[t][t]);return[l,h]},rungekutta:function(e,t,n,r,i,o){var a,s,u;if(2===o)for(;r<=n;)i=i+((a=t*e(r,i))+(s=t*e(r+t,i+a)))/2,r+=t;if(4===o)for(;r<=n;)i=i+((a=t*e(r,i))+2*(s=t*e(r+t/2,i+a/2))+2*(u=t*e(r+t/2,i+s/2))+t*e(r+t,i+u))/6,r+=t;return i},romberg:function(e,t,n,r){for(var i,o,a,s,u,c=0,l=(n-t)/2,h=[],f=[],d=[];c<r/2;){for(u=e(t),a=t,s=0;a<=n;a+=l,s++)h[s]=a;for(i=h.length,a=1;a<i-1;a++)u+=(a%2!=0?4:2)*e(h[a]);u=l/3*(u+e(n)),d[c]=u,l/=2,c++}for(o=d.length,i=1;1!==o;){for(a=0;a<o-1;a++)f[a]=(S.pow(4,i)*d[a+1]-d[a])/(S.pow(4,i)-1);o=f.length,d=f,f=[],i++}return d},richardson:function(e,t,n,r){function i(e,t){for(var n,r=0,i=e.length;r<i;r++)e[r]===t&&(n=r);return n}for(var o,a,s,u,c,l=S.abs(n-e[i(e,n)+1]),h=0,f=[],d=[];r>=l;)o=i(e,n+r),a=i(e,n),f[h]=(t[o]-2*t[a]+t[2*a-o])/(r*r),r/=2,h++;for(u=f.length,s=1;1!=u;){for(c=0;c<u-1;c++)d[c]=(S.pow(4,s)*f[c+1]-f[c])/(S.pow(4,s)-1);u=d.length,f=d,d=[],s++}return f},simpson:function(e,t,n,r){for(var i,o=(n-t)/r,a=e(t),s=[],u=t,c=0,l=1;u<=n;u+=o,c++)s[c]=u;for(i=s.length;l<i-1;l++)a+=(l%2!=0?4:2)*e(s[l]);return o/3*(a+e(n))},hermite:function(e,t,n,r){for(var i,o=e.length,a=0,s=0,u=[],c=[],l=[],h=[];s<o;s++){for(u[s]=1,i=0;i<o;i++)s!=i&&(u[s]*=(r-e[i])/(e[s]-e[i]));for(c[s]=0,i=0;i<o;i++)s!=i&&(c[s]+=1/(e[s]-e[i]));l[s]=(1-2*(r-e[s])*c[s])*(u[s]*u[s]),h[s]=(r-e[s])*(u[s]*u[s]),a+=l[s]*t[s]+h[s]*n[s]}return a},lagrange:function(e,t,n){for(var r,i,o=0,a=0,s=e.length;a<s;a++){for(i=t[a],r=0;r<s;r++)a!=r&&(i*=(n-e[r])/(e[a]-e[r]));o+=i}return o},cubic_spline:function(e,t,n){for(var r,i,o=e.length,a=0,s=[],u=[],c=[],l=[],h=[],f=[];a<o-1;a++)l[a]=e[a+1]-e[a];for(c[0]=0,a=1;a<o-1;a++)c[a]=3/l[a]*(t[a+1]-t[a])-3/l[a-1]*(t[a]-t[a-1]);for(a=1;a<o-1;a++)s[a]=[],u[a]=[],s[a][a-1]=l[a-1],s[a][a]=2*(l[a-1]+l[a]),s[a][a+1]=l[a],u[a][0]=c[a];for(i=E.multiply(E.inv(s),u),r=0;r<o-1;r++)h[r]=(t[r+1]-t[r])/l[r]-l[r]*(i[r+1][0]+2*i[r][0])/3,f[r]=(i[r+1][0]-i[r][0])/(3*l[r]);for(r=0;r<o&&!(e[r]>n);r++);return t[r-=1]+(n-e[r])*h[r]+E.sq(n-e[r])*i[r]+(n-e[r])*E.sq(n-e[r])*f[r]},gauss_quadrature:function(){throw new Error("gauss_quadrature not yet implemented")},PCA:function(e){var t,n,r,i,o,a=e.length,s=e[0].length,u=0,c=[],l=[],h=[],f=[],d=[],p=[],m=[];for(u=0;u<a;u++)c[u]=E.sum(e[u])/s;for(u=0;u<s;u++)for(d[u]=[],t=0;t<a;t++)d[u][t]=e[t][u]-c[t];for(d=E.transpose(d),u=0;u<a;u++)for(p[u]=[],t=0;t<a;t++)p[u][t]=E.dot([d[u]],[d[t]])/(s-1);for(o=(r=E.jacobi(p))[0],l=r[1],m=E.transpose(o),u=0;u<l.length;u++)for(t=u;t<l.length;t++)l[u]<l[t]&&(n=l[u],l[u]=l[t],l[t]=n,h=m[u],m[u]=m[t],m[t]=h);for(i=E.transpose(d),u=0;u<a;u++)for(f[u]=[],t=0;t<i.length;t++)f[u][t]=E.dot([m[u]],[i[t]]);return[e,l,m,f]}});for(var D="add divide multiply subtract dot pow exp log abs norm angle".split(" "),B=0;B<D.length;B++)!function(e){E.fn[e]=function(t,n){var r=this;return n?(setTimeout((function(){n.call(r,E.fn[e].call(r,t))}),15),this):"number"==typeof E[e](this,t)?E[e](this,t):E(E[e](this,t))}}(D[B]);var I=e,M=Math,j=[].slice,N=I.utils.isNumber,F=I.utils.isArray;function R(e,t,n,r){if(e>1||n>1||e<=0||n<=0)throw new Error("Proportions should be greater than 0 and less than 1");var i=(e*t+n*r)/(t+r);return(e-n)/M.sqrt(i*(1-i)*(1/t+1/r))}return I.extend({zscore:function(){var e=j.call(arguments);return N(e[1])?(e[0]-e[1])/e[2]:(e[0]-I.mean(e[1]))/I.stdev(e[1],e[2])},ztest:function(){var e,t=j.call(arguments);return F(t[1])?(e=I.zscore(t[0],t[1],t[3]),1===t[2]?I.normal.cdf(-M.abs(e),0,1):2*I.normal.cdf(-M.abs(e),0,1)):t.length>2?(e=I.zscore(t[0],t[1],t[2]),1===t[3]?I.normal.cdf(-M.abs(e),0,1):2*I.normal.cdf(-M.abs(e),0,1)):(e=t[0],1===t[1]?I.normal.cdf(-M.abs(e),0,1):2*I.normal.cdf(-M.abs(e),0,1))}}),I.extend(I.fn,{zscore:function(e,t){return(e-this.mean())/this.stdev(t)},ztest:function(e,t,n){var r=M.abs(this.zscore(e,n));return 1===t?I.normal.cdf(-r,0,1):2*I.normal.cdf(-r,0,1)}}),I.extend({tscore:function(){var e=j.call(arguments);return 4===e.length?(e[0]-e[1])/(e[2]/M.sqrt(e[3])):(e[0]-I.mean(e[1]))/(I.stdev(e[1],!0)/M.sqrt(e[1].length))},ttest:function(){var e,t=j.call(arguments);return 5===t.length?(e=M.abs(I.tscore(t[0],t[1],t[2],t[3])),1===t[4]?I.studentt.cdf(-e,t[3]-1):2*I.studentt.cdf(-e,t[3]-1)):N(t[1])?(e=M.abs(t[0]),1==t[2]?I.studentt.cdf(-e,t[1]-1):2*I.studentt.cdf(-e,t[1]-1)):(e=M.abs(I.tscore(t[0],t[1])),1==t[2]?I.studentt.cdf(-e,t[1].length-1):2*I.studentt.cdf(-e,t[1].length-1))}}),I.extend(I.fn,{tscore:function(e){return(e-this.mean())/(this.stdev(!0)/M.sqrt(this.cols()))},ttest:function(e,t){return 1===t?1-I.studentt.cdf(M.abs(this.tscore(e)),this.cols()-1):2*I.studentt.cdf(-M.abs(this.tscore(e)),this.cols()-1)}}),I.extend({anovafscore:function(){var e,t,n,r,i,o,a,s,u=j.call(arguments);if(1===u.length){for(i=new Array(u[0].length),a=0;a<u[0].length;a++)i[a]=u[0][a];u=i}for(t=new Array,a=0;a<u.length;a++)t=t.concat(u[a]);for(n=I.mean(t),e=0,a=0;a<u.length;a++)e+=u[a].length*M.pow(I.mean(u[a])-n,2);for(e/=u.length-1,o=0,a=0;a<u.length;a++)for(r=I.mean(u[a]),s=0;s<u[a].length;s++)o+=M.pow(u[a][s]-r,2);return e/(o/=t.length-u.length)},anovaftest:function(){var e,t,n,r,i=j.call(arguments);if(N(i[0]))return 1-I.centralF.cdf(i[0],i[1],i[2]);var o=I.anovafscore(i);for(e=i.length-1,n=0,r=0;r<i.length;r++)n+=i[r].length;return t=n-e-1,1-I.centralF.cdf(o,e,t)},ftest:function(e,t,n){return 1-I.centralF.cdf(e,t,n)}}),I.extend(I.fn,{anovafscore:function(){return I.anovafscore(this.toArray())},anovaftes:function(){var e,t=0;for(e=0;e<this.length;e++)t+=this[e].length;return I.ftest(this.anovafscore(),this.length-1,t-this.length)}}),I.extend({qscore:function(){var e,t,n,r,i,o=j.call(arguments);return N(o[0])?(e=o[0],t=o[1],n=o[2],r=o[3],i=o[4]):(e=I.mean(o[0]),t=I.mean(o[1]),n=o[0].length,r=o[1].length,i=o[2]),M.abs(e-t)/(i*M.sqrt((1/n+1/r)/2))},qtest:function(){var e,t=j.call(arguments);3===t.length?(e=t[0],t=t.slice(1)):7===t.length?(e=I.qscore(t[0],t[1],t[2],t[3],t[4]),t=t.slice(5)):(e=I.qscore(t[0],t[1],t[2]),t=t.slice(3));var n=t[0],r=t[1];return 1-I.tukey.cdf(e,r,n-r)},tukeyhsd:function(e){for(var t=I.pooledstdev(e),n=e.map((function(e){return I.mean(e)})),r=e.reduce((function(e,t){return e+t.length}),0),i=[],o=0;o<e.length;++o)for(var a=o+1;a<e.length;++a){var s=I.qtest(n[o],n[a],e[o].length,e[a].length,t,r,e.length);i.push([[o,a],s])}return i}}),I.extend({normalci:function(){var e,t=j.call(arguments),n=new Array(2);return e=4===t.length?M.abs(I.normal.inv(t[1]/2,0,1)*t[2]/M.sqrt(t[3])):M.abs(I.normal.inv(t[1]/2,0,1)*I.stdev(t[2])/M.sqrt(t[2].length)),n[0]=t[0]-e,n[1]=t[0]+e,n},tci:function(){var e,t=j.call(arguments),n=new Array(2);return e=4===t.length?M.abs(I.studentt.inv(t[1]/2,t[3]-1)*t[2]/M.sqrt(t[3])):M.abs(I.studentt.inv(t[1]/2,t[2].length-1)*I.stdev(t[2],!0)/M.sqrt(t[2].length)),n[0]=t[0]-e,n[1]=t[0]+e,n},significant:function(e,t){return e<t}}),I.extend(I.fn,{normalci:function(e,t){return I.normalci(e,t,this.toArray())},tci:function(e,t){return I.tci(e,t,this.toArray())}}),I.extend(I.fn,{oneSidedDifferenceOfProportions:function(e,t,n,r){var i=R(e,t,n,r);return I.ztest(i,1)},twoSidedDifferenceOfProportions:function(e,t,n,r){var i=R(e,t,n,r);return I.ztest(i,2)}}),e.models=function(){function t(t){var r=t[0].length;return e.arange(r).map((function(i){var o=e.arange(r).filter((function(e){return e!==i}));return n(e.col(t,i).map((function(e){return e[0]})),e.col(t,o))}))}function n(t,n){var r=t.length,i=n[0].length-1,o=r-i-1,a=e.lstsq(n,t),s=e.multiply(n,a.map((function(e){return[e]}))).map((function(e){return e[0]})),u=e.subtract(t,s),c=e.mean(t),l=e.sum(s.map((function(e){return Math.pow(e-c,2)}))),h=e.sum(t.map((function(e,t){return Math.pow(e-s[t],2)}))),f=l+h;return{exog:n,endog:t,nobs:r,df_model:i,df_resid:o,coef:a,predict:s,resid:u,ybar:c,SST:f,SSE:l,SSR:h,R2:l/f}}return{ols:function(r,i){var o=n(r,i),a=function(n){var r=t(n.exog),i=Math.sqrt(n.SSR/n.df_resid),o=r.map((function(e){var t=e.SST,n=e.R2;return i/Math.sqrt(t*(1-n))})),a=n.coef.map((function(e,t){return(e-0)/o[t]})),s=a.map((function(t){var r=e.studentt.cdf(t,n.df_resid);return 2*(r>.5?1-r:r)})),u=e.studentt.inv(.975,n.df_resid),c=n.coef.map((function(e,t){var n=u*o[t];return[e-n,e+n]}));return{se:o,t:a,p:s,sigmaHat:i,interval95:c}}(o),s=function(t){var n=t.R2/t.df_model/((1-t.R2)/t.df_resid);return{F_statistic:n,pvalue:1-function(t,n,r){return e.beta.cdf(t/(r/n+t),n/2,r/2)}(n,t.df_model,t.df_resid)}}(o),u=1-(1-o.R2)*((o.nobs-1)/o.df_resid);return o.t=a,o.f=s,o.adjust_R2=u,o}}}(),e.extend({buildxmatrix:function(){for(var t=new Array(arguments.length),n=0;n<arguments.length;n++){var r=[1];t[n]=r.concat(arguments[n])}return e(t)},builddxmatrix:function(){for(var t=new Array(arguments[0].length),n=0;n<arguments[0].length;n++){var r=[1];t[n]=r.concat(arguments[0][n])}return e(t)},buildjxmatrix:function(t){for(var n=new Array(t.length),r=0;r<t.length;r++)n[r]=t[r];return e.builddxmatrix(n)},buildymatrix:function(t){return e(t).transpose()},buildjymatrix:function(e){return e.transpose()},matrixmult:function(t,n){var r,i,o,a,s;if(t.cols()==n.rows()){if(n.rows()>1){for(a=[],r=0;r<t.rows();r++)for(a[r]=[],i=0;i<n.cols();i++){for(s=0,o=0;o<t.cols();o++)s+=t.toArray()[r][o]*n.toArray()[o][i];a[r][i]=s}return e(a)}for(a=[],r=0;r<t.rows();r++)for(a[r]=[],i=0;i<n.cols();i++){for(s=0,o=0;o<t.cols();o++)s+=t.toArray()[r][o]*n.toArray()[i];a[r][i]=s}return e(a)}},regress:function(t,n){var r=e.xtranspxinv(t),i=t.transpose(),o=e.matrixmult(e(r),i);return e.matrixmult(o,n)},regresst:function(t,n,r){var i=e.regress(t,n),o={anova:{}},a=e.jMatYBar(t,i);o.yBar=a;var s=n.mean();o.anova.residuals=e.residuals(n,a),o.anova.ssr=e.ssr(a,s),o.anova.msr=o.anova.ssr/(t[0].length-1),o.anova.sse=e.sse(n,a),o.anova.mse=o.anova.sse/(n.length-(t[0].length-1)-1),o.anova.sst=e.sst(n,s),o.anova.mst=o.anova.sst/(n.length-1),o.anova.r2=1-o.anova.sse/o.anova.sst,o.anova.r2<0&&(o.anova.r2=0),o.anova.fratio=o.anova.msr/o.anova.mse,o.anova.pvalue=e.anovaftest(o.anova.fratio,t[0].length-1,n.length-(t[0].length-1)-1),o.anova.rmse=Math.sqrt(o.anova.mse),o.anova.r2adj=1-o.anova.mse/o.anova.mst,o.anova.r2adj<0&&(o.anova.r2adj=0),o.stats=new Array(t[0].length);for(var u,c,l,h=e.xtranspxinv(t),f=0;f<i.length;f++)u=Math.sqrt(o.anova.mse*Math.abs(h[f][f])),c=Math.abs(i[f]/u),l=e.ttest(c,n.length-t[0].length-1,r),o.stats[f]=[i[f],u,c,l];return o.regress=i,o},xtranspx:function(t){return e.matrixmult(t.transpose(),t)},xtranspxinv:function(t){var n=e.matrixmult(t.transpose(),t);return e.inv(n)},jMatYBar:function(t,n){var r=e.matrixmult(t,n);return new e(r)},residuals:function(t,n){return e.matrixsubtract(t,n)},ssr:function(e,t){for(var n=0,r=0;r<e.length;r++)n+=Math.pow(e[r]-t,2);return n},sse:function(e,t){for(var n=0,r=0;r<e.length;r++)n+=Math.pow(e[r]-t[r],2);return n},sst:function(e,t){for(var n=0,r=0;r<e.length;r++)n+=Math.pow(e[r]-t,2);return n},matrixsubtract:function(t,n){for(var r=new Array(t.length),i=0;i<t.length;i++){r[i]=new Array(t[i].length);for(var o=0;o<t[i].length;o++)r[i][o]=t[i][o]-n[i][o]}return e(r)}}),e.jStat=e}()},function(e,t,n){"use strict";
/**
 * @license
 * Copyright 2017 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function r(e,t){var n=e.length;const r=[];for(let a=0;a<n;a++){var i=n-1-a,o=e[i]||1;1<(t[t.length-1-a]||1)&&1===o&&r.unshift(i)}return r}function i(e,t){const n=[];for(let a=0;a<t.length;a++){var r=e[e.length-a-1],i=t.length-a-1,o=t[i];(null==r||1===r&&1<o)&&n.unshift(i)}return n}function o(e,t){const n=[];var r=Math.max(e.length,t.length);for(let i=0;i<r;i++){let r=e[e.length-i-1],o=(null==r&&(r=1),t[t.length-i-1]);if(null==o&&(o=1),1===r)n.unshift(o);else{if(1!==o&&r!==o)throw Error("Operands could not be broadcast together with shapes "+e+` and ${t}.`);n.unshift(r)}}return n}n.r(t),n.d(t,"getBroadcastDims",(function(){return r})),n.d(t,"getReductionAxes",(function(){return i})),n.d(t,"assertAndGetBroadcastShape",(function(){return o}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(6),i=n(4),o=n(3),a=n(15);t=n(5);const s=Object(t.b)({sum_:
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t=null,n=!1){let s=Object(o.a)(e,"x","sum");return e={x:s="bool"===s.dtype?Object(a.a)(s,"int32"):s},r.a.runKernel(i.gd,e,{axis:t,keepDims:n})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(10),i=n(60);
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function o(e,t){if((Object(r.A)(e)&&"string"!==t||Array.isArray(e))&&"complex64"!==t)throw new Error("Error creating a new Scalar: value must be a primitive (number|boolean|string)");if("string"!==t||!Object(r.A)(e)||e instanceof Uint8Array)return Object(i.a)(e,[],[],t);throw new Error("When making a scalar from encoded string, the value must be `Uint8Array`.")}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({zerosLike_:
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){return e=Object(o.a)(e,"x","zerosLike"),r.a.runKernel(i.rd,{x:e})}})},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return a})),n.d(t,"a",(function(){return s})),n.d(t,"d",(function(){return u}));var r=n(10);
/**
 * @license
 * Copyright 2017 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */class i{constructor(e){this.global=e,this.flags={},this.flagRegistry={},this.urlFlags={},this.getQueryParams=o,this.populateURLFlags()}setPlatform(e,t){null==this.platform||s.getBool("IS_TEST")||s.getBool("PROD"),this.platformName=e,this.platform=t}registerFlag(e,t,n){this.flagRegistry[e]={evaluationFn:t,setHook:n},null!=this.urlFlags[e]&&(t=this.urlFlags[e],s.getBool("IS_TEST")||s.getBool("PROD"),this.set(e,t))}async getAsync(e){return e in this.flags||(this.flags[e]=await this.evaluateFlag(e)),this.flags[e]}get(e){if(!(e in this.flags)){var t=this.evaluateFlag(e);if(Object(r.x)(t))throw new Error(`Flag ${e} cannot be synchronously evaluated. Please use getAsync() instead.`);this.flags[e]=t}return this.flags[e]}getNumber(e){return this.get(e)}getBool(e){return this.get(e)}getFlags(){return this.flags}get features(){return this.flags}set(e,t){if(null==this.flagRegistry[e])throw new Error(`Cannot set flag ${e} as it has not been registered.`);this.flags[e]=t,null!=this.flagRegistry[e].setHook&&this.flagRegistry[e].setHook(t)}evaluateFlag(e){if(null==this.flagRegistry[e])throw new Error(`Cannot evaluate flag '${e}': no evaluation function found.`);return this.flagRegistry[e].evaluationFn()}setFlags(e){this.flags=Object.assign({},e)}reset(){this.flags={},this.urlFlags={},this.populateURLFlags()}populateURLFlags(){if(void 0!==this.global&&void 0!==this.global.location&&void 0!==this.global.location.search){const e=this.getQueryParams(this.global.location.search);if("tfjsflags"in e){e.tfjsflags.split(",").forEach(e=>{var[e,t]=e.split(":");this.urlFlags[e]=function(e,t){if("true"===(t=t.toLowerCase())||"false"===t)return"true"===t;if(""+ +t===t)return+t;throw new Error(`Could not parse value flag value ${t} for flag ${e}.`)}(e,t)})}}}}function o(e){const t={};return e.replace(/[?&]([^=?&]+)(?:=([^&]*))?/g,(e,...n)=>{var r,i,o;return r=t,i=n[0],o=n[1],r[decodeURIComponent(i)]=decodeURIComponent(o||""),n.join("=")}),t}function a(){return s}let s=null;function u(e){s=e}},function(e,t,n){"use strict";var r={},i=(n.r(r),n.d(r,"conv2d",(function(){return mr})),n.d(r,"depthwiseConv2d",(function(){return vr})),n.d(r,"matMul",(function(){return br})),n(53)),o=n(245),a=n(246),s=n(16),u=n(6),c=n(4),l=n(3),h=n(10),f=n(5);const d=Object(f.b)({addN_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){h.b(Array.isArray(e),()=>"The argument passed to tf.addN() must be a list of tensors"),h.b(1<=e.length,()=>"Must pass at least one tensor to tf.addN(), but got "+e.length);const t=e.map((e,t)=>Object(l.a)(e,"tensors"+t,"addN")),n=t[0];t.forEach(e=>{if(e.dtype!==n.dtype)throw new Error("All tensors passed to tf.addN() must have the same dtype")}),t.forEach(e=>{if(!h.a(e.shape,n.shape))throw new Error("All tensors passed to tf.addN() must have the same shape")});var r=t;return u.a.runKernel(c.e,r)}});var p=n(177),m=n(178),g=n(179),A=n(180),v=n(247),b=n(248),y=n(249),w=n(181),x=n(250),C=n(134),k=n(29),E=n(15),S=n(9);const _=Object(f.b)({avgPool3d_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t,n,r,i,o="NDHWC"){let a=e=Object(l.a)(e,"x","avgPool3d","float32"),s=!1;return 4===e.rank&&(s=!0,a=Object(S.a)(e,[1,e.shape[0],e.shape[1],e.shape[2],e.shape[3]])),h.b(5===a.rank,()=>`Error in avgPool3d: x must be rank 5 but got rank ${a.rank}.`),h.b("NDHWC"===o,()=>"Error in avgPool3d: Only NDHWC is currently supported, but got dataFormat of "+o),Object(k.a)("avgPool3d",r,i),e={x:a},e=u.a.runKernel(c.p,e,{filterSize:t,strides:n,pad:r,dimRoundingMode:i,dataFormat:o}),e=Object(E.a)(e,a.dtype),s?Object(S.a)(e,[e.shape[1],e.shape[2],e.shape[3],e.shape[4]]):e}});var O=n(41),T=n(30),D=n(11),B=n(80),I=n(34),M=n(165);const j=Object(f.b)({basicLSTMCell_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t,n,r,i,o){e=Object(l.a)(e,"forgetBias","basicLSTMCell"),t=Object(l.a)(t,"lstmKernel","basicLSTMCell"),n=Object(l.a)(n,"lstmBias","basicLSTMCell"),r=Object(l.a)(r,"data","basicLSTMCell"),i=Object(l.a)(i,"c","basicLSTMCell"),o=Object(l.a)(o,"h","basicLSTMCell"),r=Object(O.a)([r,o],1),o=Object(T.a)(r,t),n=[t=(r=Object(s.a)(o,n)).shape[0],o=r.shape[1]/4],t=Object(I.a)(r,[0,0],n);var a=Object(I.a)(r,[0,o],n),u=Object(I.a)(r,[0,2*o],n);r=Object(I.a)(r,[0,3*o],n);return[o=Object(s.a)(Object(D.a)(Object(B.a)(t),Object(M.a)(a)),Object(D.a)(i,Object(B.a)(Object(s.a)(e,u)))),Object(D.a)(Object(M.a)(o),Object(B.a)(r))]}});var N=n(104),F=n(93);const R=Object(f.b)({batchNorm2d_:function(e,t,n,r,i,o){const a=Object(l.a)(e,"x","batchNorm"),s=Object(l.a)(t,"mean","batchNorm"),u=Object(l.a)(n,"variance","batchNorm");let c,f;return null!=i&&(c=Object(l.a)(i,"scale","batchNorm")),null!=r&&(f=Object(l.a)(r,"offset","batchNorm")),h.b(2===a.rank,()=>"Error in batchNorm2D: x must be rank 2 but got rank "+a.rank+"."),h.b(2===s.rank||1===s.rank,()=>`Error in batchNorm2D: mean must be rank 2 or rank 1 but got rank ${s.rank}.`),h.b(2===u.rank||1===u.rank,()=>`Error in batchNorm2D: variance must be rank 2 or rank 1 but got rank ${u.rank}.`),null!=c&&h.b(2===c.rank||1===c.rank,()=>`Error in batchNorm2D: scale must be rank 2 or rank 1 but got rank ${c.rank}.`),null!=f&&h.b(2===f.rank||1===f.rank,()=>`Error in batchNorm2D: offset must be rank 2 or rank 1 but got rank ${f.rank}.`),Object(F.a)(a,s,u,f,c,o)}}),P=Object(f.b)({batchNorm3d_:function(e,t,n,r,i,o){const a=Object(l.a)(e,"x","batchNorm"),s=Object(l.a)(t,"mean","batchNorm"),u=Object(l.a)(n,"variance","batchNorm");let c,f;return null!=i&&(c=Object(l.a)(i,"scale","batchNorm")),null!=r&&(f=Object(l.a)(r,"offset","batchNorm")),h.b(3===a.rank,()=>"Error in batchNorm3D: x must be rank 3 but got rank "+a.rank+"."),h.b(3===s.rank||1===s.rank,()=>`Error in batchNorm3D: mean must be rank 3 or rank 1 but got rank ${s.rank}.`),h.b(3===u.rank||1===u.rank,()=>`Error in batchNorm3D: variance must be rank 3 or rank 1 but got rank ${u.rank}.`),null!=c&&h.b(3===c.rank||1===c.rank,()=>`Error in batchNorm3D: scale must be rank 3 or rank 1 but got rank ${c.rank}.`),null!=f&&h.b(3===f.rank||1===f.rank,()=>`Error in batchNorm3D: offset must be rank 3 or rank 1 but got rank ${f.rank}.`),Object(F.a)(a,s,u,f,c,o)}}),L=Object(f.b)({batchNorm4d_:function(e,t,n,r,i,o){const a=Object(l.a)(e,"x","batchNorm"),s=Object(l.a)(t,"mean","batchNorm"),u=Object(l.a)(n,"variance","batchNorm");let c,f;return null!=i&&(c=Object(l.a)(i,"scale","batchNorm")),null!=r&&(f=Object(l.a)(r,"offset","batchNorm")),h.b(4===a.rank,()=>"Error in batchNorm4D: x must be rank 4 but got rank "+a.rank+"."),h.b(4===s.rank||1===s.rank,()=>`Error in batchNorm4D: mean must be rank 4 or rank 1 but got rank ${s.rank}.`),h.b(4===u.rank||1===u.rank,()=>`Error in batchNorm4D: variance must be rank 4 or rank 1 but got rank ${u.rank}.`),null!=c&&h.b(4===c.rank||1===c.rank,()=>`Error in batchNorm4D: scale must be rank 4 or rank 1 but got rank ${c.rank}.`),null!=f&&h.b(4===f.rank||1===f.rank,()=>`Error in batchNorm4D: offset must be rank 4 or rank 1 but got rank ${f.rank}.`),Object(F.a)(a,s,u,f,c,o)}}),U=Object(f.b)({bincount_:function(e,t,n){const r=Object(l.a)(e,"x","bincount"),i=Object(l.a)(t,"weights","bincount");return h.b("int32"===r.dtype,()=>"Error in bincount: input dtype must be int32, but got "+r.dtype),h.b(0<=n,()=>`size must be non-negative, but got ${n}.`),h.b(i.size===r.size||0===i.size,()=>`Error in bincount: weights must have the same size as input or0-length, but got input shape: ${r.shape}, weights shape: `+i.shape+"."),e={x:r,weights:i},u.a.runKernel(c.u,e,{size:n})}}),z=Object(f.b)({broadcastArgs_:function(e,t){if(e=Object(l.a)(e,"s0","broadcastArgs","int32"),t=Object(l.a)(t,"s1","broadcastArgs","int32"),1!==e.rank)throw new Error("broadcastArgs(): first input must be a vector (rank=1). Has rank "+e.rank);if(1!==t.rank)throw new Error("broadcastArgs(): second input must be a vector (rank=1). Has rank "+t.rank);return u.a.runKernel(c.v,{s0:e,s1:t})}});var H=n(113),$=n(58),Q=n(251),V=n(252),q=n(79),G=n(61);const W=Object(f.b)({concat1d_:function(e){return Object(O.a)(e,0)}}),K=Object(f.b)({concat2d_:function(e,t){return Object(O.a)(e,t)}}),Y=Object(f.b)({concat3d_:function(e,t){return Object(O.a)(e,t)}}),X=Object(f.b)({concat4d_:function(e,t){return Object(O.a)(e,t)}});var J=n(182),Z=n(77),ee=n(183);const te=Object(f.b)({conv3d_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t,n,r,i="NDHWC",o=[1,1,1]){e=Object(l.a)(e,"x","conv3d");const a=Object(l.a)(t,"filter","conv3d");let s=e,f=!1;return 4===e.rank&&(f=!0,s=Object(S.a)(e,[1,e.shape[0],e.shape[1],e.shape[2],e.shape[3]])),h.b(5===s.rank,()=>`Error in conv3d: input must be rank 5, but got rank ${s.rank}.`),h.b(5===a.rank,()=>"Error in conv3d: filter must be rank 5, but got rank "+a.rank+"."),h.b(s.shape[4]===a.shape[3],()=>`Error in conv3d: depth of input (${s.shape[4]}) must match input depth for filter ${a.shape[3]}.`),h.b(Object(k.i)(n,o),()=>`Error in conv3D: Either strides or dilations must be 1. Got strides ${n} and dilations '${o}'`),h.b("NDHWC"===i,()=>`Error in conv3d: got dataFormat of ${i} but only NDHWC is currently supported.`),t={x:s,filter:a},e=u.a.runKernel(c.G,t,{strides:n,pad:r,dataFormat:i,dilations:o}),f?Object(S.a)(e,[e.shape[1],e.shape[2],e.shape[3],e.shape[4]]):e}});var ne=n(211);const re=Object(f.b)({conv3dTranspose_:function(e,t,n,r,i){return e=Object(l.a)(e,"x","conv3dTranspose"),t=Object(l.a)(t,"filter","conv3dTranspose"),Object(ne.a)(n,e,t,r,i)}});var ie=n(135),oe=n(184),ae=n(120),se=n(136);const ue=Object(f.b)({denseBincount_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t,n,r=!1){const i=Object(l.a)(e,"x","denseBincount"),o=Object(l.a)(t,"weights","denseBincount");return h.b("int32"===i.dtype,()=>"Error in denseBincount: input dtype must be int32, but got "+i.dtype),h.b(i.rank<=2,()=>`Error in denseBincount: input must be at most rank 2, but got rank ${i.rank}.`),h.b(0<=n,()=>`size must be non-negative, but got ${n}.`),h.b(o.size===i.size||0===o.size,()=>`Error in denseBincount: weights must have the same shape as x or 0-length, but got x shape: ${i.shape}, weights shape: `+o.shape+"."),e={x:i,weights:o},u.a.runKernel(c.O,e,{size:n,binaryOutput:r})}});var ce=n(185),le=n(105);const he=Object(f.b)({diag_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){return e=Object(l.a)(e,"x","diag"),u.a.runKernel(c.T,{x:e})}});var fe=n(186),de=n(18),pe=n(187),me=n(188);const ge=Object(f.b)({einsum_:
/**
 * @license
 * Copyright 2021 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,...t){return t=t.map((e,t)=>Object(l.a)(e,"tensors"+t,"einsum")),u.a.runKernel(c.X,t,{equation:e})}});var Ae=n(137),ve=n(106),be=n(253),ye=n(189),we=n(49),xe=n(72),Ce=n(254),ke=n(82);const Ee=Object(f.b)({eye_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t,n,r="float32"){null==t&&(t=e);const i=Object($.a)([e,t],r);var o=e<=t?e:t;for(let e=0;e<o;++e)i.set(1,e,e);if(r=Object(S.a)(i.toTensor(),[e,t]),null==n)return r;if(1===n.length)return Object(ke.a)(Object(xe.a)(r,0),[n[0],1,1]);if(2===n.length)return Object(ke.a)(Object(xe.a)(Object(xe.a)(r,0),0),[n[0],n[1],1,1]);if(3===n.length)return Object(ke.a)(Object(xe.a)(Object(xe.a)(Object(xe.a)(r,0),0),0),[n[0],n[1],n[2],1,1]);throw new Error(`eye() currently supports only 1D and 2D batchShapes, but received ${n.length}D.`)}});var Se=n(88),_e=n(138),Oe=n(133),Te=n(108),De=n(51),Be=n(78),Ie=n(109),Me=n(255),je=n(256),Ne=n(257),Fe=n(139),Re=n(140),Pe=n(64);
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function Le(e,t,n){if(n<=0)throw new Error("The number of values should be positive.");return u.a.runKernel(c.Db,{},{start:e,stop:t,num:n})}var Ue=n(190),ze=n(84),He=n(191),$e=n(258),Qe=n(259),Ve=n(141),qe=n(68),Ge=n(110),We=n(142),Ke=n(193);
/**
 * @license
 * Copyright 2022 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */const Ye=2147483648,Xe=Object(f.b)({searchSorted_:function(e,t,n="left"){e=Object(l.a)(e,"sortedSequence","searchSorted"),t=Object(l.a)(t,"values","searchSorted");var r=e.shape[e.shape.length-1],i=t.shape[t.shape.length-1];e=Object(S.a)(e,[-1,r]),r=Object(S.a)(t,[-1,i]);if(e.rank<2)throw new Error("Sorted input argument must be at least 2-dimensional");if(e.shape[0]!==r.shape[0])throw new Error("Leading dimension of 'sortedSequence' and 'values' must match.");if(Object(h.O)(r.shape)>=Ye)throw new Error("values tensor size must less than "+Ye);if(e.shape[1]>=Ye)throw new Error(`trailing dim_size must less than ${Ye} for int32 output type, was `+e.shape[1]);return u.a.runKernel(c.Gc,{sortedSequence:e,values:r},{side:n})}});
/**
 * @license
 * Copyright 2022 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function Je(e,t){return Xe(e,t,"left")}var Ze=n(81),et=n(143);const tt=Object(f.b)({maxPool3d_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t=[1,1,1],n,r,i,o="NDHWC"){let a=e=Object(l.a)(e,"x","maxPool3d"),s=!1;return 4===e.rank&&(s=!0,a=Object(S.a)(e,[1,e.shape[0],e.shape[1],e.shape[2],e.shape[3]])),h.b(5===a.rank,()=>`Error in maxPool3d: x must be rank 5 but got rank ${a.rank}.`),h.b("NDHWC"===o,()=>"Error in maxPool3d: Only NDHWC is currently supported, but got dataFormat of "+o),Object(k.a)("maxPool3d",r,i),e={x:a},e=u.a.runKernel(c.Ob,e,{filterSize:t,strides:n,pad:r,dimRoundingMode:i,dataFormat:o}),s?Object(S.a)(e,[e.shape[1],e.shape[2],e.shape[3],e.shape[4]]):e}}),nt=Object(f.b)({maxPoolWithArgmax_:function(e,t,n,r,i=!1){return e=Object(l.a)(e,"x","maxPoolWithArgmax"),{result:(e=u.a.runKernel(c.Rb,{x:e},{filterSize:t,strides:n,pad:r,includeBatchInIndex:i}))[0],indexes:e[1]}}});
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */var rt=n(103),it=n(97),ot=n(63),at=n(7);
/**
 * @license
 * Copyright 2021 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function st(e,t,{indexing:n="xy"}={}){if("xy"!==n&&"ij"!==n)throw new TypeError(n+" is not a valid third argument to meshgrid");if(void 0===e)return[];let r=Object(l.a)(e,"x","meshgrid",e instanceof at.a?e.dtype:"float32");if(void 0===t)return[r];let i=Object(l.a)(t,"y","meshgrid",t instanceof at.a?t.dtype:"float32");return e=Object(h.O)(r.shape),t=Object(h.O)(i.shape),"xy"===n?(r=Object(S.a)(r,[1,-1]),i=Object(S.a)(i,[-1,1]),[Object(T.a)(Object(ot.a)([t,1],r.dtype),r),Object(T.a)(i,Object(ot.a)([1,e],i.dtype))]):(r=Object(S.a)(r,[-1,1]),i=Object(S.a)(i,[1,-1]),[Object(T.a)(r,Object(ot.a)([1,t],r.dtype)),Object(T.a)(Object(ot.a)([e,1],i.dtype),i)])}var ut=n(121),ct=n(144),lt=n(194),ht=n(195),ft=n(48),dt=n(31),pt=n(17);const mt=Object(f.b)({moments_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t=null,n=!1){e=Object(l.a)(e,"x","moments");t=Object(h.I)(t,e.shape);var r=Object(it.a)(e,t,n);let i=r.shape;return n||(i=Object(ft.e)(r.shape,t)),e=Object(dt.a)(Object(pt.a)(Object(E.a)(e,"float32"),Object(S.a)(r,i))),{mean:r,variance:Object(it.a)(e,t,n)}}}),gt=Object(f.b)({multiRNNCell_:function(e,t,n,r){t=Object(l.a)(t,"data","multiRNNCell");var i=Object(l.b)(n,"c","multiRNNCell"),o=Object(l.b)(r,"h","multiRNNCell");let a=t;const s=[];for(let t=0;t<e.length;t++){var u=e[t](a,i[t],o[t]);s.push(u[0]),s.push(u[1]),a=u[1]}const c=[],h=[];for(let e=0;e<s.length;e+=2)c.push(s[e]),h.push(s[e+1]);return[c,h]}}),At=Object(f.b)({multinomial_:function(e,t,n,r=!1){var i=(e=Object(l.a)(e,"logits","multinomial")).size,o=e.rank;if(i<2)throw new Error("Error in multinomial: you need at least 2 outcomes, but got "+i+".");if(2<o)throw new Error("Rank of probabilities must be 1 or 2, but is "+o);return n=n||Math.random(),i=1===o?Object(S.a)(e,[1,-1]):e,e=u.a.runKernel(c.Yb,{logits:i},{numSamples:t,seed:n,normalized:r}),1===o?Object(S.a)(e,[e.size]):e}});var vt=n(35),bt=n(145),yt=n(122),wt=n(260);const xt=Object(f.b)({outerProduct_:function(e,t){const n=Object(l.a)(e,"v1","outerProduct"),r=Object(l.a)(t,"v2","outerProduct");return h.b(1===n.rank&&1===r.rank,()=>`Error in outerProduct: inputs must be rank 1, but got ranks ${n.rank} and ${r.rank}.`),e=Object(S.a)(n,[-1,1]),t=Object(S.a)(r,[1,-1]),Object(T.a)(e,t)}});var Ct=n(65);const kt=Object(f.b)({pad1d_:function(e,t,n=0){return Object(h.b)(2===t.length,()=>"Invalid number of paddings. Must be length of 2."),Object(Ct.a)(e,[t],n)}}),Et=Object(f.b)({pad2d_:function(e,t,n=0){return Object(h.b)(2===t.length&&2===t[0].length&&2===t[1].length,()=>"Invalid number of paddings. Must be length of 2 each."),Object(Ct.a)(e,t,n)}}),St=Object(f.b)({pad3d_:function(e,t,n=0){return Object(h.b)(3===t.length&&2===t[0].length&&2===t[1].length&&2===t[2].length,()=>"Invalid number of paddings. Must be length of 2 each."),Object(Ct.a)(e,t,n)}}),_t=Object(f.b)({pad4d_:function(e,t,n=0){return Object(h.b)(4===t.length&&2===t[0].length&&2===t[1].length&&2===t[2].length&&2===t[3].length,()=>"Invalid number of paddings. Must be length of 2 each."),Object(Ct.a)(e,t,n)}});var Ot=n(196),Tt=n(62),Dt=n(146),Bt=n(176),It=n(197);const Mt=Object(f.b)({raggedGather_:
/**
 * @license
 * Copyright 2022 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t,n,r){e=e.map((e,t)=>Object(l.a)(e,"tensors"+t,"raggedGather","int32")),t=Object(l.a)(t,"paramsDenseValues","raggedGather"),n=Object(l.a)(n,"indices","raggedGather","int32");const i=u.a.runKernel(c.nc,{paramsNestedSplits:e,paramsDenseValues:t,indices:n},{outputRaggedRank:r});return{outputNestedSplits:i.slice(0,i.length-1),outputDenseValues:i[i.length-1]}}}),jt=Object(f.b)({raggedRange_:function(e,t,n){return e=Object(l.a)(e,"starts","raggedRange"),t=Object(l.a)(t,"limits","raggedRange",e.dtype),n=Object(l.a)(n,"deltas","raggedRange",e.dtype),{rtNestedSplits:(e=u.a.runKernel(c.oc,{starts:e,limits:t,deltas:n}))[0],rtDenseValues:e[1]}}}),Nt=Object(f.b)({raggedTensorToTensor_:function(e,t,n,r,i){return e=Object(l.a)(e,"shape","raggedTensorToTensor","int32"),t=Object(l.a)(t,"values","raggedTensorToTensor"),n=Object(l.a)(n,"defaultValue","raggedTensorToTensor",t.dtype),r=r.map((e,t)=>Object(l.a)(e,"tensors"+t,"raggedTensorToTensor","int32")),u.a.runKernel(c.pc,{shape:e,values:t,defaultValue:n,rowPartitionTensors:r},{rowPartitionTypes:i})}}),Ft=Object(f.b)({rand_:function(e,t,n){Object(h.c)(e);var r=Object(h.O)(e);let i=null;if(null==n||"float32"===n)i=new Float32Array(r);else if("int32"===n)i=new Int32Array(r);else{if("bool"!==n)throw new Error("Unknown data type "+n);i=new Uint8Array(r)}for(let e=0;e<r;e++)i[e]=t();return u.a.makeTensor(i,e,n)}});
/**
 * @license
 * Copyright 2022 Google LLC.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */var Rt=n(73);n(153);
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
class Pt{constructor(e,t,n,r,i){this.mean=e,this.stdDev=t,this.dtype=n,this.nextVal=NaN,this.truncated=r,this.truncated&&(this.upper=this.mean+2*this.stdDev,this.lower=this.mean-2*this.stdDev);const o=i||Math.random();this.random=Rt.alea(o.toString())}nextValue(){var e;if(!isNaN(this.nextVal))return e=this.nextVal,this.nextVal=NaN,e;let t,n,r=!1;for(;!r;){let e,o,a;for(;e=2*this.random()-1,o=2*this.random()-1,1<=(a=e*e+o*o)||0===a;);var i=Math.sqrt(-2*Math.log(a)/a);t=this.mean+this.stdDev*e*i,n=this.mean+this.stdDev*o*i,this.truncated&&!this.isValidTruncated(t)||(r=!0)}return this.truncated&&!this.isValidTruncated(n)||(this.nextVal=this.convertValue(n)),this.convertValue(t)}convertValue(e){return null==this.dtype||"float32"===this.dtype?e:Math.round(e)}isValidTruncated(e){return e<=this.upper&&e>=this.lower}}class Lt{constructor(e,t,n,r){this.alpha=e,this.beta=1/t,this.dtype=n;const i=r||Math.random();this.randu=Rt.alea(i.toString()),this.randn=new Pt(0,1,n,!1,this.randu()),this.d=e<1?e+2/3:e-1/3,this.c=1/Math.sqrt(9*this.d)}nextValue(){let e,t,n,r,i,o;for(;;){for(;r=this.randn.nextValue(),(o=1+this.c*r)<=0;);if(o*=o*o,t=1-.331*(e=r*r)*e,n=.5*e+this.d*(1-o+Math.log(o)),(i=this.randu())<t||Math.log(i)<n)break}return o=1/this.beta*this.d*o,this.alpha<1&&(o*=Math.pow(this.randu(),1/this.alpha)),this.convertValue(o)}convertValue(e){return"float32"===this.dtype?e:Math.round(e)}}class Ut{constructor(e=0,t=1,n,r){if(this.canReturnFloat=()=>null==this.dtype||"float32"===this.dtype,this.min=e,this.range=t-e,this.dtype=n,"number"==typeof(r=null==r?Math.random():r)&&(r=r.toString()),!this.canReturnFloat()&&this.range<=1)throw new Error(`The difference between ${e} - ${t} <= 1 and dtype is not float`);this.random=Rt.alea(r)}convertValue(e){return this.canReturnFloat()?e:Math.round(e)}nextValue(){return this.convertValue(this.min+this.range*this.random())}}const zt=Object(f.b)({randomGamma_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t,n=1,r="float32",i){if(Object(h.c)(e),null==n&&(n=1),"float32"!==(r=null==r?"float32":r)&&"int32"!==r)throw new Error("Unsupported data type "+r);const o=new Lt(t,n,r,i),a=Object($.a)(e,r);for(let e=0;e<a.values.length;e++)a.values[e]=o.nextValue();return a.toTensor()}}),Ht=Object(f.b)({randomNormal_:function(e,t=0,n=1,r,i){if(Object(h.c)(e),null!=r&&"bool"===r)throw new Error("Unsupported data type "+r);const o=new Pt(t,n,r,!1,i),a=Object($.a)(e,r);for(let e=0;e<a.values.length;e++)a.values[e]=o.nextValue();return a.toTensor()}}),$t=Object(f.b)({randomStandardNormal_:function(e,t,n){if(null!=t&&"bool"===t)throw new Error("Unsupported data type "+t);return Ht(e,0,1,t,n)}}),Qt=Object(f.b)({randomUniform_:function(e,t=0,n=1,r="float32",i){Object(h.c)(e);const o=Object($.a)(e,r),a=new Ut(t,n,null,i);for(let e=0;e<o.values.length;e++)o.values[e]=a.nextValue();return o.toTensor()}});
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function Vt(e,t,n=1,r="float32"){if(0===n)throw new Error("Cannot have a step of zero");return u.a.runKernel(c.qc,{},{start:e,stop:t,step:n,dtype:r})}var qt=n(98),Gt=n(261),Wt=n(90),Kt=n(147),Yt=n(59);const Xt=Object(f.b)({reverse1d_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){const t=Object(l.a)(e,"x","reverse");return h.b(1===t.rank,()=>`Error in reverse1D: x must be rank 1 but got rank ${t.rank}.`),Object(Yt.a)(t,0)}}),Jt=Object(f.b)({reverse2d_:function(e,t){const n=Object(l.a)(e,"x","reverse");return h.b(2===n.rank,()=>`Error in reverse2D: x must be rank 2 but got rank ${n.rank}.`),Object(Yt.a)(n,t)}}),Zt=Object(f.b)({reverse3d_:function(e,t){const n=Object(l.a)(e,"x","reverse");return h.b(3===n.rank,()=>`Error in reverse3D: x must be rank 3 but got rank ${n.rank}.`),Object(Yt.a)(n,t)}}),en=Object(f.b)({reverse4d_:function(e,t){const n=Object(l.a)(e,"x","reverse");return h.b(4===n.rank,()=>`Error in reverse4D: x must be rank 4 but got rank ${n.rank}.`),Object(Yt.a)(n,t)}});
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */var tn=n(198),nn=n(199),rn=n(22),on=n(200),an=n(201);
/**
 * @license
 * Copyright 2020 Google Inc. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */async function sn(e,t){const n=Object(l.a)(e,"x","setdiff1d"),r=Object(l.a)(t,"y","setdiff1d");h.b(n.dtype===r.dtype,()=>`x and y should have the same dtype, but got x (${n.dtype}) and y (${r.dtype}).`),h.b(1===n.rank,()=>`x should be 1D tensor, but got x (${n.shape}).`),h.b(1===r.rank,()=>`y should be 1D tensor, but got y (${r.shape}).`);var i=await n.data();e=await r.data();const o=new Set(e);let a=0;for(let e=0;e<i.length;e++)o.has(i[e])||a++;const s=new at.b([a],n.dtype),u=new at.b([a],"int32");for(let e=0,t=0;e<i.length;e++)o.has(i[e])||(s.values[t]=i[e],u.values[t]=e,t++);return[s.toTensor(),u.toTensor()]}var un=n(262),cn=n(202),ln=n(203);const hn=Object(f.b)({slice1d_:
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t,n){const r=Object(l.a)(e,"x","slice1d");return h.b(1===r.rank,()=>`slice1d expects a rank-1 tensor, but got a rank-${r.rank} tensor`),Object(I.a)(r,[t],[n])}}),fn=Object(f.b)({slice2d_:function(e,t,n){const r=Object(l.a)(e,"x","slice2d");return h.b(2===r.rank,()=>`slice2d expects a rank-2 tensor, but got a rank-${r.rank} tensor`),Object(I.a)(r,t,n)}}),dn=Object(f.b)({slice3d_:function(e,t,n){const r=Object(l.a)(e,"x","slice3d");return h.b(3===r.rank,()=>`slice3d expects a rank-3 tensor, but got a rank-${r.rank} tensor`),Object(I.a)(r,t,n)}}),pn=Object(f.b)({slice4d_:function(e,t,n){const r=Object(l.a)(e,"x","slice4d");return h.b(4===r.rank,()=>`slice4d expects a rank-4 tensor, but got a rank-${r.rank} tensor`),Object(I.a)(r,t,n)}});
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */var mn=n(263),gn=n(192),An=n(111),vn=n(148),bn=n(123),yn=n(204),wn=n(149),xn=n(69),Cn=n(47),kn=n(150),En=n(112),Sn=n(70),_n=n(91),On=n(264),Tn=n(21),Dn=n(265),Bn=n(94),In=n(60);
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function Mn(e,t){Object(h.d)(e);var n=Object(l.c)(e,t);if(1!==n.length)throw new Error("tensor1d() requires values to be a flat/TypedArray");return Object(In.a)(e,null,n,t)}
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function jn(e,t,n){if(Object(h.d)(e),null!=t&&2!==t.length)throw new Error("tensor2d() requires shape to have two numbers");var r=Object(l.c)(e,n);if(2!==r.length&&1!==r.length)throw new Error("tensor2d() requires values to be number[][] or flat/TypedArray");if(1===r.length&&null==t)throw new Error("tensor2d() requires shape to be provided when `values` are a flat/TypedArray");return Object(In.a)(e,t,r,n)}var Nn=n(205);
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function Fn(e,t,n){if(Object(h.d)(e),null!=t&&4!==t.length)throw new Error("tensor4d() requires shape to have four numbers");var r=Object(l.c)(e,n);if(4!==r.length&&1!==r.length)throw new Error("tensor4d() requires values to be number[][][][] or flat/TypedArray");if(1===r.length&&null==t)throw new Error("tensor4d() requires shape to be provided when `values` are a flat array");return Object(In.a)(e,t,r,n)}
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function Rn(e,t,n){if(Object(h.d)(e),null!=t&&5!==t.length)throw new Error("tensor5d() requires shape to have five numbers");var r=Object(l.c)(e,n);if(5!==r.length&&1!==r.length)throw new Error("tensor5d() requires values to be number[][][][][] or flat/TypedArray");if(1===r.length&&null==t)throw new Error("tensor5d() requires shape to be provided when `values` are a flat array");return Object(In.a)(e,t,r,n)}
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function Pn(e,t,n){if(Object(h.d)(e),null!=t&&6!==t.length)throw new Error("tensor6d() requires shape to have six numbers");var r=Object(l.c)(e,n);if(6!==r.length&&1!==r.length)throw new Error("tensor6d() requires values to be number[][][][][][] or flat/TypedArray");if(1===r.length&&null==t)throw new Error("tensor6d() requires shape to be provided when `values` are a flat array");return t=t||r,Object(In.a)(e,t,r,n)}var Ln=n(206);
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */const Un=Object(f.b)({truncatedNormal_:function(e,t=0,n=1,r,i){if(Object(h.c)(e),null!=r&&"bool"===r)throw new Error("Unsupported data type $ { dtype }");const o=new Pt(t,n,r,!0,i),a=Object($.a)(e,r);for(let e=0;e<a.values.length;e++)a.values[e]=o.nextValue();return a.toTensor()}});var zn=n(207),Hn=n(151),$n=n(92);
/**
 * @license
 * Copyright 2022 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function Qn(e,t){return Xe(e,t,"right")}
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function Vn(e,t=!0,n,r){return u.a.makeVariable(e,t,n,r)}var qn=n(42),Gn=n(208);const Wn=
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
async function(e){const t=Object(l.a)(e,"condition","whereAsync","bool");var n=await t.data();n=Object(Gn.a)(t.shape,n);return e!==t&&t.dispose(),n};var Kn=n(89),Yn=n(23);
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */async function Xn(e,t,n){const r=Object(l.a)(e,"tensor","boolMask"),i=Object(l.a)(t,"mask","boolMask","bool");var o=null==n?0:n,a=i.rank;const s=r.shape;h.b(0<a,()=>"mask cannot be scalar"),h.e(s.slice(o,o+a),i.shape,"mask's shape must match the first K dimensions of tensor's shape,");let u=1;for(let e=o;e<o+a;e++)u*=s[e];n=s.slice(0,o).concat([u],s.slice(o+a));const c=Object(S.a)(r,n),f=Object(S.a)(i,[-1]),d=await Wn(f),p=Object(En.a)(d,[1]);return n=Object(Te.a)(c,p,o),e!==r&&r.dispose(),t!==i&&i.dispose(),p.dispose(),c.dispose(),f.dispose(),d.dispose(),n}var Jn=n(52),Zn=n(107),er=n(28);const tr=Object(f.b)({movingAverage_:
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t,n,r,i=!0){e=Object(l.a)(e,"v","movingAverage"),t=Object(l.a)(t,"x","movingAverage"),n=Object(l.a)(n,"decay","movingAverage");var o=(Object(er.assertTypesMatch)(e,t),h.b(h.a(e.shape,t.shape),()=>"Shape mismatch in v and x"),Object(rn.a)(1)),a=Object(pt.a)(o,n);let u=Object(D.a)(Object(pt.a)(t,e),a);return i&&(h.b(null!=r,()=>"When using zeroDebias: true, step is required."),t=Object(l.a)(r,"step","movingAverage"),u=Object(de.a)(u,Object(pt.a)(o,Object(Tt.a)(n,t)))),Object(s.a)(e,u)}});var nr=n(131);
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */const rr=Object(f.b)({scatterND_:function(e,t,n){return Object(h.c)(n),e=Object(l.a)(e,"indices","scatterND","int32"),t=Object(l.a)(t,"updates","scatterND"),nr.validateInput(t,e,n),e={indices:e,updates:t},u.a.runKernel(c.Fc,e,{shape:n})}}),ir=Object(f.b)({sparseToDense_:
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t,n,r=0){Object(h.c)(n);e=Object(l.a)(e,"sparseIndices","sparseToDense","int32");var i=t=Object(l.a)(t,"sparseValues","sparseToDense","string_or_numeric"),o=n,a=r=Object(l.a)(r,"defaultValue","sparseToDense",t.dtype);if("int32"!==(f=e).dtype)throw new Error(`tf.sparseToDense() expects the indices to be int32 type, but the dtype was ${f.dtype}.`);if(2<f.rank)throw new Error(`sparseIndices should be a scalar, vector, or matrix, but got shape ${f.shape}.`);var s=0<f.rank?f.shape[0]:1,f=1<f.rank?f.shape[1]:1;if(o.length!==f)throw new Error(`outputShape has incorrect number of elements:, ${o.length}, should be: ${f}.`);if(o=i.size,0!==i.rank&&(1!==i.rank||o!==s))throw new Error("sparseValues has incorrect shape "+i.shape+`, should be [] or [${s}]`);if(i.dtype!==a.dtype)throw new Error("sparseValues.dtype must match defaultValues.dtype");return u.a.runKernel(c.Vc,{sparseIndices:e,sparseValues:t,defaultValue:r},{outputShape:n})}}),or=Object(f.b)({gatherND_:function(e,t){return t=Object(l.a)(t,"indices","gatherND","int32"),e=Object(l.a)(e,"x","gatherND","string_or_numeric"),u.a.runKernel(c.ob,{params:e,indices:t})}}),ar=Object(f.b)({dropout_:
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t,n,r){const i=Object(l.a)(e,"x","dropout");return h.b("float32"===i.dtype,()=>`x has to be a floating point tensor since it's going to be scaled, but got a ${i.dtype} tensor instead.`),h.b(0<=t&&t<1,()=>`rate must be a float in the range [0, 1), but got ${t}.`),0===t?e instanceof at.a?i.clone():i:(e=function(e,t){if(null==t)return e.shape.slice();if(h.a(e.shape,t))return t;if(e.shape.length!==t.length)return t;{const n=[];for(let r=0;r<e.shape.length;r++)null==t[r]&&null!=e.shape[r]?n.push(e.shape[r]):n.push(t[r]);return n}}(i,n),n=1-t,e=Object(de.a)(Object(_e.a)(Object(s.a)(Qt(e,0,1,"float32",r),n)),n),Object(D.a)(i,e))}});
/**
 * @license
 * Copyright 2019 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function sr(e){return Math.floor(Math.pow(2,Math.ceil(Math.log(e)/Math.log(2))))}function ur(e,t,n){var r=1-e%2;const i=new Float32Array(e);for(let a=0;a<e;++a){var o=2*Math.PI*a/(e+r-1);i[a]=t-n*Math.cos(o)}return Mn(i,"float32")}
/**
 * @license
 * Copyright 2019 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */async function cr(e,t,n=1){const r=Object(l.a)(e,"predictions","inTopK"),i=Object(l.a)(t,"targets","inTopK"),o=(Object(h.b)(1<r.rank,()=>"inTopK() expects the predictions to be of rank 2 or higher, but got "+r.rank),Object(h.b)(r.rank-1===i.rank,()=>"predictions rank should be 1 larger than targets rank, but got predictions rank "+r.rank+" and targets rank "+i.rank),Object(h.e)(r.shape.slice(0,r.shape.length-1),i.shape,"predictions's shape should be align with the targets' shape, except the last dimension."),r.shape[r.shape.length-1]),a=(Object(h.b)(0<n&&n<=o,()=>`'k' passed to inTopK() must be > 0 && <= the predictions last dimension (${o}), but got `+n),await r.data());var s=await i.data(),[u,c]=[a.length/o,o];const f=Object(h.o)("bool",u);for(let e=0;e<u;e++){var d=e*c,p=a.subarray(d,d+c);const t=[];for(let e=0;e<p.length;e++)t.push({value:p[e],index:e});t.sort((e,t)=>t.value-e.value);for(let r=f[e]=0;r<n;r++)if(t[r].index===s[e]){f[e]=1;break}}return e!==r&&r.dispose(),t!==i&&i.dispose(),Object(Bn.a)(f,i.shape,"bool")}var lr=n(43),hr=n(20),fr=n(154),dr=n(152),pr=n(54);const mr=Object(f.b)({fusedConv2d_:
/**
 * @license
 * Copyright 2019 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function({x:e,filter:t,strides:n,pad:r,dataFormat:i="NHWC",dilations:o=[1,1],dimRoundingMode:a,bias:f,activation:d="linear",preluActivationWeights:p,leakyreluAlpha:m}){if(d=d||"linear",!1===Object(pr.d)(u.a.state.gradientDepth,d)){h.b("NHWC"===i,()=>`Error in fused conv2d: got dataFormat of ${i} but only NHWC is currently supported for the case of gradient depth is 0 and the activation is not linear.`);let u=Object(Z.a)(e,t,n,r,i,o,a);return null!=f&&(u=Object(s.a)(u,f)),Object(pr.a)(u,d,p,m)}e=Object(l.a)(e,"x","conv2d","float32");const g=Object(l.a)(t,"filter","conv2d","float32");let A=e,v=!1;3===e.rank&&(v=!0,A=Object(S.a)(e,[1,e.shape[0],e.shape[1],e.shape[2]])),h.b(4===A.rank,()=>"Error in fused conv2d: input must be rank 4, but got rank "+A.rank+"."),h.b(4===g.rank,()=>"Error in fused conv2d: filter must be rank 4, but got rank "+g.rank+"."),k.a("fused conv2d",r,a);const b="NHWC"===i?A.shape[3]:A.shape[1],y=(h.b(g.shape[2]===b,()=>`Error in conv2d: depth of input (${b}) must match input depth for filter ${g.shape[2]}.`),h.b(k.i(n,o),()=>`Error in conv2D: Either strides or dilations must be 1. Got strides ${n} and dilations '${o}'`),k.b(A.shape,g.shape,n,o,r,a));let w,x;if(null!=f&&(w=Object(l.a)(f,"bias","fused conv2d"),[w]=Object(er.makeTypesMatch)(w,e),"NHWC"===i?hr.assertAndGetBroadcastShape(y.outShape,w.shape):(h.b(w.shape.length<=1,()=>`Error in fused conv2d: only supports scalar or 1-D Tensor bias for NCHW format but got the bias of rank-${w.shape.length}.`),h.b(0===w.shape.length||w.shape[0]===y.outChannels||1===w.shape[0],()=>`Error in fused conv2d: bias shape (${w.shape}) is not compatible with the number of output channels (${y.outChannels})`))),null!=p){const e=p.shape;if(h.b(e.length<=1||3===e.length,()=>`Error in fused conv2d: only supports scalar, 1-D Tensor or 3-D Tensor PReLU activation weights but got a tensor of rank-${e.length}.`),1===e.length)h.b(1===e[0]||e[0]===y.outChannels,()=>`Error in fused conv2d: PReLU activation weights (${e}) is not compatible with the number of output channels (${y.outChannels}).`);else if(3===e.length)try{hr.assertAndGetBroadcastShape(e,y.outShape)}catch(g){throw t=`Error in fused conv2d: PReLU activation weights (${e}) is not compatible with the output shape of the conv2d (${y.outShape}).`,Error(t)}x=Object(l.a)(p,"prelu weights","fused conv2d")}const C=(e,t)=>{h.b("NHWC"===i,()=>`Error in gradient of fused conv2D: got dataFormat of ${i} but only NHWC is currently supported.`);var a,[t,s,a,u]=t;e=Object(pr.c)(e,a,d);const c=[a=(h.b(k.j(o),()=>`Error in gradient of fused conv2D: dilation rates greater than 1 are not yet supported in gradients. Got dilations '${o}'`),Object(dr.a)(s.shape,e,t,n,r)),Object(fr.a)(s,e,t.shape,n,r)];return null!=u&&(a=Object(pr.b)(u,e),c.push(a)),c},E={x:A,filter:g,bias:w,preluActivationWeights:x},_={strides:n,pad:r,dataFormat:i,dilations:o,dimRoundingMode:a,activation:d,leakyreluAlpha:m};if(null==f){return Object(lr.a)((e,t,n)=>{let r=u.a.runKernel(c.mb,E,_);return n([t,e,r]),{value:r=v?Object(S.a)(r,[r.shape[1],r.shape[2],r.shape[3]]):r,gradFunc:C}})(A,g)}return Object(lr.a)((e,t,n,r)=>{let i=u.a.runKernel(c.mb,E,_);return r([t,e,i,n]),{value:i=v?Object(S.a)(i,[i.shape[1],i.shape[2],i.shape[3]]):i,gradFunc:C}})(A,g,w)}});var gr=n(215),Ar=n(214);const vr=Object(f.b)({fusedDepthwiseConv2d_:
/**
 * @license
 * Copyright 2019 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function({x:e,filter:t,strides:n,pad:r,dataFormat:i="NHWC",dilations:o=[1,1],dimRoundingMode:a,bias:f,activation:d="linear",preluActivationWeights:p,leakyreluAlpha:m}){if(!1===Object(pr.d)(u.a.state.gradientDepth,d)){let u=Object(le.a)(e,t,n,r,i,o,a);return null!=f&&(u=Object(s.a)(u,f)),Object(pr.a)(u,d,p,m)}e=Object(l.a)(e,"x","depthwiseConv2d","float32");const g=Object(l.a)(t,"filter","depthwiseConv2d","float32");let A,v,b=e,y=!1;3===e.rank&&(y=!0,b=Object(S.a)(e,[1,e.shape[0],e.shape[1],e.shape[2]])),h.b(4===b.rank,()=>`Error in fused depthwiseConv2d: input must be rank 4, but got rank ${b.rank}.`),h.b(4===g.rank,()=>`Error in fused depthwiseConv2d: filter must be rank 4, but got rank ${g.rank}.`),h.b(b.shape[3]===g.shape[2],()=>`Error in fused depthwiseConv2d: number of input channels (${b.shape[3]}) must match the inChannels dimension in filter ${g.shape[2]}.`),null==o&&(o=[1,1]),h.b(k.i(n,o),()=>`Error in fused depthwiseConv2d: Either strides or dilations must be 1. Got strides ${n} and dilations '${o}'`),k.a("fused depthwiseConv2d",r,a),t=k.b(b.shape,g.shape,n,o,r,a,!0),null!=f&&(A=Object(l.a)(f,"bias","fused conv2d"),[A]=Object(er.makeTypesMatch)(A,e),hr.assertAndGetBroadcastShape(t.outShape,A.shape)),null!=p&&(v=Object(l.a)(p,"prelu weights","fused depthwiseConv2d"));const w=(e,t)=>{h.b(k.j(o),()=>`Error in gradient of fused depthwiseConv2d: dilation rates greater than 1 are not yet supported. Got dilations '${o}'`);var[t,i,s,u]=t,s=(e=Object(pr.c)(e,s,d),Object(Ar.a)(i.shape,e,t,n,r,o,a)),i=Object(gr.a)(i,e,t.shape,n,r,o,a);return null!=u?[s,i,Object(pr.b)(A,e)]:[s,i]},x={x:b,filter:g,bias:A,preluActivationWeights:v},C={strides:n,pad:r,dataFormat:i,dilations:o,dimRoundingMode:a,activation:d,leakyreluAlpha:m};if(null==f){return Object(lr.a)((e,t,n)=>{let r=u.a.runKernel(c.nb,x,C);return n([t,e,r]),{value:r=y?Object(S.a)(r,[r.shape[1],r.shape[2],r.shape[3]]):r,gradFunc:w}})(b,g)}return Object(lr.a)((e,t,n,r)=>{let i=u.a.runKernel(c.nb,x,C);return r([t,e,i,n]),{value:i=y?Object(S.a)(i,[i.shape[1],i.shape[2],i.shape[3]]):i,gradFunc:w}})(b,g,A)}}),br=Object(f.b)({fusedMatMul_:function({a:e,b:t,transposeA:n=!1,transposeB:r=!1,bias:i,activation:o="linear",preluActivationWeights:a,leakyreluAlpha:f=.2}){if(!1===Object(pr.d)(u.a.state.gradientDepth,o)){let u=Object(T.a)(e,t,n,r);return null!=i&&(u=Object(s.a)(u,i)),Object(pr.a)(u,o,a,f)}let d=Object(l.a)(e,"a","fused matMul"),p=Object(l.a)(t,"b","fused matMul");[d,p]=Object(er.makeTypesMatch)(d,p);const m=n?d.shape[d.rank-2]:d.shape[d.rank-1],g=r?p.shape[p.rank-1]:p.shape[p.rank-2];e=n?d.shape[d.rank-1]:d.shape[d.rank-2],t=r?p.shape[p.rank-2]:p.shape[p.rank-1];var A=d.shape.slice(0,-2),v=p.shape.slice(0,-2);A=h.O(A),v=h.O(v);h.b(m===g,()=>`Error in fused matMul: inner shapes (${m}) and (${g}) of Tensors with shapes ${d.shape} and `+p.shape+" and transposeA="+n+` and transposeB=${r} must match.`);const b=hr.assertAndGetBroadcastShape(d.shape.slice(0,-2),p.shape.slice(0,-2)).concat([e,t]);let y,w;A=n?Object(S.a)(d,[A,m,e]):Object(S.a)(d,[A,e,m]),e=r?Object(S.a)(p,[v,t,g]):Object(S.a)(p,[v,g,t]),null!=i&&(y=Object(l.a)(i,"bias","fused matMul"),[y]=Object(er.makeTypesMatch)(y,d),hr.assertAndGetBroadcastShape(b,y.shape)),null!=a&&(w=Object(l.a)(a,"prelu weights","fused matMul"));const x=(e,t)=>{var[t,a,s,u]=t;e=Object(pr.c)(Object(S.a)(e,s.shape),s,o);let c,l;return l=n||r?!n&&r?(c=Object(T.a)(e,a,!1,!1),Object(T.a)(e,t,!0,!1)):n&&!r?(c=Object(T.a)(a,e,!1,!0),Object(T.a)(t,e,!1,!1)):(c=Object(T.a)(a,e,!0,!0),Object(T.a)(e,t,!0,!0)):(c=Object(T.a)(e,a,!1,!0),Object(T.a)(t,e,!0,!1)),null!=i?[c,l,s=Object(pr.b)(u,e)]:[c,l]},C={a:A,b:e,bias:y,preluActivationWeights:w},k={transposeA:n,transposeB:r,activation:o,leakyreluAlpha:f};if(null==i){return Object(lr.a)((e,t,n)=>{var r=u.a.runKernel(c.sd,C,k);return n([e,t,r]),{value:Object(S.a)(r,b),gradFunc:x}})(A,e)}return Object(lr.a)((e,t,n,r)=>{var i=u.a.runKernel(c.sd,C,k);return r([e,t,i,n]),{value:Object(S.a)(i,b),gradFunc:x}})(A,e,y)}});
/**
 * @license
 * Copyright 2019 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
/**
 * @license
 * Copyright 2019 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
/**
 * @license
 * Copyright 2019 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
var yr=Object(f.b)({hammingWindow_:function(e){return ur(e,.54,.46)}});
/**
 * @license
 * Copyright 2019 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */const wr=Object(f.b)({hannWindow_:function(e){return ur(e,.5,.5)}}),xr=Object(f.b)({frame_:function(e,t,n,r=!1,i=0){let o=0;const a=[];for(;o+t<=e.size;)a.push(Object(I.a)(e,o,t)),o+=n;if(r)for(;o<e.size;){var s=o+t-e.size;s=Object(O.a)([Object(I.a)(e,o,t-s),Object(Se.a)([s],i)]);a.push(s),o+=n}return 0===a.length?jn([],[0,t]):Object(S.a)(Object(O.a)(a),[a.length,t])}});
/**
 * @license
 * Copyright 2019 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
/**
 * @license
 * Copyright 2019 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
var Cr=Object(f.b)({stft_:function(e,t,n,r,i=wr){return null==r&&(r=sr(t)),e=xr(e,t,n),n=Object(D.a)(e,i(t)),Object(wn.a)(n,r)}}),kr=Object(f.b)({cropAndResize_:function(e,t,n,r,i="bilinear",o=0){const a=Object(l.a)(e,"image","cropAndResize"),s=Object(l.a)(t,"boxes","cropAndResize","float32"),f=(e=Object(l.a)(n,"boxInd","cropAndResize","int32"),s.shape[0]);return h.b(4===a.rank,()=>`Error in cropAndResize: image must be rank 4,but got rank ${a.rank}.`),h.b(2===s.rank&&4===s.shape[1],()=>`Error in cropAndResize: boxes must be have size [${f},4] but had shape ${s.shape}.`),h.b(1===e.rank&&e.shape[0]===f,()=>`Error in cropAndResize: boxInd must be have size [${f}] but had shape ${s.shape}.`),h.b(2===r.length,()=>`Error in cropAndResize: cropSize must be of length 2, but got length ${r.length}.`),h.b(1<=r[0]&&1<=r[1],()=>"cropSize must be atleast [1,1], but was "+r),h.b("bilinear"===i||"nearest"===i,()=>"method must be bilinear or nearest, but was "+i),t={image:a,boxes:s,boxInd:e},u.a.runKernel(c.L,t,{method:i,extrapolationValue:o,cropSize:r})}}),Er=Object(f.b)({flipLeftRight_:function(e){const t=Object(l.a)(e,"image","flipLeftRight","float32");return h.b(4===t.rank,()=>`Error in flipLeftRight: image must be rank 4,but got rank ${t.rank}.`),e={image:t},u.a.runKernel(c.hb,e,{})}}),Sr=Object(f.b)({grayscaleToRGB_:function(e){const t=Object(l.a)(e,"image","grayscaleToRGB"),n=(e=t.rank-1,t.shape[e]),r=(h.b(2<=t.rank,()=>`Error in grayscaleToRGB: images must be at least rank 2, but got rank ${t.rank}.`),h.b(1===n,()=>`Error in grayscaleToRGB: last dimension of a grayscale image should be size 1, but got size ${n}.`),new Array(t.rank));return r.fill(1,0,e),r[e]=3,Object(ke.a)(t,r)}}),_r=Object(f.b)({rotateWithOffset_:function(e,t,n=0,r=.5){const i=Object(l.a)(e,"image","rotateWithOffset","float32");return h.b(4===i.rank,()=>`Error in rotateWithOffset: image must be rank 4,but got rank ${i.rank}.`),e={image:i},u.a.runKernel(c.Cc,e,{radians:t,fillValue:n,center:r})}});
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function Or(e,t,n,r,i,o){null==r&&(r=.5),null==i&&(i=Number.NEGATIVE_INFINITY),null==o&&(o=0);const a=e.shape[0];return n=Math.min(n,a),h.b(0<=r&&r<=1,()=>`iouThreshold must be in [0, 1], but was '${r}'`),h.b(2===e.rank,()=>`boxes must be a 2D tensor, but was of rank '${e.rank}'`),h.b(4===e.shape[1],()=>"boxes must have 4 columns, but 2nd dimension was "+e.shape[1]),h.b(1===t.rank,()=>"scores must be a 1D tensor"),h.b(t.shape[0]===a,()=>`scores has incompatible shape with boxes. Expected ${a}, but was `+t.shape[0]),h.b(0<=o&&o<=1,()=>`softNmsSigma must be in [0, 1], but was '${o}'`),{maxOutputSize:n,iouThreshold:r,scoreThreshold:i,softNmsSigma:o}}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */var Tr=Object(f.b)({nonMaxSuppression_:function(e,t,n,r=.5,i=Number.NEGATIVE_INFINITY){var o=Or(e=Object(l.a)(e,"boxes","nonMaxSuppression","float32"),t=Object(l.a)(t,"scores","nonMaxSuppression","float32"),n,r,i);n={maxOutputSize:n=o.maxOutputSize,iouThreshold:r=o.iouThreshold,scoreThreshold:i=o.scoreThreshold};return u.a.runKernel(c.bc,{boxes:e,scores:t},n)}}),Dr=n(87);
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */var Br=Object(f.b)({nonMaxSuppressionWithScore_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t,n,r=.5,i=Number.NEGATIVE_INFINITY,o=0){var a=(n=(a=Or(e=Object(l.a)(e,"boxes","nonMaxSuppression"),t=Object(l.a)(t,"scores","nonMaxSuppression"),n,r,i,o)).maxOutputSize,r=a.iouThreshold,i=a.scoreThreshold,o=a.softNmsSigma,{boxes:e,scores:t});return{selectedIndices:(e=u.a.runKernel(c.dc,a,{maxOutputSize:n,iouThreshold:r,scoreThreshold:i,softNmsSigma:o}))[0],selectedScores:e[1]}}});
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */var Ir=Object(f.b)({nonMaxSuppressionPadded_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t,n,r=.5,i=Number.NEGATIVE_INFINITY,o=!1){return r=(n=Or(e=Object(l.a)(e,"boxes","nonMaxSuppression"),t=Object(l.a)(t,"scores","nonMaxSuppression"),n,r,i,null)).maxOutputSize,i=n.iouThreshold,n=n.scoreThreshold,{selectedIndices:(e=u.a.runKernel(c.cc,{boxes:e,scores:t},{maxOutputSize:r,iouThreshold:i,scoreThreshold:n,padToMaxOutputSize:o}))[0],validOutputs:e[1]}}});
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */var Mr=n(213),jr=n(212),Nr=Object(f.b)({threshold_:
/**
 * @license
 * Copyright 2021 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t="binary",n=!1,r=.5){const i=Object(l.a)(e,"image","threshold");var o,a=i.shape[0]*i.shape[1];let u,c,f,d,p=Object(D.a)(Mn([r]),255);h.b(3===i.rank,()=>`Error in threshold: image must be rank 3,but got rank ${i.rank}.`),h.b(3===i.shape[2]||1===i.shape[2],()=>`Error in threshold: image color channel must be equal to 3 or 1but got ${i.shape[2]}.`),h.b("int32"===i.dtype||"float32"===i.dtype,()=>`Error in dtype: image dtype must be int32 or float32,but got dtype ${i.dtype}.`),h.b("otsu"===t||"binary"===t,()=>"Method must be binary or otsu, but was "+t),d=3===i.shape[2]?([u,c,f]=Object(xn.a)(i,[1,1,1],-1),r=Object(D.a)(u,.2989),m=Object(D.a)(c,.587),o=Object(D.a)(f,.114),Object(s.a)(Object(s.a)(r,m),o)):e,"otsu"===t&&(p=function(e,t){let n,r,i,o,a,u,c=Mn([-1]),l=Mn([0]),h=Mn([0]);for(let m=0;m<e.size-1;m++){n=Object(I.a)(e,0,m+1),r=Object(I.a)(e,m+1),a=Object(de.a)(Object(Tn.a)(n),t),u=Object(de.a)(Object(Tn.a)(r),t);var f=Object(Tn.a)(Object(D.a)(n,Vt(0,n.size))),d=(f=(i=Object(de.a)(f,Object(Tn.a)(n)),Object(Se.a)(r.shape,n.size)),f=Object(s.a)(Vt(0,r.size),f),f=Object(D.a)(r,f),f=(o=Object(de.a)(Object(Tn.a)(f),Object(Tn.a)(r)),Object(pt.a)(i,o)),Object(pt.a)(i,o)),p=Object(D.a)(a,u);p=(h=Object(D.a)(Object(D.a)(p,f),d),Object(De.a)(h,l));l=Object(qn.a)(p,h,l),c=Object(qn.a)(p,Mn([m]),c)}return c}(r=U(Object(E.a)(Object(tn.a)(d),"int32"),Object(Bn.a)([]),256),a));var m=Object(n?Pe.a:De.a)(d,p);return Object(E.a)(Object(D.a)(m,255),"int32")}}),Fr=Object(f.b)({transform_:function(e,t,n="nearest",r="constant",i=0,o){const a=Object(l.a)(e,"image","transform","float32");return e=Object(l.a)(t,"transforms","transform","float32"),h.b(4===a.rank,()=>`Error in transform: image must be rank 4,but got rank ${a.rank}.`),h.b(2===e.rank&&(e.shape[0]===a.shape[0]||1===e.shape[0])&&8===e.shape[1],()=>"Error in transform: Input transform should be batch x 8 or 1 x 8"),h.b(null==o||2===o.length,()=>`Error in transform: outputShape must be [height, width] or null, but got ${o}.`),t={image:a,transforms:e},u.a.runKernel(c.ld,t,{interpolation:n,fillMode:r,fillValue:i,outputShape:o})}}),Rr=Object(f.b)({bandPart_:function(e,t,n){Object(h.b)(t%1==0,()=>`bandPart(): numLower must be an integer, got ${t}.`),Object(h.b)(n%1==0,()=>`bandPart(): numUpper must be an integer, got ${n}.`);const r=Object(l.a)(e,"a","bandPart");Object(h.b)(2<=r.rank,()=>`bandPart(): Rank must be at least 2, got ${r.rank}.`);e=r.shape;var[i,o]=r.shape.slice(-2);if(!(t<=i))throw new Error(`bandPart(): numLower (${t}) must not be greater than the number of rows (${i}).`);if(!(n<=o))throw new Error(`bandPart(): numUpper (${n}) must not be greater than the number of columns (${o}).`);t<0&&(t=i),n<0&&(n=o);var a=Object(S.a)(Vt(0,i,1,"int32"),[-1,1]),s=Vt(0,o,1,"int32");a=Object(pt.a)(a,s);const u=Object(qe.a)(Object(Pe.a)(a,Object(rn.a)(+t,"int32")),Object(Be.a)(a,Object(rn.a)(-n,"int32"))),c=Object(Kn.a)([i,o],r.dtype);return Object(S.a)(Object(Sn.a)(Object($n.a)(Object(S.a)(r,[-1,i,o])).map(e=>Object(qn.a)(u,e,c))),e)}}),Pr=Object(f.b)({gramSchmidt_:function(e){let t;if(Array.isArray(e)){t=!1,Object(h.b)(null!=e&&0<e.length,()=>"Gram-Schmidt process: input must not be null, undefined, or empty");const n=e[0].shape[0];for(let t=1;t<e.length;++t)Object(h.b)(e[t].shape[0]===n,()=>`Gram-Schmidt: Non-unique lengths found in the input vectors: (${e[t].shape[0]} vs. ${n})`)}else t=!0,e=Object(xn.a)(e,e.shape[0],0).map(e=>Object(En.a)(e,[0]));Object(h.b)(e.length<=e[0].shape[0],()=>`Gram-Schmidt: Number of vectors (${e.length}) exceeds number of dimensions (${e[0].shape[0]}).`);const n=[],r=e;for(let t=0;t<e.length;++t)n.push(u.a.tidy(()=>{let e=r[t];if(0<t)for(let r=0;r<t;++r){var i=Object(D.a)(Object(Tn.a)(Object(D.a)(n[r],e)),n[r]);e=Object(pt.a)(e,i)}return Object(de.a)(e,Object(Zn.a)(e,"euclidean"))}));return t?Object(Sn.a)(n,0):n}}),Lr=n(33);function Ur(e,t=!1){return u.a.tidy(()=>{Object(h.b)(2===e.shape.length,()=>`qr2d() requires a 2D Tensor, but got a ${e.shape.length}D Tensor.`);const n=e.shape[0],r=e.shape[1];let i=Ee(n),o=Object(q.a)(e);const a=jn([[1]],[1,1]);let s=Object(q.a)(a);var c=n>=r?r:n;for(let e=0;e<c;++e){var l=o,f=s,d=i;[s,o,i]=u.a.tidy(()=>{var t=Object(I.a)(o,[e,e],[n-e,1]),u=Object(Zn.a)(t),c=Object(I.a)(o,[e,e],[1,1]),l=Object(qn.a)(Object(De.a)(c,0),jn([[-1]]),jn([[1]]));c=Object(pt.a)(c,Object(D.a)(l,u)),t=Object(de.a)(t,c),s=1===t.shape[0]?Object(q.a)(a):Object(O.a)([a,Object(I.a)(t,[1,0],[t.shape[0]-1,t.shape[1]])],0),t=Object(vt.a)(Object(de.a)(Object(T.a)(l,c),u)),l=Object(I.a)(o,[e,0],[n-e,r]),c=Object(D.a)(t,s),u=Object(Jn.a)(s),o=0===e?Object(pt.a)(l,Object(T.a)(c,Object(T.a)(u,l))):(t=Object(pt.a)(l,Object(T.a)(c,Object(T.a)(u,l))),Object(O.a)([Object(I.a)(o,[0,0],[e,r]),t],0)),u=Object(Jn.a)(c),l=Object(I.a)(i,[0,e],[n,i.shape[1]-e]);return i=0===e?Object(pt.a)(l,Object(T.a)(Object(T.a)(l,s),u)):(t=Object(pt.a)(l,Object(T.a)(Object(T.a)(l,s),u)),Object(O.a)([Object(I.a)(i,[0,0],[n,e]),t],1)),[s,o,i]}),Object(Lr.d)([l,f,d])}return!t&&n>r&&(i=Object(I.a)(i,[0,0],[n,r]),o=Object(I.a)(o,[0,0],[r,r])),[i,o]})}var zr=Object(f.b)({qr_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t=!1){if(Object(h.b)(2<=e.rank,()=>"qr() requires input tensor to have a rank >= 2, but got rank "+e.rank),2===e.rank)return Ur(e,t);{var n=e.shape.slice(0,e.shape.length-2).reduce((e,t)=>e*t);const r=Object($n.a)(Object(S.a)(e,[n,e.shape[e.shape.length-2],e.shape[e.shape.length-1]]),0),i=[],o=[];return r.forEach(e=>{var[e,n]=Ur(e,t);i.push(e),o.push(n)}),[Object(S.a)(Object(Sn.a)(i,0),e.shape),Object(S.a)(Object(Sn.a)(o,0),e.shape)]}}}),Hr=n(44);const $r=Object(f.b)({computeWeightedLoss_:function(e,t,n=Hr.a.SUM_BY_NONZERO_WEIGHTS){e=Object(l.a)(e,"losses","computeWeightedLoss");let r=null;var i,o;t=null==(r=null!=t?Object(l.a)(t,"weights","computeWeightedLoss"):r)?e:Object(D.a)(e,r);if(n===Hr.a.NONE)return t;if(n===Hr.a.SUM)return Object(Tn.a)(t);if(n===Hr.a.MEAN)return null==r?Object(it.a)(t):(i=e.size/r.size,o=Object(de.a)(Object(Tn.a)(t),Object(Tn.a)(r)),1<i?Object(de.a)(o,Object(rn.a)(i)):o);if(n===Hr.a.SUM_BY_NONZERO_WEIGHTS)return null==r?Object(de.a)(Object(Tn.a)(t),Object(rn.a)(e.size)):(i=Object(D.a)(r,Object(ot.a)(e.shape)),o=Object(E.a)(Object(Tn.a)(Object(bt.a)(i,Object(rn.a)(0))),"float32"),Object(de.a)(Object(Tn.a)(t),o));throw Error("Unknown reduction: "+n)}});
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */var Qr=Object(f.b)({absoluteDifference_:function(e,t,n,r=Hr.a.SUM_BY_NONZERO_WEIGHTS){e=Object(l.a)(e,"labels","absoluteDifference"),t=Object(l.a)(t,"predictions","absoluteDifference");let o=null;return null!=n&&(o=Object(l.a)(n,"weights","absoluteDifference")),Object(h.e)(e.shape,t.shape,"Error in absoluteDifference: "),n=Object(i.a)(Object(pt.a)(e,t)),$r(n,o,r)}}),Vr=Object(f.b)({cosineDistance_:function(e,t,n,r,i=Hr.a.SUM_BY_NONZERO_WEIGHTS){e=Object(l.a)(e,"labels","cosineDistance"),t=Object(l.a)(t,"predictions","cosineDistance");let o=null;return null!=r&&(o=Object(l.a)(r,"weights","cosineDistance")),Object(h.e)(e.shape,t.shape,"Error in cosineDistance: "),r=Object(rn.a)(1),r=Object(pt.a)(r,Object(Tn.a)(Object(D.a)(e,t),n,!0)),$r(r,o,i)}}),qr=Object(f.b)({hingeLoss_:function(e,t,n,r=Hr.a.SUM_BY_NONZERO_WEIGHTS){e=Object(l.a)(e,"labels","hingeLoss"),t=Object(l.a)(t,"predictions","hingeLoss");let i=null;return null!=n&&(i=Object(l.a)(n,"weights","hingeLoss")),Object(h.e)(e.shape,t.shape,"Error in hingeLoss: "),n=Object(rn.a)(1),e=Object(pt.a)(Object(D.a)(Object(rn.a)(2),e),n),n=Object(Wt.a)(Object(pt.a)(n,Object(D.a)(e,t))),$r(n,i,r)}}),Gr=Object(f.b)({huberLoss_:function(e,t,n,r=1,o=Hr.a.SUM_BY_NONZERO_WEIGHTS){e=Object(l.a)(e,"labels","huberLoss"),t=Object(l.a)(t,"predictions","huberLoss");let a=null;return null!=n&&(a=Object(l.a)(n,"weights","huberLoss")),Object(h.e)(e.shape,t.shape,"Error in huberLoss: "),n=Object(rn.a)(r),r=Object(i.a)(Object(pt.a)(t,e)),t=Object(ct.a)(r,n),e=Object(pt.a)(r,t),r=Object(s.a)(Object(D.a)(Object(rn.a)(.5),Object(dt.a)(t)),Object(D.a)(n,e)),$r(r,a,o)}}),Wr=Object(f.b)({logLoss_:function(e,t,n,r=1e-7,i=Hr.a.SUM_BY_NONZERO_WEIGHTS){e=Object(l.a)(e,"labels","logLoss"),t=Object(l.a)(t,"predictions","logLoss");let o=null;null!=n&&(o=Object(l.a)(n,"weights","logLoss")),Object(h.e)(e.shape,t.shape,"Error in logLoss: ");n=Object(rn.a)(1),r=Object(rn.a)(r);var a=Object(vt.a)(Object(D.a)(e,Object(ze.a)(Object(s.a)(t,r))));e=Object(D.a)(Object(pt.a)(n,e),Object(ze.a)(Object(s.a)(Object(pt.a)(n,t),r))),n=Object(pt.a)(a,e);return $r(n,o,i)}}),Kr=Object(f.b)({meanSquaredError_:function(e,t,n,r=Hr.a.SUM_BY_NONZERO_WEIGHTS){e=Object(l.a)(e,"labels","meanSquaredError"),t=Object(l.a)(t,"predictions","meanSquaredError");let i=null;return null!=n&&(i=Object(l.a)(n,"weights","meanSquaredError")),Object(h.e)(e.shape,t.shape,"Error in meanSquaredError: "),n=Object(kn.a)(e,t),$r(n,i,r)}}),Yr=Object(f.b)({sigmoidCrossEntropy_:function(e,t,n,r=0,o=Hr.a.SUM_BY_NONZERO_WEIGHTS){let a=Object(l.a)(e,"multiClassLabels","sigmoidCrossEntropy"),u=(e=Object(l.a)(t,"logits","sigmoidCrossEntropy"),null);return null!=n&&(u=Object(l.a)(n,"weights","sigmoidCrossEntropy")),Object(h.e)(a.shape,e.shape,"Error in sigmoidCrossEntropy: "),0<r&&(t=Object(rn.a)(r),n=Object(rn.a)(1),r=Object(rn.a)(.5),a=Object(s.a)(Object(D.a)(a,Object(pt.a)(n,t)),Object(D.a)(r,t))),n=a,r=e,n=Object(l.a)(n,"labels","sigmoidCrossEntropyWithLogits"),r=Object(l.a)(r,"logits","sigmoidCrossEntropyWithLogits"),Object(h.e)(n.shape,r.shape,"Error in sigmoidCrossEntropyWithLogits: "),t=Object(Wt.a)(r),n=Object(D.a)(r,n),r=Object(He.a)(Object(we.a)(Object(vt.a)(Object(i.a)(r)))),e=Object(s.a)(Object(pt.a)(t,n),r),$r(e,u,o)}}),Xr=Object(f.b)({softmaxCrossEntropy_:function(e,t,n,r=0,i=Hr.a.SUM_BY_NONZERO_WEIGHTS){let o=Object(l.a)(e,"onehotLabels","softmaxCrossEntropy"),a=(e=Object(l.a)(t,"logits","softmaxCrossEntropy"),null);return null!=n&&(a=Object(l.a)(n,"weights","softmaxCrossEntropy")),Object(h.e)(o.shape,e.shape,"Error in softmaxCrossEntropy: "),0<r&&(t=Object(rn.a)(r),n=Object(rn.a)(1),r=Object(rn.a)(o.shape[1]),o=Object(s.a)(Object(D.a)(o,Object(pt.a)(n,t)),Object(de.a)(t,r))),n=function(e,t,n=-1){if((n=-1===n?t.rank-1:n)!==t.rank-1)throw Error(`Softmax cross entropy along a non-last dimension is not yet supported. Labels / logits was rank ${t.rank} and dim was `+n);return Object(lr.a)((e,t,r)=>{var i=Object(Ve.a)(t,[n],!0);r([e,t=Object(pt.a)(Object(E.a)(t,"float32"),i)]),i=Object(vt.a)(Object(D.a)(t,e));return{value:Object(Tn.a)(i,[n]),gradFunc:(e,t)=>{var[t,r]=t,i=Object(ft.e)(e.shape,[n]);return[Object(D.a)(Object(S.a)(e,i),Object(pt.a)(Object(E.a)(t,"float32"),Object(we.a)(r))),Object(D.a)(Object(S.a)(e,i),Object(pt.a)(Object(we.a)(r),Object(E.a)(t,"float32")))]}}})(e,t)}(o,e),$r(n,a,i)}}),Jr=Object(f.b)({sparseFillEmptyRows_:function(e,t,n,r){if(e=Object(l.a)(e,"indices","sparseFillEmptyRows","int32"),t=Object(l.a)(t,"values","sparseFillEmptyRows"),n=Object(l.a)(n,"denseShape","sparseFillEmptyRows","int32"),r=Object(l.a)(r,"defaultValue","sparseFillEmptyRows",t.dtype),2!==e.rank)throw new Error("Indices should be Tensor2D but received shape\n        "+e.shape);if(1!==t.rank)throw new Error("Values should be Tensor1D but received shape "+t.shape);if(1!==n.rank)throw new Error("Dense shape should be Tensor1D but received shape "+n.shape);if(0!==r.rank)throw new Error("Default value should be a scalar but received shape "+r.shape);return{outputIndices:(e=u.a.runKernel(c.Rc,{indices:e,values:t,denseShape:n,defaultValue:r}))[0],outputValues:e[1],emptyRowIndicator:e[2],reverseIndexMap:e[3]}}}),Zr=Object(f.b)({sparseReshape_:function(e,t,n){if(e=Object(l.a)(e,"inputIndices","sparseReshape","int32"),t=Object(l.a)(t,"inputShape","sparseReshape","int32"),n=Object(l.a)(n,"newShape","sparseReshape","int32"),2!==e.rank)throw new Error("Input indices should be Tensor2D but received shape\n        "+e.shape);if(1!==t.rank)throw new Error("Input shape should be Tensor1D but received shape "+t.shape);if(1!==n.rank)throw new Error("New shape should be Tensor1D but received shape "+n.shape);return{outputIndices:(e=u.a.runKernel(c.Sc,{inputIndices:e,inputShape:t,newShape:n}))[0],outputShape:e[1]}}}),ei=Object(f.b)({sparseSegmentMean_:function(e,t,n){if(e=Object(l.a)(e,"data","sparseSegmentMean"),t=Object(l.a)(t,"indices","sparseSegmentMean","int32"),n=Object(l.a)(n,"segmentIds","sparseSegmentMean","int32"),e.rank<1)throw new Error("Data should be at least 1 dimensional but received scalar");if(1!==t.rank)throw new Error("Indices should be Tensor1D but received shape\n          "+t.shape);if(1!==n.rank)throw new Error("Segment ids should be Tensor1D but received shape\n          "+n.shape);return u.a.runKernel(c.Tc,{data:e,indices:t,segmentIds:n})}}),ti=Object(f.b)({sparseSegmentSum_:function(e,t,n){if(e=Object(l.a)(e,"data","sparseSegmentSum"),t=Object(l.a)(t,"indices","sparseSegmentSum","int32"),n=Object(l.a)(n,"segmentIds","sparseSegmentSum","int32"),e.rank<1)throw new Error("Data should be at least 1 dimensional but received scalar");if(1!==t.rank)throw new Error("Indices should be Tensor1D but received shape\n         "+t.shape);if(1!==n.rank)throw new Error("Segment ids should be Tensor1D but received shape\n         "+n.shape);return u.a.runKernel(c.Uc,{data:e,indices:t,segmentIds:n})}}),ni=Object(f.b)({stringNGrams_:function(e,t,n,r,i,o,a,s){if("string"!==(e=Object(l.a)(e,"data","stringNGrams","string")).dtype)throw new Error("Data must be of datatype string");if(1!==e.shape.length)throw new Error("Data must be a vector, saw: "+e.shape);if("int32"!==(t=Object(l.a)(t,"dataSplits","stringNGrams")).dtype)throw new Error("Data splits must be of datatype int32");return{nGrams:(e=u.a.runKernel(c.cd,{data:e,dataSplits:t},{separator:n,nGramWidths:r,leftPad:i,rightPad:o,padWidth:a,preserveShortSequences:s}))[0],nGramsSplits:e[1]}}}),ri=Object(f.b)({stringSplit_:function(e,t,n=!0){if(e=Object(l.a)(e,"input","stringSplit","string"),t=Object(l.a)(t,"delimiter","stringSplit","string"),1!==e.rank)throw new Error("Input should be Tensor1D but received shape "+e.shape);if(0!==t.rank)throw new Error("Delimiter should be a scalar but received shape "+t.shape);return{indices:(e=u.a.runKernel(c.dd,{input:e,delimiter:t},{skipEmpty:n}))[0],values:e[1],shape:e[2]}}}),ii=Object(f.b)({stringToHashBucketFast_:function(e,t){e=Object(l.a)(e,"input","stringToHashBucketFast","string");var n={numBuckets:t};if(t<=0)throw new Error("Number of buckets must be at least 1");return u.a.runKernel(c.ed,{input:e},n)}});n.d(t,"Ab",(function(){return si})),n.d(t,"Jb",(function(){return ui})),n.d(t,"Vb",(function(){return ci})),n.d(t,"xd",(function(){return oi})),n.d(t,"kd",(function(){return ai})),n.d(t,"vd",(function(){return li})),n.d(t,"Gd",(function(){return hi})),n.d(t,"b",(function(){return i.a})),n.d(t,"c",(function(){return o.a})),n.d(t,"d",(function(){return a.a})),n.d(t,"e",(function(){return s.a})),n.d(t,"f",(function(){return d})),n.d(t,"g",(function(){return p.a})),n.d(t,"h",(function(){return m.a})),n.d(t,"i",(function(){return g.a})),n.d(t,"j",(function(){return A.a})),n.d(t,"k",(function(){return v.a})),n.d(t,"l",(function(){return b.a})),n.d(t,"m",(function(){return y.a})),n.d(t,"n",(function(){return w.a})),n.d(t,"o",(function(){return x.a})),n.d(t,"p",(function(){return C.a})),n.d(t,"q",(function(){return _})),n.d(t,"r",(function(){return j})),n.d(t,"w",(function(){return N.a})),n.d(t,"s",(function(){return F.a})),n.d(t,"t",(function(){return R})),n.d(t,"u",(function(){return P})),n.d(t,"v",(function(){return L})),n.d(t,"x",(function(){return U})),n.d(t,"z",(function(){return z})),n.d(t,"A",(function(){return H.a})),n.d(t,"B",(function(){return $.a})),n.d(t,"C",(function(){return E.a})),n.d(t,"D",(function(){return Q.a})),n.d(t,"E",(function(){return V.a})),n.d(t,"F",(function(){return q.a})),n.d(t,"G",(function(){return G.a})),n.d(t,"H",(function(){return O.a})),n.d(t,"I",(function(){return W})),n.d(t,"J",(function(){return K})),n.d(t,"K",(function(){return Y})),n.d(t,"L",(function(){return X})),n.d(t,"M",(function(){return J.a})),n.d(t,"N",(function(){return Z.a})),n.d(t,"O",(function(){return ee.a})),n.d(t,"P",(function(){return te})),n.d(t,"Q",(function(){return re})),n.d(t,"R",(function(){return ie.a})),n.d(t,"S",(function(){return oe.a})),n.d(t,"U",(function(){return ae.a})),n.d(t,"V",(function(){return se.a})),n.d(t,"W",(function(){return ue})),n.d(t,"X",(function(){return ce.a})),n.d(t,"Y",(function(){return le.a})),n.d(t,"Z",(function(){return he})),n.d(t,"ab",(function(){return fe.a})),n.d(t,"bb",(function(){return de.a})),n.d(t,"cb",(function(){return pe.a})),n.d(t,"db",(function(){return me.a})),n.d(t,"fb",(function(){return ge})),n.d(t,"gb",(function(){return Ae.a})),n.d(t,"ib",(function(){return ve.a})),n.d(t,"jb",(function(){return be.a})),n.d(t,"kb",(function(){return ye.a})),n.d(t,"lb",(function(){return we.a})),n.d(t,"mb",(function(){return xe.a})),n.d(t,"nb",(function(){return Ce.a})),n.d(t,"ob",(function(){return Ee})),n.d(t,"qb",(function(){return Se.a})),n.d(t,"rb",(function(){return _e.a})),n.d(t,"sb",(function(){return Oe.a})),n.d(t,"ub",(function(){return Te.a})),n.d(t,"wb",(function(){return De.a})),n.d(t,"xb",(function(){return Be.a})),n.d(t,"zb",(function(){return Ie.a})),n.d(t,"Db",(function(){return Me.a})),n.d(t,"Eb",(function(){return je.a})),n.d(t,"Fb",(function(){return Ne.a})),n.d(t,"Gb",(function(){return Fe.a})),n.d(t,"Hb",(function(){return Re.a})),n.d(t,"Ib",(function(){return Pe.a})),n.d(t,"Kb",(function(){return Le})),n.d(t,"Lb",(function(){return Ue.a})),n.d(t,"Mb",(function(){return ze.a})),n.d(t,"Nb",(function(){return He.a})),n.d(t,"Ob",(function(){return $e.a})),n.d(t,"Pb",(function(){return Qe.a})),n.d(t,"Qb",(function(){return Ve.a})),n.d(t,"Rb",(function(){return qe.a})),n.d(t,"Sb",(function(){return Ge.a})),n.d(t,"Tb",(function(){return We.a})),n.d(t,"Ub",(function(){return Ke.a})),n.d(t,"Wb",(function(){return Je})),n.d(t,"Xb",(function(){return T.a})),n.d(t,"Yb",(function(){return Ze.a})),n.d(t,"Zb",(function(){return et.a})),n.d(t,"ac",(function(){return tt})),n.d(t,"bc",(function(){return nt})),n.d(t,"cc",(function(){return rt.a})),n.d(t,"dc",(function(){return it.a})),n.d(t,"ec",(function(){return st})),n.d(t,"fc",(function(){return ut.a})),n.d(t,"gc",(function(){return ct.a})),n.d(t,"hc",(function(){return lt.a})),n.d(t,"ic",(function(){return ht.a})),n.d(t,"jc",(function(){return mt})),n.d(t,"lc",(function(){return D.a})),n.d(t,"mc",(function(){return gt})),n.d(t,"nc",(function(){return At})),n.d(t,"oc",(function(){return vt.a})),n.d(t,"qc",(function(){return bt.a})),n.d(t,"rc",(function(){return yt.a})),n.d(t,"sc",(function(){return ot.a})),n.d(t,"tc",(function(){return wt.a})),n.d(t,"vc",(function(){return xt})),n.d(t,"wc",(function(){return Ct.a})),n.d(t,"xc",(function(){return kt})),n.d(t,"yc",(function(){return Et})),n.d(t,"zc",(function(){return St})),n.d(t,"Ac",(function(){return _t})),n.d(t,"Bc",(function(){return Ot.a})),n.d(t,"Cc",(function(){return Tt.a})),n.d(t,"Dc",(function(){return Dt.a})),n.d(t,"Ec",(function(){return Bt.a})),n.d(t,"Fc",(function(){return It.a})),n.d(t,"Gc",(function(){return Mt})),n.d(t,"Hc",(function(){return jt})),n.d(t,"Ic",(function(){return Nt})),n.d(t,"Jc",(function(){return Ft})),n.d(t,"Kc",(function(){return zt})),n.d(t,"Lc",(function(){return Ht})),n.d(t,"Mc",(function(){return $t})),n.d(t,"Nc",(function(){return Qt})),n.d(t,"Oc",(function(){return Vt})),n.d(t,"Pc",(function(){return qt.a})),n.d(t,"Qc",(function(){return Gt.a})),n.d(t,"Rc",(function(){return Wt.a})),n.d(t,"Sc",(function(){return Kt.a})),n.d(t,"Tc",(function(){return S.a})),n.d(t,"Uc",(function(){return Yt.a})),n.d(t,"Vc",(function(){return Xt})),n.d(t,"Wc",(function(){return Jt})),n.d(t,"Xc",(function(){return Zt})),n.d(t,"Yc",(function(){return en})),n.d(t,"ad",(function(){return tn.a})),n.d(t,"bd",(function(){return nn.a})),n.d(t,"cd",(function(){return rn.a})),n.d(t,"fd",(function(){return on.a})),n.d(t,"gd",(function(){return an.a})),n.d(t,"hd",(function(){return sn})),n.d(t,"id",(function(){return B.a})),n.d(t,"jd",(function(){return un.a})),n.d(t,"ld",(function(){return cn.a})),n.d(t,"md",(function(){return ln.a})),n.d(t,"nd",(function(){return I.a})),n.d(t,"od",(function(){return hn})),n.d(t,"pd",(function(){return fn})),n.d(t,"qd",(function(){return dn})),n.d(t,"rd",(function(){return pn})),n.d(t,"sd",(function(){return mn.a})),n.d(t,"td",(function(){return gn.a})),n.d(t,"ud",(function(){return An.a})),n.d(t,"pb",(function(){return vn.a})),n.d(t,"yb",(function(){return bn.a})),n.d(t,"Cb",(function(){return yn.a})),n.d(t,"Zc",(function(){return wn.a})),n.d(t,"yd",(function(){return xn.a})),n.d(t,"zd",(function(){return Cn.a})),n.d(t,"Ad",(function(){return dt.a})),n.d(t,"Bd",(function(){return kn.a})),n.d(t,"Cd",(function(){return En.a})),n.d(t,"Dd",(function(){return Sn.a})),n.d(t,"Ed",(function(){return _n.a})),n.d(t,"Fd",(function(){return On.a})),n.d(t,"Hd",(function(){return pt.a})),n.d(t,"Id",(function(){return Tn.a})),n.d(t,"Jd",(function(){return Dn.a})),n.d(t,"Kd",(function(){return M.a})),n.d(t,"Ld",(function(){return Bn.a})),n.d(t,"Md",(function(){return Mn})),n.d(t,"Nd",(function(){return jn})),n.d(t,"Od",(function(){return Nn.a})),n.d(t,"Pd",(function(){return Fn})),n.d(t,"Qd",(function(){return Rn})),n.d(t,"Rd",(function(){return Pn})),n.d(t,"Sd",(function(){return ke.a})),n.d(t,"Td",(function(){return Ln.a})),n.d(t,"Vd",(function(){return Un})),n.d(t,"Wd",(function(){return zn.a})),n.d(t,"Xd",(function(){return Hn.a})),n.d(t,"Yd",(function(){return $n.a})),n.d(t,"Zd",(function(){return Qn})),n.d(t,"ae",(function(){return Vn})),n.d(t,"be",(function(){return qn.a})),n.d(t,"ce",(function(){return Wn})),n.d(t,"de",(function(){return Kn.a})),n.d(t,"ee",(function(){return Yn.a})),n.d(t,"y",(function(){return Xn})),n.d(t,"Ud",(function(){return Jn.a})),n.d(t,"pc",(function(){return Zn.a})),n.d(t,"kc",(function(){return tr})),n.d(t,"dd",(function(){return rr})),n.d(t,"ed",(function(){return Xe})),n.d(t,"wd",(function(){return ir})),n.d(t,"vb",(function(){return or})),n.d(t,"eb",(function(){return ar})),n.d(t,"hb",(function(){return sr})),n.d(t,"T",(function(){return ur})),n.d(t,"Bb",(function(){return cr})),n.d(t,"uc",(function(){return f.b})),n.d(t,"a",(function(){return f.a})),n.d(t,"tb",(function(){return r}));
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
const oi={fft:vn.a,ifft:bn.a,rfft:wn.a,irfft:yn.a},ai={hammingWindow:yr,hannWindow:wr,frame:xr,stft:Cr},si={flipLeftRight:Er,grayscaleToRGB:Sr,resizeNearestNeighbor:jr.a,resizeBilinear:Mr.a,rotateWithOffset:_r,cropAndResize:kr,nonMaxSuppression:Tr,nonMaxSuppressionAsync:async function(e,t,n,r=.5,i=Number.NEGATIVE_INFINITY){const o=Object(l.a)(e,"boxes","nonMaxSuppressionAsync"),a=Object(l.a)(t,"scores","nonMaxSuppressionAsync");var s=(n=(u=Or(o,a,n,r,i)).maxOutputSize,r=u.iouThreshold,i=u.scoreThreshold,(u=await Promise.all([o.data(),a.data()]))[0]),u=u[1];return s=Object(Dr.a)(s,u,n,r,i).selectedIndices,o!==e&&o.dispose(),a!==t&&a.dispose(),Mn(s,"int32")},nonMaxSuppressionWithScore:Br,nonMaxSuppressionWithScoreAsync:async function(e,t,n,r=.5,i=Number.NEGATIVE_INFINITY,o=0){const a=Object(l.a)(e,"boxes","nonMaxSuppressionAsync"),s=Object(l.a)(t,"scores","nonMaxSuppressionAsync");var u=(n=(c=Or(a,s,n,r,i,o)).maxOutputSize,r=c.iouThreshold,i=c.scoreThreshold,o=c.softNmsSigma,(c=await Promise.all([a.data(),s.data()]))[0]),c=c[1],{selectedIndices:u,selectedScores:c}=Object(Dr.c)(u,c,n,r,i,o);return a!==e&&a.dispose(),s!==t&&s.dispose(),{selectedIndices:Mn(u,"int32"),selectedScores:Mn(c)}},nonMaxSuppressionPadded:Ir,nonMaxSuppressionPaddedAsync:async function(e,t,n,r=.5,i=Number.NEGATIVE_INFINITY,o=!1){const a=Object(l.a)(e,"boxes","nonMaxSuppressionAsync"),s=Object(l.a)(t,"scores","nonMaxSuppressionAsync");r=(n=Or(a,s,n,r,i,null)).maxOutputSize,i=n.iouThreshold,n=n.scoreThreshold;var[u,c]=await Promise.all([a.data(),s.data()]),{selectedIndices:u,validOutputs:c}=Object(Dr.b)(u,c,r,i,n,o);return a!==e&&a.dispose(),s!==t&&s.dispose(),{selectedIndices:Mn(u,"int32"),validOutputs:Object(rn.a)(c,"int32")}},threshold:Nr,transform:Fr},ui={bandPart:Rr,gramSchmidt:Pr,qr:zr},ci={absoluteDifference:Qr,computeWeightedLoss:$r,cosineDistance:Vr,hingeLoss:qr,huberLoss:Gr,logLoss:Wr,meanSquaredError:Kr,sigmoidCrossEntropy:Yr,softmaxCrossEntropy:Xr},li={sparseFillEmptyRows:Jr,sparseReshape:Zr,sparseSegmentMean:ei,sparseSegmentSum:ti},hi={stringNGrams:ni,stringSplit:ri,stringToHashBucketFast:ii}},function(e,t,n){"use strict";var r,i,o,a,s,u,c=function(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1},l=new function(){this.browser=new c,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow="undefined"!=typeof window};"object"==typeof wx&&"function"==typeof wx.getSystemInfoSync?(l.wxa=!0,l.touchEventsSupported=!0):"undefined"==typeof document&&"undefined"!=typeof self?l.worker=!0:"undefined"==typeof navigator?(l.node=!0,l.svgSupported=!0):(u=navigator.userAgent,i=(r=l).browser,o=u.match(/Firefox\/([\d.]+)/),a=u.match(/MSIE\s([\d.]+)/)||u.match(/Trident\/.+?rv:(([\d.]+))/),s=u.match(/Edge?\/([\d.]+)/),u=/micromessenger/i.test(u),o&&(i.firefox=!0,i.version=o[1]),a&&(i.ie=!0,i.version=a[1]),s&&(i.edge=!0,i.version=s[1],i.newEdge=18<+s[1].split(".")[0]),u&&(i.weChat=!0),r.svgSupported="undefined"!=typeof SVGRect,r.touchEventsSupported="ontouchstart"in window&&!i.ie&&!i.edge,r.pointerEventsSupported="onpointerdown"in window&&(i.edge||i.ie&&11<=+i.version),r.domSupported="undefined"!=typeof document,o=document.documentElement.style,r.transform3dSupported=(i.ie&&"transition"in o||i.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in o)&&!("OTransition"in o),r.transformSupported=r.transform3dSupported||i.ie&&9<=+i.version),t.a=l},,function(e,t,n){"use strict";n.r(t),n.d(t,"makeTypesMatch",(function(){return a})),n.d(t,"assertTypesMatch",(function(){return s})),n.d(t,"isTensorInList",(function(){return u})),n.d(t,"getTensorsInContainer",(function(){return c}));var r=n(7),i=n(101),o=n(10);
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function a(e,t){var n;return e.dtype===t.dtype?[e,t]:(n=Object(i.c)(e.dtype,t.dtype),[e.cast(n),t.cast(n)])}function s(e,t){Object(o.b)(e.dtype===t.dtype,()=>`The dtypes of the first(${e.dtype}) and second(${t.dtype}) input must match`)}function u(e,t){return t.some(t=>t.id===e.id)}function c(e){var t=[];return function e(t,n,i){if(null==t)return;if(t instanceof r.a)return void n.push(t);if(!function(e){return Array.isArray(e)||"object"==typeof e}(t))return;const o=t;for(const t in o){const r=o[t];i.has(r)||(i.add(r),e(r,n,i))}}(e,t,new Set),t}},function(e,t,n){"use strict";n.d(t,"e",(function(){return i})),n.d(t,"f",(function(){return o})),n.d(t,"g",(function(){return a})),n.d(t,"b",(function(){return s})),n.d(t,"c",(function(){return u})),n.d(t,"d",(function(){return c})),n.d(t,"j",(function(){return p})),n.d(t,"i",(function(){return m})),n.d(t,"h",(function(){return g})),n.d(t,"a",(function(){return A}));var r=n(10);
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function i(e,t,n,r,i="NHWC",o){return s(e,[...t,e[3]],n,o,r,null,null,g(i))}function o(e,t,n,r,i,o,a="channelsLast"){var[t,u]=l(t);let c;if("channelsLast"===a)c=[t,u,e[3],e[3]];else{if("channelsFirst"!==a)throw new Error("Unknown dataFormat "+a);c=[t,u,e[1],e[1]]}return s(e,c,n,r,i,o,!1,a)}function a(e,t,n,r,i,o,a="NDHWC"){var[t,s,c]=h(t);let l,f;if("NDHWC"===a)f="channelsLast",l=[t,s,c,e[4],e[4]];else{if("NCDHW"!==a)throw new Error("Unknown dataFormat "+a);f="channelsFirst",l=[t,s,c,e[1],e[1]]}return u(e,l,n,r,i,!1,f,o)}function s(e,t,n,r,i,o,a=!1,s="channelsLast"){let[u,h,p,m]=[-1,-1,-1,-1];if("channelsLast"===s)[u,h,p,m]=e;else{if("channelsFirst"!==s)throw new Error("Unknown dataFormat "+s);[u,m,h,p]=e}var[g,A,,v]=t,[n,b]=l(n),[r,y]=l(r),w=f(g,r),x=f(A,y),{padInfo:i,outHeight:o,outWidth:C}=function(e,t,n,r,i,o,a,s,u){let l,h,f;if("number"==typeof e)h=(p=(l={top:e,bottom:e,left:e,right:e,type:p=0===e?"VALID":"NUMBER"},function(e,t,n,r,i){null==r&&(r=c(e,t,n));var o=e[0];e=e[1];return[o=d((o-t+2*r)/n+1,i),e=d((e-t+2*r)/n+1,i)]}([t,n],o,r,e,s)))[0],f=p[1];else if("same"===e){h=Math.ceil(t/r),f=Math.ceil(n/i);var p=Math.max(0,(h-1)*r+o-t),m=Math.max(0,(f-1)*i+a-n),g=Math.floor(p/2),A=(p=p-g,Math.floor(m/2));l={top:g,bottom:p,left:A,right:m=m-A,type:"SAME"}}else if("valid"===e)l={top:0,bottom:0,left:0,right:0,type:"VALID"},h=Math.ceil((t-o+1)/r),f=Math.ceil((n-a+1)/i);else{if("object"!=typeof e)throw Error("Unknown padding parameter: "+e);l={top:g=("channelsLast"===u?e[1]:e[2])[0],bottom:p=("channelsLast"===u?e[1]:e[2])[1],left:A=("channelsLast"===u?e[2]:e[3])[0],right:m=("channelsLast"===u?e[2]:e[3])[1],type:u=0===g&&0===p&&0===A&&0===m?"VALID":"EXPLICIT"},h=d((t-o+g+p)/r+1,s),f=d((n-a+A+m)/i+1,s)}return{padInfo:l,outHeight:h,outWidth:f}}(i,h,p,n,b,w,x,o,s);a=a?v*m:v;let k;return"channelsFirst"===s?k=[u,a,o,C]:"channelsLast"===s&&(k=[u,o,C,a]),{batchSize:u,dataFormat:s,inHeight:h,inWidth:p,inChannels:m,outHeight:o,outWidth:C,outChannels:a,padInfo:i,strideHeight:n,strideWidth:b,filterHeight:g,filterWidth:A,effectiveFilterHeight:w,effectiveFilterWidth:x,dilationHeight:r,dilationWidth:y,inShape:e,outShape:k,filterShape:t}}function u(e,t,n,r,i,o=!1,a="channelsLast",s){let[u,l,p,m,g]=[-1,-1,-1,-1,-1];if("channelsLast"===a)[u,l,p,m,g]=e;else{if("channelsFirst"!==a)throw new Error("Unknown dataFormat "+a);[u,g,l,p,m]=e}var[A,v,b,,y]=t,[n,w,x]=h(n),[r,C,k]=h(r),E=f(A,r),S=f(v,C),_=f(b,k),{padInfo:i,outDepth:s,outHeight:O,outWidth:T}=function(e,t,n,r,i,o,a,s,u,l,h){let f,p,m,g;if("number"==typeof e)p=(A=(f={top:e,bottom:e,left:e,right:e,front:e,back:e,type:A=0===e?"VALID":"NUMBER"},function(e,t,n,r,i,o){null==i&&(i=c(e,t,r));var a=e[0],s=e[1];e=e[2];return[a=d((a-t+2*i)/r+1,o),s=d((s-t+2*i)/r+1,o),e=d((e-t+2*i)/r+1,o),1]}([t,n,r,1],s,0,i,e,h)))[0],m=A[1],g=A[2];else if("same"===e){p=Math.ceil(t/i),m=Math.ceil(n/o),g=Math.ceil(r/a);h=(p-1)*i+s-t;var A=(m-1)*o+u-n,v=(g-1)*a+l-r,b=Math.floor(h/2),y=(h=h-b,Math.floor(A/2)),w=(A=A-y,Math.floor(v/2));f={top:y,bottom:A,left:w,right:v=v-w,front:b,back:h,type:"SAME"}}else{if("valid"!==e)throw Error("Unknown padding parameter: "+e);f={top:0,bottom:0,left:0,right:0,front:0,back:0,type:"VALID"},p=Math.ceil((t-s+1)/i),m=Math.ceil((n-u+1)/o),g=Math.ceil((r-l+1)/a)}return{padInfo:f,outDepth:p,outHeight:m,outWidth:g}}(i,l,p,m,n,w,x,E,S,_,s);o=o?y*g:y;let D;return"channelsFirst"===a?D=[u,o,s,O,T]:"channelsLast"===a&&(D=[u,s,O,T,o]),{batchSize:u,dataFormat:a,inDepth:l,inHeight:p,inWidth:m,inChannels:g,outDepth:s,outHeight:O,outWidth:T,outChannels:o,padInfo:i,strideDepth:n,strideHeight:w,strideWidth:x,filterDepth:A,filterHeight:v,filterWidth:b,effectiveFilterDepth:E,effectiveFilterHeight:S,effectiveFilterWidth:_,dilationDepth:r,dilationHeight:C,dilationWidth:k,inShape:e,outShape:D,filterShape:t}}function c(e,t,n,r=1){return t=f(t,r),Math.floor((e[0]*(n-1)-n+t)/2)}function l(e){return"number"==typeof e?[e,e,e]:2===e.length?[e[0],e[1],1]:e}function h(e){return"number"==typeof e?[e,e,e]:e}function f(e,t){return t<=1?e:e+(e-1)*(t-1)}function d(e,t){if(!t)return Math.trunc(e);switch(t){case"round":return Math.round(e);case"ceil":return Math.ceil(e);case"floor":return Math.floor(e);default:throw new Error("Unknown roundingMode "+t)}}function p(e){var[e,t,n]=l(e);return 1===e&&1===t&&1===n}function m(e,t){return p(e)||p(t)}function g(e){if("NHWC"===e)return"channelsLast";if("NCHW"===e)return"channelsFirst";throw new Error("Unknown dataFormat "+e)}function A(e,t,n){if(null!=n){if("string"==typeof t)throw Error(`Error in ${e}: pad must be an integer when using dimRoundingMode ${n} but got pad ${t}.`);if("number"==typeof t)r.b(r.v(t),()=>`Error in ${e}: pad must be an integer when using dimRoundingMode ${n} but got pad ${t}.`);else{if("object"!=typeof t)throw Error(`Error in ${e}: Unknown padding parameter: `+t);t.forEach(t=>{t.forEach(t=>{r.b(r.v(t),()=>`Error in ${e}: pad must be an integer when using dimRoundingMode ${n} but got pad ${t}.`)})})}}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(6),i=n(4),o=n(28),a=n(3);t=n(5);const s=Object(t.b)({matMul_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t,n=!1,s=!1){return e=Object(a.a)(e,"a","matMul"),t=Object(a.a)(t,"b","matMul"),[e,t]=Object(o.makeTypesMatch)(e,t),e={a:e,b:t},r.a.runKernel(i.s,e,{transposeA:n,transposeB:s})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(6),i=n(3);t=n(5);const o=Object(t.b)({square_:
/**
 * @license
 * Copyright 2019 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){return e=Object(i.a)(e,"x","square"),r.a.runKernel("Square",{x:e},{})}})},function(e,t,n){(function(e,r){var i;
/**
 * @license
 * Lodash <https://lodash.com/>
 * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
 * Released under MIT license <https://lodash.com/license>
 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
 */(function(){var o,a,s,u,c="Expected a function",l="__lodash_hash_undefined__",h="__lodash_placeholder__",f=9007199254740991,d=4294967295,p=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],m="[object Arguments]",g="[object Array]",A="[object Boolean]",v="[object Date]",b="[object Error]",y="[object Function]",w="[object GeneratorFunction]",x="[object Map]",C="[object Number]",k="[object Object]",E="[object Promise]",S="[object RegExp]",_="[object Set]",O="[object String]",T="[object Symbol]",D="[object WeakMap]",B="[object ArrayBuffer]",I="[object DataView]",M="[object Float32Array]",j="[object Float64Array]",N="[object Int8Array]",F="[object Int16Array]",R="[object Int32Array]",P="[object Uint8Array]",L="[object Uint8ClampedArray]",U="[object Uint16Array]",z="[object Uint32Array]",H=/\b__p \+= '';/g,$=/\b(__p \+=) '' \+/g,Q=/(__e\(.*?\)|\b__t\)) \+\n'';/g,V=/&(?:amp|lt|gt|quot|#39);/g,q=/[&<>"']/g,G=RegExp(V.source),W=RegExp(q.source),K=/<%-([\s\S]+?)%>/g,Y=/<%([\s\S]+?)%>/g,X=/<%=([\s\S]+?)%>/g,J=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Z=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,ne=RegExp(te.source),re=/^\s+/,ie=/\s/,oe=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ae=/\{\n\/\* \[wrapped with (.+)\] \*/,se=/,? & /,ue=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ce=/[()=,{}\[\]\/\s]/,le=/\\(\\)?/g,he=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,fe=/\w*$/,de=/^[-+]0x[0-9a-f]+$/i,pe=/^0b[01]+$/i,me=/^\[object .+?Constructor\]$/,ge=/^0o[0-7]+$/i,Ae=/^(?:0|[1-9]\d*)$/,ve=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,be=/($^)/,ye=/['\n\r\u2028\u2029\\]/g,we="\\ud800-\\udfff",xe="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Ce="\\ufe0e\\ufe0f",ke="["+we+"]",Ee="["+(De="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000")+"]",Se="["+xe+"]",_e="["+(a="\\u2700-\\u27bf")+"]",Oe="["+(We="a-z\\xdf-\\xf6\\xf8-\\xff")+"]",Te="(?:"+Oe+"|"+(De="[^"+we+De+"\\d+"+a+We+(s="A-Z\\xc0-\\xd6\\xd8-\\xde")+"]")+")",De="(?:"+(s="["+s+"]")+"|"+De+")",Be="(?:['’](?:d|ll|m|re|s|t|ve))?",Ie="(?:['’](?:D|LL|M|RE|S|T|VE))?",Me=(Me="["+Ce+"]?")+(je="(?:"+Se+"|"+(a="\\ud83c[\\udffb-\\udfff]")+")?")+"(?:\\u200d(?:"+[We="[^"+we+"]",Ke="(?:\\ud83c[\\udde6-\\uddff]){2}",u="[\\ud800-\\udbff][\\udc00-\\udfff]"].join("|")+")"+Me+je+")*",je="(?:"+[_e,Ke,u].join("|")+")"+Me,Ne=(_e="(?:"+[We+Se+"?",Se,Ke,u,ke].join("|")+")",RegExp("['’]","g")),Fe=RegExp(Se,"g"),Re=RegExp(a+"(?="+a+")|"+_e+Me,"g"),Pe=RegExp([s+"?"+Oe+"+"+Be+"(?="+[Ee,s,"$"].join("|")+")",De+"+"+Ie+"(?="+[Ee,s+Te,"$"].join("|")+")",s+"?"+Te+"+"+Be,s+"+"+Ie,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])","\\d+",je].join("|"),"g"),Le=RegExp("[\\u200d"+we+xe+Ce+"]"),Ue=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ze=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],He=-1,$e={},Qe=($e[M]=$e[j]=$e[N]=$e[F]=$e[R]=$e[P]=$e[L]=$e[U]=$e[z]=!0,$e[m]=$e[g]=$e[B]=$e[A]=$e[I]=$e[v]=$e[b]=$e[y]=$e[x]=$e[C]=$e[k]=$e[S]=$e[_]=$e[O]=$e[D]=!1,{}),Ve=(Qe[m]=Qe[g]=Qe[B]=Qe[I]=Qe[A]=Qe[v]=Qe[M]=Qe[j]=Qe[N]=Qe[F]=Qe[R]=Qe[x]=Qe[C]=Qe[k]=Qe[S]=Qe[_]=Qe[O]=Qe[T]=Qe[P]=Qe[L]=Qe[U]=Qe[z]=!0,Qe[b]=Qe[y]=Qe[D]=!1,{"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"}),qe=parseFloat,Ge=parseInt,We="object"==typeof e&&e&&e.Object===Object&&e,Ke="object"==typeof self&&self&&self.Object===Object&&self,Ye=We||Ke||Function("return this")(),Xe=(u=t&&!t.nodeType&&t)&&"object"==typeof r&&r&&!r.nodeType&&r,Je=Xe&&Xe.exports===u,Ze=Je&&We.process,et=(ke=function(){try{var e=Xe&&Xe.require&&Xe.require("util").types;return e||Ze&&Ze.binding&&Ze.binding("util")}catch(e){}}())&&ke.isArrayBuffer,tt=ke&&ke.isDate,nt=ke&&ke.isMap,rt=ke&&ke.isRegExp,it=ke&&ke.isSet,ot=ke&&ke.isTypedArray;function at(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function st(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(r,a,n(a),e)}return r}function ut(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function ct(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function lt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function ht(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}function ft(e,t){return!(null==e||!e.length)&&-1<xt(e,t,0)}function dt(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function pt(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function mt(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function gt(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function At(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function vt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var bt=St("length");function yt(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function wt(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function xt(e,t,n){if(t!=t)return wt(e,kt,n);for(var r=e,i=t,o=n-1,a=r.length;++o<a;)if(r[o]===i)return o;return-1}function Ct(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function kt(e){return e!=e}function Et(e,t){var n=null==e?0:e.length;return n?Tt(e,t)/n:NaN}function St(e){return function(t){return null==t?o:t[e]}}function _t(e){return function(t){return null==e?o:e[t]}}function Ot(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n}function Tt(e,t){for(var n,r=-1,i=e.length;++r<i;){var a=t(e[r]);a!==o&&(n=n===o?a:n+a)}return n}function Dt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Bt(e){return e&&e.slice(0,Gt(e)+1).replace(re,"")}function It(e){return function(t){return e(t)}}function Mt(e,t){return pt(t,(function(t){return e[t]}))}function jt(e,t){return e.has(t)}function Nt(e,t){for(var n=-1,r=e.length;++n<r&&-1<xt(t,e[n],0););return n}function Ft(e,t){for(var n=e.length;n--&&-1<xt(t,e[n],0););return n}var Rt=_t({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","Ĳ":"IJ","ĳ":"ij","Œ":"Oe","œ":"oe","ŉ":"'n","ſ":"s"}),Pt=_t({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function Lt(e){return"\\"+Ve[e]}function Ut(e){return Le.test(e)}function zt(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function Ht(e,t){return function(n){return e(t(n))}}function $t(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n];a!==t&&a!==h||(e[n]=h,o[i++]=n)}return o}function Qt(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function Vt(e){return(Ut(e)?function(e){for(var t=Re.lastIndex=0;Re.test(e);)++t;return t}:bt)(e)}function qt(e){return Ut(e)?e.match(Re)||[]:e.split("")}function Gt(e){for(var t=e.length;t--&&ie.test(e.charAt(t)););return t}var Wt=_t({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),Kt=function e(t){var n=(t=null==t?Ye:Kt.defaults(Ye.Object(),t,Kt.pick(Ye,ze))).Array,r=t.Date,i=t.Error,a=t.Function,s=t.Math,u=t.Object,ie=t.RegExp,we=t.String,xe=t.TypeError,Ce=n.prototype,ke=a.prototype,Ee=u.prototype,Se=t["__core-js_shared__"],_e=ke.toString,Oe=Ee.hasOwnProperty,Te=0,De=(ke=/[^.]+$/.exec(Se&&Se.keys&&Se.keys.IE_PROTO||""))?"Symbol(src)_1."+ke:"",Be=Ee.toString,Ie=_e.call(u),Me=Ye._,je=ie("^"+_e.call(Oe).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Re=(ke=Je?t.Buffer:o,t.Symbol),Le=t.Uint8Array,Ve=ke?ke.allocUnsafe:o,We=Ht(u.getPrototypeOf,u),Ke=u.create,Xe=Ee.propertyIsEnumerable,Ze=Ce.splice,bt=Re?Re.isConcatSpreadable:o,_t=Re?Re.iterator:o,Yt=Re?Re.toStringTag:o,Xt=function(){try{var e=Xi(u,"defineProperty");return e({},"",{}),e}catch(e){}}(),Jt=t.clearTimeout!==Ye.clearTimeout&&t.clearTimeout,Zt=r&&r.now!==Ye.Date.now&&r.now,en=t.setTimeout!==Ye.setTimeout&&t.setTimeout,tn=s.ceil,nn=s.floor,rn=u.getOwnPropertySymbols,on=(ke=ke?ke.isBuffer:o,t.isFinite),an=Ce.join,sn=Ht(u.keys,u),un=s.max,cn=s.min,ln=r.now,hn=t.parseInt,fn=s.random,dn=Ce.reverse,pn=(r=Xi(t,"DataView"),Xi(t,"Map")),mn=Xi(t,"Promise"),gn=Xi(t,"Set"),An=(t=Xi(t,"WeakMap"),Xi(u,"create")),vn=t&&new t,bn={},yn=Eo(r),wn=Eo(pn),xn=Eo(mn),Cn=Eo(gn),kn=Eo(t),En=(Re=Re?Re.prototype:o)?Re.valueOf:o,Sn=Re?Re.toString:o;function _n(e){if(Ia(e)&&!xa(e)&&!(e instanceof In)){if(e instanceof Bn)return e;if(Oe.call(e,"__wrapped__"))return So(e)}return new Bn(e)}var On=function(e){return Ba(e)?Ke?Ke(e):(Tn.prototype=e,e=new Tn,Tn.prototype=o,e):{}};function Tn(){}function Dn(){}function Bn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=o}function In(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=d,this.__views__=[]}function Mn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function jn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Nn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Fn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Nn;++t<n;)this.add(e[t])}function Rn(e){e=this.__data__=new jn(e),this.size=e.size}function Pn(e,t){var n,r=xa(e),i=!r&&wa(e),o=!r&&!i&&Sa(e),a=!r&&!i&&!o&&Ua(e),s=r||i||o||a,u=s?Dt(e.length,we):[],c=u.length;for(n in e)!t&&!Oe.call(e,n)||s&&("length"==n||o&&("offset"==n||"parent"==n)||a&&("buffer"==n||"byteLength"==n||"byteOffset"==n)||io(n,c))||u.push(n);return u}function Ln(e){var t=e.length;return t?e[Nr(0,t-1)]:o}function Un(e,t){return wo(mi(e),Kn(t,0,e.length))}function zn(e){return wo(mi(e))}function Hn(e,t,n){(n===o||va(e[t],n))&&(n!==o||t in e)||Gn(e,t,n)}function $n(e,t,n){var r=e[t];Oe.call(e,t)&&va(r,n)&&(n!==o||t in e)||Gn(e,t,n)}function Qn(e,t){for(var n=e.length;n--;)if(va(e[n][0],t))return n;return-1}function Vn(e,t,n,r){return er(e,(function(e,i,o){t(r,e,n(e),o)})),r}function qn(e,t){return e&&gi(t,us(t),e)}function Gn(e,t,n){"__proto__"==t&&Xt?Xt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Wn(e,t){for(var r=-1,i=t.length,a=n(i),s=null==e;++r<i;)a[r]=s?o:rs(e,t[r]);return a}function Kn(e,t,n){return e==e&&(n!==o&&(e=e<=n?e:n),t!==o&&(e=t<=e?e:t)),e}function Yn(e,t,n,r,i,a){var s,c=1&t,l=2&t,h=4&t;if((s=n?i?n(e,r,i,a):n(e):s)===o){if(!Ba(e))return e;var f;if(r=xa(e)){if(s=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Oe.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!c)return mi(e,s)}else{var d=eo(e),p=d==y||d==w;if(Sa(e))return ci(e,c);if(d==k||d==m||p&&!i){if(s=l||p?{}:no(e),!c)return l?(g=p=e,g=(f=s)&&gi(g,cs(g),f),gi(p,Zi(p),g)):(p=qn(s,f=e),gi(f,Ji(f),p))}else{if(!Qe[d])return i?e:{};s=function(e,t,n){var r=e.constructor;switch(t){case B:return li(e);case A:case v:return new r(+e);case I:return function(e,t){return t=t?li(e.buffer):e.buffer,new e.constructor(t,e.byteOffset,e.byteLength)}(e,n);case M:case j:case N:case F:case R:case P:case L:case U:case z:return hi(e,n);case x:return new r;case C:case O:return new r(e);case S:return function(e){var t=new e.constructor(e.source,fe.exec(e));return t.lastIndex=e.lastIndex,t}(e);case _:return new r;case T:return function(e){return En?u(En.call(e)):{}}(e)}}(e,d,c)}}var g=(a=a||new Rn).get(e);if(g)return g;a.set(e,s),Ra(e)?e.forEach((function(r){s.add(Yn(r,t,n,r,e,a))})):Ma(e)&&e.forEach((function(r,i){s.set(i,Yn(r,t,n,i,e,a))}));var b=r?o:(h?l?Qi:$i:l?cs:us)(e);ut(b||e,(function(r,i){b&&(r=e[i=r]),$n(s,i,Yn(r,t,n,i,e,a))}))}return s}function Xn(e,t,n){var r=n.length;if(null==e)return!r;for(e=u(e);r--;){var i=n[r],a=t[i],s=e[i];if(s===o&&!(i in e)||!a(s))return!1}return!0}function Jn(e,t,n){if("function"!=typeof e)throw new xe(c);return Ao((function(){e.apply(o,n)}),t)}function Zn(e,t,n,r){var i=-1,o=ft,a=!0,s=e.length,u=[],c=t.length;if(s){n&&(t=pt(t,It(n))),r?(o=dt,a=!1):200<=t.length&&(o=jt,a=!1,t=new Fn(t));e:for(;++i<s;){var l=e[i],h=null==n?l:n(l);l=r||0!==l?l:0;if(a&&h==h){for(var f=c;f--;)if(t[f]===h)continue e;u.push(l)}else o(t,h,r)||u.push(l)}}return u}_n.templateSettings={escape:K,evaluate:Y,interpolate:X,variable:"",imports:{_:_n}},(_n.prototype=Dn.prototype).constructor=_n,(Bn.prototype=On(Dn.prototype)).constructor=Bn,(In.prototype=On(Dn.prototype)).constructor=In,Mn.prototype.clear=function(){this.__data__=An?An(null):{},this.size=0},Mn.prototype.delete=function(e){return e=this.has(e)&&delete this.__data__[e],this.size-=e?1:0,e},Mn.prototype.get=function(e){var t,n=this.__data__;return An?(t=n[e])===l?o:t:Oe.call(n,e)?n[e]:o},Mn.prototype.has=function(e){var t=this.__data__;return An?t[e]!==o:Oe.call(t,e)},Mn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=An&&t===o?l:t,this},jn.prototype.clear=function(){this.__data__=[],this.size=0},jn.prototype.delete=function(e){var t=this.__data__;return!((e=Qn(t,e))<0||(e==t.length-1?t.pop():Ze.call(t,e,1),--this.size,0))},jn.prototype.get=function(e){var t=this.__data__;return(e=Qn(t,e))<0?o:t[e][1]},jn.prototype.has=function(e){return-1<Qn(this.__data__,e)},jn.prototype.set=function(e,t){var n=this.__data__,r=Qn(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Nn.prototype.clear=function(){this.size=0,this.__data__={hash:new Mn,map:new(pn||jn),string:new Mn}},Nn.prototype.delete=function(e){return e=Ki(this,e).delete(e),this.size-=e?1:0,e},Nn.prototype.get=function(e){return Ki(this,e).get(e)},Nn.prototype.has=function(e){return Ki(this,e).has(e)},Nn.prototype.set=function(e,t){var n=Ki(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Fn.prototype.add=Fn.prototype.push=function(e){return this.__data__.set(e,l),this},Fn.prototype.has=function(e){return this.__data__.has(e)},Rn.prototype.clear=function(){this.__data__=new jn,this.size=0},Rn.prototype.delete=function(e){var t=this.__data__;e=t.delete(e);return this.size=t.size,e},Rn.prototype.get=function(e){return this.__data__.get(e)},Rn.prototype.has=function(e){return this.__data__.has(e)},Rn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof jn){var r=n.__data__;if(!pn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Nn(r)}return n.set(e,t),this.size=n.size,this};var er=bi(ur),tr=bi(cr,!0);function nr(e,t){var n=!0;return er(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function rr(e,t,n){for(var r=-1,i=e.length;++r<i;){var a,s,u=e[r],c=t(u);null!=c&&(a===o?c==c&&!La(c):n(c,a))&&(a=c,s=u)}return s}function ir(e,t){var n=[];return er(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function or(e,t,n,r,i){var o=-1,a=e.length;for(n=n||ro,i=i||[];++o<a;){var s=e[o];0<t&&n(s)?1<t?or(s,t-1,n,r,i):mt(i,s):r||(i[i.length]=s)}return i}var ar=yi(),sr=yi(!0);function ur(e,t){return e&&ar(e,t,us)}function cr(e,t){return e&&sr(e,t,us)}function lr(e,t){return ht(t,(function(t){return Oa(e[t])}))}function hr(e,t){for(var n=0,r=(t=oi(t,e)).length;null!=e&&n<r;)e=e[ko(t[n++])];return n&&n==r?e:o}function fr(e,t,n){return t=t(e),xa(e)?t:mt(t,n(e))}function dr(e){if(null==e)return e===o?"[object Undefined]":"[object Null]";if(Yt&&Yt in u(e)){var t=e,n=Oe.call(t,Yt),r=t[Yt];try{t[Yt]=o;var i=!0}catch(e){}var a=Be.call(t);return i&&(n?t[Yt]=r:delete t[Yt]),a}return Be.call(e)}function pr(e,t){return t<e}function mr(e,t){return null!=e&&Oe.call(e,t)}function gr(e,t){return null!=e&&t in u(e)}function Ar(e,t,r){for(var i=r?dt:ft,a=e[0].length,s=e.length,u=s,c=n(s),l=1/0,h=[];u--;){var f=e[u];u&&t&&(f=pt(f,It(t))),l=cn(f.length,l),c[u]=!r&&(t||120<=a&&120<=f.length)?new Fn(u&&f):o}f=e[0];var d=-1,p=c[0];e:for(;++d<a&&h.length<l;){var m=f[d],g=t?t(m):m;m=r||0!==m?m:0;if(!(p?jt(p,g):i(h,g,r))){for(u=s;--u;){var A=c[u];if(!(A?jt(A,g):i(e[u],g,r)))continue e}p&&p.push(g),h.push(m)}}return h}function vr(e,t,n){return null==(t=null==(e=po(e,t=oi(t,e)))?e:e[ko(Bo(t))])?o:at(t,e,n)}function br(e){return Ia(e)&&dr(e)==m}function yr(e,t,n,r,i){if(e===t)return!0;if(null==e||null==t||!Ia(e)&&!Ia(t))return e!=e&&t!=t;var a=yr,s=xa(e),u=xa(t),c=s?g:eo(e),l=(u=u?g:eo(t),(c=c==m?k:c)==k),h=(u=u==m?k:u)==k;if((u=c==u)&&Sa(e)){if(!Sa(t))return!1;l=!(s=!0)}if(u&&!l){if(i=i||new Rn,s||Ua(e))return zi(e,t,n,r,a,i);var f=e,d=t,p=n,y=r,w=a,E=i;switch(c){case I:if(f.byteLength!=d.byteLength||f.byteOffset!=d.byteOffset)return!1;f=f.buffer,d=d.buffer;case B:return!(f.byteLength!=d.byteLength||!w(new Le(f),new Le(d)));case A:case v:case C:return va(+f,+d);case b:return f.name==d.name&&f.message==d.message;case S:case O:return f==d+"";case x:var D=zt;case _:var M=1&p;return D=D||Qt,f.size==d.size||M?(M=E.get(f))?M==d:(p|=2,E.set(f,d),M=zi(D(f),D(d),p,y,w,E),E.delete(f),M):!1;case T:if(En)return En.call(f)==En.call(d)}return!1}if(!(1&n)&&(s=l&&Oe.call(e,"__wrapped__"),c=h&&Oe.call(t,"__wrapped__"),s||c))return a(l=s?e.value():e,h=c?t.value():t,n,r,i=i||new Rn);if(u){var j=e,N=t,F=n,R=r,P=a,L=i=i||new Rn,U=1&F,z=$i(j),H=z.length;if(H!=(s=$i(N).length)&&!U)return!1;for(var $=H;$--;){var Q=z[$];if(!(U?Q in N:Oe.call(N,Q)))return!1}if(s=L.get(j),c=L.get(N),s&&c)return s==N&&c==j;for(var V=!0,q=(L.set(j,N),L.set(N,j),U);++$<H;){var G,W=j[Q=z[$]],K=N[Q];if(!((G=R?U?R(K,W,Q,N,j,L):R(W,K,Q,j,N,L):G)===o?W===K||P(W,K,F,R,L):G)){V=!1;break}q=q||"constructor"==Q}return V&&!q&&((s=j.constructor)!=(c=N.constructor)&&"constructor"in j&&"constructor"in N&&!("function"==typeof s&&s instanceof s&&"function"==typeof c&&c instanceof c)&&(V=!1)),L.delete(j),L.delete(N),V}return!1}function wr(e,t,n,r){var i=n.length,a=i,s=!r;if(null==e)return!a;for(e=u(e);i--;){var c=n[i];if(s&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++i<a;){var l=(c=n[i])[0],h=e[l],f=c[1];if(s&&c[2]){if(h===o&&!(l in e))return!1}else{var d,p=new Rn;if(!((d=r?r(h,f,l,e,t,p):d)===o?yr(f,h,3,r,p):d))return!1}}return!0}function xr(e){var t;return!(!Ba(e)||(t=e,De&&De in t))&&(Oa(e)?je:me).test(Eo(e))}function Cr(e){return"function"==typeof e?e:null==e?js:"object"==typeof e?xa(e)?Or(e[0],e[1]):_r(e):$s(e)}function kr(e){if(!co(e))return sn(e);var t,n=[];for(t in u(e))Oe.call(e,t)&&"constructor"!=t&&n.push(t);return n}function Er(e,t){return e<t}function Sr(e,t){var r=-1,i=ka(e)?n(e.length):[];return er(e,(function(e,n,o){i[++r]=t(e,n,o)})),i}function _r(e){var t=Yi(e);return 1==t.length&&t[0][2]?ho(t[0][0],t[0][1]):function(n){return n===e||wr(n,e,t)}}function Or(e,t){return ao(e)&&lo(t)?ho(ko(e),t):function(n){var r=rs(n,e);return r===o&&r===t?is(n,e):yr(t,r,3)}}function Tr(e,t,n,r,i){e!==t&&ar(t,(function(a,s){var u,c,l,h,f,d,p,m,g,A,v,b,y;i=i||new Rn,Ba(a)?(c=t,h=n,f=Tr,d=r,p=i,v=mo(u=e,l=s),b=mo(c,l),(y=p.get(b))||((c=(y=d?d(v,b,l+"",u,c,p):o)===o)&&(g=!(m=xa(b))&&Sa(b),A=!m&&!g&&Ua(b),y=b,m||g||A?y=xa(v)?v:Ea(v)?mi(v):g?ci(b,!(c=!1)):A?hi(b,!(c=!1)):[]:Na(b)||wa(b)?wa(y=v)?y=Wa(v):Ba(v)&&!Oa(v)||(y=no(b)):c=!1),c&&(p.set(b,y),f(y,b,h,d,p),p.delete(b))),Hn(u,l,y)):(m=r?r(mo(e,s),a,s+"",e,t,i):o,Hn(e,s,m=m===o?a:m))}),cs)}function Dr(e,t){var n=e.length;if(n)return io(t+=t<0?n:0,n)?e[t]:o}function Br(e,t,n){t=t.length?pt(t,(function(e){return xa(e)?function(t){return hr(t,1===e.length?e[0]:e)}:e})):[js];var r=-1;t=pt(t,It(Wi()));var i=Sr(e,(function(e,n,i){return{criteria:pt(t,(function(t){return t(e)})),index:++r,value:e}})),o=(e=function(e,t){for(var r=n,i=-1,o=e.criteria,a=t.criteria,s=o.length,u=r.length;++i<s;){var c=fi(o[i],a[i]);if(c)return u<=i?c:c*("desc"==r[i]?-1:1)}return e.index-t.index},i.length);for(i.sort(e);o--;)i[o]=i[o].value;return i}function Ir(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var a=t[r],s=hr(e,a);n(s,a)&&Ur(o,oi(a,e),s)}return o}function Mr(e,t,n,r){var i=r?Ct:xt,o=-1,a=t.length,s=e;for(e===t&&(t=mi(t)),n&&(s=pt(e,It(n)));++o<a;)for(var u=0,c=t[o],l=n?n(c):c;-1<(u=i(s,l,u,r));)s!==e&&Ze.call(s,u,1),Ze.call(e,u,1);return e}function jr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i,o=t[n];n!=r&&o===i||(io(i=o)?Ze.call(e,o,1):Xr(e,o))}}function Nr(e,t){return e+nn(fn()*(t-e+1))}function Fr(e,t){var n="";if(!(!e||t<1||f<t))for(;t%2&&(n+=e),(t=nn(t/2))&&(e+=e),t;);return n}function Rr(e,t){return vo(fo(e,t,js),e+"")}function Pr(e){return Ln(As(e))}function Lr(e,t){return wo(e=As(e),Kn(t,0,e.length))}function Ur(e,t,n,r){if(Ba(e))for(var i=-1,a=(t=oi(t,e)).length,s=a-1,u=e;null!=u&&++i<a;){var c,l=ko(t[i]),h=n;if("__proto__"===l||"constructor"===l||"prototype"===l)return e;i!=s&&(c=u[l],(h=r?r(c,l,u):o)===o&&(h=Ba(c)?c:io(t[i+1])?[]:{})),$n(u,l,h),u=u[l]}return e}var zr=vn?function(e,t){return vn.set(e,t),e}:js;Re=Xt?function(e,t){return Xt(e,"toString",{configurable:!0,enumerable:!1,value:Bs(t),writable:!0})}:js;function Hr(e){return wo(As(e))}function $r(e,t,r){for(var i=-1,o=e.length,a=((r=o<r?o:r)<0&&(r+=o),o=r<(t=t<0?o<-t?0:o+t:t)?0:r-t>>>0,t>>>=0,n(o));++i<o;)a[i]=e[i+t];return a}function Qr(e,t){var n;return er(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function Vr(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;r<i;){var o=r+i>>>1,a=e[o];null!==a&&!La(a)&&(n?a<=t:a<t)?r=1+o:i=o}return i}return qr(e,t,js,n)}function qr(e,t,n,r){var i=0,a=null==e?0:e.length;if(0===a)return 0;for(var s=(t=n(t))!=t,u=null===t,c=La(t),l=t===o;i<a;){var h=nn((i+a)/2),f=n(e[h]),d=f!==o,p=null===f,m=f==f,g=La(f);(m=s?r||m:l?m&&(r||d):u?m&&d&&(r||!p):c?m&&d&&!p&&(r||!g):!p&&!g&&(r?f<=t:f<t))?i=h+1:a=h}return cn(a,4294967294)}function Gr(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a,s=e[n],u=t?t(s):s;n&&va(u,a)||(a=u,o[i++]=0===s?0:s)}return o}function Wr(e){return"number"==typeof e?e:La(e)?NaN:+e}function Kr(e){var t;return"string"==typeof e?e:xa(e)?pt(e,Kr)+"":La(e)?Sn?Sn.call(e):"":"0"==(t=e+"")&&1/e==-1/0?"-0":t}function Yr(e,t,n){var r=-1,i=ft,o=e.length,a=!0,s=[],u=s;if(n)a=!1,i=dt;else if(200<=o){var c=t?null:Ni(e);if(c)return Qt(c);a=!1,i=jt,u=new Fn}else u=t?[]:s;e:for(;++r<o;){var l=e[r],h=t?t(l):l;l=n||0!==l?l:0;if(a&&h==h){for(var f=u.length;f--;)if(u[f]===h)continue e;t&&u.push(h),s.push(l)}else i(u,h,n)||(u!==s&&u.push(h),s.push(l))}return s}function Xr(e,t){return null==(e=po(e,t=oi(t,e)))||delete e[ko(Bo(t))]}function Jr(e,t,n,r){return Ur(e,t,n(hr(e,t)),r)}function Zr(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?$r(e,r?0:o,r?o+1:i):$r(e,r?o+1:0,r?i:o)}function ei(e,t){var n=e;return gt(t,(function(e,t){return t.func.apply(t.thisArg,mt([e],t.args))}),n=e instanceof In?e.value():n)}function ti(e,t,r){var i=e.length;if(i<2)return i?Yr(e[0]):[];for(var o=-1,a=n(i);++o<i;)for(var s=e[o],u=-1;++u<i;)u!=o&&(a[o]=Zn(a[o]||s,e[u],t,r));return Yr(or(a,1),t,r)}function ni(e,t,n){for(var r=-1,i=e.length,a=t.length,s={};++r<i;){var u=r<a?t[r]:o;n(s,e[r],u)}return s}function ri(e){return Ea(e)?e:[]}function ii(e){return"function"==typeof e?e:js}function oi(e,t){return xa(e)?e:ao(e,t)?[e]:Co(Ka(e))}var ai=Rr;function si(e,t,n){var r=e.length;return n=n===o?r:n,!t&&r<=n?e:$r(e,t,n)}var ui=Jt||function(e){return Ye.clearTimeout(e)};function ci(e,t){return t?e.slice():(t=e.length,t=Ve?Ve(t):new e.constructor(t),e.copy(t),t)}function li(e){var t=new e.constructor(e.byteLength);return new Le(t).set(new Le(e)),t}function hi(e,t){return t=t?li(e.buffer):e.buffer,new e.constructor(t,e.byteOffset,e.length)}function fi(e,t){if(e!==t){var n=e!==o,r=null===e,i=e==e,a=La(e),s=t!==o,u=null===t,c=t==t,l=La(t);if(!u&&!l&&!a&&t<e||a&&s&&c&&!u&&!l||r&&s&&c||!n&&c||!i)return 1;if(!r&&!a&&!l&&e<t||l&&n&&i&&!r&&!a||u&&n&&i||!s&&i||!c)return-1}return 0}function di(e,t,r,i){for(var o=-1,a=e.length,s=r.length,u=-1,c=t.length,l=un(a-s,0),h=n(c+l),f=!i;++u<c;)h[u]=t[u];for(;++o<s;)(f||o<a)&&(h[r[o]]=e[o]);for(;l--;)h[u++]=e[o++];return h}function pi(e,t,r,i){for(var o=-1,a=e.length,s=-1,u=r.length,c=-1,l=t.length,h=un(a-u,0),f=n(h+l),d=!i;++o<h;)f[o]=e[o];for(var p=o;++c<l;)f[p+c]=t[c];for(;++s<u;)(d||o<a)&&(f[p+r[s]]=e[o++]);return f}function mi(e,t){var r=-1,i=e.length;for(t=t||n(i);++r<i;)t[r]=e[r];return t}function gi(e,t,n,r){for(var i=!n,a=(n=n||{},-1),s=t.length;++a<s;){var u=t[a],c=r?r(n[u],e[u],u,n,e):o;(i?Gn:$n)(n,u,c=c===o?e[u]:c)}return n}function Ai(e,t){return function(n,r){var i=xa(n)?st:Vn,o=t?t():{};return i(n,e,Wi(r,2),o)}}function vi(e){return Rr((function(t,n){var r=-1,i=n.length,a=1<i?n[i-1]:o,s=2<i?n[2]:o;a=3<e.length&&"function"==typeof a?(i--,a):o;for(s&&oo(n[0],n[1],s)&&(a=i<3?o:a,i=1),t=u(t);++r<i;){var c=n[r];c&&e(t,c,r,a)}return t}))}function bi(e,t){return function(n,r){if(null!=n){if(!ka(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=u(n);(t?o--:++o<i)&&!1!==r(a[o],o,a););}return n}}function yi(e){return function(t,n,r){for(var i=-1,o=u(t),a=r(t),s=a.length;s--;){var c=a[e?s:++i];if(!1===n(o[c],c,o))break}return t}}function wi(e){return function(t){var n=(r=Ut(t=Ka(t))?qt(t):o)?r[0]:t.charAt(0),r=r?si(r,1).join(""):t.slice(1);return n[e]()+r}}function xi(e){return function(t){return gt(Os(ys(t).replace(Ne,"")),e,"")}}function Ci(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=On(e.prototype),r=e.apply(n,t);return Ba(r)?r:n}}function ki(e){return function(t,n,r){var i,a=u(t);return-1<(n=(ka(t)||(i=Wi(n,3),t=us(t),n=function(e){return i(a[e],e,a)}),e(t,n,r)))?a[i?t[n]:n]:o}}function Ei(e){return Hi((function(t){var n=t.length,r=n,i=Bn.prototype.thru;for(e&&t.reverse();r--;){var a=t[r];if("function"!=typeof a)throw new xe(c);i&&!l&&"wrapper"==qi(a)&&(l=new Bn([],!0))}for(r=l?r:n;++r<n;)var s=qi(a=t[r]),u="wrapper"==s?Vi(a):o,l=u&&so(u[0])&&424==u[1]&&!u[4].length&&1==u[9]?l[qi(u[0])].apply(l,u[3]):1==a.length&&so(a)?l[s]():l.thru(a);return function(){var e=arguments,r=e[0];if(l&&1==e.length&&xa(r))return l.plant(r).value();for(var i=0,o=n?t[i].apply(this,e):r;++i<n;)o=t[i].call(this,o);return o}}))}function Si(e,t,r,i,a,s,u,c,l,h){var f=128&t,d=1&t,p=2&t,m=24&t,g=512&t,A=p?o:Ci(e);return function v(){for(var b,y,w,x=n(w=arguments.length),C=w;C--;)x[C]=arguments[C];return m&&(y=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(x,b=Gi(v))),i&&(x=di(x,i,a,m)),s&&(x=pi(x,s,u,m)),w-=y,m&&w<h?(y=$t(x,b),Mi(e,t,Si,v.placeholder,r,x,y,c,l,h-w)):(b=d?r:this,y=p?b[e]:e,w=x.length,c?x=function(e,t){for(var n=e.length,r=cn(t.length,n),i=mi(e);r--;){var a=t[r];e[r]=io(a,n)?i[a]:o}return e}(x,c):g&&1<w&&x.reverse(),f&&l<w&&(x.length=l),(y=this&&this!==Ye&&this instanceof v?A||Ci(y):y).apply(b,x))}}function _i(e,t){return function(n,r){return n=n,i=e,o=t(r),a={},ur(n,(function(e,t,n){i(a,o(e),t,n)})),a;var i,o,a}}function Oi(e,t){return function(n,r){var i;if(n===o&&r===o)return t;if(n!==o&&(i=n),r!==o){if(i===o)return r;r=("string"==typeof n||"string"==typeof r?(n=Kr(n),Kr):(n=Wr(n),Wr))(r),i=e(n,r)}return i}}function Ti(e){return Hi((function(t){return t=pt(t,It(Wi())),Rr((function(n){var r=this;return e(t,(function(e){return at(e,r,n)}))}))}))}function Di(e,t){var n=(t=t===o?" ":Kr(t)).length;return n<2?n?Fr(t,e):t:(n=Fr(t,tn(e/Vt(t))),Ut(t)?si(qt(n),0,e).join(""):n.slice(0,e))}function Bi(e){return function(t,r,i){i&&"number"!=typeof i&&oo(t,r,i)&&(r=i=o),t=Qa(t),r===o?(r=t,t=0):r=Qa(r);for(var a=t,s=i=i===o?t<r?1:-1:Qa(i),u=e,c=-1,l=un(tn((r-a)/(s||1)),0),h=n(l);l--;)h[u?l:++c]=a,a+=s;return h}}function Ii(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=Ga(t),n=Ga(n)),e(t,n)}}function Mi(e,t,n,r,i,a,s,u,c,l){var h=8&t;4&(t=(t|(h?32:64))&~(h?64:32))||(t&=-4),i=[e,t,i,h?a:o,h?s:o,h?o:a,h?o:s,u,c,l],a=n.apply(o,i);return so(e)&&go(a,i),a.placeholder=r,bo(a,e,t)}function ji(e){var t=s[e];return function(e,n){var r;return e=Ga(e),(n=null==n?0:cn(Va(n),292))&&on(e)?(r=(Ka(e)+"e").split("e"),+((r=(Ka(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))):t(e)}}var Ni=gn&&1/Qt(new gn([,-0]))[1]==1/0?function(e){return new gn(e)}:Ls;function Fi(e){return function(t){var n,r,i,o=eo(t);return o==x?zt(t):o==_?(o=t,n=-1,r=Array(o.size),o.forEach((function(e){r[++n]=[e,e]})),r):pt(e(i=t),(function(e){return[e,i[e]]}))}}function Ri(e,t,r,i,a,s,u,l){var f,d,p,m,g,A,v,b,y,w,x,C,k,E=2&t;if(E||"function"==typeof e)return(f=i?i.length:0)||(t&=-97,i=a=o),u=u===o?u:un(Va(u),0),l=l===o?l:Va(l),f-=a?a.length:0,64&t&&(p=i,m=a,i=a=o),p=[e,t,r,i,a,p,m,s,u,l],(d=E?o:Vi(e))&&(m=d,b=(v=(u=(s=p)[1])|(A=m[1]))<131,y=128==A&&8==u||128==A&&256==u&&s[7].length<=m[8]||384==A&&m[7].length<=m[8]&&8==u,(b||y)&&(1&A&&(s[2]=m[2],v|=1&u?0:4),(b=m[3])&&(g=s[3],s[3]=g?di(g,b,m[4]):b,s[4]=g?$t(s[3],h):m[4]),(b=m[5])&&(g=s[5],s[5]=g?pi(g,b,m[6]):b,s[6]=g?$t(s[5],h):m[6]),(b=m[7])&&(s[7]=b),128&A&&(s[8]=null==s[8]?m[8]:cn(s[8],m[8])),null==s[9]&&(s[9]=m[9]),s[0]=m[0],s[1]=v)),e=p[0],t=p[1],r=p[2],i=p[3],a=p[4],!(l=p[9]=p[9]===o?E?0:e.length:un(p[9]-f,0))&&24&t&&(t&=-25),y=t&&1!=t?8==t||16==t?function(e,t,r){var i=Ci(e);return function a(){for(var s=arguments.length,u=n(s),c=s,l=Gi(a);c--;)u[c]=arguments[c];return(s-=(l=s<3&&u[0]!==l&&u[s-1]!==l?[]:$t(u,l)).length)<r?Mi(e,t,Si,a.placeholder,o,u,l,o,o,r-s):at(this&&this!==Ye&&this instanceof a?i:e,this,u)}}(e,t,l):32!=t&&33!=t||a.length?Si.apply(o,p):function(e,t,r,i){var o=1&t,a=Ci(e);return function t(){for(var s=-1,u=arguments.length,c=-1,l=i.length,h=n(l+u),f=this&&this!==Ye&&this instanceof t?a:e;++c<l;)h[c]=i[c];for(;u--;)h[c++]=arguments[++s];return at(f,o?r:this,h)}}(e,t,r,i):(x=r,C=1&t,k=Ci(w=e),function e(){return(this&&this!==Ye&&this instanceof e?k:w).apply(C?x:this,arguments)}),bo((d?zr:go)(y,p),e,t);throw new xe(c)}function Pi(e,t,n,r){return e===o||va(e,Ee[n])&&!Oe.call(r,n)?t:e}function Li(e,t,n,r,i,a){return Ba(e)&&Ba(t)&&(a.set(t,e),Tr(e,t,o,Li,a),a.delete(t)),e}function Ui(e){return Na(e)?o:e}function zi(e,t,n,r,i,a){var s=1&n,u=e.length;if(u!=(c=t.length)&&!(s&&u<c))return!1;var c=a.get(e),l=a.get(t);if(c&&l)return c==t&&l==e;var h=-1,f=!0,d=2&n?new Fn:o;for(a.set(e,t),a.set(t,e);++h<u;){var p,m=e[h],g=t[h];if((p=r?s?r(g,m,h,t,e,a):r(m,g,h,e,t,a):p)!==o){if(p)continue;f=!1;break}if(d){if(!vt(t,(function(e,t){return!jt(d,t)&&(m===e||i(m,e,n,r,a))&&d.push(t)}))){f=!1;break}}else if(m!==g&&!i(m,g,n,r,a)){f=!1;break}}return a.delete(e),a.delete(t),f}function Hi(e){return vo(fo(e,o,To),e+"")}function $i(e){return fr(e,us,Ji)}function Qi(e){return fr(e,cs,Zi)}var Vi=vn?function(e){return vn.get(e)}:Ls;function qi(e){for(var t=e.name+"",n=bn[t],r=Oe.call(bn,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function Gi(e){return(Oe.call(_n,"placeholder")?_n:e).placeholder}function Wi(){var e=(e=_n.iteratee||Ns)===Ns?Cr:e;return arguments.length?e(arguments[0],arguments[1]):e}function Ki(e,t){var n,r;e=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?e["string"==typeof t?"string":"hash"]:e.map}function Yi(e){for(var t=us(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,lo(i)]}return t}function Xi(e,t){return t=t,xr(e=null==(e=e)?o:e[t])?e:o}var Ji=rn?function(e){return null==e?[]:(e=u(e),ht(rn(e),(function(t){return Xe.call(e,t)})))}:qs,Zi=rn?function(e){for(var t=[];e;)mt(t,Ji(e)),e=We(e);return t}:qs,eo=dr;function to(e,t,n){for(var r=-1,i=(t=oi(t,e)).length,o=!1;++r<i;){var a=ko(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&Da(i)&&io(a,i)&&(xa(e)||wa(e))}function no(e){return"function"!=typeof e.constructor||co(e)?{}:On(We(e))}function ro(e){return xa(e)||wa(e)||!!(bt&&e&&e[bt])}function io(e,t){var n=typeof e;return!!(t=null==t?f:t)&&("number"==n||"symbol"!=n&&Ae.test(e))&&-1<e&&e%1==0&&e<t}function oo(e,t,n){var r;if(Ba(n))return("number"==(r=typeof t)?ka(n)&&io(t,n.length):"string"==r&&t in n)&&va(n[t],e)}function ao(e,t){var n;if(!xa(e))return"number"==(n=typeof e)||"symbol"==n||"boolean"==n||null==e||La(e)||Z.test(e)||!J.test(e)||null!=t&&e in u(t)}function so(e){var t=qi(e),n=_n[t];return"function"==typeof n&&t in In.prototype&&(e===n||(t=Vi(n))&&e===t[0])}(r&&eo(new r(new ArrayBuffer(1)))!=I||pn&&eo(new pn)!=x||mn&&eo(mn.resolve())!=E||gn&&eo(new gn)!=_||t&&eo(new t)!=D)&&(eo=function(e){var t=dr(e);if(e=(e=t==k?e.constructor:o)?Eo(e):"")switch(e){case yn:return I;case wn:return x;case xn:return E;case Cn:return _;case kn:return D}return t});var uo=Se?Oa:Gs;function co(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ee)}function lo(e){return e==e&&!Ba(e)}function ho(e,t){return function(n){return null!=n&&n[e]===t&&(t!==o||e in u(n))}}function fo(e,t,r){return t=un(t===o?e.length-1:t,0),function(){for(var i=arguments,o=-1,a=un(i.length-t,0),s=n(a);++o<a;)s[o]=i[t+o];o=-1;for(var u=n(t+1);++o<t;)u[o]=i[o];return u[t]=r(s),at(e,this,u)}}function po(e,t){return t.length<2?e:hr(e,$r(t,0,-1))}function mo(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var go=yo(zr),Ao=en||function(e,t){return Ye.setTimeout(e,t)},vo=yo(Re);function bo(e,t,n){var r,i,o;return vo(e,(i=(t=(t=e=t=t+"").match(ae))?t[1].split(se):[],o=n,ut(p,(function(e){var t="_."+e[0];o&e[1]&&!ft(i,t)&&i.push(t)})),(n=(t=i.sort()).length)?(t[r=n-1]=(1<n?"& ":"")+t[r],t=t.join(2<n?", ":" "),e.replace(oe,"{\n/* [wrapped with "+t+"] */\n")):e))}function yo(e){var t=0,n=0;return function(){var r=ln(),i=16-(r-n);if(n=r,0<i){if(800<=++t)return arguments[0]}else t=0;return e.apply(o,arguments)}}function wo(e,t){var n=-1,r=e.length,i=r-1;for(t=t===o?r:t;++n<t;){var a=Nr(n,i),s=e[a];e[a]=e[n],e[n]=s}return e.length=t,e}xo=(Jt=da(Jt=function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,(function(e,n,r,i){t.push(r?i.replace(le,"$1"):n||e)})),t},(function(e){return 500===xo.size&&xo.clear(),e}))).cache;var xo,Co=Jt;function ko(e){var t;return"string"==typeof e||La(e)?e:"0"==(t=e+"")&&1/e==-1/0?"-0":t}function Eo(e){if(null!=e){try{return _e.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function So(e){var t;return e instanceof In?e.clone():((t=new Bn(e.__wrapped__,e.__chain__)).__actions__=mi(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t)}function _o(e,t,n){var r=null==e?0:e.length;return r?((n=null==n?0:Va(n))<0&&(n=un(r+n,0)),wt(e,Wi(t,3),n)):-1}function Oo(e,t,n){var r,i=null==e?0:e.length;return i?(r=i-1,n!==o&&(r=Va(n),r=n<0?un(i+r,0):cn(r,i-1)),wt(e,Wi(t,3),r,!0)):-1}function To(e){return null!=e&&e.length?or(e,1):[]}function Do(e){return e&&e.length?e[0]:o}function Bo(e){var t=null==e?0:e.length;return t?e[t-1]:o}function Io(e,t){return e&&e.length&&t&&t.length?Mr(e,t):e}r=Rr((function(e,t){return Ea(e)?Zn(e,or(t,1,Ea,!0)):[]})),mn=Rr((function(e,t){var n=Bo(t);return Ea(n)&&(n=o),Ea(e)?Zn(e,or(t,1,Ea,!0),Wi(n,2)):[]})),t=Rr((function(e,t){var n=Bo(t);return Ea(n)&&(n=o),Ea(e)?Zn(e,or(t,1,Ea,!0),o,n):[]})),Se=Rr((function(e){var t=pt(e,ri);return t.length&&t[0]===e[0]?Ar(t):[]})),en=Rr((function(e){var t=Bo(e),n=pt(e,ri);return t===Bo(n)?t=o:n.pop(),n.length&&n[0]===e[0]?Ar(n,Wi(t,2)):[]})),Re=Rr((function(e){var t=Bo(e),n=pt(e,ri);return(t="function"==typeof t?t:o)&&n.pop(),n.length&&n[0]===e[0]?Ar(n,o,t):[]})),Jt=Rr(Io);var Mo=Hi((function(e,t){var n=null==e?0:e.length,r=Wn(e,t);return jr(e,pt(t,(function(e){return io(e,n)?+e:e})).sort(fi)),r}));function jo(e){return null==e?e:dn.call(e)}var No=Rr((function(e){return Yr(or(e,1,Ea,!0))})),Fo=Rr((function(e){var t=Bo(e);return Ea(t)&&(t=o),Yr(or(e,1,Ea,!0),Wi(t,2))})),Ro=Rr((function(e){var t="function"==typeof(t=Bo(e))?t:o;return Yr(or(e,1,Ea,!0),o,t)}));function Po(e){var t;return e&&e.length?(t=0,e=ht(e,(function(e){return Ea(e)&&(t=un(e.length,t),1)})),Dt(t,(function(t){return pt(e,St(t))}))):[]}function Lo(e,t){return e&&e.length?(e=Po(e),null==t?e:pt(e,(function(e){return at(t,o,e)}))):[]}var Uo=Rr((function(e,t){return Ea(e)?Zn(e,t):[]})),zo=Rr((function(e){return ti(ht(e,Ea))})),Ho=Rr((function(e){var t=Bo(e);return Ea(t)&&(t=o),ti(ht(e,Ea),Wi(t,2))})),$o=Rr((function(e){var t="function"==typeof(t=Bo(e))?t:o;return ti(ht(e,Ea),o,t)})),Qo=Rr(Po),Vo=Rr((function(e){var t="function"==typeof(t=1<(t=e.length)?e[t-1]:o)?(e.pop(),t):o;return Lo(e,t)}));function qo(e){return(e=_n(e)).__chain__=!0,e}function Go(e,t){return t(e)}var Wo=Hi((function(e){function t(t){return Wn(t,e)}var n=e.length,r=n?e[0]:0,i=this.__wrapped__;return!(1<n||this.__actions__.length)&&i instanceof In&&io(r)?((i=i.slice(r,+r+(n?1:0))).__actions__.push({func:Go,args:[t],thisArg:o}),new Bn(i,this.__chain__).thru((function(e){return n&&!e.length&&e.push(o),e}))):this.thru(t)})),Ko=Ai((function(e,t,n){Oe.call(e,n)?++e[n]:Gn(e,n,1)})),Yo=ki(_o),Xo=ki(Oo);function Jo(e,t){return(xa(e)?ut:er)(e,Wi(t,3))}function Zo(e,t){return(xa(e)?ct:tr)(e,Wi(t,3))}var ea=Ai((function(e,t,n){Oe.call(e,n)?e[n].push(t):Gn(e,n,[t])})),ta=Rr((function(e,t,r){var i=-1,o="function"==typeof t,a=ka(e)?n(e.length):[];return er(e,(function(e){a[++i]=o?at(t,e,r):vr(e,t,r)})),a})),na=Ai((function(e,t,n){Gn(e,n,t)}));function ra(e,t){return(xa(e)?pt:Sr)(e,Wi(t,3))}var ia=Ai((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),oa=Rr((function(e,t){var n;return null==e?[]:(1<(n=t.length)&&oo(e,t[0],t[1])?t=[]:2<n&&oo(t[0],t[1],t[2])&&(t=[t[0]]),Br(e,or(t,1),[]))})),aa=Zt||function(){return Ye.Date.now()};function sa(e,t,n){return t=n?o:t,t=e&&null==t?e.length:t,Ri(e,128,o,o,o,o,t)}function ua(e,t){var n;if("function"!=typeof t)throw new xe(c);return e=Va(e),function(){return 0<--e&&(n=t.apply(this,arguments)),e<=1&&(t=o),n}}var ca=Rr((function(e,t,n){var r,i=1;return n.length&&(r=$t(n,Gi(ca)),i|=32),Ri(e,i,t,n,r)})),la=Rr((function(e,t,n){var r,i=3;return n.length&&(r=$t(n,Gi(la)),i|=32),Ri(t,i,e,n,r)}));function ha(e,t,n){var r,i,a,s,u,l,h=0,f=!1,d=!1,p=!0;if("function"!=typeof e)throw new xe(c);function m(t){var n=r,a=i;return r=i=o,h=t,s=e.apply(a,n)}function g(e){var n=e-l;return l===o||t<=n||n<0||d&&a<=e-h}function A(){var e,n=aa();if(g(n))return v(n);u=Ao(A,(e=t-((n=n)-l),d?cn(e,a-(n-h)):e))}function v(e){return u=o,p&&r?m(e):(r=i=o,s)}function b(){var e=aa(),n=g(e);if(r=arguments,i=this,l=e,n){if(u===o)return h=e=l,u=Ao(A,t),f?m(e):s;if(d)return ui(u),u=Ao(A,t),m(l)}return u===o&&(u=Ao(A,t)),s}return t=Ga(t)||0,Ba(n)&&(f=!!n.leading,a=(d="maxWait"in n)?un(Ga(n.maxWait)||0,t):a,p="trailing"in n?!!n.trailing:p),b.cancel=function(){u!==o&&ui(u),h=0,r=l=i=u=o},b.flush=function(){return u===o?s:v(aa())},b}Zt=Rr((function(e,t){return Jn(e,1,t)}));var fa=Rr((function(e,t,n){return Jn(e,Ga(t)||0,n)}));function da(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new xe(c);function n(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;return o.has(i)?o.get(i):(r=e.apply(this,r),n.cache=o.set(i,r)||o,r)}return n.cache=new(da.Cache||Nn),n}function pa(e){if("function"!=typeof e)throw new xe(c);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}da.Cache=Nn;ai=ai((function(e,t){var n=(t=1==t.length&&xa(t[0])?pt(t[0],It(Wi())):pt(or(t,1),It(Wi()))).length;return Rr((function(r){for(var i=-1,o=cn(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return at(e,this,r)}))}));var ma=Rr((function(e,t){var n=$t(t,Gi(ma));return Ri(e,32,o,t,n)})),ga=Rr((function(e,t){var n=$t(t,Gi(ga));return Ri(e,64,o,t,n)})),Aa=Hi((function(e,t){return Ri(e,256,o,o,o,t)}));function va(e,t){return e===t||e!=e&&t!=t}var ba=Ii(pr),ya=Ii((function(e,t){return t<=e})),wa=br(function(){return arguments}())?br:function(e){return Ia(e)&&Oe.call(e,"callee")&&!Xe.call(e,"callee")},xa=n.isArray,Ca=et?It(et):function(e){return Ia(e)&&dr(e)==B};function ka(e){return null!=e&&Da(e.length)&&!Oa(e)}function Ea(e){return Ia(e)&&ka(e)}var Sa=ke||Gs;ke=tt?It(tt):function(e){return Ia(e)&&dr(e)==v};function _a(e){var t;return!!Ia(e)&&((t=dr(e))==b||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!Na(e))}function Oa(e){return!!Ba(e)&&((e=dr(e))==y||e==w||"[object AsyncFunction]"==e||"[object Proxy]"==e)}function Ta(e){return"number"==typeof e&&e==Va(e)}function Da(e){return"number"==typeof e&&-1<e&&e%1==0&&e<=f}function Ba(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Ia(e){return null!=e&&"object"==typeof e}var Ma=nt?It(nt):function(e){return Ia(e)&&eo(e)==x};function ja(e){return"number"==typeof e||Ia(e)&&dr(e)==C}function Na(e){return!(!Ia(e)||dr(e)!=k)&&(null===(e=We(e))||"function"==typeof(e=Oe.call(e,"constructor")&&e.constructor)&&e instanceof e&&_e.call(e)==Ie)}var Fa=rt?It(rt):function(e){return Ia(e)&&dr(e)==S},Ra=it?It(it):function(e){return Ia(e)&&eo(e)==_};function Pa(e){return"string"==typeof e||!xa(e)&&Ia(e)&&dr(e)==O}function La(e){return"symbol"==typeof e||Ia(e)&&dr(e)==T}var Ua=ot?It(ot):function(e){return Ia(e)&&Da(e.length)&&!!$e[dr(e)]},za=Ii(Er),Ha=Ii((function(e,t){return e<=t}));function $a(e){if(!e)return[];if(ka(e))return(Pa(e)?qt:mi)(e);if(_t&&e[_t]){for(var t,n=e[_t](),r=[];!(t=n.next()).done;)r.push(t.value);return r}var i=eo(e);return(i==x?zt:i==_?Qt:As)(e)}function Qa(e){return e?(e=Ga(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function Va(e){var t=(e=Qa(e))%1;return e==e?t?e-t:e:0}function qa(e){return e?Kn(Va(e),0,d):0}function Ga(e){if("number"==typeof e)return e;if(La(e))return NaN;if("string"!=typeof(e=Ba(e)?Ba(t="function"==typeof e.valueOf?e.valueOf():e)?t+"":t:e))return 0===e?e:+e;e=Bt(e);var t=pe.test(e);return t||ge.test(e)?Ge(e.slice(2),t?2:8):de.test(e)?NaN:+e}function Wa(e){return gi(e,cs(e))}function Ka(e){return null==e?"":Kr(e)}var Ya=vi((function(e,t){if(co(t)||ka(t))gi(t,us(t),e);else for(var n in t)Oe.call(t,n)&&$n(e,n,t[n])})),Xa=vi((function(e,t){gi(t,cs(t),e)})),Ja=vi((function(e,t,n,r){gi(t,cs(t),e,r)})),Za=vi((function(e,t,n,r){gi(t,us(t),e,r)})),es=Hi(Wn),ts=Rr((function(e,t){e=u(e);var n=-1,r=t.length,i=2<r?t[2]:o;for(i&&oo(t[0],t[1],i)&&(r=1);++n<r;)for(var a=t[n],s=cs(a),c=-1,l=s.length;++c<l;){var h=s[c],f=e[h];(f===o||va(f,Ee[h])&&!Oe.call(e,h))&&(e[h]=a[h])}return e})),ns=Rr((function(e){return e.push(o,Li),at(hs,o,e)}));function rs(e,t,n){return(e=null==e?o:hr(e,t))===o?n:e}function is(e,t){return null!=e&&to(e,t,gr)}var os=_i((function(e,t,n){e[t=null!=t&&"function"!=typeof t.toString?Be.call(t):t]=n}),Bs(js)),as=_i((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Be.call(t)),Oe.call(e,t)?e[t].push(n):e[t]=[n]}),Wi),ss=Rr(vr);function us(e){return(ka(e)?Pn:kr)(e)}function cs(e){return ka(e)?Pn(e,!0):function(e){if(!Ba(e)){var t=e,n=[];if(null!=t)for(var r in u(t))n.push(r);return n}var i,o=co(e),a=[];for(i in e)("constructor"!=i||!o&&Oe.call(e,i))&&a.push(i);return a}(e)}var ls=vi((function(e,t,n){Tr(e,t,n)})),hs=vi((function(e,t,n,r){Tr(e,t,n,r)})),fs=Hi((function(e,t){var n={};if(null!=e)for(var r=!1,i=(t=pt(t,(function(t){return t=oi(t,e),r=r||1<t.length,t})),gi(e,Qi(e),n),r&&(n=Yn(n,7,Ui)),t.length);i--;)Xr(n,t[i]);return n})),ds=Hi((function(e,t){return null==e?{}:Ir(n=e,t,(function(e,t){return is(n,t)}));var n}));function ps(e,t){var n;return null==e?{}:(n=pt(Qi(e),(function(e){return[e]})),t=Wi(t),Ir(e,n,(function(e,n){return t(e,n[0])})))}var ms=Fi(us),gs=Fi(cs);function As(e){return null==e?[]:Mt(e,us(e))}var vs=xi((function(e,t,n){return t=t.toLowerCase(),e+(n?bs(t):t)}));function bs(e){return _s(Ka(e).toLowerCase())}function ys(e){return(e=Ka(e))&&e.replace(ve,Rt).replace(Fe,"")}var ws=xi((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),xs=xi((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Cs=wi("toLowerCase"),ks=xi((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),Es=xi((function(e,t,n){return e+(n?" ":"")+_s(t)})),Ss=xi((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),_s=wi("toUpperCase");function Os(e,t,n){return e=Ka(e),(t=n?o:t)===o?(n=e,Ue.test(n)?e.match(Pe)||[]:e.match(ue)||[]):e.match(t)||[]}var Ts=Rr((function(e,t){try{return at(e,o,t)}catch(e){return _a(e)?e:new i(e)}})),Ds=Hi((function(e,t){return ut(t,(function(t){t=ko(t),Gn(e,t,ca(e[t],e))})),e}));function Bs(e){return function(){return e}}var Is=Ei(),Ms=Ei(!0);function js(e){return e}function Ns(e){return Cr("function"==typeof e?e:Yn(e,1))}var Fs=Rr((function(e,t){return function(n){return vr(n,e,t)}})),Rs=Rr((function(e,t){return function(n){return vr(e,n,t)}}));function Ps(e,t,n){var r=us(t),i=lr(t,r),o=(null!=n||Ba(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=lr(t,us(t))),!(Ba(n)&&"chain"in n&&!n.chain)),a=Oa(e);return ut(i,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t,n=this.__chain__;return o||n?(((t=e(this.__wrapped__)).__actions__=mi(this.__actions__)).push({func:r,args:arguments,thisArg:e}),t.__chain__=n,t):r.apply(e,mt([this.value()],arguments))})})),e}function Ls(){}var Us=Ti(pt),zs=Ti(lt),Hs=Ti(vt);function $s(e){return ao(e)?St(ko(e)):(t=e,function(e){return hr(e,t)});var t}var Qs=Bi(),Vs=Bi(!0);function qs(){return[]}function Gs(){return!1}var Ws,Ks=Oi((function(e,t){return e+t}),0),Ys=ji("ceil"),Xs=Oi((function(e,t){return e/t}),1),Js=ji("floor"),Zs=Oi((function(e,t){return e*t}),1),eu=ji("round"),tu=Oi((function(e,t){return e-t}),0);return _n.after=function(e,t){if("function"!=typeof t)throw new xe(c);return e=Va(e),function(){if(--e<1)return t.apply(this,arguments)}},_n.ary=sa,_n.assign=Ya,_n.assignIn=Xa,_n.assignInWith=Ja,_n.assignWith=Za,_n.at=es,_n.before=ua,_n.bind=ca,_n.bindAll=Ds,_n.bindKey=la,_n.castArray=function(){var e;return arguments.length?xa(e=arguments[0])?e:[e]:[]},_n.chain=qo,_n.chunk=function(e,t,r){t=(r?oo(e,t,r):t===o)?1:un(Va(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var a=0,s=0,u=n(tn(i/t));a<i;)u[s++]=$r(e,a,a+=t);return u},_n.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i},_n.concat=function(){var e=arguments.length;if(!e)return[];for(var t=n(e-1),r=arguments[0],i=e;i--;)t[i-1]=arguments[i];return mt(xa(r)?mi(r):[r],or(t,1))},_n.cond=function(e){var t=null==e?0:e.length,n=Wi();return e=t?pt(e,(function(e){if("function"!=typeof e[1])throw new xe(c);return[n(e[0]),e[1]]})):[],Rr((function(n){for(var r=-1;++r<t;){var i=e[r];if(at(i[0],this,n))return at(i[1],this,n)}}))},_n.conforms=function(e){return t=Yn(e,1),n=us(t),function(e){return Xn(e,t,n)};var t,n},_n.constant=Bs,_n.countBy=Ko,_n.create=function(e,t){return e=On(e),null==t?e:qn(e,t)},_n.curry=function e(t,n,r){return(t=Ri(t,8,o,o,o,o,o,n=r?o:n)).placeholder=e.placeholder,t},_n.curryRight=function e(t,n,r){return(t=Ri(t,16,o,o,o,o,o,n=r?o:n)).placeholder=e.placeholder,t},_n.debounce=ha,_n.defaults=ts,_n.defaultsDeep=ns,_n.defer=Zt,_n.delay=fa,_n.difference=r,_n.differenceBy=mn,_n.differenceWith=t,_n.drop=function(e,t,n){var r=null==e?0:e.length;return r?$r(e,(t=n||t===o?1:Va(t))<0?0:t,r):[]},_n.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?$r(e,0,(t=r-(t=n||t===o?1:Va(t)))<0?0:t):[]},_n.dropRightWhile=function(e,t){return e&&e.length?Zr(e,Wi(t,3),!0,!0):[]},_n.dropWhile=function(e,t){return e&&e.length?Zr(e,Wi(t,3),!0):[]},_n.fill=function(e,t,n,r){if(!(c=null==e?0:e.length))return[];n&&"number"!=typeof n&&oo(e,t,n)&&(n=0,r=c);var i=e,a=t,s=n,u=r,c=i.length;for((s=Va(s))<0&&(s=c<-s?0:c+s),(u=u===o||c<u?c:Va(u))<0&&(u+=c),u=u<s?0:qa(u);s<u;)i[s++]=a;return i},_n.filter=function(e,t){return(xa(e)?ht:ir)(e,Wi(t,3))},_n.flatMap=function(e,t){return or(ra(e,t),1)},_n.flatMapDeep=function(e,t){return or(ra(e,t),1/0)},_n.flatMapDepth=function(e,t,n){return n=n===o?1:Va(n),or(ra(e,t),n)},_n.flatten=To,_n.flattenDeep=function(e){return null!=e&&e.length?or(e,1/0):[]},_n.flattenDepth=function(e,t){return null!=e&&e.length?or(e,t=t===o?1:Va(t)):[]},_n.flip=function(e){return Ri(e,512)},_n.flow=Is,_n.flowRight=Ms,_n.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},_n.functions=function(e){return null==e?[]:lr(e,us(e))},_n.functionsIn=function(e){return null==e?[]:lr(e,cs(e))},_n.groupBy=ea,_n.initial=function(e){return null!=e&&e.length?$r(e,0,-1):[]},_n.intersection=Se,_n.intersectionBy=en,_n.intersectionWith=Re,_n.invert=os,_n.invertBy=as,_n.invokeMap=ta,_n.iteratee=Ns,_n.keyBy=na,_n.keys=us,_n.keysIn=cs,_n.map=ra,_n.mapKeys=function(e,t){var n={};return t=Wi(t,3),ur(e,(function(e,r,i){Gn(n,t(e,r,i),e)})),n},_n.mapValues=function(e,t){var n={};return t=Wi(t,3),ur(e,(function(e,r,i){Gn(n,r,t(e,r,i))})),n},_n.matches=function(e){return _r(Yn(e,1))},_n.matchesProperty=function(e,t){return Or(e,Yn(t,1))},_n.memoize=da,_n.merge=ls,_n.mergeWith=hs,_n.method=Fs,_n.methodOf=Rs,_n.mixin=Ps,_n.negate=pa,_n.nthArg=function(e){return e=Va(e),Rr((function(t){return Dr(t,e)}))},_n.omit=fs,_n.omitBy=function(e,t){return ps(e,pa(Wi(t)))},_n.once=function(e){return ua(2,e)},_n.orderBy=function(e,t,n,r){return null==e?[]:Br(e,t=xa(t)?t:null==t?[]:[t],n=xa(n=r?o:n)?n:null==n?[]:[n])},_n.over=Us,_n.overArgs=ai,_n.overEvery=zs,_n.overSome=Hs,_n.partial=ma,_n.partialRight=ga,_n.partition=ia,_n.pick=ds,_n.pickBy=ps,_n.property=$s,_n.propertyOf=function(e){return function(t){return null==e?o:hr(e,t)}},_n.pull=Jt,_n.pullAll=Io,_n.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Mr(e,t,Wi(n,2)):e},_n.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Mr(e,t,o,n):e},_n.pullAt=Mo,_n.range=Qs,_n.rangeRight=Vs,_n.rearg=Aa,_n.reject=function(e,t){return(xa(e)?ht:ir)(e,pa(Wi(t,3)))},_n.remove=function(e,t){var n=[];if(e&&e.length){var r=-1,i=[],o=e.length;for(t=Wi(t,3);++r<o;){var a=e[r];t(a,r,e)&&(n.push(a),i.push(r))}jr(e,i)}return n},_n.rest=function(e,t){if("function"!=typeof e)throw new xe(c);return Rr(e,t=t===o?t:Va(t))},_n.reverse=jo,_n.sampleSize=function(e,t,n){return t=(n?oo(e,t,n):t===o)?1:Va(t),(xa(e)?Un:Lr)(e,t)},_n.set=function(e,t,n){return null==e?e:Ur(e,t,n)},_n.setWith=function(e,t,n,r){return r="function"==typeof r?r:o,null==e?e:Ur(e,t,n,r)},_n.shuffle=function(e){return(xa(e)?zn:Hr)(e)},_n.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n=n&&"number"!=typeof n&&oo(e,t,n)?(t=0,r):(t=null==t?0:Va(t),n===o?r:Va(n)),$r(e,t,n)):[]},_n.sortBy=oa,_n.sortedUniq=function(e){return e&&e.length?Gr(e):[]},_n.sortedUniqBy=function(e,t){return e&&e.length?Gr(e,Wi(t,2)):[]},_n.split=function(e,t,n){return n&&"number"!=typeof n&&oo(e,t,n)&&(t=n=o),(n=n===o?d:n>>>0)?(e=Ka(e))&&("string"==typeof t||null!=t&&!Fa(t))&&!(t=Kr(t))&&Ut(e)?si(qt(e),0,n):e.split(t,n):[]},_n.spread=function(e,t){if("function"!=typeof e)throw new xe(c);return t=null==t?0:un(Va(t),0),Rr((function(n){var r=n[t];n=si(n,0,t);return r&&mt(n,r),at(e,this,n)}))},_n.tail=function(e){var t=null==e?0:e.length;return t?$r(e,1,t):[]},_n.take=function(e,t,n){return e&&e.length?$r(e,0,(t=n||t===o?1:Va(t))<0?0:t):[]},_n.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?$r(e,(t=r-(t=n||t===o?1:Va(t)))<0?0:t,r):[]},_n.takeRightWhile=function(e,t){return e&&e.length?Zr(e,Wi(t,3),!1,!0):[]},_n.takeWhile=function(e,t){return e&&e.length?Zr(e,Wi(t,3)):[]},_n.tap=function(e,t){return t(e),e},_n.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new xe(c);return Ba(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),ha(e,t,{leading:r,maxWait:t,trailing:i})},_n.thru=Go,_n.toArray=$a,_n.toPairs=ms,_n.toPairsIn=gs,_n.toPath=function(e){return xa(e)?pt(e,ko):La(e)?[e]:mi(Co(Ka(e)))},_n.toPlainObject=Wa,_n.transform=function(e,t,n){var r,i=xa(e),o=i||Sa(e)||Ua(e);return t=Wi(t,4),null==n&&(r=e&&e.constructor,n=o?i?new r:[]:Ba(e)&&Oa(r)?On(We(e)):{}),(o?ut:ur)(e,(function(e,r,i){return t(n,e,r,i)})),n},_n.unary=function(e){return sa(e,1)},_n.union=No,_n.unionBy=Fo,_n.unionWith=Ro,_n.uniq=function(e){return e&&e.length?Yr(e):[]},_n.uniqBy=function(e,t){return e&&e.length?Yr(e,Wi(t,2)):[]},_n.uniqWith=function(e,t){return t="function"==typeof t?t:o,e&&e.length?Yr(e,o,t):[]},_n.unset=function(e,t){return null==e||Xr(e,t)},_n.unzip=Po,_n.unzipWith=Lo,_n.update=function(e,t,n){return null==e?e:Jr(e,t,ii(n))},_n.updateWith=function(e,t,n,r){return r="function"==typeof r?r:o,null==e?e:Jr(e,t,ii(n),r)},_n.values=As,_n.valuesIn=function(e){return null==e?[]:Mt(e,cs(e))},_n.without=Uo,_n.words=Os,_n.wrap=function(e,t){return ma(ii(t),e)},_n.xor=zo,_n.xorBy=Ho,_n.xorWith=$o,_n.zip=Qo,_n.zipObject=function(e,t){return ni(e||[],t||[],$n)},_n.zipObjectDeep=function(e,t){return ni(e||[],t||[],Ur)},_n.zipWith=Vo,_n.entries=ms,_n.entriesIn=gs,_n.extend=Xa,_n.extendWith=Ja,Ps(_n,_n),_n.add=Ks,_n.attempt=Ts,_n.camelCase=vs,_n.capitalize=bs,_n.ceil=Ys,_n.clamp=function(e,t,n){return n===o&&(n=t,t=o),n!==o&&(n=(n=Ga(n))==n?n:0),t!==o&&(t=(t=Ga(t))==t?t:0),Kn(Ga(e),t,n)},_n.clone=function(e){return Yn(e,4)},_n.cloneDeep=function(e){return Yn(e,5)},_n.cloneDeepWith=function(e,t){return Yn(e,5,t="function"==typeof t?t:o)},_n.cloneWith=function(e,t){return Yn(e,4,t="function"==typeof t?t:o)},_n.conformsTo=function(e,t){return null==t||Xn(e,t,us(t))},_n.deburr=ys,_n.defaultTo=function(e,t){return null==e||e!=e?t:e},_n.divide=Xs,_n.endsWith=function(e,t,n){e=Ka(e),t=Kr(t);var r=e.length;r=n=n===o?r:Kn(Va(n),0,r);return 0<=(n-=t.length)&&e.slice(n,r)==t},_n.eq=va,_n.escape=function(e){return(e=Ka(e))&&W.test(e)?e.replace(q,Pt):e},_n.escapeRegExp=function(e){return(e=Ka(e))&&ne.test(e)?e.replace(te,"\\$&"):e},_n.every=function(e,t,n){return(xa(e)?lt:nr)(e,Wi(t=n&&oo(e,t,n)?o:t,3))},_n.find=Yo,_n.findIndex=_o,_n.findKey=function(e,t){return yt(e,Wi(t,3),ur)},_n.findLast=Xo,_n.findLastIndex=Oo,_n.findLastKey=function(e,t){return yt(e,Wi(t,3),cr)},_n.floor=Js,_n.forEach=Jo,_n.forEachRight=Zo,_n.forIn=function(e,t){return null==e?e:ar(e,Wi(t,3),cs)},_n.forInRight=function(e,t){return null==e?e:sr(e,Wi(t,3),cs)},_n.forOwn=function(e,t){return e&&ur(e,Wi(t,3))},_n.forOwnRight=function(e,t){return e&&cr(e,Wi(t,3))},_n.get=rs,_n.gt=ba,_n.gte=ya,_n.has=function(e,t){return null!=e&&to(e,t,mr)},_n.hasIn=is,_n.head=Do,_n.identity=js,_n.includes=function(e,t,n,r){return e=ka(e)?e:As(e),n=n&&!r?Va(n):0,r=e.length,n<0&&(n=un(r+n,0)),Pa(e)?n<=r&&-1<e.indexOf(t,n):!!r&&-1<xt(e,t,n)},_n.indexOf=function(e,t,n){var r=null==e?0:e.length;return r?xt(e,t,e=(e=null==n?0:Va(n))<0?un(r+e,0):e):-1},_n.inRange=function(e,t,n){return t=Qa(t),n===o?(n=t,t=0):n=Qa(n),(e=e=Ga(e))>=cn(t=t,n=n)&&e<un(t,n)},_n.invoke=ss,_n.isArguments=wa,_n.isArray=xa,_n.isArrayBuffer=Ca,_n.isArrayLike=ka,_n.isArrayLikeObject=Ea,_n.isBoolean=function(e){return!0===e||!1===e||Ia(e)&&dr(e)==A},_n.isBuffer=Sa,_n.isDate=ke,_n.isElement=function(e){return Ia(e)&&1===e.nodeType&&!Na(e)},_n.isEmpty=function(e){if(null!=e){if(ka(e)&&(xa(e)||"string"==typeof e||"function"==typeof e.splice||Sa(e)||Ua(e)||wa(e)))return!e.length;var t,n=eo(e);if(n==x||n==_)return!e.size;if(co(e))return!kr(e).length;for(t in e)if(Oe.call(e,t))return!1}return!0},_n.isEqual=function(e,t){return yr(e,t)},_n.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:o)?n(e,t):o;return r===o?yr(e,t,o,n):!!r},_n.isError=_a,_n.isFinite=function(e){return"number"==typeof e&&on(e)},_n.isFunction=Oa,_n.isInteger=Ta,_n.isLength=Da,_n.isMap=Ma,_n.isMatch=function(e,t){return e===t||wr(e,t,Yi(t))},_n.isMatchWith=function(e,t,n){return n="function"==typeof n?n:o,wr(e,t,Yi(t),n)},_n.isNaN=function(e){return ja(e)&&e!=+e},_n.isNative=function(e){if(uo(e))throw new i("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return xr(e)},_n.isNil=function(e){return null==e},_n.isNull=function(e){return null===e},_n.isNumber=ja,_n.isObject=Ba,_n.isObjectLike=Ia,_n.isPlainObject=Na,_n.isRegExp=Fa,_n.isSafeInteger=function(e){return Ta(e)&&-f<=e&&e<=f},_n.isSet=Ra,_n.isString=Pa,_n.isSymbol=La,_n.isTypedArray=Ua,_n.isUndefined=function(e){return e===o},_n.isWeakMap=function(e){return Ia(e)&&eo(e)==D},_n.isWeakSet=function(e){return Ia(e)&&"[object WeakSet]"==dr(e)},_n.join=function(e,t){return null==e?"":an.call(e,t)},_n.kebabCase=ws,_n.last=Bo,_n.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;if(n!==o&&(i=(i=Va(n))<0?un(r+i,0):cn(i,r-1)),t!=t)return wt(e,kt,i,!0);for(var a=e,s=t,u=i+1;u--;)if(a[u]===s)return u;return u},_n.lowerCase=xs,_n.lowerFirst=Cs,_n.lt=za,_n.lte=Ha,_n.max=function(e){return e&&e.length?rr(e,js,pr):o},_n.maxBy=function(e,t){return e&&e.length?rr(e,Wi(t,2),pr):o},_n.mean=function(e){return Et(e,js)},_n.meanBy=function(e,t){return Et(e,Wi(t,2))},_n.min=function(e){return e&&e.length?rr(e,js,Er):o},_n.minBy=function(e,t){return e&&e.length?rr(e,Wi(t,2),Er):o},_n.stubArray=qs,_n.stubFalse=Gs,_n.stubObject=function(){return{}},_n.stubString=function(){return""},_n.stubTrue=function(){return!0},_n.multiply=Zs,_n.nth=function(e,t){return e&&e.length?Dr(e,Va(t)):o},_n.noConflict=function(){return Ye._===this&&(Ye._=Me),this},_n.noop=Ls,_n.now=aa,_n.pad=function(e,t,n){e=Ka(e);var r=(t=Va(t))?Vt(e):0;return!t||t<=r?e:Di(nn(t=(t-r)/2),n)+e+Di(tn(t),n)},_n.padEnd=function(e,t,n){e=Ka(e);var r=(t=Va(t))?Vt(e):0;return t&&r<t?e+Di(t-r,n):e},_n.padStart=function(e,t,n){e=Ka(e);var r=(t=Va(t))?Vt(e):0;return t&&r<t?Di(t-r,n)+e:e},_n.parseInt=function(e,t,n){return t=n||null==t?0:t&&+t,hn(Ka(e).replace(re,""),t||0)},_n.random=function(e,t,n){var r;return n&&"boolean"!=typeof n&&oo(e,t,n)&&(t=n=o),n===o&&("boolean"==typeof t?(n=t,t=o):"boolean"==typeof e&&(n=e,e=o)),e===o&&t===o?(e=0,t=1):(e=Qa(e),t===o?(t=e,e=0):t=Qa(t)),t<e&&(r=e,e=t,t=r),n||e%1||t%1?(r=fn(),cn(e+r*(t-e+qe("1e-"+((r+"").length-1))),t)):Nr(e,t)},_n.reduce=function(e,t,n){var r=xa(e)?gt:Ot,i=arguments.length<3;return r(e,Wi(t,4),n,i,er)},_n.reduceRight=function(e,t,n){var r=xa(e)?At:Ot,i=arguments.length<3;return r(e,Wi(t,4),n,i,tr)},_n.repeat=function(e,t,n){return t=(n?oo(e,t,n):t===o)?1:Va(t),Fr(Ka(e),t)},_n.replace=function(){var e=arguments,t=Ka(e[0]);return e.length<3?t:t.replace(e[1],e[2])},_n.result=function(e,t,n){var r=-1,i=(t=oi(t,e)).length;for(i||(i=1,e=o);++r<i;){var a=null==e?o:e[ko(t[r])];a===o&&(r=i,a=n),e=Oa(a)?a.call(e):a}return e},_n.round=eu,_n.runInContext=e,_n.sample=function(e){return(xa(e)?Ln:Pr)(e)},_n.size=function(e){var t;return null==e?0:ka(e)?Pa(e)?Vt(e):e.length:(t=eo(e))==x||t==_?e.size:kr(e).length},_n.snakeCase=ks,_n.some=function(e,t,n){return(xa(e)?vt:Qr)(e,Wi(t=n&&oo(e,t,n)?o:t,3))},_n.sortedIndex=function(e,t){return Vr(e,t)},_n.sortedIndexBy=function(e,t,n){return qr(e,t,Wi(n,2))},_n.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=Vr(e,t);if(r<n&&va(e[r],t))return r}return-1},_n.sortedLastIndex=function(e,t){return Vr(e,t,!0)},_n.sortedLastIndexBy=function(e,t,n){return qr(e,t,Wi(n,2),!0)},_n.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=Vr(e,t,!0)-1;if(va(e[n],t))return n}return-1},_n.startCase=Es,_n.startsWith=function(e,t,n){return e=Ka(e),n=null==n?0:Kn(Va(n),0,e.length),t=Kr(t),e.slice(n,n+t.length)==t},_n.subtract=tu,_n.sum=function(e){return e&&e.length?Tt(e,js):0},_n.sumBy=function(e,t){return e&&e.length?Tt(e,Wi(t,2)):0},_n.template=function(e,t,n){var r,s,u=_n.templateSettings;n&&oo(e,t,n)&&(t=o),e=Ka(e),t=Ja({},t,u,Pi);var c=us(n=Ja({},t.imports,u.imports,Pi)),l=Mt(n,c),h=0,f=(u=t.interpolate||be,"__p += '"),d=(n=ie((t.escape||be).source+"|"+u.source+"|"+(u===X?he:be).source+"|"+(t.evaluate||be).source+"|$","g"),"//# sourceURL="+(Oe.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++He+"]")+"\n");if(e.replace(n,(function(t,n,i,o,a,u){return i=i||o,f+=e.slice(h,u).replace(ye,Lt),n&&(r=!0,f+="' +\n__e("+n+") +\n'"),a&&(s=!0,f+="';\n"+a+";\n__p += '"),i&&(f+="' +\n((__t = ("+i+")) == null ? '' : __t) +\n'"),h=u+t.length,t})),f+="';\n",u=Oe.call(t,"variable")&&t.variable){if(ce.test(u))throw new i("Invalid `variable` option passed into `_.template`")}else f="with (obj) {\n"+f+"\n}\n";if(f=(s?f.replace(H,""):f).replace($,"$1").replace(Q,"$1;"),f="function("+(u||"obj")+") {\n"+(u?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(r?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}",(n=Ts((function(){return a(c,d+"return "+f).apply(o,l)}))).source=f,_a(n))throw n;return n},_n.times=function(e,t){if((e=Va(e))<1||f<e)return[];var n=d,r=cn(e,d);for(r=(t=Wi(t),e-=d,Dt(r,t));++n<e;)t(n);return r},_n.toFinite=Qa,_n.toInteger=Va,_n.toLength=qa,_n.toLower=function(e){return Ka(e).toLowerCase()},_n.toNumber=Ga,_n.toSafeInteger=function(e){return e?Kn(Va(e),-f,f):0===e?e:0},_n.toString=Ka,_n.toUpper=function(e){return Ka(e).toUpperCase()},_n.trim=function(e,t,n){return(e=Ka(e))&&(n||t===o)?Bt(e):e&&(t=Kr(t))?si(n=qt(e),Nt(n,t=qt(t)),Ft(n,t)+1).join(""):e},_n.trimEnd=function(e,t,n){return(e=Ka(e))&&(n||t===o)?e.slice(0,Gt(e)+1):e&&(t=Kr(t))?si(n=qt(e),0,Ft(n,qt(t))+1).join(""):e},_n.trimStart=function(e,t,n){return(e=Ka(e))&&(n||t===o)?e.replace(re,""):e&&(t=Kr(t))?si(n=qt(e),Nt(n,qt(t))).join(""):e},_n.truncate=function(e,t){var n,r=30,i="...";Ba(t)&&(n="separator"in t?t.separator:n,r="length"in t?Va(t.length):r,i="omission"in t?Kr(t.omission):i),t=(e=Ka(e)).length;if((t=Ut(e)?(a=qt(e)).length:t)<=r)return e;if((t=r-Vt(i))<1)return i;var a;r=a?si(a,0,t).join(""):e.slice(0,t);if(n!==o)if(a&&(t+=r.length-t),Fa(n)){if(e.slice(t).search(n)){var s,u=r;for((n=n.global?n:ie(n.source,Ka(fe.exec(n))+"g")).lastIndex=0;s=n.exec(u);)var c=s.index;r=r.slice(0,c===o?t:c)}}else e.indexOf(Kr(n),t)==t||-1<(a=r.lastIndexOf(n))&&(r=r.slice(0,a));return r+i},_n.unescape=function(e){return(e=Ka(e))&&G.test(e)?e.replace(V,Wt):e},_n.uniqueId=function(e){var t=++Te;return Ka(e)+t},_n.upperCase=Ss,_n.upperFirst=_s,_n.each=Jo,_n.eachRight=Zo,_n.first=Do,Ps(_n,(Ws={},ur(_n,(function(e,t){Oe.call(_n.prototype,t)||(Ws[t]=e)})),Ws),{chain:!1}),_n.VERSION="4.17.21",ut(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){_n[e].placeholder=_n})),ut(["drop","take"],(function(e,t){In.prototype[e]=function(n){n=n===o?1:un(Va(n),0);var r=this.__filtered__&&!t?new In(this):this.clone();return r.__filtered__?r.__takeCount__=cn(n,r.__takeCount__):r.__views__.push({size:cn(n,d),type:e+(r.__dir__<0?"Right":"")}),r},In.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),ut(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;In.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Wi(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),ut(["head","last"],(function(e,t){var n="take"+(t?"Right":"");In.prototype[e]=function(){return this[n](1).value()[0]}})),ut(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");In.prototype[e]=function(){return this.__filtered__?new In(this):this[n](1)}})),In.prototype.compact=function(){return this.filter(js)},In.prototype.find=function(e){return this.filter(e).head()},In.prototype.findLast=function(e){return this.reverse().find(e)},In.prototype.invokeMap=Rr((function(e,t){return"function"==typeof e?new In(this):this.map((function(n){return vr(n,e,t)}))})),In.prototype.reject=function(e){return this.filter(pa(Wi(e)))},In.prototype.slice=function(e,t){e=Va(e);var n=this;return n.__filtered__&&(0<e||t<0)?new In(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==o?(t=Va(t))<0?n.dropRight(-t):n.take(t-e):n)},In.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},In.prototype.toArray=function(){return this.take(d)},ur(In.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=_n[r?"take"+("last"==t?"Right":""):t],a=r||/^find/.test(t);i&&(_n.prototype[t]=function(){function t(e){return e=i.apply(_n,mt([e],c)),r&&d?e[0]:e}var s,u=this.__wrapped__,c=r?[1]:arguments,l=u instanceof In,h=c[0],f=l||xa(u),d=(f&&n&&"function"==typeof h&&1!=h.length&&(l=f=!1),this.__chain__),p=(h=!!this.__actions__.length,a&&!d);l=l&&!h;return!a&&f?(u=l?u:new In(this),(s=e.apply(u,c)).__actions__.push({func:Go,args:[t],thisArg:o}),new Bn(s,d)):p&&l?e.apply(this,c):(s=this.thru(t),p?r?s.value()[0]:s.value():s)})})),ut(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Ce[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);_n.prototype[e]=function(){var e,i=arguments;return r&&!this.__chain__?(e=this.value(),t.apply(xa(e)?e:[],i)):this[n]((function(e){return t.apply(xa(e)?e:[],i)}))}})),ur(In.prototype,(function(e,t){var n,r=_n[t];r&&(n=r.name+"",Oe.call(bn,n)||(bn[n]=[]),bn[n].push({name:t,func:r}))})),bn[Si(o,2).name]=[{name:"wrapper",func:o}],In.prototype.clone=function(){var e=new In(this.__wrapped__);return e.__actions__=mi(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=mi(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=mi(this.__views__),e},In.prototype.reverse=function(){var e;return this.__filtered__?((e=new In(this)).__dir__=-1,e.__filtered__=!0):(e=this.clone()).__dir__*=-1,e},In.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=xa(e),r=t<0,i=n?e.length:0,o=function(e,t,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=cn(t,e+a);break;case"takeRight":e=un(e,t-a)}}return{start:e,end:t}}(0,i,this.__views__),a=o.start,s=(o=o.end)-a,u=r?o:a-1,c=this.__iteratees__,l=c.length,h=0,f=cn(s,this.__takeCount__);if(!n||!r&&i==s&&f==s)return ei(e,this.__actions__);var d=[];e:for(;s--&&h<f;){for(var p=-1,m=e[u+=t];++p<l;){var g=(A=c[p]).iteratee,A=A.type;g=g(m);if(2==A)m=g;else if(!g){if(1==A)continue e;break e}}d[h++]=m}return d},_n.prototype.at=Wo,_n.prototype.chain=function(){return qo(this)},_n.prototype.commit=function(){return new Bn(this.value(),this.__chain__)},_n.prototype.next=function(){this.__values__===o&&(this.__values__=$a(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?o:this.__values__[this.__index__++]}},_n.prototype.plant=function(e){for(var t,n=this;n instanceof Dn;){var r=So(n),i=(r.__index__=0,r.__values__=o,t?i.__wrapped__=r:t=r,r);n=n.__wrapped__}return i.__wrapped__=e,t},_n.prototype.reverse=function(){var e=this.__wrapped__;return e instanceof In?(e=e,(e=(e=this.__actions__.length?new In(this):e).reverse()).__actions__.push({func:Go,args:[jo],thisArg:o}),new Bn(e,this.__chain__)):this.thru(jo)},_n.prototype.toJSON=_n.prototype.valueOf=_n.prototype.value=function(){return ei(this.__wrapped__,this.__actions__)},_n.prototype.first=_n.prototype.head,_t&&(_n.prototype[_t]=function(){return this}),_n}();Ye._=Kt,(i=function(){return Kt}.call(t,n,t,r))!==o&&(r.exports=i)}).call(this)}).call(this,n(67),n(100)(e))},function(e,t,n){"use strict";n.d(t,"g",(function(){return a})),n.d(t,"f",(function(){return s})),n.d(t,"c",(function(){return u})),n.d(t,"b",(function(){return c})),n.d(t,"e",(function(){return l})),n.d(t,"h",(function(){return h})),n.d(t,"m",(function(){return f})),n.d(t,"n",(function(){return d})),n.d(t,"t",(function(){return p})),n.d(t,"d",(function(){return m})),n.d(t,"l",(function(){return g})),n.d(t,"u",(function(){return A})),n.d(t,"r",(function(){return v})),n.d(t,"o",(function(){return b})),n.d(t,"k",(function(){return y})),n.d(t,"q",(function(){return w})),n.d(t,"i",(function(){return x})),n.d(t,"j",(function(){return C})),n.d(t,"p",(function(){return k})),n.d(t,"a",(function(){return E})),n.d(t,"s",(function(){return S}));var r=n(6),i=n(24),o=(t=n(7),n(28));
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function a(){Object(i.c)().set("PROD",!0)}function s(){Object(i.c)().set("DEBUG",!0)}function u(){Object(i.c)().set("DEPRECATION_WARNINGS_ENABLED",!1)}function c(e){Object(i.c)().getBool("DEPRECATION_WARNINGS_ENABLED")}function l(){r.a.disposeVariables()}function h(){return r.a}function f(){return r.a.memory()}function d(e){return r.a.profile(e)}function p(e,t){return r.a.tidy(e,t)}function m(e){Object(o.getTensorsInContainer)(e).forEach(e=>e.dispose())}function g(e){return r.a.keep(e)}function A(e){return r.a.time(e)}function v(e){return r.a.setBackend(e)}function b(){return r.a.ready()}function y(){return r.a.backendName}function w(e){r.a.removeBackend(e)}function x(e){return r.a.findBackend(e)}function C(e){return r.a.findBackendFactory(e)}function k(e,t,n=1){return r.a.registerBackend(e,t,n)}function E(){return r.a.backend}function S(e,t){Object(i.c)().setPlatform(e,t)}Object(t.e)(c)},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({slice_:
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t,n){if(0===(e=Object(o.a)(e,"x","slice","string_or_numeric")).rank)throw new Error("Slicing scalar is not possible");return r.a.runKernel(i.Nc,{x:e},{begin:t,size:n})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({neg_:
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){return e=Object(o.a)(e,"x","neg"),r.a.runKernel(i.ac,{x:e})}})},function(e,t,n){"use strict";var r=n(13);function i(e,t,n,r,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}r.a.inherits(i,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r.a.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const o=i.prototype,a={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{a[e]={value:e}}),Object.defineProperties(i,a),Object.defineProperty(o,"isAxiosError",{value:!0}),i.from=(e,t,n,a,s,u)=>{const c=Object.create(o);return r.a.toFlatObject(e,c,(function(e){return e!==Error.prototype}),e=>"isAxiosError"!==e),i.call(c,e.message,t,n,a,s),c.cause=e,c.name=e.name,u&&Object.assign(c,u),c},t.a=i},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return Draw})),__webpack_require__.d(__webpack_exports__,"b",(function(){return DrawBox})),__webpack_require__.d(__webpack_exports__,"g",(function(){return thinLineWidth})),__webpack_require__.d(__webpack_exports__,"f",(function(){return npx})),__webpack_require__.d(__webpack_exports__,"e",(function(){return dpr})),__webpack_require__.d(__webpack_exports__,"h",(function(){return waterMask})),__webpack_require__.d(__webpack_exports__,"d",(function(){return development})),__webpack_require__.d(__webpack_exports__,"c",(function(){return devdraw}));var _core_helper__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(38),_core_cell__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(116);function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArray(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function _arrayWithoutHoles(e){if(Array.isArray(e))return _arrayLikeToArray(e)}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArrayLimit(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _createForOfIteratorHelper(e,t){var n,r,i,o,a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(a)return r=!(n=!0),{s:function(){a=a.call(e)},n:function(){var e=a.next();return n=e.done,e},e:function(e){r=!0,i=e},f:function(){try{n||null==a.return||a.return()}finally{if(r)throw i}}};if(Array.isArray(e)||(a=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length)return a&&(e=a),o=0,{s:t=function(){},n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){var n;if(e)return"string"==typeof e?_arrayLikeToArray(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _createClass(e,t,n){t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1})}function dpr(){return window.tizdata_dpr_param}function thinLineWidth(){return npx(.5)}function npx(e){return+parseInt(e*dpr(),10)}function nnpx(e){return parseInt(e*dpr(),10)}function npxLine(e){return 0<(e=npx(e))?e-.5:.5}function noNpxLine(e){return 0<e?e-.5:.5}window.tizdata_dpr_param=!window.devicePixelRatio||window.devicePixelRatio<2?2:window.devicePixelRatio;var slashLineDict={thin:1,medium:1.5,thick:2},DrawBox=function(){function e(t,n,r,i){var o=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,a=5<arguments.length?arguments[5]:void 0;_classCallCheck(this,e),this.x=t,this.y=n,this.width=r,this.height=i,this.padding=o,this.bgcolor="#ffffff",this.borderTop=null,this.borderRight=null,this.borderBottom=null,this.borderLeft=null,this.showWidth=a}return _createClass(e,[{key:"innerShowWidth",value:function(){return this.showWidth-2*this.padding-2}},{key:"setBorders",value:function(e){var t=e.top,n=e.bottom,r=e.left;e=e.right;t&&(this.borderTop=t),e&&(this.borderRight=e),n&&(this.borderBottom=n),r&&(this.borderLeft=r)}},{key:"innerWidth",value:function(){return this.width-2*this.padding}},{key:"innerHeight",value:function(){return this.height-2*this.padding}},{key:"textx",value:function(e,t){var n=this.width,r=this.padding,i=this.x;return t&&(i+=20,n-=20),"left"===e?i+=r:"center"===e?i+=n/2:"right"===e&&(i+=n-r),i}},{key:"texty",value:function(e,t){var n=this.height,r=this.padding,i=this.y;return"top"===e?i+=r:"middle"===e?i+=n/2-t/2:"bottom"===e&&(i+=n-r-t),i}},{key:"topxys",value:function(){var e=this.x,t=this.y;return[[e,t],[e+this.width,t]]}},{key:"rightxys",value:function(){var e=this.x,t=this.y,n=this.width;return[[e+n,t],[e+n,t+this.height]]}},{key:"bottomxys",value:function(){var e=this.x,t=this.y,n=this.width,r=this.height;return[[e,t+r],[e+n,t+r]]}},{key:"leftxys",value:function(){var e=this.x,t=this.y;return[[e,t],[e,t+this.height]]}}]),e}();function drawFontLine(e,t,n,r,i,o,a){var s={x:0,y:0};a/=dpr(),"underline"===e?s.y="bottom"===i?0:"top"===i?-(o+2):-o/2:"strike"===e&&("bottom"===i?s.y=o/2:"top"===i&&(s.y=-(o/2+2))),"center"===r?s.x=a/2:"right"===r&&(s.x=a),this.line([t-s.x,n-s.y],[t-s.x+a,n-s.y])}var Draw=function(){function Draw(e,t,n){_classCallCheck(this,Draw),this.el=e,this.ctx=e.getContext("2d"),this.resize(t,n),this.drawW=t,this.drawH=n,this.textHeight=0,this.scaleVRect=null,this.ctx.scale(dpr(),dpr()),this.waterMask={startRow:0,startCol:0}}return _createClass(Draw,[{key:"resize",value:function(e,t){this.scaleVRect&&(e=this.scaleVRect.width,t=this.scaleVRect.height),this.el.style.width="".concat(e,"px"),this.el.style.height="".concat(t,"px"),this.el.width=nnpx(e),this.el.height=nnpx(t),this.drawW=e,this.drawH=t}},{key:"setScale",value:function(e){this.scaleVRect=e}},{key:"convertCanvasToImage",value:function(){var e=new Image;return e.src=this.ctx.toDataURL("image/png"),e}},{key:"clear",value:function(){var e=(t=this.el).width,t=t.height;return this.ctx.clearRect(0,0,e,t),this}},{key:"attr",value:function(e){return Object.assign(this.ctx,e),this}},{key:"save",value:function(){return this.ctx.save(),this.ctx.beginPath(),this}},{key:"printLine",value:function(e,t,n,r,i){var o=this.ctx;o.save(),o.beginPath(),o.lineWidth=100,o.setLineDash(e),o.lineTo([0,t],[n,t]),o.lineTo([r,0],[r,i]),o.strokeStyle="rgba(75, 137, 255, .6)",o.stroke(),o.closePath()}},{key:"drawCode",value:function(e,t,n,r,i){this.ctx.drawImage(e,npx(t),npx(n),npx(r),npx(i))}},{key:"lineWidth",value:function(e){return this.ctx.lineWidth=npx(e),this}},{key:"restore",value:function(){return this.ctx.restore(),this}},{key:"setLineDash",value:function(){var e=[npx(8),npx(8)];return this.ctx.setLineDash(e),this}},{key:"beginPath",value:function(){return this.ctx.beginPath(),this}},{key:"translate",value:function(e,t){return this.ctx.translate(npx(e),npx(t)),this}},{key:"scale",value:function(e,t){return this.ctx.scale(e,t),this}},{key:"clearRect",value:function(e,t,n,r){return this.ctx.clearRect(e,t,n,r),this}},{key:"fillRect",value:function(e,t,n,r){return this.ctx.fillRect(npx(e)-.5,npx(t)-.5,npx(n),npx(r)),this}},{key:"fillText",value:function(e,t,n){return this.ctx.fillText(e,npx(t),npx(n)),this}},{key:"text",value:function(e,t){var n=this,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},i=!(3<arguments.length&&void 0!==arguments[3])||arguments[3],o=4<arguments.length?arguments[4]:void 0,a=5<arguments.length?arguments[5]:void 0,s=this.ctx,u=r.align,c=r.valign,l=r.font,h=r.color,f=r.strike,d=r.underline,p=t.textx(u,6<arguments.length?arguments[6]:void 0),m=(r=(a&&(u="left",c="middle"),s.save(),s.beginPath(),{textAlign:u,textBaseline:c,font:"".concat(l.italic?"italic":""," ").concat(l.bold?"bold":""," ").concat(npx(l.size),"px ").concat(l.name),fillStyle:h,strokeStyle:h}),h=(this.attr(r),"".concat(e).split("\n")),t.innerWidth()),g=[],A=(e=(h.forEach((function(e){var t=s.measureText(e).width;if(i&&t>npx(m)&&3!=o){for(var n={w:0,len:0,start:0},r=0;r<e.length;r+=1)n.w>=npx(m)&&(g.push(e.substr(n.start,n.len)),n={w:0,len:0,start:r}),n.len+=1,n.w+=s.measureText(e[r]).width+1;0<n.len&&g.push(e.substr(n.start,n.len))}else g.push(e)})),(g.length-1)*(1.2*l.size)),1<g.length&&(g.length,l.size),t.texty(c,e));e=s.measureText(h).width;if(i&&3==o&&e>t.width&&(h=npx(t.width-5)/e,e/=npx(t.width-5),1<h&&(e=h=1),p*=e,A*=e,this.scale(h,h)),g.forEach((function(e){var t=s.measureText(e).width;n.fillText(e,p,A),f&&drawFontLine.call(n,"strike",p,A,u,c,l.size,t),d&&drawFontLine.call(n,"underline",p,A,u,c,l.size,t),A+=l.size+2})),s.scale(1,1),a)try{a.text&&(a=this.createSlash(a,r,l,t)),this.analysisSlash(a,t)}catch(e){}return s.restore(),this}},{key:"getTextHeight",value:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},r=!(3<arguments.length&&void 0!==arguments[3])||arguments[3],i=4<arguments.length?arguments[4]:void 0,o=this.ctx,a=n.align,s=n.valign,u=n.font,c=n.color,l=(n=(n.strike,n.underline,o.save(),{textAlign:a,textBaseline:s,font:"".concat(u.italic?"italic":""," ").concat(u.bold?"bold":""," ").concat(npx(u.size),"px ").concat(u.name),fillStyle:c,strokeStyle:c}),a=(this.attr(n),"".concat(e).split("\n")),t.innerShowWidth()),h=[];a.forEach((function(e){var t=o.measureText(e).width;if(r&&t>npx(l)&&3!=i){for(var n={w:0,len:0,start:0},a=0;a<e.length;a+=1)n.w>=npx(l)&&(h.push(e.substr(n.start,n.len)),n={w:0,len:0,start:a}),n.len+=1,n.w+=o.measureText(e[a]).width+1;0<n.len&&h.push(e.substr(n.start,n.len))}else h.push(e)})),s=0;return 1<=h.length&&(s=h.length*(1.2*u.size)),o.restore(),s}},{key:"createSlash",value:function(e,t,n,r){var i=e.text.split("|")||[],o=(i[i.length-1]||i.pop(),{});if(0<i.length){if(0==e.type){var a=[],s=[],u=[],c=[],l=1;if(1<(I=i.length-1))if(I%2==0){l=2;for(var h=1,f=1,d=1/(I/2+1),p=I/2,m=1;m<i.length;m++){var g={},A=[];(m<=p?(A=[h*d,1],h+=1,u):(A=[1,f*d],f+=1,c)).push({y:A,t:i[m]}),g.x=[0,0],g.y=A,g.style={lineWidth:slashLineDict[e.lineStyle],color:e.lineColor},s.push(g)}}else{for(var v=i.length/2,b=(I-(l=1))/2,y=1/v,w=[],x=[],C=1,k=1,E=1;E<v;E++){var S={},_=[];(E<=b?(_=[C*y,1],C+=1,u):(_=[1,k*y],k+=1,c)).push({y:_,t:i[E]}),S.x=[0,0],S.y=_,S.style={lineWidth:slashLineDict[e.lineStyle],color:e.lineColor},w.push(S)}C=1,k=1;for(var O=1+v;O<i.length;O++){var T={},D=[];(O<=b?(D=[C*y,1],C+=1,u):(D=[1,k*y],k+=1,c)).push({y:D,t:i[O]}),T.x=[0,0],T.y=D,T.style={lineWidth:slashLineDict[e.lineStyle],color:e.lineColor},x.push(T)}s=w.concat([{x:[0,0],y:[1,1],style:{lineWidth:slashLineDict[e.lineStyle],color:e.lineColor}}]).concat(x)}else s=[{x:[0,0],y:[1,1],style:{lineWidth:slashLineDict[e.lineStyle],color:e.lineColor}}];var B=[];if(1==s.length){var I=r.width,M=r.height;I=npx(I),M=npx(M);(B=[{x:(I-(Ne=(je=this.computeFontSize(i[0],n.size,n.name)).width))/I,y:1-(M-(je=je.height))/M+je/M}]).push({x:0,y:1-je/M*2})}else{var j=r.width,N=r.height;j=npx(j),N=npx(N);if(1==l){I=(Ne=this.computeFontSize(i[0],n.size,n.name)).width;var F,R=Ne.height,P=(N-R)/N,L=(B=[{x:(j-I)/j,y:1-P+R/N}],1),U=_createForOfIteratorHelper(c);try{for(U.s();!(F=U.n()).done;){var z=F.value,H=1-this.computeFontSize(i[L],n.size,n.name).width/j;B.push({x:H,y:z.y[1]+R/N}),L+=1}}catch(e){U.e(e)}finally{U.f()}var $,Q=_createForOfIteratorHelper(u);try{for(Q.s();!($=Q.n()).done;){var V=$.value;B.push({x:V.y[0],y:P})}}catch(e){Q.e(e)}finally{Q.f()}B.push({x:0,y:P})}else{var q,G=((je=this.computeFontSize(i[0],n.size,n.name)).width,je.height),W=(N-G)/N,K=0,Y=c[0].y[1],X=_createForOfIteratorHelper(c);try{for(X.s();!(q=X.n()).done;){var J=q.value,Z=1-this.computeFontSize(i[K],n.size,n.name).width/j,ee=G/N;0==K&&(ee*=2),B.push({x:Z,y:J.y[1]-Y+ee}),K+=1}}catch(e){X.e(e)}finally{X.f()}M=1-this.computeFontSize(i[K],n.size,n.name).width/j,l=c.length*c[0].y[1]+G/N*2;var te,ne=(B.push({x:M,y:l}),u[0].y[0]),re=_createForOfIteratorHelper(u);try{for(re.s();!(te=re.n()).done;){var ie=te.value;B.push({x:ie.y[0]-ne,y:W})}}catch(e){re.e(e)}finally{re.f()}}}for(var oe=0;oe<i.length;oe++){var ae=i[oe],se=(ue=B[oe]).x,ue=ue.y;a.push({text:ae,rotate:0,scale:1,style:t,x:se,y:ue})}o.slashLine=s,o.texts=a}else{var ce=[],le=[],he=[],fe=[];I=1;if(1<(Ne=i.length-1))if(Ne%2==0){I=2;for(var de=1,pe=1,me=1/(Ne/2+1),ge=Ne/2,Ae=1;Ae<i.length;Ae++){var ve={},be=[];(Ae<=ge?(be=[de*me,0],de+=1,he):(be=[1,pe*me],pe+=1,fe)).push({y:be,t:i[Ae]}),ve.x=[0,1],ve.y=be,ve.style={lineWidth:slashLineDict[e.lineStyle],color:e.lineColor},le.push(ve)}}else{for(var ye=i.length/2,we=(Ne-(I=1))/2,xe=1/ye,Ce=[],ke=[],Ee=1,Se=1,_e=1;_e<ye;_e++){var Oe={},Te=[];(_e<=we?(Te=[Ee*xe,0],Ee+=1,he):(Te=[1,Se*xe],Se+=1,fe)).push({y:Te,t:i[_e]}),Oe.x=[0,1],Oe.y=Te,Oe.style={lineWidth:slashLineDict[e.lineStyle],color:e.lineColor},Ce.push(Oe)}Ee=1,Se=1;for(var De=1+ye;De<i.length;De++){var Be={},Ie=[];(De<=we?(Ie=[Ee*xe,0],Ee+=1,he):(Ie=[1,Se*xe],Se+=1,fe)).push({y:Ie,t:i[De]}),Be.x=[0,1],Be.y=Ie,Be.style={lineWidth:slashLineDict[e.lineStyle],color:e.lineColor},ke.push(Be)}le=Ce.concat([{x:[0,1],y:[1,0],style:{lineWidth:slashLineDict[e.lineStyle],color:e.lineColor}}]).concat(ke)}else le=[{x:[0,1],y:[1,0],style:{lineWidth:slashLineDict[e.lineStyle],color:e.lineColor}}];var Me=[];if(1==le.length){var je=r.width,Ne=(M=r.height,je=npx(je),M=npx(M),(l=this.computeFontSize(i[0],n.size,n.name)).width);(Me=[{x:0,y:1-(Ke=(M-(l=l.height))/M)+l/M}]).push({x:(je-Ne)/je,y:Ke})}else{var Fe=r.width,Re=r.height;Fe=npx(Fe),Re=npx(Re);if(1==I){M=(l=this.computeFontSize(i[0],n.size,n.name)).width;var Pe,Le=l.height,Ue=1-(Ne=(Re-Le)/Re),ze=(je=(Fe-M)/Fe,Me=[{x:0,y:Ue+Le/Re}],1),He=_createForOfIteratorHelper(fe);try{for(He.s();!(Pe=He.n()).done;){var $e=Pe.value;Me.push({x:$e.y[1],y:Ue+Le/Re}),ze+=1}}catch(e){He.e(e)}finally{He.f()}he[0].y[0];var Qe,Ve=_createForOfIteratorHelper(he);try{for(Ve.s();!(Qe=Ve.n()).done;){var qe=Qe.value,Ge=1-this.computeFontSize(i[ze],n.size,n.name).width/Fe;Me.push({x:Ge,y:qe.y[0]-Le/Re})}}catch(e){Ve.e(e)}finally{Ve.f()}Me.push({x:je,y:Ne})}else{var We,Ke,Ye=((Ke=this.computeFontSize(i[0],n.size,n.name)).width,Ke.height),Xe=Ye/Re,Je=fe[0].y[1],Ze=0,et=_createForOfIteratorHelper(fe);try{for(et.s();!(We=et.n()).done;){var tt=We.value;Me.push({x:tt.y[1]-Je,y:Xe+Ye/Re}),Ze+=1}}catch(e){et.e(e)}finally{et.f()}r=he.length*he[0].y[0];var nt,rt=(Me.push({x:r,y:Xe+Ye/Re}),he[0].y[0]),it=(Ze+=1,_createForOfIteratorHelper(he));try{for(it.s();!(nt=it.n()).done;){var ot=nt.value,at=1-this.computeFontSize(i[Ze],n.size,n.name).width/Fe;Me.push({x:at,y:ot.y[0]+rt-Xe}),Ze+=1}}catch(e){it.e(e)}finally{it.f()}}}for(var st=0;st<i.length;st++){var ut=i[st],ct=(lt=Me[st]).x,lt=lt.y;ce.push({text:ut,rotate:0,scale:1,style:t,x:ct,y:lt})}o.slashLine=le,o.texts=ce}e=o}return e}},{key:"analysisSlash",value:function(e,t){var n=this,r=e.slashLine;e=e.texts;r.forEach((function(e){e&&n.drawSlash(e,t)})),e.forEach((function(e){e&&n.drawSlashText(e,t)}))}},{key:"computeFontSize",value:function(e,t,n){var r=document.createElement("span");return(t=(r.style.fontSize=t,r.style.opacity="0",r.style.fontFamily=n,r.style.display="inline-block",r.innerHTML=e,document.body.append(r),{})).width=r.offsetWidth*dpr(),t.height=r.offsetHeight/dpr(),r.remove(),t}},{key:"drawSlash",value:function(e,t){var n=this.ctx,r=t.x,i=t.y,o=t.width,a=(t=t.height,r+o*e.x[0]),s=i+t*e.x[1];r+=o*e.y[0],o=i+t*e.y[1];n.save(),e.style&&(n.strokeStyle=e.style.color||"#000000",n.lineWidth=npx(e.style.lineWidth)||npx(1)),n.beginPath(),n.imageSmoothingEnabled=!0,n.moveTo(npx(a),npx(s)),n.lineTo(npx(r),npx(o)),n.stroke(),n.closePath(),n.restore()}},{key:"drawSlashText",value:function(e,t){var n=this.ctx,r=t.x,i=t.y,o=t.width,a=t.height;t.padding,t=n.measureText(e.text).width/dpr();e.x||(e.x=0),e.y||(e.y=0),e.rotate||(e.rotate,t=0),e.scale||(e.scale=1);var s,u;r+=o*e.x,o=i+a*e.y;n.save(),n.translate(npx(r)+t/2,npx(o)),n.rotate(e.rotate*Math.PI/180),n.scale(e.scale,e.scale),e.style&&((i=e.style.fontType)?(u=s=!1,i&&0<i.length&&i.forEach((function(e){"bold"==e&&(s=!0),"italic"==e&&(u=!0)})),n.font="".concat(u?"italic":""," ").concat(s?"bold":""," ").concat(npx(e.style.size),"px ").concat(e.style.name),n.fillStyle=e.style.color||"#000000"):this.attr(e.style)),n.fillText(e.text,1/e.scale*npx(0)-t/2,1/e.scale*npx(0)),n.restore()}},{key:"border",value:function(e,t){var n=this.ctx;return n.lineWidth=thinLineWidth(),n.strokeStyle=t,"medium"===e?n.lineWidth=npx(2)-.5:"thick"===e?n.lineWidth=npx(3):"dashed"===e?n.setLineDash([npx(3),npx(2)]):"dotted"===e?n.setLineDash([npx(1),npx(1)]):"double"===e&&n.setLineDash([npx(2),0]),this}},{key:"line",value:function(){var e=this.ctx;if(1<arguments.length){var t=(n=_slicedToArray(arguments.length<=0?void 0:arguments[0],2))[0],n=n[1];e.moveTo(npxLine(t),npxLine(n));for(var r=1;r<arguments.length;r+=1){var i=(o=_slicedToArray(r<0||arguments.length<=r?void 0:arguments[r],2))[0],o=o[1];e.lineTo(npxLine(i),npxLine(o))}e.stroke()}return this}},{key:"strokeBorders",value:function(e,t){var n=this.ctx,r=(n.save(),e.borderTop),i=e.borderRight,o=e.borderBottom,a=e.borderLeft;r&&this.borderLine.apply(this,[r.style,r.color,t].concat(_toConsumableArray(e.topxys()))),i&&this.borderLine.apply(this,[i.style,i.color,t].concat(_toConsumableArray(e.rightxys()))),o&&this.borderLine.apply(this,[o.style,o.color,t].concat(_toConsumableArray(e.bottomxys()))),a&&this.borderLine.apply(this,[a.style,a.color,t].concat(_toConsumableArray(e.leftxys()))),n.restore()}},{key:"borderLine",value:function(e,t,n){this.ctx.save(),this.ctx.beginPath();var r=this.ctx;if(r.lineWidth=thinLineWidth(),r.strokeStyle=t,"medium"===e?r.lineWidth=npx(2)-.5:"thick"===e?r.lineWidth=npx(3):"dashed"===e?r.setLineDash([npx(3),npx(2)]):"dotted"===e?r.setLineDash([npx(1),npx(1)]):"double"===e&&r.setLineDash([npx(2),0]),1<(arguments.length<=3?0:arguments.length-3)){e=(t=_slicedToArray(arguments.length<=3?void 0:arguments[3],2))[0],t=t[1],r.moveTo(npxLine(e),npxLine(t));for(var i=1;i<(arguments.length<=3?0:arguments.length-3);i+=1){var o=(a=_slicedToArray(i+3<3||arguments.length<=i+3?void 0:arguments[i+3],2))[0],a=a[1];o=npxLine(o),a=npxLine(a);r.lineTo(o,a)}r.stroke()}this.ctx.restore()}},{key:"dropdown",value:function(e){var t=this.ctx,n=e.x,r=e.y;n=n+e.width-15,r=r+e.height-15;t.save(),t.beginPath(),t.moveTo(npx(n),npx(r)),t.lineTo(npx(8+n),npx(r)),t.lineTo(npx(4+n),npx(6+r)),t.closePath(),t.fillStyle="rgba(0, 0, 0, .45)",t.fill(),t.restore()}},{key:"error",value:function(e){var t=this.ctx,n=e.x,r=e.y;n=n+e.width-1;t.save(),t.beginPath(),t.moveTo(npx(n-8),npx(r-1)),t.lineTo(npx(n),npx(r-1)),t.lineTo(npx(n),npx(r+8)),t.closePath(),t.fillStyle="rgba(255, 0, 0, .65)",t.fill(),t.restore()}},{key:"checked",value:function(e,t){t=t||"rgba(0, 255, 0, .85)";var n=this.ctx,r=e.x;e=e.y;n.save(),n.beginPath(),n.moveTo(npx(r+8),npx(e-1)),n.lineTo(npx(r),npx(e-1)),n.lineTo(npx(r),npx(e+8)),n.closePath(),n.fillStyle=t,n.fill(),n.restore()}},{key:"frozen",value:function(e,t){t=t||"rgba(0, 255, 0, .85)";var n=this.ctx,r=e.x,i=e.y;r=r+e.width-1;n.save(),n.beginPath(),n.moveTo(npx(r-8),npx(i-1)),n.lineTo(npx(r),npx(i-1)),n.lineTo(npx(r),npx(i+8)),n.closePath(),n.fillStyle=t,n.fill(),n.restore()}},{key:"expansionDown",value:function(e){var t=this.ctx,n=e.x;e=e.y;this.drawArrow(t,npx(n+5),npx(e+1),npx(n+5),npx(e+8),30,30,4,"#3285ff")}},{key:"expansionRight",value:function(e){var t=this.ctx,n=e.x;e=e.y;this.drawArrow(t,npx(n+3),npx(e+5),npx(n+10),npx(e+5),30,30,4,"#3285ff")}},{key:"expansionTwoWay",value:function(e){var t=this.ctx,n=e.x;e=e.y;this.drawArrow(t,npx(n+3),npx(e+5),npx(n+3),npx(e+12),30,30,4,"#3285ff"),this.drawArrow(t,npx(n+5),npx(e+5),npx(n+12),npx(e+5),30,30,4,"#3285ff")}},{key:"drawArrow",value:function(e,t,n,r,i,o,a,s,u){a=void 0!==(o=void 0!==o?o:30)?a:10,s=void 0!==s?s:1,u="color"!=typeof u?u:"#000";var c=((l=180*Math.atan2(n-i,t-r)/Math.PI)+o)*Math.PI/180,l=(l-o)*Math.PI/180,h=(o=a*Math.cos(c)/(2/dpr()),c=a*Math.sin(c)/(2/dpr()),a*Math.cos(l)/(2/dpr()));a=a*Math.sin(l)/(2/dpr());e.save(),e.beginPath(),e.moveTo(t-o,n-c),e.moveTo(t,n),e.lineTo(r,i),e.moveTo(r+o/5,i+c/5),e.lineTo(r,i),e.lineTo(r+h/5,i+a/5),e.strokeStyle=u,e.lineWidth=s,e.stroke(),e.restore()}},{key:"rectCellBg",value:function(e,t){var n=this.ctx,r=e.x,i=e.y,o=e.width,a=e.height;e=e.bgcolor;n.save(),n.beginPath(),n.fillStyle=e,print?n.rect(npxLine(r),npxLine(i),npx(o),npx(a)):t?n.rect(npxLine(r+1),npxLine(i+1),npx(o-2),npx(a-2)):n.rect(npxLine(r-.5),npxLine(i-.5),npx(o+1),npx(a+1)),n.fill(),n.restore()}},{key:"rect",value:function(e,t,n,r,i){var o=this.ctx,a=e.x,s=e.y,u=e.width,c=e.height;e.bgcolor,o.save(),o.beginPath(),o.rect(npxLine(a+1),npxLine(s+1),npx(u-2),npx(c-2)),o.clip(),n&&n.processBarWarn&&this.drawGradient(n,e,r),t(),o.restore()}},{key:"drawGradient",value:function(e,t,n){var r=this.ctx,i=t.x,o=t.y,a=t.width,s=t.height,u=(t=t.gradient,(l=(r.restore(),r.save(),e.processBarWarn)).isSplit),c=l.mix,l=l.splitMix,h=null,f=null,d=null,p=null;Number(n)&&!isNaN(n)?(l=l||1,0<n?f=u?(p=h=npx(i+3+(a-6)*(1-l)))+npx(d=(a-6)*l*c):(h=npx(i+3),npx((d=(a-6)*c)+i+3)):u?(d=(a-20)*(1-l)*c,f=(h=npx((a-20)*(1-l)*(1-c)+i+3))+npx(d),p=npx(i+3+(a-6)*(1-l))):(d=(a-6)*c,h=npx((1-c)*(a-6)+i+3),f=npx(a+i-3)),u&&this.drawProcessSplitLine(p,o,s,r),c=null,e.isGradient?(c=r.createLinearGradient(h,0,f,0),0<n?(c.addColorStop(0,t),c.addColorStop(1,t+"00")):(c.addColorStop(1,t),c.addColorStop(0,t+"00"))):c=t,r.fillStyle=c,r.strokeStyle=t,r.lineWidth=npx(.5),r.fillRect(h,npx(o+3),npx(d),npx(s-6)),r.strokeRect(h,npx(o+3),npx(d),npx(s-6))):0==n&&(p=npx(i+3+(a-6)*(1-l)),u&&this.drawProcessSplitLine(p,o,s,r))}},{key:"buttonControl",value:function(e,t,n){var r=this.ctx,i=e.x,o=e.y,a=e.width,s=e.height,u=t.bgcolor,c=t.showIcon,l=t.radius,h=t.icon,f=t.iconSize,d=t.iconColor;l=l||1,r.restore(),r.save(),r.beginPath(),r.fillStyle=u||"#fff",u=i+8,i=o+3,o=a-16,a=s-6,r.rect(npxLine(u),npxLine(i),npx(o),npx(a)),this.radiusRect(npxLine(u),npxLine(i),npx(o),npx(a),npx(l)),r.clip(),r.fill(),s=12;c&&(this.FoldIcon({x:u-10,y:i,width:38,height:a},h,d,f,"center"),s+=16),this.buttonText(e,t,n,s),r.save(),r.restore()}},{key:"radiusRect",value:function(e,t,n,r,i){var o=this.ctx,a=Math.PI;o.beginPath(),o.arc(e+i,t+i,i,-a,-a/2),o.arc(e+n-i,t+i,i,-a/2,0),o.arc(e+n-i,t+r-i,i,0,a/2),o.arc(e+i,t+r-i,i,a/2,a),o.closePath()}},{key:"buttonText",value:function(e,t,n,r){var i=this.ctx,o=e.x,a=e.y;e.width,o+=r,r=a+e.height/2,i.save(),i.beginPath(),a=t.fontSize,e=t.color;this.attr({font:"".concat(npx(a),"px Arial"),fillStyle:e,textAlign:"left",textBaseline:"middle"}),this.fillText(n,o,r),i.restore()}},{key:"drawProcessSplitLine",value:function(e,t,n,r){r.beginPath(),r.moveTo(e-npx(2),npx(t+1)),r.lineTo(e-npx(2),npx(t+n-1)),r.strokeStyle="#000000",r.lineWidth=npx(.5),r.setLineDash([npx(2),npx(1)]),r.stroke(),r.restore(),r.save()}},{key:"drawFoldIcon",value:function(e,t){var n=this.ctx,r=e.x,i=e.y;e=e.width;"add"===t.name?this.plusOpen(n,r,i,e,t):"reduce"===t.name&&this.minusStop(n,r,i,e,t)}},{key:"plusOpen",value:function(e,t,n,r,i){e.save(),e.strokeStyle="#3285ff",e.beginPath(),i.align&&"center"==i.align&&(t=npx(r-10)/npx(2)),e.moveTo(npx(t),npx(n+7.5)),e.lineTo(npx(t+10),npx(n+7.5)),e.lineTo(npx(t+10),npx(n+17.5)),e.lineTo(npx(t),npx(n+17.5)),e.lineTo(npx(t),npx(n+7.5)),e.stroke(),e.beginPath(),e.moveTo(npx(t+2),npx(n+12.5)),e.lineTo(npx(t+8),npx(n+12.5)),e.stroke(),e.beginPath(),e.moveTo(npx(t+5),npx(n+9.5)),e.lineTo(npx(t+5),npx(n+15.5)),e.stroke(),e.restore()}},{key:"minusStop",value:function(e,t,n){e.save(),e.strokeStyle="#3285ff",e.beginPath(),e.moveTo(npx(t+10),npx(n+7.5)),e.lineTo(npx(t+20),npx(n+7.5)),e.lineTo(npx(t+20),npx(n+17.5)),e.lineTo(npx(t+10),npx(n+17.5)),e.lineTo(npx(t+10),npx(n+7.5)),e.stroke(),e.beginPath(),e.moveTo(npx(t+12),npx(n+12.5)),e.lineTo(npx(t+18),npx(n+12.5)),e.stroke(),e.restore()}},{key:"FoldIcon",value:function FoldIcon(box,icon,color,fontsize,align){fontsize=fontsize||14;var ctx=this.ctx,x=box.x,y=box.y,width=box.width,height=box.height,txtHeight=(ctx.save(),ctx.font="".concat(npx(fontsize),"px fontawesome"),ctx.fillStyle=color,ctx.strokeStyle=color,4/3*14);"center"==align?ctx.fillText(eval('"'+icon+'"'),npx(x+width/2-txtHeight/4),npx(y+height/2+txtHeight/4)):ctx.fillText(eval('"'+icon+'"'),npx(x+10),npx(y+txtHeight)),ctx.restore()}},{key:"drawBackgroudImage",value:function(e,t){var n=this.ctx,r=e.x,i=(e=e.y,t.width),o=t.height;n.save(),n.globalAlpha=.3,n.drawImage(t,npx(r),npx(e),npx(i),npx(o)),n.restore()}},{key:"createPattern",value:function(e,t){var n=this.ctx,r=(n.save(),n.globalAlpha=.3,n.createPattern(e,"no-repeat")),i=e.width;e=e.height;n.fillStyle=r,n.fillRect(0,0,i-t,e-t),n.restore(),n.globalAlpha=1}},{key:"drawImageCell",value:function(e,t,n,r){var i=this.ctx,o=e.x,a=e.y,s=e.width,u=e.height,c=t.width,l=t.height,h=s/c,f=u/l,d=c/l,p=s/u;i.save(),i.rect(npxLine(o+1),npxLine(a+1),npx(s-2),npx(u-2)),i.clip();try{if(1!=r&&r)if(2==r)for(var m=Math.ceil(npx(h)/dpr()),g=Math.ceil(npx(f)/dpr()),A=0;A<g;A++)for(var v=0;v<m;v++)i.drawImage(t,npx(o+c*v),npx(a+l*A),npx(c),npx(l));else 3==r?d<p?i.drawImage(t,0,(l-c/p)/2,c,c/p,npx(o),npx(a),npx(s),npx(u)):i.drawImage(t,(c-l*p)/2,0,l*p,l,npx(o),npx(a),npx(s),npx(u)):4==r&&(npx((a+u-s/d)/2),p<=d?i.drawImage(t,npx(o),npx(a)+(npx(u)-npx(s)/d)/2,npx(s),npx(s/d)):i.drawImage(t,npx(o)+(npx(s)-npx(u)*d)/2,npx(a),npx(u*d),npx(u)));else i.drawImage(t,npx(o),npx(a),npx(s),npx(u))}catch(t){this.text(n,e,{align:"left",valign:"middle",font:{bold:!1,italic:!1,name:"Arial",size:13},color:"#000000",strike:!1,underline:!1},!1)}i.restore()}},{key:"waterImage",value:function(e,t,n,r,i,o,a,s){var u,c,l,h,f,d,p,m,g,A,v=this;if(e)return u=this.ctx,c=i||new Image,f=e.w,d=e.h,p=e.x,m=e.y,g=e.angle,l=e.url,h=e.display,f=Number(f),d=Number(d),p=Number(p),m=Number(m),g=Number(g),A=function(){u.save(),v.translate(t,n),o=o<=0?o:-o,a=a<=0?a:-a,v.translate(o,a),!isNaN(g)&&g&&(v.translate(p+f/2,m+d/2),u.rotate(g*Math.PI/180),v.translate(-(p+f/2),-(m+d/2)));var e=c.width,r=c.height,i=f/e,s=d/r,l=e/r,A=f/d;try{if(1!=h&&h)if(2==h)for(var b=Math.ceil(npx(i)/dpr()),y=Math.ceil(npx(s)/dpr()),w=0;w<y;w++)for(var x=0;x<b;x++)u.drawImage(c,npx(p+e*x),npx(m+r*w),npx(e),npx(r));else 3==h?l<A?u.drawImage(c,0,(r-e/A)/2,e,e/A,npx(p),npx(m),npx(f),npx(d)):u.drawImage(c,(e-r*A)/2,0,r*A,r,npx(p),npx(m),npx(f),npx(d)):4==h&&(npx((m+d-f/l)/2),A<=l?u.drawImage(c,npx(p),npx(m)+(npx(d)-npx(f)/l)/2,npx(f),npx(f/l)):u.drawImage(c,npx(p)+(npx(f)-npx(d)*l)/2,npx(m),npx(d*l),npx(d)));else u.drawImage(c,npx(p),npx(m),npx(f),npx(d))}catch(e){}u.restore()},i?new Promise((function(e,t){A(),e([s,c])})):(c.src=l,c.crossOrigin="Anonymous",new Promise((function(e,t){c.onload=function(){A(),e([s,c])},c.onerror=function(){e([s,c])}})))}},{key:"noNpxDrawImageCell",value:function(e,t,n,r){var i=this.ctx,o=e.x,a=e.y,s=e.width,u=e.height,c=t.width,l=t.height,h=s/c,f=u/l,d=c/l,p=s/u;i.save(),i.rect(noNpxLine(o+1),noNpxLine(a+1),s-2,u-2),i.clip();try{if(1!=r&&r)if(2==r)for(var m=Math.ceil(h),g=Math.ceil(f),A=0;A<g;A++)for(var v=0;v<m;v++)i.drawImage(t,o+c*v,a+l*A,c,l);else 3==r?d<p?i.drawImage(t,0,(l-c/p)/2,c,c/p,o,a,s,u):i.drawImage(t,(c-l*p)/2,0,l*p,l,o,a,s,u):4==r&&(npx((a+u-s/d)/2),p<=d?i.drawImage(t,o,a+(u-s/d)/2,s,s/d):i.drawImage(t,o+(s-u*d)/2,a,u*d,u));else i.drawImage(t,o,a,s,u)}catch(t){this.text(n,e,{align:"left",valign:"middle",font:{bold:!1,italic:!1,name:"Arial",size:13},color:"#000000",strike:!1,underline:!1},!1)}i.restore()}},{key:"drawHtml",value:function(e,t,n){var r,i,o,a;3==n?this.drawImageCell(t,e,"",4):(n=this.ctx,r=t.x,i=t.y,o=e.width,a=e.height,n.save(),n.rect(npxLine(r+1),npxLine(i+1),npx(t.width-2),npx(t.height-2)),n.clip(),n.drawImage(e,npx(r),npx(i),npx(o),npx(a)),n.restore())}}]),Draw}(),getDrawBox=function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0,i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,o=5<arguments.length&&void 0!==arguments[5]?arguments[5]:0,a=6<arguments.length&&void 0!==arguments[6]?arguments[6]:null,s=7<arguments.length&&void 0!==arguments[7]?arguments[7]:null;t=(e=e.cellRect(t,n,i,o)).left,n=e.top,i=e.width,o=e.height;return a&&(n+=a),s&&(t+=s),new DrawBox(t,n+r,i,o,0)},renderMaskCell=function(e,t,n){var r=n.x;n=n.y;(e=e.ctx).save(),e.drawImage(t.el,npx(r),npx(n)),e.restore()},renderMask=function(e,t,n,r,i,o,a){var s=t.x,u=t.y,c=e.ctx,l=(c.save(),t.textx("center"));t=t.texty("middle",r);e.translate(s+i.maxDrawCellSize/2,u+i.maxDrawCellSize/2),e.ctx.rotate(i.options.rotate*Math.PI/180),e.translate(-(s+i.maxDrawCellSize/2),-(u+i.maxDrawCellSize/2)),e.fillText(n,l,t),a&&drawFontLine.call(e,"underline",l,t,"left","middle",parseInt(i.options.fontsize),o),c.restore()},renderCell=function(e,t,n,r){var i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,o=6<arguments.length&&void 0!==arguments[6]?arguments[6]:null,a=null;o&&o.st?a=getDrawBox(t,n,r,i,o.sri,o.sci,o.st,o.sl):(a=getDrawBox(t,n,r,i),o&&(i=t.sumWidth(o.sci,r),r=t.sumHeight(o.sri,n),o.st=a.y-r,o.sl=a.x-i)),renderMaskCell(t.draw,t.waterCellCanvas,a)},waterMaskCells=function(){function e(t,n,r,i,o,a,s,u,c,l,h){_classCallCheck(this,e),this.rows={},this.cellW=c,this.cellH=l,this.canvasSize=r,this.maxDrawCellSize=h,this.options=i,this.scroll=s,this.draw=o,this.viewRange={},this.textHeight=a,this.textWidth=u,this.waterCellCanvas=this.createCanvas(),this.initRows()}return _createClass(e,[{key:"createCanvas",value:function(){var e=document.createElement("canvas"),t=(e=new Draw(e,this.maxDrawCellSize,this.maxDrawCellSize),this.options.fontstyle.includes("italic")),n=this.options.fontstyle.includes("bold"),r=this.options.fontstyle.includes("underline");t={font:"".concat(t?"italic":""," ").concat(n?"bold":""," ").concat(npx(parseInt(this.options.fontsize)),"px Source Sans Pro"),fillStyle:this.options.color},e.attr(t),n=new DrawBox(0,0,this.maxDrawCellSize,this.maxDrawCellSize);return e.scale(1/dpr(),1/dpr()),renderMask(e,n,this.options.text,this.textHeight,this,this.textWidth,r),e}},{key:"cellRect",value:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0;return{left:this.sumWidth(3<arguments.length&&void 0!==arguments[3]?arguments[3]:0,t),top:this.sumHeight(n,e),width:this.cellW,height:this.cellH}}},{key:"sumHeight",value:function(e,t){var n=this;return t<e?0-_core_helper__WEBPACK_IMPORTED_MODULE_0__.a.rangeSum(t,e,(function(e){return n.cellH})):_core_helper__WEBPACK_IMPORTED_MODULE_0__.a.rangeSum(e,t,(function(e){return n.cellH}))}},{key:"sumWidth",value:function(e,t){var n=this;return t<e?0-_core_helper__WEBPACK_IMPORTED_MODULE_0__.a.rangeSum(t,e,(function(e){return n.cellW})):_core_helper__WEBPACK_IMPORTED_MODULE_0__.a.rangeSum(e,t,(function(e){return n.cellW}))}},{key:"initRows",value:function(){this.rowCount=Math.ceil(this.canvasSize/this.cellH),this.colCount=Math.ceil(this.canvasSize/this.cellW);for(var e=(r=this.scroll).x,t=r.y,n=(e=(r.XDirection,r.YDirection,r.lastX,r.lastY,Math.abs(e)),t=Math.abs(t),(r=this.draw.waterMask).startRow),r=(r.startCol,Math.ceil(e/this.cellW)),i=(n=Math.ceil(t/this.cellH),r),o=0;o<this.rowCount;o++){this.rows[o+n]={};for(var a=0;a<this.colCount;a++){var s=a+i;this.rows[o+n][s]=s}}this.viewRange.sri=n,this.viewRange.sci=i,this.draw.waterMask.startRow=n,this.draw.waterMask.startCol=i}},{key:"each",value:function(e){for(var t in this.rows){var n,r=this.rows[t];for(n in r){var i=r[n];e(Number(t),i)}}}},{key:"rotate",value:function(){this.draw.ctx.translate(this.minSizeCanvas/2,this.minSizeCanvas/2),this.draw.ctx.rotate(Math.PI*this.options.rotate/180)}},{key:"renderContent",value:function(){var e=this;this.each((function(t,n){renderCell(e.draw,e,t,n,0,0,e.viewRange)}))}}]),e}(),waterMaskOptions={text:"",fontsize:12,color:"#D8D8D8",offsetX:200,offsetY:100,rotate:-20,fontstyle:[],open:0},waterMaskFormula=function(e){try{var t=e.text.trim();"="==t[0]&&(e.text=_core_cell__WEBPACK_IMPORTED_MODULE_1__.a.eval(t.substring(1)))}catch(e){}};function random(e,t){return Math.floor(Math.random()*(t-e+1))+e}function randomColor(){r,g,b}function drawText(e,t,n,r,i,o,a){a.save(),a.translate(t,n),a.rotate(r*Math.PI/180),a.font=i+"px Arial",a.fillStyle=o,a.textAlign="center",a.textBaseline="middle",a.fillText(e,0,0),a.restore()}var development=function(e,t){for(var n=t.width(),r=(t=t.height(),n=Math.max(n,t),Math.ceil(Math.SQRT2*n)),i=(t=document.createElement("canvas"),new Draw(t,r,r)),o=(n=(i.attr({font:"".concat(12,"px Source Sans Pro")}),i.ctx.measureText(e)),t=Math.ceil(n.width)+30,n=Math.ceil(n.actualBoundingBoxAscent+n.actualBoundingBoxDescent)+50,t=Math.ceil(r/t),n=Math.ceil(r/n),Math.ceil(t*n/2)),a=0;a<o;a++)drawText(e,random(0,r),random(0,r),random(-90,90),random(12,32),"#D8D8D8",i.ctx);return i},devdraw=function(e,t){e.save(),e.ctx.drawImage(t.el,0,0),t.restore()},waterMask=function(e,t,n,r,i,o,a){var s,u,c,l,h,f;e&&((e=Object.assign(waterMaskOptions,e)).rotate=Number(e.rotate),e.offsetY=Number(e.offsetY),e.offsetX=Number(e.offsetX),e.fontsize=Number(e.fontsize),e.open&&(waterMaskFormula(e),t.save(),s=e.fontstyle.includes("italic"),l=e.fontstyle.includes("bold"),s={textAlign:"left",textBaseline:"middle",font:"".concat(s?"italic":""," ").concat(l?"bold":""," ").concat(npx(parseInt(e.fontsize)),"px Source Sans Pro"),fillStyle:e.color},t.attr(s),l=t.el.width,s=t.el.height,l=Math.max(l,s),s=Math.ceil(Math.SQRT2*l),l=t.ctx.measureText(e.text),c=(u=Math.ceil(l.width))+e.offsetX,h=(l=Math.ceil(l.actualBoundingBoxAscent+l.actualBoundingBoxDescent))+e.offsetY,t.translate(-i,-o),t.ctx.translate(-s/2,-s/2),i=e.rotate*Math.PI/180,o=c*Math.abs(Math.sin(i))+h*Math.abs(Math.cos(i)),i=c*Math.abs(Math.cos(i))+h*Math.abs(Math.sin(i)),f=Math.max(o,i),new waterMaskCells(c,h,s,e,t,l,a,u,o,i,f).renderContent(),t.restore()))}},function(module,__webpack_exports__,__webpack_require__){"use strict";function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function cloneDeep(e){return JSON.parse(JSON.stringify(e))}var mergeDeep=function e(){for(var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length,r=new Array(1<n?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return r.forEach((function(n){Object.keys(n).forEach((function(r){var i=n[r];"string"!=typeof i&&"number"!=typeof i&&"boolean"!=typeof i&&"function"!=typeof i&&!Array.isArray(i)&&i instanceof Object?(t[r]=t[r]||{},e(t[r],i)):t[r]=i}))})),t};function equals(e,t){var n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(var r=0;r<n.length;r+=1){var i=n[r],o=e[i],a=t[i];if(void 0===a)return!1;if("string"==typeof o||"number"==typeof o||"boolean"==typeof o){if(o!==a)return!1}else if(Array.isArray(o)){if(o.length!==a.length)return!1;for(var s=0;s<o.length;s+=1)if(!equals(o[s],a[s]))return!1}else if("function"!=typeof o&&!Array.isArray(o)&&"object"===_typeof(o)&&null!==o&&!equals(o,a))return!1}return!0}var sum=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:function(e){return e},n=0,r=0;return Object.keys(e).forEach((function(i){n+=t(e[i],i),r+=1})),[n,r]};function deleteProperty(e,t){var n=e["".concat(t)];return delete e["".concat(t)],n}function rangeReduceIf(e,t,n,r,i,o){for(var a=n,s=r,u=e;u<t&&!(i<a);u+=1)a+=s=o(u);return[u,a-s,s]}function rangeSum(e,t,n){for(var r=0,i=e;i<t;i+=1)r+=n(i);return r}function rangeEach(e,t,n){for(var r=e;r<t;r+=1)n(r)}function arrayEquals(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n+=1)if(e[n]!==t[n])return!1;return!0}function digits(e){for(var t="".concat(e),n=0;n<t.length;n+=1)"."===t.charAt(n)&&!0}function numberCalc(type,a1,a2){if(""===a1&&""===a2)return"";if("/"===type&&(0==a1||0==a2))return 0;if("-"===type){if(!a1)return 0-a2;if(!a2)return+a1}if(!("*"!==type||a1&&a2))return 0;if(""===a2)return a1;if(""===a1)return a2;var o_a1=a1,o_a2=a2,ret;isNaN(a1)&&(a1='"'.concat(a1,'"')),isNaN(a2)&&(a2='"'.concat(a2,'"'));try{ret=eval(a1+type+a2)}catch(e){return o_a1+type+o_a2}if("number"==typeof ret){if(isNaN(ret))return o_a1+type+o_a2;try{var num=ret.toString().split(".")[1];num&&6<num.length&&(ret=ret.toFixed(6))}catch(e){}}return ret}var defaultToolbarButtons=[{showIcon:!0,showText:!0,text:"首页",icon:"fa fa-step-backward",color:"#2c3e50",show:!0,type:1},{showIcon:!0,showText:!0,text:"上一页",icon:"xzreport-icon-arrow-left-filling",color:"#2c3e50",show:!0,type:2},{showIcon:!0,showText:!0,text:"当前页/总页数",icon:"fa fa-file-text-o",color:"#2c3e50",show:!0,type:3},{showIcon:!0,showText:!0,text:"下一页",icon:"xzreport-icon-arrow-right-filling",color:"#2c3e50",show:!0,type:4},{showIcon:!0,showText:!0,text:"末页",icon:"fa fa-step-forward",color:"#2c3e50",show:!0,type:5},{showIcon:!0,showText:!0,text:"打印",color:"#2c3e50",icon:"fa fa-print",show:!0,type:6},{showIcon:!0,showText:!0,text:"导出",icon:"fa fa-download",color:"#2c3e50",show:!0,type:7}],swapArrayLocs=function(e,t,n){var r=[e[n],e[t]];e[t]=r[0],e[n]=r[1]},buttonIconsList=["fa fa-angle-double-left","fa fa-angle-left","fa fa-file-text-o","fa fa-angle-right","fa fa-angle-double-right","fa fa-print","fa fa-download","fa fa-arrow-circle-down","fa fa-arrow-circle-up","fa fa-arrow-down","fa fa-arrow-up","fa fa-chevron-down","fa fa-chevron-up","fa fa-long-arrow-down","fa fa-long-arrow-up","fa fa-caret-down","fa fa-caret-up","fa fa-circle","fa fa-dot-circle-o","fa fa-square","fa fa-stop-circle-o","fa fa-star","fa fa-heart","fa fa-bell","fa fa-font-awesome","fa fa-battery-quarter","fa fa-battery-half","fa fa-battery-full","fa fa-exclamation-circle","fa fa-exclamation-triangle","fa fa-exclamation","fa fa-thumbs-up","fa fa-thumbs-down","fa fa-cog","fa fa-tachometer","fa fa-signal","fa fa-trophy"];__webpack_exports__.a={cloneDeep:cloneDeep,merge:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return mergeDeep.apply(void 0,[{}].concat(t))},equals:equals,arrayEquals:arrayEquals,sum:sum,rangeEach:rangeEach,rangeSum:rangeSum,rangeReduceIf:rangeReduceIf,deleteProperty:deleteProperty,numberCalc:numberCalc,defaultToolbarButtons:defaultToolbarButtons,swapArrayLocs:swapArrayLocs,buttonIconsList:buttonIconsList}},function(e,t,n){(function(t){e.exports=function(e){var r;if("undefined"!=typeof window&&window.crypto&&(r=window.crypto),"undefined"!=typeof self&&self.crypto&&(r=self.crypto),!(r=!(r=!(r="undefined"!=typeof globalThis&&globalThis.crypto?globalThis.crypto:r)&&"undefined"!=typeof window&&window.msCrypto?window.msCrypto:r)&&void 0!==t&&t.crypto?t.crypto:r))try{r=n(401)}catch(a){}var i=Object.create||function(e){return o.prototype=e,e=new o,o.prototype=null,e};function o(){}var a={},s=a.lib={},u=s.Base={extend:function(e){var t=i(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),(t.init.prototype=t).$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},c=s.WordArray=u.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||h).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,i=e.sigBytes;if(this.clamp(),r%4)for(var o=0;o<i;o++){var a=n[o>>>2]>>>24-o%4*8&255;t[r+o>>>2]|=a<<24-(r+o)%4*8}else for(var s=0;s<i;s+=4)t[r+s>>>2]=n[s>>>2];return this.sigBytes+=i,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=u.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n<e;n+=4)t.push(function(){if(r){if("function"==typeof r.getRandomValues)try{return r.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof r.randomBytes)try{return r.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")}());return new c.init(t,e)}}),l=a.enc={},h=l.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var o=t[i>>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new c.init(n,t/2)}},f=l.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i++){var o=t[i>>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new c.init(n,t)}},d=l.Utf8={stringify:function(e){try{return decodeURIComponent(escape(f.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return f.parse(unescape(encodeURIComponent(e)))}},p=s.BufferedBlockAlgorithm=u.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=d.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n,r=this._data,i=r.words,o=r.sigBytes,a=this.blockSize,s=o/(4*a),u=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*a;t=e.min(4*u,o);if(u){for(var l=0;l<u;l+=a)this._doProcessBlock(i,l);n=i.splice(0,u),r.sigBytes-=t}return new c.init(n,t)},clone:function(){var e=u.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0}),m=(s.Hasher=p.extend({cfg:u.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){p.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new m.HMAC.init(e,n).finalize(t)}}}),a.algo={});return a}(Math)}).call(this,n(67))},function(e,t,n){"use strict";(function(e){n.d(t,"f",(function(){return s})),n.d(t,"e",(function(){return u})),n.d(t,"a",(function(){return h})),n.d(t,"b",(function(){return f})),n.d(t,"d",(function(){return d})),n.d(t,"c",(function(){return p})),n.d(t,"j",(function(){return m})),n.d(t,"h",(function(){return g})),n.d(t,"g",(function(){return A})),n.d(t,"i",(function(){return v})),n.d(t,"k",(function(){return b}));var r=n(61),i=n(94),o=n(10),a=n(168);
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */async function s(e,t){const n=[],r=[];var i=Array.isArray(e)?e.map(e=>e.name):Object.keys(e);for(let a=0;a<i.length;++a){var o=i[a];const s=Array.isArray(e)?e[a].tensor:e[o];if("float32"!==s.dtype&&"int32"!==s.dtype&&"bool"!==s.dtype&&"string"!==s.dtype&&"complex64"!==s.dtype)throw new Error(`Unsupported dtype in weight '${o}': `+s.dtype);const u={name:o,shape:s.shape,dtype:s.dtype};"string"===s.dtype?(o=new Promise(async e=>{const t=await s.bytes();var n=t.reduce((e,t)=>e+t.length,0)+4*t.length;const r=new Uint8Array(n);let i=0;for(let e=0;e<t.length;e++){var o=t[e],a=new Uint8Array(new Uint32Array([o.length]).buffer);r.set(a,i),i+=4,r.set(o,i),i+=o.length}e(r)}),r.push(o)):r.push(s.data()),null!=t&&(u.group=t),n.push(u)}return{data:function(e){if(null===e)throw new Error("Invalid input value: "+JSON.stringify(e));let t=0;const n=[],r=(e.forEach(e=>{if(t+=e.byteLength,n.push(e.byteLength===e.buffer.byteLength?e:new e.constructor(e)),!(e instanceof Float32Array||e instanceof Int32Array||e instanceof Uint8Array))throw new Error("Unsupported TypedArray subtype: "+e.constructor.name)}),new Uint8Array(t));let i=0;return n.forEach(e=>{r.set(new Uint8Array(e.buffer),i),i+=e.byteLength}),r.buffer}(await Promise.all(r)),specs:n}}function u(e,t){const n={};let s,u=0;for(const x of t){var c=x.name,l=x.dtype,h=x.shape,f=Object(o.O)(h);let t;if("quantization"in x){var d=x.quantization;if("uint8"===d.dtype||"uint16"===d.dtype){if(!("min"in d)||!("scale"in d))throw new Error(`Weight ${x.name} with quantization ${d.dtype} doesn't have corresponding metadata min and scale.`)}else{if("float16"!==d.dtype)throw new Error(`Weight ${x.name} has unknown quantization dtype ${d.dtype}. Supported quantization dtypes are: 'uint8', 'uint16', and 'float16'.`);if("float32"!==l)throw new Error(`Weight ${x.name} is quantized with ${d.dtype} which only supports weights of type float32 not ${l}.`)}var p=a.a[d.dtype],m=e.slice(u,u+f*p),g=new("uint8"===d.dtype?Uint8Array:Uint16Array)(m);if("float32"===l)if("uint8"===d.dtype||"uint16"===d.dtype){t=new Float32Array(g.length);for(let e=0;e<g.length;e++){var A=g[e];t[e]=A*d.scale+d.min}}else{if("float16"!==d.dtype)throw new Error(`Unsupported quantization type ${d.dtype} for weight type float32.`);void 0===s&&(s=function(){const e=function(){const e=new Uint32Array(2048);e[0]=0;for(let t=1;t<1024;t++)e[t]=(e=>{let t=e<<13,n=0;for(;0==(8388608&t);)n-=8388608,t<<=1;return t&=-8388609,n+=947912704,t|n})(t);for(let t=1024;t<2048;t++)e[t]=939524096+(t-1024<<13);return e}(),t=function(){const e=new Uint32Array(64);e[0]=0,e[31]=1199570944,e[32]=2147483648,e[63]=3347054592;for(let t=1;t<31;t++)e[t]=t<<23;for(let t=33;t<63;t++)e[t]=2147483648+(t-32<<23);return e}(),n=function(){const e=new Uint32Array(64);for(let t=0;t<64;t++)e[t]=1024;return e[0]=e[32]=0,e}();return r=>{var i=new ArrayBuffer(4*r.length);const o=new Uint32Array(i);for(let i=0;i<r.length;i++){var a=r[i];a=e[n[a>>10]+(1023&a)]+t[a>>10];o[i]=a}return new Float32Array(i)}}()),t=s(g)}else{if("int32"!==l)throw new Error(`Unsupported dtype in weight '${c}': `+l);if("uint8"!==d.dtype&&"uint16"!==d.dtype)throw new Error(`Unsupported quantization type ${d.dtype} for weight type int32.`);t=new Int32Array(g.length);for(let e=0;e<g.length;e++){var v=g[e];t[e]=Math.round(v*d.scale+d.min)}}u+=f*p}else if("string"===l){var b=Object(o.O)(x.shape);t=[];for(let n=0;n<b;n++){var y=new Uint32Array(e.slice(u,u+4))[0],w=(u+=4,new Uint8Array(e.slice(u,u+y)));t.push(w),u+=y}}else{if(m=a.a[l],p=e.slice(u,u+f*m),"float32"===l)t=new Float32Array(p);else if("int32"===l)t=new Int32Array(p);else if("bool"===l)t=new Uint8Array(p);else{if("complex64"!==l)throw new Error(`Unsupported dtype in weight '${c}': `+l);{t=new Float32Array(p);const e=new Float32Array(t.length/2),o=new Float32Array(t.length/2);for(let n=0;n<e.length;n++)e[n]=t[2*n],o[n]=t[2*n+1];const a=Object(i.a)(e,h,"float32"),s=Object(i.a)(o,h,"float32");n[c]=Object(r.a)(a,s),a.dispose(),s.dispose()}}u+=f*m}"complex64"!==l&&(n[c]=Object(i.a)(t,h,l))}return n}const c=void 0!==e&&("undefined"==typeof Blob||"undefined"==typeof atob||"undefined"==typeof btoa);function l(t){return c?e.byteLength(t):new Blob([t]).size}function h(t){if(c)return e.from(t).toString("base64");var n=new Uint8Array(t);let r="";for(let e=0,t=n.length;e<t;e++)r+=String.fromCharCode(n[e]);return btoa(r)}function f(t){if(c){const n=e.from(t,"base64");return n.buffer.slice(n.byteOffset,n.byteOffset+n.byteLength)}const n=atob(t),r=new Uint8Array(n.length);for(let e=0;e<n.length;++e)r.set([n.charCodeAt(e)],e);return r.buffer}function d(e){if(1===e.length)return e[0];let t=0;e.forEach(e=>{t+=e.byteLength});const n=new Uint8Array(t);let r=0;return e.forEach(e=>{n.set(new Uint8Array(e),r),r+=e.byteLength}),n.buffer}function p(e){for(e=e.trim();e.endsWith("/");)e=e.slice(0,e.length-1);var t=e.split("/");return t[t.length-1]}function m(e,t){const n={modelTopology:e.modelTopology,format:e.format,generatedBy:e.generatedBy,convertedBy:e.convertedBy,weightsManifest:t};return null!=e.signature&&(n.signature=e.signature),null!=e.userDefinedMetadata&&(n.userDefinedMetadata=e.userDefinedMetadata),null!=e.modelInitializer&&(n.modelInitializer=e.modelInitializer),null!=e.initializerSignature&&(n.initializerSignature=e.initializerSignature),null!=e.trainingConfig&&(n.trainingConfig=e.trainingConfig),n}function g(e,t,n){const r={modelTopology:e.modelTopology,format:e.format,generatedBy:e.generatedBy,convertedBy:e.convertedBy};if(null!=e.trainingConfig&&(r.trainingConfig=e.trainingConfig),null!=e.weightsManifest){if(!t)throw new Error("modelJSON has weightsManifest but weightSpecs is null");if(!n)throw new Error("modelJSON has weightsManifest but weightData is null");r.weightSpecs=t,r.weightData=n}return null!=e.signature&&(r.signature=e.signature),null!=e.userDefinedMetadata&&(r.userDefinedMetadata=e.userDefinedMetadata),null!=e.modelInitializer&&(r.modelInitializer=e.modelInitializer),null!=e.initializerSignature&&(r.initializerSignature=e.initializerSignature),r}async function A(e,t){let n,r;return null!=e.weightsManifest&&([n,r]=await t(e.weightsManifest)),g(e,n,r)}function v(e){if(e.modelTopology instanceof ArrayBuffer)throw new Error("Expected JSON model topology, received ArrayBuffer.");return{dateSaved:new Date,modelTopologyType:"JSON",modelTopologyBytes:null==e.modelTopology?0:l(JSON.stringify(e.modelTopology)),weightSpecsBytes:null==e.weightSpecs?0:l(JSON.stringify(e.weightSpecs)),weightDataBytes:null==e.weightData?0:e.weightData.byteLength}}function b(e){const t=[];for(const n of e)t.push(...n.weights);return t}}).call(this,n(163).Buffer)},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(6),i=n(4),o=n(3),a=n(10),s=n(79);t=n(5);const u=Object(t.b)({concat_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t=0){Object(a.b)(1<=e.length,()=>"Pass at least one tensor to concat");const n=Object(o.b)(e,"tensors","concat","string_or_numeric");return"complex64"===n[0].dtype&&n.forEach(e=>{if("complex64"!==e.dtype)throw new Error(`Cannot concatenate complex64 tensors with a tensor\n          with dtype ${e.dtype}. `)}),1===n.length?Object(s.a)(n[0]):(e=n,r.a.runKernel(i.C,e,{axis:t}))}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(6),i=n(4),o=n(3),a=n(113),s=n(20);t=n(5);const u=Object(t.b)({where_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t,n){t=Object(o.a)(t,"a","where"),n=Object(o.a)(n,"b","where"),e=Object(o.a)(e,"condition","where","bool");var u=Object(s.assertAndGetBroadcastShape)(Object(s.assertAndGetBroadcastShape)(e.shape,t.shape),n.shape);e=Object(a.a)(e,u),t=Object(a.a)(t,u),n=Object(a.a)(n,u);return r.a.runKernel(i.Hc,{condition:e,t:t,e:n})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"f",(function(){return h})),n.d(t,"d",(function(){return c})),n.d(t,"e",(function(){return l})),n.d(t,"b",(function(){return s})),n.d(t,"c",(function(){return u}));var r=n(6),i=n(7),o=n(3),a=n(10);
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function s(e){return a.b(a.u(e),()=>"The f passed in grad(f) must be a function"),(t,n)=>{const i=Object(o.a)(t,"x","tf.grad","string_or_numeric"),s=null!=n?Object(o.a)(n,"dy","tf.grad"):null;return r.a.tidy(()=>{var{value:t,grads:n}=r.a.gradients(()=>e(i),[i],s);return null!=s&&a.e(t.shape,s.shape,"The shape of dy passed in grad(f)(x, dy) must match the shape returned by f(x)"),d(n),n[0]})}}function u(e){return a.b(a.u(e),()=>"The f passed in grads(f) must be a function"),(t,n)=>{a.b(Array.isArray(t),()=>"The args passed in grads(f)(args) must be an array of `Tensor`s or `TensorLike`s");const i=Object(o.b)(t,"args","tf.grads","string_or_numeric"),s=null!=n?Object(o.a)(n,"dy","tf.grads"):null;return r.a.tidy(()=>{var{value:t,grads:n}=r.a.gradients(()=>e(...i),i,s);return null!=s&&a.e(t.shape,s.shape,"The shape of dy passed in grads(f)([x1,...], dy) must match the shape returned by f([x1,...])"),d(n),n})}}function c(e){return a.b(a.u(e),()=>"The f passed in valueAndGrad(f) must be a function"),(t,n)=>{a.b(t instanceof i.a,()=>"The x passed in valueAndGrad(f)(x) must be a tensor"),a.b(null==n||n instanceof i.a,()=>"The dy passed in valueAndGrad(f)(x, dy) must be a tensor");var{grads:n,value:o}=r.a.gradients(()=>e(t),[t],n);return d(n),{grad:n[0],value:o}}}function l(e){return a.b(a.u(e),()=>"The f passed in valueAndGrads(f) must be a function"),(t,n)=>{a.b(Array.isArray(t)&&t.every(e=>e instanceof i.a),()=>"The args passed in valueAndGrads(f)(args) must be array of tensors"),a.b(null==n||n instanceof i.a,()=>"The dy passed in valueAndGrads(f)(args, dy) must be a tensor");var o=r.a.gradients(()=>e(...t),t,n);return null!=n&&a.e(o.value.shape,n.shape,"The shape of dy passed in valueAndGrads(f)([x1,...], dy) must match the shape returned by f([x1,...])"),d(o.grads),o}}function h(e,t){a.b(a.u(e),()=>"The f passed in variableGrads(f) must be a function"),a.b(null==t||Array.isArray(t)&&t.every(e=>e instanceof i.c),()=>"The varList passed in variableGrads(f, varList) must be an array of variables");var n=null!=t;if(!n){t=[];for(const e in r.a.registeredVariables)t.push(r.a.registeredVariables[e])}const o=n?t.filter(e=>!e.trainable):null,s=t.length;t=t.filter(e=>e.trainable),a.b(0<t.length,()=>`variableGrads() expects at least one of the input variables to be trainable, but none of the ${s} variables is trainable.`);const{value:u,grads:c}=r.a.gradients(e,t,null,!0),l=(a.b(c.some(e=>null!=e),()=>"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()."),a.b(0===u.rank,()=>`The f passed in variableGrads(f) must return a scalar, but it returned a rank-${u.rank} tensor`),{});return t.forEach((e,t)=>{null!=c[t]&&(l[e.name]=c[t])}),null!=o&&o.forEach(e=>l[e.name]=null),{value:u,grads:l}}function f(e){return r.a.customGrad(e)}function d(e){if(0<e.filter(e=>null==e).length)throw new Error("Cannot compute gradient of y=f(x) with respect to x. Make sure that\n    the f you passed encloses all operations that lead from x to y.")}},function(e,t,n){"use strict";
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */var r;n.d(t,"a",(function(){return r})),(n=r=r||{})[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"},function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return a})),n.d(t,"c",(function(){return u})),n.d(t,"d",(function(){return c}));var r,i,o=12,a=o+"px sans-serif",s=function(e){var t={};if("undefined"!=typeof JSON)for(var n=0;n<e.length;n++){var r=String.fromCharCode(n+32),i=(e.charCodeAt(n)-20)/100;t[r]=i}return t}("007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N"),u={createCanvas:function(){return"undefined"!=typeof document&&document.createElement("canvas")},measureText:function(e,t){if(r||(n=u.createCanvas(),r=n&&n.getContext("2d")),r)return i!==t&&(i=r.font=t||a),r.measureText(e);e=e||"";var n=/(\d+)px/.exec(t=t||a),c=n&&+n[1]||o,l=0;if(0<=t.indexOf("mono"))l=c*e.length;else for(var h=0;h<e.length;h++){var f=s[e[h]];l+=null==f?c:f*c}return{width:l}},loadImage:function(e,t,n){var r=new Image;return r.onload=t,r.onerror=n,r.src=e,r}};function c(e){for(var t in u)e[t]&&(u[t]=e[t])}},function(e,t,n){"use strict";n.d(t,"d",(function(){return m})),n.d(t,"b",(function(){return A})),n.d(t,"a",(function(){return v})),n.d(t,"e",(function(){return b})),n.d(t,"c",(function(){return y}));t=n(95);var r={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function i(e){return(e=Math.round(e))<0?0:255<e?255:e}function o(e){return e<0?0:1<e?1:e}function a(e){return e.length&&"%"===e.charAt(e.length-1)?i(parseFloat(e)/100*255):i(parseInt(e,10))}function s(e){return e.length&&"%"===e.charAt(e.length-1)?o(parseFloat(e)/100):o(parseFloat(e))}function u(e,t,n){return n<0?n+=1:1<n&&--n,6*n<1?e+(t-e)*n*6:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}function c(e,t,n){return e+(t-e)*n}function l(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function h(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var f=new t.a(20),d=null;function p(e,t){d&&h(d,t),d=f.put(e,d||t.slice())}function m(e,t){if(e){t=t||[];var n=f.get(e);if(n)return h(t,n);if((n=(e+="").replace(/ /g,"").toLowerCase())in r)return h(t,r[n]),p(e,t),t;var i=n.length;if("#"===n.charAt(0))return 4===i||5===i?0<=(o=parseInt(n.slice(1,4),16))&&o<=4095?(l(t,(3840&o)>>4|(3840&o)>>8,240&o|(240&o)>>4,15&o|(15&o)<<4,5===i?parseInt(n.slice(4),16)/15:1),p(e,t),t):void l(t,0,0,0,1):7===i||9===i?0<=(o=parseInt(n.slice(1,7),16))&&o<=16777215?(l(t,(16711680&o)>>16,(65280&o)>>8,255&o,9===i?parseInt(n.slice(7),16)/255:1),p(e,t),t):void l(t,0,0,0,1):void 0;var o=n.indexOf("("),u=n.indexOf(")");if(-1!==o&&u+1===i){i=n.substr(0,o);var c=n.substr(o+1,u-(o+1)).split(","),d=1;switch(i){case"rgba":if(4!==c.length)return 3===c.length?l(t,+c[0],+c[1],+c[2],1):l(t,0,0,0,1);d=s(c.pop());case"rgb":return 3<=c.length?(l(t,a(c[0]),a(c[1]),a(c[2]),3===c.length?d:s(c[3])),p(e,t),t):void l(t,0,0,0,1);case"hsla":return 4!==c.length?void l(t,0,0,0,1):(c[3]=s(c[3]),g(c,t),p(e,t),t);case"hsl":return 3!==c.length?void l(t,0,0,0,1):(g(c,t),p(e,t),t);default:return}}l(t,0,0,0,1)}}function g(e,t){var n,r=(parseFloat(e[0])%360+360)%360/360,o=s(e[1]);return l(t=t||[],i(255*u(n=2*(n=s(e[2]))-(o=n<=.5?n*(o+1):n+o-n*o),o,r+1/3)),i(255*u(n,o,r)),i(255*u(n,o,r-1/3)),1),4===e.length&&(t[3]=e[3]),t}function A(e,t){var n=m(e);if(n){for(var r=0;r<3;r++)n[r]=t<0?n[r]*(1-t)|0:(255-n[r])*t+n[r]|0,255<n[r]?n[r]=255:n[r]<0&&(n[r]=0);return b(n,4===n.length?"rgba":"rgb")}}function v(e,t,n){var r,a,s,u;if(t&&t.length&&0<=e&&e<=1)return e*=t.length-1,r=Math.floor(e),a=Math.ceil(e),u=m(t[r]),t=m(t[a]),u=b([i(c(u[0],t[0],s=e-r)),i(c(u[1],t[1],s)),i(c(u[2],t[2],s)),o(c(u[3],t[3],s))],"rgba"),n?{color:u,leftIndex:r,rightIndex:a,value:e}:u}function b(e,t){var n;if(e&&e.length)return n=e[0]+","+e[1]+","+e[2],"rgba"!==t&&"hsva"!==t&&"hsla"!==t||(n+=","+e[3]),t+"("+n+")"}function y(e,t){return(e=m(e))?(.299*e[0]+.587*e[1]+.114*e[2])*e[3]/255+(1-e[3])*t:0}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({sqrt_:
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){return e=Object(o.a)(e,"x","sqrt","float32"),r.a.runKernel(i.Xc,{x:e})}})},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return o})),n.d(t,"d",(function(){return a})),n.d(t,"e",(function(){return s})),n.d(t,"a",(function(){return u})),n.d(t,"f",(function(){return c})),n.d(t,"h",(function(){return l})),n.d(t,"g",(function(){return h}));var r=n(10);
/**
 * @license
 * Copyright 2017 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function i(e,t){for(let n=0;n<e.length;++n)if(e[e.length-n-1]!==t-1-n)return!1;return!0}function o(e,t,n){var r=e.length+t.length;const i=[];let o=0,a=0;for(let s=0;s<r;s++)-1===n.indexOf(s)?i.push(e[o++]):i.push(t[a++]);return i}function a(e,t){const n=[];var r=e.length;for(let i=0;i<r;i++)-1===t.indexOf(i)&&n.push(e[i]);return[n,t.map(t=>e[t])]}function s(e,t){return o(e,t.map(e=>1),t)}function u(e,t,n){r.b(i(t,n),()=>e+" supports only inner-most axes for now. "+`Got axes ${t} and rank-${n} input.`)}function c(e,t){if(i(e,t))return null;const n=[];for(let r=0;r<t;++r)-1===e.indexOf(r)&&n.push(r);return e.forEach(e=>n.push(e)),n}function l(e){return e.map((e,t)=>[t,e]).sort((e,t)=>e[1]-t[1]).map(e=>e[0])}function h(e,t){const n=[];for(let r=t-e;r<t;++r)n.push(r);return n}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({exp_:
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){return e=Object(o.a)(e,"x","exp"),r.a.runKernel(i.cb,{x:e})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"e",(function(){return i})),n.d(t,"d",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"b",(function(){return s}));
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
class r{constructor(){this.saveRouters=[],this.loadRouters=[]}static getInstance(){return null==r.instance&&(r.instance=new r),r.instance}static registerSaveRouter(e){r.getInstance().saveRouters.push(e)}static registerLoadRouter(e){r.getInstance().loadRouters.push(e)}static getSaveHandlers(e){return r.getHandlers(e,"save")}static getLoadHandlers(e,t){return r.getHandlers(e,"load",t)}static getHandlers(e,t,n){const i=[];return("load"===t?r.getInstance().loadRouters:r.getInstance().saveRouters).forEach(t=>{null!==(t=t(e,n))&&i.push(t)}),i}}const i=e=>r.registerSaveRouter(e),o=e=>r.registerLoadRouter(e),a=e=>r.getSaveHandlers(e),s=(e,t)=>r.getLoadHandlers(e,t)},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(6),i=n(4),o=n(28),a=n(3),s=n(20);t=n(5);const u=Object(t.b)({greater_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t){return e=Object(a.a)(e,"a","greater","string_or_numeric"),t=Object(a.a)(t,"b","greater","string_or_numeric"),[e,t]=Object(o.makeTypesMatch)(e,t),Object(s.assertAndGetBroadcastShape)(e.shape,t.shape),e={a:e,b:t},r.a.runKernel(i.qb,e)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(6),i=n(33),o=n(4),a=n(3),s=n(10),u=n(61),c=n(109),l=n(35),h=(t=n(5),n(98));const f=Object(t.b)({transpose_:
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t,n){const f=Object(a.a)(e,"x","transpose");if(null==t&&(t=f.shape.map((e,t)=>t).reverse()),s.b(f.rank===t.length,()=>`Error in transpose: rank of input ${f.rank} must match length of perm ${t}.`),t.forEach(e=>{s.b(0<=e&&e<f.rank,()=>"All entries in 'perm' must be between 0 and "+(f.rank-1)+" but got "+t)}),f.rank<=1)return f.clone();e={x:f};const d={perm:t};return"complex64"===f.dtype?Object(i.t)(()=>{var e=Object(h.a)(f);let t=Object(c.a)(f);return e=r.a.runKernel(o.md,{x:e},d),t=r.a.runKernel(o.md,{x:t},d),n&&(t=Object(l.a)(t)),Object(u.a)(e,t)}):r.a.runKernel(o.md,e,d)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({abs_:
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){return"complex64"===(e=Object(o.a)(e,"x","abs")).dtype?r.a.runKernel(i.B,{x:e}):r.a.runKernel(i.a,{x:e})}})},function(e,t,n){"use strict";n.d(t,"c",(function(){return p})),n.d(t,"b",(function(){return m})),n.d(t,"a",(function(){return g})),n.d(t,"d",(function(){return A}));var r=n(20),i=n(137),o=n(139),a=n(11),s=n(146),u=n(90),c=n(147),l=n(9),h=n(80),f=n(91),d=n(21);
/**
 * @license
 * Copyright 2019 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function p(e,t,n){if(null==n||"linear"===n)return e;if("relu"===n)return Object(a.a)(e,Object(f.a)(t));throw new Error(`Cannot compute gradient for fused activation ${n}.`)}function m(e,t){let n=t;return 0<(t=r.getReductionAxes(e.shape,t.shape)).length&&(n=Object(d.a)(n,t)),Object(l.a)(n,e.shape)}function g(e,t,n,r){if("linear"===t)return e;if("relu"===t)return Object(u.a)(e);if("elu"===t)return Object(i.a)(e);if("relu6"===t)return Object(c.a)(e);if("prelu"===t)return Object(s.a)(e,n);if("leakyrelu"===t)return Object(o.a)(e,r);if("sigmoid"===t)return Object(h.a)(e);throw new Error(`Unknown fused activation ${t}.`)}const A=(e,t)=>!(0<e)||"linear"===t},function(e,t,n){"use strict";var r,i=n(0),o=n(73),a=n(83);function s(e){return e instanceof i.zd?{value:e.clone(),recurse:!1}:Object(a.e)(e)?{value:null,recurse:!0}:{value:e,recurse:!1}}
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * =============================================================================
 */class u{constructor(e){if(this.capacity=e,this.begin=0,this.end=0,null==e)throw new RangeError("Can't create a ring buffer of unknown capacity.");if(e<1)throw new RangeError("Can't create ring buffer of capacity < 1.");this.data=new Array(e),this.doubledCapacity=2*e}wrap(e){for(;e<0;)e+=this.doubledCapacity;return e%this.doubledCapacity}get(e){if(e<0)throw new RangeError("Can't get item at a negative index.");return this.data[e%this.capacity]}set(e,t){if(e<0)throw new RangeError("Can't set item at a negative index.");this.data[e%this.capacity]=t}length(){let e=this.end-this.begin;return e<0?this.doubledCapacity+e:e}isFull(){return this.length()===this.capacity}isEmpty(){return 0===this.length()}push(e){if(this.isFull())throw new RangeError("Ring buffer is full.");this.set(this.end,e),this.end=this.wrap(this.end+1)}pushAll(e){for(const t of e)this.push(t)}pop(){if(this.isEmpty())throw new RangeError("Ring buffer is empty.");this.end=this.wrap(this.end-1);var e=this.get(this.end);return this.set(this.end,void 0),e}unshift(e){if(this.isFull())throw new RangeError("Ring buffer is full.");this.begin=this.wrap(this.begin-1),this.set(this.begin,e)}shift(){if(this.isEmpty())throw new RangeError("Ring buffer is empty.");var e=this.get(this.begin);return this.set(this.begin,void 0),this.begin=this.wrap(this.begin+1),e}shuffleExcise(e){if(this.isEmpty())throw new RangeError("Ring buffer is empty.");e=this.wrap(this.begin+e);var t=this.get(e);return this.set(e,this.pop()),t
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * =============================================================================
 */}}class c extends u{constructor(){super(c.INITIAL_CAPACITY)}isFull(){return!1}push(e){super.isFull()&&this.expand(),super.push(e)}unshift(e){super.isFull()&&this.expand(),super.unshift(e)}expand(){var e=2*this.capacity;const t=new Array(e);var n=this.length();for(let e=0;e<n;e++)t[e]=this.get(this.wrap(this.begin+e));this.data=t,this.capacity=e,this.doubledCapacity=2*this.capacity,this.begin=0,this.end=n}}
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * =============================================================================
 */function l(e){return new m(e)}function h(e){return new g(e)}function f(e,t){return new _(e,t)}function d(e,t=r.FAIL){return new O(e,t)}c.INITIAL_CAPACITY=32,n.d(t,"f",(function(){return l})),n.d(t,"e",(function(){return h})),n.d(t,"d",(function(){return f})),n.d(t,"g",(function(){return d})),n.d(t,"a",(function(){return p})),n.d(t,"b",(function(){return E})),n.d(t,"c",(function(){return r}));class p{async toArray(){const e=[];let t=await this.next();for(;!t.done;)e.push(t.value),t=await this.next();return e}async toArrayForTest(){const e=this.prefetch(100),t=[];let n=await e.next();for(;!n.done;)t.push(n.value),n=await e.next();return t}async resolveFully(){let e=await this.next();for(;!e.done;)e=await this.next()}async resolveWhile(e){let t=await this.next(),n=e(t.value);for(;!t.done&&n;)t=await this.next(),n=e(t.value)}handleErrors(e){return new C(this,e)}filter(e){return new w(this,e)}map(e){return new x(this,e)}mapAsync(e){return new k(this,e)}serialMapAsync(e){return new k(this,e).serial()}flatmap(e){return new S(this,e)}async forEachAsync(e){return this.map(e).resolveFully()}async serialForEach(e){return this.serialMapAsync(e).resolveWhile(e=>!0===e)}rowMajorBatch(e,t=!0){return new y(this,e,t)}columnMajorBatch(e,t=!0,n=a.f){return this.rowMajorBatch(e,t).map(e=>Object(a.d)(e,n))}concatenate(e,t){return new _(l([this,e]),t)}take(e){return e<0||null==e?this:new b(this,e)}skip(e){return e<0||null==e?this:new v(this,e)}prefetch(e){return new T(this,e)}shuffle(e,t){return new D(this,e,t)}serial(){return new A(this)}}class m extends p{constructor(e){super(),this.items=e,this.trav=0}summary(){return`Array of ${this.items.length} items`}async next(){var e;return this.trav>=this.items.length?{value:null,done:!0}:(e=this.items[this.trav],this.trav++,{value:(e=e,Object(a.b)(e,s)),done:!1})}}class g extends p{constructor(e){super(),this.nextFn=e}summary(){return"Function call"}async next(){try{return this.nextFn()}catch(e){throw e.message="Error thrown while iterating through a dataset: "+e.message,e}}}class A extends p{constructor(e){super(),this.upstream=e,this.lastRead=Promise.resolve({value:null,done:!1})}summary(){return this.upstream.summary()+" -> Serial"}async next(){return this.lastRead=this.lastRead.then(()=>this.serialNext()),this.lastRead}async serialNext(){return this.upstream.next()}}class v extends p{constructor(e,t){super(),this.upstream=e,this.maxCount=t,this.count=0,this.lastRead=Promise.resolve({value:null,done:!1})}summary(){return this.upstream.summary()+" -> Skip"}async next(){return this.lastRead=this.lastRead.then(()=>this.serialNext()),this.lastRead}async serialNext(){for(;this.count++<this.maxCount;){var e=await this.upstream.next();if(e.done)return e;i.Ve(e.value)}return this.upstream.next()}}class b extends p{constructor(e,t){super(),this.upstream=e,this.maxCount=t,this.count=0}summary(){return this.upstream.summary()+" -> Take"}async next(){return this.count++>=this.maxCount?{value:null,done:!0}:this.upstream.next()}}class y extends p{constructor(e,t,n=!0){super(),this.upstream=e,this.batchSize=t,this.enableSmallLastBatch=n,this.lastRead=Promise.resolve({value:null,done:!1})}summary(){return this.upstream.summary()+" -> RowMajorBatch"}async next(){return this.lastRead=this.lastRead.then(()=>this.serialNext()),this.lastRead}async serialNext(){const e=[];for(;e.length<this.batchSize;){var t=await this.upstream.next();if(t.done)return this.enableSmallLastBatch&&0<e.length?{value:e,done:!1}:{value:null,done:!0};e.push(t.value)}return{value:e,done:!1}}}class w extends p{constructor(e,t){super(),this.upstream=e,this.predicate=t,this.lastRead=Promise.resolve({value:null,done:!1})}summary(){return this.upstream.summary()+" -> Filter"}async next(){return this.lastRead=this.lastRead.then(()=>this.serialNext()),this.lastRead}async serialNext(){for(;;){var e=await this.upstream.next();if(e.done||this.predicate(e.value))return e;i.Ve(e.value)}}}class x extends p{constructor(e,t){super(),this.upstream=e,this.transform=t}summary(){return this.upstream.summary()+" -> Map"}async next(){if((t=await this.upstream.next()).done)return{value:null,done:!0};var e=i.ti.getTensorsInContainer(t.value),t=this.transform(t.value),n=i.ti.getTensorsInContainer(t);for(const t of e)i.ti.isTensorInList(t,n)||t.dispose();return{value:t,done:!1}}}class C extends p{constructor(e,t){super(),this.upstream=e,this.handler=t,this.count=0,this.lastRead=Promise.resolve({value:null,done:!1})}summary(){return this.upstream.summary()+" -> handleErrors"}async next(){return this.lastRead=this.lastRead.then(()=>this.serialNext()),this.lastRead}async serialNext(){for(;;)try{return await this.upstream.next()}catch(e){if(!this.handler(e))return{value:null,done:!0}}}}class k extends p{constructor(e,t){super(),this.upstream=e,this.transform=t}summary(){return this.upstream.summary()+" -> AsyncMap"}async next(){if((t=await this.upstream.next()).done)return{value:null,done:!0};var e=i.ti.getTensorsInContainer(t.value),t=await this.transform(t.value),n=i.ti.getTensorsInContainer(t);for(const t of e)i.ti.isTensorInList(t,n)||t.dispose();return{value:t,done:!1}}}class E extends p{constructor(){super(),this.outputQueue=new c,this.lastRead=Promise.resolve({value:null,done:!1})}async next(){return this.lastRead=this.lastRead.then(()=>this.serialNext()),this.lastRead}async serialNext(){for(;0===this.outputQueue.length();)if(!await this.pump())return{value:null,done:!0};return{value:this.outputQueue.shift(),done:!1}}}class S extends E{constructor(e,t){super(),this.upstream=e,this.transform=t}summary(){return this.upstream.summary()+" -> Flatmap"}async pump(){if((t=await this.upstream.next()).done)return!1;var e=i.ti.getTensorsInContainer(t.value),t=this.transform(t.value),n=i.ti.getTensorsInContainer(t);this.outputQueue.pushAll(t);for(const t of e)i.ti.isTensorInList(t,n)||t.dispose();return!0}}class _ extends p{constructor(e,t){super(),this.baseErrorHandler=t,this.lastRead=null,this.iterator=null,this.moreIterators=e}summary(){return"TODO: fill in upstream of chained summaries -> Chained"}async next(){return this.lastRead=this.readFromChain(this.lastRead),this.lastRead}async readFromChain(e){if(await e,null==this.iterator){var t=await this.moreIterators.next();if(t.done)return{value:null,done:!0};this.iterator=t.value,null!=this.baseErrorHandler&&(this.iterator=this.iterator.handleErrors(this.baseErrorHandler))}return(t=await this.iterator.next()).done?(this.iterator=null,this.readFromChain(e)):t}}(n=r=r||{})[n.FAIL=0]="FAIL",n[n.SHORTEST=1]="SHORTEST",n[n.LONGEST=2]="LONGEST";class O extends p{constructor(e,t=r.FAIL){super(),this.iterators=e,this.mismatchMode=t,this.count=0,this.currentPromise=null}summary(){return"{TODO: fill in upstream of zip summaries} -> Zip"}async nextState(e){await e;let t=0,n=0;if(e=await Object(a.c)(this.iterators,(function(e){if(e instanceof p){return{value:e.next().then(e=>(t++,e.done&&n++,e.value)),recurse:!1}}return{value:null,recurse:!0}})),t===n)return{value:null,done:!0};if(0<n)switch(this.mismatchMode){case r.FAIL:throw new Error(`Zipped streams should have the same length. Mismatched at element ${this.count}.`);case r.SHORTEST:return{value:null,done:!0};case r.LONGEST:}return this.count++,{value:e,done:!1}}async next(){return this.currentPromise=this.nextState(this.currentPromise),this.currentPromise}}class T extends p{constructor(e,t){super(),this.upstream=e,this.bufferSize=t,this.buffer=new u(t)}summary(){return this.upstream.summary()+" -> Prefetch"}refill(){for(;!this.buffer.isFull();){var e=this.upstream.next();this.buffer.push(e)}}next(){return this.refill(),this.buffer.shift()}}class D extends T{constructor(e,t,n){super(e,t),this.upstream=e,this.windowSize=t,this.upstreamExhausted=!1,this.random=o.alea(n||i.Ji.now().toString()),this.lastRead=Promise.resolve({value:null,done:!1})}async next(){return this.lastRead=this.lastRead.then(()=>this.serialNext()),this.lastRead}randomInt(e){return Math.floor(this.random()*e)}chooseIndex(){return this.randomInt(this.buffer.length())}async serialNext(){for(this.upstreamExhausted||this.refill();!this.buffer.isEmpty();){var e=this.chooseIndex();if(!(e=await this.buffer.shuffleExcise(e)).done)return this.refill(),e;this.upstreamExhausted=!0}return{value:null,done:!0}}}},function(e,t,n){var r;
/**
 * @license Complex.js v2.1.1 12/05/2020
 *
 * Copyright (c) 2020, Robert Eisele (robert@xarg.org)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 **/!function(){"use strict";var n=Math.cosh||function(e){return Math.abs(e)<1e-9?1-e:.5*(Math.exp(e)+Math.exp(-e))},i=Math.sinh||function(e){return Math.abs(e)<1e-9?e:.5*(Math.exp(e)-Math.exp(-e))},o=function(){throw SyntaxError("Invalid Param")};function a(e,t){var n=Math.abs(e),r=Math.abs(t);return 0===e?Math.log(r):0===t?Math.log(n):n<3e3&&r<3e3?.5*Math.log(e*e+t*t):(e/=2,t/=2,.5*Math.log(e*e+t*t)+Math.LN2)}function s(e,t){if(!(this instanceof s))return new s(e,t);e=function(e,t){var n={re:0,im:0};if(null==e)n.re=n.im=0;else if(void 0!==t)n.re=e,n.im=t;else switch(typeof e){case"object":if("im"in e&&"re"in e)n.re=e.re,n.im=e.im;else if("abs"in e&&"arg"in e){if(!Number.isFinite(e.abs)&&Number.isFinite(e.arg))return s.INFINITY;n.re=e.abs*Math.cos(e.arg),n.im=e.abs*Math.sin(e.arg)}else if("r"in e&&"phi"in e){if(!Number.isFinite(e.r)&&Number.isFinite(e.phi))return s.INFINITY;n.re=e.r*Math.cos(e.phi),n.im=e.r*Math.sin(e.phi)}else 2===e.length?(n.re=e[0],n.im=e[1]):o();break;case"string":n.im=n.re=0;var r=e.match(/\d+\.?\d*e[+-]?\d+|\d+\.?\d*|\.\d+|./g),i=1,a=0;null===r&&o();for(var u=0;u<r.length;u++){var c=r[u];" "!==c&&"\t"!==c&&"\n"!==c&&("+"===c?i++:"-"===c?a++:("i"===c||"I"===c?(i+a===0&&o()," "===r[u+1]||isNaN(r[u+1])?n.im+=parseFloat((a%2?"-":"")+"1"):(n.im+=parseFloat((a%2?"-":"")+r[u+1]),u++)):(i+a!==0&&!isNaN(c)||o(),"i"===r[u+1]||"I"===r[u+1]?(n.im+=parseFloat((a%2?"-":"")+c),u++):n.re+=parseFloat((a%2?"-":"")+c)),i=a=0))}0<i+a&&o();break;case"number":n.im=0,n.re=e;break;default:o()}return isNaN(n.re)||isNaN(n.im),n}(e,t),this.re=e.re,this.im=e.im}s.prototype={re:0,im:0,sign:function(){var e=this.abs();return new s(this.re/e,this.im/e)},add:function(e,t){return e=new s(e,t),this.isInfinite()&&e.isInfinite()?s.NAN:this.isInfinite()||e.isInfinite()?s.INFINITY:new s(this.re+e.re,this.im+e.im)},sub:function(e,t){return e=new s(e,t),this.isInfinite()&&e.isInfinite()?s.NAN:this.isInfinite()||e.isInfinite()?s.INFINITY:new s(this.re-e.re,this.im-e.im)},mul:function(e,t){return e=new s(e,t),this.isInfinite()&&e.isZero()||this.isZero()&&e.isInfinite()?s.NAN:this.isInfinite()||e.isInfinite()?s.INFINITY:0===e.im&&0===this.im?new s(this.re*e.re,0):new s(this.re*e.re-this.im*e.im,this.re*e.im+this.im*e.re)},div:function(e,t){var n=new s(e,t);if(this.isZero()&&n.isZero()||this.isInfinite()&&n.isInfinite())return s.NAN;if(this.isInfinite()||n.isZero())return s.INFINITY;if(this.isZero()||n.isInfinite())return s.ZERO;e=this.re,t=this.im;var r,i,o=n.re;return 0===(n=n.im)?new s(e/o,t/o):Math.abs(o)<Math.abs(n)?new s((e*(i=o/n)+t)/(r=o*i+n),(t*i-e)/r):new s((e+t*(i=n/o))/(r=n*i+o),(t-e*i)/r)},pow:function(e,t){var n,r,i=new s(e,t);if(e=this.re,t=this.im,i.isZero())return s.ONE;if(0===i.im){if(0===t&&0<e)return new s(Math.pow(e,i.re),0);if(0===e)switch((i.re%4+4)%4){case 0:return new s(Math.pow(t,i.re),0);case 1:return new s(0,Math.pow(t,i.re));case 2:return new s(-Math.pow(t,i.re),0);case 3:return new s(0,-Math.pow(t,i.re))}}return 0===e&&0===t&&0<i.re&&0<=i.im?s.ZERO:(n=Math.atan2(t,e),r=a(e,t),e=Math.exp(i.re*r-i.im*n),t=i.im*r+i.re*n,new s(e*Math.cos(t),e*Math.sin(t)))},sqrt:function(){var e,t=this.re,n=this.im,r=this.abs();if(0<=t){if(0===n)return new s(Math.sqrt(t),0);e=.5*Math.sqrt(2*(r+t))}else e=Math.abs(n)/Math.sqrt(2*(r-t));return r=t<=0?.5*Math.sqrt(2*(r-t)):Math.abs(n)/Math.sqrt(2*(r+t)),new s(e,n<0?-r:r)},exp:function(){var e=Math.exp(this.re);return this.im,new s(e*Math.cos(this.im),e*Math.sin(this.im))},expm1:function(){var e,t,n=this.re,r=this.im;return new s(Math.expm1(n)*Math.cos(r)+((e=r)<-(t=Math.PI/4)||t<e?Math.cos(e)-1:(t=e*e)*(t*(t*(t*(t*(t*(t*(t/20922789888e3-1/87178291200)+1/479001600)-1/3628800)+1/40320)-1/720)+1/24)-.5)),Math.exp(n)*Math.sin(r))},log:function(){var e=this.re,t=this.im;return new s(a(e,t),Math.atan2(t,e))},abs:function(){return e=this.re,t=this.im,n=Math.abs(e),r=Math.abs(t),n<3e3&&r<3e3?Math.sqrt(n*n+r*r):(r=n<r?(n=r,e/t):t/e,n*Math.sqrt(1+r*r));var e,t,n,r},arg:function(){return Math.atan2(this.im,this.re)},sin:function(){var e=this.re,t=this.im;return new s(Math.sin(e)*n(t),Math.cos(e)*i(t))},cos:function(){var e=this.re,t=this.im;return new s(Math.cos(e)*n(t),-Math.sin(e)*i(t))},tan:function(){var e=2*this.re,t=2*this.im,r=Math.cos(e)+n(t);return new s(Math.sin(e)/r,i(t)/r)},cot:function(){var e=2*this.re,t=2*this.im,r=Math.cos(e)-n(t);return new s(-Math.sin(e)/r,i(t)/r)},sec:function(){var e=this.re,t=this.im,r=.5*n(2*t)+.5*Math.cos(2*e);return new s(Math.cos(e)*n(t)/r,Math.sin(e)*i(t)/r)},csc:function(){var e=this.re,t=this.im,r=.5*n(2*t)-.5*Math.cos(2*e);return new s(Math.sin(e)*n(t)/r,-Math.cos(e)*i(t)/r)},asin:function(){var e=this.re,t=new s((n=this.im)*n-e*e+1,-2*e*n).sqrt(),n=new s(t.re-n,t.im+e).log();return new s(n.im,-n.re)},acos:function(){var e=this.re,t=new s((n=this.im)*n-e*e+1,-2*e*n).sqrt(),n=new s(t.re-n,t.im+e).log();return new s(Math.PI/2-n.im,n.re)},atan:function(){var e=this.re,t=this.im;if(0===e){if(1===t)return new s(0,1/0);if(-1===t)return new s(0,-1/0)}var n=e*e+(1-t)*(1-t);t=new s((1-t*t-e*e)/n,-2*e/n).log();return new s(-.5*t.im,.5*t.re)},acot:function(){var e,t=this.re,n=this.im;return 0===n?new s(Math.atan2(1,t),0):(0!=(e=t*t+n*n)?new s(t/e,-n/e):new s(0!==t?t/0:0,0!==n?-n/0:0)).atan()},asec:function(){var e,t=this.re,n=this.im;return 0===t&&0===n?new s(0,1/0):(0!=(e=t*t+n*n)?new s(t/e,-n/e):new s(0!==t?t/0:0,0!==n?-n/0:0)).acos()},acsc:function(){var e,t=this.re,n=this.im;return 0===t&&0===n?new s(Math.PI/2,1/0):(0!=(e=t*t+n*n)?new s(t/e,-n/e):new s(0!==t?t/0:0,0!==n?-n/0:0)).asin()},sinh:function(){var e=this.re,t=this.im;return new s(i(e)*Math.cos(t),n(e)*Math.sin(t))},cosh:function(){var e=this.re,t=this.im;return new s(n(e)*Math.cos(t),i(e)*Math.sin(t))},tanh:function(){var e=2*this.re,t=2*this.im,r=n(e)+Math.cos(t);return new s(i(e)/r,Math.sin(t)/r)},coth:function(){var e=2*this.re,t=2*this.im,r=n(e)-Math.cos(t);return new s(i(e)/r,-Math.sin(t)/r)},csch:function(){var e=this.re,t=this.im,r=Math.cos(2*t)-n(2*e);return new s(-2*i(e)*Math.cos(t)/r,2*n(e)*Math.sin(t)/r)},sech:function(){var e=this.re,t=this.im,r=Math.cos(2*t)+n(2*e);return new s(2*n(e)*Math.cos(t)/r,-2*i(e)*Math.sin(t)/r)},asinh:function(){var e=this.im,t=(this.im=-this.re,this.re=e,this.asin());return this.re=-this.im,this.im=e,e=t.re,t.re=-t.im,t.im=e,t},acosh:function(){var e,t=this.acos();return t.im<=0?(e=t.re,t.re=-t.im,t.im=e):(e=t.im,t.im=-t.re,t.re=e),t},atanh:function(){var e,t=this.re,n=this.im,r=1<t&&0===n,i=1+t,o=(e=1-t)*e+n*n;i=(e=0!=o?new s((i*e-n*n)/o,(n*e+i*n)/o):new s(-1!==t?t/0:0,0!==n?n/0:0)).re;return e.re=a(e.re,e.im)/2,e.im=Math.atan2(e.im,i)/2,r&&(e.im=-e.im),e},acoth:function(){var e,t=this.re,n=this.im;return 0===t&&0===n?new s(0,Math.PI/2):(0!=(e=t*t+n*n)?new s(t/e,-n/e):new s(0!==t?t/0:0,0!==n?-n/0:0)).atanh()},acsch:function(){var e,t=this.re,n=this.im;return 0===n?new s(0!==t?Math.log(t+Math.sqrt(t*t+1)):1/0,0):(0!=(e=t*t+n*n)?new s(t/e,-n/e):new s(0!==t?t/0:0,0!==n?-n/0:0)).asinh()},asech:function(){var e,t=this.re,n=this.im;return this.isZero()?s.INFINITY:(0!=(e=t*t+n*n)?new s(t/e,-n/e):new s(0!==t?t/0:0,0!==n?-n/0:0)).acosh()},inverse:function(){var e,t;return this.isZero()?s.INFINITY:this.isInfinite()?s.ZERO:new s((e=this.re)/(t=e*e+(e=this.im)*e),-e/t)},conjugate:function(){return new s(this.re,-this.im)},neg:function(){return new s(-this.re,-this.im)},ceil:function(e){return e=Math.pow(10,e||0),new s(Math.ceil(this.re*e)/e,Math.ceil(this.im*e)/e)},floor:function(e){return e=Math.pow(10,e||0),new s(Math.floor(this.re*e)/e,Math.floor(this.im*e)/e)},round:function(e){return e=Math.pow(10,e||0),new s(Math.round(this.re*e)/e,Math.round(this.im*e)/e)},equals:function(e,t){return e=new s(e,t),Math.abs(e.re-this.re)<=s.EPSILON&&Math.abs(e.im-this.im)<=s.EPSILON},clone:function(){return new s(this.re,this.im)},toString:function(){var e=this.re,t=this.im,n="";return this.isNaN()?"NaN":this.isInfinite()?"Infinity":(Math.abs(e)<s.EPSILON&&(e=0),0===(t=Math.abs(t)<s.EPSILON?0:t)?n+e:(0!==e?(n=n+e+" ",t<0?(t=-t,n+="-"):n+="+",n+=" "):t<0&&(t=-t,n+="-"),1!==t&&(n+=t),n+"i"))},toVector:function(){return[this.re,this.im]},valueOf:function(){return 0===this.im?this.re:null},isNaN:function(){return isNaN(this.re)||isNaN(this.im)},isZero:function(){return 0===this.im&&0===this.re},isFinite:function(){return isFinite(this.re)&&isFinite(this.im)},isInfinite:function(){return!(this.isNaN()||this.isFinite())}},s.ZERO=new s(0,0),s.ONE=new s(1,0),s.I=new s(0,1),s.PI=new s(Math.PI,0),s.E=new s(Math.E,0),s.INFINITY=new s(1/0,1/0),s.NAN=new s(NaN,NaN),s.EPSILON=1e-15,void 0!==(r=function(){return s}.apply(t,[]))&&(e.exports=r)}()},function(e,t,n){var r,i,o,a,s,u,c,l,h,f,d,p;e.exports=(e=n(39),n(118),void(e.lib.Cipher||(n=(e=e).lib,r=n.Base,i=n.WordArray,o=n.BufferedBlockAlgorithm,(h=e.enc).Utf8,a=h.Base64,s=e.algo.EvpKDF,u=n.Cipher=o.extend({cfg:r.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,n){this.cfg=this.cfg.extend(n),this._xformMode=e,this._key=t,this.reset()},reset:function(){o.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function e(e){return"string"==typeof e?p:f}return function(t){return{encrypt:function(n,r,i){return e(r).encrypt(t,n,r,i)},decrypt:function(n,r,i){return e(r).decrypt(t,n,r,i)}}}}()}),n.StreamCipher=u.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),h=e.mode={},c=n.BlockCipherMode=r.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),h=h.CBC=function(){var e=c.extend();function t(e,t,n){var r,i=this._iv;i?(r=i,this._iv=void 0):r=this._prevBlock;for(var o=0;o<n;o++)e[t+o]^=r[o]}return e.Encryptor=e.extend({processBlock:function(e,n){var r=this._cipher,i=r.blockSize;t.call(this,e,n,i),r.encryptBlock(e,n),this._prevBlock=e.slice(n,n+i)}}),e.Decryptor=e.extend({processBlock:function(e,n){var r=this._cipher,i=r.blockSize,o=e.slice(n,n+i);r.decryptBlock(e,n),t.call(this,e,n,i),this._prevBlock=o}}),e}(),d=(e.pad={}).Pkcs7={pad:function(e,t){for(var n=(t=4*t)-e.sigBytes%t,r=n<<24|n<<16|n<<8|n,o=[],a=0;a<n;a+=4)o.push(r);t=i.create(o,n),e.concat(t)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},n.BlockCipher=u.extend({cfg:u.cfg.extend({mode:h,padding:d}),reset:function(){u.reset.call(this);var e,t=(n=this.cfg).iv,n=n.mode;this._xformMode==this._ENC_XFORM_MODE?e=n.createEncryptor:(e=n.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,t&&t.words):(this._mode=e.call(n,this,t&&t.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4}),l=n.CipherParams=r.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),h=(e.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext;return(e=(e=e.salt)?i.create([1398893684,1701076831]).concat(e).concat(t):t).toString(a)},parse:function(e){var t,n=(e=a.parse(e)).words;return 1398893684==n[0]&&1701076831==n[1]&&(t=i.create(n.slice(2,4)),n.splice(0,4),e.sigBytes-=16),l.create({ciphertext:e,salt:t})}},f=n.SerializableCipher=r.extend({cfg:r.extend({format:h}),encrypt:function(e,t,n,r){r=this.cfg.extend(r);t=(i=e.createEncryptor(n,r)).finalize(t);var i=i.cfg;return l.create({ciphertext:t,key:n,iv:i.iv,algorithm:e,mode:i.mode,padding:i.padding,blockSize:e.blockSize,formatter:r.format})},decrypt:function(e,t,n,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),e.createDecryptor(n,r).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),d=(e.kdf={}).OpenSSL={execute:function(e,t,n,r){return r=r||i.random(8),e=s.create({keySize:t+n}).compute(e,r),n=i.create(e.words.slice(t),4*n),e.sigBytes=4*t,l.create({key:e,iv:n,salt:r})}},p=n.PasswordBasedCipher=f.extend({cfg:f.cfg.extend({kdf:d}),encrypt:function(e,t,n,r){return n=(r=this.cfg.extend(r)).kdf.execute(n,e.keySize,e.ivSize),r.iv=n.iv,(e=f.encrypt.call(this,e,t,n.key,r)).mixIn(n),e},decrypt:function(e,t,n,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),n=r.kdf.execute(n,e.keySize,e.ivSize,t.salt),r.iv=n.iv,f.decrypt.call(this,e,t,n.key,r)}}))))},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(7),i=n(10);
/**
 * @license
 * Copyright 2020 Google Inc. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function o(e,t="float32",n){return t=t||"float32",i.c(e),new r.b(e,t,n)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({reverse_:
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t){return e=Object(o.a)(e,"x","reverse"),r.a.runKernel(i.Bc,{x:e},{dims:t})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(10),o=n(12);
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function a(e,t,n,a){if("complex64"===(a=null==a?Object(i.r)(e):a))throw new Error("Cannot construct a complex64 tensor directly. Please use tf.complex(real, imag).");if("object"==typeof e&&"texture"in e){if("float32"!==a&&"int32"!==a)throw new Error(`Creating tensor from texture only supports 'float32'|'int32' dtype, while the dtype is ${a}.`);return e.channels=e.channels||"RGBA",r.a.backend.createTensorFromTexture(e,t||n,a)}if(!Object(i.A)(e)&&!Array.isArray(e)&&"number"!=typeof e&&"boolean"!=typeof e&&"string"!=typeof e)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(null!=t){Object(i.c)(t);const e=Object(i.O)(t),r=Object(i.O)(n);Object(i.b)(e===r,()=>`Based on the provided shape, [${t}], the tensor should have `+e+" values but has "+r);for(let e=0;e<n.length;++e){var s=n[e];s=e!==n.length-1||s!==Object(i.O)(t.slice(e));Object(i.b)(n[e]===t[e]||!s,()=>`Error creating a new Tensor. Inferred shape (${n}) does not match the provided shape (${t}). `)}}return Object(i.A)(e)||Array.isArray(e)||(e=[e]),t=t||n,e="string"!==a?Object(o.toTypedArray)(e,a):Object(i.m)(e,[],!0),r.a.makeTensor(e,t,a)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(6),i=n(4),o=n(3),a=n(10);t=n(5);const s=Object(t.b)({complex_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t){return e=Object(o.a)(e,"real","complex"),t=Object(o.a)(t,"imag","complex"),a.e(e.shape,t.shape,`real and imag shapes, ${e.shape} and ${t.shape}, must match in call to tf.complex().`),e={real:e,imag:t},r.a.runKernel(i.A,e)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(6),i=n(4),o=n(28),a=n(3);t=n(5);const s=Object(t.b)({pow_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t){return e=Object(a.a)(e,"base","pow"),t=Object(a.a)(t,"exp","pow"),[e,t]=Object(o.makeTypesMatch)(e,t),e={a:e,b:t},r.a.runKernel(i.kc,e)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(6),i=n(10),o=n(61),a=n(89);
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function s(e,t="float32"){var n,u;return Object(i.c)(e),"complex64"===t?(u=s(e,"float32"),n=Object(a.a)(e,"float32"),Object(o.a)(u,n)):(u=Object(i.D)(Object(i.O)(e),t),r.a.makeTensor(u,e,t))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(6),i=n(4),o=n(28),a=n(3),s=n(20);t=n(5);const u=Object(t.b)({lessEqual_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t){return e=Object(a.a)(e,"a","lessEqual","string_or_numeric"),t=Object(a.a)(t,"b","lessEqual","string_or_numeric"),[e,t]=Object(o.makeTypesMatch)(e,t),Object(s.assertAndGetBroadcastShape)(e.shape,t.shape),e={a:e,b:t},r.a.runKernel(i.Cb,e)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({pad_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t,n=0){if(0===(e=Object(o.a)(e,"x","pad")).rank)throw new Error("pad(scalar) is not defined. Pass non-scalar to pad");return r.a.runKernel(i.ic,{x:e},{paddings:t,constantValue:n})}})},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return S})),n.d(t,"i",(function(){return O})),n.d(t,"c",(function(){return T})),n.d(t,"f",(function(){return D})),n.d(t,"e",(function(){return M})),n.d(t,"d",(function(){return j})),n.d(t,"k",(function(){return F})),n.d(t,"g",(function(){return R})),n.d(t,"h",(function(){return P})),n.d(t,"j",(function(){return L})),n.d(t,"b",(function(){return U}));var r=n(0),i=n(86),o=n(119),a=n(2),s=n(283),u=n(284),c=n(285),l=n(286),h=n(287),f=n(288),d=n(289),p=n(290),m=n(291),g=n(292),A=n(293),v=n(294),b=n(295),y=n(296),w=n(297),x=n(298),C=n(299),k=n(300),E=n(301);
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */class S{constructor(){const e=[].concat(...[s,u,c,l,h,f,d,p,m,g,A,v,b,y,w,x,C,k,E].map(e=>e.json));this.opMappers=e.reduce((e,t)=>(e[t.tfOpName]=t,e),{})}static get Instance(){return this._instance||(this._instance=new this)}transformGraph(e,t={}){const n=e.node,r=[],i=[],o=[],s=n.reduce((e,t)=>(e[t.name]=this.mapNode(t),t.op.startsWith("Placeholder")?r.push(e[t.name]):"Const"===t.op?i.push(e[t.name]):null!=t.input&&0!==t.input.length||o.push(e[t.name]),e),{});let u=[];const c=[];let l={},h={};null!=t&&(l=this.mapSignatureEntries(t.inputs),h=this.mapSignatureEntries(t.outputs));const f=Object.keys(s);f.forEach(e=>{const t=s[e];t.inputNames.forEach((e,n)=>{var[e,,r]=Object(a.b)(e);const i=s[e];null!=i.outputs&&-1!==(r=i.outputs.indexOf(r))&&(e=e+":"+r,t.inputNames[n]=e),t.inputs.push(i),i.children.push(t)})}),0===Object.keys(h).length?f.forEach(e=>{0===(e=s[e]).children.length&&c.push(e)}):Object.keys(h).forEach(e=>{var[t]=Object(a.b)(e);const n=s[t];null!=n&&(n.signatureKey=h[e],c.push(n))}),0<Object.keys(l).length?Object.keys(l).forEach(e=>{var[t]=Object(a.b)(e);const n=s[t];n&&(n.signatureKey=l[e],u.push(n))}):u=r;let d={};null!=e.library&&null!=e.library.function&&(d=e.library.function.reduce((e,t)=>(e[t.signature.name]=this.mapFunction(t),e),{}));const p={nodes:s,inputs:u,outputs:c,weights:i,placeholders:r,signature:t,functions:d};return 0<o.length&&(p.initNodes=o),p}mapSignatureEntries(e){return Object.keys(e||{}).reduce((t,n)=>(t[e[n].name]=n,t),{})}mapNode(e){const t=Object(o.b)(e.op)||this.opMappers[e.op]||{},n=(null==e.attr&&(e.attr={}),{name:e.name,op:e.op,category:t.category,inputNames:(e.input||[]).map(e=>e.startsWith("^")?e.slice(1):e),inputs:[],children:[],inputParams:{},attrParams:{},rawAttrs:e.attr,outputs:t.outputs});return null!=t.inputs&&(n.inputParams=t.inputs.reduce((e,t)=>(e[t.name]={type:t.type,inputIndexStart:t.start,inputIndexEnd:t.end},e),{})),null!=t.attrs&&(n.attrParams=t.attrs.reduce((t,n)=>{var r=n.type;let i=void 0;switch(n.type){case"string":void 0===(i=O(e.attr,n.tfName,n.defaultValue))&&n.tfDeprecatedName&&(i=O(e.attr,n.tfDeprecatedName,n.defaultValue));break;case"string[]":void 0===(i=P(e.attr,n.tfName,n.defaultValue))&&n.tfDeprecatedName&&(i=P(e.attr,n.tfDeprecatedName,n.defaultValue));break;case"number":void 0===(i=D(e.attr,n.tfName,n.defaultValue||0))&&n.tfDeprecatedName&&(i=D(e.attr,n.tfDeprecatedName,n.defaultValue));break;case"number[]":void 0===(i=R(e.attr,n.tfName,n.defaultValue))&&n.tfDeprecatedName&&(i=R(e.attr,n.tfDeprecatedName,n.defaultValue));break;case"bool":void 0===(i=T(e.attr,n.tfName,n.defaultValue))&&n.tfDeprecatedName&&(i=T(e.attr,n.tfDeprecatedName,n.defaultValue));break;case"bool[]":void 0===(i=U(e.attr,n.tfName,n.defaultValue))&&n.tfDeprecatedName&&(i=U(e.attr,n.tfDeprecatedName,n.defaultValue));break;case"shape":void 0===(i=F(e.attr,n.tfName,n.defaultValue))&&n.tfDeprecatedName&&(i=F(e.attr,n.tfDeprecatedName,n.defaultValue));break;case"shape[]":void 0===(i=L(e.attr,n.tfName,n.defaultValue))&&n.tfDeprecatedName&&(i=L(e.attr,n.tfDeprecatedName,n.defaultValue));break;case"dtype":void 0===(i=M(e.attr,n.tfName,n.defaultValue))&&n.tfDeprecatedName&&(i=M(e.attr,n.tfDeprecatedName,n.defaultValue));break;case"dtype[]":void 0===(i=j(e.attr,n.tfName,n.defaultValue))&&n.tfDeprecatedName&&(i=j(e.attr,n.tfDeprecatedName,n.defaultValue));break;case"func":void 0===(i=I(e.attr,n.tfName,n.defaultValue))&&n.tfDeprecatedName&&(i=I(e.attr,n.tfDeprecatedName,n.defaultValue));break;case"tensor":case"tensors":break;default:throw new Error(`Unsupported param type: ${n.type} for op: `+e.op)}return t[n.name]={value:i,type:r},t},{})),n}mapFunction(e){const t=e.nodeDef,n=[];let r={};null!=t&&(r=t.reduce((e,t)=>(e[t.name]=this.mapNode(t),"Const"===t.op&&n.push(e[t.name]),e),{}));const i=[],o=[],s=((e.signature.inputArg.forEach(e=>{var[t]=Object(a.b)(e.name);const n={name:t,op:"Placeholder",inputs:[],inputNames:[],category:"graph",inputParams:{},attrParams:{dtype:{value:B(e.type),type:"dtype"}},children:[]};n.signatureKey=e.name,i.push(n),r[t]=n}),Object.keys(r)).forEach(e=>{const t=r[e];t.inputNames.forEach((e,n)=>{var[e,,i]=Object(a.b)(e);const o=r[e];null!=o.outputs&&-1!==(i=o.outputs.indexOf(i))&&(e=e+":"+i,t.inputNames[n]=e),t.inputs.push(o),o.children.push(t)})}),e.ret);return e.signature.outputArg.forEach(e=>{var[e,t]=Object(a.b)(s[e.name]);const n=r[e];null!=n&&(n.defaultOutput=t,o.push(n))}),e=this.mapArgsToSignature(e),{nodes:r,inputs:i,outputs:o,weights:n,placeholders:[],signature:e}}mapArgsToSignature(e){return{methodName:e.signature.name,inputs:e.signature.inputArg.reduce((e,t)=>(e[t.name]=this.mapArgToTensorInfo(t),e),{}),outputs:e.signature.outputArg.reduce((t,n)=>(t[n.name]=this.mapArgToTensorInfo(n,e.ret),t),{})}}mapArgToTensorInfo(e,t){let n=e.name;return{name:n=null!=t?t[n]:n,dtype:e.type}}}function _(t,n){const i=Array.isArray(t)?String.fromCharCode.apply(null,t):function(t){const n=Object(r.hf)().global;if(void 0!==n.atob)return n.atob(t);if(void 0!==e)return new e(t,"base64").toString();throw new Error("Unable to decode base64 in this environment. Missing built-in atob() or Buffer()")}(t);return n?i:i.toLowerCase()}function O(e,t,n,r=!1){return null!=(e=e[t])?_(e.s,r):n}function T(e,t,n){return(e=e[t])?e.b:n}function D(e,t,n){return"number"==typeof(t=null!=(e=e[t]||{}).i?e.i:null!=e.f?e.f:n)?t:parseInt(t,10)}function B(e){switch(e="string"==typeof e?i.a[e]:e){case i.a.DT_FLOAT:case i.a.DT_HALF:return"float32";case i.a.DT_INT32:case i.a.DT_INT64:case i.a.DT_INT8:case i.a.DT_UINT8:return"int32";case i.a.DT_BOOL:return"bool";case i.a.DT_DOUBLE:return"float32";case i.a.DT_STRING:return"string";default:return null}}function I(e,t,n){return(e=e[t])&&e.func?e.func.name:n}function M(e,t,n){return(e=e[t])&&e.type?B(e.type):n}function j(e,t,n){const r=e[t];return r&&r.list&&r.list.type?r.list.type.map(e=>B(e)):n}function N(e){if(!e.unknownRank)return null!=e.dim?e.dim.map(e=>"number"==typeof e.size?e.size:parseInt(e.size,10)):[]}function F(e,t,n){return(e=e[t])&&e.shape?N(e.shape):n}function R(e,t,n){const r=e[t];return r?((r.list.f&&r.list.f.length?r.list.f:r.list.i)||[]).map(e=>"number"==typeof e?e:parseInt(e,10)):n}function P(e,t,n,r=!1){const i=e[t];return i&&i.list&&i.list.s?i.list.s.map(e=>_(e,r)):n}function L(e,t,n){const r=e[t];return r&&r.list&&r.list.shape?r.list.shape.map(e=>N(e)):n}function U(e,t,n){return(e=e[t])&&e.list&&e.list.b?e.list.b:n}}).call(this,n(163).Buffer)},function(e,t){var n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(6),i=n(4),o=n(3),a=n(20);t=n(5);const s=Object(t.b)({logicalAnd_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t){return e=Object(o.a)(e,"a","logicalAnd","bool"),t=Object(o.a)(t,"b","logicalAnd","bool"),Object(a.assertAndGetBroadcastShape)(e.shape,t.shape),e={a:e,b:t},r.a.runKernel(i.Hb,e)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({split_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t,n=0){return e=Object(o.a)(e,"x","split"),r.a.runKernel(i.Wc,{x:e},{numOrSizeSplits:t,axis:n})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(6),i=n(4),o=n(3),a=n(10);t=n(5);const s=Object(t.b)({stack_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t=0){return e=Object(o.b)(e,"tensors","stack","string_or_numeric"),a.b(1<=e.length,()=>"Pass at least one tensor to tf.stack"),0<e.length&&a.b(t<=e[0].rank,()=>"Axis must be <= rank of the tensor"),r.a.runKernel(i.hc,e,{axis:t})}})},function(e,t,n){"use strict";n.d(t,"c",(function(){return s})),n.d(t,"b",(function(){return u})),n.d(t,"d",(function(){return c})),n.d(t,"f",(function(){return l})),n.d(t,"e",(function(){return h})),n.d(t,"h",(function(){return f})),n.d(t,"g",(function(){return d})),n.d(t,"a",(function(){return p}));var r=n(24),i=(t=n(124),n(85));
/**
 * @license
 * Copyright 2019 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */const o=Object(t.a)("kernelRegistry",()=>new Map),a=Object(t.a)("gradRegistry",()=>new Map);function s(e,t){return t=t+"_"+e,o.get(t)}function u(e){return a.get(e)}function c(e){const t=o.entries(),n=[];for(;;){var{done:r,value:i}=t.next();if(r)break;const[o,a]=i;var[r]=o.split("_");r===e&&n.push(a)}return n}function l(e){var{kernelName:t,backendName:n}=e,r=n+"_"+t;o.has(r)&&i.b(`The kernel '${t}' for backend '${n}' is already registered`),o.set(r,e)}function h(e){var t=e.kernelName;a.has(t)&&Object(r.c)().getBool("DEBUG")&&i.b(`Overriding the gradient for '${t}'`),a.set(t,e)}function f(e,t){var n=t+"_"+e;if(!o.has(n))throw new Error(`The kernel '${e}' for backend '${t}' is not registered`);o.delete(n)}function d(e){if(!a.has(e))throw new Error(`The gradient '${e}' for backend is not registered`);a.delete(e)}function p(e,t){c(e).forEach(e=>{l(Object.assign({},e,{backendName:t}))})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(6),i=n(4),o=n(3),a=n(10);t=n(5);const s=Object(t.b)({expandDims_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t=0){return e=Object(o.a)(e,"x","expandDims","string_or_numeric"),a.b(t<=e.rank,()=>"Axis must be <= rank of the tensor"),e={input:e},r.a.runKernel(i.db,e,{dim:t})}})},function(e,t,n){var r=n(367),i=n(368),o=n(369),a=n(370),s=n(371),u=n(372);(n=n(373)).alea=r,n.xor128=i,n.xorwow=o,n.xorshift7=a,n.xor4096=s,n.tychei=u,e.exports=n},function(e,t,n){e.exports=(e=n(39),n(174),n(402),n(403),n(129),n(404),n(130),n(222),n(276),n(405),n(277),n(406),n(407),n(408),n(223),n(409),n(118),n(57),n(410),n(411),n(412),n(413),n(414),n(415),n(416),n(417),n(418),n(419),n(420),n(421),n(422),n(423),n(424),n(425),e)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function e(t,n){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.data=t,this.text=n.text||t,this.options=n}},function(e,t){e.exports=function(){throw new Error("define cannot be used indirect")}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(6),i=n(4),o=n(3),a=n(10),s=n(29),u=(t=n(5),n(9));const c=Object(t.b)({conv2d_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t,n,c,l="NHWC",h=[1,1],f){e=Object(o.a)(e,"x","conv2d","float32");const d=Object(o.a)(t,"filter","conv2d","float32");let p=e,m=!1;3===e.rank&&(m=!0,p=Object(u.a)(e,[1,e.shape[0],e.shape[1],e.shape[2]])),a.b(4===p.rank,()=>`Error in conv2d: input must be rank 4, but got rank ${p.rank}.`),a.b(4===d.rank,()=>"Error in conv2d: filter must be rank 4, but got rank "+d.rank+"."),s.a("conv2d",c,f);const g="NHWC"===l?p.shape[3]:p.shape[1];return a.b(g===d.shape[2],()=>`Error in conv2d: depth of input (${g}) must match input depth for filter ${d.shape[2]}.`),a.b(s.i(n,h),()=>`Error in conv2D: Either strides or dilations must be 1. Got strides ${n} and dilations '${h}'`),t={x:p,filter:d},e=r.a.runKernel(i.D,t,{strides:n,pad:c,dataFormat:l,dilations:h,dimRoundingMode:f}),m?Object(u.a)(e,[e.shape[1],e.shape[2],e.shape[3]]):e}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(6),i=n(4),o=n(28),a=n(3),s=n(20);t=n(5);const u=Object(t.b)({greaterEqual_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t){return e=Object(a.a)(e,"a","greaterEqual","string_or_numeric"),t=Object(a.a)(t,"b","greaterEqual","string_or_numeric"),[e,t]=Object(o.makeTypesMatch)(e,t),Object(s.assertAndGetBroadcastShape)(e.shape,t.shape),e={a:e,b:t},r.a.runKernel(i.rb,e)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({clone_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){return e=Object(o.a)(e,"x","clone","string_or_numeric"),r.a.runKernel(i.tb,{x:e})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({sigmoid_:
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){return e=Object(o.a)(e,"x","sigmoid","float32"),r.a.runKernel(i.Jc,{x:e})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({max_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t=null,n=!1){return e=Object(o.a)(e,"x","max"),r.a.runKernel(i.Mb,{x:e},{reductionIndices:t,keepDims:n})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(6),i=n(4),o=n(3),a=n(10);t=n(5);const s=Object(t.b)({tile_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t){const n=Object(o.a)(e,"x","tile","string_or_numeric");return a.b(n.rank===t.length,()=>`Error in transpose: rank of input ${n.rank} must match length of reps ${t}.`),e={x:n},r.a.runKernel(i.jd,e,{reps:t})}})},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"d",(function(){return a})),n.d(t,"f",(function(){return s})),n.d(t,"c",(function(){return u})),n.d(t,"e",(function(){return c})),n.d(t,"a",(function(){return l}));var r=n(0);
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * =============================================================================
 */function i(e,t){return o(e,t)}function o(e,t,n=new Map,r=new Set){if(null==e)return null;if("function"==typeof Blob&&e instanceof Blob)return e.slice();if(r.has(e))throw new Error("Circular references are not supported.");if(n.has(e))return n.get(e);var i=t(e);if(i.recurse&&null!==i.value)throw new Error("A deep map function may not return both a value and recurse=true.");if(i.recurse){if(c(e)){const i=Array.isArray(e)?[]:{};r.add(e);for(const s in e){var a=o(e[s],t,n,r);i[s]=a}return r.delete(e),e.__proto__&&(i.__proto__=e.__proto__),i}throw new Error("Can't recurse into non-iterable type: "+e)}return n.set(e,i.value),i.value}function a(e,t=s){return function e(t,n,r=new Set){const i=t[0];if(r.has(i))throw new Error("Circular references are not supported.");const o=n(t);if(o.recurse&&null!==o.value)throw new Error("A deep zip function may not return both a value and recurse=true.");if(o.recurse){if(c(i)){const o=Array.isArray(i)?[]:{};r.add(i);for(const a in i){const i=e(t.map(e=>e[a]),n,r);o[a]=i}return r.delete(i),o}throw new Error("Can't recurse into non-iterable type: "+i)}return o.value}(e,t)}function s(e){return null===e?null:c(e[0])?{value:null,recurse:!0}:{value:e,recurse:!1}}async function u(e,t){const n=new Map;o(e,t,n);for(const e of Array.from(n.keys())){var i=n.get(e);r.Ji.isPromise(i)&&(i=await i,n.set(e,i))}return o(e,t,n)}function c(e){let t=!1;return t=r.hf().get("IS_BROWSER")?e instanceof TextDecoder:e instanceof n(377).StringDecoder,null!=e&&!ArrayBuffer.isView(e)&&(Array.isArray(e)||"object"==typeof e&&!(e instanceof r.zd)&&!(e instanceof Promise)&&!t)}function l(e){return null==e||null===(t=e)||"object"!=typeof t&&"function"!=typeof t||Array.isArray(e)||"object"==typeof e&&e instanceof r.zd||r.Ji.isTypedArray(e);var t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({log_:
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){return e=Object(o.a)(e,"x","log","float32"),r.a.runKernel(i.Eb,{x:e})}})},function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return o}));var r=n(24);
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function i(){Object(r.c)().getBool("IS_TEST")||Object(r.c)().getBool("PROD")}function o(){Object(r.c)().getBool("IS_TEST")||Object(r.c)().getBool("PROD")}},function(e,t,n){"use strict";
/**
 * @license
 * Copyright 2019 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * =============================================================================
 */var r;n.d(t,"a",(function(){return r})),(n=r=r||{})[n.DT_INVALID=0]="DT_INVALID",n[n.DT_FLOAT=1]="DT_FLOAT",n[n.DT_DOUBLE=2]="DT_DOUBLE",n[n.DT_INT32=3]="DT_INT32",n[n.DT_UINT8=4]="DT_UINT8",n[n.DT_INT16=5]="DT_INT16",n[n.DT_INT8=6]="DT_INT8",n[n.DT_STRING=7]="DT_STRING",n[n.DT_COMPLEX64=8]="DT_COMPLEX64",n[n.DT_INT64=9]="DT_INT64",n[n.DT_BOOL=10]="DT_BOOL",n[n.DT_QINT8=11]="DT_QINT8",n[n.DT_QUINT8=12]="DT_QUINT8",n[n.DT_QINT32=13]="DT_QINT32",n[n.DT_BFLOAT16=14]="DT_BFLOAT16",n[n.DT_QINT16=15]="DT_QINT16",n[n.DT_QUINT16=16]="DT_QUINT16",n[n.DT_UINT16=17]="DT_UINT16",n[n.DT_COMPLEX128=18]="DT_COMPLEX128",n[n.DT_HALF=19]="DT_HALF",n[n.DT_RESOURCE=20]="DT_RESOURCE",n[n.DT_VARIANT=21]="DT_VARIANT",n[n.DT_UINT32=22]="DT_UINT32",n[n.DT_UINT64=23]="DT_UINT64",n[n.DT_FLOAT_REF=101]="DT_FLOAT_REF",n[n.DT_DOUBLE_REF=102]="DT_DOUBLE_REF",n[n.DT_INT32_REF=103]="DT_INT32_REF",n[n.DT_UINT8_REF=104]="DT_UINT8_REF",n[n.DT_INT16_REF=105]="DT_INT16_REF",n[n.DT_INT8_REF=106]="DT_INT8_REF",n[n.DT_STRING_REF=107]="DT_STRING_REF",n[n.DT_COMPLEX64_REF=108]="DT_COMPLEX64_REF",n[n.DT_INT64_REF=109]="DT_INT64_REF",n[n.DT_BOOL_REF=110]="DT_BOOL_REF",n[n.DT_QINT8_REF=111]="DT_QINT8_REF",n[n.DT_QUINT8_REF=112]="DT_QUINT8_REF",n[n.DT_QINT32_REF=113]="DT_QINT32_REF",n[n.DT_BFLOAT16_REF=114]="DT_BFLOAT16_REF",n[n.DT_QINT16_REF=115]="DT_QINT16_REF",n[n.DT_QUINT16_REF=116]="DT_QUINT16_REF",n[n.DT_UINT16_REF=117]="DT_UINT16_REF",n[n.DT_COMPLEX128_REF=118]="DT_COMPLEX128_REF",n[n.DT_HALF_REF=119]="DT_HALF_REF",n[n.DT_RESOURCE_REF=120]="DT_RESOURCE_REF",n[n.DT_VARIANT_REF=121]="DT_VARIANT_REF",n[n.DT_UINT32_REF=122]="DT_UINT32_REF",n[n.DT_UINT64_REF=123]="DT_UINT64_REF",(t=(t={}).CheckpointFormatVersion||(t.CheckpointFormatVersion={}))[t.LEGACY=0]="LEGACY",t[t.V1=1]="V1",t[t.V2=2]="V2"},function(e,t,n){"use strict";
/**
 * @license
 * Copyright 2019 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function r(e,t,n){n=function(e,t,n){let r=0,i=e.length,o=0,a=!1;for(;r<i;){o=r+(i-r>>>1);var s=n(t,e[o]);0<s?r=o+1:(i=o,a=!s)}return a?r:-r-1}(e,t,n||i),e.splice(n<0?-(n+1):n,0,t)}function i(e,t){return t<e?1:e<t?-1:0}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function o(e,t,n,r,i){return u(e,t,n,r,i,0)}function a(e,t,n,r,i,o){return u(e,t,n,r,i,0,!1,o,!0)}function s(e,t,n,r,i,o){return u(e,t,n,r,i,o,!0)}function u(e,t,n,i,o,a,s=!1,u=!1,l=!1){const h=[];for(let e=0;e<t.length;e++)t[e]>o&&h.push({score:t[e],boxIndex:e,suppressBeginIndex:0});h.sort(c);var f=0<a?-.5/a:0;const d=[],p=[];for(;d.length<n&&0<h.length;){const t=h.pop();var{score:m,boxIndex:g,suppressBeginIndex:A}=t;if(m<o)break;let n=!1;for(let r=d.length-1;r>=A;--r){var v=function(e,t,n){t=e.subarray(4*t,4*t+4),e=e.subarray(4*n,4*n+4),n=Math.min(t[0],t[2]);var r=Math.min(t[1],t[3]),i=Math.max(t[0],t[2]),o=(t=Math.max(t[1],t[3]),Math.min(e[0],e[2])),a=Math.min(e[1],e[3]),s=Math.max(e[0],e[2]),u=(i-n)*(t-r),c=(s-o)*((e=Math.max(e[1],e[3]))-a);return u<=0||c<=0?0:(n=Math.max(n,o),o=Math.max(r,a),r=Math.min(i,s),a=Math.min(t,e),(i=Math.max(r-n,0)*Math.max(a-o,0))/(u+c-i))}(e,g,d[r]);if(i<=v){n=!0;break}if(t.score=t.score*function(e,t,n){return t=Math.exp(t*n*n),n<=e?t:0}(i,f,v),t.score<=o)break}t.suppressBeginIndex=d.length,n||(t.score===m?(d.push(g),p.push(t.score)):t.score>o&&r(h,t,c))}var b=n-(a=d.length);u&&0<b&&(d.push(...new Array(b).fill(0)),p.push(...new Array(b).fill(0)));const y={selectedIndices:d};return s&&(y.selectedScores=p),l&&(y.validOutputs=a),y}function c(e,t){return e.score-t.score||e.score===t.score&&t.boxIndex-e.boxIndex}n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return s}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(10);
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function a(e,t,n){return Object(o.c)(e),r.a.runKernel(i.gb,{},{shape:e,value:t,dtype:n})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(10),o=n(61);
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function a(e,t="float32"){var n,s;return Object(i.c)(e),"complex64"===t?(s=a(e,"float32"),n=a(e,"float32"),Object(o.a)(s,n)):(s=Object(i.F)(Object(i.O)(e),t),r.a.makeTensor(s,e,t))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({relu_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){return e=Object(o.a)(e,"x","relu"),r.a.runKernel(i.uc,{x:e})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({step_:
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t=0){return e=Object(o.a)(e,"x","step"),r.a.runKernel(i.ad,{x:e},{alpha:t})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(6),i=n(4),o=n(3),a=n(10);t=n(5);const s=Object(t.b)({unstack_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t=0){const n=Object(o.a)(e,"x","unstack","string_or_numeric");return a.b(t>=-n.shape.length&&t<n.shape.length,()=>`Axis = ${t} is not in [-${n.shape.length}, ${n.shape.length})`),e={value:n},r.a.runKernel(i.od,e,{axis:t})}})},function(e,t,n){"use strict";var r=n(6),i=n(4),o=n(3),a=n(10),s=n(9),u=n(5);n.d(t,"a",(function(){return c}));const c=Object(u.b)({batchNorm_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t,n,u,c,l){let h,f;return null==l&&(l=.001),e=Object(o.a)(e,"x","batchNorm"),t=Object(o.a)(t,"mean","batchNorm"),n=Object(o.a)(n,"variance","batchNorm"),null!=c&&(h=Object(o.a)(c,"scale","batchNorm")),null!=u&&(f=Object(o.a)(u,"offset","batchNorm")),a.b(t.rank===n.rank,()=>"Batch normalization gradient requires mean and variance to have equal ranks."),a.b(null==f||t.rank===f.rank,()=>"Batch normalization gradient requires mean and offset to have equal ranks."),a.b(null==h||t.rank===h.rank,()=>"Batch normalization gradient requires mean and scale to have equal ranks."),c={x:function(e){return 0===e.rank||1===e.rank?Object(s.a)(e,[1,1,1,e.size]):2===e.rank?Object(s.a)(e,[1,1,e.shape[0],e.shape[1]]):3===e.rank?Object(s.a)(e,[1,e.shape[0],e.shape[1],e.shape[2]]):e}(e),scale:h,offset:f,mean:t,variance:n},u=r.a.runKernel(i.lb,c,{varianceEpsilon:l}),Object(s.a)(u,e.shape)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(3),i=n(60);
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function o(e,t,n){var o=Object(r.c)(e,n);return Object(i.a)(e,t,o,n)}},function(e,t,n){"use strict";var r=function(e){this.value=e},i=(o.prototype.insert=function(e){return e=new r(e),this.insertEntry(e),e},o.prototype.insertEntry=function(e){this.head?((this.tail.next=e).prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},o.prototype.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},o.prototype.len=function(){return this._len},o.prototype.clear=function(){this.head=this.tail=null,this._len=0},o);function o(){this._len=0}function a(e){this._list=new i,this._maxSize=10,this._map={},this._maxSize=e}a.prototype.put=function(e,t){var n,i,o=this._list,a=this._map,s=null;return null==a[e]&&(i=o.len(),n=this._lastRemovedEntry,i>=this._maxSize&&0<i&&(i=o.head,o.remove(i),delete a[i.key],s=i.value,this._lastRemovedEntry=i),n?n.value=t:n=new r(t),n.key=e,o.insertEntry(n),a[e]=n),s},a.prototype.get=function(e){e=this._map[e];var t=this._list;if(null!=e)return e!==t.tail&&(t.remove(e),t.insertEntry(e)),e.value},a.prototype.clear=function(){this._list.clear(),this._map={}},a.prototype.len=function(){return this._list.len()},t.a=a},function(e,t,n){var r;
/**
 * @license Fraction.js v4.2.0 05/03/2022
 * https://www.xarg.org/2014/03/rational-numbers-in-javascript/
 *
 * Copyright (c) 2021, Robert Eisele (robert@xarg.org)
 * Dual licensed under the MIT or GPL Version 2 licenses.
 **/!function(){"use strict";var n={s:1,n:0,d:1};function i(e,t){if(isNaN(e=parseInt(e,10)))throw c.InvalidParameter;return e*t}function o(e,t){if(0===t)throw c.DivisionByZero;var n=Object.create(c.prototype),r=(n.s=e<0?-1:1,u(e=e<0?-e:e,t));return n.n=e/r,n.d=t/r,n}function a(e){for(var t={},n=e,r=2,i=4;i<=n;){for(;n%r==0;)n/=r,t[r]=(t[r]||0)+1;i+=1+2*r++}return n!==e?1<n&&(t[n]=(t[n]||0)+1):t[e]=(t[e]||0)+1,t}function s(e,t){var r,o=0,a=1,s=1,u=0,l=0,h=0,f=1,d=1,p=0,m=1,g=1,A=1;if(null!=e)if(void 0!==t){if(s=(o=e)*(a=t),o%1!=0||a%1!=0)throw c.NonIntegerParameter}else switch(typeof e){case"object":if("d"in e&&"n"in e)o=e.n,a=e.d,"s"in e&&(o*=e.s);else{if(!(0 in e))throw c.InvalidParameter;o=e[0],1 in e&&(a=e[1])}s=o*a;break;case"number":if((e=e<0?-(s=e):e)%1==0)o=e;else if(0<e){for(1<=e&&(e/=d=Math.pow(10,Math.floor(1+Math.log(e)/Math.LN10)));m<=1e7&&A<=1e7;){if(e===(r=(p+g)/(m+A))){a=m+A<=1e7?(o=p+g,m+A):m<A?(o=g,A):(o=p,m);break}r<e?(p+=g,m+=A):(g+=p,A+=m),a=1e7<m?(o=g,A):(o=p,m)}o*=d}else(isNaN(e)||isNaN(t))&&(a=o=NaN);break;case"string":if(null===(m=e.match(/\d+|./g)))throw c.InvalidParameter;if("-"===m[p]?(s=-1,p++):"+"===m[p]&&p++,m.length===p+1?l=i(m[p++],s):"."===m[p+1]||"."===m[p]?("."!==m[p]&&(u=i(m[p++],s)),(1+ ++p===m.length||"("===m[p+1]&&")"===m[p+3]||"'"===m[p+1]&&"'"===m[p+3])&&(l=i(m[p],s),f=Math.pow(10,m[p].length),p++),("("===m[p]&&")"===m[p+2]||"'"===m[p]&&"'"===m[p+2])&&(h=i(m[p+1],s),d=Math.pow(10,m[p+1].length)-1,p+=3)):"/"===m[p+1]||":"===m[p+1]?(l=i(m[p],s),f=i(m[p+2],1),p+=3):"/"===m[p+3]&&" "===m[p+1]&&(u=i(m[p],s),l=i(m[p+2],s),f=i(m[p+4],1),p+=5),m.length<=p){s=o=h+(a=f*d)*u+d*l;break}default:throw c.InvalidParameter}if(0===a)throw c.DivisionByZero;n.s=s<0?-1:1,n.n=Math.abs(o),n.d=Math.abs(a)}function u(e,t){if(!e)return t;if(!t)return e;for(;;){if(!(e%=t))return t;if(!(t%=e))return e}}function c(e,t){if(s(e,t),!(this instanceof c))return o(n.s*n.n,n.d);e=u(n.d,n.n),this.s=n.s,this.n=n.n/e,this.d=n.d/e}c.DivisionByZero=new Error("Division by Zero"),c.InvalidParameter=new Error("Invalid argument"),c.NonIntegerParameter=new Error("Parameters must be integer"),c.prototype={s:1,n:0,d:1,abs:function(){return o(this.n,this.d)},neg:function(){return o(-this.s*this.n,this.d)},add:function(e,t){return s(e,t),o(this.s*this.n*n.d+n.s*this.d*n.n,this.d*n.d)},sub:function(e,t){return s(e,t),o(this.s*this.n*n.d-n.s*this.d*n.n,this.d*n.d)},mul:function(e,t){return s(e,t),o(this.s*n.s*this.n*n.n,this.d*n.d)},div:function(e,t){return s(e,t),o(this.s*n.s*this.n*n.d,this.d*n.n)},clone:function(){return o(this.s*this.n,this.d)},mod:function(e,t){if(isNaN(this.n)||isNaN(this.d))return new c(NaN);if(void 0===e)return o(this.s*this.n%this.d,1);if(s(e,t),0===n.n&&0===this.d)throw c.DivisionByZero;return o(this.s*(n.d*this.n)%(n.n*this.d),n.d*this.d)},gcd:function(e,t){return s(e,t),o(u(n.n,this.n)*u(n.d,this.d),n.d*this.d)},lcm:function(e,t){return s(e,t),0===n.n&&0===this.n?o(0,1):o(n.n*this.n,u(n.n,this.n)*u(n.d,this.d))},ceil:function(e){return e=Math.pow(10,e||0),isNaN(this.n)||isNaN(this.d)?new c(NaN):o(Math.ceil(e*this.s*this.n/this.d),e)},floor:function(e){return e=Math.pow(10,e||0),isNaN(this.n)||isNaN(this.d)?new c(NaN):o(Math.floor(e*this.s*this.n/this.d),e)},round:function(e){return e=Math.pow(10,e||0),isNaN(this.n)||isNaN(this.d)?new c(NaN):o(Math.round(e*this.s*this.n/this.d),e)},inverse:function(){return o(this.s*this.d,this.n)},pow:function(e,t){if(s(e,t),1===n.d)return n.s<0?o(Math.pow(this.s*this.d,n.n),Math.pow(this.n,n.n)):o(Math.pow(this.s*this.n,n.n),Math.pow(this.d,n.n));if(this.s<0)return null;var r,i=a(this.n),u=a(this.d),c=1,l=1;for(r in i)if("1"!==r){if("0"===r){c=0;break}if(i[r]*=n.n,i[r]%n.d!=0)return null;i[r]/=n.d,c*=Math.pow(r,i[r])}for(r in u)if("1"!==r){if(u[r]*=n.n,u[r]%n.d!=0)return null;u[r]/=n.d,l*=Math.pow(r,u[r])}return n.s<0?o(l,c):o(c,l)},equals:function(e,t){return s(e,t),this.s*this.n*n.d==n.s*n.n*this.d},compare:function(e,t){return s(e,t),(0<(e=this.s*this.n*n.d-n.s*n.n*this.d))-(e<0)},simplify:function(e){if(!isNaN(this.n)&&!isNaN(this.d)){e=e||.001;for(var t=this.abs(),n=t.toContinued(),r=1;r<n.length;r++){for(var i=o(n[r-1],1),a=r-2;0<=a;a--)i=i.inverse().add(n[a]);if(i.sub(t).abs().valueOf()<e)return i.mul(this.s)}}return this},divisible:function(e,t){return s(e,t),!(!(n.n*this.d)||this.n*n.d%(n.n*this.d))},valueOf:function(){return this.s*this.n/this.d},toFraction:function(e){var t="",n=this.n,r=this.d;return this.s<0&&(t+="-"),1===r?t+=n:(e&&0<(e=Math.floor(n/r))&&(t=t+e+" ",n%=r),t=(t+=n)+"/"+r),t},toLatex:function(e){var t="",n=this.n,r=this.d;return this.s<0&&(t+="-"),1===r?t+=n:(e&&0<(e=Math.floor(n/r))&&(t+=e,n%=r),t=(t=(t+="\\frac{")+n+"}{")+r+"}"),t},toContinued:function(){var e,t=this.n,n=this.d,r=[];if(!isNaN(t)&&!isNaN(n))for(;r.push(Math.floor(t/n)),e=t%n,t=n,n=e,1!==t;);return r},toString:function(e){var t=this.n,n=this.d;if(isNaN(t)||isNaN(n))return"NaN";e=e||15;var r=function(e){for(;e%2==0;e/=2);for(;e%5==0;e/=5);if(1===e)return 0;for(var t=10%e,n=1;1!==t;n++)if(t=10*t%e,2e3<n)return 0;return n}(n),i=function(e,t,n){for(var r=1,i=function(e,t,n){for(var r=1;0<t;e=e*e%n,t>>=1)1&t&&(r=r*e%n);return r}(10,n,t),o=0;o<300;o++){if(r===i)return o;r=10*r%t,i=10*i%t}return 0}(0,n,r),o=this.s<0?"-":"";if(o+=t/n|0,(t=t%n*10)&&(o+="."),r){for(var a=i;a--;)o+=t/n|0,t=t%n*10;for(o+="(",a=r;a--;)o+=t/n|0,t=t%n*10;o+=")"}else for(a=e;t&&a--;)o+=t/n|0,t=t%n*10;return o}},void 0!==(r=function(){return c}.apply(t,[]))&&(e.exports=r)}()},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({mean_:
/**
 * @license
 * Copyright 2020 Google Inc. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t=null,n=!1){return e=Object(o.a)(e,"x","mean"),r.a.runKernel(i.Tb,{x:e},{axis:t,keepDims:n})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({real_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){return e=Object(o.a)(e,"input","real"),r.a.runKernel(i.rc,{input:e})}})},function(e,t){function n(){return e.exports=n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},e.exports.__esModule=!0,e.exports.default=e.exports,n.apply(this,arguments)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){"use strict";
/**
 * @license
 * Copyright 2017 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */var r,i,o,a,s;n.d(t,"a",(function(){return r})),n.d(t,"c",(function(){return c})),n.d(t,"b",(function(){return l})),(n=r=r||{}).R0="R0",n.R1="R1",n.R2="R2",n.R3="R3",n.R4="R4",n.R5="R5",n.R6="R6",(t=i=i||{}).float32="float32",t.int32="int32",t.bool="int32",t.complex64="complex64",(n=o=o||{}).float32="float32",n.int32="int32",n.bool="bool",n.complex64="complex64",(t=a=a||{}).float32="float32",t.int32="float32",t.bool="float32",t.complex64="complex64",(n=s=s||{}).float32="complex64",n.int32="complex64",n.bool="complex64",n.complex64="complex64";const u={float32:a,int32:i,bool:o,complex64:s};function c(e,t){if("string"!==e&&"string"!==t)return u[e][t];if("string"===e&&"string"===t)return"string";throw new Error(`Can not upcast ${e} with `+t)}function l(e){return c(e,"int32")}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"d",(function(){return f})),n.d(t,"b",(function(){return h})),n.d(t,"e",(function(){return l})),n.d(t,"c",(function(){return c}));var r=n(10),i=n(50);
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */const o="://";class a{constructor(){this.managers={}}static getInstance(){return null==a.instance&&(a.instance=new a),a.instance}static registerManager(e,t){Object(r.b)(null!=e,()=>"scheme must not be undefined or null."),e.endsWith(o)&&(e=e.slice(0,e.indexOf(o))),Object(r.b)(0<e.length,()=>"scheme must not be an empty string.");const n=a.getInstance();Object(r.b)(null==n.managers[e],()=>`A model store manager is already registered for scheme '${e}'.`),n.managers[e]=t}static getManager(e){var t=a.getInstance().managers[e];if(null==t)throw new Error(`Cannot find model manager for scheme '${e}'`);return t}static getSchemes(){return Object.keys(a.getInstance().managers)}}function s(e){if(-1===e.indexOf(o))throw new Error("The url string provided does not contain a scheme. Supported schemes are: "+a.getSchemes().join(","));return{scheme:e.split(o)[0],path:e.split(o)[1]}}async function u(e,t,n=!1){Object(r.b)(e!==t,()=>`Old path and new path are the same: '${e}'`);const o=i.a.getLoadHandlers(e),u=(Object(r.b)(0<o.length,()=>`Copying failed because no load handler is found for source URL ${e}.`),Object(r.b)(o.length<2,()=>`Copying failed because more than one (${o.length}) load handlers for source URL ${e}.`),o[0]);var c=i.a.getSaveHandlers(t);Object(r.b)(0<c.length,()=>`Copying failed because no save handler is found for destination URL ${t}.`),Object(r.b)(c.length<2,()=>`Copying failed because more than one (${o.length}) save handlers for destination URL ${t}.`);const l=c[0];c=s(e).scheme;var h=s(e).path,f=c===s(e).scheme,d=await u.load();n&&f&&await a.getManager(c).removeModel(h),d=await l.save(d);return n&&!f&&await a.getManager(c).removeModel(h),d.modelArtifactsInfo}async function c(){const e={};for(const n of a.getSchemes()){var t=await a.getManager(n).listModels();for(const r in t){e[n+o+r]=t[r]}}return e}async function l(e){e=s(e);return a.getManager(e.scheme).removeModel(e.path)}async function h(e,t){return u(e,t,!1)}async function f(e,t){return u(e,t,!0)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(6),i=n(4),o=n(28),a=n(3),s=n(20),u=n(15);t=n(5);const c=Object(t.b)({maximum_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t){let n=Object(a.a)(e,"a","maximum"),c=Object(a.a)(t,"b","maximum");return[n,c]=Object(o.makeTypesMatch)(n,c),"bool"===n.dtype&&(n=Object(u.a)(n,"int32"),c=Object(u.a)(c,"int32")),Object(s.assertAndGetBroadcastShape)(n.shape,c.shape),e={a:n,b:c},r.a.runKernel(i.Sb,e)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(6),i=n(4),o=n(3),a=n(10);t=n(5);const s=Object(t.b)({batchToSpaceND_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t,n){const s=Object(o.a)(e,"x","batchToSpaceND"),u=t.reduce((e,t)=>e*t);return a.b(s.rank>=1+t.length,()=>`input rank is ${s.rank} but should be > than blockShape.length `+t.length),a.b(n.length===t.length,()=>`crops.length is ${n.length} but should be equal to blockShape.length  `+t.length),a.b(s.shape[0]%u==0,()=>`input tensor batch is ${s.shape[0]} but is not divisible by the product of the elements of blockShape ${t.join(" * ")} === `+u),e={x:s},r.a.runKernel(i.t,e,{blockShape:t,crops:n})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(6),i=n(4),o=n(3),a=n(10),s=n(29),u=(t=n(5),n(9));const c=Object(t.b)({depthwiseConv2d_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t,n,c,l="NHWC",h=[1,1],f){e=Object(o.a)(e,"x","depthwiseConv2d","float32");const d=Object(o.a)(t,"filter","depthwiseConv2d","float32");let p=e,m=!1;3===e.rank&&(m=!0,p=Object(u.a)(e,[1,e.shape[0],e.shape[1],e.shape[2]])),a.b(4===p.rank,()=>`Error in depthwiseConv2d: input must be rank 4, but got rank ${p.rank}.`),a.b(4===d.rank,()=>"Error in depthwiseConv2d: filter must be rank 4, but got rank "+d.rank+".");const g="NHWC"===l?p.shape[3]:p.shape[1];return a.b(g===d.shape[2],()=>`Error in depthwiseConv2d: number of input channels (${g}) must match the inChannels dimension in filter ${d.shape[2]}.`),s.a("depthwiseConv2d",c,f),t={x:p,filter:d},e=r.a.runKernel(i.Q,t,{strides:n,pad:c,dataFormat:l,dilations:h,dimRoundingMode:f}),m?Object(u.a)(e,[e.shape[1],e.shape[2],e.shape[3]]):e}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(6),i=n(4),o=n(28),a=n(3),s=n(20);t=n(5);const u=Object(t.b)({equal_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t){return e=Object(a.a)(e,"a","equal","string_or_numeric"),t=Object(a.a)(t,"b","equal","string_or_numeric"),[e,t]=Object(o.makeTypesMatch)(e,t),Object(s.assertAndGetBroadcastShape)(e.shape,t.shape),e={a:e,b:t},r.a.runKernel(i.ab,e)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=n(3),i=n(10),o=n(53),a=n(48),s=n(81),u=n(121),c=(t=n(5),n(62)),l=n(9),h=n(22),f=n(47),d=n(31),p=n(21);const m=Object(t.b)({norm_:
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t="euclidean",n=null,m=!1){let g=(t=function e(t,n,r=null){if(0===t.rank)return Object(o.a)(t);if(1!==t.rank&&null===r)return e(Object(l.a)(t,[-1]),n,r);if(1===t.rank||"number"==typeof r||Array.isArray(r)&&1===r.length){if(1===n)return Object(p.a)(Object(o.a)(t),r);if(n===1/0)return Object(s.a)(Object(o.a)(t),r);if(n===-1/0)return Object(u.a)(Object(o.a)(t),r);if("euclidean"===n||2===n)return Object(f.a)(Object(p.a)(Object(c.a)(Object(o.a)(t),Object(h.a)(2,"int32")),r));throw new Error("Error in norm: invalid ord value: "+n)}if(Array.isArray(r)&&2===r.length){if(1===n)return Object(s.a)(Object(p.a)(Object(o.a)(t),r[0]),r[1]-1);if(n===1/0)return Object(s.a)(Object(p.a)(Object(o.a)(t),r[1]),r[0]);if(n===-1/0)return Object(u.a)(Object(p.a)(Object(o.a)(t),r[1]),r[0]);if("fro"===n||"euclidean"===n)return Object(f.a)(Object(p.a)(Object(d.a)(t),r));throw new Error("Error in norm: invalid ord value: "+n)}throw new Error("Error in norm: invalid axis: "+r)}(e=Object(r.a)(e,"x","norm"),t,n)).shape;return m&&(m=Object(i.I)(n,e.shape),g=a.e(t.shape,m)),Object(l.a)(t,g)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({gather_:
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t,n=0,a=0){return e=Object(o.a)(e,"x","gather"),t=Object(o.a)(t,"indices","gather","int32"),r.a.runKernel(i.pb,{x:e,indices:t},{axis:n,batchDims:a})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({imag_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){return e=Object(o.a)(e,"input","imag"),r.a.runKernel(i.ub,{input:e})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({logicalNot_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){return e=Object(o.a)(e,"x","logicalNot","bool"),r.a.runKernel(i.Ib,{x:e})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(6),i=n(4),o=n(3),a=n(10);t=n(5);const s=Object(t.b)({spaceToBatchND_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t,n){const s=Object(o.a)(e,"x","spaceToBatchND");return a.b(s.rank>=1+t.length,()=>`input rank ${s.rank} should be > than [blockShape] `+t.length),a.b(n.length===t.length,()=>`paddings.shape[0] ${n.length} must be equal to [blockShape] `+t.length),a.b(s.shape.reduce((e,r,i)=>0<i&&i<=t.length?e&&(r+n[i-1][0]+n[i-1][1])%t[i-1]==0:e,!0),()=>`input spatial dimensions ${s.shape.slice(1)} with paddings ${n.toString()} must be divisible by blockShapes `+t.toString()),e={x:s},r.a.runKernel(i.Qc,e,{blockShape:t,paddings:n})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(3),i=n(10),o=(t=n(5),n(9));const a=Object(t.b)({squeeze_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t){return e=Object(r.a)(e,"x","squeeze","string_or_numeric"),Object(o.a)(e,Object(i.Q)(e.shape,t).newShape)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(6),i=n(4),o=n(3),a=n(10),s=n(79),u=(t=n(5),n(9));const c=Object(t.b)({broadcastTo_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t){let n=Object(o.a)(e,"broadcastTo","x");var c=n.shape;if(Object(a.c)(t),t.length<n.rank)throw new Error(`broadcastTo(): shape.length=${t.length} < input.rank=${n.rank}.`);if(t.length>n.rank){const e=n.shape.slice();for(;e.length<t.length;)e.unshift(1);n=Object(u.a)(n,e)}var l,h=n.shape;const f=Array.from(t);for(let e=t.length-1;0<=e;e--)if(h[e]===t[e])f[e]=1;else if(1!==n.shape[e])throw new Error(`broadcastTo(): [${c}] cannot be broadcast to [${t}].`);return 0===f.map((e,t)=>1<e?t:-1).filter(e=>0<=e).length?Object(s.a)(n):(e={x:n},l={reps:f},r.a.runKernel(i.jd,e,l))}})},function(e,t,n){"use strict";(function(e){var r=n(13),i=n(36),o=n(217);function a(e){return r.a.isPlainObject(e)||r.a.isArray(e)}function s(e){return r.a.endsWith(e,"[]")?e.slice(0,-2):e}function u(e,t,n){return e?e.concat(t).map((function(e,t){return e=s(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const c=r.a.toFlatObject(r.a,{},null,(function(e){return/^is[A-Z]/.test(e)}));t.a=function(t,n,l){if(!r.a.isObject(t))throw new TypeError("target must be an object");n=n||new(o.a||FormData);const h=(l=r.a.toFlatObject(l,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!r.a.isUndefined(t[e])}))).metaTokens,f=l.visitor||A,d=l.dots,p=l.indexes,m=(l.Blob||"undefined"!=typeof Blob&&Blob)&&r.a.isSpecCompliantForm(n);if(!r.a.isFunction(f))throw new TypeError("visitor must be a function");function g(t){if(null===t)return"";if(r.a.isDate(t))return t.toISOString();if(!m&&r.a.isBlob(t))throw new i.a("Blob is not supported. Use a Buffer instead.");return r.a.isArrayBuffer(t)||r.a.isTypedArray(t)?m&&"function"==typeof Blob?new Blob([t]):e.from(t):t}function A(e,t,i){let o=e;if(e&&!i&&"object"==typeof e)if(r.a.endsWith(t,"{}"))t=h?t:t.slice(0,-2),e=JSON.stringify(e);else if(r.a.isArray(e)&&(c=e,r.a.isArray(c)&&!c.some(a))||(r.a.isFileList(e)||r.a.endsWith(t,"[]"))&&(o=r.a.toArray(e)))return t=s(t),o.forEach((function(e,i){r.a.isUndefined(e)||null===e||n.append(!0===p?u([t],i,d):null===p?t:t+"[]",g(e))})),!1;var c;return!!a(e)||(n.append(u(i,t,d),g(e)),!1)}const v=[],b=Object.assign(c,{defaultVisitor:A,convertValue:g,isVisitable:a});if(r.a.isObject(t))return function e(t,i){if(!r.a.isUndefined(t)){if(-1!==v.indexOf(t))throw Error("Circular reference detected in "+i.join("."));v.push(t),r.a.forEach(t,(function(t,o){!0===(!(r.a.isUndefined(t)||null===t)&&f.call(n,t,r.a.isString(o)?o.trim():o,i,b))&&e(t,i?i.concat(o):[o])})),v.pop()}}(t),n;throw new TypeError("data must be an object")}}).call(this,n(163).Buffer)},function(e,t,n){"use strict";n.r(t);var r={},i=(n.r(r),n.d(r,"maxNorm",(function(){return sa})),n.d(r,"unitNorm",(function(){return ua})),n.d(r,"nonNeg",(function(){return ca})),n.d(r,"minMaxNorm",(function(){return la})),{}),o=(n.r(i),n.d(i,"zeros",(function(){return ha})),n.d(i,"ones",(function(){return fa})),n.d(i,"constant",(function(){return da})),n.d(i,"randomUniform",(function(){return pa})),n.d(i,"randomNormal",(function(){return ma})),n.d(i,"truncatedNormal",(function(){return ga})),n.d(i,"identity",(function(){return Aa})),n.d(i,"varianceScaling",(function(){return va})),n.d(i,"glorotUniform",(function(){return ba})),n.d(i,"glorotNormal",(function(){return ya})),n.d(i,"heNormal",(function(){return wa})),n.d(i,"heUniform",(function(){return xa})),n.d(i,"leCunNormal",(function(){return Ca})),n.d(i,"leCunUniform",(function(){return ka})),n.d(i,"orthogonal",(function(){return Ea})),{}),a=(n.r(o),n.d(o,"inputLayer",(function(){return zc})),n.d(o,"elu",(function(){return Hc})),n.d(o,"reLU",(function(){return $c})),n.d(o,"leakyReLU",(function(){return Qc})),n.d(o,"prelu",(function(){return Vc})),n.d(o,"softmax",(function(){return qc})),n.d(o,"thresholdedReLU",(function(){return Gc})),n.d(o,"conv1d",(function(){return Wc})),n.d(o,"conv2d",(function(){return Kc})),n.d(o,"conv2dTranspose",(function(){return Yc})),n.d(o,"conv3d",(function(){return Xc})),n.d(o,"conv3dTranspose",(function(){return Jc})),n.d(o,"separableConv2d",(function(){return Zc})),n.d(o,"cropping2D",(function(){return el})),n.d(o,"upSampling2d",(function(){return tl})),n.d(o,"depthwiseConv2d",(function(){return nl})),n.d(o,"activation",(function(){return rl})),n.d(o,"dense",(function(){return il})),n.d(o,"dropout",(function(){return ol})),n.d(o,"spatialDropout1d",(function(){return al})),n.d(o,"flatten",(function(){return sl})),n.d(o,"repeatVector",(function(){return ul})),n.d(o,"reshape",(function(){return cl})),n.d(o,"permute",(function(){return ll})),n.d(o,"embedding",(function(){return hl})),n.d(o,"add",(function(){return fl})),n.d(o,"average",(function(){return dl})),n.d(o,"concatenate",(function(){return pl})),n.d(o,"maximum",(function(){return ml})),n.d(o,"minimum",(function(){return gl})),n.d(o,"multiply",(function(){return Al})),n.d(o,"dot",(function(){return vl})),n.d(o,"batchNormalization",(function(){return bl})),n.d(o,"layerNormalization",(function(){return yl})),n.d(o,"zeroPadding2d",(function(){return wl})),n.d(o,"averagePooling1d",(function(){return xl})),n.d(o,"avgPool1d",(function(){return Cl})),n.d(o,"avgPooling1d",(function(){return kl})),n.d(o,"averagePooling2d",(function(){return El})),n.d(o,"avgPool2d",(function(){return Sl})),n.d(o,"avgPooling2d",(function(){return _l})),n.d(o,"averagePooling3d",(function(){return Ol})),n.d(o,"avgPool3d",(function(){return Tl})),n.d(o,"avgPooling3d",(function(){return Dl})),n.d(o,"globalAveragePooling1d",(function(){return Bl})),n.d(o,"globalAveragePooling2d",(function(){return Il})),n.d(o,"globalMaxPooling1d",(function(){return Ml})),n.d(o,"globalMaxPooling2d",(function(){return jl})),n.d(o,"maxPooling1d",(function(){return Nl})),n.d(o,"maxPooling2d",(function(){return Fl})),n.d(o,"maxPooling3d",(function(){return Rl})),n.d(o,"gru",(function(){return Pl})),n.d(o,"gruCell",(function(){return Ll})),n.d(o,"lstm",(function(){return Ul})),n.d(o,"lstmCell",(function(){return zl})),n.d(o,"simpleRNN",(function(){return Hl})),n.d(o,"simpleRNNCell",(function(){return $l})),n.d(o,"convLstm2d",(function(){return Ql})),n.d(o,"convLstm2dCell",(function(){return Vl})),n.d(o,"rnn",(function(){return ql})),n.d(o,"stackedRNNCells",(function(){return Gl})),n.d(o,"bidirectional",(function(){return Wl})),n.d(o,"timeDistributed",(function(){return Kl})),n.d(o,"globalMaxPool1d",(function(){return Yl})),n.d(o,"globalMaxPool2d",(function(){return Xl})),n.d(o,"maxPool1d",(function(){return Jl})),n.d(o,"maxPool2d",(function(){return Zl})),n.d(o,"Layer",(function(){return $o})),n.d(o,"RNN",(function(){return Tu})),n.d(o,"RNNCell",(function(){return Du})),n.d(o,"input",(function(){return Ds})),n.d(o,"gaussianNoise",(function(){return eh})),n.d(o,"gaussianDropout",(function(){return th})),n.d(o,"alphaDropout",(function(){return nh})),n.d(o,"masking",(function(){return rh})),n.d(o,"rescaling",(function(){return ih})),n.d(o,"centerCrop",(function(){return oh})),n.d(o,"resizing",(function(){return ah})),n.d(o,"categoryEncoding",(function(){return sh})),{}),s=(n.r(a),n.d(a,"binaryAccuracy",(function(){return uh})),n.d(a,"binaryCrossentropy",(function(){return ch})),n.d(a,"sparseCategoricalAccuracy",(function(){return lh})),n.d(a,"categoricalAccuracy",(function(){return hh})),n.d(a,"categoricalCrossentropy",(function(){return fh})),n.d(a,"precision",(function(){return dh})),n.d(a,"recall",(function(){return ph})),n.d(a,"cosineProximity",(function(){return mh})),n.d(a,"meanAbsoluteError",(function(){return gh})),n.d(a,"meanAbsolutePercentageError",(function(){return Ah})),n.d(a,"MAPE",(function(){return vh})),n.d(a,"mape",(function(){return bh})),n.d(a,"meanSquaredError",(function(){return yh})),n.d(a,"MSE",(function(){return wh})),n.d(a,"mse",(function(){return xh})),{}),u=(n.r(s),n.d(s,"modelFromJSON",(function(){return Es})),{}),c=(n.r(u),n.d(u,"l1l2",(function(){return Ch})),n.d(u,"l1",(function(){return kh})),n.d(u,"l2",(function(){return Eh})),{}),l=(n.r(c),n.d(c,"abs",(function(){return Nh.b})),n.d(c,"acos",(function(){return Nh.c})),n.d(c,"acosh",(function(){return Nh.d})),n.d(c,"add",(function(){return Nh.e})),n.d(c,"addN",(function(){return Nh.f})),n.d(c,"all",(function(){return Nh.g})),n.d(c,"any",(function(){return Nh.h})),n.d(c,"argMax",(function(){return Nh.i})),n.d(c,"argMin",(function(){return Nh.j})),n.d(c,"asin",(function(){return Nh.k})),n.d(c,"asinh",(function(){return Nh.l})),n.d(c,"atan",(function(){return Nh.m})),n.d(c,"atan2",(function(){return Nh.n})),n.d(c,"atanh",(function(){return Nh.o})),n.d(c,"avgPool",(function(){return Nh.p})),n.d(c,"avgPool3d",(function(){return Nh.q})),n.d(c,"basicLSTMCell",(function(){return Nh.r})),n.d(c,"batchToSpaceND",(function(){return Nh.w})),n.d(c,"batchNorm",(function(){return Nh.s})),n.d(c,"batchNorm2d",(function(){return Nh.t})),n.d(c,"batchNorm3d",(function(){return Nh.u})),n.d(c,"batchNorm4d",(function(){return Nh.v})),n.d(c,"bincount",(function(){return Nh.x})),n.d(c,"broadcastArgs",(function(){return Nh.z})),n.d(c,"broadcastTo",(function(){return Nh.A})),n.d(c,"buffer",(function(){return Nh.B})),n.d(c,"cast",(function(){return Nh.C})),n.d(c,"ceil",(function(){return Nh.D})),n.d(c,"clipByValue",(function(){return Nh.E})),n.d(c,"clone",(function(){return Nh.F})),n.d(c,"complex",(function(){return Nh.G})),n.d(c,"concat",(function(){return Nh.H})),n.d(c,"concat1d",(function(){return Nh.I})),n.d(c,"concat2d",(function(){return Nh.J})),n.d(c,"concat3d",(function(){return Nh.K})),n.d(c,"concat4d",(function(){return Nh.L})),n.d(c,"conv1d",(function(){return Nh.M})),n.d(c,"conv2d",(function(){return Nh.N})),n.d(c,"conv2dTranspose",(function(){return Nh.O})),n.d(c,"conv3d",(function(){return Nh.P})),n.d(c,"conv3dTranspose",(function(){return Nh.Q})),n.d(c,"cos",(function(){return Nh.R})),n.d(c,"cosh",(function(){return Nh.S})),n.d(c,"cumprod",(function(){return Nh.U})),n.d(c,"cumsum",(function(){return Nh.V})),n.d(c,"denseBincount",(function(){return Nh.W})),n.d(c,"depthToSpace",(function(){return Nh.X})),n.d(c,"depthwiseConv2d",(function(){return Nh.Y})),n.d(c,"diag",(function(){return Nh.Z})),n.d(c,"dilation2d",(function(){return Nh.ab})),n.d(c,"div",(function(){return Nh.bb})),n.d(c,"divNoNan",(function(){return Nh.cb})),n.d(c,"dot",(function(){return Nh.db})),n.d(c,"einsum",(function(){return Nh.fb})),n.d(c,"elu",(function(){return Nh.gb})),n.d(c,"equal",(function(){return Nh.ib})),n.d(c,"erf",(function(){return Nh.jb})),n.d(c,"euclideanNorm",(function(){return Nh.kb})),n.d(c,"exp",(function(){return Nh.lb})),n.d(c,"expandDims",(function(){return Nh.mb})),n.d(c,"expm1",(function(){return Nh.nb})),n.d(c,"eye",(function(){return Nh.ob})),n.d(c,"fill",(function(){return Nh.qb})),n.d(c,"floor",(function(){return Nh.rb})),n.d(c,"floorDiv",(function(){return Nh.sb})),n.d(c,"gather",(function(){return Nh.ub})),n.d(c,"greater",(function(){return Nh.wb})),n.d(c,"greaterEqual",(function(){return Nh.xb})),n.d(c,"imag",(function(){return Nh.zb})),n.d(c,"isFinite",(function(){return Nh.Db})),n.d(c,"isInf",(function(){return Nh.Eb})),n.d(c,"isNaN",(function(){return Nh.Fb})),n.d(c,"leakyRelu",(function(){return Nh.Gb})),n.d(c,"less",(function(){return Nh.Hb})),n.d(c,"lessEqual",(function(){return Nh.Ib})),n.d(c,"linspace",(function(){return Nh.Kb})),n.d(c,"localResponseNormalization",(function(){return Nh.Lb})),n.d(c,"log",(function(){return Nh.Mb})),n.d(c,"log1p",(function(){return Nh.Nb})),n.d(c,"logSigmoid",(function(){return Nh.Ob})),n.d(c,"logSoftmax",(function(){return Nh.Pb})),n.d(c,"logSumExp",(function(){return Nh.Qb})),n.d(c,"logicalAnd",(function(){return Nh.Rb})),n.d(c,"logicalNot",(function(){return Nh.Sb})),n.d(c,"logicalOr",(function(){return Nh.Tb})),n.d(c,"logicalXor",(function(){return Nh.Ub})),n.d(c,"lowerBound",(function(){return Nh.Wb})),n.d(c,"matMul",(function(){return Nh.Xb})),n.d(c,"max",(function(){return Nh.Yb})),n.d(c,"maxPool",(function(){return Nh.Zb})),n.d(c,"maxPool3d",(function(){return Nh.ac})),n.d(c,"maxPoolWithArgmax",(function(){return Nh.bc})),n.d(c,"maximum",(function(){return Nh.cc})),n.d(c,"mean",(function(){return Nh.dc})),n.d(c,"meshgrid",(function(){return Nh.ec})),n.d(c,"min",(function(){return Nh.fc})),n.d(c,"minimum",(function(){return Nh.gc})),n.d(c,"mirrorPad",(function(){return Nh.hc})),n.d(c,"mod",(function(){return Nh.ic})),n.d(c,"moments",(function(){return Nh.jc})),n.d(c,"mul",(function(){return Nh.lc})),n.d(c,"multiRNNCell",(function(){return Nh.mc})),n.d(c,"multinomial",(function(){return Nh.nc})),n.d(c,"neg",(function(){return Nh.oc})),n.d(c,"notEqual",(function(){return Nh.qc})),n.d(c,"oneHot",(function(){return Nh.rc})),n.d(c,"ones",(function(){return Nh.sc})),n.d(c,"onesLike",(function(){return Nh.tc})),n.d(c,"outerProduct",(function(){return Nh.vc})),n.d(c,"pad",(function(){return Nh.wc})),n.d(c,"pad1d",(function(){return Nh.xc})),n.d(c,"pad2d",(function(){return Nh.yc})),n.d(c,"pad3d",(function(){return Nh.zc})),n.d(c,"pad4d",(function(){return Nh.Ac})),n.d(c,"pool",(function(){return Nh.Bc})),n.d(c,"pow",(function(){return Nh.Cc})),n.d(c,"prelu",(function(){return Nh.Dc})),n.d(c,"print",(function(){return Nh.Ec})),n.d(c,"prod",(function(){return Nh.Fc})),n.d(c,"raggedGather",(function(){return Nh.Gc})),n.d(c,"raggedRange",(function(){return Nh.Hc})),n.d(c,"raggedTensorToTensor",(function(){return Nh.Ic})),n.d(c,"rand",(function(){return Nh.Jc})),n.d(c,"randomGamma",(function(){return Nh.Kc})),n.d(c,"randomNormal",(function(){return Nh.Lc})),n.d(c,"randomStandardNormal",(function(){return Nh.Mc})),n.d(c,"randomUniform",(function(){return Nh.Nc})),n.d(c,"range",(function(){return Nh.Oc})),n.d(c,"real",(function(){return Nh.Pc})),n.d(c,"reciprocal",(function(){return Nh.Qc})),n.d(c,"relu",(function(){return Nh.Rc})),n.d(c,"relu6",(function(){return Nh.Sc})),n.d(c,"reshape",(function(){return Nh.Tc})),n.d(c,"reverse",(function(){return Nh.Uc})),n.d(c,"reverse1d",(function(){return Nh.Vc})),n.d(c,"reverse2d",(function(){return Nh.Wc})),n.d(c,"reverse3d",(function(){return Nh.Xc})),n.d(c,"reverse4d",(function(){return Nh.Yc})),n.d(c,"round",(function(){return Nh.ad})),n.d(c,"rsqrt",(function(){return Nh.bd})),n.d(c,"scalar",(function(){return Nh.cd})),n.d(c,"selu",(function(){return Nh.fd})),n.d(c,"separableConv2d",(function(){return Nh.gd})),n.d(c,"setdiff1dAsync",(function(){return Nh.hd})),n.d(c,"sigmoid",(function(){return Nh.id})),n.d(c,"sign",(function(){return Nh.jd})),n.d(c,"sin",(function(){return Nh.ld})),n.d(c,"sinh",(function(){return Nh.md})),n.d(c,"slice",(function(){return Nh.nd})),n.d(c,"slice1d",(function(){return Nh.od})),n.d(c,"slice2d",(function(){return Nh.pd})),n.d(c,"slice3d",(function(){return Nh.qd})),n.d(c,"slice4d",(function(){return Nh.rd})),n.d(c,"softmax",(function(){return Nh.sd})),n.d(c,"softplus",(function(){return Nh.td})),n.d(c,"spaceToBatchND",(function(){return Nh.ud})),n.d(c,"fft",(function(){return Nh.pb})),n.d(c,"ifft",(function(){return Nh.yb})),n.d(c,"irfft",(function(){return Nh.Cb})),n.d(c,"rfft",(function(){return Nh.Zc})),n.d(c,"split",(function(){return Nh.yd})),n.d(c,"sqrt",(function(){return Nh.zd})),n.d(c,"square",(function(){return Nh.Ad})),n.d(c,"squaredDifference",(function(){return Nh.Bd})),n.d(c,"squeeze",(function(){return Nh.Cd})),n.d(c,"stack",(function(){return Nh.Dd})),n.d(c,"step",(function(){return Nh.Ed})),n.d(c,"stridedSlice",(function(){return Nh.Fd})),n.d(c,"sub",(function(){return Nh.Hd})),n.d(c,"sum",(function(){return Nh.Id})),n.d(c,"tan",(function(){return Nh.Jd})),n.d(c,"tanh",(function(){return Nh.Kd})),n.d(c,"tensor",(function(){return Nh.Ld})),n.d(c,"tensor1d",(function(){return Nh.Md})),n.d(c,"tensor2d",(function(){return Nh.Nd})),n.d(c,"tensor3d",(function(){return Nh.Od})),n.d(c,"tensor4d",(function(){return Nh.Pd})),n.d(c,"tensor5d",(function(){return Nh.Qd})),n.d(c,"tensor6d",(function(){return Nh.Rd})),n.d(c,"tile",(function(){return Nh.Sd})),n.d(c,"topk",(function(){return Nh.Td})),n.d(c,"truncatedNormal",(function(){return Nh.Vd})),n.d(c,"unique",(function(){return Nh.Wd})),n.d(c,"unsortedSegmentSum",(function(){return Nh.Xd})),n.d(c,"unstack",(function(){return Nh.Yd})),n.d(c,"upperBound",(function(){return Nh.Zd})),n.d(c,"variable",(function(){return Nh.ae})),n.d(c,"where",(function(){return Nh.be})),n.d(c,"whereAsync",(function(){return Nh.ce})),n.d(c,"zeros",(function(){return Nh.de})),n.d(c,"zerosLike",(function(){return Nh.ee})),n.d(c,"op",(function(){return Nh.uc})),n.d(c,"OP_SCOPE_SUFFIX",(function(){return Nh.a})),n.d(c,"image",(function(){return Nh.Ab})),n.d(c,"linalg",(function(){return Nh.Jb})),n.d(c,"losses",(function(){return Nh.Vb})),n.d(c,"spectral",(function(){return Nh.xd})),n.d(c,"fused",(function(){return Nh.tb})),n.d(c,"signal",(function(){return Nh.kd})),n.d(c,"sparse",(function(){return Nh.vd})),n.d(c,"string",(function(){return Nh.Gd})),n.d(c,"booleanMaskAsync",(function(){return Nh.y})),n.d(c,"transpose",(function(){return Nh.Ud})),n.d(c,"norm",(function(){return Nh.pc})),n.d(c,"movingAverage",(function(){return Nh.kc})),n.d(c,"scatterND",(function(){return Nh.dd})),n.d(c,"searchSorted",(function(){return Nh.ed})),n.d(c,"sparseToDense",(function(){return Nh.wd})),n.d(c,"gatherND",(function(){return Nh.vb})),n.d(c,"dropout",(function(){return Nh.eb})),n.d(c,"enclosingPowerOfTwo",(function(){return Nh.hb})),n.d(c,"cosineWindow",(function(){return Nh.T})),n.d(c,"inTopKAsync",(function(){return Nh.Bb})),{}),h=(n.r(l),n.d(l,"array",(function(){return cf})),n.d(l,"Dataset",(function(){return sf})),n.d(l,"zip",(function(){return lf})),n.d(l,"CSVDataset",(function(){return vf})),n.d(l,"TextLineDataset",(function(){return ff})),n.d(l,"csv",(function(){return Sf})),n.d(l,"func",(function(){return _f})),n.d(l,"generator",(function(){return Of})),n.d(l,"microphone",(function(){return Df})),n.d(l,"webcam",(function(){return Tf})),n.d(l,"FileDataSource",(function(){return kf})),n.d(l,"URLDataSource",(function(){return Ef})),n.d(l,"version_data",(function(){return Bf})),{}),f=(n.r(h),n.d(h,"simpleAbsImpl",(function(){return ad})),n.d(h,"addImpl",(function(){return nd})),n.d(h,"bincountImpl",(function(){return pd})),n.d(h,"bincountReduceImpl",(function(){return md})),n.d(h,"castImpl",(function(){return Jf})),n.d(h,"ceilImpl",(function(){return gd})),n.d(h,"concatImpl",(function(){return Ad})),n.d(h,"equalImpl",(function(){return Ed})),n.d(h,"expImpl",(function(){return Md})),n.d(h,"expm1Impl",(function(){return Fd})),n.d(h,"floorImpl",(function(){return $d})),n.d(h,"gatherNdImpl",(function(){return Qd})),n.d(h,"gatherV2Impl",(function(){return Vd})),n.d(h,"greaterImpl",(function(){return qd})),n.d(h,"greaterEqualImpl",(function(){return Gd})),n.d(h,"lessImpl",(function(){return Wd})),n.d(h,"lessEqualImpl",(function(){return Kd})),n.d(h,"linSpaceImpl",(function(){return Yd})),n.d(h,"logImpl",(function(){return Xd})),n.d(h,"maxImpl",(function(){return Jd})),n.d(h,"maximumImpl",(function(){return ep})),n.d(h,"minimumImpl",(function(){return ap})),n.d(h,"multiplyImpl",(function(){return xd})),n.d(h,"negImpl",(function(){return dp})),n.d(h,"notEqualImpl",(function(){return wp})),n.d(h,"prodImpl",(function(){return Bp})),n.d(h,"raggedGatherImpl",(function(){return jp})),n.d(h,"raggedRangeImpl",(function(){return Rp})),n.d(h,"raggedTensorToTensorImpl",(function(){return $p})),n.d(h,"rangeImpl",(function(){return Vp})),n.d(h,"rsqrtImpl",(function(){return tm})),n.d(h,"scatterImpl",(function(){return rm})),n.d(h,"sigmoidImpl",(function(){return qf})),n.d(h,"sliceImpl",(function(){return fd})),n.d(h,"sparseFillEmptyRowsImpl",(function(){return gm})),n.d(h,"sparseReshapeImpl",(function(){return vm})),n.d(h,"sparseSegmentReductionImpl",(function(){return ym})),n.d(h,"sqrtImpl",(function(){return Em})),n.d(h,"squaredDifferenceImpl",(function(){return Om})),n.d(h,"stridedSliceImpl",(function(){return Bm})),n.d(h,"stringNGramsImpl",(function(){return jm})),n.d(h,"stringSplitImpl",(function(){return Fm})),n.d(h,"stringToHashBucketFastImpl",(function(){return Pm})),n.d(h,"subImpl",(function(){return Ld})),n.d(h,"tileImpl",(function(){return Hm})),n.d(h,"topKImpl",(function(){return qm})),n.d(h,"transposeImpl",(function(){return sd})),n.d(h,"uniqueImpl",(function(){return Xm})),n(0)),d=n(4),p=n(15),m=n(11),g=n(91),A={kernelName:d.a,inputsToSave:["x"],gradFunc:(e,t)=>{const[n]=t;return{x:()=>Object(m.a)(e,Object(g.a)(Object(p.a)(n,"float32"),-1))}}},v=n(18),b=n(35),y=n(22),w=n(47),x=n(31),C=n(17),k={kernelName:d.b,inputsToSave:["x"],gradFunc:(e,t)=>{const[n]=t;return{x:()=>{var t=Object(x.a)(Object(p.a)(n,"float32"));t=Object(w.a)(Object(C.a)(Object(y.a)(1),t));return Object(b.a)(Object(v.a)(e,t))}}}},E={kernelName:d.c,inputsToSave:["x"],gradFunc:(e,t)=>{const[n]=t;return{x:()=>{var t=Object(w.a)(Object(C.a)(Object(x.a)(Object(p.a)(n,"float32")),1));return Object(v.a)(e,t)}}}},S=n(20),_=n(9),O=n(21),T={kernelName:d.d,inputsToSave:["a","b"],gradFunc:(e,t)=>{const[n,r]=t,i=S.assertAndGetBroadcastShape(n.shape,r.shape);return{a:()=>{let t=e;var r=S.getReductionAxes(n.shape,i);return 0<r.length&&(t=Object(O.a)(t,r)),Object(_.a)(t,n.shape)},b:()=>{let t=e;var n=S.getReductionAxes(r.shape,i);return 0<n.length&&(t=Object(O.a)(t,n)),Object(_.a)(t,r.shape)}}}},D={kernelName:d.e,saveAllInputs:!0,gradFunc:(e,t)=>{const n={};return t.forEach((t,r)=>{n[r]=()=>e.clone()}),n}},B=n(23),I={kernelName:d.h,inputsToSave:["x"],gradFunc:(e,t)=>{const[n]=t;return{x:()=>Object(B.a)(n)}}},M={kernelName:d.i,inputsToSave:["x"],gradFunc:(e,t)=>{const[n]=t;return{x:()=>Object(B.a)(n)}}},j={kernelName:d.j,inputsToSave:["x"],gradFunc:(e,t)=>{const[n]=t;return{x:()=>Object(v.a)(e,Object(w.a)(Object(C.a)(Object(y.a)(1),Object(x.a)(Object(p.a)(n,"float32")))))}}},N=n(16),F={kernelName:d.k,inputsToSave:["x"],gradFunc:(e,t)=>{const[n]=t;return{x:()=>{var t=Object(w.a)(Object(N.a)(Object(y.a)(1),Object(x.a)(Object(p.a)(n,"float32"))));return Object(v.a)(e,t)}}}},R={kernelName:d.m,inputsToSave:["a","b"],gradFunc:(e,t)=>{const[n,r]=t,i=Object(S.assertAndGetBroadcastShape)(n.shape,r.shape);return{a:()=>{var t=Object(N.a)(Object(x.a)(n),Object(x.a)(r));let o=Object(m.a)(e,Object(v.a)(r,t));return 0<(t=Object(S.getReductionAxes)(n.shape,i)).length&&(o=Object(O.a)(o,t)),Object(_.a)(o,n.shape)},b:()=>{var t=Object(N.a)(Object(x.a)(n),Object(x.a)(r));let o=Object(b.a)(Object(m.a)(e,Object(v.a)(n,t)));return 0<(t=Object(S.getReductionAxes)(r.shape,i)).length&&(o=Object(O.a)(o,t)),Object(_.a)(o,r.shape)}}}},P={kernelName:d.l,inputsToSave:["x"],gradFunc:(e,t)=>{const[n]=t;return{x:()=>Object(v.a)(e,Object(N.a)(Object(x.a)(Object(p.a)(n,"float32")),1))}}},L={kernelName:d.n,inputsToSave:["x"],gradFunc:(e,t)=>{const[n]=t;return{x:()=>Object(v.a)(e,Object(C.a)(Object(y.a)(1),Object(x.a)(Object(p.a)(n,"float32"))))}}},U=n(6),z=n(3),H=n(10),$=n(29),Q=n(5);const V=Object(Q.b)({avgPool3dGrad_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t,n,r,i,o){e=Object(z.a)(e,"dy","avgPool3dGrad"),t=Object(z.a)(t,"input","avgPool3dGrad");let a=e,s=t,u=!1;return 4===t.rank&&(u=!0,a=Object(_.a)(e,[1,e.shape[0],e.shape[1],e.shape[2],e.shape[3]]),s=Object(_.a)(t,[1,t.shape[0],t.shape[1],t.shape[2],t.shape[3]])),H.b(5===a.rank,()=>"Error in avgPool3dGrad: dy must be rank 5 but got rank "+a.rank+"."),H.b(5===s.rank,()=>"Error in avgPool3dGrad: input must be rank 5 but got rank "+s.rank+"."),Object($.a)("avgPool3dGrad",i,o),e={dy:a,input:s},t=U.a.runKernel(d.q,e,{filterSize:n,strides:r,pad:i,dimRoundingMode:o}),u?Object(_.a)(t,[t.shape[1],t.shape[2],t.shape[3],t.shape[4]]):t}});
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */var q={kernelName:d.p,inputsToSave:["x"],gradFunc:(e,t,n)=>{const[r]=t,{filterSize:i,strides:o,pad:a,dimRoundingMode:s}=n;return{x:()=>V(e,r,i,o,a,s)}}};
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */const G=Object(Q.b)({avgPoolGrad_:function(e,t,n,r,i){const o=Object(z.a)(e,"dy","avgPoolGrad"),a=Object(z.a)(t,"input","avgPoolGrad");H.b(a.rank===o.rank,()=>`Rank of input (${a.rank}) does not match rank of dy (${o.rank})`);let s=a,u=o,c=!1;return 3===a.rank&&(c=!0,s=Object(_.a)(a,[1,a.shape[0],a.shape[1],a.shape[2]]),u=Object(_.a)(o,[1,o.shape[0],o.shape[1],o.shape[2]])),H.b(4===u.rank,()=>"Error in avgPoolGrad: dy must be rank 4 but got rank "+u.rank+"."),H.b(4===s.rank,()=>"Error in avgPoolGrad: input must be rank 4 but got rank "+s.rank+"."),e={dy:u,input:s},t=U.a.runKernel(d.r,e,{filterSize:n,strides:r,pad:i}),c?Object(_.a)(t,[t.shape[1],t.shape[2],t.shape[3]]):t}});
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */var W={kernelName:d.o,inputsToSave:["x"],gradFunc:(e,t,n)=>{const[r]=t,{filterSize:i,strides:o,pad:a}=n;return{x:()=>G(e,r,i,o,a)}}},K=n(30),Y={kernelName:d.s,inputsToSave:["a","b"],gradFunc:(e,t,n)=>{const[r,i]=t;var{transposeA:t,transposeB:n}=n;return t||n?!t&&n?{a:()=>Object(K.a)(e,i,!1,!1),b:()=>Object(K.a)(e,r,!0,!1)}:t&&!n?{a:()=>Object(K.a)(i,e,!1,!0),b:()=>Object(K.a)(r,e,!1,!1)}:{a:()=>Object(K.a)(i,e,!0,!0),b:()=>Object(K.a)(e,r,!0,!0)}:{a:()=>Object(K.a)(e,i,!1,!0),b:()=>Object(K.a)(r,e,!0,!1)}}},X=n(111),J={kernelName:d.t,gradFunc:(e,t,n)=>{const{blockShape:r,crops:i}=n;return{x:()=>Object(X.a)(e,r,i)}}},Z={kernelName:d.w,gradFunc:(e,t,n)=>{var r=n.inputShape,i=n.shape;const o=Array.from(i);for(let e=r.length-1;0<=e;e--)if(r[e]===i[e])o[e]=1;else if(1!==r[e])throw new Error(`broadcastTo(): [${r}] cannot be broadcast to [${i}].`);const a=[];for(let e=0;e<o.length;e++)1<o[e]&&a.push(e);return{x:()=>Object(O.a)(e,a,!0)}}},ee={kernelName:d.x,gradFunc:e=>({x:()=>e.clone()})},te={kernelName:d.y,gradFunc:e=>({x:()=>Object(B.a)(e)})},ne=n(78),re=n(64),ie=n(68),oe=n(42),ae={kernelName:d.z,inputsToSave:["x"],gradFunc:(e,t,n)=>{const[r]=t,{clipValueMin:i,clipValueMax:o}=n;return{x:()=>Object(oe.a)(Object(ie.a)(Object(ne.a)(r,i),Object(re.a)(r,o)),e,Object(B.a)(e))}}},se={kernelName:d.B,inputsToSave:["x"],gradFunc:A.gradFunc},ue=n(69),ce={kernelName:d.C,saveAllInputs:!0,gradFunc:(e,t,n)=>{const r=t.map(e=>e.shape);n=n.axis;const i=Object(H.I)(n,t[0].shape)[0];n=r.map(e=>e[i]);return Object(ue.a)(e,n,i).map(e=>()=>e)}},le=n(154),he=n(152),fe={kernelName:d.D,inputsToSave:["x","filter"],gradFunc:(e,t,n)=>{const[r,i]=t,{dilations:o,strides:a,pad:s,dataFormat:u}=n;return H.b($.j(o),()=>`Error in gradient of conv2D: dilation rates greater than 1 are not yet supported in gradients. Got dilations '${o}'`),{x:()=>Object(he.a)(r.shape,e,i,a,s,u),filter:()=>Object(le.a)(r,e,i.shape,a,s,u)}}},de=n(77),pe={kernelName:d.F,inputsToSave:["dy","filter"],gradFunc:(e,t,n)=>{const[r,i]=t,{strides:o,pad:a,dataFormat:s,dimRoundingMode:u}=n;return{dy:()=>Object(de.a)(e,i,o,a,s,1,u),filter:()=>Object(le.a)(e,r,i.shape,o,a,s,u)}}};const me=Object(Q.b)({conv3DBackpropFilter_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t,n,r,i){let o=e,a=(4===e.rank&&(o=Object(_.a)(e,[1,e.shape[0],e.shape[1],e.shape[2],e.shape[3]])),t);return 4===a.rank&&(a=Object(_.a)(t,[1,t.shape[0],t.shape[1],t.shape[2],t.shape[3]])),H.b(5===o.rank,()=>"Error in conv3dDerFilter: input must be rank 5, but got shape "+o.shape+"."),H.b(5===a.rank,()=>"Error in conv3dDerFilter: dy must be rank 5, but got shape "+a.shape+"."),H.b(5===n.length,()=>"Error in conv3dDerFilter: filterShape must be length 5, but got "+n+"."),H.b(o.shape[4]===n[3],()=>`Error in conv3dDerFilter: depth of input ${o.shape[4]}) must match input depth in filter (${n[3]}.`),H.b(a.shape[4]===n[4],()=>`Error in conv3dDerFilter: depth of dy (${a.shape[4]}) must match output depth for filter (${n[4]}).`),e={x:o,dy:a},U.a.runKernel(d.H,e,{strides:r,pad:i,filterShape:n})}});var ge=n(211),Ae={kernelName:d.G,inputsToSave:["x","filter"],gradFunc:(e,t,n)=>{const{dilations:r,strides:i,pad:o}=n,[a,s]=(H.b(Object($.j)(r),()=>`Error in gradient of conv3D: dilation rates greater than 1 are not yet supported in gradients. Got dilations '${r}'`),t);return{x:()=>Object(ge.a)(a.shape,e,s,i,o),filter:()=>me(a,e,s.shape,i,o)}}},ve=n(202),be={kernelName:d.J,inputsToSave:["x"],gradFunc:(e,t)=>{const[n]=t;return{x:()=>Object(m.a)(Object(b.a)(Object(ve.a)(Object(p.a)(n,"float32"))),e)}}},ye=n(203),we={kernelName:d.K,inputsToSave:["x"],gradFunc:(e,t)=>{const[n]=t;return{x:()=>Object(m.a)(Object(ye.a)(Object(p.a)(n,"float32")),e)}}},xe=n(48),Ce=n(136),ke=n(52),Ee={kernelName:d.N,inputsToSave:["x"],gradFunc:(e,t,n)=>{const[r]=t,{axis:i,exclusive:o,reverse:a}=n;return{x:()=>{var t=Object(xe.f)([i],r.rank);let n=Object(Ce.a)(e,i,o,!a);return null!=t?Object(ke.a)(n,t):n}}}},Se=n(215),_e=n(214),Oe={kernelName:d.Q,inputsToSave:["x","filter"],gradFunc:(e,t,n)=>{const{dilations:r,strides:i,pad:o,dimRoundingMode:a}=n,s=null==r?[1,1]:r,[u,c]=(H.b($.j(s),()=>`Error in gradient of depthwiseConv2dNative: dilation rates greater than 1 are not yet supported. Got dilations '${s}'`),t);return H.b(4===u.rank,()=>`Error in gradient of depthwiseConv2dNative: input must be rank 4, but got rank ${u.rank}.`),H.b(4===c.rank,()=>`Error in gradient of depthwiseConv2dNative: filter must be rank 4, but got rank ${c.rank}.`),H.b(u.shape[3]===c.shape[2],()=>`Error in gradient of depthwiseConv2d: number of input channels (${u.shape[3]}) must match the inChannels dimension in filter ${c.shape[2]}.`),H.b($.i(i,s),()=>`Error in gradient of depthwiseConv2d: Either strides or dilations must be  1. Got strides ${i} and dilations '${s}'.`),$.a("depthwiseConv2d",o,a),{x:()=>Object(_e.a)(u.shape,e,c,i,o,s,a),filter:()=>Object(Se.a)(u,e,c.shape,i,o,s,a)}}},Te={kernelName:d.U,inputsToSave:["x","filter"],gradFunc:(e,t,n)=>{var[t,r]=t;const i={x:t,filter:r,dy:e},o={x:t,filter:r,dy:e};return{x:()=>U.a.runKernel(d.W,i,n),filter:()=>U.a.runKernel(d.V,o,n)}}},De={kernelName:d.Y,outputsToSave:[!0],gradFunc:(e,t)=>{var[t]=t;const n={dy:e,y:t};return{x:()=>U.a.runKernel(d.Z,n)}}},Be=n(49),Ie={kernelName:d.bb,inputsToSave:["x"],gradFunc:(e,t)=>{var[t]=t;const n=Object(m.a)(Object(Be.a)(Object(b.a)(Object(x.a)(t))),2/Math.sqrt(Math.PI));return{x:()=>Object(m.a)(e,n)}}},Me={kernelName:d.cb,outputsToSave:[!0],gradFunc:(e,t)=>{const[n]=t;return{x:()=>Object(m.a)(e,n)}}},je={kernelName:d.db,inputsToSave:["input"],gradFunc:(e,t)=>{const[n]=t;return{input:()=>Object(_.a)(e,n.shape)}}},Ne={kernelName:d.eb,inputsToSave:["x"],gradFunc:(e,t)=>{const[n]=t;return{x:()=>Object(m.a)(e,Object(Be.a)(n))}}},Fe={kernelName:d.ib,gradFunc:e=>({x:()=>Object(B.a)(e)})},Re={kernelName:d.jb,inputsToSave:["a","b"],gradFunc:(e,t)=>{const[n,r]=t,i=Object(S.assertAndGetBroadcastShape)(n.shape,r.shape);return{a:()=>{var t=Object(v.a)(e,Object(p.a)(r,"float32")),o=Object(S.getReductionAxes)(n.shape,i);return 0<o.length?Object(_.a)(Object(O.a)(t,o),n.shape):t},b:()=>{let t=Object(m.a)(e,Object(p.a)(n,"float32"));var o=(0<(o=Object(S.getReductionAxes)(r.shape,i)).length&&(t=Object(_.a)(Object(O.a)(t,o),r.shape)),Object(x.a)(r));return Object(b.a)(Object(v.a)(t,Object(p.a)(o,"float32")))}}}},Pe=n(199),Le=n(82),Ue={kernelName:d.lb,inputsToSave:["x","mean","variance","scale"],gradFunc:(e,t,n)=>{n=n.varianceEpsilon;const[r,i,o,a]=t,s=null==a?Object(y.a)(1):a,u=Object(S.getReductionAxes)(i.shape,r.shape),c=[];if(1===i.rank){for(let e=0;e<r.shape.length-1;++e)c.push(r.shape[e]);c.push(1)}const l=Object(C.a)(r,i),h=Object(m.a)(e,s),f=Object(Pe.a)(Object(N.a)(o,Object(y.a)(n))),d=Object(m.a)(Object(m.a)(Object(m.a)(f,f),f),Object(y.a)(-.5));return{x:()=>1===i.rank?Object(_.a)(Object(m.a)(Object(m.a)(e,Object(Le.a)(Object(_.a)(f,[1,1,1,i.shape[0]]),c)),s),r.shape):Object(_.a)(Object(m.a)(Object(m.a)(e,f),s),r.shape),mean:()=>{let e=Object(m.a)(Object(m.a)(f,Object(y.a)(-1)),h);return 1===i.rank&&(e=Object(O.a)(e,u)),Object(_.a)(e,i.shape)},variance:()=>{let e=Object(m.a)(Object(m.a)(d,l),h);return 1===i.rank&&(e=Object(O.a)(e,u)),Object(_.a)(e,i.shape)},scale:()=>{var t=Object(m.a)(l,f);let n=Object(m.a)(e,t);return 1===i.rank&&(n=Object(O.a)(n,u)),Object(_.a)(n,i.shape)},offset:()=>{let t=e;return 1===i.rank&&(t=Object(O.a)(t,u)),Object(_.a)(t,i.shape)}}}},ze=n(151),He={kernelName:d.pb,inputsToSave:["x","indices"],gradFunc:(e,t,n)=>{const[r,i]=t,o=n.axis,a=Object(H.I)(o,r.shape)[0];return{x:()=>{const t=r.shape;var n=i.size,s=(l=t.slice(0,a)).length,u=(h=t.slice(o,t.length).slice(1)).length,c=$e(0,s),l=(u=$e(s+1,s+1+u),Qe([l,[n],h])),h=Object(_.a)(e,l);l=Object(_.a)(i,[n]),n=Qe([[s],c,u]),s=Object(ke.a)(h,n),c=Object(ze.a)(s,l,r.shape[a]),u=Object(xe.h)(n);return Object(ke.a)(c,u)},indices:()=>i}}};
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function $e(e,t){const n=[];for(let r=e;r<t;++r)n.push(r);return n}function Qe(e){const t=[];for(let n=0;n<e.length;++n)for(let r=0;r<e[n].length;++r)t.push(e[n][r]);return t}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */var Ve={kernelName:d.rb,inputsToSave:["a","b"],gradFunc:(e,t)=>{const[n,r]=t;return{a:()=>Object(B.a)(n),b:()=>Object(B.a)(r)}}},qe={kernelName:d.tb,gradFunc:e=>({x:()=>Object(p.a)(e,"float32")})},Ge={kernelName:d.vb,gradFunc:e=>({x:()=>Object(B.a)(e)})},We={kernelName:d.wb,gradFunc:e=>({x:()=>Object(B.a)(e)})},Ke={kernelName:d.xb,gradFunc:e=>({x:()=>Object(B.a)(e)})},Ye=n(51),Xe={kernelName:d.Ab,inputsToSave:["x"],gradFunc:(e,t,n)=>{var[t]=t;const r=n.alpha,i=Object(Ye.a)(t,0);return{x:()=>Object(oe.a)(i,e,Object(m.a)(e,r))}}},Je={kernelName:d.Fb,inputsToSave:["x"],gradFunc:(e,t)=>{const[n]=t;return{x:()=>Object(v.a)(e,Object(N.a)(n,1))}}},Ze={kernelName:d.Eb,inputsToSave:["x"],gradFunc:(e,t)=>{const[n]=t;return{x:()=>Object(v.a)(e,Object(p.a)(n,"float32"))}}},et={kernelName:d.Gb,inputsToSave:[],outputsToSave:[!0],gradFunc:(e,t,n)=>{const[r]=t,i=n.axis;return{logits:()=>{var t=Object(Be.a)(r);return Object(C.a)(e,Object(m.a)(Object(O.a)(e,i,!0),t))}}}};
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */const tt=Object(Q.b)({localResponseNormalizationBackprop_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t,n,r=5,i=1,o=1,a=.5){return U.a.runKernel(d.zb,{x:e,y:t,dy:n},{depthRadius:r,bias:i,alpha:o,beta:a})}});
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */var nt={kernelName:d.yb,inputsToSave:["x"],outputsToSave:[!0],gradFunc:(e,t,n)=>{const[r,i]=t,{depthRadius:o,bias:a,alpha:s,beta:u}=n;return{x:()=>tt(r,i,e,o,a,s,u)}}},rt=n(106);
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function it(e,t,n,r){return t.rank<n.rank&&(t=Object(_.a)(t,xe.e(t.shape,r))),e.rank<n.rank&&(e=Object(_.a)(e,xe.e(e.shape,r))),{x:()=>Object(m.a)(e,Object(p.a)(Object(rt.a)(n,t),e.dtype))}}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */var ot={kernelName:d.Mb,inputsToSave:["x"],outputsToSave:[!0],gradFunc:(e,t,n)=>{n=n.reductionIndices;var r=t[0];const i=it(e,t[1],r,H.I(n,r.shape));return{x:()=>i.x()}}},at=n(140),st={kernelName:d.Sb,inputsToSave:["a","b"],gradFunc:(e,t)=>{const[n,r]=t;return{a:()=>Object(m.a)(e,Object(p.a)(Object(ne.a)(n,r),"float32")),b:()=>Object(m.a)(e,Object(p.a)(Object(at.a)(n,r),"float32"))}}};const ut=Object(Q.b)({maxPool3dGrad_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t,n,r,i,o,a){e=Object(z.a)(e,"dy","maxPool3dGrad"),t=Object(z.a)(t,"input","maxPool3dGrad"),n=Object(z.a)(n,"output","maxPool3dGrad");let s=e,u=t,c=n,l=!1;return 4===t.rank&&(l=!0,s=Object(_.a)(e,[1,e.shape[0],e.shape[1],e.shape[2],e.shape[3]]),u=Object(_.a)(t,[1,t.shape[0],t.shape[1],t.shape[2],t.shape[3]]),c=Object(_.a)(n,[1,n.shape[0],n.shape[1],n.shape[2],n.shape[3]])),H.b(5===s.rank,()=>"Error in maxPool3dGrad: dy must be rank 5 but got rank "+s.rank+"."),H.b(5===u.rank,()=>"Error in maxPool3dGrad: input must be rank 5 but got rank "+u.rank+"."),H.b(5===c.rank,()=>"Error in maxPool3dGrad: output must be rank 5 but got rank "+c.rank+"."),Object($.a)("maxPool3dGrad",o,a),e={dy:s,input:u,output:c},t=U.a.runKernel(d.Pb,e,{filterSize:r,strides:i,pad:o,dimRoundingMode:a}),l?Object(_.a)(t,[t.shape[1],t.shape[2],t.shape[3],t.shape[4]]):t}});
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */var ct={kernelName:d.Ob,inputsToSave:["x"],outputsToSave:[!0],gradFunc:(e,t,n)=>{const[r,i]=t,{filterSize:o,strides:a,pad:s,dimRoundingMode:u}=n;return{x:()=>ut(e,r,i,o,a,s,u)}}};
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */const lt=Object(Q.b)({maxPoolGrad_:function(e,t,n,r,i,o,a){const s=Object(z.a)(e,"dy","maxPoolGrad"),u=Object(z.a)(t,"input","maxPoolGrad");return e=Object(z.a)(n,"output","maxPoolGrad"),H.b(u.rank===s.rank,()=>`Rank of input (${u.rank}) does not match rank of dy (${s.rank})`),H.b(4===s.rank,()=>"Error in maxPoolGrad: dy must be rank 4 but got rank "+s.rank+"."),H.b(4===u.rank,()=>"Error in maxPoolGrad: input must be rank 4 but got rank "+u.rank+"."),$.a("maxPoolGrad",o,a),t={dy:s,input:u,output:e},U.a.runKernel(d.Qb,t,{filterSize:r,strides:i,pad:o,dimRoundingMode:a})}});
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */Q={kernelName:d.Nb,inputsToSave:["x"],outputsToSave:[!0],gradFunc:(e,t,n)=>{const[r,i]=t,{filterSize:o,strides:a,pad:s}=n;return{x:()=>lt(e,r,i,o,a,s)}}};var ht=n(63),ft={kernelName:d.Tb,inputsToSave:["x"],gradFunc:(e,t,n)=>{const[r]=t;t=n.axis;const i=H.I(t,r.shape);n=Object(xe.d)(r.shape,i)[1];const o=H.O(n);return{x:()=>{const t=r.shape.slice();i.forEach(e=>{t[e]=1});var n=Object(_.a)(e,t);return Object(v.a)(Object(m.a)(n,Object(ht.a)(r.shape,"float32")),o)}}}},dt={kernelName:d.Ub,inputsToSave:["x"],outputsToSave:[!0],gradFunc:(e,t,n)=>{n=n.axis;var[t,r]=t;const i=it(e,r,t,H.I(n,t.shape));return{x:()=>i.x()}}},pt={kernelName:d.Vb,inputsToSave:["a","b"],gradFunc:(e,t)=>{const[n,r]=t;return{a:()=>Object(m.a)(e,Object(p.a)(Object(re.a)(n,r),"float32")),b:()=>Object(m.a)(e,Object(p.a)(Object(Ye.a)(n,r),"float32"))}}},mt=n(34),gt={kernelName:d.Wb,inputsToSave:["x"],gradFunc:(e,t,n)=>{const r=t[0],i=n.paddings.map(e=>e[0]);return{x:()=>Object(mt.a)(e,i,r.shape)}}},At=n(138),vt={kernelName:d.Xb,inputsToSave:["a","b"],gradFunc:(e,t)=>{const[n,r]=t,i=Object(S.assertAndGetBroadcastShape)(n.shape,r.shape);return{a:()=>{var t=Object(S.getReductionAxes)(n.shape,i);return 0<t.length?Object(_.a)(Object(O.a)(e,t),n.shape):e},b:()=>{var t=Object(m.a)(e,Object(b.a)(Object(At.a)(Object(v.a)(n,r)))),o=Object(S.getReductionAxes)(r.shape,i);return 0<o.length?Object(_.a)(Object(O.a)(t,o),r.shape):t}}}},bt={kernelName:d.Zb,inputsToSave:["a","b"],gradFunc:(e,t)=>{const[n,r]=t,i=Object(S.assertAndGetBroadcastShape)(n.shape,r.shape);return{a:()=>{var t=Object(m.a)(e,Object(p.a)(r,"float32")),o=Object(S.getReductionAxes)(n.shape,i);return 0<o.length?Object(_.a)(Object(O.a)(t,o),n.shape):t},b:()=>{var t=Object(m.a)(e,Object(p.a)(n,"float32")),o=Object(S.getReductionAxes)(r.shape,i);return 0<o.length?Object(_.a)(Object(O.a)(t,o),r.shape):t}}}},yt={kernelName:d.ac,gradFunc:e=>({x:()=>Object(b.a)(e)})},wt=n(89),xt={kernelName:d.fc,inputsToSave:["indices"],gradFunc:(e,t)=>{const n=t[0];return{indices:()=>Object(wt.a)(n.shape,"float32")}}},Ct={kernelName:d.gc,gradFunc:e=>({x:()=>Object(B.a)(e)})},kt=n(92),Et={kernelName:d.hc,saveAllInputs:!0,gradFunc:(e,t,n)=>{n=n.axis;return Object(kt.a)(e,n).map(e=>()=>e)}},St={kernelName:d.ic,inputsToSave:["x"],gradFunc:(e,t,n)=>{const r=t[0],i=n.paddings.map(e=>e[0]);return{x:()=>Object(mt.a)(e,i,r.shape)}}},_t=n(84),Ot=n(62),Tt={kernelName:d.kc,inputsToSave:["a","b"],outputsToSave:[!0],gradFunc:(e,t)=>{const[n,r,i]=t,o=n,a=r,s=S.assertAndGetBroadcastShape(o.shape,a.shape);return{a:()=>{var t=Object(p.a)(a,"float32");let n=Object(m.a)(e,Object(m.a)(t,Object(Ot.a)(o,Object(C.a)(t,Object(y.a)(1)))));return 0<(t=S.getReductionAxes(o.shape,s)).length&&(n=Object(O.a)(n,t)),Object(_.a)(n,o.shape)},b:()=>{var t=Object(Ye.a)(o,0);t=Object(oe.a)(t,Object(_t.a)(o),Object(B.a)(o));let n=Object(m.a)(e,Object(m.a)(i,t));return 0<(t=S.getReductionAxes(a.shape,s)).length&&(n=Object(O.a)(n,t)),Object(_.a)(n,a.shape)}}}},Dt={kernelName:d.lc,inputsToSave:["x","alpha"],gradFunc:(e,t)=>{const[n,r]=t,i=Object(Ye.a)(n,0);return{x:()=>Object(oe.a)(i,e,Object(m.a)(e,r)),alpha:()=>{let t=Object(oe.a)(i,Object(B.a)(e),Object(m.a)(e,n));var o=Object(S.getReductionAxes)(r.shape,e.shape);return 0<o.length&&(t=Object(O.a)(t,o)),Object(_.a)(t,r.shape)}}}},Bt=n(167),It=n(120);var Mt={kernelName:d.mc,inputsToSave:["x"],gradFunc:(e,t,n)=>{const[r]=t;t=n.axis;let i=[];return i=null==t?r.shape.map((e,t)=>t):"number"==typeof t?[t]:t,{x:()=>function(e,t,n){var r=e.shape.length,i=r-n.length,o=Bt.de.getAxesPermutation(n,r);let a=e;const s=(a=null!=o?Object(ke.a)(e,o):a).shape.slice();e=s.splice(r-n.length,n.length).reduce((e,t)=>e*t,1),s.push(e);let u=
/**
 * @license
 * Copyright 2022 Google Inc. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t,n){const r=e.shape.slice();r[n]=1;t=Object(_.a)(t,r);var i=Object(It.a)(e,n,!0,!1);e=Object(It.a)(e,n,!0,!0),n=Object(m.a)(i,e);return Object(m.a)(t,n)}(r=a.reshape(s),t,i);return u=u.reshape(a.shape),null!=o&&(n=Bt.de.getUndoAxesPermutation(o),u=Object(ke.a)(u,n)),u}(r,e,i)}}},jt={kernelName:d.sc,inputsToSave:["a","b"],gradFunc:(e,t)=>{const[n,r]=t,i=S.assertAndGetBroadcastShape(n.shape,r.shape);return{a:()=>{var t=Object(v.a)(e,Object(p.a)(r,"float32")),o=S.getReductionAxes(n.shape,i);return 0<o.length?Object(_.a)(Object(O.a)(t,o),n.shape):t},b:()=>{let t=Object(m.a)(e,Object(p.a)(n,"float32"));var o=(0<(o=S.getReductionAxes(r.shape,i)).length&&(t=Object(_.a)(Object(O.a)(t,o),r.shape)),Object(x.a)(r));return Object(b.a)(Object(v.a)(t,Object(p.a)(o,"float32")))}}}},Nt={kernelName:d.tc,inputsToSave:["x"],gradFunc:(e,t)=>{const[n]=t;return{x:()=>Object(v.a)(e,Object(b.a)(Object(x.a)(n)))}}},Ft={kernelName:d.vc,inputsToSave:["x"],gradFunc:(e,t)=>{var[t]=t;const n=Object(m.a)(Object(re.a)(t,6),Object(g.a)(t));return{x:()=>Object(m.a)(e,Object(p.a)(n,"float32"))}}},Rt={kernelName:d.uc,inputsToSave:["x"],gradFunc:(e,t)=>{const[n]=t;return{x:()=>Object(m.a)(e,Object(p.a)(Object(g.a)(n),"float32"))}}},Pt={kernelName:d.wc,inputsToSave:["x"],gradFunc:(e,t)=>{const[n]=t;return{x:()=>Object(_.a)(e,n.shape)}}},Lt={kernelName:d.xc,inputsToSave:["images"],gradFunc:(e,t,n)=>{var[t]=t;const r={dy:e,images:t};return{images:()=>U.a.runKernel(d.yc,r,n)}}},Ut={kernelName:d.zc,inputsToSave:["images"],gradFunc:(e,t,n)=>{var[t]=t;const r={dy:e,images:t};return{images:()=>U.a.runKernel(d.Ac,r,n)}}},zt=n(59),Ht={kernelName:d.Bc,gradFunc:(e,t,n)=>{n=n.dims;const r=Object(H.I)(n,e.shape);return{x:()=>Object(zt.a)(e,r)}}},$t={kernelName:d.Dc,gradFunc:e=>({x:()=>Object(B.a)(e)})},Qt={kernelName:d.Ec,inputsToSave:["x"],gradFunc:(e,t)=>{const[n]=t;return{x:()=>Object(b.a)(Object(v.a)(e,Object(m.a)(Object(Ot.a)(n,1.5),2)))}}},Vt=n(110),qt={kernelName:d.Hc,inputsToSave:["condition"],gradFunc:(e,t)=>{const[n]=t;return{condition:()=>Object(p.a)(Object(B.a)(n),"float32"),t:()=>Object(m.a)(e,Object(p.a)(n,e.dtype)),e:()=>Object(m.a)(e,Object(p.a)(Object(Vt.a)(n),e.dtype))}}},Gt=n(166),Wt={kernelName:d.Ic,inputsToSave:["x"],gradFunc:(e,t)=>{const[n]=t;return{x:()=>{var t=Object(Ye.a)(n,Object(y.a)(0)),r=Object(y.a)(Gt.b),i=Object(y.a)(Gt.a);i=Object(m.a)(e,i),r=Object(m.a)(Object(m.a)(e,r),Object(Be.a)(Object(p.a)(n,"float32")));return Object(oe.a)(t,i,r)}}}},Kt={kernelName:d.Jc,outputsToSave:[!0],gradFunc:(e,t)=>{const[n]=t;return{x:()=>Object(m.a)(e,Object(m.a)(n,Object(C.a)(Object(y.a)(1),n)))}}},Yt={kernelName:d.Kc,gradFunc:e=>({x:()=>Object(B.a)(e)})},Xt=n(135),Jt={kernelName:d.Lc,inputsToSave:["x"],gradFunc:(e,t)=>{const[n]=t;return{x:()=>Object(m.a)(Object(Xt.a)(Object(p.a)(n,"float32")),e)}}},Zt=n(184),en={kernelName:d.Mc,inputsToSave:["x"],gradFunc:(e,t)=>{const[n]=t;return{x:()=>Object(m.a)(Object(Zt.a)(Object(p.a)(n,"float32")),e)}}},tn=n(65),nn=n(132),rn={kernelName:d.Nc,inputsToSave:["x"],gradFunc:(e,t,n)=>{var[t]=t,{begin:n,size:r}=n,i=t.shape,[o,a]=Object(nn.parseSliceParams)(t,n,r);const s=[];for(let t=0;t<e.rank;t++)s.push([o[t],i[t]-o[t]-a[t]]);return{x:()=>Object(tn.a)(e,s)}}},on={kernelName:d.Oc,outputsToSave:[!0],gradFunc:(e,t,n)=>{const[r]=t,i=n.dim,o=Object(m.a)(e,r);return{logits:()=>Object(C.a)(o,Object(m.a)(Object(O.a)(o,[i],!0),r))}}},an=n(80),sn={kernelName:d.Pc,inputsToSave:["x"],gradFunc:(e,t)=>{const[n]=t;return{x:()=>Object(m.a)(e,Object(an.a)(n))}}},un=n(104),cn={kernelName:d.Qc,gradFunc:(e,t,n)=>{const{blockShape:r,paddings:i}=n;return{x:()=>Object(un.a)(e,r,i)}}},ln=n(41),hn={kernelName:d.Wc,gradFunc:(e,t,n)=>{const r=n.axis;return{x:()=>Object(ln.a)(e,r)}}},fn={kernelName:d.Xc,inputsToSave:["x"],gradFunc:(e,t)=>{const[n]=t;return{x:()=>Object(v.a)(e,Object(m.a)(Object(w.a)(Object(p.a)(n,"float32")),2))}}},dn={kernelName:d.Yc,inputsToSave:["x"],gradFunc:(e,t)=>{const[n]=t;return{x:()=>Object(m.a)(e,Object(m.a)(Object(p.a)(n,"float32"),2))}}},pn={kernelName:d.Zc,inputsToSave:["a","b"],gradFunc:(e,t)=>{const[n,r]=t,i=Object(y.a)(2);return{a:()=>Object(m.a)(e,Object(m.a)(i,Object(C.a)(n,r))),b:()=>Object(m.a)(e,Object(m.a)(i,Object(C.a)(r,n)))}}},mn={kernelName:d.ad,gradFunc:e=>({x:()=>Object(B.a)(e)})},gn={kernelName:d.fd,inputsToSave:["a","b"],gradFunc:(e,t)=>{const[n,r]=t,i=S.assertAndGetBroadcastShape(n.shape,r.shape);return{a:()=>{let t=e;var r=S.getReductionAxes(n.shape,i);return 0<r.length&&(t=Object(O.a)(t,r)),Object(_.a)(t,n.shape)},b:()=>{let t=e;var n=S.getReductionAxes(r.shape,i);return 0<n.length&&(t=Object(O.a)(t,n)),Object(_.a)(Object(b.a)(t),r.shape)}}}},An={kernelName:d.gd,inputsToSave:["x"],gradFunc:(e,t,n)=>{const[r]=t,i=r.shape.slice();t=n.axis;Object(H.I)(t,r.shape).forEach(e=>{i[e]=1}),n=Object(_.a)(e,i);const o=Object(m.a)(n,Object(ht.a)(r.shape,"float32"));return{x:()=>o}}},vn={kernelName:d.hd,inputsToSave:["x"],gradFunc:(e,t)=>{const[n]=t;return{x:()=>Object(v.a)(e,Object(x.a)(Object(Xt.a)(n)))}}},bn={kernelName:d.id,outputsToSave:[!0],gradFunc:(e,t)=>{const[n]=t;return{x:()=>Object(m.a)(Object(C.a)(Object(y.a)(1),Object(x.a)(n)),e)}}},yn={kernelName:d.jd,inputsToSave:["x"],gradFunc:(e,t,n)=>{const[r]=t,i=n.reps;return{x:()=>{let t=Object(B.a)(r);if(1===r.rank)for(let n=0;n<i[0];++n)t=Object(N.a)(t,Object(mt.a)(e,[n*r.shape[0]],[r.shape[0]]));else if(2===r.rank)for(let n=0;n<i[0];++n)for(let o=0;o<i[1];++o)t=Object(N.a)(t,Object(mt.a)(e,[n*r.shape[0],o*r.shape[1]],[r.shape[0],r.shape[1]]));else if(3===r.rank)for(let n=0;n<i[0];++n)for(let o=0;o<i[1];++o)for(let a=0;a<i[2];++a)t=Object(N.a)(t,Object(mt.a)(e,[n*r.shape[0],o*r.shape[1],a*r.shape[2]],[r.shape[0],r.shape[1],r.shape[2]]));else{if(4!==r.rank)throw new Error("Gradient for tile operation is not implemented for rank-"+r.rank+" tensors yet.");for(let n=0;n<i[0];++n)for(let o=0;o<i[1];++o)for(let a=0;a<i[2];++a)for(let s=0;s<i[3];++s)t=Object(N.a)(t,Object(mt.a)(e,[n*r.shape[0],o*r.shape[1],a*r.shape[2],s*r.shape[3]],[r.shape[0],r.shape[1],r.shape[2],r.shape[3]]))}return t}}}},wn={kernelName:d.md,gradFunc:(e,t,n)=>{n=n.perm;const r=xe.h(n);return{x:()=>Object(ke.a)(e,r)}}},xn=n(70),Cn={kernelName:d.od,gradFunc:(e,t,n)=>{const r=n.axis;return{value:()=>Object(xn.a)(e,r)}}},kn=n(72),En=n(108),Sn=n(103),_n={kernelName:d.pd,inputsToSave:["segmentIds"],gradFunc:(e,t)=>{const[n]=t;return{x:()=>{{var t=e,r=n,i=Object(Sn.a)(r,Object(B.a)(r));t=Object(En.a)(t,i);let a=Object(ne.a)(r,Object(y.a)(0,"int32"));var o=t.rank-a.rank;for(let e=0;e<o;++e)a=Object(kn.a)(a,e+1);return a=Object(ie.a)(a,Object(ht.a)(t.shape,"bool")),i=Object(B.a)(t),Object(oe.a)(a,t,i)}}}}},On={kernelName:d.rd,gradFunc:e=>({x:()=>Object(B.a)(e)})},Tn=n(71);
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */for(const e of[A,k,E,T,D,I,M,j,F,R,P,L,q,W,Y,J,Z,ee,te,ae,se,ce,pe,fe,Ae,be,we,Ee,Oe,Te,jt,De,Ie,Me,je,Ne,Re,Fe,Ue,He,Ve,qe,Ge,We,Ke,Xe,Je,Ze,et,nt,ot,ot,st,ct,Q,ft,dt,pt,gt,vt,bt,yt,xt,Ct,Et,St,St,Tt,Dt,Mt,Nt,Ft,Rt,Pt,Lt,Ut,Ht,$t,Qt,qt,Wt,Kt,Yt,Jt,en,rn,on,sn,cn,cn,hn,hn,fn,pn,dn,mn,gn,An,vn,bn,yn,wn,Cn,_n,On])Object(Tn.e)(e);var Dn=n(53),Bn=n(7),In=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.abs=function(){return this.throwIfDisposed(),Object(Dn.a)(this)},n(245)),Mn=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.acos=function(){return this.throwIfDisposed(),Object(In.a)(this)},n(246)),jn=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.acosh=function(){return this.throwIfDisposed(),Object(Mn.a)(this)
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.add=function(e){return this.throwIfDisposed(),Object(N.a)(this,e)},n(177)),Nn=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.all=function(e,t){return this.throwIfDisposed(),Object(jn.a)(this,e,t)},n(178)),Fn=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.any=function(e,t){return this.throwIfDisposed(),Object(Nn.a)(this,e,t)},n(179)),Rn=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.argMax=function(e){return this.throwIfDisposed(),Object(Fn.a)(this,e)},n(180)),Pn=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.argMin=function(e){return this.throwIfDisposed(),Object(Rn.a)(this,e)
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.asScalar=function(){return this.throwIfDisposed(),Object(H.b)(1===this.size,()=>"The array must have only 1 element."),Object(_.a)(this,[])
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.asType=function(e){return this.throwIfDisposed(),Object(p.a)(this,e)
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.as1D=function(){return this.throwIfDisposed(),Object(_.a)(this,[this.size])
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.as2D=function(e,t){return this.throwIfDisposed(),Object(_.a)(this,[e,t])
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.as3D=function(e,t,n){return this.throwIfDisposed(),Object(_.a)(this,[e,t,n])
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.as4D=function(e,t,n,r){return this.throwIfDisposed(),Object(_.a)(this,[e,t,n,r])
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.as5D=function(e,t,n,r,i){return this.throwIfDisposed(),Object(_.a)(this,[e,t,n,r,i])},n(247)),Ln=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.asin=function(){return this.throwIfDisposed(),Object(Pn.a)(this)},n(248)),Un=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.asinh=function(){return this.throwIfDisposed(),Object(Ln.a)(this)},n(249)),zn=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.atan=function(){return this.throwIfDisposed(),Object(Un.a)(this)},n(181)),Hn=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.atan2=function(e){return this.throwIfDisposed(),Object(zn.a)(this,e)},n(250)),$n=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.atanh=function(){return this.throwIfDisposed(),Object(Hn.a)(this)},n(134)),Qn=(Object(Bn.d)().prototype.avgPool=function(e,t,n,r){return this.throwIfDisposed(),Object($n.a)(this,e,t,n,r)
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.batchToSpaceND=function(e,t){return this.throwIfDisposed(),Object(un.a)(this,e,t)},n(93)),Vn=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.batchNorm=function(e,t,n,r,i){return this.throwIfDisposed(),Object(Qn.a)(this,e,t,n,r,i)},n(113)),qn=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.broadcastTo=function(e){return this.throwIfDisposed(),Object(Vn.a)(this,e)
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.cast=function(e){return this.throwIfDisposed(),Object(p.a)(this,e)},n(251)),Gn=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.ceil=function(){return this.throwIfDisposed(),Object(qn.a)(this)},n(252)),Wn=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.clipByValue=function(e,t){return this.throwIfDisposed(),Object(Gn.a)(this,e,t)
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.concat=function(e,t){return this.throwIfDisposed(),e instanceof Bn.a&&(e=[e]),Object(ln.a)([this,...e],t)},n(182)),Kn=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.conv1d=function(e,t,n,r,i,o){return this.throwIfDisposed(),Object(Wn.a)(this,e,t,n,r,i,o)},n(183)),Yn=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.conv2dTranspose=function(e,t,n,r,i){return this.throwIfDisposed(),Object(Kn.a)(this,e,t,n,r,i)
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.conv2d=function(e,t,n,r,i,o){return this.throwIfDisposed(),Object(de.a)(this,e,t,n,r,i,o)
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.cos=function(){return this.throwIfDisposed(),Object(Xt.a)(this)
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.cosh=function(){return this.throwIfDisposed(),Object(Zt.a)(this)
/**
 * @license
 * Copyright 2022 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the 'License');
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an 'AS IS' BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.cumprod=function(e,t,n){return this.throwIfDisposed(),Object(It.a)(this,e,t,n)
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.cumsum=function(e,t,n){return this.throwIfDisposed(),Object(Ce.a)(this,e,t,n)},n(185)),Xn=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.depthToSpace=function(e,t){return this.throwIfDisposed(),Object(Yn.a)(this,e,t)},n(105)),Jn=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.depthwiseConv2d=function(e,t,n,r,i,o){return this.throwIfDisposed(),Object(Xn.a)(this,e,t,n,r,i,o)},n(186)),Zn=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.dilation2d=function(e,t,n,r,i){return this.throwIfDisposed(),Object(Jn.a)(this,e,t,n,r,i)},n(187)),er=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.divNoNan=function(e){return this.throwIfDisposed(),Object(Zn.a)(this,e)
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.div=function(e){return this.throwIfDisposed(),Object(v.a)(this,e)},n(188)),tr=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.dot=function(e){return this.throwIfDisposed(),Object(er.a)(this,e)},n(137)),nr=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.elu=function(){return this.throwIfDisposed(),Object(tr.a)(this)
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.equal=function(e){return this.throwIfDisposed(),Object(rt.a)(this,e)},n(253)),rr=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.erf=function(){return this.throwIfDisposed(),Object(nr.a)(this)},n(189)),ir=(
/**
 * @license
 * Copyright 2021 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.euclideanNorm=function(e,t){return this.throwIfDisposed(),Object(rr.a)(this,e,t)
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.exp=function(){return this.throwIfDisposed(),Object(Be.a)(this)
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.expandDims=function(e){return this.throwIfDisposed(),Object(kn.a)(this,e)},n(254)),or=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.expm1=function(){return this.throwIfDisposed(),Object(ir.a)(this)},n(148)),ar=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.fft=function(){return this.throwIfDisposed(),Object(or.a)(this)
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.flatten=function(){return this.throwIfDisposed(),Object(_.a)(this,[this.size])
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.floor=function(){return this.throwIfDisposed(),Object(At.a)(this)},n(133)),sr=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.floorDiv=function(e){return this.throwIfDisposed(),Object(ar.a)(this,e)
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.gather=function(e,t){return this.throwIfDisposed(),Object(En.a)(this,e,t)
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.greaterEqual=function(e){return this.throwIfDisposed(),Object(ne.a)(this,e)
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.greater=function(e){return this.throwIfDisposed(),Object(Ye.a)(this,e)},n(123)),ur=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.ifft=function(){return this.throwIfDisposed(),Object(sr.a)(this)},n(204)),cr=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.irfft=function(){return this.throwIfDisposed(),Object(ur.a)(this)},n(255)),lr=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.isFinite=function(){return this.throwIfDisposed(),Object(cr.a)(this)},n(256)),hr=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.isInf=function(){return this.throwIfDisposed(),Object(lr.a)(this)},n(257)),fr=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.isNaN=function(){return this.throwIfDisposed(),Object(hr.a)(this)},n(139)),dr=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.leakyRelu=function(e){return this.throwIfDisposed(),Object(fr.a)(this,e)
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.lessEqual=function(e){return this.throwIfDisposed(),Object(re.a)(this,e)
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.less=function(e){return this.throwIfDisposed(),Object(at.a)(this,e)},n(190)),pr=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.localResponseNormalization=function(e,t,n,r){return this.throwIfDisposed(),Object(dr.a)(this,e,t,n,r)},n(258)),mr=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.logSigmoid=function(){return this.throwIfDisposed(),Object(pr.a)(this)},n(259)),gr=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.logSoftmax=function(e){return this.throwIfDisposed(),Object(mr.a)(this,e)},n(141)),Ar=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.logSumExp=function(e,t){return this.throwIfDisposed(),Object(gr.a)(this,e,t)
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.log=function(){return this.throwIfDisposed(),Object(_t.a)(this)},n(191)),vr=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.log1p=function(){return this.throwIfDisposed(),Object(Ar.a)(this)
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.logicalAnd=function(e){return this.throwIfDisposed(),Object(ie.a)(this,e)
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.logicalNot=function(){return this.throwIfDisposed(),Object(Vt.a)(this)},n(142)),br=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.logicalOr=function(e){return this.throwIfDisposed(),Object(vr.a)(this,e)},n(193)),yr=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.logicalXor=function(e){return this.throwIfDisposed(),Object(br.a)(this,e)
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.matMul=function(e,t,n){return this.throwIfDisposed(),Object(K.a)(this,e,t,n)},n(143)),wr=(Object(Bn.d)().prototype.maxPool=function(e,t,n,r){return this.throwIfDisposed(),Object(yr.a)(this,e,t,n,r)},n(81)),xr=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.max=function(e,t){return this.throwIfDisposed(),Object(wr.a)(this,e,t)
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.maximum=function(e){return this.throwIfDisposed(),Object(Sn.a)(this,e)},n(97)),Cr=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.mean=function(e,t){return this.throwIfDisposed(),Object(xr.a)(this,e,t)},n(121)),kr=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.min=function(e,t){return this.throwIfDisposed(),Object(Cr.a)(this,e,t)},n(144)),Er=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.minimum=function(e){return this.throwIfDisposed(),Object(kr.a)(this,e)},n(194)),Sr=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.mirrorPad=function(e,t){return this.throwIfDisposed(),Object(Er.a)(this,e,t)},n(195)),_r=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.mod=function(e){return this.throwIfDisposed(),Object(Sr.a)(this,e)
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.mul=function(e){return this.throwIfDisposed(),Object(m.a)(this,e)
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.neg=function(){return this.throwIfDisposed(),Object(b.a)(this)},n(107)),Or=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.norm=function(e,t,n){return this.throwIfDisposed(),Object(_r.a)(this,e,t,n)},n(145)),Tr=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.notEqual=function(e){return this.throwIfDisposed(),Object(Or.a)(this,e)},n(122)),Dr=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.oneHot=function(e,t=1,n=0){return this.throwIfDisposed(),Object(Tr.a)(this,e,t,n)},n(260)),Br=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.onesLike=function(){return this.throwIfDisposed(),Object(Dr.a)(this)
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.pad=function(e,t){return this.throwIfDisposed(),Object(tn.a)(this,e,t)},n(196)),Ir=(Object(Bn.d)().prototype.pool=function(e,t,n,r,i,o){return this.throwIfDisposed(),Object(Br.a)(this,e,t,n,r,i,o)
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.pow=function(e){return this.throwIfDisposed(),Object(Ot.a)(this,e)},n(146)),Mr=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.prelu=function(e){return this.throwIfDisposed(),Object(Ir.a)(this,e)},n(197)),jr=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.prod=function(e,t){return this.throwIfDisposed(),Object(Mr.a)(this,e,t)},n(261)),Nr=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.reciprocal=function(){return this.throwIfDisposed(),Object(jr.a)(this)},n(90)),Fr=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.relu=function(){return this.throwIfDisposed(),Object(Nr.a)(this)},n(147)),Rr=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.relu6=function(){return this.throwIfDisposed(),Object(Fr.a)(this)
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.reshapeAs=function(e){return this.throwIfDisposed(),Object(_.a)(this,e.shape)
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.reshape=function(e){return this.throwIfDisposed(),Object(_.a)(this,e)},n(213)),Pr=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.resizeBilinear=function(e,t,n){return this.throwIfDisposed(),Object(Rr.a)(this,e,t,n)},n(212)),Lr=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.resizeNearestNeighbor=function(e,t,n){return this.throwIfDisposed(),Object(Pr.a)(this,e,t,n)
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.reverse=function(e){return this.throwIfDisposed(),Object(zt.a)(this,e)},n(149)),Ur=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.rfft=function(){return this.throwIfDisposed(),Object(Lr.a)(this)},n(198)),zr=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.round=function(){return this.throwIfDisposed(),Object(Ur.a)(this)
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.rsqrt=function(){return this.throwIfDisposed(),Object(Pe.a)(this)},n(200)),Hr=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.selu=function(){return this.throwIfDisposed(),Object(zr.a)(this)},n(201)),$r=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.separableConv2d=function(e,t,n,r,i,o){return this.throwIfDisposed(),Object(Hr.a)(this,e,t,n,r,i,o)
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.sigmoid=function(){return this.throwIfDisposed(),Object(an.a)(this)},n(262)),Qr=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.sign=function(){return this.throwIfDisposed(),Object($r.a)(this)
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.sin=function(){return this.throwIfDisposed(),Object(ve.a)(this)
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.sinh=function(){return this.throwIfDisposed(),Object(ye.a)(this)
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.slice=function(e,t){return this.throwIfDisposed(),Object(mt.a)(this,e,t)},n(263)),Vr=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.softmax=function(e){return this.throwIfDisposed(),Object(Qr.a)(this,e)},n(192)),qr=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.softplus=function(){return this.throwIfDisposed(),Object(Vr.a)(this)
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.spaceToBatchND=function(e,t){return this.throwIfDisposed(),Object(X.a)(this,e,t)
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.split=function(e,t){return this.throwIfDisposed(),Object(ue.a)(this,e,t)
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.sqrt=function(){return this.throwIfDisposed(),Object(w.a)(this)
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.square=function(){return this.throwIfDisposed(),Object(x.a)(this)},n(150)),Gr=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.squaredDifference=function(e){return this.throwIfDisposed(),Object(qr.a)(this,e)},n(112)),Wr=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.squeeze=function(e){return this.throwIfDisposed(),Object(Gr.a)(this,e)
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.stack=function(e,t){return this.throwIfDisposed(),e=e instanceof Bn.a?[this,e]:[this,...e],Object(xn.a)(e,t)},
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.step=function(e){return this.throwIfDisposed(),Object(g.a)(this,e)},n(264)),Kr=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.stridedSlice=function(e,t,n,r,i,o,a,s){return this.throwIfDisposed(),Object(Wr.a)(this,e,t,n,r,i,o,a,s)
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.sub=function(e){return this.throwIfDisposed(),Object(C.a)(this,e)
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.sum=function(e,t){return this.throwIfDisposed(),Object(O.a)(this,e,t)},n(265)),Yr=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.tan=function(){return this.throwIfDisposed(),Object(Kr.a)(this)},n(165)),Xr=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.tanh=function(){return this.throwIfDisposed(),Object(Yr.a)(this)
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.tile=function(e){return this.throwIfDisposed(),Object(Le.a)(this,e)
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.toBool=function(){return this.throwIfDisposed(),Object(p.a)(this,"bool")
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.toFloat=function(){return this.throwIfDisposed(),Object(p.a)(this,"float32")
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.toInt=function(){return this.throwIfDisposed(),Object(p.a)(this,"int32")},n(206)),Jr=(
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Object(Bn.d)().prototype.topk=function(e,t){return this.throwIfDisposed(),Object(Xr.a)(this,e,t)
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.transpose=function(e){return this.throwIfDisposed(),Object(ke.a)(this,e)},n(207));
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */Object(Bn.d)().prototype.unique=function(e){return this.throwIfDisposed(),Object(Jr.a)(this,e)
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.unsortedSegmentSum=function(e,t){return this.throwIfDisposed(),Object(ze.a)(this,e,t)
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.unstack=function(e){return this.throwIfDisposed(),Object(kt.a)(this,e)
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.where=function(e,t){return this.throwIfDisposed(),Object(oe.a)(e,this,t)
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */},Object(Bn.d)().prototype.zerosLike=function(){return this.throwIfDisposed(),Object(B.a)(this)
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
/**
 * @license
 * Copyright 2018 Google LLC
 *
 * Use of this source code is governed by an MIT-style
 * license that can be found in the LICENSE file or at
 * https://opensource.org/licenses/MIT.
 * =============================================================================
 */};class Zr extends Error{constructor(e){super(e),Object.setPrototypeOf(this,Zr.prototype)}}class ei extends Error{constructor(e){super(e),Object.setPrototypeOf(this,ei.prototype)}}class ti extends Error{constructor(e){super(e),Object.setPrototypeOf(this,ti.prototype)}}class ni extends Error{constructor(e){super(e),Object.setPrototypeOf(this,ni.prototype)}}class ri extends Error{constructor(e){super(e),Object.setPrototypeOf(this,ri.prototype)}}Error;class ii{constructor(e){this.maxEntries=e||100,this.cache=new Map}get(e){let t;return this.cache.has(e)&&(t=this.cache.get(e),this.cache.delete(e),this.cache.set(e,t)),t}put(e,t){var n;this.cache.has(e)?this.cache.delete(e):this.cache.size>=this.maxEntries&&(n=this.cache.keys().next().value,this.cache.delete(n)),this.cache.set(e,t)}getMaxEntries(){return this.maxEntries}setMaxEntries(e){if(e<0)throw new Error(`The maxEntries of LRU caches must be at least 0, but got ${e}.`);if(this.maxEntries>e)for(let n=0;n<this.maxEntries-e;n++){var t=this.cache.keys().next().value;this.cache.delete(t)}this.maxEntries=e}}
/**
 * @license
 * Copyright 2018 Google LLC
 *
 * Use of this source code is governed by an MIT-style
 * license that can be found in the LICENSE file or at
 * https://opensource.org/licenses/MIT.
 * =============================================================================
 */function oi(e,t){if(Array.isArray(e)){let n=[];for(let r=0;r<t;r++)n=n.concat(e);return n}{const n=new Array(t);return n.fill(e),n}}function ai(e,t){if(!e)throw new ri(t)}function si(e,t){let n=0;for(const r of e)r===t&&n++;return n}function ui(e){return 1===e.length?e[0]:e}function ci(e){return Array.isArray(e)?e:[e]}function li(e){const t=e.replace(/(.)([A-Z][a-z0-9]+)/g,"$1_$2");return"_"!==(e=t.replace(/([a-z])([A-Z])/g,"$1_$2").toLowerCase())[0]?e:"private"+e}function hi(e){return e.length<=1||-1===e.indexOf("_")?e:e.replace(/[_]+(\w|$)/g,(e,t)=>t.toUpperCase())}let fi={};function di(e){if(null==e)return null;const t={};return t.className=e.getClassName(),t.config=e.getConfig(),t}function pi(e,t={},n={},r="object",i=!1){if("string"==typeof e){var o=e;let i;if(o in n)i=n[o];else if(o in fi)i=fi[o];else if(null==(i=t[o]))throw new ti(`Unknown ${r}: ${e}. This may be due to one of the following reasons:\n1. The ${r} is defined in Python, in which case it needs to be ported to TensorFlow.js or your JavaScript code.\n2. The custom ${r} is defined in JavaScript, but is not registered properly with tf.serialization.registerClass().`);return i}{if(null==(o=e).className||null==o.config)throw new ti(r+": Improper config format: "+JSON.stringify(o)+".\n'className' and 'config' must set.");let a,s;if((e=o.className)in n?[a,s]=n[e]:e in fi?[a,s]=fi.className:e in t&&([a,s]=t[e]),null==a)throw new ti(`Unknown ${r}: ${e}. This may be due to one of the following reasons:\n1. The ${r} is defined in Python, in which case it needs to be ported to TensorFlow.js or your JavaScript code.\n2. The custom ${r} is defined in JavaScript, but is not registered properly with tf.serialization.registerClass().`);if(null!=s){const r={};for(const e of Object.keys(fi))r[e]=fi[e];for(const e of Object.keys(n))r[e]=n[e];o.config.customObjects=r,t=Object.assign({},fi);for(const e of Object.keys(n))fi[e]=n[e];return function e(t){if(null!=t&&"object"==typeof t)if(Array.isArray(t))t.forEach(t=>e(t));else for(const r of Object.keys(t)){var n=t[r];null!=n&&"object"==typeof n&&(Array.isArray(n)||"ndarray"!==n.type||"number"!=typeof n.value?e(n):t[r]=n.value)}}(o.config),e=s(a,o.config,n,i),fi=Object.assign({},t),e}r=Object.assign({},fi);for(const e of Object.keys(n))fi[e]=n[e];return i=new a(o.config),fi=Object.assign({},r),i}}function mi(e,t){return-1*((e=e)<(t=t)?-1:t<e?1:0)}function gi(e){if(null==e)return e;const t=[];for(const n of e)-1===t.indexOf(n)&&t.push(n);return t}function Ai(e,t,n){if(null!=n&&e.indexOf(n)<0)throw new ti(n+` is not a valid ${t}.  Valid values are ${e} or null/undefined.`)}function vi(e,t,n=0,r=1/0){return ai(0<=n),ai(n<=r),Array.isArray(e)&&e.length>=n&&e.length<=r&&e.every(e=>typeof e===t)}function bi(e,t){Array.isArray(e)?(f.Ji.assert(0<e.length,()=>t+" is unexpectedly an empty array."),e.forEach((e,n)=>bi(e,`element ${n+1} of `+t))):f.Ji.assert(Number.isInteger(e)&&0<e,()=>`Expected ${t} to be a positive integer, but got `+function e(t){return null===t?"null":Array.isArray(t)?"["+t.map(t=>e(t)).join(",")+"]":"string"==typeof t?`"${t}"`:""+t}(e)+".")}function yi(e){return"relu"===e?"relu":"linear"===e?"linear":"elu"===e?"elu":null}
/**
 * @license
 * Copyright 2018 Google LLC
 *
 * Use of this source code is governed by an MIT-style
 * license that can be found in the LICENSE file or at
 * https://opensource.org/licenses/MIT.
 * =============================================================================
 */let wi=0;const xi={};function Ci(e=""){return e in xi||(xi[e]=0),xi[e]+=1,e+xi[e].toString()}
/**
 * @license
 * Copyright 2018 Google LLC
 *
 * Use of this source code is governed by an MIT-style
 * license that can be found in the LICENSE file or at
 * https://opensource.org/licenses/MIT.
 * =============================================================================
 */const ki=["channelsFirst","channelsLast"],Ei=["nearest","bilinear"],Si=["valid","same","causal"],_i=["max","avg"],Oi=["sum","mul","concat","ave"],Ti=new Map;
/**
 * @license
 * Copyright 2018 Google LLC
 *
 * Use of this source code is governed by an MIT-style
 * license that can be found in the LICENSE file or at
 * https://opensource.org/licenses/MIT.
 * =============================================================================
 */function Di(e){Ai(ki,"DataFormat",e)}function Bi(e){Ai(Si,"PaddingMode",e)}function Ii(e){Ai(_i,"PoolMode",e)}const Mi=[];function ji(e,t){Mi.push(e);try{var n=t();return Mi.pop(),n}catch(e){throw Mi.pop(),e}}function Ni(e){if(Pi(e))return(0===Mi.length?"":Mi.join("/")+"/")+e;throw new Error("Not a valid tensor name: '"+e+"'")}function Fi(e){if(!Pi(e))throw new Error("Not a valid tensor name: '"+e+"'");Ti.has(e)||Ti.set(e,0);var t=Ti.get(e);return Ti.set(e,Ti.get(e)+1),0<t?(t=e+"_"+t,Ti.set(t,1),t):e}const Ri=new RegExp(/^[A-Za-z0-9][-A-Za-z0-9\._\/]*$/);function Pi(e){return e.match(Ri)}
/**
 * @license
 * Copyright 2018 Google LLC
 *
 * Use of this source code is governed by an MIT-style
 * license that can be found in the LICENSE file or at
 * https://opensource.org/licenses/MIT.
 * =============================================================================
 */function Li(e,t,n){null==n&&(n=e.length);let r=1;for(let i=t=null==t?0:t;i<n;++i)r*=e[i];return r}function Ui(e){if(0===e.length)return Number.NaN;let t=Number.POSITIVE_INFINITY;for(let r=0;r<e.length;r++){var n=e[r];n<t&&(t=n)}return t}function zi(e){if(0===e.length)return Number.NaN;let t=Number.NEGATIVE_INFINITY;for(let r=0;r<e.length;r++){var n=e[r];n>t&&(t=n)}return t}function Hi(e,t){if(t<e)throw new ti(`end (${t}) < begin (${e}) is forbidden.`);const n=[];for(let r=e;r<t;++r)n.push(r);return n}
/**
 * @license
 * Copyright 2018 Google LLC
 *
 * Use of this source code is governed by an MIT-style
 * license that can be found in the LICENSE file or at
 * https://opensource.org/licenses/MIT.
 * =============================================================================
 */let $i;function Qi(){return $i=null==$i?Object(f.ce)().epsilon():$i}
/**
 * @license
 * Copyright 2018 Google LLC
 *
 * Use of this source code is governed by an MIT-style
 * license that can be found in the LICENSE file or at
 * https://opensource.org/licenses/MIT.
 * =============================================================================
 */
function Vi(e,t){return f.re(e,t)}function qi(e,t=-1){const n=e.shape.slice();return t<0&&(t=n.length+t+1),n.splice(t,0,1),f.oh(e,n)}function Gi(e,t,n){return Object(f.vi)(()=>{switch(e.rank){case 1:return f.Nh(e,t,n);case 2:return f.Oh(e,[t,0],[n,e.shape[1]]);case 3:return f.Ph(e,[t,0,0],[n,e.shape[1],e.shape[2]]);case 4:return f.Qh(e,[t,0,0,0],[n,e.shape[1],e.shape[2],e.shape[3]]);case 5:return f.Mh(e,[t,0,0,0,0],[n,e.shape[1],e.shape[2],e.shape[3],e.shape[4]]);case 6:return f.Mh(e,[t,0,0,0,0,0],[n,e.shape[1],e.shape[2],e.shape[3],e.shape[4],e.shape[5]]);default:throw new ti("sliceAlongFirstAxis() received an unsupported tensor rank: "+e.rank)}})}function Wi(e,t,n){return Object(f.vi)(()=>{switch(e.rank){case 1:return f.Nh(e,t,n);case 2:return f.Oh(e,[0,t],[e.shape[0],n]);case 3:return f.Ph(e,[0,0,t],[e.shape[0],e.shape[1],n]);case 4:return f.Qh(e,[0,0,0,t],[e.shape[0],e.shape[1],e.shape[2],n]);default:throw new ti("sliceAlongLastAxis() received an unsupported tensor rank: "+e.rank)}})}function Ki(e,t,n,r){return Object(f.vi)(()=>{switch(e.rank){case 1:return f.Nh(e,t,n);case 2:switch(r){case 1:return Gi(e,t,n);case 2:return Wi(e,t,n);default:throw new ti("The axis is not within the rank of the tensor "+r)}case 3:switch(r){case 1:return Gi(e,t,n);case 2:return f.Ph(e,[0,t,0],[e.shape[0],n,e.shape[2]]);case 3:return Wi(e,t,n);default:throw new ti("The axis is not within the rank of the tensor "+r)}case 4:switch(r){case 1:return Gi(e,t,n);case 2:return f.Qh(e,[0,t,0,0],[e.shape[0],n,e.shape[2],e.shape[3]]);case 3:return f.Qh(e,[0,0,t,0],[e.shape[0],e.shape[1],n,e.shape[3]]);case 4:return Wi(e,t,n);default:throw new ti("The axis is not within the rank of the tensor "+r)}default:throw new ti("sliceAlongLastAxis() received an unsupported tensor rank: "+e.rank)}})}function Yi(e,t=-1){var n;return(t=t<0?0!==(n=e[0].rank)?n:0:t)===e[0].rank&&(t=-1),f.we(e,t)}function Xi(e,t){switch(e.rank){case 1:return f.xe([e,t]);case 2:return f.ye([e,t],0);case 3:return f.ze([e,t],0);case 4:return f.Ae([e,t],0);default:throw new ti("concatAlongFirstAxis() received an unsupported tensor rank: "+e.rank)}}function Ji(e,t){if(Array.isArray(t)||(t=[t]),e.rank!==t.length)throw new ti(`The length of input n (${t.length}) does not match the number of dimensions in input x (${e.rank})`);return f.wi(e,t)}function Zi(e,t=0,n=1,r,i){return f.bh(e,t,n,r,i)}function eo(e,t,n,r){if(e.rank<2||t.rank<2)throw new ni(`dot requires both inputs to be rank >= 2 but got x shape = ${e.shape} and y shape = `+t.shape);if(3<=t.rank&&e.shape.slice(-1)[0]!==t.shape.slice(-2)[0])throw new ni(`If rank y >= 3, then the second last dim of y must equal the last dim of x but got x shape = ${e.shape} and  y shape = `+t.shape);if(2===e.rank&&2===t.rank)return f.vf.matMul({a:e,b:t,transposeA:!1,transposeB:!1,bias:r?ro(e.rank,r,"channelsLast"):null,activation:n});{const s=e.shape.slice();var i=s.pop();e=f.oh(e,[-1,i]);const u=t.shape.slice();i=u.pop();var o=u.pop(),a=(i=[...u,i],Array.from({length:t.rank},(e,n)=>0===n?t.rank-2:n<=t.rank-2?n-1:n));a=(t=f.oh(f.Ai(t,a),[o,-1]),[...s,...i]);return f.oh(f.vf.matMul({a:e,b:t,transposeA:!1,transposeB:!1,bias:r?ro(e.rank,r,"channelsLast"):null,activation:n}),a)}}function to(e,t,n){return Object(f.vi)(()=>(t=Array.isArray(t)?Object(f.ni)(t,"int32"):f.re(t,"int32"),f.wf(e,t,n)))}function no(e){return f.zg(e,e)}function ro(e,t,n){var r=t.shape;if(1!==t.rank&&t.rank!==e)throw new ti("Unexpected bias dimensions: "+t.rank+"; expected it to be 1 or "+e);if(5===e){if("channelsFirst"===n)return 1===r.length?f.oh(t,[1,r[0],1,1,1]):f.oh(t,[1,r[3],r[0],r[1],r[2]]);if("channelsLast"===n)return 1===r.length?f.oh(t,[1,1,1,1,r[0]]):f.oh(t,[1].concat(r))}else if(4===e){if("channelsFirst"===n)return 1===r.length?f.oh(t,[1,r[0],1,1]):f.oh(t,[1,r[2],r[0],r[1]]);if("channelsLast"===n)return 1===r.length?f.oh(t,[1,1,1,r[0]]):f.oh(t,[1].concat(r))}else if(3===e){if("channelsFirst"===n)return 1===r.length?f.oh(t,[1,r[0],1]):f.oh(t,[1,r[1],r[0]]);if("channelsLast"===n)return 1===r.length?f.oh(t,[1,1,r[0]]):f.oh(t,[1].concat(r))}else if(e<3)return t;throw new ti("Unsupported input rank by biasAdd: "+t.rank)}function io(e,t,n){return Object(f.vi)(()=>(Di(n=null==n?"channelsLast":n),f.Pd(e,ro(e.rank,t,n))))}function oo(e,t,n,r){return Object(f.vi)(()=>f.af(e,t,n,r))}function ao(e,t,n=!1){return(n?e:t)()}
/**
 * @license
 * Copyright 2018 Google LLC
 *
 * Use of this source code is governed by an MIT-style
 * license that can be found in the LICENSE file or at
 * https://opensource.org/licenses/MIT.
 * =============================================================================
 */const so=["fanIn","fanOut","fanAvg"],uo=["normal","uniform","truncatedNormal"];class co extends f.Dh.Serializable{fromConfigUsesCustomObjects(){return!1}getConfig(){return{}}}class lo extends co{apply(e,t){return Object(f.Ri)(e,t)}}lo.className="Zeros",f.Dh.registerClass(lo);class ho extends co{apply(e,t){return Object(f.Hg)(e,t)}}ho.className="Ones",f.Dh.registerClass(ho);class fo extends co{constructor(e){if(super(),"object"!=typeof e)throw new ti("Expected argument of type ConstantConfig but got "+e);if(void 0===e.value)throw new ti("config must have value set but got "+e);this.value=e.value}apply(e,t){return Object(f.vi)(()=>Object(f.zg)(Object(f.xh)(this.value),Object(f.Hg)(e,t)))}getConfig(){return{value:this.value}}}fo.className="Constant",f.Dh.registerClass(fo);class po extends co{constructor(e){super(),this.DEFAULT_MINVAL=-.05,this.DEFAULT_MAXVAL=.05,this.minval=e.minval||this.DEFAULT_MINVAL,this.maxval=e.maxval||this.DEFAULT_MAXVAL,this.seed=e.seed}apply(e,t){return Object(f.dh)(e,this.minval,this.maxval,t)}getConfig(){return{minval:this.minval,maxval:this.maxval,seed:this.seed}}}po.className="RandomUniform",f.Dh.registerClass(po);class mo extends co{constructor(e){super(),this.DEFAULT_MEAN=0,this.DEFAULT_STDDEV=.05,this.mean=e.mean||this.DEFAULT_MEAN,this.stddev=e.stddev||this.DEFAULT_STDDEV,this.seed=e.seed}apply(e,t){if("float32"!==(t=t||"float32")&&"int32"!==t)throw new ni(`randomNormal does not support dType ${t}.`);return Zi(e,this.mean,this.stddev,t,this.seed)}getConfig(){return{mean:this.mean,stddev:this.stddev,seed:this.seed}}}mo.className="RandomNormal",f.Dh.registerClass(mo);class go extends co{constructor(e){super(),this.DEFAULT_MEAN=0,this.DEFAULT_STDDEV=.05,this.mean=e.mean||this.DEFAULT_MEAN,this.stddev=e.stddev||this.DEFAULT_STDDEV,this.seed=e.seed}apply(e,t){if("float32"!==(t=t||"float32")&&"int32"!==t)throw new ni(`truncatedNormal does not support dType ${t}.`);return Object(f.Bi)(e,this.mean,this.stddev,t,this.seed)}getConfig(){return{mean:this.mean,stddev:this.stddev,seed:this.seed}}}go.className="TruncatedNormal",f.Dh.registerClass(go);class Ao extends co{constructor(e){super(),this.gain=null!=e.gain?e.gain:1}apply(e,t){return Object(f.vi)(()=>{if(2!==e.length||e[0]!==e[1])throw new ti("Identity matrix initializer can only be used for 2D square matrices.");return Object(f.zg)(this.gain,Object(f.of)(e[0]))})}getConfig(){return{gain:this.gain}}}Ao.className="Identity",f.Dh.registerClass(Ao);class vo extends co{constructor(e){if(super(),e.scale<0)throw new ti("scale must be a positive float. Got: "+e.scale);
/**
 * @license
 * Copyright 2018 Google LLC
 *
 * Use of this source code is governed by an MIT-style
 * license that can be found in the LICENSE file or at
 * https://opensource.org/licenses/MIT.
 * =============================================================================
 */var t;this.scale=null==e.scale?1:e.scale,this.mode=null==e.mode?"fanIn":e.mode,t=this.mode,Ai(so,"FanMode",t),this.distribution=null==e.distribution?"normal":e.distribution,t=this.distribution,Ai(uo,"Distribution",t),this.seed=e.seed}apply(e,t){var n=(r=function(e,t="channelsLast"){let n,r;var i;return Di(t),2===e.length?(n=e[0],r=e[1]):-1!==[3,4,5].indexOf(e.length)?"channelsFirst"===t?(i=Li(e,2),n=e[1]*i,r=e[0]*i):"channelsLast"===t&&(i=Li(e,0,e.length-2),n=e[e.length-2]*i,r=e[e.length-1]*i):(t=Li(e),n=Math.sqrt(t),r=Math.sqrt(t)),[n,r]}(e))[0],r=r[1];let i=this.scale;if("fanIn"===this.mode?i/=Math.max(1,n):"fanOut"===this.mode?i/=Math.max(1,r):i/=Math.max(1,(n+r)/2),"normal"!==this.distribution)return n=Math.sqrt(3*i),Object(f.dh)(e,-n,n,t);if(r=Math.sqrt(i),"float32"!==(t=t||"float32")&&"int32"!==t)throw new ni(this.getClassName()+` does not support dType ${t}.`);return Object(f.Bi)(e,0,r,t,this.seed)}getConfig(){return{scale:this.scale,mode:this.mode,distribution:this.distribution,seed:this.seed}}}vo.className="VarianceScaling",f.Dh.registerClass(vo);class bo extends vo{constructor(e){super({scale:1,mode:"fanAvg",distribution:"uniform",seed:null==e?null:e.seed})}getClassName(){return vo.className}}bo.className="GlorotUniform",f.Dh.registerClass(bo);class yo extends vo{constructor(e){super({scale:1,mode:"fanAvg",distribution:"normal",seed:null==e?null:e.seed})}getClassName(){return vo.className}}yo.className="GlorotNormal",f.Dh.registerClass(yo);class wo extends vo{constructor(e){super({scale:2,mode:"fanIn",distribution:"normal",seed:null==e?null:e.seed})}getClassName(){return vo.className}}wo.className="HeNormal",f.Dh.registerClass(wo);class xo extends vo{constructor(e){super({scale:2,mode:"fanIn",distribution:"uniform",seed:null==e?null:e.seed})}getClassName(){return vo.className}}xo.className="HeUniform",f.Dh.registerClass(xo);class Co extends vo{constructor(e){super({scale:1,mode:"fanIn",distribution:"normal",seed:null==e?null:e.seed})}getClassName(){return vo.className}}Co.className="LeCunNormal",f.Dh.registerClass(Co);class ko extends vo{constructor(e){super({scale:1,mode:"fanIn",distribution:"uniform",seed:null==e?null:e.seed})}getClassName(){return vo.className}}ko.className="LeCunNormal",f.Dh.registerClass(ko);class Eo extends co{constructor(e){if(super(),this.DEFAULT_GAIN=1,this.gain=null==e.gain?this.DEFAULT_GAIN:e.gain,this.seed=e.seed,null!=this.seed)throw new ni("Random seed is not implemented for Orthogonal Initializer yet.")}apply(e,t){return Object(f.vi)(()=>{if(e.length<2)throw new ni("Shape must be at least 2D.");e[0],e[1];var t=Zi(e[0]>e[1]?[e[1],e[0]]:e,0,1,"float32");let n=f.Vf.gramSchmidt(t);return e[0]>e[1]&&(n=Object(f.Ai)(n)),Object(f.zg)(this.gain,n)})}getConfig(){return{gain:this.gain,seed:this.seed}}}Eo.className="Orthogonal",f.Dh.registerClass(Eo);const So={constant:"Constant",glorotNormal:"GlorotNormal",glorotUniform:"GlorotUniform",heNormal:"HeNormal",heUniform:"HeUniform",identity:"Identity",leCunNormal:"LeCunNormal",leCunUniform:"LeCunUniform",ones:"Ones",orthogonal:"Orthogonal",randomNormal:"RandomNormal",randomUniform:"RandomUniform",truncatedNormal:"TruncatedNormal",varianceScaling:"VarianceScaling",zeros:"Zeros"};function _o(e,t={}){return pi(e,f.Dh.SerializationMap.getMap().classNameMap,t,"initializer")}function Oo(e){return di(e)}function To(e){if("string"!=typeof e)return e instanceof co?e:_o(e);if("GlorotNormal"===(e=e in So?So[e]:e))return new yo;if("GlorotUniform"===e)return new bo;if("HeNormal"===e)return new wo;if("HeUniform"===e)return new xo;if("LeCunNormal"===e)return new Co;if("LeCunUniform"===e)return new ko;{const t={};return t.className=e,t.config={},_o(t)
/**
 * @license
 * Copyright 2018 Google LLC
 *
 * Use of this source code is governed by an MIT-style
 * license that can be found in the LICENSE file or at
 * https://opensource.org/licenses/MIT.
 * =============================================================================
 */}}function Do(e){return Array.isArray(e)&&Array.isArray(e[0])}function Bo(e){return 0===e.length?[]:Array.isArray(e[0])?e:[e]}function Io(e){let t;if(Array.isArray(e)){if(1!==e.length)throw new ti("Expected Tensor length to be 1; got "+e.length);t=e[0]}else t=e;return t}function Mo(e){if(Array.isArray(e)&&Array.isArray(e[0])){if(1===e.length)return e[0];throw new ti("Expected exactly 1 Shape; got "+e.length)}return e}
/**
 * @license
 * Copyright 2018 Google LLC
 *
 * Use of this source code is governed by an MIT-style
 * license that can be found in the LICENSE file or at
 * https://opensource.org/licenses/MIT.
 * =============================================================================
 */function jo(e){let t=0;for(const n of e)0===n.shape.length?t+=1:t+=n.shape.reduce((e,t)=>e*t);return t}
/**
 * @license
 * Copyright 2018 Google LLC
 *
 * Use of this source code is governed by an MIT-style
 * license that can be found in the LICENSE file or at
 * https://opensource.org/licenses/MIT.
 * =============================================================================
 */class No{constructor(e,t="float32",n="Variable",r=!0,i=null){this.dtype=null==t?"float32":t,this.shape=e.shape,this.id=wi++,this.originalName=Ni(n=null==n?"Variable":n),this.name=Fi(this.originalName),this.trainable_=r,this.constraint=i,this.val=f.Mi(e,this.trainable_,this.name,this.dtype)}read(){return this.assertNotDisposed(),this.val}write(e){this.assertNotDisposed();var t=this.val,n=e;if(t.shape.toString()!==n.shape.toString())throw new Error("Shape mismatch: "+JSON.stringify(t.shape)+" vs. "+JSON.stringify(n.shape));return this.val.id!==e.id&&(this.val.assign(e),null!=this.constraint&&this.val.assign(this.constraint.apply(this.val))),this}dispose(){this.assertNotDisposed(),this.val.dispose()}assertNotDisposed(){if(this.val.isDisposed)throw new Error(`LayersVariable ${this.name} is already disposed.`)}get trainable(){return this.trainable_}set trainable(e){this.trainable_=e,this.val.trainable=e}}function Fo(e){return e.map(e=>e.read())}function Ro(e){e.forEach(e=>{e[0].write(e[1])})}
/**
 * @license
 * Copyright 2018 Google LLC
 *
 * Use of this source code is governed by an MIT-style
 * license that can be found in the LICENSE file or at
 * https://opensource.org/licenses/MIT.
 * =============================================================================
 */class Po{constructor(e){this.dtype=e.dtype,this.shape=e.shape,null!=e.shape?this.ndim=e.shape.length:this.ndim=e.ndim,this.maxNDim=e.maxNDim,this.minNDim=e.minNDim,this.axes=e.axes||{}}}class Lo{constructor(e,t,n,r,i,o,a){this.dtype=e,this.shape=t,this.sourceLayer=n,this.inputs=r,this.callArgs=i,this.outputTensorIndex=a,this.id=wi++,null!=o&&(this.originalName=Ni(o),this.name=Fi(this.originalName)),this.rank=t.length}}let Uo=0;class zo{constructor(e,t){this.callArgs=t,this.id=Uo++,this.outboundLayer=e.outboundLayer,this.inboundLayers=e.inboundLayers,this.nodeIndices=e.nodeIndices,this.tensorIndices=e.tensorIndices,this.inputTensors=e.inputTensors,this.outputTensors=e.outputTensors,this.inputMasks=e.inputMasks,this.outputMasks=e.outputMasks,this.inputShapes=e.inputShapes,this.outputShapes=e.outputShapes;for(const t of e.inboundLayers)null!=t&&t.outboundNodes.push(this);e.outboundLayer.inboundNodes.push(this)}getConfig(){const e=[];for(const t of this.inboundLayers)null!=t?e.push(t.name):e.push(null);return{outboundLayer:this.outboundLayer?this.outboundLayer.name:null,inboundLayers:e,nodeIndices:this.nodeIndices,tensorIndices:this.tensorIndices}}}let Ho=0;class $o extends f.Dh.Serializable{constructor(e={}){super(),this._callHook=null,this._addedWeightNames=[],this._stateful=!1,this.id=Ho++,this.activityRegularizer=null,this.inputSpec=null,this.supportsMasking=!1,this._trainableWeights=[],this._nonTrainableWeights=[],this._losses=[],this._updates=[],this._built=!1,this.inboundNodes=[],this.outboundNodes=[];let t=e.name;var n;if(t||(t=li(n=this.getClassName())+"_"+Ci(n)),this.name=t,this.trainable_=null==e.trainable||e.trainable,null!=e.inputShape||null!=e.batchInputShape){let t;if(null!=e.batchInputShape)t=e.batchInputShape;else if(null!=e.inputShape){let n=null;null!=e.batchSize&&(n=e.batchSize),t=[n].concat(e.inputShape)}this.batchInputShape=t;let n=e.dtype;null==(n=null==n?e.inputDType:n)&&(n="float32"),this.dtype=n}null!=e.weights?this.initialWeights=e.weights:this.initialWeights=null,this._refCount=null,this.fastWeightInitDuringBuild=!1}static nodeKey(e,t){return e.name+"_ib-"+t.toString()}getNodeAtIndex(e,t){if(0===this.inboundNodes.length)throw new ei(`The layer has never been called and thus has no defined ${t}.`);if(this.inboundNodes.length<=e)throw new ti(`Asked to get ${t} at node ${e}, but the layer has only ${this.inboundNodes.length} inbound nodes.`);return this.inboundNodes[e]}getInputAt(e){return ui(this.getNodeAtIndex(e,"input").inputTensors)}getOutputAt(e){return ui(this.getNodeAtIndex(e,"output").outputTensors)}get input(){if(1<this.inboundNodes.length)throw new Zr("Layer "+this.name+' has multiple inbound nodes, hence the notion of "layer input" is ill-defined. Use `getInputAt(nodeIndex)` instead.');if(0===this.inboundNodes.length)throw new Zr("Layer "+this.name+" is not connected, no input to return.");return ui(this.getNodeAtIndex(0,"input").inputTensors)}get output(){if(0===this.inboundNodes.length)throw new Zr("Layer "+this.name+" has no inbound nodes.");if(1<this.inboundNodes.length)throw new Zr("Layer "+this.name+' has multiple inbound nodes, hence the notion of "layer output" is ill-defined. Use `getOutputAt(nodeIndex)` instead.');return ui(this.getNodeAtIndex(0,"output").outputTensors)}get losses(){return this._losses}calculateLosses(){return this.losses.map(e=>e())}get updates(){return this._updates}get built(){return this._built}set built(e){this._built=e}get trainable(){return this.trainable_}set trainable(e){this._trainableWeights.forEach(t=>t.trainable=e),this.trainable_=e}get trainableWeights(){return this.trainable_?this._trainableWeights.filter(e=>e.trainable):[]}set trainableWeights(e){this._trainableWeights=e}get nonTrainableWeights(){return(this.trainable?this._trainableWeights.filter(e=>!e.trainable):this._trainableWeights).concat(this._nonTrainableWeights)}set nonTrainableWeights(e){this._nonTrainableWeights=e}get weights(){return this.trainableWeights.concat(this.nonTrainableWeights)}get stateful(){return this._stateful}resetStates(){if(!this.stateful)throw new Error("Cannot call the resetStates() method of a non-stateful Layer object.")}assertInputCompatibility(e){if(e=ci(e),null!=this.inputSpec&&0!==this.inputSpec.length){var t=ci(this.inputSpec);if(e.length!==t.length)throw new ti(`Layer ${this.name} expects ${t.length} inputs, but it received ${e.length} input tensors. Input received: `+e);for(let l=0;l<e.length;l++){var n=e[l],r=t[l];if(null!=r){var i=n.rank;if(null!=r.ndim&&i!==r.ndim)throw new ti(`Input ${l} is incompatible with layer ${this.name}: expected ndim=${r.ndim}, found ndim=`+i);if(null!=r.maxNDim&&i>r.maxNDim)throw new ti(`Input ${l} is incompatible with layer `+this.name+`: expected max_ndim=${r.maxNDim}, found ndim=`+i);if(null!=r.minNDim&&i<r.minNDim)throw new ti(`Input ${l} is incompatible with layer `+this.name+`: expected min_ndim=${r.minNDim}, found ndim=${i}.`);if(null!=r.dtype&&n.dtype!==r.dtype)throw new ti(`Input ${l} is incompatible with layer ${this.name} : expected dtype=${r.dtype}, found dtype=${n.dtype}.`);if(r.axes){var o=n.shape;for(const e in r.axes){var a=Number(e);const t=r.axes[e];var s=0<=a?o[a]:o[o.length+a];if(null!=t&&-1===[t,null].indexOf(s))throw new ti(`Input ${l} is incompatible with layer `+this.name+`: expected axis ${a} of input shape to `+`have value ${t} but got shape ${o}.`)}}if(null!=r.shape)for(let e=0;e<r.shape.length;++e){var u=r.shape[e],c=n.shape[e];if(null!=u&&null!=c&&u!==c)throw new ti(`Input ${l} is incompatible with layer ${this.name}: expected shape=${r.shape}, found shape=${n.shape}.`)}}}}}call(e,t){return e}invokeCallHook(e,t){null!=this._callHook&&this._callHook(e,t)}setCallHook(e){this._callHook=e}clearCallHook(){this._callHook=null}apply(e,t){t=t||{},this.assertNotDisposed();const n=ci(e);let r=!0;for(const e of n)if(!(e instanceof Lo)){r=!1;break}let i=!0;for(const e of n)if(e instanceof Lo){i=!1;break}if(r===i)throw new ti("Arguments to apply() must be all SymbolicTensors or all Tensors");return ji(this.name,()=>{if(!this.built){this.assertInputCompatibility(e);const t=[];for(const n of ci(e))t.push(n.shape);this.build(ui(t)),this.built=!0,this.initialWeights&&this.setWeights(this.initialWeights),null===this._refCount&&i&&(this._refCount=1)}if(this.assertInputCompatibility(e),i){var r;const i=[];for(r of ci(this.call(e,t)))-1!==n.indexOf(r)&&(r=r.clone()),i.push(r);if(o=ui(i),null!=this.activityRegularizer)throw new ni("Layer invocation in the presence of activity regularizer(s) is not supported yet.");return o}{var o=function(e){e=ci(e);const t=[];for(const n of e)t.push(n.shape);return ui(t)}(e);const n=this.computeOutputShape(o);let r;if(this.warnOnIncompatibleInputShape(Array.isArray(e)?o[0]:o),r=null!=n&&0<n.length&&Array.isArray(n[0])?n.map((n,r)=>new Lo("float32",n,this,ci(e),t,this.name,r)):new Lo("float32",n,this,ci(e),t,this.name),this.addInboundNode(e,r,null,null,o,n,t),this._refCount++,null!=this.activityRegularizer)throw new ni("Layer invocation in the presence of activity regularizer(s) is not supported yet.");return r}})}warnOnIncompatibleInputShape(e){if(null!=this.batchInputShape&&e.length===this.batchInputShape.length){let t=!1;this.batchInputShape.forEach((n,r)=>{null!=n&&null!=e[r]&&e[r]!==n&&(t=!0)})}}get outputShape(){if(null==this.inboundNodes||0===this.inboundNodes.length)throw new Zr(`The layer ${this.name} has never been called and thus has no defined output shape.`);const e=[];for(const n of this.inboundNodes){var t=JSON.stringify(n.outputShapes);-1===e.indexOf(t)&&e.push(t)}var n;if(1===e.length)return n=this.inboundNodes[0].outputShapes,Array.isArray(n)&&Array.isArray(n[0])&&1===n.length?n[0]:n;throw new Zr(`The layer ${this.name} has multiple inbound nodes with different output shapes. Hence the notion of "output shape" is ill-defined for the layer.`)}countParams(){if(this.built)return jo(this.weights);throw new ei(`You tried to call countParams() on ${this.name}, but the layer is not built yet. Build it first by calling build(batchInputShape).`)}build(e){this.built=!0}getWeights(e=!1){return Fo(e?this.trainableWeights:this.weights)}setWeights(e){Object(f.vi)(()=>{var t=this.weights;if(t.length!==e.length)throw new ti(`You called setWeights(weights) on layer "${this.name}" with a weight list of length ${e.length}, but the layer was expecting ${t.length} weights. Provided weights: ${e}...`);if(0!==t.length){const a=[];var n=Fo(t);for(let s=0;s<n.length;++s){var r=n[s],i=t[s],o=e[s];if(!f.Ji.arraysEqual(r.shape,o.shape))throw new ti(`Layer weight shape ${r.shape} not compatible with provided weight shape `+o.shape);a.push([i,o])}Ro(a)}})}addWeight(e,t,n,r,i,o,a,s){if(-1!==this._addedWeightNames.indexOf(e))throw new ti(`Duplicate weight name ${e} for layer `+this.name);this._addedWeightNames.push(e),null==n&&(n="float32");const u=(r=this.fastWeightInitDuringBuild?null!=s?s():To("zeros"):r).apply(t,n),c=new No(u,n,e,o,a);return u.dispose(),null!=i&&this.addLoss(()=>i.apply(c.read())),((o=null==o||o)?this._trainableWeights:this._nonTrainableWeights).push(c),c}setFastWeightInitDuringBuild(e){this.fastWeightInitDuringBuild=e}addLoss(e){null==e||Array.isArray(e)&&0===e.length||(e=ci(e),void 0!==this._losses&&null!==this._losses&&this.losses.push(...e))}computeOutputShape(e){return e}computeMask(e,t){if(this.supportsMasking)return t;if(null!=t){if(!Array.isArray(t))throw new TypeError(`Layer ${this.name} does not support masking, but was passed an inputMask.`);t.forEach(e=>{if(null!=e)throw new TypeError(`Layer ${this.name} does not support masking, but was passed an inputMask.`)})}return null}addInboundNode(e,t,n,r,i,o,a=null){e=ci(e),t=ci(t),n=ci(n),r=ci(r),i=Bo(i),o=Bo(o);const s=[],u=[],c=[];for(const t of e)s.push(t.sourceLayer),u.push(t.nodeIndex),c.push(t.tensorIndex);new zo({outboundLayer:this,inboundLayers:s,nodeIndices:u,tensorIndices:c,inputTensors:e,outputTensors:t,inputMasks:n,outputMasks:r,inputShapes:i,outputShapes:o},a);for(let e=0;e<t.length;e++)t[e].sourceLayer=this,t[e].nodeIndex=this.inboundNodes.length-1,t[e].tensorIndex=e}getConfig(){const e={name:this.name,trainable:this.trainable};return null!=this.batchInputShape&&(e.batchInputShape=this.batchInputShape),null!=this.dtype&&(e.dtype=this.dtype),e}disposeWeights(){return this.weights.forEach(e=>e.dispose()),this.weights.length}assertNotDisposed(){if(0===this._refCount)throw new Error(`Layer '${this.name}' is already disposed.`)}dispose(){if(!this.built)throw new Error(`Cannot dispose Layer ${this.name} because it has not been built yet.`);if(null===this._refCount)throw new Error(`Cannot dispose Layer ${this.name} because it has not been used yet.`);this.assertNotDisposed();let e=0;return 0==--this._refCount&&(e=this.disposeWeights()),{refCountAfterDispose:this._refCount,numDisposedVariables:e}
/**
 * @license
 * Copyright 2018 Google LLC
 *
 * Use of this source code is governed by an MIT-style
 * license that can be found in the LICENSE file or at
 * https://opensource.org/licenses/MIT.
 * =============================================================================
 */}}class Qo extends $o{constructor(e){if(super({dtype:e.dtype,name:null!=e.name?e.name:Ci("input").toString()}),null==e.batchSize&&(e.batchSize=null),null==e.sparse&&(e.sparse=!1),this.trainable=!1,this.built=!0,this.sparse=e.sparse,null!=e.inputShape&&null!=e.batchInputShape)throw new ti("Only provide the inputShape OR batchInputShape argument to inputLayer, not both at the same time.");let t=e.batchInputShape;if(null==t){if(null==e.inputShape)throw new ti("An InputLayer should be passed either a `batchInputShape` or an `inputShape`.");t=[e.batchSize].concat(e.inputShape)}else if(null!=e.batchSize)throw new ti("Cannot specify batchSize if batchInputShape is specified when creating an InputLayer.");e=e.dtype||"float32",this.batchInputShape=t,this.dtype=e,this.inputSpec=[{shape:t}];const n=new Lo(this.dtype,this.batchInputShape,this,[],{},this.name);n.nodeIndex=0,n.tensorIndex=0,new zo({outboundLayer:this,inboundLayers:[],nodeIndices:[],tensorIndices:[],inputTensors:[n],outputTensors:[n],inputMasks:[null],outputMasks:[null],inputShapes:[t],outputShapes:[t]})}apply(e,t){throw new ti("Cannot pass any input to an InputLayer's apply() method. InputLayer name: "+this.name)}dispose(){return{refCountAfterDispose:this._refCount,numDisposedVariables:0}}getConfig(){return{batchInputShape:this.batchInputShape,dtype:this.dtype,sparse:this.sparse,name:this.name}}}function Vo(e){if(null==e.batchShape&&null==e.shape)throw new Error("Please provide to Input either a `shape` or a `batchShape` argument. Note that `shape` does not include the batch dimension.");if(null!=e.batchShape&&null!=e.shape)throw new ti("Please provide either a `shape` or `batchShape` argument to Input, but not both.");let t=e.batchShape,n=(null!=e.shape&&null==t&&(t=[null].concat(e.shape)),e.dtype);return null==n&&(n="float32"),new Qo({batchInputShape:t,name:e.name,dtype:n,sparse:e.sparse}).inboundNodes[0].outputTensors[0]}
/**
 * @license
 * Copyright 2018 Google LLC
 *
 * Use of this source code is governed by an MIT-style
 * license that can be found in the LICENSE file or at
 * https://opensource.org/licenses/MIT.
 * =============================================================================
 */Qo.className="InputLayer",f.Dh.registerClass(Qo);class qo{constructor(e){if(this.id2Value={},this.id2Mask={},this.name2Id={},e instanceof qo)for(const t in e.id2Value)this.id2Value[t]=e.id2Value[t],t in e.id2Mask&&(this.id2Mask[t]=e.id2Mask[t]);else if(null!=e)for(const t of e)this.add(t.key,t.value)}add(e,t,n){if(null!=this.id2Value[e.id])throw new ti(`Duplicate key: name=${e.name}, id=`+e.id);return this.id2Value[e.id]=function(e,t){if(null==e.dtype||e.dtype===t.dtype)return t;try{return Object(f.re)(t,e.dtype)}catch(n){throw new ti(`The dtype of the feed (${t.dtype}) can not be cast to the dtype of the key '${e.name}' (${e.dtype}).`)}}(e,t),this.name2Id[e.name]=e.id,null!=n&&(this.id2Mask[e.id]=n),this}addFeed(e){this.add(e.key,e.value)}hasKey(e){return null!=this.id2Value[e.id]}names(){return Object.keys(this.name2Id)}getValue(e){if(e instanceof Lo){if(null==this.id2Value[e.id])throw new ti("Nonexistent key: "+e.name);return this.id2Value[e.id]}var t=this.name2Id[e];if(null==t)throw new ti("Feed dict has no SymbolicTensor name: "+e);return this.id2Value[t]}getMask(e){if(e instanceof Lo){if(null==this.id2Value[e.id])throw new ti("Nonexistent key: "+e.name);return this.id2Mask[e.id]}var t=this.name2Id[e];if(null==t)throw new ti("Feed dict has no SymbolicTensor name: "+e);return this.id2Mask[t]}disposeMasks(){null!=this.id2Mask&&Object(f.Ve)(this.id2Mask)}}const Go=new ii,Wo=new ii;function Ko(e,t,n,r){var i=null!=n&&n.training,o=Array.isArray(e);const a=o?e:[e],s=a.map(e=>e.name),u=[],c=t.names();for(const e of s)-1!==c.indexOf(e)?u.push(t.getValue(e)):u.push(null);null!=r&&(r.maxNumTensors=-1/0,r.minNumTensors=1/0);var l;e=s.join(",")+"|"+t.names().sort().join(",");let h,d=Go.get(e);null==d&&(d=(l=function(e,t){f.Ji.assert(null!=e&&0<e.length,()=>"Expected at least one fetch, got none");let n=[],r={};if(1===e.length){var i=Yo(e[0],t);n=i.sorted,r=i.recipientMap}else{const i=new Set;for(const o of e){const{sorted:e,recipientMap:a}=Yo(o,t);for(const t of e)i.has(t.name)||(n.push(t),i.add(t.name));for(const e in a)null==r[e]&&(r[e]=new Set),a[e].forEach(t=>r[e].add(t))}}return{sorted:n,recipientCounts:function(e){const t={};for(const n in e)t[n]=e[n].size;return t}(r)}}(a,t)).sorted,h=l.recipientCounts,Go.put(e,d),Wo.put(e,h)),h={},i||Object.assign(h,Wo.get(e));const p=new qo(t);for(let e=0;e<d.length;++e){null!=r&&((m=Object(f.rg)().numTensors)>r.maxNumTensors&&(r.maxNumTensors=m),m<r.minNumTensors&&(r.minNumTensors=m));var m=d[e];const o=m.sourceLayer;if(!(o instanceof Qo)){const e=[],r=[],a=[];let c=!1;for(const n of m.inputs){var g=p.getValue(n),A=p.getMask(n);e.push(g),r.push(A),null!=A&&(c=!0),i||(h[n.name]--,0!==h[n.name]||t.hasKey(n)||-1!==s.indexOf(n.name)||g.isDisposed||!0===n.sourceLayer.stateful||a.push(g))}c&&((n=n||{}).mask=r[0]);var v=ci(o.apply(e,n));let l=null;o.supportsMasking&&(l=o.computeMask(e,r));var b=function(e){let t;if(1===e.sourceLayer.inboundNodes.length)t=e.sourceLayer.output;else{let n=null;for(let t=0;t<e.sourceLayer.inboundNodes.length;++t)for(const r of e.sourceLayer.inboundNodes[t].outputTensors)if(r.id===e.id){n=t;break}t=e.sourceLayer.getOutputAt(n)}return t}
/**
 * @license
 * Copyright 2022 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */(m),y=Array.isArray(b)?b:[b];for(let e=0;e<y.length;++e){p.hasKey(y[e])||p.add(y[e],v[e],Array.isArray(l)?l[0]:l);var w=s.indexOf(y[e].name);-1!==w&&(u[w]=v[e])}i||Object(f.Ve)(a)}}return p.disposeMasks(),o?u:u[0]}function Yo(e,t){const n=new Set,r=[],i={};for(const e of t.names())n.add(e);const o=[],a=[];for(o.push(e);0<o.length;){var s=o[o.length-1];if(n.has(s.name))o.pop();else{var u=a[a.length-1]===o.length-1;if(0===s.inputs.length||u)o.pop(),r.push(s),n.add(s.name),u&&a.pop();else{a.push(o.length-1);for(const e of s.inputs)null==i[e.name]&&(i[e.name]=new Set),i[e.name].add(s.name),n.has(e.name)||o.push(e)}}}return{sorted:r,recipientMap:i}}
/**
 * @license
 * Copyright 2018 Google LLC
 *
 * Use of this source code is governed by an MIT-style
 * license that can be found in the LICENSE file or at
 * https://opensource.org/licenses/MIT.
 * =============================================================================
 */
function Xo(e,t){return Object(f.vi)(()=>f.Zh(f.ii(f.zg(e,e),t,!0)))}Object(f.hf)().registerFlag("TOPOLOGICAL_SORT_CACHE_MAX_ENTRIES",()=>100,(function(e){null!=Go&&Go.setMaxEntries(e),null!=Wo&&Wo.setMaxEntries(e)}));class Jo extends f.Dh.Serializable{getConfig(){return{}}}class Zo extends Jo{constructor(e){super(),this.defaultMaxValue=2,this.defaultAxis=0,this.maxValue=null!=e.maxValue?e.maxValue:this.defaultMaxValue,this.axis=null!=e.axis?e.axis:this.defaultAxis}apply(e){return Object(f.vi)(()=>{var t=Xo(e,this.axis),n=f.te(t,0,this.maxValue);return f.zg(e,f.Xe(n,f.Pd(Qi(),t)))})}getConfig(){return{maxValue:this.maxValue,axis:this.axis}}}Zo.className="MaxNorm",f.Dh.registerClass(Zo);class ea extends Jo{constructor(e){super(),this.defaultAxis=0,this.axis=null!=e.axis?e.axis:this.defaultAxis}apply(e){return Object(f.vi)(()=>f.Xe(e,f.Pd(Qi(),Xo(e,this.axis))))}getConfig(){return{axis:this.axis}}}ea.className="UnitNorm",f.Dh.registerClass(ea);class ta extends Jo{apply(e){return f.lh(e)}}ta.className="NonNeg",f.Dh.registerClass(ta);class na extends Jo{constructor(e){super(),this.defaultMinValue=0,this.defaultMaxValue=1,this.defaultRate=1,this.defaultAxis=0,this.minValue=null!=e.minValue?e.minValue:this.defaultMinValue,this.maxValue=null!=e.maxValue?e.maxValue:this.defaultMaxValue,this.rate=null!=e.rate?e.rate:this.defaultRate,this.axis=null!=e.axis?e.axis:this.defaultAxis}apply(e){return Object(f.vi)(()=>{var t=Xo(e,this.axis),n=f.Pd(f.zg(this.rate,f.te(t,this.minValue,this.maxValue)),f.zg(1-this.rate,t));return f.zg(e,f.Xe(n,f.Pd(Qi(),t)))})}getConfig(){return{minValue:this.minValue,maxValue:this.maxValue,rate:this.rate,axis:this.axis}}}na.className="MinMaxNorm",f.Dh.registerClass(na);const ra={maxNorm:"MaxNorm",minMaxNorm:"MinMaxNorm",nonNeg:"NonNeg",unitNorm:"UnitNorm"};function ia(e){return di(e)}function oa(e,t={}){return pi(e,f.Dh.SerializationMap.getMap().classNameMap,t,"constraint")}function aa(e){return null==e?null:"string"==typeof e?oa({className:e in ra?ra[e]:e,config:{}}):e instanceof Jo?e:oa(e)}
/**
 * @license
 * Copyright 2018 Google LLC
 *
 * Use of this source code is governed by an MIT-style
 * license that can be found in the LICENSE file or at
 * https://opensource.org/licenses/MIT.
 * =============================================================================
 */function sa(e){return new Zo(e)}function ua(e){return new ea(e)}function ca(){return new ta}function la(e){return new na(e)}
/**
 * @license
 * Copyright 2018 Google LLC
 *
 * Use of this source code is governed by an MIT-style
 * license that can be found in the LICENSE file or at
 * https://opensource.org/licenses/MIT.
 * =============================================================================
 */function ha(){return new lo}function fa(){return new ho}function da(e){return new fo(e)}function pa(e){return new po(e)}function ma(e){return new mo(e)}function ga(e){return new go(e)}function Aa(e){return new Ao(e)}function va(e){return new vo(e)}function ba(e){return new bo(e)}function ya(e){return new yo(e)}function wa(e){return new wo(e)}function xa(e){return new xo(e)}function Ca(e){return new Co(e)}function ka(e){return new ko(e)}function Ea(e){return new Eo(e)}
/**
 * @license
 * Copyright 2018 Google LLC
 *
 * Use of this source code is governed by an MIT-style
 * license that can be found in the LICENSE file or at
 * https://opensource.org/licenses/MIT.
 * =============================================================================
 */async function Sa(e){if(null!=e){const r=[],i=[],o=[];for(const n in e){var t=e[n];if("number"!=typeof t){const e=t;r.push(e.data()),i.push(n),o.push(e)}}if(0<r.length){var n=await Promise.all(r);for(let t=0;t<n.length;++t)e[i[t]]=n[t][0];Object(f.Ve)(o)}}}function _a(e){if(null!=e)for(const t in e){const n=e[t];"number"!=typeof n&&n.dispose()}}
/**
 * @license
 * Copyright 2018 Google LLC
 *
 * Use of this source code is governed by an MIT-style
 * license that can be found in the LICENSE file or at
 * https://opensource.org/licenses/MIT.
 * =============================================================================
 */class Oa{constructor(){this.validationData=null}setParams(e){this.params=e}async onEpochBegin(e,t){}async onEpochEnd(e,t){}async onBatchBegin(e,t){}async onBatchEnd(e,t){}async onTrainBegin(e){}async onTrainEnd(e){}setModel(e){}}class Ta{constructor(e,t=10){this.callbacks=e=null==e?[]:e,this.queueLength=t}append(e){this.callbacks.push(e)}setParams(e){for(const t of this.callbacks)t.setParams(e)}setModel(e){for(const t of this.callbacks)t.setModel(e)}async onEpochBegin(e,t){null==t&&(t={});for(const n of this.callbacks)await n.onEpochBegin(e,t)}async onEpochEnd(e,t){null==t&&(t={});for(const n of this.callbacks)await n.onEpochEnd(e,t)}async onBatchBegin(e,t){null==t&&(t={});for(const n of this.callbacks)await n.onBatchBegin(e,t)}async onBatchEnd(e,t){null==t&&(t={});for(const n of this.callbacks)await n.onBatchEnd(e,t)}async onTrainBegin(e){null==e&&(e={});for(const t of this.callbacks)await t.onTrainBegin(e)}async onTrainEnd(e){null==e&&(e={});for(const t of this.callbacks)await t.onTrainEnd(e)}}class Da extends Oa{constructor(){super()}async onEpochBegin(e){this.seen=0,this.totals={}}async onBatchEnd(e,t){const n=null==(t=null==t?{}:t).size?0:t.size;this.seen+=n;for(const e in t){const i=t[e];if("number"==typeof i)this.totals.hasOwnProperty(e)||(this.totals[e]=0),this.totals[e]=this.totals[e]+i*n;else{let t;e in this.totals?t=this.totals[e]:this.totals[e]=0;var r=Object(f.vi)(()=>Object(f.Pd)(this.totals[e],Object(f.zg)(i,n)));this.totals[e]=r,null!=t&&t.dispose()}}}async onEpochEnd(e,t){if(null!=t)for(const e of this.params.metrics)null!=this.totals[e]&&("number"==typeof this.totals[e]?t[e]=this.totals[e]/this.seen:Object(f.vi)(()=>{var n=Object(f.zg)(Object(f.Xe)(1,this.seen),this.totals[e]);t[e]=n,this.totals[e].dispose(),Object(f.Qf)(t[e])}))}}class Ba extends Oa{async onTrainBegin(e){this.epoch=[],this.history={}}async onEpochEnd(e,t){null==t&&(t={}),this.epoch.push(e);for(const e in t)null==this.history[e]&&(this.history[e]=[]),this.history[e].push(t[e])}async syncData(){const e=[],t=[],n=[];for(const i in this.history){var r=this.history[i];for(let o=0;o<r.length;++o)if("number"!=typeof r[o]){const a=r[o];e.push(a.data()),t.push(i),n.push(o)}}var i=await Promise.all(e);for(let e=0;e<i.length;++e){this.history[t[e]][n[e]].dispose(),this.history[t[e]][n[e]]=i[e][0]}}}class Ia extends Oa{constructor(e,t){if(super(),this.currentEpoch=0,this.nowFunc=e.nowFunc,this.nextFrameFunc=e.nextFrameFunc||f.Dg,this.yieldEvery=t||"auto","auto"===this.yieldEvery&&(this.yieldEvery=125),"never"===this.yieldEvery&&null!=e.onYield)throw new Error("yieldEvery is `never` but you provided an `onYield` callback. Either change `yieldEvery` or remove the callback");f.Ji.isNumber(this.yieldEvery)&&(this.maybeWait=function(e,t,n){let r,i=null!=n?n():f.Ji.now();return(...o)=>{var a=null!=n?n():f.Ji.now();return a-i<t||(i=a,r=e(...o)),r}}(this.maybeWait.bind(this),this.yieldEvery,this.nowFunc)),this.trainBegin=e.onTrainBegin,this.trainEnd=e.onTrainEnd,this.epochBegin=e.onEpochBegin,this.epochEnd=e.onEpochEnd,this.batchBegin=e.onBatchBegin,this.batchEnd=e.onBatchEnd,this.yield=e.onYield}async maybeWait(e,t,n){const r=[];null!=this.yield&&(await Sa(n),r.push(this.yield(e,t,n))),r.push(this.nextFrameFunc()),await Promise.all(r)}async onEpochBegin(e,t){this.currentEpoch=e,null!=this.epochBegin&&(await Sa(t),await this.epochBegin(e,t))}async onEpochEnd(e,t){const n=[];null!=this.epochEnd&&(await Sa(t),n.push(this.epochEnd(e,t))),"epoch"===this.yieldEvery&&n.push(this.nextFrameFunc()),await Promise.all(n)}async onBatchBegin(e,t){null!=this.batchBegin&&(await Sa(t),await this.batchBegin(e,t))}async onBatchEnd(e,t){const n=[];null!=this.batchEnd&&(await Sa(t),n.push(this.batchEnd(e,t))),"batch"===this.yieldEvery?n.push(this.nextFrameFunc()):f.Ji.isNumber(this.yieldEvery)&&n.push(this.maybeWait(this.currentEpoch,e,t)),await Promise.all(n)}async onTrainBegin(e){null!=this.trainBegin&&(await Sa(e),await this.trainBegin(e))}async onTrainEnd(e){null!=this.trainEnd&&(await Sa(e),await this.trainEnd(e))}}function Ma(e,t){if((e=null==e?{}:e)instanceof Oa)return[e];if(Array.isArray(e)&&e[0]instanceof Oa)return e;return ci(e).map(e=>new Ia(e,t))}class ja{constructor(){}static registerCallbackConstructor(e,t){f.Ji.assert(0<=e&&Number.isInteger(e),()=>"Verbosity level is expected to be an integer >= 0, but got "+e),ja.checkForDuplicate(t),null==ja.constructors[e]&&(ja.constructors[e]=[]),ja.constructors[e].push(t)}static checkForDuplicate(e){for(const t in ja.constructors){ja.constructors[+t].forEach(t=>{if(t===e)throw new ti("Duplicate callback constructor.")})}}static clear(){ja.constructors={}}static createCallbacks(e){const t=[];for(const r in ja.constructors){var n=+r;n<=e&&t.push(...ja.constructors[n])}return t.map(e=>new e)}}function Na(e,t,n,r,i,o,a,s,u){var c=new Ba;const l=[new Da,...ja.createCallbacks(t)],h=(null!=e&&l.push(...e),l.push(c),new Ta(l));return h.setParams({epochs:n,initialEpoch:r,samples:i,steps:o,batchSize:a,verbose:t,doValidation:s,metrics:u}),{callbackList:h,history:c}}
/**
 * @license
 * Copyright 2018 Google LLC
 *
 * Use of this source code is governed by an MIT-style
 * license that can be found in the LICENSE file or at
 * https://opensource.org/licenses/MIT.
 * =============================================================================
 */function Fa(e,t={},n=!1){return pi(e,f.Dh.SerializationMap.getMap().classNameMap,t,"layer",n)}
/**
 * @license
 * Copyright 2018 Google LLC
 *
 * Use of this source code is governed by an MIT-style
 * license that can be found in the LICENSE file or at
 * https://opensource.org/licenses/MIT.
 * =============================================================================
 */function Ra(e,t){return Object(f.vi)(()=>{"float32"!==e.dtype&&(e=f.re(e,"float32"));var n=f.ii(no(e),t,!0),r=f.qf(n.shape,Qi());n=f.Zh(f.pg(n,r));return f.Xe(e,n)})}function Pa(e,t){return Object(f.vi)(()=>f.qg(no(f.hi(t,e)),-1))}function La(e,t){return Object(f.vi)(()=>f.qg(f.Md(f.hi(t,e)),-1))}function Ua(e,t){return Object(f.vi)(()=>{var n=f.hi(e,t),r=f.te(f.Md(e),Qi(),Number.MAX_VALUE);n=f.Md(f.Xe(n,r));return f.zg(100,f.qg(n,-1))})}function za(e,t,n=!1){return Object(f.vi)(()=>{var r;return t=n?f.Sh(t):(r=f.ii(t,t.shape.length-1,!0),f.Xe(t,r)),t=f.te(t,Qi(),1-Qi()),f.Cg(f.ii(f.zg(f.re(e,"float32"),f.Yf(t)),t.shape.length-1))})}function Ha(e,t,n=!1){return Object(f.vi)(()=>{var r=f.re(f.tf((i=[Li((r=e).shape)],f.oh(r,i))),"int32"),i=(t=f.te(t,Qi(),1-Qi())).shape;return za(f.oh(f.Gg(r,i[i.length-1]),i),t,n)})}function $a(e,t){return Object(f.vi)(()=>{var n=f.te(t,Qi(),1-Qi());return n=f.Yf(f.Xe(n,f.hi(1,n))),f.qg(function(e,t){if(f.Ji.arraysEqual(e.shape,t.shape))return Object(f.vi)(()=>{var n=f.lh(t),r=f.Cg(f.Md(t));return f.Pd(f.hi(n,f.zg(t,e)),f.Zf(f.lf(r)))});throw new ti("logits and labels must have the same shape, but got shapes "+JSON.stringify(e.shape)+" and "+JSON.stringify(t.shape))}(e,n),-1)})}function Qa(e,t){return Object(f.vi)(()=>{var n=Ra(e,-1),r=Ra(t,-1);n=f.zg(n,r);return f.Cg(f.ii(n,-1))})}ja.constructors={};const Va={meanSquaredError:Pa,meanAbsoluteError:La,meanAbsolutePercentageError:Ua,meanSquaredLogarithmicError:function(e,t){return Object(f.vi)(()=>{var n=f.te(t,Qi(),Number.MAX_VALUE),r=(n=f.Yf(f.Pd(1,n)),f.te(e,Qi(),Number.MAX_VALUE));r=f.Yf(f.Pd(1,r));return f.qg(no(f.hi(n,r)),-1)})},squaredHinge:function(e,t){return Object(f.vi)(()=>{var n=f.pg(0,f.hi(1,f.zg(e,t)));return f.qg(no(n),-1)})},hinge:function(e,t){return Object(f.vi)(()=>{var n=f.pg(0,f.hi(1,f.zg(e,t)));return f.qg(n,-1)})},categoricalHinge:function(e,t){return Object(f.vi)(()=>{var n=f.ii(f.zg(e,t),-1),r=f.lg(f.zg(f.hi(1,e),t),-1);return f.pg(0,f.Pd(1,f.hi(r,n)))})},logcosh:function(e,t){return Object(f.vi)(()=>{var n=Math.log(2),r=f.hi(t,e);r=f.hi(f.Pd(r,f.Th(f.zg(-2,r))),n);return f.qg(r,-1)})},categoricalCrossentropy:za,sparseCategoricalCrossentropy:Ha,binaryCrossentropy:$a,kullbackLeiblerDivergence:function(e,t){return Object(f.vi)(()=>{var n=f.te(e,Qi(),1),r=f.te(t,Qi(),1);return f.ii(f.zg(e,f.Yf(f.Xe(n,r))),-1)})},poisson:function(e,t){return Object(f.vi)(()=>{var n=f.Yf(f.Pd(Qi(),t));return f.qg(f.hi(t,f.zg(e,n)),-1)})},cosineProximity:Qa};function qa(e){if("string"!=typeof e)return e;{if(e in Va)return Va[e];let t="Unknown loss "+e;throw e.toLowerCase().includes("softmaxcrossentropy")&&(t=`Unknown loss ${e}. Use "categoricalCrossentropy" as the string name for tf.losses.softmaxCrossEntropy`),new ti(t)
/**
 * @license
 * Copyright 2018 Google LLC
 *
 * Use of this source code is governed by an MIT-style
 * license that can be found in the LICENSE file or at
 * https://opensource.org/licenses/MIT.
 * =============================================================================
 */}}function Ga(e,t){return Object(f.vi)(()=>{var n=f.zg(.5,f.Ig(t));n=Vi(f.Ff(t,n),e.dtype);return f.qg(f.if(e,n),-1)})}function Wa(e,t){return Object(f.vi)(()=>Vi(f.if(f.Td(e,-1),f.Td(t,-1)),"float32"))}function Ka(e,t){return Object(f.vi)(()=>f.re(f.ii(f.dg(f.if(e,1),f.if(t,1))),"float32"))}function Ya(e,t){return Object(f.vi)(()=>{var n,r,i=Ka(e,t),o=(n=e,r=t,Object(f.vi)(()=>f.re(f.ii(f.dg(f.if(n,0),f.if(r,1))),"float32")));o=f.Pd(i,o);return f.re(f.Pi(f.Ff(o,0),f.Xe(i,o),0),"float32")})}function Xa(e,t){return $a(e,t)}function Ja(e,t){return e.rank===t.rank&&(e=f.ci(e,[e.rank-1])),(t=f.Td(t,-1)).dtype!==e.dtype&&(t=f.re(t,e.dtype)),f.re(f.if(e,t),"float32")}const Za=za,es=Ha,ts={binaryAccuracy:Ga,categoricalAccuracy:Wa,precision:Ya,categoricalCrossentropy:Za,sparseCategoricalCrossentropy:es,mse:Pa,MSE:Pa,mae:La,MAE:La,mape:Ua,MAPE:Ua,cosine:Qa};function ns(e){if(ai(null!==e,"Unknown LossOrMetricFn "+e),"string"==typeof e)return e;{let t;for(const n of Object.keys(Va))if(Va[n]===e){t=n;break}if(void 0!==t)return t;for(const n of Object.keys(ts))if(ts[n]===e){t=n;break}return void 0!==t?t:e.name}}
/**
 * @license
 * Copyright 2018 Google LLC
 *
 * Use of this source code is governed by an MIT-style
 * license that can be found in the LICENSE file or at
 * https://opensource.org/licenses/MIT.
 * =============================================================================
 */function rs(e,t,n=!1){if(null==e||"object"!=typeof e||Object.getPrototypeOf(e)!==Object.prototype||!function e(t){if(null===t)return!0;if("object"==typeof t){if(Object.getPrototypeOf(t)===Object.prototype){const n=Object.keys(t);for(const r of n){if("string"!=typeof r)return!1;if(!e(t[r]))return!1}return!0}if(Array.isArray(t)){for(const n of t)if(!e(n))return!1;return!0}return!1}{const e=typeof t;return"string"==e||"number"==e||"boolean"==e}}
/**
 * @license
 * Copyright 2018 Google LLC
 *
 * Use of this source code is governed by an MIT-style
 * license that can be found in the LICENSE file or at
 * https://opensource.org/licenses/MIT.
 * =============================================================================
 */(e))throw new Error("User-defined metadata is expected to be a JSON object, but is not.");n&&JSON.stringify(e).length}function is(e,t,n=console.log){let r="";for(let n=0;n<e.length;++n)0<n&&(r=r.slice(0,r.length-1)+" "),r=(r+=e[n]).slice(0,t[n]),r+=" ".repeat(t[n]-r.length);n(r)}
/**
 * @license
 * Copyright 2018 Google LLC
 *
 * Use of this source code is governed by an MIT-style
 * license that can be found in the LICENSE file or at
 * https://opensource.org/licenses/MIT.
 * =============================================================================
 */function os(e,t,n){return("inboundNodes"===e||"outputLayers"===e||"inputLayers"===e)&&0===t&&"string"==typeof n}function as(e,t){if(null===e)return null;if("string"==typeof e)return hi(e);if("number"==typeof e||"boolean"==typeof e)return e;if(e instanceof Array){const i=[];var n=e.length;for(let o=0;o<n;++o){var r=e[o];os(t,o,r)?i.push(r):i.push(as(r,t))}return i}{const t={};for(const n of Object.keys(e)){var i,o=e[n];"name"===n&&"string"==typeof o?t[n]=o:t[i=hi(n)]=as(o,i)}return t}}
/** @license See the LICENSE file. */
/**
 * @license
 * Copyright 2018 Google LLC
 *
 * Use of this source code is governed by an MIT-style
 * license that can be found in the LICENSE file or at
 * https://opensource.org/licenses/MIT.
 * =============================================================================
 */
class ss extends $o{constructor(e){if(super({}),this.containerNodes=new Set,this.name=e.name,null==this.name&&(k=this.getClassName().toLowerCase(),this.name=Ci(k)),this.supportsMasking=!1,this.trainable_=!0,Array.isArray(e.inputs)?this.inputs=e.inputs.slice():this.inputs=[e.inputs],Array.isArray(e.outputs)?this.outputs=e.outputs.slice():this.outputs=[e.outputs],gi(this.inputs).length!==this.inputs.length)throw new ti("The list of inputs passed to the model is redundant. All inputs should only appear once. Found: "+this.inputs.map(e=>e.name));gi(this.outputs).length,this.outputs.length,this.inputLayers=[],this.inputLayersNodeIndices=[],this.inputLayersTensorIndices=[],this.outputLayers=[],this.outputLayersNodeIndices=[],this.outputLayersTensorIndices=[],this.layers=[],this.internalContainerRefs=[];for(const e of this.outputs){var t=e.sourceLayer,n=e.nodeIndex,r=e.tensorIndex;this.outputLayers.push(t),this.outputLayersNodeIndices.push(n),this.outputLayersTensorIndices.push(r)}for(const e of this.inputs){var i=e.sourceLayer,o=e.nodeIndex,a=e.tensorIndex;ai(0===o,"input layer has >1 nodes"),ai(0===a,"input layer has >1 tensors"),this.inputLayers.push(i),this.inputLayersNodeIndices.push(o),this.inputLayersTensorIndices.push(a)}this.inputNames=[],this.outputNames=[],this.feedInputShapes=[],this.feedInputNames=[],this.feedOutputNames=[];for(let t=0;t<this.inputLayers.length;t++){const n=this.inputLayers[t];if(!(n instanceof Qo))throw new TypeError(`Input layers to a LayersModel must be InputLayer objects. Received inputs: ${e.inputs}. Input ${t} (0-based) originates from layer type ${n.getClassName()}.`);this.inputNames.push(n.name),this.feedInputShapes.push(n.batchInputShape),this.feedInputNames.push(n.name)}for(const e of this.outputLayers)this.outputNames.push(e.name);this.internalInputShapes=this.inputs.map(e=>e.shape),this.internalOutputShapes=this.outputs.map(e=>e.shape);const s={},u={},c={},l={},h={},f=[],d=(e,t,n,r,i,o)=>{null!=r&&null!=i&&null!=o||(r=e.sourceLayer,i=e.nodeIndex,o=e.tensorIndex);var a=r.inboundNodes[i];if(-1!==n.indexOf(a))throw new ei(`The tensor ${e.name} at layer "${r.name}" is part of a cycle.`);if(-1===t.indexOf(a)){this.containerNodes.add(ss.nodeKey(r,i)),r.id in h||(h[r.id]=Object.keys(h).length),-1===n.indexOf(a)&&n.push(a);var s=a.inboundLayers.length;for(let e=0;e<s;e++){var u=a.inputTensors[e];const r=a.inboundLayers[e],i=a.nodeIndices[e],o=a.tensorIndices[e];d(u,t,n,r,i,o)}for(t.push(a);0<=n.indexOf(a);)n.splice(n.indexOf(a),1);f.push(a)}};var p=[],m=[];for(const e of this.outputs)d(e,p,m);for(const e of f.slice().reverse()){(u[e.id]=e).id in s||(s[e.id]=0);var g=s[e.id],A=null==c[e.outboundLayer.id]?0:c[e.outboundLayer.id];g=Math.max(g,A);c[e.outboundLayer.id]=g,l[e.outboundLayer.id]=e.outboundLayer,s[e.id]=g;for(let t=0;t<e.inboundLayers.length;t++){var v=e.inboundLayers[t],b=e.nodeIndices[t];b=null==s[(v=v.inboundNodes[b]).id]?0:s[v.id];s[v.id]=Math.max(g+1,b),u[v.id]=v}}const y={};for(const e in s){var w=s[e];w in y||(y[w]=[]),y[w].push(u[e])}const x={};for(const e in c){var C=c[e];C in x||(x[C]=[]),x[C].push(l[e])}var k=Object.keys(x).map(e=>parseInt(e,10)).sort(mi);this.layers=[];for(const e of k){const t=x[e];t.sort((e,t)=>(e=h[e.id])<(t=h[t.id])?-1:t<e?1:0);for(const e of t)e instanceof ss&&this.internalContainerRefs.push(e),this.layers.push(e)}this.layersByDepth=x,k=Object.keys(y).map(e=>parseInt(e,10)).sort(mi);const E=this.inputs.slice(),S=[];for(const e of k)for(const t of y[e]){var _=t.outboundLayer;if(null!=_){for(const e of t.inputTensors)if(-1===E.indexOf(e))throw new ei("Graph disconnected: cannot obtain value for tensor "+e+` at layer "${_.name}". The following previous layers were accessed without issue: `+S);for(const e of t.outputTensors)E.push(e);S.push(_.name)}}this.nodesByDepth=y;const O=this.layers.map(e=>e.name);for(const e of O){var T=O.filter(t=>t===e).length;if(1!==T)throw new ei(`The name "${e}" is used ${T} times in the model. All layer names should be unique. Layer names: `+JSON.stringify(O))}this.outboundNodes=[],this.inboundNodes=[],new zo({outboundLayer:this,inboundLayers:[],nodeIndices:[],tensorIndices:[],inputTensors:this.inputs,outputTensors:this.outputs,inputMasks:this.inputs.map(e=>null),outputMasks:this.outputs.map(e=>null),inputShapes:this.inputs.map(e=>e.shape),outputShapes:this.outputs.map(e=>e.shape)}),this.built=!0,this._refCount=1}assertNotDisposed(){if(0===this._refCount)throw new Error(`Container '${this.name}' is already disposed.`)}dispose(){this.assertNotDisposed();const e={refCountAfterDispose:null,numDisposedVariables:0};if(0==--this._refCount){for(const t of this.layers)e.numDisposedVariables+=t.dispose().numDisposedVariables;for(const t of this.internalContainerRefs)e.numDisposedVariables+=t.dispose().numDisposedVariables}return e.refCountAfterDispose=this._refCount,e}get trainable(){return this.trainable_}set trainable(e){this.layers.forEach(t=>{t._trainableWeights.forEach(t=>t.trainable=e)}),this.trainable_=e}get trainableWeights(){if(0<this._trainableWeights.length)throw new ti("Container instance unexpectedly contains _trainableWeights.The trainable weights of a Container are a union of the trainable weights of its consituent Layers. Its own _trainableWeights must remain an empty Array.");if(!this.trainable)return[];let e=[];for(const t of this.layers)e=e.concat(t.trainableWeights);return e}get nonTrainableWeights(){const e=[];for(const t of this.layers)e.push(...t.nonTrainableWeights);if(this.trainable)return e;{const t=[];for(const e of this.layers)t.push(...e.trainableWeights);return t.concat(e)}}get weights(){return this.trainableWeights.concat(this.nonTrainableWeights)}loadWeights(e,t=!0){const n={};let r=0;for(const e of this.layers)for(const t of e.weights){if(null!=n[t.originalName])throw new ti("Duplicate weight name: "+t.originalName);n[t.originalName]=t,r++}const i=[];for(const r in e){let o=r;if(null==n[r]){const e=r.split("/");o=e.slice(0,-2).concat([e[e.length-1]]).join("/")}if(null!=n[o])i.push([n[o],e[r]]);else if(t)throw new ti("Provided weight data has no target variable: "+r);delete n[o]}if(t){const e=[];for(const t in n)e.push(t);if(0<e.length)throw new ti(`${e.length} of ${r} weights are not set: `+e)}Ro(i)}updatedConfig(){var e=this.getConfig();const t={};return t.className=this.getClassName(),t.config=e,t.kerasVersion="tfjs-layers 4.1.0",t.backend="TensorFlow.js",t}toJSON(e,t=!0){var n=function e(t,n){if(null==t)return null;if("string"==typeof t)return li(t);if("number"==typeof t||"boolean"==typeof t)return t;if(t instanceof Array){const o=[];var r=t.length;for(let a=0;a<r;++a){var i=t[a];os(n,a,i)?o.push(i):o.push(e(i,n))}return o}{const n={};for(const r of Object.keys(t)){var o=t[r],a=li(r);n[a]="name"!==r&&"className"!==r||"string"!=typeof o?e(o,r):o}return n}}(this.updatedConfig());return t?JSON.stringify(n):n}call(e,t){return Object(f.vi)(()=>{e=ci(e);const n=new qo;for(let t=0;t<this.inputs.length;++t)n.add(this.inputs[t],e[t]);return Ko(this.outputs,n,t)})}computeMask(e,t){return Object(f.vi)(()=>{let n;return e=ci(e),n=null==t?oi(null,e.length):ci(t),this.runInternalGraph(e,n)[1]})}computeOutputShape(e){const t=Bo(e);if(t.length!==this.inputLayers.length)throw new ti(`Invalid inputShape argument ${e}: model has ${this.inputLayers.length} tensor inputs.`);const n={};for(let e=0;e<t.length;e++){var r=this.inputLayers[e];const i=t[e];n[r=r.name+"_0_0"]=i}if(1<(e=Object.keys(this.nodesByDepth).map(e=>parseInt(e,10)).sort(mi)).length)for(const t of e)for(const e of this.nodesByDepth[t]){const t=e.outboundLayer;if(-1===this.inputLayers.map(e=>e.id).indexOf(t.id)){const r=[];for(let t=0;t<e.inboundLayers.length;t++){var i=e.inboundLayers[t],o=e.nodeIndices[t],a=e.tensorIndices[t];const s=n[i=i.name+`_${o}_`+a];r.push(s)}const u=Bo(t.computeOutputShape(ui(r)));var s=t.inboundNodes.indexOf(e);for(let e=0;e<u.length;e++){n[t.name+`_${s}_`+e]=u[e]}}}const u=[],c=[];for(let e=0;e<this.outputLayers.length;e++){var l=this.outputLayers[e],h=this.outputLayersNodeIndices[e],f=this.outputLayersTensorIndices[e];l=l.name+`_${h}_`+f;c.push(l)}for(let e=0;e<c.length;e++){var d=c[e];ai(d in n),u.push(n[d])}return ui(u)}runInternalGraph(e,t){null==t&&(t=oi(null,e.length));const n={};for(let a=0;a<this.inputs.length;++a){var r=this.inputs[a],i=e[a],o=t[a];n[r.id]=[i,o]}for(const e of Object.keys(this.nodesByDepth).map(e=>parseInt(e,10)).sort(mi))for(const t of this.nodesByDepth[e]){const e=t.outboundLayer;var a,s=t.inputTensors,u=t.outputTensors;const r=new Array;for(const e of s)e.id in n&&r.push(n[e.id]);if(r.length===s.length){let i,o,f,d,p={};if(null!=t.callArgs&&(p=t.callArgs),1===r.length?([s,a]=r[0],null==p.mask&&(p.mask=a),f=ci(e.call(s,p)),d=ci(e.computeMask(s,a)),i=[s],o=[a]):(i=r.map(e=>e[0]),o=r.map(e=>e[1]),null==p.mask&&(p.mask=o),f=ci(e.call(i,p)),d=ci(e.computeMask(i,o))),e.activityRegularizer)throw new ni("LayersModel invocation with concrete Tensor value(s) in the presence of activity regularizer(s) is not supported yet.");for(let e=0;e<u.length;++e){var c=u[e],l=f[e],h=d[e];n[c.id]=[l,h]}}}const f=[],d=[],p=[];for(const e of this.outputs){ai(e.id in n,`Could not compute output ${e.name} : `+e.id);var[m,g]=n[e.id];p.push(m.shape),f.push(m),d.push(g)}return[f,d,p]}buildNodeConversionMap(e){const t={};let n;for(const e of this.layers){n=e instanceof ss?1:0;for(let i=0;i<e.inboundNodes.length;i++){var r=ss.nodeKey(e,i);this.containerNodes.has(r)&&(t[r]=n,n+=1)}}return t}getLayer(e,t){if(null!=t){if(this.layers.length<=t)throw new ti(`Was asked to retrieve layer at index ${t}, but model only has ${this.layers.length} layer(s).`);return this.layers[t]}if(null==e)throw new ti("Provide either a layer name or layer index");for(const t of this.layers)if(t.name===e)return t;throw new ti("No such layer: "+e)}calculateLosses(){return Object(f.vi)(()=>{const e=[];for(const n of this.layers)for(let r=0;r<n.inboundNodes.length;++r){var t=ss.nodeKey(n,r);this.containerNodes.has(t)&&e.push(...n.calculateLosses())}return e})}getConfig(){const e={name:this.name};var t=this.buildNodeConversionMap(this.layers);const n=[];for(const l of this.layers){var r=l.getClassName(),i=l.getConfig();const h=[];for(let n=0;n<l.inboundNodes.length;n++){var o=l.inboundNodes[n],a=ss.nodeKey(l,n);let r={};if(this.containerNodes.has(a)){if(o.callArgs)try{JSON.stringify(o.callArgs),r=o.callArgs}catch(e){r={}}if(0<o.inboundLayers.length){const e=[];for(let n=0;n<o.inboundLayers.length;n++){var s=o.inboundLayers[n],u=o.nodeIndices[n],c=o.tensorIndices[n];let i=t[ss.nodeKey(s,u)];null==i&&(i=0),e.push([s.name,i,c,r])}h.push(e)}}}const f={};f.name=l.name,f.className=r,f.config=i,f.inboundNodes=h,n.push(f)}e.layers=n;const l=[];for(let e=0;e<this.inputLayers.length;e++){var h=this.inputLayers[e],f=this.inputLayersNodeIndices[e];f=ss.nodeKey(h,f);if(this.containerNodes.has(f)){let n=t[f];null!=n||(n=0),f=this.inputLayersTensorIndices[e],l.push([h.name,n,f])}}e.inputLayers=l;const d=[];for(let e=0;e<this.outputLayers.length;e++){var p=this.outputLayers[e],m=this.outputLayersNodeIndices[e];m=ss.nodeKey(p,m);if(this.containerNodes.has(m)){let n=t[m];null!=n||(n=0),m=this.outputLayersTensorIndices[e],d.push([p.name,n,m])}}return e.outputLayers=d,e}static fromConfig(e,t,n=0,r=!1){const i={},o={};function a(e,t){e.name in o?o[e.name].push(t):o[e.name]=[t]}var s=t.name,u=t.layers;for(const e of u)!function(e){var n=e.name;const o=Fa(e,null!=t.customObjects?t.customObjects:{});(o.setFastWeightInitDuringBuild(r),i[n]=o,e.inboundNodes).forEach(e=>{if(!(e instanceof Array))throw new ti("Corrupted configuration, expected array for nodeData: "+e);a(o,e)})}(e);for(;!function(e){if(null==e)throw new ti("Invalid value in obj: "+JSON.stringify(e));for(const t in e)if(e.hasOwnProperty(t))return;return 1}(o);)for(const e of u){var c=i[e.name];if(c.name in o){var l=o[c.name];delete o[c.name];for(const e of l)!function(e,t){const n=[];let r;for(const c of t){var o=c[0],s=c[1],u=c[2];if(r=null==c[3]?{}:c[3],!(o in i))return a(e,t);if((o=i[o]).inboundNodes.length<=s)return a(e,t);o=o.inboundNodes[s],n.push(o.outputTensors[u])}0<n.length&&e.apply(ui(n),r)}(c,e)}}const h=[],f=[];for(const e of t.inputLayers){var d=e[0],p=e[1],m=e[2];d=(d=(ai(d in i),i[d])).inboundNodes[p].outputTensors;h.push(d[m])}for(const e of t.outputLayers){var g=e[0],A=e[1],v=e[2];g=(g=(ai(g in i),i[g])).inboundNodes[A].outputTensors;f.push(g[v])}return new e({inputs:h,outputs:f,name:s})}get stateful(){if(this._stateful)throw new ti("Container instance unexpectedly has _stateful = true. The statefulness of a Container is determined by the Layers it contains. Its _stateful property must remain the default false.");for(const e of this.layers)if(e.stateful)return!0;return!1}resetStates(){Object(f.vi)(()=>{this.layers.forEach(e=>{e.stateful&&e.resetStates()})})}}
/**
 * @license
 * Copyright 2018 Google LLC
 *
 * Use of this source code is governed by an MIT-style
 * license that can be found in the LICENSE file or at
 * https://opensource.org/licenses/MIT.
 * =============================================================================
 */function us(e,t){return function(e,t,n){var r=t.length;if(null==e||Array.isArray(e)&&0===e.length)return t.map(e=>null);if(1===r)return Array.isArray(e)&&1===e.length?e:"object"==typeof e&&t[0]in e?[e[t[0]]]:[e];if(Array.isArray(e)){if(e.length!==r)throw new Error(`Provided ${n} is an array of ${e.length} element(s), but the model has ${r} outputs. Make sure a set of weights is provided for each model output.`);return e}if("object"==typeof e&&0<Object.keys(e).length&&"object"==typeof e[Object.keys(e)[0]]){const n=[];return t.forEach(t=>{t in e?n.push(e[t]):n.push(null)}),n}throw new Error(`The model has multiple (${r}) outputs, so ${n} must be either an array with `+r+` elements or an object with ${t} keys. `+`Provided ${n} not understood: `+JSON.stringify(e))}(e,t,"classWeight")}async function cs(e,t,n,r){if(null!=t||null!=r)throw new Error("Support sampleWeight is not implemented yet");if(null==n)return null;{const t=Object(f.vi)(()=>{if(1===e.shape.length)return Object(f.ue)(e);if(2!==e.shape.length)throw new Error(`Unexpected rank of target (y) tensor (${e.rank}) during handling of class weights. The rank is expected to be 1 or 2.`);if(1<e.shape[1])return Object(f.Td)(e,1);if(1===e.shape[1])return Object(f.oh)(e,[e.shape[0]]);throw new Error(`Encountered unexpected last-dimension size (${e.shape[1]}) during handling of class weights. The size is expected to be >= 1.`)}),r=Array.from(await t.data()),i=(Object(f.Ve)(t),[]);return r.forEach(e=>{if(null==n[e])throw new Error(`classWeight must contain all classes in the training data. The class ${e} exists in the data but not in classWeight`);i.push(n[e])}),Object(f.ni)(i,"float32")}}function ls(e,t){var n=t.xs,r=t.ys;f.Ji.assert(null!=n&&null!=r,()=>"A Dataset iterator for fitDataset() is expected to generate objects of the form `{xs: xVal, ys: yVal}`, where the two values may be `tf.Tensor`, an array of Tensors, or a map of string to Tensor.  The provided Dataset instead generates "+t);const i=hs("input",e.inputNames,n),o=hs("output",e.outputNames,r),a=i[0].shape[0];f.Ji.assert(i.length===e.inputs.length,()=>`LayersModel has ${e.inputs.length} inputs, but the dataset provides ${i.length} inputs.  (Expected input keys: `+JSON.stringify(e.inputNames)+")"),f.Ji.assert(o.length===e.outputs.length,()=>`LayersModel has ${e.outputs.length} outputs, but the dataset provides ${o.length} outputs.  (Expected output keys: `+JSON.stringify(e.outputNames)+")");for(let t=0;t<i.length;t++)f.Ji.assert(i[t].shape[0]===a,()=>`Batch size mismatch: input ${e.inputNames[t]} has ${i[t].shape[0]}; expected  ${a} based on input ${e.inputNames[0]}.`);for(let t=0;t<o.length;t++)f.Ji.assert(o[t].shape[0]===a,()=>`Batch size mismatch: output ${e.outputNames[t]} has ${o[t].shape[0]}; expected  ${a} based on input ${e.inputNames[0]}.`);return{xs:i,ys:o}}function hs(e,t,n){if(n instanceof f.zd)return[n];if(Array.isArray(n))return f.Ji.assert(n.length===t.length,()=>`Received an array of ${n.length} Tensors, but expected ${t.length} to match the ${e} keys ${t}.`),n;{const r=[];for(const i of t){if(null==n[i])throw new ti(`The feature data generated by the dataset lacks the required ${e} key '${i}'.`);r.push(n[i])}return r}}function fs(e){return"function"==typeof e.iterator}
/**
 * @license
 * Copyright 2018 Google LLC
 *
 * Use of this source code is governed by an MIT-style
 * license that can be found in the LICENSE file or at
 * https://opensource.org/licenses/MIT.
 * =============================================================================
 */function ds(e){f.Ji.assert(0<e&&Number.isInteger(e),()=>"batchSize is required to be a positive integer, but got "+e)}function ps(e,t,n){return null==e?[null]:Array.isArray(e)?e.map(e=>Gi(e,t,n-t)):Gi(e,t,n-t)}function ms(e,t){return f.vi(()=>null==e?null:Array.isArray(e)?e.map(e=>ms(e,t)):to(e,"int32"===t.dtype?t:f.re(t,"int32")))}function gs(e,t){const n=[];let r=0,i=null;for(;r<e;)(i=r+t)>=e&&(i=e),n.push([r,i]),r=i;return n}function As(e){const t=[];e instanceof f.zd&&(e=[e]);for(let r=0;r<e.length;++r){var n=e[r];if(1===n.rank)t.push(qi(n,1));else{if(0===n.rank)throw new Error("Expected tensor to be at least 1D, but received a 0D tensor (scalar).");t.push(n)}}return t}function vs(e,t){if(null!=e){const i=[];if(t instanceof f.zd)i.push(t.id);else if(Array.isArray(t))t.forEach(e=>i.push(e.id));else if(null!=t)for(const e in t){var n=t[e];i.push(n.id)}const o=[];if(e instanceof f.zd)-1===i.indexOf(e.id)&&o.push(e);else if(Array.isArray(e))e.forEach(e=>{-1===i.indexOf(e.id)&&o.push(e)});else if(null!=e)for(const t in e){var r=e[t];-1===i.indexOf(r.id)&&o.push(r)}o.forEach(e=>{e.isDisposed||e.dispose()})}}
/**
 * @license
 * Copyright 2018 Google LLC
 *
 * Use of this source code is governed by an MIT-style
 * license that can be found in the LICENSE file or at
 * https://opensource.org/licenses/MIT.
 * =============================================================================
 */function bs(e){return Array.isArray(e)}function ys(e){return!(e instanceof f.zd||bs(e))}function ws(e,t,n,r=!0,i=""){if(null==t||0===t.length){if(null!=e){let t=!1;if(bs(e)&&0<e.length)t=!0;else if(ys(e)){for(const n in e)if(e.hasOwnProperty(n)){t=!0;break}}else t=!0;if(t)throw new ti(`Error when checking model ${i} expected no data, but got `+e)}return[]}if(null==e)return t.map(e=>null);let o;if(ys(e)){o=[];for(const n of t){if(null==e[n])throw new ti(`No data provided for "${n}". Need data for each key in: `+t);o.push(e[n])}}else if(bs(e)){if(e.length!==t.length)throw new ti(`Error when checking model ${i}: the Array of Tensors that you are passing to your model is not the size the model expected. Expected to see ${t.length} Tensor(s), but instead got the following list of Tensor(s): `+e);o=e}else{if(1<t.length)throw new ti(`The model ${i} expects ${t.length} Tensor(s), but only received one Tensor. Found: Tensor with shape `+e.shape);o=[e]}if(o=As(o),null!=n)for(let e=0;e<t.length;++e)if(null!=n[e]){const u=o[e];if(u.shape.length!==n[e].length)throw new ti(`Error when checking ${i}: expected ${t[e]} to have ${n[e].length} dimension(s). but got array with shape `+u.shape);for(let t=0;t<n[e].length;++t)if(0!==t||r){var a=u.shape[t],s=n[e][t];if(null!=s&&0<=s&&a!==s)throw new ti(i+" expected a batch of elements where each "+`example has shape [${n[e].slice(1,n[e].length)}] `+`(i.e.,tensor shape [*,${n[e].slice(1,n[e].length)}])`+` but the ${i} received an input with `+u.shape[0]+` examples, each with shape [${u.shape.slice(1,u.shape.length)}]`+` (tensor shape [${u.shape}])`)}}return o}function xs(e,t,n,r=!0,i=""){let o;if(Array.isArray(e)){if(e.length!==t.length)throw new ti(`Error when checking model ${i}: the Array of Tensors that you are passing to your model is not the size the the model expected. Expected to see ${t.length} Tensor(s), but instead got ${e.length} Tensors(s).`);o=e}else{if(1<t.length)throw new ti(`The model expects ${t.length} ${i} Tensors, but only received one Tensor. Found: array with shape `+JSON.stringify(e.shape)+".");o=[e]}if(null!=n)for(let e=0;e<t.length;++e)if(null!=n[e]){var a=o[e];if(a.shape.length!==n[e].length)throw new ti(`Error when checking ${i}: expected ${t[e]} to have ${n[e].length} dimension(s), but got array with shape `+JSON.stringify(a.shape));for(let o=0;o<n[e].length;++o)if(0!==o||r){var s=a.shape[o],u=n[e][o];if(null!=u&&u!==s)throw new ti(`Error when checking ${i}: expected ${t[e]} to have shape ${JSON.stringify(n[e])} but got array with shape ${JSON.stringify(a.shape)}.`)}}}class Cs extends ss{constructor(e){super(e),this.isTraining=!1}summary(e,t,n=console.log){if(!this.built)throw new ti("This model has never been called, thus its weights have not been created yet. So no summary can be displayed. Build the model first (e.g., by calling it on some test data).");!function(e,t,n,r=console.log){var i=function(e){let t=!0;const n=[],r=[];for(const t in e.nodesByDepth)n.push(e.nodesByDepth[t]);for(const e of n){if(1<e.length||1===e.length&&1<e[0].inboundLayers.length){t=!1;break}r.push(...e)}if(t)for(const n of e.layers){let e=!1;for(const i of n.inboundNodes)if(-1!==r.indexOf(i)){if(e){t=!1;break}e=!0}if(!t)break}return t}(e);const o=["Layer (type)","Input Shape","Output shape","Param #"];let a;if((n=i?(t=t||90,n||[.32,.61,.89,1]):(t=t||115,n||[.24,.48,.7,.8,1]))[n.length-1]<=1&&(n=n.map(e=>Math.floor(t*e))),!i){o.push("Receives inputs"),a=[];for(const t in e.nodesByDepth)a.push(...e.nodesByDepth[t])}r("_".repeat(t)),is(o,n,r),r("=".repeat(t));var s=e.layers;for(let o=0;o<s.length;++o){if(i){u=void 0,c=void 0,void 0,h=void 0,f=void 0,h=void 0;var u=s[o],c=n,l=r;let t,i;try{i=u.inboundNodes.map(e=>JSON.stringify(e.inputShapes)).join(",")}catch(e){i="multiple"}try{t=JSON.stringify(u.outputShape)}catch(e){t="multiple"}var h=u.name,f=u.getClassName();is(h=[h+` (${f})`,i,t,u.countParams().toString()],c,l)}else{f=void 0,void 0,p=void 0,void 0,u=void 0,h=void 0,c=void 0,u=void 0,g=void 0,A=void 0,v=void 0,f=s[o];var d=n,p=a,m=r;let t,i;try{i=f.inboundNodes.map(e=>JSON.stringify(e.inputShapes)).join(",")}catch(e){i="multiple"}try{t=JSON.stringify(f.outputShape)}catch(e){t="multiple"}const l=[];for(const e of f.inboundNodes)if(!(null!=p&&0<p.length&&-1===p.indexOf(e)))for(let t=0;t<e.inboundLayers.length;++t){var g=e.inboundLayers[t].name,A=e.nodeIndices[t],v=e.tensorIndices[t];l.push(g+`[${A}][${v}]`)}u=f.name,h=f.getClassName(),c=0===l.length?"":l[0],is(u=[u+` (${h})`,i,t,f.countParams().toString(),c],d,m);for(let e=1;e<l.length;++e)is(["","","","",l[e]],d,m)}r((o===s.length-1?"=":"_").repeat(t))}e.checkTrainableWeightsConsistency();var b=function(e){let t;return t=null!=e.collectedTrainableWeights?jo(e.collectedTrainableWeights):jo(e.trainableWeights),t}(e),y=jo(e.nonTrainableWeights);r("Total params: "+(b+y)),r("Trainable params: "+b),r("Non-trainable params: "+y),r("_".repeat(t))}(this,e,t,n)}compile(e){if(null==e.loss&&(e.loss=[]),this.loss=e.loss,"string"==typeof e.optimizer)this.optimizer_=function(e){const t={Adagrad:()=>f.zi.adagrad(.01),Adadelta:()=>f.zi.adadelta(1,.95,Qi()),Adam:()=>f.zi.adam(.001,.9,.999,Qi()),Adamax:()=>f.zi.adamax(.002,.9,.999,Qi(),0),RMSProp:()=>f.zi.rmsprop(.001,.9,0,Qi()),SGD:()=>f.zi.sgd(.01)};if(t.adagrad=t.Adagrad,t.adadelta=t.Adadelta,t.adam=t.Adam,t.adamax=t.Adamax,t.rmsprop=t.RMSProp,t.sgd=t.SGD,e in t)return t[e]();throw new ti("Unknown Optimizer "+e)}
/**
 * @license
 * Copyright 2019 Google LLC
 *
 * Use of this source code is governed by an MIT-style
 * license that can be found in the LICENSE file or at
 * https://opensource.org/licenses/MIT.
 * =============================================================================
 */(e.optimizer),this.isOptimizerOwned=!0;else{if(!(e.optimizer instanceof f.rc))throw new ti("User-defined optimizer must be an instance of tf.Optimizer.");this.optimizer_=e.optimizer,this.isOptimizerOwned=!1}let t=[];if(Array.isArray(e.loss)||"string"==typeof e.loss||"function"==typeof e.loss)if(Array.isArray(e.loss)){if(e.loss.length!==this.outputs.length)throw new ti(`When passing an Array as loss, it should have one entry per model output. The model has ${this.outputs.length} output(s), but you passed loss=${e.loss}.`);const n=e.loss;t=n.map(e=>qa(e))}else{const n=qa(e.loss);this.outputs.forEach(e=>{t.push(n)})}else{e.loss=e.loss;for(const t in e.loss)if(-1===this.outputNames.indexOf(t))throw new ti(`Unknown entry in loss dictionary: "${t}". Only expected the following keys: `+this.outputNames);for(const n of this.outputNames)e.loss[n],t.push(qa(e.loss[n]))}this.lossFunctions=t,this.feedOutputNames=[],this.feedOutputShapes=[],this.feedLossFns=[];for(let e=0;e<this.outputs.length;++e){var n=this.internalOutputShapes[e],r=this.outputNames[e];this.feedOutputNames.push(r),this.feedOutputShapes.push(n),this.feedLossFns.push(this.lossFunctions[e])}const i=[],o=(this.metrics=e.metrics,this.metricsNames=["loss"],this.metricsTensors=[],ji("loss",()=>{for(let t=0;t<this.outputs.length;++t){var e;-1===i.indexOf(t)&&(e=this.lossFunctions[t],1<this.outputs.length&&(this.metricsTensors.push([e,t]),this.metricsNames.push(this.outputNames[t]+"_loss")))}}),function(e,t){if(null==e||Array.isArray(e)&&0===e.length)return t.map(e=>[]);let n;if("string"==typeof e||"function"==typeof e)n=[e];else{if(!Array.isArray(e)&&"object"!=typeof e)throw new TypeError("Type of metrics argument not understood. Expected an string,function, Array, or Object, found: "+e);n=e}if(Array.isArray(n))return t.map(e=>n);{const e=[];for(const r of t){let t=n.hasOwnProperty(r)?n[r]:[];Array.isArray(t)||(t=[t]),e.push(t)}return e}}(e.metrics,this.outputNames)),a=(e,t,n)=>{1<this.outputNames.length&&(t=this.outputNames[e]+"_"+t),this.metricsNames.push(t),this.metricsTensors.push([n,e])};ji("metric",()=>{for(let e=0;e<this.outputs.length;++e)-1===i.indexOf(e)&&(t=>{let n,r,i;for(const s of t){if("string"==typeof s&&-1!==["accuracy","acc","crossentropy","ce"].indexOf(s)){var o=this.internalOutputShapes[e];let t;1===o[o.length-1]||this.lossFunctions[e]===$a?-1!==["accuracy","acc"].indexOf(s)?r=Ga:-1!==["crossentropy","ce"].indexOf(s)&&(r=Xa):this.lossFunctions[e]===Ha?-1!==["accuracy","acc"].indexOf(s)?r=Ja:-1!==["crossentropy","ce"].indexOf(s)&&(r=es):-1!==["accuracy","acc"].indexOf(s)?r=Wa:-1!==["crossentropy","ce"].indexOf(s)&&(r=Za),-1!==["accuracy","acc"].indexOf(s)?t="acc":-1!==["crossentropy","ce"].indexOf(s)&&(t="ce"),i=r,n=""+t}else o=function(e){if("string"==typeof e&&e in ts)return ts[e];if("string"!=typeof e&&null!=e)return e;throw new ti("Unknown metric "+e)}(s),i=o,n=""+ns(s);let t;ji(n,()=>{t=i}),a(e,n,t)}})(o[e])}),this.collectedTrainableWeights=this.trainableWeights}checkTrainableWeightsConsistency(){null!=this.collectedTrainableWeights&&(this.trainableWeights.length,this.collectedTrainableWeights.length)}evaluate(e,t,n={}){var r=null==n.batchSize?32:n.batchSize;ds(r);const i=this.standardizeUserDataXY(e,t,!0,r);try{var o=i[0].concat(i[1]),a=(this.makeTestFunction(),this.testFunction);return ui(this.testLoop(a,o,r,n.verbose,n.steps))}finally{vs(i[0],e),vs(i[1],t)}}async evaluateDataset(e,t){return this.makeTestFunction(),async function(e,t,n){var r=null!=(n=n||{}).batches;const i=e.testFunction;let o=[];if(0<n.verbose)throw new ni("Verbose mode is not implemented yet.");f.Ji.assert(!r||0<n.batches&&Number.isInteger(n.batches),()=>"Test loop expects `batches` to be a positive integer, but received "+JSON.stringify(n.batches));const a="function"==typeof t.next?t:await t.iterator();let s=0,u=0;for(;!r||u<n.batches;){const t=await a.next();if(o=f.vi(()=>{if(t.value){const{xs:a,ys:c}=ls(e,t.value),l=a.concat(c);var n=f.vi(()=>i(l));if(f.Ve(l),0===u)for(let e=0;e<n.length;++e)o.push(Object(f.xh)(0));const h=l[0].shape[0];for(let e=0;e<n.length;++e){const t=n[e];var r=o[e];o[e]=f.vi(()=>f.Pd(o[e],f.zg(h,t))),0<u&&f.Ve(r)}f.Ve(n),s+=h,++u}return o}),t.done)break}for(let e=0;e<o.length;++e){var c=o[e];o[e]=f.Xe(o[e],s),f.Ve(c)}return ui(o)}(this,e,t)}checkNumSamples(e,t,n,r="steps"){let i;if(null!=n){if((i=null)!=t)throw new ti(`If ${r} is set, batchSize must be null or undefined.Got batchSize = `+t)}else{if(null==e)throw new ti("Either the input data should have a defined shape, or "+r+" shoud be specified.");i=(Array.isArray(e)?e[0]:e).shape[0]}return i}execute(e,t){if(Array.isArray(t)&&0===t.length)throw new ti("`outputs` is an empty Array, which is not allowed.");var n=Array.isArray(t);t=this.retrieveSymbolicTensors(n?t:[t]);const r=new qo;if(e instanceof f.zd&&(e=[e]),Array.isArray(e)){if(e.length!==this.inputs.length)throw new ti(`The number of inputs provided (${e.length}) does not match the number of inputs of this model (${this.inputs.length}).`);for(let t=0;t<this.inputs.length;++t)r.add(this.inputs[t],e[t])}else for(const t of this.inputs){var i=e[t.name];if(null==i)throw new ti("No value is provided for the model's input "+t.name);r.add(t,i)}return t=Ko(t,r),n?t:t[0]}retrieveSymbolicTensors(e){const t=oi(null,e.length);let n=e.length;for(const i of this.layers){const o=Array.isArray(i.output)?i.output:[i.output],a=o.map(e=>e.name);for(let i=0;i<e.length;++i){var r=a.indexOf(e[i]);if(-1!==r&&(t[i]=o[r],n--),0===n)break}if(0===n)break}if(0<n){const n=[];throw t.forEach((t,r)=>{null==t&&n.push(e[r])}),new ti("Cannot find SymbolicTensors for output name(s): "+JSON.stringify(n))}return t}predictLoop(e,t=32,n=!1){return f.vi(()=>{var r=this.checkNumSamples(e);if(n)throw new ni("Verbose predictLoop() is not implemented yet.");const i=gs(r,t),o=this.outputs.map(e=>[]);for(let t=0;t<i.length;++t){f.vi(()=>{var n=i[t][0],r=i[t][1],o=ps(e,n,r);const a=[];if(Array.isArray(o))for(let e=0;e<o.length;++e)a.push({key:this.inputs[e],value:o[e]});else a.push({key:this.inputs[0],value:o});return n=new qo(a),Ko(this.outputs,n)}).forEach((e,t)=>o[t].push(e))}return ui(o.map(e=>f.we(e,0)))})}predict(e,t={}){var n=As(e);xs(n,this.inputNames,this.feedInputShapes,!1);try{var r=null==t.batchSize?32:t.batchSize;return ds(r),this.predictLoop(n,r)}finally{vs(n,e)}}predictOnBatch(e){xs(e,this.inputNames,this.feedInputShapes,!0);var t=(Array.isArray(e)?e[0]:e).shape[0];return this.predictLoop(e,t)}standardizeUserDataXY(e,t,n=0,r){if(null==this.optimizer_)throw new ei("You must compile a model before training/testing. Use LayersModel.compile(modelCompileArgs).");const i=[];for(let e=0;e<this.feedOutputShapes.length;++e){const t=this.feedOutputShapes[e];this.feedLossFns[e]===Ha?i.push(t.slice(0,t.length-1).concat([1])):i.push(t)}{var o=e=ws(e,this.feedInputNames,this.feedInputShapes,!1,"input"),a=t=ws(t,this.feedOutputNames,i,!1,"target");const n=gi(o.map(e=>e.shape[0])),r=(n.sort(),gi(a.map(e=>e.shape[0])));if(r.sort(),1<n.length)throw new ti("All input Tensors (x) should have the same number of samples. Got array shapes: "+JSON.stringify(o.map(e=>e.shape)));if(1<r.length)throw new ti("All target Tensors (y) should have the same number of samples. Got array shapes: "+JSON.stringify(a.map(e=>e.shape)));if(0<n.length&&0<r.length&&!f.Ji.arraysEqual(n,r))throw new ti(`Input Tensors should have the same number of samples as target Tensors. Found ${n[0]} input sample(s) and ${r[0]} target sample(s).`)}{var s=t,u=this.feedLossFns,c=this.feedOutputShapes;const e=[Pa,$a,za];for(let t=0;t<s.length;++t){const n=s[t];var l=u[t];const r=c[t];if(null!=l){if(l===za&&1===n.shape[n.shape.length-1])throw new ti(`You are passing a target array of shape ${n.shape} while using a loss 'categorical_crossentropy'. 'categorical_crossentropy'expects targets to be binary matrices (1s and 0s) of shape [samples, classes].`);if(-1!==e.indexOf(l)){var h=n.shape.slice(1),d=r.slice(1);for(let e=0;e<h.length;++e){var p=h[e],m=d[e];if(null!=m&&p!==m)throw new ti(`A target Tensor with shape ${n.shape} was passed for an output of shape ${r}, while using a loss function that expects targets to have the same shape as the output.`)}}}}}if(this.stateful&&null!=r&&0<r&&e[0].shape[0]%r!=0)throw new ti(`In a stateful network, you should only pass inputs with a number of samples that is divisible by the batch size ${r}. Found: ${e[0].shape[0]} sample(s).`);return[e,t]}async standardizeUserData(e,t,n,r,i=!0,o){var[e,a]=this.standardizeUserDataXY(e,t,i,o);if(null!=n)throw new Error("sample weight is not supported yet.");let s=null;if(null!=r){var u=us(r,this.outputNames);s=[];for(let e=0;e<u.length;++e)s.push(await cs(a[e],null,u[e]))}return[e,a,s]}testLoop(e,t,n,r=0,i){return f.vi(()=>{var o=this.checkNumSamples(t,n,i,"steps");const a=[];if(0<r)throw new ni("Verbose mode is not implemented yet.");if(null!=i)throw new ni("steps mode in testLoop() is not implemented yet");var s=gs(o,n),u=Object(f.ni)(Hi(0,o));for(let n=0;n<s.length;++n){var c=s[n][0],l=s[n][1],h=Gi(u,c,l-c),d=(h=ms(t,h),e(h));if(0===n)for(let e=0;e<d.length;++e)a.push(Object(f.xh)(0));for(let e=0;e<d.length;++e){var p=d[e];a[e]=f.Pd(a[e],f.zg(l-c,p))}}for(let e=0;e<a.length;++e)a[e]=f.Xe(a[e],o);return a})}getDedupedMetricsNames(){const e=this.metricsNames,t=[];for(let r=0;r<e.length;++r){var n=e[r];let i=n;1<si(e,n)&&(i+="_"+(n=si(e.slice(0,r),n))),t.push(i)}return t}makeTrainFunction(){return e=>{const t=[],n=e.slice(0,this.inputs.length),r=e.slice(this.inputs.length,this.inputs.length+this.outputs.length),i=e.slice(this.inputs.length+this.outputs.length,this.inputs.length+2*this.outputs.length),o=[];e=this.collectedTrainableWeights.map(e=>e.read());return[this.optimizer_.minimize(()=>{const e=[];for(let t=0;t<this.inputs.length;++t)e.push({key:this.inputs[t],value:n[t]});var a,s=new qo(e),u=Ko(this.outputs,s,{training:!0});let c;for(let e=0;e<this.lossFunctions.length;++e){let n=(0,this.lossFunctions[e])(r[e],u[e]);null!=i[e]&&(l=n,a=i[e],n=Object(f.zg)(l,a));var l=f.qg(n);t.push(l),c=0===e?n:f.Pd(c,n)}for(let e=0;e<this.metricsTensors.length;++e){let n;if(1<this.outputs.length&&e<this.outputs.length)n=t[e];else{const t=this.metricsTensors[e][0];var h=this.metricsTensors[e][1];n=f.qg(t(r[h],u[h]))}f.Qf(n),o.push(n)}return c=f.qg(c),this.calculateLosses().forEach(e=>{c=f.Pd(c,e)}),c},!0,e)].concat(o)}}makeTestFunction(){this.testFunction=e=>f.vi(()=>{const t=[];let n;var r=e.slice(0,this.inputs.length),i=e.slice(this.inputs.length,this.inputs.length+this.outputs.length);const o=[];for(let e=0;e<this.inputs.length;++e)o.push({key:this.inputs[e],value:r[e]});var a=new qo(o),s=Ko(this.outputs,a);for(let e=0;e<this.lossFunctions.length;++e){const r=this.lossFunctions[e];var u=f.qg(r(i[e],s[e]));n=0===e?u:f.Pd(n,u),t.push(n)}for(let e=0;e<this.metricsTensors.length;++e){const n=this.metricsTensors[e][0];var c=this.metricsTensors[e][1];c=f.qg(n(i[c],s[c]));t.push(c)}return t})}async fit(e,t,n={}){if(this.isTraining)throw new Error("Cannot start training because another fit() call is ongoing.");let r,i,o,a,s,u,c,l,h;this.isTraining=!0;try{var d,p,m=null==n.batchSize?32:n.batchSize,g=(ds(m),await this.standardizeUserData(e,t,n.sampleWeight,n.classWeight,!1,m));r=g[0],i=g[1],h=g[2];let w,x=!1;if(null!=n.validationData&&0<n.validationData.length){if(x=!0,2!==n.validationData.length)throw 3===n.validationData.length?new ni("validationData including sample weights is not supported yet."):new ti("When passing validation data, it must contain 2 (valX, valY) or 3 (valX, valY, valSampleWeight) items; "+n.validationData+" is invalid.");s=n.validationData[0],u=n.validationData[1];var A=await this.standardizeUserData(s,u,null,null,!0,m);c=A[0],l=A[1],w=c.concat(l)}else null!=n.validationSplit&&0<n.validationSplit&&n.validationSplit<1?(x=!0,c=ps(r,d=Math.floor(r[0].shape[0]*(1-n.validationSplit)),p=r[0].shape[0]),r=ps(o=r,0,d),l=ps(i,d,p),i=ps(a=i,0,d),w=c.concat(l)):null!=n.validationSteps&&(x=!0);var v=r.concat(i).concat(h),b=(this.checkTrainableWeightsConsistency(),this.makeTrainFunction());const C=this.getDedupedMetricsNames();let k,E;E=x?(this.makeTestFunction(),k=this.testFunction,C.slice().concat(C.map(e=>"val_"+e))):(k=null,w=[],C.slice());var y=Ma(n.callbacks,n.yieldEvery);return await this.fitLoop(b,v,C,m,n.epochs,n.verbose,y,k,w,n.shuffle,E,n.initialEpoch,null,null)}finally{this.isTraining=!1,vs(r,e),vs(i,t),vs(o,e),vs(a,t),vs(c,s),vs(l,u),null!=h&&f.Ve(h)}}async fitLoop(e,t,n,r,i,o,a,s,u,c,l,h,d,p){null==r&&(r=32),null==i&&(i=1),null==c&&(c=!0),null==h&&(h=0);let m=null!=s&&null!=u;if(null!=p&&(m=!0,null==d))throw new ti("Can only use `validationSteps` when doing step-wise training, i.e., `stepsPerEpoch` must be set.");var g=this.checkNumSamples(t,r,d,"steps_per_epoch");let A;null!=g&&(A=Hi(0,g));const{callbackList:v,history:b}=Na(a,o=null==o?1:o,i,h,g,d,r,m,l);v.setModel(this),this.history=b,await v.onTrainBegin(),this.stopTraining_=!1;for(let o=h;o<i;++o){await v.onEpochBegin(o);const i={};if(null!=d)throw new ni("stepsPerEpoch mode is not implemented yet.");{if("batch"===c)throw new ni("batch shuffling is not implemneted yet");c&&f.Ji.shuffle(A);const o=Object(f.ni)(A),a=gs(g,r);for(let c=0;c<a.length;++c){const l={};if(await v.onBatchBegin(c,l),f.vi(()=>{var h=a[c][0],d=a[c][1],p=Gi(o,h,d-h),g=(d=(l.batch=c,l.size=d-h,ms(t,p)),e(d));for(let e=0;e<n.length;++e){var A=n[e],v=g[e];l[A]=v,f.Qf(v)}if(c===a.length-1&&m){var b=this.testLoop(s,u,r);for(let e=0;e<n.length;++e){var y=n[e],w=b[e];f.Qf(w),i["val_"+y]=w}}}),await v.onBatchEnd(c,l),_a(l),this.stopTraining_)break}o.dispose()}if(await v.onEpochEnd(o,i),this.stopTraining_)break}return await v.onTrainEnd(),await this.history.syncData(),this.history}async fitDataset(e,t){return async function(e,t,n){var r=null!=n.batchesPerEpoch;if(f.Ji.assert(null!=e.optimizer,()=>"You must compile a model before training/testing. Use LayersModel.compile(modelCompileConfig)."),f.Ji.assert(null!=n,()=>"For fitDataset(), the 2nd argument (config) is required, but it is not provided in this call."),f.Ji.assert(null!=n.epochs&&0<n.epochs&&Number.isInteger(n.epochs),()=>"For fitDataset(), config.epochs is expected to be a positive integer, but got "+n.epochs),f.Ji.assert(!r||0<n.batchesPerEpoch&&Number.isInteger(n.batchesPerEpoch),()=>"For fitDataset(), config.batchesPerEpoch is expected to be a positive integer if specified, but got "+n.batchesPerEpoch),f.Ji.assert(null==n.validationSplit,()=>"`validationSplit` is not supported by `fitDataset()`. Use validationData instead."),e.isTraining)throw new Error("Cannot start training because another fit() call is ongoing.");e.isTraining=!0;try{var i,o=null!=n.validationData;let d,p;o&&(fs(n.validationData)?f.Ji.assert(null==n.validationBatches||0<n.validationBatches&&Number.isInteger(n.validationBatches),()=>"For fitDataset() with dataset-based validation, config.validationBatches is expected not to be provided, or to be a positive integer, but got "+n.validationBatches):(d=(i=function(e){if(3===e.length)throw new ni("Validation with sample weights is not implemented yet.");return{xs:e[0],ys:e[1]}}(n.validationData)).xs,p=i.ys));const m=e.makeTrainFunction(),g=e.getDedupedMetricsNames();let A;A=o?g.slice().concat(g.map(e=>"val_"+e)):g.slice();const{callbackList:v,history:b}=Na(Ma(n.callbacks,n.yieldEvery),null==n.verbose?1:n.verbose,n.epochs,null,null,function(e,t){let n=null;return null!=t.batchesPerEpoch?n=t.batchesPerEpoch:Number.isFinite(e.size)&&(n=e.size),n}(t,n),null,o,A);v.setModel(e),e.history=b,await v.onTrainBegin(),e.stopTraining_=!1;let y=null==n.initialEpoch?0:n.initialEpoch,w=await t.iterator();for(;y<n.epochs;){const i={};await v.onEpochBegin(y);let A=0,b=0;for(r||(w=await t.iterator());!r||A<n.batchesPerEpoch;){var a=await w.next();if(r&&a.done)break;if(null!=a.value){const{xs:t,ys:r}=ls(e,a.value),i={},o=(i.batch=b,i.size=t[0].shape[0],await v.onBatchBegin(b,i),[]);if(null!=n.classWeight){var s=us(n.classWeight,e.outputNames);for(let e=0;e<s.length;++e)o.push(await cs(r[e],null,s[e]))}var u=t.concat(r).concat(o),c=m(u);f.Ve(u);for(let e=0;e<g.length;++e){var l=g[e],h=c[e];i[l]=h,f.Qf(h)}await v.onBatchEnd(b,i),_a(i),b++,A++}if(r?A>=n.batchesPerEpoch:a.done){if(o){let t;t=fs(n.validationData)?ci(await e.evaluateDataset(n.validationData,{batches:n.validationBatches})):ci(e.evaluate(d,p,{batchSize:null==n.validationBatchSize?32:n.validationBatchSize,verbose:0}));for(let n=0;n<e.metricsNames.length;++n)i["val_"+e.metricsNames[n]]=t[n]}break}if(e.stopTraining_)break}if(await v.onEpochEnd(y,i),y++,e.stopTraining_)break}return await v.onTrainEnd(),await e.history.syncData(),e.history}finally{e.isTraining=!1}}(this,e,t)}async trainOnBatch(e,t){var n=await this.standardizeUserData(e,t);const r=n[0];var i=n[1];i=this.makeTrainFunction()(r.concat(i));const o=[];for(const e of i){var a=await e.data();o.push(a[0])}return f.Ve(i),vs(n[0],e),vs(n[1],t),ui(o)}getNamedWeights(e){const t=[];var n=null!=e&&e.trainableOnly,r=n?this.trainableWeights:this.weights,i=this.getWeights(n);for(let e=0;e<r.length;++e)n&&!r[e].trainable||t.push({name:r[e].originalName,tensor:i[e]});return t}set stopTraining(e){this.stopTraining_=e}get stopTraining(){return this.stopTraining_}get optimizer(){return this.optimizer_}set optimizer(e){this.optimizer_!==e&&(this.optimizer_=e,this.isOptimizerOwned=!1)}dispose(){const e=super.dispose();var t;return 0===e.refCountAfterDispose&&null!=this.optimizer&&this.isOptimizerOwned&&(t=f.rg().numTensors,this.optimizer_.dispose(),e.numDisposedVariables+=t-f.rg().numTensors),e}getLossIdentifiers(){let e;if("string"==typeof this.loss)e=li(this.loss);else if(Array.isArray(this.loss)){for(const e of this.loss)if("string"!=typeof e)throw new Error("Serialization of non-string loss is not supported.");e=this.loss.map(e=>li(e))}else{var t=Object.keys(this.loss),n=(e={},this.loss);for(const r of t){if("string"!=typeof n[r])throw new Error("Serialization of non-string loss is not supported.");e[r]=li(n[r])}}return e}getMetricIdentifiers(){if("string"==typeof this.metrics||"function"==typeof this.metrics)return[li(ns(this.metrics))];if(Array.isArray(this.metrics))return this.metrics.map(e=>li(ns(e)));{const e={};for(const t in this.metrics)e[t]=li(ns(this.metrics[t]));return e}}getTrainingConfig(){return{loss:this.getLossIdentifiers(),metrics:this.getMetricIdentifiers(),optimizer_config:{class_name:this.optimizer.getClassName(),config:this.optimizer.getConfig()}}}loadTrainingConfig(e){if(null!=e.weighted_metrics)throw new Error("Loading weight_metrics is not supported yet.");if(null!=e.loss_weights)throw new Error("Loading loss_weights is not supported yet.");if(null!=e.sample_weight_mode)throw new Error("Loading sample_weight_mode is not supported yet.");var t=Fa(as(e.optimizer_config));let n,r;if("string"==typeof e.loss)n=hi(e.loss);else if(Array.isArray(e.loss))n=e.loss.map(e=>hi(e));else if(null!=e.loss){n={};for(const t in e.loss)n[t]=hi(e.loss[t])}if(Array.isArray(e.metrics))r=e.metrics.map(e=>hi(e));else if(null!=e.metrics){r={};for(const t in e.metrics)r[t]=hi(e.metrics[t])}this.compile({loss:n,metrics:r,optimizer:t})}async save(e,t){if("string"==typeof e){var n=f.Lf.getSaveHandlers(e);if(0===n.length)throw new ti(`Cannot find any save handlers for URL '${e}'`);if(1<n.length)throw new ti(`Found more than one (${n.length}) save handlers for URL '${e}'`);e=n[0]}if(null==e.save)throw new ti("LayersModel.save() cannot proceed because the IOHandler provided does not have the `save` attribute defined.");const r=await f.Lf.encodeWeights(this.getNamedWeights(t)),i={modelTopology:this.toJSON(null,!1),format:"layers-model",generatedBy:"TensorFlow.js tfjs-layers v4.1.0",convertedBy:null};return null!=t&&t.includeOptimizer&&null!=this.optimizer&&(i.trainingConfig=this.getTrainingConfig(),({data:n,specs:t}=await f.Lf.encodeWeights(await this.optimizer.getWeights(),"optimizer")),r.specs.push(...t),r.data=f.Lf.concatenateArrayBuffers([r.data,n])),null!=this.userDefinedMetadata&&(rs(this.userDefinedMetadata,this.name,!0),i.userDefinedMetadata=this.userDefinedMetadata),i.weightData=r.data,i.weightSpecs=r.specs,e.save(i)}setUserDefinedMetadata(e){rs(e,this.name),this.userDefinedMetadata=e}getUserDefinedMetadata(){return this.userDefinedMetadata}}Cs.className="Model",f.Dh.registerClass(Cs);class ks extends Cs{}
/**
 * @license
 * Copyright 2018 Google LLC
 *
 * Use of this source code is governed by an MIT-style
 * license that can be found in the LICENSE file or at
 * https://opensource.org/licenses/MIT.
 * =============================================================================
 */async function Es(e,t){let n=(e="modelTopology"in e?e:{modelTopology:e}).modelTopology;const r=Fa(as(n=null!=n.model_config?n.model_config:n),t);if(null!=e.weightsManifest){var i=await f.Lf.loadWeights(e.weightsManifest,e.pathPrefix,r.weights.map(e=>e.originalName));const t={};for(const e of r.weights)t[e.originalName]=i[e.originalName];r.loadWeights(t),Object(f.Ve)(i)}return r}async function Ss(e,t){if(null==t&&(t={}),"string"==typeof e){const n=f.Lf.getLoadHandlers(e,t);if(0===n.length)n.push(f.Lf.browserHTTPRequest(e,t));else if(1<n.length)throw new ti(`Found more than one (${n.length}) load handlers for URL '${e}'`);e=n[0]}return async function(e,t,n){if(null==n&&(n={}),null==e.load)throw new ti("Cannot proceed with model loading because the IOHandler provided does not have the `load` method implemented.");let r=(e=await e.load()).modelTopology;null!=r.model_config&&(r=r.model_config);const i=null==n.strict||n.strict,o=null!=e.weightData&&null!=e.weightSpecs&&i,a=Fa(as(r),void 0,o),s=e.trainingConfig;if(null!=s&&a.loadTrainingConfig(s),null!=e.userDefinedMetadata&&a.setUserDefinedMetadata(e.userDefinedMetadata),null!=e.weightData){if(null==e.weightSpecs)throw new ti("LayersModel artifacts contains weight data, but not weight specs. Therefore loading of weights cannot proceed.");const{modelWeights:t,optimizerWeights:n}=function(e,t){const n=f.Lf.decodeWeights(e,t),r={},i=[];return t.forEach(e=>{"optimizer"===e.group?i.push({name:e.name,tensor:n[e.name]}):r[e.name]=n[e.name]}),{modelWeights:r,optimizerWeights:i}}(e.weightData,e.weightSpecs);a.loadWeights(t,i),null!=a.optimizer&&0<n.length&&await a.optimizer.setWeights(n),Object(f.Ve)(t),Object(f.Ve)(n.map(e=>e.tensor))}return a}(e,0,t)}ks.className="Functional",f.Dh.registerClass(ks);class _s extends Cs{constructor(e){if(super({inputs:[],outputs:[]}),e=e||{},this.trainable=!0,this.built=!1,this.name=null!=e.name?e.name:Ci("sequential_"),null!=e.layers)for(const t of e.layers)this.add(t)}checkShape(e){if(e.inboundNodes[0].outputTensors[0].shape.some(e=>e<0))throw new ti("Negative dimension size caused by adding layer "+e.name+" with input shape ["+e.inboundNodes[0].inputTensors[0].shape+"]")}add(e){var t=e instanceof _s||e instanceof Cs;let n;if(t){if(1!==(n=e).outputs.length)throw new ti("All layers in a Sequential model should have a single output tensor. For multi-output layers, use the functional API.");if(1!==n.inputs.length)throw new ti("All layers in a Sequential model should have a single input tensor. For multi-input layers, use the functional API.")}if(0===this.outputs.length){if(0===e.inboundNodes.length){if(null==e.batchInputShape)throw new ti("The first layer in a Sequential model must get an `inputShape` or `batchInputShape` argument.");var r=Vo({batchShape:e.batchInputShape,dtype:e.dtype,name:e.name+"_input"});e.apply(r)}if(t)this.outputs=n.outputs,this.inputs=n.inputs;else{if(1!==e.inboundNodes.length)throw new ti(`A layer added to a Sequential model must not already be connected somewhere else. LayersModel received layer ${e.name} which has ${e.inboundNodes.length} pre-existing inbound connections.`);if(1!==e.inboundNodes[0].outputTensors.length)throw new ti("All layers in a Sequential model should have a single output tensor. For multi-output layers, use the functional API.");this.checkShape(e),this.outputs=[e.inboundNodes[0].outputTensors[0]],this.inputs=function e(t,n,r){if((null==n||null!=r&&0<r)&&(n=t.sourceLayer,r=t.nodeIndex),0===n.inboundNodes.length)return[t];var i=n.inboundNodes[r];if(0===i.inboundLayers.length)return i.inputTensors;{const t=[];for(let n=0;n<i.inboundLayers.length;n++){var o=i.inputTensors[n];const r=i.inboundLayers[n],a=i.nodeIndices[n];for(const n of e(o,r,a))-1===t.indexOf(n)&&t.push(n)}return t}}(this.outputs[0])}this.inboundNodes=[],new zo({outboundLayer:this,inboundLayers:[],nodeIndices:[],tensorIndices:[],inputTensors:this.inputs,outputTensors:this.outputs,inputMasks:oi(null,this.inputs.length),outputMasks:[null],inputShapes:this.inputs.map(e=>e.shape),outputShapes:this.outputs[0].shape})}else{if(r=e.apply(this.outputs[0]),Array.isArray(r))throw new TypeError("All layers in a Sequential model should have a single output tensor. For multi-output layers, use the functional API.");this.checkShape(e),this.outputs=[r],this.inboundNodes[0].outputTensors=this.outputs,this.inboundNodes[0].outputShapes=[this.outputs[0].shape]}this.layers.push(e),this.built=!1}pop(){if(0===this.layers.length)throw new TypeError("There are no layers in the model.");var e;this.layers.pop(),0===this.layers.length?(this.outputs=[],this.inboundNodes=[],this.outboundNodes=[]):(e=this.layers.length-1,this.layers[e].outboundNodes=[],this.outputs=[this.layers[e].output],this.inboundNodes[0].outputTensors=this.outputs,this.inboundNodes[0].outputShapes=[this.outputs[0].shape])}call(e,t){return null==this.model&&this.build(),this.model.call(e,t)}build(e){if(Mo(e),0===this.inputs.length||0===this.outputs.length)throw new TypeError("Sequential model cannot be built: model is empty. Add some layers first.");this.model=new Cs({inputs:this.inputs,outputs:this.outputs[0],name:this.name+"_model"}),this.model.trainable=this.trainable,this.supportsMasking=this.model.supportsMasking,this.inputLayers=this.model.inputLayers,this.inputLayersNodeIndices=this.model.inputLayersNodeIndices,this.inputLayersTensorIndices=this.model.inputLayersTensorIndices,this.outputLayers=this.model.outputLayers,this.outputLayersNodeIndices=this.model.outputLayersNodeIndices,this.outputLayersTensorIndices=this.model.outputLayersTensorIndices,this.nodesByDepth=this.model.nodesByDepth,this.containerNodes=this.model.containerNodes,this.outputNames=this.model.outputNames,this.inputNames=this.model.inputNames,this.built=!0}countParams(){return this.built||this.build(),super.countParams()}summary(e,t,n=console.log){this.built||this.build(),super.summary(e,t,n)}setWeights(e){null==this.model&&this.build(),this.model.setWeights(e)}evaluate(e,t,n={}){if(this.built)return this.model.evaluate(e,t,n);throw new ei("The model needs to be compiled before being used.")}async evaluateDataset(e,t){if(this.built)return this.model.evaluateDataset(e,t);throw new ei("The model needs to be compiled before being used.")}predict(e,t={}){return null==this.model&&this.build(),this.model.predict(e,t)}predictOnBatch(e){return null==this.model&&this.build(),this.model.predictOnBatch(e)}compile(e){this.build(),this.model.compile(e),this.optimizer_=this.model.optimizer,this.isOptimizerOwned=this.model.isOptimizerOwned,this.loss=this.model.loss,this.metrics=this.model.metrics,this.metricsTensors=this.model.metricsTensors,this.metricsNames=this.model.metricsNames}get optimizer(){return null==this.model?void 0:this.model.optimizer}set optimizer(e){this.model.optimizer=e}async fit(e,t,n={}){if(this.built)return this.model.fit(e,t,n);throw new ei("The model needs to be compiled before being used.")}async fitDataset(e,t){if(this.built)return this.model.fitDataset(e,t);throw new ei("The model needs to be compiled before being used.")}async trainOnBatch(e,t){return this.model.trainOnBatch(e,t)}static fromConfig(e,t,n=0,r=!1){let i,o={};if(t instanceof Array){if(null==t[0].className||"Merge"===t[0].className)throw new ti("Legacy serialization format not supported yet.");i=t}else f.Ji.assert(null!=t.layers,()=>"When the config data for a Sequential model is not an Array, it must be an Object that contains the 'layers' field."),i=t.layers,delete t.layers,o=t;const a=new e(o);if(!(a instanceof _s))throw new ni("Sequential.fromConfig called on non-Sequential input: "+a);for(const e of i){const t=Fa(e,void 0,r);r&&t.setFastWeightInitDuringBuild(!0),a.add(t)}return a}set stopTraining(e){if(null==this.model)throw new ti("Cannot set the stopTraining property of a sequential model before it is compiled.");this.model.stopTraining=e}get stopTraining(){if(null==this.model)throw new ti("Cannot get the stopTraining property of a sequential model before it is compiled.");return this.model.stopTraining}getConfig(){const e=[];for(const t of this.layers){const n={};n.className=t.getClassName(),n.config=t.getConfig(),e.push(n)}return{name:this.name,layers:e}}}
/**
 * @license
 * Copyright 2018 Google LLC
 *
 * Use of this source code is governed by an MIT-style
 * license that can be found in the LICENSE file or at
 * https://opensource.org/licenses/MIT.
 * =============================================================================
 */function Os(e){return new Cs(e)}function Ts(e){return new _s(e)}function Ds(e){return Vo(e)}function Bs(e,t){ja.registerCallbackConstructor(e,t)}
/**
 * @license
 * Copyright 2018 Google LLC
 *
 * Use of this source code is governed by an MIT-style
 * license that can be found in the LICENSE file or at
 * https://opensource.org/licenses/MIT.
 * =============================================================================
 */_s.className="Sequential",f.Dh.registerClass(_s);class Is extends f.Dh.Serializable{getConfig(){return{}}}class Ms extends Is{apply(e,t=1){var[e,t=1]=[e,t];if(1!==t)throw new ni(`Support for alpha values other than 1 (${t}) is not implemented yet.`);return f.cf(e)}}Ms.className="elu",f.Dh.registerClass(Ms);class js extends Is{apply(e){return f.Bh(e)}}js.className="selu",f.Dh.registerClass(js);class Ns extends Is{apply(e){return f.lh(e)}}Ns.className="relu",f.Dh.registerClass(Ns);class Fs extends Is{apply(e){return Object(f.vi)(()=>f.ug(6,f.lh(e)))}}Fs.className="relu6",f.Dh.registerClass(Fs);class Rs extends Is{apply(e){return e}}Rs.className="linear",f.Dh.registerClass(Rs);class Ps extends Is{apply(e){return f.Hh(e)}}Ps.className="sigmoid",f.Dh.registerClass(Ps);class Ls extends Is{apply(e){return t=e,Object(f.vi)(()=>{var e=f.Pd(.5,f.zg(.2,t));return f.te(e,0,1)});var t}}Ls.className="hardSigmoid",f.Dh.registerClass(Ls);class Us extends Is{apply(e){return f.Th(e)}}Us.className="softplus",f.Dh.registerClass(Us);class zs extends Is{apply(e){return t=e,Object(f.vi)(()=>f.Xe(t,f.Pd(f.Md(t),1)));var t}}zs.className="softsign",f.Dh.registerClass(zs);class Hs extends Is{apply(e){return f.li(e)}}Hs.className="tanh",f.Dh.registerClass(Hs);class $s extends Is{apply(e,t=-1){return f.Sh(e,t)}}$s.className="softmax",f.Dh.registerClass($s);class Qs extends Is{apply(e,t=-1){return f.bg(e,t)}}Qs.className="logSoftmax",f.Dh.registerClass(Qs);class Vs extends Is{apply(e,t=1){return Object(f.vi)(()=>f.zg(f.Hh(f.zg(e,t)),e))}}Vs.className="swish",f.Dh.registerClass(Vs);class qs extends Is{apply(e){return Object(f.vi)(()=>f.zg(e,f.li(f.Th(e))))}}function Gs(e){return e.getClassName()}function Ws(e,t={}){return pi(e,f.Dh.SerializationMap.getMap().classNameMap,t,"activation")}function Ks(e){if(null==e){return Ws({className:"linear",config:{}})}if("string"!=typeof e)return e instanceof Is?e:Ws(e);{const t={};return t.className=e,t.config={},Ws(t)
/**
 * @license
 * Copyright 2018 Google LLC
 *
 * Use of this source code is governed by an MIT-style
 * license that can be found in the LICENSE file or at
 * https://opensource.org/licenses/MIT.
 * =============================================================================
 */}}function Ys(e){if(null!=e&&"object"!=typeof e)throw new Error("Argument to L1L2 regularizer's constructor is expected to be an object, but received: "+e)}qs.className="mish",f.Dh.registerClass(qs);class Xs extends f.Dh.Serializable{}class Js extends Xs{constructor(e){super(),Ys(e),this.l1=null==e||null==e.l1?.01:e.l1,this.l2=null==e||null==e.l2?.01:e.l2,this.hasL1=0!==this.l1,this.hasL2=0!==this.l2}apply(e){return Object(f.vi)(()=>{let t=Object(f.Ri)([1]);return this.hasL1&&(t=Object(f.Pd)(t,Object(f.ii)(f.zg(this.l1,Object(f.Md)(e))))),this.hasL2&&(t=Object(f.Pd)(t,Object(f.ii)(f.zg(this.l2,no(e))))),f.oh(t,[])})}getConfig(){return{l1:this.l1,l2:this.l2}}static fromConfig(e,t){return new e({l1:t.l1,l2:t.l2})}}Js.className="L1L2",f.Dh.registerClass(Js);const Zs={l1l2:"L1L2"};function eu(e){return di(e)}function tu(e,t={}){return pi(e,f.Dh.SerializationMap.getMap().classNameMap,t,"regularizer")}function nu(e){return null==e?null:"string"==typeof e?tu({className:e in Zs?Zs[e]:e,config:{}}):e instanceof Xs?e:tu(e)}
/**
 * @license
 * Copyright 2018 Google LLC
 *
 * Use of this source code is governed by an MIT-style
 * license that can be found in the LICENSE file or at
 * https://opensource.org/licenses/MIT.
 * =============================================================================
 */class ru extends $o{constructor(e){super(null==e?{}:e),this.supportsMasking=!0,null!=e&&(this.maxValue=e.maxValue)}call(e,t){e=Io(e);let n=Object(f.lh)(e);return null!=this.maxValue?Object(f.te)(n,0,this.maxValue):n}computeOutputShape(e){return e}getConfig(){var e={maxValue:this.maxValue},t=super.getConfig();return Object.assign(e,t),e}}ru.className="ReLU",f.Dh.registerClass(ru);class iu extends $o{constructor(e){super(null==e?{}:e),this.DEFAULT_ALPHA=.3,this.alpha=null==(e=null==e?{}:e).alpha?this.DEFAULT_ALPHA:e.alpha}call(e,t){return e=Io(e),Object(f.Sf)(e,this.alpha)}computeOutputShape(e){return e}getConfig(){var e={alpha:this.alpha},t=super.getConfig();return Object.assign(e,t),e}}iu.className="LeakyReLU",f.Dh.registerClass(iu);class ou extends $o{constructor(e){if(super(null==e?{}:e),this.DEFAULT_ALPHA_INITIALIZER="zeros",null==e&&(e={}),this.supportsMasking=!0,this.alphaInitializer=To(e.alphaInitializer||this.DEFAULT_ALPHA_INITIALIZER),this.alphaRegularizer=nu(e.alphaRegularizer),this.alphaConstraint=aa(e.alphaConstraint),null==e.sharedAxes)this.sharedAxes=null;else if(Array.isArray(e.sharedAxes))this.sharedAxes=e.sharedAxes;else{if("number"!=typeof e.sharedAxes)throw new ti("Expected sharedAxes to be a number or an array of numbers, but got "+e.sharedAxes);this.sharedAxes=[e.sharedAxes]}}build(e){const t=(e=Mo(e)).slice(1);if(null!=this.sharedAxes)for(const e of this.sharedAxes)t[e-1]=1;this.alpha=this.addWeight("alpha",t,"float32",this.alphaInitializer,this.alphaRegularizer,!0,this.alphaConstraint);const n={};if(null!=this.sharedAxes)for(let t=1;t<e.length;++t)n[t]=e[t];this.inputSpec=[new Po({ndim:e.length,axes:n})],this.built=!0}call(e,t){return e=Io(e),Object(f.Sg)(e,this.alpha.read())}getConfig(){var e={alphaInitializer:Oo(this.alphaInitializer),alphaRegularizer:eu(this.alphaRegularizer),alphaConstraint:ia(this.alphaConstraint),sharedAxes:this.sharedAxes},t=super.getConfig();return Object.assign(e,t),e}}ou.className="PReLU",f.Dh.registerClass(ou);class au extends $o{constructor(e){if(super(null==e?{}:e),this.DEFAULT_ALPHA=1,null!=(e=null==e?{}:e).alpha&&e.alpha!==this.DEFAULT_ALPHA)throw new ni(`Non-default alpha value (${e.alpha}) is not supported by the ELU layer yet.`);this.alpha=null==e.alpha?this.DEFAULT_ALPHA:e.alpha}call(e,t){return e=Io(e),Object(f.cf)(e)}computeOutputShape(e){return e}getConfig(){var e={alpha:this.alpha},t=super.getConfig();return Object.assign(e,t),e}}au.className="ELU",f.Dh.registerClass(au);class su extends $o{constructor(e){super(null==e?{}:e),this.DEFAULT_THETA=1,this.theta=null==(e=null==e?{}:e).theta?this.DEFAULT_THETA:e.theta}call(e,t){return e=Io(e),Object(f.zg)(e,Object(f.re)(Object(f.Ff)(e,this.theta),"float32"))}computeOutputShape(e){return e}getConfig(){var e={theta:this.theta},t=super.getConfig();return Object.assign(e,t),e}}su.className="ThresholdedReLU",f.Dh.registerClass(su);class uu extends $o{constructor(e){super(null==e?{}:e),this.DEFAULT_AXIS=1,null==e&&(e={}),this.softmax=(new $s).apply,this.axis=null==e.axis?this.DEFAULT_AXIS:e.axis}call(e,t){return e=Io(e),this.softmax(e,this.axis)}computeOutputShape(e){return e}getConfig(){var e={axis:this.axis},t=super.getConfig();return Object.assign(e,t),e
/**
 * @license
 * Copyright 2018 Google LLC
 *
 * Use of this source code is governed by an MIT-style
 * license that can be found in the LICENSE file or at
 * https://opensource.org/licenses/MIT.
 * =============================================================================
 */}}function cu(e,t,n){if("number"==typeof e)return oi(e,t);if(e.length!==t)throw new ti(`The ${n} argument must be an integer or tuple of ${t} integers. Received: ${e.length} elements.`);for(let i=0;i<t;++i){var r=e[i];if(r!==parseInt(r.toString(),10))throw new ti(`The ${n} argument must be an integer or tuple of `+t+` integers. Received: ${JSON.stringify(e)} including a non-integer number `+r)}return e}function lu(e,t,n,r,i=1){if(null==e)return e;let o;return o="same"===n?e:e-(t+(t-1)*(i-1))+1,Math.floor((o+r-1)/r)}function hu(e,t,n,r){if(null==e)return null;if("valid"===r)e=e*t+zi([n-t,0]);else{if("same"!==r)throw new ti(`Unsupport padding mode: ${r}.`);e*=t}return e}
/**
 * @license
 * Copyright 2018 Google LLC
 *
 * Use of this source code is governed by an MIT-style
 * license that can be found in the LICENSE file or at
 * https://opensource.org/licenses/MIT.
 * =============================================================================
 */function fu(e,t){return Object(f.vi)(()=>(Di(t),"channelsFirst"===t?f.Ai(e,[0,2,3,1]):e))}function du(e,t){return Object(f.vi)(()=>(Di(t),"channelsFirst"===t?f.Ai(e,[0,2,3,4,1]):e))}function pu(e,t,n,r=[1,1],i="valid",o,a,s=null){return Object(f.vi)(()=>{if(Di(o=null==o?"channelsLast":o),3!==e.rank&&4!==e.rank)throw new ti(`conv2dWithBiasActivation expects input to be of rank 3 or 4, but received ${e.rank}.`);if(3!==t.rank&&4!==t.rank)throw new ti(`conv2dWithBiasActivation expects kernel to be of rank 3 or 4, but received ${e.rank}.`);let u=fu(e,o);if("causal"===i)throw new ni("The support for CAUSAL padding mode in conv1dWithBias is not implemented yet.");return u=f.vf.conv2d({x:u,filter:t,strides:r,pad:"same"===i?"same":"valid",dilations:a,dataFormat:"NHWC",bias:n,activation:s}),"channelsFirst"===o?f.Ai(u,[0,3,1,2]):u})}uu.className="Softmax",f.Dh.registerClass(uu);class mu extends $o{constructor(e,t){if(super(t),this.bias=null,this.DEFAULT_KERNEL_INITIALIZER="glorotNormal",this.DEFAULT_BIAS_INITIALIZER="zeros",mu.verifyArgs(t),this.rank=e,bi(this.rank,"rank"),1!==this.rank&&2!==this.rank&&3!==this.rank)throw new ni(`Convolution layer for rank other than 1, 2, or 3 (${this.rank}) is not implemented yet.`);if(this.kernelSize=cu(t.kernelSize,e,"kernelSize"),this.strides=cu(null==t.strides?1:t.strides,e,"strides"),this.padding=null==t.padding?"valid":t.padding,Bi(this.padding),this.dataFormat=null==t.dataFormat?"channelsLast":t.dataFormat,Di(this.dataFormat),this.activation=Ks(t.activation),this.useBias=null==t.useBias||t.useBias,this.biasInitializer=To(t.biasInitializer||this.DEFAULT_BIAS_INITIALIZER),this.biasConstraint=aa(t.biasConstraint),this.biasRegularizer=nu(t.biasRegularizer),this.activityRegularizer=nu(t.activityRegularizer),this.dilationRate=cu(null==t.dilationRate?1:t.dilationRate,e,"dilationRate"),1===this.rank&&Array.isArray(this.dilationRate)&&1!==this.dilationRate.length)throw new ti("dilationRate must be a number or an array of a single number for 1D convolution, but received "+JSON.stringify(this.dilationRate));if(2===this.rank){if("number"==typeof this.dilationRate)this.dilationRate=[this.dilationRate,this.dilationRate];else if(2!==this.dilationRate.length)throw new ti("dilationRate must be a number or array of two numbers for 2D convolution, but received "+JSON.stringify(this.dilationRate))}else if(3===this.rank)if("number"==typeof this.dilationRate)this.dilationRate=[this.dilationRate,this.dilationRate,this.dilationRate];else if(3!==this.dilationRate.length)throw new ti("dilationRate must be a number or array of three numbers for 3D convolution, but received "+JSON.stringify(this.dilationRate))}static verifyArgs(e){if(ai("kernelSize"in e,"required key 'kernelSize' not in config"),"number"!=typeof e.kernelSize&&!vi(e.kernelSize,"number",1,3))throw new ti(`BaseConv expects config.kernelSize to be number or number[] with length 1, 2, or 3, but received ${JSON.stringify(e.kernelSize)}.`)}getConfig(){var e={kernelSize:this.kernelSize,strides:this.strides,padding:this.padding,dataFormat:this.dataFormat,dilationRate:this.dilationRate,activation:Gs(this.activation),useBias:this.useBias,biasInitializer:Oo(this.biasInitializer),biasRegularizer:eu(this.biasRegularizer),activityRegularizer:eu(this.activityRegularizer),biasConstraint:ia(this.biasConstraint)},t=super.getConfig();return Object.assign(e,t),e}}class gu extends mu{constructor(e,t){super(e,t),this.kernel=null,gu.verifyArgs(t),this.filters=t.filters,bi(this.filters,"filters"),this.kernelInitializer=To(t.kernelInitializer||this.DEFAULT_KERNEL_INITIALIZER),this.kernelConstraint=aa(t.kernelConstraint),this.kernelRegularizer=nu(t.kernelRegularizer)}build(e){e=Mo(e);var t="channelsFirst"===this.dataFormat?1:e.length-1;if(null==e[t])throw new ti("The channel dimension of the input should be defined. Found "+e[t]);e=e[t];var n=this.kernelSize.concat([e,this.filters]);this.kernel=this.addWeight("kernel",n,null,this.kernelInitializer,this.kernelRegularizer,!0,this.kernelConstraint),this.useBias&&(this.bias=this.addWeight("bias",[this.filters],null,this.biasInitializer,this.biasRegularizer,!0,this.biasConstraint)),this.inputSpec=[{ndim:this.rank+2,axes:{[t]:e}}],this.built=!0}call(e,t){return Object(f.vi)(()=>{let t;e=Io(e);var n=null==this.bias?null:this.bias.read(),r=yi(this.activation.getClassName());if(null!=r&&2===this.rank)t=pu(e,this.kernel.read(),n,this.strides,this.padding,this.dataFormat,this.dilationRate,r);else{if(1===this.rank)t=function(e,t,n,r=1,i="valid",o,a=1){return Object(f.vi)(()=>{if(Di(o=null==o?"channelsLast":o),3!==e.shape.length)throw new ti("The input of a conv1dWithBias operation should be 3, but is "+e.shape.length+" instead.");if(3!==t.shape.length)throw new ti("The kernel for a conv1dWithBias operation should be 3, but is "+t.shape.length+" instead");if(null!=n&&1!==n.shape.length)throw new ti("The bias for a conv1dWithBias operation should be 1, but is "+t.shape.length+" instead");if("channelsFirst"===o&&(e=f.Ai(e,[0,2,1])),"causal"===i)throw new ni("The support for CAUSAL padding mode in conv1dWithBias is not implemented yet.");let s=f.Be(e,t,r,"same"===i?"same":"valid","NWC",a);return null!=n?io(s,n):s})}(e,this.kernel.read(),n,this.strides[0],this.padding,this.dataFormat,this.dilationRate[0]);else if(2===this.rank)t=pu(e,this.kernel.read(),n,this.strides,this.padding,this.dataFormat,this.dilationRate);else{if(3!==this.rank)throw new ni("convolutions greater than 3D are not implemented yet.");t=function(e,t,n,r=[1,1,1],i="valid",o,a){return Object(f.vi)(()=>{if(Di(o=null==o?"channelsLast":o),4!==e.rank&&5!==e.rank)throw new ti("conv3dWithBias expects input to be of rank 4 or 5, but received "+e.rank+".");if(4!==t.rank&&5!==t.rank)throw new ti("conv3dWithBias expects kernel to be of rank 4 or 5, but received "+e.rank+".");let s=du(e,o);if("causal"===i)throw new ni("The support for CAUSAL padding mode in conv3dWithBias is not implemented yet.");return s=f.Ee(s,t,r,"same"===i?"same":"valid","NDHWC",a),null!=n&&(s=io(s,n)),"channelsFirst"===o?f.Ai(s,[0,4,1,2,3]):s})}(e,this.kernel.read(),n,this.strides,this.padding,this.dataFormat,this.dilationRate)}null!=this.activation&&(t=this.activation.apply(t))}return t})}computeOutputShape(e){e=Mo(e);const t=[];var n="channelsLast"===this.dataFormat?e.slice(1,e.length-1):e.slice(2);for(let e=0;e<n.length;++e){var r=lu(n[e],this.kernelSize[e],this.padding,this.strides[e],"number"==typeof this.dilationRate?this.dilationRate:this.dilationRate[e]);t.push(r)}let i=[e[0]];return"channelsLast"===this.dataFormat?(i=i.concat(t)).push(this.filters):(i.push(this.filters),i=i.concat(t)),i}getConfig(){var e={filters:this.filters,kernelInitializer:Oo(this.kernelInitializer),kernelRegularizer:eu(this.kernelRegularizer),kernelConstraint:ia(this.kernelConstraint)},t=super.getConfig();return Object.assign(e,t),e}static verifyArgs(e){if(!("filters"in e)||"number"!=typeof e.filters||e.filters<1)throw new ti("Convolution layer expected config.filters to be a 'number' > 0 but got "+JSON.stringify(e.filters))}}class Au extends gu{constructor(e){super(2,e),Au.verifyArgs(e)}getConfig(){const e=super.getConfig();return delete e.rank,e}static verifyArgs(e){if("number"!=typeof e.kernelSize&&!vi(e.kernelSize,"number",1,2))throw new ti(`Conv2D expects config.kernelSize to be number or number[] with length 1 or 2, but received ${JSON.stringify(e.kernelSize)}.`)}}Au.className="Conv2D",f.Dh.registerClass(Au);class vu extends gu{constructor(e){super(3,e),vu.verifyArgs(e)}getConfig(){const e=super.getConfig();return delete e.rank,e}static verifyArgs(e){if("number"!=typeof e.kernelSize&&(!Array.isArray(e.kernelSize)||1!==e.kernelSize.length&&3!==e.kernelSize.length))throw new ti(`Conv3D expects config.kernelSize to be number or [number, number, number], but received ${JSON.stringify(e.kernelSize)}.`)}}vu.className="Conv3D",f.Dh.registerClass(vu);class bu extends Au{constructor(e){if(super(e),this.inputSpec=[new Po({ndim:4})],"same"!==this.padding&&"valid"!==this.padding)throw new ti("Conv2DTranspose currently supports only padding modes 'same' and 'valid', but received padding mode "+this.padding)}build(e){if(4!==(e=Mo(e)).length)throw new ti("Input should have rank 4; Received input shape: "+JSON.stringify(e));var t="channelsFirst"===this.dataFormat?1:e.length-1;if(null==e[t])throw new ti("The channel dimension of the inputs should be defined. Found `None`.");e=e[t];var n=this.kernelSize.concat([this.filters,e]);this.kernel=this.addWeight("kernel",n,"float32",this.kernelInitializer,this.kernelRegularizer,!0,this.kernelConstraint),this.useBias&&(this.bias=this.addWeight("bias",[this.filters],"float32",this.biasInitializer,this.biasRegularizer,!0,this.biasConstraint)),this.inputSpec=[new Po({ndim:4,axes:{[t]:e}})],this.built=!0}call(e,t){return f.vi(()=>{let t=Io(e);if(4!==t.shape.length)throw new ti("Conv2DTranspose.call() expects input tensor to be rank-4, but received a tensor of rank-"+t.shape.length);var n=(a=t.shape)[0];let r,i;i="channelsFirst"===this.dataFormat?(r=2,3):(r=1,2);var o=a[r],a=a[i],s=this.kernelSize[0],u=this.kernelSize[1],c=this.strides[0],l=this.strides[1];n=[n,hu(o,c,s,this.padding),hu(a,l,u,this.padding),this.filters];"channelsLast"!==this.dataFormat&&(t=f.Ai(t,[0,2,3,1]));let h=f.De(t,this.kernel.read(),n,this.strides,this.padding);return"channelsLast"!==this.dataFormat&&(h=f.Ai(h,[0,3,1,2])),null!=this.bias&&(h=io(h,this.bias.read(),this.dataFormat)),null!=this.activation?this.activation.apply(h):h})}computeOutputShape(e){const t=(e=Mo(e)).slice();let n,r,i;i="channelsFirst"===this.dataFormat?(n=1,r=2,3):(n=3,r=1,2);e=this.kernelSize[0];var o=this.kernelSize[1],a=this.strides[0],s=this.strides[1];return t[n]=this.filters,t[r]=hu(t[r],a,e,this.padding),t[i]=hu(t[i],s,o,this.padding),t}getConfig(){const e=super.getConfig();return delete e.dilationRate,e}}bu.className="Conv2DTranspose",f.Dh.registerClass(bu);class yu extends vu{constructor(e){if(super(e),this.inputSpec=[new Po({ndim:5})],"same"!==this.padding&&"valid"!==this.padding)throw new ti("Conv3DTranspose currently supports only padding modes 'same' and 'valid', but received padding mode "+this.padding)}build(e){if(5!==(e=Mo(e)).length)throw new ti("Input should have rank 5; Received input shape: "+JSON.stringify(e));var t="channelsFirst"===this.dataFormat?1:e.length-1;if(null==e[t])throw new ti("The channel dimension of the inputs should be defined. Found `None`.");e=e[t];var n=this.kernelSize.concat([this.filters,e]);this.kernel=this.addWeight("kernel",n,"float32",this.kernelInitializer,this.kernelRegularizer,!0,this.kernelConstraint),this.useBias&&(this.bias=this.addWeight("bias",[this.filters],"float32",this.biasInitializer,this.biasRegularizer,!0,this.biasConstraint)),this.inputSpec=[new Po({ndim:5,axes:{[t]:e}})],this.built=!0}call(e,t){return f.vi(()=>{let t=Io(e);if(5!==t.shape.length)throw new ti("Conv3DTranspose.call() expects input tensor to be rank-4, but received a tensor of rank-"+t.shape.length);var n=(u=t.shape)[0];let r,i,o;i="channelsFirst"===this.dataFormat?(o=2,r=3,4):(o=1,r=2,3);var a=u[o],s=u[r],u=u[i],c=this.kernelSize[0],l=this.kernelSize[1],h=this.kernelSize[2],d=this.strides[0],p=this.strides[1],m=this.strides[2];n=[n,hu(a,d,c,this.padding),hu(s,p,l,this.padding),hu(u,m,h,this.padding),this.filters];"channelsLast"!==this.dataFormat&&(t=f.Ai(t,[0,2,3,4,1]));let g=f.Fe(t,this.kernel.read(),n,this.strides,this.padding);return"channelsLast"!==this.dataFormat&&(g=f.Ai(g,[0,4,1,2,3])),null!==this.bias&&(g=io(g,this.bias.read(),this.dataFormat)),null!==this.activation?this.activation.apply(g):g})}computeOutputShape(e){const t=(e=Mo(e)).slice();let n,r,i,o;o="channelsFirst"===this.dataFormat?(n=1,r=2,i=3,4):(n=4,r=1,i=2,3);e=this.kernelSize[0];var a=this.kernelSize[1],s=this.kernelSize[2],u=this.strides[0],c=this.strides[1],l=this.strides[2];return t[n]=this.filters,t[r]=hu(t[r],u,e,this.padding),t[i]=hu(t[i],c,a,this.padding),t[o]=hu(t[o],l,s,this.padding),t}getConfig(){const e=super.getConfig();return delete e.dilationRate,e}}yu.className="Conv3DTranspose",f.Dh.registerClass(yu);class wu extends gu{constructor(e,t){if(super(e,t),this.DEFAULT_DEPTHWISE_INITIALIZER="glorotUniform",this.DEFAULT_POINTWISE_INITIALIZER="glorotUniform",this.depthwiseKernel=null,(this.pointwiseKernel=null)==t.filters)throw new ti("The `filters` configuration field is required by SeparableConv, but is unspecified.");if(null!=t.kernelInitializer||null!=t.kernelRegularizer||null!=t.kernelConstraint)throw new ti("Fields kernelInitializer, kernelRegularizer and kernelConstraint are invalid for SeparableConv2D. Use depthwiseInitializer, depthwiseRegularizer, depthwiseConstraint, pointwiseInitializer, pointwiseRegularizer and pointwiseConstraint instead.");if(null!=t.padding&&"same"!==t.padding&&"valid"!==t.padding)throw new ti(`SeparableConv${this.rank}D supports only padding modes: 'same' and 'valid', but received `+JSON.stringify(t.padding));this.depthMultiplier=null==t.depthMultiplier?1:t.depthMultiplier,this.depthwiseInitializer=To(t.depthwiseInitializer||this.DEFAULT_DEPTHWISE_INITIALIZER),this.depthwiseRegularizer=nu(t.depthwiseRegularizer),this.depthwiseConstraint=aa(t.depthwiseConstraint),this.pointwiseInitializer=To(t.depthwiseInitializer||this.DEFAULT_POINTWISE_INITIALIZER),this.pointwiseRegularizer=nu(t.pointwiseRegularizer),this.pointwiseConstraint=aa(t.pointwiseConstraint)}build(e){if((e=Mo(e)).length<this.rank+2)throw new ti(`Inputs to SeparableConv${this.rank}D should have rank `+(this.rank+2)+", but received input shape: "+JSON.stringify(e));var t="channelsFirst"===this.dataFormat?1:e.length-1;if(null==e[t]||e[t]<0)throw new ti("The channel dimension of the inputs should be defined, but found "+JSON.stringify(e[t]));e=e[t];var n=this.kernelSize.concat([e,this.depthMultiplier]);const r=[];for(let e=0;e<this.rank;++e)r.push(1);r.push(e*this.depthMultiplier,this.filters),this.depthwiseKernel=this.addWeight("depthwise_kernel",n,"float32",this.depthwiseInitializer,this.depthwiseRegularizer,!0,this.depthwiseConstraint),this.pointwiseKernel=this.addWeight("pointwise_kernel",r,"float32",this.pointwiseInitializer,this.pointwiseRegularizer,!0,this.pointwiseConstraint),this.useBias?this.bias=this.addWeight("bias",[this.filters],"float32",this.biasInitializer,this.biasRegularizer,!0,this.biasConstraint):this.bias=null,this.inputSpec=[new Po({ndim:this.rank+2,axes:{[t]:e}})],this.built=!0}call(e,t){return Object(f.vi)(()=>{let t;if(e=Io(e),1===this.rank)throw new ni("1D separable convolution is not implemented yet.");return 2===this.rank&&("channelsFirst"===this.dataFormat&&(e=f.Ai(e,[0,2,3,1])),t=f.Ch(e,this.depthwiseKernel.read(),this.pointwiseKernel.read(),this.strides,this.padding,this.dilationRate,"NHWC")),this.useBias&&(t=io(t,this.bias.read(),this.dataFormat)),null!=this.activation&&(t=this.activation.apply(t)),"channelsFirst"===this.dataFormat?f.Ai(t,[0,3,1,2]):t})}getConfig(){const e=super.getConfig();return delete e.rank,delete e.kernelInitializer,delete e.kernelRegularizer,delete e.kernelConstraint,e.depthwiseInitializer=Oo(this.depthwiseInitializer),e.pointwiseInitializer=Oo(this.pointwiseInitializer),e.depthwiseRegularizer=eu(this.depthwiseRegularizer),e.pointwiseRegularizer=eu(this.pointwiseRegularizer),e.depthwiseConstraint=ia(this.depthwiseConstraint),e.pointwiseConstraint=ia(this.pointwiseConstraint),e}}wu.className="SeparableConv";class xu extends wu{constructor(e){super(2,e)}}xu.className="SeparableConv2D",f.Dh.registerClass(xu);class Cu extends gu{constructor(e){super(1,e),Cu.verifyArgs(e),this.inputSpec=[{ndim:3}]}getConfig(){const e=super.getConfig();return delete e.rank,delete e.dataFormat,e}static verifyArgs(e){if("number"!=typeof e.kernelSize&&!vi(e.kernelSize,"number",1,1))throw new ti(`Conv1D expects config.kernelSize to be number or number[] with length 1, but received ${JSON.stringify(e.kernelSize)}.`)}}Cu.className="Conv1D",f.Dh.registerClass(Cu);class ku extends $o{constructor(e){super(e),"number"==typeof e.cropping?this.cropping=[[e.cropping,e.cropping],[e.cropping,e.cropping]]:"number"==typeof e.cropping[0]?this.cropping=[[e.cropping[0],e.cropping[0]],[e.cropping[1],e.cropping[1]]]:this.cropping=e.cropping,this.dataFormat=void 0===e.dataFormat?"channelsLast":e.dataFormat,this.inputSpec=[{ndim:4}]}computeOutputShape(e){return"channelsFirst"===this.dataFormat?[e[0],e[1],e[2]-this.cropping[0][0]-this.cropping[0][1],e[3]-this.cropping[1][0]-this.cropping[1][1]]:[e[0],e[1]-this.cropping[0][0]-this.cropping[0][1],e[2]-this.cropping[1][0]-this.cropping[1][1],e[3]]}call(e,t){return Object(f.vi)(()=>{var t;return e=Io(e),"channelsLast"===this.dataFormat?(t=Ki(e,this.cropping[0][0],e.shape[1]-this.cropping[0][0]-this.cropping[0][1],2),Ki(t,this.cropping[1][0],e.shape[2]-this.cropping[1][1]-this.cropping[1][0],3)):(t=Ki(e,this.cropping[0][0],e.shape[2]-this.cropping[0][0]-this.cropping[0][1],3),Ki(t,this.cropping[1][0],e.shape[3]-this.cropping[1][1]-this.cropping[1][0],4))})}getConfig(){var e={cropping:this.cropping,dataFormat:this.dataFormat},t=super.getConfig();return Object.assign(e,t),e}}ku.className="Cropping2D",f.Dh.registerClass(ku);class Eu extends $o{constructor(e){super(e),this.DEFAULT_SIZE=[2,2],this.inputSpec=[{ndim:4}],this.size=null==e.size?this.DEFAULT_SIZE:e.size,this.dataFormat=null==e.dataFormat?"channelsLast":e.dataFormat,Di(this.dataFormat),this.interpolation=null==e.interpolation?"nearest":e.interpolation,e=this.interpolation,Ai(Ei,"InterpolationFormat",e)}computeOutputShape(e){var t,n;return"channelsFirst"===this.dataFormat?(t=null==e[2]?null:this.size[0]*e[2],n=null==e[3]?null:this.size[1]*e[3],[e[0],e[1],t,n]):(t=null==e[1]?null:this.size[0]*e[1],n=null==e[2]?null:this.size[1]*e[2],[e[0],t,n,e[3]])}call(e,t){return f.vi(()=>{let t=Io(e);var n,r,i=t.shape;return"channelsFirst"===this.dataFormat?(t=f.Ai(t,[0,2,3,1]),r=this.size[0]*i[2],n=this.size[1]*i[3],r="nearest"===this.interpolation?f.Jf.resizeNearestNeighbor(t,[r,n]):f.Jf.resizeBilinear(t,[r,n]),f.Ai(r,[0,3,1,2])):(n=this.size[0]*i[1],r=this.size[1]*i[2],"nearest"===this.interpolation?f.Jf.resizeNearestNeighbor(t,[n,r]):f.Jf.resizeBilinear(t,[n,r]))})}getConfig(){var e={size:this.size,dataFormat:this.dataFormat,interpolation:this.interpolation},t=super.getConfig();return Object.assign(e,t),e}}Eu.className="UpSampling2D",f.Dh.registerClass(Eu);class Su extends mu{constructor(e){super(2,e),this.depthwiseKernel=null,this.depthMultiplier=null==e.depthMultiplier?1:e.depthMultiplier,this.depthwiseInitializer=To(e.depthwiseInitializer||this.DEFAULT_KERNEL_INITIALIZER),this.depthwiseConstraint=aa(e.depthwiseConstraint),this.depthwiseRegularizer=nu(e.depthwiseRegularizer)}build(e){if((e=Mo(e)).length<4)throw new ti(`Inputs to DepthwiseConv2D should have rank 4. Received input shape: ${JSON.stringify(e)}.`);var t="channelsFirst"===this.dataFormat?1:3;if(null==e[t]||e[t]<0)throw new ti(`The channel dimension of the inputs to DepthwiseConv2D should be defined, but is not (${e[t]}).`);e=e[t],t=[this.kernelSize[0],this.kernelSize[1],e,this.depthMultiplier],this.depthwiseKernel=this.addWeight("depthwise_kernel",t,null,this.depthwiseInitializer,this.depthwiseRegularizer,!0,this.depthwiseConstraint),this.useBias?this.bias=this.addWeight("bias",[e*this.depthMultiplier],null,this.biasInitializer,this.biasRegularizer,!0,this.biasConstraint):this.bias=null,this.built=!0}call(e,t){return Object(f.vi)(()=>{e=Io(e),[n,r,i=[1,1],o="valid",a,s]=[e,this.depthwiseKernel.read(),this.strides,this.padding,this.dataFormat,null];let t=Object(f.vi)(()=>{Di(a=null==a?"channelsLast":a);let e=fu(n,a);if(4!==n.rank)throw new ti("Input for depthwiseConv2d is required to be 4-D, but is instead "+n.rank+"-D");if(4!==r.rank)throw new ti("depthwiseKernel is required to be 4-D, but is instead "+r.rank+"-D");return e=f.Qe(e,r,i,"same"===o?"same":"valid","NHWC",s),"channelsFirst"===a?f.Ai(e,[0,3,1,2]):e});
/**
 * @license
 * Copyright 2018 Google LLC
 *
 * Use of this source code is governed by an MIT-style
 * license that can be found in the LICENSE file or at
 * https://opensource.org/licenses/MIT.
 * =============================================================================
 */var n,r,i,o,a,s;return this.useBias&&(t=io(t,this.bias.read(),this.dataFormat)),null!=this.activation?this.activation.apply(t):t})}computeOutputShape(e){e=Mo(e);var t="channelsFirst"===this.dataFormat?e[2]:e[1],n="channelsFirst"===this.dataFormat?e[3]:e[2],r="channelsFirst"===this.dataFormat?e[1]*this.depthMultiplier:e[3]*this.depthMultiplier;t=lu(t,this.kernelSize[0],this.padding,this.strides[0]),n=lu(n,this.kernelSize[1],this.padding,this.strides[1]);return"channelsFirst"===this.dataFormat?[e[0],r,t,n]:[e[0],t,n,r]}getConfig(){const e=super.getConfig();return e.depthMultiplier=this.depthMultiplier,e.depthwiseInitializer=Oo(this.depthwiseInitializer),e.depthwiseRegularizer=eu(this.depthwiseRegularizer),e.depthwiseConstraint=ia(this.depthwiseRegularizer),e
/**
 * @license
 * Copyright 2018 Google LLC
 *
 * Use of this source code is governed by an MIT-style
 * license that can be found in the LICENSE file or at
 * https://opensource.org/licenses/MIT.
 * =============================================================================
 */}}function _u(e,t,n,r){if(Array.isArray(e)){if(null!=t||null!=n)throw new ti("When inputs is an array, neither initialState or constants should be provided");null!=r&&(n=e.slice(e.length-r,e.length),e=e.slice(0,e.length-r)),1<e.length&&(t=e.slice(1,e.length)),e=e[0]}function i(e){return null==e||Array.isArray(e)?e:[e]}return{inputs:e,initialState:t=i(t),constants:n=i(n)}}function Ou(e,t,n,r=!1,i,o,a,s=!1){return f.vi(()=>{var a=t.shape.length;if(a<3)throw new ti(`Input should be at least 3D, but is ${a}D.`);var u=[1,0].concat(Hi(2,a));if(t=f.Ai(t,u),null!=o)throw new ni("The rnn() functoin of the deeplearn.js backend does not support constants yet.");null!=i&&((i=f.re(f.re(i,"bool"),"float32")).rank===a-1&&(i=f.mf(i,-1)),i=f.Ai(i,u)),r&&(t=f.ph(t,0),null!=i&&(i=f.ph(i,0)));const c=[];let l,h=n;var d,p=t.shape[0],m=f.Gi(t);let g,A;null!=i&&(g=f.Gi(i));for(let t=0;t<p;++t){const n=m[t],r=f.vi(()=>e(n,h));h=null==i?(l=r[0],r[1]):(l=(d=f.vi(()=>{const e=g[t],n=f.hi(f.Ig(e),e);return{output:f.Pd(f.zg(r[0],e),f.zg(h[0],n)),newStates:h.map((t,i)=>f.Pd(f.zg(r[1][i],e),f.zg(t,n)))}})).output,d.newStates),s&&c.push(l)}return s&&(A=f.di(c,1)),[l,A,h]})}Su.className="DepthwiseConv2D",f.Dh.registerClass(Su);class Tu extends $o{constructor(e){let t;if(super(e),null==e.cell)throw new ti("cell property is missing for the constructor of RNN.");if(null==(t=Array.isArray(e.cell)?new Ru({cells:e.cell}):e.cell).stateSize)throw new ti("The RNN cell should have an attribute `stateSize` (tuple of integers, one integer per RNN state).");this.cell=t,this.returnSequences=null!=e.returnSequences&&e.returnSequences,this.returnState=null!=e.returnState&&e.returnState,this.goBackwards=null!=e.goBackwards&&e.goBackwards,this._stateful=null!=e.stateful&&e.stateful,this.unroll=null!=e.unroll&&e.unroll,this.supportsMasking=!0,this.inputSpec=[new Po({ndim:3})],this.stateSpec=null,this.states_=null,this.numConstants=null,this.keptStates=[]}getStates(){return null==this.states_?Hi(0,Array.isArray(this.cell.stateSize)?this.cell.stateSize.length:1).map(e=>null):this.states_}setStates(e){this.states_=e}computeOutputShape(e){Do(e)&&(e=e[0]);let t=this.cell.stateSize;var n=(t=Array.isArray(t)?t:[t])[0];let r;if(r=this.returnSequences?[e[0],e[1],n]:[e[0],n],this.returnState){const n=[];for(const r of t)n.push([e[0],r]);return[r].concat(n)}return r}computeMask(e,t){return f.vi(()=>{Array.isArray(t)&&(t=t[0]);const e=this.returnSequences?t:null;var n;return this.returnState?(n=this.states.map(e=>null),[e].concat(n)):e})}get states(){if(null!=this.states_)return this.states_;{var e=Array.isArray(this.cell.stateSize)?this.cell.stateSize.length:1;const t=[];for(let n=0;n<e;++n)t.push(null);return t}}set states(e){this.states_=e}build(e){if(null!=this.numConstants)throw new ni("Constants support is not implemented in RNN yet.");Do(e)&&(e=e[0]);var t=this.stateful?e[0]:null,n=e.slice(2);this.inputSpec[0]=new Po({shape:[t,null,...n]}),t=[e[0]].concat(e.slice(2));let r;if(this.cell.build(t),r=Array.isArray(this.cell.stateSize)?this.cell.stateSize:[this.cell.stateSize],null!=this.stateSpec){if(!f.Ji.arraysEqual(this.stateSpec.map(e=>e.shape[e.shape.length-1]),r))throw new ti(`An initialState was passed that is not compatible with cell.stateSize. Received stateSpec=${this.stateSpec}; However cell.stateSize is `+this.cell.stateSize)}else this.stateSpec=r.map(e=>new Po({shape:[null,e]}));this.stateful&&this.resetStates()}resetStates(e,t=!1){Object(f.vi)(()=>{if(!this.stateful)throw new Zr("Cannot call resetStates() on an RNN Layer that is not stateful.");const n=this.inputSpec[0].shape[0];if(null==n)throw new ti("If an RNN is stateful, it needs to know its batch size. Specify the batch size of your input tensors: \n- If using a Sequential model, specify the batch size by passing a `batchInputShape` option to your first layer.\n- If using the functional API, specify the batch size by passing a `batchShape` option to your Input layer.");if(null==this.states_)Array.isArray(this.cell.stateSize)?this.states_=this.cell.stateSize.map(e=>f.Ri([n,e])):this.states_=[f.Ri([n,this.cell.stateSize])];else if(null==e)f.Ve(this.states_),null!=this.keptStates&&(f.Ve(this.keptStates),this.keptStates=[]),Array.isArray(this.cell.stateSize)?this.states_=this.cell.stateSize.map(e=>f.Ri([n,e])):this.states_[0]=f.Ri([n,this.cell.stateSize]);else{if((e=Array.isArray(e)?e:[e]).length!==this.states_.length)throw new ti(`Layer ${this.name} expects ${this.states_.length} state(s), but it received ${e.length} state value(s). Input received: `+e);!0===t?this.keptStates.push(this.states_.slice()):f.Ve(this.states_);for(let t=0;t<this.states_.length;++t){var r=e[t],i=Array.isArray(this.cell.stateSize)?this.cell.stateSize[t]:this.cell.stateSize;i=[n,i];if(!f.Ji.arraysEqual(r.shape,i))throw new ti(`State ${t} is incompatible with layer ${this.name}: expected shape=${i}, received shape=`+r.shape);this.states_[t]=r}}this.states_=this.states_.map(e=>f.Qf(e.clone()))})}apply(e,t){var n=null==t?null:t.initialState,r=null==t?null:t.constants,i=(null==t&&(t={}),_u(e,n,r,this.numConstants));e=i.inputs,n=i.initialState,r=i.constants;let o=[],a=[];if(null!=n){t.initialState=n,o=o.concat(n),this.stateSpec=[];for(const e of n)this.stateSpec.push(new Po({shape:e.shape}));a=a.concat(this.stateSpec)}return null!=r&&(t.constants=r,o=o.concat(r),this.numConstants=r.length),o[0]instanceof Lo?(i=[e].concat(o),n=this.inputSpec.concat(a),r=this.inputSpec,this.inputSpec=n,n=super.apply(i,t),this.inputSpec=r,n):super.apply(e,t)}call(e,t){return Object(f.vi)(()=>{var n=null==t?null:t.mask,r=null==t?null:t.training;let i=null==t?null:t.initialState;e=Io(e),null==i&&(i=this.stateful?this.states_:this.getInitialState(e));var o=Array.isArray(this.cell.stateSize)?this.cell.stateSize.length:1;if(i.length!==o)throw new ti(`RNN Layer has ${o} state(s) but was passed `+i.length+" initial state(s).");this.unroll;const a={training:r};n=(o=Ou((e,t)=>{const n=this.cell.call([e].concat(t),a);return[n[0],n.slice(1)]},e,i,this.goBackwards,n,null,this.unroll,this.returnSequences))[0];var s=o[1];o=o[2];this.stateful&&this.resetStates(o,r);const u=this.returnSequences?s:n;return this.returnState?[u].concat(o):u})}getInitialState(e){return Object(f.vi)(()=>{let t=f.Ri(e.shape);return t=qi(t=f.ii(t,[1,2])),Array.isArray(this.cell.stateSize)?this.cell.stateSize.map(e=>1<e?Ji(t,[1,e]):t):1<this.cell.stateSize?[Ji(t,[1,this.cell.stateSize])]:[t]})}get trainableWeights(){return this.trainable?this.cell.trainableWeights:[]}get nonTrainableWeights(){return this.trainable?this.cell.nonTrainableWeights:this.cell.weights}setFastWeightInitDuringBuild(e){super.setFastWeightInitDuringBuild(e),null!=this.cell&&this.cell.setFastWeightInitDuringBuild(e)}getConfig(){var e=super.getConfig();const t={returnSequences:this.returnSequences,returnState:this.returnState,goBackwards:this.goBackwards,stateful:this.stateful,unroll:this.unroll};null!=this.numConstants&&(t.numConstants=this.numConstants);var n=this.cell.getConfig();return this.getClassName()===Tu.className&&(t.cell={className:this.cell.getClassName(),config:n}),Object.assign(Object.assign(Object.assign({},n),e),t)}static fromConfig(e,t,n={}){return n=Fa(t.cell,n),new e(Object.assign(t,{cell:n}))}}Tu.className="RNN",f.Dh.registerClass(Tu);class Du extends $o{}class Bu extends Du{constructor(e){super(e),this.DEFAULT_ACTIVATION="tanh",this.DEFAULT_KERNEL_INITIALIZER="glorotNormal",this.DEFAULT_RECURRENT_INITIALIZER="orthogonal",this.DEFAULT_BIAS_INITIALIZER="zeros",this.units=e.units,bi(this.units,"units"),this.activation=Ks(null==e.activation?this.DEFAULT_ACTIVATION:e.activation),this.useBias=null==e.useBias||e.useBias,this.kernelInitializer=To(e.kernelInitializer||this.DEFAULT_KERNEL_INITIALIZER),this.recurrentInitializer=To(e.recurrentInitializer||this.DEFAULT_RECURRENT_INITIALIZER),this.biasInitializer=To(e.biasInitializer||this.DEFAULT_BIAS_INITIALIZER),this.kernelRegularizer=nu(e.kernelRegularizer),this.recurrentRegularizer=nu(e.recurrentRegularizer),this.biasRegularizer=nu(e.biasRegularizer),this.kernelConstraint=aa(e.kernelConstraint),this.recurrentConstraint=aa(e.recurrentConstraint),this.biasConstraint=aa(e.biasConstraint),this.dropout=Ui([1,zi([0,null==e.dropout?0:e.dropout])]),this.recurrentDropout=Ui([1,zi([0,null==e.recurrentDropout?0:e.recurrentDropout])]),this.dropoutFunc=e.dropoutFunc,this.stateSize=this.units,this.dropoutMask=null,this.recurrentDropoutMask=null}build(e){e=Mo(e),this.kernel=this.addWeight("kernel",[e[e.length-1],this.units],null,this.kernelInitializer,this.kernelRegularizer,!0,this.kernelConstraint),this.recurrentKernel=this.addWeight("recurrent_kernel",[this.units,this.units],null,this.recurrentInitializer,this.recurrentRegularizer,!0,this.recurrentConstraint),this.useBias?this.bias=this.addWeight("bias",[this.units],null,this.biasInitializer,this.biasRegularizer,!0,this.biasConstraint):this.bias=null,this.built=!0}call(e,t){return Object(f.vi)(()=>{if(2!==e.length)throw new ti(`SimpleRNNCell expects 2 input Tensors, got ${e.length}.`);let n=e[1];e=e[0];var r=null!=t.training&&t.training;let i;0<this.dropout&&this.dropout<1&&null==this.dropoutMask&&(this.dropoutMask=Pu({ones:()=>f.Ig(e),rate:this.dropout,training:r,dropoutFunc:this.dropoutFunc})),0<this.recurrentDropout&&this.recurrentDropout<1&&null==this.recurrentDropoutMask&&(this.recurrentDropoutMask=Pu({ones:()=>f.Ig(n),rate:this.recurrentDropout,training:r,dropoutFunc:this.dropoutFunc}));r=this.dropoutMask;var o=this.recurrentDropoutMask;i=eo(null!=r?f.zg(e,r):e,this.kernel.read()),null!=this.bias&&(i=io(i,this.bias.read())),null!=o&&(n=f.zg(n,o));let a=f.Pd(i,eo(n,this.recurrentKernel.read()));return[a=null!=this.activation?this.activation.apply(a):a,a]})}getConfig(){var e=super.getConfig(),t={units:this.units,activation:Gs(this.activation),useBias:this.useBias,kernelInitializer:Oo(this.kernelInitializer),recurrentInitializer:Oo(this.recurrentInitializer),biasInitializer:Oo(this.biasInitializer),kernelRegularizer:eu(this.kernelRegularizer),recurrentRegularizer:eu(this.recurrentRegularizer),biasRegularizer:eu(this.biasRegularizer),activityRegularizer:eu(this.activityRegularizer),kernelConstraint:ia(this.kernelConstraint),recurrentConstraint:ia(this.recurrentConstraint),biasConstraint:ia(this.biasConstraint),dropout:this.dropout,recurrentDropout:this.recurrentDropout};return Object.assign(Object.assign({},e),t)}}Bu.className="SimpleRNNCell",f.Dh.registerClass(Bu);class Iu extends Tu{constructor(e){e.cell=new Bu(e),super(e)}call(e,t){return Object(f.vi)(()=>{null!=this.cell.dropoutMask&&(f.Ve(this.cell.dropoutMask),this.cell.dropoutMask=null),null!=this.cell.recurrentDropoutMask&&(f.Ve(this.cell.recurrentDropoutMask),this.cell.recurrentDropoutMask=null);var n=null==t?null:t.mask,r=null==t?null:t.training,i=null==t?null:t.initialState;return super.call(e,{mask:n,training:r,initialState:i})})}static fromConfig(e,t){return new e(t)}}Iu.className="SimpleRNN",f.Dh.registerClass(Iu);class Mu extends Du{constructor(e){if(super(e),this.DEFAULT_ACTIVATION="tanh",this.DEFAULT_RECURRENT_ACTIVATION="hardSigmoid",this.DEFAULT_KERNEL_INITIALIZER="glorotNormal",this.DEFAULT_RECURRENT_INITIALIZER="orthogonal",this.DEFAULT_BIAS_INITIALIZER="zeros",e.resetAfter)throw new ti("GRUCell does not support reset_after parameter set to true.");this.units=e.units,bi(this.units,"units"),this.activation=Ks(void 0===e.activation?this.DEFAULT_ACTIVATION:e.activation),this.recurrentActivation=Ks(void 0===e.recurrentActivation?this.DEFAULT_RECURRENT_ACTIVATION:e.recurrentActivation),this.useBias=null==e.useBias||e.useBias,this.kernelInitializer=To(e.kernelInitializer||this.DEFAULT_KERNEL_INITIALIZER),this.recurrentInitializer=To(e.recurrentInitializer||this.DEFAULT_RECURRENT_INITIALIZER),this.biasInitializer=To(e.biasInitializer||this.DEFAULT_BIAS_INITIALIZER),this.kernelRegularizer=nu(e.kernelRegularizer),this.recurrentRegularizer=nu(e.recurrentRegularizer),this.biasRegularizer=nu(e.biasRegularizer),this.kernelConstraint=aa(e.kernelConstraint),this.recurrentConstraint=aa(e.recurrentConstraint),this.biasConstraint=aa(e.biasConstraint),this.dropout=Ui([1,zi([0,null==e.dropout?0:e.dropout])]),this.recurrentDropout=Ui([1,zi([0,null==e.recurrentDropout?0:e.recurrentDropout])]),this.dropoutFunc=e.dropoutFunc,this.implementation=e.implementation,this.stateSize=this.units,this.dropoutMask=null,this.recurrentDropoutMask=null}build(e){e=(e=Mo(e))[e.length-1],this.kernel=this.addWeight("kernel",[e,3*this.units],null,this.kernelInitializer,this.kernelRegularizer,!0,this.kernelConstraint),this.recurrentKernel=this.addWeight("recurrent_kernel",[this.units,3*this.units],null,this.recurrentInitializer,this.recurrentRegularizer,!0,this.recurrentConstraint),this.useBias?this.bias=this.addWeight("bias",[3*this.units],null,this.biasInitializer,this.biasRegularizer,!0,this.biasConstraint):this.bias=null,this.built=!0}call(e,t){return Object(f.vi)(()=>{if(2!==e.length)throw new ti("GRUCell expects 2 input Tensors (inputs, h, c), got "+e.length+".");var n=null!=t.training&&t.training;let r=e[1];e=e[0],0<this.dropout&&this.dropout<1&&null==this.dropoutMask&&(this.dropoutMask=Pu({ones:()=>f.Ig(e),rate:this.dropout,training:n,count:3,dropoutFunc:this.dropoutFunc})),0<this.recurrentDropout&&this.recurrentDropout<1&&null==this.recurrentDropoutMask&&(this.recurrentDropoutMask=Pu({ones:()=>f.Ig(r),rate:this.recurrentDropout,training:n,count:3,dropoutFunc:this.dropoutFunc}));n=this.dropoutMask;var i=this.recurrentDropoutMask;let o=eo(e=0<this.dropout&&this.dropout<1?f.zg(e,n[0]):e,this.kernel.read());this.useBias&&(o=io(o,this.bias.read())),0<this.recurrentDropout&&this.recurrentDropout<1&&(r=f.zg(r,i[0]));n=this.recurrentKernel.read();var[i,n]=f.Yh(n,[2*this.units,this.units],n.rank-1),[a,s,u]=(i=eo(r,i),f.Yh(o,3,o.rank-1)),[i,c]=f.Yh(i,2,i.rank-1),a=this.recurrentActivation.apply(f.Pd(a,i)),s=(i=this.recurrentActivation.apply(f.Pd(s,c)),eo(f.zg(i,r),n)),c=this.activation.apply(f.Pd(u,s));return[i=f.Pd(f.zg(a,r),f.zg(f.Pd(1,f.Cg(a)),c)),i]})}getConfig(){var e=super.getConfig(),t={units:this.units,activation:Gs(this.activation),recurrentActivation:Gs(this.recurrentActivation),useBias:this.useBias,kernelInitializer:Oo(this.kernelInitializer),recurrentInitializer:Oo(this.recurrentInitializer),biasInitializer:Oo(this.biasInitializer),kernelRegularizer:eu(this.kernelRegularizer),recurrentRegularizer:eu(this.recurrentRegularizer),biasRegularizer:eu(this.biasRegularizer),activityRegularizer:eu(this.activityRegularizer),kernelConstraint:ia(this.kernelConstraint),recurrentConstraint:ia(this.recurrentConstraint),biasConstraint:ia(this.biasConstraint),dropout:this.dropout,recurrentDropout:this.recurrentDropout,implementation:this.implementation,resetAfter:!1};return Object.assign(Object.assign({},e),t)}}Mu.className="GRUCell",f.Dh.registerClass(Mu);class ju extends Tu{constructor(e){e.implementation,e.cell=new Mu(e),super(e)}call(e,t){return Object(f.vi)(()=>{null!=this.cell.dropoutMask&&(f.Ve(this.cell.dropoutMask),this.cell.dropoutMask=null),null!=this.cell.recurrentDropoutMask&&(f.Ve(this.cell.recurrentDropoutMask),this.cell.recurrentDropoutMask=null);var n=null==t?null:t.mask,r=null==t?null:t.training,i=null==t?null:t.initialState;return super.call(e,{mask:n,training:r,initialState:i})})}static fromConfig(e,t){return 0===t.implmentation&&(t.implementation=1),new e(t)}}ju.className="GRU",f.Dh.registerClass(ju);class Nu extends Du{constructor(e){super(e),this.DEFAULT_ACTIVATION="tanh",this.DEFAULT_RECURRENT_ACTIVATION="hardSigmoid",this.DEFAULT_KERNEL_INITIALIZER="glorotNormal",this.DEFAULT_RECURRENT_INITIALIZER="orthogonal",this.DEFAULT_BIAS_INITIALIZER="zeros",this.units=e.units,bi(this.units,"units"),this.activation=Ks(void 0===e.activation?this.DEFAULT_ACTIVATION:e.activation),this.recurrentActivation=Ks(void 0===e.recurrentActivation?this.DEFAULT_RECURRENT_ACTIVATION:e.recurrentActivation),this.useBias=null==e.useBias||e.useBias,this.kernelInitializer=To(e.kernelInitializer||this.DEFAULT_KERNEL_INITIALIZER),this.recurrentInitializer=To(e.recurrentInitializer||this.DEFAULT_RECURRENT_INITIALIZER),this.biasInitializer=To(e.biasInitializer||this.DEFAULT_BIAS_INITIALIZER),this.unitForgetBias=e.unitForgetBias,this.kernelRegularizer=nu(e.kernelRegularizer),this.recurrentRegularizer=nu(e.recurrentRegularizer),this.biasRegularizer=nu(e.biasRegularizer),this.kernelConstraint=aa(e.kernelConstraint),this.recurrentConstraint=aa(e.recurrentConstraint),this.biasConstraint=aa(e.biasConstraint),this.dropout=Ui([1,zi([0,null==e.dropout?0:e.dropout])]),this.recurrentDropout=Ui([1,zi([0,null==e.recurrentDropout?0:e.recurrentDropout])]),this.dropoutFunc=e.dropoutFunc,this.implementation=e.implementation,this.stateSize=[this.units,this.units],this.dropoutMask=null,this.recurrentDropoutMask=null}build(e){e=(e=Mo(e))[e.length-1];let t;if(this.kernel=this.addWeight("kernel",[e,4*this.units],null,this.kernelInitializer,this.kernelRegularizer,!0,this.kernelConstraint),this.recurrentKernel=this.addWeight("recurrent_kernel",[this.units,4*this.units],null,this.recurrentInitializer,this.recurrentRegularizer,!0,this.recurrentConstraint),this.useBias){if(this.unitForgetBias){const n=this.biasInitializer,r=this.units;(e=class extends co{apply(e,t){var i=n.apply([r]),o=(new ho).apply([r]),a=n.apply([2*r]);return Xi(Xi(i,o),a)}}).className="CustomInit",t=new e}else t=this.biasInitializer;this.bias=this.addWeight("bias",[4*this.units],null,t,this.biasRegularizer,!0,this.biasConstraint)}else this.bias=null;this.built=!0}call(e,t){return Object(f.vi)(()=>{var n=null!=t.training&&t.training;if(3!==e.length)throw new ti("LSTMCell expects 3 input Tensors (inputs, h, c), got "+e.length+".");let r=e[1];var i=e[2],o=(n=(e=e[0],0<this.dropout&&this.dropout<1&&null==this.dropoutMask&&(this.dropoutMask=Pu({ones:()=>f.Ig(e),rate:this.dropout,training:n,count:4,dropoutFunc:this.dropoutFunc})),0<this.recurrentDropout&&this.recurrentDropout<1&&null==this.recurrentDropoutMask&&(this.recurrentDropoutMask=Pu({ones:()=>f.Ig(r),rate:this.recurrentDropout,training:n,count:4,dropoutFunc:this.dropoutFunc})),this.dropoutMask),this.recurrentDropoutMask);let a=eo(e=0<this.dropout&&this.dropout<1?f.zg(e,n[0]):e,this.kernel.read());0<this.recurrentDropout&&this.recurrentDropout<1&&(r=f.zg(r,o[0])),a=f.Pd(a,eo(r,this.recurrentKernel.read())),this.useBias&&(a=io(a,this.bias.read()));var[n,o,s,u]=f.Yh(a,4,a.rank-1);n=this.recurrentActivation.apply(n),o=this.recurrentActivation.apply(o),o=f.Pd(f.zg(o,i),f.zg(n,this.activation.apply(s))),i=this.recurrentActivation.apply(u);return[n=f.zg(i,this.activation.apply(o)),n,o]})}getConfig(){var e=super.getConfig(),t={units:this.units,activation:Gs(this.activation),recurrentActivation:Gs(this.recurrentActivation),useBias:this.useBias,kernelInitializer:Oo(this.kernelInitializer),recurrentInitializer:Oo(this.recurrentInitializer),biasInitializer:Oo(this.biasInitializer),unitForgetBias:this.unitForgetBias,kernelRegularizer:eu(this.kernelRegularizer),recurrentRegularizer:eu(this.recurrentRegularizer),biasRegularizer:eu(this.biasRegularizer),activityRegularizer:eu(this.activityRegularizer),kernelConstraint:ia(this.kernelConstraint),recurrentConstraint:ia(this.recurrentConstraint),biasConstraint:ia(this.biasConstraint),dropout:this.dropout,recurrentDropout:this.recurrentDropout,implementation:this.implementation};return Object.assign(Object.assign({},e),t)}}Nu.className="LSTMCell",f.Dh.registerClass(Nu);class Fu extends Tu{constructor(e){e.implementation,e.cell=new Nu(e),super(e)}call(e,t){return Object(f.vi)(()=>{null!=this.cell.dropoutMask&&(f.Ve(this.cell.dropoutMask),this.cell.dropoutMask=null),null!=this.cell.recurrentDropoutMask&&(f.Ve(this.cell.recurrentDropoutMask),this.cell.recurrentDropoutMask=null);var n=null==t?null:t.mask,r=null==t?null:t.training,i=null==t?null:t.initialState;return super.call(e,{mask:n,training:r,initialState:i})})}static fromConfig(e,t){return 0===t.implmentation&&(t.implementation=1),new e(t)}}Fu.className="LSTM",f.Dh.registerClass(Fu);class Ru extends Du{constructor(e){super(e),this.cells=e.cells}get stateSize(){const e=[];for(const t of this.cells.slice().reverse())Array.isArray(t.stateSize)?e.push(...t.stateSize):e.push(t.stateSize);return e}call(e,t){return Object(f.vi)(()=>{let n=e.slice(1);const r=[];for(const e of this.cells.slice().reverse())Array.isArray(e.stateSize)?r.push(n.splice(0,e.stateSize.length)):r.push(n.splice(0,1));r.reverse();const i=[];let o;for(let a=0;a<this.cells.length;++a){const s=this.cells[a];n=r[a],o=(0===a?[e[0]]:[o[0]]).concat(n),o=s.call(o,t),i.push(o.slice(1))}n=[];for(const e of i.slice().reverse())n.push(...e);return[o[0]].concat(n)})}build(e){let t;Do(e)&&(e=e[0]),this.cells.forEach((n,r)=>{ji("RNNCell_"+r,()=>{n.build(e),t=Array.isArray(n.stateSize)?n.stateSize[0]:n.stateSize,e=[e[0],t]})}),this.built=!0}getConfig(){var e=super.getConfig(),t={cells:this.cells.map(e=>({className:e.getClassName(),config:e.getConfig()}))};return Object.assign(Object.assign({},e),t)}static fromConfig(e,t,n={}){const r=[];for(const e of t.cells)r.push(Fa(e,n));return new e({cells:r})}get trainableWeights(){if(!this.trainable)return[];const e=[];for(const t of this.cells)e.push(...t.trainableWeights);return e}get nonTrainableWeights(){const e=[];for(const t of this.cells)e.push(...t.nonTrainableWeights);if(this.trainable)return e;{const t=[];for(const e of this.cells)t.push(...e.trainableWeights);return t.concat(e)}}getWeights(){const e=[];for(const t of this.cells)e.push(...t.weights);return Fo(e)}setWeights(e){const t=[];for(const i of this.cells){var n=i.weights.length,r=e.splice(n);for(let e=0;e<i.weights.length;++e)t.push([i.weights[e],r[e]])}Ro(t)}}function Pu(e){const{ones:t,rate:n,training:r=!1,count:i=1,dropoutFunc:o}=e,a=()=>(null!=o?o:oo)(t(),n);if(e=()=>ao(a,t,r),!i||i<=1)return f.Qf(e().clone());return Array(i).fill(void 0).map(e).map(e=>f.Qf(e.clone()))}
/**
 * @license
 * Copyright 2020 Google LLC
 *
 * Use of this source code is governed by an MIT-style
 * license that can be found in the LICENSE file or at
 * https://opensource.org/licenses/MIT.
 * =============================================================================
 */Ru.className="StackedRNNCells",f.Dh.registerClass(Ru);class Lu extends Tu{constructor(e){if(e.unroll)throw new ni("Unrolling is not possible with convolutional RNNs.");if(Array.isArray(e.cell))throw new ni("It is not possible at the moment to stack convolutional cells.");super(e),this.inputSpec=[new Po({ndim:5})]}call(e,t){return f.vi(()=>{if(null!=this.cell.dropoutMask&&(f.Ve(this.cell.dropoutMask),this.cell.dropoutMask=null),null!=this.cell.recurrentDropoutMask&&(f.Ve(this.cell.recurrentDropoutMask),this.cell.recurrentDropoutMask=null),t&&t.constants)throw new ti("ConvRNN2D cell does not support constants");var n=null==t?null:t.mask,r=null==t?null:t.training,i=null==t?null:t.initialState;return super.call(e,{mask:n,training:r,initialState:i})})}computeOutputShape(e){let t=this.computeSingleOutputShape(e);return this.returnSequences||(t=[t[0],...t.slice(2)]),this.returnState?[t,...Array(2).fill([e[0],...t.slice(-3)])]:t}getInitialState(e){return f.vi(()=>{var t=this.cell.stateSize,n=e.shape;const r=this.computeSingleOutputShape(n);return n=[r[0],...r.slice(2)],n=f.Ri(n),Array.isArray(t)?Array(t.length).fill(n):[n]})}resetStates(e,t=!1){f.vi(()=>{if(!this.stateful)throw new Zr("Cannot call resetStates() on an RNN Layer that is not stateful.");var n=this.inputSpec[0].shape;const r=this.computeSingleOutputShape(n),i=[r[0],...r.slice(2)];if(null==n[0])throw new ti("If an RNN is stateful, it needs to know its batch size. Specify the batch size of your input tensors: \n- If using a Sequential model, specify the batch size by passing a `batchInputShape` option to your first layer.\n- If using the functional API, specify the batch size by passing a `batchShape` option to your Input layer.");if(null==this.getStates())Array.isArray(this.cell.stateSize)?this.states_=this.cell.stateSize.map(()=>f.Ri(i)):this.states_=[f.Ri(i)];else if(null==e)f.Ve(this.states_),null!=this.keptStates&&(f.Ve(this.keptStates),this.keptStates=[]),Array.isArray(this.cell.stateSize)?this.states_=this.cell.stateSize.map(()=>f.Ri(i)):this.states_[0]=f.Ri(i);else{if((e=Array.isArray(e)?e:[e]).length!==this.states_.length)throw new ti(`Layer ${this.name} expects ${this.states_.length} state(s), but it received ${e.length} state value(s). Input received: `+e);t?this.keptStates.push(this.states_.slice()):f.Ve(this.states_);for(let t=0;t<this.states_.length;++t){var o=e[t],a=i;if(!f.Ji.arraysEqual(o.shape,a))throw new ti(`State ${t} is incompatible with layer ${this.name}: expected shape=${a}, received shape=`+o.shape);this.states_[t]=o}}this.states_=this.states_.map(e=>f.Qf(e.clone()))})}computeSingleOutputShape(e){var t,{dataFormat:t,filters:n,kernelSize:r,padding:i,strides:o,dilationRate:a}=this.cell,s=e[(t="channelsFirst"===t)?3:2],u=e[t?4:3];s=lu(s,r[0],i,o[0],a[0]),u=lu(u,r[1],i,o[1],a[1]);return[...e.slice(0,2),...t?[n,s,u]:[s,u,n]]}}Lu.className="ConvRNN2D";class Uu extends Nu{constructor(e){var{filters:t,kernelSize:n,strides:r,padding:i,dataFormat:o,dilationRate:a}=e;super(Object.assign(Object.assign({},e),{units:t})),this.filters=t,bi(this.filters,"filters"),this.kernelSize=cu(n,2,"kernelSize"),this.kernelSize.forEach(e=>bi(e,"kernelSize")),this.strides=cu(r||1,2,"strides"),this.strides.forEach(e=>bi(e,"strides")),this.padding=i||"valid",Bi(this.padding),this.dataFormat=o||"channelsLast",Di(this.dataFormat),this.dilationRate=cu(a||1,2,"dilationRate"),this.dilationRate.forEach(e=>bi(e,"dilationRate"))}build(e){if(null==(e=Mo(e))[t="channelsFirst"===this.dataFormat?1:e.length-1])throw new ti("The channel dimension of the input should be defined. Found "+e[t]);e=e[t];var t=this.kernelSize.concat([e,4*this.filters]);this.kernel=this.addWeight("kernel",t,null,this.kernelInitializer,this.kernelRegularizer,!0,this.kernelConstraint),e=this.kernelSize.concat([this.filters,4*this.filters]);if(this.recurrentKernel=this.addWeight("recurrent_kernel",e,null,this.recurrentInitializer,this.recurrentRegularizer,!0,this.recurrentConstraint),this.useBias){let e;if(this.unitForgetBias){const n=this.biasInitializer,r=this.filters;(t=class extends co{apply(e,t){return Yi([n.apply([r]),f.Hg([r]),n.apply([2*r])])}}).className="CustomInit",e=new t}else e=this.biasInitializer;this.bias=this.addWeight("bias",[4*this.filters],null,e,this.biasRegularizer,!0,this.biasConstraint)}this.built=!0}call(e,t){return f.vi(()=>{if(3!==e.length)throw new ti("ConvLSTM2DCell expects 3 input Tensors (inputs, h, c), got "+e.length+".");var n=t.training||!1;const r=e[0],i=e[1];var o,a=e[2],s=(0<this.dropout&&this.dropout<1&&null==this.dropoutMask&&(this.dropoutMask=Pu({ones:()=>f.Ig(r),rate:this.dropout,training:n,count:4,dropoutFunc:this.dropoutFunc})),this.dropoutMask),u=(m=(e,t,n)=>t&&t[n]?f.zg(t[n],e):e)(r,s,0),c=m(r,s,1),l=m(r,s,2),h=(s=m(r,s,3),n=(0<this.recurrentDropout&&this.recurrentDropout<1&&null==this.recurrentDropoutMask&&(this.recurrentDropoutMask=Pu({ones:()=>f.Ig(i),rate:this.recurrentDropout,training:n,count:4,dropoutFunc:this.dropoutFunc})),this.recurrentDropoutMask),m(i,n,0)),d=m(i,n,1),p=m(i,n,2),m=m(i,n,3),[n,g,A,v]=f.Yh(this.kernel.read(),4,3),[b,y,w,o]=this.useBias?f.Yh(this.bias.read(),4):[null,null,null,null],[n,b,g,y]=(u=this.inputConv(u,n,b,this.padding),c=this.inputConv(c,g,y,this.padding),l=this.inputConv(l,A,w,this.padding),s=this.inputConv(s,v,o,this.padding),f.Yh(this.recurrentKernel.read(),4,3)),A=(h=this.recurrentConv(h,n),d=this.recurrentConv(d,b),p=this.recurrentConv(p,g),m=this.recurrentConv(m,y),this.recurrentActivation.apply(f.Pd(u,h))),w=this.recurrentActivation.apply(f.Pd(c,d)),v=f.Pd(f.zg(w,a),f.zg(A,this.activation.apply(f.Pd(l,p))));return[o=f.zg(this.recurrentActivation.apply(f.Pd(s,m)),this.activation.apply(v)),o,v]})}getConfig(){var e=super.getConfig(),{}=e,t=(e=function(e,t){var n={};for(i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]]);return n}(e,["units"]),{filters:this.filters,kernelSize:this.kernelSize,padding:this.padding,dataFormat:this.dataFormat,dilationRate:this.dilationRate,strides:this.strides});return Object.assign(Object.assign({},e),t)}inputConv(e,t,n,r){return e=f.Ce(e,t,this.strides,r||"valid","channelsFirst"===this.dataFormat?"NCHW":"NHWC",this.dilationRate),n?io(e,n,this.dataFormat):e}recurrentConv(e,t){return f.Ce(e,t,1,"same","channelsFirst"===this.dataFormat?"NCHW":"NHWC")}}Uu.className="ConvLSTM2DCell",f.Dh.registerClass(Uu);class zu extends Lu{constructor(e){var t=new Uu(e);super(Object.assign(Object.assign({},e),{cell:t}))}static fromConfig(e,t){return new e(t)}}zu.className="ConvLSTM2D",f.Dh.registerClass(zu);
/**
 * @license
 * Copyright 2018 Google LLC
 *
 * Use of this source code is governed by an MIT-style
 * license that can be found in the LICENSE file or at
 * https://opensource.org/licenses/MIT.
 * =============================================================================
 */
class Hu extends $o{constructor(e){super(e),this.rate=Math.max(Math.min(e.rate,1),0),this.noiseShape=e.noiseShape,this.seed=e.seed,this.supportsMasking=!0}getNoiseShape(e){if(null==this.noiseShape)return this.noiseShape;var t=e.shape;const n=[];for(let e=0;e<this.noiseShape.length;++e)n.push((null==this.noiseShape[e]?t:this.noiseShape)[e]);return n}call(e,t){return Object(f.vi)(()=>{this.invokeCallHook(e,t);const n=Io(e);if(0<this.rate&&this.rate<1){var r=null!=t.training&&t.training;const e=this.getNoiseShape(n);return ao(()=>oo(n,this.rate,e,this.seed),()=>n,r)}return e})}getConfig(){var e={rate:this.rate,noiseShape:this.noiseShape,seed:this.seed},t=super.getConfig();return Object.assign(e,t),e}dispose(){return super.dispose()}}Hu.className="Dropout",f.Dh.registerClass(Hu);class $u extends Hu{constructor(e){super(e),this.inputSpec=[{ndim:3}]}getNoiseShape(e){return[(e=e.shape)[0],1,e[2]]}}$u.className="SpatialDropout1D",f.Dh.registerClass($u);class Qu extends $o{constructor(e){if(super(e),this.activation=null,this.useBias=!0,this.kernel=null,this.bias=null,this.DEFAULT_KERNEL_INITIALIZER="glorotNormal",this.DEFAULT_BIAS_INITIALIZER="zeros",null==e.batchInputShape&&null==e.inputShape&&null!=e.inputDim){let t=null;null!=e.batchSize&&(t=e.batchSize),this.batchInputShape=[t,e.inputDim]}this.units=e.units,bi(this.units,"units"),this.activation=Ks(e.activation),null!=e.useBias&&(this.useBias=e.useBias),this.kernelInitializer=To(e.kernelInitializer||this.DEFAULT_KERNEL_INITIALIZER),this.biasInitializer=To(e.biasInitializer||this.DEFAULT_BIAS_INITIALIZER),this.kernelConstraint=aa(e.kernelConstraint),this.biasConstraint=aa(e.biasConstraint),this.kernelRegularizer=nu(e.kernelRegularizer),this.biasRegularizer=nu(e.biasRegularizer),this.activityRegularizer=nu(e.activityRegularizer),this.supportsMasking=!0,this.inputSpec=[{minNDim:2}]}build(e){e=(e=Mo(e))[e.length-1],null==this.kernel&&(this.kernel=this.addWeight("kernel",[e,this.units],null,this.kernelInitializer,this.kernelRegularizer,!0,this.kernelConstraint),this.useBias&&(this.bias=this.addWeight("bias",[this.units],null,this.biasInitializer,this.biasRegularizer,!0,this.biasConstraint))),this.inputSpec=[{minNDim:2,axes:{"-1":e}}],this.built=!0}computeOutputShape(e){const t=(e=Mo(e)).slice();return t[t.length-1]=this.units,t}call(e,t){return Object(f.vi)(()=>{this.invokeCallHook(e,t);var n=Io(e),r=yi(this.activation.getClassName());let i;return null!=r?i=eo(n,this.kernel.read(),r,this.bias?this.bias.read():null):(i=eo(n,this.kernel.read()),null!=this.bias&&(i=io(i,this.bias.read())),null!=this.activation&&(i=this.activation.apply(i))),i})}getConfig(){var e={units:this.units,activation:Gs(this.activation),useBias:this.useBias,kernelInitializer:Oo(this.kernelInitializer),biasInitializer:Oo(this.biasInitializer),kernelRegularizer:eu(this.kernelRegularizer),biasRegularizer:eu(this.biasRegularizer),activityRegularizer:eu(this.activityRegularizer),kernelConstraint:ia(this.kernelConstraint),biasConstraint:ia(this.biasConstraint)},t=super.getConfig();return Object.assign(e,t),e}}Qu.className="Dense",f.Dh.registerClass(Qu);class Vu extends $o{constructor(e){super(e=e||{}),this.inputSpec=[{minNDim:3}],this.dataFormat=e.dataFormat}computeOutputShape(e){for(const t of(e=Mo(e)).slice(1))if(null==t)throw new ti(`The shape of the input to "Flatten" is not fully defined (got ${e.slice(1)}). Make sure to pass a complete "input_shape" or "batch_input_shape" argument to the first layer in your model.`);return[e[0],Li(e,1)]}call(e,t){return Object(f.vi)(()=>{this.invokeCallHook(e,t);let n=Io(e);if("channelsFirst"===this.dataFormat&&1<n.rank){const e=[0];for(let t=2;t<n.rank;++t)e.push(t);e.push(1),n=Object(f.Ai)(n,e)}var r=n;if(r.rank<=1)throw new ti(`batchFlatten requires a minimum rank of 2. Got rank: ${r.rank}.`);var i=[r.shape[0],Li(r.shape,1)];return f.oh(r,i)})}getConfig(){const e={};null!=this.dataFormat&&(e.dataFormat=this.dataFormat);var t=super.getConfig();return Object.assign(e,t),e}}Vu.className="Flatten",f.Dh.registerClass(Vu);class qu extends $o{constructor(e){super(e),this.supportsMasking=!0,this.activation=Ks(e.activation)}call(e,t){return Object(f.vi)(()=>{this.invokeCallHook(e,t);var n=Io(e);return this.activation.apply(n)})}getConfig(){var e={activation:Gs(this.activation)},t=super.getConfig();return Object.assign(e,t),e}}qu.className="Activation",f.Dh.registerClass(qu);class Gu extends $o{constructor(e){super(e),this.n=e.n,this.inputSpec=[{ndim:2}]}computeOutputShape(e){return[e[0],this.n,e[1]]}call(e,t){return Object(f.vi)(()=>{return e=Io(e),t=e,n=this.n,Object(f.vi)(()=>{if(2!==t.shape.length)throw new ti(`repeat() expects a rank-2 tensor, but received a rank-${t.shape.length} tensor.`);return Ji(qi(t,1),[1,n,1])});var t,n})}getConfig(){var e={n:this.n},t=super.getConfig();return Object.assign(e,t),e}}Gu.className="RepeatVector",f.Dh.registerClass(Gu);class Wu extends $o{constructor(e){super(e),this.targetShape=e.targetShape;for(let e=0;e<this.targetShape.length;++e)this.isUnknown(this.targetShape[e])&&(this.targetShape[e]=null)}isUnknown(e){return e<0||null==e}fixUnknownDimension(e,t){var n="Total size of new array must be unchanged.";const r=t.slice();let i=1,o=null;for(let e=0;e<r.length;++e){var a=r[e];if(this.isUnknown(a)){if(null!==o)throw new ti("Can only specifiy one unknown dimension.");o=e}else i*=a}if(t=Li(e),null!==o){if(0===i||t%i!=0)throw new ti(n);r[o]=t/i}else if(t!==i)throw new ti(n);return r}computeOutputShape(e){let t=!1;for(let n=0;n<e.length;++n)if(this.isUnknown(e[n])){t=!0;break}return t?e.slice(0,1).concat(this.targetShape):e.slice(0,1).concat(this.fixUnknownDimension(e.slice(1),this.targetShape))}call(e,t){return Object(f.vi)(()=>{this.invokeCallHook(e,t);var n=Io(e);const r=n.shape;var i=r.slice(0,1).concat(this.fixUnknownDimension(r.slice(1),this.targetShape));return Object(f.oh)(n,i)})}getConfig(){var e={targetShape:this.targetShape},t=super.getConfig();return Object.assign(e,t),e}}Wu.className="Reshape",f.Dh.registerClass(Wu);class Ku extends $o{constructor(e){if(super(e),null==e.dims)throw new Error("Required configuration field `dims` is missing during Permute constructor call.");if(!Array.isArray(e.dims))throw new Error("Permute constructor requires `dims` to be an Array, but received "+e.dims+" instead.");var t=Hi(1,e.dims.length+1);if(!f.Ji.arraysEqual(e.dims.slice().sort(),t))throw new Error("Invalid permutation `dims`: "+JSON.stringify(e.dims)+" `dims` must contain consecutive integers starting from 1.");this.dims=e.dims,this.dimsIncludingBatch=[0].concat(this.dims),this.inputSpec=[new Po({ndim:this.dims.length+1})]}computeOutputShape(e){const t=(e=Mo(e)).slice();return this.dims.forEach((n,r)=>{t[r+1]=e[n]}),t}call(e,t){return Object(f.Ai)(Io(e),this.dimsIncludingBatch)}getConfig(){var e={dims:this.dims},t=super.getConfig();return Object.assign(e,t),e}}Ku.className="Permute",f.Dh.registerClass(Ku);class Yu extends $o{constructor(e){super(null==e?{}:e),this.supportsMasking=!0,this.maskValue=null==e||null==e.maskValue?0:e.maskValue}computeOutputShape(e){return e}getConfig(){var e=super.getConfig(),t={maskValue:this.maskValue};return Object.assign(t,e),t}computeMask(e,t){return e=Io(e),Object(f.Sd)(Object(f.Fg)(e,this.maskValue),-1)}call(e,t){return Object(f.vi)(()=>{this.invokeCallHook(e,t);var n=Io(e),r=Object(f.Sd)(Object(f.Fg)(n,this.maskValue),-1,!0);return Object(f.zg)(n,Object(f.re)(r,n.dtype))})}}Yu.className="Masking",f.Dh.registerClass(Yu);
/**
 * @license
 * Copyright 2018 Google LLC
 *
 * Use of this source code is governed by an MIT-style
 * license that can be found in the LICENSE file or at
 * https://opensource.org/licenses/MIT.
 * =============================================================================
 */
class Xu extends $o{constructor(e){if(super(e),this.embeddings=null,this.DEFAULT_EMBEDDINGS_INITIALIZER="randomUniform",null==e.batchInputShape&&null==e.inputShape){let t=null;null!=e.batchSize&&(t=e.batchSize),null==e.inputLength?this.batchInputShape=[t,null]:this.batchInputShape=[t].concat(ci(e.inputLength))}this.inputDim=e.inputDim,bi(this.inputDim,"inputDim"),this.outputDim=e.outputDim,bi(this.outputDim,"outputDim"),this.embeddingsInitializer=To(e.embeddingsInitializer||this.DEFAULT_EMBEDDINGS_INITIALIZER),this.embeddingsRegularizer=nu(e.embeddingsRegularizer),this.activityRegularizer=nu(e.activityRegularizer),this.embeddingsConstraint=aa(e.embeddingsConstraint),this.maskZero=e.maskZero,this.supportsMasking=e.maskZero,this.inputLength=e.inputLength}build(e){this.embeddings=this.addWeight("embeddings",[this.inputDim,this.outputDim],this.dtype,this.embeddingsInitializer,this.embeddingsRegularizer,!0,this.embeddingsConstraint),this.built=!0}warnOnIncompatibleInputShape(e){}computeMask(e,t){return Object(f.vi)(()=>this.maskZero?(e=Io(e),Object(f.Fg)(e,Object(f.Si)(e))):null)}computeOutputShape(e){if(e=Mo(e),null==this.inputLength)return[...e,this.outputDim];const t=ci(this.inputLength);if(t.length!==e.length-1)throw new ti(`"inputLength" is ${this.inputLength}, but received input shape has shape `+e);{let i=0;for(let o=0;o<t.length;++o){var n=t[o],r=e[o+1];if(null!=n&&null!=r&&n!==r)throw new ti(`"inputLength" is ${this.inputLength}, but received input shape has shape `+e);null==n&&(t[i]=r),i++}}return[e[0],...t,this.outputDim]}call(e,t){return Object(f.vi)(()=>{this.invokeCallHook(e,t);let n=Io(e);"int32"!==n.dtype&&(n=Vi(n,"int32"));var r=to(this.embeddings.read(),Object(f.oh)(n,[n.size]));return Object(f.oh)(r,Mo(this.computeOutputShape(n.shape)))})}getConfig(){var e={inputDim:this.inputDim,outputDim:this.outputDim,embeddingsInitializer:Oo(this.embeddingsInitializer),embeddingsRegularizer:eu(this.embeddingsRegularizer),activityRegularizer:eu(this.activityRegularizer),embeddingsConstraint:ia(this.embeddingsConstraint),maskZero:this.maskZero,inputLength:this.inputLength},t=super.getConfig();return Object.assign(e,t),e}}Xu.className="Embedding",f.Dh.registerClass(Xu);
/**
 * @license
 * Copyright 2018 Google LLC
 *
 * Use of this source code is governed by an MIT-style
 * license that can be found in the LICENSE file or at
 * https://opensource.org/licenses/MIT.
 * =============================================================================
 */
class Ju extends $o{constructor(e){super(e||{}),this.supportsMasking=!0}mergeFunction(e){throw new ni}computeElementwiseOpOutputShape(e,t){if(null==e||null==t)return null;if(e.length<t.length)return this.computeElementwiseOpOutputShape(t,e);if(0===t.length)return e;const n=e.slice(0,e.length-t.length);for(let o=0;o<t.length;++o){var r=e[e.length-t.length+o],i=t[o];if(null==r||null==i||r<0||i<0)n.push(null);else if(1===r)n.push(i);else{if(1!==i&&r!==i)throw new ti("Operands could not be broadcast together with shapes "+JSON.stringify(e)+" "+JSON.stringify(t));n.push(r)}}return n}build(e){if((e=Array.isArray(e)&&!Array.isArray(e[0])?[Mo(e)]:e).length<2)throw new ti(`A merge layer should be called on an Array of at least 2 inputs. Got ${e.length} input(s).`);let t=[];for(const n of e)null!=n&&null!==n[0]&&t.push(n[0]);if(1<(t=gi(t)).length)throw new ti(`Can not merge tensors with different batch sizes. Got tensors with shapes: ${JSON.stringify(e)}.`);let n=null==e[0]?null:e[0].slice(1);for(let t=1;t<e.length;++t){var r=null==e[t]?null:e[t].slice(1);n=this.computeElementwiseOpOutputShape(n,r)}var i=e.map(e=>e.length);-1===e.indexOf(null)&&1===gi(i).length?this.reshapeRequired=!1:this.reshapeRequired=!0}call(e,t){return Object(f.vi)(()=>{if(this.reshapeRequired){const c=[],l=e.map(e=>e.rank);if(-1===l.indexOf(null)){var t,n=zi(l);for(t of e){var r=t.rank;for(let e=0;e<n-r;++e)t=qi(t,1);c.push(t)}return this.mergeFunction(c)}{let t=!1;for(const n of e){var i=n.rank;if(null==i){const e=n.shape,r=e[0];var o=e.slice(1).concat([r]),a=f.oh(n,[r].concat(Li(e.slice(1))));a=f.Ai(a,[1,0]);a=f.oh(a,o),c.push(a),t=!0}else 1<i?(o=Hi(1,i).concat([0]),c.push(f.Ai(n,o)),t=!0):c.push(n)}let n=this.mergeFunction(c);var s=n.rank;if(t)if(null==s){const e=n.shape;const t=e[(u=e.length)-1];var u=[t].concat(e.slice(0,e.length-1));n=f.oh(f.Ai(f.oh(n,[-1,t]),[1,0]),u)}else 1<s&&(u=[s-1].concat(Hi(0,s-1)),n=f.Ai(n,u));return n}}return this.mergeFunction(e)})}computeOutputShape(e){let t;t=null==e[0]?null:e[0].slice(1);for(let r=1;r<e.length;++r){var n=null==e[r]?null:e[r].slice(1);t=this.computeElementwiseOpOutputShape(t,n)}let r=[];for(const t of e)null!=t&&null!==t[0]&&r.push(t[0]);return r=gi(r),(1===r.length?r:[null]).concat(t)}computeMask(e,t){return f.vi(()=>{if(null==t)return null;if(!Array.isArray(t))throw new ti("`mask` should be an Array");if(!Array.isArray(e))throw new ti("`inputs` should be an Array");if(t.length!==e.length)throw new ti(`The Array 'inputs' and 'mask' are expected to have the same length, but have different lengths (${e.length} vs ${t.length})`);if(t.every(e=>null==e))return null;let n=(t=t.map(e=>null==e?e:f.mf(e,0)))[0];for(let e=1;e<t.length-1;++e)n=f.dg(n,t[e]);return n})}}class Zu extends Ju{constructor(e){super(e)}mergeFunction(e){return Object(f.vi)(()=>{let t=e[0].clone();for(let n=1;n<e.length;++n)t=f.Pd(t,e[n]);return t})}}Zu.className="Add",f.Dh.registerClass(Zu);class ec extends Ju{constructor(e){super(e)}mergeFunction(e){return Object(f.vi)(()=>{let t=e[0].clone();for(let n=1;n<e.length;++n)t=f.zg(t,e[n]);return t})}}ec.className="Multiply",f.Dh.registerClass(ec);class tc extends Ju{constructor(e){super(e)}mergeFunction(e){return Object(f.vi)(()=>{let t=e[0].clone();for(let n=1;n<e.length;++n)t=f.Pd(t,e[n]);return f.zg(1/e.length,t)})}}tc.className="Average",f.Dh.registerClass(tc);class nc extends Ju{constructor(e){super(e)}mergeFunction(e){return Object(f.vi)(()=>{let t=e[0];for(let n=1;n<e.length;++n)t=f.pg(t,e[n]);return t})}}nc.className="Maximum",f.Dh.registerClass(nc);class rc extends Ju{constructor(e){super(e)}mergeFunction(e){return Object(f.vi)(()=>{let t=e[0];for(let n=1;n<e.length;++n)t=f.ug(t,e[n]);return t})}}rc.className="Minimum",f.Dh.registerClass(rc);class ic extends Ju{constructor(e){super(e),this.DEFAULT_AXIS=-1,this.axis=null==(e=null==e?{}:e).axis?this.DEFAULT_AXIS:e.axis,this.supportsMasking=!0,this.reshapeRequired=!1}build(e){if(!Array.isArray(e)||!Array.isArray(e[0])||1===e.length)throw new ti("A `Concatenate` layer should be called on a list of at least 2 inputs");let t=!0;for(const n of e)if(null!=n){t=!1;break}if(!t){const t=[];for(let n=0;n<e.length;++n){const r=e[n].slice();r.splice(this.axis,1);let i=!1;for(const e of t)if(f.Ji.arraysEqual(e,r)){i=!0;break}i||t.push(r)}if(1<t.length)throw new ti("A `Concatenate` layer requires inputs with matching shapes except for the concat axis. Got input shapes: "+JSON.stringify(e))}}mergeFunction(e){return Object(f.vi)(()=>Yi(e,this.axis))}computeOutputShape(e){if(!Array.isArray(e)||!Array.isArray(e[0]))throw new ti("A `Concatenate` layer should be called on a list of inputs.");const t=e,n=t[0].slice();var r=this.axis<0?n.length+this.axis:this.axis;for(const e of t.slice(1)){if(null==n[r]||null==e[r]){n[r]=null;break}n[r]+=e[r]}return n}computeMask(e,t){if(null==t)return null;if(!Array.isArray(t))throw new ti("`mask` should be an array for Concatenate");if(!Array.isArray(e))throw new ti("`inputs` should be an array for Concatenate");if(t.length!==e.length)throw new ti(`Mismatch in the length of mask (${t.length}) and the legnth of inputs (${e.length})`);return f.vi(()=>{let n=!0;if(t.forEach(e=>{null!=e&&(n=!1)}),n)return null;const r=[];for(let n=0;n<e.length;++n)null==t[n]?r.push(f.re(f.Ig(e[n]),"bool")):t[n].rank<e[n].rank?r.push(f.mf(t[n],-1)):r.push(t[n]);var i=f.we(r,this.axis);return f.Rd(i,-1,!1)})}getConfig(){var e={axis:this.axis},t=super.getConfig();return Object.assign(e,t),e}}function oc(e,t){for(;e<0;)e+=t;return e}ic.className="Concatenate",f.Dh.registerClass(ic);class ac extends Ju{constructor(e){super(e),this.axes=e.axes,this.normalize=null!=e.normalize&&e.normalize,this.supportsMasking=!0,this.reshapeRequired=!1}build(e){f.Ji.assert(Array.isArray(e)&&2===e.length&&Array.isArray(e[0])&&Array.isArray(e[1]),()=>"A `Dot` layer should be called on a list of exactly 2 inputs.");var t=e[0];e=e[1];if(3<t.length||3<e.length)throw new ni("Dot layer does not support tensors of 4D or higher rank yet.");var n=this.interpretAxes(t,e);if(t[n[0]]!==e[n[1]])throw new ti("Dimension incompatibility: "+t[n[0]]+" !== "+e[n[1]])}mergeFunction(e){if(2!==e.length)throw new ti(`A \`Dot\` layer must be called on exactly 2 inputs, but received ${e.length} input(s).`);let t,n=e[0],r=e[1];t=Array.isArray(this.axes)?this.axes.map((t,n)=>oc(t,e[n].shape.length)):[oc(this.axes,n.shape.length),oc(this.axes,r.shape.length)],this.normalize&&(n=Ra(n,t[0]),r=Ra(r,t[1]));{var i=n,o=r,a=t;if(3<i.shape.length||3<o.shape.length)throw new ni("batchDot is not implemented for tensors of 4D or higher rank yet");if(f.Ji.assert(2<=i.shape.length,()=>"batchDot requires the rank of x to be >= 2, but got "+i.shape.length),f.Ji.assert(2<=i.shape.length,()=>"batchDot requires the rank of y to be >= 2, but got "+o.shape.length),"number"==typeof a&&(a=[a,a]),"complex64"===i.dtype||"complex64"===o.dtype)throw new ni("batchDot is not implemented for complex64-type Tensors yet.");const e=i.shape.length,s=o.shape.length,u=a=null==a?[e-1,s-2]:a;return f.vi(()=>{let t,n;if(e>s){t=e-s;const n=[];for(let e=0;e<t;++e)n.push(1);o=f.oh(o,o.shape.concat(n))}else if(s>e){t=s-e;const n=[];for(let e=0;e<t;++e)n.push(1);i=f.oh(i,i.shape.concat(n))}else t=0;var r,a;if(n=2===i.shape.length&&2===o.shape.length?u[0]===u[1]?f.ii(f.zg(i,o),u[0]):f.ii(f.zg(f.Ai(i,[1,0]),o),u[1]):(r=u[0]!==i.shape.length-1,a=u[1]===o.shape.length-1,f.jg(i,o,r,a)),0<t){let r;const i=[];for(let n=r=e>s?e+s-3:e-1;n<r+t;++n)i.push(n);n=f.ci(n,i)}return 1===n.shape.length?f.mf(n,1):n})}}interpretAxes(e,t){return Array.isArray(this.axes)?this.axes:[oc(this.axes,e.length),oc(this.axes,t.length)]}computeOutputShape(e){f.Ji.assert(Array.isArray(e)&&2===e.length&&Array.isArray(e[0])&&Array.isArray(e[1]),()=>"A `Dot` layer should be called on a list of exactly 2 inputs.");const t=e[0].slice(),n=e[1].slice();if(3<t.length||3<n.length)throw new ni("Dot layer does not support tensors of 4D or higher rank yet.");e=this.interpretAxes(t,n),t.splice(e[0],1),n.splice(e[1],1),n.splice(0,1);const r=t.concat(n);return 1===r.length&&r.push(1),r}computeMask(e,t){return null}getConfig(){var e={axes:this.axes,normalize:this.normalize},t=super.getConfig();return Object.assign(e,t),e}}ac.className="Dot",f.Dh.registerClass(ac);
/**
 * @license
 * Copyright 2018 Google LLC
 *
 * Use of this source code is governed by an MIT-style
 * license that can be found in the LICENSE file or at
 * https://opensource.org/licenses/MIT.
 * =============================================================================
 */
class sc extends $o{constructor(e){super(e),this.supportsMasking=!0,this.stddev=e.stddev}computeOutputShape(e){return e}getConfig(){var e=super.getConfig(),t={stddev:this.stddev};return Object.assign(t,e),t}call(e,t){return Object(f.vi)(()=>{this.invokeCallHook(e,t);const n=Io(e);return ao(()=>Object(f.Pd)(Zi(n.shape,0,this.stddev),n),()=>n,t.training||!1)})}}sc.className="GaussianNoise",f.Dh.registerClass(sc);class uc extends $o{constructor(e){super(e),this.supportsMasking=!0,this.rate=e.rate}computeOutputShape(e){return e}getConfig(){var e=super.getConfig(),t={rate:this.rate};return Object.assign(t,e),t}call(e,t){return Object(f.vi)(()=>{this.invokeCallHook(e,t);const n=Io(e);return 0<this.rate&&this.rate<1?ao(()=>{var e=Math.sqrt(this.rate/(1-this.rate));return Object(f.zg)(n,Zi(n.shape,1,e))},()=>n,t.training||!1):n})}}uc.className="GaussianDropout",f.Dh.registerClass(uc);class cc extends $o{constructor(e){super(e),this.supportsMasking=!0,this.rate=e.rate,this.noiseShape=e.noiseShape}_getNoiseShape(e){return this.noiseShape||Io(e).shape}computeOutputShape(e){return e}getConfig(){var e=super.getConfig(),t={rate:this.rate};return Object.assign(t,e),t}call(e,t){return Object(f.vi)(()=>{if(this.rate<1&&0<this.rate){const n=this._getNoiseShape(e);return ao(()=>{var t=Io(e),r=-1.7580993408473766,i=Vi(Object(f.Gf)(Object(f.dh)(n),this.rate),"float32"),o=((1-this.rate)*(1+this.rate*r**2))**-.5,a=-o*r*this.rate;t=Object(f.Pd)(Object(f.zg)(t,i),Object(f.zg)(Object(f.Pd)(i,-1),r));return Object(f.Pd)(Object(f.zg)(t,o),a)},()=>Io(e),t.training||!1)}return e})}}
/**
 * @license
 * Copyright 2018 Google LLC
 *
 * Use of this source code is governed by an MIT-style
 * license that can be found in the LICENSE file or at
 * https://opensource.org/licenses/MIT.
 * =============================================================================
 */function lc(e,t,n,r,i,o=.001){let a;if(2===e.rank)a=f.ge(e,t,n,r,i,o);else if(3===e.rank)a=f.he(e,t,n,r,i,o);else{if(4!==e.rank)throw new ni(`batchNormalization is not implemented for array of rank ${e.rank} yet`);a=f.ie(e,t,n,r,i,o)}return a}cc.className="AlphaDropout",f.Dh.registerClass(cc);class hc extends $o{constructor(e){super(e=null==e?{}:e),this.supportsMasking=!0,this.axis=null==e.axis?-1:e.axis,this.momentum=null==e.momentum?.99:e.momentum,this.epsilon=null==e.epsilon?.001:e.epsilon,this.center=null==e.center||e.center,this.scale=null==e.scale||e.scale,this.betaInitializer=To(e.betaInitializer||"zeros"),this.gammaInitializer=To(e.gammaInitializer||"ones"),this.movingMeanInitializer=To(e.movingMeanInitializer||"zeros"),this.movingVarianceInitializer=To(e.movingVarianceInitializer||"ones"),this.betaConstraint=aa(e.betaConstraint),this.gammaConstraint=aa(e.gammaConstraint),this.betaRegularizer=nu(e.betaRegularizer),this.gammaRegularizer=nu(e.gammaRegularizer)}build(e){e=Mo(e);var t=0<=this.axis?this.axis:this.axis+e.length,n=e[t];if(null==n)throw new ti(`Axis ${t} of input tensor should have a defined dimension but the layer received an input with shape `+JSON.stringify(e)+".");this.inputSpec=[new Po({ndim:e.length,axes:{[t]:n}})],e=[n],this.scale&&(this.gamma=this.addWeight("gamma",e,null,this.gammaInitializer,this.gammaRegularizer,!0,this.gammaConstraint)),this.center&&(this.beta=this.addWeight("beta",e,null,this.betaInitializer,this.betaRegularizer,!0,this.betaConstraint)),this.movingMean=this.addWeight("moving_mean",e,null,this.movingMeanInitializer,null,!1),this.movingVariance=this.addWeight("moving_variance",e,null,this.movingVarianceInitializer,null,!1),this.built=!0}call(e,t){return Object(f.vi)(()=>{var n=null!=t.training&&t.training;const r=Io(e);var i=r.shape,o=i.length;const a=Hi(0,o);var s=0<=this.axis?this.axis:this.axis+o;a.splice(s,1);const u=oi(1,o),c=(u[s]=i[s],a.slice()),l=(c.sort(),!f.Ji.arraysEqual(c,Hi(0,o).slice(0,o-1)));if(n){const[e,t,n]=function(e,t,n,r,i=.001){return f.Ji.arraysEqual(r.slice().sort(),Hi(0,e.rank-1))?([l,h,d,p,m=.001]=[e,t,n,r,i],Object(f.vi)(()=>{var e=(t=f.xg(l,p)).mean,t=t.variance;return[lc(l,e,t,d,h,m),e,t]})):([o,a,s,u,c=.001]=[e,t,n,r,i],Object(f.vi)(()=>{var e=(t=f.xg(o,u)).mean,t=t.variance;const n=[];for(const e of Hi(0,o.rank))-1!==u.indexOf(e)?n.push(1):n.push(o.shape[e]);var r=Object(f.oh)(e,n),i=Object(f.oh)(t,n),l=null==a?null:Object(f.oh)(a,n),h=null==s?null:Object(f.oh)(s,n);return[lc(o,r,i,h,l,c),e,t]}));var o,a,s,u,c,l,h,d,p,m}(r,this.gamma.read(),this.beta.read(),a,this.epsilon),i=(e,t,n)=>{f.vi(()=>{var r=1-n,i=e.read();r=f.zg(f.hi(i,t),r);e.write(f.hi(i,r))})};return i(this.movingMean,t,this.momentum),i(this.movingVariance,n,this.momentum),e}return l?lc(r,i=Object(f.oh)(this.movingMean.read(),u),s=Object(f.oh)(this.movingVariance.read(),u),o=this.center?Object(f.oh)(this.beta.read(),u):null,n=this.scale?Object(f.oh)(this.gamma.read(),u):null,this.epsilon):lc(r,this.movingMean.read(),this.movingVariance.read(),null==this.beta?null:this.beta.read(),null==this.gamma?null:this.gamma.read(),this.epsilon)})}getConfig(){var e={axis:this.axis,momentum:this.momentum,epsilon:this.epsilon,center:this.center,scale:this.scale,betaInitializer:Oo(this.betaInitializer),gammaInitializer:Oo(this.gammaInitializer),movingMeanInitializer:Oo(this.movingMeanInitializer),movingVarianceInitializer:Oo(this.movingVarianceInitializer),betaRegularizer:eu(this.betaRegularizer),gammaRegularizer:eu(this.gammaRegularizer),betaConstraint:ia(this.betaConstraint),gammaConstraint:ia(this.gammaConstraint)},t=super.getConfig();return Object.assign(e,t),e}}hc.className="BatchNormalization",f.Dh.registerClass(hc);class fc extends $o{constructor(e){if(super(e=null==e?{}:e),this.axis=null==e.axis?-1:e.axis,"number"==typeof this.axis){if(!Number.isInteger(this.axis))throw new Error("Expected axis to be an integer, but received "+this.axis)}else{if(!Array.isArray(this.axis))throw new Error("Expected axis to be an integer or an array of integers, but received "+JSON.stringify(this.axis));for(const e of this.axis)if(!Number.isInteger(e))throw new Error("Expected axis to be an array of integers, but received "+JSON.stringify(this.axis))}this.epsilon=null==e.epsilon?.001:e.epsilon,this.center=null==e.center||e.center,this.scale=null==e.scale||e.scale,this.betaInitializer=To(e.betaInitializer||"zeros"),this.gammaInitializer=To(e.gammaInitializer||"ones"),this.betaRegularizer=nu(e.betaRegularizer),this.gammaRegularizer=nu(e.gammaRegularizer),this.supportsMasking=!0}build(e){var t=(e=Mo(e)).length;"number"==typeof this.axis&&(this.axis=[this.axis]);for(let e=0;e<this.axis.length;++e)this.axis[e]<0&&(this.axis[e]+=t);for(const e of this.axis)if(e<0||e>=t)throw new Error("Invalid axis: "+e);if(this.axis.length!==gi(this.axis).length)throw new Error("Found duplicate axes in: "+this.axis);var n=this.axis.map(t=>e[t]);this.scale?this.gamma=this.addWeight("gamma",n,"float32",this.gammaInitializer,this.gammaRegularizer,!0):this.gamma=null,this.center?this.beta=this.addWeight("beta",n,"float32",this.betaInitializer,this.betaRegularizer,!0):this.beta=null,this.built=!0}call(e,t){const n=Io(e),r=n.shape,i=r.length;return Object(f.vi)(()=>{var{mean:e,variance:t}=Object(f.xg)(n,this.axis,!0);const o=oi(1,i);for(const e of this.axis)o[e]=r[e];var a=e=>null!=e&&e.shape.length!==i?f.oh(e,o):e;let s=this.scale?a(this.gamma.read()):null,u=this.center?a(this.beta.read()):null;const c=[],l=[];for(let e=0;e<i;++e)-1!==this.axis.indexOf(e)?(c.push(r[e]),l.push(1)):(c.push(1),l.push(r[e]));return e=f.wi(e,c),t=f.wi(t,c),null!=s&&(s=f.wi(s,l)),null!=u&&(u=f.wi(u,l)),lc(n,e,t,u,s,this.epsilon)})}getConfig(){var e={axis:this.axis,epsilon:this.epsilon,center:this.center,scale:this.scale,betaInitializer:Oo(this.betaInitializer),gammaInitializer:Oo(this.gammaInitializer),betaRegularizer:eu(this.betaRegularizer),gammaRegularizer:eu(this.gammaRegularizer)},t=super.getConfig();return Object.assign(e,t),e}}fc.className="LayerNormalization",f.Dh.registerClass(fc);class dc extends $o{constructor(e){if(super(e=null==e?{}:e),this.dataFormat=null==e.dataFormat?"channelsLast":e.dataFormat,null==e.padding)this.padding=[[1,1],[1,1]];else if("number"==typeof e.padding)this.padding=[[e.padding,e.padding],[e.padding,e.padding]];else{if(e.padding=e.padding,2!==e.padding.length)throw new ti(`ZeroPadding2D expects padding to be a length-2 array, but received a length-${e.padding.length} array.`);let t,n;if("number"==typeof e.padding[0])t=[e.padding[0],e.padding[0]],n=[e.padding[1],e.padding[1]];else{if(e.padding=e.padding,2!==e.padding[0].length)throw new ti(`ZeroPadding2D expects height padding to be a length-2 array, but received a length-${e.padding[0].length} array.`);if(t=e.padding[0],2!==e.padding[1].length)throw new ti(`ZeroPadding2D expects width padding to be a length-2 array, but received a length-${e.padding[1].length} array.`);n=e.padding[1]}this.padding=[t,n]}this.inputSpec=[new Po({ndim:4})]}computeOutputShape(e){let t,n;return e=Mo(e),"channelsFirst"===this.dataFormat?(t=null!=e[2]&&0<=e[2]?e[2]+this.padding[0][0]+this.padding[0][1]:null,n=null!=e[3]&&0<=e[3]?e[3]+this.padding[1][0]+this.padding[1][1]:null,[e[0],e[1],t,n]):(t=null!=e[1]&&0<=e[1]?e[1]+this.padding[0][0]+this.padding[0][1]:null,n=null!=e[2]&&0<=e[2]?e[2]+this.padding[1][0]+this.padding[1][1]:null,[e[0],t,n,e[3]])}call(e,t){return Object(f.vi)(()=>{var t=Io(e),n=this.padding,r=this.dataFormat;return Object(f.vi)(()=>{if(4!==t.rank)throw new ti("temporalPadding expects input tensor to be 4-D, but received a "+t.rank+"-D tensor.");if(2!==(n=null==n?[[1,1],[1,1]]:n).length||2!==n[0].length||2!==n[1].length)throw new ti("spatial2dPadding expects `padding` to be an Array of two Arrays, each of which is an Array of two integers.");if("channelsLast"!==(r=null==r?"channelsLast":r)&&"channelsFirst"!==r)throw new ti(`Unknown data format: ${r}. Supported data formats are 'channelsLast' and 'channelsFirst.`);let e;return e="channelsFirst"===r?[[0,0],[0,0],n[0],n[1]]:[[0,0],n[0],n[1],[0,0]],f.Lg(t,e)})})}getConfig(){var e={padding:this.padding,dataFormat:this.dataFormat},t=super.getConfig();return Object.assign(e,t),e
/**
 * @license
 * Copyright 2018 Google LLC
 *
 * Use of this source code is governed by an MIT-style
 * license that can be found in the LICENSE file or at
 * https://opensource.org/licenses/MIT.
 * =============================================================================
 */}}function pc(e,t,n,r,i,o){return Object(f.vi)(()=>{let a;Di(i),Ii(o),Bi(r),null==n&&(n=[1,1]),null==r&&(r="valid"),null==i&&(i="channelsLast"),null==o&&(o="max"),e=fu(e,i);var s="same"===r?"same":"valid";return a="max"===o?f.mg(e,t,n,s):f.ae(e,t,n,s),"channelsFirst"===i?f.Ai(a,[0,3,1,2]):a})}function mc(e,t,n,r,i,o){return Object(f.vi)(()=>{let a;Di(i),Ii(o),Bi(r),null==n&&(n=[1,1,1]),null==r&&(r="valid"),null==i&&(i="channelsLast"),null==o&&(o="max"),e=du(e,i);var s="same"===r?"same":"valid";return a="max"===o?f.ng(e,t,n,s):f.be(e,t,n,s),"channelsFirst"===i?f.Ai(a,[0,4,1,2,3]):a})}dc.className="ZeroPadding2D",f.Dh.registerClass(dc);class gc extends $o{constructor(e){if(null==e.poolSize&&(e.poolSize=2),super(e),"number"==typeof e.poolSize)this.poolSize=[e.poolSize];else{if(!Array.isArray(e.poolSize)||1!==e.poolSize.length||"number"!=typeof e.poolSize[0])throw new ti("poolSize for 1D convolutional layer must be a number or an Array of a single number, but received "+JSON.stringify(e.poolSize));this.poolSize=e.poolSize}if(bi(this.poolSize,"poolSize"),null==e.strides)this.strides=this.poolSize;else if("number"==typeof e.strides)this.strides=[e.strides];else{if(!Array.isArray(e.strides)||1!==e.strides.length||"number"!=typeof e.strides[0])throw new ti("strides for 1D convolutional layer must be a number or an Array of a single number, but received "+JSON.stringify(e.strides));this.strides=e.strides}bi(this.strides,"strides"),this.padding=null==e.padding?"valid":e.padding,Bi(this.padding),this.inputSpec=[new Po({ndim:3})]}computeOutputShape(e){var t=lu((e=Mo(e))[1],this.poolSize[0],this.padding,this.strides[0]);return[e[0],t,e[2]]}call(e,t){return Object(f.vi)(()=>{this.invokeCallHook(e,t),e=qi(Io(e),2);var n=this.poolingFunction(Io(e),[this.poolSize[0],1],[this.strides[0],1],this.padding,"channelsLast");return f.ci(n,[2])})}getConfig(){var e={poolSize:this.poolSize,padding:this.padding,strides:this.strides},t=super.getConfig();return Object.assign(e,t),e}}class Ac extends gc{constructor(e){super(e)}poolingFunction(e,t,n,r,i){return Di(i),Bi(r),pc(e,t,n,r,i,"max")}}Ac.className="MaxPooling1D",f.Dh.registerClass(Ac);class vc extends gc{constructor(e){super(e)}poolingFunction(e,t,n,r,i){return Di(i),Bi(r),pc(e,t,n,r,i,"avg")}}vc.className="AveragePooling1D",f.Dh.registerClass(vc);class bc extends $o{constructor(e){if(null==e.poolSize&&(e.poolSize=[2,2]),super(e),this.poolSize=Array.isArray(e.poolSize)?e.poolSize:[e.poolSize,e.poolSize],null==e.strides)this.strides=this.poolSize;else if(Array.isArray(e.strides)){if(2!==e.strides.length)throw new ti("If the strides property of a 2D pooling layer is an Array, it is expected to have a length of 2, but received length "+e.strides.length+".");this.strides=e.strides}else this.strides=[e.strides,e.strides];bi(this.poolSize,"poolSize"),bi(this.strides,"strides"),this.padding=null==e.padding?"valid":e.padding,this.dataFormat=null==e.dataFormat?"channelsLast":e.dataFormat,Di(this.dataFormat),Bi(this.padding),this.inputSpec=[new Po({ndim:4})]}computeOutputShape(e){e=Mo(e);var t="channelsFirst"===this.dataFormat?e[2]:e[1],n="channelsFirst"===this.dataFormat?e[3]:e[2];t=lu(t,this.poolSize[0],this.padding,this.strides[0]),n=lu(n,this.poolSize[1],this.padding,this.strides[1]);return"channelsFirst"===this.dataFormat?[e[0],e[1],t,n]:[e[0],t,n,e[3]]}call(e,t){return Object(f.vi)(()=>(this.invokeCallHook(e,t),this.poolingFunction(Io(e),this.poolSize,this.strides,this.padding,this.dataFormat)))}getConfig(){var e={poolSize:this.poolSize,padding:this.padding,strides:this.strides,dataFormat:this.dataFormat},t=super.getConfig();return Object.assign(e,t),e}}class yc extends bc{constructor(e){super(e)}poolingFunction(e,t,n,r,i){return Di(i),Bi(r),pc(e,t,n,r,i,"max")}}yc.className="MaxPooling2D",f.Dh.registerClass(yc);class wc extends bc{constructor(e){super(e)}poolingFunction(e,t,n,r,i){return Di(i),Bi(r),pc(e,t,n,r,i,"avg")}}wc.className="AveragePooling2D",f.Dh.registerClass(wc);class xc extends $o{constructor(e){if(null==e.poolSize&&(e.poolSize=[2,2,2]),super(e),this.poolSize=Array.isArray(e.poolSize)?e.poolSize:[e.poolSize,e.poolSize,e.poolSize],null==e.strides)this.strides=this.poolSize;else if(Array.isArray(e.strides)){if(3!==e.strides.length)throw new ti("If the strides property of a 3D pooling layer is an Array, it is expected to have a length of 3, but received length "+e.strides.length+".");this.strides=e.strides}else this.strides=[e.strides,e.strides,e.strides];bi(this.poolSize,"poolSize"),bi(this.strides,"strides"),this.padding=null==e.padding?"valid":e.padding,this.dataFormat=null==e.dataFormat?"channelsLast":e.dataFormat,Di(this.dataFormat),Bi(this.padding),this.inputSpec=[new Po({ndim:5})]}computeOutputShape(e){e=Mo(e);var t="channelsFirst"===this.dataFormat?e[2]:e[1],n="channelsFirst"===this.dataFormat?e[3]:e[2],r="channelsFirst"===this.dataFormat?e[4]:e[3];t=lu(t,this.poolSize[0],this.padding,this.strides[0]),n=lu(n,this.poolSize[1],this.padding,this.strides[1]),r=lu(r,this.poolSize[2],this.padding,this.strides[2]);return"channelsFirst"===this.dataFormat?[e[0],e[1],t,n,r]:[e[0],t,n,r,e[4]]}call(e,t){return Object(f.vi)(()=>(this.invokeCallHook(e,t),this.poolingFunction(Io(e),this.poolSize,this.strides,this.padding,this.dataFormat)))}getConfig(){var e={poolSize:this.poolSize,padding:this.padding,strides:this.strides,dataFormat:this.dataFormat},t=super.getConfig();return Object.assign(e,t),e}}class Cc extends xc{constructor(e){super(e)}poolingFunction(e,t,n,r,i){return Di(i),Bi(r),mc(e,t,n,r,i,"max")}}Cc.className="MaxPooling3D",f.Dh.registerClass(Cc);class kc extends xc{constructor(e){super(e)}poolingFunction(e,t,n,r,i){return Di(i),Bi(r),mc(e,t,n,r,i,"avg")}}kc.className="AveragePooling3D",f.Dh.registerClass(kc);class Ec extends $o{constructor(e){super(e),this.inputSpec=[new Po({ndim:3})]}computeOutputShape(e){return[e[0],e[2]]}call(e,t){throw new ni}}class Sc extends Ec{constructor(e){super(e||{})}call(e,t){return Object(f.vi)(()=>{var t=Io(e);return f.qg(t,1)})}}Sc.className="GlobalAveragePooling1D",f.Dh.registerClass(Sc);class _c extends Ec{constructor(e){super(e||{})}call(e,t){return Object(f.vi)(()=>{var t=Io(e);return f.lg(t,1)})}}_c.className="GlobalMaxPooling1D",f.Dh.registerClass(_c);class Oc extends $o{constructor(e){super(e),this.dataFormat=null==e.dataFormat?"channelsLast":e.dataFormat,Di(this.dataFormat),this.inputSpec=[new Po({ndim:4})]}computeOutputShape(e){return"channelsLast"===this.dataFormat?[e[0],e[3]]:[e[0],e[1]]}call(e,t){throw new ni}getConfig(){var e={dataFormat:this.dataFormat},t=super.getConfig();return Object.assign(e,t),e}}class Tc extends Oc{call(e,t){return Object(f.vi)(()=>{var t=Io(e);return"channelsLast"===this.dataFormat?f.qg(t,[1,2]):f.qg(t,[2,3])})}}Tc.className="GlobalAveragePooling2D",f.Dh.registerClass(Tc);class Dc extends Oc{call(e,t){return Object(f.vi)(()=>{var t=Io(e);return"channelsLast"===this.dataFormat?f.lg(t,[1,2]):f.lg(t,[2,3])})}}Dc.className="GlobalMaxPooling2D",f.Dh.registerClass(Dc);
/**
 * @license
 * Copyright 2018 Google LLC
 *
 * Use of this source code is governed by an MIT-style
 * license that can be found in the LICENSE file or at
 * https://opensource.org/licenses/MIT.
 * =============================================================================
 */
class Bc extends $o{constructor(e){super(e),this.layer=e.layer}build(e){this.built=!0}get trainable(){return null!=this.layer&&this.layer.trainable}set trainable(e){null!=this.layer&&(this.layer.trainable=e)}get trainableWeights(){return this.layer.trainableWeights}get nonTrainableWeights(){return this.layer.nonTrainableWeights}get updates(){return this.layer._updates}get losses(){return this.layer.losses}getWeights(){return this.layer.getWeights()}setWeights(e){this.layer.setWeights(e)}getConfig(){var e={layer:{className:this.layer.getClassName(),config:this.layer.getConfig()}},t=super.getConfig();return Object.assign(e,t),e}setFastWeightInitDuringBuild(e){super.setFastWeightInitDuringBuild(e),null!=this.layer&&this.layer.setFastWeightInitDuringBuild(e)}static fromConfig(e,t,n={}){return n=Fa(t.layer,n),delete t.layer,n={layer:n},Object.assign(n,t),new e(n)}}class Ic extends Bc{constructor(e){super(e),this.supportsMasking=!0}build(e){if((e=Mo(e)).length<3)throw new ti("TimeDistributed layer expects an input shape >= 3D, but received input shape "+JSON.stringify(e));this.inputSpec=[{shape:e}];var t=[e[0]].concat(e.slice(2));this.layer.built||(this.layer.build(t),this.layer.built=!0),super.build(e)}computeOutputShape(e){var t=[(e=Mo(e))[0]].concat(e.slice(2));const n=this.layer.computeOutputShape(t),r=e[1];return[n[0],r].concat(n.slice(1))}call(e,t){return Object(f.vi)(()=>Ou((e,n)=>[Io(this.layer.call(e,t)),[]],e=Io(e),[],!1,null,null,0,!0)[1])}}Ic.className="TimeDistributed",f.Dh.registerClass(Ic);class Mc extends Bc{constructor(e){super(e);const t=e.layer.getConfig(),n={},r=(n.className=e.layer.getClassName(),n.config=t,this.forwardLayer=Fa(n),t.goBackwards=!0!==t.goBackwards,{});var i;if(r.className=e.layer.getClassName(),r.config=t,this.backwardLayer=Fa(r),this.forwardLayer.name="forward_"+this.forwardLayer.name,this.backwardLayer.name="backward_"+this.backwardLayer.name,this.mergeMode=void 0===e.mergeMode?"concat":e.mergeMode,i=this.mergeMode,Ai(Oi,"BidirectionalMergeMode",i),e.weights)throw new ni("weights support is not implemented for Bidirectional layer yet.");this._stateful=e.layer.stateful,this.returnSequences=e.layer.returnSequences,this.returnState=e.layer.returnState,this.supportsMasking=!0,this._trainable=!0,this.inputSpec=e.layer.inputSpec,this.numConstants=null}get trainable(){return this._trainable}set trainable(e){this._trainable=e,null!=this.forwardLayer&&(this.forwardLayer.trainable=e),null!=this.backwardLayer&&(this.backwardLayer.trainable=e)}getWeights(){return this.forwardLayer.getWeights().concat(this.backwardLayer.getWeights())}setWeights(e){var t=e.length;t=Math.floor(t/2);this.forwardLayer.setWeights(e.slice(0,t)),this.backwardLayer.setWeights(e.slice(t))}computeOutputShape(e){let t,n,r,i=this.forwardLayer.computeOutputShape(e);return i=i=Array.isArray(i)&&Array.isArray(i[0])?i:[i],this.returnState&&(r=i.slice(1)),t=t=i[0],n="concat"===this.mergeMode?(t[t.length-1]*=2,[t]):null==this.mergeMode?[t,t.slice()]:[t],this.returnState?(null==this.mergeMode?n:[t]).concat(r).concat(r.slice()):ui(n)}apply(e,t){let n=null==t?null:t.initialState;var r=null==t?null:t.constants,i=(null==t&&(t={}),_u(e,n,r,this.numConstants));if(e=i.inputs,n=i.initialState,r=i.constants,Array.isArray(e)&&(n=e.slice(1),e=e[0]),(null==n||0===n.length)&&null==r)return super.apply(e,t);const o=[],a=[];if(null!=n){if(0<(i=n.length)%2)throw new ti("When passing `initialState` to a Bidrectional RNN, the state should be an Array containing the states of the underlying RNNs.");t.initialState=n,o.push(...n);const e=n.map(e=>new Po({shape:e.shape}));this.forwardLayer.stateSpec=e.slice(0,i/2),this.backwardLayer.stateSpec=e.slice(i/2),a.push(...e)}if(null!=r)throw new ni("Support for constants in Bidirectional layers is not implemented yet.");var s,u=o[0]instanceof Lo;for(const e of o)if(e instanceof Lo!=u)throw new ti("The initial state of a Bidirectional layer cannot be specified as a mix of symbolic and non-symbolic tensors");return u?(i=[e].concat(o),r=this.inputSpec.concat(a),s=this.inputSpec,this.inputSpec=r,r=super.apply(i,t),this.inputSpec=s,r):super.apply(e,t)}call(e,t){return Object(f.vi)(()=>{const n=t.initialState;let r,i;var o,a;let s,u;return i=null==n?(r=this.forwardLayer.call(e,t),this.backwardLayer.call(e,t)):(o=n.slice(0,n.length/2),a=n.slice(n.length/2),r=this.forwardLayer.call(e,Object.assign(t,{initialState:o})),this.backwardLayer.call(e,Object.assign(t,{initialState:a}))),this.returnState&&(Array.isArray(r)&&(s=r.slice(1).concat(i.slice(1))),r=r[0],i=i[0]),this.returnSequences&&(i=f.ph(i,1)),"concat"===this.mergeMode?u=Yi([r,i]):"sum"===this.mergeMode?u=f.Pd(r,i):"ave"===this.mergeMode?u=f.zg(.5,f.Pd(r,i)):"mul"===this.mergeMode?u=f.zg(r,i):null==this.mergeMode&&(u=[r,i]),this.returnState?(null==this.mergeMode?u:[u]).concat(s):u})}resetStates(e){this.forwardLayer.resetStates(),this.backwardLayer.resetStates()}build(e){ji(this.forwardLayer.name,()=>{this.forwardLayer.build(e)}),ji(this.backwardLayer.name,()=>{this.backwardLayer.build(e)}),this.built=!0}computeMask(e,t){let n;if(Array.isArray(t)&&(t=t[0]),n=this.returnSequences?null==this.mergeMode?[t,t]:t:null==this.mergeMode?[null,null]:null,this.returnState){return t=this.forwardLayer.states.map(e=>null),(Array.isArray(n)?n:[n]).concat(t).concat(t)}return n}get trainableWeights(){return this.forwardLayer.trainableWeights.concat(this.backwardLayer.trainableWeights)}get nonTrainableWeights(){return this.forwardLayer.nonTrainableWeights.concat(this.backwardLayer.nonTrainableWeights)}setFastWeightInitDuringBuild(e){super.setFastWeightInitDuringBuild(e),null!=this.forwardLayer&&this.forwardLayer.setFastWeightInitDuringBuild(e),null!=this.backwardLayer&&this.backwardLayer.setFastWeightInitDuringBuild(e)}getConfig(){var e={mergeMode:this.mergeMode},t=super.getConfig();return Object.assign(e,t),e}static fromConfig(e,t){var n=Fa(t.layer);if(delete t.layer,null!=t.numConstants)throw new ni("Deserialization of a Bidirectional layer with numConstants present is not supported yet.");const r=t;return r.layer=n,new e(r)}}Mc.className="Bidirectional",f.Dh.registerClass(Mc);
/**
 * @license
 * Copyright 2022 CodeSmith LLC
 *
 * Use of this source code is governed by an MIT-style
 * license that can be found in the LICENSE file or at
 * https://opensource.org/licenses/MIT.
 * =============================================================================
 */
class jc extends $o{constructor(e){super(e),this.scale=e.scale,e.offset?this.offset=e.offset:this.offset=0}getConfig(){var e={scale:this.scale,offset:this.offset},t=super.getConfig();return Object.assign(e,t),e}call(e,t){return Object(f.vi)(()=>("float32"!==(e=Io(e)).dtype&&(e=Vi(e,"float32")),Object(f.Pd)(Object(f.zg)(e,this.scale),this.offset)))}}jc.className="Rescaling",f.Dh.registerClass(jc);
/**
 * @license
 * Copyright 2022 CodeSmith LLC
 *
 * Use of this source code is governed by an MIT-style
 * license that can be found in the LICENSE file or at
 * https://opensource.org/licenses/MIT.
 * =============================================================================
 */
const{resizeBilinear:Nc,cropAndResize:Fc}=f.Jf;class Rc extends $o{constructor(e){super(e),this.height=e.height,this.width=e.width}centerCrop(e,t,n,r,i,o,a,s){return Object(f.vi)(()=>{let u,c=!1;var l=[t/o,n/a,(r+t)/o,(i+n)/a];const h=[];u=3===e.rank?(c=!0,Object(f.di)([e])):e;for(let e=0;e<u.shape[0];e++)h.push(l);var d=Object(f.mi)(h,[h.length,4]),p=Object(f.eh)(0,h.length,1,"int32");d=Fc(u,d,p,[r,i],"nearest");return Vi(c?Io(Object(f.Gi)(d)):d,s)})}upsize(e,t,n,r){return Object(f.vi)(()=>Vi(Nc(e,[t,n]),r))}call(e,t){return Object(f.vi)(()=>{var t=Io(e),n=t.dtype,r=(i=t.shape)[i.length-3],i=i[i.length-2];let o=0,a=(r!==this.height&&(o=Math.floor((r-this.height)/2)),0);return i!==this.width&&0===(a=Math.floor((i-this.width)/2))&&(a=1),0<=o&&0<=a?this.centerCrop(t,o,a,this.height,this.width,r,i,n):this.upsize(e,this.height,this.width,n)})}getConfig(){var e={height:this.height,width:this.width},t=super.getConfig();return Object.assign(e,t),e}computeOutputShape(e){var t=(e=Mo(e)).length-3,n=e.length-2;return e[t]=this.height,e[n]=this.width,e}}Rc.className="CenterCrop",f.Dh.registerClass(Rc);
/**
 * @license
 * Copyright 2022 CodeSmith LLC
 *
 * Use of this source code is governed by an MIT-style
 * license that can be found in the LICENSE file or at
 * https://opensource.org/licenses/MIT.
 * =============================================================================
 */
class Pc extends $o{constructor(e){super(e),this.numTokens=e.numTokens,e.outputMode?this.outputMode=e.outputMode:this.outputMode="multiHot"}getConfig(){var e={numTokens:this.numTokens,outputMode:this.outputMode},t=super.getConfig();return Object.assign(e,t),e}computeOutputShape(e){return null==(e=Mo(e))?[this.numTokens]:("oneHot"===this.outputMode&&1!==e[e.length-1]?e.push(this.numTokens):e[e.length-1]=this.numTokens,e)}call(e,t){return Object(f.vi)(()=>{let n;if("int32"!==(e=Io(e)).dtype&&(e=Vi(e,"int32")),void 0!==t.countWeights){if("count"!==this.outputMode)throw new ti("countWeights is not used when outputMode !== count.\n              Received countWeights="+t.countWeights);n=Io(t.countWeights)}var r=Object(f.lg)(e),i=Object(f.tg)(e);r=Object(f.Ff)(this.numTokens,r).bufferSync().get(0),i=Object(f.Gf)(i,0).bufferSync().get(0);if(r&&i){r=e,i=this.outputMode;var o=this.numTokens,a=n;let t=Io(r);if("int32"!==t.dtype&&(t=Vi(t,"int32")),"int"===i)return t;if(r=t.shape,0===t.rank&&(t=Object(f.mf)(t,-1)),2<(t="oneHot"===i&&1!==t.shape[t.shape.length-1]?Object(f.mf)(t,-1):t).rank)throw new ti(`When outputMode is not int, maximum output rank is 2 Received outputMode ${i} and input shape `+r+` which would result in output rank ${t.rank}.`);r=["multiHot","oneHot"].includes(i);var s=t;let u;if(u=void 0!==a&&"count"===i?Object(f.Ne)(s,a,o,r):Object(f.Ne)(s,[],o,r),"tfIdf"!==i)return u;if(a)return Object(f.zg)(u,a);throw new ti("When outputMode is 'tfIdf', weights must be provided.")}throw new ti("Input values must be between 0 < values <= numTokens with numTokens="+this.numTokens)})}}Pc.className="CategoryEncoding",f.Dh.registerClass(Pc);const Lc=new Set(["bilinear","nearest"]);class Uc extends $o{constructor(e){if(super(e),this.height=e.height,this.width=e.width,e.interpolation){if(!Lc.has(e.interpolation))throw new ti(`Invalid interpolation parameter: ${e.interpolation} is not implemented`);this.interpolation=e.interpolation}else this.interpolation="bilinear";this.cropToAspectRatio=Boolean(e.cropToAspectRatio)}computeOutputShape(e){return e=(e=Mo(e))[2],[this.height,this.width,e]}getConfig(){var e={height:this.height,width:this.width,interpolation:this.interpolation,cropToAspectRatio:this.cropToAspectRatio},t=super.getConfig();return Object.assign(e,t),e}call(e,t){return Object(f.vi)(()=>{var t=[this.height,this.width];if("bilinear"===this.interpolation)return f.Jf.resizeBilinear(e,t,!this.cropToAspectRatio);if("nearest"===this.interpolation)return f.Jf.resizeNearestNeighbor(e,t,!this.cropToAspectRatio);throw new Error(`Interpolation is ${this.interpolation} but only ${[...Lc]} are supported`)})}}
/**
 * @license
 * Copyright 2018 Google LLC
 *
 * Use of this source code is governed by an MIT-style
 * license that can be found in the LICENSE file or at
 * https://opensource.org/licenses/MIT.
 * =============================================================================
 */function zc(e){return new Qo(e)}function Hc(e){return new au(e)}function $c(e){return new ru(e)}function Qc(e){return new iu(e)}function Vc(e){return new ou(e)}function qc(e){return new uu(e)}function Gc(e){return new su(e)}function Wc(e){return new Cu(e)}function Kc(e){return new Au(e)}function Yc(e){return new bu(e)}function Xc(e){return new vu(e)}function Jc(e){return new yu(e)}function Zc(e){return new xu(e)}function el(e){return new ku(e)}function tl(e){return new Eu(e)}function nl(e){return new Su(e)}function rl(e){return new qu(e)}function il(e){return new Qu(e)}function ol(e){return new Hu(e)}function al(e){return new $u(e)}function sl(e){return new Vu(e)}function ul(e){return new Gu(e)}function cl(e){return new Wu(e)}function ll(e){return new Ku(e)}function hl(e){return new Xu(e)}function fl(e){return new Zu(e)}function dl(e){return new tc(e)}function pl(e){return new ic(e)}function ml(e){return new nc(e)}function gl(e){return new rc(e)}function Al(e){return new ec(e)}function vl(e){return new ac(e)}function bl(e){return new hc(e)}function yl(e){return new fc(e)}function wl(e){return new dc(e)}function xl(e){return new vc(e)}function Cl(e){return xl(e)}function kl(e){return xl(e)}function El(e){return new wc(e)}function Sl(e){return El(e)}function _l(e){return El(e)}function Ol(e){return new kc(e)}function Tl(e){return Ol(e)}function Dl(e){return Ol(e)}function Bl(e){return new Sc(e)}function Il(e){return new Tc(e)}function Ml(e){return new _c(e)}function jl(e){return new Dc(e)}function Nl(e){return new Ac(e)}function Fl(e){return new yc(e)}function Rl(e){return new Cc(e)}function Pl(e){return new ju(e)}function Ll(e){return new Mu(e)}function Ul(e){return new Fu(e)}function zl(e){return new Nu(e)}function Hl(e){return new Iu(e)}function $l(e){return new Bu(e)}function Ql(e){return new zu(e)}function Vl(e){return new Uu(e)}function ql(e){return new Tu(e)}function Gl(e){return new Ru(e)}function Wl(e){return new Mc(e)}function Kl(e){return new Ic(e)}Uc.className="Resizing",f.Dh.registerClass(Uc);const Yl=Ml,Xl=jl,Jl=Nl,Zl=Fl;function eh(e){return new sc(e)}function th(e){return new uc(e)}function nh(e){return new cc(e)}function rh(e){return new Yu(e)}function ih(e){return new jc(e)}function oh(e){return new Rc(e)}function ah(e){return new Uc(e)}function sh(e){return new Pc(e)}function uh(e,t){return Ga(e,t)}function ch(e,t){return Xa(e,t)}function lh(e,t){return Ja(e,t)}function hh(e,t){return Wa(e,t)}function fh(e,t){return Za(e,t)}function dh(e,t){return Ya(e,t)}function ph(e,t){return function(e,t){return Object(f.vi)(()=>{var n,r,i=Ka(e,t),o=(n=e,r=t,Object(f.vi)(()=>f.re(f.ii(f.dg(f.if(n,1),f.if(r,0))),"float32")));o=f.Pd(i,o);return f.re(f.Pi(f.Ff(o,0),f.Xe(i,o),0),"float32")})}(e,t)}function mh(e,t){return Qa(e,t)}function gh(e,t){return La(e,t)}function Ah(e,t){return Ua(e,t)}function vh(e,t){return Ua(e,t)}function bh(e,t){return Ua(e,t)}function yh(e,t){return Pa(e,t)}function wh(e,t){return Pa(e,t)}function xh(e,t){return Pa(e,t)}
/**
 * @license
 * Copyright 2018 Google LLC
 *
 * Use of this source code is governed by an MIT-style
 * license that can be found in the LICENSE file or at
 * https://opensource.org/licenses/MIT.
 * =============================================================================
 */
/**
 * @license
 * Copyright 2018 Google LLC
 *
 * Use of this source code is governed by an MIT-style
 * license that can be found in the LICENSE file or at
 * https://opensource.org/licenses/MIT.
 * =============================================================================
 */function Ch(e){return new Js(e)}function kh(e){return Ys(e=e),new Js({l1:null!=e?e.l1:null,l2:0})}function Eh(e){return Ys(e=e),new Js({l2:null!=e?e.l2:null,l1:0})}
/**
 * @license
 * Copyright 2018 Google LLC
 *
 * Use of this source code is governed by an MIT-style
 * license that can be found in the LICENSE file or at
 * https://opensource.org/licenses/MIT.
 * =============================================================================
 */class Sh extends Oa{constructor(){super(...arguments),this.model=null}setModel(e){if(!(e instanceof Cs))throw new Error("model must be a LayersModel, not some other Container");this.model=e}}function _h(e,t){return e<t}function Oh(e,t){return t<e}class Th extends Sh{constructor(e){if(super(),(e=null==e?{}:e).restoreBestWeights)throw new ni("restoreBestWeights = True is not implemented in EarlyStopping yet.");this.monitor=e.monitor||"val_loss",this.minDelta=Math.abs(e.minDelta||0),this.patience=e.patience||0,this.verbose=e.verbose||0,this.mode=e.mode||"auto",this.baseline=e.baseline,-1===["auto","min","max"].indexOf(this.mode)&&(this.mode="auto"),"min"===this.mode||"max"!==this.mode&&-1===this.monitor.indexOf("acc")?this.monitorFunc=_h:this.monitorFunc=Oh,this.monitorFunc===_h&&(this.minDelta*=-1)}async onTrainBegin(e){this.wait=0,this.stoppedEpoch=0,null!=this.baseline?this.best=this.baseline:this.best=this.monitorFunc===_h?1/0:-1/0}async onEpochEnd(e,t){await Sa(t),null!=(t=this.getMonitorValue(t))&&(this.monitorFunc(t-this.minDelta,this.best)?(this.best=t,this.wait=0):(this.wait++,this.wait>=this.patience&&(this.stoppedEpoch=e,this.model.stopTraining=!0)))}async onTrainEnd(e){0<this.stoppedEpoch&&this.verbose}getMonitorValue(e){return e=(e=null==e?{}:e)[this.monitor]}}const Dh={earlyStopping:function(e){return new Th(e)}};
/**
 * @license
 * Copyright 2018 Google LLC
 *
 * Use of this source code is governed by an MIT-style
 * license that can be found in the LICENSE file or at
 * https://opensource.org/licenses/MIT.
 * =============================================================================
 */
/**
 * @license
 * Copyright 2021 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */Object(f.hf)().registerFlag("KEEP_INTERMEDIATE_TENSORS",()=>!1,e=>{});var Bh=n(66),Ih=n(2);
/**
 * @license
 * Copyright 2019 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */class Mh{constructor(e,t,n){this.node=e,this.tensorMap=t,this.context=n,this.inputs=[],this.attrs={},this.inputs=e.inputNames.map(e=>this.getInput(e)),null!=e.rawAttrs&&(this.attrs=Object.keys(e.rawAttrs).reduce((e,t)=>(e[t]=this.getAttr(t),e),{}))}getInput(e){return Object(Ih.e)(e,this.tensorMap,this.context)}getAttr(e,t){var n=this.node.rawAttrs[e];if(null!=n.tensor)return Object(Ih.e)(e,this.tensorMap,this.context);if(null!=n.i||null!=n.f)return Object(Bh.f)(this.node.rawAttrs,e,t);if(null!=n.s)return Object(Bh.i)(this.node.rawAttrs,e,t);if(null!=n.b)return Object(Bh.c)(this.node.rawAttrs,e,t);if(null!=n.shape)return Object(Bh.k)(this.node.rawAttrs,e,t);if(null!=n.type)return Object(Bh.e)(this.node.rawAttrs,e,t);if(null!=n.list){if(null!=n.list.i||null!=n.list.f)return Object(Bh.g)(this.node.rawAttrs,e,t);if(null!=n.list.s)return Object(Bh.h)(this.node.rawAttrs,e,t);if(null!=n.list.shape)return Object(Bh.j)(this.node.rawAttrs,e,t);if(null!=n.list.b)return Object(Bh.b)(this.node.rawAttrs,e,t);if(null!=n.list.type)return Object(Bh.d)(this.node.rawAttrs,e,t)}return t}}var jh=n(119),Nh=n(25);
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function Fh(e,t,n=""){if("number"!=typeof e&&"number"!=typeof t){f.Ji.assert(e.length===t.length,()=>n+` Shapes ${e} and ${t} must match`);for(let o=0;o<e.length;o++){var r=e[o],i=t[o];f.Ji.assert(r<0||i<0||r===i,()=>n+` Shapes ${e} and ${t} must match`)}}}function Rh(e){return"number"!=typeof e&&!e.some(e=>e<0)}function Ph(e,t,n){let r=Lh(e,n);if((e=!Rh(r))&&0===t.length)throw new Error("Tried to calculate elements of an empty list with non-fully-defined elementShape: "+r);if(e&&t.forEach(e=>{r=Lh(e.shape,r)}),Rh(r))return r;throw new Error("Non-fully-defined elementShape: "+r)}function Lh(e,t){if("number"==typeof e)return t;if("number"==typeof t)return e;if(e.length!==t.length)throw new Error(`Incompatible ranks during merge: ${e} vs. `+t);const n=[];for(let o=0;o<e.length;++o){var r=e[o],i=t[o];if(0<=r&&0<=i&&r!==i)throw new Error(`Incompatible shape during merge: ${e} vs. `+t);n[o]=0<=r?r:i}return n}
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */class Uh{constructor(e,t,n,r,i,o,a){this.name=e,this.dtype=t,this.maxSize=n,this.elementShape=r,this.identicalElementShapes=i,this.dynamicSize=o,this.clearAfterRead=a,this.tensors=[],this.closed_=!1,this.idTensor=Object(f.xh)(0),Object(f.Qf)(this.idTensor)}get id(){return this.idTensor.id}get closed(){return this.closed_}clearAndClose(e){this.tensors.forEach(t=>{null!=e&&e.has(t.tensor.id)||t.tensor.dispose()}),this.tensors=[],this.closed_=!0,this.idTensor.dispose()}size(){return this.tensors.length}read(e){if(this.closed_)throw new Error(`TensorArray ${this.name} has already been closed.`);if(e<0||e>=this.size())throw new Error(`Tried to read from index ${e}, but array size is: `+this.size());const t=this.tensors[e];if(t.cleared)throw new Error(`TensorArray ${this.name}: Could not read index ${e} twice because it was cleared after a previous read (perhaps try setting clear_after_read = false?).`);return this.clearAfterRead&&(t.cleared=!0),t.read=!0,t.tensor}readMany(e){return e.map(e=>this.read(e))}write(e,t){if(this.closed_)throw new Error(`TensorArray ${this.name} has already been closed.`);if(e<0||!this.dynamicSize&&e>=this.maxSize)throw new Error(`Tried to write to index ${e}, but array is not resizeable and size is: `+this.maxSize);const n=this.tensors[e]||{};if(t.dtype!==this.dtype)throw new Error(`TensorArray ${this.name}: Could not write to TensorArray index ${e},\n          because the value dtype is ${t.dtype}, but TensorArray dtype is ${this.dtype}.`);if(0!==this.size()||null!=this.elementShape&&0!==this.elementShape.length||(this.elementShape=t.shape),Fh(this.elementShape,t.shape,`TensorArray ${this.name}: Could not write to TensorArray index ${e}.`),n.read)throw new Error(`TensorArray ${this.name}: Could not write to TensorArray index ${e}, because it has already been read.`);if(n.written)throw new Error(`TensorArray ${this.name}: Could not write to TensorArray index ${e}, because it has already been written.`);n.tensor=t,Object(f.Qf)(t),n.written=!0,this.tensors[e]=n}writeMany(e,t){if(e.length!==t.length)throw new Error(`TensorArray ${this.name}: could not write multiple tensors,because the index size: ${e.length} is not the same as tensors size: ${t.length}.`);e.forEach((e,n)=>this.write(e,t[n]))}gather(e,t){if(t&&t!==this.dtype)throw new Error(`TensorArray dtype is ${this.dtype} but gather requested dtype `+t);if(e)e=e.slice(0,this.size());else{e=[];for(let t=0;t<this.size();t++)e.push(t)}return 0===e.length?Object(f.mi)([],[0].concat(this.elementShape)):(t=this.readMany(e),Fh(this.elementShape,t[0].shape,"TensorArray shape mismatch: "),Object(f.di)(t,0))}concat(e){if(e&&e!==this.dtype)throw new Error(`TensorArray dtype is ${this.dtype} but concat requested dtype `+e);if(0===this.size())return Object(f.mi)([],[0].concat(this.elementShape));const t=[];for(let e=0;e<this.size();e++)t.push(e);return e=this.readMany(t),Fh(this.elementShape,e[0].shape,`TensorArray shape mismatch: tensor array shape (${this.elementShape}) vs first tensor shape (${e[0].shape})`),Object(f.we)(e,0)}scatter(e,t){if(t.dtype!==this.dtype)throw new Error(`TensorArray dtype is ${this.dtype} but tensor has dtype `+t.dtype);if(e.length!==t.shape[0])throw new Error(`Expected len(indices) == tensor.shape[0], but saw: ${e.length} vs. `+t.shape[0]);var n=Math.max(...e);if(!this.dynamicSize&&n>=this.maxSize)throw new Error(`Max index must be < array size (${n}  vs. ${this.maxSize})`);this.writeMany(e,Object(f.Gi)(t,0))}split(e,t){if(t.dtype!==this.dtype)throw new Error(`TensorArray dtype is ${this.dtype} but tensor has dtype `+t.dtype);let n=0;const r=e.map(e=>n+=e);if(n!==t.shape[0])throw new Error(`Expected sum of lengths to be equal to\n          tensor.shape[0], but sum of lengths is\n        ${n}, and tensor's shape is: `+t.shape);if(!this.dynamicSize&&e.length!==this.maxSize)throw new Error(`TensorArray's size is not equal to the size of lengths (${this.maxSize} vs. ${e.length}), and the TensorArray is not marked as dynamically resizeable`);const i=0===n?0:t.size/n,o=[],a=(Object(f.vi)(()=>{t=Object(f.oh)(t,[1,n,i]);for(let n=0;n<e.length;++n){var a=[0,0===n?0:r[n-1],0],s=[1,e[n],i];o[n]=Object(f.oh)(Object(f.Mh)(t,a,s),this.elementShape)}return o}),[]);for(let t=0;t<e.length;t++)a[t]=t;this.writeMany(a,o)}}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */class zh{constructor(e,t,n,r=-1){this.tensors=e,this.elementShape=t,this.elementDtype=n,null!=e&&e.forEach(e=>{if(n!==e.dtype)throw new Error(`Invalid data types; op elements ${n}, but list elements `+e.dtype);Fh(t,e.shape,"TensorList shape mismatch: "),Object(f.Qf)(e)}),this.idTensor=Object(f.xh)(0),this.maxNumElements=r,Object(f.Qf)(this.idTensor)}get id(){return this.idTensor.id}copy(){return new zh([...this.tensors],this.elementShape,this.elementDtype)}clearAndClose(e){this.tensors.forEach(t=>{null!=e&&e.has(t.id)||t.dispose()}),this.tensors.length=0,this.idTensor.dispose()}size(){return this.tensors.length}stack(e,t,n=-1){if(t!==this.elementDtype)throw new Error(`Invalid data types; op elements ${t}, but list elements `+this.elementDtype);if(-1!==n&&this.tensors.length!==n)throw new Error(`Operation expected a list with ${n} elements but got a list with ${this.tensors.length} elements.`);Fh(e,this.elementShape,"TensorList shape mismatch: ");const r=Ph(this.elementShape,this.tensors,e);return Object(f.vi)(()=>{var e=this.tensors.map(e=>Object(f.oh)(e,r));return Object(f.di)(e,0)})}popBack(e,t){if(t!==this.elementDtype)throw new Error(`Invalid data types; op elements ${t}, but list elements `+this.elementDtype);if(0===this.size())throw new Error("Trying to pop from an empty list.");t=Ph(this.elementShape,this.tensors,e);const n=this.tensors.pop();return n.kept=!1,Fh(n.shape,e,"TensorList shape mismatch: "),Object(f.oh)(n,t)}pushBack(e){if(e.dtype!==this.elementDtype)throw new Error(`Invalid data types; op elements ${e.dtype}, but list elements `+this.elementDtype);if(Fh(e.shape,this.elementShape,"TensorList shape mismatch: "),this.maxNumElements===this.size())throw new Error("Trying to push element into a full list.");Object(f.Qf)(e),this.tensors.push(e)}resize(e){if(e<0)throw new Error("TensorListResize expects size to be non-negative. Got: "+e);if(-1!==this.maxNumElements&&e>this.maxNumElements)throw new Error(`TensorListResize input size ${e} is greater maxNumElement ${this.maxNumElements}.`);const t=new zh([],this.elementShape,this.elementDtype,this.maxNumElements);t.tensors.length=e;for(let n=0;n<Math.min(this.tensors.length,e);++n)t.tensors[n]=this.tensors[n];return t}getItem(e,t,n){if(n!==this.elementDtype)throw new Error(`Invalid data types; op elements ${n}, but list elements `+this.elementDtype);if(e<0||e>this.tensors.length)throw new Error(`Trying to access element ${e} in a list with ${this.tensors.length} elements.`);if(null==this.tensors[e])throw new Error(`element at index ${e} is null.`);return Fh(this.tensors[e].shape,t,"TensorList shape mismatch: "),n=Ph(this.elementShape,this.tensors,t),Object(f.oh)(this.tensors[e],n)}setItem(e,t){if(t.dtype!==this.elementDtype)throw new Error(`Invalid data types; op elements ${t.dtype}, but list elements `+this.elementDtype);if(e<0||-1!==this.maxNumElements&&e>=this.maxNumElements)throw new Error(`Trying to set element ${e} in a list with max ${this.maxNumElements} elements.`);Fh(this.elementShape,t.shape,"TensorList shape mismatch: "),Object(f.Qf)(t),null!=this.tensors[e]&&(this.tensors[e].kept=!1),this.tensors[e]=t}gather(e,t,n){if(t!==this.elementDtype)throw new Error(`Invalid data types; op elements ${t}, but list elements `+this.elementDtype);Fh(this.elementShape,n,"TensorList shape mismatch: "),e=e.slice(0,this.size());const r=Ph(this.elementShape,this.tensors,n);return 0===e.length?Object(f.mi)([],[0].concat(r)):Object(f.vi)(()=>{var t=e.map(e=>Object(f.oh)(this.tensors[e],r));return Object(f.di)(t,0)})}concat(e,t){if(e&&e!==this.elementDtype)throw new Error(`TensorList dtype is ${this.elementDtype} but concat requested dtype `+e);Fh(this.elementShape,t,"TensorList shape mismatch: ");const n=Ph(this.elementShape,this.tensors,t);return 0===this.size()?Object(f.mi)([],[0].concat(n)):Object(f.vi)(()=>{var e=this.tensors.map(e=>Object(f.oh)(e,n));return Object(f.we)(e,0)})}}
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function Hh(e,t,n){var[r,i]=Object(Ih.d)("fusedOps",e,t,n),o="biasadd"===r,a=!o,s="prelu"===i,r="fusedbatchnorm"===r,u=Object(Ih.d)("numArgs",e,t,n);if(o){if(s&&2!==u)throw new Error("FusedConv2d and DepthwiseConv2d with BiasAdd and Prelu must have two extra arguments: bias and alpha.");if(!s&&o&&1!==u)throw new Error("FusedConv2d and DepthwiseConv2d with BiasAdd must have one extra argument: bias.")}if(r)throw new Error("FusedConv2d and DepthwiseConv2d with FusedBatchNorm is not supported");s=Object(Ih.d)("strides",e,t,n),o=Object(Ih.c)(e,t,n),u=Object(Ih.d)("dataFormat",e,t,n).toUpperCase(),r=Object(Ih.d)("dilations",e,t,n);let[c,l]=Object(Ih.d)("args",e,t,n);return a&&(l=c,c=void 0),{stride:s,pad:o,dataFormat:u,dilations:r,biasArg:c,preluArg:l,activationFunc:i,leakyreluAlpha:a=Object(Ih.d)("leakyreluAlpha",e,t,n)}}
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function $h(e,t,n){return{boxes:Object(Ih.d)("boxes",e,t,n),scores:Object(Ih.d)("scores",e,t,n),maxOutputSize:Object(Ih.d)("maxOutputSize",e,t,n),iouThreshold:Object(Ih.d)("iouThreshold",e,t,n),scoreThreshold:Object(Ih.d)("scoreThreshold",e,t,n),softNmsSigma:Object(Ih.d)("softNmsSigma",e,t,n)}}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */class Qh{constructor(e,t){this.keyDType=e,this.valueDType=t,this.handle=Object(f.xh)(0),this.tensorMap=new Map,Object(f.Qf)(this.handle)}get id(){return this.handle.id}clearAndClose(){this.tensorMap.forEach(e=>e.dispose()),this.tensorMap.clear(),this.handle.dispose()}size(){return this.tensorMap.size}tensorSize(){return y.a(this.size(),"int32")}async import(e,t){this.checkKeyAndValueTensor(e,t);const n=await e.data();return this.tensorMap.forEach(e=>e.dispose()),this.tensorMap.clear(),Object(f.vi)(()=>{var e=Object(f.Gi)(t);const r=n.length,i=e.length;f.Ji.assert(r===i,()=>`The number of elements doesn't match, keys has ${r} elements, the values has ${i} elements.`);for(let t=0;t<r;t++){var o=n[t],a=e[t];Object(f.Qf)(a),this.tensorMap.set(o,a)}return this.handle})}async find(e,t){this.checkKeyAndValueTensor(e,t);const n=await e.data();return Object(f.vi)(()=>{const e=[];for(let i=0;i<n.length;i++){var r=n[i];r=this.findWithDefault(r,t);e.push(r)}return Object(f.di)(e)})}findWithDefault(e,t){return null!=(e=this.tensorMap.get(e))?e:t}checkKeyAndValueTensor(e,t){if(e.dtype!==this.keyDType)throw new Error(`Expect key dtype ${this.keyDType}, but got `+e.dtype);if(t.dtype!==this.valueDType)throw new Error(`Expect value dtype ${this.valueDType}, but got `+t.dtype)}}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function Vh(e,t,n,r,i=f.vi){const o=((e,t,n)=>{switch(e.category){case"arithmetic":return i(()=>{var[r,i,o,a=c]=[e,t,n];switch(r.op){case"BiasAdd":case"AddV2":case"Add":return[a.add(Object(Ih.d)("a",r,i,o),Object(Ih.d)("b",r,i,o))];case"AddN":return[a.addN(Object(Ih.d)("tensors",r,i,o))];case"FloorMod":case"Mod":return[a.mod(Object(Ih.d)("a",r,i,o),Object(Ih.d)("b",r,i,o))];case"Mul":return[a.mul(Object(Ih.d)("a",r,i,o),Object(Ih.d)("b",r,i,o))];case"RealDiv":case"Div":return[a.div(Object(Ih.d)("a",r,i,o),Object(Ih.d)("b",r,i,o))];case"DivNoNan":return[a.divNoNan(Object(Ih.d)("a",r,i,o),Object(Ih.d)("b",r,i,o))];case"FloorDiv":return[a.floorDiv(Object(Ih.d)("a",r,i,o),Object(Ih.d)("b",r,i,o))];case"Sub":return[a.sub(Object(Ih.d)("a",r,i,o),Object(Ih.d)("b",r,i,o))];case"Minimum":return[a.minimum(Object(Ih.d)("a",r,i,o),Object(Ih.d)("b",r,i,o))];case"Maximum":return[a.maximum(Object(Ih.d)("a",r,i,o),Object(Ih.d)("b",r,i,o))];case"Pow":return[a.pow(Object(Ih.d)("a",r,i,o),Object(Ih.d)("b",r,i,o))];case"SquaredDifference":return[a.squaredDifference(Object(Ih.d)("a",r,i,o),Object(Ih.d)("b",r,i,o))];default:throw TypeError(`Node type ${r.op} is not implemented`)}});case"basic_math":return i(()=>{var[r,i,o,a=c]=[e,t,n];switch(r.op){case"Abs":case"ComplexAbs":return[a.abs(Object(Ih.d)("x",r,i,o))];case"Acos":return[a.acos(Object(Ih.d)("x",r,i,o))];case"Acosh":return[a.acosh(Object(Ih.d)("x",r,i,o))];case"Asin":return[a.asin(Object(Ih.d)("x",r,i,o))];case"Asinh":return[a.asinh(Object(Ih.d)("x",r,i,o))];case"Atan":return[a.atan(Object(Ih.d)("x",r,i,o))];case"Atan2":return[a.atan2(Object(Ih.d)("x",r,i,o),Object(Ih.d)("y",r,i,o))];case"Atanh":return[a.atanh(Object(Ih.d)("x",r,i,o))];case"Ceil":return[a.ceil(Object(Ih.d)("x",r,i,o))];case"Complex":return[a.complex(Object(Ih.d)("real",r,i,o),Object(Ih.d)("imag",r,i,o))];case"Cos":return[a.cos(Object(Ih.d)("x",r,i,o))];case"Cosh":return[a.cosh(Object(Ih.d)("x",r,i,o))];case"Elu":return[a.elu(Object(Ih.d)("x",r,i,o))];case"Erf":return[a.erf(Object(Ih.d)("x",r,i,o))];case"Exp":return[a.exp(Object(Ih.d)("x",r,i,o))];case"Expm1":return[a.expm1(Object(Ih.d)("x",r,i,o))];case"Floor":return[a.floor(Object(Ih.d)("x",r,i,o))];case"Log":return[a.log(Object(Ih.d)("x",r,i,o))];case"Log1p":return[a.log1p(Object(Ih.d)("x",r,i,o))];case"Imag":return[a.imag(Object(Ih.d)("x",r,i,o))];case"Neg":return[a.neg(Object(Ih.d)("x",r,i,o))];case"Reciprocal":return[a.reciprocal(Object(Ih.d)("x",r,i,o))];case"Real":return[a.real(Object(Ih.d)("x",r,i,o))];case"Relu":return[a.relu(Object(Ih.d)("x",r,i,o))];case"Round":return[a.round(Object(Ih.d)("x",r,i,o))];case"Selu":return[a.selu(Object(Ih.d)("x",r,i,o))];case"Sigmoid":return[a.sigmoid(Object(Ih.d)("x",r,i,o))];case"Sin":return[a.sin(Object(Ih.d)("x",r,i,o))];case"Sign":return[a.sign(Object(Ih.d)("x",r,i,o))];case"Sinh":return[a.sinh(Object(Ih.d)("x",r,i,o))];case"Softplus":return[a.softplus(Object(Ih.d)("x",r,i,o))];case"Sqrt":return[a.sqrt(Object(Ih.d)("x",r,i,o))];case"Square":return[a.square(Object(Ih.d)("x",r,i,o))];case"Tanh":return[a.tanh(Object(Ih.d)("x",r,i,o))];case"Tan":return[a.tan(Object(Ih.d)("x",r,i,o))];case"ClipByValue":return[a.clipByValue(Object(Ih.d)("x",r,i,o),Object(Ih.d)("clipValueMin",r,i,o),Object(Ih.d)("clipValueMax",r,i,o))];case"Relu6":return[a.relu6(Object(Ih.d)("x",r,i,o))];case"Rsqrt":return[a.rsqrt(Object(Ih.e)(r.inputNames[0],i,o))];case"Prod":return[a.prod(Object(Ih.d)("x",r,i,o),Object(Ih.d)("axes",r,i,o))];case"LeakyRelu":return[a.leakyRelu(Object(Ih.d)("x",r,i,o),Object(Ih.d)("alpha",r,i,o))];case"Prelu":return[a.prelu(Object(Ih.d)("x",r,i,o),Object(Ih.d)("alpha",r,i,o))];case"IsNan":return[a.isNaN(Object(Ih.e)(r.inputNames[0],i,o))];default:throw TypeError(`Node type ${r.op} is not implemented`)}});case"control":return(async(e,t,n)=>{switch(e.op){case"If":case"StatelessIf":{var r=Object(Ih.d)("thenBranch",e,t,n),i=Object(Ih.d)("elseBranch",e,t,n);const a=Object(Ih.d)("cond",e,t,n);var o=Object(Ih.d)("args",e,t,n);return((await a.data())[0]?n.functionMap[r]:n.functionMap[i]).executeFunctionAsync(o,n.tensorArrayMap,n.tensorListMap)}case"While":case"StatelessWhile":{var a=Object(Ih.d)("body",e,t,n),s=Object(Ih.d)("cond",e,t,n);const r=Object(Ih.d)("args",e,t,n),i=await n.functionMap[s].executeFunctionAsync(r,n.tensorArrayMap,n.tensorListMap),o=r.map(e=>e.id);let u=await i[0].data(),c=(i.forEach(e=>{e.kept||-1!==o.indexOf(e.id)||e.dispose()}),r);for(;u[0];){const e=c,t=(c=await n.functionMap[a].executeFunctionAsync(c,n.tensorArrayMap,n.tensorListMap)).map(e=>e.id),r=(e.forEach(e=>{e.kept||-1!==o.indexOf(e.id)||-1!==t.indexOf(e.id)||e.dispose()}),await n.functionMap[s].executeFunctionAsync(c,n.tensorArrayMap,n.tensorListMap));u=await r[0].data(),r.forEach(e=>{e.kept||-1!==o.indexOf(e.id)||-1!==t.indexOf(e.id)||e.dispose()})}return c}case"LoopCond":return r=Object(Ih.d)("pred",e,t,n),[Object(Ih.a)(r)];case"Switch":{const r=Object(Ih.d)("pred",e,t,n);let i=Object(Ih.d)("data",e,t,n);return i.kept||(i=Object(Ih.a)(i)),(await r.data())[0]?[void 0,i]:[i,void 0]}case"Merge":return(i=e.inputNames.find(e=>void 0!==Object(Ih.e)(e,t,n)))?(o=Object(Ih.e)(i,t,n),[Object(Ih.a)(o)]):void 0;case"Enter":return r=Object(Ih.d)("frameName",e,t,n),i=Object(Ih.d)("tensor",e,t,n),n.enterFrame(r),[Object(Ih.a)(i)];case"Exit":return o=Object(Ih.d)("tensor",e,t,n),n.exitFrame(),[Object(Ih.a)(o)];case"NextIteration":return r=Object(Ih.d)("tensor",e,t,n),n.nextIteration(),[Object(Ih.a)(r)];case"TensorArrayV3":i=Object(Ih.d)("size",e,t,n),o=Object(Ih.d)("dtype",e,t,n),r=Object(Ih.d)("elementShape",e,t,n);var u=Object(Ih.d)("dynamicSize",e,t,n),c=Object(Ih.d)("clearAfterRead",e,t,n),l=Object(Ih.d)("identicalElementShapes",e,t,n),h=Object(Ih.d)("name",e,t,n);h=new Uh(h,o,i,r,l,u,c);return n.addTensorArray(h),[h.idTensor,Object(f.xh)(1)];case"TensorArrayWriteV3":{o=Object(Ih.d)("tensorArrayId",e,t,n),i=Object(Ih.d)("index",e,t,n),r=Object(Ih.d)("tensor",e,t,n);const a=n.getTensorArray(o.id);return a.write(i,r),[a.idTensor]}case"TensorArrayReadV3":l=Object(Ih.d)("tensorArrayId",e,t,n),u=Object(Ih.d)("index",e,t,n);return[n.getTensorArray(l.id).read(u)];case"TensorArrayGatherV3":c=Object(Ih.d)("tensorArrayId",e,t,n),h=Object(Ih.d)("indices",e,t,n),o=Object(Ih.d)("dtype",e,t,n);return[n.getTensorArray(c.id).gather(h,o)];case"TensorArrayScatterV3":{i=Object(Ih.d)("tensorArrayId",e,t,n),r=Object(Ih.d)("indices",e,t,n),l=Object(Ih.d)("tensor",e,t,n);const o=n.getTensorArray(i.id);return o.scatter(r,l),[o.idTensor]}case"TensorArrayConcatV3":{u=Object(Ih.d)("tensorArrayId",e,t,n);const r=n.getTensorArray(u.id);return c=Object(Ih.d)("dtype",e,t,n),[r.concat(c)]}case"TensorArraySplitV3":{h=Object(Ih.d)("tensorArrayId",e,t,n),o=Object(Ih.d)("tensor",e,t,n),i=Object(Ih.d)("lengths",e,t,n);const r=n.getTensorArray(h.id);return r.split(i,o),[r.idTensor]}case"TensorArraySizeV3":{r=Object(Ih.d)("tensorArrayId",e,t,n);const i=n.getTensorArray(r.id);return[Object(f.xh)(i.size(),"int32")]}case"TensorArrayCloseV3":{l=Object(Ih.d)("tensorArrayId",e,t,n);const r=n.getTensorArray(l.id);return r.clearAndClose(),[r.idTensor]}case"TensorListSetItem":{u=Object(Ih.d)("tensorListId",e,t,n),c=Object(Ih.d)("index",e,t,n),h=Object(Ih.d)("tensor",e,t,n);const r=n.getTensorList(u.id);return r.setItem(c,h),[r.idTensor]}case"TensorListGetItem":i=Object(Ih.d)("tensorListId",e,t,n),o=Object(Ih.d)("index",e,t,n),r=Object(Ih.d)("elementShape",e,t,n),l=Object(Ih.d)("elementDType",e,t,n);return[n.getTensorList(i.id).getItem(o,r,l)];case"TensorListScatterV2":case"TensorListScatter":return u=Object(Ih.d)("indices",e,t,n),c=function(e,t,n,r){if(t.length!==e.shape[0])throw new Error(`Expected len(indices) == tensor.shape[0], but saw: ${t.length} vs. `+e.shape[0]);var i=Math.max(...t);if(null!=r&&-1!==r&&r<=i)throw new Error(`Max index must be < array size (${i}  vs. ${r})`);const o=new zh([],n,e.dtype,r),a=Object(f.Gi)(e,0);return t.forEach((e,t)=>{o.setItem(e,a[t])}),o}(Object(Ih.d)("tensor",e,t,n),u,Object(Ih.d)("elementShape",e,t,n),Object(Ih.d)("numElements",e,t,n)),n.addTensorList(c),[c.idTensor];case"TensorListReserve":case"EmptyTensorList":{let a;return h=Object(Ih.d)("elementShape",e,t,n),i=Object(Ih.d)("elementDType",e,t,n),a="TensorListReserve"===e.op?"numElements":"maxNumElements",o=Object(Ih.d)(a,e,t,n),r="TensorListReserve"===e.op?-1:o,o=new zh([],l=h,u=i,c=r),n.addTensorList(o),[o.idTensor]}case"TensorListGather":h=Object(Ih.d)("tensorListId",e,t,n),i=Object(Ih.d)("indices",e,t,n),r=Object(Ih.d)("elementShape",e,t,n),o=Object(Ih.d)("elementDType",e,t,n);return[n.getTensorList(h.id).gather(i,o,r)];case"TensorListStack":h=Object(Ih.d)("tensorListId",e,t,n),i=Object(Ih.d)("elementShape",e,t,n),o=Object(Ih.d)("elementDType",e,t,n),r=Object(Ih.d)("numElements",e,t,n);return[n.getTensorList(h.id).stack(i,o,r)];case"TensorListFromTensor":return h=function(e,t,n){var r=e.dtype;if(e.shape.length<1)throw new Error("Tensor must be at least a vector, but saw shape: "+e.shape);if(e.dtype!==n)throw new Error(`Invalid data types; op elements ${e.dtype}, but list elements `+n);return Fh(e.shape.slice(1),t,"TensorList shape mismatch: "),n=Object(f.Gi)(e),new zh(n,t,r)}(Object(Ih.d)("tensor",e,t,n),Object(Ih.d)("elementShape",e,t,n),Object(Ih.d)("elementDType",e,t,n)),n.addTensorList(h),[h.idTensor];case"TensorListConcat":case"TensorListConcatV2":{i=Object(Ih.d)("tensorListId",e,t,n);const a=n.getTensorList(i.id);return o=Object(Ih.d)("dtype",e,t,n),r=Object(Ih.d)("elementShape",e,t,n),[a.concat(o,r)]}case"TensorListPushBack":{h=Object(Ih.d)("tensorListId",e,t,n),i=Object(Ih.d)("tensor",e,t,n);const r=n.getTensorList(h.id);return r.pushBack(i),[r.idTensor]}case"TensorListPopBack":o=Object(Ih.d)("tensorListId",e,t,n),r=Object(Ih.d)("elementShape",e,t,n),h=Object(Ih.d)("elementDType",e,t,n);return[n.getTensorList(o.id).popBack(r,h)];case"TensorListSplit":return i=Object(Ih.d)("tensor",e,t,n),o=Object(Ih.d)("elementShape",e,t,n),r=function(e,t,n){let r=0;const i=t.map(e=>r+=e);if(r!==e.shape[0])throw new Error(`Expected sum of lengths to be equal to\n          tensor.shape[0], but sum of lengths is\n        ${r}, and tensor's shape is: `+e.shape);const o=Lh(e.shape.slice(1),n),a=0===r?0:e.size/r;var s=Object(f.vi)(()=>{const n=[];e=Object(f.oh)(e,[1,r,a]);for(let r=0;r<t.length;++r){var s=[0,0===r?0:i[r-1],0],u=[1,t[r],a];n[r]=Object(f.oh)(Object(f.Mh)(e,s,u),o)}return e.dispose(),n});const u=new zh([],n,e.dtype,t.length);for(let e=0;e<s.length;e++)u.setItem(e,s[e]);return u}(i,Object(Ih.d)("lengths",e,t,n),o),n.addTensorList(r),[r.idTensor];case"TensorListLength":{h=Object(Ih.d)("tensorListId",e,t,n);const r=n.getTensorList(h.id);return[Object(f.xh)(r.size(),"int32")]}case"TensorListResize":i=Object(Ih.d)("tensorListId",e,t,n),o=Object(Ih.d)("size",e,t,n);return r=n.getTensorList(i.id).resize(o),n.addTensorList(r),[r.idTensor];default:throw TypeError(`Node type ${e.op} is not implemented`)}})(e,t,n);case"convolution":return i(()=>{var[r,i,o,a=c]=[e,t,n];switch(r.op){case"Conv1D":var s=Object(Ih.d)("stride",r,i,o),u=Object(Ih.d)("pad",r,i,o),l=Object(Ih.d)("dataFormat",r,i,o).toUpperCase(),h=Object(Ih.d)("dilation",r,i,o);return[a.conv1d(Object(Ih.d)("x",r,i,o),Object(Ih.d)("filter",r,i,o),s,u,l,h)];case"Conv2D":return s=Object(Ih.d)("strides",r,i,o),u=Object(Ih.c)(r,i,o),l=Object(Ih.d)("dataFormat",r,i,o).toUpperCase(),h=Object(Ih.d)("dilations",r,i,o),[a.conv2d(Object(Ih.d)("x",r,i,o),Object(Ih.d)("filter",r,i,o),[s[1],s[2]],u,l,[h[1],h[2]])];case"_FusedConv2D":var{stride:s,pad:u,dataFormat:l,dilations:h,biasArg:f,preluArg:d,activationFunc:p,leakyreluAlpha:m}=Hh(r,i,o);return[a.fused.conv2d({x:Object(Ih.d)("x",r,i,o),filter:Object(Ih.d)("filter",r,i,o),strides:[s[1],s[2]],pad:u,dataFormat:l,dilations:[h[1],h[2]],bias:f,activation:p,preluActivationWeights:d,leakyreluAlpha:m})];case"FusedDepthwiseConv2dNative":var{stride:s,pad:u,dataFormat:l,dilations:h,biasArg:f,preluArg:p,activationFunc:d,leakyreluAlpha:m}=Hh(r,i,o);return[a.fused.depthwiseConv2d({x:Object(Ih.d)("x",r,i,o),filter:Object(Ih.d)("filter",r,i,o),strides:[s[1],s[2]],pad:u,dataFormat:l,dilations:[h[1],h[2]],bias:f,activation:d,preluActivationWeights:p,leakyreluAlpha:m})];case"Conv2DBackpropInput":case"Conv2dTranspose":return s=Object(Ih.d)("outputShape",r,i,o),u=Object(Ih.d)("strides",r,i,o),l=Object(Ih.c)(r,i,o),[a.conv2dTranspose(Object(Ih.d)("x",r,i,o),Object(Ih.d)("filter",r,i,o),s,[u[1],u[2]],l)];case"DepthwiseConv2dNative":case"DepthwiseConv2d":return h=Object(Ih.d)("strides",r,i,o),f=Object(Ih.c)(r,i,o),d=Object(Ih.d)("dilations",r,i,o),p=Object(Ih.d)("dataFormat",r,i,o).toUpperCase(),[a.depthwiseConv2d(Object(Ih.d)("input",r,i,o),Object(Ih.d)("filter",r,i,o),[h[1],h[2]],f,p,[d[1],d[2]])];case"Conv3D":return m=Object(Ih.d)("strides",r,i,o),s=Object(Ih.d)("pad",r,i,o),u=Object(Ih.d)("dataFormat",r,i,o).toUpperCase(),l=Object(Ih.d)("dilations",r,i,o),[a.conv3d(Object(Ih.d)("x",r,i,o),Object(Ih.d)("filter",r,i,o),[m[1],m[2],m[3]],s,u,[l[1],l[2],l[3]])];case"AvgPool":return h=Object(Ih.d)("strides",r,i,o),f=Object(Ih.d)("pad",r,i,o),p=Object(Ih.d)("kernelSize",r,i,o),[a.avgPool(Object(Ih.d)("x",r,i,o),[p[1],p[2]],[h[1],h[2]],f)];case"MaxPool":return d=Object(Ih.d)("strides",r,i,o),m=Object(Ih.d)("pad",r,i,o),s=Object(Ih.d)("kernelSize",r,i,o),[a.maxPool(Object(Ih.d)("x",r,i,o),[s[1],s[2]],[d[1],d[2]],m)];case"MaxPoolWithArgmax":u=Object(Ih.d)("strides",r,i,o),l=Object(Ih.d)("pad",r,i,o);var p=Object(Ih.d)("kernelSize",r,i,o),{result:f,indexes:s}=(h=Object(Ih.d)("includeBatchInIndex",r,i,o),a.maxPoolWithArgmax(Object(Ih.d)("x",r,i,o),[p[1],p[2]],[u[1],u[2]],l,h));return[f,s];case"AvgPool3D":return d=Object(Ih.d)("strides",r,i,o),m=Object(Ih.d)("pad",r,i,o),p=Object(Ih.d)("kernelSize",r,i,o),[a.avgPool3d(Object(Ih.d)("x",r,i,o),[p[1],p[2],p[3]],[d[1],d[2],d[3]],m)];case"MaxPool3D":return u=Object(Ih.d)("strides",r,i,o),l=Object(Ih.d)("pad",r,i,o),h=Object(Ih.d)("kernelSize",r,i,o),[a.maxPool3d(Object(Ih.d)("x",r,i,o),[h[1],h[2],h[3]],[u[1],u[2],u[3]],l)];case"Dilation2D":return f=Object(Ih.d)("strides",r,i,o),s=Object(Ih.d)("pad",r,i,o),p=Object(Ih.d)("dilations",r,i,o),d=f[1],m=f[2],h=p[1],u=p[2],[a.dilation2d(Object(Ih.d)("x",r,i,o),Object(Ih.d)("filter",r,i,o),[d,m],s,[h,u],"NHWC")];default:throw TypeError(`Node type ${r.op} is not implemented`)}});case"creation":return i(()=>{var[r,i,o,a=c]=[e,t,n];switch(r.op){case"Fill":var s=Object(Ih.d)("shape",r,i,o),u=Object(Ih.d)("dtype",r,i,o),l=Object(Ih.d)("value",r,i,o);return[a.fill(s,l,u)];case"LinSpace":return s=Object(Ih.d)("start",r,i,o),l=Object(Ih.d)("stop",r,i,o),u=Object(Ih.d)("num",r,i,o),[a.linspace(s,l,u)];case"Multinomial":return s=Object(Ih.d)("logits",r,i,o),l=Object(Ih.d)("numSamples",r,i,o),u=Object(Ih.d)("seed",r,i,o),[a.multinomial(s,l,u)];case"OneHot":s=Object(Ih.d)("indices",r,i,o),l=Object(Ih.d)("depth",r,i,o),u=Object(Ih.d)("onValue",r,i,o);var h=Object(Ih.d)("offValue",r,i,o),f=Object(Ih.d)("dtype",r,i,o);return[a.oneHot(s,l,u,h,f)];case"Ones":return[a.ones(Object(Ih.d)("shape",r,i,o),Object(Ih.d)("dtype",r,i,o))];case"OnesLike":return[a.onesLike(Object(Ih.d)("x",r,i,o))];case"RandomStandardNormal":return[a.randomStandardNormal(Object(Ih.d)("shape",r,i,o),Object(Ih.d)("dtype",r,i,o),Object(Ih.d)("seed",r,i,o))];case"RandomUniform":return[a.randomUniform(Object(Ih.d)("shape",r,i,o),Object(Ih.d)("minval",r,i,o),Object(Ih.d)("maxval",r,i,o),Object(Ih.d)("dtype",r,i,o))];case"Range":return s=Object(Ih.d)("start",r,i,o),l=Object(Ih.d)("stop",r,i,o),u=Object(Ih.d)("step",r,i,o),[a.range(s,l,u,Object(Ih.d)("dtype",r,i,o))];case"TruncatedNormal":return h=Object(Ih.d)("shape",r,i,o),f=Object(Ih.d)("mean",r,i,o),s=Object(Ih.d)("stdDev",r,i,o),l=Object(Ih.d)("seed",r,i,o),[a.truncatedNormal(h,f,s,Object(Ih.d)("dtype",r,i,o),l)];case"Zeros":return[a.zeros(Object(Ih.d)("shape",r,i,o),Object(Ih.d)("dtype",r,i,o))];case"ZerosLike":return[a.zerosLike(Object(Ih.d)("x",r,i,o))];default:throw TypeError(`Node type ${r.op} is not implemented`)}});case"dynamic":return(async(e,t,n,r=c)=>{switch(e.op){case"NonMaxSuppressionV5":var{boxes:i,scores:o,maxOutputSize:a,iouThreshold:s,scoreThreshold:u,softNmsSigma:l}=$h(e,t,n);return[(i=await r.image.nonMaxSuppressionWithScoreAsync(i,o,a,s,u,l)).selectedIndices,i.selectedScores];case"NonMaxSuppressionV4":var o,{boxes:o,scores:a,maxOutputSize:s,iouThreshold:u,scoreThreshold:l}=$h(e,t,n),i=Object(Ih.d)("padToMaxOutputSize",e,t,n);return[(o=await r.image.nonMaxSuppressionPaddedAsync(o,a,s,u,l,i)).selectedIndices,o.validOutputs];case"NonMaxSuppressionV3":case"NonMaxSuppressionV2":var{boxes:a,scores:s,maxOutputSize:u,iouThreshold:l,scoreThreshold:i}=$h(e,t,n);return[await r.image.nonMaxSuppressionAsync(a,s,u,l,i)];case"Where":{const i=r.cast(Object(Ih.d)("condition",e,t,n),"bool");return o=[await r.whereAsync(i)],i.dispose(),o}case"ListDiff":return r.setdiff1dAsync(Object(Ih.d)("x",e,t,n),Object(Ih.d)("y",e,t,n));default:throw TypeError(`Node type ${e.op} is not implemented`)}})(e,t,n);case"evaluation":return i(()=>{var[r,i,o,a=c]=[e,t,n];switch(r.op){case"LowerBound":var s=Object(Ih.d)("sortedSequence",r,i,o),u=Object(Ih.d)("values",r,i,o);return[a.lowerBound(s,u)];case"TopKV2":s=Object(Ih.d)("x",r,i,o),u=Object(Ih.d)("k",r,i,o);var l=Object(Ih.d)("sorted",r,i,o);return[(s=a.topk(s,u,l)).values,s.indices];case"UpperBound":return u=Object(Ih.d)("sortedSequence",r,i,o),l=Object(Ih.d)("values",r,i,o),[a.upperBound(u,l)];case"Unique":return s=Object(Ih.d)("x",r,i,o),[(u=a.unique(s)).values,u.indices];case"UniqueV2":return l=Object(Ih.d)("x",r,i,o),s=Object(Ih.d)("axis",r,i,o),[(u=a.unique(l,s)).values,u.indices];default:throw TypeError(`Node type ${r.op} is not implemented`)}});case"image":return i(()=>{var[r,i,o,a=c]=[e,t,n];switch(r.op){case"ResizeBilinear":var s=Object(Ih.d)("images",r,i,o),u=Object(Ih.d)("size",r,i,o),l=Object(Ih.d)("alignCorners",r,i,o),h=Object(Ih.d)("halfPixelCenters",r,i,o);return[a.image.resizeBilinear(s,[u[0],u[1]],l,h)];case"ResizeNearestNeighbor":return s=Object(Ih.d)("images",r,i,o),u=Object(Ih.d)("size",r,i,o),l=Object(Ih.d)("alignCorners",r,i,o),h=Object(Ih.d)("halfPixelCenters",r,i,o),[a.image.resizeNearestNeighbor(s,[u[0],u[1]],l,h)];case"CropAndResize":s=Object(Ih.d)("image",r,i,o),u=Object(Ih.d)("boxes",r,i,o),l=Object(Ih.d)("boxInd",r,i,o),h=Object(Ih.d)("cropSize",r,i,o);var f=Object(Ih.d)("method",r,i,o),d=Object(Ih.d)("extrapolationValue",r,i,o);return[a.image.cropAndResize(s,u,l,h,f,d)];case"ImageProjectiveTransformV3":{s=Object(Ih.d)("images",r,i,o),u=Object(Ih.d)("transforms",r,i,o),l=Object(Ih.d)("outputShape",r,i,o),h=Object(Ih.d)("fillValue",r,i,o);const e=Object(Ih.d)("interpolation",r,i,o),t=Object(Ih.d)("fillMode",r,i,o);return[a.image.transform(s,u,e.toLowerCase(),t.toLowerCase(),h,l)]}default:throw TypeError(`Node type ${r.op} is not implemented`)}});case"graph":return i(()=>{var[r,i,o,a=c]=[e,t,n];switch(r.op){case"Const":return i[r.name];case"PlaceholderWithDefault":var s=Object(Ih.d)("default",r,i,o);return[Object(Ih.e)(r.name,i,o)||s];case"Placeholder":return[Object(Ih.e)(r.name,i,o)];case"Identity":case"StopGradient":case"FakeQuantWithMinMaxVars":return s=Object(Ih.d)("x",r,i,o),[Object(Ih.a)(s)];case"IdentityN":return Object(Ih.d)("x",r,i,o).map(e=>Object(Ih.a)(e));case"Snapshot":return s=Object(Ih.d)("x",r,i,o),[Object(Ih.a)(s)];case"Shape":return[a.tensor1d(Object(Ih.d)("x",r,i,o).shape,"int32")];case"ShapeN":return Object(Ih.d)("x",r,i,o).map(e=>a.tensor1d(e.shape));case"Size":return[a.scalar(Object(Ih.d)("x",r,i,o).size,"int32")];case"Rank":return[a.scalar(Object(Ih.d)("x",r,i,o).rank,"int32")];case"NoOp":return[a.scalar(1)];case"Print":s=Object(Ih.d)("x",r,i,o);const e=Object(Ih.d)("data",r,i,o);Object(Ih.d)("message",r,i,o),Object(Ih.d)("summarize",r,i,o);for(let t=0;t<e.length;t++);return[s];default:throw TypeError(`Node type ${r.op} is not implemented`)}});case"logical":return i(()=>{var[r,i,o,a=c]=[e,t,n];switch(r.op){case"Equal":return[a.equal(Object(Ih.d)("a",r,i,o),Object(Ih.d)("b",r,i,o))];case"NotEqual":return[a.notEqual(Object(Ih.d)("a",r,i,o),Object(Ih.d)("b",r,i,o))];case"Greater":return[a.greater(Object(Ih.d)("a",r,i,o),Object(Ih.d)("b",r,i,o))];case"GreaterEqual":return[a.greaterEqual(Object(Ih.d)("a",r,i,o),Object(Ih.d)("b",r,i,o))];case"Less":return[a.less(Object(Ih.d)("a",r,i,o),Object(Ih.d)("b",r,i,o))];case"LessEqual":return[a.lessEqual(Object(Ih.d)("a",r,i,o),Object(Ih.d)("b",r,i,o))];case"LogicalAnd":return[a.logicalAnd(Object(Ih.d)("a",r,i,o),Object(Ih.d)("b",r,i,o))];case"LogicalNot":return[a.logicalNot(Object(Ih.d)("a",r,i,o))];case"LogicalOr":return[a.logicalOr(Object(Ih.d)("a",r,i,o),Object(Ih.d)("b",r,i,o))];case"Select":case"SelectV2":return[a.where(Object(Ih.d)("condition",r,i,o),Object(Ih.d)("a",r,i,o),Object(Ih.d)("b",r,i,o))];default:throw TypeError(`Node type ${r.op} is not implemented`)}});case"matrices":return i(()=>{var[r,i,o,a=c]=[e,t,n];switch(r.op){case"BatchMatMul":case"BatchMatMulV2":case"MatMul":return[a.matMul(Object(Ih.d)("a",r,i,o),Object(Ih.d)("b",r,i,o),Object(Ih.d)("transposeA",r,i,o),Object(Ih.d)("transposeB",r,i,o))];case"Einsum":return[a.einsum(Object(Ih.d)("equation",r,i,o),...Object(Ih.d)("tensors",r,i,o))];case"Transpose":return[a.transpose(Object(Ih.d)("x",r,i,o),Object(Ih.d)("perm",r,i,o))];case"_FusedMatMul":var[s,u]=Object(Ih.d)("fusedOps",r,i,o),s="biasadd"===s,l="prelu"===u,h=Object(Ih.d)("numArgs",r,i,o),f=Object(Ih.d)("leakyreluAlpha",r,i,o);if(s){if(l&&2!==h)throw new Error("Fused MatMul with BiasAdd and Prelu must have two extra arguments: bias and alpha.");if(!l&&1!==h)throw new Error("Fused MatMul with BiasAdd must have one extra argument: bias.")}var[s,l]=Object(Ih.d)("args",r,i,o);return[a.fused.matMul({a:Object(Ih.d)("a",r,i,o),b:Object(Ih.d)("b",r,i,o),transposeA:Object(Ih.d)("transposeA",r,i,o),transposeB:Object(Ih.d)("transposeB",r,i,o),bias:s,activation:u,preluActivationWeights:l,leakyreluAlpha:f})];default:throw TypeError(`Node type ${r.op} is not implemented`)}});case"normalization":return i(()=>{var[r,i,o,a=c]=[e,t,n];switch(r.op){case"EuclideanNorm":return[a.euclideanNorm(Object(Ih.d)("x",r,i,o),Object(Ih.d)("axis",r,i,o),Object(Ih.d)("keepDims",r,i,o))];case"FusedBatchNorm":case"FusedBatchNormV2":case"FusedBatchNormV3":return[a.batchNorm(Object(Ih.d)("x",r,i,o),Object(Ih.d)("mean",r,i,o),Object(Ih.d)("variance",r,i,o),Object(Ih.d)("offset",r,i,o),Object(Ih.d)("scale",r,i,o),Object(Ih.d)("epsilon",r,i,o))];case"LRN":return[a.localResponseNormalization(Object(Ih.d)("x",r,i,o),Object(Ih.d)("radius",r,i,o),Object(Ih.d)("bias",r,i,o),Object(Ih.d)("alpha",r,i,o),Object(Ih.d)("beta",r,i,o))];case"Softmax":return[a.softmax(Object(Ih.d)("x",r,i,o))];case"LogSoftmax":return[a.logSoftmax(Object(Ih.d)("x",r,i,o))];case"SparseToDense":return[a.sparseToDense(Object(Ih.d)("sparseIndices",r,i,o),Object(Ih.d)("outputShape",r,i,o),Object(Ih.d)("sparseValues",r,i,o),Object(Ih.d)("defaultValue",r,i,o))];default:throw TypeError(`Node type ${r.op} is not implemented`)}});case"ragged":return i(()=>{var[r,i,o,a=c]=[e,t,n];switch(r.op){case"RaggedGather":{const{outputNestedSplits:e,outputDenseValues:t}=a.raggedGather(Object(Ih.d)("paramsNestedSplits",r,i,o),Object(Ih.d)("paramsDenseValues",r,i,o),Object(Ih.d)("indices",r,i,o),Object(Ih.d)("outputRaggedRank",r,i,o));return e.concat(t)}case"RaggedRange":var{rtNestedSplits:s,rtDenseValues:u}=a.raggedRange(Object(Ih.d)("starts",r,i,o),Object(Ih.d)("limits",r,i,o),Object(Ih.d)("splits",r,i,o));return[s,u];case"RaggedTensorToTensor":return[a.raggedTensorToTensor(Object(Ih.d)("shape",r,i,o),Object(Ih.d)("values",r,i,o),Object(Ih.d)("defaultValue",r,i,o),Object(Ih.d)("rowPartitionTensors",r,i,o),Object(Ih.d)("rowPartitionTypes",r,i,o))];default:throw TypeError(`Node type ${r.op} is not implemented`)}});case"reduction":return i(()=>{var[r,i,o,a=c]=[e,t,n];switch(r.op){case"Max":var s=Object(Ih.d)("axis",r,i,o),u=Object(Ih.d)("keepDims",r,i,o);return[a.max(Object(Ih.d)("x",r,i,o),s,u)];case"Mean":return s=Object(Ih.d)("axis",r,i,o),u=Object(Ih.d)("keepDims",r,i,o),[a.mean(Object(Ih.d)("x",r,i,o),s,u)];case"Min":return s=Object(Ih.d)("axis",r,i,o),u=Object(Ih.d)("keepDims",r,i,o),[a.min(Object(Ih.d)("x",r,i,o),s,u)];case"Sum":return s=Object(Ih.d)("axis",r,i,o),u=Object(Ih.d)("keepDims",r,i,o),[a.sum(Object(Ih.d)("x",r,i,o),s,u)];case"All":return s=Object(Ih.d)("axis",r,i,o),u=Object(Ih.d)("keepDims",r,i,o),[a.all(Object(Ih.d)("x",r,i,o),s,u)];case"Any":return s=Object(Ih.d)("axis",r,i,o),u=Object(Ih.d)("keepDims",r,i,o),[a.any(Object(Ih.d)("x",r,i,o),s,u)];case"ArgMax":return s=Object(Ih.d)("axis",r,i,o),[a.argMax(Object(Ih.d)("x",r,i,o),s)];case"ArgMin":return u=Object(Ih.d)("axis",r,i,o),[a.argMin(Object(Ih.d)("x",r,i,o),u)];case"Prod":return s=Object(Ih.d)("axis",r,i,o),u=Object(Ih.d)("keepDims",r,i,o),[a.prod(Object(Ih.d)("x",r,i,o),s,u)];case"Cumprod":s=Object(Ih.d)("axis",r,i,o),u=Object(Ih.d)("exclusive",r,i,o);var l=Object(Ih.d)("reverse",r,i,o);return[a.cumprod(Object(Ih.d)("x",r,i,o),s,u,l)];case"Cumsum":return s=Object(Ih.d)("axis",r,i,o),u=Object(Ih.d)("exclusive",r,i,o),l=Object(Ih.d)("reverse",r,i,o),[a.cumsum(Object(Ih.d)("x",r,i,o),s,u,l)];case"Bincount":return s=Object(Ih.d)("x",r,i,o),u=Object(Ih.d)("weights",r,i,o),l=Object(Ih.d)("size",r,i,o),[a.bincount(s,u,l)];case"DenseBincount":s=Object(Ih.d)("x",r,i,o),u=Object(Ih.d)("weights",r,i,o),l=Object(Ih.d)("size",r,i,o);var h=Object(Ih.d)("binaryOutput",r,i,o);return[a.denseBincount(s,u,l,h)];default:throw TypeError(`Node type ${r.op} is not implemented`)}});case"slice_join":return i(()=>{var[r,i,o,a=c]=[e,t,n];switch(r.op){case"ConcatV2":case"Concat":{var s=Object(Ih.d)("n",r,i,o),u=Object(Ih.d)("axis",r,i,o);let e=Object(Ih.d)("tensors",r,i,o);return e=e.slice(0,s),[a.concat(e,u)]}case"Gather":return s=Object(Ih.d)("x",r,i,o),u=Object(Ih.d)("indices",r,i,o),[a.gather(s,a.cast(u,"int32"),0)];case"GatherV2":s=Object(Ih.d)("axis",r,i,o),u=Object(Ih.d)("batchDims",r,i,o);var l=Object(Ih.d)("x",r,i,o),h=Object(Ih.d)("indices",r,i,o);return[a.gather(l,a.cast(h,"int32"),s,u)];case"Reverse":{var d=Object(Ih.d)("dims",r,i,o);const e=[];for(let t=0;t<d.length;t++)d[t]&&e.push(t);return l=Object(Ih.d)("x",r,i,o),[a.reverse(l,e)]}case"ReverseV2":return h=Object(Ih.d)("axis",r,i,o),s=Object(Ih.d)("x",r,i,o),[a.reverse(s,h)];case"Slice":return u=Object(Ih.d)("begin",r,i,o),l=Object(Ih.d)("size",r,i,o),[a.slice(Object(Ih.d)("x",r,i,o),u,l)];case"StridedSlice":s=Object(Ih.d)("begin",r,i,o),h=Object(Ih.d)("end",r,i,o),u=Object(Ih.d)("strides",r,i,o),l=Object(Ih.d)("beginMask",r,i,o);var p=Object(Ih.d)("endMask",r,i,o),m=Object(Ih.d)("ellipsisMask",r,i,o),g=Object(Ih.d)("newAxisMask",r,i,o),A=Object(Ih.d)("shrinkAxisMask",r,i,o),v=Object(Ih.d)("x",r,i,o);return[a.stridedSlice(v,s,h,u,l,p,m,g,A)];case"Pack":return Object(f.vi)(()=>{var e=Object(Ih.d)("axis",r,i,o);const t=Object(Ih.d)("tensors",r,i,o),n=t[0].shape,s=a.squeeze(t[0]).shape;var u=t.map(e=>{var t=f.Ji.arraysEqual(e.shape,n);if(t||f.Ji.arraysEqual(a.squeeze(e).shape,s))return t?e:a.reshape(e,n);throw new Error("the input tensors shape does not match")});return[a.stack(u,e)]});case"Unpack":return v=Object(Ih.d)("axis",r,i,o),s=Object(Ih.d)("tensor",r,i,o),a.unstack(s,v);case"Tile":return h=Object(Ih.d)("reps",r,i,o),[a.tile(Object(Ih.d)("x",r,i,o),h)];case"Split":case"SplitV":return u=Object(Ih.d)("axis",r,i,o),l=Object(Ih.d)("numOrSizeSplits",r,i,o),p=Object(Ih.d)("x",r,i,o),a.split(p,l,u);case"ScatterNd":return m=Object(Ih.d)("indices",r,i,o),g=Object(Ih.d)("values",r,i,o),A=Object(Ih.d)("shape",r,i,o),[a.scatterND(m,g,A)];case"GatherNd":return s=Object(Ih.d)("x",r,i,o),v=Object(Ih.d)("indices",r,i,o),[a.gatherND(s,v)];case"SparseToDense":return h=Object(Ih.d)("sparseIndices",r,i,o),p=Object(Ih.d)("outputShape",r,i,o),l=Object(Ih.d)("sparseValues",r,i,o),u=Object(Ih.d)("defaultValue",r,i,o),[a.sparseToDense(h,l,p,l.dtype===u.dtype?u:a.cast(u,l.dtype))];default:throw TypeError(`Node type ${r.op} is not implemented`)}});case"sparse":return i(()=>{var[r,i,o,a=c]=[e,t,n];switch(r.op){case"SparseFillEmptyRows":var{outputIndices:s,outputValues:u,emptyRowIndicator:l,reverseIndexMap:h}=a.sparse.sparseFillEmptyRows(Object(Ih.d)("indices",r,i,o),Object(Ih.d)("values",r,i,o),Object(Ih.d)("denseShape",r,i,o),Object(Ih.d)("defaultValue",r,i,o));return[s,u,l,h];case"SparseReshape":var{outputIndices:s,outputShape:u}=a.sparse.sparseReshape(Object(Ih.d)("inputIndices",r,i,o),Object(Ih.d)("inputShape",r,i,o),Object(Ih.d)("newShape",r,i,o));return[s,u];case"SparseSegmentMean":return[a.sparse.sparseSegmentMean(Object(Ih.d)("data",r,i,o),Object(Ih.d)("indices",r,i,o),Object(Ih.d)("segmentIds",r,i,o))];case"SparseSegmentSum":return[a.sparse.sparseSegmentSum(Object(Ih.d)("data",r,i,o),Object(Ih.d)("indices",r,i,o),Object(Ih.d)("segmentIds",r,i,o))];default:throw TypeError(`Node type ${r.op} is not implemented`)}});case"spectral":return i(()=>{var[r,i,o,a=c]=[e,t,n];switch(r.op){case"FFT":return[a.fft(Object(Ih.d)("x",r,i,o))];case"IFFT":return[a.ifft(Object(Ih.d)("x",r,i,o))];case"RFFT":return[a.rfft(Object(Ih.d)("x",r,i,o))];case"IRFFT":return[a.irfft(Object(Ih.d)("x",r,i,o))];default:throw TypeError(`Node type ${r.op} is not implemented`)}});case"string":return i(()=>{var[r,i,o,a=c]=[e,t,n];switch(r.op){case"StringNGrams":var{nGrams:s,nGramsSplits:u}=a.string.stringNGrams(Object(Ih.d)("data",r,i,o),Object(Ih.d)("dataSplits",r,i,o),Object(Ih.d)("separator",r,i,o),Object(Ih.d)("nGramWidths",r,i,o),Object(Ih.d)("leftPad",r,i,o),Object(Ih.d)("rightPad",r,i,o),Object(Ih.d)("padWidth",r,i,o),Object(Ih.d)("preserveShortSequences",r,i,o));return[s,u];case"StringSplit":var{indices:s,values:u,shape:l}=a.string.stringSplit(Object(Ih.d)("input",r,i,o),Object(Ih.d)("delimiter",r,i,o),Object(Ih.d)("skipEmpty",r,i,o));return[s,u,l];case"StringToHashBucketFast":return[a.string.stringToHashBucketFast(Object(Ih.d)("input",r,i,o),Object(Ih.d)("numBuckets",r,i,o))];default:throw TypeError(`Node type ${r.op} is not implemented`)}});case"transformation":return i(()=>{var[r,i,o,a=c]=[e,t,n];switch(r.op){case"Cast":return[a.cast(Object(Ih.d)("x",r,i,o),Object(Ih.d)("dtype",r,i,o))];case"ExpandDims":var s=Object(Ih.d)("axis",r,i,o);return[a.expandDims(Object(Ih.d)("x",r,i,o),s)];case"Squeeze":return s=Object(Ih.d)("axis",r,i,o),[a.squeeze(Object(Ih.d)("x",r,i,o),s)];case"Reshape":return[a.reshape(Object(Ih.d)("x",r,i,o),Object(Ih.d)("shape",r,i,o))];case"MirrorPad":return[a.mirrorPad(Object(Ih.d)("x",r,i,o),Object(Ih.d)("padding",r,i,o),Object(Ih.d)("mode",r,i,o))];case"PadV2":case"Pad":return[a.pad(Object(Ih.d)("x",r,i,o),Object(Ih.d)("padding",r,i,o),Object(Ih.d)("constantValue",r,i,o))];case"SpaceToBatchND":s=Object(Ih.d)("blockShape",r,i,o);var u=Object(Ih.d)("paddings",r,i,o);return[a.spaceToBatchND(Object(Ih.d)("x",r,i,o),s,u)];case"BatchToSpaceND":return s=Object(Ih.d)("blockShape",r,i,o),u=Object(Ih.d)("crops",r,i,o),[a.batchToSpaceND(Object(Ih.d)("x",r,i,o),s,u)];case"DepthToSpace":return s=Object(Ih.d)("blockSize",r,i,o),u=Object(Ih.d)("dataFormat",r,i,o).toUpperCase(),[a.depthToSpace(Object(Ih.d)("x",r,i,o),s,u)];case"BroadcastTo":return[a.broadcastTo(Object(Ih.d)("x",r,i,o),Object(Ih.d)("shape",r,i,o))];case"BroadcastArgs":return[a.broadcastArgs(Object(Ih.d)("s0",r,i,o),Object(Ih.d)("s1",r,i,o))];default:throw TypeError(`Node type ${r.op} is not implemented`)}});case"hash_table":return(async(e,t,n,r)=>{switch(e.op){case"HashTable":case"HashTableV2":return null!=(o=r.getHashTableHandleByName(e.name))?[o]:(o=Object(Ih.d)("keyDType",e,t,n),i=Object(Ih.d)("valueDType",e,t,n),o=new Qh(o,i),r.addHashTable(e.name,o),[o.handle]);case"InitializeTable":case"InitializeTableV2":case"LookupTableImport":case"LookupTableImportV2":{var i=Object(Ih.d)("tableHandle",e,t,n,r),o=Object(Ih.d)("keys",e,t,n),a=Object(Ih.d)("values",e,t,n);const s=r.getHashTableById(i.id);return[await s.import(o,a)]}case"LookupTableFind":case"LookupTableFindV2":{i=Object(Ih.d)("tableHandle",e,t,n,r),o=Object(Ih.d)("keys",e,t,n),a=Object(Ih.d)("defaultValue",e,t,n);const s=r.getHashTableById(i.id);return[await s.find(o,a)]}case"LookupTableSize":case"LookupTableSizeV2":i=Object(Ih.d)("tableHandle",e,t,n,r);return[r.getHashTableById(i.id).tensorSize()];default:throw TypeError(`Node type ${e.op} is not implemented`)}})(e,t,n,r);case"custom":const o=Object(jh.b)(e.op);if(o&&o.customExecutor)return o.customExecutor(new Mh(e,t,n));throw TypeError(`Custom op ${e.op} is not registered.`);default:throw TypeError(`Unknown op '${e.op}'. File an issue at https://github.com/tensorflow/tfjs/issues so we can add it, or register a custom execution with tf.registerOp()`)}})(e,t,n);return f.Ji.isPromise(o)?o.then(e=>[].concat(e)):[].concat(o)}class qh{constructor(e={},t={},n={},r={}){this.weightMap=e,this.tensorArrayMap=t,this.tensorListMap=n,this.functionMap=r,this.rootContext={id:0,frameName:"",iterationId:0},this.contexts=[this.rootContext],this.lastId=0,this.generateCurrentContextIds()}newFrame(e,t){return{id:e,frameName:t,iterationId:0}}set currentContext(e){this.contexts!==e&&(this.contexts=e,this.generateCurrentContextIds())}get currentContext(){return this.contexts}get currentContextId(){return this._currentContextIds[0]}get currentContextIds(){return this._currentContextIds}generateCurrentContextIds(){const e=[];for(let n=0;n<this.contexts.length-1;n++){var t=this.contexts.slice(0,this.contexts.length-n);e.push(this.contextIdforContexts(t))}e.push(""),this._currentContextIds=e}contextIdforContexts(e){return e?e.map(e=>0===e.id&&0===e.iterationId?"":e.frameName+"-"+e.iterationId).join("/"):""}enterFrame(e){this.contexts&&(this.lastId++,this.contexts=this.contexts.slice(),this.contexts.push(this.newFrame(this.lastId,e)),this._currentContextIds.unshift(this.contextIdforContexts(this.contexts)))}exitFrame(){if(!(this.contexts&&1<this.contexts.length))throw new Error("Cannot exit frame, the context is empty");this.contexts=this.contexts.slice(),this.contexts.splice(-1),this.currentContextIds.shift()}nextIteration(){if(!(this.contexts&&0<this.contexts.length))throw new Error("Cannot increase frame iteration, the context is empty");{this.contexts=this.contexts.slice(),this.lastId++;const e=Object.assign({},this.contexts[this.contexts.length-1]);e.iterationId+=1,e.id=this.lastId,this.contexts.splice(-1,1,e),this._currentContextIds.splice(0,1,this.contextIdforContexts(this.contexts))}}getWeight(e){return this.weightMap[e]}addTensorArray(e){this.tensorArrayMap[e.id]=e}getTensorArray(e){return this.tensorArrayMap[e]}addTensorList(e){this.tensorListMap[e.id]=e}getTensorList(e){return this.tensorListMap[e]}dispose(e){for(const t in this.tensorArrayMap)this.tensorArrayMap[t].clearAndClose(e);for(const t in this.tensorListMap)this.tensorListMap[t].clearAndClose(e)}}
/**
 * @license
 * Copyright 2019 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function Gh(e,t,n,r){const i=new Set,o=[];let a=null,s=null;const u=new Set,c=Object.keys(e).map(e=>Object(Ih.g)(e)[0]);let l=[];null!=r&&(l=r.map(e=>Object(Ih.g)(e.name)[0]));const h=[...t];for(;0<h.length;){const e=h.pop();(Xh(e)||(f=e,0<=Kh.indexOf(f.op))||(f=e,0<=Yh.indexOf(f.op)))&&null==a&&(a=e,s=a.children.map(e=>e.name).filter(e=>i.has(e))),i.add(e.name),null==n[e.name]&&-1===c.indexOf(e.name)&&-1===l.indexOf(e.name)&&(0===e.inputs.length?o.push(e.name):e.inputs.forEach(e=>{u.has(e.name)||(u.add(e.name),h.push(e))}))}var f;
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */return{inputs:e,outputs:t,usedNodes:i,missingInputs:o,dynamicNode:a,syncInputs:s}}const Wh=["Switch","Merge","Enter","Exit","NextIteration","StatelessIf","StatelessWhile","if","While"],Kh=["NonMaxSuppressionV2","NonMaxSuppressionV3","NonMaxSuppressionV5","Where"],Yh=["HashTable","HashTableV2","LookupTableImport","LookupTableImportV2","LookupTableFind","LookupTableFindV2","LookupTableSize","LookupTableSizeV2"];function Xh(e){return 0<=Wh.indexOf(e.op)}class Jh{constructor(e,t){this.graph=e,this.parent=t,this.compiledMap=new Map,this._weightMap={},this.SEPERATOR=",",this._functions={},this._functionExecutorMap={},this.keepIntermediateTensors=!1,this._outputs=e.outputs,this._inputs=e.inputs,this._initNodes=e.initNodes,this._signature=e.signature,this._functions=e.functions,null!=e.functions&&Object.keys(e.functions).forEach(t=>{this._functionExecutorMap[t]=new Jh(e.functions[t],this)})}get weightIds(){return this.parent?this.parent.weightIds:this._weightIds}get functionExecutorMap(){return this.parent?this.parent.functionExecutorMap:this._functionExecutorMap}get weightMap(){return this.parent?this.parent.weightMap:this._weightMap}set weightMap(e){var t=Object.keys(e).map(t=>e[t].map(e=>e.id));this._weightIds=[].concat(...t),this._weightMap=e}set resourceManager(e){this._resourceManager=e}get inputs(){return this._inputs.map(e=>({name:e.name,shape:e.attrParams.shape?e.attrParams.shape.value:void 0,dtype:e.attrParams.dtype?e.attrParams.dtype.value:void 0}))}get outputs(){return this._outputs.map(e=>({name:e.name,shape:e.attrParams.shape?e.attrParams.shape.value:void 0,dtype:e.attrParams.dtype?e.attrParams.dtype.value:void 0}))}get inputNodes(){return this._inputs.map(e=>e.signatureKey||e.name)}get outputNodes(){return this._outputs.map(e=>{var t=e.signatureKey||e.name;return e.defaultOutput?t+":"+e.defaultOutput:t})}get functions(){return Object.keys(this._functions).reduce((e,t)=>(e[t]=this._functions[t].signature,e),{})}getCompilationKey(e,t){const n=e.map(e=>e.name).sort(),r=t.map(e=>e.name).sort();return n.join(this.SEPERATOR)+"--"+r.join(this.SEPERATOR)}compile(e,t){var n=Gh(e,t,this.weightMap,this._initNodes),{missingInputs:r,dynamicNode:i,syncInputs:o}=n;if(null!=i)throw new Error(`This execution contains the node '${i.name}', which has the dynamic op '${i.op}'. Please use model.executeAsync() instead. Alternatively, to avoid the dynamic ops, specify the inputs [${o}]`);if(0<r.length)throw i=t.map(e=>e.name),o=Object.keys(e),new Error(`Cannot compute the outputs [${i}] from the provided inputs [${o}]. Missing the following inputs: [${r}]`);{var a=this.graph,s=this.weightMap;const{usedNodes:e,inputs:r}=t=n,i=[],o=Object.keys(r).map(e=>Object(Ih.g)(e)[0]).map(e=>a.nodes[e]),u=a.initNodes,c=(o.forEach(t=>{e.has(t.name)&&i.push(t)}),a.weights.forEach(t=>{e.has(t.name)&&i.push(t)}),null!=u&&u.forEach(t=>{e.has(t.name)&&i.push(t)}),new Set),l=[];for(;0<i.length;){const t=i.pop();c.add(t.name),s[t.name]||l.push(t),t.children.forEach(t=>{!c.has(t.name)&&e.has(t.name)&&t.inputs.every(e=>c.has(e.name))&&i.push(t)})}return l}}cloneAndKeepTensor(e){return null==e?null:(e=e.clone(),Object(f.Qf)(e),e)}cloneTensorList(e){return e?e.map(e=>this.cloneAndKeepTensor(e)):null}cloneTensorMap(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,this.cloneTensorList(t)]))}execute(e,t){this.disposeIntermediateTensors(),e=this.mapInputs(e);const n=Object.keys(e).sort();this.checkInputs(e),this.checkInputShapeAndType(e),t=this.mapOutputs(t),this.checkOutputs(t);var r=n.map(e=>this.graph.nodes[Object(Ih.g)(e)[0]]);const i=t.map(e=>Object(Ih.g)(e)[0]);let o=i.map(e=>this.graph.nodes[e]);0===o.length&&(o=this._outputs),r=this.getCompilationKey(r,o);let a=this.compiledMap.get(r);null==a&&(a=this.compile(e,o),this.compiledMap.set(r,a));try{this.keepIntermediateTensors=Object(f.hf)().getBool("KEEP_INTERMEDIATE_TENSORS")}catch(t){this.keepIntermediateTensors=!1}const s={},u={};return Object(f.vi)(()=>{const n=new qh(this.weightMap,s,u,this.functionExecutorMap),r=Object.assign({},this.weightMap);this.keepIntermediateTensors&&(this.clonedTensorsMap=this.cloneTensorMap(this.weightMap)),Object.keys(e).forEach(t=>{var[n,i]=Object(Ih.g)(t);const o=[];o[i]=e[t],r[n]=o,this.keepIntermediateTensors&&(this.clonedTensorsMap[n]=this.cloneTensorList(o))});var o=this.getFrozenTensorIds(r),c={};for(let e=0;e<a.length;e++){var l=a[e];if(!r[l.name]){var h=Vh(l,r,n,this._resourceManager);if(f.Ji.isPromise(h))throw new Error(`The execution of the op '${l.op}' returned a promise. Please use model.executeAsync() instead.`);r[l.name]=h,this.keepIntermediateTensors&&(this.clonedTensorsMap[l.name]=this.cloneTensorList(h)),this.checkTensorForDisposal(l.name,l,r,n,o,i,c)}}return null==this.parent&&n.dispose(o),t.map(e=>Object(Ih.e)(e,r,n))})}getFrozenTensorIds(e){var t=[].concat.apply([],Object.keys(e).map(t=>e[t]).map(e=>e.map(e=>e.id)));return new Set(t)}checkTensorForDisposal(e,t,n,r,i,o,a){"control"!==t.category&&-1===o.indexOf(e)&&(n[e].forEach(e=>{null!=e&&(a[e.id]=(a[e.id]||0)+t.children.length)}),t.inputs.forEach(e=>{if("control"!==e.category){const t=Object(Ih.f)(e.name,n,r);null!=t&&t.forEach(e=>{var t;!e||e.kept||i.has(e.id)||(1===(t=a[e.id])?(e.dispose(),delete a[e.id]):null!=t&&a[e.id]--)})}}))}async executeAsync(e,t){return this._executeAsync(e,t)}disposeIntermediateTensors(){this.clonedTensorsMap&&(Object.values(this.clonedTensorsMap).forEach(e=>{for(const t of e)t&&!t.isDisposed&&t.dispose()}),this.clonedTensorsMap=null)}getIntermediateTensors(){return this.clonedTensorsMap}async _executeAsync(e,t,n=!1,r={},i={}){this.disposeIntermediateTensors(),n||(e=this.mapInputs(e),this.checkInputs(e),this.checkInputShapeAndType(e),t=this.mapOutputs(t),this.checkOutputs(t));try{this.keepIntermediateTensors=Object(f.hf)().getBool("KEEP_INTERMEDIATE_TENSORS")}catch(t){this.keepIntermediateTensors=!1}const o=new qh(this.weightMap,r,i,this.functionExecutorMap),a=(this.keepIntermediateTensors&&(this.clonedTensorsMap=this.cloneTensorMap(this.weightMap)),await this.executeWithControlFlow(e,o,t,n)),s=t.map(e=>Object(Ih.e)(e,a,o));r=s.map(e=>e.id),i=Object.keys(e).map(t=>e[t].id);const u=new Set([...r,...i,...this.weightIds]);return Object.values(a).forEach(e=>{e.forEach(e=>{!e||e.isDisposed||u.has(e.id)||e.dispose()})}),null==this.parent&&o.dispose(u),s}async executeFunctionAsync(e,t,n){return e=e.reduce((e,t,n)=>(e[this.inputs[n].name]=t,e),{}),this._executeAsync(e,this.outputNodes,!0,t,n)}async executeWithControlFlow(e,t,n,r){const i=Object.keys(e);var o=i.map(e=>this.graph.nodes[Object(Ih.g)(e)[0]]);const a=n.map(e=>Object(Ih.g)(e)[0]);let s=a.map(e=>this.graph.nodes[e]);0===s.length&&(s=this._outputs);var{usedNodes:u,missingInputs:n,dynamicNode:c,syncInputs:l}=Gh(e,s,this.weightMap,this._initNodes),h=[...o,...this.graph.weights,...this._initNodes||[]].map(e=>({node:e,contexts:t.currentContext}));const f=Object.assign({},this.weightMap);Object.keys(e).forEach(t=>{var[n,r]=Object(Ih.g)(t);const i=[];i[r]=e[t],f[n]=i});for(var d={},p=this.getFrozenTensorIds(f),m={};0<h.length;){var g=this.processStack(o,h,t,f,m,p,a,d,u);await Promise.all(g)}var A=s.filter(e=>!Xh(e)&&!Object(Ih.e)(e.name,f,t)).map(e=>e.name);if(0<A.length){throw new Error(`Cannot compute the outputs [${A}] from the provided inputs [${i}]. Consider providing the following inputs: [${n}]. `+(null!=c?`Alternatively, to avoid the dynamic ops, use model.execute() and specify the inputs [${l}]`:""))}return f}processStack(e,t,n,r,i,o,a,s,u){const c=[];for(;0<t.length;){const e=t.pop();n.currentContext=e.contexts;let l="";if("Enter"===e.node.op&&Object(Ih.d)("isConstant",e.node,r,n)&&([l]=Object(Ih.b)(e.node.name,n)),null==r[e.node.name]){const h=Vh(e.node,r,n,this._resourceManager),d=(l||([l]=Object(Ih.b)(e.node.name,n)),n.currentContext);f.Ji.isPromise(h)?c.push(h.then(c=>(r[l]=c,this.keepIntermediateTensors&&(this.clonedTensorsMap[l]=this.cloneTensorList(c)),n.currentContext=d,this.checkTensorForDisposal(l,e.node,r,n,o,a,s),this.processChildNodes(e.node,t,n,r,i,u),c))):(r[l]=h,this.keepIntermediateTensors&&(this.clonedTensorsMap[l]=this.cloneTensorList(h)),this.checkTensorForDisposal(l,e.node,r,n,o,a,s),this.processChildNodes(e.node,t,n,r,i,u))}else this.processChildNodes(e.node,t,n,r,i,u)}return c}processChildNodes(e,t,n,r,i,o){e.children.forEach(e=>{var[a]=Object(Ih.b)(e.name,n);!i[a]&&o.has(e.name)&&("Merge"===e.op?e.inputNames.some(e=>!!Object(Ih.e)(e,r,n))&&(i[a]=!0,t.push({contexts:n.currentContext,node:e})):e.inputNames.every(e=>!!Object(Ih.e)(e,r,n))&&(i[a]=!0,t.push({contexts:n.currentContext,node:e})))})}dispose(){Object.keys(this.weightMap).forEach(e=>this.weightMap[e].forEach(e=>e.dispose()))}checkInputShapeAndType(e){Object.keys(e).forEach(t=>{const n=e[t];var[t]=Object(Ih.g)(t);const r=this.graph.nodes[t];if(r.attrParams.shape&&r.attrParams.shape.value){const e=r.attrParams.shape.value;t=e.length===n.shape.length&&n.shape.every((t,n)=>-1===e[n]||e[n]===t),f.Ji.assert(t,()=>`The shape of dict['${r.name}'] provided in model.execute(dict) must be [${e}], but was [${n.shape}]`)}r.attrParams.dtype&&r.attrParams.dtype.value&&f.Ji.assert(n.dtype===r.attrParams.dtype.value,()=>`The dtype of dict['${r.name}'] provided in model.execute(dict) must be `+r.attrParams.dtype.value+", but was "+n.dtype)})}mapInputs(e){const t={};for(const r in e){var n=null==(n=null==(n=this._signature)?void 0:n.inputs)?void 0:n[r];null!=n?t[n.name]=e[r]:t[r]=e[r]}return t}checkInputs(e){if(0<(e=Object.keys(e).filter(e=>{var[e]=Object(Ih.g)(e);return null==this.graph.nodes[e]})).length)throw new Error(`The dict provided in model.execute(dict) has keys: [${e}] that are not part of graph`)}mapOutputs(e){return e.map(e=>{var t=null==(t=null==(t=this._signature)?void 0:t.outputs)?void 0:t[e];return null!=t?t.name:e},{})}checkOutputs(e){e.forEach(e=>{var[t]=Object(Ih.g)(e);if(!this.graph.nodes[t])throw new Error(`The output '${e}' is not found in the graph`)})}}class Zh{constructor(e={},t={}){this.hashTableNameToHandle=e,this.hashTableMap=t}addHashTable(e,t){this.hashTableNameToHandle[e]=t.handle,this.hashTableMap[t.id]=t}getHashTableHandleByName(e){return this.hashTableNameToHandle[e]}getHashTableById(e){return this.hashTableMap[e]}dispose(){for(const e in this.hashTableMap)this.hashTableMap[e].clearAndClose(),delete this.hashTableMap[e];for(const e in this.hashTableNameToHandle)this.hashTableNameToHandle[e].dispose(),delete this.hashTableNameToHandle[e]
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */}}class ef{constructor(e,t={},n=f.Lf){this.modelUrl=e,this.loadOptions=t,this.version="n/a",this.io=n,null==t&&(this.loadOptions={}),this.resourceManager=new Zh}get modelVersion(){return this.version}get inputNodes(){return this.executor.inputNodes}get outputNodes(){return this.executor.outputNodes}get inputs(){return this.executor.inputs}get outputs(){return this.executor.outputs}get weights(){return this.executor.weightMap}get metadata(){return this.artifacts.userDefinedMetadata}get modelSignature(){return this.signature}get modelStructuredOutputKeys(){return this.structuredOutputKeys}findIOHandler(){var e=this.modelUrl;if(null!=e.load)this.handler=e;else if(null!=this.loadOptions.requestInit)this.handler=this.io.browserHTTPRequest(e,this.loadOptions);else{const t=this.io.getLoadHandlers(e,this.loadOptions);if(0===t.length)t.push(this.io.browserHTTPRequest(e,this.loadOptions));else if(1<t.length)throw new Error(`Found more than one (${t.length}) load handlers for URL '${[e]}'`);this.handler=t[0]}}load(){if(this.findIOHandler(),null==this.handler.load)throw new Error("Cannot proceed with model loading because the IOHandler provided does not have the `load` method implemented.");const e=this.handler.load();return f.Ji.isPromise(e)?e.then(e=>this.loadSync(e)):this.loadSync(e)}loadSync(e){this.artifacts=e;var t=this.artifacts.modelTopology;let n=this.artifacts.signature;null!=this.artifacts.userDefinedMetadata&&(null!=(r=this.artifacts.userDefinedMetadata).signature&&(n=r.signature),null!=r.structuredOutputKeys&&(this.structuredOutputKeys=r.structuredOutputKeys)),this.signature=n,this.version=t.versions.producer+"."+t.versions.minConsumer;var r=this.io.decodeWeights(this.artifacts.weightData,this.artifacts.weightSpecs);return this.executor=new Jh(Bh.a.Instance.transformGraph(t,this.signature)),this.executor.weightMap=this.convertTensorMapToTensorsMap(r),this.executor.resourceManager=this.resourceManager,null!=e.modelInitializer&&null!=e.modelInitializer.node&&(t=Bh.a.Instance.transformGraph(e.modelInitializer),this.initializer=new Jh(t),this.initializer.weightMap=this.executor.weightMap,this.initializer.resourceManager=this.resourceManager,this.initializerSignature=e.initializerSignature),!0}async save(e,t){if("string"==typeof e){var n=this.io.getSaveHandlers(e);if(0===n.length)throw new Error(`Cannot find any save handlers for URL '${e}'`);if(1<n.length)throw new Error(`Found more than one (${n.length}) save handlers for URL '${e}'`);e=n[0]}if(null==e.save)throw new Error("GraphModel.save() cannot proceed because the IOHandler provided does not have the `save` attribute defined.");return e.save(this.artifacts)}addStructuredOutputNames(e){if(this.structuredOutputKeys){const t=e instanceof f.zd?[e]:e,n={};return t.forEach((e,t)=>n[this.structuredOutputKeys[t]]=e),n}return e}predict(e,t){return e=this.execute(e,this.outputNodes),this.addStructuredOutputNames(e)}async predictAsync(e,t){return e=await this.executeAsync(e,this.outputNodes),this.addStructuredOutputNames(e)}normalizeInputs(e){if(!(e instanceof f.zd||Array.isArray(e))){var t=null==(r=this.signature)?void 0:r.inputs;if(null!=t)for(const r in t){var n=t[r];null!=n.resourceId&&(e[r]=this.resourceIdToCapturedInput[n.resourceId])}return e}e=Array.isArray(e)?e:[e];var r=Object.keys(this.resourceIdToCapturedInput).length;if(e.length+r!==this.inputNodes.length)throw new Error(`Input tensor count mismatch, the graph model has ${this.inputNodes.length-r} non-resource placeholders, while there are ${e.length} input tensors provided.`);let i=0;return this.inputNodes.reduce((t,n)=>{var r=null==(r=null==(r=null==(r=this.signature)?void 0:r.inputs)?void 0:r[n])?void 0:r.resourceId;return t[n]=null!=r?this.resourceIdToCapturedInput[r]:e[i++],t},{})}normalizeOutputs(e){return e=e||this.outputNodes,Array.isArray(e)?e:[e]}executeInitializerGraph(){return null==this.initializer?[]:null==this.initializerSignature?this.initializer.execute({},[]):this.initializer.execute({},Object.keys(this.initializerSignature.outputs))}async executeInitializerGraphAsync(){return null==this.initializer?[]:null==this.initializerSignature?this.initializer.executeAsync({},[]):this.initializer.executeAsync({},Object.keys(this.initializerSignature.outputs))}setResourceIdToCapturedInput(e){if(this.resourceIdToCapturedInput={},this.initializerSignature){var t=this.initializerSignature.outputs,n=Object.keys(t);for(let i=0;i<n.length;i++){var r=t[n[i]];this.resourceIdToCapturedInput[r.resourceId]=e[i]}}}execute(e,t){return null==this.resourceIdToCapturedInput&&this.setResourceIdToCapturedInput(this.executeInitializerGraph()),e=this.normalizeInputs(e),t=this.normalizeOutputs(t),1<(e=this.executor.execute(e,t)).length?e:e[0]}async executeAsync(e,t){return null==this.resourceIdToCapturedInput&&this.setResourceIdToCapturedInput(await this.executeInitializerGraphAsync()),e=this.normalizeInputs(e),t=this.normalizeOutputs(t),1<(e=await this.executor.executeAsync(e,t)).length?e:e[0]}getIntermediateTensors(){return this.executor.getIntermediateTensors()}disposeIntermediateTensors(){this.executor.disposeIntermediateTensors()}convertTensorMapToTensorsMap(e){return Object.keys(e).reduce((t,n)=>(t[n]=[e[n]],t),{})}dispose(){this.executor.dispose(),this.initializer&&(this.initializer.dispose(),this.resourceIdToCapturedInput&&Object(f.Ve)(this.resourceIdToCapturedInput)),this.resourceManager.dispose()}}async function tf(e,t={},n=f.Lf){if(null==e)throw new Error("modelUrl in loadGraphModel() cannot be null. Please provide a url or an IOHandler that loads the model");(t=null==t?{}:t).fromTFHub&&"string"==typeof e&&(e=function(e){return e.endsWith("/")||(e+="/"),e+"model.json?tfjs-format=file"}
/** @license See the LICENSE file. */(e));const r=new ef(e,t,n);return await r.load(),r}function nf(e){if(null==e)throw new Error("modelUrl in loadGraphModelSync() cannot be null. Please provide model artifacts or an IOHandler that loads the model");let t;if(e instanceof Array){var[n,r]=e;if(!n)throw new Error("modelJSON must be the first element of the array");if(!(r&&r instanceof ArrayBuffer))throw new Error("An ArrayBuffer of weights must be the second element of the array");if(!("modelTopology"in n))throw new Error("Model JSON is missing 'modelTopology'");if(!("weightsManifest"in n))throw new Error("Model JSON is missing 'weightsManifest'");var i=f.Lf.getWeightSpecs(n.weightsManifest),n=f.Lf.getModelArtifactsForJSONSync(n,i,r);t=f.Lf.fromMemorySync(n)}else if("load"in e)t=e;else{if(!("modelTopology"in e&&"weightSpecs"in e&&"weightData"in e))throw new Error("Unknown model format");t=f.Lf.fromMemorySync(e)}const o=new ef(t);return o.load(),o}
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */var rf=n(73),of=n(55),af=n(83);
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * =============================================================================
 */class sf{constructor(){this.size=null}batch(e,t=!0){const n=this;let r;return f.Ji.assert(0<e,()=>"batchSize needs to be positive, but it is\n      "+e),uf(async()=>(await n.iterator()).columnMajorBatch(e,t,hf),r=this.size===1/0||null==this.size?this.size:t?Math.ceil(this.size/e):Math.floor(this.size/e))}concatenate(e){const t=this;let n;return uf(async()=>(await t.iterator()).concatenate(await e.iterator()),n=this.size===1/0||e.size===1/0?1/0:null!=this.size&&null!=e.size?this.size+e.size:null)}filter(e){const t=this;let n;return uf(async()=>(await t.iterator()).filter(t=>f.vi(()=>e(t))),n=this.size===1/0?1/0:null)}async forEachAsync(e){return(await this.iterator()).forEachAsync(e)}map(e){const t=this;return uf(async()=>(await t.iterator()).map(t=>f.vi(()=>e(t))),this.size)}mapAsync(e){const t=this;return uf(async()=>(await t.iterator()).mapAsync(e),this.size)}prefetch(e){if(null==e)throw new RangeError("`Dataset.prefetch()` requires bufferSize to be specified.");const t=this;return uf(async()=>(await t.iterator()).prefetch(e),this.size)}repeat(e){const t=this;let n;return uf(async()=>{const n=Object(of.e)(async()=>({value:await t.iterator(),done:!1}));return Object(of.d)(n.take(e))},n=null!=this.size&&0<e?this.size*e:0===e?0:null!=this.size&&(void 0===e||e<0)?1/0:null)}skip(e){const t=this;let n;return uf(async()=>(await t.iterator()).skip(e),n=null!=this.size&&0<=e&&this.size>=e?this.size-e:null!=this.size&&(this.size<e||void 0===e||e<0)?0:null)}shuffle(e,t,n=!0){if(null==e||e<0)throw null==this.size?new RangeError("`Dataset.shuffle()` requires bufferSize to be specified."):new RangeError(`\`Dataset.shuffle()\` requires bufferSize to be specified.  If your data fits in main memory (for regular JS objects), and/or GPU memory (for \`tf.Tensor\`s), consider setting bufferSize to the dataset size (${this.size} elements)`);const r=this,i=rf.alea(t||f.Ji.now().toString());return uf(async()=>{let t=i.int32();return n&&(t+=i.int32()),(await r.iterator()).shuffle(e,t.toString())},this.size)}take(e){const t=this;let n;return uf(async()=>(await t.iterator()).take(e),n=null!=this.size&&this.size>e?e:null!=this.size&&this.size<=e?this.size:null)}async toArray(){if(this.size===1/0)throw new Error("Can not convert infinite data stream to array.");return(await this.iterator()).toArray()}async toArrayForTest(){if(this.size===1/0)throw new Error("Can not convert infinite data stream to array.");return(await this.iterator()).toArrayForTest()}}function uf(e,t=null){return new class extends sf{constructor(){super(...arguments),this.size=t}async iterator(){return e()}}}function cf(e){return uf(async()=>Object(of.f)(e),e.length)}function lf(e){if(!Object(af.e)(e))throw new Error("The argument to zip() must be an object or array.");let t;if(Array.isArray(e))for(let n=0;n<e.length;n++)t=null==t?e[n].size:Math.min(t,e[n].size);else if(e instanceof Object)for(const n in e)t=null==t?e[n].size:Math.min(t,e[n].size);return uf(async()=>{var t=await Object(af.c)(e,e=>{if(e instanceof sf)return{value:e.iterator(),recurse:!1};if(Object(af.e)(e))return{value:null,recurse:!0};throw new Error("Leaves of the structure passed to zip() must be Datasets, not primitives.")});return Object(of.g)(t,of.c.SHORTEST)},t)}function hf(e){var t;return null===e?null:(t=e[0],Object(af.a)(t)?{value:function(e){if(0===e.length)throw new Error("Can't make a batch of zero elements.");return e[0]instanceof f.zd?f.di(e):f.mi(e)}
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * =============================================================================
 */(e),recurse:!1}:{value:null,recurse:!0})}sf.MAX_BUFFER_SIZE=1e4;class ff extends sf{constructor(e){super(),this.input=e}async iterator(){return(await this.input.iterator()).decodeUTF8().split("\n").map(e=>e.endsWith("\r")?e.slice(0,-1):e)}}
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * =============================================================================
 */const df=Symbol("out"),pf=Symbol("field"),mf=Symbol("quote"),gf=Symbol("quoteafterquote"),Af=Symbol("quoteinquote");class vf extends sf{constructor(e,t){super(),this.input=e,this.hasHeader=!0,this.fullColumnNames=null,this.columnNamesValidated=!1,this.columnConfigs=null,this.configuredColumnsOnly=!1,this.delimiter=",",this.delimWhitespace=!1,this.base=new ff(e),this.hasHeader=!1!==(t=t||{}).hasHeader,this.fullColumnNames=t.columnNames,this.columnConfigs=t.columnConfigs,this.configuredColumnsOnly=t.configuredColumnsOnly,t.delimWhitespace?(f.Ji.assert(null==t.delimiter,()=>"Delimiter should not be provided when delimWhitespace is true."),this.delimWhitespace=!0,this.delimiter=" "):this.delimiter=t.delimiter||","}async columnNames(){return this.columnNamesValidated||await this.setColumnNames(),this.configuredColumnsOnly?Object.keys(this.columnConfigs):this.fullColumnNames}async setColumnNames(){const e=await this.maybeReadHeaderLine();if(!this.fullColumnNames&&!e)throw new Error("Column names must be provided if there is no header line.");this.fullColumnNames&&e&&f.Ji.assert(e.length===this.fullColumnNames.length,()=>"The length of provided columnNames ("+this.fullColumnNames.length.toString()+") does not match the length of the header line read from file ("+e.length.toString()+")."),this.fullColumnNames||(this.fullColumnNames=e);const t=this.fullColumnNames.reduce((e,t)=>(e[t]=e[t]+1||1,e),{}),n=Object.keys(t).filter(e=>1<t[e]);if(f.Ji.assert(0===n.length,()=>"Duplicate column names found: "+n.toString()),this.columnConfigs)for(const e of Object.keys(this.columnConfigs))if(-1===this.fullColumnNames.indexOf(e))throw new Error('The key "'+e+'" provided in columnConfigs does not match any of the column names ('+this.fullColumnNames.toString()+").");this.columnNamesValidated=!0}async maybeReadHeaderLine(){if(this.hasHeader){const t=await this.base.iterator();var e=await t.next();if(e.done)throw new Error("No data was found for CSV parsing.");return e=e.value,this.parseRow(e,!1)}return null}async iterator(){this.columnNamesValidated||await this.setColumnNames();let e=await this.base.iterator();return(e=this.hasHeader?e.skip(1):e).map(e=>this.makeDataElement(e))}makeDataElement(e){var t=this.parseRow(e);const n={},r={};for(let u=0;u<this.fullColumnNames.length;u++){var i=this.fullColumnNames[u],o=this.columnConfigs?this.columnConfigs[i]:null;if(!this.configuredColumnsOnly||o){var a=t[u];let c=null;if(""===a)if(o&&void 0!==o.default)c=o.default;else{if(o&&(o.required||o.isLabel))throw new Error(`Required column ${i} is empty in this line: `+e);c=void 0}else{var s=Number(a);if(isNaN(s))c=o&&"bool"===o.dtype?this.getBoolean(a):a;else if(o&&o.dtype)switch(o.dtype){case"float32":c=s;break;case"int32":c=Math.floor(s);break;case"bool":c=this.getBoolean(a);break;default:c=s}else c=s}o&&o.isLabel?r[i]=c:n[i]=c}}return 0===Object.keys(r).length?n:{xs:n,ys:r}}getBoolean(e){return"1"===e||"true"===e.toLowerCase()?1:0}parseRow(e,t=!0){const n=[];let r=0;var i=e.length;let o=df;for(let t=0;t<i;t++)switch(o){case df:switch(e.charAt(t)){case'"':r=t+1,o=mf;break;case this.delimiter:r=t+1," "===this.delimiter&&this.delimWhitespace||(n.push(""),o=df);break;default:o=pf,r=t}break;case pf:e.charAt(t)===this.delimiter&&(n.push(e.substring(r,t)),o=df,r=t+1);break;case mf:'"'===e.charAt(t)&&(o=gf);break;case gf:switch(e.charAt(t)){case this.delimiter:n.push(e.substring(r,t-1)),o=df,r=t+1;break;case'"':o=mf;break;default:o=Af}break;case Af:'"'===e.charAt(t)&&(o=mf)}if(o===gf?n.push(e.substring(r,i-1)):n.push(e.substring(r)),t&&n.length!==this.fullColumnNames.length)throw new Error(`Invalid row in csv file. Should have ${this.fullColumnNames.length} elements in a row, but got `+n);return n}}
/**
 * @license
 * Copyright 2019 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * =============================================================================
 */class bf extends of.a{constructor(e){super(),this.microphoneConfig=e,this.isClosed=!1,this.fftSize=e.fftSize||1024;var t=Math.log2(this.fftSize);if(this.fftSize<0||t<4||14<t||!Number.isInteger(t))throw new Error("Invalid fftSize: it must be a power of 2 between 2 to 4 and 2 to 14, but got "+this.fftSize);if(this.numFrames=e.numFramesPerSpectrogram||43,this.sampleRateHz=e.sampleRateHz,this.columnTruncateLength=e.columnTruncateLength||this.fftSize,this.audioTrackConstraints=e.audioTrackConstraints,this.smoothingTimeConstant=e.smoothingTimeConstant||0,this.includeSpectrogram=!1!==e.includeSpectrogram,this.includeWaveform=!0===e.includeWaveform,!this.includeSpectrogram&&!this.includeWaveform)throw new Error("Both includeSpectrogram and includeWaveform are false. At least one type of data should be returned.")}summary(){return"microphone"}static async create(e={}){if(!Object(f.hf)().get("IS_BROWSER"))throw new Error("microphone API is only supported in browser environment.");const t=new bf(e);return await t.start(),t}async start(){try{this.stream=await navigator.mediaDevices.getUserMedia({audio:null==this.audioTrackConstraints||this.audioTrackConstraints,video:!1})}catch(e){throw new Error("Error thrown while initializing video stream: "+e.message)}if(!this.stream)throw new Error("Could not obtain audio from microphone.");const e=window.AudioContext||window.webkitAudioContext;if(this.audioContext=new e,this.sampleRateHz){if(this.audioContext.sampleRate!==this.sampleRateHz)throw new Error(`Mismatch in sampling rate: Expected: ${this.sampleRateHz}; Actual: `+this.audioContext.sampleRate)}else this.sampleRateHz=this.audioContext.sampleRate;const t=this.audioContext.createMediaStreamSource(this.stream);this.analyser=this.audioContext.createAnalyser(),this.analyser.fftSize=2*this.fftSize,this.analyser.smoothingTimeConstant=this.smoothingTimeConstant,t.connect(this.analyser),this.freqData=new Float32Array(this.fftSize),this.timeData=new Float32Array(this.fftSize)}async next(){if(this.isClosed)return{value:null,done:!0};let e,t;var n,r=await this.getAudioData();return this.includeSpectrogram&&(n=this.flattenQueue(r.freqDataQueue),e=this.getTensorFromAudioDataArray(n,[this.numFrames,this.columnTruncateLength,1])),this.includeWaveform&&(n=this.flattenQueue(r.timeDataQueue),t=this.getTensorFromAudioDataArray(n,[this.numFrames*this.fftSize,1])),{value:{spectrogram:e,waveform:t},done:!1}}async capture(){return(await this.next()).value}async getAudioData(){const e=[],t=[];let n=0;return new Promise(r=>{const i=setInterval(()=>{this.includeSpectrogram&&(this.analyser.getFloatFrequencyData(this.freqData),this.freqData[0]===-1/0&&r({freqDataQueue:e,timeDataQueue:t}),e.push(this.freqData.slice(0,this.columnTruncateLength))),this.includeWaveform&&(this.analyser.getFloatTimeDomainData(this.timeData),t.push(this.timeData.slice())),++n===this.numFrames&&(clearInterval(i),r({freqDataQueue:e,timeDataQueue:t}))},this.fftSize/this.sampleRateHz*1e3)})}stop(){this.isClosed||(this.isClosed=!0,this.analyser.disconnect(),this.audioContext.close(),null!=this.stream&&0<this.stream.getTracks().length&&this.stream.getTracks()[0].stop())}toArray(){throw new Error("Can not convert infinite audio stream to array.")}getSampleRate(){return this.sampleRateHz}flattenQueue(e){const t=e[0].length,n=new Float32Array(e.length*t);return e.forEach((e,r)=>n.set(e,r*t)),n}getTensorFromAudioDataArray(e,t){const n=new Float32Array(f.Ji.sizeFromShape(t));return n.set(e,n.length-e.length),Object(f.mi)(n,t)
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * =============================================================================
 */}}class yf extends of.a{constructor(e,t){var n,r;super(),this.webcamVideoElement=e,this.webcamConfig=t,this.isClosed=!0,this.resize=!1,this.needToResize()&&(this.resize=!0,this.cropSize=[this.webcamConfig.resizeHeight,this.webcamConfig.resizeWidth],this.cropBoxInd=Object(f.ni)([0],"int32"),this.webcamConfig.centerCrop?(e=(t=(1-(e=+this.webcamConfig.resizeWidth/this.webcamVideoElement.width))/2)+e,r=(n=+this.webcamConfig.resizeHeight/this.webcamVideoElement.height)+(n=(1-n)/2),this.cropBox=Object(f.oi)([n,t,r,e],[1,4])):this.cropBox=Object(f.oi)([0,0,1,1],[1,4]))}summary(){return"webcam"}static async create(e,t={}){if(!Object(f.hf)().get("IS_BROWSER"))throw new Error("tf.data.webcam is only supported in browser environment.");if(!e){if(e=document.createElement("video"),!t.resizeWidth||!t.resizeHeight)throw new Error("Please provide webcam video element, or resizeWidth and resizeHeight to create a hidden video element.");e.width=t.resizeWidth,e.height=t.resizeHeight}const n=new yf(e,t);return await n.start(),n}async start(){this.webcamConfig.facingMode&&f.Ji.assert("user"===this.webcamConfig.facingMode||"environment"===this.webcamConfig.facingMode,()=>`Invalid webcam facing mode: ${this.webcamConfig.facingMode}. Please provide 'user' or 'environment'`);try{this.stream=await navigator.mediaDevices.getUserMedia({video:{deviceId:this.webcamConfig.deviceId,facingMode:this.webcamConfig.facingMode||"user",width:this.webcamVideoElement.width,height:this.webcamVideoElement.height}})}catch(e){throw e.message="Error thrown while initializing video stream: "+e.message,e}if(!this.stream)throw new Error("Could not obtain video from webcam.");try{this.webcamVideoElement.srcObject=this.stream}catch(e){this.webcamVideoElement.src=window.URL.createObjectURL(this.stream)}return this.webcamVideoElement.play(),this.isClosed=!1,new Promise(e=>{this.webcamVideoElement.onloadedmetadata=()=>{e()}})}async next(){if(this.isClosed)return{value:null,done:!0};let e;try{e=f.pe.fromPixels(this.webcamVideoElement)}catch(e){throw new Error("Error thrown converting video to pixels: "+JSON.stringify(e))}if(!this.resize)return{value:e,done:!1};try{return{value:this.cropAndResizeFrame(e),done:!1}}catch(e){throw new Error("Error thrown cropping the video: "+e.message)}finally{e.dispose()}}needToResize(){return!(!this.webcamConfig.resizeWidth||!this.webcamConfig.resizeHeight||this.webcamVideoElement.width===this.webcamConfig.resizeWidth&&this.webcamVideoElement.height===this.webcamConfig.resizeHeight)}cropAndResizeFrame(e){return Object(f.vi)(()=>{var t=Object(f.mf)(Object(f.re)(e,"float32"),0);const n=(t=f.Jf.cropAndResize(t,this.cropBox,this.cropBoxInd,this.cropSize,"bilinear")).shape;return Object(f.oh)(t,n.slice(1))})}async capture(){return(await this.next()).value}stop(){this.stream.getTracks().forEach(e=>e.stop());try{this.webcamVideoElement.srcObject=null}catch(e){this.webcamVideoElement.src=null}this.isClosed=!0}toArray(){throw new Error("Can not convert infinite video stream to array.")}}
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * =============================================================================
 */class wf{}
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * =============================================================================
 */class xf extends n(302).a{constructor(e,t={}){super(),this.file=e,this.options=t,f.Ji.assert(e instanceof Uint8Array||!!Object(f.hf)().get("IS_BROWSER")&&(e instanceof File||e instanceof Blob),()=>"FileChunkIterator only supports File, Blob and Uint8Array right now."),this.offset=t.offset||0,this.chunkSize=t.chunkSize||1048576}summary(){return"FileChunks "+this.file}async next(){return this.offset>=(this.file instanceof Uint8Array?this.file.byteLength:this.file.size)?{value:null,done:!0}:{value:await new Promise((e,t)=>{var n=this.offset+this.chunkSize;if(this.file instanceof Uint8Array)e(new Uint8Array(this.file.slice(this.offset,n)));else{const i=new FileReader;i.onload=n=>{let r=i.result;if(!((r=r instanceof ArrayBuffer?new Uint8Array(r):r)instanceof Uint8Array))return t(new TypeError("FileReader returned unknown type."));e(r)},i.onabort=e=>t(new Error("Aborted")),i.onerror=e=>t(new Error(e.type));var r=this.file.slice(this.offset,n);i.readAsArrayBuffer(r)}this.offset=n}),done:!1}}}
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * =============================================================================
 */
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * =============================================================================
 */function Cf(e){return"string"==typeof e&&"file://"===e.slice(0,7)}
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * =============================================================================
 */class kf extends wf{constructor(e,t={}){super(),this.input=e,this.options=t}async iterator(){if(Cf(this.input)&&Object(f.hf)().get("IS_NODE")){const e=n(379);this.input=e.readFileSync(this.input.slice(7))}return new xf(this.input,this.options)}}
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * =============================================================================
 */class Ef extends wf{constructor(e,t={}){super(),this.url=e,this.fileOptions=t}async iterator(){return Cf(this.url)?new kf(this.url,this.fileOptions).iterator():async function(e,t={},n){let r,i;"string"==typeof e?r=e:(r=e.url,i=(e=>({method:e.method,headers:e.headers,body:e.body,mode:e.mode,credentials:e.credentials,cache:e.cache,redirect:e.redirect,referrer:e.referrer,integrity:e.integrity}))(e));const o=await(n||f.Ji.fetch)(r,i);if(o.ok)return e=new Uint8Array(await o.arrayBuffer()),new xf(e,t);throw new Error(o.statusText)}(this.url,this.fileOptions)}}
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * =============================================================================
 */function Sf(e,t={}){return new vf(new Ef(e),t)}function _f(e){const t=Object(of.e)(e);return uf(async()=>t)}function Of(e){return uf(async()=>{const t=await e();return Object(of.e)(()=>t.next())})}async function Tf(e,t){return yf.create(e,t)}async function Df(e){return bf.create(e)}
/** @license See the LICENSE file. */const Bf="4.1.0";
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
/**
 * @license
 * Copyright 2019 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function If(e,t){(e=Array.isArray(e)?e:[e]).forEach(e=>{null!=e&&f.Ji.assert("complex64"!==e.dtype,()=>t+" does not support complex64 tensors in the CPU backend.")})}
/**
 * @license
 * Copyright 2021 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */const Mf=f.Rf.whereImpl;class jf extends f.Fb{constructor(){super(),this.blockSize=48,this.firstUse=!0,this.data=new f.S(this,Object(f.gf)())}nextDataId(){return jf.nextDataId++}write(e,t,n){this.firstUse&&(this.firstUse=!1,Object(f.hf)().get("IS_NODE")&&f.de.warn("\n============================\nHi, looks like you are running TensorFlow.js in Node.js. To speed things up dramatically, install our node backend, visit https://github.com/tensorflow/tfjs-node for more details. \n============================"));var r={id:this.nextDataId()};return this.data.set(r,{values:e,dtype:n,refCount:1}),r}makeTensorInfo(e,t,n){let r;var i;return{dataId:r="string"===t&&null!=n&&0<n.length&&f.Ji.isString(n[0])?(i=n.map(e=>f.Ji.encodeString(e)),this.write(i,e,t)):this.write(n,e,t),shape:e,dtype:t}}refCount(e){return this.data.has(e)?this.data.get(e).refCount:0}incRef(e){this.data.get(e).refCount++}decRef(e){if(this.data.has(e)){this.data.get(e).refCount--}}move(e,t,n,r,i){this.data.set(e,{values:t,dtype:r,refCount:i})}numDataIds(){return this.data.numDataIds()}async read(e){return this.readSync(e)}readSync(e){var{dtype:t,complexTensorInfos:n}=this.data.get(e);return"complex64"===t?(t=this.readSync(n.real.dataId),n=this.readSync(n.imag.dataId),f.de.mergeRealAndImagArrays(t,n)):this.data.get(e).values}bufferSync(e){const t=this.readSync(e.dataId);if("string"===e.dtype)try{var n=t.map(e=>f.Ji.decodeString(e));return Object(f.qe)(e.shape,e.dtype,n)}catch(e){throw new Error("Failed to decode encoded string bytes into utf-8")}return Object(f.qe)(e.shape,e.dtype,t)}makeOutput(e,t,n){return Object(f.gf)().makeTensorFromTensorInfo(this.makeTensorInfo(t,n,e),this)}disposeData(e,t=!1){if(this.data.has(e)){if(this.data.get(e).refCount--,!t&&0<this.data.get(e).refCount)return!1;null!=(t=this.data.get(e).complexTensorInfos)&&(this.disposeData(t.real.dataId,!0),this.disposeData(t.imag.dataId,!0)),this.data.delete(e)}return!0}disposeIntermediateTensorInfo(e){this.disposeData(e.dataId)}async time(e){var t=f.Ji.now();return{kernelMs:e=(e(),f.Ji.now()-t)}}memory(){return{unreliable:!0,reasons:["The reported memory is an upper bound. Due to automatic garbage collection, the true allocated memory may be less."]}}where(e){If([e],"where");var t=this.readSync(e.dataId);return Mf(e.shape,t)}dispose(){}floatPrecision(){return 32}epsilon(){return super.epsilon()}}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function Nf(e,t,n){return({inputs:r,attrs:i,backend:o})=>{if(If(r=r.x,e),"string"===r.dtype||"string"===n)throw new Error("unaryKernelFunc does not support string input/output");const a=o;var s=a.data.get(r.dataId).values,u=f.Ji.sizeFromShape(r.shape);o=n||r.dtype;const c=f.Ji.getArrayFromDType(o,u);for(let e=0;e<u;++e)c[e]=t(s[e],i);return a.makeTensorInfo(r.shape,o,c)}}function Ff(e,t,n){return({inputs:r,attrs:i,backend:o})=>{if(If(r=r.x,e),"string"===r.dtype||"string"===n)throw new Error("unaryKernelFunc does not support string input/output");const a=o;o=a.data.get(r.dataId).values;var s=n||r.dtype;o=t(o,s,i);return a.makeTensorInfo(r.shape,s,o)}}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the License);
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an AS IS BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */jf.nextDataId=0,Object(f.ih)("cpu",()=>new jf,1);const Rf=Nf(f.eb,e=>0<=e?e:Math.exp(e)-1);
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function Pf(e){const{inputs:t,backend:n}=e;return e=t.x,n.incRef(e.dataId),{dataId:e.dataId,shape:e.shape,dtype:e.dtype}}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function Lf(e){const{inputs:t,backend:n,attrs:r}=e;e=t.x;var i=r.alpha,o=(If([e],"leakyRelu"),f.Ji.sizeFromShape(e.shape)),a=n.data.get(e.dataId).values;const s=f.Ji.getTypedArrayFromDType("float32",o);for(let e=0;e<a.length;e++)s[e]=a[e]<0?i*a[e]:a[e];return n.makeTensorInfo(e.shape,"float32",s)}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function Uf(e){return(t,n,r,i,o)=>{var a=f.de.assertAndGetBroadcastShape(t,n),s=a.length,u=f.Ji.computeStrides(a),c=f.Ji.sizeFromShape(a);const l=f.Ji.getTypedArrayFromDType(o,c);var h=t.length,d=n.length,p=f.Ji.computeStrides(t),m=f.Ji.computeStrides(n);const g=f.de.getBroadcastDims(t,a),A=f.de.getBroadcastDims(n,a);if(g.length+A.length===0)for(let t=0;t<l.length;++t)l[t]=e(r[t%r.length],i[t%i.length]);else for(let t=0;t<l.length;++t){const n=f.Ji.indexToLoc(t,s,u),o=n.slice(-h);g.forEach(e=>o[e]=0);var v=f.Ji.locToIndex(o,h,p);const a=n.slice(-d);A.forEach(e=>a[e]=0);var b=f.Ji.locToIndex(a,d,m);l[t]=e(r[v],i[b])}return[l,a]}}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the License);
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an AS IS BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */A={kernelName:f.eb,backendName:"cpu",kernelFunc:Rf},k={kernelName:f.Ab,backendName:"cpu",kernelFunc:Pf},E={kernelName:f.Ib,backendName:"cpu",kernelFunc:Lf};const zf=Uf((e,t)=>e<0?t*e:e);function Hf(e){const{inputs:t,backend:n}=e;var{x:e,alpha:r}=t,i=(If([e,r],"prelu"),n.data.get(e.dataId).values),o=n.data.get(r.dataId).values,[e,r]=zf(e.shape,r.shape,i,o,"float32");return n.makeTensorInfo(r,"float32",e)}T={kernelName:f.xc,backendName:"cpu",kernelFunc:Hf};
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the License);
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an AS IS BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
const $f=Nf(f.Jc,e=>Math.max(0,e));D={kernelName:f.Jc,backendName:"cpu",kernelFunc:$f};
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the License);
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an AS IS BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
const Qf=Nf(f.Kc,e=>Math.min(Math.max(0,e),6));
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function Vf(e){return(t,n,r)=>{const i=f.Ji.getTypedArrayFromDType(n,t.length);for(let n=0;n<t.length;++n)i[n]=e(t[n],r);return i}}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the License);
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an AS IS BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */I={kernelName:f.Kc,backendName:"cpu",kernelFunc:Qf};const qf=Vf(e=>1/(1+Math.exp(-e))),Gf=Nf(f.Zc,e=>1/(1+Math.exp(-e)));
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function Wf(e,t,n,r,i){if("linear"===n)return Pf({inputs:{x:t},backend:e});if("relu"===n)return $f({inputs:{x:t},backend:e});if("elu"===n)return Rf({inputs:{x:t},backend:e});if("relu6"===n)return Qf({inputs:{x:t},backend:e});if("prelu"===n)return Hf({inputs:{x:t,alpha:r},backend:e});if("leakyrelu"===n)return Lf({inputs:{x:t},backend:e,attrs:{alpha:i}});if("sigmoid"===n)return Gf({inputs:{x:t},backend:e});throw new Error(`Activation ${n} has not been implemented for the CPU backend.`)}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function Kf(e){const{inputs:t,backend:n}=e;var{real:e,imag:r}=t,i=n.data.get(e.dataId).values,o=n.data.get(r.dataId).values,a=n.makeTensorInfo(e.shape,"complex64");return n.data.get(a.dataId).complexTensorInfos={real:n.makeTensorInfo(e.shape,"float32",i),imag:n.makeTensorInfo(r.shape,"float32",o)},a}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function Yf(e,t,n="float32"){var r;return"complex64"===n?Kf({inputs:{real:Yf(e,t,"float32"),imag:Yf(e,t,"float32")},backend:e}):(r=f.Ji.makeZerosTypedArray(f.Ji.sizeFromShape(t),n),e.makeTensorInfo(t,n,r))}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function Xf(e){const{inputs:t,backend:n}=e;e=t.input,e=n.data.get(e.dataId).complexTensorInfos.real;var r=n.data.get(e.dataId).values;return n.makeTensorInfo(e.shape,e.dtype,r)}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function Jf(e,t,n,r){if("int32"===r)return[t,"int32",Int32Array.from(e)];if("bool"===r)return[t,e]=Uf((e,t)=>e!==t?1:0)(t,[],e,f.Ji.toTypedArray([0],n),"bool"),[e,"bool",t];throw new Error(`Error in Cast: failed to cast ${n} to `+r)}function Zf(e){const{inputs:t,backend:n,attrs:r}=e;e=t.x;var i,o,a,s=r.dtype;return"complex64"===s?"complex64"===e.dtype?Pf({inputs:{x:e},backend:n}):(o=Yf(n,e.shape,e.dtype),i=Kf({inputs:{real:a=Zf({inputs:{x:e},backend:n,attrs:{dtype:"float32"}}),imag:o},backend:n}),n.disposeIntermediateTensorInfo(o),n.disposeIntermediateTensorInfo(a),i):"complex64"===e.dtype?(a=Zf({inputs:{x:o=Xf({inputs:{input:e},backend:n})},backend:n,attrs:{dtype:s}}),n.disposeIntermediateTensorInfo(o),a):f.Ji.hasEncodingLoss(e.dtype,s)?([i,o,a]=Jf(n.data.get(e.dataId).values,e.shape,e.dtype,s),n.makeTensorInfo(i,o,a)):{dataId:(i=Pf({inputs:{x:e},backend:n})).dataId,shape:i.shape,dtype:s}}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function ed(e,t,n,r){return null==n?({inputs:n,backend:i})=>{var{a:n,b:o}=n;const a=i;If([n,o],e);i=a.data.get(n.dataId).values;var s=a.data.get(o.dataId).values,u=(i="string"===n.dtype?f.de.fromUint8ToStringArray(i):i,s="string"===n.dtype?f.de.fromUint8ToStringArray(s):s,r||n.dtype),[n,o]=t(n.shape,o.shape,i,s,u);return a.makeTensorInfo(o,u,n)}:({inputs:e,backend:i})=>{var o,a,s,u,c,{a:e,b:l}=e;const h=i;return"complex64"===e.dtype||"complex64"===l.dtype?(i=Zf({inputs:{x:e},backend:h,attrs:{dtype:"complex64"}}),c=(a=h.data.get(i.dataId)).complexTensorInfos.real,a=a.complexTensorInfos.imag,c=h.data.get(c.dataId).values,a=h.data.get(a.dataId).values,s=Zf({inputs:{x:l},backend:h,attrs:{dtype:"complex64"}}),o=(u=h.data.get(s.dataId)).complexTensorInfos.real,u=u.complexTensorInfos.imag,o=h.data.get(o.dataId).values,u=h.data.get(u.dataId).values,[c,a,o]=n(e.shape,l.shape,c,a,o,u),o=Kf({inputs:{real:u=h.makeTensorInfo(o,"float32",c),imag:c=h.makeTensorInfo(o,"float32",a)},backend:h}),h.disposeIntermediateTensorInfo(i),h.disposeIntermediateTensorInfo(s),h.disposeIntermediateTensorInfo(u),h.disposeIntermediateTensorInfo(c),o):(a=h.data.get(e.dataId).values,i=h.data.get(l.dataId).values,s=r||e.dtype,[u,c]=t(e.shape,l.shape,a,i,s),h.makeTensorInfo(c,s,u))}}function td(e){return(t,n,r,i,o,a)=>{var s=f.de.assertAndGetBroadcastShape(t,n),u=f.Ji.sizeFromShape(s),c=s.length,l=f.Ji.computeStrides(s);const h=f.Ji.getTypedArrayFromDType("float32",u),d=f.Ji.getTypedArrayFromDType("float32",u),p=f.de.getBroadcastDims(t,s),m=f.de.getBroadcastDims(n,s);var g=f.de.mergeRealAndImagArrays(r,i),A=f.de.mergeRealAndImagArrays(o,a),v=t.length,b=f.Ji.computeStrides(t),y=n.length,w=f.Ji.computeStrides(n);if(p.length+m.length===0)for(let t=0;t<h.length;t++){var x=t%g.length,C=t%A.length;x=e(g[2*x],g[2*x+1],A[2*C],A[2*C+1]);h[t]=x.real,d[t]=x.imag}else for(let t=0;t<h.length;t++){const n=f.Ji.indexToLoc(t,c,l),r=n.slice(-v);p.forEach(e=>r[e]=0);var k=f.Ji.locToIndex(r,v,b);const i=n.slice(-y);m.forEach(e=>i[e]=0);var E=f.Ji.locToIndex(i,y,w);k=e(g[2*k],g[2*k+1],A[2*E],A[2*E+1]);h[t]=k.real,d[t]=k.imag}return[h,d,s]}}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */M={kernelName:f.Zc,backendName:"cpu",kernelFunc:Gf},j={kernelName:f.E,backendName:"cpu",kernelFunc:Kf},F={kernelName:f.Fc,backendName:"cpu",kernelFunc:Xf},R={kernelName:f.B,backendName:"cpu",kernelFunc:Zf};const nd=Uf((e,t)=>e+t);P=td((e,t,n,r)=>({real:e+n,imag:t+r}));const rd=ed(f.h,nd,P);
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function id(e){const{inputs:t,backend:n,attrs:r}=e,i=t.x;e=r.shape;const o=f.Ji.sizeFromShape(i.shape),a=f.Ji.inferFromImplicitShape(e,o),s=f.Ji.sizeFromShape(a);if(f.Ji.assert(o===s,()=>`The new shape (${a}) has ${s} elements and the old shape (${i.shape}) has ${o} elements. The new shape and old shape must have the same number of elements.`),n.incRef(i.dataId),null!=(e=n.data.get(i.dataId)).complexTensorInfos){const t=e.complexTensorInfos.real,n=e.complexTensorInfos.imag;t.shape=a,n.shape=a}return{dataId:i.dataId,shape:a,dtype:i.dtype}}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the License);
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an AS IS BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function od(e){const{inputs:t,backend:n,attrs:r}=e,{a:i,b:o}=t,{transposeA:a,transposeB:s}=r;If([i,o],"matMul");e=i.shape.length;var u=o.shape.length;const c=a?i.shape[e-2]:i.shape[e-1],l=s?o.shape[u-1]:o.shape[u-2];e=a?i.shape[e-1]:i.shape[e-2],u=s?o.shape[u-2]:o.shape[u-1];var h=i.shape.slice(0,-2),d=o.shape.slice(0,-2),p=f.Ji.sizeFromShape(h),m=f.Ji.sizeFromShape(d);h=f.oe.assertAndGetBroadcastShape(i.shape.slice(0,-2),o.shape.slice(0,-2)).concat([e,u]),f.Ji.assert(c===l,()=>`Error in matMul: inner shapes (${c}) and (${l}) of Tensors with shapes ${i.shape} and `+o.shape+" and transposeA="+a+` and transposeB=${s} must match.`),d=a?[p,c,e]:[p,e,c],e=s?[m,u,l]:[m,l,u],u=id({inputs:{x:i},backend:n,attrs:{shape:d}}),d=id({inputs:{x:o},backend:n,attrs:{shape:e}});var g=a?u.shape[1]:u.shape[2],A=a?u.shape[2]:u.shape[1],v=s?d.shape[1]:d.shape[2],b=Math.max(p,m),y=n.data.get(u.dataId).values,w=n.data.get(d.dataId).values,x=(e=f.Ji.computeStrides(u.shape),f.Ji.computeStrides(d.shape)),[C,k,E]=a?[e[0],1,e[1]]:[e[0],e[1],1],[S,_,O]=s?[1,x[1],x[0]]:[x[1],1,x[0]],T=A*v;const D=(e=Object(f.qe)([b,A,v],u.dtype)).values;var B=n.blockSize;for(let e=0;e<b;e++)for(let t=0;t<A;t+=B)for(let n=0;n<v;n+=B)for(let r=0;r<g;r+=B){var I=Math.min(t+B,A),M=Math.min(n+B,v),j=Math.min(r+B,g);for(let i=t;i<I;i++)for(let t=n;t<M;t++){let n=0;for(let o=r;o<j;o++){var N=Math.min(e,p-1)*C,F=Math.min(e,m-1)*O;n+=(N=y[N+i*k+o*E])*(F=w[o*S+t*_+F])}D[e*T+(i*v+t)]+=n}}return n.disposeIntermediateTensorInfo(u),n.disposeIntermediateTensorInfo(d),n.makeTensorInfo(h,e.dtype,e.values)}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the License);
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an AS IS BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function ad(e){const t=new Float32Array(e.length);for(let n=0;n<e.length;++n)t[n]=Math.abs(e[n]);return t}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function sd(e,t,n,r,i){var o=t.length,a=f.Ji.sizeFromShape(t),s=f.Ji.computeStrides(t),u=f.Ji.computeStrides(i);const c=f.Ji.getTypedArrayFromDType(n,f.Ji.sizeFromShape(i));for(let t=0;t<a;++t){var l=f.Ji.indexToLoc(t,o,s);const n=new Array(l.length);for(let e=0;e<n.length;e++)n[e]=l[r[e]];c[f.Ji.locToIndex(n,o,u)]=e[t]}return c}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function ud(e){const{inputs:t,attrs:n,backend:r}=e;var i=t.x,o=n.perm;If(i,"transpose"),e=i.shape.length;const a=new Array(e);for(let e=0;e<a.length;e++)a[e]=i.shape[o[e]];return e=sd(r.data.get(i.dataId).values,i.shape,i.dtype,o,a),{dataId:r.write(e,a,i.dtype),shape:a,dtype:i.dtype}}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the License);
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an AS IS BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function cd(e,t,n,r,i,o){var a=i.strideHeight,s=i.strideWidth,u=i.dilationHeight,c=i.dilationWidth,l=i.effectiveFilterHeight,h=i.effectiveFilterWidth,d=i.padInfo.top,p=i.padInfo.left,m="max"===o?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY;const g=(n=Object(f.qe)(i.outShape,n)).values;var A=i.outShape[1]*i.outShape[2]*i.outShape[3],v=i.outShape[2]*i.outShape[3],b=i.outShape[3];for(let t=0;t<i.batchSize;++t){var y=t*A,w=t*r[0];for(let t=0;t<i.inChannels;++t)for(let n=0;n<i.outHeight;++n){var x=n*a-d,C=Math.max(0,x),k=Math.min(i.inHeight,l+x),E=y+n*v;for(let n=0;n<i.outWidth;++n){var S=n*s-p,_=Math.max(0,S),O=Math.min(i.inWidth,h+S);let a=m,l=0,f=0;for(let n=C;n<k;n+=u){var T=w+n*r[1];for(let n=_;n<O;n+=c){var D=e[T+n*r[2]+t];"max"===o&&D>a?a=D:"avg"===o&&(l+=D,f++)}if(isNaN(a))break}g[S=E+n*b+t]="avg"===o?l/f:a}}}return n}function ld(e,t,n,r,i=!1,o=!1){const a=Object(f.qe)(r.outShape,"int32");var s=r.strideHeight,u=r.strideWidth,c=r.dilationHeight,l=r.dilationWidth,h=r.effectiveFilterHeight,d=r.effectiveFilterWidth,p=r.padInfo.top,m=r.padInfo.left;const g=Object(f.qe)(t,n,e);for(let e=0;e<r.batchSize;++e)for(let t=0;t<r.inChannels;++t)for(let n=0;n<r.outHeight;++n){var A=n*s-p;let f=A;for(;f<0;)f+=c;var v=Math.min(r.inHeight,h+A);for(let s=0;s<r.outWidth;++s){var b=s*u-m;let h=b;for(;h<0;)h+=l;var y=Math.min(r.inWidth,d+b);let p=Number.NEGATIVE_INFINITY,k=-1;for(let n=f;n<v;n+=c){var w=n-A;for(let a=h;a<y;a+=l){var x=a-b,C=g.get(e,n,a,t);C>p&&(p=C,k=i?o?((e*r.inHeight+n)*r.inWidth+a)*r.inChannels+t:(n*r.inWidth+a)*r.inChannels+t:w*d+x)}}a.set(k,e,n,s,t)}}return a}function hd(e,t,n,r,i,o){var a=i.strideDepth,s=i.strideHeight,u=i.strideWidth,c=i.dilationDepth,l=i.dilationHeight,h=i.dilationWidth,d=i.effectiveFilterDepth,p=i.effectiveFilterHeight,m=i.effectiveFilterWidth,g=i.padInfo.front,A=i.padInfo.top,v=i.padInfo.left,b="max"===o?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY;const y=(n=Object(f.qe)(i.outShape,n)).values;var w=i.outShape[1]*i.outShape[2]*i.outShape[3]*i.outShape[4],x=i.outShape[2]*i.outShape[3]*i.outShape[4],C=i.outShape[3]*i.outShape[4],k=i.outShape[4];for(let t=0;t<i.batchSize;++t){var E=t*w,S=t*r[0];for(let t=0;t<i.inChannels;++t)for(let n=0;n<i.outDepth;++n){var _=n*a-g;let f=_;for(;f<0;)f+=c;var O=Math.min(i.inDepth,d+_),T=E+n*x;for(let n=0;n<i.outHeight;++n){var D=n*s-A;let a=D;for(;a<0;)a+=l;var B=Math.min(i.inHeight,p+D),I=T+n*C;for(let n=0;n<i.outWidth;++n){let s=j=n*u-v;for(;s<0;)s+=h;var M=Math.min(i.inWidth,m+j),j=I+n*k;let d=b,p=0,g=0;for(let n=f;n<O;n+=c){var N=S+n*r[1];for(let n=a;n<B;n+=l){var F=N+n*r[2];for(let n=s;n<M;n+=h){var R=e[F+n*r[3]+t];if("max"===o&&R>d?d=R:"avg"===o&&(p+=R,g++),isNaN(d))break}if(isNaN(d))break}if(isNaN(d))break}y[j+=t]="avg"===o?p/g:d}}}}return n}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function fd(e,t,n,r,i){var o=f.Rh.isSliceContinous(r,t,n),a=f.Ji.sizeFromShape(n),s=f.Ji.computeStrides(r);if(o)return o=f.Rh.computeFlatOffset(t,s),"string"===i?e.slice(o,o+a):e.subarray(o,o+a);s="string"===i?f.de.fromUint8ToStringArray(e):e;const u=Object(f.qe)(r,i,s),c=Object(f.qe)(n,i);for(let e=0;e<c.size;++e){const n=c.indexToLoc(e);var l=n.map((e,n)=>e+t[n]);c.set(u.get(...l),...n)}return"string"===i?f.de.fromStringArrayToUint8(c.values):c.values}function dd(e){const{inputs:t,backend:n,attrs:r}=e;e=t.x;var{begin:i,size:o}=r,[i,o]=(If(e,"slice"),f.Rh.parseSliceParams(e,i,o)),a=fd(a=(f.Rh.assertParamsValid(e,i,o),n.data.get(e.dataId).values),i,o,e.shape,e.dtype);return n.makeTensorInfo(o,e.dtype,a)}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function pd(e,t,n,r,i){var o=f.Ji.sizeFromShape(r);const a=f.Ji.makeZerosTypedArray(i,n);for(let n=0;n<e.length;n++){var s=e[n];if(s<0)throw new Error("Input x must be non-negative!");i<=s||(a[s]+=0<o?t[n]:1)}return a}function md(e,t,n,r=!1){var i=e.shape[0],o=e.shape[1];const a=Object(f.qe)([i,n],t.dtype);for(let u=0;u<i;u++)for(let i=0;i<o;i++){var s=e.get(u,i);if(s<0)throw new Error("Input x must be non-negative!");n<=s||(r?a.set(1,u,s):0<t.size?a.set(a.get(u,s)+t.get(u,i),u,s):a.set(a.get(u,s)+1,u,s))}return a}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */L={kernelName:f.h,backendName:"cpu",kernelFunc:rd},q={kernelName:f.Lc,backendName:"cpu",kernelFunc:id},W={kernelName:f.w,backendName:"cpu",kernelFunc:od},
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the License);
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an AS IS BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Y={kernelName:f.Ld,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;var{a:e,b:i,bias:o,preluActivationWeights:a}=t,{transposeA:s,transposeB:u,activation:c,leakyreluAlpha:l}=r;let h;const f=[];h=e=od({inputs:{a:e,b:i},attrs:{transposeA:s,transposeB:u},backend:n}),o&&(i=rd({inputs:{a:h,b:o},backend:n}),f.push(h),h=i),c&&(s=Wf(n,h,c,a,l),f.push(h),h=s);for(const e of f)n.disposeIntermediateTensorInfo(e);return h}},J={kernelName:f.a,backendName:"cpu",kernelFunc:e=>{var t=e.inputs.x;const n=e.backend;return If(t,"abs"),new Float32Array(f.Ji.sizeFromShape(t.shape)),e=ad(n.data.get(t.dataId).values),n.makeOutput(e,t.shape,t.dtype)}},Z=Nf(f.b,e=>Math.acos(e)),ee={kernelName:f.b,backendName:"cpu",kernelFunc:Z},te=Nf(f.c,e=>Math.acosh(e)),ae={kernelName:f.c,backendName:"cpu",kernelFunc:te},se={kernelName:f.i,backendName:"cpu",kernelFunc:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){const{inputs:t,backend:n}=e,r=t;If(t,"addN");var i=r.map(e=>n.data.get(e.dataId).values);const o=(e=Object(f.qe)(r[0].shape,r[0].dtype)).values;for(let e=0;e<r.length;e++){var a=i[e];for(let e=0;e<o.length;e++)o[e]+=a[e]}return n.makeTensorInfo(e.shape,e.dtype,e.values)}},ce={kernelName:f.Ed,backendName:"cpu",kernelFunc:ud},
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
pe={kernelName:f.j,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;e=t.x;var{axis:i,keepDims:o}=r;If(e,"all");let a=i=f.Ji.parseAxisParam(i,e.shape);var s=f.de.getAxesPermutation(a,e.shape.length);let u=e;null!=s&&(u=ud({inputs:{x:e},backend:n,attrs:{perm:s}}),a=f.de.getInnerMostAxes(a.length,e.shape.length)),f.de.assertAxesAreInnerMostDims("all",a,u.shape.length);var[e,c]=f.de.computeOutAndReduceShapes(u.shape,a),l=f.Ji.sizeFromShape(c);const h=f.Ji.makeZerosTypedArray(f.Ji.sizeFromShape(e),u.dtype);var d=n.data.get(u.dataId).values;for(let e=0;e<h.length;++e){var p=e*l;let t=d[p];for(let e=0;e<l;++e){var m=d[p+e];t=t&&m}h[e]=t}return null!=s&&n.disposeIntermediateTensorInfo(u),c=n.makeTensorInfo(e,u.dtype,h),o?(o=id({inputs:{x:c},backend:n,attrs:{shape:s=f.de.expandShapeToKeepDim(e,i)}}),n.disposeIntermediateTensorInfo(c),o):c}},
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
fe={kernelName:f.k,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;e=t.x;var{axis:i,keepDims:o}=r;If(e,"any");let a=i=f.Ji.parseAxisParam(i,e.shape);var s=f.de.getAxesPermutation(a,e.shape.length);let u=e;null!=s&&(u=ud({inputs:{x:e},backend:n,attrs:{perm:s}}),a=f.de.getInnerMostAxes(a.length,e.shape.length)),f.de.assertAxesAreInnerMostDims("any",a,u.shape.length);var[e,c]=f.de.computeOutAndReduceShapes(u.shape,a),l=f.Ji.sizeFromShape(c);const h=f.Ji.makeZerosTypedArray(f.Ji.sizeFromShape(e),u.dtype);var d=n.data.get(u.dataId).values;for(let e=0;e<h.length;++e){var p=e*l;let t=d[p];for(let e=0;e<l;++e){var m=d[p+e];t=t||m}h[e]=t}return null!=s&&n.disposeIntermediateTensorInfo(u),c=n.makeTensorInfo(e,u.dtype,h),o?(o=id({inputs:{x:c},backend:n,attrs:{shape:s=f.de.expandShapeToKeepDim(e,i)}}),n.disposeIntermediateTensorInfo(c),o):c}},
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Ae={kernelName:f.l,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;e=t.x;var i=r.axis;If(e,"argMax");let o=f.Ji.parseAxisParam(i,e.shape),a=(i=f.de.getAxesPermutation(o,e.shape.length),e);const s=[];null!=i&&(a=ud({inputs:{x:e},backend:n,attrs:{perm:i}}),s.push(a),o=f.de.getInnerMostAxes(o.length,a.shape.length)),o=[o[0]],f.de.assertAxesAreInnerMostDims("argMax",o,a.shape.length);var[e,i]=f.de.computeOutAndReduceShapes(a.shape,o),u=f.Ji.sizeFromShape(e);const c=f.Ji.makeZerosTypedArray(u,"int32");var l=f.Ji.sizeFromShape(i),h=n.data.get(a.dataId).values;for(let e=0;e<c.length;++e){var d=e*l;let t=h[d],n=0;for(let e=0;e<l;++e){var p=h[d+e];p>t&&(t=p,n=e)}c[e]=n}return s.forEach(e=>n.disposeIntermediateTensorInfo(e)),n.makeTensorInfo(e,"int32",c)}},
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
be={kernelName:f.m,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;e=t.x;var i=r.axis;If(e,"argMin");let o=f.Ji.parseAxisParam(i,e.shape),a=(i=f.de.getAxesPermutation(o,e.shape.length),e);const s=[];null!=i&&(a=ud({inputs:{x:e},backend:n,attrs:{perm:i}}),s.push(a),o=f.de.getInnerMostAxes(o.length,a.shape.length)),o=[o[0]],f.de.assertAxesAreInnerMostDims("argMin",o,a.shape.length);var[e,i]=f.de.computeOutAndReduceShapes(a.shape,o),u=f.Ji.sizeFromShape(e);const c=f.Ji.makeZerosTypedArray(u,"int32");var l=f.Ji.sizeFromShape(i),h=n.data.get(a.dataId).values;for(let e=0;e<c.length;++e){var d=e*l;let t=h[d],n=0;for(let e=0;e<l;++e){var p=h[d+e];p<t&&(t=p,n=e)}c[e]=n}return s.forEach(e=>n.disposeIntermediateTensorInfo(e)),n.makeTensorInfo(e,"int32",c)}},we=Nf(f.n,e=>Math.asin(e)),Ee={kernelName:f.n,backendName:"cpu",kernelFunc:we},Oe=Nf(f.o,e=>Math.asinh(e)),Te={kernelName:f.o,backendName:"cpu",kernelFunc:Oe},jt=Nf(f.p,e=>Math.atan(e)),De={kernelName:f.p,backendName:"cpu",kernelFunc:jt},Ie=Uf((e,t)=>Math.atan2(e,t)),Me=ed(f.q,Ie),je={kernelName:f.q,backendName:"cpu",kernelFunc:Me},Ne=Nf(f.r,e=>Math.atanh(e)),Re={kernelName:f.r,backendName:"cpu",kernelFunc:Ne},Fe={kernelName:f.s,backendName:"cpu",kernelFunc:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){const{inputs:t,backend:n,attrs:r}=e,{filterSize:i,strides:o,pad:a,dimRoundingMode:s}=(If(e=t.x,"avgPool"),r);f.Ji.assert(f.de.eitherStridesOrDilationsAreOne(o,1),()=>`Error in avgPool: Either strides or dilations must be 1. Got strides ${o} and dilations '1'`);var u=f.de.computePool2DInfo(e.shape,i,o,1,a,s);let c;if(1===u.filterWidth&&1===u.filterHeight&&f.Ji.arraysEqual(u.inShape,u.outShape))c=Pf({inputs:{x:e},backend:n});else{var l=n.data.get(e.dataId).values;const t=f.Ji.computeStrides(e.shape);l=cd(l,e.shape,e.dtype,t,u,"avg"),c=n.makeTensorInfo(u.outShape,e.dtype,l.values)}return c}},
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Ue={kernelName:f.t,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;e=t.x;var{filterSize:i,strides:o,pad:a,dimRoundingMode:s,dataFormat:u}=r,i=(If(e,"avgPool3d"),f.de.computePool3DInfo(e.shape,i,o,1,a,s,u)),o=hd(n.data.get(e.dataId).values,e.shape,e.dtype,f.Ji.computeStrides(e.shape),i,"avg");return n.makeTensorInfo(o.shape,"float32",o.values)}},
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
He={kernelName:f.u,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;var{dy:e,input:i}=t,{filterSize:o,strides:a,pad:s,dimRoundingMode:u}=r,c=(If([e,i],"avgPool3DGrad"),f.de.computePool3DInfo(i.shape,o,a,1,s,u)),l=c.strideDepth,h=c.strideHeight,d=c.strideWidth,o=c.filterDepth,a=c.filterHeight,s=c.filterWidth,p=c.dilationDepth,m=c.dilationHeight,g=c.dilationWidth,A=c.effectiveFilterDepth,v=c.effectiveFilterHeight,b=c.effectiveFilterWidth,y=A-1-c.padInfo.front,w=b-1-c.padInfo.left,x=v-1-c.padInfo.top;const C=Object(f.qe)(i.shape,"float32");var k=1/(o*a*s);const E=n.bufferSync(e);for(let e=0;e<c.batchSize;++e)for(let t=0;t<c.inChannels;++t)for(let n=0;n<c.inDepth;++n)for(let r=0;r<c.inHeight;++r)for(let i=0;i<c.inWidth;++i){var S=n-y,_=r-x,O=i-w;let o=0;for(let n=0;n<A;n+=p){var T=(S+n)/l;if(!(T<0||T>=c.outDepth||Math.floor(T)!==T))for(let n=0;n<v;n+=m){var D=(_+n)/h;if(!(D<0||D>=c.outHeight||Math.floor(D)!==D))for(let n=0;n<b;n+=g){var B=(O+n)/d;B<0||B>=c.outWidth||Math.floor(B)!==B||(o+=B=E.get(e,T,D,B,t))}}}C.set(o*k,e,n,r,i,t)}return n.makeTensorInfo(C.shape,C.dtype,C.values)}},
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Ve={kernelName:f.v,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;var{dy:e,input:i}=t,o=i,{filterSize:i,strides:a,pad:s}=(If([e,i],"avgPoolGrad"),r),u=f.de.computePool2DInfo(o.shape,i,a,1,s),c=u.strideHeight,l=u.strideWidth,i=u.filterHeight,a=u.filterWidth,h=u.dilationHeight,d=u.dilationWidth,p=u.effectiveFilterHeight,m=u.effectiveFilterWidth,g=m-1-u.padInfo.left,A=p-1-u.padInfo.top;const v=Object(f.qe)(o.shape,"float32");var b=1/(i*a),s=n.data.get(e.dataId).values;const y=Object(f.qe)(e.shape,"float32",s);for(let e=0;e<u.batchSize;++e)for(let t=0;t<u.inChannels;++t)for(let n=0;n<u.inHeight;++n)for(let r=0;r<u.inWidth;++r){var w=n-A,x=r-g;let i=0;for(let n=0;n<p;n+=h){var C=(w+n)/c;if(!(C<0||C>=u.outHeight||Math.floor(C)!==C))for(let n=0;n<m;n+=d){var k=(x+n)/l;k<0||k>=u.outWidth||Math.floor(k)!==k||(i+=k=y.get(e,C,k,t))}}v.set(i*b,e,n,r,t)}return n.makeTensorInfo(v.shape,v.dtype,v.values)}},
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
qe={kernelName:f.sb,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;var{x:e,scale:i,offset:o,mean:a,variance:s}=t;f.Ji.assert(a.shape.length===s.shape.length,()=>"Batch normalization gradient requires mean and variance to have equal ranks."),f.Ji.assert(null==o||a.shape.length===o.shape.length,()=>"Batch normalization gradient requires mean and offset to have equal ranks."),f.Ji.assert(null==i||a.shape.length===i.shape.length,()=>"Batch normalization gradient requires mean and scale to have equal ranks."),If([e,a,s,i,o],"batchNorm");let u=r.varianceEpsilon;null==u&&(u=.001);var c=n.data.get(e.dataId).values,l=n.data.get(a.dataId).values,h=n.data.get(s.dataId).values,d=i?n.data.get(i.dataId).values:new Float32Array([1]),p=o?n.data.get(o.dataId).values:new Float32Array([0]);const m=new Float32Array(c.length);var g=p.length,A=d.length,v=h.length,b=l.length;let y=0,w=0,x=0,C=0;for(let e=0;e<c.length;++e)m[e]=p[y++]+(c[e]-l[w++])*d[x++]/Math.sqrt(h[C++]+u),y>=g&&(y=0),w>=b&&(w=0),x>=A&&(x=0),C>=v&&(C=0);return n.makeTensorInfo(e.shape,e.dtype,m)}},Ge={kernelName:f.dd,backendName:"cpu",kernelFunc:dd},
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
We={kernelName:f.x,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{blockShape:i,crops:o}=(e=t.x,r);If([e],"batchToSpaceND");var a=i.reduce((e,t)=>e*t),s=f.de.getReshaped(e.shape,i,a),u=f.de.getPermuted(s.length,i.length),c=(a=f.de.getReshapedPermuted(e.shape,i,a),f.de.getSliceBeginCoords(o,i.length)),l=f.de.getSliceSize(a,o,i.length);s=ud({inputs:{x:e=id({inputs:{x:e},backend:n,attrs:{shape:s}})},backend:n,attrs:{perm:u}}),a=dd({inputs:{x:u=id({inputs:{x:s},backend:n,attrs:{shape:a}})},backend:n,attrs:{begin:c,size:l}});return n.disposeIntermediateTensorInfo(e),n.disposeIntermediateTensorInfo(s),n.disposeIntermediateTensorInfo(u),a}},Ke={kernelName:f.y,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;var{x:e,weights:i}=t,o=r.size;e=pd(n.data.get(e.dataId).values,n.data.get(i.dataId).values,i.dtype,i.shape,o);return n.makeTensorInfo([o],i.dtype,e)}},
/**
 * @license
 * Copyright 2021 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Xe={kernelName:f.z,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n}=e;var{s0:e,s1:r}=t,r=(e=n.data.get(e.dataId).values,n.data.get(r.dataId).values);e=f.de.assertAndGetBroadcastShape(Array.from(e),Array.from(r));return n.makeTensorInfo([e.length],"int32",Int32Array.from(e))}};
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the License);
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an AS IS BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
const gd=Vf(e=>Math.ceil(e));
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function Ad(e,t,n,r){const i=f.Ji.getArrayFromDType(n,f.Ji.sizeFromShape(t));if(r&&"string"!==n){let t=0;e.forEach(e=>{var n=f.Ji.sizeFromShape(e.shape);i.set(e.vals,t),t+=n})}else{let r=0;e.forEach(e=>{var o="string"===n?f.de.fromUint8ToStringArray(e.vals):e.vals;let a=0;for(let n=0;n<e.shape[0];++n){var s=n*t[1]+r;for(let t=0;t<e.shape[1];++t)i[s+t]=o[a++]}r+=e.shape[1]})}return i}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function vd(e){const{inputs:t,backend:n}=e;e=t.input,e=n.data.get(e.dataId).complexTensorInfos.imag;var r=n.data.get(e.dataId).values;return n.makeTensorInfo(e.shape,e.dtype,r)}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function bd(e){const{inputs:t,backend:n,attrs:r}=e;e=r.axis;const i=f.Ji.parseAxisParam(e,t[0].shape)[0];e=t.map(e=>e.shape),f.de.assertParamsConsistent(e,i);let o=f.de.computeOutShape(t.map(e=>e.shape),i);if(0===f.Ji.sizeFromShape(o))return n.makeTensorInfo(o,t[0].dtype,[]);const a=t.filter(e=>0<f.Ji.sizeFromShape(e.shape));if(1===a.length)return Pf({inputs:{x:a[0]},backend:n});if("complex64"===a[0].dtype){const t=a.map(e=>Xf({inputs:{input:e},backend:n})),r=a.map(e=>vd({inputs:{input:e},backend:n}));e=bd({inputs:t,backend:n,attrs:{axis:i}});var s=bd({inputs:r,backend:n,attrs:{axis:i}}),u=Kf({inputs:{real:e,imag:s},backend:n});return t.forEach(e=>n.disposeIntermediateTensorInfo(e)),r.forEach(e=>n.disposeIntermediateTensorInfo(e)),n.disposeIntermediateTensorInfo(e),n.disposeIntermediateTensorInfo(s),u}const c=a.map(e=>{var t=[-1,f.Ji.sizeFromShape(e.shape.slice(i))];return id({inputs:{x:e},backend:n,attrs:{shape:t}})});return e=c.map(e=>({vals:n.data.get(e.dataId).values,shape:e.shape})),o=f.de.computeOutShape(c.map(e=>e.shape),1),s=1===c[0].shape[0],u=Ad(e,o,t[0].dtype,s),e=f.de.computeOutShape(a.map(e=>e.shape),i),s=n.makeTensorInfo(e,t[0].dtype,u),c.forEach(e=>n.disposeIntermediateTensorInfo(e)),s}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function yd(e){const{inputs:t,backend:n,attrs:r}=e;var{x:e,filter:i}=t,{strides:o,pad:a,dataFormat:s,dilations:u,dimRoundingMode:c}=r,s=(If([e,i],"conv2d"),f.de.convertConv2DDataFormat(s)),l=f.de.computeConv2DInfo(e.shape,i.shape,o,u,a,c,!1,s),h=l.filterHeight,d=l.filterWidth,p=l.dilationHeight,m=l.dilationWidth,g=l.padInfo.left,A=l.padInfo.top,o="channelsLast"===l.dataFormat,u=new f.Ad(l.outShape,e.dtype),a=f.Ji.computeStrides(e.shape),v=f.Ji.computeStrides(i.shape),b=a[0],y=o?a[1]:a[2],w=o?a[2]:1,x=o?1:a[1],C=u.strides[0],k=o?u.strides[1]:u.strides[2],E=o?u.strides[2]:1,S=o?1:u.strides[1],_=n.data.get(e.dataId).values,O=n.data.get(i.dataId).values;const T=u.values;for(let e=0;e<l.batchSize;++e){var D=e*b,B=e*C;for(let e=0;e<l.outHeight;++e){var I=B+e*k,M=e*l.strideHeight-A;for(let e=0;e<h;++e){var j=M+e*p;if(!(j<0||j>=l.inHeight)){var N=e*v[0],F=D+j*y;for(let e=0;e<l.outWidth;++e){var R=I+e*E,P=e*l.strideWidth-g;for(let e=0;e<d;++e){var L=P+e*m;if(!(L<0||L>=l.inWidth)){var U=F+L*w;let t=N+e*v[1];for(let e=0;e<l.inChannels;++e){var z=_[U+e*x];for(let e=0;e<l.outChannels;++e)T[R+e*S]+=z*O[t+e];t+=l.outChannels}}}}}}}}return n.makeTensorInfo(u.shape,u.dtype,T)}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function wd(e){const{inputs:t,backend:n,attrs:r}=e;var{x:e,filter:i}=t;const{strides:o,pad:a,dilations:s,dimRoundingMode:u}=r;If([e,i],"depthwiseConv2DNative");var c=f.Ji.computeStrides(e.shape),l=f.Ji.computeStrides(i.shape);let h=s;null==h&&(h=[1,1]),f.Ji.assert(f.de.eitherStridesOrDilationsAreOne(o,h),()=>`Error in depthwiseConv2d: Either strides or dilations must be 1. Got strides ${o} and dilations '${h}'`);var d=f.de.computeConv2DInfo(e.shape,i.shape,o,h,a,u,!0),{filterHeight:p,filterWidth:m,dilationHeight:g,dilationWidth:A,padInfo:v}=d,b=v.left,y=v.top,w=d.outChannels/d.inChannels,x=new f.Ad(d.outShape,e.dtype),C=n.data.get(e.dataId).values,k=n.data.get(i.dataId).values;const E=x.values;for(let e=0;e<d.batchSize;++e){var S=e*c[0],_=e*x.strides[0];for(let e=0;e<d.outHeight;++e){var O=_+e*x.strides[1],T=e*d.strideHeight-y;for(let e=0;e<p;++e){var D=T+e*g;if(!(D<0||D>=d.inHeight)){var B=e*l[0],I=S+D*c[1];for(let e=0;e<d.outWidth;++e){var M=O+e*x.strides[2],j=e*d.strideWidth-b;for(let e=0;e<m;++e){var N=j+e*A;if(!(N<0||N>=d.inWidth)){var F=B+e*l[1],R=I+N*d.inChannels;let t=M,n=F;for(let e=0;e<d.inChannels;++e){var P=C[R+e];for(let e=0;e<w;++e)E[t+e]+=P*k[n+e];t+=w,n+=w}}}}}}}}return n.makeTensorInfo(x.shape,x.dtype,x.values)}Je=Ff(f.C,gd),Ze={kernelName:f.C,backendName:"cpu",kernelFunc:Je},et=Nf(f.D,(e,t)=>e>t.clipValueMax?t.clipValueMax:e<t.clipValueMin?t.clipValueMin:e),nt={kernelName:f.D,backendName:"cpu",kernelFunc:et},ot={kernelName:f.F,backendName:"cpu",kernelFunc:e=>{var t=e.inputs.x;const n=e.backend,r=new Float32Array(f.Ji.sizeFromShape(t.shape)),i=(e=n.data.get(t.dataId)).complexTensorInfos.real,o=e.complexTensorInfos.imag;var a=n.data.get(i.dataId).values,s=n.data.get(o.dataId).values;for(let e=0;e<a.length;e++){const t=a[e],n=s[e];r[e]=Math.hypot(t,n)}return n.makeOutput(r,t.shape,"float32")}},st={kernelName:f.Bb,backendName:"cpu",kernelFunc:vd},ct={kernelName:f.G,backendName:"cpu",kernelFunc:bd},Q={kernelName:f.H,backendName:"cpu",kernelFunc:yd},
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
ft={kernelName:f.I,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;var{x:e,dy:i}=t,{strides:o,pad:a,dataFormat:s,dimRoundingMode:u,filterShape:c}=r,s=(If([e,i],"conv2dBackpropFilter"),f.de.convertConv2DDataFormat(s)),l=f.de.computeConv2DInfo(e.shape,c,o,1,a,u,!1,s),{strideHeight:h,strideWidth:d,filterHeight:p,filterWidth:m}=l,g="channelsLast"===l.dataFormat;const A=new f.Ad(l.filterShape,"float32");var v=l.padInfo.left,b=l.padInfo.top,c=n.data.get(e.dataId).values,o=n.data.get(i.dataId).values;const y=new f.Ad(e.shape,e.dtype,c),w=new f.Ad(i.shape,i.dtype,o);for(let e=0;e<p;++e){var x=Math.max(0,Math.ceil((b-e)/h)),C=Math.min(l.outHeight,(l.inHeight+b-e)/h);for(let t=0;t<m;++t){var k=Math.max(0,Math.ceil((v-t)/d)),E=Math.min(l.outWidth,(l.inWidth+v-t)/d);for(let n=0;n<l.inChannels;++n)for(let r=0;r<l.outChannels;++r){let i=0;for(let o=0;o<l.batchSize;++o)for(let a=x;a<C;++a){var S=e+a*h-b;for(let e=k;e<E;++e){var _=t+e*d-v;i+=g?y.get(o,S,_,n)*w.get(o,a,e,r):y.get(o,n,S,_)*w.get(o,r,a,e)}}A.set(i,e,t,n,r)}}}return n.makeTensorInfo(A.shape,A.dtype,A.values)}},
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
dt={kernelName:f.J,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;var{dy:e,filter:i}=t,{inputShape:o,strides:a,pad:s,dataFormat:u,dimRoundingMode:c}=r,l=(If([e,i],"conv2dBackpropInput"),f.Ji.computeStrides(i.shape)),h=f.Ji.computeStrides(e.shape),o=(u=f.de.convertConv2DDataFormat(u),f.de.computeConv2DInfo(o,i.shape,a,1,s,c,!1,u));const d=(a=new f.Ad(o.inShape,"float32")).values;var p=n.data.get(e.dataId).values,m=n.data.get(i.dataId).values,[g,A,v]=l,{batchSize:b,filterHeight:y,filterWidth:w,inChannels:x,inHeight:C,inWidth:k,outChannels:E,outHeight:S,outWidth:_,strideHeight:O,strideWidth:T}=o,u=o.dataFormat,D=y-1-o.padInfo.top,B=w-1-o.padInfo.left,s="channelsLast"===u,I=a.strides[0],M=s?a.strides[1]:a.strides[2],j=s?a.strides[2]:1,N=s?1:a.strides[1],F=h[0],R=s?h[1]:h[2],P=s?h[2]:1,L=s?1:h[1];for(let e=0;e<b;++e)for(let t=0;t<x;++t)for(let n=0;n<C;++n){var U=n-D,z=Math.max(0,Math.ceil(U/O)),H=Math.min(S,(y+U)/O);for(let r=0;r<k;++r){var $=r-B,Q=Math.max(0,Math.ceil($/T)),V=Math.min(_,(w+$)/T);let i=0;for(let n=z;n<H;++n){var q=n*O-U;for(let r=Q;r<V;++r){var G=F*e+R*n+P*r,W=g*(y-1-q)+A*(w-1-(r*T-$))+v*t;for(let e=0;e<E;++e){i+=p[G+L*e]*m[W+e]}}}d[I*e+M*n+j*r+N*t]=i}}return n.makeTensorInfo(a.shape,a.dtype,a.values)}},
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
pt={kernelName:f.K,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;var{x:e,filter:i}=t,{strides:o,pad:a,dilations:s}=r,u=(If([e,i],"conv3d"),f.de.computeConv3DInfo(e.shape,i.shape,o,s,a)),{filterDepth:c,filterHeight:l,filterWidth:h,dilationDepth:d,dilationHeight:p,dilationWidth:m,padInfo:o}=u,g=o.front,A=o.left,v=o.top,b=new f.Ad(u.outShape,e.dtype),y=n.data.get(e.dataId).values,w=n.data.get(i.dataId).values;const x=b.values;var C=f.Ji.computeStrides(e.shape),k=f.Ji.computeStrides(i.shape);for(let e=0;e<u.batchSize;++e){var E=e*C[0],S=e*b.strides[0];for(let e=0;e<u.outDepth;++e){var _=S+e*b.strides[1],O=e*u.strideDepth-g;for(let e=0;e<c;++e){var T=O+e*d;if(!(T<0||T>=u.inDepth)){var D=e*k[0],B=E+T*C[1];for(let e=0;e<u.outHeight;++e){var I=_+e*b.strides[2],M=e*u.strideHeight-v;for(let e=0;e<l;++e){var j=M+e*p;if(!(j<0||j>=u.inHeight)){var N=D+e*k[1],F=B+j*C[2];for(let e=0;e<u.outWidth;++e){var R=I+e*u.outChannels,P=e*u.strideWidth-A;for(let e=0;e<h;++e){var L=P+e*m;if(!(L<0||L>=u.inWidth)){var U=N+e*k[2],z=F+L*u.inChannels;let t=U;for(let e=0;e<u.inChannels;++e){var H=y[z+e];for(let e=0;e<u.outChannels;++e)x[R+e]+=H*w[t+e];t+=u.outChannels}}}}}}}}}}}return n.makeTensorInfo(b.shape,b.dtype,b.values)}},
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
gt={kernelName:f.L,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;var{x:e,dy:i}=t,{strides:o,pad:a,filterShape:s}=r,u=(If([e,i],"conv3dBackpropFilterV2"),f.Ji.computeStrides(e.shape)),c=f.Ji.computeStrides(i.shape),l=f.de.computeConv3DInfo(e.shape,s,o,1,a),h=l.strideDepth,d=l.strideHeight,p=l.strideWidth,m=l.filterDepth,g=l.filterHeight,A=l.filterWidth;const v=(s=new f.Ad(l.filterShape,"float32")).values;var[b,y,w,x]=s.strides,C=n.data.get(i.dataId).values,[k,E,S,_]=c,O=n.data.get(e.dataId).values,[T,D,B,I]=u,M=l.padInfo.front,j=l.padInfo.left,N=l.padInfo.top;for(let e=0;e<m;++e){var F=Math.max(0,Math.ceil((M-e)/h)),R=Math.min(l.outDepth,(l.inDepth+M-e)/h),P=e*b;for(let t=0;t<g;++t){var L=Math.max(0,Math.ceil((N-t)/d)),U=Math.min(l.outHeight,(l.inHeight+N-t)/d),z=t*y+P;for(let n=0;n<A;++n){var H=Math.max(0,Math.ceil((j-n)/p)),$=Math.min(l.outWidth,(l.inWidth+j-n)/p),Q=n*w+z;for(let r=0;r<l.inChannels;++r){var V=r*x+Q;for(let i=0;i<l.outChannels;++i){let o=0;for(let a=0;a<l.batchSize;++a){var q=a*T,G=a*k;for(let a=F;a<R;++a){var W=(e+a*h-M)*D+q,K=a*E+G;for(let e=L;e<U;++e){var Y=(t+e*d-N)*B+W,X=e*S+K;for(let e=H;e<$;++e){var J=e*_+X;o+=O[(n+e*p-j)*I+Y+r]*C[J+i]}}}}v[V+i]=o}}}}}return n.makeTensorInfo(s.shape,s.dtype,s.values)}},
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
vt={kernelName:f.M,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;var{dy:e,filter:i}=t,{pad:o,strides:a,inputShape:s}=r,u=(If([e],"conv3dBackpropInputV2"),f.Ji.computeStrides(e.shape)),c=f.Ji.computeStrides(i.shape),s=f.de.computeConv3DInfo(s,i.shape,a,1,o);const l=(a=new f.Ad(s.inShape,"float32")).values;var[h,d,p,m]=a.strides,g=n.data.get(e.dataId).values,[A,v,b,y]=u,w=n.data.get(i.dataId).values,[x,C,k,E]=c,{batchSize:S,filterDepth:_,filterHeight:O,filterWidth:T,inChannels:D,inDepth:B,inHeight:I,inWidth:M,outChannels:j,outDepth:N,outHeight:F,outWidth:R,strideDepth:P,strideHeight:L,strideWidth:U}=s,z=_-1-s.padInfo.front,H=O-1-s.padInfo.top,$=T-1-s.padInfo.left;for(let e=0;e<S;++e)for(let t=0;t<D;++t)for(let n=0;n<B;++n){var Q=n-z,V=Math.max(0,Math.ceil(Q/P)),q=Math.min(N,(_+Q)/P);for(let r=0;r<I;++r){var G=r-H,W=Math.max(0,Math.ceil(G/L)),K=Math.min(F,(O+G)/L);for(let i=0;i<M;++i){var Y=i-$,X=Math.max(0,Math.ceil(Y/U)),J=Math.min(R,(T+Y)/U);let o=0;for(let n=V;n<q;++n){var Z=n*P-Q;for(let r=W;r<K;++r){var ee=r*L-G;for(let i=X;i<J;++i){var te=A*e+v*n+b*r+y*i,ne=x*(_-1-Z)+C*(O-1-ee)+k*(T-1-(i*U-Y))+E*t;for(let e=0;e<j;++e){o+=g[te+e]*w[ne+e]}}}}l[h*e+d*n+p*r+m*i+t]=o}}}return n.makeTensorInfo(a.shape,a.dtype,a.values)}},bt=Nf(f.N,e=>Math.cos(e)),yt={kernelName:f.N,backendName:"cpu",kernelFunc:bt},xt=Nf(f.O,e=>Math.cosh(e)),Ct={kernelName:f.O,backendName:"cpu",kernelFunc:xt},
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Et={kernelName:f.P,backendName:"cpu",kernelFunc:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){const{inputs:t,backend:n,attrs:r}=e;var{image:e,boxes:i,boxInd:o}=t,{cropSize:a,method:s,extrapolationValue:u}=r,[c,l,h,d]=e.shape,p=i.shape[0],[m,g]=a;const A=Object(f.qe)([p,m,g,d],"float32");var v=n.data.get(i.dataId).values,b=n.data.get(o.dataId).values,y=n.data.get(e.dataId).values,w=f.Ji.computeStrides(e.shape),x=f.Ji.computeStrides(A.shape);for(let e=0;e<p;e++){var C=4*e,k=v[C],E=v[1+C],S=v[2+C],_=v[3+C],O=b[e];if(!(c<=O)){var T=1<m?(S-k)*(l-1)/(m-1):0,D=1<g?(_-E)*(h-1)/(g-1):0;for(let t=0;t<m;t++){var B=1<m?k*(l-1)+t*T:.5*(k+S)*(l-1);if(B<0||l-1<B)for(let n=0;n<g;n++)for(let r=0;r<d;r++){var I=r+n*x[2]+t*x[1]+e*x[0];A.values[I]=u}else if("bilinear"===s){var M=Math.floor(B),j=Math.ceil(B),N=B-M;for(let n=0;n<g;n++){var F=1<g?E*(h-1)+n*D:.5*(E+_)*(h-1);if(F<0||h-1<F)for(let r=0;r<d;r++){var R=r+n*x[2]+t*x[1]+e*x[0];A.values[R]=u}else{var P=Math.floor(F),L=Math.ceil(F),U=F-P;for(let r=0;r<d;r++){var z=y[r+P*w[2]+M*w[1]+O*w[0]],H=y[r+L*w[2]+M*w[1]+O*w[0]],$=y[r+P*w[2]+j*w[1]+O*w[0]],Q=y[r+L*w[2]+j*w[1]+O*w[0]];H=z+(H-z)*U;z=r+n*x[2]+t*x[1]+e*x[0],A.values[z]=H+($+(Q-$)*U-H)*N}}}}else for(let n=0;n<g;++n){var V=1<g?E*(h-1)+n*D:.5*(E+_)*(h-1);if(V<0||h-1<V)for(let r=0;r<d;r++){var q=r+n*x[2]+t*x[1]+e*x[0];A.values[q]=u}else{var G=Math.round(V),W=Math.round(B);for(let r=0;r<d;r++){var K=r+G*w[2]+W*w[1]+O*w[0],Y=r+n*x[2]+t*x[1]+e*x[0];A.values[Y]=y[K]}}}}}}return n.makeTensorInfo(A.shape,A.dtype,A.values)}},
/**
 * @license
 * Copyright 2022 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
St={kernelName:f.Q,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;e=t.x;var i,{axis:i,exclusive:o,reverse:a}=r;let s=e;if(null!=(i=(If(e,"cumprod"),f.de.getAxesPermutation([i],e.shape.length)))&&(s=ud({inputs:{x:e},backend:n,attrs:{perm:i}})),(e=f.de.getInnerMostAxes(1,e.shape.length)[0])!==s.shape.length-1)throw new Error(`backend.cumprod in CPU expects an inner-most axis=${s.shape.length-1} but got axis=`+e);e=Object(f.Hi)(s.dtype,"int32");const u=f.Ji.makeOnesTypedArray(f.Ji.sizeFromShape(s.shape),e);var c=n.data.get(s.dataId).values;const l=s.shape[s.shape.length-1],h=a?(e,t)=>e+l-t-1:(e,t)=>e+t;for(let e=0;e<c.length;e+=l)for(let t=0;t<l;t++){var d,p=h(e,t);0===t?u[p]=o?1:c[p]:(d=h(e,t-1),u[p]=o?c[d]*u[d]:c[p]*u[d])}return a=n.makeTensorInfo(s.shape,e,u),null!=i?(i=ud({inputs:{x:a},backend:n,attrs:{perm:e=f.de.getUndoAxesPermutation(i)}}),n.disposeIntermediateTensorInfo(a),n.disposeIntermediateTensorInfo(s),i):a}},
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Tt={kernelName:f.R,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;e=t.x;var i,{axis:i,exclusive:o,reverse:a}=r;let s=e;if(null!=(i=(If(e,"cumsum"),f.de.getAxesPermutation([i],e.shape.length)))&&(s=ud({inputs:{x:e},backend:n,attrs:{perm:i}})),(e=f.de.getInnerMostAxes(1,e.shape.length)[0])!==s.shape.length-1)throw new Error(`backend.cumsum in CPU expects an inner-most axis=${s.shape.length-1} but got axis=`+e);e=Object(f.Hi)(s.dtype,"int32");const u=f.Ji.makeZerosTypedArray(f.Ji.sizeFromShape(s.shape),e);var c=n.data.get(s.dataId).values;const l=s.shape[s.shape.length-1],h=a?(e,t)=>e+l-t-1:(e,t)=>e+t;for(let e=0;e<c.length;e+=l)for(let t=0;t<l;t++){var d,p=h(e,t);0===t?u[p]=o?0:c[p]:(d=h(e,t-1),u[p]=o?c[d]+u[d]:c[p]+u[d])}return a=n.makeTensorInfo(s.shape,e,u),null!=i?(i=ud({inputs:{x:a},backend:n,attrs:{perm:e=f.de.getUndoAxesPermutation(i)}}),n.disposeIntermediateTensorInfo(a),n.disposeIntermediateTensorInfo(s),i):a}},
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Dt={kernelName:f.T,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;var i,{x:e,weights:o}=t,{size:a,binaryOutput:s}=r;if(1===e.shape.length)return i=pd(n.data.get(e.dataId).values,n.data.get(o.dataId).values,o.dtype,o.shape,a),n.makeTensorInfo([a],o.dtype,i);if(2===e.shape.length)return i=md(n.bufferSync(e),n.bufferSync(o),a,s),n.makeTensorInfo(i.shape,o.dtype,i.values);throw new Error("Error in denseBincount: input must be at most rank 2, but got rank"+e.shape.length+".")}},
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Mt={kernelName:f.U,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{blockSize:i,dataFormat:o}=(e=t.x,r);f.Ji.assert("NHWC"===o,()=>"Only NHWC dataFormat supported on CPU for depthToSpace. Got "+o);var a=e.shape[0],s=e.shape[1],u=e.shape[2],c=e.shape[3],l=s*i,h=u*i,d=c/(i*i),p=n.data.get(e.dataId).values;const m=new Float32Array(a*l*h*d);let g=0;for(let e=0;e<a;++e)for(let t=0;t<l;++t){var A=Math.floor(t/i),v=t%i;for(let t=0;t<h;++t){var b=Math.floor(t/i),y=(v*i+t%i)*d;for(let t=0;t<d;++t){var w=t+y+c*(b+u*(A+s*e));m[g++]=p[w]}}}return n.makeTensorInfo([a,l,h,d],e.dtype,m)}},Nt={kernelName:f.V,backendName:"cpu",kernelFunc:wd},
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Ft={kernelName:f.W,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;var{x:e,dy:i}=t,{strides:o,dilations:a,pad:s,dimRoundingMode:u,filterShape:c}=r,l=(If([e,i],"depthwiseConv2dNativeBackpropFilter"),f.de.computeConv2DInfo(e.shape,c,o,a,s,u,!0)),{strideHeight:h,strideWidth:d,filterHeight:p,filterWidth:m}=l;const g=new f.Ad(l.filterShape,"float32");var A=l.padInfo.left,v=l.padInfo.top,b=l.outChannels/l.inChannels,c=n.data.get(e.dataId).values;const y=new f.Ad(e.shape,e.dtype,c),w=(o=n.data.get(i.dataId).values,new f.Ad(i.shape,i.dtype,o));for(let e=0;e<p;++e){var x=Math.max(0,Math.ceil((v-e)/h)),C=Math.min(l.outHeight,(l.inHeight+v-e)/h);for(let t=0;t<m;++t){var k=Math.max(0,Math.ceil((A-t)/d)),E=Math.min(l.outWidth,(l.inWidth+A-t)/d);for(let n=0;n<l.outChannels;++n){var S=Math.trunc(n/b),_=n%b;let r=0;for(let i=0;i<l.batchSize;++i)for(let o=x;o<C;++o){var O=e+o*h-v;for(let e=k;e<E;++e){var T=t+e*d-A;r+=y.get(i,O,T,S)*w.get(i,o,e,n)}}g.set(r,e,t,S,_)}}}return n.makeTensorInfo(g.shape,g.dtype,g.values)}},
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Rt={kernelName:f.X,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;var{dy:e,filter:i}=t,{strides:o,dilations:a,pad:s,dimRoundingMode:u,inputShape:c}=r,l=(If([e,i],"depthwiseConv2DNativeBackpropInput"),f.Ji.computeStrides(e.shape)),h=f.Ji.computeStrides(i.shape),c=f.de.computeConv2DInfo(c,i.shape,o,a,s,u,!0);const d=(o=new f.Ad(c.inShape,"float32")).values;var[p,m,g]=o.strides,A=n.data.get(e.dataId).values,[v,b,y]=l,w=n.data.get(i.dataId).values,[x,C,k]=h,{batchSize:E,filterHeight:S,filterWidth:_,inChannels:O,inHeight:T,inWidth:D,outChannels:a,outHeight:B,outWidth:I,strideHeight:M,strideWidth:j}=c,N=S-1-c.padInfo.top,F=_-1-c.padInfo.left,R=a/O;for(let e=0;e<E;++e)for(let t=0;t<O;++t)for(let n=0;n<T;++n){var P=n-N,L=Math.max(0,Math.ceil(P/M)),U=Math.min(B,(S+P)/M);for(let r=0;r<D;++r){var z=r-F,H=Math.max(0,Math.ceil(z/j)),$=Math.min(I,(_+z)/j);let i=0;for(let n=L;n<U;++n){var Q=n*M-P;for(let r=H;r<$;++r){var V=v*e+b*n+y*r,q=x*(S-1-Q)+C*(_-1-(r*j-z))+k*t;for(let e=0;e<R;++e){i+=A[V+(t*R+e)]*w[q+e]}}}d[p*e+m*n+g*r+t]=i}}return n.makeTensorInfo(o.shape,o.dtype,o.values)}},
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Pt={kernelName:f.Y,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n}=e;e=t.x;var r=f.Ji.sizeFromShape(e.shape),i=n.data.get(e.dataId).values,o=Object(f.qe)([r,r],e.dtype);const a=o.values;for(let e=0;e<i.length;e++)a[e*r+e]=i[e];return e=[...e.shape,...e.shape],n.makeTensorInfo(e,o.dtype,o.values)}},Lt={kernelName:f.Z,backendName:"cpu",kernelFunc:({inputs:e,backend:t,attrs:n})=>{var{x:r,filter:i}=e,{strides:e,pad:n,dilations:o}=n;const a=t;var s=a.data.get(r.dataId).values,u=r.shape.length,c=a.data.get(i.dataId).values,l=i.shape.length,{batchSize:h,inHeight:d,inWidth:p,inChannels:m,outHeight:g,outWidth:A,padInfo:v,strideHeight:b,strideWidth:y,filterHeight:w,filterWidth:x,dilationHeight:C,dilationWidth:k,outShape:E}=f.de.computeDilation2DInfo(r.shape,i.shape,e,n,"NHWC",o),S=(t=f.Ji.sizeFromShape(E),E.length);const _=f.Ji.getArrayFromDType(r.dtype,t);for(let e=0;e<h;++e)for(let t=0;t<g;++t){var O=t*b-v.top;for(let n=0;n<A;++n){var T=n*y-v.left;for(let o=0;o<m;++o){let a=Number.MIN_SAFE_INTEGER;for(let t=0;t<w;++t){var D=O+t*C;if(0<=D&&D<d)for(let n=0;n<x;++n){var B,I=T+n*k;0<=I&&I<p&&(I=f.Ji.locToIndex([e,D,I,o],u,f.Ji.computeStrides(r.shape)),B=f.Ji.locToIndex([t,n,o],l,f.Ji.computeStrides(i.shape)),(I=s[I]+c[B])>a&&(a=I))}}_[f.Ji.locToIndex([e,t,n,o],S,f.Ji.computeStrides(E))]=a}}}return{dataId:a.write(f.Ji.toTypedArray(_,r.dtype),E,r.dtype),shape:E,dtype:r.dtype}}},Ut={kernelName:f.ab,backendName:"cpu",kernelFunc:({inputs:e,backend:t,attrs:n})=>{const{x:r,filter:i,dy:o}=e;var{strides:e,pad:n,dilations:a}=n;const s=t;var u=f.Ji.toNestedArray(r.shape,s.data.get(r.dataId).values),c=f.Ji.toNestedArray(i.shape,s.data.get(i.dataId).values);const{batchSize:l,inHeight:h,inWidth:d,inChannels:p,outHeight:m,outWidth:g,padInfo:A,strideHeight:v,strideWidth:b,filterHeight:y,filterWidth:w,dilationHeight:x,dilationWidth:C,outShape:k}=f.de.computeDilation2DInfo(r.shape,i.shape,e,n,"NHWC",a);f.Ji.assert(o.rank===k.length,()=>`Error in ${f.ab}, dy must have the same rank as output ${k.length}, but got `+o.rank);var E=f.Ji.toNestedArray(k,s.data.get(o.dataId).values);const S=f.Ji.makeZerosNestedTypedArray(i.shape,i.dtype);for(let e=0;e<l;++e)for(let t=0;t<m;++t){var _=t*v-A.top;for(let n=0;n<g;++n){var O=n*b-A.left;for(let r=0;r<p;++r){let i=Number.MIN_SAFE_INTEGER,o=0,a=0;for(let t=0;t<y;++t){var T=_+t*x;if(0<=T&&T<h)for(let n=0;n<w;++n){var D=O+n*C;0<=D&&D<d&&(D=u[e][T][D][r]+c[t][n][r])>i&&(i=D,o=t,a=n)}}S[o][a][r]+=E[e][t][n][r]}}}return{dataId:s.write(f.Ji.toTypedArray(S,r.dtype),i.shape,i.dtype),shape:i.shape,dtype:i.dtype}}},Ht={kernelName:f.bb,backendName:"cpu",kernelFunc:({inputs:e,backend:t,attrs:n})=>{const{x:r,filter:i,dy:o}=e;var{strides:e,pad:n,dilations:a}=n;const s=t;var u=f.Ji.toNestedArray(r.shape,s.data.get(r.dataId).values),c=f.Ji.toNestedArray(i.shape,s.data.get(i.dataId).values);const{batchSize:l,inHeight:h,inWidth:d,inChannels:p,outHeight:m,outWidth:g,padInfo:A,strideHeight:v,strideWidth:b,filterHeight:y,filterWidth:w,dilationHeight:x,dilationWidth:C,outShape:k}=f.de.computeDilation2DInfo(r.shape,i.shape,e,n,"NHWC",a);f.Ji.assert(o.rank===k.length,()=>`Error in ${f.bb}, dy must have the same rank as output ${k.length}, but got `+o.rank);var E=f.Ji.toNestedArray(k,s.data.get(o.dataId).values);const S=f.Ji.makeZerosNestedTypedArray(r.shape,r.dtype);for(let e=0;e<l;++e)for(let t=0;t<m;++t){var _=t*v-A.top;for(let n=0;n<g;++n){var O=n*b-A.left;for(let r=0;r<p;++r){let i=Number.MIN_SAFE_INTEGER,o=_<0?0:_,a=O<0?0:O;for(let t=0;t<y;++t){var T=_+t*x;if(0<=T&&T<h)for(let n=0;n<w;++n){var D,B=O+n*C;0<=B&&B<d&&(D=u[e][T][B][r]+c[t][n][r])>i&&(i=D,o=T,a=B)}}S[e][o][a][r]+=E[e][t][n][r]}}}return{dataId:s.write(f.Ji.toTypedArray(S,r.dtype),r.shape,r.dtype),shape:r.shape,dtype:r.dtype}}};
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
const xd=Uf((e,t)=>e*t);$t=td((e,t,n,r)=>({real:e*n-t*r,imag:e*r+t*n}));const Cd=ed(f.ic,xd,$t);
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function kd(e){const{inputs:t,backend:n,attrs:r}=e;e=t.x;var{axis:i,keepDims:o}=r;let a;If(e,"sum");e=(a="bool"===e.dtype?Zf({inputs:{x:e},backend:n,attrs:{dtype:"int32"}}):Pf({inputs:{x:e},backend:n})).shape.length;var i=f.Ji.parseAxisParam(i,a.shape),s=f.de.getAxesPermutation(i,e);let u=i,c=a;null!=s&&(c=ud({inputs:{x:a},backend:n,attrs:{perm:s}}),u=f.de.getInnerMostAxes(u.length,e)),f.de.assertAxesAreInnerMostDims("sum",u,c.shape.length);var[e,l]=f.de.computeOutAndReduceShapes(c.shape,u),h=f.de.upcastType(c.dtype,"int32");let d=Yf(n,e,h);var p=f.Ji.sizeFromShape(l);const m=n.data.get(d.dataId).values;var g=n.data.get(c.dataId).values;for(let e=0;e<m.length;++e){var A=e*p;let t=0;for(let e=0;e<p;++e)t+=g[A+e];m[e]=t}return o&&(d=id({inputs:{x:h=d},backend:n,attrs:{shape:e=f.de.expandShapeToKeepDim(d.shape,i)}}),n.disposeIntermediateTensorInfo(h)),n.disposeIntermediateTensorInfo(a),null!=s&&n.disposeIntermediateTensorInfo(c),d}Qt={kernelName:f.ic,backendName:"cpu",kernelFunc:Cd},qt={kernelName:f.wd,backendName:"cpu",kernelFunc:kd},
/**
 * @license
 * Copyright 2021 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Wt={kernelName:f.db,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;e=r.equation;var i=t,{allDims:o,summedDims:e,idDims:a}=f.de.decodeEinsumEquation(e,i.length),{path:s,steps:u}=(f.de.checkEinsumDimSizes(o.length,a,i),f.de.getEinsumComputePath(e,a)),c=u.length;let l=null,h=o.length;const d=[];for(let e=0;e<c;++e){for(const t of u[e]){var{permutationIndices:p,expandDims:m}=f.de.getEinsumPermutation(h,a[t]);let e;f.de.isIdentityPermutation(p)?e=i[t]:(e=ud({inputs:{x:i[t]},backend:n,attrs:{perm:p}}),d.push(e));const r=e.shape.slice();for(let e=0;e<m.length;++e)r.splice(m[e],0,1);f.Ji.arraysEqual(e.shape,r)||(e=id({inputs:{x:e},backend:n,attrs:{shape:r}}),d.push(e)),null===l?l=e:(l=Cd({inputs:{a:e,b:l},backend:n}),d.push(l))}e<c-1&&(0<=s[e]&&(l=kd({inputs:{x:l},backend:n,attrs:{axis:s[e]-(o.length-h),keepDims:!1}}),d.push(l)),h--)}for(const e of d)e!==l&&n.disposeIntermediateTensorInfo(e);return l}},
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Kt={kernelName:f.fb,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n}=e;var{dy:e,y:r}=t;If([e,r],"eluGrad");const i=new Float32Array(f.Ji.sizeFromShape(r.shape));var o=n.data.get(r.dataId).values,a=n.data.get(e.dataId).values;for(let e=0;e<o.length;++e){var s=o[e];i[e]=1<=s?a[e]:a[e]*(s+1)}return n.makeTensorInfo(r.shape,"float32",i)}};
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
const Ed=Uf((e,t)=>e===t?1:0),Sd=ed(f.hb,Ed,null,"bool");Yt={kernelName:f.hb,backendName:"cpu",kernelFunc:Sd};
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the License);
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an AS IS BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
const _d=f.de.ERF_P,Od=f.de.ERF_A1,Td=f.de.ERF_A2,Dd=f.de.ERF_A3,Bd=f.de.ERF_A4,Id=f.de.ERF_A5;Jt=Nf(f.ib,e=>{var t=Math.sign(e),n=(e=Math.abs(e),1/(1+_d*e));return t*(1-((((Id*n+Bd)*n+Dd)*n+Td)*n+Od)*n*Math.exp(-e*e))}),en={kernelName:f.ib,backendName:"cpu",kernelFunc:Jt};
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the License);
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an AS IS BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
const Md=Vf(e=>Math.exp(e)),jd=Ff(f.jb,Md,"float32");
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function Nd(e){var{inputs:e,backend:t,attrs:n}=e;const r=e.input;e=n.dim;const i=r.shape.length,o=r.shape.slice();let a=e;return e<0&&(f.Ji.assert(-(i+1)<=e,()=>`Axis must be in the interval [${-(i+1)}, ${i}]`),a=i+e+1),o.splice(a,0,1),id({inputs:{x:r},backend:t,attrs:{shape:o}})}rn={kernelName:f.jb,backendName:"cpu",kernelFunc:jd},on={kernelName:f.kb,backendName:"cpu",kernelFunc:Nd};
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the License);
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an AS IS BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
const Fd=Vf(e=>Math.expm1(e));sn=Ff(f.lb,Fd),cn={kernelName:f.lb,backendName:"cpu",kernelFunc:sn},hn=Uf((e,t)=>e/t);const Rd=ed(f.Gc,hn),Pd={kernelName:f.Gc,backendName:"cpu",kernelFunc:Rd},Ld=Uf((e,t)=>e-t);fn=td((e,t,n,r)=>({real:e-n,imag:t-r}));const Ud=ed(f.vd,Ld,fn);
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function zd(e,t,n){var r=(s=e.shape)[0],i=s[1],o=(s=n.data.get(e.dataId)).complexTensorInfos.real,a=s.complexTensorInfos.imag,s=(e=[r,i],f.Ji.sizeFromShape(e));const u=f.Ji.getTypedArrayFromDType("float32",s),c=f.Ji.getTypedArrayFromDType("float32",s);for(let e=0;e<r;e++){var l=dd({inputs:{x:o},backend:n,attrs:{begin:[e,0],size:[1,i]}}),h=dd({inputs:{x:a},backend:n,attrs:{begin:[e,0],size:[1,i]}});const r=Kf({inputs:{real:l,imag:h},backend:n});var{real:d,imag:p}=function(e,t,n){var r,i,o,a,s,u,c,l,h=f.Ji.sizeFromShape(e.shape),d=n.data.get(e.dataId),p=n.data.get(d.complexTensorInfos.real.dataId).values;d=n.data.get(d.complexTensorInfos.imag.dataId).values;return function(e){return 0==(e&e-1)}(h)?(r=function e(t,n,r,i,o){if(1===r)return{real:t,imag:n};const a=f.de.mergeRealAndImagArrays(t,n),s=r/2,u=f.de.complexWithEvenIndex(a),c=u.real,l=u.imag,h=[c.length],d=o.makeTensorInfo(h,"float32",c),p=o.makeTensorInfo(h,"float32",l),m=Kf({inputs:{real:d,imag:p},backend:o}),g=f.de.complexWithOddIndex(a),A=g.real,v=g.imag,b=[A.length],y=o.makeTensorInfo(b,"float32",A),w=o.makeTensorInfo(b,"float32",v),x=Kf({inputs:{real:y,imag:w},backend:o}),C=e(c,l,s,i,o),k=C.real,E=C.imag,S=[k.length],_=o.makeTensorInfo(S,"float32",k),O=o.makeTensorInfo(S,"float32",E),T=Kf({inputs:{real:_,imag:O},backend:o}),D=e(A,v,s,i,o),B=D.real,I=D.imag,M=[B.length],j=o.makeTensorInfo(M,"float32",B),N=o.makeTensorInfo(M,"float32",I),F=Kf({inputs:{real:j,imag:N},backend:o}),R=f.de.exponents(r,i),P=[R.real.length],L=o.makeTensorInfo(P,"float32",R.real),U=o.makeTensorInfo(P,"float32",R.imag),z=Kf({inputs:{real:L,imag:U},backend:o}),H=Cd({inputs:{a:z,b:F},backend:o}),$=rd({inputs:{a:T,b:H},backend:o}),Q=Ud({inputs:{a:T,b:H},backend:o}),V=Xf({inputs:{input:$},backend:o}),q=Xf({inputs:{input:Q},backend:o}),G=vd({inputs:{input:$},backend:o}),W=vd({inputs:{input:Q},backend:o}),K=bd({inputs:[V,q],backend:o,attrs:{axis:0}}),Y=bd({inputs:[G,W],backend:o,attrs:{axis:0}}),X=o.data.get(K.dataId).values,J=o.data.get(Y.dataId).values;return o.disposeIntermediateTensorInfo(d),o.disposeIntermediateTensorInfo(p),o.disposeIntermediateTensorInfo(m),o.disposeIntermediateTensorInfo(y),o.disposeIntermediateTensorInfo(w),o.disposeIntermediateTensorInfo(x),o.disposeIntermediateTensorInfo(_),o.disposeIntermediateTensorInfo(O),o.disposeIntermediateTensorInfo(T),o.disposeIntermediateTensorInfo(j),o.disposeIntermediateTensorInfo(N),o.disposeIntermediateTensorInfo(F),o.disposeIntermediateTensorInfo(L),o.disposeIntermediateTensorInfo(U),o.disposeIntermediateTensorInfo(z),o.disposeIntermediateTensorInfo(H),o.disposeIntermediateTensorInfo($),o.disposeIntermediateTensorInfo(Q),o.disposeIntermediateTensorInfo(V),o.disposeIntermediateTensorInfo(G),o.disposeIntermediateTensorInfo(q),o.disposeIntermediateTensorInfo(W),o.disposeIntermediateTensorInfo(K),o.disposeIntermediateTensorInfo(Y),{real:X,imag:J}}(p,d,h,t,n),e=[e.shape[0],e.shape[1]],t?(l=n.makeTensorInfo(e,"float32",r.real),e=n.makeTensorInfo(e,"float32",r.imag),o=Pf({inputs:{x:i=n.makeTensorInfo([],"float32",f.Ji.createScalarValue(h,"float32"))},backend:n}),a=Pd.kernelFunc({inputs:{a:l,b:i},backend:n}),s=Pd.kernelFunc({inputs:{a:e,b:o},backend:n}),u=n.data.get(a.dataId).values,c=n.data.get(s.dataId).values,n.disposeIntermediateTensorInfo(l),n.disposeIntermediateTensorInfo(e),n.disposeIntermediateTensorInfo(i),n.disposeIntermediateTensorInfo(o),n.disposeIntermediateTensorInfo(a),n.disposeIntermediateTensorInfo(s),{real:u,imag:c}):r):(l=function(e,t,n){var r=new Float32Array(2*t);for(let a=0;a<t;a++){let s=0,u=0;for(let r=0;r<t;r++){var i=f.de.exponent(a*r,t,n),o=f.de.getComplexWithIndex(e,r);s+=o.real*i.real-o.imag*i.imag,u+=o.real*i.imag+o.imag*i.real}n&&(s/=t,u/=t),f.de.assignToTypedArray(r,s,u,a)}return r}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */(f.de.mergeRealAndImagArrays(p,d),h,t),f.de.splitRealAndImagArrays(l))}(r,t,n),m=f.de.mergeRealAndImagArrays(d,p);for(let t=0;t<i;t++){var g=f.de.getComplexWithIndex(m,t);u[e*i+t]=g.real,c[e*i+t]=g.imag}n.disposeIntermediateTensorInfo(l),n.disposeIntermediateTensorInfo(h),n.disposeIntermediateTensorInfo(r)}var A=Kf({inputs:{real:s=n.makeTensorInfo(e,"float32",u),imag:e=n.makeTensorInfo(e,"float32",c)},backend:n});return n.disposeIntermediateTensorInfo(s),n.disposeIntermediateTensorInfo(e),A}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function Hd(e){const{backend:t,attrs:n}=e;var{shape:e,value:r,dtype:i}=n,i=i||f.Ji.inferDtype(r),o=f.Ji.getArrayFromDType(i,f.Ji.sizeFromShape(e));return r=r,o.fill(r),t.makeTensorInfo(e,i,o)}pn={kernelName:f.vd,backendName:"cpu",kernelFunc:Ud},dn={kernelName:f.mb,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n}=e;e=t.input;var r=f.Ji.sizeFromShape(e.shape),i=e.shape[e.shape.length-1];r=id({inputs:{x:e},backend:n,attrs:{shape:[r/i,i]}}),e=id({inputs:{x:i=zd(r,!1,n)},backend:n,attrs:{shape:e.shape}});return n.disposeIntermediateTensorInfo(r),n.disposeIntermediateTensorInfo(i),e}},mn={kernelName:f.nb,backendName:"cpu",kernelFunc:Hd},
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
gn={kernelName:f.ob,backendName:"cpu",kernelFunc:({inputs:e,backend:t})=>{e=e.image;const n=t,r=f.Ji.getTypedArrayFromDType(e.dtype,f.Ji.sizeFromShape(e.shape));var[i,o,a,s]=e.shape,u=n.data.get(e.dataId).values;for(let e=0;e<i;e++){var c=e*a*o*s;for(let e=0;e<o;e++){var l=e*(a*s);for(let e=0;e<a;e++){var h=e*s;for(let t=0;t<s;t++){var d=Math.round(a-e-1),p=c+l+h+t;let n=u[p];0<=d&&d<a&&(n=u[d=c+l+d*s+t]),r[p]=n}}}}return{dataId:n.write(r,e.shape,e.dtype),shape:e.shape,dtype:e.dtype}}};
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the License);
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an AS IS BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
const $d=Vf(e=>Math.floor(e));
/**
 * @license
 * Copyright 2021 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function Qd(e,t,n,r,i,o,a,s,u){const c=Object(f.qe)([r,o],n);for(let n=0;n<r;n++){const r=[];let h=0;for(let t=0;t<i;t++){var l=e[n*i+t];h+=l*a[t],r.push(l)}if(h<0||h>=u/o)throw new Error(`Invalid indices: ${r} does not index into `+s);for(let e=0;e<o;e++)c.values[n*o+e]=t.get(...t.indexToLoc(h*o+e))}return c}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function Vd(e,t,n){const r=Object(f.qe)(n,e.dtype);for(let n=0;n<r.size;++n){const a=r.indexToLoc(n).slice();var i=a[0],o=a[2];i=t.locToIndex([i,o]);0<=(o=(a[2]=t.values[i],e.locToIndex(a)))&&o<e.values.length&&(r.values[n]=e.values[o])}return r}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */An=Ff(f.pb,$d),vn={kernelName:f.pb,backendName:"cpu",kernelFunc:An},bn=Uf((e,t)=>Math.floor(e/t)),yn=ed(f.qb,bn,null,"int32"),wn={kernelName:f.qb,backendName:"cpu",kernelFunc:yn},Cn={kernelName:f.tb,backendName:"cpu",kernelFunc:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){const{inputs:t,backend:n,attrs:r}=e;var{x:e,filter:i,bias:o,preluActivationWeights:a}=t,{strides:s,pad:u,dataFormat:c,dilations:l,dimRoundingMode:h,activation:f,leakyreluAlpha:d}=r;let p=yd({inputs:{x:e,filter:i},backend:n,attrs:{strides:s,pad:u,dataFormat:c,dilations:l,dimRoundingMode:h}});return o&&(e=p,"NCHW"===c&&1===o.shape.length&&1!==o.shape[0]?(i=id({inputs:{x:o},backend:n,attrs:{shape:[o.shape[0],1,1]}}),p=rd({inputs:{a:p,b:i},backend:n}),n.disposeIntermediateTensorInfo(i)):p=rd({inputs:{a:p,b:o},backend:n}),n.disposeIntermediateTensorInfo(e)),f&&(s=p,"NCHW"===c&&"prelu"===f&&1===a.shape.length&&1!==a.shape[0]?(p=Wf(n,p,f,u=id({inputs:{x:a},backend:n,attrs:{shape:[a.shape[0],1,1]}}),d),n.disposeIntermediateTensorInfo(u)):p=Wf(n,p,f,a,d),n.disposeIntermediateTensorInfo(s)),p}},
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
_n={kernelName:f.ub,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;var{x:e,filter:i,bias:o,preluActivationWeights:a}=t,{strides:s,pad:u,dataFormat:c,dilations:l,dimRoundingMode:h,activation:f,leakyreluAlpha:d}=r;let p=wd({inputs:{x:e,filter:i},backend:n,attrs:{strides:s,pad:u,dataFormat:c,dilations:l,dimRoundingMode:h}});return o&&(e=p,p=rd({inputs:{a:p,b:o},backend:n}),n.disposeIntermediateTensorInfo(e)),f&&(i=p,p=Wf(n,p,f,a,d),n.disposeIntermediateTensorInfo(i)),p}},On={kernelName:f.vb,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n}=e;var{params:e,indices:r}=t,i=f.Ji.sizeFromShape(e.shape),o=(o=r.shape)[o.length-1],[a,s,u,c]=f.de.prepareAndValidate(e,r);return 0===s?n.makeTensorInfo(a,e.dtype,[]):(r=Qd(n.data.get(r.dataId).values,n.bufferSync(e),e.dtype,s,o,u,c,e.shape,i),n.makeTensorInfo(a,e.dtype,r.values))}},P={kernelName:f.wb,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;var{x:e,indices:i}=t,{axis:o,batchDims:a}=r,s=(o=(If([e,i],"gatherV2"),f.Ji.parseAxisParam(o,e.shape)[0]),n.data.get(i.dataId).values);const u=e.shape[o];for(let e=0;e<s.length;++e){const t=s[e];f.Ji.assert(t<=u-1&&0<=t,()=>`GatherV2: the index value ${t} is not in [0, ${u-1}]`)}let c=a;null==a&&(c=0);a=f.Ji.sizeFromShape(i.shape),e=id({inputs:{x:e},backend:n,attrs:{shape:[(o=f.de.segment_util.collectGatherOpShapeInfo(e,i,o,c)).batchSize,o.outerSize,o.dimSize,o.sliceSize]}});var o,i=id({inputs:{x:i},backend:n,attrs:{shape:[o.batchSize,a/o.batchSize]}}),a=[o.batchSize,o.outerSize,a/o.batchSize,o.sliceSize],l=n.bufferSync(i);l=Vd(n.bufferSync(e),l,a);return n.disposeIntermediateTensorInfo(e),n.disposeIntermediateTensorInfo(i),n.makeTensorInfo(o.outputShape,l.dtype,l.values)}};
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
const qd=Uf((e,t)=>t<e?1:0);Z=ed(f.xb,qd,null,"bool"),te={kernelName:f.xb,backendName:"cpu",kernelFunc:Z};
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
const Gd=Uf((e,t)=>t<=e?1:0);we=ed(f.yb,Gd,null,"bool"),Oe={kernelName:f.yb,backendName:"cpu",kernelFunc:we},jt={kernelName:f.zb,backendName:"cpu",kernelFunc:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){const{inputs:t,backend:n}=e;e=t.input;var r=f.Ji.sizeFromShape(e.shape),i=e.shape[e.shape.length-1];r=id({inputs:{x:e},backend:n,attrs:{shape:[r/i,i]}}),e=id({inputs:{x:i=zd(r,!0,n)},backend:n,attrs:{shape:e.shape}});return n.disposeIntermediateTensorInfo(r),n.disposeIntermediateTensorInfo(i),e}},Ie=Nf(f.Cb,e=>Number.isFinite(e)?1:0,"bool"),Me={kernelName:f.Cb,backendName:"cpu",kernelFunc:Ie},Ne=Nf(f.Db,e=>Math.abs(e)===1/0?1:0,"bool"),Je={kernelName:f.Db,backendName:"cpu",kernelFunc:Ne},et=Nf(f.Eb,e=>Number.isNaN(e)?1:0,"bool"),bt={kernelName:f.Eb,backendName:"cpu",kernelFunc:et};
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the License);
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an AS IS BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
const Wd=Uf((e,t)=>e<t?1:0);xt=ed(f.Jb,Wd,null,"bool"),$t={kernelName:f.Jb,backendName:"cpu",kernelFunc:xt};
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
const Kd=Uf((e,t)=>e<=t?1:0);
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function Yd(e,t,n){var r=(t-e)/(n-1);const i=f.Ji.makeZerosTypedArray(n,"float32");i[0]=e;for(let e=1;e<i.length;e++)i[e]=i[e-1]+r;return i}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */Jt=ed(f.Kb,Kd,null,"bool"),sn={kernelName:f.Kb,backendName:"cpu",kernelFunc:Jt},hn={kernelName:f.Lb,backendName:"cpu",kernelFunc:function(e){const{backend:t,attrs:n}=e;var{start:e,stop:r,num:i}=n;e=Yd(e,r,i);return t.makeTensorInfo([e.length],"float32",e)}};
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the License);
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an AS IS BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
const Xd=Vf(e=>Math.log(e));
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function Jd(e,t,n,r){const i=f.Ji.getTypedArrayFromDType(r,f.Ji.sizeFromShape(n));for(let n=0;n<i.length;++n){var o=n*t;let r=e[o];for(let n=0;n<t;++n){var a=e[o+n];(Number.isNaN(a)||a>r)&&(r=a)}i[n]=r}return i}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function Zd(e){var{inputs:e,backend:t,attrs:n}=e,{reductionIndices:n,keepDims:r}=(e=e.x,n);const i=t;let o=e.shape;t=o.length;let a=n=f.Ji.parseAxisParam(n,o);var s=f.de.getAxesPermutation(a,t);let u=i.data.get(e.dataId).values;if(null!=s){const n=new Array(t);for(let e=0;e<n.length;e++)n[e]=o[s[e]];u=sd(u,o,e.dtype,s,n),a=f.de.getInnerMostAxes(a.length,t),o=n}If(e,"max"),f.de.assertAxesAreInnerMostDims("max",a,t);var[t,c]=f.de.computeOutAndReduceShapes(o,a),c=(c=Jd(u,c=f.Ji.sizeFromShape(c),t,e.dtype),i.write(c,t,e.dtype));let l=t;return r&&(l=r=f.de.expandShapeToKeepDim(t,n)),{dataId:c,shape:l,dtype:e.dtype}}fn=Ff(f.Mb,Xd),An={kernelName:f.Mb,backendName:"cpu",kernelFunc:fn},bn=Nf(f.Nb,e=>Math.log1p(e)),yn={kernelName:f.Nb,backendName:"cpu",kernelFunc:bn},Z=Uf((e,t)=>e&&t),we=ed(f.Pb,Z,null,"bool"),Ie={kernelName:f.Pb,backendName:"cpu",kernelFunc:we},Ne=Nf(f.Qb,e=>e?0:1,"bool"),et={kernelName:f.Qb,backendName:"cpu",kernelFunc:Ne},xt=Uf((e,t)=>e||t),Jt=ed(f.Rb,xt,null,"bool"),fn={kernelName:f.Rb,backendName:"cpu",kernelFunc:Jt},bn={kernelName:f.Gb,backendName:"cpu",kernelFunc:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){const{inputs:t,backend:n,attrs:r}=e,{depthRadius:i,bias:o,alpha:a,beta:s}=(e=t.x,r),u=(If(e,"LRN"),e.shape[3]),c=u-1,l=n.data.get(e.dataId).values;var h=f.Ji.sizeFromShape(e.shape);const d=new Float32Array(h);for(let e=0;e<h;e++){var p=function(e){var t=e%u;let n=e-t+Math.max(0,t-i);var r=e-t+Math.min(t+i,c);let o=0;for(;n<=r;n++){var a=l[n];o+=a*a}return o}(e);p=l[e]*Math.pow(o+a*p,-s);d[e]=p}return n.makeTensorInfo(e.shape,e.dtype,d)}},
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Z={kernelName:f.Hb,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;var{x:e,y:i,dy:o}=t,{depthRadius:a,bias:s,alpha:u,beta:c}=r,l=(If(o,"LRNGrad"),f.Ji.sizeFromShape(o.shape)),h=o.shape[3],d=n.data.get(o.dataId).values,p=n.data.get(e.dataId).values,m=n.data.get(i.dataId).values;const g=new Float32Array(l);var A=l;for(let e=0;e<A;e++){var v=e%h,b=e-v+Math.max(0,v-a),y=e-v+Math.min(h,v+a+1);let t=0;for(let e=b;e<y;e++)t+=Math.pow(p[e],2);t=u*t+s;for(let n=b;n<y;n++){let r=-2*u*c*p[n]*m[e]/t;e===n&&(r+=Math.pow(t,-c)),r*=d[e],g[n]+=r}}return n.makeTensorInfo(o.shape,e.dtype,g)}},we={kernelName:f.Ub,backendName:"cpu",kernelFunc:Zd};
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
const ep=Uf((e,t)=>Math.max(e,t));Ne=ed(f.ac,ep),xt={kernelName:f.ac,backendName:"cpu",kernelFunc:Ne},Jt={kernelName:f.Vb,backendName:"cpu",kernelFunc:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){const{inputs:t,backend:n,attrs:r}=e,{filterSize:i,strides:o,pad:a,dimRoundingMode:s}=(If(e=t.x,"maxPool"),r);f.Ji.assert(f.de.eitherStridesOrDilationsAreOne(o,1),()=>`Error in maxPool: Either strides or dilations must be 1. Got strides ${o} and dilations '1'`);var u=f.de.computePool2DInfo(e.shape,i,o,1,a,s);let c;if(1===u.filterWidth&&1===u.filterHeight&&f.Ji.arraysEqual(u.inShape,u.outShape))c=Pf({inputs:{x:e},backend:n});else{var l=n.data.get(e.dataId).values;const t=f.Ji.computeStrides(e.shape);l=cd(l,e.shape,e.dtype,t,u,"max"),c=n.makeTensorInfo(u.outShape,e.dtype,l.values)}return c}},
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Ne={kernelName:f.Wb,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;e=t.x;var{filterSize:i,strides:o,pad:a,dimRoundingMode:s,dataFormat:u}=r,i=(If(e,"maxPool3d"),f.de.computePool3DInfo(e.shape,i,o,1,a,s,u)),o=hd(n.data.get(e.dataId).values,e.shape,e.dtype,f.Ji.computeStrides(e.shape),i,"max");return n.makeTensorInfo(o.shape,"float32",o.values)}};
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
var tp={kernelName:f.Xb,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;var{dy:e,input:i}=t,{filterSize:o,strides:a,pad:s,dimRoundingMode:u}=r,c=(If([e,i],"maxPool3DGrad"),f.de.computePool3DInfo(i.shape,o,a,1,s,u));const l=function(e,t){const n=Object(f.qe)(t.outShape,"int32");var r=t.strideDepth,i=t.strideHeight,o=t.strideWidth,a=t.dilationDepth,s=t.dilationHeight,u=t.dilationWidth,c=t.effectiveFilterDepth,l=t.effectiveFilterHeight,h=t.effectiveFilterWidth,d=t.padInfo.front,p=t.padInfo.top,m=t.padInfo.left;for(let f=0;f<t.batchSize;++f)for(let S=0;S<t.inChannels;++S)for(let _=0;_<t.outDepth;++_){var g=_*r-d;let O=g;for(;O<0;)O+=a;var A=Math.min(t.inDepth,c+g);for(let r=0;r<t.outHeight;++r){var v=r*i-p;let c=v;for(;c<0;)c+=s;var b=Math.min(t.inHeight,l+v);for(let i=0;i<t.outWidth;++i){var y=i*o-m;let d=y;for(;d<0;)d+=u;var w=Math.min(t.inWidth,h+y);let p=Number.NEGATIVE_INFINITY,T=-1;for(let t=O;t<A;t+=a){var x=t-g;for(let n=c;n<b;n+=s){var C=n-v;for(let r=d;r<w;r+=u){var k=r-y,E=e.get(f,t,n,r,S);E>=p&&(p=E,T=x*l*h+C*l+k)}}}n.set(T,f,_,r,i,S)}}}return n}(n.bufferSync(i),c);var h=c.strideDepth,d=c.strideHeight,p=c.strideWidth,m=c.dilationDepth,g=c.dilationHeight,A=c.dilationWidth,v=c.effectiveFilterDepth,b=c.effectiveFilterHeight,y=c.effectiveFilterWidth,w=v-1-c.padInfo.front,x=y-1-c.padInfo.left,C=b-1-c.padInfo.top;const k=Object(f.qe)(i.shape,"float32"),E=n.bufferSync(e);for(let e=0;e<c.batchSize;++e)for(let t=0;t<c.inChannels;++t)for(let n=0;n<c.inDepth;++n)for(let r=0;r<c.inHeight;++r)for(let i=0;i<c.inWidth;++i){var S=n-w,_=r-C,O=i-x;let o=0;for(let n=0;n<v;n+=m){var T=(S+n)/h;if(!(T<0||T>=c.outDepth||Math.floor(T)!==T))for(let r=0;r<b;r+=g){var D=(_+r)/d;if(!(D<0||D>=c.outHeight||Math.floor(D)!==D))for(let i=0;i<y;i+=A){var B,I=(O+i)/p;I<0||I>=c.outWidth||Math.floor(I)!==I||0!=(B=v*b*y-1-l.get(e,T,D,I,t)===n*b*y+r*y+i?1:0)&&(o+=(I=E.get(e,T,D,I,t))*B)}}}k.set(o,e,n,r,i,t)}return n.makeTensorInfo(k.shape,k.dtype,k.values)}},np={kernelName:f.Yb,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;var{dy:e,input:i,output:o}=t,a=i,{filterSize:i,strides:o,pad:s,dimRoundingMode:u}=(If([i,o],"maxPoolGrad"),r),c=f.de.computePool2DInfo(a.shape,i,o,1,s,u),i=n.data.get(a.dataId).values;const l=Object(f.qe)(c.outShape,a.dtype,ld(i,a.shape,a.dtype,c).values);var h=c.strideHeight,d=c.strideWidth,p=c.dilationHeight,m=c.dilationWidth,g=c.effectiveFilterHeight,A=c.effectiveFilterWidth,v=A-1-c.padInfo.left,b=g-1-c.padInfo.top;const y=Object(f.qe)(a.shape,"float32"),w=(o=n.data.get(e.dataId).values,Object(f.qe)(e.shape,"float32",o));for(let e=0;e<c.batchSize;++e)for(let t=0;t<c.inChannels;++t)for(let n=0;n<c.inHeight;++n)for(let r=0;r<c.inWidth;++r){var x=n-b,C=r-v;let i=0;for(let n=0;n<g;n+=p){var k=(x+n)/h;if(!(k<0||k>=c.outHeight||Math.floor(k)!==k))for(let r=0;r<A;r+=m){var E,S=(C+r)/d;S<0||S>=c.outWidth||Math.floor(S)!==S||0!=(E=g*A-1-l.get(e,k,S,t)===n*A+r?1:0)&&(i+=(S=w.get(e,k,S,t))*E)}}y.set(i,e,n,r,t)}return n.makeTensorInfo(y.shape,y.dtype,y.values)}},rp={kernelName:f.Zb,backendName:"cpu",kernelFunc:({inputs:e,attrs:t,backend:n})=>{e=e.x;var{filterSize:t,strides:r,pad:i,includeBatchInIndex:o}=t;const a=n;If(e,"MaxPoolWithArgmax");n=a.data.get(e.dataId).values,t=f.de.computePool2DInfo(e.shape,t,r,[1,1],i);var s,[i,n]=(r=n,i=e.shape,o=o,u=t,s=cd(r,0,n=e.dtype,f.Ji.computeStrides(i),u,"max"),r=ld(r,i,n,u,!0,o),[s.values,r.values]),u=a.write(i,t.outShape,e.dtype),o=a.write(n,t.outShape,e.dtype);return[{dataId:u,shape:t.outShape,dtype:e.dtype},{dataId:o,shape:t.outShape,dtype:"int32"}]}},ip={kernelName:f.bc,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;e=t.x;var{axis:i,keepDims:o}=r,a=f.Ji.parseAxisParam(i,e.shape);a=f.de.computeOutAndReduceShapes(e.shape,a)[1],a=f.Ji.sizeFromShape(a);const s=[];return a=n.makeTensorInfo([],"float32",new Float32Array([a])),s.push(a),e=Zf({inputs:{x:e},backend:n,attrs:{dtype:"float32"}}),s.push(e),e=Rd({inputs:{a:e,b:a},backend:n}),s.push(e),a=kd({inputs:{x:e},backend:n,attrs:{axis:i,keepDims:o}}),s.forEach(e=>n.disposeIntermediateTensorInfo(e)),a}},op={kernelName:f.cc,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;e=t.x;var{axis:i,keepDims:o}=r;If(e,"min");let a=i=f.Ji.parseAxisParam(i,e.shape);var s=f.de.getAxesPermutation(a,e.shape.length);let u=e;null!=s&&(u=ud({inputs:{x:e},backend:n,attrs:{perm:s}}),a=f.de.getInnerMostAxes(a.length,e.shape.length)),f.de.assertAxesAreInnerMostDims("min",a,u.shape.length);var[e,c]=f.de.computeOutAndReduceShapes(u.shape,a),l=f.Ji.sizeFromShape(c);const h=f.Ji.makeZerosTypedArray(f.Ji.sizeFromShape(e),u.dtype);var d=n.data.get(u.dataId).values;for(let e=0;e<h.length;++e){var p=e*l;let t=d[p];for(let e=0;e<l;++e){var m=d[p+e];(Number.isNaN(m)||m<t)&&(t=m)}h[e]=t}return null!=s&&n.disposeIntermediateTensorInfo(u),c=n.makeTensorInfo(e,u.dtype,h),o?(o=id({inputs:{x:c},backend:n,attrs:{shape:s=f.de.expandShapeToKeepDim(e,i)}}),n.disposeIntermediateTensorInfo(c),o):c}};
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
const ap=Uf((e,t)=>Math.min(e,t));var sp=ed(f.dc,ap),up=(sp={kernelName:f.dc,backendName:"cpu",kernelFunc:sp},{kernelName:f.ec,backendName:"cpu",kernelFunc:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){const{inputs:t,backend:n,attrs:r}=e,i=t.x,{paddings:o,mode:a}=r,s=(If(i,"mirrorPad"),e=o.map((e,t)=>e[0]+i.shape[t]+e[1]),o.map(e=>e[0]));var u=o.map((e,t)=>e[0]+i.shape[t]),c="reflect"===a?0:1,l=n.data.get(i.dataId).values,h=i.shape.length,d=f.Ji.computeStrides(i.shape),p=f.Ji.sizeFromShape(e),m=e.length,g=f.Ji.computeStrides(e);const A=f.Ji.getTypedArrayFromDType(i.dtype,p);for(let e=0;e<p;e++){let t=f.Ji.indexToLoc(e,m,g);for(let e=0;e<m;e++)t[e]<s[e]?t[e]=2*s[e]-t[e]-c:t[e]>=u[e]&&(t[e]=2*(u[e]-1)-t[e]+c);t=t.map((e,t)=>e-s[t]);var v=f.Ji.locToIndex(t,h,d);A[e]=l[v]}return{dataId:n.write(A,e,i.dtype),shape:e,dtype:i.dtype}}}),cp=Uf((e,t)=>{var n=e%t;return e<0&&t<0||0<=e&&0<=t?n:(n+t)%t});cp=ed(f.fc,cp),cp={kernelName:f.fc,backendName:"cpu",kernelFunc:cp};
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function lp(e){const{inputs:t,backend:n,attrs:r}=e;e=t.logits;var i=r.dim,o=e.shape.length;let a=i;if((a=-1===a?o-1:a)!==o-1)throw Error(`Softmax along a non-last dimension is not yet supported. Logits was rank ${o} and dim was `+a);var s=id({inputs:{x:o=Zd({inputs:{x:e},backend:n,attrs:{reductionIndices:i=f.Ji.parseAxisParam([a],e.shape),keepDims:!1}})},backend:n,attrs:{shape:c=f.de.expandShapeToKeepDim(o.shape,i)}}),u=(e=Ud({inputs:{a:e,b:s},backend:n}),jd({inputs:{x:e},backend:n})),c=id({inputs:{x:i=kd({inputs:{x:u},backend:n,attrs:{axis:i,keepDims:!1}})},backend:n,attrs:{shape:c}}),l=Rd({inputs:{a:u,b:c},backend:n});return n.disposeIntermediateTensorInfo(o),n.disposeIntermediateTensorInfo(s),n.disposeIntermediateTensorInfo(e),n.disposeIntermediateTensorInfo(u),n.disposeIntermediateTensorInfo(i),n.disposeIntermediateTensorInfo(c),l}var hp={kernelName:f.ed,backendName:"cpu",kernelFunc:lp},fp={kernelName:f.hc,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{numSamples:i,seed:o,normalized:a}=(e=t.logits,r);If(e,"multinomial");var s=(e=a?e:lp({inputs:{logits:e},backend:n,attrs:{dim:-1}})).shape[0],u=e.shape[1],c=n.data.get(e.dataId).values,l=[s,i];const h=f.Ji.makeZerosTypedArray(f.Ji.sizeFromShape(l),"int32");for(let e=0;e<s;++e){var d=e*u;const t=new Float32Array(u-1);t[0]=c[d];for(let e=1;e<t.length;++e)t[e]=t[e-1]+c[d+e];const n=rf.alea(o.toString());var p=e*i;for(let e=0;e<i;++e){var m=n();h[p+e]=t.length;for(let n=0;n<t.length;n++)if(m<t[n]){h[p+e]=n;break}}}return a||n.disposeIntermediateTensorInfo(e),n.makeTensorInfo(l,"int32",h)}};
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function dp(e,t,n){var r=f.Ji.createScalarValue(-1,n);return xd([],t,r,e,n)}var pp={kernelName:f.jc,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n}=e;If(e=t.x,"neg");var[r,i]=dp(r=n.data.get(e.dataId).values,e.shape,e.dtype);return n.makeTensorInfo(i,e.dtype,r)}};
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */const mp=f.Rf.nonMaxSuppressionV3Impl;var gp={kernelName:f.kc,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;var{boxes:e,scores:i}=t,{maxOutputSize:o,iouThreshold:a,scoreThreshold:s}=r,i=(e=(If(e,"NonMaxSuppression"),n.data.get(e.dataId).values),n.data.get(i.dataId).values);e=mp(e,i,o,a,s).selectedIndices;return n.makeTensorInfo([e.length],"int32",new Int32Array(e))}};
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */const Ap=f.Rf.nonMaxSuppressionV4Impl;var vp={kernelName:f.lc,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;var{boxes:e,scores:i}=t,{maxOutputSize:o,iouThreshold:a,scoreThreshold:s,padToMaxOutputSize:u}=r,i=(e=(If(e,"NonMaxSuppressionPadded"),n.data.get(e.dataId).values),n.data.get(i.dataId).values),{selectedIndices:e,validOutputs:i}=Ap(e,i,o,a,s,u);return[n.makeTensorInfo([e.length],"int32",new Int32Array(e)),n.makeTensorInfo([],"int32",new Int32Array([i]))]}};
/**
 * @license
 * Copyright 2019 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */const bp=f.Rf.nonMaxSuppressionV5Impl;var yp={kernelName:f.mc,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;var{boxes:e,scores:i}=t,{maxOutputSize:o,iouThreshold:a,scoreThreshold:s,softNmsSigma:u}=r,i=(e=(If(e,"NonMaxSuppressionWithScore"),n.data.get(e.dataId).values),n.data.get(i.dataId).values),{selectedIndices:e,selectedScores:i}=bp(e,i,o,a,s,u);return[n.makeTensorInfo([e.length],"int32",new Int32Array(e)),n.makeTensorInfo([i.length],"float32",new Float32Array(i))]}};
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */const wp=Uf((e,t)=>e!==t?1:0);var xp=ed(f.nc,wp,null,"bool"),Cp=(xp={kernelName:f.nc,backendName:"cpu",kernelFunc:xp},{kernelName:f.pc,backendName:"cpu",kernelFunc:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){const{inputs:t,backend:n,attrs:r}=e;e=t.indices;var{dtype:i,depth:o,onValue:a,offValue:s}=r,u=(If(e,"oneHot"),f.Ji.sizeFromShape(e.shape));const c=new Float32Array(u*o);c.fill(s);var l=n.data.get(e.dataId).values;for(let e=0;e<u;++e)0<=l[e]&&l[e]<o&&(c[e*o+l[e]]=a);return n.makeTensorInfo([...e.shape,o],i,c)}});
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function kp(e){const{inputs:t,backend:n}=e;var r,i,o,a,s;if("string"===(e=t.x).dtype)throw new Error("zerosLike is not supported for string tensors");return"complex64"===e.dtype?(s=Kf({inputs:{real:i=kp({inputs:{x:r=Xf({inputs:{input:e},backend:n})},backend:n}),imag:a=kp({inputs:{x:o=vd({inputs:{input:e},backend:n})},backend:n})},backend:n}),n.disposeIntermediateTensorInfo(r),n.disposeIntermediateTensorInfo(i),n.disposeIntermediateTensorInfo(o),n.disposeIntermediateTensorInfo(a),s):Hd({backend:n,attrs:{shape:e.shape,value:0,dtype:e.dtype}})}var Ep={kernelName:f.Kd,backendName:"cpu",kernelFunc:kp},Sp={kernelName:f.qc,backendName:"cpu",kernelFunc:function e(t){const{inputs:n,backend:r}=t;var i,o,a,s,u;if("string"===(t=n.x).dtype)throw new Error("onesLike is not supported for string tensors");return"complex64"===t.dtype?(u=Kf({inputs:{real:o=e({inputs:{x:i=Xf({inputs:{input:t},backend:r})},backend:r}),imag:s=kp({inputs:{x:a=vd({inputs:{input:t},backend:r})},backend:r})},backend:r}),r.disposeIntermediateTensorInfo(i),r.disposeIntermediateTensorInfo(o),r.disposeIntermediateTensorInfo(a),r.disposeIntermediateTensorInfo(s),u):Hd({backend:r,attrs:{shape:t.shape,value:1,dtype:t.dtype}})}};
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function _p(e){const{inputs:t,backend:n,attrs:r}=e,i=r.axis;if(1===t.length)return Nd({inputs:{input:t[0]},backend:n,attrs:{dim:i}});const o=t[0].shape,a=t[0].dtype,s=(t.forEach(e=>{f.Ji.assertShapesMatch(o,e.shape,"All tensors passed to stack must have matching shapes"),f.Ji.assert(a===e.dtype,()=>"All tensors passed to stack must have matching dtypes")}),[]);return e=bd({inputs:t.map(e=>(e=Nd({inputs:{input:e},backend:n,attrs:{dim:i}}),s.push(e),e)),backend:n,attrs:{axis:i}}),s.forEach(e=>n.disposeIntermediateTensorInfo(e)),e}var Op={kernelName:f.tc,backendName:"cpu",kernelFunc:_p};
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */const Tp={kernelName:f.uc,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,i=t.x,{paddings:o,constantValue:a}=r,s=(If(i,"pad"),e=o.map((e,t)=>e[0]+i.shape[t]+e[1]),o.map(e=>e[0]));var u=n.data.get(i.dataId).values,c=f.Ji.sizeFromShape(i.shape),l=i.shape.length,h=f.Ji.computeStrides(i.shape),d=f.Ji.sizeFromShape(e),p=e.length,m=f.Ji.computeStrides(e);const g=f.Ji.getTypedArrayFromDType(i.dtype,d);0!==a&&g.fill(a);for(let e=0;e<c;e++){var A=f.Ji.indexToLoc(e,l,h).map((e,t)=>e+s[t]);g[A=f.Ji.locToIndex(A,p,m)]=u[e]}return{dataId:n.write(g,e,i.dtype),shape:e,dtype:i.dtype}}};
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */var Dp=Uf((e,t)=>Math.pow(e,t));
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */Dp=ed(f.wc,Dp),Dp={kernelName:f.wc,backendName:"cpu",kernelFunc:Dp};function Bp(e,t,n,r){var[e,r]=f.de.computeOutAndReduceShapes(e,r);t=Object(f.Hi)(t,"int32");const i=f.Ji.makeZerosTypedArray(f.Ji.sizeFromShape(e),t);var o=f.Ji.sizeFromShape(r);for(let e=0;e<i.length;++e){var a=e*o;let t=1;for(let e=0;e<o;++e)t*=n[a+e];i[e]=t}return{outVals:i,outShape:e,outDtype:t}}var Ip={kernelName:f.yc,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;e=t.x;var i,o,{axis:i,keepDims:a}=r,s=(If(e,"prod"),e.shape.length);let u=i=f.Ji.parseAxisParam(i,e.shape),c=e;const l=[];null!=(o=f.de.getAxesPermutation(i,s))&&(c=ud({inputs:{x:e},backend:n,attrs:{perm:o}}),l.push(c),u=f.de.getInnerMostAxes(u.length,s));e=n.data.get(c.dataId).values;var{outVals:o,outShape:s,outDtype:e}=Bp(c.shape,c.dtype,e,u);let h=s;return a&&(h=f.de.expandShapeToKeepDim(s,i)),l.forEach(e=>n.disposeIntermediateTensorInfo(e)),n.makeTensorInfo(h,e,o)}};
/**
 * @license
 * Copyright 2022 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function Mp(e,t){const n=e.slice(0,t);for(;n.length<t;)n.push(1);for(let r=t;r<e.length;r++)n[t-1]*=e[r];return n}function jp(e,t,n,r,i,o,a,s){if(0===e.length)throw new Error("paramsNestedSplits must be non empty");if(0===t[0].length)throw new Error("Split tensors must not be scalars");var u,c;t=t[0][0]-1;if(u=a,c=t,o.forEach((e,t)=>{if(e<0||c<=e)throw t=f.Ji.indexToLoc(t,u.length,f.Ji.computeStrides(u)).join(","),new Error(`indices[${t}] = ${e} is not in [0, ${c})`)}),0===r.length)throw new Error("params.rank must be nonzero");var{outSplits:t,valueSlices:o,numValues:a}=function(e,t,n,r){const i=[];let o=0;var a=t.length-1+n.length;const s=new Array(a).fill(null).map(()=>[0]);var u=n,c=r;for(let e=0;e<u.length;++e){var l=u[e],h=e===u.length-1?c:u[e+1].length;if(0===l.length)throw new Error("Ragged splits may not be empty");if(l[0]<0)throw new Error("Ragged splits must be non-negative");if(l[l.length-1]>h)throw new Error("Ragged splits must not point past values");for(let e=1;e<l.length;++e)if(l[e-1]>l[e])throw new Error("Ragged splits must be sorted in ascending order")}let f=1;for(let e=0;e<t.length-1;++e){f*=t[e];var d=t[e+1];for(let t=1;t<f+1;++t)s[e].push(t*d)}for(let r=0;r<e.length;++r){let a=e[r],u=e[r]+1;for(let e=0;e<n.length;++e){var p=n[e],m=e+t.length-1;if(0<=m){var g=s[m],A=g[g.length-1]-p[a];for(let e=a;e<u;++e)s[m].push(p[e+1]+A)}a=p[a],u=p[u]}u!==a&&(i.push([a,u]),o+=u-a)}return{outSplits:s,valueSlices:i,numValues:o}}(o,a,e,r[0]);e=function(e){const t=[];for(let r=0;r<e.length;++r){var n=e[r].length;const i=f.Ji.getArrayFromDType("int32",n);t.push(i),e[r].forEach((e,t)=>i[t]=e)}return t}(t),t=function(e,t,n,r,i){const o=t.slice();o[0]=i,i=f.Ji.getArrayFromDType(n,f.Ji.sizeFromShape(o)),n=0===(n=e.length)?0:n/t[0];{var a=e,s=(e=t,t=r,n),u=i,c=(r=o,Mp(e,2)[1]),l=Mp(r,2)[1];let h=0;for(const e of t)for(let t=e[0];t<e[1];++t){for(let e=0;e<s;++e)u[h*l+e]=a[t*c+e];++h}}return[i,o]}(n,r,i,o,a);return[e,t[0],t[1]]}
/**
 * @license
 * Copyright 2022 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */var Np={kernelName:f.Ac,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{paramsNestedSplits:i,paramsDenseValues:o,indices:a}=t;var{}=r,s=(e=i.map(e=>n.data.get(e.dataId).values),i.map(e=>e.shape)),u=n.data.get(o.dataId).values,c=n.data.get(a.dataId).values;const[l,h,f]=jp(e,s,u,o.shape,o.dtype,c,a.shape),d=l.map(e=>n.makeTensorInfo([e.length],"int32",e));return e=n.makeTensorInfo(f,o.dtype,h),d.concat([e])}};
/**
 * @license
 * Copyright 2022 Google LLC.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */const Fp=2147483647;function Rp(e,t,n,r,i,o,a){if(1<t.length)throw new Error("starts must be a scalar or vector");if(1<i.length)throw new Error("limits must be a scalar or vector");if(1<a.length)throw new Error("deltas must be a scalar or vector");var s=0===t.length,u=0===i.length,c=0===a.length;const l=[];s||l.push(t[0]),u||l.push(i[0]),c||l.push(a[0]);for(let e=1;e<l.length;++e)if(l[e]!==l[e-1])throw new Error("starts, limits, and deltas must have the same shape");var h=0===l.length?1:l[0];const d=f.Ji.getArrayFromDType("int32",h+1);for(let t=d[0]=0;t<h;++t){var p=s?e[0]:e[t],m=u?r[0]:r[t],g=c?o[0]:o[t];if(0===g)throw new Error("Requires delta != 0");let n;if(0<g&&m<p||g<0&&p<m)n=0;else if((n=Math.ceil(Math.abs((m-p)/g)))>Fp)throw new Error("Requires ((limit - start) / delta) <= "+Fp);d[t+1]=d[t]+n}t=d[h];const A=f.Ji.getArrayFromDType(n,t);let v=0;for(let t=0;t<h;++t){var b=d[t+1]-d[t];let n=s?e[0]:e[t];var y=c?o[0]:o[t];for(let e=0;e<b;++e)A[v++]=n,n+=y}return[d,A]}
/**
 * @license
 * Copyright 2022 Google LLC.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */var Pp={kernelName:f.Bc,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n}=e;var{starts:e,limits:r,deltas:i}=t,o=n.data.get(e.dataId).values,a=n.data.get(r.dataId).values,s=n.data.get(i.dataId).values,[o,a]=Rp(o,e.shape,e.dtype,a,r.shape,s,i.shape);return[n.makeTensorInfo([o.length],"int32",o),n.makeTensorInfo([a.length],e.dtype,a)]}},Lp=f.de.RowPartitionType;
/**
 * @license
 * Copyright 2022 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */class Up{constructor(e,t,n,r,i,o,a,s,u,c){this.shape=e,this.shapeShape=t,this.values=n,this.valuesShape=r,this.valuesDType=i,this.defaultValue=o,this.defaultValueShape=a,this.rowPartitionValues=s,this.rowPartitionValuesShapes=u,this.rowPartitionTypes=f.de.getRowPartitionTypesHelper(c),this.raggedRank=f.de.getRaggedRank(this.rowPartitionTypes)}getRowPartitionTypeByDimension(e){return this.rowPartitionTypes[0]===Lp.FIRST_DIM_SIZE?this.rowPartitionTypes[e+1]:this.rowPartitionTypes[e]}getRowPartitionTensor(e){return this.rowPartitionTypes[0]===Lp.FIRST_DIM_SIZE?this.rowPartitionValues[e+1]:this.rowPartitionValues[e]}getMaxWidth(e){var t=this.getRowPartitionTensor(e-1);switch(this.getRowPartitionTypeByDimension(e-1)){case Lp.VALUE_ROWIDS:return Up.getMaxWidthValueRowID(t);case Lp.ROW_SPLITS:return Up.getMaxWidthRowSplit(t);default:throw new Error("Cannot handle partition type "+Lp[this.getRowPartitionTypeByDimension(e-1)])}}static getMaxWidthRowSplit(e){var t=e.length;if(0===t||1===t)return 0;let n=0;for(let i=0;i<t-1;++i){var r=e[i+1]-e[i];r>n&&(n=r)}return n}static getMaxWidthValueRowID(e){var t=e.length;if(0===t)return 0;let n=0,r=e[0],i=0;for(let a=1;a<t;++a){var o=e[a];o!==r&&(r=o,i=Math.max(a-n,i),n=a)}return Math.max(t-n,i)}tensorShapeFromTensor(e,t,n=!0){if(0!==t.length)return Hp(e,n);if(-1===e[0])return[];throw new Error("The only valid scalar shape tensor is the fully unknown shape specified as -1.")}calculateOutputSize(e){var t=this.valuesShape,n=this.defaultValueShape;f.de.validateDefaultValueShape(n,t),n=this.tensorShapeFromTensor(this.shape,this.shapeShape);const r=f.de.combineRaggedTensorToTensorShapes(this.raggedRank,n,t);r[0]<0&&(r[0]=e);for(let e=1;e<=this.raggedRank;++e)r[e]<0&&(r[e]=this.getMaxWidth(e));return r}calculateFirstParentOutputIndex(e,t,n){var r=Math.min(e,n);const i=[];let o=0;for(let e=0;e<r;++e,o+=t)i.push(o);for(let t=r;t<e;++t)i.push(-1);return f.Ji.assert(i.length===e,()=>"Final length of result must be equal to firstDimension."),i}calculateOutputIndexRowSplit(e,t,n,r){var i=e.length;const o=[];for(let s=0;s<i-1;++s){var a=e[s+1]-e[s];let i=Math.min(r,a),u=t[s];-1===u&&(i=0);for(let e=0;e<i;++e)o.push(u),u+=n;for(let e=0;e<a-i;++e)o.push(-1)}if(0<i&&o.length!==e[i-1])throw new Error("Invalid row split size.");return o}calculateOutputIndexValueRowID(e,t,n,r){var i=e.length;const o=[];if(0===i)return[];let a=0,s=e[0];if(s>=t.length)throw new Error(`Got currentValueRowId=${s}, which is not less than `+t.length);let u=t[s];o.push(u);for(let l=1;l<i;++l){var c=e[l];if(c===s)0<=u&&(++a<r?u+=n:u=-1);else{if(a=0,(s=c)>=t.length)throw new Error(`Got nextValueRowId=${c} which is not less than `+t.length);u=t[c]}o.push(u)}if(o.length!==e.length)throw new Error("Invalid row ids.");return o}calculateOutputIndex(e,t,n,r){var i=this.getRowPartitionTensor(e),o=this.getRowPartitionTypeByDimension(e);switch(o){case Lp.VALUE_ROWIDS:return this.calculateOutputIndexValueRowID(i,t,n,r);case Lp.ROW_SPLITS:if(i.length-1>t.length)throw new Error(`Row partition size is greater than output size: ${i.length-1} > `+t.length);return this.calculateOutputIndexRowSplit(i,t,n,r);default:throw new Error("Unsupported partition type: "+Lp[o])}}getFirstDimensionSize(){var e=this.rowPartitionValues[0];if(0===this.rowPartitionTypes.length)throw new Error("No row_partition_types given.");var t=this.rowPartitionTypes[0];switch(t){case Lp.FIRST_DIM_SIZE:return e[0];case Lp.VALUE_ROWIDS:throw new Error("Cannot handle VALUE_ROWIDS in first dimension.");case Lp.ROW_SPLITS:return this.rowPartitionValuesShapes[0][0]-1;default:throw new Error("Cannot handle type "+Lp[t])}}compute(){if(this.rowPartitionValues[0].length<=0)throw new Error("Invalid first partition input. Tensor requires at least one element.");var e=this.getFirstDimensionSize(),t=this.calculateOutputSize(e);const n=new Array(this.raggedRank+1);n[n.length-1]=1;for(let e=n.length-2;0<=e;--e)n[e]=n[e+1]*t[e+1];var r=Hp(t,!1),i=f.Ji.getArrayFromDType(this.valuesDType,f.Ji.sizeFromShape(r));if(0<n[0]*t[0]){let o=this.calculateFirstParentOutputIndex(e,n[0],t[0]);for(let e=1;e<=this.raggedRank;++e){o=this.calculateOutputIndex(e-1,o,n[e],t[e])}this.setOutput(this.raggedRank,o,i,r)}return[r,i]}setOutput(e,t,n,r){if(0!==n.length){const s=this.values,u=n;let c=r.slice();c=c.slice(e+1);var i,o=f.Ji.sizeFromShape(c),a=t.length;let l=this.defaultValue;if(l.length!==o&&1!==l.length){const e=this.defaultValueShape;Object(f.vi)(()=>{var t=Object(f.oh)(l,e);const n=Object(f.ne)(t,c);l=n.dataSync()})}let h=0,d=0,p=0;for(let e=0;e<=a;++e){let r=e<a?t[e]:-1;if(r===p)++p;else{if(d<p&&(i=s.subarray(h*o),zp(u.subarray(d*o),i,(p-d)*o)),e>=a&&(i=n.length,r=Math.floor(i/o)),r>p)if(1===this.defaultValue.length)u.subarray(p*o,r*o).fill(this.defaultValue[0]),p=r;else for(;r>p;)zp(u.slice(p*o),l,o),++p;r<0?(h=e+1,d=p):(h=e,p=(d=p)+1)}}}}}function zp(e,t,n){for(let r=0;r<n;r++)e[r]=t[r]}function Hp(e,t){const n=[];for(var r of e){if(r<0){if(!t)throw new Error(`Dimension ${r} must be >= 0`);if(r<-1)throw new Error(`Dimension ${r} must be >= -1`);r=-1}n.push(r)}return n}function $p(e,t,n,r,i,o,a,s,u,c){return new Up(e,t,n,r,i,o,a,s,u,c).compute()}
/**
 * @license
 * Copyright 2022 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */var Qp={kernelName:f.Cc,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{shape:i,values:o,defaultValue:a,rowPartitionTensors:s}=t;e=r.rowPartitionTypes;var u=n.data.get(i.dataId).values,c=n.data.get(o.dataId).values,l=n.data.get(a.dataId).values,h=s.map(e=>n.data.get(e.dataId).values),f=s.map(e=>e.shape),[u,c]=$p(u,i.shape,c,o.shape,o.dtype,l,a.shape,h,f,e);return n.makeTensorInfo(u,o.dtype,c)}};
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function Vp(e,t,n,r){if(e===t||e<t&&n<0||t<e&&1<n)return f.Ji.makeZerosTypedArray(0,r);var i=Math.abs(Math.ceil((t-e)/n));const o=f.Ji.makeZerosTypedArray(i,r);t<e&&1===n&&(n=-1),o[0]=e;for(let e=1;e<o.length;e++)o[e]=o[e-1]+n;return o}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */var qp={kernelName:f.Dc,backendName:"cpu",kernelFunc:function(e){const{backend:t,attrs:n}=e;var{start:e,stop:r,dtype:i,step:o}=n;e=Vp(e,r,o,i);return t.makeTensorInfo([e.length],i,e)}},Gp=Nf(f.Hc,e=>1/e),Wp=(Gp={kernelName:f.Hc,backendName:"cpu",kernelFunc:Gp},{kernelName:f.Mc,backendName:"cpu",kernelFunc:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){const{inputs:t,backend:n,attrs:r}=e;e=t.images;var{alignCorners:i,halfPixelCenters:o,size:a}=r,s=(If(e,"resizeBilinear"),f.Ji.computeStrides(e.shape)),[u,c]=a,[l,h,d,p]=e.shape,m=n.data.get(e.dataId).values;const g=new Float32Array(f.Ji.sizeFromShape([l,u,c,p]));let A=0;var v=(a=[i&&1<u?h-1:h,i&&1<c?d-1:d])[0]/(e=[i&&1<u?u-1:u,i&&1<c?c-1:c])[0],b=a[1]/e[1];for(let e=0;e<l;e++)for(let t=0;t<u;t++){let n;n=o?v*(t+.5)-.5:v*t;var y=Math.max(0,Math.floor(n)),w=n-y,x=Math.min(h-1,Math.ceil(n)),C=e*s[0]+y*s[1],k=e*s[0]+x*s[1];for(let e=0;e<c;e++){let t;t=o?b*(e+.5)-.5:b*e;var E=Math.max(0,Math.floor(t)),S=t-E,_=Math.min(d-1,Math.ceil(t)),O=C+E*s[2],T=k+E*s[2],D=C+_*s[2],B=k+_*s[2];for(let e=0;e<p;e++){var I=m[O+e],M=m[T+e],j=m[D+e],N=m[B+e];j=I+(j-I)*S;g[A++]=j+(M+(N-M)*S-j)*w}}}return n.makeTensorInfo([l,u,c,p],"float32",g)}}),Kp={kernelName:f.Nc,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;var{images:e,dy:i}=t,o=r.alignCorners,a=(If([i,e],"resizeBilinearGrad"),f.Ji.computeStrides(e.shape)),[s,u,c,l]=e.shape,[,h,d]=i.shape;const p=new Float32Array(s*u*c*l);var m=(e=[o&&1<h?u-1:u,o&&1<d?c-1:c])[0]/(o=[o&&1<h?h-1:h,o&&1<d?d-1:d])[0],g=e[1]/o[1],A=n.data.get(i.dataId).values;let v=0;for(let e=0;e<s;e++){var b=e*a[0];for(let e=0;e<h;e++){var y=e*m,w=Math.floor(y),x=Math.min(Math.ceil(y),u-1),C=b+w*a[1],k=b+x*a[1],E=y-w,S=1-E;for(let e=0;e<d;e++){var _=e*g,O=Math.floor(_),T=Math.min(Math.ceil(_),c-1),D=1-(_=_-O),B=C+O*a[2],I=C+T*a[2],M=k+O*a[2],j=k+T*a[2],N=S*D,F=S*_,R=E*D,P=E*_;for(let e=0;e<l;e++){var L=A[v++];p[B+e]+=L*N,p[I+e]+=L*F,p[M+e]+=L*R,p[j+e]+=L*P}}}}return n.makeTensorInfo([s,c,u,l],"float32",p)}},Yp={kernelName:f.Oc,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;e=t.images;var{alignCorners:i,halfPixelCenters:o,size:a}=r,s=(If(e,"resizeNearestNeighbor"),f.Ji.computeStrides(e.shape)),[u,c]=a,[l,h,d,p]=e.shape,m=n.data.get(e.dataId).values;const g=new Float32Array(l*u*c*p);var A=[i&&1<u?u-1:u,i&&1<c?c-1:c],v=(a=[i&&1<u?h-1:h,i&&1<c?d-1:d])[0]/A[0],b=a[1]/A[1];let y=0;for(let e=0;e<l;e++){var w=e*s[0];for(let e=0;e<u;e++){var x=o?v*(e+.5):v*e;let t=Math.min(h-1,i?Math.round(x):Math.floor(x));var C=w+(t=o?Math.max(0,t):t)*s[1];for(let e=0;e<c;e++){var k=o?b*(e+.5):b*e;let t=Math.min(d-1,i?Math.round(k):Math.floor(k));var E=C+(t=o?Math.max(0,t):t)*s[2];for(let e=0;e<p;e++){var S=m[E+e];g[y++]=S}}}}return n.makeTensorInfo([l,u,c,p],e.dtype,g)}},Xp={kernelName:f.Pc,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;var{images:e,dy:i}=t,o=r.alignCorners,a=(If([i,e],"resizeNearestNeighborGrad"),f.Ji.computeStrides(e.shape)),s=f.Ji.computeStrides(i.shape),[u,c,l,h]=e.shape,[,d,p]=i.shape;const m=new Float32Array(u*c*l*h);var g=n.data.get(i.dataId).values,A=[o&&1<d?d-1:d,o&&1<p?p-1:p],v=(i=[o&&1<d?c-1:c,o&&1<p?l-1:l])[0]/A[0],b=i[1]/A[1],y=1/v,w=1/b,x=2*Math.ceil(y)+2,C=2*Math.ceil(w)+2;for(let e=0;e<u;e++){var k=e*a[0];for(let e=0;e<c;e++){var E=k+e*a[1],S=Math.floor(e*y),_=Math.floor(S-x/2);for(let t=0;t<l;t++){var O=E+t*a[2],T=Math.floor(t*w),D=Math.floor(T-C/2);for(let n=0;n<h;n++){let r=0;for(let i=0;i<x;i++){if(!((I=i+_)<0||d<=I)){var B=k+I*s[1],I=I*v;if(e===(I=Math.min(c-1,o?Math.round(I):Math.floor(I))))for(let e=0;e<C;e++){var M,j=e+D;j<0||p<=j||(M=B+j*s[2],j*=b,t===(j=Math.min(l-1,o?Math.round(j):Math.floor(j)))&&(r+=g[M+n]))}}}m[O+n]=r}}}}return n.makeTensorInfo(e.shape,e.dtype,m)}},Jp={kernelName:f.Qc,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,i=t.x;e=r.dims;var o=(If(i,"reverse"),i.shape.length);const a=f.Ji.parseAxisParam(e,i.shape);if(0===o)return Pf({inputs:{x:i},backend:n});const s=new f.Ad(i.shape,i.dtype),u=n.bufferSync(i);for(let e=0;e<s.size;e++){const t=s.indexToLoc(e),n=t.slice();a.forEach(e=>n[e]=i.shape[e]-1-n[e]),s.set(u.get(...n),...t)}return n.makeTensorInfo(s.shape,s.dtype,s.values)}},Zp={kernelName:f.Rc,backendName:"cpu",kernelFunc:({inputs:e,attrs:t,backend:n})=>{e=e.image;var{radians:t,fillValue:r,center:i}=t;const o=n,a=f.Ji.getTypedArrayFromDType(e.dtype,f.Ji.sizeFromShape(e.shape));var[s,u,c,l]=e.shape,[h,d]=f.de.getImageCenter(i,u,c),p=Math.sin(t),m=Math.cos(t),g=o.data.get(e.dataId).values;for(let e=0;e<s;e++){var A=e*c*u*l;for(let e=0;e<u;e++){var v=e*(c*l);for(let t=0;t<c;t++){var b=t*l;for(let n=0;n<l;n++){var y,w=((x=(y=[s,e,t,n])[2])-h)*m-((y=y[1])-d)*p,x=(x-h)*p+(y-d)*m;w=Math.round(w+h),x=Math.round(x+d);let i=r;"number"!=typeof r&&(i=3===n?255:r[n]),0<=w&&w<c&&0<=x&&x<u&&(i=g[y=A+x*(c*l)+w*l+n]),a[x=A+v+b+n]=i}}}}return{dataId:o.write(a,e.shape,e.dtype),shape:e.shape,dtype:e.dtype}}},em=Nf(f.Sc,e=>{var t=Math.floor(e);return e-t<.5?Math.floor(e):.5<e-t?Math.ceil(e):t%2==0?t:t+1});
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the License);
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an AS IS BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */em={kernelName:f.Sc,backendName:"cpu",kernelFunc:em};
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the License);
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an AS IS BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
const tm=Vf(e=>1/Math.sqrt(e));var nm=Ff(f.Tc,tm);
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */nm={kernelName:f.Tc,backendName:"cpu",kernelFunc:nm};function rm(e,t,n,r,i,o,a,s,u,c){var l=[r/i,i],h=e.values,d=t.values;if(0===r)return Object(f.qe)(n,t.dtype);const p=Object(f.qe)(l,t.dtype);"string"==typeof u||"number"==typeof u?p.values.fill(u):"boolean"==typeof u&&p.values.fill(+u);for(let e=0;e<o;e++){const o=[];let u=0;for(let t=0;t<a;t++){var m=h[e*a+t];o.push(m),u+=m*s[t]}if(u<0||u>=r/i)throw new Error(`Invalid indices: ${o} does not index into `+n);for(let n=0;n<i;n++)c?p.values[u*i+n]+=d[e*i+n]:p.values[u*i+n]=0===t.rank?d[0]:d[e*i+n]}return p}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */var im={kernelName:f.Vc,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;var{indices:e,updates:i}=t,o=r.shape,{sliceRank:a,numUpdates:s,sliceSize:u,strides:c,outputSize:l}=f.de.calculateShapes(i,e,o);e=rm(n.bufferSync(e),n.bufferSync(i),o,l,u,s,a,c,0,!0);return n.makeTensorInfo(o,e.dtype,e.values)}};
/**
 * @license
 * Copyright 2022 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
/**
 * @license
 * Copyright 2022 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
var om={kernelName:f.Wc,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;var{sortedSequence:e,values:i}=t,o=r.side;e=function(e,t,n,r,i,o){const a=f.Ji.getArrayFromDType("int32",n*i);for(let c=0;c<n;++c){var s=e.slice(c*r,(c+1)*r),u=c*i;for(let e=0;e<i;++e)a[u+e]=("left"===o?function(e,t){let n=0,r=e.length;for(var i;n<r;)e[i=Math.floor((n+r)/2)]<t?n=i+1:r=i;return r}:function(e,t){let n=0,r=e.length;for(var i;n<r;)e[i=Math.floor((n+r)/2)]<=t?n=i+1:r=i;return r})(s,t[e+u])}return a}(n.data.get(e.dataId).values,n.data.get(i.dataId).values,e.shape[0],e.shape[1],i.shape[1],o);return n.makeTensorInfo(i.shape,"int32",e)}},am={kernelName:f.Xc,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n}=e,{condition:r,t:i,e:o}=t;If([r,i,o],"select");e=r.shape.length;var a=n.data.get(r.dataId).values,s=n.data.get(i.dataId).values,u=n.data.get(o.dataId).values,c=Object(f.Hi)(i.dtype,o.dtype);const l=f.Ji.makeZerosTypedArray(f.Ji.sizeFromShape(i.shape),c);let h=0;var d=0===e||1<e||1===i.shape.length?1:f.Ji.sizeFromShape(i.shape.slice(1));for(let e=0;e<a.length;e++)for(let t=0;t<d;t++)1===a[e]?l[h++]=s[e]:l[h++]=u[e];return n.makeTensorInfo(i.shape,c,l)}};
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the License);
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an AS IS BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
const sm=f.de.SELU_SCALEALPHA,um=f.de.SELU_SCALE;var cm=Nf(f.Yc,e=>0<=e?um*e:sm*(Math.exp(e)-1)),lm=(cm={kernelName:f.Yc,backendName:"cpu",kernelFunc:cm},Nf(f.ad,e=>e<0?-1:0<e?1:0)),hm=(lm={kernelName:f.ad,backendName:"cpu",kernelFunc:lm},Nf(f.bd,e=>Math.sin(e))),fm=(hm={kernelName:f.bd,backendName:"cpu",kernelFunc:hm},Nf(f.cd,e=>Math.sinh(e)));fm={kernelName:f.cd,backendName:"cpu",kernelFunc:fm};const dm=Math.log(1.1920928955078125e-7)+2;var pm=Nf(f.fd,e=>{var t=e>-dm,n=e<dm,r=Math.exp(e);return n?r:t?e:Math.log(1+r)}),mm=(pm={kernelName:f.fd,backendName:"cpu",kernelFunc:pm},{kernelName:f.gd,backendName:"cpu",kernelFunc:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){const{inputs:t,backend:n,attrs:r}=e;var i=t.x,{blockShape:e,paddings:o}=r,a=(If([i],"spaceToBatchND"),f.Ji.sizeFromShape(e));const s=[[0,0]];s.push(...o);for(let t=1+e.length;t<i.shape.length;++t)s.push([0,0]);var o=Tp.kernelFunc({inputs:{x:i},backend:n,attrs:{paddings:s,constantValue:0}}),u=f.de.getReshaped(o.shape,e,a,!1),c=f.de.getPermuted(u.length,e.length,!1);e=f.de.getReshapedPermuted(o.shape,e,a,!1),a=id({inputs:{x:o},backend:n,attrs:{shape:u}}),c=id({inputs:{x:u=ud({inputs:{x:a},backend:n,attrs:{perm:c}})},backend:n,attrs:{shape:e}});return n.disposeIntermediateTensorInfo(o),n.disposeIntermediateTensorInfo(a),n.disposeIntermediateTensorInfo(u),c}});
/**
 * @license
 * Copyright 2021 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function gm(e,t,n,r,i,o,a){var s=t[0],u=o[0];const c=new Array(u),l=new Array(s);var h=t[1];if(0===u){if(0!==s)throw new Error(f.de.getSparseFillEmptyRowsIndicesDenseShapeMismatch(s));return[f.Ji.getArrayFromDType(n,0),[0,h],f.Ji.getArrayFromDType(i,0),c,l]}let d=!0,p=0;const m=new Array(u).fill(0);for(let t=0;t<s;++t){var g=e[t*h];if(g<0)throw new Error(f.de.getSparseFillEmptyRowsNegativeIndexErrorMessage(t,g));if(u<=g)throw new Error(f.de.getSparseFillEmptyRowsOutOfRangeIndexErrorMessage(t,g,u));++m[g],d=d&&g>=p,p=g}let A=!0;for(let e=0;e<u;++e){var v=0===m[e];c[e]=v,A=A&&!v,m[e]=Math.max(m[e],1),0<e&&(m[e]+=m[e-1])}if(A&&d){o=e,t=r;for(let e=0;e<s;++e)l[e]=e;return[o,[s,h],t,c,l]}{o=m[u-1];const t=f.Ji.getArrayFromDType(n,o*h),d=f.Ji.getArrayFromDType(i,o),p=new Array(u).fill(0);for(let n=0;n<s;++n){var b=e[n*h],y=p[b],w=(0===b?0:m[b-1])+y;p[b]++;for(let r=0;r<h;++r)t[w*h+r]=e[n*h+r];d[w]=r[n],l[n]=w}for(let e=0;e<u;++e)if(0===p[e]){var x=0===e?0:m[e-1];t[x*h+0]=e;for(let e=1;e<h;++e)t[x*h+e]=0;d[x]=a}return[t,[o,h],d,c,l]}}
/**
 * @license
 * Copyright 2021 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */var Am={kernelName:f.hd,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n}=e;var{indices:e,values:r,denseShape:i,defaultValue:o}=t;if(1!==i.shape.length)throw new Error("Dense shape must be a vector, saw:\n        "+i.shape);if(2!==e.shape.length)throw new Error("Indices must be a matrix, saw:\n        "+e.shape);if(1!==r.shape.length)throw new Error("Values must be a vector, saw:\n        "+r.shape);if(0!==o.shape.length)throw new Error("Default value must be a scalar, saw:\n        "+o.shape);var a=n.data.get(e.dataId).values,s=n.data.get(r.dataId).values,i=n.data.get(i.dataId).values,o=n.data.get(o.dataId).values[0];const[u,c,l,h,f]=gm(a,e.shape,e.dtype,s,r.dtype,i,o);return[n.makeTensorInfo(c,e.dtype,u),n.makeTensorInfo([c[0]],r.dtype,l),n.makeTensorInfo([h.length],"bool",new Uint8Array(h.map(e=>Number(e)))),n.makeTensorInfo([f.length],e.dtype,new Int32Array(f))]}};
/**
 * @license
 * Copyright 2021 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function vm(e,t,n,r,i){var o=f.Ji.sizeFromShape(r),a=t[0],s=i.length;const u=[];let c=1,l=-1;for(let e=0;e<s;++e){var h=i[e];if(-1===h){if(-1!==l)throw new Error(f.de.getSparseReshapeMultipleNegativeOneOutputDimErrorMessage(l,e));l=e,u.push(1)}else{if(h<0)throw new Error(f.de.getSparseReshapeNegativeOutputDimErrorMessage(e,h));c*=h,u.push(h)}}if(-1!==l){if(c<=0)throw new Error(f.de.getSparseReshapeEmptyTensorZeroOutputDimErrorMessage());if(c*(t=Math.trunc(o/c))!==o)throw new Error(f.de.getSparseReshapeInputOutputMultipleErrorMessage(r,u));u[l]=t}if(f.Ji.sizeFromShape(u)!==o)throw new Error(f.de.getSparseReshapeInputOutputMismatchErrorMessage(r,u));var d=r.length;const p=[];if(0<d){p[d-1]=1;for(let e=d-2;0<=e;--e)p[e]=p[e+1]*r[e+1]}const m=[];if(0<s){m[s-1]=1;for(let e=s-2;0<=e;--e)m[e]=m[e+1]*u[e+1]}const g=f.Ji.getArrayFromDType(n,a*s);for(let t=0;t<a;++t){let n=0;for(let r=0;r<d;++r)n+=e[t*d+r]*p[r];for(let e=0;e<s;++e)g[t*s+e]=Math.trunc(n/m[e]),n%=m[e]}return[g,[a,s],u]}
/**
 * @license
 * Copyright 2021 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */var bm={kernelName:f.id,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n}=e;var{inputIndices:e,inputShape:r,newShape:i}=t;if(2!==e.shape.length)throw new Error("Input indices should be a matrix but received shape\n        "+e.shape);if(1!==r.shape.length)throw new Error("Input shape should be a vector but received shape\n        "+r.shape);if(1!==i.shape.length)throw new Error("Target shape should be a vector but received shape "+i.shape);var r=Array.from(n.data.get(r.dataId).values),o=n.data.get(e.dataId).values,a=Array.from(n.data.get(i.dataId).values),[o,r,a]=vm(o,e.shape,e.dtype,r,a);return[n.makeTensorInfo(r,e.dtype,o),n.makeTensorInfo([a.length],i.dtype,new Int32Array(a))]}};
/**
 * @license
 * Copyright 2021 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function ym(e,t,n,r,i,o=!1,a=0){var s=r.length,u=[t[0],e.length/t[0]],c=u[1],l=0<s?i[s-1]+1:0;if(l<0)throw new Error(f.de.getSparseSegmentReductionNegativeSegmentIdsErrorMessage());const h=t.slice();h[0]=l,t=h.reduce((e,t)=>e*t,1);const d=f.Ji.getArrayFromDType(n,t);if(0===s)0<l&&d.fill(a);else{if(l<=0)throw new Error(f.de.getSparseSegmentReductionNegativeSegmentIdsErrorMessage());let t=0,n=1,h=0,m=i[t];for(;;){let g=0;if(n<s){if(g=i[n],m===g){++n;continue}if(m>=g)throw new Error(f.de.getSparseSegmentReductionNonIncreasingSegmentIdsErrorMessage())}if(m<0||m>=l)throw new Error(f.de.getSparseSegmentReductionSegmentIdOutOfRangeErrorMessage(m,l));m>h&&d.fill(a,h*c,m*c);for(let i=t;i<n;++i){var p=r[i];if(p<0||u[0]<=p)throw new Error(f.de.getSparseSegmentReductionIndicesOutOfRangeErrorMessage(i,r[i],u[0]));for(let t=0;t<c;t++)d[m*c+t]+=e[p*c+t]}if(o)for(let e=0;e<c;e++)d[m*c+e]/=n-t;if(t=n,++n,h=m+1,m=g,n>s)break}h<l&&d.fill(a,h*c,l*c)}return[d,h]}
/**
 * @license
 * Copyright 2021 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */var wm={kernelName:f.jd,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n}=e;var{data:e,indices:r,segmentIds:i}=t;if(e.shape.length<1)throw new Error("Data should be at least 1 dimensional but received scalar");if(1!==r.shape.length)throw new Error("Indices should be a vector but received shape\n          "+r.shape);if(1!==i.shape.length)throw new Error("Segment ids should be a vector but received shape\n          "+i.shape);if(r.shape[0]!==i.shape[0])throw new Error("segmentIds and indices should have same size.");var o=n.data.get(e.dataId).values,r=n.data.get(r.dataId).values,i=n.data.get(i.dataId).values,[o,r]=ym(o,e.shape,e.dtype,r,i,!0);return n.makeTensorInfo(r,e.dtype,o)}},xm={kernelName:f.kd,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n}=e;var{data:e,indices:r,segmentIds:i}=t;if(e.shape.length<1)throw new Error("Data should be at least 1 dimensional but received scalar");if(1!==r.shape.length)throw new Error("Indices should be a vector but received shape\n         "+r.shape);if(1!==i.shape.length)throw new Error("Segment ids should be a vector but received shape\n         "+i.shape);if(r.shape[0]!==i.shape[0])throw new Error("segmentIds and indices should have same size.");var o=n.data.get(e.dataId).values,r=n.data.get(r.dataId).values,i=n.data.get(i.dataId).values,[o,r]=ym(o,e.shape,e.dtype,r,i);return n.makeTensorInfo(r,e.dtype,o)}},Cm={kernelName:f.ld,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;var{sparseIndices:e,sparseValues:i,defaultValue:o}=t,a=r.outputShape,{sliceRank:s,numUpdates:u,sliceSize:c,strides:l,outputSize:h}=f.de.calculateShapes(i,e,a),d=n.bufferSync(e);let p;switch(i.dtype){case"bool":var m=n.bufferSync(i),g=Boolean(n.data.get(o.dataId).values[0]);p=rm(d,m,a,h,c,u,s,l,g,!1);break;case"float32":case"int32":p=rm(d,m=n.bufferSync(i),a,h,c,u,s,l,g=n.data.get(o.dataId).values[0],!1);break;case"string":p=rm(d,m=n.bufferSync(i),a,h,c,u,s,l,g=f.Ji.decodeString(n.data.get(o.dataId).values[0]),!1);break;default:throw new Error("Unsupported type "+i.dtype)}return n.makeTensorInfo(a,p.dtype,p.values)}},km={kernelName:f.md,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,i=t.x;var{numOrSizeSplits:e,axis:o}=r;const a=f.Ji.parseAxisParam(o,i.shape)[0],s=f.de.prepareSplitSize(i,e,a),u=new Array(i.shape.length).fill(0),c=i.shape.slice();return s.map(e=>{const t=[...c];t[a]=e;var r=dd({inputs:{x:i},backend:n,attrs:{begin:u,size:t}});return u[a]+=e,r})}};
/**
 * @license
 * Copyright 2021 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the License);
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an AS IS BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
const Em=Vf(e=>Math.sqrt(e));var Sm=Nf(f.nd,e=>Math.sqrt(e)),_m=(Sm={kernelName:f.nd,backendName:"cpu",kernelFunc:Sm},{kernelName:f.od,backendName:"cpu",kernelFunc:({inputs:e,backend:t})=>{const n=t;If(e=e.x,"square");var r=n.data.get(e.dataId).values;const i=new Float32Array(r.length);for(let e=0;e<r.length;++e){var o=r[e];i[e]=o*o}return{dataId:n.write(i,e.shape,e.dtype),shape:e.shape,dtype:e.dtype}}});
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */const Om=Uf((e,t)=>(e-=t)*e);var Tm=ed(f.pd,Om),Dm=(Tm={kernelName:f.pd,backendName:"cpu",kernelFunc:Tm},Nf(f.qd,(e,t)=>isNaN(e)?NaN:0<e?1:t.alpha));
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */Dm={kernelName:f.qd,backendName:"cpu",kernelFunc:Dm};function Bm(e,t,n,r){const i=Object(f.qe)(e,t.dtype);for(let e=0;e<i.size;e++){var o=i.indexToLoc(e);const a=new Array(o.length);for(let e=0;e<a.length;e++)a[e]=o[e]*n[e]+r[e];i.set(t.get(...a),...o)}return i}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */var Im={kernelName:f.rd,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,i=t.x;var{begin:e,end:o,strides:a,beginMask:s,endMask:u,ellipsisMask:c,newAxisMask:l,shrinkAxisMask:h}=r,{finalShapeSparse:e,finalShape:o,isIdentity:a,sliceDim0:s,isSimpleSlice:u,begin:c,end:l,strides:h}=(If(i,"stridedSlice"),f.Rh.sliceInfo(i.shape,e,o,a,s,u,c,l,h));let d;return a?d=id({inputs:{x:i},backend:n,attrs:{shape:o}}):s||u?(f.Ji.assert(1<=i.shape.length,()=>"Input must have rank at least 1, got: "+i.shape.length),a=f.Rh.computeOutShape(c,l,h),d=id({inputs:{x:s=dd({inputs:{x:i},backend:n,attrs:{begin:c,size:a}})},backend:n,attrs:{shape:o}}),n.disposeIntermediateTensorInfo(s)):(u=Bm(e,n.bufferSync(i),h,c),d=n.makeTensorInfo(o,u.dtype,u.values)),d}};
/**
 * @license
 * Copyright 2021 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */class Mm{constructor(e,t,n,r,i,o){this.separator=f.Ji.encodeString(e),this.nGramWidths=t,this.leftPad=f.Ji.encodeString(n),this.rightPad=f.Ji.encodeString(r),this.padWidth=i,this.preserveShort=o}getPadWidth(e){return Math.min(this.padWidth<0?e-1:this.padWidth,e-1)}getNumNGrams(e,t){var n=this.getPadWidth(t);return Math.max(0,e+2*n-t+1)}createNGrams(e,t,n,r,i,o){for(let f=0;f<i;++f){var a=this.getPadWidth(o),s=Math.max(0,a-f),u=Math.max(0,a-(i-(f+1))),c=o-(s+u),l=t+(0<s?0:f-a);let d=0;d+=s*this.leftPad.length;for(let t=0;t<c;++t)d+=e[l+t].length;d=(d+=u*this.rightPad.length)+(s+u+c-1)*this.separator.length,n[r+f]=new Uint8Array(d);const p=n[r+f];let m=0;var h=e=>e.forEach(e=>p[m++]=e);for(let e=0;e<s;++e)h(this.leftPad),h(this.separator);for(let t=0;t<c-1;++t)h(e[l+t]),h(this.separator);if(0<c){h(e[l+c-1]);for(let e=0;e<u;++e)h(this.separator),h(this.rightPad)}else{for(let e=0;e<u-1;++e)h(this.rightPad),h(this.separator);h(this.rightPad)}}}compute(e,t){var n=e.length,r=t.length;if(0<r){let e=t[0];if(0!==e)throw new Error("First split value must be 0, got "+e);for(let i=1;i<r;++i){if(!(t[i]>=e&&t[i]<=n))throw new Error(`Invalid split value ${t[i]}, must be in [${e}, ${n}]`);e=t[i]}if(e!==n)throw new Error(`Last split value must be data size. Expected ${n}, got `+e)}var i,o=r-1;const a=f.Ji.getArrayFromDType("int32",r);if(0===n||0===r){var s=new Array(n);for(let e=0;e<=o;++e)a[e]=0;return[s,a]}a[0]=0;for(let e=1;e<=o;++e){const n=t[e]-t[e-1];let r=0;this.nGramWidths.forEach(e=>{r+=this.getNumNGrams(n,e)}),this.preserveShort&&0<n&&0===r&&(r=1),a[e]=a[e-1]+r}const u=new Array(a[o]);for(let n=0;n<o;++n){const r=t[n];let o=a[n];this.nGramWidths.forEach(i=>{var a=t[n+1]-t[n];a=this.getNumNGrams(a,i);this.createNGrams(e,r,u,o,a,i),o+=a}),!this.preserveShort||o!==a[n]||0!=(i=t[n+1]-t[n])&&(i+=2*this.padWidth,this.createNGrams(e,r,u,o,1,i))}return[u,a]}}function jm(e,t,n,r,i,o,a,s){return new Mm(n,r,i,o,a,s).compute(e,t)}
/**
 * @license
 * Copyright 2021 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */var Nm={kernelName:f.sd,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;var{separator:e,nGramWidths:i,leftPad:o,rightPad:a,padWidth:s,preserveShortSequences:u}=r,{data:c,dataSplits:l}=t,[c,e]=jm(n.data.get(c.dataId).values,n.data.get(l.dataId).values,e,i,o,a,s,u);return[n.makeTensorInfo([c.length],"string",c),n.makeTensorInfo(l.shape,"int32",e)]}};
/**
 * @license
 * Copyright 2021 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function Fm(e,t,n){var r=e.length,i=[];let o=0,a=0;const s=new Array(r);for(let f=0;f<r;++f){var u,c=i.length,l=(u=g=m=p=h=l=void 0,e[f]),h=t,d=n,p=i;if(l.length)if(0===h.length)for(let e=0;e<l.length;++e)p.push(l.subarray(e,e+1));else if(1===h.length){var m=h[0];let e=l.indexOf(m);for(;-1!==e;){var g=l.subarray(0,e);d&&0===g.length||p.push(g),e=(l=l.subarray(e+1)).indexOf(m)}d&&0===l.length||p.push(l)}else{let e=0;for(let t=0;t<l.length+1;t++)t!==l.length&&-1===h.indexOf(l[t])||(u=l.subarray(e,t),d&&0===u.length||p.push(u),e=t+1)}c=i.length-c,s[f]=c,o+=c,a=Math.max(a,c)}const A=f.Ji.getArrayFromDType("int32",2*o),v=new Array(o);var b=[r,a];let y=0;for(let e=0;e<r;++e)for(let t=0;t<s[e];++t)A[2*y]=e,A[2*y+1]=t,v[y]=i[y],++y;return[A,v,b]}
/**
 * @license
 * Copyright 2021 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */var Rm={kernelName:f.td,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;e=r.skipEmpty;var{input:i,delimiter:o}=t;if("string"!==i.dtype)throw new Error("Input must be of datatype string");if(1!==i.shape.length)throw new Error("Input must be a vector, got shape: "+i.shape);if(0!==o.shape.length)throw new Error("Delimiter must be a scalar, got shape: "+o.shape);var[i,o,e]=Fm(n.data.get(i.dataId).values,n.data.get(o.dataId).values[0],e),a=o.length;return[n.makeTensorInfo([a,2],"int32",i),n.makeTensorInfo([a],"string",o),n.makeTensorInfo([2],"int32",new Int32Array(e))]}};
/**
 * @license
 * Copyright 2021 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function Pm(e,t){const n=f.Ji.getArrayFromDType("int32",e.length);for(let r=0;r<e.length;++r)n[r]=f.Ji.fingerPrint64(e[r]).modulo(t).getLowBitsUnsigned();return n}
/**
 * @license
 * Copyright 2021 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */var Lm={kernelName:f.ud,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;e=r.numBuckets;var i=t.input;if("string"!==i.dtype)throw new Error("Input must be of datatype string");if(e<=0)throw new Error("Number of buckets must be at least 1");return e=Pm(n.data.get(i.dataId).values,e),n.makeTensorInfo(i.shape,"int32",e)}},Um=Nf(f.xd,e=>Math.tan(e)),zm=(Um={kernelName:f.xd,backendName:"cpu",kernelFunc:Um},Nf(f.yd,e=>Math.tanh(e)));
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the License);
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an AS IS BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
/**
 * @license
 * Copyright 2019 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */zm={kernelName:f.yd,backendName:"cpu",kernelFunc:zm};function Hm(e,t){const n=new Array(e.rank);for(let r=0;r<n.length;r++)n[r]=e.shape[r]*t[r];const r=Object(f.qe)(n,e.dtype);for(let t=0;t<r.values.length;++t){var i=r.indexToLoc(t);const n=new Array(e.rank);for(let t=0;t<n.length;t++)n[t]=i[t]%e.shape[t];var o=e.locToIndex(n);r.values[t]=e.values[o]}return r}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */var $m={kernelName:f.Bd,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;e=t.x;var i=r.reps;If(e,"tile"),e=Hm(n.bufferSync(e),i);return n.makeTensorInfo(e.shape,e.dtype,e.values)}};
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */const Qm=(e,t)=>{var n=t.value-e.value;return 0==n?e.index-t.index:n};function Vm(e,t,n=0,r=e.length-1){for(;n<r;){600<r-n&&(i=r-n+1,o=t-n+1,s=Math.log(i),a=.5*Math.exp(2*s/3),s=.5*Math.sqrt(s*a*(i-a)/i)*Math.sign(o-i/2),Vm(e,t,Math.max(n,Math.floor(t-o*a/i+s)),Math.min(r,Math.floor(t+(i-o)*a/i+s))));var i,o,a,s,u=e[t];let c=n,l=r;for(f.Ji.swap(e,n,t),0<Qm(e[r],u)&&f.Ji.swap(e,n,r);c<l;){for(f.Ji.swap(e,c,l),c++,l--;Qm(e[c],u)<0;)c+=1;for(;0<Qm(e[l],u);)l-=1}0===Qm(e[n],u)?f.Ji.swap(e,n,l):(l+=1,f.Ji.swap(e,l,r)),l<=t&&(n=l+1),t<=l&&(r=l-1)}}function qm(e,t,n,r,i){var o=t[t.length-1],[a,s]=[e.length/o,o];const u=f.Ji.getTypedArrayFromDType(n,a*r),c=f.Ji.getTypedArrayFromDType("int32",a*r);for(let t=0;t<a;t++){var l=t*s;const n=e.subarray(l,l+s);let o=new Array(n.length);n.forEach((e,t)=>o[t]={value:e,index:t}),r<o.length&&(Vm(o,r),o=o.slice(0,r)),i&&o.sort(Qm),l=t*r;const a=u.subarray(l,l+r),h=c.subarray(l,l+r);for(let e=0;e<r;e++)a[e]=o[e].value,h[e]=o[e].index}const h=t.slice();return h[h.length-1]=r,[Object(f.qe)(h,n,u),Object(f.qe)(h,"int32",c)]}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */var Gm={kernelName:f.Cd,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;e=t.x;var{k:i,sorted:o}=r;If(e,"topk");var[a,e]=qm(a=n.data.get(e.dataId).values,e.shape,e.dtype,i,o);return[n.makeTensorInfo(a.shape,a.dtype,a.values),n.makeTensorInfo(e.shape,e.dtype,e.values)]}},Wm={kernelName:f.Dd,backendName:"cpu",kernelFunc:function(e){const{inputs:t,attrs:n,backend:r}=e;var{image:i,transforms:o}=t,{interpolation:a,fillMode:s,fillValue:u,outputShape:e}=n,[c,l,h,d]=i.shape,[p,m]=null!=e?e:[l,h],g=[c,p,m,d],A=(e=f.Ji.computeStrides(i.shape))[0],v=e[1],b=e[2],y=(e=f.Ji.computeStrides(g))[0],w=e[1],x=e[2];const C=f.Ji.getTypedArrayFromDType(i.dtype,f.Ji.sizeFromShape(g));C.fill(u);var k,E,S,_,O,T,D,B,I,M,j,N,F,R,P,L=r.data.get(i.dataId).values;const U=r.data.get(o.dataId).values;for(let e=0;e<c;++e){var z=1===o.shape[0]?U:U.subarray(8*e,8*e+8);for(let t=0;t<p;++t)for(let n=0;n<m;++n)for(let r=0;r<d;++r){let i;if(0!=($=z[6]*n+z[7]*t+1)){var H=(z[0]*n+z[1]*t+z[2])/$,$=(z[3]*n+z[4]*t+z[5])/$,Q=Km(H,h,s),V=Km($,l,s);switch(a){case"nearest":i=function(e,t,n,r,i,o,a,s,u,c,l){return Ym(e,t,n,r,i,o,a,s=Math.round(s),u=Math.round(u),c,l)}(L,l,h,A,v,b,e,V,Q,r,u);break;case"bilinear":k=L,E=l,S=h,_=A,O=v,T=b,D=e,B=V,I=Q,M=r,j=u,void 0,i=((R=(N=Math.floor(B))+1)-B)*(((P=(F=Math.floor(I))+1)-I)*Ym(k,E,S,_,O,T,D,N,F,M,j)+(I-F)*Ym(k,E,S,_,O,T,D,N,P,M,j))+(B-N)*(I=(P-I)*Ym(k,E,S,_,O,T,D,R,F,M,j)+(I-F)*Ym(k,E,S,_,O,T,D,R,P,M,j));break;default:throw new Error("Error in Transform: Expect 'nearest' or 'bilinear', but got "+a)}C[H=e*y+t*w+n*x+r]=i}}return r.makeTensorInfo(g,i.dtype,C)}return{dataId:r.write(C,g,i.dtype),shape:i.shape,dtype:i.dtype}}};
/**
 * @license
 * Copyright 2021 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function Km(e,t,n){switch(n){case"reflect":{var r=e,i=t;let n=r;return n<0?n=i<=1?0:(n=n<(r=2*i)?r*Math.trunc(-n/r)+n:n)<-i?n+r:-n-1:n>i-1&&(i<=1?n=0:(n-=(r=2*i)*Math.trunc(n/r))>=i&&(n=r-n-1)),f.Ji.clamp(0,n,i-1)}case"wrap":{i=t;let n=r=e;return n<0?i<=1?n=0:(r=i-1,n+=i*(Math.trunc(-n/r)+1)):n>i-1&&(i<=1?n=0:(r=i-1,n-=i*Math.trunc(n/r))),f.Ji.clamp(0,n,i-1)}case"nearest":return f.Ji.clamp(0,e,t-1);default:return e}}function Ym(e,t,n,r,i,o,a,s,u,c,l){return 0<=s&&s<t&&0<=u&&u<n?e[a*r+s*i+u*o+c]:l}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function Xm(e,t,n,r){var i=f.Ji.parseAxisParam(t,n)[0];const o=[1,n[0],1];for(let e=0;e<i;e++)o[0]*=n[e];o[1]=n[i];for(let e=i+1;e<n.length;e++)o[2]*=n[e];const a={},s=new Int32Array(n[i]),u=new f.Ad(o,r,e),c=[];var l,h=1===o[0]&&1===o[2];for(let t=0;t<n[i];t++){let n;if(h)n=e[t].toString();else{const e=[];for(let n=0;n<o[0];n++)for(let r=0;r<o[2];r++)e.push(u.get(n,t,r));n=e.join(",")}void 0!==a[n]?s[t]=a[n]:(l=Object.keys(a).length,a[n]=l,s[t]=l,c.push(t))}const d=o.slice(),p=(d[1]=Object.keys(a).length,new f.Ad(d,r)),m=(c.forEach((e,t)=>{for(let n=0;n<o[0];n++)for(let r=0;r<o[2];r++)p.set(u.get(n,e,r),n,t,r)}),n.slice());return m[i]=d[1],{outputValues:p.values,outputShape:m,indices:s}}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the License);
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an AS IS BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */var Jm,Zm,eg,tg={kernelName:f.Fd,backendName:"cpu",kernelFunc:function(e){const{inputs:t,attrs:n,backend:r}=e;e=n.axis;var i=t.x;If(i,"unique");var{outputValues:o,outputShape:e,indices:a}=Xm(o=r.data.get(i.dataId).values,e,i.shape,i.dtype);return[r.makeTensorInfo(e,i.dtype,o),r.makeTensorInfo([a.length],"int32",a)]}},ng={kernelName:f.Gd,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,i=t.value;let o=r.axis;o<0&&(o+=i.shape.length);var a=i.shape.length;e=i.shape[o];const s=new Array(a-1);let u=0;for(let e=0;e<a;e++)e!==o&&(s[u++]=i.shape[e]);const c=new Array(a).fill(0),l=i.shape.slice(),h=(l[o]=1,new Array(e));for(let e=0;e<h.length;e++){c[o]=e;var f=dd({inputs:{x:i},backend:n,attrs:{begin:c,size:l}});h[e]=id({inputs:{x:f},backend:n,attrs:{shape:s}}),n.disposeIntermediateTensorInfo(f)}return h}},rg={kernelName:f.Hd,backendName:"cpu",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;var{x:i,segmentIds:e}=t,o=r.numSegments,a=(If(i,"unsortedSegmentSum"),i.shape.length);const s=[],u=[];var c=a-e.shape.length;let l=e;for(let e=0;e<c;++e){var h=Nd({inputs:{input:l},backend:n,attrs:{dim:e+1}});l=h,u.push(h)}for(let e=0;e<o;++e){var d=f.Ji.createScalarValue(e,"int32"),p=(d=n.makeTensorInfo([],"int32",d),Sd({inputs:{a:d,b:l},backend:n})),m=Zf({inputs:{x:p},backend:n,attrs:{dtype:"float32"}}),g=Cd({inputs:{a:m,b:i},backend:n}),A=kd({inputs:{x:g},backend:n,attrs:{axis:0,keepDims:!1}});s.push(A),u.push(d),u.push(p),u.push(m),u.push(g),u.push(A)}return a=_p({inputs:s,backend:n,attrs:{axis:0}}),u.forEach(e=>n.disposeIntermediateTensorInfo(e)),a}};
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
for(const e of[Y,J,ee,ae,L,se,pe,fe,Ae,be,Ee,Te,De,je,Re,Fe,Ue,He,Ve,W,qe,We,Ke,Xe,R,Ze,nt,j,ot,ct,Q,ft,dt,pt,gt,vt,yt,Ct,Et,St,Tt,Dt,Mt,Nt,Ft,Rt,Pt,Lt,Ut,Ht,Wt,A,Kt,Yt,en,rn,on,cn,dn,mn,gn,vn,wn,Cn,_n,On,P,te,Oe,k,jt,st,Me,Je,bt,E,$t,sn,hn,An,yn,Ie,et,fn,bn,Z,we,xt,Jt,Ne,tp,np,rp,ip,op,sp,up,cp,fp,Qt,pp,gp,vp,yp,xp,Cp,Sp,Op,Tp,Dp,T,Ip,Np,Pp,Qp,qp,F,Pd,Gp,D,I,q,Wp,Kp,Yp,Xp,Jp,Zp,em,nm,im,om,am,cm,M,lm,hm,fm,Ge,hp,pm,mm,Am,bm,wm,xm,Cm,km,Sm,_m,Tm,Dm,Im,Nm,Rm,Lm,pn,qt,Um,zm,$m,Gm,Wm,ce,tg,ng,rg,Ep])Object(f.kh)(e);
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */const ig={},og={alpha:!1,antialias:!1,premultipliedAlpha:!1,preserveDrawingBuffer:!1,depth:!1,stencil:!1,failIfMajorPerformanceCaveat:!0};function ag(e,t){if(!(e in ig)||null!=t){if(null===(t=function(e,t){if(1!==e&&2!==e)throw new Error("Cannot get WebGL rendering context, WebGL is disabled.");const n=null==t?function(e){if("undefined"!=typeof OffscreenCanvas&&2===e)return new OffscreenCanvas(300,150);if("undefined"!=typeof document)return document.createElement("canvas");throw new Error("Cannot create a canvas in this context")}(e):t;return n.addEventListener("webglcontextlost",t=>{t.preventDefault(),delete ig[e]},!1),Object(f.hf)().getBool("SOFTWARE_WEBGL_ENABLED")&&(og.failIfMajorPerformanceCaveat=!1),1!==e?n.getContext("webgl2",og):n.getContext("webgl",og)||n.getContext("experimental-webgl",og)}
/**
 * @license
 * Copyright 2017 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */(e,t)))return null;ig[e]=t}const n=ig[e];return null==n||n.isContextLost()?(delete ig[e],ag(e)):(n.disable(n.DEPTH_TEST),n.disable(n.STENCIL_TEST),n.disable(n.BLEND),n.disable(n.DITHER),n.disable(n.POLYGON_OFFSET_FILL),n.disable(n.SAMPLE_COVERAGE),n.enable(n.SCISSOR_TEST),n.enable(n.CULL_FACE),n.cullFace(n.BACK),ig[e])}function sg(e){return e=f.Ji.sizeFromShape(e),e=Math.ceil(e/4),f.Ji.sizeToSquarishShape(e)}function ug(e,t){return[Math.max(1,Math.ceil(t/2)),Math.max(1,Math.ceil(e/2))]}function cg(e,t){var n=e;let r,i,o,a,s,u,c,l,h,d;return u=2===Object(f.hf)().getNumber("WEBGL_VERSION")?(r=n.R32F,i=n.R16F,o=n.RGBA16F,a=n.RGBA32F,s=n.RED,c=4,l=1,h=n.HALF_FLOAT,d=n.FLOAT,n.RGBA8):(r=e.RGBA,i=e.RGBA,o=e.RGBA,a=n.RGBA,s=e.RGBA,c=4,l=4,h=null!=t?t.HALF_FLOAT_OES:null,d=e.FLOAT,e.RGBA),{internalFormatFloat:r,internalFormatHalfFloat:i,internalFormatPackedHalfFloat:o,internalFormatPackedFloat:a,textureFormatFloat:s,downloadTextureFormat:u,downloadUnpackNumChannels:c,defaultNumChannels:l,textureTypeHalfFloat:h,textureTypeFloat:d}}
/**
 * @license
 * Copyright 2017 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function lg(e,t){if(t=t(),Object(f.hf)().getBool("DEBUG")){var n=e.getError();if(n!==e.NO_ERROR)throw new Error("WebGL Error: "+function(e,t){switch(t){case e.NO_ERROR:return"NO_ERROR";case e.INVALID_ENUM:return"INVALID_ENUM";case e.INVALID_VALUE:return"INVALID_VALUE";case e.INVALID_OPERATION:return"INVALID_OPERATION";case e.INVALID_FRAMEBUFFER_OPERATION:return"INVALID_FRAMEBUFFER_OPERATION";case e.OUT_OF_MEMORY:return"OUT_OF_MEMORY";case e.CONTEXT_LOST_WEBGL:return"CONTEXT_LOST_WEBGL";default:return"Unknown error code "+t}}(e,n))}return t}function hg(e,t){return bg(e,()=>e.getExtension(t),'Extension "'+t+'" not supported on this browser.')}(Y=Jm=Jm||{})[Y.DENSE=0]="DENSE",Y[Y.SHARED_BATCH=1]="SHARED_BATCH",(J=Zm=Zm||{})[J.RENDER=0]="RENDER",J[J.UPLOAD=1]="UPLOAD",J[J.PIXELS=2]="PIXELS",J[J.DOWNLOAD=3]="DOWNLOAD",(ee=eg=eg||{})[ee.UNPACKED_FLOAT16=0]="UNPACKED_FLOAT16",ee[ee.UNPACKED_FLOAT32=1]="UNPACKED_FLOAT32",ee[ee.PACKED_4X1_UNSIGNED_BYTE=2]="PACKED_4X1_UNSIGNED_BYTE",ee[ee.PACKED_2X2_FLOAT32=3]="PACKED_2X2_FLOAT32",ee[ee.PACKED_2X2_FLOAT16=4]="PACKED_2X2_FLOAT16";const fg=/ERROR: [0-9]+:([0-9]+):/g;function dg(e,t){if(null!=(t=fg.exec(t))){t=+t[1];const n=e.split("\n"),r=n.length.toString().length+2,i=n.map((e,t)=>f.Ji.rightPad((t+1).toString(),r)+e);let o=0;for(let e=0;e<i.length;e++)o=Math.max(i[e].length,o);i.slice(0,t-1),i.slice(t-1,t),i.slice(t)}}function pg(e,t){if(lg(e,()=>e.validateProgram(t)),!1===e.getProgramParameter(t,e.VALIDATE_STATUS))throw new Error("Shader program validation failed.")}function mg(e,t,n,r){lg(e,()=>{var n=e,i=t,o=r;(function(e,t){var n=e.MAX_COMBINED_TEXTURE_IMAGE_UNITS-1;if((t+=e.TEXTURE0)<e.TEXTURE0||n<t)throw new Error(`textureUnit must be in [gl.TEXTURE0, gl.TEXTURE${n}].`)})(n,o),lg(n,()=>n.activeTexture(n.TEXTURE0+o)),lg(n,()=>n.bindTexture(n.TEXTURE_2D,i))}),lg(e,()=>e.uniform1i(n,r))}function gg(e,t,n){lg(e,()=>e.bindFramebuffer(e.FRAMEBUFFER,n)),lg(e,()=>e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t,0))}function Ag(e,t){lg(e,()=>e.bindFramebuffer(e.FRAMEBUFFER,t)),lg(e,()=>e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,null,0))}function vg(e){var t=e.checkFramebufferStatus(e.FRAMEBUFFER);if(t!==e.FRAMEBUFFER_COMPLETE)throw new Error("Error binding framebuffer: "+function(e,t){switch(t){case e.FRAMEBUFFER_INCOMPLETE_ATTACHMENT:return"FRAMEBUFFER_INCOMPLETE_ATTACHMENT";case e.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:return"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT";case e.FRAMEBUFFER_INCOMPLETE_DIMENSIONS:return"FRAMEBUFFER_INCOMPLETE_DIMENSIONS";case e.FRAMEBUFFER_UNSUPPORTED:return"FRAMEBUFFER_UNSUPPORTED";default:return"unknown error "+t}}(e,t))}function bg(e,t,n){if(null==(e=lg(e,()=>t())))throw new Error(n);return e}function yg(e,t=2){return f.Ji.sizeFromShape(e.slice(0,e.length-t))}function wg(e){if(0===e.length)throw Error("Cannot get rows and columns of an empty shape array.");return[1<e.length?e[e.length-2]:1,e[e.length-1]]}function xg(e){let t=[1,1,1];return 0===e.length||1===e.length&&1===e[0]?t:[yg(e),...wg(e)]}function Cg(e,t){if(e=e.slice(-2),t=t.slice(-2),f.Ji.arraysEqual(e,t))return!0;if(!e.length||!t.length)return!0;if(0===e[0]||0===e[1]||0===t[0]||0===t[1])return!0;if(e.length!==t.length){var n=e.slice(-1)[0],r=t.slice(-1)[0];if(n===r)return!0;if(n%2==0&&r%2==0&&(1===e[0]||1===t[0]))return!0}return e[1]===t[1]&&e[0]%2==0&&t[0]%2==0}let kg,Eg;function Sg(e,t){return null!=e.getExtension(t)}function _g(e){try{if(null!=ag(e))return 1}catch(e){return}}function Og(e){var t=cg(e),n=e.createTexture(),r=(t=(e.bindTexture(e.TEXTURE_2D,n),e.texImage2D(e.TEXTURE_2D,0,t.internalFormatFloat,1,1,0,t.textureFormatFloat,t.textureTypeFloat,null),e.createFramebuffer()),e.bindFramebuffer(e.FRAMEBUFFER,t),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,n,0),e.checkFramebufferStatus(e.FRAMEBUFFER)===e.FRAMEBUFFER_COMPLETE);return e.bindTexture(e.TEXTURE_2D,null),e.bindFramebuffer(e.FRAMEBUFFER,null),e.deleteTexture(n),e.deleteFramebuffer(t),r}function Tg(e,t){(e=Array.isArray(e)?e:[e]).forEach(e=>{null!=e&&f.Ji.assert("complex64"!==e.dtype,()=>t+" does not support complex64 tensors in the WebGL backend.")})}
/**
 * @license
 * Copyright 2019 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */const Dg=Object(f.hf)();
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function Bg(){let e,t,n,r,i,o,a,s,u,c;return c=2===Object(f.hf)().getNumber("WEBGL_VERSION")?(e="#version 300 es",t="in",n="out",r="in",i="texture",o="outputColor",a="out vec4 outputColor;",s=Object(f.hf)().getBool("WEBGL2_ISNAN_CUSTOM")?"\n      bool isnan_custom(float val) {\n        uint floatToUint = floatBitsToUint(val);\n        return (floatToUint & 0x7fffffffu) > 0x7f800000u;\n      }\n\n      bvec4 isnan_custom(vec4 val) {\n        return bvec4(isnan_custom(val.x),\n          isnan_custom(val.y), isnan_custom(val.z), isnan_custom(val.w));\n      }\n\n      #define isnan(value) isnan_custom(value)\n    ":"",u="","\n      #define round(value) newRound(value)\n      int newRound(float value) {\n        return int(floor(value + 0.5));\n      }\n\n      ivec4 newRound(vec4 value) {\n        return ivec4(floor(value + vec4(0.5)));\n      }\n    "):(e="",t="attribute",n="varying",r="varying",i="texture2D",o="gl_FragColor",a="",s="\n      #define isnan(value) isnan_custom(value)\n      bool isnan_custom(float val) {\n        return (val > 0. || val < 1. || val == 0.) ? false : true;\n      }\n      bvec4 isnan_custom(vec4 val) {\n        return bvec4(isnan(val.x), isnan(val.y), isnan(val.z), isnan(val.w));\n      }\n    ",u="\n      uniform float INFINITY;\n\n      bool isinf(float val) {\n        return abs(val) == INFINITY;\n      }\n      bvec4 isinf(vec4 val) {\n        return equal(abs(val), vec4(INFINITY));\n      }\n    ","\n      int round(float value) {\n        return int(floor(value + 0.5));\n      }\n\n      ivec4 round(vec4 value) {\n        return ivec4(floor(value + vec4(0.5)));\n      }\n    "),{version:e,attribute:t,varyingVs:n,varyingFs:r,texture2D:i,output:o,defineOutput:a,defineSpecialNaN:s,defineSpecialInf:u,defineRound:c}}
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function Ig(e,t,n="index"){const r=f.Ji.computeStrides(t);return r.map((t,i)=>`int ${e[i]} = ${n} / `+t+`; ${i===r.length-1?`int ${e[i+1]} = ${n} - ${e[i]} * `+t:`index -= ${e[i]} * `+t};`).join("")}function Mg(e,t,n="index"){const r=f.Ji.computeStrides(t);return r.map((t,i)=>`int ${e[i]} = ${n} / outShapeStrides[${i}]; ${i===r.length-1?`int ${e[i+1]} = ${n} - ${e[i]} * outShapeStrides[${i}]`:`index -= ${e[i]} * outShapeStrides[${i}]`};`).join("")}function jg(e){return`\n  int getFlatIndex(ivec3 coords) {\n    return coords.x * ${(e=f.Ji.computeStrides(e).map(e=>e.toString()))[0]} + coords.y * ${e[1]} + coords.z;\n  }\n`}Dg.registerFlag("HAS_WEBGL",()=>0<Dg.getNumber("WEBGL_VERSION")),Dg.registerFlag("WEBGL_VERSION",()=>_g(2)?2:_g(1)?1:0),Dg.registerFlag("WEBGL_CHECK_NUMERICAL_PROBLEMS",()=>!1),Dg.registerFlag("WEBGL_BUFFER_SUPPORTED",()=>2===Dg.get("WEBGL_VERSION")),Dg.registerFlag("WEBGL_CPU_FORWARD",()=>!0),Dg.registerFlag("WEBGL_FORCE_F16_TEXTURES",()=>!1),Dg.registerFlag("WEBGL_PACK",()=>Dg.getBool("HAS_WEBGL")),Dg.registerFlag("WEBGL_PACK_NORMALIZATION",()=>Dg.getBool("WEBGL_PACK")),Dg.registerFlag("WEBGL_PACK_CLIP",()=>Dg.getBool("WEBGL_PACK")),Dg.registerFlag("WEBGL_PACK_DEPTHWISECONV",()=>Dg.getBool("WEBGL_PACK")),Dg.registerFlag("WEBGL_PACK_BINARY_OPERATIONS",()=>Dg.getBool("WEBGL_PACK")),Dg.registerFlag("WEBGL_PACK_UNARY_OPERATIONS",()=>Dg.getBool("WEBGL_PACK")),Dg.registerFlag("WEBGL_PACK_ARRAY_OPERATIONS",()=>Dg.getBool("WEBGL_PACK")),Dg.registerFlag("WEBGL_PACK_IMAGE_OPERATIONS",()=>Dg.getBool("WEBGL_PACK")),Dg.registerFlag("WEBGL_PACK_REDUCE",()=>Dg.getBool("WEBGL_PACK")),Dg.registerFlag("WEBGL_LAZILY_UNPACK",()=>Dg.getBool("WEBGL_PACK")),Dg.registerFlag("WEBGL_CONV_IM2COL",()=>Dg.getBool("WEBGL_PACK")),Dg.registerFlag("WEBGL_MAX_TEXTURE_SIZE",()=>{var e=Dg.getNumber("WEBGL_VERSION");if(null==kg){const t=ag(e);kg=t.getParameter(t.MAX_TEXTURE_SIZE)}return kg}),Dg.registerFlag("WEBGL_MAX_TEXTURES_IN_SHADER",()=>{var e=Dg.getNumber("WEBGL_VERSION");if(null==Eg){const t=ag(e);Eg=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS)}return Math.min(16,Eg)}),Dg.registerFlag("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION",()=>{var e=Dg.getNumber("WEBGL_VERSION");if(0===e)return 0;{if(0===e)return 0;let n;var t=ag(e);return n=Sg(t,"EXT_disjoint_timer_query_webgl2")&&2===e?2:Sg(t,"EXT_disjoint_timer_query")?1:0}}),Dg.registerFlag("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE",()=>0<Dg.getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")&&!f.Re.isMobile()),Dg.registerFlag("WEBGL_RENDER_FLOAT32_CAPABLE",()=>{var e=Dg.getNumber("WEBGL_VERSION");if(0===e)return!1;var t=ag(e);if(1===e){if(!Sg(t,"OES_texture_float"))return!1}else if(!Sg(t,"EXT_color_buffer_float"))return!1;return Og(t)}),Dg.registerFlag("WEBGL_RENDER_FLOAT32_ENABLED",()=>!Dg.getBool("WEBGL_FORCE_F16_TEXTURES")&&Dg.getBool("WEBGL_RENDER_FLOAT32_CAPABLE")),Dg.registerFlag("WEBGL_DOWNLOAD_FLOAT_ENABLED",()=>function(e){if(0===e)return!1;const t=ag(e);var n,r,i;return 1!==e?Sg(t,"EXT_color_buffer_float")?Og(t):!!Sg(t,e="EXT_color_buffer_half_float")&&(e=t.getExtension(e),e=cg(n=t,e=e),r=n.createTexture(),n.bindTexture(n.TEXTURE_2D,r),n.texImage2D(n.TEXTURE_2D,0,e.internalFormatHalfFloat,1,1,0,e.textureFormatFloat,e.textureTypeHalfFloat,null),e=n.createFramebuffer(),n.bindFramebuffer(n.FRAMEBUFFER,e),n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,r,0),i=n.checkFramebufferStatus(n.FRAMEBUFFER)===n.FRAMEBUFFER_COMPLETE,n.bindTexture(n.TEXTURE_2D,null),n.bindFramebuffer(n.FRAMEBUFFER,null),n.deleteTexture(r),n.deleteFramebuffer(e),i):!!Sg(t,"OES_texture_float")&&!!Sg(t,"WEBGL_color_buffer_float")&&Og(t)}(Dg.getNumber("WEBGL_VERSION"))),Dg.registerFlag("WEBGL_FENCE_API_ENABLED",()=>{var e=Dg.getNumber("WEBGL_VERSION");return 2===e&&null!=ag(e).fenceSync}),Dg.registerFlag("WEBGL_SIZE_UPLOAD_UNIFORM",()=>Dg.getBool("WEBGL_RENDER_FLOAT32_ENABLED")?4:0),Dg.registerFlag("WEBGL_DELETE_TEXTURE_THRESHOLD",()=>-1,e=>{if(e<0&&-1!==e)throw new Error(`WEBGL_DELETE_TEXTURE_THRESHOLD must be -1 (indicating never delete) or at least 0, but got ${e}.`)}),Dg.registerFlag("WEBGL_FLUSH_THRESHOLD",()=>f.Re.isMobile()?1:-1,e=>{if(e<0&&-1!==e)throw new Error(`WEBGL_FLUSH_THRESHOLD must be -1 (indicating never manual flush) or at least 0, but got ${e}.`)}),Dg.registerFlag("CPU_HANDOFF_SIZE_THRESHOLD",()=>128),Dg.registerFlag("WEBGL_USE_SHAPES_UNIFORMS",()=>!1),Dg.registerFlag("TOPK_LAST_DIM_CPU_HANDOFF_SIZE_THRESHOLD",()=>1e5),Dg.registerFlag("TOPK_K_CPU_HANDOFF_THRESHOLD",()=>128),Dg.registerFlag("WEBGL_EXP_CONV",()=>!1),Dg.registerFlag("SOFTWARE_WEBGL_ENABLED",()=>Dg.getBool("IS_TEST")),Dg.registerFlag("WEBGL_MAX_SIZE_FOR_NARROW_TEXTURE",()=>1/0),Dg.registerFlag("WEBGL_AUTO_SQUARIFY_NARROW_TEXTURE_SHAPE",()=>!1),Dg.registerFlag("WEBGL2_ISNAN_CUSTOM",()=>!1),Dg.registerFlag("ENGINE_COMPILE_ONLY",()=>!1);const Ng="\n  const float FLOAT_MAX = 1.70141184e38;\n  const float FLOAT_MIN = 1.17549435e-38;\n\n  lowp vec4 encode_float(highp float v) {\n    if (isnan(v)) {\n      return vec4(255, 255, 255, 255);\n    }\n\n    highp float av = abs(v);\n\n    if(av < FLOAT_MIN) {\n      return vec4(0.0, 0.0, 0.0, 0.0);\n    } else if(v > FLOAT_MAX) {\n      return vec4(0.0, 0.0, 128.0, 127.0) / 255.0;\n    } else if(v < -FLOAT_MAX) {\n      return vec4(0.0, 0.0,  128.0, 255.0) / 255.0;\n    }\n\n    highp vec4 c = vec4(0,0,0,0);\n\n    highp float e = floor(log2(av));\n    highp float m = exp2(fract(log2(av))) - 1.0;\n\n    c[2] = floor(128.0 * m);\n    m -= c[2] / 128.0;\n    c[1] = floor(32768.0 * m);\n    m -= c[1] / 32768.0;\n    c[0] = floor(8388608.0 * m);\n\n    highp float ebias = e + 127.0;\n    c[3] = floor(ebias / 2.0);\n    ebias -= c[3] * 2.0;\n    c[2] += floor(ebias) * 128.0;\n\n    c[3] += 128.0 * step(0.0, -v);\n\n    return c / 255.0;\n  }\n",Fg=f.de.getBroadcastDims;
/**
 * @license
 * Copyright 2017 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function Rg(e,t,n){const r=[];if(e.forEach(e=>{var t=f.Ji.sizeFromShape(e.shapeInfo.logicalShape);if(e.shapeInfo.isUniform?r.push(`uniform float ${e.name}${1<t?`[${t}]`:""};`):(r.push(`uniform sampler2D ${e.name};`),r.push(`uniform int offset${e.name};`)),n.enableShapeUniforms){switch((t=Wg(n.packedInputs,e.shapeInfo.logicalShape,e.shapeInfo.texShape).uniformShape).length){case 1:r.push(`uniform int ${e.name}Shape;`);break;case 2:r.push(`uniform ivec2 ${e.name}Shape;`);break;case 3:r.push(`uniform ivec3 ${e.name}Shape;`);break;case 4:r.push(`uniform ivec4 ${e.name}Shape;`)}r.push(`uniform ivec2 ${e.name}TexShape;`)}}),n.enableShapeUniforms){switch(t.logicalShape.length){case 1:r.push("uniform int outShape;");break;case 2:r.push("uniform ivec2 outShape;"),r.push("uniform int outShapeStrides;");break;case 3:r.push("uniform ivec3 outShape;"),r.push("uniform ivec2 outShapeStrides;");break;case 4:r.push("uniform ivec4 outShape;"),r.push("uniform ivec3 outShapeStrides;")}r.push("uniform ivec2 outTexShape;")}n.customUniforms&&n.customUniforms.forEach(e=>{r.push(`uniform ${e.type} ${e.name}${e.arrayIndex?`[${e.arrayIndex}]`:""};`)});const i=r.join("\n"),o=e.map(e=>{{var[e,r,i=!1,o]=[e,t,n.packedInputs,n.enableShapeUniforms];let s="";s+=(i?Lg:Pg)(e,o);var o=e.shapeInfo.logicalShape,a=r.logicalShape;return o.length<=a.length&&(s+=(i?function(e,t){const n=e.name,r=n.charAt(0).toUpperCase()+n.slice(1),i="get"+r+"AtOutCoords",o=e.shapeInfo.logicalShape.length,a=t.logicalShape.length,s=Fg(e.shapeInfo.logicalShape,t.logicalShape),u=Gg(a),c=a-o;let l;const h=["x","y","z","w","u","v"];l=0===o?"":a<2&&1<=s.length?"coords = 0;":s.map(e=>`coords.${h[e+c]} = 0;`).join("\n");let d="";d=a<2&&0<o?"coords":e.shapeInfo.logicalShape.map((e,t)=>"coords."+h[t+c]).join(", ");let p="return outputValue;";return e=1===(e=f.Ji.sizeFromShape(e.shapeInfo.logicalShape)),t=1===(t=f.Ji.sizeFromShape(t.logicalShape)),1!==o||e||t?e&&!t?p=1===a?"\n        return vec4(outputValue.x, outputValue.x, 0., 0.);\n      ":"\n        return vec4(outputValue.x);\n      ":s.length&&(e=o-2,t=o-1,-1<s.indexOf(e)&&-1<s.indexOf(t)?p="return vec4(outputValue.x);":-1<s.indexOf(e)?p="return vec4(outputValue.x, outputValue.y, outputValue.x, outputValue.y);":-1<s.indexOf(t)&&(p="return vec4(outputValue.xx, outputValue.zz);")):p="\n      return vec4(outputValue.xy, outputValue.xy);\n    ",`\n    vec4 ${i}() {\n      ${u} coords = getOutputCoords();\n      ${l}\n      vec4 outputValue = get${r}(${d});\n      ${p}\n    }\n  `}:function(e,t){const n=e.name,r=n.charAt(0).toUpperCase()+n.slice(1),i="get"+r+"AtOutCoords",o=t.texShape,a=e.shapeInfo.texShape,s=e.shapeInfo.logicalShape.length,u=t.logicalShape.length;if(!e.shapeInfo.isUniform&&s===u&&null==e.shapeInfo.flatOffset&&f.Ji.arraysEqual(a,o))return`\n      float ${i}() {\n        return sampleTexture(${n}, resultUV);\n      }\n    `;const c=Gg(u),l=Fg(e.shapeInfo.logicalShape,t.logicalShape),h=u-s;let d;const p=["x","y","z","w","u","v"];d=0===s?"":u<2&&1<=l.length?"coords = 0;":l.map(e=>`coords.${p[e+h]} = 0;`).join("\n");let m="";return m=u<2&&0<s?"coords":e.shapeInfo.logicalShape.map((e,t)=>"coords."+p[t+h]).join(", "),`\n    float ${i}() {\n      ${c} coords = getOutputCoords();\n      ${d}\n      return get${r}(${m});\n    }\n  `})(e,r)),s}}).join("\n");e=t.texShape;var a=Bg();const s=`\n    float sampleTexture(sampler2D textureSampler, vec2 uv) {\n      return ${a.texture2D}(textureSampler, uv).r;\n    }\n  `;let u,c,l=function(e){return e=`${e.version}\n    precision highp float;\n    precision highp int;\n    precision highp sampler2D;\n    ${e.varyingFs} vec2 resultUV;\n    ${e.defineOutput}\n    const vec2 halfCR = vec2(0.5, 0.5);\n\n    struct ivec5\n    {\n      int x;\n      int y;\n      int z;\n      int w;\n      int u;\n    };\n\n    struct ivec6\n    {\n      int x;\n      int y;\n      int z;\n      int w;\n      int u;\n      int v;\n    };\n\n    uniform float NAN;\n    ${e.defineSpecialNaN}\n    ${e.defineSpecialInf}\n    ${e.defineRound}\n\n    int imod(int x, int y) {\n      return x - y * (x / y);\n    }\n\n    int idiv(int a, int b, float sign) {\n      int res = a / b;\n      int mod = imod(a, b);\n      if (sign < 0. && mod != 0) {\n        res -= 1;\n      }\n      return res;\n    }\n\n    //Based on the work of Dave Hoskins\n    //https://www.shadertoy.com/view/4djSRW\n    #define HASHSCALE1 443.8975\n    float random(float seed){\n      vec2 p = resultUV * seed;\n      vec3 p3  = fract(vec3(p.xyx) * HASHSCALE1);\n      p3 += dot(p3, p3.yzx + 19.19);\n      return fract((p3.x + p3.y) * p3.z);\n    }\n\n    ${Ug}\n    ${zg}\n    ${Hg}\n  `}(a);return c=t.isPacked?(u=function(e,t,n){switch(e.length){case 0:return Qg();case 1:return function(e,t){return 1===(e=[Math.ceil(e[0]/2),Math.ceil(e[1]/2)])[0]?t?"\n      int getOutputCoords() {\n        return 2 * int(resultUV.x * ceil(float(outTexShape[1]) / 2.0));\n      }\n    ":`\n      int getOutputCoords() {\n        return 2 * int(resultUV.x * ${e[1]}.0);\n      }\n    `:1===e[1]?t?"\n      int getOutputCoords() {\n        return 2 * int(resultUV.y * ceil(float(outTexShape[0]) / 2.0));\n      }\n    ":`\n      int getOutputCoords() {\n        return 2 * int(resultUV.y * ${e[0]}.0);\n      }\n    `:t?"\n    int getOutputCoords() {\n      ivec2 packedTexShape = ivec2(ceil(float(outTexShape[0]) / 2.0), ceil(float(outTexShape[1]) / 2.0));\n      ivec2 resTexRC = ivec2(resultUV.yx *\n                             vec2(packedTexShape[0], packedTexShape[1]));\n      return 2 * (resTexRC.x * packedTexShape[1] + resTexRC.y);\n    }\n  ":`\n    int getOutputCoords() {\n      ivec2 resTexRC = ivec2(resultUV.yx *\n                             vec2(${e[0]}, ${e[1]}));\n      return 2 * (resTexRC.x * ${e[1]} + resTexRC.y);\n    }\n  `}(t,n);case 2:return function(e,t,n){var r=[Math.ceil(t[0]/2),Math.ceil(t[1]/2)];return f.Ji.arraysEqual(e,t)?n?"\n      ivec2 getOutputCoords() {\n        ivec2 packedTexShape = ivec2(ceil(float(outTexShape[0]) / 2.0), ceil(float(outTexShape[1]) / 2.0));\n        return 2 * ivec2(resultUV.yx * vec2(packedTexShape[0], packedTexShape[1]));\n      }\n    ":`\n      ivec2 getOutputCoords() {\n        return 2 * ivec2(resultUV.yx * vec2(${r[0]}, ${r[1]}));\n      }\n    `:(t=Math.ceil(e[1]/2),n?"\n    ivec2 getOutputCoords() {\n      ivec2 packedTexShape = ivec2(ceil(float(outTexShape[0]) / 2.0), ceil(float(outTexShape[1]) / 2.0));\n      int texelsInLogicalRow = int(ceil(float(outShape[1]) / 2.0));\n      ivec2 resTexRC = ivec2(resultUV.yx *\n                             vec2(packedTexShape[0], packedTexShape[1]));\n\n      int index = resTexRC.x * packedTexShape[1] + resTexRC.y;\n      int r = 2 * (index / texelsInLogicalRow);\n      int c = imod(index, texelsInLogicalRow) * 2;\n\n      return ivec2(r, c);\n    }\n  ":`\n    ivec2 getOutputCoords() {\n      ivec2 resTexRC = ivec2(resultUV.yx *\n                             vec2(${r[0]}, ${r[1]}));\n\n      int index = resTexRC.x * ${r[1]} + resTexRC.y;\n      int r = 2 * (index / ${t});\n      int c = imod(index, ${t}) * 2;\n\n      return ivec2(r, c);\n    }\n  `)}(e,t,n);case 3:return function(e,t,n){return n?"\n    ivec3 getOutputCoords() {\n      ivec2 packedTexShape = ivec2(ceil(float(outTexShape[0]) / 2.0), ceil(float(outTexShape[1]) / 2.0));\n      int texelsInLogicalRow = int(ceil(float(outShape[2]) / 2.0));\n      int texelsInBatch = texelsInLogicalRow * int(ceil(float(outShape[1]) / 2.0));\n      ivec2 resTexRC = ivec2(resultUV.yx *\n                             vec2(packedTexShape[0], packedTexShape[1]));\n      int index = resTexRC.x * packedTexShape[1] + resTexRC.y;\n\n      int b = index / texelsInBatch;\n      index -= b * texelsInBatch;\n\n      int r = 2 * (index / texelsInLogicalRow);\n      int c = imod(index, texelsInLogicalRow) * 2;\n\n      return ivec3(b, r, c);\n    }\n  ":(n=[Math.ceil(t[0]/2),Math.ceil(t[1]/2)],e=(t=Math.ceil(e[2]/2))*Math.ceil(e[1]/2),`\n    ivec3 getOutputCoords() {\n      ivec2 resTexRC = ivec2(resultUV.yx *\n                             vec2(${n[0]}, ${n[1]}));\n      int index = resTexRC.x * ${n[1]} + resTexRC.y;\n\n      int b = index / ${e};\n      index -= b * ${e};\n\n      int r = 2 * (index / ${t});\n      int c = imod(index, ${t}) * 2;\n\n      return ivec3(b, r, c);\n    }\n  `)}(e,t,n);default:return function(e,t,n){if(n)return"\n    ivec4 getOutputCoords() {\n      ivec2 packedTexShape = ivec2(ceil(float(outTexShape[0]) / 2.0), ceil(float(outTexShape[1]) / 2.0));\n      ivec2 resTexRC = ivec2(resultUV.yx *\n                             vec2(packedTexShape[0], packedTexShape[1]));\n      int index = resTexRC.x * packedTexShape[1] + resTexRC.y;\n\n      int texelsInLogicalRow = int(ceil(float(outShape[3]) / 2.0));\n      int texelsInBatch = texelsInLogicalRow * int(ceil(float(outShape[2]) / 2.0));\n      int texelsInBatchN = texelsInBatch * outShape[1];\n\n      int b2 = index / texelsInBatchN;\n      index -= b2 * texelsInBatchN;\n\n      int b = index / texelsInBatch;\n      index -= b * texelsInBatch;\n\n      int r = 2 * (index / texelsInLogicalRow);\n      int c = imod(index, texelsInLogicalRow) * 2;\n\n      return ivec4(b2, b, r, c);\n    }\n  ";n=[Math.ceil(t[0]/2),Math.ceil(t[1]/2)];var r=(t=Math.ceil(e[e.length-1]/2))*Math.ceil(e[e.length-2]/2);let i=r,o="",a="b, r, c";for(let t=2;t<e.length-1;t++)i*=e[e.length-t-1],o=`\n      int b${t} = index / ${i};\n      index -= b${t} * ${i};\n    `+o,a=`b${t}, `+a;return`\n    ivec${e.length} getOutputCoords() {\n      ivec2 resTexRC = ivec2(resultUV.yx *\n                             vec2(${n[0]}, ${n[1]}));\n      int index = resTexRC.x * ${n[1]} + resTexRC.y;\n\n      ${o}\n\n      int b = index / ${r};\n      index -= b * ${r};\n\n      int r = 2 * (index / ${t});\n      int c = imod(index, ${t}) * 2;\n\n      return ivec${e.length}(${a});\n    }\n  `}(e,t,n)}}(t.logicalShape,e,n.enableShapeUniforms),`\n    void setOutput(vec4 val) {\n      ${a.output} = val;\n    }\n  `):(u=function(e,t,n){switch(e.length){case 0:return Qg();case 1:return function(e,t){return 1===e[0]?t?"\n      int getOutputCoords() {\n        return int(resultUV.x * float(outTexShape[1]));\n      }\n    ":`\n      int getOutputCoords() {\n        return int(resultUV.x * ${e[1]}.0);\n      }\n    `:1===e[1]?t?"\n      int getOutputCoords() {\n        return int(resultUV.y * float(outTexShape[0]));\n      }\n    ":`\n      int getOutputCoords() {\n        return int(resultUV.y * ${e[0]}.0);\n      }\n    `:t?"\n    int getOutputCoords() {\n      ivec2 resTexRC = ivec2(resultUV.yx *\n                             vec2(outTexShape[0], outTexShape[1]));\n      return resTexRC.x * outTexShape[1] + resTexRC.y;\n    }\n  ":`\n    int getOutputCoords() {\n      ivec2 resTexRC = ivec2(resultUV.yx *\n                             vec2(${e[0]}, ${e[1]}));\n      return resTexRC.x * ${e[1]} + resTexRC.y;\n    }\n  `}(t,n);case 2:return function(e,t,n){return f.Ji.arraysEqual(e,t)?n?"\n      ivec2 getOutputCoords() {\n        return ivec2(resultUV.yx * vec2(outTexShape[0], outTexShape[1]));\n      }\n    ":`\n      ivec2 getOutputCoords() {\n        return ivec2(resultUV.yx * vec2(${t[0]}, ${t[1]}));\n      }\n    `:1===e[1]?n?"\n      ivec2 getOutputCoords() {\n        ivec2 resTexRC = ivec2(resultUV.yx *\n                               vec2(outTexShape[0], outTexShape[1]));\n        int index = resTexRC.x * outTexShape[1] + resTexRC.y;\n        return ivec2(index, 0);\n      }\n    ":`\n      ivec2 getOutputCoords() {\n        ivec2 resTexRC = ivec2(resultUV.yx *\n                               vec2(${t[0]}, ${t[1]}));\n        int index = resTexRC.x * ${t[1]} + resTexRC.y;\n        return ivec2(index, 0);\n      }\n    `:1===e[0]?n?"\n      ivec2 getOutputCoords() {\n        ivec2 resTexRC = ivec2(resultUV.yx *\n                               vec2(outTexShape[0], outTexShape[1]));\n        int index = resTexRC.x * outTexShape[1] + resTexRC.y;\n        return ivec2(0, index);\n      }\n    ":`\n      ivec2 getOutputCoords() {\n        ivec2 resTexRC = ivec2(resultUV.yx *\n                               vec2(${t[0]}, ${t[1]}));\n        int index = resTexRC.x * ${t[1]} + resTexRC.y;\n        return ivec2(0, index);\n      }\n    `:n?"\n    ivec2 getOutputCoords() {\n      ivec2 resTexRC = ivec2(resultUV.yx *\n                             vec2(outTexShape[0], outTexShape[1]));\n      int index = resTexRC.x * outTexShape[1] + resTexRC.y;\n      int r = index / outShape[1];\n      int c = index - r * outShape[1];\n      return ivec2(r, c);\n    }\n  ":`\n    ivec2 getOutputCoords() {\n      ivec2 resTexRC = ivec2(resultUV.yx *\n                             vec2(${t[0]}, ${t[1]}));\n      int index = resTexRC.x * ${t[1]} + resTexRC.y;\n      int r = index / ${e[1]};\n      int c = index - r * ${e[1]};\n      return ivec2(r, c);\n    }\n  `}(e,t,n);case 3:return function(e,t,n){if(n){return`\n  ivec3 getOutputCoords() {\n    ivec2 resTexRC = ivec2(resultUV.yx *\n                           vec2(outTexShape[0], outTexShape[1]));\n    int index = resTexRC.x * outTexShape[1] + resTexRC.y;\n    ${Mg(["r","c","d"],e)}\n    return ivec3(r, c, d);\n  }\n`}const r=Ig(["r","c","d"],e);return`\n    ivec3 getOutputCoords() {\n      ivec2 resTexRC = ivec2(resultUV.yx *\n                             vec2(${t[0]}, ${t[1]}));\n      int index = resTexRC.x * ${t[1]} + resTexRC.y;\n      ${r}\n      return ivec3(r, c, d);\n    }\n  `}(e,t,n);case 4:return function(e,t,n){if(n){return`\n    ivec4 getOutputCoords() {\n      ivec2 resTexRC = ivec2(resultUV.yx *\n        vec2(outTexShape[0], outTexShape[1]));\n      int index = resTexRC.x * outTexShape[1] + resTexRC.y;\n      ${Mg(["r","c","d","d2"],e)}\n      return ivec4(r, c, d, d2);\n    }\n  `}const r=Ig(["r","c","d","d2"],e);return`\n    ivec4 getOutputCoords() {\n      ivec2 resTexRC = ivec2(resultUV.yx *\n        vec2(${t[0]}, ${t[1]}));\n      int index = resTexRC.x * ${t[1]} + resTexRC.y;\n      ${r}\n      return ivec4(r, c, d, d2);\n    }\n  `}(e,t,n);case 5:return function(e,t){return e=Ig(["r","c","d","d2","d3"],e),`\n    ivec5 getOutputCoords() {\n      ivec2 resTexRC = ivec2(resultUV.yx * vec2(${t[0]},\n                             ${t[1]}));\n\n      int index = resTexRC.x * ${t[1]} + resTexRC.y;\n\n      ${e}\n\n      ivec5 outShape = ivec5(r, c, d, d2, d3);\n      return outShape;\n    }\n  `}(e,t);case 6:return function(e,t){return e=Ig(["r","c","d","d2","d3","d4"],e),`\n    ivec6 getOutputCoords() {\n      ivec2 resTexRC = ivec2(resultUV.yx *\n        vec2(${t[0]}, ${t[1]}));\n      int index = resTexRC.x * ${t[1]} + resTexRC.y;\n\n      ${e}\n\n      ivec6 result = ivec6(r, c, d, d2, d3, d4);\n      return result;\n    }\n  `}(e,t);default:throw new Error(e.length+"-D output sampling is not yet supported")}}(t.logicalShape,e,n.enableShapeUniforms),`\n    void setOutput(float val) {\n      ${a.output} = vec4(val, 0, 0, 0);\n    }\n  `),n.packedInputs&&(l+=$g),[l,s,c,i,u,o,n.userCode].join("\n")}function Pg(e,t=!1){var n=e.shapeInfo.logicalShape;switch(n.length){case 0:{var r=e,i=t;const n=r.name,s="get"+n.charAt(0).toUpperCase()+n.slice(1);if(r.shapeInfo.isUniform)return`float ${s}() {return ${n};}`;var[o,a]=r.shapeInfo.texShape;if(1===o&&1===a)return`\n      float ${s}() {\n        return sampleTexture(${n}, halfCR);\n      }\n    `;if(o=Vg(n),i)return`\n    float ${s}() {\n      vec2 uv = uvFromFlat(${n}TexShape[0], ${n}TexShape[1], ${o});\n      return sampleTexture(${n}, uv);\n    }\n  `;var[a,i]=r.shapeInfo.texShape;return`\n    float ${s}() {\n      vec2 uv = uvFromFlat(${a}, ${i}, ${o});\n      return sampleTexture(${n}, uv);\n    }\n  `}case 1:{a=t;const n=(r=e).name,s="get"+n.charAt(0).toUpperCase()+n.slice(1);return r.shapeInfo.isUniform?`\n      float ${s}(int index) {\n        ${qg(r)}\n      }\n    `:(i=(r=r.shapeInfo.texShape)[0],1===(r=r[1])&&1===i?`\n      float ${s}(int index) {\n        return sampleTexture(${n}, halfCR);\n      }\n    `:(o=Vg(n),1===r?a?`\n      float ${s}(int index) {\n        vec2 uv = vec2(0.5, (float(index + ${o}) + 0.5) / float(${n}TexShape[0]));\n        return sampleTexture(${n}, uv);\n      }\n    `:`\n      float ${s}(int index) {\n        vec2 uv = vec2(0.5, (float(index + ${o}) + 0.5) / ${i}.0);\n        return sampleTexture(${n}, uv);\n      }\n    `:1===i?a?`\n      float ${s}(int index) {\n        vec2 uv = vec2((float(index + ${o}) + 0.5) / float(${n}TexShape[1]), 0.5);\n        return sampleTexture(${n}, uv);\n      }\n    `:`\n      float ${s}(int index) {\n        vec2 uv = vec2((float(index + ${o}) + 0.5) / ${r}.0, 0.5);\n        return sampleTexture(${n}, uv);\n      }\n    `:a?`\n    float ${s}(int index) {\n      vec2 uv = uvFromFlat(${n}TexShape[0], ${n}TexShape[1], index + ${o});\n      return sampleTexture(${n}, uv);\n    }\n  `:`\n    float ${s}(int index) {\n      vec2 uv = uvFromFlat(${i}, ${r}, index + ${o});\n      return sampleTexture(${n}, uv);\n    }\n  `))}case 2:{var s=e,u=t;const n=s.shapeInfo.logicalShape,r=s.name,i="get"+r.charAt(0).toUpperCase()+r.slice(1),o=s.shapeInfo.texShape;if(null!=o&&f.Ji.arraysEqual(n,o)){if(u)return`\n      float ${i}(int row, int col) {\n        vec2 uv = (vec2(col, row) + halfCR) / vec2(${r}TexShape[1], ${r}TexShape[0]);\n        return sampleTexture(${r}, uv);\n      }\n    `;const e=o[0];return`\n    float ${i}(int row, int col) {\n      vec2 uv = (vec2(col, row) + halfCR) / vec2(${o[1]}.0, ${e}.0);\n      return sampleTexture(${r}, uv);\n    }\n  `}var{newShape:c,keptDims:l}=f.Ji.squeezeShape(n);if(c.length<n.length)return h=["row","col"],`\n      ${Pg(c=Kg(s,c),u)}\n      float ${i}(int row, int col) {\n        return ${i}(${Yg(h,l)});\n      }\n    `;if(s.shapeInfo.isUniform)return`\n      float ${i}(int row, int col) {\n        int index = round(dot(vec2(row, col), vec2(${n[1]}, 1)));\n        ${qg(s)}\n      }\n    `;const a=o[0],d=o[1],p=Vg(r);return 1===d?u?`\n      float ${i}(int row, int col) {\n        float index = dot(vec3(row, col, ${p}), vec3(${r}Shape[1], 1, 1));\n        vec2 uv = vec2(0.5, (index + 0.5) / float(${r}TexShape[0]));\n        return sampleTexture(${r}, uv);\n      }\n    `:`\n    float ${i}(int row, int col) {\n      float index = dot(vec3(row, col, ${p}), vec3(${n[1]}, 1, 1));\n      vec2 uv = vec2(0.5, (index + 0.5) / ${a}.0);\n      return sampleTexture(${r}, uv);\n    }\n  `:1===a?u?`\n      float ${i}(int row, int col) {\n        float index = dot(vec3(row, col, ${p}), vec3(${r}Shape[1], 1, 1));\n        vec2 uv = vec2((index + 0.5) / float(${r}TexShape[1]), 0.5);\n        return sampleTexture(${r}, uv);\n      }\n    `:`\n    float ${i}(int row, int col) {\n      float index = dot(vec3(row, col, ${p}), vec3(${n[1]}, 1, 1));\n      vec2 uv = vec2((index + 0.5) / ${d}.0, 0.5);\n      return sampleTexture(${r}, uv);\n    }\n  `:u?`\n      float ${i}(int row, int col) {\n        // Explicitly use integer operations as dot() only works on floats.\n        int index = row * ${r}Shape[1] + col + ${p};\n        vec2 uv = uvFromFlat(${r}TexShape[0], ${r}TexShape[1], index);\n        return sampleTexture(${r}, uv);\n      }\n    `:`\n  float ${i}(int row, int col) {\n    // Explicitly use integer operations as dot() only works on floats.\n    int index = row * ${n[1]} + col + ${p};\n    vec2 uv = uvFromFlat(${a}, ${d}, index);\n    return sampleTexture(${r}, uv);\n  }\n`}case 3:{var h=t;const n=(c=e).shapeInfo.logicalShape,r=c.name,i="get"+r.charAt(0).toUpperCase()+r.slice(1),o=n[1]*n[2],a=n[2],{newShape:s,keptDims:u}=f.Ji.squeezeShape(n),l=s;if(l.length<n.length)return d=["row","col","depth"],`\n        ${Pg(p=Kg(c,l),h)}\n        float ${i}(int row, int col, int depth) {\n          return ${i}(${Yg(d,u)});\n        }\n      `;if(c.shapeInfo.isUniform)return`\n      float ${i}(int row, int col, int depth) {\n        int index = round(dot(vec3(row, col, depth),\n                          vec3(${o}, ${a}, 1)));\n        ${qg(c)}\n      }\n    `;var d=(p=c.shapeInfo.texShape)[0],p=p[1],c=c.shapeInfo.flatOffset;return p===o&&null==c?h?`\n      float ${i}(int row, int col, int depth) {\n        int stride1 = ${r}Shape[2];\n        float texR = float(row);\n        float texC = dot(vec2(col, depth), vec2(stride1, 1));\n        vec2 uv = (vec2(texC, texR) + halfCR) /\n                   vec2(${r}TexShape[1], ${r}TexShape[0]);\n        return sampleTexture(${r}, uv);\n      }\n    `:`\n        float ${i}(int row, int col, int depth) {\n          float texR = float(row);\n          float texC = dot(vec2(col, depth), vec2(${a}, 1));\n          vec2 uv = (vec2(texC, texR) + halfCR) /\n                     vec2(${p}.0, ${d}.0);\n          return sampleTexture(${r}, uv);\n        }\n      `:p===a&&null==c?h?`\n      float ${i}(int row, int col, int depth) {\n        float texR = dot(vec2(row, col), vec2(${r}Shape[1], 1));\n        float texC = float(depth);\n        vec2 uv = (vec2(texC, texR) + halfCR) / vec2(${r}TexShape[1], ${r}TexShape[0]);\n        return sampleTexture(${r}, uv);\n      }\n    `:`\n    float ${i}(int row, int col, int depth) {\n      float texR = dot(vec2(row, col), vec2(${n[1]}, 1));\n      float texC = float(depth);\n      vec2 uv = (vec2(texC, texR) + halfCR) / vec2(${p}.0, ${d}.0);\n      return sampleTexture(${r}, uv);\n    }\n  `:(c=Vg(r),h?`\n    float ${i}(int row, int col, int depth) {\n      // Explicitly use integer operations as dot() only works on floats.\n      int stride0 = ${r}Shape[1] * ${r}Shape[2];\n      int stride1 = ${r}Shape[2];\n      int index = row * stride0 + col * stride1 + depth + ${c};\n      vec2 uv = uvFromFlat(${r}TexShape[0], ${r}TexShape[1], index);\n      return sampleTexture(${r}, uv);\n    }\n    `:`\n      float ${i}(int row, int col, int depth) {\n        // Explicitly use integer operations as dot() only works on floats.\n        int index = row * ${o} + col * ${a} + depth + ${c};\n        vec2 uv = uvFromFlat(${d}, ${p}, index);\n        return sampleTexture(${r}, uv);\n      }\n  `)}case 4:{s=t;const n=(l=e).shapeInfo.logicalShape,r=l.name,i="get"+r.charAt(0).toUpperCase()+r.slice(1),o=n[3],a=n[2]*o,c=n[1]*a,{newShape:h,keptDims:g}=f.Ji.squeezeShape(n);if(h.length<n.length)return A=["row","col","depth","depth2"],`\n      ${Pg(m=Kg(l,h),s)}\n      float ${i}(int row, int col, int depth, int depth2) {\n        return ${i}(${Yg(A,g)});\n      }\n    `;if(l.shapeInfo.isUniform)return`\n      float ${i}(int row, int col, int depth, int depth2) {\n        int index = round(dot(vec4(row, col, depth, depth2),\n                          vec4(${c}, ${a}, ${o}, 1)));\n        ${qg(l)}\n      }\n    `;var m=l.shapeInfo.flatOffset,l=(A=l.shapeInfo.texShape)[0];u=`int stride2 = ${r}Shape[3];`,d=`int stride1 = ${r}Shape[2] * stride2;`,p=`int stride0 = ${r}Shape[1] * stride1;`;return(A=A[1])===c&&null==m?s?`\n      float ${i}(int row, int col, int depth, int depth2) {\n        ${u}\n        ${d}\n        float texR = float(row);\n        float texC =\n            dot(vec3(col, depth, depth2),\n                vec3(stride1, stride2, 1));\n        vec2 uv = (vec2(texC, texR) + halfCR) /\n                   vec2(${r}TexShape[1], ${r}TexShape[0]);\n        return sampleTexture(${r}, uv);\n      }\n    `:`\n      float ${i}(int row, int col, int depth, int depth2) {\n        float texR = float(row);\n        float texC =\n            dot(vec3(col, depth, depth2),\n                vec3(${a}, ${o}, 1));\n        vec2 uv = (vec2(texC, texR) + halfCR) /\n                   vec2(${A}.0, ${l}.0);\n        return sampleTexture(${r}, uv);\n      }\n    `:A===o&&null==m?s?`\n      float ${i}(int row, int col, int depth, int depth2) {\n        float texR = dot(vec3(row, col, depth),\n                         vec3(${r}Shape[1] * ${r}Shape[2], ${r}Shape[2], 1));\n        float texC = float(depth2);\n        vec2 uv = (vec2(texC, texR) + halfCR) /\n                  vec2(${r}TexShape[1], ${r}TexShape[0]);\n        return sampleTexture(${r}, uv);\n      }\n    `:`\n      float ${i}(int row, int col, int depth, int depth2) {\n        float texR = dot(vec3(row, col, depth),\n                         vec3(${n[1]*n[2]}, ${n[2]}, 1));\n        float texC = float(depth2);\n        vec2 uv = (vec2(texC, texR) + halfCR) /\n                  vec2(${A}.0, ${l}.0);\n        return sampleTexture(${r}, uv);\n      }\n    `:(m=Vg(r),s?`\n    float ${i}(int row, int col, int depth, int depth2) {\n      // Explicitly use integer operations as dot() only works on floats.\n      ${u}\n      ${d}\n      ${p}\n      int index = row * stride0 + col * stride1 +\n          depth * stride2 + depth2;\n      vec2 uv = uvFromFlat(${r}TexShape[0], ${r}TexShape[1], index + ${m});\n      return sampleTexture(${r}, uv);\n    }\n  `:`\n    float ${i}(int row, int col, int depth, int depth2) {\n      // Explicitly use integer operations as dot() only works on floats.\n      int index = row * ${c} + col * ${a} +\n          depth * ${o} + depth2;\n      vec2 uv = uvFromFlat(${l}, ${A}, index + ${m});\n      return sampleTexture(${r}, uv);\n    }\n  `)}case 5:{const t=(A=e).shapeInfo.logicalShape,n=A.name,r="get"+n.charAt(0).toUpperCase()+n.slice(1),i=t[4],o=t[3]*i,a=t[2]*o,s=t[1]*a,{newShape:u,keptDims:c}=f.Ji.squeezeShape(t);if(u.length<t.length)return y=["row","col","depth","depth2","depth3"],`\n      ${Pg(g=Kg(A,u))}\n      float ${r}(int row, int col, int depth, int depth2, int depth3) {\n        return ${r}(${Yg(y,c)});\n      }\n    `;if(A.shapeInfo.isUniform)return`\n      float ${r}(int row, int col, int depth, int depth2, int depth3) {\n        float index = dot(\n          vec4(row, col, depth, depth2),\n          vec4(${s}, ${a}, ${o}, ${i})) +\n          depth3;\n        ${qg(A)}\n      }\n    `;var g=A.shapeInfo.flatOffset,A=(y=A.shapeInfo.texShape)[0];return(y=y[1])===s&&null==g?`\n      float ${r}(int row, int col, int depth, int depth2, int depth3) {\n        int texR = row;\n        float texC = dot(vec4(col, depth, depth2, depth3),\n                         vec4(${a}, ${o}, ${i}, 1));\n        vec2 uv = (vec2(texC, texR) + halfCR) /\n                   vec2(${y}.0, ${A}.0);\n        return sampleTexture(${n}, uv);\n      }\n    `:y===i&&null==g?`\n      float ${r}(int row, int col, int depth, int depth2, int depth3) {\n        float texR = dot(\n          vec4(row, col, depth, depth2),\n          vec4(${t[1]*t[2]*t[3]},\n               ${t[2]*t[3]}, ${t[3]}, 1));\n        int texC = depth3;\n        vec2 uv = (vec2(texC, texR) + halfCR) /\n                  vec2(${y}.0, ${A}.0);\n        return sampleTexture(${n}, uv);\n      }\n    `:`\n    float ${r}(int row, int col, int depth, int depth2, int depth3) {\n      // Explicitly use integer operations as dot() only works on floats.\n      int index = row * ${s} + col * ${a} + depth * ${o} +\n          depth2 * ${i} + depth3 + ${g=Vg(n)};\n      vec2 uv = uvFromFlat(${A}, ${y}, index);\n      return sampleTexture(${n}, uv);\n    }\n  `}case 6:{const t=(m=e).shapeInfo.logicalShape,n=m.name,r="get"+n.charAt(0).toUpperCase()+n.slice(1),{newShape:i,keptDims:o}=f.Ji.squeezeShape(t);if(i.length<t.length)return b=["row","col","depth","depth2","depth3","depth4"],`\n      ${Pg(v=Kg(m,i))}\n      float ${r}(int row, int col, int depth,\n                    int depth2, int depth3, int depth4) {\n        return ${r}(${Yg(b,o)});\n      }\n    `;var v=t[5],b=t[4]*v,y=(g=t[3]*b,t[2]*g),w=t[1]*y;if(m.shapeInfo.isUniform)return`\n      float ${r}(int row, int col, int depth,\n                  int depth2, int depth3, int depth4) {\n        int index = round(dot(\n          vec4(row, col, depth, depth2),\n          vec4(${w}, ${y}, ${g}, ${b})) +\n          dot(\n            vec2(depth3, depth4),\n            vec2(${v}, 1)));\n        ${qg(m)}\n      }\n    `;var x=m.shapeInfo.flatOffset,C=(m=m.shapeInfo.texShape)[0];return(m=m[1])===w&&null==x?`\n      float ${r}(int row, int col, int depth,\n                    int depth2, int depth3, int depth4) {\n        int texR = row;\n        float texC = dot(vec4(col, depth, depth2, depth3),\n          vec4(${y}, ${g}, ${b}, ${v})) +\n               float(depth4);\n        vec2 uv = (vec2(texC, texR) + halfCR) /\n                   vec2(${m}.0, ${C}.0);\n        return sampleTexture(${n}, uv);\n      }\n    `:m===v&&null==x?`\n      float ${r}(int row, int col, int depth,\n                    int depth2, int depth3, int depth4) {\n        float texR = dot(vec4(row, col, depth, depth2),\n          vec4(${t[1]*t[2]*t[3]*t[4]},\n               ${t[2]*t[3]*t[4]},\n               ${t[3]*t[4]},\n               ${t[4]})) + float(depth3);\n        int texC = depth4;\n        vec2 uv = (vec2(texC, texR) + halfCR) /\n                  vec2(${m}.0, ${C}.0);\n        return sampleTexture(${n}, uv);\n      }\n    `:`\n    float ${r}(int row, int col, int depth,\n                  int depth2, int depth3, int depth4) {\n      // Explicitly use integer operations as dot() only works on floats.\n      int index = row * ${w} + col * ${y} + depth * ${g} +\n          depth2 * ${b} + depth3 * ${v} + depth4 + ${x=Vg(n)};\n      vec2 uv = uvFromFlat(${C}, ${m}, index);\n      return sampleTexture(${n}, uv);\n    }\n  `}default:throw new Error(n.length+"-D input sampling is not yet supported")}}function Lg(e,t){switch(e.shapeInfo.logicalShape.length){case 0:{var n=e;const t=n.name;return`\n    vec4 ${"get"+t.charAt(0).toUpperCase()+t.slice(1)}() {\n      return ${Bg().texture2D}(${t}, halfCR);\n    }\n  `}case 1:{var r=t;const i=(n=e).name,o="get"+i.charAt(0).toUpperCase()+i.slice(1),a=n.shapeInfo.texShape,s=Bg();return r?`\n    vec4 ${o}(int index) {\n      ivec2 packedTexShape = ivec2(ceil(float(${i}TexShape[0]) / 2.0), ceil(float(${i}TexShape[1]) / 2.0));\n      vec2 uv = packedUVfrom1D(\n        packedTexShape[0], packedTexShape[1], index);\n      return ${s.texture2D}(${i}, uv);\n    }\n  `:`\n    vec4 ${o}(int index) {\n      vec2 uv = packedUVfrom1D(\n        ${(n=[Math.ceil(a[0]/2),Math.ceil(a[1]/2)])[0]}, ${n[1]}, index);\n      return ${s.texture2D}(${i}, uv);\n    }\n  `}case 2:{var i=t;const n=(r=e).shapeInfo.logicalShape,o=r.name,a="get"+o.charAt(0).toUpperCase()+o.slice(1),s=r.shapeInfo.texShape,u=s[0],c=s[1],l=Bg();return null!=s&&f.Ji.arraysEqual(n,s)?i?`\n      vec4 ${a}(int row, int col) {\n        vec2 uv = (vec2(col, row) + halfCR) / vec2(${o}TexShape[1], ${o}TexShape[0]);\n\n        return ${l.texture2D}(${o}, uv);\n      }\n    `:`\n      vec4 ${a}(int row, int col) {\n        vec2 uv = (vec2(col, row) + halfCR) / vec2(${c}.0, ${u}.0);\n\n        return ${l.texture2D}(${o}, uv);\n      }\n    `:i?`\n    vec4 ${a}(int row, int col) {\n      ivec2 packedTexShape = ivec2(ceil(float(${o}TexShape[0]) / 2.0), ceil(float(${o}TexShape[1]) / 2.0));\n      int valuesPerRow = int(ceil(float(${o}Shape[1]) / 2.0));\n      vec2 uv = packedUVfrom2D(valuesPerRow, packedTexShape[0], packedTexShape[1], row, col);\n      return ${l.texture2D}(${o}, uv);\n    }\n  `:(r=[Math.ceil(s[0]/2),Math.ceil(s[1]/2)],`\n    vec4 ${a}(int row, int col) {\n      vec2 uv = packedUVfrom2D(${i=Math.ceil(n[1]/2)}, ${r[0]}, ${r[1]}, row, col);\n      return ${l.texture2D}(${o}, uv);\n    }\n  `)}case 3:{var o=t;const n=(i=e).shapeInfo.logicalShape,r=i.name,s="get"+r.charAt(0).toUpperCase()+r.slice(1),u=i.shapeInfo.texShape,h=[Math.ceil(u[0]/2),Math.ceil(u[1]/2)];return 1===n[0]?(c=[1,2],i=Kg(i,l=n.slice(1)),l=["b","row","col"],`\n        ${Lg(i,o)}\n        vec4 ${s}(int b, int row, int col) {\n          return ${s}(${Yg(l,c)});\n        }\n      `):(i=Bg(),o?`\n    vec4 ${s}(int b, int row, int col) {\n      ivec2 packedTexShape = ivec2(ceil(float(${r}TexShape[0]) / 2.0), ceil(float(${r}TexShape[1]) / 2.0));\n      int valuesPerRow = int(ceil(float(${r}Shape[2]) / 2.0));\n      int texelsInBatch = valuesPerRow * int(ceil(float(${r}Shape[1]) / 2.0));\n      vec2 uv = packedUVfrom3D(\n        packedTexShape[0], packedTexShape[1], texelsInBatch, valuesPerRow, b, row, col);\n      return ${i.texture2D}(${r}, uv);\n    }\n  `:`\n    vec4 ${s}(int b, int row, int col) {\n      vec2 uv = packedUVfrom3D(\n        ${l=h[0]}, ${c=h[1]}, ${a=(o=Math.ceil(n[2]/2))*Math.ceil(n[1]/2)}, ${o}, b, row, col);\n      return ${i.texture2D}(${r}, uv);\n    }\n  `)}default:{c=t;const n=(l=e).name,r="get"+n.charAt(0).toUpperCase()+n.slice(1),i=Bg();if(c)return`\n    vec4 ${r}(int b2, int b, int row, int col) {\n      int valuesPerRow = int(ceil(float(${n}Shape[3]) / 2.0));\n      int texelsInBatch = valuesPerRow * int(ceil(float(${n}Shape[2]) / 2.0));\n      int index = b * texelsInBatch + (row / 2) * valuesPerRow + (col / 2);\n      texelsInBatch *= ${n}Shape[1];\n      index = b2 * texelsInBatch + index;\n      ivec2 packedTexShape = ivec2(ceil(float(${n}TexShape[0]) / 2.0), ceil(float(${n}TexShape[1]) / 2.0));\n      int texR = index / packedTexShape[1];\n      int texC = index - texR * packedTexShape[1];\n      vec2 uv = (vec2(texC, texR) + halfCR) / vec2(packedTexShape[1], packedTexShape[0]); return ${i.texture2D}(${n}, uv);\n    }\n  `;var a,s=l.shapeInfo.logicalShape,u=s.length,c=l.shapeInfo.texShape,l=(c=(l=[Math.ceil(c[0]/2),Math.ceil(c[1]/2)])[0],l[1]);let o=(a=Math.ceil(s[u-1]/2))*Math.ceil(s[u-2]/2),h="int b, int row, int col",f=`b * ${o} + (row / 2) * ${a} + (col / 2)`;for(let e=2;e<u-1;e++)h=`int b${e}, `+h,o*=s[u-e-1],f=`b${e} * ${o} + `+f;return`\n    vec4 ${r}(${h}) {\n      int index = ${f};\n      int texR = index / ${l};\n      int texC = index - texR * ${l};\n      vec2 uv = (vec2(texC, texR) + halfCR) / vec2(${l}, ${c});\n      return ${i.texture2D}(${n}, uv);\n    }\n  `}}}const Ug="\nvec2 uvFromFlat(int texNumR, int texNumC, int index) {\n  int texR = index / texNumC;\n  int texC = index - texR * texNumC;\n  return (vec2(texC, texR) + halfCR) / vec2(texNumC, texNumR);\n}\nvec2 packedUVfrom1D(int texNumR, int texNumC, int index) {\n  int texelIndex = index / 2;\n  int texR = texelIndex / texNumC;\n  int texC = texelIndex - texR * texNumC;\n  return (vec2(texC, texR) + halfCR) / vec2(texNumC, texNumR);\n}\n",zg="\nvec2 packedUVfrom2D(int texelsInLogicalRow, int texNumR,\n  int texNumC, int row, int col) {\n  int texelIndex = (row / 2) * texelsInLogicalRow + (col / 2);\n  int texR = texelIndex / texNumC;\n  int texC = texelIndex - texR * texNumC;\n  return (vec2(texC, texR) + halfCR) / vec2(texNumC, texNumR);\n}\n",Hg="\nvec2 packedUVfrom3D(int texNumR, int texNumC,\n    int texelsInBatch, int texelsInLogicalRow, int b,\n    int row, int col) {\n  int index = b * texelsInBatch + (row / 2) * texelsInLogicalRow + (col / 2);\n  int texR = index / texNumC;\n  int texC = index - texR * texNumC;\n  return (vec2(texC, texR) + halfCR) / vec2(texNumC, texNumR);\n}\n",$g="\n  float getChannel(vec4 frag, vec2 innerDims) {\n    vec2 modCoord = mod(innerDims, 2.);\n    return modCoord.x == 0. ?\n      (modCoord.y == 0. ? frag.r : frag.g) :\n      (modCoord.y == 0. ? frag.b : frag.a);\n  }\n  float getChannel(vec4 frag, int dim) {\n    float modCoord = mod(float(dim), 2.);\n    return modCoord == 0. ? frag.r : frag.g;\n  }\n";function Qg(){return"\n    int getOutputCoords() {\n      return 0;\n    }\n  "}function Vg(e){return"offset"+e}function qg(e){var t=e.name;return(e=f.Ji.sizeFromShape(e.shapeInfo.logicalShape))<2?`return ${t};`:`\n    for (int i = 0; i < ${e}; i++) {\n      if (i == index) {\n        return ${t}[i];\n      }\n    }\n  `}function Gg(e){if(e<=1)return"int";if(2===e)return"ivec2";if(3===e)return"ivec3";if(4===e)return"ivec4";if(5===e)return"ivec5";if(6===e)return"ivec6";throw Error(`GPU for rank ${e} is not yet supported`)}function Wg(e,t,n){var{newShape:r,keptDims:i}=f.Ji.squeezeShape(t),o=t.length,a=e&&3===o&&1===t[0],s=a?t.slice(1):r;return{useSqueezeShape:e=!e&&1<o&&!f.Ji.arraysEqual(t,n)&&r.length<o||a,uniformShape:e?s:t,keptDims:i}}function Kg(e,t){const n=JSON.parse(JSON.stringify(e));return n.shapeInfo.logicalShape=t,n}function Yg(e,t){return t.map(t=>e[t]).join(", ")}
/**
 * @license
 * Copyright 2017 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function Xg(e,t,n){const r={},i={},o={},a=[];let s,u,c,l=null;var h=e.getUniformLocation(n,"NAN",!1);1===Object(f.hf)().getNumber("WEBGL_VERSION")&&(l=e.getUniformLocation(n,"INFINITY",!1));for(let a=0;a<t.variableNames.length;a++){var d=t.variableNames[a];r[d]=e.getUniformLocation(n,d,!1),r["offset"+d]=e.getUniformLocation(n,"offset"+d,!1),t.enableShapeUniforms&&(i[d+"Shape"]=e.getUniformLocation(n,d+"Shape",!1),o[d+"TexShape"]=e.getUniformLocation(n,d+"TexShape",!1))}return t.enableShapeUniforms&&(s=e.getUniformLocation(n,"outShape",!1),c=e.getUniformLocation(n,"outShapeStrides",!1),u=e.getUniformLocation(n,"outTexShape",!1)),t.customUniforms&&t.customUniforms.forEach((t,r)=>{a[r]=e.getUniformLocation(n,t.name,!1)}),{uniformLocations:r,customUniformLocations:a,infLoc:l,nanLoc:h,inShapesLocations:i,inTexShapesLocations:o,outShapeLocation:s,outShapeStridesLocation:c,outTexShapeLocation:u}}function Jg(e,t){if(e.length!==t.length)throw Error(`Binary was compiled with ${e.length} inputs, but was executed with ${t.length} inputs`);e.forEach((e,n)=>{var r=e.logicalShape,i=(n=t[n]).shape;if(!f.Ji.arraysEqual(r,i))throw Error(`Binary was compiled with different shapes than the current args. Shapes ${r} and ${i} must match`);if(!(e.isUniform&&n.isUniform||(r=e.texShape,i=n.isUniform?null:n.texData.texShape,f.Ji.arraysEqual(r,i))))throw Error(`Binary was compiled with different texture shapes than the current args. Shape ${r} and ${i} must match`)})}function Zg(e){return Object(f.hf)().getBool("WEBGL_USE_SHAPES_UNIFORMS")&&e<=4}
/**
 * @license
 * Copyright 2019 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */class eA{constructor(e){this.variableNames=["A"],this.packedInputs=!1,this.packedOutput=!0,this.outPackingScheme=Jm.DENSE,this.customUniforms=[{name:"texShape",type:"ivec2"}];var t=Bg();this.outputShape=e,this.enableShapeUniforms=Zg(this.outputShape.length),this.userCode=`\n      ivec3 outCoordsFromFlatIndex(int index) {\n        ${(this.enableShapeUniforms?Mg:Ig)(["r","c","d"],e)}\n        return ivec3(r, c, d);\n      }\n\n      void main() {\n        ivec2 resTexRC = ivec2(resultUV.yx * vec2(texShape[0], texShape[1]));\n        int index = 4 * (resTexRC.x * texShape[1] + resTexRC.y);\n\n        vec4 result = vec4(0.);\n\n        for (int i=0; i<4; i++) {\n          int flatIndex = index + i;\n          ivec3 rc = outCoordsFromFlatIndex(flatIndex);\n          result[i] = getA(rc.x, rc.y, rc.z);\n        }\n\n        ${t.output} = result;\n      }\n    `}}
/**
 * @license
 * Copyright 2019 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */class tA{constructor(e){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outPackingScheme=Jm.DENSE,this.customUniforms=[{name:"texShape",type:"ivec2"}];var t=Bg();this.outputShape=e,this.enableShapeUniforms=Zg(this.outputShape.length),this.userCode=`\n      ivec3 outCoordsFromFlatIndex(int index) {\n        ${(this.enableShapeUniforms?Mg:Ig)(["r","c","d"],e)}\n        return ivec3(r, c, d);\n      }\n\n      void main() {\n        ivec2 resTexRC = ivec2(resultUV.yx * vec2(texShape[0], texShape[1]));\n        int index = 4 * (resTexRC.x * texShape[1] + resTexRC.y);\n\n        vec4 result = vec4(0.);\n\n        for (int i=0; i<4; i++) {\n          int flatIndex = index + i;\n          ivec3 rc = outCoordsFromFlatIndex(flatIndex);\n          result[i] = getChannel(getA(rc.x, rc.y, rc.z), vec2(rc.y, rc.z));\n        }\n\n        ${t.output} = result;\n      }\n    `}}
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */class nA{constructor(e){this.variableNames=["A"],this.outTexUsage=Zm.DOWNLOAD;var t=Bg();this.outputShape=e,this.userCode=`\n      ${Ng}\n\n      void main() {\n        float x = getAAtOutCoords();\n        ${t.output} = encode_float(x);\n      }\n    `}}
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */class rA{constructor(e){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!1,this.outTexUsage=Zm.DOWNLOAD;var t=Bg();this.outputShape=e,this.userCode=`\n      ${Ng}\n\n      void main() {\n        ivec3 coords = getOutputCoords();\n        float x = getChannel(getAAtOutCoords(), vec2(coords.y, coords.z));\n        ${t.output} = encode_float(x);\n      }\n    `}}
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */const iA={R:0,G:1,B:2,A:3};class oA{constructor(e,t=!1,n="RGBA"){this.variableNames=["A"],this.customUniforms=[{name:"texShape",type:"ivec2"}];var r=Bg();this.outputShape=e,this.enableShapeUniforms=Zg(this.outputShape.length);let i="result",o=(t&&(i="floor(result * 255. + 0.5)"),"");for(let e=0;e<n.length;e++){var a=n[e];o+=`\n          if(offset == ${e}) {\n            result = values[${iA[a]}];\n          }`}this.userCode=`\n      ${this.enableShapeUniforms?"\n  int getFlatIndex(ivec3 coords) {\n    return coords.x * outShapeStrides[0] + coords.y * outShapeStrides[1] + coords.z;\n  }\n":jg(e)}\n\n      void main() {\n        ivec3 coords = getOutputCoords();\n        int flatIndex = getFlatIndex(coords);\n        float result = 0.;\n        int offset = imod(flatIndex, ${n.length});\n\n        flatIndex = idiv(flatIndex, ${n.length}, 1.);\n\n        int r = flatIndex / texShape[1];\n        if (r < texShape[0]) {\n          int c = imod(flatIndex, texShape[1]);\n          vec2 uv = (vec2(c, r) + halfCR) / vec2(texShape[1], texShape[0]);\n          vec4 values = ${r.texture2D}(A, uv);\n          ${o}\n        }\n        ${r.output} = vec4(${i}, 0., 0., 0.);\n      }\n    `}}
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */class aA{constructor(e,t=!1){this.variableNames=["A"],this.packedInputs=!1,this.packedOutput=!0,this.customUniforms=[{name:"texShape",type:"ivec2"}];var n=Bg();this.outputShape=e,this.enableShapeUniforms=Zg(this.outputShape.length);let r="",i="result";t&&(i="floor(result * 255. + 0.5)");for(let t=0;t<=1;t++)for(let i=0;i<=1;i++){var o=2*t+i;r+=`\n          localCoords = coords;\n          if(localCoords[2] + ${i} < ${this.enableShapeUniforms?"outShape[2]":""+e[2]}) {\n          localCoords[2] += ${i};\n          if (localCoords[1] + ${t} < ${this.enableShapeUniforms?"outShape[1]":""+e[1]}) {\n            localCoords[1] += ${t};\n\n            flatIndex = getFlatIndex(localCoords);\n            offset = imod(flatIndex, 4);\n\n            flatIndex = idiv(flatIndex, 4, 1.);\n\n            int r = flatIndex / texShape[1];\n            int c = imod(flatIndex, texShape[1]);\n            vec2 uv = (vec2(c, r) + halfCR) / vec2(texShape[1], texShape[0]);\n            values = ${n.texture2D}(A, uv);\n\n            if (offset == 0) {\n              result[${o}] = values[0];\n            } else if (offset == 1) {\n              result[${o}] = values[1];\n            } else if (offset == 2) {\n              result[${o}] = values[2];\n            } else {\n              result[${o}] = values[3];\n            }\n          }\n        }\n        `}this.userCode=`\n        ${this.enableShapeUniforms?"\n  int getFlatIndex(ivec3 coords) {\n    return coords.x * outShapeStrides[0] + coords.y * outShapeStrides[1] + coords.z;\n  }\n":jg(e)}\n\n        void main() {\n          ivec3 coords = getOutputCoords();\n\n          vec4 result = vec4(0.);\n          int flatIndex, r, c, offset;\n          ivec3 localCoords;\n          vec2 uv;\n          vec4 values;\n\n          ${r}\n\n          ${n.output} = ${i};\n        }\n    `}}
/**
 * @license
 * Copyright 2017 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function sA(e,t,n,r,i,o){var a,s=t,u=n,c=Object(f.hf)().getNumber("WEBGL_MAX_TEXTURE_SIZE");if(s<=0||u<=0)throw new Error(`Requested texture size [${s}x${u}] is invalid.`);if(c<s||c<u)throw new Error(`Requested texture size [${s}x${u}] greater than WebGL maximum on this browser / GPU [${c}x${c}].`);const l=bg(a=e,()=>a.createTexture(),"Unable to create WebGLTexture."),h=e.TEXTURE_2D;return lg(e,()=>e.bindTexture(h,l)),lg(e,()=>e.texParameteri(h,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE)),lg(e,()=>e.texParameteri(h,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE)),lg(e,()=>e.texParameteri(h,e.TEXTURE_MIN_FILTER,e.NEAREST)),lg(e,()=>e.texParameteri(h,e.TEXTURE_MAG_FILTER,e.NEAREST)),1===Object(f.hf)().getNumber("WEBGL_VERSION")?lg(e,()=>e.texImage2D(h,0,r,t,n,0,i,o,null)):lg(e,()=>e.texStorage2D(h,1,r,t,n)),lg(e,()=>e.bindTexture(e.TEXTURE_2D,null)),{texture:l,texShape:[n,t]}}function uA(e){return e.internalFormatFloat}function cA(e){return e.internalFormatHalfFloat}function lA(e){return e.downloadTextureFormat}function hA(e){return e.internalFormatPackedFloat}function fA(e){return e.internalFormatPackedHalfFloat}
/**
 * @license
 * Copyright 2017 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
class dA{constructor(e){this.outputTexture=null,this.program=null,this.disposed=!1,this.itemsToPoll=[];var t=Object(f.hf)().getNumber("WEBGL_VERSION");if(null!=e?(this.gl=e,o=e,ig[i=t]=o):this.gl=ag(t),e=this.gl,2===Object(f.hf)().getNumber("WEBGL_VERSION")){const t=e;this.createVertexArray=()=>lg(t,()=>t.createVertexArray()),this.bindVertexArray=e=>lg(t,()=>t.bindVertexArray(e)),this.deleteVertexArray=e=>lg(t,()=>t.deleteVertexArray(e)),this.getVertexArray=()=>lg(t,()=>t.getParameter(t.VERTEX_ARRAY_BINDING))}else if(null!=e){const t=e.getExtension("OES_vertex_array_object");if(null==t)throw new Error("All WebGL1 implementations are expected to offer OES_vertex_array_object.");this.createVertexArray=()=>lg(e,()=>t.createVertexArrayOES()),this.bindVertexArray=n=>lg(e,()=>t.bindVertexArrayOES(n)),this.deleteVertexArray=n=>lg(e,()=>t.deleteVertexArrayOES(n)),this.getVertexArray=()=>lg(e,()=>e.getParameter(t.VERTEX_ARRAY_BINDING_OES))}let n="WEBGL_color_buffer_float";var r,i="EXT_color_buffer_half_float";if(this.parallelCompilationExtension=this.gl.getExtension("KHR_parallel_shader_compile"),1===Object(f.hf)().getNumber("WEBGL_VERSION")){var o="OES_texture_half_float";if(this.textureFloatExtension=hg(this.gl,"OES_texture_float"),Sg(this.gl,o))this.textureHalfFloatExtension=hg(this.gl,o);else if(Object(f.hf)().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(n),Sg(this.gl,i))this.colorBufferHalfFloatExtension=hg(this.gl,i);else if(Object(f.hf)().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(n="EXT_color_buffer_float",Sg(this.gl,n))this.colorBufferFloatExtension=this.gl.getExtension(n);else{if(!Sg(this.gl,i))throw new Error("GL context does not support color renderable floats");this.colorBufferHalfFloatExtension=this.gl.getExtension(i)}this.vertexBuffer=function(e){var t=new Float32Array([-1,1,0,0,1,-1,-1,0,0,0,1,1,0,1,1,1,-1,0,1,0]);{var n=e,r=t;const i=bg(n,()=>n.createBuffer(),"Unable to create WebGLBuffer");return lg(n,()=>n.bindBuffer(n.ARRAY_BUFFER,i)),lg(n,()=>n.bufferData(n.ARRAY_BUFFER,r,n.STATIC_DRAW)),i}}(this.gl),this.indexBuffer=function(e){var t=new Uint16Array([0,1,2,2,1,3]);{var n=e,r=t;const i=bg(n,()=>n.createBuffer(),"Unable to create WebGLBuffer");return lg(n,()=>n.bindBuffer(n.ELEMENT_ARRAY_BUFFER,i)),lg(n,()=>n.bufferData(n.ELEMENT_ARRAY_BUFFER,r,n.STATIC_DRAW)),i}}(this.gl),this.framebuffer=bg(r=this.gl,()=>r.createFramebuffer(),"Unable to create WebGLFramebuffer."),this.textureConfig=cg(this.gl,this.textureHalfFloatExtension)}get debug(){return Object(f.hf)().getBool("DEBUG")}dispose(){if(!this.disposed){this.program,this.outputTexture;const e=this.gl;lg(e,()=>e.finish()),lg(e,()=>e.bindFramebuffer(e.FRAMEBUFFER,null)),lg(e,()=>e.deleteFramebuffer(this.framebuffer)),lg(e,()=>e.bindBuffer(e.ARRAY_BUFFER,null)),lg(e,()=>e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,null)),lg(e,()=>e.deleteBuffer(this.indexBuffer)),this.disposed=!0}}createFloat32MatrixTexture(e,t){this.throwIfDisposed();var n=this.gl,r=this.textureConfig,[t,e]=[t,e];return sA(n,t,e,uA(r),r.textureFormatFloat,n.FLOAT)}createFloat16MatrixTexture(e,t){this.throwIfDisposed();var n=this.gl,r=this.textureConfig,[t,e]=[t,e];return sA(n,t,e,cA(r),r.textureFormatFloat,r.textureTypeHalfFloat)}createUnsignedBytesMatrixTexture(e,t){this.throwIfDisposed();var n=this.gl,r=this.textureConfig,[t,e]=[t,e];return sA(n,t,e,lA(r),n.RGBA,n.UNSIGNED_BYTE)}uploadPixelDataToTexture(e,t){var n,r,i;this.throwIfDisposed(),n=this.gl,r=e,i=t,lg(n,()=>n.bindTexture(n.TEXTURE_2D,r)),i.data instanceof Uint8Array?2===Object(f.hf)().getNumber("WEBGL_VERSION")?lg(n,()=>n.texSubImage2D(n.TEXTURE_2D,0,0,0,i.width,i.height,n.RGBA,n.UNSIGNED_BYTE,i.data)):lg(n,()=>n.texImage2D(n.TEXTURE_2D,0,n.RGBA,i.width,i.height,0,n.RGBA,n.UNSIGNED_BYTE,i.data)):2===Object(f.hf)().getNumber("WEBGL_VERSION")?lg(n,()=>n.texSubImage2D(n.TEXTURE_2D,0,0,0,n.RGBA,n.UNSIGNED_BYTE,i)):lg(n,()=>n.texImage2D(n.TEXTURE_2D,0,n.RGBA,n.RGBA,n.UNSIGNED_BYTE,i)),lg(n,()=>n.bindTexture(n.TEXTURE_2D,null))}uploadDenseMatrixToTexture(e,t,n,r){this.throwIfDisposed();{var i=this.gl,o=e,a=t,s=n;let u,c,l;e=r,t=this.textureConfig,lg(i,()=>i.bindTexture(i.TEXTURE_2D,o)),l=e instanceof Uint8Array?(u=new Uint8Array(a*s*4),c=i.UNSIGNED_BYTE,i.RGBA):(u=new Float32Array(a*s*4),c=i.FLOAT,t.internalFormatPackedFloat),u.set(e),2===Object(f.hf)().getNumber("WEBGL_VERSION")?lg(i,()=>i.texSubImage2D(i.TEXTURE_2D,0,0,0,a,s,i.RGBA,c,u)):lg(i,()=>i.texImage2D(i.TEXTURE_2D,0,l,a,s,0,i.RGBA,c,u)),lg(i,()=>i.bindTexture(i.TEXTURE_2D,null))}}createFloat16PackedMatrixTexture(e,t){this.throwIfDisposed();var n=this.gl,r=this.textureConfig,[e,t]=ug(e,t);return sA(n,e,t,fA(r),n.RGBA,r.textureTypeHalfFloat)}createPackedMatrixTexture(e,t){this.throwIfDisposed();var n=this.gl,r=this.textureConfig,[e,t]=ug(e,t);return sA(n,e,t,hA(r),n.RGBA,n.FLOAT)}deleteMatrixTexture(e){this.throwIfDisposed(),this.outputTexture===e&&(Ag(this.gl,this.framebuffer),this.outputTexture=null),lg(this.gl,()=>this.gl.deleteTexture(e))}downloadByteEncodedFloatMatrixFromOutputTexture(e,t,n){return this.downloadMatrixDriver(e,()=>{{var e=this.gl,r=t,i=n,o=this.textureConfig;const[a,s]=[i,r],u=new Uint8Array(r*i*4);return lg(e,()=>e.readPixels(0,0,a,s,o.downloadTextureFormat,e.UNSIGNED_BYTE,u)),new Float32Array(u.buffer)}})}downloadPackedMatrixFromBuffer(e,t,n,r,i,o){return function(e,t,n,r,i,o,a){const s=e;return e=new Float32Array(function(e,t){var[e,t]=ug(e,t);return e*t*4}(o,a)),s.bindBuffer(s.PIXEL_PACK_BUFFER,t),s.getBufferSubData(s.PIXEL_PACK_BUFFER,0,e),s.bindBuffer(s.PIXEL_PACK_BUFFER,null),e}(this.gl,e,0,0,0,i,o,this.textureConfig)}downloadFloat32MatrixFromBuffer(e,t){{var n=this.gl;const r=n;return n=new Float32Array(t),r.bindBuffer(r.PIXEL_PACK_BUFFER,e),r.getBufferSubData(r.PIXEL_PACK_BUFFER,0,n),r.bindBuffer(r.PIXEL_PACK_BUFFER,null),n}}createBufferFromTexture(e,t,n){return this.bindTextureToFrameBuffer(e),e=function(e,t,n){const r=e.createBuffer(),i=(lg(e,()=>e.bindBuffer(e.PIXEL_PACK_BUFFER,r)),16*t*n);return lg(e,()=>e.bufferData(e.PIXEL_PACK_BUFFER,i,e.STREAM_READ)),lg(e,()=>e.readPixels(0,0,n,t,e.RGBA,e.FLOAT,0)),lg(e,()=>e.bindBuffer(e.PIXEL_PACK_BUFFER,null)),r}(this.gl,t,n,this.textureConfig),this.unbindTextureToFrameBuffer(),e}createAndWaitForFence(){var e=this.createFence(this.gl);return this.pollFence(e)}createFence(e){let t,n;if(Object(f.hf)().getBool("WEBGL_FENCE_API_ENABLED")){const r=e,i=r.fenceSync(r.SYNC_GPU_COMMANDS_COMPLETE,0);e.flush(),n=()=>{var e=r.clientWaitSync(i,0,0);return e===r.ALREADY_SIGNALED||e===r.CONDITION_SATISFIED},t=i}else n=0<Object(f.hf)().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")?(t=this.beginQuery(),this.endQuery(),()=>this.isQueryAvailable(t,Object(f.hf)().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION"))):()=>!0;return{query:t,isFencePassed:n}}downloadMatrixFromPackedTexture(e,t,n){return this.downloadMatrixDriver(e,()=>{{var e=this.gl,r=t,i=n;const o=new Float32Array(r*i*4);return lg(e,()=>e.readPixels(0,0,i,r,e.RGBA,e.FLOAT,o)),o}})}createProgram(e){this.throwIfDisposed();const t=this.gl,n=(null==this.vertexShader&&(this.vertexShader=function(e){var t=`${(t=Bg()).version}\n    precision highp float;\n    ${t.attribute} vec3 clipSpacePos;\n    ${t.attribute} vec2 uv;\n    ${t.varyingVs} vec2 resultUV;\n\n    void main() {\n      gl_Position = vec4(clipSpacePos, 1);\n      resultUV = uv;\n    }`;{var n=e,r=t;const i=bg(n,()=>n.createShader(n.VERTEX_SHADER),"Unable to create vertex WebGLShader.");if(lg(n,()=>n.shaderSource(i,r)),lg(n,()=>n.compileShader(i)),!1===n.getShaderParameter(i,n.COMPILE_STATUS))throw new Error("Failed to compile vertex shader.");return i}}(t)),bg(r=t,()=>r.createProgram(),"Unable to create WebGLProgram."));lg(t,()=>t.attachShader(n,this.vertexShader)),lg(t,()=>t.attachShader(n,e));var r,i,o=t,a=n;if(lg(o,()=>o.linkProgram(a)),Object(f.hf)().get("ENGINE_COMPILE_ONLY")||!1!==o.getProgramParameter(a,o.LINK_STATUS))return i=Object.assign(n,{vao:this.createVertexArray()}),this.bindVertexArray(i.vao),lg(t,()=>t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,this.indexBuffer)),this.debug&&pg(t,i),this.setProgram(i),i;throw new Error("Failed to link vertex and fragment shaders.")}deleteProgram(e){this.throwIfDisposed(),e===this.program&&(this.program=null),null!=e&&(lg(this.gl,()=>this.gl.deleteProgram(e)),this.deleteVertexArray(e.vao))}setProgram(e){this.throwIfDisposed(),this.program=e,null!=this.program&&(this.bindVertexArray(this.program.vao),this.debug&&pg(this.gl,this.program)),lg(this.gl,()=>this.gl.useProgram(e))}getUniformLocation(e,t,n=!0){return this.throwIfDisposed(),n?(r=this.gl,i=e,bg(r,()=>r.getUniformLocation(i,o),'uniform "'+(o=t)+'" not present in program.')):this.gl.getUniformLocation(e,t);var r,i,o}getAttributeLocation(e,t){return this.throwIfDisposed(),lg(this.gl,()=>this.gl.getAttribLocation(e,t))}getUniformLocationNoThrow(e,t){return this.throwIfDisposed(),this.gl.getUniformLocation(e,t)}setInputMatrixTexture(e,t,n){this.throwIfDisposed(),this.throwIfNoProgram(),mg(this.gl,e,t,n)}setOutputMatrixTexture(e,t,n){this.setOutputMatrixTextureDriver(e,n,t)}setOutputPackedMatrixTexture(e,t,n){this.throwIfDisposed();var[t,n]=ug(t,n);this.setOutputMatrixTextureDriver(e,t,n)}setOutputMatrixWriteRegion(e,t,n,r){this.setOutputMatrixWriteRegionDriver(n,e,r,t)}setOutputPackedMatrixWriteRegion(e,t,n,r){throw new Error("setOutputPackedMatrixWriteRegion not implemented.")}debugValidate(){null!=this.program&&pg(this.gl,this.program),vg(this.gl)}executeProgram(){this.throwIfDisposed(),this.throwIfNoProgram();const e=this.gl;this.debug&&(this.getVertexArray(),this.debugValidate()),lg(e,()=>e.drawElements(e.TRIANGLES,6,e.UNSIGNED_SHORT,0))}blockUntilAllProgramsCompleted(){this.throwIfDisposed(),lg(this.gl,()=>this.gl.finish())}getQueryTimerExtension(){return null==this.disjointQueryTimerExtension&&(this.disjointQueryTimerExtension=hg(this.gl,2===Object(f.hf)().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")?"EXT_disjoint_timer_query_webgl2":"EXT_disjoint_timer_query")),this.disjointQueryTimerExtension}getQueryTimerExtensionWebGL2(){return this.getQueryTimerExtension()}getQueryTimerExtensionWebGL1(){return this.getQueryTimerExtension()}beginQuery(){if(2===Object(f.hf)().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")){const e=this.gl,t=this.getQueryTimerExtensionWebGL2(),n=e.createQuery();return e.beginQuery(t.TIME_ELAPSED_EXT,n),n}const e=this.getQueryTimerExtensionWebGL1(),t=e.createQueryEXT();return e.beginQueryEXT(e.TIME_ELAPSED_EXT,t),t}endQuery(){if(2===Object(f.hf)().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION")){const e=this.gl,t=this.getQueryTimerExtensionWebGL2();e.endQuery(t.TIME_ELAPSED_EXT)}else{const e=this.getQueryTimerExtensionWebGL1();e.endQueryEXT(e.TIME_ELAPSED_EXT)}}async waitForQueryAndGetTime(e){return await f.Ji.repeatedTry(()=>this.disposed||this.isQueryAvailable(e,Object(f.hf)().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION"))),this.getQueryTime(e,Object(f.hf)().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_VERSION"))}getQueryTime(e,t){if(0===t)return null;if(2===t){const t=this.gl;return t.getQueryParameter(e,t.QUERY_RESULT)/1e6}{const t=this.getQueryTimerExtensionWebGL1();return t.getQueryObjectEXT(e,t.QUERY_RESULT_EXT)/1e6}}isQueryAvailable(e,t){if(0===t)return!0;if(2===t){const r=this.gl;t=this.getQueryTimerExtensionWebGL2();var n=r.getQueryParameter(e,r.QUERY_RESULT_AVAILABLE);return null==this.disjoint&&(this.disjoint=this.gl.getParameter(t.GPU_DISJOINT_EXT)),n&&!this.disjoint}{const n=this.getQueryTimerExtensionWebGL1();return t=n.getQueryObjectEXT(e,n.QUERY_RESULT_AVAILABLE_EXT),null==this.disjoint&&(this.disjoint=this.gl.getParameter(n.GPU_DISJOINT_EXT)),t&&!this.disjoint}}pollFence(e){return new Promise(t=>{this.addItemToPoll(()=>e.isFencePassed(),()=>t())})}pollItems(){var e=function(e){let t=0;for(;t<e.length&&e[t]();++t);return t-1}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */(this.itemsToPoll.map(e=>e.isDoneFn));for(let t=0;t<=e;++t){(0,this.itemsToPoll[t].resolveFn)()}this.itemsToPoll=this.itemsToPoll.slice(e+1)}addItemToPoll(e,t){if(this.itemsToPoll.push({isDoneFn:e,resolveFn:t}),!(1<this.itemsToPoll.length)){let e=void 0;"setTimeoutCustom"in Object(f.hf)().platform&&(e=Object(f.hf)().platform.setTimeoutCustom.bind(Object(f.hf)().platform)),f.Ji.repeatedTry(()=>(this.pollItems(),0===this.itemsToPoll.length),()=>0,null,e)}}bindTextureToFrameBuffer(e){this.throwIfDisposed(),gg(this.gl,e,this.framebuffer),this.debug&&vg(this.gl)}unbindTextureToFrameBuffer(){null!=this.outputTexture?(gg(this.gl,this.outputTexture,this.framebuffer),this.debug&&vg(this.gl)):Ag(this.gl,this.framebuffer)}downloadMatrixDriver(e,t){return this.bindTextureToFrameBuffer(e),e=t(),this.unbindTextureToFrameBuffer(),e}setOutputMatrixTextureDriver(e,t,n){this.throwIfDisposed();const r=this.gl;gg(r,e,this.framebuffer),this.debug&&vg(r),this.outputTexture=e,lg(r,()=>r.viewport(0,0,t,n)),lg(r,()=>r.scissor(0,0,t,n))}setOutputMatrixWriteRegionDriver(e,t,n,r){this.throwIfDisposed(),lg(this.gl,()=>this.gl.scissor(e,t,n,r))}throwIfDisposed(){if(this.disposed)throw new Error("Attempted to use disposed GPGPUContext.")}throwIfNoProgram(){if(null==this.program)throw new Error("No GPU program is currently set.")}}const{addImpl:pA,bincountImpl:mA,bincountReduceImpl:gA,castImpl:AA,ceilImpl:vA,concatImpl:bA,equalImpl:yA,expImpl:wA,expm1Impl:xA,floorImpl:CA,gatherNdImpl:kA,gatherV2Impl:EA,greaterImpl:SA,greaterEqualImpl:_A,lessImpl:OA,lessEqualImpl:TA,linSpaceImpl:DA,logImpl:BA,maxImpl:IA,maximumImpl:MA,minimumImpl:jA,multiplyImpl:NA,negImpl:FA,notEqualImpl:RA,prodImpl:PA,raggedGatherImpl:LA,raggedRangeImpl:UA,raggedTensorToTensorImpl:zA,rangeImpl:HA,rsqrtImpl:$A,scatterImpl:QA,sigmoidImpl:VA,simpleAbsImpl:qA,sliceImpl:GA,sparseFillEmptyRowsImpl:WA,sparseReshapeImpl:KA,sparseSegmentReductionImpl:YA,sqrtImpl:XA,stridedSliceImpl:JA,stringNGramsImpl:ZA,stringSplitImpl:ev,stringToHashBucketFastImpl:tv,subImpl:nv,tileImpl:rv,topKImpl:iv,transposeImpl:ov,uniqueImpl:av}=h;
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function sv(e,t){return["x","y","z","w","u","v"].slice(0,t).map(t=>e+"."+t)}function uv(e,t){return 1===t?[e]:sv(e,t)}
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */class cv{constructor(e){var t,n,r;this.variableNames=["A"],this.packedInputs=!1,this.packedOutput=!0,this.outputShape=e,this.rank=e.length,this.enableShapeUniforms=Zg(this.outputShape.length),0===this.rank?this.userCode="\n        void main() {\n          setOutput(vec4(getA(), 0., 0., 0.));\n        }\n      ":(e=uv("rc",this.rank),t=Gg(this.rank),n=this.getOutOfBoundsCondition(e),r=this.getSetup(e),e=this.getOutput(e),this.userCode=`\n        void main() {\n          ${t} rc = getOutputCoords();\n\n          if(${n}) {\n            setOutput(vec4(0));\n          } else {\n            ${r}\n\n            setOutput(vec4(${e}));\n          }\n        }\n      `)}getSourceCoordsArr(e){const t=[];for(let n=0;n<=1;n++)for(let r=0;r<=1;r++){let i=(0===n?"r":"rp1")+", "+(0===r?"c":"cp1");for(let t=2;t<this.rank;t++)i=e[e.length-1-t]+","+i;t.push(i)}return t}getOutOfBoundsCondition(e){if(1===this.rank)return"rc > "+(this.enableShapeUniforms?"outShape":this.outputShape[0]);let t="";for(let n=this.rank-2;n<this.rank;n++)t+=e[n]+" >= "+(this.enableShapeUniforms?`outShape[${n}]`:this.outputShape[n]),n<this.rank-1&&(t+="||");return t}getSetup(e){var t,n;return 1===this.rank?"":(e=e.slice(-2),t=this.enableShapeUniforms?`outShape[${this.rank} - 1]`:this.outputShape[this.rank-1],n=this.enableShapeUniforms?`outShape[${this.rank} - 2]`:this.outputShape[this.rank-2],`\n      int r = ${e[0]};\n      int c = ${e[1]};\n      int rp1 = r + 1;\n      int cp1 = c + 1;\n\n      bool cEdge = cp1 >= ${t};\n      bool rEdge = rp1 >= ${n};\n    `)}getOutput(e){return e=this.getSourceCoordsArr(e),1===this.rank?`getA(rc), (rc + 1 >= ${this.enableShapeUniforms?"outShape":this.outputShape[0]} ? 0. : getA(rc + 1)), 0, 0`:`getA(${e[0]}),\n            cEdge ? 0. : getA(${e[1]}),\n            rEdge ? 0. : getA(${e[2]}),\n            rEdge || cEdge ? 0. : getA(${e[3]})`}}
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */class lv{constructor(e,t){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.customUniforms=[{name:"inputShape",type:"ivec3"}],this.outputShape=e,this.enableShapeUniforms=Zg(this.outputShape.length);let n="";for(let e=0;e<4;e++){let t="thisRC = rc;";e%2==1&&(t+="thisRC.z += 1;"),1<e&&(t+="thisRC.y += 1;"),n+=`\n        ${t}\n        ${0<e?"if(thisRC.y < rows && thisRC.z < cols){":""}\n          int flatIndex = getFlatIndex(thisRC);\n\n          ivec3 inputRC = inputCoordsFromReshapedOutCoords(flatIndex);\n          vec2 inputRCInnerDims = vec2(float(inputRC.y),float(inputRC.z));\n\n          result[${e}] =\n            getChannel(getA(inputRC.x, inputRC.y, inputRC.z), inputRCInnerDims);\n        ${0<e?"}":""}\n      `}this.userCode=`\n      ${function(e,t){return`\n    ivec3 inputCoordsFromReshapedOutCoords(int index) {\n      ${t=t?function(e,t,n="index"){const r=function(e,t){var n=e.length,r=e.map(e=>t+`[${e}]`);const i=new Array(n-1);i[n-2]=r[n-1];for(let e=n-3;0<=e;--e)i[e]=`(${i[e+1]} * ${r[e+1]})`;return i}(e.map((e,t)=>t),t);return r.map((t,i)=>`int ${e[i]} = ${n} / `+r[i]+`; ${i===r.length-1?`int ${e[i+1]} = ${n} - ${e[i]} * `+r[i]:`index -= ${e[i]} * `+r[i]};`).join("")}(["r","c","d"],"inputShape"):Ig(["r","c","d"],e)}\n      return ivec3(r, c, d);\n    }\n  `
/**
 * @license
 * Copyright 2017 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */}(t,this.enableShapeUniforms)}\n      ${this.enableShapeUniforms?"\n  int getFlatIndex(ivec3 coords) {\n    return coords.x * outShapeStrides[0] + coords.y * outShapeStrides[1] + coords.z;\n  }\n":jg(e)}\n\n      void main() {\n        ivec3 rc = getOutputCoords();\n\n        vec4 result = vec4(0.);\n\n        ivec3 thisRC;\n        int rows = ${this.enableShapeUniforms?"outShape[1]":e[1]};\n        int cols = ${this.enableShapeUniforms?"outShape[2]":e[2]};\n\n        ${n}\n\n        setOutput(result);\n      }\n    `}}class hv{constructor(e){this.gpgpu=e,this.numUsedTextures=0,this.numFreeTextures=0,this._numBytesAllocated=0,this._numBytesFree=0,this.freeTextures={},this.logEnabled=!1,this.usedTextures={}}acquireTexture(e,t,n){var r=pv(e,t=dv(t,n),n);r in this.freeTextures||(this.freeTextures[r]=[]),r in this.usedTextures||(this.usedTextures[r]=[]),n=fv(e,t,this.gpgpu.gl,this.gpgpu.textureConfig,n);if(0<this.freeTextures[r].length){this.numFreeTextures--,this.numUsedTextures++,this._numBytesFree-=n,this.log();const e=this.freeTextures[r].shift();return this.usedTextures[r].push(e),e}let i;return t===eg.PACKED_2X2_FLOAT32?i=this.gpgpu.createPackedMatrixTexture(e[0],e[1]):t===eg.PACKED_2X2_FLOAT16?i=this.gpgpu.createFloat16PackedMatrixTexture(e[0],e[1]):t===eg.UNPACKED_FLOAT32?i=this.gpgpu.createFloat32MatrixTexture(e[0],e[1]):t===eg.UNPACKED_FLOAT16?i=this.gpgpu.createFloat16MatrixTexture(e[0],e[1]):t===eg.PACKED_4X1_UNSIGNED_BYTE&&(i=this.gpgpu.createUnsignedBytesMatrixTexture(e[0],e[1])),this.usedTextures[r].push(i),this.numUsedTextures++,this._numBytesAllocated+=n,this.log(),i}releaseTexture(e,t,n,r){if(null!=this.freeTextures){var i=pv(t,n=dv(n,r),r);t=(i in this.freeTextures||(this.freeTextures[i]=[]),fv(t,n,this.gpgpu.gl,this.gpgpu.textureConfig,r));-1!==(n=Object(f.hf)().get("WEBGL_DELETE_TEXTURE_THRESHOLD"))&&this._numBytesAllocated>n?(this.gpgpu.deleteMatrixTexture(e.texture),this._numBytesAllocated-=t):(this.freeTextures[i].push(e),this.numFreeTextures++,this._numBytesFree+=t),this.numUsedTextures--;const o=this.usedTextures[i];if((r=o.indexOf(e))<0)throw new Error("Cannot release a texture that was never provided by this texture manager");o.splice(r,1),this.log()}}log(){this.logEnabled&&(this.numFreeTextures,this.numUsedTextures,this._numBytesFree,this._numBytesAllocated)}get numBytesAllocated(){return this._numBytesAllocated}get numBytesFree(){return this._numBytesFree}getNumUsedTextures(){return this.numUsedTextures}getNumFreeTextures(){return this.numFreeTextures}dispose(){if(null!=this.freeTextures){for(const e in this.freeTextures)this.freeTextures[e].forEach(e=>{this.gpgpu.deleteMatrixTexture(e.texture)});for(const e in this.usedTextures)this.usedTextures[e].forEach(e=>{this.gpgpu.deleteMatrixTexture(e.texture)});this.freeTextures=null,this.usedTextures=null,this.numUsedTextures=0,this.numFreeTextures=0,this._numBytesAllocated=0,this._numBytesFree=0}}}function fv(e,t,n,r,i){let o;return t=function(e,t){switch(e){case eg.PACKED_2X2_FLOAT32:return hA(t);case eg.PACKED_2X2_FLOAT16:return fA(t);case eg.UNPACKED_FLOAT32:return uA(t);case eg.UNPACKED_FLOAT16:return cA(t);case eg.PACKED_4X1_UNSIGNED_BYTE:return lA(t);default:throw new Error("Unknown physical texture type "+e)}}(t,r),o=i?([r,i]=ug(e[0],e[1]),r*i):([r,i]=function(e,t){return[t,e]}(e[0],e[1]),r*i),o*(e=function(e,t){if(t===e.R32F)return 4;if(t===e.R16F)return 2;if(t===e.RGBA32F)return 16;if(t===e.RGBA)return 16;if(t===e.RGBA16F)return 8;if(t===e.RGBA8)return 4;throw new Error("Unknown internal format "+t)}(n,t))}function dv(e,t){if(e===Zm.UPLOAD)return eg.PACKED_2X2_FLOAT32;if(e===Zm.RENDER||null==e)return t=t,Object(f.hf)().getBool("WEBGL_RENDER_FLOAT32_ENABLED")?t?eg.PACKED_2X2_FLOAT32:eg.UNPACKED_FLOAT32:t?eg.PACKED_2X2_FLOAT16:eg.UNPACKED_FLOAT16;if(e===Zm.DOWNLOAD||e===Zm.PIXELS)return eg.PACKED_4X1_UNSIGNED_BYTE;throw new Error("Unknown logical texture type "+e)}function pv(e,t,n){return`${e[0]}_${e[1]}_${t}_`+n}
/**
 * @license
 * Copyright 2017 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */class mv{constructor(e,t){this.variableNames=["A"],this.outputShape=e,this.enableShapeUniforms=Zg(this.outputShape.length),this.userCode=`\n      float unaryOperation(float x) {\n        ${t}\n      }\n\n      void main() {\n        float x = getAAtOutCoords();\n        float y = unaryOperation(x);\n\n        setOutput(y);\n      }\n    `}}const gv="return abs(x);",Av="return x;";class vv{constructor(e,t){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=e,this.enableShapeUniforms=Zg(this.outputShape.length),this.userCode=`\n      vec4 unaryOperation(vec4 x) {\n        ${t}\n      }\n\n      void main() {\n        vec4 x = getAAtOutCoords();\n        vec4 y = unaryOperation(x);\n\n        setOutput(y);\n      }\n    `
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */}}class bv{constructor(e){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!1,this.outputShape=e,this.enableShapeUniforms=Zg(this.outputShape.length);const t=uv("rc",e=e.length);var n=Gg(e),r=function(e,t){if(1===e)return"rc";let n="";for(let r=0;r<e;r++)n+=t[r],r<e-1&&(n+=",");return n}(e,t);const i=t.slice(-2);e=e<=1?"rc":`vec2(${i.join(",")})`,this.userCode=`\n      void main() {\n        ${n} rc = getOutputCoords();\n        vec4 packedInput = getA(${r});\n\n        setOutput(getChannel(packedInput, ${e}));\n      }\n    `}}
/**
 * @license
 * Copyright 2017 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */const yv=f.Rf.whereImpl,wv={},xv=Object(f.hf)().getNumber("CPU_HANDOFF_SIZE_THRESHOLD");class Cv extends f.Fb{constructor(e){if(super(),this.pendingRead=new WeakMap,this.pendingDisposal=new WeakSet,this.dataRefCount=new WeakMap,this.numBytesInGPU=0,this.uploadWaitMs=0,this.downloadWaitMs=0,this.lastGlFlushTime=0,this.warnedAboutMemory=!1,this.pendingDeletes=0,this.disposed=!1,!Object(f.hf)().getBool("HAS_WEBGL"))throw new Error("WebGL is not supported on this device");let t;null!=e?(t=e instanceof dA?e:(e=ag(Object(f.hf)().getNumber("WEBGL_VERSION"),e),new dA(e)),this.binaryCache={},this.gpgpuCreatedLocally=!1):(e=ag(Object(f.hf)().getNumber("WEBGL_VERSION")),t=new dA(e),this.binaryCache=((e=Object(f.hf)().getNumber("WEBGL_VERSION"))in wv||(wv[e]={}),wv[e]),this.gpgpuCreatedLocally=!0),this.gpgpu=t,this.canvas=this.gpgpu.gl.canvas,this.textureManager=new hv(this.gpgpu),this.numMBBeforeWarning=null==Object(f.hf)().global.screen?1024:Object(f.hf)().global.screen.height*Object(f.hf)().global.screen.width*window.devicePixelRatio*600/1024/1024,this.texData=new f.S(this,Object(f.gf)())}nextDataId(){return Cv.nextDataId++}numDataIds(){return this.texData.numDataIds()-this.pendingDeletes}writeTexture(e,t,n,r,i,o){var a=this.makeTensorInfo(t,n);const s=this.texData.get(a.dataId);s.isPacked=!1,s.texture={texture:e,texShape:[r,i]},s.texShape=[r,i],e=xg(t),e=new oA(e,!1,o);const u=this.runWebGLProgram(e,[a],n,[[r,i]]);return u.shape=t,s.texture=null,this.disposeIntermediateTensorInfo(a),u.dataId}write(e,t,n){if((Object(f.hf)().getBool("WEBGL_CHECK_NUMERICAL_PROBLEMS")||Object(f.hf)().getBool("DEBUG"))&&this.checkNumericalProblems(e),"complex64"===n&&null!=e)throw new Error("Cannot write to a complex64 dtype. Please use tf.complex(real, imag).");var r={id:this.nextDataId()};return this.texData.set(r,{shape:t,dtype:n,values:e,usage:Zm.UPLOAD,refCount:1}),r}refCount(e){return this.texData.has(e)?this.texData.get(e).refCount:0}incRef(e){this.texData.get(e).refCount++}decRef(e){if(this.texData.has(e)){this.texData.get(e).refCount--}}move(e,t,n,r,i){if(Object(f.hf)().getBool("DEBUG")&&this.checkNumericalProblems(t),"complex64"===r)throw new Error("Cannot write to a complex64 dtype. Please use tf.complex(real, imag).");this.texData.set(e,{shape:n,dtype:r,values:t,usage:Zm.UPLOAD,refCount:i})}disposeIntermediateTensorInfo(e){this.disposeData(e.dataId)}readSync(e){var{values:t,dtype:n,complexTensorInfos:r,slice:i,shape:o,isPacked:a}=this.texData.get(e);if(null!=i){let t;return t=new(a?vv:mv)(o,Av),i=this.runWebGLProgram(t,[{dataId:e,shape:o,dtype:n}],n),a=this.readSync(i.dataId),this.disposeIntermediateTensorInfo(i),a}if(null!=t)return this.convertAndCacheOnCPU(e);if("string"===n)return t;let s,u;return(o=null!=this.activeTimers)&&(s=f.Ji.now()),u="complex64"===n?(i=this.readSync(r.real.dataId),a=this.readSync(r.imag.dataId),f.de.mergeRealAndImagArrays(i,a)):this.getValuesFromTexture(e),o&&(this.downloadWaitMs+=f.Ji.now()-s),this.convertAndCacheOnCPU(e,u)}async read(e){if(this.pendingRead.has(e)){const t=this.pendingRead.get(e);return new Promise(e=>t.push(e))}var{values:t,shape:n,slice:r,dtype:i,complexTensorInfos:o,isPacked:a}=this.texData.get(e);if(null!=r){let t;t=new(a?vv:mv)(n,Av);var r=this.runWebGLProgram(t,[{dataId:e,shape:n,dtype:i}],i),a=this.read(r.dataId);return this.disposeIntermediateTensorInfo(r),a}if(null!=t)return this.convertAndCacheOnCPU(e);if(Object(f.hf)().getBool("DEBUG")&&!Object(f.hf)().getBool("WEBGL_DOWNLOAD_FLOAT_ENABLED")&&2===Object(f.hf)().getNumber("WEBGL_VERSION"))throw new Error("tensor.data() with WEBGL_DOWNLOAD_FLOAT_ENABLED=false and WEBGL_VERSION=2 not yet supported.");let s,u,c=null;if("complex64"!==i&&Object(f.hf)().get("WEBGL_BUFFER_SUPPORTED")&&(s=this.decode(e),r=this.texData.get(s.dataId),c=this.gpgpu.createBufferFromTexture(r.texture.texture,...sg(n))),this.pendingRead.set(e,[]),"complex64"!==i&&await this.gpgpu.createAndWaitForFence(),u="complex64"===i?(t=(a=await Promise.all([this.read(o.real.dataId),this.read(o.imag.dataId)]))[0],r=a[1],f.de.mergeRealAndImagArrays(t,r)):null==c?this.getValuesFromTexture(e):(i=f.Ji.sizeFromShape(n),this.gpgpu.downloadFloat32MatrixFromBuffer(c,i)),null!=s&&this.disposeIntermediateTensorInfo(s),null!=c){const e=this.gpgpu.gl;lg(e,()=>e.deleteBuffer(c))}const l=this.convertAndCacheOnCPU(e,u),h=this.pendingRead.get(e);return this.pendingRead.delete(e),h.forEach(e=>e(l)),this.pendingDisposal.has(e)&&(this.pendingDisposal.delete(e),this.disposeData(e)&&Object(f.gf)().removeDataId(e,this),this.pendingDeletes--),l}readToGPU(e,t={}){var{values:n,shape:r,slice:i,dtype:o,isPacked:a,texture:s}=this.texData.get(e);if("complex64"===o)throw new Error("Does not support reading texture for complex64 dtype.");if(null!=i){let n;return n=new(a?vv:mv)(r,Av),i=this.runWebGLProgram(n,[{dataId:e,shape:r,dtype:o}],o),a=this.readToGPU(i,t),this.disposeIntermediateTensorInfo(i),a}if(null==s)throw null!=n?new Error("Data is not on GPU but on CPU."):new Error("There is no data on GPU or CPU.");return r=this.decode(e,t.customTexShape),o=Object(f.gf)().makeTensorFromTensorInfo(r),i=this.texData.get(r.dataId),Object.assign({tensorRef:o},i.texture)}bufferSync(e){const t=this.readSync(e.dataId);if("string"===e.dtype)try{var n=t.map(e=>f.Ji.decodeString(e));return Object(f.qe)(e.shape,e.dtype,n)}catch(e){throw new Error("Failed to decode encoded string bytes into utf-8")}return Object(f.qe)(e.shape,e.dtype,t)}checkNumericalProblems(e){var t;if(null!=e)for(let r=0;r<e.length;r++){var n=e[r];if(t=n,!(Object(f.hf)().getBool("WEBGL_RENDER_FLOAT32_ENABLED")||0===t||5.96e-8<Math.abs(t)&&Math.abs(t)<65504)){if(Object(f.hf)().getBool("WEBGL_RENDER_FLOAT32_CAPABLE"))throw Error(`The value ${n} cannot be represented with your current settings. Consider enabling float32 rendering: 'tf.env().set('WEBGL_RENDER_FLOAT32_ENABLED', true);'`);throw Error(`The value ${n} cannot be represented on this device.`)}}}getValuesFromTexture(e){var{shape:t,dtype:n,isPacked:r}=this.texData.get(e),i=f.Ji.sizeFromShape(t);if(Object(f.hf)().getBool("WEBGL_DOWNLOAD_FLOAT_ENABLED")){var o=this.decode(e);const n=this.texData.get(o.dataId),r=this.gpgpu.downloadMatrixFromPackedTexture(n.texture.texture,...sg(t)).subarray(0,i);return this.disposeIntermediateTensorInfo(o),r}r=(o=Object(f.hf)().getBool("WEBGL_PACK")&&!0===r)?xg(t):t,t=new(o?rA:nA)(r),o=this.runWebGLProgram(t,[{shape:r,dtype:n,dataId:e}],"float32");const a=this.texData.get(o.dataId),s=this.gpgpu.downloadByteEncodedFloatMatrixFromOutputTexture(a.texture.texture,a.texShape[0],a.texShape[1]).subarray(0,i);return this.disposeIntermediateTensorInfo(o),s}timerAvailable(){return 0<Object(f.hf)().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE")}time(e){var t=this.activeTimers,n=[];let r=!1;null==this.programTimersStack?(this.programTimersStack=n,r=!0):this.activeTimers.push(n),this.activeTimers=n,e();const i=f.Ji.flatten(this.activeTimers.map(e=>e.query)).filter(e=>null!=e),o=f.Ji.flatten(this.activeTimers.map(e=>e.name)).filter(e=>null!=e),a=(this.activeTimers=t,r&&(this.programTimersStack=null),{uploadWaitMs:this.uploadWaitMs,downloadWaitMs:this.downloadWaitMs,kernelMs:null,wallMs:null});return(async()=>{if(0<Object(f.hf)().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE")){const e=await Promise.all(i);a.kernelMs=f.Ji.sum(e),a.getExtraProfileInfo=()=>e.map((e,t)=>({name:o[t],ms:e})).map(e=>e.name+": "+e.ms).join(", ")}else a.kernelMs={error:"WebGL query timers are not supported in this environment."};return this.uploadWaitMs=0,this.downloadWaitMs=0,a})()}memory(){return{unreliable:!1,numBytesInGPU:this.numBytesInGPU,numBytesInGPUAllocated:this.textureManager.numBytesAllocated,numBytesInGPUFree:this.textureManager.numBytesFree}}startTimer(){return 0<Object(f.hf)().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE")?this.gpgpu.beginQuery():{startMs:f.Ji.now(),endMs:null}}endTimer(e){return 0<Object(f.hf)().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE")?this.gpgpu.endQuery():e.endMs=f.Ji.now(),e}async getQueryTime(e){return 0<Object(f.hf)().getNumber("WEBGL_DISJOINT_QUERY_TIMER_EXTENSION_RELIABLE")?this.gpgpu.waitForQueryAndGetTime(e):e.endMs-e.startMs}disposeData(e,t=!1){if(this.pendingDisposal.has(e))return!1;if(this.texData.has(e)){if(t?this.texData.get(e).refCount=0:this.texData.get(e).refCount--,!t&&0<this.texData.get(e).refCount)return!1;if(this.pendingRead.has(e))return this.pendingDisposal.add(e),this.pendingDeletes++,!1;this.releaseGPUData(e);var n=this.texData.get(e).complexTensorInfos;null!=n&&(this.disposeData(n.real.dataId,t),this.disposeData(n.imag.dataId,t)),this.texData.delete(e)}return!0}releaseGPUData(e){var{texture:t,dtype:n,texShape:r,usage:i,isPacked:o,slice:a}=this.texData.get(e),a=a&&a.origDataId||e,s=this.dataRefCount.get(a);1<s?this.dataRefCount.set(a,s-1):(this.dataRefCount.delete(a),null!=t&&(this.numBytesInGPU-=this.computeBytes(r,n),this.textureManager.releaseTexture(t,r,i,o)));const u=this.texData.get(e);u.texture=null,u.texShape=null,u.isPacked=!1,u.slice=null}getTexture(e){return this.uploadToGPU(e),this.texData.get(e).texture.texture}getDataInfo(e){return this.texData.get(e)}shouldExecuteOnCPU(e,t=xv){return Object(f.hf)().getBool("WEBGL_CPU_FORWARD")&&e.every(e=>null==this.texData.get(e.dataId).texture&&f.Ji.sizeFromShape(e.shape)<t)}getGPGPUContext(){return this.gpgpu}where(e){f.de.warn("tf.where() in webgl locks the UI thread. Call tf.whereAsync() instead");var t=e.dataSync();return yv(e.shape,t)}packedUnaryOp(e,t,n){return t=new vv(e.shape,t),t=this.compileAndRun(t,[e],n),Object(f.gf)().makeTensorFromTensorInfo(t)}abs(e){var t;return this.shouldExecuteOnCPU([e])&&"complex64"!==e.dtype?(t=qA(this.texData.get(e.dataId).values),this.makeOutput(e.shape,e.dtype,t)):Object(f.hf)().getBool("WEBGL_PACK_UNARY_OPERATIONS")?this.packedUnaryOp(e,gv,e.dtype):(t=new mv(e.shape,gv),t=this.compileAndRun(t,[e]),Object(f.gf)().makeTensorFromTensorInfo(t))}makeTensorInfo(e,t,n){let r;var i;return r="string"===t&&null!=n&&0<n.length&&f.Ji.isString(n[0])?(i=n.map(e=>f.Ji.encodeString(e)),this.write(i,e,t)):this.write(n,e,t),this.texData.get(r).usage=null,{dataId:r,shape:e,dtype:t}}makeOutput(e,t,n){return Object(f.gf)().makeTensorFromTensorInfo(this.makeTensorInfo(e,t,n),this)}unpackTensor(e){var t=new bv(e.shape);return this.runWebGLProgram(t,[e],e.dtype)}packTensor(e){var t=new cv(e.shape);return this.runWebGLProgram(t,[e],e.dtype,null,!0)}packedReshape(e,t){var n=[yg(e.shape),...wg(e.shape)],r={dtype:e.dtype,shape:n,dataId:e.dataId},i=[yg(t),...wg(t)];i=new lv(i,n);return{dataId:(i=this.runWebGLProgram(i,[r],e.dtype,[n],!0)).dataId,shape:t,dtype:i.dtype}}decode(e,t){var{isPacked:n,shape:r,dtype:i}=this.texData.get(e),o=(null!=t&&(o=f.Ji.sizeFromShape(r),s=t[0]*t[1]*4,f.Ji.assert(o<=s,()=>"customTexShape is too small. Row * Column * 4 should be equal or larger than the size of the tensor data.")),xg(r));let a;a=new(n?tA:eA)(o);var s=[null!=t?t:sg(o)];return{dtype:i,shape:r,dataId:this.runWebGLProgram(a,[{shape:o,dtype:i,dataId:e}],i,s,!0,t).dataId}}runWebGLProgram(e,t,n,r,i=!1,o){n=this.makeTensorInfo(e.outputShape,n);const a=this.texData.get(n.dataId);if(e.packedOutput&&(a.isPacked=!0),e.outPackingScheme===Jm.DENSE){const t=null!=o?o:sg(e.outputShape);a.texShape=t.map(e=>2*e)}if(null!=e.outTexUsage&&(a.usage=e.outTexUsage),0===f.Ji.sizeFromShape(n.shape))return a.values=f.Ji.getTypedArrayFromDType(n.dtype,0),n;const s=[],u=t.map(t=>{if("complex64"===t.dtype)throw new Error("GPGPUProgram does not support complex64 input. For complex64 dtypes, please separate the program into real and imaginary parts.");let n=this.texData.get(t.dataId);if(null==n.texture){if(!e.packedInputs&&f.Ji.sizeFromShape(t.shape)<=Object(f.hf)().getNumber("WEBGL_SIZE_UPLOAD_UNIFORM"))return{shape:t.shape,texData:null,isUniform:!0,uniformValues:n.values};e.packedInputs&&(n.isPacked=!0,n.shape=t.shape)}if(this.uploadToGPU(t.dataId),!!n.isPacked!=!!e.packedInputs)t=n.isPacked?this.unpackTensor(t):this.packTensor(t),s.push(t),n=this.texData.get(t.dataId);else if(n.isPacked&&!Cg(n.shape,t.shape)){const e=t;var r=t.shape;t.shape=n.shape,t=this.packedReshape(t,r),s.push(t),n=this.texData.get(t.dataId),e.shape=r}return{shape:t.shape,texData:n,isUniform:!1}}),c=(this.uploadToGPU(n.dataId),{shape:n.shape,texData:a,isUniform:!1});let l;if(o=function(e,t,n){let r="";t.concat(n).forEach(t=>{var i=null!=t.texData&&null!=t.texData.slice&&0<t.texData.slice.flatOffset;if(e.enableShapeUniforms&&!t.isUniform){var o=t.texData.texShape,{useSqueezeShape:a,uniformShape:s,keptDims:u}=Wg(e.packedInputs,t.shape,o);let m="",g="",A="";1===s.length&&e.packedInputs?m=(1<(c=[Math.ceil(o[0]/2),Math.ceil(o[1]/2)])[0])+"_"+(1<c[1]):2!==s.length||e.packedInputs?2<s.length&&!e.packedInputs&&(A=((c=f.Ji.computeStrides(s))[0]===o[1])+"_"+(c[c.length-1]===o[1])):g=(1<s[0])+"_"+(1<s[1]);var c=t.shape.length,l=2===s.length&&f.Ji.arraysEqual(t.shape,o),h=1===f.Ji.sizeFromShape(t.shape),d=f.de.getBroadcastDims(t.shape,n.shape),p=!e.packedInputs&&c===n.shape.length&&f.Ji.arraysEqual(o,n.texData.texShape);o=e.packedInputs||2<s.length?"":(1<o[0])+"_"+(1<o[1]);r+=`${c}_${p}_${a?u:""}_${s.length}_${h}_${d}_${l}_${m}_${g}_${A}_${o}_`+i}else c=t.isUniform?"uniform":t.texData.texShape,r+=t.shape+`_${c}_`+i});t=e.userCode;return e.constructor.name+"_"+r+"_"+t+Object(f.hf)().getNumber("WEBGL_VERSION")}(e,u,c),t=this.getAndSaveBinary(o,()=>function(e,t,n,r){const i=n.map((e,n)=>{const r={logicalShape:e.shape,texShape:e.isUniform?null:e.texData.texShape,isUniform:e.isUniform,isPacked:!e.isUniform&&e.texData.isPacked,flatOffset:null};return null!=e.texData&&null!=e.texData.slice&&0<e.texData.slice.flatOffset&&(r.flatOffset=e.texData.slice.flatOffset),{name:t.variableNames[n],shapeInfo:r}});n=i.map(e=>e.shapeInfo);var o=Rg(i,r={logicalShape:r.shape,texShape:r.texData.texShape,isUniform:!1,isPacked:r.texData.isPacked,flatOffset:null},t),a=function(e,t){const n=bg(e,()=>e.createShader(e.FRAGMENT_SHADER),"Unable to create fragment WebGLShader.");if(lg(e,()=>e.shaderSource(n,t)),lg(e,()=>e.compileShader(n)),Object(f.hf)().get("ENGINE_COMPILE_ONLY")||!1!==e.getShaderParameter(n,e.COMPILE_STATUS))return n;throw dg(t,e.getShaderInfoLog(n)),new Error("Failed to compile fragment shader.")}(e.gl,o),s=e.createProgram(a);return Object(f.hf)().get("ENGINE_COMPILE_ONLY")?{program:t,fragmentShader:a,source:o,webGLProgram:s,inShapeInfos:n,outShapeInfo:r,uniformLocations:null,customUniformLocations:null,infLoc:null,nanLoc:null,inShapesLocations:null,inTexShapesLocations:null,outShapeLocation:null,outShapeStridesLocation:null,outTexShapeLocation:null}:Object.assign({program:t,fragmentShader:a,source:o,webGLProgram:s,inShapeInfos:n,outShapeInfo:r},Xg(e,t,s))}(this.gpgpu,e,u,c)),(o=null!=this.activeTimers)&&(l=this.startTimer()),!Object(f.hf)().get("ENGINE_COMPILE_ONLY")){var h=this.gpgpu,d=t,p=(t=u,c),m=r,g=(r=(d.program.enableShapeUniforms||(Jg(d.inShapeInfos,t),Jg([d.outShapeInfo],[p])),p.texData.texture),p.texData.texShape),A=(p.texData.isPacked?h.setOutputPackedMatrixTexture(r.texture,g[0],g[1]):h.setOutputMatrixTexture(r.texture,g[0],g[1]),h.setProgram(d.webGLProgram),1===Object(f.hf)().getNumber("WEBGL_VERSION")&&null!==d.infLoc&&h.gl.uniform1f(d.infLoc,1/0),null!==d.nanLoc&&h.gl.uniform1f(d.nanLoc,NaN),t.forEach((e,t)=>{var n=d.program.variableNames[t],r=d.uniformLocations[n],i=d.uniformLocations["offset"+n],o=d.inShapesLocations[n+"Shape"];n=d.inTexShapesLocations[n+"TexShape"];if(o){var a=Wg(d.program.packedInputs,e.shape,e.texData.texShape).uniformShape;switch(a.length){case 1:h.gl.uniform1iv(o,new Int32Array(a));break;case 2:h.gl.uniform2iv(o,new Int32Array(a));break;case 3:h.gl.uniform3iv(o,new Int32Array(a));break;case 4:h.gl.uniform4iv(o,new Int32Array(a))}}if(n&&h.gl.uniform2i(n,e.texData.texShape[0],e.texData.texShape[1]),null!=r)if(e.isUniform)if(f.Ji.sizeFromShape(e.shape)<2)h.gl.uniform1f(r,e.uniformValues[0]);else{let t=e.uniformValues;t instanceof Float32Array||(t=new Float32Array(t)),h.gl.uniform1fv(r,t)}else null!=e.texData.slice&&null!=i&&h.gl.uniform1i(i,e.texData.slice.flatOffset),h.setInputMatrixTexture(e.texData.texture.texture,r,t)}),d.outShapeLocation);if(A)switch(p.shape.length){case 1:h.gl.uniform1iv(A,new Int32Array(p.shape));break;case 2:h.gl.uniform2iv(A,new Int32Array(p.shape));break;case 3:h.gl.uniform3iv(A,new Int32Array(p.shape));break;case 4:h.gl.uniform4iv(A,new Int32Array(p.shape))}if(d.outShapeStridesLocation){var v=f.Ji.computeStrides(p.shape);switch(p.shape.length){case 2:h.gl.uniform1iv(d.outShapeStridesLocation,new Int32Array(v));break;case 3:h.gl.uniform2iv(d.outShapeStridesLocation,new Int32Array(v));break;case 4:h.gl.uniform3iv(d.outShapeStridesLocation,new Int32Array(v))}}d.outTexShapeLocation&&h.gl.uniform2i(d.outTexShapeLocation,p.texData.texShape[0],p.texData.texShape[1]),d.program.customUniforms&&m&&d.program.customUniforms.forEach((e,t)=>{var n=d.customUniformLocations[t];t=m[t];if("float"===e.type)h.gl.uniform1fv(n,t);else if("vec2"===e.type)h.gl.uniform2fv(n,t);else if("vec3"===e.type)h.gl.uniform3fv(n,t);else if("vec4"===e.type)h.gl.uniform4fv(n,t);else if("int"===e.type)h.gl.uniform1iv(n,t);else if("ivec2"===e.type)h.gl.uniform2iv(n,t);else if("ivec3"===e.type)h.gl.uniform3iv(n,t);else{if("ivec4"!==e.type)throw Error(`uniform type ${e.type} is not supported yet.`);h.gl.uniform4iv(n,t)}}),h.executeProgram()}return s.forEach(e=>this.disposeIntermediateTensorInfo(e)),o&&(l=this.endTimer(l),this.activeTimers.push({name:e.constructor.name,query:this.getQueryTime(l)})),0<(r=Object(f.hf)().get("WEBGL_FLUSH_THRESHOLD"))&&(g=f.Ji.now())-this.lastGlFlushTime>r&&(this.gpgpu.gl.flush(),this.lastGlFlushTime=g),!Object(f.hf)().getBool("WEBGL_LAZILY_UNPACK")&&a.isPacked&&!1===i?(t=this.unpackTensor(n),this.disposeIntermediateTensorInfo(n),t):n}compileAndRun(e,t,n,r,i=!1){return n=n||t[0].dtype,this.runWebGLProgram(e,t,n,r,i)}getAndSaveBinary(e,t){return e in this.binaryCache||(this.binaryCache[e]=t()),this.binaryCache[e]}getTextureManager(){return this.textureManager}dispose(){if(!this.disposed){if(!Object(f.hf)().getBool("IS_TEST")){Object.keys(this.binaryCache).forEach(e=>{this.gpgpu.deleteProgram(this.binaryCache[e].webGLProgram),delete this.binaryCache[e]})}this.textureManager.dispose(),null!=this.canvas&&"undefined"!=typeof HTMLCanvasElement&&this.canvas instanceof HTMLCanvasElement?this.canvas.remove():this.canvas=null,this.gpgpuCreatedLocally&&(this.gpgpu.program=null,this.gpgpu.dispose()),this.disposed=!0}}floatPrecision(){return null==this.floatPrecisionValue&&(this.floatPrecisionValue=Object(f.vi)(()=>{if(!Object(f.hf)().get("WEBGL_RENDER_FLOAT32_ENABLED")){var e=Object(f.hf)().getBool("DEBUG"),t=(Object(f.hf)().set("DEBUG",!1),this.abs(Object(f.xh)(1e-8)).dataSync()[0]);if(Object(f.hf)().set("DEBUG",e),0<t)return 32}return 16})),this.floatPrecisionValue}epsilon(){return 32===this.floatPrecision()?1e-7:1e-4}uploadToGPU(e){const t=this.texData.get(e);var{shape:e,dtype:n,values:r,texture:i,usage:o,isPacked:a}=t;if(null==i){let c,l=((i=null!=this.activeTimers)&&(c=f.Ji.now()),t.texShape);if(null==l&&(l=function(e,t=!1){let n=Object(f.hf)().getNumber("WEBGL_MAX_TEXTURE_SIZE"),r=Object(f.hf)().getNumber("WEBGL_MAX_SIZE_FOR_NARROW_TEXTURE"),i=(r===1/0&&Object(f.hf)().getBool("WEBGL_AUTO_SQUARIFY_NARROW_TEXTURE_SHAPE")&&(r=n/2),t&&(n*=2,r*=2,1===(e=e.map((t,n)=>n>=e.length-2?f.Ji.nearestLargerEven(e[n]):e[n])).length&&(e=[2,e[0]])),2!==e.length&&(a=f.Ji.squeezeShape(e),e=a.newShape),f.Ji.sizeFromShape(e)),o=null;e.length<=1&&i<=n?o=[1,i]:2===e.length&&e[0]<=n&&e[1]<=n?o=e:3===e.length&&e[0]*e[1]<=n&&e[2]<=n?o=[e[0]*e[1],e[2]]:3===e.length&&e[0]<=n&&e[1]*e[2]<=n?o=[e[0],e[1]*e[2]]:4===e.length&&e[0]*e[1]*e[2]<=n&&e[3]<=n?o=[e[0]*e[1]*e[2],e[3]]:4===e.length&&e[0]<=n&&e[1]*e[2]*e[3]<=n&&(o=[e[0],e[1]*e[2]*e[3]]);var a=null!=o&&Math.max(...o)>r&&Math.min(...o)<=(t?2:1)&&0<Math.min(...o);if(null==o||a)if(t){a=yg(e);let t=2,n=2;e.length&&([t,n]=wg(e)),i=a*(t/2)*(n/2),o=f.Ji.sizeToSquarishShape(i).map(e=>2*e)}else o=f.Ji.sizeToSquarishShape(i);return o}(e,a),t.texShape=l),null!=r){e=xg(e);let o,h=l[1],d=l[0];var s=r instanceof Uint8Array||r instanceof Uint8ClampedArray,u=(e=(!a&&s||([h,d]=ug(l[0],l[1])),o=new(a?aA:oA)(e,s),s?[d,h]:l),this.makeTensorInfo(e,n));const p=this.texData.get(u.dataId);p.usage=s?Zm.PIXELS:Zm.UPLOAD,p.texShape=e,this.gpgpu.uploadDenseMatrixToTexture(this.getTexture(u.dataId),h,d,r),s=[[d,h]],e=this.runWebGLProgram(o,[u],n,s,!0),r=this.texData.get(e.dataId),t.texShape=r.texShape,t.isPacked=r.isPacked,t.usage=r.usage,Object(f.hf)().get("ENGINE_COMPILE_ONLY")?this.disposeData(e.dataId):(t.texture=r.texture,t.values=null,this.texData.delete(e.dataId)),this.disposeIntermediateTensorInfo(u),i&&(this.uploadWaitMs+=f.Ji.now()-c)}else s=this.acquireTexture(l,o,n,a),t.texture=s}}convertAndCacheOnCPU(e,t){const n=this.texData.get(e);return e=n.dtype,null!=t&&(n.values=function(e,t){if("float32"===t||"complex64"===t)return e;if("int32"!==t&&"bool"!==t)throw new Error("Unknown dtype "+t);{const n=new("int32"===t?Int32Array:Uint8Array)(e.length);for(let t=0;t<n.length;++t)n[t]=Math.round(e[t]);return n}}
/** @license See the LICENSE file. */(t,e)),n.values}acquireTexture(e,t,n,r){return this.numBytesInGPU+=this.computeBytes(e,n),!this.warnedAboutMemory&&this.numBytesInGPU>1024*this.numMBBeforeWarning*1024&&((this.numBytesInGPU/1024/1024).toFixed(2),this.warnedAboutMemory=!0),this.textureManager.acquireTexture(e,t,r)}computeBytes(e,t){return e[0]*e[1]*f.Ji.bytesPerElement(t)}checkCompileCompletion(){for(var[,e]of Object.entries(this.binaryCache))this.checkCompletion_(e)}async checkCompileCompletionAsync(){const e=[];if(this.gpgpu.parallelCompilationExtension)for(var[,t]of Object.entries(this.binaryCache))e.push(this.checkCompletionAsync_(t));else for(const[,t]of Object.entries(this.binaryCache)){var n=new Promise(e=>{try{this.checkCompletion_(t),e(!0)}catch(e){throw e}});e.push(n)}return Promise.all(e)}async checkCompletionAsync_(e){return this.gpgpu.gl.getProgramParameter(e.webGLProgram,this.gpgpu.parallelCompilationExtension.COMPLETION_STATUS_KHR)?this.checkCompletion_(e):(await Object(f.Dg)(),this.checkCompletionAsync_(e))}checkCompletion_(e){if(!1!==this.gpgpu.gl.getProgramParameter(e.webGLProgram,this.gpgpu.gl.LINK_STATUS))return!0;if(!1===this.gpgpu.gl.getShaderParameter(e.fragmentShader,this.gpgpu.gl.COMPILE_STATUS))throw dg(e.source,this.gpgpu.gl.getShaderInfoLog(e.fragmentShader)),new Error("Failed to compile fragment shader.");throw new Error("Failed to link vertex and fragment shaders.")}getUniformLocations(){for(var[,e]of Object.entries(this.binaryCache)){var{uniformLocations:t,customUniformLocations:n,infLoc:r,nanLoc:i,inShapesLocations:o,inTexShapesLocations:a,outShapeLocation:s,outShapeStridesLocation:u,outTexShapeLocation:c}=Xg(this.gpgpu,e.program,e.webGLProgram);e.uniformLocations=t,e.customUniformLocations=n,e.infLoc=r,e.nanLoc=i,e.inShapesLocations=o,e.inTexShapesLocations=a,e.outShapeLocation=s,e.outShapeStridesLocation=u,e.outTexShapeLocation=c}}createTensorFromTexture(e,t,n){var{texture:e,height:r,width:i,channels:o}=e;const a=Object(f.gf)().backend;if(a.gpgpu.gl.isTexture(e))return e=a.writeTexture(e,t,n,r,i,o),Object(f.gf)().makeTensorFromDataId(e,t,n,a);throw new Error("The texture is invalid. Also, please make sure the texture and the TFJS WebGL backend are using the same canvas. If you want to use your own custom canvas, you have to create and use the custom TFJS WebGL backend created from the canvas through 'new tf.MathBackendWebGL(customCanvas)'.")}}Cv.nextDataId=0,
/**
 * @license
 * Copyright 2020 Google Inc. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
f.Re.isBrowser()&&Object(f.ih)("webgl",()=>new Cv,2);class kv{constructor(e,t,n){this.variableNames=["A","B"],this.outputShape=f.de.assertAndGetBroadcastShape(t,n),this.enableShapeUniforms=Zg(this.outputShape.length),this.userCode=`\n      float binaryOperation(float a, float b) {\n        ${e}\n      }\n\n      void main() {\n        float a = getAAtOutCoords();\n        float b = getBAtOutCoords();\n        setOutput(binaryOperation(a, b));\n      }\n    `
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */}}class Ev{constructor(e,t,n,r=!1){this.variableNames=["A","B"],this.supportsBroadcasting=!0,this.packedInputs=!0,this.packedOutput=!0,this.outputShape=f.de.assertAndGetBroadcastShape(t,n),t=this.outputShape.length,this.enableShapeUniforms=Zg(t);let i="";r&&(0===t||1===f.Ji.sizeFromShape(this.outputShape)?i="\n          result.y = 0.;\n          result.z = 0.;\n          result.w = 0.;\n        ":(i=`\n          ${n=Gg(t)} coords = getOutputCoords();\n        `,1===t?this.enableShapeUniforms?i+="\n            result.y = (coords + 1) >= outShape ? 0. : result.y;\n            result.z = 0.;\n            result.w = 0.;\n          ":i+=`\n            result.y = (coords + 1) >= ${this.outputShape[0]} ? 0. : result.y;\n            result.z = 0.;\n            result.w = 0.;\n          `:(r=uv("coords",t),this.enableShapeUniforms?i+=`\n            bool nextRowOutOfBounds =\n              (${r[t-2]} + 1) >= outShape[${t} - 2];\n            bool nextColOutOfBounds =\n              (${r[t-1]} + 1) >= outShape[${t} - 1];\n            result.y = nextColOutOfBounds ? 0. : result.y;\n            result.z = nextRowOutOfBounds ? 0. : result.z;\n            result.w = nextColOutOfBounds || nextRowOutOfBounds ? 0. : result.w;\n          `:i+=`\n            bool nextRowOutOfBounds =\n              (${r[t-2]} + 1) >= ${this.outputShape[t-2]};\n            bool nextColOutOfBounds =\n              (${r[t-1]} + 1) >= ${this.outputShape[t-1]};\n            result.y = nextColOutOfBounds ? 0. : result.y;\n            result.z = nextRowOutOfBounds ? 0. : result.z;\n            result.w = nextColOutOfBounds || nextRowOutOfBounds ? 0. : result.w;\n          `))),this.userCode=`\n      vec4 binaryOperation(vec4 a, vec4 b) {\n        ${e}\n      }\n\n      void main() {\n        vec4 a = getAAtOutCoords();\n        vec4 b = getBAtOutCoords();\n\n        vec4 result = binaryOperation(a, b);\n        ${i}\n\n        setOutput(result);\n      }\n    `}}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function Sv(e){const{inputs:t,backend:n}=e;return e=t.x,n.incRef(e.dataId),{dataId:e.dataId,shape:e.shape,dtype:e.dtype}}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function _v(e){const{inputs:t,backend:n}=e;var{real:e,imag:r}=t,i=n.makeTensorInfo(e.shape,"complex64");const o=n.texData.get(i.dataId);return e=Sv({inputs:{x:e},backend:n}),r=Sv({inputs:{x:r},backend:n}),o.complexTensorInfos={real:e,imag:r},i}ae={kernelName:f.Ab,backendName:"webgl",kernelFunc:Sv},L={kernelName:f.E,backendName:"webgl",kernelFunc:_v};
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
const Ov="return (a < 0.) ? b * a : a;",Tv="\n  vec4 aLessThanZero = vec4(lessThan(a, vec4(0.)));\n  return (aLessThanZero * (b * a)) + ((vec4(1.0) - aLessThanZero) * a);\n";se={kernelName:f.Ib,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;e=t.x;var i=r.alpha,o=(i=n.makeTensorInfo([],"float32",f.Ji.createScalarValue(i,"float32")),Object(f.hf)().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new Ev(Tv,e.shape,i.shape):new kv(Ov,e.shape,i.shape));o=n.runWebGLProgram(o,[e,i],"float32");return n.disposeIntermediateTensorInfo(i),o}};
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
const Dv="return (a < 0.) ? b * a : a;",Bv="\n  vec4 aLessThanZero = vec4(lessThan(a, vec4(0.)));\n  return (aLessThanZero * (b * a)) + ((vec4(1.0) - aLessThanZero) * a);\n";
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function Iv({opSnippet:e,packedOpSnippet:t,cpuKernelImpl:n,dtype:r}){return({inputs:i,backend:o})=>{i=i.x;const a=o;if(o=r||i.dtype,a.shouldExecuteOnCPU([i])&&null!=n)return s=a.texData.get(i.dataId),s=n(s.values,o),a.makeTensorInfo(i.shape,o,s);var s=Object(f.hf)().getBool("WEBGL_PACK_UNARY_OPERATIONS")&&null!=t;let u;return u=s?new vv(i.shape,t):new mv(i.shape,e),a.runWebGLProgram(u,[i],o)}}function Mv({opSnippet:e,packedOpSnippet:t,checkOutOfBounds:n=!1,supportsComplex:r=!1,cpuKernelImpl:i,dtype:o}){return({inputs:a,backend:s})=>{const{a:u,b:c}=a,l=s;if(r&&"complex64"===u.dtype){const t=l.texData.get(u.dataId),n=l.texData.get(c.dataId);var[a,s]=[[t.complexTensorInfos.real,n.complexTensorInfos.real],[t.complexTensorInfos.imag,n.complexTensorInfos.imag]].map(t=>{var[t,n]=t,r={dataId:t.dataId,dtype:t.dtype,shape:u.shape},i={dataId:n.dataId,dtype:n.dtype,shape:c.shape},o=new kv(e,u.shape,c.shape);return l.runWebGLProgram(o,[r,i],Object(f.Hi)(t.dtype,n.dtype))}),h=_v({inputs:{real:a,imag:s},backend:l});return l.disposeIntermediateTensorInfo(a),l.disposeIntermediateTensorInfo(s),h}if(a=o||Object(f.Hi)(u.dtype,c.dtype),("string"===u.dtype||"string"===c.dtype||l.shouldExecuteOnCPU([u,c]))&&null!=i){s=l.texData.get(u.dataId).values,h=l.texData.get(c.dataId).values,s="string"===u.dtype?f.de.fromUint8ToStringArray(s):s,h="string"===u.dtype?f.de.fromUint8ToStringArray(h):h;var[s,h]=i(u.shape,c.shape,s,h,a);h=l.makeTensorInfo(h,a);return l.texData.get(h.dataId).values=s,h}let d;return d=(s=Object(f.hf)().getBool("WEBGL_PACK_BINARY_OPERATIONS")&&null!=t)?new Ev(t,u.shape,c.shape,n):new kv(e,u.shape,c.shape),l.runWebGLProgram(d,[u,c],a)}}function jv(e,t=!1){if("linear"===e)return"return x;";if("relu"===e)return t?"\n  vec4 result = x * vec4(greaterThanEqual(x, vec4(0.0)));\n  bvec4 isNaN = isnan(x);\n\n  result.r = isNaN.r ? x.r : result.r;\n  result.g = isNaN.g ? x.g : result.g;\n  result.b = isNaN.b ? x.b : result.b;\n  result.a = isNaN.a ? x.a : result.a;\n\n  return result;\n":"if (isnan(x)) return x;\n  return (x < 0.0) ? 0.0 : x;\n";if("elu"===e)return t?"\n  vec4 result;\n\n  result.r = (x.r >= 0.0) ? x.r : (exp(x.r) - 1.0);\n  result.g = (x.g >= 0.0) ? x.g : (exp(x.g) - 1.0);\n  result.b = (x.b >= 0.0) ? x.b : (exp(x.b) - 1.0);\n  result.a = (x.a >= 0.0) ? x.a : (exp(x.a) - 1.0);\n\n  return result;\n":"return (x >= 0.0) ? x : (exp(x) - 1.0);";if("relu6"===e)return t?"\n  vec4 result = min(x, vec4(6.)) * vec4(greaterThanEqual(x, vec4(0.0)));\n  bvec4 isNaN = isnan(x);\n\n  result.r = isNaN.r ? x.r : result.r;\n  result.g = isNaN.g ? x.g : result.g;\n  result.b = isNaN.b ? x.b : result.b;\n  result.a = isNaN.a ? x.a : result.a;\n\n  return result;\n":"if (isnan(x)) return x;\n  return (x < 0.0) ? 0.0 : min(6.0, x);\n";if("prelu"===e)return t?Bv:Dv;if("leakyrelu"===e)return t?Tv:Ov;if("sigmoid"===e)return"return 1.0 / (1.0 + exp(-1.0 * x));";throw new Error(`Activation ${e} has not been implemented for the WebGL backend.`)}
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */pe={kernelName:f.xc,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n}=e;var{x:e,alpha:r}=t,i=Object(f.hf)().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new Ev(Bv,e.shape,r.shape):new kv(Dv,e.shape,r.shape);return n.runWebGLProgram(i,[e,r],"float32")}};class Nv{constructor(e,t,n,r=!1,i=!1,o=!1,a=null,s=!1,u=!1){this.variableNames=["matrixA","matrixB"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=n,this.enableShapeUniforms=Zg(this.outputShape.length);n=r?e[1]:e[2],n=Math.ceil(n/2);var c=r?"i * 2, rc.y":"rc.y, i * 2",l=i?"rc.z, i * 2":"i * 2, rc.z";r=r?["a.xxyy","a.zzww"]:["a.xxzz","a.yyww"],i=i?["b.xzxz","b.ywyw"]:["b.xyxy","b.zwzw"];let h="",f="";a&&(h=s?`vec4 activation(vec4 a) {\n          vec4 b = getPreluActivationWeightsAtOutCoords();\n          ${a}\n        }`:u?`vec4 activation(vec4 a) {\n          vec4 b = getLeakyreluAlphaAtOutCoords();\n          ${a}\n        }`:`vec4 activation(vec4 x) {\n          ${a}\n        }`,f="result = activation(result);"),a=o?"result += getBiasAtOutCoords();":"",o&&this.variableNames.push("bias"),s&&this.variableNames.push("preluActivationWeights"),u&&this.variableNames.push("leakyreluAlpha");let d="rc.x",p="rc.x";e[0]<t[0]?d=`int(min(float(rc.x), ${e[0]-1}.))`:t[0]<e[0]&&(p=`int(min(float(rc.x), ${t[0]-1}.))`),this.userCode=`\n      ${h}\n      // Don't use uniform for sharedDimensionPacked for performance.\n      const float sharedDimension = ${n}.0;\n\n      vec4 dot2x2ARowBCol(ivec3 rc) {\n        vec4 result = vec4(0);\n        for (int i = 0; i < ${n}; i++) {\n          int batchA = ${d};\n          int batchB = ${p};\n          vec4 a = getMatrixA(batchA, ${c});\n          vec4 b = getMatrixB(batchB, ${l});\n\n          // These swizzled products need to be separately added.\n          // See: https://github.com/tensorflow/tfjs/issues/1735\n          result += (${r[0]} * ${i[0]});\n          result += (${r[1]} * ${i[1]});\n        }\n        return result;\n      }\n\n      void main() {\n        ivec3 rc = getOutputCoords();\n        vec4 result = dot2x2ARowBCol(rc);\n\n        ${a}\n\n        ${f}\n\n        setOutput(result);\n      }\n    `}}
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */const Fv="return areal * breal - aimag * bimag;",Rv="return areal * bimag + aimag * breal;";class Pv{constructor(e,t,n){this.variableNames=["AReal","AImag","BReal","BImag"],this.outputShape=f.de.assertAndGetBroadcastShape(t,n),this.userCode=`\n      float binaryOpComplex(\n          float areal, float aimag, float breal, float bimag) {\n        ${e}\n      }\n\n      void main() {\n        float areal = getARealAtOutCoords();\n        float aimag = getAImagAtOutCoords();\n        float breal = getBRealAtOutCoords();\n        float bimag = getBImagAtOutCoords();\n        setOutput(binaryOpComplex(areal, aimag, breal, bimag));\n      }\n    `
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */}}function Lv(e){const{inputs:t,backend:n}=e;var{a:e,b:r}=t,i=f.de.upcastType(e.dtype,r.dtype);if("complex64"===e.dtype){var o=n.texData.get(e.dataId),a=n.texData.get(r.dataId),s=new Pv(Fv,e.shape,r.shape),u=new Pv(Rv,e.shape,r.shape);const t=[{dataId:o.complexTensorInfos.real.dataId,dtype:o.complexTensorInfos.real.dtype,shape:e.shape},{dataId:o.complexTensorInfos.imag.dataId,dtype:o.complexTensorInfos.imag.dtype,shape:e.shape},{dataId:a.complexTensorInfos.real.dataId,dtype:a.complexTensorInfos.real.dtype,shape:r.shape},{dataId:a.complexTensorInfos.imag.dataId,dtype:a.complexTensorInfos.imag.dtype,shape:r.shape}];return s=_v({inputs:{real:o=n.runWebGLProgram(s,t,"float32"),imag:a=n.runWebGLProgram(u,t,"float32")},backend:n}),n.disposeIntermediateTensorInfo(o),n.disposeIntermediateTensorInfo(a),s}if(n.shouldExecuteOnCPU([e,r])){u=n.texData.get(e.dataId),o=n.texData.get(r.dataId);var[a,s]=NA(e.shape,r.shape,u.values,o.values,i);u=n.makeTensorInfo(s,i);return n.texData.get(u.dataId).values=a,u}let c;return c=new(Object(f.hf)().getBool("WEBGL_PACK_BINARY_OPERATIONS")?Ev:kv)("return a * b;",e.shape,r.shape),n.runWebGLProgram(c,[e,r],i)}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function Uv(e){var{inputs:e,backend:t,attrs:n}=e;const r=e.x;e=n.shape;const i=t,o=f.Ji.sizeFromShape(r.shape),a=f.Ji.inferFromImplicitShape(e,o),s=f.Ji.sizeFromShape(a);var u,c,l,n;return f.Ji.assert(o===s,()=>`The new shape (${a}) has ${s} elements and the old shape (${r.shape}) has ${o} elements. The new shape and old shape must have the same number of elements.`),!(n=i.texData.get(r.dataId)).isPacked||Cg(r.shape,a)||null!==n.texture&&Cg(n.shape,a)?(i.incRef(r.dataId),{dataId:r.dataId,shape:a,dtype:r.dtype}):(e=a,n=i,u=[yg((t=r).shape),...wg(t.shape)],c={dtype:t.dtype,shape:u,dataId:t.dataId},l=[yg(e),...wg(e)],l=new lv(l,u),{dataId:(n=n.runWebGLProgram(l,[c],t.dtype,[u],!0)).dataId,shape:e,dtype:n.dtype})}fe={kernelName:f.ic,backendName:"webgl",kernelFunc:Lv},Ae={kernelName:f.Lc,backendName:"webgl",kernelFunc:Uv};
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
class zv{constructor(e,t){this.variableNames=["x"];var{windowSize:e,batchSize:n,inSize:r,outSize:i}=e,n=(this.outputShape=[n,i],4*Math.floor(e/4)),i=e%4;let o="sumValue += dot(values, ones);";if(null!=t){const e=1/t;o=`sumValue += dot(values * ${f.Ji.isInt(e)?e.toPrecision(2):e}, ones);`}let a=0<r%e?`\n        if (inIdx < 0 || inIdx >= ${r}) {\n          return 0.0;\n        }\n      `:"";this.userCode=`\n      const vec4 ones = vec4(1.0, 1.0, 1.0, 1.0);\n\n      float getValue(int batch, int inIdx) {\n        ${a}\n        return getX(batch, inIdx);\n      }\n\n      void main() {\n        ivec2 coords = getOutputCoords();\n        int batch = coords[0];\n        int outIdx = coords[1];\n        int inOffset = outIdx * ${e};\n\n        float sumValue = 0.0;\n\n        for (int i = 0; i < ${n}; i += 4) {\n          int inIdx = inOffset + i;\n          vec4 values = vec4(\n            getValue(batch, inIdx),\n            getValue(batch, inIdx + 1),\n            getValue(batch, inIdx + 2),\n            getValue(batch, inIdx + 3)\n          );\n\n          ${o}\n        }\n\n        int inIdx = inOffset + ${n};\n        if (${1==i}) {\n          vec4 values = vec4(getValue(batch, inIdx), 0.0, 0.0, 0.0);\n\n          ${o}\n        } else if (${2==i}) {\n          vec4 values = vec4(\n            getValue(batch, inIdx),\n            getValue(batch, inIdx + 1), 0.0, 0.0);\n\n          ${o}\n        } else if (${3==i}) {\n          vec4 values = vec4(\n            getValue(batch, inIdx),\n            getValue(batch, inIdx + 1),\n            getValue(batch, inIdx + 2), 0.0);\n\n          ${o}\n        }\n        setOutput(sumValue);\n      }\n    `}}
/**
 * @license
 * Copyright 2017 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */class Hv{constructor(e,t){this.variableNames=["x"];var{windowSize:e,batchSize:n,inSize:r,outSize:i}=e;this.outputShape=[n,i];let o="0.0",a="",s=("prod"===t?o="1.0":"min"===t?(o="1.0 / 1e-20",a="min"):"max"===t&&(o="-1.0 / 1e-20",a="max"),t+`(${t}(${t}(minMaxValue[0], minMaxValue[1]), minMaxValue[2]), minMaxValue[3])`);"sum"===t?s="sumValue":"prod"===t?s="prodValue":"all"===t?s="allValue":"any"===t&&(s="anyValue"),n=4*Math.floor(e/4),i=e%4;let u=`\n      if (${"sum"===t}) {\n        sumValue += dot(values, ones);\n      } else if (${"prod"===t}) {\n        vec2 tmp = vec2(values[0], values[1]) * vec2(values[2], values[3]);\n        prodValue *= tmp[0] * tmp[1];\n      } else {\n        minMaxValue = ${a}(values, minMaxValue);\n        if (${"min"===t} || ${"max"===t}) {\n          minMaxValue = ${a}(values, minMaxValue);\n          bvec4 isNaN = isnan(values);\n          if (isNaN.r || isNaN.g || isNaN.b || isNaN.a) {\n            minMaxValue = vec4(NAN);\n          }\n        }\n      }\n    `,c="vec4",l=("all"===t?(o="1.0",u="\n        bool reducedAllValue = all(values);\n        float floatedReducedAllValue = float(reducedAllValue);\n        allValue = float(allValue >= 1.0 && floatedReducedAllValue >= 1.0);\n      ",c="bvec4"):"any"===t&&(o="0.0",u="\n        bool reducedAnyValue = any(values);\n        float floatedReducedAnyValue = float(reducedAnyValue);\n        anyValue = float(anyValue >= 1.0 || floatedReducedAnyValue >= 1.0);\n      ",c="bvec4"),"");0<r%e&&(l=`\n        if (inIdx < 0 || inIdx >= ${r}) {\n          return initializationValue;\n        }\n      `),this.userCode=`\n      const float initializationValue = ${o};\n      const vec4 ones = vec4(1.0, 1.0, 1.0, 1.0);\n\n      float getValue(int batch, int inIdx) {\n        ${l}\n        return getX(batch, inIdx);\n      }\n\n      void main() {\n        ivec2 coords = getOutputCoords();\n        int batch = coords[0];\n        int outIdx = coords[1];\n        int inOffset = outIdx * ${e};\n\n        vec4 minMaxValue = vec4(${o});\n        float prodValue = 1.0;\n        float sumValue = 0.0;\n        float allValue = 1.0;\n        float anyValue = 0.0;\n\n        for (int i = 0; i < ${n}; i += 4) {\n          int inIdx = inOffset + i;\n          ${c} values = ${c}(\n            getValue(batch, inIdx),\n            getValue(batch, inIdx + 1),\n            getValue(batch, inIdx + 2),\n            getValue(batch, inIdx + 3)\n          );\n\n          ${u}\n        }\n\n        int inIdx = inOffset + ${n};\n        if (${1==i}) {\n          ${c} values = ${c}(\n            getValue(batch, inIdx),\n            initializationValue,\n            initializationValue,\n            initializationValue\n          );\n\n          ${u}\n        } else if (${2==i}) {\n          ${c} values = ${c}(\n            getValue(batch, inIdx),\n            getValue(batch, inIdx + 1),\n            initializationValue,\n            initializationValue\n          );\n\n          ${u}\n        } else if (${3==i}) {\n          ${c} values = ${c}(\n            getValue(batch, inIdx),\n            getValue(batch, inIdx + 1),\n            getValue(batch, inIdx + 2),\n            initializationValue\n          );\n\n          ${u}\n        }\n        setOutput(${s});\n      }\n    `}}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function $v(e,t,n,r){var i=function(e){const t=[];for(;0===t.length||1!==t[t.length-1].outSize;){var n=t.length?t[t.length-1].outSize:e[1],r=f.de.computeOptimalWindowSize(n);t.push({inSize:n,windowSize:r,outSize:Math.ceil(n/r)})}return t}(e.shape);let o=e;for(let c=0;c<i.length;c++){var{inSize:a,windowSize:s,outSize:u}=i[c];let l;l="mean"===n?0===c?new zv({windowSize:s,inSize:a,batchSize:e.shape[0],outSize:u},a):new zv({windowSize:s,inSize:a,batchSize:e.shape[0],outSize:u}):new Hv({windowSize:s,inSize:a,batchSize:e.shape[0],outSize:u},n),s=o,o=r.runWebGLProgram(l,[o],t),s.dataId!==e.dataId&&r.disposeIntermediateTensorInfo(s)}return o}
/**
 * @license
 * Copyright 2017 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */class Qv{constructor(e,t){this.variableNames=["A"];const n=new Array(e.length);for(let r=0;r<n.length;r++)n[r]=e[t[r]];this.outputShape=n,this.rank=n.length;var r=Gg(this.rank),i=function(e){var t=e.length;if(6<t)throw Error(`Transpose for rank ${t} is not yet supported`);const n=["resRC.x","resRC.y","resRC.z","resRC.w","resRC.u","resRC.v"],r=new Array(t);for(let t=0;t<e.length;t++)r[e[t]]=n[t];return r.join()}
/**
 * @license
 * Copyright 2019 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */(t);this.userCode=`\n    void main() {\n      ${r} resRC = getOutputCoords();\n      setOutput(getA(${i}));\n    }\n    `}}class Vv{constructor(e,t){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0;const n=new Array(e.length);for(let r=0;r<n.length;r++)n[r]=e[t[r]];if(this.outputShape=n,this.rank=n.length,6<this.rank)throw Error(`Packed transpose for rank ${this.rank} is not yet supported.`);var r=Gg(this.rank),i=sv("rc",this.rank);const o=new Array(this.rank);for(let e=0;e<t.length;e++)o[t[e]]=i[e];var a=`vec2(${o.slice(-2).join()})`,s=`++${i[this.rank-1]} < `+n[this.rank-1];a=`getChannel(getA(${o.join()}), ${a})`;this.userCode=`\n    void main() {\n      ${r} rc = getOutputCoords();\n      vec4 result = vec4(0.);\n      result[0] = ${a};\n      if(${s}) {\n        result[1] = ${a};\n      }\n      --${i[this.rank-1]};\n      if(++${i[this.rank-2]} < ${n[this.rank-2]}) {\n        result[2] = ${a};\n        if(${s}) {\n          result[3] = ${a};\n        }\n      }\n      setOutput(result);\n    }\n    `}}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function qv(e,t,n){return t=new(Object(f.hf)().getBool("WEBGL_PACK_ARRAY_OPERATIONS")?Vv:Qv)(e.shape,t),n.runWebGLProgram(t,[e],e.dtype)}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function Gv(e){var{inputs:e,backend:t,attrs:n}=e,{axis:n,keepDims:r}=(e=e.x,n);{var i=e.shape.length;let s=n=f.Ji.parseAxisParam(n,e.shape);var o=null!=(a=f.de.getAxesPermutation(s,i));let u=e;o&&(u=qv(e,a,t),s=f.de.getInnerMostAxes(s.length,i)),f.de.assertAxesAreInnerMostDims("sum",s,i);var[a,i]=f.de.computeOutAndReduceShapes(u.shape,s);let c=a;return r&&(c=f.de.expandShapeToKeepDim(a,n)),r=f.Ji.sizeFromShape(i),n=Uv({inputs:{x:u},attrs:{shape:[(a=f.Ji.sizeFromShape(e.shape))/r,r]},backend:t}),a=Uv({inputs:{x:i=$v(n,Object(f.ji)(e.dtype),"sum",t)},attrs:{shape:c},backend:t}),t.disposeIntermediateTensorInfo(n),t.disposeIntermediateTensorInfo(i),o&&t.disposeIntermediateTensorInfo(u),a}}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function Wv(e){var{inputs:e,backend:t,attrs:n}=e,r=e.x,i=n.perm;const o=t;e=r.shape.length;const a=new Array(e);for(let e=0;e<a.length;e++)a[e]=r.shape[i[e]];let s;if(o.shouldExecuteOnCPU([r])){n=o.texData.get(r.dataId).values,t=ov(n,r.shape,r.dtype,i,a),s=o.makeTensorInfo(a,r.dtype);o.texData.get(s.dataId).values=t}else s=qv(r,i,o);return s}be={kernelName:f.wd,backendName:"webgl",kernelFunc:Gv},Ee={kernelName:f.Ed,backendName:"webgl",kernelFunc:Wv};function Kv({a:e,b:t,transposeA:n,transposeB:r,backend:i,bias:o=null,preluActivationWeights:a=null,leakyreluAlpha:s=0,activation:u=null}){var c=e.shape.length,l=t.shape.length;const h=n?e.shape[c-2]:e.shape[c-1],d=r?t.shape[l-1]:t.shape[l-2];c=n?e.shape[c-1]:e.shape[c-2],l=r?t.shape[l-2]:t.shape[l-1];var p=e.shape.slice(0,-2),m=t.shape.slice(0,-2);p=f.Ji.sizeFromShape(p),m=f.Ji.sizeFromShape(m);var g=f.oe.assertAndGetBroadcastShape(e.shape.slice(0,-2),t.shape.slice(0,-2)).concat([c,l]),A=(f.Ji.assert(h===d,()=>`Error in matMul: inner shapes (${h}) and (${d}) of Tensors with shapes ${e.shape} and `+t.shape+" and transposeA="+n+` and transposeB=${r} must match.`),n?[p,h,c]:[p,c,h]),v=r?[m,l,d]:[m,d,l],b=Uv({inputs:{x:e},backend:i,attrs:{shape:A}}),y=Uv({inputs:{x:t},backend:i,attrs:{shape:v}});const w=[b,y];p=Math.max(p,m),m=n?b.shape[1]:b.shape[2];var x=null!=o,C=null!=a,k="leakyrelu"===u,E=(u=null!=u?jv(u,!0):null,x||C||k||null!=u);let S;if((1===c||1===l)&&m>1e3&&0==E){let e=b,t=y;n&&(e=Wv({inputs:{x:b},backend:i,attrs:{perm:[0,2,1]}}),w.push(e)),r&&(t=Wv({inputs:{x:y},backend:i,attrs:{perm:[0,2,1]}}),w.push(t)),E=1===l;let o=e;1!==l&&(o=Uv({inputs:{x:e},backend:i,attrs:{shape:[p,m,1]}}),w.push(o));var _=1===l?2:1;let a=t;E&&(a=Uv({inputs:{x:t},backend:i,attrs:{shape:[p,1,m]}}),w.push(a)),S=Gv({inputs:{x:E=Lv({inputs:{a:o,b:a},backend:i})},backend:i,attrs:{axis:_,keepDims:!0}}),w.push(E)}else{m=Object(f.Hi)(e.dtype,t.dtype),_=new Nv(A,v,[p,c,l],n,r,x,u,C,k);const h=[b,y];null!=o&&h.push(o),C&&h.push(a),k&&(E=i.makeTensorInfo([],"float32",f.Ji.createScalarValue(s,"float32")),h.push(E),w.push(E)),S=i.runWebGLProgram(_,h,m)}A=Uv({inputs:{x:S},backend:i,attrs:{shape:g}}),w.push(S);for(const e of w)i.disposeIntermediateTensorInfo(e);return A}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the License);
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an AS IS BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */Te={kernelName:f.Ld,backendName:"webgl",kernelFunc:function(e){var{inputs:e,backend:t,attrs:n}=e,{a:e,b:r,bias:i,preluActivationWeights:o}=e,{transposeA:n,transposeB:a,activation:s,leakyreluAlpha:u}=n;return Kv({a:e,b:r,transposeA:n,transposeB:a,backend:t,bias:i,preluActivationWeights:o,leakyreluAlpha:u,activation:s})}};De={kernelName:f.a,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n}=e;var r;e=t.x;if(n.shouldExecuteOnCPU([e])&&"complex64"!==e.dtype)return r=n.texData.get(e.dataId),r=qA(r.values),n.makeTensorInfo(e.shape,e.dtype,r);let i;return i=new(Object(f.hf)().getBool("WEBGL_PACK_UNARY_OPERATIONS")?vv:mv)(e.shape,"return abs(x);"),n.runWebGLProgram(i,[e],e.dtype)}},je=Iv({opSnippet:"if (isnan(x)) return x;\n  if (abs(x) > 1.) {\n    return NAN;\n  }\n  return acos(x);\n"}),Re={kernelName:f.b,backendName:"webgl",kernelFunc:je},Fe=Iv({opSnippet:"if (isnan(x)) return x;\n  if (x < 1.0) return NAN;\nreturn log(x + sqrt(x * x - 1.0));"}),Ue={kernelName:f.c,backendName:"webgl",kernelFunc:Fe},Ve=Mv({opSnippet:He="return a + b;",packedOpSnippet:He,supportsComplex:!0,cpuKernelImpl:pA}),W={kernelName:f.h,backendName:"webgl",kernelFunc:Ve};
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
/**
 * @license
 * Copyright 2019 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
class Yv{constructor(e,t){this.outputShape=[],this.outputShape=e,this.variableNames=t.map((e,t)=>"T"+t);const n=[];this.variableNames.forEach(e=>{n.push(`float v${e} = get${e}AtOutCoords();`)}),e=this.variableNames.map(e=>"v"+e).join(" + "),this.userCode=`\n      void main() {\n        ${n.join("\n        ")}\n\n        float result = ${e};\n        setOutput(result);\n      }\n    `}}
/**
 * @license
 * Copyright 2019 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */class Xv{constructor(e,t){this.outputShape=[],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=e,this.variableNames=t.map((e,t)=>"T"+t);const n=[];this.variableNames.forEach(e=>{n.push(`vec4 v${e} = get${e}AtOutCoords();`)}),e=this.variableNames.map(e=>"v"+e).join(" + "),this.userCode=`\n      void main() {\n        ${n.join("\n        ")}\n\n        vec4 result = ${e};\n        setOutput(result);\n      }\n    `}}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */qe={kernelName:f.i,backendName:"webgl",kernelFunc:function e(t){const{inputs:n,backend:r}=t,i=n;var o;return 1===i.length?Sv({inputs:{x:i[0]},backend:r}):i.length>Object(f.hf)().get("WEBGL_MAX_TEXTURES_IN_SHADER")?(t=Math.floor(i.length/2),o=e({inputs:i.slice(0,t),backend:r}),t=e({inputs:i.slice(t),backend:r}),e({inputs:[o,t],backend:r})):(o=i.map(e=>e.dtype).reduce((e,t)=>Object(f.Hi)(e,t)),t=i.map(e=>e.shape),t=new(Object(f.hf)().getBool("WEBGL_PACK")?Xv:Yv)(i[0].shape,t),r.runWebGLProgram(t,i,o))}},
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
We={kernelName:f.j,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;e=t.x;var{axis:i,keepDims:o}=r,a=e.shape.length;let s=i=f.Ji.parseAxisParam(i,e.shape);var u=f.de.getAxesPermutation(s,a);let c=e;null!=u&&(c=Wv({inputs:{x:e},backend:n,attrs:{perm:u}}),s=f.de.getInnerMostAxes(s.length,a)),f.de.assertAxesAreInnerMostDims("all",s,a);var[e,a]=f.de.computeOutAndReduceShapes(c.shape,s),l=$v(a=Uv({inputs:{x:c},backend:n,attrs:{shape:[-1,a=f.Ji.sizeFromShape(a)]}}),a.dtype,"all",n);let h;return h=o?Uv({inputs:{x:l},backend:n,attrs:{shape:o=f.de.expandShapeToKeepDim(e,i)}}):Uv({inputs:{x:l},backend:n,attrs:{shape:e}}),n.disposeIntermediateTensorInfo(a),n.disposeIntermediateTensorInfo(l),null!=u&&n.disposeIntermediateTensorInfo(c),h}},
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Ke={kernelName:f.k,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;e=t.x;var{axis:i,keepDims:o}=r,a=e.shape.length;let s=i=f.Ji.parseAxisParam(i,e.shape);var u=f.de.getAxesPermutation(s,a);let c=e;null!=u&&(c=Wv({inputs:{x:e},backend:n,attrs:{perm:u}}),s=f.de.getInnerMostAxes(s.length,a)),f.de.assertAxesAreInnerMostDims("any",s,a);var[e,a]=f.de.computeOutAndReduceShapes(c.shape,s),l=$v(a=Uv({inputs:{x:c},backend:n,attrs:{shape:[-1,a=f.Ji.sizeFromShape(a)]}}),a.dtype,"any",n);let h;return h=o?Uv({inputs:{x:l},backend:n,attrs:{shape:o=f.de.expandShapeToKeepDim(e,i)}}):Uv({inputs:{x:l},backend:n,attrs:{shape:e}}),n.disposeIntermediateTensorInfo(a),n.disposeIntermediateTensorInfo(l),null!=u&&n.disposeIntermediateTensorInfo(c),h}};
/**
 * @license
 * Copyright 2017 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
class Jv{constructor(e,t,n){this.variableNames=["A"];var{windowSize:e,batchSize:r,outSize:i}=e,r=(n||this.variableNames.push("bestIndicesA"),this.outputShape=[r,i],"max"===t?">":"<");this.userCode=`\n      void main() {\n        ivec2 coords = getOutputCoords();\n        int batch = coords[0];\n        int outIdx = coords[1];\n        int inOffset = outIdx * ${e};\n\n        int bestIndex = inOffset;\n        float bestValue = getA(batch, bestIndex);\n\n        for (int i = 0; i < ${e}; i++) {\n          int inIdx = ${n?"inOffset + i;":"round(getBestIndicesA(batch, inOffset + i));"};\n          float candidate = getA(batch, inIdx);\n          if (candidate ${r} bestValue) {\n            bestValue = candidate;\n            bestIndex = inIdx;\n          }\n        }\n        setOutput(float(bestIndex));\n      }\n    `}}
/**
 * @license
 * Copyright 2019 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */class Zv{constructor(e,t,n,r){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,f.Ji.assert(2<e.length,()=>`Packed arg${n.charAt(0).toUpperCase()+n.slice(1)} supports only inputs with rank above 2.`);var i=e[e.length-1],o=(i=Math.ceil(i/t),(e=(this.outputShape=e.slice(0,-1),1<i&&this.outputShape.push(i),r||this.variableNames.push("bestIndicesA"),this.outputShape)).length),a=Gg(o);const s=uv("coords",o);let u,c;u=1===i?`\n        ${i=Gg(c=o+1)} sourceLocR = ${i}(${s.join()}, 0);\n        ++${s[o-1]};\n        ${i} sourceLocG = ${i}(${s.join()}, 0);\n        ++${s[o-2]};\n        ${i} sourceLocA = ${i}(${s.join()}, 0);\n        --${s[o-1]};\n        ${i} sourceLocB = ${i}(${s.join()}, 0);\n        --${s[o-2]};`:(c=o,`\n        ${a} sourceLocR = coords;\n        ++${s[o-1]};\n        ${a} sourceLocG = coords;\n        ++${s[o-2]};\n        ${a} sourceLocA = coords;\n        --${s[o-1]};\n        ${a} sourceLocB = coords;\n        --${s[o-2]};`);const l=["x","y","z","w","u","v"].slice(0,c);i="."+l[c-1];const h=l.map(e=>"int "+e),d=uv("sourceLocR",c-1).concat("inIdx.r"),p=uv("sourceLocG",c-1).concat("inIdx.g"),m=uv("sourceLocB",c-1).concat("inIdx.b"),g=uv("sourceLocA",c-1).concat("inIdx.a");var A="max"===n?"greaterThan":"lessThan",v=r?"":`\n          inIdx = round(vec4(getBestIndicesAChannel(${d.join()}),\n                             getBestIndicesAChannel(${p.join()}),\n                             getBestIndicesAChannel(${m.join()}),\n                             getBestIndicesAChannel(${g.join()})));`,b=`vec4(\n            getAChannel(${d.join()}),\n            hasNextCol ? getAChannel(${p.join()}) : 0.,\n            hasNextRow ? getAChannel(${m.join()}) : 0.,\n            hasNextRow && hasNextCol ? getAChannel(${g.join()}) : 0.)`;r=r?"":`\n      float getBestIndicesAChannel(${h.join()}) {\n        return getChannel(getBestIndicesA(${l.join()}),\n                                          vec2(${l.slice(-2).join()}));\n      }`;this.userCode=`\n      float getAChannel(${h.join()}) {\n        return getChannel(getA(${l.join()}),\n                               vec2(${l.slice(-2).join()}));\n      }\n      ${r}\n      void main() {\n        ${a} coords = getOutputCoords();\n        bool hasNextCol = ${s[o-1]} < ${e[o-1]-1};\n        bool hasNextRow = ${s[o-2]} < ${e[o-2]-1};\n        ${u}\n        ivec4 srcIdx = ivec4(sourceLocR${i}, sourceLocG${i},\n          sourceLocB${i}, sourceLocA${i}) * ${t};\n        ivec4 inIdx = srcIdx;\n        vec4 bestIndex = vec4(inIdx);\n        vec4 bestValue = ${b};\n\n        for (int i = 0; i < ${t}; i++) {\n          inIdx = srcIdx;\n          ${v}\n          vec4 candidate = ${b};\n          bvec4 nan = isnan(candidate);\n          bvec4 replace = bvec4(\n            vec4(${A}(candidate, bestValue)) * (vec4(1.0) - vec4(nan)));\n\n          bestValue = vec4(replace.x  ? candidate.x : bestValue.x,\n                           replace.y  ? candidate.y : bestValue.y,\n                           replace.z  ? candidate.z : bestValue.z,\n                           replace.w  ? candidate.w : bestValue.w);\n          bestIndex = mix(bestIndex, vec4(inIdx), vec4(replace));\n          srcIdx++;\n        }\n        setOutput(bestIndex);\n      }\n    `}}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function eb(e,t,n,r){if(n=[n],f.de.assertAxesAreInnerMostDims("arg"+r.charAt(0).toUpperCase()+r.slice(1),n,t.shape.length),!Object(f.hf)().getBool("WEBGL_PACK_REDUCE")||t.shape.length<=2){const o=[];var i;let a=t;null!==(i=e.texData.get(t.dataId))&&i.isPacked&&(a=e.unpackTensor(t),o.push(a));var[i,n]=f.de.computeOutAndReduceShapes(a.shape,n);n=f.Ji.sizeFromShape(n),n=Uv({inputs:{x:a},backend:e,attrs:{shape:[-1,n]}}),n=(o.push(n),function e(t,n,r,i=null){let o=n.shape[0],a=n.shape[1];null!=i&&(o=i.shape[0],a=i.shape[1]);var s={windowSize:s=f.de.computeOptimalWindowSize(a),inSize:a,batchSize:o,outSize:Math.ceil(a/s)};s=new Jv(s,r,null==i);const u=[n];return null!=i&&u.push(i),1===(i=t.runWebGLProgram(s,u,"int32")).shape[1]?i:(s=e(t,n,r,i),t.disposeIntermediateTensorInfo(i),s)}(e,n,r)),n=(o.push(n),Uv({inputs:{x:n},backend:e,attrs:{shape:i}}));return o.forEach(t=>e.disposeIntermediateTensorInfo(t)),n}return function e(t,n,r,i=null){var o=(a=(null!=i?i:n).shape)[a.length-1],a=(o=f.de.computeOptimalWindowSize(o),new Zv(a,o,r,null==i));return(o=t.runWebGLProgram(a,null==i?[n]:[n,i],"int32")).shape.length===n.shape.length?(a=e(t,n,r,o),t.disposeIntermediateTensorInfo(o),a):o}(e,t,r)}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */Xe={kernelName:f.l,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;e=t.x;var i=r.axis;let o=f.Ji.parseAxisParam(i,e.shape),a=(i=f.de.getAxesPermutation(o,e.shape.length),e);const s=[];return null!=i&&(a=Wv({inputs:{x:e},backend:n,attrs:{perm:i}}),s.push(a),o=f.de.getInnerMostAxes(o.length,a.shape.length)),f.de.assertAxesAreInnerMostDims("argMax",[o[0]],a.shape.length),e=eb(n,a,o[0],"max"),s.forEach(e=>n.disposeIntermediateTensorInfo(e)),e}},
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
R={kernelName:f.m,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;e=t.x;var i=r.axis;let o=f.Ji.parseAxisParam(i,e.shape),a=(i=f.de.getAxesPermutation(o,e.shape.length),e);const s=[];return null!=i&&(a=Wv({inputs:{x:e},backend:n,attrs:{perm:i}}),s.push(a),o=f.de.getInnerMostAxes(o.length,a.shape.length)),f.de.assertAxesAreInnerMostDims("argMin",[o[0]],a.shape.length),e=eb(n,a,o[0],"min"),s.forEach(e=>n.disposeIntermediateTensorInfo(e)),e}},Ze=Iv({opSnippet:"if (isnan(x)) return x;\n  if (abs(x) > 1.) {\n    return NAN;\n  }\n  return asin(x);\n"}),nt={kernelName:f.n,backendName:"webgl",kernelFunc:Ze},j=Iv({opSnippet:"if (isnan(x)) return x;return log(x + sqrt(x * x + 1.0));"}),ot={kernelName:f.o,backendName:"webgl",kernelFunc:j},ct=Iv({opSnippet:"if (isnan(x)) return x;\n  return atan(x);\n"}),Q={kernelName:f.p,backendName:"webgl",kernelFunc:ct},ft=Mv({opSnippet:"\n  if (isnan(a)) return a;\n  if (isnan(b)) return b;\n\n  return atan(a, b);\n",packedOpSnippet:"\n  vec4 result = atan(a, b);\n  bvec4 isNaNA = isnan(a);\n  bvec4 isNaNB = isnan(b);\n  bvec4 isNaN = bvec4(isNaNA.x || isNaNB.x, isNaNA.y || isNaNB.y, isNaNA.z || isNaNB.z, isNaNA.w || isNaNB.w);\n  \n  result.r = isNaN.r ? NAN : result.r;\n  result.g = isNaN.g ? NAN : result.g;\n  result.b = isNaN.b ? NAN : result.b;\n  result.a = isNaN.a ? NAN : result.a;\n\n  return result;\n"}),dt={kernelName:f.q,backendName:"webgl",kernelFunc:ft},pt=Iv({opSnippet:"if (isnan(x)) return x;\n  if ((x < -1.0) || (x > 1.0)) return NAN;\nreturn (log(1.0 + x) - log(1.0 - x)) / 2.0;"}),gt={kernelName:f.r,backendName:"webgl",kernelFunc:pt};
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
/**
 * @license
 * Copyright 2017 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
class tb{constructor(e,t,n,r=!1,i=!1){if(this.variableNames=["x"],"avg"===t&&n)throw new Error("Cannot compute positions for average pool.");var o=e.filterWidth,a=e.strideHeight,s=e.strideWidth,u=e.dilationHeight,c=e.dilationWidth,l=e.effectiveFilterHeight,h=e.effectiveFilterWidth,f=e.padInfo.top,d=e.padInfo.left,p=(this.outputShape=e.outShape,"avg"===t),m=`((batch  * ${e.inHeight} + xR) * ${e.inWidth} + xC) * ${e.inChannels} + d`,g=`(xR * ${e.inWidth} + xC) * ${e.inChannels} + d`;let A=p?"0.0":"-1.0 / 1e-20";if(n){this.userCode=`\n        const ivec2 strides = ivec2(${a}, ${s});\n        const ivec2 pads = ivec2(${f}, ${d});\n\n        void main() {\n          ivec4 coords = getOutputCoords();\n          int batch = coords[0];\n          int d = coords[3];\n\n          ivec2 xRCCorner = coords.yz * strides - pads;\n          int xRCorner = xRCCorner.x;\n          int xCCorner = xRCCorner.y;\n\n          // max/min x(?, ?, d) to get y(yR, yC, d).\n          // ? = to be determined\n          float minMaxValue = 0.0;\n          float minMaxValueFound = 0.0;\n          int minMaxPosition = 0;\n          float avgValue = 0.0;\n\n          for (int wR = 0; wR < ${l};\n              wR += ${u}) {\n            int xR = xRCorner + wR;\n\n            if (xR < 0 || xR >= ${e.inHeight}) {\n              continue;\n            }\n\n            for (int wC = 0; wC < ${h};\n                wC += ${c}) {\n              int xC = xCCorner + wC;\n\n              if (xC < 0 || xC >= ${e.inWidth}) {\n                continue;\n              }\n\n              float value = getX(batch, xR, xC, d);\n\n              // If a min / max value has already been found, use it. If not,\n              // use the current value.\n              float currMinMaxValue = mix(\n                  value, minMaxValue, minMaxValueFound);\n              if (value >= currMinMaxValue) {\n                minMaxValue = value;\n                minMaxValueFound = 1.0;\n                minMaxPosition = ${r?i?m:g:`wR * ${h} + wC`};\n              }\n            }\n          }\n          setOutput(float(minMaxPosition));\n        }\n      `}else{const h="max";let m=t+`(${t}(${t}(minMaxValue[0], minMaxValue[1]), minMaxValue[2]), minMaxValue[3])`;"avg"===t&&(m="avgValue / count"),n=4*Math.floor(o/4),r=o%4,i=`\n      if (${p}) {\n        avgValue += dot(values, ones);\n      } else {\n        minMaxValue = ${h}(values, minMaxValue);\n      }\n    `,this.userCode=`\n      const ivec2 strides = ivec2(${a}, ${s});\n      const ivec2 pads = ivec2(${f}, ${d});\n      const float initializationValue = ${A};\n      const vec4 ones = vec4(1.0, 1.0, 1.0, 1.0);\n\n      float count = 0.0;\n\n      float getValue(int batch, int xR, int xC, int d) {\n        if (xC < 0 || xC >= ${e.inWidth}) {\n          return initializationValue;\n        }\n        count += 1.0;\n        return getX(batch, xR, xC, d);\n      }\n\n      void main() {\n        ivec4 coords = getOutputCoords();\n        int batch = coords[0];\n        int d = coords[3];\n\n        ivec2 xRCCorner = coords.yz * strides - pads;\n        int xRCorner = xRCCorner.x;\n        int xCCorner = xRCCorner.y;\n\n        // max/min x(?, ?, d) to get y(yR, yC, d).\n        // ? = to be determined\n        vec4 minMaxValue = vec4(${A});\n        float avgValue = 0.0;\n        count = 0.0;\n\n        for (int wR = 0; wR < ${l};\n            wR += ${u}) {\n          int xR = xRCorner + wR;\n\n          if (xR < 0 || xR >= ${e.inHeight}) {\n            continue;\n          }\n\n          for (int wC = 0; wC < ${n}; wC += 4) {\n            int xC = xCCorner + wC * ${c};\n\n            vec4 values = vec4(\n              getValue(batch, xR, xC, d),\n              getValue(batch, xR, xC + ${c}, d),\n              getValue(batch, xR, xC + 2 * ${c}, d),\n              getValue(batch, xR, xC + 3 * ${c}, d)\n            );\n\n            ${i}\n          }\n\n          int xC = xCCorner + ${n};\n          if (${1==r}) {\n            vec4 values = vec4(\n              getValue(batch, xR, xC, d),\n              initializationValue,\n              initializationValue,\n              initializationValue\n            );\n\n            ${i}\n          } else if (${2==r}) {\n            vec4 values = vec4(\n              getValue(batch, xR, xC, d),\n              getValue(batch, xR, xC + ${c}, d),\n              initializationValue,\n              initializationValue\n            );\n\n            ${i}\n          } else if (${3==r}) {\n            vec4 values = vec4(\n              getValue(batch, xR, xC, d),\n              getValue(batch, xR, xC + ${c}, d),\n              getValue(batch, xR, xC + 2 * ${c}, d),\n              initializationValue\n            );\n\n            ${i}\n          }\n        }\n        setOutput(${m});\n      }\n    `}}}class nb{constructor(e,t,n,r=!1,i=!1){if(this.variableNames=["x"],"avg"===t&&n)throw new Error("Cannot compute positions for average pool.");var o=e.filterWidth,a=e.strideDepth,s=e.strideHeight,u=e.strideWidth,c=e.dilationDepth,l=e.dilationHeight,h=e.dilationWidth,f=e.effectiveFilterDepth,d=e.effectiveFilterHeight,p=e.effectiveFilterWidth,m=e.padInfo.front,g=e.padInfo.top,A=e.padInfo.left,v=(this.outputShape=e.outShape,"avg"===t);let b=v?"0.0":"-1.0 / 1e-20";if(n){this.userCode=`\n        const ivec3 strides =\n            ivec3(${a}, ${s}, ${u});\n        const ivec3 pads = ivec3(${m}, ${g}, ${A});\n\n        void main() {\n          ivec5 coords = getOutputCoords();\n          int batch = coords.x;\n          int ch = coords.u;\n\n          ivec3 xCorner = ivec3(coords.y, coords.z, coords.w) * strides - pads;\n          int xDCorner = xCorner.x;\n          int xRCorner = xCorner.y;\n          int xCCorner = xCorner.z;\n\n          // max/min x(?, ?, ?, ch) to get y(yD, yR, yC, ch).\n          // ? = to be determined\n          float minMaxValue = 0.0;\n          float minMaxValueFound = 0.0;\n          int minMaxPosition = 0;\n\n          for (int wD = 0; wD < ${f};\n              wD += ${c}) {\n            int xD = xDCorner + wD;\n\n            if (xD < 0 || xD >= ${e.inDepth}) {\n              continue;\n            }\n\n            for (int wR = 0; wR < ${d};\n                wR += ${l}) {\n              int xR = xRCorner + wR;\n\n              if (xR < 0 || xR >= ${e.inHeight}) {\n                continue;\n              }\n\n              for (int wC = 0; wC < ${p};\n                  wC += ${h}) {\n                int xC = xCCorner + wC;\n\n                if (xC < 0 || xC >= ${e.inWidth}) {\n                  continue;\n                }\n\n                float value = getX(batch, xD, xR, xC, ch);\n\n                // If a min / max value has already been found, use it. If not,\n                // use the current value.\n                float currMinMaxValue = mix(\n                    value, minMaxValue, minMaxValueFound);\n                if (value >= currMinMaxValue) {\n                  minMaxValue = value;\n                  minMaxValueFound = 1.0;\n                  minMaxPosition = ${r?i?`(((batch * ${e.inDepth} + xD) * ${e.inHeight} + xR) * ${e.inWidth} + xC) * ${e.inChannels} + ch`:`((xD * ${e.inHeight} + xR) * ${e.inWidth} + xC) * ${e.inChannels} + ch`:`wD * ${d} * ${p} +\n                      wR * ${p} + wC`};\n                }\n              }\n            }\n          }\n          setOutput(float(minMaxPosition));\n        }\n      `}else{const p="max";let y=t+`(${t}(${t}(minMaxValue[0], minMaxValue[1]), minMaxValue[2]), minMaxValue[3])`;"avg"===t&&(y="avgValue / count"),n=4*Math.floor(o/4),r=o%4,i=`\n      if (${v}) {\n        avgValue += dot(values, ones);\n      } else {\n        minMaxValue = ${p}(values, minMaxValue);\n      }\n    `,this.userCode=`\n      const ivec3 strides =\n        ivec3(${a}, ${s}, ${u});\n      const ivec3 pads = ivec3(${m}, ${g}, ${A});\n      const float initializationValue = ${b};\n      const vec4 ones = vec4(1.0, 1.0, 1.0, 1.0);\n\n      float count = 0.0;\n\n      float getValue(int batch, int xD, int xR, int xC, int ch) {\n        if (xC < 0 || xC >= ${e.inWidth}) {\n          return initializationValue;\n        }\n        count += 1.0;\n        return getX(batch, xD, xR, xC, ch);\n      }\n\n      void main() {\n        ivec5 coords = getOutputCoords();\n        int batch = coords.x;\n        int ch = coords.u;\n\n        ivec3 xCorner = ivec3(coords.y, coords.z, coords.w) * strides - pads;\n        int xDCorner = xCorner.x;\n        int xRCorner = xCorner.y;\n        int xCCorner = xCorner.z;\n\n        // max/min x(?, ?, ?, d) to get y(yD, yR, yC, ch).\n        // ? = to be determined\n        vec4 minMaxValue = vec4(${b});\n        float avgValue = 0.0;\n        count = 0.0;\n\n        for (int wD = 0; wD < ${f};\n            wD += ${c}) {\n          int xD = xDCorner + wD;\n\n          if (xD < 0 || xD >= ${e.inDepth}) {\n            continue;\n          }\n\n          for (int wR = 0; wR < ${d};\n            wR += ${l}) {\n            int xR = xRCorner + wR;\n\n            if (xR < 0 || xR >= ${e.inHeight}) {\n              continue;\n            }\n\n            for (int wC = 0; wC < ${n}; wC += 4) {\n              int xC = xCCorner + wC * ${h};\n\n              vec4 values = vec4(\n                getValue(batch, xD, xR, xC, ch),\n                getValue(batch, xD, xR, xC + ${h}, ch),\n                getValue(batch, xD, xR, xC + 2 * ${h}, ch),\n                getValue(batch, xD, xR, xC + 3 * ${h}, ch)\n              );\n\n              ${i}\n            }\n\n            int xC = xCCorner + ${n};\n            if (${1==r}) {\n              vec4 values = vec4(\n                getValue(batch, xD, xR, xC, ch),\n                initializationValue,\n                initializationValue,\n                initializationValue\n              );\n\n              ${i}\n            } else if (${2==r}) {\n              vec4 values = vec4(\n                getValue(batch, xD, xR, xC, ch),\n                getValue(batch, xD, xR, xC + ${h}, ch),\n                initializationValue,\n                initializationValue\n              );\n\n              ${i}\n            } else if (${3==r}) {\n              vec4 values = vec4(\n                getValue(batch, xD, xR, xC, ch),\n                getValue(batch, xD, xR, xC + ${h}, ch),\n                getValue(batch, xD, xR, xC + 2 * ${h}, ch),\n                initializationValue\n              );\n\n              ${i}\n            }\n          }\n          setOutput(${y});\n        }\n      }\n    `}}}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */vt={kernelName:f.s,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{filterSize:i,strides:o,pad:a,dimRoundingMode:s}=(Tg(e=t.x,"avgPool"),r);f.Ji.assert(f.de.eitherStridesOrDilationsAreOne(o,1),()=>`Error in avgPool: Either strides or dilations must be 1. Got strides ${o} and dilations '1'`);var u=f.de.computePool2DInfo(e.shape,i,o,1,a,s);return 1===u.filterWidth&&1===u.filterHeight&&f.Ji.arraysEqual(u.inShape,u.outShape)?Sv({inputs:{x:e},backend:n}):(u=new tb(u,"avg",!1),n.runWebGLProgram(u,[e],"float32"))}},
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
yt={kernelName:f.t,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;e=t.x;var{filterSize:i,strides:o,pad:a,dimRoundingMode:s,dataFormat:u}=r,i=f.de.computePool3DInfo(e.shape,i,o,[1,1,1],a,s,u),o=new nb(i,"avg",!1);return n.runWebGLProgram(o,[e],"float32")}};
/**
 * @license
 * Copyright 2017 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
class rb{constructor(e){this.variableNames=["dy"],this.outputShape=e.inShape;var t=e.filterHeight,n=e.filterWidth,r=e.strideHeight,i=e.strideWidth,o=e.dilationHeight,a=e.dilationWidth,s=e.effectiveFilterHeight,u=e.effectiveFilterWidth,c=s-1-e.padInfo.top,l=u-1-e.padInfo.left;this.userCode=`\n      const ivec2 pads = ivec2(${c}, ${l});\n      const float avgMultiplier = float(${1/(t*n)});\n\n      void main() {\n        ivec4 coords = getOutputCoords();\n        int b = coords[0];\n        int d = coords[3];\n\n        ivec2 dyRCCorner = coords.yz - pads;\n        int dyRCorner = dyRCCorner.x;\n        int dyCCorner = dyRCCorner.y;\n\n        // Convolve dy(?, ?, d) with pos mask(:, :, d) to get dx(xR, xC, d).\n        // ? = to be determined. : = across all values in that axis.\n        float dotProd = 0.0;\n        for (int wR = 0; wR < ${s};\n            wR += ${o}) {\n          float dyR = float(dyRCorner + wR) / ${r}.0;\n\n          if (dyR < 0.0 || dyR >= ${e.outHeight}.0 || fract(dyR) > 0.0) {\n            continue;\n          }\n          int idyR = int(dyR);\n\n          for (int wC = 0; wC < ${u};\n            wC+= ${a}) {\n            float dyC = float(dyCCorner + wC) / ${i}.0;\n\n            if (dyC < 0.0 || dyC >= ${e.outWidth}.0 ||\n                fract(dyC) > 0.0) {\n              continue;\n            }\n            int idyC = int(dyC);\n\n            float dyValue = getDy(b, idyR, idyC, d);\n\n            dotProd += dyValue * avgMultiplier;\n          }\n        }\n        setOutput(dotProd);\n      }\n    `}}class ib{constructor(e){this.variableNames=["dy"],this.outputShape=e.inShape;var t=e.filterDepth,n=e.filterHeight,r=e.filterWidth,i=e.strideDepth,o=e.strideHeight,a=e.strideWidth,s=e.dilationDepth,u=e.dilationHeight,c=e.dilationWidth,l=e.effectiveFilterDepth,h=e.effectiveFilterHeight,f=e.effectiveFilterWidth,d=l-1-e.padInfo.front,p=h-1-e.padInfo.top,m=f-1-e.padInfo.left;this.userCode=`\n      const ivec3 pads = ivec3(${d}, ${p}, ${m});\n      const float avgMultiplier = float(${1/(t*n*r)});\n\n      void main() {\n        ivec5 coords = getOutputCoords();\n        int batch = coords.x;\n        int ch = coords.u;\n\n        ivec3 dyCorner = ivec3(coords.y, coords.z, coords.w) - pads;\n        int dyDCorner = dyCorner.x;\n        int dyRCorner = dyCorner.y;\n        int dyCCorner = dyCorner.z;\n\n        // Convolve dy(?, ?, ?, d) with pos mask(:, :, :, ch) to get\n        // dx(xD, xR, xC, ch).\n        // ? = to be determined. : = across all values in that axis.\n        float dotProd = 0.0;\n\n        for (int wD = 0; wD < ${l};\n            wD += ${s}) {\n          float dyD = float(dyDCorner + wD) / ${i}.0;\n\n          if (dyD < 0.0 || dyD >= ${e.outDepth}.0 || fract(dyD) > 0.0) {\n            continue;\n          }\n          int idyD = int(dyD);\n\n          for (int wR = 0; wR < ${h};\n              wR += ${u}) {\n            float dyR = float(dyRCorner + wR) / ${o}.0;\n\n            if (dyR < 0.0 || dyR >= ${e.outHeight}.0 ||\n                fract(dyR) > 0.0) {\n              continue;\n            }\n            int idyR = int(dyR);\n\n            for (int wC = 0; wC < ${f};\n                wC += ${c}) {\n              float dyC = float(dyCCorner + wC) / ${a}.0;\n\n              if (dyC < 0.0 || dyC >= ${e.outWidth}.0 ||\n                  fract(dyC) > 0.0) {\n                continue;\n              }\n              int idyC = int(dyC);\n\n              float dyValue = getDy(batch, idyD, idyR, idyC, ch);\n\n              dotProd += dyValue * avgMultiplier;\n            }\n          }\n        }\n        setOutput(dotProd);\n      }\n    `}}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */Ct={kernelName:f.u,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;var{dy:e,input:i}=t,{filterSize:o,strides:a,pad:s,dimRoundingMode:u}=r,o=f.de.computePool3DInfo(i.shape,o,a,[1,1,1],s,u),a=new ib(o);return n.runWebGLProgram(a,[e],i.dtype)}},
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Et={kernelName:f.v,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;var{dy:e,input:i}=t,o=i,{filterSize:i,strides:a,pad:s}=(Tg([e,i],"avgPoolGrad"),r),i=f.de.computePool2DInfo(o.shape,i,a,1,s),a=new rb(i);return n.runWebGLProgram(a,[e],o.dtype)}},
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
St={kernelName:f.w,backendName:"webgl",kernelFunc:function(e){var{inputs:e,backend:t,attrs:n}=e,{a:e,b:r}=e,{transposeA:n,transposeB:i}=n;return Kv({a:e,b:r,transposeA:n,transposeB:i,backend:t})}};
/**
 * @license
 * Copyright 2017 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
class ob{constructor(e,t,n,r,i,o){this.outputShape=[],this.variableNames=["x","mean","variance"],f.de.assertAndGetBroadcastShape(e,t),f.de.assertAndGetBroadcastShape(e,n);let a="0.0",s=(null!=r&&(f.de.assertAndGetBroadcastShape(e,r),this.variableNames.push("offset"),a="getOffsetAtOutCoords()"),"1.0");null!=i&&(f.de.assertAndGetBroadcastShape(e,i),this.variableNames.push("scale"),s="getScaleAtOutCoords()"),this.outputShape=e,this.userCode=`\n      void main() {\n        float x = getXAtOutCoords();\n        float mean = getMeanAtOutCoords();\n        float variance = getVarianceAtOutCoords();\n        float offset = ${a};\n        float scale = ${s};\n        float inv = scale * inversesqrt(variance + float(${o}));\n        setOutput(dot(vec3(x, -mean, offset), vec3(inv, inv, 1)));\n      }\n    `}}
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */class ab{constructor(e,t,n,r,i,o){this.packedInputs=!0,this.packedOutput=!0,this.variableNames=["x","mean","variance"],f.de.assertAndGetBroadcastShape(e,t),f.de.assertAndGetBroadcastShape(e,n);let a="vec4(0.0)",s=(null!=r&&(f.de.assertAndGetBroadcastShape(e,r),this.variableNames.push("offset"),a="getOffsetAtOutCoords()"),"vec4(1.0)");null!=i&&(f.de.assertAndGetBroadcastShape(e,i),this.variableNames.push("scale"),s="getScaleAtOutCoords()"),this.outputShape=e,this.userCode=`\n      void main() {\n        vec4 offset = ${a};\n        vec4 scale = ${s};\n\n        vec4 x = getXAtOutCoords();\n        vec4 mean = getMeanAtOutCoords();\n        vec4 variance = getVarianceAtOutCoords();\n\n        vec4 inv = scale * inversesqrt(variance + vec4(${o}));\n\n        setOutput((x - mean) * inv + offset);\n      }\n    `}}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */Tt={kernelName:f.sb,backendName:"webgl",kernelFunc:({inputs:e,backend:t,attrs:n})=>{var{x:e,mean:r,variance:i,offset:o,scale:a}=e;f.Ji.assert(r.shape.length===i.shape.length,()=>"Batch normalization gradient requires mean and variance to have equal ranks."),f.Ji.assert(null==o||r.shape.length===o.shape.length,()=>"Batch normalization gradient requires mean and offset to have equal ranks."),f.Ji.assert(null==a||r.shape.length===a.shape.length,()=>"Batch normalization gradient requires mean and scale to have equal ranks.");let s=n.varianceEpsilon;null==s&&(s=.001);const u=[e,r,i];let c=null,l=(null!=o&&(c=o.shape,u.push(o)),null);return null!=a&&(l=a.shape,u.push(a)),n=new(Object(f.hf)().getBool("WEBGL_PACK_NORMALIZATION")?ab:ob)(e.shape,r.shape,i.shape,c,l,s),t.runWebGLProgram(n,u,u[0].dtype)}};
/**
 * @license
 * Copyright 2017 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
class sb{constructor(e){this.variableNames=["source"],this.outputShape=e,this.rank=e.length;var t=Gg(this.rank),n=(this.customUniforms=[{name:"start",arrayIndex:this.rank,type:"int"}],function(e){if(1===e)return"sourceLoc";if(e<=6)return ub.slice(0,e).map(e=>"sourceLoc."+e).join(",");throw Error(`Slicing for rank ${e} is not yet supported`)}
/**
 * @license
 * Copyright 2019 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */(this.rank));const r=e.map((e,t)=>`sourceLoc.${ub[t]} = start[${t}] + coords.${ub[t]};`);e=`\n        ${t} sourceLoc;\n        ${t} coords = getOutputCoords();\n        ${r.join("\n")}\n      `,this.userCode=`\n      void main() {\n        ${e}\n        setOutput(getSource(${n}));\n      }\n    `}}const ub=["x","y","z","w","u","v"];class cb{constructor(e){this.variableNames=["source"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=e,this.rank=e.length,this.customUniforms=[{name:"start",arrayIndex:this.rank,type:"int"}];var t=Gg(this.rank);const n=uv("coords",this.rank),r=uv("sourceLoc",this.rank);var i=1===this.rank?"sourceLoc":`vec2(${r.slice(-2).join()})`,o=`\n      result.x = ${i=`getChannel(getSource(${r.join()}), ${i})`};\n      if (++${n[this.rank-1]} < ${e[this.rank-1]}) {\n        ++${r[this.rank-1]};\n        result.y = ${i};\n        --${r[this.rank-1]};\n      }\n    `;i=1===this.rank?"":`\n      --${n[this.rank-1]};\n      if (++${n[this.rank-2]} < ${e[this.rank-2]}) {\n        ++${r[this.rank-2]};\n        result.z = ${i};\n        if (++${n[this.rank-1]} < ${e[this.rank-1]}) {\n          ++${r[this.rank-1]};\n          result.w = ${i};\n        }\n      }\n    `,e=this.rank<=4?`sourceLoc = coords +\n            ${t}(${e.map((e,t)=>`start[${t}]`).join()});`:e.map((e,t)=>`${r[t]} = ${n[t]} + start[${t}];`).join("\n");this.userCode=`\n      void main() {\n        ${t} coords = getOutputCoords();\n        ${t} sourceLoc;\n        ${e}\n        vec4 result = vec4(0.);\n        ${o}\n        ${i}\n        setOutput(result);\n      }\n    `}}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function lb(e){const{inputs:t,backend:n,attrs:r}=e;e=t.x;var{begin:i,size:o}=r,[i,o]=f.Rh.parseSliceParams(e,i,o);if(f.Rh.assertParamsValid(e,i,o),0===f.Ji.sizeFromShape(o))return n.makeTensorInfo(o,e.dtype,[]);if(n.shouldExecuteOnCPU([e])||"string"===e.dtype)return a=n.texData.get(e.dataId),a=GA(a.values,i,o,e.shape,e.dtype),n.makeTensorInfo(o,e.dtype,a);var a=n.texData.get(e.dataId).isPacked,s=f.Rh.isSliceContinous(e.shape,i,o);if(a||!s)return a=new(Object(f.hf)().getBool("WEBGL_PACK_ARRAY_OPERATIONS")?cb:sb)(o),n.runWebGLProgram(a,[e],e.dtype,[i]);n.uploadToGPU(e.dataId);{s=e,a=i,e=o;var o=(i=n).texData.get(s.dataId),u=i.makeTensorInfo(e,s.dtype);const t=i.texData.get(u.dataId);Object.assign(t,o),t.refCount=1,t.shape=e,t.dtype=s.dtype;let r=f.Rh.computeFlatOffset(a,f.Ji.computeStrides(s.shape));return o.slice&&(r+=o.slice.flatOffset),t.slice={flatOffset:r,origDataId:o.slice&&o.slice.origDataId||s.dataId},e=i.dataRefCount.get(t.slice.origDataId)||1,i.dataRefCount.set(t.slice.origDataId,e+1),u}}Dt={kernelName:f.dd,backendName:"webgl",kernelFunc:lb},Mt={kernelName:f.x,backendName:"webgl",kernelFunc:e=>{const{inputs:t,backend:n,attrs:r}=e;e=t.x;const{blockShape:i,crops:o}=r;f.Ji.assert(e.shape.length<=4,()=>"batchToSpaceND for rank > 4 with a WebGL backend not implemented yet");var a=i.reduce((e,t)=>e*t),s=f.de.getReshaped(e.shape,i,a),u=f.de.getPermuted(s.length,i.length),c=(a=f.de.getReshapedPermuted(e.shape,i,a),f.de.getSliceBeginCoords(o,i.length)),l=f.de.getSliceSize(a,o,i.length);const h=[];return e=Uv({inputs:{x:e},backend:n,attrs:{shape:s}}),a=lb({inputs:{x:u=Uv({inputs:{x:s=Wv({inputs:{x:e},backend:n,attrs:{perm:u}})},backend:n,attrs:{shape:a}})},backend:n,attrs:{begin:c,size:l}}),h.push(e),h.push(s),h.push(u),h.forEach(e=>n.disposeIntermediateTensorInfo(e)),a}},
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Nt={kernelName:f.y,backendName:"webgl",kernelFunc:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){const{inputs:t,backend:n,attrs:r}=e;var{x:e,weights:i}=t,o=r.size,a=(e=n.readSync(e.dataId),n.readSync(i.dataId));e=mA(e,a,i.dtype,i.shape,o);return n.makeTensorInfo([o],i.dtype,e)}},
/**
 * @license
 * Copyright 2021 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Ft={kernelName:f.z,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n}=e;var{s0:e,s1:r}=t,r=(e=n.readSync(e.dataId),n.readSync(r.dataId));e=f.de.assertAndGetBroadcastShape(Array.from(e),Array.from(r));return n.makeTensorInfo([e.length],"int32",Int32Array.from(e))}};
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
const hb=Mv({opSnippet:"return float(a != b);",cpuKernelImpl:RA,dtype:"bool"});
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function fb(e){const{inputs:t,backend:n}=e;return e=t.input,Sv({inputs:{x:n.texData.get(e.dataId).complexTensorInfos.real},backend:n})}Rt={kernelName:f.nc,backendName:"webgl",kernelFunc:hb},Pt={kernelName:f.Fc,backendName:"webgl",kernelFunc:fb};Lt={kernelName:f.B,backendName:"webgl",kernelFunc:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function e(t){const{inputs:n,backend:r,attrs:i}=t;t=n.x;var o,a,s,u=i.dtype;if("complex64"===u){if("complex64"===t.dtype)return Sv({inputs:{x:t},backend:r});const n=f.Ri(t.shape);var c=e({inputs:{x:t},backend:r,attrs:{dtype:"float32"}}),l=_v({inputs:{real:c,imag:n},backend:r});return n.dispose(),r.disposeIntermediateTensorInfo(c),l}if("complex64"===t.dtype)return l=e({inputs:{x:c=fb({inputs:{input:t},backend:r})},backend:r,attrs:{dtype:u}}),r.disposeIntermediateTensorInfo(c),l;if(!f.Ji.hasEncodingLoss(t.dtype,u))return{dataId:(c=Sv({inputs:{x:t},backend:r})).dataId,shape:c.shape,dtype:u};if(r.shouldExecuteOnCPU([t]))return l=r.texData.get(t.dataId).values,[c,l,o]=AA(l,t.shape,t.dtype,u),r.makeTensorInfo(c,l,o);if("int32"===u)return l=r,o=new mv((c=t).shape,"return float(int(x));"),{dataId:(l=l.runWebGLProgram(o,[c],"int32")).dataId,shape:l.shape,dtype:l.dtype};if("bool"===u)return s={a:t,b:a=r.makeTensorInfo([],"bool",f.Ji.getTypedArrayFromDType("bool",1))},s=hb({inputs:s,backend:r}),r.disposeIntermediateTensorInfo(a),s;throw new Error(`Error in Cast: failed to cast ${t.dtype} to `+u)}},Ht=Iv({opSnippet:Ut="return ceil(x);",packedOpSnippet:Ut,cpuKernelImpl:vA}),Wt={kernelName:f.C,backendName:"webgl",kernelFunc:Ht};
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
/**
 * @license
 * Copyright 2017 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
class db{constructor(e){this.variableNames=["A"],this.customUniforms=[{name:"minVal",type:"float"},{name:"maxVal",type:"float"}],this.outputShape=e,this.userCode="\n\n      void main() {\n        float value = getAAtOutCoords();\n        if (isnan(value)) {\n          setOutput(value);\n          return;\n        }\n\n        setOutput(clamp(value, minVal, maxVal));\n      }\n    "
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */}}class pb{constructor(e){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.customUniforms=[{name:"minVal",type:"float"},{name:"maxVal",type:"float"}],this.outputShape=e,this.userCode="\n      void main() {\n        vec4 value = getAAtOutCoords();\n\n        if (any(isnan(value))) {\n          setOutput(value);\n          return;\n        }\n\n        setOutput(clamp(value, vec4(minVal), vec4(maxVal)));\n      }\n    "
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */}}A={kernelName:f.D,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;e=t.x;var{clipValueMin:i,clipValueMax:o}=r;let a;return a=new(Object(f.hf)().getBool("WEBGL_PACK_CLIP")?pb:db)(e.shape),n.runWebGLProgram(a,[e],e.dtype,[[i],[o]])}};
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
class mb{constructor(e){this.variableNames=["real","imag"],this.outputShape=e,this.userCode="\n      void main() {\n        float re = abs(getRealAtOutCoords());\n        float im = abs(getImagAtOutCoords());\n        float mx = max(re, im);\n\n        // sadly the length function in glsl is not underflow-safe\n        // (at least not on Intel GPUs). So the safe solution is\n        // to ensure underflow-safety in all cases.\n        setOutput(\n          mx == 0.0 ? 0.0 : mx * length(vec2(1, min(re, im)/mx))\n        );\n      }\n    "
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */}}function gb(e,t){return{dataId:t.dataId,dtype:t.dtype,shape:e.shape}}Kt={kernelName:f.F,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n}=e;e=t.x;var r=n.texData.get(e.dataId),i=new mb(e.shape);e=[gb(e,r.complexTensorInfos.real),gb(e,r.complexTensorInfos.imag)];return n.runWebGLProgram(i,e,e[0].dtype)}};
/**
 * @license
 * Copyright 2017 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
class Ab{constructor(e){this.outputShape=[],this.outputShape=f.de.computeOutShape(e,1),this.variableNames=e.map((e,t)=>"T"+t);const t=new Array(e.length-1);t[0]=e[0][1];for(let n=1;n<t.length;n++)t[n]=t[n-1]+e[n][1];const n=[`if (yC < ${t[0]}) setOutput(getT0(yR, yC));`];for(let e=1;e<t.length;e++){var r=t[e-1];n.push(`else if (yC < ${t[e]}) setOutput(getT${e}(yR, yC-${r}));`)}var i=t.length,o=t[t.length-1];n.push(`else setOutput(getT${i}(yR, yC-${o}));`),this.userCode=`\n      void main() {\n        ivec2 coords = getOutputCoords();\n        int yR = coords.x;\n        int yC = coords.y;\n\n        ${n.join("\n        ")}\n      }\n    `}}
/**
 * @license
 * Copyright 2019 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */class vb{constructor(e,t){this.packedInputs=!0,this.packedOutput=!0,this.outputShape=[],this.outputShape=f.de.computeOutShape(e,t);var n=this.outputShape,r=n.length,i=Gg(r),o=uv("coords",r);const a=["x","y","z","w","u","v"].slice(0,r),s=(this.variableNames=e.map((e,t)=>"T"+t),new Array(e.length-1));s[0]=e[0][t];for(let n=1;n<s.length;n++)s[n]=s[n-1]+e[n][t];var u=a[t];const c=a.slice(-2);var l=a.join();let h=`if (${u} < ${s[0]}) {\n        return getChannel(\n            getT0(${l}), vec2(${c.join()}));\n        }`;for(let e=1;e<s.length;e++){const t=s[e-1];h+=`\n        if (${u} < ${s[e]}  && ${u} >= ${s[e-1]}) {\n          return getChannel(\n            getT${e}(${bb(a,u,t)}),\n            vec2(${bb(c,u,t)}));\n        }`}l=s.length;const d=s[s.length-1];h+=`\n        return getChannel(\n          getT${l}(${bb(a,u,d)}),\n          vec2(${bb(c,u,d)}));`,this.userCode=`\n      float getValue(${a.map(e=>"int "+e)}) {\n        ${h}\n      }\n\n      void main() {\n        ${i} coords = getOutputCoords();\n        vec4 result = vec4(getValue(${o}), 0., 0., 0.);\n\n        ${o[r-1]} = ${o[r-1]} + 1;\n        if (${o[r-1]} < ${n[r-1]}) {\n          result.g = getValue(${o});\n        }\n\n        ${o[r-2]} = ${o[r-2]} + 1;\n        if (${o[r-2]} < ${n[r-2]}) {\n          result.a = getValue(${o});\n        }\n\n        ${o[r-1]} = ${o[r-1]} - 1;\n        if (${o[r-2]} < ${n[r-2]} &&\n            ${o[r-1]} < ${n[r-1]}) {\n          result.b = getValue(${o});\n        }\n        setOutput(result);\n      }\n    `}}function bb(e,t,n){const r=e.indexOf(t);return e.map((e,t)=>t===r?e+" - "+n:e).join()}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function yb(e){const{inputs:t,backend:n}=e;return e=t.input,Sv({inputs:{x:n.texData.get(e.dataId).complexTensorInfos.imag},backend:n})}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function wb(e){const{inputs:t,backend:n,attrs:r}=e;e=r.axis,e=f.Ji.parseAxisParam(e,t[0].shape)[0];var i=t.map(e=>e.shape);f.de.assertParamsConsistent(i,e),i=f.de.computeOutShape(t.map(e=>e.shape),e);return 0===f.Ji.sizeFromShape(i)?n.makeTensorInfo(i,t[0].dtype,[]):1===(i=t.filter(e=>0<f.Ji.sizeFromShape(e.shape))).length?Sv({inputs:{x:i[0]},backend:n}):
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function e(t,n,r){var i=t[0].dtype;if("complex64"===i){const i=t.map(e=>fb({inputs:{input:e},backend:r})),s=t.map(e=>yb({inputs:{input:e},backend:r}));var o=e(i,n,r),a=e(s,n,r);const u=_v({inputs:{real:o,imag:a},backend:r});return i.forEach(e=>r.disposeIntermediateTensorInfo(e)),s.forEach(e=>r.disposeIntermediateTensorInfo(e)),r.disposeIntermediateTensorInfo(o),r.disposeIntermediateTensorInfo(a),u}let s=r.shouldExecuteOnCPU(t);if(s="string"===i||s){const e=t.map(e=>{var t=f.Ji.sizeFromShape(e.shape.slice(n));return Uv({inputs:{x:e},backend:r,attrs:{shape:[-1,t]}})});o=e.map(e=>({vals:r.readSync(e.dataId),shape:e.shape}));const s=f.de.computeOutShape(e.map(e=>e.shape),1);return a=1===e[0].shape[0],o=bA(o,s,i,a),a=f.de.computeOutShape(t.map(e=>e.shape),n),a=r.makeTensorInfo(a,i,o),e.forEach(e=>r.disposeIntermediateTensorInfo(e)),a}const u=t.filter(e=>0<f.Ji.sizeFromShape(e.shape));if(o=Object(f.hf)().getBool("WEBGL_PACK_ARRAY_OPERATIONS")&&1<u[0].shape.length,1===u.length){const e=new(o?mv:vv)(t[0].shape,Av);return r.runWebGLProgram(e,t,i)}var c,l,h=Object(f.hf)().getNumber("WEBGL_MAX_TEXTURES_IN_SHADER");if(u.length>h){const t=[];for(let i=0;i<u.length;i+=h){var d=u.slice(i,i+h);t.push(e(d,n,r))}const i=e(t,n,r);for(const e of t)r.disposeIntermediateTensorInfo(e);return i}if(o){const e=new vb(u.map(e=>e.shape),n);return r.runWebGLProgram(e,u,i)}a=u,c=n,l=r,t=f.de.computeOutShape(a.map(e=>e.shape),c);const{tensors2D:p,outShape:m}={tensors2D:a=a.map(e=>Uv({inputs:{x:e},attrs:{shape:[-1,f.Ji.sizeFromShape(e.shape.slice(c))]},backend:l})),outShape:t},g=new Ab(p.map(e=>e.shape)),A=r.runWebGLProgram(g,p,i);return p.forEach(e=>r.disposeIntermediateTensorInfo(e)),o=Uv({inputs:{x:A},attrs:{shape:m},backend:r}),r.disposeIntermediateTensorInfo(A),o}(i,e,n)}Yt={kernelName:f.Bb,backendName:"webgl",kernelFunc:yb},en={kernelName:f.G,backendName:"webgl",kernelFunc:wb};
/**
 * @license
 * Copyright 2017 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
class xb{constructor(e,t=!1,n=null,r=!1,i=!1){this.variableNames=["x","W"],this.outputShape=e.outShape;var o=e.padInfo.top,a=e.padInfo.left,s=e.strideHeight,u=e.strideWidth,c=e.dilationHeight,l=e.dilationWidth,h=e.filterHeight,f=e.filterWidth,d=4*Math.floor(e.inChannels/4),p=e.inChannels%4,m="channelsLast"===e.dataFormat,g=m?1:2,A=m?2:3,v=m?3:1;let b="",y="";n&&(b=r?`float activation(float a) {\n          float b = getPreluActivationWeightsAtOutCoords();\n          ${n}\n        }`:i?`float activation(float a) {\n          float b = getLeakyreluAlphaAtOutCoords();\n          ${n}\n        }`:`\n          float activation(float x) {\n            ${n}\n          }\n        `,y="result = activation(result);"),n=t?"result += getBiasAtOutCoords();":"",t&&this.variableNames.push("bias"),r&&this.variableNames.push("preluActivationWeights"),i&&this.variableNames.push("leakyreluAlpha"),this.userCode=`\n      ${b}\n\n      const ivec2 strides = ivec2(${s}, ${u});\n      const ivec2 pads = ivec2(${o}, ${a});\n\n      void main() {\n        ivec4 coords = getOutputCoords();\n        int batch = coords[0];\n        int d2 = coords[${v}];\n\n        ivec2 xRCCorner =\n            ivec2(coords[${g}], coords[${A}]) * strides - pads;\n        int xRCorner = xRCCorner.x;\n        int xCCorner = xRCCorner.y;\n\n        // Convolve x(?, ?, d1) with w(:, :, d1, d2) to get y(yR, yC, d2).\n        // ? = to be determined. : = across all values in that axis.\n        float dotProd = 0.0;\n        for (int wR = 0; wR < ${h}; wR++) {\n          int xR = xRCorner + wR * ${c};\n\n          if (xR < 0 || xR >= ${e.inHeight}) {\n            continue;\n          }\n\n          for (int wC = 0; wC < ${f}; wC++) {\n            int xC = xCCorner + wC * ${l};\n\n            if (xC < 0 || xC >= ${e.inWidth}) {\n              continue;\n            }\n\n            for (int d1 = 0; d1 < ${d}; d1 += 4) {\n              vec4 wValues = vec4(\n                getW(wR, wC, d1, d2),\n                getW(wR, wC, d1 + 1, d2),\n                getW(wR, wC, d1 + 2, d2),\n                getW(wR, wC, d1 + 3, d2)\n              );\n\n              if (${m}) {\n                vec4 xValues = vec4(\n                  getX(batch, xR, xC, d1),\n                  getX(batch, xR, xC, d1 + 1),\n                  getX(batch, xR, xC, d1 + 2),\n                  getX(batch, xR, xC, d1 + 3)\n                );\n                dotProd += dot(xValues, wValues);\n              } else {\n                vec4 xValues = vec4(\n                  getX(batch, d1, xR, xC),\n                  getX(batch, d1 + 1, xR, xC),\n                  getX(batch, d1 + 2, xR, xC),\n                  getX(batch, d1 + 3, xR, xC)\n                );\n                dotProd += dot(xValues, wValues);\n              }\n            }\n\n            if (${1==p}) {\n\n              if (${m}) {\n                dotProd +=\n                    getX(batch, xR, xC, ${d}) *\n                    getW(wR, wC, ${d}, d2);\n              } else {\n                dotProd +=\n                    getX(batch, ${d}, xR, xC) *\n                    getW(wR, wC, ${d}, d2);\n              }\n\n            } else if (${2==p}) {\n              vec2 wValues = vec2(\n                getW(wR, wC, ${d}, d2),\n                getW(wR, wC, ${d} + 1, d2)\n              );\n\n              if (${m}) {\n                vec2 xValues = vec2(\n                  getX(batch, xR, xC, ${d}),\n                  getX(batch, xR, xC, ${d} + 1)\n                );\n                dotProd += dot(xValues, wValues);\n              } else {\n                vec2 xValues = vec2(\n                  getX(batch, ${d}, xR, xC),\n                  getX(batch, ${d} + 1, xR, xC)\n                );\n                dotProd += dot(xValues, wValues);\n              }\n\n            } else if (${3==p}) {\n              vec3 wValues = vec3(\n                getW(wR, wC, ${d}, d2),\n                getW(wR, wC, ${d} + 1, d2),\n                getW(wR, wC, ${d} + 2, d2)\n              );\n\n              if (${m}) {\n                vec3 xValues = vec3(\n                  getX(batch, xR, xC, ${d}),\n                  getX(batch, xR, xC, ${d} + 1),\n                  getX(batch, xR, xC, ${d} + 2)\n                );\n                dotProd += dot(xValues, wValues);\n              } else {\n                vec3 xValues = vec3(\n                  getX(batch, ${d}, xR, xC),\n                  getX(batch, ${d} + 1, xR, xC),\n                  getX(batch, ${d} + 2, xR, xC)\n                );\n                dotProd += dot(xValues, wValues);\n              }\n\n            }\n          }\n        }\n\n        float result = dotProd;\n        ${n}\n        ${y}\n        setOutput(result);\n      }\n    `}}class Cb{constructor(e){this.variableNames=["x","W"],this.outputShape=e.outShape;var t=e.padInfo.front,n=e.padInfo.top,r=e.padInfo.left,i=e.strideDepth,o=e.strideHeight,a=e.strideWidth,s=e.dilationDepth,u=e.dilationHeight,c=e.dilationWidth,l=e.filterDepth,h=e.filterHeight,f=e.filterWidth,d=4*Math.floor(e.inChannels/4),p=e.inChannels%4;this.userCode=`\n      const ivec3 strides = ivec3(${i}, ${o}, ${a});\n      const ivec3 pads = ivec3(${t}, ${n}, ${r});\n\n      void main() {\n        ivec5 coords = getOutputCoords();\n        int batch = coords.x;\n        int d2 = coords.u;\n\n        ivec3 xFRCCorner = ivec3(coords.y, coords.z, coords.w) * strides - pads;\n        int xFCorner = xFRCCorner.x;\n        int xRCorner = xFRCCorner.y;\n        int xCCorner = xFRCCorner.z;\n\n        // Convolve x(?, ?, ?, d1) with w(:, :, :, d1, d2) to get\n        // y(yF, yR, yC, d2). ? = to be determined. : = across all\n        // values in that axis.\n        float dotProd = 0.0;\n        for (int wF = 0; wF < ${l}; wF++) {\n          int xF = xFCorner + wF * ${s};\n\n          if (xF < 0 || xF >= ${e.inDepth}) {\n            continue;\n          }\n\n          for (int wR = 0; wR < ${h}; wR++) {\n            int xR = xRCorner + wR * ${u};\n\n            if (xR < 0 || xR >= ${e.inHeight}) {\n              continue;\n            }\n\n            for (int wC = 0; wC < ${f}; wC++) {\n              int xC = xCCorner + wC * ${c};\n\n              if (xC < 0 || xC >= ${e.inWidth}) {\n                continue;\n              }\n\n              for (int d1 = 0; d1 < ${d}; d1 += 4) {\n                vec4 xValues = vec4(\n                  getX(batch, xF, xR, xC, d1),\n                  getX(batch, xF, xR, xC, d1 + 1),\n                  getX(batch, xF, xR, xC, d1 + 2),\n                  getX(batch, xF, xR, xC, d1 + 3)\n                );\n                vec4 wValues = vec4(\n                  getW(wF, wR, wC, d1, d2),\n                  getW(wF, wR, wC, d1 + 1, d2),\n                  getW(wF, wR, wC, d1 + 2, d2),\n                  getW(wF, wR, wC, d1 + 3, d2)\n                );\n\n                dotProd += dot(xValues, wValues);\n              }\n\n              if (${1==p}) {\n                dotProd +=\n                  getX(batch, xF, xR, xC, ${d}) *\n                  getW(wF, wR, wC, ${d}, d2);\n              } else if (${2==p}) {\n                vec2 xValues = vec2(\n                  getX(batch, xF, xR, xC, ${d}),\n                  getX(batch, xF, xR, xC, ${d} + 1)\n                );\n                vec2 wValues = vec2(\n                  getW(wF, wR, wC, ${d}, d2),\n                  getW(wF, wR, wC, ${d} + 1, d2)\n                );\n                dotProd += dot(xValues, wValues);\n              } else if (${3==p}) {\n                vec3 xValues = vec3(\n                  getX(batch, xF, xR, xC, ${d}),\n                  getX(batch, xF, xR, xC, ${d} + 1),\n                  getX(batch, xF, xR, xC, ${d} + 2)\n                );\n                vec3 wValues = vec3(\n                  getW(wF, wR, wC, ${d}, d2),\n                  getW(wF, wR, wC, ${d} + 1, d2),\n                  getW(wF, wR, wC, ${d} + 2, d2)\n                );\n                dotProd += dot(xValues, wValues);\n              }\n            }\n          }\n        }\n        setOutput(dotProd);\n      }\n    `}}
/**
 * @license
 * Copyright 2022 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */class kb{constructor(e,t=!1,n=null,r=!1,i=!1){this.variableNames=["x","W"],this.packedInputs=!0,this.packedOutput=!0,this.customUniforms=[{name:"pads",type:"ivec2"},{name:"strides",type:"ivec2"},{name:"dilations",type:"ivec2"},{name:"inDims",type:"ivec2"}],this.outputShape=e.outShape,this.enableShapeUniforms=Zg(this.outputShape.length);var o=e.padInfo.left,a=e.strideWidth,s=e.dilationWidth,u=e.filterHeight,c=e.filterWidth,l=c;let h="\n       int xR; int xC; int xCOffset;\n       vec4 wTexel; vec4 previous; vec4 final;";for(let e=0;e<c;e++)h+=`\n           vec4 xTexelC${2*e};\n           int xTexelC${2*e}Ready;\n           vec4 xTexelC${2*e+1};\n           int xTexelC${2*e+1}Ready;\n           vec4 xC${e};`;h+=`\n     for (int r = 0; r < ${u}; r++) {\n      for (int d1 = 0; d1 < ${e.inChannels}; d1 += 2) {\n       `;for(let e=0;e<c;e++)h+=`\n           xTexelC${2*e} = vec4(0.0);\n           xTexelC${2*e}Ready = 0;\n           xTexelC${2*e+1} = vec4(0.0);\n           xTexelC${2*e+1}Ready = 0;\n           xC${e} = vec4(0.0);`;h+="\n         xR = xRCorner + r * dilations[0];\n         if (xR >=0 && xR < inDims[0]) {\n       ";for(let t=0;t<(l+1)/2;t++){var d,p=2*t;h+=`\n           xC = xCCorner + ${p*s};\n           `,1===a?p<c&&(o%2==1?h=h+`\n                 xCOffset = xC + 1;\n                 if (xCOffset >= 0 && xCOffset < inDims[1] && xTexelC${p}Ready == 0) {\n                   xTexelC${p} = getX(batch, xR, xCOffset, d1);\n\n                   // Need to manually clear unused channels in case\n                   // we're reading from recycled texture.\n                   if (xCOffset + 1 >= inDims[1]) {\n                     xTexelC${p}.zw = vec2(0.0);\n                   }\n                   xTexelC${p}Ready = 1;\n                 }\n               `+(1===s&&0<p?`\n                 xC${p} = vec4(xTexelC${p-2}.zw, xTexelC${p}.xy);\n                 `:`\n                   xCOffset = xC + 1 - 2;\n\n                   if (xCOffset >= 0 && xCOffset < inDims[1]) {\n                     previous = getX(batch, xR, xCOffset, d1);\n\n                     // Need to manually clear unused channels in case\n                     // we're reading from recycled texture.\n                     if (xCOffset + 1 >= inDims[1]) {\n                       previous.zw = vec2(0.0);\n                     }\n\n                     xC${p} = vec4(previous.zw, xTexelC${p}.xy);\n                   } else {\n                     xC${p} = vec4(0.0, 0.0, xTexelC${p}.xy);\n                   }\n                   `):h+=`\n                 if (xC >= 0 && xC < inDims[1] && xTexelC${p}Ready == 0) {\n                   xTexelC${p} = getX(batch, xR, xC, d1);\n                   if (xC + 1 >= inDims[1]) {\n                     xTexelC${p}.zw = vec2(0.0);\n                   }\n                   xTexelC${p}Ready = 1;\n                 }\n\n                 xC${p} = xTexelC${p};\n                 `,1+p<c&&(d=o%2==0?f.Ji.nearestLargerEven(s):s,s%2==0&&o%2==1||s%2!=0&&o%2!=1?h=h+`\n                   xCOffset = xC + imod(pads[1], 2) + ${d};\n\n                   if (xCOffset >= 0 && xCOffset < inDims[1] && xTexelC${1+p}Ready == 0) {\n                     xTexelC${1+p} = getX(batch, xR, xCOffset, d1);\n\n                     // Need to manually clear unused channels in case\n                     // we're reading from recycled texture.\n                     if (xCOffset + 1 >= inDims[1]) {\n                       xTexelC${1+p}.zw = vec2(0.0);\n                     }\n                     xTexelC${1+p}Ready = 1;\n                   }\n                   `+(1<s?`\n                     xCOffset -= 2;\n                     if (xCOffset >= 0 && xCOffset < inDims[1]) {\n                      previous = getX(batch, xR, xCOffset, d1);\n                      xC${1+p} = vec4(previous.zw, xTexelC${1+p}.xy);\n                     } else {\n                      xC${1+p} = vec4(0.0, 0.0, xTexelC${1+p}.xy);\n                     }\n                     `:`\n                     xC${1+p} = vec4(xTexelC${p}.zw, xTexelC${1+p}.xy);\n                     `):h+=1===d?`\n                     xC${1+p} = xTexelC${p};\n                     `:`\n                     xCOffset = xC + ${d};\n\n                     if (xCOffset >= 0 && xCOffset < inDims[1] && xTexelC${1+p}Ready == 0) {\n                       xTexelC${1+p} = getX(batch, xR, xCOffset, d1);\n                       if (xCOffset + 1 >= inDims[1]) {\n                         xTexelC${1+p}.zw = vec2(0.0);\n                       }\n                       xTexelC${1+p}Ready = 1;\n                     }\n\n                     xC${1+p} = xTexelC${1+p};\n                     `)):p<c&&(o%2==1?(h+=`\n                 xCOffset = xC + 1 - strides[1];\n                 if(xCOffset >= 0 && xCOffset < inDims[1] && xTexelC${p}Ready == 0) {\n                   xTexelC${p} = getX(batch, xR, xCOffset, d1);\n                   // Need to manually clear unused channels in case\n                   // we're reading from recycled texture.\n                   if (xCOffset + 1 >= inDims[1]) {\n                     xTexelC${p}.zw = vec2(0.0);\n                   }\n                   xTexelC${p}Ready = 1;\n                 }\n\n                 if(xC + 1 >= 0 && xC + 1 < inDims[1] && xTexelC${1+p}Ready == 0) {\n                   xTexelC${1+p} = getX(batch, xR, xC + 1, d1);\n                   // Need to manually clear unused channels in case\n                   // we're reading from recycled texture.\n                   if (xC + 2 >= inDims[1]) {\n                     xTexelC${1+p}.zw = vec2(0.0);\n                   }\n                   xTexelC${1+p}Ready = 1;\n                 }\n\n                 xC${p} = vec4(xTexelC${p}.zw, xTexelC${1+p}.zw);\n               `,1+p<c&&(h+=`\n                   final = vec4(0.0);\n                   xCOffset = xC + 1 + strides[1];\n                   if(xCOffset >= 0 && xCOffset < inDims[1]) {\n                     final = getX(batch, xR, xCOffset, d1);\n                   }\n                   xC${1+p} = vec4(xTexelC${1+p}.xy, final.xy);\n                 `)):(h+=`\n                 if(xC >= 0 && xC < inDims[1] && xTexelC${p}Ready == 0) {\n                   xTexelC${p} = getX(batch, xR, xC, d1);\n                   if (xC + 1 >= inDims[1]) {\n                     xTexelC${p}.zw = vec2(0.0);\n                   }\n                   xTexelC${p}Ready = 1;\n                 }\n\n                 xCOffset = xC + strides[1];\n                 if(xCOffset >= 0 && xCOffset < inDims[1] && xTexelC${1+p}Ready == 0) {\n                   xTexelC${1+p} = getX(batch, xR, xCOffset, d1);\n                   if (xCOffset + 1 >= inDims[1]) {\n                     xTexelC${1+p}.zw = vec2(0.);\n                   }\n                   xTexelC${1+p}Ready = 1;\n                 }\n\n                 xC${p} = vec4(\n                   xTexelC${p}.xy, xTexelC${1+p}.xy);\n               `,1+p<c&&(h+=`\n                   xC${1+p} = vec4(xTexelC${p}.zw, xTexelC${1+p}.zw);\n                 `))),p<c&&(h+=`\n             wTexel = getW(r, ${p}, d1, d2);\n             dotProd += xC${p}.xxzz * vec4(wTexel.xy, wTexel.xy);\n             if(d1 + 1 < ${e.inChannels}) {\n               dotProd += xC${p}.yyww * vec4(wTexel.zw, wTexel.zw);\n             }\n           `,1+p<c&&(h+=`\n               wTexel = getW(r, ${1+p}, d1, d2);\n               dotProd += xC${1+p}.xxzz * vec4(wTexel.xy, wTexel.xy);\n               if(d1 + 1 < ${e.inChannels}) {\n                 dotProd += xC${1+p}.yyww * vec4(wTexel.zw, wTexel.zw);\n               }\n             `))}h=(h+="\n     }\n   ")+"\n     }\n   \n     }\n   ";let m="",g="";n&&(m=r?`vec4 activation(vec4 a) {\n           vec4 b = getPreluActivationWeightsAtOutCoords();\n           ${n}\n         }`:i?`vec4 activation(vec4 a) {\n           vec4 b = getLeakyreluAlphaAtOutCoords();\n           ${n}\n         }`:`vec4 activation(vec4 x) {\n           ${n}\n         }`,g="result = activation(result);"),u=t?"result += getBiasAtOutCoords();":"",t&&this.variableNames.push("bias"),r&&this.variableNames.push("preluActivationWeights"),i&&this.variableNames.push("leakyreluAlpha"),this.userCode=`\n       ${m}\n\n       void main() {\n         ivec4 coords = getOutputCoords();\n         int batch = coords.x;\n         ivec2 xRCCorner = coords.yz * strides - pads;\n         int d2 = coords.w;\n         int xRCorner = xRCCorner.x;\n         int xCCorner = xRCCorner.y;\n\n         //intialize dotProd with a small epsilon seems to reduce GPU accuracy loss.\n         vec4 dotProd = vec4(0.000000000000001);\n\n         ${h}\n\n         vec4 result = dotProd - vec4(0.000000000000001);\n         ${u}\n         ${g}\n         setOutput(result);\n       }\n     `}}
/**
 * @license
 * Copyright 2019 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */class Eb{constructor(e,t){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.customUniforms=[{name:"inputShape",type:"ivec4"},{name:"pad",type:"ivec2"},{name:"stride",type:"ivec2"},{name:"dilation",type:"ivec2"},{name:"inChannels",type:"int"},{name:"itemsPerBlockRow",type:"int"},{name:"outWidth",type:"int"}],this.outputShape=e,this.enableShapeUniforms=Zg(this.outputShape.length);t=t.dataFormat;var n=Bg(),r="channelsLast"===t,i=r?1:2,o=r?2:3,a=this.enableShapeUniforms?"if(blockIndex < outShape[2] && pos < outShape[1]) {":`if(blockIndex < ${e[2]} && pos < ${e[1]}) {`;let s="";for(let e=0;e<=1;e++)for(let t=0;t<=1;t++)s+=`\n          blockIndex = rc.z + ${t};\n          pos = rc.y + ${e};\n\n          ${a}\n            offsetY = int(blockIndex / outWidth) * stride[0] - pad[0];\n            d0 = offsetY + dilation[0] * (pos / itemsPerBlockRow);\n\n            if(d0 < inputShape[${i}] && d0 >= 0) {\n              // Use custom imod instead mod. On Intel GPU, mod may generate\n              // unexpected value.\n              // https://github.com/tensorflow/tfjs/issues/5447\n              offsetX = imod(blockIndex, outWidth) * stride[1] - pad[1];\n              d1 = offsetX + dilation[1] * (imod(pos, itemsPerBlockRow) /\n                  inChannels);\n\n              if(d1 < inputShape[${o}] && d1 >= 0) {\n\n                ch = imod(pos, inChannels);\n\n                if (${r}) {\n                  innerDims = vec2(d1, ch);\n                  result[${2*e+t}] = getChannel(\n                    getA(rc.x, d0, int(innerDims.x),\n                    int(innerDims.y)), innerDims);\n                } else {\n                  innerDims = vec2(d0, d1);\n                  result[${2*e+t}] = getChannel(\n                    getA(rc.x, ch, int(innerDims.x),\n                    int(innerDims.y)), innerDims);\n                }\n              }\n            }\n          }\n        `;this.userCode=`\n      void main() {\n        ivec3 rc = getOutputCoords();\n\n        vec4 result = vec4(0);\n\n        int blockIndex, pos, offsetY, d0, offsetX, d1, ch;\n        vec2 innerDims;\n\n        ${s}\n\n        ${n.output} = result;\n      }\n    `}}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function Sb(e,t){var n=e.length;return 3<=n?t?[...e.slice(0,-3),e[n-3]*e[n-2],e[n-1]]:[...e.slice(0,-3),e[n-3],e[n-2]*e[n-1]]:!t&&1===n&&1<e[0]?[e[0],1]:null}function _b({x:e,filter:t,convInfo:n,backend:r,bias:i=null,preluActivationWeights:o=null,leakyreluAlpha:a=0,activation:s=null}){const u=e.shape,c=r.texData.get(e.dataId);var l=n.inChannels,h=u[0]*u[1]*u[2],d=n.outChannels,p="channelsLast"===n.dataFormat;let m;const g=[];if(null==o||null!=(A=Sb(o.shape,p))&&(o=Uv({inputs:{x:o},backend:r,attrs:{shape:A}}),g.push(o)),null==i||null!=(A=Sb(i.shape,p))&&(i=Uv({inputs:{x:i},backend:r,attrs:{shape:A}}),g.push(i)),(1!=h&&1!==d||!(l>1e3))&&c.isPacked&&p&&null!=c.texture&&u[2]%2!=0&&f.Ji.arraysEqual(c.shape.slice(-3),u.slice(-3))){var A=u[0]*u[1]*(u[2]+1);const p={dataId:e.dataId,shape:[1,A,n.inChannels],dtype:e.dtype};h=c.shape,c.shape=c.shape.slice(),c.shape[c.shape.length-2]++,f.Ji.assert(Cg(c.shape,p.shape),()=>`packed reshape ${c.shape} to ${p.shape} isn't free`),d=Uv({inputs:{x:t},backend:r,attrs:{shape:[1,n.inChannels,n.outChannels]}}),g.push(d),l=Kv({a:p,b:d,backend:r,transposeA:!1,transposeB:!1,bias:i,activation:s,preluActivationWeights:o,leakyreluAlpha:a});const v=r.texData.get(l.dataId);f.Ji.assert(v.isPacked,()=>"batchMatMul result is expected to be packed"),c.shape=h,v.shape=n.outShape,(m=Sv({inputs:{x:l},backend:r})).shape=n.outShape,g.push(l)}else A=n.outHeight*n.outWidth,d=Uv({inputs:{x:e},backend:r,attrs:{shape:p?[n.batchSize,A,n.inChannels]:[n.batchSize,n.inChannels,A]}}),h=Uv({inputs:{x:t},backend:r,attrs:{shape:[1,n.inChannels,n.outChannels]}}),m=Uv({inputs:{x:l=Kv({a:p?d:h,b:p?h:d,transposeA:!p,transposeB:!1,backend:r,bias:i,activation:s,preluActivationWeights:o,leakyreluAlpha:a})},backend:r,attrs:{shape:n.outShape}}),g.push(d),g.push(h),g.push(l);for(const e of g)r.disposeIntermediateTensorInfo(e);return m}function Ob({x:e,filter:t,convInfo:n,backend:r,bias:i=null,preluActivationWeights:o=null,leakyreluAlpha:a=0,activation:s=null}){var{filterWidth:u,filterHeight:c,inChannels:l,outWidth:h,outHeight:d,dataFormat:p}=n,p="channelsLast"===p,u=u*c*l,c=d*h,l=[n.batchSize,u,c];const m=[];null!=o&&null!=(d=Sb(o.shape,p))&&(o=Uv({inputs:{x:o},backend:r,attrs:{shape:d}}),m.push(o)),null!=i&&null!=(h=Sb(i.shape,p))&&(i=Uv({inputs:{x:i},backend:r,attrs:{shape:h}}),m.push(i)),d=Uv({inputs:{x:t},backend:r,attrs:{shape:[1,u,f.Ji.sizeFromShape(t.shape)/u]}}),m.push(d),h=new Eb(l,n),t=[e.shape,[n.padInfo.top,n.padInfo.left],[n.strideHeight,n.strideWidth],[n.dilationHeight,n.dilationWidth],[n.inChannels],[n.filterWidth*n.inChannels],[n.outWidth]],h=Uv({inputs:{x:u=r.runWebGLProgram(h,[e],"float32",t)},backend:r,attrs:{shape:l}}),m.push(u),m.push(h),e=null!=i,t=null!=o,l="leakyrelu"===s,u=s?jv(s,!0):null,s=new Nv((p?h:d).shape,(p?d:h).shape,p?[n.batchSize,c,n.outChannels]:[n.batchSize,n.outChannels,c],!0,!1,e,u,t,l);const g=p?[h,d]:[d,h];i&&g.push(i),t&&g.push(o),l&&(c=r.makeTensorInfo([],"float32",f.Ji.createScalarValue(a,"float32")),g.push(c),m.push(c)),u=Uv({inputs:{x:e=r.runWebGLProgram(s,g,"float32")},backend:r,attrs:{shape:n.outShape}}),m.push(e);for(const e of m)r.disposeIntermediateTensorInfo(e);return u}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */rn={kernelName:f.H,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;var i,{x:e,filter:o}=t,{strides:i,pad:a,dataFormat:s,dilations:u,dimRoundingMode:c}=r,s=f.de.convertConv2DDataFormat(s);let l;return s=Uv({inputs:{x:l=1!==(i=f.de.computeConv2DInfo(e.shape,o.shape,i,u,a,c,!1,s)).filterHeight||1!==i.filterWidth||1!==i.dilationHeight||1!==i.dilationWidth||1!==i.strideHeight||1!==i.strideWidth||"SAME"!==i.padInfo.type&&"VALID"!==i.padInfo.type?i.strideWidth<=2&&"channelsLast"===s&&Object(f.hf)().getBool("WEBGL_EXP_CONV")?(u=new kb(i),a=[[i.padInfo.top,i.padInfo.left],[i.strideHeight,i.strideWidth],[i.dilationHeight,i.dilationWidth],[i.inHeight,i.inWidth]],n.runWebGLProgram(u,[e,o],"float32",a)):Object(f.hf)().getBool("WEBGL_CONV_IM2COL")?Ob({x:e,filter:o,convInfo:i,backend:n}):(c=new xb(i),n.runWebGLProgram(c,[e,o],"float32")):_b({x:e,filter:o,convInfo:i,backend:n})},backend:n,attrs:{shape:i.outShape}}),n.disposeIntermediateTensorInfo(l),s}};
/**
 * @license
 * Copyright 2017 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
class Tb{constructor(e){this.variableNames=["x","dy"],this.outputShape=e.filterShape;var t=e.strideHeight,n=e.strideWidth,r=e.padInfo.top,i=e.padInfo.left,o="channelsLast"===e.dataFormat;this.userCode=`\n      void main() {\n        ivec4 coords = getOutputCoords();\n        int wR = coords.x;\n        int wC = coords.y;\n        int d1 = coords.z;\n        int d2 = coords.w;\n\n        // Convolve x(?, ?, d1) with dy(:, :, d2) to get dw(wR, wC, d1, d2).\n        // ? = to be determined. : = across all values in that axis.\n        float dotProd = 0.0;\n\n        for (int b = 0; b < ${e.batchSize}; b++) {\n          for (int yR = 0; yR < ${e.outHeight}; yR++) {\n            int xR = wR + yR * ${t} - ${r};\n\n            if (xR < 0 || xR >= ${e.inHeight}) {\n              continue;\n            }\n\n            for (int yC = 0; yC < ${e.outWidth}; yC++) {\n              int xC = wC + yC * ${n} - ${i};\n\n              if (xC < 0 || xC >= ${e.inWidth}) {\n                continue;\n              }\n\n              if (${o}) {\n                float dyValue = getDy(b, yR, yC, d2);\n                float xValue = getX(b, xR, xC, d1);\n                dotProd += (xValue * dyValue);\n              } else {\n                float dyValue = getDy(b, d2, yR, yC);\n                float xValue = getX(b, d1, xR, xC);\n                dotProd += (xValue * dyValue);\n              }\n\n            }\n          }\n        }\n        setOutput(dotProd);\n      }\n    `}}class Db{constructor(e){this.variableNames=["dy","W"],this.outputShape=e.inShape;var t=e.filterHeight,n=e.filterWidth,r=e.strideHeight,i=e.strideWidth,o="channelsLast"===e.dataFormat,a=t-1-e.padInfo.top,s=n-1-e.padInfo.left;this.userCode=`\n      const ivec2 pads = ivec2(${a}, ${s});\n\n      void main() {\n        ivec4 coords = getOutputCoords();\n        int batch = coords[0];\n        int d1 = coords[${o?3:1}];\n\n        ivec2 dyCorner = ivec2(coords[${o?1:2}], coords[${o?2:3}]) - pads;\n        int dyRCorner = dyCorner.x;\n        int dyCCorner = dyCorner.y;\n\n        // Convolve dy(?, ?, d2) with w(:, :, d1, d2) to compute dx(xR, xC, d1).\n        // ? = to be determined. : = across all values in that axis.\n        float dotProd = 0.0;\n        for (int wR = 0; wR < ${t}; wR++) {\n          float dyR = float(dyRCorner + wR) / ${r}.0;\n\n          if (dyR < 0.0 || dyR >= ${e.outHeight}.0 || fract(dyR) > 0.0) {\n            continue;\n          }\n          int idyR = int(dyR);\n\n          int wRPerm = ${t} - 1 - wR;\n\n          for (int wC = 0; wC < ${n}; wC++) {\n            float dyC = float(dyCCorner + wC) / ${i}.0;\n\n            if (dyC < 0.0 || dyC >= ${e.outWidth}.0 ||\n                fract(dyC) > 0.0) {\n              continue;\n            }\n            int idyC = int(dyC);\n\n            int wCPerm = ${n} - 1 - wC;\n\n            for (int d2 = 0; d2 < ${e.outChannels}; d2++) {\n\n              if (${o}) {\n                float xValue = getDy(batch, idyR, idyC, d2);\n                float wValue = getW(wRPerm, wCPerm, d1, d2);\n                dotProd += xValue * wValue;\n              } else {\n                float xValue = getDy(batch, d2, idyR, idyC);\n                float wValue = getW(wRPerm, wCPerm, d1, d2);\n                dotProd += xValue * wValue;\n              }\n\n            }\n          }\n        }\n        setOutput(dotProd);\n      }\n    `}}class Bb{constructor(e){this.variableNames=["x","dy"],this.outputShape=e.filterShape;var t=e.strideDepth,n=e.strideHeight,r=e.strideWidth,i=e.padInfo.front,o=e.padInfo.top,a=e.padInfo.left;this.userCode=`\n      void main() {\n        ivec5 coords = getOutputCoords();\n        int wF = coords.x;\n        int wR = coords.y;\n        int wC = coords.z;\n        int d1 = coords.w;\n        int d2 = coords.u;\n\n        float dotProd = 0.0;\n\n        for (int b = 0; b < ${e.batchSize}; b++) {\n          for (int yF = 0; yF < ${e.outDepth}; yF++) {\n            int xF = wF + yF * ${t} - ${i};\n\n            if (xF < 0 || xF >= ${e.inDepth}) {\n              continue;\n            }\n\n            for (int yR = 0; yR < ${e.outHeight}; yR++) {\n              int xR = wR + yR * ${n} - ${o};\n\n              if (xR < 0 || xR >= ${e.inHeight}) {\n                continue;\n              }\n\n              for (int yC = 0; yC < ${e.outWidth}; yC++) {\n                int xC = wC + yC * ${r} - ${a};\n\n                if (xC < 0 || xC >= ${e.inWidth}) {\n                  continue;\n                }\n\n                float dyValue = getDy(b, yF, yR, yC, d2);\n                float xValue = getX(b, xF, xR, xC, d1);\n                dotProd += (xValue * dyValue);\n              }\n            }\n          }\n        }\n        setOutput(dotProd);\n      }\n    `}}class Ib{constructor(e){this.variableNames=["dy","W"],this.outputShape=e.inShape;var t=e.filterDepth,n=e.filterHeight,r=e.filterWidth,i=e.strideDepth,o=e.strideHeight,a=e.strideWidth,s=t-1-e.padInfo.front,u=n-1-e.padInfo.top,c=r-1-e.padInfo.left;this.userCode=`\n      const ivec3 pads = ivec3(${s}, ${u}, ${c});\n\n      void main() {\n        ivec5 coords = getOutputCoords();\n        int batch = coords.x;\n        int d1 = coords.u;\n\n\n        ivec3 dyCorner = ivec3(coords.y, coords.z, coords.w) - pads;\n        int dyFCorner = dyCorner.x;\n        int dyRCorner = dyCorner.y;\n        int dyCCorner = dyCorner.z;\n\n        float dotProd = 0.0;\n        for (int wF = 0; wF < ${t}; wF++) {\n          float dyF = float(dyFCorner + wF) / ${i}.0;\n\n          if (dyF < 0.0 || dyF >= ${e.outDepth}.0 || fract(dyF) > 0.0) {\n            continue;\n          }\n          int idyF = int(dyF);\n\n          int wFPerm = ${t} - 1 - wF;\n\n          for (int wR = 0; wR < ${n}; wR++) {\n            float dyR = float(dyRCorner + wR) / ${o}.0;\n\n            if (dyR < 0.0 || dyR >= ${e.outHeight}.0 ||\n              fract(dyR) > 0.0) {\n              continue;\n            }\n            int idyR = int(dyR);\n\n            int wRPerm = ${n} - 1 - wR;\n\n            for (int wC = 0; wC < ${r}; wC++) {\n              float dyC = float(dyCCorner + wC) / ${a}.0;\n\n              if (dyC < 0.0 || dyC >= ${e.outWidth}.0 ||\n                  fract(dyC) > 0.0) {\n                continue;\n              }\n              int idyC = int(dyC);\n\n              int wCPerm = ${r} - 1 - wC;\n\n              for (int d2 = 0; d2 < ${e.outChannels}; d2++) {\n                float xValue = getDy(batch, idyF, idyR, idyC, d2);\n                float wValue = getW(wFPerm, wRPerm, wCPerm, d1, d2);\n                dotProd += xValue * wValue;\n              }\n            }\n          }\n        }\n        setOutput(dotProd);\n      }\n    `}}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */on={kernelName:f.I,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;var{x:e,dy:i}=t,{strides:o,pad:a,dataFormat:s,dimRoundingMode:u,filterShape:c}=r,s=f.de.convertConv2DDataFormat(s),c=f.de.computeConv2DInfo(e.shape,c,o,1,a,u,!1,s),o=new Tb(c);return n.runWebGLProgram(o,[e,i],"float32")}},
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
cn={kernelName:f.J,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;var{dy:e,filter:i}=t,{inputShape:o,strides:a,pad:s,dataFormat:u,dimRoundingMode:c}=r,u=f.de.convertConv2DDataFormat(u),o=f.de.computeConv2DInfo(o,i.shape,a,1,s,c,!1,u),a=new Db(o);return n.runWebGLProgram(a,[e,i],"float32")}},
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
dn={kernelName:f.K,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;var{x:e,filter:i}=t,{strides:o,pad:a,dilations:s}=r,o=f.de.computeConv3DInfo(e.shape,i.shape,o,s,a),s=new Cb(o);return n.runWebGLProgram(s,[e,i],"float32")}},
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
mn={kernelName:f.L,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;var{x:e,dy:i}=t,{strides:o,pad:a,filterShape:s}=r,s=f.de.computeConv3DInfo(e.shape,s,o,1,a),o=new Bb(s);return n.runWebGLProgram(o,[e,i],"float32")}},
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
gn={kernelName:f.M,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;var{dy:e,filter:i}=t,{pad:o,strides:a,inputShape:s}=r,s=f.de.computeConv3DInfo(s,i.shape,a,1,o),a=new Ib(s);return n.runWebGLProgram(a,[e,i],"float32")}},vn=Iv({opSnippet:"if (isnan(x)) return x;\n  return cos(x);\n"}),wn={kernelName:f.N,backendName:"webgl",kernelFunc:vn},Cn=Iv({opSnippet:"\n  float e2x = exp(-x);\n  return (e2x + 1.0 / e2x) / 2.0;\n"}),_n={kernelName:f.O,backendName:"webgl",kernelFunc:Cn};
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
/**
 * @license
 * Copyright 2017 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
class Mb{constructor(e,t,n,r,i){this.variableNames=["Image","Boxes","BoxInd"],this.outputShape=[];var[e,o,a,s]=e,[t]=t,[n,u]=n,[s,r]=(t=(this.outputShape=[t,n,u,s],"bilinear"===r?1:0),[o-1+".0",a-1+".0"]),[o,n,c]=1<n?[""+(o-1)/(n-1),"(y2-y1) * height_ratio",`y1*${s} + float(y)*(height_scale)`]:["0.0","0.0","0.5 * (y1+y2) * "+s],[a,u,l]=1<u?[""+(a-1)/(u-1),"(x2-x1) * width_ratio",`x1*${r} + float(x)*(width_scale)`]:["0.0","0.0","0.5 * (x1+x2) * "+r];this.userCode=`\n      const float height_ratio = float(${o});\n      const float width_ratio = float(${a});\n      void main() {\n        ivec4 coords = getOutputCoords();\n        int b = coords[0];\n        int y = coords[1];\n        int x = coords[2];\n        int d = coords[3];\n\n        // get box vals\n        float y1 = getBoxes(b,0);\n        float x1 = getBoxes(b,1);\n        float y2 = getBoxes(b,2);\n        float x2 = getBoxes(b,3);\n\n        // get image in batch index\n        int bInd = round(getBoxInd(b));\n        if(bInd < 0 || bInd >= ${e}) {\n          return;\n        }\n\n        float height_scale = ${n};\n        float width_scale = ${u};\n\n        float in_y = ${c};\n        if( in_y < 0.0 || in_y > ${s} ) {\n          setOutput(float(${i}));\n          return;\n        }\n        float in_x = ${l};\n        if( in_x < 0.0 || in_x > ${r} ) {\n          setOutput(float(${i}));\n          return;\n        }\n\n        vec2 sourceFracIndexCR = vec2(in_x,in_y);\n        if(${t} == 1) {\n          // Compute the four integer indices.\n          ivec2 sourceFloorCR = ivec2(sourceFracIndexCR);\n          ivec2 sourceCeilCR = ivec2(ceil(sourceFracIndexCR));\n\n          float topLeft = getImage(b, sourceFloorCR.y, sourceFloorCR.x, d);\n          float bottomLeft = getImage(b, sourceCeilCR.y, sourceFloorCR.x, d);\n          float topRight = getImage(b, sourceFloorCR.y, sourceCeilCR.x, d);\n          float bottomRight = getImage(b, sourceCeilCR.y, sourceCeilCR.x, d);\n\n          vec2 fracCR = sourceFracIndexCR - vec2(sourceFloorCR);\n\n          float top = topLeft + (topRight - topLeft) * fracCR.x;\n          float bottom = bottomLeft + (bottomRight - bottomLeft) * fracCR.x;\n          float newValue = top + (bottom - top) * fracCR.y;\n          setOutput(newValue);\n        } else {\n          // Compute the coordinators of nearest neighbor point.\n          ivec2 sourceNearestCR = ivec2(floor(\n            sourceFracIndexCR + vec2(0.5,0.5)));\n          float newValue = getImage(b, sourceNearestCR.y, sourceNearestCR.x, d);\n          setOutput(newValue);\n        }\n      }\n    `}}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */var jb;On={kernelName:f.P,backendName:"webgl",kernelFunc:e=>{const{inputs:t,backend:n,attrs:r}=e;var{image:e,boxes:i,boxInd:o}=t,{cropSize:a,method:s,extrapolationValue:u}=r,a=new Mb(e.shape,i.shape,a,s,u);return n.runWebGLProgram(a,[e,i,o],"float32")}};(P=jb=jb||{}).Prod="*",P.Sum="+";class Nb{constructor(e,t,n,r){this.op=e,this.outputShape=t,this.variableNames=["x"],this.customUniforms=[{name:"index",type:"float"}];e=this.outputShape.length,t=this.op===jb.Prod?"1.0":"0.0",t=n?t:`getX(${Fb(e,"coords",this.op)})`;var i=this.outputShape[this.outputShape.length-1];let o="",a="";a=n?(o=r?"end != "+(i-1):"end != 0",r?"end + 1":"end - 1"):(o=r?"end + pow2 < "+i:"end >= pow2",r?"end + pow2":"end - pow2"),this.userCode=`\n      void main() {\n        ${Gg(e)} coords = getOutputCoords();\n        int end = ${Rb(e,"coords",this.op)};\n        float val = ${t};\n        int pow2 = int(pow(2.0, index));\n        if (${o}) {\n          int idx = ${a};\n          ${Rb(e,"coords",this.op)} = idx;\n          val ${this.op}= getX(${Fb(e,"coords",this.op)});\n        }\n        setOutput(val);\n      }\n    `}}function Fb(e,t,n){if(1===e)return""+t;if(2===e)return t+`.x, ${t}.y`;if(3===e)return t+`.x, ${t}.y, ${t}.z`;if(4===e)return t+`.x, ${t}.y, ${t}.z, ${t}.w`;throw new Error(`Cumulative ${n} for rank ${e} is not yet supported`)}function Rb(e,t,n){if(1===e)return""+t;if(2===e)return t+".y";if(3===e)return t+".z";if(4===e)return t+".w";throw new Error(`Cumulative ${n} for rank ${e} is not yet supported`)}
/**
 * @license
 * Copyright 2022 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function Pb(e,t,n,r,i,o){var a=t.shape.length,s=f.de.getAxesPermutation([r],a);let u=t;null!=s&&(u=Wv({inputs:{x:t},backend:n,attrs:{perm:s}}));var c=f.de.getInnerMostAxes(1,a)[0];if(c!==a-1)throw new Error(`WebGL cumprod shader expects an inner-most axis=${t.shape.length-1} but got axis=`+r);var l=u.shape[c];let h=Sv({inputs:{x:u},backend:n});for(let t=0;t<=Math.ceil(Math.log2(l))-1;t++){var d=new Nb(e,u.shape,!1,o),p=[[t]],m=h;h=n.runWebGLProgram(d,[h],h.dtype,p),n.disposeIntermediateTensorInfo(m)}return i&&(a=new Nb(e,u.shape,i,o),t=h,h=n.runWebGLProgram(a,[h],h.dtype),n.disposeIntermediateTensorInfo(t)),null!=s?(c=Wv({inputs:{x:h},backend:n,attrs:{perm:r=f.de.getUndoAxesPermutation(s)}}),n.disposeIntermediateTensorInfo(h),n.disposeIntermediateTensorInfo(u),c):h}
/**
 * @license
 * Copyright 2022 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */te={kernelName:f.Q,backendName:"webgl",kernelFunc:function(e){var{inputs:e,backend:t,attrs:n}=e,{axis:n,exclusive:r,reverse:i}=(e=e.x,n);return Pb(jb.Prod,e,t,n,r,i)}},
/**
 * @license
 * Copyright 2022 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Oe={kernelName:f.R,backendName:"webgl",kernelFunc:function(e){var{inputs:e,backend:t,attrs:n}=e,{axis:n,exclusive:r,reverse:i}=(e=e.x,n);return Pb(jb.Sum,e,t,n,r,i)}},
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
k={kernelName:f.T,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;var i,o,{x:e,weights:a}=t,{size:s,binaryOutput:u}=r;if(1===e.shape.length)return i=n.readSync(e.dataId),o=n.readSync(a.dataId),i=mA(i,o,a.dtype,a.shape,s),n.makeTensorInfo([s],a.dtype,i);if(2===e.shape.length)return o=n.bufferSync(e),i=n.bufferSync(a),o=gA(o,i,s,u),n.makeTensorInfo(o.shape,a.dtype,o.values);throw new Error("Error in denseBincount: input must be at most rank 2, but got rank"+e.shape.length+".")}};
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
class Lb{constructor(e,t,n){this.variableNames=["x"],this.outputShape=[],this.outputShape=e,this.blockSize=t,this.dataFormat=n,this.userCode=`\n    void main() {\n      ivec4 coords = getOutputCoords();\n      int b = coords[0];\n      int h = ${this.getHeightCoordString()};\n      int w = ${this.getWidthCoordString()};\n      int d = ${this.getDepthCoordString()};\n\n      int in_h = h / ${t};\n      int offset_h = imod(h, ${t});\n      int in_w = w / ${t};\n      int offset_w = imod(w, ${t});\n      int offset_d = (offset_h * ${t} + offset_w) *\n        ${this.getOutputDepthSize()};\n      int in_d = d + offset_d;\n\n      float result = ${this.getInputSamplingString()};\n      setOutput(result);\n    }\n  `}getHeightCoordString(){return"NHWC"===this.dataFormat?"coords[1]":"coords[2]"}getWidthCoordString(){return"NHWC"===this.dataFormat?"coords[2]":"coords[3]"}getDepthCoordString(){return"NHWC"===this.dataFormat?"coords[3]":"coords[1]"}getOutputDepthSize(){return"NHWC"===this.dataFormat?this.outputShape[3]:this.outputShape[1]}getInputSamplingString(){return"NHWC"===this.dataFormat?"getX(b, in_h, in_w, in_d)":"getX(b, in_d, in_h, in_w)"}}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */jt={kernelName:f.U,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;e=t.x;var{blockSize:i,dataFormat:o}=r,a=e.shape[0],s=("NHWC"===o?e.shape[1]:e.shape[2])*i,u=("NHWC"===o?e.shape[2]:e.shape[3])*i,c=("NHWC"===o?e.shape[3]:e.shape[1])/(i*i);c=new Lb(a="NHWC"===o?[a,s,u,c]:[a,c,s,u],i,o);return n.runWebGLProgram(c,[e],e.dtype)}};
/**
 * @license
 * Copyright 2017 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
class Ub{constructor(e,t=!1,n=null,r=!1,i=!1){this.variableNames=["x","W"],this.customUniforms=[{name:"pads",type:"ivec2"},{name:"strides",type:"ivec2"},{name:"dilations",type:"ivec2"},{name:"inDims",type:"ivec2"}],this.outputShape=e.outShape,this.enableShapeUniforms=Zg(this.outputShape.length);var o=e.filterHeight,a=e.filterWidth;e=e.outChannels/e.inChannels;let s="",u="";n&&(s=r?`float activation(float a) {\n          float b = getPreluActivationWeightsAtOutCoords();\n          ${n}\n        }`:i?`float activation(float a) {\n          float b = getLeakyreluAlphaAtOutCoords();\n          ${n}\n        }`:`\n          float activation(float x) {\n            ${n}\n          }\n        `,u="result = activation(result);"),n=t?"result += getBiasAtOutCoords();":"",t&&this.variableNames.push("bias"),r&&this.variableNames.push("preluActivationWeights"),i&&this.variableNames.push("leakyreluAlpha"),this.userCode=`\n      ${s}\n\n      void main() {\n        ivec4 coords = getOutputCoords();\n        int batch = coords.x;\n        ivec2 xRCCorner = coords.yz * strides - pads;\n        int d2 = coords.w;\n        int d1 = d2 / ${e};\n        int q = d2 - d1 * ${e};\n\n        int xRCorner = xRCCorner.x;\n        int xCCorner = xRCCorner.y;\n\n        // Convolve x(?, ?, d1) with w(:, :, d1, q) to get y(yR, yC, d2).\n        // ? = to be determined. : = across all values in that axis.\n        float dotProd = 0.0;\n        // TO DO(dsmilkov): Flatten the two for loops and vec4 the operations.\n        for (int wR = 0; wR < ${o}; wR++) {\n          int xR = xRCorner + wR * dilations[0];\n\n          if (xR < 0 || xR >= inDims[0]) {\n            continue;\n          }\n\n          for (int wC = 0; wC < ${a}; wC++) {\n            int xC = xCCorner + wC * dilations[1];\n\n            if (xC < 0 || xC >= inDims[1]) {\n              continue;\n            }\n\n            float xVal = getX(batch, xR, xC, d1);\n            float wVal = getW(wR, wC, d1, q);\n            dotProd += xVal * wVal;\n          }\n        }\n\n        float result = dotProd;\n        ${n}\n        ${u}\n        setOutput(result);\n      }\n    `}}
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */class zb{constructor(e,t=!1,n=null,r=!1,i=!1){this.variableNames=["x","W"],this.packedInputs=!0,this.packedOutput=!0,this.customUniforms=[{name:"pads",type:"ivec2"},{name:"strides",type:"ivec2"},{name:"dilations",type:"ivec2"},{name:"inDims",type:"ivec2"}],this.outputShape=e.outShape,this.enableShapeUniforms=Zg(this.outputShape.length);var o=e.outChannels/e.inChannels,a=e.padInfo.left,s=e.strideWidth,u=e.dilationWidth,c=e.filterHeight,l=e.filterWidth,h=l;let d="\n      int xR; int xC; int xCOffset;\n      vec4 wTexel; vec4 previous; vec4 final;";for(let e=0;e<l;e++)d+=`\n          vec4 xTexelC${2*e};\n          int xTexelC${2*e}Ready;\n          vec4 xTexelC${2*e+1};\n          int xTexelC${2*e+1}Ready;\n          vec4 xC${e};`;d+=`\n    for (int r = 0; r < ${c}; r++) {\n      `;for(let e=0;e<l;e++)d+=`\n          xTexelC${2*e} = vec4(0.0);\n          xTexelC${2*e}Ready = 0;\n          xTexelC${2*e+1} = vec4(0.0);\n          xTexelC${2*e+1}Ready = 0;\n          xC${e} = vec4(0.0);`;d+="\n        xR = xRCorner + r * dilations[0];\n        if (xR >=0 && xR < inDims[0]) {\n      ";for(let e=0;e<(h+1)/2;e++){var p,m=2*e;d+=`\n          xC = xCCorner + ${m*u};\n          `,1===s?m<l&&(a%2==1?d=d+`\n                xCOffset = xC + 1;\n                if (xCOffset >= 0 && xCOffset < inDims[1] && xTexelC${m}Ready == 0) {\n                  xTexelC${m} = getX(batch, xR, xCOffset, d1);\n\n                  // Need to manually clear unused channels in case\n                  // we're reading from recycled texture.\n                  if (xCOffset + 1 >= inDims[1]) {\n                    xTexelC${m}.zw = vec2(0.0);\n                  }\n                  xTexelC${m}Ready = 1;\n                }\n              `+(1===u&&0<m?`\n                xC${m} = vec4(xTexelC${m-2}.zw, xTexelC${m}.xy);\n                `:`\n                  xCOffset = xC + 1 - 2;\n\n                  if (xCOffset >= 0 && xCOffset < inDims[1]) {\n                    previous = getX(batch, xR, xCOffset, d1);\n\n                    // Need to manually clear unused channels in case\n                    // we're reading from recycled texture.\n                    if (xCOffset + 1 >= inDims[1]) {\n                      previous.zw = vec2(0.0);\n                    }\n\n                    xC${m} = vec4(previous.zw, xTexelC${m}.xy);\n                  } else {\n                    xC${m} = vec4(0.0, 0.0, xTexelC${m}.xy);\n                  }\n                  `):d+=`\n                if (xC >= 0 && xC < inDims[1] && xTexelC${m}Ready == 0) {\n                  xTexelC${m} = getX(batch, xR, xC, d1);\n                  if (xC + 1 >= inDims[1]) {\n                    xTexelC${m}.zw = vec2(0.0);\n                  }\n                  xTexelC${m}Ready = 1;\n                }\n\n                xC${m} = xTexelC${m};\n                `,1+m<l&&(p=a%2==0?f.Ji.nearestLargerEven(u):u,u%2==0&&a%2==1||u%2!=0&&a%2!=1?d=d+`\n                  xCOffset = xC + imod(pads[1], 2) + ${p};\n\n                  if (xCOffset >= 0 && xCOffset < inDims[1] && xTexelC${1+m}Ready == 0) {\n                    xTexelC${1+m} = getX(batch, xR, xCOffset, d1);\n\n                    // Need to manually clear unused channels in case\n                    // we're reading from recycled texture.\n                    if (xCOffset + 1 >= inDims[1]) {\n                      xTexelC${1+m}.zw = vec2(0.0);\n                    }\n                    xTexelC${1+m}Ready = 1;\n                  }\n                  `+(1<u?`\n                    xCOffset -= 2;\n                    if (xCOffset >= 0 && xCOffset < inDims[1]) {\n                     previous = getX(batch, xR, xCOffset, d1);\n                     xC${1+m} = vec4(previous.zw, xTexelC${1+m}.xy);\n                    } else {\n                     xC${1+m} = vec4(0.0, 0.0, xTexelC${1+m}.xy);\n                    }\n                    `:`\n                    xC${1+m} = vec4(xTexelC${m}.zw, xTexelC${1+m}.xy);\n                    `):d+=1===p?`\n                    xC${1+m} = xTexelC${m};\n                    `:`\n                    xCOffset = xC + ${p};\n\n                    if (xCOffset >= 0 && xCOffset < inDims[1] && xTexelC${1+m}Ready == 0) {\n                      xTexelC${1+m} = getX(batch, xR, xCOffset, d1);\n                      if (xCOffset + 1 >= inDims[1]) {\n                        xTexelC${1+m}.zw = vec2(0.0);\n                      }\n                      xTexelC${1+m}Ready = 1;\n                    }\n\n                    xC${1+m} = xTexelC${1+m};\n                    `)):m<l&&(a%2==1?(d+=`\n                xCOffset = xC + 1 - strides[1];\n                if(xCOffset >= 0 && xCOffset < inDims[1] && xTexelC${m}Ready == 0) {\n                  xTexelC${m} = getX(batch, xR, xCOffset, d1);\n                  // Need to manually clear unused channels in case\n                  // we're reading from recycled texture.\n                  if (xCOffset + 1 >= inDims[1]) {\n                    xTexelC${m}.zw = vec2(0.0);\n                  }\n                  xTexelC${m}Ready = 1;\n                }\n\n                if(xC + 1 >= 0 && xC + 1 < inDims[1] && xTexelC${1+m}Ready == 0) {\n                  xTexelC${1+m} = getX(batch, xR, xC + 1, d1);\n                  // Need to manually clear unused channels in case\n                  // we're reading from recycled texture.\n                  if (xC + 2 >= inDims[1]) {\n                    xTexelC${1+m}.zw = vec2(0.0);\n                  }\n                  xTexelC${1+m}Ready = 1;\n                }\n\n                xC${m} = vec4(xTexelC${m}.zw, xTexelC${1+m}.zw);\n              `,1+m<l&&(d+=`\n                  final = vec4(0.0);\n                  xCOffset = xC + 1 + strides[1];\n                  if(xCOffset >= 0 && xCOffset < inDims[1]) {\n                    final = getX(batch, xR, xCOffset, d1);\n                  }\n                  xC${1+m} = vec4(xTexelC${1+m}.xy, final.xy);\n                `)):(d+=`\n                if(xC >= 0 && xC < inDims[1] && xTexelC${m}Ready == 0) {\n                  xTexelC${m} = getX(batch, xR, xC, d1);\n                  if (xC + 1 >= inDims[1]) {\n                    xTexelC${m}.zw = vec2(0.0);\n                  }\n                  xTexelC${m}Ready = 1;\n                }\n\n                xCOffset = xC + strides[1];\n                if(xCOffset >= 0 && xCOffset < inDims[1] && xTexelC${1+m}Ready == 0) {\n                  xTexelC${1+m} = getX(batch, xR, xCOffset, d1);\n                  if (xCOffset + 1 >= inDims[1]) {\n                    xTexelC${1+m}.zw = vec2(0.);\n                  }\n                  xTexelC${1+m}Ready = 1;\n                }\n\n                xC${m} = vec4(\n                  xTexelC${m}.xy, xTexelC${1+m}.xy);\n              `,1+m<l&&(d+=`\n                  xC${1+m} = vec4(xTexelC${m}.zw, xTexelC${1+m}.zw);\n                `))),m<l&&(d+=`\n            wTexel = getW(r, ${m}, d1, q);\n            dotProd += xC${m} * vec4(wTexel.xz, wTexel.xz);\n          `,1+m<l&&(d+=`\n              wTexel = getW(r, ${1+m}, d1, q);\n              dotProd += xC${1+m} * vec4(wTexel.xz, wTexel.xz);\n            `))}d+="\n    }\n  \n      }\n    ";let g="",A="";n&&(g=r?`vec4 activation(vec4 a) {\n          vec4 b = getPreluActivationWeightsAtOutCoords();\n          ${n}\n        }`:i?`vec4 activation(vec4 a) {\n          vec4 b = getLeakyreluAlphaAtOutCoords();\n          ${n}\n        }`:`vec4 activation(vec4 x) {\n          ${n}\n        }`,A="result = activation(result);"),e=t?"result += getBiasAtOutCoords();":"",t&&this.variableNames.push("bias"),r&&this.variableNames.push("preluActivationWeights"),i&&this.variableNames.push("leakyreluAlpha"),this.userCode=`\n      ${g}\n\n      void main() {\n        ivec4 coords = getOutputCoords();\n        int batch = coords.x;\n        ivec2 xRCCorner = coords.yz * strides - pads;\n        int d2 = coords.w;\n        int d1 = d2 / ${o};\n        int q = d2 - d1 * ${o};\n        int xRCorner = xRCCorner.x;\n        int xCCorner = xRCCorner.y;\n\n        //intialize dotProd with a small epsilon seems to reduce GPU accuracy loss.\n        vec4 dotProd = vec4(0.000000000000001);\n\n        ${d}\n\n        vec4 result = dotProd - vec4(0.000000000000001);\n        ${e}\n        ${A}\n        setOutput(result);\n      }\n    `}}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */st={kernelName:f.V,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;var{x:e,filter:i}=t;const{strides:o,pad:a,dilations:s,dimRoundingMode:u}=r;let c=s;null==c&&(c=[1,1]),f.Ji.assert(f.de.eitherStridesOrDilationsAreOne(o,c),()=>`Error in depthwiseConv2d: Either strides or dilations must be 1. Got strides ${o} and dilations '${c}'`);var l=f.de.computeConv2DInfo(e.shape,i.shape,o,c,a,u,!0);let h;return h=new(Object(f.hf)().getBool("WEBGL_PACK_DEPTHWISECONV")&&l.strideWidth<=2&&l.outChannels/l.inChannels==1?zb:Ub)(l),l=[[l.padInfo.top,l.padInfo.left],[l.strideHeight,l.strideWidth],[l.dilationHeight,l.dilationWidth],[l.inHeight,l.inWidth]],n.runWebGLProgram(h,[e,i],"float32",l)}};
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
class Hb{constructor(e){this.variableNames=["x","dy"],this.outputShape=e.filterShape;var t=e.strideHeight,n=e.strideWidth,r=e.padInfo.top,i=e.padInfo.left,o=e.outChannels/e.inChannels;this.userCode=`\n      void main() {\n        ivec4 coords = getOutputCoords();\n        int wR = coords.x;\n        int wC = coords.y;\n        int d1 = coords.z;\n        int dm = coords.w;\n        int d2 = d1 * ${o} + dm;\n\n        float dotProd = 0.0;\n\n        // TO DO: Vec4 over the batch size\n        for (int b = 0; b < ${e.batchSize}; b++) {\n          for (int yR = 0; yR < ${e.outHeight}; yR++) {\n            int xR = wR + yR * ${t} - ${r};\n\n            if (xR < 0 || xR >= ${e.inHeight}) {\n              continue;\n            }\n\n            for (int yC = 0; yC < ${e.outWidth}; yC++) {\n              int xC = wC + yC * ${n} - ${i};\n\n              if (xC < 0 || xC >= ${e.inWidth}) {\n                continue;\n              }\n\n              float dyValue = getDy(b, yR, yC, d2);\n              float xValue = getX(b, xR, xC, d1);\n              dotProd += (xValue * dyValue);\n            }\n          }\n        }\n        setOutput(dotProd);\n      }\n    `}}class $b{constructor(e){this.variableNames=["dy","W"],this.outputShape=e.inShape;var t=e.filterHeight,n=e.filterWidth,r=e.strideHeight,i=e.strideWidth,o=t-1-e.padInfo.top,a=n-1-e.padInfo.left,s=e.outChannels/e.inChannels;this.userCode=`\n      const ivec2 pads = ivec2(${o}, ${a});\n\n      void main() {\n        ivec4 coords = getOutputCoords();\n        int batch = coords[0];\n        int d1 = coords[3];\n        ivec2 dyCorner = coords.yz - pads;\n        int dyRCorner = dyCorner.x;\n        int dyCCorner = dyCorner.y;\n\n        float dotProd = 0.0;\n\n        for (int wR = 0; wR < ${t}; wR++) {\n          float dyR = float(dyRCorner + wR) / ${r}.0;\n\n          if (dyR < 0.0 || dyR >= ${e.outHeight}.0 || fract(dyR) > 0.0) {\n            continue;\n          }\n          int idyR = int(dyR);\n\n          int wRPerm = ${t} - 1 - wR;\n\n          for (int wC = 0; wC < ${n}; wC++) {\n            float dyC = float(dyCCorner + wC) / ${i}.0;\n\n            if (dyC < 0.0 || dyC >= ${e.outWidth}.0 ||\n                fract(dyC) > 0.0) {\n              continue;\n            }\n            int idyC = int(dyC);\n\n            int wCPerm = ${n} - 1 - wC;\n\n            // TO DO: Vec4 over the channelMul\n            for (int dm = 0; dm < ${s}; dm++) {\n              int d2 = d1 * ${s} + dm;\n              float xValue = getDy(batch, idyR, idyC, d2);\n              float wValue = getW(wRPerm, wCPerm, d1, dm);\n              dotProd += xValue * wValue;\n            }\n          }\n        }\n        setOutput(dotProd);\n      }\n    `}}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */Me={kernelName:f.W,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;var{x:e,dy:i}=t,{strides:o,dilations:a,pad:s,dimRoundingMode:u,filterShape:c}=r,c=f.de.computeConv2DInfo(e.shape,c,o,a,s,u,!0),o=new Hb(c);return n.runWebGLProgram(o,[e,i],"float32")}},
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Je={kernelName:f.X,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;var{dy:e,filter:i}=t,{strides:o,dilations:a,pad:s,dimRoundingMode:u,inputShape:c}=r,c=f.de.computeConv2DInfo(c,i.shape,o,a,s,u,!0),o=new $b(c);return n.runWebGLProgram(o,[e,i],"float32")}};
/**
 * @license
 * Copyright 2019 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
class Qb{constructor(e){this.variableNames=["X"],this.outputShape=[e,e],this.userCode="\n      void main() {\n          ivec2 coords = getOutputCoords();\n          float val = coords[0] == coords[1] ? getX(coords[0]) : 0.0;\n          setOutput(val);\n      }\n    "
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */}}bt={kernelName:f.Y,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n}=e;var r=[...(e=t.x).shape,...e.shape],i=(e=Uv({inputs:{x:e},backend:n,attrs:{shape:[i=f.Ji.sizeFromShape(e.shape)]}}),new Qb(i));r=Uv({inputs:{x:i=n.runWebGLProgram(i,[e],e.dtype)},backend:n,attrs:{shape:r}});return n.disposeIntermediateTensorInfo(e),n.disposeIntermediateTensorInfo(i),r}};
/**
 * @license
 * Copyright 2017 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
class Vb{constructor(e){this.variableNames=["x","W"],this.outputShape=e.outShape;var{inHeight:e,inWidth:t,padInfo:n,strideHeight:r,strideWidth:i,filterHeight:o,filterWidth:a,dilationHeight:s,dilationWidth:u}=e,{top:n,left:c}=n;this.userCode=`\n      const ivec2 strides = ivec2(${r}, ${i});\n      const ivec2 pads = ivec2(${n}, ${c});\n      const float neg_infinity = -3.4e38;\n\n      void main() {\n        ivec4 coords = getOutputCoords();\n        int batch = coords.x;\n        int d1 = coords.w;\n        ivec2 outTopLeftCorner =\n            coords.yz * strides - pads;\n        int hBeg = outTopLeftCorner.x;\n        int wBeg = outTopLeftCorner.y;\n\n        float curVal = neg_infinity;\n        for (int h = 0; h < ${o}; h++) {\n          int hIn = hBeg + h * ${s};\n\n          if (hIn >= 0 && hIn < ${e}) {\n            for (int w = 0; w < ${a}; w++) {\n              int wIn = wBeg + w * ${u};\n\n              if (wIn >= 0 && wIn < ${t}) {\n                float xVal = getX(batch, hIn, wIn, d1);\n                float wVal = getW(h, w, d1);\n\n                float val = xVal + wVal;\n                if (val > curVal) {\n                  curVal = val;\n                }\n              }\n            }\n          }\n        }\n\n        float result = curVal;\n        setOutput(result);\n      }\n    `}}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */E={kernelName:f.Z,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;var{x:e,filter:i}=t,{strides:o,pad:a,dilations:s}=r,o=f.de.computeDilation2DInfo(e.shape,i.shape,o,a,"NHWC",s),a=(a=new Vb(o),Uv({inputs:{x:s=n.runWebGLProgram(a,[e,i],"float32")},backend:n,attrs:{shape:o.outShape}}));return n.disposeIntermediateTensorInfo(s),a}},
/**
 * @license
 * Copyright 2021 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
$t={kernelName:f.db,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;e=r.equation;var i=t,{allDims:o,summedDims:e,idDims:a}=f.de.decodeEinsumEquation(e,i.length),{path:s,steps:u}=(f.de.checkEinsumDimSizes(o.length,a,i),f.de.getEinsumComputePath(e,a)),c=u.length;let l=null,h=o.length;const d=[];for(let e=0;e<c;++e){for(const t of u[e]){var{permutationIndices:p,expandDims:m}=f.de.getEinsumPermutation(h,a[t]);let e;f.de.isIdentityPermutation(p)?e=i[t]:(e=Wv({inputs:{x:i[t]},backend:n,attrs:{perm:p}}),d.push(e));const r=e.shape.slice();for(let e=0;e<m.length;++e)r.splice(m[e],0,1);f.Ji.arraysEqual(e.shape,r)||(e=Uv({inputs:{x:e},backend:n,attrs:{shape:r}}),d.push(e)),null===l?l=e:(l=Lv({inputs:{a:e,b:l},backend:n}),d.push(l))}e<c-1&&(0<=s[e]&&(l=Gv({inputs:{x:l},backend:n,attrs:{axis:s[e]-(o.length-h),keepDims:!1}}),d.push(l)),h--)}for(const e of d)e!==l&&n.disposeIntermediateTensorInfo(e);return l}},sn=Iv({opSnippet:"return (x >= 0.0) ? x : (exp(x) - 1.0);",packedOpSnippet:"\n  vec4 result;\n\n  result.r = (x.r >= 0.0) ? x.r : (exp(x.r) - 1.0);\n  result.g = (x.g >= 0.0) ? x.g : (exp(x.g) - 1.0);\n  result.b = (x.b >= 0.0) ? x.b : (exp(x.b) - 1.0);\n  result.a = (x.a >= 0.0) ? x.a : (exp(x.a) - 1.0);\n\n  return result;\n"}),hn={kernelName:f.eb,backendName:"webgl",kernelFunc:sn},
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
An={kernelName:f.fb,backendName:"webgl",kernelFunc:e=>{const{inputs:t,backend:n}=e;var{dy:e,y:r}=t,i=Object(f.hf)().getBool("WEBGL_PACK_BINARY_OPERATIONS")?new Ev("\n  vec4 bGTEZero = vec4(greaterThanEqual(b, vec4(0.)));\n  return (bGTEZero * a) + ((vec4(1.0) - bGTEZero) * (a * (b + vec4(1.0))));\n",e.shape,r.shape):new kv("return (b >= 1.0) ? a : a * (b + 1.0);",e.shape,r.shape);return n.runWebGLProgram(i,[e,r],e.dtype)}},yn=Mv({opSnippet:"return float(a == b);",packedOpSnippet:"\n  return vec4(equal(a, b));\n",dtype:"bool",cpuKernelImpl:yA}),Ie={kernelName:f.hb,backendName:"webgl",kernelFunc:yn},et=Iv({opSnippet:`\n  // Error function is calculated approximately with elementary function.\n  // See "Handbook of Mathematical Functions with Formulas,\n  // Graphs, and Mathematical Tables", Abramowitz and Stegun.\n  float p = ${f.de.ERF_P};\n  float a1 = ${f.de.ERF_A1};\n  float a2 = ${f.de.ERF_A2};\n  float a3 = ${f.de.ERF_A3};\n  float a4 = ${f.de.ERF_A4};\n  float a5 = ${f.de.ERF_A5};\n\n  float sign = sign(x);\n  x = abs(x);\n  float t = 1.0 / (1.0 + p * x);\n  return sign * (1.0 - (((((a5*t + a4)*t) + a3)*t + a2)*t + a1)*t*exp(-x*x));\n`}),fn={kernelName:f.ib,backendName:"webgl",kernelFunc:et};const qb=Iv({opSnippet:"if (isnan(x)) return x;\n  return exp(x);\n",packedOpSnippet:"\n  vec4 result = exp(x);\n  bvec4 isNaN = isnan(x);\n  result.r = isNaN.r ? x.r : result.r;\n  result.g = isNaN.g ? x.g : result.g;\n  result.b = isNaN.b ? x.b : result.b;\n  result.a = isNaN.a ? x.a : result.a;\n\n  return result;\n",cpuKernelImpl:wA,dtype:"float32"});
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the License);
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an AS IS BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function Gb(e){var{inputs:e,attrs:t,backend:n}=e,t=t.dim;const r=e.input,i=r.shape.length,o=r.shape.slice();let a=t;return t<0&&(f.Ji.assert(-(i+1)<=t,()=>`Axis must be in the interval [${-(i+1)}, ${i}]`),a=i+t+1),o.splice(a,0,1),Uv({inputs:{x:r},backend:n,attrs:{shape:o}})}bn={kernelName:f.jb,backendName:"webgl",kernelFunc:qb},Z={kernelName:f.kb,backendName:"webgl",kernelFunc:Gb},xt=Iv({opSnippet:we="return exp(x) - 1.0;",packedOpSnippet:we,cpuKernelImpl:xA}),Jt={kernelName:f.lb,backendName:"webgl",kernelFunc:xt};
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
class Wb{constructor(e,t,n){this.variableNames=["real","imag"];var r=t[1];this.outputShape=t,t=n?"2.0 * "+Math.PI:"-2.0 * "+Math.PI,n=n?r+".0":"1.0";let i;if("real"===e)i="return real * expR - imag * expI;";else{if("imag"!==e)throw new Error(`FFT component must be either "real" or "imag", got ${e}.`);i="return real * expI + imag * expR;"}this.userCode=`\n      const float exponentMultiplier = ${t};\n\n      float unaryOpComplex(float real, float expR, float imag, float expI) {\n        ${i}\n      }\n\n      float mulMatDFT(int batch, int index) {\n        float indexRatio = float(index) / float(${r});\n        float exponentMultiplierTimesIndexRatio =\n            exponentMultiplier * indexRatio;\n\n        float result = 0.0;\n\n        for (int i = 0; i < ${r}; i++) {\n          // x = (-2|2 * PI / N) * index * i;\n          float x = exponentMultiplierTimesIndexRatio * float(i);\n          float expR = cos(x);\n          float expI = sin(x);\n          float real = getReal(batch, i);\n          float imag = getImag(batch, i);\n\n          result +=\n              unaryOpComplex(real, expR, imag, expI) / ${n};\n        }\n\n        return result;\n      }\n\n      void main() {\n        ivec2 coords = getOutputCoords();\n        setOutput(mulMatDFT(coords[0], coords[1]));\n      }\n    `}}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function Kb(e,t,n){var r,i=n.texData.get(e.dataId),o=(r=Uv({inputs:{x:e},backend:n,attrs:{shape:[(r=f.Ji.sizeFromShape(e.shape))/(o=e.shape[e.shape.length-1]),o]}})).shape,a=new Wb("real",o,t);t=new Wb("imag",o,t),i=[{dataId:i.complexTensorInfos.real.dataId,dtype:i.complexTensorInfos.real.dtype,shape:o},{dataId:i.complexTensorInfos.imag.dataId,dtype:i.complexTensorInfos.imag.dtype,shape:o}],t=_v({inputs:{real:o=n.runWebGLProgram(a,i,"float32"),imag:a=n.runWebGLProgram(t,i,"float32")},backend:n}),n.disposeIntermediateTensorInfo(o),n.disposeIntermediateTensorInfo(a),i=Uv({inputs:{x:t},backend:n,attrs:{shape:e.shape}});return n.disposeIntermediateTensorInfo(r),n.disposeIntermediateTensorInfo(t),i}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */Ne={kernelName:f.mb,backendName:"webgl",kernelFunc:function(e){var{inputs:e,backend:t}=e;return Kb(e=e.input,!1,t)}};
/**
 * @license
 * Copyright 2019 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
class Yb{constructor(e,t){this.outputShape=[],this.customUniforms=[{name:"value",type:"float"}],this.variableNames=["x"],this.outputShape=e,this.userCode="\n      void main() {\n        // Input can be obtained from uniform value.\n        setOutput(value);\n      }\n    "
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */}}function Xb(e){const{backend:t,attrs:n}=e;var r,{shape:e,value:i}=n,o=n.dtype;if("string"!==(o=o||f.Ji.inferDtype(i)))return r=new Yb(e,i),t.runWebGLProgram(r,[],o,[[i]]);{const n=f.Ji.getArrayFromDType(o,f.Ji.sizeFromShape(e));return n.fill(i),t.makeTensorInfo(e,o,n)}}tp={kernelName:f.nb,backendName:"webgl",kernelFunc:Xb};
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
class Jb{constructor(e){this.variableNames=["Image"],this.outputShape=[];var t=e[2];this.outputShape=e,this.userCode=`\n        void main() {\n          ivec4 coords = getOutputCoords();\n          int x = coords[2];\n\n          int coordX = ${t} - x - 1;\n          float outputValue;\n          if(coordX >= 0 && coordX < ${t}) {\n            outputValue = getImage(coords[0], coords[1], coordX, coords[3]);\n          } else {\n            outputValue = getImage(coords[0], coords[1], coords[2], coords[3]);\n          }\n          setOutput(outputValue);\n        }\n    `}}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */np={kernelName:f.ob,backendName:"webgl",kernelFunc:({inputs:e,backend:t})=>{e=e.image;const n=t;return t=new Jb(e.shape),n.runWebGLProgram(t,[e],e.dtype)}},ip=Iv({opSnippet:rp="return floor(x);",packedOpSnippet:rp,cpuKernelImpl:CA}),op={kernelName:f.pb,backendName:"webgl",kernelFunc:ip},sp=Mv({opSnippet:"\n  float s = sign(a) * sign(b);\n  int ia = round(a);\n  int ib = round(b);\n  if (ib != 0) {\n    // Windows (D3D) wants guaranteed non-zero int division at compile-time.\n    return float(idiv(ia, ib, s));\n  } else {\n    return NAN;\n  }\n",packedOpSnippet:"\n  ivec4 ia = round(a);\n  ivec4 ib = round(b);\n  bvec4 cond = notEqual(ib, ivec4(0));\n  ivec4 result = ivec4(0);\n  vec4 s = sign(a) * sign(b);\n\n  // Windows (D3D) wants guaranteed non-zero int division at compile-time.\n  if (cond[0]) {\n    result[0] = idiv(ia[0], ib[0], s[0]);\n  }\n  if (cond[1]) {\n    result[1] = idiv(ia[1], ib[1], s[1]);\n  }\n  if (cond[2]) {\n    result[2] = idiv(ia[2], ib[2], s[2]);\n  }\n  if (cond[3]) {\n    result[3] = idiv(ia[3], ib[3], s[3]);\n  }\n  return vec4(result);\n",dtype:"int32"}),up={kernelName:f.qb,backendName:"webgl",kernelFunc:sp};
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
class Zb{constructor(e){this.variableNames=["A"];var t=Bg(),[n,r]=e;this.outputShape=e,this.userCode=`\n      void main() {\n        ivec3 coords = getOutputCoords();\n        int texR = coords[0];\n        int texC = coords[1];\n        int depth = coords[2];\n        vec2 uv = (vec2(texC, texR) + halfCR) / vec2(${r}.0, ${n}.0);\n\n        vec4 values = ${t.texture2D}(A, uv);\n        float value;\n        if (depth == 0) {\n          value = values.r;\n        } else if (depth == 1) {\n          value = values.g;\n        } else if (depth == 2) {\n          value = values.b;\n        } else if (depth == 3) {\n          value = values.a;\n        }\n\n        setOutput(floor(value * 255.0 + 0.5));\n      }\n    `}}
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */class ey{constructor(e){this.variableNames=["A"],this.packedInputs=!1,this.packedOutput=!0;var t=Bg(),[n,r]=e;this.outputShape=e,this.userCode=`\n      void main() {\n        ivec3 coords = getOutputCoords();\n        int texR = coords[0];\n        int texC = coords[1];\n        int depth = coords[2];\n\n        vec4 result = vec4(0.);\n\n        for(int row=0; row<=1; row++) {\n          for(int col=0; col<=1; col++) {\n            texC = coords[1] + row;\n            depth = coords[2] + col;\n\n            vec2 uv = (vec2(texC, texR) + halfCR) /\n                       vec2(${r}.0, ${n}.0);\n            vec4 values = ${t.texture2D}(A, uv);\n            float value;\n            if (depth == 0) {\n              value = values.r;\n            } else if (depth == 1) {\n              value = values.g;\n            } else if (depth == 2) {\n              value = values.b;\n            } else if (depth == 3) {\n              value = values.a;\n            }\n\n            result[row * 2 + col] = floor(value * 255.0 + 0.5);\n          }\n        }\n\n        ${t.output} = result;\n      }\n    `}}
/**
 * @license
 * Copyright 2019 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */cp={kernelName:f.rb,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;let i=t.pixels;e=r.numChannels;var o="undefined"!=typeof HTMLVideoElement&&i instanceof HTMLVideoElement,a="undefined"!=typeof HTMLImageElement&&i instanceof HTMLImageElement,[s,u]=o?[i.videoWidth,i.videoHeight]:[i.width,i.height],c=[u,s];e=[u,s,e];return(a||o)&&(a=Object(f.hf)().getBool("CANVAS2D_WILL_READ_FREQUENTLY_FOR_GPU"),null!=ty&&a===ny||(ny=a,ty=document.createElement("canvas").getContext("2d",{willReadFrequently:ny})),ty.canvas.width=s,ty.canvas.height=u,ty.drawImage(i,0,0,s,u),i=ty.canvas),o=n.makeTensorInfo(c,"int32"),n.texData.get(o.dataId).usage=Zm.PIXELS,n.gpgpu.uploadPixelDataToTexture(n.getTexture(o.dataId),i),a=new(Object(f.hf)().getBool("WEBGL_PACK")?ey:Zb)(e),s=n.runWebGLProgram(a,[o],"int32"),n.disposeData(o.dataId),s}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */};let ty,ny=Object(f.hf)().getBool("CANVAS2D_WILL_READ_FREQUENTLY_FOR_GPU");fp={kernelName:f.tb,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{x:i,filter:o,bias:a,preluActivationWeights:s}=t,{strides:u,pad:c,dataFormat:l,dilations:h,dimRoundingMode:d,activation:p,leakyreluAlpha:m}=r;e=f.de.convertConv2DDataFormat(l);var g=f.de.computeConv2DInfo(i.shape,o.shape,u,h,c,d,!1,e);let A;const v=[],b=null!=a,y=null!=s,w="leakyrelu"===p;var x=()=>{const e=[i,o];var t=(e,t)=>"NCHW"===t&&1===e.shape.length&&1!==e.shape[0]?(t=Uv({inputs:{x:e},backend:n,attrs:{shape:[e.shape[0],1,1]}}),v.push(t),t):e;return b&&e.push(t(a,l)),y&&e.push(t(s,l)),w&&(t=n.makeTensorInfo([],"float32",f.Ji.createScalarValue(m,"float32")),e.push(t),v.push(t)),e};if(1!==g.filterHeight||1!==g.filterWidth||1!==g.dilationHeight||1!==g.dilationWidth||1!==g.strideHeight||1!==g.strideWidth||"SAME"!==g.padInfo.type&&"VALID"!==g.padInfo.type)if(g.strideWidth<=2&&"channelsLast"===e&&Object(f.hf)().getBool("WEBGL_EXP_CONV")){e=p?jv(p,!0):null,e=new kb(g,b,e,y,w);var C=[[g.padInfo.top,g.padInfo.left],[g.strideHeight,g.strideWidth],[g.dilationHeight,g.dilationWidth],[g.inHeight,g.inWidth]];const t=x();A=n.runWebGLProgram(e,t,"float32",C)}else if(Object(f.hf)().getBool("WEBGL_CONV_IM2COL"))A=Ob({x:i,filter:o,convInfo:g,backend:n,bias:a,activation:p,preluActivationWeights:s,leakyreluAlpha:m});else{e=p?jv(p,!1):null,C=new xb(g,b,e,y,w);const t=x();A=n.runWebGLProgram(C,t,"float32")}else A=_b({x:i,filter:o,convInfo:g,backend:n,bias:a,activation:p,preluActivationWeights:s,leakyreluAlpha:m});return e=Uv({inputs:{x:A},backend:n,attrs:{shape:g.outShape}}),v.push(A),v.forEach(e=>n.disposeIntermediateTensorInfo(e)),e}},
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Qt={kernelName:f.ub,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;var{x:e,filter:i,bias:o,preluActivationWeights:a}=t;const{strides:s,pad:u,dilations:c,dimRoundingMode:l,activation:h,leakyreluAlpha:d}=r,p=[];let m=c;null==m&&(m=[1,1]),f.Ji.assert(f.de.eitherStridesOrDilationsAreOne(s,m),()=>`Error in depthwiseConv2d: Either strides or dilations must be 1. Got strides ${s} and dilations '${m}'`);var g=f.de.computeConv2DInfo(e.shape,i.shape,s,m,u,l,!0),A=Object(f.hf)().getBool("WEBGL_PACK_DEPTHWISECONV")&&g.strideWidth<=2&&g.outChannels/g.inChannels==1,v=h?jv(h,A):null;const b=[e,i];var i=null!=a,y="leakyrelu"===h;let w;return(e=null!=o)&&b.push(o),i&&b.push(a),y&&(o=n.makeTensorInfo([],"float32",f.Ji.createScalarValue(d,"float32")),b.push(o),p.push(o)),w=new(A?zb:Ub)(g,e,v,i,y),a=[[g.padInfo.top,g.padInfo.left],[g.strideHeight,g.strideWidth],[g.dilationHeight,g.dilationWidth],[g.inHeight,g.inWidth]],o=n.runWebGLProgram(w,b,"float32",a),p.forEach(e=>n.disposeIntermediateTensorInfo(e)),o}};class ry{constructor(e,t,n,r){this.sliceDim=e,this.strides=t,this.paramsShape=r,this.variableNames=["x","indices"],e=Gg((this.outputShape=n).length);let i="\n    int index;";for(let e=0;e<this.sliceDim;e++)i+=`\n          index = round(getIndices(coords[0], ${e}));\n          out_of_bounds = out_of_bounds || index < 0;\n          out_of_bounds = out_of_bounds || index >= ${this.paramsShape[e]};\n          flattenIndex += index * ${this.strides[e]};`;this.userCode=`\n         void main() {\n          ${e} coords = getOutputCoords();\n          int flattenIndex = 0;\n          bool out_of_bounds = false;\n\n          ${i}\n\n          setOutput(out_of_bounds ? 0.0 : getX(flattenIndex, coords[1]));\n        }\n      `}}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */pp={kernelName:f.vb,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n}=e;var r,{params:e,indices:i}=t,o=(o=i.shape)[o.length-1],a=f.Ji.sizeFromShape(e.shape),[s,u,c,l]=f.de.prepareAndValidate(e,i),h=Uv({inputs:{x:i},backend:n,attrs:{shape:[u,o]}}),d=Uv({inputs:{x:e},backend:n,attrs:{shape:[f.Ji.sizeFromShape(e.shape)/c,c]}});return n.shouldExecuteOnCPU([e,i])||"string"===e.dtype?(i=n.readSync(i.dataId),r=n.bufferSync(e),i=kA(i,r,e.dtype,u,o,c,l,e.shape,a),n.makeTensorInfo(s,e.dtype,i.values)):(r=new ry(o,l,[u,c],e.shape),i=Uv({inputs:{x:a=n.runWebGLProgram(r,[d,h],d.dtype)},backend:n,attrs:{shape:s}}),n.disposeIntermediateTensorInfo(h),n.disposeIntermediateTensorInfo(d),n.disposeIntermediateTensorInfo(a),i)}};
/**
 * @license
 * Copyright 2017 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
class iy{constructor(e,t){this.variableNames=["A","indices"],this.outputShape=t,this.rank=t.length;t=Gg(this.rank);var n=function(e){const t=["resRC.x","resRC.y","resRC.z","resRC.w"],n=[];for(let r=0;r<e.length;r++)2===r?n.push("index"):n.push(""+t[r]);return n.join()}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */(e);this.userCode=`\n      void main() {\n        ${t} resRC = getOutputCoords();\n        int index = int(getIndices(resRC.x, resRC.z));\n        float inBounds = (index >= 0) && (index < ${e[2]}) ? 1.0 : 0.0;\n        setOutput(inBounds * getA(${n}));\n      }\n    `}}function oy(e){const{inputs:t,backend:n,attrs:r}=e;var{x:e,indices:i}=t,{axis:o,batchDims:a}=r,o=f.Ji.parseAxisParam(o,e.shape)[0];if(Object(f.hf)().get("DEBUG")){var s=n.readSync(i.dataId);const t=e.shape[o];for(let e=0;e<s.length;++e){const n=s[e];f.Ji.assert(n<=t-1&&0<=n,()=>`GatherV2: the index value ${n} is not in [0, ${t-1}]`)}}o=f.de.segment_util.collectGatherOpShapeInfo(e,i,o,a),a=f.Ji.sizeFromShape(i.shape);const u=[];var c=Uv({inputs:{x:e},backend:n,attrs:{shape:[o.batchSize,o.outerSize,o.dimSize,o.sliceSize]}}),l=Uv({inputs:{x:i},backend:n,attrs:{shape:[o.batchSize,a/o.batchSize]}}),a=(u.push(c),u.push(l),[o.batchSize,o.outerSize,a/o.batchSize,o.sliceSize]);return n.shouldExecuteOnCPU([e,i])||"string"===e.dtype?(i=n.bufferSync(l),e=n.bufferSync(c),e=EA(e,i,a),u.forEach(e=>n.disposeIntermediateTensorInfo(e)),n.makeTensorInfo(o.outputShape,e.dtype,e.values)):(i=new iy(c.shape,a),e=n.runWebGLProgram(i,[c,l],c.dtype),u.push(e),a=Uv({inputs:{x:e},backend:n,attrs:{shape:o.outputShape}}),u.forEach(e=>n.disposeIntermediateTensorInfo(e)),a)}gp={kernelName:f.wb,backendName:"webgl",kernelFunc:oy},vp=Mv({opSnippet:"return float(a > b);",packedOpSnippet:"\n  return vec4(greaterThan(a, b));\n",cpuKernelImpl:SA,dtype:"bool"}),yp={kernelName:f.xb,backendName:"webgl",kernelFunc:vp},xp=Mv({opSnippet:"return float(a >= b);",packedOpSnippet:"\n  return vec4(greaterThanEqual(a, b));\n",dtype:"bool",cpuKernelImpl:_A}),Cp={kernelName:f.yb,backendName:"webgl",kernelFunc:xp},
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Sp={kernelName:f.zb,backendName:"webgl",kernelFunc:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){var{inputs:e,backend:t}=e;return Kb(e=e.input,!0,t)}},Op=Iv({opSnippet:"return float(!isnan(x) && !isinf(x));",dtype:"bool"}),Dp={kernelName:f.Cb,backendName:"webgl",kernelFunc:Op},T=Iv({opSnippet:"return float(isinf(x));",dtype:"bool"}),Ip={kernelName:f.Db,backendName:"webgl",kernelFunc:T},Np=Iv({opSnippet:"return float(isnan(x));",dtype:"bool"}),Pp={kernelName:f.Eb,backendName:"webgl",kernelFunc:Np},Qp=Mv({opSnippet:"return float(a < b);",packedOpSnippet:"\n  return vec4(lessThan(a, b));\n",cpuKernelImpl:OA,dtype:"bool"}),qp={kernelName:f.Jb,backendName:"webgl",kernelFunc:Qp},F=Mv({opSnippet:"return float(a <= b);",packedOpSnippet:"\n  return vec4(lessThanEqual(a, b));\n",cpuKernelImpl:TA,dtype:"bool"}),Gp={kernelName:f.Kb,backendName:"webgl",kernelFunc:F},
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
D={kernelName:f.Lb,backendName:"webgl",kernelFunc:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){const{backend:t,attrs:n}=e;var{start:e,stop:r,num:i}=n;e=DA(e,r,i);return t.makeTensorInfo([e.length],"float32",e)}},I=Iv({opSnippet:"if (isnan(x)) return x;\n  return x < 0.0 ? 0./0. : log(x);\n",packedOpSnippet:"\n  vec4 result = log(x);\n  bvec4 isNaN = isnan(x);\n  result.r = isNaN.r ? x.r : (x.r < 0.0 ? 0./0. : result.r);\n  result.g = isNaN.g ? x.g : (x.g < 0.0 ? 0./0. : result.g);\n  result.b = isNaN.b ? x.b : (x.b < 0.0 ? 0./0. : result.b);\n  result.a = isNaN.a ? x.a : (x.a < 0.0 ? 0./0. : result.a);\n  return result;\n",cpuKernelImpl:BA}),q={kernelName:f.Mb,backendName:"webgl",kernelFunc:I},Wp=Iv({opSnippet:"if (isnan(x)) return x;\n  return log(1.0 + x);\n"}),Kp={kernelName:f.Nb,backendName:"webgl",kernelFunc:Wp},Yp=Mv({opSnippet:"return float(a >= 1.0 && b >= 1.0);",packedOpSnippet:"\n  return vec4(\n    vec4(greaterThanEqual(a, vec4(1.0))) *\n    vec4(greaterThanEqual(b, vec4(1.0))));\n",dtype:"bool"}),Xp={kernelName:f.Pb,backendName:"webgl",kernelFunc:Yp},Jp=Iv({opSnippet:"return float(!(x >= 1.0));"}),Zp={kernelName:f.Qb,backendName:"webgl",kernelFunc:Jp},em=Mv({opSnippet:"return float(a >= 1.0 || b >= 1.0);",packedOpSnippet:"\n  return min(\n    vec4(greaterThanEqual(a, vec4(1.0))) +\n    vec4(greaterThanEqual(b, vec4(1.0))),\n    vec4(1.0));\n",dtype:"bool"}),nm={kernelName:f.Rb,backendName:"webgl",kernelFunc:em};
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
/**
 * @license
 * Copyright 2017 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
class ay{constructor(e,t,n,r,i){this.variableNames=["x"],this.outputShape=[];var o=e[3]-1;let a;this.outputShape=e,e=`float(${n}) + float(${r}) * sum`,a=.5===i?`inversesqrt(${e})`:1===i?`1.0/(${e})`:`exp(log(${e}) * float(-${i}));`,this.userCode=`\n      void main() {\n        ivec4 coords = getOutputCoords();\n        int b = coords[0];\n        int r = coords[1];\n        int c = coords[2];\n        int d = coords[3];\n        float x = getX(b, r, c, d);\n        float sum = 0.0;\n        for (int j = -${t}; j <= ${t}; j++) {\n          int idx = d + j;\n          if (idx >= 0 && idx <=  ${o}) {\n            float z = getX(b, r, c, idx);\n            sum += z * z;\n          }\n        }\n        float val = x * ${a};\n        setOutput(val);\n      }\n    `}}
/**
 * @license
 * Copyright 2019 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */class sy{constructor(e,t,n,r,i){this.variableNames=["x"],this.outputShape=[],this.packedInputs=!0,this.packedOutput=!0;var o=e[3]-1;let a;this.outputShape=e,e=`float(${n}) + float(${r}) * sum`,a=.5===i?`inversesqrt(${e})`:1===i?`1.0/(${e})`:`exp(log(${e}) * float(-${i}));`,this.userCode=`\n      void main() {\n        ivec4 coords = getOutputCoords();\n        int b = coords.x;\n        int r = coords.y;\n        int c = coords.z;\n        int d = coords.w;\n\n        bool hasNextCol = d < ${this.outputShape[3]};\n        bool hasNextRow = c < ${this.outputShape[2]};\n\n        vec4 sum = vec4(0.);\n        vec4 xFragAtOutputCoords = getX(b, r, c, d);\n\n        vec4 xAtOutputCoords = vec4(\n          getChannel(xFragAtOutputCoords, vec2(c, d)),\n          hasNextCol ?\n            getChannel(xFragAtOutputCoords, vec2(c, d + 1)) : 0.0,\n          hasNextRow ?\n            getChannel(xFragAtOutputCoords , vec2(c + 1, d)) : 0.0,\n          (hasNextRow && hasNextCol) ?\n            getChannel(xFragAtOutputCoords, vec2(c + 1, d + 1)) : 0.0\n        );\n\n        int firstChannel = d - ${t};\n        vec2 cache = vec2(0.);\n        if(firstChannel >= 0){\n          vec4 firstChannelFrag = getX(b, r, c, firstChannel);\n          cache.x = getChannel(firstChannelFrag, vec2(c, firstChannel));\n            if(hasNextRow){\n              cache.y = getChannel(firstChannelFrag, vec2(c + 1, firstChannel));\n            }\n        }\n\n        ivec2 depth = ivec2(d, d + 1);\n        for (int j = - ${t}; j <= ${t}; j++) {\n          ivec2 idx = depth + j;\n          bvec2 aboveLowerBound = greaterThanEqual(idx, ivec2(0));\n          bvec2 belowUpperBound = lessThanEqual(idx, ivec2(${o}));\n\n          bool depthInRange = aboveLowerBound.x && belowUpperBound.x;\n          bool depthPlusOneInRange = aboveLowerBound.y && belowUpperBound.y;\n\n          if(depthInRange || depthPlusOneInRange){\n            vec4 z = vec4(0.);\n            vec4 xFragAtCurrentDepth;\n            z.xz = cache.xy;\n            if(depthPlusOneInRange && hasNextCol){\n              xFragAtCurrentDepth = idx.y != d ?\n                getX(b, r, c, idx.y) : xFragAtOutputCoords;\n              z.y = getChannel(xFragAtCurrentDepth, vec2(c, idx.y));\n              if(hasNextRow){\n                z.w = getChannel(xFragAtCurrentDepth, vec2(c + 1, idx.y));\n              }\n            }\n            cache.xy = z.yw;\n            sum += z * z;\n          }\n        }\n        vec4 result = xAtOutputCoords * ${a};\n        setOutput(result);\n      }\n    `}}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */im={kernelName:f.Gb,backendName:"webgl",kernelFunc:e=>{const{inputs:t,backend:n,attrs:r}=e;e=t.x;var{depthRadius:i,bias:o,alpha:a,beta:s}=r,i=new(Object(f.hf)().getBool("WEBGL_PACK_NORMALIZATION")?sy:ay)(e.shape,i,o,a,s);return n.runWebGLProgram(i,[e],e.dtype)}};
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
class uy{constructor(e,t,n,r,i){this.variableNames=["inputImage","outputImage","dy"],this.outputShape=[],this.outputShape=e,this.depth=e[3],this.depthRadius=t,this.bias=n,this.alpha=r,this.beta=i,this.userCode=`\n      void main() {\n        ivec4 coords = getOutputCoords();\n        int b = coords[0];\n        int r = coords[1];\n        int c = coords[2];\n\n        float result = 0.0;\n        for (int d = 0; d < ${this.depth}; ++d) {\n          int depthBegin = int(max(0.0, float(d - ${t})));\n          int depthEnd = int(min(float(${this.depth}),\n              float(d + ${t} + 1)));\n\n          const int MIN_DEPTH_BEGIN = 0;\n          const int MAX_DEPTH_END = ${this.depth};\n\n          float norm = 0.0;\n          for (int k = MIN_DEPTH_BEGIN; k < MAX_DEPTH_END; ++k) {\n            if (k < depthBegin){\n              continue;\n            }\n            else if (k >= depthBegin && k < depthEnd) {\n              norm += getInputImage(b, r, c, k) * getInputImage(b, r, c, k);\n            }\n            else {\n              break;\n            }\n          }\n\n          norm = float(${r}) * norm + float(${n});\n\n          for(int k = MIN_DEPTH_BEGIN; k < MAX_DEPTH_END; ++k){\n            if (k < depthBegin){\n              continue;\n            }\n            else if (k >= depthBegin && k < depthEnd){\n              float dyi = -2.0 * float(${r})\n                * float(${i})\n                * getInputImage(b ,r ,c, k) * getOutputImage(b, r, c, d)\n                / norm;\n              if (k == d) {\n                dyi += pow(norm, -1.0 * ${i});\n              }\n              if (k == coords[3]) {\n                dyi *= getDy(b, r, c, d);\n                result += dyi;\n              }\n            }\n            else {\n              break;\n            }\n          }\n      }\n      setOutput(result);\n      }\n    `
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */}}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function cy(e){const{inputs:t,backend:n,attrs:r}=e;var i=t.x,{reductionIndices:e,keepDims:o}=r,a=i.shape.length;let s=e=f.Ji.parseAxisParam(e,i.shape);var u=f.de.getAxesPermutation(s,a),c=null!=u,l=n.shouldExecuteOnCPU([i]);let h=i;if(c){if(l){var d=n.texData.get(h.dataId).values;const e=new Array(a);for(let t=0;t<e.length;t++)e[t]=i.shape[u[t]];d=ov(d,i.shape,i.dtype,u,e),h=n.makeTensorInfo(e,i.dtype);n.texData.get(h.dataId).values=d}else h=qv(i,u,n);s=f.de.getInnerMostAxes(s.length,a)}f.de.assertAxesAreInnerMostDims("max",s,a);var[d,a]=f.de.computeOutAndReduceShapes(h.shape,s);let p,m=d;if(o&&(m=f.de.expandShapeToKeepDim(d,e)),l){var o=n.texData.get(h.dataId).values;d=IA(o,f.Ji.sizeFromShape(a),m,i.dtype);p=n.makeTensorInfo(m,i.dtype);n.texData.get(p.dataId).values=d}else e=h,l=a,o=m,d=n,l=f.Ji.sizeFromShape(l),l=Uv({inputs:{x:e},attrs:{shape:[f.Ji.sizeFromShape(e.shape)/l,l]},backend:d}),o=Uv({inputs:{x:e=$v(l,e.dtype,"max",d)},attrs:{shape:o},backend:d}),d.disposeIntermediateTensorInfo(l),d.disposeIntermediateTensorInfo(e),p=o;return c&&n.disposeIntermediateTensorInfo(h),p}om={kernelName:f.Hb,backendName:"webgl",kernelFunc:e=>{const{inputs:t,backend:n,attrs:r}=e;var{x:e,y:i,dy:o}=t,{depthRadius:a,bias:s,alpha:u,beta:c}=r,a=new uy(e.shape,a,s,u,c);return n.runWebGLProgram(a,[e,i,o],e.dtype)}},am={kernelName:f.Ub,backendName:"webgl",kernelFunc:cy},cm=Mv({opSnippet:"\n  if (isnan(a)) return a;\n  if (isnan(b)) return b;\n\n  return max(a, b);\n",packedOpSnippet:"\n  vec4 result = vec4(max(a, b));\n  bvec4 isNaNA = isnan(a);\n  bvec4 isNaNB = isnan(b);\n  bvec4 isNaN = bvec4(isNaNA.x || isNaNB.x, isNaNA.y || isNaNB.y, isNaNA.z || isNaNB.z, isNaNA.w || isNaNB.w);\n  \n  result.r = isNaN.r ? NAN : result.r;\n  result.g = isNaN.g ? NAN : result.g;\n  result.b = isNaN.b ? NAN : result.b;\n  result.a = isNaN.a ? NAN : result.a;\n\n  return result;\n",cpuKernelImpl:MA}),M={kernelName:f.ac,backendName:"webgl",kernelFunc:cm},
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
lm={kernelName:f.Vb,backendName:"webgl",kernelFunc:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){const{inputs:t,backend:n,attrs:r}=e,{filterSize:i,strides:o,pad:a,dimRoundingMode:s}=(Tg(e=t.x,"maxPool"),r);f.Ji.assert(f.de.eitherStridesOrDilationsAreOne(o,1),()=>`Error in maxPool: Either strides or dilations must be 1. Got strides ${o} and dilations '1'`);var u=f.de.computePool2DInfo(e.shape,i,o,1,a,s);return 1===u.filterWidth&&1===u.filterHeight&&f.Ji.arraysEqual(u.inShape,u.outShape)?Sv({inputs:{x:e},backend:n}):(u=new tb(u,"max",!1),n.runWebGLProgram(u,[e],e.dtype))}},
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
hm={kernelName:f.Wb,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;e=t.x;var{filterSize:i,strides:o,pad:a,dataFormat:s,dimRoundingMode:u}=r,i=f.de.computePool3DInfo(e.shape,i,o,[1,1,1],a,u,s),o=new nb(i,"max",!1);return n.runWebGLProgram(o,[e],e.dtype)}};
/**
 * @license
 * Copyright 2017 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
class ly{constructor(e){this.variableNames=["dy","maxPos"],this.outputShape=e.inShape;var t=e.strideHeight,n=e.strideWidth,r=e.dilationHeight,i=e.effectiveFilterHeight,o=e.effectiveFilterWidth,a=i-1-e.padInfo.top,s=o-1-e.padInfo.left;this.userCode=`\n      const ivec2 pads = ivec2(${a}, ${s});\n\n      void main() {\n        ivec4 coords = getOutputCoords();\n        int b = coords[0];\n        int d = coords[3];\n\n        ivec2 dyRCCorner = coords.yz - pads;\n        int dyRCorner = dyRCCorner.x;\n        int dyCCorner = dyRCCorner.y;\n\n        // Convolve dy(?, ?, d) with pos mask(:, :, d) to get dx(xR, xC, d).\n        // ? = to be determined. : = across all values in that axis.\n        float dotProd = 0.0;\n        for (int wR = 0; wR < ${i};\n          wR += ${r}) {\n          float dyR = float(dyRCorner + wR) / ${t}.0;\n\n          if (dyR < 0.0 || dyR >= ${e.outHeight}.0 || fract(dyR) > 0.0) {\n            continue;\n          }\n          int idyR = int(dyR);\n\n          for (int wC = 0; wC < ${o}; wC++) {\n            float dyC = float(dyCCorner + wC) / ${n}.0;\n\n            if (dyC < 0.0 || dyC >= ${e.outWidth}.0 ||\n                fract(dyC) > 0.0) {\n              continue;\n            }\n            int idyC = int(dyC);\n\n            float dyValue = getDy(b, idyR, idyC, d);\n            int maxPosValue = ${i*o-1} - int(getMaxPos(b, idyR, idyC, d));\n\n            // Get the current value, check it against the value from the\n            // position matrix.\n            int curPosValue = wR * ${o} + wC;\n            float mask = float(maxPosValue == curPosValue ? 1.0 : 0.0);\n\n            dotProd += dyValue * mask;\n          }\n        }\n        setOutput(dotProd);\n      }\n    `}}class hy{constructor(e){this.variableNames=["dy","maxPos"],this.outputShape=e.inShape;var t=e.strideDepth,n=e.strideHeight,r=e.strideWidth,i=e.dilationDepth,o=e.dilationHeight,a=e.dilationWidth,s=e.effectiveFilterDepth,u=e.effectiveFilterHeight,c=e.effectiveFilterWidth,l=s-1-e.padInfo.front,h=u-1-e.padInfo.top,f=c-1-e.padInfo.left;this.userCode=`\n      const ivec3 pads = ivec3(${l}, ${h}, ${f});\n\n      void main() {\n        ivec5 coords = getOutputCoords();\n        int batch = coords.x;\n        int ch = coords.u;\n\n        ivec3 dyCorner = ivec3(coords.y, coords.z, coords.w) - pads;\n        int dyDCorner = dyCorner.x;\n        int dyRCorner = dyCorner.y;\n        int dyCCorner = dyCorner.z;\n\n        // Convolve dy(?, ?, ?, ch) with pos mask(:, :, :, d) to get\n        // dx(xD, xR, xC, ch).\n        // ? = to be determined. : = across all values in that axis.\n        float dotProd = 0.0;\n\n        for (int wD = 0; wD < ${s};\n           wD += ${i}) {\n          float dyD = float(dyDCorner + wD) / ${t}.0;\n\n          if (dyD < 0.0 || dyD >= ${e.outDepth}.0 || fract(dyD) > 0.0) {\n            continue;\n          }\n          int idyD = int(dyD);\n\n          for (int wR = 0; wR < ${u};\n              wR += ${o}) {\n            float dyR = float(dyRCorner + wR) / ${n}.0;\n\n            if (dyR < 0.0 || dyR >= ${e.outHeight}.0 ||\n                fract(dyR) > 0.0) {\n              continue;\n            }\n            int idyR = int(dyR);\n\n            for (int wC = 0; wC < ${c};\n                wC += ${a}) {\n              float dyC = float(dyCCorner + wC) / ${r}.0;\n\n              if (dyC < 0.0 || dyC >= ${e.outWidth}.0 ||\n                  fract(dyC) > 0.0) {\n                continue;\n              }\n              int idyC = int(dyC);\n\n              float dyValue = getDy(batch, idyD, idyR, idyC, ch);\n              int maxPosValue = ${s*u*c-1} -\n                  int(getMaxPos(batch, idyD, idyR, idyC, ch));\n\n              // Get the current value, check it against the value from the\n              // position matrix.\n              int curPosValue =\n                  wD * ${u} * ${c} +\n                  wR * ${c} + wC;\n              float mask = float(maxPosValue == curPosValue ? 1.0 : 0.0);\n\n              dotProd += dyValue * mask;\n            }\n          }\n        }\n        setOutput(dotProd);\n      }\n    `}}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */fm={kernelName:f.Xb,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;var{dy:e,input:i}=t,{filterSize:o,strides:a,pad:s,dimRoundingMode:u}=r,o=f.de.computePool3DInfo(i.shape,o,a,[1,1,1],s,u),s=(a=new nb(o,"max",!0),n.runWebGLProgram(a,[i],i.dtype)),u=new hy(o),a=n.runWebGLProgram(u,[e,s],i.dtype);return n.disposeIntermediateTensorInfo(s),a}},
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Ge={kernelName:f.Yb,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;var{dy:e,input:i,output:o}=t,a=i,{filterSize:i,strides:o,pad:s,dimRoundingMode:u}=(Tg([i,o],"maxPoolGrad"),r),i=f.de.computePool2DInfo(a.shape,i,o,1,s,u),s=(o=new tb(i,"max",!0),n.runWebGLProgram(o,[a],a.dtype)),u=new ly(i),o=n.runWebGLProgram(u,[e,s],a.dtype);return n.disposeIntermediateTensorInfo(s),o}},
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
hp={kernelName:f.Zb,backendName:"webgl",kernelFunc:({inputs:e,attrs:t,backend:n})=>{const r=e.x,{filterSize:i,strides:o,pad:a,includeBatchInIndex:s}=t;e=n,f.Ji.assert(4===r.shape.length,()=>`Error in maxPool: input must be rank 4 but got rank ${r.shape.length}.`);const u=[1,1];f.Ji.assert(f.de.eitherStridesOrDilationsAreOne(o,u),()=>`Error in maxPool: Either strides or dilations must be 1. Got strides ${o} and dilations '${u}'`);t=f.de.computePool2DInfo(r.shape,i,o,u,a);var c,l,[t,h]=(n=r,h=s,e=e,c=new tb(t=t,"max",!1),l=e.runWebGLProgram(c,[n],"float32"),c=new tb(t,"max",!0,!0,h),[l,e.runWebGLProgram(c,[n],"float32")]);return[t,h]}},
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
pm={kernelName:f.bc,backendName:"webgl",kernelFunc:({inputs:e,attrs:t,backend:n})=>{var r=e.x,{keepDims:e,axis:t}=t;const i=n;n=r.shape.length;let o=t=f.Ji.parseAxisParam(t,r.shape);var a=f.de.getAxesPermutation(o,n),s=null!=a,u=i.shouldExecuteOnCPU([r]);const c=[];let l=r;if(s){if(u){s=i.texData.get(l.dataId).values;const e=new Array(n);for(let t=0;t<e.length;t++)e[t]=r.shape[a[t]];u=ov(s,r.shape,r.dtype,a,e),l=i.makeTensorInfo(e,r.dtype);i.texData.get(l.dataId).values=u}else l=qv(r,a,i);c.push(l),o=f.de.getInnerMostAxes(o.length,n)}f.de.assertAxesAreInnerMostDims("sum",o,n);var[s,u]=f.de.computeOutAndReduceShapes(l.shape,o);let h=s;e&&(h=f.de.expandShapeToKeepDim(s,t)),n=l,e=u,s=h,t=i,e=f.Ji.sizeFromShape(e),n=Uv({inputs:{x:n},attrs:{shape:[f.Ji.sizeFromShape(n.shape)/e,e]},backend:t}),s=Uv({inputs:{x:e=$v(n,"float32","mean",t)},attrs:{shape:s},backend:t}),t.disposeIntermediateTensorInfo(n),t.disposeIntermediateTensorInfo(e),u=s;for(const e of c)i.disposeIntermediateTensorInfo(e);return u}},
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
mm={kernelName:f.cc,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;e=t.x;var{axis:i,keepDims:o}=r,a=e.shape.length;let s=i=f.Ji.parseAxisParam(i,e.shape);var u=f.de.getAxesPermutation(s,a);let c=e;null!=u&&(c=Wv({inputs:{x:e},backend:n,attrs:{perm:u}}),s=f.de.getInnerMostAxes(s.length,e.shape.length)),f.de.assertAxesAreInnerMostDims("min",s,a);var[e,a]=f.de.computeOutAndReduceShapes(c.shape,s),l=$v(a=Uv({inputs:{x:c},backend:n,attrs:{shape:[-1,a=f.Ji.sizeFromShape(a)]}}),a.dtype,"min",n);let h;return h=o?Uv({inputs:{x:l},backend:n,attrs:{shape:o=f.de.expandShapeToKeepDim(e,i)}}):Uv({inputs:{x:l},backend:n,attrs:{shape:e}}),n.disposeIntermediateTensorInfo(a),n.disposeIntermediateTensorInfo(l),null!=u&&n.disposeIntermediateTensorInfo(c),h}},Am=Mv({opSnippet:"\n  if (isnan(a)) return a;\n  if (isnan(b)) return b;\n\n  return min(a, b);\n",packedOpSnippet:"\n  vec4 result = vec4(min(a, b));\n  bvec4 isNaNA = isnan(a);\n  bvec4 isNaNB = isnan(b);\n  bvec4 isNaN = bvec4(isNaNA.x || isNaNB.x, isNaNA.y || isNaNB.y, isNaNA.z || isNaNB.z, isNaNA.w || isNaNB.w);\n  \n  result.r = isNaN.r ? NAN : result.r;\n  result.g = isNaN.g ? NAN : result.g;\n  result.b = isNaN.b ? NAN : result.b;\n  result.a = isNaN.a ? NAN : result.a;\n\n  return result;\n",cpuKernelImpl:jA}),bm={kernelName:f.dc,backendName:"webgl",kernelFunc:Am};
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
class fy{constructor(e,t,n){this.variableNames=["x"],this.outputShape=t.map((t,n)=>t[0]+e[n]+t[1]);var r=e.length,i=Gg(r),o=t.map(e=>e[0]).join(","),a=(t=t.map((t,n)=>t[0]+e[n]).join(","),["coords[0]","coords[1]","coords[2]","coords[3]"].slice(0,r));n="reflect"===n?0:1;this.userCode=1===r?`\n        int start = ${o};\n        int end = ${t};\n\n        void main() {\n          int outC = getOutputCoords();\n          if (outC < start) {\n            outC = start * 2 - outC - ${n};\n          } else if(outC >= end) {\n            outC = (end - 1) * 2 - outC + ${n};\n          }\n          setOutput(getX(outC - start));\n        }\n      `:`\n      ${i} start = ${i}(${o});\n      ${i} end = ${i}(${t});\n\n      void main() {\n        ${i} outC = getOutputCoords();\n        for (int i = 0; i < ${r}; i++) {\n          if (outC[i] < start[i]) {\n            outC[i] = start[i] * 2 - outC[i] - ${n};\n          } else if(outC[i] >= end[i]) {\n            outC[i] = (end[i] - 1) * 2 - outC[i] + ${n};\n          }\n        }\n        ${i} coords = outC - start;\n        setOutput(getX(${a}));\n      }\n    `}}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */class dy{constructor(e,t,n){this.variableNames=["x"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=t.map((t,n)=>t[0]+e[n]+t[1]);var r=e.length,i=Gg(r),o=t.map(e=>e[0]).join(","),a=(t=t.map((t,n)=>t[0]+e[n]).join(","),uv("rc",r));const s=uv("source",r);var u,c=a[r-1]+" < "+this.outputShape[r-1],l=1===r?"source":`vec2(${s.slice(-2).join()})`;n="reflect"===n?0:1;let h="";h=1===r?`\n        ${i} rc = outputLoc;\n        ${u=`\n        ${i} source = rc;\n        if (source < start) {\n          source = start * 2 - source - ${n};\n        } else if (source >= end) {\n          source = (end - 1) * 2 - source + ${n};\n        }\n        source -= start;\n      `}\n        result[0] = getChannel(getX(${s.join()}), ${l});\n        ${a[r-1]} += 1;\n        if(${c}) {\n          ${u}\n          result[1] = getChannel(getX(${s.join()}), ${l});\n        }\n      `:`\n        ${i} rc = outputLoc;\n        ${u=`\n        ${i} source = rc;\n        ${i} lt = ${i}(lessThan(source, start));\n        ${i} gte = ${i}(greaterThanEqual(source, end));\n        ${i} orig = 1 - (lt + gte);\n        source = orig * source +\n                lt * (start * 2 - source - ${n}) +\n                gte * ((end - 1) * 2 - source + ${n});\n        source -= start;\n      `}\n        result[0] = getChannel(getX(${s.join()}), ${l});\n        ${a[r-1]} += 1;\n        if(${c}) {\n          ${u}\n          result[1] = getChannel(getX(${s.join()}), ${l});\n        }\n        rc = outputLoc;\n        ${a[r-2]} += 1;\n        if(${a[r-2]} < ${this.outputShape[r-2]}) {\n          ${u}\n          result[2] = getChannel(getX(${s.join()}), ${l});\n          ${a[r-1]} += 1;\n          if(${c}) {\n            ${u}\n            result[3] = getChannel(getX(${s.join()}), ${l});\n          }\n        }\n      `,this.userCode=`\n      const ${i} start = ${i}(${o});\n      const ${i} end = ${i}(${t});\n\n      void main() {\n        ${i} outputLoc = getOutputCoords();\n        vec4 result = vec4(0.);\n        ${h}\n        setOutput(result);\n      }\n    `}}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */wm={kernelName:f.ec,backendName:"webgl",kernelFunc:({inputs:e,backend:t,attrs:n})=>{e=e.x;var{paddings:n,mode:r}=n;n=new(Object(f.hf)().getBool("WEBGL_PACK_ARRAY_OPERATIONS")?dy:fy)(e.shape,n,r);return t.runWebGLProgram(n,[e],e.dtype)}},xm=Mv({opSnippet:"if (b == 0.0) return NAN;\n  return mod(a, b);",packedOpSnippet:"\n  vec4 result = mod(a, b);\n  bvec4 isNaN = equal(b, vec4(0.0));\n  \n  result.r = isNaN.r ? NAN : result.r;\n  result.g = isNaN.g ? NAN : result.g;\n  result.b = isNaN.b ? NAN : result.b;\n  result.a = isNaN.a ? NAN : result.a;\n\n  return result;\n"}),Cm={kernelName:f.fc,backendName:"webgl",kernelFunc:xm};
/**
 * @license
 * Copyright 2017 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
class py{constructor(e,t,n){this.variableNames=["probs"],this.customUniforms=[{name:"seed",type:"float"}],this.outputShape=[e,n],this.userCode=`\n      void main() {\n        ivec2 coords = getOutputCoords();\n        int batch = coords[0];\n\n        float r = random(seed);\n        float cdf = 0.0;\n\n        for (int i = 0; i < ${t-1}; i++) {\n          cdf += getProbs(batch, i);\n\n          if (r < cdf) {\n            setOutput(float(i));\n            return;\n          }\n        }\n\n        // If no other event happened, last event happened.\n        setOutput(float(${t-1}));\n      }\n    `
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */}}const my=Mv({opSnippet:"\nif (a == b) {\n  return 1.0;\n};\nreturn a / b;",packedOpSnippet:"\n  // vec4 one = vec4(equal(a, b));\n  // return one + (vec4(1.0) - one) * a / b;\n  vec4 result = a / b;\n  if(a.x == b.x) {\n    result.x = 1.;\n  }\n  if(a.y == b.y) {\n    result.y = 1.;\n  }\n  if(a.z == b.z) {\n    result.z = 1.;\n  }\n  if(a.w == b.w) {\n    result.w = 1.;\n  }\n\n  return result;\n",checkOutOfBounds:!0});km={kernelName:f.Gc,backendName:"webgl",kernelFunc:my};
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
const gy=Mv({opSnippet:Sm="return a - b;",packedOpSnippet:Sm,supportsComplex:!0,cpuKernelImpl:nv});
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function Ay(e){const{inputs:t,backend:n,attrs:r}=e;e=t.logits;var i=r.dim,o=cy({inputs:{x:e},backend:n,attrs:{reductionIndices:i=f.Ji.parseAxisParam([i],e.shape),keepDims:!1}}),a=Uv({inputs:{x:o},backend:n,attrs:{shape:u=f.de.expandShapeToKeepDim(o.shape,i)}}),s=(e=gy({inputs:{a:e,b:a},backend:n}),qb({inputs:{x:e},backend:n})),u=Uv({inputs:{x:i=Gv({inputs:{x:s},backend:n,attrs:{axis:i,keepDims:!1}})},backend:n,attrs:{shape:u}}),c=my({inputs:{a:s,b:u},backend:n});return n.disposeIntermediateTensorInfo(o),n.disposeIntermediateTensorInfo(a),n.disposeIntermediateTensorInfo(e),n.disposeIntermediateTensorInfo(s),n.disposeIntermediateTensorInfo(i),n.disposeIntermediateTensorInfo(u),c}_m={kernelName:f.vd,backendName:"webgl",kernelFunc:gy},Tm={kernelName:f.ed,backendName:"webgl",kernelFunc:Ay},
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Dm={kernelName:f.hc,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;e=t.logits;var{numSamples:i,seed:o,normalized:a}=r,s=(e=a?e:Ay({inputs:{logits:e},backend:n,attrs:{dim:e.shape.length-1}})).shape[0],u=e.shape[1];s=new py(s,u,i),u=n.runWebGLProgram(s,[e],"int32",[[o]]);return a||n.disposeIntermediateTensorInfo(e),u}},Im={kernelName:f.jc,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n}=e;var r,i;e=t.x;if(n.shouldExecuteOnCPU([e]))return r=n.texData.get(e.dataId),[r,i]=FA(r.values,e.shape,e.dtype),n.makeTensorInfo(i,e.dtype,r);let o;return o=Object(f.hf)().getBool("WEBGL_PACK_UNARY_OPERATIONS")?new vv(e.shape,"\n  vec4 result = -x;\n  bvec4 isNaN = isnan(x);\n\n  result.r = isNaN.r ? x.r : result.r;\n  result.g = isNaN.g ? x.g : result.g;\n  result.b = isNaN.b ? x.b : result.b;\n  result.a = isNaN.a ? x.a : result.a;\n\n  return result;\n"):new mv(e.shape,"if (isnan(x)) return x;\n  return -x;\n"),n.runWebGLProgram(o,[e],e.dtype)}};
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
const vy=f.Rf.nonMaxSuppressionV3Impl;Nm={kernelName:f.kc,backendName:"webgl",kernelFunc:function(e){f.de.warn("tf.nonMaxSuppression() in webgl locks the UI thread. Call tf.nonMaxSuppressionAsync() instead");const{inputs:t,backend:n,attrs:r}=e;var{boxes:e,scores:i}=t,{maxOutputSize:o,iouThreshold:a,scoreThreshold:s}=r,i=(e=n.readSync(e.dataId),n.readSync(i.dataId));e=vy(e,i,o,a,s).selectedIndices;return n.makeTensorInfo([e.length],"int32",new Int32Array(e))}};
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
const by=f.Rf.nonMaxSuppressionV4Impl;Rm={kernelName:f.lc,backendName:"webgl",kernelFunc:function(e){f.de.warn("tf.nonMaxSuppression() in webgl locks the UI thread. Call tf.nonMaxSuppressionAsync() instead");const{inputs:t,backend:n,attrs:r}=e;var{boxes:e,scores:i}=t,{maxOutputSize:o,iouThreshold:a,scoreThreshold:s,padToMaxOutputSize:u}=r,i=(e=n.readSync(e.dataId),n.readSync(i.dataId)),{selectedIndices:e,validOutputs:i}=by(e,i,o,a,s,u);return[n.makeTensorInfo([e.length],"int32",new Int32Array(e)),n.makeTensorInfo([],"int32",new Int32Array([i]))]}};
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
const yy=f.Rf.nonMaxSuppressionV5Impl;Lm={kernelName:f.mc,backendName:"webgl",kernelFunc:function(e){f.de.warn("tf.nonMaxSuppression() in webgl locks the UI thread. Call tf.nonMaxSuppressionAsync() instead");const{inputs:t,backend:n,attrs:r}=e;var{boxes:e,scores:i}=t,{maxOutputSize:o,iouThreshold:a,scoreThreshold:s,softNmsSigma:u}=r,i=(e=n.readSync(e.dataId),n.readSync(i.dataId)),{selectedIndices:e,selectedScores:i}=yy(e,i,o,a,s,u);return[n.makeTensorInfo([e.length],"int32",new Int32Array(e)),n.makeTensorInfo([i.length],"float32",new Float32Array(i))]}};
/**
 * @license
 * Copyright 2017 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
class wy{constructor(e,t,n,r){this.variableNames=["indices"],this.outputShape=[e,t],this.userCode=`\n      void main() {\n        ivec2 coords = getOutputCoords();\n        int index = round(getIndices(coords.x));\n        setOutput(mix(float(${r}), float(${n}),\n                      float(index == coords.y)));\n      }\n    `
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */}}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function xy(e){const{inputs:t,backend:n}=e;var r,i,o,a,s;return"complex64"===(e=t.x).dtype?(s=_v({inputs:{real:i=xy({inputs:{x:r=fb({inputs:{input:e},backend:n})},backend:n}),imag:a=xy({inputs:{x:o=yb({inputs:{input:e},backend:n})},backend:n})},backend:n}),n.disposeIntermediateTensorInfo(r),n.disposeIntermediateTensorInfo(i),n.disposeIntermediateTensorInfo(o),n.disposeIntermediateTensorInfo(a),s):Xb({attrs:{shape:e.shape,dtype:e.dtype,value:"string"===e.dtype?"":0},backend:n})}pn={kernelName:f.pc,backendName:"webgl",kernelFunc:e=>{const{inputs:t,backend:n,attrs:r}=e;e=t.indices;var{dtype:i,depth:o,onValue:a,offValue:s}=r,u=f.Ji.sizeFromShape(e.shape),s=(a=new wy(u,o,a,s),Uv({inputs:{x:e},backend:n,attrs:{shape:[u]}})),a=(u=n.runWebGLProgram(a,[s],i),n.disposeIntermediateTensorInfo(s),[...e.shape,o]),i=Uv({inputs:{x:u},backend:n,attrs:{shape:a}});return n.disposeIntermediateTensorInfo(u),i}},qt={kernelName:f.Kd,backendName:"webgl",kernelFunc:xy},
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
Um={kernelName:f.qc,backendName:"webgl",kernelFunc:function e(t){const{inputs:n,backend:r}=t;var i,o,a,s,u;if("string"===(t=n.x).dtype)throw new Error("onesLike is not supported under string dtype");return"complex64"===t.dtype?(u=_v({inputs:{real:o=e({inputs:{x:i=fb({inputs:{input:t},backend:r})},backend:r}),imag:s=xy({inputs:{x:a=yb({inputs:{input:t},backend:r})},backend:r})},backend:r}),r.disposeIntermediateTensorInfo(i),r.disposeIntermediateTensorInfo(o),r.disposeIntermediateTensorInfo(a),r.disposeIntermediateTensorInfo(s),u):Xb({attrs:{shape:t.shape,dtype:t.dtype,value:1},backend:r})}},
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
zm={kernelName:f.tc,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,i=r.axis;if(1===t.length)return Gb({inputs:{input:t[0]},backend:n,attrs:{dim:i}});const o=t[0].shape,a=t[0].dtype,s=(t.forEach(e=>{f.Ji.assertShapesMatch(o,e.shape,"All tensors passed to stack must have matching shapes"),f.Ji.assert(a===e.dtype,()=>"All tensors passed to stack must have matching dtypes")}),[]);return e=wb({inputs:t.map(e=>(e=Gb({inputs:{input:e},backend:n,attrs:{dim:i}}),s.push(e),e)),backend:n,attrs:{axis:i}}),s.forEach(e=>n.disposeIntermediateTensorInfo(e)),e}};
/**
 * @license
 * Copyright 2017 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
class Cy{constructor(e,t,n){this.variableNames=["x"],this.customUniforms=[{name:"value",type:"float"}],this.outputShape=t.map((t,n)=>t[0]+e[n]+t[1]);var r=e.length,i=Gg(r),o=t.map(e=>e[0]).join(","),a=(t=t.map((t,n)=>t[0]+e[n]).join(","),["coords[0]","coords[1]","coords[2]","coords[3]"].slice(0,r));this.userCode=1===r?`\n        int start = ${o};\n        int end = ${t};\n\n        void main() {\n          int outC = getOutputCoords();\n          if (outC < start || outC >= end) {\n            setOutput(value);\n          } else {\n            setOutput(getX(outC - start));\n          }\n        }\n      `:`\n      ${i} start = ${i}(${o});\n      ${i} end = ${i}(${t});\n\n      void main() {\n        ${i} outC = getOutputCoords();\n        if (any(lessThan(outC, start)) || any(greaterThanEqual(outC, end))) {\n          setOutput(value);\n        } else {\n          ${i} coords = outC - start;\n          setOutput(getX(${a}));\n        }\n      }\n    `}}
/**
 * @license
 * Copyright 2019 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */class ky{constructor(e,t,n){this.variableNames=["x"],this.packedInputs=!0,this.packedOutput=!0,this.customUniforms=[{name:"value",type:"float"}],this.outputShape=t.map((t,n)=>t[0]+e[n]+t[1]);var r=e.length,i=Gg(r),o=t.map(e=>e[0]).join(","),a=(t=t.map((t,n)=>t[0]+e[n]).join(","),uv("rc",r));const s=uv("source",r);var u=a[r-1]+" < "+this.outputShape[r-1],c=1===r?"source":`vec2(${s.slice(-2).join()})`,l=[i+" rc = outputLoc;",a[r-1]+` += 1;\n       if(${u}) {\n      `,1===r?"":`}\n       rc = outputLoc;\n       ${a[r-2]} += 1;\n       if(${a[r-2]} < ${this.outputShape[r-2]}) {`,1===r?"":`  ${a[r-1]} += 1;\n         if(${u}) {`],h=1===r?"rc < start || rc >= end":"any(lessThan(rc, start)) || any(greaterThanEqual(rc, end))";let f="";for(let e=0,t=1===r?2:4;e<t;e++)f+=`\n        ${l[e]}\n        if (${h}) {\n          result[${e}] = float(value);\n        } else {\n          ${i} source = rc - start;\n          result[${e}] = getChannel(getX(${s.join()}), ${c});\n        }\n      `;f+=1===r?"} ":"}}",this.userCode=`\n      const ${i} start = ${i}(${o});\n      const ${i} end = ${i}(${t});\n\n      void main() {\n        ${i} outputLoc = getOutputCoords();\n        vec4 result = vec4(0.);\n        ${f}\n        setOutput(result);\n      }\n    `}}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */const Ey=e=>{const{inputs:t,backend:n,attrs:r}=e,i=t.x,{paddings:o,constantValue:a}=r;return 0===f.Ji.sizeFromShape(i.shape)?Xb({backend:n,attrs:{shape:e=o.map((e,t)=>e[0]+i.shape[t]+e[1]),value:a,dtype:i.dtype}}):(e=new(Object(f.hf)().getBool("WEBGL_PACK_ARRAY_OPERATIONS")?ky:Cy)(i.shape,o,a),n.runWebGLProgram(e,[i],i.dtype,[[a]]))};$m={kernelName:f.uc,backendName:"webgl",kernelFunc:Ey},Gm=Mv({opSnippet:"\n  if(a < 0.0 && floor(b) < b){\n    return NAN;\n  }\n  if (b == 0.0) {\n    return 1.0;\n  }\n  return (round(mod(b, 2.0)) != 1) ?\n      pow(abs(a), b) : sign(a) * pow(abs(a), b);\n",packedOpSnippet:"\n  // isModRound1 has 1 for components with round(mod(b, 2.0)) == 1, 0 otherwise.\n  vec4 isModRound1 = vec4(equal(round(mod(b, 2.0)), ivec4(1)));\n  vec4 multiplier = sign(a) * isModRound1 + (vec4(1.0) - isModRound1);\n  vec4 result = multiplier * pow(abs(a), b);\n\n  // Ensure that a^0 = 1, including 0^0 = 1 as this correspond to TF and JS\n  bvec4 isExpZero = equal(b, vec4(0.0));\n  result.r = isExpZero.r ? 1.0 : result.r;\n  result.g = isExpZero.g ? 1.0 : result.g;\n  result.b = isExpZero.b ? 1.0 : result.b;\n  result.a = isExpZero.a ? 1.0 : result.a;\n\n  bvec4 isNaN1 = lessThan(a, vec4(0.0));\n  bvec4 isNaN2 = lessThan(floor(b), b);\n  bvec4 isNaN = bvec4(isNaN1.x && isNaN2.x, isNaN1.y && isNaN2.y, isNaN1.z && isNaN2.z, isNaN1.w && isNaN2.w);\n  \n  result.r = isNaN.r ? NAN : result.r;\n  result.g = isNaN.g ? NAN : result.g;\n  result.b = isNaN.b ? NAN : result.b;\n  result.a = isNaN.a ? NAN : result.a;\n\n  return result;\n"}),Wm={kernelName:f.wc,backendName:"webgl",kernelFunc:Gm},
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
ce={kernelName:f.yc,backendName:"webgl",kernelFunc:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){const{inputs:t,backend:n,attrs:r}=e;e=t.x;var{axis:i,keepDims:o}=r,a=e.shape.length;const s=[];let u=i=f.Ji.parseAxisParam(i,e.shape);var c,l=f.de.getAxesPermutation(u,a);let h,d=e;return null!=l&&(d=Wv({inputs:{x:e},backend:n,attrs:{perm:l}}),u=f.de.getInnerMostAxes(u.length,a),s.push(d)),f.de.assertAxesAreInnerMostDims("prod",u,a),n.shouldExecuteOnCPU([d])?(l=n.texData.get(d.dataId).values,({outVals:a,outShape:l,outDtype:c}=PA(d.shape,d.dtype,l,u)),h=n.makeTensorInfo(l,c,a)):([l,c]=f.de.computeOutAndReduceShapes(d.shape,u),a=f.Ji.sizeFromShape(c),a=$v(c=Uv({inputs:{x:d},backend:n,attrs:{shape:[-1,a]}}),Object(f.ji)(e.dtype),"prod",n),h=Uv({inputs:{x:a},backend:n,attrs:{shape:l}}),s.push(c),s.push(a)),o&&(s.push(h),e=f.de.expandShapeToKeepDim(h.shape,i),h=Uv({inputs:{x:h},backend:n,attrs:{shape:e}})),s.forEach(e=>n.disposeIntermediateTensorInfo(e)),h}},
/**
 * @license
 * Copyright 2022 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
tg={kernelName:f.Ac,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{paramsNestedSplits:i,paramsDenseValues:o,indices:a}=t;e=r.outputRaggedRank;var s=i.map(e=>n.readSync(e.dataId)),u=i.map(e=>e.shape),c=n.readSync(o.dataId),l=n.readSync(a.dataId);const[h,f,d]=LA(s,u,c,o.shape,o.dtype,l,a.shape,e),p=h.map(e=>n.makeTensorInfo([e.length],"int32",e));return s=n.makeTensorInfo(d,o.dtype,f),p.concat([s])}},
/**
 * @license
 * Copyright 2022 Google LLC.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
ng={kernelName:f.Bc,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n}=e;var{starts:e,limits:r,deltas:i}=t,o=n.readSync(e.dataId),a=n.readSync(r.dataId),s=n.readSync(i.dataId),[o,a]=UA(o,e.shape,e.dtype,a,r.shape,s,i.shape);return[n.makeTensorInfo([o.length],"int32",o),n.makeTensorInfo([a.length],e.dtype,a)]}},
/**
 * @license
 * Copyright 2022 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
rg={kernelName:f.Cc,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,{shape:i,values:o,defaultValue:a,rowPartitionTensors:s}=t;e=r.rowPartitionTypes;var u=n.readSync(i.dataId),c=n.readSync(o.dataId),l=n.readSync(a.dataId),h=s.map(e=>n.readSync(e.dataId)),f=s.map(e=>e.shape),[u,c]=zA(u,i.shape,c,o.shape,o.dtype,l,a.shape,h,f,e);return n.makeTensorInfo(u,o.dtype,c)}};
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
const Sy=e=>{const{backend:t,attrs:n}=e;var{start:e,stop:r,step:i,dtype:o}=n;e=HA(e,r,i,o);return t.makeTensorInfo([e.length],o,e)};Ep={kernelName:f.Dc,backendName:"webgl",kernelFunc:Sy},Y=Iv({opSnippet:"return 1.0 / x;"}),J={kernelName:f.Hc,backendName:"webgl",kernelFunc:Y},ee=Iv({opSnippet:"if (isnan(x)) return x;\n  return (x < 0.0) ? 0.0 : x;\n",packedOpSnippet:"\n  vec4 result = x * vec4(greaterThanEqual(x, vec4(0.0)));\n  bvec4 isNaN = isnan(x);\n\n  result.r = isNaN.r ? x.r : result.r;\n  result.g = isNaN.g ? x.g : result.g;\n  result.b = isNaN.b ? x.b : result.b;\n  result.a = isNaN.a ? x.a : result.a;\n\n  return result;\n"}),h={kernelName:f.Jc,backendName:"webgl",kernelFunc:ee},je=Iv({opSnippet:"if (isnan(x)) return x;\n  return (x < 0.0) ? 0.0 : min(6.0, x);\n",packedOpSnippet:"\n  vec4 result = min(x, vec4(6.)) * vec4(greaterThanEqual(x, vec4(0.0)));\n  bvec4 isNaN = isnan(x);\n\n  result.r = isNaN.r ? x.r : result.r;\n  result.g = isNaN.g ? x.g : result.g;\n  result.b = isNaN.b ? x.b : result.b;\n  result.a = isNaN.a ? x.a : result.a;\n\n  return result;\n"}),Fe={kernelName:f.Kc,backendName:"webgl",kernelFunc:je};
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
/**
 * @license
 * Copyright 2017 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
class _y{constructor(e,t,n,r,i){this.variableNames=["A"],this.outputShape=[];var[e,o,a,s]=e,s=(e=(this.outputShape=[e,t,n,s],[r&&1<t?o-1:o,r&&1<n?a-1:a]),[r&&1<t?t-1:t,r&&1<n?n-1:n]);let u;u=i?"(vec2(yRC) + vec2(0.5)) * effectiveInputOverOutputRatioRC - vec2(0.5)":"vec2(yRC) * effectiveInputOverOutputRatioRC",this.userCode=`\n      const vec2 effectiveInputOverOutputRatioRC = vec2(\n          ${e[0]/s[0]},\n          ${e[1]/s[1]});\n      const vec2 inputShapeRC = vec2(${o}.0, ${a}.0);\n\n      void main() {\n        ivec4 coords = getOutputCoords();\n        int b = coords[0];\n        int d = coords[3];\n        ivec2 yRC = coords.yz;\n\n        // Fractional source index.\n        vec2 sourceFracIndexRC = ${u};\n\n        // Compute the four integer indices.\n        ivec2 sourceFloorRC = ivec2(max(sourceFracIndexRC, vec2(0.0)));\n        ivec2 sourceCeilRC = ivec2(\n          min(inputShapeRC - 1.0, ceil(sourceFracIndexRC)));\n\n        float topLeft = getA(b, sourceFloorRC.x, sourceFloorRC.y, d);\n        float bottomLeft = getA(b, sourceCeilRC.x, sourceFloorRC.y, d);\n        float topRight = getA(b, sourceFloorRC.x, sourceCeilRC.y, d);\n        float bottomRight = getA(b, sourceCeilRC.x, sourceCeilRC.y, d);\n\n        vec2 fracRC = sourceFracIndexRC - vec2(sourceFloorRC);\n\n        float top = topLeft + (topRight - topLeft) * fracRC.y;\n        float bottom = bottomLeft + (bottomRight - bottomLeft) * fracRC.y;\n        float newValue = top + (bottom - top) * fracRC.x;\n\n        setOutput(newValue);\n      }\n    `}}
/**
 * @license
 * Copyright 2019 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */class Oy{constructor(e,t,n,r,i){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=[];var[e,o,a,s]=e;this.outputShape=[e,t,n,s],e=[r&&1<t?o-1:o,r&&1<n?a-1:a],t=[r&&1<t?t-1:t,r&&1<n?n-1:n];let u;u=i?"(vec3(yRC) + vec3(0.5)) * effectiveInputOverOutputRatioRC - vec3(0.5)":"vec3(yRC) * effectiveInputOverOutputRatioRC",this.userCode=`\n      const vec3 effectiveInputOverOutputRatioRC = vec3(\n          ${e[0]/t[0]},\n          ${e[1]/t[1]},\n          ${e[1]/t[1]});\n      const vec3 inputShapeRC = vec3(${o}.0, ${a}.0,\n                                     ${a}.0);\n\n      float getAValue(int b, int r, int c, int d) {\n        return getChannel(getA(b, r, c, d), vec2(c, d));\n      }\n\n      void main() {\n        ivec4 coords = getOutputCoords();\n        int b = coords[0];\n        int d = coords[3];\n        // Calculate values for next column in yRC.z.\n        ivec3 yRC = coords.yzz + ivec3(0, 0, 1);\n\n        // Fractional source index.\n        vec3 sourceFracIndexRC = ${u};\n\n        // Compute the four integer indices.\n        ivec3 sourceFloorRC = ivec3(max(sourceFracIndexRC, vec3(0.0)));\n        ivec3 sourceCeilRC = ivec3(\n          min(inputShapeRC - 1.0, ceil(sourceFracIndexRC)));\n\n        // Should we calculate next column and row elements in 2x2 packed cell.\n        bool hasNextCol = d < ${s-1};\n        bool hasNextRow = coords.z < ${n-1};\n\n        // In parallel, construct four corners for all four components in\n        // packed 2x2 cell.\n        vec4 topLeft = vec4(\n          getAValue(b, sourceFloorRC.x, sourceFloorRC.y, d),\n          hasNextCol ? getAValue(b, sourceFloorRC.x, sourceFloorRC.y, d + 1)\n                     : 0.0,\n          hasNextRow ? getAValue(b, sourceFloorRC.x, sourceFloorRC.z, d)\n                     : 0.0,\n          (hasNextRow && hasNextCol) ?\n            getAValue(b, sourceFloorRC.x, sourceFloorRC.z, d + 1) : 0.0);\n\n        vec4 bottomLeft = vec4(\n          getAValue(b, sourceCeilRC.x, sourceFloorRC.y, d),\n          hasNextCol ? getAValue(b, sourceCeilRC.x, sourceFloorRC.y, d + 1)\n                     : 0.0,\n          hasNextRow ? getAValue(b, sourceCeilRC.x, sourceFloorRC.z, d)\n                     : 0.0,\n          (hasNextRow && hasNextCol) ?\n            getAValue(b, sourceCeilRC.x, sourceFloorRC.z, d + 1) : 0.0);\n\n        vec4 topRight = vec4(\n          getAValue(b, sourceFloorRC.x, sourceCeilRC.y, d),\n          hasNextCol ? getAValue(b, sourceFloorRC.x, sourceCeilRC.y, d + 1)\n                     : 0.0,\n          hasNextRow ? getAValue(b, sourceFloorRC.x, sourceCeilRC.z, d)\n                     : 0.0,\n          (hasNextRow && hasNextCol) ?\n            getAValue(b, sourceFloorRC.x, sourceCeilRC.z, d + 1) : 0.0);\n\n        vec4 bottomRight = vec4(\n          getAValue(b, sourceCeilRC.x, sourceCeilRC.y, d),\n          hasNextCol ? getAValue(b, sourceCeilRC.x, sourceCeilRC.y, d + 1)\n                     : 0.0,\n          hasNextRow ? getAValue(b, sourceCeilRC.x, sourceCeilRC.z, d)\n                     : 0.0,\n          (hasNextRow && hasNextCol) ?\n            getAValue(b, sourceCeilRC.x, sourceCeilRC.z, d + 1) : 0.0);\n\n        vec3 fracRC = sourceFracIndexRC - vec3(sourceFloorRC);\n\n        vec4 top = mix(topLeft, topRight, fracRC.yyzz);\n        vec4 bottom = mix(bottomLeft, bottomRight, fracRC.yyzz);\n        vec4 newValue = mix(top, bottom, fracRC.x);\n\n        setOutput(newValue);\n      }\n    `}}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */He={kernelName:f.Mc,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;e=t.images;var{alignCorners:i,halfPixelCenters:o,size:a}=r,[a,s]=a,a=new(Object(f.hf)().getBool("WEBGL_PACK_IMAGE_OPERATIONS")?Oy:_y)(e.shape,a,s,i,o);return n.runWebGLProgram(a,[e],"float32")}};
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
class Ty{constructor(e,t,n){this.variableNames=["dy"],this.outputShape=[];var[,t,r]=this.outputShape=t,[,e,i]=e,o=[n&&1<e?t-1:t,n&&1<i?r-1:r],a=(n=[n&&1<e?e-1:e,n&&1<i?i-1:i],o[0]/n[0]),s=(o=o[1]/n[1],n=1/a,1/o),u=2*Math.ceil(n)+2,c=2*Math.ceil(s)+2;this.userCode=`\n      void main() {\n        ivec4 coords = getOutputCoords();\n        int b = coords[0];\n        int d = coords[3];\n        int r = coords[1];\n        int c = coords[2];\n\n        float accumulator = 0.0;\n\n        const float heightScale = float(${a});\n        const float widthScale = float(${o});\n\n        const float invHeightScale = float(${n});\n        const float invWidthScale = float(${s});\n\n        const int winHeight = int(${u});\n        const int winWidth = int(${c});\n\n        // Compute bounds for where in dy we will look\n        float startRLerp = floor(float(r) * invHeightScale);\n        int startDyR = int(startRLerp - float(winHeight / 2));\n\n        float startCLerp = floor(float(c) * invWidthScale);\n        int startDyC = int(startCLerp - float(winWidth / 2));\n\n        // Loop over dy\n        for (int dyROffset = 0; dyROffset < winHeight; dyROffset++) {\n          int dyR = dyROffset + startDyR;\n\n          // Guard against the window exceeding the bounds of dy\n          if (dyR < 0 || dyR >= ${e}) {\n            continue;\n          }\n\n          for (int dyCOffset = 0; dyCOffset < winWidth; dyCOffset++) {\n            int dyC = dyCOffset + startDyC;\n\n            // Guard against the window exceeding the bounds of dy\n            if (dyC < 0 || dyC >= ${i}) {\n              continue;\n            }\n\n            float dxR = float(dyR) * heightScale;\n            int topDxRIndex = int(floor(dxR));\n            int bottomDxRIndex = int(min(ceil(dxR), ${t-1}.0));\n            float dxRLerp = dxR - float(topDxRIndex);\n            float inverseDxRLerp = 1.0 - dxRLerp;\n\n            float dxC = float(dyC) * widthScale;\n            int leftDxCIndex = int(floor(dxC));\n            int rightDxCIndex = int(min(ceil(dxC), ${r-1}.0));\n            float dxCLerp = dxC - float(leftDxCIndex);\n            float inverseDxCLerp = 1.0 - dxCLerp;\n\n            if (r == topDxRIndex && c == leftDxCIndex) {\n              // topLeft\n              accumulator +=\n                getDy(b, dyR, dyC, d) * inverseDxRLerp * inverseDxCLerp;\n            }\n\n            if (r == topDxRIndex && c == rightDxCIndex) {\n              // topRight\n              accumulator += getDy(b, dyR, dyC, d) * inverseDxRLerp * dxCLerp;\n            }\n\n            if (r == bottomDxRIndex && c == leftDxCIndex) {\n              // bottomLeft\n              accumulator += getDy(b, dyR, dyC, d) * dxRLerp * inverseDxCLerp;\n            }\n\n            if (r == bottomDxRIndex && c == rightDxCIndex) {\n              // bottomRight\n              accumulator += getDy(b, dyR, dyC, d) * dxRLerp * dxCLerp;\n            }\n          }\n        }\n        // End loop over dy\n\n        setOutput(accumulator);\n      }\n    `}}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */Ve={kernelName:f.Nc,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;var{images:e,dy:i}=t,o=r.alignCorners;e=new Ty(i.shape,e.shape,o);return n.runWebGLProgram(e,[i],i.dtype)}};
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
class Dy{constructor(e,t,n,r,i){this.variableNames=["A"],this.outputShape=[];var[e,o,a,s]=e,s=(e=(this.outputShape=[e,t,n,s],[r&&1<t?o-1:o,r&&1<n?a-1:a]),[r&&1<t?t-1:t,r&&1<n?n-1:n]);let u;u=i?"max((vec2(yRC) + vec2(0.5)) * effectiveInputOverOutputRatioRC, vec2(0.0))":"vec2(yRC) * effectiveInputOverOutputRatioRC",this.userCode=`\n      const vec2 effectiveInputOverOutputRatioRC = vec2(\n          ${e[0]/s[0]},\n          ${e[1]/s[1]});\n      const vec2 inputShapeRC = vec2(${o}.0, ${a}.0);\n\n      void main() {\n        ivec4 coords = getOutputCoords();\n        int b = coords[0];\n        int d = coords[3];\n        ivec2 yRC = coords.yz;\n\n        // Fractional source index.\n        vec2 sourceFracIndexRC = ${u};\n\n        // Compute the coordinators of nearest neighbor point.\n        ivec2 sourceNearestRC = ivec2(\n          min(inputShapeRC - 1.0, floor(sourceFracIndexRC + ${r?"0.5":"0.0"})));\n        float newValue = getA(b, sourceNearestRC.x, sourceNearestRC.y, d);\n\n        setOutput(newValue);\n      }\n    `}}
/**
 * @license
 * Copyright 2019 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */class By{constructor(e,t,n,r,i){this.variableNames=["A"],this.packedInputs=!0,this.packedOutput=!0,this.outputShape=[];var[e,o,a,s]=e;this.outputShape=[e,t,n,s],e=[r&&1<t?o-1:o,r&&1<n?a-1:a],t=[r&&1<t?t-1:t,r&&1<n?n-1:n];let u;u=i?"max((vec3(yRC) + vec3(0.5)) * effectiveInputOverOutputRatioRC, vec3(0.0))":"vec3(yRC) * effectiveInputOverOutputRatioRC",this.userCode=`\n      const vec3 effectiveInputOverOutputRatioRC = vec3(\n          ${e[0]/t[0]},\n          ${e[1]/t[1]},\n          ${e[1]/t[1]});\n      const vec3 inputShapeRC = vec3(${o}.0, ${a}.0,\n                                     ${a}.0);\n\n      float getAValue(int b, int r, int c, int d) {\n        return getChannel(getA(b, r, c, d), vec2(c, d));\n      }\n\n      void main() {\n        ivec4 coords = getOutputCoords();\n        int b = coords[0];\n        int d = coords[3];\n        // Calculate values for next column in yRC.z.\n        ivec3 yRC = coords.yzz + ivec3(0, 0, 1);\n\n        // Fractional source index.\n        vec3 sourceFracIndexRC = ${u};\n\n        // Compute the coordinators of nearest neighbor point.\n        ivec3 sourceNearestRC = ivec3(\n          min(inputShapeRC - 1.0, floor(sourceFracIndexRC + ${r?"0.5":"0.0"})));\n\n        // Should we calculate next column and row elements in 2x2 packed cell.\n        bool hasNextCol = d < ${s-1};\n        bool hasNextRow = coords.z < ${n-1};\n\n        vec4 newValue = vec4(\n          getAValue(b, sourceNearestRC.x, sourceNearestRC.y, d),\n          hasNextCol ? getAValue(b, sourceNearestRC.x, sourceNearestRC.y, d + 1)\n                     : 0.0,\n          hasNextRow ? getAValue(b, sourceNearestRC.x, sourceNearestRC.z, d)\n                     : 0.0,\n          (hasNextRow && hasNextCol) ?\n            getAValue(b, sourceNearestRC.x, sourceNearestRC.z, d + 1) : 0.0);\n\n        setOutput(newValue);\n      }\n    `}}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */Ze={kernelName:f.Oc,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;e=t.images;var{alignCorners:i,halfPixelCenters:o,size:a}=r,[a,s]=a,a=new(Object(f.hf)().getBool("WEBGL_PACK_IMAGE_OPERATIONS")?By:Dy)(e.shape,a,s,i,o);return n.runWebGLProgram(a,[e],e.dtype)}};
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
class Iy{constructor(e,t,n){this.variableNames=["dy"],this.outputShape=[];var[,t,r]=this.outputShape=t,[,e,i]=e,o=[n&&1<e?t-1:t,n&&1<i?r-1:r],a=[n&&1<e?e-1:e,n&&1<i?i-1:i],s=o[0]/a[0],u=o[1]/a[1],c=1/s,l=1/u,h=2*Math.ceil(c)+2,f=2*Math.ceil(l)+2;this.userCode=`\n      void main() {\n        ivec4 coords = getOutputCoords();\n        int b = coords[0];\n        int d = coords[3];\n        int r = coords[1];\n        int c = coords[2];\n\n        float accumulator = 0.0;\n\n        const float heightScale = float(${s});\n        const float widthScale = float(${u});\n\n        const float invHeightScale = float(${c});\n        const float invWidthScale = float(${l});\n\n        const int winHeight = int(${h});\n        const int winWidth = int(${f});\n\n        // Compute bounds for where in dy we will look\n        float startRLerp = floor(float(r) * invHeightScale);\n        int startDyR = int(floor(startRLerp - float(winHeight / 2)));\n\n        float startCLerp = floor(float(c) * invWidthScale);\n        int startDyC = int(floor(startCLerp - float(winWidth / 2)));\n\n        // Loop over dy\n        for (int dyROffset = 0; dyROffset < winHeight; dyROffset++) {\n          int dyR = dyROffset + startDyR;\n\n          // Guard against the window exceeding the bounds of dy\n          if (dyR < 0 || dyR >= ${e}) {\n            continue;\n          }\n\n          for (int dyCOffset = 0; dyCOffset < winWidth; dyCOffset++) {\n            int dyC = dyCOffset + startDyC;\n\n            // Guard against the window exceeding the bounds of dy\n            if (dyC < 0 || dyC >= ${i}) {\n              continue;\n            }\n\n            float sourceFracRow =\n              float(${o[0]}) *\n                (float(dyR) / float(${a[0]}));\n\n            float sourceFracCol =\n                float(${o[1]}) *\n                  (float(dyC) / float(${a[1]}));\n\n            int sourceNearestRow = int(min(\n                float(int(${t}) - 1),\n                ${n} ? float(round(sourceFracRow)) :\n                                  float(floor(sourceFracRow))));\n\n            int sourceNearestCol = int(min(\n                float(int(${r}) - 1),\n                ${n} ? float(round(sourceFracCol)) :\n                                  float(floor(sourceFracCol))));\n\n            if (r == sourceNearestRow && c == sourceNearestCol) {\n              accumulator += getDy(b, dyR, dyC, d);\n            }\n          }\n        }\n        // End loop over dy\n\n        setOutput(accumulator);\n      }\n    `}}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */j={kernelName:f.Pc,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;var{images:e,dy:i}=t,o=r.alignCorners;e=new Iy(i.shape,e.shape,o);return n.runWebGLProgram(e,[i],i.dtype)}};
/**
 * @license
 * Copyright 2017 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
class My{constructor(e,t){if(this.variableNames=["x"],4<(r=e.length))throw new Error(`WebGL backend: Reverse of rank-${r} tensor is not yet supported`);if(this.outputShape=e,1===r)this.userCode=`\n        void main() {\n          int coord = getOutputCoords();\n          setOutput(getX(${e[0]} - coord - 1));\n        }\n      `;else{var n=e.map((n,r)=>(n=>-1!==t.indexOf(n)&&1!==e[n]?e[n]+` - coords[${n}] - 1`:`coords[${n}]`)(r)).join(","),r=Gg(r);this.userCode=`\n      void main() {\n        ${r} coords = getOutputCoords();\n        setOutput(getX(${n}));\n      }\n    `}}}
/**
 * @license
 * Copyright 2019 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */class jy{constructor(e,t){this.variableNames=["x"],this.packedInputs=!0,this.packedOutput=!0;const n=e.length;if(4<n)throw new Error(`WebGL backend: Reverse of rank-${n} tensor is not yet supported`);this.outputShape=e;const r=uv("rc",n);var i=r[n-1]+" + 1 < "+this.outputShape[n-1],o=r[n-2]+" + 1 < "+this.outputShape[n-2],a=Gg(n);function s(n){const r=e.map((r,i)=>{var o=n;return-1!==t.indexOf(i)&&1!==e[i]?`${e[i]} - ${o[i]} - 1`:""+o[i]});return`getChannel(getX(${r.join(",")}), vec2(${r.slice(-2).join(",")}))`}this.userCode=1===n?`\n        void main(){\n          int rc = getOutputCoords();\n          vec4 result = vec4(0.);\n          result.r = getChannel(getX(${e[0]} - rc - 1),\n            ${e[0]} - rc - 1);\n          if(${i}){\n              result.g = getChannel(getX(${e[0]} - (rc  + 1) - 1),\n                ${e[0]} - (rc  + 1) - 1);\n          }\n          setOutput(result);\n        }\n      `:`\n        void main() {\n          ${a} rc = getOutputCoords();\n          vec4 result = vec4(0.);\n          result.r = ${s(r.slice())};\n          if(${i}){\n            result.g = ${a=r.slice(),a[n-1]="("+a[n-1]+" + 1)",s(a)};\n          }\n          if(${o}) {\n            result.b = ${a=r.slice(),a[n-2]="("+a[n-2]+" + 1)",s(a)};\n            if(${i}) {\n              result.a = ${o=r.slice(),o[n-1]="("+o[n-1]+" + 1)",o[n-2]="("+o[n-2]+" + 1)",s(o)};\n            }\n          }\n          setOutput(result);\n        }\n    `}}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */ct={kernelName:f.Qc,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;e=t.x;var i=r.dims,o=e.shape.length;i=f.Ji.parseAxisParam(i,e.shape);return 0===o?Sv({inputs:{x:e},backend:n}):(o=new(Object(f.hf)().getBool("WEBGL_PACK_ARRAY_OPERATIONS")?jy:My)(e.shape,i),n.runWebGLProgram(o,[e],e.dtype))}};
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
class Ny{constructor(e,t){this.variableNames=["Image"],this.outputShape=[],this.customUniforms=[{name:"params",type:"vec4"}];var n=e[1],r=e[2];this.outputShape=e;let i="";i="number"==typeof t?`float outputValue = ${t.toFixed(2)};`:`\n        vec3 fill = vec3(${t.join(",")});\n        float outputValue = fill[coords[3]];`,this.userCode=`\n        void main() {\n          ivec4 coords = getOutputCoords();\n          int x = coords[2];\n          int y = coords[1];\n          float coordXFloat = (float(x) - params[0]) * params[3] -\n            (float(y) - params[1]) * params[2];\n          float coordYFloat = (float(x) - params[0]) * params[2] +\n            (float(y) - params[1]) * params[3];\n          int coordX = int(round(coordXFloat + params[0]));\n          int coordY = int(round(coordYFloat + params[1]));\n          ${i}\n          if(coordX >= 0 && coordX < ${r} && coordY >= 0 && coordY < ${n}) {\n            outputValue = getImage(coords[0], coordY, coordX, coords[3]);\n          }\n          setOutput(outputValue);\n        }\n    `}}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */ft={kernelName:f.Rc,backendName:"webgl",kernelFunc:({inputs:e,attrs:t,backend:n})=>{e=e.image;var{radians:t,fillValue:r,center:i}=t;const o=n;n=new Ny(e.shape,r);var[r,i]=f.de.getImageCenter(i,e.shape[1],e.shape[2]),r=[[r,i,Math.sin(t),Math.cos(t)]];return o.runWebGLProgram(n,[e],e.dtype,r)}},pt=Iv({opSnippet:"\n  // OpenGL ES does not support round function.\n  // The algorithm is based on banker's rounding.\n  float base = floor(x);\n  if ((x - base) < 0.5) {\n    return floor(x);\n  } else if ((x - base) > 0.5) {\n    return ceil(x);\n  } else {\n    if (mod(base, 2.0) == 0.0) {\n      return base;\n    } else {\n      return base + 1.0;\n    }\n  }\n"}),Ut={kernelName:f.Sc,backendName:"webgl",kernelFunc:pt},Ht=Iv({opSnippet:"return inversesqrt(x);",cpuKernelImpl:$A}),vn={kernelName:f.Tc,backendName:"webgl",kernelFunc:Ht};
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
class Fy{constructor(e,t,n,r,i,o,a=0){this.variableNames=["updates","indices","defaultValue"],this.outputShape=o;var s=Gg(i.length);o=Gg(o.length);let u="";1===n?u="i":2===n&&(u="i, j"),n=`getIndices(${u})`;let c="";1===r?c="i":2===r&&(c="i, coords[1]"),r=`getUpdates(${c})`,this.userCode=`\n        ${s} strides = ${s}(${i});\n\n        void main() {\n          ${o} coords = getOutputCoords();\n          float sum = 0.0;\n          bool found = false;\n          for (int i = 0; i < ${e}; i++) {\n            int flattenedIndex = 0;\n            for (int j = 0; j < ${t}; j++) {\n              int index = round(${n});\n              flattenedIndex += index * ${1<t?"strides[j]":"strides"};\n            }\n            if (flattenedIndex == coords[0]) {\n              sum += ${r};\n              found = true;\n            }\n          }\n          setOutput(mix(getDefaultValue(), sum, float(found)));\n        }\n      `}}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */Cn={kernelName:f.Vc,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;var{indices:e,updates:i}=t,o=r.shape,{sliceRank:a,numUpdates:s,sliceSize:u,strides:c,outputSize:l}=f.de.calculateShapes(i,e,o),h=[l/u,u];return 0===l?n.makeTensorInfo(o,e.dtype):(l=Uv({inputs:{x:e},backend:n,attrs:{shape:[s,a]}}),e=Uv({inputs:{x:i},backend:n,attrs:{shape:[s,u]}}),i=n.makeTensorInfo([],"float32",new Float32Array([0])),u=new Fy(s,a,l.shape.length,e.shape.length,c,h),a=Uv({inputs:{x:s=n.runWebGLProgram(u,[e,l,i],e.dtype)},backend:n,attrs:{shape:o}}),n.disposeIntermediateTensorInfo(l),n.disposeIntermediateTensorInfo(e),n.disposeIntermediateTensorInfo(s),n.disposeIntermediateTensorInfo(i),a)}};
/**
 * @license
 * Copyright 2022 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
class Ry{constructor(e,t,n,r){this.variableNames=["sortedSequence","values"],this.customUniforms=[{name:"numInputs",type:"int"}],this.outputShape=[e,n],e=`for (int i = 0; i < ${Math.ceil(Math.log2(t+1))}; ++i) { if (left >= right) break;`,n=2===Object(f.hf)().getNumber("WEBGL_VERSION")?"while (left < right) {":e,this.userCode=`\n       int findBound(int batch, float value) {\n         int left = 0;\n         int right = numInputs;\n         int mid;\n         ${n}\n           mid = (left + right) / 2;\n           if (getSortedSequence(batch, mid) ${"left"===r?"<":"<="} value) {\n             left = mid + 1;\n           } else {\n             right = mid;\n           }\n         }\n         return right;\n       }\n\n       void main() {\n         ivec2 coords = getOutputCoords();\n         int batch = coords[0];\n         int valueIndex = coords[1];\n\n         float value = getValues(batch, valueIndex);\n\n         setOutput(float(findBound(batch, value)));\n       }\n     `}}
/**
 * @license
 * Copyright 2022 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */P={kernelName:f.Wc,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;var{sortedSequence:e,values:i}=t,o=r.side,a=(o=new Ry(e.shape[0],e.shape[1],i.shape[1],o),[[e.shape[1]]]);return n.runWebGLProgram(o,[e,i],"int32",a)}};
/**
 * @license
 * Copyright 2017 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
class Py{constructor(e,t,n){let r,i;if(this.variableNames=["c","a","b"],this.outputShape=t,4<n)throw Error(`Where for rank ${n} is not yet supported`);if(1===n)i="resRC",r="resRC";else{var o=["resRC.x","resRC.y","resRC.z","resRC.w"];const n=[],a=[];for(let r=0;r<t.length;r++)a.push(""+o[r]),r<e&&n.push(""+o[r]);r=n.join(),i=a.join()}n=Gg(n),this.userCode=`\n      void main() {\n        ${n} resRC = getOutputCoords();\n        float cVal = getC(${r});\n        if (cVal >= 1.0) {\n          setOutput(getA(${i}));\n        } else {\n          setOutput(getB(${i}));\n        }\n      }\n    `}}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */sn={kernelName:f.Xc,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n}=e;var{condition:e,t:r,e:i}=t,o=new Py(e.shape.length,r.shape,r.shape.length);return n.runWebGLProgram(o,[e,r,i],Object(f.Hi)(r.dtype,i.dtype))}},yn=Iv({opSnippet:`\n  // Stable and Attracting Fixed Point (0, 1) for Normalized Weights.\n  // see: https://arxiv.org/abs/1706.02515\n  float scaleAlpha = ${f.de.SELU_SCALEALPHA};\n  float scale = ${f.de.SELU_SCALE};\n  return (x >= 0.0) ? scale * x : scaleAlpha * (exp(x) - 1.0);\n`}),et=Iv({opSnippet:"if (isnan(x)) return x;\n  return 1.0 / (1.0 + exp(-1.0 * x));\n",packedOpSnippet:"\n  vec4 result = 1.0 / (1.0 + exp(-1.0 * x));\n  bvec4 isNaN = isnan(x);\n\n  result.r = isNaN.r ? x.r : result.r;\n  result.g = isNaN.g ? x.g : result.g;\n  result.b = isNaN.b ? x.b : result.b;\n  result.a = isNaN.a ? x.a : result.a;\n\n  return result;\n",cpuKernelImpl:VA}),we=Iv({opSnippet:"\n  if (isnan(x)) { return 0.0; }\n  return sign(x);\n"}),xt=Iv({opSnippet:"if (isnan(x)) return x;\n  return sin(x);\n"}),rp=Iv({opSnippet:"\n  float e2x = exp(x);\n  return (e2x - 1.0 / e2x) / 2.0;\n"}),ip=Iv({opSnippet:"\n  float epsilon = 1.1920928955078125e-7;\n  float threshold = log(epsilon) + 2.0;\n\n  bool too_large = x > -threshold;\n  bool too_small = x < threshold;\n\n  float result;\n  float exp_x = exp(x);\n\n  if (too_large){\n    result = x;\n  }\n  else if (too_small){\n    result = exp_x;\n  }\n  else{\n    result = log(exp_x + 1.0);\n  }\n  return result;\n"}),vp=Iv({opSnippet:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
sp="return sqrt(x);",packedOpSnippet:sp,cpuKernelImpl:XA}),xp=Iv({opSnippet:"return x * x;"}),T=Mv({opSnippet:Op="return (a - b) * (a - b);",packedOpSnippet:Op});
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
/**
 * @license
 * Copyright 2017 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
class Ly{constructor(e,t,n){this.variableNames=["x"];var r=(this.outputShape=n).length,i=Gg(n.length),o=Gg(n.length);let a="";if(1===r)a="coords * strides + begin";else{let e=0;a=n.map((t,r)=>(e++,1===n.length?`coords * strides[${r}] + begin[${r}]`:`coords[${e-1}] * strides[${r}] + begin[${r}]`)).join(",")}this.userCode=`\n      ${i} begin = ${i}(${e});\n      ${i} strides = ${i}(${t});\n\n      void main() {\n        ${o} coords = getOutputCoords();\n        setOutput(getX(${a}));\n      }\n    `}}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */Np=Iv({opSnippet:"return tan(x);"}),Qp=Iv({opSnippet:"\n  float e2x = exp(-2.0 * abs(x));\n  return sign(x) * (1.0 - e2x) / (1.0 + e2x);\n"});
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
/**
 * @license
 * Copyright 2017 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
class Uy{constructor(e,t){this.variableNames=["A"];const n=new Array(e.length);for(let r=0;r<n.length;r++)n[r]=e[r]*t[r];this.outputShape=n,this.rank=n.length;var r=Gg(this.rank),i=function(e){var t=e.length;if(5<t)throw Error(`Tile for rank ${t} is not yet supported`);if(1===t)return`imod(resRC, ${e[0]})`;const n=["resRC.x","resRC.y","resRC.z","resRC.w","resRC.u"],r=[];for(let t=0;t<e.length;t++)r.push(`imod(${n[t]}, ${e[t]})`);return r.join()}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */(e);this.userCode=`\n      void main() {\n        ${r} resRC = getOutputCoords();\n        setOutput(getA(${i}));\n      }\n    `}}function zy(e){const{inputs:t,backend:n,attrs:r}=e;e=t.x;var i=r.reps;if("string"===e.dtype||5<e.shape.length){const t=n.readSync(e.dataId);var o="string"===e.dtype?t.map(e=>f.Ji.decodeString(e)):t;o=Object(f.qe)(e.shape,e.dtype,o),o=rv(o,i);return n.makeTensorInfo(o.shape,o.dtype,o.values)}return o=new Uy(e.shape,i),n.runWebGLProgram(o,[e],e.dtype)}class Hy{constructor(e){this.variableNames=["x","indices"],this.customUniforms=[{name:"n",type:"int"},{name:"firstPass",type:"int"},{name:"negativeInf",type:"float"},{name:"dir",type:"int"},{name:"inc",type:"int"}],this.outputShape=e,this.userCode="\n       void main() {\n         ivec2 coords = getOutputCoords();\n         int batch = coords[0];\n         int elemIdx = coords[1];\n\n         // We compare elements pair-wise within a group of size 2 * inc.\n         // The comparing rule for each group alternates between ascending\n         // and descending. Within each group, we compare each pair at\n         // positions i and i+inc. To decide whether an element at position i\n         // is x0 or x1, we mod it by 2 * inc, if the result is smaller than\n         // inc, it is in the first half of the group, we denote it as x0,\n         // otherwise we denote it as x1.\n         // For example, as shown in the Bitonic top K paper referenced above,\n         // Figure5(a) shows that element[1] is in the\n         // second half of the group when group size is 2, but it is in the\n         // first half of the group when group size is 4.\n\n         bool isFirstInPair = imod(elemIdx, 2 * inc) < inc;\n         int i = isFirstInPair ? elemIdx : elemIdx - inc;\n\n         int i0 = firstPass == 1 ? i : int(getIndices(batch, i));\n         int i1 = firstPass == 1 ? i + inc : int(getIndices(batch, i + inc));\n         float x0 = i0 < n ? getX(batch, i0) : negativeInf;\n         float x1 = i1 < n ? getX(batch, i1) : negativeInf;\n\n         // Denotes which direction indices are in (ascending or descending).\n         bool reverse = imod(elemIdx, 2 * dir) >= dir;\n         bool isGreater = x0 > x1 || (x0 == x1 && i1 > i0);\n         if (reverse == isGreater) { // Elements in opposite order of direction\n           int iTemp = i0;\n           i0 = i1;\n           i1 = iTemp;\n         }\n         if (isFirstInPair) {\n            setOutput(float(i0));\n         } else {\n            setOutput(float(i1));\n         }\n       }\n     "}}class $y{constructor(e){this.variableNames=["x","indices"],this.customUniforms=[{name:"n",type:"int"},{name:"firstPass",type:"int"},{name:"k",type:"int"}],this.outputShape=e,this.userCode="\n    void main() {\n         // Takes max of indices (0, k), (1, k + 1), (2, k + 2) ...\n         ivec2 coords = getOutputCoords();\n         int batch = coords[0];\n         int elemIdx = coords[1];\n\n         // The output size is half of the previous size.\n         // If the previous sequence is | | | | _ _ _ _  | | | |  _ _ _ _ (k=4),\n         // we only need to output the indices at positions |, the indices at\n         // positions _ can be thrown away, see Figure5(b) After Phase 2\n         // (Merge phase) in the Bitonic Top K paper referenced above.\n         // For example, the paper shows we only need to output the orange bars.\n         // The output sequence should look like this | | | | | | | |.\n         // Because the sequence is halved, to map the output index back\n         // to the previous sequence to find the corresponding value,\n         // we need to double the index. When we double the index,\n         // we basically interpolate a position, so 2i looks like\n         // | _ | _ | _ | _ | _ | _ | _. We move the | to the first k position\n         // of each 2k positions by - elemIdx % k. E.g. for output at\n         // index 4,5,6,7, we want to get the corresponding element at\n         // original index 8,9,10,11, for output at index 8,9,10,11,\n         // we want to get the corresponding element at original index\n         // 16,17,18,19, so on and so forth.\n\n         int i = elemIdx < k ? elemIdx : (elemIdx * 2 - imod(elemIdx, k));\n         int i0 = firstPass == 1 ? i : int(getIndices(batch, i));\n         int i1 = firstPass == 1 ? i + k : int(getIndices(batch, i + k));\n\n         float x0 = getX(batch, i0);\n         float x1 = i1 < n ? getX(batch, i1) : x0;\n\n         setOutput(x0 >= x1 ? float(i0) : float(i1));\n       }\n     "
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */}}function Qy(e,t){null!==t&&e.disposeIntermediateTensorInfo(t)}function Vy(e){let t=1;for(;t<e;)t*=2;return t}
/**
 * @license
 * Copyright 2021 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */class qy{constructor(e,t,n,r,i,o){let a;switch(this.variableNames=["Image","Transforms"],this.outputShape=o,o="nearest"===n?1:2,r){case"constant":a=1;break;case"reflect":a=2;break;case"wrap":a=3;break;case"nearest":a=4;break;default:a=1}this.userCode=`\n            float mapCoord(float outCoord, float len) {\n              float inCoord = outCoord;\n              if(${a} == 2) {\n                if (inCoord < 0.0) {\n                  if (len <= 1.0) {\n                    inCoord = 0.0;\n                  } else {\n                    float sz2 = 2.0 * len;\n                    if (inCoord < sz2) {\n                      inCoord = sz2 * float(int(float(-inCoord / sz2))) +\n                      inCoord;\n                    }\n                    inCoord = inCoord < -len ? inCoord + sz2 : -inCoord - 1.0;\n                  }\n                } else if (inCoord > len - 1.0) {\n                  if (len <= 1.0) {\n                    inCoord = 0.0;\n                  } else {\n                    float sz2 = 2.0 * len;\n                    inCoord -= sz2 * float(int(float(inCoord / sz2)));\n                    if (inCoord >= len) {\n                      inCoord = sz2 - inCoord - 1.0;\n                    }\n                  }\n                }\n                return clamp(inCoord, 0.0, len - 1.0);\n              } else if (${a} == 3) {\n                if (inCoord < 0.0) {\n                  if (len <= 1.0) {\n                    inCoord = 0.0;\n                  } else {\n                    float sz = len - 1.0;\n                    inCoord += len * (float(int(float(-inCoord / sz))) + 1.0);\n                  }\n                } else if (inCoord > len - 1.0) {\n                  if (len <= 1.0) {\n                    inCoord = 0.0;\n                  } else {\n                    float sz = len - 1.0;\n                    inCoord -= len * float(int(float(inCoord / sz)));\n                  }\n                }\n                return clamp(inCoord, 0.0, len - 1.0);\n              } else if (${a} == 4) {\n                return clamp(outCoord, 0.0, len - 1.0);\n              } else {\n                return outCoord;\n              }\n            }\n\n            float readWithFillValue(int batch, int coordY, int coordX,\n              int channel) {\n              float outputValue;\n              if (0 <= coordY && coordY < ${e} && 0 <= coordX && coordX < ${t}) {\n                  outputValue = getImage(batch, coordY, coordX, channel);\n              } else {\n                outputValue = float(${i});\n              }\n              return outputValue;\n            }\n\n            void main() {\n              ivec4 coords = getOutputCoords();\n              float outputValue;\n              int batch = coords[0];\n              int x = coords[2];\n              int y = coords[1];\n              int channel = coords[3];\n              float xf = float(x);\n              float yf = float(y);\n              float a1 = getTransforms(batch, 0);\n              float a2 = getTransforms(batch, 1);\n              float a3 = getTransforms(batch, 2);\n              float b1 = getTransforms(batch, 3);\n              float b2 = getTransforms(batch, 4);\n              float b3 = getTransforms(batch, 5);\n              float c1 = getTransforms(batch, 6);\n              float c2 = getTransforms(batch, 7);\n              float projection = c1 * xf + c2 * yf + 1.0;\n              if (projection == 0.0) {\n                outputValue = float(${i});\n              } else {\n                float inX = (a1 * xf + a2 * yf + a3) / projection;\n                float inY = (b1 * xf + b2 * yf + b3) / projection;\n                float mapX = mapCoord(inX, float(${t}));\n                float mapY = mapCoord(inY, float(${e}));\n\n                if (${o} == 1) {\n                  int coordY = int(round(mapY));\n                  int coordX = int(round(mapX));\n                  outputValue = readWithFillValue(batch, coordY, coordX,\n                    channel);\n                } else {\n                  float yFloor = floor(mapY);\n                  float xFloor = floor(mapX);\n                  float yCeil = yFloor + 1.0;\n                  float xCeil = xFloor + 1.0;\n                  float valueYFloor = (xCeil - mapX) *\n                  readWithFillValue(batch, int(yFloor), int(xFloor), channel) +\n                  (mapX - xFloor) *\n                  readWithFillValue(batch, int(yFloor), int(xCeil), channel);\n                  float valueYCeil = (xCeil - mapX) *\n                  readWithFillValue(batch, int(yCeil), int(xFloor), channel) +\n                  (mapX - xFloor) *\n                  readWithFillValue(batch, int(yCeil), int(xCeil), channel);\n                  outputValue = (yCeil - mapY) * valueYFloor +\n                  (mapY - yFloor) * valueYCeil;\n                }\n              }\n              setOutput(outputValue);\n            }\n        `}}
/**
 * @license
 * Copyright 2021 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */class Gy{constructor(e,t){this.variableNames=["x","segmentIds"];var n=e.windowSize,r=e.batchSize,i=e.inSize,o=(e=e.numSegments)*Math.ceil(i/n),a=(r=(this.outputShape=[r,o],4*Math.floor(n/4)),o=n%4,"\n        sumValue += dot(values, segFilter);\n    ");let s="",u=(0<i%n&&(s=`\n        if (inIdx < 0 || inIdx >= ${i}) {\n          return initializationValue;\n        }\n      `),"");0<i%n&&(u=`\n        if (inIdx < 0 || inIdx >= ${i}) {\n          return -1.0;\n        }\n      `),this.userCode=`\n      const float initializationValue = 0.0;\n\n      float getValue(int batch, int inIdx) {\n        ${s}\n        return getX(batch, inIdx);\n      }\n\n      float getSegmentIdAtIndex(int inIdx) {\n        ${u}\n        return getSegmentIds(inIdx);\n      }\n\n      void main() {\n        ivec2 coords = getOutputCoords();\n        int batch = coords[0];\n        int outIdx = coords[1];\n        int inOffset = int(floor(float(outIdx) / float(\n          ${e})) * float(${n}));\n        int currentSeg = int(mod(float(outIdx), float(${e})));\n\n        float sumValue = 0.0;\n\n        for (int i = 0; i < ${r}; i += 4) {\n          int inIdx = inOffset + i;\n          vec4 values = vec4(\n            getValue(batch, inIdx),\n            getValue(batch, inIdx + 1),\n            getValue(batch, inIdx + 2),\n            getValue(batch, inIdx + 3)\n          );\n\n          vec4 segFilter = vec4(\n            int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,\n            int(getSegmentIdAtIndex(inIdx + 1)) == currentSeg ? 1 : 0,\n            int(getSegmentIdAtIndex(inIdx + 2)) == currentSeg ? 1 : 0,\n            int(getSegmentIdAtIndex(inIdx + 3)) == currentSeg ? 1 : 0\n          );\n\n          ${a}\n        }\n\n        int inIdx = inOffset + ${r};\n        if (${1==o}) {\n          vec4 values = vec4(\n            getValue(batch, inIdx),\n            initializationValue,\n            initializationValue,\n            initializationValue\n          );\n\n          int inIdxSeg = int(getSegmentIdAtIndex(inIdx));\n\n          vec4 segFilter = vec4(\n            int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,\n            0,\n            0,\n            0\n          );\n\n          ${a}\n        } else if (${2==o}) {\n          vec4 values = vec4(\n            getValue(batch, inIdx),\n            getValue(batch, inIdx + 1),\n            initializationValue,\n            initializationValue\n          );\n\n          vec4 segFilter = vec4(\n            int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,\n            int(getSegmentIdAtIndex(inIdx + 1)) == currentSeg ? 1 : 0,\n              0,\n              0\n          );\n\n          ${a}\n        } else if (${3==o}) {\n          vec4 values = vec4(\n            getValue(batch, inIdx),\n            getValue(batch, inIdx + 1),\n            getValue(batch, inIdx + 2),\n            initializationValue\n          );\n\n          vec4 segFilter = vec4(\n            int(getSegmentIdAtIndex(inIdx)) == currentSeg ? 1 : 0,\n            int(getSegmentIdAtIndex(inIdx + 1)) == currentSeg ? 1 : 0,\n            int(getSegmentIdAtIndex(inIdx + 2)) == currentSeg ? 1 : 0,\n            0\n          );\n\n          ${a}\n        }\n        setOutput(sumValue);\n      }\n    `}}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */for(const e of[Te,De,Re,Ue,W,qe,We,Ke,Xe,R,nt,ot,Q,dt,gt,vt,yt,Ct,Et,St,Tt,Mt,Nt,Ft,Lt,Wt,A,L,Kt,en,rn,on,cn,dn,mn,gn,wn,_n,On,te,Oe,k,jt,st,Me,Je,bt,E,$t,hn,An,Ie,fn,bn,Z,Jt,Ne,tp,np,op,up,cp,fp,Qt,pp,gp,yp,Cp,ae,Sp,Yt,Dp,Ip,Pp,se,qp,Gp,D,q,Kp,Xp,Zp,nm,im,om,am,M,lm,hm,fm,Ge,hp,pm,mm,bm,wm,Cm,Dm,fe,Im,Nm,Rm,Lm,Rt,pn,Um,zm,$m,Wm,pe,ce,tg,ng,rg,Ep,Pt,km,J,h,Fe,Ae,He,Ve,Ze,j,ct,ft,Ut,vn,Cn,P,sn,{kernelName:f.Yc,backendName:"webgl",kernelFunc:yn},{kernelName:f.Zc,backendName:"webgl",kernelFunc:et},{kernelName:f.ad,backendName:"webgl",kernelFunc:we},{kernelName:f.bd,backendName:"webgl",kernelFunc:xt},{kernelName:f.cd,backendName:"webgl",kernelFunc:rp},Dt,Tm,{kernelName:f.fd,backendName:"webgl",kernelFunc:ip},{kernelName:f.gd,backendName:"webgl",kernelFunc:e=>{const{inputs:t,backend:n,attrs:r}=e;var i=t.x;const{blockShape:o,paddings:a}=r;f.Ji.assert(i.shape.length<=4,()=>"spaceToBatchND for rank > 4 with a WebGL backend not implemented yet"),e=o.reduce((e,t)=>e*t);const s=[[0,0]];s.push(...a);for(let e=1+o.length;e<i.shape.length;++e)s.push([0,0]);const u=[];var c=Ey({inputs:{x:i},backend:n,attrs:{paddings:s,constantValue:0}}),l=f.de.getReshaped(c.shape,o,e,!1),h=f.de.getPermuted(l.length,o.length,!1);e=f.de.getReshapedPermuted(c.shape,o,e,!1),l=Uv({inputs:{x:c},backend:n,attrs:{shape:l}}),e=Uv({inputs:{x:h=Wv({inputs:{x:l},backend:n,attrs:{perm:h}})},backend:n,attrs:{shape:e}});return u.push(c),u.push(l),u.push(h),u.forEach(e=>n.disposeIntermediateTensorInfo(e)),e}},{kernelName:f.hd,backendName:"webgl",kernelFunc:
/**
 * @license
 * Copyright 2021 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){const{inputs:t,backend:n}=e;var{indices:e,values:r,denseShape:i,defaultValue:o}=t;if(1!==i.shape.length)throw new Error("Dense shape must be a vector, saw:\n         "+i.shape);if(2!==e.shape.length)throw new Error("Indices must be a matrix, saw:\n         "+e.shape);if(1!==r.shape.length)throw new Error("Values must be a vector, saw:\n         "+r.shape);if(0!==o.shape.length)throw new Error("Default value must be a scalar, saw:\n        "+o.shape);var a=n.readSync(e.dataId),s=n.readSync(r.dataId),i=n.readSync(i.dataId),o=n.readSync(o.dataId)[0];const[u,c,l,h,f]=WA(a,e.shape,e.dtype,s,r.dtype,i,o);return[n.makeTensorInfo(c,e.dtype,u),n.makeTensorInfo([c[0]],r.dtype,l),n.makeTensorInfo([h.length],"bool",new Uint8Array(h.map(e=>Number(e)))),n.makeTensorInfo([f.length],e.dtype,new Int32Array(f))]}},{kernelName:f.id,backendName:"webgl",kernelFunc:
/**
 * @license
 * Copyright 2021 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){const{inputs:t,backend:n}=e;var{inputIndices:e,inputShape:r,newShape:i}=t;if(2!==e.shape.length)throw new Error("Input indices should be a matrix but received shape "+e.shape);if(1!==r.shape.length)throw new Error("Input shape should be a vector but received shape "+r.shape);if(1!==i.shape.length)throw new Error("Target shape should be a vector but received shape "+i.shape);var r=Array.from(n.readSync(r.dataId)),o=n.readSync(e.dataId),a=Array.from(n.readSync(i.dataId)),[o,r,a]=KA(o,e.shape,e.dtype,r,a);return[n.makeTensorInfo(r,e.dtype,o),n.makeTensorInfo([a.length],i.dtype,new Int32Array(a))]}},{kernelName:f.jd,backendName:"webgl",kernelFunc:
/**
 * @license
 * Copyright 2021 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){const{inputs:t,backend:n}=e;var{data:e,indices:r,segmentIds:i}=t;if(e.shape.length<1)throw new Error("Data should be at least 1 dimensional but received scalar");if(1!==r.shape.length)throw new Error("Indices should be a vector but received shape\n              "+r.shape);if(1!==i.shape.length)throw new Error("Segment ids should be a vector but received shape\n              "+i.shape);var o=n.readSync(e.dataId),r=n.readSync(r.dataId),i=n.readSync(i.dataId),[o,r]=YA(o,e.shape,e.dtype,r,i,!0);return n.makeTensorInfo(r,e.dtype,o)}},{kernelName:f.kd,backendName:"webgl",kernelFunc:
/**
 * @license
 * Copyright 2021 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){const{inputs:t,backend:n}=e;var{data:e,indices:r,segmentIds:i}=t;if(e.shape.length<1)throw new Error("Data should be at least 1 dimensional but received scalar");if(1!==r.shape.length)throw new Error("Indices should be a vector but received shape\n             "+r.shape);if(1!==i.shape.length)throw new Error("Segment ids should be a vector but received shape\n             "+i.shape);var o=n.readSync(e.dataId),r=n.readSync(r.dataId),i=n.readSync(i.dataId),[o,r]=YA(o,e.shape,e.dtype,r,i);return n.makeTensorInfo(r,e.dtype,o)}},{kernelName:f.ld,backendName:"webgl",kernelFunc:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){const{inputs:t,backend:n,attrs:r}=e;var i,o,a,{sparseIndices:e,sparseValues:s,defaultValue:u}=t,c=r.outputShape,{sliceRank:l,numUpdates:h,sliceSize:d,strides:p,outputSize:m}=f.de.calculateShapes(s,e,c);return"string"===s.dtype?(i=n.bufferSync(e),o=n.bufferSync(s),a=f.Ji.decodeString(n.readSync(u.dataId)[0]),i=QA(i,o,c,m,d,h,l,p,a,!1),n.makeTensorInfo(c,i.dtype,i.values)):(o=new Fy(h,l,e.shape.length,s.shape.length,p,[m,1],!1),a=Uv({inputs:{x:d=n.runWebGLProgram(o,[s,e,u],s.dtype)},backend:n,attrs:{shape:c}}),n.disposeIntermediateTensorInfo(d),a)}},{kernelName:f.md,backendName:"webgl",kernelFunc:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){const{inputs:t,backend:n,attrs:r}=e,i=t.x;var{numOrSizeSplits:e,axis:o}=r;const a=f.Ji.parseAxisParam(o,i.shape)[0],s=f.de.prepareSplitSize(i,e,a),u=(o=i.shape.length,new Array(o).fill(0)),c=i.shape.slice();return s.map(e=>{const t=[...c];t[a]=e;var r=lb({inputs:{x:i},backend:n,attrs:{begin:u,size:t}});return u[a]+=e,r})}},{kernelName:f.nd,backendName:"webgl",kernelFunc:vp},{kernelName:f.od,backendName:"webgl",kernelFunc:xp},{kernelName:f.pd,backendName:"webgl",kernelFunc:T},{kernelName:f.qd,backendName:"webgl",kernelFunc:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function({inputs:e,attrs:t,backend:n}){return e=e.x,t=`if (isnan(x)) return x;\n    return x > 0.0 ? 1.0 : float(${t.alpha});\n  `,t=new mv(e.shape,t),n.runWebGLProgram(t,[e],e.dtype)}},{kernelName:f.rd,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e,i=t.x;var{begin:e,end:o,strides:a,beginMask:s,endMask:u,ellipsisMask:c,newAxisMask:l,shrinkAxisMask:h}=r,{finalShapeSparse:e,finalShape:o,isIdentity:a,sliceDim0:s,isSimpleSlice:u,begin:c,end:l,strides:h}=f.Rh.sliceInfo(i.shape,e,o,a,s,u,c,l,h);let d;return a?d=Uv({inputs:{x:i},backend:n,attrs:{shape:o}}):s||u?(f.Ji.assert(1<=i.shape.length,()=>"Input must have rank at least 1, got: "+i.shape.length),a=f.Rh.computeOutShape(c,l,h),d=Uv({inputs:{x:s=lb({inputs:{x:i},backend:n,attrs:{begin:c,size:a}})},backend:n,attrs:{shape:o}}),n.disposeIntermediateTensorInfo(s)):d=(u=n.shouldExecuteOnCPU([i]))?(l=n.readSync(i.dataId),a=Object(f.qe)(i.shape,i.dtype,l),s=JA(e,a,h,c),n.makeTensorInfo(o,i.dtype,s.values)):(u=new Ly(c,h,e),n.runWebGLProgram(u,[i],i.dtype)),l=Uv({inputs:{x:d},backend:n,attrs:{shape:o}}),n.disposeIntermediateTensorInfo(d),l}},{kernelName:f.sd,backendName:"webgl",kernelFunc:
/**
 * @license
 * Copyright 2021 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){const{inputs:t,backend:n,attrs:r}=e;var{separator:e,nGramWidths:i,leftPad:o,rightPad:a,padWidth:s,preserveShortSequences:u}=r,{data:c,dataSplits:l}=t,c=n.readSync(c.dataId),h=n.readSync(l.dataId),[c,h]=ZA(c,h,e,i,o,a,s,u);return[n.makeTensorInfo([c.length],"string",c),n.makeTensorInfo(l.shape,"int32",h)]}},{kernelName:f.td,backendName:"webgl",kernelFunc:
/**
 * @license
 * Copyright 2021 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){const{inputs:t,backend:n,attrs:r}=e;e=r.skipEmpty;var{input:i,delimiter:o}=t;if("string"!==i.dtype)throw new Error("Input must be of datatype string");if(1!==i.shape.length)throw new Error("Input must be a vector, got shape: "+i.shape);if(0!==o.shape.length)throw new Error("Delimiter must be a scalar, got shape: "+o.shape);var i=n.readSync(i.dataId),o=n.readSync(o.dataId)[0],[i,o,e]=ev(i,o,e),a=o.length;return[n.makeTensorInfo([a,2],"int32",i),n.makeTensorInfo([a],"string",o),n.makeTensorInfo([2],"int32",new Int32Array(e))]}},{kernelName:f.ud,backendName:"webgl",kernelFunc:
/**
 * @license
 * Copyright 2021 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){const{inputs:t,backend:n,attrs:r}=e;e=r.numBuckets;var i=t.input;if("string"!==i.dtype)throw new Error("Input must be of datatype string");if(e<=0)throw new Error("Number of buckets must be at least 1");var o=n.readSync(i.dataId);o=tv(o,e);return n.makeTensorInfo(i.shape,"int32",o)}},_m,be,{kernelName:f.xd,backendName:"webgl",kernelFunc:Np},{kernelName:f.yd,backendName:"webgl",kernelFunc:Qp},{kernelName:f.Bd,backendName:"webgl",kernelFunc:zy},{kernelName:f.Cd,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;e=t.x;var{k:i,sorted:o}=r,a=Object(f.hf)().getNumber("TOPK_LAST_DIM_CPU_HANDOFF_SIZE_THRESHOLD"),s=Object(f.hf)().getNumber("TOPK_K_CPU_HANDOFF_THRESHOLD");const u=e.shape,c=u[u.length-1];if(n.shouldExecuteOnCPU([e])||c<a||s<i)return a=n.readSync(e.dataId),[s,a]=iv(a,u,e.dtype,i,o),[n.makeTensorInfo(s.shape,s.dtype,s.values),n.makeTensorInfo(a.shape,a.dtype,a.values)];if(0===i)return u[u.length-1]=0,[n.makeTensorInfo(u,e.dtype,[]),n.makeTensorInfo(u,"int32",[])];if(1===c)return[e,Xb({attrs:{shape:u,dtype:"int32",value:0},backend:n})];a=(s=null!==(o=n.texData.get(e.dataId))&&o.isPacked)?n.unpackTensor(e):e;var o,l=f.Ji.sizeFromShape(u)/c;const h=Uv({inputs:{x:a},attrs:{shape:[l,c]},backend:n});s&&Qy(n,a);var d=Vy(i),p=Vy(c);let m=null;const g=()=>null===m?[h,h]:[h,m];var A=(e,t,r)=>{var i=g(),o=(r=new Hy(r),[[c],[o=null===m?1:0],[Number.NEGATIVE_INFINITY],[e],[t]]);e=m;m=n.runWebGLProgram(r,i,"int32",o),Qy(n,e)};for(let e=1;e<d;e*=2){var v=2*e;for(let t=e;1<=t;t/=2)A(v,t,[l,p])}for(let e=p;e>d;e/=2){const t=g();var b=new $y([l,e/2]),y=[[c],[y=null===m?1:0],[d]];const r=m;m=n.runWebGLProgram(b,t,"int32",y),Qy(n,r);var w=2*(b=d/2);for(let e=b;1<=e;e/=2)A(w,e,m.shape)}let x=m;m=lb({inputs:{x:m},backend:n,attrs:{begin:0,size:[l,i]}}),Qy(n,x),o=oy({inputs:{x:h,indices:m},backend:n,attrs:{axis:1,batchDims:1}}),Qy(n,h);const C=u.slice(0,-1);return C.push(i),m=Uv({inputs:{x:x=m},attrs:{shape:C},backend:n}),Qy(n,x),o=Uv({inputs:{x:e=o},attrs:{shape:C},backend:n}),Qy(n,e),[o,m]}},{kernelName:f.Dd,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;var i,{image:e,transforms:o}=t,{interpolation:a,fillMode:s,fillValue:u,outputShape:c}=r,[i,l,h,f]=e.shape,[c,d]=null!=c?c:[l,h],c=new qy(l,h,a,s,u,i=[i,c,d,f]);return n.runWebGLProgram(c,[e,o],"float32")}},Ee,{kernelName:f.Fd,backendName:"webgl",kernelFunc:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the License);
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an AS IS BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){const{inputs:t,attrs:n,backend:r}=e;e=n.axis;var i=t.x,o=(Tg(i,"unique"),r.readSync(i.dataId)),{outputValues:o,outputShape:e,indices:a}=av(o,e,i.shape,i.dtype);return[r.makeTensorInfo(e,i.dtype,o),r.makeTensorInfo([a.length],"int32",a)]}},{kernelName:f.Gd,backendName:"webgl",kernelFunc:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){const{inputs:t,backend:n,attrs:r}=e;e=t.value;let i=r.axis;i<0&&(i+=e.shape.length);const o=e;var a=o.shape.length;e=e.shape[i];const s=new Array(a-1);let u=0;for(let e=0;e<a;e++)e!==i&&(s[u++]=o.shape[e]);const c=[],l=new Array(a).fill(0),h=o.shape.slice(),f=(h[i]=1,new Array(e));for(let e=0;e<f.length;e++){l[i]=e;var d=lb({inputs:{x:o},backend:n,attrs:{begin:l,size:h}}),p=Uv({inputs:{x:d},backend:n,attrs:{shape:s}});f[e]=p,c.push(d)}return c.forEach(e=>n.disposeIntermediateTensorInfo(e)),f}},{kernelName:f.Hd,backendName:"webgl",kernelFunc:function(e){const{inputs:t,backend:n,attrs:r}=e;var{x:e,segmentIds:i}=t,o=r.numSegments,a=e.shape.length;const s=[];let u=0;var c=f.de.getAxesPermutation([u],a);let l=e;null!=c&&(l=Wv({inputs:{x:e},backend:n,attrs:{perm:c}}),s.push(l),u=f.de.getInnerMostAxes(1,a)[0]);a=f.de.segment_util.computeOutShape(l.shape,u,o);var h=f.Ji.sizeFromShape([l.shape[u]]);h=Uv({inputs:{x:l},backend:n,attrs:{shape:[-1,h]}}),s.push(h),e=Object(f.ji)(e.dtype);const d=(e,t,r,i,o)=>{var a=e.shape[0],u=e.shape[1],c=f.de.segment_util.segOpComputeOptimalWindowSize(u,o);a=new Gy(a={windowSize:c,inSize:u,batchSize:a,numSegments:o},t),a=n.compileAndRun(a,[e,r],i);return s.push(a),a.shape[1]===o?a:(r=zy({inputs:{x:e=Sy({backend:n,attrs:{start:0,stop:o,step:1,dtype:"float32"}})},backend:n,attrs:{reps:[u/c]}}),s.push(e),s.push(r),d(a,t,r,i,o))};let p=h=Uv({inputs:{x:d(h,"unsortedSegmentSum",i,e,o)},backend:n,attrs:{shape:a}});return null!=c&&(s.push(h),i=f.de.getUndoAxesPermutation(c),p=Wv({inputs:{x:p},backend:n,attrs:{perm:i}})),s.forEach(e=>n.disposeIntermediateTensorInfo(e)),p}},qt])Object(f.kh)(e);
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
/** @license See the LICENSE file. */n.d(t,"version",(function(){return Wy})),n.d(t,"AdadeltaOptimizer",(function(){return f.d})),n.d(t,"AdagradOptimizer",(function(){return f.e})),n.d(t,"AdamOptimizer",(function(){return f.f})),n.d(t,"AdamaxOptimizer",(function(){return f.g})),n.d(t,"MomentumOptimizer",(function(){return f.gc})),n.d(t,"Optimizer",(function(){return f.rc})),n.d(t,"OptimizerConstructors",(function(){return f.sc})),n.d(t,"RMSPropOptimizer",(function(){return f.zc})),n.d(t,"SGDOptimizer",(function(){return f.Uc})),n.d(t,"Tensor",(function(){return f.zd})),n.d(t,"TensorBuffer",(function(){return f.Ad})),n.d(t,"Variable",(function(){return f.Jd})),n.d(t,"Rank",(function(){return f.Ec})),n.d(t,"sumOutType",(function(){return f.ji})),n.d(t,"upcastType",(function(){return f.Hi})),n.d(t,"Reduction",(function(){return f.Ic})),n.d(t,"customGrad",(function(){return f.Me})),n.d(t,"grad",(function(){return f.Df})),n.d(t,"grads",(function(){return f.Ef})),n.d(t,"valueAndGrad",(function(){return f.Ki})),n.d(t,"valueAndGrads",(function(){return f.Li})),n.d(t,"variableGrads",(function(){return f.Ni})),n.d(t,"Environment",(function(){return f.gb})),n.d(t,"env",(function(){return f.hf})),n.d(t,"ENV",(function(){return f.cb})),n.d(t,"version_core",(function(){return f.Oi})),n.d(t,"nextFrame",(function(){return f.Dg})),n.d(t,"browser",(function(){return f.pe})),n.d(t,"io",(function(){return f.Lf})),n.d(t,"math",(function(){return f.kg})),n.d(t,"serialization",(function(){return f.Dh})),n.d(t,"test_util",(function(){return f.ui})),n.d(t,"util",(function(){return f.Ji})),n.d(t,"backend_util",(function(){return f.de})),n.d(t,"broadcast_util",(function(){return f.oe})),n.d(t,"tensor_util",(function(){return f.ti})),n.d(t,"slice_util",(function(){return f.Rh})),n.d(t,"gather_util",(function(){return f.yf})),n.d(t,"scatter_util",(function(){return f.zh})),n.d(t,"device_util",(function(){return f.Re})),n.d(t,"kernel_impls",(function(){return f.Rf})),n.d(t,"KernelBackend",(function(){return f.Fb})),n.d(t,"DataStorage",(function(){return f.S})),n.d(t,"abs",(function(){return f.Md})),n.d(t,"acos",(function(){return f.Nd})),n.d(t,"acosh",(function(){return f.Od})),n.d(t,"add",(function(){return f.Pd})),n.d(t,"addN",(function(){return f.Qd})),n.d(t,"all",(function(){return f.Rd})),n.d(t,"any",(function(){return f.Sd})),n.d(t,"argMax",(function(){return f.Td})),n.d(t,"argMin",(function(){return f.Ud})),n.d(t,"asin",(function(){return f.Vd})),n.d(t,"asinh",(function(){return f.Wd})),n.d(t,"atan",(function(){return f.Xd})),n.d(t,"atan2",(function(){return f.Yd})),n.d(t,"atanh",(function(){return f.Zd})),n.d(t,"avgPool",(function(){return f.ae})),n.d(t,"avgPool3d",(function(){return f.be})),n.d(t,"basicLSTMCell",(function(){return f.ee})),n.d(t,"batchToSpaceND",(function(){return f.je})),n.d(t,"batchNorm",(function(){return f.fe})),n.d(t,"batchNorm2d",(function(){return f.ge})),n.d(t,"batchNorm3d",(function(){return f.he})),n.d(t,"batchNorm4d",(function(){return f.ie})),n.d(t,"bincount",(function(){return f.ke})),n.d(t,"broadcastArgs",(function(){return f.me})),n.d(t,"broadcastTo",(function(){return f.ne})),n.d(t,"buffer",(function(){return f.qe})),n.d(t,"cast",(function(){return f.re})),n.d(t,"ceil",(function(){return f.se})),n.d(t,"clipByValue",(function(){return f.te})),n.d(t,"clone",(function(){return f.ue})),n.d(t,"complex",(function(){return f.ve})),n.d(t,"concat",(function(){return f.we})),n.d(t,"concat1d",(function(){return f.xe})),n.d(t,"concat2d",(function(){return f.ye})),n.d(t,"concat3d",(function(){return f.ze})),n.d(t,"concat4d",(function(){return f.Ae})),n.d(t,"conv1d",(function(){return f.Be})),n.d(t,"conv2d",(function(){return f.Ce})),n.d(t,"conv2dTranspose",(function(){return f.De})),n.d(t,"conv3d",(function(){return f.Ee})),n.d(t,"conv3dTranspose",(function(){return f.Fe})),n.d(t,"cos",(function(){return f.He})),n.d(t,"cosh",(function(){return f.Ie})),n.d(t,"cumprod",(function(){return f.Ke})),n.d(t,"cumsum",(function(){return f.Le})),n.d(t,"denseBincount",(function(){return f.Ne})),n.d(t,"depthToSpace",(function(){return f.Pe})),n.d(t,"depthwiseConv2d",(function(){return f.Qe})),n.d(t,"diag",(function(){return f.Se})),n.d(t,"dilation2d",(function(){return f.Te})),n.d(t,"div",(function(){return f.Xe})),n.d(t,"divNoNan",(function(){return f.Ye})),n.d(t,"dot",(function(){return f.Ze})),n.d(t,"einsum",(function(){return f.bf})),n.d(t,"elu",(function(){return f.cf})),n.d(t,"equal",(function(){return f.if})),n.d(t,"erf",(function(){return f.jf})),n.d(t,"euclideanNorm",(function(){return f.kf})),n.d(t,"exp",(function(){return f.lf})),n.d(t,"expandDims",(function(){return f.mf})),n.d(t,"expm1",(function(){return f.nf})),n.d(t,"eye",(function(){return f.of})),n.d(t,"fill",(function(){return f.qf})),n.d(t,"floor",(function(){return f.tf})),n.d(t,"floorDiv",(function(){return f.uf})),n.d(t,"gather",(function(){return f.wf})),n.d(t,"greater",(function(){return f.Ff})),n.d(t,"greaterEqual",(function(){return f.Gf})),n.d(t,"imag",(function(){return f.If})),n.d(t,"isFinite",(function(){return f.Nf})),n.d(t,"isInf",(function(){return f.Of})),n.d(t,"isNaN",(function(){return f.Pf})),n.d(t,"leakyRelu",(function(){return f.Sf})),n.d(t,"less",(function(){return f.Tf})),n.d(t,"lessEqual",(function(){return f.Uf})),n.d(t,"linspace",(function(){return f.Wf})),n.d(t,"localResponseNormalization",(function(){return f.Xf})),n.d(t,"log",(function(){return f.Yf})),n.d(t,"log1p",(function(){return f.Zf})),n.d(t,"logSigmoid",(function(){return f.ag})),n.d(t,"logSoftmax",(function(){return f.bg})),n.d(t,"logSumExp",(function(){return f.cg})),n.d(t,"logicalAnd",(function(){return f.dg})),n.d(t,"logicalNot",(function(){return f.eg})),n.d(t,"logicalOr",(function(){return f.fg})),n.d(t,"logicalXor",(function(){return f.gg})),n.d(t,"lowerBound",(function(){return f.ig})),n.d(t,"matMul",(function(){return f.jg})),n.d(t,"max",(function(){return f.lg})),n.d(t,"maxPool",(function(){return f.mg})),n.d(t,"maxPool3d",(function(){return f.ng})),n.d(t,"maxPoolWithArgmax",(function(){return f.og})),n.d(t,"maximum",(function(){return f.pg})),n.d(t,"mean",(function(){return f.qg})),n.d(t,"meshgrid",(function(){return f.sg})),n.d(t,"min",(function(){return f.tg})),n.d(t,"minimum",(function(){return f.ug})),n.d(t,"mirrorPad",(function(){return f.vg})),n.d(t,"mod",(function(){return f.wg})),n.d(t,"moments",(function(){return f.xg})),n.d(t,"mul",(function(){return f.zg})),n.d(t,"multiRNNCell",(function(){return f.Ag})),n.d(t,"multinomial",(function(){return f.Bg})),n.d(t,"neg",(function(){return f.Cg})),n.d(t,"notEqual",(function(){return f.Fg})),n.d(t,"oneHot",(function(){return f.Gg})),n.d(t,"ones",(function(){return f.Hg})),n.d(t,"onesLike",(function(){return f.Ig})),n.d(t,"outerProduct",(function(){return f.Kg})),n.d(t,"pad",(function(){return f.Lg})),n.d(t,"pad1d",(function(){return f.Mg})),n.d(t,"pad2d",(function(){return f.Ng})),n.d(t,"pad3d",(function(){return f.Og})),n.d(t,"pad4d",(function(){return f.Pg})),n.d(t,"pool",(function(){return f.Qg})),n.d(t,"pow",(function(){return f.Rg})),n.d(t,"prelu",(function(){return f.Sg})),n.d(t,"print",(function(){return f.Tg})),n.d(t,"prod",(function(){return f.Ug})),n.d(t,"raggedGather",(function(){return f.Wg})),n.d(t,"raggedRange",(function(){return f.Xg})),n.d(t,"raggedTensorToTensor",(function(){return f.Yg})),n.d(t,"rand",(function(){return f.Zg})),n.d(t,"randomGamma",(function(){return f.ah})),n.d(t,"randomNormal",(function(){return f.bh})),n.d(t,"randomStandardNormal",(function(){return f.ch})),n.d(t,"randomUniform",(function(){return f.dh})),n.d(t,"range",(function(){return f.eh})),n.d(t,"real",(function(){return f.gh})),n.d(t,"reciprocal",(function(){return f.hh})),n.d(t,"relu",(function(){return f.lh})),n.d(t,"relu6",(function(){return f.mh})),n.d(t,"reshape",(function(){return f.oh})),n.d(t,"reverse",(function(){return f.ph})),n.d(t,"reverse1d",(function(){return f.qh})),n.d(t,"reverse2d",(function(){return f.rh})),n.d(t,"reverse3d",(function(){return f.sh})),n.d(t,"reverse4d",(function(){return f.th})),n.d(t,"round",(function(){return f.vh})),n.d(t,"rsqrt",(function(){return f.wh})),n.d(t,"scalar",(function(){return f.xh})),n.d(t,"selu",(function(){return f.Bh})),n.d(t,"separableConv2d",(function(){return f.Ch})),n.d(t,"setdiff1dAsync",(function(){return f.Gh})),n.d(t,"sigmoid",(function(){return f.Hh})),n.d(t,"sign",(function(){return f.Ih})),n.d(t,"sin",(function(){return f.Kh})),n.d(t,"sinh",(function(){return f.Lh})),n.d(t,"slice",(function(){return f.Mh})),n.d(t,"slice1d",(function(){return f.Nh})),n.d(t,"slice2d",(function(){return f.Oh})),n.d(t,"slice3d",(function(){return f.Ph})),n.d(t,"slice4d",(function(){return f.Qh})),n.d(t,"softmax",(function(){return f.Sh})),n.d(t,"softplus",(function(){return f.Th})),n.d(t,"spaceToBatchND",(function(){return f.Uh})),n.d(t,"fft",(function(){return f.pf})),n.d(t,"ifft",(function(){return f.Hf})),n.d(t,"irfft",(function(){return f.Mf})),n.d(t,"rfft",(function(){return f.uh})),n.d(t,"split",(function(){return f.Yh})),n.d(t,"sqrt",(function(){return f.Zh})),n.d(t,"square",(function(){return f.ai})),n.d(t,"squaredDifference",(function(){return f.bi})),n.d(t,"squeeze",(function(){return f.ci})),n.d(t,"stack",(function(){return f.di})),n.d(t,"step",(function(){return f.ei})),n.d(t,"stridedSlice",(function(){return f.fi})),n.d(t,"sub",(function(){return f.hi})),n.d(t,"sum",(function(){return f.ii})),n.d(t,"tan",(function(){return f.ki})),n.d(t,"tanh",(function(){return f.li})),n.d(t,"tensor",(function(){return f.mi})),n.d(t,"tensor1d",(function(){return f.ni})),n.d(t,"tensor2d",(function(){return f.oi})),n.d(t,"tensor3d",(function(){return f.pi})),n.d(t,"tensor4d",(function(){return f.qi})),n.d(t,"tensor5d",(function(){return f.ri})),n.d(t,"tensor6d",(function(){return f.si})),n.d(t,"tile",(function(){return f.wi})),n.d(t,"topk",(function(){return f.yi})),n.d(t,"truncatedNormal",(function(){return f.Bi})),n.d(t,"unique",(function(){return f.Ci})),n.d(t,"unsortedSegmentSum",(function(){return f.Fi})),n.d(t,"unstack",(function(){return f.Gi})),n.d(t,"upperBound",(function(){return f.Ii})),n.d(t,"variable",(function(){return f.Mi})),n.d(t,"where",(function(){return f.Pi})),n.d(t,"whereAsync",(function(){return f.Qi})),n.d(t,"zeros",(function(){return f.Ri})),n.d(t,"zerosLike",(function(){return f.Si})),n.d(t,"op",(function(){return f.Jg})),n.d(t,"OP_SCOPE_SUFFIX",(function(){return f.oc})),n.d(t,"image",(function(){return f.Jf})),n.d(t,"linalg",(function(){return f.Vf})),n.d(t,"losses",(function(){return f.hg})),n.d(t,"spectral",(function(){return f.Xh})),n.d(t,"fused",(function(){return f.vf})),n.d(t,"signal",(function(){return f.Jh})),n.d(t,"sparse",(function(){return f.Vh})),n.d(t,"string",(function(){return f.gi})),n.d(t,"train",(function(){return f.zi})),n.d(t,"enableProdMode",(function(){return f.ef})),n.d(t,"enableDebugMode",(function(){return f.df})),n.d(t,"disableDeprecationWarnings",(function(){return f.Ue})),n.d(t,"deprecationWarn",(function(){return f.Oe})),n.d(t,"disposeVariables",(function(){return f.We})),n.d(t,"engine",(function(){return f.gf})),n.d(t,"memory",(function(){return f.rg})),n.d(t,"profile",(function(){return f.Vg})),n.d(t,"tidy",(function(){return f.vi})),n.d(t,"dispose",(function(){return f.Ve})),n.d(t,"keep",(function(){return f.Qf})),n.d(t,"time",(function(){return f.xi})),n.d(t,"setBackend",(function(){return f.Eh})),n.d(t,"ready",(function(){return f.fh})),n.d(t,"getBackend",(function(){return f.zf})),n.d(t,"removeBackend",(function(){return f.nh})),n.d(t,"findBackend",(function(){return f.rf})),n.d(t,"findBackendFactory",(function(){return f.sf})),n.d(t,"registerBackend",(function(){return f.ih})),n.d(t,"backend",(function(){return f.ce})),n.d(t,"setPlatform",(function(){return f.Fh})),n.d(t,"getKernel",(function(){return f.Bf})),n.d(t,"getGradient",(function(){return f.Af})),n.d(t,"getKernelsForBackend",(function(){return f.Cf})),n.d(t,"registerKernel",(function(){return f.kh})),n.d(t,"registerGradient",(function(){return f.jh})),n.d(t,"unregisterKernel",(function(){return f.Ei})),n.d(t,"unregisterGradient",(function(){return f.Di})),n.d(t,"copyRegisteredKernels",(function(){return f.Ge})),n.d(t,"Abs",(function(){return f.a})),n.d(t,"Acos",(function(){return f.b})),n.d(t,"Acosh",(function(){return f.c})),n.d(t,"Add",(function(){return f.h})),n.d(t,"AddN",(function(){return f.i})),n.d(t,"All",(function(){return f.j})),n.d(t,"Any",(function(){return f.k})),n.d(t,"ArgMax",(function(){return f.l})),n.d(t,"ArgMin",(function(){return f.m})),n.d(t,"Asin",(function(){return f.n})),n.d(t,"Asinh",(function(){return f.o})),n.d(t,"Atan",(function(){return f.p})),n.d(t,"Atanh",(function(){return f.r})),n.d(t,"Atan2",(function(){return f.q})),n.d(t,"AvgPool",(function(){return f.s})),n.d(t,"AvgPoolGrad",(function(){return f.v})),n.d(t,"AvgPool3D",(function(){return f.t})),n.d(t,"AvgPool3DGrad",(function(){return f.u})),n.d(t,"BatchMatMul",(function(){return f.w})),n.d(t,"BatchToSpaceND",(function(){return f.x})),n.d(t,"Bincount",(function(){return f.y})),n.d(t,"BroadcastTo",(function(){return f.A})),n.d(t,"BroadcastArgs",(function(){return f.z})),n.d(t,"Cast",(function(){return f.B})),n.d(t,"Ceil",(function(){return f.C})),n.d(t,"ClipByValue",(function(){return f.D})),n.d(t,"Complex",(function(){return f.E})),n.d(t,"ComplexAbs",(function(){return f.F})),n.d(t,"Concat",(function(){return f.G})),n.d(t,"Conv2D",(function(){return f.H})),n.d(t,"Conv2DBackpropFilter",(function(){return f.I})),n.d(t,"Conv2DBackpropInput",(function(){return f.J})),n.d(t,"Conv3D",(function(){return f.K})),n.d(t,"Conv3DBackpropFilterV2",(function(){return f.L})),n.d(t,"Conv3DBackpropInputV2",(function(){return f.M})),n.d(t,"Cos",(function(){return f.N})),n.d(t,"Cosh",(function(){return f.O})),n.d(t,"Cumprod",(function(){return f.Q})),n.d(t,"Cumsum",(function(){return f.R})),n.d(t,"CropAndResize",(function(){return f.P})),n.d(t,"DenseBincount",(function(){return f.T})),n.d(t,"DepthToSpace",(function(){return f.U})),n.d(t,"DepthwiseConv2dNative",(function(){return f.V})),n.d(t,"DepthwiseConv2dNativeBackpropFilter",(function(){return f.W})),n.d(t,"DepthwiseConv2dNativeBackpropInput",(function(){return f.X})),n.d(t,"Diag",(function(){return f.Y})),n.d(t,"Dilation2D",(function(){return f.Z})),n.d(t,"Dilation2DBackpropInput",(function(){return f.bb})),n.d(t,"Dilation2DBackpropFilter",(function(){return f.ab})),n.d(t,"RealDiv",(function(){return f.Gc})),n.d(t,"Einsum",(function(){return f.db})),n.d(t,"Elu",(function(){return f.eb})),n.d(t,"EluGrad",(function(){return f.fb})),n.d(t,"Erf",(function(){return f.ib})),n.d(t,"Equal",(function(){return f.hb})),n.d(t,"Exp",(function(){return f.jb})),n.d(t,"ExpandDims",(function(){return f.kb})),n.d(t,"Expm1",(function(){return f.lb})),n.d(t,"FFT",(function(){return f.mb})),n.d(t,"Fill",(function(){return f.nb})),n.d(t,"FlipLeftRight",(function(){return f.ob})),n.d(t,"Floor",(function(){return f.pb})),n.d(t,"FloorDiv",(function(){return f.qb})),n.d(t,"FusedBatchNorm",(function(){return f.sb})),n.d(t,"GatherV2",(function(){return f.wb})),n.d(t,"GatherNd",(function(){return f.vb})),n.d(t,"Greater",(function(){return f.xb})),n.d(t,"GreaterEqual",(function(){return f.yb})),n.d(t,"Identity",(function(){return f.Ab})),n.d(t,"IFFT",(function(){return f.zb})),n.d(t,"Imag",(function(){return f.Bb})),n.d(t,"IsFinite",(function(){return f.Cb})),n.d(t,"IsInf",(function(){return f.Db})),n.d(t,"IsNan",(function(){return f.Eb})),n.d(t,"LeakyRelu",(function(){return f.Ib})),n.d(t,"Less",(function(){return f.Jb})),n.d(t,"LessEqual",(function(){return f.Kb})),n.d(t,"LinSpace",(function(){return f.Lb})),n.d(t,"Log",(function(){return f.Mb})),n.d(t,"Log1p",(function(){return f.Nb})),n.d(t,"LogicalAnd",(function(){return f.Pb})),n.d(t,"LogicalNot",(function(){return f.Qb})),n.d(t,"LogicalOr",(function(){return f.Rb})),n.d(t,"LogicalXor",(function(){return f.Sb})),n.d(t,"LogSoftmax",(function(){return f.Ob})),n.d(t,"LowerBound",(function(){return f.Tb})),n.d(t,"LRN",(function(){return f.Gb})),n.d(t,"LRNGrad",(function(){return f.Hb})),n.d(t,"Max",(function(){return f.Ub})),n.d(t,"Maximum",(function(){return f.ac})),n.d(t,"MaxPool",(function(){return f.Vb})),n.d(t,"MaxPoolGrad",(function(){return f.Yb})),n.d(t,"MaxPool3D",(function(){return f.Wb})),n.d(t,"MaxPool3DGrad",(function(){return f.Xb})),n.d(t,"MaxPoolWithArgmax",(function(){return f.Zb})),n.d(t,"Mean",(function(){return f.bc})),n.d(t,"Min",(function(){return f.cc})),n.d(t,"Minimum",(function(){return f.dc})),n.d(t,"MirrorPad",(function(){return f.ec})),n.d(t,"Mod",(function(){return f.fc})),n.d(t,"Multinomial",(function(){return f.hc})),n.d(t,"Multiply",(function(){return f.ic})),n.d(t,"Neg",(function(){return f.jc})),n.d(t,"NotEqual",(function(){return f.nc})),n.d(t,"NonMaxSuppressionV3",(function(){return f.kc})),n.d(t,"NonMaxSuppressionV4",(function(){return f.lc})),n.d(t,"NonMaxSuppressionV5",(function(){return f.mc})),n.d(t,"OnesLike",(function(){return f.qc})),n.d(t,"OneHot",(function(){return f.pc})),n.d(t,"Pack",(function(){return f.tc})),n.d(t,"PadV2",(function(){return f.uc})),n.d(t,"Pool",(function(){return f.vc})),n.d(t,"Pow",(function(){return f.wc})),n.d(t,"Prelu",(function(){return f.xc})),n.d(t,"Prod",(function(){return f.yc})),n.d(t,"RaggedGather",(function(){return f.Ac})),n.d(t,"RaggedRange",(function(){return f.Bc})),n.d(t,"RaggedTensorToTensor",(function(){return f.Cc})),n.d(t,"Range",(function(){return f.Dc})),n.d(t,"Real",(function(){return f.Fc})),n.d(t,"Reciprocal",(function(){return f.Hc})),n.d(t,"Relu",(function(){return f.Jc})),n.d(t,"Reshape",(function(){return f.Lc})),n.d(t,"ResizeNearestNeighbor",(function(){return f.Oc})),n.d(t,"ResizeNearestNeighborGrad",(function(){return f.Pc})),n.d(t,"ResizeBilinear",(function(){return f.Mc})),n.d(t,"ResizeBilinearGrad",(function(){return f.Nc})),n.d(t,"Relu6",(function(){return f.Kc})),n.d(t,"Reverse",(function(){return f.Qc})),n.d(t,"Round",(function(){return f.Sc})),n.d(t,"Rsqrt",(function(){return f.Tc})),n.d(t,"ScatterNd",(function(){return f.Vc})),n.d(t,"SearchSorted",(function(){return f.Wc})),n.d(t,"Select",(function(){return f.Xc})),n.d(t,"Selu",(function(){return f.Yc})),n.d(t,"Slice",(function(){return f.dd})),n.d(t,"Sin",(function(){return f.bd})),n.d(t,"Sinh",(function(){return f.cd})),n.d(t,"Sign",(function(){return f.ad})),n.d(t,"Sigmoid",(function(){return f.Zc})),n.d(t,"Softplus",(function(){return f.fd})),n.d(t,"Sqrt",(function(){return f.nd})),n.d(t,"Sum",(function(){return f.wd})),n.d(t,"SpaceToBatchND",(function(){return f.gd})),n.d(t,"SplitV",(function(){return f.md})),n.d(t,"Softmax",(function(){return f.ed})),n.d(t,"SparseFillEmptyRows",(function(){return f.hd})),n.d(t,"SparseReshape",(function(){return f.id})),n.d(t,"SparseSegmentMean",(function(){return f.jd})),n.d(t,"SparseSegmentSum",(function(){return f.kd})),n.d(t,"SparseToDense",(function(){return f.ld})),n.d(t,"SquaredDifference",(function(){return f.pd})),n.d(t,"Square",(function(){return f.od})),n.d(t,"StridedSlice",(function(){return f.rd})),n.d(t,"StringNGrams",(function(){return f.sd})),n.d(t,"StringSplit",(function(){return f.td})),n.d(t,"StringToHashBucketFast",(function(){return f.ud})),n.d(t,"Sub",(function(){return f.vd})),n.d(t,"Tan",(function(){return f.xd})),n.d(t,"Tanh",(function(){return f.yd})),n.d(t,"Tile",(function(){return f.Bd})),n.d(t,"TopK",(function(){return f.Cd})),n.d(t,"Transform",(function(){return f.Dd})),n.d(t,"Transpose",(function(){return f.Ed})),n.d(t,"Unique",(function(){return f.Fd})),n.d(t,"Unpack",(function(){return f.Gd})),n.d(t,"UnsortedSegmentSum",(function(){return f.Hd})),n.d(t,"UpperBound",(function(){return f.Id})),n.d(t,"ZerosLike",(function(){return f.Kd})),n.d(t,"Step",(function(){return f.qd})),n.d(t,"FromPixels",(function(){return f.rb})),n.d(t,"RotateWithOffset",(function(){return f.Rc})),n.d(t,"_FusedMatMul",(function(){return f.Ld})),n.d(t,"FusedConv2D",(function(){return f.tb})),n.d(t,"FusedDepthwiseConv2D",(function(){return f.ub})),n.d(t,"booleanMaskAsync",(function(){return f.le})),n.d(t,"transpose",(function(){return f.Ai})),n.d(t,"norm",(function(){return f.Eg})),n.d(t,"movingAverage",(function(){return f.yg})),n.d(t,"scatterND",(function(){return f.yh})),n.d(t,"searchSorted",(function(){return f.Ah})),n.d(t,"sparseToDense",(function(){return f.Wh})),n.d(t,"gatherND",(function(){return f.xf})),n.d(t,"dropout",(function(){return f.af})),n.d(t,"enclosingPowerOfTwo",(function(){return f.ff})),n.d(t,"cosineWindow",(function(){return f.Je})),n.d(t,"inTopKAsync",(function(){return f.Kf})),n.d(t,"CallbackList",(function(){return Ta})),n.d(t,"CustomCallback",(function(){return Ia})),n.d(t,"History",(function(){return Ba})),n.d(t,"Callback",(function(){return Sh})),n.d(t,"callbacks",(function(){return Dh})),n.d(t,"EarlyStopping",(function(){return Th})),n.d(t,"InputSpec",(function(){return Po})),n.d(t,"SymbolicTensor",(function(){return Lo})),n.d(t,"LayersModel",(function(){return Cs})),n.d(t,"input",(function(){return Ds})),n.d(t,"loadLayersModel",(function(){return Ss})),n.d(t,"model",(function(){return Os})),n.d(t,"registerCallbackConstructor",(function(){return Bs})),n.d(t,"sequential",(function(){return Ts})),n.d(t,"RNN",(function(){return Tu})),n.d(t,"Sequential",(function(){return _s})),n.d(t,"LayerVariable",(function(){return No})),n.d(t,"version_layers",(function(){return"4.1.0"})),n.d(t,"constraints",(function(){return r})),n.d(t,"initializers",(function(){return i})),n.d(t,"layers",(function(){return o})),n.d(t,"metrics",(function(){return a})),n.d(t,"models",(function(){return s})),n.d(t,"regularizers",(function(){return u})),n.d(t,"GraphModel",(function(){return ef})),n.d(t,"loadGraphModel",(function(){return tf})),n.d(t,"loadGraphModelSync",(function(){return nf})),n.d(t,"deregisterOp",(function(){return jh.a})),n.d(t,"registerOp",(function(){return jh.c})),n.d(t,"version_converter",(function(){return"4.1.0"})),n.d(t,"data",(function(){return l}));
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
const Wy={"tfjs-core":f.Oi,"tfjs-backend-cpu":"4.1.0","tfjs-backend-webgl":"4.1.0","tfjs-data":Bf,"tfjs-layers":"4.1.0","tfjs-converter":"4.1.0",tfjs:"4.1.0"}},function(e,t,n){"use strict";var r={},i=(n.r(r),n.d(r,"ABS",(function(){return zt})),n.d(r,"ACCRINT",(function(){return Ua})),n.d(r,"ACCRINTM",(function(){return za})),n.d(r,"ACOS",(function(){return Ht})),n.d(r,"ACOSH",(function(){return $t})),n.d(r,"ACOT",(function(){return Qt})),n.d(r,"ACOTH",(function(){return Vt})),n.d(r,"AGGREGATE",(function(){return qt})),n.d(r,"AMORDEGRC",(function(){return Ha})),n.d(r,"AMORLINC",(function(){return $a})),n.d(r,"AND",(function(){return zs})),n.d(r,"ARABIC",(function(){return Gt})),n.d(r,"ASC",(function(){return Ur})),n.d(r,"ASIN",(function(){return Wt})),n.d(r,"ASINH",(function(){return Kt})),n.d(r,"ATAN",(function(){return Yt})),n.d(r,"ATAN2",(function(){return Xt})),n.d(r,"ATANH",(function(){return Jt})),n.d(r,"AVEDEV",(function(){return Ce})),n.d(r,"AVERAGE",(function(){return ke})),n.d(r,"AVERAGEA",(function(){return Ee})),n.d(r,"AVERAGEIF",(function(){return Se})),n.d(r,"AVERAGEIFS",(function(){return _e})),n.d(r,"BAHTTEXT",(function(){return zr})),n.d(r,"BASE",(function(){return Zt})),n.d(r,"BESSELI",(function(){return bi})),n.d(r,"BESSELJ",(function(){return yi})),n.d(r,"BESSELK",(function(){return wi})),n.d(r,"BESSELY",(function(){return xi})),n.d(r,"BETA",(function(){return Oe})),n.d(r,"BETADIST",(function(){return vo})),n.d(r,"BETAINV",(function(){return bo})),n.d(r,"BIN2DEC",(function(){return Ci})),n.d(r,"BIN2HEX",(function(){return ki})),n.d(r,"BIN2OCT",(function(){return Ei})),n.d(r,"BINOM",(function(){return Te})),n.d(r,"BINOMDIST",(function(){return yo})),n.d(r,"BITAND",(function(){return Si})),n.d(r,"BITLSHIFT",(function(){return _i})),n.d(r,"BITOR",(function(){return Oi})),n.d(r,"BITRSHIFT",(function(){return Ti})),n.d(r,"BITXOR",(function(){return Di})),n.d(r,"CEILING",(function(){return en})),n.d(r,"CEILINGMATH",(function(){return wo})),n.d(r,"CEILINGPRECISE",(function(){return xo})),n.d(r,"CELL",(function(){return V})),n.d(r,"CHAR",(function(){return Hr})),n.d(r,"CHIDIST",(function(){return Co})),n.d(r,"CHIDISTRT",(function(){return ko})),n.d(r,"CHIINV",(function(){return Eo})),n.d(r,"CHIINVRT",(function(){return So})),n.d(r,"CHISQ",(function(){return De})),n.d(r,"CHITEST",(function(){return _o})),n.d(r,"CHOOSE",(function(){return he})),n.d(r,"CLEAN",(function(){return $r})),n.d(r,"CODE",(function(){return Qr})),n.d(r,"COLUMN",(function(){return fe})),n.d(r,"COLUMNS",(function(){return de})),n.d(r,"COMBIN",(function(){return tn})),n.d(r,"COMBINA",(function(){return nn})),n.d(r,"COMPLEX",(function(){return Bi})),n.d(r,"CONCAT",(function(){return qr})),n.d(r,"CONCATENATE",(function(){return Vr})),n.d(r,"CONFIDENCE",(function(){return Be})),n.d(r,"CONVERT",(function(){return Ii})),n.d(r,"CORREL",(function(){return Ie})),n.d(r,"COS",(function(){return rn})),n.d(r,"COSH",(function(){return on})),n.d(r,"COT",(function(){return an})),n.d(r,"COTH",(function(){return sn})),n.d(r,"COUNT",(function(){return Me})),n.d(r,"COUNTA",(function(){return je})),n.d(r,"COUNTBLANK",(function(){return Ne})),n.d(r,"COUNTIF",(function(){return Fe})),n.d(r,"COUNTIFS",(function(){return Re})),n.d(r,"COUPDAYBS",(function(){return Qa})),n.d(r,"COUPDAYS",(function(){return Va})),n.d(r,"COUPDAYSNC",(function(){return qa})),n.d(r,"COUPNCD",(function(){return Ga})),n.d(r,"COUPNUM",(function(){return Wa})),n.d(r,"COUPPCD",(function(){return Ka})),n.d(r,"COVAR",(function(){return Oo})),n.d(r,"COVARIANCE",(function(){return Pe})),n.d(r,"COVARIANCEP",(function(){return To})),n.d(r,"COVARIANCES",(function(){return Do})),n.d(r,"CRITBINOM",(function(){return Bo})),n.d(r,"CSC",(function(){return un})),n.d(r,"CSCH",(function(){return cn})),n.d(r,"CUMIPMT",(function(){return Ya})),n.d(r,"CUMPRINC",(function(){return Xa})),n.d(r,"DATE",(function(){return dr})),n.d(r,"DATEDIF",(function(){return pr})),n.d(r,"DATEVALUE",(function(){return mr})),n.d(r,"DAVERAGE",(function(){return Sa})),n.d(r,"DAY",(function(){return gr})),n.d(r,"DAYS",(function(){return vr})),n.d(r,"DAYS360",(function(){return br})),n.d(r,"DB",(function(){return Ja})),n.d(r,"DBCS",(function(){return Gr})),n.d(r,"DCOUNT",(function(){return _a})),n.d(r,"DCOUNTA",(function(){return Oa})),n.d(r,"DDB",(function(){return Za})),n.d(r,"DEC2BIN",(function(){return Mi})),n.d(r,"DEC2HEX",(function(){return ji})),n.d(r,"DEC2OCT",(function(){return Ni})),n.d(r,"DECIMAL",(function(){return ln})),n.d(r,"DEGREES",(function(){return hn})),n.d(r,"DELTA",(function(){return Fi})),n.d(r,"DEVSQ",(function(){return Le})),n.d(r,"DGET",(function(){return Ta})),n.d(r,"DISC",(function(){return es})),n.d(r,"DMAX",(function(){return Da})),n.d(r,"DMIN",(function(){return Ba})),n.d(r,"DOLLAR",(function(){return Wr})),n.d(r,"DOLLARDE",(function(){return ts})),n.d(r,"DOLLARFR",(function(){return ns})),n.d(r,"DPRODUCT",(function(){return Ia})),n.d(r,"DSTDEV",(function(){return Ma})),n.d(r,"DSTDEVP",(function(){return ja})),n.d(r,"DSUM",(function(){return Na})),n.d(r,"DURATION",(function(){return rs})),n.d(r,"DVAR",(function(){return Fa})),n.d(r,"DVARP",(function(){return Ra})),n.d(r,"EDATE",(function(){return yr})),n.d(r,"EFFECT",(function(){return is})),n.d(r,"EOMONTH",(function(){return wr})),n.d(r,"ERF",(function(){return Ri})),n.d(r,"ERFC",(function(){return Pi})),n.d(r,"ERFCPRECISE",(function(){return Io})),n.d(r,"ERFPRECISE",(function(){return Mo})),n.d(r,"ERROR",(function(){return q})),n.d(r,"EVEN",(function(){return fn})),n.d(r,"EXACT",(function(){return Kr})),n.d(r,"EXP",(function(){return dn})),n.d(r,"EXPON",(function(){return Ue})),n.d(r,"EXPONDIST",(function(){return jo})),n.d(r,"F",(function(){return ze})),n.d(r,"FACT",(function(){return mn})),n.d(r,"FACTDOUBLE",(function(){return gn})),n.d(r,"FALSE",(function(){return Hs})),n.d(r,"FDIST",(function(){return No})),n.d(r,"FDISTRT",(function(){return Fo})),n.d(r,"FIND",(function(){return Yr})),n.d(r,"FINV",(function(){return Ro})),n.d(r,"FINVRT",(function(){return Po})),n.d(r,"FISHER",(function(){return He})),n.d(r,"FISHERINV",(function(){return $e})),n.d(r,"FIXED",(function(){return Xr})),n.d(r,"FLOOR",(function(){return An})),n.d(r,"FLOORMATH",(function(){return Lo})),n.d(r,"FLOORPRECISE",(function(){return Uo})),n.d(r,"FORECAST",(function(){return Qe})),n.d(r,"FREQUENCY",(function(){return Ve})),n.d(r,"FTEST",(function(){return zo})),n.d(r,"FV",(function(){return os})),n.d(r,"FVSCHEDULE",(function(){return as})),n.d(r,"GAMMA",(function(){return qe})),n.d(r,"GAMMADIST",(function(){return Ho})),n.d(r,"GAMMAINV",(function(){return $o})),n.d(r,"GAMMALN",(function(){return Ge})),n.d(r,"GAMMALNPRECISE",(function(){return Qo})),n.d(r,"GAUSS",(function(){return We})),n.d(r,"GCD",(function(){return vn})),n.d(r,"GEOMEAN",(function(){return Ke})),n.d(r,"GESTEP",(function(){return Li})),n.d(r,"GROWTH",(function(){return Ye})),n.d(r,"HARMEAN",(function(){return Xe})),n.d(r,"HEX2BIN",(function(){return Ui})),n.d(r,"HEX2DEC",(function(){return zi})),n.d(r,"HEX2OCT",(function(){return Hi})),n.d(r,"HLOOKUP",(function(){return pe})),n.d(r,"HOUR",(function(){return xr})),n.d(r,"HYPGEOM",(function(){return Je})),n.d(r,"HYPGEOMDIST",(function(){return Vo})),n.d(r,"IF",(function(){return $s})),n.d(r,"IFERROR",(function(){return Vs})),n.d(r,"IFNA",(function(){return qs})),n.d(r,"IFS",(function(){return Qs})),n.d(r,"IMABS",(function(){return $i})),n.d(r,"IMAGINARY",(function(){return Qi})),n.d(r,"IMARGUMENT",(function(){return Vi})),n.d(r,"IMCONJUGATE",(function(){return qi})),n.d(r,"IMCOS",(function(){return Gi})),n.d(r,"IMCOSH",(function(){return Wi})),n.d(r,"IMCOT",(function(){return Ki})),n.d(r,"IMCSC",(function(){return co})),n.d(r,"IMCSCH",(function(){return lo})),n.d(r,"IMDIV",(function(){return Yi})),n.d(r,"IMEXP",(function(){return Xi})),n.d(r,"IMLN",(function(){return Ji})),n.d(r,"IMLOG10",(function(){return Zi})),n.d(r,"IMLOG2",(function(){return eo})),n.d(r,"IMPOWER",(function(){return to})),n.d(r,"IMPRODUCT",(function(){return no})),n.d(r,"IMREAL",(function(){return ro})),n.d(r,"IMSEC",(function(){return io})),n.d(r,"IMSECH",(function(){return oo})),n.d(r,"IMSIN",(function(){return ao})),n.d(r,"IMSINH",(function(){return so})),n.d(r,"IMSQRT",(function(){return uo})),n.d(r,"IMSUB",(function(){return ho})),n.d(r,"IMSUM",(function(){return fo})),n.d(r,"IMTAN",(function(){return po})),n.d(r,"INDEX",(function(){return me})),n.d(r,"INFO",(function(){return G})),n.d(r,"INT",(function(){return bn})),n.d(r,"INTERCEPT",(function(){return Ze})),n.d(r,"INTRATE",(function(){return ss})),n.d(r,"IPMT",(function(){return us})),n.d(r,"IRR",(function(){return cs})),n.d(r,"ISBLANK",(function(){return W})),n.d(r,"ISERR",(function(){return K})),n.d(r,"ISERROR",(function(){return Y})),n.d(r,"ISEVEN",(function(){return X})),n.d(r,"ISFORMULA",(function(){return J})),n.d(r,"ISLOGICAL",(function(){return Z})),n.d(r,"ISNA",(function(){return ee})),n.d(r,"ISNONTEXT",(function(){return te})),n.d(r,"ISNUMBER",(function(){return ne})),n.d(r,"ISO",(function(){return yn})),n.d(r,"ISODD",(function(){return re})),n.d(r,"ISOWEEKNUM",(function(){return Cr})),n.d(r,"ISPMT",(function(){return ls})),n.d(r,"ISREF",(function(){return ie})),n.d(r,"ISTEXT",(function(){return oe})),n.d(r,"KURT",(function(){return et})),n.d(r,"LARGE",(function(){return tt})),n.d(r,"LCM",(function(){return wn})),n.d(r,"LEFT",(function(){return Jr})),n.d(r,"LEN",(function(){return Zr})),n.d(r,"LINEST",(function(){return nt})),n.d(r,"LN",(function(){return xn})),n.d(r,"LOG",(function(){return Cn})),n.d(r,"LOG10",(function(){return kn})),n.d(r,"LOGEST",(function(){return rt})),n.d(r,"LOGINV",(function(){return qo})),n.d(r,"LOGNORM",(function(){return it})),n.d(r,"LOGNORMDIST",(function(){return Go})),n.d(r,"LOGNORMINV",(function(){return Wo})),n.d(r,"LOOKUP",(function(){return ge})),n.d(r,"LOWER",(function(){return ei})),n.d(r,"MATCH",(function(){return Ae})),n.d(r,"MAX",(function(){return ot})),n.d(r,"MAXA",(function(){return at})),n.d(r,"MDURATION",(function(){return hs})),n.d(r,"MEDIAN",(function(){return st})),n.d(r,"MID",(function(){return ti})),n.d(r,"MIN",(function(){return ut})),n.d(r,"MINA",(function(){return ct})),n.d(r,"MINUTE",(function(){return kr})),n.d(r,"MIRR",(function(){return fs})),n.d(r,"MMULT",(function(){return En})),n.d(r,"MOD",(function(){return Sn})),n.d(r,"MODE",(function(){return lt})),n.d(r,"MODEMULT",(function(){return Ko})),n.d(r,"MODESNGL",(function(){return Yo})),n.d(r,"MONTH",(function(){return Er})),n.d(r,"MROUND",(function(){return _n})),n.d(r,"MULTINOMIAL",(function(){return On})),n.d(r,"MUNIT",(function(){return Tn})),n.d(r,"N",(function(){return ae})),n.d(r,"NA",(function(){return se})),n.d(r,"NEGBINOM",(function(){return ht})),n.d(r,"NEGBINOMDIST",(function(){return Xo})),n.d(r,"NETWORKDAYS",(function(){return Sr})),n.d(r,"NETWORKDAYSINTL",(function(){return Jo})),n.d(r,"NOMINAL",(function(){return ds})),n.d(r,"NORM",(function(){return ft})),n.d(r,"NORMDIST",(function(){return Zo})),n.d(r,"NORMINV",(function(){return ea})),n.d(r,"NORMSDIST",(function(){return ta})),n.d(r,"NORMSINV",(function(){return na})),n.d(r,"NOT",(function(){return Gs})),n.d(r,"NOW",(function(){return _r})),n.d(r,"NPER",(function(){return ps})),n.d(r,"NPV",(function(){return ms})),n.d(r,"NUMBERVALUE",(function(){return ni})),n.d(r,"OCT2BIN",(function(){return mo})),n.d(r,"OCT2DEC",(function(){return go})),n.d(r,"OCT2HEX",(function(){return Ao})),n.d(r,"ODD",(function(){return Dn})),n.d(r,"ODDFPRICE",(function(){return gs})),n.d(r,"ODDFYIELD",(function(){return As})),n.d(r,"ODDLPRICE",(function(){return vs})),n.d(r,"ODDLYIELD",(function(){return bs})),n.d(r,"OR",(function(){return Ws})),n.d(r,"PDURATION",(function(){return ys})),n.d(r,"PEARSON",(function(){return dt})),n.d(r,"PERCENTILE",(function(){return pt})),n.d(r,"PERCENTILEEXC",(function(){return ra})),n.d(r,"PERCENTILEINC",(function(){return ia})),n.d(r,"PERCENTRANK",(function(){return mt})),n.d(r,"PERCENTRANKEXC",(function(){return oa})),n.d(r,"PERCENTRANKINC",(function(){return aa})),n.d(r,"PERMUT",(function(){return gt})),n.d(r,"PERMUTATIONA",(function(){return At})),n.d(r,"PHI",(function(){return vt})),n.d(r,"PI",(function(){return Bn})),n.d(r,"PMT",(function(){return ws})),n.d(r,"POISSON",(function(){return bt})),n.d(r,"POISSONDIST",(function(){return sa})),n.d(r,"POWER",(function(){return In})),n.d(r,"PPMT",(function(){return xs})),n.d(r,"PRICE",(function(){return Cs})),n.d(r,"PRICEDISC",(function(){return ks})),n.d(r,"PRICEMAT",(function(){return Es})),n.d(r,"PROB",(function(){return yt})),n.d(r,"PRODUCT",(function(){return Mn})),n.d(r,"PRONETIC",(function(){return ri})),n.d(r,"PROPER",(function(){return ii})),n.d(r,"PV",(function(){return Ss})),n.d(r,"QUARTILE",(function(){return wt})),n.d(r,"QUARTILEEXC",(function(){return ua})),n.d(r,"QUARTILEINC",(function(){return ca})),n.d(r,"QUOTIENT",(function(){return jn})),n.d(r,"RADIANS",(function(){return Nn})),n.d(r,"RAND",(function(){return Fn})),n.d(r,"RANDBETWEEN",(function(){return Rn})),n.d(r,"RANK",(function(){return xt})),n.d(r,"RANKAVG",(function(){return la})),n.d(r,"RANKEQ",(function(){return ha})),n.d(r,"RATE",(function(){return _s})),n.d(r,"RECEIVED",(function(){return Os})),n.d(r,"REPLACE",(function(){return oi})),n.d(r,"REPT",(function(){return ai})),n.d(r,"RIGHT",(function(){return si})),n.d(r,"ROMAN",(function(){return Pn})),n.d(r,"ROUND",(function(){return Ln})),n.d(r,"ROUNDDOWN",(function(){return Un})),n.d(r,"ROUNDUP",(function(){return zn})),n.d(r,"ROW",(function(){return Ct})),n.d(r,"ROWS",(function(){return ve})),n.d(r,"RRI",(function(){return Ts})),n.d(r,"RSQ",(function(){return kt})),n.d(r,"SEARCH",(function(){return ui})),n.d(r,"SEC",(function(){return Hn})),n.d(r,"SECH",(function(){return $n})),n.d(r,"SECOND",(function(){return Or})),n.d(r,"SERIESSUM",(function(){return Qn})),n.d(r,"SHEET",(function(){return ue})),n.d(r,"SHEETS",(function(){return ce})),n.d(r,"SIGN",(function(){return Vn})),n.d(r,"SIN",(function(){return qn})),n.d(r,"SINH",(function(){return Gn})),n.d(r,"SKEW",(function(){return Et})),n.d(r,"SKEWP",(function(){return fa})),n.d(r,"SLN",(function(){return Ds})),n.d(r,"SLOPE",(function(){return St})),n.d(r,"SMALL",(function(){return _t})),n.d(r,"SORT",(function(){return be})),n.d(r,"SQRT",(function(){return Wn})),n.d(r,"SQRTPI",(function(){return Kn})),n.d(r,"STANDARDIZE",(function(){return Ot})),n.d(r,"STDEV",(function(){return Tt})),n.d(r,"STDEVA",(function(){return Dt})),n.d(r,"STDEVP",(function(){return da})),n.d(r,"STDEVPA",(function(){return Bt})),n.d(r,"STDEVS",(function(){return pa})),n.d(r,"STEYX",(function(){return It})),n.d(r,"SUBSTITUTE",(function(){return ci})),n.d(r,"SUBTOTAL",(function(){return Yn})),n.d(r,"SUM",(function(){return Xn})),n.d(r,"SUMIF",(function(){return Jn})),n.d(r,"SUMIFS",(function(){return Zn})),n.d(r,"SUMPRODUCT",(function(){return er})),n.d(r,"SUMSQ",(function(){return tr})),n.d(r,"SUMX2MY2",(function(){return nr})),n.d(r,"SUMX2PY2",(function(){return rr})),n.d(r,"SUMXMY2",(function(){return ir})),n.d(r,"SWITCH",(function(){return Xs})),n.d(r,"SYD",(function(){return Bs})),n.d(r,"T",(function(){return li})),n.d(r,"TAN",(function(){return or})),n.d(r,"TANH",(function(){return ar})),n.d(r,"TBILLEQ",(function(){return Is})),n.d(r,"TBILLPRICE",(function(){return Ms})),n.d(r,"TBILLYIELD",(function(){return js})),n.d(r,"TDIST",(function(){return ma})),n.d(r,"TDISTRT",(function(){return ga})),n.d(r,"TEXT",(function(){return hi})),n.d(r,"TEXTJOIN",(function(){return fi})),n.d(r,"TIME",(function(){return Tr})),n.d(r,"TIMEVALUE",(function(){return Dr})),n.d(r,"TINV",(function(){return Aa})),n.d(r,"TODAY",(function(){return Br})),n.d(r,"TRANSPOSE",(function(){return ye})),n.d(r,"TREND",(function(){return jt})),n.d(r,"TRIM",(function(){return di})),n.d(r,"TRIMMEAN",(function(){return Nt})),n.d(r,"TRUE",(function(){return Ks})),n.d(r,"TRUNC",(function(){return sr})),n.d(r,"TTEST",(function(){return va})),n.d(r,"TYPE",(function(){return le})),n.d(r,"UNICHAR",(function(){return pi})),n.d(r,"UNICODE",(function(){return mi})),n.d(r,"UNIQUE",(function(){return we})),n.d(r,"UPPER",(function(){return gi})),n.d(r,"VALUE",(function(){return Ai})),n.d(r,"VAR",(function(){return Ft})),n.d(r,"VARA",(function(){return Rt})),n.d(r,"VARP",(function(){return ba})),n.d(r,"VARPA",(function(){return Pt})),n.d(r,"VARS",(function(){return ya})),n.d(r,"VDB",(function(){return Ns})),n.d(r,"VLOOKUP",(function(){return xe})),n.d(r,"WEEKDAY",(function(){return Ir})),n.d(r,"WEEKNUM",(function(){return Mr})),n.d(r,"WEIBULL",(function(){return Lt})),n.d(r,"WEIBULLDIST",(function(){return wa})),n.d(r,"WORKDAY",(function(){return jr})),n.d(r,"WORKDAYINTL",(function(){return xa})),n.d(r,"XIRR",(function(){return Fs})),n.d(r,"XNPV",(function(){return Rs})),n.d(r,"XOR",(function(){return Ys})),n.d(r,"YEAR",(function(){return Nr})),n.d(r,"YEARFRAC",(function(){return Pr})),n.d(r,"YIELD",(function(){return Ps})),n.d(r,"YIELDDISC",(function(){return Ls})),n.d(r,"YIELDMAT",(function(){return Us})),n.d(r,"Z",(function(){return Ut})),n.d(r,"ZTEST",(function(){return Ca})),n.d(r,"utils",(function(){return Js})),n(32),n(14)),o=(n(38),n(19)),a=n(169);const s=new Error("#NULL!"),u=new Error("#DIV/0!"),c=new Error("#VALUE!"),l=new Error("#REF!"),h=new Error("#NAME?"),f=new Error("#NUM!"),d=new Error("#N/A"),p=new Error("#ERROR!"),m=new Error("#GETTING_DATA");var g=Object.freeze({__proto__:null,data:m,div0:u,error:p,na:d,name:h,nil:s,num:f,ref:l,value:c});function A(e){const t=[];return v(e,e=>{t.push(e)}),t}function v(e,t){let n=-1;for(var r=e.length;++n<r&&!1!==t(e[n],n,e););}function b(e){let t=e.length;for(var n;t--;)"number"!=typeof(n=e[t])&&(!0===n?e[t]=1:!1===n?e[t]=0:"string"==typeof n&&(n=M(n),e[t]=n instanceof Error?0:n));return e}function y(e,t){if(!e)return c;(e=e.every(e=>Array.isArray(e))&&0!==e.length?e:[[...e]]).map((t,n)=>{t.map((t,r)=>{t||(e[n][r]=0)})});var n=e.reduce((t,n,r)=>n.length>e[t].length?r:t,0);const r=e[n].length;return e.map(e=>[...e,...Array(r-e.length).fill(t||0)])}function w(){let e;var t,n;for(e=1===arguments.length?null!=(n=t=arguments[0])&&"number"==typeof n.length&&"string"!=typeof n?A.apply(null,arguments):[t]:Array.from(arguments);!function(e){if(e){for(let t=0;t<e.length;++t)if(Array.isArray(e[t]))return;return 1}}(e);)e=x(e);return e}function x(e){return e&&e.reduce?e.reduce((e,t)=>{var n=Array.isArray(e),r=Array.isArray(t);return n&&r?e.concat(t):n?(e.push(t),e):r?[e].concat(t):[e,t]}):[e]}function C(e,t){return t=t||1,e&&"function"==typeof e.slice?e.slice(t):e}function k(e){return e?e[0].map((t,n)=>e.map(e=>e[n])):c}function E(e,t){let n=null;return v(e,(e,r)=>{if(e[0]===t)return n=r,!1}),null==n?c:n}function S(){for(let e=0;e<arguments.length;e++)if(arguments[e]instanceof Error)return arguments[e]}function _(){let e=arguments.length;for(;e--;)if(arguments[e]instanceof Error)return 1}function O(e){return Math.round(1e14*e)/1e14}function T(){const e=w.apply(null,arguments);return e.filter(e=>"number"==typeof e)}function D(e){if("boolean"==typeof e)return e;if(e instanceof Error)return e;if("number"==typeof e)return 0!==e;if("string"==typeof e){var t=e.toUpperCase();if("TRUE"===t)return!0;if("FALSE"===t)return!1}return e instanceof Date&&!isNaN(e)||c}function B(e){if(isNaN(e))return"string"!=typeof e||(e=/(\d{4})-(\d\d?)-(\d\d?)$/.test(e)?new Date(e+"T00:00:00.000"):new Date(e),isNaN(e))?c:e;if(e instanceof Date)return new Date(e);if((e=parseFloat(e))<0||2958466<=e)return f;{e<60&&(e+=1);var t=Math.floor(e-25569);const i=new Date(86400*t*1e3);t=e-Math.floor(e)+1e-7;var n=(t=Math.floor(86400*t))%60,r=(t-=n,Math.floor(t/3600));t=Math.floor(t/60)%60;let o=i.getUTCDate(),a=i.getUTCMonth();return 60<=e&&e<61&&(o=29,a=1),new Date(i.getUTCFullYear(),a,o,r,t,n)}}function I(e){let t=e.length;for(var n;t--;){if((n=B(e[t]))===c)return n;e[t]=n}return e}function M(e){return e instanceof Error?e:null==e?0:("boolean"==typeof e&&(e=+e),isNaN(e)||""===e?c:parseFloat(e))}function j(e){let t;if(!e||0===(t=e.length))return c;for(var n;t--;){if(e[t]instanceof Error)return e[t];if((n=M(e[t]))instanceof Error)return n;e[t]=n}return e}function N(e){return e instanceof Error?e:null==e?"":e.toString()}function F(){let e=arguments.length;for(;e--;)if("string"==typeof arguments[e])return 1}function R(e){return null!=e}const P=[">",">=","<","<=","=","<>"],L=["operator","literal"],U="operator",z="literal";function H(e,t){if(-1===L.indexOf(t))throw new Error("Unsupported token type: "+t);return{value:e,type:t}}function $(e){return function(e){let t="";const n=[];for(let i=0;i<e.length;i++){var r=e[i];0===i&&0<=P.indexOf(r)?n.push(H(r,U)):t+=r}var i;return 0<t.length&&n.push(H(i="string"==typeof(i=t)&&/^\d+(\.\d+)?$/.test(i)?-1===i.indexOf(".")?parseInt(i,10):parseFloat(i):i,z)),0<n.length&&n[0].type!==U&&n.unshift(H("=",U)),n}(function(e){var t=e.length;const n=[];let r=0,i="",o="";for(;r<t;){var a=e.charAt(r);switch(a){case">":case"<":case"=":o+=a,0<i.length&&(n.push(i),i="");break;default:0<o.length&&(n.push(o),o=""),i+=a}r++}return 0<i.length&&n.push(i),0<o.length&&n.push(o),n}(e))}const Q=function(e){const t=[];let n;for(let i=0;i<e.length;i++){var r=e[i];switch(r.type){case U:n=r.value;break;case z:t.push(r.value)}}{var i=t;let e=!1;switch(n){case">":e=i[0]>i[1];break;case">=":e=i[0]>=i[1];break;case"<":e=i[0]<i[1];break;case"<=":e=i[0]<=i[1];break;case"=":e=i[0]==i[1];break;case"<>":e=i[0]!=i[1]}return e}};function V(){throw new Error("CELL is not implemented")}const q={};function G(){throw new Error("INFO is not implemented")}function W(e){return null===e}function K(e){return 0<=[c,l,u,f,h,s].indexOf(e)||"number"==typeof e&&(isNaN(e)||!isFinite(e))}function Y(e){return K(e)||e===d}function X(e){return!(1&Math.floor(Math.abs(e)))}function J(){throw new Error("ISFORMULA is not implemented")}function Z(e){return!0===e||!1===e}function ee(e){return e===d}function te(e){return"string"!=typeof e}function ne(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}function re(e){return!!(1&Math.floor(Math.abs(e)))}function ie(){throw new Error("ISREF is not implemented")}function oe(e){return"string"==typeof e}function ae(e){return ne(e)?e:e instanceof Date?e.getTime():!0===e?1:!1!==e&&Y(e)?e:0}function se(){return d}function ue(){throw new Error("SHEET is not implemented")}function ce(){throw new Error("SHEETS is not implemented")}function le(e){return ne(e)?1:oe(e)?2:Z(e)?4:Y(e)?16:Array.isArray(e)?64:void 0}function he(){var e;return arguments.length<2?d:(e=arguments[0])<1||254<e||arguments.length<e+1?c:arguments[e]}function fe(e,t){return 2!==arguments.length?d:t<0?f:e instanceof Array&&"number"==typeof t?0!==e.length?o.col(e,t):void 0:c}function de(e){return 1!==arguments.length?d:e instanceof Array?0===e.length?0:o.cols(e):c}function pe(e,t,n,r){return xe(e,k(t),n,r)}function me(e,t,n){var r=S(e,t,n);return r||(!Array.isArray(e)||(t=(r=0<e.length&&!Array.isArray(e[0]))&&!n?(n=t,1):(n=n||1,t||1),n<0||t<0)?c:r&&1===t&&n<=e.length?e[n-1]:t<=e.length&&n<=e[t-1].length?e[t-1][n-1]:l)}function ge(e,t,n){t=w(t),n=n?w(n):t;var r="number"==typeof e;let i=d;for(let o=0;o<t.length;o++){if(t[o]===e)return n[o];if(r&&t[o]<=e||"string"==typeof t[o]&&t[o].localeCompare(e)<0)i=n[o];else if(r&&t[o]>e)return i}return i}function Ae(e,t,n){if(!e||!t)return d;if(2===arguments.length&&(n=1),!((t=w(t))instanceof Array))return d;if(-1!==n&&0!==n&&1!==n)return d;let r,i;for(let a=0;a<t.length;a++)if(1===n){if(t[a]===e)return a+1;t[a]<e&&(!i||t[a]>i)&&(r=a+1,i=t[a])}else if(0===n){if("string"==typeof e&&"string"==typeof t[a]){var o=e.toLowerCase().replace(/\?/g,".").replace(/\*/g,".*").replace(/~/g,"\\");if(new RegExp("^"+o+"$").test(t[a].toLowerCase()))return a+1}else if(t[a]===e)return a+1}else if(-1===n){if(t[a]===e)return a+1;t[a]>e&&(!i||t[a]<i)&&(r=a+1,i=t[a])}return r||d}function ve(e){return 1!==arguments.length?d:e instanceof Array?0===e.length?0:o.rows(e):c}function be(e,t=1,n=1,r=!1){var i;return e&&Array.isArray(e)?0===e.length?0:!(t=M(t))||t<1||1!==(n=M(n))&&-1!==n?c:"boolean"!=typeof(r=D(r))?h:(i=e=>e.sort((e,r)=>(e=N(e[t-1]),r=N(r[t-1]),1===n?e<r?-1*n:n:r<e?n:-1*n)),e=y(e),e=r?k(e):e,1<=t&&t<=e[0].length?r?k(i(e)):i(e):c):d}function ye(e){return e?k(y(e)):d}function we(){const e=[];for(let n=0;n<arguments.length;++n){let r=!1;var t=arguments[n];for(let n=0;n<e.length&&!(r=e[n]===t);++n);r||e.push(t)}return e}function xe(e,t,n,r){if(!t||!n)return d;r=!(0===r||!1===r);let i=d;var o="number"==typeof e;let a=!1;for(let s=0;s<t.length;s++){const u=t[s];if(u[0]===e){i=n<u.length+1?u[n-1]:l;break}!a&&(o&&r&&u[0]<=e||r&&"string"==typeof u[0]&&u[0].localeCompare(e)<0)&&(i=n<u.length+1?u[n-1]:l),o&&u[0]>e&&(a=!0)}return i}q.TYPE=e=>{switch(e){case s:return 1;case u:return 2;case c:return 3;case l:return 4;case h:return 5;case f:return 6;case d:return 7;case m:return 8}return d};function Ce(){const e=w(arguments);var t=e.filter(R);return 0===t.length?f:(t=j(t))instanceof Error?t:o.sum(o(t).subtract(o.mean(t)).abs()[0])/t.length}function ke(){const e=w(arguments);var t=e.filter(R);if(0===t.length)return u;var n=S.apply(void 0,t);if(n)return n;var r=T(t),i=r.length;let o,a=0,s=0;for(let e=0;e<i;e++)a+=r[e],s+=1;return o=a/s,isNaN(o)?f:o}function Ee(){const e=w(arguments);var t=e.filter(R);if(0===t.length)return u;var n=S.apply(void 0,t);if(n)return n;var r=t,i=r.length;let o,a=0,s=0;for(let e=0;e<i;e++){var c=r[e];"number"==typeof c&&(a+=c),!0===c&&a++,null!==c&&s++}return o=a/s,isNaN(o)?f:o}function Se(e,t,n){if(arguments.length<=1)return d;const r=w(n=n||e);if(n=j(r.filter(R)),e=w(e),n instanceof Error)return n;let i=0,o=0;var a=void 0===t||"*"===t,s=a?null:$(t+"");for(let t=0;t<e.length;t++){var u=e[t];(a||(u=[H(u,z)].concat(s),Q(u)))&&(o+=n[t],i++)}return o/i}function _e(){var e=A(arguments),t=(e.length-1)/2,n=w(e[0]);let r=0,i=0;for(let s=0;s<n.length;s++){let u=!1;for(let n=0;n<t;n++){var o=e[2*n+1][s],a=e[2*n+2];let t=!1;if(!(t=void 0===a||"*"===a||(a=$(a+""),o=[H(o,z)].concat(a),Q(o)))){u=!1;break}u=!0}u&&(i+=n[s],r++)}var s=i/r;return isNaN(s)?0:s}const Oe={DIST:function(e,t,n,r,i,a){return arguments.length<4||(i=void 0===i?0:i,a=void 0===a?1:a,_(e=M(e),t=M(t),n=M(n),i=M(i),a=M(a)))?c:(e=(e-i)/(a-i),r?o.beta.cdf(e,t,n):o.beta.pdf(e,t,n))},INV:(e,t,n,r,i)=>(r=void 0===r?0:r,i=void 0===i?1:i,_(e=M(e),t=M(t),n=M(n),r=M(r),i=M(i))?c:o.beta.inv(e,t,n)*(i-r)+r)},Te={DIST:(e,t,n,r)=>_(e=M(e),t=M(t),n=M(n),r=M(r))?c:r?o.binomial.cdf(e,t,n):o.binomial.pdf(e,t,n)},De=(Te.DIST.RANGE=(e,t,n,r)=>{if(r=void 0===r?n:r,_(e=M(e),t=M(t),n=M(n),r=M(r)))return c;let i=0;for(let o=n;o<=r;o++)i+=tn(e,o)*Math.pow(t,o)*Math.pow(1-t,e-o);return i},Te.INV=(e,t,n)=>{if(_(e=M(e),t=M(t),n=M(n)))return c;let r=0;for(;r<=e;){if(o.binomial.cdf(r,e,t)>=n)return r;r++}},{DIST:(e,t,n)=>_(e=M(e),t=M(t))?c:n?o.chisquare.cdf(e,t):o.chisquare.pdf(e,t)}),Be=(De.DIST.RT=(e,t)=>!e|!t?d:e<1||t>Math.pow(10,10)?f:"number"!=typeof e||"number"!=typeof t?c:1-o.chisquare.cdf(e,t),De.INV=(e,t)=>_(e=M(e),t=M(t))?c:o.chisquare.inv(e,t),De.INV.RT=(e,t)=>!e|!t?d:e<0||1<e||t<1||t>Math.pow(10,10)?f:"number"!=typeof e||"number"!=typeof t?c:o.chisquare.inv(1-e,t),De.TEST=function(e,t){if(2!==arguments.length)return d;if(!(e instanceof Array&&t instanceof Array))return c;if(e.length!==t.length)return c;if(e[0]&&t[0]&&e[0].length!==t[0].length)return c;var n=e.length;let r,i,o;for(i=0;i<n;i++)e[i]instanceof Array||(r=e[i],e[i]=[],e[i].push(r)),t[i]instanceof Array||(r=t[i],t[i]=[],t[i].push(r));var a=e[0].length,s=1===a?n-1:(n-1)*(a-1);let u=0;const l=Math.PI;for(i=0;i<n;i++)for(o=0;o<a;o++)u+=Math.pow(e[i][o]-t[i][o],2)/t[i][o];return Math.round(1e6*function(e,t){let n=Math.exp(-.5*e),r=(t%2==1&&(n*=Math.sqrt(2*e/l)),t);for(;2<=r;)n=n*e/r,r-=2;let i=n,o=t;for(;i>1e-10*n;)o+=2,i=i*e/o,n+=i;return 1-n}(u,s))/1e6},{});function Ie(e,t){return _(e=j(w(e)),t=j(w(t)))?c:o.corrcoeff(e,t)}function Me(){return T(w(arguments)).length}function je(){var e=w(arguments);return e.length-Ne(e)}function Ne(){var e,t=w(arguments);let n=0;for(let r=0;r<t.length;r++)null!=(e=t[r])&&""!==e||n++;return n}function Fe(e,t){if(e=w(e),void 0===t||"*"===t)return e.length;let n=0;var r=$(t+"");for(let t=0;t<e.length;t++){var i=[H(e[t],z)].concat(r);Q(i)&&n++}return n}function Re(){var e=A(arguments);const t=new Array(w(e[0]).length);for(let e=0;e<t.length;e++)t[e]=!0;for(let a=0;a<e.length;a+=2){var n=w(e[a]),r=e[a+1];if(void 0!==r&&"*"!==r){var i=$(r+"");for(let e=0;e<n.length;e++){var o=[H(n[e],z)].concat(i);t[e]=t[e]&&Q(o)}}}let a=0;for(let e=0;e<t.length;e++)t[e]&&a++;return a}Be.NORM=(e,t,n)=>_(e=M(e),t=M(t),n=M(n))?c:o.normalci(1,e,t,n)[1]-1,Be.T=(e,t,n)=>_(e=M(e),t=M(t),n=M(n))?c:o.tci(1,e,t,n)[1]-1;const Pe={};function Le(){var e=j(w(arguments));if(e instanceof Error)return e;var t=o.mean(e);let n=0;for(let r=0;r<e.length;r++)n+=Math.pow(e[r]-t,2);return n}Pe.P=(e,t)=>{if(_(e=j(w(e)),t=j(w(t))))return c;var n=o.mean(e),r=o.mean(t);let i=0;var a=e.length;for(let o=0;o<a;o++)i+=(e[o]-n)*(t[o]-r);return i/a},Pe.S=(e,t)=>_(e=j(w(e)),t=j(w(t)))?c:o.covariance(e,t);const Ue={DIST:(e,t,n)=>_(e=M(e),t=M(t))?c:n?o.exponential.cdf(e,t):o.exponential.pdf(e,t)},ze={};function He(e){return(e=M(e))instanceof Error?e:Math.log((1+e)/(1-e))/2}function $e(e){return(e=M(e))instanceof Error?e:((e=Math.exp(2*e))-1)/(e+1)}function Qe(e,t,n){if(_(e=M(e),t=j(w(t)),n=j(w(n))))return c;var r=o.mean(n),i=o.mean(t),a=n.length;let s=0,u=0;for(let e=0;e<a;e++)s+=(n[e]-r)*(t[e]-i),u+=Math.pow(n[e]-r,2);var l=s/u;return i-l*r+l*e}function Ve(e,t){if(_(e=j(w(e)),t=j(w(t))))return c;var n=e.length,r=t.length;const i=[];for(let o=0;o<=r;o++)for(let a=i[o]=0;a<n;a++)0===o?e[a]<=t[0]&&(i[0]+=1):o<r?e[a]>t[o-1]&&e[a]<=t[o]&&(i[o]+=1):o===r&&e[a]>t[r-1]&&(i[r]+=1);return i}function qe(e){return(e=M(e))instanceof Error?e:0===e||parseInt(e,10)===e&&e<0?f:o.gammafn(e)}function Ge(e){return(e=M(e))instanceof Error?e:o.gammaln(e)}function We(e){return(e=M(e))instanceof Error?e:o.normal.cdf(e,0,1)-.5}function Ke(){var e=j(w(arguments));return e instanceof Error?e:o.geomean(e)}function Ye(e,t,n,r){if((e=j(e))instanceof Error)return e;let i;if(void 0===t)for(t=[],i=1;i<=e.length;i++)t.push(i);if(void 0===n)for(n=[],i=1;i<=e.length;i++)n.push(i);if(_(t=j(t),n=j(n)))return c;void 0===r&&(r=!0);var o=e.length;let a,s,u=0,l=0,h=0,f=0;for(i=0;i<o;i++){var d=t[i],p=Math.log(e[i]);u+=d,l+=p,h+=d*p,f+=d*d}u/=o,l/=o,h/=o,f/=o,s=r?(a=(h-u*l)/(f-u*u),l-a*u):(a=h/f,0);const m=[];for(i=0;i<n.length;i++)m.push(Math.exp(s+a*n[i]));return m}function Xe(){var e=j(w(arguments));if(e instanceof Error)return e;var t=e.length;let n=0;for(let r=0;r<t;r++)n+=1/e[r];return t/n}ze.DIST=(e,t,n,r)=>_(e=M(e),t=M(t),n=M(n))?c:r?o.centralF.cdf(e,t,n):o.centralF.pdf(e,t,n),ze.DIST.RT=function(e,t,n){return 3!==arguments.length?d:e<0||t<1||n<1?f:"number"!=typeof e||"number"!=typeof t||"number"!=typeof n?c:1-o.centralF.cdf(e,t,n)},ze.INV=(e,t,n)=>_(e=M(e),t=M(t),n=M(n))?c:e<=0||1<e?f:o.centralF.inv(e,t,n),ze.INV.RT=function(e,t,n){return 3!==arguments.length?d:e<0||1<e||t<1||t>Math.pow(10,10)||n<1||n>Math.pow(10,10)?f:"number"!=typeof e||"number"!=typeof t||"number"!=typeof n?c:o.centralF.inv(1-e,t,n)},ze.TEST=(e,t)=>{var n,r,i;return e&&t&&e instanceof Array&&t instanceof Array?e.length<2||t.length<2?u:(n=(e,t)=>{let n=0;for(let r=0;r<e.length;r++)n+=Math.pow(e[r]-t,2);return n},r=Xn(e)/e.length,i=Xn(t)/t.length,n(e,r)/(e.length-1)/(n(t,i)/(t.length-1))):d},qe.DIST=function(e,t,n,r){return 4!==arguments.length?d:e<0||t<=0||n<=0||"number"!=typeof e||"number"!=typeof t||"number"!=typeof n?c:r?o.gamma.cdf(e,t,n,!0):o.gamma.pdf(e,t,n,!1)},qe.INV=function(e,t,n){return 3!==arguments.length?d:e<0||1<e||t<=0||n<=0?f:"number"!=typeof e||"number"!=typeof t||"number"!=typeof n?c:o.gamma.inv(e,t,n)},Ge.PRECISE=function(e){return 1!==arguments.length?d:e<=0?f:"number"!=typeof e?c:o.gammaln(e)};const Je={};function Ze(e,t){return _(e=j(e),t=j(t))?c:e.length!==t.length?d:Qe(0,e,t)}function et(){var e=j(w(arguments));if(e instanceof Error)return e;var t=o.mean(e),n=e.length;let r=0;for(let i=0;i<n;i++)r+=Math.pow(e[i]-t,4);return n*(n+1)/((n-1)*(n-2)*(n-3))*(r/=Math.pow(o.stdev(e,!0),4))-3*(n-1)*(n-1)/((n-2)*(n-3))}function tt(e,t){return _(e=j(w(e)),t=M(t))?e:t<0||e.length<t?c:e.sort((e,t)=>t-e)[t-1]}function nt(e,t){if(_(e=j(w(e)),t=j(w(t))))return c;var n=o.mean(e),r=o.mean(t),i=t.length;let a=0,s=0;for(let o=0;o<i;o++)a+=(t[o]-r)*(e[o]-n),s+=Math.pow(t[o]-r,2);var u=a/s;return[u,n-u*r]}function rt(e,t){if(_(e=j(w(e)),t=j(w(t))))return c;if(e.length!==t.length)return c;for(let t=0;t<e.length;t++)e[t]=Math.log(e[t]);const n=nt(e,t);return n[0]=Math.round(1e6*Math.exp(n[0]))/1e6,n[1]=Math.round(1e6*Math.exp(n[1]))/1e6,n}Je.DIST=(e,t,n,r,i)=>{return _(e=M(e),t=M(t),n=M(n),r=M(r))?c:(i?function(e,t,n,r){let i=0;for(let a=0;a<=e;a++)i+=o(a,t,n,r);return i}:o)(e,t,n,r);function o(e,t,n,r){return tn(n,e)*tn(r-n,t-e)/tn(r,t)}};const it={};function ot(){var e=w(arguments),t=S.apply(void 0,e);return t||(0===(t=T(e)).length?0:Math.max.apply(Math,t))}function at(){var e=w(arguments),t=S.apply(void 0,e);if(t)return t;let n=b(e);return 0===(n=n.map(e=>null==e?0:e)).length?0:Math.max.apply(Math,n)}function st(){var e=w(arguments),t=S.apply(void 0,e);if(t)return t;t=b(e);let n=o.median(t);return isNaN(n)?f:n}function ut(){var e=w(arguments),t=S.apply(void 0,e);return t||(0===(t=T(e)).length?0:Math.min.apply(Math,t))}function ct(){var e=w(arguments),t=S.apply(void 0,e);if(t)return t;let n=b(e);return 0===(n=n.map(e=>null==e?0:e)).length?0:Math.min.apply(Math,n)}it.DIST=(e,t,n,r)=>_(e=M(e),t=M(t),n=M(n))?c:r?o.lognormal.cdf(e,t,n):o.lognormal.pdf(e,t,n),it.INV=(e,t,n)=>_(e=M(e),t=M(t),n=M(n))?c:o.lognormal.inv(e,t,n);const lt={MULT:function(){var e=j(w(arguments));if(e instanceof Error)return e;var t,n=e.length;const r={};let i=[],o=0;for(let a=0;a<n;a++)r[t=e[a]]=r[t]?r[t]+1:1,r[t]>o&&(o=r[t],i=[]),r[t]===o&&(i[i.length]=t);return i},SNGL:function(){var e=j(w(arguments));return e instanceof Error?e:lt.MULT(e).sort((e,t)=>e-t)[0]}},ht={DIST:(e,t,n,r)=>_(e=M(e),t=M(t),n=M(n))?c:r?o.negbin.cdf(e,t,n):o.negbin.pdf(e,t,n)},ft={};function dt(e,t){if(_(t=j(w(t)),e=j(w(e))))return c;var n=o.mean(e),r=o.mean(t),i=e.length;let a=0,s=0,u=0;for(let o=0;o<i;o++)a+=(e[o]-n)*(t[o]-r),s+=Math.pow(e[o]-n,2),u+=Math.pow(t[o]-r,2);return a/Math.sqrt(s*u)}ft.DIST=(e,t,n,r)=>_(e=M(e),t=M(t),n=M(n))?c:n<=0?f:r?o.normal.cdf(e,t,n):o.normal.pdf(e,t,n),ft.INV=(e,t,n)=>_(e=M(e),t=M(t),n=M(n))?c:o.normal.inv(e,t,n),ft.S={},ft.S.DIST=(e,t)=>(e=M(e))instanceof Error?c:t?o.normal.cdf(e,0,1):o.normal.pdf(e,0,1),ft.S.INV=e=>(e=M(e))instanceof Error?c:o.normal.inv(e,0,1);const pt={EXC:(e,t)=>{var n;return _(e=j(w(e)),t=M(t))?c:t<1/((n=(e=e.sort((e,t)=>e-t)).length)+1)||1-1/(n+1)<t?f:O((t=t*(n+1)-1)===(n=Math.floor(t))?e[t]:e[n]+(t-n)*(e[n+1]-e[n]))},INC:(e,t)=>{var n;return _(e=j(w(e)),t=M(t))?c:O((t*=(e=e.sort((e,t)=>e-t)).length-1)===(n=Math.floor(t))?e[t]:e[n]+(t-n)*(e[n+1]-e[n]))}},mt={};function gt(e,t){return _(e=M(e),t=M(t))?c:mn(e)/mn(e-t)}function At(e,t){return _(e=M(e),t=M(t))?c:Math.pow(e,t)}function vt(e){return(e=M(e))instanceof Error?c:Math.exp(-.5*e*e)/2.5066282746310002}mt.EXC=(e,t,n)=>{if(n=void 0===n?3:n,_(e=j(w(e)),t=M(t),n=M(n)))return c;e=e.sort((e,t)=>e-t);var r=we.apply(null,e),i=e.length,o=r.length;n=Math.pow(10,n);let a=0,s=!1,u=0;for(;!s&&u<o;)t===r[u]?(a=(e.indexOf(r[u])+1)/(i+1),s=!0):t>=r[u]&&(t<r[u+1]||u===o-1)&&(a=(e.indexOf(r[u])+1+(t-r[u])/(r[u+1]-r[u]))/(i+1),s=!0),u++;return Math.floor(a*n)/n},mt.INC=(e,t,n)=>{if(n=void 0===n?3:n,_(e=j(w(e)),t=M(t),n=M(n)))return c;e=e.sort((e,t)=>e-t);var r=we.apply(null,e),i=e.length,o=r.length;n=Math.pow(10,n);let a=0,s=!1,u=0;for(;!s&&u<o;)t===r[u]?(a=e.indexOf(r[u])/(i-1),s=!0):t>=r[u]&&(t<r[u+1]||u===o-1)&&(a=(e.indexOf(r[u])+(t-r[u])/(r[u+1]-r[u]))/(i-1),s=!0),u++;return Math.floor(a*n)/n};const bt={};function yt(e,t,n,r){if(void 0===n)return 0;if(r=void 0===r?n:r,_(e=j(w(e)),t=j(w(t)),n=M(n),r=M(r)))return c;if(n===r)return 0<=e.indexOf(n)?t[e.indexOf(n)]:0;var i=e.sort((e,t)=>e-t),o=i.length;let a=0;for(let s=0;s<o;s++)i[s]>=n&&i[s]<=r&&(a+=t[e.indexOf(i[s])]);return a}bt.DIST=(e,t,n)=>_(e=M(e),t=M(t))?c:n?o.poisson.cdf(e,t):o.poisson.pdf(e,t);const wt={EXC:(e,t)=>{if(_(e=j(w(e)),t=M(t)))return c;switch(t){case 1:return pt.EXC(e,.25);case 2:return pt.EXC(e,.5);case 3:return pt.EXC(e,.75);default:return f}},INC:(e,t)=>{if(_(e=j(w(e)),t=M(t)))return c;switch(t){case 1:return pt.INC(e,.25);case 2:return pt.INC(e,.5);case 3:return pt.INC(e,.75);default:return f}}},xt={};function Ct(e,t){return 2!==arguments.length?d:t<0?f:e instanceof Array&&"number"==typeof t?0!==e.length?o.row(e,t):void 0:c}function kt(e,t){return _(e=j(w(e)),t=j(w(t)))?c:Math.pow(dt(e,t),2)}function Et(){var e=j(w(arguments));if(e instanceof Error)return e;var t=o.mean(e),n=e.length;let r=0;for(let i=0;i<n;i++)r+=Math.pow(e[i]-t,3);return n*r/((n-1)*(n-2)*Math.pow(o.stdev(e,!0),3))}function St(e,t){if(_(e=j(w(e)),t=j(w(t))))return c;var n=o.mean(t),r=o.mean(e),i=t.length;let a=0,s=0;for(let o=0;o<i;o++)a+=(t[o]-n)*(e[o]-r),s+=Math.pow(t[o]-n,2);return a/s}function _t(e,t){return _(e=j(w(e)),t=M(t))?e:e.sort((e,t)=>e-t)[t-1]}function Ot(e,t,n){return _(e=M(e),t=M(t),n=M(n))?c:(e-t)/n}xt.AVG=(e,t,n)=>{if(_(e=M(e),t=j(w(t))))return c;var r=(t=(t=w(t)).sort((n=n||!1)?(e,t)=>e-t:(e,t)=>t-e)).length;let i=0;for(let n=0;n<r;n++)t[n]===e&&i++;return 1<i?(2*t.indexOf(e)+i+1)/2:t.indexOf(e)+1},xt.EQ=(e,t,n)=>_(e=M(e),t=j(w(t)))?c:(t=t.sort((n=n||!1)?(e,t)=>e-t:(e,t)=>t-e)).indexOf(e)+1,Et.P=function(){var e=j(w(arguments));if(e instanceof Error)return e;var t=o.mean(e),n=e.length;let r=0,i=0;for(let o=0;o<n;o++)i+=Math.pow(e[o]-t,3),r+=Math.pow(e[o]-t,2);return i/=n,r/=n,i/Math.pow(r,1.5)};const Tt={};function Dt(){var e=Rt.apply(this,arguments);return Math.sqrt(e)}function Bt(){var e=Pt.apply(this,arguments);let t=Math.sqrt(e);return isNaN(t)?f:t}function It(e,t){if(_(e=j(w(e)),t=j(w(t))))return c;var n=o.mean(t),r=o.mean(e),i=t.length;let a=0,s=0,u=0;for(let o=0;o<i;o++)a+=Math.pow(e[o]-r,2),s+=(t[o]-n)*(e[o]-r),u+=Math.pow(t[o]-n,2);return Math.sqrt((a-s*s/u)/(i-2))}Tt.P=function(){var e=Ft.P.apply(this,arguments);let t=Math.sqrt(e);return isNaN(t)?f:t},Tt.S=function(){var e=Ft.S.apply(this,arguments);return Math.sqrt(e)};const Mt={};function jt(e,t,n){if(_(e=j(w(e)),t=j(w(t)),n=j(w(n))))return c;const r=(e=nt(e,t))[0],i=e[1],o=[];return n.forEach(e=>{o.push(r*e+i)}),o}function Nt(e,t){return _(e=j(w(e)),t=M(t))?c:(t=An(e.length*t,2)/2,o.mean((e=C(e.sort((e,t)=>e-t),t),t=(t=t)||1,e&&"function"==typeof e.slice?e.slice(0,e.length-t):e)))}Mt.DIST=(e,t,n)=>1!==n&&2!==n?f:1===n?Mt.DIST.RT(e,t):Mt.DIST["2T"](e,t),Mt.DIST["2T"]=function(e,t){return 2!==arguments.length?d:e<0||t<1?f:"number"!=typeof e||"number"!=typeof t?c:2*(1-o.studentt.cdf(e,t))},Mt.DIST.RT=function(e,t){return 2!==arguments.length?d:e<0||t<1?f:"number"!=typeof e||"number"!=typeof t?c:1-o.studentt.cdf(e,t)},Mt.INV=(e,t)=>_(e=M(e),t=M(t))?c:o.studentt.inv(e,t),Mt.INV["2T"]=(e,t)=>(e=M(e),t=M(t),e<=0||1<e||t<1?f:_(e,t)?c:Math.abs(o.studentt.inv(e/2,t))),Mt.TEST=(e,t)=>{if(_(e=j(w(e)),t=j(w(t))))return c;var n=o.mean(e),r=o.mean(t);let i,a=0,s=0;for(i=0;i<e.length;i++)a+=Math.pow(e[i]-n,2);for(i=0;i<t.length;i++)s+=Math.pow(t[i]-r,2);a/=e.length-1,s/=t.length-1;var u=Math.abs(n-r)/Math.sqrt(a/e.length+s/t.length);return Mt.DIST["2T"](u,e.length+t.length-2)};const Ft={};function Rt(){var e=w(arguments),t=e.length;let n=0,r=0;var i=Ee(e);for(let a=0;a<t;a++){var o=e[a];n+="number"==typeof o?Math.pow(o-i,2):!0===o?Math.pow(1-i,2):Math.pow(0-i,2),null!==o&&r++}return n/(r-1)}function Pt(){var e=w(arguments),t=e.length;let n=0,r=0;var i=Ee(e);let o;for(let o=0;o<t;o++){var a=e[o];n+="number"==typeof a?Math.pow(a-i,2):!0===a?Math.pow(1-i,2):Math.pow(0-i,2),null!==a&&r++}return o=n/r,isNaN(o)?f:o}Ft.P=function(){var e=T(w(arguments)),t=e.length;let n=0;var r=ke(e);let i;for(let i=0;i<t;i++)n+=Math.pow(e[i]-r,2);return i=n/t,isNaN(i)?f:i},Ft.S=function(){var e=T(w(arguments)),t=e.length;let n=0;var r=ke(e);for(let i=0;i<t;i++)n+=Math.pow(e[i]-r,2);return n/(t-1)};const Lt={DIST:(e,t,n,r)=>_(e=M(e),t=M(t),n=M(n))?c:r?1-Math.exp(-Math.pow(e/n,t)):Math.pow(e,t-1)*Math.exp(-Math.pow(e/n,t))*t/Math.pow(n,t)},Ut={};function zt(e){return(e=M(e))instanceof Error?e:Math.abs(e)}function Ht(e){if((e=M(e))instanceof Error)return e;let t=Math.acos(e);return isNaN(t)?f:t}function $t(e){if((e=M(e))instanceof Error)return e;let t=Math.log(e+Math.sqrt(e*e-1));return isNaN(t)?f:t}function Qt(e){return(e=M(e))instanceof Error?e:Math.atan(1/e)}function Vt(e){if((e=M(e))instanceof Error)return e;let t=.5*Math.log((e+1)/(e-1));return isNaN(t)?f:t}function qt(e,t,n,r){if(_(e=M(e),M(e)))return c;switch(e){case 1:return ke(n);case 2:return Me(n);case 3:return je(n);case 4:return ot(n);case 5:return ut(n);case 6:return Mn(n);case 7:return Tt.S(n);case 8:return Tt.P(n);case 9:return Xn(n);case 10:return Ft.S(n);case 11:return Ft.P(n);case 12:return st(n);case 13:return lt.SNGL(n);case 14:return tt(n,r);case 15:return _t(n,r);case 16:return pt.INC(n,r);case 17:return wt.INC(n,r);case 18:return pt.EXC(n,r);case 19:return wt.EXC(n,r)}}function Gt(e){if(null==e)return 0;if(e instanceof Error)return e;if(!/^M*(?:D?C{0,3}|C[MD])(?:L?X{0,3}|X[CL])(?:V?I{0,3}|I[XV])$/.test(e))return c;let t=0;return e.replace(/[MDLV]|C[MD]?|X[CL]?|I[XV]?/g,e=>{t+={M:1e3,CM:900,D:500,CD:400,C:100,XC:90,L:50,XL:40,X:10,IX:9,V:5,IV:4,I:1}[e]}),t}function Wt(e){if((e=M(e))instanceof Error)return e;let t=Math.asin(e);return isNaN(t)?f:t}function Kt(e){return(e=M(e))instanceof Error?e:Math.log(e+Math.sqrt(e*e+1))}function Yt(e){return(e=M(e))instanceof Error?e:Math.atan(e)}function Xt(e,t){return S(e=M(e),t=M(t))||Math.atan2(e,t)}function Jt(e){if((e=M(e))instanceof Error)return e;let t=Math.log((1+e)/(1-e))/2;return isNaN(t)?f:t}function Zt(e,t,n){var r=S(e=M(e),t=M(t),n=M(n));return r||(0===t?f:(r=e.toString(t),new Array(Math.max(n+1-r.length,0)).join("0")+r))}function en(e,t,n){var r=S(e=M(e),t=M(t),n=M(n));return r||(0===t?0:(t=Math.abs(t),r=-Math.floor(Math.log(t)/Math.log(10)),0<=e?Ln(Math.ceil(e/t)*t,r):0===n?-Ln(Math.floor(Math.abs(e)/t)*t,r):-Ln(Math.ceil(Math.abs(e)/t)*t,r)))}function tn(e,t){return S(e=M(e),t=M(t))||(e<t?f:mn(e)/(mn(t)*mn(e-t)))}function nn(e,t){return S(e=M(e),t=M(t))||(e<t?f:0===e&&0===t?1:tn(e+t-1,e-1))}function rn(e){return(e=M(e))instanceof Error?e:Math.cos(e)}function on(e){return(e=M(e))instanceof Error?e:(Math.exp(e)+Math.exp(-e))/2}function an(e){return(e=M(e))instanceof Error?e:0===e?u:1/Math.tan(e)}function sn(e){return(e=M(e))instanceof Error?e:0===e?u:((e=Math.exp(2*e))+1)/(e-1)}function un(e){return(e=M(e))instanceof Error?e:0===e?u:1/Math.sin(e)}function cn(e){return(e=M(e))instanceof Error?e:0===e?u:2/(Math.exp(e)-Math.exp(-e))}function ln(e,t){return arguments.length<1?c:S(e=M(e),t=M(t))||(0===t?f:parseInt(e,t))}function hn(e){return(e=M(e))instanceof Error?e:180*e/Math.PI}function fn(e){return(e=M(e))instanceof Error?e:en(e,-2,-1)}function dn(e){return arguments.length<1?d:1<arguments.length?p:(e=M(e))instanceof Error?e:Math.exp(e)}Ut.TEST=(e,t,n)=>{if(_(e=j(w(e)),t=M(t)))return c;n=n||Tt.S(e);var r=e.length;return 1-ft.S.DIST((ke(e)-t)/(n/Math.sqrt(r)),!0)},(en.MATH=en).PRECISE=en;const pn=[];function mn(e){return(e=M(e))instanceof Error?e:0===(e=Math.floor(e))||1===e?1:(0<pn[e]||(pn[e]=mn(e-1)*e),pn[e])}function gn(e){return(e=M(e))instanceof Error?e:(e=Math.floor(e))<=0?1:e*gn(e-2)}function An(e,t){var n=S(e=M(e),t=M(t));return n||(0===t?0:0<=e&&0<t||e<=0&&t<0?(t=Math.abs(t),n=-Math.floor(Math.log(t)/Math.log(10)),0<=e?Ln(Math.floor(e/t)*t,n):-Ln(Math.ceil(Math.abs(e)/t),n)):f)}function vn(){var e=j(w(arguments));if(e instanceof Error)return e;var t=e.length,n=e[0];let r=n<0?-n:n;for(let n=1;n<t;n++){var i=e[n];let t=i<0?-i:i;for(;r&&t;)r>t?r%=t:t%=r;r+=t}return r}function bn(e){return(e=M(e))instanceof Error?e:Math.floor(e)}An.PRECISE=An.MATH=(e,t,n)=>{if(t instanceof Error)return t;t=void 0===t?0:t;var r=S(e=M(e),t=M(t),n=M(n));return r||(0===t?0:(t=t?Math.abs(t):1,r=-Math.floor(Math.log(t)/Math.log(10)),0<=e?Ln(Math.floor(e/t)*t,r):0===n||void 0===n?-Ln(Math.ceil(Math.abs(e)/t)*t,r):-Ln(Math.floor(Math.abs(e)/t)*t,r)))};const yn={CEILING:en};function wn(){const e=j(w(arguments));if(e instanceof Error)return e;for(var t,n,r,i,o=1;void 0!==(r=e.pop());){if(0===r)return 0;for(;1<r;){if(r%2){for(t=3,n=Math.floor(Math.sqrt(r));t<=n&&r%t;t+=2);i=t<=n?t:r}else i=2;for(r/=i,o*=i,t=e.length;t;e[--t]%i==0&&1==(e[t]/=i)&&e.splice(t,1));}}return o}function xn(e){return(e=M(e))instanceof Error?e:0===e?f:Math.log(e)}function Cn(e,t){return S(e=M(e),t=M(t))||(0===e||0===t?f:Math.log(e)/Math.log(t))}function kn(e){return(e=M(e))instanceof Error?e:0===e?f:Math.log(e)/Math.log(10)}function En(e,t){if(!Array.isArray(e)||!Array.isArray(t)||e.some(e=>!e.length)||t.some(e=>!e.length)||x(e).some(e=>"number"!=typeof e)||x(t).some(e=>"number"!=typeof e)||e[0].length!==t.length)return c;return Array(e.length).fill(0).map(()=>Array(t[0].length).fill(0)).map((n,r)=>n.map((n,i)=>e[r].reduce((e,n,r)=>e+n*t[r][i],0)))}function Sn(e,t){var n=S(e=M(e),t=M(t));if(n)return n;if(0===t)return u;let r=Math.abs(e%t);return r=e<0?t-r:r,0<t?r:-r}function _n(e,t){return S(e=M(e),t=M(t))||(e*t==0?0:e*t<0?f:Math.round(e/t)*t)}function On(){var e=j(w(arguments));if(e instanceof Error)return e;let t=0,n=1;for(let r=0;r<e.length;r++)t+=e[r],n*=mn(e[r]);return mn(t)/n}function Tn(e){return 1<arguments.length?d:!(e=parseInt(e))||e<=0?c:Array(e).fill(0).map(()=>Array(e).fill(0)).map((e,t)=>(e[t]=1,e))}function Dn(e){if((e=M(e))instanceof Error)return e;let t=Math.ceil(Math.abs(e));return t=1&t?t:t+1,0<=e?t:-t}function Bn(){return Math.PI}function In(e,t){var n=S(e=M(e),t=M(t));return n||(0===e&&0===t||(n=Math.pow(e,t),isNaN(n))?f:n)}function Mn(){const e=w(arguments);var t=e.filter(e=>null!=e);if(0===t.length)return 0;var n=j(t);if(n instanceof Error)return n;let r=1;for(let e=0;e<n.length;e++)r*=n[e];return r}function jn(e,t){return S(e=M(e),t=M(t))||parseInt(e/t,10)}function Nn(e){return(e=M(e))instanceof Error?e:e*Math.PI/180}function Fn(){return Math.random()}function Rn(e,t){return S(e=M(e),t=M(t))||e+Math.ceil((t-e+1)*Math.random())-1}function Pn(e){if((e=M(e))instanceof Error)return e;const t=String(e).split("");var n=["","C","CC","CCC","CD","D","DC","DCC","DCCC","CM","","X","XX","XXX","XL","L","LX","LXX","LXXX","XC","","I","II","III","IV","V","VI","VII","VIII","IX"];let r="",i=3;for(;i--;)r=(n[+t.pop()+10*i]||"")+r;return new Array(+t.join("")+1).join("M")+r}function Ln(e,t){return S(e=M(e),t=M(t))||Number(Math.round(Number(e+"e"+t))+"e"+-1*t)}function Un(e,t){return S(e=M(e),t=M(t))||(0<e?1:-1)*Math.floor(Math.abs(e)*Math.pow(10,t))/Math.pow(10,t)}function zn(e,t){return S(e=M(e),t=M(t))||(0<e?1:-1)*Math.ceil(Math.abs(e)*Math.pow(10,t))/Math.pow(10,t)}function Hn(e){return(e=M(e))instanceof Error?e:1/Math.cos(e)}function $n(e){return(e=M(e))instanceof Error?e:2/(Math.exp(e)+Math.exp(-e))}function Qn(e,t,n,r){if(_(e=M(e),t=M(t),n=M(n),r=j(r)))return c;let i=r[0]*Math.pow(e,t);for(let o=1;o<r.length;o++)i+=r[o]*Math.pow(e,t+o*n);return i}function Vn(e){return(e=M(e))instanceof Error?e:e<0?-1:0===e?0:1}function qn(e){return(e=M(e))instanceof Error?e:Math.sin(e)}function Gn(e){return(e=M(e))instanceof Error?e:(Math.exp(e)-Math.exp(-e))/2}function Wn(e){return(e=M(e))instanceof Error?e:e<0?f:Math.sqrt(e)}function Kn(e){return(e=M(e))instanceof Error?e:Math.sqrt(e*Math.PI)}function Yn(e,t){if((e=M(e))instanceof Error)return e;switch(e){case 1:return ke(t);case 2:return Me(t);case 3:return je(t);case 4:return ot(t);case 5:return ut(t);case 6:return Mn(t);case 7:return Tt.S(t);case 8:return Tt.P(t);case 9:return Xn(t);case 10:return Ft.S(t);case 11:return Ft.P(t);case 101:return ke(t);case 102:return Me(t);case 103:return je(t);case 104:return ot(t);case 105:return ut(t);case 106:return Mn(t);case 107:return Tt.S(t);case 108:return Tt.P(t);case 109:return Xn(t);case 110:return Ft.S(t);case 111:return Ft.P(t)}}function Xn(){let e=0;return v(A(arguments),t=>{if(e instanceof Error)return!1;var n;t instanceof Error?e=t:"number"==typeof t?e+=t:"string"==typeof t?(n=parseFloat(t),isNaN(n)||(e+=n)):Array.isArray(t)&&((n=Xn.apply(null,t))instanceof Error?e=n:e+=n)}),e}function Jn(e,t,n){if(e=w(e),n=n?w(n):e,e instanceof Error)return e;if(null==t||t instanceof Error)return 0;let r=0;var i="*"===t,o=i?null:$(t+"");for(let t=0;t<e.length;t++){var a=e[t],s=n[t];i?r+=a:(a=[H(a,z)].concat(o),r+=Q(a)?s:0)}return r}function Zn(){const e=A(arguments);var t=j(w(e.shift()));if(t instanceof Error)return t;const n=e;var r=n.length/2;for(let e=0;e<r;e++)n[2*e]=w(n[2*e]);let i=0;for(let e=0;e<t.length;e++){let s=!1;for(let t=0;t<r;t++){var o=n[2*t][e],a=n[2*t+1];let r=!1;if(!(r=void 0===a||"*"===a||(a=$(a+""),o=[H(o,z)].concat(a),Q(o)))){s=!1;break}s=!0}s&&(i+=t[e])}return i}function er(){if(!arguments||0===arguments.length)return c;var e=arguments.length+1;let t,n,r=0;for(let a=0;a<arguments[0].length;a++)if(arguments[0][a]instanceof Array)for(let o=0;o<arguments[0][a].length;o++){for(t=1,n=1;n<e;n++){var i=arguments[n-1][a][o];if(i instanceof Error)return i;if((i=M(i))instanceof Error)return i;t*=i}r+=t}else{for(t=1,n=1;n<e;n++){var o=arguments[n-1][a];if(o instanceof Error)return o;if((o=M(o))instanceof Error)return o;t*=o}r+=t}return r}function tr(){var e=j(w(arguments));if(e instanceof Error)return e;let t=0;var n=e.length;for(let r=0;r<n;r++)t+=ne(e[r])?e[r]*e[r]:0;return t}function nr(e,t){if(_(e=j(w(e)),t=j(w(t))))return c;let n=0;for(let r=0;r<e.length;r++)n+=e[r]*e[r]-t[r]*t[r];return n}function rr(e,t){if(_(e=j(w(e)),t=j(w(t))))return c;let n=0;e=j(w(e)),t=j(w(t));for(let r=0;r<e.length;r++)n+=e[r]*e[r]+t[r]*t[r];return n}function ir(e,t){if(_(e=j(w(e)),t=j(w(t))))return c;let n=0;e=w(e),t=w(t);for(let r=0;r<e.length;r++)n+=Math.pow(e[r]-t[r],2);return n}function or(e){return(e=M(e))instanceof Error?e:Math.tan(e)}function ar(e){return(e=M(e))instanceof Error?e:((e=Math.exp(2*e))-1)/(e+1)}function sr(e,t){return S(e=M(e),t=M(t))||(0<e?1:-1)*Math.floor(Math.abs(e)*Math.pow(10,t))/Math.pow(10,t)}var ur=Object.freeze({__proto__:null,ADD:function(e,t){return 2!==arguments.length?d:S(e=M(e),t=M(t))||e+t},DIVIDE:function(e,t){return 2!==arguments.length?d:S(e=M(e),t=M(t))||(0===t?u:e/t)},EQ:function(e,t){return 2!==arguments.length?d:e instanceof Error?e:t instanceof Error?t:(e=null===e?void 0:e)===(t=null===t?void 0:t)},GT:function(e,t){if(2!==arguments.length)return d;if(e instanceof Error)return e;if(t instanceof Error)return t;t=(F(e,t)?(e=N(e),N):(e=M(e),M))(t);var n=S(e,t);return n||t<e},GTE:function(e,t){if(2!==arguments.length)return d;t=(F(e,t)?(e=N(e),N):(e=M(e),M))(t);var n=S(e,t);return n||t<=e},LT:function(e,t){if(2!==arguments.length)return d;t=(F(e,t)?(e=N(e),N):(e=M(e),M))(t);var n=S(e,t);return n||e<t},LTE:function(e,t){if(2!==arguments.length)return d;t=(F(e,t)?(e=N(e),N):(e=M(e),M))(t);var n=S(e,t);return n||e<=t},MINUS:function(e,t){return 2!==arguments.length?d:S(e=M(e),t=M(t))||e-t},MULTIPLY:function(e,t){return 2!==arguments.length?d:S(e=M(e),t=M(t))||e*t},NE:function(e,t){return 2!==arguments.length?d:e instanceof Error?e:t instanceof Error?t:(e=null===e?void 0:e)!==(t=null===t?void 0:t)},POW:function(e,t){return 2!==arguments.length?d:In(e,t)}});const cr=new Date(Date.UTC(1900,0,1)),lr=[void 0,0,1,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,1,2,3,4,5,6,0],hr=[[],[1,2,3,4,5,6,7],[7,1,2,3,4,5,6],[6,0,1,2,3,4,5],[],[],[],[],[],[],[],[7,1,2,3,4,5,6],[6,7,1,2,3,4,5],[5,6,7,1,2,3,4],[4,5,6,7,1,2,3],[3,4,5,6,7,1,2],[2,3,4,5,6,7,1],[1,2,3,4,5,6,7]],fr=[[],[6,0],[0,1],[1,2],[2,3],[3,4],[4,5],[5,6],void 0,void 0,void 0,[0,0],[1,1],[2,2],[3,3],[4,4],[5,5],[6,6]];function dr(e,t,n){let r;return _(e=M(e),t=M(t),n=M(n))?r=c:(r=new Date(e,t-1,n)).getFullYear()<0&&(r=f),r}function pr(e,t,n){n=n.toUpperCase(),e=B(e),t=B(t);var r=e.getFullYear(),i=e.getMonth(),o=e.getDate(),a=t.getFullYear(),s=t.getMonth(),u=t.getDate();let c;switch(n){case"Y":c=Math.floor(Pr(e,t));break;case"D":c=vr(t,e);break;case"M":c=s-i+12*(a-r),u<o&&c--;break;case"MD":c=o<=u?u-o:(0===s?(e.setFullYear(a-1),e.setMonth(12)):(e.setFullYear(a),e.setMonth(s-1)),vr(t,e));break;case"YM":c=s-i+12*(a-r),u<o&&c--,c%=12;break;case"YD":i<s||s===i&&u<o?e.setFullYear(a):e.setFullYear(a-1),c=vr(t,e)}return c}function mr(e){var t;return"string"!=typeof e||(t=Date.parse(e),isNaN(t))?c:new Date(e)}function gr(e){const t=B(e);return t instanceof Error?t:t.getDate()}function Ar(e){const t=new Date(e);return t.setHours(0,0,0,0),t}function vr(e,t){return e=B(e),t=B(t),e instanceof Error?e:t instanceof Error?t:Lr(Ar(e))-Lr(Ar(t))}function br(e,t,n){if(n=D(n||"false"),e=B(e),t=B(t),e instanceof Error)return e;if(t instanceof Error)return t;if(n instanceof Error)return n;var r,i=e.getMonth();let o,a,s=t.getMonth();return a=n?(o=31===e.getDate()?30:e.getDate(),31===t.getDate()?30:t.getDate()):(n=new Date(e.getFullYear(),i+1,0).getDate(),r=new Date(t.getFullYear(),s+1,0).getDate(),o=e.getDate()===n?30:e.getDate(),t.getDate()===r?o<30?(s++,1):30:t.getDate()),360*(t.getFullYear()-e.getFullYear())+30*(s-i)+(a-o)}function yr(e,t){if(!((e=B(e))instanceof Error)){if(isNaN(t))return c;t=parseInt(t,10),e.setMonth(e.getMonth()+t)}return e}function wr(e,t){return(e=B(e))instanceof Error?e:isNaN(t)?c:(t=parseInt(t,10),new Date(e.getFullYear(),e.getMonth()+t+1,0))}function xr(e){return(e=B(e))instanceof Error?e:e.getHours()}function Cr(e){if((e=B(e))instanceof Error)return e;(e=Ar(e)).setDate(e.getDate()+4-(e.getDay()||7));var t=new Date(e.getFullYear(),0,1);return Math.ceil(((e-t)/864e5+1)/7)}function kr(e){return(e=B(e))instanceof Error?e:e.getMinutes()}function Er(e){return(e=B(e))instanceof Error?e:e.getMonth()+1}function Sr(e,t,n){return Sr.INTL(e,t,1,n)}function _r(){return new Date}function Or(e){return(e=B(e))instanceof Error?e:e.getSeconds()}function Tr(e,t,n){return _(e=M(e),t=M(t),n=M(n))?c:e<0||t<0||n<0?f:(3600*e+60*t+n)/86400}function Dr(e){return(e=B(e))instanceof Error?e:(3600*e.getHours()+60*e.getMinutes()+e.getSeconds())/86400}function Br(){return Ar(new Date)}function Ir(e,t){return(e=B(e))instanceof Error?e:(void 0===t&&(t=1),e=e.getDay(),hr[t][e])}function Mr(e,t){if((e=B(e))instanceof Error)return e;if(21===(t=void 0===t?1:t))return Cr(e);t=lr[t];let n=new Date(e.getFullYear(),0,1);var r=n.getDay()<t?1:0;return n-=24*Math.abs(n.getDay()-t)*60*60*1e3,Math.floor((e-n)/864e5/7+1)+r}function jr(e,t,n){return jr.INTL(e,t,1,n)}function Nr(e){return(e=B(e))instanceof Error?e:e.getFullYear()}function Fr(e){return 1===new Date(e,1,29).getMonth()}function Rr(e,t){return Math.ceil((t-e)/1e3/60/60/24)}function Pr(e,t,n){if((e=B(e))instanceof Error)return e;if((t=B(t))instanceof Error)return t;n=n||0;let r=e.getDate();var i=e.getMonth()+1,o=e.getFullYear();let a=t.getDate();var s,u,c=t.getMonth()+1,l=t.getFullYear();switch(n){case 0:return 31===r&&31===a?(r=30,a=30):31===r?r=30:30===r&&31===a&&(a=30),(a+30*c+360*l-(r+30*i+360*o))/360;case 1:{var h,f;let n=365;return o===l||o+1===l&&(c<i||i===c&&r>=a)?((o===l&&Fr(o)||(f=t,h=(s=e).getFullYear(),u=new Date(h,2,1),!!(Fr(h)&&s<u&&u<=f)||(h=f.getFullYear(),u=new Date(h,2,1),Fr(h)&&u<=f&&s<u))||1===c&&29===a)&&(n=366),Rr(e,t)/n):(h=l-o+1,f=(new Date(l+1,0,1)-new Date(o,0,1))/1e3/60/60/24/h,Rr(e,t)/f)}case 2:return Rr(e,t)/360;case 3:return Rr(e,t)/365;case 4:return(a+30*c+360*l-(r+30*i+360*o))/360}}function Lr(e){var t=-22038912e5<e?2:1;return Math.ceil((e-cr)/864e5)+t}function Ur(){throw new Error("ASC is not implemented")}function zr(){throw new Error("BAHTTEXT is not implemented")}function Hr(e){return 0===(e=M(e))?c:e instanceof Error?e:String.fromCharCode(e)}function $r(e){return _(e)?e:(e=e||"").replace(/[\0-\x1F]/g,"")}function Qr(e){if(_(e))return e;let t=(e=e||"").charCodeAt(0);return isNaN(t)?c:t}function Vr(){const e=w(arguments);var t,n,r=S.apply(void 0,e);if(r)return r;for(;-1<(t=e.indexOf(!0));)e[t]="TRUE";for(;-1<(n=e.indexOf(!1));)e[n]="FALSE";return e.join("")}Sr.INTL=(e,t,n,r)=>{if((e=B(e))instanceof Error)return e;if((t=B(t))instanceof Error)return t;let i=!1;const o=[];var a=[1,2,3,4,5,6,0];const s=new RegExp("^[0|1]{7}$");if(void 0===n)n=fr[1];else if("string"==typeof n&&s.test(n)){i=!0,n=n.split("");for(let e=0;e<n.length;e++)"1"===n[e]&&o.push(a[e])}else n=fr[n];if(!(n instanceof Array))return c;void 0===r?r=[]:r instanceof Array||(r=[r]);for(let e=0;e<r.length;e++){var u=B(r[e]);if(u instanceof Error)return u;r[e]=u}var l=Math.round((t-e)/864e5)+1;let h=l;const f=e;for(let e=0;e<l;e++){var d=0<(new Date).getTimezoneOffset()?f.getUTCDay():f.getDay();let e=i?o.includes(d):d===n[0]||d===n[1];for(let t=0;t<r.length;t++){const n=r[t];if(n.getDate()===f.getDate()&&n.getMonth()===f.getMonth()&&n.getFullYear()===f.getFullYear()){e=!0;break}}e&&h--,f.setDate(f.getDate()+1)}return h},jr.INTL=(e,t,n,r)=>{if(!((e=B(e))instanceof Error)){if((t=M(t))instanceof Error)return t;if(t<0)return f;if(!((n=void 0===n?fr[1]:fr[n])instanceof Array))return c;void 0===r?r=[]:r instanceof Array||(r=[r]);for(let e=0;e<r.length;e++){var i=B(r[e]);if(i instanceof Error)return i;r[e]=i}let a=0;for(;a<t;){e.setDate(e.getDate()+1);var o=e.getDay();if(o!==n[0]&&o!==n[1]){for(let t=0;t<r.length;t++){const n=r[t];if(n.getDate()===e.getDate()&&n.getMonth()===e.getMonth()&&n.getFullYear()===e.getFullYear()){a--;break}}a++}}}return e};const qr=Vr;function Gr(){throw new Error("DBCS is not implemented")}function Wr(e,t=2){if(e=M(e),isNaN(e))return c;const n=(e=Ln(e,t)).toLocaleString("en-US",{style:"currency",currency:"USD",minimumFractionDigits:0<=t?t:0,maximumFractionDigits:0<=t?t:0});return e<0?"$("+n.slice(2)+")":n}function Kr(e,t){return 2!==arguments.length?d:S(e,t)||(e=N(e))===(t=N(t))}function Yr(e,t,n){return arguments.length<2?d:(e=N(e),-1===(t=(t=N(t)).indexOf(e,(n=void 0===n?0:n)-1))?c:t+1)}function Xr(e,t=2,n=!1){if(e=M(e),isNaN(e))return c;if(t=M(t),isNaN(t))return c;var r;if(e=t<0?(r=Math.pow(10,-t),Math.round(e/r)*r):e.toFixed(t),n)e=e.toString().replace(/,/g,"");else{const t=e.toString().split(".");t[0]=t[0].replace(/\B(?=(\d{3})+$)/g,","),e=t.join(".")}return e}function Jr(e,t){return S(e,t)||(e=N(e),(t=M(t=void 0===t?1:t))instanceof Error||"string"!=typeof e?c:e.substring(0,t))}function Zr(e){return 0===arguments.length?p:e instanceof Error?e:Array.isArray(e)?c:N(e).length}function ei(e){return 1!==arguments.length?c:_(e=N(e))?e:e.toLowerCase()}function ti(e,t,n){return null==t?c:_(t=M(t),n=M(n))||"string"!=typeof e?n:e.substring(e=t-1,e+n)}function ni(e,t,n){return"number"==typeof(e=R(e)?e:"")?e:"string"!=typeof e?d:(t=void 0===t?".":t,n=void 0===n?",":n,Number(e.replace(t,".").replace(n,"")))}function ri(){throw new Error("PRONETIC is not implemented")}function ii(e){return _(e)?e:isNaN(e)&&"number"==typeof e?c:(e=N(e)).replace(/\w\S*/g,e=>e.charAt(0).toUpperCase()+e.substr(1).toLowerCase())}function oi(e,t,n,r){return _(t=M(t),n=M(n))||"string"!=typeof e||"string"!=typeof r?c:e.substr(0,t-1)+r+e.substr(t-1+n)}function ai(e,t){return S(e,t)||(e=N(e),(t=M(t))instanceof Error?t:new Array(t+1).join(e))}function si(e,t){return S(e,t)||(e=N(e),(t=M(t=void 0===t?1:t))instanceof Error?t:e.substring(e.length-t))}function ui(e,t,n){return"string"!=typeof e||"string"!=typeof t||(n=void 0===n?0:n,0===(t=t.toLowerCase().indexOf(e.toLowerCase(),n-1)+1))?c:t}function ci(e,t,n,r){if(arguments.length<3)return d;if(e&&t){if(void 0===r)return e.split(t).join(n);{if(r=Math.floor(Number(r)),Number.isNaN(r)||r<=0)return c;let i=0,o=0;for(;-1<i&&-1<e.indexOf(t,i);)if(i=e.indexOf(t,i+1),o++,-1<i&&o===r)return e.substring(0,i)+n+e.substring(i+t.length)}}return e}function li(e){return e instanceof Error||"string"==typeof e?e:""}function hi(e,t){var n,r;return void 0===e||e instanceof Error||t instanceof Error?d:null==t?"":"number"==typeof t?String(t):"string"!=typeof t?c:(n=t.startsWith("$")?"$":"",(r=t.endsWith("%"))&&(e*=100),e=(e=Xr(e,(t=t.replace(/%/g,"").replace(/\$/g,"")).split(".")[1].match(/0/g).length,!t.includes(","))).startsWith("-")?"-"+n+(e=e.replace("-","")):n+e,r&&(e+="%"),e)}function fi(e,t,...n){if("boolean"!=typeof t&&(t=D(t)),arguments.length<3)return d;e=null!=e?e:"";let r=w(n),i=t?r.filter(e=>e):r;if(Array.isArray(e)){e=w(e);let t=i.map(e=>[e]),n=0;for(let r=0;r<t.length-1;r++)t[r].push(e[n]),++n===e.length&&(n=0);return(i=w(t)).join("")}return i.join(e)}function di(e){return(e=N(e))instanceof Error?e:e.replace(/\s+/g," ").trim()}const pi=Hr,mi=Qr;function gi(e){return(e=N(e))instanceof Error?e:e.toUpperCase()}function Ai(e){var t=S(e);if(t)return t;if("number"==typeof e)return e;if("string"!=typeof(e=R(e)?e:""))return c;if(t=/(%)$/.test(e)||/^(%)/.test(e),""===(e=(e=(e=e.replace(/^[^0-9-]{0,3}/,"")).replace(/[^0-9]{0,3}$/,"")).replace(/[ ,]/g,"")))return 0;let n=Number(e);return isNaN(n)?c:(n=n||0,t&&(n*=.01),n)}function vi(e){return/^[01]{1,10}$/.test(e)}function bi(e,t){return _(e=M(e),t=M(t))?c:a.besseli(e,t)}function yi(e,t){return _(e=M(e),t=M(t))?c:a.besselj(e,t)}function wi(e,t){return _(e=M(e),t=M(t))?c:a.besselk(e,t)}function xi(e,t){return _(e=M(e),t=M(t))?c:a.bessely(e,t)}function Ci(e){if(!vi(e))return f;var t=parseInt(e,2);const n=e.toString();return 10===n.length&&"1"===n.substring(0,1)?parseInt(n.substring(1),2)-512:t}function ki(e,t){if(!vi(e))return f;const n=e.toString();return 10===n.length&&"1"===n.substring(0,1)?(0xfffffffe00+parseInt(n.substring(1),2)).toString(16):(e=parseInt(e,2).toString(16),void 0===t?e:isNaN(t)?c:!(t<0)&&(t=Math.floor(t))>=e.length?ai("0",t-e.length)+e:f)}function Ei(e,t){if(!vi(e))return f;const n=e.toString();return 10===n.length&&"1"===n.substring(0,1)?(1073741312+parseInt(n.substring(1),2)).toString(8):(e=parseInt(e,2).toString(8),void 0===t?e:isNaN(t)?c:!(t<0)&&(t=Math.floor(t))>=e.length?ai("0",t-e.length)+e:f)}function Si(e,t){return _(e=M(e),t=M(t))?c:e<0||t<0||Math.floor(e)!==e||Math.floor(t)!==t||0xffffffffffff<e||0xffffffffffff<t?f:e&t}function _i(e,t){return _(e=M(e),t=M(t))?c:e<0||Math.floor(e)!==e||0xffffffffffff<e||53<Math.abs(t)?f:0<=t?e<<t:e>>-t}function Oi(e,t){return _(e=M(e),t=M(t))?c:e<0||t<0||Math.floor(e)!==e||Math.floor(t)!==t||0xffffffffffff<e||0xffffffffffff<t?f:e|t}function Ti(e,t){return _(e=M(e),t=M(t))?c:e<0||Math.floor(e)!==e||0xffffffffffff<e||53<Math.abs(t)?f:0<=t?e>>t:e<<-t}function Di(e,t){return _(e=M(e),t=M(t))?c:e<0||t<0||Math.floor(e)!==e||Math.floor(t)!==t||0xffffffffffff<e||0xffffffffffff<t?f:e^t}function Bi(e,t,n){var r;return _(e=M(e),t=M(t))?e:"i"!==(n=void 0===n?"i":n)&&"j"!==n?c:0===e&&0===t?0:0===e?1===t?n:t.toString()+n:0===t?e.toString():(r=0<t?"+":"",e.toString()+r+(1===t?n:t.toString()+n))}function Ii(e,t,n){if((e=M(e))instanceof Error)return e;var r=[["a.u. of action","?",null,"action",!1,!1,105457168181818e-48],["a.u. of charge","e",null,"electric_charge",!1,!1,160217653141414e-33],["a.u. of energy","Eh",null,"energy",!1,!1,435974417757576e-32],["a.u. of length","a?",null,"length",!1,!1,529177210818182e-25],["a.u. of mass","m?",null,"mass",!1,!1,910938261616162e-45],["a.u. of time","?/Eh",null,"time",!1,!1,241888432650516e-31],["admiralty knot","admkn",null,"speed",!1,!0,.514773333],["ampere","A",null,"electric_current",!0,!1,1],["ampere per meter","A/m",null,"magnetic_field_intensity",!0,!1,1],["ångström","Å",["ang"],"length",!1,!0,1e-10],["are","ar",null,"area",!1,!0,100],["astronomical unit","ua",null,"length",!1,!1,149597870691667e-25],["bar","bar",null,"pressure",!1,!1,1e5],["barn","b",null,"area",!1,!1,1e-28],["becquerel","Bq",null,"radioactivity",!0,!1,1],["bit","bit",["b"],"information",!1,!0,1],["btu","BTU",["btu"],"energy",!1,!0,1055.05585262],["byte","byte",null,"information",!1,!0,8],["candela","cd",null,"luminous_intensity",!0,!1,1],["candela per square metre","cd/m?",null,"luminance",!0,!1,1],["coulomb","C",null,"electric_charge",!0,!1,1],["cubic ångström","ang3",["ang^3"],"volume",!1,!0,1e-30],["cubic foot","ft3",["ft^3"],"volume",!1,!0,.028316846592],["cubic inch","in3",["in^3"],"volume",!1,!0,16387064e-12],["cubic light-year","ly3",["ly^3"],"volume",!1,!0,846786664623715e-61],["cubic metre","m?",null,"volume",!0,!0,1],["cubic mile","mi3",["mi^3"],"volume",!1,!0,4168181825.44058],["cubic nautical mile","Nmi3",["Nmi^3"],"volume",!1,!0,6352182208],["cubic Pica","Pica3",["Picapt3","Pica^3","Picapt^3"],"volume",!1,!0,7.58660370370369e-8],["cubic yard","yd3",["yd^3"],"volume",!1,!0,.764554857984],["cup","cup",null,"volume",!1,!0,.0002365882365],["dalton","Da",["u"],"mass",!1,!1,166053886282828e-41],["day","d",["day"],"time",!1,!0,86400],["degree","°",null,"angle",!1,!1,.0174532925199433],["degrees Rankine","Rank",null,"temperature",!1,!0,.555555555555556],["dyne","dyn",["dy"],"force",!1,!0,1e-5],["electronvolt","eV",["ev"],"energy",!1,!0,1.60217656514141],["ell","ell",null,"length",!1,!0,1.143],["erg","erg",["e"],"energy",!1,!0,1e-7],["farad","F",null,"electric_capacitance",!0,!1,1],["fluid ounce","oz",null,"volume",!1,!0,295735295625e-16],["foot","ft",null,"length",!1,!0,.3048],["foot-pound","flb",null,"energy",!1,!0,1.3558179483314],["gal","Gal",null,"acceleration",!1,!1,.01],["gallon","gal",null,"volume",!1,!0,.003785411784],["gauss","G",["ga"],"magnetic_flux_density",!1,!0,1],["grain","grain",null,"mass",!1,!0,647989e-10],["gram","g",null,"mass",!1,!0,.001],["gray","Gy",null,"absorbed_dose",!0,!1,1],["gross registered ton","GRT",["regton"],"volume",!1,!0,2.8316846592],["hectare","ha",null,"area",!1,!0,1e4],["henry","H",null,"inductance",!0,!1,1],["hertz","Hz",null,"frequency",!0,!1,1],["horsepower","HP",["h"],"power",!1,!0,745.69987158227],["horsepower-hour","HPh",["hh","hph"],"energy",!1,!0,2684519.538],["hour","h",["hr"],"time",!1,!0,3600],["imperial gallon (U.K.)","uk_gal",null,"volume",!1,!0,.00454609],["imperial hundredweight","lcwt",["uk_cwt","hweight"],"mass",!1,!0,50.802345],["imperial quart (U.K)","uk_qt",null,"volume",!1,!0,.0011365225],["imperial ton","brton",["uk_ton","LTON"],"mass",!1,!0,1016.046909],["inch","in",null,"length",!1,!0,.0254],["international acre","uk_acre",null,"area",!1,!0,4046.8564224],["IT calorie","cal",null,"energy",!1,!0,4.1868],["joule","J",null,"energy",!0,!0,1],["katal","kat",null,"catalytic_activity",!0,!1,1],["kelvin","K",["kel"],"temperature",!0,!0,1],["kilogram","kg",null,"mass",!0,!0,1],["knot","kn",null,"speed",!1,!0,.514444444444444],["light-year","ly",null,"length",!1,!0,9460730472580800],["litre","L",["l","lt"],"volume",!1,!0,.001],["lumen","lm",null,"luminous_flux",!0,!1,1],["lux","lx",null,"illuminance",!0,!1,1],["maxwell","Mx",null,"magnetic_flux",!1,!1,1e-18],["measurement ton","MTON",null,"volume",!1,!0,1.13267386368],["meter per hour","m/h",["m/hr"],"speed",!1,!0,.00027777777777778],["meter per second","m/s",["m/sec"],"speed",!0,!0,1],["meter per second squared","m?s??",null,"acceleration",!0,!1,1],["parsec","pc",["parsec"],"length",!1,!0,0x6da012f958ee1c],["meter squared per second","m?/s",null,"kinematic_viscosity",!0,!1,1],["metre","m",null,"length",!0,!0,1],["miles per hour","mph",null,"speed",!1,!0,.44704],["millimetre of mercury","mmHg",null,"pressure",!1,!1,133.322],["minute","?",null,"angle",!1,!1,.000290888208665722],["minute","min",["mn"],"time",!1,!0,60],["modern teaspoon","tspm",null,"volume",!1,!0,5e-6],["mole","mol",null,"amount_of_substance",!0,!1,1],["morgen","Morgen",null,"area",!1,!0,2500],["n.u. of action","?",null,"action",!1,!1,105457168181818e-48],["n.u. of mass","m?",null,"mass",!1,!1,910938261616162e-45],["n.u. of speed","c?",null,"speed",!1,!1,299792458],["n.u. of time","?/(me?c??)",null,"time",!1,!1,128808866778687e-35],["nautical mile","M",["Nmi"],"length",!1,!0,1852],["newton","N",null,"force",!0,!0,1],["œrsted","Oe ",null,"magnetic_field_intensity",!1,!1,79.5774715459477],["ohm","Ω",null,"electric_resistance",!0,!1,1],["ounce mass","ozm",null,"mass",!1,!0,.028349523125],["pascal","Pa",null,"pressure",!0,!1,1],["pascal second","Pa?s",null,"dynamic_viscosity",!0,!1,1],["pferdestärke","PS",null,"power",!1,!0,735.49875],["phot","ph",null,"illuminance",!1,!1,1e-4],["pica (1/6 inch)","pica",null,"length",!1,!0,.00035277777777778],["pica (1/72 inch)","Pica",["Picapt"],"length",!1,!0,.00423333333333333],["poise","P",null,"dynamic_viscosity",!1,!1,.1],["pond","pond",null,"force",!1,!0,.00980665],["pound force","lbf",null,"force",!1,!0,4.4482216152605],["pound mass","lbm",null,"mass",!1,!0,.45359237],["quart","qt",null,"volume",!1,!0,.000946352946],["radian","rad",null,"angle",!0,!1,1],["second","?",null,"angle",!1,!1,484813681109536e-20],["second","s",["sec"],"time",!0,!0,1],["short hundredweight","cwt",["shweight"],"mass",!1,!0,45.359237],["siemens","S",null,"electrical_conductance",!0,!1,1],["sievert","Sv",null,"equivalent_dose",!0,!1,1],["slug","sg",null,"mass",!1,!0,14.59390294],["square ångström","ang2",["ang^2"],"area",!1,!0,1e-20],["square foot","ft2",["ft^2"],"area",!1,!0,.09290304],["square inch","in2",["in^2"],"area",!1,!0,64516e-8],["square light-year","ly2",["ly^2"],"area",!1,!0,895054210748189e17],["square meter","m?",null,"area",!0,!0,1],["square mile","mi2",["mi^2"],"area",!1,!0,2589988.110336],["square nautical mile","Nmi2",["Nmi^2"],"area",!1,!0,3429904],["square Pica","Pica2",["Picapt2","Pica^2","Picapt^2"],"area",!1,!0,1792111111111e-17],["square yard","yd2",["yd^2"],"area",!1,!0,.83612736],["statute mile","mi",null,"length",!1,!0,1609.344],["steradian","sr",null,"solid_angle",!0,!1,1],["stilb","sb",null,"luminance",!1,!1,1e-4],["stokes","St",null,"kinematic_viscosity",!1,!1,1e-4],["stone","stone",null,"mass",!1,!0,6.35029318],["tablespoon","tbs",null,"volume",!1,!0,147868e-10],["teaspoon","tsp",null,"volume",!1,!0,492892e-11],["tesla","T",null,"magnetic_flux_density",!0,!0,1],["thermodynamic calorie","c",null,"energy",!1,!0,4.184],["ton","ton",null,"mass",!1,!0,907.18474],["tonne","t",null,"mass",!1,!1,1e3],["U.K. pint","uk_pt",null,"volume",!1,!0,.00056826125],["U.S. bushel","bushel",null,"volume",!1,!0,.03523907],["U.S. oil barrel","barrel",null,"volume",!1,!0,.158987295],["U.S. pint","pt",["us_pt"],"volume",!1,!0,.000473176473],["U.S. survey mile","survey_mi",null,"length",!1,!0,1609.347219],["U.S. survey/statute acre","us_acre",null,"area",!1,!0,4046.87261],["volt","V",null,"voltage",!0,!1,1],["watt","W",null,"power",!0,!0,1],["watt-hour","Wh",["wh"],"energy",!1,!0,3600],["weber","Wb",null,"magnetic_flux",!0,!1,1],["yard","yd",null,"length",!1,!0,.9144],["year","yr",null,"time",!1,!0,31557600]],i={Yi:["yobi",80,12089258196146292e8,"Yi","yotta"],Zi:["zebi",70,11805916207174113e5,"Zi","zetta"],Ei:["exbi",60,0x1000000000000000,"Ei","exa"],Pi:["pebi",50,0x4000000000000,"Pi","peta"],Ti:["tebi",40,1099511627776,"Ti","tera"],Gi:["gibi",30,1073741824,"Gi","giga"],Mi:["mebi",20,1048576,"Mi","mega"],ki:["kibi",10,1024,"ki","kilo"]},o={Y:["yotta",1e24,"Y"],Z:["zetta",1e21,"Z"],E:["exa",1e18,"E"],P:["peta",1e15,"P"],T:["tera",1e12,"T"],G:["giga",1e9,"G"],M:["mega",1e6,"M"],k:["kilo",1e3,"k"],h:["hecto",100,"h"],e:["dekao",10,"e"],d:["deci",.1,"d"],c:["centi",.01,"c"],m:["milli",.001,"m"],u:["micro",1e-6,"u"],n:["nano",1e-9,"n"],p:["pico",1e-12,"p"],f:["femto",1e-15,"f"],a:["atto",1e-18,"a"],z:["zepto",1e-21,"z"],y:["yocto",1e-24,"y"]};let a,s=null,u=null,c=t,l=n,h=1,f=1;for(let e=0;e<r.length;e++)a=null===r[e][2]?[]:r[e][2],(r[e][1]===c||0<=a.indexOf(c))&&(s=r[e]),(r[e][1]===l||0<=a.indexOf(l))&&(u=r[e]);if(null===s){var p=i[t.substring(0,2)];let e=o[t.substring(0,1)];"da"===t.substring(0,2)&&(e=["dekao",10,"da"]),p?(h=p[2],c=t.substring(2)):e&&(h=e[1],c=t.substring(e[2].length));for(let e=0;e<r.length;e++)a=null===r[e][2]?[]:r[e][2],(r[e][1]===c||0<=a.indexOf(c))&&(s=r[e])}if(null===u){p=i[n.substring(0,2)];let e=o[n.substring(0,1)];"da"===n.substring(0,2)&&(e=["dekao",10,"da"]),p?(f=p[2],l=n.substring(2)):e&&(f=e[1],l=n.substring(e[2].length));for(let e=0;e<r.length;e++)a=null===r[e][2]?[]:r[e][2],(r[e][1]===l||0<=a.indexOf(l))&&(u=r[e])}return null===s||null===u||s[3]!==u[3]?d:e*s[6]*h/(u[6]*f)}function Mi(e,t){return(e=M(e))instanceof Error?e:!/^-?[0-9]{1,3}$/.test(e)||e<-512||511<e?f:e<0?"1"+ai("0",9-(512+e).toString(2).length)+(512+e).toString(2):(e=parseInt(e,10).toString(2),void 0===t?e:isNaN(t)?c:!(t<0)&&(t=Math.floor(t))>=e.length?ai("0",t-e.length)+e:f)}function ji(e,t){return(e=M(e))instanceof Error?e:!/^-?[0-9]{1,12}$/.test(e)||e<-549755813888||549755813887<e?f:e<0?(1099511627776+e).toString(16):(e=parseInt(e,10).toString(16),void 0===t?e:isNaN(t)?c:!(t<0)&&(t=Math.floor(t))>=e.length?ai("0",t-e.length)+e:f)}function Ni(e,t){return(e=M(e))instanceof Error?e:!/^-?[0-9]{1,9}$/.test(e)||e<-536870912||536870911<e?f:e<0?(1073741824+e).toString(8):(e=parseInt(e,10).toString(8),void 0===t?e:isNaN(t)?c:!(t<0)&&(t=Math.floor(t))>=e.length?ai("0",t-e.length)+e:f)}function Fi(e,t){return t=void 0===t?0:t,_(e=M(e),t=M(t))?c:e===t?1:0}function Ri(e,t){return t=void 0===t?0:t,_(e=M(e),t=M(t))?c:o.erf(e)}function Pi(e){return isNaN(e)?c:o.erfc(e)}function Li(e,t){return _(t=t||0,e=M(e))?e:t<=e?1:0}function Ui(e,t){if(!/^[0-9A-Fa-f]{1,10}$/.test(e))return f;var n=!(10!==e.length||"f"!==e.substring(0,1).toLowerCase());const r=n?parseInt(e,16)-1099511627776:parseInt(e,16);return r<-512||511<r?f:n?"1"+ai("0",9-(512+r).toString(2).length)+(512+r).toString(2):(e=r.toString(2),void 0===t?e:isNaN(t)?c:!(t<0)&&(t=Math.floor(t))>=e.length?ai("0",t-e.length)+e:f)}function zi(e){return/^[0-9A-Fa-f]{1,10}$/.test(e)?549755813888<=(e=parseInt(e,16))?e-1099511627776:e:f}function Hi(e,t){if(!/^[0-9A-Fa-f]{1,10}$/.test(e))return f;const n=parseInt(e,16);return 536870911<n&&n<0xffe0000000?f:0xffe0000000<=n?(n-0xffc0000000).toString(8):(e=n.toString(8),void 0===t?e:isNaN(t)?c:!(t<0)&&(t=Math.floor(t))>=e.length?ai("0",t-e.length)+e:f)}function $i(e){var t=ro(e);return _(t,e=Qi(e))?c:Math.sqrt(Math.pow(t,2)+Math.pow(e,2))}function Qi(e){if(void 0===e||!0===e||!1===e)return c;if(0===e||"0"===e)return 0;if(0<=["i","j"].indexOf(e))return 1;let t=(e=(e+="").replace("+i","+1i").replace("-i","-1i").replace("+j","+1j").replace("-j","-1j")).indexOf("+"),n=e.indexOf("-");0===t&&(t=e.indexOf("+",1)),0===n&&(n=e.indexOf("-",1));var r="i"===(r=e.substring(e.length-1,e.length))||"j"===r;return 0<=t||0<=n?r?0<=t?isNaN(e.substring(0,t))||isNaN(e.substring(t+1,e.length-1))?f:Number(e.substring(t+1,e.length-1)):isNaN(e.substring(0,n))||isNaN(e.substring(n+1,e.length-1))?f:-Number(e.substring(n+1,e.length-1)):f:r?isNaN(e.substring(0,e.length-1))?f:e.substring(0,e.length-1):isNaN(e)?f:0}function Vi(e){var t=ro(e);return _(t,e=Qi(e))?c:0===t&&0===e?u:0===t&&0<e?Math.PI/2:0===t&&e<0?-Math.PI/2:0===e&&0<t?0:0===e&&t<0?-Math.PI:0<t?Math.atan(e/t):t<0&&0<=e?Math.atan(e/t)+Math.PI:Math.atan(e/t)-Math.PI}function qi(e){var t=ro(e),n=Qi(e);if(_(t,n))return c;let r=e.substring(e.length-1);return r="i"===r||"j"===r?r:"i",0!==n?Bi(t,-n,r):e}function Gi(e){var t=ro(e),n=Qi(e);if(_(t,n))return c;let r=e.substring(e.length-1);return r="i"===r||"j"===r?r:"i",Bi(Math.cos(t)*(Math.exp(n)+Math.exp(-n))/2,-Math.sin(t)*(Math.exp(n)-Math.exp(-n))/2,r)}function Wi(e){var t=ro(e),n=Qi(e);if(_(t,n))return c;let r=e.substring(e.length-1);return r="i"===r||"j"===r?r:"i",Bi(Math.cos(n)*(Math.exp(t)+Math.exp(-t))/2,Math.sin(n)*(Math.exp(t)-Math.exp(-t))/2,r)}function Ki(e){return _(ro(e),Qi(e))?c:Yi(Gi(e),ao(e))}function Yi(e,t){var n=ro(e),r=Qi(e),i=ro(t),o=Qi(t);if(_(n,r,i,o))return c;e=e.substring(e.length-1),t=t.substring(t.length-1);let a="j"!==e&&"j"!==t?"i":"j";return 0===i&&0===o?f:Bi((n*i+r*o)/(e=i*i+o*o),(r*i-n*o)/e,a)}function Xi(e){var t=ro(e),n=Qi(e);if(_(t,n))return c;let r=e.substring(e.length-1);return r="i"===r||"j"===r?r:"i",Bi((e=Math.exp(t))*Math.cos(n),e*Math.sin(n),r)}function Ji(e){var t=ro(e),n=Qi(e);if(_(t,n))return c;let r=e.substring(e.length-1);return r="i"===r||"j"===r?r:"i",Bi(Math.log(Math.sqrt(t*t+n*n)),Math.atan(n/t),r)}function Zi(e){var t=ro(e),n=Qi(e);if(_(t,n))return c;let r=e.substring(e.length-1);return r="i"===r||"j"===r?r:"i",Bi(Math.log(Math.sqrt(t*t+n*n))/Math.log(10),Math.atan(n/t)/Math.log(10),r)}function eo(e){var t=ro(e),n=Qi(e);if(_(t,n))return c;let r=e.substring(e.length-1);return r="i"===r||"j"===r?r:"i",Bi(Math.log(Math.sqrt(t*t+n*n))/Math.log(2),Math.atan(n/t)/Math.log(2),r)}function to(e,t){if(_(t=M(t),ro(e),Qi(e)))return c;let n=e.substring(e.length-1);n="i"===n||"j"===n?n:"i";var r=Math.pow($i(e),t);e=Vi(e);return Bi(r*Math.cos(t*e),r*Math.sin(t*e),n)}function no(){let e=arguments[0];if(!arguments.length)return c;for(let o=1;o<arguments.length;o++){var t=ro(e),n=Qi(e),r=ro(arguments[o]),i=Qi(arguments[o]);if(_(t,n,r,i))return c;e=Bi(t*r-n*i,t*i+n*r)}return e}function ro(e){if(void 0===e||!0===e||!1===e)return c;if(0===e||"0"===e)return 0;if(0<=["i","+i","1i","+1i","-i","-1i","j","+j","1j","+1j","-j","-1j"].indexOf(e))return 0;let t=(e+="").indexOf("+"),n=e.indexOf("-");0===t&&(t=e.indexOf("+",1)),0===n&&(n=e.indexOf("-",1));var r="i"===(r=e.substring(e.length-1,e.length))||"j"===r;return 0<=t||0<=n?r?0<=t?isNaN(e.substring(0,t))||isNaN(e.substring(t+1,e.length-1))?f:Number(e.substring(0,t)):isNaN(e.substring(0,n))||isNaN(e.substring(n+1,e.length-1))?f:Number(e.substring(0,n)):f:r?isNaN(e.substring(0,e.length-1))?f:0:isNaN(e)?f:e}function io(e){return!0===e||!1===e||_(ro(e),Qi(e))?c:Yi("1",Gi(e))}function oo(e){return _(ro(e),Qi(e))?c:Yi("1",Wi(e))}function ao(e){var t=ro(e),n=Qi(e);if(_(t,n))return c;let r=e.substring(e.length-1);return r="i"===r||"j"===r?r:"i",Bi(Math.sin(t)*(Math.exp(n)+Math.exp(-n))/2,Math.cos(t)*(Math.exp(n)-Math.exp(-n))/2,r)}function so(e){var t=ro(e),n=Qi(e);if(_(t,n))return c;let r=e.substring(e.length-1);return r="i"===r||"j"===r?r:"i",Bi(Math.cos(n)*(Math.exp(t)-Math.exp(-t))/2,Math.sin(n)*(Math.exp(t)+Math.exp(-t))/2,r)}function uo(e){if(_(ro(e),Qi(e)))return c;let t=e.substring(e.length-1);t="i"===t||"j"===t?t:"i";var n=Math.sqrt($i(e));e=Vi(e);return Bi(n*Math.cos(e/2),n*Math.sin(e/2),t)}function co(e){return!0===e||!1===e?c:_(ro(e),Qi(e))?f:Yi("1",ao(e))}function lo(e){return!0===e||!1===e?c:_(ro(e),Qi(e))?f:Yi("1",so(e))}function ho(e,t){var n=ro(e),r=Qi(e),i=ro(t),o=Qi(t);if(_(n,r,i,o))return c;return e=e.substring(e.length-1),t=t.substring(t.length-1),Bi(n-i,r-o,"j"!==e&&"j"!==t?"i":"j")}function fo(){if(!arguments.length)return c;var e=w(arguments);let t=e[0];for(let a=1;a<e.length;a++){var n=ro(t),r=Qi(t),i=ro(e[a]),o=Qi(e[a]);if(_(n,r,i,o))return c;t=Bi(n+i,r+o)}return t}function po(e){return!0===e||!1===e||_(ro(e),Qi(e))?c:Yi(ao(e),Gi(e))}function mo(e,t){if(!/^[0-7]{1,10}$/.test(e))return f;var n=!(10!==e.length||"7"!==e.substring(0,1));const r=n?parseInt(e,8)-1073741824:parseInt(e,8);return r<-512||511<r?f:n?"1"+ai("0",9-(512+r).toString(2).length)+(512+r).toString(2):(e=r.toString(2),void 0===t?e:isNaN(t)?c:!(t<0)&&(t=Math.floor(t))>=e.length?ai("0",t-e.length)+e:f)}function go(e){return/^[0-7]{1,10}$/.test(e)?536870912<=(e=parseInt(e,8))?e-1073741824:e:f}function Ao(e,t){if(!/^[0-7]{1,10}$/.test(e))return f;const n=parseInt(e,8);return 536870912<=n?"ff"+(n+3221225472).toString(16):(e=n.toString(16),void 0===t?e:isNaN(t)?c:!(t<0)&&(t=Math.floor(t))>=e.length?ai("0",t-e.length)+e:f)}Ri.PRECISE=()=>{throw new Error("ERF.PRECISE is not implemented")},Pi.PRECISE=()=>{throw new Error("ERFC.PRECISE is not implemented")};const vo=Oe.DIST,bo=Oe.INV,yo=Te.DIST,wo=en.MATH,xo=en.PRECISE,Co=De.DIST,ko=De.DIST.RT,Eo=De.INV,So=De.INV.RT,_o=De.TEST,Oo=Pe.P,To=Pe.P,Do=Pe.S,Bo=Te.INV,Io=Pi.PRECISE,Mo=Ri.PRECISE,jo=Ue.DIST,No=ze.DIST,Fo=ze.DIST.RT,Ro=ze.INV,Po=ze.INV.RT,Lo=An.MATH,Uo=An.PRECISE,zo=ze.TEST,Ho=qe.DIST,$o=qe.INV,Qo=Ge.PRECISE,Vo=Je.DIST,qo=it.INV,Go=it.DIST,Wo=it.INV,Ko=lt.MULT,Yo=lt.SNGL,Xo=ht.DIST,Jo=Sr.INTL,Zo=ft.DIST,ea=ft.INV,ta=ft.S.DIST,na=ft.S.INV,ra=pt.EXC,ia=pt.INC,oa=mt.EXC,aa=mt.INC,sa=bt.DIST,ua=wt.EXC,ca=wt.INC,la=xt.AVG,ha=xt.EQ,fa=Et.P,da=Tt.P,pa=Tt.S,ma=Mt.DIST,ga=Mt.DIST.RT,Aa=Mt.INV,va=Mt.TEST,ba=Ft.P,ya=Ft.S,wa=Lt.DIST,xa=jr.INTL,Ca=Ut.TEST;function ka(e){const t=[];return v(e,e=>{e&&t.push(e)}),t}function Ea(e,t){const n={};for(let t=1;t<e[0].length;++t)n[t]=!0;let r=t[0].length;for(let e=1;e<t.length;++e)t[e].length>r&&(r=t[e].length);for(let s=1;s<e.length;++s)for(let u=1;u<e[s].length;++u){let c=!1,l=!1;for(let n=0;n<t.length;++n){var i=t[n];if(!(i.length<r)){var o,a=i[0];if(e[s][0]===a){l=!0;for(let t=1;t<i.length;++t)c||(c=(o=void 0===i[t]||"*"===i[t])||(o=$(i[t]+""),o=[H(e[s][u],z)].concat(o),Q(o)))}}}l&&(n[u]=n[u]&&c)}const s=[];for(let t=0;t<e[0].length;++t)n[t]&&s.push(t-1);return s}function Sa(e,t,n){if(isNaN(t)&&"string"!=typeof t)return c;n=Ea(e,n);let r=[],i=(r=C("string"==typeof t?e[E(e,t)]:e[t]),0);return v(n,e=>{i+=r[e]}),0===n.length?u:i/n.length}function _a(e,t,n){if(isNaN(t)&&"string"!=typeof t)return c;n=Ea(e,n);let r=[];r=C("string"==typeof t?e[E(e,t)]:e[t]);const i=[];return v(n,e=>{i.push(r[e])}),Me(i)}function Oa(e,t,n){if(isNaN(t)&&"string"!=typeof t)return c;n=Ea(e,n);let r=[];r=C("string"==typeof t?e[E(e,t)]:e[t]);const i=[];return v(n,e=>{i.push(r[e])}),je(i)}function Ta(e,t,n){if(isNaN(t)&&"string"!=typeof t)return c;n=Ea(e,n);let r=[];return r=C("string"==typeof t?e[E(e,t)]:e[t]),0===n.length?c:1<n.length?f:r[n[0]]}function Da(e,t,n){if(isNaN(t)&&"string"!=typeof t)return c;n=Ea(e,n);let r=[],i=(r=C("string"==typeof t?e[E(e,t)]:e[t]))[n[0]];return v(n,e=>{i<r[e]&&(i=r[e])}),i}function Ba(e,t,n){if(isNaN(t)&&"string"!=typeof t)return c;n=Ea(e,n);let r=[],i=(r=C("string"==typeof t?e[E(e,t)]:e[t]))[n[0]];return v(n,e=>{i>r[e]&&(i=r[e])}),i}function Ia(e,t,n){if(isNaN(t)&&"string"!=typeof t)return c;n=Ea(e,n);let r=[],i=(r=C("string"==typeof t?e[E(e,t)]:e[t]),[]),o=(v(n,e=>{i.push(r[e])}),i=ka(i),1);return v(i,e=>{o*=e}),o}function Ma(e,t,n){if(isNaN(t)&&"string"!=typeof t)return c;n=Ea(e,n);let r=[],i=(r=C("string"==typeof t?e[E(e,t)]:e[t]),[]);return v(n,e=>{i.push(r[e])}),i=ka(i),Tt.S(i)}function ja(e,t,n){if(isNaN(t)&&"string"!=typeof t)return c;n=Ea(e,n);let r=[],i=(r=C("string"==typeof t?e[E(e,t)]:e[t]),[]);return v(n,e=>{i.push(r[e])}),i=ka(i),Tt.P(i)}function Na(e,t,n){if(isNaN(t)&&"string"!=typeof t)return c;n=Ea(e,n);let r=[];r=C("string"==typeof t?e[E(e,t)]:e[t]);const i=[];return v(n,e=>{i.push(r[e])}),Xn(i)}function Fa(e,t,n){if(isNaN(t)&&"string"!=typeof t)return c;n=Ea(e,n);let r=[];r=C("string"==typeof t?e[E(e,t)]:e[t]);const i=[];return v(n,e=>{i.push(r[e])}),Ft.S(i)}function Ra(e,t,n){if(isNaN(t)&&"string"!=typeof t)return c;n=Ea(e,n);let r=[];r=C("string"==typeof t?e[E(e,t)]:e[t]);const i=[];return v(n,e=>{i.push(r[e])}),Ft.P(i)}function Pa(e){return e&&e.getTime&&!isNaN(e.getTime())}function La(e){return e instanceof Date?e:new Date(e)}function Ua(e,t,n,r,i,o,a){return e=La(e),t=La(t),n=La(n),Pa(e)&&Pa(t)&&Pa(n)?r<=0||i<=0||-1===[1,2,4].indexOf(o)||-1===[0,1,2,3,4].indexOf(a)||n<=e?f:(i=i||0)*r*Pr(e,n,a=a||0):c}function za(){throw new Error("ACCRINTM is not implemented")}function Ha(){throw new Error("AMORDEGRC is not implemented")}function $a(){throw new Error("AMORLINC is not implemented")}function Qa(){throw new Error("COUPDAYBS is not implemented")}function Va(){throw new Error("COUPDAYS is not implemented")}function qa(){throw new Error("COUPDAYSNC is not implemented")}function Ga(){throw new Error("COUPNCD is not implemented")}function Wa(){throw new Error("COUPNUM is not implemented")}function Ka(){throw new Error("COUPPCD is not implemented")}function Ya(e,t,n,r,i,o){if(_(e=M(e),t=M(t),n=M(n)))return c;if(e<=0||t<=0||n<=0)return f;if(r<1||i<1||i<r)return f;if(0!==o&&1!==o)return f;var a=ws(e,t,n,0,o);let s=0;1===r&&(0===o&&(s=-n),r++);for(let t=r;t<=i;t++)s+=1===o?os(e,t-2,a,n,1)-a:os(e,t-1,a,n,0);return s*e}function Xa(e,t,n,r,i,o){if(_(e=M(e),t=M(t),n=M(n)))return c;if(e<=0||t<=0||n<=0)return f;if(r<1||i<1||i<r)return f;if(0!==o&&1!==o)return f;var a=ws(e,t,n,0,o);let s=0;1===r&&(s=0===o?a+n*e:a,r++);for(let t=r;t<=i;t++)s+=0<o?a-(os(e,t-2,a,n,1)-a)*e:a-os(e,t-1,a,n,0)*e;return s}function Ja(e,t,n,r,i){if(i=void 0===i?12:i,_(e=M(e),t=M(t),n=M(n),r=M(r),i=M(i)))return c;if(e<0||t<0||n<0||r<0)return f;if(-1===[1,2,3,4,5,6,7,8,9,10,11,12].indexOf(i))return f;if(n<r)return f;if(e<=t)return 0;var o=(1-Math.pow(t/e,1/n)).toFixed(3);let a=t=e*o*i/12,s=0;var u=r===n?n-1:r;for(let t=2;t<=u;t++)s=(e-a)*o,a+=s;return 1===r?t:r===n?(e-a)*o:s}function Za(e,t,n,r,i){if(i=void 0===i?2:i,_(e=M(e),t=M(t),n=M(n),r=M(r),i=M(i)))return c;if(e<0||t<0||n<0||r<0||i<=0)return f;if(n<r)return f;if(e<=t)return 0;let o=0,a=0;for(let s=1;s<=r;s++)a=Math.min(i/n*(e-o),e-t-o),o+=a;return a}function es(e,t,n,r,i){if(_(e=B(e),t=B(t),n=M(n),r=M(r),i=(i=M(i))||0))return c;if(n<=0||r<=0)return f;if(t<=e)return c;let o,a;switch(i){case 0:o=360,a=br(e,t,!1);break;case 1:o=365,a=pr(e,t,"D");break;case 2:o=360,a=pr(e,t,"D");break;case 3:o=365,a=pr(e,t,"D");break;case 4:o=360,a=br(e,t,!0);break;default:return f}return(r-n)/r*o/a}function ts(e,t){if(_(e=M(e),t=M(t)))return c;if(t<0)return f;if(0<=t&&t<1)return u;t=parseInt(t,10);var n=parseInt(e,10);n+=e%1*Math.pow(10,Math.ceil(Math.log(t)/Math.LN10))/t,e=Math.pow(10,Math.ceil(Math.log(t)/Math.LN2)+1);return Math.round(n*e)/e}function ns(e,t){return _(e=M(e),t=M(t))?c:t<0?f:0<=t&&t<1?u:(t=parseInt(t,10),parseInt(e,10)+e%1*Math.pow(10,-Math.ceil(Math.log(t)/Math.LN10))*t)}function rs(){throw new Error("DURATION is not implemented")}function is(e,t){return _(e=M(e),t=M(t))?c:e<=0||t<1?f:(t=parseInt(t,10),Math.pow(1+e/t,t)-1)}function os(e,t,n,r,i){if(r=r||0,i=i||0,_(e=M(e),t=M(t),n=M(n),r=M(r),i=M(i)))return c;let o;return-(o=0===e?r+n*t:(t=Math.pow(1+e,t),1===i?r*t+n*(1+e)*(t-1)/e:r*t+n*(t-1)/e))}function as(e,t){if(_(e=M(e),t=j(w(t))))return c;var n=t.length;let r=e;for(let e=0;e<n;e++)r*=1+t[e];return r}function ss(){throw new Error("INTRATE is not implemented")}function us(e,t,n,r,i,o){return i=i||0,o=o||0,_(e=M(e),t=M(t),n=M(n),r=M(r),i=M(i),o=M(o))?c:(n=ws(e,n,r,i,o),(1===t?1===o?0:-r:1===o?os(e,t-2,n,r,1)-n:os(e,t-1,n,r,0))*e)}function cs(e,t){if(t=t||0,_(e=j(w(e)),t=M(t)))return c;const n=[];let r=!1,i=!1;for(let t=0;t<e.length;t++)n[t]=0===t?0:n[t-1]+365,0<e[t]&&(r=!0),e[t]<0&&(i=!0);if(!r||!i)return f;let o=t=void 0===t?.1:t;for(var a,s,u;a=o-(u=((e,t,n)=>{var r=n+1;let i=e[0];for(let n=1;n<e.length;n++)i+=e[n]/Math.pow(r,(t[n]-t[0])/365);return i})(e,n,o))/((e,t,n)=>{var r=n+1;let i=0;for(let n=1;n<e.length;n++){var o=(t[n]-t[0])/365;i-=o*e[n]/Math.pow(r,1+o)}return i})(e,n,o),s=Math.abs(a-o),o=a,1e-10<s&&1e-10<Math.abs(u););return o}function ls(e,t,n,r){return _(e=M(e),t=M(t),n=M(n),r=M(r))?c:r*e*(t/n-1)}function hs(){throw new Error("MDURATION is not implemented")}function fs(e,t,n){if(_(e=j(w(e)),t=M(t),n=M(n)))return c;var r=e.length;const i=[],o=[];for(let t=0;t<r;t++)(e[t]<0?i:o).push(e[t]);return n=-ms(n,o)*Math.pow(1+n,r-1),t=ms(t,i)*(1+t),Math.pow(n/t,1/(r-1))-1}function ds(e,t){return _(e=M(e),t=M(t))?c:e<=0||t<1?f:(t=parseInt(t,10),(Math.pow(e+1,1/t)-1)*t)}function ps(e,t,n,r,i){return i=void 0===i?0:i,r=void 0===r?0:r,_(e=M(e),t=M(t),n=M(n),r=M(r),i=M(i))?c:0===e?-(n+r)/t:Math.log((t*(1+e*i)-r*e)/(n*e+t*(1+e*i)))/Math.log(1+e)}function ms(){var e=j(w(arguments));if(e instanceof Error)return e;var t=e[0];let n=0;for(let r=1;r<e.length;r++)n+=e[r]/Math.pow(1+t,r);return n}function gs(){throw new Error("ODDFPRICE is not implemented")}function As(){throw new Error("ODDFYIELD is not implemented")}function vs(){throw new Error("ODDLPRICE is not implemented")}function bs(){throw new Error("ODDLYIELD is not implemented")}function ys(e,t,n){return _(e=M(e),t=M(t),n=M(n))?c:e<=0?f:(Math.log(n)-Math.log(t))/Math.log(1+e)}function ws(e,t,n,r,i){if(r=r||0,i=i||0,_(e=M(e),t=M(t),n=M(n),r=M(r),i=M(i)))return c;let o;return-(o=0===e?(n+r)/t:(t=Math.pow(1+e,t),1===i?(r*e/(t-1)+n*e/(1-1/t))/(1+e):r*e/(t-1)+n*e/(1-1/t)))}function xs(e,t,n,r,i,o){return i=i||0,o=o||0,_(e=M(e),n=M(n),r=M(r),i=M(i),o=M(o))?c:ws(e,n,r,i,o)-us(e,t,n,r,i,o)}function Cs(){throw new Error("PRICE is not implemented")}function ks(e,t,n,r,i){if(_(e=B(e),t=B(t),n=M(n),r=M(r),i=(i=M(i))||0))return c;if(n<=0||r<=0)return f;if(t<=e)return c;let o,a;switch(i){case 0:o=360,a=br(e,t,!1);break;case 1:o=365,a=pr(e,t,"D");break;case 2:o=360,a=pr(e,t,"D");break;case 3:o=365,a=pr(e,t,"D");break;case 4:o=360,a=br(e,t,!0);break;default:return f}return r-n*r*a/o}function Es(){throw new Error("PRICEMAT is not implemented")}function Ss(e,t,n,r,i){return r=r||0,i=i||0,_(e=M(e),t=M(t),n=M(n),r=M(r),i=M(i))?c:0===e?-n*t-r:((1-Math.pow(1+e,t))/e*n*(1+e*i)-r)/Math.pow(1+e,t)}function _s(e,t,n,r,i,o){if(o=void 0===o?.01:o,r=void 0===r?0:r,i=void 0===i?0:i,_(e=M(e),t=M(t),n=M(n),r=M(r),i=M(i),o=M(o)))return c;var a;let s=o;i=i?1:0;for(let o=0;o<20;o++){if(s<=-1)return f;let o,u,c;if(o=Math.abs(s)<1e-10?n*(1+e*s)+t*(1+s*i)*e+r:n*(u=Math.pow(1+s,e))+t*(1/s+i)*(u-1)+r,Math.abs(o)<1e-10)return s;c=Math.abs(s)<1e-10?n*e+t*i*e:(u=Math.pow(1+s,e),n*(a=e*Math.pow(1+s,e-1))+t*(1/s+i)*a+t*(-1/(s*s))*(u-1)),s-=o/c}return s}function Os(){throw new Error("RECEIVED is not implemented")}function Ts(e,t,n){return _(e=M(e),t=M(t),n=M(n))?c:0===e||0===t?f:Math.pow(n/t,1/e)-1}function Ds(e,t,n){return _(e=M(e),t=M(t),n=M(n))?c:0===n?f:(e-t)/n}function Bs(e,t,n,r){return _(e=M(e),t=M(t),n=M(n),r=M(r))?c:0===n||r<1||n<r?f:(e-t)*(n-(r=parseInt(r,10))+1)*2/(n*(n+1))}function Is(e,t,n){return _(e=B(e),t=B(t),n=M(n))?c:n<=0||t<e||31536e6<t-e?f:365*n/(360-n*br(e,t,!1))}function Ms(e,t,n){return _(e=B(e),t=B(t),n=M(n))?c:n<=0||t<e||31536e6<t-e?f:100*(1-n*br(e,t,!1)/360)}function js(e,t,n){return _(e=B(e),t=B(t),n=M(n))?c:n<=0||t<e||31536e6<t-e?f:360*(100-n)/(n*br(e,t,!1))}function Ns(){throw new Error("VDB is not implemented")}function Fs(e,t,n){if(_(e=j(w(e)),t=I(w(t)),n=M(n)))return c;let r=!1,i=!1;for(let t=0;t<e.length;t++)0<e[t]&&(r=!0),e[t]<0&&(i=!0);if(!r||!i)return f;let o=n=n||.1;for(var a,s,u;a=o-(u=((e,t,n)=>{var r=n+1;let i=e[0];for(let n=1;n<e.length;n++)i+=e[n]/Math.pow(r,vr(t[n],t[0])/365);return i})(e,t,o))/((e,t,n)=>{var r=n+1;let i=0;for(let n=1;n<e.length;n++){var o=vr(t[n],t[0])/365;i-=o*e[n]/Math.pow(r,1+o)}return i})(e,t,o),s=Math.abs(a-o),o=a,1e-10<s&&1e-10<Math.abs(u););return o}function Rs(e,t,n){if(_(e=M(e),t=j(w(t)),n=I(w(n))))return c;let r=0;for(let i=0;i<t.length;i++)r+=t[i]/Math.pow(1+e,vr(n[i],n[0])/365);return r}function Ps(){throw new Error("YIELD is not implemented")}function Ls(){throw new Error("YIELDDISC is not implemented")}function Us(){throw new Error("YIELDMAT is not implemented")}function zs(){var e=w(arguments);let t=c;for(let n=0;n<e.length;n++){if(e[n]instanceof Error)return e[n];void 0!==e[n]&&null!==e[n]&&"string"!=typeof e[n]&&(t===c&&(t=!0),e[n]||(t=!1))}return t}function Hs(){return!1}function $s(e,t,n){return e instanceof Error?e:(null==(t=!(2<=arguments.length)||t)&&(t=0),null==(n=3===arguments.length&&n)&&(n=0),e?t:n)}function Qs(){for(let e=0;e<arguments.length/2;e++)if(arguments[2*e])return arguments[2*e+1];return d}function Vs(e,t){return Y(e)?t:e}function qs(e,t){return e===d?t:e}function Gs(e){return"string"==typeof e?c:e instanceof Error?e:!e}function Ws(){var e=w(arguments);let t=c;for(let n=0;n<e.length;n++){if(e[n]instanceof Error)return e[n];void 0!==e[n]&&null!==e[n]&&"string"!=typeof e[n]&&(t===c&&(t=!1),e[n]&&(t=!0))}return t}function Ks(){return!0}function Ys(){var e=w(arguments);let t=c;for(let n=0;n<e.length;n++){if(e[n]instanceof Error)return e[n];void 0!==e[n]&&null!==e[n]&&"string"!=typeof e[n]&&(t===c&&(t=0),e[n]&&t++)}return t===c?t:!!(1&Math.floor(Math.abs(t)))}function Xs(){let e;if(0<arguments.length){var t=arguments[0],n=arguments.length-1,r=Math.floor(n/2);let o=!1;var i=n%2!=0;n=n%2==0?null:arguments[arguments.length-1];if(r)for(let n=0;n<r;n++)if(t===arguments[2*n+1]){e=arguments[2*n+2],o=!0;break}o||(e=i?n:d)}else e=c;return e}const Js={errors:g,symbols:ur};g=n(224);var Zs=n.n(g),eu=["","一","二","三","四","五","六","七","八","九"],tu=["","壹","贰","叁","肆","伍","陆","柒","捌","玖"],nu=["","拾","佰","仟"],ru=["","十","百","千"],iu=["","万","亿"],ou=["","万","亿"];function au(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(e,t)||function(e,t){var n;if(e)return"string"==typeof e?su(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?su(e,t):void 0}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function su(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function uu(e){return e.split("").reverse().join("")}ur=Object.assign({NUMBERSTRING:function(e,t){if(e=parseInt(e),3==t)return n=["〇","一","二","三","四","五","六","七","八","九"],e.toString().split("").map(Number).map((function(e){return n[e]})).join("");var n;if(0===e)return"零";for(var r="",i=0;0<e;i++)e%1e4!=0&&(1==t?r=function(e){if(0===e)return"";if(e<10)return eu[e];if(10===e)return ru[1];for(var t="",n=0;0<e;){var r=e%10;0!=r&&(t=eu[r]+ru[n]+t),e=Math.floor(e/10),n++}return t}(e%1e4)+iu[i]+r:2==t&&(r=function(e){if(0===e)return"";if(e<10)return tu[e];if(10===e)return nu[1];for(var t="",n=0;0<e;){var r=e%10;0!=r&&(t=tu[r]+nu[n]+t),e=Math.floor(e/10),n++}return t}(e%1e4)+ou[i]+r)),e=Math.floor(e/1e4);return r.trim()}},r);var cu=(window.formulajs=ur,/[a-zA-Z]+[0-9]+(?!')/g),lu=Number.prototype.__plus,hu=Number.prototype.__minus,fu=Number.prototype.__multiply,du=Number.prototype.__divide,pu=String.prototype.__plus,mu=String.prototype.__minus,gu=String.prototype.__multiply,Au=String.prototype.__divide,vu={1:function(e,t){return e+t},2:function(e,t){return e-t},3:function(e,t){return e*t},4:function(e,t){return e/t}},bu=function(e,t,n){var r,i=[];if(Array.isArray(t)){r=e,o=t;for(var o=au((r=Array.isArray(r)?r:[r]).length>=o.length?[r,o]:[o,r],2),a=o[0],s=o[1],u=0;u<a.length;u++){var c=a[u],l=s[u];null==l||(c=vu[n](c,l)),i.push(c)}}else for(var h=0;h<e.length;h++){var f=e[h];f=vu[n](f,t);i.push(f)}return i},yu=(Array.prototype.toString,function(){Number.prototype.__plus=function(e){return Array.isArray(e)?bu(e,this,1):e+this},Number.prototype.__minus=function(e){return Array.isArray(e)?bu(e,this,2):e-this},Number.prototype.__multiply=function(e){return Array.isArray(e)?bu(e,this,3):e*this},Number.prototype.__divide=function(e){return Array.isArray(e)?bu(e,this,4):e/this},String.prototype.__plus=function(e){return Array.isArray(e)?bu(e,this,1):e+this},String.prototype.__minus=function(e){return Array.isArray(e)?bu(e,this,2):e-this},String.prototype.__multiply=function(e){return Array.isArray(e)?bu(e,this,3):e*this},String.prototype.__divide=function(e){return Array.isArray(e)?bu(e,this,4):e/this},Array.prototype.__plus=function(e){return bu(e="null"==e?0:e,this,1)},Array.prototype.__minus=function(e){return bu(e="null"==e?0:e,this,2)},Array.prototype.__multiply=function(e){return bu(e="null"==e?0:e,this,3)},Array.prototype.__divide=function(e){return bu(e="null"==e?0:e,this,4)}}),wu=function(){Number.prototype.__plus=lu,Number.prototype.__minus=hu,Number.prototype.__multiply=fu,Number.prototype.__divide=du,String.prototype.__plus=pu,String.prototype.__minus=mu,String.prototype.__multiply=gu,String.prototype.__divide=Au,delete Array.prototype.__plus,delete Array.prototype.__minus,delete Array.prototype.__multiply,delete Array.prototype.__divide},xu=function(e){if(e)try{var t=[],n=(e.replace(/[a-zA-Z]+[0-9]+/g,(function(e,n){t.push(e)})),uu(t[t.length-1])),r=uu(e);return{rs:e=uu(r.replace(n,"")),match:t[t.length-1]}}catch(e){}},Cu=function(e){return e.replace(/=(?=(?:(?:[^'|"]*['|"]){2})*[^'|"]*$)/g,"==")},ku=function(e){for(var t=e.str,n={},r=0;r<t.length;r++){var i=t[r],o=t[r-1],a=t[r+1];if("+"===i||"-"===i)"+"!=a&&"-"!=a&&"+"!=o&&"-"!=o||(n[a=i]?(n[a].count+=1,n[a].ei=r):n[a]={count:1,si:r,ei:r});else if(n["+"]||n["-"]){r>=e.str.length-1&&(e.flag=!1);break}r>=e.str.length-1&&(e.flag=!1)}var s,u,c,l=n["+"],h=n["-"];null==h&&null==l||("",l?c=h?(u=Math.min(l.si,h.si),Math.max(l.ei,h.ei)):(u=l.si,l.ei):h&&(u=h.si,c=h.ei),s=h&&h.count%2!=0?"-":"+",e.str=t.replace(t.substring(u,c+1),s))},Eu=function(e){var t=[],n=(e.replace(/\)/g,(function(e,n){t.push(n)})),[]);if(t.length<=0)n.push(e);else for(var r=0;r<t.length;r++)t[r],0==r?n.push(e.substring(0,t[0]+1)):n.push(e.substring(t[r-1]+1,t[r]+1)),r==t.length-1&&n.push(e.substring(t[r]+1));return n},Su=function(e,t){var n=[];try{for(var r=au(Object(i.b)(e.toUpperCase()),2),o=r[0],a=r[1],s=au(Object(i.b)(t.toUpperCase()),2),u=s[0],c=s[1],l=u;l<=o;l+=1)for(var h=c;h<=a;h+=1)n.push(Object(i.e)(l,h))}catch(e){}return"["+n.join(",")+"]"},_u=/[a-zA-Z]+[0-9]+/g,Ou=function(e){return _u.lastIndex=0,_u.test(e)},Tu=function(e,t){var n=(e=au(Object(i.b)(e),2))[0];e=e[1];return t&&t(n,e)},Du=function(e,t,n){var r,o,a,s=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,u=5<arguments.length&&void 0!==arguments[5]?arguments[5]:{row:0,col:0};if(window.formulajs&&(window.formulajs.COLUMN=function(e){return e?(e=Object(i.b)(e))?e[0]:null:u.col+1},window.formulajs.ROW=function(e){return e?(e=Object(i.b)(e))?e[1]:null:u.row+1}),50<s)throw new Error("Maximum call stack size exceeded");try{if("="!==e[0])return e;var c=e.substring(1);if(!c)return"";var l=function(e){for(var t=[],n=[],r=[],o=0,a="",s=1,u="",c=0;c<e.length;c+=1){var l=e.charAt(c);if(" "!==l){if("a"<=l&&l<="z")r.push(l.toUpperCase());else if("0"<=l&&l<="9"||"A"<=l&&l<="Z"||"."===l)r.push(l);else if('"'===l){for(c+=1;'"'!==e.charAt(c);)r.push(e.charAt(c)),c+=1;n.push('"'.concat(r.join(""))),r=[]}else if("-"===l&&/[+\-*/,(]/.test(u))r.push(l);else{if("("!==l&&0<r.length&&n.push(r.join("")),")"===l){var h=t.pop();if(2===o)try{for(var f=au(Object(i.b)(n.pop()),2),d=f[0],p=f[1],m=au(Object(i.b)(n.pop()),2),g=m[0],A=m[1],v=0,b=g;b<=d;b+=1)for(var y=A;y<=p;y+=1)n.push(Object(i.e)(b,y)),v+=1;n.push([h,v])}catch(e){}else if(1===o||3===o)3===o&&n.push(a),n.push([h,s]),s=1;else for(;"("!==h&&(n.push(h),!(t.length<=0));)h=t.pop();o=0}else if("="===l||">"===l||"<"===l){var w=e.charAt(c+1);a=l;"="!==w&&"-"!==w||(a+=w,c+=1),o=3}else if(":"===l)o=2;else if(","===l){if(2==o)try{for(var x=au(Object(i.b)(n.pop()),2),C=x[0],k=x[1],E=au(Object(i.b)(n.pop()),2),S=E[0],_=E[1],O=0,T=S;T<=C;T+=1)for(var D=_;D<=k;D+=1)n.push(Object(i.e)(T,D)),O+=1;n.push([c1,O])}catch(e){}else 3===o&&n.push(a);s+=o=1}else if("("===l&&0<r.length)t.push(r.join(""));else{if(0<t.length&&("+"===l||"-"===l)){var B=t[t.length-1];if("("!==B&&n.push(t.pop()),"*"===B||"/"===B)for(;0<t.length&&"("!==(B=t[t.length-1]);)n.push(t.pop())}else 0<t.length&&("*"!==(w=t[t.length-1])&&"/"!==w||n.push(t.pop()));t.push(l)}r=[]}u=l}}for(0<r.length&&n.push(r.join(""));0<t.length;)n.push(t.pop());return n}(c),h=-1!=(r=c).indexOf(":")?(o=Eu(r),a=[],o.forEach((function(e){if(-1!=e.indexOf(":")){e=e.split(":");for(var t=[],n=0;n<e.length;n++){var r=e[n];try{var i=xu(r),o=i.rs,s=i.match;o&&(e[n]=o),s&&t.push(s)}catch(e){}}for(var u=!1,c=e.length-1;0<=c;c--)u=-1!=e[c].indexOf(")")&&e[c-1]&&-1!=e[c-1].indexOf("(")?(t[c]&&t[c-1]?e[c-1]+=Su(t[c],t[c-1]):e[c-1]+=":",!0):(u||(e[c]+=t[c]+","),!1);a.push(e.join(""))}else a.push(e)})),a.join("")):r,f=function(e,t,n,r,i,o){for(var a,s=o.match(cu),u={},c=0;c<e.length;c++){var l=e[c],h=null;h=Array.isArray(l)?l[0]:l;Array.isArray(l)||Ou(h)&&s&&s.includes(h)&&(h=Tu(l,t),u[l.toUpperCase()]=h)}for(a in u){var f=u[a];"="==f[0]&&(u[a]=Du(f,n,t,u,r+=1,i))}return u}(l,n,t,s,u,h),d=h,p=c,m=d.match(cu);yu(),d=Cu(d);try{for(var g=[],A=d.replace(/[a-zA-Z]+[0-9]+/g,(function(e,t){var n;return m&&m.includes(e)?""===(n=f[e.toUpperCase()])?"''":(isNaN(n)&&(n="'"+n+"'"),"-"!==(n+="")[0]||isNaN(n)?n:"("+n+")"):e})).replace(/[a-zA-Z]+\(/g,(function(e,t){return g.push(e),"formulajs."+e.toUpperCase()})),v={str:A,flag:!0};v.flag;)ku(v);A=v.str;var b,y=null,w=new Function("return "+A);return void 0===(y=Zs()(w)(A))&&(y=""),isNaN(y)||(b=y.toString().split(".")[1])&&6<b.length&&(y=Number(y).toFixed(6)),wu(),y}catch(t){return wu(),p}}catch(t){if(0!=s)throw t;return e}};t.a={render:Du,eval:function(e){yu();e=e.replace(/[a-zA-Z]+\(/g,(function(e,t){return"formulajs."+e.toUpperCase()}));var t=null,n=new Function("return "+e);return void 0===(t=Zs()(n)(e))&&(t=""),isNaN(t)||(n=t.toString().split(".")[1])&&6<n.length&&(t=Number(t).toFixed(6)),wu(),t}}},function(e,t){var n,r;e=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return(n=setTimeout)(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}var s,u=[],c=!1,l=-1;function h(){c&&s&&(c=!1,s.length?u=s.concat(u):l=-1,u.length&&f())}function f(){if(!c){for(var e=a(h),t=(c=!0,u.length);t;){for(s=u,u=[];++l<t;)s&&s[l].run();l=-1,t=u.length}s=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===o||!r)&&clearTimeout)return(r=clearTimeout)(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function d(e,t){this.fun=e,this.array=t}function p(){}e.nextTick=function(e){var t=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new d(e,t)),1!==u.length||c||a(f)},d.prototype.run=function(){this.fun.apply(null,this.array)},e.title="browser",e.browser=!0,e.env={},e.argv=[],e.version="",e.versions={},e.on=p,e.addListener=p,e.once=p,e.off=p,e.removeListener=p,e.removeAllListeners=p,e.emit=p,e.prependListener=p,e.prependOnceListener=p,e.listeners=function(e){return[]},e.binding=function(e){throw new Error("process.binding is not supported")},e.cwd=function(){return"/"},e.chdir=function(e){throw new Error("process.chdir is not supported")},e.umask=function(){return 0}},function(e,t,n){var r,i,o,a,s;e.exports=(e=n(39),n(222),n(223),r=(o=(n=e).lib).Base,i=o.WordArray,a=(o=n.algo).MD5,s=o.EvpKDF=r.extend({cfg:r.extend({keySize:4,hasher:a,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n,r=this.cfg,o=r.hasher.create(),a=i.create(),s=a.words,u=r.keySize,c=r.iterations;s.length<u;){n&&o.update(n),n=o.update(e).finalize(t),o.reset();for(var l=1;l<c;l++)n=o.finalize(n),o.reset();a.concat(n)}return a.sigBytes=4*u,a}}),n.EvpKDF=function(e,t,n){return s.create(n).compute(e,t)},e.EvpKDF)},function(e,t,n){"use strict";n.d(t,"c",(function(){return i})),n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return a}));
/**
 * @license
 * Copyright 2019 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
const r={};function i(e,t){t={tfOpName:e,category:"custom",inputs:[],attrs:[],customExecutor:t},r[e]=t}function o(e){return r[e]}function a(e){delete r[e]}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({cumprod_:
/**
 * @license
 * Copyright 2022 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the 'License');
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an 'AS IS' BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t=0,n=!1,a=!1){return e=Object(o.a)(e,"x","cumprod"),r.a.runKernel(i.M,{x:e},{axis:t,exclusive:n,reverse:a})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({min_:
/**
 * @license
 * Copyright 2020 Google Inc. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t=null,n=!1){return e=Object(o.a)(e,"x","min"),r.a.runKernel(i.Ub,{x:e},{axis:t,keepDims:n})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({oneHot_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t,n=1,a=0,s="int32"){if(t<2)throw new Error("Error in oneHot: depth must be >=2, but it is "+t);return e=Object(o.a)(e,"indices","oneHot","int32"),r.a.runKernel(i.fc,{indices:e},{dtype:s,depth:t,onValue:n,offValue:a})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(10);t=n(5);const a=Object(t.b)({ifft_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){return Object(o.b)("complex64"===e.dtype,()=>`The dtype for tf.spectral.ifft() must be complex64 but got ${e.dtype}.`),r.a.runKernel(i.sb,{input:e})}})},function(e,t,n){"use strict";(function(e,r){
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
let i;function o(){if(null==i){let t;if("undefined"!=typeof window)t=window;else if(void 0!==e)t=e;else if(void 0!==r)t=r;else{if("undefined"==typeof self)throw new Error("Could not find a global object");t=self}i=t}return i}function a(e,t){const n=function(){const e=o();return null==e._tfGlobals&&(e._tfGlobals=new Map),e._tfGlobals}();return n.has(e)||(t=t(),n.set(e,t)),n.get(e)}n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return a}))}).call(this,n(67),n(117))},function(e,t,n){var r;!function(){"use strict";
/*!
   *  decimal.js v10.4.2
   *  An arbitrary-precision Decimal type for JavaScript.
   *  https://github.com/MikeMcl/decimal.js
   *  Copyright (c) 2022 Michael Mclaughlin <M8ch88l@gmail.com>
   *  MIT Licence
   */var i,o,a,s=9e15,u=1e9,c="0123456789abcdef",l="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",h="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",f={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-s,maxE:s,crypto:!1},d=!0,p="[DecimalError] ",m=p+"Invalid argument: ",g=p+"Precision limit exceeded",A=p+"crypto unavailable",v="[object Decimal]",b=Math.floor,y=Math.pow,w=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,x=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,C=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,k=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,E=1e7,S=l.length-1,_=h.length-1,O={toStringTag:v};function T(e){var t,n,r,i=e.length-1,o="",a=e[0];if(0<i){for(o+=a,t=1;t<i;t++)(n=7-(r=e[t]+"").length)&&(o+=$(n)),o+=r;(n=7-(r=(a=e[t])+"").length)&&(o+=$(n))}else if(0===a)return"0";for(;a%10==0;)a/=10;return o+a}function D(e,t,n){if(e!==~~e||e<t||n<e)throw Error(m+e)}function B(e,t,n,r){for(var i,o,a=e[0];10<=a;a/=10)--t;return--t<0?(t+=7,i=0):(i=Math.ceil((t+1)/7),t%=7),a=y(10,7-t),o=e[i]%a|0,null==r?t<3?(0==t?o=o/100|0:1==t&&(o=o/10|0),n<4&&99999==o||3<n&&49999==o||5e4==o||0==o):(n<4&&o+1==a||3<n&&o+1==a/2)&&(e[i+1]/a/100|0)==y(10,t-2)-1||(o==a/2||0==o)&&0==(e[i+1]/a/100|0):t<4?(0==t?o=o/1e3|0:1==t?o=o/100|0:2==t&&(o=o/10|0),(r||n<4)&&9999==o||!r&&3<n&&4999==o):((r||n<4)&&o+1==a||!r&&3<n&&o+1==a/2)&&(e[i+1]/a/1e3|0)==y(10,t-3)-1}function I(e,t,n){for(var r,i,o=[0],a=0,s=e.length;a<s;){for(i=o.length;i--;)o[i]*=t;for(o[0]+=c.indexOf(e.charAt(a++)),r=0;r<o.length;r++)o[r]>n-1&&(void 0===o[r+1]&&(o[r+1]=0),o[r+1]+=o[r]/n|0,o[r]%=n)}return o.reverse()}O.absoluteValue=O.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),R(e)},O.ceil=function(){return R(new this.constructor(this),this.e+1,2)},O.clampedTo=O.clamp=function(e,t){var n=this.constructor;if(e=new n(e),t=new n(t),!e.s||!t.s)return new n(NaN);if(e.gt(t))throw Error(m+t);return this.cmp(e)<0?e:0<this.cmp(t)?t:new n(this)},O.comparedTo=O.cmp=function(e){var t,n,r=this.d,i=(e=new this.constructor(e)).d,o=this.s,a=e.s;if(!r||!i)return o&&a?o!==a?o:r===i?0:!r^o<0?1:-1:NaN;if(!r[0]||!i[0])return r[0]?o:i[0]?-a:0;if(o!==a)return o;if(this.e!==e.e)return this.e>e.e^o<0?1:-1;for(t=0,n=(a=r.length)<(e=i.length)?a:e;t<n;++t)if(r[t]!==i[t])return r[t]>i[t]^o<0?1:-1;return a===e?0:e<a^o<0?1:-1},O.cosine=O.cos=function(){var e,t,n=this,r=n.constructor;return n.d?n.d[0]?(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+7,r.rounding=1,n=function(e,t){var n,r;if(!t.isZero()){r=(r=t.d.length)<32?(1/J(4,n=Math.ceil(r/3))).toString():(n=16,"2.3283064365386962890625e-10"),e.precision+=n,t=X(e,1,t.times(r),new e(1));for(var i=n;i--;){var o=t.times(t);t=o.times(o).minus(o).times(8).plus(1)}e.precision-=n}return t}(r,Z(r,n)),r.precision=e,r.rounding=t,R(2==a||3==a?n.neg():n,e,t,!0)):new r(1):new r(NaN)},O.cubeRoot=O.cbrt=function(){var e,t,n,r,i,o,a,s,u,c,l=this,h=l.constructor;if(!l.isFinite()||l.isZero())return new h(l);for(d=!1,(o=l.s*y(l.s*l,1/3))&&Math.abs(o)!=1/0?r=new h(o.toString()):(n=T(l.d),(o=((e=l.e)-n.length+1)%3)&&(n+=1==o||-2==o?"0":"00"),o=y(n,1/3),e=b((e+1)/3)-(e%3==(e<0?-1:2)),(r=new h(n=o==1/0?"5e"+e:(n=o.toExponential()).slice(0,n.indexOf("e")+1)+e)).s=l.s),a=(e=h.precision)+3;;)if(c=(u=(s=r).times(s).times(s)).plus(l),r=M(c.plus(l).times(s),c.plus(u),a+2,1),T(s.d).slice(0,a)===(n=T(r.d)).slice(0,a)){if("9999"!=(n=n.slice(a-3,a+1))&&(i||"4999"!=n)){+n&&(+n.slice(1)||"5"!=n.charAt(0))||(R(r,e+1,1),t=!r.times(r).times(r).eq(l));break}if(!i&&(R(s,e+1,0),s.times(s).times(s).eq(l))){r=s;break}a+=4,i=1}return d=!0,R(r,e,h.rounding,t)},O.decimalPlaces=O.dp=function(){var e,t=this.d,n=NaN;if(t){if(n=7*((e=t.length-1)-b(this.e/7)),e=t[e])for(;e%10==0;e/=10)n--;n<0&&(n=0)}return n},O.dividedBy=O.div=function(e){return M(this,new this.constructor(e))},O.dividedToIntegerBy=O.divToInt=function(e){var t=this.constructor;return R(M(this,new t(e),0,1,1),t.precision,t.rounding)},O.equals=O.eq=function(e){return 0===this.cmp(e)},O.floor=function(){return R(new this.constructor(this),this.e+1,3)},O.greaterThan=O.gt=function(e){return 0<this.cmp(e)},O.greaterThanOrEqualTo=O.gte=function(e){return 1==(e=this.cmp(e))||0===e},O.hyperbolicCosine=O.cosh=function(){var e,t,n,r=(s=this).constructor,i=new r(1);if(!s.isFinite())return new r(s.s?1/0:NaN);if(s.isZero())return i;t=r.precision,n=r.rounding,r.precision=t+Math.max(s.e,s.sd())+4,r.rounding=1;for(var o,a=(a=s.d.length)<32?(1/J(4,e=Math.ceil(a/3))).toString():(e=16,"2.3283064365386962890625e-10"),s=X(r,1,s.times(a),new r(1),!0),u=e,c=new r(8);u--;)o=s.times(s),s=i.minus(o.times(c.minus(o.times(c))));return R(s,r.precision=t,r.rounding=n,!0)},O.hyperbolicSine=O.sinh=function(){var e,t,n,r=(a=this).constructor;if(!a.isFinite()||a.isZero())return new r(a);if(e=r.precision,t=r.rounding,r.precision=e+Math.max(a.e,a.sd())+4,r.rounding=1,(n=a.d.length)<3)a=X(r,2,a,a,!0);else for(var i,o=1.4*Math.sqrt(n),a=X(r,2,a=a.times(1/J(5,o=16<o?16:0|o)),a,!0),s=new r(5),u=new r(16),c=new r(20);o--;)i=a.times(a),a=a.times(s.plus(i.times(u.times(i).plus(c))));return R(a,r.precision=e,r.rounding=t,!0)},O.hyperbolicTangent=O.tanh=function(){var e,t,n=this.constructor;return this.isFinite()?this.isZero()?new n(this):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,M(this.sinh(),this.cosh(),n.precision=e,n.rounding=t)):new n(this.s)},O.inverseCosine=O.acos=function(){var e=this,t=e.constructor,n=e.abs().cmp(1),r=t.precision,i=t.rounding;return-1!==n?0===n?e.isNeg()?z(t,r,i):new t(0):new t(NaN):e.isZero()?z(t,r+4,i).times(.5):(t.precision=r+6,t.rounding=1,e=e.asin(),n=z(t,r+4,i).times(.5),t.precision=r,t.rounding=i,n.minus(e))},O.inverseHyperbolicCosine=O.acosh=function(){var e,t,n=this,r=n.constructor;return n.lte(1)?new r(n.eq(1)?0:NaN):n.isFinite()?(e=r.precision,t=r.rounding,r.precision=e+Math.max(Math.abs(n.e),n.sd())+4,r.rounding=1,d=!1,n=n.times(n).minus(1).sqrt().plus(n),d=!0,r.precision=e,r.rounding=t,n.ln()):new r(n)},O.inverseHyperbolicSine=O.asinh=function(){var e,t,n=this,r=n.constructor;return!n.isFinite()||n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+2*Math.max(Math.abs(n.e),n.sd())+6,r.rounding=1,d=!1,n=n.times(n).plus(1).sqrt().plus(n),d=!0,r.precision=e,r.rounding=t,n.ln())},O.inverseHyperbolicTangent=O.atanh=function(){var e,t,n,r=this,i=r.constructor;return r.isFinite()?0<=r.e?new i(r.abs().eq(1)?r.s/0:r.isZero()?r:NaN):(e=i.precision,t=i.rounding,n=r.sd(),Math.max(n,e)<2*-r.e-1?R(new i(r),e,t,!0):(i.precision=n-=r.e,r=M(r.plus(1),new i(1).minus(r),n+e,1),i.precision=e+4,i.rounding=1,r=r.ln(),i.precision=e,i.rounding=t,r.times(.5))):new i(NaN)},O.inverseSine=O.asin=function(){var e,t,n,r=this,i=r.constructor;return r.isZero()?new i(r):(e=r.abs().cmp(1),t=i.precision,n=i.rounding,-1!==e?0===e?((e=z(i,t+4,n).times(.5)).s=r.s,e):new i(NaN):(i.precision=t+6,i.rounding=1,r=r.div(new i(1).minus(r.times(r)).sqrt().plus(1)).atan(),i.precision=t,i.rounding=n,r.times(2)))},O.inverseTangent=O.atan=function(){var e,t,n,r,i,o,a,s,u,c=this,l=c.constructor,h=l.precision,f=l.rounding;if(c.isFinite()){if(c.isZero())return new l(c);if(c.abs().eq(1)&&h+4<=_)return(a=z(l,h+4,f).times(.25)).s=c.s,a}else{if(!c.s)return new l(NaN);if(h+4<=_)return(a=z(l,h+4,f).times(.5)).s=c.s,a}for(l.precision=s=h+10,l.rounding=1,e=n=Math.min(28,s/7+2|0);e;--e)c=c.div(c.times(c).plus(1).sqrt().plus(1));for(d=!1,t=Math.ceil(s/7),r=1,u=c.times(c),a=new l(c),i=c;-1!==e;)if(i=i.times(u),o=a.minus(i.div(r+=2)),i=i.times(u),void 0!==(a=o.plus(i.div(r+=2))).d[t])for(e=t;a.d[e]===o.d[e]&&e--;);return n&&(a=a.times(2<<n-1)),d=!0,R(a,l.precision=h,l.rounding=f,!0)},O.isFinite=function(){return!!this.d},O.isInteger=O.isInt=function(){return!!this.d&&b(this.e/7)>this.d.length-2},O.isNaN=function(){return!this.s},O.isNegative=O.isNeg=function(){return this.s<0},O.isPositive=O.isPos=function(){return 0<this.s},O.isZero=function(){return!!this.d&&0===this.d[0]},O.lessThan=O.lt=function(e){return this.cmp(e)<0},O.lessThanOrEqualTo=O.lte=function(e){return this.cmp(e)<1},O.logarithm=O.log=function(e){var t,n,r,i,o,a,s,u,c=this.constructor,l=c.precision,h=c.rounding;if(null==e)e=new c(10),t=!0;else{if(n=(e=new c(e)).d,e.s<0||!n||!n[0]||e.eq(1))return new c(NaN);t=e.eq(10)}if(n=this.d,this.s<0||!n||!n[0]||this.eq(1))return new c(n&&!n[0]?-1/0:1!=this.s?NaN:n?0:1/0);if(t)if(1<n.length)o=!0;else{for(i=n[0];i%10==0;)i/=10;o=1!==i}if(d=!1,a=W(this,s=l+5),r=t?U(c,s+10):W(e,s),B((u=M(a,r,s,1)).d,i=l,h))do{if(a=W(this,s+=10),r=t?U(c,s+10):W(e,s),u=M(a,r,s,1),!o){+T(u.d).slice(i+1,i+15)+1==1e14&&(u=R(u,l+1,0));break}}while(B(u.d,i+=10,h));return d=!0,R(u,l,h)},O.minus=O.sub=function(e){var t,n,r,i,o,a,s,u,c,l,h,f,p=this,m=p.constructor;if(e=new m(e),!p.d||!e.d)return p.s&&e.s?p.d?e.s=-e.s:e=new m(e.d||p.s!==e.s?p:NaN):e=new m(NaN),e;if(p.s!=e.s)return e.s=-e.s,p.plus(e);if(c=p.d,f=e.d,s=m.precision,u=m.rounding,c[0]&&f[0]){if(n=b(e.e/7),l=b(p.e/7),c=c.slice(),o=l-n){for(a=((h=o<0)?(t=c,o=-o,f):(t=f,n=l,c)).length,(r=Math.max(Math.ceil(s/7),a)+2)<o&&(o=r,t.length=1),t.reverse(),r=o;r--;)t.push(0);t.reverse()}else{for((h=(r=c.length)<(a=f.length))&&(a=r),r=0;r<a;r++)if(c[r]!=f[r]){h=c[r]<f[r];break}o=0}for(h&&(t=c,c=f,f=t,e.s=-e.s),a=c.length,r=f.length-a;0<r;--r)c[a++]=0;for(r=f.length;o<r;){if(c[--r]<f[r]){for(i=r;i&&0===c[--i];)c[i]=E-1;--c[i],c[r]+=E}c[r]-=f[r]}for(;0===c[--a];)c.pop();for(;0===c[0];c.shift())--n;if(!c[0])return new m(3===u?-0:0);e.d=c,e.e=L(c,n)}else if(f[0])e.s=-e.s;else{if(!c[0])return new m(3===u?-0:0);e=new m(p)}return d?R(e,s,u):e},O.modulo=O.mod=function(e){var t,n=this.constructor;return e=new n(e),!this.d||!e.s||e.d&&!e.d[0]?new n(NaN):!e.d||this.d&&!this.d[0]?R(new n(this),n.precision,n.rounding):(d=!1,9==n.modulo?(t=M(this,e.abs(),0,3,1)).s*=e.s:t=M(this,e,0,n.modulo,1),t=t.times(e),d=!0,this.minus(t))},O.naturalExponential=O.exp=function(){return G(this)},O.naturalLogarithm=O.ln=function(){return W(this)},O.negated=O.neg=function(){var e=new this.constructor(this);return e.s=-e.s,R(e)},O.plus=O.add=function(e){var t,n,r,i,o,a,s,u,c,l,h=this,f=h.constructor;if(e=new f(e),!h.d||!e.d)return h.s&&e.s?h.d||(e=new f(e.d||h.s===e.s?h:NaN)):e=new f(NaN),e;if(h.s!=e.s)return e.s=-e.s,h.minus(e);if(c=h.d,l=e.d,s=f.precision,u=f.rounding,c[0]&&l[0]){if(o=b(h.e/7),r=b(e.e/7),c=c.slice(),i=o-r){for((a=(a=(i<0?(n=c,i=-i,l):(n=l,r=o,c)).length)<(o=Math.ceil(s/7))?o+1:a+1)<i&&(i=a,n.length=1),n.reverse();i--;)n.push(0);n.reverse()}for((a=c.length)-(i=l.length)<0&&(i=a,n=l,l=c,c=n),t=0;i;)t=(c[--i]=c[i]+l[i]+t)/E|0,c[i]%=E;for(t&&(c.unshift(t),++r),a=c.length;0==c[--a];)c.pop();e.d=c,e.e=L(c,r)}else l[0]||(e=new f(h));return d?R(e,s,u):e},O.precision=O.sd=function(e){var t;if(void 0!==e&&e!==!!e&&1!==e&&0!==e)throw Error(m+e);return this.d?(t=H(this.d),e&&this.e+1>t&&(t=this.e+1)):t=NaN,t},O.round=function(){var e=this.constructor;return R(new e(this),this.e+1,e.rounding)},O.sine=O.sin=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+7,r.rounding=1,n=function(e,t){var n,r=t.d.length;if(r<3)return t.isZero()?t:X(e,2,t,t);n=16<(n=1.4*Math.sqrt(r))?16:0|n,t=X(e,2,t=t.times(1/J(5,n)),t);for(var i,o=new e(5),a=new e(16),s=new e(20);n--;)i=t.times(t),t=t.times(o.plus(i.times(a.times(i).minus(s))));return t}(r,Z(r,n)),r.precision=e,r.rounding=t,R(2<a?n.neg():n,e,t,!0)):new r(NaN)},O.squareRoot=O.sqrt=function(){var e,t,n,r,i,o,a=this.d,s=this.e,u=this.s,c=this.constructor;if(1!==u||!a||!a[0])return new c(!u||u<0&&(!a||a[0])?NaN:a?this:1/0);for(d=!1,r=0==(u=Math.sqrt(+this))||u==1/0?(((t=T(a)).length+s)%2==0&&(t+="0"),u=Math.sqrt(t),s=b((s+1)/2)-(s<0||s%2),new c(t=u==1/0?"5e"+s:(t=u.toExponential()).slice(0,t.indexOf("e")+1)+s)):new c(u.toString()),n=(s=c.precision)+3;;)if(r=(o=r).plus(M(this,o,n+2,1)).times(.5),T(o.d).slice(0,n)===(t=T(r.d)).slice(0,n)){if("9999"!=(t=t.slice(n-3,n+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(R(r,s+1,1),e=!r.times(r).eq(this));break}if(!i&&(R(o,s+1,0),o.times(o).eq(this))){r=o;break}n+=4,i=1}return d=!0,R(r,s,c.rounding,e)},O.tangent=O.tan=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+10,r.rounding=1,(n=n.sin()).s=1,n=M(n,new r(1).minus(n.times(n)).sqrt(),e+10,0),r.precision=e,r.rounding=t,R(2==a||4==a?n.neg():n,e,t,!0)):new r(NaN)},O.times=O.mul=function(e){var t,n,r,i,o,a,s,u,c,l=this.constructor,h=this.d,f=(e=new l(e)).d;if(e.s*=this.s,!(h&&h[0]&&f&&f[0]))return new l(!e.s||h&&!h[0]&&!f||f&&!f[0]&&!h?NaN:h&&f?0*e.s:e.s/0);for(n=b(this.e/7)+b(e.e/7),(u=h.length)<(c=f.length)&&(o=h,h=f,f=o,a=u,u=c,c=a),o=[],r=a=u+c;r--;)o.push(0);for(r=c;0<=--r;){for(t=0,i=u+r;r<i;)s=o[i]+f[r]*h[i-r-1]+t,o[i--]=s%E|0,t=s/E|0;o[i]=(o[i]+t)%E|0}for(;!o[--a];)o.pop();return t?++n:o.shift(),e.d=o,e.e=L(o,n),d?R(e,l.precision,l.rounding):e},O.toBinary=function(e,t){return ee(this,2,e,t)},O.toDecimalPlaces=O.toDP=function(e,t){var n=this.constructor,r=new n(this);return void 0===e?r:(D(e,0,u),void 0===t?t=n.rounding:D(t,0,8),R(r,e+r.e+1,t))},O.toExponential=function(e,t){var n=this,r=n.constructor;r=void 0===e?P(n,!0):(D(e,0,u),void 0===t?t=r.rounding:D(t,0,8),P(n=R(new r(n),e+1,t),!0,e+1));return n.isNeg()&&!n.isZero()?"-"+r:r},O.toFixed=function(e,t){var n=this.constructor;t=void 0===e?P(this):(D(e,0,u),void 0===t?t=n.rounding:D(t,0,8),P(n=R(new n(this),e+this.e+1,t),!1,e+n.e+1));return this.isNeg()&&!this.isZero()?"-"+t:t},O.toFraction=function(e){var t,n,r,i,o,a,s,u,c,l,h=this.d,f=this.constructor;if(!h)return new f(this);if(u=n=new f(1),r=s=new f(0),o=(t=new f(r)).e=H(h)-this.e-1,t.d[0]=y(10,(c=o%7)<0?7+c:c),null==e)e=0<o?t:u;else{if(!(a=new f(e)).isInt()||a.lt(u))throw Error(m+a);e=a.gt(t)?0<o?t:u:a}for(d=!1,a=new f(T(h)),c=f.precision,f.precision=o=7*h.length*2;l=M(a,t,0,1,1),1!=(i=n.plus(l.times(r))).cmp(e);)n=r,r=i,i=u,u=s.plus(l.times(i)),s=i,i=t,t=a.minus(l.times(i)),a=i;return i=M(e.minus(n),r,0,1,1),s=s.plus(i.times(u)),n=n.plus(i.times(r)),s.s=u.s=this.s,h=M(u,r,o,1).minus(this).abs().cmp(M(s,n,o,1).minus(this).abs())<1?[u,r]:[s,n],f.precision=c,d=!0,h},O.toHexadecimal=O.toHex=function(e,t){return ee(this,16,e,t)},O.toNearest=function(e,t){var n=(r=this).constructor,r=new n(r);if(null==e){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),void 0===t?t=n.rounding:D(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(d=!1,r=M(r,e,0,t,1).times(e),d=!0,R(r)):(e.s=r.s,r=e),r},O.toNumber=function(){return+this},O.toOctal=function(e,t){return ee(this,8,e,t)},O.toPower=O.pow=function(e){var t,n,r,i,o,a,s=this,u=s.constructor,c=+(e=new u(e));if(!(s.d&&e.d&&s.d[0]&&e.d[0]))return new u(y(+s,c));if((s=new u(s)).eq(1))return s;if(r=u.precision,o=u.rounding,e.eq(1))return R(s,r,o);if((t=b(e.e/7))>=e.d.length-1&&(n=c<0?-c:c)<=9007199254740991)return i=Q(u,s,n,r),e.s<0?new u(1).div(i):R(i,r,o);if((a=s.s)<0){if(t<e.d.length-1)return new u(NaN);if(0==(1&e.d[t])&&(a=1),0==s.e&&1==s.d[0]&&1==s.d.length)return s.s=a,s}return(t=0!=(n=y(+s,c))&&isFinite(n)?new u(n+"").e:b(c*(Math.log("0."+T(s.d))/Math.LN10+s.e+1)))>u.maxE+1||t<u.minE-1?new u(0<t?a/0:0):(d=!1,u.rounding=s.s=1,n=Math.min(12,(t+"").length),(i=(i=G(e.times(W(s,r+n)),r)).d&&B((i=R(i,r+5,1)).d,r,o)&&+T((i=R(G(e.times(W(s,(t=r+10)+n)),t),t+5,1)).d).slice(r+1,r+15)+1==1e14?R(i,r+1,0):i).s=a,d=!0,R(i,r,u.rounding=o))},O.toPrecision=function(e,t){var n=this,r=n.constructor;t=void 0===e?P(n,n.e<=r.toExpNeg||n.e>=r.toExpPos):(D(e,1,u),void 0===t?t=r.rounding:D(t,0,8),P(n=R(new r(n),e,t),e<=n.e||n.e<=r.toExpNeg,e));return n.isNeg()&&!n.isZero()?"-"+t:t},O.toSignificantDigits=O.toSD=function(e,t){var n=this.constructor;return void 0===e?(e=n.precision,t=n.rounding):(D(e,1,u),void 0===t?t=n.rounding:D(t,0,8)),R(new n(this),e,t)},O.toString=function(){var e=this.constructor;e=P(this,this.e<=e.toExpNeg||this.e>=e.toExpPos);return this.isNeg()&&!this.isZero()?"-"+e:e},O.truncated=O.trunc=function(){return R(new this.constructor(this),this.e+1,1)},O.valueOf=O.toJSON=function(){var e=this.constructor;e=P(this,this.e<=e.toExpNeg||this.e>=e.toExpPos);return this.isNeg()?"-"+e:e};var M=function(e,t,n,r,i,a){var s,u,c,l,h,f,d,p,m,g,A,v,y,w,x,C,k,S,_,O=e.constructor,T=e.s==t.s?1:-1,D=e.d,B=t.d;if(!(D&&D[0]&&B&&B[0]))return new O(e.s&&t.s&&(D?!B||D[0]!=B[0]:B)?D&&0==D[0]||!B?0*T:T/0:NaN);for(u=a?(h=1,e.e-t.e):(a=E,b(e.e/(h=7))-b(t.e/h)),S=B.length,C=D.length,m=(T=new O(T)).d=[],c=0;B[c]==(D[c]||0);c++);if(B[c]>(D[c]||0)&&u--,null==n?(y=n=O.precision,r=O.rounding):y=i?n+(e.e-t.e)+1:n,y<0)m.push(1),f=!0;else{if(y=y/h+2|0,c=0,1==S){for(B=B[l=0],y++;(c<C||l)&&y--;c++)w=l*a+(D[c]||0),m[c]=w/B|0,l=w%B|0;f=l||c<C}else{for(1<(l=a/(B[0]+1)|0)&&(B=j(B,l,a),D=j(D,l,a),S=B.length,C=D.length),x=S,A=(g=D.slice(0,S)).length;A<S;)g[A++]=0;for((_=B.slice()).unshift(0),k=B[0],B[1]>=a/2&&++k;l=0,(s=N(B,g,S,A))<0?(v=g[0],1<(l=(v=S!=A?v*a+(g[1]||0):v)/k|0)?1==(s=N(d=j(B,l=a<=l?a-1:l,a),g,p=d.length,A=g.length))&&(l--,F(d,S<p?_:B,p,a)):(0==l&&(s=l=1),d=B.slice()),(p=d.length)<A&&d.unshift(0),F(g,d,A,a),-1==s&&(s=N(B,g,S,A=g.length))<1&&(l++,F(g,S<A?_:B,A,a)),A=g.length):0===s&&(l++,g=[0]),m[c++]=l,s&&g[0]?g[A++]=D[x]||0:(g=[D[x]],A=1),(x++<C||void 0!==g[0])&&y--;);f=void 0!==g[0]}m[0]||m.shift()}if(1==h)T.e=u,o=f;else{for(c=1,l=m[0];10<=l;l/=10)c++;T.e=c+u*h-1,R(T,i?n+T.e+1:n,r,f)}return T};function j(e,t,n){var r,i=0,o=e.length;for(e=e.slice();o--;)r=e[o]*t+i,e[o]=r%n|0,i=r/n|0;return i&&e.unshift(i),e}function N(e,t,n,r){var i,o;if(n!=r)o=r<n?1:-1;else for(i=o=0;i<n;i++)if(e[i]!=t[i]){o=e[i]>t[i]?1:-1;break}return o}function F(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]<t[n]?1:0,e[n]=i*r+e[n]-t[n];for(;!e[0]&&1<e.length;)e.shift()}function R(e,t,n,r){var i,o,a,s,u,c,l,h,f=e.constructor;e:if(null!=t){if(!(l=e.d))return e;for(i=1,s=l[0];10<=s;s/=10)i++;if((o=t-i)<0)o+=7,a=t,u=(c=l[h=0])/y(10,i-a-1)%10|0;else if(h=Math.ceil((o+1)/7),(s=l.length)<=h){if(!r)break e;for(;s++<=h;)l.push(0);c=u=0,a=(o%=7)-7+(i=1)}else{for(c=s=l[h],i=1;10<=s;s/=10)i++;u=(a=(o%=7)-7+i)<0?0:c/y(10,i-a-1)%10|0}if(r=r||t<0||void 0!==l[h+1]||(a<0?c:c%y(10,i-a-1)),u=n<4?(u||r)&&(0==n||n==(e.s<0?3:2)):5<u||5==u&&(4==n||r||6==n&&(0<o?0<a?c/y(10,i-a):0:l[h-1])%10&1||n==(e.s<0?8:7)),t<1||!l[0])return l.length=0,u?(t-=e.e+1,l[0]=y(10,(7-t%7)%7),e.e=-t||0):l[0]=e.e=0,e;if(0==o?(l.length=h,s=1,h--):(l.length=h+1,s=y(10,7-o),l[h]=0<a?(c/y(10,i-a)%y(10,a)|0)*s:0),u)for(;;){if(0==h){for(o=1,a=l[0];10<=a;a/=10)o++;for(a=l[0]+=s,s=1;10<=a;a/=10)s++;o!=s&&(e.e++,l[0]==E&&(l[0]=1));break}if(l[h]+=s,l[h]!=E)break;l[h--]=0,s=1}for(o=l.length;0===l[--o];)l.pop()}return d&&(e.e>f.maxE?(e.d=null,e.e=NaN):e.e<f.minE&&(e.e=0,e.d=[0])),e}function P(e,t,n){var r,i,o,a;return e.isFinite()?(i=e.e,a=(o=T(e.d)).length,t?(n&&0<(r=n-a)?o=o.charAt(0)+"."+o.slice(1)+$(r):1<a&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):i<0?(o="0."+$(-i-1)+o,n&&0<(r=n-a)&&(o+=$(r))):a<=i?(o+=$(i+1-a),n&&0<(r=n-i-1)&&(o=o+"."+$(r))):((r=i+1)<a&&(o=o.slice(0,r)+"."+o.slice(r)),n&&0<(r=n-a)&&(i+1===a&&(o+="."),o+=$(r))),o):K(e)}function L(e,t){var n=e[0];for(t*=7;10<=n;n/=10)t++;return t}function U(e,t,n){if(S<t)throw d=!0,n&&(e.precision=n),Error(g);return R(new e(l),t,1,!0)}function z(e,t,n){if(_<t)throw Error(g);return R(new e(h),t,n,!0)}function H(e){var t=e.length-1,n=7*t+1;if(t=e[t]){for(;t%10==0;t/=10)n--;for(t=e[0];10<=t;t/=10)n++}return n}function $(e){for(var t="";e--;)t+="0";return t}function Q(e,t,n,r){var i,o=new e(1),a=Math.ceil(r/7+4);for(d=!1;;){if(n%2&&te((o=o.times(t)).d,a)&&(i=!0),0===(n=b(n/2))){n=o.d.length-1,i&&0===o.d[n]&&++o.d[n];break}te((t=t.times(t)).d,a)}return d=!0,o}function V(e){return 1&e.d[e.d.length-1]}function q(e,t,n){for(var r,i=new e(t[0]),o=0;++o<t.length;){if(!(r=new e(t[o])).s){i=r;break}i[n](r)&&(i=r)}return i}function G(e,t){var n,r,i,o,a,s,u,c=0,l=0,h=0,f=e.constructor,p=f.rounding,m=f.precision;if(!e.d||!e.d[0]||17<e.e)return new f(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(u=null==t?(d=!1,m):t,s=new f(.03125);-2<e.e;)e=e.times(s),h+=5;for(u+=r=Math.log(y(2,h))/Math.LN10*2+5|0,n=o=a=new f(1),f.precision=u;;){if(o=R(o.times(e),u,1),n=n.times(++l),T((s=a.plus(M(o,n,u,1))).d).slice(0,u)===T(a.d).slice(0,u)){for(i=h;i--;)a=R(a.times(a),u,1);if(null!=t)return f.precision=m,a;if(!(c<3&&B(a.d,u-r,p,c)))return R(a,f.precision=m,p,d=!0);f.precision=u+=10,n=o=s=new f(1),l=0,c++}a=s}}function W(e,t){var n,r,i,o,a,s,u,c,l,h,f,p=1,m=e,g=m.d,A=m.constructor,v=A.rounding,b=A.precision;if(m.s<0||!g||!g[0]||!m.e&&1==g[0]&&1==g.length)return new A(g&&!g[0]?-1/0:1!=m.s?NaN:g?0:m);if(l=null==t?(d=!1,b):t,A.precision=l+=10,r=(n=T(g)).charAt(0),!(Math.abs(o=m.e)<15e14))return c=U(A,l+2,b).times(o+""),m=W(new A(r+"."+n.slice(1)),l-10).plus(c),A.precision=b,null==t?R(m,b,v,d=!0):m;for(;r<7&&1!=r||1==r&&3<n.charAt(1);)r=(n=T((m=m.times(e)).d)).charAt(0),p++;for(o=m.e,1<r?(m=new A("0."+n),o++):m=new A(r+"."+n.slice(1)),u=a=m=M((h=m).minus(1),m.plus(1),l,1),f=R(m.times(m),l,1),i=3;;){if(a=R(a.times(f),l,1),T((c=u.plus(M(a,new A(i),l,1))).d).slice(0,l)===T(u.d).slice(0,l)){if(u=u.times(2),0!==o&&(u=u.plus(U(A,l+2,b).times(o+""))),u=M(u,new A(p),l,1),null!=t)return A.precision=b,u;if(!B(u.d,l-10,v,s))return R(u,A.precision=b,v,d=!0);A.precision=l+=10,c=a=m=M(h.minus(1),h.plus(1),l,1),f=R(m.times(m),l,1),i=s=1}u=c,i+=2}}function K(e){return String(e.s*e.s/0)}function Y(e,t){var n,r,i;for(0<(r=(t=-1<(n=t.indexOf("."))?t.replace(".",""):t).search(/e/i))?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;48===t.charCodeAt(r);r++);for(i=t.length;48===t.charCodeAt(i-1);--i);if(t=t.slice(r,i)){if(i-=r,e.e=n=n-r-1,e.d=[],r=(n+1)%7,n<0&&(r+=7),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=7;r<i;)e.d.push(+t.slice(r,r+=7));r=7-(t=t.slice(r)).length}else r-=i;for(;r--;)t+="0";e.d.push(+t),d&&(e.e>e.constructor.maxE?(e.d=null,e.e=NaN):e.e<e.constructor.minE&&(e.e=0,e.d=[0]))}else e.e=0,e.d=[0];return e}function X(e,t,n,r,i){var o,a,s,u,c=e.precision,l=Math.ceil(c/7);for(d=!1,u=n.times(n),s=new e(r);;){if(a=M(s.times(u),new e(t++*t++),c,1),s=i?r.plus(a):r.minus(a),r=M(a.times(u),new e(t++*t++),c,1),void 0!==(a=s.plus(r)).d[l]){for(o=l;a.d[o]===s.d[o]&&o--;);if(-1==o)break}o=s,s=r,r=a,a=o}return d=!0,a.d.length=l+1,a}function J(e,t){for(var n=e;--t;)n*=e;return n}function Z(e,t){var n,r=t.s<0,i=(e=z(e,e.precision,1)).times(.5);if((t=t.abs()).lte(i))return a=r?4:1,t;if((n=t.divToInt(e)).isZero())a=r?3:2;else{if((t=t.minus(n.times(e))).lte(i))return a=V(n)?r?2:3:r?4:1,t;a=V(n)?r?1:4:r?3:2}return t.minus(e).abs()}function ee(e,t,n,r){var i,a,s,l,h,f,d,p,m=e.constructor,g=void 0!==n;if(g?(D(n,1,u),void 0===r?r=m.rounding:D(r,0,8)):(n=m.precision,r=m.rounding),e.isFinite()){for(g?(i=2,16==t?n=4*n-3:8==t&&(n=3*n-2)):i=t,0<=(s=(f=P(e)).indexOf("."))&&(f=f.replace(".",""),(p=new m(1)).e=f.length-s,p.d=I(P(p),10,i),p.e=p.d.length),a=l=(d=I(f,10,i)).length;0==d[--l];)d.pop();if(d[0]){if(s<0?a--:((e=new m(e)).d=d,e.e=a,d=(e=M(e,p,n,r,0,i)).d,a=e.e,h=o),s=d[n],m=i/2,h=h||void 0!==d[n+1],h=r<4?(void 0!==s||h)&&(0===r||r===(e.s<0?3:2)):m<s||s===m&&(4===r||h||6===r&&1&d[n-1]||r===(e.s<0?8:7)),d.length=n,h)for(;++d[--n]>i-1;)d[n]=0,n||(++a,d.unshift(1));for(l=d.length;!d[l-1];--l);for(s=0,f="";s<l;s++)f+=c.charAt(d[s]);if(g){if(1<l)if(16==t||8==t){for(s=16==t?4:3,--l;l%s;l++)f+="0";for(l=(d=I(f,i,t)).length;!d[l-1];--l);for(s=1,f="1.";s<l;s++)f+=c.charAt(d[s])}else f=f.charAt(0)+"."+f.slice(1);f=f+(a<0?"p":"p+")+a}else if(a<0){for(;++a;)f="0"+f;f="0."+f}else if(++a>l)for(a-=l;a--;)f+="0";else a<l&&(f=f.slice(0,a)+"."+f.slice(a))}else f=g?"0p+0":"0";f=(16==t?"0x":2==t?"0b":8==t?"0o":"")+f}else f=K(e);return e.s<0?"-"+f:f}function te(e,t){return e.length>t&&(e.length=t,1)}function ne(e){return new this(e).abs()}function re(e){return new this(e).acos()}function ie(e){return new this(e).acosh()}function oe(e,t){return new this(e).plus(t)}function ae(e){return new this(e).asin()}function se(e){return new this(e).asinh()}function ue(e){return new this(e).atan()}function ce(e){return new this(e).atanh()}function le(e,t){e=new this(e),t=new this(t);var n,r=this.precision,i=this.rounding,o=r+4;return e.s&&t.s?e.d||t.d?!t.d||e.isZero()?(n=t.s<0?z(this,r,i):new this(0)).s=e.s:!e.d||t.isZero()?(n=z(this,o,1).times(.5)).s=e.s:n=t.s<0?(this.precision=o,this.rounding=1,n=this.atan(M(e,t,o,1)),t=z(this,o,1),this.precision=r,this.rounding=i,e.s<0?n.minus(t):n.plus(t)):this.atan(M(e,t,o,1)):(n=z(this,o,1).times(0<t.s?.25:.75)).s=e.s:n=new this(NaN),n}function he(e){return new this(e).cbrt()}function fe(e){return R(e=new this(e),e.e+1,2)}function de(e,t,n){return new this(e).clamp(t,n)}function pe(e){if(!e||"object"!=typeof e)throw Error(p+"Object expected");for(var t,n,r=!0===e.defaults,i=["precision",1,u,"rounding",0,8,"toExpNeg",-s,0,"toExpPos",0,s,"maxE",0,s,"minE",-s,0,"modulo",0,9],o=0;o<i.length;o+=3)if(t=i[o],r&&(this[t]=f[t]),void 0!==(n=e[t])){if(!(b(n)===n&&i[o+1]<=n&&n<=i[o+2]))throw Error(m+t+": "+n);this[t]=n}if(t="crypto",r&&(this[t]=f[t]),void 0!==(n=e[t])){if(!0!==n&&!1!==n&&0!==n&&1!==n)throw Error(m+t+": "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw Error(A);this[t]=!0}else this[t]=!1}return this}function me(e){return new this(e).cos()}function ge(e){return new this(e).cosh()}function Ae(e,t){return new this(e).div(t)}function ve(e){return new this(e).exp()}function be(e){return R(e=new this(e),e.e+1,3)}function ye(){var e,t,n=new this(0);for(d=!1,e=0;e<arguments.length;)if((t=new this(arguments[e++])).d)n.d&&(n=n.plus(t.times(t)));else{if(t.s)return d=!0,new this(1/0);n=t}return d=!0,n.sqrt()}function we(e){return e instanceof i||e&&e.toStringTag===v||!1}function xe(e){return new this(e).ln()}function Ce(e,t){return new this(e).log(t)}function ke(e){return new this(e).log(2)}function Ee(e){return new this(e).log(10)}function Se(){return q(this,arguments,"lt")}function _e(){return q(this,arguments,"gt")}function Oe(e,t){return new this(e).mod(t)}function Te(e,t){return new this(e).mul(t)}function De(e,t){return new this(e).pow(t)}function Be(e){var t,n,r,i,o=0,a=new this(1),s=[];if(void 0===e?e=this.precision:D(e,1,u),r=Math.ceil(e/7),this.crypto)if(crypto.getRandomValues)for(t=crypto.getRandomValues(new Uint32Array(r));o<r;)429e7<=(i=t[o])?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:s[o++]=i%1e7;else{if(!crypto.randomBytes)throw Error(A);for(t=crypto.randomBytes(r*=4);o<r;)214e7<=(i=t[o]+(t[o+1]<<8)+(t[o+2]<<16)+((127&t[o+3])<<24))?crypto.randomBytes(4).copy(t,o):(s.push(i%1e7),o+=4);o=r/4}else for(;o<r;)s[o++]=1e7*Math.random()|0;for(e%=7,(r=s[--o])&&e&&(i=y(10,7-e),s[o]=(r/i|0)*i);0===s[o];o--)s.pop();if(o<0)s=[n=0];else{for(n=-1;0===s[0];n-=7)s.shift();for(r=1,i=s[0];10<=i;i/=10)r++;r<7&&(n-=7-r)}return a.e=n,a.d=s,a}function Ie(e){return R(e=new this(e),e.e+1,this.rounding)}function Me(e){return(e=new this(e)).d?e.d[0]?e.s:0*e.s:e.s||NaN}function je(e){return new this(e).sin()}function Ne(e){return new this(e).sinh()}function Fe(e){return new this(e).sqrt()}function Re(e,t){return new this(e).sub(t)}function Pe(){var e=0,t=arguments,n=new this(t[e]);for(d=!1;n.s&&++e<t.length;)n=n.plus(t[e]);return d=!0,R(n,this.precision,this.rounding)}function Le(e){return new this(e).tan()}function Ue(e){return new this(e).tanh()}function ze(e){return R(e=new this(e),e.e+1,1)}((i=function e(t){var n,r,o;function a(e){var t,n,r,o=this;if(!(o instanceof a))return new a(e);if(o.constructor=a,!we(e)){if("number"==(r=typeof e)){if(0===e)return o.s=1/e<0?-1:1,o.e=0,void(o.d=[0]);if(e<0?(e=-e,o.s=-1):o.s=1,e===~~e&&e<1e7){for(t=0,n=e;10<=n;n/=10)t++;return void(d?a.maxE<t?(o.e=NaN,o.d=null):t<a.minE?(o.e=0,o.d=[0]):(o.e=t,o.d=[e]):(o.e=t,o.d=[e]))}return 0*e!=0?(e||(o.s=NaN),o.e=NaN,void(o.d=null)):Y(o,e.toString())}if("string"!=r)throw Error(m+e);return 45===(n=e.charCodeAt(0))?(e=e.slice(1),o.s=-1):(43===n&&(e=e.slice(1)),o.s=1),(k.test(e)?Y:function(e,t){var n,r,o,a,s,u,c,l;if(-1<t.indexOf("_")){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),k.test(t))return Y(e,t)}else if("Infinity"===t||"NaN"===t)return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(x.test(t))n=16,t=t.toLowerCase();else if(w.test(t))n=2;else{if(!C.test(t))throw Error(m+t);n=8}for(a=(t=0<(a=t.search(/p/i))?(c=+t.slice(a+1),t.substring(2,a)):t.slice(2)).indexOf("."),r=e.constructor,(s=0<=a)&&(a=(u=(t=t.replace(".","")).length)-a,o=Q(r,new r(n),a,2*a)),a=t=(l=I(t,n,E)).length-1;0===l[a];--a)l.pop();return a<0?new r(0*e.s):(e.e=L(l,t),e.d=l,d=!1,s&&(e=M(e,o,4*u)),c&&(e=e.times(Math.abs(c)<54?y(2,c):i.pow(2,c))),d=!0,e)})(o,e)}o.s=e.s,d?!e.d||e.e>a.maxE?(o.e=NaN,o.d=null):e.e<a.minE?(o.e=0,o.d=[0]):(o.e=e.e,o.d=e.d.slice()):(o.e=e.e,o.d=e.d&&e.d.slice())}if(a.prototype=O,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.EUCLID=9,a.config=a.set=pe,a.clone=e,a.isDecimal=we,a.abs=ne,a.acos=re,a.acosh=ie,a.add=oe,a.asin=ae,a.asinh=se,a.atan=ue,a.atanh=ce,a.atan2=le,a.cbrt=he,a.ceil=fe,a.clamp=de,a.cos=me,a.cosh=ge,a.div=Ae,a.exp=ve,a.floor=be,a.hypot=ye,a.ln=xe,a.log=Ce,a.log10=Ee,a.log2=ke,a.max=Se,a.min=_e,a.mod=Oe,a.mul=Te,a.pow=De,a.random=Be,a.round=Ie,a.sign=Me,a.sin=je,a.sinh=Ne,a.sqrt=Fe,a.sub=Re,a.sum=Pe,a.tan=Le,a.tanh=Ue,a.trunc=ze,(t=void 0===t?{}:t)&&!0!==t.defaults)for(o=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],n=0;n<o.length;)t.hasOwnProperty(r=o[n++])||(t[r]=this[r]);return a.config(t),a}(f)).prototype.constructor=i).default=i.Decimal=i,l=new i(l),h=new i(h),void 0!==(r=function(){return i}.call(t,n,t,e))&&(e.exports=r)}()},function(e){e.exports=JSON.parse('[{"name":"sheet1","SheetData":{"freeze":"A1","columnHead":[{"Column":0},{"Column":1},{"Width":175,"Column":2}],"rowHead":[{"Row":0},{"Row":1},{"Row":2}],"stylesConfig":[{"align":"center","valign":"middle"},{"border":{"top":["thin","#000"],"left":["thin","#000"],"right":["thin","#000"],"bottom":["thin","#000"]}},{"align":"center","border":{"top":["thin","#000"],"left":["thin","#000"],"right":["thin","#000"],"bottom":["thin","#000"]},"valign":"middle"},{"align":"center","border":{"top":["thin","#000"],"left":["thin","#000"],"right":["thin","#000"],"bottom":["thin","#000"]}},{"align":"center"},{"align":"center","border":{"top":["thin","#000"],"left":["thin","#000"],"right":["thin","#000"],"bottom":["thin","#000"]},"bgcolor":"#AFABAC"}],"cellConfig":[{"column":0,"row":0,"value":"城市","styleIndex":3,"editable":true,"slash":{"text":"","type":0,"lineColor":"#000","lineStyle":"thin"},"dataConfig":{},"type":6},{"column":1,"row":0,"value":"公司","styleIndex":3,"type":6},{"column":2,"row":0,"value":"test.ProductName","valueType":1,"expansion":2,"styleIndex":3,"editable":false,"scaleType":1,"dataConfig":{"merge":1,"order":0,"value":"test.ProductName","axisType":1,"data_type":"3"},"type":2,"dataType":"3"},{"column":0,"row":1,"value":"test.City","valueType":1,"expansion":1,"styleIndex":2,"editable":false,"scaleType":1,"dataConfig":{"merge":1,"order":0,"value":"test.City","axisType":1,"data_type":"3"},"type":2,"dataType":"3","columnSpan":1,"rowSpan":2},{"column":1,"row":1,"value":"test.CompanyName","valueType":1,"expansion":1,"styleIndex":3,"editable":false,"scaleType":1,"dataConfig":{"merge":1,"order":0,"value":"test.CompanyName","axisType":1,"data_type":"3"},"type":2,"dataType":"3"},{"column":2,"row":1,"value":"test.Quantity","valueType":1,"expansion":3,"styleIndex":3,"editable":false,"scaleType":1,"dataConfig":{"order":0,"value":"test.Quantity","axisType":1,"dataList":1,"data_type":"2"},"type":2,"dataType":"2"},{"column":0,"row":2,"styleIndex":4},{"column":1,"row":2,"value":"小计：","styleIndex":5,"type":6},{"column":2,"row":2,"value":"=C2[A2:-1]","styleIndex":5,"type":5}],"groupConfig":[{"eci":2,"eri":2,"sci":0,"sri":0,"label":"A1-C3","no_agg":false,"repeat":{"isRepeat":false,"repeatKey":"","repeatValue":""},"bgColor":"rgba(255, 186, 88,0.5)","children":[{"eci":2,"eri":2,"sci":1,"sri":0,"label":"B1-C3","bgColor":"rgba(255, 186, 88,0.5)","children":[],"borderColor":"rgba(255, 186, 88)"}],"borderColor":"rgba(255, 186, 88)","filter":null}],"collapse":[],"waterMask":null,"pageFreezeConfig":"A1","toolbarButtonList":[{"showIcon":true,"showText":true,"text":"首页","icon":"fa fa-step-backward","color":"#2c3e50","show":true,"type":1},{"showIcon":true,"showText":true,"text":"上一页","icon":"xzreport-icon-arrow-left-filling","color":"#2c3e50","show":true,"type":2},{"showIcon":true,"showText":true,"text":"当前页/总页数","icon":"fa fa-file-text-o","color":"#2c3e50","show":true,"type":3},{"showIcon":true,"showText":true,"text":"下一页","icon":"xzreport-icon-arrow-right-filling","color":"#2c3e50","show":true,"type":4},{"showIcon":true,"showText":true,"text":"末页","icon":"fa fa-step-forward","color":"#2c3e50","show":true,"type":5},{"showIcon":true,"showText":true,"text":"打印","color":"#2c3e50","icon":"fa fa-print","show":true,"type":6},{"showIcon":true,"showText":true,"text":"导出","icon":"fa fa-download","color":"#2c3e50","show":true,"type":7}],"paramsConfig":[],"dataConfig":[],"apiConfig":{"url":"","key":"","secret":""}}}]')},function(e,t){e.exports=function e(t,n){"use strict";function r(t){return e.insensitive&&(""+t).toLowerCase()||""+t}var i,o,a=/(^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi,s=/(^[ ]*|[ ]*$)/g,u=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,c=/^0x[0-9a-f]+$/i,l=/^0/,h=(t=r(t).replace(s,"")||"",n=r(n).replace(s,"")||"",t.replace(a,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0")),f=n.replace(a,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0");s=parseInt(t.match(c),16)||1!==h.length&&t.match(u)&&Date.parse(t);if(a=parseInt(n.match(c),16)||s&&n.match(u)&&Date.parse(n)||null){if(s<a)return-1;if(a<s)return 1}for(var d=0,p=Math.max(h.length,f.length);d<p;d++){if(i=!(h[d]||"").match(l)&&parseFloat(h[d])||h[d]||0,o=!(f[d]||"").match(l)&&parseFloat(f[d])||f[d]||0,isNaN(i)!==isNaN(o))return isNaN(i)?1:-1;if(typeof i!=typeof o&&(i+="",o+=""),i<o)return-1;if(o<i)return 1}return 0}},function(e,t){(function(t){e.exports=t}).call(this,{})},function(e,t,n){var r;e.exports=(e=n(39),r=e.lib.WordArray,e.enc.Base64={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=this._map,i=(e.clamp(),[]),o=0;o<n;o+=3)for(var a=(t[o>>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,s=0;s<4&&o+.75*s<n;s++)i.push(r.charAt(a>>>6*(3-s)&63));var u=r.charAt(64);if(u)for(;i.length%4;)i.push(u);return i.join("")},parse:function(e){var t=e.length,n=this._map;if(!(i=this._reverseMap))for(var i=this._reverseMap=[],o=0;o<n.length;o++)i[n.charCodeAt(o)]=o;var a=n.charAt(64);return a&&-1!==(a=e.indexOf(a))&&(t=a),function(e,t,n){for(var i,o,a=[],s=0,u=0;u<t;u++)u%4&&(i=n[e.charCodeAt(u-1)]<<u%4*2,o=n[e.charCodeAt(u)]>>>6-u%4*2,a[s>>>2]|=(i|o)<<24-s%4*8,s++);return r.create(a,s)}(e,t,i)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},e.enc.Base64)},function(e,t,n){e.exports=function(e){for(var t=Math,n=e,r=n.lib,i=r.WordArray,o=r.Hasher,a=n.algo,s=[],u=0;u<64;u++)s[u]=4294967296*t.abs(t.sin(u+1))|0;var c=a.MD5=o.extend({_doReset:function(){this._hash=new i.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,i=e[r];e[r]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8)}var o=this._hash.words,a=e[t+0],u=e[t+1],c=e[t+2],p=e[t+3],m=e[t+4],g=e[t+5],A=e[t+6],v=e[t+7],b=e[t+8],y=e[t+9],w=e[t+10],x=e[t+11],C=e[t+12],k=e[t+13],E=e[t+14],S=e[t+15],_=o[0],O=o[1],T=o[2],D=o[3];_=l(_,O,T,D,a,7,s[0]),D=l(D,_,O,T,u,12,s[1]),T=l(T,D,_,O,c,17,s[2]),O=l(O,T,D,_,p,22,s[3]),_=l(_,O,T,D,m,7,s[4]),D=l(D,_,O,T,g,12,s[5]),T=l(T,D,_,O,A,17,s[6]),O=l(O,T,D,_,v,22,s[7]),_=l(_,O,T,D,b,7,s[8]),D=l(D,_,O,T,y,12,s[9]),T=l(T,D,_,O,w,17,s[10]),O=l(O,T,D,_,x,22,s[11]),_=l(_,O,T,D,C,7,s[12]),D=l(D,_,O,T,k,12,s[13]),T=l(T,D,_,O,E,17,s[14]),_=h(_,O=l(O,T,D,_,S,22,s[15]),T,D,u,5,s[16]),D=h(D,_,O,T,A,9,s[17]),T=h(T,D,_,O,x,14,s[18]),O=h(O,T,D,_,a,20,s[19]),_=h(_,O,T,D,g,5,s[20]),D=h(D,_,O,T,w,9,s[21]),T=h(T,D,_,O,S,14,s[22]),O=h(O,T,D,_,m,20,s[23]),_=h(_,O,T,D,y,5,s[24]),D=h(D,_,O,T,E,9,s[25]),T=h(T,D,_,O,p,14,s[26]),O=h(O,T,D,_,b,20,s[27]),_=h(_,O,T,D,k,5,s[28]),D=h(D,_,O,T,c,9,s[29]),T=h(T,D,_,O,v,14,s[30]),_=f(_,O=h(O,T,D,_,C,20,s[31]),T,D,g,4,s[32]),D=f(D,_,O,T,b,11,s[33]),T=f(T,D,_,O,x,16,s[34]),O=f(O,T,D,_,E,23,s[35]),_=f(_,O,T,D,u,4,s[36]),D=f(D,_,O,T,m,11,s[37]),T=f(T,D,_,O,v,16,s[38]),O=f(O,T,D,_,w,23,s[39]),_=f(_,O,T,D,k,4,s[40]),D=f(D,_,O,T,a,11,s[41]),T=f(T,D,_,O,p,16,s[42]),O=f(O,T,D,_,A,23,s[43]),_=f(_,O,T,D,y,4,s[44]),D=f(D,_,O,T,C,11,s[45]),T=f(T,D,_,O,S,16,s[46]),_=d(_,O=f(O,T,D,_,c,23,s[47]),T,D,a,6,s[48]),D=d(D,_,O,T,v,10,s[49]),T=d(T,D,_,O,E,15,s[50]),O=d(O,T,D,_,g,21,s[51]),_=d(_,O,T,D,C,6,s[52]),D=d(D,_,O,T,p,10,s[53]),T=d(T,D,_,O,w,15,s[54]),O=d(O,T,D,_,u,21,s[55]),_=d(_,O,T,D,b,6,s[56]),D=d(D,_,O,T,S,10,s[57]),T=d(T,D,_,O,A,15,s[58]),O=d(O,T,D,_,k,21,s[59]),_=d(_,O,T,D,m,6,s[60]),D=d(D,_,O,T,x,10,s[61]),T=d(T,D,_,O,c,15,s[62]),O=d(O,T,D,_,y,21,s[63]),o[0]=o[0]+_|0,o[1]=o[1]+O|0,o[2]=o[2]+T|0,o[3]=o[3]+D|0},_doFinalize:function(){var e=this._data,n=e.words,r=8*this._nDataBytes,i=8*e.sigBytes;n[i>>>5]|=128<<24-i%32;var o=t.floor(r/4294967296),a=r;n[15+(i+64>>>9<<4)]=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),n[14+(i+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),e.sigBytes=4*(n.length+1),this._process();for(var s=this._hash,u=s.words,c=0;c<4;c++){var l=u[c];u[c]=16711935&(l<<8|l>>>24)|4278255360&(l<<24|l>>>8)}return s},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function l(e,t,n,r,i,o,a){var s=e+(t&n|~t&r)+i+a;return(s<<o|s>>>32-o)+t}function h(e,t,n,r,i,o,a){var s=e+(t&r|n&~r)+i+a;return(s<<o|s>>>32-o)+t}function f(e,t,n,r,i,o,a){var s=e+(t^n^r)+i+a;return(s<<o|s>>>32-o)+t}function d(e,t,n,r,i,o,a){var s=e+(n^(t|~r))+i+a;return(s<<o|s>>>32-o)+t}return n.MD5=o._createHelper(c),n.HmacMD5=o._createHmacHelper(c),e.MD5}(n(39))},function(e,t,n){"use strict";n.r(t),n.d(t,"validateUpdateShape",(function(){return i})),n.d(t,"validateInput",(function(){return o})),n.d(t,"calculateShapes",(function(){return a}));var r=n(10);function i(e,t,n){var r=1<t.rank?t.shape[t.rank-1]:1,i=1<t.rank?t.rank-1:1,o="Must have updates.shape = indices.shape[:batchDim] + shape[sliceDim:], got updates.shape: "+n.shape+`, indices.shape: ${t.shape}, shape: `+e+`, sliceDim: ${r}, and batchDim: ${i}.`;if(n.rank<i)throw new Error(o+` update.rank < ${i}. `);if(e.length<r+(n.rank-i))throw new Error(o+" Output shape length < "+(r+(n.rank-i)));if(n.rank!==i+e.length-r)throw new Error(o+" update.rank != "+(i+e.length-r));for(let e=0;e<i;++e)if(n.shape[e]!==t.shape[e])throw new Error(o+` updates.shape[${e}] (${n.shape[e]}) != indices.shape[${e}] (${t.shape[e]}).`);for(let t=0;t<n.rank-i;++t)if(n.shape[t+i]!==e[t+r])throw new Error(o+` updates.shape[${t+i}] (${n.shape[t+i]}) != shape[${t+i}] (${e[t+i]})`)}function o(e,t,n){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(e.rank<1)throw new Error(`tf.scatterND() expects the updates to be rank 1 or higher, but the rank was ${e.rank}.`);if("int32"!==t.dtype)throw new Error("The dtype of 'indices' should be int32, but got dtype: "+t.dtype);if(n.length<1)throw new Error("Output rank must be greater or equal to 1, but got shape: "+n);if(0===n.length){if(0===t.size)throw new Error("Indices specified for empty output. indices shape: "+t.shape);if(0===e.size)throw new Error("Updates specified for empty output. updates shape: "+e.shape)}i(n,t,e)}function a(e,t,n){var i=1<(i=t.shape.length)?t.shape[i-1]:1,o=n.length;let a=1;for(let e=i;e<o;++e)a*=n[e];var s=i<1?1:i;return{sliceRank:i,numUpdates:t=Object(r.O)(t.shape)/s,sliceSize:a,strides:s=[...Object(r.j)(n.slice(0,i)),1],outputSize:Object(r.O)(n)}}},function(e,t,n){"use strict";n.r(t),n.d(t,"assertParamsValid",(function(){return i})),n.d(t,"maskToAxes",(function(){return o})),n.d(t,"computeOutShape",(function(){return a})),n.d(t,"stridesWithElidedDims",(function(){return s})),n.d(t,"getNormalizedAxes",(function(){return l})),n.d(t,"startIndicesWithElidedDims",(function(){return h})),n.d(t,"stopIndicesWithElidedDims",(function(){return f})),n.d(t,"stridesForAxis",(function(){return d})),n.d(t,"startForAxis",(function(){return p})),n.d(t,"stopForAxis",(function(){return m})),n.d(t,"isSliceContinous",(function(){return g})),n.d(t,"computeFlatOffset",(function(){return A})),n.d(t,"parseSliceParams",(function(){return v})),n.d(t,"sliceInfo",(function(){return b}));var r=n(10);
/**
 * @license
 * Copyright 2021 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function i(e,t,n){const i=e.shape.length;r.b(i===t.length,()=>`Error in slice${i}D: Length of begin ${t} must match the rank of the array (${i}).`),r.b(i===n.length,()=>`Error in slice${i}D: Length of size ${n} must match the rank of the array (${i}).`);for(let o=0;o<i;++o)r.b(t[o]+n[o]<=e.shape[o],()=>`Error in slice${i}D: begin[${o}] + size[${o}] (${t[o]+n[o]}) would overflow input.shape[${o}] (${e.shape[o]})`)}function o(e){const t=[];let n=0;for(;0<e;)1&e&&t.push(n),e/=2,n++;return t}function a(e,t,n){const r=[];for(let i=0;i<e.length;i++)r[i]=Math.ceil((t[i]-e[i])/n[i]);return r}function s(e,t,n,r){const i=[...e];for(let e=i.length;e<r.length;e++)i.push(1);for(let e=0;e<n;e++)0===e?i[t]=1:(i.splice(t,0,1),i.pop());return i}function u(e,t,n){return n<=e?n:n-(t-1)}function c(e,t){const n=[];for(let r=0;r<e;r++)n.push(t+r);return n}function l(e,t,n,r,i,o,a,u,c){var l=e.length;let g=new Array(l),A=new Array(l),v=new Array(l);if(t.length&&0<n)g=h(a,t=t[0],n+=1,r,e),A=f(u,t,n,i,e),v=s(o,t,n,e);else for(let t=0;t<l;t++)g[t]=p(a,r,o,e,t,c),A[t]=m(u,i,o,e,t,c),v[t]=d(o,t,c);return{begin:g,end:A,strides:v}}function h(e,t,n,r,i){const o=[...i],a=c(n,t);for(let i=0;i<o.length;i++)if(-1<a.indexOf(i))o[i]=0;else{var s=u(t,n,i);let a=r[s];e&1<<s&&(a=0),o[i]=a}return o}function f(e,t,n,i,o){const a=[...o],s=c(n,t);for(let r=0;r<a.length;r++)if(-1<s.indexOf(r))a[r]=Number.MAX_SAFE_INTEGER;else{var l=u(t,n,r);let o=i[l];e&1<<l&&(o=Number.MAX_SAFE_INTEGER),a[r]=o}for(let e=0;e<a.length;e++){var h=o[e];a[e]<0&&(a[e]+=h),a[e]=r.i(0,a[e],o[e])}return a}function d(e,t,n){let r=e[t];return n&1<<t||null==r?1:r}function p(e,t,n,i,o,a){let s=t[o];return t=n[o]||1,(e&1<<o||a&1<<o||null==s)&&(s=0<t?Number.MIN_SAFE_INTEGER:Number.MAX_SAFE_INTEGER),n=i[o],s<0&&(s+=n),r.i(0,s,n-1)}function m(e,t,n,i,o,a){let s=t[o];return t=n[o]||1,(e&1<<o||a&1<<o||null==s)&&(s=0<t?Number.MAX_SAFE_INTEGER:Number.MIN_SAFE_INTEGER),n=i[o],s<0&&(s+=n),0<t?r.i(0,s,n):r.i(-1,s,n-1)}function g(e,t,n){let r=n.length;for(let e=0;e<n.length;e++)if(1<n[e]){r=e;break}for(let i=r+1;i<n.length;i++)if(0<t[i]||n[i]!==e[i])return!1;return!0}function A(e,t){let n=0<e.length?e[e.length-1]:1;for(let r=0;r<e.length-1;r++)n+=e[r]*t[r];return n}function v(e,t,n){let i;var o=e.shape.length;let a;return(i="number"==typeof t?[t,...new Array(o-1).fill(0)]:t.length<o?t.concat(new Array(o-t.length).fill(0)):t.slice()).forEach(e=>{r.b(-1!==e,()=>"slice() does not support negative begin indexing.")}),a=(a=null==n?new Array(o).fill(-1):"number"==typeof n?[n,...new Array(o-1).fill(-1)]:n.length<o?n.concat(new Array(o-n.length).fill(-1)):n).map((t,n)=>0<=t?t:(r.b(-1===t,()=>"Negative size values should be exactly -1 but got "+t+` for the slice() size at index ${n}.`),e.shape[n]-i[n])),[i,a]}function b(e,t,n,r,i,o,a,s,u){let c;if(null==r?(c=new Array(t.length)).fill(1):c=r,null!=a&&0!=(a&a-1))throw new Error("Multiple ellipses in slice is not allowed.");let l=!1;const h={dims:c.length,numAddAxisAfterEllipsis:0,begin:t.slice(),end:n.slice(),strides:c.slice(),beginMask:i,endMask:o,ellipsisMask:a,newAxisMask:s,shrinkAxisMask:u};for(let e=0;e<h.dims;e++)l&&0!=(1<<e&s)&&h.numAddAxisAfterEllipsis++,1<<e&a&&(l=!0);l||(h.ellipsisMask|=1<<h.dims,h.dims++);const f={dims:e.length,beginMask:0,endMask:0,beginValid:!1,endValid:!1};{var d=h,p=f;p.beginMask=0,p.endMask=0;let e=p.shrinkAxisMask=0;p.beginValid=null!=d.begin,p.endValid=null!=d.end,p.begin=new Array(p.dims),p.end=new Array(p.dims),p.strides=new Array(p.dims),p.finalShapeGatherIndices=[],p.finalShapeGatherIndicesSparse=[],p.inputShapeGatherIndicesSparse=new Array(p.dims);for(let t=0;t<d.dims;t++)if(1<<t&d.ellipsisMask)for(var m=Math.min(p.dims-(d.dims-t)+1+d.numAddAxisAfterEllipsis,p.dims);e<m;e++)p.begin[e]=0,p.end[e]=0,p.strides[e]=1,p.beginMask|=1<<e,p.endMask|=1<<e,p.finalShapeGatherIndices.push(e),p.finalShapeGatherIndicesSparse.push(-1),p.inputShapeGatherIndicesSparse[e]=t;else if(1<<t&d.newAxisMask)p.finalShapeGatherIndices.push(-2),p.finalShapeGatherIndicesSparse.push(-1);else{if(e===p.begin.length)throw Error(`Index out of range using input dim ${e}; input has only ${p.dims} dims, ${p.begin.length}.`);null!=d.begin&&(p.begin[e]=d.begin[t]),null!=d.end&&(p.end[e]=d.end[t]),p.strides[e]=d.strides[t],d.beginMask&1<<t&&(p.beginMask|=1<<e),d.endMask&1<<t&&(p.endMask|=1<<e),d.shrinkAxisMask&1<<t?(p.finalShapeGatherIndices.push(-1),p.finalShapeGatherIndicesSparse.push(-1),p.shrinkAxisMask|=1<<e):(p.finalShapeGatherIndices.push(e),p.finalShapeGatherIndicesSparse.push(t)),p.inputShapeGatherIndicesSparse[e]=t,e++}}let g=!0,A=!0,v=!0;const b=[],w=[];for(let t=0;t<e.length;++t){if(0===f.strides[t])throw Error(`strides[${t}] must be non-zero`);var x=!!(f.shrinkAxisMask&1<<t),C=e[t];if(-1===C)b.push(x?1:-1);else{var k=[f.beginMask&1<<t,f.endMask&1<<t],E=[0<f.strides[t]?0:-1,0<f.strides[t]?C:C-1];if(x&&f.strides[t]<=0)throw Error("only stride 1 allowed on non-range indexing.");v=v&&1===f.strides[t];var S=!!(f.beginMask&1<<t&&f.endMask&1<<t);if(f.beginValid&&f.endValid){if(x){var _=f.begin[t]<0?C+f.begin[t]:f.begin[t];if(f.begin[t]=_,f.end[t]=f.begin[t]+1,_<0||C<=_)throw Error(`slice index ${f.begin[t]} of dimension ${t} out of bounds.`)}else f.begin[t]=y(f.begin[t],0,f.strides[t],C,k,E),f.end[t]=y(f.end[t],1,f.strides[t],C,k,E);_=1===f.strides[t]&&0===f.begin[t]&&f.end[t]===C,g=g&&_,A=A&&(0===t&&1===f.strides[t]||_)}else g=g&&1===f.strides[t]&&S,A=A&&(0===t&&1===f.strides[t]||S);let e,n=!1;if(f.beginValid&&f.endValid?(e=f.end[t]-f.begin[t],n=!0):x?(e=1,n=!0):S&&0<=C&&(e=f.strides[t]<0?-C:C,n=!0),n){let n;n=0===e||e<0!=f.strides[t]<0?0:Math.trunc(e/f.strides[t])+(e%f.strides[t]!=0?1:0),b.push(n)}else b.push(-1)}}for(let e=0;e<f.finalShapeGatherIndices.length;++e){var O=f.finalShapeGatherIndices[e];0<=O?w.push(b[O]):-2===O&&w.push(1)}return{finalShapeSparse:w.filter((e,t)=>-2!==f.finalShapeGatherIndices[t]),finalShape:w,isIdentity:g,sliceDim0:A,isSimpleSlice:v,begin:f.begin,end:f.end,strides:f.strides}}function y(e,t,n,r,i,o){return i[t]?0<n?o[t]:o[t+1&1]:(i=e<0?r+e:e)<o[0]?o[0]:i>o[1]?o[1]:i}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(6),i=n(4),o=n(28),a=n(3);t=n(5);const s=Object(t.b)({floorDiv_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t){return e=Object(a.a)(e,"a","floorDiv"),t=Object(a.a)(t,"b","floorDiv"),[e,t]=Object(o.makeTypesMatch)(e,t),e={a:e,b:t},r.a.runKernel(i.jb,e)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(6),i=n(4),o=n(3),a=n(10),s=n(15),u=n(29),c=(t=n(5),n(9));const l=Object(t.b)({avgPool_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t,n,l,h){e=Object(o.a)(e,"x","avgPool","float32"),a.b(u.i(n,1),()=>`Error in avgPool: Either strides or dilations must be 1. Got strides ${n} and dilations '1'`);let f=e,d=!1;3===e.rank&&(d=!0,f=Object(c.a)(e,[1,e.shape[0],e.shape[1],e.shape[2]])),a.b(4===f.rank,()=>`Error in avgPool: x must be rank 4 but got rank ${f.rank}.`),u.a("avgPool",l,h);var p={x:f};p=r.a.runKernel(i.o,p,{filterSize:t,strides:n,pad:l,dimRoundingMode:h}),p=Object(s.a)(p,e.dtype);return d?Object(c.a)(p,[p.shape[1],p.shape[2],p.shape[3]]):p}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({cos_:
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){return e=Object(o.a)(e,"x","cos","float32"),r.a.runKernel(i.J,{x:e})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({cumsum_:
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t=0,n=!1,a=!1){return e=Object(o.a)(e,"x","cumsum"),r.a.runKernel(i.N,{x:e},{axis:t,exclusive:n,reverse:a})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({elu_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){return e=Object(o.a)(e,"x","elu","float32"),r.a.runKernel(i.Y,{x:e})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({floor_:
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){return e=Object(o.a)(e,"x","floor","float32"),r.a.runKernel(i.ib,{x:e})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({leakyRelu_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t=.2){return e=Object(o.a)(e,"x","leakyRelu"),r.a.runKernel(i.Ab,{x:e},{alpha:t})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(6),i=n(4),o=n(28),a=n(3),s=n(20);t=n(5);const u=Object(t.b)({less_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t){return e=Object(a.a)(e,"a","less","string_or_numeric"),t=Object(a.a)(t,"b","less","string_or_numeric"),[e,t]=Object(o.makeTypesMatch)(e,t),Object(s.assertAndGetBroadcastShape)(e.shape,t.shape),e={a:e,b:t},r.a.runKernel(i.Bb,e)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(3),i=n(10),o=n(16),a=n(48),s=n(49),u=n(84),c=n(81),l=(t=n(5),n(9)),h=n(17),f=n(21);const d=Object(t.b)({logSumExp_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t=null,n=!1){e=Object(r.a)(e,"x","logSumExp"),t=Object(i.I)(t,e.shape);var d=Object(c.a)(e,t,!0);e=Object(h.a)(e,d),e=Object(s.a)(e),e=Object(f.a)(e,t),e=Object(u.a)(e),d=Object(o.a)(Object(l.a)(d,e.shape),e);return n?(e=Object(a.e)(d.shape,t),Object(l.a)(d,e)):d}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(6),i=n(4),o=n(3),a=n(20);t=n(5);const s=Object(t.b)({logicalOr_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t){return e=Object(o.a)(e,"a","logicalOr","bool"),t=Object(o.a)(t,"b","logicalOr","bool"),Object(a.assertAndGetBroadcastShape)(e.shape,t.shape),e={a:e,b:t},r.a.runKernel(i.Jb,e)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(6),i=n(4),o=n(3),a=n(10),s=n(29),u=(t=n(5),n(9));const c=Object(t.b)({maxPool_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t,n,c,l){let h=e=Object(o.a)(e,"x","maxPool"),f=!1;return 3===e.rank&&(f=!0,h=Object(u.a)(e,[1,e.shape[0],e.shape[1],e.shape[2]])),a.b(4===h.rank,()=>`Error in maxPool: input must be rank 4 but got rank ${h.rank}.`),a.b(s.i(n,1),()=>`Error in maxPool: Either strides or dilations must be 1. Got strides ${n} and dilations '1'`),s.a("maxPool",c,l),e={x:h},e=r.a.runKernel(i.Nb,e,{filterSize:t,strides:n,pad:c,dimRoundingMode:l}),f?Object(u.a)(e,[e.shape[1],e.shape[2],e.shape[3]]):e}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(6),i=n(4),o=n(28),a=n(3),s=n(20),u=n(15);t=n(5);const c=Object(t.b)({minimum_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t){let n=Object(a.a)(e,"a","minimum"),c=Object(a.a)(t,"b","minimum");return[n,c]=Object(o.makeTypesMatch)(n,c),"bool"===n.dtype&&(n=Object(u.a)(n,"int32"),c=Object(u.a)(c,"int32")),Object(s.assertAndGetBroadcastShape)(n.shape,c.shape),e={a:n,b:c},r.a.runKernel(i.Vb,e)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(6),i=n(4),o=n(28),a=n(3),s=n(20);t=n(5);const u=Object(t.b)({notEqual_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t){return e=Object(a.a)(e,"a","notEqual","string_or_numeric"),t=Object(a.a)(t,"b","notEqual","string_or_numeric"),[e,t]=Object(o.makeTypesMatch)(e,t),Object(s.assertAndGetBroadcastShape)(e.shape,t.shape),e={a:e,b:t},r.a.runKernel(i.ec,e)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({prelu_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t){return e=Object(o.a)(e,"x","prelu"),t=Object(o.a)(t,"alpha","prelu"),r.a.runKernel(i.lc,{x:e,alpha:t})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({relu6_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){return e=Object(o.a)(e,"x","relu6"),r.a.runKernel(i.vc,{x:e})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(10);t=n(5);const a=Object(t.b)({fft_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){return Object(o.b)("complex64"===e.dtype,()=>`The dtype for tf.spectral.fft() must be complex64 but got ${e.dtype}.`),r.a.runKernel(i.fb,{input:e})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(10),i=n(61),o=n(41),a=n(109),s=(t=n(5),n(98)),u=n(9),c=n(34),l=n(69),h=n(89),f=n(23),d=n(148);const p=Object(t.b)({rfft_:
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t){Object(r.b)("float32"===e.dtype,()=>"The dtype for rfft() must be real value but got "+e.dtype);let n=e.shape[e.shape.length-1];var p=e.size/n;let m;if(null!=t&&t<n){var g=e.shape.map(e=>0);const r=e.shape.map(e=>e);r[e.shape.length-1]=t,m=Object(c.a)(e,g,r),n=t}else if(null!=t&&t>n){const r=e.shape.map(e=>e);r[e.shape.length-1]=t-n,m=Object(o.a)([e,Object(h.a)(r)],e.shape.length-1),n=t}else m=e;g=Object(f.a)(m),t=Object(u.a)(Object(i.a)(m,g),[p,n]),g=Object(d.a)(t),p=Math.floor(n/2)+1,t=Object(s.a)(g),g=Object(a.a)(g),t=Object(l.a)(t,[p,n-p],t.shape.length-1),g=Object(l.a)(g,[p,n-p],g.shape.length-1);const A=m.shape.slice();return A[m.shape.length-1]=p,Object(u.a)(Object(i.a)(t[0],g[0]),A)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(6),i=n(4),o=n(28),a=n(3),s=n(20);t=n(5);const u=Object(t.b)({squaredDifference_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t){return e=Object(a.a)(e,"a","squaredDifference"),t=Object(a.a)(t,"b","squaredDifference"),[e,t]=Object(o.makeTypesMatch)(e,t),Object(s.assertAndGetBroadcastShape)(e.shape,t.shape),e={a:e,b:t},r.a.runKernel(i.Zc,e,{})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(6),i=n(4),o=n(3),a=n(10);t=n(5);const s=Object(t.b)({unsortedSegmentSum_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t,n){return e=Object(o.a)(e,"x","unsortedSegmentSum"),t=Object(o.a)(t,"segmentIds","unsortedSegmentSum","int32"),Object(a.b)(Object(a.v)(n),()=>"numSegments must be of dtype int"),e={x:e,segmentIds:t},r.a.runKernel(i.pd,e,{numSegments:n})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(6),i=n(4),o=n(10),a=n(29),s=(t=n(5),n(9));const u=Object(t.b)({conv2DBackpropInput_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t,n,u,c,l="NHWC",h){o.b(e.length===t.rank,()=>`Length of inShape (${e.length}) and rank of dy (${t.rank}) must match`);let f=e,d=t,p=!1;3===t.rank&&(p=!0,d=Object(s.a)(t,[1,t.shape[0],t.shape[1],t.shape[2]]),f=[1,e[0],e[1],e[2]]),o.b(4===f.length,()=>"Error in conv2dDerInput: inShape must be length 4, but got length "+f.length+"."),o.b(4===d.rank,()=>"Error in conv2dDerInput: dy must be rank 4, but got rank "+d.rank),o.b(4===n.rank,()=>"Error in conv2dDerInput: filter must be rank 4, but got rank "+n.rank);const m="NHWC"===l?f[3]:f[1],g="NHWC"===l?d.shape[3]:d.shape[1];o.b(m===n.shape[2],()=>`Error in conv2dDerInput: depth of input (${m}) must match input depth for filter ${n.shape[2]}.`),o.b(g===n.shape[3],()=>`Error in conv2dDerInput: depth of output (${g}) must match output depth for filter ${n.shape[3]}.`),a.a("conv2dDerInput",c,h);var A={dy:d,filter:n};u={strides:u,pad:c,dataFormat:l,dimRoundingMode:h,inputShape:f},c=r.a.runKernel(i.F,A,u);return p?Object(s.a)(c,[c.shape[1],c.shape[2],c.shape[3]]):c}})},function(e,t,n){"use strict";n.r(t),n.d(t,"TEST_EPSILON_FLOAT16",(function(){return s})),n.d(t,"expectArraysClose",(function(){return u})),n.d(t,"testEpsilon",(function(){return c})),n.d(t,"expectPromiseToFail",(function(){return h})),n.d(t,"expectArraysEqual",(function(){return f})),n.d(t,"expectNumbersClose",(function(){return d})),n.d(t,"expectValuesInRange",(function(){return m})),n.d(t,"expectArrayBuffersEqual",(function(){return g})),n.d(t,"encodeStrings",(function(){return A})),n.d(t,"createVideoElement",(function(){return v})),n.d(t,"play",(function(){return b}));var r=n(6),i=n(3),o=n(10),a=n(12);
/**
 * @license
 * Copyright 2017 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */const s=.1;function u(e,t,n){return null==n&&(n=c()),l(e,t,(e,t)=>p(e,t,n))}function c(){return 32===r.a.backend.floatPrecision()?.001:s}function l(e,t,n){let r=!0;if((Object(o.A)(e)||Object(o.A)(t))&&(r=!1),r=!(!Object(o.A)(e)||!Object(o.A)(t))||r){var a=e.constructor.name,s=t.constructor.name;if(a!==s)throw new Error(`Arrays are of different type. Actual: ${a}. Expected: `+s)}if(Array.isArray(e)&&Array.isArray(t)&&(a=Object(i.c)(e),s=Object(i.c)(t),!Object(o.a)(a,s)))throw new Error(`Arrays have different shapes. Actual: [${a}]. Expected: [${s}]`);var u=Object(o.A)(e)?e:Object(o.m)(e),c=Object(o.A)(t)?t:Object(o.m)(t);if(u.length!==c.length)throw new Error(`Arrays have different lengths actual: ${u.length} vs expected: ${c.length}.\nActual:   ${u}.\nExpected: ${c}.`);for(let e=0;e<c.length;++e){var l=u[e],h=c[e];if(!n(l,h))throw new Error(`Arrays differ: actual[${e}] = ${l}, expected[${e}] = ${h}.\nActual:   ${u}.\nExpected: ${c}.`)}"undefined"!=typeof expect&&expect().nothing()}function h(e,t){e().then(()=>t.fail(),()=>t()),"undefined"!=typeof expect&&expect().nothing()}function f(e,t){var n="string"==typeof t||"number"==typeof t||"boolean"==typeof t?[t]:t;return Object(o.z)(e)||Object(o.z)(e[0])||Object(o.z)(t)||Object(o.z)(t[0])?l(e,n,(e,t)=>e==t):l(e,t,(e,t)=>p(e,t,0))}function d(e,t,n){if(!p(e,t,n=null==n?c():n))throw new Error(`Numbers differ: actual === ${e}, expected === `+t);"undefined"!=typeof expect&&expect().nothing()}function p(e,t,n){return!isFinite(e)&&!isFinite(t)||!(isNaN(e)||isNaN(t)||Math.abs(e-t)>n)}function m(e,t,n){for(let r=0;r<e.length;r++)if(e[r]<t||e[r]>n)throw new Error(`Value out of range:${e[r]} low: ${t}, high: `+n)}function g(e,t){var n=new Float32Array(e),r=new Float32Array(t);if(n.length!==r.length)throw new Error("Expected ArrayBuffer to be of length "+r.length+", but it was "+n.length);for(let e=0;e<r.length;e++)if(n[e]!==r[e])throw new Error(`Expected ArrayBuffer value at ${e} to be ${r[e]} but got ${n[e]} instead`)}function A(e){for(let n=0;n<e.length;n++){var t=e[n];Array.isArray(t)?A(t):e[n]=Object(a.encodeString)(t)}return e}function v(e){const t=document.createElement("video");return"playsInline"in t&&(t.playsInline=!0),t.muted=!0,t.loop=!0,t.style.position="fixed",t.style.left="0px",t.style.top="0px",t.preload="auto",t.appendChild(e),new Promise(e=>{t.addEventListener("loadeddata",n=>e(t)),t.load()})}async function b(e){await e.play(),"requestVideoFrameCallback"in e&&await new Promise(t=>{e.requestVideoFrameCallback(t)})}},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(6),i=n(4),o=n(10),a=n(29),s=(t=n(5),n(9));const u=Object(t.b)({conv2DBackpropFilter_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t,n,u,c,l="NHWC",h){let f=e,d=(3===e.rank&&(f=Object(s.a)(e,[1,e.shape[0],e.shape[1],e.shape[2]])),t);3===d.rank&&(d=Object(s.a)(t,[1,t.shape[0],t.shape[1],t.shape[2]])),o.b(4===f.rank,()=>"Error in conv2dDerFilter: input must be rank 4, but got shape "+f.shape+"."),o.b(4===d.rank,()=>"Error in conv2dDerFilter: dy must be rank 4, but got shape "+d.shape+"."),o.b(4===n.length,()=>"Error in conv2dDerFilter: filterShape must be length 4, but got "+n+".");const p="NHWC"===l?f.shape[3]:f.shape[1],m="NHWC"===l?d.shape[3]:d.shape[1];return o.b(p===n[2],()=>`Error in conv2dDerFilter: depth of input ${p}) must match input depth in filter (${n[2]}.`),o.b(m===n[3],()=>`Error in conv2dDerFilter: depth of dy (${m}) must match output depth for filter (${n[3]}).`),a.a("conv2dDerFilter",c,h),e={x:f,dy:d},r.a.runKernel(i.E,e,{strides:u,pad:c,dataFormat:l,dimRoundingMode:h,filterShape:n})}})},function(e,t,n){var r;function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}r=function(){"use strict";function e(e,n){var i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"rgba(0, 0, 0, 0)";return Array.isArray(e)&&(e={r:e[0],g:e[1],b:e[2],a:e[3]}),"hex"==n?t(e):"rgb"==n?r(e,i):"hsl"==n?o(e):e}function t(e){var t=(e=Array.isArray(e)?{r:e[0],g:e[1],b:e[2],a:e[3]}:e).r.toString(16),n=(e.r<16&&(t="0"+t),e.g.toString(16)),r=(e.g<16&&(n="0"+n),e.b.toString(16)),i=(e.b<16&&(r="0"+r),"");return e.a<1&&(i=(e=Math.floor(255*e.a)).toString(16),e<16&&(i="0"+i)),"#"+t+n+r+i}function r(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"rgba(0, 0, 0, 0)";if(void 0!==(e=Array.isArray(e)?{r:e[0],g:e[1],b:e[2],a:e[3]}:e))return 1==e.a||void 0===e.a?isNaN(e.r)?t:"rgb("+e.r+","+e.g+","+e.b+")":"rgba("+e.r+","+e.g+","+e.b+","+e.a+")"}function o(e){return 1==(e=Array.isArray(e)?{r:e[0],g:e[1],b:e[2],a:e[3]}:e).a||void 0===e.a?"hsl("+e.h+","+e.s+"%,"+e.l+"%)":"hsla("+e.h+","+e.s+"%,"+e.l+"%,"+e.a+")"}var a={format:e,rgb:r,hsl:o,hex:t};function s(e,t){return t=void 0===t?1:t,Math.round(e*t)/t}function u(e){return e*Math.PI/180}function c(e){return(e=180*e/Math.PI)<0?360+e:e}function l(e,t){return(2<arguments.length&&void 0!==arguments[2]?arguments[2]:0)+t*Math.cos(u(e))}function h(e,t){return(2<arguments.length&&void 0!==arguments[2]?arguments[2]:0)+t*Math.sin(u(e))}function f(e,t){return c(Math.atan2(t,e))}var d={round:s,radianToDegree:c,degreeToRadian:u,getXInCircle:l,getYInCircle:h,caculateAngle:f},p={aliceblue:"rgb(240, 248, 255)",antiquewhite:"rgb(250, 235, 215)",aqua:"rgb(0, 255, 255)",aquamarine:"rgb(127, 255, 212)",azure:"rgb(240, 255, 255)",beige:"rgb(245, 245, 220)",bisque:"rgb(255, 228, 196)",black:"rgb(0, 0, 0)",blanchedalmond:"rgb(255, 235, 205)",blue:"rgb(0, 0, 255)",blueviolet:"rgb(138, 43, 226)",brown:"rgb(165, 42, 42)",burlywood:"rgb(222, 184, 135)",cadetblue:"rgb(95, 158, 160)",chartreuse:"rgb(127, 255, 0)",chocolate:"rgb(210, 105, 30)",coral:"rgb(255, 127, 80)",cornflowerblue:"rgb(100, 149, 237)",cornsilk:"rgb(255, 248, 220)",crimson:"rgb(237, 20, 61)",cyan:"rgb(0, 255, 255)",darkblue:"rgb(0, 0, 139)",darkcyan:"rgb(0, 139, 139)",darkgoldenrod:"rgb(184, 134, 11)",darkgray:"rgb(169, 169, 169)",darkgrey:"rgb(169, 169, 169)",darkgreen:"rgb(0, 100, 0)",darkkhaki:"rgb(189, 183, 107)",darkmagenta:"rgb(139, 0, 139)",darkolivegreen:"rgb(85, 107, 47)",darkorange:"rgb(255, 140, 0)",darkorchid:"rgb(153, 50, 204)",darkred:"rgb(139, 0, 0)",darksalmon:"rgb(233, 150, 122)",darkseagreen:"rgb(143, 188, 143)",darkslateblue:"rgb(72, 61, 139)",darkslategray:"rgb(47, 79, 79)",darkslategrey:"rgb(47, 79, 79)",darkturquoise:"rgb(0, 206, 209)",darkviolet:"rgb(148, 0, 211)",deeppink:"rgb(255, 20, 147)",deepskyblue:"rgb(0, 191, 255)",dimgray:"rgb(105, 105, 105)",dimgrey:"rgb(105, 105, 105)",dodgerblue:"rgb(30, 144, 255)",firebrick:"rgb(178, 34, 34)",floralwhite:"rgb(255, 250, 240)",forestgreen:"rgb(34, 139, 34)",fuchsia:"rgb(255, 0, 255)",gainsboro:"rgb(220, 220, 220)",ghostwhite:"rgb(248, 248, 255)",gold:"rgb(255, 215, 0)",goldenrod:"rgb(218, 165, 32)",gray:"rgb(128, 128, 128)",grey:"rgb(128, 128, 128)",green:"rgb(0, 128, 0)",greenyellow:"rgb(173, 255, 47)",honeydew:"rgb(240, 255, 240)",hotpink:"rgb(255, 105, 180)",indianred:"rgb(205, 92, 92)",indigo:"rgb(75, 0, 130)",ivory:"rgb(255, 255, 240)",khaki:"rgb(240, 230, 140)",lavender:"rgb(230, 230, 250)",lavenderblush:"rgb(255, 240, 245)",lawngreen:"rgb(124, 252, 0)",lemonchiffon:"rgb(255, 250, 205)",lightblue:"rgb(173, 216, 230)",lightcoral:"rgb(240, 128, 128)",lightcyan:"rgb(224, 255, 255)",lightgoldenrodyellow:"rgb(250, 250, 210)",lightgreen:"rgb(144, 238, 144)",lightgray:"rgb(211, 211, 211)",lightgrey:"rgb(211, 211, 211)",lightpink:"rgb(255, 182, 193)",lightsalmon:"rgb(255, 160, 122)",lightseagreen:"rgb(32, 178, 170)",lightskyblue:"rgb(135, 206, 250)",lightslategray:"rgb(119, 136, 153)",lightslategrey:"rgb(119, 136, 153)",lightsteelblue:"rgb(176, 196, 222)",lightyellow:"rgb(255, 255, 224)",lime:"rgb(0, 255, 0)",limegreen:"rgb(50, 205, 50)",linen:"rgb(250, 240, 230)",magenta:"rgb(255, 0, 255)",maroon:"rgb(128, 0, 0)",mediumaquamarine:"rgb(102, 205, 170)",mediumblue:"rgb(0, 0, 205)",mediumorchid:"rgb(186, 85, 211)",mediumpurple:"rgb(147, 112, 219)",mediumseagreen:"rgb(60, 179, 113)",mediumslateblue:"rgb(123, 104, 238)",mediumspringgreen:"rgb(0, 250, 154)",mediumturquoise:"rgb(72, 209, 204)",mediumvioletred:"rgb(199, 21, 133)",midnightblue:"rgb(25, 25, 112)",mintcream:"rgb(245, 255, 250)",mistyrose:"rgb(255, 228, 225)",moccasin:"rgb(255, 228, 181)",navajowhite:"rgb(255, 222, 173)",navy:"rgb(0, 0, 128)",oldlace:"rgb(253, 245, 230)",olive:"rgb(128, 128, 0)",olivedrab:"rgb(107, 142, 35)",orange:"rgb(255, 165, 0)",orangered:"rgb(255, 69, 0)",orchid:"rgb(218, 112, 214)",palegoldenrod:"rgb(238, 232, 170)",palegreen:"rgb(152, 251, 152)",paleturquoise:"rgb(175, 238, 238)",palevioletred:"rgb(219, 112, 147)",papayawhip:"rgb(255, 239, 213)",peachpuff:"rgb(255, 218, 185)",peru:"rgb(205, 133, 63)",pink:"rgb(255, 192, 203)",plum:"rgb(221, 160, 221)",powderblue:"rgb(176, 224, 230)",purple:"rgb(128, 0, 128)",rebeccapurple:"rgb(102, 51, 153)",red:"rgb(255, 0, 0)",rosybrown:"rgb(188, 143, 143)",royalblue:"rgb(65, 105, 225)",saddlebrown:"rgb(139, 69, 19)",salmon:"rgb(250, 128, 114)",sandybrown:"rgb(244, 164, 96)",seagreen:"rgb(46, 139, 87)",seashell:"rgb(255, 245, 238)",sienna:"rgb(160, 82, 45)",silver:"rgb(192, 192, 192)",skyblue:"rgb(135, 206, 235)",slateblue:"rgb(106, 90, 205)",slategray:"rgb(112, 128, 144)",slategrey:"rgb(112, 128, 144)",snow:"rgb(255, 250, 250)",springgreen:"rgb(0, 255, 127)",steelblue:"rgb(70, 130, 180)",tan:"rgb(210, 180, 140)",teal:"rgb(0, 128, 128)",thistle:"rgb(216, 191, 216)",tomato:"rgb(255, 99, 71)",turquoise:"rgb(64, 224, 208)",violet:"rgb(238, 130, 238)",wheat:"rgb(245, 222, 179)",white:"rgb(255, 255, 255)",whitesmoke:"rgb(245, 245, 245)",yellow:"rgb(255, 255, 0)",yellowgreen:"rgb(154, 205, 50)",transparent:"rgba(0, 0, 0, 0)"},m={isColorName:function(e){return!!p[e]},getColorByName:function(e){return p[e]}};function g(e,t,n){return n<0&&(n+=1),1<n&&--n,n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function A(e,t,n){var r,i,o,a;return 1==arguments.length&&(e=(r=arguments[0]).h,t=r.s,n=r.l),e/=360,n/=100,0==(t/=100)?i=o=a=n:(i=g(n=2*n-(r=n<.5?n*(1+t):n+t-n*t),r,e+1/3),o=g(n,r,e),a=g(n,r,e-1/3)),{r:s(255*i),g:s(255*o),b:s(255*a)}}function v(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var b={HUEtoRGB:g,HSLtoHSV:function(e,t,n){1==arguments.length&&(e=(r=arguments[0]).h,t=r.s,n=r.l);var r=A(e,t,n);return P(r.r,r.g,r.b)},HSLtoRGB:A},y=function(e,t,n){return t&&w(e.prototype,t),n&&w(e,n),e};function w(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function x(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function C(e,t,n){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,t);return void 0!==r?"value"in r?r.value:void 0!==(r=r.get)?r.call(n):void 0:null!==(r=Object.getPrototypeOf(e))?C(r,t,n):void 0}function k(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+i(t));e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function E(e,t){if(e)return!t||"object"!==i(t)&&"function"!=typeof t?e:t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}var S=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e)){var n=t,r=[],i=!0,o=(t=!1,void 0);try{for(var a,s=e[Symbol.iterator]();!(i=(a=s.next()).done)&&(r.push(a.value),!n||r.length!==n);i=!0);}catch(e){t=!0,o=e}finally{try{!i&&s.return&&s.return()}finally{if(t)throw o}}return r}throw new TypeError("Invalid attempt to destructure non-iterable instance")},O=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)},T=/(#(?:[\da-f]{8})|#(?:[\da-f]{3}){1,2}|rgb\((?:\s*\d{1,3},\s*){2}\d{1,3}\s*\)|rgba\((?:\s*\d{1,3},\s*){3}\d*\.?\d+\s*\)|hsl\(\s*\d{1,3}(?:,\s*\d{1,3}%){2}\s*\)|hsla\(\s*\d{1,3}(?:,\s*\d{1,3}%){2},\s*\d*\.?\d+\s*\)|([\w_\-]+))/gi;function D(e){var t=e.match(T),n=[];if(t){for(var r,i=0,o=t.length;i<o;i++)-1<t[i].indexOf("#")||-1<t[i].indexOf("rgb")||-1<t[i].indexOf("hsl")?n.push({color:t[i]}):(r=m.getColorByName(t[i]))&&n.push({color:t[i],nameColor:r});var a={next:0};n.forEach((function(t){var n=e.indexOf(t.color,a.next);t.startIndex=n,t.endIndex=n+t.color.length,a.next=t.endIndex}))}return n}function B(e){var t=D(e);return t.forEach((function(t,n){e=e.replace(t.color,"@"+n)})),{str:e,matches:t}}function I(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:",",n=B(e);return n.str.split(t).map((function(e,t){return e=j(e),n.matches[t]?e.replace("@"+t,n.matches[t].color):e}))}function M(e,t){return t.forEach((function(t,n){e=e.replace("@"+n,t.color)})),e}function j(e){return e.replace(/^\s+|\s+$/g,"")}function N(e){if("string"==typeof e){if(-1<(e=m.isColorName(e)?m.getColorByName(e):e).indexOf("rgb(")){for(var t=0,n=(i=e.replace("rgb(","").replace(")","").split(",")).length;t<n;t++)i[t]=parseInt(j(i[t]),10);var r={type:"rgb",r:i[0],g:i[1],b:i[2],a:1};return Object.assign(r,L(r))}if(-1<e.indexOf("rgba(")){for(t=0,n=(i=e.replace("rgba(","").replace(")","").split(",")).length;t<n;t++)i[t]=n-1==t?parseFloat(j(i[t])):parseInt(j(i[t]),10);return r={type:"rgb",r:i[0],g:i[1],b:i[2],a:i[3]},Object.assign(r,L(r))}if(-1<e.indexOf("hsl(")){for(t=0,n=(i=e.replace("hsl(","").replace(")","").split(",")).length;t<n;t++)i[t]=parseFloat(j(i[t]));return r={type:"hsl",h:i[0],s:i[1],l:i[2],a:1},Object.assign(r,A(r))}if(-1<e.indexOf("hsla(")){for(t=0,n=(i=e.replace("hsla(","").replace(")","").split(",")).length;t<n;t++)i[t]=n-1==t?parseFloat(j(i[t])):parseInt(j(i[t]),10);return r={type:"hsl",h:i[0],s:i[1],l:i[2],a:i[3]},Object.assign(r,A(r))}if(0==e.indexOf("#")){var i=[],o=1;if(3==(e=e.replace("#","")).length)for(t=0,n=e.length;t<n;t++){var a=e.substr(t,1);i.push(parseInt(a+a,16))}else if(8===e.length){for(t=0,n=e.length;t<n;t+=2)i.push(parseInt(e.substr(t,2),16));o=i.pop()/255}else for(t=0,n=e.length;t<n;t+=2)i.push(parseInt(e.substr(t,2),16));return r={type:"hex",r:i[0],g:i[1],b:i[2],a:o},Object.assign(r,L(r))}}else if("number"==typeof e){if(0<=e&&e<=16777215)return r={type:"hex",r:(16711680&e)>>16,g:(65280&e)>>8,b:(255&e)>>0,a:1},Object.assign(r,L(r));if(0<=e&&e<=4294967295)return r={type:"hex",r:(4278190080&e)>>24,g:(16711680&e)>>16,b:(65280&e)>>8,a:(255&e)/255},Object.assign(r,L(r))}return e}function F(e){var t,n=(e=(e="string"==typeof e?I(e):e).map((function(e){var t,n;return"string"==typeof e?((n=j((t=B(e)).str).split(" "))[1]?n[1].includes("%")?n[1]=parseFloat(n[1].replace(/%/,""))/100:n[1]=parseFloat(n[1]):n[1]="*",n[0]=M(n[0],t.matches),n):Array.isArray(e)?(e[1]?"string"==typeof e[1]&&(e[1].includes("%")?e[1]=parseFloat(e[1].replace(/%/,""))/100:e[1]=+e[1]):e[1]="*",[].concat(O(e))):void 0}))).filter((function(e){return"*"===e[1]})).length;return 0<n&&(t=(1-e.filter((function(e){return"*"!=e[1]&&1!=e[1]})).map((function(e){return e[1]})).reduce((function(e,t){return e+t}),0))/n,e.forEach((function(n,r){"*"==n[1]&&0<r&&e.length-1!=r&&(n[1]=t)}))),e}var R={matches:D,convertMatches:B,convertMatchesArray:I,reverseMatches:M,parse:N,parseGradient:F,trim:j,color_regexp:T,color_split:","};function P(e,t,n){1==arguments.length&&(e=(r=arguments[0]).r,t=r.g,n=r.b);var r=e/255,i=(e=t/255,t=n/255,(n=Math.max(r,e,t))-Math.min(r,e,t)),o=0;return 0==i?o=0:n==r?o=(e-t)/i%6*60:n==e?o=60*((t-r)/i+2):n==t&&(o=60*((r-e)/i+4)),{h:o=o<0?360+o:o,s:0==n?0:i/n,v:n}}function L(e,t,n){1==arguments.length&&(e=(i=arguments[0]).r,t=i.g,n=i.b),e/=255,t/=255,n/=255;var r,i=Math.max(e,t,n),o=Math.min(e,t,n),a=(i+o)/2;if(i==o)r=c=0;else{var u=i-o,c=.5<a?u/(2-i-o):u/(i+o);switch(i){case e:r=(t-n)/u+(t<n?6:0);break;case t:r=(n-e)/u+2;break;case n:r=(e-t)/u+4}r/=6}return{h:s(360*r),s:s(100*c),l:s(100*a)}}function U(e){return{r:e,g:e,b:e}}function z(e,t,n){return Math.ceil(.2126*e+.7152*t+.0722*n)}function H(e,t,n){1==arguments.length&&(e=(r=arguments[0]).r,t=r.g,n=r.b);var r=z(e,t,n);return{y:r,cr:.713*(e-r),cb:.564*(n-r)}}function $(e,t){return 100*((1<arguments.length&&void 0!==t?t:.04045)<e?Math.pow((e+.055)/1.055,2.4):e/12.92)}function Q(e,t,n){1==arguments.length&&(e=(r=arguments[0]).r,t=r.g,n=r.b);var r=e/255;e=t/255,t=n/255;return{x:.4124*(r=$(r))+.3576*(e=$(e))+.1805*(t=$(t)),y:.2126*r+.7152*e+.0722*t,z:.0193*r+.1192*e+.9505*t}}var V={RGBtoCMYK:function(e,t,n){1==arguments.length&&(e=(r=arguments[0]).r,t=r.g,n=r.b);var r=e/255;e=t/255,t=n/255;return{c:(1-r-(n=1-Math.max(r,e,t)))/(1-n),m:(1-e-n)/(1-n),y:(1-t-n)/(1-n),k:n}},RGBtoGray:function(e,t,n){var r;return 1==arguments.length&&(e=(r=arguments[0]).r,t=r.g,n=r.b),U(H(e,t,n).y)},RGBtoHSL:L,RGBtoHSV:P,RGBtoLAB:function(e,t,n){var r;return 1==arguments.length&&(e=(r=arguments[0]).r,t=r.g,n=r.b),XYZtoLAB(Q(e,t,n))},RGBtoSimpleGray:function(e,t,n){var r;return 1==arguments.length&&(e=(r=arguments[0]).r,t=r.g,n=r.b),U(Math.ceil((e+t+n)/3))},RGBtoXYZ:Q,RGBtoYCrCb:H,c:function(e,t,n){var r;return 1==arguments.length&&(e=(r=arguments[0]).r,t=r.g,n=r.b),U(90<(e+t+n)/3?0:255)},brightness:z,gray:U},q={CMYKtoRGB:function(e,t,n,r){var i;return 1==arguments.length&&(e=(i=arguments[0]).c,t=i.m,n=i.y,r=i.k),{r:255*(1-e)*(1-r),g:255*(1-t)*(1-r),b:255*(1-n)*(1-r)}}};function G(e){return.008856<Math.pow(e,3)?Math.pow(e,3):(e-16/116)/7.787}function W(e){return.0031308<e?1.055*Math.pow(e,1/2.4)-.055:12.92*e}function K(e,t,n){1==arguments.length&&(e=(i=arguments[0]).x,t=i.y,n=i.z);n=-.9689*(i=e/100)+1.8758*(e=t/100)+.0415*(t=n/100);var r=.0557*i+-.204*e+1.057*t,i=W(3.2406*i+-1.5372*e+-.4986*t);n=W(n),r=W(r);return{r:s(255*i),g:s(255*n),b:s(255*r)}}function Y(e,t,n){1==arguments.length&&(e=(r=arguments[0]).l,t=r.a,n=r.b);e=t/500+(r=(e+16)/116),t=r-n/200;var r=G(r);return{x:95.047*G(e),y:100*r,z:108.883*G(t)}}var X={XYZtoRGB:K,LABtoRGB:function(e,t,n){var r;return 1==arguments.length&&(e=(r=arguments[0]).l,t=r.a,n=r.b),K(Y(e,t,n))},LABtoXYZ:Y};function J(e,t,n){1==arguments.length&&(e=(r=arguments[0]).h,t=r.s,n=r.v);var r=e,i=(t=(n=(360<=r&&(r=0),t*(e=n)))*(1-Math.abs(r/60%2-1)),e=e-n,[]);return 0<=r&&r<60?i=[n,t,0]:60<=r&&r<120?i=[t,n,0]:120<=r&&r<180?i=[0,n,t]:180<=r&&r<240?i=[0,t,n]:240<=r&&r<300?i=[t,0,n]:300<=r&&r<360&&(i=[n,0,t]),{r:s(255*(i[0]+e)),g:s(255*(i[1]+e)),b:s(255*(i[2]+e))}}var Z={HSVtoHSL:function(e,t,n){1==arguments.length&&(e=(r=arguments[0]).h,t=r.s,n=r.v);var r=J(e,t,n);return L(r.r,r.g,r.b)},HSVtoRGB:J},ee={YCrCbtoRGB:function(e,t,n,r){1==arguments.length&&(e=(i=arguments[0]).y,t=i.cr,n=i.cb,r=(r=i.bit)||0);var i=e+1.402*(t-r);t=e-.344*(n-r)-.714*(t-r),e+=1.772*(n-r);return{r:Math.ceil(i),g:Math.ceil(t),b:Math.ceil(e)}}};function te(t,n){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:.5,i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:"hex";return e(n={r:s(t.r+(n.r-t.r)*r),g:s(t.g+(n.g-t.g)*r),b:s(t.b+(n.b-t.b)*r),a:s(t.a+(n.a-t.a)*r,100)},n.a<1?"rgb":i)}function ne(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:5;if(!e)return[];for(var n=(e=(e="string"==typeof e?I(e):e)||[]).length,r=[],i=0;i<n-1;i++)for(var o=0;o<t;o++)r.push(re(e[i],e[i+1],o/t));return r}function re(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:.5,r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:"hex";return te(N(e),N(t),n,r)}function ie(e){return e=N(e),(Math.round(299*e.r)+Math.round(587*e.g)+Math.round(114*e.b))/1e3}function oe(t){for(var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"h",r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:9,i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:"rgb",o=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,a=5<arguments.length&&void 0!==arguments[5]?arguments[5]:1,s=6<arguments.length&&void 0!==arguments[6]?arguments[6]:100,u=P(N(t)),c=(a-o)*s/r,l=[],h=1;h<=r;h++)u[n]=Math.abs((s-c*h)/s),l.push(e(J(u),i));return l}ne.parula=function(e){return ne(["#352a87","#0f5cdd","#00b5a6","#ffc337","#fdff00"],e)},ne.jet=function(e){return ne(["#00008f","#0020ff","#00ffff","#51ff77","#fdff00","#ff0000","#800000"],e)},ne.hsv=function(e){return ne(["#ff0000","#ffff00","#00ff00","#00ffff","#0000ff","#ff00ff","#ff0000"],e)},ne.hot=function(e){return ne(["#0b0000","#ff0000","#ffff00","#ffffff"],e)},ne.pink=function(e){return ne(["#1e0000","#bd7b7b","#e7e5b2","#ffffff"],e)},ne.bone=function(e){return ne(["#000000","#4a4a68","#a6c6c6","#ffffff"],e)},ne.copper=function(e){return ne(["#000000","#3d2618","#9d623e","#ffa167","#ffc77f"],e)};var ae={interpolateRGB:te,blend:re,mix:function(e,t){return re(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:.5,3<arguments.length&&void 0!==arguments[3]?arguments[3]:"hex")},scale:ne,contrast:ie,contrastColor:function(e){return 128<=ie(e)?"black":"white"},gradient:function(e){for(var t=[],n=(1<arguments.length&&void 0!==arguments[1]?arguments[1]:10)-((e=F(e)).length-1),r=n,i=1,o=e.length;i<o;i++){var a=e[i-1][0],s=e[i][0],u=1==i?e[i][1]:e[i][1]-e[i-1][1];u=i==e.length-1?r:Math.floor(u*n),t=t.concat(ne([a,s],u),[s]);r-=u}return t},scaleHSV:oe,scaleH:function(e){return oe(e,"h",1<arguments.length&&void 0!==arguments[1]?arguments[1]:9,2<arguments.length&&void 0!==arguments[2]?arguments[2]:"rgb",3<arguments.length&&void 0!==arguments[3]?arguments[3]:0,4<arguments.length&&void 0!==arguments[4]?arguments[4]:360,1)},scaleS:function(e){return oe(e,"s",1<arguments.length&&void 0!==arguments[1]?arguments[1]:9,2<arguments.length&&void 0!==arguments[2]?arguments[2]:"rgb",3<arguments.length&&void 0!==arguments[3]?arguments[3]:0,4<arguments.length&&void 0!==arguments[4]?arguments[4]:1,100)},scaleV:function(e){return oe(e,"v",1<arguments.length&&void 0!==arguments[1]?arguments[1]:9,2<arguments.length&&void 0!==arguments[2]?arguments[2]:"rgb",3<arguments.length&&void 0!==arguments[3]?arguments[3]:0,4<arguments.length&&void 0!==arguments[4]?arguments[4]:1,100)}},se={euclidean:function(e,t){for(var n=0,r=0,i=e.length;r<i;r++)n+=Math.pow(t[r]-e[r],2);return Math.sqrt(n)},manhattan:function(e,t){for(var n=0,r=0,i=e.length;r<i;r++)n+=Math.abs(t[r]-e[r]);return n},max:function(e,t){for(var n=0,r=0,i=e.length;r<i;r++)n=Math.max(n,Math.abs(t[r]-e[r]));return n}},ue={linear:function(e,t){for(var n=[],r=Math.round(Math.random()*e),i=Math.floor(e/t);n.push(r),r=(r+i)%e,n.length<t;);return n},shuffle:function(e,t){for(var n=[];n.length<t;){var r=Math.round(Math.random()*e);-1==n.indexOf(r)&&n.push(r)}return n}};function ce(e,t,n,r){for(var i=new Array(e),o=0;o<e;o++)i[o]=[];for(var a=0,s=t.length;a<s;a++){var u=t[a];i[function(e,t,n){var r=1/0,i=0;return t.forEach((function(t,o){(t=n(e,t))<r&&(r=t,i=o)})),i}(u,n,r)].push(u)}return i}function le(e,t,n,r,i,o){for(var a=0;a<e;a++){var s=n[a],u=r[a],c=new Array(u.length);i=!function(e,t){if(e.length===t.length){for(var n=0,r=e.length;n<r;++n)if(e[n]!==t[n])return;return 1}}(c=0<s.length?function(e){if(!e.length)return[];for(var t=new Array(e[0].length),n=0,r=t.length;n<r;n++)t[n]=0;var i=0;for(r=e.length;i<r;i++)for(var o=e[i],a=i+1,s=0,u=o.length;s<u;s++)t[s]+=(o[s]-t[s])/a;return t.map((function(e){return Math.floor(e)}))}(s):t[Math.floor(o()*t.length)],u),r[a]=c}return i}function he(e,t,n,r,i){for(var o=3<arguments.length&&void 0!==r?r:10,a=(r=4<arguments.length&&void 0!==i?i:"linear",e=e,t=t||Math.max(2,Math.ceil(Math.sqrt(e.length/2))),n||"euclidean"),s=("string"==typeof a&&(a=se[a]),0),u=function(){return(s=(9301*s+49297)%233280)/233280},c=function(e,t,n){return ue[2<arguments.length&&void 0!==n?n:"linear"](e.length,t).map((function(t){return e[t]}))}(e,t,r),l=!0,h=0;l&&(l=le(t,e,ce(t,e,c,a),c,!1,u),++h%o!=0););return c}var fe={create:function(e,t){var n=document.createElement("canvas");return n.width=e||0,n.height=t||0,n},drawPixels:function(e){var t=this.create(e.width,e.height),n=t.getContext("2d"),r=n.getImageData(0,0,t.width,t.height);return r.data.set(e.pixels),n.putImageData(r,0,0),t},createHistogram:function(e,t,n,r){var i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:{black:!0,red:!1,green:!1,blue:!1},o=this.create(e,t),a=o.getContext("2d"),s=(a.clearRect(0,0,e,t),a.fillStyle="white",a.fillRect(0,0,e,t),{black:!(a.globalAlpha=.7)});i.black?s.black=!1:s.black=!0,i.red?s.red=!1:s.red=!0,i.green?s.green=!1:s.green=!0,i.blue?s.blue=!1:s.blue=!0,Object.keys(n).forEach((function(r){var i,o,u;s[r]||(i=n[r],o=Math.max.apply(Math,i),u=e/i.length,a.fillStyle=r,i.forEach((function(e,n){e=t*(e/o),a.fillRect(n*u,t-e,u,e)})))})),"function"==typeof r&&r(o)},getHistogram:function(e){for(var t=new Array(256),n=new Array(256),r=new Array(256),i=new Array(256),o=0;o<256;o++)t[o]=0,n[o]=0,r[o]=0,i[o]=0;for(var a=e,s=a.pixels.length,u=function(e){!function(e,o){var a=Math.round(Lt.brightness(e[o],e[o+1],e[o+2]));t[a]++,n[e[o]]++,r[e[o+1]]++,i[e[o+2]]++}(a.pixels,e)},c=0;c<s;c+=4)u(c);return{black:t,red:n,green:r,blue:i}},getBitmap:function(e,t){return{pixels:(e=this.drawPixels(e)).getContext("2d").getImageData(t.x||0,t.y||0,t.width||e.width,t.height||e.height).data,width:t.width,height:t.height}},putBitmap:function(e,t,n){var r=this.drawPixels(e);t=this.drawPixels(t);return(r=r.getContext("2d")).drawImage(t,n.x,n.y),e.pixels=r.getImageData(0,0,e.width,e.height).data,e}},de=(y(pe,[{key:"initialize",value:function(){this.canvas=this.createCanvas(),this.context=this.canvas.getContext("2d")}},{key:"createCanvas",value:function(){return document.createElement("canvas")}},{key:"load",value:function(e){this.loadImage(e)}},{key:"loadImage",value:function(e){var t=this,n=this.context,r=(this.newImage=new Image,this.newImage);r.onload=function(){var i=r.height/r.width;t.opt.canvasWidth&&t.opt.canvasHeight?(t.canvas.width=t.opt.canvasWidth,t.canvas.height=t.opt.canvasHeight):(t.canvas.width=t.opt.maxWidth||r.width,t.canvas.height=t.canvas.width*i),n.drawImage(r,0,0,r.width,r.height,0,0,t.canvas.width,t.canvas.height),t.isLoaded=!0,e&&e()},this.getImageUrl((function(e){r.src=e}))}},{key:"load",value:function(e){var t=this,n=(this.newImage=new Image,this.newImage);n.onload=function(){t.isLoaded=!0,e&&e()},this.getImageUrl((function(e){n.src=e}))}},{key:"getImageUrl",value:function(e){if("string"==typeof this.imageUrl)return e(this.imageUrl);var t;this.imageUrl instanceof Blob&&((t=new FileReader).onload=function(t){e(t.target.result)},t.readAsDataURL(this.imageUrl))}},{key:"getRGBA",value:function(e,t,n,r){return[e,t,n,r]}},{key:"toArray",value:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},r=this.context.getImageData(0,0,this.canvas.width,this.canvas.height),i=r.width,o=r.height;(e=e||function(e,t){t(e)})({pixels:new Uint8ClampedArray(r.data),width:i,height:o},(function(e){e=fe.drawPixels(e),"canvas"==n.returnTo?t(e):t(e.toDataURL(n.outputFormat||"image/png"))}),n)}},{key:"toHistogram",value:function(e){var t=(r=this.context.getImageData(0,0,this.canvas.width,this.canvas.height)).width,n=r.height,r=new Uint8ClampedArray(r.data);return fe.getHistogram({pixels:r,width:t,height:n})}},{key:"toRGB",value:function(){for(var e=this.context.getImageData(0,0,this.canvas.width,this.canvas.height).data,t=[],n=0,r=e.length;n<r;n+=4)t[t.length]=[e[n+0],e[n+1],e[n+2],e[n+3]];return t}}]),pe);function pe(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};v(this,pe),this.isLoaded=!1,this.imageUrl=e,this.opt=t,this.initialize()}var me={identity:function(){return[1,0,0,0,1,0,0,0,1]},stretching:function(e){return[e,0,0,0,1,0,0,0,1]},squeezing:function(e){return[e,0,0,0,1/e,0,0,0,1]},scale:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:1,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1;return[e=e||0===e?e:1,0,0,0,t=t||0===t?t:1,0,0,0,1]},scaleX:function(e){return this.scale(e)},scaleY:function(e){return this.scale(1,e)},translate:function(e,t){return[1,0,e,0,1,t,0,0,1]},rotate:function(e){return e=this.radian(e),[Math.cos(e),-Math.sin(e),0,Math.sin(e),Math.cos(e),0,0,0,1]},rotate90:function(){return[0,-1,0,1,0,0,0,0,1]},rotate180:function(){return[-1,0,0,0,-1,0,0,0,1]},rotate270:function(){return[0,1,0,-1,0,0,0,0,1]},radian:function(e){return e*Math.PI/180},skew:function(e,t){return e=this.radian(e),t=this.radian(t),[1,Math.tan(e),0,Math.tan(t),1,0,0,0,1]},skewX:function(e){return e=this.radian(e),[1,Math.tan(e),0,0,1,0,0,0,1]},skewY:function(e){return e=this.radian(e),[1,0,0,Math.tan(e),1,0,0,0,1]},shear1:function(e){return[1,-Math.tan(this.radian(e)/2),0,0,1,0,0,0,1]},shear2:function(e){return[1,0,0,Math.sin(this.radian(e)),1,0,0,0,1]}},ge={CONSTANT:me,radian:function(e){return me.radian(e)},multiply:function(e,t){return[e[0]*t[0]+e[1]*t[1]+e[2]*t[2],e[3]*t[0]+e[4]*t[1]+e[5]*t[2],e[6]*t[0]+e[7]*t[1]+e[8]*t[2]]},identity:function(e){return this.multiply(me.identity(),e)},translate:function(e,t,n){return this.multiply(me.translate(e,t),n)},rotate:function(e,t){return this.multiply(me.rotate(e),t)},shear1:function(e,t){return this.multiply(me.shear1(e),t)},shear2:function(e,t){return this.multiply(me.shear2(e),t)},rotateShear:function(e,t){return t=this.shear1(e,t),t=this.shear2(e,t),this.shear1(e,t)}};function Ae(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"center",n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"center";return function(r,i){var o=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},a=Qe(r.pixels.length,r.width,r.height),s=r.width,u=r.height,c=("center"==t&&(t=Math.floor(s/2)),"center"==n&&(n=Math.floor(u/2)),ge.CONSTANT.translate(-t,-n)),l=ge.CONSTANT.translate(t,n),h=ge.CONSTANT.shear1(e),f=ge.CONSTANT.shear2(e);Ze((function(e,t,n,i){n=ge.multiply(c,[n,i,1]),n=ge.multiply(h,n).map(Math.round),n=ge.multiply(f,n).map(Math.round),n=ge.multiply(h,n).map(Math.round),n=ge.multiply(l,n),n=(i=_(n,2))[0],i=i[1],n<0||i<0||s-1<n||u-1<i||nt(e,i*s+n<<2,r.pixels,t)}))(a,(function(){i(a)}),o)}}function ve(){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:100,t=!(2<arguments.length&&void 0!==arguments[2])||arguments[2],n=Ge(n=0<arguments.length&&void 0!==arguments[0]?arguments[0]:200);return Ye("\n        // refer to Color.brightness \n        const v = ($C * Math.ceil($r * 0.2126 + $g * 0.7152 + $b * 0.0722) ) >= $scale ? 255 : 0;\n\n        if ($hasColor) {\n\n            if (v == 0) {\n                $r = 0 \n                $g = 0 \n                $b = 0\n            }\n            \n        } else {\n            const value = Math.round(v)\n            $r = value \n            $g = value \n            $b = value \n        }\n        \n    ",{$C:Ge(e)/100,$scale:n,$hasColor:t})}function be(){return rt(Le([1,2,1,2,4,2,1,2,1],1/16*(Ge(0<arguments.length&&void 0!==arguments[0]?arguments[0]:100)/100)))}function ye(){return rt(Le([1,4,6,4,1,4,16,24,16,4,6,24,36,24,6,4,16,24,16,4,1,4,6,4,1],1/256*(Ge(0<arguments.length&&void 0!==arguments[0]?arguments[0]:100)/100)))}function we(){return Ge(0<arguments.length&&void 0!==arguments[0]?arguments[0]:1),rt([5,5,5,-3,0,-3,-3,-3,-3])}function xe(){return Ge(0<arguments.length&&void 0!==arguments[0]?arguments[0]:1),rt([5,-3,-3,5,0,-3,5,-3,-3])}function Ce(){return rt(Le([-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,24,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],Ge(0<arguments.length&&void 0!==arguments[0]?arguments[0]:100)/100))}function ke(){return rt(Le([1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1],1/9))}function Ee(){return rt(Le([1,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,1],1/9))}function Se(){return rt(Le([1,0,0,0,1,0,0,0,1,0,1,0,0,1,0,0,1,0,0,0,1,0,1,0,1,0,0,0,0,0,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,0,0,0,0,0,1,0,1,0,1,0,0,0,1,0,0,1,0,0,1,0,1,0,0,0,1,0,0,0,1],1/9))}function _e(){return rt([-1,-2,-1,0,0,0,1,2,1])}function Oe(){return rt([-1,0,1,-2,0,2,-1,0,1])}var Te=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],De=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function Be(){this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}function Ie(e,t,n){if(n){n=e;var r=t;if(!(isNaN(r)||r<1)){r|=0;var i,o,a,s,u,c,l,h,f,d,p,m,g,A,v,b,y,w,x,C,k,E=n.pixels,S=n.width,_=n.height,O=r+r+1,T=S-1,D=_-1,B=r+1,I=B*(B+1)/2,M=new Be,j=M;for(a=1;a<O;a++)j=j.next=new Be,a==B&&(k=j);j.next=M;var N=null,F=null,R=(l=c=0,Te[r]),P=De[r];for(o=0;o<_;o++){for(A=v=b=h=f=d=0,p=B*(y=E[c]),m=B*(w=E[c+1]),g=B*(x=E[c+2]),h+=I*y,f+=I*w,d+=I*x,j=M,a=0;a<B;a++)j.r=y,j.g=w,j.b=x,j=j.next;for(a=1;a<B;a++)s=c+((T<a?T:a)<<2),h+=(j.r=y=E[s])*(C=B-a),f+=(j.g=w=E[s+1])*C,d+=(j.b=x=E[s+2])*C,A+=y,v+=w,b+=x,j=j.next;for(N=M,F=k,i=0;i<S;i++)E[c]=h*R>>P,E[c+1]=f*R>>P,E[c+2]=d*R>>P,h-=p,f-=m,d-=g,p-=N.r,m-=N.g,g-=N.b,s=l+((s=i+r+1)<T?s:T)<<2,h+=A+=N.r=E[s],f+=v+=N.g=E[s+1],d+=b+=N.b=E[s+2],N=N.next,p+=y=F.r,m+=w=F.g,g+=x=F.b,A-=y,v-=w,b-=x,F=F.next,c+=4;l+=S}for(i=0;i<S;i++){for(v=b=A=f=d=h=0,p=B*(y=E[c=i<<2]),m=B*(w=E[c+1]),g=B*(x=E[c+2]),h+=I*y,f+=I*w,d+=I*x,j=M,a=0;a<B;a++)j.r=y,j.g=w,j.b=x,j=j.next;for(u=S,a=1;a<=r;a++)c=u+i<<2,h+=(j.r=y=E[c])*(C=B-a),f+=(j.g=w=E[c+1])*C,d+=(j.b=x=E[c+2])*C,A+=y,v+=w,b+=x,j=j.next,a<D&&(u+=S);for(c=i,N=M,F=k,o=0;o<_;o++)E[s=c<<2]=h*R>>P,E[s+1]=f*R>>P,E[s+2]=d*R>>P,h-=p,f-=m,d-=g,p-=N.r,m-=N.g,g-=N.b,s=i+((s=o+B)<D?s:D)*S<<2,h+=A+=N.r=E[s],f+=v+=N.g=E[s+1],d+=b+=N.b=E[s+2],N=N.next,p+=y=F.r,m+=w=F.g,g+=x=F.b,A-=y,v-=w,b-=x,F=F.next,c+=S}}return n}return stackBlurCanvasRGB(e,0,0,t)}function Me(){var e=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],t=Ge(t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:10);return function(n,r){r(Ie(n,t,e))}}function je(){return rt(Le([1,4,6,4,1,4,16,24,16,4,6,24,-476,24,6,4,16,24,16,4,1,4,6,4,1],-1/Ge(0<arguments.length&&void 0!==arguments[0]?arguments[0]:256)))}var Ne,Fe=S({},{crop:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,n=arguments[2],r=arguments[3],i=Qe(n*r*4,n,r);return function(o,a){for(var s=t,u=0;s<r;s++,u++)for(var c=e,l=0;c<n;c++,l++)i.pixels[u*n*l]=o.pixels[s*n*c];a(i)}},resize:function(e,t){return function(n,r){var i=(n=fe.drawPixels(n)).getContext("2d");n.width=e,n.height=t,r({pixels:new Uint8ClampedArray(i.getImageData(0,0,e,t).data),width:e,height:t})}},flipH:function(){return function(e,t){for(var n=e.width,r=e.height,i=n%2==1?Math.floor(n/2):n/2,o=0;o<r;o++)for(var a=0;a<i;a++)Je(e.pixels,o*n+a<<2,o*n+(n-1-a)<<2);t(e)}},flipV:function(){return function(e,t){for(var n=e.width,r=e.height,i=r%2==1?Math.floor(r/2):r/2,o=0;o<i;o++)for(var a=0;a<n;a++)Je(e.pixels,o*n+a<<2,(r-1-o)*n+a<<2);t(e)}},rotate:function(){var e=Ge(e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0);return e%=360,function(t,n){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};if(0==e)return t;if(90==e||270==e)var i=Qe(t.pixels.length,t.height,t.width);else{if(180!=e)return Ae(e)(t,n,r);i=Qe(t.pixels.length,t.width,t.height)}Ze((function(n,r,o,a){var s;90==e?s=o*i.width+(i.width-1-a)<<2:270==e?s=(i.height-1-o)*i.width+a<<2:180==e&&(s=(i.height-1-a)*i.width+(i.width-1-o)<<2),nt(i.pixels,s,t.pixels,r)}))(t,(function(){n(i)}),r)}},rotateDegree:Ae,histogram:function(){for(var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"gray",t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],n=[],r=0;r<t.length-1;r++)for(var i=t[r],o=t[r+1],a=o[0]-i[0],s=(o[1]-i[1])/a,u=0,c=i[0];u<a;u++,c++)n[c]=i[1]+u*s;return n[255]=255,Ye("red"===e?function(){$r=n[$r]}:"green"===e?function(){$g=n[$g]}:"blue"===e?function(){$b=n[$b]}:function(){var e=Color.RGBtoYCrCb($r,$g,$b);e=Color.YCrCbtoRGB(clamp(n[clamp(e.y)]),e.cr,e.cb,0);$r=e.r,$g=e.g,$b=e.b},{},{$realPoints:n})},"rotate-degree":Ae},{bitonal:function(e,t){return Ye("\n        const thresholdColor = ( $r + $g + $b ) <= $threshold ? $darkColor : $lightColor\n\n        $r = thresholdColor.r\n        $g = thresholdColor.g \n        $b = thresholdColor.b \n    ",{$threshold:2<arguments.length&&void 0!==arguments[2]?arguments[2]:100},{$darkColor:Lt.parse(e),$lightColor:Lt.parse(t)})},brightness:function(){var e=Ge(0<arguments.length&&void 0!==arguments[0]?arguments[0]:1);return Ye("\n        $r += $C \n        $g += $C \n        $b += $C \n    ",{$C:Math.floor(e/100*255)})},brownie:function(){return Ye("\n        $r = $matrix[0] * $r + $matrix[1] * $g + $matrix[2] * $b + $matrix[3] * $a\n        $g = $matrix[4] * $r + $matrix[5] * $g + $matrix[6] * $b + $matrix[7] * $a\n        $b = $matrix[8] * $r + $matrix[9] * $g + $matrix[10] * $b + $matrix[11] * $a\n        $a = $matrix[12] * $r + $matrix[13] * $g + $matrix[14] * $b + $matrix[15] * $a        \n    ",{$matrix:[.5997023498159715,.34553243048391263,-.2708298674538042,0,-.037703249837783157,.8609577587992641,.15059552388459913,0,.24113635128153335,-.07441037908422492,.44972182064877153,0,0,0,0,1]})},clip:function(){var e=Ge(0<arguments.length&&void 0!==arguments[0]?arguments[0]:0);return Ye("\n\n        $r = ($r > 255 - $C) ? 255 : 0\n        $g = ($g > 255 - $C) ? 255 : 0\n        $b = ($b > 255 - $C) ? 255 : 0\n\n    ",{$C:2.55*Math.abs(e)})},contrast:function(){var e=Ge(0<arguments.length&&void 0!==arguments[0]?arguments[0]:0);return Ye("\n        $r *= $C\n        $g *= $C\n        $b *= $C\n    ",{$C:Math.max((128+e)/128,0)})},gamma:function(){return Ye("\n        $r = Math.pow($r / 255, $C) * 255\n        $g = Math.pow($g / 255, $C) * 255\n        $b = Math.pow($b / 255, $C) * 255\n    ",{$C:Ge(0<arguments.length&&void 0!==arguments[0]?arguments[0]:1)})},gradient:function(){var e=(e=(t=(t=1===(t=[].concat(Array.prototype.slice.call(arguments))).length&&"string"==typeof t[0]?Lt.convertMatchesArray(t[0]):t).map((function(e){return Lt.matches(e).length?{type:"param",value:e}:{type:"scale",value:e}}))).filter((function(e){return"scale"==e.type}))[0])?+e.value:256,t=t.filter((function(e){return"param"==e.type})).map((function(e){return e.value})).join(",");return Ye("\n        const colorIndex = clamp(Math.ceil($r * 0.2126 + $g * 0.7152 + $b * 0.0722))\n        const newColorIndex = clamp(Math.floor(colorIndex * ($scale / 256)))\n        const color = $colors[newColorIndex]\n\n        $r = color.r \n        $g = color.g \n        $b = color.b \n        $a = clamp(Math.floor(color.a * 256))\n    ",{},{$colors:Lt.gradient(t,e).map((function(e){return{r:(e=Lt.parse(e)).r,g:e.g,b:e.b,a:e.a}})),$scale:e})},grayscale:function(e){return Ye("\n        $r = $matrix[0] * $r + $matrix[1] * $g + $matrix[2] * $b + $matrix[3] * $a\n        $g = $matrix[4] * $r + $matrix[5] * $g + $matrix[6] * $b + $matrix[7] * $a\n        $b = $matrix[8] * $r + $matrix[9] * $g + $matrix[10] * $b + $matrix[11] * $a\n        $a = $matrix[12] * $r + $matrix[13] * $g + $matrix[14] * $b + $matrix[15] * $a\n    ",{$matrix:[.2126+.7874*(1-(e=1<(e=(e=Ge(e))/100)?1:e)),.7152-.7152*(1-e),.0722-.0722*(1-e),0,.2126-.2126*(1-e),.7152+.2848*(1-e),.0722-.0722*(1-e),0,.2126-.2126*(1-e),.7152-.7152*(1-e),.0722+.9278*(1-e),0,0,0,0,1]})},hue:function(){return Ye("\n        var hsv = Color.RGBtoHSV($r, $g, $b);\n\n        // 0 ~ 360 \n        var h = hsv.h;\n        h += Math.abs($C)\n        h = h % 360\n        hsv.h = h\n\n        var rgb = Color.HSVtoRGB(hsv);\n\n        $r = rgb.r\n        $g = rgb.g\n        $b = rgb.b\n    ",{$C:Ge(0<arguments.length&&void 0!==arguments[0]?arguments[0]:360)})},invert:function(){return Ye("\n        $r = (255 - $r) * $C\n        $g = (255 - $g) * $C\n        $b = (255 - $b) * $C\n    ",{$C:Ge(0<arguments.length&&void 0!==arguments[0]?arguments[0]:100)/100})},kodachrome:function(){return Ye("\n        $r = $matrix[0] * $r + $matrix[1] * $g + $matrix[2] * $b + $matrix[3] * $a\n        $g = $matrix[4] * $r + $matrix[5] * $g + $matrix[6] * $b + $matrix[7] * $a\n        $b = $matrix[8] * $r + $matrix[9] * $g + $matrix[10] * $b + $matrix[11] * $a\n        $a = $matrix[12] * $r + $matrix[13] * $g + $matrix[14] * $b + $matrix[15] * $a        \n    ",{$matrix:[1.1285582396593525,-.3967382283601348,-.03992559172921793,0,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,0,0,0,1]})},matrix:function(){return Ye("\n        $r = $matrix[0] * $r + $matrix[1] * $g + $matrix[2] * $b + $matrix[3] * $a\n        $g = $matrix[4] * $r + $matrix[5] * $g + $matrix[6] * $b + $matrix[7] * $a\n        $b = $matrix[8] * $r + $matrix[9] * $g + $matrix[10] * $b + $matrix[11] * $a\n        $a = $matrix[12] * $r + $matrix[13] * $g + $matrix[14] * $b + $matrix[15] * $a        \n    ",{$matrix:[0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,3<arguments.length&&void 0!==arguments[3]?arguments[3]:0,4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,5<arguments.length&&void 0!==arguments[5]?arguments[5]:0,6<arguments.length&&void 0!==arguments[6]?arguments[6]:0,7<arguments.length&&void 0!==arguments[7]?arguments[7]:0,8<arguments.length&&void 0!==arguments[8]?arguments[8]:0,9<arguments.length&&void 0!==arguments[9]?arguments[9]:0,10<arguments.length&&void 0!==arguments[10]?arguments[10]:0,11<arguments.length&&void 0!==arguments[11]?arguments[11]:0,12<arguments.length&&void 0!==arguments[12]?arguments[12]:0,13<arguments.length&&void 0!==arguments[13]?arguments[13]:0,14<arguments.length&&void 0!==arguments[14]?arguments[14]:0,15<arguments.length&&void 0!==arguments[15]?arguments[15]:0]})},noise:function(){return Ye("\n        const C = Math.abs($C) * 5\n        const min = -C\n        const max = C \n        const noiseValue = Math.round(min + (Math.random() * (max - min)))\n\n        $r += noiseValue\n        $g += noiseValue\n        $b += noiseValue\n    ",{$C:Ge(0<arguments.length&&void 0!==arguments[0]?arguments[0]:1)})},opacity:function(){return Ye("\n        $a *= $C \n    ",{$C:Ge(0<arguments.length&&void 0!==arguments[0]?arguments[0]:100)/100})},polaroid:function(){return Ye("\n        $r = $matrix[0] * $r + $matrix[1] * $g + $matrix[2] * $b + $matrix[3] * $a\n        $g = $matrix[4] * $r + $matrix[5] * $g + $matrix[6] * $b + $matrix[7] * $a\n        $b = $matrix[8] * $r + $matrix[9] * $g + $matrix[10] * $b + $matrix[11] * $a\n        $a = $matrix[12] * $r + $matrix[13] * $g + $matrix[14] * $b + $matrix[15] * $a        \n    ",{$matrix:[1.438,-.062,-.062,0,-.122,1.378,-.122,0,-.016,-.016,1.483,0,0,0,0,1]})},saturation:function(){var e=Ge(0<arguments.length&&void 0!==arguments[0]?arguments[0]:100);return Ye("\n        $r = $matrix[0] * $r + $matrix[1] * $g + $matrix[2] * $b + $matrix[3] * $a\n        $g = $matrix[4] * $r + $matrix[5] * $g + $matrix[6] * $b + $matrix[7] * $a\n        $b = $matrix[8] * $r + $matrix[9] * $g + $matrix[10] * $b + $matrix[11] * $a\n        $a = $matrix[12] * $r + $matrix[13] * $g + $matrix[14] * $b + $matrix[15] * $a        \n    ",{$matrix:[e=1-Math.abs(e/100),0,0,0,0,e,0,0,0,0,e,0,0,0,0,e]})},sepia:function(){var e=Ge(0<arguments.length&&void 0!==arguments[0]?arguments[0]:1);return Ye("\n        $r = $matrix[0] * $r + $matrix[1] * $g + $matrix[2] * $b + $matrix[3] * $a\n        $g = $matrix[4] * $r + $matrix[5] * $g + $matrix[6] * $b + $matrix[7] * $a\n        $b = $matrix[8] * $r + $matrix[9] * $g + $matrix[10] * $b + $matrix[11] * $a\n        $a = $matrix[12] * $r + $matrix[13] * $g + $matrix[14] * $b + $matrix[15] * $a        \n    ",{$matrix:[.393+.607*(1-(e=1<e?1:e)),.769-.769*(1-e),.189-.189*(1-e),0,.349-.349*(1-e),.686+.314*(1-e),.168-.168*(1-e),0,.272-.272*(1-e),.534-.534*(1-e),.131+.869*(1-e),0,0,0,0,1]})},shade:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:1,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:1;return Ye("\n        $r *= $redValue\n        $g *= $greenValue\n        $b *= $blueValue\n    ",{$redValue:Ge(e),$greenValue:Ge(t),$blueValue:Ge(n)})},shift:function(){return Ye("\n        $r = $matrix[0] * $r + $matrix[1] * $g + $matrix[2] * $b + $matrix[3] * $a\n        $g = $matrix[4] * $r + $matrix[5] * $g + $matrix[6] * $b + $matrix[7] * $a\n        $b = $matrix[8] * $r + $matrix[9] * $g + $matrix[10] * $b + $matrix[11] * $a\n        $a = $matrix[12] * $r + $matrix[13] * $g + $matrix[14] * $b + $matrix[15] * $a        \n    ",{$matrix:[1.438,-.062,-.062,0,-.122,1.378,-.122,0,-.016,-.016,1.483,0,0,0,0,1]})},solarize:function(e,t,n){return Ye("\n        $r = ($r < $redValue) ? 255 - $r: $r\n        $g = ($g < $greenValue) ? 255 - $g: $g\n        $b = ($b < $blueValue) ? 255 - $b: $b\n    ",{$redValue:Ge(e),$greenValue:Ge(t),$blueValue:Ge(n)})},technicolor:function(){return Ye("\n        $r = $matrix[0] * $r + $matrix[1] * $g + $matrix[2] * $b + $matrix[3] * $a\n        $g = $matrix[4] * $r + $matrix[5] * $g + $matrix[6] * $b + $matrix[7] * $a\n        $b = $matrix[8] * $r + $matrix[9] * $g + $matrix[10] * $b + $matrix[11] * $a\n        $a = $matrix[12] * $r + $matrix[13] * $g + $matrix[14] * $b + $matrix[15] * $a        \n    ",{$matrix:[1.9125277891456083,-.8545344976951645,-.09155508482755585,0,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-.231103377548616,-.7501899197440212,1.847597816108189,0,0,0,0,1]})},threshold:function(){return ve(0<arguments.length&&void 0!==arguments[0]?arguments[0]:200,1<arguments.length&&void 0!==arguments[1]?arguments[1]:100,!1)},"threshold-color":ve,tint:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:1,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:1;return Ye("\n\n        $r += (255 - $r) * $redTint\n        $g += (255 - $g) * $greenTint\n        $b += (255 - $b) * $blueTint\n\n    ",{$redTint:Ge(e),$greenTint:Ge(t),$blueTint:Ge(n)})}},{blur:function(){return rt(et(Ge(0<arguments.length&&void 0!==arguments[0]?arguments[0]:3)))},emboss:function(){var e;return rt([-2*(e=Ge(0<arguments.length&&void 0!==arguments[0]?arguments[0]:4)),-e,0,-e,1,e,0,e,2*e])},gaussianBlur:be,"gaussian-blur":be,gaussianBlur5x:ye,"gaussian-blur-5x":ye,grayscale2:function(){return rt(Le([.3,.3,.3,0,0,.59,.59,.59,0,0,.11,.11,.11,0,0,0,0,0,0,0,0,0,0,0,0],Ge(0<arguments.length&&void 0!==arguments[0]?arguments[0]:100)/100))},normal:function(){return rt([0,0,0,0,1,0,0,0,0])},kirschHorizontal:we,"kirsch-horizontal":we,kirschVertical:xe,"kirsch-vertical":xe,laplacian:function(){return rt(Le([-1,-1,-1,-1,8,-1,-1,-1,-1],Ge(0<arguments.length&&void 0!==arguments[0]?arguments[0]:100)/100))},laplacian5x:Ce,"laplacian-5x":Ce,motionBlur:ke,"motion-blur":ke,motionBlur2:Ee,"motion-blur-2":Ee,motionBlur3:Se,"motion-blur-3":Se,negative:function(){return rt(Le([-1,0,0,0,0,0,-1,0,0,0,0,0,-1,0,0,0,0,0,1,0,1,1,1,1,1],Ge(0<arguments.length&&void 0!==arguments[0]?arguments[0]:100)/100))},sepia2:function(){return rt(Le([.393,.349,.272,0,0,.769,.686,.534,0,0,.189,.168,.131,0,0,0,0,0,0,0,0,0,0,0,0],Ge(0<arguments.length&&void 0!==arguments[0]?arguments[0]:100)/100))},sharpen:function(){return rt(Le([0,-1,0,-1,5,-1,0,-1,0],Ge(0<arguments.length&&void 0!==arguments[0]?arguments[0]:100)/100))},sobelHorizontal:_e,"sobel-horizontal":_e,sobelVertical:Oe,"sobel-vertical":Oe,stackBlur:Me,"stack-blur":Me,transparency:function(){return rt(Le([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,.3,0,0,0,0,0,1],Ge(0<arguments.length&&void 0!==arguments[0]?arguments[0]:100)/100))},unsharpMasking:je,"unsharp-masking":je},{kirsch:function(){return st("kirsch-horizontal kirsch-vertical")},sobel:function(){return st("sobel-horizontal sobel-vertical")},vintage:function(){return st("brightness(15) saturation(-20) gamma(1.8)")}}),Re=0,Pe=(x(Ne={partial:ht,multi:ct,merge:lt,weight:Le,repeat:Ue,colorMatrix:function(e,t,n){var r=e[t],i=e[t+1],o=e[t+2],a=e[t+3];tt(e,t,n[0]*r+n[1]*i+n[2]*o+n[3]*a,n[4]*r+n[5]*i+n[6]*o+n[7]*a,n[8]*r+n[9]*i+n[10]*o+n[11]*a,n[12]*r+n[13]*i+n[14]*o+n[15]*a)},each:He,eachXY:$e,createRandomCount:function(){return[9,16,25,36,49,64,81,100].sort((function(e,t){return.5-Math.random()}))[0]},createRandRange:function(e,t,n){for(var r=[],i=1;i<=n;i++){var o=Math.random()*(t-e)+e,a=Math.floor(10*Math.random())%2==0?-1:1;r.push(a*o)}r.sort();var s=Math.floor(n>>1),u=r[s];return r[s]=r[0],r[0]=u,r},createBitmap:Qe,createBlurMatrix:et,pack:function(e){return function(t,n){He(t.pixels.length,(function(n,r){e(t.pixels,n,r,t.pixels[n],t.pixels[n+1],t.pixels[n+2],t.pixels[n+3])}),(function(){n(t)}))}},packXY:Ze,pixel:Ye,getBitmap:Ve,putBitmap:qe,radian:function(e){return ge.CONSTANT.radian(e)},convolution:rt,parseParamNumber:Ge,filter:st,clamp:at,fillColor:tt,fillPixelColor:nt},"multi",ct),x(Ne,"merge",lt),x(Ne,"matches",it),x(Ne,"parseFilter",ot),x(Ne,"partial",ht),Ne);function Le(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1;return e.map((function(e){return e*t}))}function Ue(e,t){for(var n=new Array(t),r=0;r<t;r++)n[r]=e;return n}function ze(e,t,n,r,i,o,a,s){var u=2<arguments.length&&void 0!==n?n:1,c=r,l=i,h=5<arguments.length&&void 0!==o?o:1e4,f=7<arguments.length&&void 0!==s?s:50,d=t=1<arguments.length&&void 0!==t?t:0,p=function(e){setTimeout(e,0)};function m(){for(var t,n=function(e){return e=[].concat(O(Array(0<arguments.length&&void 0!==e?e:50))).map((function(e){return"cri = ri + i * s; if (cri >= mx) return {currentRunIndex: cri, i: null}; c(cri); i++;"})).join("\n"),new Function("ri","i","s","mx","c","\n            let cri = ri;\n            \n            "+e+"\n            \n            return {currentRunIndex: cri, i: i} \n        ")}(f),r=d,i=0;i<h;){if(null==(t=n(d,i,u,e,c)).i){r=t.currentRunIndex;break}i=t.i,r=t.currentRunIndex}r?d=r:d+=u,e<=d?l():p?p(m):m()}"requestAnimationFrame"==(n=6<arguments.length&&void 0!==a?a:"full")&&(p=requestAnimationFrame,h=1e3),"full"==n&&(p=null,h=e),m()}function He(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{};ze(e,0,4,(function(e){t(e,e>>2)}),(function(){n()}),r.functionDumpCount,r.frameTimer,r.loopCount)}function $e(e,t,n,r){var i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:{};ze(e,0,4,(function(e){var r=e>>2;n(e,r%t,Math.floor(r/t))}),(function(){r()}),i.functionDumpCount,i.frameTimer,i.loopCount)}function Qe(e,t,n){return{pixels:new Uint8ClampedArray(e),width:t,height:n}}function Ve(e,t){return fe.getBitmap(e,t)}function qe(e,t,n){return fe.putBitmap(e,t,n)}function Ge(e){return+(e="string"==typeof e?(e=e.replace(/deg/,"")).replace(/px/,""):e)}var We=/(([\w_\-]+)(\(([^\)]*)\))?)+/gi;function Ke(e,t,n){var r;return r={},t=(e=(e=[{callback:e,context:1<arguments.length&&void 0!==t?t:{},rootContext:2<arguments.length&&void 0!==n?n:{}}]).map((function(e){var t=[],n=(Object.keys(e.context).forEach((function(e,n){t[e]="n$"+Re+++e+"$"})),Object.keys(e.rootContext).forEach((function(n,i){t[n]="r$"+Re+++n+"$",r[t[n]]=e.rootContext[n]})),Object.keys(e.context).filter((function(t){return"number"!=typeof e.context[t]&&"string"!=typeof e.context[t]&&(!Array.isArray(e.context[t])||"number"!=typeof e.context[t][0]&&"string"!=typeof e.context[t][0])})).map((function(n,r){return[t[n],JSON.stringify(e.context[n])].join(" = ")}))),i=e.callback;return"function"==typeof e.callback&&((i=e.callback.toString().split("{")).shift(),(i=(i=i.join("{")).split("}")).pop(),i=i.join("}")),Object.keys(t).forEach((function(n){var r=t[n];"number"==typeof e.context[n]||"string"==typeof e.context[n]?i=i.replace(new RegExp("\\"+n,"g"),e.context[n]):!Array.isArray(e.context[n])||"number"!=typeof e.context[n][0]&&"string"!=typeof e.context[n][0]?i=i.replace(new RegExp("\\"+n,"g"),r):e.context[n].forEach((function(e,t){i=i.replace(new RegExp("\\"+n+"\\["+t+"\\]","g"),e)}))})),{preCallbackString:i,preContext:n}}))).map((function(e,t){return e.preContext.length?"const "+e.preContext+";":""})).join("\n\n"),e=e.map((function(e){return e.preCallbackString})).join("\n\n"),(n=new Function("$pixels","$pixelIndex","$clamp","$Color"," \n    let $r = $pixels[$pixelIndex], $g = $pixels[$pixelIndex+1], $b = $pixels[$pixelIndex+2], $a = $pixels[$pixelIndex+3];\n\n    "+t+"\n\n    "+e+"\n    \n    $pixels[$pixelIndex] = $r\n    $pixels[$pixelIndex+1] = $g \n    $pixels[$pixelIndex+2] = $b   \n    $pixels[$pixelIndex+3] = $a   \n    ")).$preCallbackString=e,n.$preContext=t,n.rootContextObject=r,n}function Ye(e){function t(e,t){}return e=Ke(e,1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},2<arguments.length&&void 0!==arguments[2]?arguments[2]:{}),t.userFunction=e,t}var Xe=[0,1,2,3];function Je(e,t,n){Xe.forEach((function(r){var i=e[t+r];e[t+r]=e[n+r],e[n+r]=i}))}function Ze(e){return function(t,n){$e(t.pixels.length,t.width,(function(n,r,i){e(t.pixels,n,r,i)}),(function(){n(t)}),2<arguments.length&&void 0!==arguments[2]?arguments[2]:{})}}function et(){var e=Math.pow(0<arguments.length&&void 0!==arguments[0]?arguments[0]:3,2);return Ue(1/e,e)}function tt(e,t,n,r,i,o){var a;3==arguments.length&&(n=(a=arguments[2]).r,r=a.g,i=a.b,o=a.a),"number"==typeof n&&(e[t]=n),"number"==typeof r&&(e[t+1]=r),"number"==typeof i&&(e[t+2]=i),"number"==typeof o&&(e[t+3]=o)}function nt(e,t,n,r){tt(e,t,n[r],n[r+1],n[r+2],n[r+3])}function rt(e){var t=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],n=function(e,t,n){var r=1<arguments.length&&void 0!==t?t:0,i=2<arguments.length&&void 0!==n?n:255,o=e.map((function(e,t){return[]}));return e.forEach((function(e,t){if(0!=e){var n=o[t];for(t=r;t<=i;t++)n[t]=e*t}})),o}(e);return function(r,i){for(var o,a,s,u,c=Math.round(Math.sqrt(e.length)),l=function(e,t){t=1<arguments.length&&void 0!==t?t:0;var n=e.width+t;e=e.height+t;return{pixels:new Uint8ClampedArray(n*e*4),width:n,height:e}}(r,2*c),h=l,f=r,d=c,p=c,m=f.pixels.length/4,g=0;g<m;g++)u=g%f.width,a=p+(s=Math.floor(g/f.width)),(o=d+u)>h.width||a>h.height||(s=s*f.width+u<<2,u=a*h.width+o<<2,h.pixels[u]=f.pixels[s],h.pixels[1+u]=f.pixels[1+s],h.pixels[2+u]=f.pixels[2+s],h.pixels[3+u]=f.pixels[3+s]);for(var A,v,b,y,w,x,C,k,E,S,_,O,T=Qe(l.pixels.length,l.width,l.height),D=Qe(r.pixels.length,r.width,r.height),B=(A=e,v=n,b=l.width,l.height,y=t,w=Math.round(Math.sqrt(A.length)),x=Math.floor(w/2),y=y?1:0,"let r = 0, g = 0, b = 0, a = 0, scy = 0, scx =0, si = 0; ",k=[],E=[],S=[],_=[],A.forEach((function(e,t){var n=Math.floor(t/w)-x,r=t%w-x;0!=e&&(k.push("$t["+t+"][$sp[(($sy + ("+n+")) * "+b+" + ($sx + ("+r+"))) * 4]]"),E.push("$t["+t+"][$sp[(($sy + ("+n+")) * "+b+" + ($sx + ("+r+"))) * 4 + 1]]"),S.push("$t["+t+"][$sp[(($sy + ("+n+")) * "+b+" + ($sx + ("+r+"))) * 4 + 2]]"),_.push("$t["+t+"][$sp[(($sy + ("+n+")) * "+b+" + ($sx + ("+r+"))) * 4 + 3]]"))})),C="let r = 0, g = 0, b = 0, a = 0, scy = 0, scx =0, si = 0; r = "+k.join(" + ")+"; g = "+E.join(" + ")+"; b = "+S.join(" + ")+"; a = "+_.join(" + ")+";$dp[$di] = r; $dp[$di+1] = g;$dp[$di+2] = b;$dp[$di+3] = a + ("+y+")*(255-a); ",O=new Function("$dp","$sp","$di","$sx","$sy","$t",C),function(e,t,n,r,i){O(e,t,n,r,i,v)}),I=r.pixels.length/4,M=0;M<I;M++){var j=(N=M)%r.width+c,N=Math.floor(N/r.width)+c;B(T.pixels,l.pixels,4*(N*l.width+j),j,N)}for(var F=T,R=D,P=c,L=c,U=R.pixels.length>>2,z=0;z<U;z++){var H,$,Q=z%R.width,V=L+(H=Math.floor(z/R.width));($=P+Q)>F.width||V>F.height||(V=V*F.width+$<<2,$=H*R.width+Q<<2,R.pixels[$]=F.pixels[V],R.pixels[1+$]=F.pixels[1+V],R.pixels[2+$]=F.pixels[2+V],R.pixels[3+$]=F.pixels[3+V])}i(D)}}function it(e){var t,n=Lt.convertMatches(e),r=n.str.match(We),i=[];return r&&(i=r.map((function(e){return{filter:e,origin:Lt.reverseMatches(e,n.matches)}})),t={next:0},i=i.map((function(n){var r=e.indexOf(n.origin,t.next);return n.startIndex=r,n.endIndex=r+n.origin.length,n.arr=ot(n.origin),t.next=n.endIndex,n})).filter((function(e){return!!e.arr.length}))),i}function ot(e){var t,n,r=Lt.convertMatches(e);return(e=r.str.match(We))[0]?(t=(e=e[0].split("(")).shift(),n=[],e.length&&(n=e.shift().split(")")[0].split(",").map((function(e){return Lt.reverseMatches(e,r.matches)}))),[t].concat(O(n)).map(Lt.trim)):[]}function at(e){return Math.min(255,e)}function st(e){return lt(it(e).map((function(e){return e.arr})))}function ut(e){for(var t=0<arguments.length&&void 0!==e?e:[],n=[],r=[],i=0,o=t.length;i<o;i++){var a=t[i];a.userFunction?r.push(a):(r.length&&n.push([].concat(O(r))),n.push(a),r=[])}return r.length&&n.push([].concat(O(r))),n.forEach((function(e,t){var r,i,o;Array.isArray(e)&&(n[t]=(e=(t=e).map((function(e){return" \n            "+e.userFunction.$preContext+"\n\n            "+e.userFunction.$preCallbackString+"\n\n            $r = clamp($r); $g = clamp($g); $b = clamp($b); $a = clamp($a);\n        "})).join("\n\n"),r={clamp:at,Color:Lt},t.forEach((function(e){Object.assign(r,e.userFunction.rootContextObject)})),t="const "+Object.keys(r).map((function(e){return" "+e+" = $rc."+e+" "})).join(","),i=new Function("$p","$pi","$rc"," \n    let $r = $p[$pi], $g = $p[$pi+1], $b = $p[$pi+2], $a = $p[$pi+3];\n    \n    "+t+"\n\n    "+e+"\n    \n    $p[$pi] = $r; $p[$pi+1] = $g; $p[$pi+2] = $b; $p[$pi+3] = $a;\n    "),o=function(e,t){i(e,t,r)},function(e,t){for(var n=0,r=e.pixels.length;n<r;n+=4)o(e.pixels,n);t(e)}))})),n}function ct(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=(t=ut(t=t.map((function(e){if("function"==typeof e)return e;var t=(e=(e="string"==typeof e?[e]:e).slice(0)).shift();if("function"==typeof t)return t;var n=Fe[t]||Pe[t];if(n)return n.apply(n,e);throw new Error(t+" is not filter. please check filter name.")})).filter((function(e){return e})))).length;return function(e,n){var i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},o=e,a=0;function s(){t[a].call(null,o,(function(e){o=e,r<=++a?n(o):s()}),i)}s()}}function lt(e){return ct.apply(void 0,O(e))}function ht(e){for(var t=null,n=arguments.length,r=Array(1<n?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return t=1==r.length&&"string"==typeof r[0]?st(r[0]):lt(r),function(n,r){var i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};t(Ve(n,e),(function(t){r(qe(n,t,e))}),i)}}function ft(e){return+(e="string"==typeof e?(e=e.replace(/deg/,"")).replace(/px/,""):e)}function dt(e,t){var n=1<arguments.length&&void 0!==t?t:1;return e.map((function(e){return e*n}))}var pt=0;function mt(){return[].concat(Array.prototype.slice.call(arguments))}function gt(e){return{type:"convolution",length:e.length,content:e}}function At(e,t){return{type:"shader",index:pt,options:t,content:"\n        if (u_filterIndex == "+pt+++".0) {\n            "+e+"\n        }\n    "}}function vt(e){return"vec4("+(e=[e.r/255,e.g/255,e.b/255,e.a||0].map(bt))+")"}function bt(e){return e==Math.floor(e)?e+".0":e}function yt(){return gt(dt([1,2,1,2,4,2,1,2,1],ft(0<arguments.length&&void 0!==arguments[0]?arguments[0]:1)*(1/16)))}function wt(){return gt([1,4,6,4,1,4,16,24,16,4,6,24,36,24,6,4,16,24,16,4,1,4,6,4,1])}function xt(){return gt([5,5,5,-3,0,-3,-3,-3,-3])}function Ct(){return gt([5,-3,-3,5,0,-3,5,-3,-3])}function kt(){return gt([-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,24,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1])}function Et(){return gt([1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1])}function St(){return gt([1,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,1])}function _t(){return gt([1,0,0,0,1,0,0,0,1,0,1,0,0,1,0,0,1,0,0,0,1,0,1,0,1,0,0,0,0,0,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,0,0,0,0,0,1,0,1,0,1,0,0,0,1,0,0,1,0,0,1,0,1,0,0,0,1,0,0,0,1])}function Ot(){return gt([-1,-2,-1,0,0,0,1,2,1])}function Tt(){return gt([-1,0,1,-2,0,2,-1,0,1])}function Dt(){return gt(dt([1,4,6,4,1,4,16,24,16,4,6,24,-476,24,6,4,16,24,16,4,1,4,6,4,1],-1/256))}function Bt(){var e=[0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,3<arguments.length&&void 0!==arguments[3]?arguments[3]:0,4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,5<arguments.length&&void 0!==arguments[5]?arguments[5]:0,6<arguments.length&&void 0!==arguments[6]?arguments[6]:0,7<arguments.length&&void 0!==arguments[7]?arguments[7]:0,8<arguments.length&&void 0!==arguments[8]?arguments[8]:0,9<arguments.length&&void 0!==arguments[9]?arguments[9]:0,10<arguments.length&&void 0!==arguments[10]?arguments[10]:0,11<arguments.length&&void 0!==arguments[11]?arguments[11]:0,12<arguments.length&&void 0!==arguments[12]?arguments[12]:0,13<arguments.length&&void 0!==arguments[13]?arguments[13]:0,14<arguments.length&&void 0!==arguments[14]?arguments[14]:0,15<arguments.length&&void 0!==arguments[15]?arguments[15]:0].map(bt);return At("\n\n        outColor = vec4(\n            "+e[0]+" * pixelColor.r + "+e[1]+" * pixelColor.g + "+e[2]+" * pixelColor.b + "+e[3]+" * pixelColor.a,\n            "+e[4]+" * pixelColor.r + "+e[5]+" * pixelColor.g + "+e[6]+" * pixelColor.b + "+e[7]+" * pixelColor.a,\n            "+e[8]+" * pixelColor.r + "+e[9]+" * pixelColor.g + "+e[10]+" * pixelColor.b + "+e[11]+" * pixelColor.a,\n            "+e[12]+" * pixelColor.r + "+e[13]+" * pixelColor.g + "+e[14]+" * pixelColor.b + "+e[15]+" * pixelColor.a\n        ); \n    ")}function It(){return At("\n        float c = ( (pixelColor.r * 0.2126 + pixelColor.g * 0.7152 + pixelColor.b * 0.0722) ) >= "+bt(ft(0<arguments.length&&void 0!==arguments[0]?arguments[0]:1))+" ? 1.0 : 0.0;\n\n        outColor = vec4(c, c, c, pixelColor.a);\n    ")}var Mt=S({},{blur:function(){return gt([1,1,1,1,1,1,1,1,1])},normal:function(){return gt([0,0,0,0,1,0,0,0,0])},emboss:function(){var e;return gt([-2*(e=ft(0<arguments.length&&void 0!==arguments[0]?arguments[0]:4)),-e,0,-e,1,e,0,e,2*e])},gaussianBlur:yt,"gaussian-blur":yt,gaussianBlur5x:wt,"gaussian-blur-5x":wt,grayscale2:function(){return gt([.3,.3,.3,0,0,.59,.59,.59,0,0,.11,.11,.11,0,0,0,0,0,0,0,0,0,0,0,0])},kirschHorizontal:xt,"kirsch-horizontal":xt,kirschVertical:Ct,"kirsch-vertical":Ct,laplacian:function(){return gt([-1,-1,-1,-1,8,-1,-1,-1,-1])},laplacian5x:kt,"laplacian-5x":kt,motionBlur:Et,"motion-blur":Et,motionBlur2:St,"motion-blur-2":St,motionBlur3:_t,"motion-blur-3":_t,negative:function(){return gt([-1,0,0,0,0,0,-1,0,0,0,0,0,-1,0,0,0,0,0,1,0,1,1,1,1,1])},sepia2:function(){return gt([.393,.349,.272,0,0,.769,.686,.534,0,0,.189,.168,.131,0,0,0,0,0,0,0,0,0,0,0,0])},sharpen:function(){return gt([0,-1,0,-1,5,-1,0,-1,0])},sobelHorizontal:Ot,"sobel-horizontal":Ot,sobelVertical:Tt,"sobel-vertical":Tt,transparency:function(){return gt([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,.3,0,0,0,0,0,1])},unsharpMasking:Dt,"unsharp-masking":Dt},{bitonal:function(e,t){var n=bt(2<arguments.length&&void 0!==arguments[2]?arguments[2]:.5);e=vt(Lt.parse(e));return At("\n        if ((pixelColor.r + pixelColor.g + pixelColor.b) > "+n+") {\n            outColor = vec4("+vt(Lt.parse(t))+".rgb, pixelColor.a);\n        } else {\n            outColor = vec4("+e+".rgb, pixelColor.a);\n        }\n    ")},brightness:function(){return At("\n        outColor = pixelColor + ("+bt(ft(0<arguments.length&&void 0!==arguments[0]?arguments[0]:1))+");\n    ")},brownie:function(){return Bt(.5997023498159715,.34553243048391263,-.2708298674538042,0,-.037703249837783157,.8609577587992641,.15059552388459913,0,.24113635128153335,-.07441037908422492,.44972182064877153,0,0,0,0,1)},clip:function(){var e=bt(ft(0<arguments.length&&void 0!==arguments[0]?arguments[0]:0));return At("\n        outColor = vec4(\n            (pixelColor.r > 1.0 - "+e+") ? 1.0 : 0.0,\n            (pixelColor.g > 1.0 - "+e+") ? 1.0 : 0.0,\n            (pixelColor.b > 1.0 - "+e+") ? 1.0 : 0.0,\n            pixelColor.a \n        );\n    ")},chaos:function(){return At("\n        vec2 st = pixelColor.st;\n        st *= "+bt(ft(0<arguments.length&&void 0!==arguments[0]?arguments[0]:10))+";\n        \n        vec2 ipos = floor(st);  // get the integer coords\n\n        vec3 color = vec3(random( ipos ));\n\n        outColor = vec4(color, pixelColor.a);\n    ")},contrast:function(){return At("\n        outColor = pixelColor * "+bt(ft(0<arguments.length&&void 0!==arguments[0]?arguments[0]:1))+";\n    ")},gamma:function(){var e=bt(ft(0<arguments.length&&void 0!==arguments[0]?arguments[0]:1));return At("\n        outColor = vec4(pow(pixelColor.r, "+e+"), pow(pixelColor.g, "+e+"), pow(pixelColor.b, "+e+"), pixelColor.a );\n    ")},gradient:function(){for(var e=[].concat(Array.prototype.slice.call(arguments)),t=(e=(e=1===e.length&&"string"==typeof e[0]?Lt.convertMatchesArray(e[0]):e).map((function(e){return e})).join(", "),Lt.parseGradient(e)),n=(t[0][1]=0,t[t.length-1][1]=1,[]),r=0,i=(t=t.map((function(e){var t=Lt.parse(e[0]);return[{r:t.r,g:t.g,b:t.b,a:t.a},e[1]]}))).length;r<i-1;r++){var o=t[r],a=t[r+1],s=vt(o[0]),u=vt(a[0]);o=bt(o[1]),a=bt(a[1]);n.push("\n            if ("+o+" <= rate && rate < "+a+") {\n                outColor = mix("+s+", "+u+", (rate - "+o+")/("+a+" - "+o+"));\n            }\n        ")}return At("\n        float rate = (pixelColor.r * 0.2126 + pixelColor.g * 0.7152 + pixelColor.b * 0.0722); \n\n        "+n.join("\n")+"        \n    ")},grayscale:function(){var e=ft(0<arguments.length&&void 0!==arguments[0]?arguments[0]:1);return Bt(.2126+.7874*(1-(e=1<e?1:e)),.7152-.7152*(1-e),.0722-.0722*(1-e),0,.2126-.2126*(1-e),.7152+.2848*(1-e),.0722-.0722*(1-e),0,.2126-.2126*(1-e),.7152-.7152*(1-e),.0722+.9278*(1-e),0,0,0,0,1)},hue:function(){return At("\n        vec3 hsv = rgb2hsv(pixelColor.rgb);\n        hsv.x += "+bt(ft(0<arguments.length&&void 0!==arguments[0]?arguments[0]:1))+";\n        outColor = vec4(hsv2rgb(hsv).rgb, pixelColor.a);\n    ")},invert:function(){var e=bt(ft(0<arguments.length&&void 0!==arguments[0]?arguments[0]:1));return At("\n        outColor = vec4(\n            (1.0 - pixelColor.r) * "+e+",\n            (1.0 - pixelColor.g) * "+e+",\n            (1.0 - pixelColor.b) * "+e+",\n            pixelColor.a\n        );\n    ")},kodachrome:function(){return Bt(1.1285582396593525,-.3967382283601348,-.03992559172921793,0,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,0,0,0,1)},matrix:Bt,noise:function(){var e=Math.abs(ft(0<arguments.length&&void 0!==arguments[0]?arguments[0]:1)),t=bt(-e);return At("\n        float rnd = "+t+" + random( pixelColor.st ) * ("+bt(e)+" - "+t+");\n\n        outColor = vec4(pixelColor.rgb + rnd, 1.0);\n    ")},opacity:function(){return At("\n        outColor = vec4(pixelColor.rgb, pixelColor.a * "+bt(ft(0<arguments.length&&void 0!==arguments[0]?arguments[0]:1))+");\n    ")},polaroid:function(){return Bt(1.438,-.062,-.062,0,-.122,1.378,-.122,0,-.016,-.016,1.483,0,0,0,0,1)},saturation:function(){var e=1-Math.abs(ft(0<arguments.length&&void 0!==arguments[0]?arguments[0]:0));return Bt(e,0,0,0,0,e,0,0,0,0,e,0,0,0,0,e)},sepia:function(){var e=ft(0<arguments.length&&void 0!==arguments[0]?arguments[0]:1);return Bt(.393+.607*(1-(e=1<e?1:e)),.769-.769*(1-e),.189-.189*(1-e),0,.349-.349*(1-e),.686+.314*(1-e),.168-.168*(1-e),0,.272-.272*(1-e),.534-.534*(1-e),.131+.869*(1-e),0,0,0,0,1)},shade:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:1,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:1;return At("\n        outColor = vec4(\n            pixelColor.r * "+bt(ft(e)/255)+",\n            pixelColor.g * "+bt(ft(t)/255)+",\n            pixelColor.b * "+bt(ft(n)/255)+",\n            pixelColor.a\n        );\n    ")},shift:function(){return Bt(1.438,-.062,-.062,0,-.122,1.378,-.122,0,-.016,-.016,1.483,0,0,0,0,1)},solarize:function(e,t,n){return At("\n        outColor = vec4(\n            (pixelColor.r < "+bt(ft(e))+") ? 1.0 - pixelColor.r: pixelColor.r,\n            (pixelColor.g < "+bt(ft(t))+") ? 1.0 - pixelColor.g: pixelColor.g,\n            (pixelColor.b < "+bt(ft(n))+") ? 1.0 - pixelColor.b: pixelColor.b,\n            pixelColor.a\n        );\n    ")},technicolor:function(){return Bt(1.9125277891456083,-.8545344976951645,-.09155508482755585,0,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-.231103377548616,-.7501899197440212,1.847597816108189,0,0,0,0,1)},threshold:function(){return It(0<arguments.length&&void 0!==arguments[0]?arguments[0]:200,1<arguments.length&&void 0!==arguments[1]?arguments[1]:100,!1)},"threshold-color":It,tint:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0;return At("\n        outColor = vec4(\n            pixelColor.r += (1 - pixelColor.r) * "+ft(e)+",\n            pixelColor.g += (1 - pixelColor.g) * "+ft(t)+",\n            pixelColor.b += (1 - pixelColor.b) * "+ft(n)+",\n            pixelColor.a\n        );\n    ")}},{kirsch:function(){return mt("kirsch-horizontal kirsch-vertical")},sobel:function(){return mt("sobel-horizontal sobel-vertical")},vintage:function(){return mt("brightness(0.15) saturation(-0.2) gamma(1.8)")}}),jt=0;function Nt(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{width:"400px",height:"300px"};v(this,Nt),this.img=e.img,this.width=parseFloat(this.img.width||e.width||"400px"),this.height=parseFloat(this.img.height||e.height||"300px"),this.init()}y(Nt,[{key:"resize",value:function(){this.canvas.width=this.width,this.canvas.height=this.height,this.canvas.style.width=this.width+"px",this.canvas.style.height=this.height+"px",this.viewport()}},{key:"clear",value:function(){var e=this.gl;e.clearColor(0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,3<arguments.length&&void 0!==arguments[3]?arguments[3]:0),e.clear(e.COLOR_BUFFER_BIT|e.DEPTH_BUFFER_BIT)}},{key:"viewport",value:function(e,t,n,r){var i=this.gl;i.viewport(e||0,t||0,n||i.canvas.width,r||i.canvas.height)}},{key:"initCanvas",value:function(e,t){if(this.canvas=document.createElement("canvas"),this.gl=this.canvas.getContext("webgl2"),!this.gl)throw new Error("you need webgl2 support");this.program=this.createProgram(e,t),this.resize(),this.initBuffer()}},{key:"draw",value:function(){var e=this.gl;e.drawArrays(e[0<arguments.length&&void 0!==arguments[0]?arguments[0]:"TRIANGLES"],1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,2<arguments.length&&void 0!==arguments[2]?arguments[2]:6)}},{key:"triangles",value:function(){this.draw("TRIANGLES",0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,1<arguments.length&&void 0!==arguments[1]?arguments[1]:6)}},{key:"uniform2f",value:function(){for(var e,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n.shift();(e=this.gl).uniform2f.apply(e,[this.locations[i]].concat(n))}},{key:"uniform1f",value:function(){for(var e,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n.shift();(e=this.gl).uniform1f.apply(e,[this.locations[i]].concat(n))}},{key:"uniform1fv",value:function(){for(var e,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n.shift();(e=this.gl).uniform1fv.apply(e,[this.locations[i]].concat(n))}},{key:"uniform1i",value:function(){for(var e,t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n.shift();(e=this.gl).uniform1i.apply(e,[this.locations[i]].concat(n))}},{key:"useProgram",value:function(){this.gl.useProgram(this.program)}},{key:"bindBuffer",value:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"STATIC_DRAW",r=this.gl;this.buffers[e]||(this.buffers[e]=r.createBuffer()),r.bindBuffer(r.ARRAY_BUFFER,this.buffers[e]),t&&r.bufferData(r.ARRAY_BUFFER,new Float32Array(t),r[n])}},{key:"enable",value:function(e){this.gl.enableVertexAttribArray(this.locations[e])}},{key:"location",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"attribute";"attribute"===t?this.locations[e]=this.gl.getAttribLocation(this.program,e):"uniform"===t&&(this.locations[e]=this.gl.getUniformLocation(this.program,e))}},{key:"a",value:function(e){return this.location(e)}},{key:"u",value:function(e){return this.location(e,"uniform")}},{key:"pointer",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"FLOAT",n=this.gl;n.vertexAttribPointer(this.locations[e],2<arguments.length&&void 0!==arguments[2]?arguments[2]:2,n[t],3<arguments.length&&void 0!==arguments[3]&&arguments[3],4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,5<arguments.length&&void 0!==arguments[5]?arguments[5]:0)}},{key:"bufferData",value:function(){var e=this.gl;e.bufferData(e.ARRAY_BUFFER,new Float32Array(0<arguments.length&&void 0!==arguments[0]?arguments[0]:[]),e.STATIC_DRAW)}},{key:"isPowerOf2",value:function(e){return 0==(e&e-1)}},{key:"bindTexture",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:void 0,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:"RGBA",i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:"RGBA",o=5<arguments.length&&void 0!==arguments[5]?arguments[5]:"UNSIGNED_BYTE",a=this.gl;1==arguments.length?a.bindTexture(a.TEXTURE_2D,this.textures[e]):(this.textures[e]||(this.textures[e]=a.createTexture()),this.textureIndex[e]=jt++,a.bindTexture(a.TEXTURE_2D,this.textures[e]),this.setTextureParameter(),a.texImage2D(a.TEXTURE_2D,n,a[r],a[i],a[o],t.newImage||t))}},{key:"bindColorTexture",value:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:256,r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:1,i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,o=5<arguments.length&&void 0!==arguments[5]?arguments[5]:"RGBA",a=6<arguments.length&&void 0!==arguments[6]?arguments[6]:"RGBA",s=7<arguments.length&&void 0!==arguments[7]?arguments[7]:"UNSIGNED_BYTE",u=this.gl;this.textures[e]||(this.textures[e]=u.createTexture()),this.textureIndex[e]=jt++,u.bindTexture(u.TEXTURE_2D,this.textures[e]),this.setTextureParameter(),u.texImage2D(u.TEXTURE_2D,i,u[o],n,r,0,u[a],u[s],new Uint8Array(t))}},{key:"bindEmptyTexture",value:function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0,i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:"RGBA",o=5<arguments.length&&void 0!==arguments[5]?arguments[5]:"RGBA",a=6<arguments.length&&void 0!==arguments[6]?arguments[6]:"UNSIGNED_BYTE",s=this.gl;this.textures[e]||(this.textures[e]=s.createTexture()),this.textureIndex[e]=jt++,s.bindTexture(s.TEXTURE_2D,this.textures[e]),this.setTextureParameter(),s.texImage2D(s.TEXTURE_2D,r,s[i],t,n,0,s[o],s[a],null)}},{key:"setTextureParameter",value:function(){var e=this.gl;e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST)}},{key:"bindFrameBufferWithTexture",value:function(e,t,n,r){this.bindEmptyTexture(t,n,r),this.bindFrameBuffer(e,t)}},{key:"enumToString",value:function(e){var t,n=this.gl;if(0===e)return"NONE";for(t in n)if(n[t]===e)return t;return"0x"+e.toString(16)}},{key:"bindFrameBuffer",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null,n=this.gl;1===arguments.length?n.bindFramebuffer(n.FRAMEBUFFER,null==e?null:this.framebuffers[e]):(this.framebuffers[e]||(this.framebuffers[e]=n.createFramebuffer()),n.bindFramebuffer(n.FRAMEBUFFER,this.framebuffers[e]),e=n.COLOR_ATTACHMENT0,n.framebufferTexture2D(n.FRAMEBUFFER,e,n.TEXTURE_2D,this.textures[t],0),n.checkFramebufferStatus(n.FRAMEBUFFER),n.FRAMEBUFFER_COMPLETE)}},{key:"bindVA",value:function(){var e=this.gl;this.vao||(this.vao=e.createVertexArray()),e.bindVertexArray(this.vao)}},{key:"bindAttr",value:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"STATIC_DRAW",r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:2;this.bindBuffer(e,t,n),this.enable(e),this.pointer(e,"FLOAT",r)}},{key:"initBuffer",value:function(){var e=(t=this.canvas).width,t=t.height;this.a("a_position"),this.a("a_texCoord"),this.u("u_resolution"),this.u("u_image"),this.u("u_flipY"),this.u("u_kernelSelect"),this.u("u_filterIndex"),this.u("u_kernel9[0]"),this.u("u_kernel9Weight"),this.u("u_kernel25[0]"),this.u("u_kernel25Weight"),this.u("u_kernel49[0]"),this.u("u_kernel49Weight"),this.u("u_kernel81[0]"),this.u("u_kernel81Weight"),this.bindVA(),this.bindAttr("a_position",[0,0,e,0,0,t,0,t,e,0,e,t],"STATIC_DRAW",2),this.bindAttr("a_texCoord",[0,0,1,0,0,1,0,1,1,0,1,1],"STATIC_DRAW",2),this.bindTexture("u_image",this.img),this.bindFrameBufferWithTexture("frame_buffer_0","img_texture_0",e,t),this.bindFrameBufferWithTexture("frame_buffer_1","img_texture_1",e,t)}},{key:"activeTexture",value:function(){var e=this.gl;e.activeTexture(e.TEXTURE0+(0<arguments.length&&void 0!==arguments[0]?arguments[0]:0))}},{key:"drawFilter",value:function(){var e=this,t=this.gl,n=(t=(this.resize(),this.clear(),this.useProgram(),this.bindVA(),this.activeTexture(0),this.bindTexture("u_image"),this.uniform1i("u_image",0),this.uniform1f("u_flipY",1),t.canvas)).width,r=t.height;this.eachFilter((function(t,i){e.bindFrameBuffer("frame_buffer_"+i%2),e.uniform2f("u_resolution",n,r),e.viewport(0,0,n,r),e.effectFilter(t),e.bindTexture("img_texture_"+i%2)})),this.uniform1f("u_flipY",-1),this.bindFrameBuffer(null),this.uniform2f("u_resolution",n,r),this.viewport(0,0,n,r),this.clear(),this.effectFilter("normal")}},{key:"effectFilter",value:function(e){"convolution"==(e="string"==typeof e?(Mt[e]||Mt.normal).call(Mt):e).type?(this.uniform1f("u_kernelSelect",e.length),this.uniform1f("u_filterIndex",-1),this.uniform1fv("u_kernel"+e.length+"[0]",e.content),this.uniform1f("u_kernel"+e.length+"Weight",this.computeKernelWeight(e.content))):(this.uniform1f("u_kernelSelect",-1),this.uniform1f("u_filterIndex",e.index)),this.triangles(0,6)}},{key:"computeKernelWeight",value:function(e){return(e=e.reduce((function(e,t){return e+t})))<=0?1:e}},{key:"createProgram",value:function(e,t){var n=this.gl,r=n.createProgram();if(this.vertexShader=this.createVertexShader(e),this.fragmentShader=this.createFragmentShader(t),n.attachShader(r,this.vertexShader),n.attachShader(r,this.fragmentShader),n.linkProgram(r),n.getProgramParameter(r,n.LINK_STATUS))return r;n.deleteProgram(r)}},{key:"createShader",value:function(e,t){var n=this.gl;e=n.createShader(e);if(n.shaderSource(e,t),n.compileShader(e),n.getShaderParameter(e,n.COMPILE_STATUS))return e;n.deleteShader(e)}},{key:"createVertexShader",value:function(e){var t=this.gl;return this.createShader(t.VERTEX_SHADER,e)}},{key:"createFragmentShader",value:function(e){var t=this.gl;return this.createShader(t.FRAGMENT_SHADER,e)}},{key:"eachFilter",value:function(e){this.filterList.forEach(e)}},{key:"init",value:function(){this.locations={},this.buffers={},this.framebuffers={},this.textures={},this.textureIndex={},this.hasTexParameter={}}},{key:"destroy",value:function(){var e=this.gl;this.init(),e.deleteProgram(this.program)}},{key:"filter",value:function(e,t){var n,r;this.filterList=e,this.initCanvas("#version 300 es \n\n        in vec2 a_position;\n        in vec2 a_texCoord; \n\n        uniform vec2 u_resolution;\n        uniform float u_flipY;\n\n        out vec2 v_texCoord; \n\n        void main() {\n            vec2 zeroToOne = a_position / u_resolution;\n\n            vec2 zeroToTwo = zeroToOne * 2.0;\n\n            vec2 clipSpace = zeroToTwo - 1.0;\n\n            gl_Position = vec4(clipSpace * vec2(1, u_flipY), 0, 1);\n\n            v_texCoord = a_texCoord;\n\n        }\n    ",(n=(e=this.filterList).filter((function(e){return"shader"==e.type})).map((function(e){return e.content})).join("\n\n"),r={9:!0},e.filter((function(e){return"convolution"==e.type})).forEach((function(e){r[e.length]=!0})),"#version 300 es\n\n    precision highp int;\n    precision mediump float;\n    \n    uniform sampler2D u_image;\n\n    // 3 is 3x3 matrix kernel \n    uniform float u_kernelSelect;\n    uniform float u_filterIndex;\n\n    uniform float u_kernel9[9];\n    uniform float u_kernel9Weight;\n    uniform float u_kernel25[25];\n    uniform float u_kernel25Weight;\n    uniform float u_kernel49[49];\n    uniform float u_kernel49Weight;\n    uniform float u_kernel81[81];\n    uniform float u_kernel81Weight;    \n\n    in vec2 v_texCoord;\n    \n    out vec4 outColor;\n\n    float random (vec2 st) {\n        return fract(sin(dot(st.xy, vec2(12.9898,78.233)))* 43758.5453123);\n    } \n\n    // \n    vec3 rgb2hsv(vec3 c)\n    {\n        vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);\n        vec4 p = c.g < c.b ? vec4(c.bg, K.wz) : vec4(c.gb, K.xy);\n        vec4 q = c.r < p.x ? vec4(p.xyw, c.r) : vec4(c.r, p.yzx);\n\n        float d = q.x - min(q.w, q.y);\n        float e = 1.0e-10;\n        return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + e)), d / (q.x + e), q.x);\n    }\n\n    vec3 hsv2rgb(vec3 c)\n    {\n        vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);\n        vec3 p = abs(fract(c.xxx + K.xyz) * 6.0 - K.www);\n        return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);\n    }\n    \n    void main() {\n        vec4 pixelColor = texture(u_image, v_texCoord);\n        vec2 onePixel = vec2(1) / vec2(textureSize(u_image, 0));                \n\n        "+n+"\n\n        "+Object.keys(r).map((function(e){return function(e){return"\n    \n    if (u_kernelSelect == "+e+".0) {\n        vec4 colorSum = "+(t=e,n=Math.sqrt(t),r=Math.floor(n/2),[].concat(O(Array(t))).map((function(e,i){var o=Math.floor(i/n)-r;return"texture(u_image, v_texCoord + onePixel * vec2("+(i%n-r)+", "+o+")) * u_kernel"+t+"["+i+"]"})).join(" + \n")+"; \n\n        outColor = vec4((colorSum / u_kernel")+e+"Weight).rgb, 1);\n        \n    }\n    ";var t,n,r}(+e)})).join("\n")+"\n\n    }")),this.drawFilter(),"function"==typeof t&&t(this)}}]);var Ft={GLCanvas:Nt};var Rt=S({},Ft,{filter:function(e,t,n,r){var i=new Ft.GLCanvas({width:r.width||e.width,height:r.height||e.height,img:e});i.filter(function e(t){var n=[];"string"==typeof t?n=it(t):Array.isArray(t)&&(n=t);var r=[];return n.forEach((function(t){var n=t.arr[0];Mt[n]&&("convolution"==(n=function(e){var t=e.arr[0];return t=Mt[t],(e=e.arr).shift(),t.apply(this,e)}(t)).type||"shader"==n.type?r.push(n):n.forEach((function(t){r=r.concat(e(t))})))})),r}(t),(function(){"function"==typeof n&&n(i)}))}});function Pt(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{frameTimer:"full"},i=new de(e);i.loadImage((function(){i.toArray(t,(function(e){"function"==typeof n&&n(e)}),r)}))}for(var Lt=S({},a,d,ae,R,ee,V,q,Z,b,X,{palette:function(t){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:6,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"hex";return(t=t.length>n?he(t,n):t).map((function(t){return e(t,r)}))},ImageToCanvas:function(e,t,n){Pt(e,t,n,Object.assign({returnTo:"canvas"},3<arguments.length&&void 0!==arguments[3]?arguments[3]:{frameTimer:"full"}))},ImageToHistogram:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{width:200,height:100},r=new de(e);r.loadImage((function(){fe.createHistogram(n.width||200,n.height||100,r.toHistogram(n),(function(e){"function"==typeof t&&t(e.toDataURL("image/png"))}),n)}))},ImageToRGB:function(e){var t,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},r=arguments[2];r?(t=new de(e,n)).loadImage((function(){"function"==typeof r&&r(t.toRGB())})):(t=new de(e)).loadImage((function(){"function"==typeof n&&n(t.toRGB())}))},ImageToURL:Pt,GLToCanvas:function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{},i=new de(e);i.load((function(){Rt.filter(i.newImage,t,(function(e){"function"==typeof n&&n(e)}),r)}))},histogram:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},r=new de(e);r.loadImage((function(){"function"==typeof t&&t(r.toHistogram(n))}))},histogramToPoints:function(e){for(var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:.2,n=[],r=0;r<e.length;r++){var i,o,a,s=e[r];0==r||r==e.length-1?n[r]=[]:(a=e[r-1],(o=e[r+1])[1],a[1],o[0],a[0],i=[a[0]+(o[0]-a[0])*t,a[1]+(o[1]-a[1])*t],i=[[].concat(O(a)),[].concat(i)],a=Math.sqrt(Math.pow(s[0]-a[0],2)+Math.pow(s[1]-a[1],2))/Math.sqrt(Math.pow(o[0]-s[0],2)+Math.pow(o[1]-s[1],2)),o=i[0][0]+(i[1][0]-i[0][0])*a,a=i[0][1]+(i[1][1]-i[0][1])*a,i[0][0]+=s[0]-o,i[0][1]+=s[1]-a,i[1][0]+=s[0]-o,i[1][1]+=s[1]-a,n[r]=i)}return n}}),Ut=[{rgb:"#ff0000",start:0},{rgb:"#ffff00",start:.17},{rgb:"#00ff00",start:.33},{rgb:"#00ffff",start:.5},{rgb:"#0000ff",start:.67},{rgb:"#ff00ff",start:.83},{rgb:"#ff0000",start:1}],zt=0,Ht=Ut.length;zt<Ht;zt++){var $t=Ut[zt],Qt=Lt.parse($t.rgb);$t.r=Qt.r,$t.g=Qt.g,$t.b=Qt.b}var Vt={colors:Ut,checkHueColor:function(e){for(var t,n,r=0;r<Ut.length;r++)if(Ut[r].start>=e){t=Ut[r-1],n=Ut[r];break}return t&&n?Lt.interpolateRGB(t,n,(e-t.start)/(n.start-t.start)):Ut[0].rgb}},qt=(a=S({},Fe,Ne),d={Color:Lt,HueColor:Vt,ColorNames:m,ImageFilter:a,GL:Rt,Canvas:fe,ImageLoader:de},Lt.color,0),Gt=[],Wt=(y(Kt,[{key:"attr",value:function(e,t){return 1==arguments.length?this.el.getAttribute(e):(this.el.setAttribute(e,t),this)}},{key:"closest",value:function(e){for(var t=this,n=!1;!(n=t.hasClass(e));){if(!t.el.parentNode)return null;t=new Kt(t.el.parentNode)}return n?t:null}},{key:"checked",value:function(){return this.el.checked}},{key:"removeClass",value:function(e){return this.el.className=(" "+this.el.className+" ").replace(" "+e+" "," ").trim(),this}},{key:"hasClass",value:function(e){return!!this.el.className&&-1<(" "+this.el.className+" ").indexOf(" "+e+" ")}},{key:"addClass",value:function(e){return this.hasClass(e)||(this.el.className=this.el.className+" "+e),this}},{key:"toggleClass",value:function(e){this.hasClass(e)?this.removeClass(e):this.addClass(e)}},{key:"html",value:function(e){try{"string"==typeof e?this.el.innerHTML=e:this.empty().append(e)}catch(e){}return this}},{key:"find",value:function(e){return this.el.querySelector(e)}},{key:"$",value:function(e){return new Kt(this.find(e))}},{key:"findAll",value:function(e){return this.el.querySelectorAll(e)}},{key:"$$",value:function(e){return[].concat(O(this.findAll(e))).map((function(e){return new Kt(e)}))}},{key:"empty",value:function(){return this.html("")}},{key:"append",value:function(e){return"string"==typeof e?this.el.appendChild(document.createTextNode(e)):this.el.appendChild(e.el||e),this}},{key:"appendTo",value:function(e){return(e.el||e).appendChild(this.el),this}},{key:"remove",value:function(){return this.el.parentNode&&this.el.parentNode.removeChild(this.el),this}},{key:"text",value:function(){return this.el.textContent}},{key:"css",value:function(e,t){var n=this;if(2==arguments.length)this.el.style[e]=t;else if(1==arguments.length){if("string"==typeof e)return getComputedStyle(this.el)[e];var r=e||{};Object.keys(r).forEach((function(e){n.el.style[e]=r[e]}))}return this}},{key:"cssFloat",value:function(e){return parseFloat(this.css(e))}},{key:"cssInt",value:function(e){return parseInt(this.css(e))}},{key:"offset",value:function(){var e=this.el.getBoundingClientRect();return{top:e.top+Kt.getScrollTop(),left:e.left+Kt.getScrollLeft()}}},{key:"rect",value:function(){return this.el.getBoundingClientRect()}},{key:"position",value:function(){return this.el.style.top?{top:parseFloat(this.css("top")),left:parseFloat(this.css("left"))}:this.el.getBoundingClientRect()}},{key:"size",value:function(){return[this.width(),this.height()]}},{key:"width",value:function(){return this.el.offsetWidth||this.el.getBoundingClientRect().width}},{key:"contentWidth",value:function(){return this.width()-this.cssFloat("padding-left")-this.cssFloat("padding-right")}},{key:"height",value:function(){return this.el.offsetHeight||this.el.getBoundingClientRect().height}},{key:"contentHeight",value:function(){return this.height()-this.cssFloat("padding-top")-this.cssFloat("padding-bottom")}},{key:"dataKey",value:function(e){return this.uniqId+"."+e}},{key:"data",value:function(e,t){var n,r;return 2!=arguments.length?1==arguments.length?Gt[this.dataKey(e)]:(n=Object.keys(Gt),r=this.uniqId+".",n.filter((function(e){return 0==e.indexOf(r)})).map((function(e){return Gt[e]}))):(Gt[this.dataKey(e)]=t,this)}},{key:"val",value:function(e){return 0==arguments.length?this.el.value:(1==arguments.length&&(this.el.value=e),this)}},{key:"int",value:function(){return parseInt(this.val(),10)}},{key:"float",value:function(){return parseFloat(this.val())}},{key:"show",value:function(){return this.css("display","block")}},{key:"hide",value:function(){return this.css("display","none")}},{key:"toggle",value:function(){return"none"==this.css("display")?this.show():this.hide()}},{key:"scrollTop",value:function(){return this.el===document.body?Kt.getScrollTop():this.el.scrollTop}},{key:"scrollLeft",value:function(){return this.el===document.body?Kt.getScrollLeft():this.el.scrollLeft}},{key:"on",value:function(e,t,n,r){return this.el.addEventListener(e,t,n,r),this}},{key:"off",value:function(e,t){return this.el.removeEventListener(e,t),this}},{key:"getElement",value:function(){return this.el}},{key:"createChild",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"",n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{};return(e=new Kt(e,t,n)).css(r),this.append(e),e}},{key:"firstChild",value:function(){return new Kt(this.el.firstElementChild)}},{key:"replace",value:function(e,t){return this.el.replaceChild(t,e),this}}],[{key:"getScrollTop",value:function(){return Math.max(window.pageYOffset,document.documentElement.scrollTop,document.body.scrollTop)}},{key:"getScrollLeft",value:function(){return Math.max(window.pageXOffset,document.documentElement.scrollLeft,document.body.scrollLeft)}}]),Kt);function Kt(e,t,n){if(v(this,Kt),"string"!=typeof e)this.el=e;else{var r,i=document.createElement(e);for(r in this.uniqId=qt++,t&&(i.className=t),n=n||{})i.setAttribute(r,n[r]);this.el=i}}function Yt(e){v(this,Yt),this.$store=e,this.initialize()}y(Yt,[{key:"initialize",value:function(){var e=this;this.filterProps().forEach((function(t){e.$store.action(t,e)}))}},{key:"filterProps",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"/";return Object.getOwnPropertyNames(this.__proto__).filter((function(t){return t.startsWith(e)}))}}]),k(Jt,ae=Yt),y(Jt,[{key:"initialize",value:function(){C(Jt.prototype.__proto__||Object.getPrototypeOf(Jt.prototype),"initialize",this).call(this),this.$store.colorSetsList=[{name:"Material",colors:["#F44336","#E91E63","#9C27B0","#673AB7","#3F51B5","#2196F3","#03A9F4","#00BCD4","#009688","#4CAF50","#8BC34A","#CDDC39","#FFEB3B","#FFC107","#FF9800","#FF5722","#795548","#9E9E9E","#607D8B"]},{name:"Custom",edit:!0,colors:[]},{name:"Color Scale",scale:["red","yellow","black"],count:5}],this.$store.currentColorSets={}}},{key:"/list",value:function(e){return Array.isArray(e.userList)&&e.userList.length?e.userList:e.colorSetsList}},{key:"/setUserPalette",value:function(e,t){e.userList=t,e.dispatch("/resetUserPalette"),e.dispatch("/setCurrentColorSets")}},{key:"/resetUserPalette",value:function(e){e.userList&&e.userList.length&&(e.userList=e.userList.map((function(t,n){var r;return"function"==typeof t.colors&&(r=t.colors,t.colors=r(e),t._colors=r),Object.assign({name:"color-"+n,colors:[]},t)})),e.emit("changeUserList"))}},{key:"/setCurrentColorSets",value:function(e,t){var n=e.dispatch("/list");e.currentColorSets=void 0===t?n[0]:"number"==typeof t?n[t]:n.filter((function(e){return e.name==t}))[0],e.emit("changeCurrentColorSets")}},{key:"/getCurrentColorSets",value:function(e){return e.currentColorSets}},{key:"/addCurrentColor",value:function(e,t){Array.isArray(e.currentColorSets.colors)&&(e.currentColorSets.colors.push(t),e.emit("changeCurrentColorSets"))}},{key:"/setCurrentColorAll",value:function(e){e.currentColorSets.colors=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],e.emit("changeCurrentColorSets")}},{key:"/removeCurrentColor",value:function(e,t){e.currentColorSets.colors[t]&&(e.currentColorSets.colors.splice(t,1),e.emit("changeCurrentColorSets"))}},{key:"/removeCurrentColorToTheRight",value:function(e,t){e.currentColorSets.colors[t]&&(e.currentColorSets.colors.splice(t,Number.MAX_VALUE),e.emit("changeCurrentColorSets"))}},{key:"/clearPalette",value:function(e){e.currentColorSets.colors&&(e.currentColorSets.colors=[],e.emit("changeCurrentColorSets"))}},{key:"/getCurrentColors",value:function(e){return e.dispatch("/getColors",e.currentColorSets)}},{key:"/getColors",value:function(e,t){return t.scale?Lt.scale(t.scale,t.count):t.colors||[]}},{key:"/getColorSetsList",value:function(e){return e.dispatch("/list").map((function(t){return{name:t.name,edit:t.edit,colors:e.dispatch("/getColors",t)}}))}}]);var Xt=Jt;function Jt(){return v(this,Jt),E(this,(Jt.__proto__||Object.getPrototypeOf(Jt)).apply(this,arguments))}var Zt={addEvent:function(e,t,n,r){e&&e.addEventListener(t,n,r)},removeEvent:function(e,t,n){e&&e.removeEventListener(t,n)},pos:function(e){return e.touches&&e.touches[0]?e.touches[0]:e},posXY:function(e){return{x:(e=this.pos(e)).pageX,y:e.pageY}}},en=(y(tn,[{key:"set",value:function(e,t){this.settingObj[e]=t||(2<arguments.length&&void 0!==arguments[2]?arguments[2]:void 0)}},{key:"init",value:function(e){if(!this.has(e)){var t=e.split("."),n=this.masterObj.refs[t[0]]||this.masterObj[t[0]]||this.masterObj;if(n[t=t.pop()]){for(var r=arguments.length,i=Array(1<r?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];t=n[t].apply(n,i),this.set(e,t)}}}},{key:"get",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"";return this.init(e,t),this.settingObj[e]||t}},{key:"has",value:function(e){return!!this.settingObj[e]}}]),tn);function tn(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};v(this,tn),this.masterObj=e,this.settingObj=t}var nn=/^(click|mouse(down|up|move|enter|leave)|touch(start|move|end)|key(down|up|press)|contextmenu|change|input)/gi,rn=/^load (.*)/gi,on=["Control","Shift","Alt","Meta"];y(an,[{key:"newChildComponents",value:function(){var e=this;Object.keys(this.childComponents).forEach((function(t){var n=e.childComponents[t];e[t]=new n(e)}))}},{key:"render",value:function(){this.$el=this.parseTemplate(this.template()),this.refs.$el=this.$el,this.parseTarget(),this.load(),this.afterRender()}},{key:"afterRender",value:function(){}},{key:"components",value:function(){return{}}},{key:"parseTemplate",value:function(e){var t=this,n=(e=new Wt("div").html(e).firstChild()).findAll("[ref]");return[].concat(O(n)).forEach((function(e){var n=e.getAttribute("ref");t.refs[n]=new Wt(e)})),e}},{key:"parseTarget",value:function(){var e=this,t=this.$el.findAll("[target]");[].concat(O(t)).forEach((function(t){var n=t.getAttribute("target"),r=t.getAttribute("ref")||n;n=new e.childComponents[n](e);e[r]=n,e.refs[r]=n.$el,n&&(n.render(),new Wt(t.parentNode).replace(t,n.$el.el))}))}},{key:"load",value:function(){var e=this;this.filterProps(rn).forEach((function(t){var n=t.split("load ")[1];e.refs[n]&&e.refs[n].html(e.parseTemplate(e[t].call(e)))}))}},{key:"template",value:function(){return"<div></div>"}},{key:"initialize",value:function(){}},{key:"initializeEvent",value:function(){var e=this;this.initializeEventMachin(),Object.keys(this.childComponents).forEach((function(t){e[t]&&e[t].initializeEvent()}))}},{key:"destroy",value:function(){var e=this;this.destroyEventMachin(),Object.keys(this.childComponents).forEach((function(t){e[t]&&e[t].destroy()}))}},{key:"destroyEventMachin",value:function(){this.removeEventAll()}},{key:"initializeEventMachin",value:function(){this.filterProps(nn).forEach(this.parseEvent.bind(this))}},{key:"collectProps",value:function(){if(!this.collapsedProps){for(var e=this.__proto__,t=[];t.push.apply(t,O(Object.getOwnPropertyNames(e))),e=e.__proto__;);this.collapsedProps=t}return this.collapsedProps}},{key:"filterProps",value:function(e){return this.collectProps().filter((function(t){return t.match(e)}))}},{key:"parseEvent",value:function(e){var t=e.split(" ");this.bindingEvent(t,this[e].bind(this))}},{key:"getDefaultDomElement",value:function(e){var t=void 0;return(t=e?this.refs[e]||this[e]||window[e]:this.el||this.$el||this.$root)instanceof Wt?t.getElement():t}},{key:"getDefaultEventObject",value:function(e){var t=this,n=(e=e.split(".")).shift(),r=e.includes("Control"),i=e.includes("Shift"),o=e.includes("Alt"),a=e.includes("Meta"),s=(e=e.filter((function(e){return!1===on.includes(e)}))).filter((function(e){return!!t[e]}));return{eventName:n,isControl:r,isShift:i,isAlt:o,isMeta:a,codes:e=e.filter((function(e){return!1===s.includes(e)})).map((function(e){return e.toLowerCase()})),checkMethodList:s}}},{key:"bindingEvent",value:function(e,t){e=e;var n=(e=Array.isArray(e)?e:Array.from(e))[0],r=e[1];e=e.slice(2),r=this.getDefaultDomElement(r);(n=this.getDefaultEventObject(n)).dom=r,n.delegate=e.join(" "),this.addEvent(n,t)}},{key:"matchPath",value:function(e,t){return e?e.matches(t)?e:this.matchPath(e.parentElement,t):null}},{key:"getBindings",value:function(){return this._bindings||this.initBindings(),this._bindings}},{key:"addBinding",value:function(e){this.getBindings().push(e)}},{key:"initBindings",value:function(){this._bindings=[]}},{key:"checkEventType",value:function(e,t){var n=this,r=!t.isControl||e.ctrlKey,i=!t.isShift||e.shiftKey,o=!t.isAlt||e.altKey,a=!t.isMeta||e.metaKey,s=!0,u=(t.codes.length&&(s=t.codes.includes(e.code.toLowerCase())||t.codes.includes(e.key.toLowerCase())),!0);return t.checkMethodList.length&&(u=t.checkMethodList.every((function(t){return n[t].call(n,e)}))),r&&o&&i&&a&&s&&u}},{key:"makeCallback",value:function(e,t){var n=this;return e.delegate?function(r){if(r.xy=Zt.posXY(r),n.checkEventType(r,e)){var i=n.matchPath(r.target||r.srcElement,e.delegate);if(i)return r.delegateTarget=i,r.$delegateTarget=new Wt(i),t(r)}}:function(r){if(r.xy=Zt.posXY(r),n.checkEventType(r,e))return t(r)}}},{key:"addEvent",value:function(e,t){e.callback=this.makeCallback(e,t),this.addBinding(e),t=!0,"touchstart"===e.eventName&&(t={passive:!0}),Zt.addEvent(e.dom,e.eventName,e.callback,t)}},{key:"removeEventAll",value:function(){var e=this;this.getBindings().forEach((function(t){e.removeEvent(t)})),this.initBindings()}},{key:"removeEvent",value:function(e){var t=e.eventName,n=e.dom;e=e.callback;Zt.removeEvent(n,t,e)}}]),R=an;function an(){v(this,an),this.state=new en(this),this.refs={},this.childComponents=this.components()}var sn=/^@/;k(un,R),y(un,[{key:"initializeStoreEvent",value:function(){var e=this;this.storeEvents={},this.filterProps(sn).forEach((function(t){var n=((n=t.split("@")).shift(),n.join("@"));e.storeEvents[n]=e[t].bind(e),e.$store.on(n,e.storeEvents[n])}))}},{key:"destoryStoreEvent",value:function(){var e=this;Object.keys(this.storeEvents).forEach((function(t){e.$store.off(t,e.storeEvents[t])}))}}]),ee=un;function un(e){v(this,un);var t=E(this,(un.__proto__||Object.getPrototypeOf(un)).call(this,e));return t.opt=e||{},e&&e.$store&&(t.$store=e.$store),t.initialize(),t.initializeStoreEvent(),t}k(ln,ae),y(ln,[{key:"initialize",value:function(){C(ln.prototype.__proto__||Object.getPrototypeOf(ln.prototype),"initialize",this).call(this),this.$store.rgb={},this.$store.hsl={},this.$store.hsv={},this.$store.alpha=1,this.$store.format="hex"}},{key:"/changeFormat",value:function(e,t){e.format=t,e.emit("changeFormat")}},{key:"/initColor",value:function(e,t,n){e.dispatch("/changeColor",t,n,!0),e.emit("initColor")}},{key:"/changeColor",value:function(e,t,n,r){(t="string"==typeof(t=t||"#FF0000")?Lt.parse(t):t).source=t.source||n,e.alpha=void 0===(n=t.a)||null==n?e.alpha:t.a,e.format="hsv"!=t.type&&t.type||e.format,"hsl"==t.type?(e.hsl=Object.assign(e.hsl,t),e.rgb=Lt.HSLtoRGB(e.hsl),e.hsv=Lt.HSLtoHSV(t)):"hex"==t.type||"rgb"==t.type?(e.rgb=Object.assign(e.rgb,t),e.hsl=Lt.RGBtoHSL(e.rgb),e.hsv=Lt.RGBtoHSV(t)):"hsv"==t.type&&(e.hsv=Object.assign(e.hsv,t),e.rgb=Lt.HSVtoRGB(e.hsv),e.hsl=Lt.HSVtoHSL(e.hsv)),r||e.emit("changeColor",t.source)}},{key:"/getHueColor",value:function(e){return Vt.checkHueColor(e.hsv.h/360)}},{key:"/toString",value:function(e,t){var n=e[t=t||e.format]||e.rgb;return Lt.format(S({},n,{a:e.alpha}),t)}},{key:"/toColor",value:function(e,t){return"rgb"==(t=t||e.format)?e.dispatch("/toRGB"):"hsl"==t?e.dispatch("/toHSL"):"hex"==t?e.dispatch("/toHEX"):e.dispatch("/toString",t)}},{key:"/toRGB",value:function(e){return e.dispatch("/toString","rgb")}},{key:"/toHSL",value:function(e){return e.dispatch("/toString","hsl")}},{key:"/toHEX",value:function(e){return e.dispatch("/toString","hex").toUpperCase()}}]);var cn=ln;function ln(){return v(this,ln),E(this,(ln.__proto__||Object.getPrototypeOf(ln)).apply(this,arguments))}y(fn,[{key:"initialize",value:function(){this.initializeModule()}},{key:"initializeModule",value:function(){var e=this;this.modules.forEach((function(t){new t(e)}))}},{key:"action",value:function(e,t){this.actions[e]={context:t,callback:t[e]}}},{key:"dispatch",value:function(e){var t=[].concat(Array.prototype.slice.call(arguments));e=t.shift();if(e=this.actions[e])return e.callback.apply(e.context,[this].concat(O(t)))}},{key:"module",value:function(e){}},{key:"on",value:function(e,t){this.callbacks.push({event:e,callback:t})}},{key:"off",value:function(e,t){0==arguments.length?this.callbacks=[]:1==arguments.length?this.callbacks=this.callbacks.filter((function(t){return t.event!=e})):2==arguments.length&&(this.callbacks=this.callbacks.filter((function(n){return n.event!=e&&n.callback!=t})))}},{key:"emit",value:function(){var e=[].concat(Array.prototype.slice.call(arguments)),t=e.shift();this.callbacks.filter((function(e){return e.event==t})).forEach((function(t){t&&"function"==typeof t.callback&&t.callback.apply(t,O(e))}))}}]);var hn=fn;function fn(e){v(this,fn),this.callbacks=[],this.actions=[],this.modules=e.modules||[],this.initialize()}function dn(e){return v(this,dn),(e=E(this,(dn.__proto__||Object.getPrototypeOf(dn)).call(this,e))).isColorPickerShow=!1,e.isShortCut=!1,e.hideDelay=+(void 0===e.opt.hideDeplay?2e3:e.opt.hideDelay),e.timerCloseColorPicker,e.autoHide=e.opt.autoHide||!0,e.outputFormat=e.opt.outputFormat,e.$checkColorPickerClass=e.checkColorPickerClass.bind(e),e}function pn(e){return v(this,pn),(e=E(this,(pn.__proto__||Object.getPrototypeOf(pn)).call(this,e))).source="base-box",e}function mn(e){return v(this,mn),(e=E(this,(mn.__proto__||Object.getPrototypeOf(mn)).call(this,e))).minValue=0,e.maxValue=1,e.source="base-slider",e}k(dn,ee),y(dn,[{key:"initialize",value:function(){var e=this;this.$body=null,this.$root=null,this.$store=new hn({modules:[cn,Xt]}),this.callbackChange=function(){e.callbackColorValue()},this.callbackLastUpdate=function(){e.callbackLastUpdateColorValue()},this.callbackConfirm=function(){e.callbackConfirmValue()},this.callbackCancel=function(){e.callbackCancelValue()},this.colorpickerShowCallback=function(){},this.colorpickerHideCallback=function(){},this.colorpickerLastUpdateCallback=function(){},this.colorpickerConfirm=function(){},this.colorpickerCancel=function(){},this.$body=new Wt(this.getContainer()),this.$root=new Wt("div","codemirror-colorpicker"),"inline"==this.opt.position&&this.$body.append(this.$root),this.opt.type&&this.$root.addClass(this.opt.type),this.opt.hideInformation&&this.$root.addClass("hide-information"),this.opt.hideColorsets&&this.$root.addClass("hide-colorsets"),this.$arrow=new Wt("div","arrow"),this.$root.append(this.$arrow),this.$store.dispatch("/setUserPalette",this.opt.colorSets),this.render(),this.$root.append(this.$el),this.initColorWithoutChangeEvent(this.opt.color),this.initializeEvent()}},{key:"initColorWithoutChangeEvent",value:function(e){this.$store.dispatch("/initColor",e)}},{key:"show",value:function(e,t,n,r,i){this.colorpickerShowCallback=n,this.colorpickerHideCallback=r,this.colorpickerLastUpdateCallback=i,this.$root.css(this.getInitalizePosition()).show(),this.isColorPickerShow=!0,this.isShortCut=e.isShortCut||!1,this.outputFormat=e.outputFormat,this.hideDelay=+(void 0===e.hideDelay?2e3:e.hideDelay),0<this.hideDelay&&this.setHideDelay(this.hideDelay),this.$root.appendTo(this.$body),this.definePosition(e),this.initColorWithoutChangeEvent(t)}},{key:"initColor",value:function(e,t){this.$store.dispatch("/changeColor",e,t)}},{key:"hide",value:function(){this.isColorPickerShow&&(this.$root.hide(),this.$root.remove(),this.isColorPickerShow=!1,this.callbackHideColorValue())}},{key:"setColorsInPalette",value:function(){this.$store.dispatch("/setCurrentColorAll",0<arguments.length&&void 0!==arguments[0]?arguments[0]:[])}},{key:"setUserPalette",value:function(){this.$store.dispatch("/setUserPalette",0<arguments.length&&void 0!==arguments[0]?arguments[0]:[])}},{key:"getOption",value:function(e){return this.opt[e]}},{key:"setOption",value:function(e,t){this.opt[e]=t}},{key:"isType",value:function(e){return this.getOption("type")==e}},{key:"isPaletteType",value:function(){return this.isType("palette")}},{key:"isSketchType",value:function(){return this.isType("sketch")}},{key:"getContainer",value:function(){return this.opt.container||document.body}},{key:"getColor",value:function(e){return this.$store.dispatch("/toColor",e)}},{key:"definePositionForArrow",value:function(e,t,n){}},{key:"definePosition",value:function(e){var t=this.$root.width(),n=this.$root.height(),r=e.left-this.$body.scrollLeft();n+(t=(t+r>window.innerWidth&&(r-=t+r-window.innerWidth),r<0&&(r=0),e.top-this.$body.scrollTop()))>window.innerHeight&&(t-=n+t-window.innerHeight),this.$root.css({left:r+"px",top:(t=t<0?0:t)+"px"})}},{key:"getInitalizePosition",value:function(){return"inline"==this.opt.position?{position:"relative",left:"auto",top:"auto",display:"inline-block"}:{position:"fixed",left:"-10000px",top:"-10000px"}}},{key:"isAbsolute",value:function(){return"inline"!==this.opt.position}},{key:"mouseup.isAbsolute document",value:function(e){this.__isMouseDown=!1,this.checkInHtml(e.target)||(0==this.checkColorPickerClass(e.target)?this.hide():this.__isMouseIn||(clearTimeout(this.timerCloseColorPicker),this.timerCloseColorPicker=setTimeout(this.hide.bind(this),this.delayTime||this.hideDelay)))}},{key:"keyup.isAbsolute.escape $root",value:function(e){this.hide()}},{key:"mouseover.isAbsolute $root",value:function(e){clearTimeout(this.timerCloseColorPicker)}},{key:"mousemove.isAbsolute $root",value:function(e){clearTimeout(this.timerCloseColorPicker)}},{key:"mouseenter.isAbsolute $root",value:function(e){clearTimeout(this.timerCloseColorPicker),this.__isMouseIn=!0}},{key:"mouseleave.isAbsolute $root",value:function(e){this.__isMouseIn=!1,this.__isMouseDown||(clearTimeout(this.timerCloseColorPicker),this.timerCloseColorPicker=setTimeout(this.hide.bind(this),this.delayTime||this.hideDelay))}},{key:"mousedown.isAbsolute $root",value:function(e){this.__isMouseDown=!0}},{key:"setHideDelay",value:function(e){this.delayTime=e||0}},{key:"runHideDelay",value:function(){this.isColorPickerShow&&this.setHideDelay()}},{key:"callbackColorValue",value:function(e){e=e||this.getCurrentColor(),"function"==typeof this.opt.onChange&&this.opt.onChange.call(this,e),"function"==typeof this.colorpickerShowCallback&&this.colorpickerShowCallback(e)}},{key:"callbackLastUpdateColorValue",value:function(e){e=e||this.getCurrentColor(),"function"==typeof this.opt.onLastUpdate&&this.opt.onLastUpdate.call(this,e),"function"==typeof this.colorpickerLastUpdateCallback&&this.colorpickerLastUpdateCallback(e)}},{key:"callbackConfirmValue",value:function(e){e=e||this.getCurrentColor(),"function"==typeof this.opt.onConfirm&&this.opt.onConfirm.call(this,e),"function"==typeof this.colorpickerConfirm&&this.colorpickerConfirm(e)}},{key:"callbackCancelValue",value:function(){"function"==typeof this.opt.onCancel&&this.opt.onCancel.call(this),"function"==typeof this.colorpickerCancel&&this.colorpickerCancel()}},{key:"callbackHideColorValue",value:function(e){e=e||this.getCurrentColor(),"function"==typeof this.opt.onHide&&this.opt.onHide.call(this,e),"function"==typeof this.colorpickerHideCallback&&this.colorpickerHideCallback(e)}},{key:"getCurrentColor",value:function(){return this.$store.dispatch("/toColor",this.outputFormat)}},{key:"checkColorPickerClass",value:function(e){var t=new Wt(e).closest("codemirror-colorview"),n=new Wt(e).closest("codemirror-colorpicker"),r=new Wt(e).closest("CodeMirror");return e.nodeName,!!(n||t||r)}},{key:"checkInHtml",value:function(e){return"HTML"==e.nodeName}},{key:"initializeStoreEvent",value:function(){C(dn.prototype.__proto__||Object.getPrototypeOf(dn.prototype),"initializeStoreEvent",this).call(this),this.$store.on("changeColor",this.callbackChange),this.$store.on("lastUpdateColor",this.callbackLastUpdate),this.$store.on("confirm",this.callbackConfirm),this.$store.on("cancel",this.callbackCancel),this.$store.on("changeFormat",this.callbackChange)}},{key:"destroy",value:function(){C(dn.prototype.__proto__||Object.getPrototypeOf(dn.prototype),"destroy",this).call(this),this.$store.off("changeColor",this.callbackChange),this.$store.off("lastUpdateColor",this.callbackLastUpdate),this.$store.off("confirm",this.callbackConfirm),this.$store.off("cancel",this.callbackCancel),this.$store.off("changeFormat",this.callbackChange),this.callbackChange=void 0,this.callbackLastUpdate=void 0,this.callbackConfirm=void 0,this.callbackCancel=void 0,this.colorpickerShowCallback=void 0,this.colorpickerHideCallback=void 0}}]),V=dn,k(pn,ee),y(pn,[{key:"refresh",value:function(){}},{key:"refreshColorUI",value:function(e){}},{key:"changeColor",value:function(e){this.$store.dispatch("/changeColor",Object.assign({source:this.source},e||{}))}},{key:"mouseup document",value:function(e){this.onDragEnd(e)}},{key:"mousemove document",value:function(e){this.onDragMove(e)}},{key:"mousedown $bar",value:function(e){e.preventDefault(),this.isDown=!0}},{key:"mousedown $container",value:function(e){this.isDown=!0,this.onDragStart(e)}},{key:"touchend document",value:function(e){this.onDragEnd(e)}},{key:"touchmove document",value:function(e){this.onDragMove(e)}},{key:"touchstart $bar",value:function(e){e.preventDefault(),this.isDown=!0}},{key:"touchstart $container",value:function(e){this.onDragStart(e)}},{key:"onDragStart",value:function(e){this.isDown=!0,this.refreshColorUI(e)}},{key:"onDragMove",value:function(e){this.isDown&&this.refreshColorUI(e)}},{key:"onDragEnd",value:function(e){this.isDown&&(this.$store.emit("lastUpdateColor"),this.isDown=!1)}},{key:"@changeColor",value:function(e){this.source!=e&&this.refresh()}},{key:"@initColor",value:function(){this.refresh()}}]),k(mn,q=pn),y(mn,[{key:"getMinMaxPosition",value:function(){var e=this.getMinPosition(),t=this.getMaxDist();return{min:e,max:e+t,width:t}}},{key:"getCurrent",value:function(e){return min+this.getMaxDist()*e}},{key:"getMinPosition",value:function(){return this.refs.$container.offset().left}},{key:"getMaxDist",value:function(){return this.state.get("$container.width")}},{key:"getDist",value:function(e){var t=(n=this.getMinMaxPosition()).min,n=n.max;return e=e<t?0:n<e?100:(e-t)/(n-t)*100}},{key:"getCaculatedDist",value:function(e){return e=e?this.getMousePosition(e):this.getCurrent(this.getDefaultValue()/this.maxValue),this.getDist(e)}},{key:"getDefaultValue",value:function(){return 0}},{key:"setMousePosition",value:function(e){this.refs.$bar.css({left:e+"px"})}},{key:"getMousePosition",value:function(e){return Zt.pos(e).pageX}},{key:"refresh",value:function(){this.setColorUI()}},{key:"setColorUI",value:function(e){(e=e||this.getDefaultValue())<=this.minValue?this.refs.$bar.addClass("first").removeClass("last"):(e>=this.maxValue?this.refs.$bar.addClass("last"):this.refs.$bar.removeClass("last")).removeClass("first"),this.setMousePosition(this.getMaxDist()*((e||0)/this.maxValue))}}]),k(An,Z=mn),y(An,[{key:"template",value:function(){return'\n            <div class="value">\n                <div ref="$container" class="value-container">\n                    <div ref="$bar" class="drag-bar"></div>\n                </div>\n            </div>\n        '}},{key:"setBackgroundColor",value:function(){this.refs.$container.css("background-color",this.$store.dispatch("/toRGB"))}},{key:"refresh",value:function(){C(An.prototype.__proto__||Object.getPrototypeOf(An.prototype),"refresh",this).call(this),this.setBackgroundColor()}},{key:"getDefaultValue",value:function(){return this.$store.hsv.v}},{key:"refreshColorUI",value:function(e){e=this.getCaculatedDist(e),this.setColorUI(e/100*this.maxValue),this.changeColor({type:"hsv",v:e/100*this.maxValue})}}]);var gn=An;function An(e){return v(this,An),(e=E(this,(An.__proto__||Object.getPrototypeOf(An)).call(this,e))).minValue=0,e.maxValue=1,e.source="value-control",e}k(bn,Z),y(bn,[{key:"template",value:function(){return'\n        <div class="opacity">\n            <div ref="$container" class="opacity-container">\n                <div ref="$colorbar" class="color-bar"></div>\n                <div ref="$bar" class="drag-bar"></div>\n            </div>\n        </div>\n        '}},{key:"refresh",value:function(){C(bn.prototype.__proto__||Object.getPrototypeOf(bn.prototype),"refresh",this).call(this),this.setOpacityColorBar()}},{key:"setOpacityColorBar",value:function(){var e=((t=Object.assign({},this.$store.rgb)).a=0,Lt.format(t,"rgb")),t=(t.a=1,Lt.format(t,"rgb"));this.setOpacityColorBarBackground(e,t)}},{key:"setOpacityColorBarBackground",value:function(e,t){this.refs.$colorbar.css("background","linear-gradient(to right, "+e+", "+t+")")}},{key:"getDefaultValue",value:function(){return this.$store.alpha}},{key:"refreshColorUI",value:function(e){e=this.getCaculatedDist(e),this.setColorUI(e/100*this.maxValue),this.changeColor({a:Math.floor(e)/100*this.maxValue})}}]);var vn=bn;function bn(e){return v(this,bn),(e=E(this,(bn.__proto__||Object.getPrototypeOf(bn)).call(this,e))).minValue=0,e.maxValue=1,e.source="opacity-control",e}var yn="EyeDropper"in window,wn=(k(xn,ee),y(xn,[{key:"template",value:function(){return'\n      <nav class="el-cp-color-eyedropper">\n        <button type="button" ref="$button" title="Eyedropper">\n          <svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">\n            <path d="M7.797 18.344c-.019.001-.074-.009-.24-.065-.277-.094-.745-.25-1.137.141l-1.542 1.543a.595.595 0 0 1-.84-.84L5.58 17.58c.391-.39.235-.859.141-1.14-.045-.134-.06-.195-.072-.206-.002-.003-.005-.003-.007-.001l1.06-1.06.703.705a.432.432 0 1 0 .611-.611l-.703-.705.557-.557.703.703a.434.434 0 0 0 .611 0 .434.434 0 0 0 0-.61l-.703-.703.571-.572.703.704a.435.435 0 0 0 .612 0 .434.434 0 0 0 0-.61l-.705-.706L14 7.875l2.126 2.127-8.33 8.342zM19.29 9.37l-.654-.655 1.669-1.668a2.372 2.372 0 0 0-3.353-3.354l-1.669 1.669-.655-.654a1.341 1.341 0 0 0-1.898 1.897l.658.658-8.358 8.359c-.373.373-.214.841-.13 1.094.061.18.069.24.069.253l-1.543 1.542a1.458 1.458 0 1 0 2.062 2.061l1.536-1.54c.019-.003.08.006.259.066.252.085.72.243 1.093-.13l8.359-8.358.658.658a1.341 1.341 0 1 0 1.897-1.898z" fill="currentColor"/>\n          </svg>\n        </button>\n      </nav>\n    '}},{key:"click $button",value:function(){var e=this;yn&&(new EyeDropper).open().then((function(t){e.$store.dispatch("/changeColor",t.sRGBHex),e.$store.emit("lastUpdateColor")}))}}]),xn);function xn(){return v(this,xn),E(this,(xn.__proto__||Object.getPrototypeOf(xn)).apply(this,arguments))}k(kn,ee),y(kn,[{key:"components",value:function(){return{Value:gn,Opacity:vn,Eyedropper:wn}}},{key:"template",value:function(){return'\n        <div class="control '+(yn?"has-eyedropper":"")+'">\n            <div target="Value" ></div>\n            <div target="Opacity" ></div>\n            <div ref="$controlPattern" class="empty"></div>\n            <div ref="$controlColor" class="color"></div>\n            '+(yn?'\n        <div class="el-cp-color-control__left">\n          <div target="Eyedropper"></div>\n        </div>\n      ':"")+"                       \n        </div>\n        "}},{key:"setBackgroundColor",value:function(){this.refs.$controlColor.css("background-color",this.$store.dispatch("/toRGB"))}},{key:"refresh",value:function(){this.setColorUI(),this.setBackgroundColor()}},{key:"setColorUI",value:function(){this.Value.setColorUI(),this.Opacity.setColorUI()}},{key:"@changeColor",value:function(e){"macos-control"!=e&&this.refresh()}},{key:"@initColor",value:function(){this.refresh()}}]);var Cn=kn;function kn(){return v(this,kn),E(this,(kn.__proto__||Object.getPrototypeOf(kn)).apply(this,arguments))}k(Sn,ee),y(Sn,[{key:"template",value:function(){return'\n        <div class="wheel">\n            <canvas class="wheel-canvas" ref="$colorwheel" ></canvas>\n            <div class="wheel-canvas" ref="$valuewheel" ></div>\n            <div class="drag-pointer" ref="$drag_pointer"></div>\n        </div>\n        '}},{key:"refresh",value:function(e){this.setColorUI(e)}},{key:"setColorUI",value:function(e){this.renderCanvas(),this.renderValue(),this.setHueColor(null,e)}},{key:"renderValue",value:function(){var e=1-this.$store.hsv.v;this.refs.$valuewheel.css({"background-color":"rgba(0, 0, 0, "+e+")"})}},{key:"renderWheel",value:function(e,t){this.width&&!e&&(e=this.width),this.height&&!t&&(t=this.height);for(var n=new Wt("canvas"),r=n.el.getContext("2d"),i=(n.el.width=e,n.el.height=t,n.css({width:e+"px",height:t+"px"}),r.getImageData(0,0,e,t)),o=i.data,a=Math.floor(e/2),s=Math.floor(t/2),u=t<e?s:a,c=a,l=s,h=0;h<t;h++)for(var d=0;d<e;d++){var p=(m=d-c+1)*m+(g=h-l+1)*g,m=f(m,g),g=Lt.HSVtoRGB(m,Math.min(Math.sqrt(p)/u,1),1);o[m=4*(h*e+d)]=g.r,o[1+m]=g.g,o[2+m]=g.b,o[3+m]=255}return r.putImageData(i,0,0),0<this.thinkness&&(r.globalCompositeOperation="destination-out",r.fillStyle="black",r.beginPath(),r.arc(c,l,u-this.thinkness,0,2*Math.PI),r.closePath(),r.fill()),n}},{key:"renderCanvas",value:function(){var e,t,n,r;this.$store.createdWheelCanvas||(e=(r=this.refs.$colorwheel).el.getContext("2d"),n=r.size(),t=(n=_(n,2))[0],n=n[1],this.width&&!t&&(t=this.width),this.height&&!n&&(n=this.height),r.el.width=t,r.el.height=n,r.css({width:t+"px",height:n+"px"}),r=this.renderWheel(t,n),e.drawImage(r.el,0,0),this.$store.createdWheelCanvas=!0)}},{key:"getDefaultValue",value:function(){return this.$store.hsv.h}},{key:"getDefaultSaturation",value:function(){return this.$store.hsv.s}},{key:"getCurrentXY",value:function(e,t,n,r,i){return e?Zt.posXY(e):function(e,t,n,r){return r=3<arguments.length&&void 0!==r?r:0,{x:l(e,t,n=2<arguments.length&&void 0!==n?n:0),y:h(e,t,r)}}(t,n,r,i)}},{key:"getRectangle",value:function(){var e=this.state.get("$el.width"),t=this.state.get("$el.height"),n=this.state.get("$colorwheel.width")/2,r=this.refs.$el.offset().left,i=r+e/2,o=this.refs.$el.offset().top;return{minX:r,minY:o,width:e,height:t,radius:n,centerX:i,centerY:o+t/2}}},{key:"setHueColor",value:function(e,t){var n,r,i,o,a,s,u,c,l;this.state.get("$el.width")&&(n=(o=this.getRectangle()).minX,r=o.minY,i=o.radius,l=o.centerX,o=o.centerY,a=(s=(c=(e=this.getCurrentXY(e,this.getDefaultValue(),this.getDefaultSaturation()*i,l,o)).x)-l)*s+(u=(e=e.y)-o)*u,s=f(s,u),i*i<a&&(c=(u=this.getCurrentXY(null,s,i,l,o)).x,e=u.y),l=Math.min(Math.sqrt(a)/i,1),this.refs.$drag_pointer.css({left:c-n+"px",top:e-r+"px"}),t||this.changeColor({type:"hsv",h:s,s:l}))}},{key:"changeColor",value:function(e){this.$store.dispatch("/changeColor",Object.assign({source:this.source},e||{}))}},{key:"@changeColor",value:function(e){this.source!=e&&this.refresh(!0)}},{key:"@initColor",value:function(){this.refresh(!0)}},{key:"mouseup document",value:function(e){this.isDown&&(this.isDown=!1,this.$store.emit("lastUpdateColor"))}},{key:"mousemove document",value:function(e){this.isDown&&this.setHueColor(e)}},{key:"mousedown $drag_pointer",value:function(e){e.preventDefault(),this.isDown=!0}},{key:"mousedown $el",value:function(e){this.isDown=!0,this.setHueColor(e)}},{key:"touchend document",value:function(e){this.isDown&&(this.isDown=!1,this.$store.emit("lastUpdateColor"))}},{key:"touchmove document",value:function(e){this.isDown&&this.setHueColor(e)}},{key:"touchstart $drag_pointer",value:function(e){e.preventDefault(),this.isDown=!0}},{key:"touchstart $el",value:function(e){e.preventDefault(),this.isDown=!0,this.setHueColor(e)}}]);var En=Sn;function Sn(e){return v(this,Sn),(e=E(this,(Sn.__proto__||Object.getPrototypeOf(Sn)).call(this,e))).width=214,e.height=214,e.thinkness=0,e.half_thinkness=0,e.source="colorwheel",e}var _n="chromedevtool-information",On=(k(Tn,ee),y(Tn,[{key:"template",value:function(){return'\n        <div class="information hex">\n            <div ref="$informationChange" class="information-change">\n                <button ref="$formatChangeButton" type="button" class="format-change-button arrow-button"></button>\n            </div>\n            <div class="information-item hex">\n                <div class="input-field hex">\n                    <input ref="$hexCode" class="input" type="text" />\n                    <div class="title">HEX</div>\n                </div>\n            </div>\n            <div class="information-item rgb">\n                <div class="input-field rgb-r">\n                    <input ref="$rgb_r" class="input" type="number" step="1" min="0" max="255" />\n                    <div class="title">R</div>\n                </div>\n                <div class="input-field rgb-g">\n                    <input ref="$rgb_g" class="input" type="number" step="1" min="0" max="255" />\n                    <div class="title">G</div>\n                </div>\n                <div class="input-field rgb-b">\n                    <input ref="$rgb_b" class="input" type="number" step="1" min="0" max="255" />\n                    <div class="title">B</div>\n                </div>          \n                <div class="input-field rgb-a">\n                    <input ref="$rgb_a" class="input" type="number" step="0.01" min="0" max="1" />\n                    <div class="title">A</div>\n                </div>                                                            \n            </div>\n            <div class="information-item hsl">\n                <div class="input-field hsl-h">\n                    <input ref="$hsl_h" class="input" type="number" step="1" min="0" max="360" />\n                    <div class="title">H</div>\n                </div>\n                <div class="input-field hsl-s">\n                    <input ref="$hsl_s" class="input" type="number" step="1" min="0" max="100" />\n                    <div class="postfix">%</div>\n                    <div class="title">S</div>\n                </div>\n                <div class="input-field hsl-l">\n                    <input ref="$hsl_l" class="input" type="number" step="1" min="0" max="100" />\n                    <div class="postfix">%</div>                        \n                    <div class="title">L</div>\n                </div>\n                <div class="input-field hsl-a">\n                    <input ref="$hsl_a" class="input" type="number" step="0.01" min="0" max="1" />\n                    <div class="title">A</div>\n                </div>\n            </div>\n        </div>\n        '}},{key:"setCurrentFormat",value:function(e){this.format=e,this.initFormat()}},{key:"initFormat",value:function(){var e=this,t=this.format||"hex";["hex","rgb","hsl"].filter((function(e){return e!==t})).forEach((function(t){e.$el.removeClass(t)})),this.$el.addClass(t)}},{key:"nextFormat",value:function(){var e=this.$store.format||"hex",t="hex";"hex"==e?t="rgb":"rgb"==e?t="hsl":"hsl"==e&&(t="hex"),this.format=t,this.$store.dispatch("/changeFormat",t),this.$store.emit("lastUpdateColor"),this.initFormat()}},{key:"goToFormat",value:function(e){this.format=e,this.$store.dispatch("/changeFormat",this.format),this.$store.emit("lastUpdateColor"),this.initFormat()}},{key:"getFormat",value:function(){return this.format||"hex"}},{key:"checkNumberKey",value:function(e){return 37==(e=e.which)||39==e||8==e||46==e||9==e||!(e<48||57<e)}},{key:"checkNotNumberKey",value:function(e){return!this.checkNumberKey(e)}},{key:"changeRgbColor",value:function(){this.$store.dispatch("/changeColor",{type:"rgb",r:this.refs.$rgb_r.int(),g:this.refs.$rgb_g.int(),b:this.refs.$rgb_b.int(),a:this.refs.$rgb_a.float(),source:_n}),this.$store.emit("lastUpdateColor")}},{key:"changeHslColor",value:function(){this.$store.dispatch("/changeColor",{type:"hsl",h:this.refs.$hsl_h.int(),s:this.refs.$hsl_s.int(),l:this.refs.$hsl_l.int(),a:this.refs.$hsl_a.float(),source:_n}),this.$store.emit("lastUpdateColor")}},{key:"@changeColor",value:function(e){_n!=e&&this.refresh()}},{key:"@initColor",value:function(){this.refresh()}},{key:"input $rgb_r",value:function(e){this.changeRgbColor()}},{key:"input $rgb_g",value:function(e){this.changeRgbColor()}},{key:"input $rgb_b",value:function(e){this.changeRgbColor()}},{key:"input $rgb_a",value:function(e){this.changeRgbColor()}},{key:"input $hsl_h",value:function(e){this.changeHslColor()}},{key:"input $hsl_s",value:function(e){this.changeHslColor()}},{key:"input $hsl_l",value:function(e){this.changeHslColor()}},{key:"input $hsl_a",value:function(e){this.changeHslColor()}},{key:"keyup $hexCode",value:function(e){var t=this.refs.$hexCode.val();"#"!=t.charAt(0)||7!=t.length&&9!==t.length||(this.$store.dispatch("/changeColor",t,_n),this.$store.emit("lastUpdateColor"))}},{key:"click $formatChangeButton",value:function(e){this.nextFormat()}},{key:"click $el .information-item.hex .input-field .title",value:function(e){this.goToFormat("rgb")}},{key:"click $el .information-item.rgb .input-field .title",value:function(e){this.goToFormat("hsl")}},{key:"click $el .information-item.hsl .input-field .title",value:function(e){this.goToFormat("hex")}},{key:"setRGBInput",value:function(){this.refs.$rgb_r.val(this.$store.rgb.r),this.refs.$rgb_g.val(this.$store.rgb.g),this.refs.$rgb_b.val(this.$store.rgb.b),this.refs.$rgb_a.val(this.$store.alpha)}},{key:"setHSLInput",value:function(){this.refs.$hsl_h.val(this.$store.hsl.h),this.refs.$hsl_s.val(this.$store.hsl.s),this.refs.$hsl_l.val(this.$store.hsl.l),this.refs.$hsl_a.val(this.$store.alpha)}},{key:"setHexInput",value:function(){this.refs.$hexCode.val(this.$store.dispatch("/toHEX"))}},{key:"refresh",value:function(){this.setCurrentFormat(this.$store.format),this.setRGBInput(),this.setHSLInput(),this.setHexInput()}}]),Tn);function Tn(){return v(this,Tn),E(this,(Tn.__proto__||Object.getPrototypeOf(Tn)).apply(this,arguments))}k(Bn,ee),y(Bn,[{key:"template",value:function(){return'\n            <div class="color-chooser">\n                <div class="color-chooser-container">\n                    <div class="colorsets-item colorsets-item-header">\n                        <h1 class="title">Color Palettes</h1>\n                        <span ref="$toggleButton" class="items">&times;</span>\n                    </div>\n                    <div ref="$colorsetsList" class="colorsets-list"></div>\n                </div>\n            </div>\n        '}},{key:"refresh",value:function(){this.load()}},{key:"@changeCurrentColorSets",value:function(){this.refresh()}},{key:"@toggleColorChooser",value:function(){this.toggle()}},{key:"load $colorsetsList",value:function(){return"\n            <div>\n                "+this.$store.dispatch("/getColorSetsList").map((function(e,t){return'\n                        <div class="colorsets-item" data-colorsets-index="'+t+'" >\n                            <h1 class="title">'+e.name+'</h1>\n                            <div class="items">\n                                <div>\n                                    '+e.colors.filter((function(e,t){return t<5})).map((function(e){return'<div class="color-item" title="'+(e=e||"rgba(255, 255, 255, 1)")+'">\n                                                <div class="color-view" style="background-color: '+e+'"></div>\n                                            </div>'})).join("")+"\n                                </div>\n                            </div>\n                        </div>"})).join("")+"\n            </div>\n        "}},{key:"show",value:function(){this.$el.addClass("open")}},{key:"hide",value:function(){this.$el.removeClass("open")}},{key:"toggle",value:function(){this.$el.toggleClass("open")}},{key:"click $toggleButton",value:function(e){this.toggle()}},{key:"click $colorsetsList .colorsets-item",value:function(e){(e=e.$delegateTarget)&&(e=parseInt(e.attr("data-colorsets-index")),this.$store.dispatch("/setCurrentColorSets",e),this.hide())}},{key:"destroy",value:function(){C(Bn.prototype.__proto__||Object.getPrototypeOf(Bn.prototype),"destroy",this).call(this),this.hide()}}]);var Dn=Bn;function Bn(){return v(this,Bn),E(this,(Bn.__proto__||Object.getPrototypeOf(Bn)).apply(this,arguments))}k(Mn,ee),y(Mn,[{key:"template",value:function(){return'\n            <div class="colorsets">\n                <div class="menu" title="Open Color Palettes">\n                    <button ref="$colorSetsChooseButton" type="button" class="color-sets-choose-btn arrow-button"></button>\n                </div>\n                <div ref="$colorSetsColorList" class="color-list"></div>\n            </div>\n        '}},{key:"load $colorSetsColorList",value:function(){var e=this.$store.dispatch("/getCurrentColorSets");return'\n            <div class="current-color-sets">\n            '+this.$store.dispatch("/getCurrentColors").map((function(e,t){return'<div class="color-item" title="'+e+'" data-index="'+t+'" data-color="'+e+'">\n                    <div class="empty"></div>\n                    <div class="color-view" style="background-color: '+e+'"></div>\n                </div>'})).join("")+"   \n            "+(e.edit?'<div class="add-color-item">+</div>':"")+"         \n            </div>\n        "}},{key:"refresh",value:function(){this.load()}},{key:"addColor",value:function(e){this.$store.dispatch("/addCurrentColor",e)}},{key:"@changeCurrentColorSets",value:function(){this.refresh()}},{key:"click $colorSetsChooseButton",value:function(e){this.$store.emit("toggleColorChooser")}},{key:"contextmenu $colorSetsColorList",value:function(e){var t;e.preventDefault(),this.$store.dispatch("/getCurrentColorSets").edit&&((t=new Wt(e.target).closest("color-item"))?(t=parseInt(t.attr("data-index")),this.$store.emit("showContextMenu",e,t)):this.$store.emit("showContextMenu",e))}},{key:"click $colorSetsColorList .add-color-item",value:function(e){this.addColor(this.$store.dispatch("/toColor"))}},{key:"click $colorSetsColorList .color-item",value:function(e){this.$store.dispatch("/changeColor",e.$delegateTarget.attr("data-color")),this.$store.emit("lastUpdateColor")}}]);var In=Mn;function Mn(){return v(this,Mn),E(this,(Mn.__proto__||Object.getPrototypeOf(Mn)).apply(this,arguments))}k(Nn,ee),y(Nn,[{key:"template",value:function(){return'\n            <ul class="colorsets-contextmenu">\n                <li class="menu-item small-hide" data-type="remove-color">Remove color</li>\n                <li class="menu-item small-hide" data-type="remove-all-to-the-right">Remove all to the right</li>\n                <li class="menu-item" data-type="clear-palette">Clear palette</li>\n            </ul>\n        '}},{key:"show",value:function(e,t){e=Zt.pos(e),this.$el.css({top:e.clientY-10+"px",left:e.clientX+"px"}),this.$el.addClass("show"),this.selectedColorIndex=t,void 0===this.selectedColorIndex?this.$el.addClass("small"):this.$el.removeClass("small")}},{key:"hide",value:function(){this.$el.removeClass("show")}},{key:"runCommand",value:function(e){switch(e){case"remove-color":this.$store.dispatch("/removeCurrentColor",this.selectedColorIndex);break;case"remove-all-to-the-right":this.$store.dispatch("/removeCurrentColorToTheRight",this.selectedColorIndex);break;case"clear-palette":this.$store.dispatch("/clearPalette")}}},{key:"@showContextMenu",value:function(e,t){this.show(e,t)}},{key:"click $el .menu-item",value:function(e){e.preventDefault(),this.runCommand(e.$delegateTarget.attr("data-type")),this.hide()}}]);var jn=Nn;function Nn(){return v(this,Nn),E(this,(Nn.__proto__||Object.getPrototypeOf(Nn)).apply(this,arguments))}k(Rn,V),y(Rn,[{key:"template",value:function(){return'\n            <div class=\'codemirror-colorpicker-body\'>\n                <div target="colorwheel"></div>\n                <div target="control"></div>\n                <div target="information"></div>\n                <div target="currentColorSets"></div>\n                <div target="colorSetsChooser"></div>\n                <div target="contextMenu"></div>                \n            </div>\n        '}},{key:"components",value:function(){return{colorwheel:En,control:Cn,information:On,currentColorSets:In,colorSetsChooser:Dn,contextMenu:jn}}}]);var Fn=Rn;function Rn(){return v(this,Rn),E(this,(Rn.__proto__||Object.getPrototypeOf(Rn)).apply(this,arguments))}k(Ln,Z),y(Ln,[{key:"template",value:function(){return'\n            <div class="hue">\n                <div ref="$container" class="hue-container">\n                    <div ref="$bar" class="drag-bar"></div>\n                </div>\n            </div>\n        '}},{key:"getDefaultValue",value:function(){return this.$store.hsv.h}},{key:"refreshColorUI",value:function(e){e=this.getCaculatedDist(e),this.setColorUI(e/100*this.maxValue),this.changeColor({h:e/100*this.maxValue,type:"hsv"})}}]);var Pn=Ln;function Ln(e){return v(this,Ln),(e=E(this,(Ln.__proto__||Object.getPrototypeOf(Ln)).call(this,e))).minValue=0,e.maxValue=360,e.source="hue-control",e}k(zn,ee),y(zn,[{key:"components",value:function(){return{Hue:Pn,Opacity:vn,Eyedropper:wn}}},{key:"template",value:function(){return'\n        <div class="control '+(yn?"has-eyedropper":"")+'">\n            <div target="Hue" ></div>\n            <div target="Opacity" ></div>\n            <div ref="$controlPattern" class="empty"></div>\n            <div ref="$controlColor" class="color"></div>\n            '+(yn?'\n        <div class="el-cp-color-control__left">\n          <div target="Eyedropper"></div>\n        </div>\n      ':"")+"            \n        </div>\n        "}},{key:"setBackgroundColor",value:function(){this.refs.$controlColor.css("background-color",this.$store.dispatch("/toRGB"))}},{key:"refresh",value:function(){this.setColorUI(),this.setBackgroundColor()}},{key:"setColorUI",value:function(){this.Hue.setColorUI(),this.Opacity.setColorUI()}},{key:"@changeColor",value:function(e){"chromedevtool-control"!=e&&this.refresh()}},{key:"@initColor",value:function(){this.refresh()}}]);var Un=zn;function zn(){return v(this,zn),E(this,(zn.__proto__||Object.getPrototypeOf(zn)).apply(this,arguments))}var Hn="chromedevtool-palette",$n=(k(Qn,ee),y(Qn,[{key:"template",value:function(){return'\n        <div class="color">\n            <div ref="$saturation" class="saturation">\n                <div ref="$value" class="value">\n                    <div ref="$drag_pointer" class="drag-pointer"></div>\n                </div>\n            </div>        \n        </div>        \n        '}},{key:"setBackgroundColor",value:function(e){this.$el.css("background-color",e)}},{key:"refresh",value:function(){this.setColorUI()}},{key:"caculateSV",value:function(){var e=this.drag_pointer_pos||{x:0,y:0},t=this.state.get("$el.width"),n=this.state.get("$el.height");t=e.x/t,e=(n-e.y)/n;this.$store.dispatch("/changeColor",{type:"hsv",s:t,v:e,source:Hn})}},{key:"setColorUI",value:function(){var e=this.state.get("$el.width")*this.$store.hsv.s,t=this.state.get("$el.height")*(1-this.$store.hsv.v);this.refs.$drag_pointer.css({left:e+"px",top:t+"px"}),this.drag_pointer_pos={x:e,y:t},this.setBackgroundColor(this.$store.dispatch("/getHueColor"))}},{key:"setMainColor",value:function(e){var t=this.$el.offset(),n=this.state.get("$el.contentWidth"),r=this.state.get("$el.contentHeight"),i=Zt.pos(e).pageX-t.left;i<0?i=0:n<i&&(i=n),(e=Zt.pos(e).pageY-t.top)<0?e=0:r<e&&(e=r),this.refs.$drag_pointer.css({left:i+"px",top:e+"px"}),this.drag_pointer_pos={x:i,y:e},this.caculateSV()}},{key:"@changeColor",value:function(e){Hn!=e&&this.refresh()}},{key:"@initColor",value:function(){this.refresh()}},{key:"mouseup document",value:function(e){this.isDown&&(this.isDown=!1,this.$store.emit("lastUpdateColor"))}},{key:"mousemove document",value:function(e){this.isDown&&this.setMainColor(e)}},{key:"mousedown",value:function(e){this.isDown=!0,this.setMainColor(e)}},{key:"touchend document",value:function(e){this.isDown&&(this.isDown=!1,this.$store.emit("lastUpdateColor"))}},{key:"touchmove document",value:function(e){this.isDown&&this.setMainColor(e)}},{key:"touchstart",value:function(e){e.preventDefault(),this.isDown=!0,this.setMainColor(e)}}]),Qn);function Qn(){return v(this,Qn),E(this,(Qn.__proto__||Object.getPrototypeOf(Qn)).apply(this,arguments))}k(qn,ee),y(qn,[{key:"template",value:function(){return'\n            <div class="colorconfirm">\n                <div class="confirm_main">\n                  <div ref="$button_primary" class="confirm_item-primary">确认</div>\n                  <div ref="$button_default" class="confirm_item-default">取消</div>\n                </div>\n            </div>\n        '}},{key:"click $button_primary",value:function(e){this.$store.emit("confirm")}},{key:"click $button_default",value:function(e){this.$store.emit("cancel")}}]);var Vn=qn;function qn(){return v(this,qn),E(this,(qn.__proto__||Object.getPrototypeOf(qn)).apply(this,arguments))}k(Wn,V),y(Wn,[{key:"template",value:function(){return'\n            <div class=\'codemirror-colorpicker-body\'>\n                <div target="palette"></div> \n                <div target="control"></div>\n                <div target="information"></div>\n                <div target="currentColorSets"></div>\n                <div target="colorSetsChooser"></div>\n                <div target="colorConfirm"></div>\n                <div target="contextMenu"></div>\n            </div>\n        '}},{key:"components",value:function(){return{palette:$n,control:Un,information:On,currentColorSets:In,colorSetsChooser:Dn,contextMenu:jn,colorConfirm:Vn}}}]);var Gn=Wn;function Wn(){return v(this,Wn),E(this,(Wn.__proto__||Object.getPrototypeOf(Wn)).apply(this,arguments))}k(Yn,ee),y(Yn,[{key:"components",value:function(){return{Hue:Pn,Opacity:vn}}},{key:"template",value:function(){return'\n        <div class="control">\n            <div target="Hue" ></div>\n            <div target="Opacity" ></div>\n        </div>\n        '}},{key:"refresh",value:function(){this.setColorUI()}},{key:"setColorUI",value:function(){this.Hue.setColorUI(),this.Opacity.setColorUI()}},{key:"@changeColor",value:function(e){"mini-control"!=e&&this.refresh()}},{key:"@initColor",value:function(){this.refresh()}}]);var Kn=Yn;function Yn(){return v(this,Yn),E(this,(Yn.__proto__||Object.getPrototypeOf(Yn)).apply(this,arguments))}k(Jn,V),y(Jn,[{key:"template",value:function(){return'\n            <div class=\'codemirror-colorpicker-body\'>\n                <div target="palette"></div>\n                <div target="control"></div>\n            </div>\n        '}},{key:"components",value:function(){return{palette:$n,control:Kn}}}]);var Xn=Jn;function Jn(){return v(this,Jn),E(this,(Jn.__proto__||Object.getPrototypeOf(Jn)).apply(this,arguments))}function Zn(e){return v(this,Zn),(e=E(this,(Zn.__proto__||Object.getPrototypeOf(Zn)).call(this,e))).source="vertical-slider",e}k(Zn,Z),y(Zn,[{key:"getMaxDist",value:function(){return this.state.get("$container.height")}},{key:"setMousePosition",value:function(e){this.refs.$bar.css({top:e+"px"})}},{key:"getMousePosition",value:function(e){return Zt.pos(e).pageY}},{key:"getMinPosition",value:function(){return this.refs.$container.offset().top}},{key:"getCaculatedDist",value:function(e){return e=e?this.getMousePosition(e):this.getCurrent(this.getDefaultValue()/this.maxValue),100-this.getDist(e)}},{key:"setColorUI",value:function(e){(e=e||this.getDefaultValue())<=this.minValue?this.refs.$bar.addClass("first").removeClass("last"):(e>=this.maxValue?this.refs.$bar.addClass("last"):this.refs.$bar.removeClass("last")).removeClass("first"),e=1-(e||0)/this.maxValue,this.setMousePosition(this.getMaxDist()*e)}}]),k(tr,b=Zn),y(tr,[{key:"template",value:function(){return'\n            <div class="hue">\n                <div ref="$container" class="hue-container">\n                    <div ref="$bar" class="drag-bar"></div>\n                </div>\n            </div>\n        '}},{key:"getDefaultValue",value:function(){return this.$store.hsv.h}},{key:"refreshColorUI",value:function(e){e=this.getCaculatedDist(e),this.setColorUI(e/100*this.maxValue),this.changeColor({h:e/100*this.maxValue,type:"hsv"})}}]);var er=tr;function tr(e){return v(this,tr),(e=E(this,(tr.__proto__||Object.getPrototypeOf(tr)).call(this,e))).minValue=0,e.maxValue=360,e.source="vertical-hue-control",e}k(rr,b),y(rr,[{key:"template",value:function(){return'\n        <div class="opacity">\n            <div ref="$container" class="opacity-container">\n                <div ref="$colorbar" class="color-bar"></div>\n                <div ref="$bar" class="drag-bar2"></div>\n            </div>\n        </div>\n        '}},{key:"refresh",value:function(){C(rr.prototype.__proto__||Object.getPrototypeOf(rr.prototype),"refresh",this).call(this),this.setOpacityColorBar()}},{key:"setOpacityColorBar",value:function(){var e=((t=Object.assign({},this.$store.rgb)).a=0,Lt.format(t,"rgb")),t=(t.a=1,Lt.format(t,"rgb"));this.refs.$colorbar.css("background","linear-gradient(to top, "+e+", "+t+")")}},{key:"getDefaultValue",value:function(){return this.$store.alpha}},{key:"refreshColorUI",value:function(e){e=this.getCaculatedDist(e),this.setColorUI(e/100*this.maxValue),this.changeColor({a:Math.floor(e)/100*this.maxValue})}}]);var nr=rr;function rr(e){return v(this,rr),(e=E(this,(rr.__proto__||Object.getPrototypeOf(rr)).call(this,e))).source="vertical-opacity-control",e}k(or,ee),y(or,[{key:"components",value:function(){return{Hue:er,Opacity:nr}}},{key:"template",value:function(){return'<div class="control"><div target="Hue" ></div><div target="Opacity" ></div></div>'}},{key:"refresh",value:function(){this.setColorUI()}},{key:"setColorUI",value:function(){this.Hue.setColorUI(),this.Opacity.setColorUI()}},{key:"@changeColor",value:function(e){"mini-control"!=e&&this.refresh()}},{key:"@initColor",value:function(){this.refresh()}}]);var ir=or;function or(){return v(this,or),E(this,(or.__proto__||Object.getPrototypeOf(or)).apply(this,arguments))}k(sr,V),y(sr,[{key:"template",value:function(){return'\n            <div class=\'codemirror-colorpicker-body\'>\n                <div target="palette"></div><div target="control"></div>\n            </div>\n        '}},{key:"components",value:function(){return{palette:$n,control:ir}}}]);var ar=sr;function sr(){return v(this,sr),E(this,(sr.__proto__||Object.getPrototypeOf(sr)).apply(this,arguments))}k(cr,ee),y(cr,[{key:"components",value:function(){return{Value:gn,Opacity:vn,Eyedropper:wn}}},{key:"template",value:function(){return'\n        <div class="control '+(yn?"has-eyedropper":"")+'">\n            <div target="Value" ></div>\n            <div target="Opacity" ></div>\n            <div ref="$controlPattern" class="empty"></div>\n            <div ref="$controlColor" class="color"></div>\n            '+(yn?'\n        <div class="el-cp-color-control__left">\n          <div target="Eyedropper"></div>\n        </div>\n      ':"")+"                                \n        </div>\n        "}},{key:"setBackgroundColor",value:function(){this.refs.$controlColor.css("background-color",this.$store.dispatch("/toRGB"))}},{key:"refresh",value:function(){this.setColorUI(),this.setBackgroundColor()}},{key:"setColorUI",value:function(){this.Value.setColorUI(),this.Opacity.setColorUI()}},{key:"@changeColor",value:function(e){"macos-control"!=e&&this.refresh()}},{key:"@initColor",value:function(){this.refresh()}}]);var ur=cr;function cr(){return v(this,cr),E(this,(cr.__proto__||Object.getPrototypeOf(cr)).apply(this,arguments))}k(hr,En),y(hr,[{key:"template",value:function(){return'\n        <div class="wheel" data-type="ring">\n            <canvas class="wheel-canvas" ref="$colorwheel" ></canvas>\n            <div class="drag-pointer" ref="$drag_pointer"></div>\n        </div>\n        '}},{key:"setColorUI",value:function(e){this.renderCanvas(),this.setHueColor(null,e)}},{key:"getDefaultValue",value:function(){return this.$store.hsv.h}},{key:"setHueColor",value:function(e,t){var n,r,i,o,a,s,u;this.state.get("$el.width")&&(n=(o=this.getRectangle()).minX,r=o.minY,s=o.radius,i=o.centerX,o=o.centerY,a=f((e=this.getCurrentXY(e,this.getDefaultValue(),s,i,o)).x-i,(e=e.y)-o),u=(s=this.getCurrentXY(null,a,s-this.half_thinkness,i,o)).x,e=s.y,this.refs.$drag_pointer.css({left:u-n+"px",top:e-r+"px"}),t||this.changeColor({type:"hsv",h:a}))}}]);var lr=hr;function hr(e){return v(this,hr),(e=E(this,(hr.__proto__||Object.getPrototypeOf(hr)).call(this,e))).width=214,e.height=214,e.thinkness=16,e.half_thinkness=e.thinkness/2,e.source="colorring",e}k(dr,V),y(dr,[{key:"template",value:function(){return'\n            <div class=\'codemirror-colorpicker-body\'>\n                <div target="colorring"></div>\n                <div target="palette"></div> \n                <div target="control"></div>\n                <div target="information"></div>\n                <div target="currentColorSets"></div>\n                <div target="colorSetsChooser"></div>\n                <div target="contextMenu"></div>\n            </div>\n        '}},{key:"components",value:function(){return{colorring:lr,palette:$n,control:ur,information:On,currentColorSets:In,colorSetsChooser:Dn,contextMenu:jn}}}]);var fr=dr;function dr(){return v(this,dr),E(this,(dr.__proto__||Object.getPrototypeOf(dr)).apply(this,arguments))}k(mr,ee),y(mr,[{key:"components",value:function(){return{Hue:er,Opacity:nr}}},{key:"template",value:function(){return'\n        <div class="control">\n            <div target="Hue" ></div>\n            <div target="Opacity" ></div>\n        </div>\n        '}},{key:"refresh",value:function(){this.setColorUI()}},{key:"setColorUI",value:function(){this.Hue.setColorUI(),this.Opacity.setColorUI()}},{key:"@changeColor",value:function(){this.refresh()}},{key:"@initColor",value:function(){this.refresh()}}]);var pr=mr;function mr(){return v(this,mr),E(this,(mr.__proto__||Object.getPrototypeOf(mr)).apply(this,arguments))}k(Ar,V),y(Ar,[{key:"template",value:function(){return'\n            <div class=\'codemirror-colorpicker-body\'>\n                <div target="palette"></div> \n                <div target="control"></div>\n                <div target="information"></div>\n                <div target="currentColorSets"></div>\n                <div target="colorSetsChooser"></div>\n                <div target="contextMenu"></div>\n            </div>\n        '}},{key:"components",value:function(){return{palette:$n,control:pr,information:On,currentColorSets:In,colorSetsChooser:Dn,contextMenu:jn}}}]);var gr=Ar;function Ar(){return v(this,Ar),E(this,(Ar.__proto__||Object.getPrototypeOf(Ar)).apply(this,arguments))}k(br,ee),y(br,[{key:"components",value:function(){return{Hue:er,Opacity:nr}}},{key:"template",value:function(){return'\n            <div class="control">\n                <div target="Opacity" ></div>            \n                <div target="Hue" ></div>\n            </div>\n        '}},{key:"refresh",value:function(){this.setColorUI()}},{key:"setColorUI",value:function(){this.Hue.setColorUI(),this.Opacity.setColorUI()}},{key:"@changeColor",value:function(e){"mini-control"!=e&&this.refresh()}},{key:"@initColor",value:function(){this.refresh()}}]);var vr=br;function br(){return v(this,br),E(this,(br.__proto__||Object.getPrototypeOf(br)).apply(this,arguments))}k(wr,V),y(wr,[{key:"template",value:function(){return"\n            <div class='codemirror-colorpicker-body'>\n                <div class='color-view "+(yn?"has-eyedropper":"")+'\' >\n                    <div class=\'color-view-container\'  >\n                        <div class="preview" ref="$colorview"></div>\n                    </div>\n                    '+(yn?'\n        <div class="el-cp-color-control__left">\n          <div target="Eyedropper"></div>\n        </div>\n      ':"")+'            \n                </div>\n                <div class=\'color-tool\'>\n                    <div target="palette"></div>\n                    <div target="control"></div>\n                </div>\n            </div>\n        '}},{key:"components",value:function(){return{palette:$n,control:vr,Eyedropper:wn}}},{key:"initColorWithoutChangeEvent",value:function(e){this.$store.dispatch("/initColor",e),this.refresh()}},{key:"setBackgroundColor",value:function(){var e=this.$store.dispatch("/toColor"),t=this.$store.rgb;t=Lt.brightness(t.r,t.g,t.b);this.refs.$colorview.css({"background-color":e,color:127<t?"black":"white"}),this.refs.$colorview.html(e)}},{key:"click $colorview",value:function(e){this.nextFormat()}},{key:"nextFormat",value:function(){var e=this.$store.format||"hex",t="hex";"hex"==e?t="rgb":"rgb"==e?t="hsl":"hsl"==e&&(t="hex"),this.$store.dispatch("/changeFormat",t),this.$store.emit("lastUpdateColor"),this.refresh()}},{key:"refresh",value:function(){this.setBackgroundColor()}},{key:"@changeColor",value:function(){this.refresh()}},{key:"@initColor",value:function(){this.refresh()}}]);var yr=wr;function wr(){return v(this,wr),E(this,(wr.__proto__||Object.getPrototypeOf(wr)).apply(this,arguments))}k(Cr,ee),y(Cr,[{key:"components",value:function(){return{Hue:Pn,Opacity:vn,Eyedropper:wn}}},{key:"template",value:function(){return'\n        <div class="control '+(yn?"has-eyedropper":"")+'">\n            <div>\n                '+(yn?'\n        <div class="el-cp-color-control__left">\n          <div target="Eyedropper"></div>\n        </div>\n      ':"")+'                                \n                <div class="color-info">\n                    <div ref="$controlPattern" class="empty"></div>\n                    <div ref="$controlColor" class="color"></div>        \n                </div>\n            </div>\n            <div target="Hue" ></div>\n            <div target="Opacity" ></div>\n\n        </div>\n        '}},{key:"setBackgroundColor",value:function(){this.refs.$controlColor.css("background-color",this.$store.dispatch("/toRGB"))}},{key:"refresh",value:function(){this.setColorUI(),this.setBackgroundColor()}},{key:"setColorUI",value:function(){this.Hue.setColorUI(),this.Opacity.setColorUI()}},{key:"@changeColor",value:function(e){"chromedevtool-control"!=e&&this.refresh()}},{key:"@initColor",value:function(){this.refresh()}}]);var xr=Cr;function Cr(){return v(this,Cr),E(this,(Cr.__proto__||Object.getPrototypeOf(Cr)).apply(this,arguments))}k(Er,V),y(Er,[{key:"template",value:function(){return'\n            <div class=\'codemirror-colorpicker-body\'>\n                <div target="palette"></div> \n                <div>\n                    <div target="control"></div>\n                    <div target="information"></div>\n                    <div target="currentColorSets"></div>\n                    <div target="colorSetsChooser"></div>\n                    <div target="contextMenu"></div>\n                </div>\n            </div>\n        '}},{key:"components",value:function(){return{palette:$n,control:xr,information:On,currentColorSets:In,colorSetsChooser:Dn,contextMenu:jn}}}]);var kr=Er;function Er(){return v(this,Er),E(this,(Er.__proto__||Object.getPrototypeOf(Er)).apply(this,arguments))}var Sr={create:function(e){switch(e.type){case"box":return new kr(e);case"macos":return new Fn(e);case"xd":return new gr(e);case"ring":return new fr(e);case"mini":return new Xn(e);case"vscode":return new yr(e);case"mini-vertical":return new ar(e);default:return new Gn(e)}},ColorPicker:Gn,ChromeDevToolColorPicker:Gn,MacOSColorPicker:Fn,RingColorPicker:fr,MiniColorPicker:Xn,VSCodePicker:yr,MiniVerticalColorPicker:ar},_r="codemirror-colorview",Or="codemirror-colorview-background",Tr=["comment","builtin","qualifier","tag","property","property error","variable","variable-2"];function Dr(e,t){"setValue"==t.origin?(e.state.colorpicker.init_color_update(),e.state.colorpicker.style_color_update()):e.state.colorpicker.style_color_update(e.getCursor().line)}function Br(e,t){e.state.colorpicker.isUpdate||(e.state.colorpicker.isUpdate=!0,e.state.colorpicker.close_color_picker(),e.state.colorpicker.init_color_update(),e.state.colorpicker.style_color_update())}function Ir(e,t){Dr(e,{origin:"setValue"})}function Mr(e,t){e.state.colorpicker.keyup(t)}function jr(e,t){e.state.colorpicker.is_edit_mode()&&e.state.colorpicker.check_mousedown(t)}function Nr(e,t){Dr(e,{origin:"setValue"})}function Fr(e){e.state.colorpicker.close_color_picker()}function Rr(e){e.state.colorpicker.hide_delay_color_picker(e.state.colorpicker.opt.hideDelay||1e3)}y(Lr,[{key:"init_event",value:function(){var e,t,n,r;this.cm.on("mousedown",jr),this.cm.on("keyup",Mr),this.cm.on("change",Dr),this.cm.on("update",Br),this.cm.on("refresh",Ir),this.cm.on("blur",Rr),this.onPasteCallback=(e=this.cm,t=Nr,function(n){t.call(this,e,n)}),this.onScrollEvent=(n=Fr,50,r=void 0,function(e,t){r&&clearTimeout(r),r=setTimeout((function(){n(e,t)}),50)}),this.cm.getWrapperElement().addEventListener("paste",this.onPasteCallback),this.is_edit_mode()&&this.cm.on("scroll",this.onScrollEvent)}},{key:"is_edit_mode",value:function(){return"edit"==this.opt.mode}},{key:"is_view_mode",value:function(){return"view"==this.opt.mode}},{key:"destroy",value:function(){this.cm.off("mousedown",jr),this.cm.off("keyup",Mr),this.cm.off("change",Dr),this.cm.off("blur",Rr),this.cm.getWrapperElement().removeEventListener("paste",this.onPasteCallback),this.is_edit_mode()&&this.cm.off("scroll",this.onScrollEvent)}},{key:"hasClass",value:function(e,t){return!!e.className&&-1<(" "+e.className+" ").indexOf(" "+t+" ")}},{key:"check_mousedown",value:function(e){this.hasClass(e.target,Or)?this.open_color_picker(e.target.parentNode):this.close_color_picker()}},{key:"popup_color_picker",value:function(e){var t=this.cm.getCursor(),n=this,r={lineNo:t.line,ch:t.ch,color:e||"#FFFFFF",isShortCut:!0};Object.keys(this.markers).forEach((function(e){-1<("#"+e).indexOf("#"+r.lineNo+":")&&(e=n.markers[e]).ch<=r.ch&&r.ch<=e.ch+e.color.length&&(r.ch=e.ch,r.color=e.color,r.nameColor=e.nameColor)})),this.open_color_picker(r)}},{key:"open_color_picker",value:function(e){var t,n,r=this,i=e.lineNo,o=e.ch,a=e.nameColor,s=e.color;this.colorpicker&&(t=s,n=this.cm.charCoords({line:i,ch:o}),this.colorpicker.show({left:n.left,top:n.bottom,isShortCut:e.isShortCut||!1,hideDelay:this.opt.hideDelay||2e3},a||s,(function(e){r.cm.replaceRange(e,{line:i,ch:o},{line:i,ch:o+t.length},"*colorpicker"),r.cm.focus(),t=e})))}},{key:"close_color_picker",value:function(){this.colorpicker&&this.colorpicker.hide()}},{key:"hide_delay_color_picker",value:function(){this.colorpicker&&this.colorpicker.runHideDelay()}},{key:"key",value:function(e,t){return[e,t].join(":")}},{key:"keyup",value:function(e){!this.colorpicker||"Escape"!=e.key&&0!=this.colorpicker.isShortCut||this.colorpicker.hide()}},{key:"init_color_update",value:function(){this.markers={}}},{key:"style_color_update",value:function(e){if(e)this.match(e);else for(var t=this.cm.lineCount(),n=0;n<t;n++)this.match(n)}},{key:"empty_marker",value:function(e,t){for(var n,r=t.markedSpans||[],i=0,o=r.length;i<o;i++){var a=this.key(e,r[i].from);a&&(n=r[i].marker.replacedWith,_r,n&&n.className&&-1<(" "+n.className+" ").indexOf(" codemirror-colorview "))&&(delete this.markers[a],r[i].marker.clear())}}},{key:"match_result",value:function(e){return Lt.matches(e.text)}},{key:"submatch",value:function(e,t){var n=this,r=(this.empty_marker(e,t),this.match_result(t)),i={next:0};r.forEach((function(r){n.render(i,e,t,r.color,r.nameColor)}))}},{key:"match",value:function(e){var t=this.cm.getLineHandle(e),n=this;this.cm.operation((function(){n.submatch(e,t)}))}},{key:"make_element",value:function(){var e=document.createElement("div");return e.className=_r,this.is_edit_mode()?e.title="open color picker":e.title="",e.back_element=this.make_background_element(),e.appendChild(e.back_element),e}},{key:"make_background_element",value:function(){var e=document.createElement("div");return e.className=Or,e}},{key:"set_state",value:function(e,t,n,r){var i=this.create_marker(e,t);return i.lineNo=e,i.ch=t,i.color=n,i.nameColor=r,i}},{key:"create_marker",value:function(e,t){return this.has_marker(e,t)||this.init_marker(e,t),this.get_marker(e,t)}},{key:"init_marker",value:function(e,t){this.markers[this.key(e,t)]=this.make_element()}},{key:"has_marker",value:function(e,t){return!!this.get_marker(e,t)}},{key:"get_marker",value:function(e,t){return e=this.key(e,t),this.markers[e]}},{key:"update_element",value:function(e,t){e.back_element.style.backgroundColor=t}},{key:"set_mark",value:function(e,t,n){this.cm.setBookmark({line:e,ch:t},{widget:n,handleMouseEvents:!0})}},{key:"is_excluded_token",value:function(e,t){return t=(e=this.cm.getTokenAt({line:e,ch:t},!0)).type,e=e.state.state,null==t&&"block"==e||null==t&&"top"==e||this.excluded_token.includes(t)}},{key:"render",value:function(e,t,n,r,i){n=n.text.indexOf(r,e.next),!0===this.is_excluded_token(t,n+1)?e.next=n+r.length:(e.next=n+r.length,this.has_marker(t,n)?(this.update_element(this.create_marker(t,n),i||r),this.set_state(t,n,r,i)):(e=this.create_marker(t,n),this.update_element(e,i||r),this.set_state(t,n,r,i||r),this.set_mark(t,n,e)))}}]);var Pr=Lr;function Lr(e,t){v(this,Lr),t="boolean"==typeof t?{mode:"edit"}:Object.assign({mode:"edit"},t||{}),this.opt=t,this.cm=e,this.markers={},this.excluded_token=this.opt.excluded_token||Tr,this.opt.colorpicker?this.colorpicker=this.opt.colorpicker(this.opt):this.colorpicker=Sr.create(this.opt),this.init_event()}try{var Ur=n(!function(){var e=new Error("Cannot find module 'codemirror'");throw e.code="MODULE_NOT_FOUND",e}())}catch(y){}function zr(){var e=Ur||window.CodeMirror;e&&e.defineOption("colorpicker",!1,(function(t,n,r){r&&r!=e.Init&&t.state.colorpicker&&(t.state.colorpicker.destroy(),t.state.colorpicker=null),n&&(t.state.colorpicker=new Pr(t,n))}))}return zr(),S({},d,Sr,{load:zr})},"object"===i(t)&&void 0!==e?e.exports=r():void 0!==(t="function"==typeof(r=r)?r.call(t,n,t,e):r)&&(e.exports=t)},function(e,t,n){"use strict";n.d(t,"a",(function(){return E}));
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

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

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function o(e,t){var n=e[0];e=e[1];return[n*Math.cos(t)-e*Math.sin(t),n*Math.sin(t)+e*Math.cos(t)]}function a(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0;n<e.length;n++)if("number"!=typeof e[n])throw new Error("assertNumbers arguments["+n+"] is not a number. "+typeof e[n]+" == typeof "+e[n])}var s=Math.PI;function u(e,t,n){e.lArcFlag=0===e.lArcFlag?0:1,e.sweepFlag=0===e.sweepFlag?0:1;var r=e.rX,i=e.rY,a=e.x,u=e.y,c=(r=Math.abs(e.rX),i=Math.abs(e.rY),(l=o([(t-a)/2,(n-u)/2],-e.xRot/180*s))[0]),l=l[1],h=(1<(h=Math.pow(c,2)/Math.pow(r,2)+Math.pow(l,2)/Math.pow(i,2))&&(r*=Math.sqrt(h),i*=Math.sqrt(h)),e.rX=r,e.rY=i,Math.pow(r,2)*Math.pow(l,2)+Math.pow(i,2)*Math.pow(c,2)),f=r*l/i*(h=(e.lArcFlag!==e.sweepFlag?1:-1)*Math.sqrt(Math.max(0,(Math.pow(r,2)*Math.pow(i,2)-h)/h))),d=o([f,h=-i*c/r*h],e.xRot/180*s);e.cX=d[0]+(t+a)/2,e.cY=d[1]+(n+u)/2,e.phi1=Math.atan2((l-h)/i,(c-f)/r),e.phi2=Math.atan2((-l-h)/i,(-c-f)/r),0===e.sweepFlag&&e.phi2>e.phi1&&(e.phi2-=2*s),1===e.sweepFlag&&e.phi2<e.phi1&&(e.phi2+=2*s),e.phi1*=180/s,e.phi2*=180/s}function c(e,t,n){a(e,t,n);var r=e*e+t*t-n*n;return r<0?[]:0==r?[[e*n/(e*e+t*t),t*n/(e*e+t*t)]]:[[(e*n+t*(r=Math.sqrt(r)))/(e*e+t*t),(t*n-e*r)/(e*e+t*t)],[(e*n-t*r)/(e*e+t*t),(t*n+e*r)/(e*e+t*t)]]}var l,h=Math.PI/180;function f(e,t,n){return(1-n)*e+n*t}function d(e,t,n,r){return e+Math.cos(r/180*s)*t+Math.sin(r/180*s)*n}function p(e,t,n,r){var i=1e-6;r=3*(e=t-e)+3*(r-n)-6*(t=n-t),n=6*(t-e),t=3*e;return Math.abs(r)<1e-6?[-t/n]:(e=1e-6,(t=(n/=r)*n/4-t/r)<-(e=i)?[]:t<=e?[-n/2]:[-n/2-(e=Math.sqrt(t)),-n/2+e])}function m(e,t,n,r,i){var o=1-i;return e*(o*o*o)+t*(3*o*o*i)+n*(3*o*i*i)+r*(i*i*i)}function g(){return b((function(e,t,n){return e.relative&&(void 0!==e.x1&&(e.x1+=t),void 0!==e.y1&&(e.y1+=n),void 0!==e.x2&&(e.x2+=t),void 0!==e.y2&&(e.y2+=n),void 0!==e.x&&(e.x+=t),void 0!==e.y&&(e.y+=n),e.relative=!1),e}))}function A(){var e=NaN,t=NaN,n=NaN,r=NaN;return b((function(i,o,a){return i.type&E.SMOOTH_CURVE_TO&&(i.type=E.CURVE_TO,e=isNaN(e)?o:e,t=isNaN(t)?a:t,i.x1=i.relative?o-e:2*o-e,i.y1=i.relative?a-t:2*a-t),t=i.type&E.CURVE_TO?(e=i.relative?o+i.x2:i.x2,i.relative?a+i.y2:i.y2):e=NaN,i.type&E.SMOOTH_QUAD_TO&&(i.type=E.QUAD_TO,n=isNaN(n)?o:n,r=isNaN(r)?a:r,i.x1=i.relative?o-n:2*o-n,i.y1=i.relative?a-r:2*a-r),r=i.type&E.QUAD_TO?(n=i.relative?o+i.x1:i.x1,i.relative?a+i.y1:i.y1):n=NaN,i}))}function v(){var e=NaN,t=NaN;return b((function(n,r,i){var o,a;return n.type&E.SMOOTH_QUAD_TO&&(n.type=E.QUAD_TO,e=isNaN(e)?r:e,t=isNaN(t)?i:t,n.x1=n.relative?r-e:2*r-e,n.y1=n.relative?i-t:2*i-t),n.type&E.QUAD_TO?(e=n.relative?r+n.x1:n.x1,t=n.relative?i+n.y1:n.y1,o=n.x1,a=n.y1,n.type=E.CURVE_TO,n.x1=((n.relative?0:r)+2*o)/3,n.y1=((n.relative?0:i)+2*a)/3,n.x2=(n.x+2*o)/3,n.y2=(n.y+2*a)/3):t=e=NaN,n}))}function b(e){var t=0,n=0,r=NaN,i=NaN;return function(o){var a;if(!isNaN(r)||o.type&E.MOVE_TO)return a=e(o,t,n,r,i),o.type&E.CLOSE_PATH&&(t=r,n=i),void 0!==o.x&&(t=o.relative?t+o.x:o.x),void 0!==o.y&&(n=o.relative?n+o.y:o.y),o.type&E.MOVE_TO&&(r=t,i=n),a;throw new Error("path must start with moveto")}}function y(e,t,n,r,i,o){return a(e,t,n,r,i,o),b((function(a,s,u,c){var l=a.x1,h=a.x2,f=(c=a.relative&&!isNaN(c),void 0!==a.x?a.x:c?0:s),d=void 0!==a.y?a.y:c?0:u;function p(e){return e*e}return a.type&E.HORIZ_LINE_TO&&0!==t&&(a.type=E.LINE_TO,a.y=a.relative?0:u),a.type&E.VERT_LINE_TO&&0!==n&&(a.type=E.LINE_TO,a.x=a.relative?0:s),void 0!==a.x&&(a.x=a.x*e+d*n+(c?0:i)),void 0!==a.y&&(a.y=f*t+a.y*r+(c?0:o)),void 0!==a.x1&&(a.x1=a.x1*e+a.y1*n+(c?0:i)),void 0!==a.y1&&(a.y1=l*t+a.y1*r+(c?0:o)),void 0!==a.x2&&(a.x2=a.x2*e+a.y2*n+(c?0:i)),void 0!==a.y2&&(a.y2=h*t+a.y2*r+(c?0:o)),u=e*r-t*n,void 0===a.xRot||1===e&&0===t&&0===n&&1===r||(0==u?(delete a.rX,delete a.rY,delete a.xRot,delete a.lArcFlag,delete a.sweepFlag,a.type=E.LINE_TO):(s=a.xRot*Math.PI/180,d=Math.sin(s),f=Math.cos(s),l=1/p(a.rX),h=1/p(a.rY),c=p(f)*l+p(d)*h,s=p(d)*l+p(f)*h,f=c*r*r-(d=2*d*f*(l-h))*t*r+s*t*t,l=d*(e*r+t*n)-2*(c*n*r+s*e*t),h=c*n*n-d*e*n+s*e*e,c=(Math.atan2(l,f-h)+Math.PI)%Math.PI/2,d=Math.sin(c),s=Math.cos(c),a.rX=Math.abs(u)/Math.sqrt(f*p(s)+l*d*s+h*p(d)),a.rY=Math.abs(u)/Math.sqrt(f*p(d)-l*d*s+h*p(s)),a.xRot=180*c/Math.PI)),void 0!==a.sweepFlag&&u<0&&(a.sweepFlag=+!a.sweepFlag),a}))}function w(e){return"0".charCodeAt(0)<=e.charCodeAt(0)&&e.charCodeAt(0)<="9".charCodeAt(0)}(n=l=l||{}).ROUND=function(e){function t(t){return Math.round(t*e)/e}return a(e=void 0===e?1e13:e),function(e){return void 0!==e.x1&&(e.x1=t(e.x1)),void 0!==e.y1&&(e.y1=t(e.y1)),void 0!==e.x2&&(e.x2=t(e.x2)),void 0!==e.y2&&(e.y2=t(e.y2)),void 0!==e.x&&(e.x=t(e.x)),void 0!==e.y&&(e.y=t(e.y)),void 0!==e.rX&&(e.rX=t(e.rX)),void 0!==e.rY&&(e.rY=t(e.rY)),e}},n.TO_ABS=g,n.TO_REL=function(){return b((function(e,t,n){return e.relative||(void 0!==e.x1&&(e.x1-=t),void 0!==e.y1&&(e.y1-=n),void 0!==e.x2&&(e.x2-=t),void 0!==e.y2&&(e.y2-=n),void 0!==e.x&&(e.x-=t),void 0!==e.y&&(e.y-=n),e.relative=!0),e}))},n.NORMALIZE_HVZ=function(e,t,n){return void 0===e&&(e=!0),void 0===t&&(t=!0),void 0===n&&(n=!0),b((function(r,i,o,a,s){if(!isNaN(a)||r.type&E.MOVE_TO)return t&&r.type&E.HORIZ_LINE_TO&&(r.type=E.LINE_TO,r.y=r.relative?0:o),n&&r.type&E.VERT_LINE_TO&&(r.type=E.LINE_TO,r.x=r.relative?0:i),e&&r.type&E.CLOSE_PATH&&(r.type=E.LINE_TO,r.x=r.relative?a-i:a,r.y=r.relative?s-o:s),r.type&E.ARC&&(0===r.rX||0===r.rY)&&(r.type=E.LINE_TO,delete r.rX,delete r.rY,delete r.xRot,delete r.lArcFlag,delete r.sweepFlag),r;throw new Error("path must start with moveto")}))},n.NORMALIZE_ST=A,n.QT_TO_C=v,n.INFO=b,n.SANITIZE=function(e){a(e=void 0===e?0:e);var t=NaN,n=NaN,r=NaN,i=NaN;return b((function(o,a,s,u,c){var l,h,f,d,p=Math.abs,m=!1,g=0,A=0;return o.type&E.SMOOTH_CURVE_TO&&(g=isNaN(t)?0:a-t,A=isNaN(n)?0:s-n),n=o.type&(E.CURVE_TO|E.SMOOTH_CURVE_TO)?(t=o.relative?a+o.x2:o.x2,o.relative?s+o.y2:o.y2):t=NaN,i=o.type&E.SMOOTH_QUAD_TO?(r=isNaN(r)?a:2*a-r,isNaN(i)?s:2*s-i):o.type&E.QUAD_TO?(r=o.relative?a+o.x1:o.x1,o.relative?s+o.y1:o.y2):r=NaN,(o.type&E.LINE_COMMANDS||o.type&E.ARC&&(0===o.rX||0===o.rY||!o.lArcFlag)||o.type&E.CURVE_TO||o.type&E.SMOOTH_CURVE_TO||o.type&E.QUAD_TO||o.type&E.SMOOTH_QUAD_TO)&&(l=void 0===o.x?0:o.relative?o.x:o.x-a,h=void 0===o.y?0:o.relative?o.y:o.y-s,g=isNaN(r)?void 0===o.x1?g:o.relative?o.x:o.x1-a:r-a,A=isNaN(i)?void 0===o.y1?A:o.relative?o.y:o.y1-s:i-s,f=void 0===o.x2?0:o.relative?o.x:o.x2-a,d=void 0===o.y2?0:o.relative?o.y:o.y2-s,p(l)<=e&&p(h)<=e&&p(g)<=e&&p(A)<=e&&p(f)<=e&&p(d)<=e&&(m=!0)),(m=!!(o.type&E.CLOSE_PATH&&p(a-u)<=e&&p(s-c)<=e)||m)?[]:o}))},n.MATRIX=y,n.ROTATE=function(e,t,n){a(e,t=void 0===t?0:t,n=void 0===n?0:n);var r=Math.sin(e);return y(e=Math.cos(e),r,-r,e,t-t*e+n*r,n-t*r-n*e)},n.TRANSLATE=function(e,t){return a(e,t=void 0===t?0:t),y(1,0,0,1,e,t)},n.SCALE=function(e,t){return a(e,t=void 0===t?e:t),y(e,0,0,t,0,0)},n.SKEW_X=function(e){return a(e),y(1,0,Math.atan(e),1,0,0)},n.SKEW_Y=function(e){return a(e),y(1,Math.atan(e),0,1,0,0)},n.X_AXIS_SYMMETRY=function(e){return a(e=void 0===e?0:e),y(-1,0,0,1,e,0)},n.Y_AXIS_SYMMETRY=function(e){return a(e=void 0===e?0:e),y(1,0,0,-1,0,e)},n.A_TO_C=function(){return b((function(e,t,n){if(E.ARC!==e.type)return e;var r=e;t=e.relative?0:t,e=e.relative?0:n;r.cX||u(r,t,e);n=Math.min(r.phi1,r.phi2),n=Math.max(r.phi1,r.phi2)-n;for(var i=Math.ceil(n/90),a=new Array(i),s=t,c=e,l=0;l<i;l++){var d=f(r.phi1,r.phi2,l/i),p=f(r.phi1,r.phi2,(l+1)/i),m=4/3*Math.tan((p-d)*h/4),g=(d=[Math.cos(d*h)-m*Math.sin(d*h),Math.sin(d*h)+m*Math.cos(d*h)])[0],A=(d=d[1],(v=[Math.cos(p*h),Math.sin(p*h)])[0]),v=v[1],b=(p=(m=[A+m*Math.sin(p*h),v-m*Math.cos(p*h)])[0],m=m[1],a[l]={relative:r.relative,type:E.CURVE_TO},function(e,t){return t=(e=o([e*r.rX,t*r.rY],r.xRot))[0],e=e[1],[r.cX+t,r.cY+e]});g=b(g,d);a[l].x1=g[0],a[l].y1=g[1],d=b(p,m),a[l].x2=d[0],a[l].y2=d[1],g=b(A,v),a[l].x=g[0],a[l].y=g[1],r.relative&&(a[l].x1-=s,a[l].y1-=c,a[l].x2-=s,a[l].y2-=c,a[l].x-=s,a[l].y-=c),s=(p=[a[l].x,a[l].y])[0],c=p[1]}return a}))},n.ANNOTATE_ARCS=function(){return b((function(e,t,n){return e.relative&&(n=t=0),E.ARC===e.type&&u(e,t,n),e}))},n.CLONE=function(){return function(e){var t,n={};for(t in e)n[t]=e[t];return n}},n.CALCULATE_BOUNDS=function(){var e=g(),t=v(),n=A(),r=b((function(i,o,a){var s=n(t(e(function(e){var t,n={};for(t in e)n[t]=e[t];return n}(i))));function l(e){e>r.maxX&&(r.maxX=e),e<r.minX&&(r.minX=e)}function h(e){e>r.maxY&&(r.maxY=e),e<r.minY&&(r.minY=e)}if(s.type&E.DRAWING_COMMANDS&&(l(o),h(a)),s.type&E.HORIZ_LINE_TO&&l(s.x),s.type&E.VERT_LINE_TO&&h(s.y),s.type&E.LINE_TO&&(l(s.x),h(s.y)),s.type&E.CURVE_TO){l(s.x),h(s.y);for(var f=0,g=p(o,s.x1,s.x2,s.x);f<g.length;f++)0<(T=g[f])&&T<1&&l(m(o,s.x1,s.x2,s.x,T));for(var A=0,v=p(a,s.y1,s.y2,s.y);A<v.length;A++)0<(T=v[A])&&T<1&&h(m(a,s.y1,s.y2,s.y,T))}if(s.type&E.ARC){l(s.x),h(s.y),u(s,o,a);for(var b=s.xRot/180*Math.PI,y=Math.cos(b)*s.rX,w=Math.sin(b)*s.rX,x=-Math.sin(b)*s.rY,C=Math.cos(b)*s.rY,k=(b=s.phi1<s.phi2?[s.phi1,s.phi2]:s.phi2<-180?[s.phi2+360,s.phi1+360]:[s.phi2,s.phi1])[0],S=b[1],_=(b=function(e){var t=e[0];e=e[1];return(e=180*Math.atan2(e,t)/Math.PI)<k?360+e:e},0),O=c(x,-y,0).map(b);_<O.length;_++)(T=O[_])>k&&T<S&&l(d(s.cX,y,x,T));for(var T,D=0,B=c(C,-w,0).map(b);D<B.length;D++)(T=B[D])>k&&T<S&&h(d(s.cY,w,C,T))}return i}));return r.minX=1/0,r.maxX=-1/0,r.minY=1/0,r.maxY=-1/0,r},T.prototype.round=function(e){return this.transform(l.ROUND(e))},T.prototype.toAbs=function(){return this.transform(l.TO_ABS())},T.prototype.toRel=function(){return this.transform(l.TO_REL())},T.prototype.normalizeHVZ=function(e,t,n){return this.transform(l.NORMALIZE_HVZ(e,t,n))},T.prototype.normalizeST=function(){return this.transform(l.NORMALIZE_ST())},T.prototype.qtToC=function(){return this.transform(l.QT_TO_C())},T.prototype.aToC=function(){return this.transform(l.A_TO_C())},T.prototype.sanitize=function(e){return this.transform(l.SANITIZE(e))},T.prototype.translate=function(e,t){return this.transform(l.TRANSLATE(e,t))},T.prototype.scale=function(e,t){return this.transform(l.SCALE(e,t))},T.prototype.rotate=function(e,t,n){return this.transform(l.ROTATE(e,t,n))},T.prototype.matrix=function(e,t,n,r,i,o){return this.transform(l.MATRIX(e,t,n,r,i,o))},T.prototype.skewX=function(e){return this.transform(l.SKEW_X(e))},T.prototype.skewY=function(e){return this.transform(l.SKEW_Y(e))},T.prototype.xSymmetry=function(e){return this.transform(l.X_AXIS_SYMMETRY(e))},T.prototype.ySymmetry=function(e){return this.transform(l.Y_AXIS_SYMMETRY(e))},T.prototype.annotateArcs=function(){return this.transform(l.ANNOTATE_ARCS())};var x,C,k=(i(O,C=t=T),O.prototype.finish=function(e){if(this.parse(" ",e=void 0===e?[]:e),0===this.curArgs.length&&this.canParseCommandOrComma)return e;throw new SyntaxError("Unterminated command at the path end.")},O.prototype.parse=function(e,t){var n=this;void 0===t&&(t=[]);for(var r=function(e){t.push(e),n.curArgs.length=0,n.canParseCommandOrComma=!0},i=0;i<e.length;i++){var o=e[i],a=!(this.curCommandType!==E.ARC||3!==this.curArgs.length&&4!==this.curArgs.length||1!==this.curNumber.length||"0"!==this.curNumber&&"1"!==this.curNumber),s=w(o)&&("0"===this.curNumber&&"0"===o||a);if(!w(o)||s)if("e"!==o&&"E"!==o)if("-"!==o&&"+"!==o||!this.curNumberHasExp||this.curNumberHasExpDigits)if("."!==o||this.curNumberHasExp||this.curNumberHasDecimal||a){if(this.curNumber&&-1!==this.curCommandType){a=Number(this.curNumber);if(isNaN(a))throw new SyntaxError("Invalid number ending at "+i);if(this.curCommandType===E.ARC)if(0===this.curArgs.length||1===this.curArgs.length){if(a<0)throw new SyntaxError('Expected positive number, got "'+a+'" at index "'+i+'"')}else if((3===this.curArgs.length||4===this.curArgs.length)&&"0"!==this.curNumber&&"1"!==this.curNumber)throw new SyntaxError('Expected a flag, got "'+this.curNumber+'" at index "'+i+'"');this.curArgs.push(a),this.curArgs.length===S[this.curCommandType]&&(E.HORIZ_LINE_TO===this.curCommandType?r({type:E.HORIZ_LINE_TO,relative:this.curCommandRelative,x:a}):E.VERT_LINE_TO===this.curCommandType?r({type:E.VERT_LINE_TO,relative:this.curCommandRelative,y:a}):this.curCommandType===E.MOVE_TO||this.curCommandType===E.LINE_TO||this.curCommandType===E.SMOOTH_QUAD_TO?(r({type:this.curCommandType,relative:this.curCommandRelative,x:this.curArgs[0],y:this.curArgs[1]}),E.MOVE_TO===this.curCommandType&&(this.curCommandType=E.LINE_TO)):this.curCommandType===E.CURVE_TO?r({type:E.CURVE_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x2:this.curArgs[2],y2:this.curArgs[3],x:this.curArgs[4],y:this.curArgs[5]}):this.curCommandType===E.SMOOTH_CURVE_TO?r({type:E.SMOOTH_CURVE_TO,relative:this.curCommandRelative,x2:this.curArgs[0],y2:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===E.QUAD_TO?r({type:E.QUAD_TO,relative:this.curCommandRelative,x1:this.curArgs[0],y1:this.curArgs[1],x:this.curArgs[2],y:this.curArgs[3]}):this.curCommandType===E.ARC&&r({type:E.ARC,relative:this.curCommandRelative,rX:this.curArgs[0],rY:this.curArgs[1],xRot:this.curArgs[2],lArcFlag:this.curArgs[3],sweepFlag:this.curArgs[4],x:this.curArgs[5],y:this.curArgs[6]})),this.curNumber="",this.curNumberHasExpDigits=!1,this.curNumberHasExp=!1,this.curNumberHasDecimal=!1,this.canParseCommandOrComma=!0}if(" "!==(a=o)&&"\t"!==a&&"\r"!==a&&"\n"!==a)if(","===o&&this.canParseCommandOrComma)this.canParseCommandOrComma=!1;else if("+"!==o&&"-"!==o&&"."!==o)if(s)this.curNumber=o,this.curNumberHasDecimal=!1;else{if(0!==this.curArgs.length)throw new SyntaxError("Unterminated command at index "+i+".");if(!this.canParseCommandOrComma)throw new SyntaxError('Unexpected character "'+o+'" at index '+i+". Command cannot follow comma");if(this.canParseCommandOrComma=!1,"z"!==o&&"Z"!==o)if("h"===o||"H"===o)this.curCommandType=E.HORIZ_LINE_TO,this.curCommandRelative="h"===o;else if("v"===o||"V"===o)this.curCommandType=E.VERT_LINE_TO,this.curCommandRelative="v"===o;else if("m"===o||"M"===o)this.curCommandType=E.MOVE_TO,this.curCommandRelative="m"===o;else if("l"===o||"L"===o)this.curCommandType=E.LINE_TO,this.curCommandRelative="l"===o;else if("c"===o||"C"===o)this.curCommandType=E.CURVE_TO,this.curCommandRelative="c"===o;else if("s"===o||"S"===o)this.curCommandType=E.SMOOTH_CURVE_TO,this.curCommandRelative="s"===o;else if("q"===o||"Q"===o)this.curCommandType=E.QUAD_TO,this.curCommandRelative="q"===o;else if("t"===o||"T"===o)this.curCommandType=E.SMOOTH_QUAD_TO,this.curCommandRelative="t"===o;else{if("a"!==o&&"A"!==o)throw new SyntaxError('Unexpected character "'+o+'" at index '+i+".");this.curCommandType=E.ARC,this.curCommandRelative="a"===o}else t.push({type:E.CLOSE_PATH}),this.canParseCommandOrComma=!0,this.curCommandType=-1}else this.curNumber=o,this.curNumberHasDecimal="."===o}else this.curNumber+=o,this.curNumberHasDecimal=!0;else this.curNumber+=o;else this.curNumber+=o,this.curNumberHasExp=!0;else this.curNumber+=o,this.curNumberHasExpDigits=this.curNumberHasExp}return t},O.prototype.transform=function(e){return Object.create(this,{parse:{value:function(t,n){void 0===n&&(n=[]);for(var r=0,i=Object.getPrototypeOf(this).parse.call(this,t);r<i.length;r++){var o=i[r];o=e(o);Array.isArray(o)?n.push.apply(n,o):n.push(o)}return n}}})},O),E=(i(_,x=t),_.prototype.encode=function(){return _.encode(this.commands)},_.prototype.getBounds=function(){var e=l.CALCULATE_BOUNDS();return this.transform(e),e},_.prototype.transform=function(e){for(var t=[],n=0,r=this.commands;n<r.length;n++){var i=e(r[n]);Array.isArray(i)?t.push.apply(t,i):t.push(i)}return this.commands=t,this},_.encode=function(e){var t=e,n="";Array.isArray(t)||(t=[t]);for(var r=0;r<t.length;r++){var i=t[r];if(i.type===E.CLOSE_PATH)n+="z";else if(i.type===E.HORIZ_LINE_TO)n+=(i.relative?"h":"H")+i.x;else if(i.type===E.VERT_LINE_TO)n+=(i.relative?"v":"V")+i.y;else if(i.type===E.MOVE_TO)n+=(i.relative?"m":"M")+i.x+" "+i.y;else if(i.type===E.LINE_TO)n+=(i.relative?"l":"L")+i.x+" "+i.y;else if(i.type===E.CURVE_TO)n+=(i.relative?"c":"C")+i.x1+" "+i.y1+" "+i.x2+" "+i.y2+" "+i.x+" "+i.y;else if(i.type===E.SMOOTH_CURVE_TO)n+=(i.relative?"s":"S")+i.x2+" "+i.y2+" "+i.x+" "+i.y;else if(i.type===E.QUAD_TO)n+=(i.relative?"q":"Q")+i.x1+" "+i.y1+" "+i.x+" "+i.y;else if(i.type===E.SMOOTH_QUAD_TO)n+=(i.relative?"t":"T")+i.x+" "+i.y;else{if(i.type!==E.ARC)throw new Error('Unexpected command type "'+i.type+'" at index '+r+".");n+=(i.relative?"a":"A")+i.rX+" "+i.rY+" "+i.xRot+" "+ +i.lArcFlag+" "+ +i.sweepFlag+" "+i.x+" "+i.y}}return n},_.parse=function(e){var t=new k,n=[];return t.parse(e,n),t.finish(n),n},_.CLOSE_PATH=1,_.MOVE_TO=2,_.HORIZ_LINE_TO=4,_.VERT_LINE_TO=8,_.LINE_TO=16,_.CURVE_TO=32,_.SMOOTH_CURVE_TO=64,_.QUAD_TO=128,_.SMOOTH_QUAD_TO=256,_.ARC=512,_.LINE_COMMANDS=_.LINE_TO|_.HORIZ_LINE_TO|_.VERT_LINE_TO,_.DRAWING_COMMANDS=_.HORIZ_LINE_TO|_.VERT_LINE_TO|_.LINE_TO|_.CURVE_TO|_.SMOOTH_CURVE_TO|_.QUAD_TO|_.SMOOTH_QUAD_TO|_.ARC,_),S=((n={})[E.MOVE_TO]=2,n[E.LINE_TO]=2,n[E.HORIZ_LINE_TO]=1,n[E.VERT_LINE_TO]=1,n[E.CLOSE_PATH]=0,n[E.QUAD_TO]=4,n[E.SMOOTH_QUAD_TO]=2,n[E.CURVE_TO]=6,n[E.SMOOTH_CURVE_TO]=4,n[E.ARC]=7,n);function _(e){var t=x.call(this)||this;return t.commands="string"==typeof e?_.parse(e):e,t}function O(){var e=C.call(this)||this;return e.curNumber="",e.curCommandType=-1,e.curCommandRelative=!1,e.canParseCommandOrComma=!0,e.curNumberHasExp=!1,e.curNumberHasExpDigits=!1,e.curNumberHasDecimal=!1,e.curArgs=[],e}function T(){}},function(e,t){t.getArg=function(e,t,n){if(t in e)return e[t];if(3===arguments.length)return n;throw new Error('"'+t+'" is a required argument.')};var n=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,r=/^data:.+\,.+$/;function i(e){return(e=e.match(n))?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}function o(e){var t="";return e.scheme&&(t+=e.scheme+":"),t+="//",e.auth&&(t+=e.auth+"@"),e.host&&(t+=e.host),e.port&&(t+=":"+e.port),e.path&&(t+=e.path),t}function a(e){var n=e,r=i(e);if(r){if(!r.path)return e;n=r.path}e=t.isAbsolute(n);for(var a,s=n.split(/\/+/),u=0,c=s.length-1;0<=c;c--)"."===(a=s[c])?s.splice(c,1):".."===a?u++:0<u&&(""===a?(s.splice(c+1,u),u=0):(s.splice(c,2),u--));return""===(n=s.join("/"))&&(n=e?"/":"."),r?(r.path=n,o(r)):n}function s(e,t){""===e&&(e=".");var n=i(t=""===t?".":t),s=i(e);return s&&(e=s.path||"/"),n&&!n.scheme?(s&&(n.scheme=s.scheme),o(n)):n||t.match(r)?t:!s||s.host||s.path?(n="/"===t.charAt(0)?t:a(e.replace(/\/+$/,"")+"/"+t),s?(s.path=n,o(s)):n):(s.host=t,o(s))}t.urlParse=i,t.urlGenerate=o,t.normalize=a,t.join=s,t.isAbsolute=function(e){return"/"===e.charAt(0)||n.test(e)},t.relative=function(e,t){e=(e=""===e?".":e).replace(/\/$/,"");for(var n=0;0!==t.indexOf(e+"/");){var r=e.lastIndexOf("/");if(r<0)return t;if((e=e.slice(0,r)).match(/^([^\/]+:\/)?\/*$/))return t;++n}return Array(n+1).join("../")+t.substr(e.length+1)};var u=!("__proto__"in Object.create(null));function c(e){return e}function l(e){if(e){var t=e.length;if(!(t<9)&&95===e.charCodeAt(t-1)&&95===e.charCodeAt(t-2)&&111===e.charCodeAt(t-3)&&116===e.charCodeAt(t-4)&&111===e.charCodeAt(t-5)&&114===e.charCodeAt(t-6)&&112===e.charCodeAt(t-7)&&95===e.charCodeAt(t-8)&&95===e.charCodeAt(t-9)){for(var n=t-10;0<=n;n--)if(36!==e.charCodeAt(n))return;return 1}}}function h(e,t){return e===t?0:null===e||null!==t&&t<e?1:-1}t.toSetString=u?c:function(e){return l(e)?"$"+e:e},t.fromSetString=u?c:function(e){return l(e)?e.slice(1):e},t.compareByOriginalPositions=function(e,t,n){var r=h(e.source,t.source);return 0!==r||0!=(r=e.originalLine-t.originalLine)||0!=(r=e.originalColumn-t.originalColumn)||n||0!=(r=e.generatedColumn-t.generatedColumn)||0!=(r=e.generatedLine-t.generatedLine)?r:h(e.name,t.name)},t.compareByGeneratedPositionsDeflated=function(e,t,n){var r=e.generatedLine-t.generatedLine;return 0!==r||0!=(r=e.generatedColumn-t.generatedColumn)||n||0!==(r=h(e.source,t.source))||0!=(r=e.originalLine-t.originalLine)||0!=(r=e.originalColumn-t.originalColumn)?r:h(e.name,t.name)},t.compareByGeneratedPositionsInflated=function(e,t){var n=e.generatedLine-t.generatedLine;return 0!==n||0!=(n=e.generatedColumn-t.generatedColumn)||0!==(n=h(e.source,t.source))||0!=(n=e.originalLine-t.originalLine)||0!=(n=e.originalColumn-t.originalColumn)?n:h(e.name,t.name)},t.parseSourceMapInput=function(e){return JSON.parse(e.replace(/^\)]}'[^\n]*\n/,""))},t.computeSourceURL=function(e,t,n){if(t=t||"",e&&("/"!==e[e.length-1]&&"/"!==t[0]&&(e+="/"),t=e+t),n){if(!(e=i(n)))throw new Error("sourceMapURL could not be parsed");!e.path||0<=(n=e.path.lastIndexOf("/"))&&(e.path=e.path.substring(0,n+1)),t=s(o(e),t)}return a(t)}},function(e,t,n){"use strict";var r;function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}Object.defineProperty(t,"__esModule",{value:!0}),t.SET_A=0,t.SET_B=1,t.SET_C=2,t.SHIFT=98,t.START_A=103,t.START_B=104,t.START_C=105,t.MODULO=103,t.STOP=106,t.FNC1=207,t.SET_BY_CODE=(i(r={},103,0),i(r,104,1),i(r,105,2),r),t.SWAP={101:0,100:1,99:2},t.A_START_CHAR=String.fromCharCode(208),t.B_START_CHAR=String.fromCharCode(209),t.C_START_CHAR=String.fromCharCode(210),t.A_CHARS="[\0-_È-Ï]",t.B_CHARS="[ -È-Ï]",t.C_CHARS="(Ï*[0-9]{2}Ï*)",t.BARS=[11011001100,11001101100,11001100110,10010011e3,10010001100,10001001100,10011001e3,10011000100,10001100100,11001001e3,11001000100,11000100100,10110011100,10011011100,10011001110,10111001100,10011101100,10011100110,11001110010,11001011100,11001001110,11011100100,11001110100,11101101110,11101001100,11100101100,11100100110,11101100100,11100110100,11100110010,11011011e3,11011000110,11000110110,10100011e3,10001011e3,10001000110,10110001e3,10001101e3,10001100010,11010001e3,11000101e3,11000100010,10110111e3,10110001110,10001101110,10111011e3,10111000110,10001110110,11101110110,11010001110,11000101110,11011101e3,11011100010,11011101110,11101011e3,11101000110,11100010110,11101101e3,11101100010,11100011010,11101111010,11001000010,11110001010,1010011e4,10100001100,1001011e4,10010000110,10000101100,10000100110,1011001e4,10110000100,1001101e4,10011000010,10000110100,10000110010,11000010010,1100101e4,11110111010,11000010100,10001111010,10100111100,10010111100,10010011110,10111100100,10011110100,10011110010,11110100100,11110010100,11110010010,11011011110,11011110110,11110110110,10101111e3,10100011110,10001011110,10111101e3,10111100010,11110101e3,11110100010,10111011110,10111101110,11101011110,11110101110,11010000100,1101001e4,11010011100,1100011101011]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SIDE_BIN="101",t.MIDDLE_BIN="01010",t.BINARIES={L:["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],G:["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"],R:["1110010","1100110","1101100","1000010","1011100","1001110","1010000","1000100","1001000","1110100"],O:["0001101","0011001","0010011","0111101","0100011","0110001","0101111","0111011","0110111","0001011"],E:["0100111","0110011","0011011","0100001","0011101","0111001","0000101","0010001","0001001","0010111"]},t.EAN2_STRUCTURE=["LL","LG","GL","GG"],t.EAN5_STRUCTURE=["GGLLL","GLGLL","GLLGL","GLLLG","LGGLL","LLGGL","LLLGG","LGLGL","LGLLG","LLGLG"],t.EAN13_STRUCTURE=["LLLLLL","LLGLGG","LLGGLG","LLGGGL","LGLLGG","LGGLLG","LGGGLL","LGLGLG","LGLGGL","LGGLGL"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(159);t.default=function(e,t,n){var i,o=e.split("").map((function(e,n){return r.BINARIES[t[n]]})).map((function(t,n){return t?t[e[n]]:""}));return n&&(i=e.length-1,o=o.map((function(e,t){return t<i?e+n:e}))),o.join("")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e};function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}n=function(e){var t=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);function n(e,t){if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");e=(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t);if(this)return!e||"object"!=typeof e&&"function"!=typeof e?this:e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e),r(n,[{key:"encode",value:function(){for(var e="110",t=0;t<this.data.length;t++)for(var n=function(e,t){for(var n=0;n<t;n++)e="0"+e;return e}(n=parseInt(this.data[t]).toString(2),4-n.length),r=0;r<n.length;r++)e+="0"==n[r]?"100":"110";return{data:e+="1001",text:this.text}}},{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]+$/)}}]),n}(((n=n=n(75))&&n.__esModule?n:{default:n}).default),t.default=n},function(e,t,n){"use strict";(function(e){n(6);var t=n(175),r=n(24);
/**
 * @license
 * Copyright 2019 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */const i=Object(r.c)();i.registerFlag("DEBUG",()=>!1,e=>{}),i.registerFlag("IS_BROWSER",()=>t.isBrowser()),i.registerFlag("IS_NODE",()=>void 0!==e&&void 0!==e.versions&&void 0!==e.versions.node),i.registerFlag("IS_CHROME",()=>"undefined"!=typeof navigator&&null!=navigator&&null!=navigator.userAgent&&/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)),i.registerFlag("PROD",()=>!1),i.registerFlag("TENSORLIKE_CHECK_SHAPE_CONSISTENCY",()=>i.getBool("DEBUG")),i.registerFlag("DEPRECATION_WARNINGS_ENABLED",()=>!0),i.registerFlag("IS_TEST",()=>!1),i.registerFlag("CHECK_COMPUTATION_FOR_ERRORS",()=>!0),i.registerFlag("WRAP_TO_IMAGEBITMAP",()=>!1),i.registerFlag("CANVAS2D_WILL_READ_FREQUENTLY_FOR_GPU",()=>!1),i.registerFlag("USE_SETTIMEOUTCUSTOM",()=>!1)}).call(this,n(117))},function(e,t,n){"use strict";(function(e){
/*!
 * The buffer module from node.js, for the browser.
 *
 * @author   Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
 * @license  MIT
 */
var r=n(361),i=n(362),o=n(363);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()<t)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=u.prototype:(e=null===e?new u(t):e).length=t,e}function u(e,t,n){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(e,t,n);if("number"!=typeof e)return c(this,e,t,n);if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return h(this,e)}function c(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');if("undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer){var i=e,a=t,c=n;if(a.byteLength,c<0||a.byteLength<c)throw new RangeError("'offset' is out of bounds");if(a.byteLength<c+(r||0))throw new RangeError("'length' is out of bounds");return a=void 0===c&&void 0===r?new Uint8Array(a):void 0===r?new Uint8Array(a,c):new Uint8Array(a,c,r),u.TYPED_ARRAY_SUPPORT?(i=a).__proto__=u.prototype:i=f(i,a),i}if("string"!=typeof t){if(c=e,r=t,u.isBuffer(r))return 0!==(c=s(c,a=0|d(r.length))).length&&r.copy(c,0,0,a),c;if(r){if("undefined"!=typeof ArrayBuffer&&r.buffer instanceof ArrayBuffer||"length"in r)return"number"!=typeof r.length||function(e){return e!=e}(r.length)?s(c,0):f(c,r);if("Buffer"===r.type&&o(r.data))return f(c,r.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}if(i=e,r=t,e=n,u.isEncoding(e="string"==typeof e&&""!==e?e:"utf8"))return(r=(i=s(i,t=0|p(r,e))).write(r,e))!==t?i.slice(0,r):i;throw new TypeError('"encoding" must be a valid string encoding')}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function h(e,t){if(l(t),e=s(e,t<0?0:0|d(t)),!u.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function f(e,t){var n=t.length<0?0:0|d(t.length);e=s(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function d(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function p(e,t){if(u.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;var n=(e="string"!=typeof e?""+e:e).length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return B(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return I(e).length;default:if(r)return B(e).length;t=(""+t).toLowerCase(),r=!0}}function m(e,t,n){var i,o=!1;if((t=void 0===t||t<0?0:t)>this.length)return"";if((n=void 0===n||n>this.length?this.length:n)<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e=e||"utf8";;)switch(e){case"hex":var a=t,s=n,u=this.length;(!s||s<0||u<s)&&(s=u);for(var c="",l=a=!a||a<0?0:a;l<s;++l)c+=function(e){return e<16?"0"+e.toString(16):e.toString(16)}(this[l]);return c;case"utf8":case"utf-8":return w(this,t,n);case"ascii":u=t;var h=n,f="";h=Math.min(this.length,h);for(var d=u;d<h;++d)f+=String.fromCharCode(127&this[d]);return f;case"latin1":case"binary":a=t;var p=n,m="";p=Math.min(this.length,p);for(var g=a;g<p;++g)m+=String.fromCharCode(this[g]);return m;case"base64":return A=this,i=n,0===(v=t)&&i===A.length?r.fromByteArray(A):r.fromByteArray(A.slice(v,i));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":for(var A=t,v=n,b=this.slice(A,v),y="",x=0;x<b.length;x+=2)y+=String.fromCharCode(b[x]+256*b[x+1]);return y;default:if(o)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),o=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function A(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):2147483647<n?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,(n=(n=isNaN(n)?i?0:e.length-1:n)<0?e.length+n:n)>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=u.from(t,r)),u.isBuffer(t))return 0===t.length?-1:v(e,t,n,r,i);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?(i?Uint8Array.prototype.indexOf:Uint8Array.prototype.lastIndexOf).call(e,t,n):v(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,n,r,i){var o=1,a=e.length,s=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a/=o=2,s/=2,n/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i)for(var c=-1,l=n;l<a;l++)if(u(e,l)===u(t,-1===c?0:l-c)){if(l-(c=-1===c?l:c)+1===s)return c*o}else-1!==c&&(l-=l-c),c=-1;else for(l=n=a<n+s?a-s:n;0<=l;l--){for(var h=!0,f=0;f<s;f++)if(u(e,l+f)!==u(t,f)){h=!1;break}if(h)return l}return-1}function b(e,t,n,r){return M(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function y(e,t,n,r){return M(function(e,t){for(var n,r,i=[],o=0;o<e.length&&!((t-=2)<0);++o)n=(r=e.charCodeAt(o))>>8,r%=256,i.push(r),i.push(n);return i}(t,e.length-n),e,n,r)}function w(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,a,s,u,c=e[i],l=null,h=239<c?4:223<c?3:191<c?2:1;if(i+h<=n)switch(h){case 1:c<128&&(l=c);break;case 2:128==(192&(o=e[i+1]))&&127<(u=(31&c)<<6|63&o)&&(l=u);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&2047<(u=(15&c)<<12|(63&o)<<6|63&a)&&(u<55296||57343<u)&&(l=u);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&65535<(u=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)&&u<1114112&&(l=u)}null===l?(l=65533,h=1):65535<l&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),i+=h}var f=r,d=f.length;if(d<=x)return String.fromCharCode.apply(String,f);for(var p="",m=0;m<d;)p+=String.fromCharCode.apply(String,f.slice(m,m+=x));return p}t.Buffer=u,t.SlowBuffer=function(e){return+e!=e&&(e=0),u.alloc(+e)},t.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=a(),u.poolSize=8192,u._augment=function(e){return e.__proto__=u.prototype,e},u.from=function(e,t,n){return c(null,e,t,n)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(e,t,n){return r=null,t=t,n=n,l(e=e),e<=0||void 0===t?s(r,e):"string"==typeof n?s(r,e).fill(t,n):s(r,e).fill(t);var r},u.allocUnsafe=function(e){return h(null,e)},u.allocUnsafeSlow=function(e){return h(null,e)},u.isBuffer=function(e){return!(null==e||!e._isBuffer)},u.compare=function(e,t){if(!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},u.isEncoding=function(e){switch(String(e).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}},u.concat=function(e,t){if(!o(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);if(void 0===t)for(i=t=0;i<e.length;++i)t+=e[i].length;for(var n=u.allocUnsafe(t),r=0,i=0;i<e.length;++i){var a=e[i];if(!u.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,r),r+=a.length}return n},u.byteLength=p,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},u.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},u.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},u.prototype.toString=function(){var e=0|this.length;return 0==e?"":0===arguments.length?w(this,0,e):m.apply(this,arguments)},u.prototype.equals=function(e){if(u.isBuffer(e))return this===e||0===u.compare(this,e);throw new TypeError("Argument must be a Buffer")},u.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return 0<this.length&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},u.prototype.compare=function(e,t,n,r,i){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),(t=void 0===t?0:t)<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(i<=r&&n<=t)return 0;if(i<=r)return-1;if(n<=t)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(o,a),c=this.slice(r,i),l=e.slice(t,n),h=0;h<s;++h)if(c[h]!==l[h]){o=c[h],a=l[h];break}return o<a?-1:a<o?1:0},u.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},u.prototype.indexOf=function(e,t,n){return A(this,e,t,n,!0)},u.prototype.lastIndexOf=function(e,t,n){return A(this,e,t,n,!1)},u.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||i<n)&&(n=i),0<e.length&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r=r||"utf8";for(var o,a,s,u=!1;;)switch(r){case"hex":var c=e,l=t,h=n,f=(l=Number(l)||0,this.length-l);if((!h||f<(h=Number(h)))&&(h=f),(f=c.length)%2!=0)throw new TypeError("Invalid hex string");f/2<h&&(h=f/2);for(var d=0;d<h;++d){var p=parseInt(c.substr(2*d,2),16);if(isNaN(p))return d;this[l+d]=p}return d;case"utf8":case"utf-8":return f=t,s=n,M(B(e,(a=this).length-f),a,f,s);case"ascii":return b(this,e,t,n);case"latin1":case"binary":return b(this,e,t,n);case"base64":return a=this,s=t,o=n,M(I(e),a,s,o);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return y(this,e,t,n);default:if(u)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),u=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var x=4096;function C(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(n<e+t)throw new RangeError("Trying to access beyond buffer length")}function k(e,t,n,r,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(i<t||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function E(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i<o;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function S(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i<o;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function _(e,t,n,r){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function O(e,t,n,r,o){return o||_(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function T(e,t,n,r,o){return o||_(e,0,n,8),i.write(e,t,n,r,52,8),n+8}u.prototype.slice=function(e,t){var n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):n<e&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):n<t&&(t=n),t<e&&(t=e),u.TYPED_ARRAY_SUPPORT)(i=this.subarray(e,t)).__proto__=u.prototype;else for(var r=t-e,i=new u(r,void 0),o=0;o<r;++o)i[o]=this[o+e];return i},u.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||C(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},u.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||C(e,t,this.length);for(var r=this[e+--t],i=1;0<t&&(i*=256);)r+=this[e+--t]*i;return r},u.prototype.readUInt8=function(e,t){return t||C(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||C(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||C(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||C(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||C(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||C(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return(i*=128)<=r&&(r-=Math.pow(2,8*t)),r},u.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||C(e,t,this.length);for(var r=t,i=1,o=this[e+--r];0<r&&(i*=256);)o+=this[e+--r]*i;return(i*=128)<=o&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return t||C(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){return t||C(e,2,this.length),32768&(t=this[e]|this[e+1]<<8)?4294901760|t:t},u.prototype.readInt16BE=function(e,t){return t||C(e,2,this.length),32768&(t=this[e+1]|this[e]<<8)?4294901760|t:t},u.prototype.readInt32LE=function(e,t){return t||C(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||C(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||C(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||C(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||C(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||C(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,n,r){e=+e,t|=0,n|=0,r||k(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},u.prototype.writeUIntBE=function(e,t,n,r){e=+e,t|=0,n|=0,r||k(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;0<=--i&&(o*=256);)this[t+i]=e/o&255;return t+n},u.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):E(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):E(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):S(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):S(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,n,r){e=+e,t|=0,r||k(this,e,t,n,(r=Math.pow(2,8*n-1))-1,-r);var i=0,o=1,a=0;for(this[t]=255&e;++i<n&&(o*=256);)e<0&&0===a&&0!==this[t+i-1]&&(a=1),this[t+i]=(e/o>>0)-a&255;return t+n},u.prototype.writeIntBE=function(e,t,n,r){e=+e,t|=0,r||k(this,e,t,n,(r=Math.pow(2,8*n-1))-1,-r);var i=n-1,o=1,a=0;for(this[t+i]=255&e;0<=--i&&(o*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/o>>0)-a&255;return t+n},u.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&(e=e<0?255+e+1:e),t+1},u.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):E(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):E(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):S(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||k(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):S(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,n){return O(this,e,t,!0,n)},u.prototype.writeFloatBE=function(e,t,n){return O(this,e,t,!1,n)},u.prototype.writeDoubleLE=function(e,t,n){return T(this,e,t,!0,n)},u.prototype.writeDoubleBE=function(e,t,n){return T(this,e,t,!1,n)},u.prototype.copy=function(e,t,n,r){if(n=n||0,r||0===r||(r=this.length),t>=e.length&&(t=e.length),(r=0<r&&r<n?n:r)===n)return 0;if(0===e.length||0===this.length)return 0;if((t=t||0)<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length);var i,o=(r=e.length-t<r-n?e.length-t+n:r)-n;if(this===e&&n<t&&t<r)for(i=o-1;0<=i;--i)e[i+t]=this[i+n];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},u.prototype.fill=function(e,t,n,r){if("string"==typeof e){var i;if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1!==e.length||(i=e.charCodeAt(0))<256&&(e=i),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!u.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(!(n<=t))if(t>>>=0,n=void 0===n?this.length:n>>>0,"number"==typeof(e=e||0))for(s=t;s<n;++s)this[s]=e;else for(var o=u.isBuffer(e)?e:B(new u(e,r).toString()),a=o.length,s=0;s<n-t;++s)this[s+t]=o[s%a];return this};var D=/[^+\/0-9A-Za-z-_]/g;function B(e,t){t=t||1/0;for(var n,r=e.length,i=null,o=[],a=0;a<r;++a){if(55295<(n=e.charCodeAt(a))&&n<57344){if(!i){if(56319<n){-1<(t-=3)&&o.push(239,191,189);continue}if(a+1===r){-1<(t-=3)&&o.push(239,191,189);continue}i=n;continue}if(n<56320){-1<(t-=3)&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&-1<(t-=3)&&o.push(239,191,189);if(i=null,n<128){if(--t<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function I(e){return r.toByteArray(function(e){var t;if((e=((t=e).trim?t.trim():t.replace(/^\s+|\s+$/g,"")).replace(D,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function M(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(67))},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i}));class r{constructor(e,t){this.backend=e,this.dataMover=t,this.data=new WeakMap,this.dataIdsCount=0}get(e){return this.data.has(e)||this.dataMover.moveData(this.backend,e),this.data.get(e)}set(e,t){this.dataIdsCount++,this.data.set(e,t)}has(e){return this.data.has(e)}delete(e){return this.dataIdsCount--,this.data.delete(e)}numDataIds(){return this.dataIdsCount}}class i{refCount(e){return o("refCount")}incRef(e){return o("incRef")}timerAvailable(){return!0}time(e){return o("time")}read(e){return o("read")}readSync(e){return o("readSync")}readToGPU(e,t){return o("readToGPU")}numDataIds(){return o("numDataIds")}disposeData(e,t){return o("disposeData")}write(e,t,n){return o("write")}move(e,t,n,r,i){return o("move")}createTensorFromTexture(e,t,n){return o("createTensorFromTexture")}memory(){return o("memory")}floatPrecision(){return o("floatPrecision")}epsilon(){return 32===this.floatPrecision()?1e-7:1e-4}dispose(){return o("dispose")}}function o(e){throw new Error(`'${e}' not yet implemented or not found in the registry. This kernel may not be supported by the tfjs backend you have chosen`)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({tanh_:
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){return e=Object(o.a)(e,"x","tanh","float32"),r.a.runKernel(i.id,{x:e})}})},function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return i}));
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
const r=1.7580993408473768,i=1.0507009873554805},function(e,t,n){"use strict";var r={},i=(n.r(r),n.d(r,"copyModel",(function(){return F.b})),n.d(r,"listModels",(function(){return F.c})),n.d(r,"moveModel",(function(){return F.d})),n.d(r,"removeModel",(function(){return F.e})),n.d(r,"browserFiles",(function(){return A})),n.d(r,"browserHTTPRequest",(function(){return O})),n.d(r,"concatenateArrayBuffers",(function(){return f.d})),n.d(r,"decodeWeights",(function(){return f.e})),n.d(r,"encodeWeights",(function(){return f.f})),n.d(r,"fromMemory",(function(){return I})),n.d(r,"fromMemorySync",(function(){return M})),n.d(r,"getLoadHandlers",(function(){return d.b})),n.d(r,"getModelArtifactsForJSON",(function(){return f.g})),n.d(r,"getModelArtifactsForJSONSync",(function(){return f.h})),n.d(r,"getModelArtifactsInfoForJSON",(function(){return f.i})),n.d(r,"getSaveHandlers",(function(){return d.c})),n.d(r,"getWeightSpecs",(function(){return f.k})),n.d(r,"http",(function(){return _})),n.d(r,"isHTTPScheme",(function(){return E})),n.d(r,"loadWeights",(function(){return x})),n.d(r,"registerLoadRouter",(function(){return d.d})),n.d(r,"registerSaveRouter",(function(){return d.e})),n.d(r,"weightsLoaderFactory",(function(){return C})),n.d(r,"withSaveHandler",(function(){return j})),n.d(r,"withSaveHandlerSync",(function(){return N})),{}),o=(n.r(i),n.d(i,"confusionMatrix",(function(){return H})),{}),a=(n.r(o),n.d(o,"fromPixelsAsync",(function(){return X})),n.d(o,"toPixels",(function(){return J})),n.d(o,"fromPixels",(function(){return Z})),{}),s=(n.r(a),n.d(a,"prepareAndValidate",(function(){return ee})),{}),u=(n.r(s),n.d(s,"Serializable",(function(){return re})),n.d(s,"SerializationMap",(function(){return ie})),n.d(s,"registerClass",(function(){return oe})),{}),c=(n.r(u),n.d(u,"segOpComputeOptimalWindowSize",(function(){return Ft})),n.d(u,"computeOutShape",(function(){return Rt})),n.d(u,"collectGatherOpShapeInfo",(function(){return Pt})),{}),l=(n.r(c),n.d(c,"slice_util",(function(){return ne})),n.d(c,"upcastType",(function(){return Ie.c})),n.d(c,"segment_util",(function(){return u})),n.d(c,"fromUint8ToStringArray",(function(){return Lt})),n.d(c,"fromStringArrayToUint8",(function(){return Ut})),n.d(c,"axesAreInnerMostDims",(function(){return Re.b})),n.d(c,"combineLocations",(function(){return Re.c})),n.d(c,"computeOutAndReduceShapes",(function(){return Re.d})),n.d(c,"expandShapeToKeepDim",(function(){return Re.e})),n.d(c,"assertAxesAreInnerMostDims",(function(){return Re.a})),n.d(c,"getAxesPermutation",(function(){return Re.f})),n.d(c,"getUndoAxesPermutation",(function(){return Re.h})),n.d(c,"getInnerMostAxes",(function(){return Re.g})),n.d(c,"getBroadcastDims",(function(){return $.getBroadcastDims})),n.d(c,"getReductionAxes",(function(){return $.getReductionAxes})),n.d(c,"assertAndGetBroadcastShape",(function(){return $.assertAndGetBroadcastShape})),n.d(c,"assertParamsConsistent",(function(){return Pe})),n.d(c,"computeOutShape",(function(){return Le})),n.d(c,"computeDilation2DInfo",(function(){return ze.e})),n.d(c,"computePool2DInfo",(function(){return ze.f})),n.d(c,"computePool3DInfo",(function(){return ze.g})),n.d(c,"computeConv2DInfo",(function(){return ze.b})),n.d(c,"computeConv3DInfo",(function(){return ze.c})),n.d(c,"computeDefaultPad",(function(){return ze.d})),n.d(c,"tupleValuesAreOne",(function(){return ze.j})),n.d(c,"eitherStridesOrDilationsAreOne",(function(){return ze.i})),n.d(c,"convertConv2DDataFormat",(function(){return ze.h})),n.d(c,"checkPadOnDimRoundingMode",(function(){return ze.a})),n.d(c,"getFusedDyActivation",(function(){return He.c})),n.d(c,"getFusedBiasGradient",(function(){return He.b})),n.d(c,"applyActivation",(function(){return He.a})),n.d(c,"shouldFuse",(function(){return He.d})),n.d(c,"RowPartitionType",(function(){return Ue})),n.d(c,"combineRaggedTensorToTensorShapes",(function(){return $e})),n.d(c,"getRowPartitionTypesHelper",(function(){return Qe})),n.d(c,"getRaggedRank",(function(){return Ve})),n.d(c,"validateDefaultValueShape",(function(){return qe})),n.d(c,"PARALLELIZE_THRESHOLD",(function(){return Ge})),n.d(c,"computeOptimalWindowSize",(function(){return We})),n.d(c,"getImageCenter",(function(){return Ke})),n.d(c,"getReshaped",(function(){return Ye})),n.d(c,"getPermuted",(function(){return Xe})),n.d(c,"getReshapedPermuted",(function(){return Je})),n.d(c,"getSliceBeginCoords",(function(){return Ze})),n.d(c,"getSliceSize",(function(){return et})),n.d(c,"prepareAndValidate",(function(){return ee})),n.d(c,"validateUpdateShape",(function(){return te.validateUpdateShape})),n.d(c,"validateInput",(function(){return te.validateInput})),n.d(c,"calculateShapes",(function(){return te.calculateShapes})),n.d(c,"SELU_SCALEALPHA",(function(){return tt.b})),n.d(c,"SELU_SCALE",(function(){return tt.a})),n.d(c,"ERF_P",(function(){return nt})),n.d(c,"ERF_A1",(function(){return rt})),n.d(c,"ERF_A2",(function(){return it})),n.d(c,"ERF_A3",(function(){return ot})),n.d(c,"ERF_A4",(function(){return at})),n.d(c,"ERF_A5",(function(){return st})),n.d(c,"warn",(function(){return ut.b})),n.d(c,"log",(function(){return ut.a})),n.d(c,"mergeRealAndImagArrays",(function(){return ct})),n.d(c,"splitRealAndImagArrays",(function(){return lt})),n.d(c,"complexWithEvenIndex",(function(){return ht})),n.d(c,"complexWithOddIndex",(function(){return ft})),n.d(c,"getComplexWithIndex",(function(){return dt})),n.d(c,"assignToTypedArray",(function(){return pt})),n.d(c,"exponents",(function(){return mt})),n.d(c,"exponent",(function(){return gt})),n.d(c,"decodeEinsumEquation",(function(){return vt})),n.d(c,"getEinsumPermutation",(function(){return bt})),n.d(c,"checkEinsumDimSizes",(function(){return yt})),n.d(c,"getEinsumComputePath",(function(){return wt})),n.d(c,"isIdentityPermutation",(function(){return xt})),n.d(c,"prepareSplitSize",(function(){return Ct})),n.d(c,"getSparseFillEmptyRowsIndicesDenseShapeMismatch",(function(){return kt})),n.d(c,"getSparseFillEmptyRowsNegativeIndexErrorMessage",(function(){return Et})),n.d(c,"getSparseFillEmptyRowsOutOfRangeIndexErrorMessage",(function(){return St})),n.d(c,"getSparseReshapeMultipleNegativeOneOutputDimErrorMessage",(function(){return _t})),n.d(c,"getSparseReshapeNegativeOutputDimErrorMessage",(function(){return Ot})),n.d(c,"getSparseReshapeEmptyTensorZeroOutputDimErrorMessage",(function(){return Tt})),n.d(c,"getSparseReshapeInputOutputMultipleErrorMessage",(function(){return Dt})),n.d(c,"getSparseReshapeInputOutputMismatchErrorMessage",(function(){return Bt})),n.d(c,"getSparseSegmentReductionNegativeSegmentIdsErrorMessage",(function(){return It})),n.d(c,"getSparseSegmentReductionNonIncreasingSegmentIdsErrorMessage",(function(){return Mt})),n.d(c,"getSparseSegmentReductionSegmentIdOutOfRangeErrorMessage",(function(){return jt})),n.d(c,"getSparseSegmentReductionIndicesOutOfRangeErrorMessage",(function(){return Nt})),{}),h=(n.r(l),n.d(l,"nonMaxSuppressionV3Impl",(function(){return Ht.a})),n.d(l,"nonMaxSuppressionV4Impl",(function(){return Ht.b})),n.d(l,"nonMaxSuppressionV5Impl",(function(){return Ht.c})),n.d(l,"whereImpl",(function(){return $t.a})),n(209),n(210),n(162),n(24)),f=n(40),d=n(50);function p(e){return new Promise(e=>setTimeout(e)).then(e)}class m{constructor(e){if(!Object(h.c)().getBool("IS_BROWSER"))throw new Error("browserDownloads() cannot proceed because the current environment is not a browser.");null!=(e=e.startsWith(m.URL_SCHEME)?e.slice(m.URL_SCHEME.length):e)&&0!==e.length||(e="model"),this.modelJsonFileName=e+".json",this.weightDataFileName=e+".weights.bin"}async save(e){if("undefined"==typeof document)throw new Error("Browser downloads are not supported in this environment since `document` is not present");var t=window.URL.createObjectURL(new Blob([e.weightData],{type:"application/octet-stream"}));if(e.modelTopology instanceof ArrayBuffer)throw new Error("BrowserDownloads.save() does not support saving model topology in binary formats yet.");{var n=[{paths:["./"+this.weightDataFileName],weights:e.weightSpecs}];n=Object(f.j)(e,n),n=window.URL.createObjectURL(new Blob([JSON.stringify(n)],{type:"application/json"}));const r=null==this.modelJsonAnchor?document.createElement("a"):this.modelJsonAnchor;if(r.download=this.modelJsonFileName,r.href=n,await p(()=>r.dispatchEvent(new MouseEvent("click"))),null!=e.weightData){const e=null==this.weightDataAnchor?document.createElement("a"):this.weightDataAnchor;e.download=this.weightDataFileName,e.href=t,await p(()=>e.dispatchEvent(new MouseEvent("click")))}return{modelArtifactsInfo:Object(f.i)(e)}}}}m.URL_SCHEME="downloads://";class g{constructor(e){if(null==e||e.length<1)throw new Error("When calling browserFiles, at least 1 file is required, but received "+e);this.jsonFile=e[0],this.weightsFiles=e.slice(1)}async load(){return new Promise((e,t)=>{const n=new FileReader;n.onload=n=>{var r=(n=JSON.parse(n.target.result)).modelTopology;null==r?t(new Error("modelTopology field is missing from file "+this.jsonFile.name)):null==n.weightsManifest?t(new Error("weightManifest field is missing from file "+this.jsonFile.name)):0===this.weightsFiles.length?e({modelTopology:r}):(r=Object(f.g)(n,e=>this.loadWeights(e)),e(r))},n.onerror=e=>t(`Failed to read model topology and weights manifest JSON from file '${this.jsonFile.name}'. BrowserFiles supports loading Keras-style tf.Model artifacts only.`),n.readAsText(this.jsonFile)})}loadWeights(e){const t=[],n=[];for(const r of e)t.push(...r.weights),n.push(...r.paths);const r=this.checkManifestAndWeightFiles(e);return e=n.map(e=>this.loadWeightsFile(e,r[e])),Promise.all(e).then(e=>[t,Object(f.d)(e)])}loadWeightsFile(e,t){return new Promise((n,r)=>{const i=new FileReader;i.onload=e=>{e=e.target.result,n(e)},i.onerror=t=>r(`Failed to weights data from file of path '${e}'.`),i.readAsArrayBuffer(t)})}checkManifestAndWeightFiles(e){const t=[],n=this.weightsFiles.map(e=>Object(f.c)(e.name)),r={};for(const i of e)i.paths.forEach(e=>{var i=Object(f.c)(e);if(-1!==t.indexOf(i))throw new Error(`Duplicate file basename found in weights manifest: '${i}'`);if(t.push(i),-1===n.indexOf(i))throw new Error(`Weight file with basename '${i}' is not provided.`);r[e]=this.weightsFiles[n.indexOf(i)]});if(t.length!==this.weightsFiles.length)throw new Error(`Mismatch in the number of files in weights manifest (${t.length}) and the number of weight files provided (${this.weightsFiles.length}).`);return r}}function A(e){return new g(e)}d.a.registerSaveRouter(e=>Object(h.c)().getBool("IS_BROWSER")&&!Array.isArray(e)&&e.startsWith(m.URL_SCHEME)?([e="model"]=[e.slice(m.URL_SCHEME.length)],new m(e)):null);var v=n(10);
/**
 * @license
 * Copyright 2019 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function b(e,t,n,r){var i,o,a;i=e,Object(v.b)(null!=i&&Array.isArray(i)&&0<i.length,()=>"promises must be a none empty array"),o=n=null==n?0:n,a=r=null==r?1:r,Object(v.b)(0<=o&&o<=1,()=>"Progress fraction must be in range [0, 1], but got startFraction "+o),Object(v.b)(0<=a&&a<=1,()=>"Progress fraction must be in range [0, 1], but got endFraction "+a),Object(v.b)(o<=a,()=>`startFraction must be no more than endFraction, but got startFraction ${o} and endFraction `+a);let s=0;return Promise.all(e.map(i=>(i.then(i=>{var o=n+ ++s/e.length*(r-n);return t(o),i}),i)))}var y=n(168);
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */async function w(e,t){const n=null==(t=null==t?{}:t).fetchFunc?Object(h.c)().platform.fetch:t.fetchFunc;e=e.map(e=>n(e,t.requestInit,{isBinary:!0}));return e=(null==t.onProgress?await Promise.all(e):await b(e,t.onProgress,0,.5)).map(e=>e.arrayBuffer()),null==t.onProgress?await Promise.all(e):await b(e,t.onProgress,.5,1)}async function x(e,t="",n,r){return C(e=>w(e,{requestInit:r}))(e,t,n)}function C(e){return async(t,n="",r)=>{const i=t.map(()=>!1),o={},a=null!=r?r.map(()=>!1):[],s=[];if(t.forEach((e,t)=>{let n=0;e.weights.forEach(e=>{var u=("quantization"in e?e.quantization:e).dtype;const c=y.a[u]*v.O(e.shape),l=()=>{i[t]=!0,null==o[t]&&(o[t]=[]),o[t].push({manifestEntry:e,groupOffset:n,sizeBytes:c})};null!=r?r.forEach((t,n)=>{t===e.name&&(l(),a[n]=!0)}):l(),s.push(e.name),n+=c})}),!a.every(e=>e)){const e=r.filter((e,t)=>!a[t]);throw new Error("Could not find weights in manifest with names: "+e.join(", ")+". \nManifest JSON has weights with names: "+s.join(", ")+".")}const u=i.reduce((e,t,n)=>(t&&e.push(n),e),[]),c=[],l=(u.forEach(e=>{t[e].paths.forEach(e=>{e=n+(n.endsWith("/")?"":"/")+e,c.push(e)})}),await e(c)),h={};let d=0;return u.forEach(e=>{var n=t[e].paths.length;let r=0;for(let e=0;e<n;e++)r+=l[d+e].byteLength;const i=new ArrayBuffer(r),a=new Uint8Array(i);let s=0;for(let e=0;e<n;e++){var u=new Uint8Array(l[d+e]);a.set(u,s),s+=u.byteLength}o[e].forEach(e=>{var t=i.slice(e.groupOffset,e.groupOffset+e.sizeBytes),n=Object(f.e)(t,[e.manifestEntry]);for(const e in n)h[e]=n[e]}),d+=n}),h
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */}}class k{constructor(e,t){if(this.DEFAULT_METHOD="POST",this.weightPathPrefix=(t=null==t?{}:t).weightPathPrefix,this.onProgress=t.onProgress,this.weightUrlConverter=t.weightUrlConverter,null!=t.fetchFunc?(Object(v.b)("function"==typeof t.fetchFunc,()=>"Must pass a function that matches the signature of `fetch` (see https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API)"),this.fetch=t.fetchFunc):this.fetch=Object(h.c)().platform.fetch,Object(v.b)(null!=e&&0<e.length,()=>"URL path for http must not be null, undefined or empty."),Array.isArray(e)&&Object(v.b)(2===e.length,()=>`URL paths for http must have a length of 2, (actual length is ${e.length}).`),this.path=e,null!=t.requestInit&&null!=t.requestInit.body)throw new Error("requestInit is expected to have no pre-existing body, but has one.");this.requestInit=t.requestInit||{}}async save(e){if(e.modelTopology instanceof ArrayBuffer)throw new Error("BrowserHTTPRequest.save() does not support saving model topology in binary formats yet.");const t=Object.assign({method:this.DEFAULT_METHOD},this.requestInit);t.body=new FormData;var n=[{paths:["./model.weights.bin"],weights:e.weightSpecs}];n=Object(f.j)(e,n);if((n=(t.body.append("model.json",new Blob([JSON.stringify(n)],{type:"application/json"}),"model.json"),null!=e.weightData&&t.body.append("model.weights.bin",new Blob([e.weightData],{type:"application/octet-stream"}),"model.weights.bin"),await this.fetch(this.path,t))).ok)return{modelArtifactsInfo:Object(f.i)(e),responses:[n]};throw new Error("BrowserHTTPRequest.save() failed due to HTTP response status "+n.status+".")}async load(){const e=await this.fetch(this.path,this.requestInit);if(!e.ok)throw new Error(`Request to ${this.path} failed with status code `+e.status+". Please verify this URL points to the model JSON of the model to load.");let t;try{t=await e.json()}catch(e){let t=`Failed to parse model JSON of response from ${this.path}.`;throw this.path.endsWith(".pb")?t+=" 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.":t+=" Please make sure the server is serving valid JSON for this request.",new Error(t)}var n=t.modelTopology,r=t.weightsManifest;if(null==n&&null==r)throw new Error(`The JSON from HTTP path ${this.path} contains neither model topology or manifest for weights.`);return Object(f.g)(t,e=>this.loadWeights(e))}async loadWeights(e){var t,n=Array.isArray(this.path)?this.path[1]:this.path,[n,r]=(t=(n=n).lastIndexOf("/"),o=n.lastIndexOf("?"),[(u=n.substring(0,t))+"/",t=t<o?n.substring(o):""]),i=this.weightPathPrefix||n,o=Object(f.k)(e);const a=[],s=[];for(const t of e)for(const e of t.paths)null!=this.weightUrlConverter?s.push(this.weightUrlConverter(e)):a.push(i+e+r);this.weightUrlConverter&&a.push(...await Promise.all(s));var u=await w(a,{requestInit:this.requestInit,fetchFunc:this.fetch,onProgress:this.onProgress});return[o,Object(f.d)(u)]}}function E(e){return null!=e.match(k.URL_SCHEME_REGEX)}k.URL_SCHEME_REGEX=/^https?:\/\//;var S=(e,t)=>{if("undefined"!=typeof fetch||null!=t&&null!=t.fetchFunc){let n=!0;if(n=Array.isArray(e)?e.every(e=>E(e)):E(e))return _(e,t)}return null};function _(e,t){return new k(e,t)}function O(e,t){return _(e,t)}
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */d.a.registerSaveRouter(S),d.a.registerLoadRouter(S);class T{constructor(e){this.modelArtifacts=e}load(){return this.modelArtifacts}}class D{constructor(e){this.saveHandler=e}save(e){return this.saveHandler(e)}}class B{constructor(e){e.load&&(this.load=()=>Promise.resolve(e.load())),e.save&&(this.save=t=>Promise.resolve(e.save(t)))}}function I(e,t,n,r){var i=arguments;return new B(M(...i))}function M(e,t,n,r){return 1===arguments.length?null!=e.modelTopology||null!=e.weightSpecs?new T(e):new T({modelTopology:e}):new T({modelTopology:e,weightSpecs:t,weightData:n,trainingConfig:r})}function j(e){return new D(e)}function N(e){return new D(e)}var F=n(102),R=n(3),P=n(15),L=n(30),U=n(122),z=(S=n(5),n(52));
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */const H=Object(S.b)({confusionMatrix_:
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t,n){const r=Object(R.a)(e,"labels","confusionMatrix"),i=Object(R.a)(t,"predictions","confusionMatrix");return v.b(null==n||0<n&&Number.isInteger(n),()=>"If provided, numClasses must be a positive integer, but got "+n),v.b(1===r.rank,()=>"Expected the rank of labels to be 1, but got "+r.rank),v.b(1===i.rank,()=>"Expected the rank of predictions to be 1, but got "+i.rank),v.b(r.shape[0]===i.shape[0],()=>`Mismatch in the number of examples: ${r.shape[0]} vs. ${i.shape[0]}. Labels and predictions should have the same number of elements.`),v.b(0<n&&Number.isInteger(n),()=>"numClasses is required to be a positive integer, but got "+n),e=Object(U.a)(Object(P.a)(r,"int32"),n),t=Object(U.a)(Object(P.a)(i,"int32"),n),e=Object(z.a)(e),e=Object(L.a)(e,t),Object(P.a)(e,"int32")}});
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */var $=n(20),Q=n(6),V=n(4),q=n(71),G=n(7),W=n(205);
/**
 * @license
 * Copyright 2019 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */let K;function Y(e,t=3){if(4<t)throw new Error("Cannot construct Tensor with more than 4 channels from pixels.");if(null==e)throw new Error("pixels passed to tf.browser.fromPixels() can not be null");let n=!1,r=!1,i=!1,o=!1,a=!1,s=!1;if(e.data instanceof Uint8Array)n=!0;else if("undefined"!=typeof ImageData&&e instanceof ImageData)r=!0;else if("undefined"!=typeof HTMLVideoElement&&e instanceof HTMLVideoElement)i=!0;else if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement)o=!0;else if(null!=e.getContext)a=!0;else{if(!("undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap))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 "+e.constructor.name);s=!0}if(null!=Object(q.c)(V.kb,Q.a.backendName))return Q.a.runKernel(V.kb,{pixels:e},{numChannels:t});var[u,c]=i?[e.videoWidth,e.videoHeight]:[e.width,e.height];let l,h;if(a)l=e.getContext("2d").getImageData(0,0,u,c).data;else if(r||n)l=e.data;else if(o||i||s){if(null==K)if("undefined"==typeof document){if("undefined"==typeof OffscreenCanvas||"undefined"==typeof OffscreenCanvasRenderingContext2D)throw new Error("Cannot parse input in current context. Reason: OffscreenCanvas Context2D rendering is not supported.");K=new OffscreenCanvas(1,1).getContext("2d")}else K=document.createElement("canvas").getContext("2d",{willReadFrequently:!0});K.canvas.width=u,K.canvas.height=c,K.drawImage(e,0,0,u,c),l=K.getImageData(0,0,u,c).data}if(4===t)h=new Int32Array(l);else{var f=u*c;h=new Int32Array(f*t);for(let e=0;e<f;e++)for(let n=0;n<t;++n)h[e*t+n]=l[4*e+n]}return e=[c,u,t],Object(W.a)(h,e,"int32")}async function X(e,t=3){let n=null;if(Object(h.c)().getBool("WRAP_TO_IMAGEBITMAP")&&function(e){return"undefined"!=typeof window&&"undefined"!=typeof ImageBitmap&&window.hasOwnProperty("createImageBitmap")&&!(e instanceof ImageBitmap)&&null!=(t=e)&&0!==t.width&&0!==t.height&&!(null!=(t=e)&&t.data instanceof Uint8Array);var t}(e)){let t;try{t=await createImageBitmap(e,{premultiplyAlpha:"none"})}catch(e){t=null}n=null!=t&&t.width===e.width&&t.height===e.height?t:e}else n=e;return Y(n,t)}async function J(e,t){let n=Object(R.a)(e,"img","toPixels");if(!(e instanceof G.a)){const e=n;n=Object(P.a)(e,"int32"),e.dispose()}if(2!==n.rank&&3!==n.rank)throw new Error(`toPixels only supports rank 2 or 3 tensors, got rank ${n.rank}.`);var[r,i]=n.shape.slice(0,2),o=2===n.rank?1:n.shape[2];if(4<o||2===o)throw new Error("toPixels only supports depth of size 1, 3 or 4 but got "+o);if("float32"!==n.dtype&&"int32"!==n.dtype)throw new Error(`Unsupported type for toPixels: ${n.dtype}. Please use float32 or int32 tensors.`);var a=await n.data(),s="float32"===n.dtype?255:1;const u=new Uint8ClampedArray(i*r*4);for(let e=0;e<r*i;++e){const t=[0,0,0,255];for(let r=0;r<o;r++){var c=a[e*o+r];if("float32"===n.dtype){if(c<0||1<c)throw new Error(`Tensor values for a float32 Tensor must be in the range [0 - 1] but encountered ${c}.`)}else if("int32"===n.dtype&&(c<0||255<c))throw new Error(`Tensor values for a int32 Tensor must be in the range [0 - 255] but encountered ${c}.`);1===o?(t[0]=c*s,t[1]=c*s,t[2]=c*s):t[r]=c*s}var l=4*e;u[0+l]=Math.round(t[0]),u[1+l]=Math.round(t[1]),u[2+l]=Math.round(t[2]),u[3+l]=Math.round(t[3])}if(null!=t){t.width=i,t.height=r;const e=t.getContext("2d");t=new ImageData(u,i,r),e.putImageData(t,0,0)}return n!==e&&n.dispose(),u}const Z=Object(S.b)({fromPixels_:Y});function ee(e,t){var n=e.shape.length,r=t.shape.length;if(n<1)throw new Error(`tf.gatherND() expects the input to be rank 1 or higher, but the rank was ${n}.`);if(r<1)throw new Error(`tf.gatherND() expects the indices to be rank 1 or higher, but the rank was ${r}.`);if("int32"!==t.dtype)throw new Error(`tf.gatherND() expects the indices to be int32 type, but the dtype was ${t.dtype}.`);if(t.shape[r-1]>n)throw new Error("index innermost dimension length must be <= tensor rank; saw: "+t.shape[r-1]+" vs. "+n);if(0===Object(v.O)(e.shape))throw new Error(`Requested more than 0 entries, but input is empty. Input shape: ${e.shape}.`);const i=t.shape;r=i[i.length-1];let o=1;for(let e=0;e<i.length-1;++e)o*=i[e];var a=e.shape;const s=i.slice();s.pop();let u=1;for(let e=r;e<n;++e)u*=a[e],s.push(a[e]);return t=[...Object(v.j)(e.shape).map(e=>e/u),1].slice(0,r),[s,o,u,t]}var te=n(131),ne=n(132);
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */class re{getClassName(){return this.constructor.className}static fromConfig(e,t){return new e(t)}}class ie{constructor(){this.classNameMap={}}static getMap(){return null==ie.instance&&(ie.instance=new ie),ie.instance}static register(e){ie.getMap().classNameMap[e.className]=[e,e.fromConfig]}}function oe(e){Object(v.b)(null!=e.className,()=>"Class being registered does not have the static className property defined."),Object(v.b)("string"==typeof e.className,()=>"className is required to be a string, but got type "+typeof e.className),Object(v.b)(0<e.className.length,()=>"Class being registered has an empty-string as its className, which is disallowed."),ie.register(e)}var ae=n(28),se=n(153),ue=n(12),ce=n(33),le=n(16),he=n(18),fe=n(11),de=n(47),pe=n(31),me=n(23),ge=n(43),Ae=n(22);
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
class ve extends re{minimize(e,t=!1,n){const{value:r,grads:i}=this.computeGradients(e,n);return null!=n?(e=n.map(e=>({name:e.name,tensor:i[e.name]})),this.applyGradients(e)):this.applyGradients(i),Object(ce.d)(i),t?r:(r.dispose(),null)}get iterations(){return null==this.iterations_&&(this.iterations_=0),this.iterations_}incrementIterations(){this.iterations_=this.iterations+1}computeGradients(e,t){return Object(ge.f)(e,t)}dispose(){null!=this.iterations_&&Object(ce.d)(this.iterations_)}async saveIterations(){return null==this.iterations_&&(this.iterations_=0),{name:"iter",tensor:Object(Ae.a)(this.iterations_,"int32")}}async getWeights(){throw new Error("getWeights() is not implemented for this optimizer yet.")}async setWeights(e){throw new Error("setWeights() is not implemented for this optimizer class "+this.getClassName())}async extractIterations(e){return this.iterations_=(await e[0].tensor.data())[0],e.slice(1)}}Object.defineProperty(ve,Symbol.hasInstance,{value:e=>null!=e.minimize&&null!=e.computeGradients&&null!=e.applyGradients});
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
class be extends ve{constructor(e,t,n=null){super(),this.learningRate=e,this.rho=t,this.epsilon=n,this.accumulatedGrads=[],this.accumulatedUpdates=[],null==n&&(this.epsilon=Q.a.backend.epsilon())}applyGradients(e){(Array.isArray(e)?e.map(e=>e.name):Object.keys(e)).forEach((t,n)=>{const r=Q.a.registeredVariables[t],i=(null==this.accumulatedGrads[n]&&(this.accumulatedGrads[n]={originalName:t+"/accum_grad",variable:Object(ce.t)(()=>Object(me.a)(r).variable(!1))}),null==this.accumulatedUpdates[n]&&(this.accumulatedUpdates[n]={originalName:t+"/accum_var",variable:Object(ce.t)(()=>Object(me.a)(r).variable(!1))}),Array.isArray(e)?e[n].tensor:e[t]);if(null!=i){const e=this.accumulatedGrads[n].variable,t=this.accumulatedUpdates[n].variable;Object(ce.t)(()=>{var n=Object(le.a)(Object(fe.a)(e,this.rho),Object(fe.a)(Object(pe.a)(i),1-this.rho)),o=Object(fe.a)(Object(he.a)(Object(de.a)(Object(le.a)(t,this.epsilon)),Object(de.a)(Object(le.a)(e,this.epsilon))),i),a=Object(le.a)(Object(fe.a)(t,this.rho),Object(fe.a)(Object(pe.a)(o),1-this.rho));e.assign(n),t.assign(a),n=Object(le.a)(Object(fe.a)(o,-this.learningRate),r);r.assign(n)})}}),this.incrementIterations()}dispose(){null!=this.accumulatedUpdates&&(Object(ce.d)(this.accumulatedGrads.map(e=>e.variable)),Object(ce.d)(this.accumulatedUpdates.map(e=>e.variable)))}async getWeights(){const e=[...this.accumulatedGrads,...this.accumulatedUpdates];return[await this.saveIterations()].concat(e.map(e=>({name:e.originalName,tensor:e.variable})))}async setWeights(e){var t=(e=await this.extractIterations(e)).length/2;this.accumulatedGrads=e.slice(0,t).map(e=>({originalName:e.name,variable:e.tensor.variable(!1)})),this.accumulatedUpdates=e.slice(t,2*t).map(e=>({originalName:e.name,variable:e.tensor.variable(!1)}))}getConfig(){return{learningRate:this.learningRate,rho:this.rho,epsilon:this.epsilon}}static fromConfig(e,t){return new e(t.learningRate,t.rho,t.epsilon)}}be.className="Adadelta",oe(be);var ye=n(88);
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */class we extends ve{constructor(e,t=.1){super(),this.learningRate=e,this.initialAccumulatorValue=t,this.accumulatedGrads=[]}applyGradients(e){(Array.isArray(e)?e.map(e=>e.name):Object.keys(e)).forEach((t,n)=>{const r=Q.a.registeredVariables[t];null==this.accumulatedGrads[n]&&(this.accumulatedGrads[n]={originalName:t+"/accumulator",variable:Object(ce.t)(()=>Object(ye.a)(r.shape,this.initialAccumulatorValue).variable(!1))});const i=Array.isArray(e)?e[n].tensor:e[t];if(null!=i){const e=this.accumulatedGrads[n].variable;Object(ce.t)(()=>{var t=Object(le.a)(e,Object(pe.a)(i));e.assign(t),t=Object(le.a)(Object(fe.a)(Object(he.a)(i,Object(de.a)(Object(le.a)(t,Q.a.backend.epsilon()))),-this.learningRate),r);r.assign(t)})}}),this.incrementIterations()}dispose(){null!=this.accumulatedGrads&&Object(ce.d)(this.accumulatedGrads.map(e=>e.variable))}async getWeights(){return[await this.saveIterations()].concat(this.accumulatedGrads.map(e=>({name:e.originalName,tensor:e.variable})))}async setWeights(e){e=await this.extractIterations(e),this.accumulatedGrads=e.map(e=>({originalName:e.name,variable:e.tensor.variable(!1)}))}getConfig(){return{learningRate:this.learningRate,initialAccumulatorValue:this.initialAccumulatorValue}}static fromConfig(e,t){return new e(t.learningRate,t.initialAccumulatorValue)}}we.className="Adagrad",oe(we);var xe=n(62),Ce=n(17);
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */class ke extends ve{constructor(e,t,n,r=null){super(),this.learningRate=e,this.beta1=t,this.beta2=n,this.epsilon=r,this.accumulatedFirstMoment=[],this.accumulatedSecondMoment=[],Object(ce.t)(()=>{this.accBeta1=Object(Ae.a)(t).variable(),this.accBeta2=Object(Ae.a)(n).variable()}),null==r&&(this.epsilon=Q.a.backend.epsilon())}applyGradients(e){const t=Array.isArray(e)?e.map(e=>e.name):Object.keys(e);Object(ce.t)(()=>{const n=Object(Ce.a)(1,this.accBeta1),r=Object(Ce.a)(1,this.accBeta2);t.forEach((t,i)=>{const o=Q.a.registeredVariables[t];if(null==this.accumulatedFirstMoment[i]&&(this.accumulatedFirstMoment[i]={originalName:t+"/m",variable:Object(ce.t)(()=>Object(me.a)(o).variable(!1))}),null==this.accumulatedSecondMoment[i]&&(this.accumulatedSecondMoment[i]={originalName:t+"/v",variable:Object(ce.t)(()=>Object(me.a)(o).variable(!1))}),null!=(t=Array.isArray(e)?e[i].tensor:e[t])){const e=this.accumulatedFirstMoment[i].variable,u=this.accumulatedSecondMoment[i].variable;i=Object(le.a)(Object(fe.a)(e,this.beta1),Object(fe.a)(t,1-this.beta1)),t=Object(le.a)(Object(fe.a)(u,this.beta2),Object(fe.a)(Object(pe.a)(t),1-this.beta2));var a=Object(he.a)(i,n),s=Object(he.a)(t,r);i=(e.assign(i),u.assign(t),Object(le.a)(Object(fe.a)(Object(he.a)(a,Object(le.a)(Object(de.a)(s),this.epsilon)),-this.learningRate),o));o.assign(i)}}),this.accBeta1.assign(Object(fe.a)(this.accBeta1,this.beta1)),this.accBeta2.assign(Object(fe.a)(this.accBeta2,this.beta2))}),this.incrementIterations()}dispose(){this.accBeta1.dispose(),this.accBeta2.dispose(),null!=this.accumulatedFirstMoment&&Object(ce.d)(this.accumulatedFirstMoment.map(e=>e.variable)),null!=this.accumulatedSecondMoment&&Object(ce.d)(this.accumulatedSecondMoment.map(e=>e.variable))}async getWeights(){const e=[...this.accumulatedFirstMoment,...this.accumulatedSecondMoment];return[await this.saveIterations()].concat(e.map(e=>({name:e.originalName,tensor:e.variable})))}async setWeights(e){e=await this.extractIterations(e),Object(ce.t)(()=>{this.accBeta1.assign(Object(xe.a)(this.beta1,this.iterations_+1)),this.accBeta2.assign(Object(xe.a)(this.beta2,this.iterations_+1))});var t=e.length/2;this.accumulatedFirstMoment=e.slice(0,t).map(e=>({originalName:e.name,variable:e.tensor.variable(!1)})),this.accumulatedSecondMoment=e.slice(t,2*t).map(e=>({originalName:e.name,variable:e.tensor.variable(!1)}))}getConfig(){return{learningRate:this.learningRate,beta1:this.beta1,beta2:this.beta2,epsilon:this.epsilon}}static fromConfig(e,t){return new e(t.learningRate,t.beta1,t.beta2,t.epsilon)}}ke.className="Adam",oe(ke);var Ee=n(53),Se=n(103);
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */class _e extends ve{constructor(e,t,n,r=null,i=0){super(),this.learningRate=e,this.beta1=t,this.beta2=n,this.epsilon=r,this.decay=i,this.accumulatedFirstMoment=[],this.accumulatedWeightedInfNorm=[],Object(ce.t)(()=>{this.iteration=Object(Ae.a)(0).variable(),this.accBeta1=Object(Ae.a)(t).variable()}),null==r&&(this.epsilon=Q.a.backend.epsilon())}applyGradients(e){const t=Array.isArray(e)?e.map(e=>e.name):Object.keys(e);Object(ce.t)(()=>{const n=Object(Ce.a)(1,this.accBeta1),r=Object(he.a)(-this.learningRate,Object(le.a)(Object(fe.a)(this.iteration,this.decay),1));t.forEach((t,i)=>{const o=Q.a.registeredVariables[t];if(null==this.accumulatedFirstMoment[i]&&(this.accumulatedFirstMoment[i]={originalName:t+"/m",variable:Object(me.a)(o).variable(!1)}),null==this.accumulatedWeightedInfNorm[i]&&(this.accumulatedWeightedInfNorm[i]={originalName:t+"/v",variable:Object(me.a)(o).variable(!1)}),null!=(t=Array.isArray(e)?e[i].tensor:e[t])){const e=this.accumulatedFirstMoment[i].variable,s=this.accumulatedWeightedInfNorm[i].variable;i=Object(le.a)(Object(fe.a)(e,this.beta1),Object(fe.a)(t,1-this.beta1));var a=Object(fe.a)(s,this.beta2);t=Object(Ee.a)(t),a=Object(Se.a)(a,t),t=(e.assign(i),s.assign(a),Object(le.a)(Object(fe.a)(Object(he.a)(r,n),Object(he.a)(i,Object(le.a)(a,this.epsilon))),o));o.assign(t)}}),this.iteration.assign(Object(le.a)(this.iteration,1)),this.accBeta1.assign(Object(fe.a)(this.accBeta1,this.beta1))}),this.incrementIterations()}dispose(){this.accBeta1.dispose(),this.iteration.dispose(),null!=this.accumulatedFirstMoment&&Object(ce.d)(this.accumulatedFirstMoment.map(e=>e.variable)),null!=this.accumulatedWeightedInfNorm&&Object(ce.d)(this.accumulatedWeightedInfNorm.map(e=>e.variable))}async getWeights(){throw new Error("getWeights() is not implemented for Adamax yet.")}async setWeights(e){throw new Error("setWeights() is not implemented for Adamax yet.")}getConfig(){return{learningRate:this.learningRate,beta1:this.beta1,beta2:this.beta2,epsilon:this.epsilon,decay:this.decay}}static fromConfig(e,t){return new e(t.learningRate,t.beta1,t.beta2,t.epsilon,t.decay)}}_e.className="Adamax",oe(_e);
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
class Oe extends ve{constructor(e){super(),this.learningRate=e,this.setLearningRate(e)}applyGradients(e){(Array.isArray(e)?e.map(e=>e.name):Object.keys(e)).forEach((t,n)=>{const r=Array.isArray(e)?e[n].tensor:e[t];if(null!=r){const e=Q.a.registeredVariables[t];Object(ce.t)(()=>{var t=Object(le.a)(Object(fe.a)(this.c,r),e);e.assign(t)})}}),this.incrementIterations()}setLearningRate(e){this.learningRate=e,null!=this.c&&this.c.dispose(),this.c=Object(ce.l)(Object(Ae.a)(-e))}dispose(){this.c.dispose()}async getWeights(){return[await this.saveIterations()]}async setWeights(e){if(0!==(e=await this.extractIterations(e)).length)throw new Error("SGD optimizer does not have settable weights.")}getConfig(){return{learningRate:this.learningRate}}static fromConfig(e,t){return new e(t.learningRate)}}Oe.className="SGD",oe(Oe);
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
class Te extends Oe{constructor(e,t,n=!1){super(e),this.learningRate=e,this.momentum=t,this.useNesterov=n,this.accumulations=[],this.m=Object(Ae.a)(this.momentum)}applyGradients(e){(Array.isArray(e)?e.map(e=>e.name):Object.keys(e)).forEach((t,n)=>{const r=Q.a.registeredVariables[t];null==this.accumulations[n]&&(this.accumulations[n]={originalName:t+"/momentum",variable:Object(ce.t)(()=>Object(me.a)(r).variable(!1))});const i=this.accumulations[n].variable,o=Array.isArray(e)?e[n].tensor:e[t];null!=o&&Object(ce.t)(()=>{let e;var t=Object(le.a)(Object(fe.a)(this.m,i),o);e=this.useNesterov?Object(le.a)(Object(fe.a)(this.c,Object(le.a)(o,Object(fe.a)(t,this.m))),r):Object(le.a)(Object(fe.a)(this.c,t),r),i.assign(t),r.assign(e)})}),this.incrementIterations()}dispose(){this.m.dispose(),null!=this.accumulations&&Object(ce.d)(this.accumulations.map(e=>e.variable))}setMomentum(e){this.momentum=e}async getWeights(){return[await this.saveIterations()].concat(this.accumulations.map(e=>({name:e.originalName,tensor:e.variable})))}async setWeights(e){e=await this.extractIterations(e),this.accumulations=e.map(e=>({originalName:e.name,variable:e.tensor.variable(!1)}))}getConfig(){return{learningRate:this.learningRate,momentum:this.momentum,useNesterov:this.useNesterov}}static fromConfig(e,t){return new e(t.learningRate,t.momentum,t.useNesterov)}}Te.className="Momentum",oe(Te);
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
class De extends ve{constructor(e,t=.9,n=0,r=null,i=!1){if(super(),this.learningRate=e,this.decay=t,this.momentum=n,this.epsilon=r,this.accumulatedMeanSquares=[],this.accumulatedMoments=[],this.accumulatedMeanGrads=[],this.centered=i,null==r&&(this.epsilon=Q.a.backend.epsilon()),null==e)throw new Error("learningRate for RMSPropOptimizer must be defined.")}applyGradients(e){(Array.isArray(e)?e.map(e=>e.name):Object.keys(e)).forEach((t,n)=>{const r=Q.a.registeredVariables[t],i=(null==this.accumulatedMeanSquares[n]&&(this.accumulatedMeanSquares[n]={originalName:t+"/rms",variable:Object(ce.t)(()=>Object(me.a)(r).variable(!1))}),null==this.accumulatedMoments[n]&&(this.accumulatedMoments[n]={originalName:t+"/momentum",variable:Object(ce.t)(()=>Object(me.a)(r).variable(!1))}),null==this.accumulatedMeanGrads[n]&&this.centered&&(this.accumulatedMeanGrads[n]={originalName:t+"/mg",variable:Object(ce.t)(()=>Object(me.a)(r).variable(!1))}),Array.isArray(e)?e[n].tensor:e[t]);if(null!=i){const e=this.accumulatedMeanSquares[n].variable,t=this.accumulatedMoments[n].variable;Object(ce.t)(()=>{const o=Object(le.a)(Object(fe.a)(e,this.decay),Object(fe.a)(Object(pe.a)(i),1-this.decay));if(this.centered){const u=this.accumulatedMeanGrads[n].variable;var a=Object(le.a)(Object(fe.a)(u,this.decay),Object(fe.a)(i,1-this.decay)),s=Object(he.a)(Object(fe.a)(i,this.learningRate),Object(de.a)(Object(Ce.a)(o,Object(le.a)(Object(pe.a)(a),this.epsilon))));s=Object(le.a)(Object(fe.a)(t,this.momentum),s),a=(e.assign(o),u.assign(a),t.assign(s),Object(Ce.a)(r,s));r.assign(a)}else{const n=Object(le.a)(Object(fe.a)(e,this.decay),Object(fe.a)(Object(pe.a)(i),1-this.decay));s=Object(le.a)(Object(fe.a)(t,this.momentum),Object(he.a)(Object(fe.a)(i,this.learningRate),Object(de.a)(Object(le.a)(n,this.epsilon)))),e.assign(n),t.assign(s),a=Object(Ce.a)(r,s),r.assign(a)}})}}),this.incrementIterations()}dispose(){null!=this.accumulatedMeanSquares&&Object(ce.d)(this.accumulatedMeanSquares.map(e=>e.variable)),null!=this.accumulatedMeanGrads&&this.centered&&Object(ce.d)(this.accumulatedMeanGrads.map(e=>e.variable)),null!=this.accumulatedMoments&&Object(ce.d)(this.accumulatedMoments.map(e=>e.variable))}async getWeights(){const e=[...this.accumulatedMeanSquares,...this.accumulatedMoments];return this.centered&&e.push(...this.accumulatedMeanGrads),[await this.saveIterations()].concat(e.map(e=>({name:e.originalName,tensor:e.variable})))}async setWeights(e){e=await this.extractIterations(e);var t=this.centered?e.length/3:e.length/2;this.accumulatedMeanSquares=e.slice(0,t).map(e=>({originalName:e.name,variable:e.tensor.variable(!1)})),this.accumulatedMoments=e.slice(t,2*t).map(e=>({originalName:e.name,variable:e.tensor.variable(!1)})),this.centered&&(this.accumulatedMeanGrads=e.slice(2*t,3*t).map(e=>({originalName:e.name,variable:e.tensor.variable(!1)})))}getConfig(){return{learningRate:this.learningRate,decay:this.decay,momentum:this.momentum,epsilon:this.epsilon,centered:this.centered}}static fromConfig(e,t){return new e(t.learningRate,t.decay,t.momentum,t.epsilon,t.centered)}}De.className="RMSProp",oe(De);
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
class Be{static sgd(e){return new Oe(e)}static momentum(e,t,n=!1){return new Te(e,t,n)}static rmsprop(e,t=.9,n=0,r=null,i=!1){return new De(e,t,n,r,i)}static adam(e=.001,t=.9,n=.999,r=null){return new ke(e,t,n,r)}static adadelta(e=.001,t=.95,n=null){return new be(e,t,n)}static adamax(e=.002,t=.9,n=.999,r=null,i=0){return new _e(e,t,n,r,i)}static adagrad(e,t=.1){return new we(e,t)}}var Ie=n(101),Me=n(25),je=n(44);const Ne={sgd:Be.sgd,momentum:Be.momentum,adadelta:Be.adadelta,adagrad:Be.adagrad,rmsprop:Be.rmsprop,adamax:Be.adamax,adam:Be.adam};var Fe=n(266),Re=n(48);
/**
 * @license
 * Copyright 2017 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function Pe(e,t){const n=e[0].length,r=(e.forEach((e,t)=>{v.b(e.length===n,()=>`Error in concat${n}D: rank of tensors[${t}] must be the same as the rank of the rest (${n})`)}),v.b(0<=t&&t<n,()=>`Error in concat${n}D: axis must be between 0 and ${n-1}.`),e[0]);e.forEach((e,i)=>{for(let o=0;o<n;o++)v.b(o===t||e[o]===r[o],()=>`Error in concat${n}D: Shape of tensors[${i}] (${e}) does not match the shape of the rest (${r}) along the non-concatenated axis ${i}.`)})}function Le(e,t){const n=e[0].slice();for(let r=1;r<e.length;r++)n[t]+=e[r][t];return n}var Ue,ze=n(29),He=n(54);function $e(e,t,n){let r=new Array;if(null!=n||null!=t){if(null==t)for(;r.length<e+n.length;)r.push(-1);else r=t.slice();if(null!=n){if(e+n.length!==r.length)throw new Error(`rt input.shape and shape=${t} are incompatible: rt input.rank = ${e+n.length}, but shape.rank = `+r.length);for(let s=1;s<n.length;++s){var i=n[s],o=r[r.length-n.length+s],a=r[o];if(0<=i)if(0<=a){if(a!==i)throw new Error(`rt input.shape and shape=${t} are incompatible: rt input.shape[${s+e}] = ${i} but shape[${s+e}] = `+a)}else r[o]=i}}}return r}function Qe(e){var t={FIRST_DIM_SIZE:Ue.FIRST_DIM_SIZE,VALUE_ROWIDS:Ue.VALUE_ROWIDS,ROW_LENGTHS:Ue.ROW_LENGTHS,ROW_SPLITS:Ue.ROW_SPLITS,ROW_LIMITS:Ue.ROW_LIMITS,ROW_STARTS:Ue.ROW_STARTS};const n=[];for(const r of e){if(!(r in t))break;n.push(t[r])}return n}function Ve(e){return 0===e.length?0:e[0]===Ue.FIRST_DIM_SIZE?e.length-1:e.length}function qe(e,t){if(null!=e&&null!=t){var n=e.length,r=t.length;if(r<=n)throw new Error(`defaultValue.shape=${e} and ragged tensor flatValues.shape=${t}, are incompatible: defaultValue.rank = ${n} must be less than ragged tensor input flatValues.rank = ${r})`);for(let a=0;a<Math.min(n,r-1);++a){var i=e[a],o=t[a+1];if(0<=i&&0<=o&&1!==i&&i!==o)throw new Error(`defaultValue.shape=${e}, and ragged tensor input flatValues.shape=${t} are incompatible: defaultValue.shape[${a-e.length}] = ${i} but ragged tensor input.flatValues.shape[${a-e.length}] = `+o)}}}
/**
 * @license
 * Copyright 2017 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */(S=Ue=Ue||{})[S.FIRST_DIM_SIZE=0]="FIRST_DIM_SIZE",S[S.VALUE_ROWIDS=1]="VALUE_ROWIDS",S[S.ROW_LENGTHS=2]="ROW_LENGTHS",S[S.ROW_SPLITS=3]="ROW_SPLITS",S[S.ROW_LIMITS=4]="ROW_LIMITS",S[S.ROW_STARTS=5]="ROW_STARTS";const Ge=30;function We(e){return e<=Ge?e:Object(v.G)(e,Math.floor(Math.sqrt(e)))}
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function Ke(e,t,n){return[n*("number"==typeof e?e:e[0]),t*("number"==typeof e?e:e[1])]}
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function Ye(e,t,n,r=!0){let i=[];if(r)(i=i.concat(t.slice(0))).push(e[0]/n),i=i.concat(e.slice(1));else{i=i.concat(e[0]);var o=t.length;for(let n=0;n<o;++n)i=i.concat([e[n+1]/t[n],t[n]]);i=i.concat(e.slice(o+1))}return i}function Xe(e,t,n=!0){const r=[];if(n){r.push(t);for(let n=t+1;n<e;++n)n<=2*t?(r.push(n),r.push(n-(t+1))):r.push(n)}else{const n=[],i=[];for(let r=1;r<e;++r)(r>=2*t+1||r%2==1?i:n).push(r);r.push(...n),r.push(0),r.push(...i)}return r}function Je(e,t,n,r=!0){const i=[];r?i.push(e[0]/n):i.push(e[0]*n);for(let n=1;n<e.length;++n)n<=t.length?r?i.push(t[n-1]*e[n]):i.push(e[n]/t[n-1]):i.push(e[n]);return i}function Ze(e,t){const n=[0];for(let r=0;r<t;++r)n.push(e[r][0]);return n}function et(e,t,n){const r=e.slice(0,1);for(let i=0;i<n;++i)r.push(e[i+1]-t[i][0]-t[i][1]);return r}var tt=n(166);
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */const nt=.3275911,rt=.254829592,it=-.284496736,ot=1.421413741,at=-1.453152027,st=1.061405429;var ut=n(85);
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function ct(e,t){if(e.length!==t.length)throw new Error(`Cannot merge real and imag arrays of different lengths. real:${e.length}, imag: ${t.length}.`);const n=new Float32Array(2*e.length);for(let r=0;r<n.length;r+=2)n[r]=e[r/2],n[r+1]=t[r/2];return n}function lt(e){const t=new Float32Array(e.length/2),n=new Float32Array(e.length/2);for(let r=0;r<e.length;r+=2)t[r/2]=e[r],n[r/2]=e[r+1];return{real:t,imag:n}}function ht(e){var t=Math.ceil(e.length/4);const n=new Float32Array(t),r=new Float32Array(t);for(let t=0;t<e.length;t+=4)n[Math.floor(t/4)]=e[t],r[Math.floor(t/4)]=e[t+1];return{real:n,imag:r}}function ft(e){var t=Math.floor(e.length/4);const n=new Float32Array(t),r=new Float32Array(t);for(let t=2;t<e.length;t+=4)n[Math.floor(t/4)]=e[t],r[Math.floor(t/4)]=e[t+1];return{real:n,imag:r}}function dt(e,t){return{real:e[2*t],imag:e[2*t+1]}}function pt(e,t,n,r){e[2*r]=t,e[2*r+1]=n}function mt(e,t){const n=new Float32Array(e/2),r=new Float32Array(e/2);for(let o=0;o<Math.ceil(e/2);o++){var i=(t?2:-2)*Math.PI*(o/e);n[o]=Math.cos(i),r[o]=Math.sin(i)}return{real:n,imag:r}}function gt(e,t,n){return n=(n?2:-2)*Math.PI*(e/t),{real:Math.cos(n),imag:Math.sin(n)}}
/**
 * @license
 * Copyright 2021 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */const At=/->/g;function vt(e,t){var n=((e=e.replace(/\s/g,"")).length-e.replace(At,"").length)/"->".length;if(n<1)throw new Error("Equations without an arrow are not supported.");if(1<n)throw new Error('Equation must contain exactly one arrow ("->").');const[r,i]=e.split("->"),o=(Object(v.b)(-1===r.indexOf("..."),()=>'The ellipsis notation ("...") is not supported yet.'),r.split(","));var a=o.length;if(t!==a)throw new Error(`Expected ${a} input tensors, received `+t);if(2<a)throw new Error("Support for more than 2 input tensors is not implemented yet.");const s=[];for(let e=0;e<i.length;++e){const t=i[e];if(!o.some(e=>-1!==e.indexOf(t)))throw new Error(`Output subscripts contain the label ${t} not present in the input subscripts.`);-1===s.indexOf(t)&&s.push(t)}for(let e=0;e<r.length;++e){var u=r[e];-1===s.indexOf(u)&&","!==u&&s.push(u)}const c=new Array(o.length);for(let e=0;e<a;++e){if(new Set(o[e].split("")).size!==o[e].length)throw new Error(`Found duplicate axes in input component ${o[e]}. Support for duplicate axes in input is not implemented yet.`);c[e]=[];for(let t=0;t<o[e].length;++t)c[e].push(s.indexOf(o[e][t]))}var l=s.length;const h=[];for(let e=i.length;e<l;++e)h.push(e);return{allDims:s,summedDims:h,idDims:c}}function bt(e,t){let n=new Array(e);n.fill(-1);for(let e=0;e<t.length;++e)n[t[e]]=e;const r=[];for(let t=0;t<e;++t)-1===n[t]&&r.push(t);return{permutationIndices:n=n.filter(e=>-1!==e),expandDims:r}}function yt(e,t,n){const r=new Array(e);for(let e=0;e<n.length;++e){const i=n[e].shape;for(let n=0;n<t[e].length;++n)void 0===r[t[e][n]]?r[t[e][n]]=i[n]:Object(v.b)(r[t[e][n]]===i[n],()=>`Expected dimension ${r[t[e][n]]} at axis ${n} of input shaped ${JSON.stringify(i)}, but got dimension `+i[n])}}function wt(e,t){const n=e,r=[];var i;0===e.length&&n.push(-1),i=e.length+1;for(let e=0;e<i;++e)r.push([]);const o=[];for(let e=0;e<n.length;++e)for(const i of function(e,t){const n=[];for(let r=0;r<e.length;++r)0!==e[r].length&&-1===e[r].indexOf(t)&&-1!==t||n.push(r);return n}(t,n[e]))-1===o.indexOf(i)&&(r[e].push(i),o.push(i));return{path:n,steps:r}}function xt(e){return e.every((e,t)=>e===t)}function Ct(e,t,n=0){var r,i;return"number"==typeof t?(Object(v.b)(e.shape[n]%t==0,()=>"Number of splits must evenly divide the axis."),new Array(t).fill(e.shape[n]/t)):(r=t.reduce((e,t)=>(-1===t&&(e+=1),e),0),Object(v.b)(r<=1,()=>"There should be only one negative value in split array."),-1!==(r=t.indexOf(-1))&&(i=t.reduce((e,t)=>0<t?e+t:e),t[r]=e.shape[n]-i),Object(v.b)(e.shape[n]===t.reduce((e,t)=>e+t),()=>"The sum of sizes must match the size of the axis dimension."),t)}
/**
 * @license
 * Copyright 2021 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function kt(e){return"Received SparseTensor with denseShape[0] = 0 but\n  indices.shape[0] = "+e}function Et(e,t){return`indices(${e}, 0) is invalid: ${t} < 0`}function St(e,t,n){return`indices(${e}, 0) is invalid: ${t} >= `+n}
/**
 * @license
 * Copyright 2021 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function _t(e,t){return`only one output dimension may be -1, not both ${e} and `+t}function Ot(e,t){return`size ${e} must be non-negative, not `+t}function Tt(){return"reshape cannot infer the missing input size for an empty tensor unless all specified input sizes are non-zero"}function Dt(e,t){return`Input to reshape is a SparseTensor with ${Object(v.O)(e)}\n  dense values, but the requested shape requires a multiple of ${Object(v.O)(t)}. inputShape=${e} outputShape= `+t}function Bt(e,t){return`Input to reshape is a tensor with ${Object(v.O)(e)} dense values, but the requested shape has ${Object(v.O)(t)}. inputShape=${e} outputShape=`+t}
/**
 * @license
 * Copyright 2021 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function It(){return"segment ids must be >= 0"}function Mt(){return"segment ids are not increasing"}function jt(e,t){return`Segment id ${e} out of range [0, ${t}), possibly because segmentIds input is not sorted.`}function Nt(e,t,n){return`Bad: indices[${e}] == ${t} out of range [0, ${n})`
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */}function Ft(e,t){let n,r=!1;for(e<=Ge?(n=e,r=!0):n=Object(v.G)(e,Math.floor(Math.sqrt(e)));!r;)n>t||n===e?r=!0:n=Object(v.G)(e,n+1);return n}function Rt(e,t,n){const r=[];var i=e.length;for(let o=0;o<i;o++)o!==t?r.push(e[o]):r.push(n);return r}function Pt(e,t,n,r){var i=t.shape.length,o=e.shape.length;if(0!==r&&(r<-i||i<r))throw new Error(`Expect batchDims in the range of [-${i}, ${i}], but got `+r);if(r<0&&(r+=i),o<r)throw new Error(`batchDims (${r}) must be less than rank(x) (\n    ${o}).`);if(n<r)throw new Error(`batchDims (${r}) must be less than or equal to axis (${n}).`);for(let n=0;n<r;++n)if(e.shape[n]!==t.shape[n])throw new Error(`x.shape[${n}]: ${e.shape[n]} should be equal to indices.shape[${n}]: ${t.shape[n]}.`);var a=e.shape[n];const s=[];let u=1,c=1,l=1;for(let t=0;t<r;++t)s.push(e.shape[t]),u*=e.shape[t];for(let t=r;t<n;t++)s.push(e.shape[t]),c*=e.shape[t];for(let e=r;e<i;e++)s.push(t.shape[e]);for(let t=n+1;t<o;t++)s.push(e.shape[t]),l*=e.shape[t];return{batchSize:u,sliceSize:l,outerSize:c,dimSize:a,outputShape:s}}
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function Lt(e){try{return e.map(e=>Object(ue.decodeString)(e))}catch(e){throw new Error("Failed to decode encoded string bytes into utf-8, error: "+e)}}function Ut(e){return e.map(e=>Object(ue.encodeString)(e))}var zt=n(175),Ht=n(87),$t=n(208),Qt=n(164);n.d(t,"d",(function(){return be})),n.d(t,"e",(function(){return we})),n.d(t,"f",(function(){return ke})),n.d(t,"g",(function(){return _e})),n.d(t,"gc",(function(){return Te})),n.d(t,"rc",(function(){return ve})),n.d(t,"sc",(function(){return Be})),n.d(t,"zc",(function(){return De})),n.d(t,"Uc",(function(){return Oe})),n.d(t,"zd",(function(){return G.a})),n.d(t,"Ad",(function(){return G.b})),n.d(t,"Jd",(function(){return G.c})),n.d(t,"Ec",(function(){return Ie.a})),n.d(t,"ji",(function(){return Ie.b})),n.d(t,"Hi",(function(){return Ie.c})),n.d(t,"Md",(function(){return Me.b})),n.d(t,"Nd",(function(){return Me.c})),n.d(t,"Od",(function(){return Me.d})),n.d(t,"Pd",(function(){return Me.e})),n.d(t,"Qd",(function(){return Me.f})),n.d(t,"Rd",(function(){return Me.g})),n.d(t,"Sd",(function(){return Me.h})),n.d(t,"Td",(function(){return Me.i})),n.d(t,"Ud",(function(){return Me.j})),n.d(t,"Vd",(function(){return Me.k})),n.d(t,"Wd",(function(){return Me.l})),n.d(t,"Xd",(function(){return Me.m})),n.d(t,"Yd",(function(){return Me.n})),n.d(t,"Zd",(function(){return Me.o})),n.d(t,"ae",(function(){return Me.p})),n.d(t,"be",(function(){return Me.q})),n.d(t,"ee",(function(){return Me.r})),n.d(t,"je",(function(){return Me.w})),n.d(t,"fe",(function(){return Me.s})),n.d(t,"ge",(function(){return Me.t})),n.d(t,"he",(function(){return Me.u})),n.d(t,"ie",(function(){return Me.v})),n.d(t,"ke",(function(){return Me.x})),n.d(t,"me",(function(){return Me.z})),n.d(t,"ne",(function(){return Me.A})),n.d(t,"qe",(function(){return Me.B})),n.d(t,"re",(function(){return Me.C})),n.d(t,"se",(function(){return Me.D})),n.d(t,"te",(function(){return Me.E})),n.d(t,"ue",(function(){return Me.F})),n.d(t,"ve",(function(){return Me.G})),n.d(t,"we",(function(){return Me.H})),n.d(t,"xe",(function(){return Me.I})),n.d(t,"ye",(function(){return Me.J})),n.d(t,"ze",(function(){return Me.K})),n.d(t,"Ae",(function(){return Me.L})),n.d(t,"Be",(function(){return Me.M})),n.d(t,"Ce",(function(){return Me.N})),n.d(t,"De",(function(){return Me.O})),n.d(t,"Ee",(function(){return Me.P})),n.d(t,"Fe",(function(){return Me.Q})),n.d(t,"He",(function(){return Me.R})),n.d(t,"Ie",(function(){return Me.S})),n.d(t,"Ke",(function(){return Me.U})),n.d(t,"Le",(function(){return Me.V})),n.d(t,"Ne",(function(){return Me.W})),n.d(t,"Pe",(function(){return Me.X})),n.d(t,"Qe",(function(){return Me.Y})),n.d(t,"Se",(function(){return Me.Z})),n.d(t,"Te",(function(){return Me.ab})),n.d(t,"Xe",(function(){return Me.bb})),n.d(t,"Ye",(function(){return Me.cb})),n.d(t,"Ze",(function(){return Me.db})),n.d(t,"bf",(function(){return Me.fb})),n.d(t,"cf",(function(){return Me.gb})),n.d(t,"if",(function(){return Me.ib})),n.d(t,"jf",(function(){return Me.jb})),n.d(t,"kf",(function(){return Me.kb})),n.d(t,"lf",(function(){return Me.lb})),n.d(t,"mf",(function(){return Me.mb})),n.d(t,"nf",(function(){return Me.nb})),n.d(t,"of",(function(){return Me.ob})),n.d(t,"qf",(function(){return Me.qb})),n.d(t,"tf",(function(){return Me.rb})),n.d(t,"uf",(function(){return Me.sb})),n.d(t,"wf",(function(){return Me.ub})),n.d(t,"Ff",(function(){return Me.wb})),n.d(t,"Gf",(function(){return Me.xb})),n.d(t,"If",(function(){return Me.zb})),n.d(t,"Nf",(function(){return Me.Db})),n.d(t,"Of",(function(){return Me.Eb})),n.d(t,"Pf",(function(){return Me.Fb})),n.d(t,"Sf",(function(){return Me.Gb})),n.d(t,"Tf",(function(){return Me.Hb})),n.d(t,"Uf",(function(){return Me.Ib})),n.d(t,"Wf",(function(){return Me.Kb})),n.d(t,"Xf",(function(){return Me.Lb})),n.d(t,"Yf",(function(){return Me.Mb})),n.d(t,"Zf",(function(){return Me.Nb})),n.d(t,"ag",(function(){return Me.Ob})),n.d(t,"bg",(function(){return Me.Pb})),n.d(t,"cg",(function(){return Me.Qb})),n.d(t,"dg",(function(){return Me.Rb})),n.d(t,"eg",(function(){return Me.Sb})),n.d(t,"fg",(function(){return Me.Tb})),n.d(t,"gg",(function(){return Me.Ub})),n.d(t,"ig",(function(){return Me.Wb})),n.d(t,"jg",(function(){return Me.Xb})),n.d(t,"lg",(function(){return Me.Yb})),n.d(t,"mg",(function(){return Me.Zb})),n.d(t,"ng",(function(){return Me.ac})),n.d(t,"og",(function(){return Me.bc})),n.d(t,"pg",(function(){return Me.cc})),n.d(t,"qg",(function(){return Me.dc})),n.d(t,"sg",(function(){return Me.ec})),n.d(t,"tg",(function(){return Me.fc})),n.d(t,"ug",(function(){return Me.gc})),n.d(t,"vg",(function(){return Me.hc})),n.d(t,"wg",(function(){return Me.ic})),n.d(t,"xg",(function(){return Me.jc})),n.d(t,"zg",(function(){return Me.lc})),n.d(t,"Ag",(function(){return Me.mc})),n.d(t,"Bg",(function(){return Me.nc})),n.d(t,"Cg",(function(){return Me.oc})),n.d(t,"Fg",(function(){return Me.qc})),n.d(t,"Gg",(function(){return Me.rc})),n.d(t,"Hg",(function(){return Me.sc})),n.d(t,"Ig",(function(){return Me.tc})),n.d(t,"Kg",(function(){return Me.vc})),n.d(t,"Lg",(function(){return Me.wc})),n.d(t,"Mg",(function(){return Me.xc})),n.d(t,"Ng",(function(){return Me.yc})),n.d(t,"Og",(function(){return Me.zc})),n.d(t,"Pg",(function(){return Me.Ac})),n.d(t,"Qg",(function(){return Me.Bc})),n.d(t,"Rg",(function(){return Me.Cc})),n.d(t,"Sg",(function(){return Me.Dc})),n.d(t,"Tg",(function(){return Me.Ec})),n.d(t,"Ug",(function(){return Me.Fc})),n.d(t,"Wg",(function(){return Me.Gc})),n.d(t,"Xg",(function(){return Me.Hc})),n.d(t,"Yg",(function(){return Me.Ic})),n.d(t,"Zg",(function(){return Me.Jc})),n.d(t,"ah",(function(){return Me.Kc})),n.d(t,"bh",(function(){return Me.Lc})),n.d(t,"ch",(function(){return Me.Mc})),n.d(t,"dh",(function(){return Me.Nc})),n.d(t,"eh",(function(){return Me.Oc})),n.d(t,"gh",(function(){return Me.Pc})),n.d(t,"hh",(function(){return Me.Qc})),n.d(t,"lh",(function(){return Me.Rc})),n.d(t,"mh",(function(){return Me.Sc})),n.d(t,"oh",(function(){return Me.Tc})),n.d(t,"ph",(function(){return Me.Uc})),n.d(t,"qh",(function(){return Me.Vc})),n.d(t,"rh",(function(){return Me.Wc})),n.d(t,"sh",(function(){return Me.Xc})),n.d(t,"th",(function(){return Me.Yc})),n.d(t,"vh",(function(){return Me.ad})),n.d(t,"wh",(function(){return Me.bd})),n.d(t,"xh",(function(){return Me.cd})),n.d(t,"Bh",(function(){return Me.fd})),n.d(t,"Ch",(function(){return Me.gd})),n.d(t,"Gh",(function(){return Me.hd})),n.d(t,"Hh",(function(){return Me.id})),n.d(t,"Ih",(function(){return Me.jd})),n.d(t,"Kh",(function(){return Me.ld})),n.d(t,"Lh",(function(){return Me.md})),n.d(t,"Mh",(function(){return Me.nd})),n.d(t,"Nh",(function(){return Me.od})),n.d(t,"Oh",(function(){return Me.pd})),n.d(t,"Ph",(function(){return Me.qd})),n.d(t,"Qh",(function(){return Me.rd})),n.d(t,"Sh",(function(){return Me.sd})),n.d(t,"Th",(function(){return Me.td})),n.d(t,"Uh",(function(){return Me.ud})),n.d(t,"pf",(function(){return Me.pb})),n.d(t,"Hf",(function(){return Me.yb})),n.d(t,"Mf",(function(){return Me.Cb})),n.d(t,"uh",(function(){return Me.Zc})),n.d(t,"Yh",(function(){return Me.yd})),n.d(t,"Zh",(function(){return Me.zd})),n.d(t,"ai",(function(){return Me.Ad})),n.d(t,"bi",(function(){return Me.Bd})),n.d(t,"ci",(function(){return Me.Cd})),n.d(t,"di",(function(){return Me.Dd})),n.d(t,"ei",(function(){return Me.Ed})),n.d(t,"fi",(function(){return Me.Fd})),n.d(t,"hi",(function(){return Me.Hd})),n.d(t,"ii",(function(){return Me.Id})),n.d(t,"ki",(function(){return Me.Jd})),n.d(t,"li",(function(){return Me.Kd})),n.d(t,"mi",(function(){return Me.Ld})),n.d(t,"ni",(function(){return Me.Md})),n.d(t,"oi",(function(){return Me.Nd})),n.d(t,"pi",(function(){return Me.Od})),n.d(t,"qi",(function(){return Me.Pd})),n.d(t,"ri",(function(){return Me.Qd})),n.d(t,"si",(function(){return Me.Rd})),n.d(t,"wi",(function(){return Me.Sd})),n.d(t,"yi",(function(){return Me.Td})),n.d(t,"Bi",(function(){return Me.Vd})),n.d(t,"Ci",(function(){return Me.Wd})),n.d(t,"Fi",(function(){return Me.Xd})),n.d(t,"Gi",(function(){return Me.Yd})),n.d(t,"Ii",(function(){return Me.Zd})),n.d(t,"Mi",(function(){return Me.ae})),n.d(t,"Pi",(function(){return Me.be})),n.d(t,"Qi",(function(){return Me.ce})),n.d(t,"Ri",(function(){return Me.de})),n.d(t,"Si",(function(){return Me.ee})),n.d(t,"Jg",(function(){return Me.uc})),n.d(t,"oc",(function(){return Me.a})),n.d(t,"Jf",(function(){return Me.Ab})),n.d(t,"Vf",(function(){return Me.Jb})),n.d(t,"hg",(function(){return Me.Vb})),n.d(t,"Xh",(function(){return Me.xd})),n.d(t,"vf",(function(){return Me.tb})),n.d(t,"Jh",(function(){return Me.kd})),n.d(t,"Vh",(function(){return Me.vd})),n.d(t,"gi",(function(){return Me.Gd})),n.d(t,"le",(function(){return Me.y})),n.d(t,"Ai",(function(){return Me.Ud})),n.d(t,"Eg",(function(){return Me.pc})),n.d(t,"yg",(function(){return Me.kc})),n.d(t,"yh",(function(){return Me.dd})),n.d(t,"Ah",(function(){return Me.ed})),n.d(t,"Wh",(function(){return Me.wd})),n.d(t,"xf",(function(){return Me.vb})),n.d(t,"af",(function(){return Me.eb})),n.d(t,"ff",(function(){return Me.hb})),n.d(t,"Je",(function(){return Me.T})),n.d(t,"Kf",(function(){return Me.Bb})),n.d(t,"Ic",(function(){return je.a})),n.d(t,"zi",(function(){return Ne})),n.d(t,"ef",(function(){return ce.g})),n.d(t,"df",(function(){return ce.f})),n.d(t,"Ue",(function(){return ce.c})),n.d(t,"Oe",(function(){return ce.b})),n.d(t,"We",(function(){return ce.e})),n.d(t,"gf",(function(){return ce.h})),n.d(t,"rg",(function(){return ce.m})),n.d(t,"Vg",(function(){return ce.n})),n.d(t,"vi",(function(){return ce.t})),n.d(t,"Ve",(function(){return ce.d})),n.d(t,"Qf",(function(){return ce.l})),n.d(t,"xi",(function(){return ce.u})),n.d(t,"Eh",(function(){return ce.r})),n.d(t,"fh",(function(){return ce.o})),n.d(t,"zf",(function(){return ce.k})),n.d(t,"nh",(function(){return ce.q})),n.d(t,"rf",(function(){return ce.i})),n.d(t,"sf",(function(){return ce.j})),n.d(t,"ih",(function(){return ce.p})),n.d(t,"ce",(function(){return ce.a})),n.d(t,"Fh",(function(){return ce.s})),n.d(t,"Bf",(function(){return q.c})),n.d(t,"Af",(function(){return q.b})),n.d(t,"Cf",(function(){return q.d})),n.d(t,"kh",(function(){return q.f})),n.d(t,"jh",(function(){return q.e})),n.d(t,"Ei",(function(){return q.h})),n.d(t,"Di",(function(){return q.g})),n.d(t,"Ge",(function(){return q.a})),n.d(t,"Me",(function(){return ge.a})),n.d(t,"Df",(function(){return ge.b})),n.d(t,"Ef",(function(){return ge.c})),n.d(t,"Ki",(function(){return ge.d})),n.d(t,"Li",(function(){return ge.e})),n.d(t,"Ni",(function(){return ge.f})),n.d(t,"gb",(function(){return h.b})),n.d(t,"hf",(function(){return h.c})),n.d(t,"cb",(function(){return h.a})),n.d(t,"Oi",(function(){return"4.1.0"})),n.d(t,"Dg",(function(){return Fe.a})),n.d(t,"pe",(function(){return o})),n.d(t,"Lf",(function(){return r})),n.d(t,"kg",(function(){return i})),n.d(t,"Dh",(function(){return s})),n.d(t,"ui",(function(){return se})),n.d(t,"Ji",(function(){return ue})),n.d(t,"de",(function(){return c})),n.d(t,"oe",(function(){return $})),n.d(t,"ti",(function(){return ae})),n.d(t,"Rh",(function(){return ne})),n.d(t,"yf",(function(){return a})),n.d(t,"zh",(function(){return te})),n.d(t,"Re",(function(){return zt})),n.d(t,"Rf",(function(){return l})),n.d(t,"Fb",(function(){return Qt.b})),n.d(t,"S",(function(){return Qt.a})),n.d(t,"a",(function(){return V.a})),n.d(t,"b",(function(){return V.b})),n.d(t,"c",(function(){return V.c})),n.d(t,"h",(function(){return V.d})),n.d(t,"i",(function(){return V.e})),n.d(t,"j",(function(){return V.f})),n.d(t,"k",(function(){return V.g})),n.d(t,"l",(function(){return V.h})),n.d(t,"m",(function(){return V.i})),n.d(t,"n",(function(){return V.j})),n.d(t,"o",(function(){return V.k})),n.d(t,"p",(function(){return V.l})),n.d(t,"r",(function(){return V.n})),n.d(t,"q",(function(){return V.m})),n.d(t,"s",(function(){return V.o})),n.d(t,"v",(function(){return V.r})),n.d(t,"t",(function(){return V.p})),n.d(t,"u",(function(){return V.q})),n.d(t,"w",(function(){return V.s})),n.d(t,"x",(function(){return V.t})),n.d(t,"y",(function(){return V.u})),n.d(t,"A",(function(){return V.w})),n.d(t,"z",(function(){return V.v})),n.d(t,"B",(function(){return V.x})),n.d(t,"C",(function(){return V.y})),n.d(t,"D",(function(){return V.z})),n.d(t,"E",(function(){return V.A})),n.d(t,"F",(function(){return V.B})),n.d(t,"G",(function(){return V.C})),n.d(t,"H",(function(){return V.D})),n.d(t,"I",(function(){return V.E})),n.d(t,"J",(function(){return V.F})),n.d(t,"K",(function(){return V.G})),n.d(t,"L",(function(){return V.H})),n.d(t,"M",(function(){return V.I})),n.d(t,"N",(function(){return V.J})),n.d(t,"O",(function(){return V.K})),n.d(t,"Q",(function(){return V.M})),n.d(t,"R",(function(){return V.N})),n.d(t,"P",(function(){return V.L})),n.d(t,"T",(function(){return V.O})),n.d(t,"U",(function(){return V.P})),n.d(t,"V",(function(){return V.Q})),n.d(t,"W",(function(){return V.R})),n.d(t,"X",(function(){return V.S})),n.d(t,"Y",(function(){return V.T})),n.d(t,"Z",(function(){return V.U})),n.d(t,"bb",(function(){return V.W})),n.d(t,"ab",(function(){return V.V})),n.d(t,"Gc",(function(){return V.sc})),n.d(t,"db",(function(){return V.X})),n.d(t,"eb",(function(){return V.Y})),n.d(t,"fb",(function(){return V.Z})),n.d(t,"ib",(function(){return V.bb})),n.d(t,"hb",(function(){return V.ab})),n.d(t,"jb",(function(){return V.cb})),n.d(t,"kb",(function(){return V.db})),n.d(t,"lb",(function(){return V.eb})),n.d(t,"mb",(function(){return V.fb})),n.d(t,"nb",(function(){return V.gb})),n.d(t,"ob",(function(){return V.hb})),n.d(t,"pb",(function(){return V.ib})),n.d(t,"qb",(function(){return V.jb})),n.d(t,"sb",(function(){return V.lb})),n.d(t,"wb",(function(){return V.pb})),n.d(t,"vb",(function(){return V.ob})),n.d(t,"xb",(function(){return V.qb})),n.d(t,"yb",(function(){return V.rb})),n.d(t,"Ab",(function(){return V.tb})),n.d(t,"zb",(function(){return V.sb})),n.d(t,"Bb",(function(){return V.ub})),n.d(t,"Cb",(function(){return V.vb})),n.d(t,"Db",(function(){return V.wb})),n.d(t,"Eb",(function(){return V.xb})),n.d(t,"Ib",(function(){return V.Ab})),n.d(t,"Jb",(function(){return V.Bb})),n.d(t,"Kb",(function(){return V.Cb})),n.d(t,"Lb",(function(){return V.Db})),n.d(t,"Mb",(function(){return V.Eb})),n.d(t,"Nb",(function(){return V.Fb})),n.d(t,"Pb",(function(){return V.Hb})),n.d(t,"Qb",(function(){return V.Ib})),n.d(t,"Rb",(function(){return V.Jb})),n.d(t,"Sb",(function(){return V.Kb})),n.d(t,"Ob",(function(){return V.Gb})),n.d(t,"Tb",(function(){return V.Lb})),n.d(t,"Gb",(function(){return V.yb})),n.d(t,"Hb",(function(){return V.zb})),n.d(t,"Ub",(function(){return V.Mb})),n.d(t,"ac",(function(){return V.Sb})),n.d(t,"Vb",(function(){return V.Nb})),n.d(t,"Yb",(function(){return V.Qb})),n.d(t,"Wb",(function(){return V.Ob})),n.d(t,"Xb",(function(){return V.Pb})),n.d(t,"Zb",(function(){return V.Rb})),n.d(t,"bc",(function(){return V.Tb})),n.d(t,"cc",(function(){return V.Ub})),n.d(t,"dc",(function(){return V.Vb})),n.d(t,"ec",(function(){return V.Wb})),n.d(t,"fc",(function(){return V.Xb})),n.d(t,"hc",(function(){return V.Yb})),n.d(t,"ic",(function(){return V.Zb})),n.d(t,"jc",(function(){return V.ac})),n.d(t,"nc",(function(){return V.ec})),n.d(t,"kc",(function(){return V.bc})),n.d(t,"lc",(function(){return V.cc})),n.d(t,"mc",(function(){return V.dc})),n.d(t,"qc",(function(){return V.gc})),n.d(t,"pc",(function(){return V.fc})),n.d(t,"tc",(function(){return V.hc})),n.d(t,"uc",(function(){return V.ic})),n.d(t,"vc",(function(){return V.jc})),n.d(t,"wc",(function(){return V.kc})),n.d(t,"xc",(function(){return V.lc})),n.d(t,"yc",(function(){return V.mc})),n.d(t,"Ac",(function(){return V.nc})),n.d(t,"Bc",(function(){return V.oc})),n.d(t,"Cc",(function(){return V.pc})),n.d(t,"Dc",(function(){return V.qc})),n.d(t,"Fc",(function(){return V.rc})),n.d(t,"Hc",(function(){return V.tc})),n.d(t,"Jc",(function(){return V.uc})),n.d(t,"Lc",(function(){return V.wc})),n.d(t,"Oc",(function(){return V.zc})),n.d(t,"Pc",(function(){return V.Ac})),n.d(t,"Mc",(function(){return V.xc})),n.d(t,"Nc",(function(){return V.yc})),n.d(t,"Kc",(function(){return V.vc})),n.d(t,"Qc",(function(){return V.Bc})),n.d(t,"Sc",(function(){return V.Dc})),n.d(t,"Tc",(function(){return V.Ec})),n.d(t,"Vc",(function(){return V.Fc})),n.d(t,"Wc",(function(){return V.Gc})),n.d(t,"Xc",(function(){return V.Hc})),n.d(t,"Yc",(function(){return V.Ic})),n.d(t,"dd",(function(){return V.Nc})),n.d(t,"bd",(function(){return V.Lc})),n.d(t,"cd",(function(){return V.Mc})),n.d(t,"ad",(function(){return V.Kc})),n.d(t,"Zc",(function(){return V.Jc})),n.d(t,"fd",(function(){return V.Pc})),n.d(t,"nd",(function(){return V.Xc})),n.d(t,"wd",(function(){return V.gd})),n.d(t,"gd",(function(){return V.Qc})),n.d(t,"md",(function(){return V.Wc})),n.d(t,"ed",(function(){return V.Oc})),n.d(t,"hd",(function(){return V.Rc})),n.d(t,"id",(function(){return V.Sc})),n.d(t,"jd",(function(){return V.Tc})),n.d(t,"kd",(function(){return V.Uc})),n.d(t,"ld",(function(){return V.Vc})),n.d(t,"pd",(function(){return V.Zc})),n.d(t,"od",(function(){return V.Yc})),n.d(t,"rd",(function(){return V.bd})),n.d(t,"sd",(function(){return V.cd})),n.d(t,"td",(function(){return V.dd})),n.d(t,"ud",(function(){return V.ed})),n.d(t,"vd",(function(){return V.fd})),n.d(t,"xd",(function(){return V.hd})),n.d(t,"yd",(function(){return V.id})),n.d(t,"Bd",(function(){return V.jd})),n.d(t,"Cd",(function(){return V.kd})),n.d(t,"Dd",(function(){return V.ld})),n.d(t,"Ed",(function(){return V.md})),n.d(t,"Fd",(function(){return V.nd})),n.d(t,"Gd",(function(){return V.od})),n.d(t,"Hd",(function(){return V.pd})),n.d(t,"Id",(function(){return V.qd})),n.d(t,"Kd",(function(){return V.rd})),n.d(t,"qd",(function(){return V.ad})),n.d(t,"rb",(function(){return V.kb})),n.d(t,"Rc",(function(){return V.Cc})),n.d(t,"Ld",(function(){return V.sd})),n.d(t,"tb",(function(){return V.mb})),n.d(t,"ub",(function(){return V.nb}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
const r={float32:4,float16:2,int32:4,uint16:2,uint8:1,bool:1,complex64:8}},function(e,t,n){var r;r=function(e){e.version="1.0.2";var t=Math;function n(e,t){for(var n=0,r=0;n<e.length;++n)r=t*r+e[n];return r}function r(e,t,n,r,i){if(0===t)return n;if(1===t)return r;for(var o=2/e,a=r,s=1;s<t;++s)a=r*s*o+i*n,n=r,r=a;return a}function i(e,t,n,i,o){return function(n,a){if(i){if(0===n)return 1==i?-1/0:1/0;if(n<0)return NaN}return 0===a?e(n):1===a?t(n):a<0?NaN:r(n,a|=0,e(n),t(n),o)}}o=[57568490574,-13362590354,651619640.7,-11214424.18,77392.33017,-184.9052456].reverse(),a=[57568490411,1029532985,9494680.718,59272.64853,267.8532712,1].reverse(),s=[1,-.001098628627,2734510407e-14,-2073370639e-15,2.093887211e-7].reverse(),u=[-.01562499995,.0001430488765,-6911147651e-15,7.621095161e-7,-9.34935152e-8].reverse(),c=[72362614232,-7895059235,242396853.1,-2972611.439,15704.4826,-30.16036606].reverse(),l=[144725228442,2300535178,18583304.74,99447.43394,376.9991397,1].reverse(),h=[1,.00183105,-3516396496e-14,2457520174e-15,-2.40337019e-7].reverse(),f=[.04687499995,-.0002002690873,8449199096e-15,-8.8228987e-7,1.05787412e-7].reverse();var o,a,s,u,c,l,h,f,d=function e(n,i){if(i=Math.round(i),!isFinite(n))return isNaN(n)?n:0;if(i<0)return(i%2?-1:1)*e(n,-i);if(n<0)return(i%2?-1:1)*e(-n,i);if(0===i)return p(n);if(1===i)return m(n);if(0===n)return 0;var o=0;if(i<n)o=r(n,i,p(n),m(n),-1);else{for(var a,s=!1,u=0,c=0,l=1,h=2/n,f=2*t.floor((i+t.floor(t.sqrt(40*i)))/2);0<f;f--)a=f*h*l-u,u=l,1e10<t.abs(l=a)&&(l*=1e-10,u*=1e-10,o*=1e-10,c*=1e-10),s&&(c+=l),s=!s,f==i&&(o=u);o/=c=2*c-l}return o};function p(e){var r,i=0,c=0,l=e*e;return e<8?(i=n(o,l))/(c=n(a,l)):(r=e-.785398164,i=n(s,l=64/l),c=n(u,l),t.sqrt(.636619772/e)*(t.cos(r)*i-t.sin(r)*c*8/e))}function m(e){var r=0,i=0,o=0,a=e*e,s=t.abs(e)-2.356194491;return Math.abs(e)<8?r=(i=e*n(c,a))/(o=n(l,a)):(i=n(h,a=64/a),o=n(f,a),r=t.sqrt(.636619772/t.abs(e))*(t.cos(s)*i-t.sin(s)*o*8/t.abs(e)),e<0&&(r=-r)),r}g=.636619772,A=[-2957821389,7062834065,-512359803.6,10879881.29,-86327.92757,228.4622733].reverse(),v=[40076544269,745249964.8,7189466.438,47447.2647,226.1030244,1].reverse(),b=[1,-.001098628627,2734510407e-14,-2073370639e-15,2.093887211e-7].reverse(),y=[-.01562499995,.0001430488765,-6911147651e-15,7.621095161e-7,-9.34945152e-8].reverse(),w=[-4900604943e3,127527439e4,-51534381390,734926455.1,-4237922.726,8511.937935].reverse(),x=[249958057e5,424441966400,3733650367,22459040.02,102042.605,354.9632885,1].reverse(),C=[1,.00183105,-3516396496e-14,2457520174e-15,-2.40337019e-7].reverse(),k=[.04687499995,-.0002002690873,8449199096e-15,-8.8228987e-7,1.05787412e-7].reverse();var g,A,v,b,y,w,x,C,k,E,S,_,O,T,D,B,I,M=i((function(e){var r=0,i=0,o=e*e,a=e-.785398164;return e<8?(r=n(A,o))/(i=n(v,o))+g*d(e,0)*t.log(e):(r=n(b,o=64/o),i=n(y,o),t.sqrt(g/e)*(t.sin(a)*r+t.cos(a)*i*8/e))}),(function(e){var r=0,i=0,o=e*e,a=e-2.356194491;return e<8?(r=e*n(w,o))/(i=n(x,o))+g*(d(e,1)*t.log(e)-1/e):(r=n(C,o=64/o),i=n(k,o),t.sqrt(g/e)*(t.sin(a)*r+t.cos(a)*i*8/e))}),0,1,-1),j=(E=[1,3.5156229,3.0899424,1.2067492,.2659732,.0360768,.0045813].reverse(),S=[.39894228,.01328592,.00225319,-.00157565,.00916281,-.02057706,.02635537,-.01647633,.00392377].reverse(),_=[.5,.87890594,.51498869,.15084934,.02658733,.00301532,32411e-8].reverse(),O=[.39894228,-.03988024,-.00362018,.00163801,-.01031555,.02282967,-.02895312,.01787654,-.00420059].reverse(),function e(r,i){if(0===(i=Math.round(i)))return(o=r)<=3.75?n(E,o*o/14.0625):t.exp(t.abs(o))/t.sqrt(t.abs(o))*n(S,3.75/t.abs(o));var o;if(1===i)return(o=r)<3.75?o*n(_,o*o/14.0625):(o<0?-1:1)*t.exp(t.abs(o))/t.sqrt(t.abs(o))*n(O,3.75/t.abs(o));if(i<0)return NaN;if(0===t.abs(r))return 0;if(r==1/0)return 1/0;for(var a,s=0,u=2/t.abs(r),c=0,l=1,h=2*t.round((i+t.round(t.sqrt(40*i)))/2);0<h;h--)a=h*u*l+c,c=l,1e10<t.abs(l=a)&&(l*=1e-10,c*=1e-10,s*=1e-10),h==i&&(s=c);return s*=e(r,0)/l,r<0&&i%2?-s:s}),N=(T=[-.57721566,.4227842,.23069756,.0348859,.00262698,1075e-7,74e-7].reverse(),D=[1.25331414,-.07832358,.02189568,-.01062446,.00587872,-.0025154,53208e-8].reverse(),B=[1,.15443144,-.67278579,-.18156897,-.01919402,-.00110404,-4686e-8].reverse(),I=[1.25331414,.23498619,-.0365562,.01504268,-.00780353,.00325614,-68245e-8].reverse(),i((function(e){return e<=2?-t.log(e/2)*j(e,0)+n(T,e*e/4):t.exp(-e)/t.sqrt(e)*n(D,2/e)}),(function(e){return e<=2?t.log(e/2)*j(e,1)+1/e*n(B,e*e/4):t.exp(-e)/t.sqrt(e)*n(I,2/e)}),0,2,1));e.besselj=d,e.bessely=M,e.besseli=j,e.besselk=N},"undefined"==typeof DO_NOT_EXPORT_BESSEL?r(t):r({})},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=(i=i=n(75))&&i.__esModule?i:{default:i},o=n(158);n=function(e){var t=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);function n(e,t){if(this instanceof n)return(t=function(e,t){if(e)return!t||"object"!=typeof t&&"function"!=typeof t?e:t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e.substring(1),t))).bytes=e.split("").map((function(e){return e.charCodeAt(0)})),t;throw new TypeError("Cannot call a class as a function")}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e),function(e,t,n){t&&r(e.prototype,t),n&&r(e,n)}(n,[{key:"valid",value:function(){return/^[\x00-\x7F\xC8-\xD3]+$/.test(this.data)}},{key:"encode",value:function(){var e=this.bytes,t=e.shift()-105,r=o.SET_BY_CODE[t];if(void 0===r)throw new RangeError("The encoding does not start with a start character.");return!0===this.shouldEncodeAsEan128()&&e.unshift(o.FNC1),e=n.next(e,1,r),{text:this.text===this.data?this.text.replace(/[^\x20-\x7E]/g,""):this.text,data:n.getBar(t)+e.result+n.getBar((e.checksum+t)%o.MODULO)+n.getBar(o.STOP)}}},{key:"shouldEncodeAsEan128",value:function(){var e=this.options.ean128||!1;return"string"==typeof e?"true"===e.toLowerCase():e}}],[{key:"getBar",value:function(e){return o.BARS[e]?o.BARS[e].toString():""}},{key:"correctIndex",value:function(e,t){var n;return t===o.SET_A?(n=e.shift())<32?n+64:n-32:t===o.SET_B?e.shift()-32:10*(e.shift()-48)+e.shift()-48}},{key:"next",value:function(e,t,r){var i,a,s;return e.length?(i=void 0,s=200<=e[0]?(i=e.shift()-105,void 0!==(a=o.SWAP[i])?n.next(e,t+1,a):(r!==o.SET_A&&r!==o.SET_B||i!==o.SHIFT||(e[0]=r===o.SET_A?95<e[0]?e[0]-96:e[0]:e[0]<32?e[0]+96:e[0]),n.next(e,t+1,r))):(i=n.correctIndex(e,r),n.next(e,t+1,r)),{result:n.getBar(i)+s.result,checksum:i*t+s.checksum}):{result:"",checksum:0}}}]),n}(i.default),t.default=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mod10=function(e){for(var t=0,n=0;n<e.length;n++){var r=parseInt(e[n]);(n+e.length)%2==0?t+=r:t+=2*r%10+Math.floor(2*r/10)}return(10-t%10)%10},t.mod11=function(e){for(var t=0,n=[2,3,4,5,6,7],r=0;r<e.length;r++){var i=parseInt(e[e.length-1-r]);t+=n[r%n.length]*i}return(11-t%11)%11}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e};t.default=function(e,t){return r({},e,t)}},function(e,t,n){var r,i,o;e.exports=(e=n(39),o=(n=e).lib,r=o.Base,i=o.WordArray,(o=n.x64={}).Word=r.extend({init:function(e,t){this.high=e,this.low=t}}),o.WordArray=r.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:8*e.length},toX32:function(){for(var e=this.words,t=e.length,n=[],r=0;r<t;r++){var o=e[r];n.push(o.high),n.push(o.low)}return i.create(n,this.sigBytes)},clone:function(){for(var e=r.clone.call(this),t=e.words=this.words.slice(0),n=t.length,i=0;i<n;i++)t[i]=t[i].clone();return e}}),e)},function(e,t,n){"use strict";let r;function i(e){r=e}function o(e){if(void 0!==r)return r;if(e||"undefined"!=typeof navigator&&null!=navigator){if("ReactNative"===(e=e||navigator).product)return!0;const t=e.userAgent||e.vendor||("undefined"!=typeof window?window.opera:"");return t?/(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(t)||/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(t.substr(0,4)):(e=e).userAgentData&&e.userAgentData.mobile}return!1}function a(){return"undefined"!=typeof window&&null!=window.document||"undefined"!=typeof WorkerGlobalScope}n.r(t),n.d(t,"mockIsMobile",(function(){return i})),n.d(t,"isMobile",(function(){return o})),n.d(t,"isBrowser",(function(){return a}))},function(e,t,n){"use strict";
/**
 * @license
 * Copyright 2020 Google Inc. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function r(e,t=0){}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({all_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t=null,n=!1){return e=Object(o.a)(e,"x","all","bool"),r.a.runKernel(i.f,{x:e},{axis:t,keepDims:n})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({any_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t=null,n=!1){return e=Object(o.a)(e,"x","any","bool"),r.a.runKernel(i.g,{x:e},{axis:t,keepDims:n})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({argMax_:
/**
 * @license
 * Copyright 2020 Google Inc. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t=0){return e=Object(o.a)(e,"x","argMax"),r.a.runKernel(i.h,{x:e},{axis:t})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({argMin_:
/**
 * @license
 * Copyright 2020 Google Inc. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t=0){return e=Object(o.a)(e,"x","argMin"),r.a.runKernel(i.i,{x:e},{axis:t})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(6),i=n(4),o=n(28),a=n(3);t=n(5);const s=Object(t.b)({atan2_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t){return e=Object(a.a)(e,"a","atan2"),t=Object(a.a)(t,"b","atan2"),[e,t]=Object(o.makeTypesMatch)(e,t),e={a:e,b:t},r.a.runKernel(i.m,e)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(3),i=n(10),o=n(77),a=n(29),s=(t=n(5),n(9));const u=Object(t.b)({conv1d_:function(e,t,n,u,c="NWC",l=1,h){e=Object(r.a)(e,"x","conv1d");const f=Object(r.a)(t,"filter","conv1d");let d=e,p=!1;2===e.rank&&(p=!0,d=Object(s.a)(e,[1,e.shape[0],e.shape[1]])),i.b(3===d.rank,()=>`Error in conv1d: input must be rank 3, but got rank ${d.rank}.`),i.b(3===f.rank,()=>"Error in conv1d: filter must be rank 3, but got rank "+f.rank+"."),a.a("conv1d",u,h),i.b(d.shape[2]===f.shape[1],()=>`Error in conv1d: depth of input (${d.shape[2]}) must match input depth for filter ${f.shape[1]}.`),i.b(a.i(n,l),()=>`Error in conv1D: Either stride or dilation must be 1. Got stride ${n} and dilation '${l}'`),i.b("NWC"===c,()=>`Error in conv1d: got dataFormat of ${c} but only NWC is currently supported.`);t=Object(s.a)(f,[1,f.shape[0],f.shape[1],f.shape[2]]),e=Object(s.a)(d,[d.shape[0],1,d.shape[1],d.shape[2]]);var m=[1,n],g=[1,l];e=Object(o.a)(e,t,m,u,"NHWC",g,h);return p?Object(s.a)(e,[e.shape[2],e.shape[3]]):Object(s.a)(e,[e.shape[0],e.shape[2],e.shape[3]])}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(3),i=n(152);t=n(5);const o=Object(t.b)({conv2dTranspose_:function(e,t,n,o,a,s){return e=Object(r.a)(e,"x","conv2dTranspose"),t=Object(r.a)(t,"filter","conv2dTranspose"),Object(i.a)(n,e,t,o,a,"NHWC",s)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({cosh_:
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){return e=Object(o.a)(e,"x","cosh","float32"),r.a.runKernel(i.K,{x:e})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(6),i=n(4),o=n(3),a=n(10);t=n(5);const s=Object(t.b)({depthToSpace_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t,n="NHWC"){const s=Object(o.a)(e,"x","depthToSpace","float32"),u="NHWC"===n?s.shape[1]:s.shape[2],c="NHWC"===n?s.shape[2]:s.shape[3],l="NHWC"===n?s.shape[3]:s.shape[1];return a.b(1<t,()=>"blockSize should be > 1 for depthToSpace, but was: "+t),a.b(0<=u*t,()=>`Negative dimension size caused by overflow when multiplying\n    ${u} and ${t}  for depthToSpace with input shape\n    `+s.shape),a.b(0<=c*t,()=>`Negative dimension size caused by overflow when multiplying\n    ${c} and ${t} for depthToSpace with input shape\n        `+s.shape),a.b(l%(t*t)==0,()=>`Dimension size must be evenly divisible by ${t*t} but is ${l} for depthToSpace with input shape `+s.shape),e={x:s},r.a.runKernel(i.P,e,{blockSize:t,dataFormat:n})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(6),i=n(4),o=n(3),a=n(10),s=(t=n(5),n(9));const u=Object(t.b)({dilation2d_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t,n,u,c=[1,1],l="NHWC"){const h=Object(o.a)(e,"x","dilation2d"),f=Object(o.a)(t,"filter","dilation2d");a.b(3===h.rank||4===h.rank,()=>"Error in dilation2d: input must be rank 3 or 4, but got rank "+h.rank+"."),a.b(3===f.rank,()=>"Error in dilation2d: filter must be rank 3, but got rank "+f.rank+"."),a.b("NHWC"===l,()=>"Error in dilation2d: Only NHWC is currently supported, but got dataFormat of "+l);let d=h,p=!1;return 3===h.rank&&(d=Object(s.a)(h,[1,h.shape[0],h.shape[1],h.shape[2]]),p=!0),e={x:d,filter:f},t=r.a.runKernel(i.U,e,{strides:n,pad:u,dilations:c}),p?Object(s.a)(t,[t.shape[1],t.shape[2],t.shape[3]]):t}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(28),i=n(3),o=n(18),a=n(106),s=(t=n(5),n(42)),u=n(23);const c=Object(t.b)({divNoNan_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t){e=Object(i.a)(e,"a","div"),t=Object(i.a)(t,"b","div"),[e,t]=Object(r.makeTypesMatch)(e,t),e=Object(o.a)(e,t);var n=Object(u.a)(e);t=Object(a.a)(t,n);return Object(s.a)(t,n,e)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(3),i=n(10),o=n(30),a=(t=n(5),n(9));const s=Object(t.b)({dot_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t){const n=Object(r.a)(e,"t1","dot"),s=Object(r.a)(t,"t2","dot"),u=(i.b(!(1!==n.rank&&2!==n.rank||1!==s.rank&&2!==s.rank),()=>`Error in dot: inputs must all be rank 1 or 2, but got ranks ${n.rank} and ${s.rank}.`),1===n.rank?n.size:n.shape[1]),c=1===s.rank?s.size:s.shape[0];return i.b(u===c,()=>`Error in dot: inner dimensions of inputs must match, but got ${u} and ${c}.`),1===n.rank&&1===s.rank?(e=Object(a.a)(n,[1,-1]),t=Object(a.a)(s,[-1,1]),e=Object(o.a)(e,t),Object(a.a)(e,[])):1===n.rank&&2===s.rank?(t=Object(a.a)(n,[1,-1]),e=Object(a.a)(s,[s.shape[0],s.shape[1]]),t=Object(o.a)(t,e),Object(a.a)(t,[t.size])):2===n.rank&&1===s.rank?(e=Object(a.a)(s,[-1,1]),t=Object(o.a)(n,e),Object(a.a)(t,[t.size])):(e=Object(a.a)(s,[s.shape[0],s.shape[1]]),Object(o.a)(n,e))}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(107);t=n(5);const i=Object(t.b)({euclideanNorm_:
/**
 * @license
 * Copyright 2022 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t=null,n=!1){return Object(r.a)(e,"euclidean",t,n)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(6),i=n(4),o=n(3),a=n(10),s=(t=n(5),n(9));const u=Object(t.b)({localResponseNormalization_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t=5,n=1,u=1,c=.5){const l=Object(o.a)(e,"x","localResponseNormalization");a.b(4===l.rank||3===l.rank,()=>`Error in localResponseNormalization: x must be rank 3 or 4 but got\n               rank ${l.rank}.`),a.b(a.v(t),()=>`Error in localResponseNormalization: depthRadius must be an integer but got depthRadius ${t}.`);let h=l,f=!1;return 3===l.rank&&(f=!0,h=Object(s.a)(l,[1,l.shape[0],l.shape[1],l.shape[2]])),e={x:h},e=r.a.runKernel(i.yb,e,{depthRadius:t,bias:n,alpha:u,beta:c}),f?Object(s.a)(e,[e.shape[1],e.shape[2],e.shape[3]]):e}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({log1p_:
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){return e=Object(o.a)(e,"x","log1p"),r.a.runKernel(i.Fb,{x:e})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({softplus_:
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){return e=Object(o.a)(e,"x","softplus"),r.a.runKernel(i.Pc,{x:e})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(3),i=n(20),o=n(68),a=n(110),s=n(142);t=n(5);const u=Object(t.b)({logicalXor_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t){var n=Object(r.a)(e,"a","logicalXor","bool"),u=Object(r.a)(t,"b","logicalXor","bool");return Object(i.assertAndGetBroadcastShape)(n.shape,u.shape),Object(o.a)(Object(s.a)(e,t),Object(a.a)(Object(o.a)(e,t)))}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(6),i=n(4),o=n(3),a=n(10);t=n(5);const s=Object(t.b)({mirrorPad_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t,n){a.b("reflect"===n||"symmetric"===n,()=>`Invalid mode. Mode must be either reflect or symmetric. Got ${n}.`);const s=Object(o.a)(e,"x","mirrorPad");if(0===s.rank)throw new Error("mirrorPad(scalar) is not defined. Pass non-scalar to mirrorPad");a.b(t.length===s.rank,()=>`Padding doesn't match input. Must be ${s.rank}. Got ${t.length}.`);const u="reflect"===n?1:0;for(let e=0;e<s.rank;e++)a.b(2===t[e].length,()=>"Invalid number of paddings. Must be length of 2 each."),a.b(0<=t[e][0]&&t[e][0]<=s.shape[e]-u&&0<=t[e][1]&&t[e][1]<=s.shape[e]-u,()=>`Padding in dimension ${e} cannot be greater than or equal to ${s.shape[e]-u} or less than 0 for input of shape `+s.shape);return e={x:s},r.a.runKernel(i.Wb,e,{paddings:t,mode:n})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(6),i=n(4),o=n(28),a=n(3);t=n(5);const s=Object(t.b)({mod_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t){return e=Object(a.a)(e,"a","mod"),t=Object(a.a)(t,"b","mod"),[e,t]=Object(o.makeTypesMatch)(e,t),e={a:e,b:t},r.a.runKernel(i.Xb,e)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(3),i=n(10),o=n(134),a=n(104),s=n(29),u=n(143),c=(t=n(5),n(9)),l=n(111);const h=Object(t.b)({pool_:
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t,n,h,f,d,p){null==f&&(f=[1,1]),null==d&&(d=1),0===h&&(h="valid");let m=e=Object(r.a)(e,"x","maxPool"),g=!1;3===e.rank&&(g=!0,m=Object(c.a)(e,[1,e.shape[0],e.shape[1],e.shape[2]])),i.b(s.i(d,f),()=>`Error in pool: Either strides or dilations must be 1. Got strides ${d} and dilations '${f}'`);var A=[(e=s.f(m.shape,t,d,f,h)).dilationHeight,e.dilationWidth];let v;v="same"===h?function(e,t){const n=e.map((e,n)=>e+(e-1)*(t[n]-1)).map(e=>e-1),r=n.map(e=>Math.floor(e/2)),i=n.map((e,t)=>e-r[t]);return n.map((e,t)=>[r[t],i[t]])}([e.filterHeight,e.filterWidth],A):[[0,0],[0,0]];var b=1===A[0]&&1===A[1],[e,y]=function(e,t,n){const r=n.map(e=>e[0]),i=n.map(e=>e[1]),o=e.concat(r,i),a=t.map((e,t)=>(e-o[t]%e)%e),s=i.map((e,t)=>e+a[t]);return[t.map((e,t)=>[r[t],s[t]]),t.map((e,t)=>[0,a[t]])]}([e.inHeight,e.inWidth],A,v);const w=b?h:"valid",x=b?m:Object(l.a)(m,A,e);return h=("avg"===n?()=>Object(o.a)(x,t,d,w,p):()=>Object(u.a)(x,t,d,w,p))(),e=b?h:Object(a.a)(h,A,y),g?Object(c.a)(e,[e.shape[1],e.shape[2],e.shape[3]]):e}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(6),i=n(4),o=n(3),a=n(15);t=n(5);const s=Object(t.b)({prod_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t=null,n=!1){let s=Object(o.a)(e,"x","prod");return e={x:s="bool"===s.dtype?Object(a.a)(s,"int32"):s},r.a.runKernel(i.mc,e,{axis:t,keepDims:n})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({round_:
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){return e=Object(o.a)(e,"x","round"),r.a.runKernel(i.Dc,{x:e})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({rsqrt_:
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){return e=Object(o.a)(e,"x","rsqrt","float32"),r.a.runKernel(i.Ec,{x:e})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({selu_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){return e=Object(o.a)(e,"x","selu"),r.a.runKernel(i.Ic,{x:e})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(3),i=n(10),o=n(77),a=n(105),s=(t=n(5),n(9));const u=Object(t.b)({separableConv2d_:function(e,t,n,u,c,l=[1,1],h="NHWC"){e=Object(r.a)(e,"x","separableConv2d");const f=Object(r.a)(t,"depthwiseFilter","separableConv2d"),d=Object(r.a)(n,"pointwiseFilter","separableConv2d");let p=e,m=!1;if(3===e.rank&&(m=!0,p=Object(s.a)(e,[1,e.shape[0],e.shape[1],e.shape[2]])),"NCHW"===h)throw new Error("separableConv2d currently does not support dataFormat NCHW; only NHWC is supported");i.b(4===p.rank,()=>`Error in separableConv2d: input must be rank 4, but got rank ${p.rank}.`),i.b(4===f.rank,()=>`Error in separableConv2d: depthwise filter must be rank 4, but got rank ${f.rank}.`),i.b(4===d.rank,()=>`Error in separableConv2d: pointwise filter must be rank 4, but got rank ${f.rank}.`),i.b(1===d.shape[0],()=>`Error in separableConv2d: the first dimension of pointwise filter  must be 1, but got ${d.shape[0]}.`),i.b(1===d.shape[1],()=>`Error in separableConv2d: the second dimension of pointwise filter must be 1, but got ${d.shape[1]}.`);const g=f.shape[2],A=f.shape[3];return i.b(d.shape[2]===g*A,()=>`Error in separableConv2d: the third dimension of pointwise filter must be ${g*A}, but got ${d.shape[2]}.`),t=Object(a.a)(p,f,u,c,h,l),n=Object(o.a)(t,d,1,"valid",h),m?Object(s.a)(n,[n.shape[1],n.shape[2],n.shape[3]]):n}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({sin_:
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){return e=Object(o.a)(e,"x","sin","float32"),r.a.runKernel(i.Lc,{x:e})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({sinh_:
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){return e=Object(o.a)(e,"x","sinh"),r.a.runKernel(i.Mc,{x:e})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(61),i=n(41),o=n(109),a=n(11),s=(t=n(5),n(98)),u=n(9),c=n(59),l=n(22),h=n(34),f=n(123);const d=Object(t.b)({irfft_:
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){var t,n,d,p,m=e.shape[e.shape.length-1];const g=e.size/m;let A;if(A=m<=2?(t=Object(u.a)(e,[g,m]),Object(f.a)(t)):(t=[g,2*(m-1)],n=Object(u.a)(Object(s.a)(e),[g,m]),p=Object(u.a)(Object(o.a)(e),[g,m]),d=Object(c.a)(Object(h.a)(n,[0,1],[g,m-2]),1),m=Object(a.a)(Object(c.a)(Object(h.a)(p,[0,1],[g,m-2]),1),Object(l.a)(-1)),n=Object(i.a)([n,d],1),d=Object(i.a)([p,m],1),p=Object(u.a)(Object(r.a)(n,d),[t[0],t[1]]),Object(f.a)(p)),A=Object(s.a)(A),3===e.rank&&0!==e.shape[0]){const t=A,n=e.shape[0];A=Object(u.a)(A,[n,A.shape[0]/n,A.shape[1]]),t.dispose()}return A}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(3),i=n(10),o=n(60);
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function a(e,t,n){if(Object(i.d)(e),null!=t&&3!==t.length)throw new Error("tensor3d() requires shape to have three numbers");var a=Object(r.c)(e,n);if(3!==a.length&&1!==a.length)throw new Error("tensor3d() requires values to be number[][][] or flat/TypedArray");if(1===a.length&&null==t)throw new Error("tensor3d() requires shape to be provided when `values` are a flat array");return Object(o.a)(e,t,a,n)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({topk_:
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t=1,n=!0){if(0===(e=Object(o.a)(e,"x","topk")).rank)throw new Error("topk() expects the input to be of rank 1 or higher");var a=e.shape[e.shape.length-1];if(t<0)throw new Error("'k' passed to topk() must be >= 0 but got "+t);if(a<t)throw new Error(`'k' passed to topk() must be <= the last dimension (${a}) but got `+t);var[a,e]=r.a.runKernel(i.kd,{x:e},{k:t,sorted:n});return{values:a,indices:e}}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(6),i=n(4),o=n(3),a=n(10);t=n(5);const s=Object(t.b)({unique_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t=0){e=Object(o.a)(e,"x","unique","string_or_numeric"),Object(a.b)(0<e.rank,()=>"The input tensor must be at least 1D"),e={x:e};var[e,t]=r.a.runKernel(i.nd,e,{axis:t});return{values:e,indices:t}}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(58);
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */function i(e,t){const n=[];for(let e=0;e<t.length;e++)t[e]&&n.push(e);const i=Object(r.a)(e,"int32"),o=Object(r.a)([n.length,e.length],"int32");for(let t=0;t<n.length;t++){var a=i.indexToLoc(n[t]),s=t*e.length;o.values.set(a,s)}return o.toTensor()}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return h})),n(162);var r=n(24),i=n(40);
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */t=n(50);const o="tensorflowjs",a="models_store",s="model_info_store";function u(){if(!Object(r.c)().getBool("IS_BROWSER"))throw new Error("Failed to obtain IndexedDB factory because the current environmentis not a web browser.");var e;if(null==(e=(e="undefined"==typeof window?self:window).indexedDB||e.mozIndexedDB||e.webkitIndexedDB||e.msIndexedDB||e.shimIndexedDB))throw new Error("The current browser does not appear to support IndexedDB.");return e}function c(e){const t=e.result;t.createObjectStore(a,{keyPath:"modelPath"}),t.createObjectStore(s,{keyPath:"modelPath"})}class l{constructor(e){if(this.indexedDB=u(),null==e||!e)throw new Error("For IndexedDB, modelPath must not be null, undefined or empty.");this.modelPath=e}async save(e){if(e.modelTopology instanceof ArrayBuffer)throw new Error("BrowserLocalStorage.save() does not support saving model topology in binary formats yet.");return this.databaseAction(this.modelPath,e)}async load(){return this.databaseAction(this.modelPath)}databaseAction(e,t){return new Promise((e,n)=>{const r=this.indexedDB.open(o,1);r.onupgradeneeded=()=>c(r),r.onsuccess=()=>{const o=r.result;if(null==t){const t=o.transaction(a,"readonly"),r=t.objectStore(a).get(this.modelPath);r.onsuccess=()=>{if(null==r.result)return o.close(),n(new Error(`Cannot find model with path '${this.modelPath}' in IndexedDB.`));e(r.result.modelArtifacts)},r.onerror=e=>(o.close(),n(r.error)),t.oncomplete=()=>o.close()}else{const r=Object(i.i)(t),u=o.transaction(s,"readwrite");let c=u.objectStore(s);const l=c.put({modelPath:this.modelPath,modelArtifactsInfo:r});let h;l.onsuccess=()=>{const i=(h=o.transaction(a,"readwrite")).objectStore(a).put({modelPath:this.modelPath,modelArtifacts:t,modelArtifactsInfo:r});i.onsuccess=()=>e({modelArtifactsInfo:r}),i.onerror=e=>{const t=(c=u.objectStore(s)).delete(this.modelPath);t.onsuccess=()=>(o.close(),n(i.error)),t.onerror=e=>(o.close(),n(i.error))}},l.onerror=e=>(o.close(),n(l.error)),u.oncomplete=()=>{null==h?o.close():h.oncomplete=()=>o.close()}}},r.onerror=e=>n(r.error)})}}l.URL_SCHEME="indexeddb://",n=e=>Object(r.c)().getBool("IS_BROWSER")&&!Array.isArray(e)&&e.startsWith(l.URL_SCHEME)?(e=e.slice(l.URL_SCHEME.length),new l(e)):null,t.a.registerSaveRouter(n),t.a.registerLoadRouter(n);class h{constructor(){this.indexedDB=u()}async listModels(){return new Promise((e,t)=>{const n=this.indexedDB.open(o,1);n.onupgradeneeded=()=>c(n),n.onsuccess=()=>{const r=n.result,i=r.transaction(s,"readonly"),o=i.objectStore(s).getAll();o.onsuccess=()=>{const t={};for(const e of o.result)t[e.modelPath]=e.modelArtifactsInfo;e(t)},o.onerror=e=>(r.close(),t(o.error)),i.oncomplete=()=>r.close()},n.onerror=e=>t(n.error)})}async removeModel(e){var t;return e=(t=e).startsWith(l.URL_SCHEME)?t.slice(l.URL_SCHEME.length):t,new Promise((t,n)=>{const r=this.indexedDB.open(o,1);r.onupgradeneeded=()=>c(r),r.onsuccess=()=>{const i=r.result,o=i.transaction(s,"readwrite"),u=o.objectStore(s),c=u.get(e);let l;c.onsuccess=()=>{if(null==c.result)return i.close(),n(new Error(`Cannot find model with path '${e}' in IndexedDB.`));{const r=u.delete(e),o=()=>{const r=(l=i.transaction(a,"readwrite")).objectStore(a).delete(e);r.onsuccess=()=>t(c.result.modelArtifactsInfo),r.onerror=e=>n(c.error)};r.onsuccess=o,r.onerror=e=>(o(),i.close(),n(c.error))}},c.onerror=e=>(i.close(),n(c.error)),o.oncomplete=()=>{null==l?i.close():l.oncomplete=()=>i.close()}},r.onerror=e=>n(r.error)})}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return h})),n(162);var r=n(24),i=n(10),o=n(40);
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */t=n(50);const a="tensorflowjs_models";function s(e){return{info:[a,e,"info"].join("/"),topology:[a,e,"model_topology"].join("/"),weightSpecs:[a,e,"weight_specs"].join("/"),weightData:[a,e,"weight_data"].join("/"),modelMetadata:[a,e,"model_metadata"].join("/")}}function u(e){for(const t of Object.values(e))window.localStorage.removeItem(t)}function c(e){const t=e.split("/");if(t.length<3)throw new Error("Invalid key format: "+e);return t.slice(1,t.length-1).join("/")}class l{constructor(e){if(!Object(r.c)().getBool("IS_BROWSER")||"undefined"==typeof window||void 0===window.localStorage)throw new Error("The current environment does not support local storage.");if(this.LS=window.localStorage,null==e||!e)throw new Error("For local storage, modelPath must not be null, undefined or empty.");this.modelPath=e,this.keys=s(this.modelPath)}async save(e){if(e.modelTopology instanceof ArrayBuffer)throw new Error("BrowserLocalStorage.save() does not support saving model topology in binary formats yet.");var t=JSON.stringify(e.modelTopology),n=JSON.stringify(e.weightSpecs),r=Object(o.i)(e);try{this.LS.setItem(this.keys.info,JSON.stringify(r)),this.LS.setItem(this.keys.topology,t),this.LS.setItem(this.keys.weightSpecs,n),this.LS.setItem(this.keys.weightData,Object(o.a)(e.weightData));var i={format:e.format,generatedBy:e.generatedBy,convertedBy:e.convertedBy,signature:null!=e.signature?e.signature:void 0,userDefinedMetadata:null!=e.userDefinedMetadata?e.userDefinedMetadata:void 0,modelInitializer:null!=e.modelInitializer?e.modelInitializer:void 0,initializerSignature:null!=e.initializerSignature?e.initializerSignature:void 0,trainingConfig:null!=e.trainingConfig?e.trainingConfig:void 0};return this.LS.setItem(this.keys.modelMetadata,JSON.stringify(i)),{modelArtifactsInfo:r}}catch(e){throw u(this.keys),new Error(`Failed to save model '${this.modelPath}' to local storage: size quota being exceeded is a possible cause of this failure: modelTopologyBytes=${r.modelTopologyBytes}, weightSpecsBytes=${r.weightSpecsBytes}, weightDataBytes=${r.weightDataBytes}.`)}}async load(){if(null==(t=JSON.parse(this.LS.getItem(this.keys.info))))throw new Error(`In local storage, there is no model with name '${this.modelPath}'`);if("JSON"!==t.modelTopologyType)throw new Error("BrowserLocalStorage does not support loading non-JSON model topology yet.");const e={};if(null==(t=JSON.parse(this.LS.getItem(this.keys.topology))))throw new Error(`In local storage, the topology of model '${this.modelPath}' is missing.`);if(e.modelTopology=t,null==(t=JSON.parse(this.LS.getItem(this.keys.weightSpecs))))throw new Error(`In local storage, the weight specs of model '${this.modelPath}' are missing.`);var t;if(e.weightSpecs=t,null==(t=(null!=(t=this.LS.getItem(this.keys.modelMetadata))&&(t=JSON.parse(t),e.format=t.format,e.generatedBy=t.generatedBy,e.convertedBy=t.convertedBy,null!=t.signature&&(e.signature=t.signature),null!=t.userDefinedMetadata&&(e.userDefinedMetadata=t.userDefinedMetadata),null!=t.modelInitializer&&(e.modelInitializer=t.modelInitializer),null!=t.initializerSignature&&(e.initializerSignature=t.initializerSignature),null!=t.trainingConfig&&(e.trainingConfig=t.trainingConfig)),this.LS.getItem(this.keys.weightData))))throw new Error(`In local storage, the binary weight values of model '${this.modelPath}' are missing.`);return e.weightData=Object(o.b)(t),e}}l.URL_SCHEME="localstorage://",n=e=>Object(r.c)().getBool("IS_BROWSER")&&!Array.isArray(e)&&e.startsWith(l.URL_SCHEME)?(e=e.slice(l.URL_SCHEME.length),new l(e)):null,t.a.registerSaveRouter(n),t.a.registerLoadRouter(n);class h{constructor(){Object(i.b)(Object(r.c)().getBool("IS_BROWSER"),()=>"Current environment is not a web browser"),Object(i.b)("undefined"==typeof window||void 0!==window.localStorage,()=>"Current browser does not appear to support localStorage"),this.LS=window.localStorage}async listModels(){const e={};for(let t=0;t<this.LS.length;++t){const n=this.LS.key(t);n.startsWith("tensorflowjs_models/")&&n.endsWith("/info")&&(e[c(n)]=JSON.parse(this.LS.getItem(n)))}return e}async removeModel(e){var t=s(e=(t=e).startsWith(l.URL_SCHEME)?t.slice(l.URL_SCHEME.length):t);if(null==this.LS.getItem(t.info))throw new Error(`Cannot find model at path '${e}'`);return e=JSON.parse(this.LS.getItem(t.info)),u(t),e}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(6),i=n(4),o=n(10),a=(t=n(5),n(9));const s=Object(t.b)({conv3DBackpropInput_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t,n,s,u){o.b(e.length===t.rank,()=>`Length of inShape (${e.length}) and rank of dy (${t.rank}) must match`);let c=e,l=t,h=!1;4===t.rank&&(h=!0,l=Object(a.a)(t,[1,t.shape[0],t.shape[1],t.shape[2],t.shape[3]]),c=[1,e[0],e[1],e[2],e[3]]);const f=c[4],d=l.shape[4];o.b(5===c.length,()=>"Error in conv3dDerInput: inShape must be length 5, but got length "+c.length+"."),o.b(5===l.rank,()=>"Error in conv3dDerInput: dy must be rank 5, but got rank "+l.rank),o.b(5===n.rank,()=>"Error in conv3dDerInput: filter must be rank 5, but got rank "+n.rank),o.b(f===n.shape[3],()=>`Error in conv3dDerInput: depth of input (${f}) must match input depth for filter ${n.shape[3]}.`),o.b(d===n.shape[4],()=>`Error in conv3dDerInput: depth of output (${d}) must match output depth for filter ${n.shape[4]}.`);var p={dy:l,filter:n};u={pad:u,strides:s,inputShape:c},s=r.a.runKernel(i.I,p,u);return h?Object(a.a)(s,[s.shape[1],s.shape[2],s.shape[3],s.shape[4]]):s}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(6),i=n(4),o=n(3),a=n(10),s=(t=n(5),n(9));const u=Object(t.b)({resizeNearestNeighbor_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t,n=!1,u=!1){const c=Object(o.a)(e,"images","resizeNearestNeighbor");a.b(3===c.rank||4===c.rank,()=>`Error in resizeNearestNeighbor: x must be rank 3 or 4, but got rank ${c.rank}.`),a.b(2===t.length,()=>"Error in resizeNearestNeighbor: new shape must 2D, but got shape "+t+"."),a.b("float32"===c.dtype||"int32"===c.dtype,()=>"`images` must have `int32` or `float32` as dtype"),a.b(!1===u||!1===n,()=>"Error in resizeNearestNeighbor: If halfPixelCenters is true, alignCorners must be false.");let l=c,h=!1;3===c.rank&&(h=!0,l=Object(s.a)(c,[1,c.shape[0],c.shape[1],c.shape[2]]));var[]=t;e={images:l},e=r.a.runKernel(i.zc,e,{alignCorners:n,halfPixelCenters:u,size:t});return h?Object(s.a)(e,[e.shape[1],e.shape[2],e.shape[3]]):e}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(6),i=n(4),o=n(3),a=n(10),s=(t=n(5),n(9));const u=Object(t.b)({resizeBilinear_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t,n=!1,u=!1){const c=Object(o.a)(e,"images","resizeBilinear");a.b(3===c.rank||4===c.rank,()=>`Error in resizeBilinear: x must be rank 3 or 4, but got rank ${c.rank}.`),a.b(2===t.length,()=>"Error in resizeBilinear: new shape must 2D, but got shape "+t+"."),a.b(!1===u||!1===n,()=>"Error in resizeBilinear: If halfPixelCenters is true, alignCorners must be false.");let l=c,h=!1;3===c.rank&&(h=!0,l=Object(s.a)(c,[1,c.shape[0],c.shape[1],c.shape[2]]));var[]=t;e={images:l},e=r.a.runKernel(i.xc,e,{alignCorners:n,halfPixelCenters:u,size:t});return h?Object(s.a)(e,[e.shape[1],e.shape[2],e.shape[3]]):e}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=(t=n(5),n(9));const a=Object(t.b)({depthwiseConv2dNativeBackpropInput_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t,n,a,s,u=[1,1],c){let l=t,h=!1;return 3===t.rank&&(h=!0,l=Object(o.a)(t,[1,t.shape[0],t.shape[1],t.shape[2]])),t={dy:l,filter:n},n=r.a.runKernel(i.S,t,{strides:a,pad:s,dimRoundingMode:c,dilations:u,inputShape:e}),h?Object(o.a)(n,[n.shape[1],n.shape[2],n.shape[3]]):n}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=(t=n(5),n(9));const a=Object(t.b)({depthwiseConv2dNativeBackpropFilter_:
/**
 * @license
 * Copyright 2020 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t,n,a,s,u=[1,1],c){let l=e,h=(3===e.rank&&(l=Object(o.a)(e,[1,e.shape[0],e.shape[1],e.shape[2]])),t);return 3===h.rank&&(h=Object(o.a)(t,[1,t.shape[0],t.shape[1],t.shape[2]])),e={x:l,dy:h},r.a.runKernel(i.R,e,{strides:a,pad:s,dimRoundingMode:c,dilations:u,filterShape:n})}})},function(e,t,n){"use strict";function r(e,t){return function(){return e.apply(t,arguments)}}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";t.a=null},function(e,t,n){(function(t){e.exports=function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}u=n[a]={exports:{}},t[a][0].call(u.exports,(function(e){return i(t[a][1][e]||e)}),u,u.exports,e,t,n,r)}return n[a].exports}for(var o=!1,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function o(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function s(e){i(a,r,o,s,u,"next",e)}function u(e){i(a,r,o,s,u,"throw",e)}s(void 0)}))}}var a,s,u=e("fs"),c=e("fast-csv"),l=e("dayjs/plugin/customParseFormat"),h=e("dayjs/plugin/utc"),f=e("dayjs").extend(l).extend(h),d=e("../utils/stream-buf"),p=e("../utils/utils").fs.exists,m={true:!0,false:!1,"#N/A":{error:"#N/A"},"#REF!":{error:"#REF!"},"#NAME?":{error:"#NAME?"},"#DIV/0!":{error:"#DIV/0!"},"#NULL!":{error:"#NULL!"},"#VALUE!":{error:"#VALUE!"},"#NUM!":{error:"#NUM!"}};l=g,h=[{key:"readFile",value:(s=o(regeneratorRuntime.mark((function e(t,n){var r,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=n||{},e.next=3,p(t);case 3:if(e.sent){e.next=5;break}throw new Error("File not found: ".concat(t));case 5:return r=u.createReadStream(t),e.next=8,this.read(r,n);case 8:return i=e.sent,r.close(),e.abrupt("return",i);case 11:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"read",value:function(e,t){var n=this;return t=t||{},new Promise((function(r,i){var o=n.workbook.addWorksheet(t.sheetName),a=t.dateFormats||["YYYY-MM-DD[T]HH:mm:ssZ","YYYY-MM-DD[T]HH:mm:ss","MM-DD-YYYY","YYYY-MM-DD"],s=t.map||function(e){var t,n;return""===e?null:(t=Number(e),Number.isNaN(t)||t===1/0?(n=a.reduce((function(t,n){return t||((t=f(e,n,!0)).isValid()?t:null)}),null))?new Date(n.valueOf()):void 0!==(n=m[e])?n:e:t)},u=c.parse(t.parserOptions).on("data",(function(e){o.addRow(e.map(s))})).on("end",(function(){u.emit("worksheet",o)}));u.on("worksheet",r).on("error",i),e.pipe(u)}))}},{key:"createInputStream",value:function(){throw new Error("`CSV#createInputStream` is deprecated. You should use `CSV#read` instead. This method will be removed in version 5.0. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md")}},{key:"write",value:function(e,t){var n=this;return new Promise((function(i,o){t=t||{};var a=n.workbook.getWorksheet(t.sheetName||t.sheetId),s=c.format(t.formatterOptions),u=(o=(e.on("finish",(function(){i()})),s.on("error",o),s.pipe(e),t)).dateFormat,l=o.dateUTC,h=t.map||function(e){if(e){if(e.text||e.hyperlink)return e.hyperlink||e.text||"";if(e.formula||e.result)return e.result||"";if(e instanceof Date)return u?(l?f.utc(e):f(e)).format(u):(l?f.utc(e):f(e)).format();if(e.error)return e.error;if("object"===r(e))return JSON.stringify(e)}return e},d=void 0===t.includeEmptyRows||t.includeEmptyRows,p=1;a&&a.eachRow((function(e,t){if(d)for(;p++<t-1;)s.write([]);(e=e.values).shift(),s.write(e.map(h)),p=t})),s.end()}))}},{key:"writeFile",value:function(e,t){var n={encoding:(t=t||{}).encoding||"utf8"};e=u.createWriteStream(e,n);return this.write(e,t)}},{key:"writeBuffer",value:(a=o(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=new d,e.next=3,this.write(n,t);case 3:return e.abrupt("return",n.read());case 4:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(l.prototype,h),e=g;function g(e){if(!(this instanceof g))throw new TypeError("Cannot call a class as a function");this.workbook=e,this.worksheet=null}t.exports=e},{"../utils/stream-buf":23,"../utils/utils":26,dayjs:336,"dayjs/plugin/customParseFormat":337,"dayjs/plugin/utc":338,"fast-csv":369,fs:215}],2:[function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i,o=e("../utils/col-cache");function a(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,r=this,i=a;if(!(r instanceof i))throw new TypeError("Cannot call a class as a function");t?"string"==typeof t?(r=o.decodeAddress(t),this.nativeCol=r.col+n,this.nativeColOff=0,this.nativeRow=r.row+n,this.nativeRowOff=0):void 0!==t.nativeCol?(this.nativeCol=t.nativeCol||0,this.nativeColOff=t.nativeColOff||0,this.nativeRow=t.nativeRow||0,this.nativeRowOff=t.nativeRowOff||0):void 0!==t.col?(this.col=t.col+n,this.row=t.row+n):(this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0):(this.nativeCol=0,this.nativeColOff=0,this.nativeRow=0,this.nativeRowOff=0),this.worksheet=e}e=[{key:"asInstance",value:function(e){return e instanceof a||null==e?e:new a(e)}}],r((i=a).prototype,[{key:"col",get:function(){return this.nativeCol+Math.min(this.colWidth-1,this.nativeColOff)/this.colWidth},set:function(e){this.nativeCol=Math.floor(e),this.nativeColOff=Math.floor((e-this.nativeCol)*this.colWidth)}},{key:"row",get:function(){return this.nativeRow+Math.min(this.rowHeight-1,this.nativeRowOff)/this.rowHeight},set:function(e){this.nativeRow=Math.floor(e),this.nativeRowOff=Math.floor((e-this.nativeRow)*this.rowHeight)}},{key:"colWidth",get:function(){return this.worksheet&&this.worksheet.getColumn(this.nativeCol+1)&&this.worksheet.getColumn(this.nativeCol+1).isCustomWidth?Math.floor(1e4*this.worksheet.getColumn(this.nativeCol+1).width):64e4}},{key:"rowHeight",get:function(){return this.worksheet&&this.worksheet.getRow(this.nativeRow+1)&&this.worksheet.getRow(this.nativeRow+1).height?Math.floor(1e4*this.worksheet.getRow(this.nativeRow+1).height):18e4}},{key:"model",get:function(){return{nativeCol:this.nativeCol,nativeColOff:this.nativeColOff,nativeRow:this.nativeRow,nativeRowOff:this.nativeRowOff}},set:function(e){this.nativeCol=e.nativeCol,this.nativeColOff=e.nativeColOff,this.nativeRow=e.nativeRow,this.nativeRowOff=e.nativeRowOff}}]),r(i,e),t.exports=a},{"../utils/col-cache":19}],3:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){t&&i(e.prototype,t),n&&i(e,n)}var a=e("../utils/col-cache"),s=e("../utils/under-dash"),u=e("./enums"),c=e("../utils/shared-formula").slideFormula,l=e("./note"),h=(o(f,[{key:"destroy",value:function(){delete this.style,delete this._value,delete this._row,delete this._column,delete this._address}},{key:"_mergeStyle",value:function(e,t,n){var r;return(r=((r=((r=((r=((r=((r=e&&e.numFmt||t&&t.numFmt)&&(n.numFmt=r),e&&e.font||t&&t.font))&&(n.font=r),e&&e.alignment||t&&t.alignment))&&(n.alignment=r),e&&e.border||t&&t.border))&&(n.border=r),e&&e.fill||t&&t.fill))&&(n.fill=r),e&&e.protection||t&&t.protection))&&(n.protection=r),n}},{key:"toCsvString",value:function(){return this._value.toCsvString()}},{key:"addMergeRef",value:function(){this._mergeCount++}},{key:"releaseMergeRef",value:function(){this._mergeCount--}},{key:"merge",value:function(e,t){this._value.release(),this._value=k.create(f.Types.Merge,this,e),t||(this.style=e.style)}},{key:"unmerge",value:function(){this.type===f.Types.Merge&&(this._value.release(),this._value=k.create(f.Types.Null,this),this.style=this._mergeStyle(this._row.style,this._column.style,{}))}},{key:"isMergedTo",value:function(e){return this._value.type===f.Types.Merge&&this._value.isMergedTo(e)}},{key:"toString",value:function(){return this.text}},{key:"_upgradeToHyperlink",value:function(e){this.type===f.Types.String&&(this._value=k.create(f.Types.Hyperlink,this,{text:this._value.value,hyperlink:e}))}},{key:"addName",value:function(e){this.workbook.definedNames.addEx(this.fullAddress,e)}},{key:"removeName",value:function(e){this.workbook.definedNames.removeEx(this.fullAddress,e)}},{key:"removeAllNames",value:function(){this.workbook.definedNames.removeAllNames(this.fullAddress)}},{key:"worksheet",get:function(){return this._row.worksheet}},{key:"workbook",get:function(){return this._row.worksheet.workbook}},{key:"numFmt",get:function(){return this.style.numFmt},set:function(e){this.style.numFmt=e}},{key:"font",get:function(){return this.style.font},set:function(e){this.style.font=e}},{key:"alignment",get:function(){return this.style.alignment},set:function(e){this.style.alignment=e}},{key:"border",get:function(){return this.style.border},set:function(e){this.style.border=e}},{key:"fill",get:function(){return this.style.fill},set:function(e){this.style.fill=e}},{key:"protection",get:function(){return this.style.protection},set:function(e){this.style.protection=e}},{key:"address",get:function(){return this._address}},{key:"row",get:function(){return this._row.number}},{key:"col",get:function(){return this._column.number}},{key:"$col$row",get:function(){return"$".concat(this._column.letter,"$").concat(this.row)}},{key:"type",get:function(){return this._value.type}},{key:"effectiveType",get:function(){return this._value.effectiveType}},{key:"isMerged",get:function(){return 0<this._mergeCount||this.type===f.Types.Merge}},{key:"master",get:function(){return this.type===f.Types.Merge?this._value.master:this}},{key:"isHyperlink",get:function(){return this._value.type===f.Types.Hyperlink}},{key:"hyperlink",get:function(){return this._value.hyperlink}},{key:"value",get:function(){return this._value.value},set:function(e){this.type!==f.Types.Merge?(this._value.release(),this._value=k.create(k.getType(e),this,e)):this._value.master.value=e}},{key:"note",get:function(){return this._comment&&this._comment.note},set:function(e){this._comment=new l(e)}},{key:"text",get:function(){return this._value.toString()}},{key:"html",get:function(){return s.escapeHtml(this.text)}},{key:"formula",get:function(){return this._value.formula}},{key:"result",get:function(){return this._value.result}},{key:"formulaType",get:function(){return this._value.formulaType}},{key:"fullAddress",get:function(){return{sheetName:this._row.worksheet.name,address:this.address,row:this.row,col:this.col}}},{key:"name",get:function(){return this.names[0]},set:function(e){this.names=[e]}},{key:"names",get:function(){return this.workbook.definedNames.getNamesEx(this.fullAddress)},set:function(e){var t=this,n=this.workbook.definedNames;n.removeAllNames(this.fullAddress),e.forEach((function(e){n.addEx(t.fullAddress,e)}))}},{key:"_dataValidations",get:function(){return this.worksheet.dataValidations}},{key:"dataValidation",get:function(){return this._dataValidations.find(this.address)},set:function(e){this._dataValidations.add(this.address,e)}},{key:"model",get:function(){var e=this._value.model;return e.style=this.style,this._comment&&(e.comment=this._comment.model),e},set:function(e){this._value.release(),this._value=k.create(e.type,this),(this._value.model=e).comment&&"note"===e.comment.type&&(this._comment=l.fromModel(e.comment)),e.style?this.style=e.style:this.style={}}}]),f);function f(e,t,n){if(r(this,f),!e||!t)throw new Error("A Cell needs a Row");this._row=e,this._column=t,a.validateAddress(n),this._address=n,this._value=k.create(f.Types.Null,this),this.style=this._mergeStyle(e.style,t.style,{}),this._mergeCount=0}h.Types=u.ValueType,o(F,[{key:"toCsvString",value:function(){return""}},{key:"release",value:function(){}},{key:"toString",value:function(){return""}},{key:"value",get:function(){return null},set:function(e){}},{key:"type",get:function(){return h.Types.Null}},{key:"effectiveType",get:function(){return h.Types.Null}},{key:"address",get:function(){return this.model.address},set:function(e){this.model.address=e}}]);e=F;var d=(o(N,[{key:"toCsvString",value:function(){return this.model.value.toString()}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value.toString()}},{key:"value",get:function(){return this.model.value},set:function(e){this.model.value=e}},{key:"type",get:function(){return h.Types.Number}},{key:"effectiveType",get:function(){return h.Types.Number}},{key:"address",get:function(){return this.model.address},set:function(e){this.model.address=e}}]),N),p=(o(j,[{key:"toCsvString",value:function(){return'"'.concat(this.model.value.replace(/"/g,'""'),'"')}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value}},{key:"value",get:function(){return this.model.value},set:function(e){this.model.value=e}},{key:"type",get:function(){return h.Types.String}},{key:"effectiveType",get:function(){return h.Types.String}},{key:"address",get:function(){return this.model.address},set:function(e){this.model.address=e}}]),j),m=(o(M,[{key:"toString",value:function(){return this.model.value.richText.map((function(e){return e.text})).join("")}},{key:"toCsvString",value:function(){return'"'.concat(this.text.replace(/"/g,'""'),'"')}},{key:"release",value:function(){}},{key:"value",get:function(){return this.model.value},set:function(e){this.model.value=e}},{key:"type",get:function(){return h.Types.RichText}},{key:"effectiveType",get:function(){return h.Types.RichText}},{key:"address",get:function(){return this.model.address},set:function(e){this.model.address=e}}]),M),g=(o(I,[{key:"toCsvString",value:function(){return this.model.value.toISOString()}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value.toString()}},{key:"value",get:function(){return this.model.value},set:function(e){this.model.value=e}},{key:"type",get:function(){return h.Types.Date}},{key:"effectiveType",get:function(){return h.Types.Date}},{key:"address",get:function(){return this.model.address},set:function(e){this.model.address=e}}]),I),A=(o(B,[{key:"toCsvString",value:function(){return this.model.hyperlink}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.text}},{key:"value",get:function(){var e={text:this.model.text,hyperlink:this.model.hyperlink};return this.model.tooltip&&(e.tooltip=this.model.tooltip),e},set:function(e){this.model={text:e.text,hyperlink:e.hyperlink},e.tooltip&&(this.model.tooltip=e.tooltip)}},{key:"text",get:function(){return this.model.text},set:function(e){this.model.text=e}},{key:"hyperlink",get:function(){return this.model.hyperlink},set:function(e){this.model.hyperlink=e}},{key:"type",get:function(){return h.Types.Hyperlink}},{key:"effectiveType",get:function(){return h.Types.Hyperlink}},{key:"address",get:function(){return this.model.address},set:function(e){this.model.address=e}}]),B),v=(o(D,[{key:"isMergedTo",value:function(e){return e===this._master}},{key:"toCsvString",value:function(){return""}},{key:"release",value:function(){this._master.releaseMergeRef()}},{key:"toString",value:function(){return this.value.toString()}},{key:"value",get:function(){return this._master.value},set:function(e){e instanceof h?(this._master&&this._master.releaseMergeRef(),e.addMergeRef(),this._master=e):this._master.value=e}},{key:"master",get:function(){return this._master}},{key:"type",get:function(){return h.Types.Merge}},{key:"effectiveType",get:function(){return this._master.effectiveType}},{key:"address",get:function(){return this.model.address},set:function(e){this.model.address=e}}]),D),b=(o(T,[{key:"_copyModel",value:function(e){function t(t){var r=e[t];r&&(n[t]=r)}var n={};return t("formula"),t("result"),t("ref"),t("shareType"),t("sharedFormula"),n}},{key:"validate",value:function(e){switch(k.getType(e)){case h.Types.Null:case h.Types.String:case h.Types.Number:case h.Types.Date:break;case h.Types.Hyperlink:case h.Types.Formula:default:throw new Error("Cannot process that type of result value")}}},{key:"_getTranslatedFormula",value:function(){var e;return!this._translatedFormula&&this.model.sharedFormula&&(e=this.cell.worksheet.findCell(this.model.sharedFormula),this._translatedFormula=e&&c(e.formula,e.address,this.model.address)),this._translatedFormula}},{key:"toCsvString",value:function(){return"".concat(this.model.result||"")}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.result?this.model.result.toString():""}},{key:"value",get:function(){return this._copyModel(this.model)},set:function(e){this.model=this._copyModel(e)}},{key:"dependencies",get:function(){return{ranges:this.formula.match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g),cells:this.formula.replace(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}:[A-Z]{1,3}\d{1,4}/g,"").match(/([a-zA-Z0-9]+!)?[A-Z]{1,3}\d{1,4}/g)}}},{key:"formula",get:function(){return this.model.formula||this._getTranslatedFormula()},set:function(e){this.model.formula=e}},{key:"formulaType",get:function(){return this.model.formula?u.FormulaType.Master:this.model.sharedFormula?u.FormulaType.Shared:u.FormulaType.None}},{key:"result",get:function(){return this.model.result},set:function(e){this.model.result=e}},{key:"type",get:function(){return h.Types.Formula}},{key:"effectiveType",get:function(){var e=this.model.result;return null==e?u.ValueType.Null:e instanceof String||"string"==typeof e?u.ValueType.String:"number"==typeof e?u.ValueType.Number:e instanceof Date?u.ValueType.Date:e.text&&e.hyperlink?u.ValueType.Hyperlink:e.formula?u.ValueType.Formula:u.ValueType.Null}},{key:"address",get:function(){return this.model.address},set:function(e){this.model.address=e}}]),T),y=(o(O,[{key:"toCsvString",value:function(){return this.model.value.toString()}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value.toString()}},{key:"value",get:function(){return this.model.value},set:function(e){this.model.value=e}},{key:"type",get:function(){return h.Types.SharedString}},{key:"effectiveType",get:function(){return h.Types.SharedString}},{key:"address",get:function(){return this.model.address},set:function(e){this.model.address=e}}]),O),w=(o(_,[{key:"toCsvString",value:function(){return this.model.value?1:0}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value.toString()}},{key:"value",get:function(){return this.model.value},set:function(e){this.model.value=e}},{key:"type",get:function(){return h.Types.Boolean}},{key:"effectiveType",get:function(){return h.Types.Boolean}},{key:"address",get:function(){return this.model.address},set:function(e){this.model.address=e}}]),_),x=(o(S,[{key:"toCsvString",value:function(){return this.toString()}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value.error.toString()}},{key:"value",get:function(){return this.model.value},set:function(e){this.model.value=e}},{key:"type",get:function(){return h.Types.Error}},{key:"effectiveType",get:function(){return h.Types.Error}},{key:"address",get:function(){return this.model.address},set:function(e){this.model.address=e}}]),S),C=(o(E,[{key:"toCsvString",value:function(){return this.model.value}},{key:"release",value:function(){}},{key:"toString",value:function(){return this.model.value}},{key:"value",get:function(){return this.model.rawValue},set:function(e){this.model.rawValue=e,this.model.value=JSON.stringify(e)}},{key:"type",get:function(){return h.Types.String}},{key:"effectiveType",get:function(){return h.Types.String}},{key:"address",get:function(){return this.model.address},set:function(e){this.model.address=e}}]),E),k={getType:function(e){return null==e?h.Types.Null:e instanceof String||"string"==typeof e?h.Types.String:"number"==typeof e?h.Types.Number:"boolean"==typeof e?h.Types.Boolean:e instanceof Date?h.Types.Date:e.text&&e.hyperlink?h.Types.Hyperlink:e.formula||e.sharedFormula?h.Types.Formula:e.richText?h.Types.RichText:e.sharedString?h.Types.SharedString:e.error?h.Types.Error:h.Types.JSON},types:[{t:h.Types.Null,f:e},{t:h.Types.Number,f:d},{t:h.Types.String,f:p},{t:h.Types.Date,f:g},{t:h.Types.Hyperlink,f:A},{t:h.Types.Formula,f:b},{t:h.Types.Merge,f:v},{t:h.Types.JSON,f:C},{t:h.Types.SharedString,f:y},{t:h.Types.RichText,f:m},{t:h.Types.Boolean,f:w},{t:h.Types.Error,f:x}].reduce((function(e,t){return e[t.t]=t.f,e}),[]),create:function(e,t,n){var r=this.types[e];if(r)return new r(t,n);throw new Error("Could not create Value of type ".concat(e))}};function E(e,t){r(this,E),this.model={address:e.address,type:h.Types.String,value:JSON.stringify(t),rawValue:t}}function S(e,t){r(this,S),this.model={address:e.address,type:h.Types.Error,value:t}}function _(e,t){r(this,_),this.model={address:e.address,type:h.Types.Boolean,value:t}}function O(e,t){r(this,O),this.model={address:e.address,type:h.Types.SharedString,value:t}}function T(e,t){r(this,T),this.cell=e,this.model={address:e.address,type:h.Types.Formula,shareType:t?t.shareType:void 0,ref:t?t.ref:void 0,formula:t?t.formula:void 0,sharedFormula:t?t.sharedFormula:void 0,result:t?t.result:void 0}}function D(e,t){r(this,D),this.model={address:e.address,type:h.Types.Merge,master:t?t.address:void 0},(this._master=t)&&t.addMergeRef()}function B(e,t){r(this,B),this.model={address:e.address,type:h.Types.Hyperlink,text:t?t.text:void 0,hyperlink:t?t.hyperlink:void 0},t&&t.tooltip&&(this.model.tooltip=t.tooltip)}function I(e,t){r(this,I),this.model={address:e.address,type:h.Types.Date,value:t}}function M(e,t){r(this,M),this.model={address:e.address,type:h.Types.String,value:t}}function j(e,t){r(this,j),this.model={address:e.address,type:h.Types.String,value:t}}function N(e,t){r(this,N),this.model={address:e.address,type:h.Types.Number,value:t}}function F(e){r(this,F),this.model={address:e.address,type:h.Types.Null}}t.exports=h},{"../utils/col-cache":19,"../utils/shared-formula":22,"../utils/under-dash":25,"./enums":7,"./note":9}],4:[function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=e("../utils/under-dash"),o=e("./enums"),a=e("../utils/col-cache"),s=(e=[{key:"toModel",value:function(e){var t=[],n=null;return e&&e.forEach((function(e,r){e.isDefault?n=n&&null:n&&e.equivalentTo(n)?n.max=r+1:(n={min:r+1,max:r+1,width:void 0!==e.width?e.width:9,style:e.style,isCustomWidth:e.isCustomWidth,hidden:e.hidden,outlineLevel:e.outlineLevel,collapsed:e.collapsed},t.push(n))})),t.length?t:void 0}},{key:"fromModel",value:function(e,t){t=t||[];for(var n=[],r=1,i=0;i<t.length;){for(var o=t[i++];r<o.min;)n.push(new u(e,r++));for(;r<=o.max;)n.push(new u(e,r++,o))}return n.length?n:null}}],r((s=u).prototype,[{key:"toString",value:function(){return JSON.stringify({key:this.key,width:this.width,headers:this.headers.length?this.headers:void 0})}},{key:"equivalentTo",value:function(e){return this.width===e.width&&this.hidden===e.hidden&&this.outlineLevel===e.outlineLevel&&i.isEqual(this.style,e.style)}},{key:"eachCell",value:function(e,t){var n=this.number;t||(t=e,e=null),this._worksheet.eachRow(e,(function(e,r){t(e.getCell(n),r)}))}},{key:"_applyStyle",value:function(e,t){return this.style[e]=t,this.eachCell((function(n){n[e]=t})),t}},{key:"number",get:function(){return this._number}},{key:"worksheet",get:function(){return this._worksheet}},{key:"letter",get:function(){return a.n2l(this._number)}},{key:"isCustomWidth",get:function(){return void 0!==this.width&&9!==this.width}},{key:"defn",get:function(){return{header:this._header,key:this.key,width:this.width,style:this.style,hidden:this.hidden,outlineLevel:this.outlineLevel}},set:function(e){e?(this.key=e.key,this.width=void 0!==e.width?e.width:9,this.outlineLevel=e.outlineLevel,e.style?this.style=e.style:this.style={},this.header=e.header,this._hidden=!!e.hidden):(delete this._header,delete this._key,delete this.width,this.style={},this.outlineLevel=0)}},{key:"headers",get:function(){return this._header&&this._header instanceof Array?this._header:[this._header]}},{key:"header",get:function(){return this._header},set:function(e){var t=this;void 0!==e?(this._header=e,this.headers.forEach((function(e,n){t._worksheet.getCell(n+1,t.number).value=e}))):this._header=void 0}},{key:"key",get:function(){return this._key},set:function(e){(this._key&&this._worksheet.getColumnKey(this._key))===this&&this._worksheet.deleteColumnKey(this._key),(this._key=e)&&this._worksheet.setColumnKey(this._key,this)}},{key:"hidden",get:function(){return!!this._hidden},set:function(e){this._hidden=e}},{key:"outlineLevel",get:function(){return this._outlineLevel||0},set:function(e){this._outlineLevel=e}},{key:"collapsed",get:function(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelCol)}},{key:"isDefault",get:function(){var e;return!(this.isCustomWidth||this.hidden||this.outlineLevel||(e=this.style)&&(e.font||e.numFmt||e.alignment||e.border||e.fill||e.protection))}},{key:"headerCount",get:function(){return this.headers.length}},{key:"values",get:function(){var e=[];return this.eachCell((function(t,n){t&&t.type!==o.ValueType.Null&&(e[n]=t.value)})),e},set:function(e){var t,n,r=this;e&&(t=this.number,n=0,e.hasOwnProperty("0")&&(n=1),e.forEach((function(e,i){r._worksheet.getCell(i+n,t).value=e})))}},{key:"numFmt",get:function(){return this.style.numFmt},set:function(e){this._applyStyle("numFmt",e)}},{key:"font",get:function(){return this.style.font},set:function(e){this._applyStyle("font",e)}},{key:"alignment",get:function(){return this.style.alignment},set:function(e){this._applyStyle("alignment",e)}},{key:"protection",get:function(){return this.style.protection},set:function(e){this._applyStyle("protection",e)}},{key:"border",get:function(){return this.style.border},set:function(e){this._applyStyle("border",e)}},{key:"fill",get:function(){return this.style.fill},set:function(e){this._applyStyle("fill",e)}}]),r(s,e),u);function u(e,t,n){if(!(this instanceof u))throw new TypeError("Cannot call a class as a function");this._worksheet=e,this._number=t,!1!==n&&(this.defn=n)}t.exports=s},{"../utils/col-cache":19,"../utils/under-dash":25,"./enums":7}],5:[function(e,t,n){"use strict";function r(e){if(!(this instanceof r))throw new TypeError("Cannot call a class as a function");this.model=e||{}}(function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}})(r.prototype,[{key:"add",value:function(e,t){return this.model[e]=t}},{key:"find",value:function(e){return this.model[e]}},{key:"remove",value:function(e){this.model[e]=void 0}}]),t.exports=r},{}],6:[function(e,t,n){"use strict";var r=e("../utils/under-dash"),i=e("../utils/col-cache"),o=e("../utils/cell-matrix"),a=e("./range"),s=/[$](\w+)[$](\d+)(:[$](\w+)[$](\d+))?/;(function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}})(u.prototype,[{key:"getMatrix",value:function(e){return this.matrixMap[e]||(this.matrixMap[e]=new o)}},{key:"add",value:function(e,t){e=i.decodeEx(e),this.addEx(e,t)}},{key:"addEx",value:function(e,t){var n=this.getMatrix(t);if(e.top)for(var r=e.left;r<=e.right;r++)for(var o=e.top;o<=e.bottom;o++){var a={sheetName:e.sheetName,address:i.n2l(r)+o,row:o,col:r};n.addCellEx(a)}else n.addCellEx(e)}},{key:"remove",value:function(e,t){e=i.decodeEx(e),this.removeEx(e,t)}},{key:"removeEx",value:function(e,t){this.getMatrix(t).removeCellEx(e)}},{key:"removeAllNames",value:function(e){r.each(this.matrixMap,(function(t){t.removeCellEx(e)}))}},{key:"forEach",value:function(e){r.each(this.matrixMap,(function(t,n){t.forEach((function(t){e(n,t)}))}))}},{key:"getNames",value:function(e){return this.getNamesEx(i.decodeEx(e))}},{key:"getNamesEx",value:function(e){return r.map(this.matrixMap,(function(t,n){return t.findCellEx(e)&&n})).filter(Boolean)}},{key:"_explore",value:function(e,t){t.mark=!1;var n,r,i=t.sheetName,o=new a(t.row,t.col,t.row,t.col,i);function s(n,r){var a=e.findCellAt(i,n,t.col);return a&&a.mark&&(o[r]=n,a.mark=!1,1)}for(r=t.row-1;s(r,"top");r--);for(r=t.row+1;s(r,"bottom");r++);function u(t,n){var a=[];for(r=o.top;r<=o.bottom;r++){var s=e.findCellAt(i,r,t);if(!s||!s.mark)return;a.push(s)}o[n]=t;for(var u=0;u<a.length;u++)a[u].mark=!1;return 1}for(n=t.col-1;u(n,"left");n--);for(n=t.col+1;u(n,"right");n++);return o}},{key:"getRanges",value:function(e,t){var n=this;return(t=t||this.matrixMap[e])?(t.forEach((function(e){e.mark=!0})),{name:e,ranges:t.map((function(e){return e.mark&&n._explore(t,e)})).filter(Boolean).map((function(e){return e.$shortRange}))}):{name:e,ranges:[]}}},{key:"normaliseMatrix",value:function(e,t){e.forEachInSheet(t,(function(e,t,n){!e||e.row===t&&e.col===n||(e.row=t,e.col=n,e.address=i.n2l(n)+t)}))}},{key:"spliceRows",value:function(e,t,n,i){var o=this;r.each(this.matrixMap,(function(r){r.spliceRows(e,t,n,i),o.normaliseMatrix(r,e)}))}},{key:"spliceColumns",value:function(e,t,n,i){var o=this;r.each(this.matrixMap,(function(r){r.spliceColumns(e,t,n,i),o.normaliseMatrix(r,e)}))}},{key:"model",get:function(){var e=this;return r.map(this.matrixMap,(function(t,n){return e.getRanges(n,t)})).filter((function(e){return e.ranges.length}))},set:function(e){var t=this.matrixMap={};e.forEach((function(e){var n=t[e.name]=new o;e.ranges.forEach((function(e){s.test(e.split("!").pop()||"")&&n.addCell(e)}))}))}}]),e=u;function u(){if(!(this instanceof u))throw new TypeError("Cannot call a class as a function");this.matrixMap={}}t.exports=e},{"../utils/cell-matrix":18,"../utils/col-cache":19,"../utils/under-dash":25,"./range":10}],7:[function(e,t,n){"use strict";t.exports={ValueType:{Null:0,Merge:1,Number:2,String:3,Date:4,Hyperlink:5,Formula:6,SharedString:7,RichText:8,Boolean:9,Error:10},FormulaType:{None:0,Master:1,Shared:2},RelationshipType:{None:0,OfficeDocument:1,Worksheet:2,CalcChain:3,SharedStrings:4,Styles:5,Theme:6,Hyperlink:7},DocumentType:{Xlsx:1},ReadingOrder:{LeftToRight:1,RightToLeft:2},ErrorValue:{NotApplicable:"#N/A",Ref:"#REF!",Name:"#NAME?",DivZero:"#DIV/0!",Null:"#NULL!",Value:"#VALUE!",Num:"#NUM!"}}},{}],8:[function(e,t,n){"use strict";var r=e("../utils/col-cache"),i=e("./anchor");(function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}})(o.prototype,[{key:"model",get:function(){switch(this.type){case"background":return{type:this.type,imageId:this.imageId};case"image":return{type:this.type,imageId:this.imageId,hyperlinks:this.range.hyperlinks,range:{tl:this.range.tl.model,br:this.range.br&&this.range.br.model,ext:this.range.ext,editAs:this.range.editAs}};default:throw new Error("Invalid Image Type")}},set:function(e){var t=e.type,n=e.imageId,o=e.range;e=e.hyperlinks;this.type=t,this.imageId=n,"image"===t&&("string"==typeof o?(n=r.decode(o),this.range={tl:new i(this.worksheet,{col:n.left,row:n.top},-1),br:new i(this.worksheet,{col:n.right,row:n.bottom},0),editAs:"oneCell"}):this.range={tl:new i(this.worksheet,o.tl,0),br:o.br&&new i(this.worksheet,o.br,0),ext:o.ext,editAs:o.editAs,hyperlinks:e||o.hyperlinks})}}]),e=o;function o(e,t){if(!(this instanceof o))throw new TypeError("Cannot call a class as a function");this.worksheet=e,this.model=t}t.exports=e},{"../utils/col-cache":19,"./anchor":2}],9:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o=e("../utils/under-dash"),a=(e=[{key:"fromModel",value:function(e){var t=new s;return t.model=e,t}}],i((a=s).prototype,[{key:"model",get:function(){var e="string"===r(this.note)?{type:"note",note:{texts:[{text:this.note}]}}:{type:"note",note:this.note};return o.deepMerge({},s.DEFAULT_CONFIGS,e)},set:function(e){var t=(e=e.note).texts;1===t.length&&1===Object.keys(t[0]).length?this.note=t[0].text:this.note=e}}]),i(a,e),s);function s(e){if(!(this instanceof s))throw new TypeError("Cannot call a class as a function");this.note=e}a.DEFAULT_CONFIGS={note:{margins:{insetmode:"auto",inset:[.13,.13,.25,.25]},protection:{locked:"True",lockText:"True"},editAs:"absolute"}},t.exports=a},{"../utils/under-dash":25}],10:[function(e,t,n){"use strict";var r=e("../utils/col-cache");(function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}})(i.prototype,[{key:"setTLBR",value:function(e,t,n,i,o){var a,s;arguments.length<4?(a=r.decodeAddress(e),s=r.decodeAddress(t),this.model={top:Math.min(a.row,s.row),left:Math.min(a.col,s.col),bottom:Math.max(a.row,s.row),right:Math.max(a.col,s.col),sheetName:n},this.setTLBR(a.row,a.col,s.row,s.col,o)):this.model={top:Math.min(e,n),left:Math.min(t,i),bottom:Math.max(e,n),right:Math.max(t,i),sheetName:o}}},{key:"decode",value:function(e){switch(e.length){case 5:this.setTLBR(e[0],e[1],e[2],e[3],e[4]);break;case 4:this.setTLBR(e[0],e[1],e[2],e[3]);break;case 3:this.setTLBR(e[0],e[1],e[2]);break;case 2:this.setTLBR(e[0],e[1]);break;case 1:var t=e[0];t instanceof i?this.model={top:t.model.top,left:t.model.left,bottom:t.model.bottom,right:t.model.right,sheetName:t.sheetName}:t instanceof Array?this.decode(t):t.top&&t.left&&t.bottom&&t.right||(t=r.decodeEx(t)).top?this.model={top:t.top,left:t.left,bottom:t.bottom,right:t.right,sheetName:t.sheetName}:this.model={top:t.row,left:t.col,bottom:t.row,right:t.col,sheetName:t.sheetName};break;case 0:this.model={top:0,left:0,bottom:0,right:0};break;default:throw new Error("Invalid number of arguments to _getDimensions() - ".concat(e.length))}}},{key:"expand",value:function(e,t,n,r){(!this.model.top||e<this.top)&&(this.top=e),(!this.model.left||t<this.left)&&(this.left=t),(!this.model.bottom||n>this.bottom)&&(this.bottom=n),(!this.model.right||r>this.right)&&(this.right=r)}},{key:"expandRow",value:function(e){var t;e&&(t=e.dimensions,e=e.number,t&&this.expand(e,t.min,e,t.max))}},{key:"expandToAddress",value:function(e){e=r.decodeEx(e),this.expand(e.row,e.col,e.row,e.col)}},{key:"toString",value:function(){return this.range}},{key:"intersects",value:function(e){return!(e.sheetName&&this.sheetName&&e.sheetName!==this.sheetName||e.bottom<this.top||e.top>this.bottom||e.right<this.left||e.left>this.right)}},{key:"contains",value:function(e){return e=r.decodeEx(e),this.containsEx(e)}},{key:"containsEx",value:function(e){return(!e.sheetName||!this.sheetName||e.sheetName===this.sheetName)&&e.row>=this.top&&e.row<=this.bottom&&e.col>=this.left&&e.col<=this.right}},{key:"forEachAddress",value:function(e){for(var t=this.left;t<=this.right;t++)for(var n=this.top;n<=this.bottom;n++)e(r.encodeAddress(n,t),n,t)}},{key:"top",get:function(){return this.model.top||1},set:function(e){this.model.top=e}},{key:"left",get:function(){return this.model.left||1},set:function(e){this.model.left=e}},{key:"bottom",get:function(){return this.model.bottom||1},set:function(e){this.model.bottom=e}},{key:"right",get:function(){return this.model.right||1},set:function(e){this.model.right=e}},{key:"sheetName",get:function(){return this.model.sheetName},set:function(e){this.model.sheetName=e}},{key:"_serialisedSheetName",get:function(){var e=this.model.sheetName;return e?/^[a-zA-Z0-9]*$/.test(e)?"".concat(e,"!"):"'".concat(e,"'!"):""}},{key:"tl",get:function(){return r.n2l(this.left)+this.top}},{key:"$t$l",get:function(){return"$".concat(r.n2l(this.left),"$").concat(this.top)}},{key:"br",get:function(){return r.n2l(this.right)+this.bottom}},{key:"$b$r",get:function(){return"$".concat(r.n2l(this.right),"$").concat(this.bottom)}},{key:"range",get:function(){return"".concat(this._serialisedSheetName+this.tl,":").concat(this.br)}},{key:"$range",get:function(){return"".concat(this._serialisedSheetName+this.$t$l,":").concat(this.$b$r)}},{key:"shortRange",get:function(){return 1<this.count?this.range:this._serialisedSheetName+this.tl}},{key:"$shortRange",get:function(){return 1<this.count?this.$range:this._serialisedSheetName+this.$t$l}},{key:"count",get:function(){return(1+this.bottom-this.top)*(1+this.right-this.left)}}]),e=i;function i(){var e=this,t=i;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");this.decode(arguments)}t.exports=e},{"../utils/col-cache":19}],11:[function(e,t,n){"use strict";var r=e("../utils/under-dash"),i=e("./enums"),o=e("../utils/col-cache"),a=e("./cell");(function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}})(s.prototype,[{key:"commit",value:function(){this._worksheet._commitRow(this)}},{key:"destroy",value:function(){delete this._worksheet,delete this._cells,delete this.style}},{key:"findCell",value:function(e){return this._cells[e-1]}},{key:"getCellEx",value:function(e){var t,n=this._cells[e.col-1];return n||(t=this._worksheet.getColumn(e.col),n=new a(this,t,e.address),this._cells[e.col-1]=n),n}},{key:"getCell",value:function(e){var t;return"string"==typeof e&&(e=(t=this._worksheet.getColumnKey(e))?t.number:o.l2n(e)),this._cells[e-1]||this.getCellEx({address:o.encodeAddress(this._number,e),row:this._number,col:e})}},{key:"splice",value:function(e,t){for(var n=e+t,r=arguments.length,i=new Array(2<r?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];var a,s,u,c=i.length-t,l=this._cells.length;if(c<0)for(a=e+i.length;a<=l;a++)u=this._cells[a-1],(s=this._cells[a-c-1])?((u=this.getCell(a)).value=s.value,u.style=s.style,u._comment=s._comment):u&&(u.value=null,u.style={},u._comment=void 0);else if(0<c)for(a=l;n<=a;a--)(s=this._cells[a-1])?((u=this.getCell(a+c)).value=s.value,u.style=s.style,u._comment=s._comment):this._cells[a+c-1]=void 0;for(a=0;a<i.length;a++)(u=this.getCell(e+a)).value=i[a],u.style={},u._comment=void 0}},{key:"eachCell",value:function(e,t){if(t||(t=e,e=null),e&&e.includeEmpty)for(var n=this._cells.length,r=1;r<=n;r++)t(this.getCell(r),r);else this._cells.forEach((function(e,n){e&&e.type!==i.ValueType.Null&&t(e,n+1)}))}},{key:"addPageBreak",value:function(e,t){var n=this._worksheet;e=Math.max(0,e-1)||0,t=Math.max(0,t-1)||16838,t={id:this._number,max:t,man:1};e&&(t.min=e),n.rowBreaks.push(t)}},{key:"_applyStyle",value:function(e,t){return this.style[e]=t,this._cells.forEach((function(n){n&&(n[e]=t)})),t}},{key:"number",get:function(){return this._number}},{key:"worksheet",get:function(){return this._worksheet}},{key:"values",get:function(){var e=[];return this._cells.forEach((function(t){t&&t.type!==i.ValueType.Null&&(e[t.col]=t.value)})),e},set:function(e){var t,n=this;this._cells=[],e&&(e instanceof Array?(t=0,e.hasOwnProperty("0")&&(t=1),e.forEach((function(e,r){void 0!==e&&(n.getCellEx({address:o.encodeAddress(n._number,r+t),row:n._number,col:r+t}).value=e)}))):this._worksheet.eachColumnKey((function(t,r){void 0!==e[r]&&(n.getCellEx({address:o.encodeAddress(n._number,t.number),row:n._number,col:t.number}).value=e[r])})))}},{key:"hasValues",get:function(){return r.some(this._cells,(function(e){return e&&e.type!==i.ValueType.Null}))}},{key:"cellCount",get:function(){return this._cells.length}},{key:"actualCellCount",get:function(){var e=0;return this.eachCell((function(){e++})),e}},{key:"dimensions",get:function(){var e=0,t=0;return this._cells.forEach((function(n){n&&n.type!==i.ValueType.Null&&((!e||e>n.col)&&(e=n.col),t<n.col&&(t=n.col))})),0<e?{min:e,max:t}:null}},{key:"numFmt",get:function(){return this.style.numFmt},set:function(e){this._applyStyle("numFmt",e)}},{key:"font",get:function(){return this.style.font},set:function(e){this._applyStyle("font",e)}},{key:"alignment",get:function(){return this.style.alignment},set:function(e){this._applyStyle("alignment",e)}},{key:"protection",get:function(){return this.style.protection},set:function(e){this._applyStyle("protection",e)}},{key:"border",get:function(){return this.style.border},set:function(e){this._applyStyle("border",e)}},{key:"fill",get:function(){return this.style.fill},set:function(e){this._applyStyle("fill",e)}},{key:"hidden",get:function(){return!!this._hidden},set:function(e){this._hidden=e}},{key:"outlineLevel",get:function(){return this._outlineLevel||0},set:function(e){this._outlineLevel=e}},{key:"collapsed",get:function(){return!!(this._outlineLevel&&this._outlineLevel>=this._worksheet.properties.outlineLevelRow)}},{key:"model",get:function(){var e=[],t=0,n=0;return this._cells.forEach((function(r){var i;r&&(i=r.model)&&((!t||t>r.col)&&(t=r.col),n<r.col&&(n=r.col),e.push(i))})),this.height||e.length?{cells:e,number:this.number,min:t,max:n,height:this.height,style:this.style,hidden:this.hidden,outlineLevel:this.outlineLevel,collapsed:this.collapsed}:null},set:function(e){var t,n=this;if(e.number!==this._number)throw new Error("Invalid row number in model");this._cells=[],e.cells.forEach((function(e){var r,i,s;e.type!==a.Types.Merge&&(e.address?s=o.decodeAddress(e.address):t&&(s={row:r=t.row,col:i=t.col+1,address:o.encodeAddress(r,i),$col$row:"$".concat(o.n2l(i),"$").concat(r)}),t=s,n.getCellEx(s).model=e)})),e.height?this.height=e.height:delete this.height,this.hidden=e.hidden,this.outlineLevel=e.outlineLevel||0,this.style=e.style&&JSON.parse(JSON.stringify(e.style))||{}}}]),e=s;function s(e,t){if(!(this instanceof s))throw new TypeError("Cannot call a class as a function");this._worksheet=e,this._number=t,this._cells=[],this.style={},this.outlineLevel=0}t.exports=e},{"../utils/col-cache":19,"../utils/under-dash":25,"./cell":3,"./enums":7}],12:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){t&&i(e.prototype,t),n&&i(e,n)}var a=e("../utils/col-cache"),s=(o(c,[{key:"_set",value:function(e,t){this.table.cacheState(),this.column[e]=t}},{key:"name",get:function(){return this.column.name},set:function(e){this._set("name",e)}},{key:"filterButton",get:function(){return this.column.filterButton},set:function(e){this.column.filterButton=e}},{key:"style",get:function(){return this.column.style},set:function(e){this.column.style=e}},{key:"totalsRowLabel",get:function(){return this.column.totalsRowLabel},set:function(e){this._set("totalsRowLabel",e)}},{key:"totalsRowFunction",get:function(){return this.column.totalsRowFunction},set:function(e){this._set("totalsRowFunction",e)}},{key:"totalsRowResult",get:function(){return this.column.totalsRowResult},set:function(e){this._set("totalsRowResult",e)}},{key:"totalsRowFormula",get:function(){return this.column.totalsRowFormula},set:function(e){this._set("totalsRowFormula",e)}}]),c);o(u,[{key:"getFormula",value:function(e){switch(e.totalsRowFunction){case"none":return null;case"average":return"SUBTOTAL(101,".concat(this.table.name,"[").concat(e.name,"])");case"countNums":return"SUBTOTAL(102,".concat(this.table.name,"[").concat(e.name,"])");case"count":return"SUBTOTAL(103,".concat(this.table.name,"[").concat(e.name,"])");case"max":return"SUBTOTAL(104,".concat(this.table.name,"[").concat(e.name,"])");case"min":return"SUBTOTAL(105,".concat(this.table.name,"[").concat(e.name,"])");case"stdDev":return"SUBTOTAL(106,".concat(this.table.name,"[").concat(e.name,"])");case"var":return"SUBTOTAL(107,".concat(this.table.name,"[").concat(e.name,"])");case"sum":return"SUBTOTAL(109,".concat(this.table.name,"[").concat(e.name,"])");case"custom":return e.totalsRowFormula;default:throw new Error("Invalid Totals Row Function: ".concat(e.totalsRowFunction))}}},{key:"validate",value:function(){function e(e,t,n){void 0===e[t]&&(e[t]=n)}function t(e,t){if(!e)throw new Error(t)}var n=this,r=this.table,i=(o=(e(r,"headerRow",!0),e(r,"totalsRow",!1),e(r,"style",{}),e(r.style,"theme","TableStyleMedium2"),e(r.style,"showFirstColumn",!1),e(r.style,"showLastColumn",!1),e(r.style,"showRowStripes",!1),e(r.style,"showColumnStripes",!1),t(r.ref,"Table must have ref"),t(r.columns,"Table must have column definitions"),t(r.rows,"Table must have row definitions"),r.tl=a.decodeAddress(r.ref),r.tl)).row,o=o.col,s=(t(0<i,"Table must be on valid row"),t(0<o,"Table must be on valid col"),this.width),u=this.filterHeight,c=this.tableHeight;r.autoFilterRef=a.encode(i,o,i+u-1,o+s-1),r.tableRef=a.encode(i,o,i+c-1,o+s-1),r.columns.forEach((function(r,i){t(r.name,"Column ".concat(i," must have a name")),0===i?e(r,"totalsRowLabel","Total"):(e(r,"totalsRowFunction","none"),r.totalsRowFormula=n.getFormula(r))}))}},{key:"store",value:function(){function e(e,t){t&&Object.keys(t).forEach((function(n){e[n]=t[n]}))}var t,n,r=this,i=this.worksheet,o=this.table,a=o.tl,s=a.row,u=a.col,c=0;o.headerRow&&(t=i.getRow(s+c++),o.columns.forEach((function(n,r){var i=n.style;n=n.name;(r=t.getCell(u+r)).value=n,e(r,i)}))),o.rows.forEach((function(t){var n=i.getRow(s+c++);t.forEach((function(t,r){var i=n.getCell(u+r);i.value=t,e(i,o.columns[r].style)}))})),o.totalsRow&&(n=i.getRow(s+c++),o.columns.forEach((function(t,i){var o=n.getCell(u+i);0===i?o.value=t.totalsRowLabel:(i=r.getFormula(t),o.value=i?{formula:t.totalsRowFormula,result:t.totalsRowResult}:null),e(o,t.style)})))}},{key:"load",value:function(e){var t,n,r=this,i=this.table,o=i.tl,a=o.row,s=o.col,u=0;i.headerRow&&(t=e.getRow(a+u++),i.columns.forEach((function(e,n){t.getCell(s+n).value=e.name}))),i.rows.forEach((function(t){var n=e.getRow(a+u++);t.forEach((function(e,t){n.getCell(s+t).value=e}))})),i.totalsRow&&(n=e.getRow(a+u++),i.columns.forEach((function(e,t){var i=n.getCell(s+t);0===t?i.value=e.totalsRowLabel:r.getFormula(e)&&(i.value={formula:e.totalsRowFormula,result:e.totalsRowResult})})))}},{key:"cacheState",value:function(){this._cache||(this._cache={ref:this.ref,width:this.width,tableHeight:this.tableHeight})}},{key:"commit",value:function(){if(this._cache){this.validate();var e=a.decodeAddress(this._cache.ref);if(this.ref!==this._cache.ref)for(var t=0;t<this._cache.tableHeight;t++)for(var n=this.worksheet.getRow(e.row+t),r=0;r<this._cache.width;r++)n.getCell(e.col+r).value=null;else{for(var i=this.tableHeight;i<this._cache.tableHeight;i++)for(var o=this.worksheet.getRow(e.row+i),s=0;s<this._cache.width;s++)o.getCell(e.col+s).value=null;for(var u=0;u<this.tableHeight;u++)for(var c=this.worksheet.getRow(e.row+u),l=this.width;l<this._cache.width;l++)c.getCell(e.col+l).value=null}this.store()}}},{key:"addRow",value:function(e,t){this.cacheState(),void 0===t?this.table.rows.push(e):this.table.rows.splice(t,0,e)}},{key:"removeRows",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1;this.cacheState(),this.table.rows.splice(e,t)}},{key:"getColumn",value:function(e){var t=this.table.columns[e];return new s(this,t,e)}},{key:"addColumn",value:function(e,t,n){this.cacheState(),void 0===n?(this.table.columns.push(e),this.table.rows.forEach((function(e,n){e.push(t[n])}))):(this.table.columns.splice(n,0,e),this.table.rows.forEach((function(e,r){e.splice(n,0,t[r])})))}},{key:"removeColumns",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1;this.cacheState(),this.table.columns.splice(e,t),this.table.rows.forEach((function(n){n.splice(e,t)}))}},{key:"_assign",value:function(e,t,n){this.cacheState(),e[t]=n}},{key:"width",get:function(){return this.table.columns.length}},{key:"height",get:function(){return this.table.rows.length}},{key:"filterHeight",get:function(){return this.height+(this.table.headerRow?1:0)}},{key:"tableHeight",get:function(){return this.filterHeight+(this.table.totalsRow?1:0)}},{key:"model",get:function(){return this.table},set:function(e){this.table=e}},{key:"ref",get:function(){return this.table.ref},set:function(e){this._assign(this.table,"ref",e)}},{key:"name",get:function(){return this.table.name},set:function(e){this.table.name=e}},{key:"displayName",get:function(){return this.table.displyName||this.table.name}},{key:"displayNamename",set:function(e){this.table.displayName=e}},{key:"headerRow",get:function(){return this.table.headerRow},set:function(e){this._assign(this.table,"headerRow",e)}},{key:"totalsRow",get:function(){return this.table.totalsRow},set:function(e){this._assign(this.table,"totalsRow",e)}},{key:"theme",get:function(){return this.table.style.name},set:function(e){this.table.style.name=e}},{key:"showFirstColumn",get:function(){return this.table.style.showFirstColumn},set:function(e){this.table.style.showFirstColumn=e}},{key:"showLastColumn",get:function(){return this.table.style.showLastColumn},set:function(e){this.table.style.showLastColumn=e}},{key:"showRowStripes",get:function(){return this.table.style.showRowStripes},set:function(e){this.table.style.showRowStripes=e}},{key:"showColumnStripes",get:function(){return this.table.style.showColumnStripes},set:function(e){this.table.style.showColumnStripes=e}}]),e=u;function u(e,t){r(this,u),this.worksheet=e,t&&(this.table=t,this.validate(),this.store())}function c(e,t,n){r(this,c),this.table=e,this.column=t,this.index=n}t.exports=e},{"../utils/col-cache":19}],13:[function(e,t,n){"use strict";var r=e("./worksheet"),i=e("./defined-names"),o=e("../xlsx/xlsx"),a=e("../csv/csv");(function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}})(s.prototype,[{key:"addWorksheet",value:function(e,t){var n=this.nextId;if(e&&e.length,/[*?:/\\[\]]/.test(e))throw new Error("Worksheet name ".concat(e," cannot include any of the following characters: * ? : \\ / [ ]"));if(/(^')|('$)/.test(e))throw new Error("The first or last character of worksheet name cannot be a single quotation mark: ".concat(e));if(e=(e||"sheet".concat(n)).substring(0,31),this._worksheets.find((function(t){return t&&t.name.toLowerCase()===e.toLowerCase()})))throw new Error("Worksheet name already exists: ".concat(e));t&&("string"==typeof t?t={properties:{tabColor:{argb:t}}}:(t.argb||t.theme||t.indexed)&&(t={properties:{tabColor:t}}));var i=this._worksheets.reduce((function(e,t){return(t&&t.orderNo)>e?t.orderNo:e}),0);t=Object.assign({},t,{id:n,name:e,orderNo:i+1,workbook:this}),i=new r(t);return this._worksheets[n]=i}},{key:"removeWorksheetEx",value:function(e){delete this._worksheets[e.id]}},{key:"removeWorksheet",value:function(e){(e=this.getWorksheet(e))&&e.destroy()}},{key:"getWorksheet",value:function(e){return void 0===e?this._worksheets.find(Boolean):"number"==typeof e?this._worksheets[e]:"string"==typeof e?this._worksheets.find((function(t){return t&&t.name===e})):void 0}},{key:"eachSheet",value:function(e){this.worksheets.forEach((function(t){e(t,t.id)}))}},{key:"clearThemes",value:function(){this._themes=void 0}},{key:"addImage",value:function(e){var t=this.media.length;return this.media.push(Object.assign({},e,{type:"image"})),t}},{key:"getImage",value:function(e){return this.media[e]}},{key:"xlsx",get:function(){return this._xlsx||(this._xlsx=new o(this)),this._xlsx}},{key:"csv",get:function(){return this._csv||(this._csv=new a(this)),this._csv}},{key:"nextId",get:function(){for(var e=1;e<this._worksheets.length;e++)if(!this._worksheets[e])return e;return this._worksheets.length||1}},{key:"worksheets",get:function(){return this._worksheets.slice(1).sort((function(e,t){return e.orderNo-t.orderNo})).filter(Boolean)}},{key:"definedNames",get:function(){return this._definedNames}},{key:"model",get:function(){return{creator:this.creator||"Unknown",lastModifiedBy:this.lastModifiedBy||"Unknown",lastPrinted:this.lastPrinted,created:this.created,modified:this.modified,properties:this.properties,worksheets:this.worksheets.map((function(e){return e.model})),sheets:this.worksheets.map((function(e){return e.model})).filter(Boolean),definedNames:this._definedNames.model,views:this.views,company:this.company,manager:this.manager,title:this.title,subject:this.subject,keywords:this.keywords,category:this.category,description:this.description,language:this.language,revision:this.revision,contentStatus:this.contentStatus,themes:this._themes,media:this.media,calcProperties:this.calcProperties}},set:function(e){var t=this;this.creator=e.creator,this.lastModifiedBy=e.lastModifiedBy,this.lastPrinted=e.lastPrinted,this.created=e.created,this.modified=e.modified,this.company=e.company,this.manager=e.manager,this.title=e.title,this.subject=e.subject,this.keywords=e.keywords,this.category=e.category,this.description=e.description,this.language=e.language,this.revision=e.revision,this.contentStatus=e.contentStatus,this.properties=e.properties,this.calcProperties=e.calcProperties,this._worksheets=[],e.worksheets.forEach((function(n){var i=n.id,o=n.name,a=n.state,s=e.sheets&&e.sheets.findIndex((function(e){return e.id===i}));(t._worksheets[i]=new r({id:i,name:o,orderNo:s,state:a,workbook:t})).model=n})),this._definedNames.model=e.definedNames,this.views=e.views,this._themes=e.themes,this.media=e.media||[]}}]),e=s;function s(){if(!(this instanceof s))throw new TypeError("Cannot call a class as a function");this.category="",this.company="",this.created=new Date,this.description="",this.keywords="",this.manager="",this.modified=this.created,this.properties={},this.calcProperties={},this._worksheets=[],this.subject="",this.title="",this.views=[],this.media=[],this._definedNames=new i}t.exports=e},{"../csv/csv":1,"../xlsx/xlsx":141,"./defined-names":6,"./worksheet":14}],14:[function(e,t,n){"use strict";function r(e,t){var n,r=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)),r}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){var r,i;r=e,i=n[t=t],t in r?Object.defineProperty(r,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[t]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e){var t;if(e)return"string"==typeof e?a(e,void 0):"Map"===(t="Object"===(t=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:t)||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?a(e,void 0):void 0}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var s=e("../utils/under-dash"),u=e("../utils/col-cache"),c=e("./range"),l=e("./row"),h=e("./column"),f=e("./enums"),d=e("./image"),p=e("./table"),m=e("./data-validations"),g=e("../utils/encryptor");(function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}})(A.prototype,[{key:"destroy",value:function(){this._workbook.removeWorksheetEx(this)}},{key:"getColumnKey",value:function(e){return this._keys[e]}},{key:"setColumnKey",value:function(e,t){this._keys[e]=t}},{key:"deleteColumnKey",value:function(e){delete this._keys[e]}},{key:"eachColumnKey",value:function(e){s.each(this._keys,e)}},{key:"getColumn",value:function(e){if("string"==typeof e){var t=this._keys[e];if(t)return t;e=u.l2n(e)}if(this._columns||(this._columns=[]),e>this._columns.length)for(var n=this._columns.length+1;n<=e;)this._columns.push(new h(this,n++));return this._columns[e-1]}},{key:"spliceColumns",value:function(e,t){for(var n=this,r=this._rows.length,i=arguments.length,o=new Array(2<i?i-2:0),a=2;a<i;a++)o[a-2]=arguments[a];if(0<o.length)for(var s=0;s<r;s++)!function(r){var i=[e,t],a=(o.forEach((function(e){i.push(e[r]||null)})),n.getRow(r+1));a.splice.apply(a,i)}(s);else this._rows.forEach((function(n){n&&n.splice(e,t)}));var u=o.length-t,c=e+t,l=this._columns.length;if(u<0)for(var h=e+o.length;h<=l;h++)this.getColumn(h).defn=this.getColumn(h-u).defn;else if(0<u)for(var f=l;c<=f;f--)this.getColumn(f+u).defn=this.getColumn(f).defn;for(var d=e;d<e+o.length;d++)this.getColumn(d).defn=null;this.workbook.definedNames.spliceColumns(this.name,e,t,o.length)}},{key:"_commitRow",value:function(){}},{key:"findRow",value:function(e){return this._rows[e-1]}},{key:"findRows",value:function(e,t){return this._rows.slice(e-1,e-1+t)}},{key:"getRow",value:function(e){return this._rows[e-1]||(this._rows[e-1]=new l(this,e))}},{key:"getRows",value:function(e,t){if(!(t<1)){for(var n=[],r=e;r<e+t;r++)n.push(this.getRow(r));return n}}},{key:"addRow",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"n",n=this._nextRow,r=this.getRow(n);return r.values=e,this._setStyleOption(n,"i"===t[0]?t:"n"),r}},{key:"addRows",value:function(e){var t=this,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"n",r=[];return e.forEach((function(e){r.push(t.addRow(e,n))})),r}},{key:"insertRow",value:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"n";return this.spliceRows(e,0,t),this._setStyleOption(e,n),this.getRow(e)}},{key:"insertRows",value:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"n";if(this.spliceRows.apply(this,[e,0].concat(o(t))),"n"!==n)for(var r=0;r<t.length;r++)"o"===n[0]&&void 0!==this.findRow(t.length+e+r)?this._copyStyle(t.length+e+r,e+r,"+"===n[1]):"i"===n[0]&&void 0!==this.findRow(e-1)&&this._copyStyle(e-1,e+r,"+"===n[1]);return this.getRows(e,t.length)}},{key:"_setStyleOption",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"n";"o"===t[0]&&void 0!==this.findRow(e+1)?this._copyStyle(e+1,e,"+"===t[1]):"i"===t[0]&&void 0!==this.findRow(e-1)&&this._copyStyle(e-1,e,"+"===t[1])}},{key:"_copyStyle",value:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]&&arguments[2],r=(e=this.getRow(e),this.getRow(t));r.style=Object.freeze(i({},e.style)),e.eachCell({includeEmpty:n},(function(e,t){r.getCell(t).style=Object.freeze(i({},e.style))})),r.height=e.height}},{key:"duplicateRow",value:function(e,t){var n=this,r=2<arguments.length&&void 0!==arguments[2]&&arguments[2],i=this._rows[e-1],a=new Array(t).fill(i.values);this.spliceRows.apply(this,[e+1,r?0:t].concat(o(a)));for(var s=0;s<t;s++)!function(t){var r=n._rows[e+t];r.style=i.style,r.height=i.height,i.eachCell({includeEmpty:!0},(function(e,t){r.getCell(t).style=e.style}))}(s)}},{key:"spliceRows",value:function(e,t){for(var n=this,r=e+t,i=arguments.length,o=new Array(2<i?i-2:0),a=2;a<i;a++)o[a-2]=arguments[a];var s,u,c=o.length,l=c-t,h=this._rows.length;if(l<0)for(s=r;s<=h;s++)(u=this._rows[s-1])?function(){var e=n.getRow(s+l);e.values=u.values,e.style=u.style,e.height=u.height,u.eachCell({includeEmpty:!0},(function(t,n){e.getCell(n).style=t.style})),n._rows[s-1]=void 0}():this._rows[s+l-1]=void 0;else if(0<l)for(s=h;r<=s;s--)(u=this._rows[s-1])?function(){var e=n.getRow(s+l);e.values=u.values,e.style=u.style,e.height=u.height,u.eachCell({includeEmpty:!0},(function(t,r){e.getCell(r).style=t.style,"MergeValue"===t._value.constructor.name&&(r=n.getRow(t._row._number+c).getCell(r),t=t._value._master,t=n.getRow(t._row._number+c).getCell(t._column._number),r.merge(t))}))}():this._rows[s+l-1]=void 0;for(s=0;s<c;s++){var f=this.getRow(e+s);f.style={},f.values=o[s]}this.workbook.definedNames.spliceRows(this.name,e,t,c)}},{key:"eachRow",value:function(e,t){if(t||(t=e,e=void 0),e&&e.includeEmpty)for(var n=this._rows.length,r=1;r<=n;r++)t(this.getRow(r),r);else this._rows.forEach((function(e){e&&e.hasValues&&t(e,e.number)}))}},{key:"getSheetValues",value:function(){var e=[];return this._rows.forEach((function(t){t&&(e[t.number]=t.values)})),e}},{key:"findCell",value:function(e,t){return e=u.getAddress(e,t),(t=this._rows[e.row-1])?t.findCell(e.col):void 0}},{key:"getCell",value:function(e,t){return e=u.getAddress(e,t),this.getRow(e.row).getCellEx(e)}},{key:"mergeCells",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=new c(t);this._mergeCellsInternal(r)}},{key:"mergeCellsWithoutStyle",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=new c(t);this._mergeCellsInternal(r,!0)}},{key:"_mergeCellsInternal",value:function(e,t){s.each(this._merges,(function(t){if(t.intersects(e))throw new Error("Cannot merge already merged cells")}));for(var n=this.getCell(e.top,e.left),r=e.top;r<=e.bottom;r++)for(var i=e.left;i<=e.right;i++)(r>e.top||i>e.left)&&this.getCell(r,i).merge(n,t);this._merges[n.address]=e}},{key:"_unMergeMaster",value:function(e){var t=this._merges[e.address];if(t){for(var n=t.top;n<=t.bottom;n++)for(var r=t.left;r<=t.right;r++)this.getCell(n,r).unmerge();delete this._merges[e.address]}}},{key:"unMergeCells",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(var r=new c(t),i=r.top;i<=r.bottom;i++)for(var o=r.left;o<=r.right;o++){var a=this.findCell(i,o);a&&(a.type===f.ValueType.Merge?this._unMergeMaster(a.master):this._merges[a.address]&&this._unMergeMaster(a))}}},{key:"fillFormula",value:function(e,t,n){for(var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:"shared",i=u.decode(e),o=i.top,a=i.left,s=i.bottom,c=i.right,l=c-a+1,h=u.encodeAddress(o,a),f="shared"===r,d="function"==typeof n?n:Array.isArray(n)?Array.isArray(n[0])?function(e,t){return n[e-o][t-a]}:function(e,t){return n[(e-o)*l+(t-a)]}:function(){},p=!0,m=o;m<=s;m++)for(var g=a;g<=c;g++)p?p=!(this.getCell(m,g).value={shareType:r,formula:t,ref:e,result:d(m,g)}):this.getCell(m,g).value=f?{sharedFormula:h,result:d(m,g)}:d(m,g)}},{key:"addImage",value:function(e,t){this._media.push(new d(this,{type:"image",imageId:e,range:t}))}},{key:"getImages",value:function(){return this._media.filter((function(e){return"image"===e.type}))}},{key:"addBackgroundImage",value:function(e){this._media.push(new d(this,{type:"background",imageId:e}))}},{key:"getBackgroundImageId",value:function(){var e=this._media.find((function(e){return"background"===e.type}));return e&&e.imageId}},{key:"protect",value:function(e,t){var n=this;return new Promise((function(r){n.sheetProtection={sheet:!0},t&&"spinCount"in t&&(t.spinCount=Number.isFinite(t.spinCount)?Math.round(Math.max(0,t.spinCount)):1e5),e&&(n.sheetProtection.algorithmName="SHA-512",n.sheetProtection.saltValue=g.randomBytes(16).toString("base64"),n.sheetProtection.spinCount=t&&"spinCount"in t?t.spinCount:1e5,n.sheetProtection.hashValue=g.convertPasswordToHash(e,"SHA512",n.sheetProtection.saltValue,n.sheetProtection.spinCount)),t&&(n.sheetProtection=Object.assign(n.sheetProtection,t),!e&&"spinCount"in t&&delete n.sheetProtection.spinCount),r()}))}},{key:"unprotect",value:function(){this.sheetProtection=null}},{key:"addTable",value:function(e){var t=new p(this,e);return this.tables[e.name]=t}},{key:"getTable",value:function(e){return this.tables[e]}},{key:"removeTable",value:function(e){delete this.tables[e]}},{key:"getTables",value:function(){return Object.values(this.tables)}},{key:"addConditionalFormatting",value:function(e){this.conditionalFormattings.push(e)}},{key:"removeConditionalFormatting",value:function(e){"number"==typeof e?this.conditionalFormattings.splice(e,1):this.conditionalFormattings=e instanceof Function?this.conditionalFormattings.filter(e):[]}},{key:"_parseRows",value:function(e){var t=this;this._rows=[],e.rows.forEach((function(e){var n=new l(t,e.number);(t._rows[n.number-1]=n).model=e}))}},{key:"_parseMergeCells",value:function(e){var t=this;s.each(e.mergeCells,(function(e){t.mergeCellsWithoutStyle(e)}))}},{key:"workbook",get:function(){return this._workbook}},{key:"dimensions",get:function(){var e=new c;return this._rows.forEach((function(t){var n;t&&(n=t.dimensions)&&e.expand(t.number,n.min,t.number,n.max)})),e}},{key:"columns",get:function(){return this._columns},set:function(e){var t=this,n=(this._headerRowCount=e.reduce((function(e,t){return t=(t.header?1:t.headers&&t.headers.length)||0,Math.max(e,t)}),0),1),r=this._columns=[];e.forEach((function(e){var i=new h(t,n++,!1);r.push(i),i.defn=e}))}},{key:"lastColumn",get:function(){return this.getColumn(this.columnCount)}},{key:"columnCount",get:function(){var e=0;return this.eachRow((function(t){e=Math.max(e,t.cellCount)})),e}},{key:"actualColumnCount",get:function(){var e=[],t=0;return this.eachRow((function(n){n.eachCell((function(n){n=n.col,e[n]||(e[n]=!0,t++)}))})),t}},{key:"_lastRowNumber",get:function(){for(var e=this._rows,t=e.length;0<t&&void 0===e[t-1];)t--;return t}},{key:"_nextRow",get:function(){return this._lastRowNumber+1}},{key:"lastRow",get:function(){if(this._rows.length)return this._rows[this._rows.length-1]}},{key:"rowCount",get:function(){return this._lastRowNumber}},{key:"actualRowCount",get:function(){var e=0;return this.eachRow((function(){e++})),e}},{key:"hasMerges",get:function(){return s.some(this._merges,Boolean)}},{key:"tabColor",get:function(){return this.properties.tabColor},set:function(e){this.properties.tabColor=e}},{key:"model",get:function(){var e={id:this.id,name:this.name,dataValidations:this.dataValidations.model,properties:this.properties,state:this.state,pageSetup:this.pageSetup,headerFooter:this.headerFooter,rowBreaks:this.rowBreaks,views:this.views,autoFilter:this.autoFilter,media:this._media.map((function(e){return e.model})),sheetProtection:this.sheetProtection,tables:Object.values(this.tables).map((function(e){return e.model})),conditionalFormattings:this.conditionalFormattings},t=(e.cols=h.toModel(this.columns),e.rows=[]),n=e.dimensions=new c;return this._rows.forEach((function(e){(e=e&&e.model)&&(n.expand(e.number,e.min,e.number,e.max),t.push(e))})),e.merges=[],s.each(this._merges,(function(t){e.merges.push(t.range)})),e},set:function(e){var t=this;this.name=e.name,this._columns=h.fromModel(this,e.cols),this._parseRows(e),this._parseMergeCells(e),this.dataValidations=new m(e.dataValidations),this.properties=e.properties,this.pageSetup=e.pageSetup,this.headerFooter=e.headerFooter,this.views=e.views,this.autoFilter=e.autoFilter,this._media=e.media.map((function(e){return new d(t,e)})),this.sheetProtection=e.sheetProtection,this.tables=e.tables.reduce((function(e,t){var n=new p;return e[(n.model=t).name]=n,e}),{}),this.conditionalFormattings=e.conditionalFormattings}}]),e=A;function A(e){if(!(this instanceof A))throw new TypeError("Cannot call a class as a function");this.id=(e=e||{}).id,this.orderNo=e.orderNo,this.name=e.name||"Sheet".concat(this.id),this.state=e.state||"visible",this._rows=[],this._columns=null,this._keys={},this._merges={},this.rowBreaks=[],this._workbook=e.workbook,this.properties=Object.assign({},{defaultRowHeight:15,dyDescent:55,outlineLevelCol:0,outlineLevelRow:0},e.properties),this.pageSetup=Object.assign({},{margins:{left:.7,right:.7,top:.75,bottom:.75,header:.3,footer:.3},orientation:"portrait",horizontalDpi:4294967295,verticalDpi:4294967295,fitToPage:!(!e.pageSetup||!e.pageSetup.fitToWidth&&!e.pageSetup.fitToHeight||e.pageSetup.scale),pageOrder:"downThenOver",blackAndWhite:!1,draft:!1,cellComments:"None",errors:"displayed",scale:100,fitToWidth:1,fitToHeight:1,paperSize:void 0,showRowColHeaders:!1,showGridLines:!1,firstPageNumber:void 0,horizontalCentered:!1,verticalCentered:!1,rowBreaks:null,colBreaks:null},e.pageSetup),this.headerFooter=Object.assign({},{differentFirst:!1,differentOddEven:!1,oddHeader:null,oddFooter:null,evenHeader:null,evenFooter:null,firstHeader:null,firstFooter:null},e.headerFooter),this.dataValidations=new m,this.views=e.views||[],this.autoFilter=e.autoFilter||null,this._media=[],this.sheetProtection=null,this.tables={},this.conditionalFormattings=[]}t.exports=e},{"../utils/col-cache":19,"../utils/encryptor":20,"../utils/under-dash":25,"./column":4,"./data-validations":5,"./enums":7,"./image":8,"./range":10,"./row":11,"./table":12}],15:[function(e,t,n){"use strict";e("core-js/modules/es.promise"),e("core-js/modules/es.object.assign"),e("core-js/modules/es.object.keys"),e("core-js/modules/es.object.values"),e("core-js/modules/es.symbol"),e("core-js/modules/es.symbol.async-iterator"),e("core-js/modules/es.array.iterator"),e("core-js/modules/es.array.includes"),e("core-js/modules/es.array.find-index"),e("core-js/modules/es.array.find"),e("core-js/modules/es.string.from-code-point"),e("core-js/modules/es.string.includes"),e("core-js/modules/es.number.is-nan"),e("regenerator-runtime/runtime");var r={Workbook:e("./doc/workbook")},i=e("./doc/enums");Object.keys(i).forEach((function(e){r[e]=i[e]})),t.exports=r},{"./doc/enums":7,"./doc/workbook":13,"core-js/modules/es.array.find":316,"core-js/modules/es.array.find-index":315,"core-js/modules/es.array.includes":317,"core-js/modules/es.array.iterator":318,"core-js/modules/es.number.is-nan":319,"core-js/modules/es.object.assign":320,"core-js/modules/es.object.keys":321,"core-js/modules/es.object.values":322,"core-js/modules/es.promise":323,"core-js/modules/es.string.from-code-point":324,"core-js/modules/es.string.includes":325,"core-js/modules/es.symbol":327,"core-js/modules/es.symbol.async-iterator":326,"regenerator-runtime/runtime":492}],16:[function(e,t,n){"use strict";var r="undefined"==typeof TextDecoder?null:new TextDecoder("utf-8");n.bufferToString=function(e){return"string"==typeof e?e:r?r.decode(e):e.toString()}},{}],17:[function(e,t,n){"use strict";var r="undefined"==typeof TextEncoder?null:new TextEncoder("utf-8"),i=e("buffer").Buffer;n.stringToBuffer=function(e){return"string"!=typeof e?e:r?i.from(r.encode(e).buffer):i.from(e)}},{buffer:216}],18:[function(e,t,n){"use strict";var r=e("./under-dash"),i=e("./col-cache");(function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}})(o.prototype,[{key:"addCell",value:function(e){this.addCellEx(i.decodeEx(e))}},{key:"getCell",value:function(e){return this.findCellEx(i.decodeEx(e),!0)}},{key:"findCell",value:function(e){return this.findCellEx(i.decodeEx(e),!1)}},{key:"findCellAt",value:function(e,t,n){return(e=(e=this.sheets[e])&&e[t])&&e[n]}},{key:"addCellEx",value:function(e){if(e.top)for(var t=e.top;t<=e.bottom;t++)for(var n=e.left;n<=e.right;n++)this.getCellAt(e.sheetName,t,n);else this.findCellEx(e,!0)}},{key:"getCellEx",value:function(e){return this.findCellEx(e,!0)}},{key:"findCellEx",value:function(e,t){var n=this.findSheet(e,t);n=this.findSheetRow(n,e,t);return this.findRowCell(n,e,t)}},{key:"getCellAt",value:function(e,t,n){var r;return(r=(r=this.sheets[e]||(this.sheets[e]=[]))[t]||(r[t]=[]))[n]||(r[n]={sheetName:e,address:i.n2l(n)+t,row:t,col:n})}},{key:"removeCellEx",value:function(e){var t=this.findSheet(e);t&&(t=this.findSheetRow(t,e))&&delete t[e.col]}},{key:"forEachInSheet",value:function(e,t){(e=this.sheets[e])&&e.forEach((function(e,n){e&&e.forEach((function(e,r){e&&t(e,n,r)}))}))}},{key:"forEach",value:function(e){var t=this;r.each(this.sheets,(function(n,r){t.forEachInSheet(r,e)}))}},{key:"map",value:function(e){var t=[];return this.forEach((function(n){t.push(e(n))})),t}},{key:"findSheet",value:function(e,t){return e=e.sheetName,this.sheets[e]||(t?this.sheets[e]=[]:void 0)}},{key:"findSheetRow",value:function(e,t,n){return t=t.row,e&&e[t]?e[t]:n?e[t]=[]:void 0}},{key:"findRowCell",value:function(e,t,n){var r=t.col;return e&&e[r]?e[r]:n?e[r]=this.template?Object.assign(t,JSON.parse(JSON.stringify(this.template))):t:void 0}},{key:"spliceRows",value:function(e,t,n,r){if(e=this.sheets[e]){for(var i=[],o=0;o<r;o++)i.push([]);e.splice.apply(e,[t,n].concat(i))}}},{key:"spliceColumns",value:function(e,t,n,i){if(e=this.sheets[e]){for(var o=[],a=0;a<i;a++)o.push(null);r.each(e,(function(e){e.splice.apply(e,[t,n].concat(o))}))}}}]),e=o;function o(e){if(!(this instanceof o))throw new TypeError("Cannot call a class as a function");this.template=e,this.sheets={}}t.exports=e},{"./col-cache":19,"./under-dash":25}],19:[function(e,t,n){"use strict";function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}(e,t)||function(e,t){var n;if(e)return"string"==typeof e?i(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(e,t){var n,r=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)),r}var a=/^[A-Z]+\d+$/,s={_dictionary:["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],_l2nFill:0,_l2n:{},_n2l:[],_level:function(e){return e<=26?1:e<=676?2:3},_fill:function(e){var t,n,r,i,o,a=1;if(4<=e)throw new Error("Out of bounds. Excel supports columns from 1 to 16384");if(this._l2nFill<1&&1<=e){for(;a<=26;)t=this._dictionary[a-1],this._n2l[a]=t,this._l2n[t]=a,a++;this._l2nFill=1}if(this._l2nFill<2&&2<=e){for(a=27;a<=702;)r=(n=a-27)%26,i=Math.floor(n/26),t=this._dictionary[i]+this._dictionary[r],this._n2l[a]=t,this._l2n[t]=a,a++;this._l2nFill=2}if(this._l2nFill<3&&3<=e){for(a=703;a<=16384;)r=(n=a-703)%26,i=Math.floor(n/26)%26,o=Math.floor(n/676),t=this._dictionary[o]+this._dictionary[i]+this._dictionary[r],this._n2l[a]=t,this._l2n[t]=a,a++;this._l2nFill=3}},l2n:function(e){if(this._l2n[e]||this._fill(e.length),this._l2n[e])return this._l2n[e];throw new Error("Out of bounds. Invalid column letter: ".concat(e))},n2l:function(e){if(e<1||16384<e)throw new Error("".concat(e," is out of bounds. Excel supports columns from 1 to 16384"));return this._n2l[e]||this._fill(this._level(e)),this._n2l[e]},_hash:{},validateAddress:function(e){if(a.test(e))return!0;throw new Error("Invalid Address: ".concat(e))},decodeAddress:function(e){var t=e.length<5&&this._hash[e];if(t)return t;for(var n,r=!1,i="",o=0,a=!1,s="",u=0,c=0;c<e.length;c++)if(n=e.charCodeAt(c),!a&&65<=n&&n<=90)r=!0,i+=e[c],o=26*o+n-64;else if(48<=n&&n<=57)a=!0,s+=e[c],u=10*u+n-48;else if(a&&r&&36!==n)break;if(r){if(16384<o)throw new Error("Out of bounds. Invalid column letter: ".concat(i))}else o=void 0;return t={address:e=i+s,col:o,row:u=a?u:void 0,$col$row:"$".concat(i,"$").concat(s)},o<=100&&u<=100&&(this._hash[e]=t,this._hash[t.$col$row]=t),t},getAddress:function(e,t){return t?(t=this.n2l(t)+e,this.decodeAddress(t)):this.decodeAddress(e)},decode:function(e){var t,n=e.split(":");return 2===n.length?(t=this.decodeAddress(n[0]),n=this.decodeAddress(n[1]),(t={top:Math.min(t.row,n.row),left:Math.min(t.col,n.col),bottom:Math.max(t.row,n.row),right:Math.max(t.col,n.col)}).tl=this.n2l(t.left)+t.top,t.br=this.n2l(t.right)+t.bottom,t.dimensions="".concat(t.tl,":").concat(t.br),t):this.decodeAddress(e)},decodeEx:function(e){var t,n,r,i,a,s=(e=e.match(/(?:(?:(?:'((?:[^']|'')*)')|([^'^ !]*))!)?(.*)/))[1]||e[2],u=(e=e[3]).split(":");return 1<u.length?(i=this.decodeAddress(u[0]),u=this.decodeAddress(u[1]),t=Math.min(i.row,u.row),a=Math.min(i.col,u.col),n=Math.max(i.row,u.row),r=Math.max(i.col,u.col),i=this.n2l(a)+t,u=this.n2l(r)+n,{top:t,left:a,bottom:n,right:r,sheetName:s,tl:{address:i,col:a,row:t,$col$row:"$".concat(this.n2l(a),"$").concat(t),sheetName:s},br:{address:u,col:r,row:n,$col$row:"$".concat(this.n2l(r),"$").concat(n),sheetName:s},dimensions:"".concat(i,":").concat(u)}):e.startsWith("#")?s?{sheetName:s,error:e}:{error:e}:(a=this.decodeAddress(e),s?function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){var r,i;r=e,i=n[t=t],t in r?Object.defineProperty(r,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[t]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({sheetName:s},a):a)},encodeAddress:function(e,t){return s.n2l(t)+e},encode:function(){switch(arguments.length){case 2:return s.encodeAddress(arguments[0],arguments[1]);case 4:return"".concat(s.encodeAddress(arguments[0],arguments[1]),":").concat(s.encodeAddress(arguments[2],arguments[3]));default:throw new Error("Can only encode with 2 or 4 arguments")}},inRange:function(e,t){var n=(e=r(e,5))[0],i=e[1],o=e[3],a=(e=e[4],(t=r(t,2))[0]);t=t[1];return n<=a&&a<=o&&i<=t&&t<=e}};t.exports=s},{}],20:[function(e,t,n){(function(n){"use strict";var r=e("crypto");t.exports={hash:function(e){e=r.createHash(e);for(var t=arguments.length,i=new Array(1<t?t-1:0),o=1;o<t;o++)i[o-1]=arguments[o];return e.update(n.concat(i)),e.digest()},convertPasswordToHash:function(e,t,i,o){if(t=t.toLowerCase(),r.getHashes().indexOf(t)<0)throw new Error("Hash algorithm '".concat(t,"' not supported!"));e=n.from(e,"utf16le");for(var a=this.hash(t,n.from(i,"base64"),e),s=0;s<o;s++){var u=n.alloc(4);u.writeUInt32LE(s,0),a=this.hash(t,a,u)}return a.toString("base64")},randomBytes:function(e){return r.randomBytes(e)}}}).call(this,e("buffer").Buffer)},{buffer:216,crypto:335}],21:[function(e,t,n){"use strict";function r(e){return new o(e)}function i(e){var t,n;function r(t,n){try{var a=e[t](n),s=a.value,u=s instanceof o;Promise.resolve(u?s.wrapped:s).then((function(e){u?r("return"===t?"return":"next",e):i(a.done?"return":"normal",e)}),(function(e){r("throw",e)}))}catch(n){i("throw",n)}}function i(e,i){switch(e){case"return":t.resolve({value:i,done:!0});break;case"throw":t.reject(i);break;default:t.resolve({value:i,done:!1})}(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,i){return new Promise((function(o,a){o={key:e,arg:i,resolve:o,reject:a,next:null},n?n=n.next=o:(t=n=o,r(e,i))}))},"function"!=typeof e.return&&(this.return=void 0)}function o(e){this.wrapped=e}"function"==typeof Symbol&&Symbol.asyncIterator&&(i.prototype[Symbol.asyncIterator]=function(){return this}),i.prototype.next=function(e){return this._invoke("next",e)},i.prototype.throw=function(e){return this._invoke("throw",e)},i.prototype.return=function(e){return this._invoke("return",e)};var a=e("saxes").SaxesParser,s=e("readable-stream").PassThrough,u=e("./browser-buffer-decode").bufferToString;t.exports=function(){var e;return e=regeneratorRuntime.mark((function e(t){var n,i,o,c,l,h,f,d;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.pipe&&!t[Symbol.asyncIterator]&&(t=t.pipe(new s)),(n=new a).on("error",(function(e){i=e})),o=[],n.on("opentag",(function(e){return o.push({eventType:"opentag",value:e})})),n.on("text",(function(e){return o.push({eventType:"text",value:e})})),n.on("closetag",(function(e){return o.push({eventType:"closetag",value:e})})),l=!(c=!0),e.prev=9,f=function(e){var t;if("undefined"!=typeof Symbol){if(Symbol.asyncIterator&&null!=(t=e[Symbol.asyncIterator]))return t.call(e);if(Symbol.iterator&&null!=(t=e[Symbol.iterator]))return t.call(e)}throw new TypeError("Object is not async iterable")}(t);case 11:return e.next=13,r(f.next());case 13:return d=e.sent,c=d.done,e.next=17,r(d.value);case 17:if(d=e.sent,c)e.next=29;else{if(n.write(u(d)),i)throw i;e.next=23}break;case 23:return e.next=25,o;case 25:o=[];case 26:c=!0,e.next=11;break;case 29:e.next=35;break;case 31:e.prev=31,e.t0=e.catch(9),l=!0,h=e.t0;case 35:if(e.prev=35,e.prev=36,c||null==f.return){e.next=40;break}return e.next=40,r(f.return());case 40:if(e.prev=40,l)throw h;e.next=43;break;case 43:return e.finish(40);case 44:return e.finish(35);case 45:case"end":return e.stop()}}),e,null,[[9,31,35,45],[36,,40,44]])})),function(t){return function(){return new i(e.apply(this,arguments))}.apply(this,arguments)}}()},{"./browser-buffer-decode":16,"readable-stream":491,saxes:496}],22:[function(e,t,n){"use strict";var r=e("./col-cache"),i=/(([a-z_\-0-9]*)!)?([a-z0-9_$]{2,})([(])?/gi,o=/^([$])?([a-z]+)([$])?([1-9][0-9]*)$/i;t.exports={slideFormula:function(e,t,n){var a=r.decode(t),s=r.decode(n);return e.replace(i,(function(e,t,n,i,u){var c,l;return u||!(u=o.exec(i))||(i=u[1],l=u[2].toUpperCase(),c=u[3],u=u[4],3<l.length||3===l.length&&"XFD"<l)?e:(e=r.l2n(l),l=parseInt(u,10),i||(e+=s.col-a.col),c||(l+=s.row-a.row),(t||"")+(i||"")+r.n2l(e)+(c||"")+l)}))}}},{"./col-cache":19}],23:[function(e,t,n){(function(n,r){"use strict";function i(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function o(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function s(e){i(a,r,o,s,u,"next",e)}function u(e){i(a,r,o,s,u,"throw",e)}s(void 0)}))}}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t,n){t&&s(e.prototype,t),n&&s(e,n)}function c(e){this.bufSize=(e=e||{}).bufSize||1048576,this.buffers=[],this.batch=e.batch||!1,this.corked=!1,this.inPos=0,this.outPos=0,this.pipes=[],this.paused=!1,this.encoding=null}var l=e("readable-stream"),h=e("./utils"),f=e("./string-buf"),d=(u(y,[{key:"copy",value:function(e,t,n,r){return this.toBuffer().copy(e,t,n,r)}},{key:"toBuffer",value:function(){return this._buffer||(this._buffer=r.from(this._data,this._encoding)),this._buffer}},{key:"length",get:function(){return this.toBuffer().length}}]),y),p=(u(b,[{key:"copy",value:function(e,t,n,r){return this._data._buf.copy(e,t,n,r)}},{key:"toBuffer",value:function(){return this._data.toBuffer()}},{key:"length",get:function(){return this._data.length}}]),b),m=(u(v,[{key:"copy",value:function(e,t,n,r){this._data.copy(e,t,n,r)}},{key:"toBuffer",value:function(){return this._data}},{key:"length",get:function(){return this._data.length}}]),v),g=(u(A,[{key:"toBuffer",value:function(){var e;return 0===this.iRead&&this.iWrite===this.size?this.buffer:(e=r.alloc(this.iWrite-this.iRead),this.buffer.copy(e,0,this.iRead,this.iWrite),e)}},{key:"read",value:function(e){var t;return 0===e?null:(void 0===e||e>=this.length?(t=this.toBuffer(),this.iRead=this.iWrite):(t=r.alloc(e),this.buffer.copy(t,0,this.iRead,e),this.iRead+=e),t)}},{key:"write",value:function(e,t,n){return n=Math.min(n,this.size-this.iWrite),e.copy(this.buffer,this.iWrite,t,t+n),this.iWrite+=n,n}},{key:"length",get:function(){return this.iWrite-this.iRead}},{key:"eod",get:function(){return this.iRead===this.iWrite}},{key:"full",get:function(){return this.iWrite===this.size}}]),A);function A(e){a(this,A),this.size=e,this.buffer=r.alloc(e),this.iRead=0,this.iWrite=0}function v(e){a(this,v),this._data=e}function b(e){a(this,b),this._data=e}function y(e,t){a(this,y),this._data=e,this._encoding=t}h.inherits(c,l.Duplex,{toBuffer:function(){switch(this.buffers.length){case 0:return null;case 1:return this.buffers[0].toBuffer();default:return r.concat(this.buffers.map((function(e){return e.toBuffer()})))}},_getWritableBuffer:function(){if(this.buffers.length){var e=this.buffers[this.buffers.length-1];if(!e.full)return e}return e=new g(this.bufSize),this.buffers.push(e),e},_pipe:function(e){var t=this;return o(regeneratorRuntime.mark((function n(){var r;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=function(t){return new Promise((function(n){t.write(e.toBuffer(),(function(){n()}))}))},n.next=3,Promise.all(t.pipes.map(r));case 3:case"end":return n.stop()}}),n)})))()},_writeToBuffers:function(e){for(var t=0,n=e.length;t<n;)t+=this._getWritableBuffer().write(e,t,n-t)},write:function(e,t,i){var a=this;return o(regeneratorRuntime.mark((function o(){var s;return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:t instanceof Function&&(i=t,t="utf8"),i=i||h.nop,e instanceof f?(s=new p(e),o.next=15):o.next=6;break;case 6:e instanceof r?(s=new m(e),o.next=15):o.next=10;break;case 10:"string"==typeof e||e instanceof String||e instanceof ArrayBuffer?(s=new d(e,t),o.next=15):o.next=14;break;case 14:throw new Error("Chunk must be one of type String, Buffer or StringBuf.");case 15:if(a.pipes.length)if(a.batch){for(a._writeToBuffers(s);!a.corked&&1<a.buffers.length;)a._pipe(a.buffers.shift());o.next=29}else o.next=21;else o.next=31;break;case 21:if(a.corked){o.next=27;break}return o.next=24,a._pipe(s);case 24:i(),o.next=29;break;case 27:a._writeToBuffers(s),n.nextTick(i);case 29:o.next=34;break;case 31:a.paused||a.emit("data",s.toBuffer()),a._writeToBuffers(s),a.emit("readable");case 34:return o.abrupt("return",!0);case 35:case"end":return o.stop()}}),o)})))()},cork:function(){this.corked=!0},_flush:function(){if(this.pipes.length)for(;this.buffers.length;)this._pipe(this.buffers.shift())},uncork:function(){this.corked=!1,this._flush()},end:function(e,t,n){function r(e){e?n(e):(i._flush(),i.pipes.forEach((function(e){e.end()})),i.emit("finish"))}var i=this;e?this.write(e,t,r):r()},read:function(e){var t;if(e)for(t=[];e&&this.buffers.length&&!this.buffers[0].eod;){var n=this.buffers[0],i=n.read(e);e-=i.length,t.push(i),n.eod&&n.full&&this.buffers.shift()}else t=this.buffers.map((function(e){return e.toBuffer()})).filter(Boolean),this.buffers=[];return r.concat(t)},setEncoding:function(e){this.encoding=e},pause:function(){this.paused=!0},resume:function(){this.paused=!1},isPaused:function(){return!!this.paused},pipe:function(e){this.pipes.push(e),!this.paused&&this.buffers.length&&this.end()},unpipe:function(e){this.pipes=this.pipes.filter((function(t){return t!==e}))},unshift:function(){throw new Error("Not Implemented")},wrap:function(){throw new Error("Not Implemented")}}),t.exports=c}).call(this,e("_process"),e("buffer").Buffer)},{"./string-buf":24,"./utils":26,_process:467,buffer:216,"readable-stream":491}],24:[function(e,t,n){(function(e){"use strict";!function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(r.prototype,[{key:"toBuffer",value:function(){return this._buffer||(this._buffer=e.alloc(this.length),this._buf.copy(this._buffer,0,0,this.length)),this._buffer}},{key:"reset",value:function(e){e=e||0,this._buffer=void 0,this._inPos=e}},{key:"_grow",value:function(t){for(var n=2*this._buf.length;n<t;)n*=2;var r=e.alloc(n);this._buf.copy(r,0),this._buf=r}},{key:"addText",value:function(e){this._buffer=void 0;for(var t=this._inPos+this._buf.write(e,this._inPos,this._encoding);t>=this._buf.length-4;)this._grow(this._inPos+e.length),t=this._inPos+this._buf.write(e,this._inPos,this._encoding);this._inPos=t}},{key:"addStringBuf",value:function(e){e.length&&(this._buffer=void 0,this.length+e.length>this.capacity&&this._grow(this.length+e.length),e._buf.copy(this._buf,this._inPos,0,e.length),this._inPos+=e.length)}},{key:"length",get:function(){return this._inPos}},{key:"capacity",get:function(){return this._buf.length}},{key:"buffer",get:function(){return this._buf}}]);var n=r;function r(t){if(!(this instanceof r))throw new TypeError("Cannot call a class as a function");this._buf=e.alloc(t&&t.size||16384),this._encoding=t&&t.encoding||"utf8",this._inPos=0,this._buffer=void 0}t.exports=n}).call(this,e("buffer").Buffer)},{buffer:216}],25:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=Object.prototype.toString,o=/["&<>]/,a={each:function(e,t){e&&(Array.isArray(e)?e.forEach(t):Object.keys(e).forEach((function(n){t(e[n],n)})))},some:function(e,t){return!!e&&(Array.isArray(e)?e.some(t):Object.keys(e).some((function(n){return t(e[n],n)})))},every:function(e,t){return!e||(Array.isArray(e)?e.every(t):Object.keys(e).every((function(n){return t(e[n],n)})))},map:function(e,t){return e?Array.isArray(e)?e.map(t):Object.keys(e).map((function(n){return t(e[n],n)})):[]},keyBy:function(e,t){return e.reduce((function(e,n){return e[n[t]]=n,e}),{})},isEqual:function(e,t){var n=r(e),i=r(t),o=Array.isArray(e),s=Array.isArray(t);return n===i&&("object"!==r(e)?e===t:o||s?!(!o||!s)&&e.length===t.length&&e.every((function(e,n){return n=t[n],a.isEqual(e,n)})):a.every(e,(function(e,n){return n=t[n],a.isEqual(e,n)})))},escapeHtml:function(e){var t=o.exec(e);if(!t)return e;for(var n="",r="",i=0,a=t.index;a<e.length;a++){switch(e.charAt(a)){case'"':r="&quot;";break;case"&":r="&amp;";break;case"'":r="&apos;";break;case"<":r="&lt;";break;case">":r="&gt;";break;default:continue}i!==a&&(n+=e.substring(i,a)),i=a+1,n+=r}return i!==a?n+e.substring(i,a):n},strcmp:function(e,t){return e<t?-1:t<e?1:0},isUndefined:function(e){return"[object Undefined]"===i.call(e)},isObject:function(e){return"[object Object]"===i.call(e)},deepMerge:function(){var e,t,n=arguments[0]||{},r=arguments.length;function i(r,i){e=n[i],t=Array.isArray(r),a.isObject(r)||t?(t=t?(t=!1,e&&Array.isArray(e)?e:[]):e&&a.isObject(e)?e:{},n[i]=a.deepMerge(t,r)):a.isUndefined(r)||(n[i]=r)}for(var o=0;o<r;o++)a.each(arguments[o],i);return n}};t.exports=a},{}],26:[function(e,n,r){(function(t,r){"use strict";var i=e("fs"),o=/[<>&'"\x7F\x00-\x08\x0B-\x0C\x0E-\x1F]/,a={nop:function(){},promiseImmediate:function(e){return new Promise((function(n){t.setImmediate?r((function(){n(e)})):setTimeout((function(){n(e)}),1)}))},inherits:function(e,t,n,r){e.super_=t,r||(r=n,n=null),n&&Object.keys(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}));var i={constructor:{value:e,enumerable:!1,writable:!1,configurable:!0}};r&&Object.keys(r).forEach((function(e){i[e]=Object.getOwnPropertyDescriptor(r,e)})),e.prototype=Object.create(t.prototype,i)},dateToExcel:function(e,t){return 25569+e.getTime()/864e5-(t?1462:0)},excelToDate:function(e,t){return e=Math.round(24*(e-25569+(t?1462:0))*3600*1e3),new Date(e)},parsePath:function(e){var t=e.lastIndexOf("/");return{path:e.substring(0,t),name:e.substring(t+1)}},getRelsPath:function(e){return e=a.parsePath(e),"".concat(e.path,"/_rels/").concat(e.name,".rels")},xmlEncode:function(e){var t=o.exec(e);if(!t)return e;for(var n="",r="",i=0,a=t.index;a<e.length;a++){var s=e.charCodeAt(a);switch(s){case 34:r="&quot;";break;case 38:r="&amp;";break;case 39:r="&apos;";break;case 60:r="&lt;";break;case 62:r="&gt;";break;case 127:r="";break;default:if(!(s<=31&&(s<=8||11<=s&&13!==s)))continue;r=""}i!==a&&(n+=e.substring(i,a)),i=a+1,r&&(n+=r)}return i!==a?n+e.substring(i,a):n},xmlDecode:function(e){return e.replace(/&([a-z]*);/g,(function(e){switch(e){case"&lt;":return"<";case"&gt;":return">";case"&amp;":return"&";case"&apos;":return"'";case"&quot;":return'"';default:return e}}))},validInt:function(e){return e=parseInt(e,10),Number.isNaN(e)?0:e},isDateFmt:function(e){return!!e&&null!==(e=(e=e.replace(/\[[^\]]*]/g,"")).replace(/"[^"]*"/g,"")).match(/[ymdhMsb]+/)},fs:{exists:function(e){return new Promise((function(t){i.access(e,i.constants.F_OK,(function(e){t(!e)}))}))}},toIsoDateString:function(e){return e.toIsoString().subsstr(0,10)}};n.exports=a}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("timers").setImmediate)},{fs:215,timers:521}],27:[function(e,t,n){"use strict";var r=e("./under-dash"),i=e("./utils");function o(e,t,n){e.push(" "),e.push(t),e.push('="'),e.push(i.xmlEncode(n.toString())),e.push('"')}function a(e,t){t&&r.each(t,(function(t,n){void 0!==t&&o(e,n,t)}))}function s(){if(!(this instanceof s))throw new TypeError("Cannot call a class as a function");this._xml=[],this._stack=[],this._rollbacks=[]}!function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(s.prototype,[{key:"openXml",value:function(e){var t=this._xml;t.push("<?xml"),a(t,e),t.push("?>\n")}},{key:"openNode",value:function(e,t){var n=this.tos,r=this._xml;n&&this.open&&r.push(">"),this._stack.push(e),r.push("<"),r.push(e),a(r,t),this.leaf=!0,this.open=!0}},{key:"addAttribute",value:function(e,t){if(!this.open)throw new Error("Cannot write attributes to node if it is not open");void 0!==t&&o(this._xml,e,t)}},{key:"addAttributes",value:function(e){if(!this.open)throw new Error("Cannot write attributes to node if it is not open");a(this._xml,e)}},{key:"writeText",value:function(e){var t=this._xml;this.open&&(t.push(">"),this.open=!1),this.leaf=!1,t.push(i.xmlEncode(e.toString()))}},{key:"writeXml",value:function(e){this.open&&(this._xml.push(">"),this.open=!1),this.leaf=!1,this._xml.push(e)}},{key:"closeNode",value:function(){var e=this._stack.pop(),t=this._xml;this.leaf?t.push("/>"):(t.push("</"),t.push(e),t.push(">")),this.open=!1,this.leaf=!1}},{key:"leafNode",value:function(e,t,n){this.openNode(e,t),void 0!==n&&this.writeText(n),this.closeNode()}},{key:"closeAll",value:function(){for(;this._stack.length;)this.closeNode()}},{key:"addRollback",value:function(){return this._rollbacks.push({xml:this._xml.length,stack:this._stack.length,leaf:this.leaf,open:this.open}),this.cursor}},{key:"commit",value:function(){this._rollbacks.pop()}},{key:"rollback",value:function(){var e=this._rollbacks.pop();this._xml.length>e.xml&&this._xml.splice(e.xml,this._xml.length-e.xml),this._stack.length>e.stack&&this._stack.splice(e.stack,this._stack.length-e.stack),this.leaf=e.leaf,this.open=e.open}},{key:"tos",get:function(){return this._stack.length?this._stack[this._stack.length-1]:void 0}},{key:"cursor",get:function(){return this._xml.length}},{key:"xml",get:function(){return this.closeAll(),this._xml.join("")}}]),(e=s).StdDocAttributes={version:"1.0",encoding:"UTF-8",standalone:"yes"},t.exports=e},{"./under-dash":25,"./utils":26}],28:[function(e,t,n){(function(n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=s(e);n=t?(n=s(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var u=e("events"),c=e("jszip"),l=e("./stream-buf"),h=e("./browser-buffer-encode").stringToBuffer;u=function(e){var t=f;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&o(t,e);var r,s,u=a(f);function f(e){var t;if(this instanceof f)return(t=u.call(this)).options=Object.assign({type:"nodebuffer",compression:"DEFLATE"},e),t.zip=new c,t.stream=new l,t;throw new TypeError("Cannot call a class as a function")}return t=f,e=[{key:"append",value:function(e,t){t.hasOwnProperty("base64")&&t.base64?this.zip.file(t.name,e,{base64:!0}):(n.browser&&"string"==typeof e&&(e=h(e)),this.zip.file(t.name,e))}},{key:"finalize",value:(r=regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.zip.generateAsync(this.options);case 2:t=e.sent,this.stream.end(t),this.emit("finish");case 5:case"end":return e.stop()}}),e,this)})),s=function(){var e=this,t=arguments;return new Promise((function(n,o){var a=r.apply(e,t);function s(e){i(a,n,o,s,u,"next",e)}function u(e){i(a,n,o,s,u,"throw",e)}s(void 0)}))},function(){return s.apply(this,arguments)})},{key:"read",value:function(e){return this.stream.read(e)}},{key:"setEncoding",value:function(e){return this.stream.setEncoding(e)}},{key:"pause",value:function(){return this.stream.pause()}},{key:"resume",value:function(){return this.stream.resume()}},{key:"isPaused",value:function(){return this.stream.isPaused()}},{key:"pipe",value:function(e,t){return this.stream.pipe(e,t)}},{key:"unpipe",value:function(e){return this.stream.unpipe(e)}},{key:"unshift",value:function(e){return this.stream.unshift(e)}},{key:"wrap",value:function(e){return this.stream.wrap(e)}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,e),f}(u.EventEmitter);t.exports={ZipWriter:u}}).call(this,e("_process"))},{"./browser-buffer-encode":17,"./stream-buf":23,_process:467,events:367,jszip:399}],29:[function(e,t,n){"use strict";t.exports={0:{f:"General"},1:{f:"0"},2:{f:"0.00"},3:{f:"#,##0"},4:{f:"#,##0.00"},9:{f:"0%"},10:{f:"0.00%"},11:{f:"0.00E+00"},12:{f:"# ?/?"},13:{f:"# ??/??"},14:{f:"mm-dd-yy"},15:{f:"d-mmm-yy"},16:{f:"d-mmm"},17:{f:"mmm-yy"},18:{f:"h:mm AM/PM"},19:{f:"h:mm:ss AM/PM"},20:{f:"h:mm"},21:{f:"h:mm:ss"},22:{f:'m/d/yy "h":mm'},27:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},28:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},29:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},30:{"zh-tw":"m/d/yy ","zh-cn":"m-d-yy","ja-jp":"m/d/yy","ko-kr":"mm-dd-yy"},31:{"zh-tw":'yyyy"年"m"月"d"日"',"zh-cn":'yyyy"年"m"月"d"日"',"ja-jp":'yyyy"年"m"月"d"日"',"ko-kr":'yyyy"년" mm"월" dd"일"'},32:{"zh-tw":'hh"時"mm"分"',"zh-cn":'h"时"mm"分"',"ja-jp":'h"時"mm"分"',"ko-kr":'h"시" mm"분"'},33:{"zh-tw":'hh"時"mm"分"ss"秒"',"zh-cn":'h"时"mm"分"ss"秒"',"ja-jp":'h"時"mm"分"ss"秒"',"ko-kr":'h"시" mm"분" ss"초"'},34:{"zh-tw":'上午/下午 hh"時"mm"分"',"zh-cn":'上午/下午 h"时"mm"分"',"ja-jp":'yyyy"年"m"月"',"ko-kr":"yyyy-mm-dd"},35:{"zh-tw":'上午/下午 hh"時"mm"分"ss"秒"',"zh-cn":'上午/下午 h"时"mm"分"ss"秒"',"ja-jp":'m"月"d"日"',"ko-kr":"yyyy-mm-dd"},36:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},37:{f:"#,##0 ;(#,##0)"},38:{f:"#,##0 ;[Red](#,##0)"},39:{f:"#,##0.00 ;(#,##0.00)"},40:{f:"#,##0.00 ;[Red](#,##0.00)"},45:{f:"mm:ss"},46:{f:"[h]:mm:ss"},47:{f:"mmss.0"},48:{f:"##0.0E+0"},49:{f:"@"},50:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},51:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},52:{"zh-tw":'上午/下午 hh"時"mm"分"',"zh-cn":'yyyy"年"m"月"',"ja-jp":'yyyy"年"m"月"',"ko-kr":"yyyy-mm-dd"},53:{"zh-tw":'上午/下午 hh"時"mm"分"ss"秒"',"zh-cn":'m"月"d"日"',"ja-jp":'m"月"d"日"',"ko-kr":"yyyy-mm-dd"},54:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},55:{"zh-tw":'上午/下午 hh"時"mm"分"',"zh-cn":'上午/下午 h"时"mm"分"',"ja-jp":'yyyy"年"m"月"',"ko-kr":"yyyy-mm-dd"},56:{"zh-tw":'上午/下午 hh"時"mm"分"ss"秒"',"zh-cn":'上午/下午 h"时"mm"分"ss"秒"',"ja-jp":'m"月"d"日"',"ko-kr":"yyyy-mm-dd"},57:{"zh-tw":"[$-404]e/m/d","zh-cn":'yyyy"年"m"月"',"ja-jp":"[$-411]ge.m.d","ko-kr":'yyyy"年" mm"月" dd"日"'},58:{"zh-tw":'[$-404]e"年"m"月"d"日"',"zh-cn":'m"月"d"日"',"ja-jp":'[$-411]ggge"年"m"月"d"日"',"ko-kr":"mm-dd"},59:{"th-th":"t0"},60:{"th-th":"t0.00"},61:{"th-th":"t#,##0"},62:{"th-th":"t#,##0.00"},67:{"th-th":"t0%"},68:{"th-th":"t0.00%"},69:{"th-th":"t# ?/?"},70:{"th-th":"t# ??/??"},81:{"th-th":"d/m/bb"}}},{}],30:[function(e,t,n){"use strict";t.exports={OfficeDocument:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument",Worksheet:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet",CalcChain:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/calcChain",SharedStrings:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings",Styles:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles",Theme:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme",Hyperlink:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink",Image:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",CoreProperties:"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties",ExtenderProperties:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties",Comments:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments",VmlDrawing:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/vmlDrawing",Table:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/table"}},{}],31:[function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function i(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function o(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function s(e){i(a,r,o,s,u,"next",e)}function u(e){i(a,r,o,s,u,"throw",e)}s(void 0)}))}}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var s,u,c,l=e("../../utils/parse-sax"),h=e("../../utils/xml-stream"),f=(e=d,f=[{key:"prepare",value:function(){}},{key:"render",value:function(){}},{key:"parseOpen",value:function(e){}},{key:"parseText",value:function(e){}},{key:"parseClose",value:function(e){}},{key:"reconcile",value:function(e,t){}},{key:"reset",value:function(){this.model=null,this.map&&Object.values(this.map).forEach((function(e){e instanceof d?e.reset():e.xform&&e.xform.reset()}))}},{key:"mergeModel",value:function(e){this.model=Object.assign(this.model||{},e)}},{key:"parse",value:(u=o(regeneratorRuntime.mark((function e(t){var n,i,o,a,s,u,c,l,h;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=!(n=!0),e.prev=2,a=function(e){var t;if("undefined"!=typeof Symbol){if(Symbol.asyncIterator&&null!=(t=e[Symbol.asyncIterator]))return t.call(e);if(Symbol.iterator&&null!=(t=e[Symbol.iterator]))return t.call(e)}throw new TypeError("Object is not async iterable")}(t);case 4:return e.next=6,a.next();case 6:return s=e.sent,n=s.done,e.next=10,s.value;case 10:if(s=e.sent,n){e.next=42;break}u=function(e,t){var n,i;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e){var t;if(e)return"string"==typeof e?r(e,void 0):"Map"===(t="Object"===(t=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:t)||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?r(e,void 0):void 0}(e))||t&&e&&"number"==typeof e.length)return n&&(e=n),i=0,{s:t=function(){},n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}(s),e.prev=14,u.s();case 16:(c=u.n()).done?e.next=31:(c=c.value,l=c.eventType,h=c.value,"opentag"!==l?e.next=22:(this.parseOpen(h),e.next=29));break;case 22:"text"!==l?e.next=26:(this.parseText(h),e.next=29);break;case 26:if("closetag"!==l){e.next=29;break}if(this.parseClose(h.name)){e.next=29;break}return e.abrupt("return",this.model);case 29:e.next=16;break;case 31:e.next=36;break;case 33:e.prev=33,e.t0=e.catch(14),u.e(e.t0);case 36:return e.prev=36,u.f(),e.finish(36);case 39:n=!0,e.next=4;break;case 42:e.next=48;break;case 44:e.prev=44,e.t1=e.catch(2),i=!0,o=e.t1;case 48:if(e.prev=48,e.prev=49,n||null==a.return){e.next=53;break}return e.next=53,a.return();case 53:if(e.prev=53,i)throw o;e.next=56;break;case 56:return e.finish(53);case 57:return e.finish(48);case 58:return e.abrupt("return",this.model);case 59:case"end":return e.stop()}}),e,this,[[2,44,48,58],[14,33,36,39],[49,,53,57]])}))),function(e){return u.apply(this,arguments)})},{key:"parseStream",value:(s=o(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.parse(l(t)));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return s.apply(this,arguments)})},{key:"toXml",value:function(e){var t=new h;return this.render(t,e),t.xml}},{key:"xml",get:function(){return this.toXml(this.model)}}],c=[{key:"toAttribute",value:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]&&arguments[2];if(void 0===e){if(n)return t}else if(n||e!==t)return e.toString()}},{key:"toStringAttribute",value:function(e,t){return d.toAttribute(e,t,2<arguments.length&&void 0!==arguments[2]&&arguments[2])}},{key:"toStringValue",value:function(e,t){return void 0===e?t:e}},{key:"toBoolAttribute",value:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]&&arguments[2];if(void 0===e){if(n)return t}else if(n||e!==t)return e?"1":"0"}},{key:"toBoolValue",value:function(e,t){return void 0===e?t:"1"===e}},{key:"toIntAttribute",value:function(e,t){return d.toAttribute(e,t,2<arguments.length&&void 0!==arguments[2]&&arguments[2])}},{key:"toIntValue",value:function(e,t){return void 0===e?t:parseInt(e,10)}},{key:"toFloatAttribute",value:function(e,t){return d.toAttribute(e,t,2<arguments.length&&void 0!==arguments[2]&&arguments[2])}},{key:"toFloatValue",value:function(e,t){return void 0===e?t:parseFloat(e)}}],a(e.prototype,f),a(e,c),d);function d(){if(!(this instanceof d))throw new TypeError("Cannot call a class as a function")}t.exports=f},{"../../utils/parse-sax":21,"../../utils/xml-stream":27}],32:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a=e("../base-xform"),s=e("../../../utils/col-cache");e=function(){var e=s,t=a;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(s);function s(){var e=this,t=s;if(e instanceof t)return n.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(s.prototype,[{key:"render",value:function(e,t){e.openNode("definedName",{name:t.name,localSheetId:t.localSheetId}),e.writeText(t.ranges.join(",")),e.closeNode()}},{key:"parseOpen",value:function(e){return"definedName"===e.name&&(this._parsedName=e.attributes.name,this._parsedLocalSheetId=e.attributes.localSheetId,this._parsedText=[],!0)}},{key:"parseText",value:function(e){this._parsedText.push(e)}},{key:"parseClose",value:function(){return this.model={name:this._parsedName,ranges:(e=this._parsedText.join(""),n=!(t=[]),r="",e.split(",").forEach((function(e){var i;e&&((i=(e.match(/'/g)||[]).length)?(i=i%2==0,!n&&i&&u(e)?t.push(e):n&&!i?(n=!1,u(r+e)&&t.push(r+e),r=""):(n=!0,r+="".concat(e,","))):n?r+="".concat(e,","):u(e)&&t.push(e))})),t)},void 0!==this._parsedLocalSheetId&&(this.model.localSheetId=parseInt(this._parsedLocalSheetId,10)),!1;var e,t,n,r}}]),s}();function u(e){try{return s.decodeEx(e),1}catch(e){}}t.exports=e},{"../../../utils/col-cache":19,"../base-xform":31}],33:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a=e("../../../utils/utils");e=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(s);function s(){var e=this,t=s;if(e instanceof t)return n.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(s.prototype,[{key:"render",value:function(e,t){e.leafNode("sheet",{sheetId:t.id,name:t.name,state:t.state,"r:id":t.rId})}},{key:"parseOpen",value:function(e){return"sheet"===e.name&&(this.model={name:a.xmlDecode(e.attributes.name),id:parseInt(e.attributes.sheetId,10),state:e.attributes.state,rId:e.attributes["r:id"]},!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}]),s}(e("../base-xform"));t.exports=e},{"../../../utils/utils":26,"../base-xform":31}],34:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}e=function(e){var t=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(a);function a(){var e=this,t=a;if(e instanceof t)return n.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(a.prototype,[{key:"render",value:function(e,t){e.leafNode("calcPr",{calcId:171027,fullCalcOnLoad:t.fullCalcOnLoad?1:void 0})}},{key:"parseOpen",value:function(e){return"calcPr"===e.name&&(this.model={},!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}]),a}(e("../base-xform")),t.exports=e},{"../base-xform":31}],35:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}e=function(e){var t=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(a);function a(){var e=this,t=a;if(e instanceof t)return n.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(a.prototype,[{key:"render",value:function(e,t){e.leafNode("workbookPr",{date1904:t.date1904?1:void 0,defaultThemeVersion:164011,filterPrivacy:1})}},{key:"parseOpen",value:function(e){return"workbookPr"===e.name&&(this.model={date1904:"1"===e.attributes.date1904},!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}]),a}(e("../base-xform")),t.exports=e},{"../base-xform":31}],36:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}e=function(e){var t=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(a);function a(){var e=this,t=a;if(e instanceof t)return n.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(a.prototype,[{key:"render",value:function(e,t){var n={xWindow:t.x||0,yWindow:t.y||0,windowWidth:t.width||12e3,windowHeight:t.height||24e3,firstSheet:t.firstSheet,activeTab:t.activeTab};t.visibility&&"visible"!==t.visibility&&(n.visibility=t.visibility),e.leafNode("workbookView",n)}},{key:"parseOpen",value:function(e){var t,n,r,i;return"workbookView"===e.name&&(t=this.model={},(n=function(e,n,r){void 0!==(n=void 0!==n?t[e]=parseInt(n,10):r)&&(t[e]=n)})("x",e.attributes.xWindow,0),n("y",e.attributes.yWindow,0),n("width",e.attributes.windowWidth,25e3),n("height",e.attributes.windowHeight,1e4),r="visibility",void 0!==(i=void 0!==(i=e.attributes.visibility)?t[r]=i:"visible")&&(t[r]=i),n("activeTab",e.attributes.activeTab,void 0),n("firstSheet",e.attributes.firstSheet,void 0),!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}]),a}(e("../base-xform")),t.exports=e},{"../base-xform":31}],37:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a=e("../../../utils/under-dash"),s=e("../../../utils/col-cache"),u=e("../../../utils/xml-stream"),c=e("../base-xform"),l=e("../static-xform"),h=e("../list-xform"),f=e("./defined-name-xform"),d=e("./sheet-xform"),p=e("./workbook-view-xform"),m=e("./workbook-properties-xform"),g=e("./workbook-calc-properties-xform");(e=function(){var e=l,t=c;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(l);function l(){var e;if(this instanceof l)return(e=n.call(this)).map={fileVersion:l.STATIC_XFORMS.fileVersion,workbookPr:new m,bookViews:new h({tag:"bookViews",count:!1,childXform:new p}),sheets:new h({tag:"sheets",count:!1,childXform:new d}),definedNames:new h({tag:"definedNames",count:!1,childXform:new f}),calcPr:new g},e;throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(l.prototype,[{key:"prepare",value:function(e){e.sheets=e.worksheets;var t=[],n=0;e.sheets.forEach((function(e){var r,i;e.pageSetup&&e.pageSetup.printArea&&e.pageSetup.printArea.split("&&").forEach((function(r){r=r.split(":"),r={name:"_xlnm.Print_Area",ranges:["'".concat(e.name,"'!$").concat(r[0],":$").concat(r[1])],localSheetId:n},t.push(r)})),e.pageSetup&&(e.pageSetup.printTitlesRow||e.pageSetup.printTitlesColumn)&&(r=[],e.pageSetup.printTitlesColumn&&(i=e.pageSetup.printTitlesColumn.split(":"),r.push("'".concat(e.name,"'!$").concat(i[0],":$").concat(i[1]))),e.pageSetup.printTitlesRow&&(i=e.pageSetup.printTitlesRow.split(":"),r.push("'".concat(e.name,"'!$").concat(i[0],":$").concat(i[1]))),i={name:"_xlnm.Print_Titles",ranges:r,localSheetId:n},t.push(i)),n++})),t.length&&(e.definedNames=e.definedNames.concat(t)),(e.media||[]).forEach((function(e,t){e.name=e.type+(t+1)}))}},{key:"render",value:function(e,t){e.openXml(u.StdDocAttributes),e.openNode("workbook",l.WORKBOOK_ATTRIBUTES),this.map.fileVersion.render(e),this.map.workbookPr.render(e,t.properties),this.map.bookViews.render(e,t.views),this.map.sheets.render(e,t.sheets),this.map.definedNames.render(e,t.definedNames),this.map.calcPr.render(e,t.calcProperties),e.closeNode()}},{key:"parseOpen",value:function(e){return this.parser?this.parser.parseOpen(e):"workbook"!==e.name&&(this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e)),!0}},{key:"parseText",value:function(e){this.parser&&this.parser.parseText(e)}},{key:"parseClose",value:function(e){return this.parser?(this.parser.parseClose(e)||(this.parser=void 0),!0):"workbook"!==e||(this.model={sheets:this.map.sheets.model,properties:this.map.workbookPr.model||{},views:this.map.bookViews.model,calcProperties:{}},this.map.definedNames.model&&(this.model.definedNames=this.map.definedNames.model),!1)}},{key:"reconcile",value:function(e){var t,n=(e.workbookRels||[]).reduce((function(e,t){return e[t.Id]=t,e}),{}),r=[],i=0,o=((e.sheets||[]).forEach((function(o){var a=n[o.rId];a&&(t=e.worksheetHash["xl/".concat(a.Target.replace(/^(\s|\/xl\/)+/,""))])&&(t.name=o.name,t.id=o.id,t.state=o.state,r[i++]=t)})),[]);a.each(e.definedNames,(function(e){var n,i,a;"_xlnm.Print_Area"===e.name?(t=r[e.localSheetId])&&(t.pageSetup||(t.pageSetup={}),n=s.decodeEx(e.ranges[0]),t.pageSetup.printArea=t.pageSetup.printArea?"".concat(t.pageSetup.printArea,"&&").concat(n.dimensions):n.dimensions):"_xlnm.Print_Titles"===e.name?(t=r[e.localSheetId])&&(t.pageSetup||(t.pageSetup={}),n=/\$/g,(i=(a=e.ranges.join(",")).match(/\$\d+:\$\d+/))&&i.length&&(i=i[0],t.pageSetup.printTitlesRow=i.replace(n,"")),(i=a.match(/\$[A-Z]+:\$[A-Z]+/))&&i.length&&(a=i[0],t.pageSetup.printTitlesColumn=a.replace(n,""))):o.push(e)})),e.definedNames=o,e.media.forEach((function(e,t){e.index=t}))}}]),l}()).WORKBOOK_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"x15","xmlns:x15":"http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"},e.STATIC_XFORMS={fileVersion:new l({tag:"fileVersion",$:{appName:"xl",lastEdited:5,lowestEdited:5,rupBuild:9303}})},t.exports=e},{"../../../utils/col-cache":19,"../../../utils/under-dash":25,"../../../utils/xml-stream":27,"../base-xform":31,"../list-xform":70,"../static-xform":119,"./defined-name-xform":32,"./sheet-xform":33,"./workbook-calc-properties-xform":34,"./workbook-properties-xform":35,"./workbook-view-xform":36}],38:[function(e,t,n){"use strict";function r(e,t){var n,r=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)),r}var i=e("../strings/rich-text-xform"),o=e("../../../utils/utils");e=e("../base-xform"),t=t.exports=function(e){this.model=e};o.inherits(t,e,{get tag(){return"r"},get richTextXform(){return this._richTextXform||(this._richTextXform=new i),this._richTextXform},render:function(e,t){var n=this;t=t||this.model,e.openNode("comment",{ref:t.ref,authorId:0}),e.openNode("text"),t&&t.note&&t.note.texts&&t.note.texts.forEach((function(t){n.richTextXform.render(e,t)})),e.closeNode(),e.closeNode()},parseOpen:function(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case"comment":return this.model=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){var r,i;r=e,i=n[t=t],t in r?Object.defineProperty(r,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[t]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({type:"note",note:{texts:[]}},e.attributes),!0;case"r":return this.parser=this.richTextXform,this.parser.parseOpen(e),!0;default:return!1}},parseText:function(e){this.parser&&this.parser.parseText(e)},parseClose:function(e){switch(e){case"comment":return!1;case"r":return this.model.note.texts.push(this.parser.model),!(this.parser=void 0);default:return this.parser&&this.parser.parseClose(e),!0}}})},{"../../../utils/utils":26,"../base-xform":31,"../strings/rich-text-xform":121}],39:[function(e,t,n){"use strict";var r=e("../../../utils/xml-stream"),i=e("../../../utils/utils"),o=e("../base-xform"),a=e("./comment-xform"),s=t.exports=function(){this.map={comment:new a}};i.inherits(s,o,{COMMENTS_ATTRIBUTES:{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main"}},{render:function(e,t){var n=this;t=t||this.model,e.openXml(r.StdDocAttributes),e.openNode("comments",s.COMMENTS_ATTRIBUTES),e.openNode("authors"),e.leafNode("author",null,"Author"),e.closeNode(),e.openNode("commentList"),t.comments.forEach((function(t){n.map.comment.render(e,t)})),e.closeNode(),e.closeNode()},parseOpen:function(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case"commentList":return this.model={comments:[]},!0;case"comment":return this.parser=this.map.comment,this.parser.parseOpen(e),!0;default:return!1}},parseText:function(e){this.parser&&this.parser.parseText(e)},parseClose:function(e){switch(e){case"commentList":return!1;case"comment":return this.model.comments.push(this.parser.model),!(this.parser=void 0);default:return this.parser&&this.parser.parseClose(e),!0}}})},{"../../../utils/utils":26,"../../../utils/xml-stream":27,"../base-xform":31,"./comment-xform":38}],40:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}e=function(e){var t=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(a);function a(e){var t;if(this instanceof a)return(t=n.call(this))._model=e,t;throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(a.prototype,[{key:"render",value:function(e,t,n){(t===n[2]||"x:SizeWithCells"===this.tag&&t===n[1])&&e.leafNode(this.tag)}},{key:"parseOpen",value:function(e){return e.name===this.tag&&(this.model={},this.model[this.tag]=!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return this._model&&this._model.tag}}]),a}(e("../../base-xform")),t.exports=e},{"../../base-xform":31}],41:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}e=function(e){var t=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(a);function a(e){var t;if(this instanceof a)return(t=n.call(this))._model=e,t;throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(a.prototype,[{key:"render",value:function(e,t){e.leafNode(this.tag,null,t)}},{key:"parseOpen",value:function(e){return e.name===this.tag&&!(this.text="")}},{key:"parseText",value:function(e){this.text=e}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return this._model&&this._model.tag}}]),a}(e("../../base-xform")),t.exports=e},{"../../base-xform":31}],42:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}e=function(e){var t=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(a);function a(){var e=this,t=a;if(e instanceof t)return n.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(a.prototype,[{key:"getAnchorRect",value:function(e){var t=Math.floor(e.left),n=Math.floor(68*(e.left-t)),r=Math.floor(e.top),i=Math.floor(18*(e.top-r)),o=Math.floor(e.right),a=Math.floor(68*(e.right-o)),s=Math.floor(e.bottom);return[t,n,r,i,o,a,s,Math.floor(18*(e.bottom-s))]}},{key:"getDefaultRect",value:function(e){var t=e.col;return[t,6,e=Math.max(e.row-2,0),14,t+2,2,e+4,16]}},{key:"render",value:function(e,t){t=t.anchor?this.getAnchorRect(t.anchor):this.getDefaultRect(t.refAddress),e.leafNode("x:Anchor",null,t.join(", "))}},{key:"parseOpen",value:function(e){return e.name===this.tag&&!(this.text="")}},{key:"parseText",value:function(e){this.text=e}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"x:Anchor"}}]),a}(e("../base-xform")),t.exports=e},{"../base-xform":31}],43:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a=e("../base-xform"),s=e("./vml-anchor-xform"),u=e("./style/vml-protection-xform"),c=e("./style/vml-position-xform"),l=["twoCells","oneCells","absolute"];e=function(){var e=h,t=a;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(h);function h(){var e;if(this instanceof h)return(e=n.call(this)).map={"x:Anchor":new s,"x:Locked":new u({tag:"x:Locked"}),"x:LockText":new u({tag:"x:LockText"}),"x:SizeWithCells":new c({tag:"x:SizeWithCells"}),"x:MoveWithCells":new c({tag:"x:MoveWithCells"})},e;throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(h.prototype,[{key:"render",value:function(e,t){var n=(r=t.note).protection,r=r.editAs;e.openNode(this.tag,{ObjectType:"Note"}),this.map["x:MoveWithCells"].render(e,r,l),this.map["x:SizeWithCells"].render(e,r,l),this.map["x:Anchor"].render(e,t),this.map["x:Locked"].render(e,n.locked),e.leafNode("x:AutoFill",null,"False"),this.map["x:LockText"].render(e,n.lockText),e.leafNode("x:Row",null,t.refAddress.row-1),e.leafNode("x:Column",null,t.refAddress.col-1),e.closeNode()}},{key:"parseOpen",value:function(e){return e.name===this.tag?(this.reset(),this.model={anchor:[],protection:{},editAs:""}):(this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e)),!0}},{key:"parseText",value:function(e){this.parser&&this.parser.parseText(e)}},{key:"parseClose",value:function(e){return this.parser?(this.parser.parseClose(e)||(this.parser=void 0),!0):e!==this.tag||(this.normalizeModel(),!1)}},{key:"normalizeModel",value:function(){var e=Object.assign({},this.map["x:MoveWithCells"].model,this.map["x:SizeWithCells"].model);e=Object.keys(e).length;this.model.editAs=l[e],this.model.anchor=this.map["x:Anchor"].text,this.model.protection.locked=this.map["x:Locked"].text,this.model.protection.lockText=this.map["x:LockText"].text}},{key:"tag",get:function(){return"x:ClientData"}}]),h}();t.exports=e},{"../base-xform":31,"./style/vml-position-xform":40,"./style/vml-protection-xform":41,"./vml-anchor-xform":42}],44:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=a(e);n=t?(n=a(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}function a(e){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var s=e("../../../utils/xml-stream"),u=e("../base-xform"),c=e("./vml-shape-xform");(e=function(){var e=r,t=u;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t);var n=o(r);function r(){var e;if(this instanceof r)return(e=n.call(this)).map={"v:shape":new c},e;throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(r.prototype,[{key:"render",value:function(e,t){var n=this;e.openXml(s.StdDocAttributes),e.openNode(this.tag,r.DRAWING_ATTRIBUTES),e.openNode("o:shapelayout",{"v:ext":"edit"}),e.leafNode("o:idmap",{"v:ext":"edit",data:1}),e.closeNode(),e.openNode("v:shapetype",{id:"_x0000_t202",coordsize:"21600,21600","o:spt":202,path:"m,l,21600r21600,l21600,xe"}),e.leafNode("v:stroke",{joinstyle:"miter"}),e.leafNode("v:path",{gradientshapeok:"t","o:connecttype":"rect"}),e.closeNode(),t.comments.forEach((function(t,r){n.map["v:shape"].render(e,t,r)})),e.closeNode()}},{key:"parseOpen",value:function(e){return this.parser?this.parser.parseOpen(e):e.name===this.tag?(this.reset(),this.model={comments:[]}):(this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e)),!0}},{key:"parseText",value:function(e){this.parser&&this.parser.parseText(e)}},{key:"parseClose",value:function(e){return this.parser?(this.parser.parseClose(e)||(this.model.comments.push(this.parser.model),this.parser=void 0),!0):e!==this.tag}},{key:"reconcile",value:function(e,t){var n=this;e.anchors.forEach((function(e){(e.br?n.map["xdr:twoCellAnchor"]:n.map["xdr:oneCellAnchor"]).reconcile(e,t)}))}},{key:"tag",get:function(){return"xml"}}]),r}()).DRAWING_ATTRIBUTES={"xmlns:v":"urn:schemas-microsoft-com:vml","xmlns:o":"urn:schemas-microsoft-com:office:office","xmlns:x":"urn:schemas-microsoft-com:office:excel"},t.exports=e},{"../../../utils/xml-stream":27,"../base-xform":31,"./vml-shape-xform":45}],45:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a=e("../base-xform"),s=e("./vml-textbox-xform"),u=e("./vml-client-data-xform");(e=function(){var e=c,t=a;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(c);function c(){var e;if(this instanceof c)return(e=n.call(this)).map={"v:textbox":new s,"x:ClientData":new u},e;throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(c.prototype,[{key:"render",value:function(e,t,n){e.openNode("v:shape",c.V_SHAPE_ATTRIBUTES(t,n)),e.leafNode("v:fill",{color2:"infoBackground [80]"}),e.leafNode("v:shadow",{color:"none [81]",obscured:"t"}),e.leafNode("v:path",{"o:connecttype":"none"}),this.map["v:textbox"].render(e,t),this.map["x:ClientData"].render(e,t),e.closeNode()}},{key:"parseOpen",value:function(e){return this.parser?this.parser.parseOpen(e):e.name===this.tag?(this.reset(),this.model={margins:{insetmode:e.attributes["o:insetmode"]},anchor:"",editAs:"",protection:{}}):(this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e)),!0}},{key:"parseText",value:function(e){this.parser&&this.parser.parseText(e)}},{key:"parseClose",value:function(e){return this.parser?(this.parser.parseClose(e)||(this.parser=void 0),!0):e!==this.tag||(this.model.margins.inset=this.map["v:textbox"].model&&this.map["v:textbox"].model.inset,this.model.protection=this.map["x:ClientData"].model&&this.map["x:ClientData"].model.protection,this.model.anchor=this.map["x:ClientData"].model&&this.map["x:ClientData"].model.anchor,this.model.editAs=this.map["x:ClientData"].model&&this.map["x:ClientData"].model.editAs,!1)}},{key:"tag",get:function(){return"v:shape"}}]),c}()).V_SHAPE_ATTRIBUTES=function(e,t){return{id:"_x0000_s".concat(1025+t),type:"#_x0000_t202",style:"position:absolute; margin-left:105.3pt;margin-top:10.5pt;width:97.8pt;height:59.1pt;z-index:1;visibility:hidden",fillcolor:"infoBackground [80]",strokecolor:"none [81]","o:insetmode":e.note.margins&&e.note.margins.insetmode}},t.exports=e},{"../base-xform":31,"./vml-client-data-xform":43,"./vml-textbox-xform":46}],46:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}e=function(e){var t=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(a);function a(){var e=this,t=a;if(e instanceof t)return n.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(a.prototype,[{key:"conversionUnit",value:function(e,t,n){return"".concat(parseFloat(e)*t.toFixed(2)).concat(n)}},{key:"reverseConversionUnit",value:function(e){var t=this;return(e||"").split(",").map((function(e){return Number(parseFloat(t.conversionUnit(parseFloat(e),.1,"")).toFixed(2))}))}},{key:"render",value:function(e,t){var n=this,r={style:"mso-direction-alt:auto"};t&&t.note&&(t=(t.note&&t.note.margins).inset,(t=Array.isArray(t)?t.map((function(e){return n.conversionUnit(e,10,"mm")})).join(","):t)&&(r.inset=t)),e.openNode("v:textbox",r),e.leafNode("div",{style:"text-align:left"}),e.closeNode()}},{key:"parseOpen",value:function(e){return e.name===this.tag&&(this.model={inset:this.reverseConversionUnit(e.attributes.inset)}),!0}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(e){return e!==this.tag}},{key:"tag",get:function(){return"v:textbox"}}]),a}(e("../base-xform")),t.exports=e},{"../base-xform":31}],47:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}e=function(e){var t=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(a);function a(){var e=this,t=a;if(e instanceof t)return n.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(a.prototype,[{key:"createNewModel",value:function(e){return{}}},{key:"parseOpen",value:function(e){return this.parser=this.parser||this.map[e.name],this.parser?(this.parser.parseOpen(e),!0):e.name===this.tag&&(this.model=this.createNewModel(e),!0)}},{key:"parseText",value:function(e){this.parser&&this.parser.parseText(e)}},{key:"onParserClose",value:function(e,t){this.model[e]=t.model}},{key:"parseClose",value:function(e){return this.parser?(this.parser.parseClose(e)||(this.onParserClose(e,this.parser),this.parser=void 0),!0):e!==this.tag}}]),a}(e("./base-xform")),t.exports=e},{"./base-xform":31}],48:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}e=function(e){var t=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(a);function a(){var e=this,t=a;if(e instanceof t)return n.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(a.prototype,[{key:"render",value:function(e,t){e.openNode("HeadingPairs"),e.openNode("vt:vector",{size:2,baseType:"variant"}),e.openNode("vt:variant"),e.leafNode("vt:lpstr",void 0,"Worksheets"),e.closeNode(),e.openNode("vt:variant"),e.leafNode("vt:i4",void 0,t.length),e.closeNode(),e.closeNode(),e.closeNode()}},{key:"parseOpen",value:function(e){return"HeadingPairs"===e.name}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(e){return"HeadingPairs"!==e}}]),a}(e("../base-xform")),t.exports=e},{"../base-xform":31}],49:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}e=function(e){var t=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(a);function a(){var e=this,t=a;if(e instanceof t)return n.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(a.prototype,[{key:"render",value:function(e,t){e.openNode("TitlesOfParts"),e.openNode("vt:vector",{size:t.length,baseType:"lpstr"}),t.forEach((function(t){e.leafNode("vt:lpstr",void 0,t.name)})),e.closeNode(),e.closeNode()}},{key:"parseOpen",value:function(e){return"TitlesOfParts"===e.name}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(e){return"TitlesOfParts"!==e}}]),a}(e("../base-xform")),t.exports=e},{"../base-xform":31}],50:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a=e("../../../utils/xml-stream"),s=e("../base-xform"),u=e("../simple/string-xform"),c=e("./app-heading-pairs-xform"),l=e("./app-titles-of-parts-xform");(e=function(){var e=h,t=s;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(h);function h(){var e;if(this instanceof h)return(e=n.call(this)).map={Company:new u({tag:"Company"}),Manager:new u({tag:"Manager"}),HeadingPairs:new c,TitleOfParts:new l},e;throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(h.prototype,[{key:"render",value:function(e,t){e.openXml(a.StdDocAttributes),e.openNode("Properties",h.PROPERTY_ATTRIBUTES),e.leafNode("Application",void 0,"Microsoft Excel"),e.leafNode("DocSecurity",void 0,"0"),e.leafNode("ScaleCrop",void 0,"false"),this.map.HeadingPairs.render(e,t.worksheets),this.map.TitleOfParts.render(e,t.worksheets),this.map.Company.render(e,t.company||""),this.map.Manager.render(e,t.manager),e.leafNode("LinksUpToDate",void 0,"false"),e.leafNode("SharedDoc",void 0,"false"),e.leafNode("HyperlinksChanged",void 0,"false"),e.leafNode("AppVersion",void 0,"16.0300"),e.closeNode()}},{key:"parseOpen",value:function(e){return this.parser?(this.parser.parseOpen(e),!0):"Properties"===e.name||(this.parser=this.map[e.name],!!this.parser&&(this.parser.parseOpen(e),!0))}},{key:"parseText",value:function(e){this.parser&&this.parser.parseText(e)}},{key:"parseClose",value:function(e){return this.parser?(this.parser.parseClose(e)||(this.parser=void 0),!0):"Properties"!==e||!(this.model={worksheets:this.map.TitleOfParts.model,company:this.map.Company.model,manager:this.map.Manager.model})}}]),h}()).DateFormat=function(e){return e.toISOString().replace(/[.]\d{3,6}/,"")},e.DateAttrs={"xsi:type":"dcterms:W3CDTF"},e.PROPERTY_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties","xmlns:vt":"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"},t.exports=e},{"../../../utils/xml-stream":27,"../base-xform":31,"../simple/string-xform":118,"./app-heading-pairs-xform":48,"./app-titles-of-parts-xform":49}],51:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a=e("../../../utils/xml-stream");(e=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(s);function s(){var e=this,t=s;if(e instanceof t)return n.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(s.prototype,[{key:"render",value:function(e,t){e.openXml(a.StdDocAttributes),e.openNode("Types",s.PROPERTY_ATTRIBUTES);var n={};(t.media||[]).forEach((function(t){"image"===t.type&&(t=t.extension,n[t]||(n[t]=!0,e.leafNode("Default",{Extension:t,ContentType:"image/".concat(t)})))})),e.leafNode("Default",{Extension:"rels",ContentType:"application/vnd.openxmlformats-package.relationships+xml"}),e.leafNode("Default",{Extension:"xml",ContentType:"application/xml"}),e.leafNode("Override",{PartName:"/xl/workbook.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"}),t.worksheets.forEach((function(t){t="/xl/worksheets/sheet".concat(t.id,".xml"),e.leafNode("Override",{PartName:t,ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"})})),e.leafNode("Override",{PartName:"/xl/theme/theme1.xml",ContentType:"application/vnd.openxmlformats-officedocument.theme+xml"}),e.leafNode("Override",{PartName:"/xl/styles.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"}),t.sharedStrings&&t.sharedStrings.count&&e.leafNode("Override",{PartName:"/xl/sharedStrings.xml",ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"}),t.tables&&t.tables.forEach((function(t){e.leafNode("Override",{PartName:"/xl/tables/".concat(t.target),ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml"})})),t.drawings&&t.drawings.forEach((function(t){e.leafNode("Override",{PartName:"/xl/drawings/".concat(t.name,".xml"),ContentType:"application/vnd.openxmlformats-officedocument.drawing+xml"})})),t.commentRefs&&(e.leafNode("Default",{Extension:"vml",ContentType:"application/vnd.openxmlformats-officedocument.vmlDrawing"}),t.commentRefs.forEach((function(t){t=t.commentName,e.leafNode("Override",{PartName:"/xl/".concat(t,".xml"),ContentType:"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml"})}))),e.leafNode("Override",{PartName:"/docProps/core.xml",ContentType:"application/vnd.openxmlformats-package.core-properties+xml"}),e.leafNode("Override",{PartName:"/docProps/app.xml",ContentType:"application/vnd.openxmlformats-officedocument.extended-properties+xml"}),e.closeNode()}},{key:"parseOpen",value:function(){return!1}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}]),s}(e("../base-xform"))).PROPERTY_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/package/2006/content-types"},t.exports=e},{"../../../utils/xml-stream":27,"../base-xform":31}],52:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a=e("../../../utils/xml-stream"),s=e("../base-xform"),u=e("../simple/date-xform"),c=e("../simple/string-xform"),l=e("../simple/integer-xform");(e=function(){var e=h,t=s;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(h);function h(){var e;if(this instanceof h)return(e=n.call(this)).map={"dc:creator":new c({tag:"dc:creator"}),"dc:title":new c({tag:"dc:title"}),"dc:subject":new c({tag:"dc:subject"}),"dc:description":new c({tag:"dc:description"}),"dc:identifier":new c({tag:"dc:identifier"}),"dc:language":new c({tag:"dc:language"}),"cp:keywords":new c({tag:"cp:keywords"}),"cp:category":new c({tag:"cp:category"}),"cp:lastModifiedBy":new c({tag:"cp:lastModifiedBy"}),"cp:lastPrinted":new u({tag:"cp:lastPrinted",format:h.DateFormat}),"cp:revision":new l({tag:"cp:revision"}),"cp:version":new c({tag:"cp:version"}),"cp:contentStatus":new c({tag:"cp:contentStatus"}),"cp:contentType":new c({tag:"cp:contentType"}),"dcterms:created":new u({tag:"dcterms:created",attrs:h.DateAttrs,format:h.DateFormat}),"dcterms:modified":new u({tag:"dcterms:modified",attrs:h.DateAttrs,format:h.DateFormat})},e;throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(h.prototype,[{key:"render",value:function(e,t){e.openXml(a.StdDocAttributes),e.openNode("cp:coreProperties",h.CORE_PROPERTY_ATTRIBUTES),this.map["dc:creator"].render(e,t.creator),this.map["dc:title"].render(e,t.title),this.map["dc:subject"].render(e,t.subject),this.map["dc:description"].render(e,t.description),this.map["dc:identifier"].render(e,t.identifier),this.map["dc:language"].render(e,t.language),this.map["cp:keywords"].render(e,t.keywords),this.map["cp:category"].render(e,t.category),this.map["cp:lastModifiedBy"].render(e,t.lastModifiedBy),this.map["cp:lastPrinted"].render(e,t.lastPrinted),this.map["cp:revision"].render(e,t.revision),this.map["cp:version"].render(e,t.version),this.map["cp:contentStatus"].render(e,t.contentStatus),this.map["cp:contentType"].render(e,t.contentType),this.map["dcterms:created"].render(e,t.created),this.map["dcterms:modified"].render(e,t.modified),e.closeNode()}},{key:"parseOpen",value:function(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case"cp:coreProperties":case"coreProperties":return!0;default:if(this.parser=this.map[e.name],this.parser)return this.parser.parseOpen(e),!0;throw new Error("Unexpected xml node in parseOpen: ".concat(JSON.stringify(e)))}}},{key:"parseText",value:function(e){this.parser&&this.parser.parseText(e)}},{key:"parseClose",value:function(e){if(this.parser)return this.parser.parseClose(e)||(this.parser=void 0),!0;switch(e){case"cp:coreProperties":case"coreProperties":return!(this.model={creator:this.map["dc:creator"].model,title:this.map["dc:title"].model,subject:this.map["dc:subject"].model,description:this.map["dc:description"].model,identifier:this.map["dc:identifier"].model,language:this.map["dc:language"].model,keywords:this.map["cp:keywords"].model,category:this.map["cp:category"].model,lastModifiedBy:this.map["cp:lastModifiedBy"].model,lastPrinted:this.map["cp:lastPrinted"].model,revision:this.map["cp:revision"].model,contentStatus:this.map["cp:contentStatus"].model,contentType:this.map["cp:contentType"].model,created:this.map["dcterms:created"].model,modified:this.map["dcterms:modified"].model});default:throw new Error("Unexpected xml node in parseClose: ".concat(e))}}}]),h}()).DateFormat=function(e){return e.toISOString().replace(/[.]\d{3}/,"")},e.DateAttrs={"xsi:type":"dcterms:W3CDTF"},e.CORE_PROPERTY_ATTRIBUTES={"xmlns:cp":"http://schemas.openxmlformats.org/package/2006/metadata/core-properties","xmlns:dc":"http://purl.org/dc/elements/1.1/","xmlns:dcterms":"http://purl.org/dc/terms/","xmlns:dcmitype":"http://purl.org/dc/dcmitype/","xmlns:xsi":"http://www.w3.org/2001/XMLSchema-instance"},t.exports=e},{"../../../utils/xml-stream":27,"../base-xform":31,"../simple/date-xform":116,"../simple/integer-xform":117,"../simple/string-xform":118}],53:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}e=function(e){var t=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(a);function a(){var e=this,t=a;if(e instanceof t)return n.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(a.prototype,[{key:"render",value:function(e,t){e.leafNode("Relationship",t)}},{key:"parseOpen",value:function(e){return"Relationship"===e.name&&(this.model=e.attributes,!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}]),a}(e("../base-xform")),t.exports=e},{"../base-xform":31}],54:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a=e("../../../utils/xml-stream"),s=e("../base-xform"),u=e("./relationship-xform");(e=function(){var e=c,t=s;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(c);function c(){var e;if(this instanceof c)return(e=n.call(this)).map={Relationship:new u},e;throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(c.prototype,[{key:"render",value:function(e,t){var n=this;t=t||this._values,e.openXml(a.StdDocAttributes),e.openNode("Relationships",c.RELATIONSHIPS_ATTRIBUTES),t.forEach((function(t){n.map.Relationship.render(e,t)})),e.closeNode()}},{key:"parseOpen",value:function(e){if(this.parser)return this.parser.parseOpen(e),!0;if("Relationships"===e.name)return this.model=[],!0;if(this.parser=this.map[e.name],this.parser)return this.parser.parseOpen(e),!0;throw new Error("Unexpected xml node in parseOpen: ".concat(JSON.stringify(e)))}},{key:"parseText",value:function(e){this.parser&&this.parser.parseText(e)}},{key:"parseClose",value:function(e){if(this.parser)return this.parser.parseClose(e)||(this.model.push(this.parser.model),this.parser=void 0),!0;if("Relationships"!==e)throw new Error("Unexpected xml node in parseClose: ".concat(e));return!1}}]),c}()).RELATIONSHIPS_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/package/2006/relationships"},t.exports=e},{"../../../utils/xml-stream":27,"../base-xform":31,"./relationship-xform":53}],55:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}e=function(e){var t=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(a);function a(){var e=this,t=a;if(e instanceof t)return n.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(a.prototype,[{key:"parseOpen",value:function(e){return this.parser?this.parser.parseOpen(e):e.name===this.tag?(this.reset(),this.model={range:{editAs:e.attributes.editAs||"oneCell"}}):(this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e)),!0}},{key:"parseText",value:function(e){this.parser&&this.parser.parseText(e)}},{key:"reconcilePicture",value:function(e,t){if(e&&e.rId&&(e=t.rels[e.rId].Target.match(/.*\/media\/(.+[.][a-zA-Z]{3,4})/)))return e=e[1],e=t.mediaIndex[e],t.media[e]}}]),a}(e("../base-xform")),t.exports=e},{"../base-xform":31}],56:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a=e("../base-xform"),s=e("./blip-xform");e=function(){var e=u,t=a;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(u);function u(){var e;if(this instanceof u)return(e=n.call(this)).map={"a:blip":new s},e;throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(u.prototype,[{key:"render",value:function(e,t){e.openNode(this.tag),this.map["a:blip"].render(e,t),e.openNode("a:stretch"),e.leafNode("a:fillRect"),e.closeNode(),e.closeNode()}},{key:"parseOpen",value:function(e){return this.parser?this.parser.parseOpen(e):e.name===this.tag?this.reset():(this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e)),!0}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(e){return this.parser?(this.parser.parseClose(e)||(this.parser=void 0),!0):e!==this.tag||(this.model=this.map["a:blip"].model,!1)}},{key:"tag",get:function(){return"xdr:blipFill"}}]),u}();t.exports=e},{"../base-xform":31,"./blip-xform":57}],57:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}e=function(e){var t=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(a);function a(){var e=this,t=a;if(e instanceof t)return n.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(a.prototype,[{key:"render",value:function(e,t){e.leafNode(this.tag,{"xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","r:embed":t.rId,cstate:"print"})}},{key:"parseOpen",value:function(e){return e.name===this.tag&&(this.model={rId:e.attributes["r:embed"]}),!0}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(e){return e!==this.tag}},{key:"tag",get:function(){return"a:blip"}}]),a}(e("../base-xform")),t.exports=e},{"../base-xform":31}],58:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}e=function(e){var t=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(a);function a(){var e=this,t=a;if(e instanceof t)return n.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(a.prototype,[{key:"render",value:function(e){e.openNode(this.tag),e.leafNode("a:picLocks",{noChangeAspect:"1"}),e.closeNode()}},{key:"parseOpen",value:function(e){return e.name,this.tag,!0}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(e){return e!==this.tag}},{key:"tag",get:function(){return"xdr:cNvPicPr"}}]),a}(e("../base-xform")),t.exports=e},{"../base-xform":31}],59:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a=e("../base-xform"),s=e("./hlink-click-xform"),u=e("./ext-lst-xform");e=function(){var e=c,t=a;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(c);function c(){var e;if(this instanceof c)return(e=n.call(this)).map={"a:hlinkClick":new s,"a:extLst":new u},e;throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(c.prototype,[{key:"render",value:function(e,t){e.openNode(this.tag,{id:t.index,name:"Picture ".concat(t.index)}),this.map["a:hlinkClick"].render(e,t),this.map["a:extLst"].render(e,t),e.closeNode()}},{key:"parseOpen",value:function(e){return this.parser?this.parser.parseOpen(e):e.name===this.tag?this.reset():(this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e)),!0}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(e){return this.parser?(this.parser.parseClose(e)||(this.parser=void 0),!0):e!==this.tag||(this.model=this.map["a:hlinkClick"].model,!1)}},{key:"tag",get:function(){return"xdr:cNvPr"}}]),c}();t.exports=e},{"../base-xform":31,"./ext-lst-xform":62,"./hlink-click-xform":64}],60:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a=e("../base-xform"),s=e("../simple/integer-xform");e=function(){var e=u,t=a;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(u);function u(e){var t;if(this instanceof u)return(t=n.call(this)).tag=e.tag,t.map={"xdr:col":new s({tag:"xdr:col",zero:!0}),"xdr:colOff":new s({tag:"xdr:colOff",zero:!0}),"xdr:row":new s({tag:"xdr:row",zero:!0}),"xdr:rowOff":new s({tag:"xdr:rowOff",zero:!0})},t;throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(u.prototype,[{key:"render",value:function(e,t){e.openNode(this.tag),this.map["xdr:col"].render(e,t.nativeCol),this.map["xdr:colOff"].render(e,t.nativeColOff),this.map["xdr:row"].render(e,t.nativeRow),this.map["xdr:rowOff"].render(e,t.nativeRowOff),e.closeNode()}},{key:"parseOpen",value:function(e){return this.parser?this.parser.parseOpen(e):e.name===this.tag?this.reset():(this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e)),!0}},{key:"parseText",value:function(e){this.parser&&this.parser.parseText(e)}},{key:"parseClose",value:function(e){return this.parser?(this.parser.parseClose(e)||(this.parser=void 0),!0):e!==this.tag||!(this.model={nativeCol:this.map["xdr:col"].model,nativeColOff:this.map["xdr:colOff"].model,nativeRow:this.map["xdr:row"].model,nativeRowOff:this.map["xdr:rowOff"].model})}}]),u}();t.exports=e},{"../base-xform":31,"../simple/integer-xform":117}],61:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a=e("../../../utils/col-cache"),s=e("../../../utils/xml-stream"),u=e("../base-xform"),c=e("./two-cell-anchor-xform"),l=e("./one-cell-anchor-xform");(e=function(){var e=h,t=u;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(h);function h(){var e;if(this instanceof h)return(e=n.call(this)).map={"xdr:twoCellAnchor":new c,"xdr:oneCellAnchor":new l},e;throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(h.prototype,[{key:"prepare",value:function(e){var t=this;e.anchors.forEach((function(e,n){var r;e.anchorType=("string"==typeof(r=e).range?a.decode(r.range):r.range).br?"xdr:twoCellAnchor":"xdr:oneCellAnchor",t.map[e.anchorType].prepare(e,{index:n})}))}},{key:"render",value:function(e,t){var n=this;e.openXml(s.StdDocAttributes),e.openNode(this.tag,h.DRAWING_ATTRIBUTES),t.anchors.forEach((function(t){n.map[t.anchorType].render(e,t)})),e.closeNode()}},{key:"parseOpen",value:function(e){return this.parser?this.parser.parseOpen(e):e.name===this.tag?(this.reset(),this.model={anchors:[]}):(this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e)),!0}},{key:"parseText",value:function(e){this.parser&&this.parser.parseText(e)}},{key:"parseClose",value:function(e){return this.parser?(this.parser.parseClose(e)||(this.model.anchors.push(this.parser.model),this.parser=void 0),!0):e!==this.tag}},{key:"reconcile",value:function(e,t){var n=this;e.anchors.forEach((function(e){(e.br?n.map["xdr:twoCellAnchor"]:n.map["xdr:oneCellAnchor"]).reconcile(e,t)}))}},{key:"tag",get:function(){return"xdr:wsDr"}}]),h}()).DRAWING_ATTRIBUTES={"xmlns:xdr":"http://schemas.openxmlformats.org/drawingml/2006/spreadsheetDrawing","xmlns:a":"http://schemas.openxmlformats.org/drawingml/2006/main"},t.exports=e},{"../../../utils/col-cache":19,"../../../utils/xml-stream":27,"../base-xform":31,"./one-cell-anchor-xform":66,"./two-cell-anchor-xform":69}],62:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}e=function(e){var t=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(a);function a(){var e=this,t=a;if(e instanceof t)return n.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(a.prototype,[{key:"render",value:function(e){e.openNode(this.tag),e.openNode("a:ext",{uri:"{FF2B5EF4-FFF2-40B4-BE49-F238E27FC236}"}),e.leafNode("a16:creationId",{"xmlns:a16":"http://schemas.microsoft.com/office/drawing/2014/main",id:"{00000000-0008-0000-0000-000002000000}"}),e.closeNode(),e.closeNode()}},{key:"parseOpen",value:function(e){return e.name,this.tag,!0}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(e){return e!==this.tag}},{key:"tag",get:function(){return"a:extLst"}}]),a}(e("../base-xform")),t.exports=e},{"../base-xform":31}],63:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a=e("../base-xform");e=function(){var e=s,t=a;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(s);function s(e){var t;if(this instanceof s)return(t=n.call(this)).tag=e.tag,t.map={},t;throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(s.prototype,[{key:"render",value:function(e,t){e.openNode(this.tag);var n=Math.floor(9525*t.width);t=Math.floor(9525*t.height);e.addAttribute("cx",n),e.addAttribute("cy",t),e.closeNode()}},{key:"parseOpen",value:function(e){return e.name===this.tag&&(this.model={width:parseInt(e.attributes.cx||"0",10)/9525,height:parseInt(e.attributes.cy||"0",10)/9525},!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}]),s}();t.exports=e},{"../base-xform":31}],64:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}e=function(e){var t=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(a);function a(){var e=this,t=a;if(e instanceof t)return n.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(a.prototype,[{key:"render",value:function(e,t){t.hyperlinks&&t.hyperlinks.rId&&e.leafNode(this.tag,{"xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","r:id":t.hyperlinks.rId,tooltip:t.hyperlinks.tooltip})}},{key:"parseOpen",value:function(e){return e.name===this.tag&&(this.model={hyperlinks:{rId:e.attributes["r:id"],tooltip:e.attributes.tooltip}}),!0}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"a:hlinkClick"}}]),a}(e("../base-xform")),t.exports=e},{"../base-xform":31}],65:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a=e("../base-xform"),s=e("./c-nv-pr-xform"),u=e("./c-nv-pic-pr-xform");e=function(){var e=c,t=a;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(c);function c(){var e;if(this instanceof c)return(e=n.call(this)).map={"xdr:cNvPr":new s,"xdr:cNvPicPr":new u},e;throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(c.prototype,[{key:"render",value:function(e,t){e.openNode(this.tag),this.map["xdr:cNvPr"].render(e,t),this.map["xdr:cNvPicPr"].render(e,t),e.closeNode()}},{key:"parseOpen",value:function(e){return this.parser?this.parser.parseOpen(e):e.name===this.tag?this.reset():(this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e)),!0}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(e){return this.parser?(this.parser.parseClose(e)||(this.parser=void 0),!0):e!==this.tag||(this.model=this.map["xdr:cNvPr"].model,!1)}},{key:"tag",get:function(){return"xdr:nvPicPr"}}]),c}();t.exports=e},{"../base-xform":31,"./c-nv-pic-pr-xform":58,"./c-nv-pr-xform":59}],66:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a=e("./base-cell-anchor-xform"),s=e("../static-xform"),u=e("./cell-position-xform"),c=e("./ext-xform"),l=e("./pic-xform");e=function(){var e=h,t=a;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(h);function h(){var e;if(this instanceof h)return(e=n.call(this)).map={"xdr:from":new u({tag:"xdr:from"}),"xdr:ext":new c({tag:"xdr:ext"}),"xdr:pic":new l,"xdr:clientData":new s({tag:"xdr:clientData"})},e;throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(h.prototype,[{key:"prepare",value:function(e,t){this.map["xdr:pic"].prepare(e.picture,t)}},{key:"render",value:function(e,t){e.openNode(this.tag,{editAs:t.range.editAs||"oneCell"}),this.map["xdr:from"].render(e,t.range.tl),this.map["xdr:ext"].render(e,t.range.ext),this.map["xdr:pic"].render(e,t.picture),this.map["xdr:clientData"].render(e,{}),e.closeNode()}},{key:"parseClose",value:function(e){return this.parser?(this.parser.parseClose(e)||(this.parser=void 0),!0):e!==this.tag||(this.model.range.tl=this.map["xdr:from"].model,this.model.range.ext=this.map["xdr:ext"].model,this.model.picture=this.map["xdr:pic"].model,!1)}},{key:"reconcile",value:function(e,t){e.medium=this.reconcilePicture(e.picture,t)}},{key:"tag",get:function(){return"xdr:oneCellAnchor"}}]),h}();t.exports=e},{"../static-xform":119,"./base-cell-anchor-xform":55,"./cell-position-xform":60,"./ext-xform":63,"./pic-xform":67}],67:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a=e("../base-xform"),s=e("../static-xform"),u=e("./blip-fill-xform"),c=e("./nv-pic-pr-xform"),l=e("./sp-pr");e=function(){var e=h,t=a;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(h);function h(){var e;if(this instanceof h)return(e=n.call(this)).map={"xdr:nvPicPr":new c,"xdr:blipFill":new u,"xdr:spPr":new s(l)},e;throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(h.prototype,[{key:"prepare",value:function(e,t){e.index=t.index+1}},{key:"render",value:function(e,t){e.openNode(this.tag),this.map["xdr:nvPicPr"].render(e,t),this.map["xdr:blipFill"].render(e,t),this.map["xdr:spPr"].render(e,t),e.closeNode()}},{key:"parseOpen",value:function(e){return this.parser?this.parser.parseOpen(e):e.name===this.tag?this.reset():(this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e)),!0}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(e){return this.parser?(this.parser.parseClose(e)||(this.mergeModel(this.parser.model),this.parser=void 0),!0):e!==this.tag}},{key:"tag",get:function(){return"xdr:pic"}}]),h}();t.exports=e},{"../base-xform":31,"../static-xform":119,"./blip-fill-xform":56,"./nv-pic-pr-xform":65,"./sp-pr":68}],68:[function(e,t,n){"use strict";t.exports={tag:"xdr:spPr",c:[{tag:"a:xfrm",c:[{tag:"a:off",$:{x:"0",y:"0"}},{tag:"a:ext",$:{cx:"0",cy:"0"}}]},{tag:"a:prstGeom",$:{prst:"rect"},c:[{tag:"a:avLst"}]}]}},{}],69:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a=e("./base-cell-anchor-xform"),s=e("../static-xform"),u=e("./cell-position-xform"),c=e("./pic-xform");e=function(){var e=l,t=a;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(l);function l(){var e;if(this instanceof l)return(e=n.call(this)).map={"xdr:from":new u({tag:"xdr:from"}),"xdr:to":new u({tag:"xdr:to"}),"xdr:pic":new c,"xdr:clientData":new s({tag:"xdr:clientData"})},e;throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(l.prototype,[{key:"prepare",value:function(e,t){this.map["xdr:pic"].prepare(e.picture,t)}},{key:"render",value:function(e,t){e.openNode(this.tag,{editAs:t.range.editAs||"oneCell"}),this.map["xdr:from"].render(e,t.range.tl),this.map["xdr:to"].render(e,t.range.br),this.map["xdr:pic"].render(e,t.picture),this.map["xdr:clientData"].render(e,{}),e.closeNode()}},{key:"parseClose",value:function(e){return this.parser?(this.parser.parseClose(e)||(this.parser=void 0),!0):e!==this.tag||(this.model.range.tl=this.map["xdr:from"].model,this.model.range.br=this.map["xdr:to"].model,this.model.picture=this.map["xdr:pic"].model,!1)}},{key:"reconcile",value:function(e,t){e.medium=this.reconcilePicture(e.picture,t)}},{key:"tag",get:function(){return"xdr:twoCellAnchor"}}]),l}();t.exports=e},{"../static-xform":119,"./base-cell-anchor-xform":55,"./cell-position-xform":60,"./pic-xform":67}],70:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}e=function(e){var t=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(a);function a(e){var t;if(this instanceof a)return(t=n.call(this)).tag=e.tag,t.always=!!e.always,t.count=e.count,t.empty=e.empty,t.$count=e.$count||"count",t.$=e.$,t.childXform=e.childXform,t.maxItems=e.maxItems,t;throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(a.prototype,[{key:"prepare",value:function(e,t){var n=this.childXform;e&&e.forEach((function(e,r){t.index=r,n.prepare(e,t)}))}},{key:"render",value:function(e,t){var n;this.always||t&&t.length?(e.openNode(this.tag,this.$),this.count&&e.addAttribute(this.$count,t&&t.length||0),n=this.childXform,(t||[]).forEach((function(t,r){n.render(e,t,r)})),e.closeNode()):this.empty&&e.leafNode(this.tag)}},{key:"parseOpen",value:function(e){return this.parser?(this.parser.parseOpen(e),!0):e.name!==this.tag?!!this.childXform.parseOpen(e)&&(this.parser=this.childXform,!0):(this.model=[],!0)}},{key:"parseText",value:function(e){this.parser&&this.parser.parseText(e)}},{key:"parseClose",value:function(e){if(this.parser){if(!this.parser.parseClose(e)&&(this.model.push(this.parser.model),this.parser=void 0,this.maxItems&&this.model.length>this.maxItems))throw new Error("Max ".concat(this.childXform.tag," count (").concat(this.maxItems,") exceeded"));return!0}return!1}},{key:"reconcile",value:function(e,t){var n;e&&(n=this.childXform,e.forEach((function(e){n.reconcile(e,t)})))}}]),a}(e("./base-xform")),t.exports=e},{"./base-xform":31}],71:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a=e("../../../utils/col-cache");e=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(s);function s(){var e=this,t=s;if(e instanceof t)return n.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(s.prototype,[{key:"render",value:function(e,t){var n,r;t&&("string"==typeof t?e.leafNode("autoFilter",{ref:t}):(n=(r=function(e){return"string"==typeof e?e:a.getAddress(e.row,e.column).address})(t.from),r=r(t.to),n&&r&&e.leafNode("autoFilter",{ref:"".concat(n,":").concat(r)})))}},{key:"parseOpen",value:function(e){"autoFilter"===e.name&&(this.model=e.attributes.ref)}},{key:"tag",get:function(){return"autoFilter"}}]),s}(e("../base-xform"));t.exports=e},{"../../../utils/col-cache":19,"../base-xform":31}],72:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){var n,r=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)),r}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){var r,i;r=e,i=n[t=t],t in r?Object.defineProperty(r,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[t]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var u=e("../../../utils/utils"),c=e("../base-xform"),l=e("../../../doc/range"),h=e("../../../doc/enums"),f=e("../strings/rich-text-xform");function d(e){if(null==e)return h.ValueType.Null;if(e instanceof String||"string"==typeof e)return h.ValueType.String;if("number"==typeof e)return h.ValueType.Number;if("boolean"==typeof e)return h.ValueType.Boolean;if(e instanceof Date)return h.ValueType.Date;if(e.text&&e.hyperlink)return h.ValueType.Hyperlink;if(e.formula)return h.ValueType.Formula;if(e.error)return h.ValueType.Error;throw new Error("I could not understand type of value")}e=function(){var e=i,t=c;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=s(e);n=t?(n=s(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(i);function i(){var e;if(this instanceof i)return(e=n.call(this)).richTextXForm=new f,e;throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(i.prototype,[{key:"prepare",value:function(e,t){var n=t.styles.addStyleModel(e.style||{},e.type!==h.ValueType.Formula?e.type:d(e.result));switch(n&&(e.styleId=n),e.comment&&t.comments.push(o(o({},e.comment),{},{ref:e.address})),e.type){case h.ValueType.String:case h.ValueType.RichText:t.sharedStrings&&(e.ssId=t.sharedStrings.add(e.value));break;case h.ValueType.Date:t.date1904&&(e.date1904=!0);break;case h.ValueType.Hyperlink:t.sharedStrings&&void 0!==e.text&&null!==e.text&&(e.ssId=t.sharedStrings.add(e.text)),t.hyperlinks.push({address:e.address,target:e.hyperlink,tooltip:e.tooltip});break;case h.ValueType.Merge:t.merges.add(e);break;case h.ValueType.Formula:if(t.date1904&&(e.date1904=!0),"shared"===e.shareType&&(e.si=t.siFormulae++),e.formula)t.formulae[e.address]=e;else if(e.sharedFormula){var r=t.formulae[e.sharedFormula];if(!r)throw new Error("Shared Formula master must exist above and or left of clone for cell ".concat(e.address));void 0===r.si?(r.shareType="shared",r.si=t.siFormulae++,r.range=new l(r.address,e.address)):r.range&&r.range.expandToAddress(e.address),e.si=r.si}}}},{key:"renderFormula",value:function(e,t){var n=null;switch(t.shareType){case"shared":n={t:"shared",ref:t.ref||t.range.range,si:t.si};break;case"array":n={t:"array",ref:t.ref};break;default:void 0!==t.si&&(n={t:"shared",si:t.si})}switch(d(t.result)){case h.ValueType.Null:e.leafNode("f",n,t.formula);break;case h.ValueType.String:e.addAttribute("t","str"),e.leafNode("f",n,t.formula),e.leafNode("v",null,t.result);break;case h.ValueType.Number:e.leafNode("f",n,t.formula),e.leafNode("v",null,t.result);break;case h.ValueType.Boolean:e.addAttribute("t","b"),e.leafNode("f",n,t.formula),e.leafNode("v",null,t.result?1:0);break;case h.ValueType.Error:e.addAttribute("t","e"),e.leafNode("f",n,t.formula),e.leafNode("v",null,t.result.error);break;case h.ValueType.Date:e.leafNode("f",n,t.formula),e.leafNode("v",null,u.dateToExcel(t.result,t.date1904));break;default:throw new Error("I could not understand type of value")}}},{key:"render",value:function(e,t){var n=this;if(t.type!==h.ValueType.Null||t.styleId){switch(e.openNode("c"),e.addAttribute("r",t.address),t.styleId&&e.addAttribute("s",t.styleId),t.type){case h.ValueType.Null:break;case h.ValueType.Number:e.leafNode("v",null,t.value);break;case h.ValueType.Boolean:e.addAttribute("t","b"),e.leafNode("v",null,t.value?"1":"0");break;case h.ValueType.Error:e.addAttribute("t","e"),e.leafNode("v",null,t.value.error);break;case h.ValueType.String:case h.ValueType.RichText:void 0!==t.ssId?(e.addAttribute("t","s"),e.leafNode("v",null,t.ssId)):t.value&&t.value.richText?(e.addAttribute("t","inlineStr"),e.openNode("is"),t.value.richText.forEach((function(t){n.richTextXForm.render(e,t)})),e.closeNode("is")):(e.addAttribute("t","str"),e.leafNode("v",null,t.value));break;case h.ValueType.Date:e.leafNode("v",null,u.dateToExcel(t.value,t.date1904));break;case h.ValueType.Hyperlink:void 0!==t.ssId?(e.addAttribute("t","s"),e.leafNode("v",null,t.ssId)):(e.addAttribute("t","str"),e.leafNode("v",null,t.text));break;case h.ValueType.Formula:this.renderFormula(e,t);break;case h.ValueType.Merge:}e.closeNode()}}},{key:"parseOpen",value:function(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case"c":return this.model={address:e.attributes.r},this.t=e.attributes.t,e.attributes.s&&(this.model.styleId=parseInt(e.attributes.s,10)),!0;case"f":return this.currentNode="f",this.model.si=e.attributes.si,this.model.shareType=e.attributes.t,this.model.ref=e.attributes.ref,!0;case"v":return this.currentNode="v",!0;case"t":return this.currentNode="t",!0;case"r":return this.parser=this.richTextXForm,this.parser.parseOpen(e),!0;default:return!1}}},{key:"parseText",value:function(e){if(this.parser)this.parser.parseText(e);else switch(this.currentNode){case"f":this.model.formula=this.model.formula?this.model.formula+e:e;break;case"v":case"t":this.model.value&&this.model.value.richText?this.model.value.richText.text=this.model.value.richText.text?this.model.value.richText.text+e:e:this.model.value=this.model.value?this.model.value+e:e}}},{key:"parseClose",value:function(e){switch(e){case"c":var t=this.model;if(t.formula||t.shareType)t.type=h.ValueType.Formula,t.value&&("str"===this.t?t.result=u.xmlDecode(t.value):"b"===this.t?t.result=0!==parseInt(t.value,10):"e"===this.t?t.result={error:t.value}:t.result=parseFloat(t.value),t.value=void 0);else if(void 0!==t.value)switch(this.t){case"s":t.type=h.ValueType.String,t.value=parseInt(t.value,10);break;case"str":t.type=h.ValueType.String,t.value=u.xmlDecode(t.value);break;case"inlineStr":t.type=h.ValueType.String;break;case"b":t.type=h.ValueType.Boolean,t.value=0!==parseInt(t.value,10);break;case"e":t.type=h.ValueType.Error,t.value={error:t.value};break;default:t.type=h.ValueType.Number,t.value=parseFloat(t.value)}else t.styleId?t.type=h.ValueType.Null:t.type=h.ValueType.Merge;return!1;case"f":case"v":case"is":return!(this.currentNode=void 0);case"t":return this.parser?this.parser.parseClose(e):this.currentNode=void 0,!0;case"r":return this.model.value=this.model.value||{},this.model.value.richText=this.model.value.richText||[],this.model.value.richText.push(this.parser.model),this.parser=void 0,!(this.currentNode=void 0);default:return!!this.parser&&(this.parser.parseClose(e),!0)}}},{key:"reconcile",value:function(e,t){var n,r=e.styleId&&t.styles&&t.styles.getStyleModel(e.styleId);switch(r&&(e.style=r),void 0!==e.styleId&&(e.styleId=void 0),e.type){case h.ValueType.String:"number"==typeof e.value&&t.sharedStrings&&(e.value=t.sharedStrings.getString(e.value)),e.value.richText&&(e.type=h.ValueType.RichText);break;case h.ValueType.Number:r&&u.isDateFmt(r.numFmt)&&(e.type=h.ValueType.Date,e.value=u.excelToDate(e.value,t.date1904));break;case h.ValueType.Formula:void 0!==e.result&&r&&u.isDateFmt(r.numFmt)&&(e.result=u.excelToDate(e.result,t.date1904)),"shared"===e.shareType&&(e.ref?t.formulae[e.si]=e.address:(e.sharedFormula=t.formulae[e.si],delete e.shareType),delete e.si)}(n=((n=t.hyperlinkMap[e.address])&&(e.type===h.ValueType.Formula?(e.text=e.result,e.result=void 0):(e.text=e.value,e.value=void 0),e.type=h.ValueType.Hyperlink,e.hyperlink=n),t.commentsMap&&t.commentsMap[e.address]))&&(e.comment=n)}},{key:"tag",get:function(){return"c"}}]),i}(),t.exports=e},{"../../../doc/enums":7,"../../../doc/range":10,"../../../utils/utils":26,"../base-xform":31,"../strings/rich-text-xform":121}],73:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a=e("../../base-xform");e=function(){var e=s,t=a;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(s);function s(){var e=this,t=s;if(e instanceof t)return n.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(s.prototype,[{key:"render",value:function(e,t){e.leafNode(this.tag,{iconSet:t.iconSet,iconId:t.iconId})}},{key:"parseOpen",value:function(e){e=e.attributes,this.model={iconSet:e.iconSet,iconId:a.toIntValue(e.iconId)}}},{key:"parseClose",value:function(e){return e!==this.tag}},{key:"tag",get:function(){return"x14:cfIcon"}}]),s}();t.exports=e},{"../../base-xform":31}],74:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(e){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var s=e("uuid").v4,u=e("../../base-xform"),c=e("../../composite-xform"),l=e("./databar-ext-xform"),h=e("./icon-set-ext-xform"),f={"3Triangles":!0,"3Stars":!0,"5Boxes":!0};e=function(){var e=d,t=c;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=a(e);n=t?(n=a(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(d);function d(){var e;if(this instanceof d)return(e=n.call(this)).map={"x14:dataBar":e.databarXform=new l,"x14:iconSet":e.iconSetXform=new h},e;throw new TypeError("Cannot call a class as a function")}return e=[{key:"isExt",value:function(e){return"dataBar"===e.type?l.isExt(e):!("iconSet"!==e.type||!e.custom&&!f[e.iconSet])}}],i((t=d).prototype,[{key:"prepare",value:function(e){d.isExt(e)&&(e.x14Id="{".concat(s(),"}").toUpperCase())}},{key:"render",value:function(e,t){if(d.isExt(t))switch(t.type){case"dataBar":this.renderDataBar(e,t);break;case"iconSet":this.renderIconSet(e,t)}}},{key:"renderDataBar",value:function(e,t){e.openNode(this.tag,{type:"dataBar",id:t.x14Id}),this.databarXform.render(e,t),e.closeNode()}},{key:"renderIconSet",value:function(e,t){e.openNode(this.tag,{type:"iconSet",priority:t.priority,id:t.x14Id||"{".concat(s(),"}")}),this.iconSetXform.render(e,t),e.closeNode()}},{key:"createNewModel",value:function(e){return{type:(e=e.attributes).type,x14Id:e.id,priority:u.toIntValue(e.priority)}}},{key:"onParserClose",value:function(e,t){Object.assign(this.model,t.model)}},{key:"tag",get:function(){return"x14:cfRule"}}]),i(t,e),d}();t.exports=e},{"../../base-xform":31,"../../composite-xform":47,"./databar-ext-xform":78,"./icon-set-ext-xform":80,uuid:526}],75:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a=e("../../composite-xform"),s=e("./f-ext-xform");e=function(){var e=u,t=a;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(u);function u(){var e;if(this instanceof u)return(e=n.call(this)).map={"xm:f":e.fExtXform=new s},e;throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(u.prototype,[{key:"render",value:function(e,t){e.openNode(this.tag,{type:t.type}),void 0!==t.value&&this.fExtXform.render(e,t.value),e.closeNode()}},{key:"createNewModel",value:function(e){return{type:e.attributes.type}}},{key:"onParserClose",value:function(e,t){"xm:f"===e&&(this.model.value=t.model?parseFloat(t.model):0)}},{key:"tag",get:function(){return"x14:cfvo"}}]),u}();t.exports=e},{"../../composite-xform":47,"./f-ext-xform":79}],76:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a=e("../../composite-xform"),s=e("./sqref-ext-xform"),u=e("./cf-rule-ext-xform");e=function(){var e=c,t=a;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(c);function c(){var e;if(this instanceof c)return(e=n.call(this)).map={"xm:sqref":e.sqRef=new s,"x14:cfRule":e.cfRule=new u},e;throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(c.prototype,[{key:"prepare",value:function(e,t){var n=this;e.rules.forEach((function(e){n.cfRule.prepare(e,t)}))}},{key:"render",value:function(e,t){var n=this;t.rules.some(u.isExt)&&(e.openNode(this.tag,{"xmlns:xm":"http://schemas.microsoft.com/office/excel/2006/main"}),t.rules.filter(u.isExt).forEach((function(t){return n.cfRule.render(e,t)})),this.sqRef.render(e,t.ref),e.closeNode())}},{key:"createNewModel",value:function(){return{rules:[]}}},{key:"onParserClose",value:function(e,t){switch(e){case"xm:sqref":this.model.ref=t.model;break;case"x14:cfRule":this.model.rules.push(t.model)}}},{key:"tag",get:function(){return"x14:conditionalFormatting"}}]),c}();t.exports=e},{"../../composite-xform":47,"./cf-rule-ext-xform":74,"./sqref-ext-xform":81}],77:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a=e("../../composite-xform"),s=e("./cf-rule-ext-xform"),u=e("./conditional-formatting-ext-xform");e=function(){var e=c,t=a;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(c);function c(){var e;if(this instanceof c)return(e=n.call(this)).map={"x14:conditionalFormatting":e.cfXform=new u},e;throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(c.prototype,[{key:"hasContent",value:function(e){return void 0===e.hasExtContent&&(e.hasExtContent=e.some((function(e){return e.rules.some(s.isExt)}))),e.hasExtContent}},{key:"prepare",value:function(e,t){var n=this;e.forEach((function(e){n.cfXform.prepare(e,t)}))}},{key:"render",value:function(e,t){var n=this;this.hasContent(t)&&(e.openNode(this.tag),t.forEach((function(t){return n.cfXform.render(e,t)})),e.closeNode())}},{key:"createNewModel",value:function(){return[]}},{key:"onParserClose",value:function(e,t){this.model.push(t.model)}},{key:"tag",get:function(){return"x14:conditionalFormattings"}}]),c}();t.exports=e},{"../../composite-xform":47,"./cf-rule-ext-xform":74,"./conditional-formatting-ext-xform":76}],78:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var u=e("../../base-xform"),c=e("../../composite-xform"),l=e("../../style/color-xform"),h=e("./cfvo-ext-xform");e=function(){var e=f,t=c;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=s(e);n=t?(n=s(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(f);function f(){var e;if(this instanceof f)return(e=n.call(this)).map={"x14:cfvo":e.cfvoXform=new h,"x14:borderColor":e.borderColorXform=new l("x14:borderColor"),"x14:negativeBorderColor":e.negativeBorderColorXform=new l("x14:negativeBorderColor"),"x14:negativeFillColor":e.negativeFillColorXform=new l("x14:negativeFillColor"),"x14:axisColor":e.axisColorXform=new l("x14:axisColor")},e;throw new TypeError("Cannot call a class as a function")}return e=[{key:"isExt",value:function(e){return!e.gradient}}],o((t=f).prototype,[{key:"render",value:function(e,t){var n=this;e.openNode(this.tag,{minLength:u.toIntAttribute(t.minLength,0,!0),maxLength:u.toIntAttribute(t.maxLength,100,!0),border:u.toBoolAttribute(t.border,!1),gradient:u.toBoolAttribute(t.gradient,!0),negativeBarColorSameAsPositive:u.toBoolAttribute(t.negativeBarColorSameAsPositive,!0),negativeBarBorderColorSameAsPositive:u.toBoolAttribute(t.negativeBarBorderColorSameAsPositive,!0),axisPosition:u.toAttribute(t.axisPosition,"auto"),direction:u.toAttribute(t.direction,"leftToRight")}),t.cfvo.forEach((function(t){n.cfvoXform.render(e,t)})),this.borderColorXform.render(e,t.borderColor),this.negativeBorderColorXform.render(e,t.negativeBorderColor),this.negativeFillColorXform.render(e,t.negativeFillColor),this.axisColorXform.render(e,t.axisColor),e.closeNode()}},{key:"createNewModel",value:function(e){return e=e.attributes,{cfvo:[],minLength:u.toIntValue(e.minLength,0),maxLength:u.toIntValue(e.maxLength,100),border:u.toBoolValue(e.border,!1),gradient:u.toBoolValue(e.gradient,!0),negativeBarColorSameAsPositive:u.toBoolValue(e.negativeBarColorSameAsPositive,!0),negativeBarBorderColorSameAsPositive:u.toBoolValue(e.negativeBarBorderColorSameAsPositive,!0),axisPosition:u.toStringValue(e.axisPosition,"auto"),direction:u.toStringValue(e.direction,"leftToRight")}}},{key:"onParserClose",value:function(e,t){"cfvo"===(e=(function(e){if(Array.isArray(e))return e}(e=e.split(":"))||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),2!==n.length);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}(e)||function(e,t){var n;if(e)return"string"==typeof e?i(e,2):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,2):void 0}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[1])?this.model.cfvo.push(t.model):this.model[e]=t.model}},{key:"tag",get:function(){return"x14:dataBar"}}]),o(t,e),f}();t.exports=e},{"../../base-xform":31,"../../composite-xform":47,"../../style/color-xform":127,"./cfvo-ext-xform":75}],79:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}e=function(e){var t=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(a);function a(){var e=this,t=a;if(e instanceof t)return n.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(a.prototype,[{key:"render",value:function(e,t){e.leafNode(this.tag,null,t)}},{key:"parseOpen",value:function(){this.model=""}},{key:"parseText",value:function(e){this.model+=e}},{key:"parseClose",value:function(e){return e!==this.tag}},{key:"tag",get:function(){return"xm:f"}}]),a}(e("../../base-xform")),t.exports=e},{"../../base-xform":31}],80:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(e){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var s=e("../../base-xform"),u=e("../../composite-xform"),c=e("./cfvo-ext-xform"),l=e("./cf-icon-ext-xform");e=function(){var e=h,t=u;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=a(e);n=t?(n=a(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(h);function h(){var e;if(this instanceof h)return(e=n.call(this)).map={"x14:cfvo":e.cfvoXform=new c,"x14:cfIcon":e.cfIconXform=new l},e;throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(h.prototype,[{key:"render",value:function(e,t){var n=this;e.openNode(this.tag,{iconSet:s.toStringAttribute(t.iconSet),reverse:s.toBoolAttribute(t.reverse,!1),showValue:s.toBoolAttribute(t.showValue,!0),custom:s.toBoolAttribute(t.icons,!1)}),t.cfvo.forEach((function(t){n.cfvoXform.render(e,t)})),t.icons&&t.icons.forEach((function(t,r){t.iconId=r,n.cfIconXform.render(e,t)})),e.closeNode()}},{key:"createNewModel",value:function(e){return e=e.attributes,{cfvo:[],iconSet:s.toStringValue(e.iconSet,"3TrafficLights"),reverse:s.toBoolValue(e.reverse,!1),showValue:s.toBoolValue(e.showValue,!0)}}},{key:"onParserClose",value:function(e,t){var n=(function(e){if(Array.isArray(e))return e}(e=e.split(":"))||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),2!==n.length);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}(e)||function(e,t){var n;if(e)return"string"==typeof e?i(e,2):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,2):void 0}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[1];switch(n){case"cfvo":this.model.cfvo.push(t.model);break;case"cfIcon":this.model.icons||(this.model.icons=[]),this.model.icons.push(t.model);break;default:this.model[n]=t.model}}},{key:"tag",get:function(){return"x14:iconSet"}}]),h}();t.exports=e},{"../../base-xform":31,"../../composite-xform":47,"./cf-icon-ext-xform":73,"./cfvo-ext-xform":75}],81:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}e=function(e){var t=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(a);function a(){var e=this,t=a;if(e instanceof t)return n.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(a.prototype,[{key:"render",value:function(e,t){e.leafNode(this.tag,null,t)}},{key:"parseOpen",value:function(){this.model=""}},{key:"parseText",value:function(e){this.model+=e}},{key:"parseClose",value:function(e){return e!==this.tag}},{key:"tag",get:function(){return"xm:sqref"}}]),a}(e("../../base-xform")),t.exports=e},{"../../base-xform":31}],82:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){var n,r=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)),r}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){var r,i;r=e,i=n[t=t],t in r?Object.defineProperty(r,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[t]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var c=e("../../base-xform"),l=e("../../composite-xform"),h=e("../../../../doc/range"),f=e("./databar-xform"),d=e("./ext-lst-ref-xform"),p=e("./formula-xform"),m=e("./color-scale-xform"),g=e("./icon-set-xform"),A={"3Triangles":!0,"3Stars":!0,"5Boxes":!0};e=function(){var e=i,t=l;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=u(e);n=t?(n=u(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(i);function i(){var e;if(this instanceof i)return(e=n.call(this)).map={dataBar:e.databarXform=new f,extLst:e.extLstRefXform=new d,formula:e.formulaXform=new p,colorScale:e.colorScaleXform=new m,iconSet:e.iconSetXform=new g},e;throw new TypeError("Cannot call a class as a function")}return e=[{key:"isPrimitive",value:function(e){return"iconSet"!==e.type||!e.custom&&!A[e.iconSet]}}],a((t=i).prototype,[{key:"render",value:function(e,t){switch(t.type){case"expression":this.renderExpression(e,t);break;case"cellIs":this.renderCellIs(e,t);break;case"top10":this.renderTop10(e,t);break;case"aboveAverage":this.renderAboveAverage(e,t);break;case"dataBar":this.renderDataBar(e,t);break;case"colorScale":this.renderColorScale(e,t);break;case"iconSet":this.renderIconSet(e,t);break;case"containsText":this.renderText(e,t);break;case"timePeriod":this.renderTimePeriod(e,t)}}},{key:"renderExpression",value:function(e,t){e.openNode(this.tag,{type:"expression",dxfId:t.dxfId,priority:t.priority}),this.formulaXform.render(e,t.formulae[0]),e.closeNode()}},{key:"renderCellIs",value:function(e,t){var n=this;e.openNode(this.tag,{type:"cellIs",dxfId:t.dxfId,priority:t.priority,operator:t.operator}),t.formulae.forEach((function(t){n.formulaXform.render(e,t)})),e.closeNode()}},{key:"renderTop10",value:function(e,t){e.leafNode(this.tag,{type:"top10",dxfId:t.dxfId,priority:t.priority,percent:c.toBoolAttribute(t.percent,!1),bottom:c.toBoolAttribute(t.bottom,!1),rank:c.toIntValue(t.rank,10,!0)})}},{key:"renderAboveAverage",value:function(e,t){e.leafNode(this.tag,{type:"aboveAverage",dxfId:t.dxfId,priority:t.priority,aboveAverage:c.toBoolAttribute(t.aboveAverage,!0)})}},{key:"renderDataBar",value:function(e,t){e.openNode(this.tag,{type:"dataBar",priority:t.priority}),this.databarXform.render(e,t),this.extLstRefXform.render(e,t),e.closeNode()}},{key:"renderColorScale",value:function(e,t){e.openNode(this.tag,{type:"colorScale",priority:t.priority}),this.colorScaleXform.render(e,t),e.closeNode()}},{key:"renderIconSet",value:function(e,t){i.isPrimitive(t)&&(e.openNode(this.tag,{type:"iconSet",priority:t.priority}),this.iconSetXform.render(e,t),e.closeNode())}},{key:"renderText",value:function(e,t){e.openNode(this.tag,{type:t.operator,dxfId:t.dxfId,priority:t.priority,operator:c.toStringAttribute(t.operator,"containsText")}),(t=function(e){if(e.formulae&&e.formulae[0])return e.formulae[0];var t=new h(e.ref).tl;switch(e.operator){case"containsText":return'NOT(ISERROR(SEARCH("'.concat(e.text,'",').concat(t,")))");case"containsBlanks":return"LEN(TRIM(".concat(t,"))=0");case"notContainsBlanks":return"LEN(TRIM(".concat(t,"))>0");case"containsErrors":return"ISERROR(".concat(t,")");case"notContainsErrors":return"NOT(ISERROR(".concat(t,"))");default:return}}(t))&&this.formulaXform.render(e,t),e.closeNode()}},{key:"renderTimePeriod",value:function(e,t){e.openNode(this.tag,{type:"timePeriod",dxfId:t.dxfId,priority:t.priority,timePeriod:t.timePeriod}),(t=function(e){if(e.formulae&&e.formulae[0])return e.formulae[0];var t=new h(e.ref).tl;switch(e.timePeriod){case"thisWeek":return"AND(TODAY()-ROUNDDOWN(".concat(t,",0)<=WEEKDAY(TODAY())-1,ROUNDDOWN(").concat(t,",0)-TODAY()<=7-WEEKDAY(TODAY()))");case"lastWeek":return"AND(TODAY()-ROUNDDOWN(".concat(t,",0)>=(WEEKDAY(TODAY())),TODAY()-ROUNDDOWN(").concat(t,",0)<(WEEKDAY(TODAY())+7))");case"nextWeek":return"AND(ROUNDDOWN(".concat(t,",0)-TODAY()>(7-WEEKDAY(TODAY())),ROUNDDOWN(").concat(t,",0)-TODAY()<(15-WEEKDAY(TODAY())))");case"yesterday":return"FLOOR(".concat(t,",1)=TODAY()-1");case"today":return"FLOOR(".concat(t,",1)=TODAY()");case"tomorrow":return"FLOOR(".concat(t,",1)=TODAY()+1");case"last7Days":return"AND(TODAY()-FLOOR(".concat(t,",1)<=6,FLOOR(").concat(t,",1)<=TODAY())");case"lastMonth":return"AND(MONTH(".concat(t,")=MONTH(EDATE(TODAY(),0-1)),YEAR(").concat(t,")=YEAR(EDATE(TODAY(),0-1)))");case"thisMonth":return"AND(MONTH(".concat(t,")=MONTH(TODAY()),YEAR(").concat(t,")=YEAR(TODAY()))");case"nextMonth":return"AND(MONTH(".concat(t,")=MONTH(EDATE(TODAY(),0+1)),YEAR(").concat(t,")=YEAR(EDATE(TODAY(),0+1)))");default:return}}(t))&&this.formulaXform.render(e,t),e.closeNode()}},{key:"createNewModel",value:function(e){var t=e.attributes;return o(o({},function(){var e=t.type,n=t.operator;switch(e){case"containsText":case"containsBlanks":case"notContainsBlanks":case"containsErrors":case"notContainsErrors":return{type:"containsText",operator:e};default:return{type:e,operator:n}}}()),{},{dxfId:c.toIntValue(t.dxfId),priority:c.toIntValue(t.priority),timePeriod:t.timePeriod,percent:c.toBoolValue(t.percent),bottom:c.toBoolValue(t.bottom),rank:c.toIntValue(t.rank),aboveAverage:c.toBoolValue(t.aboveAverage)})}},{key:"onParserClose",value:function(e,t){switch(e){case"dataBar":case"extLst":case"colorScale":case"iconSet":Object.assign(this.model,t.model);break;case"formula":this.model.formulae=this.model.formulae||[],this.model.formulae.push(t.model)}}},{key:"tag",get:function(){return"cfRule"}}]),a(t,e),i}();t.exports=e},{"../../../../doc/range":10,"../../base-xform":31,"../../composite-xform":47,"./color-scale-xform":84,"./databar-xform":87,"./ext-lst-ref-xform":88,"./formula-xform":89,"./icon-set-xform":90}],83:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a=e("../../base-xform");e=function(){var e=s,t=a;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(s);function s(){var e=this,t=s;if(e instanceof t)return n.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(s.prototype,[{key:"render",value:function(e,t){e.leafNode(this.tag,{type:t.type,val:t.value})}},{key:"parseOpen",value:function(e){this.model={type:e.attributes.type,value:a.toFloatValue(e.attributes.val)}}},{key:"parseClose",value:function(e){return e!==this.tag}},{key:"tag",get:function(){return"cfvo"}}]),s}();t.exports=e},{"../../base-xform":31}],84:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a=e("../../composite-xform"),s=e("../../style/color-xform"),u=e("./cfvo-xform");e=function(){var e=c,t=a;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(c);function c(){var e;if(this instanceof c)return(e=n.call(this)).map={cfvo:e.cfvoXform=new u,color:e.colorXform=new s},e;throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(c.prototype,[{key:"render",value:function(e,t){var n=this;e.openNode(this.tag),t.cfvo.forEach((function(t){n.cfvoXform.render(e,t)})),t.color.forEach((function(t){n.colorXform.render(e,t)})),e.closeNode()}},{key:"createNewModel",value:function(e){return{cfvo:[],color:[]}}},{key:"onParserClose",value:function(e,t){this.model[e].push(t.model)}},{key:"tag",get:function(){return"colorScale"}}]),c}();t.exports=e},{"../../composite-xform":47,"../../style/color-xform":127,"./cfvo-xform":83}],85:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a=e("../../composite-xform"),s=e("./cf-rule-xform");e=function(){var e=u,t=a;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(u);function u(){var e;if(this instanceof u)return(e=n.call(this)).map={cfRule:new s},e;throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(u.prototype,[{key:"render",value:function(e,t){var n=this;t.rules.some(s.isPrimitive)&&(e.openNode(this.tag,{sqref:t.ref}),t.rules.forEach((function(r){s.isPrimitive(r)&&(r.ref=t.ref,n.map.cfRule.render(e,r))})),e.closeNode())}},{key:"createNewModel",value:function(e){return{ref:e.attributes.sqref,rules:[]}}},{key:"onParserClose",value:function(e,t){this.model.rules.push(t.model)}},{key:"tag",get:function(){return"conditionalFormatting"}}]),u}();t.exports=e},{"../../composite-xform":47,"./cf-rule-xform":82}],86:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(e){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var s=e("../../base-xform"),u=e("./conditional-formatting-xform");e=function(){var e=c,t=s;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&o(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=a(e);n=t?(n=a(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(c);function c(){var e;if(this instanceof c)return(e=n.call(this)).cfXform=new u,e;throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(c.prototype,[{key:"reset",value:function(){this.model=[]}},{key:"prepare",value:function(e,t){var n=e.reduce((function(e,t){return Math.max.apply(Math,[e].concat(function(e){if(Array.isArray(e))return i(e)}(e=t.rules.map((function(e){return e.priority||0})))||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e){var t;if(e)return"string"==typeof e?i(e,void 0):"Map"===(t="Object"===(t=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:t)||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?i(e,void 0):void 0}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()))}),1);e.forEach((function(e){e.rules.forEach((function(e){e.priority||(e.priority=n++),e.style&&(e.dxfId=t.styles.addDxfStyle(e.style))}))}))}},{key:"render",value:function(e,t){var n=this;t.forEach((function(t){n.cfXform.render(e,t)}))}},{key:"parseOpen",value:function(e){return this.parser?(this.parser.parseOpen(e),!0):"conditionalFormatting"===e.name&&(this.parser=this.cfXform,this.parser.parseOpen(e),!0)}},{key:"parseText",value:function(e){this.parser&&this.parser.parseText(e)}},{key:"parseClose",value:function(e){return!(!this.parser||!this.parser.parseClose(e)&&(this.model.push(this.parser.model),this.parser=void 0,1))}},{key:"reconcile",value:function(e,t){e.forEach((function(e){e.rules.forEach((function(e){void 0!==e.dxfId&&(e.style=t.styles.getDxfStyle(e.dxfId),delete e.dxfId)}))}))}},{key:"tag",get:function(){return"conditionalFormatting"}}]),c}();t.exports=e},{"../../base-xform":31,"./conditional-formatting-xform":85}],87:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a=e("../../composite-xform"),s=e("../../style/color-xform"),u=e("./cfvo-xform");e=function(){var e=c,t=a;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(c);function c(){var e;if(this instanceof c)return(e=n.call(this)).map={cfvo:e.cfvoXform=new u,color:e.colorXform=new s},e;throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(c.prototype,[{key:"render",value:function(e,t){var n=this;e.openNode(this.tag),t.cfvo.forEach((function(t){n.cfvoXform.render(e,t)})),this.colorXform.render(e,t.color),e.closeNode()}},{key:"createNewModel",value:function(){return{cfvo:[]}}},{key:"onParserClose",value:function(e,t){switch(e){case"cfvo":this.model.cfvo.push(t.model);break;case"color":this.model.color=t.model}}},{key:"tag",get:function(){return"dataBar"}}]),c}();t.exports=e},{"../../composite-xform":47,"../../style/color-xform":127,"./cfvo-xform":83}],88:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t,n){t&&o(e.prototype,t),n&&o(e,n)}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&function(e,t){(Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=c(e);n=t?(n=c(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var l,h,f,d=e("../../base-xform"),p=(e=e("../../composite-xform"),s(v,d),f=u(v),a(v,[{key:"render",value:function(e,t){e.leafNode(this.tag,null,t)}},{key:"parseOpen",value:function(){this.model=""}},{key:"parseText",value:function(e){this.model+=e}},{key:"parseClose",value:function(e){return e!==this.tag}},{key:"tag",get:function(){return"x14:id"}}]),v),m=(s(A,e),h=u(A),a(A,[{key:"render",value:function(e,t){e.openNode(this.tag,{uri:"{B025F937-C7B1-47D3-B67F-A62EFF666E3E}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"}),this.idXform.render(e,t.x14Id),e.closeNode()}},{key:"createNewModel",value:function(){return{}}},{key:"onParserClose",value:function(e,t){this.model.x14Id=t.model}},{key:"tag",get:function(){return"ext"}}]),A);s(g,e),l=u(g),a(g,[{key:"render",value:function(e,t){e.openNode(this.tag),this.map.ext.render(e,t),e.closeNode()}},{key:"createNewModel",value:function(){return{}}},{key:"onParserClose",value:function(e,t){Object.assign(this.model,t.model)}},{key:"tag",get:function(){return"extLst"}}]),d=g;function g(){var e;return i(this,g),(e=l.call(this)).map={ext:new m},e}function A(){var e;return i(this,A),(e=h.call(this)).map={"x14:id":e.idXform=new p},e}function v(){return i(this,v),f.apply(this,arguments)}t.exports=d},{"../../base-xform":31,"../../composite-xform":47}],89:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}e=function(e){var t=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(a);function a(){var e=this,t=a;if(e instanceof t)return n.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(a.prototype,[{key:"render",value:function(e,t){e.leafNode(this.tag,null,t)}},{key:"parseOpen",value:function(){this.model=""}},{key:"parseText",value:function(e){this.model+=e}},{key:"parseClose",value:function(e){return e!==this.tag}},{key:"tag",get:function(){return"formula"}}]),a}(e("../../base-xform")),t.exports=e},{"../../base-xform":31}],90:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a=e("../../base-xform"),s=e("../../composite-xform"),u=e("./cfvo-xform");e=function(){var e=c,t=s;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(c);function c(){var e;if(this instanceof c)return(e=n.call(this)).map={cfvo:e.cfvoXform=new u},e;throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(c.prototype,[{key:"render",value:function(e,t){var n=this;e.openNode(this.tag,{iconSet:a.toStringAttribute(t.iconSet,"3TrafficLights"),reverse:a.toBoolAttribute(t.reverse,!1),showValue:a.toBoolAttribute(t.showValue,!0)}),t.cfvo.forEach((function(t){n.cfvoXform.render(e,t)})),e.closeNode()}},{key:"createNewModel",value:function(e){return e=e.attributes,{iconSet:a.toStringValue(e.iconSet,"3TrafficLights"),reverse:a.toBoolValue(e.reverse),showValue:a.toBoolValue(e.showValue),cfvo:[]}}},{key:"onParserClose",value:function(e,t){this.model[e].push(t.model)}},{key:"tag",get:function(){return"iconSet"}}]),c}();t.exports=e},{"../../base-xform":31,"../../composite-xform":47,"./cfvo-xform":83}],91:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}e=function(e){var t=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(a);function a(){var e=this,t=a;if(e instanceof t)return n.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(a.prototype,[{key:"prepare",value:function(e,t){(t=t.styles.addStyleModel(e.style||{}))&&(e.styleId=t)}},{key:"render",value:function(e,t){e.openNode("col"),e.addAttribute("min",t.min),e.addAttribute("max",t.max),t.width&&e.addAttribute("width",t.width),t.styleId&&e.addAttribute("style",t.styleId),t.hidden&&e.addAttribute("hidden","1"),t.bestFit&&e.addAttribute("bestFit","1"),t.outlineLevel&&e.addAttribute("outlineLevel",t.outlineLevel),t.collapsed&&e.addAttribute("collapsed","1"),e.addAttribute("customWidth","1"),e.closeNode()}},{key:"parseOpen",value:function(e){var t;return"col"===e.name&&(t=this.model={min:parseInt(e.attributes.min||"0",10),max:parseInt(e.attributes.max||"0",10),width:void 0===e.attributes.width?void 0:parseFloat(e.attributes.width||"0")},e.attributes.style&&(t.styleId=parseInt(e.attributes.style,10)),!0!==e.attributes.hidden&&"true"!==e.attributes.hidden&&1!==e.attributes.hidden&&"1"!==e.attributes.hidden||(t.hidden=!0),e.attributes.bestFit&&(t.bestFit=!0),e.attributes.outlineLevel&&(t.outlineLevel=parseInt(e.attributes.outlineLevel,10)),e.attributes.collapsed&&(t.collapsed=!0),!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"reconcile",value:function(e,t){e.styleId&&(e.style=t.styles.getStyleModel(e.styleId))}},{key:"tag",get:function(){return"col"}}]),a}(e("../base-xform")),t.exports=e},{"../base-xform":31}],92:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a(e,t){var n,r=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)),r}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){var r,i;r=e,i=n[t=t],t in r?Object.defineProperty(r,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[t]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var u=e("../../../utils/under-dash"),c=e("../../../utils/utils"),l=e("../../../utils/col-cache"),h=e("../base-xform"),f=e("../../../doc/range");function d(e,t,n,r){void 0!==(t=t[n])?e[n]=t:void 0!==r&&(e[n]=r)}function p(e,t,n,r){var i=t[n];void 0!==i?e[n]=function(){switch(i){case"1":case"true":return!0;default:return!1}}():void 0!==r&&(e[n]=r)}e=function(){var e=a,t=h;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(a);function a(){var e=this,t=a;if(e instanceof t)return n.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(a.prototype,[{key:"render",value:function(e,t){var n,r;n=t,t=u.map(n,(function(e,t){return{address:t,dataValidation:e,marked:!1}})).sort((function(e,t){return u.strcmp(e.address,t.address)})),r=u.keyBy(t,"address"),(t=t.map((function(e){if(e.marked)return null;var t=l.decodeEx(e.address);if(t.dimensions)return r[t.dimensions].marked=!0,s(s({},e.dataValidation),{},{sqref:e.address});for(var i=1,o=l.encodeAddress(t.row+i,t.col);n[o]&&u.isEqual(e.dataValidation,n[o]);)o=l.encodeAddress(t.row+ ++i,t.col);for(var a=1;function(e,t,r){for(var i=0;i<t;i++){var o=l.encodeAddress(e.row+i,r);if(!n[o]||!u.isEqual(n[e.address],n[o]))return!1}return!0}(t,i,t.col+a);)a++;for(var c,h,f=0;f<i;f++)for(var d=0;d<a;d++)o=l.encodeAddress(t.row+f,t.col+d),r[o].marked=!0;return 1<i||1<a?(c=t.row+(i-1),h=t.col+(a-1),s(s({},e.dataValidation),{},{sqref:"".concat(e.address,":").concat(l.encodeAddress(c,h))})):s(s({},e.dataValidation),{},{sqref:e.address})})).filter(Boolean)).length&&(e.openNode("dataValidations",{count:t.length}),t.forEach((function(t){e.openNode("dataValidation"),"any"!==t.type&&(e.addAttribute("type",t.type),t.operator&&"list"!==t.type&&"between"!==t.operator&&e.addAttribute("operator",t.operator),t.allowBlank&&e.addAttribute("allowBlank","1")),t.showInputMessage&&e.addAttribute("showInputMessage","1"),t.promptTitle&&e.addAttribute("promptTitle",t.promptTitle),t.prompt&&e.addAttribute("prompt",t.prompt),t.showErrorMessage&&e.addAttribute("showErrorMessage","1"),t.errorStyle&&e.addAttribute("errorStyle",t.errorStyle),t.errorTitle&&e.addAttribute("errorTitle",t.errorTitle),t.error&&e.addAttribute("error",t.error),e.addAttribute("sqref",t.sqref),(t.formulae||[]).forEach((function(n,r){e.openNode("formula".concat(r+1)),"date"===t.type?e.writeText(c.dateToExcel(new Date(n))):e.writeText(n),e.closeNode()})),e.closeNode()})),e.closeNode())}},{key:"parseOpen",value:function(e){switch(e.name){case"dataValidations":return this.model={},!0;case"dataValidation":this._address=e.attributes.sqref;var t={type:e.attributes.type||"any",formulae:[]};switch(e.attributes.type&&p(t,e.attributes,"allowBlank"),p(t,e.attributes,"showInputMessage"),p(t,e.attributes,"showErrorMessage"),t.type){case"any":case"list":case"custom":break;default:d(t,e.attributes,"operator","between")}return d(t,e.attributes,"promptTitle"),d(t,e.attributes,"prompt"),d(t,e.attributes,"errorStyle"),d(t,e.attributes,"errorTitle"),d(t,e.attributes,"error"),this._dataValidation=t,!0;case"formula1":case"formula2":return this._formula=[],!0;default:return!1}}},{key:"parseText",value:function(e){this._formula&&this._formula.push(e)}},{key:"parseClose",value:function(e){var t=this;switch(e){case"dataValidations":return!1;case"dataValidation":return this._dataValidation.formulae&&this._dataValidation.formulae.length||(delete this._dataValidation.formulae,delete this._dataValidation.operator),(this._address.split(/\s+/g)||[]).forEach((function(e){e.includes(":")?new f(e).forEachAddress((function(e){t.model[e]=t._dataValidation})):t.model[e]=t._dataValidation})),!0;case"formula1":case"formula2":var n=this._formula.join("");switch(this._dataValidation.type){case"whole":case"textLength":n=parseInt(n,10);break;case"decimal":n=parseFloat(n);break;case"date":n=c.excelToDate(parseFloat(n))}return this._dataValidation.formulae.push(n),!(this._formula=void 0);default:return!0}}},{key:"tag",get:function(){return"dataValidations"}}]),a}(),t.exports=e},{"../../../doc/range":10,"../../../utils/col-cache":19,"../../../utils/under-dash":25,"../../../utils/utils":26,"../base-xform":31}],93:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}e=function(e){var t=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(a);function a(){var e=this,t=a;if(e instanceof t)return n.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(a.prototype,[{key:"render",value:function(e,t){t&&e.leafNode("dimension",{ref:t})}},{key:"parseOpen",value:function(e){return"dimension"===e.name&&(this.model=e.attributes.ref,!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"dimension"}}]),a}(e("../base-xform")),t.exports=e},{"../base-xform":31}],94:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}e=function(e){var t=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(a);function a(){var e=this,t=a;if(e instanceof t)return n.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(a.prototype,[{key:"render",value:function(e,t){t&&e.leafNode(this.tag,{"r:id":t.rId})}},{key:"parseOpen",value:function(e){return e.name===this.tag&&(this.model={rId:e.attributes["r:id"]},!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"drawing"}}]),a}(e("../base-xform")),t.exports=e},{"../base-xform":31}],95:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t,n){t&&o(e.prototype,t),n&&o(e,n)}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&function(e,t){(Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=c(e);n=t?(n=c(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var l,h,f=e("../composite-xform"),d=e("./cf-ext/conditional-formattings-ext-xform"),p=(s(g,f),h=u(g),a(g,[{key:"hasContent",value:function(e){return this.conditionalFormattings.hasContent(e.conditionalFormattings)}},{key:"prepare",value:function(e,t){this.conditionalFormattings.prepare(e.conditionalFormattings,t)}},{key:"render",value:function(e,t){e.openNode("ext",{uri:"{78C0D931-6437-407d-A8EE-F0AAD7539E65}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"}),this.conditionalFormattings.render(e,t.conditionalFormattings),e.closeNode()}},{key:"createNewModel",value:function(){return{}}},{key:"onParserClose",value:function(e,t){this.model[e]=t.model}},{key:"tag",get:function(){return"ext"}}]),g);s(m,f),l=u(m),a(m,[{key:"prepare",value:function(e,t){this.ext.prepare(e,t)}},{key:"hasContent",value:function(e){return this.ext.hasContent(e)}},{key:"render",value:function(e,t){this.hasContent(t)&&(e.openNode("extLst"),this.ext.render(e,t),e.closeNode())}},{key:"createNewModel",value:function(){return{}}},{key:"onParserClose",value:function(e,t){Object.assign(this.model,t.model)}},{key:"tag",get:function(){return"extLst"}}]),e=m;function m(){var e;return i(this,m),(e=l.call(this)).map={ext:e.ext=new p},e}function g(){var e;return i(this,g),(e=h.call(this)).map={"x14:conditionalFormattings":e.conditionalFormattings=new d},e}t.exports=e},{"../composite-xform":47,"./cf-ext/conditional-formattings-ext-xform":77}],96:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}e=function(e){var t=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(a);function a(){var e=this,t=a;if(e instanceof t)return n.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(a.prototype,[{key:"render",value:function(e,t){var n;t&&(e.addRollback(),n=!1,e.openNode("headerFooter"),t.differentFirst&&(e.addAttribute("differentFirst","1"),n=!0),t.differentOddEven&&(e.addAttribute("differentOddEven","1"),n=!0),t.oddHeader&&"string"==typeof t.oddHeader&&(e.leafNode("oddHeader",null,t.oddHeader),n=!0),t.oddFooter&&"string"==typeof t.oddFooter&&(e.leafNode("oddFooter",null,t.oddFooter),n=!0),t.evenHeader&&"string"==typeof t.evenHeader&&(e.leafNode("evenHeader",null,t.evenHeader),n=!0),t.evenFooter&&"string"==typeof t.evenFooter&&(e.leafNode("evenFooter",null,t.evenFooter),n=!0),t.firstHeader&&"string"==typeof t.firstHeader&&(e.leafNode("firstHeader",null,t.firstHeader),n=!0),t.firstFooter&&"string"==typeof t.firstFooter&&(e.leafNode("firstFooter",null,t.firstFooter),n=!0),n?(e.closeNode(),e.commit()):e.rollback())}},{key:"parseOpen",value:function(e){switch(e.name){case"headerFooter":return this.model={},e.attributes.differentFirst&&(this.model.differentFirst=1===parseInt(e.attributes.differentFirst,0)),e.attributes.differentOddEven&&(this.model.differentOddEven=1===parseInt(e.attributes.differentOddEven,0)),!0;case"oddHeader":return this.currentNode="oddHeader",!0;case"oddFooter":return this.currentNode="oddFooter",!0;case"evenHeader":return this.currentNode="evenHeader",!0;case"evenFooter":return this.currentNode="evenFooter",!0;case"firstHeader":return this.currentNode="firstHeader",!0;case"firstFooter":return this.currentNode="firstFooter",!0;default:return!1}}},{key:"parseText",value:function(e){switch(this.currentNode){case"oddHeader":this.model.oddHeader=e;break;case"oddFooter":this.model.oddFooter=e;break;case"evenHeader":this.model.evenHeader=e;break;case"evenFooter":this.model.evenFooter=e;break;case"firstHeader":this.model.firstHeader=e;break;case"firstFooter":this.model.firstFooter=e}}},{key:"parseClose",value:function(){switch(this.currentNode){case"oddHeader":case"oddFooter":case"evenHeader":case"evenFooter":case"firstHeader":case"firstFooter":return!(this.currentNode=void 0);default:return!1}}},{key:"tag",get:function(){return"headerFooter"}}]),a}(e("../base-xform")),t.exports=e},{"../base-xform":31}],97:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}e=function(e){var t=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(a);function a(){var e=this,t=a;if(e instanceof t)return n.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(a.prototype,[{key:"render",value:function(e,t){e.leafNode("hyperlink",{ref:t.address,"r:id":t.rId,tooltip:t.tooltip})}},{key:"parseOpen",value:function(e){return"hyperlink"===e.name&&(this.model={address:e.attributes.ref,rId:e.attributes["r:id"],tooltip:e.attributes.tooltip},!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"hyperlink"}}]),a}(e("../base-xform")),t.exports=e},{"../base-xform":31}],98:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}e=function(e){var t=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(a);function a(){var e=this,t=a;if(e instanceof t)return n.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(a.prototype,[{key:"render",value:function(e,t){e.leafNode("mergeCell",{ref:t})}},{key:"parseOpen",value:function(e){return"mergeCell"===e.name&&(this.model=e.attributes.ref,!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"mergeCell"}}]),a}(e("../base-xform")),t.exports=e},{"../base-xform":31}],99:[function(e,t,n){"use strict";var r=e("../../../utils/under-dash"),i=e("../../../doc/range"),o=e("../../../utils/col-cache"),a=e("../../../doc/enums");(function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}})(s.prototype,[{key:"add",value:function(e){var t;this.merges[e.master]?this.merges[e.master].expandToAddress(e.address):(t="".concat(e.master,":").concat(e.address),this.merges[e.master]=new i(t))}},{key:"reconcile",value:function(e,t){r.each(e,(function(e){for(var n=o.decode(e),r=n.top;r<=n.bottom;r++)for(var i=t[r-1],s=n.left;s<=n.right;s++){var u=i.cells[s-1];u?u.type===a.ValueType.Merge&&(u.master=n.tl):i.cells[s]={type:a.ValueType.Null,address:o.encodeAddress(r,s)}}}))}},{key:"getMasterAddress",value:function(e){return(e=this.hash[e])&&e.tl}},{key:"mergeCells",get:function(){return r.map(this.merges,(function(e){return e.range}))}}]),e=s;function s(){if(!(this instanceof s))throw new TypeError("Cannot call a class as a function");this.merges={}}t.exports=e},{"../../../doc/enums":7,"../../../doc/range":10,"../../../utils/col-cache":19,"../../../utils/under-dash":25}],100:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a(e){return void 0!==e}var s=e("../base-xform");e=function(){var e=u,t=s;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(u);function u(){var e=this,t=u;if(e instanceof t)return n.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(u.prototype,[{key:"render",value:function(e,t){return!(!t||!a(t.summaryBelow)&&!a(t.summaryRight)||(e.leafNode(this.tag,{summaryBelow:a(t.summaryBelow)?Number(t.summaryBelow):void 0,summaryRight:a(t.summaryRight)?Number(t.summaryRight):void 0}),0))}},{key:"parseOpen",value:function(e){return e.name===this.tag&&(this.model={summaryBelow:a(e.attributes.summaryBelow)?Boolean(Number(e.attributes.summaryBelow)):void 0,summaryRight:a(e.attributes.summaryRight)?Boolean(Number(e.attributes.summaryRight)):void 0},!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"outlinePr"}}]),u}();t.exports=e},{"../base-xform":31}],101:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}e=function(e){var t=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(a);function a(){var e=this,t=a;if(e instanceof t)return n.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(a.prototype,[{key:"render",value:function(e,t){e.leafNode("brk",t)}},{key:"parseOpen",value:function(e){return"brk"===e.name&&(this.model=e.attributes.ref,!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"brk"}}]),a}(e("../base-xform")),t.exports=e},{"../base-xform":31}],102:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a=e("../../../utils/under-dash");e=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(s);function s(){var e=this,t=s;if(e instanceof t)return n.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(s.prototype,[{key:"render",value:function(e,t){t&&(t={left:t.left,right:t.right,top:t.top,bottom:t.bottom,header:t.header,footer:t.footer},a.some(t,(function(e){return void 0!==e}))&&e.leafNode(this.tag,t))}},{key:"parseOpen",value:function(e){return e.name===this.tag&&(this.model={left:parseFloat(e.attributes.left||.7),right:parseFloat(e.attributes.right||.7),top:parseFloat(e.attributes.top||.75),bottom:parseFloat(e.attributes.bottom||.75),header:parseFloat(e.attributes.header||.3),footer:parseFloat(e.attributes.footer||.3)},!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"pageMargins"}}]),s}(e("../base-xform"));t.exports=e},{"../../../utils/under-dash":25,"../base-xform":31}],103:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}e=function(e){var t=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(a);function a(){var e=this,t=a;if(e instanceof t)return n.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(a.prototype,[{key:"render",value:function(e,t){return!(!t||!t.fitToPage||(e.leafNode(this.tag,{fitToPage:t.fitToPage?"1":void 0}),0))}},{key:"parseOpen",value:function(e){return e.name===this.tag&&(this.model={fitToPage:"1"===e.attributes.fitToPage},!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"pageSetUpPr"}}]),a}(e("../base-xform")),t.exports=e},{"../base-xform":31}],104:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a=e("../../../utils/under-dash");function s(e){return e?"1":void 0}e=function(e){var t=u;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(u);function u(){var e=this,t=u;if(e instanceof t)return n.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(u.prototype,[{key:"render",value:function(e,t){t&&(t={paperSize:t.paperSize,orientation:t.orientation,horizontalDpi:t.horizontalDpi,verticalDpi:t.verticalDpi,pageOrder:function(e){if("overThenDown"===e)return e}(t.pageOrder),blackAndWhite:s(t.blackAndWhite),draft:s(t.draft),cellComments:function(e){switch(e){case"atEnd":case"asDisplyed":return e;default:return}}(t.cellComments),errors:function(e){switch(e){case"dash":case"blank":case"NA":return e;default:return}}(t.errors),scale:t.scale,fitToWidth:t.fitToWidth,fitToHeight:t.fitToHeight,firstPageNumber:t.firstPageNumber,useFirstPageNumber:s(t.firstPageNumber),usePrinterDefaults:s(t.usePrinterDefaults),copies:t.copies},a.some(t,(function(e){return void 0!==e}))&&e.leafNode(this.tag,t))}},{key:"parseOpen",value:function(e){return e.name===this.tag&&(this.model={paperSize:void 0!==(t=e.attributes.paperSize)?parseInt(t,10):void 0,orientation:e.attributes.orientation||"portrait",horizontalDpi:parseInt(e.attributes.horizontalDpi||"4294967295",10),verticalDpi:parseInt(e.attributes.verticalDpi||"4294967295",10),pageOrder:e.attributes.pageOrder||"downThenOver",blackAndWhite:"1"===e.attributes.blackAndWhite,draft:"1"===e.attributes.draft,cellComments:e.attributes.cellComments||"None",errors:e.attributes.errors||"displayed",scale:parseInt(e.attributes.scale||"100",10),fitToWidth:parseInt(e.attributes.fitToWidth||"1",10),fitToHeight:parseInt(e.attributes.fitToHeight||"1",10),firstPageNumber:parseInt(e.attributes.firstPageNumber||"1",10),useFirstPageNumber:"1"===e.attributes.useFirstPageNumber,usePrinterDefaults:"1"===e.attributes.usePrinterDefaults,copies:parseInt(e.attributes.copies||"1",10)},!0);var t}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"pageSetup"}}]),u}(e("../base-xform")),t.exports=e},{"../../../utils/under-dash":25,"../base-xform":31}],105:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}e=function(e){var t=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(a);function a(){var e=this,t=a;if(e instanceof t)return n.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(a.prototype,[{key:"render",value:function(e,t){t&&e.leafNode(this.tag,{"r:id":t.rId})}},{key:"parseOpen",value:function(e){return e.name===this.tag&&(this.model={rId:e.attributes["r:id"]},!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"picture"}}]),a}(e("../base-xform")),t.exports=e},{"../base-xform":31}],106:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a=e("../../../utils/under-dash");function s(e){return e?"1":void 0}e=function(e){var t=u;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(u);function u(){var e=this,t=u;if(e instanceof t)return n.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(u.prototype,[{key:"render",value:function(e,t){t&&(t={headings:s(t.showRowColHeaders),gridLines:s(t.showGridLines),horizontalCentered:s(t.horizontalCentered),verticalCentered:s(t.verticalCentered)},a.some(t,(function(e){return void 0!==e}))&&e.leafNode(this.tag,t))}},{key:"parseOpen",value:function(e){return e.name===this.tag&&(this.model={showRowColHeaders:"1"===e.attributes.headings,showGridLines:"1"===e.attributes.gridLines,horizontalCentered:"1"===e.attributes.horizontalCentered,verticalCentered:"1"===e.attributes.verticalCentered},!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"printOptions"}}]),u}(e("../base-xform")),t.exports=e},{"../../../utils/under-dash":25,"../base-xform":31}],107:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a=e("./page-breaks-xform");e=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(s);function s(){var e;if(this instanceof s)return e={tag:"rowBreaks",count:!0,childXform:new a},n.call(this,e);throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(s.prototype,[{key:"render",value:function(e,t){var n;t&&t.length?(e.openNode(this.tag,this.$),this.count&&(e.addAttribute(this.$count,t.length),e.addAttribute("manualBreakCount",t.length)),n=this.childXform,t.forEach((function(t){n.render(e,t)})),e.closeNode()):this.empty&&e.leafNode(this.tag)}}]),s}(e("../list-xform"));t.exports=e},{"../list-xform":70,"./page-breaks-xform":101}],108:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a=e("../base-xform"),s=e("./cell-xform");e=function(){var e=u,t=a;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(u);function u(e){var t;if(this instanceof u)return(t=n.call(this)).maxItems=e&&e.maxItems,t.map={c:new s},t;throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(u.prototype,[{key:"prepare",value:function(e,t){var n=t.styles.addStyleModel(e.style),r=(n&&(e.styleId=n),this.map.c);e.cells.forEach((function(e){r.prepare(e,t)}))}},{key:"render",value:function(e,t,n){e.openNode("row"),e.addAttribute("r",t.number),t.height&&(e.addAttribute("ht",t.height),e.addAttribute("customHeight","1")),t.hidden&&e.addAttribute("hidden","1"),0<t.min&&0<t.max&&t.min<=t.max&&e.addAttribute("spans","".concat(t.min,":").concat(t.max)),t.styleId&&(e.addAttribute("s",t.styleId),e.addAttribute("customFormat","1")),e.addAttribute("x14ac:dyDescent","0.25"),t.outlineLevel&&e.addAttribute("outlineLevel",t.outlineLevel),t.collapsed&&e.addAttribute("collapsed","1");var r=this.map.c;t.cells.forEach((function(t){r.render(e,t,n)})),e.closeNode()}},{key:"parseOpen",value:function(e){var t;return this.parser?(this.parser.parseOpen(e),!0):"row"===e.name?(this.numRowsSeen+=1,t=e.attributes.spans?e.attributes.spans.split(":").map((function(e){return parseInt(e,10)})):[void 0,void 0],t=this.model={number:parseInt(e.attributes.r,10),min:t[0],max:t[1],cells:[]},e.attributes.s&&(t.styleId=parseInt(e.attributes.s,10)),!0!==e.attributes.hidden&&"true"!==e.attributes.hidden&&1!==e.attributes.hidden&&"1"!==e.attributes.hidden||(t.hidden=!0),e.attributes.bestFit&&(t.bestFit=!0),e.attributes.ht&&(t.height=parseFloat(e.attributes.ht)),e.attributes.outlineLevel&&(t.outlineLevel=parseInt(e.attributes.outlineLevel,10)),e.attributes.collapsed&&(t.collapsed=!0),!0):(this.parser=this.map[e.name],!!this.parser&&(this.parser.parseOpen(e),!0))}},{key:"parseText",value:function(e){this.parser&&this.parser.parseText(e)}},{key:"parseClose",value:function(e){if(this.parser){if(!this.parser.parseClose(e)){if(this.model.cells.push(this.parser.model),this.maxItems&&this.model.cells.length>this.maxItems)throw new Error("Max column count (".concat(this.maxItems,") exceeded"));this.parser=void 0}return!0}return!1}},{key:"reconcile",value:function(e,t){e.style=e.styleId?t.styles.getStyleModel(e.styleId):{},void 0!==e.styleId&&(e.styleId=void 0);var n=this.map.c;e.cells.forEach((function(e){n.reconcile(e,t)}))}},{key:"tag",get:function(){return"row"}}]),u}();t.exports=e},{"../base-xform":31,"./cell-xform":72}],109:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a=e("../../../utils/under-dash");e=function(e){var t=s;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(s);function s(){var e=this,t=s;if(e instanceof t)return n.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(s.prototype,[{key:"render",value:function(e,t){var n;t&&(n={defaultRowHeight:t.defaultRowHeight,outlineLevelRow:t.outlineLevelRow,outlineLevelCol:t.outlineLevelCol,"x14ac:dyDescent":t.dyDescent},t.defaultColWidth&&(n.defaultColWidth=t.defaultColWidth),t.defaultRowHeight&&15===t.defaultRowHeight||(n.customHeight="1"),a.some(n,(function(e){return void 0!==e}))&&e.leafNode("sheetFormatPr",n))}},{key:"parseOpen",value:function(e){return"sheetFormatPr"===e.name&&(this.model={defaultRowHeight:parseFloat(e.attributes.defaultRowHeight||"0"),dyDescent:parseFloat(e.attributes["x14ac:dyDescent"]||"0"),outlineLevelRow:parseInt(e.attributes.outlineLevelRow||"0",10),outlineLevelCol:parseInt(e.attributes.outlineLevelCol||"0",10)},e.attributes.defaultColWidth&&(this.model.defaultColWidth=parseFloat(e.attributes.defaultColWidth)),!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"sheetFormatPr"}}]),s}(e("../base-xform"));t.exports=e},{"../../../utils/under-dash":25,"../base-xform":31}],110:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a=e("../base-xform"),s=e("../style/color-xform"),u=e("./page-setup-properties-xform"),c=e("./outline-properties-xform");e=function(){var e=l,t=a;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(l);function l(){var e;if(this instanceof l)return(e=n.call(this)).map={tabColor:new s("tabColor"),pageSetUpPr:new u,outlinePr:new c},e;throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(l.prototype,[{key:"render",value:function(e,t){var n;t&&(e.addRollback(),e.openNode("sheetPr"),n=!1,n=this.map.tabColor.render(e,t.tabColor)||n,n=this.map.pageSetUpPr.render(e,t.pageSetup)||n,(n=this.map.outlinePr.render(e,t.outlineProperties)||n)?(e.closeNode(),e.commit()):e.rollback())}},{key:"parseOpen",value:function(e){return this.parser?(this.parser.parseOpen(e),!0):e.name===this.tag?(this.reset(),!0):!!this.map[e.name]&&(this.parser=this.map[e.name],this.parser.parseOpen(e),!0)}},{key:"parseText",value:function(e){return!!this.parser&&(this.parser.parseText(e),!0)}},{key:"parseClose",value:function(e){return this.parser?(this.parser.parseClose(e)||(this.parser=void 0),!0):(this.map.tabColor.model||this.map.pageSetUpPr.model||this.map.outlinePr.model?(this.model={},this.map.tabColor.model&&(this.model.tabColor=this.map.tabColor.model),this.map.pageSetUpPr.model&&(this.model.pageSetup=this.map.pageSetUpPr.model),this.map.outlinePr.model&&(this.model.outlineProperties=this.map.outlinePr.model)):this.model=null,!1)}},{key:"tag",get:function(){return"sheetPr"}}]),l}();t.exports=e},{"../base-xform":31,"../style/color-xform":127,"./outline-properties-xform":100,"./page-setup-properties-xform":103}],111:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a=e("../../../utils/under-dash");function s(e,t){return e?t:void 0}function u(e,t){return e===t||void 0}e=function(e){var t=c;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(c);function c(){var e=this,t=c;if(e instanceof t)return n.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(c.prototype,[{key:"render",value:function(e,t){var n;t&&(n={sheet:s(t.sheet,"1"),selectLockedCells:!1===t.selectLockedCells?"1":void 0,selectUnlockedCells:!1===t.selectUnlockedCells?"1":void 0,formatCells:s(t.formatCells,"0"),formatColumns:s(t.formatColumns,"0"),formatRows:s(t.formatRows,"0"),insertColumns:s(t.insertColumns,"0"),insertRows:s(t.insertRows,"0"),insertHyperlinks:s(t.insertHyperlinks,"0"),deleteColumns:s(t.deleteColumns,"0"),deleteRows:s(t.deleteRows,"0"),sort:s(t.sort,"0"),autoFilter:s(t.autoFilter,"0"),pivotTables:s(t.pivotTables,"0")},t.sheet&&(n.algorithmName=t.algorithmName,n.hashValue=t.hashValue,n.saltValue=t.saltValue,n.spinCount=t.spinCount,n.objects=s(!1===t.objects,"1"),n.scenarios=s(!1===t.scenarios,"1")),a.some(n,(function(e){return void 0!==e}))&&e.leafNode(this.tag,n))}},{key:"parseOpen",value:function(e){return e.name===this.tag&&(this.model={sheet:u(e.attributes.sheet,"1"),objects:"1"!==e.attributes.objects&&void 0,scenarios:"1"!==e.attributes.scenarios&&void 0,selectLockedCells:"1"!==e.attributes.selectLockedCells&&void 0,selectUnlockedCells:"1"!==e.attributes.selectUnlockedCells&&void 0,formatCells:u(e.attributes.formatCells,"0"),formatColumns:u(e.attributes.formatColumns,"0"),formatRows:u(e.attributes.formatRows,"0"),insertColumns:u(e.attributes.insertColumns,"0"),insertRows:u(e.attributes.insertRows,"0"),insertHyperlinks:u(e.attributes.insertHyperlinks,"0"),deleteColumns:u(e.attributes.deleteColumns,"0"),deleteRows:u(e.attributes.deleteRows,"0"),sort:u(e.attributes.sort,"0"),autoFilter:u(e.attributes.autoFilter,"0"),pivotTables:u(e.attributes.pivotTables,"0")},e.attributes.algorithmName&&(this.model.algorithmName=e.attributes.algorithmName,this.model.hashValue=e.attributes.hashValue,this.model.saltValue=e.attributes.saltValue,this.model.spinCount=parseInt(e.attributes.spinCount,10)),!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"sheetProtection"}}]),c}(e("../base-xform")),t.exports=e},{"../../../utils/under-dash":25,"../base-xform":31}],112:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a=e("../../../utils/col-cache"),s=e("../base-xform"),u={frozen:"frozen",frozenSplit:"frozen",split:"split"};e=function(){var e=c,t=s;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(c);function c(){var e=this,t=c;if(e instanceof t)return n.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(c.prototype,[{key:"prepare",value:function(e){switch(e.state){case"frozen":case"split":break;default:e.state="normal"}}},{key:"render",value:function(e,t){function n(t,n,r){r&&e.addAttribute(t,n)}var r,i;switch(e.openNode("sheetView",{workbookViewId:t.workbookViewId||0}),n("rightToLeft","1",!0===t.rightToLeft),n("tabSelected","1",t.tabSelected),n("showRuler","0",!1===t.showRuler),n("showRowColHeaders","0",!1===t.showRowColHeaders),n("showGridLines","0",!1===t.showGridLines),n("zoomScale",t.zoomScale,t.zoomScale),n("zoomScaleNormal",t.zoomScaleNormal,t.zoomScaleNormal),n("view",t.style,t.style),t.state){case"frozen":i=t.xSplit||0,r=t.ySplit||0,r=t.topLeftCell||a.getAddress(r+1,i+1).address,i=(t.xSplit&&t.ySplit?"bottomRight":t.xSplit&&"topRight")||"bottomLeft",e.leafNode("pane",{xSplit:t.xSplit||void 0,ySplit:t.ySplit||void 0,topLeftCell:r,activePane:i,state:"frozen"}),e.leafNode("selection",{pane:i,activeCell:t.activeCell,sqref:t.activeCell});break;case"split":"topLeft"===t.activePane&&(t.activePane=void 0),e.leafNode("pane",{xSplit:t.xSplit||void 0,ySplit:t.ySplit||void 0,topLeftCell:t.topLeftCell,activePane:t.activePane}),e.leafNode("selection",{pane:t.activePane,activeCell:t.activeCell,sqref:t.activeCell});break;case"normal":t.activeCell&&e.leafNode("selection",{activeCell:t.activeCell,sqref:t.activeCell})}e.closeNode()}},{key:"parseOpen",value:function(e){switch(e.name){case"sheetView":return this.sheetView={workbookViewId:parseInt(e.attributes.workbookViewId,10),rightToLeft:"1"===e.attributes.rightToLeft,tabSelected:"1"===e.attributes.tabSelected,showRuler:!("0"===e.attributes.showRuler),showRowColHeaders:!("0"===e.attributes.showRowColHeaders),showGridLines:!("0"===e.attributes.showGridLines),zoomScale:parseInt(e.attributes.zoomScale||"100",10),zoomScaleNormal:parseInt(e.attributes.zoomScaleNormal||"100",10),style:e.attributes.view},this.pane=void 0,this.selections={},!0;case"pane":return this.pane={xSplit:parseInt(e.attributes.xSplit||"0",10),ySplit:parseInt(e.attributes.ySplit||"0",10),topLeftCell:e.attributes.topLeftCell,activePane:e.attributes.activePane||"topLeft",state:e.attributes.state},!0;case"selection":var t=e.attributes.pane||"topLeft";return this.selections[t]={pane:t,activeCell:e.attributes.activeCell},!0;default:return!1}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(e){var t,n;return"sheetView"!==e||(this.sheetView&&this.pane?(t=this.model={workbookViewId:this.sheetView.workbookViewId,rightToLeft:this.sheetView.rightToLeft,state:u[this.pane.state]||"split",xSplit:this.pane.xSplit,ySplit:this.pane.ySplit,topLeftCell:this.pane.topLeftCell,showRuler:this.sheetView.showRuler,showRowColHeaders:this.sheetView.showRowColHeaders,showGridLines:this.sheetView.showGridLines,zoomScale:this.sheetView.zoomScale,zoomScaleNormal:this.sheetView.zoomScaleNormal},"split"===this.model.state&&(t.activePane=this.pane.activePane),(n=this.selections[this.pane.activePane])&&n.activeCell&&(t.activeCell=n.activeCell)):(t=this.model={workbookViewId:this.sheetView.workbookViewId,rightToLeft:this.sheetView.rightToLeft,state:"normal",showRuler:this.sheetView.showRuler,showRowColHeaders:this.sheetView.showRowColHeaders,showGridLines:this.sheetView.showGridLines,zoomScale:this.sheetView.zoomScale,zoomScaleNormal:this.sheetView.zoomScaleNormal},(n=this.selections.topLeft)&&n.activeCell&&(t.activeCell=n.activeCell)),this.sheetView.style&&(t.style=this.sheetView.style),!1)}},{key:"reconcile",value:function(){}},{key:"tag",get:function(){return"sheetView"}}]),c}();t.exports=e},{"../../../utils/col-cache":19,"../base-xform":31}],113:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}e=function(e){var t=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(a);function a(){var e=this,t=a;if(e instanceof t)return n.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(a.prototype,[{key:"render",value:function(e,t){t&&e.leafNode(this.tag,{"r:id":t.rId})}},{key:"parseOpen",value:function(e){return e.name===this.tag&&(this.model={rId:e.attributes["r:id"]},!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"tablePart"}}]),a}(e("../base-xform")),t.exports=e},{"../base-xform":31}],114:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=a(e);n=t?(n=a(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}function a(e){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var s=e("../../../utils/under-dash"),u=e("../../../utils/col-cache"),c=e("../../../utils/xml-stream"),l=e("../../rel-type"),h=e("./merges"),f=e("../base-xform"),d=e("../list-xform"),p=e("./row-xform"),m=e("./col-xform"),g=e("./dimension-xform"),A=e("./hyperlink-xform"),v=e("./merge-cell-xform"),b=e("./data-validations-xform"),y=e("./sheet-properties-xform"),w=e("./sheet-format-properties-xform"),x=e("./sheet-view-xform"),C=e("./sheet-protection-xform"),k=e("./page-margins-xform"),E=e("./page-setup-xform"),S=e("./print-options-xform"),_=e("./auto-filter-xform"),O=e("./picture-xform"),T=e("./drawing-xform"),D=e("./table-part-xform"),B=e("./row-breaks-xform"),I=e("./header-footer-xform"),M=e("./cf/conditional-formattings-xform"),j=e("./ext-lst-xform");(e=function(){var e=r,t=f;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t);var n=o(r);function r(e){var t,i;if(this instanceof r)return t=n.call(this),i=(e=e||{}).maxRows,e=e.maxCols,t.map={sheetPr:new y,dimension:new g,sheetViews:new d({tag:"sheetViews",count:!1,childXform:new x}),sheetFormatPr:new w,cols:new d({tag:"cols",count:!1,childXform:new m}),sheetData:new d({tag:"sheetData",count:!1,empty:!0,childXform:new p({maxItems:e}),maxItems:i}),autoFilter:new _,mergeCells:new d({tag:"mergeCells",count:!0,childXform:new v}),rowBreaks:new B,hyperlinks:new d({tag:"hyperlinks",count:!1,childXform:new A}),pageMargins:new k,dataValidations:new b,pageSetup:new E,headerFooter:new I,printOptions:new S,picture:new O,drawing:new T,sheetProtection:new C,tableParts:new d({tag:"tableParts",count:!0,childXform:new D}),conditionalFormatting:new M,extLst:new j},t;throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(r.prototype,[{key:"prepare",value:function(e,t){var n,r=this,i=(t.merges=new h,e.hyperlinks=t.hyperlinks=[],e.comments=t.comments=[],t.formulae={},t.siFormulae=0,this.map.cols.prepare(e.cols,t),this.map.sheetData.prepare(e.rows,t),this.map.conditionalFormatting.prepare(e.conditionalFormattings,t),e.mergeCells=t.merges.mergeCells,e.rels=[]);function o(e){return"rId".concat(e.length+1)}e.hyperlinks.forEach((function(e){var t=o(i);e.rId=t,i.push({Id:t,Type:l.Hyperlink,Target:e.target,TargetMode:"External"})})),0<e.comments.length&&(n={Id:o(i),Type:l.Comments,Target:"../comments".concat(e.id,".xml")},i.push(n),n={Id:o(i),Type:l.VmlDrawing,Target:"../drawings/vmlDrawing".concat(e.id,".vml")},i.push(n),e.comments.forEach((function(e){e.refAddress=u.decodeAddress(e.ref)})),t.commentRefs.push({commentName:"comments".concat(e.id),vmlDrawing:"vmlDrawing".concat(e.id)}));var a,s=[];e.media.forEach((function(n){var u,c,h;"background"===n.type?(u=o(i),a=t.media[n.imageId],i.push({Id:u,Type:l.Image,Target:"../media/".concat(a.name,".").concat(a.extension)}),e.background={rId:u},e.image=t.media[n.imageId]):"image"===n.type&&(u=e.drawing,a=t.media[n.imageId],u||(u=e.drawing={rId:o(i),name:"drawing".concat(++t.drawingsCount),anchors:[],rels:[]},t.drawings.push(u),i.push({Id:u.rId,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/drawing",Target:"../drawings/".concat(u.name,".xml")})),(c=r.preImageId===n.imageId?s[n.imageId]:s[u.rels.length])||(c=o(u.rels),s[u.rels.length]=c,u.rels.push({Id:c,Type:"http://schemas.openxmlformats.org/officeDocument/2006/relationships/image",Target:"../media/".concat(a.name,".").concat(a.extension)})),c={picture:{rId:c},range:n.range},n.hyperlinks&&n.hyperlinks.hyperlink&&(h=o(u.rels),s[u.rels.length]=h,c.picture.hyperlinks={tooltip:n.hyperlinks.tooltip,rId:h},u.rels.push({Id:h,Type:l.Hyperlink,Target:n.hyperlinks.hyperlink,TargetMode:"External"})),r.preImageId=n.imageId,u.anchors.push(c))})),e.tables.forEach((function(e){var n=o(i);e.rId=n,i.push({Id:n,Type:l.Table,Target:"../tables/".concat(e.target)}),e.columns.forEach((function(e){var n=e.style;n&&(e.dxfId=t.styles.addDxfStyle(n))}))})),this.map.extLst.prepare(e,t)}},{key:"render",value:function(e,t){e.openXml(c.StdDocAttributes),e.openNode("worksheet",r.WORKSHEET_ATTRIBUTES);var n=t.properties?{defaultRowHeight:t.properties.defaultRowHeight,dyDescent:t.properties.dyDescent,outlineLevelCol:t.properties.outlineLevelCol,outlineLevelRow:t.properties.outlineLevelRow}:void 0,i=(t.properties&&t.properties.defaultColWidth&&(n.defaultColWidth=t.properties.defaultColWidth),{outlineProperties:t.properties&&t.properties.outlineProperties,tabColor:t.properties&&t.properties.tabColor,pageSetup:t.pageSetup&&t.pageSetup.fitToPage?{fitToPage:t.pageSetup.fitToPage}:void 0}),o=t.pageSetup&&t.pageSetup.margins,a={showRowColHeaders:t.pageSetup&&t.pageSetup.showRowColHeaders,showGridLines:t.pageSetup&&t.pageSetup.showGridLines,horizontalCentered:t.pageSetup&&t.pageSetup.horizontalCentered,verticalCentered:t.pageSetup&&t.pageSetup.verticalCentered},s=t.sheetProtection;this.map.sheetPr.render(e,i),this.map.dimension.render(e,t.dimensions),this.map.sheetViews.render(e,t.views),this.map.sheetFormatPr.render(e,n),this.map.cols.render(e,t.cols),this.map.sheetData.render(e,t.rows),this.map.sheetProtection.render(e,s),this.map.autoFilter.render(e,t.autoFilter),this.map.mergeCells.render(e,t.mergeCells),this.map.conditionalFormatting.render(e,t.conditionalFormattings),this.map.dataValidations.render(e,t.dataValidations),this.map.hyperlinks.render(e,t.hyperlinks),this.map.printOptions.render(e,a),this.map.pageMargins.render(e,o),this.map.pageSetup.render(e,t.pageSetup),this.map.headerFooter.render(e,t.headerFooter),this.map.rowBreaks.render(e,t.rowBreaks),this.map.drawing.render(e,t.drawing),this.map.picture.render(e,t.background),this.map.tableParts.render(e,t.tables),this.map.extLst.render(e,t),t.rels&&t.rels.forEach((function(t){t.Type===l.VmlDrawing&&e.leafNode("legacyDrawing",{"r:id":t.Id})})),e.closeNode()}},{key:"parseOpen",value:function(e){return this.parser?this.parser.parseOpen(e):"worksheet"===e.name?s.each(this.map,(function(e){e.reset()})):(this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e)),!0}},{key:"parseText",value:function(e){this.parser&&this.parser.parseText(e)}},{key:"parseClose",value:function(e){var t,n;return this.parser?(this.parser.parseClose(e)||(this.parser=void 0),!0):"worksheet"!==e||(e=this.map.sheetFormatPr.model||{},this.map.sheetPr.model&&this.map.sheetPr.model.tabColor&&(e.tabColor=this.map.sheetPr.model.tabColor),this.map.sheetPr.model&&this.map.sheetPr.model.outlineProperties&&(e.outlineProperties=this.map.sheetPr.model.outlineProperties),t={fitToPage:this.map.sheetPr.model&&this.map.sheetPr.model.pageSetup&&this.map.sheetPr.model.pageSetup.fitToPage||!1,margins:this.map.pageMargins.model},t=Object.assign(t,this.map.pageSetup.model,this.map.printOptions.model),n=function(e,t){var n,r;return t&&t.length?e&&e.length?(n={},r={},e.forEach((function(e){(n[e.ref]=e).rules.forEach((function(e){var t=e.x14Id;t&&(r[t]=e)}))})),t.forEach((function(t){t.rules.forEach((function(i){var o,a,s=r[i.x14Id];s?(o=s,a=i,Object.keys(a).forEach((function(e){var t=o[e],n=a[e];void 0===t&&void 0!==n&&(o[e]=n)}))):n[t.ref]?n[t.ref].rules.push(i):e.push({ref:t.ref,rules:[i]})}))})),e):t:e}(this.map.conditionalFormatting.model,this.map.extLst.model&&this.map.extLst.model["x14:conditionalFormattings"]),this.model={dimensions:this.map.dimension.model,cols:this.map.cols.model,rows:this.map.sheetData.model,mergeCells:this.map.mergeCells.model,hyperlinks:this.map.hyperlinks.model,dataValidations:this.map.dataValidations.model,properties:e,views:this.map.sheetViews.model,pageSetup:t,headerFooter:this.map.headerFooter.model,background:this.map.picture.model,drawing:this.map.drawing.model,tables:this.map.tableParts.model,conditionalFormattings:n},this.map.autoFilter.model&&(this.model.autoFilter=this.map.autoFilter.model),this.map.sheetProtection.model&&(this.model.sheetProtection=this.map.sheetProtection.model),!1)}},{key:"reconcile",value:function(e,t){var n=(e.relationships||[]).reduce((function(n,r){var i;return(n[r.Id]=r).Type===l.Comments&&(e.comments=t.comments[r.Target].comments),r.Type===l.VmlDrawing&&e.comments&&e.comments.length&&(i=t.vmlDrawings[r.Target].comments,e.comments.forEach((function(e,t){e.note=Object.assign({},e.note,i[t])}))),n}),{}),r=(t.commentsMap=(e.comments||[]).reduce((function(e,t){return t.ref&&(e[t.ref]=t),e}),{}),t.hyperlinkMap=(e.hyperlinks||[]).reduce((function(e,t){return t.rId&&(e[t.address]=n[t.rId].Target),e}),{}),t.formulae={},e.rows=e.rows&&e.rows.filter(Boolean)||[],e.rows.forEach((function(e){e.cells=e.cells&&e.cells.filter(Boolean)||[]})),this.map.cols.reconcile(e.cols,t),this.map.sheetData.reconcile(e.rows,t),this.map.conditionalFormatting.reconcile(e.conditionalFormattings,t),e.media=[],e.drawing&&(r=n[e.drawing.rId].Target.match(/\/drawings\/([a-zA-Z0-9]+)[.][a-zA-Z]{3,4}$/))&&(r=r[1],t.drawings[r].anchors.forEach((function(t){t.medium&&(t={type:"image",imageId:t.medium.index,range:t.range,hyperlinks:t.picture.hyperlinks},e.media.push(t))}))),e.background&&n[e.background.rId]);r&&(r=r.Target.split("/media/")[1],void 0!==(r=t.mediaIndex&&t.mediaIndex[r])&&e.media.push({type:"background",imageId:r})),e.tables=(e.tables||[]).map((function(e){return e=n[e.rId],t.tables[e.Target]})),delete e.relationships,delete e.hyperlinks,delete e.comments}}]),r}()).WORKSHEET_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:r":"http://schemas.openxmlformats.org/officeDocument/2006/relationships","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"x14ac","xmlns:x14ac":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac"},t.exports=e},{"../../../utils/col-cache":19,"../../../utils/under-dash":25,"../../../utils/xml-stream":27,"../../rel-type":30,"../base-xform":31,"../list-xform":70,"./auto-filter-xform":71,"./cf/conditional-formattings-xform":86,"./col-xform":91,"./data-validations-xform":92,"./dimension-xform":93,"./drawing-xform":94,"./ext-lst-xform":95,"./header-footer-xform":96,"./hyperlink-xform":97,"./merge-cell-xform":98,"./merges":99,"./page-margins-xform":102,"./page-setup-xform":104,"./picture-xform":105,"./print-options-xform":106,"./row-breaks-xform":107,"./row-xform":108,"./sheet-format-properties-xform":109,"./sheet-properties-xform":110,"./sheet-protection-xform":111,"./sheet-view-xform":112,"./table-part-xform":113}],115:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}e=function(e){var t=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(a);function a(e){var t;if(this instanceof a)return(t=n.call(this)).tag=e.tag,t.attr=e.attr,t;throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(a.prototype,[{key:"render",value:function(e,t){t&&(e.openNode(this.tag),e.closeNode())}},{key:"parseOpen",value:function(e){e.name===this.tag&&(this.model=!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}}]),a}(e("../base-xform")),t.exports=e},{"../base-xform":31}],116:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}e=function(e){var t=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(a);function a(e){var t;if(this instanceof a)return(t=n.call(this)).tag=e.tag,t.attr=e.attr,t.attrs=e.attrs,t._format=e.format||function(e){try{return Number.isNaN(e.getTime())?"":e.toISOString()}catch(e){return""}},t._parse=e.parse||function(e){return new Date(e)},t;throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(a.prototype,[{key:"render",value:function(e,t){t&&(e.openNode(this.tag),this.attrs&&e.addAttributes(this.attrs),this.attr?e.addAttribute(this.attr,this._format(t)):e.writeText(this._format(t)),e.closeNode())}},{key:"parseOpen",value:function(e){e.name===this.tag&&(this.attr?this.model=this._parse(e.attributes[this.attr]):this.text=[])}},{key:"parseText",value:function(e){this.attr||this.text.push(e)}},{key:"parseClose",value:function(){return this.attr||(this.model=this._parse(this.text.join(""))),!1}}]),a}(e("../base-xform")),t.exports=e},{"../base-xform":31}],117:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}e=function(e){var t=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(a);function a(e){var t;if(this instanceof a)return(t=n.call(this)).tag=e.tag,t.attr=e.attr,t.attrs=e.attrs,t.zero=e.zero,t;throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(a.prototype,[{key:"render",value:function(e,t){(t||this.zero)&&(e.openNode(this.tag),this.attrs&&e.addAttributes(this.attrs),this.attr?e.addAttribute(this.attr,t):e.writeText(t),e.closeNode())}},{key:"parseOpen",value:function(e){return e.name===this.tag&&(this.attr?this.model=parseInt(e.attributes[this.attr],10):this.text=[],!0)}},{key:"parseText",value:function(e){this.attr||this.text.push(e)}},{key:"parseClose",value:function(){return this.attr||(this.model=parseInt(this.text.join("")||0,10)),!1}}]),a}(e("../base-xform")),t.exports=e},{"../base-xform":31}],118:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}e=function(e){var t=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(a);function a(e){var t;if(this instanceof a)return(t=n.call(this)).tag=e.tag,t.attr=e.attr,t.attrs=e.attrs,t;throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(a.prototype,[{key:"render",value:function(e,t){void 0!==t&&(e.openNode(this.tag),this.attrs&&e.addAttributes(this.attrs),this.attr?e.addAttribute(this.attr,t):e.writeText(t),e.closeNode())}},{key:"parseOpen",value:function(e){e.name===this.tag&&(this.attr?this.model=e.attributes[this.attr]:this.text=[])}},{key:"parseText",value:function(e){this.attr||this.text.push(e)}},{key:"parseClose",value:function(){return this.attr||(this.model=this.text.join("")),!1}}]),a}(e("../base-xform")),t.exports=e},{"../base-xform":31}],119:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a=e("./base-xform"),s=e("../../utils/xml-stream");e=function(){var e=u,t=a;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(u);function u(e){var t;if(this instanceof u)return(t=n.call(this))._model=e,t;throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(u.prototype,[{key:"render",value:function(e){var t;this._xml||(function e(t,n){t.openNode(n.tag,n.$),n.c&&n.c.forEach((function(n){e(t,n)})),n.t&&t.writeText(n.t),t.closeNode()}(t=new s,this._model),this._xml=t.xml),e.writeXml(this._xml)}},{key:"parseOpen",value:function(){return!0}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(e){return e!==this._model.tag}}]),u}();t.exports=e},{"../../utils/xml-stream":27,"./base-xform":31}],120:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a=e("./text-xform"),s=e("./rich-text-xform");e=function(e){var t=u;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(u);function u(){var e;if(this instanceof u)return(e=n.call(this)).map={r:new s,t:new a},e;throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(u.prototype,[{key:"render",value:function(e,t){var n;e.openNode(this.tag,{sb:t.sb||0,eb:t.eb||0}),t&&t.hasOwnProperty("richText")&&t.richText?(n=this.map.r,t.richText.forEach((function(t){n.render(e,t)}))):t&&this.map.t.render(e,t.text),e.closeNode()}},{key:"parseOpen",value:function(e){var t=e.name;return this.parser?(this.parser.parseOpen(e),!0):t===this.tag?(this.model={sb:parseInt(e.attributes.sb,10),eb:parseInt(e.attributes.eb,10)},!0):(this.parser=this.map[t],!!this.parser&&(this.parser.parseOpen(e),!0))}},{key:"parseText",value:function(e){this.parser&&this.parser.parseText(e)}},{key:"parseClose",value:function(e){if(this.parser){if(!this.parser.parseClose(e)){switch(e){case"r":(this.model.richText||(this.model.richText=[])).push(this.parser.model);break;case"t":this.model.text=this.parser.model}this.parser=void 0}return!0}return e!==this.tag}},{key:"tag",get:function(){return"rPh"}}]),u}(e("../base-xform"));t.exports=e},{"../base-xform":31,"./rich-text-xform":121,"./text-xform":124}],121:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a=e("./text-xform"),s=e("../style/font-xform");(e=function(e){var t=u;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(u);function u(e){var t;if(this instanceof u)return(t=n.call(this)).model=e,t;throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(u.prototype,[{key:"render",value:function(e,t){t=t||this.model,e.openNode("r"),t.font&&this.fontXform.render(e,t.font),this.textXform.render(e,t.text),e.closeNode()}},{key:"parseOpen",value:function(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case"r":return this.model={},!0;case"t":return this.parser=this.textXform,this.parser.parseOpen(e),!0;case"rPr":return this.parser=this.fontXform,this.parser.parseOpen(e),!0;default:return!1}}},{key:"parseText",value:function(e){this.parser&&this.parser.parseText(e)}},{key:"parseClose",value:function(e){switch(e){case"r":return!1;case"t":return this.model.text=this.parser.model,!(this.parser=void 0);case"rPr":return this.model.font=this.parser.model,!(this.parser=void 0);default:return this.parser&&this.parser.parseClose(e),!0}}},{key:"tag",get:function(){return"r"}},{key:"textXform",get:function(){return this._textXform||(this._textXform=new a)}},{key:"fontXform",get:function(){return this._fontXform||(this._fontXform=new s(u.FONT_OPTIONS))}}]),u}(e("../base-xform"))).FONT_OPTIONS={tagName:"rPr",fontNameTag:"rFont"},t.exports=e},{"../base-xform":31,"../style/font-xform":130,"./text-xform":124}],122:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a=e("./text-xform"),s=e("./rich-text-xform"),u=e("./phonetic-text-xform");e=function(e){var t=c;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(c);function c(e){var t;if(this instanceof c)return(t=n.call(this)).model=e,t.map={r:new s,t:new a,rPh:new u},t;throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(c.prototype,[{key:"render",value:function(e,t){var n=this;e.openNode(this.tag),t&&t.hasOwnProperty("richText")&&t.richText?t.richText.length?t.richText.forEach((function(t){n.map.r.render(e,t)})):this.map.t.render(e,""):null!=t&&this.map.t.render(e,t),e.closeNode()}},{key:"parseOpen",value:function(e){var t=e.name;return this.parser?(this.parser.parseOpen(e),!0):t===this.tag?(this.model={},!0):(this.parser=this.map[t],!!this.parser&&(this.parser.parseOpen(e),!0))}},{key:"parseText",value:function(e){this.parser&&this.parser.parseText(e)}},{key:"parseClose",value:function(e){if(this.parser){if(!this.parser.parseClose(e)){switch(e){case"r":(this.model.richText||(this.model.richText=[])).push(this.parser.model);break;case"t":this.model=this.parser.model}this.parser=void 0}return!0}return e!==this.tag}},{key:"tag",get:function(){return"si"}}]),c}(e("../base-xform"));t.exports=e},{"../base-xform":31,"./phonetic-text-xform":120,"./rich-text-xform":121,"./text-xform":124}],123:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a=e("../../../utils/xml-stream"),s=e("../base-xform"),u=e("./shared-string-xform");e=function(){var e=c,t=s;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(c);function c(e){var t;if(this instanceof c)return(t=n.call(this)).model=e||{values:[],count:0},t.hash=Object.create(null),t.rich=Object.create(null),t;throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(c.prototype,[{key:"getString",value:function(e){return this.model.values[e]}},{key:"add",value:function(e){return e.richText?this.addRichText(e):this.addText(e)}},{key:"addText",value:function(e){var t=this.hash[e];return void 0===t&&(t=this.hash[e]=this.model.values.length,this.model.values.push(e)),this.model.count++,t}},{key:"addRichText",value:function(e){var t=this.sharedStringXform.toXml(e),n=this.rich[t];return void 0===n&&(n=this.rich[t]=this.model.values.length,this.model.values.push(e)),this.model.count++,n}},{key:"render",value:function(e,t){t=t||this._values,e.openXml(a.StdDocAttributes),e.openNode("sst",{xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main",count:t.count,uniqueCount:t.values.length});var n=this.sharedStringXform;t.values.forEach((function(t){n.render(e,t)})),e.closeNode()}},{key:"parseOpen",value:function(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case"sst":return!0;case"si":return this.parser=this.sharedStringXform,this.parser.parseOpen(e),!0;default:throw new Error("Unexpected xml node in parseOpen: ".concat(JSON.stringify(e)))}}},{key:"parseText",value:function(e){this.parser&&this.parser.parseText(e)}},{key:"parseClose",value:function(e){if(this.parser)return this.parser.parseClose(e)||(this.model.values.push(this.parser.model),this.model.count++,this.parser=void 0),!0;if("sst"!==e)throw new Error("Unexpected xml node in parseClose: ".concat(e));return!1}},{key:"sharedStringXform",get:function(){return this._sharedStringXform||(this._sharedStringXform=new u)}},{key:"values",get:function(){return this.model.values}},{key:"uniqueCount",get:function(){return this.model.values.length}},{key:"count",get:function(){return this.model.count}}]),c}();t.exports=e},{"../../../utils/xml-stream":27,"../base-xform":31,"./shared-string-xform":122}],124:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}e=function(e){var t=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(a);function a(){var e=this,t=a;if(e instanceof t)return n.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(a.prototype,[{key:"render",value:function(e,t){e.openNode("t"),/^\s|\n|\s$/.test(t)&&e.addAttribute("xml:space","preserve"),e.writeText(t),e.closeNode()}},{key:"parseOpen",value:function(e){return"t"===e.name&&(this._text=[],!0)}},{key:"parseText",value:function(e){this._text.push(e)}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"t"}},{key:"model",get:function(){return this._text.join("").replace(/_x([0-9A-F]{4})_/g,(function(e,t){return String.fromCharCode(parseInt(t,16))}))}}]),a}(e("../base-xform")),t.exports=e},{"../base-xform":31}],125:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a=e("../../../doc/enums"),s=e("../../../utils/utils"),u=e("../base-xform"),c={horizontalValues:["left","center","right","fill","centerContinuous","distributed","justify"].reduce((function(e,t){return e[t]=!0,e}),{}),horizontal:function(e){return this.horizontalValues[e]?e:void 0},verticalValues:["top","middle","bottom","distributed","justify"].reduce((function(e,t){return e[t]=!0,e}),{}),vertical:function(e){return"middle"===e?"center":this.verticalValues[e]?e:void 0},wrapText:function(e){return!!e||void 0},shrinkToFit:function(e){return!!e||void 0},textRotation:function(e){return"vertical"===e||-90<=(e=s.validInt(e))&&e<=90?e:void 0},indent:function(e){return e=s.validInt(e),Math.max(0,e)},readingOrder:function(e){switch(e){case"ltr":return a.ReadingOrder.LeftToRight;case"rtl":return a.ReadingOrder.RightToLeft;default:return}}};e=function(){var e=a,t=u;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(a);function a(){var e=this,t=a;if(e instanceof t)return n.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(a.prototype,[{key:"render",value:function(e,t){e.addRollback(),e.openNode("alignment");var n=!1;function r(t,r){r&&(e.addAttribute(t,r),n=!0)}r("horizontal",c.horizontal(t.horizontal)),r("vertical",c.vertical(t.vertical)),r("wrapText",!!c.wrapText(t.wrapText)&&"1"),r("shrinkToFit",!!c.shrinkToFit(t.shrinkToFit)&&"1"),r("indent",c.indent(t.indent)),r("textRotation",function(e){if(e=c.textRotation(e))return"vertical"===e?255:0<=(e=Math.round(e))&&e<=90?e:e<0&&-90<=e?90-e:void 0}(t.textRotation)),r("readingOrder",c.readingOrder(t.readingOrder)),e.closeNode(),n?e.commit():e.rollback()}},{key:"parseOpen",value:function(e){var t={},n=!1;function r(e,r,i){e&&(t[r]=i,n=!0)}r(e.attributes.horizontal,"horizontal",e.attributes.horizontal),r(e.attributes.vertical,"vertical","center"===e.attributes.vertical?"middle":e.attributes.vertical),r(e.attributes.wrapText,"wrapText",!!e.attributes.wrapText),r(e.attributes.shrinkToFit,"shrinkToFit",!!e.attributes.shrinkToFit),r(e.attributes.indent,"indent",parseInt(e.attributes.indent,10)),r(e.attributes.textRotation,"textRotation",function(e){if(void 0!==(e=s.validInt(e)))return 255===e?"vertical":0<=e&&e<=90?e:90<e&&e<=180?90-e:void 0}(e.attributes.textRotation)),r(e.attributes.readingOrder,"readingOrder","2"===e.attributes.readingOrder?"rtl":"ltr"),this.model=n?t:null}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"alignment"}}]),a}();t.exports=e},{"../../../doc/enums":7,"../../../utils/utils":26,"../base-xform":31}],126:[function(e,t,n){"use strict";function r(e,t){var n,r=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)),r}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){var r,i;r=e,i=n[t=t],t in r?Object.defineProperty(r,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[t]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function u(e,t,n){t&&s(e.prototype,t),n&&s(e,n)}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&function(e,t){(Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}(e,t)}function l(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=h(e);n=t?(n=h(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(!n||"object"!==o(n)&&"function"!=typeof n){if(void 0===r)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}return n}}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var f,d=e("../base-xform"),p=e("./color-xform"),m=(c(g,d),f=l(g),u(g,[{key:"render",value:function(e,t,n){n=t&&t.color||n||this.defaultColor,e.openNode(this.name),t&&t.style&&(e.addAttribute("style",t.style),n&&this.map.color.render(e,n)),e.closeNode()}},{key:"parseOpen",value:function(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case this.name:var t=e.attributes.style;return this.model=t?{style:t}:void 0,!0;case"color":return this.parser=this.map.color,this.parser.parseOpen(e),!0;default:return!1}}},{key:"parseText",value:function(e){this.parser&&this.parser.parseText(e)}},{key:"parseClose",value:function(e){return this.parser?(this.parser.parseClose(e)||(this.parser=void 0),!0):(e===this.name&&this.map.color.model&&(this.model||(this.model={}),this.model.color=this.map.color.model),!1)}},{key:"validStyle",value:function(e){return g.validStyleValues[e]}},{key:"tag",get:function(){return this.name}}]),g);function g(e){var t;return a(this,g),(t=f.call(this)).name=e,t.map={color:new p},t}m.validStyleValues=["thin","dotted","dashDot","hair","dashDotDot","slantDashDot","mediumDashed","mediumDashDotDot","mediumDashDot","medium","double","thick"].reduce((function(e,t){return e[t]=!0,e}),{}),c(v,d),A=l(v),u(v,[{key:"render",value:function(e,t){var n=t.color;function r(r,o){r&&!r.color&&t.color&&(r=i(i({},r),{},{color:t.color})),o.render(e,r,n)}e.openNode("border"),t.diagonal&&t.diagonal.style&&(t.diagonal.up&&e.addAttribute("diagonalUp","1"),t.diagonal.down&&e.addAttribute("diagonalDown","1")),r(t.left,this.map.left),r(t.right,this.map.right),r(t.top,this.map.top),r(t.bottom,this.map.bottom),r(t.diagonal,this.map.diagonal),e.closeNode()}},{key:"parseOpen",value:function(e){return this.parser?(this.parser.parseOpen(e),!0):"border"!==e.name?(this.parser=this.map[e.name],!!this.parser&&(this.parser.parseOpen(e),!0)):(this.reset(),this.diagonalUp=!!e.attributes.diagonalUp,this.diagonalDown=!!e.attributes.diagonalDown,!0)}},{key:"parseText",value:function(e){this.parser&&this.parser.parseText(e)}},{key:"parseClose",value:function(e){var t;return this.parser?(this.parser.parseClose(e)||(this.parser=void 0),!0):("border"===e&&(t=this.model={},(e=function(e,n,r){n&&(r&&Object.assign(n,r),t[e]=n)})("left",this.map.left.model),e("right",this.map.right.model),e("top",this.map.top.model),e("bottom",this.map.bottom.model),e("diagonal",this.map.diagonal.model,{up:this.diagonalUp,down:this.diagonalDown})),!1)}}]);var A;e=v;function v(){var e;return a(this,v),(e=A.call(this)).map={top:new m("top"),left:new m("left"),bottom:new m("bottom"),right:new m("right"),diagonal:new m("diagonal")},e}t.exports=e},{"../base-xform":31,"./color-xform":127}],127:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}e=function(e){var t=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(a);function a(e){var t;if(this instanceof a)return(t=n.call(this)).name=e||"color",t;throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(a.prototype,[{key:"render",value:function(e,t){return!!t&&(e.openNode(this.name),t.argb?e.addAttribute("rgb",t.argb):void 0!==t.theme?(e.addAttribute("theme",t.theme),void 0!==t.tint&&e.addAttribute("tint",t.tint)):void 0!==t.indexed?e.addAttribute("indexed",t.indexed):e.addAttribute("auto","1"),e.closeNode(),!0)}},{key:"parseOpen",value:function(e){return e.name===this.name&&(e.attributes.rgb?this.model={argb:e.attributes.rgb}:e.attributes.theme?(this.model={theme:parseInt(e.attributes.theme,10)},e.attributes.tint&&(this.model.tint=parseFloat(e.attributes.tint))):e.attributes.indexed?this.model={indexed:parseInt(e.attributes.indexed,10)}:this.model=void 0,!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return this.name}}]),a}(e("../base-xform")),t.exports=e},{"../base-xform":31}],128:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a=e("../base-xform"),s=e("./alignment-xform"),u=e("./border-xform"),c=e("./fill-xform"),l=e("./font-xform"),h=e("./numfmt-xform"),f=e("./protection-xform");e=function(){var e=d,t=a;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(d);function d(){var e;if(this instanceof d)return(e=n.call(this)).map={alignment:new s,border:new u,fill:new c,font:new l,numFmt:new h,protection:new f},e;throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(d.prototype,[{key:"render",value:function(e,t){e.openNode(this.tag),t.font&&this.map.font.render(e,t.font),t.numFmt&&this.map.numFmt.render(e,t.numFmt),t.fill&&this.map.fill.render(e,t.fill),t.alignment&&this.map.alignment.render(e,t.alignment),t.border&&this.map.border.render(e,t.border),t.protection&&this.map.protection.render(e,t.protection),e.closeNode()}},{key:"parseOpen",value:function(e){return this.parser?this.parser.parseOpen(e):e.name===this.tag?this.reset():(this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e)),!0}},{key:"parseText",value:function(e){this.parser&&this.parser.parseText(e)}},{key:"parseClose",value:function(e){return this.parser?(this.parser.parseClose(e)||(this.parser=void 0),!0):e!==this.tag||!(this.model={alignment:this.map.alignment.model,border:this.map.border.model,fill:this.map.fill.model,font:this.map.font.model,numFmt:this.map.numFmt.model,protection:this.map.protection.model})}},{key:"tag",get:function(){return"dxf"}}]),d}();t.exports=e},{"../base-xform":31,"./alignment-xform":125,"./border-xform":126,"./fill-xform":129,"./font-xform":130,"./numfmt-xform":131,"./protection-xform":132}],129:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t,n){t&&o(e.prototype,t),n&&o(e,n)}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&function(e,t){(Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=c(e);n=t?(n=c(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var l,h,f,d,p=e("../base-xform"),m=e("./color-xform"),g=(s(x,p),d=u(x),a(x,[{key:"render",value:function(e,t){e.openNode("stop"),e.addAttribute("position",t.position),this.map.color.render(e,t.color),e.closeNode()}},{key:"parseOpen",value:function(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case"stop":return this.model={position:parseFloat(e.attributes.position)},!0;case"color":return this.parser=this.map.color,this.parser.parseOpen(e),!0;default:return!1}}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(e){return!!this.parser&&(this.parser.parseClose(e)||(this.model.color=this.parser.model,this.parser=void 0),!0)}},{key:"tag",get:function(){return"stop"}}]),x),A=(s(w,p),f=u(w),a(w,[{key:"render",value:function(e,t){e.openNode("patternFill"),e.addAttribute("patternType",t.pattern),t.fgColor&&this.map.fgColor.render(e,t.fgColor),t.bgColor&&this.map.bgColor.render(e,t.bgColor),e.closeNode()}},{key:"parseOpen",value:function(e){return this.parser?(this.parser.parseOpen(e),!0):"patternFill"!==e.name?(this.parser=this.map[e.name],!!this.parser&&(this.parser.parseOpen(e),!0)):(this.model={type:"pattern",pattern:e.attributes.patternType},!0)}},{key:"parseText",value:function(e){this.parser&&this.parser.parseText(e)}},{key:"parseClose",value:function(e){return!!this.parser&&(this.parser.parseClose(e)||(this.parser.model&&(this.model[e]=this.parser.model),this.parser=void 0),!0)}},{key:"name",get:function(){return"pattern"}},{key:"tag",get:function(){return"patternFill"}}]),w),v=(s(y,p),h=u(y),a(y,[{key:"render",value:function(e,t){switch(e.openNode("gradientFill"),t.gradient){case"angle":e.addAttribute("degree",t.degree);break;case"path":e.addAttribute("type","path"),t.center.left&&(e.addAttribute("left",t.center.left),void 0===t.center.right&&e.addAttribute("right",t.center.left)),t.center.right&&e.addAttribute("right",t.center.right),t.center.top&&(e.addAttribute("top",t.center.top),void 0===t.center.bottom&&e.addAttribute("bottom",t.center.top)),t.center.bottom&&e.addAttribute("bottom",t.center.bottom)}var n=this.map.stop;t.stops.forEach((function(t){n.render(e,t)})),e.closeNode()}},{key:"parseOpen",value:function(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case"gradientFill":var t=this.model={stops:[]};return e.attributes.degree?(t.gradient="angle",t.degree=parseInt(e.attributes.degree,10)):"path"===e.attributes.type&&(t.gradient="path",t.center={left:e.attributes.left?parseFloat(e.attributes.left):0,top:e.attributes.top?parseFloat(e.attributes.top):0},e.attributes.right!==e.attributes.left&&(t.center.right=e.attributes.right?parseFloat(e.attributes.right):0),e.attributes.bottom!==e.attributes.top&&(t.center.bottom=e.attributes.bottom?parseFloat(e.attributes.bottom):0)),!0;case"stop":return this.parser=this.map.stop,this.parser.parseOpen(e),!0;default:return!1}}},{key:"parseText",value:function(e){this.parser&&this.parser.parseText(e)}},{key:"parseClose",value:function(e){return!!this.parser&&(this.parser.parseClose(e)||(this.model.stops.push(this.parser.model),this.parser=void 0),!0)}},{key:"name",get:function(){return"gradient"}},{key:"tag",get:function(){return"gradientFill"}}]),y);function b(){var e;return i(this,b),(e=l.call(this)).map={patternFill:new A,gradientFill:new v},e}function y(){var e;return i(this,y),(e=h.call(this)).map={stop:new g},e}function w(){var e;return i(this,w),(e=f.call(this)).map={fgColor:new m("fgColor"),bgColor:new m("bgColor")},e}function x(){var e;return i(this,x),(e=d.call(this)).map={color:new m},e}(e=(s(b,p),l=u(b),a(b,[{key:"render",value:function(e,t){switch(e.addRollback(),e.openNode("fill"),t.type){case"pattern":this.map.patternFill.render(e,t);break;case"gradient":this.map.gradientFill.render(e,t);break;default:return void e.rollback()}e.closeNode(),e.commit()}},{key:"parseOpen",value:function(e){return this.parser?(this.parser.parseOpen(e),!0):"fill"!==e.name?(this.parser=this.map[e.name],!!this.parser&&(this.parser.parseOpen(e),!0)):(this.model={},!0)}},{key:"parseText",value:function(e){this.parser&&this.parser.parseText(e)}},{key:"parseClose",value:function(e){return!!this.parser&&(this.parser.parseClose(e)||(this.model=this.parser.model,this.model.type=this.parser.name,this.parser=void 0),!0)}},{key:"validStyle",value:function(e){return b.validPatternValues[e]}},{key:"tag",get:function(){return"fill"}}]),b)).validPatternValues=["none","solid","darkVertical","darkGray","mediumGray","lightGray","gray125","gray0625","darkHorizontal","darkVertical","darkDown","darkUp","darkGrid","darkTrellis","lightHorizontal","lightVertical","lightDown","lightUp","lightGrid","lightTrellis","lightGrid"].reduce((function(e,t){return e[t]=!0,e}),{}),e.StopXform=g,e.PatternFillXform=A,e.GradientFillXform=v,t.exports=e},{"../base-xform":31,"./color-xform":127}],130:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a=e("./color-xform"),s=e("../simple/boolean-xform"),u=e("../simple/integer-xform"),c=e("../simple/string-xform"),l=e("./underline-xform"),h=e("../../../utils/under-dash");(e=function(e){var t=f;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(f);function f(e){var t;if(this instanceof f)return(t=n.call(this)).options=e||f.OPTIONS,t.map={b:{prop:"bold",xform:new s({tag:"b",attr:"val"})},i:{prop:"italic",xform:new s({tag:"i",attr:"val"})},u:{prop:"underline",xform:new l},charset:{prop:"charset",xform:new u({tag:"charset",attr:"val"})},color:{prop:"color",xform:new a},condense:{prop:"condense",xform:new s({tag:"condense",attr:"val"})},extend:{prop:"extend",xform:new s({tag:"extend",attr:"val"})},family:{prop:"family",xform:new u({tag:"family",attr:"val"})},outline:{prop:"outline",xform:new s({tag:"outline",attr:"val"})},vertAlign:{prop:"vertAlign",xform:new c({tag:"vertAlign",attr:"val"})},scheme:{prop:"scheme",xform:new c({tag:"scheme",attr:"val"})},shadow:{prop:"shadow",xform:new s({tag:"shadow",attr:"val"})},strike:{prop:"strike",xform:new s({tag:"strike",attr:"val"})},sz:{prop:"size",xform:new u({tag:"sz",attr:"val"})}},t.map[t.options.fontNameTag]={prop:"name",xform:new c({tag:t.options.fontNameTag,attr:"val"})},t;throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(f.prototype,[{key:"render",value:function(e,t){var n=this.map;e.openNode(this.options.tagName),h.each(this.map,(function(r,i){n[i].xform.render(e,t[r.prop])})),e.closeNode()}},{key:"parseOpen",value:function(e){return this.parser?(this.parser.parseOpen(e),!0):this.map[e.name]?(this.parser=this.map[e.name].xform,this.parser.parseOpen(e)):e.name===this.options.tagName&&(this.model={},!0)}},{key:"parseText",value:function(e){this.parser&&this.parser.parseText(e)}},{key:"parseClose",value:function(e){var t;return this.parser&&!this.parser.parseClose(e)?(t=this.map[e],this.parser.model&&(this.model[t.prop]=this.parser.model),!(this.parser=void 0)):e!==this.options.tagName}},{key:"tag",get:function(){return this.options.tagName}}]),f}(e("../base-xform"))).OPTIONS={tagName:"font",fontNameTag:"name"},t.exports=e},{"../../../utils/under-dash":25,"../base-xform":31,"../simple/boolean-xform":115,"../simple/integer-xform":117,"../simple/string-xform":118,"./color-xform":127,"./underline-xform":135}],131:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=a(e);n=t?(n=a(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}function a(e){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var s,u=e("../../../utils/under-dash"),c=e("../../defaultnumformats"),l=e("../base-xform"),h=(s={},u.each(c,(function(e,t){e.f&&(s[e.f]=parseInt(t,10))})),s);(e=function(){var e=r,t=l;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t);var n=o(r);function r(e,t){var i;if(this instanceof r)return(i=n.call(this)).id=e,i.formatCode=t,i;throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(r.prototype,[{key:"render",value:function(e,t){e.leafNode("numFmt",{numFmtId:t.id,formatCode:t.formatCode})}},{key:"parseOpen",value:function(e){return"numFmt"===e.name&&(this.model={id:parseInt(e.attributes.numFmtId,10),formatCode:e.attributes.formatCode.replace(/[\\](.)/g,"$1")},!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"numFmt"}}]),r}()).getDefaultFmtId=function(e){return h[e]},e.getDefaultFmtCode=function(e){return c[e]&&c[e].f},t.exports=e},{"../../../utils/under-dash":25,"../../defaultnumformats":29,"../base-xform":31}],132:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function a(e,t){return void 0===e?t:e}var s=e("../base-xform");e=function(){var e=u,t=s;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(u);function u(){var e=this,t=u;if(e instanceof t)return n.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(u.prototype,[{key:"render",value:function(e,t){e.addRollback(),e.openNode("protection");var n=!1;function r(t,r){void 0!==r&&(e.addAttribute(t,r),n=!0)}r("locked",a(t.locked,!0)?void 0:"0"),r("hidden",a(t.hidden,!1)?"1":void 0),e.closeNode(),n?e.commit():e.rollback()}},{key:"parseOpen",value:function(e){e={locked:!("0"===e.attributes.locked),hidden:"1"===e.attributes.hidden},this.model=!e.locked||e.hidden?e:null}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"protection"}}]),u}();t.exports=e},{"../base-xform":31}],133:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a=e("../base-xform"),s=e("./alignment-xform"),u=e("./protection-xform");e=function(){var e=c,t=a;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(c);function c(e){var t;if(this instanceof c)return(t=n.call(this)).xfId=!(!e||!e.xfId),t.map={alignment:new s,protection:new u},t;throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(c.prototype,[{key:"render",value:function(e,t){e.openNode("xf",{numFmtId:t.numFmtId||0,fontId:t.fontId||0,fillId:t.fillId||0,borderId:t.borderId||0}),this.xfId&&e.addAttribute("xfId",t.xfId||0),t.numFmtId&&e.addAttribute("applyNumberFormat","1"),t.fontId&&e.addAttribute("applyFont","1"),t.fillId&&e.addAttribute("applyFill","1"),t.borderId&&e.addAttribute("applyBorder","1"),t.alignment&&e.addAttribute("applyAlignment","1"),t.protection&&e.addAttribute("applyProtection","1"),t.alignment&&this.map.alignment.render(e,t.alignment),t.protection&&this.map.protection.render(e,t.protection),e.closeNode()}},{key:"parseOpen",value:function(e){if(this.parser)return this.parser.parseOpen(e),!0;switch(e.name){case"xf":return this.model={numFmtId:parseInt(e.attributes.numFmtId,10),fontId:parseInt(e.attributes.fontId,10),fillId:parseInt(e.attributes.fillId,10),borderId:parseInt(e.attributes.borderId,10)},this.xfId&&(this.model.xfId=parseInt(e.attributes.xfId,10)),!0;case"alignment":return this.parser=this.map.alignment,this.parser.parseOpen(e),!0;case"protection":return this.parser=this.map.protection,this.parser.parseOpen(e),!0;default:return!1}}},{key:"parseText",value:function(e){this.parser&&this.parser.parseText(e)}},{key:"parseClose",value:function(e){return this.parser?(this.parser.parseClose(e)||(this.map.protection===this.parser?this.model.protection=this.parser.model:this.model.alignment=this.parser.model,this.parser=void 0),!0):"xf"!==e}},{key:"tag",get:function(){return"xf"}}]),c}();t.exports=e},{"../base-xform":31,"./alignment-xform":125,"./protection-xform":132}],134:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a(e,t,n){t&&o(e.prototype,t),n&&o(e,n)}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&function(e,t){(Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=c(e);n=t?(n=c(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var l,h=e("../../../doc/enums"),f=e("../../../utils/xml-stream"),d=e("../base-xform"),p=e("../static-xform"),m=e("../list-xform"),g=e("./font-xform"),A=e("./fill-xform"),v=e("./border-xform"),b=e("./numfmt-xform"),y=e("./style-xform"),w=e("./dxf-xform");function x(e){var t;return i(this,x),(t=l.call(this)).map={numFmts:new m({tag:"numFmts",count:!0,childXform:new b}),fonts:new m({tag:"fonts",count:!0,childXform:new g,$:{"x14ac:knownFonts":1}}),fills:new m({tag:"fills",count:!0,childXform:new A}),borders:new m({tag:"borders",count:!0,childXform:new v}),cellStyleXfs:new m({tag:"cellStyleXfs",count:!0,childXform:new y}),cellXfs:new m({tag:"cellXfs",count:!0,childXform:new y({xfId:!0})}),dxfs:new m({tag:"dxfs",always:!0,count:!0,childXform:new w}),numFmt:new b,font:new g,fill:new A,border:new v,style:new y({xfId:!0}),cellStyles:x.STATIC_XFORMS.cellStyles,tableStyles:x.STATIC_XFORMS.tableStyles,extLst:x.STATIC_XFORMS.extLst},e&&t.init(),t}(e=(s(x,d),l=u(x),a(x,[{key:"initIndex",value:function(){this.index={style:{},numFmt:{},numFmtNextId:164,font:{},border:{},fill:{}}}},{key:"init",value:function(){this.model={styles:[],numFmts:[],fonts:[],borders:[],fills:[],dxfs:[]},this.initIndex(),this._addBorder({}),this._addStyle({numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}),this._addFill({type:"pattern",pattern:"none"}),this._addFill({type:"pattern",pattern:"gray125"}),this.weakMap=new WeakMap}},{key:"render",value:function(e,t){t=t||this.model,e.openXml(f.StdDocAttributes),e.openNode("styleSheet",x.STYLESHEET_ATTRIBUTES),this.index?(t.numFmts&&t.numFmts.length&&(e.openNode("numFmts",{count:t.numFmts.length}),t.numFmts.forEach((function(t){e.writeXml(t)})),e.closeNode()),t.fonts.length||this._addFont({size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}),e.openNode("fonts",{count:t.fonts.length,"x14ac:knownFonts":1}),t.fonts.forEach((function(t){e.writeXml(t)})),e.closeNode(),e.openNode("fills",{count:t.fills.length}),t.fills.forEach((function(t){e.writeXml(t)})),e.closeNode(),e.openNode("borders",{count:t.borders.length}),t.borders.forEach((function(t){e.writeXml(t)})),e.closeNode(),this.map.cellStyleXfs.render(e,[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}]),e.openNode("cellXfs",{count:t.styles.length}),t.styles.forEach((function(t){e.writeXml(t)})),e.closeNode()):(this.map.numFmts.render(e,t.numFmts),this.map.fonts.render(e,t.fonts),this.map.fills.render(e,t.fills),this.map.borders.render(e,t.borders),this.map.cellStyleXfs.render(e,[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}]),this.map.cellXfs.render(e,t.styles)),x.STATIC_XFORMS.cellStyles.render(e),this.map.dxfs.render(e,t.dxfs),x.STATIC_XFORMS.tableStyles.render(e),x.STATIC_XFORMS.extLst.render(e),e.closeNode()}},{key:"parseOpen",value:function(e){return this.parser?this.parser.parseOpen(e):"styleSheet"===e.name?this.initIndex():(this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e)),!0}},{key:"parseText",value:function(e){this.parser&&this.parser.parseText(e)}},{key:"parseClose",value:function(e){var t,n=this;if(this.parser)return this.parser.parseClose(e)||(this.parser=void 0),!0;if("styleSheet"!==e)return!0;function r(e,t){t.model&&t.model.length&&(n.model[e]=t.model)}return this.model={},r("numFmts",this.map.numFmts),r("fonts",this.map.fonts),r("fills",this.map.fills),r("borders",this.map.borders),r("styles",this.map.cellXfs),r("dxfs",this.map.dxfs),this.index={model:[],numFmt:[]},this.model.numFmts&&(t=this.index.numFmt,this.model.numFmts.forEach((function(e){t[e.id]=e.formatCode}))),!1}},{key:"addStyleModel",value:function(e,t){if(!e)return 0;if(this.model.fonts.length||this._addFont({size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}),this.weakMap&&this.weakMap.has(e))return this.weakMap.get(e);var n={};if(t=t||h.ValueType.Number,e.numFmt)n.numFmtId=this._addNumFmtStr(e.numFmt);else switch(t){case h.ValueType.Number:n.numFmtId=this._addNumFmtStr("General");break;case h.ValueType.Date:n.numFmtId=this._addNumFmtStr("mm-dd-yy")}return e.font&&(n.fontId=this._addFont(e.font)),e.border&&(n.borderId=this._addBorder(e.border)),e.fill&&(n.fillId=this._addFill(e.fill)),e.alignment&&(n.alignment=e.alignment),e.protection&&(n.protection=e.protection),t=this._addStyle(n),this.weakMap&&this.weakMap.set(e,t),t}},{key:"getStyleModel",value:function(e){var t,n=this.model.styles[e];return n?((t=this.index.model[e])||(t=this.index.model[e]={},n.numFmtId&&(e=this.index.numFmt[n.numFmtId]||b.getDefaultFmtCode(n.numFmtId))&&(t.numFmt=e),r("font",this.model.fonts,n.fontId),r("border",this.model.borders,n.borderId),r("fill",this.model.fills,n.fillId),n.alignment&&(t.alignment=n.alignment),n.protection&&(t.protection=n.protection)),t):null;function r(e,n,r){!r&&0!==r||(n=n[r])&&(t[e]=n)}}},{key:"addDxfStyle",value:function(e){return this.model.dxfs.push(e),this.model.dxfs.length-1}},{key:"getDxfStyle",value:function(e){return this.model.dxfs[e]}},{key:"_addStyle",value:function(e){e=this.map.style.toXml(e);var t=this.index.style[e];return void 0===t&&(t=this.index.style[e]=this.model.styles.length,this.model.styles.push(e)),t}},{key:"_addNumFmtStr",value:function(e){var t=b.getDefaultFmtId(e);return void 0===t&&void 0===(t=this.index.numFmt[e])&&(t=this.index.numFmt[e]=164+this.model.numFmts.length,e=this.map.numFmt.toXml({id:t,formatCode:e}),this.model.numFmts.push(e)),t}},{key:"_addFont",value:function(e){e=this.map.font.toXml(e);var t=this.index.font[e];return void 0===t&&(t=this.index.font[e]=this.model.fonts.length,this.model.fonts.push(e)),t}},{key:"_addBorder",value:function(e){e=this.map.border.toXml(e);var t=this.index.border[e];return void 0===t&&(t=this.index.border[e]=this.model.borders.length,this.model.borders.push(e)),t}},{key:"_addFill",value:function(e){e=this.map.fill.toXml(e);var t=this.index.fill[e];return void 0===t&&(t=this.index.fill[e]=this.model.fills.length,this.model.fills.push(e)),t}}]),x)).STYLESHEET_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"x14ac x16r2","xmlns:x14ac":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac","xmlns:x16r2":"http://schemas.microsoft.com/office/spreadsheetml/2015/02/main"},e.STATIC_XFORMS={cellStyles:new p({tag:"cellStyles",$:{count:1},c:[{tag:"cellStyle",$:{name:"Normal",xfId:0,builtinId:0}}]}),dxfs:new p({tag:"dxfs",$:{count:0}}),tableStyles:new p({tag:"tableStyles",$:{count:0,defaultTableStyle:"TableStyleMedium2",defaultPivotStyle:"PivotStyleLight16"}}),extLst:new p({tag:"extLst",c:[{tag:"ext",$:{uri:"{EB79DEF2-80B8-43e5-95BD-54CBDDF9020C}","xmlns:x14":"http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"},c:[{tag:"x14:slicerStyles",$:{defaultSlicerStyle:"SlicerStyleLight1"}}]},{tag:"ext",$:{uri:"{9260A510-F301-46a8-8635-F512D64BE5F5}","xmlns:x15":"http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"},c:[{tag:"x15:timelineStyles",$:{defaultTimelineStyle:"TimeSlicerStyleLight1"}}]}]})},s(k,e),C=u(k),a(k,[{key:"parseStream",value:function(e){return e.autodrain(),Promise.resolve()}},{key:"addStyleModel",value:function(e,t){return t!==h.ValueType.Date?0:this.dateStyleId}},{key:"getStyleModel",value:function(){return{}}},{key:"dateStyleId",get:function(){var e;return this._dateStyleId||(e={numFmtId:b.getDefaultFmtId("mm-dd-yy")},this._dateStyleId=this.model.styles.length,this.model.styles.push(e)),this._dateStyleId}}]);var C;d=k;function k(){var e;return i(this,k),(e=C.call(this)).model={styles:[{numFmtId:0,fontId:0,fillId:0,borderId:0,xfId:0}],numFmts:[],fonts:[{size:11,color:{theme:1},name:"Calibri",family:2,scheme:"minor"}],borders:[{}],fills:[{type:"pattern",pattern:"none"},{type:"pattern",pattern:"gray125"}]},e}e.Mock=d,t.exports=e},{"../../../doc/enums":7,"../../../utils/xml-stream":27,"../base-xform":31,"../list-xform":70,"../static-xform":119,"./border-xform":126,"./dxf-xform":128,"./fill-xform":129,"./font-xform":130,"./numfmt-xform":131,"./style-xform":133}],135:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}(e=function(e){var t=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(a);function a(e){var t;if(this instanceof a)return(t=n.call(this)).model=e,t;throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(a.prototype,[{key:"render",value:function(e,t){!0===(t=t||this.model)?e.leafNode("u"):(t=a.Attributes[t])&&e.leafNode("u",t)}},{key:"parseOpen",value:function(e){"u"===e.name&&(this.model=e.attributes.val||!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"u"}}]),a}(e("../base-xform"))).Attributes={single:{},double:{val:"double"},singleAccounting:{val:"singleAccounting"},doubleAccounting:{val:"doubleAccounting"}},t.exports=e},{"../base-xform":31}],136:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a=e("../base-xform"),s=e("./filter-column-xform");e=function(){var e=u,t=a;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&i(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(u);function u(){var e;if(this instanceof u)return(e=n.call(this)).map={filterColumn:new s},e;throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(u.prototype,[{key:"prepare",value:function(e){var t=this;e.columns.forEach((function(e,n){t.map.filterColumn.prepare(e,{index:n})}))}},{key:"render",value:function(e,t){var n=this;return e.openNode(this.tag,{ref:t.autoFilterRef}),t.columns.forEach((function(t){n.map.filterColumn.render(e,t)})),e.closeNode(),!0}},{key:"parseOpen",value:function(e){if(this.parser)return this.parser.parseOpen(e),!0;if(e.name===this.tag)return this.model={autoFilterRef:e.attributes.ref,columns:[]},!0;if(this.parser=this.map[e.name],this.parser)return this.parseOpen(e),!0;throw new Error("Unexpected xml node in parseOpen: ".concat(JSON.stringify(e)))}},{key:"parseText",value:function(e){this.parser&&this.parser.parseText(e)}},{key:"parseClose",value:function(e){if(this.parser)return this.parser.parseClose(e)||(this.model.columns.push(this.parser.model),this.parser=void 0),!0;if(e!==this.tag)throw new Error("Unexpected xml node in parseClose: ".concat(e));return!1}},{key:"tag",get:function(){return"autoFilter"}}]),u}();t.exports=e},{"../base-xform":31,"./filter-column-xform":137}],137:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}e=function(e){var t=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(a);function a(){var e=this,t=a;if(e instanceof t)return n.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(a.prototype,[{key:"prepare",value:function(e,t){e.colId=t.index.toString()}},{key:"render",value:function(e,t){return e.leafNode(this.tag,{colId:t.colId,hiddenButton:t.filterButton?"0":"1"}),!0}},{key:"parseOpen",value:function(e){return e.name===this.tag&&(e=e.attributes,this.model={filterButton:"0"===e.hiddenButton},!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"filterColumn"}}]),a}(e("../base-xform")),t.exports=e},{"../base-xform":31}],138:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}e=function(e){var t=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(a);function a(){var e=this,t=a;if(e instanceof t)return n.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(a.prototype,[{key:"prepare",value:function(e,t){e.id=t.index+1}},{key:"render",value:function(e,t){return e.leafNode(this.tag,{id:t.id.toString(),name:t.name,totalsRowLabel:t.totalsRowLabel,totalsRowFunction:t.totalsRowFunction,dxfId:t.dxfId}),!0}},{key:"parseOpen",value:function(e){return e.name===this.tag&&(e=e.attributes,this.model={name:e.name,totalsRowLabel:e.totalsRowLabel,totalsRowFunction:e.totalsRowFunction,dxfId:e.dxfId},!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"tableColumn"}}]),a}(e("../base-xform")),t.exports=e},{"../base-xform":31}],139:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}e=function(e){var t=a;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(a);function a(){var e=this,t=a;if(e instanceof t)return n.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(a.prototype,[{key:"render",value:function(e,t){return e.leafNode(this.tag,{name:t.theme||void 0,showFirstColumn:t.showFirstColumn?"1":"0",showLastColumn:t.showLastColumn?"1":"0",showRowStripes:t.showRowStripes?"1":"0",showColumnStripes:t.showColumnStripes?"1":"0"}),!0}},{key:"parseOpen",value:function(e){return e.name===this.tag&&(e=e.attributes,this.model={theme:e.name||null,showFirstColumn:"1"===e.showFirstColumn,showLastColumn:"1"===e.showLastColumn,showRowStripes:"1"===e.showRowStripes,showColumnStripes:"1"===e.showColumnStripes},!0)}},{key:"parseText",value:function(){}},{key:"parseClose",value:function(){return!1}},{key:"tag",get:function(){return"tableStyleInfo"}}]),a}(e("../base-xform")),t.exports=e},{"../base-xform":31}],140:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){var n,r=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)),r}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){var r,i;r=e,i=n[t=t],t in r?Object.defineProperty(r,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[t]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function a(e,t){return(a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var u=e("../../../utils/xml-stream"),c=e("../base-xform"),l=e("../list-xform"),h=e("./auto-filter-xform"),f=e("./table-column-xform"),d=e("./table-style-info-xform");(e=function(){var e=i,t=c;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&a(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=s(e);n=t?(n=s(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(i);function i(){var e;if(this instanceof i)return(e=n.call(this)).map={autoFilter:new h,tableColumns:new l({tag:"tableColumns",count:!0,empty:!0,childXform:new f}),tableStyleInfo:new d},e;throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(i.prototype,[{key:"prepare",value:function(e,t){this.map.autoFilter.prepare(e),this.map.tableColumns.prepare(e.columns,t)}},{key:"render",value:function(e,t){e.openXml(u.StdDocAttributes),e.openNode(this.tag,o(o({},i.TABLE_ATTRIBUTES),{},{id:t.id,name:t.name,displayName:t.displayName||t.name,ref:t.tableRef,totalsRowCount:t.totalsRow?"1":void 0,totalsRowShown:t.totalsRow?void 0:"1",headerRowCount:t.headerRow?"1":"0"})),this.map.autoFilter.render(e,t),this.map.tableColumns.render(e,t.columns),this.map.tableStyleInfo.render(e,t.style),e.closeNode()}},{key:"parseOpen",value:function(e){var t,n;return this.parser?this.parser.parseOpen(e):(t=e.name,n=e.attributes,t===this.tag?(this.reset(),this.model={name:n.name,displayName:n.displayName||n.name,tableRef:n.ref,totalsRow:"1"===n.totalsRowCount,headerRow:"1"===n.headerRowCount}):(this.parser=this.map[e.name],this.parser&&this.parser.parseOpen(e))),!0}},{key:"parseText",value:function(e){this.parser&&this.parser.parseText(e)}},{key:"parseClose",value:function(e){var t=this;return this.parser?(this.parser.parseClose(e)||(this.parser=void 0),!0):e!==this.tag||(this.model.columns=this.map.tableColumns.model,this.map.autoFilter.model&&(this.model.autoFilterRef=this.map.autoFilter.model.autoFilterRef,this.map.autoFilter.model.columns.forEach((function(e,n){t.model.columns[n].filterButton=e.filterButton}))),this.model.style=this.map.tableStyleInfo.model,!1)}},{key:"reconcile",value:function(e,t){e.columns.forEach((function(e){void 0!==e.dxfId&&(e.style=t.styles.getDxfStyle(e.dxfId))}))}},{key:"tag",get:function(){return"table"}}]),i}()).TABLE_ATTRIBUTES={xmlns:"http://schemas.openxmlformats.org/spreadsheetml/2006/main","xmlns:mc":"http://schemas.openxmlformats.org/markup-compatibility/2006","mc:Ignorable":"xr xr3","xmlns:xr":"http://schemas.microsoft.com/office/spreadsheetml/2014/revision","xmlns:xr3":"http://schemas.microsoft.com/office/spreadsheetml/2016/revision3"},t.exports=e},{"../../../utils/xml-stream":27,"../base-xform":31,"../list-xform":70,"./auto-filter-xform":136,"./table-column-xform":138,"./table-style-info-xform":139}],141:[function(e,t,n){(function(n,r){"use strict";function i(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function o(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function s(e){i(a,r,o,s,u,"next",e)}function u(e){i(a,r,o,s,u,"throw",e)}s(void 0)}))}}var a=e("fs"),s=e("jszip"),u=e("readable-stream").PassThrough,c=e("../utils/zip-stream"),l=e("../utils/stream-buf"),h=e("../utils/utils"),f=e("../utils/xml-stream"),d=e("../utils/browser-buffer-decode").bufferToString,p=e("./xform/style/styles-xform"),m=e("./xform/core/core-xform"),g=e("./xform/strings/shared-strings-xform"),A=e("./xform/core/relationships-xform"),v=e("./xform/core/content-types-xform"),b=e("./xform/core/app-xform"),y=e("./xform/book/workbook-xform"),w=e("./xform/sheet/worksheet-xform"),x=e("./xform/drawing/drawing-xform"),C=e("./xform/table/table-xform"),k=e("./xform/comment/comments-xform"),E=e("./xform/comment/vml-notes-xform"),S=e("./xml/theme1.js");Z=ee,J=[{key:"readFile",value:(X=o(regeneratorRuntime.mark((function e(t,n){var r,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h.fs.exists(t);case 2:if(e.sent){e.next=4;break}throw new Error("File not found: ".concat(t));case 4:return r=a.createReadStream(t),e.prev=5,e.next=8,this.read(r,n);case 8:return i=e.sent,r.close(),e.abrupt("return",i);case 13:throw e.prev=13,e.t0=e.catch(5),r.close(),e.t0;case 17:case"end":return e.stop()}}),e,this,[[5,13]])}))),function(e,t){return X.apply(this,arguments)})},{key:"parseRels",value:function(e){return(new A).parseStream(e)}},{key:"parseWorkbook",value:function(e){return(new y).parseStream(e)}},{key:"parseSharedStrings",value:function(e){return(new g).parseStream(e)}},{key:"reconcile",value:function(e,t){var n=new y,r=new w(t),i=new x,o=new C,a=(n.reconcile(e),{media:e.media,mediaIndex:e.mediaIndex}),s=(Object.keys(e.drawings).forEach((function(t){var n=e.drawings[t];(t=e.drawingRels[t])&&(a.rels=t.reduce((function(e,t){return e[t.Id]=t,e}),{}),(n.anchors||[]).forEach((function(e){(e=e.picture&&e.picture.hyperlinks)&&a.rels[e.rId]&&(e.hyperlink=a.rels[e.rId].Target,delete e.rId)})),i.reconcile(n,a))})),{styles:e.styles}),u=(Object.values(e.tables).forEach((function(e){o.reconcile(e,s)})),{styles:e.styles,sharedStrings:e.sharedStrings,media:e.media,mediaIndex:e.mediaIndex,date1904:e.properties&&e.properties.date1904,drawings:e.drawings,comments:e.comments,tables:e.tables,vmlDrawings:e.vmlDrawings});e.worksheets.forEach((function(t){t.relationships=e.worksheetRels[t.sheetNo],r.reconcile(t,u)})),delete e.worksheetHash,delete e.worksheetRels,delete e.globalRels,delete e.sharedStrings,delete e.workbookRels,delete e.sheetDefs,delete e.styles,delete e.mediaIndex,delete e.drawings,delete e.drawingRels,delete e.vmlDrawings}},{key:"_processWorksheetEntry",value:(Y=o(regeneratorRuntime.mark((function e(t,n,r,i,o){var a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=new w(i),e.next=3,a.parseStream(t);case 3:(a=e.sent).sheetNo=r,n.worksheetHash[o]=a,n.worksheets.push(a);case 7:case"end":return e.stop()}}),e)}))),function(e,t,n,r,i){return Y.apply(this,arguments)})},{key:"_processCommentEntry",value:(K=o(regeneratorRuntime.mark((function e(t,n,r){var i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=new k,e.next=3,i.parseStream(t);case 3:i=e.sent,n.comments["../".concat(r,".xml")]=i;case 5:case"end":return e.stop()}}),e)}))),function(e,t,n){return K.apply(this,arguments)})},{key:"_processTableEntry",value:(W=o(regeneratorRuntime.mark((function e(t,n,r){var i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=new C,e.next=3,i.parseStream(t);case 3:i=e.sent,n.tables["../tables/".concat(r,".xml")]=i;case 5:case"end":return e.stop()}}),e)}))),function(e,t,n){return W.apply(this,arguments)})},{key:"_processWorksheetRelsEntry",value:(G=o(regeneratorRuntime.mark((function e(t,n,r){var i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=new A,e.next=3,i.parseStream(t);case 3:i=e.sent,n.worksheetRels[r]=i;case 5:case"end":return e.stop()}}),e)}))),function(e,t,n){return G.apply(this,arguments)})},{key:"_processMediaEntry",value:(q=o(regeneratorRuntime.mark((function e(t,n,r){var i,o,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(1<=(i=r.lastIndexOf(".")))return o=r.substr(i+1),a=r.substr(0,i),e.next=6,new Promise((function(e,i){var s=new l;s.on("finish",(function(){n.mediaIndex[r]=n.media.length,n.mediaIndex[a]=n.media.length;var t={type:"image",name:a,extension:o,buffer:s.toBuffer()};n.media.push(t),e()})),t.on("error",(function(e){i(e)})),t.pipe(s)}));e.next=6;break;case 6:case"end":return e.stop()}}),e)}))),function(e,t,n){return q.apply(this,arguments)})},{key:"_processDrawingEntry",value:(V=o(regeneratorRuntime.mark((function e(t,n,r){var i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=new x,e.next=3,i.parseStream(t);case 3:i=e.sent,n.drawings[r]=i;case 5:case"end":return e.stop()}}),e)}))),function(e,t,n){return V.apply(this,arguments)})},{key:"_processDrawingRelsEntry",value:(Q=o(regeneratorRuntime.mark((function e(t,n,r){var i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=new A,e.next=3,i.parseStream(t);case 3:i=e.sent,n.drawingRels[r]=i;case 5:case"end":return e.stop()}}),e)}))),function(e,t,n){return Q.apply(this,arguments)})},{key:"_processVmlDrawingEntry",value:($=o(regeneratorRuntime.mark((function e(t,n,r){var i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=new E,e.next=3,i.parseStream(t);case 3:i=e.sent,n.vmlDrawings["../drawings/".concat(r,".vml")]=i;case 5:case"end":return e.stop()}}),e)}))),function(e,t,n){return $.apply(this,arguments)})},{key:"_processThemeEntry",value:(H=o(regeneratorRuntime.mark((function e(t,n,r){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise((function(e,i){var o=new l;t.on("error",i),o.on("error",i),o.on("finish",(function(){n.themes[r]=o.read().toString(),e()})),t.pipe(o)}));case 2:case"end":return e.stop()}}),e)}))),function(e,t,n){return H.apply(this,arguments)})},{key:"createInputStream",value:function(){throw new Error("`XLSX#createInputStream` is deprecated. You should use `XLSX#read` instead. This method will be removed in version 5.0. Please follow upgrade instruction: https://github.com/exceljs/exceljs/blob/master/UPGRADE-4.0.md")}},{key:"read",value:(z=o(regeneratorRuntime.mark((function e(t,n){var i,o,a,s,c,l;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:!t[Symbol.asyncIterator]&&t.pipe&&(t=t.pipe(new u)),i=[],a=!(o=!0),e.prev=4,c=function(e){var t;if("undefined"!=typeof Symbol){if(Symbol.asyncIterator&&null!=(t=e[Symbol.asyncIterator]))return t.call(e);if(Symbol.iterator&&null!=(t=e[Symbol.iterator]))return t.call(e)}throw new TypeError("Object is not async iterable")}(t);case 6:return e.next=8,c.next();case 8:return l=e.sent,o=l.done,e.next=12,l.value;case 12:if(l=e.sent,o){e.next=19;break}i.push(l);case 16:o=!0,e.next=6;break;case 19:e.next=25;break;case 21:e.prev=21,e.t0=e.catch(4),a=!0,s=e.t0;case 25:if(e.prev=25,e.prev=26,o||null==c.return){e.next=30;break}return e.next=30,c.return();case 30:if(e.prev=30,a)throw s;e.next=33;break;case 33:return e.finish(30);case 34:return e.finish(25);case 35:return e.abrupt("return",this.load(r.concat(i),n));case 36:case"end":return e.stop()}}),e,this,[[4,21,25,35],[26,,30,34]])}))),function(e,t){return z.apply(this,arguments)})},{key:"load",value:(U=o(regeneratorRuntime.mark((function e(t,i){var o,a,c,l,h,f,A,v,y,w,x,C,k;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=i&&i.base64?r.from(t.toString(),"base64"):t,o={worksheets:[],worksheetHash:{},worksheetRels:[],themes:{},media:[],mediaIndex:{},drawings:{},drawingRels:{},comments:{},tables:{},vmlDrawings:{}},e.next=4,s.loadAsync(a);case 4:a=e.sent,c=0,l=Object.values(a.files);case 6:if(c<l.length)if((h=l[c]).dir)e.next=123;else{if("/"===(f=h.name)[0]&&(f=f.substr(1)),A=void 0,f.match(/xl\/media\//)||f.match(/xl\/theme\/([a-zA-Z0-9]+)[.]xml/))return A=new u,e.t0=A,e.next=17,h.async("nodebuffer");e.next=21}else e.next=126;break;case 17:e.t1=e.sent,e.t0.write.call(e.t0,e.t1),e.next=36;break;case 21:if(A=new u({writableObjectMode:!0,readableObjectMode:!0}),v=void 0,n.browser)return e.t2=d,e.next=27,h.async("nodebuffer");e.next=31;break;case 27:e.t3=e.sent,v=(0,e.t2)(e.t3),e.next=34;break;case 31:return e.next=33,h.async("string");case 33:v=e.sent;case 34:for(y=0;y<v.length;y+=16384)A.write(v.substring(y,y+16384));case 36:A.end(),e.t4=f,e.next="_rels/.rels"===e.t4?40:"xl/workbook.xml"===e.t4?44:"xl/_rels/workbook.xml.rels"===e.t4?53:"xl/sharedStrings.xml"===e.t4?57:"xl/styles.xml"===e.t4?61:"docProps/app.xml"===e.t4?65:"docProps/core.xml"===e.t4?72:78;break;case 40:return e.next=42,this.parseRels(A);case 42:return o.globalRels=e.sent,e.abrupt("break",123);case 44:return e.next=46,this.parseWorkbook(A);case 46:return w=e.sent,o.sheets=w.sheets,o.definedNames=w.definedNames,o.views=w.views,o.properties=w.properties,o.calcProperties=w.calcProperties,e.abrupt("break",123);case 53:return e.next=55,this.parseRels(A);case 55:return o.workbookRels=e.sent,e.abrupt("break",123);case 57:return o.sharedStrings=new g,e.next=60,o.sharedStrings.parseStream(A);case 60:return e.abrupt("break",123);case 61:return o.styles=new p,e.next=64,o.styles.parseStream(A);case 64:return e.abrupt("break",123);case 65:return w=new b,e.next=68,w.parseStream(A);case 68:return x=e.sent,o.company=x.company,o.manager=x.manager,e.abrupt("break",123);case 72:return x=new m,e.next=75,x.parseStream(A);case 75:return C=e.sent,Object.assign(o,C),e.abrupt("break",123);case 78:if(k=f.match(/xl\/worksheets\/sheet(\d+)[.]xml/))return e.next=82,this._processWorksheetEntry(A,o,k[1],i,f);e.next=83;break;case 82:return e.abrupt("break",123);case 83:if(k=f.match(/xl\/worksheets\/_rels\/sheet(\d+)[.]xml.rels/))return e.next=87,this._processWorksheetRelsEntry(A,o,k[1]);e.next=88;break;case 87:return e.abrupt("break",123);case 88:if(k=f.match(/xl\/theme\/([a-zA-Z0-9]+)[.]xml/))return e.next=92,this._processThemeEntry(A,o,k[1]);e.next=93;break;case 92:return e.abrupt("break",123);case 93:if(k=f.match(/xl\/media\/([a-zA-Z0-9]+[.][a-zA-Z0-9]{3,4})$/))return e.next=97,this._processMediaEntry(A,o,k[1]);e.next=98;break;case 97:return e.abrupt("break",123);case 98:if(k=f.match(/xl\/drawings\/([a-zA-Z0-9]+)[.]xml/))return e.next=102,this._processDrawingEntry(A,o,k[1]);e.next=103;break;case 102:return e.abrupt("break",123);case 103:if(k=f.match(/xl\/(comments\d+)[.]xml/))return e.next=107,this._processCommentEntry(A,o,k[1]);e.next=108;break;case 107:return e.abrupt("break",123);case 108:if(k=f.match(/xl\/tables\/(table\d+)[.]xml/))return e.next=112,this._processTableEntry(A,o,k[1]);e.next=113;break;case 112:return e.abrupt("break",123);case 113:if(k=f.match(/xl\/drawings\/_rels\/([a-zA-Z0-9]+)[.]xml[.]rels/))return e.next=117,this._processDrawingRelsEntry(A,o,k[1]);e.next=118;break;case 117:return e.abrupt("break",123);case 118:if(k=f.match(/xl\/drawings\/(vmlDrawing\d+)[.]vml/))return e.next=122,this._processVmlDrawingEntry(A,o,k[1]);e.next=123;break;case 122:return e.abrupt("break",123);case 123:c++,e.next=6;break;case 126:return this.reconcile(o,i),this.workbook.model=o,e.abrupt("return",this.workbook);case 129:case"end":return e.stop()}}),e,this)}))),function(e,t){return U.apply(this,arguments)})},{key:"addMedia",value:(L=o(regeneratorRuntime.mark((function e(t,n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all(n.media.map(function(){var e=o(regeneratorRuntime.mark((function e(n){var r,i,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("image"!==n.type)e.next=13;else{var s;if(r="xl/media/".concat(n.name,".").concat(n.extension),n.filename)return e.next=5,s=n.filename,void 0,new Promise((function(e,t){a.readFile(s,void 0,(function(n,r){n?t(n):e(r)}))}));e.next=7}break;case 5:return i=e.sent,e.abrupt("return",t.append(i,{name:r}));case 7:if(n.buffer)return e.abrupt("return",t.append(n.buffer,{name:r}));e.next=9;break;case 9:if(n.base64)return i=n.base64,o=i.substring(i.indexOf(",")+1),e.abrupt("return",t.append(o,{name:r,base64:!0}));e.next=13;break;case 13:throw new Error("Unsupported media");case 14:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 2:case"end":return e.stop()}}),e)}))),function(e,t){return L.apply(this,arguments)})},{key:"addDrawings",value:function(e,t){var n=new x,r=new A;t.worksheets.forEach((function(t){var i;(t=t.drawing)&&(n.prepare(t,{}),i=n.toXml(t),e.append(i,{name:"xl/drawings/".concat(t.name,".xml")}),i=r.toXml(t.rels),e.append(i,{name:"xl/drawings/_rels/".concat(t.name,".xml.rels")}))}))}},{key:"addTables",value:function(e,t){var n=new C;t.worksheets.forEach((function(t){t.tables.forEach((function(t){n.prepare(t,{});var r=n.toXml(t);e.append(r,{name:"xl/tables/".concat(t.target)})}))}))}},{key:"addContentTypes",value:(P=o(regeneratorRuntime.mark((function e(t,n){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=(r=new v).toXml(n),t.append(r,{name:"[Content_Types].xml"});case 3:case"end":return e.stop()}}),e)}))),function(e,t){return P.apply(this,arguments)})},{key:"addApp",value:(R=o(regeneratorRuntime.mark((function e(t,n){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=(r=new b).toXml(n),t.append(r,{name:"docProps/app.xml"});case 3:case"end":return e.stop()}}),e)}))),function(e,t){return R.apply(this,arguments)})},{key:"addCore",value:(F=o(regeneratorRuntime.mark((function e(t,n){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=new m,t.append(r.toXml(n),{name:"docProps/core.xml"});case 2:case"end":return e.stop()}}),e)}))),function(e,t){return F.apply(this,arguments)})},{key:"addThemes",value:(N=o(regeneratorRuntime.mark((function e(t,n){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=n.themes||{theme1:S},Object.keys(r).forEach((function(e){var n=r[e];e="xl/theme/".concat(e,".xml");t.append(n,{name:e})}));case 2:case"end":return e.stop()}}),e)}))),function(e,t){return N.apply(this,arguments)})},{key:"addOfficeRels",value:(j=o(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=(n=new A).toXml([{Id:"rId1",Type:ee.RelType.OfficeDocument,Target:"xl/workbook.xml"},{Id:"rId2",Type:ee.RelType.CoreProperties,Target:"docProps/core.xml"},{Id:"rId3",Type:ee.RelType.ExtenderProperties,Target:"docProps/app.xml"}]),t.append(n,{name:"_rels/.rels"});case 3:case"end":return e.stop()}}),e)}))),function(e){return j.apply(this,arguments)})},{key:"addWorkbookRels",value:(M=o(regeneratorRuntime.mark((function e(t,n){var r,i,o;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=1,i=[{Id:"rId".concat(r++),Type:ee.RelType.Styles,Target:"styles.xml"},{Id:"rId".concat(r++),Type:ee.RelType.Theme,Target:"theme/theme1.xml"}],n.sharedStrings.count&&i.push({Id:"rId".concat(r++),Type:ee.RelType.SharedStrings,Target:"sharedStrings.xml"}),n.worksheets.forEach((function(e){e.rId="rId".concat(r++),i.push({Id:e.rId,Type:ee.RelType.Worksheet,Target:"worksheets/sheet".concat(e.id,".xml")})})),o=(o=new A).toXml(i),t.append(o,{name:"xl/_rels/workbook.xml.rels"});case 7:case"end":return e.stop()}}),e)}))),function(e,t){return M.apply(this,arguments)})},{key:"addSharedStrings",value:(I=o(regeneratorRuntime.mark((function e(t,n){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n.sharedStrings&&n.sharedStrings.count&&t.append(n.sharedStrings.xml,{name:"xl/sharedStrings.xml"});case 1:case"end":return e.stop()}}),e)}))),function(e,t){return I.apply(this,arguments)})},{key:"addStyles",value:(B=o(regeneratorRuntime.mark((function e(t,n){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(r=n.styles.xml)&&t.append(r,{name:"xl/styles.xml"});case 2:case"end":return e.stop()}}),e)}))),function(e,t){return B.apply(this,arguments)})},{key:"addWorkbook",value:(D=o(regeneratorRuntime.mark((function e(t,n){var r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=new y,t.append(r.toXml(n),{name:"xl/workbook.xml"});case 2:case"end":return e.stop()}}),e)}))),function(e,t){return D.apply(this,arguments)})},{key:"addWorksheets",value:(T=o(regeneratorRuntime.mark((function e(t,n){var r,i,o,a;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=new w,i=new A,o=new k,a=new E,n.worksheets.forEach((function(e){var n=new f;r.render(n,e),t.append(n.xml,{name:"xl/worksheets/sheet".concat(e.id,".xml")}),e.rels&&e.rels.length&&(n=new f,i.render(n,e.rels),t.append(n.xml,{name:"xl/worksheets/_rels/sheet".concat(e.id,".xml.rels")})),0<e.comments.length&&(n=new f,o.render(n,e),t.append(n.xml,{name:"xl/comments".concat(e.id,".xml")}),n=new f,a.render(n,e),t.append(n.xml,{name:"xl/drawings/vmlDrawing".concat(e.id,".vml")}))}));case 5:case"end":return e.stop()}}),e)}))),function(e,t){return T.apply(this,arguments)})},{key:"_finalize",value:function(e){var t=this;return new Promise((function(n,r){e.on("finish",(function(){n(t)})),e.on("error",r),e.finalize()}))}},{key:"prepareModel",value:function(e,t){e.creator=e.creator||"ExcelJS",e.lastModifiedBy=e.lastModifiedBy||"ExcelJS",e.created=e.created||new Date,e.modified=e.modified||new Date,e.useSharedStrings=void 0===t.useSharedStrings||t.useSharedStrings,e.useStyles=void 0===t.useStyles||t.useStyles,e.sharedStrings=new g,e.styles=e.useStyles?new p(!0):new p.Mock;t=new y;var n=new w,r=(t.prepare(e),{sharedStrings:e.sharedStrings,styles:e.styles,date1904:e.properties.date1904,drawingsCount:0,media:e.media}),i=(r.drawings=e.drawings=[],r.commentRefs=e.commentRefs=[],0);e.tables=[],e.worksheets.forEach((function(t){t.tables.forEach((function(t){i++,t.target="table".concat(i,".xml"),t.id=i,e.tables.push(t)})),n.prepare(t,r)}))}},{key:"write",value:(O=o(regeneratorRuntime.mark((function e(t,n){var r,i;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=n||{},r=this.workbook.model,(i=new c.ZipWriter(n.zip)).pipe(t),this.prepareModel(r,n),e.next=7,this.addContentTypes(i,r);case 7:return e.next=9,this.addOfficeRels(i,r);case 9:return e.next=11,this.addWorkbookRels(i,r);case 11:return e.next=13,this.addWorksheets(i,r);case 13:return e.next=15,this.addSharedStrings(i,r);case 15:return e.next=17,this.addDrawings(i,r);case 17:return e.next=19,this.addTables(i,r);case 19:return e.next=21,Promise.all([this.addThemes(i,r),this.addStyles(i,r)]);case 21:return e.next=23,this.addMedia(i,r);case 23:return e.next=25,Promise.all([this.addApp(i,r),this.addCore(i,r)]);case 25:return e.next=27,this.addWorkbook(i,r);case 27:return e.abrupt("return",this._finalize(i));case 28:case"end":return e.stop()}}),e,this)}))),function(e,t){return O.apply(this,arguments)})},{key:"writeFile",value:function(e,t){var n=this,r=a.createWriteStream(e);return new Promise((function(e,i){r.on("finish",(function(){e()})),r.on("error",(function(e){i(e)})),n.write(r,t).then((function(){r.end()}))}))}},{key:"writeBuffer",value:(_=o(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=new l,e.next=3,this.write(n,t);case 3:return e.abrupt("return",n.read());case 4:case"end":return e.stop()}}),e,this)}))),function(e){return _.apply(this,arguments)})}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(Z.prototype,J);var _,O,T,D,B,I,M,j,N,F,R,P,L,U,z,H,$,Q,V,q,G,W,K,Y,X,J,Z=ee;function ee(e){if(!(this instanceof ee))throw new TypeError("Cannot call a class as a function");this.workbook=e}Z.RelType=e("./rel-type"),t.exports=Z}).call(this,e("_process"),e("buffer").Buffer)},{"../utils/browser-buffer-decode":16,"../utils/stream-buf":23,"../utils/utils":26,"../utils/xml-stream":27,"../utils/zip-stream":28,"./rel-type":30,"./xform/book/workbook-xform":37,"./xform/comment/comments-xform":39,"./xform/comment/vml-notes-xform":44,"./xform/core/app-xform":50,"./xform/core/content-types-xform":51,"./xform/core/core-xform":52,"./xform/core/relationships-xform":54,"./xform/drawing/drawing-xform":61,"./xform/sheet/worksheet-xform":114,"./xform/strings/shared-strings-xform":123,"./xform/style/styles-xform":134,"./xform/table/table-xform":140,"./xml/theme1.js":142,_process:467,buffer:216,fs:215,jszip:399,"readable-stream":491}],142:[function(e,t,n){"use strict";t.exports='<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n<a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office Theme"> <a:themeElements> <a:clrScheme name="Office"> <a:dk1> <a:sysClr val="windowText" lastClr="000000"/> </a:dk1> <a:lt1> <a:sysClr val="window" lastClr="FFFFFF"/> </a:lt1> <a:dk2> <a:srgbClr val="1F497D"/> </a:dk2> <a:lt2> <a:srgbClr val="EEECE1"/> </a:lt2> <a:accent1> <a:srgbClr val="4F81BD"/> </a:accent1> <a:accent2> <a:srgbClr val="C0504D"/> </a:accent2> <a:accent3> <a:srgbClr val="9BBB59"/> </a:accent3> <a:accent4> <a:srgbClr val="8064A2"/> </a:accent4> <a:accent5> <a:srgbClr val="4BACC6"/> </a:accent5> <a:accent6> <a:srgbClr val="F79646"/> </a:accent6> <a:hlink> <a:srgbClr val="0000FF"/> </a:hlink> <a:folHlink> <a:srgbClr val="800080"/> </a:folHlink> </a:clrScheme> <a:fontScheme name="Office"> <a:majorFont> <a:latin typeface="Cambria"/> <a:ea typeface=""/> <a:cs typeface=""/> <a:font script="Jpan" typeface="ＭＳ Ｐゴシック"/> <a:font script="Hang" typeface="맑은 고딕"/> <a:font script="Hans" typeface="宋体"/> <a:font script="Hant" typeface="新細明體"/> <a:font script="Arab" typeface="Times New Roman"/> <a:font script="Hebr" typeface="Times New Roman"/> <a:font script="Thai" typeface="Tahoma"/> <a:font script="Ethi" typeface="Nyala"/> <a:font script="Beng" typeface="Vrinda"/> <a:font script="Gujr" typeface="Shruti"/> <a:font script="Khmr" typeface="MoolBoran"/> <a:font script="Knda" typeface="Tunga"/> <a:font script="Guru" typeface="Raavi"/> <a:font script="Cans" typeface="Euphemia"/> <a:font script="Cher" typeface="Plantagenet Cherokee"/> <a:font script="Yiii" typeface="Microsoft Yi Baiti"/> <a:font script="Tibt" typeface="Microsoft Himalaya"/> <a:font script="Thaa" typeface="MV Boli"/> <a:font script="Deva" typeface="Mangal"/> <a:font script="Telu" typeface="Gautami"/> <a:font script="Taml" typeface="Latha"/> <a:font script="Syrc" typeface="Estrangelo Edessa"/> <a:font script="Orya" typeface="Kalinga"/> <a:font script="Mlym" typeface="Kartika"/> <a:font script="Laoo" typeface="DokChampa"/> <a:font script="Sinh" typeface="Iskoola Pota"/> <a:font script="Mong" typeface="Mongolian Baiti"/> <a:font script="Viet" typeface="Times New Roman"/> <a:font script="Uigh" typeface="Microsoft Uighur"/> <a:font script="Geor" typeface="Sylfaen"/> </a:majorFont> <a:minorFont> <a:latin typeface="Calibri"/> <a:ea typeface=""/> <a:cs typeface=""/> <a:font script="Jpan" typeface="ＭＳ Ｐゴシック"/> <a:font script="Hang" typeface="맑은 고딕"/> <a:font script="Hans" typeface="宋体"/> <a:font script="Hant" typeface="新細明體"/> <a:font script="Arab" typeface="Arial"/> <a:font script="Hebr" typeface="Arial"/> <a:font script="Thai" typeface="Tahoma"/> <a:font script="Ethi" typeface="Nyala"/> <a:font script="Beng" typeface="Vrinda"/> <a:font script="Gujr" typeface="Shruti"/> <a:font script="Khmr" typeface="DaunPenh"/> <a:font script="Knda" typeface="Tunga"/> <a:font script="Guru" typeface="Raavi"/> <a:font script="Cans" typeface="Euphemia"/> <a:font script="Cher" typeface="Plantagenet Cherokee"/> <a:font script="Yiii" typeface="Microsoft Yi Baiti"/> <a:font script="Tibt" typeface="Microsoft Himalaya"/> <a:font script="Thaa" typeface="MV Boli"/> <a:font script="Deva" typeface="Mangal"/> <a:font script="Telu" typeface="Gautami"/> <a:font script="Taml" typeface="Latha"/> <a:font script="Syrc" typeface="Estrangelo Edessa"/> <a:font script="Orya" typeface="Kalinga"/> <a:font script="Mlym" typeface="Kartika"/> <a:font script="Laoo" typeface="DokChampa"/> <a:font script="Sinh" typeface="Iskoola Pota"/> <a:font script="Mong" typeface="Mongolian Baiti"/> <a:font script="Viet" typeface="Arial"/> <a:font script="Uigh" typeface="Microsoft Uighur"/> <a:font script="Geor" typeface="Sylfaen"/> </a:minorFont> </a:fontScheme> <a:fmtScheme name="Office"> <a:fillStyleLst> <a:solidFill> <a:schemeClr val="phClr"/> </a:solidFill> <a:gradFill rotWithShape="1"> <a:gsLst> <a:gs pos="0"> <a:schemeClr val="phClr"> <a:tint val="50000"/> <a:satMod val="300000"/> </a:schemeClr> </a:gs> <a:gs pos="35000"> <a:schemeClr val="phClr"> <a:tint val="37000"/> <a:satMod val="300000"/> </a:schemeClr> </a:gs> <a:gs pos="100000"> <a:schemeClr val="phClr"> <a:tint val="15000"/> <a:satMod val="350000"/> </a:schemeClr> </a:gs> </a:gsLst> <a:lin ang="16200000" scaled="1"/> </a:gradFill> <a:gradFill rotWithShape="1"> <a:gsLst> <a:gs pos="0"> <a:schemeClr val="phClr"> <a:tint val="100000"/> <a:shade val="100000"/> <a:satMod val="130000"/> </a:schemeClr> </a:gs> <a:gs pos="100000"> <a:schemeClr val="phClr"> <a:tint val="50000"/> <a:shade val="100000"/> <a:satMod val="350000"/> </a:schemeClr> </a:gs> </a:gsLst> <a:lin ang="16200000" scaled="0"/> </a:gradFill> </a:fillStyleLst> <a:lnStyleLst> <a:ln w="9525" cap="flat" cmpd="sng" algn="ctr"> <a:solidFill> <a:schemeClr val="phClr"> <a:shade val="95000"/> <a:satMod val="105000"/> </a:schemeClr> </a:solidFill> <a:prstDash val="solid"/> </a:ln> <a:ln w="25400" cap="flat" cmpd="sng" algn="ctr"> <a:solidFill> <a:schemeClr val="phClr"/> </a:solidFill> <a:prstDash val="solid"/> </a:ln> <a:ln w="38100" cap="flat" cmpd="sng" algn="ctr"> <a:solidFill> <a:schemeClr val="phClr"/> </a:solidFill> <a:prstDash val="solid"/> </a:ln> </a:lnStyleLst> <a:effectStyleLst> <a:effectStyle> <a:effectLst> <a:outerShdw blurRad="40000" dist="20000" dir="5400000" rotWithShape="0"> <a:srgbClr val="000000"> <a:alpha val="38000"/> </a:srgbClr> </a:outerShdw> </a:effectLst> </a:effectStyle> <a:effectStyle> <a:effectLst> <a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"> <a:srgbClr val="000000"> <a:alpha val="35000"/> </a:srgbClr> </a:outerShdw> </a:effectLst> </a:effectStyle> <a:effectStyle> <a:effectLst> <a:outerShdw blurRad="40000" dist="23000" dir="5400000" rotWithShape="0"> <a:srgbClr val="000000"> <a:alpha val="35000"/> </a:srgbClr> </a:outerShdw> </a:effectLst> <a:scene3d> <a:camera prst="orthographicFront"> <a:rot lat="0" lon="0" rev="0"/> </a:camera> <a:lightRig rig="threePt" dir="t"> <a:rot lat="0" lon="0" rev="1200000"/> </a:lightRig> </a:scene3d> <a:sp3d> <a:bevelT w="63500" h="25400"/> </a:sp3d> </a:effectStyle> </a:effectStyleLst> <a:bgFillStyleLst> <a:solidFill> <a:schemeClr val="phClr"/> </a:solidFill> <a:gradFill rotWithShape="1"> <a:gsLst> <a:gs pos="0"> <a:schemeClr val="phClr"> <a:tint val="40000"/> <a:satMod val="350000"/> </a:schemeClr> </a:gs> <a:gs pos="40000"> <a:schemeClr val="phClr"> <a:tint val="45000"/> <a:shade val="99000"/> <a:satMod val="350000"/> </a:schemeClr> </a:gs> <a:gs pos="100000"> <a:schemeClr val="phClr"> <a:shade val="20000"/> <a:satMod val="255000"/> </a:schemeClr> </a:gs> </a:gsLst> <a:path path="circle"> <a:fillToRect l="50000" t="-80000" r="50000" b="180000"/> </a:path> </a:gradFill> <a:gradFill rotWithShape="1"> <a:gsLst> <a:gs pos="0"> <a:schemeClr val="phClr"> <a:tint val="80000"/> <a:satMod val="300000"/> </a:schemeClr> </a:gs> <a:gs pos="100000"> <a:schemeClr val="phClr"> <a:shade val="30000"/> <a:satMod val="200000"/> </a:schemeClr> </a:gs> </a:gsLst> <a:path path="circle"> <a:fillToRect l="50000" t="50000" r="50000" b="50000"/> </a:path> </a:gradFill> </a:bgFillStyleLst> </a:fmtScheme> </a:themeElements> <a:objectDefaults> <a:spDef> <a:spPr/> <a:bodyPr/> <a:lstStyle/> <a:style> <a:lnRef idx="1"> <a:schemeClr val="accent1"/> </a:lnRef> <a:fillRef idx="3"> <a:schemeClr val="accent1"/> </a:fillRef> <a:effectRef idx="2"> <a:schemeClr val="accent1"/> </a:effectRef> <a:fontRef idx="minor"> <a:schemeClr val="lt1"/> </a:fontRef> </a:style> </a:spDef> <a:lnDef> <a:spPr/> <a:bodyPr/> <a:lstStyle/> <a:style> <a:lnRef idx="2"> <a:schemeClr val="accent1"/> </a:lnRef> <a:fillRef idx="0"> <a:schemeClr val="accent1"/> </a:fillRef> <a:effectRef idx="1"> <a:schemeClr val="accent1"/> </a:effectRef> <a:fontRef idx="minor"> <a:schemeClr val="tx1"/> </a:fontRef> </a:style> </a:lnDef> </a:objectDefaults> <a:extraClrSchemeLst/> </a:theme>'},{}],143:[function(e,t,n){(function(t){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Object.defineProperty(n,"__esModule",{value:!0}),n.CsvFormatterStream=void 0;var a=e("stream"),s=e("./formatter");a=function(e){var n=u;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&i(n,e);var a=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=o(e);n=t?(n=o(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(u);function u(e){var t;if(this instanceof u)return(t=a.call(this,{writableObjectMode:e.objectMode})).hasWrittenBOM=!1,t.formatterOptions=e,t.rowFormatter=new s.RowFormatter(e),t.hasWrittenBOM=!e.writeBOM,t;throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(u.prototype,[{key:"transform",value:function(e){return this.rowFormatter.rowTransform=e,this}},{key:"_transform",value:function(e,n,r){var i=this,o=!1;try{this.hasWrittenBOM||(this.push(this.formatterOptions.BOM),this.hasWrittenBOM=!0),this.rowFormatter.format(e,(function(e,n){return e?(o=!0,r(e)):(n&&n.forEach((function(e){i.push(t.from(e,"utf8"))})),o=!0,r())}))}catch(e){if(o)throw e;r(e)}}},{key:"_flush",value:function(e){var n=this;this.rowFormatter.finish((function(r,i){return r?e(r):(i&&i.forEach((function(e){n.push(t.from(e,"utf8"))})),e())}))}}]),u}(a.Transform);n.CsvFormatterStream=a}).call(this,e("buffer").Buffer)},{"./formatter":147,buffer:216,stream:506}],144:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.FormatterOptions=void 0,n.FormatterOptions=function e(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},n=this,r=e;if(!(n instanceof r))throw new TypeError("Cannot call a class as a function");this.objectMode=!0,this.delimiter=",",this.rowDelimiter="\n",this.quote='"',this.escape=this.quote,this.quoteColumns=!1,this.quoteHeaders=this.quoteColumns,this.headers=null,this.includeEndRowDelimiter=!1,this.writeBOM=!1,this.BOM="\ufeff",this.alwaysWriteHeaders=!1,Object.assign(this,t||{}),void 0===(null==t?void 0:t.quoteHeaders)&&(this.quoteHeaders=this.quoteColumns),!0===(null==t?void 0:t.quote)?this.quote='"':!1===(null==t?void 0:t.quote)&&(this.quote=""),"string"!=typeof(null==t?void 0:t.escape)&&(this.escape=this.quote),this.shouldWriteHeaders=!!this.headers&&(null==(n=t.writeHeaders)||n),this.headers=Array.isArray(this.headers)?this.headers:null,this.escapedQuote="".concat(this.escape).concat(this.quote)}},{}],145:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0}),n.FieldFormatter=void 0;var i=r(e("lodash.isboolean")),o=r(e("lodash.isnil")),a=r(e("lodash.escaperegexp"));(function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}})(s.prototype,[{key:"shouldQuote",value:function(e,t){return t=t?this.formatterOptions.quoteHeaders:this.formatterOptions.quoteColumns,i.default(t)?t:Array.isArray(t)?t[e]:null!==this._headers&&t[this._headers[e]]}},{key:"format",value:function(e,t,n){e="".concat(o.default(e)?"":e).replace(/\0/g,"");var r=this.formatterOptions;return""!==r.quote&&-1!==e.indexOf(r.quote)?this.quoteField(e.replace(this.REPLACE_REGEXP,r.escapedQuote)):-1!==e.search(this.ESCAPE_REGEXP)||this.shouldQuote(t,n)?this.quoteField(e):e}},{key:"quoteField",value:function(e){var t=this.formatterOptions.quote;return"".concat(t).concat(e).concat(t)}},{key:"headers",set:function(e){this._headers=e}}]),e=s;function s(e){if(!(this instanceof s))throw new TypeError("Cannot call a class as a function");(this._headers=null)!==(this.formatterOptions=e).headers&&(this.headers=e.headers),this.REPLACE_REGEXP=new RegExp(e.quote,"g"),e="[".concat(e.delimiter).concat(a.default(e.rowDelimiter),"|\r|\n']"),this.ESCAPE_REGEXP=new RegExp(e)}n.FieldFormatter=e},{"lodash.escaperegexp":426,"lodash.isboolean":428,"lodash.isnil":431}],146:[function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0}),n.RowFormatter=void 0;var o,a=i(e("lodash.isfunction")),s=i(e("lodash.isequal")),u=e("./FieldFormatter"),c=e("../types");function l(e){if(!(this instanceof l))throw new TypeError("Cannot call a class as a function");this.rowCount=0,this.formatterOptions=e,this.fieldFormatter=new u.FieldFormatter(e),this.headers=e.headers,this.shouldWriteHeaders=e.shouldWriteHeaders,this.hasWrittenHeaders=!1,null!==this.headers&&(this.fieldFormatter.headers=this.headers),e.transform&&(this.rowTransform=e.transform)}e=[{key:"isHashArray",value:function(e){return!!Array.isArray(e)&&Array.isArray(e[0])&&2===e[0].length}},{key:"gatherHeaders",value:function(e){return l.isHashArray(e)?e.map((function(e){return e[0]})):Array.isArray(e)?e:Object.keys(e)}},{key:"createTransform",value:function(e){return c.isSyncTransform(e)?function(t,n){var r=null;try{r=e(t)}catch(t){return n(t)}return n(null,r)}:function(t,n){e(t,n)}}}],r((o=l).prototype,[{key:"format",value:function(e,t){var n=this;this.callTransformer(e,(function(r,i){var o,a;return r?t(r):e?(r=[],i&&(o=(a=n.checkHeaders(i)).shouldFormatColumns,a=a.headers,n.shouldWriteHeaders&&a&&!n.hasWrittenHeaders&&(r.push(n.formatColumns(a,!0)),n.hasWrittenHeaders=!0),o&&(a=n.gatherColumns(i),r.push(n.formatColumns(a,!1)))),t(null,r)):t(null)}))}},{key:"finish",value:function(e){var t=[];if(this.formatterOptions.alwaysWriteHeaders&&0===this.rowCount){if(!this.headers)return e(new Error("`alwaysWriteHeaders` option is set to true but `headers` option not provided."));t.push(this.formatColumns(this.headers,!0))}return this.formatterOptions.includeEndRowDelimiter&&t.push(this.formatterOptions.rowDelimiter),e(null,t)}},{key:"checkHeaders",value:function(e){var t;return this.headers?{shouldFormatColumns:!0,headers:this.headers}:(t=l.gatherHeaders(e),this.headers=t,this.fieldFormatter.headers=t,this.shouldWriteHeaders?{shouldFormatColumns:!s.default(t,e),headers:t}:{shouldFormatColumns:!0,headers:null})}},{key:"gatherColumns",value:function(e){if(null===this.headers)throw new Error("Headers is currently null");return Array.isArray(e)?l.isHashArray(e)?this.headers.map((function(t,n){return(n=e[n])?n[1]:""})):this.headers.map((function(t,n){return e[n]})):this.headers.map((function(t){return e[t]}))}},{key:"callTransformer",value:function(e,t){return this._rowTransform?this._rowTransform(e,t):t(null,e)}},{key:"formatColumns",value:function(e,t){var n=this,r=(e=e.map((function(e,r){return n.fieldFormatter.format(e,r,t)})).join(this.formatterOptions.delimiter),this.rowCount);return this.rowCount+=1,r?[this.formatterOptions.rowDelimiter,e].join(""):e}},{key:"rowTransform",set:function(e){if(!a.default(e))throw new TypeError("The transform should be a function");this._rowTransform=l.createTransform(e)}}]),r(o,e),n.RowFormatter=l},{"../types":149,"./FieldFormatter":145,"lodash.isequal":429,"lodash.isfunction":430}],147:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e("./RowFormatter"),i=(Object.defineProperty(n,"RowFormatter",{enumerable:!0,get:function(){return r.RowFormatter}}),e("./FieldFormatter"));Object.defineProperty(n,"FieldFormatter",{enumerable:!0,get:function(){return i.FieldFormatter}})},{"./FieldFormatter":145,"./RowFormatter":146}],148:[function(e,t,n){(function(t){"use strict";var r,i=Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){e[r=void 0===r?n:r]=t[n]},o=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},a=(Object.defineProperty(n,"__esModule",{value:!0}),n.writeToPath=n.writeToString=n.writeToBuffer=n.writeToStream=n.write=n.format=void 0,e("util")),s=e("stream"),u=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.hasOwnProperty.call(e,n)&&i(t,e,n);return o(t,e),t}(e("fs")),c=e("./FormatterOptions"),l=e("./CsvFormatterStream"),h=e("./types"),f=n;for(r in h)"default"===r||f.hasOwnProperty(r)||i(f,h,r);var d=e("./CsvFormatterStream"),p=(Object.defineProperty(n,"CsvFormatterStream",{enumerable:!0,get:function(){return d.CsvFormatterStream}}),e("./FormatterOptions"));Object.defineProperty(n,"FormatterOptions",{enumerable:!0,get:function(){return p.FormatterOptions}}),n.format=function(e){return new l.CsvFormatterStream(new c.FormatterOptions(e))},n.write=function(e,t){var r=n.format(t),i=a.promisify((function(e,t){r.write(e,void 0,t)}));return e.reduce((function(e,t){return e.then((function(){return i(t)}))}),Promise.resolve()).then((function(){return r.end()})).catch((function(e){r.emit("error",e)})),r},n.writeToStream=function(e,t,r){return n.write(t,r).pipe(e)},n.writeToBuffer=function(e){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},i=[],o=new s.Writable({write:function(e,t,n){i.push(e),n()}});return new Promise((function(a,s){o.on("error",s).on("finish",(function(){return a(t.concat(i))})),n.write(e,r).pipe(o)}))},n.writeToString=function(e,t){return n.writeToBuffer(e,t).then((function(e){return e.toString()}))},n.writeToPath=function(e,t,r){return e=u.createWriteStream(e,{encoding:"utf8"}),n.write(t,r).pipe(e)}}).call(this,e("buffer").Buffer)},{"./CsvFormatterStream":143,"./FormatterOptions":144,"./types":149,buffer:216,fs:215,stream:506,util:525}],149:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isSyncTransform=void 0,n.isSyncTransform=function(e){return 1===e.length}},{}],150:[function(e,t,n){(function(t){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(e,t,n){return(i="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){if(e=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=a(e)););return e}(e,t))return(e=Object.getOwnPropertyDescriptor(e,t)).get?e.get.call(n):e.value})(e,t,n||e)}function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function a(e){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}Object.defineProperty(n,"__esModule",{value:!0}),n.CsvParserStream=void 0;var s=e("string_decoder"),u=e("stream"),c=e("./transforms"),l=e("./parser");u=function(e){var n=h;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),e&&o(n,e);var u=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=a(e);n=t?(n=a(this).constructor,Reflect.construct(i,arguments,n)):i.apply(this,arguments),i=this;if(!n||"object"!==r(n)&&"function"!=typeof n){if(void 0===i)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return i}return n}}(h);function h(e){var t;if(this instanceof h)return(t=u.call(this,{objectMode:e.objectMode})).lines="",t.rowCount=0,t.parsedRowCount=0,t.parsedLineCount=0,t.endEmitted=!1,t.headersEmitted=!1,t.parserOptions=e,t.parser=new l.Parser(e),t.headerTransformer=new c.HeaderTransformer(e),t.decoder=new s.StringDecoder(e.encoding),t.rowTransformerValidator=new c.RowTransformerValidator,t;throw new TypeError("Cannot call a class as a function")}return function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(h.prototype,[{key:"transform",value:function(e){return this.rowTransformerValidator.rowTransform=e,this}},{key:"validate",value:function(e){return this.rowTransformerValidator.rowValidator=e,this}},{key:"emit",value:function(e){var t;if("end"===e)return this.endEmitted||(this.endEmitted=!0,i(a(h.prototype),"emit",this).call(this,"end",this.rowCount)),!1;for(var n=arguments.length,r=new Array(1<n?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return(t=i(a(h.prototype),"emit",this)).call.apply(t,[this,e].concat(r))}},{key:"_transform",value:function(e,t,n){if(this.hasHitRowLimit)return n();try{var r=this.lines+this.decoder.write(e),i=this.parse(r,!0);return this.processRows(i,n)}catch(e){return n(e)}}},{key:"_flush",value:function(e){if(this.hasHitRowLimit)return e();try{var t=this.lines+this.decoder.end(),n=this.parse(t,!1);return this.processRows(n,e)}catch(t){return e(t)}}},{key:"parse",value:function(e,t){return e?(t=(e=this.parser.parse(e,t)).line,e=e.rows,this.lines=t,e):[]}},{key:"processRows",value:function(e,n){var r=this,i=e.length;!function o(a){function s(e){return e?n(e):a%100!=0?o(a+1):void t((function(){return o(a+1)}))}var u,c;return r.checkAndEmitHeaders(),i<=a||r.hasHitRowLimit?n():(r.parsedLineCount+=1,r.shouldSkipLine?s():(u=e[a],r.rowCount+=1,r.parsedRowCount+=1,c=r.rowCount,r.transformRow(u,(function(e,t){if(e)return--r.rowCount,s(e);if(!t)return s(new Error("expected transform result"));if(t.isValid){if(t.row)return r.pushRow(t.row,s)}else r.emit("data-invalid",t.row,c,t.reason);return s()}))))}(0)}},{key:"transformRow",value:function(e,t){var n=this;try{this.headerTransformer.transform(e,(function(r,i){return r?t(r):i?i.isValid?i.row?n.shouldEmitRows?n.rowTransformerValidator.transformAndValidate(i.row,t):n.skipRow(t):(--n.rowCount,--n.parsedRowCount,t(null,{row:null,isValid:!0})):n.shouldEmitRows?t(null,{isValid:!1,row:e}):n.skipRow(t):t(new Error("Expected result from header transform"))}))}catch(e){t(e)}}},{key:"checkAndEmitHeaders",value:function(){!this.headersEmitted&&this.headerTransformer.headers&&(this.headersEmitted=!0,this.emit("headers",this.headerTransformer.headers))}},{key:"skipRow",value:function(e){return--this.rowCount,e(null,{row:null,isValid:!0})}},{key:"pushRow",value:function(e,t){try{this.parserOptions.objectMode?this.push(e):this.push(JSON.stringify(e)),t()}catch(e){t(e)}}},{key:"hasHitRowLimit",get:function(){return this.parserOptions.limitRows&&this.rowCount>=this.parserOptions.maxRows}},{key:"shouldEmitRows",get:function(){return this.parsedRowCount>this.parserOptions.skipRows}},{key:"shouldSkipLine",get:function(){return this.parsedLineCount<=this.parserOptions.skipLines}}]),h}(u.Transform);n.CsvParserStream=u}).call(this,e("timers").setImmediate)},{"./parser":162,"./transforms":165,stream:506,string_decoder:520,timers:521}],151:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0}),n.ParserOptions=void 0;var i=r(e("lodash.escaperegexp")),o=r(e("lodash.isnil"));n.ParserOptions=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");if(this.objectMode=!0,this.delimiter=",",this.ignoreEmpty=!1,this.quote='"',this.escape=null,this.escapeChar=this.quote,this.comment=null,this.supportsComments=!1,this.ltrim=!1,this.rtrim=!1,this.trim=!1,this.headers=null,this.renameHeaders=!1,this.strictColumnHandling=!1,this.discardUnmappedColumns=!1,this.carriageReturn="\r",this.encoding="utf8",this.limitRows=!1,this.maxRows=0,this.skipLines=0,this.skipRows=0,Object.assign(this,t||{}),1<this.delimiter.length)throw new Error("delimiter option must be one character long");this.escapedDelimiter=i.default(this.delimiter),this.escapeChar=null!=(t=this.escape)?t:this.quote,this.supportsComments=!o.default(this.comment),this.NEXT_TOKEN_REGEXP=new RegExp("([^\\s]|\\r\\n|\\n|\\r|".concat(this.escapedDelimiter,")")),0<this.maxRows&&(this.limitRows=!0)}},{"lodash.escaperegexp":426,"lodash.isnil":431}],152:[function(e,t,n){"use strict";var r,i=Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){e[r=void 0===r?n:r]=t[n]},o=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},a=(Object.defineProperty(n,"__esModule",{value:!0}),n.parseString=n.parseFile=n.parseStream=n.parse=void 0,function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.hasOwnProperty.call(e,n)&&i(t,e,n);return o(t,e),t}(e("fs"))),s=e("stream"),u=e("./ParserOptions"),c=e("./CsvParserStream"),l=e("./types"),h=n;for(r in l)"default"===r||h.hasOwnProperty(r)||i(h,l,r);var f=e("./CsvParserStream"),d=(Object.defineProperty(n,"CsvParserStream",{enumerable:!0,get:function(){return f.CsvParserStream}}),e("./ParserOptions"));Object.defineProperty(n,"ParserOptions",{enumerable:!0,get:function(){return d.ParserOptions}}),n.parse=function(e){return new c.CsvParserStream(new u.ParserOptions(e))},n.parseStream=function(e,t){return e.pipe(new c.CsvParserStream(new u.ParserOptions(t)))},n.parseFile=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return a.createReadStream(e).pipe(new c.CsvParserStream(new u.ParserOptions(t)))},n.parseString=function(e,t){var n=new s.Readable;return n.push(e),n.push(null),n.pipe(new c.CsvParserStream(new u.ParserOptions(t)))}},{"./CsvParserStream":150,"./ParserOptions":151,"./types":166,fs:215,stream:506}],153:[function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(n,"__esModule",{value:!0}),n.Parser=void 0;var i=e("./Scanner"),o=e("./RowParser"),a=e("./Token"),s=/^\s*(?:''|"")?\s*(?:,\s*(?:''|"")?\s*)*$/,u=(e=[{key:"removeBOM",value:function(e){return e&&65279===e.charCodeAt(0)?e.slice(1):e}}],r((u=c).prototype,[{key:"parse",value:function(e,t){return e=new i.Scanner({line:c.removeBOM(e),parserOptions:this.parserOptions,hasMoreData:t}),this.parserOptions.supportsComments?this.parseWithComments(e):this.parseWithoutComments(e)}},{key:"parseWithoutComments",value:function(e){for(var t=[],n=!0;n;)n=this.parseRow(e,t);return{line:e.line,rows:t}}},{key:"parseWithComments",value:function(e){for(var t=this.parserOptions,n=[],r=e.nextCharacterToken;null!==r;r=e.nextCharacterToken)if(a.Token.isTokenComment(r,t)){if(null===e.advancePastLine())return{line:e.lineFromCursor,rows:n};if(!e.hasMoreCharacters)return{line:e.lineFromCursor,rows:n};e.truncateToCursor()}else if(!this.parseRow(e,n))break;return{line:e.line,rows:n}}},{key:"parseRow",value:function(e,t){return!!e.nextNonSpaceToken&&null!==(e=this.rowParser.parse(e))&&(this.parserOptions.ignoreEmpty&&s.test(e.join(""))||t.push(e),!0)}}]),r(u,e),c);function c(e){if(!(this instanceof c))throw new TypeError("Cannot call a class as a function");this.parserOptions=e,this.rowParser=new o.RowParser(this.parserOptions)}n.Parser=u},{"./RowParser":154,"./Scanner":155,"./Token":156}],154:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.RowParser=void 0;var r=e("./column"),i=(e=e("./Token").Token).isTokenRowDelimiter,o=e.isTokenCarriageReturn,a=e.isTokenDelimiter;(function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}})(s.prototype,[{key:"parse",value:function(e){for(var t=this.parserOptions,n=e.hasMoreData,r=e,a=[],s=this.getStartToken(r,a);s;){if(i(s))return r.advancePastToken(s),!r.hasMoreCharacters&&o(s,t)&&n?null:(r.truncateToCursor(),a);if(!this.shouldSkipColumnParse(r,s,a)){var u=this.columnParser.parse(r);if(null===u)return null;a.push(u)}s=r.nextNonSpaceToken}return n?null:(r.truncateToCursor(),a)}},{key:"getStartToken",value:function(e,t){var n=e.nextNonSpaceToken;return null!==n&&a(n,this.parserOptions)?(t.push(""),e.nextNonSpaceToken):n}},{key:"shouldSkipColumnParse",value:function(e,t,n){var r=this.parserOptions;if(a(t,r)){if(e.advancePastToken(t),t=e.nextCharacterToken,!e.hasMoreCharacters||null!==t&&i(t))return n.push(""),!0;if(null!==t&&a(t,r))return n.push(""),!0}return!1}}]),e=s;function s(e){if(!(this instanceof s))throw new TypeError("Cannot call a class as a function");this.parserOptions=e,this.columnParser=new r.ColumnParser(e)}n.RowParser=e},{"./Token":156,"./column":161}],155:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Scanner=void 0;var r=e("./Token"),i=/((?:\r\n)|\n|\r)/;(function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}})(o.prototype,[{key:"advancePastLine",value:function(){var e=i.exec(this.lineFromCursor);return e?(this.cursor+=(e.index||0)+e[0].length,this):this.hasMoreData?null:(this.cursor=this.lineLength,this)}},{key:"advanceTo",value:function(e){return this.cursor=e,this}},{key:"advanceToToken",value:function(e){return this.cursor=e.startCursor,this}},{key:"advancePastToken",value:function(e){return this.cursor=e.endCursor+1,this}},{key:"truncateToCursor",value:function(){return this.line=this.lineFromCursor,this.lineLength=this.line.length,this.cursor=0,this}},{key:"hasMoreCharacters",get:function(){return this.lineLength>this.cursor}},{key:"nextNonSpaceToken",get:function(){var e=this.lineFromCursor,t=this.parserOptions.NEXT_TOKEN_REGEXP;return-1===e.search(t)||null==(t=t.exec(e))?null:(e=t[1],t=this.cursor+(t.index||0),new r.Token({token:e,startCursor:t,endCursor:t+e.length-1}))}},{key:"nextCharacterToken",get:function(){var e=this.cursor;return this.lineLength<=e?null:new r.Token({token:this.line[e],startCursor:e,endCursor:e})}},{key:"lineFromCursor",get:function(){return this.line.substr(this.cursor)}}]),e=o;function o(e){if(!(this instanceof o))throw new TypeError("Cannot call a class as a function");this.cursor=0,this.line=e.line,this.lineLength=this.line.length,this.parserOptions=e.parserOptions,this.hasMoreData=e.hasMoreData,this.cursor=e.cursor||0}n.Scanner=e},{"./Token":156}],156:[function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e){if(!(this instanceof i))throw new TypeError("Cannot call a class as a function");this.token=e.token,this.startCursor=e.startCursor,this.endCursor=e.endCursor}Object.defineProperty(n,"__esModule",{value:!0}),n.Token=void 0,r(i,[{key:"isTokenRowDelimiter",value:function(e){return"\r"===(e=e.token)||"\n"===e||"\r\n"===e}},{key:"isTokenCarriageReturn",value:function(e,t){return e.token===t.carriageReturn}},{key:"isTokenComment",value:function(e,t){return t.supportsComments&&!!e&&e.token===t.comment}},{key:"isTokenEscapeCharacter",value:function(e,t){return e.token===t.escapeChar}},{key:"isTokenQuote",value:function(e,t){return e.token===t.quote}},{key:"isTokenDelimiter",value:function(e,t){return e.token===t.delimiter}}]),n.Token=i},{}],157:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ColumnFormatter=void 0,n.ColumnFormatter=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");t.trim?this.format=function(e){return e.trim()}:t.ltrim?this.format=function(e){return e.trimLeft()}:t.rtrim?this.format=function(e){return e.trimRight()}:this.format=function(e){return e}}},{}],158:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.ColumnParser=void 0;var r=e("./NonQuotedColumnParser"),i=e("./QuotedColumnParser"),o=e("../Token");function a(e){if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");this.parserOptions=e,this.quotedColumnParser=new i.QuotedColumnParser(e),this.nonQuotedColumnParser=new r.NonQuotedColumnParser(e)}(function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}})(a.prototype,[{key:"parse",value:function(e){var t=e.nextNonSpaceToken;return(null!==t&&o.Token.isTokenQuote(t,this.parserOptions)?(e.advanceToToken(t),this.quotedColumnParser):this.nonQuotedColumnParser).parse(e)}}]),n.ColumnParser=a},{"../Token":156,"./NonQuotedColumnParser":159,"./QuotedColumnParser":160}],159:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.NonQuotedColumnParser=void 0;var r=e("./ColumnFormatter"),i=(e=e("../Token").Token).isTokenDelimiter,o=e.isTokenRowDelimiter;(function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}})(a.prototype,[{key:"parse",value:function(e){if(!e.hasMoreCharacters)return null;for(var t=this.parserOptions,n=[],r=e.nextCharacterToken;r&&!i(r,t)&&!o(r);r=e.nextCharacterToken)n.push(r.token),e.advancePastToken(r);return this.columnFormatter.format(n.join(""))}}]),e=a;function a(e){if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");this.parserOptions=e,this.columnFormatter=new r.ColumnFormatter(e)}n.NonQuotedColumnParser=e},{"../Token":156,"./ColumnFormatter":157}],160:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.QuotedColumnParser=void 0;var r=e("./ColumnFormatter"),i=(e=e("../Token").Token).isTokenDelimiter,o=e.isTokenRowDelimiter,a=e.isTokenEscapeCharacter,s=e.isTokenQuote;(function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}})(u.prototype,[{key:"parse",value:function(e){if(!e.hasMoreCharacters)return null;var t=e.cursor,n=(r=this.gatherDataBetweenQuotes(e)).foundClosingQuote,r=r.col;if(n)return this.checkForMalformedColumn(e),r;if(e.advanceTo(t),e.hasMoreData)return null;throw new Error("Parse Error: missing closing: '".concat(this.parserOptions.quote||"","' in line: at '").concat(e.lineFromCursor.replace(/[\r\n]/g,"\\n'"),"'"))}},{key:"gatherDataBetweenQuotes",value:function(e){for(var t=this.parserOptions,n=!1,r=!1,i=[],o=e.nextCharacterToken;!r&&null!==o;o=e.nextCharacterToken){var u,c=s(o,t);!n&&c?n=!0:n&&(a(o,t)&&(e.advancePastToken(o),null!==(u=e.nextCharacterToken)&&(s(u,t)||a(u,t)))?(i.push(u.token),o=u):c?r=!0:i.push(o.token)),e.advancePastToken(o)}return{col:this.columnFormatter.format(i.join("")),foundClosingQuote:r}}},{key:"checkForMalformedColumn",value:function(e){var t=this.parserOptions,n=e.nextNonSpaceToken;if(n){var r=i(n,t),a=o(n);if(!r&&!a)throw r=e.lineFromCursor.substr(0,10).replace(/[\r\n]/g,"\\n'"),new Error("Parse Error: expected: '".concat(t.escapedDelimiter,"' OR new line got: '").concat(n.token,"'. at '").concat(r));e.advanceToToken(n)}else e.hasMoreData||e.advancePastLine()}}]),e=u;function u(e){if(!(this instanceof u))throw new TypeError("Cannot call a class as a function");this.parserOptions=e,this.columnFormatter=new r.ColumnFormatter(e)}n.QuotedColumnParser=e},{"../Token":156,"./ColumnFormatter":157}],161:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e("./ColumnParser"),i=(Object.defineProperty(n,"ColumnParser",{enumerable:!0,get:function(){return r.ColumnParser}}),e("./NonQuotedColumnParser")),o=(Object.defineProperty(n,"NonQuotedColumnParser",{enumerable:!0,get:function(){return i.NonQuotedColumnParser}}),e("./QuotedColumnParser")),a=(Object.defineProperty(n,"QuotedColumnParser",{enumerable:!0,get:function(){return o.QuotedColumnParser}}),e("./ColumnFormatter"));Object.defineProperty(n,"ColumnFormatter",{enumerable:!0,get:function(){return a.ColumnFormatter}})},{"./ColumnFormatter":157,"./ColumnParser":158,"./NonQuotedColumnParser":159,"./QuotedColumnParser":160}],162:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e("./Parser"),i=(Object.defineProperty(n,"Parser",{enumerable:!0,get:function(){return r.Parser}}),e("./RowParser")),o=(Object.defineProperty(n,"RowParser",{enumerable:!0,get:function(){return i.RowParser}}),e("./Scanner")),a=(Object.defineProperty(n,"Scanner",{enumerable:!0,get:function(){return o.Scanner}}),e("./Token")),s=(Object.defineProperty(n,"Token",{enumerable:!0,get:function(){return a.Token}}),e("./column"));Object.defineProperty(n,"ColumnParser",{enumerable:!0,get:function(){return s.ColumnParser}}),Object.defineProperty(n,"NonQuotedColumnParser",{enumerable:!0,get:function(){return s.NonQuotedColumnParser}}),Object.defineProperty(n,"QuotedColumnParser",{enumerable:!0,get:function(){return s.QuotedColumnParser}})},{"./Parser":153,"./RowParser":154,"./Scanner":155,"./Token":156,"./column":161}],163:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0}),n.HeaderTransformer=void 0;var i=r(e("lodash.isundefined")),o=r(e("lodash.isfunction")),a=r(e("lodash.uniq")),s=r(e("lodash.groupby"));function u(e){if(!(this instanceof u))throw new TypeError("Cannot call a class as a function");this.headers=null,this.receivedHeaders=!1,this.shouldUseFirstRow=!1,this.processedFirstRow=!1,!(this.headersLength=0)===(this.parserOptions=e).headers?this.shouldUseFirstRow=!0:Array.isArray(e.headers)?this.setHeaders(e.headers):o.default(e.headers)&&(this.headersTransform=e.headers)}(function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}})(u.prototype,[{key:"transform",value:function(e,t){return this.shouldMapRow(e)?t(null,this.processRow(e)):t(null,{row:null,isValid:!0})}},{key:"shouldMapRow",value:function(e){var t=this.parserOptions;if(!this.headersTransform&&t.renameHeaders&&!this.processedFirstRow){if(this.receivedHeaders)return!(this.processedFirstRow=!0);throw new Error("Error renaming headers: new headers must be provided in an array")}if(this.receivedHeaders||!Array.isArray(e))return!0;if(this.headersTransform)this.setHeaders(this.headersTransform(e));else{if(!this.shouldUseFirstRow)return!0;this.setHeaders(e)}return!1}},{key:"processRow",value:function(e){if(!this.headers)return{row:e,isValid:!0};var t=this.parserOptions;if(!t.discardUnmappedColumns&&e.length>this.headersLength){if(t.strictColumnHandling)return{row:e,isValid:!1,reason:"Column header mismatch expected: ".concat(this.headersLength," columns got: ").concat(e.length)};throw new Error("Unexpected Error: column header mismatch expected: ".concat(this.headersLength," columns got: ").concat(e.length))}return t.strictColumnHandling&&e.length<this.headersLength?{row:e,isValid:!1,reason:"Column header mismatch expected: ".concat(this.headersLength," columns got: ").concat(e.length)}:{row:this.mapHeaders(e),isValid:!0}}},{key:"mapHeaders",value:function(e){for(var t={},n=this.headers,r=this.headersLength,o=0;o<r;o+=1){var a,s=n[o];i.default(s)||(a=e[o],i.default(a)?t[s]="":t[s]=a)}return t}},{key:"setHeaders",value:function(e){var t,n=e.filter((function(e){return!!e}));if(a.default(n).length!==n.length)throw t=s.default(n),n=Object.keys(t).filter((function(e){return 1<t[e].length})),new Error("Duplicate headers found ".concat(JSON.stringify(n)));this.headers=e,this.receivedHeaders=!0,this.headersLength=(null==(n=this.headers)?void 0:n.length)||0}}]),n.HeaderTransformer=u},{"lodash.groupby":427,"lodash.isfunction":430,"lodash.isundefined":432,"lodash.uniq":433}],164:[function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}Object.defineProperty(n,"__esModule",{value:!0}),n.RowTransformerValidator=void 0;var i,o=(i=e("lodash.isfunction"))&&i.__esModule?i:{default:i},a=e("../types");function s(){if(!(this instanceof s))throw new TypeError("Cannot call a class as a function");this._rowTransform=null,this._rowValidator=null}i=[{key:"createTransform",value:function(e){return a.isSyncTransform(e)?function(t,n){var r=null;try{r=e(t)}catch(t){return n(t)}return n(null,r)}:e}},{key:"createValidator",value:function(e){return a.isSyncValidate(e)?function(t,n){n(null,{row:t,isValid:e(t)})}:function(t,n){e(t,(function(e,r,i){return e?n(e):n(null,r?{row:t,isValid:r,reason:i}:{row:t,isValid:!1,reason:i})}))}}}],r((e=s).prototype,[{key:"transformAndValidate",value:function(e,t){var n=this;return this.callTransformer(e,(function(e,r){return e?t(e):r?n.callValidator(r,(function(e,n){return e?t(e):n&&!n.isValid?t(null,{row:r,isValid:!1,reason:n.reason}):t(null,{row:r,isValid:!0})})):t(null,{row:null,isValid:!0})}))}},{key:"callTransformer",value:function(e,t){return this._rowTransform?this._rowTransform(e,t):t(null,e)}},{key:"callValidator",value:function(e,t){return this._rowValidator?this._rowValidator(e,t):t(null,{row:e,isValid:!0})}},{key:"rowTransform",set:function(e){if(!o.default(e))throw new TypeError("The transform should be a function");this._rowTransform=s.createTransform(e)}},{key:"rowValidator",set:function(e){if(!o.default(e))throw new TypeError("The validate should be a function");this._rowValidator=s.createValidator(e)}}]),r(e,i),n.RowTransformerValidator=s},{"../types":166,"lodash.isfunction":430}],165:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e("./RowTransformerValidator"),i=(Object.defineProperty(n,"RowTransformerValidator",{enumerable:!0,get:function(){return r.RowTransformerValidator}}),e("./HeaderTransformer"));Object.defineProperty(n,"HeaderTransformer",{enumerable:!0,get:function(){return i.HeaderTransformer}})},{"./HeaderTransformer":163,"./RowTransformerValidator":164}],166:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isSyncValidate=n.isSyncTransform=void 0,n.isSyncTransform=function(e){return 1===e.length},n.isSyncValidate=function(e){return 1===e.length}},{}],167:[function(e,t,n){"use strict";n.bignum=e("bn.js"),n.define=e("./asn1/api").define,n.base=e("./asn1/base"),n.constants=e("./asn1/constants"),n.decoders=e("./asn1/decoders"),n.encoders=e("./asn1/encoders")},{"./asn1/api":168,"./asn1/base":170,"./asn1/constants":174,"./asn1/decoders":176,"./asn1/encoders":179,"bn.js":181}],168:[function(e,t,n){"use strict";var r=e("./encoders"),i=e("./decoders"),o=e("inherits");function a(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}n.define=function(e,t){return new a(e,t)},a.prototype._createNamed=function(e){var t=this.name;function n(e){this._initNamed(e,t)}return o(n,e),n.prototype._initNamed=function(t,n){e.call(this,t,n)},new n(this)},a.prototype._getDecoder=function(e){return this.decoders.hasOwnProperty(e=e||"der")||(this.decoders[e]=this._createNamed(i[e])),this.decoders[e]},a.prototype.decode=function(e,t,n){return this._getDecoder(t).decode(e,n)},a.prototype._getEncoder=function(e){return this.encoders.hasOwnProperty(e=e||"der")||(this.encoders[e]=this._createNamed(r[e])),this.encoders[e]},a.prototype.encode=function(e,t,n){return this._getEncoder(t).encode(e,n)}},{"./decoders":176,"./encoders":179,inherits:387}],169:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=e("inherits"),o=e("../base/reporter").Reporter,a=e("safer-buffer").Buffer;function s(e,t){o.call(this,t),a.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function u(e,t){if(Array.isArray(e))this.length=0,this.value=e.map((function(e){return u.isEncoderBuffer(e)||(e=new u(e,t)),this.length+=e.length,e}),this);else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=a.byteLength(e);else{if(!a.isBuffer(e))return t.error("Unsupported type: "+r(e));this.value=e,this.length=e.length}}i(s,o),(n.DecoderBuffer=s).isDecoderBuffer=function(e){return e instanceof s||"object"===r(e)&&a.isBuffer(e.base)&&"DecoderBuffer"===e.constructor.name&&"number"==typeof e.offset&&"number"==typeof e.length&&"function"==typeof e.save&&"function"==typeof e.restore&&"function"==typeof e.isEmpty&&"function"==typeof e.readUInt8&&"function"==typeof e.skip&&"function"==typeof e.raw},s.prototype.save=function(){return{offset:this.offset,reporter:o.prototype.save.call(this)}},s.prototype.restore=function(e){var t=new s(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,o.prototype.restore.call(this,e.reporter),t},s.prototype.isEmpty=function(){return this.offset===this.length},s.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},s.prototype.skip=function(e,t){var n;return this.offset+e<=this.length?((n=new s(this.base))._reporterState=this._reporterState,n.offset=this.offset,n.length=this.offset+e,this.offset+=e,n):this.error(t||"DecoderBuffer overrun")},s.prototype.raw=function(e){return this.base.slice((e||this).offset,this.length)},(n.EncoderBuffer=u).isEncoderBuffer=function(e){return e instanceof u||"object"===r(e)&&"EncoderBuffer"===e.constructor.name&&"number"==typeof e.length&&"function"==typeof e.join},u.prototype.join=function(e,t){return e=e||a.alloc(this.length),t=t||0,0!==this.length&&(Array.isArray(this.value)?this.value.forEach((function(n){n.join(e,t),t+=n.length})):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):a.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length)),e}},{"../base/reporter":172,inherits:387,"safer-buffer":495}],170:[function(e,t,n){"use strict";n.Reporter=e("./reporter").Reporter,n.DecoderBuffer=e("./buffer").DecoderBuffer,n.EncoderBuffer=e("./buffer").EncoderBuffer,n.Node=e("./node")},{"./buffer":169,"./node":171,"./reporter":172}],171:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=e("../base/reporter").Reporter,o=e("../base/buffer").EncoderBuffer,a=e("../base/buffer").DecoderBuffer,s=e("minimalistic-assert"),u=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(e=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"]);function c(e,t,n){var r={};(this._baseState=r).name=n,r.enc=e,r.parent=t||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}t.exports=c;var l=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];c.prototype.clone=function(){var e=this._baseState,t={},n=(l.forEach((function(n){t[n]=e[n]})),new this.constructor(t.parent));return n._baseState=t,n},c.prototype._wrap=function(){var e=this._baseState;u.forEach((function(t){this[t]=function(){var n=new this.constructor(this);return e.children.push(n),n[t].apply(n,arguments)}}),this)},c.prototype._init=function(e){var t=this._baseState;s(null===t.parent),e.call(this),t.children=t.children.filter((function(e){return e._baseState.parent===this}),this),s.equal(t.children.length,1,"Root node can have only one child")},c.prototype._useArgs=function(e){var t=this._baseState,n=e.filter((function(e){return e instanceof this.constructor}),this);e=e.filter((function(e){return!(e instanceof this.constructor)}),this),0!==n.length&&(s(null===t.children),(t.children=n).forEach((function(e){e._baseState.parent=this}),this)),0!==e.length&&(s(null===t.args),t.args=e,t.reverseArgs=e.map((function(e){var t;return"object"!==r(e)||e.constructor!==Object?e:(t={},Object.keys(e).forEach((function(n){n==(0|n)&&(n|=0);var r=e[n];t[r]=n})),t)})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(e){c.prototype[e]=function(){var t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}})),e.forEach((function(e){c.prototype[e]=function(){var t=this._baseState,n=Array.prototype.slice.call(arguments);return s(null===t.tag),t.tag=e,this._useArgs(n),this}})),c.prototype.use=function(e){s(e);var t=this._baseState;return s(null===t.use),t.use=e,this},c.prototype.optional=function(){return this._baseState.optional=!0,this},c.prototype.def=function(e){var t=this._baseState;return s(null===t.default),t.default=e,t.optional=!0,this},c.prototype.explicit=function(e){var t=this._baseState;return s(null===t.explicit&&null===t.implicit),t.explicit=e,this},c.prototype.implicit=function(e){var t=this._baseState;return s(null===t.explicit&&null===t.implicit),t.implicit=e,this},c.prototype.obj=function(){var e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},c.prototype.key=function(e){var t=this._baseState;return s(null===t.key),t.key=e,this},c.prototype.any=function(){return this._baseState.any=!0,this},c.prototype.choice=function(e){var t=this._baseState;return s(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map((function(t){return e[t]}))),this},c.prototype.contains=function(e){var t=this._baseState;return s(null===t.use),t.contains=e,this},c.prototype._decode=function(e,t){var n=this._baseState;if(null===n.parent)return e.wrapResult(n.children[0]._decode(e,t));var r,i=n.default,o=!0,s=null;if(null!==n.key&&(s=e.enterKey(n.key)),n.optional){var u=null;if(null!==n.explicit?u=n.explicit:null!==n.implicit?u=n.implicit:null!==n.tag&&(u=n.tag),null!==u||n.any){if(o=this._peekTag(e,u,n.any),e.isError(o))return o}else{u=e.save();try{null===n.choice?this._decodeGeneric(n.tag,e,t):this._decodeChoice(e,t),o=!0}catch(e){o=!1}e.restore(u)}}if(n.obj&&o&&(r=e.enterObject()),o){if(null!==n.explicit){if(u=this._decodeTag(e,n.explicit),e.isError(u))return u;e=u}if(u=e.offset,null===n.use&&null===n.choice){n.any&&(c=e.save());var c,l=this._decodeTag(e,null!==n.implicit?n.implicit:n.tag,n.any);if(e.isError(l))return l;n.any?i=e.raw(c):e=l}if(t&&t.track&&null!==n.tag&&t.track(e.path(),u,e.length,"tagged"),t&&t.track&&null!==n.tag&&t.track(e.path(),e.offset,e.length,"content"),n.any||(i=null===n.choice?this._decodeGeneric(n.tag,e,t):this._decodeChoice(e,t)),e.isError(i))return i;n.any||null!==n.choice||null===n.children||n.children.forEach((function(n){n._decode(e,t)})),!n.contains||"octstr"!==n.tag&&"bitstr"!==n.tag||(c=new a(i),i=this._getUse(n.contains,e._reporterState.obj)._decode(c,t))}return n.obj&&o&&(i=e.leaveObject(r)),null===n.key||null===i&&!0!==o?null!==s&&e.exitKey(s):e.leaveKey(s,n.key,i),i},c.prototype._decodeGeneric=function(e,t,n){var r=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,r.args[0],n):/str$/.test(e)?this._decodeStr(t,e,n):"objid"===e&&r.args?this._decodeObjid(t,r.args[0],r.args[1],n):"objid"===e?this._decodeObjid(t,null,null,n):"gentime"===e||"utctime"===e?this._decodeTime(t,e,n):"null_"===e?this._decodeNull(t,n):"bool"===e?this._decodeBool(t,n):"objDesc"===e?this._decodeStr(t,e,n):"int"===e||"enum"===e?this._decodeInt(t,r.args&&r.args[0],n):null!==r.use?this._getUse(r.use,t._reporterState.obj)._decode(t,n):t.error("unknown tag: "+e)},c.prototype._getUse=function(e,t){var n=this._baseState;return n.useDecoder=this._use(e,t),s(null===n.useDecoder._baseState.parent),n.useDecoder=n.useDecoder._baseState.children[0],n.implicit!==n.useDecoder._baseState.implicit&&(n.useDecoder=n.useDecoder.clone(),n.useDecoder._baseState.implicit=n.implicit),n.useDecoder},c.prototype._decodeChoice=function(e,t){var n=this._baseState,r=null,i=!1;return Object.keys(n.choice).some((function(o){var a=e.save(),s=n.choice[o];try{var u=s._decode(e,t);if(e.isError(u))return!1;r={type:o,value:u},i=!0}catch(o){return e.restore(a),!1}return!0}),this),i?r:e.error("Choice not matched")},c.prototype._createEncoderBuffer=function(e){return new o(e,this.reporter)},c.prototype._encode=function(e,t,n){var r=this._baseState;if((null===r.default||r.default!==e)&&void 0!==(r=this._encodeValue(e,t,n))&&!this._skipDefault(r,t,n))return r},c.prototype._encodeValue=function(e,t,n){var o=this._baseState;if(null===o.parent)return o.children[0]._encode(e,t||new i);var a=null;if(this.reporter=t,o.optional&&void 0===e){if(null===o.default)return;e=o.default}var s=null,u=!1;if(o.any)a=this._createEncoderBuffer(e);else if(o.choice)a=this._encodeChoice(e,t);else if(o.contains)s=this._getUse(o.contains,n)._encode(e,t),u=!0;else if(o.children)s=o.children.map((function(n){var i;return"null_"===n._baseState.tag?n._encode(null,t,e):null===n._baseState.key?t.error("Child should have a key"):(i=t.enterKey(n._baseState.key),"object"!==r(e)?t.error("Child expected, but input is not object"):(n=n._encode(e[n._baseState.key],t,e),t.leaveKey(i),n))}),this).filter((function(e){return e})),s=this._createEncoderBuffer(s);else if("seqof"===o.tag||"setof"===o.tag){if(!o.args||1!==o.args.length)return t.error("Too many args for : "+o.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");var c=this.clone();c._baseState.implicit=null,s=this._createEncoderBuffer(e.map((function(n){var r=this._baseState;return this._getUse(r.args[0],e)._encode(n,t)}),c))}else null!==o.use?a=this._getUse(o.use,n)._encode(e,t):(s=this._encodePrimitive(o.tag,e),u=!0);return o.any||null!==o.choice||(c=null!==o.implicit?o.implicit:o.tag,n=null===o.implicit?"universal":"context",null===c?null===o.use&&t.error("Tag could be omitted only for .use()"):null===o.use&&(a=this._encodeComposite(c,u,n,s))),null!==o.explicit?this._encodeComposite(o.explicit,!1,"context",a):a},c.prototype._encodeChoice=function(e,t){var n=this._baseState,r=n.choice[e.type];return r||s(!1,e.type+" not found in "+JSON.stringify(Object.keys(n.choice))),r._encode(e.value,t)},c.prototype._encodePrimitive=function(e,t){var n=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&n.args)return this._encodeObjid(t,n.reverseArgs[0],n.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,n.args&&n.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},c.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},c.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(e)}},{"../base/buffer":169,"../base/reporter":172,"minimalistic-assert":437}],172:[function(e,t,n){"use strict";function r(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function i(e,t){this.path=e,this.rethrow(t)}e=e("inherits"),(n.Reporter=r).prototype.isError=function(e){return e instanceof i},r.prototype.save=function(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},r.prototype.restore=function(e){var t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},r.prototype.enterKey=function(e){return this._reporterState.path.push(e)},r.prototype.exitKey=function(e){var t=this._reporterState;t.path=t.path.slice(0,e-1)},r.prototype.leaveKey=function(e,t,n){var r=this._reporterState;this.exitKey(e),null!==r.obj&&(r.obj[t]=n)},r.prototype.path=function(){return this._reporterState.path.join("/")},r.prototype.enterObject=function(){var e=this._reporterState,t=e.obj;return e.obj={},t},r.prototype.leaveObject=function(e){var t=this._reporterState,n=t.obj;return t.obj=e,n},r.prototype.error=function(e){var t=this._reporterState,n=e instanceof i;e=n?e:new i(t.path.map((function(e){return"["+JSON.stringify(e)+"]"})).join(""),e.message||e,e.stack);if(t.options.partial)return n||t.errors.push(e),e;throw e},r.prototype.wrapResult=function(e){var t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},e(i,Error),i.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,i),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},{inherits:387}],173:[function(e,t,n){"use strict";function r(e){var t={};return Object.keys(e).forEach((function(n){(0|n)==n&&(n|=0);var r=e[n];t[r]=n})),t}n.tagClass={0:"universal",1:"application",2:"context",3:"private"},n.tagClassByName=r(n.tagClass),n.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},n.tagByName=r(n.tag)},{}],174:[function(e,t,n){"use strict";n._reverse=function(e){var t={};return Object.keys(e).forEach((function(n){(0|n)==n&&(n|=0);var r=e[n];t[r]=n})),t},n.der=e("./der")},{"./der":173}],175:[function(e,t,n){"use strict";var r=e("inherits"),i=e("bn.js"),o=e("../base/buffer").DecoderBuffer,a=e("../base/node"),s=e("../constants/der");function u(e){a.call(this,"der",e)}function c(e,t){var n=e.readUInt8(t);if(e.isError(n))return n;var r=s.tagClass[n>>6],i=0==(32&n);if(31==(31&n)){var o=n;for(n=0;128==(128&o);){if(o=e.readUInt8(t),e.isError(o))return o;n=n<<7|127&o}}else n&=31;return{cls:r,primitive:i,tag:n,tagStr:s.tag[n]}}function l(e,t,n){var r=e.readUInt8(n);if(!e.isError(r)){if(!t&&128===r)return null;if(0!=(128&r)){var i=127&r;if(4<i)return e.error("length octect is too long");r=0;for(var o=0;o<i;o++){r<<=8;var a=e.readUInt8(n);if(e.isError(a))return a;r|=a}}}return r}(t.exports=function(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new u,this.tree._init(e.body)}).prototype.decode=function(e,t){return o.isDecoderBuffer(e)||(e=new o(e,t)),this.tree._decode(e,t)},r(u,a),u.prototype._peekTag=function(e,t,n){var r,i;return!e.isEmpty()&&(r=e.save(),i=c(e,'Failed to peek tag: "'+t+'"'),e.isError(i)?i:(e.restore(r),i.tag===t||i.tagStr===t||i.tagStr+"of"===t||n))},u.prototype._decodeTag=function(e,t,n){var r,i=c(e,'Failed to decode tag of "'+t+'"');return e.isError(i)?i:(r=l(e,i.primitive,'Failed to get length of "'+t+'"'),e.isError(r)?r:n||i.tag===t||i.tagStr===t||i.tagStr+"of"===t?i.primitive||null!==r?e.skip(r,'Failed to match body of: "'+t+'"'):(n=e.save(),i=this._skipUntilEnd(e,'Failed to skip indefinite length body: "'+this.tag+'"'),e.isError(i)?i:(r=e.offset-n.offset,e.restore(n),e.skip(r,'Failed to match body of: "'+t+'"'))):e.error('Failed to match tag: "'+t+'"'))},u.prototype._skipUntilEnd=function(e,t){for(;;){var n=c(e,t);if(e.isError(n))return n;var r=l(e,n.primitive,t);if(e.isError(r))return r;if(r=n.primitive||null!==r?e.skip(r):this._skipUntilEnd(e,t),e.isError(r))return r;if("end"===n.tagStr)break}},u.prototype._decodeList=function(e,t,n,r){for(var i=[];!e.isEmpty();){var o=this._peekTag(e,"end");if(e.isError(o))return o;var a=n.decode(e,"der",r);if(e.isError(a)&&o)break;i.push(a)}return i},u.prototype._decodeStr=function(e,t){var n;if("bitstr"===t)return n=e.readUInt8(),e.isError(n)?n:{unused:n,data:e.raw()};if("bmpstr"!==t)return"numstr"===t?(n=e.raw().toString("ascii"),this._isNumstr(n)?n:e.error("Decoding of string type: numstr unsupported characters")):"octstr"===t||"objDesc"===t?e.raw():"printstr"===t?(n=e.raw().toString("ascii"),this._isPrintstr(n)?n:e.error("Decoding of string type: printstr unsupported characters")):/str$/.test(t)?e.raw().toString():e.error("Decoding of string type: "+t+" unsupported");var r=e.raw();if(r.length%2==1)return e.error("Decoding of string type: bmpstr length mismatch");for(var i="",o=0;o<r.length/2;o++)i+=String.fromCharCode(r.readUInt16BE(2*o));return i},u.prototype._decodeObjid=function(e,t,n){for(var r=[],i=0,o=0;!e.isEmpty();)i=(i<<=7)|127&(o=e.readUInt8()),0==(128&o)&&(r.push(i),i=0);128&o&&r.push(i);var a=r[0]/40|0,s=r[0]%40;n=n?r:[a,s].concat(r.slice(1));return t&&void 0!==(a=void 0===(a=t[n.join(" ")])?t[n.join(".")]:a)?a:n},u.prototype._decodeTime=function(e,t){var n,r,i,o,a,s,u=e.raw().toString();if("gentime"===t)n=0|u.slice(0,4),r=0|u.slice(4,6),i=0|u.slice(6,8),o=0|u.slice(8,10),a=0|u.slice(10,12),s=0|u.slice(12,14);else{if("utctime"!==t)return e.error("Decoding "+t+" time is not supported yet");n=0|u.slice(0,2),r=0|u.slice(2,4),i=0|u.slice(4,6),o=0|u.slice(6,8),a=0|u.slice(8,10),s=0|u.slice(10,12),n=n<70?2e3+n:1900+n}return Date.UTC(n,r-1,i,o,a,s,0)},u.prototype._decodeNull=function(){return null},u.prototype._decodeBool=function(e){var t=e.readUInt8();return e.isError(t)?t:0!==t},u.prototype._decodeInt=function(e,t){return e=e.raw(),e=new i(e),t&&t[e.toString(10)]||e},u.prototype._use=function(e,t){return(e="function"==typeof e?e(t):e)._getDecoder("der").tree}},{"../base/buffer":169,"../base/node":171,"../constants/der":173,"bn.js":181,inherits:387}],176:[function(e,t,n){"use strict";n.der=e("./der"),n.pem=e("./pem")},{"./der":175,"./pem":177}],177:[function(e,t,n){"use strict";var r=e("inherits"),i=e("safer-buffer").Buffer,o=e("./der");function a(e){o.call(this,e),this.enc="pem"}r(a,o),(t.exports=a).prototype.decode=function(e,t){for(var n=e.toString().split(/[\r\n]+/g),r=t.label.toUpperCase(),a=/^-----(BEGIN|END) ([^-]+)-----$/,s=-1,u=-1,c=0;c<n.length;c++){var l=n[c].match(a);if(null!==l&&l[2]===r){if(-1!==s){if("END"!==l[1])break;u=c;break}if("BEGIN"!==l[1])break;s=c}}if(-1===s||-1===u)throw new Error("PEM section not found for: "+r);return(e=n.slice(s+1,u).join("")).replace(/[^a-z0-9+/=]+/gi,""),e=i.from(e,"base64"),o.prototype.decode.call(this,e,t)}},{"./der":175,inherits:387,"safer-buffer":495}],178:[function(e,t,n){"use strict";var r=e("inherits"),i=e("safer-buffer").Buffer,o=e("../base/node"),a=e("../constants/der");function s(e){o.call(this,"der",e)}function u(e){return e<10?"0"+e:e}(t.exports=function(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new s,this.tree._init(e.body)}).prototype.encode=function(e,t){return this.tree._encode(e,t).join()},r(s,o),s.prototype._encodeComposite=function(e,t,n,r){if(e=function(e,t,n,r){var i;if("seqof"===e?e="seq":"setof"===e&&(e="set"),a.tagByName.hasOwnProperty(e))i=a.tagByName[e];else{if("number"!=typeof e||(0|e)!==e)return r.error("Unknown tag: "+e);i=e}return 31<=i?r.error("Multi-octet tag encoding unsupported"):(t||(i|=32),i|a.tagClassByName[n||"universal"]<<6)}(e,t,n,this.reporter),r.length<128)return(t=i.alloc(2))[0]=e,t[1]=r.length,this._createEncoderBuffer([t,r]);for(var o=1,s=r.length;256<=s;s>>=8)o++;var u=i.alloc(2+o);u[0]=e,u[1]=128|o;for(var c=1+o,l=r.length;0<l;c--,l>>=8)u[c]=255&l;return this._createEncoderBuffer([u,r])},s.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"!==t)return"numstr"===t?this._isNumstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===t?this._isPrintstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(t)||"objDesc"===t?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: "+t+" unsupported");for(var n=i.alloc(2*e.length),r=0;r<e.length;r++)n.writeUInt16BE(e.charCodeAt(r),2*r);return this._createEncoderBuffer(n)},s.prototype._encodeObjid=function(e,t,n){if("string"==typeof e){if(!t)return this.reporter.error("string objid given, but no values map found");if(!t.hasOwnProperty(e))return this.reporter.error("objid not found in values map");e=t[e].split(/[\s.]+/g);for(var r=0;r<e.length;r++)e[r]|=0}else if(Array.isArray(e)){e=e.slice();for(var o=0;o<e.length;o++)e[o]|=0}if(!Array.isArray(e))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(e));if(!n){if(40<=e[1])return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}for(var a=0,s=0;s<e.length;s++){var u=e[s];for(a++;128<=u;u>>=7)a++}for(var c=i.alloc(a),l=c.length-1,h=e.length-1;0<=h;h--){var f=e[h];for(c[l--]=127&f;0<(f>>=7);)c[l--]=128|127&f}return this._createEncoderBuffer(c)},s.prototype._encodeTime=function(e,t){var n;e=new Date(e);return"gentime"===t?n=[u(e.getUTCFullYear()),u(e.getUTCMonth()+1),u(e.getUTCDate()),u(e.getUTCHours()),u(e.getUTCMinutes()),u(e.getUTCSeconds()),"Z"].join(""):"utctime"===t?n=[u(e.getUTCFullYear()%100),u(e.getUTCMonth()+1),u(e.getUTCDate()),u(e.getUTCHours()),u(e.getUTCMinutes()),u(e.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(n,"octstr")},s.prototype._encodeNull=function(){return this._createEncoderBuffer("")},s.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"==typeof e||i.isBuffer(e)||(t=e.toArray(),!e.sign&&128&t[0]&&t.unshift(0),e=i.from(t)),i.isBuffer(e))return t=e.length,0===e.length&&t++,t=i.alloc(t),e.copy(t),0===e.length&&(t[0]=0),this._createEncoderBuffer(t);if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);for(var n=1,r=e;256<=r;r>>=8)n++;for(var o=new Array(n),a=o.length-1;0<=a;a--)o[a]=255&e,e>>=8;return 128&o[0]&&o.unshift(0),this._createEncoderBuffer(i.from(o))},s.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},s.prototype._use=function(e,t){return(e="function"==typeof e?e(t):e)._getEncoder("der").tree},s.prototype._skipDefault=function(e,t,n){var r,i=this._baseState;if(null===i.default)return!1;var o=e.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,t,n).join()),o.length!==i.defaultBuffer.length)return!1;for(r=0;r<o.length;r++)if(o[r]!==i.defaultBuffer[r])return!1;return!0}},{"../base/node":171,"../constants/der":173,inherits:387,"safer-buffer":495}],179:[function(e,t,n){"use strict";n.der=e("./der"),n.pem=e("./pem")},{"./der":178,"./pem":180}],180:[function(e,t,n){"use strict";var r=e("inherits"),i=e("./der");function o(e){i.call(this,e),this.enc="pem"}r(o,i),(t.exports=o).prototype.encode=function(e,t){for(var n=i.prototype.encode.call(this,e).toString("base64"),r=["-----BEGIN "+t.label+"-----"],o=0;o<n.length;o+=64)r.push(n.slice(o,o+64));return r.push("-----END "+t.label+"-----"),r.join("\n")}},{"./der":178,inherits:387}],181:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i;function o(e,t){if(!e)throw new Error(t||"Assertion failed")}function a(e,t){function n(){}e.super_=t,n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function s(e,t,n){if(s.isBN(e))return e;this.negative=0,this.words=null,this.length=0,(this.red=null)!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}"object"===r(t=void 0===t||t)?t.exports=s:(void 0).BN=s,(s.BN=s).wordSize=26;try{i=e("buffer").Buffer}catch(e){}function u(e,t,n){for(var r=0,i=Math.min(e.length,n),o=t;o<i;o++){var a=e.charCodeAt(o)-48;r=r<<4|(49<=a&&a<=54?a-49+10:17<=a&&a<=22?a-17+10:15&a)}return r}function c(e,t,n,r){for(var i=0,o=Math.min(e.length,n),a=t;a<o;a++){var s=e.charCodeAt(a)-48;i=i*r+(49<=s?s-49+10:17<=s?s-17+10:s)}return i}s.isBN=function(e){return e instanceof s||null!==e&&"object"===r(e)&&e.constructor.wordSize===s.wordSize&&Array.isArray(e.words)},s.max=function(e,t){return 0<e.cmp(t)?e:t},s.min=function(e,t){return e.cmp(t)<0?e:t},s.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"===r(e))return this._initArray(e,t,n);o((t="hex"===t?16:t)===(0|t)&&2<=t&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this.strip(),"le"===n&&this._initArray(this.toArray(),t,n)},s.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(o(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),t,n)},s.prototype._initArray=function(e,t,n){if(o("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,a,s=0;if("be"===n)for(r=e.length-1,i=0;0<=r;r-=3)a=e[r]|e[r-1]<<8|e[r-2]<<16,this.words[i]|=a<<s&67108863,this.words[i+1]=a>>>26-s&67108863,26<=(s+=24)&&(s-=26,i++);else if("le"===n)for(i=r=0;r<e.length;r+=3)a=e[r]|e[r+1]<<8|e[r+2]<<16,this.words[i]|=a<<s&67108863,this.words[i+1]=a>>>26-s&67108863,26<=(s+=24)&&(s-=26,i++);return this.strip()},s.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;for(var r,i=0,o=(n=e.length-6,0);t<=n;n-=6)r=u(e,n,n+6),this.words[o]|=r<<i&67108863,this.words[o+1]|=r>>>26-i&4194303,26<=(i+=24)&&(i-=26,o++);n+6!==t&&(r=u(e,t,n+6),this.words[o]|=r<<i&67108863,this.words[o+1]|=r>>>26-i&4194303),this.strip()},s.prototype._parseBase=function(e,t,n){this.words=[0];for(var r=0,i=this.length=1;i<=67108863;i*=t)r++;i=i/t|0;for(var o=e.length-n,a=o%--r,s=Math.min(o,o-a)+n,u=0,l=n;l<s;l+=r)u=c(e,l,l+r,t),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!=a){var h=1;for(u=c(e,l,e.length,t),l=0;l<a;l++)h*=t;this.imuln(h),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}},s.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},s.prototype.clone=function(){var e=new s(null);return this.copy(e),e},s.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},s.prototype.strip=function(){for(;1<this.length&&0===this.words[this.length-1];)this.length--;return this._normSign()},s.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},s.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var l=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function d(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0,i=(r=(n.length=r)-1|0,(0|e.words[0])*(0|t.words[0])),o=i/67108864|0;n.words[0]=67108863&i;for(var a=1;a<r;a++){for(var s=o>>>26,u=67108863&o,c=Math.min(a,t.length-1),l=Math.max(0,a-e.length+1);l<=c;l++)s+=(i=(0|e.words[a-l|0])*(0|t.words[l])+u)/67108864|0,u=67108863&i;n.words[a]=0|u,o=0|s}return 0!==o?n.words[a]=0|o:n.length--,n.strip()}s.prototype.toString=function(e,t){if(t=0|t||1,16===(e=e||10)||"hex"===e){u="";for(var n=0,r=0,i=0;i<this.length;i++){var a=this.words[i],s=(16777215&(a<<n|r)).toString(16),u=0!=(r=a>>>24-n&16777215)||i!==this.length-1?l[6-s.length]+s+u:s+u;26<=(n+=2)&&(n-=26,i--)}for(0!==r&&(u=r.toString(16)+u);u.length%t!=0;)u="0"+u;return 0!==this.negative?"-"+u:u}if(e===(0|e)&&2<=e&&e<=36){var c=h[e],d=f[e],p=(u="",this.clone());for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(e);u=(p=p.idivn(d)).isZero()?m+u:l[c-m.length]+m+u}for(this.isZero()&&(u="0"+u);u.length%t!=0;)u="0"+u;return 0!==this.negative?"-"+u:u}o(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:2<this.length&&o(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},s.prototype.toJSON=function(){return this.toString(16)},s.prototype.toBuffer=function(e,t){return o(void 0!==i),this.toArrayLike(i,e,t)},s.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},s.prototype.toArrayLike=function(e,t,n){var r=this.byteLength(),i=n||Math.max(1,r);o(r<=i,"byte array longer than desired length"),o(0<i,"Requested array length <= 0"),this.strip();n="le"===t;var a,s,u=new e(i),c=this.clone();if(n){for(s=0;!c.isZero();s++)a=c.andln(255),c.iushrn(8),u[s]=a;for(;s<i;s++)u[s]=0}else{for(s=0;s<i-r;s++)u[s]=0;for(s=0;!c.isZero();s++)a=c.andln(255),c.iushrn(8),u[i-s-1]=a}return u},Math.clz32?s.prototype._countBits=function(e){return 32-Math.clz32(e)}:s.prototype._countBits=function(e){var t=0;return 4096<=e&&(t+=13,e>>>=13),64<=e&&(t+=7,e>>>=7),8<=e&&(t+=4,e>>>=4),2<=e&&(t+=2,e>>>=2),t+e},s.prototype._zeroBits=function(e){var t;return 0===e?26:((t=0)==(8191&(e=e))&&(t+=13,e>>>=13),0==(127&e)&&(t+=7,e>>>=7),0==(15&e)&&(t+=4,e>>>=4),0==(3&e)&&(t+=2,e>>>=2),0==(1&e)&&t++,t)},s.prototype.bitLength=function(){var e=this.words[this.length-1];e=this._countBits(e);return 26*(this.length-1)+e},s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,26!==n)break}return e},s.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},s.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},s.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},s.prototype.isNeg=function(){return 0!==this.negative},s.prototype.neg=function(){return this.clone().ineg()},s.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},s.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},s.prototype.ior=function(e){return o(0==(this.negative|e.negative)),this.iuor(e)},s.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},s.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},s.prototype.iuand=function(e){for(var t=this.length>e.length?e:this,n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this.strip()},s.prototype.iand=function(e){return o(0==(this.negative|e.negative)),this.iuand(e)},s.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},s.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},s.prototype.iuxor=function(e){for(var t,n=this.length>e.length?(t=this,e):(t=e,this),r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this.strip()},s.prototype.ixor=function(e){return o(0==(this.negative|e.negative)),this.iuxor(e)},s.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},s.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},s.prototype.inotn=function(e){o("number"==typeof e&&0<=e);var t=0|Math.ceil(e/26);e%=26;this._expand(t),0<e&&t--;for(var n=0;n<t;n++)this.words[n]=67108863&~this.words[n];return 0<e&&(this.words[n]=~this.words[n]&67108863>>26-e),this.strip()},s.prototype.notn=function(e){return this.clone().inotn(e)},s.prototype.setn=function(e,t){o("number"==typeof e&&0<=e);var n=e/26|0;e%=26;return this._expand(1+n),this.words[n]=t?this.words[n]|1<<e:this.words[n]&~(1<<e),this.strip()},s.prototype.iadd=function(e){var t,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();for(var r=this.length>e.length?(n=this,e):(n=e,this),i=0,o=0;o<r.length;o++)t=(0|n.words[o])+(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26;for(;0!==i&&o<n.length;o++)t=(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;o<n.length;o++)this.words[o]=n.words[o];return this},s.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},s.prototype.isub=function(e){var t;if(0!==e.negative)return e.negative=0,t=this.iadd(e),e.negative=1,t._normSign();if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r=this.cmp(e);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;for(var i=0<r?(n=this,e):(n=e,this),o=0,a=0;a<i.length;a++)o=(t=(0|n.words[a])-(0|i.words[a])+o)>>26,this.words[a]=67108863&t;for(;0!==o&&a<n.length;a++)o=(t=(0|n.words[a])+o)>>26,this.words[a]=67108863&t;if(0===o&&a<n.length&&n!==this)for(;a<n.length;a++)this.words[a]=n.words[a];return this.length=Math.max(this.length,a),n!==this&&(this.negative=1),this.strip()},s.prototype.sub=function(e){return this.clone().isub(e)};var p=function(e,t,n){var r=e.words,i=t.words,o=n.words,a=8191&(s=0|r[0]),s=s>>>13,u=8191&(c=0|r[1]),c=c>>>13,l=8191&(h=0|r[2]),h=h>>>13,f=8191&(d=0|r[3]),d=d>>>13,p=8191&(m=0|r[4]),m=m>>>13,g=8191&(A=0|r[5]),A=A>>>13,v=8191&(b=0|r[6]),b=b>>>13,y=8191&(w=0|r[7]),w=w>>>13,x=8191&(C=0|r[8]),C=C>>>13,k=8191&(r=0|r[9]),E=(r=r>>>13,8191&(S=0|i[0])),S=S>>>13,_=8191&(O=0|i[1]),O=O>>>13,T=8191&(D=0|i[2]),D=D>>>13,B=8191&(I=0|i[3]),I=I>>>13,M=8191&(j=0|i[4]),j=j>>>13,N=8191&(F=0|i[5]),F=F>>>13,R=8191&(P=0|i[6]),P=P>>>13,L=8191&(U=0|i[7]),U=U>>>13,z=8191&(H=0|i[8]),H=H>>>13,$=8191&(i=0|i[9]),Q=(i=i>>>13,n.negative=e.negative^t.negative,n.length=19,(0+(e=Math.imul(a,E))|0)+((8191&(t=Math.imul(a,S)+Math.imul(s,E)|0))<<13)|0),V=(Math.imul(s,S)+(t>>>13)|0)+(Q>>>26)|0,q=(e=(Q&=67108863,Math.imul(u,E)),t=Math.imul(u,S)+Math.imul(c,E)|0,Math.imul(c,S)),G=(V+(e=e+Math.imul(a,_)|0)|0)+((8191&(t=(t+Math.imul(a,O)|0)+Math.imul(s,_)|0))<<13)|0,W=(V=((q+Math.imul(s,O)|0)+(t>>>13)|0)+(G>>>26)|0,G&=67108863,e=Math.imul(l,E),t=Math.imul(l,S)+Math.imul(h,E)|0,q=Math.imul(h,S),e=e+Math.imul(u,_)|0,t=(t+Math.imul(u,O)|0)+Math.imul(c,_)|0,q=q+Math.imul(c,O)|0,(V+(e=e+Math.imul(a,T)|0)|0)+((8191&(t=(t+Math.imul(a,D)|0)+Math.imul(s,T)|0))<<13)|0),K=(V=((q+Math.imul(s,D)|0)+(t>>>13)|0)+(W>>>26)|0,W&=67108863,e=Math.imul(f,E),t=Math.imul(f,S)+Math.imul(d,E)|0,q=Math.imul(d,S),e=e+Math.imul(l,_)|0,t=(t+Math.imul(l,O)|0)+Math.imul(h,_)|0,q=q+Math.imul(h,O)|0,e=e+Math.imul(u,T)|0,t=(t+Math.imul(u,D)|0)+Math.imul(c,T)|0,q=q+Math.imul(c,D)|0,(V+(e=e+Math.imul(a,B)|0)|0)+((8191&(t=(t+Math.imul(a,I)|0)+Math.imul(s,B)|0))<<13)|0),Y=(V=((q+Math.imul(s,I)|0)+(t>>>13)|0)+(K>>>26)|0,K&=67108863,e=Math.imul(p,E),t=Math.imul(p,S)+Math.imul(m,E)|0,q=Math.imul(m,S),e=e+Math.imul(f,_)|0,t=(t+Math.imul(f,O)|0)+Math.imul(d,_)|0,q=q+Math.imul(d,O)|0,e=e+Math.imul(l,T)|0,t=(t+Math.imul(l,D)|0)+Math.imul(h,T)|0,q=q+Math.imul(h,D)|0,e=e+Math.imul(u,B)|0,t=(t+Math.imul(u,I)|0)+Math.imul(c,B)|0,q=q+Math.imul(c,I)|0,(V+(e=e+Math.imul(a,M)|0)|0)+((8191&(t=(t+Math.imul(a,j)|0)+Math.imul(s,M)|0))<<13)|0),X=(V=((q+Math.imul(s,j)|0)+(t>>>13)|0)+(Y>>>26)|0,Y&=67108863,e=Math.imul(g,E),t=Math.imul(g,S)+Math.imul(A,E)|0,q=Math.imul(A,S),e=e+Math.imul(p,_)|0,t=(t+Math.imul(p,O)|0)+Math.imul(m,_)|0,q=q+Math.imul(m,O)|0,e=e+Math.imul(f,T)|0,t=(t+Math.imul(f,D)|0)+Math.imul(d,T)|0,q=q+Math.imul(d,D)|0,e=e+Math.imul(l,B)|0,t=(t+Math.imul(l,I)|0)+Math.imul(h,B)|0,q=q+Math.imul(h,I)|0,e=e+Math.imul(u,M)|0,t=(t+Math.imul(u,j)|0)+Math.imul(c,M)|0,q=q+Math.imul(c,j)|0,(V+(e=e+Math.imul(a,N)|0)|0)+((8191&(t=(t+Math.imul(a,F)|0)+Math.imul(s,N)|0))<<13)|0),J=(V=((q+Math.imul(s,F)|0)+(t>>>13)|0)+(X>>>26)|0,X&=67108863,e=Math.imul(v,E),t=Math.imul(v,S)+Math.imul(b,E)|0,q=Math.imul(b,S),e=e+Math.imul(g,_)|0,t=(t+Math.imul(g,O)|0)+Math.imul(A,_)|0,q=q+Math.imul(A,O)|0,e=e+Math.imul(p,T)|0,t=(t+Math.imul(p,D)|0)+Math.imul(m,T)|0,q=q+Math.imul(m,D)|0,e=e+Math.imul(f,B)|0,t=(t+Math.imul(f,I)|0)+Math.imul(d,B)|0,q=q+Math.imul(d,I)|0,e=e+Math.imul(l,M)|0,t=(t+Math.imul(l,j)|0)+Math.imul(h,M)|0,q=q+Math.imul(h,j)|0,e=e+Math.imul(u,N)|0,t=(t+Math.imul(u,F)|0)+Math.imul(c,N)|0,q=q+Math.imul(c,F)|0,(V+(e=e+Math.imul(a,R)|0)|0)+((8191&(t=(t+Math.imul(a,P)|0)+Math.imul(s,R)|0))<<13)|0),Z=(V=((q+Math.imul(s,P)|0)+(t>>>13)|0)+(J>>>26)|0,J&=67108863,e=Math.imul(y,E),t=Math.imul(y,S)+Math.imul(w,E)|0,q=Math.imul(w,S),e=e+Math.imul(v,_)|0,t=(t+Math.imul(v,O)|0)+Math.imul(b,_)|0,q=q+Math.imul(b,O)|0,e=e+Math.imul(g,T)|0,t=(t+Math.imul(g,D)|0)+Math.imul(A,T)|0,q=q+Math.imul(A,D)|0,e=e+Math.imul(p,B)|0,t=(t+Math.imul(p,I)|0)+Math.imul(m,B)|0,q=q+Math.imul(m,I)|0,e=e+Math.imul(f,M)|0,t=(t+Math.imul(f,j)|0)+Math.imul(d,M)|0,q=q+Math.imul(d,j)|0,e=e+Math.imul(l,N)|0,t=(t+Math.imul(l,F)|0)+Math.imul(h,N)|0,q=q+Math.imul(h,F)|0,e=e+Math.imul(u,R)|0,t=(t+Math.imul(u,P)|0)+Math.imul(c,R)|0,q=q+Math.imul(c,P)|0,(V+(e=e+Math.imul(a,L)|0)|0)+((8191&(t=(t+Math.imul(a,U)|0)+Math.imul(s,L)|0))<<13)|0),ee=(V=((q+Math.imul(s,U)|0)+(t>>>13)|0)+(Z>>>26)|0,Z&=67108863,e=Math.imul(x,E),t=Math.imul(x,S)+Math.imul(C,E)|0,q=Math.imul(C,S),e=e+Math.imul(y,_)|0,t=(t+Math.imul(y,O)|0)+Math.imul(w,_)|0,q=q+Math.imul(w,O)|0,e=e+Math.imul(v,T)|0,t=(t+Math.imul(v,D)|0)+Math.imul(b,T)|0,q=q+Math.imul(b,D)|0,e=e+Math.imul(g,B)|0,t=(t+Math.imul(g,I)|0)+Math.imul(A,B)|0,q=q+Math.imul(A,I)|0,e=e+Math.imul(p,M)|0,t=(t+Math.imul(p,j)|0)+Math.imul(m,M)|0,q=q+Math.imul(m,j)|0,e=e+Math.imul(f,N)|0,t=(t+Math.imul(f,F)|0)+Math.imul(d,N)|0,q=q+Math.imul(d,F)|0,e=e+Math.imul(l,R)|0,t=(t+Math.imul(l,P)|0)+Math.imul(h,R)|0,q=q+Math.imul(h,P)|0,e=e+Math.imul(u,L)|0,t=(t+Math.imul(u,U)|0)+Math.imul(c,L)|0,q=q+Math.imul(c,U)|0,(V+(e=e+Math.imul(a,z)|0)|0)+((8191&(t=(t+Math.imul(a,H)|0)+Math.imul(s,z)|0))<<13)|0);V=((q+Math.imul(s,H)|0)+(t>>>13)|0)+(ee>>>26)|0,ee&=67108863,e=Math.imul(k,E),t=Math.imul(k,S)+Math.imul(r,E)|0,q=Math.imul(r,S),e=e+Math.imul(x,_)|0,t=(t+Math.imul(x,O)|0)+Math.imul(C,_)|0,q=q+Math.imul(C,O)|0,e=e+Math.imul(y,T)|0,t=(t+Math.imul(y,D)|0)+Math.imul(w,T)|0,q=q+Math.imul(w,D)|0,e=e+Math.imul(v,B)|0,t=(t+Math.imul(v,I)|0)+Math.imul(b,B)|0,q=q+Math.imul(b,I)|0,e=e+Math.imul(g,M)|0,t=(t+Math.imul(g,j)|0)+Math.imul(A,M)|0,q=q+Math.imul(A,j)|0,e=e+Math.imul(p,N)|0,t=(t+Math.imul(p,F)|0)+Math.imul(m,N)|0,q=q+Math.imul(m,F)|0,e=e+Math.imul(f,R)|0,t=(t+Math.imul(f,P)|0)+Math.imul(d,R)|0,q=q+Math.imul(d,P)|0,e=e+Math.imul(l,L)|0,t=(t+Math.imul(l,U)|0)+Math.imul(h,L)|0,q=q+Math.imul(h,U)|0,e=e+Math.imul(u,z)|0,t=(t+Math.imul(u,H)|0)+Math.imul(c,z)|0,q=q+Math.imul(c,H)|0,E=(V+(e=e+Math.imul(a,$)|0)|0)+((8191&(t=(t+Math.imul(a,i)|0)+Math.imul(s,$)|0))<<13)|0,V=((q+Math.imul(s,i)|0)+(t>>>13)|0)+(E>>>26)|0,E&=67108863,e=Math.imul(k,_),t=Math.imul(k,O)+Math.imul(r,_)|0,q=Math.imul(r,O),e=e+Math.imul(x,T)|0,t=(t+Math.imul(x,D)|0)+Math.imul(C,T)|0,q=q+Math.imul(C,D)|0,e=e+Math.imul(y,B)|0,t=(t+Math.imul(y,I)|0)+Math.imul(w,B)|0,q=q+Math.imul(w,I)|0,e=e+Math.imul(v,M)|0,t=(t+Math.imul(v,j)|0)+Math.imul(b,M)|0,q=q+Math.imul(b,j)|0,e=e+Math.imul(g,N)|0,t=(t+Math.imul(g,F)|0)+Math.imul(A,N)|0,q=q+Math.imul(A,F)|0,e=e+Math.imul(p,R)|0,t=(t+Math.imul(p,P)|0)+Math.imul(m,R)|0,q=q+Math.imul(m,P)|0,e=e+Math.imul(f,L)|0,t=(t+Math.imul(f,U)|0)+Math.imul(d,L)|0,q=q+Math.imul(d,U)|0,e=e+Math.imul(l,z)|0,t=(t+Math.imul(l,H)|0)+Math.imul(h,z)|0,q=q+Math.imul(h,H)|0,S=(V+(e=e+Math.imul(u,$)|0)|0)+((8191&(t=(t+Math.imul(u,i)|0)+Math.imul(c,$)|0))<<13)|0,V=((q+Math.imul(c,i)|0)+(t>>>13)|0)+(S>>>26)|0,S&=67108863,e=Math.imul(k,T),t=Math.imul(k,D)+Math.imul(r,T)|0,q=Math.imul(r,D),e=e+Math.imul(x,B)|0,t=(t+Math.imul(x,I)|0)+Math.imul(C,B)|0,q=q+Math.imul(C,I)|0,e=e+Math.imul(y,M)|0,t=(t+Math.imul(y,j)|0)+Math.imul(w,M)|0,q=q+Math.imul(w,j)|0,e=e+Math.imul(v,N)|0,t=(t+Math.imul(v,F)|0)+Math.imul(b,N)|0,q=q+Math.imul(b,F)|0,e=e+Math.imul(g,R)|0,t=(t+Math.imul(g,P)|0)+Math.imul(A,R)|0,q=q+Math.imul(A,P)|0,e=e+Math.imul(p,L)|0,t=(t+Math.imul(p,U)|0)+Math.imul(m,L)|0,q=q+Math.imul(m,U)|0,e=e+Math.imul(f,z)|0,t=(t+Math.imul(f,H)|0)+Math.imul(d,z)|0,q=q+Math.imul(d,H)|0,a=(V+(e=e+Math.imul(l,$)|0)|0)+((8191&(t=(t+Math.imul(l,i)|0)+Math.imul(h,$)|0))<<13)|0,V=((q+Math.imul(h,i)|0)+(t>>>13)|0)+(a>>>26)|0,a&=67108863,e=Math.imul(k,B),t=Math.imul(k,I)+Math.imul(r,B)|0,q=Math.imul(r,I),e=e+Math.imul(x,M)|0,t=(t+Math.imul(x,j)|0)+Math.imul(C,M)|0,q=q+Math.imul(C,j)|0,e=e+Math.imul(y,N)|0,t=(t+Math.imul(y,F)|0)+Math.imul(w,N)|0,q=q+Math.imul(w,F)|0,e=e+Math.imul(v,R)|0,t=(t+Math.imul(v,P)|0)+Math.imul(b,R)|0,q=q+Math.imul(b,P)|0,e=e+Math.imul(g,L)|0,t=(t+Math.imul(g,U)|0)+Math.imul(A,L)|0,q=q+Math.imul(A,U)|0,e=e+Math.imul(p,z)|0,t=(t+Math.imul(p,H)|0)+Math.imul(m,z)|0,q=q+Math.imul(m,H)|0,s=(V+(e=e+Math.imul(f,$)|0)|0)+((8191&(t=(t+Math.imul(f,i)|0)+Math.imul(d,$)|0))<<13)|0,V=((q+Math.imul(d,i)|0)+(t>>>13)|0)+(s>>>26)|0,s&=67108863,e=Math.imul(k,M),t=Math.imul(k,j)+Math.imul(r,M)|0,q=Math.imul(r,j),e=e+Math.imul(x,N)|0,t=(t+Math.imul(x,F)|0)+Math.imul(C,N)|0,q=q+Math.imul(C,F)|0,e=e+Math.imul(y,R)|0,t=(t+Math.imul(y,P)|0)+Math.imul(w,R)|0,q=q+Math.imul(w,P)|0,e=e+Math.imul(v,L)|0,t=(t+Math.imul(v,U)|0)+Math.imul(b,L)|0,q=q+Math.imul(b,U)|0,e=e+Math.imul(g,z)|0,t=(t+Math.imul(g,H)|0)+Math.imul(A,z)|0,q=q+Math.imul(A,H)|0,_=(V+(e=e+Math.imul(p,$)|0)|0)+((8191&(t=(t+Math.imul(p,i)|0)+Math.imul(m,$)|0))<<13)|0,V=((q+Math.imul(m,i)|0)+(t>>>13)|0)+(_>>>26)|0,_&=67108863,e=Math.imul(k,N),t=Math.imul(k,F)+Math.imul(r,N)|0,q=Math.imul(r,F),e=e+Math.imul(x,R)|0,t=(t+Math.imul(x,P)|0)+Math.imul(C,R)|0,q=q+Math.imul(C,P)|0,e=e+Math.imul(y,L)|0,t=(t+Math.imul(y,U)|0)+Math.imul(w,L)|0,q=q+Math.imul(w,U)|0,e=e+Math.imul(v,z)|0,t=(t+Math.imul(v,H)|0)+Math.imul(b,z)|0,q=q+Math.imul(b,H)|0,O=(V+(e=e+Math.imul(g,$)|0)|0)+((8191&(t=(t+Math.imul(g,i)|0)+Math.imul(A,$)|0))<<13)|0,V=((q+Math.imul(A,i)|0)+(t>>>13)|0)+(O>>>26)|0,O&=67108863,e=Math.imul(k,R),t=Math.imul(k,P)+Math.imul(r,R)|0,q=Math.imul(r,P),e=e+Math.imul(x,L)|0,t=(t+Math.imul(x,U)|0)+Math.imul(C,L)|0,q=q+Math.imul(C,U)|0,e=e+Math.imul(y,z)|0,t=(t+Math.imul(y,H)|0)+Math.imul(w,z)|0,q=q+Math.imul(w,H)|0,u=(V+(e=e+Math.imul(v,$)|0)|0)+((8191&(t=(t+Math.imul(v,i)|0)+Math.imul(b,$)|0))<<13)|0,V=((q+Math.imul(b,i)|0)+(t>>>13)|0)+(u>>>26)|0,u&=67108863,e=Math.imul(k,L),t=Math.imul(k,U)+Math.imul(r,L)|0,q=Math.imul(r,U),e=e+Math.imul(x,z)|0,t=(t+Math.imul(x,H)|0)+Math.imul(C,z)|0,q=q+Math.imul(C,H)|0,c=(V+(e=e+Math.imul(y,$)|0)|0)+((8191&(t=(t+Math.imul(y,i)|0)+Math.imul(w,$)|0))<<13)|0,V=((q+Math.imul(w,i)|0)+(t>>>13)|0)+(c>>>26)|0,c&=67108863,e=Math.imul(k,z),t=Math.imul(k,H)+Math.imul(r,z)|0,q=Math.imul(r,H),T=(V+(e=e+Math.imul(x,$)|0)|0)+((8191&(t=(t+Math.imul(x,i)|0)+Math.imul(C,$)|0))<<13)|0,V=((q+Math.imul(C,i)|0)+(t>>>13)|0)+(T>>>26)|0,T&=67108863,D=(V+(e=Math.imul(k,$))|0)+((8191&(t=Math.imul(k,i)+Math.imul(r,$)|0))<<13)|0;return V=(Math.imul(r,i)+(t>>>13)|0)+(D>>>26)|0,D&=67108863,o[0]=Q,o[1]=G,o[2]=W,o[3]=K,o[4]=Y,o[5]=X,o[6]=J,o[7]=Z,o[8]=ee,o[9]=E,o[10]=S,o[11]=a,o[12]=s,o[13]=_,o[14]=O,o[15]=u,o[16]=c,o[17]=T,o[18]=D,0!=V&&(o[19]=V,n.length++),n};function m(e,t,n){return(new g).mulp(e,t,n)}function g(e,t){this.x=e,this.y=t}Math.imul||(p=d),s.prototype.mulTo=function(e,t){var n=this.length+e.length;return(10===this.length&&10===e.length?p:n<63?d:n<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,o=0;o<n.length-1;o++){for(var a=i,s=(i=0,67108863&r),u=Math.min(o,t.length-1),c=Math.max(0,o-e.length+1);c<=u;c++){var l,h=(0|e.words[o-c])*(0|t.words[c]);s=67108863&(l=(67108863&h)+s|0);i+=(a=(a=a+(h/67108864|0)|0)+(l>>>26)|0)>>>26,a&=67108863}n.words[o]=s,r=a,a=i}return 0!==r?n.words[o]=r:n.length--,n.strip()}:m)(this,e,t)},g.prototype.makeRBT=function(e){for(var t=new Array(e),n=s.prototype._countBits(e)-1,r=0;r<e;r++)t[r]=this.revBin(r,n,e);return t},g.prototype.revBin=function(e,t,n){if(0===e||e===n-1)return e;for(var r=0,i=0;i<t;i++)r|=(1&e)<<t-i-1,e>>=1;return r},g.prototype.permute=function(e,t,n,r,i,o){for(var a=0;a<o;a++)r[a]=t[e[a]],i[a]=n[e[a]]},g.prototype.transform=function(e,t,n,r,i,o){this.permute(o,e,t,n,r,i);for(var a=1;a<i;a<<=1)for(var s=a<<1,u=Math.cos(2*Math.PI/s),c=Math.sin(2*Math.PI/s),l=0;l<i;l+=s)for(var h=u,f=c,d=0;d<a;d++){var p=n[l+d],m=r[l+d],g=n[l+d+a],A=h*g-f*(v=r[l+d+a]),v=h*v+f*g;n[l+d]=p+(g=A),r[l+d]=m+v,n[l+d+a]=p-g,r[l+d+a]=m-v,d!==s&&(A=u*h-c*f,f=u*f+c*h,h=A)}},g.prototype.guessLen13b=function(e,t){t=1&(r=1|Math.max(t,e));for(var n=0,r=r/2|0;r;r>>>=1)n++;return 1<<n+1+t},g.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var r=0;r<n/2;r++){var i=e[r];e[r]=e[n-r-1],e[n-r-1]=i,i=t[r],t[r]=-t[n-r-1],t[n-r-1]=-i}},g.prototype.normalize13b=function(e,t){for(var n=0,r=0;r<t/2;r++){var i=8192*Math.round(e[2*r+1]/t)+Math.round(e[2*r]/t)+n;e[r]=67108863&i,n=i<67108864?0:i/67108864|0}return e},g.prototype.convert13b=function(e,t,n,r){for(var i=0,a=0;a<t;a++)i+=0|e[a],n[2*a]=8191&i,n[2*a+1]=8191&(i>>>=13),i>>>=13;for(a=2*t;a<r;++a)n[a]=0;o(0===i),o(0==(-8192&i))},g.prototype.stub=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=0;return t},g.prototype.mulp=function(e,t,n){var r=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(r),o=this.stub(r),a=new Array(r),s=new Array(r),u=new Array(r),c=new Array(r),l=new Array(r),h=new Array(r),f=n.words;f.length=r,this.convert13b(e.words,e.length,a,r),this.convert13b(t.words,t.length,c,r),this.transform(a,o,s,u,r,i),this.transform(c,o,l,h,r,i);for(var d=0;d<r;d++){var p=s[d]*l[d]-u[d]*h[d];u[d]=s[d]*h[d]+u[d]*l[d],s[d]=p}return this.conjugate(s,u,r),this.transform(s,u,f,o,r,i),this.conjugate(f,o,r),this.normalize13b(f,r),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},s.prototype.mul=function(e){var t=new s(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},s.prototype.mulf=function(e){var t=new s(null);return t.words=new Array(this.length+e.length),m(this,e,t)},s.prototype.imul=function(e){return this.clone().mulTo(e,this)},s.prototype.imuln=function(e){o("number"==typeof e),o(e<67108864);for(var t=0,n=0;n<this.length;n++){var r=(0|this.words[n])*e,i=(67108863&r)+(67108863&t);t=(t>>=26)+(r/67108864|0)+(i>>>26);this.words[n]=67108863&i}return 0!==t&&(this.words[n]=t,this.length++),this},s.prototype.muln=function(e){return this.clone().imuln(e)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n%26;t[n]=(e.words[n/26|0]&1<<r)>>>r}return t}(e);if(0===t.length)return new s(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var i=n.sqr();r<t.length;r++,i=i.sqr())0!==t[r]&&(n=n.mul(i));return n},s.prototype.iushln=function(e){o("number"==typeof e&&0<=e);var t=e%26,n=(e-t)/26,r=67108863>>>26-t<<26-t;if(0!=t){for(var i=0,a=0;a<this.length;a++){var s=this.words[a]&r,u=(0|this.words[a])-s<<t;this.words[a]=u|i,i=s>>>26-t}i&&(this.words[a]=i,this.length++)}if(0!=n){for(a=this.length-1;0<=a;a--)this.words[a+n]=this.words[a];for(a=0;a<n;a++)this.words[a]=0;this.length+=n}return this.strip()},s.prototype.ishln=function(e){return o(0===this.negative),this.iushln(e)},s.prototype.iushrn=function(e,t,n){o("number"==typeof e&&0<=e),r=t?(t-t%26)/26:0;var r,i=e%26,a=Math.min((e-i)/26,this.length),s=67108863^67108863>>>i<<i,u=n;if(r-=a,r=Math.max(0,r),u){for(var c=0;c<a;c++)u.words[c]=this.words[c];u.length=a}if(0!==a)if(this.length>a)for(this.length-=a,c=0;c<this.length;c++)this.words[c]=this.words[c+a];else this.words[0]=0,this.length=1;var l=0;for(c=this.length-1;0<=c&&(0!==l||r<=c);c--){var h=0|this.words[c];this.words[c]=l<<26-i|h>>>i,l=h&s}return u&&0!==l&&(u.words[u.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},s.prototype.ishrn=function(e,t,n){return o(0===this.negative),this.iushrn(e,t,n)},s.prototype.shln=function(e){return this.clone().ishln(e)},s.prototype.ushln=function(e){return this.clone().iushln(e)},s.prototype.shrn=function(e){return this.clone().ishrn(e)},s.prototype.ushrn=function(e){return this.clone().iushrn(e)},s.prototype.testn=function(e){o("number"==typeof e&&0<=e);var t=e%26;e=(e-t)/26;return!(this.length<=e||!(this.words[e]&1<<t))},s.prototype.imaskn=function(e){o("number"==typeof e&&0<=e);var t=e%26;e=(e-t)/26;return o(0===this.negative,"imaskn works only with positive numbers"),this.length<=e?this:(0!=t&&e++,this.length=Math.min(e,this.length),0!=t&&(this.words[this.length-1]&=67108863^67108863>>>t<<t),this.strip())},s.prototype.maskn=function(e){return this.clone().imaskn(e)},s.prototype.iaddn=function(e){return o("number"==typeof e),o(e<67108864),e<0?this.isubn(-e):0!==this.negative?(1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0):(this.negative=0,this.isubn(e),this.negative=1),this):this._iaddn(e)},s.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&67108864<=this.words[t];t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},s.prototype.isubn=function(e){if(o("number"==typeof e),o(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,--this.words[t+1];return this.strip()},s.prototype.addn=function(e){return this.clone().iaddn(e)},s.prototype.subn=function(e){return this.clone().isubn(e)},s.prototype.iabs=function(){return this.negative=0,this},s.prototype.abs=function(){return this.clone().iabs()},s.prototype._ishlnsubmul=function(e,t,n){for(var r=e.length+n,i=(this._expand(r),0),a=0;a<e.length;a++){var s=(0|this.words[a+n])+i,u=(0|e.words[a])*t;i=((s-=67108863&u)>>26)-(u/67108864|0);this.words[a+n]=67108863&s}for(;a<this.length-n;a++)i=(s=(0|this.words[a+n])+i)>>26,this.words[a+n]=67108863&s;if(0!==i){for(o(-1===i),a=i=0;a<this.length;a++)i=(s=-(0|this.words[a])+i)>>26,this.words[a]=67108863&s;this.negative=1}return this.strip()},s.prototype._wordDiv=function(e,t){this.length,e.length;var n=this.clone(),r=e,i=0|r.words[r.length-1];0!=(e=26-this._countBits(i))&&(r=r.ushln(e),n.iushln(e),i=0|r.words[r.length-1]);var o,a=n.length-r.length;if("mod"!==t){(o=new s(null)).length=1+a,o.words=new Array(o.length);for(var u=0;u<o.length;u++)o.words[u]=0}var c=n.clone()._ishlnsubmul(r,1,a);0===c.negative&&(n=c,o&&(o.words[a]=1));for(var l=a-1;0<=l;l--){var h=67108864*(0|n.words[r.length+l])+(0|n.words[r.length+l-1]);h=Math.min(h/i|0,67108863);for(n._ishlnsubmul(r,h,l);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(r,1,l),n.isZero()||(n.negative^=1);o&&(o.words[l]=h)}return o&&o.strip(),n.strip(),"div"!==t&&0!=e&&n.iushrn(e),{div:o||null,mod:n}},s.prototype.divmod=function(e,t,n){return o(!e.isZero()),this.isZero()?{div:new s(0),mod:new s(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(r=a.div.neg()),"div"!==t&&(i=a.mod.neg(),n&&0!==i.negative&&i.iadd(e)),{div:r,mod:i}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),{div:r="mod"!==t?a.div.neg():r,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(i=a.mod.neg(),n&&0!==i.negative&&i.isub(e)),{div:a.div,mod:i}):e.length>this.length||this.cmp(e)<0?{div:new s(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new s(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new s(this.modn(e.words[0]))}:this._wordDiv(e,t);var r,i,a},s.prototype.div=function(e){return this.divmod(e,"div",!1).div},s.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},s.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},s.prototype.divRound=function(e){var t,n,r=this.divmod(e);return r.mod.isZero()||(n=0!==r.div.negative?r.mod.isub(e):r.mod,t=e.ushrn(1),e=e.andln(1),(n=n.cmp(t))<0||1===e&&0===n)?r.div:0!==r.div.negative?r.div.isubn(1):r.div.iaddn(1)},s.prototype.modn=function(e){o(e<=67108863);for(var t=(1<<26)%e,n=0,r=this.length-1;0<=r;r--)n=(t*n+(0|this.words[r]))%e;return n},s.prototype.idivn=function(e){o(e<=67108863);for(var t=0,n=this.length-1;0<=n;n--){var r=(0|this.words[n])+67108864*t;this.words[n]=r/e|0,t=r%e}return this.strip()},s.prototype.divn=function(e){return this.clone().idivn(e)},s.prototype.egcd=function(e){o(0===e.negative),o(!e.isZero());for(var t=this,n=e.clone(),r=(t=0!==t.negative?t.umod(e):t.clone(),new s(1)),i=new s(0),a=new s(0),u=new s(1),c=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++c;for(var l=n.clone(),h=t.clone();!t.isZero();){for(var f=0,d=1;0==(t.words[0]&d)&&f<26;++f,d<<=1);if(0<f)for(t.iushrn(f);0<f--;)(r.isOdd()||i.isOdd())&&(r.iadd(l),i.isub(h)),r.iushrn(1),i.iushrn(1);for(var p=0,m=1;0==(n.words[0]&m)&&p<26;++p,m<<=1);if(0<p)for(n.iushrn(p);0<p--;)(a.isOdd()||u.isOdd())&&(a.iadd(l),u.isub(h)),a.iushrn(1),u.iushrn(1);0<=t.cmp(n)?(t.isub(n),r.isub(a),i.isub(u)):(n.isub(t),a.isub(r),u.isub(i))}return{a:a,b:u,gcd:n.iushln(c)}},s.prototype._invmp=function(e){o(0===e.negative),o(!e.isZero());for(var t,n=this,r=e.clone(),i=(n=0!==n.negative?n.umod(e):n.clone(),new s(1)),a=new s(0),u=r.clone();0<n.cmpn(1)&&0<r.cmpn(1);){for(var c=0,l=1;0==(n.words[0]&l)&&c<26;++c,l<<=1);if(0<c)for(n.iushrn(c);0<c--;)i.isOdd()&&i.iadd(u),i.iushrn(1);for(var h=0,f=1;0==(r.words[0]&f)&&h<26;++h,f<<=1);if(0<h)for(r.iushrn(h);0<h--;)a.isOdd()&&a.iadd(u),a.iushrn(1);0<=n.cmp(r)?(n.isub(r),i.isub(a)):(r.isub(n),a.isub(i))}return(t=0===n.cmpn(1)?i:a).cmpn(0)<0&&t.iadd(e),t},s.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0;for(var r=n.negative=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var o=t;t=n,n=o}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},s.prototype.invm=function(e){return this.egcd(e).a.umod(e)},s.prototype.isEven=function(){return 0==(1&this.words[0])},s.prototype.isOdd=function(){return 1==(1&this.words[0])},s.prototype.andln=function(e){return this.words[0]&e},s.prototype.bincn=function(e){o("number"==typeof e);e=(e-(t=e%26))/26;var t=1<<t;if(this.length<=e)this._expand(1+e),this.words[e]|=t;else{for(var n=t,r=e;0!==n&&r<this.length;r++){var i=0|this.words[r];n=(i+=n)>>>26;i&=67108863,this.words[r]=i}0!==n&&(this.words[r]=n,this.length++)}return this},s.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},s.prototype.cmpn=function(e){var t=e<0;return 0===this.negative||t?0===this.negative&&t?1:(this.strip(),t=1<this.length?1:(o((e=t?-e:e)<=67108863,"Number is too big"),(t=0|this.words[0])===e?0:t<e?-1:1),0!==this.negative?0|-t:t):-1},s.prototype.cmp=function(e){return 0!==this.negative&&0===e.negative?-1:0===this.negative&&0!==e.negative?1:(e=this.ucmp(e),0!==this.negative?0|-e:e)},s.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;0<=n;n--){var r=0|this.words[n],i=0|e.words[n];if(r!=i){r<i?t=-1:i<r&&(t=1);break}}return t},s.prototype.gtn=function(e){return 1===this.cmpn(e)},s.prototype.gt=function(e){return 1===this.cmp(e)},s.prototype.gten=function(e){return 0<=this.cmpn(e)},s.prototype.gte=function(e){return 0<=this.cmp(e)},s.prototype.ltn=function(e){return-1===this.cmpn(e)},s.prototype.lt=function(e){return-1===this.cmp(e)},s.prototype.lten=function(e){return this.cmpn(e)<=0},s.prototype.lte=function(e){return this.cmp(e)<=0},s.prototype.eqn=function(e){return 0===this.cmpn(e)},s.prototype.eq=function(e){return 0===this.cmp(e)},s.red=function(e){return new C(e)},s.prototype.toRed=function(e){return o(!this.red,"Already a number in reduction context"),o(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},s.prototype.fromRed=function(){return o(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(e){return this.red=e,this},s.prototype.forceRed=function(e){return o(!this.red,"Already a number in reduction context"),this._forceRed(e)},s.prototype.redAdd=function(e){return o(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},s.prototype.redIAdd=function(e){return o(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},s.prototype.redSub=function(e){return o(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},s.prototype.redISub=function(e){return o(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},s.prototype.redShl=function(e){return o(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},s.prototype.redMul=function(e){return o(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},s.prototype.redIMul=function(e){return o(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},s.prototype.redSqr=function(){return o(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return o(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return o(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return o(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return o(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(e){return o(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var A={k256:null,p224:null,p192:null,p25519:null};function v(e,t){this.name=e,this.p=new s(t,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function y(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function x(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function C(e){var t;"string"==typeof e?(t=s._prime(e),this.m=t.p,this.prime=t):(o(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null)}function k(e){C.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var e=new s(null);return e.words=new Array(Math.ceil(this.n/13)),e},v.prototype.ireduce=function(e){for(var t,n=e;this.split(n,this.tmp),(t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength())>this.n;);return 0===(e=t<this.n?-1:n.ucmp(this.p))?(n.words[0]=0,n.length=1):0<e?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},v.prototype.split=function(e,t){e.iushrn(this.n,0,t)},v.prototype.imulK=function(e){return e.imul(this.k)},a(b,v),b.prototype.split=function(e,t){for(var n=Math.min(e.length,9),r=0;r<n;r++)t.words[r]=e.words[r];if(t.length=n,e.length<=9)e.words[0]=0,e.length=1;else{var i=e.words[9];for(t.words[t.length++]=4194303&i,r=10;r<e.length;r++){var o=0|e.words[r];e.words[r-10]=(4194303&o)<<4|i>>>22,i=o}0==(e.words[r-10]=i>>>=22)&&10<e.length?e.length-=10:e.length-=9}},b.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=0|e.words[n];t+=977*r,e.words[n]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},a(y,v),a(w,v),a(x,v),x.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*(0|e.words[n])+t,i=67108863&r;r>>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},s._prime=function(e){if(A[e])return A[e];var t;if("k256"===e)t=new b;else if("p224"===e)t=new y;else if("p192"===e)t=new w;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new x}return A[e]=t},C.prototype._verify1=function(e){o(0===e.negative,"red works only with positives"),o(e.red,"red works only with red numbers")},C.prototype._verify2=function(e,t){o(0==(e.negative|t.negative),"red works only with positives"),o(e.red&&e.red===t.red,"red works only with red numbers")},C.prototype.imod=function(e){return(this.prime?this.prime.ireduce(e):e.umod(this.m))._forceRed(this)},C.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},C.prototype.add=function(e,t){return this._verify2(e,t),0<=(e=e.add(t)).cmp(this.m)&&e.isub(this.m),e._forceRed(this)},C.prototype.iadd=function(e,t){return this._verify2(e,t),0<=(e=e.iadd(t)).cmp(this.m)&&e.isub(this.m),e},C.prototype.sub=function(e,t){return this._verify2(e,t),(e=e.sub(t)).cmpn(0)<0&&e.iadd(this.m),e._forceRed(this)},C.prototype.isub=function(e,t){return this._verify2(e,t),(e=e.isub(t)).cmpn(0)<0&&e.iadd(this.m),e},C.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},C.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},C.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},C.prototype.isqr=function(e){return this.imul(e,e.clone())},C.prototype.sqr=function(e){return this.mul(e,e)},C.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(o(t%2==1),3===t)return t=this.m.add(new s(1)).iushrn(2),this.pow(e,t);for(var n=this.m.subn(1),r=0;!n.isZero()&&0===n.andln(1);)r++,n.iushrn(1);o(!n.isZero());for(var i=new s(1).toRed(this),a=i.redNeg(),u=this.m.subn(1).iushrn(1),c=new s(2*(c=this.m.bitLength())*c).toRed(this);0!==this.pow(c,u).cmp(a);)c.redIAdd(a);for(var l=this.pow(c,n),h=this.pow(e,n.addn(1).iushrn(1)),f=this.pow(e,n),d=r;0!==f.cmp(i);){for(var p=f,m=0;0!==p.cmp(i);m++)p=p.redSqr();o(m<d);var g=this.pow(l,new s(1).iushln(d-m-1));h=h.redMul(g),l=g.redSqr(),f=f.redMul(l),d=m}return h},C.prototype.invm=function(e){return 0!==(e=e._invmp(this.m)).negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},C.prototype.pow=function(e,t){if(t.isZero())return new s(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new s(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var i=n[0],o=0,a=0,u=t.bitLength()%26;for(0===u&&(u=26),r=t.length-1;0<=r;r--){for(var c=t.words[r],l=u-1;0<=l;l--){var h=c>>l&1;i!==n[0]&&(i=this.sqr(i)),0!=h||0!==o?(o=o<<1|h,(4==++a||0===r&&0===l)&&(i=this.mul(i,n[o]),o=a=0)):a=0}u=26}return i},C.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},C.prototype.convertFrom=function(e){return(e=e.clone()).red=null,e},s.mont=function(e){return new k(e)},a(k,C),k.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},k.prototype.convertFrom=function(e){return(e=this.imod(e.mul(this.rinv))).red=null,e},k.prototype.imul=function(e,t){return e.isZero()||t.isZero()?(e.words[0]=0,e.length=1,e):(t=(e=e.imul(t)).maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),0<=(t=e=e.isub(t).iushrn(this.shift)).cmp(this.m)?t=e.isub(this.m):e.cmpn(0)<0&&(t=e.iadd(this.m)),t._forceRed(this))},k.prototype.mul=function(e,t){return(e.isZero()||t.isZero()?new s(0):(t=(e=e.mul(t)).maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),0<=(t=e=e.isub(t).iushrn(this.shift)).cmp(this.m)?t=e.isub(this.m):e.cmpn(0)<0&&(t=e.iadd(this.m)),t))._forceRed(this)},k.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}},{buffer:185}],182:[function(e,t,n){"use strict";n.byteLength=function(e){return 3*((e=c(e))[0]+(e=e[1]))/4-e},n.toByteArray=function(e){for(var t,n=(r=c(e))[0],r=r[1],a=new o(3*(n+r)/4-r),s=0,u=0<r?n-4:n,l=0;l<u;l+=4)t=i[e.charCodeAt(l)]<<18|i[e.charCodeAt(l+1)]<<12|i[e.charCodeAt(l+2)]<<6|i[e.charCodeAt(l+3)],a[s++]=t>>16&255,a[s++]=t>>8&255,a[s++]=255&t;return 2===r&&(t=i[e.charCodeAt(l)]<<2|i[e.charCodeAt(l+1)]>>4,a[s++]=255&t),1===r&&(t=i[e.charCodeAt(l)]<<10|i[e.charCodeAt(l+1)]<<4|i[e.charCodeAt(l+2)]>>2,a[s++]=t>>8&255,a[s++]=255&t),a},n.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=0,s=n-i;a<s;a+=16383)o.push(function(e,t,n){for(var i,o=[],a=t;a<n;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),o.push(r[(i=i)>>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return o.join("")}(e,a,s<a+16383?s:a+16383));return 1==i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2==i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=a.length;s<u;++s)r[s]=a[s],i[a.charCodeAt(s)]=s;function c(e){var t=e.length;if(0<t%4)throw new Error("Invalid string. Length must be a multiple of 4");return[e=-1===(e=e.indexOf("="))?t:e,e===t?0:4-e%4]}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},{}],183:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i;function o(e,t){if(!e)throw new Error(t||"Assertion failed")}function a(e,t){function n(){}e.super_=t,n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function s(e,t,n){if(s.isBN(e))return e;this.negative=0,this.words=null,this.length=0,(this.red=null)!==e&&("le"!==t&&"be"!==t||(n=t,t=10),this._init(e||0,t||10,n||"be"))}"object"===r(t=void 0===t||t)?t.exports=s:(void 0).BN=s,(s.BN=s).wordSize=26;try{i=e("buffer").Buffer}catch(e){}function u(e,t,n){for(var r=0,i=Math.min(e.length,n),a=0,s=t;s<i;s++){var u=e.charCodeAt(s)-48;r=r<<4|(u=49<=u&&u<=54?u-49+10:17<=u&&u<=22?u-17+10:u);a|=u}return o(!(240&a),"Invalid character in "+e),r}function c(e,t,n,r){for(var i,a=0,s=Math.min(e.length,n),u=t;u<s;u++){var c=e.charCodeAt(u)-48;a*=r,i=49<=c?c-49+10:17<=c?c-17+10:c,o(0<=c&&i<r,"Invalid character"),a+=i}return a}function l(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(s.isBN=function(e){return e instanceof s||null!==e&&"object"===r(e)&&e.constructor.wordSize===s.wordSize&&Array.isArray(e.words)},s.max=function(e,t){return 0<e.cmp(t)?e:t},s.min=function(e,t){return e.cmp(t)<0?e:t},s.prototype._init=function(e,t,n){if("number"==typeof e)return this._initNumber(e,t,n);if("object"===r(e))return this._initArray(e,t,n);o((t="hex"===t?16:t)===(0|t)&&2<=t&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&i++,16===t?this._parseHex(e,i):this._parseBase(e,t,i),"-"===e[0]&&(this.negative=1),this._strip(),"le"===n&&this._initArray(this.toArray(),t,n)},s.prototype._initNumber=function(e,t,n){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(o(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===n&&this._initArray(this.toArray(),t,n)},s.prototype._initArray=function(e,t,n){if(o("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var r=0;r<this.length;r++)this.words[r]=0;var i,a,s=0;if("be"===n)for(r=e.length-1,i=0;0<=r;r-=3)a=e[r]|e[r-1]<<8|e[r-2]<<16,this.words[i]|=a<<s&67108863,this.words[i+1]=a>>>26-s&67108863,26<=(s+=24)&&(s-=26,i++);else if("le"===n)for(i=r=0;r<e.length;r+=3)a=e[r]|e[r+1]<<8|e[r+2]<<16,this.words[i]|=a<<s&67108863,this.words[i+1]=a>>>26-s&67108863,26<=(s+=24)&&(s-=26,i++);return this._strip()},s.prototype._parseHex=function(e,t){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;for(var r,i=0,o=(n=e.length-6,0);t<=n;n-=6)r=u(e,n,n+6),this.words[o]|=r<<i&67108863,this.words[o+1]|=r>>>26-i&4194303,26<=(i+=24)&&(i-=26,o++);n+6!==t&&(r=u(e,t,n+6),this.words[o]|=r<<i&67108863,this.words[o+1]|=r>>>26-i&4194303),this._strip()},s.prototype._parseBase=function(e,t,n){this.words=[0];for(var r=0,i=this.length=1;i<=67108863;i*=t)r++;i=i/t|0;for(var o=e.length-n,a=o%--r,s=Math.min(o,o-a)+n,u=0,l=n;l<s;l+=r)u=c(e,l,l+r,t),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!=a){var h=1;for(u=c(e,l,e.length,t),l=0;l<a;l++)h*=t;this.imuln(h),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}},s.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},s.prototype._move=function(e){l(e,this)},s.prototype.clone=function(){var e=new s(null);return this.copy(e),e},s.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},s.prototype._strip=function(){for(;1<this.length&&0===this.words[this.length-1];)this.length--;return this._normSign()},s.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{s.prototype[Symbol.for("nodejs.util.inspect.custom")]=h}catch(e){s.prototype.inspect=h}else s.prototype.inspect=h;function h(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var f=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function m(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0,i=(r=(n.length=r)-1|0,(0|e.words[0])*(0|t.words[0])),o=i/67108864|0;n.words[0]=67108863&i;for(var a=1;a<r;a++){for(var s=o>>>26,u=67108863&o,c=Math.min(a,t.length-1),l=Math.max(0,a-e.length+1);l<=c;l++)s+=(i=(0|e.words[a-l|0])*(0|t.words[l])+u)/67108864|0,u=67108863&i;n.words[a]=0|u,o=0|s}return 0!==o?n.words[a]=0|o:n.length--,n._strip()}s.prototype.toString=function(e,t){if(t=0|t||1,16===(e=e||10)||"hex"===e){u="";for(var n=0,r=0,i=0;i<this.length;i++){var a=this.words[i],s=(16777215&(a<<n|r)).toString(16),u=0!=(r=a>>>24-n&16777215)||i!==this.length-1?f[6-s.length]+s+u:s+u;26<=(n+=2)&&(n-=26,i--)}for(0!==r&&(u=r.toString(16)+u);u.length%t!=0;)u="0"+u;return 0!==this.negative?"-"+u:u}if(e===(0|e)&&2<=e&&e<=36){var c=d[e],l=p[e],h=(u="",this.clone());for(h.negative=0;!h.isZero();){var m=h.modrn(l).toString(e);u=(h=h.idivn(l)).isZero()?m+u:f[c-m.length]+m+u}for(this.isZero()&&(u="0"+u);u.length%t!=0;)u="0"+u;return 0!==this.negative?"-"+u:u}o(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:2<this.length&&o(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},s.prototype.toJSON=function(){return this.toString(16,2)},i&&(s.prototype.toBuffer=function(e,t){return this.toArrayLike(i,e,t)}),s.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},s.prototype.toArrayLike=function(e,t,n){this._strip();var r=this.byteLength();o(r<=(n=n||Math.max(1,r)),"byte array longer than desired length"),o(0<n,"Requested array length <= 0"),n=n,e=(e=e).allocUnsafe?e.allocUnsafe(n):new e(n);return this["_toArrayLike"+("le"===t?"LE":"BE")](e,r),e},s.prototype._toArrayLikeLE=function(e,t){for(var n=0,r=0,i=0,o=0;i<this.length;i++){var a=this.words[i]<<o|r;e[n++]=255&a,n<e.length&&(e[n++]=a>>8&255),n<e.length&&(e[n++]=a>>16&255),6===o?(n<e.length&&(e[n++]=a>>24&255),o=r=0):(r=a>>>24,o+=2)}if(n<e.length)for(e[n++]=r;n<e.length;)e[n++]=0},s.prototype._toArrayLikeBE=function(e,t){for(var n=e.length-1,r=0,i=0,o=0;i<this.length;i++){var a=this.words[i]<<o|r;e[n--]=255&a,0<=n&&(e[n--]=a>>8&255),0<=n&&(e[n--]=a>>16&255),6===o?(0<=n&&(e[n--]=a>>24&255),o=r=0):(r=a>>>24,o+=2)}if(0<=n)for(e[n--]=r;0<=n;)e[n--]=0},Math.clz32?s.prototype._countBits=function(e){return 32-Math.clz32(e)}:s.prototype._countBits=function(e){var t=0;return 4096<=e&&(t+=13,e>>>=13),64<=e&&(t+=7,e>>>=7),8<=e&&(t+=4,e>>>=4),2<=e&&(t+=2,e>>>=2),t+e},s.prototype._zeroBits=function(e){var t;return 0===e?26:((t=0)==(8191&(e=e))&&(t+=13,e>>>=13),0==(127&e)&&(t+=7,e>>>=7),0==(15&e)&&(t+=4,e>>>=4),0==(3&e)&&(t+=2,e>>>=2),0==(1&e)&&t++,t)},s.prototype.bitLength=function(){var e=this.words[this.length-1];e=this._countBits(e);return 26*(this.length-1)+e},s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var n=this._zeroBits(this.words[t]);if(e+=n,26!==n)break}return e},s.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},s.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},s.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},s.prototype.isNeg=function(){return 0!==this.negative},s.prototype.neg=function(){return this.clone().ineg()},s.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},s.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},s.prototype.ior=function(e){return o(0==(this.negative|e.negative)),this.iuor(e)},s.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},s.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},s.prototype.iuand=function(e){for(var t=this.length>e.length?e:this,n=0;n<t.length;n++)this.words[n]=this.words[n]&e.words[n];return this.length=t.length,this._strip()},s.prototype.iand=function(e){return o(0==(this.negative|e.negative)),this.iuand(e)},s.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},s.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},s.prototype.iuxor=function(e){for(var t,n=this.length>e.length?(t=this,e):(t=e,this),r=0;r<n.length;r++)this.words[r]=t.words[r]^n.words[r];if(this!==t)for(;r<t.length;r++)this.words[r]=t.words[r];return this.length=t.length,this._strip()},s.prototype.ixor=function(e){return o(0==(this.negative|e.negative)),this.iuxor(e)},s.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},s.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},s.prototype.inotn=function(e){o("number"==typeof e&&0<=e);var t=0|Math.ceil(e/26);e%=26;this._expand(t),0<e&&t--;for(var n=0;n<t;n++)this.words[n]=67108863&~this.words[n];return 0<e&&(this.words[n]=~this.words[n]&67108863>>26-e),this._strip()},s.prototype.notn=function(e){return this.clone().inotn(e)},s.prototype.setn=function(e,t){o("number"==typeof e&&0<=e);var n=e/26|0;e%=26;return this._expand(1+n),this.words[n]=t?this.words[n]|1<<e:this.words[n]&~(1<<e),this._strip()},s.prototype.iadd=function(e){var t,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();for(var r=this.length>e.length?(n=this,e):(n=e,this),i=0,o=0;o<r.length;o++)t=(0|n.words[o])+(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26;for(;0!==i&&o<n.length;o++)t=(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26;if(this.length=n.length,0!==i)this.words[this.length]=i,this.length++;else if(n!==this)for(;o<n.length;o++)this.words[o]=n.words[o];return this},s.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},s.prototype.isub=function(e){var t;if(0!==e.negative)return e.negative=0,t=this.iadd(e),e.negative=1,t._normSign();if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n,r=this.cmp(e);if(0===r)return this.negative=0,this.length=1,this.words[0]=0,this;for(var i=0<r?(n=this,e):(n=e,this),o=0,a=0;a<i.length;a++)o=(t=(0|n.words[a])-(0|i.words[a])+o)>>26,this.words[a]=67108863&t;for(;0!==o&&a<n.length;a++)o=(t=(0|n.words[a])+o)>>26,this.words[a]=67108863&t;if(0===o&&a<n.length&&n!==this)for(;a<n.length;a++)this.words[a]=n.words[a];return this.length=Math.max(this.length,a),n!==this&&(this.negative=1),this._strip()},s.prototype.sub=function(e){return this.clone().isub(e)};var g=function(e,t,n){var r=e.words,i=t.words,o=n.words,a=8191&(s=0|r[0]),s=s>>>13,u=8191&(c=0|r[1]),c=c>>>13,l=8191&(h=0|r[2]),h=h>>>13,f=8191&(d=0|r[3]),d=d>>>13,p=8191&(m=0|r[4]),m=m>>>13,g=8191&(A=0|r[5]),A=A>>>13,v=8191&(b=0|r[6]),b=b>>>13,y=8191&(w=0|r[7]),w=w>>>13,x=8191&(C=0|r[8]),C=C>>>13,k=8191&(r=0|r[9]),E=(r=r>>>13,8191&(S=0|i[0])),S=S>>>13,_=8191&(O=0|i[1]),O=O>>>13,T=8191&(D=0|i[2]),D=D>>>13,B=8191&(I=0|i[3]),I=I>>>13,M=8191&(j=0|i[4]),j=j>>>13,N=8191&(F=0|i[5]),F=F>>>13,R=8191&(P=0|i[6]),P=P>>>13,L=8191&(U=0|i[7]),U=U>>>13,z=8191&(H=0|i[8]),H=H>>>13,$=8191&(i=0|i[9]),Q=(i=i>>>13,n.negative=e.negative^t.negative,n.length=19,(0+(e=Math.imul(a,E))|0)+((8191&(t=Math.imul(a,S)+Math.imul(s,E)|0))<<13)|0),V=(Math.imul(s,S)+(t>>>13)|0)+(Q>>>26)|0,q=(e=(Q&=67108863,Math.imul(u,E)),t=Math.imul(u,S)+Math.imul(c,E)|0,Math.imul(c,S)),G=(V+(e=e+Math.imul(a,_)|0)|0)+((8191&(t=(t+Math.imul(a,O)|0)+Math.imul(s,_)|0))<<13)|0,W=(V=((q+Math.imul(s,O)|0)+(t>>>13)|0)+(G>>>26)|0,G&=67108863,e=Math.imul(l,E),t=Math.imul(l,S)+Math.imul(h,E)|0,q=Math.imul(h,S),e=e+Math.imul(u,_)|0,t=(t+Math.imul(u,O)|0)+Math.imul(c,_)|0,q=q+Math.imul(c,O)|0,(V+(e=e+Math.imul(a,T)|0)|0)+((8191&(t=(t+Math.imul(a,D)|0)+Math.imul(s,T)|0))<<13)|0),K=(V=((q+Math.imul(s,D)|0)+(t>>>13)|0)+(W>>>26)|0,W&=67108863,e=Math.imul(f,E),t=Math.imul(f,S)+Math.imul(d,E)|0,q=Math.imul(d,S),e=e+Math.imul(l,_)|0,t=(t+Math.imul(l,O)|0)+Math.imul(h,_)|0,q=q+Math.imul(h,O)|0,e=e+Math.imul(u,T)|0,t=(t+Math.imul(u,D)|0)+Math.imul(c,T)|0,q=q+Math.imul(c,D)|0,(V+(e=e+Math.imul(a,B)|0)|0)+((8191&(t=(t+Math.imul(a,I)|0)+Math.imul(s,B)|0))<<13)|0),Y=(V=((q+Math.imul(s,I)|0)+(t>>>13)|0)+(K>>>26)|0,K&=67108863,e=Math.imul(p,E),t=Math.imul(p,S)+Math.imul(m,E)|0,q=Math.imul(m,S),e=e+Math.imul(f,_)|0,t=(t+Math.imul(f,O)|0)+Math.imul(d,_)|0,q=q+Math.imul(d,O)|0,e=e+Math.imul(l,T)|0,t=(t+Math.imul(l,D)|0)+Math.imul(h,T)|0,q=q+Math.imul(h,D)|0,e=e+Math.imul(u,B)|0,t=(t+Math.imul(u,I)|0)+Math.imul(c,B)|0,q=q+Math.imul(c,I)|0,(V+(e=e+Math.imul(a,M)|0)|0)+((8191&(t=(t+Math.imul(a,j)|0)+Math.imul(s,M)|0))<<13)|0),X=(V=((q+Math.imul(s,j)|0)+(t>>>13)|0)+(Y>>>26)|0,Y&=67108863,e=Math.imul(g,E),t=Math.imul(g,S)+Math.imul(A,E)|0,q=Math.imul(A,S),e=e+Math.imul(p,_)|0,t=(t+Math.imul(p,O)|0)+Math.imul(m,_)|0,q=q+Math.imul(m,O)|0,e=e+Math.imul(f,T)|0,t=(t+Math.imul(f,D)|0)+Math.imul(d,T)|0,q=q+Math.imul(d,D)|0,e=e+Math.imul(l,B)|0,t=(t+Math.imul(l,I)|0)+Math.imul(h,B)|0,q=q+Math.imul(h,I)|0,e=e+Math.imul(u,M)|0,t=(t+Math.imul(u,j)|0)+Math.imul(c,M)|0,q=q+Math.imul(c,j)|0,(V+(e=e+Math.imul(a,N)|0)|0)+((8191&(t=(t+Math.imul(a,F)|0)+Math.imul(s,N)|0))<<13)|0),J=(V=((q+Math.imul(s,F)|0)+(t>>>13)|0)+(X>>>26)|0,X&=67108863,e=Math.imul(v,E),t=Math.imul(v,S)+Math.imul(b,E)|0,q=Math.imul(b,S),e=e+Math.imul(g,_)|0,t=(t+Math.imul(g,O)|0)+Math.imul(A,_)|0,q=q+Math.imul(A,O)|0,e=e+Math.imul(p,T)|0,t=(t+Math.imul(p,D)|0)+Math.imul(m,T)|0,q=q+Math.imul(m,D)|0,e=e+Math.imul(f,B)|0,t=(t+Math.imul(f,I)|0)+Math.imul(d,B)|0,q=q+Math.imul(d,I)|0,e=e+Math.imul(l,M)|0,t=(t+Math.imul(l,j)|0)+Math.imul(h,M)|0,q=q+Math.imul(h,j)|0,e=e+Math.imul(u,N)|0,t=(t+Math.imul(u,F)|0)+Math.imul(c,N)|0,q=q+Math.imul(c,F)|0,(V+(e=e+Math.imul(a,R)|0)|0)+((8191&(t=(t+Math.imul(a,P)|0)+Math.imul(s,R)|0))<<13)|0),Z=(V=((q+Math.imul(s,P)|0)+(t>>>13)|0)+(J>>>26)|0,J&=67108863,e=Math.imul(y,E),t=Math.imul(y,S)+Math.imul(w,E)|0,q=Math.imul(w,S),e=e+Math.imul(v,_)|0,t=(t+Math.imul(v,O)|0)+Math.imul(b,_)|0,q=q+Math.imul(b,O)|0,e=e+Math.imul(g,T)|0,t=(t+Math.imul(g,D)|0)+Math.imul(A,T)|0,q=q+Math.imul(A,D)|0,e=e+Math.imul(p,B)|0,t=(t+Math.imul(p,I)|0)+Math.imul(m,B)|0,q=q+Math.imul(m,I)|0,e=e+Math.imul(f,M)|0,t=(t+Math.imul(f,j)|0)+Math.imul(d,M)|0,q=q+Math.imul(d,j)|0,e=e+Math.imul(l,N)|0,t=(t+Math.imul(l,F)|0)+Math.imul(h,N)|0,q=q+Math.imul(h,F)|0,e=e+Math.imul(u,R)|0,t=(t+Math.imul(u,P)|0)+Math.imul(c,R)|0,q=q+Math.imul(c,P)|0,(V+(e=e+Math.imul(a,L)|0)|0)+((8191&(t=(t+Math.imul(a,U)|0)+Math.imul(s,L)|0))<<13)|0),ee=(V=((q+Math.imul(s,U)|0)+(t>>>13)|0)+(Z>>>26)|0,Z&=67108863,e=Math.imul(x,E),t=Math.imul(x,S)+Math.imul(C,E)|0,q=Math.imul(C,S),e=e+Math.imul(y,_)|0,t=(t+Math.imul(y,O)|0)+Math.imul(w,_)|0,q=q+Math.imul(w,O)|0,e=e+Math.imul(v,T)|0,t=(t+Math.imul(v,D)|0)+Math.imul(b,T)|0,q=q+Math.imul(b,D)|0,e=e+Math.imul(g,B)|0,t=(t+Math.imul(g,I)|0)+Math.imul(A,B)|0,q=q+Math.imul(A,I)|0,e=e+Math.imul(p,M)|0,t=(t+Math.imul(p,j)|0)+Math.imul(m,M)|0,q=q+Math.imul(m,j)|0,e=e+Math.imul(f,N)|0,t=(t+Math.imul(f,F)|0)+Math.imul(d,N)|0,q=q+Math.imul(d,F)|0,e=e+Math.imul(l,R)|0,t=(t+Math.imul(l,P)|0)+Math.imul(h,R)|0,q=q+Math.imul(h,P)|0,e=e+Math.imul(u,L)|0,t=(t+Math.imul(u,U)|0)+Math.imul(c,L)|0,q=q+Math.imul(c,U)|0,(V+(e=e+Math.imul(a,z)|0)|0)+((8191&(t=(t+Math.imul(a,H)|0)+Math.imul(s,z)|0))<<13)|0);V=((q+Math.imul(s,H)|0)+(t>>>13)|0)+(ee>>>26)|0,ee&=67108863,e=Math.imul(k,E),t=Math.imul(k,S)+Math.imul(r,E)|0,q=Math.imul(r,S),e=e+Math.imul(x,_)|0,t=(t+Math.imul(x,O)|0)+Math.imul(C,_)|0,q=q+Math.imul(C,O)|0,e=e+Math.imul(y,T)|0,t=(t+Math.imul(y,D)|0)+Math.imul(w,T)|0,q=q+Math.imul(w,D)|0,e=e+Math.imul(v,B)|0,t=(t+Math.imul(v,I)|0)+Math.imul(b,B)|0,q=q+Math.imul(b,I)|0,e=e+Math.imul(g,M)|0,t=(t+Math.imul(g,j)|0)+Math.imul(A,M)|0,q=q+Math.imul(A,j)|0,e=e+Math.imul(p,N)|0,t=(t+Math.imul(p,F)|0)+Math.imul(m,N)|0,q=q+Math.imul(m,F)|0,e=e+Math.imul(f,R)|0,t=(t+Math.imul(f,P)|0)+Math.imul(d,R)|0,q=q+Math.imul(d,P)|0,e=e+Math.imul(l,L)|0,t=(t+Math.imul(l,U)|0)+Math.imul(h,L)|0,q=q+Math.imul(h,U)|0,e=e+Math.imul(u,z)|0,t=(t+Math.imul(u,H)|0)+Math.imul(c,z)|0,q=q+Math.imul(c,H)|0,E=(V+(e=e+Math.imul(a,$)|0)|0)+((8191&(t=(t+Math.imul(a,i)|0)+Math.imul(s,$)|0))<<13)|0,V=((q+Math.imul(s,i)|0)+(t>>>13)|0)+(E>>>26)|0,E&=67108863,e=Math.imul(k,_),t=Math.imul(k,O)+Math.imul(r,_)|0,q=Math.imul(r,O),e=e+Math.imul(x,T)|0,t=(t+Math.imul(x,D)|0)+Math.imul(C,T)|0,q=q+Math.imul(C,D)|0,e=e+Math.imul(y,B)|0,t=(t+Math.imul(y,I)|0)+Math.imul(w,B)|0,q=q+Math.imul(w,I)|0,e=e+Math.imul(v,M)|0,t=(t+Math.imul(v,j)|0)+Math.imul(b,M)|0,q=q+Math.imul(b,j)|0,e=e+Math.imul(g,N)|0,t=(t+Math.imul(g,F)|0)+Math.imul(A,N)|0,q=q+Math.imul(A,F)|0,e=e+Math.imul(p,R)|0,t=(t+Math.imul(p,P)|0)+Math.imul(m,R)|0,q=q+Math.imul(m,P)|0,e=e+Math.imul(f,L)|0,t=(t+Math.imul(f,U)|0)+Math.imul(d,L)|0,q=q+Math.imul(d,U)|0,e=e+Math.imul(l,z)|0,t=(t+Math.imul(l,H)|0)+Math.imul(h,z)|0,q=q+Math.imul(h,H)|0,S=(V+(e=e+Math.imul(u,$)|0)|0)+((8191&(t=(t+Math.imul(u,i)|0)+Math.imul(c,$)|0))<<13)|0,V=((q+Math.imul(c,i)|0)+(t>>>13)|0)+(S>>>26)|0,S&=67108863,e=Math.imul(k,T),t=Math.imul(k,D)+Math.imul(r,T)|0,q=Math.imul(r,D),e=e+Math.imul(x,B)|0,t=(t+Math.imul(x,I)|0)+Math.imul(C,B)|0,q=q+Math.imul(C,I)|0,e=e+Math.imul(y,M)|0,t=(t+Math.imul(y,j)|0)+Math.imul(w,M)|0,q=q+Math.imul(w,j)|0,e=e+Math.imul(v,N)|0,t=(t+Math.imul(v,F)|0)+Math.imul(b,N)|0,q=q+Math.imul(b,F)|0,e=e+Math.imul(g,R)|0,t=(t+Math.imul(g,P)|0)+Math.imul(A,R)|0,q=q+Math.imul(A,P)|0,e=e+Math.imul(p,L)|0,t=(t+Math.imul(p,U)|0)+Math.imul(m,L)|0,q=q+Math.imul(m,U)|0,e=e+Math.imul(f,z)|0,t=(t+Math.imul(f,H)|0)+Math.imul(d,z)|0,q=q+Math.imul(d,H)|0,a=(V+(e=e+Math.imul(l,$)|0)|0)+((8191&(t=(t+Math.imul(l,i)|0)+Math.imul(h,$)|0))<<13)|0,V=((q+Math.imul(h,i)|0)+(t>>>13)|0)+(a>>>26)|0,a&=67108863,e=Math.imul(k,B),t=Math.imul(k,I)+Math.imul(r,B)|0,q=Math.imul(r,I),e=e+Math.imul(x,M)|0,t=(t+Math.imul(x,j)|0)+Math.imul(C,M)|0,q=q+Math.imul(C,j)|0,e=e+Math.imul(y,N)|0,t=(t+Math.imul(y,F)|0)+Math.imul(w,N)|0,q=q+Math.imul(w,F)|0,e=e+Math.imul(v,R)|0,t=(t+Math.imul(v,P)|0)+Math.imul(b,R)|0,q=q+Math.imul(b,P)|0,e=e+Math.imul(g,L)|0,t=(t+Math.imul(g,U)|0)+Math.imul(A,L)|0,q=q+Math.imul(A,U)|0,e=e+Math.imul(p,z)|0,t=(t+Math.imul(p,H)|0)+Math.imul(m,z)|0,q=q+Math.imul(m,H)|0,s=(V+(e=e+Math.imul(f,$)|0)|0)+((8191&(t=(t+Math.imul(f,i)|0)+Math.imul(d,$)|0))<<13)|0,V=((q+Math.imul(d,i)|0)+(t>>>13)|0)+(s>>>26)|0,s&=67108863,e=Math.imul(k,M),t=Math.imul(k,j)+Math.imul(r,M)|0,q=Math.imul(r,j),e=e+Math.imul(x,N)|0,t=(t+Math.imul(x,F)|0)+Math.imul(C,N)|0,q=q+Math.imul(C,F)|0,e=e+Math.imul(y,R)|0,t=(t+Math.imul(y,P)|0)+Math.imul(w,R)|0,q=q+Math.imul(w,P)|0,e=e+Math.imul(v,L)|0,t=(t+Math.imul(v,U)|0)+Math.imul(b,L)|0,q=q+Math.imul(b,U)|0,e=e+Math.imul(g,z)|0,t=(t+Math.imul(g,H)|0)+Math.imul(A,z)|0,q=q+Math.imul(A,H)|0,_=(V+(e=e+Math.imul(p,$)|0)|0)+((8191&(t=(t+Math.imul(p,i)|0)+Math.imul(m,$)|0))<<13)|0,V=((q+Math.imul(m,i)|0)+(t>>>13)|0)+(_>>>26)|0,_&=67108863,e=Math.imul(k,N),t=Math.imul(k,F)+Math.imul(r,N)|0,q=Math.imul(r,F),e=e+Math.imul(x,R)|0,t=(t+Math.imul(x,P)|0)+Math.imul(C,R)|0,q=q+Math.imul(C,P)|0,e=e+Math.imul(y,L)|0,t=(t+Math.imul(y,U)|0)+Math.imul(w,L)|0,q=q+Math.imul(w,U)|0,e=e+Math.imul(v,z)|0,t=(t+Math.imul(v,H)|0)+Math.imul(b,z)|0,q=q+Math.imul(b,H)|0,O=(V+(e=e+Math.imul(g,$)|0)|0)+((8191&(t=(t+Math.imul(g,i)|0)+Math.imul(A,$)|0))<<13)|0,V=((q+Math.imul(A,i)|0)+(t>>>13)|0)+(O>>>26)|0,O&=67108863,e=Math.imul(k,R),t=Math.imul(k,P)+Math.imul(r,R)|0,q=Math.imul(r,P),e=e+Math.imul(x,L)|0,t=(t+Math.imul(x,U)|0)+Math.imul(C,L)|0,q=q+Math.imul(C,U)|0,e=e+Math.imul(y,z)|0,t=(t+Math.imul(y,H)|0)+Math.imul(w,z)|0,q=q+Math.imul(w,H)|0,u=(V+(e=e+Math.imul(v,$)|0)|0)+((8191&(t=(t+Math.imul(v,i)|0)+Math.imul(b,$)|0))<<13)|0,V=((q+Math.imul(b,i)|0)+(t>>>13)|0)+(u>>>26)|0,u&=67108863,e=Math.imul(k,L),t=Math.imul(k,U)+Math.imul(r,L)|0,q=Math.imul(r,U),e=e+Math.imul(x,z)|0,t=(t+Math.imul(x,H)|0)+Math.imul(C,z)|0,q=q+Math.imul(C,H)|0,c=(V+(e=e+Math.imul(y,$)|0)|0)+((8191&(t=(t+Math.imul(y,i)|0)+Math.imul(w,$)|0))<<13)|0,V=((q+Math.imul(w,i)|0)+(t>>>13)|0)+(c>>>26)|0,c&=67108863,e=Math.imul(k,z),t=Math.imul(k,H)+Math.imul(r,z)|0,q=Math.imul(r,H),T=(V+(e=e+Math.imul(x,$)|0)|0)+((8191&(t=(t+Math.imul(x,i)|0)+Math.imul(C,$)|0))<<13)|0,V=((q+Math.imul(C,i)|0)+(t>>>13)|0)+(T>>>26)|0,T&=67108863,D=(V+(e=Math.imul(k,$))|0)+((8191&(t=Math.imul(k,i)+Math.imul(r,$)|0))<<13)|0;return V=(Math.imul(r,i)+(t>>>13)|0)+(D>>>26)|0,D&=67108863,o[0]=Q,o[1]=G,o[2]=W,o[3]=K,o[4]=Y,o[5]=X,o[6]=J,o[7]=Z,o[8]=ee,o[9]=E,o[10]=S,o[11]=a,o[12]=s,o[13]=_,o[14]=O,o[15]=u,o[16]=c,o[17]=T,o[18]=D,0!=V&&(o[19]=V,n.length++),n};function A(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,i=0,o=0;o<n.length-1;o++){for(var a=i,s=(i=0,67108863&r),u=Math.min(o,t.length-1),c=Math.max(0,o-e.length+1);c<=u;c++){var l,h=(0|e.words[o-c])*(0|t.words[c]);s=67108863&(l=(67108863&h)+s|0);i+=(a=(a=a+(h/67108864|0)|0)+(l>>>26)|0)>>>26,a&=67108863}n.words[o]=s,r=a,a=i}return 0!==r?n.words[o]=r:n.length--,n._strip()}function v(e,t,n){return A(e,t,n)}Math.imul||(g=m),s.prototype.mulTo=function(e,t){var n=this.length+e.length;return(10===this.length&&10===e.length?g:n<63?m:n<1024?A:v)(this,e,t)},s.prototype.mul=function(e){var t=new s(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},s.prototype.mulf=function(e){var t=new s(null);return t.words=new Array(this.length+e.length),v(this,e,t)},s.prototype.imul=function(e){return this.clone().mulTo(e,this)},s.prototype.imuln=function(e){var t=e<0;o("number"==typeof(e=t?-e:e)),o(e<67108864);for(var n=0,r=0;r<this.length;r++){var i=(0|this.words[r])*e,a=(67108863&i)+(67108863&n);n=(n>>=26)+(i/67108864|0)+(a>>>26);this.words[r]=67108863&a}return 0!==n&&(this.words[r]=n,this.length++),t?this.ineg():this},s.prototype.muln=function(e){return this.clone().imuln(e)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++)t[n]=e.words[n/26|0]>>>n%26&1;return t}(e);if(0===t.length)return new s(1);for(var n=this,r=0;r<t.length&&0===t[r];r++,n=n.sqr());if(++r<t.length)for(var i=n.sqr();r<t.length;r++,i=i.sqr())0!==t[r]&&(n=n.mul(i));return n},s.prototype.iushln=function(e){o("number"==typeof e&&0<=e);var t=e%26,n=(e-t)/26,r=67108863>>>26-t<<26-t;if(0!=t){for(var i=0,a=0;a<this.length;a++){var s=this.words[a]&r,u=(0|this.words[a])-s<<t;this.words[a]=u|i,i=s>>>26-t}i&&(this.words[a]=i,this.length++)}if(0!=n){for(a=this.length-1;0<=a;a--)this.words[a+n]=this.words[a];for(a=0;a<n;a++)this.words[a]=0;this.length+=n}return this._strip()},s.prototype.ishln=function(e){return o(0===this.negative),this.iushln(e)},s.prototype.iushrn=function(e,t,n){o("number"==typeof e&&0<=e),r=t?(t-t%26)/26:0;var r,i=e%26,a=Math.min((e-i)/26,this.length),s=67108863^67108863>>>i<<i,u=n;if(r-=a,r=Math.max(0,r),u){for(var c=0;c<a;c++)u.words[c]=this.words[c];u.length=a}if(0!==a)if(this.length>a)for(this.length-=a,c=0;c<this.length;c++)this.words[c]=this.words[c+a];else this.words[0]=0,this.length=1;var l=0;for(c=this.length-1;0<=c&&(0!==l||r<=c);c--){var h=0|this.words[c];this.words[c]=l<<26-i|h>>>i,l=h&s}return u&&0!==l&&(u.words[u.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(e,t,n){return o(0===this.negative),this.iushrn(e,t,n)},s.prototype.shln=function(e){return this.clone().ishln(e)},s.prototype.ushln=function(e){return this.clone().iushln(e)},s.prototype.shrn=function(e){return this.clone().ishrn(e)},s.prototype.ushrn=function(e){return this.clone().iushrn(e)},s.prototype.testn=function(e){o("number"==typeof e&&0<=e);var t=e%26;e=(e-t)/26;return!(this.length<=e||!(this.words[e]&1<<t))},s.prototype.imaskn=function(e){o("number"==typeof e&&0<=e);var t=e%26;e=(e-t)/26;return o(0===this.negative,"imaskn works only with positive numbers"),this.length<=e?this:(0!=t&&e++,this.length=Math.min(e,this.length),0!=t&&(this.words[this.length-1]&=67108863^67108863>>>t<<t),this._strip())},s.prototype.maskn=function(e){return this.clone().imaskn(e)},s.prototype.iaddn=function(e){return o("number"==typeof e),o(e<67108864),e<0?this.isubn(-e):0!==this.negative?(1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0):(this.negative=0,this.isubn(e),this.negative=1),this):this._iaddn(e)},s.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&67108864<=this.words[t];t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},s.prototype.isubn=function(e){if(o("number"==typeof e),o(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,--this.words[t+1];return this._strip()},s.prototype.addn=function(e){return this.clone().iaddn(e)},s.prototype.subn=function(e){return this.clone().isubn(e)},s.prototype.iabs=function(){return this.negative=0,this},s.prototype.abs=function(){return this.clone().iabs()},s.prototype._ishlnsubmul=function(e,t,n){for(var r=e.length+n,i=(this._expand(r),0),a=0;a<e.length;a++){var s=(0|this.words[a+n])+i,u=(0|e.words[a])*t;i=((s-=67108863&u)>>26)-(u/67108864|0);this.words[a+n]=67108863&s}for(;a<this.length-n;a++)i=(s=(0|this.words[a+n])+i)>>26,this.words[a+n]=67108863&s;if(0!==i){for(o(-1===i),a=i=0;a<this.length;a++)i=(s=-(0|this.words[a])+i)>>26,this.words[a]=67108863&s;this.negative=1}return this._strip()},s.prototype._wordDiv=function(e,t){this.length,e.length;var n=this.clone(),r=e,i=0|r.words[r.length-1];0!=(e=26-this._countBits(i))&&(r=r.ushln(e),n.iushln(e),i=0|r.words[r.length-1]);var o,a=n.length-r.length;if("mod"!==t){(o=new s(null)).length=1+a,o.words=new Array(o.length);for(var u=0;u<o.length;u++)o.words[u]=0}var c=n.clone()._ishlnsubmul(r,1,a);0===c.negative&&(n=c,o&&(o.words[a]=1));for(var l=a-1;0<=l;l--){var h=67108864*(0|n.words[r.length+l])+(0|n.words[r.length+l-1]);h=Math.min(h/i|0,67108863);for(n._ishlnsubmul(r,h,l);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(r,1,l),n.isZero()||(n.negative^=1);o&&(o.words[l]=h)}return o&&o._strip(),n._strip(),"div"!==t&&0!=e&&n.iushrn(e),{div:o||null,mod:n}},s.prototype.divmod=function(e,t,n){return o(!e.isZero()),this.isZero()?{div:new s(0),mod:new s(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(r=a.div.neg()),"div"!==t&&(i=a.mod.neg(),n&&0!==i.negative&&i.iadd(e)),{div:r,mod:i}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),{div:r="mod"!==t?a.div.neg():r,mod:a.mod}):0!=(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(i=a.mod.neg(),n&&0!==i.negative&&i.isub(e)),{div:a.div,mod:i}):e.length>this.length||this.cmp(e)<0?{div:new s(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new s(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new s(this.modrn(e.words[0]))}:this._wordDiv(e,t);var r,i,a},s.prototype.div=function(e){return this.divmod(e,"div",!1).div},s.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},s.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},s.prototype.divRound=function(e){var t,n,r=this.divmod(e);return r.mod.isZero()||(n=0!==r.div.negative?r.mod.isub(e):r.mod,t=e.ushrn(1),e=e.andln(1),(n=n.cmp(t))<0||1===e&&0===n)?r.div:0!==r.div.negative?r.div.isubn(1):r.div.iaddn(1)},s.prototype.modrn=function(e){var t=e<0;o((e=t?-e:e)<=67108863);for(var n=(1<<26)%e,r=0,i=this.length-1;0<=i;i--)r=(n*r+(0|this.words[i]))%e;return t?-r:r},s.prototype.modn=function(e){return this.modrn(e)},s.prototype.idivn=function(e){var t=e<0;o((e=t?-e:e)<=67108863);for(var n=0,r=this.length-1;0<=r;r--){var i=(0|this.words[r])+67108864*n;this.words[r]=i/e|0,n=i%e}return this._strip(),t?this.ineg():this},s.prototype.divn=function(e){return this.clone().idivn(e)},s.prototype.egcd=function(e){o(0===e.negative),o(!e.isZero());for(var t=this,n=e.clone(),r=(t=0!==t.negative?t.umod(e):t.clone(),new s(1)),i=new s(0),a=new s(0),u=new s(1),c=0;t.isEven()&&n.isEven();)t.iushrn(1),n.iushrn(1),++c;for(var l=n.clone(),h=t.clone();!t.isZero();){for(var f=0,d=1;0==(t.words[0]&d)&&f<26;++f,d<<=1);if(0<f)for(t.iushrn(f);0<f--;)(r.isOdd()||i.isOdd())&&(r.iadd(l),i.isub(h)),r.iushrn(1),i.iushrn(1);for(var p=0,m=1;0==(n.words[0]&m)&&p<26;++p,m<<=1);if(0<p)for(n.iushrn(p);0<p--;)(a.isOdd()||u.isOdd())&&(a.iadd(l),u.isub(h)),a.iushrn(1),u.iushrn(1);0<=t.cmp(n)?(t.isub(n),r.isub(a),i.isub(u)):(n.isub(t),a.isub(r),u.isub(i))}return{a:a,b:u,gcd:n.iushln(c)}},s.prototype._invmp=function(e){o(0===e.negative),o(!e.isZero());for(var t,n=this,r=e.clone(),i=(n=0!==n.negative?n.umod(e):n.clone(),new s(1)),a=new s(0),u=r.clone();0<n.cmpn(1)&&0<r.cmpn(1);){for(var c=0,l=1;0==(n.words[0]&l)&&c<26;++c,l<<=1);if(0<c)for(n.iushrn(c);0<c--;)i.isOdd()&&i.iadd(u),i.iushrn(1);for(var h=0,f=1;0==(r.words[0]&f)&&h<26;++h,f<<=1);if(0<h)for(r.iushrn(h);0<h--;)a.isOdd()&&a.iadd(u),a.iushrn(1);0<=n.cmp(r)?(n.isub(r),i.isub(a)):(r.isub(n),a.isub(i))}return(t=0===n.cmpn(1)?i:a).cmpn(0)<0&&t.iadd(e),t},s.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),n=e.clone();t.negative=0;for(var r=n.negative=0;t.isEven()&&n.isEven();r++)t.iushrn(1),n.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;n.isEven();)n.iushrn(1);var i=t.cmp(n);if(i<0){var o=t;t=n,n=o}else if(0===i||0===n.cmpn(1))break;t.isub(n)}return n.iushln(r)},s.prototype.invm=function(e){return this.egcd(e).a.umod(e)},s.prototype.isEven=function(){return 0==(1&this.words[0])},s.prototype.isOdd=function(){return 1==(1&this.words[0])},s.prototype.andln=function(e){return this.words[0]&e},s.prototype.bincn=function(e){o("number"==typeof e);e=(e-(t=e%26))/26;var t=1<<t;if(this.length<=e)this._expand(1+e),this.words[e]|=t;else{for(var n=t,r=e;0!==n&&r<this.length;r++){var i=0|this.words[r];n=(i+=n)>>>26;i&=67108863,this.words[r]=i}0!==n&&(this.words[r]=n,this.length++)}return this},s.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},s.prototype.cmpn=function(e){var t=e<0;return 0===this.negative||t?0===this.negative&&t?1:(this._strip(),t=1<this.length?1:(o((e=t?-e:e)<=67108863,"Number is too big"),(t=0|this.words[0])===e?0:t<e?-1:1),0!==this.negative?0|-t:t):-1},s.prototype.cmp=function(e){return 0!==this.negative&&0===e.negative?-1:0===this.negative&&0!==e.negative?1:(e=this.ucmp(e),0!==this.negative?0|-e:e)},s.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,n=this.length-1;0<=n;n--){var r=0|this.words[n],i=0|e.words[n];if(r!=i){r<i?t=-1:i<r&&(t=1);break}}return t},s.prototype.gtn=function(e){return 1===this.cmpn(e)},s.prototype.gt=function(e){return 1===this.cmp(e)},s.prototype.gten=function(e){return 0<=this.cmpn(e)},s.prototype.gte=function(e){return 0<=this.cmp(e)},s.prototype.ltn=function(e){return-1===this.cmpn(e)},s.prototype.lt=function(e){return-1===this.cmp(e)},s.prototype.lten=function(e){return this.cmpn(e)<=0},s.prototype.lte=function(e){return this.cmp(e)<=0},s.prototype.eqn=function(e){return 0===this.cmpn(e)},s.prototype.eq=function(e){return 0===this.cmp(e)},s.red=function(e){return new E(e)},s.prototype.toRed=function(e){return o(!this.red,"Already a number in reduction context"),o(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},s.prototype.fromRed=function(){return o(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(e){return this.red=e,this},s.prototype.forceRed=function(e){return o(!this.red,"Already a number in reduction context"),this._forceRed(e)},s.prototype.redAdd=function(e){return o(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},s.prototype.redIAdd=function(e){return o(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},s.prototype.redSub=function(e){return o(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},s.prototype.redISub=function(e){return o(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},s.prototype.redShl=function(e){return o(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},s.prototype.redMul=function(e){return o(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},s.prototype.redIMul=function(e){return o(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},s.prototype.redSqr=function(){return o(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return o(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return o(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return o(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return o(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(e){return o(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var b={k256:null,p224:null,p192:null,p25519:null};function y(e,t){this.name=e,this.p=new s(t,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function x(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function C(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function k(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(e){var t;"string"==typeof e?(t=s._prime(e),this.m=t.p,this.prime=t):(o(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null)}function S(e){E.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var e=new s(null);return e.words=new Array(Math.ceil(this.n/13)),e},y.prototype.ireduce=function(e){for(var t,n=e;this.split(n,this.tmp),(t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength())>this.n;);return 0===(e=t<this.n?-1:n.ucmp(this.p))?(n.words[0]=0,n.length=1):0<e?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},y.prototype.split=function(e,t){e.iushrn(this.n,0,t)},y.prototype.imulK=function(e){return e.imul(this.k)},a(w,y),w.prototype.split=function(e,t){for(var n=Math.min(e.length,9),r=0;r<n;r++)t.words[r]=e.words[r];if(t.length=n,e.length<=9)e.words[0]=0,e.length=1;else{var i=e.words[9];for(t.words[t.length++]=4194303&i,r=10;r<e.length;r++){var o=0|e.words[r];e.words[r-10]=(4194303&o)<<4|i>>>22,i=o}0==(e.words[r-10]=i>>>=22)&&10<e.length?e.length-=10:e.length-=9}},w.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,n=0;n<e.length;n++){var r=0|e.words[n];t+=977*r,e.words[n]=67108863&t,t=64*r+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},a(x,y),a(C,y),a(k,y),k.prototype.imulK=function(e){for(var t=0,n=0;n<e.length;n++){var r=19*(0|e.words[n])+t,i=67108863&r;r>>>=26,e.words[n]=i,t=r}return 0!==t&&(e.words[e.length++]=t),e},s._prime=function(e){if(b[e])return b[e];var t;if("k256"===e)t=new w;else if("p224"===e)t=new x;else if("p192"===e)t=new C;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new k}return b[e]=t},E.prototype._verify1=function(e){o(0===e.negative,"red works only with positives"),o(e.red,"red works only with red numbers")},E.prototype._verify2=function(e,t){o(0==(e.negative|t.negative),"red works only with positives"),o(e.red&&e.red===t.red,"red works only with red numbers")},E.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(l(e,e.umod(this.m)._forceRed(this)),e)},E.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},E.prototype.add=function(e,t){return this._verify2(e,t),0<=(e=e.add(t)).cmp(this.m)&&e.isub(this.m),e._forceRed(this)},E.prototype.iadd=function(e,t){return this._verify2(e,t),0<=(e=e.iadd(t)).cmp(this.m)&&e.isub(this.m),e},E.prototype.sub=function(e,t){return this._verify2(e,t),(e=e.sub(t)).cmpn(0)<0&&e.iadd(this.m),e._forceRed(this)},E.prototype.isub=function(e,t){return this._verify2(e,t),(e=e.isub(t)).cmpn(0)<0&&e.iadd(this.m),e},E.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},E.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},E.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},E.prototype.isqr=function(e){return this.imul(e,e.clone())},E.prototype.sqr=function(e){return this.mul(e,e)},E.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(o(t%2==1),3===t)return t=this.m.add(new s(1)).iushrn(2),this.pow(e,t);for(var n=this.m.subn(1),r=0;!n.isZero()&&0===n.andln(1);)r++,n.iushrn(1);o(!n.isZero());for(var i=new s(1).toRed(this),a=i.redNeg(),u=this.m.subn(1).iushrn(1),c=new s(2*(c=this.m.bitLength())*c).toRed(this);0!==this.pow(c,u).cmp(a);)c.redIAdd(a);for(var l=this.pow(c,n),h=this.pow(e,n.addn(1).iushrn(1)),f=this.pow(e,n),d=r;0!==f.cmp(i);){for(var p=f,m=0;0!==p.cmp(i);m++)p=p.redSqr();o(m<d);var g=this.pow(l,new s(1).iushln(d-m-1));h=h.redMul(g),l=g.redSqr(),f=f.redMul(l),d=m}return h},E.prototype.invm=function(e){return 0!==(e=e._invmp(this.m)).negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},E.prototype.pow=function(e,t){if(t.isZero())return new s(1).toRed(this);if(0===t.cmpn(1))return e.clone();var n=new Array(16);n[0]=new s(1).toRed(this),n[1]=e;for(var r=2;r<n.length;r++)n[r]=this.mul(n[r-1],e);var i=n[0],o=0,a=0,u=t.bitLength()%26;for(0===u&&(u=26),r=t.length-1;0<=r;r--){for(var c=t.words[r],l=u-1;0<=l;l--){var h=c>>l&1;i!==n[0]&&(i=this.sqr(i)),0!=h||0!==o?(o=o<<1|h,(4==++a||0===r&&0===l)&&(i=this.mul(i,n[o]),o=a=0)):a=0}u=26}return i},E.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},E.prototype.convertFrom=function(e){return(e=e.clone()).red=null,e},s.mont=function(e){return new S(e)},a(S,E),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){return(e=this.imod(e.mul(this.rinv))).red=null,e},S.prototype.imul=function(e,t){return e.isZero()||t.isZero()?(e.words[0]=0,e.length=1,e):(t=(e=e.imul(t)).maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),0<=(t=e=e.isub(t).iushrn(this.shift)).cmp(this.m)?t=e.isub(this.m):e.cmpn(0)<0&&(t=e.iadd(this.m)),t._forceRed(this))},S.prototype.mul=function(e,t){return(e.isZero()||t.isZero()?new s(0):(t=(e=e.mul(t)).maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),0<=(t=e=e.isub(t).iushrn(this.shift)).cmp(this.m)?t=e.isub(this.m):e.cmpn(0)<0&&(t=e.iadd(this.m)),t))._forceRed(this)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}},{buffer:185}],184:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i;function o(e){this.rand=e}if(t.exports=function(e){return(i=i||new o(null)).generate(e)},(t.exports.Rand=o).prototype.generate=function(e){return this._rand(e)},o.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),n=0;n<t.length;n++)t[n]=this.rand.getByte();return t},"object"===("undefined"==typeof self?"undefined":r(self)))self.crypto&&self.crypto.getRandomValues?o.prototype._rand=function(e){return e=new Uint8Array(e),self.crypto.getRandomValues(e),e}:self.msCrypto&&self.msCrypto.getRandomValues?o.prototype._rand=function(e){return e=new Uint8Array(e),self.msCrypto.getRandomValues(e),e}:"object"===("undefined"==typeof window?"undefined":r(window))&&(o.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var a=e("crypto");if("function"!=typeof a.randomBytes)throw new Error("Not supported");o.prototype._rand=function(e){return a.randomBytes(e)}}catch(e){}},{crypto:185}],185:[function(e,t,n){},{}],186:[function(e,t,n){"use strict";var r=e("safe-buffer").Buffer;function i(e){for(var t=(e=r.isBuffer(e)?e:r.from(e)).length/4|0,n=new Array(t),i=0;i<t;i++)n[i]=e.readUInt32BE(4*i);return n}function o(e){for(;0<e.length;e++)e[0]=0}function a(e,t,n,r,i){for(var o,a,s,u,c=n[0],l=n[1],h=n[2],f=n[3],d=e[0]^t[0],p=e[1]^t[1],m=e[2]^t[2],g=e[3]^t[3],A=4,v=1;v<i;v++)o=c[d>>>24]^l[p>>>16&255]^h[m>>>8&255]^f[255&g]^t[A++],a=c[p>>>24]^l[m>>>16&255]^h[g>>>8&255]^f[255&d]^t[A++],s=c[m>>>24]^l[g>>>16&255]^h[d>>>8&255]^f[255&p]^t[A++],u=c[g>>>24]^l[d>>>16&255]^h[p>>>8&255]^f[255&m]^t[A++],d=o,p=a,m=s,g=u;return o=(r[d>>>24]<<24|r[p>>>16&255]<<16|r[m>>>8&255]<<8|r[255&g])^t[A++],a=(r[p>>>24]<<24|r[m>>>16&255]<<16|r[g>>>8&255]<<8|r[255&d])^t[A++],s=(r[m>>>24]<<24|r[g>>>16&255]<<16|r[d>>>8&255]<<8|r[255&p])^t[A++],u=(r[g>>>24]<<24|r[d>>>16&255]<<16|r[p>>>8&255]<<8|r[255&m])^t[A++],[o>>>=0,a>>>=0,s>>>=0,u>>>=0]}var s=[0,1,2,4,8,16,32,64,128,27,54],u=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var n=[],r=[],i=[[],[],[],[]],o=[[],[],[],[]],a=0,s=0,u=0;u<256;++u){var c=s^s<<1^s<<2^s<<3^s<<4,l=(n[a]=c=c>>>8^255&c^99,e[r[c]=a]),h=e[l],f=e[h],d=257*e[c]^16843008*c;i[0][a]=d<<24|d>>>8,i[1][a]=d<<16|d>>>16,i[2][a]=d<<8|d>>>24,i[3][a]=d,o[0][c]=(d=16843009*f^65537*h^257*l^16843008*a)<<24|d>>>8,o[1][c]=d<<16|d>>>16,o[2][c]=d<<8|d>>>24,o[3][c]=d,0===a?a=s=1:(a=l^e[e[e[f^l]]],s^=e[e[s]])}return{SBOX:n,INV_SBOX:r,SUB_MIX:i,INV_SUB_MIX:o}}();function c(e){this._key=i(e),this._reset()}c.blockSize=16,c.keySize=32,c.prototype.blockSize=c.blockSize,c.prototype.keySize=c.keySize,c.prototype._reset=function(){for(var e=this._key,t=e.length,n=t+6,r=4*(n+1),i=[],o=0;o<t;o++)i[o]=e[o];for(o=t;o<r;o++){var a=i[o-1];o%t==0?(a=u.SBOX[(a=a<<8|a>>>24)>>>24]<<24|u.SBOX[a>>>16&255]<<16|u.SBOX[a>>>8&255]<<8|u.SBOX[255&a],a^=s[o/t|0]<<24):6<t&&o%t==4&&(a=u.SBOX[a>>>24]<<24|u.SBOX[a>>>16&255]<<16|u.SBOX[a>>>8&255]<<8|u.SBOX[255&a]),i[o]=i[o-t]^a}for(var c=[],l=0;l<r;l++){var h=r-l,f=i[h-(l%4?0:4)];c[l]=l<4||h<=4?f:u.INV_SUB_MIX[0][u.SBOX[f>>>24]]^u.INV_SUB_MIX[1][u.SBOX[f>>>16&255]]^u.INV_SUB_MIX[2][u.SBOX[f>>>8&255]]^u.INV_SUB_MIX[3][u.SBOX[255&f]]}this._nRounds=n,this._keySchedule=i,this._invKeySchedule=c},c.prototype.encryptBlockRaw=function(e){return a(e=i(e),this._keySchedule,u.SUB_MIX,u.SBOX,this._nRounds)},c.prototype.encryptBlock=function(e){e=this.encryptBlockRaw(e);var t=r.allocUnsafe(16);return t.writeUInt32BE(e[0],0),t.writeUInt32BE(e[1],4),t.writeUInt32BE(e[2],8),t.writeUInt32BE(e[3],12),t},c.prototype.decryptBlock=function(e){var t=(e=i(e))[1];e[1]=e[3],e[3]=t,t=a(e,this._invKeySchedule,u.INV_SUB_MIX,u.INV_SBOX,this._nRounds);return(e=r.allocUnsafe(16)).writeUInt32BE(t[0],0),e.writeUInt32BE(t[3],4),e.writeUInt32BE(t[2],8),e.writeUInt32BE(t[1],12),e},c.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},t.exports.AES=c},{"safe-buffer":494}],187:[function(e,t,n){"use strict";var r=e("./aes"),i=e("safe-buffer").Buffer,o=e("cipher-base"),a=e("inherits"),s=e("./ghash"),u=e("buffer-xor"),c=e("./incr32");function l(e,t,n,a){o.call(this);var u,l,h,f=i.alloc(4,0);this._cipher=new r.AES(t),t=this._cipher.encryptBlock(f);this._ghash=new s(t),f=this,t=t,n=12===(u=n).length?(f._finID=i.concat([u,i.from([0,0,0,1])]),i.concat([u,i.from([0,0,0,2])])):(t=new s(t),l=(h=u.length)%16,t.update(u),l&&t.update(i.alloc(l=16-l,0)),t.update(i.alloc(8,0)),u=8*h,(l=i.alloc(8)).writeUIntBE(u,0,8),t.update(l),f._finID=t.state,h=i.from(f._finID),c(h),h),this._prev=i.from(n),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=a,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}a(l,o),l.prototype._update=function(e){!this._called&&this._alen&&(t=16-this._alen%16)<16&&(t=i.alloc(t,0),this._ghash.update(t)),this._called=!0;var t=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(t),this._len+=e.length,t},l.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=u(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,t){var n=0;e.length!==t.length&&n++;for(var r=Math.min(e.length,t.length),i=0;i<r;++i)n+=e[i]^t[i];return n}(e,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=e,this._cipher.scrub()},l.prototype.getAuthTag=function(){if(this._decrypt||!i.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},l.prototype.setAuthTag=function(e){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=e},l.prototype.setAAD=function(e){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(e),this._alen+=e.length},t.exports=l},{"./aes":186,"./ghash":191,"./incr32":192,"buffer-xor":217,"cipher-base":218,inherits:387,"safe-buffer":494}],188:[function(e,t,n){"use strict";var r=e("./encrypter"),i=e("./decrypter"),o=e("./modes/list.json");n.createCipher=n.Cipher=r.createCipher,n.createCipheriv=n.Cipheriv=r.createCipheriv,n.createDecipher=n.Decipher=i.createDecipher,n.createDecipheriv=n.Decipheriv=i.createDecipheriv,n.listCiphers=n.getCiphers=function(){return Object.keys(o)}},{"./decrypter":189,"./encrypter":190,"./modes/list.json":200}],189:[function(e,t,n){"use strict";var r=e("./authCipher"),i=e("safe-buffer").Buffer,o=e("./modes"),a=e("./streamCipher"),s=e("cipher-base"),u=e("./aes"),c=e("evp_bytestokey");function l(e,t,n){s.call(this),this._cache=new h,this._last=void 0,this._cipher=new u.AES(t),this._prev=i.from(n),this._mode=e,this._autopadding=!0}function h(){this.cache=i.allocUnsafe(0)}function f(e,t,n){if(!(e=o[e.toLowerCase()]))throw new TypeError("invalid suite type");if("string"==typeof n&&(n=i.from(n)),"GCM"!==e.mode&&n.length!==e.iv)throw new TypeError("invalid iv length "+n.length);if((t="string"==typeof t?i.from(t):t).length!==e.key/8)throw new TypeError("invalid key length "+t.length);return"stream"===e.type?new a(e.module,t,n,!0):"auth"===e.type?new r(e.module,t,n,!0):new l(e.module,t,n)}e("inherits")(l,s),l.prototype._update=function(e){var t;this._cache.add(e);for(var n=[];t=this._cache.get(this._autopadding);)t=this._mode.decrypt(this,t),n.push(t);return i.concat(n)},l.prototype._final=function(){var e=this._cache.flush();if(this._autopadding){var t=this._mode.decrypt(this,e),n=t[15];if(n<1||16<n)throw new Error("unable to decrypt data");for(var r=-1;++r<n;)if(t[r+(16-n)]!==n)throw new Error("unable to decrypt data");if(16!==n)return t.slice(0,16-n)}else if(e)throw new Error("data not multiple of block length")},l.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},h.prototype.add=function(e){this.cache=i.concat([this.cache,e])},h.prototype.get=function(e){var t;if(e){if(16<this.cache.length)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(16<=this.cache.length)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},h.prototype.flush=function(){if(this.cache.length)return this.cache},n.createDecipher=function(e,t){var n=o[e.toLowerCase()];if(n)return f(e,(e=c(t,!1,n.key,n.iv)).key,e.iv);throw new TypeError("invalid suite type")},n.createDecipheriv=f},{"./aes":186,"./authCipher":187,"./modes":199,"./streamCipher":202,"cipher-base":218,evp_bytestokey:368,inherits:387,"safe-buffer":494}],190:[function(e,t,n){"use strict";var r=e("./modes"),i=e("./authCipher"),o=e("safe-buffer").Buffer,a=e("./streamCipher"),s=e("cipher-base"),u=e("./aes"),c=e("evp_bytestokey");function l(e,t,n){s.call(this),this._cache=new f,this._cipher=new u.AES(t),this._prev=o.from(n),this._mode=e,this._autopadding=!0}e("inherits")(l,s),l.prototype._update=function(e){var t;this._cache.add(e);for(var n=[];t=this._cache.get();)t=this._mode.encrypt(this,t),n.push(t);return o.concat(n)};var h=o.alloc(16,16);function f(){this.cache=o.allocUnsafe(0)}function d(e,t,n){if(!(e=r[e.toLowerCase()]))throw new TypeError("invalid suite type");if((t="string"==typeof t?o.from(t):t).length!==e.key/8)throw new TypeError("invalid key length "+t.length);if("string"==typeof n&&(n=o.from(n)),"GCM"!==e.mode&&n.length!==e.iv)throw new TypeError("invalid iv length "+n.length);return new("stream"===e.type?a:"auth"===e.type?i:l)(e.module,t,n)}l.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(h))throw this._cipher.scrub(),new Error("data not multiple of block length")},l.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},f.prototype.add=function(e){this.cache=o.concat([this.cache,e])},f.prototype.get=function(){var e;return 15<this.cache.length?(e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e):null},f.prototype.flush=function(){for(var e=16-this.cache.length,t=o.allocUnsafe(e),n=-1;++n<e;)t.writeUInt8(e,n);return o.concat([this.cache,t])},n.createCipheriv=d,n.createCipher=function(e,t){var n=r[e.toLowerCase()];if(n)return d(e,(e=c(t,!1,n.key,n.iv)).key,e.iv);throw new TypeError("invalid suite type")}},{"./aes":186,"./authCipher":187,"./modes":199,"./streamCipher":202,"cipher-base":218,evp_bytestokey:368,inherits:387,"safe-buffer":494}],191:[function(e,t,n){"use strict";var r=e("safe-buffer").Buffer,i=r.alloc(16,0);function o(e){var t=r.allocUnsafe(16);return t.writeUInt32BE(e[0]>>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function a(e){this.h=e,this.state=r.alloc(16,0),this.cache=r.allocUnsafe(0)}a.prototype.ghash=function(e){for(var t=-1;++t<e.length;)this.state[t]^=e[t];this._multiply()},a.prototype._multiply=function(){for(var e,t,n,r=[(e=this.h).readUInt32BE(0),e.readUInt32BE(4),e.readUInt32BE(8),e.readUInt32BE(12)],i=[0,0,0,0],a=-1;++a<128;){for(0!=(this.state[~~(a/8)]&1<<7-a%8)&&(i[0]^=r[0],i[1]^=r[1],i[2]^=r[2],i[3]^=r[3]),n=0!=(1&r[3]),t=3;0<t;t--)r[t]=r[t]>>>1|(1&r[t-1])<<31;r[0]=r[0]>>>1,n&&(r[0]=r[0]^225<<24)}this.state=o(i)},a.prototype.update=function(e){var t;for(this.cache=r.concat([this.cache,e]);16<=this.cache.length;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},a.prototype.final=function(e,t){return this.cache.length&&this.ghash(r.concat([this.cache,i],16)),this.ghash(o([0,e,0,t])),this.state},t.exports=a},{"safe-buffer":494}],192:[function(e,t,n){"use strict";t.exports=function(e){for(var t,n=e.length;n--;){if(255!==(t=e.readUInt8(n))){t++,e.writeUInt8(t,n);break}e.writeUInt8(0,n)}}},{}],193:[function(e,t,n){"use strict";var r=e("buffer-xor");n.encrypt=function(e,t){return t=r(t,e._prev),e._prev=e._cipher.encryptBlock(t),e._prev},n.decrypt=function(e,t){var n=e._prev;e._prev=t,e=e._cipher.decryptBlock(t);return r(e,n)}},{"buffer-xor":217}],194:[function(e,t,n){"use strict";var r=e("safe-buffer").Buffer,i=e("buffer-xor");function o(e,t,n){var o=t.length,a=i(t,e._cache);return e._cache=e._cache.slice(o),e._prev=r.concat([e._prev,n?t:a]),a}n.encrypt=function(e,t,n){for(var i,a=r.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=r.allocUnsafe(0)),!(e._cache.length<=t.length)){a=r.concat([a,o(e,t,n)]);break}i=e._cache.length,a=r.concat([a,o(e,t.slice(0,i),n)]),t=t.slice(i)}return a}},{"buffer-xor":217,"safe-buffer":494}],195:[function(e,t,n){"use strict";var r=e("safe-buffer").Buffer;function i(e,t,n){for(var i,o,a=-1,s=0;++a<8;)i=t&1<<7-a?128:0,s+=(128&(o=e._cipher.encryptBlock(e._prev)[0]^i))>>a%8,e._prev=function(e,t){var n=e.length,i=-1,o=r.allocUnsafe(e.length);for(e=r.concat([e,r.from([t])]);++i<n;)o[i]=e[i]<<1|e[i+1]>>7;return o}(e._prev,n?i:o);return s}n.encrypt=function(e,t,n){for(var o=t.length,a=r.allocUnsafe(o),s=-1;++s<o;)a[s]=i(e,t[s],n);return a}},{"safe-buffer":494}],196:[function(e,t,n){"use strict";var r=e("safe-buffer").Buffer;n.encrypt=function(e,t,n){for(var i,o,a,s,u=t.length,c=r.allocUnsafe(u),l=-1;++l<u;)c[l]=(i=e,o=t[l],a=n,void 0,s=i._cipher.encryptBlock(i._prev)[0]^o,i._prev=r.concat([i._prev.slice(1),r.from([a?o:s])]),s);return c}},{"safe-buffer":494}],197:[function(e,t,n){"use strict";var r=e("buffer-xor"),i=e("safe-buffer").Buffer,o=e("../incr32");n.encrypt=function(e,t){var n=Math.ceil(t.length/16),a=e._cache.length;e._cache=i.concat([e._cache,i.allocUnsafe(16*n)]);for(var s=0;s<n;s++){c=void 0,c=(u=e)._cipher.encryptBlockRaw(u._prev),o(u._prev);var u=c,c=a+16*s;e._cache.writeUInt32BE(u[0],c+0),e._cache.writeUInt32BE(u[1],c+4),e._cache.writeUInt32BE(u[2],c+8),e._cache.writeUInt32BE(u[3],c+12)}var l=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),r(t,l)}},{"../incr32":192,"buffer-xor":217,"safe-buffer":494}],198:[function(e,t,n){"use strict";n.encrypt=function(e,t){return e._cipher.encryptBlock(t)},n.decrypt=function(e,t){return e._cipher.decryptBlock(t)}},{}],199:[function(e,t,n){"use strict";var r,i={ECB:e("./ecb"),CBC:e("./cbc"),CFB:e("./cfb"),CFB8:e("./cfb8"),CFB1:e("./cfb1"),OFB:e("./ofb"),CTR:e("./ctr"),GCM:e("./ctr")},o=e("./list.json");for(r in o)o[r].module=i[o[r].mode];t.exports=o},{"./cbc":193,"./cfb":194,"./cfb1":195,"./cfb8":196,"./ctr":197,"./ecb":198,"./list.json":200,"./ofb":201}],200:[function(e,t,n){t.exports={"aes-128-ecb":{cipher:"AES",key:128,iv:0,mode:"ECB",type:"block"},"aes-192-ecb":{cipher:"AES",key:192,iv:0,mode:"ECB",type:"block"},"aes-256-ecb":{cipher:"AES",key:256,iv:0,mode:"ECB",type:"block"},"aes-128-cbc":{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},"aes-192-cbc":{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},"aes-256-cbc":{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},aes128:{cipher:"AES",key:128,iv:16,mode:"CBC",type:"block"},aes192:{cipher:"AES",key:192,iv:16,mode:"CBC",type:"block"},aes256:{cipher:"AES",key:256,iv:16,mode:"CBC",type:"block"},"aes-128-cfb":{cipher:"AES",key:128,iv:16,mode:"CFB",type:"stream"},"aes-192-cfb":{cipher:"AES",key:192,iv:16,mode:"CFB",type:"stream"},"aes-256-cfb":{cipher:"AES",key:256,iv:16,mode:"CFB",type:"stream"},"aes-128-cfb8":{cipher:"AES",key:128,iv:16,mode:"CFB8",type:"stream"},"aes-192-cfb8":{cipher:"AES",key:192,iv:16,mode:"CFB8",type:"stream"},"aes-256-cfb8":{cipher:"AES",key:256,iv:16,mode:"CFB8",type:"stream"},"aes-128-cfb1":{cipher:"AES",key:128,iv:16,mode:"CFB1",type:"stream"},"aes-192-cfb1":{cipher:"AES",key:192,iv:16,mode:"CFB1",type:"stream"},"aes-256-cfb1":{cipher:"AES",key:256,iv:16,mode:"CFB1",type:"stream"},"aes-128-ofb":{cipher:"AES",key:128,iv:16,mode:"OFB",type:"stream"},"aes-192-ofb":{cipher:"AES",key:192,iv:16,mode:"OFB",type:"stream"},"aes-256-ofb":{cipher:"AES",key:256,iv:16,mode:"OFB",type:"stream"},"aes-128-ctr":{cipher:"AES",key:128,iv:16,mode:"CTR",type:"stream"},"aes-192-ctr":{cipher:"AES",key:192,iv:16,mode:"CTR",type:"stream"},"aes-256-ctr":{cipher:"AES",key:256,iv:16,mode:"CTR",type:"stream"},"aes-128-gcm":{cipher:"AES",key:128,iv:12,mode:"GCM",type:"auth"},"aes-192-gcm":{cipher:"AES",key:192,iv:12,mode:"GCM",type:"auth"},"aes-256-gcm":{cipher:"AES",key:256,iv:12,mode:"GCM",type:"auth"}}},{}],201:[function(e,t,n){(function(t){"use strict";var r=e("buffer-xor");n.encrypt=function(e,n){for(;e._cache.length<n.length;)e._cache=t.concat([e._cache,((i=e)._prev=i._cipher.encryptBlock(i._prev),i._prev)]);var i,o=e._cache.slice(0,n.length);return e._cache=e._cache.slice(n.length),r(n,o)}}).call(this,e("buffer").Buffer)},{buffer:216,"buffer-xor":217}],202:[function(e,t,n){"use strict";var r=e("./aes"),i=e("safe-buffer").Buffer,o=e("cipher-base");function a(e,t,n,a){o.call(this),this._cipher=new r.AES(t),this._prev=i.from(n),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=a,this._mode=e}e("inherits")(a,o),a.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},a.prototype._final=function(){this._cipher.scrub()},t.exports=a},{"./aes":186,"cipher-base":218,inherits:387,"safe-buffer":494}],203:[function(e,t,n){"use strict";var r=e("browserify-des"),i=e("browserify-aes/browser"),o=e("browserify-aes/modes"),a=e("browserify-des/modes"),s=e("evp_bytestokey");function u(e,t,n){if(e=e.toLowerCase(),o[e])return i.createCipheriv(e,t,n);if(a[e])return new r({key:t,iv:n,mode:e});throw new TypeError("invalid suite type")}function c(e,t,n){if(e=e.toLowerCase(),o[e])return i.createDecipheriv(e,t,n);if(a[e])return new r({key:t,iv:n,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}n.createCipher=n.Cipher=function(e,t){var n,r;if(e=e.toLowerCase(),o[e])n=o[e].key,r=o[e].iv;else{if(!a[e])throw new TypeError("invalid suite type");n=8*a[e].key,r=a[e].iv}return u(e,(t=s(t,!1,n,r)).key,t.iv)},n.createCipheriv=n.Cipheriv=u,n.createDecipher=n.Decipher=function(e,t){var n,r;if(e=e.toLowerCase(),o[e])n=o[e].key,r=o[e].iv;else{if(!a[e])throw new TypeError("invalid suite type");n=8*a[e].key,r=a[e].iv}return c(e,(t=s(t,!1,n,r)).key,t.iv)},n.createDecipheriv=n.Decipheriv=c,n.listCiphers=n.getCiphers=function(){return Object.keys(a).concat(i.getCiphers())}},{"browserify-aes/browser":188,"browserify-aes/modes":199,"browserify-des":204,"browserify-des/modes":205,evp_bytestokey:368}],204:[function(e,t,n){"use strict";var r=e("cipher-base"),i=e("des.js"),o=e("inherits"),a=e("safe-buffer").Buffer,s={"des-ede3-cbc":i.CBC.instantiate(i.EDE),"des-ede3":i.EDE,"des-ede-cbc":i.CBC.instantiate(i.EDE),"des-ede":i.EDE,"des-cbc":i.CBC.instantiate(i.DES),"des-ecb":i.DES};function u(e){r.call(this);var t=e.mode.toLowerCase(),n=s[t],i=e.decrypt?"decrypt":"encrypt",o=e.key;a.isBuffer(o)||(o=a.from(o)),"des-ede"!==t&&"des-ede-cbc"!==t||(o=a.concat([o,o.slice(0,8)])),t=e.iv;a.isBuffer(t)||(t=a.from(t)),this._des=n.create({key:o,iv:t,type:i})}s.des=s["des-cbc"],s.des3=s["des-ede3-cbc"],o(t.exports=u,r),u.prototype._update=function(e){return a.from(this._des.update(e))},u.prototype._final=function(){return a.from(this._des.final())}},{"cipher-base":218,"des.js":339,inherits:387,"safe-buffer":494}],205:[function(e,t,n){"use strict";n["des-ecb"]={key:8,iv:0},n["des-cbc"]=n.des={key:8,iv:8},n["des-ede3-cbc"]=n.des3={key:24,iv:8},n["des-ede3"]={key:24,iv:0},n["des-ede-cbc"]={key:16,iv:8},n["des-ede"]={key:16,iv:0}},{}],206:[function(e,t,n){(function(n){"use strict";var r=e("bn.js"),i=e("randombytes");function o(e){for(var t=e.modulus.byteLength(),n=new r(i(t));0<=n.cmp(e.modulus)||!n.umod(e.prime1)||!n.umod(e.prime2);)n=new r(i(t));return n}(t.exports=function(e,t){var i={blinder:(i=o(a=t)).toRed(r.mont(a.modulus)).redPow(new r(a.publicExponent)).fromRed(),unblinder:i.invm(a.modulus)},a=t.modulus.byteLength(),s=(e=(r.mont(t.modulus),new r(e).mul(i.blinder).umod(t.modulus))).toRed(r.mont(t.prime1)),u=(e=e.toRed(r.mont(t.prime2)),t.coefficient),c=t.prime1,l=t.prime2;return s=s.redPow(t.exponent1),e=e.redPow(t.exponent2),s=s.fromRed(),e=e.fromRed(),(s=s.isub(e).imul(u).umod(c)).imul(l),e.iadd(s),new n(e.imul(i.unblinder).umod(t.modulus).toArray(!1,a))}).getr=o}).call(this,e("buffer").Buffer)},{"bn.js":207,buffer:216,randombytes:475}],207:[function(e,t,n){arguments[4][181][0].apply(n,arguments)},{buffer:185,dup:181}],208:[function(e,t,n){"use strict";t.exports=e("./browser/algorithms.json")},{"./browser/algorithms.json":209}],209:[function(e,t,n){t.exports={sha224WithRSAEncryption:{sign:"rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},"RSA-SHA224":{sign:"ecdsa/rsa",hash:"sha224",id:"302d300d06096086480165030402040500041c"},sha256WithRSAEncryption:{sign:"rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},"RSA-SHA256":{sign:"ecdsa/rsa",hash:"sha256",id:"3031300d060960864801650304020105000420"},sha384WithRSAEncryption:{sign:"rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},"RSA-SHA384":{sign:"ecdsa/rsa",hash:"sha384",id:"3041300d060960864801650304020205000430"},sha512WithRSAEncryption:{sign:"rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA512":{sign:"ecdsa/rsa",hash:"sha512",id:"3051300d060960864801650304020305000440"},"RSA-SHA1":{sign:"rsa",hash:"sha1",id:"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{sign:"ecdsa",hash:"sha1",id:""},sha256:{sign:"ecdsa",hash:"sha256",id:""},sha224:{sign:"ecdsa",hash:"sha224",id:""},sha384:{sign:"ecdsa",hash:"sha384",id:""},sha512:{sign:"ecdsa",hash:"sha512",id:""},"DSA-SHA":{sign:"dsa",hash:"sha1",id:""},"DSA-SHA1":{sign:"dsa",hash:"sha1",id:""},DSA:{sign:"dsa",hash:"sha1",id:""},"DSA-WITH-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-SHA224":{sign:"dsa",hash:"sha224",id:""},"DSA-WITH-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-SHA256":{sign:"dsa",hash:"sha256",id:""},"DSA-WITH-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-SHA384":{sign:"dsa",hash:"sha384",id:""},"DSA-WITH-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-SHA512":{sign:"dsa",hash:"sha512",id:""},"DSA-RIPEMD160":{sign:"dsa",hash:"rmd160",id:""},ripemd160WithRSA:{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},"RSA-RIPEMD160":{sign:"rsa",hash:"rmd160",id:"3021300906052b2403020105000414"},md5WithRSAEncryption:{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"},"RSA-MD5":{sign:"rsa",hash:"md5",id:"3020300c06082a864886f70d020505000410"}}},{}],210:[function(e,t,n){t.exports={"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}},{}],211:[function(e,t,n){"use strict";var r=e("safe-buffer").Buffer,i=e("create-hash"),o=e("readable-stream"),a=e("inherits"),s=e("./sign"),u=e("./verify"),c=e("./algorithms.json");function l(e){if(o.Writable.call(this),!(e=c[e]))throw new Error("Unknown message digest");this._hashType=e.hash,this._hash=i(e.hash),this._tag=e.id,this._signType=e.sign}function h(e){if(o.Writable.call(this),!(e=c[e]))throw new Error("Unknown message digest");this._hash=i(e.hash),this._tag=e.id,this._signType=e.sign}function f(e){return new l(e)}function d(e){return new h(e)}Object.keys(c).forEach((function(e){c[e].id=r.from(c[e].id,"hex"),c[e.toLowerCase()]=c[e]})),a(l,o.Writable),l.prototype._write=function(e,t,n){this._hash.update(e),n()},l.prototype.update=function(e,t){return"string"==typeof e&&(e=r.from(e,t)),this._hash.update(e),this},l.prototype.sign=function(e,t){this.end();var n=this._hash.digest();n=s(n,e,this._hashType,this._signType,this._tag);return t?n.toString(t):n},a(h,o.Writable),h.prototype._write=function(e,t,n){this._hash.update(e),n()},h.prototype.update=function(e,t){return"string"==typeof e&&(e=r.from(e,t)),this._hash.update(e),this},h.prototype.verify=function(e,t,n){return"string"==typeof t&&(t=r.from(t,n)),this.end(),n=this._hash.digest(),u(t,n,e,this._signType,this._tag)},t.exports={Sign:f,Verify:d,createSign:f,createVerify:d}},{"./algorithms.json":209,"./sign":212,"./verify":213,"create-hash":331,inherits:387,"readable-stream":491,"safe-buffer":214}],212:[function(e,t,n){"use strict";var r=e("safe-buffer").Buffer,i=e("create-hmac"),o=e("browserify-rsa"),a=e("elliptic").ec,s=e("bn.js"),u=e("parse-asn1"),c=e("./curves.json");function l(e,t,n,o){(e=r.from(e.toArray())).length<t.byteLength()&&(a=r.alloc(t.byteLength()-e.length),e=r.concat([a,e]));var a=n.length,s=(t=function(e,t){return e=(e=h(n,t)).mod(t),(e=r.from(e.toArray())).length<t.byteLength()&&(t=r.alloc(t.byteLength()-e.length),e=r.concat([t,e])),e}(n,t),a=((s=r.alloc(a)).fill(1),r.alloc(a)),a=i(o,a).update(s).update(r.from([0])).update(e).update(t).digest(),i(o,a).update(s).digest());return{k:a=i(o,a).update(s).update(r.from([1])).update(e).update(t).digest(),v:s=i(o,a).update(s).digest()}}function h(e,t){var n=new s(e);return 0<(e=(e.length<<3)-t.bitLength())&&n.ishrn(e),n}function f(e,t,n){var o,a;do{for(o=r.alloc(0);8*o.length<e.bitLength();)t.v=i(n,t.k).update(t.v).digest(),o=r.concat([o,t.v])}while(a=h(o,e),t.k=i(n,t.k).update(t.v).update(r.from([0])).digest(),t.v=i(n,t.k).update(t.v).digest(),-1!==a.cmp(e));return a}t.exports=function(e,t,n,i,d){if((t=u(t)).curve){if("ecdsa"!==i&&"ecdsa/rsa"!==i)throw new Error("wrong private key type");var p=e,m=t,g=c[m.curve.join(".")];if(g)return g=new a(g).keyFromPrivate(m.privateKey).sign(p),r.from(g.toDER());throw new Error("unknown curve "+m.curve.join("."))}if("dsa"===t.type){if("dsa"!==i)throw new Error("wrong private key type");p=e;for(var A,v,b,y=n,w=t.params.priv_key,x=t.params.p,C=t.params.q,k=t.params.g,E=new s(0),S=h(p,C).mod(C),_=!1,O=l(w,C,p,y);!1===_;)v=A=f(C,O,y),b=C,E=k.toRed(s.mont(x)).redPow(v).fromRed().mod(b),0===(_=A.invm(C).imul(S.add(w.mul(E))).mod(C)).cmpn(0)&&(_=!1,E=new s(0));return p=_,g=(g=E).toArray(),p=p.toArray(),128&g[0]&&(g=[0].concat(g)),128&p[0]&&(p=[0].concat(p)),m=(m=[48,g.length+p.length+4,2,g.length]).concat(g,[2,p.length],p),r.from(m)}if("rsa"!==i&&"ecdsa/rsa"!==i)throw new Error("wrong private key type");e=r.concat([d,e]);for(var T=t.modulus.byteLength(),D=[0,1];e.length+D.length+1<T;)D.push(255);D.push(0);for(var B=-1;++B<e.length;)D.push(e[B]);return o(D,t)},t.exports.getKey=l,t.exports.makeKey=f},{"./curves.json":210,"bn.js":183,"browserify-rsa":206,"create-hmac":333,elliptic:350,"parse-asn1":459,"safe-buffer":214}],213:[function(e,t,n){"use strict";var r=e("safe-buffer").Buffer,i=e("bn.js"),o=e("elliptic").ec,a=e("parse-asn1"),s=e("./curves.json");function u(e,t){if(e.cmpn(0)<=0)throw new Error("invalid sig");if(e.cmp(t)>=t)throw new Error("invalid sig")}t.exports=function(e,t,n,c,l){var h,f;if("ec"===(n=a(n)).type){if("ecdsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");var d,p=e,m=t,g=n,A=s[g.data.algorithm.curve.join(".")];if(A)return A=new o(A),d=g.data.subjectPrivateKey.data,A.verify(m,p,d);throw new Error("unknown curve "+g.data.algorithm.curve.join("."))}if("dsa"===n.type){if("dsa"!==c)throw new Error("wrong public key type");return A=e,m=t,p=n.data.p,d=n.data.q,g=n.data.g,x=n.data.pub_key,h=(A=a.signature.decode(A,"der")).s,A=A.r,u(h,d),u(A,d),f=i.mont(p),h=h.invm(d),0===g.toRed(f).redPow(new i(m).mul(h).mod(d)).fromRed().mul(x.toRed(f).redPow(A.mul(h).mod(d)).fromRed()).mod(p).mod(d).cmp(A)}if("rsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");t=r.concat([l,t]);for(var v=n.modulus.byteLength(),b=[1],y=0;t.length+b.length+2<v;)b.push(255),y++;b.push(0);for(var w=-1;++w<t.length;)b.push(t[w]);b=r.from(b);var x=i.mont(n.modulus),C=(e=(e=new i(e).toRed(x)).redPow(new i(n.publicExponent)),e=r.from(e.fromRed().toArray()),y<8?1:0);v=Math.min(e.length,b.length);for(e.length!==b.length&&(C=1),w=-1;++w<v;)C|=e[w]^b[w];return 0===C}},{"./curves.json":210,"bn.js":183,elliptic:350,"parse-asn1":459,"safe-buffer":214}],214:[function(e,t,n){"use strict";
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var r=e("buffer"),i=r.Buffer;function o(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(o(r,n),n.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},a.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");return e=i(e),void 0!==t?"string"==typeof n?e.fill(t,n):e.fill(t):e.fill(0),e},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},{buffer:216}],215:[function(e,t,n){arguments[4][185][0].apply(n,arguments)},{dup:185}],216:[function(e,t,n){(function(t){
/*!
 * The buffer module from node.js, for the browser.
 *
 * @author   Feross Aboukhadijeh <https://feross.org>
 * @license  MIT
 */
"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=e("base64-js"),o=e("ieee754");function a(e){if(2147483647<e)throw new RangeError('The value "'+e+'" is invalid for option "size"');return(e=new Uint8Array(e)).__proto__=t.prototype,e}function t(e,t,n){if("number"!=typeof e)return s(e,t,n);if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return c(e)}function s(e,n,i){if("string"==typeof e){var o=e,s=n;if(t.isEncoding(s="string"==typeof s&&""!==s?s:"utf8"))return(o=(c=a(u=0|f(o,s))).write(o,s))!==u?c.slice(0,o):c;throw new TypeError("Unknown encoding: "+s)}if(ArrayBuffer.isView(e))return l(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+r(e));if(O(e,ArrayBuffer)||e&&O(e.buffer,ArrayBuffer)){var u=e,c=i;if((o=n)<0||u.byteLength<o)throw new RangeError('"offset" is outside of buffer bounds');if(u.byteLength<o+(c||0))throw new RangeError('"length" is outside of buffer bounds');return(u=void 0===o&&void 0===c?new Uint8Array(u):void 0===c?new Uint8Array(u,o):new Uint8Array(u,o,c)).__proto__=t.prototype,u}if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');if(null!=(s=e.valueOf&&e.valueOf())&&s!==e)return t.from(s,n,i);var d,p,m=t.isBuffer(d=e)?(0!==(p=a(m=0|h(d.length))).length&&d.copy(p,0,0,m),p):void 0!==d.length?"number"!=typeof d.length||T(d.length)?a(0):l(d):"Buffer"===d.type&&Array.isArray(d.data)?l(d.data):void 0;if(m)return m;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return t.from(e[Symbol.toPrimitive]("string"),n,i);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+r(e))}function u(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function c(e){return u(e),a(e<0?0:0|h(e))}function l(e){for(var t=e.length<0?0:0|h(e.length),n=a(t),r=0;r<t;r+=1)n[r]=255&e[r];return n}function h(e){if(2147483647<=e)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+2147483647..toString(16)+" bytes");return 0|e}function f(e,n){if(t.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||O(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+r(e));var i=e.length,o=2<arguments.length&&!0===arguments[2];if(!o&&0===i)return 0;for(var a=!1;;)switch(n){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":return E(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return S(e).length;default:if(a)return o?-1:E(e).length;n=(""+n).toLowerCase(),a=!0}}function d(e,t,n){var r,o=!1;if((t=void 0===t||t<0?0:t)>this.length)return"";if((n=void 0===n||n>this.length?this.length:n)<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e=e||"utf8";;)switch(e){case"hex":var a=t,s=n,u=this.length;(!s||s<0||u<s)&&(s=u);for(var c="",l=a=!a||a<0?0:a;l<s;++l)c+=function(e){return e<16?"0"+e.toString(16):e.toString(16)}(this[l]);return c;case"utf8":case"utf-8":return v(this,t,n);case"ascii":u=t;var h=n,f="";h=Math.min(this.length,h);for(var d=u;d<h;++d)f+=String.fromCharCode(127&this[d]);return f;case"latin1":case"binary":a=t;var p=n,m="";p=Math.min(this.length,p);for(var g=a;g<p;++g)m+=String.fromCharCode(this[g]);return m;case"base64":return A=this,r=n,0===(b=t)&&r===A.length?i.fromByteArray(A):i.fromByteArray(A.slice(b,r));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":for(var A=t,b=n,y=this.slice(A,b),w="",x=0;x<y.length;x+=2)w+=String.fromCharCode(y[x]+256*y[x+1]);return w;default:if(o)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),o=!0}}function p(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function m(e,n,r,i,o){if(0===e.length)return-1;if("string"==typeof r?(i=r,r=0):2147483647<r?r=2147483647:r<-2147483648&&(r=-2147483648),(r=(r=T(r=+r)?o?0:e.length-1:r)<0?e.length+r:r)>=e.length){if(o)return-1;r=e.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof n&&(n=t.from(n,i)),t.isBuffer(n))return 0===n.length?-1:g(e,n,r,i,o);if("number"==typeof n)return n&=255,"function"==typeof Uint8Array.prototype.indexOf?(o?Uint8Array.prototype.indexOf:Uint8Array.prototype.lastIndexOf).call(e,n,r):g(e,[n],r,i,o);throw new TypeError("val must be string, number or Buffer")}function g(e,t,n,r,i){var o=1,a=e.length,s=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a/=o=2,s/=2,n/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i)for(var c=-1,l=n;l<a;l++)if(u(e,l)===u(t,-1===c?0:l-c)){if(l-(c=-1===c?l:c)+1===s)return c*o}else-1!==c&&(l-=l-c),c=-1;else for(l=n=a<n+s?a-s:n;0<=l;l--){for(var h=!0,f=0;f<s;f++)if(u(e,l+f)!==u(t,f)){h=!1;break}if(h)return l}return-1}function A(e,t,n,r){return _(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function v(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,a,s,u,c=e[i],l=null,h=239<c?4:223<c?3:191<c?2:1;if(i+h<=n)switch(h){case 1:c<128&&(l=c);break;case 2:128==(192&(o=e[i+1]))&&127<(u=(31&c)<<6|63&o)&&(l=u);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&2047<(u=(15&c)<<12|(63&o)<<6|63&a)&&(u<55296||57343<u)&&(l=u);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&65535<(u=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)&&u<1114112&&(l=u)}null===l?(l=65533,h=1):65535<l&&(l-=65536,r.push(l>>>10&1023|55296),l=56320|1023&l),r.push(l),i+=h}var f=r,d=f.length;if(d<=4096)return String.fromCharCode.apply(String,f);for(var p="",m=0;m<d;)p+=String.fromCharCode.apply(String,f.slice(m,m+=4096));return p}function b(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(n<e+t)throw new RangeError("Trying to access beyond buffer length")}function y(e,n,r,i,o,a){if(!t.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(o<n||n<a)throw new RangeError('"value" argument is out of bounds');if(r+i>e.length)throw new RangeError("Index out of range")}function w(e,t,n,r){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function x(e,t,n,r,i){return t=+t,n>>>=0,i||w(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function C(e,t,n,r,i){return t=+t,n>>>=0,i||w(e,0,n,8),o.write(e,t,n,r,52,8),n+8}n.Buffer=t,n.SlowBuffer=function(e){return t.alloc(+(e=+e!=e?0:e))},n.INSPECT_MAX_BYTES=50,n.kMaxLength=2147483647,t.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()}catch(e){return!1}}(),Object.defineProperty(t.prototype,"parent",{enumerable:!0,get:function(){if(t.isBuffer(this))return this.buffer}}),Object.defineProperty(t.prototype,"offset",{enumerable:!0,get:function(){if(t.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&t[Symbol.species]===t&&Object.defineProperty(t,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),t.poolSize=8192,t.from=s,t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array,t.alloc=function(e,t,n){return t=t,n=n,u(e=e),e<=0||void 0===t?a(e):"string"==typeof n?a(e).fill(t,n):a(e).fill(t)},t.allocUnsafe=c,t.allocUnsafeSlow=c,t.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==t.prototype},t.compare=function(e,n){if(O(e,Uint8Array)&&(e=t.from(e,e.offset,e.byteLength)),O(n,Uint8Array)&&(n=t.from(n,n.offset,n.byteLength)),!t.isBuffer(e)||!t.isBuffer(n))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===n)return 0;for(var r=e.length,i=n.length,o=0,a=Math.min(r,i);o<a;++o)if(e[o]!==n[o]){r=e[o],i=n[o];break}return r<i?-1:i<r?1:0},t.isEncoding=function(e){switch(String(e).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}},t.concat=function(e,n){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return t.alloc(0);if(void 0===n)for(o=n=0;o<e.length;++o)n+=e[o].length;for(var r=t.allocUnsafe(n),i=0,o=0;o<e.length;++o){var a=e[o];if(O(a,Uint8Array)&&(a=t.from(a)),!t.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,i),i+=a.length}return r},t.byteLength=f,t.prototype._isBuffer=!0,t.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)p(this,t,t+1);return this},t.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)p(this,t,t+3),p(this,t+1,t+2);return this},t.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)p(this,t,t+7),p(this,t+1,t+6),p(this,t+2,t+5),p(this,t+3,t+4);return this},t.prototype.toLocaleString=t.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?v(this,0,e):d.apply(this,arguments)},t.prototype.equals=function(e){if(t.isBuffer(e))return this===e||0===t.compare(this,e);throw new TypeError("Argument must be a Buffer")},t.prototype.inspect=function(){var e="",t=n.INSPECT_MAX_BYTES;e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim();return this.length>t&&(e+=" ... "),"<Buffer "+e+">"},t.prototype.compare=function(e,n,i,o,a){if(O(e,Uint8Array)&&(e=t.from(e,e.offset,e.byteLength)),!t.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+r(e));if(void 0===i&&(i=e?e.length:0),void 0===o&&(o=0),void 0===a&&(a=this.length),(n=void 0===n?0:n)<0||i>e.length||o<0||a>this.length)throw new RangeError("out of range index");if(a<=o&&i<=n)return 0;if(a<=o)return-1;if(i<=n)return 1;if(this===e)return 0;for(var s=(a>>>=0)-(o>>>=0),u=(i>>>=0)-(n>>>=0),c=Math.min(s,u),l=this.slice(o,a),h=e.slice(n,i),f=0;f<c;++f)if(l[f]!==h[f]){s=l[f],u=h[f];break}return s<u?-1:u<s?1:0},t.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},t.prototype.indexOf=function(e,t,n){return m(this,e,t,n,!0)},t.prototype.lastIndexOf=function(e,t,n){return m(this,e,t,n,!1)},t.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||i<n)&&(n=i),0<e.length&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r=r||"utf8";for(var o,a,s,u,c=!1;;)switch(r){case"hex":var l=e,h=t,f=n,d=(h=Number(h)||0,this.length-h);(!f||(f=Number(f))>d)&&(f=d),(d=l.length)/2<f&&(f=d/2);for(var p=0;p<f;++p){var m=parseInt(l.substr(2*p,2),16);if(T(m))return p;this[h+p]=m}return p;case"utf8":case"utf-8":return d=t,u=n,_(E(e,(s=this).length-d),s,d,u);case"ascii":return A(this,e,t,n);case"latin1":case"binary":return A(this,e,t,n);case"base64":return s=this,u=t,a=n,_(S(e),s,u,a);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return a=t,o=n,_(function(e,t){for(var n,r,i=[],o=0;o<e.length&&!((t-=2)<0);++o)r=(n=e.charCodeAt(o))>>8,i.push(n%256),i.push(r);return i}(e,this.length-a),this,a,o);default:if(c)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),c=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},t.prototype.slice=function(e,n){var r=this.length;return(r=((e=~~e)<0?(e+=r)<0&&(e=0):r<e&&(e=r),(n=void 0===n?r:~~n)<0?(n+=r)<0&&(n=0):r<n&&(n=r),n<e&&(n=e),this.subarray(e,n))).__proto__=t.prototype,r},t.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||b(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},t.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||b(e,t,this.length);for(var r=this[e+--t],i=1;0<t&&(i*=256);)r+=this[e+--t]*i;return r},t.prototype.readUInt8=function(e,t){return e>>>=0,t||b(e,1,this.length),this[e]},t.prototype.readUInt16LE=function(e,t){return e>>>=0,t||b(e,2,this.length),this[e]|this[e+1]<<8},t.prototype.readUInt16BE=function(e,t){return e>>>=0,t||b(e,2,this.length),this[e]<<8|this[e+1]},t.prototype.readUInt32LE=function(e,t){return e>>>=0,t||b(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},t.prototype.readUInt32BE=function(e,t){return e>>>=0,t||b(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},t.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||b(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},t.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||b(e,t,this.length);for(var r=t,i=1,o=this[e+--r];0<r&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},t.prototype.readInt8=function(e,t){return e>>>=0,t||b(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},t.prototype.readInt16LE=function(e,t){return e>>>=0,t||b(e,2,this.length),32768&(t=this[e]|this[e+1]<<8)?4294901760|t:t},t.prototype.readInt16BE=function(e,t){return e>>>=0,t||b(e,2,this.length),32768&(t=this[e+1]|this[e]<<8)?4294901760|t:t},t.prototype.readInt32LE=function(e,t){return e>>>=0,t||b(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},t.prototype.readInt32BE=function(e,t){return e>>>=0,t||b(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},t.prototype.readFloatLE=function(e,t){return e>>>=0,t||b(e,4,this.length),o.read(this,e,!0,23,4)},t.prototype.readFloatBE=function(e,t){return e>>>=0,t||b(e,4,this.length),o.read(this,e,!1,23,4)},t.prototype.readDoubleLE=function(e,t){return e>>>=0,t||b(e,8,this.length),o.read(this,e,!0,52,8)},t.prototype.readDoubleBE=function(e,t){return e>>>=0,t||b(e,8,this.length),o.read(this,e,!1,52,8)},t.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||y(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},t.prototype.writeUIntBE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||y(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;0<=--i&&(o*=256);)this[t+i]=e/o&255;return t+n},t.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||y(this,e,t,1,255,0),this[t]=255&e,t+1},t.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||y(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},t.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||y(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},t.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||y(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},t.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||y(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},t.prototype.writeIntLE=function(e,t,n,r){e=+e,t>>>=0,r||y(this,e,t,n,(r=Math.pow(2,8*n-1))-1,-r);var i=0,o=1,a=0;for(this[t]=255&e;++i<n&&(o*=256);)e<0&&0===a&&0!==this[t+i-1]&&(a=1),this[t+i]=(e/o>>0)-a&255;return t+n},t.prototype.writeIntBE=function(e,t,n,r){e=+e,t>>>=0,r||y(this,e,t,n,(r=Math.pow(2,8*n-1))-1,-r);var i=n-1,o=1,a=0;for(this[t+i]=255&e;0<=--i&&(o*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/o>>0)-a&255;return t+n},t.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||y(this,e,t,1,127,-128),this[t]=255&(e=e<0?255+e+1:e),t+1},t.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||y(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},t.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||y(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},t.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||y(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},t.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||y(this,e,t,4,2147483647,-2147483648),this[t]=(e=e<0?4294967295+e+1:e)>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},t.prototype.writeFloatLE=function(e,t,n){return x(this,e,t,!0,n)},t.prototype.writeFloatBE=function(e,t,n){return x(this,e,t,!1,n)},t.prototype.writeDoubleLE=function(e,t,n){return C(this,e,t,!0,n)},t.prototype.writeDoubleBE=function(e,t,n){return C(this,e,t,!1,n)},t.prototype.copy=function(e,n,r,i){if(!t.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r=r||0,i||0===i||(i=this.length),n>=e.length&&(n=e.length),(i=0<i&&i<r?r:i)===r)return 0;if(0===e.length||0===this.length)return 0;if((n=n||0)<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length);var o=(i=e.length-n<i-r?e.length-n+r:i)-r;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(n,r,i);else if(this===e&&r<n&&n<i)for(var a=o-1;0<=a;--a)e[a+n]=this[a+r];else Uint8Array.prototype.set.call(e,this.subarray(r,i),n);return o},t.prototype.fill=function(e,n,r,i){if("string"==typeof e){if("string"==typeof n?(i=n,n=0,r=this.length):"string"==typeof r&&(i=r,r=this.length),void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!t.isEncoding(i))throw new TypeError("Unknown encoding: "+i);var o;1===e.length&&(o=e.charCodeAt(0),("utf8"===i&&o<128||"latin1"===i)&&(e=o))}else"number"==typeof e&&(e&=255);if(n<0||this.length<n||this.length<r)throw new RangeError("Out of range index");var a;if(!(r<=n))if(n>>>=0,r=void 0===r?this.length:r>>>0,"number"==typeof(e=e||0))for(a=n;a<r;++a)this[a]=e;else{var s=t.isBuffer(e)?e:t.from(e,i),u=s.length;if(0===u)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(a=0;a<r-n;++a)this[a+n]=s[a%u]}return this};var k=/[^+/0-9A-Za-z-_]/g;function E(e,t){var n;t=t||1/0;for(var r=e.length,i=null,o=[],a=0;a<r;++a){if(55295<(n=e.charCodeAt(a))&&n<57344){if(!i){if(56319<n){-1<(t-=3)&&o.push(239,191,189);continue}if(a+1===r){-1<(t-=3)&&o.push(239,191,189);continue}i=n;continue}if(n<56320){-1<(t-=3)&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&-1<(t-=3)&&o.push(239,191,189);if(i=null,n<128){if(--t<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function S(e){return i.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(k,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function _(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function O(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function T(e){return e!=e}}).call(this,e("buffer").Buffer)},{"base64-js":182,buffer:216,ieee754:385}],217:[function(e,t,n){(function(e){"use strict";t.exports=function(t,n){for(var r=Math.min(t.length,n.length),i=new e(r),o=0;o<r;++o)i[o]=t[o]^n[o];return i}}).call(this,e("buffer").Buffer)},{buffer:216}],218:[function(e,t,n){"use strict";var r=e("safe-buffer").Buffer,i=e("stream").Transform,o=e("string_decoder").StringDecoder;function a(e){i.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}e("inherits")(a,i),a.prototype.update=function(e,t,n){return"string"==typeof e&&(e=r.from(e,t)),t=this._update(e),this.hashMode?this:t=n?this._toString(t,n):t},a.prototype.setAutoPadding=function(){},a.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},a.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},a.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},a.prototype._transform=function(e,t,n){var r;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){r=e}finally{n(r)}},a.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},a.prototype._finalOrDigest=function(e){var t=this.__final()||r.alloc(0);return e?this._toString(t,e,!0):t},a.prototype._toString=function(e,t,n){if(this._decoder||(this._decoder=new o(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");return t=this._decoder.write(e),n&&(t+=this._decoder.end()),t},t.exports=a},{inherits:387,"safe-buffer":494,stream:506,string_decoder:520}],219:[function(e,t,n){t.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},{}],220:[function(e,t,n){var r=e("../internals/is-object");t.exports=function(e){if(r(e)||null===e)return e;throw TypeError("Can't set "+String(e)+" as a prototype")}},{"../internals/is-object":263}],221:[function(e,t,n){var r=e("../internals/well-known-symbol"),i=e("../internals/object-create"),o=(e=e("../internals/object-define-property"),r("unscopables")),a=Array.prototype;null==a[o]&&e.f(a,o,{configurable:!0,value:i(null)}),t.exports=function(e){a[o][e]=!0}},{"../internals/object-create":276,"../internals/object-define-property":278,"../internals/well-known-symbol":314}],222:[function(e,t,n){t.exports=function(e,t,n){if(e instanceof t)return e;throw TypeError("Incorrect "+(n?n+" ":"")+"invocation")}},{}],223:[function(e,t,n){var r=e("../internals/is-object");t.exports=function(e){if(r(e))return e;throw TypeError(String(e)+" is not an object")}},{"../internals/is-object":263}],224:[function(e,t,n){function r(e){return function(t,n,r){var s,u=i(t),c=o(u.length),l=a(r,c);if(e&&n!=n){for(;l<c;)if((s=u[l++])!=s)return!0}else for(;l<c;l++)if((e||l in u)&&u[l]===n)return e||l||0;return!e&&-1}}var i=e("../internals/to-indexed-object"),o=e("../internals/to-length"),a=e("../internals/to-absolute-index");t.exports={includes:r(!0),indexOf:r(!1)}},{"../internals/to-absolute-index":304,"../internals/to-indexed-object":305,"../internals/to-length":307}],225:[function(e,t,n){function r(e){var t=1==e,n=2==e,r=3==e,l=4==e,h=6==e,f=5==e||h;return function(d,p,m,g){for(var A,v,b=a(d),y=o(b),w=i(p,m,3),x=s(y.length),C=0,k=(p=g||u,t?p(d,x):n?p(d,0):void 0);C<x;C++)if((f||C in y)&&(v=w(A=y[C],C,b),e))if(t)k[C]=v;else if(v)switch(e){case 3:return!0;case 5:return A;case 6:return C;case 2:c.call(k,A)}else if(l)return!1;return h?-1:r||l?l:k}}var i=e("../internals/function-bind-context"),o=e("../internals/indexed-object"),a=e("../internals/to-object"),s=e("../internals/to-length"),u=e("../internals/array-species-create"),c=[].push;t.exports={forEach:r(0),map:r(1),filter:r(2),some:r(3),every:r(4),find:r(5),findIndex:r(6)}},{"../internals/array-species-create":227,"../internals/function-bind-context":248,"../internals/indexed-object":257,"../internals/to-length":307,"../internals/to-object":308}],226:[function(e,t,n){function r(e){throw e}var i=e("../internals/descriptors"),o=e("../internals/fails"),a=e("../internals/has"),s=Object.defineProperty,u={};t.exports=function(e,t){var n,c,l,h;return a(u,e)?u[e]:(n=[][e],c=!!a(t=t||{},"ACCESSORS")&&t.ACCESSORS,l=a(t,0)?t[0]:r,h=a(t,1)?t[1]:void 0,u[e]=!!n&&!o((function(){if(c&&!i)return!0;var e={length:-1};c?s(e,1,{enumerable:!0,get:r}):e[1]=1,n.call(e,l,h)})))}},{"../internals/descriptors":240,"../internals/fails":247,"../internals/has":252}],227:[function(e,t,n){var r=e("../internals/is-object"),i=e("../internals/is-array"),o=e("../internals/well-known-symbol")("species");t.exports=function(e,t){var n;return new(void 0===(n=i(e)&&("function"==typeof(n=e.constructor)&&(n===Array||i(n.prototype))||r(n)&&null===(n=n[o]))?void 0:n)?Array:n)(0===t?0:t)}},{"../internals/is-array":261,"../internals/is-object":263,"../internals/well-known-symbol":314}],228:[function(e,t,n){var r=e("../internals/an-object");t.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){throw void 0!==(i=e.return)&&r(i.call(e)),t}}},{"../internals/an-object":223}],229:[function(e,t,n){var r=e("../internals/well-known-symbol")("iterator"),i=!1;try{var o=0,a={next:function(){return{done:!!o++}},return:function(){i=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(e){}t.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var o={};o[r]=function(){return{next:function(){return{done:n=!0}}}},e(o)}catch(e){}return n}},{"../internals/well-known-symbol":314}],230:[function(e,t,n){var r={}.toString;t.exports=function(e){return r.call(e).slice(8,-1)}},{}],231:[function(e,t,n){var r=e("../internals/to-string-tag-support"),i=e("../internals/classof-raw"),o=e("../internals/well-known-symbol")("toStringTag"),a="Arguments"==i(function(){return arguments}());t.exports=r?i:function(e){var t;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(t=function(e,t){try{return e[t]}catch(e){}}(e=Object(e),o))?t:a?i(e):"Object"==(t=i(e))&&"function"==typeof e.callee?"Arguments":t}},{"../internals/classof-raw":230,"../internals/to-string-tag-support":310,"../internals/well-known-symbol":314}],232:[function(e,t,n){var r=e("../internals/has"),i=e("../internals/own-keys"),o=e("../internals/object-get-own-property-descriptor"),a=e("../internals/object-define-property");t.exports=function(e,t){for(var n=i(t),s=a.f,u=o.f,c=0;c<n.length;c++){var l=n[c];r(e,l)||s(e,l,u(t,l))}}},{"../internals/has":252,"../internals/object-define-property":278,"../internals/object-get-own-property-descriptor":279,"../internals/own-keys":289}],233:[function(e,t,n){var r=e("../internals/well-known-symbol")("match");t.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[r]=!1,"/./"[e](t)}catch(e){}}return!1}},{"../internals/well-known-symbol":314}],234:[function(e,t,n){e=e("../internals/fails"),t.exports=!e((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},{"../internals/fails":247}],235:[function(e,t,n){"use strict";function r(){return this}var i=e("../internals/iterators-core").IteratorPrototype,o=e("../internals/object-create"),a=e("../internals/create-property-descriptor"),s=e("../internals/set-to-string-tag"),u=e("../internals/iterators");t.exports=function(e,t,n){return t+=" Iterator",e.prototype=o(i,{next:a(1,n)}),s(e,t,!1,!0),u[t]=r,e}},{"../internals/create-property-descriptor":237,"../internals/iterators":268,"../internals/iterators-core":267,"../internals/object-create":276,"../internals/set-to-string-tag":298}],236:[function(e,t,n){var r=e("../internals/descriptors"),i=e("../internals/object-define-property"),o=e("../internals/create-property-descriptor");t.exports=r?function(e,t,n){return i.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},{"../internals/create-property-descriptor":237,"../internals/descriptors":240,"../internals/object-define-property":278}],237:[function(e,t,n){t.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},{}],238:[function(e,t,n){"use strict";function r(){return this}var i=e("../internals/export"),o=e("../internals/create-iterator-constructor"),a=e("../internals/object-get-prototype-of"),s=e("../internals/object-set-prototype-of"),u=e("../internals/set-to-string-tag"),c=e("../internals/create-non-enumerable-property"),l=e("../internals/redefine"),h=e("../internals/well-known-symbol"),f=e("../internals/is-pure"),d=e("../internals/iterators"),p=(e=e("../internals/iterators-core")).IteratorPrototype,m=e.BUGGY_SAFARI_ITERATORS,g=h("iterator");t.exports=function(e,t,n,h,A,v,b){function y(e){if(e===A&&S)return S;if(!m&&e in k)return k[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}}o(n,t,h);h=t+" Iterator";var w,x,C=!1,k=e.prototype,E=k[g]||k["@@iterator"]||A&&k[A],S=!m&&E||y(A),_="Array"==t&&k.entries||E;if(_&&(_=a(_.call(new e)),p!==Object.prototype&&_.next&&(f||a(_)===p||(s?s(_,p):"function"!=typeof _[g]&&c(_,g,r)),u(_,h,!0,!0),f&&(d[h]=r))),"values"==A&&E&&"values"!==E.name&&(C=!0,S=function(){return E.call(this)}),f&&!b||k[g]===S||c(k,g,S),d[t]=S,A)if(w={values:y("values"),keys:v?S:y("keys"),entries:y("entries")},b)for(x in w)!m&&!C&&x in k||l(k,x,w[x]);else i({target:t,proto:!0,forced:m||C},w);return w}},{"../internals/create-iterator-constructor":235,"../internals/create-non-enumerable-property":236,"../internals/export":246,"../internals/is-pure":264,"../internals/iterators":268,"../internals/iterators-core":267,"../internals/object-get-prototype-of":283,"../internals/object-set-prototype-of":287,"../internals/redefine":294,"../internals/set-to-string-tag":298,"../internals/well-known-symbol":314}],239:[function(e,t,n){var r=e("../internals/path"),i=e("../internals/has"),o=e("../internals/well-known-symbol-wrapped"),a=e("../internals/object-define-property").f;t.exports=function(e){var t=r.Symbol||(r.Symbol={});i(t,e)||a(t,e,{value:o.f(e)})}},{"../internals/has":252,"../internals/object-define-property":278,"../internals/path":290,"../internals/well-known-symbol-wrapped":313}],240:[function(e,t,n){e=e("../internals/fails"),t.exports=!e((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},{"../internals/fails":247}],241:[function(e,t,n){var r=e("../internals/global"),i=(e=e("../internals/is-object"),r.document),o=e(i)&&e(i.createElement);t.exports=function(e){return o?i.createElement(e):{}}},{"../internals/global":251,"../internals/is-object":263}],242:[function(e,t,n){e=e("../internals/engine-user-agent"),t.exports=/(iphone|ipod|ipad).*applewebkit/i.test(e)},{"../internals/engine-user-agent":243}],243:[function(e,t,n){e=e("../internals/get-built-in"),t.exports=e("navigator","userAgent")||""},{"../internals/get-built-in":249}],244:[function(e,t,n){var r,i,o=e("../internals/global");e=e("../internals/engine-user-agent");(o=(o=(o=o.process)&&o.versions)&&o.v8)?i=(r=o.split("."))[0]+r[1]:e&&(!(r=e.match(/Edge\/(\d+)/))||74<=r[1])&&(r=e.match(/Chrome\/(\d+)/))&&(i=r[1]),t.exports=i&&+i},{"../internals/engine-user-agent":243,"../internals/global":251}],245:[function(e,t,n){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},{}],246:[function(e,t,n){var r=e("../internals/global"),i=e("../internals/object-get-own-property-descriptor").f,o=e("../internals/create-non-enumerable-property"),a=e("../internals/redefine"),s=e("../internals/set-global"),u=e("../internals/copy-constructor-properties"),c=e("../internals/is-forced");t.exports=function(e,t){var n,l,h,f,d=e.target,p=e.global,m=e.stat;if(n=p?r:m?r[d]||s(d,{}):(r[d]||{}).prototype)for(l in t){if(h=t[l],f=e.noTargetGet?(f=i(n,l))&&f.value:n[l],!c(p?l:d+(m?".":"#")+l,e.forced)&&void 0!==f){if(typeof h==typeof f)continue;u(h,f)}(e.sham||f&&f.sham)&&o(h,"sham",!0),a(n,l,h,e)}}},{"../internals/copy-constructor-properties":232,"../internals/create-non-enumerable-property":236,"../internals/global":251,"../internals/is-forced":262,"../internals/object-get-own-property-descriptor":279,"../internals/redefine":294,"../internals/set-global":296}],247:[function(e,t,n){t.exports=function(e){try{return!!e()}catch(e){return!0}}},{}],248:[function(e,t,n){var r=e("../internals/a-function");t.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},{"../internals/a-function":219}],249:[function(e,t,n){function r(e){return"function"==typeof e?e:void 0}var i=e("../internals/path"),o=e("../internals/global");t.exports=function(e,t){return arguments.length<2?r(i[e])||r(o[e]):i[e]&&i[e][t]||o[e]&&o[e][t]}},{"../internals/global":251,"../internals/path":290}],250:[function(e,t,n){var r=e("../internals/classof"),i=e("../internals/iterators"),o=e("../internals/well-known-symbol")("iterator");t.exports=function(e){if(null!=e)return e[o]||e["@@iterator"]||i[r(e)]}},{"../internals/classof":231,"../internals/iterators":268,"../internals/well-known-symbol":314}],251:[function(e,n,r){(function(e){function t(e){return e&&e.Math==Math&&e}n.exports=t("object"==typeof globalThis&&globalThis)||t("object"==typeof window&&window)||t("object"==typeof self&&self)||t("object"==typeof e&&e)||Function("return this")()}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],252:[function(e,t,n){var r={}.hasOwnProperty;t.exports=function(e,t){return r.call(e,t)}},{}],253:[function(e,t,n){t.exports={}},{}],254:[function(e,t,n){var r=e("../internals/global");t.exports=function(e,t){var n=r.console;n&&n.error&&(1===arguments.length?n.error(e):n.error(e,t))}},{"../internals/global":251}],255:[function(e,t,n){e=e("../internals/get-built-in"),t.exports=e("document","documentElement")},{"../internals/get-built-in":249}],256:[function(e,t,n){var r=e("../internals/descriptors"),i=e("../internals/fails"),o=e("../internals/document-create-element");t.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},{"../internals/descriptors":240,"../internals/document-create-element":241,"../internals/fails":247}],257:[function(e,t,n){var r=e("../internals/fails"),i=e("../internals/classof-raw"),o="".split;t.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(e){return"String"==i(e)?o.call(e,""):Object(e)}:Object},{"../internals/classof-raw":230,"../internals/fails":247}],258:[function(e,t,n){e=e("../internals/shared-store");var r=Function.toString;"function"!=typeof e.inspectSource&&(e.inspectSource=function(e){return r.call(e)}),t.exports=e.inspectSource},{"../internals/shared-store":300}],259:[function(e,t,n){var r,i,o,a,s,u,c,l,h=e("../internals/native-weak-map"),f=e("../internals/global"),d=e("../internals/is-object"),p=e("../internals/create-non-enumerable-property"),m=e("../internals/has"),g=e("../internals/shared-key");e=e("../internals/hidden-keys"),f=f.WeakMap;c=h?(r=new f,i=r.get,o=r.has,a=r.set,s=function(e,t){return a.call(r,e,t),t},u=function(e){return i.call(r,e)||{}},function(e){return o.call(r,e)}):(e[l=g("state")]=!0,s=function(e,t){return p(e,l,t),t},u=function(e){return m(e,l)?e[l]:{}},function(e){return m(e,l)}),t.exports={set:s,get:u,has:c,enforce:function(e){return c(e)?u(e):s(e,{})},getterFor:function(e){return function(t){if(d(t)&&(t=u(t)).type===e)return t;throw TypeError("Incompatible receiver, "+e+" required")}}}},{"../internals/create-non-enumerable-property":236,"../internals/global":251,"../internals/has":252,"../internals/hidden-keys":253,"../internals/is-object":263,"../internals/native-weak-map":272,"../internals/shared-key":299}],260:[function(e,t,n){var r=e("../internals/well-known-symbol"),i=e("../internals/iterators"),o=r("iterator"),a=Array.prototype;t.exports=function(e){return void 0!==e&&(i.Array===e||a[o]===e)}},{"../internals/iterators":268,"../internals/well-known-symbol":314}],261:[function(e,t,n){var r=e("../internals/classof-raw");t.exports=Array.isArray||function(e){return"Array"==r(e)}},{"../internals/classof-raw":230}],262:[function(e,t,n){function r(e,t){return(e=s[a(e)])==c||e!=u&&("function"==typeof t?i(t):!!t)}var i=e("../internals/fails"),o=/#|\.prototype\./,a=r.normalize=function(e){return String(e).replace(o,".").toLowerCase()},s=r.data={},u=r.NATIVE="N",c=r.POLYFILL="P";t.exports=r},{"../internals/fails":247}],263:[function(e,t,n){t.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},{}],264:[function(e,t,n){t.exports=!1},{}],265:[function(e,t,n){var r=e("../internals/is-object"),i=e("../internals/classof-raw"),o=e("../internals/well-known-symbol")("match");t.exports=function(e){var t;return r(e)&&(void 0!==(t=e[o])?!!t:"RegExp"==i(e))}},{"../internals/classof-raw":230,"../internals/is-object":263,"../internals/well-known-symbol":314}],266:[function(e,t,n){function r(e,t){this.stopped=e,this.result=t}var i=e("../internals/an-object"),o=e("../internals/is-array-iterator-method"),a=e("../internals/to-length"),s=e("../internals/function-bind-context"),u=e("../internals/get-iterator-method"),c=e("../internals/call-with-safe-iteration-closing");(t.exports=function(e,t,n,l,h){var f,d,p,m,g,A,v=s(t,n,l?2:1);if(h)f=e;else{if("function"!=typeof(t=u(e)))throw TypeError("Target is not iterable");if(o(t)){for(d=0,p=a(e.length);d<p;d++)if((m=l?v(i(A=e[d])[0],A[1]):v(e[d]))&&m instanceof r)return m;return new r(!1)}f=t.call(e)}for(g=f.next;!(A=g.call(f)).done;)if("object"==typeof(m=c(f,v,A.value,l))&&m&&m instanceof r)return m;return new r(!1)}).stop=function(e){return new r(!0,e)}},{"../internals/an-object":223,"../internals/call-with-safe-iteration-closing":228,"../internals/function-bind-context":248,"../internals/get-iterator-method":250,"../internals/is-array-iterator-method":260,"../internals/to-length":307}],267:[function(e,t,n){"use strict";var r,i,o=e("../internals/object-get-prototype-of"),a=e("../internals/create-non-enumerable-property"),s=e("../internals/has"),u=e("../internals/well-known-symbol"),c=(e=e("../internals/is-pure"),u=u("iterator"),!1);[].keys&&("next"in(i=[].keys())?(o=o(o(i)))!==Object.prototype&&(r=o):c=!0),null==r&&(r={}),e||s(r,u)||a(r,u,(function(){return this})),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:c}},{"../internals/create-non-enumerable-property":236,"../internals/has":252,"../internals/is-pure":264,"../internals/object-get-prototype-of":283,"../internals/well-known-symbol":314}],268:[function(e,t,n){arguments[4][253][0].apply(n,arguments)},{dup:253}],269:[function(e,t,n){var r,i,o,a,s,u,c,l,h=e("../internals/global"),f=e("../internals/object-get-own-property-descriptor").f,d=e("../internals/classof-raw"),p=e("../internals/task").set,m=(e=e("../internals/engine-is-ios"),h.MutationObserver||h.WebKitMutationObserver),g=h.process,A=h.Promise,v="process"==d(g);d=f(h,"queueMicrotask");(f=d&&d.value)||(r=function(){var e,t;for(v&&(e=g.domain)&&e.exit();i;){t=i.fn,i=i.next;try{t()}catch(e){throw i?a():o=void 0,e}}o=void 0,e&&e.enter()},a=v?function(){g.nextTick(r)}:m&&!e?(s=!0,u=document.createTextNode(""),new m(r).observe(u,{characterData:!0}),function(){u.data=s=!s}):A&&A.resolve?(c=A.resolve(void 0),l=c.then,function(){l.call(c,r)}):function(){p.call(h,r)}),t.exports=f||function(e){e={fn:e,next:void 0},o&&(o.next=e),i||(i=e,a()),o=e}},{"../internals/classof-raw":230,"../internals/engine-is-ios":242,"../internals/global":251,"../internals/object-get-own-property-descriptor":279,"../internals/task":303}],270:[function(e,t,n){e=e("../internals/global"),t.exports=e.Promise},{"../internals/global":251}],271:[function(e,t,n){e=e("../internals/fails"),t.exports=!!Object.getOwnPropertySymbols&&!e((function(){return!String(Symbol())}))},{"../internals/fails":247}],272:[function(e,t,n){var r=e("../internals/global");e=e("../internals/inspect-source"),r=r.WeakMap;t.exports="function"==typeof r&&/native code/.test(e(r))},{"../internals/global":251,"../internals/inspect-source":258}],273:[function(e,t,n){"use strict";function r(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=i(t),this.reject=i(n)}var i=e("../internals/a-function");t.exports.f=function(e){return new r(e)}},{"../internals/a-function":219}],274:[function(e,t,n){var r=e("../internals/is-regexp");t.exports=function(e){if(r(e))throw TypeError("The method doesn't accept regular expressions");return e}},{"../internals/is-regexp":265}],275:[function(e,t,n){"use strict";var r=e("../internals/descriptors"),i=e("../internals/fails"),o=e("../internals/object-keys"),a=e("../internals/object-get-own-property-symbols"),s=e("../internals/object-property-is-enumerable"),u=e("../internals/to-object"),c=e("../internals/indexed-object"),l=Object.assign,h=Object.defineProperty;t.exports=!l||i((function(){var e,t,n;return!(!r||1===l({b:1},l(h({},"a",{enumerable:!0,get:function(){h(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)||(t={},(e={})[n=Symbol()]=7,"abcdefghijklmnopqrst".split("").forEach((function(e){t[e]=e})),7!=l({},e)[n]||"abcdefghijklmnopqrst"!=o(l({},t)).join(""))}))?function(e,t){for(var n=u(e),i=arguments.length,l=1,h=a.f,f=s.f;l<i;)for(var d,p=c(arguments[l++]),m=h?o(p).concat(h(p)):o(p),g=m.length,A=0;A<g;)d=m[A++],r&&!f.call(p,d)||(n[d]=p[d]);return n}:l},{"../internals/descriptors":240,"../internals/fails":247,"../internals/indexed-object":257,"../internals/object-get-own-property-symbols":282,"../internals/object-keys":285,"../internals/object-property-is-enumerable":286,"../internals/to-object":308}],276:[function(e,t,n){function r(){}function i(e){return"<script>"+e+"<\/script>"}var o,a=e("../internals/an-object"),s=e("../internals/object-define-properties"),u=e("../internals/enum-bug-keys"),c=e("../internals/hidden-keys"),l=e("../internals/html"),h=e("../internals/document-create-element"),f=e("../internals/shared-key")("IE_PROTO"),d=function(){try{o=document.domain&&new ActiveXObject("htmlfile")}catch(e){}var e,t,n;d=o?((t=o).write(i("")),t.close(),n=t.parentWindow.Object,t=null,n):((t=h("iframe")).style.display="none",l.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(i("document.F=Object")),e.close(),e.F);for(var r=u.length;r--;)delete d.prototype[u[r]];return d()};c[f]=!0,t.exports=Object.create||function(e,t){var n;return null!==e?(r.prototype=a(e),n=new r,r.prototype=null,n[f]=e):n=d(),void 0===t?n:s(n,t)}},{"../internals/an-object":223,"../internals/document-create-element":241,"../internals/enum-bug-keys":245,"../internals/hidden-keys":253,"../internals/html":255,"../internals/object-define-properties":277,"../internals/shared-key":299}],277:[function(e,t,n){var r=e("../internals/descriptors"),i=e("../internals/object-define-property"),o=e("../internals/an-object"),a=e("../internals/object-keys");t.exports=r?Object.defineProperties:function(e,t){o(e);for(var n,r=a(t),s=r.length,u=0;u<s;)i.f(e,n=r[u++],t[n]);return e}},{"../internals/an-object":223,"../internals/descriptors":240,"../internals/object-define-property":278,"../internals/object-keys":285}],278:[function(e,t,n){var r=e("../internals/descriptors"),i=e("../internals/ie8-dom-define"),o=e("../internals/an-object"),a=e("../internals/to-primitive"),s=Object.defineProperty;n.f=r?s:function(e,t,n){if(o(e),t=a(t,!0),o(n),i)try{return s(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},{"../internals/an-object":223,"../internals/descriptors":240,"../internals/ie8-dom-define":256,"../internals/to-primitive":309}],279:[function(e,t,n){var r=e("../internals/descriptors"),i=e("../internals/object-property-is-enumerable"),o=e("../internals/create-property-descriptor"),a=e("../internals/to-indexed-object"),s=e("../internals/to-primitive"),u=e("../internals/has"),c=e("../internals/ie8-dom-define"),l=Object.getOwnPropertyDescriptor;n.f=r?l:function(e,t){if(e=a(e),t=s(t,!0),c)try{return l(e,t)}catch(e){}if(u(e,t))return o(!i.f.call(e,t),e[t])}},{"../internals/create-property-descriptor":237,"../internals/descriptors":240,"../internals/has":252,"../internals/ie8-dom-define":256,"../internals/object-property-is-enumerable":286,"../internals/to-indexed-object":305,"../internals/to-primitive":309}],280:[function(e,t,n){var r=e("../internals/to-indexed-object"),i=e("../internals/object-get-own-property-names").f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(e){if(!a||"[object Window]"!=o.call(e))return i(r(e));var t=e;try{return i(t)}catch(t){return a.slice()}}},{"../internals/object-get-own-property-names":281,"../internals/to-indexed-object":305}],281:[function(e,t,n){var r=e("../internals/object-keys-internal"),i=e("../internals/enum-bug-keys").concat("length","prototype");n.f=Object.getOwnPropertyNames||function(e){return r(e,i)}},{"../internals/enum-bug-keys":245,"../internals/object-keys-internal":284}],282:[function(e,t,n){n.f=Object.getOwnPropertySymbols},{}],283:[function(e,t,n){var r=e("../internals/has"),i=e("../internals/to-object"),o=e("../internals/shared-key"),a=(e=e("../internals/correct-prototype-getter"),o("IE_PROTO")),s=Object.prototype;t.exports=e?Object.getPrototypeOf:function(e){return e=i(e),r(e,a)?e[a]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?s:null}},{"../internals/correct-prototype-getter":234,"../internals/has":252,"../internals/shared-key":299,"../internals/to-object":308}],284:[function(e,t,n){var r=e("../internals/has"),i=e("../internals/to-indexed-object"),o=e("../internals/array-includes").indexOf,a=e("../internals/hidden-keys");t.exports=function(e,t){var n,s=i(e),u=0,c=[];for(n in s)!r(a,n)&&r(s,n)&&c.push(n);for(;t.length>u;)!r(s,n=t[u++])||~o(c,n)||c.push(n);return c}},{"../internals/array-includes":224,"../internals/has":252,"../internals/hidden-keys":253,"../internals/to-indexed-object":305}],285:[function(e,t,n){var r=e("../internals/object-keys-internal"),i=e("../internals/enum-bug-keys");t.exports=Object.keys||function(e){return r(e,i)}},{"../internals/enum-bug-keys":245,"../internals/object-keys-internal":284}],286:[function(e,t,n){"use strict";var r={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,o=i&&!r.call({1:2},1);n.f=o?function(e){return!!(e=i(this,e))&&e.enumerable}:r},{}],287:[function(e,t,n){var r=e("../internals/an-object"),i=e("../internals/a-possible-prototype");t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(e){}return function(n,o){return r(n),i(o),t?e.call(n,o):n.__proto__=o,n}}():void 0)},{"../internals/a-possible-prototype":220,"../internals/an-object":223}],288:[function(e,t,n){function r(e){return function(t){for(var n,r=a(t),u=o(r),c=u.length,l=0,h=[];l<c;)n=u[l++],i&&!s.call(r,n)||h.push(e?[n,r[n]]:r[n]);return h}}var i=e("../internals/descriptors"),o=e("../internals/object-keys"),a=e("../internals/to-indexed-object"),s=e("../internals/object-property-is-enumerable").f;t.exports={entries:r(!0),values:r(!1)}},{"../internals/descriptors":240,"../internals/object-keys":285,"../internals/object-property-is-enumerable":286,"../internals/to-indexed-object":305}],289:[function(e,t,n){var r=e("../internals/get-built-in"),i=e("../internals/object-get-own-property-names"),o=e("../internals/object-get-own-property-symbols"),a=e("../internals/an-object");t.exports=r("Reflect","ownKeys")||function(e){var t=i.f(a(e)),n=o.f;return n?t.concat(n(e)):t}},{"../internals/an-object":223,"../internals/get-built-in":249,"../internals/object-get-own-property-names":281,"../internals/object-get-own-property-symbols":282}],290:[function(e,t,n){e=e("../internals/global"),t.exports=e},{"../internals/global":251}],291:[function(e,t,n){t.exports=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}}},{}],292:[function(e,t,n){var r=e("../internals/an-object"),i=e("../internals/is-object"),o=e("../internals/new-promise-capability");t.exports=function(e,t){return r(e),i(t)&&t.constructor===e?t:((0,(e=o.f(e)).resolve)(t),e.promise)}},{"../internals/an-object":223,"../internals/is-object":263,"../internals/new-promise-capability":273}],293:[function(e,t,n){var r=e("../internals/redefine");t.exports=function(e,t,n){for(var i in t)r(e,i,t[i],n);return e}},{"../internals/redefine":294}],294:[function(e,t,n){var r=e("../internals/global"),i=e("../internals/create-non-enumerable-property"),o=e("../internals/has"),a=e("../internals/set-global"),s=e("../internals/inspect-source"),u=(e=e("../internals/internal-state")).get,c=e.enforce,l=String(String).split("String");(t.exports=function(e,t,n,s){var u=!!s&&!!s.unsafe,h=!!s&&!!s.enumerable;s=!!s&&!!s.noTargetGet;"function"==typeof n&&("string"!=typeof t||o(n,"name")||i(n,"name",t),c(n).source=l.join("string"==typeof t?t:"")),e!==r?(u?!s&&e[t]&&(h=!0):delete e[t],h?e[t]=n:i(e,t,n)):h?e[t]=n:a(t,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&u(this).source||s(this)}))},{"../internals/create-non-enumerable-property":236,"../internals/global":251,"../internals/has":252,"../internals/inspect-source":258,"../internals/internal-state":259,"../internals/set-global":296}],295:[function(e,t,n){t.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},{}],296:[function(e,t,n){var r=e("../internals/global"),i=e("../internals/create-non-enumerable-property");t.exports=function(e,t){try{i(r,e,t)}catch(n){r[e]=t}return t}},{"../internals/create-non-enumerable-property":236,"../internals/global":251}],297:[function(e,t,n){"use strict";var r=e("../internals/get-built-in"),i=e("../internals/object-define-property"),o=e("../internals/well-known-symbol"),a=e("../internals/descriptors"),s=o("species");t.exports=function(e){e=r(e);var t=i.f;a&&e&&!e[s]&&t(e,s,{configurable:!0,get:function(){return this}})}},{"../internals/descriptors":240,"../internals/get-built-in":249,"../internals/object-define-property":278,"../internals/well-known-symbol":314}],298:[function(e,t,n){var r=e("../internals/object-define-property").f,i=e("../internals/has"),o=e("../internals/well-known-symbol")("toStringTag");t.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},{"../internals/has":252,"../internals/object-define-property":278,"../internals/well-known-symbol":314}],299:[function(e,t,n){var r=e("../internals/shared"),i=e("../internals/uid"),o=r("keys");t.exports=function(e){return o[e]||(o[e]=i(e))}},{"../internals/shared":301,"../internals/uid":311}],300:[function(e,t,n){var r=e("../internals/global");e=e("../internals/set-global"),r=r["__core-js_shared__"]||e("__core-js_shared__",{});t.exports=r},{"../internals/global":251,"../internals/set-global":296}],301:[function(e,t,n){var r=e("../internals/is-pure"),i=e("../internals/shared-store");(t.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.6.5",mode:r?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},{"../internals/is-pure":264,"../internals/shared-store":300}],302:[function(e,t,n){var r=e("../internals/an-object"),i=e("../internals/a-function"),o=e("../internals/well-known-symbol")("species");t.exports=function(e,t){return void 0===(e=r(e).constructor)||null==(e=r(e)[o])?t:i(e)}},{"../internals/a-function":219,"../internals/an-object":223,"../internals/well-known-symbol":314}],303:[function(e,t,n){function r(e){return function(){w(e)}}function i(e){w(e.data)}function o(e){s.postMessage(e+"",d.protocol+"//"+d.host)}var a,s=e("../internals/global"),u=e("../internals/fails"),c=e("../internals/classof-raw"),l=e("../internals/function-bind-context"),h=e("../internals/html"),f=e("../internals/document-create-element"),d=(e=e("../internals/engine-is-ios"),s.location),p=s.setImmediate,m=s.clearImmediate,g=s.process,A=s.MessageChannel,v=s.Dispatch,b=0,y={},w=function(e){var t;y.hasOwnProperty(e)&&(t=y[e],delete y[e],t())};p&&m||(p=function(e){for(var t=[],n=1;n<arguments.length;)t.push(arguments[n++]);return y[++b]=function(){("function"==typeof e?e:Function(e)).apply(void 0,t)},a(b),b},m=function(e){delete y[e]},"process"==c(g)?a=function(e){g.nextTick(r(e))}:v&&v.now?a=function(e){v.now(r(e))}:A&&!e?(e=(c=new A).port2,c.port1.onmessage=i,a=l(e.postMessage,e,1)):!s.addEventListener||"function"!=typeof postMessage||s.importScripts||u(o)||"file:"===d.protocol?a="onreadystatechange"in f("script")?function(e){h.appendChild(f("script")).onreadystatechange=function(){h.removeChild(this),w(e)}}:function(e){setTimeout(r(e),0)}:(a=o,s.addEventListener("message",i,!1))),t.exports={set:p,clear:m}},{"../internals/classof-raw":230,"../internals/document-create-element":241,"../internals/engine-is-ios":242,"../internals/fails":247,"../internals/function-bind-context":248,"../internals/global":251,"../internals/html":255}],304:[function(e,t,n){var r=e("../internals/to-integer"),i=Math.max,o=Math.min;t.exports=function(e,t){return(e=r(e))<0?i(e+t,0):o(e,t)}},{"../internals/to-integer":306}],305:[function(e,t,n){var r=e("../internals/indexed-object"),i=e("../internals/require-object-coercible");t.exports=function(e){return r(i(e))}},{"../internals/indexed-object":257,"../internals/require-object-coercible":295}],306:[function(e,t,n){var r=Math.ceil,i=Math.floor;t.exports=function(e){return isNaN(e=+e)?0:(0<e?i:r)(e)}},{}],307:[function(e,t,n){var r=e("../internals/to-integer"),i=Math.min;t.exports=function(e){return 0<e?i(r(e),9007199254740991):0}},{"../internals/to-integer":306}],308:[function(e,t,n){var r=e("../internals/require-object-coercible");t.exports=function(e){return Object(r(e))}},{"../internals/require-object-coercible":295}],309:[function(e,t,n){var r=e("../internals/is-object");t.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e))||"function"==typeof(n=e.valueOf)&&!r(i=n.call(e))||!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},{"../internals/is-object":263}],310:[function(e,t,n){var r={};r[e("../internals/well-known-symbol")("toStringTag")]="z",t.exports="[object z]"===String(r)},{"../internals/well-known-symbol":314}],311:[function(e,t,n){var r=0,i=Math.random();t.exports=function(e){return"Symbol("+String(void 0===e?"":e)+")_"+(++r+i).toString(36)}},{}],312:[function(e,t,n){e=e("../internals/native-symbol"),t.exports=e&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},{"../internals/native-symbol":271}],313:[function(e,t,n){e=e("../internals/well-known-symbol"),n.f=e},{"../internals/well-known-symbol":314}],314:[function(e,t,n){var r=e("../internals/global"),i=e("../internals/shared"),o=e("../internals/has"),a=e("../internals/uid"),s=e("../internals/native-symbol"),u=(e=e("../internals/use-symbol-as-uid"),i("wks")),c=r.Symbol,l=e?c:c&&c.withoutSetter||a;t.exports=function(e){return o(u,e)||(s&&o(c,e)?u[e]=c[e]:u[e]=l("Symbol."+e)),u[e]}},{"../internals/global":251,"../internals/has":252,"../internals/native-symbol":271,"../internals/shared":301,"../internals/uid":311,"../internals/use-symbol-as-uid":312}],315:[function(e,t,n){"use strict";var r=e("../internals/export"),i=e("../internals/array-iteration").findIndex,o=e("../internals/add-to-unscopables"),a=(e=e("../internals/array-method-uses-to-length"),!0);e=e("findIndex");"findIndex"in[]&&Array(1).findIndex((function(){a=!1})),r({target:"Array",proto:!0,forced:a||!e},{findIndex:function(e){return i(this,e,1<arguments.length?arguments[1]:void 0)}}),o("findIndex")},{"../internals/add-to-unscopables":221,"../internals/array-iteration":225,"../internals/array-method-uses-to-length":226,"../internals/export":246}],316:[function(e,t,n){"use strict";var r=e("../internals/export"),i=e("../internals/array-iteration").find,o=e("../internals/add-to-unscopables"),a=(e=e("../internals/array-method-uses-to-length"),!0);e=e("find");"find"in[]&&Array(1).find((function(){a=!1})),r({target:"Array",proto:!0,forced:a||!e},{find:function(e){return i(this,e,1<arguments.length?arguments[1]:void 0)}}),o("find")},{"../internals/add-to-unscopables":221,"../internals/array-iteration":225,"../internals/array-method-uses-to-length":226,"../internals/export":246}],317:[function(e,t,n){"use strict";var r=e("../internals/export"),i=e("../internals/array-includes").includes,o=e("../internals/add-to-unscopables");r({target:"Array",proto:!0,forced:!e("../internals/array-method-uses-to-length")("indexOf",{ACCESSORS:!0,1:0})},{includes:function(e){return i(this,e,1<arguments.length?arguments[1]:void 0)}}),o("includes")},{"../internals/add-to-unscopables":221,"../internals/array-includes":224,"../internals/array-method-uses-to-length":226,"../internals/export":246}],318:[function(e,t,n){"use strict";var r=e("../internals/to-indexed-object"),i=e("../internals/add-to-unscopables"),o=e("../internals/iterators"),a=e("../internals/internal-state"),s=(e=e("../internals/define-iterator"),a.set),u=a.getterFor("Array Iterator");t.exports=e(Array,"Array",(function(e,t){s(this,{type:"Array Iterator",target:r(e),index:0,kind:t})}),(function(){var e=u(this),t=e.target,n=e.kind,r=e.index++;return!t||r>=t.length?{value:e.target=void 0,done:!0}:"keys"==n?{value:r,done:!1}:"values"==n?{value:t[r],done:!1}:{value:[r,t[r]],done:!1}}),"values"),o.Arguments=o.Array,i("keys"),i("values"),i("entries")},{"../internals/add-to-unscopables":221,"../internals/define-iterator":238,"../internals/internal-state":259,"../internals/iterators":268,"../internals/to-indexed-object":305}],319:[function(e,t,n){e("../internals/export")({target:"Number",stat:!0},{isNaN:function(e){return e!=e}})},{"../internals/export":246}],320:[function(e,t,n){var r=e("../internals/export");e=e("../internals/object-assign");r({target:"Object",stat:!0,forced:Object.assign!==e},{assign:e})},{"../internals/export":246,"../internals/object-assign":275}],321:[function(e,t,n){var r=e("../internals/export"),i=e("../internals/to-object"),o=e("../internals/object-keys");r({target:"Object",stat:!0,forced:e("../internals/fails")((function(){o(1)}))},{keys:function(e){return o(i(e))}})},{"../internals/export":246,"../internals/fails":247,"../internals/object-keys":285,"../internals/to-object":308}],322:[function(e,t,n){var r=e("../internals/export"),i=e("../internals/object-to-array").values;r({target:"Object",stat:!0},{values:function(e){return i(e)}})},{"../internals/export":246,"../internals/object-to-array":288}],323:[function(e,t,n){"use strict";var r,i,o,a,s=e("../internals/export"),u=e("../internals/is-pure"),c=e("../internals/global"),l=e("../internals/get-built-in"),h=e("../internals/native-promise-constructor"),f=e("../internals/redefine"),d=e("../internals/redefine-all"),p=e("../internals/set-to-string-tag"),m=e("../internals/set-species"),g=e("../internals/is-object"),A=e("../internals/a-function"),v=e("../internals/an-instance"),b=e("../internals/classof-raw"),y=e("../internals/inspect-source"),w=e("../internals/iterate"),x=e("../internals/check-correctness-of-iteration"),C=e("../internals/species-constructor"),k=e("../internals/task").set,E=e("../internals/microtask"),S=e("../internals/promise-resolve"),_=e("../internals/host-report-errors"),O=e("../internals/new-promise-capability"),T=e("../internals/perform"),D=e("../internals/internal-state"),B=e("../internals/is-forced"),I=e("../internals/well-known-symbol"),M=e("../internals/engine-v8-version"),j=I("species"),N="Promise",F=D.get,R=D.set,P=D.getterFor(N),L=h,U=c.TypeError,z=c.document,H=c.process,$=l("fetch"),Q=O.f,V=Q,q="process"==b(H),G=!!(z&&z.createEvent&&c.dispatchEvent),W=(I=(e=B(N,(function(){if(y(L)===String(L)){if(66===M)return!0;if(!q&&"function"!=typeof PromiseRejectionEvent)return!0}var e,t;return!((!u||L.prototype.finally)&&(51<=M&&/native code/.test(L)||(t=function(e){e((function(){}),(function(){}))},((e=L.resolve(1)).constructor={})[j]=t,e.then((function(){}))instanceof t)))})))||!x((function(e){L.all(e).catch((function(){}))})),function(e){var t;return!(!g(e)||"function"!=typeof(t=e.then))&&t}),K=function(e,t,n){var r;t.notified||(t.notified=!0,r=t.reactions,E((function(){for(var i,o,a=t.value,s=1==t.state,u=0;r.length>u;){var l,h,f,d=r[u++],p=s?d.ok:d.fail,m=d.resolve,g=d.reject,A=d.domain;try{p?(s||(2===t.rejection&&function(e,t){k.call(c,(function(){q?H.emit("rejectionHandled",e):Y("rejectionhandled",e,t.value)}))}(e,t),t.rejection=1),!0===p?l=a:(A&&A.enter(),l=p(a),A&&(A.exit(),f=!0)),l===d.promise?g(U("Promise-chain cycle")):(h=W(l))?h.call(l,m,g):m(l)):g(a)}catch(a){A&&!f&&A.exit(),g(a)}}t.reactions=[],t.notified=!1,n&&!t.rejection&&(i=e,o=t,k.call(c,(function(){var e,t=o.value;if(X(o)&&(e=T((function(){q?H.emit("unhandledRejection",t,i):Y("unhandledrejection",i,t)})),o.rejection=q||X(o)?2:1,e.error))throw e.value})))})))},Y=function(e,t,n){var r;G?((r=z.createEvent("Event")).promise=t,r.reason=n,r.initEvent(e,!1,!0),c.dispatchEvent(r)):r={promise:t,reason:n},(t=c["on"+e])?t(r):"unhandledrejection"===e&&_("Unhandled promise rejection",n)},X=function(e){return 1!==e.rejection&&!e.parent},J=function(e,t,n,r){return function(i){e(t,n,i,r)}},Z=function(e,t,n,r){t.done||(t.done=!0,(t=r||t).value=n,t.state=2,K(e,t,!0))},ee=function(e,t,n,r){if(!t.done){t.done=!0,r&&(t=r);try{if(e===n)throw U("Promise can't be resolved itself");var i=W(n);i?E((function(){var r={done:!1};try{i.call(n,J(ee,e,r,t),J(Z,e,r,t))}catch(n){Z(e,r,n,t)}})):(t.value=n,t.state=1,K(e,t,!1))}catch(n){Z(e,{done:!1},n,t)}}};e&&(L=function(e){v(this,L,N),A(e),r.call(this);var t=F(this);try{e(J(ee,this,t),J(Z,this,t))}catch(e){Z(this,t,e)}},(r=function(e){R(this,{type:N,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=d(L.prototype,{then:function(e,t){var n=P(this),r=Q(C(this,L));return r.ok="function"!=typeof e||e,r.fail="function"==typeof t&&t,r.domain=q?H.domain:void 0,n.parent=!0,n.reactions.push(r),0!=n.state&&K(this,n,!1),r.promise},catch:function(e){return this.then(void 0,e)}}),i=function(){var e=new r,t=F(e);this.promise=e,this.resolve=J(ee,e,t),this.reject=J(Z,e,t)},O.f=Q=function(e){return e===L||e===o?new i:V(e)},u||"function"!=typeof h||(a=h.prototype.then,f(h.prototype,"then",(function(e,t){var n=this;return new L((function(e,t){a.call(n,e,t)})).then(e,t)}),{unsafe:!0}),"function"==typeof $&&s({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return S(L,$.apply(c,arguments))}}))),s({global:!0,wrap:!0,forced:e},{Promise:L}),p(L,N,!1,!0),m(N),o=l(N),s({target:N,stat:!0,forced:e},{reject:function(e){var t=Q(this);return t.reject.call(void 0,e),t.promise}}),s({target:N,stat:!0,forced:u||e},{resolve:function(e){return S(u&&this===o?L:this,e)}}),s({target:N,stat:!0,forced:I},{all:function(e){var t=this,n=Q(t),r=n.resolve,i=n.reject,o=T((function(){var n=A(t.resolve),o=[],a=0,s=1;w(e,(function(e){var u=a++,c=!1;o.push(void 0),s++,n.call(t,e).then((function(e){c||(c=!0,o[u]=e,--s||r(o))}),i)})),--s||r(o)}));return o.error&&i(o.value),n.promise},race:function(e){var t=this,n=Q(t),r=n.reject,i=T((function(){var i=A(t.resolve);w(e,(function(e){i.call(t,e).then(n.resolve,r)}))}));return i.error&&r(i.value),n.promise}})},{"../internals/a-function":219,"../internals/an-instance":222,"../internals/check-correctness-of-iteration":229,"../internals/classof-raw":230,"../internals/engine-v8-version":244,"../internals/export":246,"../internals/get-built-in":249,"../internals/global":251,"../internals/host-report-errors":254,"../internals/inspect-source":258,"../internals/internal-state":259,"../internals/is-forced":262,"../internals/is-object":263,"../internals/is-pure":264,"../internals/iterate":266,"../internals/microtask":269,"../internals/native-promise-constructor":270,"../internals/new-promise-capability":273,"../internals/perform":291,"../internals/promise-resolve":292,"../internals/redefine":294,"../internals/redefine-all":293,"../internals/set-species":297,"../internals/set-to-string-tag":298,"../internals/species-constructor":302,"../internals/task":303,"../internals/well-known-symbol":314}],324:[function(e,t,n){var r=e("../internals/export"),i=e("../internals/to-absolute-index"),o=String.fromCharCode;r({target:"String",stat:!0,forced:!!(e=String.fromCodePoint)&&1!=e.length},{fromCodePoint:function(e){for(var t,n=[],r=arguments.length,a=0;a<r;){if(t=+arguments[a++],i(t,1114111)!==t)throw RangeError(t+" is not a valid code point");n.push(t<65536?o(t):o(55296+((t-=65536)>>10),t%1024+56320))}return n.join("")}})},{"../internals/export":246,"../internals/to-absolute-index":304}],325:[function(e,t,n){"use strict";var r=e("../internals/export"),i=e("../internals/not-a-regexp"),o=e("../internals/require-object-coercible");r({target:"String",proto:!0,forced:!e("../internals/correct-is-regexp-logic")("includes")},{includes:function(e){return!!~String(o(this)).indexOf(i(e),1<arguments.length?arguments[1]:void 0)}})},{"../internals/correct-is-regexp-logic":233,"../internals/export":246,"../internals/not-a-regexp":274,"../internals/require-object-coercible":295}],326:[function(e,t,n){e("../internals/define-well-known-symbol")("asyncIterator")},{"../internals/define-well-known-symbol":239}],327:[function(e,t,n){"use strict";function r(e,t){var n=ne[e]=S(Y.prototype);return G(n,{type:"Symbol",tag:e,description:t}),p||(n.description=t),n}function i(e,t,n){return e===K&&i(re,t,n),w(e),t=k(t,!0),w(n),(v(ne,t)?(n.enumerable?(v(e,q)&&e[q][t]&&(e[q][t]=!1),n=S(n,{enumerable:E(0,!1)})):(v(e,q)||Z(e,q,E(1,{})),e[q][t]=!0),se):Z)(e,t,n)}function o(e,t){w(e);var n=C(t);t=_(n).concat(c(n));return V(t,(function(t){p&&!a.call(n,t)||i(e,t,n[t])})),e}function a(e){e=k(e,!0);var t=te.call(this,e);return!(this===K&&v(ne,e)&&!v(re,e))&&(!(t||!v(this,e)||!v(ne,e)||v(this,q)&&this[q][e])||t)}function s(e,t){var n;e=C(e),t=k(t,!0);if(e!==K||!v(ne,t)||v(re,t))return!(n=J(e,t))||!v(ne,t)||v(e,q)&&e[q][t]||(n.enumerable=!0),n}function u(e){e=ee(C(e));var t=[];return V(e,(function(e){v(ne,e)||v(P,e)||t.push(e)})),t}function c(e){var t=e===K,n=(e=ee(t?re:C(e)),[]);return V(e,(function(e){!v(ne,e)||t&&!v(K,e)||n.push(ne[e])})),n}var l=e("../internals/export"),h=e("../internals/global"),f=e("../internals/get-built-in"),d=e("../internals/is-pure"),p=e("../internals/descriptors"),m=e("../internals/native-symbol"),g=e("../internals/use-symbol-as-uid"),A=e("../internals/fails"),v=e("../internals/has"),b=e("../internals/is-array"),y=e("../internals/is-object"),w=e("../internals/an-object"),x=e("../internals/to-object"),C=e("../internals/to-indexed-object"),k=e("../internals/to-primitive"),E=e("../internals/create-property-descriptor"),S=e("../internals/object-create"),_=e("../internals/object-keys"),O=e("../internals/object-get-own-property-names"),T=e("../internals/object-get-own-property-names-external"),D=e("../internals/object-get-own-property-symbols"),B=e("../internals/object-get-own-property-descriptor"),I=e("../internals/object-define-property"),M=e("../internals/object-property-is-enumerable"),j=e("../internals/create-non-enumerable-property"),N=e("../internals/redefine"),F=e("../internals/shared"),R=e("../internals/shared-key"),P=e("../internals/hidden-keys"),L=e("../internals/uid"),U=e("../internals/well-known-symbol"),z=e("../internals/well-known-symbol-wrapped"),H=e("../internals/define-well-known-symbol"),$=e("../internals/set-to-string-tag"),Q=e("../internals/internal-state"),V=e("../internals/array-iteration").forEach,q=R("hidden"),G=(e=U("toPrimitive"),Q.set),W=Q.getterFor("Symbol"),K=Object.prototype,Y=h.Symbol,X=f("JSON","stringify"),J=B.f,Z=I.f,ee=T.f,te=M.f,ne=F("symbols"),re=F("op-symbols"),ie=F("string-to-symbol-registry"),oe=F("symbol-to-string-registry"),ae=(R=F("wks"),!(Q=h.QObject)||!Q.prototype||!Q.prototype.findChild),se=p&&A((function(){return 7!=S(Z({},"a",{get:function(){return Z(this,"a",{value:7}).a}})).a}))?function(e,t,n){var r=J(K,t);r&&delete K[t],Z(e,t,n),r&&e!==K&&Z(K,t,r)}:Z,ue=g?function(e){return"symbol"==typeof e}:function(e){return Object(e)instanceof Y};m||(N((Y=function(){if(this instanceof Y)throw TypeError("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,t=L(e),n=function(e){this===K&&n.call(re,e),v(this,q)&&v(this[q],t)&&(this[q][t]=!1),se(this,t,E(1,e))};return p&&ae&&se(K,t,{configurable:!0,set:n}),r(t,e)}).prototype,"toString",(function(){return W(this).tag})),N(Y,"withoutSetter",(function(e){return r(L(e),e)})),M.f=a,I.f=i,B.f=s,O.f=T.f=u,D.f=c,z.f=function(e){return r(U(e),e)},p&&(Z(Y.prototype,"description",{configurable:!0,get:function(){return W(this).description}}),d||N(K,"propertyIsEnumerable",a,{unsafe:!0}))),l({global:!0,wrap:!0,forced:!m,sham:!m},{Symbol:Y}),V(_(R),(function(e){H(e)})),l({target:"Symbol",stat:!0,forced:!m},{for:function(e){var t;e=String(e);return v(ie,e)?ie[e]:(t=Y(e),ie[e]=t,oe[t]=e,t)},keyFor:function(e){if(!ue(e))throw TypeError(e+" is not a symbol");if(v(oe,e))return oe[e]},useSetter:function(){ae=!0},useSimple:function(){ae=!1}}),l({target:"Object",stat:!0,forced:!m,sham:!p},{create:function(e,t){return void 0===t?S(e):o(S(e),t)},defineProperty:i,defineProperties:o,getOwnPropertyDescriptor:s}),l({target:"Object",stat:!0,forced:!m},{getOwnPropertyNames:u,getOwnPropertySymbols:c}),l({target:"Object",stat:!0,forced:A((function(){D.f(1)}))},{getOwnPropertySymbols:function(e){return D.f(x(e))}}),X&&l({target:"JSON",stat:!0,forced:!m||A((function(){var e=Y();return"[null]"!=X([e])||"{}"!=X({a:e})||"{}"!=X(Object(e))}))},{stringify:function(e,t,n){for(var r,i=[e],o=1;o<arguments.length;)i.push(arguments[o++]);if((y(r=t)||void 0!==e)&&!ue(e))return b(t)||(t=function(e,t){if("function"==typeof r&&(t=r.call(this,e,t)),!ue(t))return t}),i[1]=t,X.apply(null,i)}}),Y.prototype[e]||j(Y.prototype,e,Y.prototype.valueOf),$(Y,"Symbol"),P[q]=!0},{"../internals/an-object":223,"../internals/array-iteration":225,"../internals/create-non-enumerable-property":236,"../internals/create-property-descriptor":237,"../internals/define-well-known-symbol":239,"../internals/descriptors":240,"../internals/export":246,"../internals/fails":247,"../internals/get-built-in":249,"../internals/global":251,"../internals/has":252,"../internals/hidden-keys":253,"../internals/internal-state":259,"../internals/is-array":261,"../internals/is-object":263,"../internals/is-pure":264,"../internals/native-symbol":271,"../internals/object-create":276,"../internals/object-define-property":278,"../internals/object-get-own-property-descriptor":279,"../internals/object-get-own-property-names":281,"../internals/object-get-own-property-names-external":280,"../internals/object-get-own-property-symbols":282,"../internals/object-keys":285,"../internals/object-property-is-enumerable":286,"../internals/redefine":294,"../internals/set-to-string-tag":298,"../internals/shared":301,"../internals/shared-key":299,"../internals/to-indexed-object":305,"../internals/to-object":308,"../internals/to-primitive":309,"../internals/uid":311,"../internals/use-symbol-as-uid":312,"../internals/well-known-symbol":314,"../internals/well-known-symbol-wrapped":313}],328:[function(e,t,n){(function(e){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e){return Object.prototype.toString.call(e)}n.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===r(e)},n.isBoolean=function(e){return"boolean"==typeof e},n.isNull=function(e){return null===e},n.isNullOrUndefined=function(e){return null==e},n.isNumber=function(e){return"number"==typeof e},n.isString=function(e){return"string"==typeof e},n.isSymbol=function(e){return"symbol"===t(e)},n.isUndefined=function(e){return void 0===e},n.isRegExp=function(e){return"[object RegExp]"===r(e)},n.isObject=function(e){return"object"===t(e)&&null!==e},n.isDate=function(e){return"[object Date]"===r(e)},n.isError=function(e){return"[object Error]"===r(e)||e instanceof Error},n.isFunction=function(e){return"function"==typeof e},n.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"===t(e)||void 0===e},n.isBuffer=e.isBuffer}).call(this,{isBuffer:e("../../is-buffer/index.js")})},{"../../is-buffer/index.js":388}],329:[function(e,t,n){(function(n){"use strict";var r=e("elliptic"),i=e("bn.js"),o=(t.exports=function(e){return new a(e)},{secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}});function a(e){this.curveType=o[e],this.curveType||(this.curveType={name:e}),this.curve=new r.ec(this.curveType.name),this.keys=void 0}function s(e,t,r){return Array.isArray(e)||(e=e.toArray()),e=new n(e),r&&e.length<r&&((r=new n(r-e.length)).fill(0),e=n.concat([r,e])),t?e.toString(t):e}o.p224=o.secp224r1,o.p256=o.secp256r1=o.prime256v1,o.p192=o.secp192r1=o.prime192v1,o.p384=o.secp384r1,o.p521=o.secp521r1,a.prototype.generateKeys=function(e,t){return this.keys=this.curve.genKeyPair(),this.getPublicKey(e,t)},a.prototype.computeSecret=function(e,t,r){return t=t||"utf8",n.isBuffer(e)||(e=new n(e,t)),s(this.curve.keyFromPublic(e).getPublic().mul(this.keys.getPrivate()).getX(),r,this.curveType.byteLength)},a.prototype.getPublicKey=function(e,t){var n=this.keys.getPublic("compressed"===t,!0);return"hybrid"===t&&(n[n.length-1]%2?n[0]=7:n[0]=6),s(n,e)},a.prototype.getPrivateKey=function(e){return s(this.keys.getPrivate(),e)},a.prototype.setPublicKey=function(e,t){return t=t||"utf8",n.isBuffer(e)||(e=new n(e,t)),this.keys._importPublic(e),this},a.prototype.setPrivateKey=function(e,t){return t=t||"utf8",n.isBuffer(e)||(e=new n(e,t)),t=(t=new i(e)).toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(t),this}}).call(this,e("buffer").Buffer)},{"bn.js":330,buffer:216,elliptic:350}],330:[function(e,t,n){arguments[4][181][0].apply(n,arguments)},{buffer:185,dup:181}],331:[function(e,t,n){"use strict";var r=e("inherits"),i=e("md5.js"),o=e("ripemd160"),a=e("sha.js"),s=e("cipher-base");function u(e){s.call(this,"digest"),this._hash=e}r(u,s),u.prototype._update=function(e){this._hash.update(e)},u.prototype._final=function(){return this._hash.digest()},t.exports=function(e){return"md5"===(e=e.toLowerCase())?new i:"rmd160"===e||"ripemd160"===e?new o:new u(a(e))}},{"cipher-base":218,inherits:387,"md5.js":434,ripemd160:493,"sha.js":499}],332:[function(e,t,n){"use strict";var r=e("md5.js");t.exports=function(e){return(new r).update(e).digest()}},{"md5.js":434}],333:[function(e,t,n){"use strict";var r=e("inherits"),i=e("./legacy"),o=e("cipher-base"),a=e("safe-buffer").Buffer,s=e("create-hash/md5"),u=e("ripemd160"),c=e("sha.js"),l=a.alloc(128);function h(e,t){o.call(this,"digest"),"string"==typeof t&&(t=a.from(t));var n="sha512"===e||"sha384"===e?128:64;this._alg=e,(this._key=t).length>n?t=("rmd160"===e?new u:c(e)).update(t).digest():t.length<n&&(t=a.concat([t,l],n));for(var r=this._ipad=a.allocUnsafe(n),i=this._opad=a.allocUnsafe(n),s=0;s<n;s++)r[s]=54^t[s],i[s]=92^t[s];this._hash="rmd160"===e?new u:c(e),this._hash.update(r)}r(h,o),h.prototype._update=function(e){this._hash.update(e)},h.prototype._final=function(){var e=this._hash.digest();return("rmd160"===this._alg?new u:c(this._alg)).update(this._opad).update(e).digest()},t.exports=function(e,t){return"rmd160"===(e=e.toLowerCase())||"ripemd160"===e?new h("rmd160",t):"md5"===e?new i(s,t):new h(e,t)}},{"./legacy":334,"cipher-base":218,"create-hash/md5":332,inherits:387,ripemd160:493,"safe-buffer":494,"sha.js":499}],334:[function(e,t,n){"use strict";var r=e("inherits"),i=e("safe-buffer").Buffer,o=e("cipher-base"),a=i.alloc(128);function s(e,t){o.call(this,"digest"),"string"==typeof t&&(t=i.from(t)),this._alg=e,64<(this._key=t).length?t=e(t):t.length<64&&(t=i.concat([t,a],64));for(var n=this._ipad=i.allocUnsafe(64),r=this._opad=i.allocUnsafe(64),s=0;s<64;s++)n[s]=54^t[s],r[s]=92^t[s];this._hash=[n]}r(s,o),s.prototype._update=function(e){this._hash.push(e)},s.prototype._final=function(){var e=this._alg(i.concat(this._hash));return this._alg(i.concat([this._opad,e]))},t.exports=s},{"cipher-base":218,inherits:387,"safe-buffer":494}],335:[function(e,t,n){"use strict";n.randomBytes=n.rng=n.pseudoRandomBytes=n.prng=e("randombytes"),n.createHash=n.Hash=e("create-hash"),n.createHmac=n.Hmac=e("create-hmac");var r=e("browserify-sign/algos"),i=(r=Object.keys(r),["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(r));n.getHashes=function(){return i},r=e("pbkdf2"),n.pbkdf2=r.pbkdf2,n.pbkdf2Sync=r.pbkdf2Sync,r=e("browserify-cipher"),n.Cipher=r.Cipher,n.createCipher=r.createCipher,n.Cipheriv=r.Cipheriv,n.createCipheriv=r.createCipheriv,n.Decipher=r.Decipher,n.createDecipher=r.createDecipher,n.Decipheriv=r.Decipheriv,n.createDecipheriv=r.createDecipheriv,n.getCiphers=r.getCiphers,n.listCiphers=r.listCiphers,r=e("diffie-hellman"),n.DiffieHellmanGroup=r.DiffieHellmanGroup,n.createDiffieHellmanGroup=r.createDiffieHellmanGroup,n.getDiffieHellman=r.getDiffieHellman,n.createDiffieHellman=r.createDiffieHellman,n.DiffieHellman=r.DiffieHellman,r=e("browserify-sign"),n.createSign=r.createSign,n.Sign=r.Sign,n.createVerify=r.createVerify,n.Verify=r.Verify,n.createECDH=e("create-ecdh"),r=e("public-encrypt"),n.publicEncrypt=r.publicEncrypt,n.privateEncrypt=r.privateEncrypt,n.publicDecrypt=r.publicDecrypt,n.privateDecrypt=r.privateDecrypt,r=e("randomfill");n.randomFill=r.randomFill,n.randomFillSync=r.randomFillSync,n.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},n.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},{"browserify-cipher":203,"browserify-sign":211,"browserify-sign/algos":208,"create-ecdh":329,"create-hash":331,"create-hmac":333,"diffie-hellman":345,pbkdf2:460,"public-encrypt":468,randombytes:475,randomfill:476}],336:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i;i=function(){function e(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e}function t(e){return e instanceof w}function n(e,t,n){var r;return e?("string"==typeof e?(b[e]&&(r=e),t&&(b[e]=t,r=e)):(t=e.name,b[t]=e,r=t),!n&&r&&(v=r),r||!n&&v):v}function i(e,n){return t(e)?e.clone():((n="object"==r(n)?n:{}).date=e,n.args=arguments,new w(n))}var o="millisecond",a="second",s="minute",u="hour",c="day",l="week",h="month",f="year",d="date",p=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[^0-9]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?.?(\d+)?$/,m=/\[([^\]]+)]|Y{2,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={s:e,z:function(t){t=-t.utcOffset();var n=Math.abs(t),r=Math.floor(n/60);n%=60;return(t<=0?"+":"-")+e(r,2,"0")+":"+e(n,2,"0")},m:function e(t,n){var r,i,o;return t.date()<n.date()?-e(n,t):(r=12*(n.year()-t.year())+(n.month()-t.month()),i=t.add(r,h),o=t.add(r+((t=n-i<0)?-1:1),h),+(-(r+(n-i)/(t?i-o:o-i))||0))},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:h,y:f,w:l,d:c,D:d,h:u,m:s,s:a,ms:o,Q:"quarter"}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},A={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},v="en",b={},y=(b[v]=A,g),w=(y.l=n,y.i=t,y.w=function(e,t){return i(e,{locale:t.$L,utc:t.$u,$offset:t.$offset})},(A=C.prototype).parse=function(e){this.$d=function(){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(y.u(t))return new Date;if(!(t instanceof Date||"string"!=typeof t||/Z$/i.test(t))){var r,i,o=t.match(p);if(o)return r=o[2]-1||0,i=(o[7]||"0").substring(0,3),n?new Date(Date.UTC(o[1],r,o[3]||1,o[4]||0,o[5]||0,o[6]||0,i)):new Date(o[1],r,o[3]||1,o[4]||0,o[5]||0,o[6]||0,i)}return new Date(t)}(),this.init()},A.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},A.$utils=function(){return y},A.isValid=function(){return!("Invalid Date"===this.$d.toString())},A.isSame=function(e,t){return e=i(e),this.startOf(t)<=e&&e<=this.endOf(t)},A.isAfter=function(e,t){return i(e)<this.startOf(t)},A.isBefore=function(e,t){return this.endOf(t)<i(e)},A.$g=function(e,t,n){return y.u(e)?this[t]:this.set(n,e)},A.unix=function(){return Math.floor(this.valueOf()/1e3)},A.valueOf=function(){return this.$d.getTime()},A.startOf=function(e,t){function n(e,t){return t=y.w(i.$u?Date.UTC(i.$y,t,e):new Date(i.$y,t,e),i),o?t:t.endOf(c)}function r(e,t){return y.w(i.toDate()[e].apply(i.toDate("s"),(o?[0,0,0,0]:[23,59,59,999]).slice(t)),i)}var i=this,o=!!y.u(t)||t,p=(t=y.p(e),this.$W),m=this.$M,g=this.$D,A="set"+(this.$u?"UTC":"");switch(t){case f:return o?n(1,0):n(31,11);case h:return o?n(1,m):n(0,m+1);case l:var v=(p<(v=this.$locale().weekStart||0)?p+7:p)-v;return n(o?g-v:g+(6-v),m);case c:case d:return r(A+"Hours",0);case u:return r(A+"Minutes",1);case s:return r(A+"Seconds",2);case a:return r(A+"Milliseconds",3);default:return this.clone()}},A.endOf=function(e){return this.startOf(e,!1)},A.$set=function(e,t){e=y.p(e);var n="set"+(this.$u?"UTC":""),r=(n=((r={}).day=n+"Date",r.date=n+"Date",r[h]=n+"Month",r.year=n+"FullYear",r.hour=n+"Hours",r[s]=n+"Minutes",r[a]=n+"Seconds",r[o]=n+"Milliseconds",r[e]),e===c?this.$D+(t-this.$W):t);return e===h||e===f?((t=this.clone().set(d,1)).$d[n](r),t.init(),this.$d=t.set(d,Math.min(this.$D,t.daysInMonth())).$d):n&&this.$d[n](r),this.init(),this},A.set=function(e,t){return this.clone().$set(e,t)},A.get=function(e){return this[y.p(e)]()},A.add=function(e,t){function n(t){var n=i(r);return y.w(n.date(n.date()+Math.round(t*e)),r)}var r=this;return(t=(e=Number(e),y.p(t)))===h?this.set(h,this.$M+e):t===f?this.set(f,this.$y+e):t===c?n(1):t===l?n(7):(t={minute:6e4,hour:36e5,second:1e3}[t]||1,t=this.$d.getTime()+e*t,y.w(t,this))},A.subtract=function(e,t){return this.add(-1*e,t)},A.format=function(e){var t,n,r,i,o,a,s,u,c,l,h,f=this;return this.isValid()?(t=e||"YYYY-MM-DDTHH:mm:ssZ",n=y.z(this),e=this.$locale(),r=this.$H,i=this.$m,o=this.$M,a=e.weekdays,s=e.months,u=function(e,n,r,i){return e&&(e[n]||e(f,t))||r[n].substr(0,i)},c=function(e){return y.s(r%12||12,e,"0")},l=e.meridiem||function(e,t,n){return e=e<12?"AM":"PM",n?e.toLowerCase():e},h={YY:String(this.$y).slice(-2),YYYY:this.$y,M:o+1,MM:y.s(o+1,2,"0"),MMM:u(e.monthsShort,o,s,3),MMMM:u(s,o),D:this.$D,DD:y.s(this.$D,2,"0"),d:String(this.$W),dd:u(e.weekdaysMin,this.$W,a,2),ddd:u(e.weekdaysShort,this.$W,a,3),dddd:a[this.$W],H:String(r),HH:y.s(r,2,"0"),h:c(1),hh:c(2),a:l(r,i,!0),A:l(r,i,!1),m:String(i),mm:y.s(i,2,"0"),s:String(this.$s),ss:y.s(this.$s,2,"0"),SSS:y.s(this.$ms,3,"0"),Z:n},t.replace(m,(function(e,t){return t||h[e]||n.replace(":","")}))):"Invalid Date"},A.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},A.diff=function(e,t,n){t=y.p(t);var r=6e4*((e=i(e)).utcOffset()-this.utcOffset()),o=this-e,u=(e=y.m(this,e),{});return u.year=e/12,u[h]=e,u.quarter=e/3,u.week=(o-r)/6048e5,u.day=(o-r)/864e5,u.hour=o/36e5,u[s]=o/6e4,u[a]=o/1e3,e=u[t]||o,n?e:y.a(e)},A.daysInMonth=function(){return this.endOf(h).$D},A.$locale=function(){return b[this.$L]},A.locale=function(e,t){var r;return e?(r=this.clone(),(e=n(e,t,!0))&&(r.$L=e),r):this.$L},A.clone=function(){return y.w(this.$d,this)},A.toDate=function(){return new Date(this.valueOf())},A.toJSON=function(){return this.isValid()?this.toISOString():null},A.toISOString=function(){return this.$d.toISOString()},A.toString=function(){return this.$d.toUTCString()},C),x=w.prototype;function C(e){this.$L=this.$L||n(e.locale,null,!0),this.parse(e)}return i.prototype=x,[["$ms",o],["$s",a],["$m",s],["$H",u],["$W",c],["$M",h],["$y",f],["$D",d]].forEach((function(e){x[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),i.extend=function(e,t){return e(t,w,i),i},i.locale=n,i.isDayjs=t,i.unix=function(e){return i(1e3*e)},i.en=b[v],i.Ls=b,i},"object"==(void 0===n?"undefined":r(n))&&void 0!==t?t.exports=i():(void 0).dayjs=i()},{}],337:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i;i=function(){function e(e){return function(t){this[e]=+t}}function t(e){return(e=n[e])&&(e.indexOf?e:e.s.concat(e.f))}var n,r=/(\[[^[]*\])|([-:/.()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d\d/,o=/\d\d?/,a=/\d*[^\s\d-:/()]+/,s=[/[+-]\d\d:?\d\d/,function(e){var t;(this.zone||(this.zone={})).offset=0==(t=60*(e=e.match(/([+-]|\d\d)/g))[1]+ +e[2])?0:"+"===e[0]?-t:t}],u={A:[/[AP]M/,function(e){this.afternoon="PM"===e}],a:[/[ap]m/,function(e){this.afternoon="pm"===e}],S:[/\d/,function(e){this.milliseconds=100*+e}],SS:[i,function(e){this.milliseconds=10*+e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[o,e("seconds")],ss:[o,e("seconds")],m:[o,e("minutes")],mm:[o,e("minutes")],H:[o,e("hours")],h:[o,e("hours")],HH:[o,e("hours")],hh:[o,e("hours")],D:[o,e("day")],DD:[i,e("day")],Do:[a,function(e){var t=n.ordinal,r=e.match(/\d+/);if(this.day=r[0],t)for(var i=1;i<=31;i+=1)t(i).replace(/\[|\]/g,"")===e&&(this.day=i)}],M:[o,e("month")],MM:[i,e("month")],MMM:[a,function(e){var n=t("months");if((n=(t("monthsShort")||n.map((function(e){return e.substr(0,3)}))).indexOf(e)+1)<1)throw new Error;this.month=n%12||n}],MMMM:[a,function(e){if((e=t("months").indexOf(e)+1)<1)throw new Error;this.month=e%12||e}],Y:[/[+-]?\d+/,e("year")],YY:[i,function(e){this.year=(e=+e)+(68<e?1900:2e3)}],YYYY:[/\d{4}/,e("year")],Z:s,ZZ:s};return function(e,t,i){var o=(t=t.prototype).parse;t.parse=function(e){var t=e.date,a=e.utc,s=e.args,c=(this.$u=a,s[1]);if("string"==typeof c){var l=!0===s[2],h=!0===s[3],f=l||h,d=s[2];h&&(d=s[2]),l||(n=d?i.Ls[d]:this.$locale()),this.$d=function(e,t,n){try{var i=function(){for(var e=t.match(r),n=e.length,i=0;i<n;i+=1){var o=e[i],a=(s=u[o])&&s[0],s=s&&s[1];e[i]=s?{regex:a,parser:s}:o.replace(/^\[|\]$/g,"")}return function(t){for(var r,i,o,a={},s=0,u=0;s<n;s+=1){var c,l,h=e[s];"string"==typeof h?u+=h.length:(l=h.regex,h=h.parser,c=t.substr(u),l=l.exec(c)[0],h.call(a,l),t=t.replace(l,""))}return void 0!==(o=(r=a).afternoon)&&(i=r.hours,o?i<12&&(r.hours+=12):12===i&&(r.hours=0),delete r.afternoon),a}}()(e),o=i.year,a=i.month,s=i.day,c=i.hours,l=i.minutes,h=i.seconds,f=i.milliseconds,d=i.zone,p=new Date,m=s||(o||a?1:p.getDate()),g=o||p.getFullYear(),A=0,v=(o&&!a||(A=0<a?a-1:p.getMonth()),c||0),b=l||0,y=h||0,w=f||0;return d?new Date(Date.UTC(g,A,m,v,b,y,w+60*d.offset*1e3)):n?new Date(Date.UTC(g,A,m,v,b,y,w)):new Date(g,A,m,v,b,y,w)}catch(e){return new Date("")}}(t,c,a),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),f&&t!==this.format(c)&&(this.$d=new Date(""))}else if(c instanceof Array)for(var p=c.length,m=1;m<=p;m+=1){s[1]=c[m-1];var g=i.apply(this,s);if(g.isValid()){this.$d=g.$d,this.$L=g.$L,this.init();break}m===p&&(this.$d=new Date(""))}else o.call(this,e)}}},"object"==(void 0===n?"undefined":r(n))&&void 0!==t?t.exports=i():(void 0).dayjs_plugin_customParseFormat=i()},{}],338:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=function(){return function(e,t,n){var r=(new Date).getTimezoneOffset(),i=t.prototype,o=(n.utc=function(e){return new t({date:e,utc:!0,args:arguments})},i.utc=function(){return n(this.toDate(),{locale:this.$L,utc:!0})},i.local=function(){return n(this.toDate(),{locale:this.$L,utc:!1})},i.parse),a=(i.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),o.call(this,e)},i.init),s=(i.init=function(){var e;this.$u?(e=this.$d,this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()):a.call(this)},i.utcOffset),u=(i.utcOffset=function(e,t){var n,i=this.$utils().u;return i(e)?this.$u?0:i(this.$offset)?s.call(this):this.$offset:(i=Math.abs(e)<=16?60*e:e,n=this,t?(n.$offset=i,n.$u=0===e):0!==e?(n=this.local().add(i+r,"minute")).$offset=i:n=this.utc(),n)},i.format),c=(i.format=function(e){return e=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":""),u.call(this,e)},i.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+r;return this.$d.valueOf()-6e4*e},i.isUTC=function(){return!!this.$u},i.toISOString=function(){return this.toDate().toISOString()},i.toString=function(){return this.toDate().toUTCString()},i.toDate),l=(i.toDate=function(e){return"s"===e&&this.$offset?n(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():c.call(this)},i.diff);i.diff=function(e,t,r){var i=this.local();e=n(e).local();return l.call(i,e,t,r)}}};"object"==(void 0===n?"undefined":r(n))&&void 0!==t?t.exports=i():(void 0).dayjs_plugin_utc=i()},{}],339:[function(e,t,n){"use strict";n.utils=e("./des/utils"),n.Cipher=e("./des/cipher"),n.DES=e("./des/des"),n.CBC=e("./des/cbc"),n.EDE=e("./des/ede")},{"./des/cbc":340,"./des/cipher":341,"./des/des":342,"./des/ede":343,"./des/utils":344}],340:[function(e,t,n){"use strict";var r=e("minimalistic-assert"),i=e("inherits"),o={};function a(e){r.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var t=0;t<this.iv.length;t++)this.iv[t]=e[t]}n.instantiate=function(e){function t(t){e.call(this,t),this._cbcInit()}i(t,e);for(var n=Object.keys(o),r=0;r<n.length;r++){var a=n[r];t.prototype[a]=o[a]}return t.create=function(e){return new t(e)},t},o._cbcInit=function(){var e=new a(this.options.iv);this._cbcState=e},o._update=function(e,t,n,r){var i=this._cbcState,o=this.constructor.super_.prototype,a=i.iv;if("encrypt"===this.type){for(var s=0;s<this.blockSize;s++)a[s]^=e[t+s];for(o._update.call(this,a,0,n,r),s=0;s<this.blockSize;s++)a[s]=n[r+s]}else{for(o._update.call(this,e,t,n,r),s=0;s<this.blockSize;s++)n[r+s]^=a[s];for(s=0;s<this.blockSize;s++)a[s]=e[t+s]}}},{inherits:387,"minimalistic-assert":437}],341:[function(e,t,n){"use strict";var r=e("minimalistic-assert");function i(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}(t.exports=i).prototype._init=function(){},i.prototype.update=function(e){return 0===e.length?[]:"decrypt"===this.type?this._updateDecrypt(e):this._updateEncrypt(e)},i.prototype._buffer=function(e,t){for(var n=Math.min(this.buffer.length-this.bufferOff,e.length-t),r=0;r<n;r++)this.buffer[this.bufferOff+r]=e[t+r];return this.bufferOff+=n,n},i.prototype._flushBuffer=function(e,t){return this._update(this.buffer,0,e,t),this.bufferOff=0,this.blockSize},i.prototype._updateEncrypt=function(e){var t=0,n=0,r=(this.bufferOff+e.length)/this.blockSize|0,i=new Array(r*this.blockSize);0!==this.bufferOff&&(t+=this._buffer(e,t),this.bufferOff===this.buffer.length&&(n+=this._flushBuffer(i,n)));for(var o=e.length-(e.length-t)%this.blockSize;t<o;t+=this.blockSize)this._update(e,t,i,n),n+=this.blockSize;for(;t<e.length;t++,this.bufferOff++)this.buffer[this.bufferOff]=e[t];return i},i.prototype._updateDecrypt=function(e){for(var t=0,n=0,r=Math.ceil((this.bufferOff+e.length)/this.blockSize)-1,i=new Array(r*this.blockSize);0<r;r--)t+=this._buffer(e,t),n+=this._flushBuffer(i,n);return t+=this._buffer(e,t),i},i.prototype.final=function(e){var t;return e&&(t=this.update(e)),e="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(e):e},i.prototype._pad=function(e,t){if(0===t)return!1;for(;t<e.length;)e[t++]=0;return!0},i.prototype._finalEncrypt=function(){var e;return this._pad(this.buffer,this.bufferOff)?(e=new Array(this.blockSize),this._update(this.buffer,0,e,0),e):[]},i.prototype._unpad=function(e){return e},i.prototype._finalDecrypt=function(){r.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var e=new Array(this.blockSize);return this._flushBuffer(e,0),this._unpad(e)}},{"minimalistic-assert":437}],342:[function(e,t,n){"use strict";var r=e("minimalistic-assert"),i=e("inherits"),o=e("./utils"),a=e("./cipher");function s(){this.tmp=new Array(2),this.keys=null}function u(e){a.call(this,e);var t=new s;this._desState=t,this.deriveKeys(t,e.key)}i(u,a),(t.exports=u).create=function(e){return new u(e)};var c=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];u.prototype.deriveKeys=function(e,t){e.keys=new Array(32),r.equal(t.length,this.blockSize,"Invalid key length");var n=o.readUInt32BE(t,0),i=o.readUInt32BE(t,4);o.pc1(n,i,e.tmp,0),n=e.tmp[0],i=e.tmp[1];for(var a=0;a<e.keys.length;a+=2){var s=c[a>>>1];n=o.r28shl(n,s),i=o.r28shl(i,s);o.pc2(n,i,e.keys,a)}},u.prototype._update=function(e,t,n,r){var i=this._desState,a=o.readUInt32BE(e,t);e=o.readUInt32BE(e,t+4);o.ip(a,e,i.tmp,0),a=i.tmp[0],e=i.tmp[1],"encrypt"===this.type?this._encrypt(i,a,e,i.tmp,0):this._decrypt(i,a,e,i.tmp,0),a=i.tmp[0],e=i.tmp[1],o.writeUInt32BE(n,a,r),o.writeUInt32BE(n,e,r+4)},u.prototype._pad=function(e,t){for(var n=e.length-t,r=t;r<e.length;r++)e[r]=n;return!0},u.prototype._unpad=function(e){for(var t=e[e.length-1],n=e.length-t;n<e.length;n++)r.equal(e[n],t);return e.slice(0,e.length-t)},u.prototype._encrypt=function(e,t,n,r,i){for(var a=t,s=n,u=0;u<e.keys.length;u+=2){var c=e.keys[u],l=e.keys[u+1];c=(o.expand(s,e.tmp,0),c^=e.tmp[0],l^=e.tmp[1],o.substitute(c,l)),l=s,s=(a^o.permute(c))>>>0,a=l}o.rip(s,a,r,i)},u.prototype._decrypt=function(e,t,n,r,i){for(var a=n,s=t,u=e.keys.length-2;0<=u;u-=2){var c=e.keys[u],l=e.keys[u+1];c=(o.expand(a,e.tmp,0),c^=e.tmp[0],l^=e.tmp[1],o.substitute(c,l)),l=a,a=(s^o.permute(c))>>>0,s=l}o.rip(a,s,r,i)}},{"./cipher":341,"./utils":344,inherits:387,"minimalistic-assert":437}],343:[function(e,t,n){"use strict";var r=e("minimalistic-assert"),i=e("inherits"),o=e("./cipher"),a=e("./des");function s(e,t){r.equal(t.length,24,"Invalid key length");var n=t.slice(0,8),i=t.slice(8,16);t=t.slice(16,24);this.ciphers="encrypt"===e?[a.create({type:"encrypt",key:n}),a.create({type:"decrypt",key:i}),a.create({type:"encrypt",key:t})]:[a.create({type:"decrypt",key:t}),a.create({type:"encrypt",key:i}),a.create({type:"decrypt",key:n})]}function u(e){o.call(this,e),e=new s(this.type,this.options.key),this._edeState=e}i(u,o),(t.exports=u).create=function(e){return new u(e)},u.prototype._update=function(e,t,n,r){var i=this._edeState;i.ciphers[0]._update(e,t,n,r),i.ciphers[1]._update(n,r,n,r),i.ciphers[2]._update(n,r,n,r)},u.prototype._pad=a.prototype._pad,u.prototype._unpad=a.prototype._unpad},{"./cipher":341,"./des":342,inherits:387,"minimalistic-assert":437}],344:[function(e,t,n){"use strict";n.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},n.writeUInt32BE=function(e,t,n){e[0+n]=t>>>24,e[1+n]=t>>>16&255,e[2+n]=t>>>8&255,e[3+n]=255&t},n.ip=function(e,t,n,r){for(var i=0,o=0,a=6;0<=a;a-=2){for(var s=0;s<=24;s+=8)i=i<<1|t>>>s+a&1;for(s=0;s<=24;s+=8)i=i<<1|e>>>s+a&1}for(a=6;0<=a;a-=2){for(s=1;s<=25;s+=8)o=o<<1|t>>>s+a&1;for(s=1;s<=25;s+=8)o=o<<1|e>>>s+a&1}n[r+0]=i>>>0,n[r+1]=o>>>0},n.rip=function(e,t,n,r){for(var i=0,o=0,a=0;a<4;a++)for(var s=24;0<=s;s-=8)i=(i=i<<1|t>>>s+a&1)<<1|e>>>s+a&1;for(a=4;a<8;a++)for(s=24;0<=s;s-=8)o=(o=o<<1|t>>>s+a&1)<<1|e>>>s+a&1;n[r+0]=i>>>0,n[r+1]=o>>>0},n.pc1=function(e,t,n,r){for(var i=0,o=0,a=7;5<=a;a--){for(var s=0;s<=24;s+=8)i=i<<1|t>>s+a&1;for(s=0;s<=24;s+=8)i=i<<1|e>>s+a&1}for(s=0;s<=24;s+=8)i=i<<1|t>>s+a&1;for(a=1;a<=3;a++){for(s=0;s<=24;s+=8)o=o<<1|t>>s+a&1;for(s=0;s<=24;s+=8)o=o<<1|e>>s+a&1}for(s=0;s<=24;s+=8)o=o<<1|e>>s+a&1;n[r+0]=i>>>0,n[r+1]=o>>>0},n.r28shl=function(e,t){return e<<t&268435455|e>>>28-t};var r=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24],i=(n.pc2=function(e,t,n,i){for(var o=0,a=0,s=r.length>>>1,u=0;u<s;u++)o=o<<1|e>>>r[u]&1;for(u=s;u<r.length;u++)a=a<<1|t>>>r[u]&1;n[i+0]=o>>>0,n[i+1]=a>>>0},n.expand=function(e,t,n){for(var r=0,i=0,o=(r=(1&e)<<5|e>>>27,23);15<=o;o-=4)r=r<<6|e>>>o&63;for(o=11;3<=o;o-=4)i=(i|e>>>o&63)<<6;i|=(31&e)<<1|e>>>31,t[n+0]=r>>>0,t[n+1]=i>>>0},[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11]),o=(n.substitute=function(e,t){for(var n=0,r=0;r<4;r++)n=n<<4|i[64*r+(e>>>18-6*r&63)];for(r=0;r<4;r++)n=n<<4|i[256+64*r+(t>>>18-6*r&63)];return n>>>0},[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7]);n.permute=function(e){for(var t=0,n=0;n<o.length;n++)t=t<<1|e>>>o[n]&1;return t>>>0},n.padSplit=function(e,t,n){for(var r=e.toString(2);r.length<t;)r="0"+r;for(var i=[],o=0;o<t;o+=n)i.push(r.slice(o,o+n));return i.join(" ")}},{}],345:[function(e,t,n){(function(t){"use strict";var r=e("./lib/generatePrime"),i=e("./lib/primes.json"),o=e("./lib/dh"),a={binary:!0,hex:!0,base64:!0};n.DiffieHellmanGroup=n.createDiffieHellmanGroup=n.getDiffieHellman=function(e){var n=new t(i[e].prime,"hex");e=new t(i[e].gen,"hex");return new o(n,e)},n.createDiffieHellman=n.DiffieHellman=function e(n,i,s,u){return t.isBuffer(i)||void 0===a[i]?e(n,"binary",i,s):(i=i||"binary",u=u||"binary",s=s||new t([2]),t.isBuffer(s)||(s=new t(s,u)),"number"==typeof n?new o(r(n,s),s,!0):(t.isBuffer(n)||(n=new t(n,i)),new o(n,s,!0)))}}).call(this,e("buffer").Buffer)},{"./lib/dh":346,"./lib/generatePrime":347,"./lib/primes.json":348,buffer:216}],346:[function(e,t,n){(function(n){"use strict";var r=e("bn.js"),i=new(e("miller-rabin")),o=new r(24),a=new r(11),s=new r(10),u=new r(3),c=new r(7),l=e("./generatePrime"),h=e("randombytes");function f(e,t){return t=t||"utf8",n.isBuffer(e)||(e=new n(e,t)),this._pub=new r(e),this}function d(e,t){return t=t||"utf8",n.isBuffer(e)||(e=new n(e,t)),this._priv=new r(e),this}t.exports=m;var p={};function m(e,t,n){this.setGenerator(t),this.__prime=new r(e),this._prime=r.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,n?(this.setPublicKey=f,this.setPrivateKey=d):this._primeCode=8}function g(e,t){return e=new n(e.toArray()),t?e.toString(t):e}Object.defineProperty(m.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(e,t){var n=[t=t.toString("hex"),e.toString(16)].join("_");if(n in p)return p[n];var r,h=0;if(!e.isEven()&&l.simpleSieve&&l.fermatTest(e)&&i.test(e)){switch(i.test(e.shrn(1))||(h+=2),t){case"02":e.mod(o).cmp(a)&&(h+=8);break;case"05":(r=e.mod(s)).cmp(u)&&r.cmp(c)&&(h+=8);break;default:h+=4}p[n]=h}else p[n]=h=h+1+("02"===t||"05"===t?8:4);return h}(this.__prime,this.__gen)),this._primeCode}}),m.prototype.generateKeys=function(){return this._priv||(this._priv=new r(h(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},m.prototype.computeSecret=function(e){e=(e=(e=new r(e)).toRed(this._prime)).redPow(this._priv).fromRed(),e=new n(e.toArray());var t=this.getPrime();return e.length<t.length&&((t=new n(t.length-e.length)).fill(0),e=n.concat([t,e])),e},m.prototype.getPublicKey=function(e){return g(this._pub,e)},m.prototype.getPrivateKey=function(e){return g(this._priv,e)},m.prototype.getPrime=function(e){return g(this.__prime,e)},m.prototype.getGenerator=function(e){return g(this._gen,e)},m.prototype.setGenerator=function(e,t){return t=t||"utf8",n.isBuffer(e)||(e=new n(e,t)),this.__gen=e,this._gen=new r(e),this}}).call(this,e("buffer").Buffer)},{"./generatePrime":347,"bn.js":349,buffer:216,"miller-rabin":435,randombytes:475}],347:[function(e,t,n){"use strict";var r=e("randombytes"),i=((t.exports=A).simpleSieve=m,A.fermatTest=g,e("bn.js")),o=new i(24),a=new(e("miller-rabin")),s=new i(1),u=new i(2),c=new i(5),l=(new i(16),new i(8),new i(10)),h=new i(3),f=(new i(7),new i(11)),d=new i(4),p=(new i(12),null);function m(e){for(var t=function(){if(null!==p)return p;var e=[];e[0]=2;for(var t=1,n=3;n<1048576;n+=2){for(var r=Math.ceil(Math.sqrt(n)),i=0;i<t&&e[i]<=r&&n%e[i]!=0;i++);t!==i&&e[i]<=r||(e[t++]=n)}return p=e}(),n=0;n<t.length;n++)if(0===e.modn(t[n]))return 0===e.cmpn(t[n]);return!0}function g(e){var t=i.mont(e);return 0===u.toRed(t).redPow(e.subn(1)).fromRed().cmpn(1)}function A(e,t){if(e<16)return new i(2===t||5===t?[140,123]:[140,39]);var n,p;for(t=new i(t);;){for(n=new i(r(Math.ceil(e/8)));n.bitLength()>e;)n.ishrn(1);if(n.isEven()&&n.iadd(s),n.testn(1)||n.iadd(u),t.cmp(u)){if(!t.cmp(c))for(;n.mod(l).cmp(h);)n.iadd(d)}else for(;n.mod(o).cmp(f);)n.iadd(d);if(m(p=n.shrn(1))&&m(n)&&g(p)&&g(n)&&a.test(p)&&a.test(n))return n}}},{"bn.js":349,"miller-rabin":435,randombytes:475}],348:[function(e,t,n){t.exports={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}},{}],349:[function(e,t,n){arguments[4][181][0].apply(n,arguments)},{buffer:185,dup:181}],350:[function(e,t,n){"use strict";n.version=e("../package.json").version,n.utils=e("./elliptic/utils"),n.rand=e("brorand"),n.curve=e("./elliptic/curve"),n.curves=e("./elliptic/curves"),n.ec=e("./elliptic/ec"),n.eddsa=e("./elliptic/eddsa")},{"../package.json":366,"./elliptic/curve":353,"./elliptic/curves":356,"./elliptic/ec":357,"./elliptic/eddsa":360,"./elliptic/utils":364,brorand:184}],351:[function(e,t,n){"use strict";var r=e("bn.js"),i=e("../utils"),o=i.getNAF,a=i.getJSF,s=i.assert;function u(e,t){this.type=e,this.p=new r(t.p,16),this.red=t.prime?r.red(t.prime):r.mont(this.p),this.zero=new r(0).toRed(this.red),this.one=new r(1).toRed(this.red),this.two=new r(2).toRed(this.red),this.n=t.n&&new r(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0,!(e=this.n&&this.p.div(this.n))||0<e.cmpn(100)?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function c(e,t){this.curve=e,this.type=t,this.precomputed=null}(t.exports=u).prototype.point=function(){throw new Error("Not implemented")},u.prototype.validate=function(){throw new Error("Not implemented")},u.prototype._fixedNafMul=function(e,t){s(e.precomputed);var n=e._getDoubles(),r=o(t,1,this._bitLength);e=(1<<n.step+1)-(n.step%2==0?2:1);e/=3;for(var i=[],a=0;a<r.length;a+=n.step){var u=0;for(t=a+n.step-1;a<=t;t--)u=(u<<1)+r[t];i.push(u)}for(var c=this.jpoint(null,null,null),l=this.jpoint(null,null,null),h=e;0<h;h--){for(a=0;a<i.length;a++)(u=i[a])===h?l=l.mixedAdd(n.points[a]):u===-h&&(l=l.mixedAdd(n.points[a].neg()));c=c.add(l)}return c.toP()},u.prototype._wnafMul=function(e,t){for(var n=e._getNAFPoints(4),r=n.wnd,i=n.points,a=o(t,r,this._bitLength),u=this.jpoint(null,null,null),c=a.length-1;0<=c;c--){for(t=0;0<=c&&0===a[c];c--)t++;if(0<=c&&t++,u=u.dblp(t),c<0)break;var l=a[c];s(0!==l),u="affine"===e.type?0<l?u.mixedAdd(i[l-1>>1]):u.mixedAdd(i[-l-1>>1].neg()):0<l?u.add(i[l-1>>1]):u.add(i[-l-1>>1].neg())}return"affine"===e.type?u.toP():u},u.prototype._wnafMulAdd=function(e,t,n,r,i){for(var s=this._wnafT1,u=this._wnafT2,c=this._wnafT3,l=0,h=0;h<r;h++){var f=(E=t[h])._getNAFPoints(e);s[h]=f.wnd,u[h]=f.points}for(h=r-1;1<=h;h-=2){var d=h-1,p=h;if(1===s[d]&&1===s[p]){var m=[t[d],null,null,t[p]],g=(0===t[d].y.cmp(t[p].y)?(m[1]=t[d].add(t[p]),m[2]=t[d].toJ().mixedAdd(t[p].neg())):0===t[d].y.cmp(t[p].y.redNeg())?(m[1]=t[d].toJ().mixedAdd(t[p]),m[2]=t[d].add(t[p].neg())):(m[1]=t[d].toJ().mixedAdd(t[p]),m[2]=t[d].toJ().mixedAdd(t[p].neg())),[-3,-1,-5,-7,0,7,5,1,3]),A=a(n[d],n[p]);l=Math.max(A[0].length,l);c[d]=new Array(l),c[p]=new Array(l);for(var v=0;v<l;v++){var b=0|A[0][v],y=0|A[1][v];c[d][v]=g[3*(1+b)+(1+y)],c[p][v]=0,u[d]=m}}else c[d]=o(n[d],s[d],this._bitLength),c[p]=o(n[p],s[p],this._bitLength),l=Math.max(c[d].length,l),l=Math.max(c[p].length,l)}var w=this.jpoint(null,null,null),x=this._wnafT4;for(h=l;0<=h;h--){for(var C=0;0<=h;){var k=!0;for(v=0;v<r;v++)x[v]=0|c[v][h],0!==x[v]&&(k=!1);if(!k)break;C++,h--}if(0<=h&&C++,w=w.dblp(C),h<0)break;for(v=0;v<r;v++){var E,S=x[v];0!==S&&(0<S?E=u[v][S-1>>1]:S<0&&(E=u[v][-S-1>>1].neg()),w="affine"===E.type?w.mixedAdd(E):w.add(E))}}for(h=0;h<r;h++)u[h]=null;return i?w:w.toP()},(u.BasePoint=c).prototype.eq=function(){throw new Error("Not implemented")},c.prototype.validate=function(){return this.curve.validate(this)},u.prototype.decodePoint=function(e,t){if(e=i.toArray(e,t),t=this.p.byteLength(),(4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*t)return 6===e[0]?s(e[e.length-1]%2==0):7===e[0]&&s(e[e.length-1]%2==1),this.point(e.slice(1,1+t),e.slice(1+t,1+2*t));if(2!==e[0]&&3!==e[0]||e.length-1!==t)throw new Error("Unknown point format");return this.pointFromX(e.slice(1,1+t),3===e[0])},c.prototype.encodeCompressed=function(e){return this.encode(e,!0)},c.prototype._encode=function(e){var t=this.curve.p.byteLength(),n=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(n):[4].concat(n,this.getY().toArray("be",t))},c.prototype.encode=function(e,t){return i.encode(this._encode(t),e)},c.prototype.precompute=function(e){var t;return this.precomputed||((t={doubles:null,naf:null,beta:null}).naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t),this},c.prototype._hasDoubles=function(e){var t;return!!this.precomputed&&!!(t=this.precomputed.doubles)&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},c.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],r=this,i=0;i<t;i+=e){for(var o=0;o<e;o++)r=r.dbl();n.push(r)}return{step:e,points:n}},c.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],n=(1<<e)-1,r=1==n?null:this.dbl(),i=1;i<n;i++)t[i]=t[i-1].add(r);return{wnd:e,points:t}},c.prototype._getBeta=function(){return null},c.prototype.dblp=function(e){for(var t=this,n=0;n<e;n++)t=t.dbl();return t}},{"../utils":364,"bn.js":365}],352:[function(e,t,n){"use strict";var r=e("../utils"),i=e("bn.js"),o=e("inherits"),a=e("./base"),s=r.assert;function u(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,a.call(this,"edwards",e),this.a=new i(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new i(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new i(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),s(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function c(e,t,n,r,o){a.BasePoint.call(this,e,"projective"),null===t&&null===n&&null===r?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new i(t,16),this.y=new i(n,16),this.z=r?new i(r,16):this.curve.one,this.t=o&&new i(o,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}o(u,a),(t.exports=u).prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},u.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},u.prototype.jpoint=function(e,t,n,r){return this.point(e,t,n,r)},u.prototype.pointFromX=function(e,t){var n=(e=(e=new i(e,16)).red?e:e.toRed(this.red)).redSqr(),r=this.c2.redSub(this.a.redMul(n));n=this.one.redSub(this.c2.redMul(this.d).redMul(n)),r=r.redMul(n.redInvm());if(0!==(n=r.redSqrt()).redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");return r=n.fromRed().isOdd(),(t&&!r||!t&&r)&&(n=n.redNeg()),this.point(e,n)},u.prototype.pointFromY=function(e,t){var n=(r=(e=(e=new i(e,16)).red?e:e.toRed(this.red)).redSqr()).redSub(this.c2),r=r.redMul(this.d).redMul(this.c2).redSub(this.a);if(0===(n=n.redMul(r.redInvm())).cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}if(0!==(r=n.redSqrt()).redSqr().redSub(n).cmp(this.zero))throw new Error("invalid point");return r.fromRed().isOdd()!==t&&(r=r.redNeg()),this.point(r,e)},u.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),n=(e=e.y.redSqr(),t.redMul(this.a).redAdd(e));t=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(e)));return 0===n.cmp(t)},o(c,a.BasePoint),u.prototype.pointFromJSON=function(e){return c.fromJSON(this,e)},u.prototype.point=function(e,t,n,r){return new c(this,e,t,n,r)},c.fromJSON=function(e,t){return new c(e,t[0],t[1],t[2])},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},c.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),n=(n=this.z.redSqr()).redIAdd(n),r=this.curve._mulA(e),i=(e=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),r.redAdd(t)),o=(n=i.redSub(n),r=r.redSub(t),t=e.redMul(n),i.redMul(r));e=e.redMul(r),r=n.redMul(i);return this.curve.point(t,o,r,e)},c.prototype._projDbl=function(){var e,t,n,r,i,o,a=this.x.redAdd(this.y).redSqr(),s=this.x.redSqr(),u=this.y.redSqr();return n=this.curve.twisted?(n=(r=this.curve._mulA(s)).redAdd(u),this.zOne?(e=a.redSub(s).redSub(u).redMul(n.redSub(this.curve.two)),t=n.redMul(r.redSub(u)),n.redSqr().redSub(n).redSub(n)):(i=this.z.redSqr(),o=n.redSub(i).redISub(i),e=a.redSub(s).redISub(u).redMul(o),t=n.redMul(r.redSub(u)),n.redMul(o))):(r=s.redAdd(u),i=this.curve._mulC(this.z).redSqr(),o=r.redSub(i).redSub(i),e=this.curve._mulC(a.redISub(r)).redMul(o),t=this.curve._mulC(r).redMul(s.redISub(u)),r.redMul(o)),this.curve.point(e,t,n)},c.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},c.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),n=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),r=this.t.redMul(this.curve.dd).redMul(e.t),i=(e=this.z.redMul(e.z.redAdd(e.z)),n.redSub(t)),o=e.redSub(r);e=e.redAdd(r),r=n.redAdd(t),n=i.redMul(o),t=e.redMul(r),i=i.redMul(r),r=o.redMul(e);return this.curve.point(n,t,r,i)},c.prototype._projAdd=function(e){var t,n=this.z.redMul(e.z),r=n.redSqr(),i=this.x.redMul(e.x),o=this.y.redMul(e.y),a=this.curve.d.redMul(i).redMul(o),s=r.redSub(a);r=r.redAdd(a),a=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(i).redISub(o),e=n.redMul(s).redMul(a),a=(this.curve.twisted?(t=n.redMul(r).redMul(o.redSub(this.curve._mulA(i))),s):(t=n.redMul(r).redMul(o.redSub(i)),this.curve._mulC(s))).redMul(r);return this.curve.point(e,t,a)},c.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},c.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,n){return this.curve._wnafMulAdd(1,[this,t],[e,n],2,!1)},c.prototype.jmulAdd=function(e,t,n){return this.curve._wnafMulAdd(1,[this,t],[e,n],2,!0)},c.prototype.normalize=function(){var e;return this.zOne||(e=this.z.redInvm(),this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0),this},c.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()},c.prototype.getY=function(){return this.normalize(),this.y.fromRed()},c.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},c.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var n=e.clone(),r=this.curve.redN.redMul(this.z);;){if(n.iadd(this.curve.n),0<=n.cmp(this.curve.p))return!1;if(t.redIAdd(r),0===this.x.cmp(t))return!0}},c.prototype.toP=c.prototype.normalize,c.prototype.mixedAdd=c.prototype.add},{"../utils":364,"./base":351,"bn.js":365,inherits:387}],353:[function(e,t,n){"use strict";n.base=e("./base"),n.short=e("./short"),n.mont=e("./mont"),n.edwards=e("./edwards")},{"./base":351,"./edwards":352,"./mont":354,"./short":355}],354:[function(e,t,n){"use strict";var r=e("bn.js"),i=e("inherits"),o=e("./base"),a=e("../utils");function s(e){o.call(this,"mont",e),this.a=new r(e.a,16).toRed(this.red),this.b=new r(e.b,16).toRed(this.red),this.i4=new r(4).toRed(this.red).redInvm(),this.two=new r(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function u(e,t,n){o.BasePoint.call(this,e,"projective"),null===t&&null===n?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new r(t,16),this.z=new r(n,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(s,o),(t.exports=s).prototype.validate=function(e){var t;return 0===(t=(t=(e=e.normalize().x).redSqr()).redMul(e).redAdd(t.redMul(this.a)).redAdd(e)).redSqrt().redSqr().cmp(t)},i(u,o.BasePoint),s.prototype.decodePoint=function(e,t){return this.point(a.toArray(e,t),1)},s.prototype.point=function(e,t){return new u(this,e,t)},s.prototype.pointFromJSON=function(e){return u.fromJSON(this,e)},u.prototype.precompute=function(){},u.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},u.fromJSON=function(e,t){return new u(e,t[0],t[1]||e.one)},u.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},u.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),n=e.redSub(t);e=e.redMul(t),t=n.redMul(t.redAdd(this.curve.a24.redMul(n)));return this.curve.point(e,t)},u.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.diffAdd=function(e,t){var n=this.x.redAdd(this.z),r=this.x.redSub(this.z),i=e.x.redAdd(e.z);e=e.x.redSub(e.z).redMul(n),n=i.redMul(r),i=t.z.redMul(e.redAdd(n).redSqr()),r=t.x.redMul(e.redISub(n).redSqr());return this.curve.point(i,r)},u.prototype.mul=function(e){for(var t=e.clone(),n=this,r=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var o=i.length-1;0<=o;o--)0===i[o]?(n=n.diffAdd(r,this),r=r.dbl()):(r=n.diffAdd(r,this),n=n.dbl());return r},u.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},u.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},{"../utils":364,"./base":351,"bn.js":365,inherits:387}],355:[function(e,t,n){"use strict";var r=e("../utils"),i=e("bn.js"),o=e("inherits"),a=e("./base"),s=r.assert;function u(e){a.call(this,"short",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function c(e,t,n,r){a.BasePoint.call(this,e,"affine"),null===t&&null===n?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(t,16),this.y=new i(n,16),r&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function l(e,t,n,r){a.BasePoint.call(this,e,"jacobian"),null===t&&null===n&&null===r?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(t,16),this.y=new i(n,16),this.z=new i(r,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(u,a),(t.exports=u).prototype._getEndomorphism=function(e){var t,n,r;if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3))return n=(e.beta?new i(e.beta,16):n=(n=this._getEndoRoots(this.p))[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red),e.lambda?t=new i(e.lambda,16):(r=this._getEndoRoots(this.n),0===this.g.mul(r[0]).x.cmp(this.g.x.redMul(n))?t=r[0]:(t=r[1],s(0===this.g.mul(t).x.cmp(this.g.x.redMul(n))))),{beta:n,lambda:t,basis:e.basis?e.basis.map((function(e){return{a:new i(e.a,16),b:new i(e.b,16)}})):this._getEndoBasis(t)}},u.prototype._getEndoRoots=function(e){e=e===this.p?this.red:i.mont(e);var t=new i(2).toRed(e).redInvm(),n=t.redNeg();e=new i(3).toRed(e).redNeg().redSqrt().redMul(t);return[n.redAdd(e).fromRed(),n.redSub(e).fromRed()]},u.prototype._getEndoBasis=function(e){for(var t,n,r,o,a,s=this.n.ushrn(Math.floor(this.n.bitLength()/2)),u=e,c=this.n.clone(),l=new i(1),h=new i(0),f=new i(0),d=new i(1),p=0;0!==u.cmpn(0);){var m=c.div(u),g=c.sub(m.mul(u)),A=f.sub(m.mul(l));m=d.sub(m.mul(h));if(!r&&g.cmp(s)<0)t=a.neg(),n=l,r=g.neg(),o=A;else if(r&&2==++p)break;c=u,u=a=g,f=l,l=A,d=h,h=m}e=g.neg();var v=A,b=r.sqr().add(o.sqr());return 0<=e.sqr().add(v.sqr()).cmp(b)&&(e=t,v=n),r.negative&&(r=r.neg(),o=o.neg()),e.negative&&(e=e.neg(),v=v.neg()),[{a:r,b:o},{a:e,b:v}]},u.prototype._endoSplit=function(e){var t,n=(t=this.endo.basis)[0],r=(t=t[1]).b.mul(e).divRound(this.n),i=n.b.neg().mul(e).divRound(this.n),o=r.mul(n.a),a=i.mul(t.a);r=r.mul(n.b),n=i.mul(t.b);return{k1:e.sub(o).sub(a),k2:r.add(n).neg()}},u.prototype.pointFromX=function(e,t){var n=(e=(e=new i(e,16)).red?e:e.toRed(this.red)).redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),r=n.redSqrt();if(0!==r.redSqr().redSub(n).cmp(this.zero))throw new Error("invalid point");return n=r.fromRed().isOdd(),(t&&!n||!t&&n)&&(r=r.redNeg()),this.point(e,r)},u.prototype.validate=function(e){var t,n;return!!e.inf||(n=e.x,e=e.y,t=this.a.redMul(n),n=n.redSqr().redMul(n).redIAdd(t).redIAdd(this.b),0===e.redSqr().redISub(n).cmpn(0))},u.prototype._endoWnafMulAdd=function(e,t,n){for(var r=this._endoWnafT1,i=this._endoWnafT2,o=0;o<e.length;o++){var a=this._endoSplit(t[o]),s=e[o],u=s._getBeta();a.k1.negative&&(a.k1.ineg(),s=s.neg(!0)),a.k2.negative&&(a.k2.ineg(),u=u.neg(!0)),r[2*o]=s,r[2*o+1]=u,i[2*o]=a.k1,i[2*o+1]=a.k2}n=this._wnafMulAdd(1,r,i,2*o,n);for(var c=0;c<2*o;c++)r[c]=null,i[c]=null;return n},o(c,a.BasePoint),u.prototype.point=function(e,t,n){return new c(this,e,t,n)},u.prototype.pointFromJSON=function(e,t){return c.fromJSON(this,e,t)},c.prototype._getBeta=function(){var e,t,n,r;if(this.curve.endo)return(e=this.precomputed)&&e.beta?e.beta:(t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y),e&&(n=this.curve,r=function(e){return n.point(e.x.redMul(n.endo.beta),e.y)},(e.beta=t).precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(r)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(r)}}),t)},c.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},c.fromJSON=function(e,t,n){"string"==typeof t&&(t=JSON.parse(t));var r=e.point(t[0],t[1],n);return t[2]&&(t=t[2],r.precomputed={beta:null,doubles:t.doubles&&{step:t.doubles.step,points:[r].concat(t.doubles.points.map(i))},naf:t.naf&&{wnd:t.naf.wnd,points:[r].concat(t.naf.points.map(i))}}),r;function i(t){return e.point(t[0],t[1],n)}},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function(){return this.inf},c.prototype.add=function(e){var t;return this.inf?e:e.inf?this:this.eq(e)?this.dbl():this.neg().eq(e)||0===this.x.cmp(e.x)?this.curve.point(null,null):(e=(t=0!==(t=this.y.redSub(e.y)).cmpn(0)?t.redMul(this.x.redSub(e.x).redInvm()):t).redSqr().redISub(this.x).redISub(e.x),t=t.redMul(this.x.redSub(e)).redISub(this.y),this.curve.point(e,t))},c.prototype.dbl=function(){var e,t,n;return this.inf?this:0===(n=this.y.redAdd(this.y)).cmpn(0)?this.curve.point(null,null):(t=this.curve.a,e=this.x.redSqr(),n=n.redInvm(),t=(e=e.redAdd(e).redIAdd(e).redIAdd(t).redMul(n)).redSqr().redISub(this.x.redAdd(this.x)),n=e.redMul(this.x.redSub(t)).redISub(this.y),this.curve.point(t,n))},c.prototype.getX=function(){return this.x.fromRed()},c.prototype.getY=function(){return this.y.fromRed()},c.prototype.mul=function(e){return e=new i(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,n){return t=[this,t],e=[e,n],this.curve.endo?this.curve._endoWnafMulAdd(t,e):this.curve._wnafMulAdd(1,t,e,2)},c.prototype.jmulAdd=function(e,t,n){return t=[this,t],e=[e,n],this.curve.endo?this.curve._endoWnafMulAdd(t,e,!0):this.curve._wnafMulAdd(1,t,e,2,!0)},c.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},c.prototype.neg=function(e){var t,n;return this.inf?this:(t=this.curve.point(this.x,this.y.redNeg()),e&&this.precomputed&&(e=this.precomputed,n=function(e){return e.neg()},t.precomputed={naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(n)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(n)}}),t)},c.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(l,a.BasePoint),u.prototype.jpoint=function(e,t,n){return new l(this,e,t,n)},l.prototype.toP=function(){var e,t,n;return this.isInfinity()?this.curve.point(null,null):(n=(e=this.z.redInvm()).redSqr(),t=this.x.redMul(n),n=this.y.redMul(n).redMul(e),this.curve.point(t,n))},l.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},l.prototype.add=function(e){var t,n,r,i,o,a;return this.isInfinity()?e:e.isInfinity()?this:(t=e.z.redSqr(),o=this.z.redSqr(),a=this.x.redMul(t),n=e.x.redMul(o),t=this.y.redMul(t.redMul(e.z)),o=e.y.redMul(o.redMul(this.z)),n=a.redSub(n),o=t.redSub(o),0===n.cmpn(0)?0!==o.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl():(r=(i=n.redSqr()).redMul(n),a=a.redMul(i),i=o.redSqr().redIAdd(r).redISub(a).redISub(a),o=o.redMul(a.redISub(i)).redISub(t.redMul(r)),a=this.z.redMul(e.z).redMul(n),this.curve.jpoint(i,o,a)))},l.prototype.mixedAdd=function(e){var t,n,r,i,o;return this.isInfinity()?e.toJ():e.isInfinity()?this:(n=this.z.redSqr(),o=this.x,i=e.x.redMul(n),t=this.y,e=e.y.redMul(n).redMul(this.z),n=o.redSub(i),i=t.redSub(e),0===n.cmpn(0)?0!==i.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl():(r=(e=n.redSqr()).redMul(n),o=o.redMul(e),e=i.redSqr().redIAdd(r).redISub(o).redISub(o),i=i.redMul(o.redISub(e)).redISub(t.redMul(r)),o=this.z.redMul(n),this.curve.jpoint(e,i,o)))},l.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();if(this.curve.zeroA||this.curve.threeA){for(var t=this,n=0;n<e;n++)t=t.dbl();return t}var r=this.curve.a,i=this.curve.tinv,o=this.x,a=this.y,s=this.z,u=s.redSqr().redSqr(),c=a.redAdd(a);for(n=0;n<e;n++){var l=o.redSqr(),h=(f=c.redSqr()).redSqr(),f=(l=l.redAdd(l).redIAdd(l).redIAdd(r.redMul(u)),o.redMul(f)),d=l.redSqr().redISub(f.redAdd(f));f=f.redISub(d),l=(l=l.redMul(f)).redIAdd(l).redISub(h),f=c.redMul(s);n+1<e&&(u=u.redMul(h)),o=d,s=f,c=l}return this.curve.jpoint(o,c.redMul(i),s)},l.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},l.prototype._zeroDbl=function(){var e,t,n,r,i,o;return i=this.zOne?(e=this.x.redSqr(),n=(t=this.y.redSqr()).redSqr(),t=(t=this.x.redAdd(t).redSqr().redISub(e).redISub(n)).redIAdd(t),r=(e=e.redAdd(e).redIAdd(e)).redSqr().redISub(t).redISub(t),n=(n=(n=n.redIAdd(n)).redIAdd(n)).redIAdd(n),t=e.redMul(t.redISub(e=r)).redISub(n),this.y.redAdd(this.y)):(r=this.x.redSqr(),o=(n=this.y.redSqr()).redSqr(),n=(n=this.x.redAdd(n).redSqr().redISub(r).redISub(o)).redIAdd(n),i=(r=r.redAdd(r).redIAdd(r)).redSqr(),o=(o=(o=o.redIAdd(o)).redIAdd(o)).redIAdd(o),e=i.redISub(n).redISub(n),t=r.redMul(n.redISub(e)).redISub(o),(i=this.y.redMul(this.z)).redIAdd(i)),this.curve.jpoint(e,t,i)},l.prototype._threeDbl=function(){var e,t,n,r,i,o,a,s;return this.zOne?(t=this.x.redSqr(),i=(n=this.y.redSqr()).redSqr(),n=(n=this.x.redAdd(n).redSqr().redISub(t).redISub(i)).redIAdd(n),e=r=(t=t.redAdd(t).redIAdd(t).redIAdd(this.curve.a)).redSqr().redISub(n).redISub(n),i=(i=(i=i.redIAdd(i)).redIAdd(i)).redIAdd(i),t=t.redMul(n.redISub(r)).redISub(i),n=this.y.redAdd(this.y)):(r=this.z.redSqr(),i=this.y.redSqr(),a=this.x.redMul(i),o=(o=this.x.redSub(r).redMul(this.x.redAdd(r))).redAdd(o).redIAdd(o),s=(a=(a=a.redIAdd(a)).redIAdd(a)).redAdd(a),e=o.redSqr().redISub(s),n=this.y.redAdd(this.z).redSqr().redISub(i).redISub(r),s=(s=(s=(s=i.redSqr()).redIAdd(s)).redIAdd(s)).redIAdd(s),t=o.redMul(a.redISub(e)).redISub(s)),this.curve.jpoint(e,t,n)},l.prototype._dbl=function(){var e=this.curve.a,t=this.x,n=this.y,r=this.z,i=r.redSqr().redSqr(),o=t.redSqr(),a=n.redSqr();o=o.redAdd(o).redIAdd(o).redIAdd(e.redMul(i)),i=(e=(e=t.redAdd(t)).redIAdd(e)).redMul(a),t=o.redSqr().redISub(i.redAdd(i)),e=i.redISub(t),i=(i=(i=(i=a.redSqr()).redIAdd(i)).redIAdd(i)).redIAdd(i),a=o.redMul(e).redISub(i),o=n.redAdd(n).redMul(r);return this.curve.jpoint(t,a,o)},l.prototype.trpl=function(){var e,t,n,r,i,o,a;return this.curve.zeroA?(t=this.x.redSqr(),i=this.y.redSqr(),e=this.z.redSqr(),a=i.redSqr(),o=(r=t.redAdd(t).redIAdd(t)).redSqr(),n=(t=(t=(t=(t=this.x.redAdd(i).redSqr().redISub(t).redISub(a)).redIAdd(t)).redAdd(t).redIAdd(t)).redISub(o)).redSqr(),a=(a=(a=(a=a.redIAdd(a)).redIAdd(a)).redIAdd(a)).redIAdd(a),r=r.redIAdd(t).redSqr().redISub(o).redISub(n).redISub(a),o=(o=(o=i.redMul(r)).redIAdd(o)).redIAdd(o),i=(i=(i=this.x.redMul(n).redISub(o)).redIAdd(i)).redIAdd(i),o=(o=(o=(o=this.y.redMul(r.redMul(a.redISub(r)).redISub(t.redMul(n)))).redIAdd(o)).redIAdd(o)).redIAdd(o),a=this.z.redAdd(t).redSqr().redISub(e).redISub(n),this.curve.jpoint(i,o,a)):this.dbl().add(this)},l.prototype.mul=function(e,t){return e=new i(e,t),this.curve._wnafMul(this,e)},l.prototype.eq=function(e){var t,n;return"affine"===e.type?this.eq(e.toJ()):this===e||(t=this.z.redSqr(),n=e.z.redSqr(),0===this.x.redMul(n).redISub(e.x.redMul(t)).cmpn(0)&&(t=t.redMul(this.z),n=n.redMul(e.z),0===this.y.redMul(n).redISub(e.y.redMul(t)).cmpn(0)))},l.prototype.eqXToP=function(e){var t=this.z.redSqr(),n=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(n))return!0;for(var r=e.clone(),i=this.curve.redN.redMul(t);;){if(r.iadd(this.curve.n),0<=r.cmp(this.curve.p))return!1;if(n.redIAdd(i),0===this.x.cmp(n))return!0}},l.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},l.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},{"../utils":364,"./base":351,"bn.js":365,inherits:387}],356:[function(e,t,n){"use strict";var r,i=n,o=(n=e("hash.js"),e("./curve")),a=e("./utils").assert;function s(e){"short"===e.type?this.curve=new o.short(e):"edwards"===e.type?this.curve=new o.edwards(e):this.curve=new o.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,a(this.g.validate(),"Invalid curve"),a(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function u(e,t){Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get:function(){var n=new s(t);return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,value:n}),n}})}i.PresetCurve=s,u("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:n.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),u("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:n.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),u("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:n.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),u("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:n.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),u("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:n.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),u("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:n.sha256,gRed:!1,g:["9"]}),u("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:n.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=e("./precomputed/secp256k1")}catch(e){r=void 0}u("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:n.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})},{"./curve":353,"./precomputed/secp256k1":363,"./utils":364,"hash.js":372}],357:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=e("bn.js"),o=e("hmac-drbg"),a=e("../utils"),s=e("../curves"),u=e("brorand"),c=a.assert,l=e("./key"),h=e("./signature");function f(e){if(!(this instanceof f))return new f(e);"string"==typeof e&&(c(s.hasOwnProperty(e),"Unknown curve "+e),e=s[e]),e instanceof s.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}(t.exports=f).prototype.keyPair=function(e){return new l(this,e)},f.prototype.keyFromPrivate=function(e,t){return l.fromPrivate(this,e,t)},f.prototype.keyFromPublic=function(e,t){return l.fromPublic(this,e,t)},f.prototype.genKeyPair=function(e){for(var t=new o({hash:this.hash,pers:(e=e||{}).pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||u(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),r=this.n.sub(new i(2));;){var a=new i(t.generate(n));if(!(0<a.cmp(r)))return a.iaddn(1),this.keyFromPrivate(a)}},f.prototype._truncateToN=function(e,t){var n=8*e.byteLength()-this.n.bitLength();return 0<n&&(e=e.ushrn(n)),!t&&0<=e.cmp(this.n)?e.sub(this.n):e},f.prototype.sign=function(e,t,n,a){"object"===r(n)&&(a=n,n=null),a=a||{},t=this.keyFromPrivate(t,n),e=this._truncateToN(new i(e,16));n=this.n.byteLength();for(var s=t.getPrivate().toArray("be",n),u=(n=e.toArray("be",n),new o({hash:this.hash,entropy:s,nonce:n,pers:a.pers,persEnc:a.persEnc||"utf8"})),c=this.n.sub(new i(1)),l=0;;l++){var f=a.k?a.k(l):new i(u.generate(this.n.byteLength()));if(!((f=this._truncateToN(f,!0)).cmpn(1)<=0||0<=f.cmp(c))){var d=this.g.mul(f);if(!d.isInfinity()){var p=d.getX(),m=p.umod(this.n);if(0!==m.cmpn(0)&&0!==(f=(f=f.invm(this.n).mul(m.mul(t.getPrivate()).iadd(e))).umod(this.n)).cmpn(0))return d=(d.getY().isOdd()?1:0)|(0!==p.cmp(m)?2:0),a.canonical&&0<f.cmp(this.nh)&&(f=this.n.sub(f),d^=1),new h({r:m,s:f,recoveryParam:d})}}}},f.prototype.verify=function(e,t,n,r){e=this._truncateToN(new i(e,16)),n=this.keyFromPublic(n,r);var o;r=(t=new h(t,"hex")).r,t=t.s;return!(r.cmpn(1)<0||0<=r.cmp(this.n))&&!(t.cmpn(1)<0||0<=t.cmp(this.n))&&(e=(t=t.invm(this.n)).mul(e).umod(this.n),t=t.mul(r).umod(this.n),this.curve._maxwellTrick?!(o=this.g.jmulAdd(e,n.getPublic(),t)).isInfinity()&&o.eqXToP(r):!(o=this.g.mulAdd(e,n.getPublic(),t)).isInfinity()&&0===o.getX().umod(this.n).cmp(r))},f.prototype.recoverPubKey=function(e,t,n,r){c((3&n)===n,"The recovery param is more than two bits"),t=new h(t,r);r=this.n,e=new i(e);var o=t.r,a=t.s,s=1&n;n>>=1;if(0<=o.cmp(this.curve.p.umod(this.curve.n))&&n)throw new Error("Unable to find sencond key candinate");return o=n?this.curve.pointFromX(o.add(this.curve.n),s):this.curve.pointFromX(o,s),n=t.r.invm(r),s=r.sub(e).mul(n).umod(r),t=a.mul(n).umod(r),this.g.mulAdd(s,o,t)},f.prototype.getKeyRecoveryParam=function(e,t,n,r){if(null!==(t=new h(t,r)).recoveryParam)return t.recoveryParam;for(var i,o=0;o<4;o++){try{i=this.recoverPubKey(e,t,o)}catch(e){continue}if(i.eq(n))return o}throw new Error("Unable to find valid recovery factor")}},{"../curves":356,"../utils":364,"./key":358,"./signature":359,"bn.js":365,brorand:184,"hmac-drbg":384}],358:[function(e,t,n){"use strict";var r=e("bn.js"),i=e("../utils").assert;function o(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}(t.exports=o).fromPublic=function(e,t,n){return t instanceof o?t:new o(e,{pub:t,pubEnc:n})},o.fromPrivate=function(e,t,n){return t instanceof o?t:new o(e,{priv:t,privEnc:n})},o.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},o.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},o.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(e,t){this.priv=new r(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(e,t){e.x||e.y?("mont"===this.ec.curve.type?i(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(e.x&&e.y,"Need both x and y coordinate"),this.pub=this.ec.curve.point(e.x,e.y)):this.pub=this.ec.curve.decodePoint(e,t)},o.prototype.derive=function(e){return e.mul(this.priv).getX()},o.prototype.sign=function(e,t,n){return this.ec.sign(e,this,t,n)},o.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},o.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},{"../utils":364,"bn.js":365}],359:[function(e,t,n){"use strict";var r=e("bn.js"),i=e("../utils"),o=i.assert;function a(e,t){if(e instanceof a)return e;this._importDER(e,t)||(o(e.r&&e.s,"Signature without r or s"),this.r=new r(e.r,16),this.s=new r(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function s(){this.place=0}function u(e,t){var n=e[t.place++];if(!(128&n))return n;var r=15&n;if(0==r||4<r)return!1;for(var i=0,o=0,a=t.place;o<r;o++,a++)i=((i<<=8)|e[a])>>>0;return!(i<=127)&&(t.place=a,i)}function c(e){for(var t=0,n=e.length-1;!e[t]&&!(128&e[t+1])&&t<n;)t++;return 0===t?e:e.slice(t)}function l(e,t){if(!(t<128)){var n=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|n);--n;)e.push(t>>>(n<<3)&255)}e.push(t)}(t.exports=a).prototype._importDER=function(e,t){if(48!==(e=i.toArray(e,t))[(t=new s).place++])return!1;var n=u(e,t);if(!1===n)return!1;if(n+t.place!==e.length)return!1;if(2!==e[t.place++])return!1;if(!1===(n=u(e,t)))return!1;var o=e.slice(t.place,n+t.place);if(t.place+=n,2!==e[t.place++])return!1;if(!1===(n=u(e,t)))return!1;if(e.length!==n+t.place)return!1;if(e=e.slice(t.place,n+t.place),0===o[0]){if(!(128&o[1]))return!1;o=o.slice(1)}if(0===e[0]){if(!(128&e[1]))return!1;e=e.slice(1)}return this.r=new r(o),this.s=new r(e),!(this.recoveryParam=null)},a.prototype.toDER=function(e){var t=this.r.toArray(),n=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&n[0]&&(n=[0].concat(n)),t=c(t),n=c(n);!(n[0]||128&n[1]);)n=n.slice(1);var r;l(r=[2],t.length),(r=r.concat(t)).push(2),l(r,n.length),t=r.concat(n);return l(r=[48],t.length),r=r.concat(t),i.encode(r,e)}},{"../utils":364,"bn.js":365}],360:[function(e,t,n){"use strict";var r=e("hash.js"),i=e("../curves"),o=e("../utils"),a=o.assert,s=o.parseBytes,u=e("./key"),c=e("./signature");function l(e){if(a("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof l))return new l(e);e=i[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=r.sha512}(t.exports=l).prototype.sign=function(e,t){e=s(e);t=this.keyFromSecret(t);var n=this.hashInt(t.messagePrefix(),e),r=this.g.mul(n),i=this.encodePoint(r);e=this.hashInt(i,t.pubBytes(),e).mul(t.priv()),t=n.add(e).umod(this.curve.n);return this.makeSignature({R:r,S:t,Rencoded:i})},l.prototype.verify=function(e,t,n){e=s(e),t=this.makeSignature(t);n=this.keyFromPublic(n),e=this.hashInt(t.Rencoded(),n.pubBytes(),e);var r=this.g.mul(t.S());return t.R().add(n.pub().mul(e)).eq(r)},l.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return o.intFromLE(e.digest()).umod(this.curve.n)},l.prototype.keyFromPublic=function(e){return u.fromPublic(this,e)},l.prototype.keyFromSecret=function(e){return u.fromSecret(this,e)},l.prototype.makeSignature=function(e){return e instanceof c?e:new c(this,e)},l.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},l.prototype.decodePoint=function(e){var t=(e=o.parseBytes(e)).length-1,n=e.slice(0,t).concat(-129&e[t]);e=0!=(128&e[t]),t=o.intFromLE(n);return this.curve.pointFromY(t,e)},l.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},l.prototype.decodeInt=function(e){return o.intFromLE(e)},l.prototype.isPoint=function(e){return e instanceof this.pointClass}},{"../curves":356,"../utils":364,"./key":361,"./signature":362,"hash.js":372}],361:[function(e,t,n){"use strict";var r=e("../utils"),i=r.assert,o=r.parseBytes;e=r.cachedProperty;function a(e,t){this.eddsa=e,this._secret=o(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=o(t.pub)}a.fromPublic=function(e,t){return t instanceof a?t:new a(e,{pub:t})},a.fromSecret=function(e,t){return t instanceof a?t:new a(e,{secret:t})},a.prototype.secret=function(){return this._secret},e(a,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),e(a,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),e(a,"privBytes",(function(){var e=this.eddsa,t=this.hash(),n=e.encodingLength-1;return(t=t.slice(0,e.encodingLength))[0]&=248,t[n]&=127,t[n]|=64,t})),e(a,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),e(a,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),e(a,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),a.prototype.sign=function(e){return i(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},a.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},a.prototype.getSecret=function(e){return i(this._secret,"KeyPair is public only"),r.encode(this.secret(),e)},a.prototype.getPublic=function(e){return r.encode(this.pubBytes(),e)},t.exports=a},{"../utils":364}],362:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=e("bn.js"),o=e("../utils"),a=o.assert,s=(e=o.cachedProperty,o.parseBytes);function u(e,t){this.eddsa=e,"object"!==r(t)&&(t=s(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),a(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof i&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}e(u,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),e(u,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),e(u,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),e(u,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),u.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},u.prototype.toHex=function(){return o.encode(this.toBytes(),"hex").toUpperCase()},t.exports=u},{"../utils":364,"bn.js":365}],363:[function(e,t,n){"use strict";t.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},{}],364:[function(e,t,n){"use strict";var r=n,i=e("bn.js");n=e("minimalistic-assert"),e=e("minimalistic-crypto-utils");r.assert=n,r.toArray=e.toArray,r.zero2=e.zero2,r.toHex=e.toHex,r.encode=e.encode,r.getNAF=function(e,t,n){var r=new Array(Math.max(e.bitLength(),n)+1);r.fill(0);for(var i=1<<t+1,o=e.clone(),a=0;a<r.length;a++){var s,u=o.andln(i-1);o.isOdd()?o.isubn(s=(i>>1)-1<u?(i>>1)-u:u):s=0,r[a]=s,o.iushrn(1)}return r},r.getJSF=function(e,t){var n=[[],[]];e=e.clone(),t=t.clone();for(var r=0,i=0;0<e.cmpn(-r)||0<t.cmpn(-i);){var o,a,s=e.andln(3)+r&3,u=t.andln(3)+i&3;3===u&&(u=-1),o=0==(1&(s=3===s?-1:s))?0:3!=(a=e.andln(7)+r&7)&&5!==a||2!==u?s:-s,n[0].push(o),s=0==(1&u)?0:3!=(a=t.andln(7)+i&7)&&5!==a||2!==s?u:-u,n[1].push(s),2*r===o+1&&(r=1-r),2*i===s+1&&(i=1-i),e.iushrn(1),t.iushrn(1)}return n},r.cachedProperty=function(e,t,n){var r="_"+t;e.prototype[t]=function(){return void 0!==this[r]?this[r]:this[r]=n.call(this)}},r.parseBytes=function(e){return"string"==typeof e?r.toArray(e,"hex"):e},r.intFromLE=function(e){return new i(e,"hex","le")}},{"bn.js":365,"minimalistic-assert":437,"minimalistic-crypto-utils":438}],365:[function(e,t,n){arguments[4][181][0].apply(n,arguments)},{buffer:185,dup:181}],366:[function(e,t,n){t.exports={_from:"elliptic@^6.5.3",_id:"elliptic@6.5.3",_inBundle:!1,_integrity:"sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==",_location:"/elliptic",_phantomChildren:{},_requested:{type:"range",registry:!0,raw:"elliptic@^6.5.3",name:"elliptic",escapedName:"elliptic",rawSpec:"^6.5.3",saveSpec:null,fetchSpec:"^6.5.3"},_requiredBy:["/browserify-sign","/create-ecdh"],_resolved:"https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz",_shasum:"cb59eb2efdaf73a0bd78ccd7015a62ad6e0f93d6",_spec:"elliptic@^6.5.3",_where:"/mnt/d/dev/git/exceljs/node_modules/browserify-sign",author:{name:"Fedor Indutny",email:"fedor@indutny.com"},bugs:{url:"https://github.com/indutny/elliptic/issues"},bundleDependencies:!1,dependencies:{"bn.js":"^4.4.0",brorand:"^1.0.1","hash.js":"^1.0.0","hmac-drbg":"^1.0.0",inherits:"^2.0.1","minimalistic-assert":"^1.0.0","minimalistic-crypto-utils":"^1.0.0"},deprecated:!1,description:"EC cryptography",devDependencies:{brfs:"^1.4.3",coveralls:"^3.0.8",grunt:"^1.0.4","grunt-browserify":"^5.0.0","grunt-cli":"^1.2.0","grunt-contrib-connect":"^1.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^1.0.1","grunt-mocha-istanbul":"^3.0.1","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.2",jscs:"^3.0.7",jshint:"^2.10.3",mocha:"^6.2.2"},files:["lib"],homepage:"https://github.com/indutny/elliptic",keywords:["EC","Elliptic","curve","Cryptography"],license:"MIT",main:"lib/elliptic.js",name:"elliptic",repository:{type:"git",url:"git+ssh://git@github.com/indutny/elliptic.git"},scripts:{jscs:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",jshint:"jscs benchmarks/*.js lib/*.js lib/**/*.js lib/**/**/*.js test/index.js",lint:"npm run jscs && npm run jshint",test:"npm run lint && npm run unit",unit:"istanbul test _mocha --reporter=spec test/index.js",version:"grunt dist && git add dist/"},version:"6.5.3"}},{}],367:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=Object.create||function(e){function t(){}return t.prototype=e,new t},o=Object.keys||function(e){var t,n=[];for(t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.push(t);return t},a=Function.prototype.bind||function(e){var t=this;return function(){return t.apply(e,arguments)}};function s(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=i(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}((t.exports=s).EventEmitter=s).prototype._events=void 0,s.prototype._maxListeners=void 0;var u,c=10;try{var l={};Object.defineProperty&&Object.defineProperty(l,"x",{value:0}),u=0===l.x}catch(e){u=!1}function h(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function f(e,t,n,o){var a,s;if("function"!=typeof n)throw new TypeError('"listener" argument must be a function');return(a=e._events)?(a.newListener&&(e.emit("newListener",t,n.listener||n),a=e._events),s=a[t]):(a=e._events=i(null),e._eventsCount=0),s?("function"==typeof s?s=a[t]=o?[n,s]:[s,n]:o?s.unshift(n):s.push(n),!s.warned&&(o=h(e))&&0<o&&s.length>o&&(s.warned=!0,(o=new Error("Possible EventEmitter memory leak detected. "+s.length+' "'+String(t)+'" listeners added. Use emitter.setMaxListeners() to increase limit.')).name="MaxListenersExceededWarning",o.emitter=e,o.type=t,o.count=s.length,"object"===("undefined"==typeof console?"undefined":r(console))&&console.warn)):(s=a[t]=n,++e._eventsCount),e}function d(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var e=new Array(arguments.length),t=0;t<e.length;++t)e[t]=arguments[t];this.listener.apply(this.target,e)}}function p(e,t,n){return e={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},(t=a.call(d,e)).listener=n,e.wrapFn=t}function m(e,t,n){if((e=e._events)&&(e=e[t])){if("function"==typeof e)return n?[e.listener||e]:[e];if(n){for(var r=e,i=new Array(r.length),o=0;o<i.length;++o)i[o]=r[o].listener||r[o];return i}return A(e,e.length)}return[]}function g(e){var t=this._events;if(t){if("function"==typeof(t=t[e]))return 1;if(t)return t.length}return 0}function A(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}u?Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return c},set:function(e){if("number"!=typeof e||e<0||e!=e)throw new TypeError('"defaultMaxListeners" must be a positive number');c=e}}):s.defaultMaxListeners=c,s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return h(this)},s.prototype.emit=function(e){var t,n,r,i,o,a,s="error"===e;if(a=this._events)s=s&&null==a.error;else if(!s)return!1;if(s){if((t=1<arguments.length?arguments[1]:t)instanceof Error)throw t;throw(s=new Error('Unhandled "error" event. ('+t+")")).context=t,s}if(!(n=a[e]))return!1;var u="function"==typeof n;switch(r=arguments.length){case 1:var c=n,l=this;if(p=u)c.call(l);else for(var h=c.length,f=A(c,h),d=0;d<h;++d)f[d].call(l);break;case 2:var p=n,m=this,g=arguments[1];if(c=u)p.call(m,g);else for(var v=p.length,b=A(p,v),y=0;y<v;++y)b[y].call(m,g);break;case 3:var w=n,x=this,C=arguments[1],k=arguments[2];if(O=u)w.call(x,C,k);else for(var E=w.length,S=A(w,E),_=0;_<E;++_)S[_].call(x,C,k);break;case 4:var O=n,T=this,D=arguments[1],B=arguments[2],I=arguments[3];if(w=u)O.call(T,D,B,I);else for(var M=O.length,j=A(O,M),N=0;N<M;++N)j[N].call(T,D,B,I);break;default:for(i=new Array(r-1),o=1;o<r;o++)i[o-1]=arguments[o];var F=n,R=u,P=this,L=i;if(R)F.apply(P,L);else for(var U=F.length,z=A(F,U),H=0;H<U;++H)z[H].apply(P,L)}return!0},s.prototype.on=s.prototype.addListener=function(e,t){return f(this,e,t,!1)},s.prototype.prependListener=function(e,t){return f(this,e,t,!0)},s.prototype.once=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.on(e,p(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');return this.prependListener(e,p(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,r,o,a,s;if("function"!=typeof t)throw new TypeError('"listener" argument must be a function');if((r=this._events)&&(n=r[e]))if(n===t||n.listener===t)0==--this._eventsCount?this._events=i(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(o=-1,a=n.length-1;0<=a;a--)if(n[a]===t||n[a].listener===t){s=n[a].listener,o=a;break}if(o<0)return this;if(0===o)n.shift();else{for(var u=n,c=o,l=c+1,h=u.length;l<h;c+=1,l+=1)u[c]=u[l];u.pop()}1===n.length&&(r[e]=n[0]),r.removeListener&&this.emit("removeListener",e,s||t)}return this},s.prototype.removeAllListeners=function(e){var t,n;if(n=this._events)if(n.removeListener){if(0===arguments.length){for(var r,a=o(n),s=0;s<a.length;++s)"removeListener"!==(r=a[s])&&this.removeAllListeners(r);this.removeAllListeners("removeListener"),this._events=i(null),this._eventsCount=0}else if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(t)for(s=t.length-1;0<=s;s--)this.removeListener(e,t[s])}else 0===arguments.length?(this._events=i(null),this._eventsCount=0):n[e]&&(0==--this._eventsCount?this._events=i(null):delete n[e]);return this},s.prototype.listeners=function(e){return m(this,e,!0)},s.prototype.rawListeners=function(e){return m(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):g.call(e,t)},s.prototype.listenerCount=g,s.prototype.eventNames=function(){return 0<this._eventsCount?Reflect.ownKeys(this._events):[]}},{}],368:[function(e,t,n){"use strict";var r=e("safe-buffer").Buffer,i=e("md5.js");t.exports=function(e,t,n,o){if(r.isBuffer(e)||(e=r.from(e,"binary")),t&&8!==(t=r.isBuffer(t)?t:r.from(t,"binary")).length)throw new RangeError("salt should be Buffer with 8 byte length");for(var a=n/8,s=r.alloc(a),u=r.alloc(o||0),c=r.alloc(0);0<a||0<o;){var l,h,f=((f=new i).update(c),f.update(e),t&&f.update(t),c=f.digest(),0);0<a&&(l=s.length-a,f=Math.min(a,c.length),c.copy(s,l,0,f),a-=f),f<c.length&&0<o&&(l=u.length-o,h=Math.min(o,c.length-f),c.copy(u,l,f,f+h),o-=h)}return c.fill(0),{key:s,iv:u}}},{"md5.js":434,"safe-buffer":494}],369:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e("@fast-csv/format"),i=(Object.defineProperty(n,"format",{enumerable:!0,get:function(){return r.format}}),Object.defineProperty(n,"write",{enumerable:!0,get:function(){return r.write}}),Object.defineProperty(n,"writeToStream",{enumerable:!0,get:function(){return r.writeToStream}}),Object.defineProperty(n,"writeToBuffer",{enumerable:!0,get:function(){return r.writeToBuffer}}),Object.defineProperty(n,"writeToString",{enumerable:!0,get:function(){return r.writeToString}}),Object.defineProperty(n,"writeToPath",{enumerable:!0,get:function(){return r.writeToPath}}),Object.defineProperty(n,"CsvFormatterStream",{enumerable:!0,get:function(){return r.CsvFormatterStream}}),Object.defineProperty(n,"FormatterOptions",{enumerable:!0,get:function(){return r.FormatterOptions}}),e("@fast-csv/parse"));Object.defineProperty(n,"parse",{enumerable:!0,get:function(){return i.parse}}),Object.defineProperty(n,"parseString",{enumerable:!0,get:function(){return i.parseString}}),Object.defineProperty(n,"parseStream",{enumerable:!0,get:function(){return i.parseStream}}),Object.defineProperty(n,"parseFile",{enumerable:!0,get:function(){return i.parseFile}}),Object.defineProperty(n,"ParserOptions",{enumerable:!0,get:function(){return i.ParserOptions}}),Object.defineProperty(n,"CsvParserStream",{enumerable:!0,get:function(){return i.CsvParserStream}})},{"@fast-csv/format":148,"@fast-csv/parse":152}],370:[function(e,t,n){"use strict";var r=e("safe-buffer").Buffer,i=e("readable-stream").Transform;function o(e){i.call(this),this._block=r.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}e("inherits")(o,i),o.prototype._transform=function(e,t,n){var r=null;try{this.update(e,t)}catch(e){r=e}n(r)},o.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},o.prototype.update=function(e,t){var n=e;if(!r.isBuffer(n)&&"string"!=typeof n)throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");r.isBuffer(e)||(e=r.from(e,t));for(var i=this._block,o=0;this._blockOffset+e.length-o>=this._blockSize;){for(var a=this._blockOffset;a<this._blockSize;)i[a++]=e[o++];this._update(),this._blockOffset=0}for(;o<e.length;)i[this._blockOffset++]=e[o++];for(var s=0,u=8*e.length;0<u;++s)this._length[s]+=u,0<(u=this._length[s]/4294967296|0)&&(this._length[s]-=4294967296*u);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0);for(var n=this._blockOffset=0;n<4;++n)this._length[n]=0;return t},o.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=o},{inherits:387,"readable-stream":491,"safe-buffer":371}],371:[function(e,t,n){arguments[4][214][0].apply(n,arguments)},{buffer:216,dup:214}],372:[function(e,t,n){"use strict";n.utils=e("./hash/utils"),n.common=e("./hash/common"),n.sha=e("./hash/sha"),n.ripemd=e("./hash/ripemd"),n.hmac=e("./hash/hmac"),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},{"./hash/common":373,"./hash/hmac":374,"./hash/ripemd":375,"./hash/sha":376,"./hash/utils":383}],373:[function(e,t,n){"use strict";var r=e("./utils"),i=e("minimalistic-assert");function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}(n.BlockHash=o).prototype.update=function(e,t){if(e=r.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){t=(e=this.pending).length%this._delta8,this.pending=e.slice(e.length-t,e.length),0===this.pending.length&&(this.pending=null),e=r.join32(e,0,e.length-t,this.endian);for(var n=0;n<e.length;n+=this._delta32)this._update(e,n,n+this._delta32)}return this},o.prototype.digest=function(e){return this.update(this._pad()),i(null===this.pending),this._digest(e)},o.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,n=t-(e+this.padLength)%t,r=new Array(n+this.padLength);r[0]=128;for(var i=1;i<n;i++)r[i]=0;if(e<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)r[i++]=0;r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=e>>>24&255,r[i++]=e>>>16&255,r[i++]=e>>>8&255,r[i++]=255&e}else for(r[i++]=255&e,r[i++]=e>>>8&255,r[i++]=e>>>16&255,r[i++]=e>>>24&255,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,o=8;o<this.padLength;o++)r[i++]=0;return r}},{"./utils":383,"minimalistic-assert":437}],374:[function(e,t,n){"use strict";var r=e("./utils"),i=e("minimalistic-assert");function o(e,t,n){if(!(this instanceof o))return new o(e,t,n);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(r.toArray(t,n))}(t.exports=o).prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(t=0;t<e.length;t++)e[t]^=54;for(this.inner=(new this.Hash).update(e),t=0;t<e.length;t++)e[t]^=106;this.outer=(new this.Hash).update(e)},o.prototype.update=function(e,t){return this.inner.update(e,t),this},o.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)}},{"./utils":383,"minimalistic-assert":437}],375:[function(e,t,n){"use strict";var r=e("./utils"),i=(e=e("./common"),r.rotl32),o=r.sum32,a=r.sum32_3,s=r.sum32_4,u=e.BlockHash;function c(){if(!(this instanceof c))return new c;u.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function l(e,t,n,r){return e<=15?t^n^r:e<=31?t&n|~t&r:e<=47?(t|~n)^r:e<=63?t&r|n&~r:t^(n|~r)}r.inherits(c,u),(n.ripemd160=c).blockSize=512,c.outSize=160,c.hmacStrength=192,c.padLength=64,c.prototype._update=function(e,t){for(var n,r=b=this.h[0],u=C=this.h[1],c=x=this.h[2],m=w=this.h[3],g=y=this.h[4],A=0;A<80;A++){var v=o(i(s(b,l(A,C,x,w),e[h[A]+t],(n=A)<=15?0:n<=31?1518500249:n<=47?1859775393:n<=63?2400959708:2840853838),d[A]),y),b=y,y=w,w=i(x,10),x=C,C=v;v=o(i(s(r,l(79-A,u,c,m),e[f[A]+t],(n=A)<=15?1352829926:n<=31?1548603684:n<=47?1836072691:n<=63?2053994217:0),p[A]),g),r=g,g=m,m=i(c,10),c=u,u=v}v=a(this.h[1],x,m),this.h[1]=a(this.h[2],w,g),this.h[2]=a(this.h[3],y,r),this.h[3]=a(this.h[4],b,u),this.h[4]=a(this.h[0],C,c),this.h[0]=v},c.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"little"):r.split32(this.h,"little")};var h=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],f=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],d=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],p=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},{"./common":373,"./utils":383}],376:[function(e,t,n){"use strict";n.sha1=e("./sha/1"),n.sha224=e("./sha/224"),n.sha256=e("./sha/256"),n.sha384=e("./sha/384"),n.sha512=e("./sha/512")},{"./sha/1":377,"./sha/224":378,"./sha/256":379,"./sha/384":380,"./sha/512":381}],377:[function(e,t,n){"use strict";var r=e("../utils"),i=e("../common"),o=(e=e("./common"),r.rotl32),a=r.sum32,s=r.sum32_5,u=e.ft_1,c=i.BlockHash,l=[1518500249,1859775393,2400959708,3395469782];function h(){if(!(this instanceof h))return new h;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}r.inherits(h,c),(t.exports=h).blockSize=512,h.outSize=160,h.hmacStrength=80,h.padLength=64,h.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r<n.length;r++)n[r]=o(n[r-3]^n[r-8]^n[r-14]^n[r-16],1);var i=this.h[0],c=this.h[1],h=this.h[2],f=this.h[3],d=this.h[4];for(r=0;r<n.length;r++){var p=~~(r/20);p=s(o(i,5),u(p,c,h,f),d,n[r],l[p]),d=f,f=h,h=o(c,30),c=i,i=p}this.h[0]=a(this.h[0],i),this.h[1]=a(this.h[1],c),this.h[2]=a(this.h[2],h),this.h[3]=a(this.h[3],f),this.h[4]=a(this.h[4],d)},h.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},{"../common":373,"../utils":383,"./common":382}],378:[function(e,t,n){"use strict";var r=e("../utils"),i=e("./256");function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}r.inherits(o,i),(t.exports=o).blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h.slice(0,7),"big"):r.split32(this.h.slice(0,7),"big")}},{"../utils":383,"./256":379}],379:[function(e,t,n){"use strict";var r=e("../utils"),i=e("../common"),o=e("./common"),a=e("minimalistic-assert"),s=r.sum32,u=r.sum32_4,c=r.sum32_5,l=o.ch32,h=o.maj32,f=o.s0_256,d=o.s1_256,p=o.g0_256,m=o.g1_256,g=i.BlockHash,A=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function v(){if(!(this instanceof v))return new v;g.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=A,this.W=new Array(64)}r.inherits(v,g),(t.exports=v).blockSize=512,v.outSize=256,v.hmacStrength=192,v.padLength=64,v.prototype._update=function(e,t){for(var n=this.W,r=0;r<16;r++)n[r]=e[t+r];for(;r<n.length;r++)n[r]=u(m(n[r-2]),n[r-7],p(n[r-15]),n[r-16]);var i=this.h[0],o=this.h[1],g=this.h[2],A=this.h[3],v=this.h[4],b=this.h[5],y=this.h[6],w=this.h[7];for(a(this.k.length===n.length),r=0;r<n.length;r++){var x=c(w,d(v),l(v,b,y),this.k[r],n[r]),C=s(f(i),h(i,o,g));w=y,y=b,b=v,v=s(A,x),A=g,g=o,o=i,i=s(x,C)}this.h[0]=s(this.h[0],i),this.h[1]=s(this.h[1],o),this.h[2]=s(this.h[2],g),this.h[3]=s(this.h[3],A),this.h[4]=s(this.h[4],v),this.h[5]=s(this.h[5],b),this.h[6]=s(this.h[6],y),this.h[7]=s(this.h[7],w)},v.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},{"../common":373,"../utils":383,"./common":382,"minimalistic-assert":437}],380:[function(e,t,n){"use strict";var r=e("../utils"),i=e("./512");function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}r.inherits(o,i),(t.exports=o).blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h.slice(0,12),"big"):r.split32(this.h.slice(0,12),"big")}},{"../utils":383,"./512":381}],381:[function(e,t,n){"use strict";var r=e("../utils"),i=e("../common"),o=e("minimalistic-assert"),a=r.rotr64_hi,s=r.rotr64_lo,u=r.shr64_hi,c=r.shr64_lo,l=r.sum64,h=r.sum64_hi,f=r.sum64_lo,d=r.sum64_4_hi,p=r.sum64_4_lo,m=r.sum64_5_hi,g=r.sum64_5_lo,A=i.BlockHash,v=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function b(){if(!(this instanceof b))return new b;A.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=v,this.W=new Array(160)}r.inherits(b,A),(t.exports=b).blockSize=1024,b.outSize=512,b.hmacStrength=192,b.padLength=128,b.prototype._prepareBlock=function(e,t){for(var n=this.W,r=0;r<32;r++)n[r]=e[t+r];for(;r<n.length;r+=2){l=n[r-4],i=n[r-3],(l=a(l,i,19)^a(i,l,29)^u(l,i,6))<0&&(l+=4294967296);var i=l,o=(l=n[r-4],o=n[r-3],(l=s(l,o,19)^s(o,l,29)^c(l,o,6))<0&&(l+=4294967296),l),l=n[r-14],h=n[r-13],f=(g=n[r-30],f=n[r-29],(g=a(g,f,1)^a(g,f,8)^u(g,f,7))<0&&(g+=4294967296),g),m=(g=n[r-30],m=n[r-29],(g=s(g,m,1)^s(g,m,8)^c(g,m,7))<0&&(g+=4294967296),g),g=n[r-32],A=n[r-31];n[r]=d(i,o,l,h,f,m,g,A),n[r+1]=p(i,o,l,h,f,m,g,A)}},b.prototype._update=function(e,t){this._prepareBlock(e,t);var n=this.W,r=this.h[0],i=this.h[1],u=this.h[2],c=this.h[3],d=this.h[4],p=this.h[5],A=this.h[6],v=this.h[7],b=this.h[8],y=this.h[9],w=this.h[10],x=this.h[11],C=this.h[12],k=this.h[13],E=this.h[14],S=this.h[15];o(this.k.length===n.length);for(var _=0;_<n.length;_+=2){var O,T=E,D=S,B=((I=a(B=b,I=y,14)^a(B,I,18)^a(I,B,9))<0&&(I+=4294967296),I),I=((P=s(I=b,P=y,14)^s(I,P,18)^s(P,I,9))<0&&(P+=4294967296),P),M=((P=b&(P=w)^~b&C)<0&&(P+=4294967296),(O=y&(O=x)^~y&k)<0&&(O+=4294967296),this.k[_]),j=this.k[_+1],N=n[_],F=n[_+1],R=m(T,D,B,I,P,O,M,j,N,F),P=g(T,D,B,I,P,O,M,j,N,F);M=((M=a(O=r,M=i,28)^a(M,O,2)^a(M,O,7))<0&&(M+=4294967296),T=M,(N=s(j=r,N=i,28)^s(N,j,2)^s(N,j,7))<0&&(N+=4294967296),(F=(F=r)&u^F&d^u&d)<0&&(F+=4294967296),(O=(O=i)&c^O&p^c&p)<0&&(O+=4294967296),h(T,D=N,B=F,I=O)),j=f(T,D,B,I),E=C,S=k,C=w,k=x,w=b,x=y,b=h(A,v,R,P),y=f(v,v,R,P),A=d,v=p,d=u,p=c,u=r,c=i,r=h(R,P,M,j),i=f(R,P,M,j)}l(this.h,0,r,i),l(this.h,2,u,c),l(this.h,4,d,p),l(this.h,6,A,v),l(this.h,8,b,y),l(this.h,10,w,x),l(this.h,12,C,k),l(this.h,14,E,S)},b.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},{"../common":373,"../utils":383,"minimalistic-assert":437}],382:[function(e,t,n){"use strict";var r=e("../utils").rotr32;function i(e,t,n){return e&t^~e&n}function o(e,t,n){return e&t^e&n^t&n}n.ft_1=function(e,t,n,r){return 0===e?i(t,n,r):1===e||3===e?t^n^r:2===e?o(t,n,r):void 0},n.ch32=i,n.maj32=o,n.p32=function(e,t,n){return e^t^n},n.s0_256=function(e){return r(e,2)^r(e,13)^r(e,22)},n.s1_256=function(e){return r(e,6)^r(e,11)^r(e,25)},n.g0_256=function(e){return r(e,7)^r(e,18)^e>>>3},n.g1_256=function(e){return r(e,17)^r(e,19)^e>>>10}},{"../utils":383}],383:[function(e,t,n){"use strict";var r=e("minimalistic-assert");e=e("inherits");function i(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function o(e){return 1===e.length?"0"+e:e}function a(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}n.inherits=e,n.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n,r,i=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),a=0;a<e.length;a+=2)i.push(parseInt(e[a]+e[a+1],16))}else for(var o=0,a=0;a<e.length;a++){var s=e.charCodeAt(a);s<128?i[o++]=s:s<2048?(i[o++]=s>>6|192,i[o++]=63&s|128):(r=a,55296!=(64512&(n=e).charCodeAt(r))||r<0||r+1>=n.length||56320!=(64512&n.charCodeAt(r+1))?i[o++]=s>>12|224:(s=65536+((1023&s)<<10)+(1023&e.charCodeAt(++a)),i[o++]=s>>18|240,i[o++]=s>>12&63|128),i[o++]=s>>6&63|128,i[o++]=63&s|128)}else for(a=0;a<e.length;a++)i[a]=0|e[a];return i},n.toHex=function(e){for(var t="",n=0;n<e.length;n++)t+=o(e[n].toString(16));return t},n.htonl=i,n.toHex32=function(e,t){for(var n="",r=0;r<e.length;r++){var o=e[r];n+=a((o="little"===t?i(o):o).toString(16))}return n},n.zero2=o,n.zero8=a,n.join32=function(e,t,n,i){r((n-=t)%4==0);for(var o=new Array(n/4),a=0,s=t;a<o.length;a++,s+=4){var u="big"===i?e[s]<<24|e[s+1]<<16|e[s+2]<<8|e[s+3]:e[s+3]<<24|e[s+2]<<16|e[s+1]<<8|e[s];o[a]=u>>>0}return o},n.split32=function(e,t){for(var n=new Array(4*e.length),r=0,i=0;r<e.length;r++,i+=4){var o=e[r];"big"===t?(n[i]=o>>>24,n[i+1]=o>>>16&255,n[i+2]=o>>>8&255,n[i+3]=255&o):(n[i+3]=o>>>24,n[i+2]=o>>>16&255,n[i+1]=o>>>8&255,n[i]=255&o)}return n},n.rotr32=function(e,t){return e>>>t|e<<32-t},n.rotl32=function(e,t){return e<<t|e>>>32-t},n.sum32=function(e,t){return e+t>>>0},n.sum32_3=function(e,t,n){return e+t+n>>>0},n.sum32_4=function(e,t,n,r){return e+t+n+r>>>0},n.sum32_5=function(e,t,n,r,i){return e+t+n+r+i>>>0},n.sum64=function(e,t,n,r){var i=e[t],o=r+e[t+1]>>>0;e[t]=(o<r?1:0)+n+i>>>0,e[t+1]=o},n.sum64_hi=function(e,t,n,r){return(t+r>>>0<t?1:0)+e+n>>>0},n.sum64_lo=function(e,t,n,r){return t+r>>>0},n.sum64_4_hi=function(e,t,n,r,i,o,a,s){var u=0;return e+n+i+a+((u=u+((e=t+r>>>0)<t?1:0)+((e=e+o>>>0)<o?1:0))+(e+s>>>0<s?1:0))>>>0},n.sum64_4_lo=function(e,t,n,r,i,o,a,s){return t+r+o+s>>>0},n.sum64_5_hi=function(e,t,n,r,i,o,a,s,u,c){var l=0;return e+n+i+a+u+((l=(l+=(e=t+r>>>0)<t?1:0)+((e=e+o>>>0)<o?1:0)+((e=e+s>>>0)<s?1:0))+(e+c>>>0<c?1:0))>>>0},n.sum64_5_lo=function(e,t,n,r,i,o,a,s,u,c){return t+r+o+s+c>>>0},n.rotr64_hi=function(e,t,n){return(t<<32-n|e>>>n)>>>0},n.rotr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},n.shr64_hi=function(e,t,n){return e>>>n},n.shr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0}},{inherits:387,"minimalistic-assert":437}],384:[function(e,t,n){"use strict";var r=e("hash.js"),i=e("minimalistic-crypto-utils"),o=e("minimalistic-assert");function a(e){if(!(this instanceof a))return new a(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=i.toArray(e.entropy,e.entropyEnc||"hex"),n=i.toArray(e.nonce,e.nonceEnc||"hex");e=i.toArray(e.pers,e.persEnc||"hex");o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,n,e)}(t.exports=a).prototype._init=function(e,t,n){e=e.concat(t).concat(n),this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var r=0;r<this.V.length;r++)this.K[r]=0,this.V[r]=1;this._update(e),this._reseed=1,this.reseedInterval=281474976710656},a.prototype._hmac=function(){return new r.hmac(this.hash,this.K)},a.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},a.prototype.reseed=function(e,t,n,r){"string"!=typeof t&&(r=n,n=t,t=null),e=i.toArray(e,t),n=i.toArray(n,r),o(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1},a.prototype.generate=function(e,t,n,r){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(r=n,n=t,t=null),n&&(n=i.toArray(n,r||"hex"),this._update(n));for(var o=[];o.length<e;)this.V=this._hmac().update(this.V).digest(),o=o.concat(this.V);return r=o.slice(0,e),this._update(n),this._reseed++,i.encode(r,t)}},{"hash.js":372,"minimalistic-assert":437,"minimalistic-crypto-utils":438}],385:[function(e,t,n){"use strict";n.read=function(e,t,n,r,i){var o,a,s=8*i-r-1,u=(1<<s)-1,c=u>>1,l=-7,h=n?i-1:0,f=n?-1:1;i=e[t+h];for(h+=f,o=i&(1<<-l)-1,i>>=-l,l+=s;0<l;o=256*o+e[t+h],h+=f,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=r;0<l;a=256*a+e[t+h],h+=f,l-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(i?-1:1);a+=Math.pow(2,r),o-=c}return(i?-1:1)*a*Math.pow(2,o-r)},n.write=function(e,t,n,r,i,o){var a,s,u=8*o-i-1,c=(1<<u)-1,l=c>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:o-1,d=r?1:-1;o=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(r=Math.pow(2,-a))<1&&(a--,r*=2),2<=(t+=1<=a+l?h/r:h*Math.pow(2,1-l))*r&&(a++,r/=2),c<=a+l?(s=0,a=c):1<=a+l?(s=(t*r-1)*Math.pow(2,i),a+=l):(s=t*Math.pow(2,l-1)*Math.pow(2,i),a=0));8<=i;e[n+f]=255&s,f+=d,s/=256,i-=8);for(a=a<<i|s,u+=i;0<u;e[n+f]=255&a,f+=d,a/=256,u-=8);e[n+f-d]|=128*o}},{}],386:[function(e,n,r){(function(e){"use strict";var t,r,i,o,a=e.MutationObserver||e.WebKitMutationObserver,s=a?(r=0,a=new a(c),i=e.document.createTextNode(""),a.observe(i,{characterData:!0}),function(){i.data=r=++r%2}):e.setImmediate||void 0===e.MessageChannel?"document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){c(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(c,0)}:((o=new e.MessageChannel).port1.onmessage=c,function(){o.port2.postMessage(0)}),u=[];function c(){var e,n;t=!0;for(var r=u.length;r;){for(n=u,u=[],e=-1;++e<r;)n[e]();r=u.length}t=!1}n.exports=function(e){1!==u.push(e)||t||s()}}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],387:[function(e,t,n){"use strict";"function"==typeof Object.create?t.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(e,t){var n;t&&(e.super_=t,(n=function(){}).prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e)}},{}],388:[function(e,t,n){"use strict";
/*!
 * Determine if an object is a Buffer
 *
 * @author   Feross Aboukhadijeh <https://feross.org>
 * @license  MIT
 */function r(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}t.exports=function(e){return null!=e&&(r(e)||"function"==typeof(t=e).readFloatLE&&"function"==typeof t.slice&&r(t.slice(0,0))||!!e._isBuffer);var t}},{}],389:[function(e,t,n){"use strict";var r={}.toString;t.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},{}],390:[function(e,t,n){"use strict";var r=e("./utils"),i=e("./support"),o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";n.encode=function(e){for(var t,n,i,a,s,u,c=[],l=0,h=e.length,f="string"!==r.getTypeOf(e);l<e.length;)u=h-l,i=f?(t=e[l++],n=l<h?e[l++]:0,l<h?e[l++]:0):(t=e.charCodeAt(l++),n=l<h?e.charCodeAt(l++):0,l<h?e.charCodeAt(l++):0),a=(3&t)<<4|n>>4,s=1<u?(15&n)<<2|i>>6:64,u=2<u?63&i:64,c.push(o.charAt(t>>2)+o.charAt(a)+o.charAt(s)+o.charAt(u));return c.join("")},n.decode=function(e){var t,n,r,a,s,u=0,c=0;if("data:"===e.substr(0,"data:".length))throw new Error("Invalid base64 input, it looks like a data url.");var l,h=3*(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"")).length/4;if(e.charAt(e.length-1)===o.charAt(64)&&h--,e.charAt(e.length-2)===o.charAt(64)&&h--,h%1!=0)throw new Error("Invalid base64 input, bad content length.");for(l=new(i.uint8array?Uint8Array:Array)(0|h);u<e.length;)t=o.indexOf(e.charAt(u++))<<2|(a=o.indexOf(e.charAt(u++)))>>4,n=(15&a)<<4|(a=o.indexOf(e.charAt(u++)))>>2,r=(3&a)<<6|(s=o.indexOf(e.charAt(u++))),l[c++]=t,64!==a&&(l[c++]=n),64!==s&&(l[c++]=r);return l}},{"./support":419,"./utils":421}],391:[function(e,t,n){"use strict";var r=e("./external"),i=e("./stream/DataWorker"),o=e("./stream/DataLengthProbe"),a=e("./stream/Crc32Probe");function s(e,t,n,r,i){this.compressedSize=e,this.uncompressedSize=t,this.crc32=n,this.compression=r,this.compressedContent=i}o=e("./stream/DataLengthProbe"),s.prototype={getContentWorker:function(){var e=new i(r.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new o("data_length")),t=this;return e.on("end",(function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),e},getCompressedWorker:function(){return new i(r.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},s.createWorkerFrom=function(e,t,n){return e.pipe(new a).pipe(new o("uncompressedSize")).pipe(t.compressWorker(n)).pipe(new o("compressedSize")).withStreamInfo("compression",t)},t.exports=s},{"./external":395,"./stream/Crc32Probe":414,"./stream/DataLengthProbe":415,"./stream/DataWorker":416}],392:[function(e,t,n){"use strict";var r=e("./stream/GenericWorker");n.STORE={magic:"\0\0",compressWorker:function(e){return new r("STORE compression")},uncompressWorker:function(){return new r("STORE decompression")}},n.DEFLATE=e("./flate")},{"./flate":396,"./stream/GenericWorker":417}],393:[function(e,t,n){"use strict";var r=e("./utils"),i=function(){for(var e=[],t=0;t<256;t++){for(var n=t,r=0;r<8;r++)n=1&n?3988292384^n>>>1:n>>>1;e[t]=n}return e}();t.exports=function(e,t){return void 0!==e&&e.length?("string"!==r.getTypeOf(e)?function(e,t,n){var r=i,o=0+n;e^=-1;for(var a=0;a<o;a++)e=e>>>8^r[255&(e^t[a])];return-1^e}:function(e,t,n){var r=i,o=0+n;e^=-1;for(var a=0;a<o;a++)e=e>>>8^r[255&(e^t.charCodeAt(a))];return-1^e})(0|t,e,e.length):0}},{"./utils":421}],394:[function(e,t,n){"use strict";n.base64=!1,n.binary=!1,n.dir=!1,n.createFolders=!0,n.date=null,n.compression=null,n.compressionOptions=null,n.comment=null,n.unixPermissions=null,n.dosPermissions=null},{}],395:[function(e,t,n){"use strict";e="undefined"!=typeof Promise?Promise:e("lie"),t.exports={Promise:e}},{lie:425}],396:[function(e,t,n){"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,i=e("pako"),o=e("./utils"),a=e("./stream/GenericWorker"),s=r?"uint8array":"array";function u(e,t){a.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}n.magic="\b\0",o.inherits(u,a),u.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(o.transformTo(s,e.data),!1)},u.prototype.flush=function(){a.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},u.prototype.cleanUp=function(){a.prototype.cleanUp.call(this),this._pako=null},u.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}},n.compressWorker=function(e){return new u("Deflate",e)},n.uncompressWorker=function(){return new u("Inflate",{})}},{"./stream/GenericWorker":417,"./utils":421,pako:439}],397:[function(e,t,n){"use strict";function r(e,t){for(var n="",r=0;r<t;r++)n+=String.fromCharCode(255&e),e>>>=8;return n}function i(e,t,n,i,a,l){var h=e.file,f=e.compression,d=l!==s.utf8encode,p=o.transformTo("string",l(h.name)),m=o.transformTo("string",s.utf8encode(h.name)),g=h.comment,A=(l=o.transformTo("string",l(g)),o.transformTo("string",s.utf8encode(g))),v=m.length!==h.name.length,b=(g=A.length!==g.length,""),y=h.dir,w=h.date,x={crc32:0,compressedSize:0,uncompressedSize:0};t&&!n||(x.crc32=e.crc32,x.compressedSize=e.compressedSize,x.uncompressedSize=e.uncompressedSize),n=0;return t&&(n|=8),d||!v&&!g||(n|=2048),t=e=0,y&&(e|=16),"UNIX"===a?(t=798,e|=(65535&((d=h.unixPermissions)?d:y?16893:33204))<<16):(t=20,e|=63&(h.dosPermissions||0)),a=w.getUTCHours(),a=(a=((a<<=6)|w.getUTCMinutes())<<5)|w.getUTCSeconds()/2,d=w.getUTCFullYear()-1980,d=(d=((d<<=4)|w.getUTCMonth()+1)<<5)|w.getUTCDate(),v&&(y=r(1,1)+r(u(p),4)+m,b+="up"+r(y.length,2)+y),g&&(h=r(1,1)+r(u(l),4)+A,b+="uc"+r(h.length,2)+h),w="",w=(w=(w=(w=(w=(w=(w=(w=(w=(w+="\n\0")+r(n,2))+f.magic)+r(a,2))+r(d,2))+r(x.crc32,4))+r(x.compressedSize,4))+r(x.uncompressedSize,4))+r(p.length,2))+r(b.length,2),{fileRecord:c.LOCAL_FILE_HEADER+w+p+b,dirRecord:c.CENTRAL_FILE_HEADER+r(t,2)+w+r(l.length,2)+"\0\0\0\0"+r(e,4)+r(i,4)+p+b+l}}var o=e("../utils"),a=e("../stream/GenericWorker"),s=e("../utf8"),u=e("../crc32"),c=e("../signature");function l(e,t,n,r){a.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=n,this.encodeFileName=r,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}o.inherits(l,a),l.prototype.push=function(e){var t=e.meta.percent||0,n=this.entriesCount,r=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,a.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:n?(t+100*(n-r-1))/n:100}}))},l.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;t?(e=i(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName),this.push({data:e.fileRecord,meta:{percent:0}})):this.accumulate=!0},l.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,n=i(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),t)this.push({data:(t=e,c.DATA_DESCRIPTOR+r(t.crc32,4)+r(t.compressedSize,4)+r(t.uncompressedSize,4)),meta:{percent:100}});else for(this.push({data:n.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},l.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t<this.dirRecords.length;t++)this.push({data:this.dirRecords[t],meta:{percent:100}});var n=this.bytesWritten-e;n=function(e,t,n,i,a){return a=o.transformTo("string",a(i)),c.CENTRAL_DIRECTORY_END+"\0\0\0\0"+r(e,2)+r(e,2)+r(t,4)+r(n,4)+r(a.length,2)+a}(this.dirRecords.length,n,e,this.zipComment,this.encodeFileName);this.push({data:n,meta:{percent:100}})},l.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},l.prototype.registerPrevious=function(e){this._sources.push(e);var t=this;return e.on("data",(function(e){t.processChunk(e)})),e.on("end",(function(){t.closedSource(t.previous.streamInfo),t._sources.length?t.prepareNextSource():t.end()})),e.on("error",(function(e){t.error(e)})),this},l.prototype.resume=function(){return!!a.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},l.prototype.error=function(e){var t=this._sources;if(!a.prototype.error.call(this,e))return!1;for(var n=0;n<t.length;n++)try{t[n].error(e)}catch(e){}return!0},l.prototype.lock=function(){a.prototype.lock.call(this);for(var e=this._sources,t=0;t<e.length;t++)e[t].lock()},t.exports=l},{"../crc32":393,"../signature":412,"../stream/GenericWorker":417,"../utf8":420,"../utils":421}],398:[function(e,t,n){"use strict";var r=e("../compressions"),i=e("./ZipFileWorker");n.generateWorker=function(e,t,n){var o=new i(t.streamFiles,n,t.platform,t.encodeFileName),a=0;try{e.forEach((function(e,n){a++;var i=function(e,t){if(t=r[e=e||t])return t;throw new Error(e+" is not a valid compression method !")}(n.options.compression,t.compression),s=n.options.compressionOptions||t.compressionOptions||{},u=n.dir,c=n.date;n._compressWorker(i,s).withStreamInfo("file",{name:e,dir:u,date:c,comment:n.comment||"",unixPermissions:n.unixPermissions,dosPermissions:n.dosPermissions}).pipe(o)})),o.entriesCount=a}catch(e){o.error(e)}return o}},{"../compressions":392,"./ZipFileWorker":397}],399:[function(e,t,n){"use strict";function r(){if(!(this instanceof r))return new r;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files={},this.comment=null,this.root="",this.clone=function(){var e,t=new r;for(e in this)"function"!=typeof this[e]&&(t[e]=this[e]);return t}}(r.prototype=e("./object")).loadAsync=e("./load"),r.support=e("./support"),r.defaults=e("./defaults"),r.version="3.5.0",r.loadAsync=function(e,t){return(new r).loadAsync(e,t)},r.external=e("./external"),t.exports=r},{"./defaults":394,"./external":395,"./load":400,"./object":404,"./support":419}],400:[function(e,t,n){"use strict";var r=e("./utils"),i=e("./external"),o=e("./utf8"),a=(r=e("./utils"),e("./zipEntries")),s=e("./stream/Crc32Probe"),u=e("./nodejsUtils");t.exports=function(e,t){var n=this;return t=r.extend(t||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:o.utf8decode}),u.isNode&&u.isStream(e)?i.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):r.prepareContent("the loaded zip file",e,!0,t.optimizedBinaryString,t.base64).then((function(e){var n=new a(t);return n.load(e),n})).then((function(e){var n=[i.Promise.resolve(e)],r=e.files;if(t.checkCRC32)for(var o=0;o<r.length;o++)n.push(function(e){return new i.Promise((function(t,n){var r=e.decompressed.getContentWorker().pipe(new s);r.on("error",(function(e){n(e)})).on("end",(function(){r.streamInfo.crc32!==e.decompressed.crc32?n(new Error("Corrupted zip : CRC32 mismatch")):t()})).resume()}))}(r[o]));return i.Promise.all(n)})).then((function(e){for(var r=(e=e.shift()).files,i=0;i<r.length;i++){var o=r[i];n.file(o.fileNameStr,o.decompressed,{binary:!0,optimizedBinaryString:!0,date:o.date,dir:o.dir,comment:o.fileCommentStr.length?o.fileCommentStr:null,unixPermissions:o.unixPermissions,dosPermissions:o.dosPermissions,createFolders:t.createFolders})}return e.zipComment.length&&(n.comment=e.zipComment),n}))}},{"./external":395,"./nodejsUtils":403,"./stream/Crc32Probe":414,"./utf8":420,"./utils":421,"./zipEntries":422}],401:[function(e,t,n){"use strict";var r=e("../utils"),i=e("../stream/GenericWorker");function o(e,t){i.call(this,"Nodejs stream input adapter for "+e),this._upstreamEnded=!1,this._bindStream(t)}r.inherits(o,i),o.prototype._bindStream=function(e){var t=this;(this._stream=e).pause(),e.on("data",(function(e){t.push({data:e,meta:{percent:0}})})).on("error",(function(e){t.isPaused?this.generatedError=e:t.error(e)})).on("end",(function(){t.isPaused?t._upstreamEnded=!0:t.end()}))},o.prototype.pause=function(){return!!i.prototype.pause.call(this)&&(this._stream.pause(),!0)},o.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},t.exports=o},{"../stream/GenericWorker":417,"../utils":421}],402:[function(e,t,n){"use strict";var r=e("readable-stream").Readable;function i(e,t,n){r.call(this,t),this._helper=e;var i=this;e.on("data",(function(e,t){i.push(e)||i._helper.pause(),n&&n(t)})).on("error",(function(e){i.emit("error",e)})).on("end",(function(){i.push(null)}))}e("../utils").inherits(i,r),i.prototype._read=function(){this._helper.resume()},t.exports=i},{"../utils":421,"readable-stream":405}],403:[function(e,t,n){(function(e){"use strict";t.exports={isNode:void 0!==e,newBufferFrom:function(t,n){if(e.from&&e.from!==Uint8Array.from)return e.from(t,n);if("number"==typeof t)throw new Error('The "data" argument must not be a number');return new e(t,n)},allocBuffer:function(t){return e.alloc?e.alloc(t):((t=new e(t)).fill(0),t)},isBuffer:function(t){return e.isBuffer(t)},isStream:function(e){return e&&"function"==typeof e.on&&"function"==typeof e.pause&&"function"==typeof e.resume}}}).call(this,e("buffer").Buffer)},{buffer:216}],404:[function(e,t,n){"use strict";function r(e,t){return t=void 0!==t?t:u.createFolders,e=m(e),this.files[e]||p.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]}var i=e("./utf8"),o=e("./utils"),a=e("./stream/GenericWorker"),s=e("./stream/StreamHelper"),u=e("./defaults"),c=e("./compressedObject"),l=e("./zipObject"),h=e("./generate"),f=e("./nodejsUtils"),d=e("./nodejs/NodejsStreamInputAdapter"),p=function(e,t,n){var i=o.getTypeOf(t),s=o.extend(n||{},u),h=(s.date=s.date||new Date,null!==s.compression&&(s.compression=s.compression.toUpperCase()),"string"==typeof s.unixPermissions&&(s.unixPermissions=parseInt(s.unixPermissions,8)),s.unixPermissions&&16384&s.unixPermissions&&(s.dir=!0),s.dosPermissions&&16&s.dosPermissions&&(s.dir=!0),s.dir&&(e=m(e)),s.createFolders&&(p=0<(h=(p="/"===(p=e).slice(-1)?p.substring(0,p.length-1):p).lastIndexOf("/"))?p.substring(0,h):"")&&r.call(this,p,!0),"string"===i&&!1===s.binary&&!1===s.base64),p=(n&&void 0!==n.binary||(s.binary=!h),(t instanceof c&&0===t.uncompressedSize||s.dir||!t||0===t.length)&&(s.base64=!1,s.binary=!0,t="",s.compression="STORE"),t instanceof c||t instanceof a?t:f.isNode&&f.isStream(t)?new d(e,t):o.prepareContent(e,t,s.binary,s.optimizedBinaryString,s.base64));i=new l(e,p,s);this.files[e]=i},m=function(e){return"/"!==e.slice(-1)&&(e+="/"),e};function g(e){return"[object RegExp]"===Object.prototype.toString.call(e)}t.exports={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,n,r;for(t in this.files)this.files.hasOwnProperty(t)&&(r=this.files[t],(n=t.slice(this.root.length,t.length))&&t.slice(0,this.root.length)===this.root&&e(n,r))},filter:function(e){var t=[];return this.forEach((function(n,r){e(n,r)&&t.push(r)})),t},file:function(e,t,n){var r,i;return 1===arguments.length?g(e)?(r=e,this.filter((function(e,t){return!t.dir&&r.test(e)}))):(i=this.files[this.root+e])&&!i.dir?i:null:(e=this.root+e,p.call(this,e,t,n),this)},folder:function(e){var t,n;return e?g(e)?this.filter((function(t,n){return n.dir&&e.test(t)})):(t=this.root+e,t=r.call(this,t),(n=this.clone()).root=t.name,n):this},remove:function(e){e=this.root+e;var t=this.files[e];if(t||("/"!==e.slice(-1)&&(e+="/"),t=this.files[e]),t&&!t.dir)delete this.files[e];else for(var n=this.filter((function(t,n){return n.name.slice(0,e.length)===e})),r=0;r<n.length;r++)delete this.files[n[r].name];return this},generate:function(e){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(e){var t={};try{if((t=o.extend(e||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:i.utf8encode})).type=t.type.toLowerCase(),t.compression=t.compression.toUpperCase(),"binarystring"===t.type&&(t.type="string"),!t.type)throw new Error("No output type specified.");o.checkSupport(t.type),"darwin"!==t.platform&&"freebsd"!==t.platform&&"linux"!==t.platform&&"sunos"!==t.platform||(t.platform="UNIX"),"win32"===t.platform&&(t.platform="DOS");var n=t.comment||this.comment||"",r=h.generateWorker(this,t,n)}catch(e){(r=new a("error")).error(e)}return new s(r,t.type||"string",t.mimeType)},generateAsync:function(e,t){return this.generateInternalStream(e).accumulate(t)},generateNodeStream:function(e,t){return(e=e||{}).type||(e.type="nodebuffer"),this.generateInternalStream(e).toNodejsStream(t)}}},{"./compressedObject":391,"./defaults":394,"./generate":398,"./nodejs/NodejsStreamInputAdapter":401,"./nodejsUtils":403,"./stream/GenericWorker":417,"./stream/StreamHelper":418,"./utf8":420,"./utils":421,"./zipObject":424}],405:[function(e,t,n){"use strict";t.exports=e("stream")},{stream:506}],406:[function(e,t,n){"use strict";var r=e("./DataReader");function i(e){r.call(this,e);for(var t=0;t<this.data.length;t++)e[t]=255&e[t]}e("../utils").inherits(i,r),i.prototype.byteAt=function(e){return this.data[this.zero+e]},i.prototype.lastIndexOfSignature=function(e){for(var t=e.charCodeAt(0),n=e.charCodeAt(1),r=e.charCodeAt(2),i=e.charCodeAt(3),o=this.length-4;0<=o;--o)if(this.data[o]===t&&this.data[o+1]===n&&this.data[o+2]===r&&this.data[o+3]===i)return o-this.zero;return-1},i.prototype.readAndCheckSignature=function(e){var t=e.charCodeAt(0),n=e.charCodeAt(1),r=e.charCodeAt(2),i=(e=e.charCodeAt(3),this.readData(4));return t===i[0]&&n===i[1]&&r===i[2]&&e===i[3]},i.prototype.readData=function(e){var t;return this.checkOffset(e),0===e?[]:(t=this.data.slice(this.zero+this.index,this.zero+this.index+e),this.index+=e,t)},t.exports=i},{"../utils":421,"./DataReader":407}],407:[function(e,t,n){"use strict";var r=e("../utils");function i(e){this.data=e,this.length=e.length,this.index=0,this.zero=0}i.prototype={checkOffset:function(e){this.checkIndex(this.index+e)},checkIndex:function(e){if(this.length<this.zero+e||e<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+e+"). Corrupted zip ?")},setIndex:function(e){this.checkIndex(e),this.index=e},skip:function(e){this.setIndex(this.index+e)},byteAt:function(e){},readInt:function(e){var t,n=0;for(this.checkOffset(e),t=this.index+e-1;t>=this.index;t--)n=(n<<8)+this.byteAt(t);return this.index+=e,n},readString:function(e){return r.transformTo("string",this.readData(e))},readData:function(e){},lastIndexOfSignature:function(e){},readAndCheckSignature:function(e){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},t.exports=i},{"../utils":421}],408:[function(e,t,n){"use strict";var r=e("./Uint8ArrayReader");function i(e){r.call(this,e)}e("../utils").inherits(i,r),i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":421,"./Uint8ArrayReader":410}],409:[function(e,t,n){"use strict";var r=e("./DataReader");function i(e){r.call(this,e)}e("../utils").inherits(i,r),i.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},i.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},i.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":421,"./DataReader":407}],410:[function(e,t,n){"use strict";var r=e("./ArrayReader");function i(e){r.call(this,e)}e("../utils").inherits(i,r),i.prototype.readData=function(e){var t;return this.checkOffset(e),0===e?new Uint8Array(0):(t=this.data.subarray(this.zero+this.index,this.zero+this.index+e),this.index+=e,t)},t.exports=i},{"../utils":421,"./ArrayReader":406}],411:[function(e,t,n){"use strict";var r=e("../utils"),i=e("../support"),o=e("./ArrayReader"),a=e("./StringReader"),s=e("./NodeBufferReader"),u=e("./Uint8ArrayReader");t.exports=function(e){var t=r.getTypeOf(e);return r.checkSupport(t),"string"!==t||i.uint8array?"nodebuffer"===t?new s(e):i.uint8array?new u(r.transformTo("uint8array",e)):new o(r.transformTo("array",e)):new a(e)}},{"../support":419,"../utils":421,"./ArrayReader":406,"./NodeBufferReader":408,"./StringReader":409,"./Uint8ArrayReader":410}],412:[function(e,t,n){"use strict";n.LOCAL_FILE_HEADER="PK",n.CENTRAL_FILE_HEADER="PK",n.CENTRAL_DIRECTORY_END="PK",n.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",n.ZIP64_CENTRAL_DIRECTORY_END="PK",n.DATA_DESCRIPTOR="PK\b"},{}],413:[function(e,t,n){"use strict";var r=e("./GenericWorker"),i=e("../utils");function o(e){r.call(this,"ConvertWorker to "+e),this.destType=e}i.inherits(o,r),o.prototype.processChunk=function(e){this.push({data:i.transformTo(this.destType,e.data),meta:e.meta})},t.exports=o},{"../utils":421,"./GenericWorker":417}],414:[function(e,t,n){"use strict";var r=e("./GenericWorker"),i=e("../crc32");function o(){r.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}e("../utils").inherits(o,r),o.prototype.processChunk=function(e){this.streamInfo.crc32=i(e.data,this.streamInfo.crc32||0),this.push(e)},t.exports=o},{"../crc32":393,"../utils":421,"./GenericWorker":417}],415:[function(e,t,n){"use strict";var r=e("../utils"),i=e("./GenericWorker");function o(e){i.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}r.inherits(o,i),o.prototype.processChunk=function(e){var t;e&&(t=this.streamInfo[this.propName]||0,this.streamInfo[this.propName]=t+e.data.length),i.prototype.processChunk.call(this,e)},t.exports=o},{"../utils":421,"./GenericWorker":417}],416:[function(e,t,n){"use strict";var r=e("../utils"),i=e("./GenericWorker");function o(e){i.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then((function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=r.getTypeOf(e),t.isPaused||t._tickAndRepeat()}),(function(e){t.error(e)}))}r.inherits(o,i),o.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},o.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,r.delay(this._tickAndRepeat,[],this)),!0)},o.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(r.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},o.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,t);break;case"uint8array":e=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=o},{"../utils":421,"./GenericWorker":417}],417:[function(e,t,n){"use strict";function r(e){this.name=e||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}r.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var n=0;n<this._listeners[e].length;n++)this._listeners[e][n].call(this,t)},pipe:function(e){return e.registerPrevious(this)},registerPrevious:function(e){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=e.streamInfo,this.mergeStreamInfo(),this.previous=e;var t=this;return e.on("data",(function(e){t.processChunk(e)})),e.on("end",(function(){t.end()})),e.on("error",(function(e){t.error(e)})),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){var e;return!(!this.isPaused||this.isFinished||(e=this.isPaused=!1,this.generatedError&&(this.error(this.generatedError),e=!0),this.previous&&this.previous.resume(),e))},flush:function(){},processChunk:function(e){this.push(e)},withStreamInfo:function(e,t){return this.extraStreamInfo[e]=t,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var e in this.extraStreamInfo)this.extraStreamInfo.hasOwnProperty(e)&&(this.streamInfo[e]=this.extraStreamInfo[e])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var e="Worker "+this.name;return this.previous?this.previous+" -> "+e:e}},t.exports=r},{}],418:[function(e,t,n){(function(n){"use strict";var r=e("../utils"),i=e("./ConvertWorker"),o=e("./GenericWorker"),a=e("../base64"),s=e("../support"),u=e("../external"),c=null;if(s.nodestream)try{c=e("../nodejs/NodejsStreamOutputAdapter")}catch(s){}function l(e,t,n){var a=t;switch(t){case"blob":case"arraybuffer":a="uint8array";break;case"base64":a="string"}try{this._internalType=a,this._outputType=t,this._mimeType=n,r.checkSupport(a),this._worker=e.pipe(new i(a)),e.lock()}catch(e){this._worker=new o("error"),this._worker.error(e)}}l.prototype={accumulate:function(e){return t=this,i=e,new u.Promise((function(e,o){var s=[],u=t._internalType,c=t._outputType,l=t._mimeType;t.on("data",(function(e,t){s.push(e),i&&i(t)})).on("error",(function(e){s=[],o(e)})).on("end",(function(){try{var t=function(e,t,n){switch(e){case"blob":return r.newBlob(r.transformTo("arraybuffer",t),n);case"base64":return a.encode(t);default:return r.transformTo(e,t)}}(c,function(e,t){for(var r=0,i=null,o=0,a=0;a<t.length;a++)o+=t[a].length;switch(e){case"string":return t.join("");case"array":return Array.prototype.concat.apply([],t);case"uint8array":for(i=new Uint8Array(o),a=0;a<t.length;a++)i.set(t[a],r),r+=t[a].length;return i;case"nodebuffer":return n.concat(t);default:throw new Error("concat : unsupported type '"+e+"'")}}(u,s),l);e(t)}catch(t){o(t)}s=[]})).resume()}));var t,i},on:function(e,t){var n=this;return"data"===e?this._worker.on(e,(function(e){t.call(n,e.data,e.meta)})):this._worker.on(e,(function(){r.delay(t,arguments,n)})),this},resume:function(){return r.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(e){if(r.checkSupport("nodestream"),"nodebuffer"!==this._outputType)throw new Error(this._outputType+" is not supported by this method");return new c(this,{objectMode:"nodebuffer"!==this._outputType},e)}},t.exports=l}).call(this,e("buffer").Buffer)},{"../base64":390,"../external":395,"../nodejs/NodejsStreamOutputAdapter":402,"../support":419,"../utils":421,"./ConvertWorker":413,"./GenericWorker":417,buffer:216}],419:[function(e,t,n){(function(t){"use strict";if(n.base64=!0,n.array=!0,n.string=!0,n.arraybuffer="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,n.nodebuffer=void 0!==t,n.uint8array="undefined"!=typeof Uint8Array,"undefined"==typeof ArrayBuffer)n.blob=!1;else{t=new ArrayBuffer(0);try{n.blob=0===new Blob([t],{type:"application/zip"}).size}catch(e){try{var r=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);r.append(t),n.blob=0===r.getBlob("application/zip").size}catch(e){n.blob=!1}}}try{n.nodestream=!!e("readable-stream").Readable}catch(e){n.nodestream=!1}}).call(this,e("buffer").Buffer)},{buffer:216,"readable-stream":405}],420:[function(e,t,n){"use strict";for(var r=e("./utils"),i=e("./support"),o=e("./nodejsUtils"),a=e("./stream/GenericWorker"),s=new Array(256),u=0;u<256;u++)s[u]=252<=u?6:248<=u?5:240<=u?4:224<=u?3:192<=u?2:1;function c(){a.call(this,"utf-8 decode"),this.leftOver=null}function l(){a.call(this,"utf-8 encode")}s[254]=s[254]=1,n.utf8encode=function(e){if(i.nodebuffer)return o.newBufferFrom(e,"utf-8");for(var t,n,r,a,s=e,u=s.length,c=0,l=0;l<u;l++)55296==(64512&(n=s.charCodeAt(l)))&&l+1<u&&56320==(64512&(r=s.charCodeAt(l+1)))&&(n=65536+(n-55296<<10)+(r-56320),l++),c+=n<128?1:n<2048?2:n<65536?3:4;for(t=new(i.uint8array?Uint8Array:Array)(c),l=a=0;a<c;l++)55296==(64512&(n=s.charCodeAt(l)))&&l+1<u&&56320==(64512&(r=s.charCodeAt(l+1)))&&(n=65536+(n-55296<<10)+(r-56320),l++),n<128?t[a++]=n:(n<2048?t[a++]=192|n>>>6:(n<65536?t[a++]=224|n>>>12:(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63),t[a++]=128|n>>>6&63),t[a++]=128|63&n);return t},n.utf8decode=function(e){if(i.nodebuffer)return r.transformTo("nodebuffer",e).toString("utf-8");for(var t,n,o=e=r.transformTo(i.uint8array?"uint8array":"array",e),a=o.length,u=new Array(2*a),c=0,l=0;l<a;)if((t=o[l++])<128)u[c++]=t;else if(4<(n=s[t]))u[c++]=65533,l+=n-1;else{for(t&=2===n?31:3===n?15:7;1<n&&l<a;)t=t<<6|63&o[l++],n--;1<n?u[c++]=65533:t<65536?u[c++]=t:(t-=65536,u[c++]=55296|t>>10&1023,u[c++]=56320|1023&t)}return u.length!==c&&(u.subarray?u=u.subarray(0,c):u.length=c),r.applyFromCharCode(u)},r.inherits(c,a),c.prototype.processChunk=function(e){var t=r.transformTo(i.uint8array?"uint8array":"array",e.data),o=(this.leftOver&&this.leftOver.length&&(i.uint8array?(o=t,(t=new Uint8Array(o.length+this.leftOver.length)).set(this.leftOver,0),t.set(o,this.leftOver.length)):t=this.leftOver.concat(t),this.leftOver=null),function(e,t){for(var n=(t=(t=t||e.length)>e.length?e.length:t)-1;0<=n&&128==(192&e[n]);)n--;return!(n<0||0===n)&&n+s[e[n]]>t?n:t}(t)),a=t;o!==t.length&&(i.uint8array?(a=t.subarray(0,o),this.leftOver=t.subarray(o,t.length)):(a=t.slice(0,o),this.leftOver=t.slice(o,t.length))),this.push({data:n.utf8decode(a),meta:e.meta})},c.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=c,r.inherits(l,a),l.prototype.processChunk=function(e){this.push({data:n.utf8encode(e.data),meta:e.meta})},n.Utf8EncodeWorker=l},{"./nodejsUtils":403,"./stream/GenericWorker":417,"./support":419,"./utils":421}],421:[function(e,t,n){"use strict";var r=e("./support"),i=e("./base64"),o=e("./nodejsUtils"),a=e("set-immediate-shim"),s=e("./external");function u(e){return e}function c(e,t){for(var n=0;n<e.length;++n)t[n]=255&e.charCodeAt(n);return t}n.newBlob=function(e,t){n.checkSupport("blob");try{return new Blob([e],{type:t})}catch(n){try{var r=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return r.append(e),r.getBlob(t)}catch(e){throw new Error("Bug : can't construct the Blob.")}}};var l={stringifyByChunk:function(e,t,n){var r=[],i=0,o=e.length;if(o<=n)return String.fromCharCode.apply(null,e);for(;i<o;)"array"===t||"nodebuffer"===t?r.push(String.fromCharCode.apply(null,e.slice(i,Math.min(i+n,o)))):r.push(String.fromCharCode.apply(null,e.subarray(i,Math.min(i+n,o)))),i+=n;return r.join("")},stringifyByChar:function(e){for(var t="",n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t},applyCanBeUsed:{uint8array:function(){try{return r.uint8array&&1===String.fromCharCode.apply(null,new Uint8Array(1)).length}catch(e){return!1}}(),nodebuffer:function(){try{return r.nodebuffer&&1===String.fromCharCode.apply(null,o.allocBuffer(1)).length}catch(e){return!1}}()}};function h(e){var t=65536,r=n.getTypeOf(e),i=!0;if("uint8array"===r?i=l.applyCanBeUsed.uint8array:"nodebuffer"===r&&(i=l.applyCanBeUsed.nodebuffer),i)for(;1<t;)try{return l.stringifyByChunk(e,r,t)}catch(e){t=Math.floor(t/2)}return l.stringifyByChar(e)}function f(e,t){for(var n=0;n<e.length;n++)t[n]=e[n];return t}n.applyFromCharCode=h;var d={};d.string={string:u,array:function(e){return c(e,new Array(e.length))},arraybuffer:function(e){return d.string.uint8array(e).buffer},uint8array:function(e){return c(e,new Uint8Array(e.length))},nodebuffer:function(e){return c(e,o.allocBuffer(e.length))}},d.array={string:h,array:u,arraybuffer:function(e){return new Uint8Array(e).buffer},uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return o.newBufferFrom(e)}},d.arraybuffer={string:function(e){return h(new Uint8Array(e))},array:function(e){return f(new Uint8Array(e),new Array(e.byteLength))},arraybuffer:u,uint8array:function(e){return new Uint8Array(e)},nodebuffer:function(e){return o.newBufferFrom(new Uint8Array(e))}},d.uint8array={string:h,array:function(e){return f(e,new Array(e.length))},arraybuffer:function(e){return e.buffer},uint8array:u,nodebuffer:function(e){return o.newBufferFrom(e)}},d.nodebuffer={string:h,array:function(e){return f(e,new Array(e.length))},arraybuffer:function(e){return d.nodebuffer.uint8array(e).buffer},uint8array:function(e){return f(e,new Uint8Array(e.length))},nodebuffer:u},n.transformTo=function(e,t){if(t=t||"",!e)return t;n.checkSupport(e);var r=n.getTypeOf(t);return d[r][e](t)},n.getTypeOf=function(e){return"string"==typeof e?"string":"[object Array]"===Object.prototype.toString.call(e)?"array":r.nodebuffer&&o.isBuffer(e)?"nodebuffer":r.uint8array&&e instanceof Uint8Array?"uint8array":r.arraybuffer&&e instanceof ArrayBuffer?"arraybuffer":void 0},n.checkSupport=function(e){if(!r[e.toLowerCase()])throw new Error(e+" is not supported by this platform")},n.MAX_VALUE_16BITS=65535,n.MAX_VALUE_32BITS=-1,n.pretty=function(e){for(var t,n="",r=0;r<(e||"").length;r++)n+="\\x"+((t=e.charCodeAt(r))<16?"0":"")+t.toString(16).toUpperCase();return n},n.delay=function(e,t,n){a((function(){e.apply(n||null,t||[])}))},n.inherits=function(e,t){function n(){}n.prototype=t.prototype,e.prototype=new n},n.extend=function(){for(var e,t={},n=0;n<arguments.length;n++)for(e in arguments[n])arguments[n].hasOwnProperty(e)&&void 0===t[e]&&(t[e]=arguments[n][e]);return t},n.prepareContent=function(e,t,o,a,u){return s.Promise.resolve(t).then((function(e){return r.blob&&(e instanceof Blob||-1!==["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(e)))&&"undefined"!=typeof FileReader?new s.Promise((function(t,n){var r=new FileReader;r.onload=function(e){t(e.target.result)},r.onerror=function(e){n(e.target.error)},r.readAsArrayBuffer(e)})):e})).then((function(t){var l=n.getTypeOf(t);return l?("arraybuffer"===l?t=n.transformTo("uint8array",t):"string"===l&&(u?t=i.decode(t):o&&!0!==a&&(t=c(l=t,new(r.uint8array?Uint8Array:Array)(l.length)))),t):s.Promise.reject(new Error("Can't read the data of '"+e+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))}))}},{"./base64":390,"./external":395,"./nodejsUtils":403,"./support":419,"set-immediate-shim":497}],422:[function(e,t,n){"use strict";var r=e("./reader/readerFor"),i=e("./utils"),o=e("./signature"),a=e("./zipEntry"),s=(e("./utf8"),e("./support"));function u(e){this.files=[],this.loadOptions=e}u.prototype={checkSignature:function(e){var t;if(!this.reader.readAndCheckSignature(e))throw this.reader.index-=4,t=this.reader.readString(4),new Error("Corrupted zip or bug: unexpected signature ("+i.pretty(t)+", expected "+i.pretty(e)+")")},isSignature:function(e,t){var n=this.reader.index;this.reader.setIndex(e),e=this.reader.readString(4)===t;return this.reader.setIndex(n),e},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var e=this.reader.readData(this.zipCommentLength),t=s.uint8array?"uint8array":"array";t=i.transformTo(t,e);this.zipComment=this.loadOptions.decodeFileName(t)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var e,t,n,r=this.zip64EndOfCentralSize-44;0<r;)e=this.reader.readInt(2),t=this.reader.readInt(4),n=this.reader.readData(t),this.zip64ExtensibleData[e]={id:e,length:t,value:n}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){for(var e,t=0;t<this.files.length;t++)e=this.files[t],this.reader.setIndex(e.localHeaderOffset),this.checkSignature(o.LOCAL_FILE_HEADER),e.readLocalPart(this.reader),e.handleUTF8(),e.processAttributes()},readCentralDir:function(){var e;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(o.CENTRAL_FILE_HEADER);)(e=new a({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(e);if(this.centralDirRecords!==this.files.length&&0!==this.centralDirRecords&&0===this.files.length)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var e=this.reader.lastIndexOfSignature(o.CENTRAL_DIRECTORY_END);if(e<0)throw this.isSignature(0,o.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(e);var t=e;if(this.checkSignature(o.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===i.MAX_VALUE_16BITS||this.diskWithCentralDirStart===i.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===i.MAX_VALUE_16BITS||this.centralDirRecords===i.MAX_VALUE_16BITS||this.centralDirSize===i.MAX_VALUE_32BITS||this.centralDirOffset===i.MAX_VALUE_32BITS){if(this.zip64=!0,(e=this.reader.lastIndexOfSignature(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(e),this.checkSignature(o.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,o.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(o.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(o.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}if(e=this.centralDirOffset+this.centralDirSize,0<(e=t-(e=this.zip64?e+20+(12+this.zip64EndOfCentralSize):e)))this.isSignature(t,o.CENTRAL_FILE_HEADER)||(this.reader.zero=e);else if(e<0)throw new Error("Corrupted zip: missing "+Math.abs(e)+" bytes.")},prepareReader:function(e){this.reader=r(e)},load:function(e){this.prepareReader(e),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},t.exports=u},{"./reader/readerFor":411,"./signature":412,"./support":419,"./utf8":420,"./utils":421,"./zipEntry":423}],423:[function(e,t,n){"use strict";var r=e("./reader/readerFor"),i=e("./utils"),o=e("./compressedObject"),a=e("./crc32"),s=e("./utf8"),u=e("./compressions"),c=e("./support");function l(e,t){this.options=e,this.loadOptions=t}l.prototype={isEncrypted:function(){return 1==(1&this.bitFlag)},useUTF8:function(){return 2048==(2048&this.bitFlag)},readLocalPart:function(e){var t;if(e.skip(22),this.fileNameLength=e.readInt(2),t=e.readInt(2),this.fileName=e.readData(this.fileNameLength),e.skip(t),-1===this.compressedSize||-1===this.uncompressedSize)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if(null===(t=function(e){for(var t in u)if(u.hasOwnProperty(t)&&u[t].magic===e)return u[t];return null}(this.compressionMethod)))throw new Error("Corrupted zip : compression "+i.pretty(this.compressionMethod)+" unknown (inner file : "+i.transformTo("string",this.fileName)+")");this.decompressed=new o(this.compressedSize,this.uncompressedSize,this.crc32,t,e.readData(this.compressedSize))},readCentralPart:function(e){this.versionMadeBy=e.readInt(2),e.skip(2),this.bitFlag=e.readInt(2),this.compressionMethod=e.readString(2),this.date=e.readDate(),this.crc32=e.readInt(4),this.compressedSize=e.readInt(4),this.uncompressedSize=e.readInt(4);var t=e.readInt(2);if(this.extraFieldsLength=e.readInt(2),this.fileCommentLength=e.readInt(2),this.diskNumberStart=e.readInt(2),this.internalFileAttributes=e.readInt(2),this.externalFileAttributes=e.readInt(4),this.localHeaderOffset=e.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");e.skip(t),this.readExtraFields(e),this.parseZIP64ExtraField(e),this.fileComment=e.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var e=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),0==e&&(this.dosPermissions=63&this.externalFileAttributes),3==e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(e){var t;this.extraFields[1]&&(t=r(this.extraFields[1].value),this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=t.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=t.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=t.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=t.readInt(4)))},readExtraFields:function(e){var t,n,r,i=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index+4<i;)t=e.readInt(2),n=e.readInt(2),r=e.readData(n),this.extraFields[t]={id:t,length:n,value:r};e.setIndex(i)},handleUTF8:function(){var e,t=c.uint8array?"uint8array":"array";this.useUTF8()?(this.fileNameStr=s.utf8decode(this.fileName),this.fileCommentStr=s.utf8decode(this.fileComment)):(null!==(e=this.findExtraFieldUnicodePath())?this.fileNameStr=e:(e=i.transformTo(t,this.fileName),this.fileNameStr=this.loadOptions.decodeFileName(e)),null!==(e=this.findExtraFieldUnicodeComment())?this.fileCommentStr=e:(e=i.transformTo(t,this.fileComment),this.fileCommentStr=this.loadOptions.decodeFileName(e)))},findExtraFieldUnicodePath:function(){var e,t=this.extraFields[28789];return t&&1===(e=r(t.value)).readInt(1)&&a(this.fileName)===e.readInt(4)?s.utf8decode(e.readData(t.length-5)):null},findExtraFieldUnicodeComment:function(){var e,t=this.extraFields[25461];return t&&1===(e=r(t.value)).readInt(1)&&a(this.fileComment)===e.readInt(4)?s.utf8decode(e.readData(t.length-5)):null}},t.exports=l},{"./compressedObject":391,"./compressions":392,"./crc32":393,"./reader/readerFor":411,"./support":419,"./utf8":420,"./utils":421}],424:[function(e,t,n){"use strict";function r(e,t,n){this.name=e,this.dir=n.dir,this.date=n.date,this.comment=n.comment,this.unixPermissions=n.unixPermissions,this.dosPermissions=n.dosPermissions,this._data=t,this._dataBinary=n.binary,this.options={compression:n.compression,compressionOptions:n.compressionOptions}}var i=e("./stream/StreamHelper"),o=e("./stream/DataWorker"),a=e("./utf8"),s=e("./compressedObject"),u=e("./stream/GenericWorker");r.prototype={internalStream:function(e){var t=null,n="string";try{if(!e)throw new Error("No output type specified.");var r="string"===(n=e.toLowerCase())||"text"===n,o=("binarystring"!==n&&"text"!==n||(n="string"),t=this._decompressWorker(),!this._dataBinary);o&&!r&&(t=t.pipe(new a.Utf8EncodeWorker)),!o&&r&&(t=t.pipe(new a.Utf8DecodeWorker))}catch(e){(t=new u("error")).error(e)}return new i(t,n,"")},async:function(e,t){return this.internalStream(e).accumulate(t)},nodeStream:function(e,t){return this.internalStream(e||"nodebuffer").toNodejsStream(t)},_compressWorker:function(e,t){var n;return this._data instanceof s&&this._data.compression.magic===e.magic?this._data.getCompressedWorker():(n=this._decompressWorker(),this._dataBinary||(n=n.pipe(new a.Utf8EncodeWorker)),s.createWorkerFrom(n,e,t))},_decompressWorker:function(){return this._data instanceof s?this._data.getContentWorker():this._data instanceof u?this._data:new o(this._data)}};for(var c=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],l=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},h=0;h<c.length;h++)r.prototype[c[h]]=l;t.exports=r},{"./compressedObject":391,"./stream/DataWorker":416,"./stream/GenericWorker":417,"./stream/StreamHelper":418,"./utf8":420}],425:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=e("immediate");function o(){}var a={},s=["REJECTED"],u=["FULFILLED"],c=["PENDING"];function l(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=c,this.queue=[],this.outcome=void 0,e!==o&&p(this,e)}function h(e,t,n){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof n&&(this.onRejected=n,this.callRejected=this.otherCallRejected)}function f(e,t,n){i((function(){var r;try{r=t(n)}catch(r){return a.reject(e,r)}r===e?a.reject(e,new TypeError("Cannot resolve promise with itself")):a.resolve(e,r)}))}function d(e){var t=e&&e.then;if(e&&("object"===r(e)||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function p(e,t){var n=!1;function r(t){n||(n=!0,a.reject(e,t))}function i(t){n||(n=!0,a.resolve(e,t))}var o=m((function(){t(i,r)}));"error"===o.status&&r(o.value)}function m(e,t){var n={};try{n.value=e(t),n.status="success"}catch(e){n.status="error",n.value=e}return n}(t.exports=l).prototype.finally=function(e){var t;return"function"!=typeof e?this:(t=this.constructor,this.then((function(n){return t.resolve(e()).then((function(){return n}))}),(function(n){return t.resolve(e()).then((function(){throw n}))})))},l.prototype.catch=function(e){return this.then(null,e)},l.prototype.then=function(e,t){var n;return"function"!=typeof e&&this.state===u||"function"!=typeof t&&this.state===s?this:(n=new this.constructor(o),this.state!==c?f(n,this.state===u?e:t,this.outcome):this.queue.push(new h(n,e,t)),n)},h.prototype.callFulfilled=function(e){a.resolve(this.promise,e)},h.prototype.otherCallFulfilled=function(e){f(this.promise,this.onFulfilled,e)},h.prototype.callRejected=function(e){a.reject(this.promise,e)},h.prototype.otherCallRejected=function(e){f(this.promise,this.onRejected,e)},a.resolve=function(e,t){var n=m(d,t);if("error"===n.status)return a.reject(e,n.value);if(n=n.value)p(e,n);else{e.state=u,e.outcome=t;for(var r=-1,i=e.queue.length;++r<i;)e.queue[r].callFulfilled(t)}return e},a.reject=function(e,t){e.state=s,e.outcome=t;for(var n=-1,r=e.queue.length;++n<r;)e.queue[n].callRejected(t);return e},l.resolve=function(e){return e instanceof this?e:a.resolve(new this(o),e)},l.reject=function(e){var t=new this(o);return a.reject(t,e)},l.all=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,r=!1;if(!n)return this.resolve([]);for(var i=new Array(n),s=0,u=-1,c=new this(o);++u<n;)!function(e,o){t.resolve(e).then((function(e){i[o]=e,++s!==n||r||(r=!0,a.resolve(c,i))}),(function(e){r||(r=!0,a.reject(c,e))}))}(e[u],u);return c},l.race=function(e){if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var t=e.length,n=!1;if(!t)return this.resolve([]);for(var r,i=-1,s=new this(o);++i<t;)r=e[i],this.resolve(r).then((function(e){n||(n=!0,a.resolve(s,e))}),(function(e){n||(n=!0,a.reject(s,e))}));return s}},{immediate:386}],426:[function(e,n,r){(function(e){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var r=/[\\^$.*+?()[\]{}|]/g,i=RegExp(r.source),o=(e="object"==(void 0===e?"undefined":t(e))&&e&&e.Object===Object&&e,"object"==("undefined"==typeof self?"undefined":t(self))&&self&&self.Object===Object&&self),a=(e=e||o||Function("return this")(),Object.prototype.toString),s=(e=(o=e.Symbol)?o.prototype:void 0)?e.toString:void 0;n.exports=function(e){var n,o;return(e=null==e?"":"string"==typeof(n=e)?n:"symbol"==t(o=n)||o&&"object"==t(o)&&"[object Symbol]"==a.call(o)?s?s.call(n):"":"0"==(o=n+"")&&1/n==-1/0?"-0":o)&&i.test(e)?e.replace(r,"\\$&"):e}}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],427:[function(e,n,r){(function(e){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i="[object Arguments]",o="[object Map]",a="[object Object]",s="[object Set]",u=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,c=/^\w*$/,l=/^\./,h=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,f=/\\(\\)?/g,d=/^\[object .+?Constructor\]$/,p=/^(?:0|[1-9]\d*)$/,m={},g=(e=(m["[object Float32Array]"]=m["[object Float64Array]"]=m["[object Int8Array]"]=m["[object Int16Array]"]=m["[object Int32Array]"]=m["[object Uint8Array]"]=m["[object Uint8ClampedArray]"]=m["[object Uint16Array]"]=m["[object Uint32Array]"]=!0,m[i]=m["[object Array]"]=m["[object ArrayBuffer]"]=m["[object Boolean]"]=m["[object DataView]"]=m["[object Date]"]=m["[object Error]"]=m["[object Function]"]=m[o]=m["[object Number]"]=m[a]=m["[object RegExp]"]=m[s]=m["[object String]"]=m["[object WeakMap]"]=!1,"object"==(void 0===e?"undefined":t(e))&&e&&e.Object===Object&&e),"object"==("undefined"==typeof self?"undefined":t(self))&&self&&self.Object===Object&&self),A=(g=e||g||Function("return this")(),(E=(v="object"==(void 0===r?"undefined":t(r))&&r&&!r.nodeType&&r)&&"object"==(void 0===n?"undefined":t(n))&&n&&!n.nodeType&&n)&&E.exports===v&&e.process),v=(E=function(){try{return A&&A.binding("util")}catch(e){}}())&&E.isTypedArray;function b(e,t,n,r){for(var i=-1,o=e?e.length:0;++i<o;){var a=e[i];t(r,a,n(a),e)}return r}function y(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}function w(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function x(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}e=Array.prototype;var C,k,E=Function.prototype,S=Object.prototype,_=g["__core-js_shared__"],O=(_=/[^.]+$/.exec(_&&_.keys&&_.keys.IE_PROTO||""))?"Symbol(src)_1."+_:"",T=E.toString,D=S.hasOwnProperty,B=S.toString,I=RegExp("^"+T.call(D).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),M=(_=g.Symbol,g.Uint8Array),j=S.propertyIsEnumerable,N=e.splice,F=(C=Object.keys,k=Object,function(e){return C(k(e))}),R=(E=ue(g,"DataView"),ue(g,"Map")),P=(e=ue(g,"Promise"),ue(g,"Set")),L=(g=ue(g,"WeakMap"),ue(Object,"create")),U=Ae(E),z=Ae(R),H=Ae(e),$=Ae(P),Q=Ae(g),V=(_=_?_.prototype:void 0)?_.valueOf:void 0,q=_?_.toString:void 0;function G(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function W(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function K(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Y(e){var t=-1,n=e?e.length:0;for(this.__data__=new K;++t<n;)this.add(e[t])}function X(e){this.__data__=new W(e)}function J(e,t){for(var n=e.length;n--;)if(be(e[n][0],t))return n;return-1}function Z(e,t,n,r){return function(e,t){if(null!=e){if(!xe(e))return ee(e,t);for(var n=e.length,r=-1,i=Object(e);++r<n&&!1!==t(i[r],r,i););}}(e,(function(e,i,o){t(r,e,n(e),o)})),r}G.prototype.clear=function(){this.__data__=L?L(null):{}},G.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},G.prototype.get=function(e){var t,n=this.__data__;return L?"__lodash_hash_undefined__"===(t=n[e])?void 0:t:D.call(n,e)?n[e]:void 0},G.prototype.has=function(e){var t=this.__data__;return L?void 0!==t[e]:D.call(t,e)},G.prototype.set=function(e,t){return this.__data__[e]=L&&void 0===t?"__lodash_hash_undefined__":t,this},W.prototype.clear=function(){this.__data__=[]},W.prototype.delete=function(e){var t=this.__data__;return!((e=J(t,e))<0||(e==t.length-1?t.pop():N.call(t,e,1),0))},W.prototype.get=function(e){var t=this.__data__;return(e=J(t,e))<0?void 0:t[e][1]},W.prototype.has=function(e){return-1<J(this.__data__,e)},W.prototype.set=function(e,t){var n=this.__data__,r=J(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},K.prototype.clear=function(){this.__data__={hash:new G,map:new(R||W),string:new G}},K.prototype.delete=function(e){return se(this,e).delete(e)},K.prototype.get=function(e){return se(this,e).get(e)},K.prototype.has=function(e){return se(this,e).has(e)},K.prototype.set=function(e,t){return se(this,e).set(e,t),this},Y.prototype.add=Y.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Y.prototype.has=function(e){return this.__data__.has(e)},X.prototype.clear=function(){this.__data__=new W},X.prototype.delete=function(e){return this.__data__.delete(e)},X.prototype.get=function(e){return this.__data__.get(e)},X.prototype.has=function(e){return this.__data__.has(e)},X.prototype.set=function(e,t){var n=this.__data__;if(n instanceof W){var r=n.__data__;if(!R||r.length<199)return r.push([e,t]),this;n=this.__data__=new K(r)}return n.set(e,t),this},ee=function(e,t){return e&&te(e,t,De)};var ee,te=function(e,t,n){for(var r=-1,i=Object(e),o=n(e),a=o.length;a--;){var s=o[++r];if(!1===t(i[s],s,i))break}return e};function ne(e,t){for(var n=0,r=(t=he(t,e)?[t]:oe(t)).length;null!=e&&n<r;)e=e[ge(t[n++])];return n&&n==r?e:void 0}function re(e,t){return null!=e&&t in Object(e)}function ie(e,t,n,r,u){return e===t||(null==e||null==t||!Ee(e)&&!Se(t)?e!=e&&t!=t:function(e,t,n,r,u,c){var l=we(e),h=we(t),f="[object Array]",d="[object Array]",p=(h=(l||(f=(f=ce(e))==i?a:f),h||(d=(d=ce(t))==i?a:d),f==a&&!y(e)),d==a&&!y(t));if((d=f==d)&&!h)return c=c||new X,(l||Te(e)?ae:function(e,t,n,r,i,a){switch(f){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!n(new M(e),new M(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return be(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case o:var u=w;case s:if(u=u||x,e.size!=t.size&&!(2&i))return!1;var c=a.get(e);return c?c==t:(i|=1,a.set(e,t),c=ae(u(e),u(t),n,r,i,a),a.delete(e),c);case"[object Symbol]":if(V)return V.call(e)==V.call(t)}return!1})(e,t,n,r,u,c);if(!(2&u)&&(l=h&&D.call(e,"__wrapped__"),h=p&&D.call(t,"__wrapped__"),l||h))return n(l?e.value():e,h?t.value():t,r,u,c=c||new X);if(d){var m=e,g=t,A=n,v=r,b=u,C=c=c||new X,k=2&b,E=De(m),S=E.length;if(S!=De(g).length&&!k)return!1;for(var _=S;_--;){var O=E[_];if(!(k?O in g:D.call(g,O)))return!1}if((p=C.get(m))&&C.get(g))return p==g;for(var T=!0,B=(C.set(m,g),C.set(g,m),k);++_<S;){var I,j=m[O=E[_]],N=g[O];if(!(void 0===(I=v?k?v(N,j,O,g,m,C):v(j,N,O,m,g,C):I)?j===N||A(j,N,v,b,C):I)){T=!1;break}B=B||"constructor"==O}return T&&!B&&(p=m.constructor)!=(l=g.constructor)&&"constructor"in m&&"constructor"in g&&!("function"==typeof p&&p instanceof p&&"function"==typeof l&&l instanceof l)&&(T=!1),C.delete(m),C.delete(g),T}return!1}(e,t,ie,n,r,u))}function oe(e){return we(e)?e:me(e)}function ae(e,t,n,r,i,o){var a=2&i,s=e.length,u=t.length;if(s!=u&&!(a&&s<u))return!1;if((u=o.get(e))&&o.get(t))return u==t;var c=-1,l=!0,h=1&i?new Y:void 0;for(o.set(e,t),o.set(t,e);++c<s;){var f,d=e[c],p=t[c];if(void 0!==(f=r?a?r(p,d,c,t,e,o):r(d,p,c,e,t,o):f)){if(f)continue;l=!1;break}if(h){if(!function(e,t){for(var n=-1,r=e?e.length:0;++n<r;)if(t(e[n],n))return 1}(t,(function(e,t){return!h.has(t)&&(d===e||n(d,e,r,i,o))&&h.add(t)}))){l=!1;break}}else if(d!==p&&!n(d,p,r,i,o)){l=!1;break}}return o.delete(e),o.delete(t),l}function se(e,n){var r,i;e=e.__data__;return("string"==(i=t(r=n))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==r:null===r)?e["string"==typeof n?"string":"hash"]:e.map}function ue(e,t){return!Ee(t=e=null==e?void 0:e[t])||O&&O in t||!(Ce(t)||y(t)?I:d).test(Ae(t))?void 0:e}var ce=function(e){return B.call(e)};function le(e,t){return!!(t=null==t?9007199254740991:t)&&("number"==typeof e||p.test(e))&&-1<e&&e%1==0&&e<t}function he(e,n){var r;if(!we(e))return"number"==(r=t(e))||"symbol"==r||"boolean"==r||null==e||_e(e)||c.test(e)||!u.test(e)||null!=n&&e in Object(n)}function fe(e){return e==e&&!Ee(e)}function de(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in Object(n))}}(E&&"[object DataView]"!=ce(new E(new ArrayBuffer(1)))||R&&ce(new R)!=o||e&&"[object Promise]"!=ce(e.resolve())||P&&ce(new P)!=s||g&&"[object WeakMap]"!=ce(new g))&&(ce=function(e){var t=B.call(e);if(e=(e=t==a?e.constructor:void 0)?Ae(e):void 0)switch(e){case U:return"[object DataView]";case z:return o;case H:return"[object Promise]";case $:return s;case Q:return"[object WeakMap]"}return t});var pe,me=ve((function(e){e=null==e?"":"string"==typeof(t=e)?t:_e(t)?q?q.call(t):"":"0"==(n=t+"")&&1/t==-1/0?"-0":n;var t,n,r=[];return l.test(e)&&r.push(""),e.replace(h,(function(e,t,n,i){r.push(n?i.replace(f,"$1"):t||e)})),r}));function ge(e){var t;return"string"==typeof e||_e(e)?e:"0"==(t=e+"")&&1/e==-1/0?"-0":t}function Ae(e){if(null!=e){try{return T.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function ve(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");function n(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;return o.has(i)?o.get(i):(r=e.apply(this,r),n.cache=o.set(i,r),r)}return n.cache=new(ve.Cache||K),n}function be(e,t){return e===t||e!=e&&t!=t}function ye(e){return Se(t=e)&&xe(t)&&D.call(e,"callee")&&(!j.call(e,"callee")||B.call(e)==i);var t}pe=function(e,t,n){D.call(e,n)?e[n].push(t):e[n]=[t]},ve.Cache=K;var we=Array.isArray;function xe(e){return null!=e&&ke(e.length)&&!Ce(e)}function Ce(e){return"[object Function]"==(e=Ee(e)?B.call(e):"")||"[object GeneratorFunction]"==e}function ke(e){return"number"==typeof e&&-1<e&&e%1==0&&e<=9007199254740991}function Ee(e){var n=t(e);return e&&("object"==n||"function"==n)}function Se(e){return!!e&&"object"==t(e)}function _e(e){return"symbol"==t(e)||Se(e)&&"[object Symbol]"==B.call(e)}var Oe,Te=v?(Oe=v,function(e){return Oe(e)}):function(e){return Se(e)&&ke(e.length)&&!!m[B.call(e)]};function De(e){return(xe(e)?function(e,t){var n,r=we(e)||ye(e)?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],i=r.length,o=!!i;for(n in e)!t&&!D.call(e,n)||o&&("length"==n||le(n,i))||r.push(n);return r}:function(e){if(e!==("function"==typeof(t=e&&e.constructor)&&t.prototype||S))return F(e);var t,n,r=[];for(n in Object(e))D.call(e,n)&&"constructor"!=n&&r.push(n);return r})(e)}function Be(e){return e}n.exports=function(e,n){return(we(e)?b:Z)(e,pe,function(e){return"function"==typeof e?e:null==e?Be:"object"==t(e)?we(e)?(o=e[0],a=e[1],he(o)&&fe(a)?de(ge(o),a):function(e){var t=void 0===(t=null==e?void 0:ne(e,o))?void 0:t;return void 0===t&&t===a?null!=e&&function(e,t,n){for(var r,i=-1,o=(t=he(t,e)?[t]:oe(t)).length;++i<o;){var a=ge(t[i]);if(!(r=null!=e&&n(e,a)))break;e=e[a]}return r||!!(o=e?e.length:0)&&ke(o)&&le(a,o)&&(we(e)||ye(e))}(e,o,re):ie(a,t,void 0,3)}):1==(i=function(e){for(var t=De(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,fe(i)]}return t}(r=e)).length&&i[0][2]?de(i[0][0],i[0][1]):function(e){return e===r||function(t,n,r){var i=n.length,o=i;if(null==e)return!o;for(t=Object(e);i--;){var a=n[i];if(a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++i<o;){var s,u=t[s=(a=n[i])[0]],c=a[1];if(a[2]){if(void 0===u&&!(s in t))return!1}else if(!ie(c,u,void 0,3,s=new X))return!1}return!0}(0,i)}:he(e=e)?(s=ge(e),function(e){return null==e?void 0:e[s]}):(n=e,function(e){return ne(e,n)});var n,r,i,o,a,s}(n),{})}}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],428:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=Object.prototype.toString;t.exports=function(e){return!0===e||!1===e||!!e&&"object"==r(e)&&"[object Boolean]"==i.call(e)}},{}],429:[function(e,n,r){(function(e){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i="[object Arguments]",o="[object Map]",a="[object Object]",s="[object Set]",u=/^\[object .+?Constructor\]$/,c=/^(?:0|[1-9]\d*)$/,l={},h=(e=(l["[object Float32Array]"]=l["[object Float64Array]"]=l["[object Int8Array]"]=l["[object Int16Array]"]=l["[object Int32Array]"]=l["[object Uint8Array]"]=l["[object Uint8ClampedArray]"]=l["[object Uint16Array]"]=l["[object Uint32Array]"]=!0,l[i]=l["[object Array]"]=l["[object ArrayBuffer]"]=l["[object Boolean]"]=l["[object DataView]"]=l["[object Date]"]=l["[object Error]"]=l["[object Function]"]=l[o]=l["[object Number]"]=l[a]=l["[object RegExp]"]=l[s]=l["[object String]"]=l["[object WeakMap]"]=!1,"object"==(void 0===e?"undefined":t(e))&&e&&e.Object===Object&&e),"object"==("undefined"==typeof self?"undefined":t(self))&&self&&self.Object===Object&&self),f=(h=e||h||Function("return this")(),(B=(B=(A="object"==(void 0===r?"undefined":t(r))&&r&&!r.nodeType&&r)&&"object"==(void 0===n?"undefined":t(n))&&n&&!n.nodeType&&n)&&B.exports===A)&&e.process);e=(A=function(){try{return f&&f.binding&&f.binding("util")}catch(e){}}())&&A.isTypedArray;function d(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function p(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}var m,g,A=Array.prototype,v=Function.prototype,b=Object.prototype,y=h["__core-js_shared__"],w=v.toString,x=b.hasOwnProperty,C=(v=/[^.]+$/.exec(y&&y.keys&&y.keys.IE_PROTO||""))?"Symbol(src)_1."+v:"",k=b.toString,E=RegExp("^"+w.call(x).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),S=(y=B?h.Buffer:void 0,v=h.Symbol,h.Uint8Array),_=b.propertyIsEnumerable,O=A.splice,T=v?v.toStringTag:void 0,D=Object.getOwnPropertySymbols,B=y?y.isBuffer:void 0,I=(A=(m=Object.keys,g=Object,te(h,"DataView")),te(h,"Map")),M=(y=te(h,"Promise"),te(h,"Set")),j=(h=te(h,"WeakMap"),te(Object,"create")),N=ie(A),F=ie(I),R=ie(y),P=ie(M),L=ie(h),U=(v=v?v.prototype:void 0)?v.valueOf:void 0;function z(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function H(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function $(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Q(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new $;++t<n;)this.add(e[t])}function V(e){e=this.__data__=new H(e),this.size=e.size}function q(e,t){var n,r,i,o=se(e),a=!o&&ae(e),s=!o&&!a&&ue(e),u=!o&&!a&&!s&&pe(e),l=o||a||s||u,h=l?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],f=h.length;for(n in e)!t&&!x.call(e,n)||l&&("length"==n||s&&("offset"==n||"parent"==n)||u&&("buffer"==n||"byteLength"==n||"byteOffset"==n)||(r=n,(i=null==(i=f)?9007199254740991:i)&&("number"==typeof r||c.test(r))&&-1<r&&r%1==0&&r<i))||h.push(n);return h}function G(e,t){for(var n=e.length;n--;)if(oe(e[n][0],t))return n;return-1}function W(e){if(null==e)return void 0===e?"[object Undefined]":"[object Null]";if(T&&T in Object(e)){var t=e,n=x.call(t,T),r=t[T];try{var i=!(t[T]=void 0)}catch(t){}var o=k.call(t);return i&&(n?t[T]=r:delete t[T]),o}return k.call(e)}function K(e){return fe(e)&&W(e)==i}function Y(e,t,n,r,u){return e===t||(null==e||null==t||!fe(e)&&!fe(t)?e!=e&&t!=t:function(e,t,n,r,u,c){var l=se(e),h=se(t),f=l?"[object Array]":re(e),m=(h=h?"[object Array]":re(t),(f=f==i?a:f)==a),g=(h=h==i?a:h)==a;if((h=f==h)&&ue(e)){if(!ue(t))return!1;m=!(l=!0)}if(h&&!m)return c=c||new V,(l||pe(e)?J:function(e,t,n,r,i,a){switch(f){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new S(e),new S(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return oe(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case o:var u=d;case s:if(u=u||p,e.size!=t.size&&!(1&n))return!1;var c=a.get(e);return c?c==t:(n|=2,a.set(e,t),c=J(u(e),u(t),n,r,i,a),a.delete(e),c);case"[object Symbol]":if(U)return U.call(e)==U.call(t)}return!1})(e,t,n,r,u,c);if(!(1&n)&&(l=m&&x.call(e,"__wrapped__"),m=g&&x.call(t,"__wrapped__"),l||m))return u(l?e.value():e,m?t.value():t,n,r,c=c||new V);if(h){var A=e,v=t,b=n,y=r,w=u,C=c=c||new V,k=1&b,E=Z(A),_=E.length;if(_!=Z(v).length&&!k)return!1;for(var O=_;O--;){var T=E[O];if(!(k?T in v:x.call(v,T)))return!1}if((g=C.get(A))&&C.get(v))return g==v;for(var D=!0,B=(C.set(A,v),C.set(v,A),k);++O<_;){var I,M=A[T=E[O]],j=v[T];if(!(void 0===(I=y?k?y(j,M,T,v,A,C):y(M,j,T,A,v,C):I)?M===j||w(M,j,b,y,C):I)){D=!1;break}B=B||"constructor"==T}return D&&!B&&(g=A.constructor)!=(l=v.constructor)&&"constructor"in A&&"constructor"in v&&!("function"==typeof g&&g instanceof g&&"function"==typeof l&&l instanceof l)&&(D=!1),C.delete(A),C.delete(v),D}return!1}(e,t,n,r,Y,u))}function X(e){if(e!==("function"==typeof(t=e&&e.constructor)&&t.prototype||b))return m(g(e));var t,n,r=[];for(n in Object(e))x.call(e,n)&&"constructor"!=n&&r.push(n);return r}function J(e,t,n,r,i,o){var a=1&n,s=e.length,u=t.length;if(s!=u&&!(a&&s<u))return!1;if((u=o.get(e))&&o.get(t))return u==t;var c=-1,l=!0,h=2&n?new Q:void 0;for(o.set(e,t),o.set(t,e);++c<s;){var f,d=e[c],p=t[c];if(void 0!==(f=r?a?r(p,d,c,t,e,o):r(d,p,c,e,t,o):f)){if(f)continue;l=!1;break}if(h){if(!function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n))return 1}(t,(function(e,t){return!h.has(t)&&(d===e||i(d,e,n,r,o))&&h.push(t)}))){l=!1;break}}else if(d!==p&&!i(d,p,n,r,o)){l=!1;break}}return o.delete(e),o.delete(t),l}function Z(e){var t=ne,n=function(e){return(null!=e&&le(e.length)&&!ce(e)?q:X)(e)}(e);if(se(e))return n;for(var r=n,i=t(e),o=-1,a=i.length,s=r.length;++o<a;)r[s+o]=i[o];return r}function ee(e,n){var r,i;e=e.__data__;return("string"==(i=t(r=n))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==r:null===r)?e["string"==typeof n?"string":"hash"]:e.map}function te(e,t){return!he(t=e=null==e?void 0:e[t])||C&&C in t||!(ce(t)?E:u).test(ie(t))?void 0:e}z.prototype.clear=function(){this.__data__=j?j(null):{},this.size=0},z.prototype.delete=function(e){return e=this.has(e)&&delete this.__data__[e],this.size-=e?1:0,e},z.prototype.get=function(e){var t,n=this.__data__;return j?"__lodash_hash_undefined__"===(t=n[e])?void 0:t:x.call(n,e)?n[e]:void 0},z.prototype.has=function(e){var t=this.__data__;return j?void 0!==t[e]:x.call(t,e)},z.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=j&&void 0===t?"__lodash_hash_undefined__":t,this},H.prototype.clear=function(){this.__data__=[],this.size=0},H.prototype.delete=function(e){var t=this.__data__;return!((e=G(t,e))<0||(e==t.length-1?t.pop():O.call(t,e,1),--this.size,0))},H.prototype.get=function(e){var t=this.__data__;return(e=G(t,e))<0?void 0:t[e][1]},H.prototype.has=function(e){return-1<G(this.__data__,e)},H.prototype.set=function(e,t){var n=this.__data__,r=G(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},$.prototype.clear=function(){this.size=0,this.__data__={hash:new z,map:new(I||H),string:new z}},$.prototype.delete=function(e){return e=ee(this,e).delete(e),this.size-=e?1:0,e},$.prototype.get=function(e){return ee(this,e).get(e)},$.prototype.has=function(e){return ee(this,e).has(e)},$.prototype.set=function(e,t){var n=ee(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Q.prototype.add=Q.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Q.prototype.has=function(e){return this.__data__.has(e)},V.prototype.clear=function(){this.__data__=new H,this.size=0},V.prototype.delete=function(e){var t=this.__data__;e=t.delete(e);return this.size=t.size,e},V.prototype.get=function(e){return this.__data__.get(e)},V.prototype.has=function(e){return this.__data__.has(e)},V.prototype.set=function(e,t){var n=this.__data__;if(n instanceof H){var r=n.__data__;if(!I||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new $(r)}return n.set(e,t),this.size=n.size,this};var ne=D?function(e){if(null==e)return[];e=Object(e);for(var t=D(e),n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var a=t[n];_.call(e,a)&&(o[i++]=a)}return o}:function(){return[]},re=W;function ie(e){if(null!=e){try{return w.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function oe(e,t){return e===t||e!=e&&t!=t}(A&&"[object DataView]"!=re(new A(new ArrayBuffer(1)))||I&&re(new I)!=o||y&&"[object Promise]"!=re(y.resolve())||M&&re(new M)!=s||h&&"[object WeakMap]"!=re(new h))&&(re=function(e){var t=W(e);if(e=(e=t==a?e.constructor:void 0)?ie(e):"")switch(e){case N:return"[object DataView]";case F:return o;case R:return"[object Promise]";case P:return s;case L:return"[object WeakMap]"}return t});var ae=K(function(){return arguments}())?K:function(e){return fe(e)&&x.call(e,"callee")&&!_.call(e,"callee")},se=Array.isArray,ue=B||function(){return!1};function ce(e){if(he(e))return"[object Function]"==(e=W(e))||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}function le(e){return"number"==typeof e&&-1<e&&e%1==0&&e<=9007199254740991}function he(e){var n=t(e);return null!=e&&("object"==n||"function"==n)}function fe(e){return null!=e&&"object"==t(e)}var de,pe=e?(de=e,function(e){return de(e)}):function(e){return fe(e)&&le(e.length)&&!!l[W(e)]};n.exports=function(e,t){return Y(e,t)}}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],430:[function(e,n,r){(function(e){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e="object"==(void 0===e?"undefined":t(e))&&e&&e.Object===Object&&e;var r="object"==("undefined"==typeof self?"undefined":t(self))&&self&&self.Object===Object&&self,i=(e=e||r||Function("return this")(),(r=Object.prototype).hasOwnProperty),o=r.toString,a=(r=e.Symbol)?r.toStringTag:void 0;n.exports=function(e){var n,r;return n=t(r=e),!(null==r||"object"!=n&&"function"!=n||"[object Function]"!=(r=function(e){if(null==e)return void 0===e?"[object Undefined]":"[object Null]";if(a&&a in Object(e)){var t=e,n=i.call(t,a),r=t[a];try{var s=!(t[a]=void 0)}catch(t){}var u=o.call(t);return s&&(n?t[a]=r:delete t[a]),u}return o.call(e)}(e))&&"[object GeneratorFunction]"!=r&&"[object AsyncFunction]"!=r&&"[object Proxy]"!=r)}}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],431:[function(e,t,n){"use strict";t.exports=function(e){return null==e}},{}],432:[function(e,t,n){"use strict";t.exports=function(e){return void 0===e}},{}],433:[function(e,n,r){(function(e){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var r=/^\[object .+?Constructor\]$/,i=(e="object"==(void 0===e?"undefined":t(e))&&e&&e.Object===Object&&e,"object"==("undefined"==typeof self?"undefined":t(self))&&self&&self.Object===Object&&self);e=e||i||Function("return this")();function o(e,t){return!(!e||!e.length)&&-1<function(e,t){if(t!=t){for(var n=e,r=a,i=n.length,o=-1;++o<i;)if(r(n[o],o,n))return o}else for(var s=-1,u=e.length;++s<u;)if(e[s]===t)return s;return-1}(e,t)}function a(e){return e!=e}function s(e,t){return e.has(t)}function u(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}i=Array.prototype;var c=Function.prototype,l=Object.prototype,h=e["__core-js_shared__"],f=(h=/[^.]+$/.exec(h&&h.keys&&h.keys.IE_PROTO||""))?"Symbol(src)_1."+h:"",d=c.toString,p=l.hasOwnProperty,m=l.toString,g=RegExp("^"+d.call(p).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),A=i.splice,v=O(e,"Map"),b=O(e,"Set"),y=O(Object,"create");function w(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function x(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function C(e){var t=-1,n=e?e.length:0;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function k(e){var t=-1,n=e?e.length:0;for(this.__data__=new C;++t<n;)this.add(e[t])}function E(e,t){for(var n,r=e.length;r--;)if((n=e[r][0])===t||n!=n&&t!=t)return r;return-1}w.prototype.clear=function(){this.__data__=y?y(null):{}},w.prototype.delete=function(e){return this.has(e)&&delete this.__data__[e]},w.prototype.get=function(e){var t,n=this.__data__;return y?"__lodash_hash_undefined__"===(t=n[e])?void 0:t:p.call(n,e)?n[e]:void 0},w.prototype.has=function(e){var t=this.__data__;return y?void 0!==t[e]:p.call(t,e)},w.prototype.set=function(e,t){return this.__data__[e]=y&&void 0===t?"__lodash_hash_undefined__":t,this},x.prototype.clear=function(){this.__data__=[]},x.prototype.delete=function(e){var t=this.__data__;return!((e=E(t,e))<0||(e==t.length-1?t.pop():A.call(t,e,1),0))},x.prototype.get=function(e){var t=this.__data__;return(e=E(t,e))<0?void 0:t[e][1]},x.prototype.has=function(e){return-1<E(this.__data__,e)},x.prototype.set=function(e,t){var n=this.__data__,r=E(n,e);return r<0?n.push([e,t]):n[r][1]=t,this},C.prototype.clear=function(){this.__data__={hash:new w,map:new(v||x),string:new w}},C.prototype.delete=function(e){return _(this,e).delete(e)},C.prototype.get=function(e){return _(this,e).get(e)},C.prototype.has=function(e){return _(this,e).has(e)},C.prototype.set=function(e,t){return _(this,e).set(e,t),this},k.prototype.add=k.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},k.prototype.has=function(e){return this.__data__.has(e)};var S=b&&1/u(new b([,-0]))[1]==1/0?function(e){return new b(e)}:function(){};function _(e,n){var r,i;e=e.__data__;return("string"==(i=t(r=n))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==r:null===r)?e["string"==typeof n?"string":"hash"]:e.map}function O(e,t){return!T(t=e=null==e?void 0:e[t])||f&&f in t||!(function(e){return"[object Function]"==(e=T(e)?m.call(e):"")||"[object GeneratorFunction]"==e}(t)||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(t)?g:r).test(function(e){if(null!=e){try{return d.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(t))?void 0:e}function T(e){var n=t(e);return e&&("object"==n||"function"==n)}n.exports=function(e){if(e&&e.length){var t=e,n=-1,r=o,i=t.length,a=!0,c=[],l=c;if(200<=i){if(e=S(t))return u(e);a=!1,r=s,l=new k}else l=c;e:for(;++n<i;){var h=f=t[n],f=0!==f?f:0;if(a&&h==h){for(var d=l.length;d--;)if(l[d]===h)continue e;c.push(f)}else r(l,h,void 0)||(l!==c&&l.push(h),c.push(f))}return c}return[]}}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],434:[function(e,t,n){"use strict";var r=e("inherits"),i=e("hash-base"),o=e("safe-buffer").Buffer,a=new Array(16);function s(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function u(e,t){return e<<t|e>>>32-t}function c(e,t,n,r,i,o,a){return u(e+(t&n|~t&r)+i+o|0,a)+t|0}function l(e,t,n,r,i,o,a){return u(e+(t&r|n&~r)+i+o|0,a)+t|0}function h(e,t,n,r,i,o,a){return u(e+(t^n^r)+i+o|0,a)+t|0}function f(e,t,n,r,i,o,a){return u(e+(n^(t|~r))+i+o|0,a)+t|0}r(s,i),s.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var n=c(this._a,o=this._b,i=this._c,r=this._d,e[0],3614090360,7),r=c(r,n,o,i,e[1],3905402710,12),i=c(i,r,n,o,e[2],606105819,17),o=c(o,i,r,n,e[3],3250441966,22);n=c(n,o,i,r,e[4],4118548399,7),r=c(r,n,o,i,e[5],1200080426,12),i=c(i,r,n,o,e[6],2821735955,17),o=c(o,i,r,n,e[7],4249261313,22),n=c(n,o,i,r,e[8],1770035416,7),r=c(r,n,o,i,e[9],2336552879,12),i=c(i,r,n,o,e[10],4294925233,17),o=c(o,i,r,n,e[11],2304563134,22),n=c(n,o,i,r,e[12],1804603682,7),r=c(r,n,o,i,e[13],4254626195,12),i=c(i,r,n,o,e[14],2792965006,17),n=l(n,o=c(o,i,r,n,e[15],1236535329,22),i,r,e[1],4129170786,5),r=l(r,n,o,i,e[6],3225465664,9),i=l(i,r,n,o,e[11],643717713,14),o=l(o,i,r,n,e[0],3921069994,20),n=l(n,o,i,r,e[5],3593408605,5),r=l(r,n,o,i,e[10],38016083,9),i=l(i,r,n,o,e[15],3634488961,14),o=l(o,i,r,n,e[4],3889429448,20),n=l(n,o,i,r,e[9],568446438,5),r=l(r,n,o,i,e[14],3275163606,9),i=l(i,r,n,o,e[3],4107603335,14),o=l(o,i,r,n,e[8],1163531501,20),n=l(n,o,i,r,e[13],2850285829,5),r=l(r,n,o,i,e[2],4243563512,9),i=l(i,r,n,o,e[7],1735328473,14),n=h(n,o=l(o,i,r,n,e[12],2368359562,20),i,r,e[5],4294588738,4),r=h(r,n,o,i,e[8],2272392833,11),i=h(i,r,n,o,e[11],1839030562,16),o=h(o,i,r,n,e[14],4259657740,23),n=h(n,o,i,r,e[1],2763975236,4),r=h(r,n,o,i,e[4],1272893353,11),i=h(i,r,n,o,e[7],4139469664,16),o=h(o,i,r,n,e[10],3200236656,23),n=h(n,o,i,r,e[13],681279174,4),r=h(r,n,o,i,e[0],3936430074,11),i=h(i,r,n,o,e[3],3572445317,16),o=h(o,i,r,n,e[6],76029189,23),n=h(n,o,i,r,e[9],3654602809,4),r=h(r,n,o,i,e[12],3873151461,11),i=h(i,r,n,o,e[15],530742520,16),n=f(n,o=h(o,i,r,n,e[2],3299628645,23),i,r,e[0],4096336452,6),r=f(r,n,o,i,e[7],1126891415,10),i=f(i,r,n,o,e[14],2878612391,15),o=f(o,i,r,n,e[5],4237533241,21),n=f(n,o,i,r,e[12],1700485571,6),r=f(r,n,o,i,e[3],2399980690,10),i=f(i,r,n,o,e[10],4293915773,15),o=f(o,i,r,n,e[1],2240044497,21),n=f(n,o,i,r,e[8],1873313359,6),r=f(r,n,o,i,e[15],4264355552,10),i=f(i,r,n,o,e[6],2734768916,15),o=f(o,i,r,n,e[13],1309151649,21),n=f(n,o,i,r,e[4],4149444226,6),r=f(r,n,o,i,e[11],3174756917,10),i=f(i,r,n,o,e[2],718787259,15),o=f(o,i,r,n,e[9],3951481745,21),this._a=this._a+n|0,this._b=this._b+o|0,this._c=this._c+i|0,this._d=this._d+r|0},s.prototype._digest=function(){this._block[this._blockOffset++]=128,56<this._blockOffset&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=o.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},t.exports=s},{"hash-base":370,inherits:387,"safe-buffer":494}],435:[function(e,t,n){"use strict";var r=e("bn.js"),i=e("brorand");function o(e){this.rand=e||new i.Rand}(t.exports=o).create=function(e){return new o(e)},o.prototype._randbelow=function(e){var t=e.bitLength(),n=Math.ceil(t/8);do{var i=new r(this.rand.generate(n))}while(0<=i.cmp(e));return i},o.prototype._randrange=function(e,t){return t=t.sub(e),e.add(this._randbelow(t))},o.prototype.test=function(e,t,n){var i=e.bitLength(),o=r.mont(e),a=new r(1).toRed(o);t=t||Math.max(1,i/48|0);for(var s=e.subn(1),u=0;!s.testn(u);u++);for(var c=e.shrn(u),l=s.toRed(o);0<t;t--){var h=this._randrange(new r(2),s),f=(n&&n(h),h.toRed(o).redPow(c));if(0!==f.cmp(a)&&0!==f.cmp(l)){for(var d=1;d<u;d++){if(0===(f=f.redSqr()).cmp(a))return!1;if(0===f.cmp(l))break}if(d===u)return!1}}return!0},o.prototype.getDivisor=function(e,t){var n=e.bitLength(),i=r.mont(e),o=new r(1).toRed(i);t=t||Math.max(1,n/48|0);for(var a=e.subn(1),s=0;!a.testn(s);s++);for(var u=e.shrn(s),c=a.toRed(i);0<t;t--){var l=this._randrange(new r(2),a),h=e.gcd(l);if(0!==h.cmpn(1))return h;var f=l.toRed(i).redPow(u);if(0!==f.cmp(o)&&0!==f.cmp(c)){for(var d=1;d<s;d++){if(0===(f=f.redSqr()).cmp(o))return f.fromRed().subn(1).gcd(e);if(0===f.cmp(c))break}if(d===s)return(f=f.redSqr()).fromRed().subn(1).gcd(e)}}return!1}},{"bn.js":436,brorand:184}],436:[function(e,t,n){arguments[4][181][0].apply(n,arguments)},{buffer:185,dup:181}],437:[function(e,t,n){"use strict";(t.exports=function(e,t){if(!e)throw new Error(t||"Assertion failed")}).equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}},{}],438:[function(e,t,n){"use strict";function r(e){return 1===e.length?"0"+e:e}function i(e){for(var t="",n=0;n<e.length;n++)t+=r(e[n].toString(16));return t}n.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"!=typeof e)for(var r=0;r<e.length;r++)n[r]=0|e[r];else if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),r=0;r<e.length;r+=2)n.push(parseInt(e[r]+e[r+1],16));else for(r=0;r<e.length;r++){var i=(o=e.charCodeAt(r))>>8,o=255&o;i?n.push(i,o):n.push(o)}return n},n.zero2=r,n.toHex=i,n.encode=function(e,t){return"hex"===t?i(e):e}},{}],439:[function(e,t,n){"use strict";var r={};(0,e("./lib/utils/common").assign)(r,e("./lib/deflate"),e("./lib/inflate"),e("./lib/zlib/constants")),t.exports=r},{"./lib/deflate":440,"./lib/inflate":441,"./lib/utils/common":442,"./lib/zlib/constants":445}],440:[function(e,t,n){"use strict";var r=e("./zlib/deflate"),i=e("./utils/common"),o=e("./utils/strings"),a=e("./zlib/messages"),s=e("./zlib/zstream"),u=Object.prototype.toString;function c(e){if(!(this instanceof c))return new c(e);this.options=i.assign({level:-1,method:8,chunkSize:16384,windowBits:15,memLevel:8,strategy:0,to:""},e||{});var t=((e=this.options).raw&&0<e.windowBits?e.windowBits=-e.windowBits:e.gzip&&0<e.windowBits&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new s,this.strm.avail_out=0,r.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy));if(0!==t)throw new Error(a[t]);if(e.header&&r.deflateSetHeader(this.strm,e.header),e.dictionary){if(e="string"==typeof e.dictionary?o.string2buf(e.dictionary):"[object ArrayBuffer]"===u.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,0!==(t=r.deflateSetDictionary(this.strm,e)))throw new Error(a[t]);this._dict_set=!0}}function l(e,t){if((t=new c(t)).push(e,!0),t.err)throw t.msg||a[t.err];return t.result}c.prototype.push=function(e,t){var n,a,s=this.strm,c=this.options.chunkSize;if(this.ended)return!1;a=t===~~t?t:!0===t?4:0,"string"==typeof e?s.input=o.string2buf(e):"[object ArrayBuffer]"===u.call(e)?s.input=new Uint8Array(e):s.input=e,s.next_in=0,s.avail_in=s.input.length;do{if(0===s.avail_out&&(s.output=new i.Buf8(c),s.next_out=0,s.avail_out=c),1!==(n=r.deflate(s,a))&&0!==n)return this.onEnd(n),!(this.ended=!0)}while(0!==s.avail_out&&(0!==s.avail_in||4!==a&&2!==a)||("string"===this.options.to?this.onData(o.buf2binstring(i.shrinkBuf(s.output,s.next_out))):this.onData(i.shrinkBuf(s.output,s.next_out))),(0<s.avail_in||0===s.avail_out)&&1!==n);return 4===a?(n=r.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,0===n):2!==a||(this.onEnd(0),!(s.avail_out=0))},c.prototype.onData=function(e){this.chunks.push(e)},c.prototype.onEnd=function(e){0===e&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},n.Deflate=c,n.deflate=l,n.deflateRaw=function(e,t){return(t=t||{}).raw=!0,l(e,t)},n.gzip=function(e,t){return(t=t||{}).gzip=!0,l(e,t)}},{"./utils/common":442,"./utils/strings":443,"./zlib/deflate":447,"./zlib/messages":452,"./zlib/zstream":454}],441:[function(e,t,n){"use strict";var r=e("./zlib/inflate"),i=e("./utils/common"),o=e("./utils/strings"),a=e("./zlib/constants"),s=e("./zlib/messages"),u=e("./zlib/zstream"),c=e("./zlib/gzheader"),l=Object.prototype.toString;function h(e){if(!(this instanceof h))return new h(e);this.options=i.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;if((e=(t.raw&&0<=t.windowBits&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(0<=t.windowBits&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),15<t.windowBits&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new u,this.strm.avail_out=0,r.inflateInit2(this.strm,t.windowBits)))!==a.Z_OK)throw new Error(s[e]);if(this.header=new c,r.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=o.string2buf(t.dictionary):"[object ArrayBuffer]"===l.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(e=r.inflateSetDictionary(this.strm,t.dictionary))!==a.Z_OK))throw new Error(s[e])}function f(e,t){if((t=new h(t)).push(e,!0),t.err)throw t.msg||s[t.err];return t.result}h.prototype.push=function(e,t){var n,s,u,c,h,f=this.strm,d=this.options.chunkSize,p=this.options.dictionary,m=!1;if(this.ended)return!1;s=t===~~t?t:!0===t?a.Z_FINISH:a.Z_NO_FLUSH,"string"==typeof e?f.input=o.binstring2buf(e):"[object ArrayBuffer]"===l.call(e)?f.input=new Uint8Array(e):f.input=e,f.next_in=0,f.avail_in=f.input.length;do{if(0===f.avail_out&&(f.output=new i.Buf8(d),f.next_out=0,f.avail_out=d),(n=(n=r.inflate(f,a.Z_NO_FLUSH))===a.Z_NEED_DICT&&p?r.inflateSetDictionary(this.strm,p):n)===a.Z_BUF_ERROR&&!0===m&&(n=a.Z_OK,m=!1),n!==a.Z_STREAM_END&&n!==a.Z_OK)return this.onEnd(n),!(this.ended=!0)}while(!f.next_out||0!==f.avail_out&&n!==a.Z_STREAM_END&&(0!==f.avail_in||s!==a.Z_FINISH&&s!==a.Z_SYNC_FLUSH)||("string"===this.options.to?(u=o.utf8border(f.output,f.next_out),c=f.next_out-u,h=o.buf2string(f.output,u),f.next_out=c,f.avail_out=d-c,c&&i.arraySet(f.output,f.output,u,c,0),this.onData(h)):this.onData(i.shrinkBuf(f.output,f.next_out))),0===f.avail_in&&0===f.avail_out&&(m=!0),(0<f.avail_in||0===f.avail_out)&&n!==a.Z_STREAM_END);return(s=n===a.Z_STREAM_END?a.Z_FINISH:s)===a.Z_FINISH?(n=r.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===a.Z_OK):s!==a.Z_SYNC_FLUSH||(this.onEnd(a.Z_OK),!(f.avail_out=0))},h.prototype.onData=function(e){this.chunks.push(e)},h.prototype.onEnd=function(e){e===a.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=i.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg},n.Inflate=h,n.inflate=f,n.inflateRaw=function(e,t){return(t=t||{}).raw=!0,f(e,t)},n.ungzip=f},{"./utils/common":442,"./utils/strings":443,"./zlib/constants":445,"./zlib/gzheader":448,"./zlib/inflate":450,"./zlib/messages":452,"./zlib/zstream":454}],442:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;n.assign=function(e){for(var t,n,i=Array.prototype.slice.call(arguments,1);i.length;){var o=i.shift();if(o){if("object"!==r(o))throw new TypeError(o+"must be non-object");for(var a in o)t=o,n=a,Object.prototype.hasOwnProperty.call(t,n)&&(e[a]=o[a])}}return e},n.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var o={arraySet:function(e,t,n,r,i){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+r),i);else for(var o=0;o<r;o++)e[i+o]=t[n+o]},flattenChunks:function(e){for(var t,n,r,i=0,o=0,a=e.length;o<a;o++)i+=e[o].length;for(r=new Uint8Array(i),o=t=0,a=e.length;o<a;o++)n=e[o],r.set(n,t),t+=n.length;return r}},a={arraySet:function(e,t,n,r,i){for(var o=0;o<r;o++)e[i+o]=t[n+o]},flattenChunks:function(e){return[].concat.apply([],e)}};n.setTyped=function(e){e?(n.Buf8=Uint8Array,n.Buf16=Uint16Array,n.Buf32=Int32Array,n.assign(n,o)):(n.Buf8=Array,n.Buf16=Array,n.Buf32=Array,n.assign(n,a))},n.setTyped(i)},{}],443:[function(e,t,n){"use strict";var r=e("./common"),i=!0,o=!0;try{String.fromCharCode.apply(null,[0])}catch(e){i=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){o=!1}for(var a=new r.Buf8(256),s=0;s<256;s++)a[s]=252<=s?6:248<=s?5:240<=s?4:224<=s?3:192<=s?2:1;function u(e,t){if(t<65534&&(e.subarray&&o||!e.subarray&&i))return String.fromCharCode.apply(null,r.shrinkBuf(e,t));for(var n="",a=0;a<t;a++)n+=String.fromCharCode(e[a]);return n}a[254]=a[254]=1,n.string2buf=function(e){for(var t,n,i,o,a=e.length,s=0,u=0;u<a;u++)55296==(64512&(n=e.charCodeAt(u)))&&u+1<a&&56320==(64512&(i=e.charCodeAt(u+1)))&&(n=65536+(n-55296<<10)+(i-56320),u++),s+=n<128?1:n<2048?2:n<65536?3:4;for(t=new r.Buf8(s),u=o=0;o<s;u++)55296==(64512&(n=e.charCodeAt(u)))&&u+1<a&&56320==(64512&(i=e.charCodeAt(u+1)))&&(n=65536+(n-55296<<10)+(i-56320),u++),n<128?t[o++]=n:(n<2048?t[o++]=192|n>>>6:(n<65536?t[o++]=224|n>>>12:(t[o++]=240|n>>>18,t[o++]=128|n>>>12&63),t[o++]=128|n>>>6&63),t[o++]=128|63&n);return t},n.buf2binstring=function(e){return u(e,e.length)},n.binstring2buf=function(e){for(var t=new r.Buf8(e.length),n=0,i=t.length;n<i;n++)t[n]=e.charCodeAt(n);return t},n.buf2string=function(e,t){for(var n,r,i=t||e.length,o=new Array(2*i),s=0,c=0;c<i;)if((n=e[c++])<128)o[s++]=n;else if(4<(r=a[n]))o[s++]=65533,c+=r-1;else{for(n&=2===r?31:3===r?15:7;1<r&&c<i;)n=n<<6|63&e[c++],r--;1<r?o[s++]=65533:n<65536?o[s++]=n:(n-=65536,o[s++]=55296|n>>10&1023,o[s++]=56320|1023&n)}return u(o,s)},n.utf8border=function(e,t){for(var n=(t=(t=t||e.length)>e.length?e.length:t)-1;0<=n&&128==(192&e[n]);)n--;return!(n<0||0===n)&&n+a[e[n]]>t?n:t}},{"./common":442}],444:[function(e,t,n){"use strict";t.exports=function(e,t,n,r){for(var i=65535&e|0,o=e>>>16&65535|0,a=0;0!==n;){for(n-=a=2e3<n?2e3:n;o=o+(i=i+t[r++]|0)|0,--a;);i%=65521,o%=65521}return i|o<<16|0}},{}],445:[function(e,t,n){"use strict";t.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],446:[function(e,t,n){"use strict";var r=function(){for(var e=[],t=0;t<256;t++){for(var n=t,r=0;r<8;r++)n=1&n?3988292384^n>>>1:n>>>1;e[t]=n}return e}();t.exports=function(e,t,n,i){var o=r,a=i+n;e^=-1;for(var s=i;s<a;s++)e=e>>>8^o[255&(e^t[s])];return-1^e}},{}],447:[function(e,t,n){"use strict";var r,i=e("../utils/common"),o=e("./trees"),a=e("./adler32"),s=e("./crc32"),u=e("./messages");function c(e,t){return e.msg=u[t],t}function l(e){return(e<<1)-(4<e?9:0)}function h(e){for(var t=e.length;0<=--t;)e[t]=0}function f(e){var t=e.state,n=t.pending;0!==(n=n>e.avail_out?e.avail_out:n)&&(i.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))}function d(e,t){o._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,f(e.strm)}function p(e,t){e.pending_buf[e.pending++]=t}function m(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function g(e,t){var n,r,i=e.max_chain_length,o=e.strstart,a=e.prev_length,s=e.nice_match,u=e.strstart>e.w_size-262?e.strstart-(e.w_size-262):0,c=e.window,l=e.w_mask,h=e.prev,f=e.strstart+258,d=c[o+a-1],p=c[o+a];e.prev_length>=e.good_match&&(i>>=2),s>e.lookahead&&(s=e.lookahead);do{if(c[(n=t)+a]===p&&c[n+a-1]===d&&c[n]===c[o]&&c[++n]===c[o+1]){for(o+=2,n++;c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&o<f;);if(r=258-(f-o),o=f-258,a<r){if(e.match_start=t,s<=(a=r))break;d=c[o+a-1],p=c[o+a]}}}while((t=h[t&l])>u&&0!=--i);return a<=e.lookahead?a:e.lookahead}function A(e){var t,n,r,o,u,c,l,h,f,d=e.w_size;do{if(h=e.window_size-e.lookahead-e.strstart,e.strstart>=d+(d-262)){for(i.arraySet(e.window,e.window,d,d,0),e.match_start-=d,e.strstart-=d,e.block_start-=d,t=n=e.hash_size;r=e.head[--t],e.head[t]=d<=r?r-d:0,--n;);for(t=n=d;r=e.prev[--t],e.prev[t]=d<=r?r-d:0,--n;);h+=d}if(0===e.strm.avail_in)break;if(u=e.strm,c=e.window,l=e.strstart+e.lookahead,h=h,f=void 0,n=0===(f=(f=u.avail_in)>h?h:f)?0:(u.avail_in-=f,i.arraySet(c,u.input,u.next_in,f,l),1===u.state.wrap?u.adler=a(u.adler,c,f,l):2===u.state.wrap&&(u.adler=s(u.adler,c,f,l)),u.next_in+=f,u.total_in+=f,f),e.lookahead+=n,3<=e.lookahead+e.insert)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[o+3-1])&e.hash_mask,e.prev[o&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=o,o++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<262&&0!==e.strm.avail_in)}function v(e,t){for(var n,r;;){if(e.lookahead<262){if(A(e),e.lookahead<262&&0===t)return 1;if(0===e.lookahead)break}if(n=0,3<=e.lookahead&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==n&&e.strstart-n<=e.w_size-262&&(e.match_length=g(e,n)),3<=e.match_length)if(r=o._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&3<=e.lookahead){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart,0!=--e.match_length;);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else r=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(d(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,4===t?(d(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(d(e,!1),0===e.strm.avail_out)?1:2}function b(e,t){for(var n,r,i;;){if(e.lookahead<262){if(A(e),e.lookahead<262&&0===t)return 1;if(0===e.lookahead)break}if(n=0,3<=e.lookahead&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==n&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-262&&(e.match_length=g(e,n),e.match_length<=5&&(1===e.strategy||3===e.match_length&&4096<e.strstart-e.match_start)&&(e.match_length=2)),3<=e.prev_length&&e.match_length<=e.prev_length){for(i=e.strstart+e.lookahead-3,r=o._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=i&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+3-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!=--e.prev_length;);if(e.match_available=0,e.match_length=2,e.strstart++,r&&(d(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if((r=o._tr_tally(e,0,e.window[e.strstart-1]))&&d(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=o._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,4===t?(d(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(d(e,!1),0===e.strm.avail_out)?1:2}function y(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}function w(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=8,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new i.Buf16(1146),this.dyn_dtree=new i.Buf16(122),this.bl_tree=new i.Buf16(78),h(this.dyn_ltree),h(this.dyn_dtree),h(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new i.Buf16(16),this.heap=new i.Buf16(573),h(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new i.Buf16(573),h(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function x(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=2,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?42:113,e.adler=2===t.wrap?0:1,t.last_flush=0,o._tr_init(t),0):c(e,-2)}function C(e){var t=x(e);return 0===t&&((e=e.state).window_size=2*e.w_size,h(e.head),e.max_lazy_match=r[e.level].max_lazy,e.good_match=r[e.level].good_length,e.nice_match=r[e.level].nice_length,e.max_chain_length=r[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),t}function k(e,t,n,r,o,a){if(!e)return-2;var s=1;if(-1===t&&(t=6),r<0?(s=0,r=-r):15<r&&(s=2,r-=16),o<1||9<o||8!==n||r<8||15<r||t<0||9<t||a<0||4<a)return c(e,-2);8===r&&(r=9);var u=new w;return(e.state=u).strm=e,u.wrap=s,u.gzhead=null,u.w_bits=r,u.w_size=1<<u.w_bits,u.w_mask=u.w_size-1,u.hash_bits=o+7,u.hash_size=1<<u.hash_bits,u.hash_mask=u.hash_size-1,u.hash_shift=~~((u.hash_bits+3-1)/3),u.window=new i.Buf8(2*u.w_size),u.head=new i.Buf16(u.hash_size),u.prev=new i.Buf16(u.w_size),u.lit_bufsize=1<<o+6,u.pending_buf_size=4*u.lit_bufsize,u.pending_buf=new i.Buf8(u.pending_buf_size),u.d_buf=+u.lit_bufsize,u.l_buf=3*u.lit_bufsize,u.level=t,u.strategy=a,u.method=n,C(e)}r=[new y(0,0,0,0,(function(e,t){var n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(A(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,d(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-262&&(d(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(d(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(d(e,!1),e.strm.avail_out),1)})),new y(4,4,8,4,v),new y(4,5,16,8,v),new y(4,6,32,32,v),new y(4,4,16,16,b),new y(8,16,32,32,b),new y(8,16,128,128,b),new y(8,32,128,256,b),new y(32,128,258,1024,b),new y(32,258,258,4096,b)],n.deflateInit=function(e,t){return k(e,t,8,15,8,0)},n.deflateInit2=k,n.deflateReset=C,n.deflateResetKeep=x,n.deflateSetHeader=function(e,t){return e&&e.state&&2===e.state.wrap?(e.state.gzhead=t,0):-2},n.deflate=function(e,t){var n,i,a,u;if(!e||!e.state||5<t||t<0)return e?c(e,-2):-2;if(i=e.state,!e.output||!e.input&&0!==e.avail_in||666===i.status&&4!==t)return c(e,0===e.avail_out?-5:-2);if(i.strm=e,n=i.last_flush,i.last_flush=t,42===i.status&&(2===i.wrap?(e.adler=0,p(i,31),p(i,139),p(i,8),i.gzhead?(p(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),p(i,255&i.gzhead.time),p(i,i.gzhead.time>>8&255),p(i,i.gzhead.time>>16&255),p(i,i.gzhead.time>>24&255),p(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),p(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(p(i,255&i.gzhead.extra.length),p(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=s(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(p(i,0),p(i,0),p(i,0),p(i,0),p(i,0),p(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),p(i,3),i.status=113)):(g=8+(i.w_bits-8<<4)<<8,g|=(2<=i.strategy||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(g|=32),g+=31-g%31,i.status=113,m(i,g),0!==i.strstart&&(m(i,e.adler>>>16),m(i,65535&e.adler)),e.adler=1)),69===i.status)if(i.gzhead.extra){for(a=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),f(e),a=i.pending,i.pending!==i.pending_buf_size));)p(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),f(e),a=i.pending,i.pending===i.pending_buf_size)){u=1;break}}while(u=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,p(i,u),0!==u);i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),0===u&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){a=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),f(e),a=i.pending,i.pending===i.pending_buf_size)){u=1;break}}while(u=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,p(i,u),0!==u);i.gzhead.hcrc&&i.pending>a&&(e.adler=s(e.adler,i.pending_buf,i.pending-a,a)),0===u&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&f(e),i.pending+2<=i.pending_buf_size&&(p(i,255&e.adler),p(i,e.adler>>8&255),e.adler=0,i.status=113)):i.status=113),0!==i.pending){if(f(e),0===e.avail_out)return i.last_flush=-1,0}else if(0===e.avail_in&&l(t)<=l(n)&&4!==t)return c(e,-5);if(666===i.status&&0!==e.avail_in)return c(e,-5);if(0!==e.avail_in||0!==i.lookahead||0!==t&&666!==i.status){var g=2===i.strategy?function(e,t){for(var n;;){if(0===e.lookahead&&(A(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,n=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(d(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(d(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(d(e,!1),0===e.strm.avail_out)?1:2}(i,t):3===i.strategy?function(e,t){for(var n,r,i,a,s=e.window;;){if(e.lookahead<=258){if(A(e),e.lookahead<=258&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,3<=e.lookahead&&0<e.strstart&&(r=s[i=e.strstart-1])===s[++i]&&r===s[++i]&&r===s[++i]){for(a=e.strstart+258;r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&r===s[++i]&&i<a;);e.match_length=258-(a-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(3<=e.match_length?(n=o._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(d(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(d(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(d(e,!1),0===e.strm.avail_out)?1:2}(i,t):r[i.level].func(i,t);if(3!==g&&4!==g||(i.status=666),1===g||3===g)return 0===e.avail_out&&(i.last_flush=-1),0;if(2===g&&(1===t?o._tr_align(i):5!==t&&(o._tr_stored_block(i,0,0,!1),3===t&&(h(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),f(e),0===e.avail_out))return i.last_flush=-1,0}return 4===t&&(i.wrap<=0||(2===i.wrap?(p(i,255&e.adler),p(i,e.adler>>8&255),p(i,e.adler>>16&255),p(i,e.adler>>24&255),p(i,255&e.total_in),p(i,e.total_in>>8&255),p(i,e.total_in>>16&255),p(i,e.total_in>>24&255)):(m(i,e.adler>>>16),m(i,65535&e.adler)),f(e),0<i.wrap&&(i.wrap=-i.wrap),0===i.pending))?1:0},n.deflateEnd=function(e){var t;return e&&e.state?42!==(t=e.state.status)&&69!==t&&73!==t&&91!==t&&103!==t&&113!==t&&666!==t?c(e,-2):(e.state=null,113===t?c(e,-3):0):-2},n.deflateSetDictionary=function(e,t){var n,r,o,s,u,c,l,f=t.length;if(!e||!e.state)return-2;if(2===(s=(n=e.state).wrap)||1===s&&42!==n.status||n.lookahead)return-2;for(1===s&&(e.adler=a(e.adler,t,f,0)),n.wrap=0,f>=n.w_size&&(0===s&&(h(n.head),n.strstart=0,n.block_start=0,n.insert=0),l=new i.Buf8(n.w_size),i.arraySet(l,t,f-n.w_size,n.w_size,0),t=l,f=n.w_size),l=e.avail_in,u=e.next_in,c=e.input,e.avail_in=f,e.next_in=0,e.input=t,A(n);3<=n.lookahead;){for(r=n.strstart,o=n.lookahead-2;n.ins_h=(n.ins_h<<n.hash_shift^n.window[r+3-1])&n.hash_mask,n.prev[r&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=r,r++,--o;);n.strstart=r,n.lookahead=2,A(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,e.next_in=u,e.input=c,e.avail_in=l,n.wrap=s,0},n.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":442,"./adler32":444,"./crc32":446,"./messages":452,"./trees":453}],448:[function(e,t,n){"use strict";t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],449:[function(e,t,n){"use strict";t.exports=function(e,t){var n,r,i,o,a,s,u=e.state,c=e.next_in,l=e.input,h=c+(e.avail_in-5),f=e.next_out,d=e.output,p=f-(t-e.avail_out),m=f+(e.avail_out-257),g=u.dmax,A=u.wsize,v=u.whave,b=u.wnext,y=u.window,w=u.hold,x=u.bits,C=u.lencode,k=u.distcode,E=(1<<u.lenbits)-1,S=(1<<u.distbits)-1;e:do{for(x<15&&(w+=l[c++]<<x,x+=8,w+=l[c++]<<x,x+=8),n=C[w&E];;){if(w>>>=r=n>>>24,x-=r,0==(r=n>>>16&255))d[f++]=65535&n;else{if(!(16&r)){if(0==(64&r)){n=C[(65535&n)+(w&(1<<r)-1)];continue}if(32&r){u.mode=12;break e}e.msg="invalid literal/length code",u.mode=30;break e}for(i=65535&n,(r&=15)&&(x<r&&(w+=l[c++]<<x,x+=8),i+=w&(1<<r)-1,w>>>=r,x-=r),x<15&&(w+=l[c++]<<x,x+=8,w+=l[c++]<<x,x+=8),n=k[w&S];;){if(w>>>=r=n>>>24,x-=r,!(16&(r=n>>>16&255))){if(0==(64&r)){n=k[(65535&n)+(w&(1<<r)-1)];continue}e.msg="invalid distance code",u.mode=30;break e}if(o=65535&n,x<(r&=15)&&(w+=l[c++]<<x,(x+=8)<r&&(w+=l[c++]<<x,x+=8)),(o+=w&(1<<r)-1)>g){e.msg="invalid distance too far back",u.mode=30;break e}if(w>>>=r,x-=r,o>(r=f-p)){if((r=o-r)>v&&u.sane){e.msg="invalid distance too far back",u.mode=30;break e}if(s=y,(a=0)===b){if(a+=A-r,r<i){for(i-=r;d[f++]=y[a++],--r;);a=f-o,s=d}}else if(b<r){if(a+=A+b-r,(r-=b)<i){for(i-=r;d[f++]=y[a++],--r;);if(a=0,b<i){for(i-=r=b;d[f++]=y[a++],--r;);a=f-o,s=d}}}else if(a+=b-r,r<i){for(i-=r;d[f++]=y[a++],--r;);a=f-o,s=d}for(;2<i;)d[f++]=s[a++],d[f++]=s[a++],d[f++]=s[a++],i-=3;i&&(d[f++]=s[a++],1<i&&(d[f++]=s[a++]))}else{for(a=f-o;d[f++]=d[a++],d[f++]=d[a++],d[f++]=d[a++],2<(i-=3););i&&(d[f++]=d[a++],1<i&&(d[f++]=d[a++]))}break}}break}}while(c<h&&f<m);c-=i=x>>3,w&=(1<<(x-=i<<3))-1,e.next_in=c,e.next_out=f,e.avail_in=c<h?h-c+5:5-(c-h),e.avail_out=f<m?m-f+257:257-(f-m),u.hold=w,u.bits=x}},{}],450:[function(e,t,n){"use strict";var r=e("../utils/common"),i=e("./adler32"),o=e("./crc32"),a=e("./inffast"),s=e("./inftrees");function u(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function c(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function l(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new r.Buf32(852),t.distcode=t.distdyn=new r.Buf32(592),t.sane=1,t.back=-1,0):-2}function h(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,l(e)):-2}function f(e,t){var n,r;return!e||!e.state||(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15<t))?-2:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,h(e))}function d(e,t){var n;return e?(n=new c,(e.state=n).window=null,0!==(n=f(e,t))&&(e.state=null),n):-2}var p,m,g=!0;function A(e,t,n,i){var o;return null===(e=e.state).window&&(e.wsize=1<<e.wbits,e.wnext=0,e.whave=0,e.window=new r.Buf8(e.wsize)),i>=e.wsize?(r.arraySet(e.window,t,n-e.wsize,e.wsize,0),e.wnext=0,e.whave=e.wsize):((o=e.wsize-e.wnext)>i&&(o=i),r.arraySet(e.window,t,n-i,o,e.wnext),(i-=o)?(r.arraySet(e.window,t,n-i,i,0),e.wnext=i,e.whave=e.wsize):(e.wnext+=o,e.wnext===e.wsize&&(e.wnext=0),e.whave<e.wsize&&(e.whave+=o))),0}n.inflateReset=h,n.inflateReset2=f,n.inflateResetKeep=l,n.inflateInit=function(e){return d(e,15)},n.inflateInit2=d,n.inflate=function(e,t){var n,c,l,h,f,d,v,b,y,w,x,C,k,E,S,_,O,T,D,B,I,M,j,N,F=0,R=new r.Buf8(4),P=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return-2;12===(n=e.state).mode&&(n.mode=13),f=e.next_out,l=e.output,v=e.avail_out,h=e.next_in,c=e.input,d=e.avail_in,b=n.hold,y=n.bits,w=d,x=v,M=0;e:for(;;)switch(n.mode){case 1:if(0===n.wrap)n.mode=13;else{for(;y<16;){if(0===d)break e;d--,b+=c[h++]<<y,y+=8}if(2&n.wrap&&35615===b)R[n.check=0]=255&b,R[1]=b>>>8&255,n.check=o(n.check,R,2,0),y=b=0,n.mode=2;else if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&b)<<8)+(b>>8))%31)e.msg="incorrect header check",n.mode=30;else if(8!=(15&b))e.msg="unknown compression method",n.mode=30;else{if(y-=4,I=8+(15&(b>>>=4)),0===n.wbits)n.wbits=I;else if(I>n.wbits){e.msg="invalid window size",n.mode=30;break}n.dmax=1<<I,e.adler=n.check=1,n.mode=512&b?10:12,y=b=0}}break;case 2:for(;y<16;){if(0===d)break e;d--,b+=c[h++]<<y,y+=8}if(n.flags=b,8!=(255&n.flags)){e.msg="unknown compression method",n.mode=30;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=30;break}n.head&&(n.head.text=b>>8&1),512&n.flags&&(R[0]=255&b,R[1]=b>>>8&255,n.check=o(n.check,R,2,0)),y=b=0,n.mode=3;case 3:for(;y<32;){if(0===d)break e;d--,b+=c[h++]<<y,y+=8}n.head&&(n.head.time=b),512&n.flags&&(R[0]=255&b,R[1]=b>>>8&255,R[2]=b>>>16&255,R[3]=b>>>24&255,n.check=o(n.check,R,4,0)),y=b=0,n.mode=4;case 4:for(;y<16;){if(0===d)break e;d--,b+=c[h++]<<y,y+=8}n.head&&(n.head.xflags=255&b,n.head.os=b>>8),512&n.flags&&(R[0]=255&b,R[1]=b>>>8&255,n.check=o(n.check,R,2,0)),y=b=0,n.mode=5;case 5:if(1024&n.flags){for(;y<16;){if(0===d)break e;d--,b+=c[h++]<<y,y+=8}n.length=b,n.head&&(n.head.extra_len=b),512&n.flags&&(R[0]=255&b,R[1]=b>>>8&255,n.check=o(n.check,R,2,0)),y=b=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&((C=(C=n.length)>d?d:C)&&(n.head&&(I=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),r.arraySet(n.head.extra,c,h,C,I)),512&n.flags&&(n.check=o(n.check,c,C,h)),d-=C,h+=C,n.length-=C),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===d)break e;for(C=0;I=c[h+C++],n.head&&I&&n.length<65536&&(n.head.name+=String.fromCharCode(I)),I&&C<d;);if(512&n.flags&&(n.check=o(n.check,c,C,h)),d-=C,h+=C,I)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=8;case 8:if(4096&n.flags){if(0===d)break e;for(C=0;I=c[h+C++],n.head&&I&&n.length<65536&&(n.head.comment+=String.fromCharCode(I)),I&&C<d;);if(512&n.flags&&(n.check=o(n.check,c,C,h)),d-=C,h+=C,I)break e}else n.head&&(n.head.comment=null);n.mode=9;case 9:if(512&n.flags){for(;y<16;){if(0===d)break e;d--,b+=c[h++]<<y,y+=8}if(b!==(65535&n.check)){e.msg="header crc mismatch",n.mode=30;break}y=b=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;y<32;){if(0===d)break e;d--,b+=c[h++]<<y,y+=8}e.adler=n.check=u(b),y=b=0,n.mode=11;case 11:if(0===n.havedict)return e.next_out=f,e.avail_out=v,e.next_in=h,e.avail_in=d,n.hold=b,n.bits=y,2;e.adler=n.check=1,n.mode=12;case 12:if(5===t||6===t)break e;case 13:if(n.last)b>>>=7&y,y-=7&y,n.mode=27;else{for(;y<3;){if(0===d)break e;d--,b+=c[h++]<<y,y+=8}switch(n.last=1&b,--y,3&(b>>>=1)){case 0:n.mode=14;break;case 1:L=U=void 0;var L,U=n;if(g){for(p=new r.Buf32(512),m=new r.Buf32(32),L=0;L<144;)U.lens[L++]=8;for(;L<256;)U.lens[L++]=9;for(;L<280;)U.lens[L++]=7;for(;L<288;)U.lens[L++]=8;for(s(1,U.lens,0,288,p,0,U.work,{bits:9}),L=0;L<32;)U.lens[L++]=5;s(2,U.lens,0,32,m,0,U.work,{bits:5}),g=!1}if(U.lencode=p,U.lenbits=9,U.distcode=m,U.distbits=5,n.mode=20,6!==t)break;b>>>=2,y-=2;break e;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=30}b>>>=2,y-=2}break;case 14:for(b>>>=7&y,y-=7&y;y<32;){if(0===d)break e;d--,b+=c[h++]<<y,y+=8}if((65535&b)!=(b>>>16^65535)){e.msg="invalid stored block lengths",n.mode=30;break}if(n.length=65535&b,y=b=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(C=n.length){if(0===(C=v<(C=d<C?d:C)?v:C))break e;r.arraySet(l,c,h,C,f),d-=C,h+=C,v-=C,f+=C,n.length-=C}else n.mode=12;break;case 17:for(;y<14;){if(0===d)break e;d--,b+=c[h++]<<y,y+=8}if(n.nlen=257+(31&b),b>>>=5,y-=5,n.ndist=1+(31&b),b>>>=5,y-=5,n.ncode=4+(15&b),b>>>=4,y-=4,286<n.nlen||30<n.ndist){e.msg="too many length or distance symbols",n.mode=30;break}n.have=0,n.mode=18;case 18:for(;n.have<n.ncode;){for(;y<3;){if(0===d)break e;d--,b+=c[h++]<<y,y+=8}n.lens[P[n.have++]]=7&b,b>>>=3,y-=3}for(;n.have<19;)n.lens[P[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,j={bits:n.lenbits},M=s(0,n.lens,0,19,n.lencode,0,n.work,j),n.lenbits=j.bits,M){e.msg="invalid code lengths set",n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have<n.nlen+n.ndist;){for(;_=(F=n.lencode[b&(1<<n.lenbits)-1])>>>16&255,O=65535&F,!((S=F>>>24)<=y);){if(0===d)break e;d--,b+=c[h++]<<y,y+=8}if(O<16)b>>>=S,y-=S,n.lens[n.have++]=O;else{if(16===O){for(N=S+2;y<N;){if(0===d)break e;d--,b+=c[h++]<<y,y+=8}if(b>>>=S,y-=S,0===n.have){e.msg="invalid bit length repeat",n.mode=30;break}I=n.lens[n.have-1],C=3+(3&b),b>>>=2,y-=2}else if(17===O){for(N=S+3;y<N;){if(0===d)break e;d--,b+=c[h++]<<y,y+=8}I=0,C=3+(7&(b>>>=S)),b>>>=3,y=y-S-3}else{for(N=S+7;y<N;){if(0===d)break e;d--,b+=c[h++]<<y,y+=8}I=0,C=11+(127&(b>>>=S)),b>>>=7,y=y-S-7}if(n.have+C>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=30;break}for(;C--;)n.lens[n.have++]=I}}if(30===n.mode)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=30;break}if(n.lenbits=9,j={bits:n.lenbits},M=s(1,n.lens,0,n.nlen,n.lencode,0,n.work,j),n.lenbits=j.bits,M){e.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,j={bits:n.distbits},M=s(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,j),n.distbits=j.bits,M){e.msg="invalid distances set",n.mode=30;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(6<=d&&258<=v){e.next_out=f,e.avail_out=v,e.next_in=h,e.avail_in=d,n.hold=b,n.bits=y,a(e,x),f=e.next_out,l=e.output,v=e.avail_out,h=e.next_in,c=e.input,d=e.avail_in,b=n.hold,y=n.bits,12===n.mode&&(n.back=-1);break}for(n.back=0;_=(F=n.lencode[b&(1<<n.lenbits)-1])>>>16&255,O=65535&F,!((S=F>>>24)<=y);){if(0===d)break e;d--,b+=c[h++]<<y,y+=8}if(_&&0==(240&_)){for(T=S,D=_,B=O;_=(F=n.lencode[B+((b&(1<<T+D)-1)>>T)])>>>16&255,O=65535&F,!(T+(S=F>>>24)<=y);){if(0===d)break e;d--,b+=c[h++]<<y,y+=8}b>>>=T,y-=T,n.back+=T}if(b>>>=S,y-=S,n.back+=S,n.length=O,0===_){n.mode=26;break}if(32&_){n.back=-1,n.mode=12;break}if(64&_){e.msg="invalid literal/length code",n.mode=30;break}n.extra=15&_,n.mode=22;case 22:if(n.extra){for(N=n.extra;y<N;){if(0===d)break e;d--,b+=c[h++]<<y,y+=8}n.length+=b&(1<<n.extra)-1,b>>>=n.extra,y-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;_=(F=n.distcode[b&(1<<n.distbits)-1])>>>16&255,O=65535&F,!((S=F>>>24)<=y);){if(0===d)break e;d--,b+=c[h++]<<y,y+=8}if(0==(240&_)){for(T=S,D=_,B=O;_=(F=n.distcode[B+((b&(1<<T+D)-1)>>T)])>>>16&255,O=65535&F,!(T+(S=F>>>24)<=y);){if(0===d)break e;d--,b+=c[h++]<<y,y+=8}b>>>=T,y-=T,n.back+=T}if(b>>>=S,y-=S,n.back+=S,64&_){e.msg="invalid distance code",n.mode=30;break}n.offset=O,n.extra=15&_,n.mode=24;case 24:if(n.extra){for(N=n.extra;y<N;){if(0===d)break e;d--,b+=c[h++]<<y,y+=8}n.offset+=b&(1<<n.extra)-1,b>>>=n.extra,y-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=30;break}n.mode=25;case 25:if(0===v)break e;if(n.offset>(C=x-v)){if((C=n.offset-C)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=30;break}k=C>n.wnext?(C-=n.wnext,n.wsize-C):n.wnext-C,C>n.length&&(C=n.length),E=n.window}else E=l,k=f-n.offset,C=n.length;for(v-=C=v<C?v:C,n.length-=C;l[f++]=E[k++],--C;);0===n.length&&(n.mode=21);break;case 26:if(0===v)break e;l[f++]=n.length,v--,n.mode=21;break;case 27:if(n.wrap){for(;y<32;){if(0===d)break e;d--,b|=c[h++]<<y,y+=8}if(x-=v,e.total_out+=x,n.total+=x,x&&(e.adler=n.check=(n.flags?o:i)(n.check,l,x,f-x)),x=v,(n.flags?b:u(b))!==n.check){e.msg="incorrect data check",n.mode=30;break}y=b=0}n.mode=28;case 28:if(n.wrap&&n.flags){for(;y<32;){if(0===d)break e;d--,b+=c[h++]<<y,y+=8}if(b!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=30;break}y=b=0}n.mode=29;case 29:M=1;break e;case 30:M=-3;break e;case 31:return-4;default:return-2}return e.next_out=f,e.avail_out=v,e.next_in=h,e.avail_in=d,n.hold=b,n.bits=y,(n.wsize||x!==e.avail_out&&n.mode<30&&(n.mode<27||4!==t))&&A(e,e.output,e.next_out,x-e.avail_out)?(n.mode=31,-4):(w-=e.avail_in,x-=e.avail_out,e.total_in+=w,e.total_out+=x,n.total+=x,n.wrap&&x&&(e.adler=n.check=(n.flags?o:i)(n.check,l,x,e.next_out-x)),e.data_type=n.bits+(n.last?64:0)+(12===n.mode?128:0)+(20===n.mode||15===n.mode?256:0),M=(0==w&&0===x||4===t)&&0===M?-5:M)},n.inflateEnd=function(e){var t;return e&&e.state?((t=e.state).window&&(t.window=null),e.state=null,0):-2},n.inflateGetHeader=function(e,t){return e&&e.state&&0!=(2&(e=e.state).wrap)?((e.head=t).done=!1,0):-2},n.inflateSetDictionary=function(e,t){var n,r=t.length;return!e||!e.state||0!==(n=e.state).wrap&&11!==n.mode?-2:11===n.mode&&i(1,t,r,0)!==n.check?-3:A(e,t,r,r)?(n.mode=31,-4):(n.havedict=1,0)},n.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":442,"./adler32":444,"./crc32":446,"./inffast":449,"./inftrees":451}],451:[function(e,t,n){"use strict";var r=e("../utils/common"),i=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],o=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],a=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],s=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];t.exports=function(e,t,n,u,c,l,h,f){var d,p,m,g,A,v,b,y,w,x=f.bits,C=0,k=0,E=0,S=0,_=0,O=0,T=0,D=0,B=0,I=0,M=null,j=0,N=new r.Buf16(16),F=new r.Buf16(16),R=null,P=0;for(C=0;C<=15;C++)N[C]=0;for(k=0;k<u;k++)N[t[n+k]]++;for(_=x,S=15;1<=S&&0===N[S];S--);if(S<_&&(_=S),0===S)c[l++]=20971520,c[l++]=20971520,f.bits=1;else{for(E=1;E<S&&0===N[E];E++);for(_<E&&(_=E),C=D=1;C<=15;C++)if((D=(D<<1)-N[C])<0)return-1;if(0<D&&(0===e||1!==S))return-1;for(F[1]=0,C=1;C<15;C++)F[C+1]=F[C]+N[C];for(k=0;k<u;k++)0!==t[n+k]&&(h[F[t[n+k]]++]=k);if(v=0===e?(M=R=h,19):1===e?(M=i,j-=257,R=o,P-=257,256):(M=a,R=s,-1),C=E,A=l,T=k=I=0,m=-1,g=(B=1<<(O=_))-1,1===e&&852<B||2===e&&592<B)return 1;for(;;){for(w=h[k]<v?(y=0,h[k]):h[k]>v?(y=R[P+h[k]],M[j+h[k]]):(y=96,0),d=1<<(b=C-T),E=p=1<<O;c[A+(I>>T)+(p-=d)]=b<<24|y<<16|w|0,0!==p;);for(d=1<<C-1;I&d;)d>>=1;if(I=0!==d?(I&d-1)+d:0,k++,0==--N[C]){if(C===S)break;C=t[n+h[k]]}if(_<C&&(I&g)!==m){for(A+=E,D=1<<(O=C-(T=0===T?_:T));O+T<S&&!((D-=N[O+T])<=0);)O++,D<<=1;if(B+=1<<O,1===e&&852<B||2===e&&592<B)return 1;c[m=I&g]=_<<24|O<<16|A-l|0}}0!==I&&(c[A+I]=C-T<<24|64<<16|0),f.bits=_}return 0}},{"../utils/common":442}],452:[function(e,t,n){"use strict";t.exports={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"}},{}],453:[function(e,t,n){"use strict";var r=e("../utils/common");function i(e){for(var t=e.length;0<=--t;)e[t]=0}var o=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],a=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],s=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],u=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],c=new Array(576),l=(i(c),new Array(60)),h=(i(l),new Array(512)),f=(i(h),new Array(256)),d=(i(f),new Array(29));i(d);var p,m,g,A=new Array(30);function v(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}function b(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function y(e){return e<256?h[e]:h[256+(e>>>7)]}function w(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function x(e,t,n){e.bi_valid>16-n?(e.bi_buf|=t<<e.bi_valid&65535,w(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)}function C(e,t,n){x(e,n[2*t],n[2*t+1])}function k(e,t){for(var n=0;n|=1&e,e>>>=1,n<<=1,0<--t;);return n>>>1}function E(e,t,n){for(var r,i=new Array(16),o=0,a=1;a<=15;a++)i[a]=o=o+n[a-1]<<1;for(r=0;r<=t;r++){var s=e[2*r+1];0!==s&&(e[2*r]=k(i[s]++,s))}}function S(e){for(var t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function _(e){8<e.bi_valid?w(e,e.bi_buf):0<e.bi_valid&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function O(e,t,n,r){var i=2*t,o=2*n;return e[i]<e[o]||e[i]===e[o]&&r[t]<=r[n]}function T(e,t,n){for(var r=e.heap[n],i=n<<1;i<=e.heap_len&&(i<e.heap_len&&O(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!O(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r}function D(e,t,n){var r,i,s,u,c=0;if(0!==e.last_lit)for(;r=e.pending_buf[e.d_buf+2*c]<<8|e.pending_buf[e.d_buf+2*c+1],i=e.pending_buf[e.l_buf+c],c++,0==r?C(e,i,t):(C(e,(s=f[i])+256+1,t),0!==(u=o[s])&&x(e,i-=d[s],u),C(e,s=y(--r),n),0!==(u=a[s])&&x(e,r-=A[s],u)),c<e.last_lit;);C(e,256,t)}function B(e,t){var n,r,i,o=t.dyn_tree,a=t.stat_desc.static_tree,s=t.stat_desc.has_stree,u=t.stat_desc.elems,c=-1;for(e.heap_len=0,e.heap_max=573,n=0;n<u;n++)0!==o[2*n]?(e.heap[++e.heap_len]=c=n,e.depth[n]=0):o[2*n+1]=0;for(;e.heap_len<2;)o[2*(i=e.heap[++e.heap_len]=c<2?++c:0)]=1,e.depth[i]=0,e.opt_len--,s&&(e.static_len-=a[2*i+1]);for(t.max_code=c,n=e.heap_len>>1;1<=n;n--)T(e,o,n);for(i=u;n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],T(e,o,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,o[2*i]=o[2*n]+o[2*r],e.depth[i]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,o[2*n+1]=o[2*r+1]=i,e.heap[1]=i++,T(e,o,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1];for(var l,h,f,d,p,m=e,g=t.dyn_tree,A=t.max_code,v=t.stat_desc.static_tree,b=t.stat_desc.has_stree,y=t.stat_desc.extra_bits,w=t.stat_desc.extra_base,x=t.stat_desc.max_length,C=0,k=0;k<=15;k++)m.bl_count[k]=0;for(g[2*m.heap[m.heap_max]+1]=0,l=m.heap_max+1;l<573;l++)(k=g[2*g[2*(h=m.heap[l])+1]+1]+1)>x&&(k=x,C++),g[2*h+1]=k,A<h||(m.bl_count[k]++,d=0,w<=h&&(d=y[h-w]),p=g[2*h],m.opt_len+=p*(k+d),b&&(m.static_len+=p*(v[2*h+1]+d)));if(0!==C){do{for(k=x-1;0===m.bl_count[k];)k--}while(m.bl_count[k]--,m.bl_count[k+1]+=2,m.bl_count[x]--,0<(C-=2));for(k=x;0!==k;k--)for(h=m.bl_count[k];0!==h;)(f=m.heap[--l])>A||(g[2*f+1]!==k&&(m.opt_len+=(k-g[2*f+1])*g[2*f],g[2*f+1]=k),h--)}E(o,c,e.bl_count)}function I(e,t,n){var r,i,o=-1,a=t[1],s=0,u=7,c=4;for(0===a&&(u=138,c=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)i=a,a=t[2*(r+1)+1],++s<u&&i===a||(s<c?e.bl_tree[2*i]+=s:0!==i?(i!==o&&e.bl_tree[2*i]++,e.bl_tree[32]++):s<=10?e.bl_tree[34]++:e.bl_tree[36]++,o=i,c=(s=0)===a?(u=138,3):i===a?(u=6,3):(u=7,4))}function M(e,t,n){var r,i,o=-1,a=t[1],s=0,u=7,c=4;for(0===a&&(u=138,c=3),r=0;r<=n;r++)if(i=a,a=t[2*(r+1)+1],!(++s<u&&i===a)){if(s<c)for(;C(e,i,e.bl_tree),0!=--s;);else 0!==i?(i!==o&&(C(e,i,e.bl_tree),s--),C(e,16,e.bl_tree),x(e,s-3,2)):s<=10?(C(e,17,e.bl_tree),x(e,s-3,3)):(C(e,18,e.bl_tree),x(e,s-11,7));o=i,c=(s=0)===a?(u=138,3):i===a?(u=6,3):(u=7,4)}}i(A);var j=!1;function N(e,t,n,i){x(e,0+(i?1:0),3),i=t,t=n,_(n=e),w(n,t),w(n,~t),r.arraySet(n.pending_buf,n.window,i,t,n.pending),n.pending+=t}n._tr_init=function(e){if(!j){for(var t,n,r,i=new Array(16),u=0,y=0;y<28;y++)for(d[y]=u,t=0;t<1<<o[y];t++)f[u++]=y;for(f[u-1]=y,y=r=0;y<16;y++)for(A[y]=r,t=0;t<1<<a[y];t++)h[r++]=y;for(r>>=7;y<30;y++)for(A[y]=r<<7,t=0;t<1<<a[y]-7;t++)h[256+r++]=y;for(n=0;n<=15;n++)i[n]=0;for(t=0;t<=143;)c[2*t+1]=8,t++,i[8]++;for(;t<=255;)c[2*t+1]=9,t++,i[9]++;for(;t<=279;)c[2*t+1]=7,t++,i[7]++;for(;t<=287;)c[2*t+1]=8,t++,i[8]++;for(E(c,287,i),t=0;t<30;t++)l[2*t+1]=5,l[2*t]=k(t,5);p=new v(c,o,257,286,15),m=new v(l,a,0,30,15),g=new v(new Array(0),s,0,19,7),j=!0}e.l_desc=new b(e.dyn_ltree,p),e.d_desc=new b(e.dyn_dtree,m),e.bl_desc=new b(e.bl_tree,g),e.bi_buf=0,e.bi_valid=0,S(e)},n._tr_stored_block=N,n._tr_flush_block=function(e,t,n,r){var i,o,a,s=0;if(0<e.level?(2===e.strm.data_type&&(e.strm.data_type=function(e){for(var t=4093624447,n=0;n<=31;n++,t>>>=1)if(1&t&&0!==e.dyn_ltree[2*n])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(n=32;n<256;n++)if(0!==e.dyn_ltree[2*n])return 1;return 0}(e)),B(e,e.l_desc),B(e,e.d_desc),s=function(e){var t;for(I(e,e.dyn_ltree,e.l_desc.max_code),I(e,e.dyn_dtree,e.d_desc.max_code),B(e,e.bl_desc),t=18;3<=t&&0===e.bl_tree[2*u[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),i=e.opt_len+3+7>>>3,(o=e.static_len+3+7>>>3)<=i&&(i=o)):i=o=n+5,n+4<=i&&-1!==t)N(e,t,n,r);else if(4===e.strategy||o===i)x(e,2+(r?1:0),3),D(e,c,l);else{x(e,4+(r?1:0),3);var h=e,f=(t=e.l_desc.max_code+1,n=e.d_desc.max_code+1,s+1);for(x(h,t-257,5),x(h,n-1,5),x(h,f-4,4),a=0;a<f;a++)x(h,h.bl_tree[2*u[a]+1],3);M(h,h.dyn_ltree,t-1),M(h,h.dyn_dtree,n-1),D(e,e.dyn_ltree,e.dyn_dtree)}S(e),r&&_(e)},n._tr_tally=function(e,t,n){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(f[n]+256+1)]++,e.dyn_dtree[2*y(t)]++),e.last_lit===e.lit_bufsize-1},n._tr_align=function(e){x(e,2,3),C(e,256,c),16===(e=e).bi_valid?(w(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}},{"../utils/common":442}],454:[function(e,t,n){"use strict";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],455:[function(e,t,n){t.exports={"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}},{}],456:[function(e,t,n){"use strict";var r=e("asn1.js"),i=(e=(n.certificate=e("./certificate"),r.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}))),e=(n.RSAPrivateKey=e,r.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}))),e=(n.RSAPublicKey=e,r.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(i),this.key("subjectPublicKey").bitstr())}))),n.PublicKey=e,r.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())}))),o=(e=r.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(i),this.key("subjectPrivateKey").octstr())})),e=(n.PrivateKey=e,r.define("EncryptedPrivateKeyInfo",(function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}))),e=(n.EncryptedPrivateKey=e,r.define("DSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}))),e=(n.DSAPrivateKey=e,n.DSAparam=r.define("DSAparam",(function(){this.int()})),r.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(o),this.key("publicKey").optional().explicit(1).bitstr())}))),n.ECPrivateKey=e,r.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})})));n.signature=r.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},{"./certificate":457,"asn1.js":167}],457:[function(e,t,n){"use strict";var r=(e=e("asn1.js")).define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),i=e.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),o=e.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),a=e.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(o),this.key("subjectPublicKey").bitstr())})),s=e.define("RelativeDistinguishedName",(function(){this.setof(i)})),u=e.define("RDNSequence",(function(){this.seqof(s)})),c=e.define("Name",(function(){this.choice({rdnSequence:this.use(u)})})),l=e.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(r),this.key("notAfter").use(r))})),h=e.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),f=e.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(o),this.key("issuer").use(c),this.key("validity").use(l),this.key("subject").use(c),this.key("subjectPublicKeyInfo").use(a),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(h).optional())}));e=e.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(f),this.key("signatureAlgorithm").use(o),this.key("signatureValue").bitstr())}));t.exports=e},{"asn1.js":167}],458:[function(e,t,n){"use strict";var r=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,i=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,o=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,a=e("evp_bytestokey"),s=e("browserify-aes"),u=e("safe-buffer").Buffer;t.exports=function(e,t){var n,c,l,h=(e=e.toString()).match(r);return l=h?(c="aes"+h[1],l=u.from(h[2],"hex"),n=u.from(h[3].replace(/[\r\n]/g,""),"base64"),t=a(t,l.slice(0,8),parseInt(h[1],10)).key,h=[],c=s.createDecipheriv(c,t,l),h.push(c.update(n)),h.push(c.final()),u.concat(h)):(t=e.match(o),u.from(t[2].replace(/[\r\n]/g,""),"base64")),{tag:e.match(i)[1],data:l}}},{"browserify-aes":188,evp_bytestokey:368,"safe-buffer":494}],459:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i=e("./asn1"),o=e("./aesid.json"),a=e("./fixProc"),s=e("browserify-aes"),u=e("pbkdf2"),c=e("safe-buffer").Buffer;(t.exports=function(e){var t;"object"!==r(e)||c.isBuffer(e)||(t=e.passphrase,e=e.key),"string"==typeof e&&(e=c.from(e));var n,l,h,f,d,p,m,g,A,v=(e=a(e,t)).tag,b=e.data;switch(v){case"CERTIFICATE":l=i.certificate.decode(b,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(n=(l=l||i.PublicKey.decode(b,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return i.RSAPublicKey.decode(l.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return l.subjectPrivateKey=l.subjectPublicKey,{type:"ec",data:l};case"1.2.840.10040.4.1":return l.algorithm.params.pub_key=i.DSAparam.decode(l.subjectPublicKey.data,"der"),{type:"dsa",data:l.algorithm.params};default:throw new Error("unknown key id "+n)}case"ENCRYPTED PRIVATE KEY":f=t,d=(h=b=i.EncryptedPrivateKey.decode(b,"der")).algorithm.decrypt.kde.kdeparams.salt,p=parseInt(h.algorithm.decrypt.kde.kdeparams.iters.toString(),10),m=o[h.algorithm.decrypt.cipher.algo.join(".")],g=h.algorithm.decrypt.cipher.iv,h=h.subjectPrivateKey,A=parseInt(m.split("-")[1],10)/8,f=u.pbkdf2Sync(f,d,p,A,"sha1"),d=s.createDecipheriv(m,f,g),(p=[]).push(d.update(h)),p.push(d.final()),b=c.concat(p);case"PRIVATE KEY":switch(n=(l=i.PrivateKey.decode(b,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return i.RSAPrivateKey.decode(l.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:l.algorithm.curve,privateKey:i.ECPrivateKey.decode(l.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return l.algorithm.params.priv_key=i.DSAparam.decode(l.subjectPrivateKey,"der"),{type:"dsa",params:l.algorithm.params};default:throw new Error("unknown key id "+n)}case"RSA PUBLIC KEY":return i.RSAPublicKey.decode(b,"der");case"RSA PRIVATE KEY":return i.RSAPrivateKey.decode(b,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:i.DSAPrivateKey.decode(b,"der")};case"EC PRIVATE KEY":return{curve:(b=i.ECPrivateKey.decode(b,"der")).parameters.value,privateKey:b.privateKey};default:throw new Error("unknown key type "+v)}}).signature=i.signature},{"./aesid.json":455,"./asn1":456,"./fixProc":458,"browserify-aes":188,pbkdf2:460,"safe-buffer":494}],460:[function(e,t,n){"use strict";n.pbkdf2=e("./lib/async"),n.pbkdf2Sync=e("./lib/sync")},{"./lib/async":461,"./lib/sync":464}],461:[function(e,n,r){(function(t,r){"use strict";var i,o=e("safe-buffer").Buffer,a=e("./precondition"),s=e("./default-encoding"),u=e("./sync"),c=e("./to-buffer"),l=r.crypto&&r.crypto.subtle,h={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},f=[];function d(e,t,n,r,i){return l.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then((function(e){return l.deriveBits({name:"PBKDF2",salt:t,iterations:n,hash:{name:i}},e,r<<3)})).then((function(e){return o.from(e)}))}n.exports=function(e,n,p,m,g,A){"function"==typeof g&&(A=g,g=void 0);var v,b,y,w=h[(g=g||"sha1").toLowerCase()];if(!w||"function"!=typeof r.Promise)return t.nextTick((function(){var t;try{t=u(e,n,p,m,g)}catch(t){return A(t)}A(null,t)}));if(a(p,m),e=c(e,s,"Password"),n=c(n,s,"Salt"),"function"!=typeof A)throw new Error("No callback provided to pbkdf2");b=w,b=((!r.process||r.process.browser)&&l&&l.importKey&&l.deriveBits?void 0!==f[b]?f[b]:(y=d(i=i||o.alloc(8),i,10,128,b).then((function(){return!0})).catch((function(){return!1})),f[b]=y):Promise.resolve(!1)).then((function(t){return t?d(e,n,p,m,w):u(e,n,p,m,g)})),v=A,b.then((function(e){t.nextTick((function(){v(null,e)}))}),(function(e){t.nextTick((function(){v(e)}))}))}}).call(this,e("_process"),void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./default-encoding":462,"./precondition":463,"./sync":464,"./to-buffer":465,_process:467,"safe-buffer":494}],462:[function(e,t,n){(function(e){"use strict";e=e.browser||!e.version||6<=parseInt(e.version.split(".")[0].slice(1),10)?"utf-8":"binary",t.exports=e}).call(this,e("_process"))},{_process:467}],463:[function(e,t,n){"use strict";var r=Math.pow(2,30)-1;t.exports=function(e,t){if("number"!=typeof e)throw new TypeError("Iterations not a number");if(e<0)throw new TypeError("Bad iterations");if("number"!=typeof t)throw new TypeError("Key length not a number");if(t<0||r<t||t!=t)throw new TypeError("Bad key length")}},{}],464:[function(e,t,n){"use strict";var r=e("create-hash/md5"),i=e("ripemd160"),o=e("sha.js"),a=e("safe-buffer").Buffer,s=e("./precondition"),u=e("./default-encoding"),c=e("./to-buffer"),l=a.alloc(128),h={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function f(e,t,n){var s,u="rmd160"===(s=e)||"ripemd160"===s?function(e){return(new i).update(e).digest()}:"md5"===s?r:function(e){return o(s).update(e).digest()},c="sha512"===e||"sha384"===e?128:64;t.length>c?t=u(t):t.length<c&&(t=a.concat([t,l],c));for(var f=a.allocUnsafe(c+h[e]),d=a.allocUnsafe(c+h[e]),p=0;p<c;p++)f[p]=54^t[p],d[p]=92^t[p];n=a.allocUnsafe(c+n+4),f.copy(n,0,0,c),this.ipad1=n,this.ipad2=f,this.opad=d,this.alg=e,this.blocksize=c,this.hash=u,this.size=h[e]}f.prototype.run=function(e,t){return e.copy(t,this.blocksize),this.hash(t).copy(this.opad,this.blocksize),this.hash(this.opad)},t.exports=function(e,t,n,r,i){s(n,r);var o=new f(i=i||"sha1",e=c(e,u,"Password"),(t=c(t,u,"Salt")).length),l=a.allocUnsafe(r),d=a.allocUnsafe(t.length+4);t.copy(d,0,0,t.length);for(var p=0,m=h[i],g=Math.ceil(r/m),A=1;A<=g;A++){d.writeUInt32BE(A,t.length);for(var v=o.run(d,o.ipad1),b=v,y=1;y<n;y++){b=o.run(b,o.ipad2);for(var w=0;w<m;w++)v[w]^=b[w]}v.copy(l,p),p+=m}return l}},{"./default-encoding":462,"./precondition":463,"./to-buffer":465,"create-hash/md5":332,ripemd160:493,"safe-buffer":494,"sha.js":499}],465:[function(e,t,n){"use strict";var r=e("safe-buffer").Buffer;t.exports=function(e,t,n){if(r.isBuffer(e))return e;if("string"==typeof e)return r.from(e,t);if(ArrayBuffer.isView(e))return r.from(e.buffer);throw new TypeError(n+" must be a string, a Buffer, a typed array or a DataView")}},{"safe-buffer":494}],466:[function(e,t,n){(function(e){"use strict";void 0===e||!e.version||0===e.version.indexOf("v0.")||0===e.version.indexOf("v1.")&&0!==e.version.indexOf("v1.8.")?t.exports={nextTick:function(t,n,r,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var o,a,s=arguments.length;switch(s){case 0:case 1:return e.nextTick(t);case 2:return e.nextTick((function(){t.call(null,n)}));case 3:return e.nextTick((function(){t.call(null,n,r)}));case 4:return e.nextTick((function(){t.call(null,n,r,i)}));default:for(o=new Array(s-1),a=0;a<o.length;)o[a++]=arguments[a];return e.nextTick((function(){t.apply(null,o)}))}}}:t.exports=e}).call(this,e("_process"))},{_process:467}],467:[function(e,t,n){"use strict";var r,i;t=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function s(e){if(r===setTimeout)return setTimeout(e,0);if((r===o||!r)&&setTimeout)return(r=setTimeout)(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}try{r="function"==typeof setTimeout?setTimeout:o}catch(e){r=o}try{i="function"==typeof clearTimeout?clearTimeout:a}catch(e){i=a}var u,c=[],l=!1,h=-1;function f(){l&&u&&(l=!1,u.length?c=u.concat(c):h=-1,c.length&&d())}function d(){if(!l){var e=s(f);l=!0;for(var t=c.length;t;){for(u=c,c=[];++h<t;)u&&u[h].run();h=-1,t=c.length}u=null,l=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===a||!i)&&clearTimeout)return(i=clearTimeout)(e);try{i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function m(){}t.nextTick=function(e){var t=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new p(e,t)),1!==c.length||l||s(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},t.title="browser",t.browser=!0,t.env={},t.argv=[],t.version="",t.versions={},t.on=m,t.addListener=m,t.once=m,t.off=m,t.removeListener=m,t.removeAllListeners=m,t.emit=m,t.prependListener=m,t.prependOnceListener=m,t.listeners=function(e){return[]},t.binding=function(e){throw new Error("process.binding is not supported")},t.cwd=function(){return"/"},t.chdir=function(e){throw new Error("process.chdir is not supported")},t.umask=function(){return 0}},{}],468:[function(e,t,n){"use strict";n.publicEncrypt=e("./publicEncrypt"),n.privateDecrypt=e("./privateDecrypt"),n.privateEncrypt=function(e,t){return n.publicEncrypt(e,t,!0)},n.publicDecrypt=function(e,t){return n.privateDecrypt(e,t,!0)}},{"./privateDecrypt":471,"./publicEncrypt":472}],469:[function(e,t,n){"use strict";var r=e("create-hash"),i=e("safe-buffer").Buffer;t.exports=function(e,t){for(var n,o,a=i.alloc(0),s=0;a.length<t;)n=s++,o=void 0,(o=i.allocUnsafe(4)).writeUInt32BE(n,0),n=o,a=i.concat([a,r("sha1").update(e).update(n).digest()]);return a.slice(0,t)}},{"create-hash":331,"safe-buffer":494}],470:[function(e,t,n){arguments[4][181][0].apply(n,arguments)},{buffer:185,dup:181}],471:[function(e,t,n){"use strict";var r=e("parse-asn1"),i=e("./mgf"),o=e("./xor"),a=e("bn.js"),s=e("browserify-rsa"),u=e("create-hash"),c=e("./withPublic"),l=e("safe-buffer").Buffer;t.exports=function(e,t,n){var h=e.padding||(n?1:4),f=(e=r(e)).modulus.byteLength();if(t.length>f||0<=new a(t).cmp(e.modulus))throw new Error("decryption error");t=n?c(new a(t),e):s(t,e);var d=l.alloc(f-t.length);if(t=l.concat([d,t],f),4===h){d=t,f=e.modulus.byteLength();var p=(e=u("sha1").update(l.alloc(0)).digest()).length;if(0!==d[0])throw new Error("decryption error");var m=d.slice(1,p+1),g=(d=d.slice(p+1),m=o(m,i(d,p)),o(d,i(m,f-p-1)));if(function(e,t){e=l.from(e),t=l.from(t);for(var n=0,r=e.length,i=(e.length!==t.length&&(n++,r=Math.min(e.length,t.length)),-1);++i<r;)n+=e[i]^t[i];return n}(e,g.slice(0,p)))throw new Error("decryption error");for(var A=p;0===g[A];)A++;if(1!==g[A++])throw new Error("decryption error");return g.slice(A)}if(1===h){for(var v=t,b=(d=n,m=v.slice(0,2),2),y=0;0!==v[b++];)if(b>=v.length){y++;break}if(f=v.slice(2,b-1),("0002"!==m.toString("hex")&&!d||"0001"!==m.toString("hex")&&d)&&y++,f.length<8&&y++,y)throw new Error("decryption error");return v.slice(b)}if(3===h)return t;throw new Error("unknown padding")}},{"./mgf":469,"./withPublic":473,"./xor":474,"bn.js":470,"browserify-rsa":206,"create-hash":331,"parse-asn1":459,"safe-buffer":494}],472:[function(e,t,n){"use strict";var r=e("parse-asn1"),i=e("randombytes"),o=e("create-hash"),a=e("./mgf"),s=e("./xor"),u=e("bn.js"),c=e("./withPublic"),l=e("browserify-rsa"),h=e("safe-buffer").Buffer;t.exports=function(e,t,n){var f,d=e.padding||(n?1:4),p=r(e);if(4===d)f=function(e){var t=p.modulus.byteLength(),n=e.length,r=(f=o("sha1").update(h.alloc(0)).digest()).length;if(t-(c=2*r)-2<n)throw new Error("message too long");n=h.alloc(t-n-c-2);var c=t-r-1,l=i(r),f=s(h.concat([f,n,h.alloc(1,1),e],c),a(l,c));n=s(l,a(f,r));return new u(h.concat([h.alloc(1),n,f],t))}(t);else if(1===d)f=function(e,t,n){var r=t.length;if((e=e.modulus.byteLength())-11<r)throw new Error("message too long");return r=n?h.alloc(e-r-3,255):function(e){for(var t,n=h.allocUnsafe(e),r=0,o=i(2*e),a=0;r<e;)a===o.length&&(o=i(2*e),a=0),(t=o[a++])&&(n[r++]=t);return n}(e-r-3),new u(h.concat([h.from([0,n?1:2]),r,h.alloc(1),t],e))}(p,t,n);else{if(3!==d)throw new Error("unknown padding");if(0<=(f=new u(t)).cmp(p.modulus))throw new Error("data too long for modulus")}return(n?l:c)(f,p)}},{"./mgf":469,"./withPublic":473,"./xor":474,"bn.js":470,"browserify-rsa":206,"create-hash":331,"parse-asn1":459,randombytes:475,"safe-buffer":494}],473:[function(e,t,n){"use strict";var r=e("bn.js"),i=e("safe-buffer").Buffer;t.exports=function(e,t){return i.from(e.toRed(r.mont(t.modulus)).redPow(new r(t.publicExponent)).fromRed().toArray())}},{"bn.js":470,"safe-buffer":494}],474:[function(e,t,n){"use strict";t.exports=function(e,t){for(var n=e.length,r=-1;++r<n;)e[r]^=t[r];return e}},{}],475:[function(e,n,r){(function(t,r){"use strict";var i=e("safe-buffer").Buffer,o=r.crypto||r.msCrypto;o&&o.getRandomValues?n.exports=function(e,n){if(4294967295<e)throw new RangeError("requested too many random bytes");var r=i.allocUnsafe(e);if(0<e)if(65536<e)for(var a=0;a<e;a+=65536)o.getRandomValues(r.slice(a,a+65536));else o.getRandomValues(r);return"function"==typeof n?t.nextTick((function(){n(null,r)})):r}:n.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}}).call(this,e("_process"),void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:467,"safe-buffer":494}],476:[function(e,n,r){(function(t,n){"use strict";function i(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var o=e("safe-buffer"),a=e("randombytes"),s=o.Buffer,u=o.kMaxLength,c=n.crypto||n.msCrypto,l=Math.pow(2,32)-1;function h(e,t){if("number"!=typeof e||e!=e)throw new TypeError("offset must be a number");if(l<e||e<0)throw new TypeError("offset must be a uint32");if(u<e||t<e)throw new RangeError("offset out of range")}function f(e,t,n){if("number"!=typeof e||e!=e)throw new TypeError("size must be a number");if(l<e||e<0)throw new TypeError("size must be a uint32");if(n<e+t||u<e)throw new RangeError("buffer too small")}function d(e,n,r,i){var o;return t.browser?(o=e.buffer,o=new Uint8Array(o,n,r),c.getRandomValues(o),i?void t.nextTick((function(){i(null,e)})):e):i?void a(r,(function(t,r){if(t)return i(t);r.copy(e,n),i(null,e)})):(a(r).copy(e,n),e)}c&&c.getRandomValues||!t.browser?(r.randomFill=function(e,t,r,i){if(!(s.isBuffer(e)||e instanceof n.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof t)i=t,t=0,r=e.length;else if("function"==typeof r)i=r,r=e.length-t;else if("function"!=typeof i)throw new TypeError('"cb" argument must be a function');return h(t,e.length),f(r,t,e.length),d(e,t,r,i)},r.randomFillSync=function(e,t,r){if(void 0===t&&(t=0),s.isBuffer(e)||e instanceof n.Uint8Array)return h(t,e.length),f(r=void 0===r?e.length-t:r,t,e.length),d(e,t,r);throw new TypeError('"buf" argument must be a Buffer or Uint8Array')}):(r.randomFill=i,r.randomFillSync=i)}).call(this,e("_process"),void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:467,randombytes:475,"safe-buffer":494}],477:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i={};function o(e,t,n){n=n||Error,o=r=n,(a=s).prototype=Object.create(o.prototype),(a.prototype.constructor=a).__proto__=o;var r,o,a=s;function s(e,n,i){return r.call(this,"string"==typeof t?t:t(e,n,i))||this}a.prototype.name=n.name,a.prototype.code=e,i[e]=a}o("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),o("ERR_INVALID_ARG_TYPE",(function(e,t,n){var i,o,a,s;return"string"==typeof t&&"not "===t.substr(0,"not ".length)?(i="must not be",t=t.replace(/^not /,"")):i="must be",a=e,(void 0===s||s>a.length)&&(s=a.length),(" argument"===a.substring(s-" argument".length,s)?"The ".concat(e," "):(s=(o="number"!=typeof o?0:o)+".".length>(a=e).length||-1===a.indexOf(".",o)?"argument":"property",'The "'.concat(e,'" ').concat(s," "))).concat(i," ").concat(function(e,t){var n;return Array.isArray(e)?(n=e.length,e=e.map((function(e){return String(e)})),2<n?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])):"of ".concat(t," ").concat(String(e))}(t,"type"))+". Received type ".concat(r(n))}),TypeError),o("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),o("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),o("ERR_STREAM_PREMATURE_CLOSE","Premature close"),o("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),o("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),o("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),o("ERR_STREAM_WRITE_AFTER_END","write after end"),o("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),o("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),o("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=i},{}],478:[function(e,t,n){(function(n){"use strict";var r=Object.keys||function(e){var t,n=[];for(t in e)n.push(t);return n},i=(t.exports=c,e("./_stream_readable")),o=e("./_stream_writable");e("inherits")(c,i);for(var a=r(o.prototype),s=0;s<a.length;s++){var u=a[s];c.prototype[u]||(c.prototype[u]=o.prototype[u])}function c(e){if(!(this instanceof c))return new c(e);i.call(this,e),o.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",l)))}function l(){this._writableState.ended||n.nextTick(h,this)}function h(e){e.end()}Object.defineProperty(c.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(c.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(c.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(c.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})}).call(this,e("_process"))},{"./_stream_readable":480,"./_stream_writable":482,_process:467,inherits:387}],479:[function(e,t,n){"use strict";t.exports=i;var r=e("./_stream_transform");function i(e){if(!(this instanceof i))return new i(e);r.call(this,e)}e("inherits")(i,r),i.prototype._transform=function(e,t,n){n(null,e)}},{"./_stream_transform":481,inherits:387}],480:[function(e,n,r){(function(t,r){"use strict";function i(e,t){return e.listeners(t).length}(n.exports=C).ReadableState=x,e("events").EventEmitter;var o,a,s,u,c=e("./internal/streams/stream"),l=e("buffer").Buffer,h=r.Uint8Array||function(){},f=(r=e("util"))&&r.debuglog?r.debuglog("stream"):function(){},d=e("./internal/streams/buffer_list"),p=(r=e("./internal/streams/destroy"),e("./internal/streams/state").getHighWaterMark),m=e("../errors").codes,g=m.ERR_INVALID_ARG_TYPE,A=m.ERR_STREAM_PUSH_AFTER_EOF,v=m.ERR_METHOD_NOT_IMPLEMENTED,b=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,y=(e("inherits")(C,c),r.errorOrDestroy),w=["error","close","destroy","pause","resume"];function x(t,n,r){o=o||e("./_stream_duplex"),t=t||{},"boolean"!=typeof r&&(r=n instanceof o),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=p(this,t,"readableHighWaterMark",r),this.buffer=new d,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=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(a=a||e("string_decoder/").StringDecoder,this.decoder=new a(t.encoding),this.encoding=t.encoding)}function C(t){if(o=o||e("./_stream_duplex"),!(this instanceof C))return new C(t);var n=this instanceof o;this._readableState=new x(t,this,n),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),c.call(this)}function k(e,t,n,r,i){f("readableAddChunk",t);var o,a,s,u,c,d=e._readableState;if(null===t)d.reading=!1,s=e,u=d,f("onEofChunk"),u.ended||(u.decoder&&(c=u.decoder.end())&&c.length&&(u.buffer.push(c),u.length+=u.objectMode?1:c.length),u.ended=!0,u.sync?_(s):(u.needReadable=!1,u.emittedReadable||(u.emittedReadable=!0,O(s))));else if(i||(c=d,s=u=t,o=a=l.isBuffer(s)||s instanceof h||"string"==typeof u||void 0===u||c.objectMode?a:new g("chunk",["string","Buffer","Uint8Array"],u)),o)y(e,o);else if(d.objectMode||t&&0<t.length)if("string"==typeof t||d.objectMode||Object.getPrototypeOf(t)===l.prototype||(i=t,t=l.from(i)),r)d.endEmitted?y(e,new b):E(e,d,t,!0);else if(d.ended)y(e,new A);else{if(d.destroyed)return!1;d.reading=!1,!d.decoder||n||(t=d.decoder.write(t),d.objectMode||0!==t.length)?E(e,d,t,!1):T(e,d)}else r||(d.reading=!1,T(e,d));return!d.ended&&(d.length<d.highWaterMark||0===d.length)}function E(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",n)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&_(e)),T(e,t)}function S(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?(t.flowing&&t.length?t.buffer.head.data:t).length:(e>t.highWaterMark&&(t.highWaterMark=(1073741824<=(n=e)?n=1073741824:(n--,n=(n=(n=(n=(n|=n>>>1)|n>>>2)|n>>>4)|n>>>8)|n>>>16,n++),n)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0));var n}function _(e){var n=e._readableState;f("emitReadable",n.needReadable,n.emittedReadable),n.needReadable=!1,n.emittedReadable||(f("emitReadable",n.flowing),n.emittedReadable=!0,t.nextTick(O,e))}function O(e){var t=e._readableState;f("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,j(e)}function T(e,n){n.readingMore||(n.readingMore=!0,t.nextTick(D,e,n))}function D(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var n=t.length;if(f("maybeReadMore read 0"),e.read(0),n===t.length)break}t.readingMore=!1}function B(e){var t=e._readableState;t.readableListening=0<e.listenerCount("readable"),t.resumeScheduled&&!t.paused?t.flowing=!0:0<e.listenerCount("data")&&e.resume()}function I(e){f("readable nexttick read 0"),e.read(0)}function M(e,t){f("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),j(e),t.flowing&&!t.reading&&e.read(0)}function j(e){var t=e._readableState;for(f("flow",t.flowing);t.flowing&&null!==e.read(););}function N(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function F(e){var n=e._readableState;f("endReadable",n.endEmitted),n.endEmitted||(n.ended=!0,t.nextTick(R,n,e))}function R(e,t){f("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)&&(!(e=t._writableState)||e.autoDestroy&&e.finished)&&t.destroy()}function P(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}Object.defineProperty(C.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),C.prototype.destroy=r.destroy,C.prototype._undestroy=r.undestroy,C.prototype._destroy=function(e,t){t(e)},C.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=l.from(e,t),t=""),n=!0),k(this,e,t,!1,n)},C.prototype.unshift=function(e){return k(this,e,null,!0,!1)},C.prototype.isPaused=function(){return!1===this._readableState.flowing},C.prototype.setEncoding=function(t){var n=new(a=a||e("string_decoder/").StringDecoder)(t);this._readableState.decoder=n,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";null!==r;)i+=n.write(r.data),r=r.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this},C.prototype.read=function(e){f("read",e),e=parseInt(e,10);var t,n=this._readableState,r=e;return 0!==e&&(n.emittedReadable=!1),0===e&&n.needReadable&&((0!==n.highWaterMark?n.length>=n.highWaterMark:0<n.length)||n.ended)?(f("read: emitReadable",n.length,n.ended),(0===n.length&&n.ended?F:_)(this),null):0===(e=S(e,n))&&n.ended?(0===n.length&&F(this),null):(t=n.needReadable,f("need readable",t),(0===n.length||n.length-e<n.highWaterMark)&&f("length less than watermark",t=!0),n.ended||n.reading?f("reading or ended",t=!1):t&&(f("do read"),n.reading=!0,n.sync=!0,0===n.length&&(n.needReadable=!0),this._read(n.highWaterMark),n.sync=!1,n.reading||(e=S(r,n))),null===(t=0<e?N(e,n):null)?(n.needReadable=n.length<=n.highWaterMark,e=0):(n.length-=e,n.awaitDrain=0),0===n.length&&(n.ended||(n.needReadable=!0),r!==e&&n.ended&&F(this)),null!==t&&this.emit("data",t),t)},C.prototype._read=function(e){y(this,new v("_read()"))},C.prototype.pipe=function(e,n){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}function a(){f("onend"),e.end()}o.pipesCount+=1,f("pipe count=%d opts=%j",o.pipesCount,n),n=n&&!1===n.end||e===t.stdout||e===t.stderr?A:a,o.endEmitted?t.nextTick(n):r.once("end",n),e.on("unpipe",(function t(n,i){f("onunpipe"),n===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,f("cleanup"),e.removeListener("close",m),e.removeListener("finish",g),e.removeListener("drain",l),e.removeListener("error",p),e.removeListener("unpipe",t),r.removeListener("end",a),r.removeListener("end",A),r.removeListener("data",d),h=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||l())})),s=r;var s,u,c,l=function(){var e=s._readableState;f("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&i(s,"data")&&(e.flowing=!0,j(s))},h=(e.on("drain",l),!1);function d(t){f("ondata"),t=e.write(t),f("dest.write",t),!1===t&&((1===o.pipesCount&&o.pipes===e||1<o.pipesCount&&-1!==P(o.pipes,e))&&!h&&(f("false write response, pause",o.awaitDrain),o.awaitDrain++),r.pause())}function p(t){f("onerror",t),A(),e.removeListener("error",p),0===i(e,"error")&&y(e,t)}function m(){e.removeListener("finish",g),A()}function g(){f("onfinish"),e.removeListener("close",m),A()}function A(){f("unpipe"),r.unpipe(e)}return r.on("data",d),n="error",c=p,"function"==typeof(u=e).prependListener?u.prependListener(n,c):u._events&&u._events[n]?Array.isArray(u._events[n])?u._events[n].unshift(c):u._events[n]=[c,u._events[n]]:u.on(n,c),e.once("close",m),e.once("finish",g),e.emit("pipe",r),o.flowing||(f("pipe resume"),r.resume()),e},C.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0!==t.pipesCount)if(1===t.pipesCount)e&&e!==t.pipes||(e=e||t.pipes,t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n));else if(e){var r=P(t.pipes,e);-1!==r&&(t.pipes.splice(r,1),--t.pipesCount,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n))}else{var i=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a<o;a++)i[a].emit("unpipe",this,{hasUnpiped:!1})}return this},C.prototype.addListener=C.prototype.on=function(e,n){n=c.prototype.on.call(this,e,n);var r=this._readableState;return"data"===e?(r.readableListening=0<this.listenerCount("readable"),!1!==r.flowing&&this.resume()):"readable"!==e||r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.flowing=!1,r.emittedReadable=!1,f("on readable",r.length,r.reading),r.length?_(this):r.reading||t.nextTick(I,this)),n},C.prototype.removeListener=function(e,n){return n=c.prototype.removeListener.call(this,e,n),"readable"===e&&t.nextTick(B,this),n},C.prototype.removeAllListeners=function(e){var n=c.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||t.nextTick(B,this),n},C.prototype.resume=function(){var e,n=this._readableState;return n.flowing||(f("resume"),n.flowing=!n.readableListening,this,(e=n).resumeScheduled||(e.resumeScheduled=!0,t.nextTick(M,this,e))),n.paused=!1,this},C.prototype.pause=function(){return f("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(f("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},C.prototype.wrap=function(e){var t,n=this,r=this._readableState,i=!1;for(t in e.on("end",(function(){var e;f("wrapped end"),r.decoder&&!r.ended&&(e=r.decoder.end())&&e.length&&n.push(e),n.push(null)})),e.on("data",(function(t){f("wrapped data"),r.decoder&&(t=r.decoder.write(t)),r.objectMode&&null==t||(r.objectMode||t&&t.length)&&!n.push(t)&&(i=!0,e.pause())})),e)void 0===this[t]&&"function"==typeof e[t]&&(this[t]=function(t){return function(){return e[t].apply(e,arguments)}}(t));for(var o=0;o<w.length;o++)e.on(w[o],this.emit.bind(this,w[o]));return this._read=function(t){f("wrapped _read",t),i&&(i=!1,e.resume())},this},"function"==typeof Symbol&&(C.prototype[Symbol.asyncIterator]=function(){return(s=void 0===s?e("./internal/streams/async_iterator"):s)(this)}),Object.defineProperty(C.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(C.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(C.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),C._fromList=N,Object.defineProperty(C.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(C.from=function(t,n){return(u=void 0===u?e("./internal/streams/from"):u)(C,t,n)})}).call(this,e("_process"),void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../errors":477,"./_stream_duplex":478,"./internal/streams/async_iterator":483,"./internal/streams/buffer_list":484,"./internal/streams/destroy":485,"./internal/streams/from":487,"./internal/streams/state":489,"./internal/streams/stream":490,_process:467,buffer:216,events:367,inherits:387,"string_decoder/":520,util:185}],481:[function(e,t,n){"use strict";t.exports=u;var r=(t=e("../errors").codes).ERR_METHOD_NOT_IMPLEMENTED,i=t.ERR_MULTIPLE_CALLBACK,o=t.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=t.ERR_TRANSFORM_WITH_LENGTH_0,s=e("./_stream_duplex");function u(e){if(!(this instanceof u))return new u(e);s.call(this,e),this._transformState={afterTransform:function(e,t){var n=this._transformState,r=(n.transforming=!1,n.writecb);if(null===r)return this.emit("error",new i);n.writechunk=null,(n.writecb=null)!=t&&this.push(t),r(e),(n=this._readableState).reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",c)}function c(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?l(this,null,null):this._flush((function(t,n){l(e,t,n)}))}function l(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new a;if(e._transformState.transforming)throw new o;e.push(null)}e("inherits")(u,s),u.prototype.push=function(e,t){return this._transformState.needTransform=!1,s.prototype.push.call(this,e,t)},u.prototype._transform=function(e,t,n){n(new r("_transform()"))},u.prototype._write=function(e,t,n){var r=this._transformState;r.writecb=n,r.writechunk=e,r.writeencoding=t,r.transforming||(n=this._readableState,(r.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark))},u.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},u.prototype._destroy=function(e,t){s.prototype._destroy.call(this,e,(function(e){t(e)}))}},{"../errors":477,"./_stream_duplex":478,inherits:387}],482:[function(e,n,r){(function(t,r){"use strict";function i(e){var t=this;this.next=null,this.entry=null,this.finish=function(){var n=t,r=e,i=n.entry;for(n.entry=null;i;){var o=i.callback;r.pendingcb--,o(void 0),i=i.next}r.corkedRequestsFree.next=n}}(n.exports=k).WritableState=C;var o,a,s={deprecate:e("util-deprecate")},u=e("./internal/streams/stream"),c=e("buffer").Buffer,l=r.Uint8Array||function(){},h=(r=e("./internal/streams/destroy"),e("./internal/streams/state").getHighWaterMark),f=e("../errors").codes,d=f.ERR_INVALID_ARG_TYPE,p=f.ERR_METHOD_NOT_IMPLEMENTED,m=f.ERR_MULTIPLE_CALLBACK,g=f.ERR_STREAM_CANNOT_PIPE,A=f.ERR_STREAM_DESTROYED,v=f.ERR_STREAM_NULL_VALUES,b=f.ERR_STREAM_WRITE_AFTER_END,y=f.ERR_UNKNOWN_ENCODING,w=r.errorOrDestroy;function x(){}function C(n,r,a){o=o||e("./_stream_duplex"),n=n||{},"boolean"!=typeof a&&(a=r instanceof o),this.objectMode=!!n.objectMode,a&&(this.objectMode=this.objectMode||!!n.writableObjectMode),this.highWaterMark=h(this,n,"writableHighWaterMark",a),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,a=(this.destroyed=!1)===n.decodeStrings,this.decodeStrings=!a,this.defaultEncoding=n.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){var n,i,o,a,s=r,u=s._writableState,c=u.sync,l=u.writecb;if("function"!=typeof l)throw new m;(a=u).writing=!1,a.writecb=null,a.length-=a.writelen,a.writelen=0,e?(a=s,i=c,e=e,o=l,--(n=u).pendingcb,i?(t.nextTick(o,e),t.nextTick(D,a,n),a._writableState.errorEmitted=!0,w(a,e)):(o(e),a._writableState.errorEmitted=!0,w(a,e),D(a,n))):((i=O(u)||s.destroyed)||u.corked||u.bufferProcessing||!u.bufferedRequest||_(s,u),c?t.nextTick(S,s,u,i,l):S(s,u,i,l))},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==n.emitClose,this.autoDestroy=!!n.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new i(this)}function k(t){var n=this instanceof(o=o||e("./_stream_duplex"));if(!n&&!a.call(k,this))return new k(t);this._writableState=new C(t,this,n),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),u.call(this)}function E(e,t,n,r,i,o,a){t.writelen=r,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new A("write")):n?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function S(e,t,n,r){var i;n||(n=e,0===(i=t).length&&i.needDrain&&(i.needDrain=!1,n.emit("drain"))),t.pendingcb--,r(),D(e,t)}function _(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,o=new Array(r);(r=t.corkedRequestsFree).entry=n;for(var a=0,s=!0;n;)(o[a]=n).isBuf||(s=!1),n=n.next,a+=1;o.allBuffers=s,E(e,t,!0,t.length,o,"",r.finish),t.pendingcb++,t.lastBufferedRequest=null,r.next?(t.corkedRequestsFree=r.next,r.next=null):t.corkedRequestsFree=new i(t),t.bufferedRequestCount=0}else{for(;n;){var u=n.chunk,c=n.encoding,l=n.callback;if(E(e,t,!1,t.objectMode?1:u.length,u,c,l),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function O(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function T(e,t){e._final((function(n){t.pendingcb--,n&&w(e,n),t.prefinished=!0,e.emit("prefinish"),D(e,t)}))}function D(e,n){var r,i,o=O(n);return o&&(r=e,(i=n).prefinished||i.finalCalled||("function"!=typeof r._final||i.destroyed?(i.prefinished=!0,r.emit("prefinish")):(i.pendingcb++,i.finalCalled=!0,t.nextTick(T,r,i))),0===n.pendingcb&&(n.finished=!0,e.emit("finish"),n.autoDestroy))&&(!(r=e._readableState)||r.autoDestroy&&r.endEmitted)&&e.destroy(),o}e("inherits")(k,u),C.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t};try{Object.defineProperty(C.prototype,"buffer",{get:s.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(r){}"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(a=Function.prototype[Symbol.hasInstance],Object.defineProperty(k,Symbol.hasInstance,{value:function(e){return!!a.call(this,e)||this===k&&e&&e._writableState instanceof C}})):a=function(e){return e instanceof this},k.prototype.pipe=function(){w(this,new g)},k.prototype.write=function(e,n,r){var i,o,a,s,u,h,f,p,m=this._writableState,g=!1,A=!m.objectMode&&(A=e,c.isBuffer(A)||A instanceof l);return A&&!c.isBuffer(e)&&(p=e,e=c.from(p)),"function"==typeof n&&(r=n,n=null),n=A?"buffer":n||m.defaultEncoding,"function"!=typeof r&&(r=x),m.ending?(p=this,h=r,f=new b,w(p,f),t.nextTick(h,f)):!A&&(h=this,f=m,s=r,null===(a=e)?u=new v:"string"==typeof a||f.objectMode||(u=new d("chunk",["string","Buffer"],a)),u&&(w(h,u),t.nextTick(s,u),!0))||(m.pendingcb++,a=this,s=m,u=e,m=n,e=r,(n=A)||(o=u,i=m,u!==(o=s.objectMode||!1===s.decodeStrings||"string"!=typeof o?o:c.from(o,i))&&(n=!0,m="buffer",u=o)),i=s.objectMode?1:u.length,s.length+=i,(o=s.length<s.highWaterMark)||(s.needDrain=!0),s.writing||s.corked?(r=s.lastBufferedRequest,s.lastBufferedRequest={chunk:u,encoding:m,isBuf:n,callback:e,next:null},r?r.next=s.lastBufferedRequest:s.bufferedRequest=s.lastBufferedRequest,s.bufferedRequestCount+=1):E(a,s,!1,i,u,m,e),g=o),g},k.prototype.cork=function(){this._writableState.corked++},k.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||_(this,e))},k.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),-1<["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase()))return this._writableState.defaultEncoding=e,this;throw new y(e)},Object.defineProperty(k.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(k.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),k.prototype._write=function(e,t,n){n(new p("_write()"))},k.prototype._writev=null,k.prototype.end=function(e,n,r){var i=this._writableState;return"function"==typeof e?(r=e,n=e=null):"function"==typeof n&&(r=n,n=null),null!=e&&this.write(e,n),i.corked&&(i.corked=1,this.uncork()),i.ending||(e=this,n=r,(r=i).ending=!0,D(e,r),n&&(r.finished?t.nextTick(n):e.once("finish",n)),r.ended=!0,e.writable=!1),this},Object.defineProperty(k.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),k.prototype.destroy=r.destroy,k.prototype._undestroy=r.undestroy,k.prototype._destroy=function(e,t){t(e)}}).call(this,e("_process"),void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../errors":477,"./_stream_duplex":478,"./internal/streams/destroy":485,"./internal/streams/state":489,"./internal/streams/stream":490,_process:467,buffer:216,inherits:387,"util-deprecate":522}],483:[function(e,t,n){(function(n){"use strict";var r;function i(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}var o=e("./end-of-stream"),a=Symbol("lastResolve"),s=Symbol("lastReject"),u=Symbol("error"),c=Symbol("ended"),l=Symbol("lastPromise"),h=Symbol("handlePromise"),f=Symbol("stream");function d(e,t){return{value:e,done:t}}function p(e){var t,n=e[a];null!==n&&null!==(t=e[f].read())&&(e[l]=null,e[a]=null,e[s]=null,n(d(t,!1)))}var m=Object.getPrototypeOf((function(){})),g=Object.setPrototypeOf((i(r={get stream(){return this[f]},next:function(){var e,t,r,i,o=this;if(null!==(i=this[u]))return Promise.reject(i);if(this[c])return Promise.resolve(d(void 0,!0));if(this[f].destroyed)return new Promise((function(e,t){n.nextTick((function(){o[u]?t(o[u]):e(d(void 0,!0))}))}));if(i=this[l])e=new Promise((t=i,r=this,function(e,n){t.then((function(){r[c]?e(d(void 0,!0)):r[h](e,n)}),n)}));else{if(null!==(i=this[f].read()))return Promise.resolve(d(i,!1));e=new Promise(this[h])}return this[l]=e}},Symbol.asyncIterator,(function(){return this})),i(r,"return",(function(){var e=this;return new Promise((function(t,n){e[f].destroy(null,(function(e){e?n(e):t(d(void 0,!0))}))}))})),r),m);t.exports=function(e){var t,r=Object.create(g,(i(t={},f,{value:e,writable:!0}),i(t,a,{value:null,writable:!0}),i(t,s,{value:null,writable:!0}),i(t,u,{value:null,writable:!0}),i(t,c,{value:e._readableState.endEmitted,writable:!0}),i(t,h,{value:function(e,t){var n=r[f].read();n?(r[l]=null,r[a]=null,r[s]=null,e(d(n,!1))):(r[a]=e,r[s]=t)},writable:!0}),t));return r[l]=null,o(e,(function(e){var t;e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code?(null!==(t=r[s])&&(r[l]=null,r[a]=null,r[s]=null,t(e)),r[u]=e):(null!==(t=r[a])&&(r[l]=null,r[a]=null,t(d(void 0,!(r[s]=null)))),r[c]=!0)})),e.on("readable",function(e){n.nextTick(p,e)}.bind(null,r)),r}}).call(this,e("_process"))},{"./end-of-stream":486,_process:467}],484:[function(e,t,n){"use strict";function r(e,t){var n,r=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)),r}var i=e("buffer").Buffer,o=e("util").inspect;e=o&&o.custom||"inspect";function a(){if(!(this instanceof a))throw new TypeError("Cannot call a class as a function");this.head=null,this.tail=null,this.length=0}t.exports=(function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(a.prototype,[{key:"push",value:function(e){e={data:e,next:null},0<this.length?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(e){e={data:e,next:this.head},0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){var e;if(0!==this.length)return e=this.head.data,1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n}},{key:"concat",value:function(e){if(0===this.length)return i.alloc(0);for(var t,n,r=i.allocUnsafe(e>>>0),o=this.head,a=0;o;)t=o.data,n=a,i.prototype.copy.call(t,r,n),a+=o.data.length,o=o.next;return r}},{key:"consume",value:function(e,t){var n;return e<this.head.data.length?(n=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):n=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,n=1,r=t.data;for(e-=r.length;t=t.next;){var i=t.data,o=e>i.length?i.length:e;if(o===i.length?r+=i:r+=i.slice(0,e),0==(e-=o)){o===i.length?(++n,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t).data=i.slice(o);break}++n}return this.length-=n,r}},{key:"_getBuffer",value:function(e){var t=i.allocUnsafe(e),n=this.head,r=1;for(n.data.copy(t),e-=n.data.length;n=n.next;){var o=n.data,a=e>o.length?o.length:e;if(o.copy(t,t.length-e,0,a),0==(e-=a)){a===o.length?(++r,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n).data=o.slice(a);break}++r}return this.length-=r,t}},{key:e,value:function(e,t){return o(this,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){var r,i;r=e,i=n[t=t],t in r?Object.defineProperty(r,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[t]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},t,{depth:0,customInspect:!1}))}}]),a)},{buffer:216,util:185}],485:[function(e,t,n){(function(e){"use strict";function n(e,t){i(e,t),r(e)}function r(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function i(e,t){e.emit("error",t)}t.exports={destroy:function(t,o){var a=this,s=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return s||u?o?o(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,e.nextTick(i,this,t)):e.nextTick(i,this,t)):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!o&&t?a._writableState?a._writableState.errorEmitted?e.nextTick(r,a):(a._writableState.errorEmitted=!0,e.nextTick(n,a,t)):e.nextTick(n,a,t):o?(e.nextTick(r,a),o(t)):e.nextTick(r,a)}))),this},undestroy:function(){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)},errorOrDestroy:function(e,t){var n=e._readableState,r=e._writableState;n&&n.autoDestroy||r&&r.autoDestroy?e.destroy(t):e.emit("error",t)}}}).call(this,e("_process"))},{_process:467}],486:[function(e,t,n){"use strict";var r=e("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function e(t,n,o){var a,s,u,c,l,h,f,d,p,m,g,A;return"function"==typeof n?e(t,null,n):(a=o||i,s=!1,o=function(){if(!s){s=!0;for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];a.apply(this,t)}},u=(n=n||{}).readable||!1!==n.readable&&t.readable,c=n.writable||!1!==n.writable&&t.writable,l=function(){t.writable||f()},h=t._writableState&&t._writableState.finished,f=function(){h=!(c=!1),u||o.call(t)},d=t._readableState&&t._readableState.endEmitted,p=function(){d=!(u=!1),c||o.call(t)},m=function(e){o.call(t,e)},g=function(){var e;return u&&!d?(t._readableState&&t._readableState.ended||(e=new r),o.call(t,e)):c&&!h?(t._writableState&&t._writableState.ended||(e=new r),o.call(t,e)):void 0},A=function(){t.req.on("finish",f)},t.setHeader&&"function"==typeof t.abort?(t.on("complete",f),t.on("abort",g),t.req?A():t.on("request",A)):c&&!t._writableState&&(t.on("end",l),t.on("close",l)),t.on("end",p),t.on("finish",f),!1!==n.error&&t.on("error",m),t.on("close",g),function(){t.removeListener("complete",f),t.removeListener("abort",g),t.removeListener("request",A),t.req&&t.req.removeListener("finish",f),t.removeListener("end",l),t.removeListener("close",l),t.removeListener("finish",f),t.removeListener("end",p),t.removeListener("error",m),t.removeListener("close",g)})}},{"../../../errors":477}],487:[function(e,t,n){"use strict";t.exports=function(){throw new Error("Readable.from is not available in the browser")}},{}],488:[function(e,t,n){"use strict";var r,i=e("../../../errors").codes,o=i.ERR_MISSING_ARGS,a=i.ERR_STREAM_DESTROYED;function s(e){if(e)throw e}function u(e){e()}function c(e,t){return e.pipe(t)}t.exports=function(){for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];var l,h,f=(h=n).length&&"function"==typeof h[h.length-1]?h.pop():s;if((n=Array.isArray(n[0])?n[0]:n).length<2)throw new o("streams");var d=n.map((function(t,i){var o,s,c,h,p,m,g,A=i<n.length-1;return s=A,i=0<i,h=function(e){l=l||e,e&&d.forEach(u),A||(d.forEach(u),f(l))},p=!1,m=!(c=function(){p||(p=!0,h.apply(void 0,arguments))}),(o=t).on("close",(function(){m=!0})),(r=void 0===r?e("./end-of-stream"):r)(o,{readable:s,writable:i},(function(e){if(e)return c(e);m=!0,c()})),g=!1,function(e){if(!m&&!g)return g=!0,o.setHeader&&"function"==typeof o.abort?o.abort():"function"==typeof o.destroy?o.destroy():void c(e||new a("pipe"))}}));return n.reduce(c)}},{"../../../errors":477,"./end-of-stream":486}],489:[function(e,t,n){"use strict";var r=e("../../../errors").codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(e,t,n,i){if(null==(t=null!=t.highWaterMark?t.highWaterMark:i?t[n]:null))return e.objectMode?16:16384;if(!isFinite(t)||Math.floor(t)!==t||t<0)throw new r(i?n:"highWaterMark",t);return Math.floor(t)}}},{"../../../errors":477}],490:[function(e,t,n){"use strict";t.exports=e("events").EventEmitter},{events:367}],491:[function(e,t,n){"use strict";(((n=t.exports=e("./lib/_stream_readable.js")).Stream=n).Readable=n).Writable=e("./lib/_stream_writable.js"),n.Duplex=e("./lib/_stream_duplex.js"),n.Transform=e("./lib/_stream_transform.js"),n.PassThrough=e("./lib/_stream_passthrough.js"),n.finished=e("./lib/internal/streams/end-of-stream.js"),n.pipeline=e("./lib/internal/streams/pipeline.js")},{"./lib/_stream_duplex.js":478,"./lib/_stream_passthrough.js":479,"./lib/_stream_readable.js":480,"./lib/_stream_transform.js":481,"./lib/_stream_writable.js":482,"./lib/internal/streams/end-of-stream.js":486,"./lib/internal/streams/pipeline.js":488}],492:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}t=function(e){var t=Object.prototype,n=t.hasOwnProperty,i=(p="function"==typeof Symbol?Symbol:{}).iterator||"@@iterator",o=p.asyncIterator||"@@asyncIterator",a=p.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i,o,a,s;t=t&&t.prototype instanceof h?t:h,t=Object.create(t.prototype),r=new w(r||[]);return t._invoke=(i=e,o=n,a=r,s="suspendedStart",function(e,t){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===e)throw t;return{value:void 0,done:!0}}for(a.method=e,a.arg=t;;){var n=a.delegate;if(n&&(n=function e(t,n){var r=t.iterator[n.method];if(void 0===r){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=void 0,e(t,n),"throw"===n.method))return l;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}return"throw"===(r=c(r,t.iterator,n.arg)).type?(n.method="throw",n.arg=r.arg,n.delegate=null,l):(r=r.arg)?r.done?(n[t.resultName]=r.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,l):r:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,l)}(n,a))){if(n===l)continue;return n}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===s)throw s="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);if(s="executing","normal"===(n=c(i,o,a)).type){if(s=a.done?"completed":"suspendedYield",n.arg===l)continue;return{value:n.arg,done:a.done}}"throw"===n.type&&(s="completed",a.method="throw",a.arg=n.arg)}}),t}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var l={};function h(){}function f(){}function d(){}var p,m,g=((m=(m=((p={})[i]=function(){return this},Object.getPrototypeOf))&&m(m(x([]))))&&m!==t&&n.call(m,i)&&(p=m),d.prototype=h.prototype=Object.create(p));function A(e){["next","throw","return"].forEach((function(t){s(e,t,(function(e){return this._invoke(t,e)}))}))}function v(e,t){var i;this._invoke=function(o,a){function s(){return new t((function(i,s){!function i(o,a,s,u){var l;return"throw"!==(o=c(e[o],e,a)).type?(a=(l=o.arg).value)&&"object"===r(a)&&n.call(a,"__await")?t.resolve(a.__await).then((function(e){i("next",e,s,u)}),(function(e){i("throw",e,s,u)})):t.resolve(a).then((function(e){l.value=e,s(l)}),(function(e){return i("throw",e,s,u)})):void u(o.arg)}(o,a,i,s)}))}return i=i?i.then(s,s):s()}}function b(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function y(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function w(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(b,this),this.reset(!0)}function x(e){if(e){var t,r=e[i];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return t=-1,(r=function r(){for(;++t<e.length;)if(n.call(e,t))return r.value=e[t],r.done=!1,r;return r.value=void 0,r.done=!0,r}).next=r}return{next:C}}function C(){return{value:void 0,done:!0}}return((f.prototype=g.constructor=d).constructor=f).displayName=s(d,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){return!!(e="function"==typeof e&&e.constructor)&&(e===f||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,s(e,a,"GeneratorFunction")),e.prototype=Object.create(g),e},e.awrap=function(e){return{__await:e}},A(v.prototype),v.prototype[o]=function(){return this},e.AsyncIterator=v,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new v(u(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},A(g),s(g,a,"Generator"),g[i]=function(){return this},g.toString=function(){return"[object Generator]"},e.keys=function(e){var t,n=[];for(t in e)n.push(t);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=x,w.prototype={constructor:w,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(y),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;0<=i;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;0<=r;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}var a=(o=o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc?null:o)?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,l):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),l},finish:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),y(n),l}},catch:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var n,r,i=this.tryEntries[t];if(i.tryLoc===e)return"throw"===(n=i.completion).type&&(r=n.arg,y(i)),r}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:x(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},e}("object"===(void 0===t?"undefined":r(t))?t.exports:{});try{regeneratorRuntime=t}catch(e){Function("r","regeneratorRuntime = r")(t)}},{}],493:[function(e,t,n){"use strict";var r=e("buffer").Buffer,i=e("inherits"),o=e("hash-base"),a=new Array(16),s=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],u=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],c=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],l=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],h=[0,1518500249,1859775393,2400959708,2840853838],f=[1352829926,1548603684,1836072691,2053994217,0];function d(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function p(e,t){return e<<t|e>>>32-t}function m(e,t,n,r,i,o,a,s){return p(e+(t^n^r)+o+a|0,s)+i|0}function g(e,t,n,r,i,o,a,s){return p(e+(t&n|~t&r)+o+a|0,s)+i|0}function A(e,t,n,r,i,o,a,s){return p(e+((t|~n)^r)+o+a|0,s)+i|0}function v(e,t,n,r,i,o,a,s){return p(e+(t&r|n&~r)+o+a|0,s)+i|0}function b(e,t,n,r,i,o,a,s){return p(e+(t^(n|~r))+o+a|0,s)+i|0}i(d,o),d.prototype._update=function(){for(var e=a,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var n=0|this._a,r=0|this._b,i=0|this._c,o=0|this._d,d=0|this._e,y=0|this._a,w=0|this._b,x=0|this._c,C=0|this._d,k=0|this._e,E=0;E<80;E+=1){var S,_=E<16?(S=m(n,r,i,o,d,e[s[E]],h[0],c[E]),b(y,w,x,C,k,e[u[E]],f[0],l[E])):E<32?(S=g(n,r,i,o,d,e[s[E]],h[1],c[E]),v(y,w,x,C,k,e[u[E]],f[1],l[E])):E<48?(S=A(n,r,i,o,d,e[s[E]],h[2],c[E]),A(y,w,x,C,k,e[u[E]],f[2],l[E])):E<64?(S=v(n,r,i,o,d,e[s[E]],h[3],c[E]),g(y,w,x,C,k,e[u[E]],f[3],l[E])):(S=b(n,r,i,o,d,e[s[E]],h[4],c[E]),m(y,w,x,C,k,e[u[E]],f[4],l[E]));n=d,d=o,o=p(i,10),i=r,r=S,y=k,k=C,C=p(x,10),x=w,w=_}var O=this._b+i+C|0;this._b=this._c+o+k|0,this._c=this._d+d+y|0,this._d=this._e+n+w|0,this._e=this._a+r+x|0,this._a=O},d.prototype._digest=function(){this._block[this._blockOffset++]=128,56<this._blockOffset&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=r.alloc?r.alloc(20):new r(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},t.exports=d},{buffer:216,"hash-base":370,inherits:387}],494:[function(e,t,n){"use strict";var r=e("buffer"),i=r.Buffer;function o(e,t){for(var n in e)t[n]=e[n]}function a(e,t,n){return i(e,t,n)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(o(r,n),n.Buffer=a),o(i,a),a.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,n)},a.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");return e=i(e),void 0!==t?"string"==typeof n?e.fill(t,n):e.fill(t):e.fill(0),e},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},{buffer:216}],495:[function(e,t,n){(function(n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var i,o=e("buffer"),a=o.Buffer,s={};for(i in o)o.hasOwnProperty(i)&&"SlowBuffer"!==i&&"Buffer"!==i&&(s[i]=o[i]);var u=s.Buffer={};for(i in a)a.hasOwnProperty(i)&&"allocUnsafe"!==i&&"allocUnsafeSlow"!==i&&(u[i]=a[i]);if(s.Buffer.prototype=a.prototype,u.from&&u.from!==Uint8Array.from||(u.from=function(e,t,n){if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type '+r(e));if(e&&void 0===e.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+r(e));return a(e,t,n)}),u.alloc||(u.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError('The "size" argument must be of type number. Received type '+r(e));if(e<0||2*(1<<30)<=e)throw new RangeError('The value "'+e+'" is invalid for option "size"');return e=a(e),t&&0!==t.length?"string"==typeof n?e.fill(t,n):e.fill(t):e.fill(0),e}),!s.kStringMaxLength)try{s.kStringMaxLength=n.binding("buffer").kStringMaxLength}catch(n){}s.constants||(s.constants={MAX_LENGTH:s.kMaxLength},s.kStringMaxLength&&(s.constants.MAX_STRING_LENGTH=s.kStringMaxLength)),t.exports=s}).call(this,e("_process"))},{_process:467,buffer:216}],496:[function(e,t,n){"use strict";function r(e,t){var n,r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=a(e))||t&&e&&"number"==typeof e.length)return n&&(e=n),r=0,{s:t=function(){},n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}}}function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||a(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){var n;if(e)return"string"==typeof e?s(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(e,t):void 0}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(e){return 34===e||39===e}Object.defineProperty(n,"__esModule",{value:!0});var c=e("xmlchars/xml/1.0/ed5"),l=e("xmlchars/xml/1.1/ed2"),h=(e=e("xmlchars/xmlns/1.0/ed3"),c.isS),f=c.isChar,d=c.isNameStartChar,p=c.isNameChar,m=c.S_LIST,g=c.NAME_RE,A=l.isChar,v=e.isNCNameStartChar,b=e.isNCNameChar,y=e.NC_NAME_RE,w="http://www.w3.org/XML/1998/namespace",x="http://www.w3.org/2000/xmlns/",C={__proto__:null,xml:w,xmlns:x},k={__proto__:null,amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},E=[].concat(c=[34,39],[91,62]),S=[].concat(c,[60,93]),_=[61,63].concat(o(m)),O=[].concat(o(m),[62,38,60]);function T(e,t,n){switch(t){case"xml":n!==w&&e.fail("xml prefix must be bound to ".concat(w,"."));break;case"xmlns":n!==x&&e.fail("xmlns prefix must be bound to ".concat(x,"."))}switch(n){case x:e.fail(""===t?"the default namespace may not be set to ".concat(n,"."):'may not assign a prefix (even "xmlns") to the URI '.concat(x,"."));break;case w:switch(t){case"xml":break;case"":e.fail("the default namespace may not be set to ".concat(n,"."));break;default:e.fail("may not assign the xml namespace to another prefix.")}}}function D(e){return y.test(e)}function B(e){return g.test(e)}n.EVENTS=["xmldecl","text","processinginstruction","doctype","comment","opentagstart","attribute","opentag","closetag","cdata","error","end","ready"];var I={xmldecl:"xmldeclHandler",text:"textHandler",processinginstruction:"piHandler",doctype:"doctypeHandler",comment:"commentHandler",opentagstart:"openTagStartHandler",attribute:"attributeHandler",opentag:"openTagHandler",closetag:"closeTagHandler",cdata:"cdataHandler",error:"errorHandler",end:"endHandler",ready:"readyHandler"};(function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}})(M.prototype,[{key:"_init",value:function(){this.openWakaBang="",this.text="",this.name="",this.piTarget="",this.entity="",this.q=null,this.tags=[],this.tag=null,this.topNS=null,this.chunk="",this.chunkPosition=0,this.i=0,this.prevI=0,this.carriedFromPrevious=void 0,this.forbiddenState=0,this.attribList=[];var e=this.fragmentOpt;if(void 0===(e=(this.state=e?13:0,this.reportedTextBeforeRoot=this.reportedTextAfterRoot=this.closedRoot=this.sawRoot=e,this.xmlDeclPossible=!e,this.xmlDeclExpects=["version"],this.entityReturnState=void 0,this.opt.defaultXMLVersion))){if(!0===this.opt.forceXMLVersion)throw new Error("forceXMLVersion set but defaultXMLVersion is not set");e="1.0"}this.setXMLVersion(e),this.positionAtNewLine=0,this.doctype=!1,this._closed=!1,this.xmlDecl={version:void 0,encoding:void 0,standalone:void 0},this.line=1,this.column=0,this.ENTITIES=Object.create(k),null!=(e=this.readyHandler)&&e.call(this)}},{key:"on",value:function(e,t){this[I[e]]=t}},{key:"off",value:function(e){this[I[e]]=void 0}},{key:"makeError",value:function(e){var t=null!=(t=this.fileName)?t:"";return this.trackPosition&&(0<t.length&&(t+=":"),t+="".concat(this.line,":").concat(this.column)),0<t.length&&(t+=": "),new Error(t+e)}},{key:"fail",value:function(e){e=this.makeError(e);var t=this.errorHandler;if(void 0===t)throw e;return t(e),this}},{key:"write",value:function(e){if(this.closed)return this.fail("cannot write after close; assign an onready handler.");var t=!1,n=(null===e?(t=!0,e=""):"object"===i(e)&&(e=e.toString()),void 0!==this.carriedFromPrevious&&(e="".concat(this.carriedFromPrevious).concat(e),this.carriedFromPrevious=void 0),e.length),r=e.charCodeAt(n-1),o=(!t&&(13===r||55296<=r&&r<=56319)&&(this.carriedFromPrevious=e[n-1],e=e.slice(0,--n)),this.stateTable);for(this.chunk=e,this.i=0;this.i<n;)o[this.state].call(this);return this.chunkPosition+=n,t?this.end():this}},{key:"close",value:function(){return this.write(null)}},{key:"getCode10",value:function(){var e=this.chunk,t=this.i;if(this.prevI=t,this.i=t+1,t>=e.length)return-1;var n,r=e.charCodeAt(t);if(this.column++,r<55296){if(32<=r||9===r)return r;switch(r){case 10:return this.line++,this.column=0,this.positionAtNewLine=this.position,10;case 13:return 10===e.charCodeAt(t+1)&&(this.i=t+2),this.line++,this.column=0,this.positionAtNewLine=this.position,-2;default:return this.fail("disallowed character."),r}}return 56319<r?(57344<=r&&r<=65533||this.fail("disallowed character."),r):(n=65536+1024*(r-55296)+(e.charCodeAt(t+1)-56320),this.i=t+2,1114111<n&&this.fail("disallowed character."),n)}},{key:"getCode11",value:function(){var e=this.chunk,t=this.i;if(this.prevI=t,this.i=t+1,t>=e.length)return-1;var n,r=e.charCodeAt(t);if(this.column++,r<55296){if(31<r&&r<127||159<r&&8232!==r||9===r)return r;switch(r){case 10:return this.line++,this.column=0,this.positionAtNewLine=this.position,10;case 13:var i=e.charCodeAt(t+1);10!==i&&133!==i||(this.i=t+2);case 133:case 8232:return this.line++,this.column=0,this.positionAtNewLine=this.position,-2;default:return this.fail("disallowed character."),r}}return 56319<r?(57344<=r&&r<=65533||this.fail("disallowed character."),r):(n=65536+1024*(r-55296)+(e.charCodeAt(t+1)-56320),this.i=t+2,1114111<n&&this.fail("disallowed character."),n)}},{key:"getCodeNorm",value:function(){var e=this.getCode();return-2===e?10:e}},{key:"unget",value:function(){this.i=this.prevI,this.column--}},{key:"captureTo",value:function(e){for(var t=this.i,n=this.chunk;;){var r,i=-2===(r=this.getCode());if(-1===(r=i?10:r)||e.includes(r))return this.text+=n.slice(t,this.prevI),r;i&&(this.text+="".concat(n.slice(t,this.prevI),"\n"),t=this.i)}}},{key:"captureToChar",value:function(e){for(var t=this.i,n=this.chunk;;){var r=this.getCode();switch(r){case-2:this.text+="".concat(n.slice(t,this.prevI),"\n"),t=this.i,r=10;break;case-1:return this.text+=n.slice(t),!1}if(r===e)return this.text+=n.slice(t,this.prevI),!0}}},{key:"captureNameChars",value:function(){for(var e=this.chunk,t=this.i;;){var n=this.getCode();if(-1===n)return this.name+=e.slice(t),-1;if(!p(n))return this.name+=e.slice(t,this.prevI),-2===n?10:n}}},{key:"skipSpaces",value:function(){for(;;){var e=this.getCodeNorm();if(-1===e||!h(e))return e}}},{key:"setXMLVersion",value:function(e){"1.0"===(this.currentXMLVersion=e)?(this.isChar=f,this.getCode=this.getCode10):(this.isChar=A,this.getCode=this.getCode11)}},{key:"sBegin",value:function(){65279===this.chunk.charCodeAt(0)&&(this.i++,this.column++),this.state=1}},{key:"sBeginWhitespace",value:function(){var e=this.i,t=this.skipSpaces();switch(this.prevI!==e&&(this.xmlDeclPossible=!1),t){case 60:if(this.state=15,0!==this.text.length)throw new Error("no-empty text at start");break;case-1:break;default:this.unget(),this.state=13,this.xmlDeclPossible=!1}}},{key:"sDoctype",value:function(){var e,t=this.captureTo(E);switch(t){case 62:null!=(e=this.doctypeHandler)&&e.call(this,this.text),this.text="",this.state=13,this.doctype=!0;break;case-1:break;default:this.text+=String.fromCodePoint(t),91===t?this.state=4:u(t)&&(this.state=3,this.q=t)}}},{key:"sDoctypeQuote",value:function(){var e=this.q;this.captureToChar(e)&&(this.text+=String.fromCodePoint(e),this.q=null,this.state=2)}},{key:"sDTD",value:function(){var e=this.captureTo(S);-1!==e&&(this.text+=String.fromCodePoint(e),93===e?this.state=2:60===e?this.state=6:u(e)&&(this.state=5,this.q=e))}},{key:"sDTDQuoted",value:function(){var e=this.q;this.captureToChar(e)&&(this.text+=String.fromCodePoint(e),this.state=4,this.q=null)}},{key:"sDTDOpenWaka",value:function(){var e=this.getCodeNorm();switch(this.text+=String.fromCodePoint(e),e){case 33:this.state=7,this.openWakaBang="";break;case 63:this.state=11;break;default:this.state=4}}},{key:"sDTDOpenWakaBang",value:function(){var e=String.fromCodePoint(this.getCodeNorm()),t=this.openWakaBang+=e;this.text+=e,"-"!==t&&(this.state="--"===t?8:4,this.openWakaBang="")}},{key:"sDTDComment",value:function(){this.captureToChar(45)&&(this.text+="-",this.state=9)}},{key:"sDTDCommentEnding",value:function(){var e=this.getCodeNorm();this.text+=String.fromCodePoint(e),this.state=45===e?10:8}},{key:"sDTDCommentEnded",value:function(){var e=this.getCodeNorm();this.text+=String.fromCodePoint(e),62===e?this.state=4:(this.fail("malformed comment."),this.state=8)}},{key:"sDTDPI",value:function(){this.captureToChar(63)&&(this.text+="?",this.state=12)}},{key:"sDTDPIEnding",value:function(){var e=this.getCodeNorm();this.text+=String.fromCodePoint(e),62===e&&(this.state=4)}},{key:"sText",value:function(){0!==this.tags.length?this.handleTextInRoot():this.handleTextOutsideRoot()}},{key:"sEntity",value:function(){var e=this.i,t=this.chunk;e:for(;;)switch(this.getCode()){case-2:this.entity+="".concat(t.slice(e,this.prevI),"\n"),e=this.i;break;case 59:var n=this.entityReturnState,r=this.entity+t.slice(e,this.prevI),i=void(this.state=n);""===r?(this.fail("empty entity name."),i="&;"):(i=this.parseEntity(r),this.entity=""),13===n&&void 0===this.textHandler||(this.text+=i);break e;case-1:this.entity+=t.slice(e);break e}}},{key:"sOpenWaka",value:function(){var e=this.getCode();if(d(e))this.state=34,this.unget(),this.xmlDeclPossible=!1;else switch(e){case 47:this.state=43,this.xmlDeclPossible=!1;break;case 33:this.state=16,this.openWakaBang="",this.xmlDeclPossible=!1;break;case 63:this.state=23;break;default:this.fail("disallowed character in tag name"),this.state=13,this.xmlDeclPossible=!1}}},{key:"sOpenWakaBang",value:function(){switch(this.openWakaBang+=String.fromCodePoint(this.getCodeNorm()),this.openWakaBang){case"[CDATA[":this.sawRoot||this.reportedTextBeforeRoot||(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0),this.state=20,this.openWakaBang="";break;case"--":this.state=17,this.openWakaBang="";break;case"DOCTYPE":this.state=2,(this.doctype||this.sawRoot)&&this.fail("inappropriately located doctype declaration."),this.openWakaBang="";break;default:7<=this.openWakaBang.length&&this.fail("incorrect syntax.")}}},{key:"sComment",value:function(){this.captureToChar(45)&&(this.state=18)}},{key:"sCommentEnding",value:function(){var e,t=this.getCodeNorm();45===t?(this.state=19,null!=(e=this.commentHandler)&&e.call(this,this.text),this.text=""):(this.text+="-".concat(String.fromCodePoint(t)),this.state=17)}},{key:"sCommentEnded",value:function(){var e=this.getCodeNorm();62!==e?(this.fail("malformed comment."),this.text+="--".concat(String.fromCodePoint(e)),this.state=17):this.state=13}},{key:"sCData",value:function(){this.captureToChar(93)&&(this.state=21)}},{key:"sCDataEnding",value:function(){var e=this.getCodeNorm();93===e?this.state=22:(this.text+="]".concat(String.fromCodePoint(e)),this.state=20)}},{key:"sCDataEnding2",value:function(){var e,t=this.getCodeNorm();switch(t){case 62:null!=(e=this.cdataHandler)&&e.call(this,this.text),this.text="",this.state=13;break;case 93:this.text+="]";break;default:this.text+="]]".concat(String.fromCodePoint(t)),this.state=20}}},{key:"sPIFirstChar",value:function(){var e=this.getCodeNorm();this.nameStartCheck(e)?(this.piTarget+=String.fromCodePoint(e),this.state=24):63===e||h(e)?(this.fail("processing instruction without a target."),this.state=63===e?26:25):(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(e),this.state=24)}},{key:"sPIRest",value:function(){for(var e=this.chunk,t=this.i;;){var n=this.getCodeNorm();if(-1===n)return void(this.piTarget+=e.slice(t));if(!this.nameCheck(n)){this.piTarget+=e.slice(t,this.prevI);var r=63===n;r||h(n)?"xml"===this.piTarget?(this.xmlDeclPossible||this.fail("an XML declaration must be at the start of the document."),this.state=r?33:27):this.state=r?26:25:(this.fail("disallowed character in processing instruction name."),this.piTarget+=String.fromCodePoint(n));break}}}},{key:"sPIBody",value:function(){var e;0===this.text.length?63===(e=this.getCodeNorm())?this.state=26:h(e)||(this.text=String.fromCodePoint(e)):this.captureToChar(63)&&(this.state=26)}},{key:"sPIEnding",value:function(){var e,t,n=this.getCodeNorm();62===n?("xml"===(t=this.piTarget).toLowerCase()&&this.fail("the XML declaration must appear at the start of the document."),null!=(e=this.piHandler)&&e.call(this,{target:t,body:this.text}),this.piTarget=this.text="",this.state=13):63===n?this.text+="?":(this.text+="?".concat(String.fromCodePoint(n)),this.state=25),this.xmlDeclPossible=!1}},{key:"sXMLDeclNameStart",value:function(){var e=this.skipSpaces();63!==e?-1!==e&&(this.state=28,this.name=String.fromCodePoint(e)):this.state=33}},{key:"sXMLDeclName",value:function(){var e=this.captureTo(_);if(63===e)this.state=33,this.name+=this.text,this.text="",this.fail("XML declaration is incomplete.");else if(h(e)||61===e){if(this.name+=this.text,this.text="",!this.xmlDeclExpects.includes(this.name))switch(this.name.length){case 0:this.fail("did not expect any more name/value pairs.");break;case 1:this.fail("expected the name ".concat(this.xmlDeclExpects[0],"."));break;default:this.fail("expected one of ".concat(this.xmlDeclExpects.join(", ")))}this.state=61===e?30:29}}},{key:"sXMLDeclEq",value:function(){var e=this.getCodeNorm();63===e?(this.state=33,this.fail("XML declaration is incomplete.")):h(e)||(61!==e&&this.fail("value required."),this.state=30)}},{key:"sXMLDeclValueStart",value:function(){var e=this.getCodeNorm();63===e?(this.state=33,this.fail("XML declaration is incomplete.")):h(e)||(u(e)?this.q=e:(this.fail("value must be quoted."),this.q=32),this.state=31)}},{key:"sXMLDeclValue",value:function(){var e=this.captureTo([this.q,63]);if(63===e)this.state=33,this.text="",this.fail("XML declaration is incomplete.");else if(-1!==e){var t=this.text;switch(this.text="",this.name){case"version":this.xmlDeclExpects=["encoding","standalone"];var n=t;this.xmlDecl.version=n,/^1\.[0-9]+$/.test(n)?this.opt.forceXMLVersion||this.setXMLVersion(n):this.fail("version number must match /^1\\.[0-9]+$/.");break;case"encoding":/^[A-Za-z][A-Za-z0-9._-]*$/.test(t)||this.fail("encoding value must match /^[A-Za-z0-9][A-Za-z0-9._-]*$/."),this.xmlDeclExpects=["standalone"],this.xmlDecl.encoding=t;break;case"standalone":"yes"!==t&&"no"!==t&&this.fail('standalone value must match "yes" or "no".'),this.xmlDeclExpects=[],this.xmlDecl.standalone=t}this.name="",this.state=32}}},{key:"sXMLDeclSeparator",value:function(){var e=this.getCodeNorm();63!==e?(h(e)||(this.fail("whitespace required."),this.unget()),this.state=27):this.state=33}},{key:"sXMLDeclEnding",value:function(){var e;62===this.getCodeNorm()?("xml"!==this.piTarget?this.fail("processing instructions are not allowed before root."):"version"!==this.name&&this.xmlDeclExpects.includes("version")&&this.fail("XML declaration must contain a version."),null!=(e=this.xmldeclHandler)&&e.call(this,this.xmlDecl),this.name="",this.piTarget=this.text="",this.state=13):this.fail("The character ? is disallowed anywhere in XML declarations."),this.xmlDeclPossible=!1}},{key:"sOpenTag",value:function(){var e,t=this.captureNameChars();if(-1!==t){var n=this.tag={name:this.name,attributes:Object.create(null)};switch(this.name="",this.xmlnsOpt&&(this.topNS=n.ns=Object.create(null)),null!=(e=this.openTagStartHandler)&&e.call(this,n),this.sawRoot=!0,!this.fragmentOpt&&this.closedRoot&&this.fail("documents may contain only one root."),t){case 62:this.openTag();break;case 47:this.state=35;break;default:h(t)||this.fail("disallowed character in tag name."),this.state=36}}}},{key:"sOpenTagSlash",value:function(){62===this.getCode()?this.openSelfClosingTag():(this.fail("forward-slash in opening tag not followed by >."),this.state=36)}},{key:"sAttrib",value:function(){var e=this.skipSpaces();-1!==e&&(d(e)?(this.unget(),this.state=37):62===e?this.openTag():47===e?this.state=35:this.fail("disallowed character in attribute name."))}},{key:"sAttribName",value:function(){var e=this.captureNameChars();61===e?this.state=39:h(e)?this.state=38:62===e?(this.fail("attribute without value."),this.pushAttrib(this.name,this.name),this.name=this.text="",this.openTag()):-1!==e&&this.fail("disallowed character in attribute name.")}},{key:"sAttribNameSawWhite",value:function(){var e=this.skipSpaces();switch(e){case-1:return;case 61:this.state=39;break;default:this.fail("attribute without value."),this.text="",this.name="",62===e?this.openTag():d(e)?(this.unget(),this.state=37):(this.fail("disallowed character in attribute name."),this.state=36)}}},{key:"sAttribValue",value:function(){var e=this.getCodeNorm();u(e)?(this.q=e,this.state=40):h(e)||(this.fail("unquoted attribute value."),this.state=42,this.unget())}},{key:"sAttribValueQuoted",value:function(){for(var e=this.q,t=this.chunk,n=this.i;;)switch(this.getCode()){case e:return this.pushAttrib(this.name,this.text+t.slice(n,this.prevI)),this.name=this.text="",this.q=null,void(this.state=41);case 38:return this.text+=t.slice(n,this.prevI),this.state=14,void(this.entityReturnState=40);case 10:case-2:case 9:this.text+="".concat(t.slice(n,this.prevI)," "),n=this.i;break;case 60:return this.text+=t.slice(n,this.prevI),void this.fail("disallowed character.");case-1:return void(this.text+=t.slice(n))}}},{key:"sAttribValueClosed",value:function(){var e=this.getCodeNorm();h(e)?this.state=36:62===e?this.openTag():47===e?this.state=35:d(e)?(this.fail("no whitespace between attributes."),this.unget(),this.state=37):this.fail("disallowed character in attribute name.")}},{key:"sAttribValueUnquoted",value:function(){var e=this.captureTo(O);switch(e){case 38:this.state=14,this.entityReturnState=42;break;case 60:this.fail("disallowed character.");break;case-1:break;default:this.text.includes("]]>")&&this.fail('the string "]]>" is disallowed in char data.'),this.pushAttrib(this.name,this.text),this.name=this.text="",62===e?this.openTag():this.state=36}}},{key:"sCloseTag",value:function(){var e=this.captureNameChars();62===e?this.closeTag():h(e)?this.state=44:-1!==e&&this.fail("disallowed character in closing tag.")}},{key:"sCloseTagSawWhite",value:function(){switch(this.skipSpaces()){case 62:this.closeTag();break;case-1:break;default:this.fail("disallowed character in closing tag.")}}},{key:"handleTextInRoot",value:function(){var e,t,n=this.i,r=this.forbiddenState,i=this.chunk,o=this.textHandler;e:for(;;)switch(this.getCode()){case 60:this.state=15,void 0!==o&&(e=this.text,t=i.slice(n,this.prevI),0!==e.length?(o(e+t),this.text=""):0!==t.length&&o(t)),r=0;break e;case 38:this.state=14,this.entityReturnState=13,void 0!==o&&(this.text+=i.slice(n,this.prevI)),r=0;break e;case 93:switch(r){case 0:r=1;break;case 1:r=2;break;case 2:break;default:throw new Error("impossible state")}break;case 62:2===r&&this.fail('the string "]]>" is disallowed in char data.'),r=0;break;case-2:void 0!==o&&(this.text+="".concat(i.slice(n,this.prevI),"\n")),n=this.i,r=0;break;case-1:void 0!==o&&(this.text+=i.slice(n));break e;default:r=0}this.forbiddenState=r}},{key:"handleTextOutsideRoot",value:function(){var e=this.i,t=this.chunk,n=this.textHandler,r=!1;e:for(;;){var i,o,a=this.getCode();switch(a){case 60:this.state=15,void 0!==n&&(i=this.text,o=t.slice(e,this.prevI),0!==i.length?(n(i+o),this.text=""):0!==o.length&&n(o));break e;case 38:this.state=14,this.entityReturnState=13,void 0!==n&&(this.text+=t.slice(e,this.prevI)),r=!0;break e;case-2:void 0!==n&&(this.text+="".concat(t.slice(e,this.prevI),"\n")),e=this.i;break;case-1:void 0!==n&&(this.text+=t.slice(e));break e;default:h(a)||(r=!0)}}r&&(this.sawRoot||this.reportedTextBeforeRoot||(this.fail("text data outside of root node."),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail("text data outside of root node."),this.reportedTextAfterRoot=!0))}},{key:"pushAttribNS",value:function(e,t){var n,r,i=(r=this.qname(e)).prefix,o={name:e,prefix:i,local:r=r.local,value:t};this.attribList.push(o),null!=(n=this.attributeHandler)&&n.call(this,o),"xmlns"===i?(n=t.trim(),"1.0"===this.currentXMLVersion&&""===n&&this.fail("invalid attempt to undefine prefix in XML 1.0"),this.topNS[r]=n,T(this,r,n)):"xmlns"===e&&(o=t.trim(),this.topNS[""]=o,T(this,"",o))}},{key:"pushAttribPlain",value:function(e,t){e={name:e,value:t},this.attribList.push(e),null!=(t=this.attributeHandler)&&t.call(this,e)}},{key:"end",value:function(){var e;this.sawRoot||this.fail("document must contain a root element.");for(var t=this.tags;0<t.length;){var n=t.pop();this.fail("unclosed tag: ".concat(n.name))}0!==this.state&&13!==this.state&&this.fail("unexpected end.");var r=this.text;return 0!==r.length&&(null!=(e=this.textHandler)&&e.call(this,r),this.text=""),this._closed=!0,null!=(e=this.endHandler)&&e.call(this),this._init(),this}},{key:"resolve",value:function(e){var t,n,r=this.topNS[e];if(void 0!==r)return r;for(var i=this.tags,o=i.length-1;0<=o;o--)if(void 0!==(r=i[o].ns[e]))return r;return void 0!==(r=this.ns[e])?r:null==(n=(t=this.opt).resolvePrefix)?void 0:n.call(t,e)}},{key:"qname",value:function(e){var t,n=e.indexOf(":");return-1===n?{prefix:"",local:e}:(t=e.slice(n+1),""!==(n=e.slice(0,n))&&""!==t&&!t.includes(":")||this.fail("malformed name: ".concat(e,".")),{prefix:n,local:t})}},{key:"processAttribsNS",value:function(){var e,t=this.attribList,n=this.tag,i=(o=this.qname(n.name)).prefix,o=o.local;n.prefix=i,n.local=o,o=n.uri=null!=(e=this.resolve(i))?e:"";if(""!==i&&("xmlns"===i&&this.fail('tags may not have "xmlns" as prefix.'),""===o&&(this.fail("unbound namespace prefix: ".concat(JSON.stringify(i),".")),n.uri=i)),0!==t.length){var a,s=n.attributes,u=new Set,c=r(t);try{for(c.s();!(a=c.n()).done;){var l=a.value,h=l.name,f=l.prefix,d=l.local,p=void 0,m=""===f?(p="xmlns"===h?x:"",h):(void 0===(p=this.resolve(f))&&(this.fail("unbound namespace prefix: ".concat(JSON.stringify(f),".")),p=f),"{".concat(p,"}").concat(d));u.has(m)&&this.fail("duplicate attribute: ".concat(m,".")),u.add(m),l.uri=p,s[h]=l}}catch(e){c.e(e)}finally{c.f()}this.attribList=[]}}},{key:"processAttribsPlain",value:function(){var e,t=this.attribList,n=this.tag.attributes,i=r(t);try{for(i.s();!(e=i.n()).done;){var o=e.value,a=o.name,s=o.value;void 0!==n[a]&&this.fail("duplicate attribute: ".concat(a,".")),n[a]=s}}catch(e){i.e(e)}finally{i.f()}this.attribList=[]}},{key:"openTag",value:function(){this.processAttribs();var e,t=this.tags,n=this.tag;n.isSelfClosing=!1,null!=(e=this.openTagHandler)&&e.call(this,n),t.push(n),this.state=13,this.name=""}},{key:"openSelfClosingTag",value:function(){this.processAttribs();var e,t=this.tags,n=this.tag;n.isSelfClosing=!0,null!=(e=this.openTagHandler)&&e.call(this,n),null!=(e=this.closeTagHandler)&&e.call(this,n),null===(this.tag=null!=(e=t[t.length-1])?e:null)&&(this.closedRoot=!0),this.state=13,this.name=""}},{key:"closeTag",value:function(){var e=this.tags,t=this.name;if(this.state=13,(this.name="")===t)this.fail("weird empty close tag."),this.text+="</>";else{for(var n=this.closeTagHandler,r=e.length;0<r--;){var i=this.tag=e.pop();if(this.topNS=i.ns,null!=n&&n(i),i.name===t)break;this.fail("unexpected close tag.")}0===r?this.closedRoot=!0:r<0&&(this.fail("unmatched closing tag: ".concat(t,".")),this.text+="</".concat(t,">"))}}},{key:"parseEntity",value:function(e){var t;return"#"!==e[0]?void 0!==(t=this.ENTITIES[e])?t:(this.fail(this.isName(e)?"undefined entity.":"disallowed character in entity name."),"&".concat(e,";")):(t=NaN,"x"===e[1]&&/^#x[0-9a-f]+$/i.test(e)?t=parseInt(e.slice(2),16):/^#[0-9]+$/.test(e)&&(t=parseInt(e.slice(1),10)),this.isChar(t)?String.fromCodePoint(t):(this.fail("malformed character entity."),"&".concat(e,";")))}},{key:"closed",get:function(){return this._closed}},{key:"position",get:function(){return this.chunkPosition+this.i}},{key:"columnIndex",get:function(){return this.position-this.positionAtNewLine}}]),l=M;function M(e){if(!(this instanceof M))throw new TypeError("Cannot call a class as a function");if(this.opt=null!=e?e:{},this.fragmentOpt=!!this.opt.fragment,e=this.xmlnsOpt=!!this.opt.xmlns,this.trackPosition=!1!==this.opt.position,this.fileName=this.opt.fileName,e){if(this.nameStartCheck=v,this.nameCheck=b,this.isName=D,this.processAttribs=this.processAttribsNS,this.pushAttrib=this.pushAttribNS,this.ns=Object.assign({__proto__:null},C),null!=(e=this.opt.additionalNamespaces)){for(var t=e,n=0,r=Object.keys(t);n<r.length;n++){var i=r[n];T(this,i,t[i])}Object.assign(this.ns,e)}}else this.nameStartCheck=d,this.nameCheck=p,this.isName=B,this.processAttribs=this.processAttribsPlain,this.pushAttrib=this.pushAttribPlain;this.stateTable=[this.sBegin,this.sBeginWhitespace,this.sDoctype,this.sDoctypeQuote,this.sDTD,this.sDTDQuoted,this.sDTDOpenWaka,this.sDTDOpenWakaBang,this.sDTDComment,this.sDTDCommentEnding,this.sDTDCommentEnded,this.sDTDPI,this.sDTDPIEnding,this.sText,this.sEntity,this.sOpenWaka,this.sOpenWakaBang,this.sComment,this.sCommentEnding,this.sCommentEnded,this.sCData,this.sCDataEnding,this.sCDataEnding2,this.sPIFirstChar,this.sPIRest,this.sPIBody,this.sPIEnding,this.sXMLDeclNameStart,this.sXMLDeclName,this.sXMLDeclEq,this.sXMLDeclValueStart,this.sXMLDeclValue,this.sXMLDeclSeparator,this.sXMLDeclEnding,this.sOpenTag,this.sOpenTagSlash,this.sAttrib,this.sAttribName,this.sAttribNameSawWhite,this.sAttribValue,this.sAttribValueQuoted,this.sAttribValueClosed,this.sAttribValueUnquoted,this.sCloseTag,this.sCloseTagSawWhite],this._init()}n.SaxesParser=l},{"xmlchars/xml/1.0/ed5":541,"xmlchars/xml/1.1/ed2":542,"xmlchars/xmlns/1.0/ed3":543}],497:[function(e,t,n){(function(e){"use strict";t.exports="function"==typeof e?e:function(){var e=[].slice.apply(arguments);e.splice(1,0,0),setTimeout.apply(null,e)}}).call(this,e("timers").setImmediate)},{timers:521}],498:[function(e,t,n){"use strict";var r=e("safe-buffer").Buffer;function i(e,t){this._block=r.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}i.prototype.update=function(e,t){"string"==typeof e&&(e=r.from(e,t=t||"utf8"));for(var n=this._block,i=this._blockSize,o=e.length,a=this._len,s=0;s<o;){for(var u=a%i,c=Math.min(o-s,i-u),l=0;l<c;l++)n[u+l]=e[s+l];s+=c,(a+=c)%i==0&&this._update(n)}return this._len+=o,this},i.prototype.digest=function(e){var t=this._len%this._blockSize;(t=(this._block[t]=128,this._block.fill(0,1+t),t>=this._finalSize&&(this._update(this._block),this._block.fill(0)),8*this._len))<=4294967295||this._block.writeUInt32BE((t-(t=(4294967295&t)>>>0))/4294967296,this._blockSize-8),this._block.writeUInt32BE(t,this._blockSize-4),this._update(this._block),t=this._hash();return e?t.toString(e):t},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=i},{"safe-buffer":494}],499:[function(e,t,n){"use strict";var r=t.exports=function(e){e=e.toLowerCase();var t=r[e];if(t)return new t;throw new Error(e+" is not supported (we accept pull requests)")};r.sha=e("./sha"),r.sha1=e("./sha1"),r.sha224=e("./sha224"),r.sha256=e("./sha256"),r.sha384=e("./sha384"),r.sha512=e("./sha512")},{"./sha":500,"./sha1":501,"./sha224":502,"./sha256":503,"./sha384":504,"./sha512":505}],500:[function(e,t,n){"use strict";var r=e("inherits"),i=e("./hash"),o=e("safe-buffer").Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function u(){this.init(),this._w=s,i.call(this,64,56)}r(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(e){for(var t=this._w,n=0|this._a,r=0|this._b,i=0|this._c,o=0|this._d,s=0|this._e,u=0;u<16;++u)t[u]=e.readInt32BE(4*u);for(;u<80;++u)t[u]=t[u-3]^t[u-8]^t[u-14]^t[u-16];for(var c,l,h,f=0;f<80;++f){var d=~~(f/20),p=0|(n<<5|n>>>27)+(c=r,l=i,h=o,0===(p=d)?c&l|~c&h:2===p?c&l|c&h|l&h:c^l^h)+s+t[f]+a[d];s=o,o=i,i=r<<30|r>>>2,r=n,n=p}this._a=n+this._a|0,this._b=r+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=s+this._e|0},u.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},t.exports=u},{"./hash":498,inherits:387,"safe-buffer":494}],501:[function(e,t,n){"use strict";var r=e("inherits"),i=e("./hash"),o=e("safe-buffer").Buffer,a=[1518500249,1859775393,-1894007588,-899497514],s=new Array(80);function u(){this.init(),this._w=s,i.call(this,64,56)}r(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(e){for(var t,n=this._w,r=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,c=0;c<16;++c)n[c]=e.readInt32BE(4*c);for(;c<80;++c)n[c]=(t=n[c-3]^n[c-8]^n[c-14]^n[c-16])<<1|t>>>31;for(var l,h,f,d=0;d<80;++d){var p=~~(d/20),m=0|(r<<5|r>>>27)+(l=i,h=o,f=s,0===(m=p)?l&h|~l&f:2===m?l&h|l&f|h&f:l^h^f)+u+n[d]+a[p];u=s,s=o,o=i<<30|i>>>2,i=r,r=m}this._a=r+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},t.exports=u},{"./hash":498,inherits:387,"safe-buffer":494}],502:[function(e,t,n){"use strict";var r=e("inherits"),i=e("./sha256"),o=e("./hash"),a=e("safe-buffer").Buffer,s=new Array(64);function u(){this.init(),this._w=s,o.call(this,64,56)}r(u,i),u.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},u.prototype._hash=function(){var e=a.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},t.exports=u},{"./hash":498,"./sha256":503,inherits:387,"safe-buffer":494}],503:[function(e,t,n){"use strict";var r=e("inherits"),i=e("./hash"),o=e("safe-buffer").Buffer,a=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],s=new Array(64);function u(){this.init(),this._w=s,i.call(this,64,56)}r(u,i),u.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},u.prototype._update=function(e){for(var t,n=this._w,r=0|this._a,i=0|this._b,o=0|this._c,s=0|this._d,u=0|this._e,c=0|this._f,l=0|this._g,h=0|this._h,f=0;f<16;++f)n[f]=e.readInt32BE(4*f);for(;f<64;++f)n[f]=0|(((t=n[f-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+n[f-7]+(((t=n[f-15])>>>7|t<<25)^(t>>>18|t<<14)^t>>>3)+n[f-16];for(var d=0;d<64;++d){var p=h+((u>>>6|u<<26)^(u>>>11|u<<21)^(u>>>25|u<<7))+(l^u&(c^l))+a[d]+n[d]|0,m=0|((r>>>2|r<<30)^(r>>>13|r<<19)^(r>>>22|r<<10))+(r&i|o&(r|i));h=l,l=c,c=u,u=s+p|0,s=o,o=i,i=r,r=p+m|0}this._a=r+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=u+this._e|0,this._f=c+this._f|0,this._g=l+this._g|0,this._h=h+this._h|0},u.prototype._hash=function(){var e=o.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},t.exports=u},{"./hash":498,inherits:387,"safe-buffer":494}],504:[function(e,t,n){"use strict";var r=e("inherits"),i=e("./sha512"),o=e("./hash"),a=e("safe-buffer").Buffer,s=new Array(160);function u(){this.init(),this._w=s,o.call(this,128,112)}r(u,i),u.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},u.prototype._hash=function(){var e=a.allocUnsafe(48);function t(t,n,r){e.writeInt32BE(t,r),e.writeInt32BE(n,r+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},t.exports=u},{"./hash":498,"./sha512":505,inherits:387,"safe-buffer":494}],505:[function(e,t,n){"use strict";var r=e("inherits"),i=e("./hash"),o=e("safe-buffer").Buffer,a=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],s=new Array(160);function u(){this.init(),this._w=s,i.call(this,128,112)}function c(e,t,n){return n^e&(t^n)}function l(e,t,n){return e&t|n&(e|t)}function h(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function f(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function d(e,t){return e>>>0<t>>>0?1:0}r(u,i),u.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},u.prototype._update=function(e){for(var t=this._w,n=0|this._ah,r=0|this._bh,i=0|this._ch,o=0|this._dh,s=0|this._eh,u=0|this._fh,p=0|this._gh,m=0|this._hh,g=0|this._al,A=0|this._bl,v=0|this._cl,b=0|this._dl,y=0|this._el,w=0|this._fl,x=0|this._gl,C=0|this._hl,k=0;k<32;k+=2)t[k]=e.readInt32BE(4*k),t[k+1]=e.readInt32BE(4*k+4);for(;k<160;k+=2){var E=((T=t[k-30])>>>1|(O=t[k-30+1])<<31)^(T>>>8|O<<24)^T>>>7,S=(O>>>1|T<<31)^(O>>>8|T<<24)^(O>>>7|T<<25),_=((T=t[k-4])>>>19|(O=t[k-4+1])<<13)^(O>>>29|T<<3)^T>>>6,O=(O>>>19|T<<13)^(T>>>29|O<<3)^(O>>>6|T<<26),T=t[k-14],D=t[k-14+1],B=t[k-32],I=t[k-32+1],M=(M=(M=E+T+d(N=S+D|0,S)|0)+_+d(N=N+O|0,O)|0)+B+d(N=N+I|0,I)|0;t[k]=M,t[k+1]=N}for(var j=0;j<160;j+=2){M=t[j];var N=t[j+1],F=l(n,r,i),R=l(g,A,v),P=h(n,g),L=h(g,n),U=f(s,y),z=f(y,s),H=a[j+1],$=c(s,u,p),Q=c(y,w,x);U=(((m+U+d(z=C+z|0,C)|0)+$+d(z=z+Q|0,Q)|0)+a[j]+d(z=z+H|0,H)|0)+M+d(z=z+N|0,N)|0,Q=P+F+d($=L+R|0,L)|0,m=p,C=x,p=u,x=w,u=s,w=y,s=o+U+d(y=b+z|0,b)|0,o=i,b=v,i=r,v=A,r=n,A=g,n=U+Q+d(g=z+$|0,z)|0}this._al=this._al+g|0,this._bl=this._bl+A|0,this._cl=this._cl+v|0,this._dl=this._dl+b|0,this._el=this._el+y|0,this._fl=this._fl+w|0,this._gl=this._gl+x|0,this._hl=this._hl+C|0,this._ah=this._ah+n+d(this._al,g)|0,this._bh=this._bh+r+d(this._bl,A)|0,this._ch=this._ch+i+d(this._cl,v)|0,this._dh=this._dh+o+d(this._dl,b)|0,this._eh=this._eh+s+d(this._el,y)|0,this._fh=this._fh+u+d(this._fl,w)|0,this._gh=this._gh+p+d(this._gl,x)|0,this._hh=this._hh+m+d(this._hl,C)|0},u.prototype._hash=function(){var e=o.allocUnsafe(64);function t(t,n,r){e.writeInt32BE(t,r),e.writeInt32BE(n,r+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},t.exports=u},{"./hash":498,inherits:387,"safe-buffer":494}],506:[function(e,t,n){"use strict";t.exports=i;var r=e("events").EventEmitter;function i(){r.call(this)}e("inherits")(i,r),i.Readable=e("readable-stream/readable.js"),i.Writable=e("readable-stream/writable.js"),i.Duplex=e("readable-stream/duplex.js"),i.Transform=e("readable-stream/transform.js"),i.PassThrough=e("readable-stream/passthrough.js"),(i.Stream=i).prototype.pipe=function(e,t){var n=this;function i(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function o(){n.readable&&n.resume&&n.resume()}n.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(n.on("end",s),n.on("close",u));var a=!1;function s(){a||(a=!0,e.end())}function u(){a||(a=!0,"function"==typeof e.destroy&&e.destroy())}function c(e){if(l(),0===r.listenerCount(this,"error"))throw e}function l(){n.removeListener("data",i),e.removeListener("drain",o),n.removeListener("end",s),n.removeListener("close",u),n.removeListener("error",c),e.removeListener("error",c),n.removeListener("end",l),n.removeListener("close",l),e.removeListener("close",l)}return n.on("error",c),e.on("error",c),n.on("end",l),n.on("close",l),e.on("close",l),e.emit("pipe",n),e}},{events:367,inherits:387,"readable-stream/duplex.js":507,"readable-stream/passthrough.js":516,"readable-stream/readable.js":517,"readable-stream/transform.js":518,"readable-stream/writable.js":519}],507:[function(e,t,n){"use strict";t.exports=e("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":508}],508:[function(e,t,n){"use strict";var r=e("process-nextick-args"),i=Object.keys||function(e){var t,n=[];for(t in e)n.push(t);return n},o=((t=(t.exports=l,Object.create(e("core-util-is")))).inherits=e("inherits"),e("./_stream_readable")),a=e("./_stream_writable");t.inherits(l,o);for(var s=i(a.prototype),u=0;u<s.length;u++){var c=s[u];l.prototype[c]||(l.prototype[c]=a.prototype[c])}function l(e){if(!(this instanceof l))return new l(e);o.call(this,e),a.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",h)}function h(){this.allowHalfOpen||this._writableState.ended||r.nextTick(f,this)}function f(e){e.end()}Object.defineProperty(l.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(l.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),l.prototype._destroy=function(e,t){this.push(null),this.end(),r.nextTick(t,e)}},{"./_stream_readable":510,"./_stream_writable":512,"core-util-is":328,inherits:387,"process-nextick-args":466}],509:[function(e,t,n){"use strict";t.exports=i;var r=e("./_stream_transform");function i(e){if(!(this instanceof i))return new i(e);r.call(this,e)}(t=Object.create(e("core-util-is"))).inherits=e("inherits"),t.inherits(i,r),i.prototype._transform=function(e,t,n){n(null,e)}},{"./_stream_transform":511,"core-util-is":328,inherits:387}],510:[function(e,n,r){(function(t,r){"use strict";var i=e("process-nextick-args");function o(e,t){return e.listeners(t).length}n.exports=A;var a,s,u=e("isarray"),c=(A.ReadableState=g,e("events").EventEmitter,e("./internal/streams/stream")),l=e("safe-buffer").Buffer,h=r.Uint8Array||function(){},f=((r=Object.create(e("core-util-is"))).inherits=e("inherits"),e("util")),d=void 0,p=(d=f&&f.debuglog?f.debuglog("stream"):function(){},e("./internal/streams/BufferList")),m=(f=e("./internal/streams/destroy"),r.inherits(A,c),["error","close","destroy","pause","resume"]);function g(t,n){t=t||{};n=n instanceof(a=a||e("./_stream_duplex"));var r=(this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode),t.highWaterMark),i=t.readableHighWaterMark,o=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:n&&(i||0===i)?i:o,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=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(s=s||e("string_decoder/").StringDecoder,this.decoder=new s(t.encoding),this.encoding=t.encoding)}function A(t){if(a=a||e("./_stream_duplex"),!(this instanceof A))return new A(t);this._readableState=new g(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),c.call(this)}function v(e,t,n,r,i){var o,a,s,u,c,f=e._readableState;return null===t?(f.reading=!1,s=e,(u=f).ended||(u.decoder&&(c=u.decoder.end())&&c.length&&(u.buffer.push(c),u.length+=u.objectMode?1:c.length),u.ended=!0,w(s))):(i||(c=f,s=u=t,o=a=l.isBuffer(s)||s instanceof h||"string"==typeof u||void 0===u||c.objectMode?a:new TypeError("Invalid non-string/buffer chunk")),o?e.emit("error",o):f.objectMode||t&&0<t.length?("string"==typeof t||f.objectMode||Object.getPrototypeOf(t)===l.prototype||(i=t,t=l.from(i)),r?f.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):b(e,f,t,!0):f.ended?e.emit("error",new Error("stream.push() after EOF")):(f.reading=!1,!f.decoder||n||(t=f.decoder.write(t),f.objectMode||0!==t.length)?b(e,f,t,!1):C(e,f))):r||(f.reading=!1)),!f.ended&&(f.needReadable||f.length<f.highWaterMark||0===f.length)}function b(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&w(e)),C(e,t)}function y(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?(t.flowing&&t.length?t.buffer.head.data:t).length:(e>t.highWaterMark&&(t.highWaterMark=(8388608<=(n=e)?n=8388608:(n--,n=(n=(n=(n=(n|=n>>>1)|n>>>2)|n>>>4)|n>>>8)|n>>>16,n++),n)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0));var n}function w(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(d("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(x,e):x(e))}function x(e){d("emit readable"),e.emit("readable"),_(e)}function C(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(k,e,t))}function k(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(d("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function E(e){d("readable nexttick read 0"),e.read(0)}function S(e,t){t.reading||(d("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),_(e),t.flowing&&!t.reading&&e.read(0)}function _(e){var t=e._readableState;for(d("flow",t.flowing);t.flowing&&null!==e.read(););}function O(e,t){return 0===t.length?null:(t.objectMode?i=t.buffer.shift():!e||e>=t.length?(i=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):(e=e,n=t.buffer,t=t.decoder,e<n.head.data.length?(r=n.head.data.slice(0,e),n.head.data=n.head.data.slice(e)):r=e===n.head.data.length?n.shift():(t?function(e,t){var n=t.head,r=1,i=n.data;for(e-=i.length;n=n.next;){var o=n.data,a=e>o.length?o.length:e;if(a===o.length?i+=o:i+=o.slice(0,e),0==(e-=a)){a===o.length?(++r,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n).data=o.slice(a);break}++r}return t.length-=r,i}:function(e,t){var n=l.allocUnsafe(e),r=t.head,i=1;for(r.data.copy(n),e-=r.data.length;r=r.next;){var o=r.data,a=e>o.length?o.length:e;if(o.copy(n,n.length-e,0,a),0==(e-=a)){a===o.length?(++i,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r).data=o.slice(a);break}++i}return t.length-=i,n})(e,n),i=r),i);var n,r,i}function T(e){var t=e._readableState;if(0<t.length)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(D,t,e))}function D(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function B(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1}Object.defineProperty(A.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),A.prototype.destroy=f.destroy,A.prototype._undestroy=f.undestroy,A.prototype._destroy=function(e,t){this.push(null),t(e)},A.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=l.from(e,t),t=""),n=!0),v(this,e,t,!1,n)},A.prototype.unshift=function(e){return v(this,e,null,!0,!1)},A.prototype.isPaused=function(){return!1===this._readableState.flowing},A.prototype.setEncoding=function(t){return s=s||e("string_decoder/").StringDecoder,this._readableState.decoder=new s(t),this._readableState.encoding=t,this},A.prototype.read=function(e){d("read",e),e=parseInt(e,10);var t,n=this._readableState,r=e;return 0!==e&&(n.emittedReadable=!1),0===e&&n.needReadable&&(n.length>=n.highWaterMark||n.ended)?(d("read: emitReadable",n.length,n.ended),(0===n.length&&n.ended?T:w)(this),null):0===(e=y(e,n))&&n.ended?(0===n.length&&T(this),null):(t=n.needReadable,d("need readable",t),(0===n.length||n.length-e<n.highWaterMark)&&d("length less than watermark",t=!0),n.ended||n.reading?d("reading or ended",t=!1):t&&(d("do read"),n.reading=!0,n.sync=!0,0===n.length&&(n.needReadable=!0),this._read(n.highWaterMark),n.sync=!1,n.reading||(e=y(r,n))),null===(t=0<e?O(e,n):null)?(n.needReadable=!0,e=0):n.length-=e,0===n.length&&(n.ended||(n.needReadable=!0),r!==e&&n.ended&&T(this)),null!==t&&this.emit("data",t),t)},A.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},A.prototype.pipe=function(e,n){var r=this,a=this._readableState;switch(a.pipesCount){case 0:a.pipes=e;break;case 1:a.pipes=[a.pipes,e];break;default:a.pipes.push(e)}function s(){d("onend"),e.end()}a.pipesCount+=1,d("pipe count=%d opts=%j",a.pipesCount,n),n=n&&!1===n.end||e===t.stdout||e===t.stderr?y:s,a.endEmitted?i.nextTick(n):r.once("end",n),e.on("unpipe",(function t(n,i){d("onunpipe"),n===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,d("cleanup"),e.removeListener("close",v),e.removeListener("finish",b),e.removeListener("drain",f),e.removeListener("error",A),e.removeListener("unpipe",t),r.removeListener("end",s),r.removeListener("end",y),r.removeListener("data",g),p=!0,!a.awaitDrain||e._writableState&&!e._writableState.needDrain||f())})),c=r;var c,l,h,f=function(){var e=c._readableState;d("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&o(c,"data")&&(e.flowing=!0,_(c))},p=(e.on("drain",f),!1),m=!1;function g(t){d("ondata"),(m=!1)!==e.write(t)||m||((1===a.pipesCount&&a.pipes===e||1<a.pipesCount&&-1!==B(a.pipes,e))&&!p&&(d("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,m=!0),r.pause())}function A(t){d("onerror",t),y(),e.removeListener("error",A),0===o(e,"error")&&e.emit("error",t)}function v(){e.removeListener("finish",b),y()}function b(){d("onfinish"),e.removeListener("close",v),y()}function y(){d("unpipe"),r.unpipe(e)}return r.on("data",g),n="error",h=A,"function"==typeof(l=e).prependListener?l.prependListener(n,h):l._events&&l._events[n]?u(l._events[n])?l._events[n].unshift(h):l._events[n]=[h,l._events[n]]:l.on(n,h),e.once("close",v),e.once("finish",b),e.emit("pipe",r),a.flowing||(d("pipe resume"),r.resume()),e},A.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0!==t.pipesCount)if(1===t.pipesCount)e&&e!==t.pipes||(e=e||t.pipes,t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n));else if(e){var r=B(t.pipes,e);-1!==r&&(t.pipes.splice(r,1),--t.pipesCount,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n))}else{var i=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a<o;a++)i[a].emit("unpipe",this,n)}return this},A.prototype.addListener=A.prototype.on=function(e,t){return t=c.prototype.on.call(this,e,t),"data"===e?!1!==this._readableState.flowing&&this.resume():"readable"!==e||(e=this._readableState).endEmitted||e.readableListening||(e.readableListening=e.needReadable=!0,e.emittedReadable=!1,e.reading?e.length&&w(this):i.nextTick(E,this)),t},A.prototype.resume=function(){var e=this._readableState;return e.flowing||(d("resume"),e.flowing=!0,this,(e=e).resumeScheduled||(e.resumeScheduled=!0,i.nextTick(S,this,e))),this},A.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this},A.prototype.wrap=function(e){var t,n=this,r=this._readableState,i=!1;for(t in e.on("end",(function(){var e;d("wrapped end"),r.decoder&&!r.ended&&(e=r.decoder.end())&&e.length&&n.push(e),n.push(null)})),e.on("data",(function(t){d("wrapped data"),r.decoder&&(t=r.decoder.write(t)),r.objectMode&&null==t||(r.objectMode||t&&t.length)&&!n.push(t)&&(i=!0,e.pause())})),e)void 0===this[t]&&"function"==typeof e[t]&&(this[t]=function(t){return function(){return e[t].apply(e,arguments)}}(t));for(var o=0;o<m.length;o++)e.on(m[o],this.emit.bind(this,m[o]));return this._read=function(t){d("wrapped _read",t),i&&(i=!1,e.resume())},this},Object.defineProperty(A.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),A._fromList=O}).call(this,e("_process"),void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./_stream_duplex":508,"./internal/streams/BufferList":513,"./internal/streams/destroy":514,"./internal/streams/stream":515,_process:467,"core-util-is":328,events:367,inherits:387,isarray:389,"process-nextick-args":466,"safe-buffer":494,"string_decoder/":520,util:185}],511:[function(e,t,n){"use strict";t.exports=i;var r=e("./_stream_duplex");function i(e){if(!(this instanceof i))return new i(e);r.call(this,e),this._transformState={afterTransform:function(e,t){var n=this._transformState,r=(n.transforming=!1,n.writecb);if(!r)return this.emit("error",new Error("write callback called multiple times"));n.writechunk=null,(n.writecb=null)!=t&&this.push(t),r(e),(n=this._readableState).reading=!1,(n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark)}.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",o)}function o(){var e=this;"function"==typeof this._flush?this._flush((function(t,n){a(e,t,n)})):a(this,null,null)}function a(e,t,n){if(t)return e.emit("error",t);if(null!=n&&e.push(n),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");e.push(null)}(t=Object.create(e("core-util-is"))).inherits=e("inherits"),t.inherits(i,r),i.prototype.push=function(e,t){return this._transformState.needTransform=!1,r.prototype.push.call(this,e,t)},i.prototype._transform=function(e,t,n){throw new Error("_transform() is not implemented")},i.prototype._write=function(e,t,n){var r=this._transformState;r.writecb=n,r.writechunk=e,r.writeencoding=t,r.transforming||(n=this._readableState,(r.needTransform||n.needReadable||n.length<n.highWaterMark)&&this._read(n.highWaterMark))},i.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},i.prototype._destroy=function(e,t){var n=this;r.prototype._destroy.call(this,e,(function(e){t(e),n.emit("close")}))}},{"./_stream_duplex":508,"core-util-is":328,inherits:387}],512:[function(e,n,r){(function(t,r,i){"use strict";var o=e("process-nextick-args");function a(e){var t=this;this.next=null,this.entry=null,this.finish=function(){var n=t,r=e,i=n.entry;for(n.entry=null;i;){var o=i.callback;r.pendingcb--,o(void 0),i=i.next}r.corkedRequestsFree?r.corkedRequestsFree.next=n:r.corkedRequestsFree=n}}n.exports=m;var s,u,c=!t.browser&&-1<["v0.10","v0.9."].indexOf(t.version.slice(0,5))?i:o.nextTick,l=(i=((t=(m.WritableState=p,Object.create(e("core-util-is")))).inherits=e("inherits"),{deprecate:e("util-deprecate")}),e("./internal/streams/stream")),h=e("safe-buffer").Buffer,f=r.Uint8Array||function(){};r=e("./internal/streams/destroy");function d(){}function p(t,n){s=s||e("./_stream_duplex"),t=t||{};var r=n instanceof s,i=(this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),t.highWaterMark),u=t.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:r&&(u||0===u)?u:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,i=(this.destroyed=!1)===t.decodeStrings;this.decodeStrings=!i,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){var t,r,i,a,s,u,l,h;e=e,l=(u=(t=n)._writableState).sync,h=u.writecb,(s=u).writing=!1,s.writecb=null,s.length-=s.writelen,s.writelen=0,e?(s=t,i=l,e=e,a=h,--(r=u).pendingcb,i?(o.nextTick(a,e),o.nextTick(w,s,r),s._writableState.errorEmitted=!0,s.emit("error",e)):(a(e),s._writableState.errorEmitted=!0,s.emit("error",e),w(s,r))):((i=b(u))||u.corked||u.bufferProcessing||!u.bufferedRequest||v(t,u),l?c(A,t,u,i,h):A(t,u,i,h))},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 a(this)}function m(t){if(s=s||e("./_stream_duplex"),!(u.call(m,this)||this instanceof s))return new m(t);this._writableState=new p(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),l.call(this)}function g(e,t,n,r,i,o,a){t.writelen=r,t.writecb=a,t.writing=!0,t.sync=!0,n?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function A(e,t,n,r){var i;n||(n=e,0===(i=t).length&&i.needDrain&&(i.needDrain=!1,n.emit("drain"))),t.pendingcb--,r(),w(e,t)}function v(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,i=new Array(r);(r=t.corkedRequestsFree).entry=n;for(var o=0,s=!0;n;)(i[o]=n).isBuf||(s=!1),n=n.next,o+=1;i.allBuffers=s,g(e,t,!0,t.length,i,"",r.finish),t.pendingcb++,t.lastBufferedRequest=null,r.next?(t.corkedRequestsFree=r.next,r.next=null):t.corkedRequestsFree=new a(t),t.bufferedRequestCount=0}else{for(;n;){var u=n.chunk,c=n.encoding,l=n.callback;if(g(e,t,!1,t.objectMode?1:u.length,u,c,l),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function b(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function y(e,t){e._final((function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),w(e,t)}))}function w(e,t){var n,r,i=b(t);return i&&(n=e,(r=t).prefinished||r.finalCalled||("function"==typeof n._final?(r.pendingcb++,r.finalCalled=!0,o.nextTick(y,n,r)):(r.prefinished=!0,n.emit("prefinish"))),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),i}t.inherits(m,l),p.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t};try{Object.defineProperty(p.prototype,"buffer",{get:i.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(u=Function.prototype[Symbol.hasInstance],Object.defineProperty(m,Symbol.hasInstance,{value:function(e){return!!u.call(this,e)||this===m&&e&&e._writableState instanceof p}})):u=function(e){return e instanceof this},m.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},m.prototype.write=function(e,t,n){var r,i,a,s,u,c,l,p,m,A=this._writableState,v=!1,b=!A.objectMode&&(b=e,h.isBuffer(b)||b instanceof f);return b&&!h.isBuffer(e)&&(m=e,e=h.from(m)),"function"==typeof t&&(n=t,t=null),t=b?"buffer":t||A.defaultEncoding,"function"!=typeof n&&(n=d),A.ended?(m=this,l=n,p=new Error("write after end"),m.emit("error",p),o.nextTick(l,p)):(b||(l=this,p=A,s=n,c=!(u=!0),null===(a=e)?c=new TypeError("May not write null values to stream"):"string"==typeof a||void 0===a||p.objectMode||(c=new TypeError("Invalid non-string/buffer chunk")),c&&(l.emit("error",c),o.nextTick(s,c),u=!1),u))&&(A.pendingcb++,a=this,s=A,c=e,u=t,A=n,(e=b)||(i=c,r=u,c!==(i=s.objectMode||!1===s.decodeStrings||"string"!=typeof i?i:h.from(i,r))&&(e=!0,u="buffer",c=i)),r=s.objectMode?1:c.length,s.length+=r,(i=s.length<s.highWaterMark)||(s.needDrain=!0),s.writing||s.corked?(t=s.lastBufferedRequest,s.lastBufferedRequest={chunk:c,encoding:u,isBuf:e,callback:A,next:null},t?t.next=s.lastBufferedRequest:s.bufferedRequest=s.lastBufferedRequest,s.bufferedRequestCount+=1):g(a,s,!1,r,c,u,A),v=i),v},m.prototype.cork=function(){this._writableState.corked++},m.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||v(this,e))},m.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),-1<["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase()))return this._writableState.defaultEncoding=e,this;throw new TypeError("Unknown encoding: "+e)},Object.defineProperty(m.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),m.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},m.prototype._writev=null,m.prototype.end=function(e,t,n){var r=this._writableState;"function"==typeof e?(n=e,t=e=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),r.corked&&(r.corked=1,this.uncork()),r.ending||r.finished||(e=this,t=n,(n=r).ending=!0,w(e,n),t&&(n.finished?o.nextTick(t):e.once("finish",t)),n.ended=!0,e.writable=!1)},Object.defineProperty(m.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),m.prototype.destroy=r.destroy,m.prototype._undestroy=r.undestroy,m.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,e("_process"),void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("timers").setImmediate)},{"./_stream_duplex":508,"./internal/streams/destroy":514,"./internal/streams/stream":515,_process:467,"core-util-is":328,inherits:387,"process-nextick-args":466,"safe-buffer":494,timers:521,"util-deprecate":522}],513:[function(e,t,n){"use strict";var r=e("safe-buffer").Buffer,i=e("util");function o(){if(!(this instanceof o))throw new TypeError("Cannot call a class as a function");this.head=null,this.tail=null,this.length=0}t.exports=(o.prototype.push=function(e){e={data:e,next:null},0<this.length?this.tail.next=e:this.head=e,this.tail=e,++this.length},o.prototype.unshift=function(e){e={data:e,next:this.head},0===this.length&&(this.tail=e),this.head=e,++this.length},o.prototype.shift=function(){var e;if(0!==this.length)return e=this.head.data,1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e},o.prototype.clear=function(){this.head=this.tail=null,this.length=0},o.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,n=""+t.data;t=t.next;)n+=e+t.data;return n},o.prototype.concat=function(e){if(0===this.length)return r.alloc(0);if(1===this.length)return this.head.data;for(var t,n=r.allocUnsafe(e>>>0),i=this.head,o=0;i;)t=o,i.data.copy(n,t),o+=i.data.length,i=i.next;return n},o),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e})},{"safe-buffer":494,util:185}],514:[function(e,t,n){"use strict";var r=e("process-nextick-args");function i(e,t){e.emit("error",t)}t.exports={destroy:function(e,t){var n=this,o=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return o||a?t?t(e):!e||this._writableState&&this._writableState.errorEmitted||r.nextTick(i,this,e):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?(r.nextTick(i,n,e),n._writableState&&(n._writableState.errorEmitted=!0)):t&&t(e)}))),this},undestroy:function(){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)}}},{"process-nextick-args":466}],515:[function(e,t,n){arguments[4][490][0].apply(n,arguments)},{dup:490,events:367}],516:[function(e,t,n){"use strict";t.exports=e("./readable").PassThrough},{"./readable":517}],517:[function(e,t,n){"use strict";(((n=t.exports=e("./lib/_stream_readable.js")).Stream=n).Readable=n).Writable=e("./lib/_stream_writable.js"),n.Duplex=e("./lib/_stream_duplex.js"),n.Transform=e("./lib/_stream_transform.js"),n.PassThrough=e("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":508,"./lib/_stream_passthrough.js":509,"./lib/_stream_readable.js":510,"./lib/_stream_transform.js":511,"./lib/_stream_writable.js":512}],518:[function(e,t,n){"use strict";t.exports=e("./readable").Transform},{"./readable":517}],519:[function(e,t,n){"use strict";t.exports=e("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":512}],520:[function(e,t,n){"use strict";var r=e("safe-buffer").Buffer,i=r.isEncoding||function(e){switch((e=""+e)&&e.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 o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){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 e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"==typeof t||r.isEncoding!==i&&i(e))return t||e;throw new Error("Unknown encoding: "+e)}(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=l,this.end=h,t=3;break;default:return this.write=f,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t,n=this.lastTotal-this.lastNeed,r=(t=this,128!=(192&(r=e)[0])?(t.lastNeed=0,"�"):1<t.lastNeed&&1<r.length?128!=(192&r[1])?(t.lastNeed=1,"�"):2<t.lastNeed&&2<r.length&&128!=(192&r[2])?(t.lastNeed=2,"�"):void 0:void 0);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,n,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,n,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2!=0)return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1);if(t=e.toString("utf16le",t)){var n=t.charCodeAt(t.length-1);if(55296<=n&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],t.slice(0,-1)}return t}function c(e){var t;e=e&&e.length?this.write(e):"";return this.lastNeed?(t=this.lastTotal-this.lastNeed,e+this.lastChar.toString("utf16le",0,t)):e}function l(e,t){var n=(e.length-t)%3;return 0==n?e.toString("base64",t):(this.lastNeed=3-n,this.lastTotal=3,1==n?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-n))}function h(e){return e=e&&e.length?this.write(e):"",this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function f(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}(n.StringDecoder=o).prototype.write=function(e){if(0===e.length)return"";var t,n;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";n=this.lastNeed,this.lastNeed=0}else n=0;return n<e.length?t?t+this.text(e,n):this.text(e,n):t||""},o.prototype.end=function(e){return e=e&&e.length?this.write(e):"",this.lastNeed?e+"�":e},o.prototype.text=function(e,t){n=this,o=t;var n,r,i,o=(i=(s=e).length-1)<o?0:0<=(r=a(s[i]))?(0<r&&(n.lastNeed=r-1),r):--i<o||-2===r?0:0<=(r=a(s[i]))?(0<r&&(n.lastNeed=r-2),r):!(--i<o||-2===r)&&0<=(r=a(s[i]))?(0<r&&(2===r?r=0:n.lastNeed=r-3),r):0;if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=o;var s=e.length-(o-this.lastNeed);return e.copy(this.lastChar,0,s),e.toString("utf8",t,s)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},{"safe-buffer":494}],521:[function(e,t,n){(function(t,r){"use strict";var i=e("process/browser.js").nextTick,o=Function.prototype.apply,a=Array.prototype.slice,s={},u=0;function c(e,t){this._id=e,this._clearFn=t}n.setTimeout=function(){return new c(o.call(setTimeout,window,arguments),clearTimeout)},n.setInterval=function(){return new c(o.call(setInterval,window,arguments),clearInterval)},n.clearTimeout=n.clearInterval=function(e){e.close()},c.prototype.unref=c.prototype.ref=function(){},c.prototype.close=function(){this._clearFn.call(window,this._id)},n.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},n.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},n._unrefActive=n.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;0<=t&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n.setImmediate="function"==typeof t?t:function(e){var t=u++,r=!(arguments.length<2)&&a.call(arguments,1);return s[t]=!0,i((function(){s[t]&&(r?e.apply(null,r):e.call(null),n.clearImmediate(t))})),t},n.clearImmediate="function"==typeof r?r:function(e){delete s[e]}}).call(this,e("timers").setImmediate,e("timers").clearImmediate)},{"process/browser.js":467,timers:521}],522:[function(e,n,r){(function(e){"use strict";function t(t){try{if(!e.localStorage)return}catch(t){return}return null!=(t=e.localStorage[t])&&"true"===String(t).toLowerCase()}n.exports=function(e,n){var r;return t("noDeprecation")?e:(r=!1,function(){if(!r){if(t("throwDeprecation"))throw new Error(n);t("traceDeprecation"),r=!0}return e.apply(this,arguments)})}}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],523:[function(e,t,n){"use strict";"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){function n(){}e.super_=t,n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},{}],524:[function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}t.exports=function(e){return e&&"object"===r(e)&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],525:[function(e,n,r){(function(t,n){"use strict";function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=/%[sdj%]/g;r.format=function(e){if(!v(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(u(arguments[n]));return t.join(" ")}n=1;for(var r=arguments,i=r.length,a=String(e).replace(o,(function(e){if("%%"===e)return"%";if(i<=n)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}})),s=r[n];n<i;s=r[++n])g(s)||!w(s)?a+=" "+s:a+=" "+u(s);return a},r.deprecate=function(e,i){var o;return b(n.process)?function(){return r.deprecate(e,i).apply(this,arguments)}:!0===t.noDeprecation?e:(o=!1,function(){if(!o){if(t.throwDeprecation)throw new Error(i);t.traceDeprecation,o=!0}return e.apply(this,arguments)})};var a,s={};function u(e,t){var n={seen:[],stylize:l};return 3<=arguments.length&&(n.depth=arguments[2]),4<=arguments.length&&(n.colors=arguments[3]),m(t)?n.showHidden=t:t&&r._extend(n,t),b(n.showHidden)&&(n.showHidden=!1),b(n.depth)&&(n.depth=2),b(n.colors)&&(n.colors=!1),b(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=c),h(n,e,n.depth)}function c(e,t){return(t=u.styles[t])?"["+u.colors[t][0]+"m"+e+"["+u.colors[t][1]+"m":e}function l(e,t){return e}function h(e,t,n){if(e.customInspect&&t&&k(t.inspect)&&t.inspect!==r.inspect&&(!t.constructor||t.constructor.prototype!==t))return v(i=t.inspect(n,e))?i:h(e,i,n);i=e;var i,o=b(s=t)?i.stylize("undefined","undefined"):v(s)?(o="'"+JSON.stringify(s).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'",i.stylize(o,"string")):A(s)?i.stylize(""+s,"number"):m(s)?i.stylize(""+s,"boolean"):g(s)?i.stylize("null","null"):void 0;if(o)return o;var a,s=Object.keys(t),u=(a={},s.forEach((function(e,t){a[e]=!0})),a);if(e.showHidden&&(s=Object.getOwnPropertyNames(t)),C(t)&&(0<=s.indexOf("message")||0<=s.indexOf("description")))return f(t);if(0===s.length){if(k(t))return w=t.name?": "+t.name:"",e.stylize("[Function"+w+"]","special");if(y(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(x(t))return e.stylize(Date.prototype.toString.call(t),"date");if(C(t))return f(t)}var c,l,w="",E=!1,_=["{","}"];return p(t)&&(E=!0,_=["[","]"]),k(t)&&(w=" [Function"+(t.name?": "+t.name:"")+"]"),y(t)&&(w=" "+RegExp.prototype.toString.call(t)),x(t)&&(w=" "+Date.prototype.toUTCString.call(t)),C(t)&&(w=" "+f(t)),0!==s.length||E&&0!=t.length?n<0?y(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),s=E?function(e,t,n,r,i){for(var o=[],a=0,s=t.length;a<s;++a)S(t,String(a))?o.push(d(e,t,n,r,String(a),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(d(e,t,n,r,i,!0))})),o}(e,t,n,u,s):s.map((function(r){return d(e,t,n,u,r,E)})),e.seen.pop(),c=w,l=_,60<(s=s).reduce((function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)?l[0]+(""===c?"":c+"\n ")+" "+s.join(",\n  ")+" "+l[1]:l[0]+c+" "+s.join(", ")+" "+l[1]):_[0]+w+_[1]}function f(e){return"["+Error.prototype.toString.call(e)+"]"}function d(e,t,n,r,i,o){var a,s;if((t=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=t.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):t.set&&(s=e.stylize("[Setter]","special")),S(r,i)||(a="["+i+"]"),s||(e.seen.indexOf(t.value)<0?-1<(s=g(n)?h(e,t.value,null):h(e,t.value,n-1)).indexOf("\n")&&(s=o?s.split("\n").map((function(e){return"  "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return"   "+e})).join("\n")):s=e.stylize("[Circular]","special")),b(a)){if(o&&i.match(/^\d+$/))return s;a=(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),e.stylize(a,"string"))}return a+": "+s}function p(e){return Array.isArray(e)}function m(e){return"boolean"==typeof e}function g(e){return null===e}function A(e){return"number"==typeof e}function v(e){return"string"==typeof e}function b(e){return void 0===e}function y(e){return w(e)&&"[object RegExp]"===E(e)}function w(e){return"object"===i(e)&&null!==e}function x(e){return w(e)&&"[object Date]"===E(e)}function C(e){return w(e)&&("[object Error]"===E(e)||e instanceof Error)}function k(e){return"function"==typeof e}function E(e){return Object.prototype.toString.call(e)}function S(e,t){return Object.prototype.hasOwnProperty.call(e,t)}r.debuglog=function(e){return b(a)&&(a=t.env.NODE_DEBUG||""),e=e.toUpperCase(),s[e]||(new RegExp("\\b"+e+"\\b","i").test(a)?(t.pid,s[e]=function(){r.format.apply(r,arguments)}):s[e]=function(){}),s[e]},(r.inspect=u).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]},u.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=p,r.isBoolean=m,r.isNull=g,r.isNullOrUndefined=function(e){return null==e},r.isNumber=A,r.isString=v,r.isSymbol=function(e){return"symbol"===i(e)},r.isUndefined=b,r.isRegExp=y,r.isObject=w,r.isDate=x,r.isError=C,r.isFunction=k,r.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"===i(e)||void 0===e},r.isBuffer=e("./support/isBuffer"),r.log=function(){},r.inherits=e("inherits"),r._extend=function(e,t){if(t&&w(t))for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}}).call(this,e("_process"),void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":524,_process:467,inherits:523}],526:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"v1",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(n,"v3",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(n,"v4",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(n,"v5",{enumerable:!0,get:function(){return a.default}}),Object.defineProperty(n,"NIL",{enumerable:!0,get:function(){return s.default}}),Object.defineProperty(n,"version",{enumerable:!0,get:function(){return u.default}}),Object.defineProperty(n,"validate",{enumerable:!0,get:function(){return c.default}}),Object.defineProperty(n,"stringify",{enumerable:!0,get:function(){return l.default}}),Object.defineProperty(n,"parse",{enumerable:!0,get:function(){return h.default}});var r=f(e("./v1.js")),i=f(e("./v3.js")),o=f(e("./v4.js")),a=f(e("./v5.js")),s=f(e("./nil.js")),u=f(e("./version.js")),c=f(e("./validate.js")),l=f(e("./stringify.js")),h=f(e("./parse.js"));function f(e){return e&&e.__esModule?e:{default:e}}},{"./nil.js":528,"./parse.js":529,"./stringify.js":533,"./v1.js":534,"./v3.js":535,"./v4.js":537,"./v5.js":538,"./validate.js":539,"./version.js":540}],527:[function(e,t,n){"use strict";function r(e){return 14+(e+64>>>9<<4)+1}function i(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function o(e,t,n,r,o,a){return i((t=i(i(t,e),i(r,a)))<<o|t>>>32-o,n)}function a(e,t,n,r,i,a,s){return o(t&n|~t&r,e,t,i,a,s)}function s(e,t,n,r,i,a,s){return o(t&r|n&~r,e,t,i,a,s)}function u(e,t,n,r,i,a,s){return o(t^n^r,e,t,i,a,s)}function c(e,t,n,r,i,a,s){return o(n^(t|~r),e,t,i,a,s)}Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0,n.default=function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var n=0;n<t.length;++n)e[n]=t.charCodeAt(n)}for(var o=function(e,t){e[t>>5]|=128<<t%32,e[r(t)-1]=t;for(var n=1732584193,o=-271733879,l=-1732584194,h=271733878,f=0;f<e.length;f+=16){var d=n,p=o,m=l,g=h;n=a(n,o,l,h,e[f],7,-680876936),h=a(h,n,o,l,e[f+1],12,-389564586),l=a(l,h,n,o,e[f+2],17,606105819),o=a(o,l,h,n,e[f+3],22,-1044525330);n=a(n,o,l,h,e[f+4],7,-176418897),h=a(h,n,o,l,e[f+5],12,1200080426),l=a(l,h,n,o,e[f+6],17,-1473231341),o=a(o,l,h,n,e[f+7],22,-45705983),n=a(n,o,l,h,e[f+8],7,1770035416),h=a(h,n,o,l,e[f+9],12,-1958414417),l=a(l,h,n,o,e[f+10],17,-42063),o=a(o,l,h,n,e[f+11],22,-1990404162),n=a(n,o,l,h,e[f+12],7,1804603682),h=a(h,n,o,l,e[f+13],12,-40341101),l=a(l,h,n,o,e[f+14],17,-1502002290),n=s(n,o=a(o,l,h,n,e[f+15],22,1236535329),l,h,e[f+1],5,-165796510),h=s(h,n,o,l,e[f+6],9,-1069501632),l=s(l,h,n,o,e[f+11],14,643717713),o=s(o,l,h,n,e[f],20,-373897302),n=s(n,o,l,h,e[f+5],5,-701558691),h=s(h,n,o,l,e[f+10],9,38016083),l=s(l,h,n,o,e[f+15],14,-660478335),o=s(o,l,h,n,e[f+4],20,-405537848),n=s(n,o,l,h,e[f+9],5,568446438),h=s(h,n,o,l,e[f+14],9,-1019803690),l=s(l,h,n,o,e[f+3],14,-187363961),o=s(o,l,h,n,e[f+8],20,1163531501),n=s(n,o,l,h,e[f+13],5,-1444681467),h=s(h,n,o,l,e[f+2],9,-51403784),l=s(l,h,n,o,e[f+7],14,1735328473),n=u(n,o=s(o,l,h,n,e[f+12],20,-1926607734),l,h,e[f+5],4,-378558),h=u(h,n,o,l,e[f+8],11,-2022574463),l=u(l,h,n,o,e[f+11],16,1839030562),o=u(o,l,h,n,e[f+14],23,-35309556),n=u(n,o,l,h,e[f+1],4,-1530992060),h=u(h,n,o,l,e[f+4],11,1272893353),l=u(l,h,n,o,e[f+7],16,-155497632),o=u(o,l,h,n,e[f+10],23,-1094730640),n=u(n,o,l,h,e[f+13],4,681279174),h=u(h,n,o,l,e[f],11,-358537222),l=u(l,h,n,o,e[f+3],16,-722521979),o=u(o,l,h,n,e[f+6],23,76029189),n=u(n,o,l,h,e[f+9],4,-640364487),h=u(h,n,o,l,e[f+12],11,-421815835),l=u(l,h,n,o,e[f+15],16,530742520),n=c(n,o=u(o,l,h,n,e[f+2],23,-995338651),l,h,e[f],6,-198630844),h=c(h,n,o,l,e[f+7],10,1126891415),l=c(l,h,n,o,e[f+14],15,-1416354905),o=c(o,l,h,n,e[f+5],21,-57434055),n=c(n,o,l,h,e[f+12],6,1700485571),h=c(h,n,o,l,e[f+3],10,-1894986606),l=c(l,h,n,o,e[f+10],15,-1051523),o=c(o,l,h,n,e[f+1],21,-2054922799),n=c(n,o,l,h,e[f+8],6,1873313359),h=c(h,n,o,l,e[f+15],10,-30611744),l=c(l,h,n,o,e[f+6],15,-1560198380),o=c(o,l,h,n,e[f+13],21,1309151649),n=c(n,o,l,h,e[f+4],6,-145523070),h=c(h,n,o,l,e[f+11],10,-1120210379),l=c(l,h,n,o,e[f+2],15,718787259),o=c(o,l,h,n,e[f+9],21,-343485551),n=i(n,d),o=i(o,p),l=i(l,m),h=i(h,g)}return[n,o,l,h]}(function(e){if(0===e.length)return[];for(var t=8*e.length,n=new Uint32Array(r(t)),i=0;i<t;i+=8)n[i>>5]|=(255&e[i/8])<<i%32;return n}(e),8*e.length),l=[],h=32*o.length,f=0;f<h;f+=8){var d=o[f>>5]>>>f%32&255;d=parseInt("0123456789abcdef".charAt(d>>>4&15)+"0123456789abcdef".charAt(15&d),16);l.push(d)}return l}},{}],528:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0,n.default="00000000-0000-0000-0000-000000000000"},{}],529:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=(e=e("./validate.js"))&&e.__esModule?e:{default:e};n.default=function(e){var t,n;if((0,r.default)(e))return(n=new Uint8Array(16))[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n;throw TypeError("Invalid UUID")}},{"./validate.js":539}],530:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0,n.default=/^(?:[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},{}],531:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(){if(r)return r(i);throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported")};var r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),i=new Uint8Array(16)},{}],532:[function(e,t,n){"use strict";function r(e,t){return e<<t|e>>>32-t}Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0,n.default=function(e){var t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var i=unescape(encodeURIComponent(e));e=[];for(var o=0;o<i.length;++o)e.push(i.charCodeAt(o))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var a=e.length/4+2,s=Math.ceil(a/16),u=new Array(s),c=0;c<s;++c){for(var l=new Uint32Array(16),h=0;h<16;++h)l[h]=e[64*c+4*h]<<24|e[64*c+4*h+1]<<16|e[64*c+4*h+2]<<8|e[64*c+4*h+3];u[c]=l}u[s-1][14]=8*(e.length-1)/Math.pow(2,32),u[s-1][14]=Math.floor(u[s-1][14]),u[s-1][15]=8*(e.length-1)&4294967295;for(var f=0;f<s;++f){for(var d=new Uint32Array(80),p=0;p<16;++p)d[p]=u[f][p];for(var m=16;m<80;++m)d[m]=r(d[m-3]^d[m-8]^d[m-14]^d[m-16],1);for(var g=n[0],A=n[1],v=n[2],b=n[3],y=n[4],w=0;w<80;++w){var x=Math.floor(w/20);x=r(g,5)+function(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:return t^n^r;case 2:return t&n^t&r^n&r;case 3:return t^n^r}}(x,A,v,b)+y+t[x]+d[w]>>>0,y=b,b=v,v=r(A,30)>>>0,A=g,g=x}n[0]=n[0]+g>>>0,n[1]=n[1]+A>>>0,n[2]=n[2]+v>>>0,n[3]=n[3]+b>>>0,n[4]=n[4]+y>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]}},{}],533:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;for(var r=(e=e("./validate.js"))&&e.__esModule?e:{default:e},i=[],o=0;o<256;++o)i.push((o+256).toString(16).substr(1));n.default=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0;e=(i[e[t+0]]+i[e[t+1]]+i[e[t+2]]+i[e[t+3]]+"-"+i[e[t+4]]+i[e[t+5]]+"-"+i[e[t+6]]+i[e[t+7]]+"-"+i[e[t+8]]+i[e[t+9]]+"-"+i[e[t+10]]+i[e[t+11]]+i[e[t+12]]+i[e[t+13]]+i[e[t+14]]+i[e[t+15]]).toLowerCase();if((0,r.default)(e))return e;throw TypeError("Stringified UUID is invalid")}},{"./validate.js":539}],534:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r,i,o=s(e("./rng.js")),a=s(e("./stringify.js"));function s(e){return e&&e.__esModule?e:{default:e}}var u=0,c=0;n.default=function(e,t,n){var s=t&&n||0,l=t||new Array(16),h=(e=e||{}).node||r,f=(n=void 0!==e.clockseq?e.clockseq:i,null!=h&&null!=n||(f=e.random||(e.rng||o.default)(),null==h&&(h=r=[1|f[0],f[1],f[2],f[3],f[4],f[5]]),null==n&&(n=i=16383&(f[6]<<8|f[7]))),void 0!==e.msecs?e.msecs:Date.now()),d=void 0!==e.nsecs?e.nsecs:c+1,p=f-u+(d-c)/1e4;if(p<0&&void 0===e.clockseq&&(n=n+1&16383),1e4<=(d=(p<0||u<f)&&void 0===e.nsecs?0:d))throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");u=f,i=n,p=(1e4*(268435455&(f+=122192928e5))+(c=d))%4294967296,l[s++]=p>>>24&255,l[s++]=p>>>16&255,l[s++]=p>>>8&255,l[s++]=255&p,e=f/4294967296*1e4&268435455,l[s++]=e>>>8&255,l[s++]=255&e,l[s++]=e>>>24&15|16,l[s++]=e>>>16&255,l[s++]=n>>>8|128,l[s++]=255&n;for(var m=0;m<6;++m)l[s+m]=h[m];return t||(0,a.default)(l)}},{"./rng.js":531,"./stringify.js":533}],535:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=i(e("./v35.js"));e=i(e("./md5.js"));function i(e){return e&&e.__esModule?e:{default:e}}r=(0,r.default)("v3",48,e.default),n.default=r},{"./md5.js":527,"./v35.js":536}],536:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(e,t,n){function o(e,o,a,s){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t}(e)),16!==(o="string"==typeof o?(0,i.default)(o):o).length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var u=new Uint8Array(16+e.length);if(u.set(o),u.set(e,o.length),(u=n(u))[6]=15&u[6]|t,u[8]=63&u[8]|128,a){s=s||0;for(var c=0;c<16;++c)a[s+c]=u[c];return a}return(0,r.default)(u)}try{o.name=e}catch(e){}return o.DNS=a,o.URL=s,o},n.URL=n.DNS=void 0;var r=o(e("./stringify.js")),i=o(e("./parse.js"));function o(e){return e&&e.__esModule?e:{default:e}}var a="6ba7b810-9dad-11d1-80b4-00c04fd430c8",s=(n.DNS=a,"6ba7b811-9dad-11d1-80b4-00c04fd430c8");n.URL=s},{"./parse.js":529,"./stringify.js":533}],537:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=o(e("./rng.js")),i=o(e("./stringify.js"));function o(e){return e&&e.__esModule?e:{default:e}}n.default=function(e,t,n){var o=(e=e||{}).random||(e.rng||r.default)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t){n=n||0;for(var a=0;a<16;++a)t[n+a]=o[a];return t}return(0,i.default)(o)}},{"./rng.js":531,"./stringify.js":533}],538:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=i(e("./v35.js"));e=i(e("./sha1.js"));function i(e){return e&&e.__esModule?e:{default:e}}r=(0,r.default)("v5",80,e.default),n.default=r},{"./sha1.js":532,"./v35.js":536}],539:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=(e=e("./regex.js"))&&e.__esModule?e:{default:e};n.default=function(e){return"string"==typeof e&&r.default.test(e)}},{"./regex.js":530}],540:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=(e=e("./validate.js"))&&e.__esModule?e:{default:e};n.default=function(e){if((0,r.default)(e))return parseInt(e.substr(14,1),16);throw TypeError("Invalid UUID")}},{"./validate.js":539}],541:[function(e,t,n){"use strict";
/**
 * Character classes and associated utilities for the 5th edition of XML 1.0.
 *
 * @author Louis-Dominique Dubeau
 * @license MIT
 * @copyright Louis-Dominique Dubeau
 */function r(e){return 65<=e&&e<=90||97<=e&&e<=122||58===e||95===e||8204===e||8205===e||192<=e&&e<=214||216<=e&&e<=246||248<=e&&e<=767||880<=e&&e<=893||895<=e&&e<=8191||8304<=e&&e<=8591||11264<=e&&e<=12271||12289<=e&&e<=55295||63744<=e&&e<=64975||65008<=e&&e<=65533||65536<=e&&e<=983039}Object.defineProperty(n,"__esModule",{value:!0}),n.CHAR="\t\n\r -퟿-�𐀀-􏿿",n.S=" \t\r\n",n.NAME_START_CHAR=":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",n.NAME_CHAR="-"+n.NAME_START_CHAR+".0-9·̀-ͯ‿-⁀",n.CHAR_RE=new RegExp("^["+n.CHAR+"]$","u"),n.S_RE=new RegExp("^["+n.S+"]+$","u"),n.NAME_START_CHAR_RE=new RegExp("^["+n.NAME_START_CHAR+"]$","u"),n.NAME_CHAR_RE=new RegExp("^["+n.NAME_CHAR+"]$","u"),n.NAME_RE=new RegExp("^["+n.NAME_START_CHAR+"]["+n.NAME_CHAR+"]*$","u"),n.NMTOKEN_RE=new RegExp("^["+n.NAME_CHAR+"]+$","u"),n.S_LIST=[32,10,13,9],n.isChar=function(e){return 32<=e&&e<=55295||10===e||13===e||9===e||57344<=e&&e<=65533||65536<=e&&e<=1114111},n.isS=function(e){return 32===e||10===e||13===e||9===e},n.isNameStartChar=r,n.isNameChar=function(e){return r(e)||48<=e&&e<=57||45===e||46===e||183===e||768<=e&&e<=879||8255<=e&&e<=8256}},{}],542:[function(e,t,n){"use strict";
/**
 * Character classes and associated utilities for the 2nd edition of XML 1.1.
 *
 * @author Louis-Dominique Dubeau
 * @license MIT
 * @copyright Louis-Dominique Dubeau
 */function r(e){return 65<=e&&e<=90||97<=e&&e<=122||58===e||95===e||8204===e||8205===e||192<=e&&e<=214||216<=e&&e<=246||248<=e&&e<=767||880<=e&&e<=893||895<=e&&e<=8191||8304<=e&&e<=8591||11264<=e&&e<=12271||12289<=e&&e<=55295||63744<=e&&e<=64975||65008<=e&&e<=65533||65536<=e&&e<=983039}Object.defineProperty(n,"__esModule",{value:!0}),n.CHAR="-퟿-�𐀀-􏿿",n.RESTRICTED_CHAR="-\b\v\f---",n.S=" \t\r\n",n.NAME_START_CHAR=":A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",n.NAME_CHAR="-"+n.NAME_START_CHAR+".0-9·̀-ͯ‿-⁀",n.CHAR_RE=new RegExp("^["+n.CHAR+"]$","u"),n.RESTRICTED_CHAR_RE=new RegExp("^["+n.RESTRICTED_CHAR+"]$","u"),n.S_RE=new RegExp("^["+n.S+"]+$","u"),n.NAME_START_CHAR_RE=new RegExp("^["+n.NAME_START_CHAR+"]$","u"),n.NAME_CHAR_RE=new RegExp("^["+n.NAME_CHAR+"]$","u"),n.NAME_RE=new RegExp("^["+n.NAME_START_CHAR+"]["+n.NAME_CHAR+"]*$","u"),n.NMTOKEN_RE=new RegExp("^["+n.NAME_CHAR+"]+$","u"),n.S_LIST=[32,10,13,9],n.isChar=function(e){return 1<=e&&e<=55295||57344<=e&&e<=65533||65536<=e&&e<=1114111},n.isRestrictedChar=function(e){return 1<=e&&e<=8||11===e||12===e||14<=e&&e<=31||127<=e&&e<=132||134<=e&&e<=159},n.isCharAndNotRestricted=function(e){return 9===e||10===e||13===e||31<e&&e<127||133===e||159<e&&e<=55295||57344<=e&&e<=65533||65536<=e&&e<=1114111},n.isS=function(e){return 32===e||10===e||13===e||9===e},n.isNameStartChar=r,n.isNameChar=function(e){return r(e)||48<=e&&e<=57||45===e||46===e||183===e||768<=e&&e<=879||8255<=e&&e<=8256}},{}],543:[function(e,t,n){"use strict";
/**
 * Character class utilities for XML NS 1.0 edition 3.
 *
 * @author Louis-Dominique Dubeau
 * @license MIT
 * @copyright Louis-Dominique Dubeau
 */function r(e){return 65<=e&&e<=90||95===e||97<=e&&e<=122||192<=e&&e<=214||216<=e&&e<=246||248<=e&&e<=767||880<=e&&e<=893||895<=e&&e<=8191||8204<=e&&e<=8205||8304<=e&&e<=8591||11264<=e&&e<=12271||12289<=e&&e<=55295||63744<=e&&e<=64975||65008<=e&&e<=65533||65536<=e&&e<=983039}Object.defineProperty(n,"__esModule",{value:!0}),n.NC_NAME_START_CHAR="A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿",n.NC_NAME_CHAR="-"+n.NC_NAME_START_CHAR+".0-9·̀-ͯ‿-⁀",n.NC_NAME_START_CHAR_RE=new RegExp("^["+n.NC_NAME_START_CHAR+"]$","u"),n.NC_NAME_CHAR_RE=new RegExp("^["+n.NC_NAME_CHAR+"]$","u"),n.NC_NAME_RE=new RegExp("^["+n.NC_NAME_START_CHAR+"]["+n.NC_NAME_CHAR+"]*$","u"),n.isNCNameStartChar=r,n.isNCNameChar=function(e){return r(e)||45===e||46===e||48<=e&&e<=57||183===e||768<=e&&e<=879||8255<=e&&e<=8256}},{}]},{},[15])(15)}).call(this,n(67))},function(e,t,n){(function(t){e.exports=function e(t,n,r){function i(a,s){if(!n[a]){if(!t[a]){if(o)return o(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}u=n[a]={exports:{}},t[a][0].call(u.exports,(function(e){return i(t[a][1][e]||e)}),u,u.exports,e,t,n,r)}return n[a].exports}for(var o=!1,a=0;a<r.length;a++)i(r[a]);return i}({"./aesprim":[function(e,t,n){!function(e,t){"use strict";!function(e){var t,n,r,i,o,a,s,u,c,l,h,f,d,p,m,g,A,v;function b(e,t){if(!e)throw new Error("ASSERT: "+t)}function y(e){return 48<=e&&e<=57}function w(e){return 0<="0123456789abcdefABCDEF".indexOf(e)}function x(e){return 0<="01234567".indexOf(e)}function C(e){return 10===e||13===e||8232===e||8233===e}function k(e){return 64==e||36===e||95===e||65<=e&&e<=90||97<=e&&e<=122||92===e||128<=e&&s.NonAsciiIdentifierStart.test(String.fromCharCode(e))}function E(e){return 36===e||95===e||65<=e&&e<=90||97<=e&&e<=122||48<=e&&e<=57||92===e||128<=e&&s.NonAsciiIdentifierPart.test(String.fromCharCode(e))}function S(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return 1;default:return}}function _(e){return"eval"===e||"arguments"===e}function O(e,t,n,r,i){b("number"==typeof n,"Comment must have valid position"),A.lastCommentStart>=n||(A.lastCommentStart=n,e={type:e,value:t},v.range&&(e.range=[n,r]),v.loc&&(e.loc=i),v.comments.push(e),v.attachComment&&(v.leadingComments.push(e),v.trailingComments.push(e)))}function T(e){for(var t,n,r=h-e,i={start:{line:f,column:h-d-e}};h<p;)if(t=c.charCodeAt(h),++h,C(t))return v.comments&&(n=c.slice(r+e,h-1),i.end={line:f,column:h-d-1},O("Line",n,r,h-1,i)),13===t&&10===c.charCodeAt(h)&&++h,++f,void(d=h);v.comments&&(n=c.slice(r+e,h),i.end={line:f,column:h-d},O("Line",n,r,h,i))}function D(){for(var e,t,n=0===h;h<p;)if(32===(t=e=c.charCodeAt(h))||9===t||11===t||12===t||160===t||5760<=t&&0<=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(t))++h;else if(C(e))++h,13===e&&10===c.charCodeAt(h)&&++h,++f,d=h,n=!0;else if(47===e)if(47===(e=c.charCodeAt(h+1)))++h,++h,T(2),n=!0;else{if(42!==e)break;++h,++h,function(){var e,t,n;for(v.comments&&(e=h-2,t={start:{line:f,column:h-d-2}});h<p;)if(C(n=c.charCodeAt(h)))13===n&&10===c.charCodeAt(h+1)&&++h,++f,p<=(d=++h)&&V({},a.UnexpectedToken,"ILLEGAL");else{if(42===n&&47===c.charCodeAt(h+1))return++h,++h,v.comments&&(n=c.slice(e+2,h-2),t.end={line:f,column:h-d},O("Block",n,e,h,t));++h}V({},a.UnexpectedToken,"ILLEGAL")}()}else if(n&&45===e){if(45!==c.charCodeAt(h+1)||62!==c.charCodeAt(h+2))break;h+=3,T(3)}else{if(60!==e)break;if("!--"!==c.slice(h+1,h+4))break;++h,++h,++h,++h,T(4)}}function B(e){for(var t,n=0,r="u"===e?4:2,i=0;i<r;++i){if(!(h<p&&w(c[h])))return"";t=c[h++],n=16*n+"0123456789abcdef".indexOf(t.toLowerCase())}return String.fromCharCode(n)}function I(){var e=c.charCodeAt(h++),t=String.fromCharCode(e);for(92===e&&(117!==c.charCodeAt(h)&&V({},a.UnexpectedToken,"ILLEGAL"),++h,(e=B("u"))&&"\\"!==e&&k(e.charCodeAt(0))||V({},a.UnexpectedToken,"ILLEGAL"),t=e);h<p&&E(e=c.charCodeAt(h));)++h,t+=String.fromCharCode(e),92===e&&(t=t.substr(0,t.length-1),117!==c.charCodeAt(h)&&V({},a.UnexpectedToken,"ILLEGAL"),++h,(e=B("u"))&&"\\"!==e&&E(e.charCodeAt(0))||V({},a.UnexpectedToken,"ILLEGAL"),t+=e);return t}function M(){var e=h,n=(92===c.charCodeAt(h)?I:function(){for(var e,t=h++;h<p;){if(92===(e=c.charCodeAt(h)))return h=t,I();if(!E(e))break;++h}return c.slice(t,h)})();return{type:1===n.length?t.Identifier:function(e){if(l&&S(e))return 1;switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e||"let"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return}}(n)?t.Keyword:"null"===n?t.NullLiteral:"true"===n||"false"===n?t.BooleanLiteral:t.Identifier,value:n,lineNumber:f,lineStart:d,start:e,end:h}}function j(){var e,n,r=h,i=c.charCodeAt(h),o=c[h];switch(i){case 46:case 40:case 41:case 59:case 44:case 123:case 125:case 91:case 93:case 58:case 63:case 126:return++h,v.tokenize&&(40===i?v.openParenToken=v.tokens.length:123===i&&(v.openCurlyToken=v.tokens.length)),{type:t.Punctuator,value:String.fromCharCode(i),lineNumber:f,lineStart:d,start:r,end:h};default:if(61===(e=c.charCodeAt(h+1)))switch(i){case 43:case 45:case 47:case 60:case 62:case 94:case 124:case 37:case 38:case 42:return h+=2,{type:t.Punctuator,value:String.fromCharCode(i)+String.fromCharCode(e),lineNumber:f,lineStart:d,start:r,end:h};case 33:case 61:return h+=2,61===c.charCodeAt(h)&&++h,{type:t.Punctuator,value:c.slice(r,h),lineNumber:f,lineStart:d,start:r,end:h}}}return">>>="===(n=c.substr(h,4))?(h+=4,{type:t.Punctuator,value:n,lineNumber:f,lineStart:d,start:r,end:h}):">>>"===(n=n.substr(0,3))||"<<="===n||">>="===n?(h+=3,{type:t.Punctuator,value:n,lineNumber:f,lineStart:d,start:r,end:h}):o===(n=n.substr(0,2))[1]&&0<="+-<>&|".indexOf(o)||"=>"===n?(h+=2,{type:t.Punctuator,value:n,lineNumber:f,lineStart:d,start:r,end:h}):0<="<>=!+-*%&|^/".indexOf(o)?(++h,{type:t.Punctuator,value:o,lineNumber:f,lineStart:d,start:r,end:h}):void V({},a.UnexpectedToken,"ILLEGAL")}function N(){var e,n,r=c[h];if(b(y(r.charCodeAt(0))||"."===r,"Numeric literal must start with a decimal digit or a decimal point"),n=h,e="","."!==r){if(e=c[h++],r=c[h],"0"===e){if("x"===r||"X"===r){++h;for(var i=n,o="";h<p&&w(c[h]);)o+=c[h++];return 0===o.length&&V({},a.UnexpectedToken,"ILLEGAL"),k(c.charCodeAt(h))&&V({},a.UnexpectedToken,"ILLEGAL"),{type:t.NumericLiteral,value:parseInt("0x"+o,16),lineNumber:f,lineStart:d,start:i,end:h}}if(x(r)){i=n;for(var s="0"+c[h++];h<p&&x(c[h]);)s+=c[h++];return(k(c.charCodeAt(h))||y(c.charCodeAt(h)))&&V({},a.UnexpectedToken,"ILLEGAL"),{type:t.NumericLiteral,value:parseInt(s,8),octal:!0,lineNumber:f,lineStart:d,start:i,end:h}}r&&y(r.charCodeAt(0))&&V({},a.UnexpectedToken,"ILLEGAL")}for(;y(c.charCodeAt(h));)e+=c[h++];r=c[h]}if("."===r){for(e+=c[h++];y(c.charCodeAt(h));)e+=c[h++];r=c[h]}if("e"===r||"E"===r)if(e+=c[h++],"+"!==(r=c[h])&&"-"!==r||(e+=c[h++]),y(c.charCodeAt(h)))for(;y(c.charCodeAt(h));)e+=c[h++];else V({},a.UnexpectedToken,"ILLEGAL");return k(c.charCodeAt(h))&&V({},a.UnexpectedToken,"ILLEGAL"),{type:t.NumericLiteral,value:parseFloat(e),lineNumber:f,lineStart:d,start:n,end:h}}function F(){var e,n,r,i;return g=null,D(),e=h,n=function(){var e,t,n,r=c[h];for(b("/"===r,"Regular expression literal must start with a slash"),e=c[h++],n=t=!1;h<p;)if(e+=r=c[h++],"\\"===r)C((r=c[h++]).charCodeAt(0))&&V({},a.UnterminatedRegExp),e+=r;else if(C(r.charCodeAt(0)))V({},a.UnterminatedRegExp);else if(t)"]"===r&&(t=!1);else{if("/"===r){n=!0;break}"["===r&&(t=!0)}return n||V({},a.UnterminatedRegExp),{value:e.substr(1,e.length-2),literal:e}}(),r=function(){for(var e,t,n="",r="";h<p&&E((e=c[h]).charCodeAt(0));)if(++h,"\\"===e&&h<p){if("u"===(e=c[h]))if(t=++h,e=B("u"))for(r+=e,n+="\\u";t<h;++t)n+=c[t];else h=t,r+="u",n+="\\u";else n+="\\";q({},a.UnexpectedToken,"ILLEGAL")}else r+=e,n+=e;return{value:r,literal:n}}(),i=function(e,t){var n;try{n=new RegExp(e,t)}catch(e){V({},a.InvalidRegExp)}return n}(n.value,r.value),v.tokenize?{type:t.RegularExpression,value:i,lineNumber:f,lineStart:d,start:e,end:h}:{literal:n.literal+r.literal,value:i,start:e,end:h}}function R(){var e,t,n,r;return D(),t={start:{line:f,column:(e=h)-d}},n=F(),t.end={line:f,column:h-d},v.tokenize||(0<v.tokens.length&&((r=v.tokens[v.tokens.length-1]).range[0]!==e||"Punctuator"!==r.type||"/"!==r.value&&"/="!==r.value||v.tokens.pop()),v.tokens.push({type:"RegularExpression",value:n.literal,range:[e,h],loc:t})),n}function P(){var e;if(D(),p<=h)return{type:t.EOF,lineNumber:f,lineStart:d,start:h,end:h};if(k(e=c.charCodeAt(h)))return M();if(40!==e&&41!==e&&59!==e){if(39===e||34===e){var n,i,o,s,u="",l=!1,m=f,g=d,A=c[h];for(b("'"===A||'"'===A,"String literal must starts with a quote"),n=h,++h;h<p;){if((i=c[h++])===A){A="";break}if("\\"===i)if((i=c[h++])&&C(i.charCodeAt(0)))++f,"\r"===i&&"\n"===c[h]&&++h,d=h;else switch(i){case"u":case"x":s=h,(o=B(i))?u+=o:(h=s,u+=i);break;case"n":u+="\n";break;case"r":u+="\r";break;case"t":u+="\t";break;case"b":u+="\b";break;case"f":u+="\f";break;case"v":u+="\v";break;default:x(i)?(0!==(o="01234567".indexOf(i))&&(l=!0),h<p&&x(c[h])&&(l=!0,o=8*o+"01234567".indexOf(c[h++]),0<="0123".indexOf(i)&&h<p&&x(c[h])&&(o=8*o+"01234567".indexOf(c[h++]))),u+=String.fromCharCode(o)):u+=i}else{if(C(i.charCodeAt(0)))break;u+=i}}return""!==A&&V({},a.UnexpectedToken,"ILLEGAL"),{type:t.StringLiteral,value:u,octal:l,startLineNumber:m,startLineStart:g,lineNumber:f,lineStart:d,start:n,end:h}}if(46===e)return(y(c.charCodeAt(h+1))?N:j)();if(y(e))return N();if(v.tokenize&&47===e){var w;if(!(m=v.tokens[v.tokens.length-1]))return R();if("Punctuator"!==m.type)return("Keyword"===m.type?R:j)();if("]"===m.value)return j();if(")"===m.value)return(!(w=v.tokens[v.openParenToken-1])||"Keyword"!==w.type||"if"!==w.value&&"while"!==w.value&&"for"!==w.value&&"with"!==w.value?j:R)();if("}"!==m.value)return R();if(v.tokens[v.openCurlyToken-3]&&"Keyword"===v.tokens[v.openCurlyToken-3].type){if(!(w=v.tokens[v.openCurlyToken-4]))return j()}else{if(!v.tokens[v.openCurlyToken-4]||"Keyword"!==v.tokens[v.openCurlyToken-4].type)return j();if(!(w=v.tokens[v.openCurlyToken-5]))return R()}return(0<=r.indexOf(w.value)?j:R)()}}return j()}function L(){var e,r,i;return D(),e={start:{line:f,column:h-d}},r=P(),e.end={line:f,column:h-d},r.type!==t.EOF&&(i=c.slice(r.start,r.end),v.tokens.push({type:n[r.type],value:i,range:[r.start,r.end],loc:e})),r}function U(){var e=g;return h=e.end,f=e.lineNumber,d=e.lineStart,g=(void 0!==v.tokens?L:P)(),h=e.end,f=e.lineNumber,d=e.lineStart,e}function z(){var e=h,t=f,n=d;g=(void 0!==v.tokens?L:P)(),h=e,f=t,d=n}function H(e,t){this.line=e,this.column=t}function $(e,t,n,r){this.start=new H(e,t),this.end=new H(n,r)}function Q(){var e,t=h,n=f,r=d;return D(),e=f!==n,h=t,f=n,d=r,e}function V(e,t){var n,r=Array.prototype.slice.call(arguments,2);t=t.replace(/%(\d)/g,(function(e,t){return b(t<r.length,"Message reference must be in range"),r[t]}));throw"number"==typeof e.lineNumber?((n=new Error("Line "+e.lineNumber+": "+t)).index=e.start,n.lineNumber=e.lineNumber,n.column=e.start-d+1):((n=new Error("Line "+f+": "+t)).index=h,n.lineNumber=f,n.column=h-d+1),n.description=t,n}function q(){try{V.apply(null,arguments)}catch(e){if(!v.errors)throw e;v.errors.push(e)}}function G(e){if(e.type===t.EOF&&V(e,a.UnexpectedEOS),e.type===t.NumericLiteral&&V(e,a.UnexpectedNumber),e.type===t.StringLiteral&&V(e,a.UnexpectedString),e.type===t.Identifier&&V(e,a.UnexpectedIdentifier),e.type===t.Keyword){if(function(e){switch(e){case"class":case"enum":case"export":case"extends":case"import":case"super":return 1;default:return}}(e.value))V(e,a.UnexpectedReserved);else if(l&&S(e.value))return void q(e,a.StrictReservedWord);V(e,a.UnexpectedToken,e.value)}V(e,a.UnexpectedToken,e.value)}function W(e){var n=U();n.type===t.Punctuator&&n.value===e||G(n)}function K(e){var n=U();n.type===t.Keyword&&n.value===e||G(n)}function Y(e){return g.type===t.Punctuator&&g.value===e}function X(e){return g.type===t.Keyword&&g.value===e}function J(){var e;59===c.charCodeAt(h)||Y(";")?U():(e=f,D(),f!==e||g.type===t.EOF||Y("}")||G(g))}function Z(e){return e.type===i.Identifier||e.type===i.MemberExpression}function ee(e,t){var n=l,r=g,i=Ae();return t&&l&&_(e[0].name)&&q(t,a.StrictParamName),l=n,m.markEnd(m.createFunctionExpression(null,e,[],i),r)}function te(){var e=g,n=U();return n.type===t.StringLiteral||n.type===t.NumericLiteral?(l&&n.octal&&q(n,a.StrictOctalLiteral),m.markEnd(m.createLiteral(n),e)):m.markEnd(m.createIdentifier(n.value),e)}function ne(){var e,n,r,s,u,c=[],h={},f=String,d=g;for(W("{");!Y("}");)u=s=r=n=e=void 0,u=s=g,e=(r=s.type===t.Identifier?(r=te(),"get"!==s.value||Y(":")?"set"!==s.value||Y(":")?(W(":"),n=he(),m.markEnd(m.createProperty("init",r,n),u)):(e=te(),W("("),n=(s=g).type!==t.Identifier?(W(")"),q(s,a.UnexpectedToken,s.value),ee([])):(r=[pe()],W(")"),ee(r,s)),m.markEnd(m.createProperty("set",e,n),u)):(e=te(),W("("),W(")"),n=ee([]),m.markEnd(m.createProperty("get",e,n),u))):s.type!==t.EOF&&s.type!==t.Punctuator?(e=te(),W(":"),n=he(),m.markEnd(m.createProperty("init",e,n),u)):void G(s)).key.type===i.Identifier?r.key.name:f(r.key.value),n="init"===r.kind?o.Data:"get"===r.kind?o.Get:o.Set,u="$"+e,Object.prototype.hasOwnProperty.call(h,u)?(h[u]===o.Data?l&&n===o.Data?q({},a.StrictDuplicateProperty):n!==o.Data&&q({},a.AccessorDataProperty):n===o.Data?q({},a.AccessorDataProperty):h[u]&n&&q({},a.AccessorGetSet),h[u]|=n):h[u]=n,c.push(r),Y("}")||W(",");return W("}"),m.markEnd(m.createObjectExpression(c),d)}function re(){var e,n,r,i,o,s,u,c,h,f,d,p;if(Y("("))return W("("),b=fe(),W(")"),b;if(Y("[")){var A=[],b=g;for(W("[");!Y("]");)Y(",")?(U(),A.push(null)):(A.push(he()),Y("]")||W(","));return U(),m.markEnd(m.createArrayExpression(A),b)}if(Y("{"))return ne();if(e=g.type,i=g,e===t.Identifier)r=m.createIdentifier(U().value);else if(e===t.StringLiteral||e===t.NumericLiteral)l&&g.octal&&q(g,a.StrictOctalLiteral),r=m.createLiteral(U());else if(e===t.Keyword){if(X("function"))return d=null,[],f=g,K("function"),Y("(")||(h=g,d=pe(),l?_(h.value)&&q(h,a.StrictFunctionName):_(h.value)?(s=h,u=a.StrictFunctionName):S(h.value)&&(s=h,u=a.StrictReservedWord)),p=(h=ve(s)).params,o=h.stricted,s=h.firstRestricted,h.message&&(u=h.message),h=l,c=Ae(),l&&s&&V(s,u),l&&o&&q(o,u),l=h,m.markEnd(m.createFunctionExpression(d,p,[],c),f);X("this")?(U(),r=m.createThisExpression()):G(U())}else e===t.BooleanLiteral?((n=U()).value="true"===n.value,r=m.createLiteral(n)):e===t.NullLiteral?((n=U()).value=null,r=m.createLiteral(n)):Y("/")||Y("/=")?(r=void 0!==v.tokens?m.createLiteral(R()):m.createLiteral(F()),z()):G(U());return m.markEnd(r,i)}function ie(){var e=[];if(W("("),!Y(")"))for(;h<p&&(e.push(he()),!Y(")"));)W(",");return W(")"),e}function oe(){return W("."),function(){var e,n=g,r=U();return(e=r).type!==t.Identifier&&e.type!==t.Keyword&&e.type!==t.BooleanLiteral&&e.type!==t.NullLiteral&&G(r),m.markEnd(m.createIdentifier(r.value),n)}()}function ae(){var e;return W("["),e=fe(),W("]"),e}function se(){var e,t,n=g;return K("new"),e=function(){var e,t,n,r;for(r=g,e=A.allowIn,t=(X("new")?se:re)(),A.allowIn=e;Y(".")||Y("[");)t=Y("[")?(n=ae(),m.createMemberExpression("[",t,n)):(n=oe(),m.createMemberExpression(".",t,n)),m.markEnd(t,r);return t}(),t=Y("(")?ie():[],m.markEnd(m.createNewExpression(e,t),n)}function ue(){var e,n=g,r=function(){var e,t,n,r=g,i=A.allowIn;for(A.allowIn=!0,e=(X("new")?se:re)(),A.allowIn=i;;){if(Y("."))n=oe(),e=m.createMemberExpression(".",e,n);else if(Y("("))t=ie(),e=m.createCallExpression(e,t);else{if(!Y("["))break;n=ae(),e=m.createMemberExpression("[",e,n)}m.markEnd(e,r)}return e}();return g.type!==t.Punctuator||!Y("++")&&!Y("--")||Q()||(l&&r.type===i.Identifier&&_(r.name)&&q({},a.StrictLHSPostfix),Z(r)||q({},a.InvalidLHSInAssignment),e=U(),r=m.markEnd(m.createPostfixExpression(e.value,r),n)),r}function ce(){var e,n,r;return g.type!==t.Punctuator&&g.type!==t.Keyword?n=ue():Y("++")||Y("--")?(r=g,e=U(),n=ce(),l&&n.type===i.Identifier&&_(n.name)&&q({},a.StrictLHSPrefix),Z(n)||q({},a.InvalidLHSInAssignment),n=m.createUnaryExpression(e.value,n),n=m.markEnd(n,r)):Y("+")||Y("-")||Y("~")||Y("!")?(r=g,e=U(),n=ce(),n=m.createUnaryExpression(e.value,n),n=m.markEnd(n,r)):X("delete")||X("void")||X("typeof")?(r=g,e=U(),n=ce(),n=m.createUnaryExpression(e.value,n),n=m.markEnd(n,r),l&&"delete"===n.operator&&n.argument.type===i.Identifier&&q({},a.StrictDelete)):n=ue(),n}function le(e,n){var r=0;if(e.type!==t.Punctuator&&e.type!==t.Keyword)return 0;switch(e.value){case"||":r=1;break;case"&&":r=2;break;case"|":r=3;break;case"^":r=4;break;case"&":r=5;break;case"==":case"!=":case"===":case"!==":r=6;break;case"<":case">":case"<=":case">=":case"instanceof":r=7;break;case"in":r=n?7:0;break;case"<<":case">>":case">>>":r=8;break;case"+":case"-":r=9;break;case"*":case"/":case"%":r=11}return r}function he(){var e,n,r=g,o=g,s=e=function(){var e,t,n=g,r=function(){var e,t,n,r,i,o,a=g,s=ce(),u=g,c=le(u,A.allowIn);if(0===c)return s;for(u.prec=c,U(),e=[a,g],n=[s,u,ce()];0<(c=le(g,A.allowIn));){for(;2<n.length&&c<=n[n.length-2].prec;)r=n.pop(),i=n.pop().value,s=n.pop(),t=m.createBinaryExpression(i,s,r),e.pop(),a=e[e.length-1],m.markEnd(t,a),n.push(t);(u=U()).prec=c,n.push(u),e.push(g),t=ce(),n.push(t)}for(t=n[o=n.length-1],e.pop();1<o;)t=m.createBinaryExpression(n[o-1].value,n[o-2],t),o-=2,a=e.pop(),m.markEnd(t,a);return t}();return Y("?")&&(U(),t=A.allowIn,A.allowIn=!0,e=he(),A.allowIn=t,W(":"),t=he(),r=m.createConditionalExpression(r,e,t),m.markEnd(r,n)),r}();return g.type!==t.Punctuator||"="!==(n=g.value)&&"*="!==n&&"/="!==n&&"%="!==n&&"+="!==n&&"-="!==n&&"<<="!==n&&">>="!==n&&">>>="!==n&&"&="!==n&&"^="!==n&&"|="!==n||(Z(e)||q({},a.InvalidLHSInAssignment),l&&e.type===i.Identifier&&_(e.name)&&q(r,a.StrictLHSAssignment),r=U(),n=he(),s=m.markEnd(m.createAssignmentExpression(r.value,e,n),o)),s}function fe(){var e=g,t=he();if(Y(",")){for(t=m.createSequenceExpression([t]);h<p&&Y(",");)U(),t.expressions.push(he());m.markEnd(t,e)}return t}function de(){var e,t=g;return W("{"),e=function(){for(var e,t=[];h<p&&!Y("}")&&void 0!==(e=ye());)t.push(e);return t}(),W("}"),m.markEnd(m.createBlockStatement(e),t)}function pe(){var e=g,n=U();return n.type!==t.Identifier&&G(n),m.markEnd(m.createIdentifier(n.value),e)}function me(e){var t,n,r,i,o=[];do{if(o.push((t=e,n=void 0,n=null,r=g,i=pe(),l&&_(i.name)&&q({},a.StrictVarName),"const"===t?(W("="),n=he()):Y("=")&&(U(),n=he()),m.markEnd(m.createVariableDeclarator(i,n),r))),!Y(","))break}while(U(),h<p);return o}function ge(){var e,n,r,o,s,u,f,d,v,b,y,w,x=g.type;if(x===t.EOF&&G(g),x===t.Punctuator&&"{"===g.value)return de();if(r=g,x===t.Punctuator)switch(g.value){case";":return m.markEnd((W(";"),m.createEmptyStatement()),r);case"(":return m.markEnd((o=fe(),J(),m.createExpressionStatement(o)),r)}if(x===t.Keyword)switch(g.value){case"break":return m.markEnd((w=null,K("break"),59===c.charCodeAt(h)?(U(),A.inIteration||A.inSwitch||V({},a.IllegalBreak),m.createBreakStatement(null)):Q()?(A.inIteration||A.inSwitch||V({},a.IllegalBreak),m.createBreakStatement(null)):(g.type===t.Identifier&&(y="$"+(w=pe()).name,Object.prototype.hasOwnProperty.call(A.labelSet,y)||V({},a.UnknownLabel,w.name)),J(),null!==w||A.inIteration||A.inSwitch||V({},a.IllegalBreak),m.createBreakStatement(w))),r);case"continue":return m.markEnd((y=null,K("continue"),59===c.charCodeAt(h)?(U(),A.inIteration||V({},a.IllegalContinue),m.createContinueStatement(null)):Q()?(A.inIteration||V({},a.IllegalContinue),m.createContinueStatement(null)):(g.type===t.Identifier&&(w="$"+(y=pe()).name,Object.prototype.hasOwnProperty.call(A.labelSet,w)||V({},a.UnknownLabel,y.name)),J(),null!==y||A.inIteration||V({},a.IllegalContinue),m.createContinueStatement(y))),r);case"debugger":return m.markEnd((K("debugger"),J(),m.createDebuggerStatement()),r);case"do":return m.markEnd((K("do"),b=A.inIteration,A.inIteration=!0,v=ge(),A.inIteration=b,K("while"),W("("),b=fe(),W(")"),Y(";")&&U(),m.createDoWhileStatement(v,b)),r);case"for":return m.markEnd(function(){var e,t,n,r,i,o,s,u=e=t=null;return K("for"),W("("),Y(";")?U():(X("var")||X("let")?(A.allowIn=!1,i=g,o=U(),s=me(),u=m.markEnd(m.createVariableDeclaration(s,o.value),i),A.allowIn=!0,1===u.declarations.length&&X("in")&&(U(),n=u,r=fe(),u=null)):(A.allowIn=!1,u=fe(),A.allowIn=!0,X("in")&&(Z(u)||q({},a.InvalidLHSInForIn),U(),n=u,r=fe(),u=null)),void 0===n&&W(";")),void 0===n&&(Y(";")||(e=fe()),W(";"),Y(")")||(t=fe())),W(")"),s=A.inIteration,A.inIteration=!0,o=ge(),A.inIteration=s,void 0===n?m.createForStatement(u,e,t,o):m.createForInStatement(n,r,o)}(),r);case"function":return m.markEnd(be(),r);case"if":return m.markEnd((K("if"),W("("),v=fe(),W(")"),b=ge(),d=X("else")?(U(),ge()):null,m.createIfStatement(v,b,d)),r);case"return":return m.markEnd(function(){var e=null;if(K("return"),A.inFunctionBody||q({},a.IllegalReturn),32===c.charCodeAt(h)&&k(c.charCodeAt(h+1)))e=fe();else{if(Q())return m.createReturnStatement(null);Y(";")||Y("}")||g.type===t.EOF||(e=fe())}return J(),m.createReturnStatement(e)}(),r);case"switch":return m.markEnd(function(){var e,t,n,r,i;if(K("switch"),W("("),e=fe(),W(")"),W("{"),t=[],Y("}"))U();else{for(r=A.inSwitch,i=!(A.inSwitch=!0);h<p&&!Y("}");)null===(n=function(){var e,t=[],n=g,r=X("default")?(U(),null):(K("case"),fe());for(W(":");h<p&&!(Y("}")||X("default")||X("case"));)e=ge(),t.push(e);return m.markEnd(m.createSwitchCase(r,t),n)}()).test&&(i&&V({},a.MultipleDefaultsInSwitch),i=!0),t.push(n);A.inSwitch=r,W("}")}return m.createSwitchStatement(e,t)}(),r);case"throw":return m.markEnd((K("throw"),Q()&&V({},a.NewlineAfterThrow),d=fe(),J(),m.createThrowStatement(d)),r);case"try":return m.markEnd(function(){var e,t,n,r,i=[],o=null;return K("try"),e=de(),X("catch")&&i.push((r=g,K("catch"),W("("),Y(")")&&G(g),t=pe(),l&&_(t.name)&&q({},a.StrictCatchVariable),W(")"),n=de(),m.markEnd(m.createCatchClause(t,n),r))),X("finally")&&(U(),o=de()),0!==i.length||o||V({},a.NoCatchOrFinally),m.createTryStatement(e,[],i,o)}(),r);case"var":return m.markEnd((K("var"),f=me(),J(),m.createVariableDeclaration(f,"var")),r);case"while":return m.markEnd((K("while"),W("("),f=fe(),W(")"),u=A.inIteration,A.inIteration=!0,s=ge(),A.inIteration=u,m.createWhileStatement(f,s)),r);case"with":return m.markEnd((l&&(D(),q({},a.StrictModeWith)),K("with"),W("("),u=fe(),W(")"),s=ge(),m.createWithStatement(u,s)),r)}return(x=fe()).type===i.Identifier&&Y(":")?(U(),n="$"+x.name,Object.prototype.hasOwnProperty.call(A.labelSet,n)&&V({},a.Redeclaration,"Label",x.name),A.labelSet[n]=!0,e=ge(),delete A.labelSet[n],m.markEnd(m.createLabeledStatement(x,e),r)):(J(),m.markEnd(m.createExpressionStatement(x),r))}function Ae(){var e,n,r,o,s,u,f,d=[],v=g;for(W("{");h<p&&g.type===t.StringLiteral&&(n=g,e=ye(),d.push(e),e.expression.type===i.Literal);)"use strict"===c.slice(n.start+1,n.end-1)?(l=!0,r&&q(r,a.StrictOctalLiteral)):!r&&n.octal&&(r=n);for(o=A.labelSet,s=A.inIteration,u=A.inSwitch,f=A.inFunctionBody,A.labelSet={},A.inIteration=!1,A.inSwitch=!1,A.inFunctionBody=!0;h<p&&!Y("}")&&void 0!==(e=ye());)d.push(e);return W("}"),A.labelSet=o,A.inIteration=s,A.inSwitch=u,A.inFunctionBody=f,m.markEnd(m.createBlockStatement(d),v)}function ve(e){var t,n,r,i,o,s,u=[];if(W("("),!Y(")"))for(i={};h<p&&(n=g,t=pe(),o="$"+n.value,l?(_(n.value)&&(r=n,s=a.StrictParamName),Object.prototype.hasOwnProperty.call(i,o)&&(r=n,s=a.StrictParamDupe)):e||(_(n.value)?(e=n,s=a.StrictParamName):S(n.value)?(e=n,s=a.StrictReservedWord):Object.prototype.hasOwnProperty.call(i,o)&&(e=n,s=a.StrictParamDupe)),u.push(t),i[o]=!0,!Y(")"));)W(",");return W(")"),{params:u,stricted:r,firstRestricted:e,message:s}}function be(){var e,t,n,r,i,o,s,u=g;return K("function"),s=g,e=pe(),l?_(s.value)&&q(s,a.StrictFunctionName):_(s.value)?(i=s,o=a.StrictFunctionName):S(s.value)&&(i=s,o=a.StrictReservedWord),t=(s=ve(i)).params,r=s.stricted,i=s.firstRestricted,s.message&&(o=s.message),s=l,n=Ae(),l&&i&&V(i,o),l&&r&&q(r,o),l=s,m.markEnd(m.createFunctionDeclaration(e,t,[],n),u)}function ye(){if(g.type===t.Keyword)switch(g.value){case"const":case"let":return e=g.value,r=g,K(e),n=me(e),J(),m.markEnd(m.createVariableDeclaration(n,e),r);case"function":return be();default:return ge()}var e,n,r;if(g.type!==t.EOF)return ge()}function we(){for(var e,t,n=[],r=0;r<v.tokens.length;++r)t={type:(e=v.tokens[r]).type,value:e.value},v.range&&(t.range=e.range),v.loc&&(t.loc=e.loc),n.push(t);v.tokens=n}(n={})[(t={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8,RegularExpression:9}).BooleanLiteral]="Boolean",n[t.EOF]="<end>",n[t.Identifier]="Identifier",n[t.Keyword]="Keyword",n[t.NullLiteral]="Null",n[t.NumericLiteral]="Numeric",n[t.Punctuator]="Punctuator",n[t.StringLiteral]="String",n[t.RegularExpression]="RegularExpression",r=["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="],i={AssignmentExpression:"AssignmentExpression",ArrayExpression:"ArrayExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",Program:"Program",Property:"Property",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement"},o={Data:1,Get:2,Set:4},a={UnexpectedToken:"Unexpected token %0",UnexpectedNumber:"Unexpected number",UnexpectedString:"Unexpected string",UnexpectedIdentifier:"Unexpected identifier",UnexpectedReserved:"Unexpected reserved word",UnexpectedEOS:"Unexpected end of input",NewlineAfterThrow:"Illegal newline after throw",InvalidRegExp:"Invalid regular expression",UnterminatedRegExp:"Invalid regular expression: missing /",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NoCatchOrFinally:"Missing catch or finally after try",UnknownLabel:"Undefined label '%0'",Redeclaration:"%0 '%1' has already been declared",IllegalContinue:"Illegal continue statement",IllegalBreak:"Illegal break statement",IllegalReturn:"Illegal return statement",StrictModeWith:"Strict mode code may not include a with statement",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictDuplicateProperty:"Duplicate data property in object literal not allowed in strict mode",AccessorDataProperty:"Object literal may not have data and accessor property with the same name",AccessorGetSet:"Object literal may not have multiple get/set accessors with the same name",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictReservedWord:"Use of future reserved word in strict mode"},s={NonAsciiIdentifierStart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ﬀ-ﬆﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼＡ-Ｚａ-ｚｦ-ﾾￂ-ￇￊ-ￏￒ-ￗￚ-ￜ]"),NonAsciiIdentifierPart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԧԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠࢢ-ࢬࣤ-ࣾऀ-ॣ०-९ॱ-ॷॹ-ॿঁ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఁ-ఃఅ-ఌఎ-ఐఒ-నప-ళవ-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤜᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶᴀ-ᷦ᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚗꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺꩻꪀ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ﬀ-ﬆﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︦︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ０-９Ａ-Ｚ＿ａ-ｚｦ-ﾾￂ-ￇￊ-ￏￒ-ￗￚ-ￜ]")},u={name:"SyntaxTree",processComment:function(e){var t,n;if(!(e.type===i.Program&&0<e.body.length)){for(0<v.trailingComments.length?v.trailingComments[0].range[0]>=e.range[1]?(n=v.trailingComments,v.trailingComments=[]):v.trailingComments.length=0:0<v.bottomRightStack.length&&v.bottomRightStack[v.bottomRightStack.length-1].trailingComments&&v.bottomRightStack[v.bottomRightStack.length-1].trailingComments[0].range[0]>=e.range[1]&&(n=v.bottomRightStack[v.bottomRightStack.length-1].trailingComments,delete v.bottomRightStack[v.bottomRightStack.length-1].trailingComments);0<v.bottomRightStack.length&&v.bottomRightStack[v.bottomRightStack.length-1].range[0]>=e.range[0];)t=v.bottomRightStack.pop();t?t.leadingComments&&t.leadingComments[t.leadingComments.length-1].range[1]<=e.range[0]&&(e.leadingComments=t.leadingComments,delete t.leadingComments):0<v.leadingComments.length&&v.leadingComments[v.leadingComments.length-1].range[1]<=e.range[0]&&(e.leadingComments=v.leadingComments,v.leadingComments=[]),n&&(e.trailingComments=n),v.bottomRightStack.push(e)}},markEnd:function(e,t){return v.range&&(e.range=[t.start,h]),v.loc&&(e.loc=new $(void 0===t.startLineNumber?t.lineNumber:t.startLineNumber,t.start-(void 0===t.startLineStart?t.lineStart:t.startLineStart),f,h-d),this.postProcess(e)),v.attachComment&&this.processComment(e),e},postProcess:function(e){return v.source&&(e.loc.source=v.source),e},createArrayExpression:function(e){return{type:i.ArrayExpression,elements:e}},createAssignmentExpression:function(e,t,n){return{type:i.AssignmentExpression,operator:e,left:t,right:n}},createBinaryExpression:function(e,t,n){return{type:"||"===e||"&&"===e?i.LogicalExpression:i.BinaryExpression,operator:e,left:t,right:n}},createBlockStatement:function(e){return{type:i.BlockStatement,body:e}},createBreakStatement:function(e){return{type:i.BreakStatement,label:e}},createCallExpression:function(e,t){return{type:i.CallExpression,callee:e,arguments:t}},createCatchClause:function(e,t){return{type:i.CatchClause,param:e,body:t}},createConditionalExpression:function(e,t,n){return{type:i.ConditionalExpression,test:e,consequent:t,alternate:n}},createContinueStatement:function(e){return{type:i.ContinueStatement,label:e}},createDebuggerStatement:function(){return{type:i.DebuggerStatement}},createDoWhileStatement:function(e,t){return{type:i.DoWhileStatement,body:e,test:t}},createEmptyStatement:function(){return{type:i.EmptyStatement}},createExpressionStatement:function(e){return{type:i.ExpressionStatement,expression:e}},createForStatement:function(e,t,n,r){return{type:i.ForStatement,init:e,test:t,update:n,body:r}},createForInStatement:function(e,t,n){return{type:i.ForInStatement,left:e,right:t,body:n,each:!1}},createFunctionDeclaration:function(e,t,n,r){return{type:i.FunctionDeclaration,id:e,params:t,defaults:n,body:r,rest:null,generator:!1,expression:!1}},createFunctionExpression:function(e,t,n,r){return{type:i.FunctionExpression,id:e,params:t,defaults:n,body:r,rest:null,generator:!1,expression:!1}},createIdentifier:function(e){return{type:i.Identifier,name:e}},createIfStatement:function(e,t,n){return{type:i.IfStatement,test:e,consequent:t,alternate:n}},createLabeledStatement:function(e,t){return{type:i.LabeledStatement,label:e,body:t}},createLiteral:function(e){return{type:i.Literal,value:e.value,raw:c.slice(e.start,e.end)}},createMemberExpression:function(e,t,n){return{type:i.MemberExpression,computed:"["===e,object:t,property:n}},createNewExpression:function(e,t){return{type:i.NewExpression,callee:e,arguments:t}},createObjectExpression:function(e){return{type:i.ObjectExpression,properties:e}},createPostfixExpression:function(e,t){return{type:i.UpdateExpression,operator:e,argument:t,prefix:!1}},createProgram:function(e){return{type:i.Program,body:e}},createProperty:function(e,t,n){return{type:i.Property,key:t,value:n,kind:e}},createReturnStatement:function(e){return{type:i.ReturnStatement,argument:e}},createSequenceExpression:function(e){return{type:i.SequenceExpression,expressions:e}},createSwitchCase:function(e,t){return{type:i.SwitchCase,test:e,consequent:t}},createSwitchStatement:function(e,t){return{type:i.SwitchStatement,discriminant:e,cases:t}},createThisExpression:function(){return{type:i.ThisExpression}},createThrowStatement:function(e){return{type:i.ThrowStatement,argument:e}},createTryStatement:function(e,t,n,r){return{type:i.TryStatement,block:e,guardedHandlers:t,handlers:n,finalizer:r}},createUnaryExpression:function(e,t){return"++"===e||"--"===e?{type:i.UpdateExpression,operator:e,argument:t,prefix:!0}:{type:i.UnaryExpression,operator:e,argument:t,prefix:!0}},createVariableDeclaration:function(e,t){return{type:i.VariableDeclaration,declarations:e,kind:t}},createVariableDeclarator:function(e,t){return{type:i.VariableDeclarator,id:e,init:t}},createWhileStatement:function(e,t){return{type:i.WhileStatement,test:e,body:t}},createWithStatement:function(e,t){return{type:i.WithStatement,object:e,body:t}}},e.version="1.2.2",e.tokenize=function(e,n){var r;"string"==typeof e||e instanceof String||(e=String(e)),m=u,f=(h=0)<(c=e).length?1:0,d=0,p=c.length,A={allowIn:!(g=null),labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1},v={},(n=n||{}).tokens=!0,v.tokens=[],v.tokenize=!0,v.openParenToken=-1,v.openCurlyToken=-1,v.range="boolean"==typeof n.range&&n.range,v.loc="boolean"==typeof n.loc&&n.loc,"boolean"==typeof n.comment&&n.comment&&(v.comments=[]),"boolean"==typeof n.tolerant&&n.tolerant&&(v.errors=[]);try{if(z(),g.type===t.EOF)return v.tokens;for(U();g.type!==t.EOF;)try{U()}catch(e){if(v.errors){v.errors.push(e);break}throw e}we(),r=v.tokens,void 0!==v.comments&&(r.comments=v.comments),void 0!==v.errors&&(r.errors=v.errors)}catch(e){throw e}finally{v={}}return r},e.parse=function(e,n){var r,o=String;"string"==typeof e||e instanceof String||(e=o(e)),m=u,f=(h=0)<(c=e).length?1:0,d=0,p=c.length,A={allowIn:!(g=null),labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1},v={},void 0!==n&&(v.range="boolean"==typeof n.range&&n.range,v.loc="boolean"==typeof n.loc&&n.loc,v.attachComment="boolean"==typeof n.attachComment&&n.attachComment,v.loc&&null!==n.source&&void 0!==n.source&&(v.source=o(n.source)),"boolean"==typeof n.tokens&&n.tokens&&(v.tokens=[]),"boolean"==typeof n.comment&&n.comment&&(v.comments=[]),"boolean"==typeof n.tolerant&&n.tolerant&&(v.errors=[]),v.attachComment&&(v.range=!0,v.comments=[],v.bottomRightStack=[],v.trailingComments=[],v.leadingComments=[]));try{r=function(){var e,n;return D(),z(),n=g,l=!1,e=function(){for(var e,n,r,o=[];h<p&&(n=g).type===t.StringLiteral&&(e=ye(),o.push(e),e.expression.type===i.Literal);)"use strict"===c.slice(n.start+1,n.end-1)?(l=!0,r&&q(r,a.StrictOctalLiteral)):!r&&n.octal&&(r=n);for(;h<p&&void 0!==(e=ye());)o.push(e);return o}(),m.markEnd(m.createProgram(e),n)}(),void 0!==v.comments&&(r.comments=v.comments),void 0!==v.tokens&&(we(),r.tokens=v.tokens),void 0!==v.errors&&(r.errors=v.errors)}catch(e){throw e}finally{v={}}return r},e.Syntax=function(){var e,t={};for(e in"function"==typeof Object.create&&(t=Object.create(null)),i)i.hasOwnProperty(e)&&(t[e]=i[e]);return"function"==typeof Object.freeze&&Object.freeze(t),t}()}(void 0!==n?n:e.esprima={})}(this)},{}],1:[function(e,t,n){(function(r){o={initialize:function(){this._nodes=[],this._node={},this._stash=[]},set:function(e){for(var t in e)this._node[t]=e[t];return this._node},node:function(e){return arguments.length&&(this._node=e),this._node},push:function(){this._nodes.push(this._node),this._node={}},unshift:function(){this._nodes.unshift(this._node),this._node={}},yield:function(){var e=this._nodes;return this.initialize(),e}},(i={trace:function(){},yy:{},symbols_:{error:2,JSON_PATH:3,DOLLAR:4,PATH_COMPONENTS:5,LEADING_CHILD_MEMBER_EXPRESSION:6,PATH_COMPONENT:7,MEMBER_COMPONENT:8,SUBSCRIPT_COMPONENT:9,CHILD_MEMBER_COMPONENT:10,DESCENDANT_MEMBER_COMPONENT:11,DOT:12,MEMBER_EXPRESSION:13,DOT_DOT:14,STAR:15,IDENTIFIER:16,SCRIPT_EXPRESSION:17,INTEGER:18,END:19,CHILD_SUBSCRIPT_COMPONENT:20,DESCENDANT_SUBSCRIPT_COMPONENT:21,"[":22,SUBSCRIPT:23,"]":24,SUBSCRIPT_EXPRESSION:25,SUBSCRIPT_EXPRESSION_LIST:26,SUBSCRIPT_EXPRESSION_LISTABLE:27,",":28,STRING_LITERAL:29,ARRAY_SLICE:30,FILTER_EXPRESSION:31,QQ_STRING:32,Q_STRING:33,$accept:0,$end:1},terminals_:{2:"error",4:"DOLLAR",12:"DOT",14:"DOT_DOT",15:"STAR",16:"IDENTIFIER",17:"SCRIPT_EXPRESSION",18:"INTEGER",19:"END",22:"[",24:"]",28:",",30:"ARRAY_SLICE",31:"FILTER_EXPRESSION",32:"QQ_STRING",33:"Q_STRING"},productions_:[0,[3,1],[3,2],[3,1],[3,2],[5,1],[5,2],[7,1],[7,1],[8,1],[8,1],[10,2],[6,1],[11,2],[13,1],[13,1],[13,1],[13,1],[13,1],[9,1],[9,1],[20,3],[21,4],[23,1],[23,1],[26,1],[26,3],[27,1],[27,1],[27,1],[25,1],[25,1],[25,1],[29,1],[29,1]],performAction:function(e,t,n,r,i,a,s){r.ast||(r.ast=o).initialize();var u=a.length-1;switch(i){case 1:return r.ast.set({expression:{type:"root",value:a[u]}}),r.ast.unshift(),r.ast.yield();case 2:return r.ast.set({expression:{type:"root",value:a[u-1]}}),r.ast.unshift(),r.ast.yield();case 3:return r.ast.unshift(),r.ast.yield();case 4:return r.ast.set({operation:"member",scope:"child",expression:{type:"identifier",value:a[u-1]}}),r.ast.unshift(),r.ast.yield();case 5:case 6:break;case 7:r.ast.set({operation:"member"}),r.ast.push();break;case 8:r.ast.set({operation:"subscript"}),r.ast.push();break;case 9:r.ast.set({scope:"child"});break;case 10:r.ast.set({scope:"descendant"});break;case 11:break;case 12:r.ast.set({scope:"child",operation:"member"});break;case 13:break;case 14:r.ast.set({expression:{type:"wildcard",value:a[u]}});break;case 15:r.ast.set({expression:{type:"identifier",value:a[u]}});break;case 16:r.ast.set({expression:{type:"script_expression",value:a[u]}});break;case 17:r.ast.set({expression:{type:"numeric_literal",value:parseInt(a[u])}});break;case 18:break;case 19:r.ast.set({scope:"child"});break;case 20:r.ast.set({scope:"descendant"});break;case 21:case 22:case 23:break;case 24:1<a[u].length?r.ast.set({expression:{type:"union",value:a[u]}}):this.$=a[u];break;case 25:this.$=[a[u]];break;case 26:this.$=a[u-2].concat(a[u]);break;case 27:this.$={expression:{type:"numeric_literal",value:parseInt(a[u])}},r.ast.set(this.$);break;case 28:this.$={expression:{type:"string_literal",value:a[u]}},r.ast.set(this.$);break;case 29:this.$={expression:{type:"slice",value:a[u]}},r.ast.set(this.$);break;case 30:this.$={expression:{type:"wildcard",value:a[u]}},r.ast.set(this.$);break;case 31:this.$={expression:{type:"script_expression",value:a[u]}},r.ast.set(this.$);break;case 32:this.$={expression:{type:"filter_expression",value:a[u]}},r.ast.set(this.$);break;case 33:case 34:this.$=a[u]}},table:[{3:1,4:[1,2],6:3,13:4,15:[1,5],16:[1,6],17:[1,7],18:[1,8],19:[1,9]},{1:[3]},{1:[2,1],5:10,7:11,8:12,9:13,10:14,11:15,12:[1,18],14:[1,19],20:16,21:17,22:[1,20]},{1:[2,3],5:21,7:11,8:12,9:13,10:14,11:15,12:[1,18],14:[1,19],20:16,21:17,22:[1,20]},{1:[2,12],12:[2,12],14:[2,12],22:[2,12]},{1:[2,14],12:[2,14],14:[2,14],22:[2,14]},{1:[2,15],12:[2,15],14:[2,15],22:[2,15]},{1:[2,16],12:[2,16],14:[2,16],22:[2,16]},{1:[2,17],12:[2,17],14:[2,17],22:[2,17]},{1:[2,18],12:[2,18],14:[2,18],22:[2,18]},{1:[2,2],7:22,8:12,9:13,10:14,11:15,12:[1,18],14:[1,19],20:16,21:17,22:[1,20]},{1:[2,5],12:[2,5],14:[2,5],22:[2,5]},{1:[2,7],12:[2,7],14:[2,7],22:[2,7]},{1:[2,8],12:[2,8],14:[2,8],22:[2,8]},{1:[2,9],12:[2,9],14:[2,9],22:[2,9]},{1:[2,10],12:[2,10],14:[2,10],22:[2,10]},{1:[2,19],12:[2,19],14:[2,19],22:[2,19]},{1:[2,20],12:[2,20],14:[2,20],22:[2,20]},{13:23,15:[1,5],16:[1,6],17:[1,7],18:[1,8],19:[1,9]},{13:24,15:[1,5],16:[1,6],17:[1,7],18:[1,8],19:[1,9],22:[1,25]},{15:[1,29],17:[1,30],18:[1,33],23:26,25:27,26:28,27:32,29:34,30:[1,35],31:[1,31],32:[1,36],33:[1,37]},{1:[2,4],7:22,8:12,9:13,10:14,11:15,12:[1,18],14:[1,19],20:16,21:17,22:[1,20]},{1:[2,6],12:[2,6],14:[2,6],22:[2,6]},{1:[2,11],12:[2,11],14:[2,11],22:[2,11]},{1:[2,13],12:[2,13],14:[2,13],22:[2,13]},{15:[1,29],17:[1,30],18:[1,33],23:38,25:27,26:28,27:32,29:34,30:[1,35],31:[1,31],32:[1,36],33:[1,37]},{24:[1,39]},{24:[2,23]},{24:[2,24],28:[1,40]},{24:[2,30]},{24:[2,31]},{24:[2,32]},{24:[2,25],28:[2,25]},{24:[2,27],28:[2,27]},{24:[2,28],28:[2,28]},{24:[2,29],28:[2,29]},{24:[2,33],28:[2,33]},{24:[2,34],28:[2,34]},{24:[1,41]},{1:[2,21],12:[2,21],14:[2,21],22:[2,21]},{18:[1,33],27:42,29:34,30:[1,35],32:[1,36],33:[1,37]},{1:[2,22],12:[2,22],14:[2,22],22:[2,22]},{24:[2,26],28:[2,26]}],defaultActions:{27:[2,23],29:[2,30],30:[2,31],31:[2,32]},parseError:function(e,t){if(!t.recoverable)throw new Error(e);this.trace(e)},parse:function(e){var t=this,n=[0],r=[null],i=[],o=this.table,a="",s=0,u=0,c=0,l=1,h=i.slice.call(arguments,1),f=(this.lexer.setInput(e),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,void 0===(this.yy.parser=this).lexer.yylloc&&(this.lexer.yylloc={}),this.lexer.yylloc),d=(i.push(f),this.lexer.options&&this.lexer.options.ranges);"function"==typeof this.yy.parseError?this.parseError=this.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var p,m,g,A,v,b,y,w={};;){if(g=n[n.length-1],void 0===(A=this.defaultActions[g]||(null==p&&(x=void 0,p=x="number"!=typeof(x=t.lexer.lex()||l)&&t.symbols_[x]||x),o[g]&&o[g][p]))||!A.length||!A[0]){var x="",C=[];for(v in o[g])this.terminals_[v]&&2<v&&C.push("'"+this.terminals_[v]+"'");x=this.lexer.showPosition?"Parse error on line "+(s+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+C.join(", ")+", got '"+(this.terminals_[p]||p)+"'":"Parse error on line "+(s+1)+": Unexpected "+(p==l?"end of input":"'"+(this.terminals_[p]||p)+"'"),this.parseError(x,{text:this.lexer.match,token:this.terminals_[p]||p,line:this.lexer.yylineno,loc:f,expected:C})}if(A[0]instanceof Array&&1<A.length)throw new Error("Parse Error: multiple actions possible at state: "+g+", token: "+p);switch(A[0]){case 1:n.push(p),r.push(this.lexer.yytext),i.push(this.lexer.yylloc),n.push(A[1]),p=null,m?(p=m,m=null):(u=this.lexer.yyleng,a=this.lexer.yytext,s=this.lexer.yylineno,f=this.lexer.yylloc,0<c&&c--);break;case 2:if(b=this.productions_[A[1]][1],w.$=r[r.length-b],w._$={first_line:i[i.length-(b||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(b||1)].first_column,last_column:i[i.length-1].last_column},d&&(w._$.range=[i[i.length-(b||1)].range[0],i[i.length-1].range[1]]),void 0!==(y=this.performAction.apply(w,[a,u,s,this.yy,A[1],r,i].concat(h))))return y;b&&(n=n.slice(0,-1*b*2),r=r.slice(0,-1*b),i=i.slice(0,-1*b)),n.push(this.productions_[A[1]][0]),r.push(w.$),i.push(w._$),y=o[n[n.length-2]][n[n.length-1]],n.push(y);break;case 3:return!0}}return!0}}).lexer={EOF:1,parseError:function(e,t){if(!this.yy.parser)throw new Error(e);this.yy.parser.parseError(e,t)},setInput:function(e){return this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},unput:function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g),r=(e=(this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t-1),this.offset-=t,this.match.split(/(?:\r\n?|\n)/g)),this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===e.length?this.yylloc.first_column:0)+e[e.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(e){this.unput(this.match.slice(e))},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(20<e.length?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(20<e.length?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},test_match:function(e,t){var n,r;if(this.options.backtrack_lexer&&(r={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(r.yylloc.range=this.yylloc.range.slice(0))),(n=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack)for(var i in r)this[i]=r[i];return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var e,t,n,r,i=this._currentRules(),o=0;o<i.length;o++)if((n=this._input.match(this.rules[i[o]]))&&(!t||n[0].length>t[0].length))if(t=n,r=o,this.options.backtrack_lexer){if(!1!==(e=this.test_match(n,i[o])))return e;if(!this._backtrack)return!1;t=!1}else if(!this.options.flex)break;return t?!1!==(e=this.test_match(t,i[r]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},topState:function(e){return 0<=(e=this.conditionStack.length-1-Math.abs(e||0))?this.conditionStack[e]:"INITIAL"},pushState:function(e){this.begin(e)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(e,t,n,r){switch(n){case 0:return 4;case 1:return 14;case 2:return 12;case 3:return 15;case 4:return 16;case 5:return 22;case 6:return 24;case 7:return 28;case 8:return 30;case 9:return 18;case 10:return t.yytext=t.yytext.substr(1,t.yyleng-2),32;case 11:return t.yytext=t.yytext.substr(1,t.yyleng-2),33;case 12:return 17;case 13:return 31}},rules:[/^(?:\$)/,/^(?:\.\.)/,/^(?:\.)/,/^(?:\*)/,/^(?:[a-zA-Z_]+[a-zA-Z0-9_]*)/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?:((-?(?:0|[1-9][0-9]*)))?\:((-?(?:0|[1-9][0-9]*)))?(\:((-?(?:0|[1-9][0-9]*)))?)?)/,/^(?:(-?(?:0|[1-9][0-9]*)))/,/^(?:"(?:\\["bfnrt/\\]|\\u[a-fA-F0-9]{4}|[^"\\])*")/,/^(?:'(?:\\['bfnrt/\\]|\\u[a-fA-F0-9]{4}|[^'\\])*')/,/^(?:\(.+?\)(?=\]))/,/^(?:\?\(.+?\)(?=\]))/],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}};var i,o,a=new((s.prototype=i).Parser=s);function s(){this.yy={}}void 0!==e&&void 0!==n&&(n.parser=a,n.Parser=a.Parser,n.parse=function(){return a.parse.apply(a,arguments)},n.main=function(t){return t[1]||r.exit(1),t=e("fs").readFileSync(e("path").normalize(t[1]),"utf8"),n.parser.parse(t)},void 0!==t&&e.main===t&&n.main(r.argv.slice(1)))}).call(this,e("_process"))},{_process:14,fs:12,path:13}],2:[function(e,t,n){t.exports={identifier:"[a-zA-Z_]+[a-zA-Z0-9_]*",integer:"-?(?:0|[1-9][0-9]*)",qq_string:'"(?:\\\\["bfnrt/\\\\]|\\\\u[a-fA-F0-9]{4}|[^"\\\\])*"',q_string:"'(?:\\\\['bfnrt/\\\\]|\\\\u[a-fA-F0-9]{4}|[^'\\\\])*'"}},{}],3:[function(e,t,n){var r=e("./dict"),i=e("fs");r={lex:{macros:{esc:"\\\\",int:r.integer},rules:[["\\$","return 'DOLLAR'"],["\\.\\.","return 'DOT_DOT'"],["\\.","return 'DOT'"],["\\*","return 'STAR'"],[r.identifier,"return 'IDENTIFIER'"],["\\[","return '['"],["\\]","return ']'"],[",","return ','"],["({int})?\\:({int})?(\\:({int})?)?","return 'ARRAY_SLICE'"],["{int}","return 'INTEGER'"],[r.qq_string,"yytext = yytext.substr(1,yyleng-2); return 'QQ_STRING';"],[r.q_string,"yytext = yytext.substr(1,yyleng-2); return 'Q_STRING';"],["\\(.+?\\)(?=\\])","return 'SCRIPT_EXPRESSION'"],["\\?\\(.+?\\)(?=\\])","return 'FILTER_EXPRESSION'"]]},start:"JSON_PATH",bnf:{JSON_PATH:[["DOLLAR",'yy.ast.set({ expression: { type: "root", value: $1 } }); yy.ast.unshift(); return yy.ast.yield()'],["DOLLAR PATH_COMPONENTS",'yy.ast.set({ expression: { type: "root", value: $1 } }); yy.ast.unshift(); return yy.ast.yield()'],["LEADING_CHILD_MEMBER_EXPRESSION","yy.ast.unshift(); return yy.ast.yield()"],["LEADING_CHILD_MEMBER_EXPRESSION PATH_COMPONENTS",'yy.ast.set({ operation: "member", scope: "child", expression: { type: "identifier", value: $1 }}); yy.ast.unshift(); return yy.ast.yield()']],PATH_COMPONENTS:[["PATH_COMPONENT",""],["PATH_COMPONENTS PATH_COMPONENT",""]],PATH_COMPONENT:[["MEMBER_COMPONENT",'yy.ast.set({ operation: "member" }); yy.ast.push()'],["SUBSCRIPT_COMPONENT",'yy.ast.set({ operation: "subscript" }); yy.ast.push() ']],MEMBER_COMPONENT:[["CHILD_MEMBER_COMPONENT",'yy.ast.set({ scope: "child" })'],["DESCENDANT_MEMBER_COMPONENT",'yy.ast.set({ scope: "descendant" })']],CHILD_MEMBER_COMPONENT:[["DOT MEMBER_EXPRESSION",""]],LEADING_CHILD_MEMBER_EXPRESSION:[["MEMBER_EXPRESSION",'yy.ast.set({ scope: "child", operation: "member" })']],DESCENDANT_MEMBER_COMPONENT:[["DOT_DOT MEMBER_EXPRESSION",""]],MEMBER_EXPRESSION:[["STAR",'yy.ast.set({ expression: { type: "wildcard", value: $1 } })'],["IDENTIFIER",'yy.ast.set({ expression: { type: "identifier", value: $1 } })'],["SCRIPT_EXPRESSION",'yy.ast.set({ expression: { type: "script_expression", value: $1 } })'],["INTEGER",'yy.ast.set({ expression: { type: "numeric_literal", value: parseInt($1) } })'],["END",""]],SUBSCRIPT_COMPONENT:[["CHILD_SUBSCRIPT_COMPONENT",'yy.ast.set({ scope: "child" })'],["DESCENDANT_SUBSCRIPT_COMPONENT",'yy.ast.set({ scope: "descendant" })']],CHILD_SUBSCRIPT_COMPONENT:[["[ SUBSCRIPT ]",""]],DESCENDANT_SUBSCRIPT_COMPONENT:[["DOT_DOT [ SUBSCRIPT ]",""]],SUBSCRIPT:[["SUBSCRIPT_EXPRESSION",""],["SUBSCRIPT_EXPRESSION_LIST",'$1.length > 1? yy.ast.set({ expression: { type: "union", value: $1 } }) : $$ = $1']],SUBSCRIPT_EXPRESSION_LIST:[["SUBSCRIPT_EXPRESSION_LISTABLE","$$ = [$1]"],["SUBSCRIPT_EXPRESSION_LIST , SUBSCRIPT_EXPRESSION_LISTABLE","$$ = $1.concat($3)"]],SUBSCRIPT_EXPRESSION_LISTABLE:[["INTEGER",'$$ = { expression: { type: "numeric_literal", value: parseInt($1) } }; yy.ast.set($$)'],["STRING_LITERAL",'$$ = { expression: { type: "string_literal", value: $1 } }; yy.ast.set($$)'],["ARRAY_SLICE",'$$ = { expression: { type: "slice", value: $1 } }; yy.ast.set($$)']],SUBSCRIPT_EXPRESSION:[["STAR",'$$ = { expression: { type: "wildcard", value: $1 } }; yy.ast.set($$)'],["SCRIPT_EXPRESSION",'$$ = { expression: { type: "script_expression", value: $1 } }; yy.ast.set($$)'],["FILTER_EXPRESSION",'$$ = { expression: { type: "filter_expression", value: $1 } }; yy.ast.set($$)']],STRING_LITERAL:[["QQ_STRING","$$ = $1"],["Q_STRING","$$ = $1"]]}};i.readFileSync&&(r.moduleInclude=i.readFileSync(e.resolve("../include/module.js")),r.actionInclude=i.readFileSync(e.resolve("../include/action.js"))),t.exports=r},{"./dict":2,fs:12}],4:[function(e,t,n){function r(){return this.initialize.apply(this,arguments)}var i=e("./aesprim"),o=e("./slice"),a=e("static-eval"),s=e("underscore").uniq;function u(t,n,r){var o=e("./index");n=d(i.parse(n).body[0].expression,{"@":t.value}),r=r.replace(/\{\{\s*value\s*\}\}/g,n);return(n=o.nodes(t.value,r)).forEach((function(e){e.path=t.path.concat(e.path.slice(1))})),n}function c(e){return Array.isArray(e)}function l(e){return function(t,n,r,i){var o=t.value,a=(t=t.path,[]),s=function(t,o){var u;c(t)?(t.forEach((function(e,t){a.length>=i||r(t,e,n)&&a.push({path:o.concat(t),value:e})})),t.forEach((function(t,n){a.length>=i||e&&s(t,o.concat(n))}))):(u=t)&&!(u instanceof Array)&&u instanceof Object&&(this.keys(t).forEach((function(e){a.length>=i||r(e,t[e],n)&&a.push({path:o.concat(e),value:t[e]})})),this.keys(t).forEach((function(n){a.length>=i||e&&s(t[n],o.concat(n))})))}.bind(this);return s(o,t),a}}function h(e){return function(t,n,r){return this.descend(n,t.expression.value,e,r)}}function f(e){return function(t,n,r){return this.traverse(n,t.expression.value,e,r)}}function d(){try{return a.apply(this,arguments)}catch(e){}}function p(e){return e=e.filter((function(e){return e})),s(e,(function(e){return e.path.map((function(e){return String(e).replace("-","--")})).join("-")}))}function m(e){return(e=String(e)).match(/^-?[0-9]+$/)?parseInt(e):null}r.prototype.initialize=function(){this.traverse=l(!0),this.descend=l()},r.prototype.keys=Object.keys,r.prototype.resolve=function(e){e=[e.operation,e.scope,e.expression.type].join("-");var t=this._fns[e];if(t)return t.bind(this);throw new Error("couldn't resolve key: "+e)},r.prototype.register=function(e,t){if(!t instanceof Function)throw new Error("handler must be a function");this._fns[e]=t},(r.prototype._fns={"member-child-identifier":function(e,t){e=e.expression.value;var n=t.value;if(n instanceof Object&&e in n)return[{value:n[e],path:t.path.concat(e)}]},"member-descendant-identifier":f((function(e,t,n){return e==n})),"subscript-child-numeric_literal":h((function(e,t,n){return e===n})),"member-child-numeric_literal":h((function(e,t,n){return String(e)===String(n)})),"subscript-descendant-numeric_literal":f((function(e,t,n){return e===n})),"member-child-wildcard":h((function(){return!0})),"member-descendant-wildcard":f((function(){return!0})),"subscript-descendant-wildcard":f((function(){return!0})),"subscript-child-wildcard":h((function(){return!0})),"subscript-child-slice":function(e,t){var n;if(c(t.value))return e=e.expression.value.split(":").map(m),n=t.value.map((function(e,n){return{value:e,path:t.path.concat(n)}})),o.apply(null,[n].concat(e))},"subscript-child-union":function(e,t){var n=[];return e.expression.value.forEach((function(e){e={operation:"subscript",scope:"child",expression:e.expression},(e=this.resolve(e)(e,t))&&(n=n.concat(e))}),this),p(n)},"subscript-descendant-union":function(t,n,r){var i=e(".."),o=this,a=[];return i.nodes(n,"$..*").slice(1).forEach((function(e){a.length>=r||t.expression.value.forEach((function(t){t={operation:"subscript",scope:"child",expression:t.expression},t=o.resolve(t)(t,e),a=a.concat(t)}))})),p(a)},"subscript-child-filter_expression":function(e,t,n){e=e.expression.value.slice(2,-1);var r=i.parse(e).body[0].expression;return this.descend(t,null,(function(e,t){return d(r,{"@":t})}),n)},"subscript-descendant-filter_expression":function(e,t,n){e=e.expression.value.slice(2,-1);var r=i.parse(e).body[0].expression;return this.traverse(t,null,(function(e,t){return d(r,{"@":t})}),n)},"subscript-child-script_expression":function(e,t){return u(t,e.expression.value.slice(1,-1),"$[{{value}}]")},"member-child-script_expression":function(e,t){return u(t,e.expression.value.slice(1,-1),"$.{{value}}")},"member-descendant-script_expression":function(e,t){return u(t,e.expression.value.slice(1,-1),"$..value")}})["subscript-child-string_literal"]=r.prototype._fns["member-child-identifier"],r.prototype._fns["member-descendant-numeric_literal"]=r.prototype._fns["subscript-descendant-string_literal"]=r.prototype._fns["member-descendant-identifier"],t.exports=r},{"..":"jsonpath","./aesprim":"./aesprim","./index":5,"./slice":7,"static-eval":15,underscore:12}],5:[function(e,t,n){function r(){this.initialize.apply(this,arguments)}var i=e("assert"),o=e("./dict"),a=e("./parser"),s=e("./handlers");function u(e){return"[object String]"==Object.prototype.toString.call(e)}r.prototype.initialize=function(){this.parser=new a,this.handlers=new s},r.prototype.parse=function(e){return i.ok(u(e),"we need a path"),this.parser.parse(e)},r.prototype.parent=function(e,t){return i.ok(e instanceof Object,"obj needs to be an object"),i.ok(t,"we need a path"),(t=this.nodes(e,t)[0]).path.pop(),this.value(e,t.path)},r.prototype.apply=function(e,t,n){return i.ok(e instanceof Object,"obj needs to be an object"),i.ok(t,"we need a path"),i.equal(typeof n,"function","fn needs to be function"),(t=this.nodes(e,t).sort((function(e,t){return t.path.length-e.path.length}))).forEach((function(t){var r=t.path.pop(),i=this.value(e,this.stringify(t.path));t=t.value=n.call(e,i[r]);i[r]=t}),this),t},r.prototype.value=function(e,t,n){if(i.ok(e instanceof Object,"obj needs to be an object"),i.ok(t,"we need a path"),3<=arguments.length){var r=this.nodes(e,t).shift();if(!r)return this._vivify(e,t,n);var o=r.path.slice(-1).shift();this.parent(e,this.stringify(r.path))[o]=n}return this.query(e,this.stringify(t),1).shift()},r.prototype._vivify=function(e,t,n){var r=this,o=(i.ok(e instanceof Object,"obj needs to be an object"),i.ok(t,"we need a path"),this.parser.parse(t).map((function(e){return e.expression.value}))),a=function(t,n){var i=t.pop(),o=r.value(e,t);o||(a(t.concat(),"string"==typeof i?{}:[]),o=r.value(e,t)),o[i]=n};return a(o,n),this.query(e,t)[0]},r.prototype.query=function(e,t,n){return i.ok(e instanceof Object,"obj needs to be an object"),i.ok(u(t),"we need a path"),this.nodes(e,t,n).map((function(e){return e.value}))},r.prototype.paths=function(e,t,n){return i.ok(e instanceof Object,"obj needs to be an object"),i.ok(t,"we need a path"),this.nodes(e,t,n).map((function(e){return e.path}))},r.prototype.nodes=function(e,t,n){var r,o,a,s;return i.ok(e instanceof Object,"obj needs to be an object"),i.ok(t,"we need a path"),0===n?[]:(r=this.parser.parse(t),o=this.handlers,a=[{path:["$"],value:e}],s=[],r.length&&"root"==r[0].expression.type&&r.shift(),r.length?(r.forEach((function(e,t){var i,u;s.length>=n||(i=o.resolve(e),u=[],a.forEach((function(o){s.length>=n||(o=i(e,o,n),t==r.length-1?s=s.concat(o||[]):u=u.concat(o||[]))})),a=u)})),n?s.slice(0,n):s):a)},r.prototype.stringify=function(e){i.ok(e,"we need a path");var t="$",n={"descendant-member":"..{{value}}","child-member":".{{value}}","descendant-subscript":"..[{{value}}]","child-subscript":"[{{value}}]"};return(e=this._normalize(e)).forEach((function(e){if("root"!=e.expression.type){var r=[e.scope,e.operation].join("-"),i=n[r];e="string_literal"==e.expression.type?JSON.stringify(e.expression.value):e.expression.value;if(!i)throw new Error("couldn't find template "+r);t+=i.replace(/{{value}}/,e)}})),t},r.prototype._normalize=function(e){if(i.ok(e,"we need a path"),"string"==typeof e)return this.parser.parse(e);var t;if(Array.isArray(e)&&"string"==typeof e[0])return t=[{expression:{type:"root",value:"$"}}],e.forEach((function(e,n){"$"==e&&0===n||("string"==typeof e&&e.match("^"+o.identifier+"$")?t.push({operation:"member",scope:"child",expression:{value:e,type:"identifier"}}):t.push({operation:"subscript",scope:"child",expression:{value:e,type:"number"==typeof e?"numeric_literal":"string_literal"}}))})),t;if(Array.isArray(e)&&"object"==typeof e[0])return e;throw new Error("couldn't understand path "+e)},r.Handlers=s,r.Parser=a,(e=new r).JSONPath=r,t.exports=e},{"./dict":2,"./handlers":4,"./parser":6,assert:8}],6:[function(e,t,n){function r(){var e=new o.Parser,t=e.parseError;return e.yy.parseError=function(){e.yy.ast&&e.yy.ast.initialize(),t.apply(e,arguments)},e}var i=e("./grammar"),o=e("../generated/parser");r.grammar=i,t.exports=r},{"../generated/parser":1,"./grammar":3}],7:[function(e,t,n){function r(e){return String(e).match(/^[0-9]+$/)?parseInt(e):Number.isFinite(e)?parseInt(e,10):0}t.exports=function(e,t,n,i){if("string"==typeof t)throw new Error("start cannot be a string");if("string"==typeof n)throw new Error("end cannot be a string");if("string"==typeof i)throw new Error("step cannot be a string");var o=e.length;if(0===i)throw new Error("step cannot be zero");if(i=i?r(i):1,n=n<0?o+n:n,t=r(0===(t=t<0?o+t:t)?0:t||(0<i?0:o-1)),n=r(0===n?0:n||(0<i?o:-1)),t=0<i?Math.max(0,t):Math.min(o,t),n=0<i?Math.min(n,o):Math.max(-1,n),0<i&&n<=t)return[];if(i<0&&t<=n)return[];for(var a=[],s=t;s!=n&&!(i<0&&s<=n||0<i&&n<=s);s+=i)a.push(e[s]);return a}},{}],8:[function(e,t,n){var r=e("util/"),i=Array.prototype.slice,o=Object.prototype.hasOwnProperty,a=t.exports=l;function s(e,t){return r.isUndefined(t)?""+t:r.isNumber(t)&&!isFinite(t)||r.isFunction(t)||r.isRegExp(t)?t.toString():t}function u(e,t){return!r.isString(e)||e.length<t?e:e.slice(0,t)}function c(e,t,n,r,i){throw new a.AssertionError({message:n,actual:e,expected:t,operator:r,stackStartFunction:i})}function l(e,t){e||c(e,!0,t,"==",a.ok)}function h(e,t){if(e===t)return!0;if(r.isBuffer(e)&&r.isBuffer(t)){if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}if(r.isDate(e)&&r.isDate(t))return e.getTime()===t.getTime();if(r.isRegExp(e)&&r.isRegExp(t))return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if(r.isObject(e)||r.isObject(t)){var o=e,a=t;if(r.isNullOrUndefined(o)||r.isNullOrUndefined(a))return!1;if(o.prototype!==a.prototype)return!1;if(r.isPrimitive(o)||r.isPrimitive(a))return o===a;var s=f(o),u=f(a);if(s&&!u||!s&&u)return!1;if(s)return h(o=i.call(o),a=i.call(a));var c,l,d=m(o),p=m(a);if(d.length!=p.length)return!1;for(d.sort(),p.sort(),l=d.length-1;0<=l;l--)if(d[l]!=p[l])return!1;for(l=d.length-1;0<=l;l--)if(!h(o[c=d[l]],a[c]))return!1;return!0}return e==t}function f(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function d(e,t){return e&&t&&("[object RegExp]"==Object.prototype.toString.call(t)?t.test(e):e instanceof t||!0===t.call({},e))}function p(e,t,n,i){var o;r.isString(n)&&(i=n,n=null);try{t()}catch(e){o=e}if(i=(n&&n.name?" ("+n.name+").":".")+(i?" "+i:"."),e&&!o&&c(o,n,"Missing expected exception"+i),!e&&d(o,n)&&c(o,n,"Got unwanted exception"+i),e&&o&&n&&!d(o,n)||!e&&o)throw o}a.AssertionError=function(e){this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=(n=this,u(JSON.stringify(n.actual,s),128)+" "+n.operator+" "+u(JSON.stringify(n.expected,s),128)),this.generatedMessage=!0);var t,n=e.stackStartFunction||c;Error.captureStackTrace?Error.captureStackTrace(this,n):(e=new Error).stack&&(e=e.stack,t=n.name,0<=(t=e.indexOf("\n"+t))&&(t=e.indexOf("\n",t+1),e=e.substring(t+1)),this.stack=e)},r.inherits(a.AssertionError,Error),a.fail=c,a.ok=l,a.equal=function(e,t,n){e!=t&&c(e,t,n,"==",a.equal)},a.notEqual=function(e,t,n){e==t&&c(e,t,n,"!=",a.notEqual)},a.deepEqual=function(e,t,n){h(e,t)||c(e,t,n,"deepEqual",a.deepEqual)},a.notDeepEqual=function(e,t,n){h(e,t)&&c(e,t,n,"notDeepEqual",a.notDeepEqual)},a.strictEqual=function(e,t,n){e!==t&&c(e,t,n,"===",a.strictEqual)},a.notStrictEqual=function(e,t,n){e===t&&c(e,t,n,"!==",a.notStrictEqual)},a.throws=function(e,t,n){p.apply(this,[!0].concat(i.call(arguments)))},a.doesNotThrow=function(e,t){p.apply(this,[!1].concat(i.call(arguments)))},a.ifError=function(e){if(e)throw e};var m=Object.keys||function(e){var t,n=[];for(t in e)o.call(e,t)&&n.push(t);return n}},{"util/":11}],9:[function(e,t,n){"function"==typeof Object.create?t.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(e,t){function n(){}e.super_=t,n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},{}],10:[function(e,t,n){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},{}],11:[function(e,n,r){(function(t,n){var i,o=/%[sdj%]/g,a=(r.format=function(e){if(!A(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(s(arguments[n]));return t.join(" ")}n=1;for(var r=arguments,i=r.length,a=String(e).replace(o,(function(e){if("%%"===e)return"%";if(i<=n)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}})),u=r[n];n<i;u=r[++n])m(u)||!y(u)?a+=" "+u:a+=" "+s(u);return a},r.deprecate=function(e,i){var o;return v(n.process)?function(){return r.deprecate(e,i).apply(this,arguments)}:!0===t.noDeprecation?e:(o=!1,function(){if(!o){if(t.throwDeprecation)throw new Error(i);t.traceDeprecation,o=!0}return e.apply(this,arguments)})},{});function s(e,t){var n={seen:[],stylize:c};return 3<=arguments.length&&(n.depth=arguments[2]),4<=arguments.length&&(n.colors=arguments[3]),p(t)?n.showHidden=t:t&&r._extend(n,t),v(n.showHidden)&&(n.showHidden=!1),v(n.depth)&&(n.depth=2),v(n.colors)&&(n.colors=!1),v(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=u),l(n,e,n.depth)}function u(e,t){return(t=s.styles[t])?"["+s.colors[t][0]+"m"+e+"["+s.colors[t][1]+"m":e}function c(e,t){return e}function l(e,t,n){if(e.customInspect&&t&&C(t.inspect)&&t.inspect!==r.inspect&&(!t.constructor||t.constructor.prototype!==t))return A(o=t.inspect(n,e))?o:l(e,o,n);if(o=function(e,t){return v(t)?e.stylize("undefined","undefined"):A(t)?(n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'",e.stylize(n,"string")):g(t)?e.stylize(""+t,"number"):p(t)?e.stylize(""+t,"boolean"):m(t)?e.stylize("null","null"):void 0;var n}(e,t))return o;var i,o=Object.keys(t),a=(i={},o.forEach((function(e,t){i[e]=!0})),i);if(e.showHidden&&(o=Object.getOwnPropertyNames(t)),x(t)&&(0<=o.indexOf("message")||0<=o.indexOf("description")))return h(t);if(0===o.length){if(C(t))return u=t.name?": "+t.name:"",e.stylize("[Function"+u+"]","special");if(b(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(w(t))return e.stylize(Date.prototype.toString.call(t),"date");if(x(t))return h(t)}var s,u="",c=!1,y=["{","}"];return d(t)&&(c=!0,y=["[","]"]),C(t)&&(u=" [Function"+(t.name?": "+t.name:"")+"]"),b(t)&&(u=" "+RegExp.prototype.toString.call(t)),w(t)&&(u=" "+Date.prototype.toUTCString.call(t)),x(t)&&(u=" "+h(t)),0!==o.length||c&&0!=t.length?n<0?b(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special"):(e.seen.push(t),s=c?function(e,t,n,r,i){for(var o=[],a=0,s=t.length;a<s;++a)E(t,String(a))?o.push(f(e,t,n,r,String(a),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(f(e,t,n,r,i,!0))})),o}(e,t,n,a,o):o.map((function(r){return f(e,t,n,a,r,c)})),e.seen.pop(),60<s.reduce((function(e,t){return t.indexOf("\n"),e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0)?y[0]+(""===u?"":u+"\n ")+" "+s.join(",\n  ")+" "+y[1]:y[0]+u+" "+s.join(", ")+" "+y[1]):y[0]+u+y[1]}function h(e){return"["+Error.prototype.toString.call(e)+"]"}function f(e,t,n,r,i,o){var a,s;if((t=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=t.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):t.set&&(s=e.stylize("[Setter]","special")),E(r,i)||(a="["+i+"]"),s||(e.seen.indexOf(t.value)<0?-1<(s=m(n)?l(e,t.value,null):l(e,t.value,n-1)).indexOf("\n")&&(s=o?s.split("\n").map((function(e){return"  "+e})).join("\n").substr(2):"\n"+s.split("\n").map((function(e){return"   "+e})).join("\n")):s=e.stylize("[Circular]","special")),v(a)){if(o&&i.match(/^\d+$/))return s;a=(a=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),e.stylize(a,"string"))}return a+": "+s}function d(e){return Array.isArray(e)}function p(e){return"boolean"==typeof e}function m(e){return null===e}function g(e){return"number"==typeof e}function A(e){return"string"==typeof e}function v(e){return void 0===e}function b(e){return y(e)&&"[object RegExp]"===k(e)}function y(e){return"object"==typeof e&&null!==e}function w(e){return y(e)&&"[object Date]"===k(e)}function x(e){return y(e)&&("[object Error]"===k(e)||e instanceof Error)}function C(e){return"function"==typeof e}function k(e){return Object.prototype.toString.call(e)}function E(e,t){return Object.prototype.hasOwnProperty.call(e,t)}r.debuglog=function(e){return v(i)&&(i=t.env.NODE_DEBUG||""),e=e.toUpperCase(),a[e]||(new RegExp("\\b"+e+"\\b","i").test(i)?(t.pid,a[e]=function(){r.format.apply(r,arguments)}):a[e]=function(){}),a[e]},(r.inspect=s).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]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},r.isArray=d,r.isBoolean=p,r.isNull=m,r.isNullOrUndefined=function(e){return null==e},r.isNumber=g,r.isString=A,r.isSymbol=function(e){return"symbol"==typeof e},r.isUndefined=v,r.isRegExp=b,r.isObject=y,r.isDate=w,r.isError=x,r.isFunction=C,r.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},r.isBuffer=e("./support/isBuffer"),r.log=function(){},r.inherits=e("inherits"),r._extend=function(e,t){if(t&&y(t))for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}}).call(this,e("_process"),void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./support/isBuffer":10,_process:14,inherits:9}],12:[function(e,t,n){},{}],13:[function(e,t,n){(function(e){function t(e,t){for(var n=0,r=e.length-1;0<=r;r--){var i=e[r];"."===i?e.splice(r,1):".."===i?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;)e.unshift("..");return e}function r(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r<e.length;r++)t(e[r],r,e)&&n.push(e[r]);return n}n.resolve=function(){for(var n="",i=!1,o=arguments.length-1;-1<=o&&!i;o--){var a=0<=o?arguments[o]:e.cwd();if("string"!=typeof a)throw new TypeError("Arguments to path.resolve must be strings");a&&(n=a+"/"+n,i="/"===a.charAt(0))}return(i?"/":"")+(n=t(r(n.split("/"),(function(e){return!!e})),!i).join("/"))||"."},n.normalize=function(e){var o=n.isAbsolute(e),a="/"===i(e,-1);return(e=(e=t(r(e.split("/"),(function(e){return!!e})),!o).join("/"))||o?e:".")&&a&&(e+="/"),(o?"/":"")+e},n.isAbsolute=function(e){return"/"===e.charAt(0)},n.join=function(){var e=Array.prototype.slice.call(arguments,0);return n.normalize(r(e,(function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},n.relative=function(e,t){function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var n=e.length-1;0<=n&&""===e[n];n--);return n<t?[]:e.slice(t,n-t+1)}e=n.resolve(e).substr(1),t=n.resolve(t).substr(1);for(var i=r(e.split("/")),o=r(t.split("/")),a=Math.min(i.length,o.length),s=a,u=0;u<a;u++)if(i[u]!==o[u]){s=u;break}var c=[];for(u=s;u<i.length;u++)c.push("..");return(c=c.concat(o.slice(s))).join("/")},n.sep="/",n.delimiter=":",n.dirname=function(e){if("string"!=typeof e&&(e+=""),0===e.length)return".";for(var t=47===e.charCodeAt(0),n=-1,r=!0,i=e.length-1;1<=i;--i)if(47===e.charCodeAt(i)){if(!r){n=i;break}}else r=!1;return-1===n?t?"/":".":t&&1===n?"/":e.slice(0,n)},n.basename=function(e,t){return e=function(e){"string"!=typeof e&&(e+="");for(var t=0,n=-1,r=!0,i=e.length-1;0<=i;--i)if(47===e.charCodeAt(i)){if(!r){t=i+1;break}}else-1===n&&(r=!1,n=i+1);return-1===n?"":e.slice(t,n)}(e),t&&e.substr(-1*t.length)===t?e.substr(0,e.length-t.length):e},n.extname=function(e){"string"!=typeof e&&(e+="");for(var t=-1,n=0,r=-1,i=!0,o=0,a=e.length-1;0<=a;--a){var s=e.charCodeAt(a);if(47===s){if(i)continue;n=a+1;break}-1===r&&(i=!1,r=a+1),46===s?-1===t?t=a:1!==o&&(o=1):-1!==t&&(o=-1)}return-1===t||-1===r||0===o||1===o&&t===r-1&&t===n+1?"":e.slice(t,r)};var i="b"==="ab".substr(-1)?function(e,t,n){return e.substr(t,n)}:function(e,t,n){return t<0&&(t=e.length+t),e.substr(t,n)}}).call(this,e("_process"))},{_process:14}],14:[function(e,t,n){var r,i;t=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}try{r="function"==typeof setTimeout?setTimeout:o}catch(e){r=o}try{i="function"==typeof clearTimeout?clearTimeout:a}catch(e){i=a}function s(e){if(r===setTimeout)return setTimeout(e,0);if((r===o||!r)&&setTimeout)return(r=setTimeout)(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}var u,c=[],l=!1,h=-1;function f(){l&&u&&(l=!1,u.length?c=u.concat(c):h=-1,c.length&&d())}function d(){if(!l){for(var e=s(f),t=(l=!0,c.length);t;){for(u=c,c=[];++h<t;)u&&u[h].run();h=-1,t=c.length}u=null,l=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===a||!i)&&clearTimeout)return(i=clearTimeout)(e);try{i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function m(){}t.nextTick=function(e){var t=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new p(e,t)),1!==c.length||l||s(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},t.title="browser",t.browser=!0,t.env={},t.argv=[],t.version="",t.versions={},t.on=m,t.addListener=m,t.once=m,t.off=m,t.removeListener=m,t.removeAllListeners=m,t.emit=m,t.prependListener=m,t.prependOnceListener=m,t.listeners=function(e){return[]},t.binding=function(e){throw new Error("process.binding is not supported")},t.cwd=function(){return"/"},t.chdir=function(e){throw new Error("process.chdir is not supported")},t.umask=function(){return 0}},{}],15:[function(e,t,n){var r=e("escodegen").generate;t.exports=function(e,t){t=t||{};var n={};return(e=function e(i,o){if("Literal"===i.type)return i.value;var a;if("UnaryExpression"===i.type)return a=e(i.argument),"+"===i.operator?+a:"-"===i.operator?-a:"~"===i.operator?~a:"!"===i.operator?!a:n;if("ArrayExpression"===i.type){for(var s=[],u=0,c=i.elements.length;u<c;u++){if((d=e(i.elements[u]))===n)return n;s.push(d)}return s}if("ObjectExpression"===i.type){var l={};for(u=0;u<i.properties.length;u++){var h,f=null===(h=i.properties[u]).value?h.value:e(h.value);if(f===n)return n;l[h.key.value||h.key.name]=f}return l}if("BinaryExpression"===i.type||"LogicalExpression"===i.type)return(c=e(i.left))===n||(b=e(i.right))===n?n:"=="===(v=i.operator)?c==b:"==="===v?c===b:"!="===v?c!=b:"!=="===v?c!==b:"+"===v?c+b:"-"===v?c-b:"*"===v?c*b:"/"===v?c/b:"%"===v?c%b:"<"===v?c<b:"<="===v?c<=b:">"===v?b<c:">="===v?b<=c:"|"===v?c|b:"&"===v?c&b:"^"===v?c^b:"&&"===v?c&&b:"||"===v?c||b:n;if("Identifier"===i.type)return{}.hasOwnProperty.call(t,i.name)?t[i.name]:n;if("ThisExpression"===i.type)return{}.hasOwnProperty.call(t,"this")?t.this:n;if("CallExpression"===i.type){if((v=e(i.callee))===n)return n;if("function"!=typeof v)return n;var d,p=((b=i.callee.object?e(i.callee.object):n)===n&&(b=null),[]);for(u=0,c=i.arguments.length;u<c;u++){if((d=e(i.arguments[u]))===n)return n;p.push(d)}return v.apply(b,p)}if("MemberExpression"===i.type)return(l=e(i.object))===n||"function"==typeof l?n:"Identifier"===i.property.type?l[i.property.name]:(h=e(i.property))===n?n:l[h];if("ConditionalExpression"===i.type)return(a=e(i.test))===n?n:e(a?i.consequent:i.alternate);if("ExpressionStatement"===i.type)return(a=e(i.expression))===n?n:a;if("ReturnStatement"===i.type)return e(i.argument);if("FunctionExpression"===i.type){var m=i.body.body,g={};for(Object.keys(t).forEach((function(e){g[e]=t[e]})),u=0;u<i.params.length;u++){var A=i.params[u];if("Identifier"!=A.type)return n;t[A.name]=null}for(u in m)if(e(m[u])===n)return n;t=g;var v,b=(v=Object.keys(t)).map((function(e){return t[e]}));return Function(v.join(", "),"return "+r(i)).apply(null,b)}if("TemplateLiteral"!==i.type)return"TaggedTemplateExpression"===i.type?(a=e(i.tag),b=(v=i.quasi).quasis.map(e),v=v.expressions.map(e),a.apply(null,[b].concat(v))):"TemplateElement"===i.type?i.value.cooked:n;var y="";for(u=0;u<i.expressions.length;u++)y=(y+=e(i.quasis[u]))+e(i.expressions[u]);return y+e(i.quasis[u])}(e))===n?void 0:e}},{escodegen:12}],jsonpath:[function(e,t,n){t.exports=e("./lib/index")},{"./lib/index":5}]},{},["jsonpath"])("jsonpath")}).call(this,n(67))},function(e,t,n){(function(t){for(var r,i,o,a=n(359),s="undefined"==typeof window?t:window,u=["moz","webkit"],c="AnimationFrame",l=s["request"+c],h=s["cancel"+c]||s["cancelRequest"+c],f=0;!l&&f<u.length;f++)l=s[u[f]+"Request"+c],h=s[u[f]+"Cancel"+c]||s[u[f]+"CancelRequest"+c];l&&h||(i=r=0,o=[],l=function(e){var t,n;return 0===o.length&&(t=a(),n=Math.max(0,1e3/60-(t-r)),r=n+t,setTimeout((function(){for(var e=o.slice(0),t=o.length=0;t<e.length;t++)if(!e[t].cancelled)try{e[t].callback(r)}catch(e){setTimeout((function(){throw e}),0)}}),Math.round(n))),o.push({handle:++i,callback:e,cancelled:!1}),i},h=function(e){for(var t=0;t<o.length;t++)o[t].handle===e&&(o[t].cancelled=!0)}),e.exports=function(e){return l.call(s,e)},e.exports.cancel=function(){h.apply(s,arguments)},e.exports.polyfill=function(e){(e=e||s).requestAnimationFrame=l,e.cancelAnimationFrame=h}}).call(this,n(67))},function(e,t){e.exports=function(e){this.ok=!1,this.alpha=1,e=(e=(e="#"==e.charAt(0)?e.substr(1,6):e).replace(/ /g,"")).toLowerCase();for(var t={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"},n=(e=t[e]||e,[{re:/^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*((?:\d?\.)?\d)\)$/,example:["rgba(123, 234, 45, 0.8)","rgba(255,234,245,1.0)"],process:function(e){return[parseInt(e[1]),parseInt(e[2]),parseInt(e[3]),parseFloat(e[4])]}},{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(e){return[parseInt(e[1]),parseInt(e[2]),parseInt(e[3])]}},{re:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,example:["#00ff00","336699"],process:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}},{re:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,example:["#fb0","f0f"],process:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}}]),r=0;r<n.length;r++){var i=n[r].re,o=n[r].process;(i=i.exec(e))&&(o=o(i),this.r=o[0],this.g=o[1],this.b=o[2],3<o.length&&(this.alpha=o[3]),this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:255<this.r?255:this.r,this.g=this.g<0||isNaN(this.g)?0:255<this.g?255:this.g,this.b=this.b<0||isNaN(this.b)?0:255<this.b?255:this.b,this.alpha=this.alpha<0?0:1<this.alpha||isNaN(this.alpha)?1:this.alpha,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toRGBA=function(){return"rgba("+this.r+", "+this.g+", "+this.b+", "+this.alpha+")"},this.toHex=function(){var e=this.r.toString(16),t=this.g.toString(16),n=this.b.toString(16);return"#"+(e=1==e.length?"0"+e:e)+(t=1==t.length?"0"+t:t)+(1==n.length?"0"+n:n)},this.getHelpXML=function(){for(var e,r=new Array,i=0;i<n.length;i++)for(var o=n[i].example,a=0;a<o.length;a++)r[r.length]=o[a];for(e in t)r[r.length]=e;var s=document.createElement("ul");for(s.setAttribute("id","rgbcolor-examples"),i=0;i<r.length;i++)try{var u=document.createElement("li"),c=new RGBColor(r[i]),l=document.createElement("div"),h=(l.style.cssText="margin: 3px; border: 1px solid black; background:"+c.toHex()+"; color:"+c.toHex(),l.appendChild(document.createTextNode("test")),document.createTextNode(" "+r[i]+" -> "+c.toRGB()+" -> "+c.toHex()));u.appendChild(l),u.appendChild(h),s.appendChild(u)}catch(e){}return s}}},function(e,t,n){var r,i,o,a;e.exports=(e=n(39),a=(n=e).lib,r=a.WordArray,i=a.Hasher,a=n.algo,o=[],a=a.SHA1=i.extend({_doReset:function(){this._hash=new r.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],a=n[2],s=n[3],u=n[4],c=0;c<80;c++){c<16?o[c]=0|e[t+c]:(l=o[c-3]^o[c-8]^o[c-14]^o[c-16],o[c]=l<<1|l>>>31);var l=(r<<5|r>>>27)+u+o[c];l+=c<20?1518500249+(i&a|~i&s):c<40?1859775393+(i^a^s):c<60?(i&a|i&s|a&s)-1894007588:(i^a^s)-899497514,u=s,s=a,a=i<<30|i>>>2,i=r,r=l}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+a|0,n[3]=n[3]+s|0,n[4]=n[4]+u|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[14+(64+r>>>9<<4)]=Math.floor(n/4294967296),t[15+(64+r>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=i.clone.call(this);return e._hash=this._hash.clone(),e}}),n.SHA1=i._createHelper(a),n.HmacSHA1=i._createHmacHelper(a),e.SHA1)},function(e,t,n){var r;e.exports=(e=n(39),n=e.lib.Base,r=e.enc.Utf8,void(e.algo.HMAC=n.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=r.parse(t));for(var n=e.blockSize,i=4*n,o=(e=((t=t.sigBytes>i?e.finalize(t):t).clamp(),this._oKey=t.clone()),t=this._iKey=t.clone(),e.words),a=t.words,s=0;s<n;s++)o[s]^=1549556828,a[s]^=909522486;e.sigBytes=t.sigBytes=i,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher;e=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(e))}})))},function(e,t,n){"use strict";(function(r){var i=n(310),o=n(311),a={"+":"__plus","==":"__doubleEqual","===":"__tripleEqual","||":"__logicalOR","&&":"__logicalAND","|":"__bitwiseOR","^":"__bitwiseXOR","&":"__bitwiseAND","!=":"__notEqual","!==":"__notDoubleEqual","<":"__lessThan",">":"__greaterThan","<=":"__lessThanEqual",">=":"__greaterThanEqual",in:"__in",instanceof:"__instanceOf","<<":"__bitwiseLSHIFT",">>":"__bitwiseRSHIFT",">>>":"__zeroFillRSHIFT","-":"__minus","*":"__multiply","%":"__modulus","/":"__divide","u-":"__unaryNegation","u+":"__unaryAddition","~":"__bitwiseNOT","++":"__increment","--":"__decrement","!":"__unaryNOT","+=":"__addAssign","-=":"__minusAssign","*=":"__multiplyAssign","/=":"__divideAssign","%=":"__modulusAssign","<<=":"__leftShiftAssign",">>=":"__rightShiftAssign",">>>=":"__zeroFillRightShiftAssign","&=":"__andAssign","|=":"__orAssign","^=":"__xorAssign"};function s(e,t,n){Object.defineProperty(e.prototype,t,{enumerable:!1,writable:!0,configurable:!1,value:n})}e.exports=t=function(e){var t,n,s=i.parse("var fn = "+e);if(s)return t=s.body[0].declarations[0].init.params.reduce((function(e,t){return e.push(t.name),e}),[]),(n={type:"Program",body:s.body[0].declarations[0].init.body.body}).body.forEach((function(e,t){!function e(t,n,r){switch(t.type){case"VariableDeclaration":t.declarations.forEach((function(t,n){e(t.init,n,r)}));break;case"BinaryExpression":case"LogicalExpression":t.operator&&a[t.operator]?(t.type="CallExpression",t.callee={type:"MemberExpression",computed:!1,object:t.right,property:{type:"Identifier",name:a[t.operator]}},e(t.left,n,r),e(t.right,n,r),t.arguments=[t.left]):(e(t.left,n,r),e(t.right,n,r));break;case"ExpressionStatement":e(t.expression,n,r);break;case"CallExpression":t.arguments.forEach((function(t,n){e(t,n,r)})),e(t.callee,n,r);break;case"AssignmentExpression":t.operator&&a[t.operator]?(t.right={type:"CallExpression",callee:{type:"MemberExpression",computed:!1,object:t.left,property:{type:"Identifier",name:a[t.operator]}},arguments:[t.right]},t.operator="=",e(t.left,n,r),e(t.right.arguments[0],n,r)):e(t.right,n,r);break;case"UnaryExpression":t.operator&&a[t.operator]?(t.type="CallExpression",t.callee={type:"MemberExpression",computed:!1,object:t.argument,property:{type:"Identifier",name:"+"===t.operator||"-"===t.operator?a["u"+t.operator]:a[t.operator]}},e(t.argument,n,r),t.arguments=[]):e(t.argument,n,r);break;case"UpdateExpression":t.operator&&a[t.operator]&&(t.type="CallExpression",t.callee={type:"MemberExpression",computed:!1,object:t.argument,property:{type:"Identifier",name:a[t.operator]}},e(t.argument,n,r),t.arguments=[]);break;case"FunctionDeclaration":case"FunctionExpression":e(t.body,n,r);break;case"BlockStatement":t.body.forEach((function(t){e(t,n,r)}));break;case"ReturnStatement":e(t.argument,n,r);break;case"MemberExpression":e(t.object,n,r);break;case"SwitchStatement":t.cases.forEach((function(t,n){e(t,n,r)}));break;case"SwitchCase":t.consequent.forEach((function(t,n){e(t,n,r)}))}}(e,t,n)})),t.push(o.generate(n,{comment:!0,format:{indent:{style:"  "}}})),s=Function.apply(e,t),r.env.OVERLOAD_DEBUG,r.env.OVERLOAD_DEBUG,s;throw new Error("Invalid code block! Cannot overload. AST Generation Error.")},[Object,Number,String,Function,RegExp].forEach((function(e){s(e,a["+"],(function(e){return e+this})),s(e,a["=="],(function(e){return e==this})),s(e,a["==="],(function(e){return e===this})),s(e,a["||"],(function(e){return e||this})),s(e,a["&&"],(function(e){return e&&this})),s(e,a["&"],(function(e){return e&this})),s(e,a["|"],(function(e){return e|this})),s(e,a["^"],(function(e){return e^this})),s(e,a["!="],(function(e){return e!=this})),s(e,a["!=="],(function(e){return e!==this})),s(e,a["<"],(function(e){return e<this})),s(e,a[">"],(function(e){return this<e})),s(e,a[">>"],(function(e){return e>>this})),s(e,a["<<"],(function(e){return e<<this})),s(e,a[">>>"],(function(e){return e>>>this})),s(e,a["<="],(function(e){return e<=this})),s(e,a[">="],(function(e){return this<=e})),s(e,a.in,(function(e){return e in this})),s(e,a.instanceof,(function(e){return e instanceof this})),s(e,a["-"],(function(e){return e-this})),s(e,a["*"],(function(e){return e*this})),s(e,a["%"],(function(e){return e%this})),s(e,a["/"],(function(e){return e/this})),s(e,a["u-"],(function(){return-this})),s(e,a["u+"],(function(){return+this})),s(e,a["~"],(function(){return~this})),s(e,a["++"],(function(){var e=this;return++e})),s(e,a["--"],(function(){var e=this;return--e})),s(e,a["!"],(function(){return!this})),s(e,a["+="],(function(e){return e+this})),s(e,a["-="],(function(e){return e-this})),s(e,a["*="],(function(e){return e*this})),s(e,a["/="],(function(e){return e/this})),s(e,a["%="],(function(e){return e%this})),s(e,a["<<="],(function(e){return e<<this})),s(e,a[">>="],(function(e){return e>>this})),s(e,a[">>>="],(function(e){return e>>>this})),s(e,a["&="],(function(e){return e&this})),s(e,a["|="],(function(e){return e|this})),s(e,a["^="],(function(e){return e^this}))})),t.functionNames=a}).call(this,n(117))},function(e,t){e.exports=r;var n=null;try{n=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch(e){}function r(e,t,n){this.low=0|e,this.high=0|t,this.unsigned=!!n}function i(e){return!0===(e&&e.__isLong__)}Object.defineProperty(r.prototype,"__isLong__",{value:!0}),r.isLong=i;var o={},a={};function s(e,t){var n,r,i;return t?(i=0<=(e>>>=0)&&e<256)&&(r=a[e])?r:(n=c(e,(0|e)<0?-1:0,!0),i&&(a[e]=n),n):(i=-128<=(e|=0)&&e<128)&&(r=o[e])?r:(n=c(e,e<0?-1:0,!1),i&&(o[e]=n),n)}function u(e,t){if(isNaN(e))return t?v:A;if(t){if(e<0)return v;if(p<=e)return C}else{if(e<=-m)return k;if(m<=e+1)return x}return e<0?u(-e,t).neg():c(e%d|0,e/d|0,t)}function c(e,t,n){return new r(e,t,n)}r.fromInt=s,r.fromNumber=u,r.fromBits=c;var l=Math.pow;function h(e,t,n){if(0===e.length)throw Error("empty string");if("NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return A;if(t="number"==typeof t?(n=t,!1):!!t,(n=n||10)<2||36<n)throw RangeError("radix");var r;if(0<(r=e.indexOf("-")))throw Error("interior hyphen");if(0===r)return h(e.substring(1),t,n).neg();for(var i=u(l(n,8)),o=A,a=0;a<e.length;a+=8){var s=Math.min(8,e.length-a),c=parseInt(e.substring(a,a+s),n);o=(s<8?(s=u(l(n,s)),o.mul(s)):o=o.mul(i)).add(u(c))}return o.unsigned=t,o}function f(e,t){return"number"==typeof e?u(e,t):"string"==typeof e?h(e,t):c(e.low,e.high,"boolean"==typeof t?t:e.unsigned)}r.fromString=h,r.fromValue=f;var d=4294967296,p=d*d,m=p/2,g=s(1<<24),A=s(0),v=(r.ZERO=A,s(0,!0)),b=(r.UZERO=v,s(1)),y=(r.ONE=b,s(1,!0)),w=(r.UONE=y,s(-1)),x=(r.NEG_ONE=w,c(-1,2147483647,!1)),C=(r.MAX_VALUE=x,c(-1,-1,!0)),k=(r.MAX_UNSIGNED_VALUE=C,c(0,-2147483648,!1));(e=(r.MIN_VALUE=k,r.prototype)).toInt=function(){return this.unsigned?this.low>>>0:this.low},e.toNumber=function(){return this.unsigned?(this.high>>>0)*d+(this.low>>>0):this.high*d+(this.low>>>0)},e.toString=function(e){if((e=e||10)<2||36<e)throw RangeError("radix");if(this.isZero())return"0";var t,n;if(this.isNegative())return this.eq(k)?(n=u(e),n=(t=this.div(n)).mul(n).sub(this),t.toString(e)+n.toInt().toString(e)):"-"+this.neg().toString(e);for(var r=u(l(e,6),this.unsigned),i=this,o="";;){var a=i.div(r),s=(i.sub(a.mul(r)).toInt()>>>0).toString(e);if((i=a).isZero())return s+o;for(;s.length<6;)s="0"+s;o=""+s+o}},e.getHighBits=function(){return this.high},e.getHighBitsUnsigned=function(){return this.high>>>0},e.getLowBits=function(){return this.low},e.getLowBitsUnsigned=function(){return this.low>>>0},e.getNumBitsAbs=function(){if(this.isNegative())return this.eq(k)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;0<t&&0==(e&1<<t);t--);return 0!=this.high?t+33:t+1},e.isZero=function(){return 0===this.high&&0===this.low},e.eqz=e.isZero,e.isNegative=function(){return!this.unsigned&&this.high<0},e.isPositive=function(){return this.unsigned||0<=this.high},e.isOdd=function(){return 1==(1&this.low)},e.isEven=function(){return 0==(1&this.low)},e.equals=function(e){return i(e)||(e=f(e)),(this.unsigned===e.unsigned||this.high>>>31!=1||e.high>>>31!=1)&&this.high===e.high&&this.low===e.low},e.eq=e.equals,e.notEquals=function(e){return!this.eq(e)},e.neq=e.notEquals,e.ne=e.notEquals,e.lessThan=function(e){return this.comp(e)<0},e.lt=e.lessThan,e.lessThanOrEqual=function(e){return this.comp(e)<=0},e.lte=e.lessThanOrEqual,e.le=e.lessThanOrEqual,e.greaterThan=function(e){return 0<this.comp(e)},e.gt=e.greaterThan,e.greaterThanOrEqual=function(e){return 0<=this.comp(e)},e.gte=e.greaterThanOrEqual,e.ge=e.greaterThanOrEqual,e.compare=function(e){var t,n;return i(e)||(e=f(e)),this.eq(e)?0:(t=this.isNegative(),n=e.isNegative(),t&&!n?-1:!t&&n?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1)},e.comp=e.compare,e.negate=function(){return!this.unsigned&&this.eq(k)?k:this.not().add(b)},e.neg=e.negate,e.add=function(e){i(e)||(e=f(e));var t=this.high>>>16,n=65535&this.high,r=this.low>>>16,o=65535&this.low,a=e.high>>>16,s=65535&e.high,u=e.low>>>16,l=0,h=0,d=0,p=0;return h+=(d=d+((p+=o+(65535&e.low))>>>16)+(r+u))>>>16,c((d&=65535)<<16|(p&=65535),((l+=(h+=n+s)>>>16)+(t+a)&65535)<<16|(h&=65535),this.unsigned)},e.subtract=function(e){return i(e)||(e=f(e)),this.add(e.neg())},e.sub=e.subtract,e.multiply=function(e){var t,r,o,a,s,l,h,d,p,m,v;return this.isZero()?A:(i(e)||(e=f(e)),n?c(n.mul(this.low,this.high,e.low,e.high),n.get_high(),this.unsigned):e.isZero()?A:this.eq(k)?e.isOdd()?k:A:e.eq(k)?this.isOdd()?k:A:this.isNegative()?e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg():e.isNegative()?this.mul(e.neg()).neg():this.lt(g)&&e.lt(g)?u(this.toNumber()*e.toNumber(),this.unsigned):(t=this.high>>>16,r=65535&this.high,o=this.low>>>16,a=65535&this.low,s=e.high>>>16,l=65535&e.high,h=e.low>>>16,v=(v=m=p=d=0)+((p=p+((m+=a*(e=65535&e.low))>>>16)+o*e)>>>16)+((p=(65535&p)+a*h)>>>16),c((p&=65535)<<16|(m&=65535),(d=(d=(d+=(v+=r*e)>>>16)+((v=(65535&v)+o*h)>>>16)+((v=(65535&v)+a*l)>>>16))+(t*e+r*h+o*l+a*s)&65535)<<16|(v&=65535),this.unsigned)))},e.mul=e.multiply,e.divide=function(e){if((e=i(e)?e:f(e)).isZero())throw Error("division by zero");var t,r,o;if(n)return this.unsigned||-2147483648!==this.high||-1!==e.low||-1!==e.high?c((this.unsigned?n.div_u:n.div_s)(this.low,this.high,e.low,e.high),n.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?v:A;if(this.unsigned){if((e=e.unsigned?e:e.toUnsigned()).gt(this))return v;if(e.gt(this.shru(1)))return y;r=v}else{if(this.eq(k))return e.eq(b)||e.eq(w)?k:e.eq(k)?b:(o=this.shr(1).div(e).shl(1)).eq(A)?e.isNegative()?b:w:(t=this.sub(e.mul(o)),o.add(t.div(e)));if(e.eq(k))return this.unsigned?v:A;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();r=A}for(t=this;t.gte(e);){o=Math.max(1,Math.floor(t.toNumber()/e.toNumber()));for(var a=Math.ceil(Math.log(o)/Math.LN2),s=a<=48?1:l(2,a-48),h=u(o),d=h.mul(e);d.isNegative()||d.gt(t);)d=(h=u(o-=s,this.unsigned)).mul(e);h.isZero()&&(h=b),r=r.add(h),t=t.sub(d)}return r},e.div=e.divide,e.modulo=function(e){return i(e)||(e=f(e)),n?c((this.unsigned?n.rem_u:n.rem_s)(this.low,this.high,e.low,e.high),n.get_high(),this.unsigned):this.sub(this.div(e).mul(e))},e.mod=e.modulo,e.rem=e.modulo,e.not=function(){return c(~this.low,~this.high,this.unsigned)},e.and=function(e){return i(e)||(e=f(e)),c(this.low&e.low,this.high&e.high,this.unsigned)},e.or=function(e){return i(e)||(e=f(e)),c(this.low|e.low,this.high|e.high,this.unsigned)},e.xor=function(e){return i(e)||(e=f(e)),c(this.low^e.low,this.high^e.high,this.unsigned)},e.shiftLeft=function(e){return i(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?c(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):c(0,this.low<<e-32,this.unsigned)},e.shl=e.shiftLeft,e.shiftRight=function(e){return i(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?c(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):c(this.high>>e-32,0<=this.high?0:-1,this.unsigned)},e.shr=e.shiftRight,e.shiftRightUnsigned=function(e){var t;return i(e)&&(e=e.toInt()),0==(e&=63)?this:(t=this.high,e<32?c(this.low>>>e|t<<32-e,t>>>e,this.unsigned):c(32===e?t:t>>>e-32,0,this.unsigned))},e.shru=e.shiftRightUnsigned,e.shr_u=e.shiftRightUnsigned,e.toSigned=function(){return this.unsigned?c(this.low,this.high,!1):this},e.toUnsigned=function(){return this.unsigned?this:c(this.low,this.high,!0)},e.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},e.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},e.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},r.fromBytes=function(e,t,n){return n?r.fromBytesLE(e,t):r.fromBytesBE(e,t)},r.fromBytesLE=function(e,t){return new r(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)},r.fromBytesBE=function(e,t){return new r(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)}},function(e,t,n){e.exports=function(){"use strict";function e(e,n){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=t(e))||n&&e&&"number"==typeof e.length){r&&(e=r);var i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){u=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(u)throw a}}}}function t(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function i(){return!0}function o(){return!1}function a(){}var s="Argument is not a typed-function.";return function t(){function n(e){return"object"===r(e)&&null!==e&&e.constructor===Object}var u,c,l=[{name:"number",test:function(e){return"number"==typeof e}},{name:"string",test:function(e){return"string"==typeof e}},{name:"boolean",test:function(e){return"boolean"==typeof e}},{name:"Function",test:function(e){return"function"==typeof e}},{name:"Array",test:Array.isArray},{name:"Date",test:function(e){return e instanceof Date}},{name:"RegExp",test:function(e){return e instanceof RegExp}},{name:"Object",test:n},{name:"null",test:function(e){return null===e}},{name:"undefined",test:function(e){return void 0===e}}],h={name:"any",test:i,isAny:!0},f=0,d={createCount:0};function p(t){var n=u.get(t);if(n)return n;var r,i,o='Unknown type "'+t+'"',a=t.toLowerCase(),s=e(c);try{for(s.s();!(i=s.n()).done;)if((r=i.value).toLowerCase()===a){o+='. Did you mean "'+r+'" ?';break}}catch(t){s.e(t)}finally{s.f()}throw new TypeError(o)}function m(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"any",n=t?p(t).index:c.length,r=[],i=0;i<e.length;++i){if(!e[i]||"string"!=typeof e[i].name||"function"!=typeof e[i].test)throw new TypeError("Object with properties {name: string, test: function} expected");var o=e[i].name;if(u.has(o))throw new TypeError('Duplicate type name "'+o+'"');r.push(o),u.set(o,{name:o,test:e[i].test,isAny:e[i].isAny,index:n+i,conversionsTo:[]})}var a=c.slice(n);c=c.slice(0,n).concat(r).concat(a);for(var s=n+r.length;s<c.length;++s)u.get(c[s]).index=s}function g(){u=new Map,c=[],f=0,m([h],!1)}function A(e){var t=c.filter((function(t){var n=u.get(t);return!n.isAny&&n.test(e)}));return t.length?t:["any"]}function v(e){return e&&"function"==typeof e&&"_typedFunctionData"in e}function b(t,n,r){if(!v(t))throw new TypeError(s);var i=r&&r.exact,o=k(Array.isArray(n)?n.join(","):n),a=y(o);if(!i||a in t.signatures){var u=t._typedFunctionData.signatureMap.get(a);if(u)return u}var c,l,h,f=o.length;if(i)for(l in c=[],t.signatures)c.push(t._typedFunctionData.signatureMap.get(l));else c=t._typedFunctionData.signatures;for(var d=0;d<f;++d){var p,m=o[d],g=[],A=void 0,b=e(c);try{for(b.s();!(p=b.n()).done;){var w=O((A=p.value).params,d);if(w&&(!m.restParam||w.restParam)){if(!w.hasAny)if("continue"===function(){var e=C(w);if(m.types.some((function(t){return!e.has(t.name)})))return"continue"}())continue;g.push(A)}}}catch(t){b.e(t)}finally{b.f()}if(0===(c=g).length)break}var x,E=e(c);try{for(E.s();!(x=E.n()).done;)if((h=x.value).params.length<=f)return h}catch(t){E.e(t)}finally{E.f()}throw new TypeError("Signature not found (signature: "+(t.name||"unnamed")+"("+y(o,", ")+"))")}function y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:",";return e.map((function(e){return e.name})).join(t)}function w(e){var t=0===e.indexOf("..."),n=(t?e.length>3?e.slice(3):"any":e).split("|").map((function(e){return p(e.trim())})),r=!1,i=t?"...":"";return{types:n.map((function(e){return r=e.isAny||r,i+=e.name+"|",{name:e.name,typeIndex:e.index,test:e.test,isAny:e.isAny,conversion:null,conversionIndex:-1}})),name:i.slice(0,-1),hasAny:r,hasConversion:!1,restParam:t}}function x(t){var n=function(t){if(0===t.length)return[];var n=t.map(p);t.length>1&&n.sort((function(e,t){return e.index-t.index}));var r=n[0].conversionsTo;if(1===t.length)return r;r=r.concat([]);for(var i=new Set(t),o=1;o<n.length;++o){var a,s=void 0,u=e(n[o].conversionsTo);try{for(u.s();!(a=u.n()).done;)s=a.value,i.has(s.from)||(r.push(s),i.add(s.from))}catch(t){u.e(t)}finally{u.f()}}return r}(t.types.map((function(e){return e.name}))),r=t.hasAny,i=t.name,o=n.map((function(e){var t=p(e.from);return r=t.isAny||r,i+="|"+e.from,{name:e.from,typeIndex:t.index,test:t.test,isAny:t.isAny,conversion:e,conversionIndex:e.index}}));return{types:t.types.concat(o),name:i,hasAny:r,hasConversion:o.length>0,restParam:t.restParam}}function C(e){return e.typeSet||(e.typeSet=new Set,e.types.forEach((function(t){return e.typeSet.add(t.name)}))),e.typeSet}function k(e){var t=[];if("string"!=typeof e)throw new TypeError("Signatures must be strings");var n=e.trim();if(""===n)return t;for(var r=n.split(","),i=0;i<r.length;++i){var o=w(r[i].trim());if(o.restParam&&i!==r.length-1)throw new SyntaxError('Unexpected rest parameter "'+r[i]+'": only allowed for the last parameter');if(0===o.types.length)return null;t.push(o)}return t}function E(e){var t=q(e);return!!t&&t.restParam}function S(e){if(e&&0!==e.types.length){if(1===e.types.length)return p(e.types[0].name).test;if(2===e.types.length){var t=p(e.types[0].name).test,n=p(e.types[1].name).test;return function(e){return t(e)||n(e)}}var r=e.types.map((function(e){return p(e.name).test}));return function(e){for(var t=0;t<r.length;t++)if(r[t](e))return!0;return!1}}return i}function _(e){var t,n,r;if(E(e)){var i=(t=V(e).map(S)).length,o=S(q(e));return function(e){for(var n=0;n<t.length;n++)if(!t[n](e[n]))return!1;return function(e){for(var t=i;t<e.length;t++)if(!o(e[t]))return!1;return!0}(e)&&e.length>=i+1}}return 0===e.length?function(e){return 0===e.length}:1===e.length?(n=S(e[0]),function(e){return n(e[0])&&1===e.length}):2===e.length?(n=S(e[0]),r=S(e[1]),function(e){return n(e[0])&&r(e[1])&&2===e.length}):(t=e.map(S),function(e){for(var n=0;n<t.length;n++)if(!t[n](e[n]))return!1;return e.length===t.length})}function O(e,t){return t<e.length?e[t]:E(e)?q(e):null}function T(e,t){var n=O(e,t);return n?C(n):new Set}function D(e){return null===e.conversion||void 0===e.conversion}function B(t,n){var r=new Set;return t.forEach((function(t){var i,o,a=e(T(t.params,n));try{for(a.s();!(o=a.n()).done;)i=o.value,r.add(i)}catch(t){a.e(t)}finally{a.f()}})),r.has("any")?["any"]:Array.from(r)}function I(e,t,n){var i,o,a,s=e||"unnamed",u=n,c=function(){var e=[];if(u.forEach((function(n){var r=S(O(n.params,a));(a<n.params.length||E(n.params))&&r(t[a])&&e.push(n)})),0===e.length){if((o=B(u,a)).length>0){var n=A(t[a]);return(i=new TypeError("Unexpected type of argument in function "+s+" (expected: "+o.join(" or ")+", actual: "+n.join(" | ")+", index: "+a+")")).data={category:"wrongType",fn:s,index:a,actual:n,expected:o},{v:i}}}else u=e};for(a=0;a<t.length;a++){var l=c();if("object"===r(l))return l.v}var h=u.map((function(e){return E(e.params)?1/0:e.params.length}));if(t.length<Math.min.apply(null,h))return o=B(u,a),(i=new TypeError("Too few arguments in function "+s+" (expected: "+o.join(" or ")+", index: "+t.length+")")).data={category:"tooFewArgs",fn:s,index:t.length,expected:o},i;var f=Math.max.apply(null,h);if(t.length>f)return(i=new TypeError("Too many arguments in function "+s+" (expected: "+f+", actual: "+t.length+")")).data={category:"tooManyArgs",fn:s,index:t.length,expectedLength:f},i;for(var d=[],p=0;p<t.length;++p)d.push(A(t[p]).join("|"));return(i=new TypeError('Arguments of type "'+d.join(", ")+'" do not match any of the defined signatures of function '+s+".")).data={category:"mismatch",actual:d},i}function M(e){for(var t=c.length+1,n=0;n<e.types.length;n++)D(e.types[n])&&(t=Math.min(t,e.types[n].typeIndex));return t}function j(e){for(var t=f+1,n=0;n<e.types.length;n++)D(e.types[n])||(t=Math.min(t,e.types[n].conversionIndex));return t}function N(e,t){if(e.hasAny){if(!t.hasAny)return 1}else if(t.hasAny)return-1;if(e.restParam){if(!t.restParam)return 1}else if(t.restParam)return-1;if(e.hasConversion){if(!t.hasConversion)return 1}else if(t.hasConversion)return-1;var n=M(e)-M(t);if(n<0)return-1;if(n>0)return 1;var r=j(e)-j(t);return r<0?-1:r>0?1:0}function F(t,n){var r=t.params,i=n.params,o=q(r),a=q(i),s=E(r),u=E(i);if(s&&o.hasAny){if(!u||!a.hasAny)return 1}else if(u&&a.hasAny)return-1;var c,l,h=0,f=0,d=e(r);try{for(d.s();!(l=d.n()).done;)(c=l.value).hasAny&&++h,c.hasConversion&&++f}catch(t){d.e(t)}finally{d.f()}var p,m=0,g=0,A=e(i);try{for(A.s();!(p=A.n()).done;)(c=p.value).hasAny&&++m,c.hasConversion&&++g}catch(t){A.e(t)}finally{A.f()}if(h!==m)return h-m;if(s&&o.hasConversion){if(!u||!a.hasConversion)return 1}else if(u&&a.hasConversion)return-1;if(f!==g)return f-g;if(s){if(!u)return 1}else if(u)return-1;var v=(r.length-i.length)*(s?-1:1);if(0!==v)return v;for(var b,y=[],w=0,x=0;x<r.length;++x){var C=N(r[x],i[x]);y.push(C),w+=C}if(0!==w)return w;for(var k=0,S=y;k<S.length;k++)if(0!==(b=S[k]))return b;return 0}function R(e,t){var n=t;if(e.some((function(e){return e.hasConversion}))){var r=E(e),i=e.map(P);n=function(){for(var e=[],n=r?arguments.length-1:arguments.length,o=0;o<n;o++)e[o]=i[o](arguments[o]);return r&&(e[n]=arguments[n].map(i[n])),t.apply(this,e)}}var o=n;if(E(e)){var a=e.length-1;o=function(){return n.apply(this,G(arguments,0,a).concat([G(arguments,a)]))}}return o}function P(e){var t,n,r,i,o=[],a=[];switch(e.types.forEach((function(e){e.conversion&&(o.push(p(e.conversion.from).test),a.push(e.conversion.convert))})),a.length){case 0:return function(e){return e};case 1:return t=o[0],r=a[0],function(e){return t(e)?r(e):e};case 2:return t=o[0],n=o[1],r=a[0],i=a[1],function(e){return t(e)?r(e):n(e)?i(e):e};default:return function(e){for(var t=0;t<a.length;t++)if(o[t](e))return a[t](e);return e}}}function L(e){return function e(t,n,r){if(n<t.length){var i=t[n],o=[];if(i.restParam){var a=i.types.filter(D);a.length<i.types.length&&o.push({types:a,name:"..."+a.map((function(e){return e.name})).join("|"),hasAny:a.some((function(e){return e.isAny})),hasConversion:!1,restParam:!0}),o.push(i)}else o=i.types.map((function(e){return{types:[e],name:e.name,hasAny:e.isAny,hasConversion:e.conversion,restParam:!1}}));return function(e,t){return Array.prototype.concat.apply([],e.map(t))}(o,(function(i){return e(t,n+1,r.concat([i]))}))}return[r]}(e,0,[])}function U(t,n){for(var r=Math.max(t.length,n.length),i=0;i<r;i++){var o,a=T(t,i),s=!1,u=void 0,c=e(T(n,i));try{for(c.s();!(o=c.n()).done;)if(u=o.value,a.has(u)){s=!0;break}}catch(t){c.e(t)}finally{c.f()}if(!s)return!1}var l=t.length,h=n.length,f=E(t),d=E(n);return f?d?l===h:h>=l:d?l>=h:l===h}function z(t,n,r){var i,o,a=[],s=e(t);try{for(s.s();!(o=s.n()).done;){var u=r[i=o.value];if("number"!=typeof u)throw new TypeError('No definition for referenced signature "'+i+'"');if("function"!=typeof(u=n[u]))return!1;a.push(u)}}catch(t){s.e(t)}finally{s.f()}return a}function H(e,t,n){for(var r=function(e){return e.map((function(e){return X(e)?K(e.referToSelf.callback):Y(e)?W(e.referTo.references,e.referTo.callback):e}))}(e),i=new Array(r.length).fill(!1),o=!0;o;){o=!1;for(var a=!0,s=0;s<r.length;++s)if(!i[s]){var u=r[s];if(X(u))r[s]=u.referToSelf.callback(n),r[s].referToSelf=u.referToSelf,i[s]=!0,a=!1;else if(Y(u)){var c=z(u.referTo.references,r,t);c?(r[s]=u.referTo.callback.apply(this,c),r[s].referTo=u.referTo,i[s]=!0,a=!1):o=!0}}if(a&&o)throw new SyntaxError("Circular reference detected in resolving typed.referTo")}return r}function $(t,n){if(d.createCount++,0===Object.keys(n).length)throw new SyntaxError("No signatures provided");d.warnAgainstDeprecatedThis&&function(e){var t=/\bthis(\(|\.signatures\b)/;Object.keys(e).forEach((function(n){var r=e[n];if(t.test(r.toString()))throw new SyntaxError("Using `this` to self-reference a function is deprecated since typed-function@3. Use typed.referTo and typed.referToSelf instead.")}))}(n);var r,i=[],s=[],u={},c=[],l=function t(){if(!Object.prototype.hasOwnProperty.call(n,r))return"continue";var o=k(r);if(!o)return"continue";i.forEach((function(e){if(U(e,o))throw new TypeError('Conflicting signatures "'+y(e)+'" and "'+y(o)+'".')})),i.push(o);var a=s.length;s.push(n[r]);var l,h=void 0,f=e(L(o.map(x)));try{for(f.s();!(l=f.n()).done;){var d=y(h=l.value);c.push({params:h,name:d,fn:a}),h.every((function(e){return!e.hasConversion}))&&(u[d]=a)}}catch(t){f.e(t)}finally{f.f()}};for(r in n)l();c.sort(F);var h,f=H(s,u,de);for(h in u)Object.prototype.hasOwnProperty.call(u,h)&&(u[h]=f[u[h]]);for(var p=[],m=new Map,g=0,A=c;g<A.length;g++)h=A[g],m.has(h.name)||(h.fn=f[h.fn],p.push(h),m.set(h.name,h));for(var v=p[0]&&p[0].params.length<=2&&!E(p[0].params),b=p[1]&&p[1].params.length<=2&&!E(p[1].params),w=p[2]&&p[2].params.length<=2&&!E(p[2].params),C=p[3]&&p[3].params.length<=2&&!E(p[3].params),O=p[4]&&p[4].params.length<=2&&!E(p[4].params),T=p[5]&&p[5].params.length<=2&&!E(p[5].params),D=v&&b&&w&&C&&O&&T,B=0;B<p.length;++B)p[B].test=_(p[B].params);for(var I=v?S(p[0].params[0]):o,M=b?S(p[1].params[0]):o,j=w?S(p[2].params[0]):o,N=C?S(p[3].params[0]):o,P=O?S(p[4].params[0]):o,z=T?S(p[5].params[0]):o,$=v?S(p[0].params[1]):o,Q=b?S(p[1].params[1]):o,V=w?S(p[2].params[1]):o,q=C?S(p[3].params[1]):o,G=O?S(p[4].params[1]):o,W=T?S(p[5].params[1]):o,K=0;K<p.length;++K)p[K].implementation=R(p[K].params,p[K].fn);var Y=v?p[0].implementation:a,X=b?p[1].implementation:a,J=w?p[2].implementation:a,Z=C?p[3].implementation:a,ee=O?p[4].implementation:a,te=T?p[5].implementation:a,ne=v?p[0].params.length:-1,re=b?p[1].params.length:-1,ie=w?p[2].params.length:-1,oe=C?p[3].params.length:-1,ae=O?p[4].params.length:-1,se=T?p[5].params.length:-1,ue=D?6:0,ce=p.length,le=p.map((function(e){return e.test})),he=p.map((function(e){return e.implementation})),fe=function(){for(var e=ue;e<ce;e++)if(le[e](arguments))return he[e].apply(this,arguments);return d.onMismatch(t,arguments,p)};function de(e,t){return arguments.length===ne&&I(e)&&$(t)?Y.apply(this,arguments):arguments.length===re&&M(e)&&Q(t)?X.apply(this,arguments):arguments.length===ie&&j(e)&&V(t)?J.apply(this,arguments):arguments.length===oe&&N(e)&&q(t)?Z.apply(this,arguments):arguments.length===ae&&P(e)&&G(t)?ee.apply(this,arguments):arguments.length===se&&z(e)&&W(t)?te.apply(this,arguments):fe.apply(this,arguments)}try{Object.defineProperty(de,"name",{value:t})}catch(l){}return de.signatures=u,de._typedFunctionData={signatures:p,signatureMap:m},de}function Q(e,t,n){throw I(e,t,n)}function V(e){return G(e,0,e.length-1)}function q(e){return e[e.length-1]}function G(e,t,n){return Array.prototype.slice.call(e,t,n)}function W(e,t){return{referTo:{references:e,callback:t}}}function K(e){if("function"!=typeof e)throw new TypeError("Callback function expected as first argument");return{referToSelf:{callback:e}}}function Y(e){return e&&"object"===r(e.referTo)&&Array.isArray(e.referTo.references)&&"function"==typeof e.referTo.callback}function X(e){return e&&"object"===r(e.referToSelf)&&"function"==typeof e.referToSelf.callback}function J(e,t){if(!e)return t;if(t&&t!==e){var n=new Error("Function names do not match (expected: "+e+", actual: "+t+")");throw n.data={actual:t,expected:e},n}return e}function Z(e){var t;for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(v(e[n])||"string"==typeof e[n].signature)&&(t=J(t,e[n].name));return t}function ee(e,t){var n;for(n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(n in e&&t[n]!==e[n]){var r=new Error('Signature "'+n+'" is defined twice');throw r.data={signature:n,sourceFunction:t[n],destFunction:e[n]},r}e[n]=t[n]}}g(),m(l);var te=d;function ne(e){if(!e||"string"!=typeof e.from||"string"!=typeof e.to||"function"!=typeof e.convert)throw new TypeError("Object with properties {from: string, to: string, convert: function} expected");if(e.to===e.from)throw new SyntaxError('Illegal to define conversion from "'+e.from+'" to itself.')}return(d=function(e){for(var t="string"==typeof e,r=t?1:0,i=t?e:"",o={},a=r;a<arguments.length;++a){var s=arguments[a],u={},c=void 0;if("function"==typeof s?(c=s.name,"string"==typeof s.signature?u[s.signature]=s:v(s)&&(u=s.signatures)):n(s)&&(u=s,t||(c=Z(s))),0===Object.keys(u).length){var l=new TypeError("Argument to 'typed' at index "+a+" is not a (typed) function, nor an object with signatures as keys and functions as values.");throw l.data={index:a,argument:s},l}t||(i=J(i,c)),ee(o,u)}return $(i||"",o)}).create=t,d.createCount=te.createCount,d.onMismatch=Q,d.throwMismatchError=Q,d.createError=I,d.clear=g,d.clearConversions=function(){var t,n,r=e(c);try{for(r.s();!(n=r.n()).done;)t=n.value,u.get(t).conversionsTo=[]}catch(t){r.e(t)}finally{r.f()}f=0},d.addTypes=m,d._findType=p,d.referTo=function(){var e=V(arguments).map((function(e){return y(k(e))})),t=q(arguments);if("function"!=typeof t)throw new TypeError("Callback function expected as last argument");return W(e,t)},d.referToSelf=K,d.convert=function(e,t){var n=p(t);if(n.test(e))return e;var r=n.conversionsTo;if(0===r.length)throw new Error("There are no conversions to "+t+" defined.");for(var i=0;i<r.length;i++){if(p(r[i].from).test(e))return r[i].convert(e)}throw new Error("Cannot convert "+e+" to "+t)},d.findSignature=b,d.find=function(e,t,n){return b(e,t,n).implementation},d.isTypedFunction=v,d.warnAgainstDeprecatedThis=!0,d.addType=function(e,t){var n="any";!1!==t&&u.has("Object")&&(n="Object"),d.addTypes([e],n)},d.addConversion=function(e){ne(e);var t=p(e.to);if(!t.conversionsTo.every((function(t){return t.from!==e.from})))throw new Error('There is already a conversion from "'+e.from+'" to "'+t.name+'"');t.conversionsTo.push({from:e.from,convert:e.convert,index:f++})},d.addConversions=function(e){e.forEach(d.addConversion)},d.removeConversion=function(e){ne(e);var t=p(e.to),n=function(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return e[n]}(t.conversionsTo,(function(t){return t.from===e.from}));if(!n)throw new Error("Attempt to remove nonexistent conversion from "+e.from+" to "+e.to);if(n.convert!==e.convert)throw new Error("Conversion to remove does not match existing conversion");var r=t.conversionsTo.indexOf(n);t.conversionsTo.splice(r,1)},d.resolve=function(e,t){if(!v(e))throw new TypeError(s);for(var n=e._typedFunctionData.signatures,r=0;r<n.length;++r)if(n[r].test(t))return n[r];return null},d}()}()},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a}));var r=n(1),i=(n(46),n(26));function o(e){return"linear"===e.type}function a(e){return"radial"===e.type}Math.round,i.a.hasGlobalWindow&&Object(r.v)(window.btoa)}).call(this,n(163).Buffer)},,,function(e,t){},function(e,t){!function(){"use strict";var t,n,r,i,o,a;function s(e){return e<=65535?String.fromCharCode(e):String.fromCharCode(Math.floor((e-65536)/1024)+55296)+String.fromCharCode((e-65536)%1024+56320)}for(n={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,NonAsciiIdentifierPart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/},t={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDE00-\uDE11\uDE13-\uDE2B\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDE00-\uDE2F\uDE44\uDE80-\uDEAA]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDD0-\uDDDA\uDE00-\uDE11\uDE13-\uDE37\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF01-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/},r=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279],i=new Array(128),a=0;a<128;++a)i[a]=97<=a&&a<=122||65<=a&&a<=90||36===a||95===a;for(o=new Array(128),a=0;a<128;++a)o[a]=97<=a&&a<=122||65<=a&&a<=90||48<=a&&a<=57||36===a||95===a;e.exports={isDecimalDigit:function(e){return 48<=e&&e<=57},isHexDigit:function(e){return 48<=e&&e<=57||97<=e&&e<=102||65<=e&&e<=70},isOctalDigit:function(e){return 48<=e&&e<=55},isWhiteSpace:function(e){return 32===e||9===e||11===e||12===e||160===e||5760<=e&&0<=r.indexOf(e)},isLineTerminator:function(e){return 10===e||13===e||8232===e||8233===e},isIdentifierStartES5:function(e){return e<128?i[e]:n.NonAsciiIdentifierStart.test(s(e))},isIdentifierPartES5:function(e){return e<128?o[e]:n.NonAsciiIdentifierPart.test(s(e))},isIdentifierStartES6:function(e){return e<128?i[e]:t.NonAsciiIdentifierStart.test(s(e))},isIdentifierPartES6:function(e){return e<128?o[e]:t.NonAsciiIdentifierPart.test(s(e))}}}()},function(e,t,n){var r=n(233),i=n(157),o=n(234).ArraySet,a=n(319).MappingList;function s(e){this._file=i.getArg(e=e||{},"file",null),this._sourceRoot=i.getArg(e,"sourceRoot",null),this._skipValidation=i.getArg(e,"skipValidation",!1),this._sources=new o,this._names=new o,this._mappings=new a,this._sourcesContents=null}s.prototype._version=3,s.fromSourceMap=function(e){var t=e.sourceRoot,n=new s({file:e.file,sourceRoot:t});return e.eachMapping((function(e){var r={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(r.source=e.source,null!=t&&(r.source=i.relative(t,r.source)),r.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(r.name=e.name)),n.addMapping(r)})),e.sources.forEach((function(r){var o=r;null!=(o=(null!==t&&(o=i.relative(t,r)),n._sources.has(o)||n._sources.add(o),e.sourceContentFor(r)))&&n.setSourceContent(r,o)})),n},s.prototype.addMapping=function(e){var t=i.getArg(e,"generated"),n=i.getArg(e,"original",null),r=i.getArg(e,"source",null);e=i.getArg(e,"name",null);this._skipValidation||this._validateMapping(t,n,r,e),null!=r&&(r=String(r),this._sources.has(r)||this._sources.add(r)),null!=e&&(e=String(e),this._names.has(e)||this._names.add(e)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:null!=n&&n.line,originalColumn:null!=n&&n.column,source:r,name:e})},s.prototype.setSourceContent=function(e,t){null!=this._sourceRoot&&(e=i.relative(this._sourceRoot,e)),null!=t?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[i.toSetString(e)]=t):this._sourcesContents&&(delete this._sourcesContents[i.toSetString(e)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},s.prototype.applySourceMap=function(e,t,n){var r=t;if(null==t){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');r=e.file}var a=this._sourceRoot,s=(null!=a&&(r=i.relative(a,r)),new o),u=new o;this._mappings.unsortedForEach((function(t){var o;t.source===r&&null!=t.originalLine&&null!=(o=e.originalPositionFor({line:t.originalLine,column:t.originalColumn})).source&&(t.source=o.source,null!=n&&(t.source=i.join(n,t.source)),null!=a&&(t.source=i.relative(a,t.source)),t.originalLine=o.line,t.originalColumn=o.column,null!=o.name&&(t.name=o.name)),null==(o=(null==(o=t.source)||s.has(o)||s.add(o),t.name))||u.has(o)||u.add(o)}),this),this._sources=s,this._names=u,e.sources.forEach((function(t){var r=e.sourceContentFor(t);null!=r&&(null!=n&&(t=i.join(n,t)),null!=a&&(t=i.relative(a,t)),this.setSourceContent(t,r))}),this)},s.prototype._validateMapping=function(e,t,n,r){if(t&&"number"!=typeof t.line&&"number"!=typeof t.column)throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if((!(e&&"line"in e&&"column"in e&&0<e.line&&0<=e.column)||t||n||r)&&!(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&0<e.line&&0<=e.column&&0<t.line&&0<=t.column&&n))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:n,original:t,name:r}))},s.prototype._serializeMappings=function(){for(var e,t,n,o=0,a=1,s=0,u=0,c=0,l=0,h="",f=this._mappings.toArray(),d=0,p=f.length;d<p;d++){if(e="",(t=f[d]).generatedLine!==a)for(o=0;t.generatedLine!==a;)e+=";",a++;else if(0<d){if(!i.compareByGeneratedPositionsInflated(t,f[d-1]))continue;e+=","}e+=r.encode(t.generatedColumn-o),o=t.generatedColumn,null!=t.source&&(n=this._sources.indexOf(t.source),e+=r.encode(n-l),l=n,e+=r.encode(t.originalLine-1-u),u=t.originalLine-1,e+=r.encode(t.originalColumn-s),s=t.originalColumn,null!=t.name&&(n=this._names.indexOf(t.name),e+=r.encode(n-c),c=n)),h+=e}return h},s.prototype._generateSourcesContent=function(e,t){return e.map((function(e){return this._sourcesContents?(null!=t&&(e=i.relative(t,e)),e=i.toSetString(e),Object.prototype.hasOwnProperty.call(this._sourcesContents,e)?this._sourcesContents[e]:null):null}),this)},s.prototype.toJSON=function(){var e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e},s.prototype.toString=function(){return JSON.stringify(this.toJSON())},t.SourceMapGenerator=s},function(e,t,n){var r=n(318);t.encode=function(e){for(var t,n="",i=(e=e)<0?1+(-e<<1):e<<1;t=31&i,0<(i>>>=5)&&(t|=32),n+=r.encode(t),0<i;);return n},t.decode=function(e,t,n){var i,o,a,s=e.length,u=0,c=0;do{if(s<=t)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(o=r.decode(e.charCodeAt(t++))))throw new Error("Invalid base64 digit: "+e.charAt(t-1))}while(i=!!(32&o),u+=(o&=31)<<c,c+=5,i);n.value=(a=u>>1,1==(1&u)?-a:a),n.rest=t}},function(e,t,n){var r=n(157),i=Object.prototype.hasOwnProperty,o="undefined"!=typeof Map;function a(){this._array=[],this._set=o?new Map:Object.create(null)}a.fromArray=function(e,t){for(var n=new a,r=0,i=e.length;r<i;r++)n.add(e[r],t);return n},a.prototype.size=function(){return o?this._set.size:Object.getOwnPropertyNames(this._set).length},a.prototype.add=function(e,t){var n=o?e:r.toSetString(e),a=o?this.has(e):i.call(this._set,n),s=this._array.length;a&&!t||this._array.push(e),a||(o?this._set.set(e,s):this._set[n]=s)},a.prototype.has=function(e){return o?this._set.has(e):(e=r.toSetString(e),i.call(this._set,e))},a.prototype.indexOf=function(e){if(o){var t=this._set.get(e);if(0<=t)return t}else if(t=r.toSetString(e),i.call(this._set,t))return this._set[t];throw new Error('"'+e+'" is not in the set.')},a.prototype.at=function(e){if(0<=e&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)},a.prototype.toArray=function(){return this._array.slice()},t.ArraySet=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=n(159),o=a(n(160));function a(e){return e&&e.__esModule?e:{default:e}}n=function(e){var t=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);function n(e,t){if(this instanceof n)return(e=function(e,t){if(e)return!t||"object"!=typeof t&&"function"!=typeof t?e:t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))).fontSize=!t.flat&&t.fontSize>10*t.width?10*t.width:t.fontSize,e.guardHeight=t.height+e.fontSize/2+t.textMargin,e;throw new TypeError("Cannot call a class as a function")}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e),function(e,t,n){t&&r(e.prototype,t),n&&r(e,n)}(n,[{key:"encode",value:function(){return this.options.flat?this.encodeFlat():this.encodeGuarded()}},{key:"leftText",value:function(e,t){return this.text.substr(e,t)}},{key:"leftEncode",value:function(e,t){return(0,o.default)(e,t)}},{key:"rightText",value:function(e,t){return this.text.substr(e,t)}},{key:"rightEncode",value:function(e,t){return(0,o.default)(e,t)}},{key:"encodeGuarded",value:function(){var e={fontSize:this.fontSize},t={height:this.guardHeight};return[{data:i.SIDE_BIN,options:t},{data:this.leftEncode(),text:this.leftText(),options:e},{data:i.MIDDLE_BIN,options:t},{data:this.rightEncode(),text:this.rightText(),options:e},{data:i.SIDE_BIN,options:t}]}},{key:"encodeFlat",value:function(){return{data:[i.SIDE_BIN,this.leftEncode(),i.MIDDLE_BIN,this.rightEncode(),i.SIDE_BIN].join(""),text:this.text}}}]),n}(a(n(75)).default),t.default=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}t.checksum=a;var i=o(n(160));function o(e){return e&&e.__esModule?e:{default:e}}function a(e){for(var t=0,n=1;n<11;n+=2)t+=parseInt(e[n]);for(n=0;n<11;n+=2)t+=3*parseInt(e[n]);return(10-t%10)%10}n=function(e){var t=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);function n(e,t){if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");return-1!==e.search(/^[0-9]{11}$/)&&(e+=a(e)),(e=function(e,t){if(e)return!t||"object"!=typeof t&&"function"!=typeof t?e:t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))).displayValue=t.displayValue,t.fontSize>10*t.width?e.fontSize=10*t.width:e.fontSize=t.fontSize,e.guardHeight=t.height+e.fontSize/2+t.textMargin,e}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e),function(e,t,n){t&&r(e.prototype,t),n&&r(e,n)}(n,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{12}$/)&&this.data[11]==a(this.data)}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var e="";return{data:(e+="101")+(0,i.default)(this.data.substr(0,6),"LLLLLL")+"01010"+(0,i.default)(this.data.substr(6,6),"RRRRRR")+"101",text:this.text}}},{key:"guardedEncoding",value:function(){var e=[];return this.displayValue&&e.push({data:"00000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),e.push({data:"101"+(0,i.default)(this.data[0],"L"),options:{height:this.guardHeight}}),e.push({data:(0,i.default)(this.data.substr(1,5),"LLLLL"),text:this.text.substr(1,5),options:{fontSize:this.fontSize}}),e.push({data:"01010",options:{height:this.guardHeight}}),e.push({data:(0,i.default)(this.data.substr(6,5),"RRRRR"),text:this.text.substr(6,5),options:{fontSize:this.fontSize}}),e.push({data:(0,i.default)(this.data[11],"R")+"101",options:{height:this.guardHeight}}),this.displayValue&&e.push({data:"00000000",text:this.text.substr(11,1),options:{textAlign:"right",fontSize:this.fontSize}}),e}}]),n}(o(n(75)).default),t.default=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=n(340);n=function(e){var t=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);function n(){var e=this,t=n;if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");if(e=this,t=(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments),e)return!t||"object"!=typeof t&&"function"!=typeof t?e:t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e),function(e,t,n){t&&r(e.prototype,t),n&&r(e,n)}(n,[{key:"valid",value:function(){return-1!==this.data.search(/^([0-9]{2})+$/)}},{key:"encode",value:function(){var e=this,t=this.data.match(/.{2}/g).map((function(t){return e.encodePair(t)})).join("");return{data:i.START_BIN+t+i.END_BIN,text:this.text}}},{key:"encodePair",value:function(e){var t=i.BINARIES[e[1]];return i.BINARIES[e[0]].split("").map((function(e,n){return("1"===e?"111":"1")+("1"===t[n]?"000":"0")})).join("")}}]),n}(((n=n=n(75))&&n.__esModule?n:{default:n}).default),t.default=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n=["width","height","textMargin","fontSize","margin","marginTop","marginBottom","marginLeft","marginRight"];for(t in n)n.hasOwnProperty(t)&&("string"==typeof e[t=n[t]]&&(e[t]=parseInt(e[t],10)));return"string"==typeof e.displayValue&&(e.displayValue="false"!=e.displayValue),e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={width:2,height:100,format:"auto",displayValue:!0,fontOptions:"",font:"monospace",text:void 0,textAlign:"center",textPosition:"bottom",textMargin:2,fontSize:20,background:"#ffffff",lineColor:"#000000",margin:10,marginTop:void 0,marginBottom:void 0,marginLeft:void 0,marginRight:void 0,valid:function(){}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTotalWidthOfEncodings=t.calculateEncodingAttributes=t.getBarcodePadding=t.getEncodingHeight=t.getMaximumHeightOfEncodings=void 0;var r=(n=n=n(173))&&n.__esModule?n:{default:n};function i(e,t){return t.height+(t.displayValue&&0<e.text.length?t.fontSize+t.textMargin:0)+t.marginTop+t.marginBottom}function o(e,t,n){if(n.displayValue&&t<e){if("center"==n.textAlign)return Math.floor((e-t)/2);if("left"==n.textAlign)return 0;if("right"==n.textAlign)return Math.floor(e-t)}return 0}t.getMaximumHeightOfEncodings=function(e){for(var t=0,n=0;n<e.length;n++)e[n].height>t&&(t=e[n].height);return t},t.getEncodingHeight=i,t.getBarcodePadding=o,t.calculateEncodingAttributes=function(e,t,n){for(var a=0;a<e.length;a++){var s=e[a],u=(0,r.default)(t,s.options),c=u.displayValue?function(e,t,n){var r;if(n)r=n;else{if("undefined"==typeof document)return 0;r=document.createElement("canvas").getContext("2d")}return r.font=t.fontOptions+" "+t.fontSize+"px "+t.font,(n=r.measureText(e))?n.width:0}(s.text,u,n):0,l=s.data.length*u.width;s.width=Math.ceil(Math.max(c,l)),s.height=i(s,u),s.barcodePadding=o(c,l,u)}},t.getTotalWidthOfEncodings=function(e){for(var t=0,n=0;n<e.length;n++)t+=e[n].width;return t}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(e)return!t||"object"!=typeof t&&"function"!=typeof t?e:t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0}),o(s,Error);var a=s;function s(e,t){r(this,s);var n=i(this,(s.__proto__||Object.getPrototypeOf(s)).call(this));return n.name="InvalidInputException",n.symbology=e,n.input=t,n.message='"'+n.input+'" is not a valid input for '+n.symbology,n}o(c,Error);var u=c;function c(){r(this,c);var e=i(this,(c.__proto__||Object.getPrototypeOf(c)).call(this));return e.name="InvalidElementException",e.message="Not supported type to render on",e}o(h,Error);var l=h;function h(){r(this,h);var e=i(this,(h.__proto__||Object.getPrototypeOf(h)).call(this));return e.name="NoElementException",e.message="No element to render on.",e}t.InvalidInputException=a,t.InvalidElementException=u,t.NoElementException=l},function(e,t,n){
/*!
 * html2canvas 1.4.1 <https://html2canvas.hertzen.com>
 * Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
 * Released under MIT License
 */
e.exports=function(){"use strict";
/*! *****************************************************************************
    Copyright (c) Microsoft Corporation.

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

    THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
    REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
    AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
    INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
    LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
    OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
    PERFORMANCE OF THIS SOFTWARE.
    ***************************************************************************** */var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};function t(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var n=function(){return(n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function r(e,t,n,r){function i(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){e.done?n(e.value):i(e.value).then(a,s)}u((r=r.apply(e,t||[])).next())}))}function i(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return u([e,t])}}function u(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}}function o(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||t)}for(var a=function(){function e(e,t,n,r){this.left=e,this.top=t,this.width=n,this.height=r}return e.prototype.add=function(t,n,r,i){return new e(this.left+t,this.top+n,this.width+r,this.height+i)},e.fromClientRect=function(t,n){return new e(n.left+t.windowBounds.left,n.top+t.windowBounds.top,n.width,n.height)},e.fromDOMRectList=function(t,n){var r=Array.from(n).find((function(e){return 0!==e.width}));return r?new e(r.left+t.windowBounds.left,r.top+t.windowBounds.top,r.width,r.height):e.EMPTY},e.EMPTY=new e(0,0,0,0),e}(),s=function(e,t){return a.fromClientRect(e,t.getBoundingClientRect())},u=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){var o=e.charCodeAt(n++);56320==(64512&o)?t.push(((1023&i)<<10)+(1023&o)+65536):(t.push(i),n--)}else t.push(i)}return t},c=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(String.fromCodePoint)return String.fromCodePoint.apply(String,e);var n=e.length;if(!n)return"";for(var r=[],i=-1,o="";++i<n;){var a=e[i];a<=65535?r.push(a):(a-=65536,r.push(55296+(a>>10),a%1024+56320)),(i+1===n||r.length>16384)&&(o+=String.fromCharCode.apply(String,r),r.length=0)}return o},l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h="undefined"==typeof Uint8Array?[]:new Uint8Array(256),f=0;f<l.length;f++)h[l.charCodeAt(f)]=f;for(var d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",p="undefined"==typeof Uint8Array?[]:new Uint8Array(256),m=0;m<d.length;m++)p[d.charCodeAt(m)]=m;for(var g=function(e,t,n){return e.slice?e.slice(t,n):new Uint16Array(Array.prototype.slice.call(e,t,n))},A=function(){function e(e,t,n,r,i,o){this.initialValue=e,this.errorValue=t,this.highStart=n,this.highValueIndex=r,this.index=i,this.data=o}return e.prototype.get=function(e){var t;if(e>=0){if(e<55296||e>56319&&e<=65535)return t=((t=this.index[e>>5])<<2)+(31&e),this.data[t];if(e<=65535)return t=((t=this.index[2048+(e-55296>>5)])<<2)+(31&e),this.data[t];if(e<this.highStart)return t=2080+(e>>11),t=this.index[t],t+=e>>5&63,t=((t=this.index[t])<<2)+(31&e),this.data[t];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},e}(),v="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b="undefined"==typeof Uint8Array?[]:new Uint8Array(256),y=0;y<v.length;y++)b[v.charCodeAt(y)]=y;var w=10,x=13,C=15,k=17,E=18,S=19,_=20,O=21,T=22,D=24,B=25,I=26,M=27,j=28,N=30,F=32,R=33,P=34,L=35,U=37,z=38,H=39,$=40,Q=42,V=[9001,65288],q="×",G=function(e,t){var n=function(e){var t,n,r,i,o,a=.75*e.length,s=e.length,u=0;"="===e[e.length-1]&&(a--,"="===e[e.length-2]&&a--);var c="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&void 0!==Uint8Array.prototype.slice?new ArrayBuffer(a):new Array(a),l=Array.isArray(c)?c:new Uint8Array(c);for(t=0;t<s;t+=4)n=p[e.charCodeAt(t)],r=p[e.charCodeAt(t+1)],i=p[e.charCodeAt(t+2)],o=p[e.charCodeAt(t+3)],l[u++]=n<<2|r>>4,l[u++]=(15&r)<<4|i>>2,l[u++]=(3&i)<<6|63&o;return c}(e),r=Array.isArray(n)?function(e){for(var t=e.length,n=[],r=0;r<t;r+=4)n.push(e[r+3]<<24|e[r+2]<<16|e[r+1]<<8|e[r]);return n}(n):new Uint32Array(n),i=Array.isArray(n)?function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n.push(e[r+1]<<8|e[r]);return n}(n):new Uint16Array(n),o=g(i,12,r[4]/2),a=2===r[5]?g(i,(24+r[4])/2):function(e,t,n){return e.slice?e.slice(t,n):new Uint32Array(Array.prototype.slice.call(e,t,n))}(r,Math.ceil((24+r[4])/4));return new A(r[0],r[1],r[2],r[3],o,a)}("[encoded data, 52888 characters]"),W=[N,36],K=[1,2,3,5],Y=[w,8],X=[M,I],J=K.concat(Y),Z=[z,H,$,P,L],ee=[C,x],te=function(e,t,n,r){var i=r[n];if(Array.isArray(e)?-1!==e.indexOf(i):e===i)for(var o=n;o<=r.length;){if((u=r[++o])===t)return!0;if(u!==w)break}if(i===w)for(o=n;o>0;){var a=r[--o];if(Array.isArray(e)?-1!==e.indexOf(a):e===a)for(var s=n;s<=r.length;){var u;if((u=r[++s])===t)return!0;if(u!==w)break}if(a!==w)break}return!1},ne=function(e,t){for(var n=e;n>=0;){var r=t[n];if(r!==w)return r;n--}return 0},re=function(e,t,n,r,i){if(0===n[r])return q;var o=r-1;if(Array.isArray(i)&&!0===i[o])return q;var a=o-1,s=o+1,u=t[o],c=a>=0?t[a]:0,l=t[s];if(2===u&&3===l)return q;if(-1!==K.indexOf(u))return"!";if(-1!==K.indexOf(l))return q;if(-1!==Y.indexOf(l))return q;if(8===ne(o,t))return"÷";if(11===G.get(e[o]))return q;if((u===F||u===R)&&11===G.get(e[s]))return q;if(7===u||7===l)return q;if(9===u)return q;if(-1===[w,x,C].indexOf(u)&&9===l)return q;if(-1!==[k,E,S,D,j].indexOf(l))return q;if(ne(o,t)===T)return q;if(te(23,T,o,t))return q;if(te([k,E],O,o,t))return q;if(te(12,12,o,t))return q;if(u===w)return"÷";if(23===u||23===l)return q;if(16===l||16===u)return"÷";if(-1!==[x,C,O].indexOf(l)||14===u)return q;if(36===c&&-1!==ee.indexOf(u))return q;if(u===j&&36===l)return q;if(l===_)return q;if(-1!==W.indexOf(l)&&u===B||-1!==W.indexOf(u)&&l===B)return q;if(u===M&&-1!==[U,F,R].indexOf(l)||-1!==[U,F,R].indexOf(u)&&l===I)return q;if(-1!==W.indexOf(u)&&-1!==X.indexOf(l)||-1!==X.indexOf(u)&&-1!==W.indexOf(l))return q;if(-1!==[M,I].indexOf(u)&&(l===B||-1!==[T,C].indexOf(l)&&t[s+1]===B)||-1!==[T,C].indexOf(u)&&l===B||u===B&&-1!==[B,j,D].indexOf(l))return q;if(-1!==[B,j,D,k,E].indexOf(l))for(var h=o;h>=0;){if((f=t[h])===B)return q;if(-1===[j,D].indexOf(f))break;h--}if(-1!==[M,I].indexOf(l))for(h=-1!==[k,E].indexOf(u)?a:o;h>=0;){var f;if((f=t[h])===B)return q;if(-1===[j,D].indexOf(f))break;h--}if(z===u&&-1!==[z,H,P,L].indexOf(l)||-1!==[H,P].indexOf(u)&&-1!==[H,$].indexOf(l)||-1!==[$,L].indexOf(u)&&l===$)return q;if(-1!==Z.indexOf(u)&&-1!==[_,I].indexOf(l)||-1!==Z.indexOf(l)&&u===M)return q;if(-1!==W.indexOf(u)&&-1!==W.indexOf(l))return q;if(u===D&&-1!==W.indexOf(l))return q;if(-1!==W.concat(B).indexOf(u)&&l===T&&-1===V.indexOf(e[s])||-1!==W.concat(B).indexOf(l)&&u===E)return q;if(41===u&&41===l){for(var d=n[o],p=1;d>0&&41===t[--d];)p++;if(p%2!=0)return q}return u===F&&l===R?q:"÷"},ie=function(e,t){t||(t={lineBreak:"normal",wordBreak:"normal"});var n=function(e,t){void 0===t&&(t="strict");var n=[],r=[],i=[];return e.forEach((function(e,o){var a=G.get(e);if(a>50?(i.push(!0),a-=50):i.push(!1),-1!==["normal","auto","loose"].indexOf(t)&&-1!==[8208,8211,12316,12448].indexOf(e))return r.push(o),n.push(16);if(4===a||11===a){if(0===o)return r.push(o),n.push(N);var s=n[o-1];return-1===J.indexOf(s)?(r.push(r[o-1]),n.push(s)):(r.push(o),n.push(N))}return r.push(o),31===a?n.push("strict"===t?O:U):a===Q||29===a?n.push(N):43===a?e>=131072&&e<=196605||e>=196608&&e<=262141?n.push(U):n.push(N):void n.push(a)})),[r,n,i]}(e,t.lineBreak),r=n[0],i=n[1],o=n[2];return"break-all"!==t.wordBreak&&"break-word"!==t.wordBreak||(i=i.map((function(e){return-1!==[B,N,Q].indexOf(e)?U:e}))),[r,i,"keep-all"===t.wordBreak?o.map((function(t,n){return t&&e[n]>=19968&&e[n]<=40959})):void 0]},oe=function(){function e(e,t,n,r){this.codePoints=e,this.required="!"===t,this.start=n,this.end=r}return e.prototype.slice=function(){return c.apply(void 0,this.codePoints.slice(this.start,this.end))},e}(),ae=45,se=-1,ue=function(e){return e>=48&&e<=57},ce=function(e){return ue(e)||e>=65&&e<=70||e>=97&&e<=102},le=function(e){return 10===e||9===e||32===e},he=function(e){return function(e){return function(e){return e>=97&&e<=122}(e)||function(e){return e>=65&&e<=90}(e)}(e)||function(e){return e>=128}(e)||95===e},fe=function(e){return he(e)||ue(e)||e===ae},de=function(e){return e>=0&&e<=8||11===e||e>=14&&e<=31||127===e},pe=function(e,t){return 92===e&&10!==t},me=function(e,t,n){return e===ae?he(t)||pe(t,n):!!he(e)||!(92!==e||!pe(e,t))},ge=function(e,t,n){return 43===e||e===ae?!!ue(t)||46===t&&ue(n):ue(46===e?t:e)},Ae=function(e){var t=0,n=1;43!==e[t]&&e[t]!==ae||(e[t]===ae&&(n=-1),t++);for(var r=[];ue(e[t]);)r.push(e[t++]);var i=r.length?parseInt(c.apply(void 0,r),10):0;46===e[t]&&t++;for(var o=[];ue(e[t]);)o.push(e[t++]);var a=o.length,s=a?parseInt(c.apply(void 0,o),10):0;69!==e[t]&&101!==e[t]||t++;var u=1;43!==e[t]&&e[t]!==ae||(e[t]===ae&&(u=-1),t++);for(var l=[];ue(e[t]);)l.push(e[t++]);var h=l.length?parseInt(c.apply(void 0,l),10):0;return n*(i+s*Math.pow(10,-a))*Math.pow(10,u*h)},ve={type:2},be={type:3},ye={type:4},we={type:13},xe={type:8},Ce={type:21},ke={type:9},Ee={type:10},Se={type:11},_e={type:12},Oe={type:14},Te={type:23},De={type:1},Be={type:25},Ie={type:24},Me={type:26},je={type:27},Ne={type:28},Fe={type:29},Re={type:31},Pe={type:32},Le=function(){function e(){this._value=[]}return e.prototype.write=function(e){this._value=this._value.concat(u(e))},e.prototype.read=function(){for(var e=[],t=this.consumeToken();t!==Pe;)e.push(t),t=this.consumeToken();return e},e.prototype.consumeToken=function(){var e=this.consumeCodePoint();switch(e){case 34:return this.consumeStringToken(34);case 35:var t=this.peekCodePoint(0),n=this.peekCodePoint(1),r=this.peekCodePoint(2);if(fe(t)||pe(n,r)){var i=me(t,n,r)?2:1;return{type:5,value:this.consumeName(),flags:i}}break;case 36:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),we;break;case 39:return this.consumeStringToken(39);case 40:return ve;case 41:return be;case 42:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),Oe;break;case 43:if(ge(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case 44:return ye;case ae:var o=e,a=this.peekCodePoint(0),s=this.peekCodePoint(1);if(ge(o,a,s))return this.reconsumeCodePoint(e),this.consumeNumericToken();if(me(o,a,s))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();if(a===ae&&62===s)return this.consumeCodePoint(),this.consumeCodePoint(),Ie;break;case 46:if(ge(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case 47:if(42===this.peekCodePoint(0))for(this.consumeCodePoint();;){var u=this.consumeCodePoint();if(42===u&&47===(u=this.consumeCodePoint()))return this.consumeToken();if(u===se)return this.consumeToken()}break;case 58:return Me;case 59:return je;case 60:if(33===this.peekCodePoint(0)&&this.peekCodePoint(1)===ae&&this.peekCodePoint(2)===ae)return this.consumeCodePoint(),this.consumeCodePoint(),Be;break;case 64:var l=this.peekCodePoint(0),h=this.peekCodePoint(1),f=this.peekCodePoint(2);if(me(l,h,f))return{type:7,value:this.consumeName()};break;case 91:return Ne;case 92:if(pe(e,this.peekCodePoint(0)))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();break;case 93:return Fe;case 61:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),xe;break;case 123:return Se;case 125:return _e;case 117:case 85:var d=this.peekCodePoint(0),p=this.peekCodePoint(1);return 43!==d||!ce(p)&&63!==p||(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(e),this.consumeIdentLikeToken();case 124:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),ke;if(124===this.peekCodePoint(0))return this.consumeCodePoint(),Ce;break;case 126:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),Ee;break;case se:return Pe}return le(e)?(this.consumeWhiteSpace(),Re):ue(e)?(this.reconsumeCodePoint(e),this.consumeNumericToken()):he(e)?(this.reconsumeCodePoint(e),this.consumeIdentLikeToken()):{type:6,value:c(e)}},e.prototype.consumeCodePoint=function(){var e=this._value.shift();return void 0===e?-1:e},e.prototype.reconsumeCodePoint=function(e){this._value.unshift(e)},e.prototype.peekCodePoint=function(e){return e>=this._value.length?-1:this._value[e]},e.prototype.consumeUnicodeRangeToken=function(){for(var e=[],t=this.consumeCodePoint();ce(t)&&e.length<6;)e.push(t),t=this.consumeCodePoint();for(var n=!1;63===t&&e.length<6;)e.push(t),t=this.consumeCodePoint(),n=!0;if(n)return{type:30,start:parseInt(c.apply(void 0,e.map((function(e){return 63===e?48:e}))),16),end:parseInt(c.apply(void 0,e.map((function(e){return 63===e?70:e}))),16)};var r=parseInt(c.apply(void 0,e),16);if(this.peekCodePoint(0)===ae&&ce(this.peekCodePoint(1))){this.consumeCodePoint(),t=this.consumeCodePoint();for(var i=[];ce(t)&&i.length<6;)i.push(t),t=this.consumeCodePoint();return{type:30,start:r,end:parseInt(c.apply(void 0,i),16)}}return{type:30,start:r,end:r}},e.prototype.consumeIdentLikeToken=function(){var e=this.consumeName();return"url"===e.toLowerCase()&&40===this.peekCodePoint(0)?(this.consumeCodePoint(),this.consumeUrlToken()):40===this.peekCodePoint(0)?(this.consumeCodePoint(),{type:19,value:e}):{type:20,value:e}},e.prototype.consumeUrlToken=function(){var e=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===se)return{type:22,value:""};var t=this.peekCodePoint(0);if(39===t||34===t){var n=this.consumeStringToken(this.consumeCodePoint());return 0===n.type&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===se||41===this.peekCodePoint(0))?(this.consumeCodePoint(),{type:22,value:n.value}):(this.consumeBadUrlRemnants(),Te)}for(;;){var r=this.consumeCodePoint();if(r===se||41===r)return{type:22,value:c.apply(void 0,e)};if(le(r))return this.consumeWhiteSpace(),this.peekCodePoint(0)===se||41===this.peekCodePoint(0)?(this.consumeCodePoint(),{type:22,value:c.apply(void 0,e)}):(this.consumeBadUrlRemnants(),Te);if(34===r||39===r||40===r||de(r))return this.consumeBadUrlRemnants(),Te;if(92===r){if(!pe(r,this.peekCodePoint(0)))return this.consumeBadUrlRemnants(),Te;e.push(this.consumeEscapedCodePoint())}else e.push(r)}},e.prototype.consumeWhiteSpace=function(){for(;le(this.peekCodePoint(0));)this.consumeCodePoint()},e.prototype.consumeBadUrlRemnants=function(){for(;;){var e=this.consumeCodePoint();if(41===e||e===se)return;pe(e,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},e.prototype.consumeStringSlice=function(e){for(var t="";e>0;){var n=Math.min(5e4,e);t+=c.apply(void 0,this._value.splice(0,n)),e-=n}return this._value.shift(),t},e.prototype.consumeStringToken=function(e){for(var t="",n=0;;){var r=this._value[n];if(r===se||void 0===r||r===e)return{type:0,value:t+=this.consumeStringSlice(n)};if(10===r)return this._value.splice(0,n),De;if(92===r){var i=this._value[n+1];i!==se&&void 0!==i&&(10===i?(t+=this.consumeStringSlice(n),n=-1,this._value.shift()):pe(r,i)&&(t+=this.consumeStringSlice(n),t+=c(this.consumeEscapedCodePoint()),n=-1))}n++}},e.prototype.consumeNumber=function(){var e=[],t=4,n=this.peekCodePoint(0);for(43!==n&&n!==ae||e.push(this.consumeCodePoint());ue(this.peekCodePoint(0));)e.push(this.consumeCodePoint());n=this.peekCodePoint(0);var r=this.peekCodePoint(1);if(46===n&&ue(r))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=8;ue(this.peekCodePoint(0));)e.push(this.consumeCodePoint());n=this.peekCodePoint(0),r=this.peekCodePoint(1);var i=this.peekCodePoint(2);if((69===n||101===n)&&((43===r||r===ae)&&ue(i)||ue(r)))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=8;ue(this.peekCodePoint(0));)e.push(this.consumeCodePoint());return[Ae(e),t]},e.prototype.consumeNumericToken=function(){var e=this.consumeNumber(),t=e[0],n=e[1],r=this.peekCodePoint(0),i=this.peekCodePoint(1),o=this.peekCodePoint(2);return me(r,i,o)?{type:15,number:t,flags:n,unit:this.consumeName()}:37===r?(this.consumeCodePoint(),{type:16,number:t,flags:n}):{type:17,number:t,flags:n}},e.prototype.consumeEscapedCodePoint=function(){var e=this.consumeCodePoint();if(ce(e)){for(var t=c(e);ce(this.peekCodePoint(0))&&t.length<6;)t+=c(this.consumeCodePoint());le(this.peekCodePoint(0))&&this.consumeCodePoint();var n=parseInt(t,16);return 0===n||function(e){return e>=55296&&e<=57343}(n)||n>1114111?65533:n}return e===se?65533:e},e.prototype.consumeName=function(){for(var e="";;){var t=this.consumeCodePoint();if(fe(t))e+=c(t);else{if(!pe(t,this.peekCodePoint(0)))return this.reconsumeCodePoint(t),e;e+=c(this.consumeEscapedCodePoint())}}},e}(),Ue=function(){function e(e){this._tokens=e}return e.create=function(t){var n=new Le;return n.write(t),new e(n.read())},e.parseValue=function(t){return e.create(t).parseComponentValue()},e.parseValues=function(t){return e.create(t).parseComponentValues()},e.prototype.parseComponentValue=function(){for(var e=this.consumeToken();31===e.type;)e=this.consumeToken();if(32===e.type)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(e);var t=this.consumeComponentValue();do{e=this.consumeToken()}while(31===e.type);if(32===e.type)return t;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},e.prototype.parseComponentValues=function(){for(var e=[];;){var t=this.consumeComponentValue();if(32===t.type)return e;e.push(t),e.push()}},e.prototype.consumeComponentValue=function(){var e=this.consumeToken();switch(e.type){case 11:case 28:case 2:return this.consumeSimpleBlock(e.type);case 19:return this.consumeFunction(e)}return e},e.prototype.consumeSimpleBlock=function(e){for(var t={type:e,values:[]},n=this.consumeToken();;){if(32===n.type||Ke(n,e))return t;this.reconsumeToken(n),t.values.push(this.consumeComponentValue()),n=this.consumeToken()}},e.prototype.consumeFunction=function(e){for(var t={name:e.value,values:[],type:18};;){var n=this.consumeToken();if(32===n.type||3===n.type)return t;this.reconsumeToken(n),t.values.push(this.consumeComponentValue())}},e.prototype.consumeToken=function(){var e=this._tokens.shift();return void 0===e?Pe:e},e.prototype.reconsumeToken=function(e){this._tokens.unshift(e)},e}(),ze=function(e){return 15===e.type},He=function(e){return 17===e.type},$e=function(e){return 20===e.type},Qe=function(e){return 0===e.type},Ve=function(e,t){return $e(e)&&e.value===t},qe=function(e){return 31!==e.type},Ge=function(e){return 31!==e.type&&4!==e.type},We=function(e){var t=[],n=[];return e.forEach((function(e){if(4===e.type){if(0===n.length)throw new Error("Error parsing function args, zero tokens for arg");return t.push(n),void(n=[])}31!==e.type&&n.push(e)})),n.length&&t.push(n),t},Ke=function(e,t){return 11===t&&12===e.type||(28===t&&29===e.type||2===t&&3===e.type)},Ye=function(e){return 17===e.type||15===e.type},Xe=function(e){return 16===e.type||Ye(e)},Je=function(e){return e.length>1?[e[0],e[1]]:[e[0]]},Ze={type:17,number:0,flags:4},et={type:16,number:50,flags:4},tt={type:16,number:100,flags:4},nt=function(e,t,n){var r=e[0],i=e[1];return[rt(r,t),rt(void 0!==i?i:r,n)]},rt=function(e,t){if(16===e.type)return e.number/100*t;if(ze(e))switch(e.unit){case"rem":case"em":return 16*e.number;case"px":default:return e.number}return e.number},it=function(e,t){if(15===t.type)switch(t.unit){case"deg":return Math.PI*t.number/180;case"grad":return Math.PI/200*t.number;case"rad":return t.number;case"turn":return 2*Math.PI*t.number}throw new Error("Unsupported angle type")},ot=function(e){return 15===e.type&&("deg"===e.unit||"grad"===e.unit||"rad"===e.unit||"turn"===e.unit)},at=function(e){switch(e.filter($e).map((function(e){return e.value})).join(" ")){case"to bottom right":case"to right bottom":case"left top":case"top left":return[Ze,Ze];case"to top":case"bottom":return st(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[Ze,tt];case"to right":case"left":return st(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[tt,tt];case"to bottom":case"top":return st(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[tt,Ze];case"to left":case"right":return st(270)}return 0},st=function(e){return Math.PI*e/180},ut=function(e,t){if(18===t.type){var n=gt[t.name];if(void 0===n)throw new Error('Attempting to parse an unsupported color function "'+t.name+'"');return n(e,t.values)}if(5===t.type){if(3===t.value.length){var r=t.value.substring(0,1),i=t.value.substring(1,2),o=t.value.substring(2,3);return ht(parseInt(r+r,16),parseInt(i+i,16),parseInt(o+o,16),1)}if(4===t.value.length){r=t.value.substring(0,1),i=t.value.substring(1,2),o=t.value.substring(2,3);var a=t.value.substring(3,4);return ht(parseInt(r+r,16),parseInt(i+i,16),parseInt(o+o,16),parseInt(a+a,16)/255)}if(6===t.value.length){r=t.value.substring(0,2),i=t.value.substring(2,4),o=t.value.substring(4,6);return ht(parseInt(r,16),parseInt(i,16),parseInt(o,16),1)}if(8===t.value.length){r=t.value.substring(0,2),i=t.value.substring(2,4),o=t.value.substring(4,6),a=t.value.substring(6,8);return ht(parseInt(r,16),parseInt(i,16),parseInt(o,16),parseInt(a,16)/255)}}if(20===t.type){var s=vt[t.value.toUpperCase()];if(void 0!==s)return s}return vt.TRANSPARENT},ct=function(e){return 0==(255&e)},lt=function(e){var t=255&e,n=255&e>>8,r=255&e>>16,i=255&e>>24;return t<255?"rgba("+i+","+r+","+n+","+t/255+")":"rgb("+i+","+r+","+n+")"},ht=function(e,t,n,r){return(e<<24|t<<16|n<<8|Math.round(255*r)<<0)>>>0},ft=function(e,t){if(17===e.type)return e.number;if(16===e.type){var n=3===t?1:255;return 3===t?e.number/100*n:Math.round(e.number/100*n)}return 0},dt=function(e,t){var n=t.filter(Ge);if(3===n.length){var r=n.map(ft),i=r[0],o=r[1],a=r[2];return ht(i,o,a,1)}if(4===n.length){var s=n.map(ft),u=(i=s[0],o=s[1],a=s[2],s[3]);return ht(i,o,a,u)}return 0};function pt(e,t,n){return n<0&&(n+=1),n>=1&&(n-=1),n<1/6?(t-e)*n*6+e:n<.5?t:n<2/3?6*(t-e)*(2/3-n)+e:e}var mt=function(e,t){var n=t.filter(Ge),r=n[0],i=n[1],o=n[2],a=n[3],s=(17===r.type?st(r.number):it(e,r))/(2*Math.PI),u=Xe(i)?i.number/100:0,c=Xe(o)?o.number/100:0,l=void 0!==a&&Xe(a)?rt(a,1):1;if(0===u)return ht(255*c,255*c,255*c,1);var h=c<=.5?c*(u+1):c+u-c*u,f=2*c-h,d=pt(f,h,s+1/3),p=pt(f,h,s),m=pt(f,h,s-1/3);return ht(255*d,255*p,255*m,l)},gt={hsl:mt,hsla:mt,rgb:dt,rgba:dt},At=function(e,t){return ut(e,Ue.create(t).parseComponentValue())},vt={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},bt={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(e,t){return t.map((function(e){if($e(e))switch(e.value){case"padding-box":return 1;case"content-box":return 2}return 0}))}},yt={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},wt=function(e,t){var n=ut(e,t[0]),r=t[1];return r&&Xe(r)?{color:n,stop:r}:{color:n,stop:null}},xt=function(e,t){var n=e[0],r=e[e.length-1];null===n.stop&&(n.stop=Ze),null===r.stop&&(r.stop=tt);for(var i=[],o=0,a=0;a<e.length;a++){var s=e[a].stop;if(null!==s){var u=rt(s,t);u>o?i.push(u):i.push(o),o=u}else i.push(null)}var c=null;for(a=0;a<i.length;a++){var l=i[a];if(null===l)null===c&&(c=a);else if(null!==c){for(var h=a-c,f=(l-i[c-1])/(h+1),d=1;d<=h;d++)i[c+d-1]=f*d;c=null}}return e.map((function(e,n){return{color:e.color,stop:Math.max(Math.min(1,i[n]/t),0)}}))},Ct=function(e,t,n){var r="number"==typeof e?e:function(e,t,n){var r=t/2,i=n/2,o=rt(e[0],t)-r,a=i-rt(e[1],n);return(Math.atan2(a,o)+2*Math.PI)%(2*Math.PI)}(e,t,n),i=Math.abs(t*Math.sin(r))+Math.abs(n*Math.cos(r)),o=t/2,a=n/2,s=i/2,u=Math.sin(r-Math.PI/2)*s,c=Math.cos(r-Math.PI/2)*s;return[i,o-c,o+c,a-u,a+u]},kt=function(e,t){return Math.sqrt(e*e+t*t)},Et=function(e,t,n,r,i){return[[0,0],[0,t],[e,0],[e,t]].reduce((function(e,t){var o=t[0],a=t[1],s=kt(n-o,r-a);return(i?s<e.optimumDistance:s>e.optimumDistance)?{optimumCorner:t,optimumDistance:s}:e}),{optimumDistance:i?1/0:-1/0,optimumCorner:null}).optimumCorner},St=function(e,t,n,r,i){var o=0,a=0;switch(e.size){case 0:0===e.shape?o=a=Math.min(Math.abs(t),Math.abs(t-r),Math.abs(n),Math.abs(n-i)):1===e.shape&&(o=Math.min(Math.abs(t),Math.abs(t-r)),a=Math.min(Math.abs(n),Math.abs(n-i)));break;case 2:if(0===e.shape)o=a=Math.min(kt(t,n),kt(t,n-i),kt(t-r,n),kt(t-r,n-i));else if(1===e.shape){var s=Math.min(Math.abs(n),Math.abs(n-i))/Math.min(Math.abs(t),Math.abs(t-r)),u=Et(r,i,t,n,!0),c=u[0],l=u[1];a=s*(o=kt(c-t,(l-n)/s))}break;case 1:0===e.shape?o=a=Math.max(Math.abs(t),Math.abs(t-r),Math.abs(n),Math.abs(n-i)):1===e.shape&&(o=Math.max(Math.abs(t),Math.abs(t-r)),a=Math.max(Math.abs(n),Math.abs(n-i)));break;case 3:if(0===e.shape)o=a=Math.max(kt(t,n),kt(t,n-i),kt(t-r,n),kt(t-r,n-i));else if(1===e.shape){s=Math.max(Math.abs(n),Math.abs(n-i))/Math.max(Math.abs(t),Math.abs(t-r));var h=Et(r,i,t,n,!1);c=h[0],l=h[1];a=s*(o=kt(c-t,(l-n)/s))}}return Array.isArray(e.size)&&(o=rt(e.size[0],r),a=2===e.size.length?rt(e.size[1],i):o),[o,a]},_t=function(e,t){var n=st(180),r=[];return We(t).forEach((function(t,i){if(0===i){var o=t[0];if(20===o.type&&-1!==["top","left","right","bottom"].indexOf(o.value))return void(n=at(t));if(ot(o))return void(n=(it(e,o)+st(270))%st(360))}var a=wt(e,t);r.push(a)})),{angle:n,stops:r,type:1}},Ot="closest-side",Tt="farthest-side",Dt="closest-corner",Bt="farthest-corner",It="ellipse",Mt="contain",jt=function(e,t){var n=0,r=3,i=[],o=[];return We(t).forEach((function(t,a){var s=!0;if(0===a?s=t.reduce((function(e,t){if($e(t))switch(t.value){case"center":return o.push(et),!1;case"top":case"left":return o.push(Ze),!1;case"right":case"bottom":return o.push(tt),!1}else if(Xe(t)||Ye(t))return o.push(t),!1;return e}),s):1===a&&(s=t.reduce((function(e,t){if($e(t))switch(t.value){case"circle":return n=0,!1;case It:return n=1,!1;case Mt:case Ot:return r=0,!1;case Tt:return r=1,!1;case Dt:return r=2,!1;case"cover":case Bt:return r=3,!1}else if(Ye(t)||Xe(t))return Array.isArray(r)||(r=[]),r.push(t),!1;return e}),s)),s){var u=wt(e,t);i.push(u)}})),{size:r,shape:n,stops:i,position:o,type:2}},Nt=function(e,t){if(22===t.type){var n={url:t.value,type:0};return e.cache.addImage(t.value),n}if(18===t.type){var r=Lt[t.name];if(void 0===r)throw new Error('Attempting to parse an unsupported image function "'+t.name+'"');return r(e,t.values)}throw new Error("Unsupported image type "+t.type)};var Ft,Rt,Pt,Lt={"linear-gradient":function(e,t){var n=st(180),r=[];return We(t).forEach((function(t,i){if(0===i){var o=t[0];if(20===o.type&&"to"===o.value)return void(n=at(t));if(ot(o))return void(n=it(e,o))}var a=wt(e,t);r.push(a)})),{angle:n,stops:r,type:1}},"-moz-linear-gradient":_t,"-ms-linear-gradient":_t,"-o-linear-gradient":_t,"-webkit-linear-gradient":_t,"radial-gradient":function(e,t){var n=0,r=3,i=[],o=[];return We(t).forEach((function(t,a){var s=!0;if(0===a){var u=!1;s=t.reduce((function(e,t){if(u)if($e(t))switch(t.value){case"center":return o.push(et),e;case"top":case"left":return o.push(Ze),e;case"right":case"bottom":return o.push(tt),e}else(Xe(t)||Ye(t))&&o.push(t);else if($e(t))switch(t.value){case"circle":return n=0,!1;case It:return n=1,!1;case"at":return u=!0,!1;case Ot:return r=0,!1;case"cover":case Tt:return r=1,!1;case Mt:case Dt:return r=2,!1;case Bt:return r=3,!1}else if(Ye(t)||Xe(t))return Array.isArray(r)||(r=[]),r.push(t),!1;return e}),s)}if(s){var c=wt(e,t);i.push(c)}})),{size:r,shape:n,stops:i,position:o,type:2}},"-moz-radial-gradient":jt,"-ms-radial-gradient":jt,"-o-radial-gradient":jt,"-webkit-radial-gradient":jt,"-webkit-gradient":function(e,t){var n=st(180),r=[],i=1;return We(t).forEach((function(t,n){var o=t[0];if(0===n){if($e(o)&&"linear"===o.value)return void(i=1);if($e(o)&&"radial"===o.value)return void(i=2)}if(18===o.type)if("from"===o.name){var a=ut(e,o.values[0]);r.push({stop:Ze,color:a})}else if("to"===o.name){a=ut(e,o.values[0]);r.push({stop:tt,color:a})}else if("color-stop"===o.name){var s=o.values.filter(Ge);if(2===s.length){a=ut(e,s[1]);var u=s[0];He(u)&&r.push({stop:{type:16,number:100*u.number,flags:u.flags},color:a})}}})),1===i?{angle:(n+st(180))%st(360),stops:r,type:i}:{size:3,shape:0,stops:r,position:[],type:i}}},Ut={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(e,t){if(0===t.length)return[];var n=t[0];return 20===n.type&&"none"===n.value?[]:t.filter((function(e){return Ge(e)&&function(e){return!(20===e.type&&"none"===e.value||18===e.type&&!Lt[e.name])}(e)})).map((function(t){return Nt(e,t)}))}},zt={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(e,t){return t.map((function(e){if($e(e))switch(e.value){case"padding-box":return 1;case"content-box":return 2}return 0}))}},Ht={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(e,t){return We(t).map((function(e){return e.filter(Xe)})).map(Je)}},$t={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(e,t){return We(t).map((function(e){return e.filter($e).map((function(e){return e.value})).join(" ")})).map(Qt)}},Qt=function(e){switch(e){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;case"repeat":default:return 0}},Vt=Ft||(Ft={}),qt=(Vt.AUTO="auto",Vt.CONTAIN="contain",Vt.COVER="cover",{name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(e,t){return We(t).map((function(e){return e.filter(Gt)}))}}),Gt=function(e){return $e(e)||Xe(e)},Wt=function(e){return{name:"border-"+e+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},Kt=Wt("top"),Yt=Wt("right"),Xt=Wt("bottom"),Jt=Wt("left"),Zt=function(e){return{name:"border-radius-"+e,initialValue:"0 0",prefix:!1,type:1,parse:function(e,t){return Je(t.filter(Xe))}}},en=Zt("top-left"),tn=Zt("top-right"),nn=Zt("bottom-right"),rn=Zt("bottom-left"),on=function(e){return{name:"border-"+e+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(e,t){switch(t){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},an=on("top"),sn=on("right"),un=on("bottom"),cn=on("left"),ln=function(e){return{name:"border-"+e+"-width",initialValue:"0",type:0,prefix:!1,parse:function(e,t){return ze(t)?t.number:0}}},hn=ln("top"),fn=ln("right"),dn=ln("bottom"),pn=ln("left"),mn={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},gn={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(e,t){switch(t){case"rtl":return 1;case"ltr":default:return 0}}},An={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(e,t){return t.filter($e).reduce((function(e,t){return e|vn(t.value)}),0)}},vn=function(e){switch(e){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},bn={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},yn={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(e,t){return 20===t.type&&"normal"===t.value?0:17===t.type||15===t.type?t.number:0}},wn=Rt||(Rt={}),xn=(wn.NORMAL="normal",wn.STRICT="strict",{name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){switch(t){case"strict":return Rt.STRICT;case"normal":default:return Rt.NORMAL}}}),Cn={name:"line-height",initialValue:"normal",prefix:!1,type:4},kn=function(e,t){return $e(e)&&"normal"===e.value?1.2*t:17===e.type?t*e.number:Xe(e)?rt(e,t):t},En={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(e,t){return 20===t.type&&"none"===t.value?null:Nt(e,t)}},Sn={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(e,t){switch(t){case"inside":return 0;case"outside":default:return 1}}},_n={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;case"none":default:return-1}}},On=function(e){return{name:"margin-"+e,initialValue:"0",prefix:!1,type:4}},Tn=On("top"),Dn=On("right"),Bn=On("bottom"),In=On("left"),Mn={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(e,t){return t.filter($e).map((function(e){switch(e.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;case"visible":default:return 0}}))}},jn={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){switch(t){case"break-word":return"break-word";case"normal":default:return"normal"}}},Nn=function(e){return{name:"padding-"+e,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},Fn=Nn("top"),Rn=Nn("right"),Pn=Nn("bottom"),Ln=Nn("left"),Un={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(e,t){switch(t){case"right":return 2;case"center":case"justify":return 1;case"left":default:return 0}}},zn={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(e,t){switch(t){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},Hn={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(e,t){return 1===t.length&&Ve(t[0],"none")?[]:We(t).map((function(t){for(var n={color:vt.TRANSPARENT,offsetX:Ze,offsetY:Ze,blur:Ze},r=0,i=0;i<t.length;i++){var o=t[i];Ye(o)?(0===r?n.offsetX=o:1===r?n.offsetY=o:n.blur=o,r++):n.color=ut(e,o)}return n}))}},$n={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},Qn={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(e,t){if(20===t.type&&"none"===t.value)return null;if(18===t.type){var n=Vn[t.name];if(void 0===n)throw new Error('Attempting to parse an unsupported transform function "'+t.name+'"');return n(t.values)}return null}},Vn={matrix:function(e){var t=e.filter((function(e){return 17===e.type})).map((function(e){return e.number}));return 6===t.length?t:null},matrix3d:function(e){var t=e.filter((function(e){return 17===e.type})).map((function(e){return e.number})),n=t[0],r=t[1];t[2],t[3];var i=t[4],o=t[5];t[6],t[7],t[8],t[9],t[10],t[11];var a=t[12],s=t[13];return t[14],t[15],16===t.length?[n,r,i,o,a,s]:null}},qn={type:16,number:50,flags:4},Gn=[qn,qn],Wn={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(e,t){var n=t.filter(Xe);return 2!==n.length?Gn:[n[0],n[1]]}},Kn={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"hidden":return 1;case"collapse":return 2;case"visible":default:return 0}}},Yn=Pt||(Pt={});Yn.NORMAL="normal",Yn.BREAK_ALL="break-all",Yn.KEEP_ALL="keep-all";for(var Xn={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){switch(t){case"break-all":return Pt.BREAK_ALL;case"keep-all":return Pt.KEEP_ALL;case"normal":default:return Pt.NORMAL}}},Jn={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(e,t){if(20===t.type)return{auto:!0,order:0};if(He(t))return{auto:!1,order:t.number};throw new Error("Invalid z-index number parsed")}},Zn={name:"time",parse:function(e,t){if(15===t.type)switch(t.unit.toLowerCase()){case"s":return 1e3*t.number;case"ms":return t.number}throw new Error("Unsupported time type")}},er={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(e,t){return He(t)?t.number:1}},tr={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},nr={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(e,t){return t.filter($e).map((function(e){switch(e.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0})).filter((function(e){return 0!==e}))}},rr={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(e,t){var n=[],r=[];return t.forEach((function(e){switch(e.type){case 20:case 0:n.push(e.value);break;case 17:n.push(e.number.toString());break;case 4:r.push(n.join(" ")),n.length=0}})),n.length&&r.push(n.join(" ")),r.map((function(e){return-1===e.indexOf(" ")?e:"'"+e+"'"}))}},ir={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},or={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(e,t){if(He(t))return t.number;if($e(t))switch(t.value){case"bold":return 700;case"normal":default:return 400}return 400}},ar={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(e,t){return t.filter($e).map((function(e){return e.value}))}},sr={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){switch(t){case"oblique":return"oblique";case"italic":return"italic";case"normal":default:return"normal"}}},ur=function(e,t){return 0!=(e&t)},cr={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(e,t){if(0===t.length)return[];var n=t[0];return 20===n.type&&"none"===n.value?[]:t}},lr={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(e,t){if(0===t.length)return null;var n=t[0];if(20===n.type&&"none"===n.value)return null;for(var r=[],i=t.filter(qe),o=0;o<i.length;o++){var a=i[o],s=i[o+1];if(20===a.type){var u=s&&He(s)?s.number:1;r.push({counter:a.value,increment:u})}}return r}},hr={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(e,t){if(0===t.length)return[];for(var n=[],r=t.filter(qe),i=0;i<r.length;i++){var o=r[i],a=r[i+1];if($e(o)&&"none"!==o.value){var s=a&&He(a)?a.number:0;n.push({counter:o.value,reset:s})}}return n}},fr={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(e,t){return t.filter(ze).map((function(t){return Zn.parse(e,t)}))}},dr={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(e,t){if(0===t.length)return null;var n=t[0];if(20===n.type&&"none"===n.value)return null;var r=[],i=t.filter(Qe);if(i.length%2!=0)return null;for(var o=0;o<i.length;o+=2){var a=i[o].value,s=i[o+1].value;r.push({open:a,close:s})}return r}},pr=function(e,t,n){if(!e)return"";var r=e[Math.min(t,e.length-1)];return r?n?r.open:r.close:""},mr={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(e,t){return 1===t.length&&Ve(t[0],"none")?[]:We(t).map((function(t){for(var n={color:255,offsetX:Ze,offsetY:Ze,blur:Ze,spread:Ze,inset:!1},r=0,i=0;i<t.length;i++){var o=t[i];Ve(o,"inset")?n.inset=!0:Ye(o)?(0===r?n.offsetX=o:1===r?n.offsetY=o:2===r?n.blur=o:n.spread=o,r++):n.color=ut(e,o)}return n}))}},gr={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(e,t){var n=[];return t.filter($e).forEach((function(e){switch(e.value){case"stroke":n.push(1);break;case"fill":n.push(0);break;case"markers":n.push(2)}})),[0,1,2].forEach((function(e){-1===n.indexOf(e)&&n.push(e)})),n}},Ar={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},vr={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(e,t){return ze(t)?t.number:0}},br=function(){function e(e,t){var n,r;this.animationDuration=xr(e,fr,t.animationDuration),this.backgroundClip=xr(e,bt,t.backgroundClip),this.backgroundColor=xr(e,yt,t.backgroundColor),this.backgroundImage=xr(e,Ut,t.backgroundImage),this.backgroundOrigin=xr(e,zt,t.backgroundOrigin),this.backgroundPosition=xr(e,Ht,t.backgroundPosition),this.backgroundRepeat=xr(e,$t,t.backgroundRepeat),this.backgroundSize=xr(e,qt,t.backgroundSize),this.borderTopColor=xr(e,Kt,t.borderTopColor),this.borderRightColor=xr(e,Yt,t.borderRightColor),this.borderBottomColor=xr(e,Xt,t.borderBottomColor),this.borderLeftColor=xr(e,Jt,t.borderLeftColor),this.borderTopLeftRadius=xr(e,en,t.borderTopLeftRadius),this.borderTopRightRadius=xr(e,tn,t.borderTopRightRadius),this.borderBottomRightRadius=xr(e,nn,t.borderBottomRightRadius),this.borderBottomLeftRadius=xr(e,rn,t.borderBottomLeftRadius),this.borderTopStyle=xr(e,an,t.borderTopStyle),this.borderRightStyle=xr(e,sn,t.borderRightStyle),this.borderBottomStyle=xr(e,un,t.borderBottomStyle),this.borderLeftStyle=xr(e,cn,t.borderLeftStyle),this.borderTopWidth=xr(e,hn,t.borderTopWidth),this.borderRightWidth=xr(e,fn,t.borderRightWidth),this.borderBottomWidth=xr(e,dn,t.borderBottomWidth),this.borderLeftWidth=xr(e,pn,t.borderLeftWidth),this.boxShadow=xr(e,mr,t.boxShadow),this.color=xr(e,mn,t.color),this.direction=xr(e,gn,t.direction),this.display=xr(e,An,t.display),this.float=xr(e,bn,t.cssFloat),this.fontFamily=xr(e,rr,t.fontFamily),this.fontSize=xr(e,ir,t.fontSize),this.fontStyle=xr(e,sr,t.fontStyle),this.fontVariant=xr(e,ar,t.fontVariant),this.fontWeight=xr(e,or,t.fontWeight),this.letterSpacing=xr(e,yn,t.letterSpacing),this.lineBreak=xr(e,xn,t.lineBreak),this.lineHeight=xr(e,Cn,t.lineHeight),this.listStyleImage=xr(e,En,t.listStyleImage),this.listStylePosition=xr(e,Sn,t.listStylePosition),this.listStyleType=xr(e,_n,t.listStyleType),this.marginTop=xr(e,Tn,t.marginTop),this.marginRight=xr(e,Dn,t.marginRight),this.marginBottom=xr(e,Bn,t.marginBottom),this.marginLeft=xr(e,In,t.marginLeft),this.opacity=xr(e,er,t.opacity);var i=xr(e,Mn,t.overflow);this.overflowX=i[0],this.overflowY=i[i.length>1?1:0],this.overflowWrap=xr(e,jn,t.overflowWrap),this.paddingTop=xr(e,Fn,t.paddingTop),this.paddingRight=xr(e,Rn,t.paddingRight),this.paddingBottom=xr(e,Pn,t.paddingBottom),this.paddingLeft=xr(e,Ln,t.paddingLeft),this.paintOrder=xr(e,gr,t.paintOrder),this.position=xr(e,zn,t.position),this.textAlign=xr(e,Un,t.textAlign),this.textDecorationColor=xr(e,tr,null!==(n=t.textDecorationColor)&&void 0!==n?n:t.color),this.textDecorationLine=xr(e,nr,null!==(r=t.textDecorationLine)&&void 0!==r?r:t.textDecoration),this.textShadow=xr(e,Hn,t.textShadow),this.textTransform=xr(e,$n,t.textTransform),this.transform=xr(e,Qn,t.transform),this.transformOrigin=xr(e,Wn,t.transformOrigin),this.visibility=xr(e,Kn,t.visibility),this.webkitTextStrokeColor=xr(e,Ar,t.webkitTextStrokeColor),this.webkitTextStrokeWidth=xr(e,vr,t.webkitTextStrokeWidth),this.wordBreak=xr(e,Xn,t.wordBreak),this.zIndex=xr(e,Jn,t.zIndex)}return e.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&0===this.visibility},e.prototype.isTransparent=function(){return ct(this.backgroundColor)},e.prototype.isTransformed=function(){return null!==this.transform},e.prototype.isPositioned=function(){return 0!==this.position},e.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},e.prototype.isFloating=function(){return 0!==this.float},e.prototype.isInlineLevel=function(){return ur(this.display,4)||ur(this.display,33554432)||ur(this.display,268435456)||ur(this.display,536870912)||ur(this.display,67108864)||ur(this.display,134217728)},e}(),yr=function(e,t){this.content=xr(e,cr,t.content),this.quotes=xr(e,dr,t.quotes)},wr=function(e,t){this.counterIncrement=xr(e,lr,t.counterIncrement),this.counterReset=xr(e,hr,t.counterReset)},xr=function(e,t,n){var r=new Le,i=null!=n?n.toString():t.initialValue;r.write(i);var o=new Ue(r.read());switch(t.type){case 2:var a=o.parseComponentValue();return t.parse(e,$e(a)?a.value:t.initialValue);case 0:return t.parse(e,o.parseComponentValue());case 1:return t.parse(e,o.parseComponentValues());case 4:return o.parseComponentValue();case 3:switch(t.format){case"angle":return it(e,o.parseComponentValue());case"color":return ut(e,o.parseComponentValue());case"image":return Nt(e,o.parseComponentValue());case"length":var s=o.parseComponentValue();return Ye(s)?s:Ze;case"length-percentage":var u=o.parseComponentValue();return Xe(u)?u:Ze;case"time":return Zn.parse(e,o.parseComponentValue())}}},Cr=function(e,t){var n=function(e){switch(e.getAttribute("data-html2canvas-debug")){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}}(e);return 1===n||t===n},kr=function(e,t){this.context=e,this.textNodes=[],this.elements=[],this.flags=0,Cr(t,3),this.styles=new br(e,window.getComputedStyle(t,null)),Ti(t)&&(this.styles.animationDuration.some((function(e){return e>0}))&&(t.style.animationDuration="0s"),null!==this.styles.transform&&(t.style.transform="none")),this.bounds=s(this.context,t),Cr(t,4)&&(this.flags|=16)},Er="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Sr="undefined"==typeof Uint8Array?[]:new Uint8Array(256),_r=0;_r<Er.length;_r++)Sr[Er.charCodeAt(_r)]=_r;for(var Or=function(e,t,n){return e.slice?e.slice(t,n):new Uint16Array(Array.prototype.slice.call(e,t,n))},Tr=function(){function e(e,t,n,r,i,o){this.initialValue=e,this.errorValue=t,this.highStart=n,this.highValueIndex=r,this.index=i,this.data=o}return e.prototype.get=function(e){var t;if(e>=0){if(e<55296||e>56319&&e<=65535)return t=((t=this.index[e>>5])<<2)+(31&e),this.data[t];if(e<=65535)return t=((t=this.index[2048+(e-55296>>5)])<<2)+(31&e),this.data[t];if(e<this.highStart)return t=2080+(e>>11),t=this.index[t],t+=e>>5&63,t=((t=this.index[t])<<2)+(31&e),this.data[t];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},e}(),Dr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Br="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Ir=0;Ir<Dr.length;Ir++)Br[Dr.charCodeAt(Ir)]=Ir;var Mr,jr,Nr=8,Fr=9,Rr=11,Pr=12,Lr=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(String.fromCodePoint)return String.fromCodePoint.apply(String,e);var n=e.length;if(!n)return"";for(var r=[],i=-1,o="";++i<n;){var a=e[i];a<=65535?r.push(a):(a-=65536,r.push(55296+(a>>10),a%1024+56320)),(i+1===n||r.length>16384)&&(o+=String.fromCharCode.apply(String,r),r.length=0)}return o},Ur=function(e,t){var n=function(e){var t,n,r,i,o,a=.75*e.length,s=e.length,u=0;"="===e[e.length-1]&&(a--,"="===e[e.length-2]&&a--);var c="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&void 0!==Uint8Array.prototype.slice?new ArrayBuffer(a):new Array(a),l=Array.isArray(c)?c:new Uint8Array(c);for(t=0;t<s;t+=4)n=Sr[e.charCodeAt(t)],r=Sr[e.charCodeAt(t+1)],i=Sr[e.charCodeAt(t+2)],o=Sr[e.charCodeAt(t+3)],l[u++]=n<<2|r>>4,l[u++]=(15&r)<<4|i>>2,l[u++]=(3&i)<<6|63&o;return c}(e),r=Array.isArray(n)?function(e){for(var t=e.length,n=[],r=0;r<t;r+=4)n.push(e[r+3]<<24|e[r+2]<<16|e[r+1]<<8|e[r]);return n}(n):new Uint32Array(n),i=Array.isArray(n)?function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n.push(e[r+1]<<8|e[r]);return n}(n):new Uint16Array(n),o=Or(i,12,r[4]/2),a=2===r[5]?Or(i,(24+r[4])/2):function(e,t,n){return e.slice?e.slice(t,n):new Uint32Array(Array.prototype.slice.call(e,t,n))}(r,Math.ceil((24+r[4])/4));return new Tr(r[0],r[1],r[2],r[3],o,a)}("[encoded data, 26156 characters]"),zr="×",Hr=function(e){return Ur.get(e)},$r=function(e,t,n){var r=n-2,i=t[r],o=t[n-1],a=t[n];if(2===o&&3===a)return zr;if(2===o||3===o||4===o)return"÷";if(2===a||3===a||4===a)return"÷";if(o===Nr&&-1!==[Nr,Fr,Rr,Pr].indexOf(a))return zr;if(!(o!==Rr&&o!==Fr||a!==Fr&&10!==a))return zr;if((o===Pr||10===o)&&10===a)return zr;if(13===a||5===a)return zr;if(7===a)return zr;if(1===o)return zr;if(13===o&&14===a){for(;5===i;)i=t[--r];if(14===i)return zr}if(15===o&&15===a){for(var s=0;15===i;)s++,i=t[--r];if(s%2==0)return zr}return"÷"},Qr=function(e){var t=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){var o=e.charCodeAt(n++);56320==(64512&o)?t.push(((1023&i)<<10)+(1023&o)+65536):(t.push(i),n--)}else t.push(i)}return t}(e),n=t.length,r=0,i=0,o=t.map(Hr);return{next:function(){if(r>=n)return{done:!0,value:null};for(var e=zr;r<n&&(e=$r(0,o,++r))===zr;);if(e!==zr||r===n){var a=Lr.apply(null,t.slice(i,r));return i=r,{value:a,done:!1}}return{done:!0,value:null}}}},Vr=function(e){return 0===e[0]&&255===e[1]&&0===e[2]&&255===e[3]},qr=function(e,t,n,r,i){var o="http://www.w3.org/2000/svg",a=document.createElementNS(o,"svg"),s=document.createElementNS(o,"foreignObject");return a.setAttributeNS(null,"width",e.toString()),a.setAttributeNS(null,"height",t.toString()),s.setAttributeNS(null,"width","100%"),s.setAttributeNS(null,"height","100%"),s.setAttributeNS(null,"x",n.toString()),s.setAttributeNS(null,"y",r.toString()),s.setAttributeNS(null,"externalResourcesRequired","true"),a.appendChild(s),s.appendChild(i),a},Gr=function(e){return new Promise((function(t,n){var r=new Image;r.onload=function(){return t(r)},r.onerror=n,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent((new XMLSerializer).serializeToString(e))}))},Wr={get SUPPORT_RANGE_BOUNDS(){var e=function(e){if(e.createRange){var t=e.createRange();if(t.getBoundingClientRect){var n=e.createElement("boundtest");n.style.height="123px",n.style.display="block",e.body.appendChild(n),t.selectNode(n);var r=t.getBoundingClientRect(),i=Math.round(r.height);if(e.body.removeChild(n),123===i)return!0}}return!1}(document);return Object.defineProperty(Wr,"SUPPORT_RANGE_BOUNDS",{value:e}),e},get SUPPORT_WORD_BREAKING(){var e=Wr.SUPPORT_RANGE_BOUNDS&&function(e){var t=e.createElement("boundtest");t.style.width="50px",t.style.display="block",t.style.fontSize="12px",t.style.letterSpacing="0px",t.style.wordSpacing="0px",e.body.appendChild(t);var n=e.createRange();t.innerHTML="function"==typeof"".repeat?"&#128104;".repeat(10):"";var r=t.firstChild,i=u(r.data).map((function(e){return c(e)})),o=0,a={},s=i.every((function(e,t){n.setStart(r,o),n.setEnd(r,o+e.length);var i=n.getBoundingClientRect();o+=e.length;var s=i.x>a.x||i.y>a.y;return a=i,0===t||s}));return e.body.removeChild(t),s}(document);return Object.defineProperty(Wr,"SUPPORT_WORD_BREAKING",{value:e}),e},get SUPPORT_SVG_DRAWING(){var e=function(e){var t=new Image,n=e.createElement("canvas"),r=n.getContext("2d");if(!r)return!1;t.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{r.drawImage(t,0,0),n.toDataURL()}catch(e){return!1}return!0}(document);return Object.defineProperty(Wr,"SUPPORT_SVG_DRAWING",{value:e}),e},get SUPPORT_FOREIGNOBJECT_DRAWING(){var e="function"==typeof Array.from&&"function"==typeof window.fetch?function(e){var t=e.createElement("canvas"),n=100;t.width=n,t.height=n;var r=t.getContext("2d");if(!r)return Promise.reject(!1);r.fillStyle="rgb(0, 255, 0)",r.fillRect(0,0,n,n);var i=new Image,o=t.toDataURL();i.src=o;var a=qr(n,n,0,0,i);return r.fillStyle="red",r.fillRect(0,0,n,n),Gr(a).then((function(t){r.drawImage(t,0,0);var i=r.getImageData(0,0,n,n).data;r.fillStyle="red",r.fillRect(0,0,n,n);var a=e.createElement("div");return a.style.backgroundImage="url("+o+")",a.style.height="100px",Vr(i)?Gr(qr(n,n,0,0,a)):Promise.reject(!1)})).then((function(e){return r.drawImage(e,0,0),Vr(r.getImageData(0,0,n,n).data)})).catch((function(){return!1}))}(document):Promise.resolve(!1);return Object.defineProperty(Wr,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:e}),e},get SUPPORT_CORS_IMAGES(){var e=void 0!==(new Image).crossOrigin;return Object.defineProperty(Wr,"SUPPORT_CORS_IMAGES",{value:e}),e},get SUPPORT_RESPONSE_TYPE(){var e="string"==typeof(new XMLHttpRequest).responseType;return Object.defineProperty(Wr,"SUPPORT_RESPONSE_TYPE",{value:e}),e},get SUPPORT_CORS_XHR(){var e="withCredentials"in new XMLHttpRequest;return Object.defineProperty(Wr,"SUPPORT_CORS_XHR",{value:e}),e},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var e=!("undefined"==typeof Intl||!Intl.Segmenter);return Object.defineProperty(Wr,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:e}),e}},Kr=function(e,t){this.text=e,this.bounds=t},Yr=function(e,t){var n=t.ownerDocument;if(n){var r=n.createElement("html2canvaswrapper");r.appendChild(t.cloneNode(!0));var i=t.parentNode;if(i){i.replaceChild(r,t);var o=s(e,r);return r.firstChild&&i.replaceChild(r.firstChild,r),o}}return a.EMPTY},Xr=function(e,t,n){var r=e.ownerDocument;if(!r)throw new Error("Node has no owner document");var i=r.createRange();return i.setStart(e,t),i.setEnd(e,t+n),i},Jr=function(e){if(Wr.SUPPORT_NATIVE_TEXT_SEGMENTATION){var t=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(t.segment(e)).map((function(e){return e.segment}))}return function(e){for(var t,n=Qr(e),r=[];!(t=n.next()).done;)t.value&&r.push(t.value.slice());return r}(e)},Zr=function(e,t){return 0!==t.letterSpacing?Jr(e):function(e,t){if(Wr.SUPPORT_NATIVE_TEXT_SEGMENTATION){var n=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(n.segment(e)).map((function(e){return e.segment}))}return ti(e,t)}(e,t)},ei=[32,160,4961,65792,65793,4153,4241],ti=function(e,t){for(var n,r=function(e,t){var n=u(e),r=ie(n,t),i=r[0],o=r[1],a=r[2],s=n.length,c=0,l=0;return{next:function(){if(l>=s)return{done:!0,value:null};for(var e=q;l<s&&(e=re(n,o,i,++l,a))===q;);if(e!==q||l===s){var t=new oe(n,e,c,l);return c=l,{value:t,done:!1}}return{done:!0,value:null}}}}(e,{lineBreak:t.lineBreak,wordBreak:"break-word"===t.overflowWrap?"break-word":t.wordBreak}),i=[],o=function(){if(n.value){var e=n.value.slice(),t=u(e),r="";t.forEach((function(e){-1===ei.indexOf(e)?r+=c(e):(r.length&&i.push(r),i.push(c(e)),r="")})),r.length&&i.push(r)}};!(n=r.next()).done;)o();return i},ni=function(e,t,n){this.text=ri(t.data,n.textTransform),this.textBounds=function(e,t,n,r){var i=Zr(t,n),o=[],s=0;return i.forEach((function(t){if(n.textDecorationLine.length||t.trim().length>0)if(Wr.SUPPORT_RANGE_BOUNDS){var i=Xr(r,s,t.length).getClientRects();if(i.length>1){var u=Jr(t),c=0;u.forEach((function(t){o.push(new Kr(t,a.fromDOMRectList(e,Xr(r,c+s,t.length).getClientRects()))),c+=t.length}))}else o.push(new Kr(t,a.fromDOMRectList(e,i)))}else{var l=r.splitText(t.length);o.push(new Kr(t,Yr(e,r))),r=l}else Wr.SUPPORT_RANGE_BOUNDS||(r=r.splitText(t.length));s+=t.length})),o}(e,this.text,n,t)},ri=function(e,t){switch(t){case 1:return e.toLowerCase();case 3:return e.replace(ii,oi);case 2:return e.toUpperCase();default:return e}},ii=/(^|\s|:|-|\(|\))([a-z])/g,oi=function(e,t,n){return e.length>0?t+n.toUpperCase():e},ai=function(e){function n(t,n){var r=e.call(this,t,n)||this;return r.src=n.currentSrc||n.src,r.intrinsicWidth=n.naturalWidth,r.intrinsicHeight=n.naturalHeight,r.context.cache.addImage(r.src),r}return t(n,e),n}(kr),si=function(e){function n(t,n){var r=e.call(this,t,n)||this;return r.canvas=n,r.intrinsicWidth=n.width,r.intrinsicHeight=n.height,r}return t(n,e),n}(kr),ui=function(e){function n(t,n){var r=e.call(this,t,n)||this,i=new XMLSerializer,o=s(t,n);return n.setAttribute("width",o.width+"px"),n.setAttribute("height",o.height+"px"),r.svg="data:image/svg+xml,"+encodeURIComponent(i.serializeToString(n)),r.intrinsicWidth=n.width.baseVal.value,r.intrinsicHeight=n.height.baseVal.value,r.context.cache.addImage(r.svg),r}return t(n,e),n}(kr),ci=function(e){function n(t,n){var r=e.call(this,t,n)||this;return r.value=n.value,r}return t(n,e),n}(kr),li=function(e){function n(t,n){var r=e.call(this,t,n)||this;return r.start=n.start,r.reversed="boolean"==typeof n.reversed&&!0===n.reversed,r}return t(n,e),n}(kr),hi=[{type:15,flags:0,unit:"px",number:3}],fi=[{type:16,flags:0,number:50}],di="checkbox",pi="radio",mi="password",gi=707406591,Ai=function(e){function n(t,n){var r=e.call(this,t,n)||this;switch(r.type=n.type.toLowerCase(),r.checked=n.checked,r.value=function(e){var t=e.type===mi?new Array(e.value.length+1).join("•"):e.value;return 0===t.length?e.placeholder||"":t}(n),r.type!==di&&r.type!==pi||(r.styles.backgroundColor=3739148031,r.styles.borderTopColor=r.styles.borderRightColor=r.styles.borderBottomColor=r.styles.borderLeftColor=2779096575,r.styles.borderTopWidth=r.styles.borderRightWidth=r.styles.borderBottomWidth=r.styles.borderLeftWidth=1,r.styles.borderTopStyle=r.styles.borderRightStyle=r.styles.borderBottomStyle=r.styles.borderLeftStyle=1,r.styles.backgroundClip=[0],r.styles.backgroundOrigin=[0],r.bounds=function(e){return e.width>e.height?new a(e.left+(e.width-e.height)/2,e.top,e.height,e.height):e.width<e.height?new a(e.left,e.top+(e.height-e.width)/2,e.width,e.width):e}(r.bounds)),r.type){case di:r.styles.borderTopRightRadius=r.styles.borderTopLeftRadius=r.styles.borderBottomRightRadius=r.styles.borderBottomLeftRadius=hi;break;case pi:r.styles.borderTopRightRadius=r.styles.borderTopLeftRadius=r.styles.borderBottomRightRadius=r.styles.borderBottomLeftRadius=fi}return r}return t(n,e),n}(kr),vi=function(e){function n(t,n){var r=e.call(this,t,n)||this,i=n.options[n.selectedIndex||0];return r.value=i&&i.text||"",r}return t(n,e),n}(kr),bi=function(e){function n(t,n){var r=e.call(this,t,n)||this;return r.value=n.value,r}return t(n,e),n}(kr),yi=function(e){function n(t,n){var r=e.call(this,t,n)||this;r.src=n.src,r.width=parseInt(n.width,10)||0,r.height=parseInt(n.height,10)||0,r.backgroundColor=r.styles.backgroundColor;try{if(n.contentWindow&&n.contentWindow.document&&n.contentWindow.document.documentElement){r.tree=ki(t,n.contentWindow.document.documentElement);var i=n.contentWindow.document.documentElement?At(t,getComputedStyle(n.contentWindow.document.documentElement).backgroundColor):vt.TRANSPARENT,o=n.contentWindow.document.body?At(t,getComputedStyle(n.contentWindow.document.body).backgroundColor):vt.TRANSPARENT;r.backgroundColor=ct(i)?ct(o)?r.styles.backgroundColor:o:i}}catch(t){}return r}return t(n,e),n}(kr),wi=["OL","UL","MENU"],xi=function(e,t,n,r){for(var i=t.firstChild,o=void 0;i;i=o)if(o=i.nextSibling,_i(i)&&i.data.trim().length>0)n.textNodes.push(new ni(e,i,n.styles));else if(Oi(i))if($i(i)&&i.assignedNodes)i.assignedNodes().forEach((function(t){return xi(e,t,n,r)}));else{var a=Ci(e,i);a.styles.isVisible()&&(Ei(i,a,r)?a.flags|=4:Si(a.styles)&&(a.flags|=2),-1!==wi.indexOf(i.tagName)&&(a.flags|=8),n.elements.push(a),i.slot,i.shadowRoot?xi(e,i.shadowRoot,a,r):zi(i)||ji(i)||Hi(i)||xi(e,i,a,r))}},Ci=function(e,t){return Pi(t)?new ai(e,t):Fi(t)?new si(e,t):ji(t)?new ui(e,t):Bi(t)?new ci(e,t):Ii(t)?new li(e,t):Mi(t)?new Ai(e,t):Hi(t)?new vi(e,t):zi(t)?new bi(e,t):Li(t)?new yi(e,t):new kr(e,t)},ki=function(e,t){var n=Ci(e,t);return n.flags|=4,xi(e,t,n,n),n},Ei=function(e,t,n){return t.styles.isPositionedWithZIndex()||t.styles.opacity<1||t.styles.isTransformed()||Ni(e)&&n.styles.isTransparent()},Si=function(e){return e.isPositioned()||e.isFloating()},_i=function(e){return e.nodeType===Node.TEXT_NODE},Oi=function(e){return e.nodeType===Node.ELEMENT_NODE},Ti=function(e){return Oi(e)&&void 0!==e.style&&!Di(e)},Di=function(e){return"object"==typeof e.className},Bi=function(e){return"LI"===e.tagName},Ii=function(e){return"OL"===e.tagName},Mi=function(e){return"INPUT"===e.tagName},ji=function(e){return"svg"===e.tagName},Ni=function(e){return"BODY"===e.tagName},Fi=function(e){return"CANVAS"===e.tagName},Ri=function(e){return"VIDEO"===e.tagName},Pi=function(e){return"IMG"===e.tagName},Li=function(e){return"IFRAME"===e.tagName},Ui=function(e){return"STYLE"===e.tagName},zi=function(e){return"TEXTAREA"===e.tagName},Hi=function(e){return"SELECT"===e.tagName},$i=function(e){return"SLOT"===e.tagName},Qi=function(e){return e.tagName.indexOf("-")>0},Vi=function(){function e(){this.counters={}}return e.prototype.getCounterValue=function(e){var t=this.counters[e];return t&&t.length?t[t.length-1]:1},e.prototype.getCounterValues=function(e){var t=this.counters[e];return t||[]},e.prototype.pop=function(e){var t=this;e.forEach((function(e){return t.counters[e].pop()}))},e.prototype.parse=function(e){var t=this,n=e.counterIncrement,r=e.counterReset,i=!0;null!==n&&n.forEach((function(e){var n=t.counters[e.counter];n&&0!==e.increment&&(i=!1,n.length||n.push(1),n[Math.max(0,n.length-1)]+=e.increment)}));var o=[];return i&&r.forEach((function(e){var n=t.counters[e.counter];o.push(e.counter),n||(n=t.counters[e.counter]=[]),n.push(e.reset)})),o},e}(),qi={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},Gi={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},Wi={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},Ki={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},Yi=function(e,t,n,r,i,o){return e<t||e>n?no(e,i,o.length>0):r.integers.reduce((function(t,n,i){for(;e>=n;)e-=n,t+=r.values[i];return t}),"")+o},Xi=function(e,t,n,r){var i="";do{n||e--,i=r(e)+i,e/=t}while(e*t>=t);return i},Ji=function(e,t,n,r,i){var o=n-t+1;return(e<0?"-":"")+(Xi(Math.abs(e),o,r,(function(e){return c(Math.floor(e%o)+t)}))+i)},Zi=function(e,t,n){void 0===n&&(n=". ");var r=t.length;return Xi(Math.abs(e),r,!1,(function(e){return t[Math.floor(e%r)]}))+n},eo=function(e,t,n,r,i,o){if(e<-9999||e>9999)return no(e,4,i.length>0);var a=Math.abs(e),s=i;if(0===a)return t[0]+s;for(var u=0;a>0&&u<=4;u++){var c=a%10;0===c&&ur(o,1)&&""!==s?s=t[c]+s:c>1||1===c&&0===u||1===c&&1===u&&ur(o,2)||1===c&&1===u&&ur(o,4)&&e>100||1===c&&u>1&&ur(o,8)?s=t[c]+(u>0?n[u-1]:"")+s:1===c&&u>0&&(s=n[u-1]+s),a=Math.floor(a/10)}return(e<0?r:"")+s},to="마이너스",no=function(e,t,n){var r=n?". ":"",i=n?"、":"",o=n?", ":"",a=n?" ":"";switch(t){case 0:return"•"+a;case 1:return"◦"+a;case 2:return"◾"+a;case 5:var s=Ji(e,48,57,!0,r);return s.length<4?"0"+s:s;case 4:return Zi(e,"〇一二三四五六七八九",i);case 6:return Yi(e,1,3999,qi,3,r).toLowerCase();case 7:return Yi(e,1,3999,qi,3,r);case 8:return Ji(e,945,969,!1,r);case 9:return Ji(e,97,122,!1,r);case 10:return Ji(e,65,90,!1,r);case 11:return Ji(e,1632,1641,!0,r);case 12:case 49:return Yi(e,1,9999,Gi,3,r);case 35:return Yi(e,1,9999,Gi,3,r).toLowerCase();case 13:return Ji(e,2534,2543,!0,r);case 14:case 30:return Ji(e,6112,6121,!0,r);case 15:return Zi(e,"子丑寅卯辰巳午未申酉戌亥",i);case 16:return Zi(e,"甲乙丙丁戊己庚辛壬癸",i);case 17:case 48:return eo(e,"零一二三四五六七八九","十百千萬","負",i,14);case 47:return eo(e,"零壹貳參肆伍陸柒捌玖","拾佰仟萬","負",i,15);case 42:return eo(e,"零一二三四五六七八九","十百千萬","负",i,14);case 41:return eo(e,"零壹贰叁肆伍陆柒捌玖","拾佰仟萬","负",i,15);case 26:return eo(e,"〇一二三四五六七八九","十百千万","マイナス",i,0);case 25:return eo(e,"零壱弐参四伍六七八九","拾百千万","マイナス",i,7);case 31:return eo(e,"영일이삼사오육칠팔구","십백천만",to,o,7);case 33:return eo(e,"零一二三四五六七八九","十百千萬",to,o,0);case 32:return eo(e,"零壹貳參四五六七八九","拾百千",to,o,7);case 18:return Ji(e,2406,2415,!0,r);case 20:return Yi(e,1,19999,Ki,3,r);case 21:return Ji(e,2790,2799,!0,r);case 22:return Ji(e,2662,2671,!0,r);case 22:return Yi(e,1,10999,Wi,3,r);case 23:return Zi(e,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case 24:return Zi(e,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case 27:return Ji(e,3302,3311,!0,r);case 28:return Zi(e,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",i);case 29:return Zi(e,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",i);case 34:return Ji(e,3792,3801,!0,r);case 37:return Ji(e,6160,6169,!0,r);case 38:return Ji(e,4160,4169,!0,r);case 39:return Ji(e,2918,2927,!0,r);case 40:return Ji(e,1776,1785,!0,r);case 43:return Ji(e,3046,3055,!0,r);case 44:return Ji(e,3174,3183,!0,r);case 45:return Ji(e,3664,3673,!0,r);case 46:return Ji(e,3872,3881,!0,r);case 3:default:return Ji(e,48,57,!0,r)}},ro="data-html2canvas-ignore",io=function(){function e(e,t,n){if(this.context=e,this.options=n,this.scrolledElements=[],this.referenceElement=t,this.counters=new Vi,this.quoteDepth=0,!t.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(t.ownerDocument.documentElement,!1)}return e.prototype.toIFrame=function(e,t){var n=this,o=ao(e,t);if(!o.contentWindow)return Promise.reject("Unable to find iframe window");var a=e.defaultView.pageXOffset,s=e.defaultView.pageYOffset,u=o.contentWindow,c=u.document,l=co(o).then((function(){return r(n,void 0,void 0,(function(){var e,n;return i(this,(function(r){switch(r.label){case 0:return this.scrolledElements.forEach(mo),u&&(u.scrollTo(t.left,t.top),!/(iPad|iPhone|iPod)/g.test(navigator.userAgent)||u.scrollY===t.top&&u.scrollX===t.left||(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(u.scrollX-t.left,u.scrollY-t.top,0,0))),e=this.options.onclone,void 0===(n=this.clonedReferenceElement)?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:c.fonts&&c.fonts.ready?[4,c.fonts.ready]:[3,2];case 1:r.sent(),r.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,uo(c)]:[3,4];case 3:r.sent(),r.label=4;case 4:return"function"==typeof e?[2,Promise.resolve().then((function(){return e(c,n)})).then((function(){return o}))]:[2,o]}}))}))}));return c.open(),c.write(fo(document.doctype)+"<html></html>"),po(this.referenceElement.ownerDocument,a,s),c.replaceChild(c.adoptNode(this.documentElement),c.documentElement),c.close(),l},e.prototype.createElementClone=function(e){if(Cr(e,2),Fi(e))return this.createCanvasClone(e);if(Ri(e))return this.createVideoClone(e);if(Ui(e))return this.createStyleClone(e);var t=e.cloneNode(!1);return Pi(t)&&(Pi(e)&&e.currentSrc&&e.currentSrc!==e.src&&(t.src=e.currentSrc,t.srcset=""),"lazy"===t.loading&&(t.loading="eager")),Qi(t)?this.createCustomElementClone(t):t},e.prototype.createCustomElementClone=function(e){var t=document.createElement("html2canvascustomelement");return ho(e.style,t),t},e.prototype.createStyleClone=function(e){try{var t=e.sheet;if(t&&t.cssRules){var n=[].slice.call(t.cssRules,0).reduce((function(e,t){return t&&"string"==typeof t.cssText?e+t.cssText:e}),""),r=e.cloneNode(!1);return r.textContent=n,r}}catch(e){if(this.context.logger.error("Unable to access cssRules property",e),"SecurityError"!==e.name)throw e}return e.cloneNode(!1)},e.prototype.createCanvasClone=function(e){var t;if(this.options.inlineImages&&e.ownerDocument){var n=e.ownerDocument.createElement("img");try{return n.src=e.toDataURL(),n}catch(t){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",e)}}var r=e.cloneNode(!1);try{r.width=e.width,r.height=e.height;var i=e.getContext("2d"),o=r.getContext("2d");if(o)if(!this.options.allowTaint&&i)o.putImageData(i.getImageData(0,0,e.width,e.height),0,0);else{var a=null!==(t=e.getContext("webgl2"))&&void 0!==t?t:e.getContext("webgl");if(a){var s=a.getContextAttributes();!1===(null==s?void 0:s.preserveDrawingBuffer)&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",e)}o.drawImage(e,0,0)}return r}catch(t){this.context.logger.info("Unable to clone canvas as it is tainted",e)}return r},e.prototype.createVideoClone=function(e){var t=e.ownerDocument.createElement("canvas");t.width=e.offsetWidth,t.height=e.offsetHeight;var n=t.getContext("2d");try{return n&&(n.drawImage(e,0,0,t.width,t.height),this.options.allowTaint||n.getImageData(0,0,t.width,t.height)),t}catch(t){this.context.logger.info("Unable to clone video as it is tainted",e)}var r=e.ownerDocument.createElement("canvas");return r.width=e.offsetWidth,r.height=e.offsetHeight,r},e.prototype.appendChildNode=function(e,t,n){Oi(t)&&(function(e){return"SCRIPT"===e.tagName}(t)||t.hasAttribute(ro)||"function"==typeof this.options.ignoreElements&&this.options.ignoreElements(t))||this.options.copyStyles&&Oi(t)&&Ui(t)||e.appendChild(this.cloneNode(t,n))},e.prototype.cloneChildNodes=function(e,t,n){for(var r=this,i=e.shadowRoot?e.shadowRoot.firstChild:e.firstChild;i;i=i.nextSibling)if(Oi(i)&&$i(i)&&"function"==typeof i.assignedNodes){var o=i.assignedNodes();o.length&&o.forEach((function(e){return r.appendChildNode(t,e,n)}))}else this.appendChildNode(t,i,n)},e.prototype.cloneNode=function(e,t){if(_i(e))return document.createTextNode(e.data);if(!e.ownerDocument)return e.cloneNode(!1);var n=e.ownerDocument.defaultView;if(n&&Oi(e)&&(Ti(e)||Di(e))){var r=this.createElementClone(e);r.style.transitionProperty="none";var i=n.getComputedStyle(e),o=n.getComputedStyle(e,":before"),a=n.getComputedStyle(e,":after");this.referenceElement===e&&Ti(r)&&(this.clonedReferenceElement=r),Ni(r)&&bo(r);var s=this.counters.parse(new wr(this.context,i)),u=this.resolvePseudoContent(e,r,o,Mr.BEFORE);Qi(e)&&(t=!0),Ri(e)||this.cloneChildNodes(e,r,t),u&&r.insertBefore(u,r.firstChild);var c=this.resolvePseudoContent(e,r,a,Mr.AFTER);return c&&r.appendChild(c),this.counters.pop(s),(i&&(this.options.copyStyles||Di(e))&&!Li(e)||t)&&ho(i,r),0===e.scrollTop&&0===e.scrollLeft||this.scrolledElements.push([r,e.scrollLeft,e.scrollTop]),(zi(e)||Hi(e))&&(zi(r)||Hi(r))&&(r.value=e.value),r}return e.cloneNode(!1)},e.prototype.resolvePseudoContent=function(e,t,n,r){var i=this;if(n){var o=n.content,a=t.ownerDocument;if(a&&o&&"none"!==o&&"-moz-alt-content"!==o&&"none"!==n.display){this.counters.parse(new wr(this.context,n));var s=new yr(this.context,n),u=a.createElement("html2canvaspseudoelement");ho(n,u),s.content.forEach((function(t){if(0===t.type)u.appendChild(a.createTextNode(t.value));else if(22===t.type){var n=a.createElement("img");n.src=t.value,n.style.opacity="1",u.appendChild(n)}else if(18===t.type){if("attr"===t.name){var r=t.values.filter($e);r.length&&u.appendChild(a.createTextNode(e.getAttribute(r[0].value)||""))}else if("counter"===t.name){var o=t.values.filter(Ge),c=o[0],l=o[1];if(c&&$e(c)){var h=i.counters.getCounterValue(c.value),f=l&&$e(l)?_n.parse(i.context,l.value):3;u.appendChild(a.createTextNode(no(h,f,!1)))}}else if("counters"===t.name){var d=t.values.filter(Ge),p=(c=d[0],d[1]);l=d[2];if(c&&$e(c)){var m=i.counters.getCounterValues(c.value),g=l&&$e(l)?_n.parse(i.context,l.value):3,A=p&&0===p.type?p.value:"",v=m.map((function(e){return no(e,g,!1)})).join(A);u.appendChild(a.createTextNode(v))}}}else if(20===t.type)switch(t.value){case"open-quote":u.appendChild(a.createTextNode(pr(s.quotes,i.quoteDepth++,!0)));break;case"close-quote":u.appendChild(a.createTextNode(pr(s.quotes,--i.quoteDepth,!1)));break;default:u.appendChild(a.createTextNode(t.value))}})),u.className=go+" "+Ao;var c=r===Mr.BEFORE?" "+go:" "+Ao;return Di(t)?t.className.baseValue+=c:t.className+=c,u}}},e.destroy=function(e){return!!e.parentNode&&(e.parentNode.removeChild(e),!0)},e}(),oo=Mr||(Mr={}),ao=(oo[oo.BEFORE=0]="BEFORE",oo[oo.AFTER=1]="AFTER",function(e,t){var n=e.createElement("iframe");return n.className="html2canvas-container",n.style.visibility="hidden",n.style.position="fixed",n.style.left="-10000px",n.style.top="0px",n.style.border="0",n.width=t.width.toString(),n.height=t.height.toString(),n.scrolling="no",n.setAttribute(ro,"true"),e.body.appendChild(n),n}),so=function(e){return new Promise((function(t){e.complete?t():e.src?(e.onload=t,e.onerror=t):t()}))},uo=function(e){return Promise.all([].slice.call(e.images,0).map(so))},co=function(e){return new Promise((function(t,n){var r=e.contentWindow;if(!r)return n("No window assigned for iframe");var i=r.document;r.onload=e.onload=function(){r.onload=e.onload=null;var n=setInterval((function(){i.body.childNodes.length>0&&"complete"===i.readyState&&(clearInterval(n),t(e))}),50)}}))},lo=["all","d","content"],ho=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e.item(n);-1===lo.indexOf(r)&&t.style.setProperty(r,e.getPropertyValue(r))}return t},fo=function(e){var t="";return e&&(t+="<!DOCTYPE ",e.name&&(t+=e.name),e.internalSubset&&(t+=e.internalSubset),e.publicId&&(t+='"'+e.publicId+'"'),e.systemId&&(t+='"'+e.systemId+'"'),t+=">"),t},po=function(e,t,n){e&&e.defaultView&&(t!==e.defaultView.pageXOffset||n!==e.defaultView.pageYOffset)&&e.defaultView.scrollTo(t,n)},mo=function(e){var t=e[0],n=e[1],r=e[2];t.scrollLeft=n,t.scrollTop=r},go="___html2canvas___pseudoelement_before",Ao="___html2canvas___pseudoelement_after",vo='{\n    content: "" !important;\n    display: none !important;\n}',bo=function(e){yo(e,"."+go+":before"+vo+"\n         ."+Ao+":after"+vo)},yo=function(e,t){var n=e.ownerDocument;if(n){var r=n.createElement("style");r.textContent=t,e.appendChild(r)}},wo=function(){function e(){}return e.getOrigin=function(t){var n=e._link;return n?(n.href=t,n.href=n.href,n.protocol+n.hostname+n.port):"about:blank"},e.isSameOrigin=function(t){return e.getOrigin(t)===e._origin},e.setContext=function(t){e._link=t.document.createElement("a"),e._origin=e.getOrigin(t.location.href)},e._origin="about:blank",e}(),xo=function(){function e(e,t){this.context=e,this._options=t,this._cache={}}return e.prototype.addImage=function(e){var t=Promise.resolve();return this.has(e)?t:To(e)||So(e)?((this._cache[e]=this.loadImage(e)).catch((function(){})),t):t},e.prototype.match=function(e){return this._cache[e]},e.prototype.loadImage=function(e){return r(this,void 0,void 0,(function(){var t,n,r,o,a=this;return i(this,(function(i){switch(i.label){case 0:return t=wo.isSameOrigin(e),n=!_o(e)&&!0===this._options.useCORS&&Wr.SUPPORT_CORS_IMAGES&&!t,r=!_o(e)&&!t&&!To(e)&&"string"==typeof this._options.proxy&&Wr.SUPPORT_CORS_XHR&&!n,t||!1!==this._options.allowTaint||_o(e)||To(e)||r||n?(o=e,r?[4,this.proxy(o)]:[3,2]):[2];case 1:o=i.sent(),i.label=2;case 2:return this.context.logger.debug("Added image "+e.substring(0,256)),[4,new Promise((function(e,t){var r=new Image;r.onload=function(){return e(r)},r.onerror=t,(Oo(o)||n)&&(r.crossOrigin="anonymous"),r.src=o,!0===r.complete&&setTimeout((function(){return e(r)}),500),a._options.imageTimeout>0&&setTimeout((function(){return t("Timed out ("+a._options.imageTimeout+"ms) loading image")}),a._options.imageTimeout)}))];case 3:return[2,i.sent()]}}))}))},e.prototype.has=function(e){return void 0!==this._cache[e]},e.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},e.prototype.proxy=function(e){var t=this,n=this._options.proxy;if(!n)throw new Error("No proxy defined");var r=e.substring(0,256);return new Promise((function(i,o){var a=Wr.SUPPORT_RESPONSE_TYPE?"blob":"text",s=new XMLHttpRequest;s.onload=function(){if(200===s.status)if("text"===a)i(s.response);else{var e=new FileReader;e.addEventListener("load",(function(){return i(e.result)}),!1),e.addEventListener("error",(function(e){return o(e)}),!1),e.readAsDataURL(s.response)}else o("Failed to proxy resource "+r+" with status code "+s.status)},s.onerror=o;var u=n.indexOf("?")>-1?"&":"?";if(s.open("GET",""+n+u+"url="+encodeURIComponent(e)+"&responseType="+a),"text"!==a&&s instanceof XMLHttpRequest&&(s.responseType=a),t._options.imageTimeout){var c=t._options.imageTimeout;s.timeout=c,s.ontimeout=function(){return o("Timed out ("+c+"ms) proxying "+r)}}s.send()}))},e}(),Co=/^data:image\/svg\+xml/i,ko=/^data:image\/.*;base64,/i,Eo=/^data:image\/.*/i,So=function(e){return Wr.SUPPORT_SVG_DRAWING||!Do(e)},_o=function(e){return Eo.test(e)},Oo=function(e){return ko.test(e)},To=function(e){return"blob"===e.substr(0,4)},Do=function(e){return"svg"===e.substr(-3).toLowerCase()||Co.test(e)},Bo=function(){function e(e,t){this.type=0,this.x=e,this.y=t}return e.prototype.add=function(t,n){return new e(this.x+t,this.y+n)},e}(),Io=function(e,t,n){return new Bo(e.x+(t.x-e.x)*n,e.y+(t.y-e.y)*n)},Mo=function(){function e(e,t,n,r){this.type=1,this.start=e,this.startControl=t,this.endControl=n,this.end=r}return e.prototype.subdivide=function(t,n){var r=Io(this.start,this.startControl,t),i=Io(this.startControl,this.endControl,t),o=Io(this.endControl,this.end,t),a=Io(r,i,t),s=Io(i,o,t),u=Io(a,s,t);return n?new e(this.start,r,a,u):new e(u,s,o,this.end)},e.prototype.add=function(t,n){return new e(this.start.add(t,n),this.startControl.add(t,n),this.endControl.add(t,n),this.end.add(t,n))},e.prototype.reverse=function(){return new e(this.end,this.endControl,this.startControl,this.start)},e}(),jo=function(e){return 1===e.type},No=function(e){var t=e.styles,n=e.bounds,r=nt(t.borderTopLeftRadius,n.width,n.height),i=r[0],o=r[1],a=nt(t.borderTopRightRadius,n.width,n.height),s=a[0],u=a[1],c=nt(t.borderBottomRightRadius,n.width,n.height),l=c[0],h=c[1],f=nt(t.borderBottomLeftRadius,n.width,n.height),d=f[0],p=f[1],m=[];m.push((i+s)/n.width),m.push((d+l)/n.width),m.push((o+p)/n.height),m.push((u+h)/n.height);var g=Math.max.apply(Math,m);g>1&&(i/=g,o/=g,s/=g,u/=g,l/=g,h/=g,d/=g,p/=g);var A=n.width-s,v=n.height-h,b=n.width-l,y=n.height-p,w=t.borderTopWidth,x=t.borderRightWidth,C=t.borderBottomWidth,k=t.borderLeftWidth,E=rt(t.paddingTop,e.bounds.width),S=rt(t.paddingRight,e.bounds.width),_=rt(t.paddingBottom,e.bounds.width),O=rt(t.paddingLeft,e.bounds.width);this.topLeftBorderDoubleOuterBox=i>0||o>0?Ro(n.left+k/3,n.top+w/3,i-k/3,o-w/3,jr.TOP_LEFT):new Bo(n.left+k/3,n.top+w/3),this.topRightBorderDoubleOuterBox=i>0||o>0?Ro(n.left+A,n.top+w/3,s-x/3,u-w/3,jr.TOP_RIGHT):new Bo(n.left+n.width-x/3,n.top+w/3),this.bottomRightBorderDoubleOuterBox=l>0||h>0?Ro(n.left+b,n.top+v,l-x/3,h-C/3,jr.BOTTOM_RIGHT):new Bo(n.left+n.width-x/3,n.top+n.height-C/3),this.bottomLeftBorderDoubleOuterBox=d>0||p>0?Ro(n.left+k/3,n.top+y,d-k/3,p-C/3,jr.BOTTOM_LEFT):new Bo(n.left+k/3,n.top+n.height-C/3),this.topLeftBorderDoubleInnerBox=i>0||o>0?Ro(n.left+2*k/3,n.top+2*w/3,i-2*k/3,o-2*w/3,jr.TOP_LEFT):new Bo(n.left+2*k/3,n.top+2*w/3),this.topRightBorderDoubleInnerBox=i>0||o>0?Ro(n.left+A,n.top+2*w/3,s-2*x/3,u-2*w/3,jr.TOP_RIGHT):new Bo(n.left+n.width-2*x/3,n.top+2*w/3),this.bottomRightBorderDoubleInnerBox=l>0||h>0?Ro(n.left+b,n.top+v,l-2*x/3,h-2*C/3,jr.BOTTOM_RIGHT):new Bo(n.left+n.width-2*x/3,n.top+n.height-2*C/3),this.bottomLeftBorderDoubleInnerBox=d>0||p>0?Ro(n.left+2*k/3,n.top+y,d-2*k/3,p-2*C/3,jr.BOTTOM_LEFT):new Bo(n.left+2*k/3,n.top+n.height-2*C/3),this.topLeftBorderStroke=i>0||o>0?Ro(n.left+k/2,n.top+w/2,i-k/2,o-w/2,jr.TOP_LEFT):new Bo(n.left+k/2,n.top+w/2),this.topRightBorderStroke=i>0||o>0?Ro(n.left+A,n.top+w/2,s-x/2,u-w/2,jr.TOP_RIGHT):new Bo(n.left+n.width-x/2,n.top+w/2),this.bottomRightBorderStroke=l>0||h>0?Ro(n.left+b,n.top+v,l-x/2,h-C/2,jr.BOTTOM_RIGHT):new Bo(n.left+n.width-x/2,n.top+n.height-C/2),this.bottomLeftBorderStroke=d>0||p>0?Ro(n.left+k/2,n.top+y,d-k/2,p-C/2,jr.BOTTOM_LEFT):new Bo(n.left+k/2,n.top+n.height-C/2),this.topLeftBorderBox=i>0||o>0?Ro(n.left,n.top,i,o,jr.TOP_LEFT):new Bo(n.left,n.top),this.topRightBorderBox=s>0||u>0?Ro(n.left+A,n.top,s,u,jr.TOP_RIGHT):new Bo(n.left+n.width,n.top),this.bottomRightBorderBox=l>0||h>0?Ro(n.left+b,n.top+v,l,h,jr.BOTTOM_RIGHT):new Bo(n.left+n.width,n.top+n.height),this.bottomLeftBorderBox=d>0||p>0?Ro(n.left,n.top+y,d,p,jr.BOTTOM_LEFT):new Bo(n.left,n.top+n.height),this.topLeftPaddingBox=i>0||o>0?Ro(n.left+k,n.top+w,Math.max(0,i-k),Math.max(0,o-w),jr.TOP_LEFT):new Bo(n.left+k,n.top+w),this.topRightPaddingBox=s>0||u>0?Ro(n.left+Math.min(A,n.width-x),n.top+w,A>n.width+x?0:Math.max(0,s-x),Math.max(0,u-w),jr.TOP_RIGHT):new Bo(n.left+n.width-x,n.top+w),this.bottomRightPaddingBox=l>0||h>0?Ro(n.left+Math.min(b,n.width-k),n.top+Math.min(v,n.height-C),Math.max(0,l-x),Math.max(0,h-C),jr.BOTTOM_RIGHT):new Bo(n.left+n.width-x,n.top+n.height-C),this.bottomLeftPaddingBox=d>0||p>0?Ro(n.left+k,n.top+Math.min(y,n.height-C),Math.max(0,d-k),Math.max(0,p-C),jr.BOTTOM_LEFT):new Bo(n.left+k,n.top+n.height-C),this.topLeftContentBox=i>0||o>0?Ro(n.left+k+O,n.top+w+E,Math.max(0,i-(k+O)),Math.max(0,o-(w+E)),jr.TOP_LEFT):new Bo(n.left+k+O,n.top+w+E),this.topRightContentBox=s>0||u>0?Ro(n.left+Math.min(A,n.width+k+O),n.top+w+E,A>n.width+k+O?0:s-k+O,u-(w+E),jr.TOP_RIGHT):new Bo(n.left+n.width-(x+S),n.top+w+E),this.bottomRightContentBox=l>0||h>0?Ro(n.left+Math.min(b,n.width-(k+O)),n.top+Math.min(v,n.height+w+E),Math.max(0,l-(x+S)),h-(C+_),jr.BOTTOM_RIGHT):new Bo(n.left+n.width-(x+S),n.top+n.height-(C+_)),this.bottomLeftContentBox=d>0||p>0?Ro(n.left+k+O,n.top+y,Math.max(0,d-(k+O)),p-(C+_),jr.BOTTOM_LEFT):new Bo(n.left+k+O,n.top+n.height-(C+_))},Fo=jr||(jr={}),Ro=(Fo[Fo.TOP_LEFT=0]="TOP_LEFT",Fo[Fo.TOP_RIGHT=1]="TOP_RIGHT",Fo[Fo.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",Fo[Fo.BOTTOM_LEFT=3]="BOTTOM_LEFT",function(e,t,n,r,i){var o=(Math.sqrt(2)-1)/3*4,a=n*o,s=r*o,u=e+n,c=t+r;switch(i){case jr.TOP_LEFT:return new Mo(new Bo(e,c),new Bo(e,c-s),new Bo(u-a,t),new Bo(u,t));case jr.TOP_RIGHT:return new Mo(new Bo(e,t),new Bo(e+a,t),new Bo(u,c-s),new Bo(u,c));case jr.BOTTOM_RIGHT:return new Mo(new Bo(u,t),new Bo(u,t+s),new Bo(e+a,c),new Bo(e,c));case jr.BOTTOM_LEFT:default:return new Mo(new Bo(u,c),new Bo(u-a,c),new Bo(e,t+s),new Bo(e,t))}}),Po=function(e){return[e.topLeftBorderBox,e.topRightBorderBox,e.bottomRightBorderBox,e.bottomLeftBorderBox]},Lo=function(e){return[e.topLeftPaddingBox,e.topRightPaddingBox,e.bottomRightPaddingBox,e.bottomLeftPaddingBox]},Uo=function(e,t,n){this.offsetX=e,this.offsetY=t,this.matrix=n,this.type=0,this.target=6},zo=function(e,t){this.path=e,this.target=t,this.type=1},Ho=function(e){this.opacity=e,this.type=2,this.target=6},$o=function(e){return 1===e.type},Qo=function(e,t){return e.length===t.length&&e.some((function(e,n){return e===t[n]}))},Vo=function(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]},qo=function(){function e(e,t){if(this.container=e,this.parent=t,this.effects=[],this.curves=new No(this.container),this.container.styles.opacity<1&&this.effects.push(new Ho(this.container.styles.opacity)),null!==this.container.styles.transform){var n=this.container.bounds.left+this.container.styles.transformOrigin[0].number,r=this.container.bounds.top+this.container.styles.transformOrigin[1].number,i=this.container.styles.transform;this.effects.push(new Uo(n,r,i))}if(0!==this.container.styles.overflowX){var o=Po(this.curves),a=Lo(this.curves);Qo(o,a)?this.effects.push(new zo(o,6)):(this.effects.push(new zo(o,2)),this.effects.push(new zo(a,4)))}}return e.prototype.getEffects=function(e){for(var t=-1===[2,3].indexOf(this.container.styles.position),n=this.parent,r=this.effects.slice(0);n;){var i=n.effects.filter((function(e){return!$o(e)}));if(t||0!==n.container.styles.position||!n.parent){if(r.unshift.apply(r,i),t=-1===[2,3].indexOf(n.container.styles.position),0!==n.container.styles.overflowX){var o=Po(n.curves),a=Lo(n.curves);Qo(o,a)||r.unshift(new zo(a,6))}}else r.unshift.apply(r,i);n=n.parent}return r.filter((function(t){return ur(t.target,e)}))},e}(),Go=function(e,t,n,r){e.container.elements.forEach((function(i){var o=ur(i.flags,4),a=ur(i.flags,2),s=new qo(i,e);ur(i.styles.display,2048)&&r.push(s);var u=ur(i.flags,8)?[]:r;if(o||a){var c=o||i.styles.isPositioned()?n:t,l=new Vo(s);if(i.styles.isPositioned()||i.styles.opacity<1||i.styles.isTransformed()){var h=i.styles.zIndex.order;if(h<0){var f=0;c.negativeZIndex.some((function(e,t){return h>e.element.container.styles.zIndex.order?(f=t,!1):f>0})),c.negativeZIndex.splice(f,0,l)}else if(h>0){var d=0;c.positiveZIndex.some((function(e,t){return h>=e.element.container.styles.zIndex.order?(d=t+1,!1):d>0})),c.positiveZIndex.splice(d,0,l)}else c.zeroOrAutoZIndexOrTransformedOrOpacity.push(l)}else i.styles.isFloating()?c.nonPositionedFloats.push(l):c.nonPositionedInlineLevel.push(l);Go(s,l,o?l:n,u)}else i.styles.isInlineLevel()?t.inlineLevel.push(s):t.nonInlineLevel.push(s),Go(s,t,n,u);ur(i.flags,8)&&Wo(i,u)}))},Wo=function(e,t){for(var n=e instanceof li?e.start:1,r=e instanceof li&&e.reversed,i=0;i<t.length;i++){var o=t[i];o.container instanceof ci&&"number"==typeof o.container.value&&0!==o.container.value&&(n=o.container.value),o.listValue=no(n,o.container.styles.listStyleType,!0),n+=r?-1:1}},Ko=function(e,t){switch(t){case 0:return Zo(e.topLeftBorderBox,e.topLeftPaddingBox,e.topRightBorderBox,e.topRightPaddingBox);case 1:return Zo(e.topRightBorderBox,e.topRightPaddingBox,e.bottomRightBorderBox,e.bottomRightPaddingBox);case 2:return Zo(e.bottomRightBorderBox,e.bottomRightPaddingBox,e.bottomLeftBorderBox,e.bottomLeftPaddingBox);case 3:default:return Zo(e.bottomLeftBorderBox,e.bottomLeftPaddingBox,e.topLeftBorderBox,e.topLeftPaddingBox)}},Yo=function(e,t){switch(t){case 0:return Zo(e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox,e.topRightBorderBox,e.topRightBorderDoubleOuterBox);case 1:return Zo(e.topRightBorderBox,e.topRightBorderDoubleOuterBox,e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox);case 2:return Zo(e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox,e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox);case 3:default:return Zo(e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox,e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox)}},Xo=function(e,t){switch(t){case 0:return Zo(e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox,e.topRightBorderDoubleInnerBox,e.topRightPaddingBox);case 1:return Zo(e.topRightBorderDoubleInnerBox,e.topRightPaddingBox,e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox);case 2:return Zo(e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox,e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox);case 3:default:return Zo(e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox,e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox)}},Jo=function(e,t){var n=[];return jo(e)?n.push(e.subdivide(.5,!1)):n.push(e),jo(t)?n.push(t.subdivide(.5,!0)):n.push(t),n},Zo=function(e,t,n,r){var i=[];return jo(e)?i.push(e.subdivide(.5,!1)):i.push(e),jo(n)?i.push(n.subdivide(.5,!0)):i.push(n),jo(r)?i.push(r.subdivide(.5,!0).reverse()):i.push(r),jo(t)?i.push(t.subdivide(.5,!1).reverse()):i.push(t),i},ea=function(e){var t=e.bounds,n=e.styles;return t.add(n.borderLeftWidth,n.borderTopWidth,-(n.borderRightWidth+n.borderLeftWidth),-(n.borderTopWidth+n.borderBottomWidth))},ta=function(e){var t=e.styles,n=e.bounds,r=rt(t.paddingLeft,n.width),i=rt(t.paddingRight,n.width),o=rt(t.paddingTop,n.width),a=rt(t.paddingBottom,n.width);return n.add(r+t.borderLeftWidth,o+t.borderTopWidth,-(t.borderRightWidth+t.borderLeftWidth+r+i),-(t.borderTopWidth+t.borderBottomWidth+o+a))},na=function(e,t,n){var r=function(e,t){return 0===e?t.bounds:2===e?ta(t):ea(t)}(aa(e.styles.backgroundOrigin,t),e),i=function(e,t){return 0===e?t.bounds:2===e?ta(t):ea(t)}(aa(e.styles.backgroundClip,t),e),o=oa(aa(e.styles.backgroundSize,t),n,r),a=o[0],s=o[1],u=nt(aa(e.styles.backgroundPosition,t),r.width-a,r.height-s);return[sa(aa(e.styles.backgroundRepeat,t),u,o,r,i),Math.round(r.left+u[0]),Math.round(r.top+u[1]),a,s]},ra=function(e){return $e(e)&&e.value===Ft.AUTO},ia=function(e){return"number"==typeof e},oa=function(e,t,n){var r=t[0],i=t[1],o=t[2],a=e[0],s=e[1];if(!a)return[0,0];if(Xe(a)&&s&&Xe(s))return[rt(a,n.width),rt(s,n.height)];var u=ia(o);if($e(a)&&(a.value===Ft.CONTAIN||a.value===Ft.COVER))return ia(o)?n.width/n.height<o!=(a.value===Ft.COVER)?[n.width,n.width/o]:[n.height*o,n.height]:[n.width,n.height];var c=ia(r),l=ia(i),h=c||l;if(ra(a)&&(!s||ra(s)))return c&&l?[r,i]:u||h?h&&u?[c?r:i*o,l?i:r/o]:[c?r:n.width,l?i:n.height]:[n.width,n.height];if(u){var f=0,d=0;return Xe(a)?f=rt(a,n.width):Xe(s)&&(d=rt(s,n.height)),ra(a)?f=d*o:s&&!ra(s)||(d=f/o),[f,d]}var p=null,m=null;if(Xe(a)?p=rt(a,n.width):s&&Xe(s)&&(m=rt(s,n.height)),null===p||s&&!ra(s)||(m=c&&l?p/r*i:n.height),null!==m&&ra(a)&&(p=c&&l?m/i*r:n.width),null!==p&&null!==m)return[p,m];throw new Error("Unable to calculate background-size for element")},aa=function(e,t){var n=e[t];return void 0===n?e[0]:n},sa=function(e,t,n,r,i){var o=t[0],a=t[1],s=n[0],u=n[1];switch(e){case 2:return[new Bo(Math.round(r.left),Math.round(r.top+a)),new Bo(Math.round(r.left+r.width),Math.round(r.top+a)),new Bo(Math.round(r.left+r.width),Math.round(u+r.top+a)),new Bo(Math.round(r.left),Math.round(u+r.top+a))];case 3:return[new Bo(Math.round(r.left+o),Math.round(r.top)),new Bo(Math.round(r.left+o+s),Math.round(r.top)),new Bo(Math.round(r.left+o+s),Math.round(r.height+r.top)),new Bo(Math.round(r.left+o),Math.round(r.height+r.top))];case 1:return[new Bo(Math.round(r.left+o),Math.round(r.top+a)),new Bo(Math.round(r.left+o+s),Math.round(r.top+a)),new Bo(Math.round(r.left+o+s),Math.round(r.top+a+u)),new Bo(Math.round(r.left+o),Math.round(r.top+a+u))];default:return[new Bo(Math.round(i.left),Math.round(i.top)),new Bo(Math.round(i.left+i.width),Math.round(i.top)),new Bo(Math.round(i.left+i.width),Math.round(i.height+i.top)),new Bo(Math.round(i.left),Math.round(i.height+i.top))]}},ua="Hidden Text",ca=function(){function e(e){this._data={},this._document=e}return e.prototype.parseMetrics=function(e,t){var n=this._document.createElement("div"),r=this._document.createElement("img"),i=this._document.createElement("span"),o=this._document.body;n.style.visibility="hidden",n.style.fontFamily=e,n.style.fontSize=t,n.style.margin="0",n.style.padding="0",n.style.whiteSpace="nowrap",o.appendChild(n),r.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",r.width=1,r.height=1,r.style.margin="0",r.style.padding="0",r.style.verticalAlign="baseline",i.style.fontFamily=e,i.style.fontSize=t,i.style.margin="0",i.style.padding="0",i.appendChild(this._document.createTextNode(ua)),n.appendChild(i),n.appendChild(r);var a=r.offsetTop-i.offsetTop+2;n.removeChild(i),n.appendChild(this._document.createTextNode(ua)),n.style.lineHeight="normal",r.style.verticalAlign="super";var s=r.offsetTop-n.offsetTop+2;return o.removeChild(n),{baseline:a,middle:s}},e.prototype.getMetrics=function(e,t){var n=e+" "+t;return void 0===this._data[n]&&(this._data[n]=this.parseMetrics(e,t)),this._data[n]},e}(),la=function(e,t){this.context=e,this.options=t},ha=function(e){function n(t,n){var r=e.call(this,t,n)||this;return r._activeEffects=[],r.canvas=n.canvas?n.canvas:document.createElement("canvas"),r.ctx=r.canvas.getContext("2d"),n.canvas||(r.canvas.width=Math.floor(n.width*n.scale),r.canvas.height=Math.floor(n.height*n.scale),r.canvas.style.width=n.width+"px",r.canvas.style.height=n.height+"px"),r.fontMetrics=new ca(document),r.ctx.scale(r.options.scale,r.options.scale),r.ctx.translate(-n.x,-n.y),r.ctx.textBaseline="bottom",r._activeEffects=[],r.context.logger.debug("Canvas renderer initialized ("+n.width+"x"+n.height+") with scale "+n.scale),r}return t(n,e),n.prototype.applyEffects=function(e){for(var t=this;this._activeEffects.length;)this.popEffect();e.forEach((function(e){return t.applyEffect(e)}))},n.prototype.applyEffect=function(e){this.ctx.save(),function(e){return 2===e.type}(e)&&(this.ctx.globalAlpha=e.opacity),function(e){return 0===e.type}(e)&&(this.ctx.translate(e.offsetX,e.offsetY),this.ctx.transform(e.matrix[0],e.matrix[1],e.matrix[2],e.matrix[3],e.matrix[4],e.matrix[5]),this.ctx.translate(-e.offsetX,-e.offsetY)),$o(e)&&(this.path(e.path),this.ctx.clip()),this._activeEffects.push(e)},n.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},n.prototype.renderStack=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return e.element.container.styles.isVisible()?[4,this.renderStackContent(e)]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}))}))},n.prototype.renderNode=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return ur(e.container.flags,16),e.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(e)]:[3,3];case 1:return t.sent(),[4,this.renderNodeContent(e)];case 2:t.sent(),t.label=3;case 3:return[2]}}))}))},n.prototype.renderTextWithLetterSpacing=function(e,t,n){var r=this;0===t?this.ctx.fillText(e.text,e.bounds.left,e.bounds.top+n):Jr(e.text).reduce((function(t,i){return r.ctx.fillText(i,t,e.bounds.top+n),t+r.ctx.measureText(i).width}),e.bounds.left)},n.prototype.createFontStyle=function(e){var t=e.fontVariant.filter((function(e){return"normal"===e||"small-caps"===e})).join(""),n=ga(e.fontFamily).join(", "),r=ze(e.fontSize)?""+e.fontSize.number+e.fontSize.unit:e.fontSize.number+"px";return[[e.fontStyle,t,e.fontWeight,r,n].join(" "),n,r]},n.prototype.renderTextNode=function(e,t){return r(this,void 0,void 0,(function(){var n,r,o,a,s,u,c,l,h=this;return i(this,(function(i){return n=this.createFontStyle(t),r=n[0],o=n[1],a=n[2],this.ctx.font=r,this.ctx.direction=1===t.direction?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",s=this.fontMetrics.getMetrics(o,a),u=s.baseline,c=s.middle,l=t.paintOrder,e.textBounds.forEach((function(e){l.forEach((function(n){switch(n){case 0:h.ctx.fillStyle=lt(t.color),h.renderTextWithLetterSpacing(e,t.letterSpacing,u);var r=t.textShadow;r.length&&e.text.trim().length&&(r.slice(0).reverse().forEach((function(n){h.ctx.shadowColor=lt(n.color),h.ctx.shadowOffsetX=n.offsetX.number*h.options.scale,h.ctx.shadowOffsetY=n.offsetY.number*h.options.scale,h.ctx.shadowBlur=n.blur.number,h.renderTextWithLetterSpacing(e,t.letterSpacing,u)})),h.ctx.shadowColor="",h.ctx.shadowOffsetX=0,h.ctx.shadowOffsetY=0,h.ctx.shadowBlur=0),t.textDecorationLine.length&&(h.ctx.fillStyle=lt(t.textDecorationColor||t.color),t.textDecorationLine.forEach((function(t){switch(t){case 1:h.ctx.fillRect(e.bounds.left,Math.round(e.bounds.top+u),e.bounds.width,1);break;case 2:h.ctx.fillRect(e.bounds.left,Math.round(e.bounds.top),e.bounds.width,1);break;case 3:h.ctx.fillRect(e.bounds.left,Math.ceil(e.bounds.top+c),e.bounds.width,1)}})));break;case 1:t.webkitTextStrokeWidth&&e.text.trim().length&&(h.ctx.strokeStyle=lt(t.webkitTextStrokeColor),h.ctx.lineWidth=t.webkitTextStrokeWidth,h.ctx.lineJoin=window.chrome?"miter":"round",h.ctx.strokeText(e.text,e.bounds.left,e.bounds.top+u)),h.ctx.strokeStyle="",h.ctx.lineWidth=0,h.ctx.lineJoin="miter"}}))})),[2]}))}))},n.prototype.renderReplacedElement=function(e,t,n){if(n&&e.intrinsicWidth>0&&e.intrinsicHeight>0){var r=ta(e),i=Lo(t);this.path(i),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(n,0,0,e.intrinsicWidth,e.intrinsicHeight,r.left,r.top,r.width,r.height),this.ctx.restore()}},n.prototype.renderNodeContent=function(e){return r(this,void 0,void 0,(function(){var t,r,o,s,u,c,l,h,f,d,p,m,g,A,v,b,y,w;return i(this,(function(i){switch(i.label){case 0:this.applyEffects(e.getEffects(4)),t=e.container,r=e.curves,o=t.styles,s=0,u=t.textNodes,i.label=1;case 1:return s<u.length?(c=u[s],[4,this.renderTextNode(c,o)]):[3,4];case 2:i.sent(),i.label=3;case 3:return s++,[3,1];case 4:if(!(t instanceof ai))return[3,8];i.label=5;case 5:return i.trys.push([5,7,,8]),[4,this.context.cache.match(t.src)];case 6:return v=i.sent(),this.renderReplacedElement(t,r,v),[3,8];case 7:return i.sent(),this.context.logger.error("Error loading image "+t.src),[3,8];case 8:if(t instanceof si&&this.renderReplacedElement(t,r,t.canvas),!(t instanceof ui))return[3,12];i.label=9;case 9:return i.trys.push([9,11,,12]),[4,this.context.cache.match(t.svg)];case 10:return v=i.sent(),this.renderReplacedElement(t,r,v),[3,12];case 11:return i.sent(),this.context.logger.error("Error loading svg "+t.svg.substring(0,255)),[3,12];case 12:return t instanceof yi&&t.tree?[4,new n(this.context,{scale:this.options.scale,backgroundColor:t.backgroundColor,x:0,y:0,width:t.width,height:t.height}).render(t.tree)]:[3,14];case 13:l=i.sent(),t.width&&t.height&&this.ctx.drawImage(l,0,0,t.width,t.height,t.bounds.left,t.bounds.top,t.bounds.width,t.bounds.height),i.label=14;case 14:if(t instanceof Ai&&(h=Math.min(t.bounds.width,t.bounds.height),t.type===di?t.checked&&(this.ctx.save(),this.path([new Bo(t.bounds.left+.39363*h,t.bounds.top+.79*h),new Bo(t.bounds.left+.16*h,t.bounds.top+.5549*h),new Bo(t.bounds.left+.27347*h,t.bounds.top+.44071*h),new Bo(t.bounds.left+.39694*h,t.bounds.top+.5649*h),new Bo(t.bounds.left+.72983*h,t.bounds.top+.23*h),new Bo(t.bounds.left+.84*h,t.bounds.top+.34085*h),new Bo(t.bounds.left+.39363*h,t.bounds.top+.79*h)]),this.ctx.fillStyle=lt(gi),this.ctx.fill(),this.ctx.restore()):t.type===pi&&t.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(t.bounds.left+h/2,t.bounds.top+h/2,h/4,0,2*Math.PI,!0),this.ctx.fillStyle=lt(gi),this.ctx.fill(),this.ctx.restore())),fa(t)&&t.value.length){switch(f=this.createFontStyle(o),y=f[0],d=f[1],p=this.fontMetrics.getMetrics(y,d).baseline,this.ctx.font=y,this.ctx.fillStyle=lt(o.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=pa(t.styles.textAlign),w=ta(t),m=0,t.styles.textAlign){case 1:m+=w.width/2;break;case 2:m+=w.width}g=w.add(m,0,0,-w.height/2+1),this.ctx.save(),this.path([new Bo(w.left,w.top),new Bo(w.left+w.width,w.top),new Bo(w.left+w.width,w.top+w.height),new Bo(w.left,w.top+w.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new Kr(t.value,g),o.letterSpacing,p),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!ur(t.styles.display,2048))return[3,20];if(null===t.styles.listStyleImage)return[3,19];if(0!==(A=t.styles.listStyleImage).type)return[3,18];v=void 0,b=A.url,i.label=15;case 15:return i.trys.push([15,17,,18]),[4,this.context.cache.match(b)];case 16:return v=i.sent(),this.ctx.drawImage(v,t.bounds.left-(v.width+10),t.bounds.top),[3,18];case 17:return i.sent(),this.context.logger.error("Error loading list-style-image "+b),[3,18];case 18:return[3,20];case 19:e.listValue&&-1!==t.styles.listStyleType&&(y=this.createFontStyle(o)[0],this.ctx.font=y,this.ctx.fillStyle=lt(o.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",w=new a(t.bounds.left,t.bounds.top+rt(t.styles.paddingTop,t.bounds.width),t.bounds.width,kn(o.lineHeight,o.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new Kr(e.listValue,w),o.letterSpacing,kn(o.lineHeight,o.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),i.label=20;case 20:return[2]}}))}))},n.prototype.renderStackContent=function(e){return r(this,void 0,void 0,(function(){var t,n,r,o,a,s,u,c,l,h,f,d,p,m,g;return i(this,(function(i){switch(i.label){case 0:return ur(e.element.container.flags,16),[4,this.renderNodeBackgroundAndBorders(e.element)];case 1:i.sent(),t=0,n=e.negativeZIndex,i.label=2;case 2:return t<n.length?(g=n[t],[4,this.renderStack(g)]):[3,5];case 3:i.sent(),i.label=4;case 4:return t++,[3,2];case 5:return[4,this.renderNodeContent(e.element)];case 6:i.sent(),r=0,o=e.nonInlineLevel,i.label=7;case 7:return r<o.length?(g=o[r],[4,this.renderNode(g)]):[3,10];case 8:i.sent(),i.label=9;case 9:return r++,[3,7];case 10:a=0,s=e.nonPositionedFloats,i.label=11;case 11:return a<s.length?(g=s[a],[4,this.renderStack(g)]):[3,14];case 12:i.sent(),i.label=13;case 13:return a++,[3,11];case 14:u=0,c=e.nonPositionedInlineLevel,i.label=15;case 15:return u<c.length?(g=c[u],[4,this.renderStack(g)]):[3,18];case 16:i.sent(),i.label=17;case 17:return u++,[3,15];case 18:l=0,h=e.inlineLevel,i.label=19;case 19:return l<h.length?(g=h[l],[4,this.renderNode(g)]):[3,22];case 20:i.sent(),i.label=21;case 21:return l++,[3,19];case 22:f=0,d=e.zeroOrAutoZIndexOrTransformedOrOpacity,i.label=23;case 23:return f<d.length?(g=d[f],[4,this.renderStack(g)]):[3,26];case 24:i.sent(),i.label=25;case 25:return f++,[3,23];case 26:p=0,m=e.positiveZIndex,i.label=27;case 27:return p<m.length?(g=m[p],[4,this.renderStack(g)]):[3,30];case 28:i.sent(),i.label=29;case 29:return p++,[3,27];case 30:return[2]}}))}))},n.prototype.mask=function(e){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(e.slice(0).reverse()),this.ctx.closePath()},n.prototype.path=function(e){this.ctx.beginPath(),this.formatPath(e),this.ctx.closePath()},n.prototype.formatPath=function(e){var t=this;e.forEach((function(e,n){var r=jo(e)?e.start:e;0===n?t.ctx.moveTo(r.x,r.y):t.ctx.lineTo(r.x,r.y),jo(e)&&t.ctx.bezierCurveTo(e.startControl.x,e.startControl.y,e.endControl.x,e.endControl.y,e.end.x,e.end.y)}))},n.prototype.renderRepeat=function(e,t,n,r){this.path(e),this.ctx.fillStyle=t,this.ctx.translate(n,r),this.ctx.fill(),this.ctx.translate(-n,-r)},n.prototype.resizeImage=function(e,t,n){var r;if(e.width===t&&e.height===n)return e;var i=(null!==(r=this.canvas.ownerDocument)&&void 0!==r?r:document).createElement("canvas");return i.width=Math.max(1,t),i.height=Math.max(1,n),i.getContext("2d").drawImage(e,0,0,e.width,e.height,0,0,t,n),i},n.prototype.renderBackgroundImage=function(e){return r(this,void 0,void 0,(function(){var t,n,r,o,a,s;return i(this,(function(u){switch(u.label){case 0:t=e.styles.backgroundImage.length-1,n=function(n){var o,a,s,u,c,l,h,f,d,p,m,g,A,v,b,y,w,x,C,k,E,S,_,O,T,D,B,I,M,j,N;return i(this,(function(i){switch(i.label){case 0:if(0!==n.type)return[3,5];o=void 0,a=n.url,i.label=1;case 1:return i.trys.push([1,3,,4]),[4,r.context.cache.match(a)];case 2:return o=i.sent(),[3,4];case 3:return i.sent(),r.context.logger.error("Error loading background-image "+a),[3,4];case 4:return o&&(s=na(e,t,[o.width,o.height,o.width/o.height]),y=s[0],S=s[1],_=s[2],C=s[3],k=s[4],v=r.ctx.createPattern(r.resizeImage(o,C,k),"repeat"),r.renderRepeat(y,v,S,_)),[3,6];case 5:!function(e){return 1===e.type}(n)?function(e){return 2===e.type}(n)&&(b=na(e,t,[null,null,null]),y=b[0],w=b[1],x=b[2],C=b[3],k=b[4],E=0===n.position.length?[et]:n.position,S=rt(E[0],C),_=rt(E[E.length-1],k),O=St(n,S,_,C,k),T=O[0],D=O[1],T>0&&D>0&&(B=r.ctx.createRadialGradient(w+S,x+_,0,w+S,x+_,T),xt(n.stops,2*T).forEach((function(e){return B.addColorStop(e.stop,lt(e.color))})),r.path(y),r.ctx.fillStyle=B,T!==D?(I=e.bounds.left+.5*e.bounds.width,M=e.bounds.top+.5*e.bounds.height,N=1/(j=D/T),r.ctx.save(),r.ctx.translate(I,M),r.ctx.transform(1,0,0,j,0,0),r.ctx.translate(-I,-M),r.ctx.fillRect(w,N*(x-M)+M,C,k*N),r.ctx.restore()):r.ctx.fill())):(u=na(e,t,[null,null,null]),y=u[0],S=u[1],_=u[2],C=u[3],k=u[4],c=Ct(n.angle,C,k),l=c[0],h=c[1],f=c[2],d=c[3],p=c[4],(m=document.createElement("canvas")).width=C,m.height=k,g=m.getContext("2d"),A=g.createLinearGradient(h,d,f,p),xt(n.stops,l).forEach((function(e){return A.addColorStop(e.stop,lt(e.color))})),g.fillStyle=A,g.fillRect(0,0,C,k),C>0&&k>0&&(v=r.ctx.createPattern(m,"repeat"),r.renderRepeat(y,v,S,_))),i.label=6;case 6:return t--,[2]}}))},r=this,o=0,a=e.styles.backgroundImage.slice(0).reverse(),u.label=1;case 1:return o<a.length?(s=a[o],[5,n(s)]):[3,4];case 2:u.sent(),u.label=3;case 3:return o++,[3,1];case 4:return[2]}}))}))},n.prototype.renderSolidBorder=function(e,t,n){return r(this,void 0,void 0,(function(){return i(this,(function(r){return this.path(Ko(n,t)),this.ctx.fillStyle=lt(e),this.ctx.fill(),[2]}))}))},n.prototype.renderDoubleBorder=function(e,t,n,o){return r(this,void 0,void 0,(function(){var r,a;return i(this,(function(i){switch(i.label){case 0:return t<3?[4,this.renderSolidBorder(e,n,o)]:[3,2];case 1:return i.sent(),[2];case 2:return r=Yo(o,n),this.path(r),this.ctx.fillStyle=lt(e),this.ctx.fill(),a=Xo(o,n),this.path(a),this.ctx.fill(),[2]}}))}))},n.prototype.renderNodeBackgroundAndBorders=function(e){return r(this,void 0,void 0,(function(){var t,n,r,o,a,s,u,c,l=this;return i(this,(function(i){switch(i.label){case 0:return this.applyEffects(e.getEffects(2)),t=e.container.styles,n=!ct(t.backgroundColor)||t.backgroundImage.length,r=[{style:t.borderTopStyle,color:t.borderTopColor,width:t.borderTopWidth},{style:t.borderRightStyle,color:t.borderRightColor,width:t.borderRightWidth},{style:t.borderBottomStyle,color:t.borderBottomColor,width:t.borderBottomWidth},{style:t.borderLeftStyle,color:t.borderLeftColor,width:t.borderLeftWidth}],o=da(aa(t.backgroundClip,0),e.curves),n||t.boxShadow.length?(this.ctx.save(),this.path(o),this.ctx.clip(),ct(t.backgroundColor)||(this.ctx.fillStyle=lt(t.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(e.container)]):[3,2];case 1:i.sent(),this.ctx.restore(),t.boxShadow.slice(0).reverse().forEach((function(t){l.ctx.save();var n=Po(e.curves),r=t.inset?0:1e4,i=function(e,t,n,r,i){return e.map((function(e,o){switch(o){case 0:return e.add(t,n);case 1:return e.add(t+r,n);case 2:return e.add(t+r,n+i);case 3:return e.add(t,n+i)}return e}))}(n,-r+(t.inset?1:-1)*t.spread.number,(t.inset?1:-1)*t.spread.number,t.spread.number*(t.inset?-2:2),t.spread.number*(t.inset?-2:2));t.inset?(l.path(n),l.ctx.clip(),l.mask(i)):(l.mask(n),l.ctx.clip(),l.path(i)),l.ctx.shadowOffsetX=t.offsetX.number+r,l.ctx.shadowOffsetY=t.offsetY.number,l.ctx.shadowColor=lt(t.color),l.ctx.shadowBlur=t.blur.number,l.ctx.fillStyle=t.inset?lt(t.color):"rgba(0,0,0,1)",l.ctx.fill(),l.ctx.restore()})),i.label=2;case 2:a=0,s=0,u=r,i.label=3;case 3:return s<u.length?0!==(c=u[s]).style&&!ct(c.color)&&c.width>0?2!==c.style?[3,5]:[4,this.renderDashedDottedBorder(c.color,c.width,a,e.curves,2)]:[3,11]:[3,13];case 4:return i.sent(),[3,11];case 5:return 3!==c.style?[3,7]:[4,this.renderDashedDottedBorder(c.color,c.width,a,e.curves,3)];case 6:return i.sent(),[3,11];case 7:return 4!==c.style?[3,9]:[4,this.renderDoubleBorder(c.color,c.width,a,e.curves)];case 8:return i.sent(),[3,11];case 9:return[4,this.renderSolidBorder(c.color,a,e.curves)];case 10:i.sent(),i.label=11;case 11:a++,i.label=12;case 12:return s++,[3,3];case 13:return[2]}}))}))},n.prototype.renderDashedDottedBorder=function(e,t,n,o,a){return r(this,void 0,void 0,(function(){var r,s,u,c,l,h,f,d,p,m,g,A,v,b,y,w;return i(this,(function(i){return this.ctx.save(),r=function(e,t){switch(t){case 0:return Jo(e.topLeftBorderStroke,e.topRightBorderStroke);case 1:return Jo(e.topRightBorderStroke,e.bottomRightBorderStroke);case 2:return Jo(e.bottomRightBorderStroke,e.bottomLeftBorderStroke);case 3:default:return Jo(e.bottomLeftBorderStroke,e.topLeftBorderStroke)}}(o,n),s=Ko(o,n),2===a&&(this.path(s),this.ctx.clip()),jo(s[0])?(u=s[0].start.x,c=s[0].start.y):(u=s[0].x,c=s[0].y),jo(s[1])?(l=s[1].end.x,h=s[1].end.y):(l=s[1].x,h=s[1].y),f=0===n||2===n?Math.abs(u-l):Math.abs(c-h),this.ctx.beginPath(),3===a?this.formatPath(r):this.formatPath(s.slice(0,2)),d=t<3?3*t:2*t,p=t<3?2*t:t,3===a&&(d=t,p=t),m=!0,f<=2*d?m=!1:f<=2*d+p?(d*=g=f/(2*d+p),p*=g):(A=Math.floor((f+p)/(d+p)),v=(f-A*d)/(A-1),p=(b=(f-(A+1)*d)/A)<=0||Math.abs(p-v)<Math.abs(p-b)?v:b),m&&(3===a?this.ctx.setLineDash([0,d+p]):this.ctx.setLineDash([d,p])),3===a?(this.ctx.lineCap="round",this.ctx.lineWidth=t):this.ctx.lineWidth=2*t+1.1,this.ctx.strokeStyle=lt(e),this.ctx.stroke(),this.ctx.setLineDash([]),2===a&&(jo(s[0])&&(y=s[3],w=s[0],this.ctx.beginPath(),this.formatPath([new Bo(y.end.x,y.end.y),new Bo(w.start.x,w.start.y)]),this.ctx.stroke()),jo(s[1])&&(y=s[1],w=s[2],this.ctx.beginPath(),this.formatPath([new Bo(y.end.x,y.end.y),new Bo(w.start.x,w.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]}))}))},n.prototype.render=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=lt(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),t=function(e){var t=new qo(e,null),n=new Vo(t),r=[];return Go(t,n,n,r),Wo(t.container,r),n}(e),[4,this.renderStack(t)];case 1:return n.sent(),this.applyEffects([]),[2,this.canvas]}}))}))},n}(la),fa=function(e){return e instanceof bi||(e instanceof vi||e instanceof Ai&&e.type!==pi&&e.type!==di)},da=function(e,t){switch(e){case 0:return Po(t);case 2:return function(e){return[e.topLeftContentBox,e.topRightContentBox,e.bottomRightContentBox,e.bottomLeftContentBox]}(t);case 1:default:return Lo(t)}},pa=function(e){switch(e){case 1:return"center";case 2:return"right";case 0:default:return"left"}},ma=["-apple-system","system-ui"],ga=function(e){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?e.filter((function(e){return-1===ma.indexOf(e)})):e},Aa=function(e){function n(t,n){var r=e.call(this,t,n)||this;return r.canvas=n.canvas?n.canvas:document.createElement("canvas"),r.ctx=r.canvas.getContext("2d"),r.options=n,r.canvas.width=Math.floor(n.width*n.scale),r.canvas.height=Math.floor(n.height*n.scale),r.canvas.style.width=n.width+"px",r.canvas.style.height=n.height+"px",r.ctx.scale(r.options.scale,r.options.scale),r.ctx.translate(-n.x,-n.y),r.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+n.width+"x"+n.height+" at "+n.x+","+n.y+") with scale "+n.scale),r}return t(n,e),n.prototype.render=function(e){return r(this,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return t=qr(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,e),[4,va(t)];case 1:return n=r.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=lt(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(n,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}}))}))},n}(la),va=function(e){return new Promise((function(t,n){var r=new Image;r.onload=function(){t(r)},r.onerror=n,r.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent((new XMLSerializer).serializeToString(e))}))},ba=function(){function e(e){var t=e.id,n=e.enabled;this.id=t,this.enabled=n,this.start=Date.now()}return e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&("undefined"!=typeof window&&window.console&&"function"==typeof console.debug?console.debug.apply(console,o([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},e.prototype.getTime=function(){return Date.now()-this.start},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&"undefined"!=typeof window&&window.console&&"function"==typeof console.info&&console.info.apply(console,o([this.id,this.getTime()+"ms"],e))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&("undefined"!=typeof window&&window.console&&"function"==typeof console.warn?console.warn.apply(console,o([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&("undefined"!=typeof window&&window.console&&"function"==typeof console.error?console.error.apply(console,o([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},e.instances={},e}(),ya=function(){function e(t,n){var r;this.windowBounds=n,this.instanceName="#"+e.instanceCount++,this.logger=new ba({id:this.instanceName,enabled:t.logging}),this.cache=null!==(r=t.cache)&&void 0!==r?r:new xo(this,t)}return e.instanceCount=1,e}();"undefined"!=typeof window&&wo.setContext(window);var wa=function(e,t){return r(void 0,void 0,void 0,(function(){var r,o,u,c,l,h,f,d,p,m,g,A,v,b,y,w,x,C,k,E,S,_,O,T,D,B,I,M,j,N,F,R,P,L,U,z,H,$;return i(this,(function(i){switch(i.label){case 0:if(!e||"object"!=typeof e)return[2,Promise.reject("Invalid element provided as first argument")];if(!(r=e.ownerDocument))throw new Error("Element is not attached to a Document");if(!(o=r.defaultView))throw new Error("Document is not attached to a Window");return u={allowTaint:null!==(_=t.allowTaint)&&void 0!==_&&_,imageTimeout:null!==(O=t.imageTimeout)&&void 0!==O?O:15e3,proxy:t.proxy,useCORS:null!==(T=t.useCORS)&&void 0!==T&&T},c=n({logging:null===(D=t.logging)||void 0===D||D,cache:t.cache},u),l={windowWidth:null!==(B=t.windowWidth)&&void 0!==B?B:o.innerWidth,windowHeight:null!==(I=t.windowHeight)&&void 0!==I?I:o.innerHeight,scrollX:null!==(M=t.scrollX)&&void 0!==M?M:o.pageXOffset,scrollY:null!==(j=t.scrollY)&&void 0!==j?j:o.pageYOffset},h=new a(l.scrollX,l.scrollY,l.windowWidth,l.windowHeight),f=new ya(c,h),d=null!==(N=t.foreignObjectRendering)&&void 0!==N&&N,p={allowTaint:null!==(F=t.allowTaint)&&void 0!==F&&F,onclone:t.onclone,ignoreElements:t.ignoreElements,inlineImages:d,copyStyles:d},f.logger.debug("Starting document clone with size "+h.width+"x"+h.height+" scrolled to "+-h.left+","+-h.top),m=new io(f,e,p),(g=m.clonedReferenceElement)?[4,m.toIFrame(r,h)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return A=i.sent(),v=Ni(g)||function(e){return"HTML"===e.tagName}(g)?function(e){var t=e.body,n=e.documentElement;if(!t||!n)throw new Error("Unable to get document size");var r=Math.max(Math.max(t.scrollWidth,n.scrollWidth),Math.max(t.offsetWidth,n.offsetWidth),Math.max(t.clientWidth,n.clientWidth)),i=Math.max(Math.max(t.scrollHeight,n.scrollHeight),Math.max(t.offsetHeight,n.offsetHeight),Math.max(t.clientHeight,n.clientHeight));return new a(0,0,r,i)}(g.ownerDocument):s(f,g),b=v.width,y=v.height,w=v.left,x=v.top,C=xa(f,g,t.backgroundColor),k={canvas:t.canvas,backgroundColor:C,scale:null!==(P=null!==(R=t.scale)&&void 0!==R?R:o.devicePixelRatio)&&void 0!==P?P:1,x:(null!==(L=t.x)&&void 0!==L?L:0)+w,y:(null!==(U=t.y)&&void 0!==U?U:0)+x,width:null!==(z=t.width)&&void 0!==z?z:Math.ceil(b),height:null!==(H=t.height)&&void 0!==H?H:Math.ceil(y)},d?(f.logger.debug("Document cloned, using foreign object rendering"),[4,new Aa(f,k).render(g)]):[3,3];case 2:return E=i.sent(),[3,5];case 3:return f.logger.debug("Document cloned, element located at "+w+","+x+" with size "+b+"x"+y+" using computed rendering"),f.logger.debug("Starting DOM parsing"),S=ki(f,g),C===S.styles.backgroundColor&&(S.styles.backgroundColor=vt.TRANSPARENT),f.logger.debug("Starting renderer for element at "+k.x+","+k.y+" with size "+k.width+"x"+k.height),[4,new ha(f,k).render(S)];case 4:E=i.sent(),i.label=5;case 5:return(null===($=t.removeContainer)||void 0===$||$)&&(io.destroy(A)||f.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),f.logger.debug("Finished rendering"),[2,E]}}))}))},xa=function(e,t,n){var r=t.ownerDocument,i=r.documentElement?At(e,getComputedStyle(r.documentElement).backgroundColor):vt.TRANSPARENT,o=r.body?At(e,getComputedStyle(r.body).backgroundColor):vt.TRANSPARENT,a="string"==typeof n?At(e,n):null===n?vt.TRANSPARENT:4294967295;return t===r.documentElement?ct(i)?ct(o)?a:o:i:a};return function(e,t){return void 0===t&&(t={}),wa(e,t)}}()},function(e,t,n){
/*! @license DOMPurify 2.4.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.4.0/LICENSE */
e.exports=function(){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,n){return(t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,n)}function n(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function r(e,i,o){return(r=n()?Reflect.construct:function(e,n,r){var i=[null];i.push.apply(i,n);var o=new(Function.bind.apply(e,i));return r&&t(o,r.prototype),o}).apply(null,arguments)}function i(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var a=Object.hasOwnProperty,s=Object.setPrototypeOf,u=Object.isFrozen,c=Object.getPrototypeOf,l=Object.getOwnPropertyDescriptor,h=Object.freeze,f=Object.seal,d=Object.create,p="undefined"!=typeof Reflect&&Reflect,m=p.apply,g=p.construct;m||(m=function(e,t,n){return e.apply(t,n)}),h||(h=function(e){return e}),f||(f=function(e){return e}),g||(g=function(e,t){return r(e,i(t))});var A=_(Array.prototype.forEach),v=_(Array.prototype.pop),b=_(Array.prototype.push),y=_(String.prototype.toLowerCase),w=_(String.prototype.match),x=_(String.prototype.replace),C=_(String.prototype.indexOf),k=_(String.prototype.trim),E=_(RegExp.prototype.test),S=function(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return g(e,n)}}(TypeError);function _(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return m(e,t,r)}}function O(e,t,n){n=n||y,s&&s(e,null);for(var r=t.length;r--;){var i=t[r];if("string"==typeof i){var o=n(i);o!==i&&(u(t)||(t[r]=o),i=o)}e[i]=!0}return e}function T(e){var t,n=d(null);for(t in e)m(a,e,[t])&&(n[t]=e[t]);return n}function D(e,t){for(;null!==e;){var n=l(e,t);if(n){if(n.get)return _(n.get);if("function"==typeof n.value)return _(n.value)}e=c(e)}return function(e){return console.warn("fallback value for",e),null}}var B=h(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),I=h(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),M=h(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),j=h(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),N=h(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),F=h(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),R=h(["#text"]),P=h(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),L=h(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),U=h(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),z=h(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),H=f(/\{\{[\w\W]*|[\w\W]*\}\}/gm),$=f(/<%[\w\W]*|[\w\W]*%>/gm),Q=f(/^data-[\-\w.\u00B7-\uFFFF]/),V=f(/^aria-[\-\w]+$/),q=f(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),G=f(/^(?:\w+script|data):/i),W=f(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),K=f(/^html$/i),Y=function(){return"undefined"==typeof window?null:window},X=function(t,n){if("object"!==e(t)||"function"!=typeof t.createPolicy)return null;var r=null,i="data-tt-policy-suffix";n.currentScript&&n.currentScript.hasAttribute(i)&&(r=n.currentScript.getAttribute(i));var o="dompurify"+(r?"#"+r:"");try{return t.createPolicy(o,{createHTML:function(e){return e},createScriptURL:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}};return function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Y(),r=function(e){return t(e)};if(r.version="2.4.0",r.removed=[],!n||!n.document||9!==n.document.nodeType)return r.isSupported=!1,r;var o=n.document,a=n.document,s=n.DocumentFragment,u=n.HTMLTemplateElement,c=n.Node,l=n.Element,f=n.NodeFilter,d=n.NamedNodeMap,p=void 0===d?n.NamedNodeMap||n.MozNamedAttrMap:d,m=n.HTMLFormElement,g=n.DOMParser,_=n.trustedTypes,J=l.prototype,Z=D(J,"cloneNode"),ee=D(J,"nextSibling"),te=D(J,"childNodes"),ne=D(J,"parentNode");if("function"==typeof u){var re=a.createElement("template");re.content&&re.content.ownerDocument&&(a=re.content.ownerDocument)}var ie=X(_,o),oe=ie?ie.createHTML(""):"",ae=a,se=ae.implementation,ue=ae.createNodeIterator,ce=ae.createDocumentFragment,le=ae.getElementsByTagName,he=o.importNode,fe={};try{fe=T(a).documentMode?a.documentMode:{}}catch(J){}var de={};r.isSupported="function"==typeof ne&&se&&void 0!==se.createHTMLDocument&&9!==fe;var pe,me,ge=H,Ae=$,ve=Q,be=V,ye=G,we=W,xe=q,Ce=null,ke=O({},[].concat(i(B),i(I),i(M),i(N),i(R))),Ee=null,Se=O({},[].concat(i(P),i(L),i(U),i(z))),_e=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Oe=null,Te=null,De=!0,Be=!0,Ie=!1,Me=!1,je=!1,Ne=!1,Fe=!1,Re=!1,Pe=!1,Le=!1,Ue=!0,ze=!1,He="user-content-",$e=!0,Qe=!1,Ve={},qe=null,Ge=O({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),We=null,Ke=O({},["audio","video","img","source","image","track"]),Ye=null,Xe=O({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Je="http://www.w3.org/1998/Math/MathML",Ze="http://www.w3.org/2000/svg",et="http://www.w3.org/1999/xhtml",tt=et,nt=!1,rt=["application/xhtml+xml","text/html"],it="text/html",ot=null,at=a.createElement("form"),st=function(e){return e instanceof RegExp||e instanceof Function},ut=function(t){ot&&ot===t||(t&&"object"===e(t)||(t={}),t=T(t),pe=pe=-1===rt.indexOf(t.PARSER_MEDIA_TYPE)?it:t.PARSER_MEDIA_TYPE,me="application/xhtml+xml"===pe?function(e){return e}:y,Ce="ALLOWED_TAGS"in t?O({},t.ALLOWED_TAGS,me):ke,Ee="ALLOWED_ATTR"in t?O({},t.ALLOWED_ATTR,me):Se,Ye="ADD_URI_SAFE_ATTR"in t?O(T(Xe),t.ADD_URI_SAFE_ATTR,me):Xe,We="ADD_DATA_URI_TAGS"in t?O(T(Ke),t.ADD_DATA_URI_TAGS,me):Ke,qe="FORBID_CONTENTS"in t?O({},t.FORBID_CONTENTS,me):Ge,Oe="FORBID_TAGS"in t?O({},t.FORBID_TAGS,me):{},Te="FORBID_ATTR"in t?O({},t.FORBID_ATTR,me):{},Ve="USE_PROFILES"in t&&t.USE_PROFILES,De=!1!==t.ALLOW_ARIA_ATTR,Be=!1!==t.ALLOW_DATA_ATTR,Ie=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Me=t.SAFE_FOR_TEMPLATES||!1,je=t.WHOLE_DOCUMENT||!1,Re=t.RETURN_DOM||!1,Pe=t.RETURN_DOM_FRAGMENT||!1,Le=t.RETURN_TRUSTED_TYPE||!1,Fe=t.FORCE_BODY||!1,Ue=!1!==t.SANITIZE_DOM,ze=t.SANITIZE_NAMED_PROPS||!1,$e=!1!==t.KEEP_CONTENT,Qe=t.IN_PLACE||!1,xe=t.ALLOWED_URI_REGEXP||xe,tt=t.NAMESPACE||et,t.CUSTOM_ELEMENT_HANDLING&&st(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(_e.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&st(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(_e.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(_e.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Me&&(Be=!1),Pe&&(Re=!0),Ve&&(Ce=O({},i(R)),Ee=[],!0===Ve.html&&(O(Ce,B),O(Ee,P)),!0===Ve.svg&&(O(Ce,I),O(Ee,L),O(Ee,z)),!0===Ve.svgFilters&&(O(Ce,M),O(Ee,L),O(Ee,z)),!0===Ve.mathMl&&(O(Ce,N),O(Ee,U),O(Ee,z))),t.ADD_TAGS&&(Ce===ke&&(Ce=T(Ce)),O(Ce,t.ADD_TAGS,me)),t.ADD_ATTR&&(Ee===Se&&(Ee=T(Ee)),O(Ee,t.ADD_ATTR,me)),t.ADD_URI_SAFE_ATTR&&O(Ye,t.ADD_URI_SAFE_ATTR,me),t.FORBID_CONTENTS&&(qe===Ge&&(qe=T(qe)),O(qe,t.FORBID_CONTENTS,me)),$e&&(Ce["#text"]=!0),je&&O(Ce,["html","head","body"]),Ce.table&&(O(Ce,["tbody"]),delete Oe.tbody),h&&h(t),ot=t)},ct=O({},["mi","mo","mn","ms","mtext"]),lt=O({},["foreignobject","desc","title","annotation-xml"]),ht=O({},["title","style","font","a","script"]),ft=O({},I);O(ft,M),O(ft,j);var dt=O({},N);O(dt,F);var pt=function(e){var t=ne(e);t&&t.tagName||(t={namespaceURI:et,tagName:"template"});var n=y(e.tagName),r=y(t.tagName);return e.namespaceURI===Ze?t.namespaceURI===et?"svg"===n:t.namespaceURI===Je?"svg"===n&&("annotation-xml"===r||ct[r]):Boolean(ft[n]):e.namespaceURI===Je?t.namespaceURI===et?"math"===n:t.namespaceURI===Ze?"math"===n&&lt[r]:Boolean(dt[n]):e.namespaceURI===et&&(!(t.namespaceURI===Ze&&!lt[r])&&(!(t.namespaceURI===Je&&!ct[r])&&(!dt[n]&&(ht[n]||!ft[n]))))},mt=function(e){b(r.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=oe}catch(t){e.remove()}}},gt=function(e,t){try{b(r.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){b(r.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!Ee[e])if(Re||Pe)try{mt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},At=function(e){var t,n;if(Fe)e="<remove></remove>"+e;else{var r=w(e,/^[\r\n\t ]+/);n=r&&r[0]}"application/xhtml+xml"===pe&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");var i=ie?ie.createHTML(e):e;if(tt===et)try{t=(new g).parseFromString(i,pe)}catch(e){}if(!t||!t.documentElement){t=se.createDocument(tt,"template",null);try{t.documentElement.innerHTML=nt?"":i}catch(e){}}var o=t.body||t.documentElement;return e&&n&&o.insertBefore(a.createTextNode(n),o.childNodes[0]||null),tt===et?le.call(t,je?"html":"body")[0]:je?t.documentElement:o},vt=function(e){return ue.call(e.ownerDocument||e,e,f.SHOW_ELEMENT|f.SHOW_COMMENT|f.SHOW_TEXT,null,!1)},bt=function(e){return e instanceof m&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof p)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore)},yt=function(t){return"object"===e(c)?t instanceof c:t&&"object"===e(t)&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName},wt=function(e,t,n){de[e]&&A(de[e],(function(e){e.call(r,t,n,ot)}))},xt=function(e){var t;if(wt("beforeSanitizeElements",e,null),bt(e))return mt(e),!0;if(E(/[\u0080-\uFFFF]/,e.nodeName))return mt(e),!0;var n=me(e.nodeName);if(wt("uponSanitizeElement",e,{tagName:n,allowedTags:Ce}),e.hasChildNodes()&&!yt(e.firstElementChild)&&(!yt(e.content)||!yt(e.content.firstElementChild))&&E(/<[/\w]/g,e.innerHTML)&&E(/<[/\w]/g,e.textContent))return mt(e),!0;if("select"===n&&E(/<template/i,e.innerHTML))return mt(e),!0;if(!Ce[n]||Oe[n]){if(!Oe[n]&&kt(n)){if(_e.tagNameCheck instanceof RegExp&&E(_e.tagNameCheck,n))return!1;if(_e.tagNameCheck instanceof Function&&_e.tagNameCheck(n))return!1}if($e&&!qe[n]){var i=ne(e)||e.parentNode,o=te(e)||e.childNodes;if(o&&i)for(var a=o.length-1;a>=0;--a)i.insertBefore(Z(o[a],!0),ee(e))}return mt(e),!0}return e instanceof l&&!pt(e)?(mt(e),!0):"noscript"!==n&&"noembed"!==n||!E(/<\/no(script|embed)/i,e.innerHTML)?(Me&&3===e.nodeType&&(t=e.textContent,t=x(t,ge," "),t=x(t,Ae," "),e.textContent!==t&&(b(r.removed,{element:e.cloneNode()}),e.textContent=t)),wt("afterSanitizeElements",e,null),!1):(mt(e),!0)},Ct=function(e,t,n){if(Ue&&("id"===t||"name"===t)&&(n in a||n in at))return!1;if(Be&&!Te[t]&&E(ve,t));else if(De&&E(be,t));else if(!Ee[t]||Te[t]){if(!(kt(e)&&(_e.tagNameCheck instanceof RegExp&&E(_e.tagNameCheck,e)||_e.tagNameCheck instanceof Function&&_e.tagNameCheck(e))&&(_e.attributeNameCheck instanceof RegExp&&E(_e.attributeNameCheck,t)||_e.attributeNameCheck instanceof Function&&_e.attributeNameCheck(t))||"is"===t&&_e.allowCustomizedBuiltInElements&&(_e.tagNameCheck instanceof RegExp&&E(_e.tagNameCheck,n)||_e.tagNameCheck instanceof Function&&_e.tagNameCheck(n))))return!1}else if(Ye[t]);else if(E(xe,x(n,we,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==C(n,"data:")||!We[e]){if(Ie&&!E(ye,x(n,we,"")));else if(n)return!1}else;return!0},kt=function(e){return e.indexOf("-")>0},Et=function(t){var n,i,o,a;wt("beforeSanitizeAttributes",t,null);var s=t.attributes;if(s){var u={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ee};for(a=s.length;a--;){var c=n=s[a],l=c.name,h=c.namespaceURI;if(i="value"===l?n.value:k(n.value),o=me(l),u.attrName=o,u.attrValue=i,u.keepAttr=!0,u.forceKeepAttr=void 0,wt("uponSanitizeAttribute",t,u),i=u.attrValue,!u.forceKeepAttr&&(gt(l,t),u.keepAttr))if(E(/\/>/i,i))gt(l,t);else{Me&&(i=x(i,ge," "),i=x(i,Ae," "));var f=me(t.nodeName);if(Ct(f,o,i)){if(!ze||"id"!==o&&"name"!==o||(gt(l,t),i=He+i),ie&&"object"===e(_)&&"function"==typeof _.getAttributeType)if(h);else switch(_.getAttributeType(f,o)){case"TrustedHTML":i=ie.createHTML(i);break;case"TrustedScriptURL":i=ie.createScriptURL(i)}try{h?t.setAttributeNS(h,l,i):t.setAttribute(l,i),v(r.removed)}catch(e){}}}}wt("afterSanitizeAttributes",t,null)}},St=function e(t){var n,r=vt(t);for(wt("beforeSanitizeShadowDOM",t,null);n=r.nextNode();)wt("uponSanitizeShadowNode",n,null),xt(n)||(n.content instanceof s&&e(n.content),Et(n));wt("afterSanitizeShadowDOM",t,null)};return r.sanitize=function(t){var i,a,u,l,h,f=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if((nt=!t)&&(t="\x3c!--\x3e"),"string"!=typeof t&&!yt(t)){if("function"!=typeof t.toString)throw S("toString is not a function");if("string"!=typeof(t=t.toString()))throw S("dirty is not a string, aborting")}if(!r.isSupported){if("object"===e(n.toStaticHTML)||"function"==typeof n.toStaticHTML){if("string"==typeof t)return n.toStaticHTML(t);if(yt(t))return n.toStaticHTML(t.outerHTML)}return t}if(Ne||ut(f),r.removed=[],"string"==typeof t&&(Qe=!1),Qe){if(t.nodeName){var d=me(t.nodeName);if(!Ce[d]||Oe[d])throw S("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof c)1===(a=(i=At("\x3c!----\x3e")).ownerDocument.importNode(t,!0)).nodeType&&"BODY"===a.nodeName||"HTML"===a.nodeName?i=a:i.appendChild(a);else{if(!Re&&!Me&&!je&&-1===t.indexOf("<"))return ie&&Le?ie.createHTML(t):t;if(!(i=At(t)))return Re?null:Le?oe:""}i&&Fe&&mt(i.firstChild);for(var p=vt(Qe?t:i);u=p.nextNode();)3===u.nodeType&&u===l||xt(u)||(u.content instanceof s&&St(u.content),Et(u),l=u);if(l=null,Qe)return t;if(Re){if(Pe)for(h=ce.call(i.ownerDocument);i.firstChild;)h.appendChild(i.firstChild);else h=i;return Ee.shadowroot&&(h=he.call(o,h,!0)),h}var m=je?i.outerHTML:i.innerHTML;return je&&Ce["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&E(K,i.ownerDocument.doctype.name)&&(m="<!DOCTYPE "+i.ownerDocument.doctype.name+">\n"+m),Me&&(m=x(m,ge," "),m=x(m,Ae," ")),ie&&Le?ie.createHTML(m):m},r.setConfig=function(e){ut(e),Ne=!0},r.clearConfig=function(){ot=null,Ne=!1},r.isValidAttribute=function(e,t,n){ot||ut({});var r=me(e),i=me(t);return Ct(r,i,n)},r.addHook=function(e,t){"function"==typeof t&&(de[e]=de[e]||[],b(de[e],t))},r.removeHook=function(e){if(de[e])return v(de[e])},r.removeHooks=function(e){de[e]&&(de[e]=[])},r.removeAllHooks=function(){de={}},r}()}()},function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"AElement",(function(){return Re})),n.d(t,"AnimateColorElement",(function(){return De})),n.d(t,"AnimateElement",(function(){return Te})),n.d(t,"AnimateTransformElement",(function(){return Be})),n.d(t,"BoundingBox",(function(){return se})),n.d(t,"CB1",(function(){return B})),n.d(t,"CB2",(function(){return I})),n.d(t,"CB3",(function(){return M})),n.d(t,"CB4",(function(){return j})),n.d(t,"Canvg",(function(){return ut})),n.d(t,"CircleElement",(function(){return ge})),n.d(t,"ClipPathElement",(function(){return Je})),n.d(t,"DefsElement",(function(){return Ce})),n.d(t,"DescElement",(function(){return ot})),n.d(t,"Document",(function(){return st})),n.d(t,"Element",(function(){return re})),n.d(t,"EllipseElement",(function(){return Ae})),n.d(t,"FeColorMatrixElement",(function(){return Ke})),n.d(t,"FeCompositeElement",(function(){return nt})),n.d(t,"FeDropShadowElement",(function(){return et})),n.d(t,"FeGaussianBlurElement",(function(){return rt})),n.d(t,"FeMorphologyElement",(function(){return tt})),n.d(t,"FilterElement",(function(){return Ze})),n.d(t,"Font",(function(){return ae})),n.d(t,"FontElement",(function(){return Ne})),n.d(t,"FontFaceElement",(function(){return Ie})),n.d(t,"GElement",(function(){return ke})),n.d(t,"GlyphElement",(function(){return Me})),n.d(t,"GradientElement",(function(){return Ee})),n.d(t,"ImageElement",(function(){return Ue})),n.d(t,"LineElement",(function(){return ve})),n.d(t,"LinearGradientElement",(function(){return Se})),n.d(t,"MarkerElement",(function(){return xe})),n.d(t,"MaskElement",(function(){return Ye})),n.d(t,"Matrix",(function(){return J})),n.d(t,"MissingGlyphElement",(function(){return je})),n.d(t,"Mouse",(function(){return H})),n.d(t,"PSEUDO_ZERO",(function(){return _})),n.d(t,"Parser",(function(){return W})),n.d(t,"PathElement",(function(){return de})),n.d(t,"PathParser",(function(){return fe})),n.d(t,"PatternElement",(function(){return we})),n.d(t,"Point",(function(){return z})),n.d(t,"PolygonElement",(function(){return ye})),n.d(t,"PolylineElement",(function(){return be})),n.d(t,"Property",(function(){return P})),n.d(t,"QB1",(function(){return N})),n.d(t,"QB2",(function(){return F})),n.d(t,"QB3",(function(){return R})),n.d(t,"RadialGradientElement",(function(){return _e})),n.d(t,"RectElement",(function(){return me})),n.d(t,"RenderedElement",(function(){return ue})),n.d(t,"Rotate",(function(){return Y})),n.d(t,"SVGElement",(function(){return pe})),n.d(t,"SVGFontLoader",(function(){return He})),n.d(t,"Scale",(function(){return X})),n.d(t,"Screen",(function(){return V})),n.d(t,"Skew",(function(){return Z})),n.d(t,"SkewX",(function(){return ee})),n.d(t,"SkewY",(function(){return te})),n.d(t,"StopElement",(function(){return Oe})),n.d(t,"StyleElement",(function(){return $e})),n.d(t,"SymbolElement",(function(){return ze})),n.d(t,"TRefElement",(function(){return Fe})),n.d(t,"TSpanElement",(function(){return le})),n.d(t,"TextElement",(function(){return ce})),n.d(t,"TextPathElement",(function(){return Pe})),n.d(t,"TitleElement",(function(){return it})),n.d(t,"Transform",(function(){return ne})),n.d(t,"Translate",(function(){return K})),n.d(t,"UnknownElement",(function(){return ie})),n.d(t,"UseElement",(function(){return Qe})),n.d(t,"ViewPort",(function(){return L})),n.d(t,"compressSpaces",(function(){return c})),n.d(t,"elements",(function(){return at})),n.d(t,"getSelectorSpecificity",(function(){return S})),n.d(t,"normalizeAttributeName",(function(){return m})),n.d(t,"normalizeColor",(function(){return A})),n.d(t,"parseExternalUrl",(function(){return g})),n.d(t,"presets",(function(){return u})),n.d(t,"toMatrixValue",(function(){return d})),n.d(t,"toNumbers",(function(){return f})),n.d(t,"trimLeft",(function(){return l})),n.d(t,"trimRight",(function(){return h})),n.d(t,"vectorMagnitude",(function(){return O})),n.d(t,"vectorsAngle",(function(){return D})),n.d(t,"vectorsRatio",(function(){return T}));var r=n(220),i=n.n(r),o=(r=n(221),n.n(r)),a=n(156),s=n(282),u=Object.freeze({__proto__:null,offscreen:function(){var e=(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{}).DOMParser,t={window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:e,createCanvas:(e,t)=>new OffscreenCanvas(e,t),async createImage(e){const t=await fetch(e);return e=await t.blob(),await createImageBitmap(e)}};return void 0===globalThis.DOMParser&&void 0!==e||Reflect.deleteProperty(t,"DOMParser"),t},node:function(e){var{DOMParser:e,canvas:t,fetch:n}=e;return{window:null,ignoreAnimation:!0,ignoreMouse:!0,DOMParser:e,fetch:n,createCanvas:t.createCanvas,createImage:t.loadImage}}});function c(e){return e.replace(/(?!\u3000)\s+/gm," ")}function l(e){return e.replace(/^[\n \t]+/,"")}function h(e){return e.replace(/[\n \t]+$/,"")}function f(e){const t=e.match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm);return t?t.map(parseFloat):[]}function d(e){return[(e=f(e))[0]||0,e[1]||0,e[2]||0,e[3]||0,e[4]||0,e[5]||0]}const p=/^[A-Z-]+$/;function m(e){return p.test(e)?e.toLowerCase():e}function g(e){return(e=/url\(('([^']+)'|"([^"]+)"|([^'")]+))\)/.exec(e))&&(e[2]||e[3]||e[4])||""}function A(e){if(!e.startsWith("rgb"))return e;let t=3;return e.replace(/\d+(\.\d+)?/g,(e,n)=>t--&&n?String(Math.round(parseFloat(e))):e)}const v=/(\[[^\]]+\])/g,b=/(#[^\s+>~.[:]+)/g,y=/(\.[^\s+>~.[:]+)/g,w=/(::[^\s+>~.[:]+|:first-line|:first-letter|:before|:after)/gi,x=/(:[\w-]+\([^)]*\))/gi,C=/(:[^\s+>~.[:]+)/g,k=/([^\s+>~.[:]+)/g;function E(e,t){var n=t.exec(e);return n?[e.replace(t," "),n.length]:[e,0]}function S(e){const t=[0,0,0];let n=e.replace(/:not\(([^)]*)\)/g,"     $1 ").replace(/{[\s\S]*/gm," ");return e=0,[n,e]=E(n,v),t[1]+=e,[n,e]=E(n,b),t[0]+=e,[n,e]=E(n,y),t[1]+=e,[n,e]=E(n,w),t[2]+=e,[n,e]=E(n,x),t[1]+=e,[n,e]=E(n,C),t[1]+=e,n=n.replace(/[*\s+>~]/g," ").replace(/[#.]/g," "),[n,e]=E(n,k),t[2]+=e,t.join("")}const _=1e-8;function O(e){return Math.sqrt(Math.pow(e[0],2)+Math.pow(e[1],2))}function T(e,t){return(e[0]*t[0]+e[1]*t[1])/(O(e)*O(t))}function D(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(T(e,t))}function B(e){return e*e*e}function I(e){return 3*e*e*(1-e)}function M(e){return 3*e*(1-e)*(1-e)}function j(e){return(1-e)*(1-e)*(1-e)}function N(e){return e*e}function F(e){return 2*e*(1-e)}function R(e){return(1-e)*(1-e)}class P{static empty(e){return new P(e,"EMPTY","")}split(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:" ";const{document:t,name:n}=this;return c(this.getString()).trim().split(e).map(e=>new P(t,n,e))}hasValue(e){var t=this.value;return null!==t&&""!==t&&(e||0!==t)&&void 0!==t}isString(e){var t=this.value,n="string"==typeof t;return n&&e?e.test(t):n}isUrlDefinition(){return this.isString(/^url\(/)}isPixels(){if(!this.hasValue())return!1;const e=this.getString();switch(!0){case e.endsWith("px"):case/^[0-9]+$/.test(e):return!0;default:return!1}}setValue(e){return this.value=e,this}getValue(e){return void 0===e||this.hasValue()?this.value:e}getNumber(e){if(!this.hasValue())return void 0===e?0:parseFloat(e);e=this.value;let t=parseFloat(e);return this.isString(/%$/)&&(t/=100),t}getString(e){return void 0===e||this.hasValue()?void 0===this.value?"":String(this.value):String(e)}getColor(e){let t=this.getString(e);return this.isNormalizedColor||(this.isNormalizedColor=!0,t=A(t),this.value=t),t}getDpi(){return 96}getRem(){return this.document.rootEmSize}getEm(){return this.document.emSize}getUnits(){return this.getString().replace(/[0-9.-]/g,"")}getPixels(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1];if(!this.hasValue())return 0;var[n,e]="boolean"==typeof e?[void 0,e]:[e];const r=this.document.screen.viewPort;switch(!0){case this.isString(/vmin$/):return this.getNumber()/100*Math.min(r.computeSize("x"),r.computeSize("y"));case this.isString(/vmax$/):return this.getNumber()/100*Math.max(r.computeSize("x"),r.computeSize("y"));case this.isString(/vw$/):return this.getNumber()/100*r.computeSize("x");case this.isString(/vh$/):return this.getNumber()/100*r.computeSize("y");case this.isString(/rem$/):return this.getNumber()*this.getRem();case this.isString(/em$/):return this.getNumber()*this.getEm();case this.isString(/ex$/):return this.getNumber()*this.getEm()/2;case this.isString(/px$/):return this.getNumber();case this.isString(/pt$/):return this.getNumber()*this.getDpi()*(1/72);case this.isString(/pc$/):return 15*this.getNumber();case this.isString(/cm$/):return this.getNumber()*this.getDpi()/2.54;case this.isString(/mm$/):return this.getNumber()*this.getDpi()/25.4;case this.isString(/in$/):return this.getNumber()*this.getDpi();case this.isString(/%$/)&&e:return this.getNumber()*this.getEm();case this.isString(/%$/):return this.getNumber()*r.computeSize(n);default:var i=this.getNumber();return t&&i<1?i*r.computeSize(n):i}}getMilliseconds(){return this.hasValue()?this.isString(/ms$/)?this.getNumber():1e3*this.getNumber():0}getRadians(){if(!this.hasValue())return 0;switch(!0){case this.isString(/deg$/):return this.getNumber()*(Math.PI/180);case this.isString(/grad$/):return this.getNumber()*(Math.PI/200);case this.isString(/rad$/):return this.getNumber();default:return this.getNumber()*(Math.PI/180)}}getDefinition(){var e=this.getString(),t=(null==(t=/#([^)'"]+)/.exec(e))?void 0:t[1])||e;return this.document.definitions[t]}getFillStyleDefinition(e,t){let n=this.getDefinition();if(n){if("function"==typeof n.createGradient&&"getBoundingBox"in e)return n.createGradient(this.document.ctx,e,t);if("function"==typeof n.createPattern){if(n.getHrefAttribute().hasValue()){const e=n.getAttribute("patternTransform");(n=n.getHrefAttribute().getDefinition())&&e.hasValue()&&n.getAttribute("patternTransform",!0).setValue(e.value)}if(n)return n.createPattern(this.document.ctx,e,t)}}return null}getTextBaseline(){var e;return this.hasValue()&&(e=this.getString(),P.textBaselineMapping[e])||null}addOpacity(e){let t=this.getColor();var n=t.length;let r=0;for(let e=0;e<n&&(","===t[e]&&r++,3!==r);e++);if(e.hasValue()&&this.isString()&&3!==r){const n=new o.a(t);n.ok&&(n.alpha=e.getNumber(),t=n.toRGBA())}return new P(this.document,this.name,t)}constructor(e,t,n){this.document=e,this.name=t,this.value=n,this.isNormalizedColor=!1}}P.textBaselineMapping={baseline:"alphabetic","before-edge":"top","text-before-edge":"top",middle:"middle",central:"middle","after-edge":"bottom","text-after-edge":"bottom",ideographic:"ideographic",alphabetic:"alphabetic",hanging:"hanging",mathematical:"alphabetic"};class L{clear(){this.viewPorts=[]}setCurrent(e,t){this.viewPorts.push({width:e,height:t})}removeCurrent(){this.viewPorts.pop()}getRoot(){var[e]=this.viewPorts;return e||U()}getCurrent(){var e;return(e=(e=this.viewPorts)[e.length-1])||U()}get width(){return this.getCurrent().width}get height(){return this.getCurrent().height}computeSize(e){return"number"==typeof e?e:"x"===e?this.width:"y"===e?this.height:Math.sqrt(Math.pow(this.width,2)+Math.pow(this.height,2))/Math.sqrt(2)}constructor(){this.viewPorts=[]}}function U(){return{width:L.DEFAULT_VIEWPORT_WIDTH,height:L.DEFAULT_VIEWPORT_HEIGHT}}L.DEFAULT_VIEWPORT_WIDTH=800,L.DEFAULT_VIEWPORT_HEIGHT=600;class z{static parse(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,[e=t,t=t]=f(e);return new z(e,t)}static parseScale(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1,[e=t,t=e]=f(e);return new z(e,t)}static parsePath(e){var t=f(e),n=t.length;const r=[];for(let e=0;e<n;e+=2)r.push(new z(t[e],t[e+1]));return r}angleTo(e){return Math.atan2(e.y-this.y,e.x-this.x)}applyTransform(e){var{x:t,y:n}=this,r=t*e[0]+n*e[2]+e[4],t=t*e[1]+n*e[3]+e[5];this.x=r,this.y=t}constructor(e,t){this.x=e,this.y=t}}class H{isWorking(){return this.working}start(){if(!this.working){var{screen:e,onClick:t,onMouseMove:n}=this;const r=e.ctx.canvas;r.onclick=t,r.onmousemove=n,this.working=!0}}stop(){if(this.working){const e=this.screen.ctx.canvas;this.working=!1,e.onclick=null,e.onmousemove=null}}hasEvents(){return this.working&&0<this.events.length}runEvents(){if(this.working){const{screen:e,events:t,eventElements:n}=this,r=e.ctx.canvas.style;let i;r&&(r.cursor=""),t.forEach((e,t)=>{let r=e.run;for(i=n[t];i;)r(i),i=i.parent}),this.events=[],this.eventElements=[]}}checkPath(e,t){if(this.working&&t){const{events:n,eventElements:r}=this;n.forEach((n,i)=>{var{x:n,y:o}=n;!r[i]&&t.isPointInPath&&t.isPointInPath(n,o)&&(r[i]=e)})}}checkBoundingBox(e,t){if(this.working&&t){const{events:n,eventElements:r}=this;n.forEach((n,i)=>{var{x:n,y:o}=n;!r[i]&&t.isPointInBox(n,o)&&(r[i]=e)})}}mapXY(e,t){var{window:n,ctx:r}=this.screen;const i=new z(e,t);let o=r.canvas;for(;o;)i.x-=o.offsetLeft,i.y-=o.offsetTop,o=o.offsetParent;return null!=n&&n.scrollX&&(i.x+=n.scrollX),null!=n&&n.scrollY&&(i.y+=n.scrollY),i}onClick(e){var{x:e,y:t}=this.mapXY(e.clientX,e.clientY);this.events.push({type:"onclick",x:e,y:t,run(e){e.onClick&&e.onClick()}})}onMouseMove(e){var{x:e,y:t}=this.mapXY(e.clientX,e.clientY);this.events.push({type:"onmousemove",x:e,y:t,run(e){e.onMouseMove&&e.onMouseMove()}})}constructor(e){this.screen=e,this.working=!1,this.events=[],this.eventElements=[],this.onClick=this.onClick.bind(this),this.onMouseMove=this.onMouseMove.bind(this)}}const $="undefined"!=typeof window?window:null,Q="undefined"!=typeof fetch?fetch.bind(void 0):void 0;class V{wait(e){this.waits.push(e)}ready(){return this.readyPromise||Promise.resolve()}isReady(){var e;return!!this.isReadyLock||((e=this.waits.every(e=>e()))&&(this.waits=[],this.resolveReady&&this.resolveReady()),this.isReadyLock=e)}setDefaults(e){e.strokeStyle="rgba(0,0,0,0)",e.lineCap="butt",e.lineJoin="miter",e.miterLimit=4}setViewBox(e){let{document:t,ctx:n,aspectRatio:r,width:i,desiredWidth:o,height:a,desiredHeight:s,minX:u=0,minY:l=0,refX:h,refY:f,clip:d=!1,clipX:p=0,clipY:m=0}=e;const g=c(r).replace(/^defer\s/,"");var[e,A]=g.split(" ");const v=e||"xMidYMid";e=A||"meet";var b=i/o,y=a/s,w=Math.min(b,y),x=Math.max(b,y);let C=o,k=s;"meet"===e&&(C*=w,k*=w),"slice"===e&&(C*=x,k*=x);const E=new P(t,"refX",h),S=new P(t,"refY",f);var _,O,T,A;switch((A=E.hasValue()&&S.hasValue())&&n.translate(-w*E.getPixels("x"),-w*S.getPixels("y")),d&&(O=w*p,_=w*m,n.beginPath(),n.moveTo(O,_),n.lineTo(i,_),n.lineTo(i,a),n.lineTo(O,a),n.closePath(),n.clip()),A||(_="meet"===e&&w===y,O="slice"===e&&x===y,A="meet"===e&&w===b,T="slice"===e&&x===b,v.startsWith("xMid")&&(_||O)&&n.translate(i/2-C/2,0),v.endsWith("YMid")&&(A||T)&&n.translate(0,a/2-k/2),v.startsWith("xMax")&&(_||O)&&n.translate(i-C,0),v.endsWith("YMax")&&(A||T)&&n.translate(0,a-k)),!0){case"none"===v:n.scale(b,y);break;case"meet"===e:n.scale(w,w);break;case"slice"===e:n.scale(x,x)}n.translate(-u,-l)}start(e){let{enableRedraw:t=!1,ignoreMouse:n=!1,ignoreAnimation:r=!1,ignoreDimensions:o=!1,ignoreClear:a=!1,forceRedraw:s,scaleWidth:u,scaleHeight:c,offsetX:l,offsetY:h}=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};const f=this.mouse,d=1e3/V.FRAMERATE;if(this.isReadyLock=!1,this.frameDuration=d,this.readyPromise=new Promise(e=>{this.resolveReady=e}),this.isReady()&&this.render(e,o,a,u,c,l,h),t){let t=Date.now(),p=t,m=0;const g=()=>{t=Date.now(),(m=t-p)>=d&&(p=t-m%d,this.shouldUpdate(r,s)&&(this.render(e,o,a,u,c,l,h),f.runEvents())),this.intervalId=i()(g)};n||f.start(),this.intervalId=i()(g)}}stop(){this.intervalId&&(i.a.cancel(this.intervalId),this.intervalId=null),this.mouse.stop()}shouldUpdate(e,t){if(!e){const e=this.frameDuration;if(this.animations.reduce((t,n)=>n.update(e)||t,!1))return!0}return!("function"!=typeof t||!t())||!(this.isReadyLock||!this.isReady())||!!this.mouse.hasEvents()}render(e,t,n,r,i,o,a){const{viewPort:s,ctx:u,isFirstRender:c}=this,l=u.canvas,h=(s.clear(),l.width&&l.height&&s.setCurrent(l.width,l.height),e.getStyle("width")),d=e.getStyle("height");!t&&(c||"number"!=typeof r&&"number"!=typeof i)&&(h.hasValue()&&(l.width=h.getPixels("x"),l.style&&(l.style.width="".concat(l.width,"px"))),d.hasValue()&&(l.height=d.getPixels("y"),l.style&&(l.style.height="".concat(l.height,"px"))));let p=l.clientWidth||l.width,m=l.clientHeight||l.height;if(t&&h.hasValue()&&d.hasValue()&&(p=h.getPixels("x"),m=d.getPixels("y")),s.setCurrent(p,m),"number"==typeof o&&e.getAttribute("x",!0).setValue(o),"number"==typeof a&&e.getAttribute("y",!0).setValue(a),"number"==typeof r||"number"==typeof i){t=f(e.getAttribute("viewBox").getString());let n=0,o=0;if("number"==typeof r){const i=e.getStyle("width");i.hasValue()?n=i.getPixels("x")/r:t[2]&&!isNaN(t[2])&&(n=t[2]/r)}if("number"==typeof i){const n=e.getStyle("height");n.hasValue()?o=n.getPixels("y")/i:t[3]&&!isNaN(t[3])&&(o=t[3]/i)}n=n||o,o=o||n,e.getAttribute("width",!0).setValue(r),e.getAttribute("height",!0).setValue(i);const a=e.getStyle("transform",!0,!0);a.setValue("".concat(a.getString()," scale(").concat(1/n,", ").concat(1/o,")"))}n||u.clearRect(0,0,p,m),e.render(u),c&&(this.isFirstRender=!1)}constructor(e,{fetch:t=Q,window:n=$}={}){if(this.ctx=e,this.viewPort=new L,this.mouse=new H(this),this.animations=[],this.waits=[],this.frameDuration=0,this.isReadyLock=!1,this.isFirstRender=!0,this.intervalId=null,this.window=n,!t)throw new Error("Can't find 'fetch' in 'globalThis', please provide it via options");this.fetch=t}}V.defaultWindow=$,V.defaultFetch=Q,V.FRAMERATE=30,V.MAX_VIRTUAL_PIXELS=3e4;const q=V.defaultFetch,G="undefined"!=typeof DOMParser?DOMParser:void 0;class W{async parse(e){return e.startsWith("<")?this.parseFromString(e):this.load(e)}parseFromString(e){const t=new this.DOMParser;try{return this.checkDocument(t.parseFromString(e,"image/svg+xml"))}catch(n){return this.checkDocument(t.parseFromString(e,"text/xml"))}}checkDocument(e){var t=e.getElementsByTagName("parsererror")[0];if(t)throw new Error(t.textContent||"Unknown parse error");return e}async load(e){const t=await this.fetch(e);return e=await t.text(),this.parseFromString(e)}constructor({fetch:e=q,DOMParser:t=G}={}){if(!e)throw new Error("Can't find 'fetch' in 'globalThis', please provide it via options");if(!t)throw new Error("Can't find 'DOMParser' in 'globalThis', please provide it via options");this.fetch=e,this.DOMParser=t}}class K{apply(e){var{x:t,y:n}=this.point;e.translate(t||0,n||0)}unapply(e){var{x:t,y:n}=this.point;e.translate(-1*t||0,-1*n||0)}applyToPoint(e){var{x:t,y:n}=this.point;e.applyTransform([1,0,0,1,t||0,n||0])}constructor(e,t){this.type="translate",this.point=z.parse(t)}}class Y{apply(e){const{cx:t,cy:n,originX:r,originY:i,angle:o}=this;var a=t+r.getPixels("x"),s=n+i.getPixels("y");e.translate(a,s),e.rotate(o.getRadians()),e.translate(-a,-s)}unapply(e){const{cx:t,cy:n,originX:r,originY:i,angle:o}=this;var a=t+r.getPixels("x"),s=n+i.getPixels("y");e.translate(a,s),e.rotate(-1*o.getRadians()),e.translate(-a,-s)}applyToPoint(e){const{cx:t,cy:n,angle:r}=this;var i=r.getRadians();e.applyTransform([1,0,0,1,t||0,n||0]),e.applyTransform([Math.cos(i),Math.sin(i),-Math.sin(i),Math.cos(i),0,0]),e.applyTransform([1,0,0,1,-t||0,-n||0])}constructor(e,t,n){this.type="rotate",t=f(t),this.angle=new P(e,"angle",t[0]),this.originX=n[0],this.originY=n[1],this.cx=t[1]||0,this.cy=t[2]||0}}class X{apply(e){const{scale:{x:t,y:n},originX:r,originY:i}=this;var o=r.getPixels("x"),a=i.getPixels("y");e.translate(o,a),e.scale(t,n||t),e.translate(-o,-a)}unapply(e){const{scale:{x:t,y:n},originX:r,originY:i}=this;var o=r.getPixels("x"),a=i.getPixels("y");e.translate(o,a),e.scale(1/t,1/n||t),e.translate(-o,-a)}applyToPoint(e){var{x:t,y:n}=this.scale;e.applyTransform([t||0,0,0,n||0,0,0])}constructor(e,t,n){this.type="scale";const r=z.parseScale(t);0!==r.x&&0!==r.y||(r.x=_,r.y=_),this.scale=r,this.originX=n[0],this.originY=n[1]}}class J{apply(e){const{originX:t,originY:n,matrix:r}=this;var i=t.getPixels("x"),o=n.getPixels("y");e.translate(i,o),e.transform(r[0],r[1],r[2],r[3],r[4],r[5]),e.translate(-i,-o)}unapply(e){const{originX:t,originY:n,matrix:r}=this;var i=r[0],o=r[2],a=r[4],s=r[1],u=r[3],c=r[5],l=1/(i*(+u-0*c)-o*(+s-0*c)+a*(0*s-0*u)),h=t.getPixels("x"),f=n.getPixels("y");e.translate(h,f),e.transform(l*(+u-0*c),l*(0*c-+s),l*(0*a-+o),l*(+i-0*a),l*(o*c-a*u),l*(a*s-i*c)),e.translate(-h,-f)}applyToPoint(e){e.applyTransform(this.matrix)}constructor(e,t,n){this.type="matrix",this.matrix=d(t),this.originX=n[0],this.originY=n[1]}}class Z extends J{constructor(e,t,n){super(e,t,n),this.type="skew",this.angle=new P(e,"angle",t)}}class ee extends Z{constructor(e,t,n){super(e,t,n),this.type="skewX",this.matrix=[1,0,Math.tan(this.angle.getRadians()),1,0,0]}}class te extends Z{constructor(e,t,n){super(e,t,n),this.type="skewY",this.matrix=[1,Math.tan(this.angle.getRadians()),0,1,0,0]}}class ne{static fromElement(e,t){const n=t.getStyle("transform",!1,!0);if(n.hasValue()){var[t,r=t]=t.getStyle("transform-origin",!1,!0).split();if(t&&r)return t=[t,r],new ne(e,n.getString(),t)}return null}apply(e){this.transforms.forEach(t=>t.apply(e))}unapply(e){this.transforms.forEach(t=>t.unapply(e))}applyToPoint(e){this.transforms.forEach(t=>t.applyToPoint(e))}constructor(e,t,n){this.document=e,this.transforms=[];c(t).trim().replace(/\)([a-zA-Z])/g,") $1").replace(/\)(\s?,\s?)/g,") ").split(/\s(?=[a-z])/).forEach(e=>{if("none"!==e){var[e,t]=function(e){const[t="",n=""]=e.split("(");return[t.trim(),n.trim().replace(")","")]}(e);const r=ne.transformTypes[e];r&&this.transforms.push(new r(this.document,t,n))}})}}ne.transformTypes={translate:K,rotate:Y,scale:X,matrix:J,skewX:ee,skewY:te};class re{getAttribute(e){const t=this.attributes[e];if(t||!(1<arguments.length&&void 0!==arguments[1]&&arguments[1]))return t||P.empty(this.document);{const t=new P(this.document,e,"");return this.attributes[e]=t}}getHrefAttribute(){let e;for(const t in this.attributes)if("href"===t||t.endsWith(":href")){e=this.attributes[t];break}return e||P.empty(this.document)}getStyle(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1],n=2<arguments.length&&void 0!==arguments[2]&&arguments[2];const r=this.styles[e];if(r)return r;const i=this.getAttribute(e);if(i.hasValue())return this.styles[e]=i;if(!n){const t=this.parent;if(t){const n=t.getStyle(e);if(n.hasValue())return n}}if(t){const t=new P(this.document,e,"");return this.styles[e]=t}return P.empty(this.document)}render(e){if("none"!==this.getStyle("display").getString()&&"hidden"!==this.getStyle("visibility").getString()){if(e.save(),this.getStyle("mask").hasValue()){const t=this.getStyle("mask").getDefinition();t&&(this.applyEffects(e),t.apply(e,this))}else if("none"!==this.getStyle("filter").getValue("none")){const t=this.getStyle("filter").getDefinition();t&&(this.applyEffects(e),t.apply(e,this))}else this.setContext(e),this.renderChildren(e),this.clearContext(e);e.restore()}}setContext(e){}applyEffects(e){const t=ne.fromElement(this.document,this),n=(t&&t.apply(e),this.getStyle("clip-path",!1,!0));if(n.hasValue()){const t=n.getDefinition();t&&t.apply(e)}}clearContext(e){}renderChildren(e){this.children.forEach(t=>{t.render(e)})}addChild(e){const t=e instanceof re?e:this.document.createElement(e);t.parent=this,re.ignoreChildTypes.includes(t.type)||this.children.push(t)}matchesSelector(e){var t;const n=this.node;if("function"==typeof n.matches)return n.matches(e);const r=null==(t=n.getAttribute)?void 0:t.call(n,"class");return!(!r||""===r)&&r.split(" ").some(t=>".".concat(t)===e)}addStylesFromStyleDefinition(){var e,{styles:t,stylesSpecificity:n}=this.document;for(const o in t)if(!o.startsWith("@")&&this.matchesSelector(o)){var r=t[o],i=n[o];if(r)for(const t in r){let n=this.stylesSpecificity[t];void 0===n&&(n="000"),i&&i>=n&&((e=r[t])&&(this.styles[t]=e),this.stylesSpecificity[t]=i)}}}removeStyles(e,t){return t.reduce((t,n)=>{const r=e.getStyle(n);var i;return r.hasValue()?(i=r.getString(),r.setValue(""),[...t,[n,i]]):t},[])}restoreStyles(e,t){t.forEach(t=>{var[t,n]=t;e.getStyle(t,!0).setValue(n)})}isFirstChild(){var e;return 0===(null==(e=this.parent)?void 0:e.children.indexOf(this))}constructor(e,t,n=!1){if(this.document=e,this.node=t,this.captureTextNodes=n,this.type="",this.attributes={},this.styles={},this.stylesSpecificity={},this.animationFrozen=!1,this.animationFrozenValue="",this.parent=null,this.children=[],t&&1===t.nodeType){if(Array.from(t.attributes).forEach(t=>{var n=m(t.nodeName);this.attributes[n]=new P(e,n,t.value)}),this.addStylesFromStyleDefinition(),this.getAttribute("style").hasValue()){this.getAttribute("style").getString().split(";").map(e=>e.trim()).forEach(t=>{var n;t&&([t,n]=t.split(":").map(e=>e.trim()),t&&(this.styles[t]=new P(e,t,n)))})}const r=e.definitions,i=this.getAttribute("id");!i.hasValue()||r[i.getString()]||(r[i.getString()]=this),Array.from(t.childNodes).forEach(t=>{if(1===t.nodeType)this.addChild(t);else if(n&&(3===t.nodeType||4===t.nodeType)){const n=e.createTextNode(t);0<n.getText().length&&this.addChild(n)}})}}}re.ignoreChildTypes=["title"];class ie extends re{constructor(e,t,n){super(e,t,n)}}function oe(e){return e=e.trim(),/^('|")/.test(e)?e:'"'.concat(e,'"')}class ae{static parse(){var e=1<arguments.length?arguments[1]:void 0;let t="",n="",r="",i="",o="";const a=c(0<arguments.length&&void 0!==arguments[0]?arguments[0]:"").trim().split(" "),s={fontSize:!1,fontStyle:!1,fontWeight:!1,fontVariant:!1};return a.forEach(e=>{switch(!0){case!s.fontStyle&&ae.styles.includes(e):"inherit"!==e&&(t=e),s.fontStyle=!0;break;case!s.fontVariant&&ae.variants.includes(e):"inherit"!==e&&(n=e),s.fontStyle=!0,s.fontVariant=!0;break;case!s.fontWeight&&ae.weights.includes(e):"inherit"!==e&&(r=e),s.fontStyle=!0,s.fontVariant=!0,s.fontWeight=!0;break;case!s.fontSize:"inherit"!==e&&(i=e.split("/")[0]||""),s.fontStyle=!0,s.fontVariant=!0,s.fontWeight=!0,s.fontSize=!0;break;default:"inherit"!==e&&(o+=e)}}),new ae(t,n,r,i,o,e)}toString(){return[function(e){if(!e)return"";var t=e.trim().toLowerCase();switch(t){case"normal":case"italic":case"oblique":case"inherit":case"initial":case"unset":return t;default:return/^oblique\s+(-|)\d+deg$/.test(t)?t:""}}(this.fontStyle),this.fontVariant,function(e){if(!e)return"";var t=e.trim().toLowerCase();switch(t){case"normal":case"bold":case"lighter":case"bolder":case"inherit":case"initial":case"unset":return t;default:return/^[\d.]+$/.test(t)?t:""}}(this.fontWeight),this.fontSize,(t=this.fontFamily,void 0===e?t:t.trim().split(",").map(oe).join(","))].join(" ").trim();var t}constructor(e,t,n,r,i,o){o=o?"string"==typeof o?ae.parse(o):o:{},this.fontFamily=i||o.fontFamily,this.fontSize=r||o.fontSize,this.fontStyle=e||o.fontStyle,this.fontWeight=n||o.fontWeight,this.fontVariant=t||o.fontVariant}}ae.styles="normal|italic|oblique|inherit",ae.variants="normal|small-caps|inherit",ae.weights="normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit";class se{get x(){return this.x1}get y(){return this.y1}get width(){return this.x2-this.x1}get height(){return this.y2-this.y1}addPoint(e,t){void 0!==e&&((isNaN(this.x1)||isNaN(this.x2))&&(this.x1=e,this.x2=e),e<this.x1&&(this.x1=e),e>this.x2&&(this.x2=e)),void 0!==t&&((isNaN(this.y1)||isNaN(this.y2))&&(this.y1=t,this.y2=t),t<this.y1&&(this.y1=t),t>this.y2&&(this.y2=t))}addX(e){this.addPoint(e,0)}addY(e){this.addPoint(0,e)}addBoundingBox(e){var t,n,r;e&&(({x1:e,y1:t,x2:n,y2:r}=e),this.addPoint(e,t),this.addPoint(n,r))}sumCubic(e,t,n,r,i){return Math.pow(1-e,3)*t+3*Math.pow(1-e,2)*e*n+3*(1-e)*Math.pow(e,2)*r+Math.pow(e,3)*i}bezierCurveAdd(e,t,n,r,i){var o=6*t-12*n+6*r,a=-3*t+9*n-9*r+3*i,s=3*n-3*t;if(0==a)return 0==o?void 0:void(0<(u=-s/o)&&u<1&&(e?this.addX(this.sumCubic(u,t,n,r,i)):this.addY(this.sumCubic(u,t,n,r,i))));var u=Math.pow(o,2)-4*s*a;u<0||(0<(s=(-o+Math.sqrt(u))/(2*a))&&s<1&&(e?this.addX(this.sumCubic(s,t,n,r,i)):this.addY(this.sumCubic(s,t,n,r,i))),0<(s=(-o-Math.sqrt(u))/(2*a))&&s<1&&(e?this.addX(this.sumCubic(s,t,n,r,i)):this.addY(this.sumCubic(s,t,n,r,i))))}addBezierCurve(e,t,n,r,i,o,a,s){this.addPoint(e,t),this.addPoint(a,s),this.bezierCurveAdd(!0,e,n,i,a),this.bezierCurveAdd(!1,t,r,o,s)}addQuadraticCurve(e,t,n,r,i,o){n=e+2/3*(n-e),r=t+2/3*(r-t),this.addBezierCurve(e,t,n,n+1/3*(i-e),r,r+1/3*(o-t),i,o)}isPointInBox(e,t){var{x1:n,y1:r,x2:i,y2:o}=this;return n<=e&&e<=i&&r<=t&&t<=o}constructor(e=Number.NaN,t=Number.NaN,n=Number.NaN,r=Number.NaN){this.x1=e,this.y1=t,this.x2=n,this.y2=r,this.addPoint(e,t),this.addPoint(n,r)}}class ue extends re{calculateOpacity(){let e=1,t=this;for(;t;){const n=t.getStyle("opacity",!1,!0);n.hasValue(!0)&&(e*=n.getNumber()),t=t.parent}return e}setContext(e){var t,n=1<arguments.length&&void 0!==arguments[1]&&arguments[1];if(!n){const n=this.getStyle("fill"),r=this.getStyle("fill-opacity"),i=this.getStyle("stroke"),o=this.getStyle("stroke-opacity");n.isUrlDefinition()?(t=n.getFillStyleDefinition(this,r))&&(e.fillStyle=t):n.hasValue()&&("currentColor"===n.getString()&&n.setValue(this.getStyle("color").getColor()),"inherit"!==(t=n.getColor())&&(e.fillStyle="none"===t?"rgba(0,0,0,0)":t)),r.hasValue()&&(t=new P(this.document,"fill",e.fillStyle).addOpacity(r).getColor(),e.fillStyle=t),i.isUrlDefinition()?(t=i.getFillStyleDefinition(this,o))&&(e.strokeStyle=t):i.hasValue()&&("currentColor"===i.getString()&&i.setValue(this.getStyle("color").getColor()),"inherit"!==(t=i.getString())&&(e.strokeStyle="none"===t?"rgba(0,0,0,0)":t)),o.hasValue()&&(t=new P(this.document,"stroke",e.strokeStyle).addOpacity(o).getString(),e.strokeStyle=t);const a=this.getStyle("stroke-width"),s=(a.hasValue()&&(t=a.getPixels(),e.lineWidth=t||_),this.getStyle("stroke-linecap")),u=this.getStyle("stroke-linejoin"),c=this.getStyle("stroke-miterlimit"),l=this.getStyle("stroke-dasharray"),h=this.getStyle("stroke-dashoffset");s.hasValue()&&(e.lineCap=s.getString()),u.hasValue()&&(e.lineJoin=u.getString()),c.hasValue()&&(e.miterLimit=c.getNumber()),l.hasValue()&&"none"!==l.getString()&&(t=f(l.getString()),void 0!==e.setLineDash?e.setLineDash(t):void 0!==e.webkitLineDash?e.webkitLineDash=t:void 0===e.mozDash||1===t.length&&0===t[0]||(e.mozDash=t),t=h.getPixels(),void 0!==e.lineDashOffset?e.lineDashOffset=t:void 0!==e.webkitLineDashOffset?e.webkitLineDashOffset=t:void 0!==e.mozDashOffset&&(e.mozDashOffset=t))}if(this.modifiedEmSizeStack=!1,void 0!==e.font){const t=this.getStyle("font"),n=this.getStyle("font-style"),r=this.getStyle("font-variant"),i=this.getStyle("font-weight"),o=this.getStyle("font-size"),a=this.getStyle("font-family"),s=new ae(n.getString(),r.getString(),i.getString(),o.hasValue()?"".concat(o.getPixels(!0),"px"):"",a.getString(),ae.parse(t.getString(),e.font));n.setValue(s.fontStyle),r.setValue(s.fontVariant),i.setValue(s.fontWeight),o.setValue(s.fontSize),a.setValue(s.fontFamily),e.font=s.toString(),o.isPixels()&&(this.document.emSize=o.getPixels(),this.modifiedEmSizeStack=!0)}n||(this.applyEffects(e),e.globalAlpha=this.calculateOpacity())}clearContext(e){super.clearContext(e),this.modifiedEmSizeStack&&this.document.popEmSize()}constructor(...e){super(...e),this.modifiedEmSizeStack=!1}}class ce extends ue{setContext(e){super.setContext(e,1<arguments.length&&void 0!==arguments[1]&&arguments[1]);var t=this.getStyle("dominant-baseline").getTextBaseline()||this.getStyle("alignment-baseline").getTextBaseline();t&&(e.textBaseline=t)}initializeCoordinates(){this.x=0,this.y=0,this.leafTexts=[],this.textChunkStart=0,this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY}getBoundingBox(e){if("text"!==this.type)return this.getTElementBoundingBox(e);this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(e);let t=null;return this.children.forEach((n,r)=>{r=this.getChildBoundingBox(e,this,this,r),t?t.addBoundingBox(r):t=r}),t}getFontSize(){const{document:e,parent:t}=this;var n=ae.parse(e.ctx.font).fontSize;return t.getStyle("font-size").getNumber(n)}getTElementBoundingBox(e){var t=this.getFontSize();return new se(this.x,this.y-t,this.x+this.measureText(e),this.y)}getGlyph(e,t,n){var r=t[n];let i;if(e.isArabic){var o=t.length,a=t[n-1];t=t[n+1];let s=0<n&&" "!==a&&(n===o-1||" "===t)?"initial":0<n&&" "!==a&&n<o-1&&" "!==t?"medial":(0===n||" "===a)&&n<o-1&&" "!==t?"terminal":"isolated";i=(null==(a=e.arabicGlyphs[r])?void 0:a[s])||e.glyphs[r]}else i=e.glyphs[r];return i||e.missingGlyph}getText(){return""}getTextFromNode(e){e=e||this.node;const t=Array.from(e.parentNode.childNodes);var n=t.indexOf(e),r=t.length-1;let i=c(e.textContent||"");return 0===n&&(i=l(i)),n===r?h(i):i}renderChildren(e){if("text"!==this.type)this.renderTElementChildren(e);else{this.initializeCoordinates(),this.adjustChildCoordinatesRecursive(e),this.children.forEach((t,n)=>{this.renderChild(e,this,this,n)});const t=this.document.screen.mouse;t.isWorking()&&t.checkBoundingBox(this,this.getBoundingBox(e))}}renderTElementChildren(e){const{document:t,parent:n}=this,r=this.getText();var i=n.getStyle("font-family").getDefinition();if(i){var o=i.fontFace.unitsPerEm,a=ae.parse(t.ctx.font),s=n.getStyle("font-size").getNumber(a.fontSize),u=n.getStyle("font-style").getString(a.fontStyle),c=s/o,l=i.isRTL?r.split("").reverse().join(""):r,h=f(n.getAttribute("dx").getString()),d=l.length;for(let t=0;t<d;t++){const n=this.getGlyph(i,l,t);e.translate(this.x,this.y),e.scale(c,-c);var p=e.lineWidth;e.lineWidth=e.lineWidth*o/s,"italic"===u&&e.transform(1,0,.4,1,0,0),n.render(e),"italic"===u&&e.transform(1,0,-.4,1,0,0),e.lineWidth=p,e.scale(1/c,-1/c),e.translate(-this.x,-this.y),this.x+=s*(n.horizAdvX||i.horizAdvX)/o,void 0===h[t]||isNaN(h[t])||(this.x+=h[t])}}else{var{x:a,y:m}=this;e.fillStyle&&e.fillText(r,a,m),e.strokeStyle&&e.strokeText(r,a,m)}}applyAnchoring(){if(!(this.textChunkStart>=this.leafTexts.length)){const t=this.leafTexts[this.textChunkStart];var e=t.getStyle("text-anchor").getString("start");let n=0;n="start"===e?t.x-this.minX:"end"===e?t.x-this.maxX:t.x-(this.minX+this.maxX)/2;for(let e=this.textChunkStart;e<this.leafTexts.length;e++)this.leafTexts[e].x+=n;this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY,this.textChunkStart=this.leafTexts.length}}adjustChildCoordinatesRecursive(e){this.children.forEach((t,n)=>{this.adjustChildCoordinatesRecursiveCore(e,this,this,n)}),this.applyAnchoring()}adjustChildCoordinatesRecursiveCore(e,t,n,r){const i=n.children[r];0<i.children.length?i.children.forEach((n,r)=>{t.adjustChildCoordinatesRecursiveCore(e,t,i,r)}):this.adjustChildCoordinates(e,t,n,r)}adjustChildCoordinates(e,t,n,r){const i=n.children[r];if("function"==typeof i.measureText){e.save(),i.setContext(e,!0);const o=i.getAttribute("x"),a=i.getAttribute("y"),s=i.getAttribute("dx"),u=i.getAttribute("dy");n=i.getStyle("font-family").getDefinition(),n=Boolean(null==n?void 0:n.isRTL),0===r&&(o.hasValue()||o.setValue(i.getInheritedAttribute("x")),a.hasValue()||a.setValue(i.getInheritedAttribute("y")),s.hasValue()||s.setValue(i.getInheritedAttribute("dx")),u.hasValue()||u.setValue(i.getInheritedAttribute("dy"))),r=i.measureText(e),n&&(t.x-=r),o.hasValue()?(t.applyAnchoring(),i.x=o.getPixels("x"),s.hasValue()&&(i.x+=s.getPixels("x"))):(s.hasValue()&&(t.x+=s.getPixels("x")),i.x=t.x),t.x=i.x,n||(t.x+=r),a.hasValue()?(i.y=a.getPixels("y"),u.hasValue()&&(i.y+=u.getPixels("y"))):(u.hasValue()&&(t.y+=u.getPixels("y")),i.y=t.y),t.y=i.y,t.leafTexts.push(i),t.minX=Math.min(t.minX,i.x,i.x+r),t.maxX=Math.max(t.maxX,i.x,i.x+r),i.clearContext(e),e.restore()}return i}getChildBoundingBox(e,t,n,r){const i=n.children[r];if("function"!=typeof i.getBoundingBox)return null;const o=i.getBoundingBox(e);return o&&i.children.forEach((n,r)=>{r=t.getChildBoundingBox(e,t,i,r),o.addBoundingBox(r)}),o}renderChild(e,t,n,r){const i=n.children[r];i.render(e),i.children.forEach((n,r)=>{t.renderChild(e,t,i,r)})}measureText(e){var t=this.measureCache;return~t?t:(t=this.getText(),e=this.measureTargetText(e,t),this.measureCache=e)}measureTargetText(e,t){if(!t.length)return 0;const n=this.parent;var r=n.getStyle("font-family").getDefinition();if(r){var i=this.getFontSize(),o=r.isRTL?t.split("").reverse().join(""):t,a=f(n.getAttribute("dx").getString()),s=o.length;let e=0;for(let t=0;t<s;t++){e+=(this.getGlyph(r,o,t).horizAdvX||r.horizAdvX)*i/r.fontFace.unitsPerEm,void 0===a[t]||isNaN(a[t])||(e+=a[t])}return e}return e.measureText?(e.save(),this.setContext(e,!0),t=e.measureText(t).width,this.clearContext(e),e.restore(),t):10*t.length}getInheritedAttribute(e){let t=this;for(;t instanceof ce&&t.isFirstChild()&&t.parent;){const n=t.parent.getAttribute(e);if(n.hasValue(!0))return n.getString("0");t=t.parent}return null}constructor(e,t,n){super(e,t,new.target===ce||n),this.type="text",this.x=0,this.y=0,this.leafTexts=[],this.textChunkStart=0,this.minX=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY,this.measureCache=-1}}class le extends ce{getText(){return this.text}constructor(e,t,n){super(e,t,new.target===le||n),this.type="tspan",this.text=0<this.children.length?"":this.getTextFromNode()}}class he extends le{constructor(...e){super(...e),this.type="textNode"}}class fe extends a.a{reset(){this.i=-1,this.command=null,this.previousCommand=null,this.start=new z(0,0),this.control=new z(0,0),this.current=new z(0,0),this.points=[],this.angles=[]}isEnd(){var{i:e,commands:t}=this;return e>=t.length-1}next(){var e=this.commands[++this.i];return this.previousCommand=this.command,this.command=e}getPoint(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"x",t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"y";e=new z(this.command[e],this.command[t]);return this.makeAbsolute(e)}getAsControlPoint(e,t){return e=this.getPoint(e,t),this.control=e}getAsCurrentPoint(e,t){return e=this.getPoint(e,t),this.current=e}getReflectedControlPoint(){var e,t,n,r=this.previousCommand.type;return r!==a.a.CURVE_TO&&r!==a.a.SMOOTH_CURVE_TO&&r!==a.a.QUAD_TO&&r!==a.a.SMOOTH_QUAD_TO?this.current:(({current:{x:r,y:e},control:{x:t,y:n}}=this),new z(2*r-t,2*e-n))}makeAbsolute(e){var t,n;return this.command.relative&&(({x:t,y:n}=this.current),e.x+=t,e.y+=n),e}addMarker(e,t,n){const{points:r,angles:i}=this;n&&0<i.length&&!i[i.length-1]&&(i[i.length-1]=r[r.length-1].angleTo(n)),this.addMarkerAngle(e,t?t.angleTo(e):null)}addMarkerAngle(e,t){this.points.push(e),this.angles.push(t)}getMarkerPoints(){return this.points}getMarkerAngles(){const e=this.angles;var t=e.length;for(let n=0;n<t;n++)if(!e[n])for(let r=n+1;r<t;r++)if(e[r]){e[n]=e[r];break}return e}constructor(e){super(e.replace(/([+\-.])\s+/gm,"$1").replace(/[^MmZzLlHhVvCcSsQqTtAae\d\s.,+-].*/g,"")),this.control=new z(0,0),this.start=new z(0,0),this.current=new z(0,0),this.command=null,this.commands=this.commands,this.i=-1,this.previousCommand=null,this.points=[],this.angles=[]}}class de extends ue{path(e){const t=this.pathParser;var n=new se;for(t.reset(),e&&e.beginPath();!t.isEnd();)switch(t.next().type){case fe.MOVE_TO:this.pathM(e,n);break;case fe.LINE_TO:this.pathL(e,n);break;case fe.HORIZ_LINE_TO:this.pathH(e,n);break;case fe.VERT_LINE_TO:this.pathV(e,n);break;case fe.CURVE_TO:this.pathC(e,n);break;case fe.SMOOTH_CURVE_TO:this.pathS(e,n);break;case fe.QUAD_TO:this.pathQ(e,n);break;case fe.SMOOTH_QUAD_TO:this.pathT(e,n);break;case fe.ARC:this.pathA(e,n);break;case fe.CLOSE_PATH:this.pathZ(e,n)}return n}getBoundingBox(e){return this.path()}getMarkers(){const e=this.pathParser,t=e.getMarkerPoints(),n=e.getMarkerAngles();return t.map((e,t)=>[e,n[t]])}renderChildren(e){this.path(e),this.document.screen.mouse.checkPath(this,e);const t=this.getStyle("fill-rule");""!==e.fillStyle&&("inherit"!==t.getString("inherit")?e.fill(t.getString()):e.fill()),""!==e.strokeStyle&&("non-scaling-stroke"===this.getAttribute("vector-effect").getString()?(e.save(),e.setTransform(1,0,0,1,0,0),e.stroke(),e.restore()):e.stroke());var n=this.getMarkers();if(n){var r=n.length-1;const t=this.getStyle("marker-start"),u=this.getStyle("marker-mid"),c=this.getStyle("marker-end");if(t.isUrlDefinition()){const r=t.getDefinition();var[i,o]=n[0];r.render(e,i,o)}if(u.isUrlDefinition()){const t=u.getDefinition();for(let i=1;i<r;i++){var[a,s]=n[i];t.render(e,a,s)}}if(c.isUrlDefinition()){const t=c.getDefinition();var[i,o]=n[r];t.render(e,i,o)}}}static pathM(e){var t=e.getAsCurrentPoint();return e.start=e.current,{point:t}}pathM(e,t){const n=this.pathParser;var r=de.pathM(n).point,{x:i,y:o}=r;n.addMarker(r),t.addPoint(i,o),e&&e.moveTo(i,o)}static pathL(e){return{current:e.current,point:e.getAsCurrentPoint()}}pathL(e,t){const n=this.pathParser;var{current:r,point:i}=de.pathL(n),{x:o,y:a}=i;n.addMarker(i,r),t.addPoint(o,a),e&&e.lineTo(o,a)}static pathH(e){var{current:t,command:n}=e,n=new z((n.relative?t.x:0)+n.x,t.y);return{current:t,point:e.current=n}}pathH(e,t){const n=this.pathParser;var{current:r,point:i}=de.pathH(n),{x:o,y:a}=i;n.addMarker(i,r),t.addPoint(o,a),e&&e.lineTo(o,a)}static pathV(e){var{current:t,command:n}=e,n=new z(t.x,(n.relative?t.y:0)+n.y);return{current:t,point:e.current=n}}pathV(e,t){const n=this.pathParser;var{current:r,point:i}=de.pathV(n),{x:o,y:a}=i;n.addMarker(i,r),t.addPoint(o,a),e&&e.lineTo(o,a)}static pathC(e){return{current:e.current,point:e.getPoint("x1","y1"),controlPoint:e.getAsControlPoint("x2","y2"),currentPoint:e.getAsCurrentPoint()}}pathC(e,t){const n=this.pathParser;var{current:r,point:i,controlPoint:o,currentPoint:a}=de.pathC(n);n.addMarker(a,o,i),t.addBezierCurve(r.x,r.y,i.x,i.y,o.x,o.y,a.x,a.y),e&&e.bezierCurveTo(i.x,i.y,o.x,o.y,a.x,a.y)}static pathS(e){return{current:e.current,point:e.getReflectedControlPoint(),controlPoint:e.getAsControlPoint("x2","y2"),currentPoint:e.getAsCurrentPoint()}}pathS(e,t){const n=this.pathParser;var{current:r,point:i,controlPoint:o,currentPoint:a}=de.pathS(n);n.addMarker(a,o,i),t.addBezierCurve(r.x,r.y,i.x,i.y,o.x,o.y,a.x,a.y),e&&e.bezierCurveTo(i.x,i.y,o.x,o.y,a.x,a.y)}static pathQ(e){return{current:e.current,controlPoint:e.getAsControlPoint("x1","y1"),currentPoint:e.getAsCurrentPoint()}}pathQ(e,t){const n=this.pathParser;var{current:r,controlPoint:i,currentPoint:o}=de.pathQ(n);n.addMarker(o,i,i),t.addQuadraticCurve(r.x,r.y,i.x,i.y,o.x,o.y),e&&e.quadraticCurveTo(i.x,i.y,o.x,o.y)}static pathT(e){var t=e.current,n=e.getReflectedControlPoint();return{current:t,controlPoint:n,currentPoint:e=(e.control=n,e.getAsCurrentPoint())}}pathT(e,t){const n=this.pathParser;var{current:r,controlPoint:i,currentPoint:o}=de.pathT(n);n.addMarker(o,i,i),t.addQuadraticCurve(r.x,r.y,i.x,i.y,o.x,o.y),e&&e.quadraticCurveTo(i.x,i.y,o.x,o.y)}static pathA(e){var{current:t,command:n}=e;let{rX:r,rY:i,xRot:o,lArcFlag:a,sweepFlag:s}=n;var n=o*(Math.PI/180),u=(e=e.getAsCurrentPoint(),new z(Math.cos(n)*(t.x-e.x)/2+Math.sin(n)*(t.y-e.y)/2,-Math.sin(n)*(t.x-e.x)/2+Math.cos(n)*(t.y-e.y)/2));1<(l=Math.pow(u.x,2)/Math.pow(r,2)+Math.pow(u.y,2)/Math.pow(i,2))&&(r*=Math.sqrt(l),i*=Math.sqrt(l));let c=(a===s?-1:1)*Math.sqrt((Math.pow(r,2)*Math.pow(i,2)-Math.pow(r,2)*Math.pow(u.y,2)-Math.pow(i,2)*Math.pow(u.x,2))/(Math.pow(r,2)*Math.pow(u.y,2)+Math.pow(i,2)*Math.pow(u.x,2)));isNaN(c)&&(c=0);var l=new z(c*r*u.y/i,c*-i*u.x/r),t=new z((t.x+e.x)/2+Math.cos(n)*l.x-Math.sin(n)*l.y,(t.y+e.y)/2+Math.sin(n)*l.x+Math.cos(n)*l.y),h=D([1,0],[(u.x-l.x)/r,(u.y-l.y)/i]),f=[(u.x-l.x)/r,(u.y-l.y)/i];let d=D(f,u=[(-u.x-l.x)/r,(-u.y-l.y)/i]);return T(f,u)<=-1&&(d=Math.PI),1<=T(f,u)&&(d=0),{currentPoint:e,rX:r,rY:i,sweepFlag:s,xAxisRotation:n,centp:t,a1:h,ad:d}}pathA(e,t){const n=this.pathParser;var{currentPoint:r,rX:i,rY:o,sweepFlag:a,xAxisRotation:s,centp:u,a1:c,ad:l}=de.pathA(n),h=1-a?1:-1,f=c+l/2*h,d=new z(u.x+i*Math.cos(f),u.y+o*Math.sin(f));n.addMarkerAngle(d,f-h*Math.PI/2),n.addMarkerAngle(r,f-h*Math.PI),t.addPoint(r.x,r.y),!e||isNaN(c)||isNaN(l)||(d=o<i?i:o,f=o<i?1:i/o,h=o<i?o/i:1,e.translate(u.x,u.y),e.rotate(s),e.scale(f,h),e.arc(0,0,d,c,c+l,Boolean(1-a)),e.scale(1/f,1/h),e.rotate(-s),e.translate(-u.x,-u.y))}static pathZ(e){e.current=e.start}pathZ(e,t){de.pathZ(this.pathParser),e&&t.x1!==t.x2&&t.y1!==t.y2&&e.closePath()}constructor(e,t,n){super(e,t,n),this.type="path",this.pathParser=new fe(this.getAttribute("d").getString())}}class pe extends ue{setContext(e){var t;const n=this.document,{screen:r,window:i}=n;var o=e.canvas;if(r.setDefaults(e),"style"in o&&void 0!==e.font&&i&&void 0!==i.getComputedStyle){e.font=i.getComputedStyle(o).getPropertyValue("font");const t=new P(n,"fontSize",ae.parse(e.font).fontSize);t.hasValue()&&(n.rootEmSize=t.getPixels("y"),n.emSize=n.rootEmSize)}this.getAttribute("x").hasValue()||this.getAttribute("x",!0).setValue(0),this.getAttribute("y").hasValue()||this.getAttribute("y",!0).setValue(0);let{width:a,height:s}=r.viewPort;this.getStyle("width").hasValue()||this.getStyle("width",!0).setValue("100%"),this.getStyle("height").hasValue()||this.getStyle("height",!0).setValue("100%"),this.getStyle("color").hasValue()||this.getStyle("color",!0).setValue("black");const u=this.getAttribute("refX"),c=this.getAttribute("refY"),l=this.getAttribute("viewBox");o=l.hasValue()?f(l.getString()):null;var h=!this.root&&"visible"!==this.getStyle("overflow").getValue("hidden");let d=0,p=0,m=0,g=0;o&&(d=o[0],p=o[1]),this.root||(a=this.getStyle("width").getPixels("x"),s=this.getStyle("height").getPixels("y"),"marker"===this.type&&(m=d,g=p,d=0,p=0)),r.viewPort.setCurrent(a,s),!this.node||this.parent&&"foreignObject"!==(null==(t=this.node.parentNode)?void 0:t.nodeName)||!this.getStyle("transform",!1,!0).hasValue()||this.getStyle("transform-origin",!1,!0).hasValue()||this.getStyle("transform-origin",!0,!0).setValue("50% 50%"),super.setContext(e),e.translate(this.getAttribute("x").getPixels("x"),this.getAttribute("y").getPixels("y")),o&&(a=o[2],s=o[3]),n.setViewBox({ctx:e,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:r.viewPort.width,desiredWidth:a,height:r.viewPort.height,desiredHeight:s,minX:d,minY:p,refX:u.getValue(),refY:c.getValue(),clip:h,clipX:m,clipY:g}),o&&(r.viewPort.removeCurrent(),r.viewPort.setCurrent(a,s))}clearContext(e){super.clearContext(e),this.document.screen.viewPort.removeCurrent()}resize(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:e,n=2<arguments.length&&void 0!==arguments[2]&&arguments[2];const r=this.getAttribute("width",!0),i=this.getAttribute("height",!0),o=this.getAttribute("viewBox"),a=this.getAttribute("style");var s=r.getNumber(0),u=i.getNumber(0);if(n)if("string"==typeof n)this.getAttribute("preserveAspectRatio",!0).setValue(n);else{const e=this.getAttribute("preserveAspectRatio");e.hasValue()&&e.setValue(e.getString().replace(/^\s*(\S.*\S)\s*$/,"$1"))}if(r.setValue(e),i.setValue(t),o.hasValue()||o.setValue("0 0 ".concat(s||e," ").concat(u||t)),a.hasValue()){const n=this.getStyle("width"),r=this.getStyle("height");n.hasValue()&&n.setValue("".concat(e,"px")),r.hasValue()&&r.setValue("".concat(t,"px"))}}constructor(...e){super(...e),this.type="svg",this.root=!1}}class me extends de{path(e){var t,n=this.getAttribute("x").getPixels("x"),r=this.getAttribute("y").getPixels("y"),i=this.getStyle("width",!1,!0).getPixels("x"),o=this.getStyle("height",!1,!0).getPixels("y");const a=this.getAttribute("rx"),s=this.getAttribute("ry");let u=a.getPixels("x"),c=s.getPixels("y");return a.hasValue()&&!s.hasValue()&&(c=u),s.hasValue()&&!a.hasValue()&&(u=c),u=Math.min(u,i/2),c=Math.min(c,o/2),e&&(t=(Math.sqrt(2)-1)/3*4,e.beginPath(),0<o&&0<i&&(e.moveTo(n+u,r),e.lineTo(n+i-u,r),e.bezierCurveTo(n+i-u+t*u,r,n+i,r+c-t*c,n+i,r+c),e.lineTo(n+i,r+o-c),e.bezierCurveTo(n+i,r+o-c+t*c,n+i-u+t*u,r+o,n+i-u,r+o),e.lineTo(n+u,r+o),e.bezierCurveTo(n+u-t*u,r+o,n,r+o-c+t*c,n,r+o-c),e.lineTo(n,r+c),e.bezierCurveTo(n,r+c-t*c,n+u-t*u,r,n+u,r),e.closePath())),new se(n,r,n+i,r+o)}getMarkers(){return null}constructor(...e){super(...e),this.type="rect"}}class ge extends de{path(e){var t=this.getAttribute("cx").getPixels("x"),n=this.getAttribute("cy").getPixels("y"),r=this.getAttribute("r").getPixels();return e&&0<r&&(e.beginPath(),e.arc(t,n,r,0,2*Math.PI,!1),e.closePath()),new se(t-r,n-r,t+r,n+r)}getMarkers(){return null}constructor(...e){super(...e),this.type="circle"}}class Ae extends de{path(e){var t=(Math.sqrt(2)-1)/3*4,n=this.getAttribute("rx").getPixels("x"),r=this.getAttribute("ry").getPixels("y"),i=this.getAttribute("cx").getPixels("x"),o=this.getAttribute("cy").getPixels("y");return e&&0<n&&0<r&&(e.beginPath(),e.moveTo(i+n,o),e.bezierCurveTo(i+n,o+t*r,i+t*n,o+r,i,o+r),e.bezierCurveTo(i-t*n,o+r,i-n,o+t*r,i-n,o),e.bezierCurveTo(i-n,o-t*r,i-t*n,o-r,i,o-r),e.bezierCurveTo(i+t*n,o-r,i+n,o-t*r,i+n,o),e.closePath()),new se(i-n,o-r,i+n,o+r)}getMarkers(){return null}constructor(...e){super(...e),this.type="ellipse"}}class ve extends de{getPoints(){return[new z(this.getAttribute("x1").getPixels("x"),this.getAttribute("y1").getPixels("y")),new z(this.getAttribute("x2").getPixels("x"),this.getAttribute("y2").getPixels("y"))]}path(e){var[{x:t,y:n},{x:r,y:i}]=this.getPoints();return e&&(e.beginPath(),e.moveTo(t,n),e.lineTo(r,i)),new se(t,n,r,i)}getMarkers(){const[e,t]=this.getPoints();var n=e.angleTo(t);return[[e,n],[t,n]]}constructor(...e){super(...e),this.type="line"}}class be extends de{path(e){const t=this.points;var[{x:n,y:r}]=t;const i=new se(n,r);return e&&(e.beginPath(),e.moveTo(n,r)),t.forEach(t=>{var{x:t,y:n}=t;i.addPoint(t,n),e&&e.lineTo(t,n)}),i}getMarkers(){const e=this.points,t=e.length-1,n=[];return e.forEach((r,i)=>{i!==t&&n.push([r,r.angleTo(e[i+1])])}),0<n.length&&n.push([e[e.length-1],n[n.length-1][1]]),n}constructor(e,t,n){super(e,t,n),this.type="polyline",this.points=[],this.points=z.parsePath(this.getAttribute("points").getString())}}class ye extends be{path(e){var t=super.path(e),[{x:n,y:r}]=this.points;return e&&(e.lineTo(n,r),e.closePath()),t}constructor(...e){super(...e),this.type="polygon"}}class we extends re{createPattern(e,t,n){var r=this.getStyle("width").getPixels("x",!0),i=this.getStyle("height").getPixels("y",!0);const o=new pe(this.document,null),a=(o.attributes.viewBox=new P(this.document,"viewBox",this.getAttribute("viewBox").getValue()),o.attributes.width=new P(this.document,"width","".concat(r,"px")),o.attributes.height=new P(this.document,"height","".concat(i,"px")),o.attributes.transform=new P(this.document,"transform",this.getAttribute("patternTransform").getValue()),o.children=this.children,this.document.createCanvas(r,i)),s=a.getContext("2d"),u=this.getAttribute("x"),c=this.getAttribute("y");u.hasValue()&&c.hasValue()&&s.translate(u.getPixels("x",!0),c.getPixels("y",!0)),n.hasValue()?this.styles["fill-opacity"]=n:Reflect.deleteProperty(this.styles,"fill-opacity");for(let e=-1;e<=1;e++)for(let t=-1;t<=1;t++)s.save(),o.attributes.x=new P(this.document,"x",e*a.width),o.attributes.y=new P(this.document,"y",t*a.height),o.render(s),s.restore();return e.createPattern(a,"repeat")}constructor(...e){super(...e),this.type="pattern"}}class xe extends re{render(e,t,n){if(t){var{x:t,y:r}=t,i=this.getAttribute("orient").getString("auto"),o=this.getAttribute("markerUnits").getString("strokeWidth");e.translate(t,r),"auto"===i&&e.rotate(n),"strokeWidth"===o&&e.scale(e.lineWidth,e.lineWidth),e.save();const a=new pe(this.document);a.type=this.type,a.attributes.viewBox=new P(this.document,"viewBox",this.getAttribute("viewBox").getValue()),a.attributes.refX=new P(this.document,"refX",this.getAttribute("refX").getValue()),a.attributes.refY=new P(this.document,"refY",this.getAttribute("refY").getValue()),a.attributes.width=new P(this.document,"width",this.getAttribute("markerWidth").getValue()),a.attributes.height=new P(this.document,"height",this.getAttribute("markerHeight").getValue()),a.attributes.overflow=new P(this.document,"overflow",this.getAttribute("overflow").getValue()),a.attributes.fill=new P(this.document,"fill",this.getAttribute("fill").getColor("black")),a.attributes.stroke=new P(this.document,"stroke",this.getAttribute("stroke").getValue("none")),a.children=this.children,a.render(e),e.restore(),"strokeWidth"===o&&e.scale(1/e.lineWidth,1/e.lineWidth),"auto"===i&&e.rotate(-n),e.translate(-t,-r)}}constructor(...e){super(...e),this.type="marker"}}class Ce extends re{render(){}constructor(...e){super(...e),this.type="defs"}}class ke extends ue{getBoundingBox(e){const t=new se;return this.children.forEach(n=>{t.addBoundingBox(n.getBoundingBox(e))}),t}constructor(...e){super(...e),this.type="g"}}class Ee extends re{getGradientUnits(){return this.getAttribute("gradientUnits").getString("objectBoundingBox")}createGradient(e,t,n){let r=this;this.getHrefAttribute().hasValue()&&(r=this.getHrefAttribute().getDefinition(),this.inheritStopContainer(r));const i=r.stops,o=this.getGradient(e,t);if(!o)return this.addParentOpacity(n,i[i.length-1].color);if(i.forEach(e=>{o.addColorStop(e.offset,this.addParentOpacity(n,e.color))}),this.getAttribute("gradientTransform").hasValue()){const n=this.document;e=V.MAX_VIRTUAL_PIXELS;t=n.screen.viewPort.getRoot();const r=new me(n),i=(r.attributes.x=new P(n,"x",-e/3),r.attributes.y=new P(n,"y",-e/3),r.attributes.width=new P(n,"width",e),r.attributes.height=new P(n,"height",e),new ke(n)),a=(i.attributes.transform=new P(n,"transform",this.getAttribute("gradientTransform").getValue()),i.children=[r],new pe(n)),s=(a.attributes.x=new P(n,"x",0),a.attributes.y=new P(n,"y",0),a.attributes.width=new P(n,"width",t.width),a.attributes.height=new P(n,"height",t.height),a.children=[i],n.createCanvas(t.width,t.height)),u=s.getContext("2d");return u.fillStyle=o,a.render(u),u.createPattern(s,"no-repeat")}return o}inheritStopContainer(e){this.attributesToInherit.forEach(t=>{!this.getAttribute(t).hasValue()&&e.getAttribute(t).hasValue()&&this.getAttribute(t,!0).setValue(e.getAttribute(t).getValue())})}addParentOpacity(e,t){if(e.hasValue()){return new P(this.document,"color",t).addOpacity(e).getColor()}return t}constructor(e,t,n){super(e,t,n),this.attributesToInherit=["gradientUnits"],this.stops=[];const{stops:r,children:i}=this;i.forEach(e=>{"stop"===e.type&&r.push(e)})}}class Se extends Ee{getGradient(e,t){t=(o="objectBoundingBox"===this.getGradientUnits())?t.getBoundingBox(e):null;if(o&&!t)return null;this.getAttribute("x1").hasValue()||this.getAttribute("y1").hasValue()||this.getAttribute("x2").hasValue()||this.getAttribute("y2").hasValue()||(this.getAttribute("x1",!0).setValue(0),this.getAttribute("y1",!0).setValue(0),this.getAttribute("x2",!0).setValue(1),this.getAttribute("y2",!0).setValue(0));var n=o?t.x+t.width*this.getAttribute("x1").getNumber():this.getAttribute("x1").getPixels("x"),r=o?t.y+t.height*this.getAttribute("y1").getNumber():this.getAttribute("y1").getPixels("y"),i=o?t.x+t.width*this.getAttribute("x2").getNumber():this.getAttribute("x2").getPixels("x"),o=o?t.y+t.height*this.getAttribute("y2").getNumber():this.getAttribute("y2").getPixels("y");return n===i&&r===o?null:e.createLinearGradient(n,r,i,o)}constructor(e,t,n){super(e,t,n),this.type="linearGradient",this.attributesToInherit.push("x1","y1","x2","y2")}}class _e extends Ee{getGradient(e,t){var n="objectBoundingBox"===this.getGradientUnits();t=t.getBoundingBox(e);if(n&&!t)return null;this.getAttribute("cx").hasValue()||this.getAttribute("cx",!0).setValue("50%"),this.getAttribute("cy").hasValue()||this.getAttribute("cy",!0).setValue("50%"),this.getAttribute("r").hasValue()||this.getAttribute("r",!0).setValue("50%");var r=n?t.x+t.width*this.getAttribute("cx").getNumber():this.getAttribute("cx").getPixels("x"),i=n?t.y+t.height*this.getAttribute("cy").getNumber():this.getAttribute("cy").getPixels("y");let o=r,a=i;return this.getAttribute("fx").hasValue()&&(o=n?t.x+t.width*this.getAttribute("fx").getNumber():this.getAttribute("fx").getPixels("x")),this.getAttribute("fy").hasValue()&&(a=n?t.y+t.height*this.getAttribute("fy").getNumber():this.getAttribute("fy").getPixels("y")),n=n?(t.width+t.height)/2*this.getAttribute("r").getNumber():this.getAttribute("r").getPixels(),t=this.getAttribute("fr").getPixels(),e.createRadialGradient(o,a,t,r,i,n)}constructor(e,t,n){super(e,t,n),this.type="radialGradient",this.attributesToInherit.push("cx","cy","r","fx","fy","fr")}}class Oe extends re{constructor(e,t,n){super(e,t,n),this.type="stop",e=Math.max(0,Math.min(1,this.getAttribute("offset").getNumber()));const r=this.getStyle("stop-opacity");let i=this.getStyle("stop-color",!0);""===i.getString()&&i.setValue("#000"),r.hasValue()&&(i=i.addOpacity(r)),this.offset=e,this.color=i.getColor()}}class Te extends re{getProperty(){var e=this.getAttribute("attributeType").getString(),t=this.getAttribute("attributeName").getString();return"CSS"===e?this.parent.getStyle(t,!0):this.parent.getAttribute(t,!0)}calcValue(){var e=this.initialUnits;const{progress:t,from:n,to:r}=this.getProgress();let i=n.getNumber()+(r.getNumber()-n.getNumber())*t;return"%"===e&&(i*=100),"".concat(i).concat(e)}update(e){const t=this.parent,n=this.getProperty();if(this.initialValue||(this.initialValue=n.getString(),this.initialUnits=n.getUnits()),this.duration>this.maxDuration){var r=this.getAttribute("fill").getString("remove");if("indefinite"===this.getAttribute("repeatCount").getString()||"indefinite"===this.getAttribute("repeatDur").getString())this.duration=0;else if("freeze"!==r||this.frozen){if("remove"===r&&!this.removed)return this.removed=!0,t&&n&&n.setValue(t.animationFrozen?t.animationFrozenValue:this.initialValue),!0}else this.frozen=!0,t&&n&&(t.animationFrozen=!0,t.animationFrozenValue=n.getString());return!1}this.duration+=e;let i=!1;if(this.begin<this.duration){let e=this.calcValue();const t=this.getAttribute("type");t.hasValue()&&(r=t.getString(),e="".concat(r,"(").concat(e,")")),n.setValue(e),i=!0}return i}getProgress(){const{document:e,values:t}=this;let n,r,i=(this.duration-this.begin)/(this.maxDuration-this.begin);if(t.hasValue()){var o=i*(t.getValue().length-1),a=Math.floor(o),s=Math.ceil(o);let u;u=t.getValue()[a],n=new P(e,"from",u?parseFloat(u):0),u=t.getValue()[s],r=new P(e,"to",u?parseFloat(u):0),i=(o-a)/(s-a)}else n=this.from,r=this.to;return{progress:i,from:n,to:r}}constructor(e,t,n){super(e,t,n),this.type="animate",this.duration=0,this.initialUnits="",this.removed=!1,this.frozen=!1,e.screen.animations.push(this),this.begin=this.getAttribute("begin").getMilliseconds(),this.maxDuration=this.begin+this.getAttribute("dur").getMilliseconds(),this.from=this.getAttribute("from"),this.to=this.getAttribute("to"),this.values=new P(e,"values",null);const r=this.getAttribute("values");r.hasValue()&&this.values.setValue(r.getString().split(";"))}}class De extends Te{calcValue(){const{progress:e,from:t,to:n}=this.getProgress();var r,i,a=new o.a(t.getColor()),s=new o.a(n.getColor());return a.ok&&s.ok?(r=a.r+(s.r-a.r)*e,i=a.g+(s.g-a.g)*e,s=a.b+(s.b-a.b)*e,"rgb(".concat(Math.floor(r),", ").concat(Math.floor(i),", ").concat(Math.floor(s),")")):this.getAttribute("from").getColor()}constructor(...e){super(...e),this.type="animateColor"}}class Be extends Te{calcValue(){const{progress:e,from:t,to:n}=this.getProgress(),r=f(t.getString()),i=f(n.getString());return r.map((t,n)=>t+(i[n]-t)*e).join(" ")}constructor(...e){super(...e),this.type="animateTransform"}}class Ie extends re{constructor(e,t,n){super(e,t,n),this.type="font-face",this.ascent=this.getAttribute("ascent").getNumber(),this.descent=this.getAttribute("descent").getNumber(),this.unitsPerEm=this.getAttribute("units-per-em").getNumber()}}class Me extends de{constructor(e,t,n){super(e,t,n),this.type="glyph",this.horizAdvX=this.getAttribute("horiz-adv-x").getNumber(),this.unicode=this.getAttribute("unicode").getString(),this.arabicForm=this.getAttribute("arabic-form").getString()}}class je extends Me{constructor(...e){super(...e),this.type="missing-glyph",this.horizAdvX=0}}class Ne extends re{render(){}constructor(e,t,n){super(e,t,n),this.type="font",this.isArabic=!1,this.glyphs={},this.arabicGlyphs={},this.isRTL=!1,this.horizAdvX=this.getAttribute("horiz-adv-x").getNumber();const r=e.definitions;t=this.children;for(const e of t)if(e instanceof Ie){const t=(this.fontFace=e).getStyle("font-family");t.hasValue()&&(r[t.getString()]=this)}else if(e instanceof je)this.missingGlyph=e;else if(e instanceof Me)if(e.arabicForm){this.isRTL=!0,this.isArabic=!0;const t=this.arabicGlyphs[e.unicode];void 0===t?this.arabicGlyphs[e.unicode]={[e.arabicForm]:e}:t[e.arabicForm]=e}else this.glyphs[e.unicode]=e}}class Fe extends ce{getText(){var e=this.getHrefAttribute().getDefinition();if(e){const t=e.children[0];if(t)return t.getText()}return""}constructor(...e){super(...e),this.type="tref"}}class Re extends ce{getText(){return this.text}renderChildren(e){if(this.hasText){super.renderChildren(e);var{document:t,x:n,y:r}=this;const i=t.screen.mouse,o=new P(t,"fontSize",ae.parse(t.ctx.font).fontSize);i.isWorking()&&i.checkBoundingBox(this,new se(n,r-o.getPixels("y"),n+this.measureText(e),r))}else if(0<this.children.length){const t=new ke(this.document);t.children=this.children,t.parent=this,t.render(e)}}onClick(){const e=this.document.window;e&&e.open(this.getHrefAttribute().getString())}onMouseMove(){this.document.ctx.canvas.style.cursor="pointer"}constructor(e,t,n){super(e,t,n),this.type="a",n=(e=t.childNodes)[0],t=0<e.length&&Array.from(e).every(e=>3===e.nodeType),this.hasText=t,this.text=t?this.getTextFromNode(n):""}}class Pe extends ce{getText(){return this.text}path(e){const t=this.dataArray;e&&e.beginPath(),t.forEach(t=>{var{type:t,points:n}=t;switch(t){case fe.LINE_TO:e&&e.lineTo(n[0],n[1]);break;case fe.MOVE_TO:e&&e.moveTo(n[0],n[1]);break;case fe.CURVE_TO:e&&e.bezierCurveTo(n[0],n[1],n[2],n[3],n[4],n[5]);break;case fe.QUAD_TO:e&&e.quadraticCurveTo(n[0],n[1],n[2],n[3]);break;case fe.ARC:var[r,i,o,a,s,u,c,l]=n,h=a<o?o:a,f=a<o?1:o/a,a=a<o?a/o:1;e&&(e.translate(r,i),e.rotate(c),e.scale(f,a),e.arc(0,0,h,s,s+u,Boolean(1-l)),e.scale(1/f,1/a),e.rotate(-c),e.translate(-r,-i));break;case fe.CLOSE_PATH:e&&e.closePath()}})}renderChildren(e){this.setTextData(e),e.save();const t=this.parent.getStyle("text-decoration").getString(),n=this.getFontSize(),r=this.glyphInfo;var i=e.fillStyle;"underline"===t&&e.beginPath(),r.forEach((r,i)=>{var{p0:r,p1:o,rotation:a,text:s}=r;e.save(),e.translate(r.x,r.y),e.rotate(a),e.fillStyle&&e.fillText(s,0,0),e.strokeStyle&&e.strokeText(s,0,0),e.restore(),"underline"===t&&(0===i&&e.moveTo(r.x,r.y+n/8),e.lineTo(o.x,o.y+n/5))}),"underline"===t&&(e.lineWidth=n/20,e.strokeStyle=i,e.stroke(),e.closePath()),e.restore()}getLetterSpacingAt(){return this.letterSpacingCache[0<arguments.length&&void 0!==arguments[0]?arguments[0]:0]||0}findSegmentToFitChar(e,t,n,r,i,o,a,s,u){let c=o,l=this.measureText(e,s);" "===s&&"justify"===t&&n<r&&(l+=(r-n)/i),-1<u&&(c+=this.getLetterSpacingAt(u)),o=this.textHeight/20;const h={p0:e=this.getEquidistantPointOnPath(c,o,0),p1:s=this.getEquidistantPointOnPath(c+l,o,0)};return t=e&&s?Math.atan2(s.y-e.y,s.x-e.x):0,a&&(r=Math.cos(Math.PI/2+t)*a,n=Math.cos(-t)*a,h.p0={...e,x:e.x+r,y:e.y+n},h.p1={...s,x:s.x+r,y:s.y+n}),{offset:c+=l,segment:h,rotation:t}}measureText(e,t){const n=this.measuresCache;return t=t||this.getText(),n.has(t)?n.get(t):(e=this.measureTargetText(e,t),n.set(t,e),e)}setTextData(e){if(!this.glyphInfo){const o=this.getText(),a=o.split(""),s=o.split(" ").length-1;var t=this.parent.getAttribute("dx").split().map(e=>e.getPixels("x"));const u=this.parent.getAttribute("dy").getPixels("y"),c=this.parent.getStyle("text-anchor").getString("start"),l=this.getStyle("letter-spacing"),h=this.parent.getStyle("letter-spacing");let f=0;l.hasValue()&&"inherit"!==l.getValue()?l.hasValue()&&"initial"!==l.getValue()&&"unset"!==l.getValue()&&(f=l.getPixels()):f=h.getPixels();const d=[];var n=o.length;this.letterSpacingCache=d;for(let e=0;e<n;e++)d.push(void 0!==t[e]?t[e]:f);var r=d.reduce((e,t,n)=>0!==n&&e+t||0,0),i=this.measureText(e);const p=Math.max(i+r,0),m=(this.textWidth=i,this.textHeight=this.getFontSize(),this.glyphInfo=[],this.getPathLength());r=this.getStyle("startOffset").getNumber(0)*m;let g=0;"middle"!==c&&"center"!==c||(g=-p/2),"end"!==c&&"right"!==c||(g=-p),g+=r,a.forEach((t,n)=>{var{offset:t,segment:r,rotation:i}=this.findSegmentToFitChar(e,c,p,m,s,g,u,t,n);g=t,r.p0&&r.p1&&this.glyphInfo.push({text:a[n],p0:r.p0,p1:r.p1,rotation:i})})}}parsePathData(e){if(this.pathLength=-1,!e)return[];const t=[],n=e.pathParser;for(n.reset();!n.isEnd();){var r=(i=n.current)?i.x:0,i=i?i.y:0,o=n.next();let e=o.type,a=[];switch(o.type){case fe.MOVE_TO:this.pathM(n,a);break;case fe.LINE_TO:e=this.pathL(n,a);break;case fe.HORIZ_LINE_TO:e=this.pathH(n,a);break;case fe.VERT_LINE_TO:e=this.pathV(n,a);break;case fe.CURVE_TO:this.pathC(n,a);break;case fe.SMOOTH_CURVE_TO:e=this.pathS(n,a);break;case fe.QUAD_TO:this.pathQ(n,a);break;case fe.SMOOTH_QUAD_TO:e=this.pathT(n,a);break;case fe.ARC:a=this.pathA(n);break;case fe.CLOSE_PATH:de.pathZ(n)}o.type!==fe.CLOSE_PATH?t.push({type:e,points:a,start:{x:r,y:i},pathLength:this.calcLength(r,i,e,a)}):t.push({type:fe.CLOSE_PATH,points:[],pathLength:0})}return t}pathM(e,t){var{x:e,y:n}=de.pathM(e).point;t.push(e,n)}pathL(e,t){var{x:e,y:n}=de.pathL(e).point;return t.push(e,n),fe.LINE_TO}pathH(e,t){var{x:e,y:n}=de.pathH(e).point;return t.push(e,n),fe.LINE_TO}pathV(e,t){var{x:e,y:n}=de.pathV(e).point;return t.push(e,n),fe.LINE_TO}pathC(e,t){var{point:e,controlPoint:n,currentPoint:r}=de.pathC(e);t.push(e.x,e.y,n.x,n.y,r.x,r.y)}pathS(e,t){var{point:e,controlPoint:n,currentPoint:r}=de.pathS(e);return t.push(e.x,e.y,n.x,n.y,r.x,r.y),fe.CURVE_TO}pathQ(e,t){var{controlPoint:e,currentPoint:n}=de.pathQ(e);t.push(e.x,e.y,n.x,n.y)}pathT(e,t){var{controlPoint:e,currentPoint:n}=de.pathT(e);return t.push(e.x,e.y,n.x,n.y),fe.QUAD_TO}pathA(e){let{rX:t,rY:n,sweepFlag:r,xAxisRotation:i,centp:o,a1:a,ad:s}=de.pathA(e);return 0===r&&0<s&&(s-=2*Math.PI),1===r&&s<0&&(s+=2*Math.PI),[o.x,o.y,t,n,a,s,i,r]}calcLength(e,t,n,r){let i=0,o=null,a=null,s=0;switch(n){case fe.LINE_TO:return this.getLineLength(e,t,r[0],r[1]);case fe.CURVE_TO:for(i=0,o=this.getPointOnCubicBezier(0,e,t,r[0],r[1],r[2],r[3],r[4],r[5]),s=.01;s<=1;s+=.01)a=this.getPointOnCubicBezier(s,e,t,r[0],r[1],r[2],r[3],r[4],r[5]),i+=this.getLineLength(o.x,o.y,a.x,a.y),o=a;return i;case fe.QUAD_TO:for(i=0,o=this.getPointOnQuadraticBezier(0,e,t,r[0],r[1],r[2],r[3]),s=.01;s<=1;s+=.01)a=this.getPointOnQuadraticBezier(s,e,t,r[0],r[1],r[2],r[3]),i+=this.getLineLength(o.x,o.y,a.x,a.y),o=a;return i;case fe.ARC:{i=0;var u=r[4],c=r[5],l=r[4]+c;let e=Math.PI/180;if(Math.abs(u-l)<e&&(e=Math.abs(u-l)),o=this.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],u,0),c<0)for(s=u-e;s>l;s-=e)a=this.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],s,0),i+=this.getLineLength(o.x,o.y,a.x,a.y),o=a;else for(s=u+e;s<l;s+=e)a=this.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],s,0),i+=this.getLineLength(o.x,o.y,a.x,a.y),o=a;return a=this.getPointOnEllipticalArc(r[0],r[1],r[2],r[3],l,0),i+this.getLineLength(o.x,o.y,a.x,a.y)}}return 0}getPointOnLine(e,t,n,r,i){var o=5<arguments.length&&void 0!==arguments[5]?arguments[5]:t,a=6<arguments.length&&void 0!==arguments[6]?arguments[6]:n,s=(i-n)/(r-t+_);let u=Math.sqrt(e*e/(1+s*s)),c=(r<t&&(u*=-1),s*u),l=null;if(r===t)l={x:o,y:a+c};else if((a-n)/(o-t+_)==s)l={x:o+u,y:a+c};else{if((f=this.getLineLength(t,n,r,i))<_)return null;var h=(o-t)*(r-t)+(a-n)*(i-n),f=this.getLineLength(o,a,o=t+(h/=f*f)*(r-t),a=n+h*(i-n));h=Math.sqrt(e*e-f*f);u=Math.sqrt(h*h/(1+s*s)),r<t&&(u*=-1),c=s*u,l={x:o+u,y:a+c}}return l}getPointOnPath(e){var t=this.getPathLength();let n=0,r=null;if(!(e<-5e-5||t<e-5e-5)){t=this.dataArray;for(const u of t){if(!u||!(u.pathLength<5e-5||n+u.pathLength+5e-5<e)){var i=e-n;let t=0;switch(u.type){case fe.LINE_TO:r=this.getPointOnLine(i,u.start.x,u.start.y,u.points[0],u.points[1],u.start.x,u.start.y);break;case fe.ARC:var o=u.points[4],a=u.points[5],s=u.points[4]+a;t=o+i/u.pathLength*a,a<0&&t<s||0<=a&&t>s||(r=this.getPointOnEllipticalArc(u.points[0],u.points[1],u.points[2],u.points[3],t,u.points[6]));break;case fe.CURVE_TO:1<(t=i/u.pathLength)&&(t=1),r=this.getPointOnCubicBezier(t,u.start.x,u.start.y,u.points[0],u.points[1],u.points[2],u.points[3],u.points[4],u.points[5]);break;case fe.QUAD_TO:1<(t=i/u.pathLength)&&(t=1),r=this.getPointOnQuadraticBezier(t,u.start.x,u.start.y,u.points[0],u.points[1],u.points[2],u.points[3])}if(r)return r;break}n+=u.pathLength}}return null}getLineLength(e,t,n,r){return Math.sqrt((n-e)*(n-e)+(r-t)*(r-t))}getPathLength(){return-1===this.pathLength&&(this.pathLength=this.dataArray.reduce((e,t)=>0<t.pathLength?e+t.pathLength:e,0)),this.pathLength}getPointOnCubicBezier(e,t,n,r,i,o,a,s,u){return{x:s*B(e)+o*I(e)+r*M(e)+t*j(e),y:u*B(e)+a*I(e)+i*M(e)+n*j(e)}}getPointOnQuadraticBezier(e,t,n,r,i,o,a){return{x:o*N(e)+r*F(e)+t*R(e),y:a*N(e)+i*F(e)+n*R(e)}}getPointOnEllipticalArc(e,t,n,r,i,o){var a=Math.cos(o);o=Math.sin(o);const s=n*Math.cos(i),u=r*Math.sin(i);return{x:e+(s*a-u*o),y:t+(s*o+u*a)}}buildEquidistantCache(e,t){var n=this.getPathLength(),r=t||.25,i=e||n/100;if(!this.equidistantCache||this.equidistantCache.step!==i||this.equidistantCache.precision!==r){this.equidistantCache={step:i,precision:r,points:[]};let e=0;for(let t=0;t<=n;t+=r){var o=this.getPointOnPath(t),a=this.getPointOnPath(t+r);o&&a&&(e+=this.getLineLength(o.x,o.y,a.x,a.y))>=i&&(this.equidistantCache.points.push({x:o.x,y:o.y,distance:t}),e-=i)}}}getEquidistantPointOnPath(e,t,n){return this.buildEquidistantCache(t,n),!(e<0||5e-5<e-this.getPathLength())&&(t=Math.round(e/this.getPathLength()*(this.equidistantCache.points.length-1)),this.equidistantCache.points[t])||null}constructor(e,t,n){super(e,t,n),this.type="textPath",this.textWidth=0,this.textHeight=0,this.pathLength=-1,this.glyphInfo=null,this.letterSpacingCache=[],this.measuresCache=new Map([["",0]]),e=this.getHrefAttribute().getDefinition(),this.text=this.getTextFromNode(),this.dataArray=this.parsePathData(e)}}const Le=/^\s*data:(([^/,;]+\/[^/,;]+)(?:;([^,;=]+=[^,;=]+))?)?(?:;(base64))?,(.*)$/i;class Ue extends ue{async loadImage(e){try{var t=await this.document.createImage(e);this.image=t}catch(e){}this.loaded=!0}async loadSvg(e){var t=Le.exec(e);if(t){var n=t[5];n&&("base64"===t[4]?this.image=atob(n):this.image=decodeURIComponent(n))}else try{const t=await this.document.fetch(e);var r=await t.text();this.image=r}catch(e){}this.loaded=!0}renderChildren(e){const{document:t,image:n,loaded:r}=this;var i=this.getAttribute("x").getPixels("x"),o=this.getAttribute("y").getPixels("y"),a=this.getStyle("width").getPixels("x"),s=this.getStyle("height").getPixels("y");if(r&&n&&a&&s){if(e.save(),e.translate(i,o),"string"==typeof n){const r=t.canvg.forkString(e,n,{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0,ignoreClear:!0,offsetX:0,offsetY:0,scaleWidth:a,scaleHeight:s}),i=r.document.documentElement;i&&(i.parent=this),r.render()}else t.setViewBox({ctx:e,aspectRatio:this.getAttribute("preserveAspectRatio").getString(),width:a,desiredWidth:n.width,height:s,desiredHeight:n.height}),!this.loaded||"complete"in n&&!n.complete||e.drawImage(n,0,0);e.restore()}}getBoundingBox(){var e=this.getAttribute("x").getPixels("x"),t=this.getAttribute("y").getPixels("y"),n=this.getStyle("width").getPixels("x"),r=this.getStyle("height").getPixels("y");return new se(e,t,e+n,t+r)}constructor(e,t,n){super(e,t,n),this.type="image",this.loaded=!1;const r=this.getHrefAttribute().getString();r&&(t=r.endsWith(".svg")||/^\s*data:image\/svg\+xml/i.test(r),e.images.push(this),t?this.loadSvg(r):this.loadImage(r))}}class ze extends ue{render(e){}constructor(...e){super(...e),this.type="symbol"}}class He{async load(e,t){try{const r=this.document;var n=(await r.canvg.parser.load(t)).getElementsByTagName("font");Array.from(n).forEach(t=>{t=r.createElement(t),r.definitions[e]=t})}catch(t){}this.loaded=!0}constructor(e){this.document=e,this.loaded=!1,e.fonts.push(this)}}class $e extends re{constructor(e,t,n){super(e,t,n),this.type="style";c(Array.from(t.childNodes).map(e=>e.textContent).join("").replace(/(\/\*([^*]|[\r\n]|(\*+([^*/]|[\r\n])))*\*+\/)|(^[\s]*\/\/.*)/gm,"").replace(/@import.*;/g,"")).split("}").forEach(t=>{const n=t.trim();if(n){const t=n.split("{"),r=t[0].split(","),i=t[1].split(";");r.forEach(t=>{if(t=t.trim()){const n=e.styles[t]||{};if(i.forEach(t=>{var r=t.indexOf(":"),i=t.substr(0,r).trim();t=t.substr(r+1,t.length-r).trim();i&&t&&(n[i]=new P(e,i,t))}),e.styles[t]=n,e.stylesSpecificity[t]=S(t),"@font-face"===t){const t=n["font-family"].getString().replace(/"|'/g,"");n.src.getString().split(",").forEach(n=>{0<n.indexOf('format("svg")')&&(n=g(n))&&new He(e).load(t,n)})}}})}})}}$e.parseExternalUrl=g;class Qe extends ue{setContext(e){super.setContext(e);const t=this.getAttribute("x"),n=this.getAttribute("y");t.hasValue()&&e.translate(t.getPixels("x"),0),n.hasValue()&&e.translate(0,n.getPixels("y"))}path(e){const t=this.element;t&&t.path(e)}renderChildren(e){const{document:t,element:n}=this;if(n){let i=n;if("symbol"===n.type&&((i=new pe(t)).attributes.viewBox=new P(t,"viewBox",n.getAttribute("viewBox").getString()),i.attributes.preserveAspectRatio=new P(t,"preserveAspectRatio",n.getAttribute("preserveAspectRatio").getString()),i.attributes.overflow=new P(t,"overflow",n.getAttribute("overflow").getString()),i.children=n.children,n.styles.opacity=new P(t,"opacity",this.calculateOpacity())),"svg"===i.type){const e=this.getStyle("width",!1,!0),n=this.getStyle("height",!1,!0);e.hasValue()&&(i.attributes.width=new P(t,"width",e.getString())),n.hasValue()&&(i.attributes.height=new P(t,"height",n.getString()))}var r=i.parent;i.parent=this,i.render(e),i.parent=r}}getBoundingBox(e){const t=this.element;return t?t.getBoundingBox(e):null}elementTransform(){var{document:e,element:t}=this;return t?ne.fromElement(e,t):null}get element(){return this.cachedElement||(this.cachedElement=this.getHrefAttribute().getDefinition()),this.cachedElement}constructor(...e){super(...e),this.type="use"}}function Ve(e,t,n,r,i,o){return e[n*r*4+4*t+o]}function qe(e,t,n,r,i,o,a){e[n*r*4+4*t+o]=a}function Ge(e,t,n){return e[t]*n}function We(e,t,n,r){return t+Math.cos(e)*n+Math.sin(e)*r}class Ke extends re{apply(e,t,n,r,i){var{includeOpacity:o,matrix:a}=this,s=e.getImageData(0,0,r,i);for(let e=0;e<i;e++)for(let t=0;t<r;t++){var u=Ve(s.data,t,e,r,0,0),c=Ve(s.data,t,e,r,0,1),l=Ve(s.data,t,e,r,0,2),h=Ve(s.data,t,e,r,0,3);let n=Ge(a,0,u)+Ge(a,1,c)+Ge(a,2,l)+Ge(a,3,h)+Ge(a,4,1),i=Ge(a,5,u)+Ge(a,6,c)+Ge(a,7,l)+Ge(a,8,h)+Ge(a,9,1),f=Ge(a,10,u)+Ge(a,11,c)+Ge(a,12,l)+Ge(a,13,h)+Ge(a,14,1),d=Ge(a,15,u)+Ge(a,16,c)+Ge(a,17,l)+Ge(a,18,h)+Ge(a,19,1);o&&(n=0,i=0,f=0,d*=h/255),qe(s.data,t,e,r,0,0,n),qe(s.data,t,e,r,0,1,i),qe(s.data,t,e,r,0,2,f),qe(s.data,t,e,r,0,3,d)}e.clearRect(0,0,r,i),e.putImageData(s,0,0)}constructor(e,t,n){super(e,t,n),this.type="feColorMatrix";let r=f(this.getAttribute("values").getString());switch(this.getAttribute("type").getString("matrix")){case"saturate":var i=r[0];r=[.213+.787*i,.715-.715*i,.072-.072*i,0,0,.213-.213*i,.715+.285*i,.072-.072*i,0,0,.213-.213*i,.715-.715*i,.072+.928*i,0,0,0,0,0,1,0,0,0,0,0,1];break;case"hueRotate":r=[We(i=r[0]*Math.PI/180,.213,.787,-.213),We(i,.715,-.715,-.715),We(i,.072,-.072,.928),0,0,We(i,.213,-.213,.143),We(i,.715,.285,.14),We(i,.072,-.072,-.283),0,0,We(i,.213,-.213,-.787),We(i,.715,-.715,.715),We(i,.072,.928,.072),0,0,0,0,0,1,0,0,0,0,0,1];break;case"luminanceToAlpha":r=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.2125,.7154,.0721,0,0,0,0,0,0,1]}this.matrix=r,this.includeOpacity=this.getAttribute("includeOpacity").hasValue()}}class Ye extends re{apply(e,t){const n=this.document;let r=this.getAttribute("x").getPixels("x"),i=this.getAttribute("y").getPixels("y"),o=this.getStyle("width").getPixels("x"),a=this.getStyle("height").getPixels("y");if(!o&&!a){const t=new se;this.children.forEach(n=>{t.addBoundingBox(n.getBoundingBox(e))}),r=Math.floor(t.x1),i=Math.floor(t.y1),o=Math.floor(t.width),a=Math.floor(t.height)}var s=this.removeStyles(t,Ye.ignoreStyles);const u=n.createCanvas(r+o,i+a),c=u.getContext("2d"),l=(n.screen.setDefaults(c),this.renderChildren(c),new Ke(n,{nodeType:1,childNodes:[],attributes:[{nodeName:"type",value:"luminanceToAlpha"},{nodeName:"includeOpacity",value:"true"}]}).apply(c,0,0,r+o,i+a),n.createCanvas(r+o,i+a)),h=l.getContext("2d");n.screen.setDefaults(h),t.render(h),h.globalCompositeOperation="destination-in",h.fillStyle=c.createPattern(u,"no-repeat"),h.fillRect(0,0,r+o,i+a),e.fillStyle=h.createPattern(l,"no-repeat"),e.fillRect(0,0,r+o,i+a),this.restoreStyles(t,s)}render(e){}constructor(...e){super(...e),this.type="mask"}}Ye.ignoreStyles=["mask","transform","clip-path"];const Xe=()=>{};class Je extends re{apply(e){const t=this.document,n=Reflect.getPrototypeOf(e),{beginPath:r,closePath:i}=e;n&&(n.beginPath=Xe,n.closePath=Xe),Reflect.apply(r,e,[]),this.children.forEach(r=>{if("path"in r){let o="elementTransform"in r?r.elementTransform():null;(o=o||ne.fromElement(t,r))&&o.apply(e),r.path(e),n&&(n.closePath=i),o&&o.unapply(e)}}),Reflect.apply(i,e,[]),e.clip(),n&&(n.beginPath=r,n.closePath=i)}render(e){}constructor(...e){super(...e),this.type="clipPath"}}class Ze extends re{apply(e,t){const{document:n,children:r}=this;var i="getBoundingBox"in t?t.getBoundingBox(e):null;if(i){let s=0,u=0;r.forEach(e=>{e=e.extraFilterDistance||0,s=Math.max(s,e),u=Math.max(u,e)});var o=Math.floor(i.width),a=Math.floor(i.height);const c=o+2*s,l=a+2*u;if(!(c<1||l<1)){o=Math.floor(i.x),a=Math.floor(i.y),i=this.removeStyles(t,Ze.ignoreStyles);const h=n.createCanvas(c,l),f=h.getContext("2d");n.screen.setDefaults(f),f.translate(-o+s,-a+u),t.render(f),r.forEach(e=>{"function"==typeof e.apply&&e.apply(f,0,0,c,l)}),e.drawImage(h,0,0,c,l,o-s,a-u,c,l),this.restoreStyles(t,i)}}}render(e){}constructor(...e){super(...e),this.type="filter"}}Ze.ignoreStyles=["filter","transform","clip-path"];class et extends re{apply(e,t,n,r,i){}constructor(e,t,n){super(e,t,n),this.type="feDropShadow",this.addStylesFromStyleDefinition()}}class tt extends re{apply(e,t,n,r,i){}constructor(...e){super(...e),this.type="feMorphology"}}class nt extends re{apply(e,t,n,r,i){}constructor(...e){super(...e),this.type="feComposite"}}class rt extends re{apply(e,t,n,r,i){const{document:o,blurRadius:a}=this,u=o.window?o.window.document.body:null,c=e.canvas;c.id=o.getUniqueId(),u&&(c.style.display="none",u.appendChild(c)),Object(s.a)(c,t,n,r,i,a),u&&u.removeChild(c)}constructor(e,t,n){super(e,t,n),this.type="feGaussianBlur",this.blurRadius=Math.floor(this.getAttribute("stdDeviation").getNumber()),this.extraFilterDistance=this.blurRadius}}class it extends re{constructor(...e){super(...e),this.type="title"}}class ot extends re{constructor(...e){super(...e),this.type="desc"}}const at={svg:pe,rect:me,circle:ge,ellipse:Ae,line:ve,polyline:be,polygon:ye,path:de,pattern:we,marker:xe,defs:Ce,linearGradient:Se,radialGradient:_e,stop:Oe,animate:Te,animateColor:De,animateTransform:Be,font:Ne,"font-face":Ie,"missing-glyph":je,glyph:Me,text:ce,tspan:le,tref:Fe,a:Re,textPath:Pe,image:Ue,g:ke,symbol:ze,style:$e,use:Qe,mask:Ye,clipPath:Je,filter:Ze,feDropShadow:et,feMorphology:tt,feComposite:nt,feColorMatrix:Ke,feGaussianBlur:rt,title:it,desc:ot};class st{bindCreateImage(e,t){return"boolean"==typeof t?(n,r)=>e(n,"boolean"==typeof r?r:t):e}get window(){return this.screen.window}get fetch(){return this.screen.fetch}get ctx(){return this.screen.ctx}get emSize(){var e=this.emSizeStack;return e[e.length-1]||12}set emSize(e){this.emSizeStack.push(e)}popEmSize(){this.emSizeStack.pop()}getUniqueId(){return"canvg".concat(++this.uniqueId)}isImagesLoaded(){return this.images.every(e=>e.loaded)}isFontsLoaded(){return this.fonts.every(e=>e.loaded)}createDocumentElement(e){const t=this.createElement(e.documentElement);return t.root=!0,t.addStylesFromStyleDefinition(),this.documentElement=t}createElement(e){var t=e.nodeName.replace(/^[^:]+:/,"");return new(st.elementTypes[t]||ie)(this,e)}createTextNode(e){return new he(this,e)}setViewBox(e){this.screen.setViewBox({document:this,...e})}constructor(e,{rootEmSize:t=12,emSize:n=12,createCanvas:r=st.createCanvas,createImage:i=st.createImage,anonymousCrossOrigin:o}={}){this.canvg=e,this.definitions={},this.styles={},this.stylesSpecificity={},this.images=[],this.fonts=[],this.emSizeStack=[],this.uniqueId=0,this.screen=e.screen,this.rootEmSize=t,this.emSize=n,this.createCanvas=r,this.createImage=this.bindCreateImage(i,o),this.screen.wait(()=>this.isImagesLoaded()),this.screen.wait(()=>this.isFontsLoaded())}}st.createCanvas=function(e,t){const n=document.createElement("canvas");return n.width=e,n.height=t,n},st.createImage=async function(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1];const n=document.createElement("img");return t&&(n.crossOrigin="Anonymous"),new Promise((t,r)=>{n.onload=()=>{t(n)},n.onerror=(e,t,n,i,o)=>{r(o)},n.src=e})},st.elementTypes=at;class ut{static async from(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};const r=new W(n);return t=await r.parse(t),new ut(e,t,n)}static fromString(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};return t=new W(n).parseFromString(t),new ut(e,t,n)}fork(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};return ut.from(e,t,{...this.options,...n})}forkString(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};return ut.fromString(e,t,{...this.options,...n})}ready(){return this.screen.ready()}isReady(){return this.screen.isReady()}async render(){this.start({enableRedraw:!0,ignoreAnimation:!0,ignoreMouse:!0,...0<arguments.length&&void 0!==arguments[0]?arguments[0]:{}}),await this.ready(),this.stop()}start(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};const{documentElement:t,screen:n,options:r}=this;n.start(t,{enableRedraw:!0,...r,...e})}stop(){this.screen.stop()}resize(e){this.documentElement.resize(e,1<arguments.length&&void 0!==arguments[1]?arguments[1]:e,2<arguments.length&&void 0!==arguments[2]&&arguments[2])}constructor(e,t,n={}){this.parser=new W(n),this.screen=new V(e,n),this.options=n;const r=new st(this,n);e=r.createDocumentElement(t),this.document=r,this.documentElement=e}}}.call(this,n(117))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({acos_:
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){return e=Object(o.a)(e,"x","acos"),r.a.runKernel(i.b,{x:e})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({acosh_:
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){return e=Object(o.a)(e,"x","acosh"),r.a.runKernel(i.c,{x:e})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({asin_:
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){return e=Object(o.a)(e,"x","asin"),r.a.runKernel(i.j,{x:e})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({asinh_:
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){return e=Object(o.a)(e,"x","asinh"),r.a.runKernel(i.k,{x:e})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({atan_:
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){return e=Object(o.a)(e,"x","atan"),r.a.runKernel(i.l,{x:e})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({atanh_:
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){return e=Object(o.a)(e,"x","atanh"),r.a.runKernel(i.n,{x:e})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({ceil_:
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){return e=Object(o.a)(e,"x","ceil","float32"),r.a.runKernel(i.y,{x:e})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(6),i=n(4),o=n(3),a=n(10),s=n(88);t=n(5);const u=Object(t.b)({clipByValue_:
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t,n){return e=Object(o.a)(e,"x","clipByValue"),a.b(t<=n,()=>`Error in clip: min (${t}) must be less than or equal to max (${n}).`),t===n?Object(s.a)(e.shape,t,e.dtype):r.a.runKernel(i.z,{x:e},{clipValueMin:t,clipValueMax:n})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(6),i=n(4),o=n(3),a=n(10),s=n(15);t=n(5);const u=Object(t.b)({erf_:
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){let t=Object(o.a)(e,"x","erf");return a.b("int32"===t.dtype||"float32"===t.dtype,()=>"Input dtype must be `int32` or `float32`."),e={x:t="int32"===t.dtype?Object(s.a)(t,"float32"):t},r.a.runKernel(i.bb,e)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({expm1_:
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){return e=Object(o.a)(e,"x","expm1"),r.a.runKernel(i.eb,{x:e})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({isFinite_:
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){return e=Object(o.a)(e,"x","isFinite"),r.a.runKernel(i.vb,{x:e})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({isInf_:
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){return e=Object(o.a)(e,"x","isInf"),r.a.runKernel(i.wb,{x:e})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({isNaN_:
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){return e=Object(o.a)(e,"x","isNaN"),r.a.runKernel(i.xb,{x:e})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(43),i=n(3),o=n(11),a=n(35),s=(t=n(5),n(80)),u=n(192);const c=Object(t.b)({logSigmoid_:
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){e=Object(i.a)(e,"x","logSigmoid");return Object(r.a)(e=>({value:Object(a.a)(Object(u.a)(Object(a.a)(e))),gradFunc:t=>Object(o.a)(t,Object(s.a)(Object(a.a)(e)))}))(e)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(43),i=n(3),o=n(15),a=n(49),s=n(84),u=n(81),c=n(11),l=(t=n(5),n(17)),h=n(21);const f=Object(t.b)({logSoftmax_:
/**
 * @license
 * Copyright 2020 Google Inc. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t=-1){if(e=Object(i.a)(e,"logits","logSoftmax"),(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 Object(r.a)((e,n)=>{var r=Object(u.a)(e,t,!0);e=Object(l.a)(e,r);return n([r=Object(l.a)(Object(o.a)(e,"float32"),Object(s.a)(Object(h.a)(Object(a.a)(e),t,!0)))]),{value:r,gradFunc:(e,n)=>{var[n]=n;n=Object(a.a)(n);return Object(l.a)(e,Object(c.a)(Object(h.a)(e,t,!0),n))}}})(e)}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({onesLike_:
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){return e=Object(o.a)(e,"x","onesLike"),r.a.runKernel(i.gc,{x:e})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({reciprocal_:
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){return e=Object(o.a)(e,"x","reciprocal"),r.a.runKernel(i.tc,{x:e})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({sign_:
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){return e=Object(o.a)(e,"x","sign"),r.a.runKernel(i.Kc,{x:e})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({softmax_:
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t=-1){if(e=Object(o.a)(e,"logits","softmax","float32"),(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 r.a.runKernel(i.Oc,{logits:e},{dim:t})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({stridedSlice_:
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e,t,n,a,s=0,u=0,c=0,l=0,h=0){return e=Object(o.a)(e,"x","stridedSlice","string_or_numeric"),r.a.runKernel(i.bd,{x:e},{begin:t,end:n,strides:a,beginMask:s,endMask:u,ellipsisMask:c,newAxisMask:l,shrinkAxisMask:h})}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(6),i=n(4),o=n(3);t=n(5);const a=Object(t.b)({tan_:
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
function(e){return e=Object(o.a)(e,"x","tan","float32"),r.a.runKernel(i.hd,{x:e})}})},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return i}));
/**
 * @license
 * Copyright 2017 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
const r="undefined"!=typeof requestAnimationFrame?requestAnimationFrame:void 0!==e?e:e=>e();function i(){return new Promise(e=>r(()=>e()))}}).call(this,n(375).setImmediate)},function(e,t){function n(t){return e.exports=n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,n(t)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function n(e){var t=i[e];return void 0!==t||(t=i[e]={id:e,loaded:!1,exports:{}},r[e].call(t.exports,t,t.exports,n),t.loaded=!0),t.exports}var r,i;r={545:function(e){e.exports=function(){"use strict";var e={d:function(t,n){for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t={},n=(e.d(t,{default:function(){return $}}),{days:"days",months:"months",years:"years",day:"day",month:"month",year:"year",eventChangeViewDate:"changeViewDate",eventChangeCurrentView:"changeCurrentView",eventChangeFocusDate:"changeFocusDate",eventChangeSelectedDate:"changeSelectedDate",eventChangeTime:"changeTime",eventChangeLastSelectedDate:"changeLastSelectedDate",actionSelectDate:"selectDate",actionUnselectDate:"unselectDate",cssClassWeekend:"-weekend-"}),r={classes:"",inline:!1,locale:{days:["Воскресенье","Понедельник","Вторник","Среда","Четверг","Пятница","Суббота"],daysShort:["Вос","Пон","Вто","Сре","Чет","Пят","Суб"],daysMin:["Вс","Пн","Вт","Ср","Чт","Пт","Сб"],months:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],monthsShort:["Янв","Фев","Мар","Апр","Май","Июн","Июл","Авг","Сен","Окт","Ноя","Дек"],today:"Сегодня",clear:"Очистить",dateFormat:"dd.MM.yyyy",timeFormat:"HH:mm",firstDay:1},startDate:new Date,firstDay:"",weekends:[6,0],dateFormat:"",altField:"",altFieldDateFormat:"T",toggleSelected:!0,keyboardNav:!0,selectedDates:!1,container:"",isMobile:!1,visible:!1,position:"bottom left",offset:12,view:n.days,minView:n.days,showOtherMonths:!0,selectOtherMonths:!0,moveToOtherMonthsOnSelect:!0,showOtherYears:!0,selectOtherYears:!0,moveToOtherYearsOnSelect:!0,minDate:"",maxDate:"",disableNavWhenOutOfRange:!0,multipleDates:!1,multipleDatesSeparator:", ",range:!1,dynamicRange:!0,buttons:!1,monthsField:"monthsShort",showEvent:"focus",autoClose:!1,prevHtml:'<svg><path d="M 17,12 l -5,5 l 5,5"></path></svg>',nextHtml:'<svg><path d="M 14,12 l 5,5 l -5,5"></path></svg>',navTitles:{days:"MMMM, <i>yyyy</i>",months:"yyyy",years:"yyyy1 - yyyy2"},timepicker:!1,onlyTimepicker:!1,dateTimeSeparator:" ",timeFormat:"",minHours:0,maxHours:24,minMinutes:0,maxMinutes:59,hoursStep:1,minutesStep:1,onSelect:!1,onChangeViewDate:!1,onChangeView:!1,onRenderCell:!1,onShow:!1,onHide:!1,onClickDayName:!1};function i(e,t){let n=1<arguments.length&&void 0!==t?t:document;return"string"==typeof e?n.querySelector(e):e}function o(e){let{tagName:t="div",className:n="",innerHtml:r="",id:i="",attrs:o={}}=0<arguments.length&&void 0!==e?e:{},s=document.createElement(t);return n&&s.classList.add(...n.split(" ")),i&&(s.id=i),r&&(s.innerHTML=r),o&&a(s,o),s}function a(e,t){for(var[n,r]of Object.entries(t))void 0!==r&&e.setAttribute(n,r);return e}function s(e){return new Date(e.getFullYear(),e.getMonth()+1,0).getDate()}function u(e){var t=e.getHours(),{hours:n,dayPeriod:r}=c(t);return{year:e.getFullYear(),month:e.getMonth(),fullMonth:e.getMonth()+1<10?"0"+(e.getMonth()+1):e.getMonth()+1,date:e.getDate(),fullDate:e.getDate()<10?"0"+e.getDate():e.getDate(),day:e.getDay(),hours:t,fullHours:l(t),hours12:n,dayPeriod:r,fullHours12:l(n),minutes:e.getMinutes(),fullMinutes:e.getMinutes()<10?"0"+e.getMinutes():e.getMinutes()}}function c(e){return{dayPeriod:11<e?"pm":"am",hours:e%12==0?12:e%12}}function l(e){return e<10?"0"+e:e}function h(e){return[e=10*Math.floor(e.getFullYear()/10),9+e]}function f(){let e=[];for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach(t=>{if("object"==typeof t)for(var n in t)t[n]&&e.push(n);else t&&e.push(t)}),e.join(" ")}function d(e,t,r){return r=2<arguments.length&&void 0!==r?r:n.days,!(!e||!t)&&(e=u(e),t=u(t),{[n.days]:e.date===t.date&&e.month===t.month&&e.year===t.year,[n.months]:e.month===t.month&&e.year===t.year,[n.years]:e.year===t.year}[r])}function p(e,t,n){return e=g(e,!1).getTime(),t=g(t,!1).getTime(),n?t<=e:t<e}function m(e,t){return!p(e,t,!0)}function g(e){var t=!(1<arguments.length&&void 0!==arguments[1])||arguments[1];e=new Date(e.getTime());return"boolean"!=typeof t||t||e.setHours(0,0,0,0),e}function A(e,t,n){e.length?e.forEach(e=>{e.addEventListener(t,n)}):e.addEventListener(t,n)}function v(e,t){return!(!e||e===document||e instanceof DocumentFragment)&&(e.matches(t)?e:v(e.parentNode,t))}function b(e,t,n){return n<e?n:e<t?t:e}function y(e){for(var t=arguments.length,n=new Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.filter(e=>e).forEach(t=>{for(var[n,r]of Object.entries(t)){var i,o,a;void 0!==r&&"[object Object]"===r.toString()?(i=void 0!==e[n]?e[n].toString():void 0,o=r.toString(),a=Array.isArray(r)?[]:{},e[n]=e[n]&&i===o?e[n]:a,y(e[n],r)):e[n]=r}}),e}function w(e){let t=e;return e instanceof Date||(t=new Date(e)),!isNaN(t.getTime())&&t}function x(e){var t="\\s|\\.|-|/|\\\\|,|\\$|\\!|\\?|:|;";return new RegExp("(^|>|"+t+")("+e+")($|<|"+t+")","g")}function C(e,t,n){var r;r=function(e){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0===t)return String(e);if("object"!=typeof(t=t.call(e,"string")))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}(t),(t="symbol"==typeof r?r:String(r))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}class k{constructor(){var{type:e,date:t,dp:n,opts:r,body:i}=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};C(this,"focus",()=>{this.$cell.classList.add("-focus-"),this.focused=!0}),C(this,"removeFocus",()=>{this.$cell.classList.remove("-focus-"),this.focused=!1}),C(this,"select",()=>{this.$cell.classList.add("-selected-"),this.selected=!0}),C(this,"removeSelect",()=>{this.$cell.classList.remove("-selected-","-range-from-","-range-to-"),this.selected=!1}),C(this,"onChangeSelectedDate",()=>{this.isDisabled||(this._handleSelectedStatus(),this.opts.range&&this._handleRangeStatus())}),C(this,"onChangeFocusDate",e=>{e?((e=d(e,this.date,this.type))?this.focus():!e&&this.focused&&this.removeFocus(),this.opts.range&&this._handleRangeStatus()):this.focused&&this.removeFocus()}),C(this,"render",()=>(this.$cell.innerHTML=this._getHtml(),(this.$cell.adpCell=this).$cell)),this.type=e,this.singleType=this.type.slice(0,-1),this.date=t,this.dp=n,this.opts=r,this.body=i,this.customData=!1,this.init()}init(){let{range:e,onRenderCell:t}=this.opts;t&&(this.customData=t({date:this.date,cellType:this.singleType,datepicker:this.dp})),this._createElement(),this._bindDatepickerEvents(),this._handleInitialFocusStatus(),this.dp.hasSelectedDates&&(this._handleSelectedStatus(),e&&this._handleRangeStatus())}_bindDatepickerEvents(){this.dp.on(n.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.on(n.eventChangeFocusDate,this.onChangeFocusDate)}unbindDatepickerEvents(){this.dp.off(n.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.off(n.eventChangeFocusDate,this.onChangeFocusDate)}_createElement(){var{year:e,month:t,date:n}=u(this.date),r=(null==(r=this.customData)?void 0:r.attrs)||{};this.$cell=o({className:this._getClassName(),attrs:{"data-year":e,"data-month":t,"data-date":n,...r}})}_getClassName(){var e;let t=new Date,{selectOtherMonths:r,selectOtherYears:i}=this.opts,{minDate:o,maxDate:a}=this.dp,s=u(this.date).day,c=this._isOutOfMinMaxRange(),l=null==(e=this.customData)?void 0:e.disabled,h=f("air-datepicker-cell",`-${this.singleType}-`,{"-current-":d(t,this.date,this.type),"-min-date-":o&&d(o,this.date,this.type),"-max-date-":a&&d(a,this.date,this.type)}),p="";switch(this.type){case n.days:p=f({"-weekend-":this.dp.isWeekend(s),"-other-month-":this.isOtherMonth,"-disabled-":this.isOtherMonth&&!r||c||l});break;case n.months:p=f({"-disabled-":c||l});break;case n.years:p=f({"-other-decade-":this.isOtherDecade,"-disabled-":c||this.isOtherDecade&&!i||l})}return f(h,p,null==(e=this.customData)?void 0:e.classes)}_getHtml(){var e,{year:t,month:r,date:i}=u(this.date),{showOtherMonths:o,showOtherYears:a}=this.opts;if(null!=(e=this.customData)&&e.html)return this.customData.html;switch(this.type){case n.days:return!o&&this.isOtherMonth?"":i;case n.months:return this.dp.locale[this.opts.monthsField][r];case n.years:return!a&&this.isOtherDecade?"":t}}_isOutOfMinMaxRange(){let{minDate:e,maxDate:t}=this.dp,{type:r,date:i}=this,{month:o,year:a,date:s}=u(i),c=r===n.days,l=r===n.years,h=!!e&&new Date(a,l?e.getMonth():o,c?s:e.getDate()),f=!!t&&new Date(a,l?t.getMonth():o,c?s:t.getDate());return e&&t?m(h,e)||p(f,t):e?m(h,e):t?p(f,t):void 0}destroy(){this.unbindDatepickerEvents()}_handleRangeStatus(){let{rangeDateFrom:e,rangeDateTo:t}=this.dp,n=f({"-in-range-":e&&t&&(i=t,p(r=this.date,e)&&m(r,i)),"-range-from-":e&&d(this.date,e,this.type),"-range-to-":t&&d(this.date,t,this.type)});var r,i;this.$cell.classList.remove("-range-from-","-range-to-","-in-range-"),n&&this.$cell.classList.add(...n.split(" "))}_handleSelectedStatus(){var e=this.dp._checkIfDateIsSelected(this.date,this.type);e?this.select():!e&&this.selected&&this.removeSelect()}_handleInitialFocusStatus(){d(this.dp.focusDate,this.date,this.type)&&this.focus()}get isDisabled(){return this.$cell.matches(".-disabled-")}get isOtherMonth(){return this.dp.isOtherMonth(this.date)}get isOtherDecade(){return this.dp.isOtherDecade(this.date)}}function E(e,t,n){var r;r=function(e){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0===t)return String(e);if("object"!=typeof(t=t.call(e,"string")))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}(t),(t="symbol"==typeof r?r:String(r))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}let S={[n.days]:`<div class="air-datepicker-body--day-names"></div><div class="air-datepicker-body--cells -${n.days}-"></div>`,[n.months]:`<div class="air-datepicker-body--cells -${n.months}-"></div>`,[n.years]:`<div class="air-datepicker-body--cells -${n.years}-"></div>`};const _=".air-datepicker-cell";class O{constructor(e){var{dp:e,type:t,opts:r}=e;E(this,"handleClick",e=>{var t;(e=e.target.closest(_).adpCell).isDisabled||(this.dp.isMinViewReached?(t=this.dp._checkIfDateIsSelected(e.date,e.type))?this.dp._handleAlreadySelectedDates(t,e.date):this.dp.selectDate(e.date):this.dp.down())}),E(this,"handleDayNameClick",e=>{e=e.target.getAttribute("data-day-index"),this.opts.onClickDayName({dayIndex:Number(e),datepicker:this.dp})}),E(this,"onChangeCurrentView",e=>{e!==this.type?this.hide():(this.show(),this.render())}),E(this,"onMouseOverCell",e=>{e=v(e.target,_),this.dp.setFocusDate(!!e&&e.adpCell.date)}),E(this,"onMouseOutCell",()=>{this.dp.setFocusDate(!1)}),E(this,"onClickBody",e=>{let t=this.opts.onClickDayName,n=e.target;n.closest(_)&&this.handleClick(e),t&&n.closest(".air-datepicker-body--day-name")&&this.handleDayNameClick(e)}),E(this,"onMouseDown",e=>{this.pressed=!0,d((e=(e=v(e.target,_))&&e.adpCell).date,this.dp.rangeDateFrom)&&(this.rangeFromFocused=!0),d(e.date,this.dp.rangeDateTo)&&(this.rangeToFocused=!0)}),E(this,"onMouseMove",e=>{if(this.pressed&&this.dp.isMinViewReached){e.preventDefault();e=(e=v(e.target,_))&&e.adpCell;var{selectedDates:t,rangeDateTo:n,rangeDateFrom:r}=this.dp;if(e&&!e.isDisabled){let i=e.date;2===t.length&&(this.rangeFromFocused&&!p(i,n)&&(({hours:e,minutes:t}=u(r)),i.setHours(e),i.setMinutes(t),this.dp.rangeDateFrom=i,this.dp.replaceDate(r,i)),this.rangeToFocused&&!m(i,r)&&(({hours:e,minutes:t}=u(n)),i.setHours(e),i.setMinutes(t),this.dp.rangeDateTo=i,this.dp.replaceDate(n,i)))}}}),E(this,"onMouseUp",()=>{this.pressed=!1,this.rangeFromFocused=!1,this.rangeToFocused=!1}),E(this,"onChangeViewDate",(e,t)=>{if(this.isVisible){var r=h(e),i=h(t);switch(this.dp.currentView){case n.days:if(d(e,t,n.months))return;break;case n.months:if(d(e,t,n.years))return;break;case n.years:if(r[0]===i[0]&&r[1]===i[1])return}this.render()}}),E(this,"render",()=>{this.destroyCells(),this._generateCells(),this.cells.forEach(e=>{this.$cells.appendChild(e.render())})}),this.dp=e,this.type=t,this.opts=r,this.cells=[],this.$el="",this.pressed=!1,this.isVisible=!0,this.init()}init(){this._buildBaseHtml(),this.type===n.days&&this.renderDayNames(),this.render(),this._bindEvents(),this._bindDatepickerEvents()}_bindEvents(){var{range:e,dynamicRange:t}=this.opts;A(this.$el,"mouseover",this.onMouseOverCell),A(this.$el,"mouseout",this.onMouseOutCell),A(this.$el,"click",this.onClickBody),e&&t&&(A(this.$el,"mousedown",this.onMouseDown),A(this.$el,"mousemove",this.onMouseMove),A(window.document,"mouseup",this.onMouseUp))}_bindDatepickerEvents(){this.dp.on(n.eventChangeViewDate,this.onChangeViewDate),this.dp.on(n.eventChangeCurrentView,this.onChangeCurrentView)}_buildBaseHtml(){this.$el=o({className:`air-datepicker-body -${this.type}-`,innerHtml:S[this.type]}),this.$names=i(".air-datepicker-body--day-names",this.$el),this.$cells=i(".air-datepicker-body--cells",this.$el)}_getDayNamesHtml(){let e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.dp.locale.firstDay,t="",r=this.dp.isWeekend,i=this.opts.onClickDayName,o=e,a=0;for(;a<7;){var s=o%7;t+=`<div class="${f("air-datepicker-body--day-name",{[n.cssClassWeekend]:r(s),"-clickable-":!!i})}" data-day-index='${s}'>${this.dp.locale.daysMin[s]}</div>`,a++,o++}return t}renderDayNames(){this.$names.innerHTML=this._getDayNamesHtml()}_generateCell(e){var{type:t,dp:n,opts:r}=this;return new k({type:t,dp:n,opts:r,date:e,body:this})}_generateCells(){O.getDatesFunction(this.type)(this.dp,e=>{this.cells.push(this._generateCell(e))})}show(){this.isVisible=!0,this.$el.classList.remove("-hidden-")}hide(){this.isVisible=!1,this.$el.classList.add("-hidden-")}destroyCells(){this.cells.forEach(e=>e.destroy()),this.cells=[],this.$cells.innerHTML=""}destroy(){this.destroyCells(),this.dp.off(n.eventChangeViewDate,this.onChangeViewDate),this.dp.off(n.eventChangeCurrentView,this.onChangeCurrentView)}static getDaysDates(e,t){let{viewDate:n,locale:{firstDay:r}}=e,i=s(n),{year:o,month:a}=u(n),c=new Date(o,a,1),l=new Date(o,a,i),h=c.getDay()-r,f=6-l.getDay()+r,d=(h=h<0?h+7:h,f=6<f?f-7:f,function(e,t){var{year:e,month:n,date:r}=u(e);return new Date(e,n,r-t)}(c,h)),p=i+h+f,m=d.getDate(),{year:g,month:A}=u(d),v=0;const b=[];for(;v<p;){var y=new Date(g,A,m+v);t&&t(y),b.push(y),v++}return b}static getMonthsDates(e,t){let n=e.parsedViewDate.year,r=0,i=[];for(;r<12;){const e=new Date(n,r);i.push(e),t&&t(e),r++}return i}static getYearsDates(e,t){let n=h(e.viewDate),r=n[0]-1,i=n[1]+1,o=r,a=[];for(;o<=i;){const e=new Date(o,0);a.push(e),t&&t(e),o++}return a}static getDatesFunction(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:n.days;return{[n.days]:O.getDaysDates,[n.months]:O.getMonthsDates,[n.years]:O.getYearsDates}[e]}}function T(e,t,n){var r;r=function(e){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0===t)return String(e);if("object"!=typeof(t=t.call(e,"string")))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}(t),(t="symbol"==typeof r?r:String(r))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}class D{constructor(e){var{dp:e,opts:t}=e;T(this,"onClickNav",e=>{(e=v(e.target,".air-datepicker-nav--action"))&&(e=e.dataset.action,this.dp[e]())}),T(this,"onChangeViewDate",()=>{this.render(),this._resetNavStatus(),this.handleNavStatus()}),T(this,"onChangeCurrentView",()=>{this.render(),this._resetNavStatus(),this.handleNavStatus()}),T(this,"onClickNavTitle",()=>{this.dp.isFinalView||this.dp.up()}),T(this,"update",()=>{var{prevHtml:e,nextHtml:t}=this.opts;this.$prev.innerHTML=e,this.$next.innerHTML=t,this._resetNavStatus(),this.render(),this.handleNavStatus()}),T(this,"renderDelay",()=>{setTimeout(this.render)}),T(this,"render",()=>{this.$title.innerHTML=this._getTitle();var e,t=this.$title,n={"-disabled-":this.dp.isFinalView};for(e in n)n[e]?t.classList.add(e):t.classList.remove(e)}),this.dp=e,this.opts=t,this.init()}init(){this._createElement(),this._buildBaseHtml(),this._defineDOM(),this.render(),this.handleNavStatus(),this._bindEvents(),this._bindDatepickerEvents()}_defineDOM(){this.$title=i(".air-datepicker-nav--title",this.$el),this.$prev=i('[data-action="prev"]',this.$el),this.$next=i('[data-action="next"]',this.$el)}_bindEvents(){this.$el.addEventListener("click",this.onClickNav),this.$title.addEventListener("click",this.onClickNavTitle)}_bindDatepickerEvents(){this.dp.on(n.eventChangeViewDate,this.onChangeViewDate),this.dp.on(n.eventChangeCurrentView,this.onChangeCurrentView),this.isNavIsFunction&&(this.dp.on(n.eventChangeSelectedDate,this.renderDelay),this.dp.opts.timepicker&&this.dp.on(n.eventChangeTime,this.render))}destroy(){this.dp.off(n.eventChangeViewDate,this.onChangeViewDate),this.dp.off(n.eventChangeCurrentView,this.onChangeCurrentView),this.isNavIsFunction&&(this.dp.off(n.eventChangeSelectedDate,this.renderDelay),this.dp.opts.timepicker&&this.dp.off(n.eventChangeTime,this.render))}_createElement(){this.$el=o({tagName:"nav",className:"air-datepicker-nav"})}_getTitle(){let{dp:e,opts:t}=this,n=t.navTitles[e.currentView];return"function"==typeof n?n(e):e.formatDate(e.viewDate,n)}handleNavStatus(){var e=this.opts.disableNavWhenOutOfRange,{minDate:t,maxDate:r}=this.dp;if((t||r)&&e){var{year:i,month:o}=this.dp.parsedViewDate,a=!!t&&u(t),s=!!r&&u(r);switch(this.dp.currentView){case n.days:t&&a.month>=o&&a.year>=i&&this._disableNav("prev"),r&&s.month<=o&&s.year<=i&&this._disableNav("next");break;case n.months:t&&a.year>=i&&this._disableNav("prev"),r&&s.year<=i&&this._disableNav("next");break;case n.years:var c=h(this.dp.viewDate);t&&a.year>=c[0]&&this._disableNav("prev"),r&&s.year<=c[1]&&this._disableNav("next")}}}_disableNav(e){i('[data-action="'+e+'"]',this.$el).classList.add("-disabled-")}_resetNavStatus(){!function(e){for(var t=arguments.length,n=new Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];e.length?e.forEach(e=>{e.classList.remove(...n)}):e.classList.remove(...n)}(this.$el.querySelectorAll(".air-datepicker-nav--action"),"-disabled-")}_buildBaseHtml(){var{prevHtml:e,nextHtml:t}=this.opts;this.$el.innerHTML=`<div class="air-datepicker-nav--action" data-action="prev">${e}</div><div class="air-datepicker-nav--title"></div><div class="air-datepicker-nav--action" data-action="next">${t}</div>`}get isNavIsFunction(){let e=this.opts.navTitles;return Object.keys(e).find(t=>"function"==typeof e[t])}}var B={today:{content:e=>e.locale.today,onClick:e=>e.setViewDate(new Date)},clear:{content:e=>e.locale.clear,onClick:e=>e.clear()}};class I{constructor(e){var{dp:e,opts:t}=e;this.dp=e,this.opts=t,this.init()}init(){this.createElement(),this.render()}createElement(){this.$el=o({className:"air-datepicker-buttons"})}destroy(){this.$el.parentNode.removeChild(this.$el)}clearHtml(){return this.$el.innerHTML="",this}generateButtons(){let e=this.opts.buttons;(e=Array.isArray(e)?e:[e]).forEach(e=>{let t=e;"string"==typeof e&&B[e]&&(t=B[e]),e=this.createButton(t),t.onClick&&this.attachEventToButton(e,t.onClick),this.$el.appendChild(e)})}attachEventToButton(e,t){e.addEventListener("click",()=>{t(this.dp)})}createButton(e){let{content:t,className:n,tagName:r="button",attrs:i={}}=e;return o({tagName:r,innerHtml:`<span tabindex='-1'>${"function"==typeof t?t(this.dp):t}</span>`,className:f("air-datepicker-button",n),attrs:i})}render(){this.generateButtons()}}function M(e,t,n){var r;r=function(e){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0===t)return String(e);if("object"!=typeof(t=t.call(e,"string")))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}(t),(t="symbol"==typeof r?r:String(r))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}class j{constructor(){var{opts:e,dp:t}=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};M(this,"toggleTimepickerIsActive",e=>{this.dp.timepickerIsActive=e}),M(this,"onChangeSelectedDate",e=>{var{date:e,updateTime:t=!1}=e;e&&(this.setMinMaxTime(e),this.setCurrentTime(!!t&&e),this.addTimeToDate(e))}),M(this,"onChangeLastSelectedDate",e=>{e&&(this.setTime(e),this.render())}),M(this,"onChangeInputRange",e=>{let t=e.target;this[t.getAttribute("name")]=t.value,this.updateText(),this.dp.trigger(n.eventChangeTime,{hours:this.hours,minutes:this.minutes})}),M(this,"onMouseEnterLeave",e=>{let t=e.target.getAttribute("name"),n=this.$minutesText;(n="hours"===t?this.$hoursText:n).classList.toggle("-focus-")}),M(this,"onFocus",()=>{this.toggleTimepickerIsActive(!0)}),M(this,"onBlur",()=>{this.toggleTimepickerIsActive(!1)}),this.opts=e,this.dp=t;let r=this.dp.locale.timeFormat;r&&(r.match(x("h"))||r.match(x("hh")))&&(this.ampm=!0),this.init()}init(){this.setTime(this.dp.lastSelectedDate||this.dp.viewDate),this.createElement(),this.buildHtml(),this.defineDOM(),this.render(),this.bindDatepickerEvents(),this.bindDOMEvents()}bindDatepickerEvents(){this.dp.on(n.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.on(n.eventChangeLastSelectedDate,this.onChangeLastSelectedDate)}bindDOMEvents(){let e="input";navigator.userAgent.match(/trident/gi)&&(e="change"),A(this.$ranges,e,this.onChangeInputRange),A(this.$ranges,"mouseenter",this.onMouseEnterLeave),A(this.$ranges,"mouseleave",this.onMouseEnterLeave),A(this.$ranges,"focus",this.onFocus),A(this.$ranges,"mousedown",this.onFocus),A(this.$ranges,"blur",this.onBlur)}createElement(){this.$el=o({className:f("air-datepicker-time",{"-am-pm-":this.dp.ampm})})}destroy(){this.dp.off(n.eventChangeSelectedDate,this.onChangeSelectedDate),this.dp.off(n.eventChangeLastSelectedDate,this.onChangeLastSelectedDate),this.$el.parentNode.removeChild(this.$el)}buildHtml(){var{ampm:e,hours:t,displayHours:n,minutes:r,minHours:i,minMinutes:o,maxHours:a,maxMinutes:s,dayPeriod:u,opts:{hoursStep:c,minutesStep:h}}=this;this.$el.innerHTML=`<div class="air-datepicker-time--current">   <span class="air-datepicker-time--current-hours">${l(n)}</span>   <span class="air-datepicker-time--current-colon">:</span>   <span class="air-datepicker-time--current-minutes">${l(r)}</span>   `+(e?`<span class='air-datepicker-time--current-ampm'>${u}</span>`:"")+'</div><div class="air-datepicker-time--sliders">   <div class="air-datepicker-time--row">'+`      <input type="range" name="hours" value="${t}" min="${i}" max="${a}" step="${c}"/>   </div>   <div class="air-datepicker-time--row">`+`      <input type="range" name="minutes" value="${r}" min="${o}" max="${s}" step="${h}"/>   </div></div>`}defineDOM(){var e=e=>i(e,this.$el);this.$ranges=this.$el.querySelectorAll('[type="range"]'),this.$hours=e('[name="hours"]'),this.$minutes=e('[name="minutes"]'),this.$hoursText=e(".air-datepicker-time--current-hours"),this.$minutesText=e(".air-datepicker-time--current-minutes"),this.$ampm=e(".air-datepicker-time--current-ampm")}setTime(e){this.setMinMaxTime(e),this.setCurrentTime(e)}addTimeToDate(e){e&&(e.setHours(this.hours),e.setMinutes(this.minutes))}setMinMaxTime(e){var t,n;this.setMinMaxTimeFromOptions(),e&&(({minDate:t,maxDate:n}=this.dp),t&&d(e,t)&&this.setMinTimeFromMinDate(t),n&&d(e,n)&&this.setMaxTimeFromMaxDate(n))}setCurrentTime(e){var{hours:e,minutes:t}=e?u(e):this;this.hours=b(e,this.minHours,this.maxHours),this.minutes=b(t,this.minMinutes,this.maxMinutes)}setMinMaxTimeFromOptions(){var{minHours:e,minMinutes:t,maxHours:n,maxMinutes:r}=this.opts;this.minHours=b(e,0,23),this.minMinutes=b(t,0,59),this.maxHours=b(n,0,23),this.maxMinutes=b(r,0,59)}setMinTimeFromMinDate(e){let t=this.dp.lastSelectedDate;this.minHours=e.getHours(),t&&t.getHours()>e.getHours()?this.minMinutes=this.opts.minMinutes:this.minMinutes=e.getMinutes()}setMaxTimeFromMaxDate(e){let t=this.dp.lastSelectedDate;this.maxHours=e.getHours(),t&&t.getHours()<e.getHours()?this.maxMinutes=this.opts.maxMinutes:this.maxMinutes=e.getMinutes()}updateSliders(){a(this.$hours,{min:this.minHours,max:this.maxHours}).value=this.hours,a(this.$minutes,{min:this.minMinutes,max:this.maxMinutes}).value=this.minutes}updateText(){this.$hoursText.innerHTML=l(this.displayHours),this.$minutesText.innerHTML=l(this.minutes),this.ampm&&(this.$ampm.innerHTML=this.dayPeriod)}set hours(e){var{hours:t,dayPeriod:n}=c(this._hours=e);this.displayHours=this.ampm?t:e,this.dayPeriod=n}get hours(){return this._hours}render(){this.updateSliders(),this.updateText()}}function N(e,t,n){var r;r=function(e){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0===t)return String(e);if("object"!=typeof(t=t.call(e,"string")))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}(t),(t="symbol"==typeof r?r:String(r))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}class F{constructor(e){var{dp:e,opts:t}=e;N(this,"pressedKeys",new Set),N(this,"hotKeys",new Map([[[["Control","ArrowRight"],["Control","ArrowUp"]],e=>e.month++],[[["Control","ArrowLeft"],["Control","ArrowDown"]],e=>e.month--],[[["Shift","ArrowRight"],["Shift","ArrowUp"]],e=>e.year++],[[["Shift","ArrowLeft"],["Shift","ArrowDown"]],e=>e.year--],[[["Alt","ArrowRight"],["Alt","ArrowUp"]],e=>e.year+=10],[[["Alt","ArrowLeft"],["Alt","ArrowDown"]],e=>e.year-=10],[["Control","Shift","ArrowUp"],(e,t)=>t.up()]])),N(this,"handleHotKey",e=>{let t=this.hotKeys.get(e),n=u(this.getInitialFocusDate()),{year:r,month:i,date:o}=(t(n,this.dp),n),a=s(new Date(r,i));a<o&&(o=a),e=this.dp.getClampedDate(new Date(r,i,o)),this.dp.setFocusDate(e,{viewDateTransition:!0})}),N(this,"isHotKeyPressed",()=>{let e=!1,t=this.pressedKeys.size,n=e=>this.pressedKeys.has(e);for(let[r]of this.hotKeys){if(e)break;Array.isArray(r[0])?r.forEach(i=>{e||t!==i.length||(e=i.every(n)&&r)}):t===r.length&&(e=r.every(n)&&r)}return e}),N(this,"isArrow",e=>37<=e&&e<=40),N(this,"onKeyDown",e=>{let{key:t,which:n}=e,{dp:r,dp:{focusDate:i},opts:o}=this;this.registerKey(t);var a=this.isHotKeyPressed();if(a)e.preventDefault(),this.handleHotKey(a);else if(this.isArrow(n))e.preventDefault(),this.focusNextCell(t);else{if("Enter"===t){if(r.currentView!==o.minView)return void r.down();if(i)return void((a=r._checkIfDateIsSelected(i))?r._handleAlreadySelectedDates(a,i):r.selectDate(i))}"Escape"===t&&this.dp.hide()}}),N(this,"onKeyUp",e=>{this.removeKey(e.key)}),this.dp=e,this.opts=t,this.init()}init(){this.bindKeyboardEvents()}bindKeyboardEvents(){let e=this.dp.$el;e.addEventListener("keydown",this.onKeyDown),e.addEventListener("keyup",this.onKeyUp)}destroy(){let e=this.dp.$el;e.removeEventListener("keydown",this.onKeyDown),e.removeEventListener("keyup",this.onKeyUp),this.hotKeys=null,this.pressedKeys=null}getInitialFocusDate(){let{focusDate:e,currentView:t,selectedDates:r,parsedViewDate:{year:i,month:o}}=this.dp,a=e||r[r.length-1];if(!a)switch(t){case n.days:a=new Date(i,o,(new Date).getDate());break;case n.months:a=new Date(i,o,1);break;case n.years:a=new Date(i,0,1)}return a}focusNextCell(e){let t=this.getInitialFocusDate(),r=this.dp.currentView,{days:i,months:o,years:a}=n,s=u(t),c=s.year,l=s.month,h=s.date;switch(e){case"ArrowLeft":r===i&&--h,r===o&&--l,r===a&&--c;break;case"ArrowUp":r===i&&(h-=7),r===o&&(l-=3),r===a&&(c-=4);break;case"ArrowRight":r===i&&(h+=1),r===o&&(l+=1),r===a&&(c+=1);break;case"ArrowDown":r===i&&(h+=7),r===o&&(l+=3),r===a&&(c+=4)}e=this.dp.getClampedDate(new Date(c,l,h)),this.dp.setFocusDate(e,{viewDateTransition:!0})}registerKey(e){this.pressedKeys.add(e)}removeKey(e){this.pressedKeys.delete(e)}}var R,P={on(e,t){this.__events||(this.__events={}),this.__events[e]?this.__events[e].push(t):this.__events[e]=[t]},off(e,t){this.__events&&this.__events[e]&&(this.__events[e]=this.__events[e].filter(e=>e!==t))},removeAllEvents(){this.__events={}},trigger(e){for(var t=arguments.length,n=new Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.__events&&this.__events[e]&&this.__events[e].forEach(e=>{e(...n)})}};function L(e,t,n){var r;r=function(e){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0===t)return String(e);if("object"!=typeof(t=t.call(e,"string")))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}(t),(t="symbol"==typeof r?r:String(r))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}let U="",z="",H=!1;class ${static buildGlobalContainer(e){H=!0,U=o({className:e,id:e}),i("body").appendChild(U)}constructor(e,t){var a=this;L(this,"viewIndexes",[n.days,n.months,n.years]),L(this,"next",()=>{var{year:e,month:t}=this.parsedViewDate;switch(this.currentView){case n.days:this.setViewDate(new Date(e,t+1,1));break;case n.months:this.setViewDate(new Date(e+1,t,1));break;case n.years:this.setViewDate(new Date(e+10,0,1))}}),L(this,"prev",()=>{var{year:e,month:t}=this.parsedViewDate;switch(this.currentView){case n.days:this.setViewDate(new Date(e,t-1,1));break;case n.months:this.setViewDate(new Date(e-1,t,1));break;case n.years:this.setViewDate(new Date(e-10,0,1))}}),L(this,"_finishHide",()=>{this.hideAnimation=!1,this._destroyComponents(),this.$container.removeChild(this.$datepicker)}),L(this,"setPosition",(function(e){if("function"==typeof(e=e||a.opts.position))a.customHide=e({$datepicker:a.$datepicker,$target:a.$el,$pointer:a.$pointer,isViewChange:1<arguments.length&&void 0!==arguments[1]&&arguments[1],done:a._finishHide});else{let t,n,r=a.opts.isMobile,i=a.$el.getBoundingClientRect(),o=a.$el.getBoundingClientRect(),s=a.$datepicker.offsetParent,u=a.$el.offsetParent,c=a.$datepicker.getBoundingClientRect(),l=e.split(" "),h=window.scrollY,f=window.scrollX,d=a.opts.offset,p=l[0],m=l[1];if(r)a.$datepicker.style.cssText="left: 50%; top: 50%";else{switch(s===u&&s!==document.body&&(o={top:a.$el.offsetTop,left:a.$el.offsetLeft,width:i.width,height:a.$el.offsetHeight},h=0,f=0),s!==u&&s!==document.body&&(e=s.getBoundingClientRect(),o={top:i.top-e.top,left:i.left-e.left,width:i.width,height:i.height},h=0,f=0),p){case"top":t=o.top-c.height-d;break;case"right":n=o.left+o.width+d;break;case"bottom":t=o.top+o.height+d;break;case"left":n=o.left-c.width-d}switch(m){case"top":t=o.top;break;case"right":n=o.left+o.width-c.width;break;case"bottom":t=o.top+o.height-c.height;break;case"left":n=o.left;break;case"center":/left|right/.test(p)?t=o.top+o.height/2-c.height/2:n=o.left+o.width/2-c.width/2}a.$datepicker.style.cssText=`left: ${n+f}px; top: ${t+h}px`}}})),L(this,"_setInputValue",()=>{let{opts:e,$altField:t,locale:{dateFormat:n}}=this,{altFieldDateFormat:r,altField:i}=e;i&&t&&(t.value=this._getInputValue(r)),this.$el.value=this._getInputValue(n)}),L(this,"_getInputValue",e=>{let{selectedDates:t,opts:n}=this,{multipleDates:r,multipleDatesSeparator:i}=n;if(!t.length)return"";let o="function"==typeof e,a=o?e(r?t:t[0]):t.map(t=>this.formatDate(t,e));return o?a:a.join(i)}),L(this,"_checkIfDateIsSelected",(function(e){let t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:n.days,r=!1;return a.selectedDates.some(n=>{var i=d(e,n,t);return r=i&&n,i}),r})),L(this,"_scheduleCallAfterTransition",e=>{this._cancelScheduledCall(),e&&e(!1),this._onTransitionEnd=()=>{e&&e(!0)},this.$datepicker.addEventListener("transitionend",this._onTransitionEnd,{once:!0})}),L(this,"_cancelScheduledCall",()=>{this.$datepicker.removeEventListener("transitionend",this._onTransitionEnd)}),L(this,"setViewDate",e=>{if((e=w(e))instanceof Date&&!d(e,this.viewDate)){var t,r,i=this.viewDate;this.viewDate=e;let o=this.opts.onChangeViewDate;o&&(({month:t,year:r}=this.parsedViewDate),o({month:t,year:r,decade:this.curDecade})),this.trigger(n.eventChangeViewDate,e,i)}}),L(this,"setFocusDate",(function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};(!e||(e=w(e))instanceof Date)&&(a.focusDate=e,a.opts.range&&e&&a._handleRangeOnFocus(),a.trigger(n.eventChangeFocusDate,e,t))})),L(this,"setCurrentView",e=>{var t;this.viewIndexes.includes(e)&&(this.currentView=e,this.elIsInput&&this.visible&&this.setPosition(void 0,!0),this.trigger(n.eventChangeCurrentView,e),this.views[e]||(t=this.views[e]=new O({dp:this,opts:this.opts,type:e}),this.shouldUpdateDOM&&this.$content.appendChild(t.$el)),this.opts.onChangeView&&this.opts.onChangeView(e))}),L(this,"_updateLastSelectedDate",e=>{this.lastSelectedDate=e,this.trigger(n.eventChangeLastSelectedDate,e)}),L(this,"destroy",()=>{let{showEvent:e,isMobile:t}=this.opts,n=this.$datepicker.parentNode;n&&n.removeChild(this.$datepicker),this.$el.removeEventListener(e,this._onFocus),this.$el.removeEventListener("blur",this._onBlur),window.removeEventListener("resize",this._onResize),t&&this._removeMobileAttributes(),this.keyboardNav&&this.keyboardNav.destroy(),this.views=null,this.nav=null,this.$datepicker=null,this.opts=null,this.$customContainer=null,this.viewDate=null,this.focusDate=null,this.selectedDates=null,this.rangeDateFrom=null,this.rangeDateTo=null}),L(this,"update",(function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=y({},a.opts),{timepicker:r,buttons:i,range:o,selectedDates:s,isMobile:u}=(y(a.opts,e),a.opts),c=a.visible||a.treatAsInline;a._createMinMaxDates(),a._limitViewDateByMaxMinDates(),a._handleLocale(),!t.selectedDates&&s&&a.selectDate(s),e.view&&a.setCurrentView(e.view),a._setInputValue(),t.range&&!o?(a.rangeDateTo=!1,a.rangeDateFrom=!1):!t.range&&o&&a.selectedDates.length&&(a.rangeDateFrom=a.selectedDates[0],a.rangeDateTo=a.selectedDates[1]),t.timepicker&&!r?(c&&a.timepicker.destroy(),a.timepicker=!1,a.$timepicker.parentNode.removeChild(a.$timepicker)):!t.timepicker&&r&&a._addTimepicker(),!t.buttons&&i?a._addButtons():t.buttons&&!i?(a.buttons.destroy(),a.$buttons.parentNode.removeChild(a.$buttons)):c&&t.buttons&&i&&a.buttons.clearHtml().render(),!t.isMobile&&u?(a.treatAsInline||z||a._createMobileOverlay(),a._addMobileAttributes(),a.visible&&a._showMobileOverlay()):t.isMobile&&!u&&(a._removeMobileAttributes(),a.visible&&(z.classList.remove("-active-"),"function"!=typeof a.opts.position&&a.setPosition())),c&&(a.nav.update(),a.views[a.currentView].render(),a.currentView===n.days&&a.views[a.currentView].renderDayNames())})),L(this,"isOtherMonth",e=>(e=u(e).month)!==this.parsedViewDate.month),L(this,"isOtherYear",e=>(e=u(e).year)!==this.parsedViewDate.year),L(this,"isOtherDecade",e=>{e=u(e).year;var[t,n]=h(this.viewDate);return e<t||n<e}),L(this,"_onChangeSelectedDate",e=>{let t=e.silent;setTimeout(()=>{this._setInputValue(),this.opts.onSelect&&!t&&this._triggerOnSelect()})}),L(this,"_onChangeFocusedDate",(function(e){var t=(1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}).viewDateTransition;if(e){let n=!1;(n=t?a.isOtherMonth(e)||a.isOtherYear(e)||a.isOtherDecade(e):n)&&a.setViewDate(e),a.opts.onFocus&&a.opts.onFocus({datepicker:a,date:e})}})),L(this,"_onChangeTime",e=>{let{hours:t,minutes:n}=e,r=new Date,{lastSelectedDate:i,opts:{onSelect:o}}=this,a=i;i||(a=r),(e=(e=this.getCell(a,this.currentViewSingular))&&e.adpCell)&&e.isDisabled||(a.setHours(t),a.setMinutes(n),i?(this._setInputValue(),o&&this._triggerOnSelect()):this.selectDate(a))}),L(this,"_onFocus",e=>{this.visible||this.show()}),L(this,"_onBlur",e=>{this.inFocus||!this.visible||this.opts.isMobile||this.hide()}),L(this,"_onMouseDown",e=>{this.inFocus=!0}),L(this,"_onMouseUp",e=>{this.inFocus=!1,this.$el.focus()}),L(this,"_onResize",()=>{this.visible&&"function"!=typeof this.opts.position&&this.setPosition()}),L(this,"_onClickOverlay",()=>{this.visible&&this.hide()}),L(this,"getViewDates",(function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:n.days;return O.getDatesFunction(e)(a)})),L(this,"isWeekend",e=>this.opts.weekends.includes(e)),L(this,"getClampedDate",e=>{let{minDate:t,maxDate:n}=this,r=e;return n&&p(e,n)?r=n:t&&m(e,t)&&(r=t),r}),this.$el=i(e),this.$el&&(this.$datepicker=o({className:"air-datepicker"}),this.opts=y({},r,t),this.$customContainer=!!this.opts.container&&i(this.opts.container),this.$altField=i(this.opts.altField||!1),({view:e,startDate:t}=this.opts),t||(this.opts.startDate=new Date),"INPUT"===this.$el.nodeName&&(this.elIsInput=!0),this.inited=!1,this.visible=!1,this.viewDate=w(this.opts.startDate),this.focusDate=!1,this.initialReadonly=this.$el.getAttribute("readonly"),this.customHide=!1,this.currentView=e,this.selectedDates=[],this.views={},this.keys=[],this.rangeDateFrom="",this.rangeDateTo="",this.timepickerIsActive=!1,this.treatAsInline=this.opts.inline||!this.elIsInput,this.init())}init(){let{opts:e,treatAsInline:t,opts:{inline:n,isMobile:r,selectedDates:o,keyboardNav:a,onlyTimepicker:s}}=this,u=i("body");H&&(!H||!U||u.contains(U))||n||!this.elIsInput||this.$customContainer||$.buildGlobalContainer($.defaultGlobalContainerId),!r||z||t||this._createMobileOverlay(),this._handleLocale(),this._bindSubEvents(),this._createMinMaxDates(),this._limitViewDateByMaxMinDates(),this.elIsInput&&(n||this._bindEvents(),a&&!s&&(this.keyboardNav=new F({dp:this,opts:e}))),o&&this.selectDate(o,{silent:!0}),this.opts.visible&&!t&&this.show(),r&&!t&&this.$el.setAttribute("readonly",!0),t&&this._createComponents()}_createMobileOverlay(){z=o({className:"air-datepicker-overlay"}),U.appendChild(z)}_createComponents(){let{opts:e,treatAsInline:t,opts:{inline:n,buttons:r,timepicker:i,position:o,classes:a,onlyTimepicker:s,isMobile:u}}=this;this._buildBaseHtml(),this.elIsInput&&!n&&this._setPositionClasses(o),!n&&this.elIsInput||this.$datepicker.classList.add("-inline-"),a&&this.$datepicker.classList.add(...a.split(" ")),s&&this.$datepicker.classList.add("-only-timepicker-"),u&&!t&&this._addMobileAttributes(),this.views[this.currentView]=new O({dp:this,type:this.currentView,opts:e}),this.nav=new D({dp:this,opts:e}),i&&this._addTimepicker(),r&&this._addButtons(),this.$content.appendChild(this.views[this.currentView].$el),this.$nav.appendChild(this.nav.$el)}_destroyComponents(){for(var e in this.views)this.views[e].destroy();this.views={},this.nav.destroy(),this.timepicker&&this.timepicker.destroy()}_addMobileAttributes(){z.addEventListener("click",this._onClickOverlay),this.$datepicker.classList.add("-is-mobile-"),this.$el.setAttribute("readonly",!0)}_removeMobileAttributes(){z.removeEventListener("click",this._onClickOverlay),this.$datepicker.classList.remove("-is-mobile-"),this.initialReadonly||""===this.initialReadonly||this.$el.removeAttribute("readonly")}_createMinMaxDates(){var{minDate:e,maxDate:t}=this.opts;this.minDate=!!e&&w(e),this.maxDate=!!t&&w(t)}_addTimepicker(){this.$timepicker=o({className:"air-datepicker--time"}),this.$datepicker.appendChild(this.$timepicker),this.timepicker=new j({dp:this,opts:this.opts}),this.$timepicker.appendChild(this.timepicker.$el)}_addButtons(){this.$buttons=o({className:"air-datepicker--buttons"}),this.$datepicker.appendChild(this.$buttons),this.buttons=new I({dp:this,opts:this.opts}),this.$buttons.appendChild(this.buttons.$el)}_bindSubEvents(){this.on(n.eventChangeSelectedDate,this._onChangeSelectedDate),this.on(n.eventChangeFocusDate,this._onChangeFocusedDate),this.on(n.eventChangeTime,this._onChangeTime)}_buildBaseHtml(){var e,t=this.opts.inline;this.elIsInput?t?(t=this.$datepicker,(e=this.$el).parentNode.insertBefore(t,e.nextSibling)):this.$container.appendChild(this.$datepicker):this.$el.appendChild(this.$datepicker),this.$datepicker.innerHTML='<i class="air-datepicker--pointer"></i><div class="air-datepicker--navigation"></div><div class="air-datepicker--content"></div>',this.$content=i(".air-datepicker--content",this.$datepicker),this.$pointer=i(".air-datepicker--pointer",this.$datepicker),this.$nav=i(".air-datepicker--navigation",this.$datepicker)}_handleLocale(){var{locale:e,dateFormat:t,firstDay:n,timepicker:r,onlyTimepicker:i,timeFormat:o,dateTimeSeparator:a}=this.opts;this.locale=JSON.parse(JSON.stringify(e)),t&&(this.locale.dateFormat=t),void 0!==o&&""!==o&&(this.locale.timeFormat=o);let s=this.locale.timeFormat;""!==n&&(this.locale.firstDay=n),r&&"function"!=typeof t&&(e=s?a:"",this.locale.dateFormat=[this.locale.dateFormat,s||""].join(e)),i&&"function"!=typeof t&&(this.locale.dateFormat=this.locale.timeFormat)}_setPositionClasses(e){if("function"==typeof e)this.$datepicker.classList.add("-custom-position-");else{let t=(e=e.split(" "))[0],n=`air-datepicker -${t}-${e[1]}- -from-${t}-`;this.$datepicker.classList.add(...n.split(" "))}}_bindEvents(){this.$el.addEventListener(this.opts.showEvent,this._onFocus),this.$el.addEventListener("blur",this._onBlur),this.$datepicker.addEventListener("mousedown",this._onMouseDown),this.$datepicker.addEventListener("mouseup",this._onMouseUp),window.addEventListener("resize",this._onResize)}_limitViewDateByMaxMinDates(){var{viewDate:e,minDate:t,maxDate:n}=this;n&&p(e,n)&&this.setViewDate(n),t&&m(e,t)&&this.setViewDate(t)}formatDate(){let e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:this.viewDate,t=1<arguments.length?arguments[1]:void 0;if((e=w(e))instanceof Date){let i=t,o=this.locale,a=u(e),s=a.dayPeriod,c=h(e),l=$.replacer,f={T:e.getTime(),m:a.minutes,mm:a.fullMinutes,h:a.hours12,hh:a.fullHours12,H:a.hours,HH:a.fullHours,aa:s,AA:s.toUpperCase(),E:o.daysShort[a.day],EEEE:o.days[a.day],d:a.date,dd:a.fullDate,M:a.month+1,MM:a.fullMonth,MMM:o.monthsShort[a.month],MMMM:o.months[a.month],yy:a.year.toString().slice(-2),yyyy:a.year,yyyy1:c[0],yyyy2:c[1]};for(var[n,r]of Object.entries(f))i=l(i,x(n),r);return i}}down(e){this._handleUpDownActions(e,"down")}up(e){this._handleUpDownActions(e,"up")}selectDate(e){let t,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},{currentView:i,parsedViewDate:o,selectedDates:a}=this,s=r.updateTime,{moveToOtherMonthsOnSelect:u,moveToOtherYearsOnSelect:c,multipleDates:l,range:h,autoClose:f,onBeforeSelect:d}=this.opts,m=a.length;if(Array.isArray(e))return e.forEach(e=>{this.selectDate(e,r)}),new Promise(e=>{setTimeout(e)});if((e=w(e))instanceof Date){if(d&&!d({date:e,datepicker:this}))return Promise.resolve();if(i===n.days&&e.getMonth()!==o.month&&u&&(t=new Date(e.getFullYear(),e.getMonth(),1)),(t=i===n.years&&e.getFullYear()!==o.year&&c?new Date(e.getFullYear(),0,1):t)&&this.setViewDate(t),l&&!h){if(m===l)return;this._checkIfDateIsSelected(e)||a.push(e)}else if(h)switch(m){case 1:a.push(e),this.rangeDateTo||(this.rangeDateTo=e),p(this.rangeDateFrom,this.rangeDateTo)&&(this.rangeDateTo=this.rangeDateFrom,this.rangeDateFrom=e),this.selectedDates=[this.rangeDateFrom,this.rangeDateTo];break;case 2:this.selectedDates=[e],this.rangeDateFrom=e,this.rangeDateTo="";break;default:this.selectedDates=[e],this.rangeDateFrom=e}else this.selectedDates=[e];return this.trigger(n.eventChangeSelectedDate,{action:n.actionSelectDate,silent:null==r?void 0:r.silent,date:e,updateTime:s}),this._updateLastSelectedDate(e),f&&!this.timepickerIsActive&&this.visible&&(!l&&!h||h&&1===m)&&this.hide(),new Promise(e=>{setTimeout(e)})}}unselectDate(e){let t=this.selectedDates,r=this;if((e=w(e))instanceof Date)return t.some((i,o)=>{if(d(i,e))return t.splice(o,1),r.selectedDates.length?r._updateLastSelectedDate(r.selectedDates[r.selectedDates.length-1]):(r.rangeDateFrom="",r.rangeDateTo="",r._updateLastSelectedDate(!1)),this.trigger(n.eventChangeSelectedDate,{action:n.actionUnselectDate,date:e}),!0})}replaceDate(e,t){var r=this.selectedDates.find(t=>d(t,e,this.currentView));(r=this.selectedDates.indexOf(r))<0||d(this.selectedDates[r],t,this.currentView)||(this.selectedDates[r]=t,this.trigger(n.eventChangeSelectedDate,{action:n.actionSelectDate,date:t,updateTime:!0}),this._updateLastSelectedDate(t))}clear(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return this.selectedDates=[],this.rangeDateFrom=!1,this.rangeDateTo=!1,this.lastSelectedDate=!1,this.trigger(n.eventChangeSelectedDate,{action:n.actionUnselectDate,silent:e.silent}),new Promise(e=>{setTimeout(e)})}show(){var{onShow:e,isMobile:t}=this.opts;this._cancelScheduledCall(),this.visible||this.hideAnimation||this._createComponents(),this.setPosition(this.opts.position),this.$datepicker.classList.add("-active-"),this.visible=!0,e&&this._scheduleCallAfterTransition(e),t&&this._showMobileOverlay()}hide(){let{onHide:e,isMobile:t}=this.opts,n=this._hasTransition();this.visible=!1,this.hideAnimation=!0,this.$datepicker.classList.remove("-active-"),this.customHide&&this.customHide(),this.elIsInput&&this.$el.blur(),this._scheduleCallAfterTransition(t=>{!this.customHide&&(t&&n||!t&&!n)&&this._finishHide(),e&&e(t)}),t&&z.classList.remove("-active-")}_triggerOnSelect(){let e=[],t=[],{selectedDates:n,locale:r,opts:{onSelect:i,multipleDates:o,range:a}}=this,s=o||a,u="function"==typeof r.dateFormat;n.length&&(e=n.map(g),t=u?o?r.dateFormat(e):e.map(e=>r.dateFormat(e)):e.map(e=>this.formatDate(e,r.dateFormat))),i({date:s?e:e[0],formattedDate:s?t:t[0],datepicker:this})}_handleAlreadySelectedDates(e,t){const{range:n,toggleSelected:r}=this.opts;var i="function"==typeof r?r({datepicker:this,date:t}):r;n&&!i&&2!==this.selectedDates.length&&this.selectDate(t),i?this.unselectDate(t):this._updateLastSelectedDate(e)}_handleUpDownActions(e,t){if((e=w(e||this.focusDate||this.viewDate))instanceof Date){let n="up"===t?this.viewIndex+1:this.viewIndex-1;(n=2<n?2:n)<0&&(n=0),this.setViewDate(new Date(e.getFullYear(),e.getMonth(),1)),this.setCurrentView(this.viewIndexes[n])}}_handleRangeOnFocus(){1===this.selectedDates.length&&(p(this.selectedDates[0],this.focusDate)?(this.rangeDateTo=this.selectedDates[0],this.rangeDateFrom=this.focusDate):(this.rangeDateTo=this.focusDate,this.rangeDateFrom=this.selectedDates[0]))}getCell(e){var t,r,i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:n.day;if((e=w(e))instanceof Date)return({year:e,month:r,date:t}=u(e)),this.views[this.currentView].$el.querySelector({[n.day]:(e=`[data-year="${e}"]`)+(r=`[data-month="${r}"]`)+`[data-date="${t}"]`,[n.month]:e+r,[n.year]:e}[i])}_showMobileOverlay(){z.classList.add("-active-")}_hasTransition(){return 0<window.getComputedStyle(this.$datepicker).getPropertyValue("transition-duration").split(", ").reduce((e,t)=>parseFloat(t)+e,0)}get shouldUpdateDOM(){return this.visible||this.treatAsInline}get parsedViewDate(){return u(this.viewDate)}get currentViewSingular(){return this.currentView.slice(0,-1)}get curDecade(){return h(this.viewDate)}get viewIndex(){return this.viewIndexes.indexOf(this.currentView)}get isFinalView(){return this.currentView===n.years}get hasSelectedDates(){return 0<this.selectedDates.length}get isMinViewReached(){return this.currentView===this.opts.minView||this.currentView===n.days}get $container(){return this.$customContainer||U}static replacer(e,t,n){return e.replace(t,(function(e,t,r,i){return t+n+i}))}}return L($,"defaults",r),L($,"version","3.4.0"),L($,"defaultGlobalContainerId","air-datepicker-global-container"),R=$.prototype,Object.assign(R,P),t.default}()},881:(e,t)=>{"use strict";t.Z=void 0,t.Z={days:["周日","周一","周二","周三","周四","周五","周六"],daysShort:["日","一","二","三","四","五","六"],daysMin:["日","一","二","三","四","五","六"],months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthsShort:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],today:"今天",clear:"清除",dateFormat:"yyyy-MM-dd",timeFormat:"HH:mm",firstDay:1}},755:function(e,t){var n;
/*!
 * jQuery JavaScript Library v3.7.1
 * https://jquery.com/
 *
 * Copyright OpenJS Foundation and other contributors
 * Released under the MIT license
 * https://jquery.org/license
 *
 * Date: 2023-08-28T13:37Z
 */!function(t,n){"use strict";"object"==typeof e.exports?e.exports=t.document?n(t,!0):function(e){if(e.document)return n(e);throw new Error("jQuery requires a window with a document")}:n(t)}("undefined"!=typeof window?window:this,(function(r,i){"use strict";function o(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item}function a(e){return null!=e&&e===e.window}var s=[],u=Object.getPrototypeOf,c=s.slice,l=s.flat?function(e){return s.flat.call(e)}:function(e){return s.concat.apply([],e)},h=s.push,f=s.indexOf,d={},p=d.toString,m=d.hasOwnProperty,g=m.toString,A=g.call(Object),v={},b=r.document,y={type:!0,src:!0,nonce:!0,noModule:!0};function w(e,t,n){var r,i,o=(n=n||b).createElement("script");if(o.text=e,t)for(r in y)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function x(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?d[p.call(e)]||"object":typeof e}var C=/HTML$/i,k=function(e,t){return new k.fn.init(e,t)};function E(e){var t=!!e&&"length"in e&&e.length,n=x(e);return!o(e)&&!a(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}function S(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}k.fn=k.prototype={jquery:"3.7.1",constructor:k,length:0,toArray:function(){return c.call(this)},get:function(e){return null==e?c.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){return(e=k.merge(this.constructor(),e)).prevObject=this,e},each:function(e){return k.each(this,e)},map:function(e){return this.pushStack(k.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack(c.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(k.grep(this,(function(e,t){return(t+1)%2})))},odd:function(){return this.pushStack(k.grep(this,(function(e,t){return t%2})))},eq:function(e){var t=this.length;e=+e+(e<0?t:0);return this.pushStack(0<=e&&e<t?[this[e]]:[])},end:function(){return this.prevObject||this.constructor()},push:h,sort:s.sort,splice:s.splice},k.extend=k.fn.extend=function(){var e,t,n,r,i,a=arguments[0]||{},s=1,u=arguments.length,c=!1;for("boolean"==typeof a&&(c=a,a=arguments[s]||{},s++),"object"==typeof a||o(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)n=e[t],"__proto__"!==t&&a!==n&&(c&&n&&(k.isPlainObject(n)||(r=Array.isArray(n)))?(i=a[t],i=r&&!Array.isArray(i)?[]:r||k.isPlainObject(i)?i:{},r=!1,a[t]=k.extend(c,i,n)):void 0!==n&&(a[t]=n));return a},k.extend({expando:"jQuery"+("3.7.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){return!(!e||"[object Object]"!==p.call(e)||(e=u(e))&&("function"!=typeof(e=m.call(e,"constructor")&&e.constructor)||g.call(e)!==A))},isEmptyObject:function(e){for(var t in e)return!1;return!0},globalEval:function(e,t,n){w(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(E(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},text:function(e){var t,n="",r=0,i=e.nodeType;if(!i)for(;t=e[r++];)n+=k.text(t);return 1===i||11===i?e.textContent:9===i?e.documentElement.textContent:3===i||4===i?e.nodeValue:n},makeArray:function(e,t){return t=t||[],null!=e&&(E(Object(e))?k.merge(t,"string"==typeof e?[e]:e):h.call(t,e)),t},inArray:function(e,t,n){return null==t?-1:f.call(t,e,n)},isXMLDoc:function(e){var t=e&&e.namespaceURI;e=e&&(e.ownerDocument||e).documentElement;return!C.test(t||e&&e.nodeName||"HTML")},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!=a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(E(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return l(a)},guid:1,support:v}),"function"==typeof Symbol&&(k.fn[Symbol.iterator]=s[Symbol.iterator]),k.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(e,t){d["[object "+t+"]"]=t.toLowerCase()}));var _=s.pop,O=s.sort,T=s.splice,D="[\\x20\\t\\r\\n\\f]",B=new RegExp("^"+D+"+|((?:^|[^\\\\])(?:\\\\.)*)"+D+"+$","g"),I=(k.contains=function(e,t){return e===(t=t&&t.parentNode)||!(!t||1!==t.nodeType||!(e.contains?e.contains(t):e.compareDocumentPosition&&16&e.compareDocumentPosition(t)))},/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g);function M(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e}k.escapeSelector=function(e){return(e+"").replace(I,M)};var j,N,F,R,P,L,U,z,H,$,Q=b,V=h,q=V,G=k.expando,W=0,K=0,Y=be(),X=be(),J=be(),Z=be(),ee=function(e,t){return e===t&&(P=!0),0},te="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ne=":("+(ht="(?:\\\\[\\da-fA-F]{1,6}"+D+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+")+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+(Ct="\\["+D+"*("+ht+")(?:"+D+"*([*^$|!~]?=)"+D+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+ht+"))|)"+D+"*\\]")+")*)|.*)\\)|)",re=new RegExp(D+"+","g"),ie=new RegExp("^"+D+"*,"+D+"*"),oe=new RegExp("^"+D+"*([>+~]|"+D+")"+D+"*"),ae=new RegExp(D+"|>"),se=new RegExp(ne),ue=new RegExp("^"+ht+"$"),ce={ID:new RegExp("^#("+ht+")"),CLASS:new RegExp("^\\.("+ht+")"),TAG:new RegExp("^("+ht+"|[*])"),ATTR:new RegExp("^"+Ct),PSEUDO:new RegExp("^"+ne),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+D+"*(even|odd|(([+-]|)(\\d*)n|)"+D+"*(?:([+-]|)"+D+"*(\\d+)|))"+D+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+D+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+D+"*((?:-\\d)?\\d*)"+D+"*\\)|)(?=[^-]|$)","i")},le=/^(?:input|select|textarea|button)$/i,he=/^h\d$/i,fe=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,de=/[+~]/,pe=new RegExp("\\\\[\\da-fA-F]{1,6}"+D+"?|\\\\([^\\r\\n\\f])","g"),me=function(e,t){return e="0x"+e.slice(1)-65536,t||(e<0?String.fromCharCode(65536+e):String.fromCharCode(e>>10|55296,1023&e|56320))},ge=function(){Ee()},Ae=Te((function(e){return!0===e.disabled&&S(e,"fieldset")}),{dir:"parentNode",next:"legend"});try{q.apply(s=c.call(Q.childNodes),Q.childNodes),s[Q.childNodes.length].nodeType}catch(j){q={apply:function(e,t){V.apply(e,c.call(t))},call:function(e){V.apply(e,c.call(arguments,1))}}}function ve(e,t,n,r){var i,o,a,s,u,c,l=t&&t.ownerDocument,h=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==h&&9!==h&&11!==h)return n;if(!r&&(Ee(t),t=t||L,z)){if(11!==h&&(s=fe.exec(e)))if(i=s[1]){if(9===h){if(!(c=t.getElementById(i)))return n;if(c.id===i)return q.call(n,c),n}else if(l&&(c=l.getElementById(i))&&ve.contains(t,c)&&c.id===i)return q.call(n,c),n}else{if(s[2])return q.apply(n,t.getElementsByTagName(e)),n;if((i=s[3])&&t.getElementsByClassName)return q.apply(n,t.getElementsByClassName(i)),n}if(!(Z[e+" "]||H&&H.test(e))){if(c=e,l=t,1===h&&(ae.test(e)||oe.test(e))){for((l=de.test(e)&&ke(t.parentNode)||t)==t&&v.scope||((a=t.getAttribute("id"))?a=k.escapeSelector(a):t.setAttribute("id",a=G)),o=(u=_e(e)).length;o--;)u[o]=(a?"#"+a:":scope")+" "+Oe(u[o]);c=u.join(",")}try{return q.apply(n,l.querySelectorAll(c)),n}catch(t){Z(e,!0)}finally{a===G&&t.removeAttribute("id")}}}return je(e.replace(B,"$1"),t,n,r)}function be(){var e=[];return function t(n,r){return e.push(n+" ")>N.cacheLength&&delete t[e.shift()],t[n+" "]=r}}function ye(e){return e[G]=!0,e}function we(e){var t=L.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t)}}function xe(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&Ae(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function Ce(e){return ye((function(t){return t=+t,ye((function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))}))}))}function ke(e){return e&&void 0!==e.getElementsByTagName&&e}function Ee(e){return(e=e?e.ownerDocument||e:Q)!=L&&9===e.nodeType&&e.documentElement&&(U=(L=e).documentElement,z=!k.isXMLDoc(L),$=U.matches||U.webkitMatchesSelector||U.msMatchesSelector,U.msMatchesSelector&&Q!=L&&(e=L.defaultView)&&e.top!==e&&e.addEventListener("unload",ge),v.getById=we((function(e){return U.appendChild(e).id=k.expando,!L.getElementsByName||!L.getElementsByName(k.expando).length})),v.disconnectedMatch=we((function(e){return $.call(e,"*")})),v.scope=we((function(){return L.querySelectorAll(":scope")})),v.cssHas=we((function(){try{return L.querySelector(":has(*,:jqfake)"),0}catch(e){return 1}})),v.getById?(N.filter.ID=function(e){var t=e.replace(pe,me);return function(e){return e.getAttribute("id")===t}},N.find.ID=function(e,t){if(void 0!==t.getElementById&&z)return(t=t.getElementById(e))?[t]:[]}):(N.filter.ID=function(e){var t=e.replace(pe,me);return function(e){return(e=void 0!==e.getAttributeNode&&e.getAttributeNode("id"))&&e.value===t}},N.find.ID=function(e,t){if(void 0!==t.getElementById&&z){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),N.find.TAG=function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},N.find.CLASS=function(e,t){if(void 0!==t.getElementsByClassName&&z)return t.getElementsByClassName(e)},H=[],we((function(e){var t;U.appendChild(e).innerHTML="<a id='"+G+"' href='' disabled='disabled'></a><select id='"+G+"-\r\\' disabled='disabled'><option selected=''></option></select>",e.querySelectorAll("[selected]").length||H.push("\\["+D+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+G+"-]").length||H.push("~="),e.querySelectorAll("a#"+G+"+*").length||H.push(".#.+[+~]"),e.querySelectorAll(":checked").length||H.push(":checked"),(t=L.createElement("input")).setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),U.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&H.push(":enabled",":disabled"),(t=L.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||H.push("\\["+D+"*name"+D+"*="+D+"*(?:''|\"\")")})),v.cssHas||H.push(":has"),H=H.length&&new RegExp(H.join("|")),ee=function(e,t){var n;return e===t?(P=!0,0):!e.compareDocumentPosition-!t.compareDocumentPosition||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!v.sortDetached&&t.compareDocumentPosition(e)===n?e===L||e.ownerDocument==Q&&ve.contains(Q,e)?-1:t===L||t.ownerDocument==Q&&ve.contains(Q,t)?1:R?f.call(R,e)-f.call(R,t):0:4&n?-1:1)}),L}for(j in ve.matches=function(e,t){return ve(e,null,null,t)},ve.matchesSelector=function(e,t){if(Ee(e),z&&!Z[t+" "]&&(!H||!H.test(t)))try{var n=$.call(e,t);if(n||v.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){Z(t,!0)}return 0<ve(t,L,null,[e]).length},ve.contains=function(e,t){return(e.ownerDocument||e)!=L&&Ee(e),k.contains(e,t)},ve.attr=function(e,t){var n;return(e.ownerDocument||e)!=L&&Ee(e),void 0!==(n=(n=N.attrHandle[t.toLowerCase()])&&m.call(N.attrHandle,t.toLowerCase())?n(e,t,!z):void 0)?n:e.getAttribute(t)},ve.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},k.uniqueSort=function(e){var t,n=[],r=0,i=0;if(P=!v.sortStable,R=!v.sortStable&&c.call(e,0),O.call(e,ee),P){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)T.call(e,n[r],1)}return R=null,e},k.fn.uniqueSort=function(){return this.pushStack(k.uniqueSort(c.apply(this)))},(N=k.expr={cacheLength:50,createPseudo:ye,match:ce,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(pe,me),e[3]=(e[3]||e[4]||e[5]||"").replace(pe,me),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||ve.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&ve.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return ce.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&se.test(n)&&(t=_e(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(pe,me).toLowerCase();return"*"===e?function(){return!0}:function(e){return S(e,t)}},CLASS:function(e){var t=Y[e+" "];return t||(t=new RegExp("(^|"+D+")"+e+"("+D+"|$)"))&&Y(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(r){return null==(r=ve.attr(r,e))?"!="===t:!t||(r+="","="===t?r===n:"!="===t?r!==n:"^="===t?n&&0===r.indexOf(n):"*="===t?n&&-1<r.indexOf(n):"$="===t?n&&r.slice(-n.length)===n:"~="===t?-1<(" "+r.replace(re," ")+" ").indexOf(n):"|="===t&&(r===n||r.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var c,l,h,f,d,p=o!=a?"nextSibling":"previousSibling",m=t.parentNode,g=s&&t.nodeName.toLowerCase(),A=!u&&!s,v=!1;if(m){if(o){for(;p;){for(h=t;h=h[p];)if(s?S(h,g):1===h.nodeType)return!1;d=p="only"===e&&!d&&"nextSibling"}return!0}if(d=[a?m.firstChild:m.lastChild],a&&A){for(v=(f=(c=(l=m[G]||(m[G]={}))[e]||[])[0]===W&&c[1])&&c[2],h=f&&m.childNodes[f];h=++f&&h&&h[p]||(v=f=0)||d.pop();)if(1===h.nodeType&&++v&&h===t){l[e]=[W,f,v];break}}else if(!1===(v=A?f=(c=(l=t[G]||(t[G]={}))[e]||[])[0]===W&&c[1]:v))for(;(h=++f&&h&&h[p]||(v=f=0)||d.pop())&&(!(s?S(h,g):1===h.nodeType)||!++v||(A&&((l=h[G]||(h[G]={}))[e]=[W,v]),h!==t)););return(v-=i)===r||v%r==0&&0<=v/r}}},PSEUDO:function(e,t){var n,r=N.pseudos[e]||N.setFilters[e.toLowerCase()]||ve.error("unsupported pseudo: "+e);return r[G]?r(t):1<r.length?(n=[e,e,"",t],N.setFilters.hasOwnProperty(e.toLowerCase())?ye((function(e,n){for(var i,o=r(e,t),a=o.length;a--;)e[i=f.call(e,o[a])]=!(n[i]=o[a])})):function(e){return r(e,0,n)}):r}},pseudos:{not:ye((function(e){var t=[],n=[],r=Me(e.replace(B,"$1"));return r[G]?ye((function(e,t,n,i){for(var o,a=r(e,null,i,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))})):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}})),has:ye((function(e){return function(t){return 0<ve(e,t).length}})),contains:ye((function(e){return e=e.replace(pe,me),function(t){return-1<(t.textContent||k.text(t)).indexOf(e)}})),lang:ye((function(e){return ue.test(e||"")||ve.error("unsupported lang: "+e),e=e.replace(pe,me).toLowerCase(),function(t){var n;do{if(n=z?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(e){var t=r.location&&r.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===U},focus:function(e){return e===function(){try{return L.activeElement}catch(e){}}()&&L.hasFocus()&&!!(e.type||e.href||~e.tabIndex)},enabled:xe(!1),disabled:xe(!0),checked:function(e){return S(e,"input")&&!!e.checked||S(e,"option")&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!N.pseudos.empty(e)},header:function(e){return he.test(e.nodeName)},input:function(e){return le.test(e.nodeName)},button:function(e){return S(e,"input")&&"button"===e.type||S(e,"button")},text:function(e){return S(e,"input")&&"text"===e.type&&(null==(e=e.getAttribute("type"))||"text"===e.toLowerCase())},first:Ce((function(){return[0]})),last:Ce((function(e,t){return[t-1]})),eq:Ce((function(e,t,n){return[n<0?n+t:n]})),even:Ce((function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e})),odd:Ce((function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e})),lt:Ce((function(e,t,n){for(var r=n<0?n+t:t<n?t:n;0<=--r;)e.push(r);return e})),gt:Ce((function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e}))}}).pseudos.nth=N.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})N.pseudos[j]=function(e){return function(t){return S(t,"input")&&t.type===e}}(j);for(j in{submit:!0,reset:!0})N.pseudos[j]=function(e){return function(t){return(S(t,"input")||S(t,"button"))&&t.type===e}}(j);function Se(){}function _e(e,t){var n,r,i,o,a,s,u,c=X[e+" "];if(c)return t?0:c.slice(0);for(a=e,s=[],u=N.preFilter;a;){for(o in n&&!(r=ie.exec(a))||(r&&(a=a.slice(r[0].length)||a),s.push(i=[])),n=!1,(r=oe.exec(a))&&(n=r.shift(),i.push({value:n,type:r[0].replace(B," ")}),a=a.slice(n.length)),N.filter)!(r=ce[o].exec(a))||u[o]&&!(r=u[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),a=a.slice(n.length));if(!n)break}return t?a.length:a?ve.error(e):X(e,s).slice(0)}function Oe(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function Te(e,t,n){var r=t.dir,i=t.next,o=i||r,a=n&&"parentNode"===o,s=K++;return t.first?function(t,n,i){for(;t=t[r];)if(1===t.nodeType||a)return e(t,n,i);return!1}:function(t,n,u){var c,l,h=[W,s];if(u){for(;t=t[r];)if((1===t.nodeType||a)&&e(t,n,u))return!0}else for(;t=t[r];)if(1===t.nodeType||a)if(l=t[G]||(t[G]={}),i&&S(t,i))t=t[r]||t;else{if((c=l[o])&&c[0]===W&&c[1]===s)return h[2]=c[2];if((l[o]=h)[2]=e(t,n,u))return!0}return!1}}function De(e){return 1<e.length?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function Be(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,c=null!=t;s<u;s++)!(o=e[s])||n&&!n(o,r,i)||(a.push(o),c&&t.push(s));return a}function Ie(e){for(var t,n,r,i=e.length,o=N.relative[e[0].type],a=o||N.relative[" "],s=o?1:0,u=Te((function(e){return e===t}),a,!0),c=Te((function(e){return-1<f.call(t,e)}),a,!0),l=[function(e,n,r){return e=!o&&(r||n!=F)||((t=n).nodeType?u:c)(e,n,r),t=null,e}];s<i;s++)if(n=N.relative[e[s].type])l=[Te(De(l),n)];else{if((n=N.filter[e[s].type].apply(null,e[s].matches))[G]){for(r=++s;r<i&&!N.relative[e[r].type];r++);return function e(t,n,r,i,o,a){return i&&!i[G]&&(i=e(i)),o&&!o[G]&&(o=e(o,a)),ye((function(e,a,s,u){var c,l,h,d,p=[],m=[],g=a.length,A=e||function(e,t,n){for(var r=0,i=t.length;r<i;r++)ve(e,t[r],n);return n}(n||"*",s.nodeType?[s]:s,[]),v=!t||!e&&n?A:Be(A,p,t,s,u);if(r?r(v,d=o||(e?t:g||i)?[]:a,s,u):d=v,i)for(c=Be(d,m),i(c,[],s,u),l=c.length;l--;)(h=c[l])&&(d[m[l]]=!(v[m[l]]=h));if(e){if(o||t){if(o){for(c=[],l=d.length;l--;)(h=d[l])&&c.push(v[l]=h);o(null,d=[],c,u)}for(l=d.length;l--;)(h=d[l])&&-1<(c=o?f.call(e,h):p[l])&&(e[c]=!(a[c]=h))}}else d=Be(d===a?d.splice(g,d.length):d),o?o(null,a,d,u):q.apply(a,d)}))}(1<s&&De(l),1<s&&Oe(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(B,"$1"),n,s<r&&Ie(e.slice(s,r)),r<i&&Ie(e=e.slice(r)),r<i&&Oe(e))}l.push(n)}return De(l)}function Me(e,t){var n,r,i,o,a,s=[],u=[],c=J[e+" "];if(!c){for(n=(t=t||_e(e)).length;n--;)((c=Ie(t[n]))[G]?s:u).push(c);(c=J(e,(r=u,o=0<(i=s).length,a=0<r.length,o?ye(l):l))).selector=e}function l(e,t,n,s,u){var c,l,h,f=0,d="0",p=e&&[],m=[],g=F,A=e||a&&N.find.TAG("*",u),v=W+=null==g?1:Math.random()||.1,b=A.length;for(u&&(F=t==L||t||u);d!==b&&null!=(c=A[d]);d++){if(a&&c){for(l=0,t||c.ownerDocument==L||(Ee(c),n=!z);h=r[l++];)if(h(c,t||L,n)){q.call(s,c);break}u&&(W=v)}o&&((c=!h&&c)&&f--,e&&p.push(c))}if(f+=d,o&&d!==f){for(l=0;h=i[l++];)h(p,m,t,n);if(e){if(0<f)for(;d--;)p[d]||m[d]||(m[d]=_.call(s));m=Be(m)}q.apply(s,m),u&&!e&&0<m.length&&1<f+i.length&&k.uniqueSort(s)}return u&&(W=v,F=g),p}return c}function je(e,t,n,r){var i,o,a,s,u,c="function"==typeof e&&e,l=!r&&_e(e=c.selector||e);if(n=n||[],1===l.length){if(2<(o=l[0]=l[0].slice(0)).length&&"ID"===(a=o[0]).type&&9===t.nodeType&&z&&N.relative[o[1].type]){if(!(t=(N.find.ID(a.matches[0].replace(pe,me),t)||[])[0]))return n;c&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=ce.needsContext.test(e)?0:o.length;i--&&(a=o[i],!N.relative[s=a.type]);)if((u=N.find[s])&&(r=u(a.matches[0].replace(pe,me),de.test(o[0].type)&&ke(t.parentNode)||t))){if(o.splice(i,1),e=r.length&&Oe(o))break;return q.apply(n,r),n}}return(c||Me(e,l))(r,t,!z,n,!t||de.test(e)&&ke(t.parentNode)||t),n}function Ne(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&k(e).is(n))break;r.push(e)}return r}function Fe(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}Se.prototype=N.filters=N.pseudos,N.setFilters=new Se,v.sortStable=G.split("").sort(ee).join("")===G,Ee(),v.sortDetached=we((function(e){return 1&e.compareDocumentPosition(L.createElement("fieldset"))})),k.find=ve,k.expr[":"]=k.expr.pseudos,k.unique=k.uniqueSort,ve.compile=Me,ve.select=je,ve.setDocument=Ee,ve.tokenize=_e,ve.escape=k.escapeSelector,ve.getText=k.text,ve.isXML=k.isXMLDoc,ve.selectors=k.expr,ve.support=k.support,ve.uniqueSort=k.uniqueSort;var Re=k.expr.match.needsContext,Pe=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function Le(e,t,n){return o(t)?k.grep(e,(function(e,r){return!!t.call(e,r,e)!==n})):t.nodeType?k.grep(e,(function(e){return e===t!==n})):"string"!=typeof t?k.grep(e,(function(e){return-1<f.call(t,e)!==n})):k.filter(t,e,n)}k.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?k.find.matchesSelector(r,e)?[r]:[]:k.find.matches(e,k.grep(t,(function(e){return 1===e.nodeType})))},k.fn.extend({find:function(e){var t,n,r=this.length,i=this;if("string"!=typeof e)return this.pushStack(k(e).filter((function(){for(t=0;t<r;t++)if(k.contains(i[t],this))return!0})));for(n=this.pushStack([]),t=0;t<r;t++)k.find(e,i[t],n);return 1<r?k.uniqueSort(n):n},filter:function(e){return this.pushStack(Le(this,e||[],!1))},not:function(e){return this.pushStack(Le(this,e||[],!0))},is:function(e){return!!Le(this,"string"==typeof e&&Re.test(e)?k(e):e||[],!1).length}});var Ue,ze=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/,He=((k.fn.init=function(e,t,n){if(e){if(n=n||Ue,"string"!=typeof e)return e.nodeType?(this[0]=e,this.length=1,this):o(e)?void 0!==n.ready?n.ready(e):e(k):k.makeArray(e,this);if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:ze.exec(e))||!r[1]&&t)return(!t||t.jquery?t||n:this.constructor(t)).find(e);if(r[1]){if(t=t instanceof k?t[0]:t,k.merge(this,k.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:b,!0)),Pe.test(r[1])&&k.isPlainObject(t))for(var r in t)o(this[r])?this[r](t[r]):this.attr(r,t[r])}else(n=b.getElementById(r[2]))&&(this[0]=n,this.length=1)}return this}).prototype=k.fn,Ue=k(b),/^(?:parents|prev(?:Until|All))/),$e={children:!0,contents:!0,next:!0,prev:!0};function Qe(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}k.fn.extend({has:function(e){var t=k(e,this),n=t.length;return this.filter((function(){for(var e=0;e<n;e++)if(k.contains(this,t[e]))return!0}))},closest:function(e,t){var n,r=0,i=this.length,o=[],a="string"!=typeof e&&k(e);if(!Re.test(e))for(;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(a?-1<a.index(n):1===n.nodeType&&k.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?k.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?f.call(k(e),this[0]):f.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(k.uniqueSort(k.merge(this.get(),k(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),k.each({parent:function(e){return(e=e.parentNode)&&11!==e.nodeType?e:null},parents:function(e){return Ne(e,"parentNode")},parentsUntil:function(e,t,n){return Ne(e,"parentNode",n)},next:function(e){return Qe(e,"nextSibling")},prev:function(e){return Qe(e,"previousSibling")},nextAll:function(e){return Ne(e,"nextSibling")},prevAll:function(e){return Ne(e,"previousSibling")},nextUntil:function(e,t,n){return Ne(e,"nextSibling",n)},prevUntil:function(e,t,n){return Ne(e,"previousSibling",n)},siblings:function(e){return Fe((e.parentNode||{}).firstChild,e)},children:function(e){return Fe(e.firstChild)},contents:function(e){return null!=e.contentDocument&&u(e.contentDocument)?e.contentDocument:(S(e,"template")&&(e=e.content||e),k.merge([],e.childNodes))}},(function(e,t){k.fn[e]=function(n,r){var i=k.map(this,t,n);return(r="Until"!==e.slice(-5)?n:r)&&"string"==typeof r&&(i=k.filter(r,i)),1<this.length&&($e[e]||k.uniqueSort(i),He.test(e)&&i.reverse()),this.pushStack(i)}}));var Ve=/[^\x20\t\r\n\f]+/g;function qe(e){return e}function Ge(e){throw e}function We(e,t,n,r){var i;try{e&&o(i=e.promise)?i.call(e).done(t).fail(n):e&&o(i=e.then)?i.call(e,t,n):t.apply(void 0,[e].slice(r))}catch(e){n.apply(void 0,[e])}}k.Callbacks=function(e){var t,n;function r(){for(u=u||e.once,s=i=!0;l.length;h=-1)for(a=l.shift();++h<c.length;)!1===c[h].apply(a[0],a[1])&&e.stopOnFalse&&(h=c.length,a=!1);e.memory||(a=!1),i=!1,u&&(c=a?[]:"")}e="string"==typeof e?(t=e,n={},k.each(t.match(Ve)||[],(function(e,t){n[t]=!0})),n):k.extend({},e);var i,a,s,u,c=[],l=[],h=-1,f={add:function(){return c&&(a&&!i&&(h=c.length-1,l.push(a)),function t(n){k.each(n,(function(n,r){o(r)?e.unique&&f.has(r)||c.push(r):r&&r.length&&"string"!==x(r)&&t(r)}))}(arguments),a&&!i&&r()),this},remove:function(){return k.each(arguments,(function(e,t){for(var n;-1<(n=k.inArray(t,c,n));)c.splice(n,1),n<=h&&h--})),this},has:function(e){return e?-1<k.inArray(e,c):0<c.length},empty:function(){return c=c&&[],this},disable:function(){return u=l=[],c=a="",this},disabled:function(){return!c},lock:function(){return u=l=[],a||i||(c=a=""),this},locked:function(){return!!u},fireWith:function(e,t){return u||(t=[e,(t=t||[]).slice?t.slice():t],l.push(t),i||r()),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!s}};return f},k.extend({Deferred:function(e){var t=[["notify","progress",k.Callbacks("memory"),k.Callbacks("memory"),2],["resolve","done",k.Callbacks("once memory"),k.Callbacks("once memory"),0,"resolved"],["reject","fail",k.Callbacks("once memory"),k.Callbacks("once memory"),1,"rejected"]],n="pending",i={state:function(){return n},always:function(){return a.done(arguments).fail(arguments),this},catch:function(e){return i.then(null,e)},pipe:function(){var e=arguments;return k.Deferred((function(n){k.each(t,(function(t,r){var i=o(e[r[4]])&&e[r[4]];a[r[1]]((function(){var e=i&&i.apply(this,arguments);e&&o(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[e]:arguments)}))})),e=null})).promise()},then:function(e,n,i){var a=0;function s(e,t,n,i){return function(){function u(){var r,u;if(!(e<a)){if((r=n.apply(c,l))===t.promise())throw new TypeError("Thenable self-resolution");o(u=r&&("object"==typeof r||"function"==typeof r)&&r.then)?i?u.call(r,s(a,t,qe,i),s(a,t,Ge,i)):(a++,u.call(r,s(a,t,qe,i),s(a,t,Ge,i),s(a,t,qe,t.notifyWith))):(n!==qe&&(c=void 0,l=[r]),(i||t.resolveWith)(c,l))}}var c=this,l=arguments,h=i?u:function(){try{u()}catch(r){k.Deferred.exceptionHook&&k.Deferred.exceptionHook(r,h.error),a<=e+1&&(n!==Ge&&(c=void 0,l=[r]),t.rejectWith(c,l))}};e?h():(k.Deferred.getErrorHook?h.error=k.Deferred.getErrorHook():k.Deferred.getStackHook&&(h.error=k.Deferred.getStackHook()),r.setTimeout(h))}}return k.Deferred((function(r){t[0][3].add(s(0,r,o(i)?i:qe,r.notifyWith)),t[1][3].add(s(0,r,o(e)?e:qe)),t[2][3].add(s(0,r,o(n)?n:Ge))})).promise()},promise:function(e){return null!=e?k.extend(e,i):i}},a={};return k.each(t,(function(e,r){var o=r[2],s=r[5];i[r[1]]=o.add,s&&o.add((function(){n=s}),t[3-e][2].disable,t[3-e][3].disable,t[0][2].lock,t[0][3].lock),o.add(r[3].fire),a[r[0]]=function(){return a[r[0]+"With"](this===a?void 0:this,arguments),this},a[r[0]+"With"]=o.fireWith})),i.promise(a),e&&e.call(a,a),a},when:function(e){function t(e){return function(t){i[e]=this,a[e]=1<arguments.length?c.call(arguments):t,--n||s.resolveWith(i,a)}}var n=arguments.length,r=n,i=Array(r),a=c.call(arguments),s=k.Deferred();if(n<=1&&(We(e,s.done(t(r)).resolve,s.reject,!n),"pending"===s.state()||o(a[r]&&a[r].then)))return s.then();for(;r--;)We(a[r],t(r),s.reject);return s.promise()}});var Ke=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/,Ye=(k.Deferred.exceptionHook=function(e,t){r.console&&r.console.warn&&e&&Ke.test(e.name)&&r.console.warn("jQuery.Deferred exception: "+e.message,e.stack,t)},k.readyException=function(e){r.setTimeout((function(){throw e}))},k.Deferred());function Xe(){b.removeEventListener("DOMContentLoaded",Xe),r.removeEventListener("load",Xe),k.ready()}function Je(e,t,n,r,i,a,s){var u=0,c=e.length,l=null==n;if("object"===x(n))for(u in i=!0,n)Je(e,t,u,n[u],!0,a,s);else if(void 0!==r&&(i=!0,o(r)||(s=!0),t=l?s?(t.call(e,r),null):(l=t,function(e,t,n){return l.call(k(e),n)}):t))for(;u<c;u++)t(e[u],n,s?r:r.call(e[u],u,t(e[u],n)));return i?e:l?t.call(e):c?t(e[0],n):a}k.fn.ready=function(e){return Ye.then(e).catch((function(e){k.readyException(e)})),this},k.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--k.readyWait:k.isReady)||(k.isReady=!0)!==e&&0<--k.readyWait||Ye.resolveWith(b,[k])}}),k.ready.then=Ye.then,"complete"===b.readyState||"loading"!==b.readyState&&!b.documentElement.doScroll?r.setTimeout(k.ready):(b.addEventListener("DOMContentLoaded",Xe),r.addEventListener("load",Xe));var Ze=/^-ms-/,et=/-([a-z])/g;function tt(e,t){return t.toUpperCase()}function nt(e){return e.replace(Ze,"ms-").replace(et,tt)}function rt(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType}function it(){this.expando=k.expando+it.uid++}it.uid=1,it.prototype={cache:function(e){var t=e[this.expando];return t||(t={},rt(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[nt(t)]=n;else for(r in t)i[nt(r)]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][nt(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r=e[this.expando];if(void 0!==r){if(void 0!==t){n=(t=Array.isArray(t)?t.map(nt):(t=nt(t))in r?[t]:t.match(Ve)||[]).length;for(;n--;)delete r[t[n]]}void 0!==t&&!k.isEmptyObject(r)||(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){return void 0!==(e=e[this.expando])&&!k.isEmptyObject(e)}};var ot=new it,at=new it,st=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,ut=/[A-Z]/g;function ct(e,t,n){var r,i;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(ut,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===(i=n)||"false"!==i&&("null"===i?null:i===+i+""?+i:st.test(i)?JSON.parse(i):i)}catch(e){}at.set(e,t,n)}else n=void 0;return n}function lt(e,t){return"none"===(e=t||e).style.display||""===e.style.display&&mt(e)&&"none"===k.css(e,"display")}k.extend({hasData:function(e){return at.hasData(e)||ot.hasData(e)},data:function(e,t,n){return at.access(e,t,n)},removeData:function(e,t){at.remove(e,t)},_data:function(e,t,n){return ot.access(e,t,n)},_removeData:function(e,t){ot.remove(e,t)}}),k.fn.extend({data:function(e,t){var n,r,i,o=this[0],a=o&&o.attributes;if(void 0!==e)return"object"==typeof e?this.each((function(){at.set(this,e)})):Je(this,(function(t){var n;if(o&&void 0===t)return void 0!==(n=at.get(o,e))||void 0!==(n=ct(o,e))?n:void 0;this.each((function(){at.set(this,e,t)}))}),null,t,1<arguments.length,null,!0);if(this.length&&(i=at.get(o),1===o.nodeType&&!ot.get(o,"hasDataAttrs"))){for(n=a.length;n--;)a[n]&&0===(r=a[n].name).indexOf("data-")&&(r=nt(r.slice(5)),ct(o,r,i[r]));ot.set(o,"hasDataAttrs",!0)}return i},removeData:function(e){return this.each((function(){at.remove(this,e)}))}}),k.extend({queue:function(e,t,n){var r;if(e)return r=ot.get(e,t=(t||"fx")+"queue"),n&&(!r||Array.isArray(n)?r=ot.access(e,t,k.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=k.queue(e,t),r=n.length,i=n.shift(),o=k._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,(function(){k.dequeue(e,t)}),o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return ot.get(e,n)||ot.access(e,n,{empty:k.Callbacks("once memory").add((function(){ot.remove(e,[t+"queue",n])}))})}}),k.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?k.queue(this[0],e):void 0===t?this:this.each((function(){var n=k.queue(this,e,t);k._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&k.dequeue(this,e)}))},dequeue:function(e){return this.each((function(){k.dequeue(this,e)}))},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){function n(){--i||o.resolveWith(a,[a])}var r,i=1,o=k.Deferred(),a=this,s=this.length;for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";s--;)(r=ot.get(a[s],e+"queueHooks"))&&r.empty&&(i++,r.empty.add(n));return n(),o.promise(t)}});var ht=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ft=new RegExp("^(?:([+-])=|)("+ht+")([a-z%]*)$","i"),dt=["Top","Right","Bottom","Left"],pt=b.documentElement,mt=function(e){return k.contains(e.ownerDocument,e)},gt={composed:!0};function At(e,t,n,r){var i,o,a=20,s=r?function(){return r.cur()}:function(){return k.css(e,t,"")},u=s(),c=n&&n[3]||(k.cssNumber[t]?"":"px"),l=e.nodeType&&(k.cssNumber[t]||"px"!==c&&+u)&&ft.exec(k.css(e,t));if(l&&l[3]!==c){for(c=c||l[3],l=+(u/=2)||1;a--;)k.style(e,t,l+c),(1-o)*(1-(o=s()/u||.5))<=0&&(a=0),l/=o;k.style(e,t,(l*=2)+c),n=n||[]}return n&&(l=+l||+u||0,i=n[1]?l+(n[1]+1)*n[2]:+n[2],r&&(r.unit=c,r.start=l,r.end=i)),i}pt.getRootNode&&(mt=function(e){return k.contains(e.ownerDocument,e)||e.getRootNode(gt)===e.ownerDocument});var vt={};function bt(e,t){for(var n,r,i,o,a,s=[],u=0,c=e.length;u<c;u++)(r=e[u]).style&&(n=r.style.display,t?("none"===n&&(s[u]=ot.get(r,"display")||null,s[u]||(r.style.display="")),""===r.style.display&&lt(r)&&(s[u]=(a=o=void 0,o=(i=r).ownerDocument,i=i.nodeName,(a=vt[i])||(o=o.body.appendChild(o.createElement(i)),a=k.css(o,"display"),o.parentNode.removeChild(o),vt[i]=a="none"===a?"block":a)))):"none"!==n&&(s[u]="none",ot.set(r,"display",n)));for(u=0;u<c;u++)null!=s[u]&&(e[u].style.display=s[u]);return e}k.fn.extend({show:function(){return bt(this,!0)},hide:function(){return bt(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each((function(){lt(this)?k(this).show():k(this).hide()}))}});var yt=/^(?:checkbox|radio)$/i,wt=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,xt=/^$|^module$|\/(?:java|ecma)script/i,Ct=b.createDocumentFragment().appendChild(b.createElement("div")),kt=((ne=b.createElement("input")).setAttribute("type","radio"),ne.setAttribute("checked","checked"),ne.setAttribute("name","t"),Ct.appendChild(ne),v.checkClone=Ct.cloneNode(!0).cloneNode(!0).lastChild.checked,Ct.innerHTML="<textarea>x</textarea>",v.noCloneChecked=!!Ct.cloneNode(!0).lastChild.defaultValue,Ct.innerHTML="<option></option>",v.option=!!Ct.lastChild,{thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]});function Et(e,t){var n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&S(e,t)?k.merge([e],n):n}function St(e,t){for(var n=0,r=e.length;n<r;n++)ot.set(e[n],"globalEval",!t||ot.get(t[n],"globalEval"))}kt.tbody=kt.tfoot=kt.colgroup=kt.caption=kt.thead,kt.th=kt.td,v.option||(kt.optgroup=kt.option=[1,"<select multiple='multiple'>","</select>"]);var _t=/<|&#?\w+;/;function Ot(e,t,n,r,i){for(var o,a,s,u,c,l=t.createDocumentFragment(),h=[],f=0,d=e.length;f<d;f++)if((o=e[f])||0===o)if("object"===x(o))k.merge(h,o.nodeType?[o]:o);else if(_t.test(o)){for(a=a||l.appendChild(t.createElement("div")),s=(wt.exec(o)||["",""])[1].toLowerCase(),s=kt[s]||kt._default,a.innerHTML=s[1]+k.htmlPrefilter(o)+s[2],c=s[0];c--;)a=a.lastChild;k.merge(h,a.childNodes),(a=l.firstChild).textContent=""}else h.push(t.createTextNode(o));for(l.textContent="",f=0;o=h[f++];)if(r&&-1<k.inArray(o,r))i&&i.push(o);else if(u=mt(o),a=Et(l.appendChild(o),"script"),u&&St(a),n)for(c=0;o=a[c++];)xt.test(o.type||"")&&n.push(o);return l}var Tt=/^([^.]*)(?:\.(.+)|)/;function Dt(){return!0}function Bt(){return!1}function It(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)It(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Bt;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return k().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=k.guid++)),e.each((function(){k.event.add(this,t,i,r,n)}))}function Mt(e,t,n){n?(ot.set(e,t,!1),k.event.add(e,t,{namespace:!1,handler:function(e){var n,r=ot.get(this,t);if(1&e.isTrigger&&this[t]){if(r)(k.event.special[t]||{}).delegateType&&e.stopPropagation();else if(r=c.call(arguments),ot.set(this,t,r),this[t](),n=ot.get(this,t),ot.set(this,t,!1),r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n}else r&&(ot.set(this,t,k.event.trigger(r[0],r.slice(1),this)),e.stopPropagation(),e.isImmediatePropagationStopped=Dt)}})):void 0===ot.get(e,t)&&k.event.add(e,t,Dt)}k.event={global:{},add:function(e,t,n,r,i){var o,a,s,u,c,l,h,f,d,p=ot.get(e);if(rt(e))for(n.handler&&(n=(o=n).handler,i=o.selector),i&&k.find.matchesSelector(pt,i),n.guid||(n.guid=k.guid++),(s=p.events)||(s=p.events=Object.create(null)),(a=p.handle)||(a=p.handle=function(t){return void 0!==k&&k.event.triggered!==t.type?k.event.dispatch.apply(e,arguments):void 0}),u=(t=(t||"").match(Ve)||[""]).length;u--;)h=d=(f=Tt.exec(t[u])||[])[1],f=(f[2]||"").split(".").sort(),h&&(c=k.event.special[h]||{},h=(i?c.delegateType:c.bindType)||h,c=k.event.special[h]||{},d=k.extend({type:h,origType:d,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&k.expr.match.needsContext.test(i),namespace:f.join(".")},o),(l=s[h])||((l=s[h]=[]).delegateCount=0,c.setup&&!1!==c.setup.call(e,r,f,a)||e.addEventListener&&e.addEventListener(h,a)),c.add&&(c.add.call(e,d),d.handler.guid||(d.handler.guid=n.guid)),i?l.splice(l.delegateCount++,0,d):l.push(d),k.event.global[h]=!0)},remove:function(e,t,n,r,i){var o,a,s,u,c,l,h,f,d,p,m,g=ot.hasData(e)&&ot.get(e);if(g&&(u=g.events)){for(c=(t=(t||"").match(Ve)||[""]).length;c--;)if(d=m=(s=Tt.exec(t[c])||[])[1],p=(s[2]||"").split(".").sort(),d){for(h=k.event.special[d]||{},f=u[d=(r?h.delegateType:h.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=f.length;o--;)l=f[o],!i&&m!==l.origType||n&&n.guid!==l.guid||s&&!s.test(l.namespace)||r&&r!==l.selector&&("**"!==r||!l.selector)||(f.splice(o,1),l.selector&&f.delegateCount--,h.remove&&h.remove.call(e,l));a&&!f.length&&(h.teardown&&!1!==h.teardown.call(e,p,g.handle)||k.removeEvent(e,d,g.handle),delete u[d])}else for(d in u)k.event.remove(e,d+t[c],n,r,!0);k.isEmptyObject(u)&&ot.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a=new Array(arguments.length),s=k.event.fix(e),u=(e=(ot.get(this,"events")||Object.create(null))[s.type]||[],k.event.special[s.type]||{});for(a[0]=s,t=1;t<arguments.length;t++)a[t]=arguments[t];if(s.delegateTarget=this,!u.preDispatch||!1!==u.preDispatch.call(this,s)){for(o=k.event.handlers.call(this,s,e),t=0;(r=o[t++])&&!s.isPropagationStopped();)for(s.currentTarget=r.elem,n=0;(i=r.handlers[n++])&&!s.isImmediatePropagationStopped();)s.rnamespace&&!1!==i.namespace&&!s.rnamespace.test(i.namespace)||(s.handleObj=i,s.data=i.data,void 0!==(i=((k.event.special[i.origType]||{}).handle||i.handler).apply(r.elem,a))&&!1===(s.result=i)&&(s.preventDefault(),s.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,s),s.result}},handlers:function(e,t){var n,r,i,o,a,s=[],u=t.delegateCount,c=e.target;if(u&&c.nodeType&&!("click"===e.type&&1<=e.button))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==e.type||!0!==c.disabled)){for(o=[],a={},n=0;n<u;n++)void 0===a[i=(r=t[n]).selector+" "]&&(a[i]=r.needsContext?-1<k(i,this).index(c):k.find(i,this,null,[c]).length),a[i]&&o.push(r);o.length&&s.push({elem:c,handlers:o})}return c=this,u<t.length&&s.push({elem:c,handlers:t.slice(u)}),s},addProp:function(e,t){Object.defineProperty(k.Event.prototype,e,{enumerable:!0,configurable:!0,get:o(t)?function(){if(this.originalEvent)return t(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[e]},set:function(t){Object.defineProperty(this,e,{enumerable:!0,configurable:!0,writable:!0,value:t})}})},fix:function(e){return e[k.expando]?e:new k.Event(e)},special:{load:{noBubble:!0},click:{setup:function(e){return e=this||e,yt.test(e.type)&&e.click&&S(e,"input")&&Mt(e,"click",!0),!1},trigger:function(e){return e=this||e,yt.test(e.type)&&e.click&&S(e,"input")&&Mt(e,"click"),!0},_default:function(e){return e=e.target,yt.test(e.type)&&e.click&&S(e,"input")&&ot.get(e,"click")||S(e,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},k.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},k.Event=function(e,t){if(!(this instanceof k.Event))return new k.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?Dt:Bt,this.target=e.target&&3===e.target.nodeType?e.target.parentNode:e.target,this.currentTarget=e.currentTarget,this.relatedTarget=e.relatedTarget):this.type=e,t&&k.extend(this,t),this.timeStamp=e&&e.timeStamp||Date.now(),this[k.expando]=!0},k.Event.prototype={constructor:k.Event,isDefaultPrevented:Bt,isPropagationStopped:Bt,isImmediatePropagationStopped:Bt,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=Dt,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=Dt,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=Dt,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},k.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},k.event.addProp),k.each({focus:"focusin",blur:"focusout"},(function(e,t){function n(e){var n,r;b.documentMode?(n=ot.get(this,"handle"),(r=k.event.fix(e)).type="focusin"===e.type?"focus":"blur",r.isSimulated=!0,n(e),r.target===r.currentTarget&&n(r)):k.event.simulate(t,e.target,k.event.fix(e))}k.event.special[e]={setup:function(){var r;if(Mt(this,e,!0),!b.documentMode)return!1;(r=ot.get(this,t))||this.addEventListener(t,n),ot.set(this,t,(r||0)+1)},trigger:function(){return Mt(this,e),!0},teardown:function(){var e;if(!b.documentMode)return!1;(e=ot.get(this,t)-1)?ot.set(this,t,e):(this.removeEventListener(t,n),ot.remove(this,t))},_default:function(t){return ot.get(t.target,e)},delegateType:t},k.event.special[t]={setup:function(){var r=this.ownerDocument||this.document||this,i=b.documentMode?this:r,o=ot.get(i,t);o||(b.documentMode?this.addEventListener(t,n):r.addEventListener(e,n,!0)),ot.set(i,t,(o||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,i=b.documentMode?this:r,o=ot.get(i,t)-1;o?ot.set(i,t,o):(b.documentMode?this.removeEventListener(t,n):r.removeEventListener(e,n,!0),ot.remove(i,t))}}})),k.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(e,t){k.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=e.relatedTarget,i=e.handleObj;return r&&(r===this||k.contains(this,r))||(e.type=i.origType,n=i.handler.apply(this,arguments),e.type=t),n}}})),k.fn.extend({on:function(e,t,n,r){return It(this,e,t,n,r)},one:function(e,t,n,r){return It(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)r=e.handleObj,k(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler);else{if("object"!=typeof e)return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=Bt),this.each((function(){k.event.remove(this,e,n,t)}));for(i in e)this.off(i,t,e[i])}return this}});var jt=/<script|<style|<link/i,Nt=/checked\s*(?:[^=]|=\s*.checked.)/i,Ft=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function Rt(e,t){return S(e,"table")&&S(11!==t.nodeType?t:t.firstChild,"tr")&&k(e).children("tbody")[0]||e}function Pt(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Lt(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Ut(e,t){var n,r,i,o;if(1===t.nodeType){if(ot.hasData(e)&&(o=ot.get(e).events))for(i in ot.remove(t,"handle events"),o)for(n=0,r=o[i].length;n<r;n++)k.event.add(t,i,o[i][n]);at.hasData(e)&&(e=at.access(e),e=k.extend({},e),at.set(t,e))}}function zt(e,t,n,r){t=l(t);var i,a,s,u,c,h,f=0,d=e.length,p=d-1,m=t[0],g=o(m);if(g||1<d&&"string"==typeof m&&!v.checkClone&&Nt.test(m))return e.each((function(i){var o=e.eq(i);g&&(t[0]=m.call(this,i,o.html())),zt(o,t,n,r)}));if(d&&(a=(i=Ot(t,e[0].ownerDocument,!1,e,r)).firstChild,1===i.childNodes.length&&(i=a),a||r)){for(u=(s=k.map(Et(i,"script"),Pt)).length;f<d;f++)c=i,f!==p&&(c=k.clone(c,!0,!0),u&&k.merge(s,Et(c,"script"))),n.call(e[f],c,f);if(u)for(h=s[s.length-1].ownerDocument,k.map(s,Lt),f=0;f<u;f++)c=s[f],xt.test(c.type||"")&&!ot.access(c,"globalEval")&&k.contains(h,c)&&(c.src&&"module"!==(c.type||"").toLowerCase()?k._evalUrl&&!c.noModule&&k._evalUrl(c.src,{nonce:c.nonce||c.getAttribute("nonce")},h):w(c.textContent.replace(Ft,""),c,h))}return e}function Ht(e,t,n){for(var r,i=t?k.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||k.cleanData(Et(r)),r.parentNode&&(n&&mt(r)&&St(Et(r,"script")),r.parentNode.removeChild(r));return e}function $t(e){var t=e.ownerDocument.defaultView;return(t=t&&t.opener?t:r).getComputedStyle(e)}function Qt(e,t,n){var r,i={};for(r in t)i[r]=e.style[r],e.style[r]=t[r];for(r in n=n.call(e),t)e.style[r]=i[r];return n}k.extend({htmlPrefilter:function(e){return e},clone:function(e,t,n){var r,i,o,a,s,u,c,l=e.cloneNode(!0),h=mt(e);if(!(v.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||k.isXMLDoc(e)))for(a=Et(l),r=0,i=(o=Et(e)).length;r<i;r++)s=o[r],void 0,"input"===(c=(u=a[r]).nodeName.toLowerCase())&&yt.test(s.type)?u.checked=s.checked:"input"!==c&&"textarea"!==c||(u.defaultValue=s.defaultValue);if(t)if(n)for(o=o||Et(e),a=a||Et(l),r=0,i=o.length;r<i;r++)Ut(o[r],a[r]);else Ut(e,l);return 0<(a=Et(l,"script")).length&&St(a,!h&&Et(e,"script")),l},cleanData:function(e){for(var t,n,r,i=k.event.special,o=0;void 0!==(n=e[o]);o++)if(rt(n)){if(t=n[ot.expando]){if(t.events)for(r in t.events)i[r]?k.event.remove(n,r):k.removeEvent(n,r,t.handle);n[ot.expando]=void 0}n[at.expando]&&(n[at.expando]=void 0)}}}),k.fn.extend({detach:function(e){return Ht(this,e,!0)},remove:function(e){return Ht(this,e)},text:function(e){return Je(this,(function(e){return void 0===e?k.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)}))}),null,e,arguments.length)},append:function(){return zt(this,arguments,(function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Rt(this,e).appendChild(e)}))},prepend:function(){return zt(this,arguments,(function(e){var t;1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(t=Rt(this,e)).insertBefore(e,t.firstChild)}))},before:function(){return zt(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this)}))},after:function(){return zt(this,arguments,(function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)}))},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(k.cleanData(Et(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map((function(){return k.clone(this,e,t)}))},html:function(e){return Je(this,(function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!jt.test(e)&&!kt[(wt.exec(e)||["",""])[1].toLowerCase()]){e=k.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(k.cleanData(Et(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)}),null,e,arguments.length)},replaceWith:function(){var e=[];return zt(this,arguments,(function(t){var n=this.parentNode;k.inArray(this,e)<0&&(k.cleanData(Et(this)),n&&n.replaceChild(t,this))}),e)}}),k.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(e,t){k.fn[e]=function(e){for(var n,r=[],i=k(e),o=i.length-1,a=0;a<=o;a++)n=a===o?this:this.clone(!0),k(i[a])[t](n),h.apply(r,n.get());return this.pushStack(r)}}));var Vt,qt,Gt,Wt,Kt,Yt,Xt,Jt,Zt=new RegExp("^("+ht+")(?!px)[a-z%]+$","i"),en=/^--/,tn=new RegExp(dt.join("|"),"i");function nn(e,t,n){var r,i=en.test(t),o=e.style;return(n=n||$t(e))&&(r=n.getPropertyValue(t)||n[t],""!==(r=i&&r?r.replace(B,"$1")||void 0:r)||mt(e)||(r=k.style(e,t)),!v.pixelBoxStyles()&&Zt.test(r)&&tn.test(t)&&(i=o.width,e=o.minWidth,t=o.maxWidth,o.minWidth=o.maxWidth=o.width=r,r=n.width,o.width=i,o.minWidth=e,o.maxWidth=t)),void 0!==r?r+"":r}function rn(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}function on(){var e;Jt&&(Xt.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",Jt.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",pt.appendChild(Xt).appendChild(Jt),e=r.getComputedStyle(Jt),Vt="1%"!==e.top,Yt=12===an(e.marginLeft),Jt.style.right="60%",Wt=36===an(e.right),qt=36===an(e.width),Jt.style.position="absolute",Gt=12===an(Jt.offsetWidth/3),pt.removeChild(Xt),Jt=null)}function an(e){return Math.round(parseFloat(e))}Xt=b.createElement("div"),(Jt=b.createElement("div")).style&&(Jt.style.backgroundClip="content-box",Jt.cloneNode(!0).style.backgroundClip="",v.clearCloneStyle="content-box"===Jt.style.backgroundClip,k.extend(v,{boxSizingReliable:function(){return on(),qt},pixelBoxStyles:function(){return on(),Wt},pixelPosition:function(){return on(),Vt},reliableMarginLeft:function(){return on(),Yt},scrollboxSize:function(){return on(),Gt},reliableTrDimensions:function(){var e,t,n;return null==Kt&&(e=b.createElement("table"),t=b.createElement("tr"),n=b.createElement("div"),e.style.cssText="position:absolute;left:-11111px;border-collapse:separate",t.style.cssText="box-sizing:content-box;border:1px solid",t.style.height="1px",n.style.height="9px",n.style.display="block",pt.appendChild(e).appendChild(t).appendChild(n),n=r.getComputedStyle(t),Kt=parseInt(n.height,10)+parseInt(n.borderTopWidth,10)+parseInt(n.borderBottomWidth,10)===t.offsetHeight,pt.removeChild(e)),Kt}}));var sn=["Webkit","Moz","ms"],un=b.createElement("div").style,cn={};function ln(e){return k.cssProps[e]||cn[e]||(e in un?e:cn[e]=function(e){for(var t=e[0].toUpperCase()+e.slice(1),n=sn.length;n--;)if((e=sn[n]+t)in un)return e}(e)||e)}var hn=/^(none|table(?!-c[ea]).+)/,fn={position:"absolute",visibility:"hidden",display:"block"},dn={letterSpacing:"0",fontWeight:"400"};function pn(e,t,n){var r=ft.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function mn(e,t,n,r,i,o){var a="width"===t?1:0,s=0,u=0,c=0;if(n===(r?"border":"content"))return 0;for(;a<4;a+=2)"margin"===n&&(c+=k.css(e,n+dt[a],!0,i)),r?("content"===n&&(u-=k.css(e,"padding"+dt[a],!0,i)),"margin"!==n&&(u-=k.css(e,"border"+dt[a]+"Width",!0,i))):(u+=k.css(e,"padding"+dt[a],!0,i),"padding"!==n?u+=k.css(e,"border"+dt[a]+"Width",!0,i):s+=k.css(e,"border"+dt[a]+"Width",!0,i));return!r&&0<=o&&(u+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-o-u-s-.5))||0),u+c}function gn(e,t,n){var r=$t(e),i=(!v.boxSizingReliable()||n)&&"border-box"===k.css(e,"boxSizing",!1,r),o=i,a=nn(e,t,r),s="offset"+t[0].toUpperCase()+t.slice(1);if(Zt.test(a)){if(!n)return a;a="auto"}return(!v.boxSizingReliable()&&i||!v.reliableTrDimensions()&&S(e,"tr")||"auto"===a||!parseFloat(a)&&"inline"===k.css(e,"display",!1,r))&&e.getClientRects().length&&(i="border-box"===k.css(e,"boxSizing",!1,r),(o=s in e)&&(a=e[s])),(a=parseFloat(a)||0)+mn(e,t,n||(i?"border":"content"),o,r,a)+"px"}function An(e,t,n,r,i){return new An.prototype.init(e,t,n,r,i)}k.extend({cssHooks:{opacity:{get:function(e,t){if(t)return""===(t=nn(e,"opacity"))?"1":t}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,a,s=nt(t),u=en.test(t),c=e.style;if(u||(t=ln(s)),a=k.cssHooks[t]||k.cssHooks[s],void 0===n)return a&&"get"in a&&void 0!==(i=a.get(e,!1,r))?i:c[t];"string"==(o=typeof n)&&(i=ft.exec(n))&&i[1]&&(n=At(e,t,i),o="number"),null!=n&&n==n&&("number"!==o||u||(n+=i&&i[3]||(k.cssNumber[s]?"":"px")),v.clearCloneStyle||""!==n||0!==t.indexOf("background")||(c[t]="inherit"),a&&"set"in a&&void 0===(n=a.set(e,n,r))||(u?c.setProperty(t,n):c[t]=n))}},css:function(e,t,n,r){var i,o=nt(t);return en.test(t)||(t=ln(o)),"normal"===(i=void 0===(i=(o=k.cssHooks[t]||k.cssHooks[o])&&"get"in o?o.get(e,!0,n):i)?nn(e,t,r):i)&&t in dn&&(i=dn[t]),(""===n||n)&&(o=parseFloat(i),!0===n||isFinite(o))?o||0:i}}),k.each(["height","width"],(function(e,t){k.cssHooks[t]={get:function(e,n,r){if(n)return!hn.test(k.css(e,"display"))||e.getClientRects().length&&e.getBoundingClientRect().width?gn(e,t,r):Qt(e,fn,(function(){return gn(e,t,r)}))},set:function(e,n,r){var i=$t(e),o=!v.scrollboxSize()&&"absolute"===i.position,a=(o||r)&&"border-box"===k.css(e,"boxSizing",!1,i);r=r?mn(e,t,r,a,i):0;return a&&o&&(r-=Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-parseFloat(i[t])-mn(e,t,"border",!1,i)-.5)),r&&(a=ft.exec(n))&&"px"!==(a[3]||"px")&&(e.style[t]=n,n=k.css(e,t)),pn(0,n,r)}}})),k.cssHooks.marginLeft=rn(v.reliableMarginLeft,(function(e,t){if(t)return(parseFloat(nn(e,"marginLeft"))||e.getBoundingClientRect().left-Qt(e,{marginLeft:0},(function(){return e.getBoundingClientRect().left})))+"px"})),k.each({margin:"",padding:"",border:"Width"},(function(e,t){k.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[e+dt[r]+t]=o[r]||o[r-2]||o[0];return i}},"margin"!==e&&(k.cssHooks[e+t].set=pn)})),k.fn.extend({css:function(e,t){return Je(this,(function(e,t,n){var r,i,o={},a=0;if(Array.isArray(t)){for(r=$t(e),i=t.length;a<i;a++)o[t[a]]=k.css(e,t[a],!1,r);return o}return void 0!==n?k.style(e,t,n):k.css(e,t)}),e,t,1<arguments.length)}}),((k.Tween=An).prototype={constructor:An,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||k.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(k.cssNumber[n]?"":"px")},cur:function(){var e=An.propHooks[this.prop];return(e&&e.get?e:An.propHooks._default).get(this)},run:function(e){var t,n=An.propHooks[this.prop];return this.options.duration?this.pos=t=k.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),(n&&n.set?n:An.propHooks._default).set(this),this}}).init.prototype=An.prototype,(An.propHooks={_default:{get:function(e){return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(e=k.css(e.elem,e.prop,""))&&"auto"!==e?e:0},set:function(e){k.fx.step[e.prop]?k.fx.step[e.prop](e):1!==e.elem.nodeType||!k.cssHooks[e.prop]&&null==e.elem.style[ln(e.prop)]?e.elem[e.prop]=e.now:k.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=An.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},k.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},k.fx=An.prototype.init,k.fx.step={};var vn,bn,yn=/^(?:toggle|show|hide)$/,wn=/queueHooks$/;function xn(){bn&&(!1===b.hidden&&r.requestAnimationFrame?r.requestAnimationFrame(xn):r.setTimeout(xn,k.fx.interval),k.fx.tick())}function Cn(){return r.setTimeout((function(){vn=void 0})),vn=Date.now()}function kn(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=dt[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function En(e,t,n){for(var r,i=(Sn.tweeners[t]||[]).concat(Sn.tweeners["*"]),o=0,a=i.length;o<a;o++)if(r=i[o].call(n,t,e))return r}function Sn(e,t,n){var r,i,a,s,u,c,l,h=0,f=Sn.prefilters.length,d=k.Deferred().always((function(){delete p.elem})),p=function(){if(i)return!1;for(var t=vn||Cn(),n=1-((t=Math.max(0,m.startTime+m.duration-t))/m.duration||0),r=0,o=m.tweens.length;r<o;r++)m.tweens[r].run(n);return d.notifyWith(e,[m,n,t]),n<1&&o?t:(o||d.notifyWith(e,[m,1,0]),d.resolveWith(e,[m]),!1)},m=d.promise({elem:e,props:k.extend({},t),opts:k.extend(!0,{specialEasing:{},easing:k.easing._default},n),originalProperties:t,originalOptions:n,startTime:vn||Cn(),duration:n.duration,tweens:[],createTween:function(t,n){return n=k.Tween(e,m.opts,t,n,m.opts.specialEasing[t]||m.opts.easing),m.tweens.push(n),n},stop:function(t){var n=0,r=t?m.tweens.length:0;if(!i){for(i=!0;n<r;n++)m.tweens[n].run(1);t?(d.notifyWith(e,[m,1,0]),d.resolveWith(e,[m,t])):d.rejectWith(e,[m,t])}return this}}),g=m.props,A=g,v=m.opts.specialEasing;for(a in A)if(u=v[s=nt(a)],c=A[a],Array.isArray(c)&&(u=c[1],c=A[a]=c[0]),a!==s&&(A[s]=c,delete A[a]),(l=k.cssHooks[s])&&"expand"in l)for(a in c=l.expand(c),delete A[s],c)a in A||(A[a]=c[a],v[a]=u);else v[s]=u;for(;h<f;h++)if(r=Sn.prefilters[h].call(m,e,g,m.opts))return o(r.stop)&&(k._queueHooks(m.elem,m.opts.queue).stop=r.stop.bind(r)),r;return k.map(g,En,m),o(m.opts.start)&&m.opts.start.call(e,m),m.progress(m.opts.progress).done(m.opts.done,m.opts.complete).fail(m.opts.fail).always(m.opts.always),k.fx.timer(k.extend(p,{elem:e,anim:m,queue:m.opts.queue})),m}k.Animation=k.extend(Sn,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return At(n.elem,e,ft.exec(t),n),n}]},tweener:function(e,t){for(var n,r=0,i=(e=o(e)?(t=e,["*"]):e.match(Ve)).length;r<i;r++)n=e[r],Sn.tweeners[n]=Sn.tweeners[n]||[],Sn.tweeners[n].unshift(t)},prefilters:[function(e,t,n){var r,i,o,a,s,u,c,l="width"in t||"height"in t,h=this,f={},d=e.style,p=e.nodeType&&lt(e),m=ot.get(e,"fxshow");for(r in n.queue||(null==(a=k._queueHooks(e,"fx")).unqueued&&(a.unqueued=0,s=a.empty.fire,a.empty.fire=function(){a.unqueued||s()}),a.unqueued++,h.always((function(){h.always((function(){a.unqueued--,k.queue(e,"fx").length||a.empty.fire()}))}))),t)if(i=t[r],yn.test(i)){if(delete t[r],o=o||"toggle"===i,i===(p?"hide":"show")){if("show"!==i||!m||void 0===m[r])continue;p=!0}f[r]=m&&m[r]||k.style(e,r)}if((u=!k.isEmptyObject(t))||!k.isEmptyObject(f))for(r in l&&1===e.nodeType&&(n.overflow=[d.overflow,d.overflowX,d.overflowY],null==(c=m&&m.display)&&(c=ot.get(e,"display")),"none"===(l=k.css(e,"display"))&&(c?l=c:(bt([e],!0),c=e.style.display||c,l=k.css(e,"display"),bt([e]))),("inline"===l||"inline-block"===l&&null!=c)&&"none"===k.css(e,"float")&&(u||(h.done((function(){d.display=c})),null==c&&(l=d.display,c="none"===l?"":l)),d.display="inline-block")),n.overflow&&(d.overflow="hidden",h.always((function(){d.overflow=n.overflow[0],d.overflowX=n.overflow[1],d.overflowY=n.overflow[2]}))),u=!1,f)u||(m?"hidden"in m&&(p=m.hidden):m=ot.access(e,"fxshow",{display:c}),o&&(m.hidden=!p),p&&bt([e],!0),h.done((function(){for(r in p||bt([e]),ot.remove(e,"fxshow"),f)k.style(e,r,f[r])}))),u=En(p?m[r]:0,r,h),r in m||(m[r]=u.start,p&&(u.end=u.start,u.start=0))}],prefilter:function(e,t){t?Sn.prefilters.unshift(e):Sn.prefilters.push(e)}}),k.speed=function(e,t,n){var r=e&&"object"==typeof e?k.extend({},e):{complete:n||!n&&t||o(e)&&e,duration:e,easing:n&&t||t&&!o(t)&&t};return k.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in k.fx.speeds?r.duration=k.fx.speeds[r.duration]:r.duration=k.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){o(r.old)&&r.old.call(this),r.queue&&k.dequeue(this,r.queue)},r},k.fn.extend({fadeTo:function(e,t,n,r){return this.filter(lt).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){function i(){var t=Sn(this,k.extend({},e),a);(o||ot.get(this,"finish"))&&t.stop(!0)}var o=k.isEmptyObject(e),a=k.speed(t,n,r);return i.finish=i,o||!1===a.queue?this.each(i):this.queue(a.queue,i)},stop:function(e,t,n){function r(e){var t=e.stop;delete e.stop,t(n)}return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&this.queue(e||"fx",[]),this.each((function(){var t=!0,i=null!=e&&e+"queueHooks",o=k.timers,a=ot.get(this);if(i)a[i]&&a[i].stop&&r(a[i]);else for(i in a)a[i]&&a[i].stop&&wn.test(i)&&r(a[i]);for(i=o.length;i--;)o[i].elem!==this||null!=e&&o[i].queue!==e||(o[i].anim.stop(n),t=!1,o.splice(i,1));!t&&n||k.dequeue(this,e)}))},finish:function(e){return!1!==e&&(e=e||"fx"),this.each((function(){var t,n=ot.get(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=k.timers,a=r?r.length:0;for(n.finish=!0,k.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;t<a;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish}))}}),k.each(["toggle","show","hide"],(function(e,t){var n=k.fn[t];k.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(kn(t,!0),e,r,i)}})),k.each({slideDown:kn("show"),slideUp:kn("hide"),slideToggle:kn("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(e,t){k.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}})),k.timers=[],k.fx.tick=function(){var e,t=0,n=k.timers;for(vn=Date.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||k.fx.stop(),vn=void 0},k.fx.timer=function(e){k.timers.push(e),k.fx.start()},k.fx.interval=13,k.fx.start=function(){bn||(bn=!0,xn())},k.fx.stop=function(){bn=null},k.fx.speeds={slow:600,fast:200,_default:400},k.fn.delay=function(e,t){return e=k.fx&&k.fx.speeds[e]||e,this.queue(t=t||"fx",(function(t,n){var i=r.setTimeout(t,e);n.stop=function(){r.clearTimeout(i)}}))},ne=b.createElement("input"),Ct=b.createElement("select").appendChild(b.createElement("option")),ne.type="checkbox",v.checkOn=""!==ne.value,v.optSelected=Ct.selected,(ne=b.createElement("input")).value="t",ne.type="radio",v.radioValue="t"===ne.value;var _n,On=k.expr.attrHandle,Tn=(k.fn.extend({attr:function(e,t){return Je(this,k.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each((function(){k.removeAttr(this,e)}))}}),k.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?k.prop(e,t,n):(1===o&&k.isXMLDoc(e)||(i=k.attrHooks[t.toLowerCase()]||(k.expr.match.bool.test(t)?_n:void 0)),void 0!==n?null===n?void k.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))||null!=(r=k.find.attr(e,t))?r:void 0)},attrHooks:{type:{set:function(e,t){var n;if(!v.radioValue&&"radio"===t&&S(e,"input"))return n=e.value,e.setAttribute("type",t),n&&(e.value=n),t}}},removeAttr:function(e,t){var n,r=0,i=t&&t.match(Ve);if(i&&1===e.nodeType)for(;n=i[r++];)e.removeAttribute(n)}}),_n={set:function(e,t,n){return!1===t?k.removeAttr(e,n):e.setAttribute(n,n),n}},k.each(k.expr.match.bool.source.match(/\w+/g),(function(e,t){var n=On[t]||k.find.attr;On[t]=function(e,t,r){var i,o,a=t.toLowerCase();return r||(o=On[a],On[a]=i,i=null!=n(e,t,r)?a:null,On[a]=o),i}})),/^(?:input|select|textarea|button)$/i),Dn=/^(?:a|area)$/i;function Bn(e){return(e.match(Ve)||[]).join(" ")}function In(e){return e.getAttribute&&e.getAttribute("class")||""}function Mn(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(Ve)||[]}function jn(e){e.stopPropagation()}k.fn.extend({prop:function(e,t){return Je(this,k.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each((function(){delete this[k.propFix[e]||e]}))}}),k.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&k.isXMLDoc(e)||(t=k.propFix[t]||t,i=k.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=k.find.attr(e,"tabindex");return t?parseInt(t,10):Tn.test(e.nodeName)||Dn.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),v.optSelected||(k.propHooks.selected={get:function(e){return(e=e.parentNode)&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(e){(e=e.parentNode)&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),k.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){k.propFix[this.toLowerCase()]=this})),k.fn.extend({addClass:function(e){var t,n,r,i,a,s;return o(e)?this.each((function(t){k(this).addClass(e.call(this,t,In(this)))})):(t=Mn(e)).length?this.each((function(){if(r=In(this),n=1===this.nodeType&&" "+Bn(r)+" "){for(a=0;a<t.length;a++)i=t[a],n.indexOf(" "+i+" ")<0&&(n+=i+" ");s=Bn(n),r!==s&&this.setAttribute("class",s)}})):this},removeClass:function(e){var t,n,r,i,a,s;return o(e)?this.each((function(t){k(this).removeClass(e.call(this,t,In(this)))})):arguments.length?(t=Mn(e)).length?this.each((function(){if(r=In(this),n=1===this.nodeType&&" "+Bn(r)+" "){for(a=0;a<t.length;a++)for(i=t[a];-1<n.indexOf(" "+i+" ");)n=n.replace(" "+i+" "," ");s=Bn(n),r!==s&&this.setAttribute("class",s)}})):this:this.attr("class","")},toggleClass:function(e,t){var n,r,i,a,s=typeof e,u="string"==s||Array.isArray(e);return o(e)?this.each((function(n){k(this).toggleClass(e.call(this,n,In(this),t),t)})):"boolean"==typeof t&&u?t?this.addClass(e):this.removeClass(e):(n=Mn(e),this.each((function(){if(u)for(a=k(this),i=0;i<n.length;i++)r=n[i],a.hasClass(r)?a.removeClass(r):a.addClass(r);else void 0!==e&&"boolean"!=s||((r=In(this))&&ot.set(this,"__className__",r),this.setAttribute&&this.setAttribute("class",!r&&!1!==e&&ot.get(this,"__className__")||""))})))},hasClass:function(e){for(var t,n=0,r=" "+e+" ";t=this[n++];)if(1===t.nodeType&&-1<(" "+Bn(In(t))+" ").indexOf(r))return!0;return!1}});var Nn=/\r/g,Fn=(k.fn.extend({val:function(e){var t,n,r,i=this[0];return arguments.length?(r=o(e),this.each((function(n){1===this.nodeType&&(null==(n=r?e.call(this,n,k(this).val()):e)?n="":"number"==typeof n?n+="":Array.isArray(n)&&(n=k.map(n,(function(e){return null==e?"":e+""}))),(t=k.valHooks[this.type]||k.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,n,"value")||(this.value=n))}))):i?(t=k.valHooks[i.type]||k.valHooks[i.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(Nn,""):null==n?"":n:void 0}}),k.extend({valHooks:{option:{get:function(e){var t=k.find.attr(e,"value");return null!=t?t:Bn(k.text(e))}},select:{get:function(e){for(var t,n=e.options,r=e.selectedIndex,i="select-one"===e.type,o=i?null:[],a=i?r+1:n.length,s=r<0?a:i?r:0;s<a;s++)if(((t=n[s]).selected||s===r)&&!t.disabled&&(!t.parentNode.disabled||!S(t.parentNode,"optgroup"))){if(t=k(t).val(),i)return t;o.push(t)}return o},set:function(e,t){for(var n,r,i=e.options,o=k.makeArray(t),a=i.length;a--;)((r=i[a]).selected=-1<k.inArray(k.valHooks.option.get(r),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),k.each(["radio","checkbox"],(function(){k.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=-1<k.inArray(k(e).val(),t)}},v.checkOn||(k.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})})),r.location),Rn={guid:Date.now()},Pn=/\?/,Ln=(k.parseXML=function(e){var t,n;if(!e||"string"!=typeof e)return null;try{t=(new r.DOMParser).parseFromString(e,"text/xml")}catch(e){}return n=t&&t.getElementsByTagName("parsererror")[0],t&&!n||k.error("Invalid XML: "+(n?k.map(n.childNodes,(function(e){return e.textContent})).join("\n"):e)),t},/^(?:focusinfocus|focusoutblur)$/),Un=(k.extend(k.event,{trigger:function(e,t,n,i){var s,u,c,l,h,f,d,p=[n||b],g=m.call(e,"type")?e.type:e,A=m.call(e,"namespace")?e.namespace.split("."):[],v=d=u=n=n||b;if(3!==n.nodeType&&8!==n.nodeType&&!Ln.test(g+k.event.triggered)&&(-1<g.indexOf(".")&&(g=(A=g.split(".")).shift(),A.sort()),l=g.indexOf(":")<0&&"on"+g,(e=e[k.expando]?e:new k.Event(g,"object"==typeof e&&e)).isTrigger=i?2:3,e.namespace=A.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+A.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:k.makeArray(t,[e]),f=k.event.special[g]||{},i||!f.trigger||!1!==f.trigger.apply(n,t))){if(!i&&!f.noBubble&&!a(n)){for(c=f.delegateType||g,Ln.test(c+g)||(v=v.parentNode);v;v=v.parentNode)p.push(v),u=v;u===(n.ownerDocument||b)&&p.push(u.defaultView||u.parentWindow||r)}for(s=0;(v=p[s++])&&!e.isPropagationStopped();)d=v,e.type=1<s?c:f.bindType||g,(h=(ot.get(v,"events")||Object.create(null))[e.type]&&ot.get(v,"handle"))&&h.apply(v,t),(h=l&&v[l])&&h.apply&&rt(v)&&(e.result=h.apply(v,t),!1===e.result&&e.preventDefault());return e.type=g,i||e.isDefaultPrevented()||f._default&&!1!==f._default.apply(p.pop(),t)||!rt(n)||l&&o(n[g])&&!a(n)&&((u=n[l])&&(n[l]=null),k.event.triggered=g,e.isPropagationStopped()&&d.addEventListener(g,jn),n[g](),e.isPropagationStopped()&&d.removeEventListener(g,jn),k.event.triggered=void 0,u&&(n[l]=u)),e.result}},simulate:function(e,t,n){n=k.extend(new k.Event,n,{type:e,isSimulated:!0}),k.event.trigger(n,null,t)}}),k.fn.extend({trigger:function(e,t){return this.each((function(){k.event.trigger(e,t,this)}))},triggerHandler:function(e,t){var n=this[0];if(n)return k.event.trigger(e,t,n,!0)}}),/\[\]$/),zn=/\r?\n/g,Hn=/^(?:submit|button|image|reset|file)$/i,$n=/^(?:input|select|textarea|keygen)/i;k.param=function(e,t){function n(e,t){t=o(t)?t():t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(null==t?"":t)}var r,i=[];if(null==e)return"";if(Array.isArray(e)||e.jquery&&!k.isPlainObject(e))k.each(e,(function(){n(this.name,this.value)}));else for(r in e)!function e(t,n,r,i){if(Array.isArray(n))k.each(n,(function(n,o){r||Un.test(t)?i(t,o):e(t+"["+("object"==typeof o&&null!=o?n:"")+"]",o,r,i)}));else if(r||"object"!==x(n))i(t,n);else for(var o in n)e(t+"["+o+"]",n[o],r,i)}(r,e[r],t,n);return i.join("&")},k.fn.extend({serialize:function(){return k.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var e=k.prop(this,"elements");return e?k.makeArray(e):this})).filter((function(){var e=this.type;return this.name&&!k(this).is(":disabled")&&$n.test(this.nodeName)&&!Hn.test(e)&&(this.checked||!yt.test(e))})).map((function(e,t){var n=k(this).val();return null==n?null:Array.isArray(n)?k.map(n,(function(e){return{name:t.name,value:e.replace(zn,"\r\n")}})):{name:t.name,value:n.replace(zn,"\r\n")}})).get()}});var Qn=/%20/g,Vn=/#.*$/,qn=/([?&])_=[^&]*/,Gn=/^(.*?):[ \t]*([^\r\n]*)$/gm,Wn=/^(?:GET|HEAD)$/,Kn=/^\/\//,Yn={},Xn={},Jn="*/".concat("*"),Zn=b.createElement("a");function er(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,a=t.toLowerCase().match(Ve)||[];if(o(n))for(;r=a[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function tr(e,t,n,r){var i={},o=e===Xn;function a(s){var u;return i[s]=!0,k.each(e[s]||[],(function(e,s){return"string"!=typeof(s=s(t,n,r))||o||i[s]?o?!(u=s):void 0:(t.dataTypes.unshift(s),a(s),!1)})),u}return a(t.dataTypes[0])||!i["*"]&&a("*")}function nr(e,t){var n,r,i=k.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r=r||{})[n]=t[n]);return r&&k.extend(!0,e,r),e}Zn.href=Fn.href,k.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Fn.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Fn.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Jn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":k.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?nr(nr(e,k.ajaxSettings),t):nr(k.ajaxSettings,e)},ajaxPrefilter:er(Yn),ajaxTransport:er(Xn),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0);var n,i,o,a,s,u,c,l,h,f=k.ajaxSetup({},t=t||{}),d=f.context||f,p=f.context&&(d.nodeType||d.jquery)?k(d):k.event,m=k.Deferred(),g=k.Callbacks("once memory"),A=f.statusCode||{},v={},y={},w="canceled",x={readyState:0,getResponseHeader:function(e){var t;if(u){if(!a)for(a={};t=Gn.exec(o);)a[t[1].toLowerCase()+" "]=(a[t[1].toLowerCase()+" "]||[]).concat(t[2]);t=a[e.toLowerCase()+" "]}return null==t?null:t.join(", ")},getAllResponseHeaders:function(){return u?o:null},setRequestHeader:function(e,t){return null==u&&(e=y[e.toLowerCase()]=y[e.toLowerCase()]||e,v[e]=t),this},overrideMimeType:function(e){return null==u&&(f.mimeType=e),this},statusCode:function(e){if(e)if(u)x.always(e[x.status]);else for(var t in e)A[t]=[A[t],e[t]];return this},abort:function(e){return e=e||w,n&&n.abort(e),C(0,e),this}};if(m.promise(x),f.url=((e||f.url||Fn.href)+"").replace(Kn,Fn.protocol+"//"),f.type=t.method||t.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match(Ve)||[""],null==f.crossDomain){h=b.createElement("a");try{h.href=f.url,h.href=h.href,f.crossDomain=Zn.protocol+"//"+Zn.host!=h.protocol+"//"+h.host}catch(e){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=k.param(f.data,f.traditional)),tr(Yn,f,t,x),!u){for(l in(c=k.event&&f.global)&&0==k.active++&&k.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!Wn.test(f.type),i=f.url.replace(Vn,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(Qn,"+")):(h=f.url.slice(i.length),f.data&&(f.processData||"string"==typeof f.data)&&(i+=(Pn.test(i)?"&":"?")+f.data,delete f.data),!1===f.cache&&(i=i.replace(qn,"$1"),h=(Pn.test(i)?"&":"?")+"_="+Rn.guid+++h),f.url=i+h),f.ifModified&&(k.lastModified[i]&&x.setRequestHeader("If-Modified-Since",k.lastModified[i]),k.etag[i]&&x.setRequestHeader("If-None-Match",k.etag[i])),(f.data&&f.hasContent&&!1!==f.contentType||t.contentType)&&x.setRequestHeader("Content-Type",f.contentType),x.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Jn+"; q=0.01":""):f.accepts["*"]),f.headers)x.setRequestHeader(l,f.headers[l]);if(f.beforeSend&&(!1===f.beforeSend.call(d,x,f)||u))return x.abort();if(w="abort",g.add(f.complete),x.done(f.success),x.fail(f.error),n=tr(Xn,f,t,x)){if(x.readyState=1,c&&p.trigger("ajaxSend",[x,f]),u)return x;f.async&&0<f.timeout&&(s=r.setTimeout((function(){x.abort("timeout")}),f.timeout));try{u=!1,n.send(v,C)}catch(e){if(u)throw e;C(-1,e)}}else C(-1,"No Transport")}return x;function C(e,t,a,l){var h,v,b,y=t;u||(u=!0,s&&r.clearTimeout(s),n=void 0,o=l||"",x.readyState=0<e?4:0,l=200<=e&&e<300||304===e,a&&(b=function(e,t,n){for(var r,i,o,a,s=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}a=a||i}o=o||a}if(o)return o!==u[0]&&u.unshift(o),n[o]}(f,x,a)),!l&&-1<k.inArray("script",f.dataTypes)&&k.inArray("json",f.dataTypes)<0&&(f.converters["text script"]=function(){}),b=function(e,t,n,r){var i,o,a,s,u,c={},l=e.dataTypes.slice();if(l[1])for(a in e.converters)c[a.toLowerCase()]=e.converters[a];for(o=l.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=l.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(a=c[u+" "+o]||c["* "+o]))for(i in c)if((s=i.split(" "))[1]===o&&(a=c[u+" "+s[0]]||c["* "+s[0]])){!0===a?a=c[i]:!0!==c[i]&&(o=s[0],l.unshift(s[1]));break}if(!0!==a)if(a&&e.throws)t=a(t);else try{t=a(t)}catch(e){return{state:"parsererror",error:a?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(f,b,x,l),l?(f.ifModified&&((a=x.getResponseHeader("Last-Modified"))&&(k.lastModified[i]=a),(a=x.getResponseHeader("etag"))&&(k.etag[i]=a)),204===e||"HEAD"===f.type?y="nocontent":304===e?y="notmodified":(y=b.state,h=b.data,l=!(v=b.error))):(v=y,!e&&y||(y="error",e<0&&(e=0))),x.status=e,x.statusText=(t||y)+"",l?m.resolveWith(d,[h,y,x]):m.rejectWith(d,[x,y,v]),x.statusCode(A),A=void 0,c&&p.trigger(l?"ajaxSuccess":"ajaxError",[x,f,l?h:v]),g.fireWith(d,[x,y]),c&&(p.trigger("ajaxComplete",[x,f]),--k.active||k.event.trigger("ajaxStop")))}},getJSON:function(e,t,n){return k.get(e,t,n,"json")},getScript:function(e,t){return k.get(e,void 0,t,"script")}}),k.each(["get","post"],(function(e,t){k[t]=function(e,n,r,i){return o(n)&&(i=i||r,r=n,n=void 0),k.ajax(k.extend({url:e,type:t,dataType:i,data:n,success:r},k.isPlainObject(e)&&e))}})),k.ajaxPrefilter((function(e){for(var t in e.headers)"content-type"===t.toLowerCase()&&(e.contentType=e.headers[t]||"")})),k._evalUrl=function(e,t,n){return k.ajax({url:e,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(e){k.globalEval(e,t,n)}})},k.fn.extend({wrapAll:function(e){return this[0]&&(o(e)&&(e=e.call(this[0])),e=k(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){return o(e)?this.each((function(t){k(this).wrapInner(e.call(this,t))})):this.each((function(){var t=k(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)}))},wrap:function(e){var t=o(e);return this.each((function(n){k(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(e){return this.parent(e).not("body").each((function(){k(this).replaceWith(this.childNodes)})),this}}),k.expr.pseudos.hidden=function(e){return!k.expr.pseudos.visible(e)},k.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},k.ajaxSettings.xhr=function(){try{return new r.XMLHttpRequest}catch(e){}};var rr={0:200,1223:204},ir=k.ajaxSettings.xhr();v.cors=!!ir&&"withCredentials"in ir,v.ajax=ir=!!ir,k.ajaxTransport((function(e){var t,n;if(v.cors||ir&&!e.crossDomain)return{send:function(i,o){var a,s=e.xhr();if(s.open(e.type,e.url,e.async,e.username,e.password),e.xhrFields)for(a in e.xhrFields)s[a]=e.xhrFields[a];for(a in e.mimeType&&s.overrideMimeType&&s.overrideMimeType(e.mimeType),e.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)s.setRequestHeader(a,i[a]);t=function(e){return function(){t&&(t=n=s.onload=s.onerror=s.onabort=s.ontimeout=s.onreadystatechange=null,"abort"===e?s.abort():"error"===e?"number"!=typeof s.status?o(0,"error"):o(s.status,s.statusText):o(rr[s.status]||s.status,s.statusText,"text"!==(s.responseType||"text")||"string"!=typeof s.responseText?{binary:s.response}:{text:s.responseText},s.getAllResponseHeaders()))}},s.onload=t(),n=s.onerror=s.ontimeout=t("error"),void 0!==s.onabort?s.onabort=n:s.onreadystatechange=function(){4===s.readyState&&r.setTimeout((function(){t&&n()}))},t=t("abort");try{s.send(e.hasContent&&e.data||null)}catch(i){if(t)throw i}},abort:function(){t&&t()}}})),k.ajaxPrefilter((function(e){e.crossDomain&&(e.contents.script=!1)})),k.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return k.globalEval(e),e}}}),k.ajaxPrefilter("script",(function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")})),k.ajaxTransport("script",(function(e){var t,n;if(e.crossDomain||e.scriptAttrs)return{send:function(r,i){t=k("<script>").attr(e.scriptAttrs||{}).prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&i("error"===e.type?404:200,e.type)}),b.head.appendChild(t[0])},abort:function(){n&&n()}}}));var or=[],ar=/(=)\?(?=&|$)|\?\?/,sr=(k.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=or.pop()||k.expando+"_"+Rn.guid++;return this[e]=!0,e}}),k.ajaxPrefilter("json jsonp",(function(e,t,n){var i,a,s,u=!1!==e.jsonp&&(ar.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&ar.test(e.data)&&"data");if(u||"jsonp"===e.dataTypes[0])return i=e.jsonpCallback=o(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,u?e[u]=e[u].replace(ar,"$1"+i):!1!==e.jsonp&&(e.url+=(Pn.test(e.url)?"&":"?")+e.jsonp+"="+i),e.converters["script json"]=function(){return s||k.error(i+" was not called"),s[0]},e.dataTypes[0]="json",a=r[i],r[i]=function(){s=arguments},n.always((function(){void 0===a?k(r).removeProp(i):r[i]=a,e[i]&&(e.jsonpCallback=t.jsonpCallback,or.push(i)),s&&o(a)&&a(s[0]),s=a=void 0})),"script"})),v.createHTMLDocument=((ht=b.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===ht.childNodes.length),k.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(v.createHTMLDocument?((r=(t=b.implementation.createHTMLDocument("")).createElement("base")).href=b.location.href,t.head.appendChild(r)):t=b),r=!n&&[],(n=Pe.exec(e))?[t.createElement(n[1])]:(n=Ot([e],t,r),r&&r.length&&k(r).remove(),k.merge([],n.childNodes)));var r},k.fn.load=function(e,t,n){var r,i,a,s=this,u=e.indexOf(" ");return-1<u&&(r=Bn(e.slice(u)),e=e.slice(0,u)),o(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<s.length&&k.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done((function(e){a=arguments,s.html(r?k("<div>").append(k.parseHTML(e)).find(r):e)})).always(n&&function(e,t){s.each((function(){n.apply(this,a||[e.responseText,t,e])}))}),this},k.expr.pseudos.animated=function(e){return k.grep(k.timers,(function(t){return e===t.elem})).length},k.offset={setOffset:function(e,t,n){var r,i,a,s,u=k.css(e,"position"),c=k(e),l={};"static"===u&&(e.style.position="relative"),a=c.offset(),r=k.css(e,"top"),s=k.css(e,"left"),u=("absolute"===u||"fixed"===u)&&-1<(r+s).indexOf("auto")?(i=(u=c.position()).top,u.left):(i=parseFloat(r)||0,parseFloat(s)||0),null!=(t=o(t)?t.call(e,n,k.extend({},a)):t).top&&(l.top=t.top-a.top+i),null!=t.left&&(l.left=t.left-a.left+u),"using"in t?t.using.call(e,l):c.css(l)}},k.fn.extend({offset:function(e){var t,n;return arguments.length?void 0===e?this:this.each((function(t){k.offset.setOffset(this,e,t)})):(n=this[0])?n.getClientRects().length?(t=n.getBoundingClientRect(),n=n.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===k.css(r,"position"))t=r.getBoundingClientRect();else{for(t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;e&&(e===n.body||e===n.documentElement)&&"static"===k.css(e,"position");)e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=k(e).offset()).top+=k.css(e,"borderTopWidth",!0),i.left+=k.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-k.css(r,"marginTop",!0),left:t.left-i.left-k.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var e=this.offsetParent;e&&"static"===k.css(e,"position");)e=e.offsetParent;return e||pt}))}}),k.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(e,t){var n="pageYOffset"===t;k.fn[e]=function(r){return Je(this,(function(e,r,i){var o;if(a(e)?o=e:9===e.nodeType&&(o=e.defaultView),void 0===i)return o?o[t]:e[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):e[r]=i}),e,r,arguments.length)}})),k.each(["top","left"],(function(e,t){k.cssHooks[t]=rn(v.pixelPosition,(function(e,n){if(n)return n=nn(e,t),Zt.test(n)?k(e).position()[t]+"px":n}))})),k.each({Height:"height",Width:"width"},(function(e,t){k.each({padding:"inner"+e,content:t,"":"outer"+e},(function(n,r){k.fn[r]=function(i,o){var s=arguments.length&&(n||"boolean"!=typeof i),u=n||(!0===i||!0===o?"margin":"border");return Je(this,(function(t,n,i){var o;return a(t)?0===r.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?k.css(t,n,u):k.style(t,n,i,u)}),t,s?i:void 0,s)}}))})),k.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(e,t){k.fn[t]=function(e){return this.on(t,e)}})),k.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.on("mouseenter",e).on("mouseleave",t||e)}}),k.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(e,t){k.fn[t]=function(e,n){return 0<arguments.length?this.on(t,null,e,n):this.trigger(t)}})),/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g),ur=(k.proxy=function(e,t){var n,r;if("string"==typeof t&&(r=e[t],t=e,e=r),o(e))return n=c.call(arguments,2),(r=function(){return e.apply(t||this,n.concat(c.call(arguments)))}).guid=e.guid=e.guid||k.guid++,r},k.holdReady=function(e){e?k.readyWait++:k.ready(!0)},k.isArray=Array.isArray,k.parseJSON=JSON.parse,k.nodeName=S,k.isFunction=o,k.isWindow=a,k.camelCase=nt,k.type=x,k.now=Date.now,k.isNumeric=function(e){var t=k.type(e);return("number"===t||"string"===t)&&!isNaN(e-parseFloat(e))},k.trim=function(e){return null==e?"":(e+"").replace(sr,"$1")},void 0!==(n=function(){return k}.apply(t,[]))&&(e.exports=n),r.jQuery),cr=r.$;return k.noConflict=function(e){return r.$===k&&(r.$=cr),e&&r.jQuery===k&&(r.jQuery=ur),k},void 0===i&&(r.jQuery=r.$=k),k}))},486:function(e,t,n){var r;
/**
 * @license
 * Lodash <https://lodash.com/>
 * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
 * Released under MIT license <https://lodash.com/license>
 * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
 * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
 */e=n.nmd(e),function(){var i,o,a="Expected a function",s="__lodash_placeholder__",u=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],c="[object Arguments]",l="[object Array]",h="[object Boolean]",f="[object Date]",d="[object Error]",p="[object Function]",m="[object GeneratorFunction]",g="[object Map]",A="[object Number]",v="[object Object]",b="[object RegExp]",y="[object Set]",w="[object String]",x="[object Symbol]",C="[object WeakMap]",k="[object ArrayBuffer]",E="[object DataView]",S="[object Float32Array]",_="[object Float64Array]",O="[object Int8Array]",T="[object Int16Array]",D="[object Int32Array]",B="[object Uint8Array]",I="[object Uint16Array]",M="[object Uint32Array]",j=/\b__p \+= '';/g,N=/\b(__p \+=) '' \+/g,F=/(__e\(.*?\)|\b__t\)) \+\n'';/g,R=/&(?:amp|lt|gt|quot|#39);/g,P=/[&<>"']/g,L=RegExp(R.source),U=RegExp(P.source),z=/<%-([\s\S]+?)%>/g,H=/<%([\s\S]+?)%>/g,$=/<%=([\s\S]+?)%>/g,Q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,V=/^\w*$/,q=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,G=/[\\^$.*+?()[\]{}|]/g,W=RegExp(G.source),K=/^\s+/,Y=/\s/,X=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,J=/\{\n\/\* \[wrapped with (.+)\] \*/,Z=/,? & /,ee=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,te=/[()=,{}\[\]\/\s]/,ne=/\\(\\)?/g,re=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ie=/\w*$/,oe=/^[-+]0x[0-9a-f]+$/i,ae=/^0b[01]+$/i,se=/^\[object .+?Constructor\]$/,ue=/^0o[0-7]+$/i,ce=/^(?:0|[1-9]\d*)$/,le=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,he=/($^)/,fe=/['\n\r\u2028\u2029\\]/g,de="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",pe="["+(Ae="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000")+"]",me="[a-z\\xdf-\\xf6\\xf8-\\xff]",ge="[A-Z\\xc0-\\xd6\\xd8-\\xde]",Ae="(?:"+me+"|"+(Ae="[^\\ud800-\\udfff"+Ae+"\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]")+")",ve="[\\ufe0e\\ufe0f]?"+(ve="(?:"+(i="["+de+"]")+"|"+(o="\\ud83c[\\udffb-\\udfff]")+")?")+"(?:\\u200d(?:"+[ye="[^\\ud800-\\udfff]",je="(?:\\ud83c[\\udde6-\\uddff]){2}",Ne="[\\ud800-\\udbff][\\udc00-\\udfff]"].join("|")+")[\\ufe0e\\ufe0f]?"+ve+")*",be="(?:"+["[\\u2700-\\u27bf]",je,Ne].join("|")+")"+ve,ye="(?:"+[ye+i+"?",i,je,Ne,"[\\ud800-\\udfff]"].join("|")+")",we=RegExp("['’]","g"),xe=RegExp(i,"g"),Ce=RegExp(o+"(?="+o+")|"+ye+ve,"g"),ke=RegExp([ge+"?"+me+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[pe,ge,"$"].join("|")+")","(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[pe,ge+Ae,"$"].join("|")+")",ge+"?"+Ae+"+(?:['’](?:d|ll|m|re|s|t|ve))?",ge+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])","\\d+",be].join("|"),"g"),Ee=RegExp("[\\u200d\\ud800-\\udfff"+de+"\\ufe0e\\ufe0f]"),Se=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,_e=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Oe=-1,Te={},De=(Te[S]=Te[_]=Te[O]=Te[T]=Te[D]=Te[B]=Te["[object Uint8ClampedArray]"]=Te[I]=Te[M]=!0,Te[c]=Te[l]=Te[k]=Te[h]=Te[E]=Te[f]=Te[d]=Te[p]=Te[g]=Te[A]=Te[v]=Te[b]=Te[y]=Te[w]=Te[C]=!1,{}),Be=(De[c]=De[l]=De[k]=De[E]=De[h]=De[f]=De[S]=De[_]=De[O]=De[T]=De[D]=De[g]=De[A]=De[v]=De[b]=De[y]=De[w]=De[x]=De[B]=De["[object Uint8ClampedArray]"]=De[I]=De[M]=!0,De[d]=De[p]=De[C]=!1,{"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"}),Ie=parseFloat,Me=parseInt,je="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,Ne="object"==typeof self&&self&&self.Object===Object&&self,Fe=je||Ne||Function("return this")(),Re=(i=t&&!t.nodeType&&t)&&e&&!e.nodeType&&e,Pe=Re&&Re.exports===i,Le=Pe&&je.process,Ue=(o=function(){try{return Re&&Re.require&&Re.require("util").types||Le&&Le.binding&&Le.binding("util")}catch(e){}}())&&o.isArrayBuffer,ze=o&&o.isDate,He=o&&o.isMap,$e=o&&o.isRegExp,Qe=o&&o.isSet,Ve=o&&o.isTypedArray;function qe(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Ge(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var a=e[i];t(r,a,n(a),e)}return r}function We(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function Ke(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function Ye(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var a=e[n];t(a,n,e)&&(o[i++]=a)}return o}function Xe(e,t){return!(null==e||!e.length)&&-1<st(e,t,0)}function Je(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function Ze(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function et(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function tt(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function nt(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function rt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var it=ht("length");function ot(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function at(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function st(e,t,n){if(t!=t)return at(e,ct,n);for(var r=e,i=t,o=n-1,a=r.length;++o<a;)if(r[o]===i)return o;return-1}function ut(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function ct(e){return e!=e}function lt(e,t){var n=null==e?0:e.length;return n?pt(e,t)/n:NaN}function ht(e){return function(t){return null==t?void 0:t[e]}}function ft(e){return function(t){return null==e?void 0:e[t]}}function dt(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n}function pt(e,t){for(var n,r=-1,i=e.length;++r<i;){var o=t(e[r]);void 0!==o&&(n=void 0===n?o:n+o)}return n}function mt(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function gt(e){return e&&e.slice(0,It(e)+1).replace(K,"")}function At(e){return function(t){return e(t)}}function vt(e,t){return Ze(t,(function(t){return e[t]}))}function bt(e,t){return e.has(t)}function yt(e,t){for(var n=-1,r=e.length;++n<r&&-1<st(t,e[n],0););return n}function wt(e,t){for(var n=e.length;n--&&-1<st(t,e[n],0););return n}var xt=ft({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","Ĳ":"IJ","ĳ":"ij","Œ":"Oe","œ":"oe","ŉ":"'n","ſ":"s"}),Ct=ft({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function kt(e){return"\\"+Be[e]}function Et(e){return Ee.test(e)}function St(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function _t(e,t){return function(n){return e(t(n))}}function Ot(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n];a!==t&&a!==s||(e[n]=s,o[i++]=n)}return o}function Tt(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function Dt(e){return(Et(e)?function(e){for(var t=Ce.lastIndex=0;Ce.test(e);)++t;return t}:it)(e)}function Bt(e){return Et(e)?e.match(Ce)||[]:e.split("")}function It(e){for(var t=e.length;t--&&Y.test(e.charAt(t)););return t}var Mt=ft({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),jt=function e(t){var n=(t=null==t?Fe:jt.defaults(Fe.Object(),t,jt.pick(Fe,_e))).Array,r=t.Date,i=t.Error,o=t.Function,Y=t.Math,de=t.Object,pe=t.RegExp,me=t.String,ge=t.TypeError,Ae=n.prototype,ve=o.prototype,be=de.prototype,ye=t["__core-js_shared__"],Ce=ve.toString,Ee=be.hasOwnProperty,Be=0,je=(ve=/[^.]+$/.exec(ye&&ye.keys&&ye.keys.IE_PROTO||""))?"Symbol(src)_1."+ve:"",Ne=be.toString,Re=Ce.call(de),Le=Fe._,it=pe("^"+Ce.call(Ee).replace(G,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),ft=(ve=Pe?t.Buffer:void 0,t.Symbol),Nt=t.Uint8Array,Ft=ve?ve.allocUnsafe:void 0,Rt=_t(de.getPrototypeOf,de),Pt=de.create,Lt=be.propertyIsEnumerable,Ut=Ae.splice,zt=ft?ft.isConcatSpreadable:void 0,Ht=ft?ft.iterator:void 0,$t=ft?ft.toStringTag:void 0,Qt=function(){try{var e=Li(de,"defineProperty");return e({},"",{}),e}catch(e){}}(),Vt=t.clearTimeout!==Fe.clearTimeout&&t.clearTimeout,qt=r&&r.now!==Fe.Date.now&&r.now,Gt=t.setTimeout!==Fe.setTimeout&&t.setTimeout,Wt=Y.ceil,Kt=Y.floor,Yt=de.getOwnPropertySymbols,Xt=(ve=ve?ve.isBuffer:void 0,t.isFinite),Jt=Ae.join,Zt=_t(de.keys,de),en=Y.max,tn=Y.min,nn=r.now,rn=t.parseInt,on=Y.random,an=Ae.reverse,sn=(r=Li(t,"DataView"),Li(t,"Map")),un=Li(t,"Promise"),cn=Li(t,"Set"),ln=(t=Li(t,"WeakMap"),Li(de,"create")),hn=t&&new t,fn={},dn=fo(r),pn=fo(sn),mn=fo(un),gn=fo(cn),An=fo(t),vn=(ft=ft?ft.prototype:void 0)?ft.valueOf:void 0,bn=ft?ft.toString:void 0;function yn(e){if(ya(e)&&!la(e)&&!(e instanceof En)){if(e instanceof kn)return e;if(Ee.call(e,"__wrapped__"))return po(e)}return new kn(e)}var wn=function(e){return ba(e)?Pt?Pt(e):(xn.prototype=e,e=new xn,xn.prototype=void 0,e):{}};function xn(){}function Cn(){}function kn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}function En(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Sn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function _n(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function On(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Tn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new On;++t<n;)this.add(e[t])}function Dn(e){e=this.__data__=new _n(e),this.size=e.size}function Bn(e,t){var n,r=la(e),i=!r&&ca(e),o=!r&&!i&&pa(e),a=!r&&!i&&!o&&Oa(e),s=r||i||o||a,u=s?mt(e.length,me):[],c=u.length;for(n in e)!t&&!Ee.call(e,n)||s&&("length"==n||o&&("offset"==n||"parent"==n)||a&&("buffer"==n||"byteLength"==n||"byteOffset"==n)||qi(n,c))||u.push(n);return u}function In(e){var t=e.length;return t?e[Sr(0,t-1)]:void 0}function Mn(e,t,n){(void 0===n||aa(e[t],n))&&(void 0!==n||t in e)||Pn(e,t,n)}function jn(e,t,n){var r=e[t];Ee.call(e,t)&&aa(r,n)&&(void 0!==n||t in e)||Pn(e,t,n)}function Nn(e,t){for(var n=e.length;n--;)if(aa(e[n][0],t))return n;return-1}function Fn(e,t,n,r){return Vn(e,(function(e,i,o){t(r,e,n(e),o)})),r}function Rn(e,t){return e&&ii(t,Ya(t),e)}function Pn(e,t,n){"__proto__"==t&&Qt?Qt(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Ln(e,t){for(var r=-1,i=t.length,o=n(i),a=null==e;++r<i;)o[r]=a?void 0:Va(e,t[r]);return o}function Un(e,t,n){return e==e&&(void 0!==n&&(e=e<=n?e:n),void 0!==t&&(e=t<=e?e:t)),e}function zn(e,t,n,r,i,o){var a,s=1&t,u=2&t,l=4&t;if(void 0===(a=n?i?n(e,r,i,o):n(e):a)){if(!ba(e))return e;var d,C,j;if(r=la(e)){if(F=(C=e).length,j=new C.constructor(F),F&&"string"==typeof C[0]&&Ee.call(C,"index")&&(j.index=C.index,j.input=C.input),a=j,!s)return ri(e,a)}else{var N=Hi(e),F=N==p||N==m;if(pa(e))return Xr(e,s);if(N==v||N==c||F&&!i){if(a=u||F?{}:Qi(e),!s)return u?(C=e,d=(j=a)&&ii(e,Xa(e),j),ii(C,zi(C),d)):(R=Rn(a,d=e),ii(d,Ui(d),R))}else{if(!De[N])return i?e:{};a=function(e,t){var n,r,i=e.constructor;switch(N){case k:return Jr(e);case h:case f:return new i(+e);case E:return n=e,r=t?Jr(n.buffer):n.buffer,new n.constructor(r,n.byteOffset,n.byteLength);case S:case _:case O:case T:case D:case B:case"[object Uint8ClampedArray]":case I:case M:return Zr(e,t);case g:return new i;case A:case w:return new i(e);case b:return(n=new(r=e).constructor(r.source,ie.exec(r))).lastIndex=r.lastIndex,n;case y:return new i;case x:return vn?de(vn.call(e)):{}}}(e,s)}}var R=(o=o||new Dn).get(e);if(R)return R;o.set(e,a),Ea(e)?e.forEach((function(r){a.add(zn(r,t,n,r,e,o))})):wa(e)&&e.forEach((function(r,i){a.set(i,zn(r,t,n,i,e,o))}));var P=r?void 0:(l?u?Ii:Bi:u?Xa:Ya)(e);We(P||e,(function(r,i){P&&(r=e[i=r]),jn(a,i,zn(r,t,n,i,e,o))}))}return a}function Hn(e,t,n){var r=n.length;if(null==e)return!r;for(e=de(e);r--;){var i=n[r],o=t[i],a=e[i];if(void 0===a&&!(i in e)||!o(a))return!1}return!0}function $n(e,t,n){if("function"!=typeof e)throw new ge(a);return io((function(){e.apply(void 0,n)}),t)}function Qn(e,t,n,r){var i=-1,o=Xe,a=!0,s=e.length,u=[],c=t.length;if(s){n&&(t=Ze(t,At(n))),r?(o=Je,a=!1):200<=t.length&&(o=bt,a=!1,t=new Tn(t));e:for(;++i<s;){var l=e[i],h=null==n?l:n(l);l=r||0!==l?l:0;if(a&&h==h){for(var f=c;f--;)if(t[f]===h)continue e;u.push(l)}else o(t,h,r)||u.push(l)}}return u}yn.templateSettings={escape:z,evaluate:H,interpolate:$,variable:"",imports:{_:yn}},(yn.prototype=Cn.prototype).constructor=yn,(kn.prototype=wn(Cn.prototype)).constructor=kn,(En.prototype=wn(Cn.prototype)).constructor=En,Sn.prototype.clear=function(){this.__data__=ln?ln(null):{},this.size=0},Sn.prototype.delete=function(e){return e=this.has(e)&&delete this.__data__[e],this.size-=e?1:0,e},Sn.prototype.get=function(e){var t,n=this.__data__;return ln?"__lodash_hash_undefined__"===(t=n[e])?void 0:t:Ee.call(n,e)?n[e]:void 0},Sn.prototype.has=function(e){var t=this.__data__;return ln?void 0!==t[e]:Ee.call(t,e)},Sn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=ln&&void 0===t?"__lodash_hash_undefined__":t,this},_n.prototype.clear=function(){this.__data__=[],this.size=0},_n.prototype.delete=function(e){var t=this.__data__;return!((e=Nn(t,e))<0||(e==t.length-1?t.pop():Ut.call(t,e,1),--this.size,0))},_n.prototype.get=function(e){var t=this.__data__;return(e=Nn(t,e))<0?void 0:t[e][1]},_n.prototype.has=function(e){return-1<Nn(this.__data__,e)},_n.prototype.set=function(e,t){var n=this.__data__,r=Nn(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},On.prototype.clear=function(){this.size=0,this.__data__={hash:new Sn,map:new(sn||_n),string:new Sn}},On.prototype.delete=function(e){return e=Ri(this,e).delete(e),this.size-=e?1:0,e},On.prototype.get=function(e){return Ri(this,e).get(e)},On.prototype.has=function(e){return Ri(this,e).has(e)},On.prototype.set=function(e,t){var n=Ri(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Tn.prototype.add=Tn.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Tn.prototype.has=function(e){return this.__data__.has(e)},Dn.prototype.clear=function(){this.__data__=new _n,this.size=0},Dn.prototype.delete=function(e){var t=this.__data__;e=t.delete(e);return this.size=t.size,e},Dn.prototype.get=function(e){return this.__data__.get(e)},Dn.prototype.has=function(e){return this.__data__.has(e)},Dn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof _n){var r=n.__data__;if(!sn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new On(r)}return n.set(e,t),this.size=n.size,this};var Vn=si(Zn),qn=si(er,!0);function Gn(e,t){var n=!0;return Vn(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function Wn(e,t,n){for(var r=-1,i=e.length;++r<i;){var o,a,s=e[r],u=t(s);null!=u&&(void 0===o?u==u&&!_a(u):n(u,o))&&(o=u,a=s)}return a}function Kn(e,t){var n=[];return Vn(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function Yn(e,t,n,r,i){var o=-1,a=e.length;for(n=n||Vi,i=i||[];++o<a;){var s=e[o];0<t&&n(s)?1<t?Yn(s,t-1,n,r,i):et(i,s):r||(i[i.length]=s)}return i}var Xn=ui(),Jn=ui(!0);function Zn(e,t){return e&&Xn(e,t,Ya)}function er(e,t){return e&&Jn(e,t,Ya)}function tr(e,t){return Ye(t,(function(t){return ga(e[t])}))}function nr(e,t){for(var n=0,r=(t=Gr(t,e)).length;null!=e&&n<r;)e=e[ho(t[n++])];return n&&n==r?e:void 0}function rr(e,t,n){return t=t(e),la(e)?t:et(t,n(e))}function ir(e){if(null==e)return void 0===e?"[object Undefined]":"[object Null]";if($t&&$t in de(e)){var t=e,n=Ee.call(t,$t),r=t[$t];try{var i=!(t[$t]=void 0)}catch(t){}var o=Ne.call(t);return i&&(n?t[$t]=r:delete t[$t]),o}return Ne.call(e)}function or(e,t){return t<e}function ar(e,t){return null!=e&&Ee.call(e,t)}function sr(e,t){return null!=e&&t in de(e)}function ur(e,t,r){for(var i=r?Je:Xe,o=e[0].length,a=e.length,s=a,u=n(a),c=1/0,l=[];s--;){var h=e[s];s&&t&&(h=Ze(h,At(t))),c=tn(h.length,c),u[s]=!r&&(t||120<=o&&120<=h.length)?new Tn(s&&h):void 0}h=e[0];var f=-1,d=u[0];e:for(;++f<o&&l.length<c;){var p=h[f],m=t?t(p):p;p=r||0!==p?p:0;if(!(d?bt(d,m):i(l,m,r))){for(s=a;--s;){var g=u[s];if(!(g?bt(g,m):i(e[s],m,r)))continue e}d&&d.push(m),l.push(p)}}return l}function cr(e,t,n){return null==(t=null==(e=to(e,t=Gr(t,e)))?e:e[ho(bo(t))])?void 0:qe(t,e,n)}function lr(e){return ya(e)&&ir(e)==c}function hr(e,t,n,r,i){return e===t||(null==e||null==t||!ya(e)&&!ya(t)?e!=e&&t!=t:function(e,t,n,r,i,o){var a=la(e),s=la(t),u=a?l:Hi(e),p=(s=s?l:Hi(t),(u=u==c?v:u)==v),m=(s=s==c?v:s)==v;if((s=u==s)&&pa(e)){if(!pa(t))return!1;p=!(a=!0)}if(s&&!p)return o=o||new Dn,(a||Oa(e)?Ti:function(e,t,n,r,i,o){switch(u){case E:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case k:return!(e.byteLength!=t.byteLength||!i(new Nt(e),new Nt(t)));case h:case f:case A:return aa(+e,+t);case d:return e.name==t.name&&e.message==t.message;case b:case w:return e==t+"";case g:var a=St;case y:if(a=a||Tt,e.size!=t.size&&!(1&n))return!1;var s=o.get(e);return s?s==t:(n|=2,o.set(e,t),s=Ti(a(e),a(t),n,r,i,o),o.delete(e),s);case x:if(vn)return vn.call(e)==vn.call(t)}return!1})(e,t,n,r,i,o);if(!(1&n)&&(a=p&&Ee.call(e,"__wrapped__"),p=m&&Ee.call(t,"__wrapped__"),a||p))return i(a?e.value():e,p?t.value():t,n,r,o=o||new Dn);if(s){var C=e,S=t,_=n,O=r,T=i,D=o=o||new Dn,B=1&_,I=Bi(C),M=I.length;if(M!=Bi(S).length&&!B)return!1;for(var j=M;j--;){var N=I[j];if(!(B?N in S:Ee.call(S,N)))return!1}if(m=D.get(C),a=D.get(S),m&&a)return m==S&&a==C;for(var F=!0,R=(D.set(C,S),D.set(S,C),B);++j<M;){var P,L=C[N=I[j]],U=S[N];if(!(void 0===(P=O?B?O(U,L,N,S,C,D):O(L,U,N,C,S,D):P)?L===U||T(L,U,_,O,D):P)){F=!1;break}R=R||"constructor"==N}return F&&!R&&(m=C.constructor)!=(a=S.constructor)&&"constructor"in C&&"constructor"in S&&!("function"==typeof m&&m instanceof m&&"function"==typeof a&&a instanceof a)&&(F=!1),D.delete(C),D.delete(S),F}return!1}(e,t,n,r,hr,i))}function fr(e,t,n,r){var i=n.length,o=i,a=!r;if(null==e)return!o;for(e=de(e);i--;){var s=n[i];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<o;){var u=(s=n[i])[0],c=e[u],l=s[1];if(a&&s[2]){if(void 0===c&&!(u in e))return!1}else{var h,f=new Dn;if(!(void 0===(h=r?r(c,l,u,e,t,f):h)?hr(l,c,3,r,f):h))return!1}}return!0}function dr(e){return!(!ba(e)||je&&je in e)&&(ga(e)?it:se).test(fo(e))}function pr(e){return"function"==typeof e?e:null==e?xs:"object"==typeof e?la(e)?br(e[0],e[1]):vr(e):Bs(e)}function mr(e){if(!Xi(e))return Zt(e);var t,n=[];for(t in de(e))Ee.call(e,t)&&"constructor"!=t&&n.push(t);return n}function gr(e,t){return e<t}function Ar(e,t){var r=-1,i=fa(e)?n(e.length):[];return Vn(e,(function(e,n,o){i[++r]=t(e,n,o)})),i}function vr(e){var t=Pi(e);return 1==t.length&&t[0][2]?Zi(t[0][0],t[0][1]):function(n){return n===e||fr(n,e,t)}}function br(e,t){return Wi(e)&&Ji(t)?Zi(ho(e),t):function(n){var r=Va(n,e);return void 0===r&&r===t?qa(n,e):hr(t,r,3)}}function yr(e,t,n,r,i){e!==t&&Xn(t,(function(o,a){var s,u,c,l,h,f,d,p,m,g,A,v,b;i=i||new Dn,ba(o)?(u=t,l=n,h=yr,f=r,d=i,A=no(s=e,c=a),v=no(u,c),(b=d.get(v))||((u=void 0===(b=f?f(A,v,c+"",s,u,d):void 0))&&(m=!(p=la(v))&&pa(v),g=!p&&!m&&Oa(v),b=v,p||m||g?b=la(A)?A:da(A)?ri(A):m?Xr(v,!(u=!1)):g?Zr(v,!(u=!1)):[]:Ca(v)||ca(v)?ca(b=A)?b=Fa(A):ba(A)&&!ga(A)||(b=Qi(v)):u=!1),u&&(d.set(v,b),h(b,v,l,f,d),d.delete(v))),Mn(s,c,b)):(p=r?r(no(e,a),o,a+"",e,t,i):void 0,Mn(e,a,p=void 0===p?o:p))}),Xa)}function wr(e,t){var n=e.length;return n&&qi(t+=t<0?n:0,n)?e[t]:void 0}function xr(e,t,n){t=t.length?Ze(t,(function(e){return la(e)?function(t){return nr(t,1===e.length?e[0]:e)}:e})):[xs];var r=-1,i=(t=Ze(t,At(Fi())),Ar(e,(function(e,n,i){return{criteria:Ze(t,(function(t){return t(e)})),index:++r,value:e}}))),o=i.length;for(i.sort((function(e,t){for(var r=e,i=t,o=n,a=-1,s=r.criteria,u=i.criteria,c=s.length,l=o.length;++a<c;){var h=ei(s[a],u[a]);if(h)return a>=l?h:h*("desc"==o[a]?-1:1)}return r.index-i.index}));o--;)i[o]=i[o].value;return i}function Cr(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var a=t[r],s=nr(e,a);n(s,a)&&Tr(o,Gr(a,e),s)}return o}function kr(e,t,n,r){var i=r?ut:st,o=-1,a=t.length,s=e;for(e===t&&(t=ri(t)),n&&(s=Ze(e,At(n)));++o<a;)for(var u=0,c=t[o],l=n?n(c):c;-1<(u=i(s,l,u,r));)s!==e&&Ut.call(s,u,1),Ut.call(e,u,1);return e}function Er(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i,o=t[n];n!=r&&o===i||(qi(i=o)?Ut.call(e,o,1):Lr(e,o))}}function Sr(e,t){return e+Kt(on()*(t-e+1))}function _r(e,t){var n="";if(!(!e||t<1||9007199254740991<t))for(;t%2&&(n+=e),(t=Kt(t/2))&&(e+=e),t;);return n}function Or(e,t){return oo(eo(e,t,xs),e+"")}function Tr(e,t,n,r){if(ba(e))for(var i=-1,o=(t=Gr(t,e)).length,a=o-1,s=e;null!=s&&++i<o;){var u,c=ho(t[i]),l=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;i!=a&&(u=s[c],void 0===(l=r?r(u,c,s):void 0)&&(l=ba(u)?u:qi(t[i+1])?[]:{})),jn(s,c,l),s=s[c]}return e}var Dr=hn?function(e,t){return hn.set(e,t),e}:xs;ft=Qt?function(e,t){return Qt(e,"toString",{configurable:!0,enumerable:!1,value:bs(t),writable:!0})}:xs;function Br(e,t,r){var i=-1,o=e.length;(r=o<r?o:r)<0&&(r+=o),o=r<(t=t<0?o<-t?0:o+t:t)?0:r-t>>>0,t>>>=0;for(var a=n(o);++i<o;)a[i]=e[i+t];return a}function Ir(e,t){var n;return Vn(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function Mr(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;r<i;){var o=r+i>>>1,a=e[o];null!==a&&!_a(a)&&(n?a<=t:a<t)?r=1+o:i=o}return i}return jr(e,t,xs,n)}function jr(e,t,n,r){var i=0,o=null==e?0:e.length;if(0===o)return 0;for(var a=(t=n(t))!=t,s=null===t,u=_a(t),c=void 0===t;i<o;){var l=Kt((i+o)/2),h=n(e[l]),f=void 0!==h,d=null===h,p=h==h,m=_a(h);(p=a?r||p:c?p&&(r||f):s?p&&f&&(r||!d):u?p&&f&&!d&&(r||!m):!d&&!m&&(r?h<=t:h<t))?i=l+1:o=l}return tn(o,4294967294)}function Nr(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a,s=e[n],u=t?t(s):s;n&&aa(u,a)||(a=u,o[i++]=0===s?0:s)}return o}function Fr(e){return"number"==typeof e?e:_a(e)?NaN:+e}function Rr(e){var t;return"string"==typeof e?e:la(e)?Ze(e,Rr)+"":_a(e)?bn?bn.call(e):"":"0"==(t=e+"")&&1/e==-1/0?"-0":t}function Pr(e,t,n){var r=-1,i=Xe,o=e.length,a=!0,s=[],u=s;if(n)a=!1,i=Je;else if(200<=o){var c=t?null:Ci(e);if(c)return Tt(c);a=!1,i=bt,u=new Tn}else u=t?[]:s;e:for(;++r<o;){var l=e[r],h=t?t(l):l;l=n||0!==l?l:0;if(a&&h==h){for(var f=u.length;f--;)if(u[f]===h)continue e;t&&u.push(h),s.push(l)}else i(u,h,n)||(u!==s&&u.push(h),s.push(l))}return s}function Lr(e,t){return null==(e=to(e,t=Gr(t,e)))||delete e[ho(bo(t))]}function Ur(e,t,n,r){return Tr(e,t,n(nr(e,t)),r)}function zr(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?Br(e,r?0:o,r?o+1:i):Br(e,r?o+1:0,r?i:o)}function Hr(e,t){var n=e;return tt(t,(function(e,t){return t.func.apply(t.thisArg,et([e],t.args))}),n=e instanceof En?e.value():n)}function $r(e,t,r){var i=e.length;if(i<2)return i?Pr(e[0]):[];for(var o=-1,a=n(i);++o<i;)for(var s=e[o],u=-1;++u<i;)u!=o&&(a[o]=Qn(a[o]||s,e[u],t,r));return Pr(Yn(a,1),t,r)}function Qr(e,t,n){for(var r=-1,i=e.length,o=t.length,a={};++r<i;){var s=r<o?t[r]:void 0;n(a,e[r],s)}return a}function Vr(e){return da(e)?e:[]}function qr(e){return"function"==typeof e?e:xs}function Gr(e,t){return la(e)?e:Wi(e,t)?[e]:lo(Ra(e))}var Wr=Or;function Kr(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&r<=n?e:Br(e,t,n)}var Yr=Vt||function(e){return Fe.clearTimeout(e)};function Xr(e,t){return t?e.slice():(t=e.length,t=Ft?Ft(t):new e.constructor(t),e.copy(t),t)}function Jr(e){var t=new e.constructor(e.byteLength);return new Nt(t).set(new Nt(e)),t}function Zr(e,t){return t=t?Jr(e.buffer):e.buffer,new e.constructor(t,e.byteOffset,e.length)}function ei(e,t){if(e!==t){var n=void 0!==e,r=null===e,i=e==e,o=_a(e),a=void 0!==t,s=null===t,u=t==t,c=_a(t);if(!s&&!c&&!o&&t<e||o&&a&&u&&!s&&!c||r&&a&&u||!n&&u||!i)return 1;if(!r&&!o&&!c&&e<t||c&&n&&i&&!r&&!o||s&&n&&i||!a&&i||!u)return-1}return 0}function ti(e,t,r,i){for(var o=-1,a=e.length,s=r.length,u=-1,c=t.length,l=en(a-s,0),h=n(c+l),f=!i;++u<c;)h[u]=t[u];for(;++o<s;)(f||o<a)&&(h[r[o]]=e[o]);for(;l--;)h[u++]=e[o++];return h}function ni(e,t,r,i){for(var o=-1,a=e.length,s=-1,u=r.length,c=-1,l=t.length,h=en(a-u,0),f=n(h+l),d=!i;++o<h;)f[o]=e[o];for(var p=o;++c<l;)f[p+c]=t[c];for(;++s<u;)(d||o<a)&&(f[p+r[s]]=e[o++]);return f}function ri(e,t){var r=-1,i=e.length;for(t=t||n(i);++r<i;)t[r]=e[r];return t}function ii(e,t,n,r){var i=!n;n=n||{};for(var o=-1,a=t.length;++o<a;){var s=t[o],u=r?r(n[s],e[s],s,n,e):void 0;(i?Pn:jn)(n,s,u=void 0===u?e[s]:u)}return n}function oi(e,t){return function(n,r){var i=la(n)?Ge:Fn,o=t?t():{};return i(n,e,Fi(r,2),o)}}function ai(e){return Or((function(t,n){var r=-1,i=n.length,o=1<i?n[i-1]:void 0,a=2<i?n[2]:void 0;o=3<e.length&&"function"==typeof o?(i--,o):void 0;for(a&&Gi(n[0],n[1],a)&&(o=i<3?void 0:o,i=1),t=de(t);++r<i;){var s=n[r];s&&e(t,s,r,o)}return t}))}function si(e,t){return function(n,r){if(null!=n){if(!fa(n))return e(n,r);for(var i=n.length,o=t?i:-1,a=de(n);(t?o--:++o<i)&&!1!==r(a[o],o,a););}return n}}function ui(e){return function(t,n,r){for(var i=-1,o=de(t),a=r(t),s=a.length;s--;){var u=a[e?s:++i];if(!1===n(o[u],u,o))break}return t}}function ci(e){return function(t){var n=(r=Et(t=Ra(t))?Bt(t):void 0)?r[0]:t.charAt(0),r=r?Kr(r,1).join(""):t.slice(1);return n[e]()+r}}function li(e){return function(t){return tt(gs(us(t).replace(we,"")),e,"")}}function hi(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=wn(e.prototype),r=e.apply(n,t);return ba(r)?r:n}}function fi(e){return function(t,n,r){var i,o=de(t);return-1<(n=(fa(t)||(i=Fi(n,3),t=Ya(t),n=function(e){return i(o[e],e,o)}),e(t,n,r)))?o[i?t[n]:n]:void 0}}function di(e){return Di((function(t){var n=t.length,r=n,i=kn.prototype.thru;for(e&&t.reverse();r--;){var o=t[r];if("function"!=typeof o)throw new ge(a);i&&!c&&"wrapper"==ji(o)&&(c=new kn([],!0))}for(r=c?r:n;++r<n;)var s=ji(o=t[r]),u="wrapper"==s?Mi(o):void 0,c=u&&Ki(u[0])&&424==u[1]&&!u[4].length&&1==u[9]?c[ji(u[0])].apply(c,u[3]):1==o.length&&Ki(o)?c[s]():c.thru(o);return function(){var e=arguments,r=e[0];if(c&&1==e.length&&la(r))return c.plant(r).value();for(var i=0,o=n?t[i].apply(this,e):r;++i<n;)o=t[i].call(this,o);return o}}))}function pi(e,t,r,i,o,a,s,u,c,l){var h=128&t,f=1&t,d=2&t,p=24&t,m=512&t,g=d?void 0:hi(e);return function A(){for(var v,b,y=arguments.length,w=n(y),x=y;x--;)w[x]=arguments[x];return p&&(b=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(w,v=Ni(A))),i&&(w=ti(w,i,o,p)),a&&(w=ni(w,a,s,p)),y-=b,p&&y<l?(b=Ot(w,v),wi(e,t,pi,A.placeholder,r,w,b,u,c,l-y)):(v=f?r:this,b=d?v[e]:e,y=w.length,u?w=function(e,t){for(var n=e.length,r=tn(t.length,n),i=ri(e);r--;){var o=t[r];e[r]=qi(o,n)?i[o]:void 0}return e}(w,u):m&&1<y&&w.reverse(),h&&c<y&&(w.length=c),(b=this&&this!==Fe&&this instanceof A?g||hi(b):b).apply(v,w))}}function mi(e,t){return function(n,r){return n=n,i=e,o=t(r),a={},Zn(n,(function(e,t,n){i(a,o(e),t,n)})),a;var i,o,a}}function gi(e,t){return function(n,r){var i;if(void 0===n&&void 0===r)return t;if(void 0!==n&&(i=n),void 0!==r){if(void 0===i)return r;r=("string"==typeof n||"string"==typeof r?(n=Rr(n),Rr):(n=Fr(n),Fr))(r),i=e(n,r)}return i}}function Ai(e){return Di((function(t){return t=Ze(t,At(Fi())),Or((function(n){var r=this;return e(t,(function(e){return qe(e,r,n)}))}))}))}function vi(e,t){var n=(t=void 0===t?" ":Rr(t)).length;return n<2?n?_r(t,e):t:(n=_r(t,Wt(e/Dt(t))),Et(t)?Kr(Bt(n),0,e).join(""):n.slice(0,e))}function bi(e){return function(t,r,i){i&&"number"!=typeof i&&Gi(t,r,i)&&(r=i=void 0),t=Ia(t),void 0===r?(r=t,t=0):r=Ia(r);for(var o=t,a=r,s=i=void 0===i?t<r?1:-1:Ia(i),u=e,c=-1,l=en(Wt((a-o)/(s||1)),0),h=n(l);l--;)h[u?l:++c]=o,o+=s;return h}}function yi(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=Na(t),n=Na(n)),e(t,n)}}function wi(e,t,n,r,i,o,a,s,u,c){var l=8&t;4&(t=(t|(l?32:64))&~(l?64:32))||(t&=-4),i=[e,t,i,l?o:void 0,l?a:void 0,l?void 0:o,l?void 0:a,s,u,c],o=n.apply(void 0,i);return Ki(e)&&ro(o,i),o.placeholder=r,ao(o,e,t)}function xi(e){var t=Y[e];return function(e,n){var r;return e=Na(e),(n=null==n?0:tn(Ma(n),292))&&Xt(e)?(r=(Ra(e)+"e").split("e"),+((r=(Ra(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))):t(e)}}var Ci=cn&&1/Tt(new cn([,-0]))[1]==1/0?function(e){return new cn(e)}:_s;function ki(e){return function(t){var n,r,i,o=Hi(t);return o==g?St(t):o==y?(o=t,r=-1,i=Array(o.size),o.forEach((function(e){i[++r]=[e,e]})),i):Ze(e(n=t),(function(e){return[e,n[e]]}))}}function Ei(e,t,r,i,o,u,c,l){var h,f,d,p,m,g,A,v,b,y,w,x,C,k,E,S,_,O,T,D,B,I=2&t;if(I||"function"==typeof e)return(h=i?i.length:0)||(t&=-97,i=o=void 0),c=void 0===c?c:en(Ma(c),0),l=void 0===l?l:Ma(l),h-=o?o.length:0,64&t&&(d=i,_=o,i=o=void 0),d=[e,t,r,i,o,d,_,u,c,l],(f=I?void 0:Mi(e))&&(_=f,D=(c=(u=d)[1])|(T=_[1]),B=128==T&&8==c||128==T&&256==c&&u[7].length<=_[8]||384==T&&_[7].length<=_[8]&&8==c,(D<131||B)&&(1&T&&(u[2]=_[2],D|=1&c?0:4),(B=_[3])&&(O=u[3],u[3]=O?ti(O,B,_[4]):B,u[4]=O?Ot(u[3],s):_[4]),(B=_[5])&&(O=u[5],u[5]=O?ni(O,B,_[6]):B,u[6]=O?Ot(u[5],s):_[6]),(B=_[7])&&(u[7]=B),128&T&&(u[8]=null==u[8]?_[8]:tn(u[8],_[8])),null==u[9]&&(u[9]=_[9]),u[0]=_[0],u[1]=D)),e=d[0],t=d[1],r=d[2],i=d[3],o=d[4],!(l=d[9]=void 0===d[9]?I?0:e.length:en(d[9]-h,0))&&24&t&&(t&=-25),c=t&&1!=t?8==t||16==t?(k=t,E=l,S=hi(C=e),function e(){for(var t=arguments.length,r=n(t),i=t,o=Ni(e);i--;)r[i]=arguments[i];return(t-=(o=t<3&&r[0]!==o&&r[t-1]!==o?[]:Ot(r,o)).length)<E?wi(C,k,pi,e.placeholder,void 0,r,o,void 0,void 0,E-t):qe(this&&this!==Fe&&this instanceof e?S:C,this,r)}):32!=t&&33!=t||o.length?pi.apply(void 0,d):(b=r,y=i,w=1&t,x=hi(v=e),function e(){for(var t=-1,r=arguments.length,i=-1,o=y.length,a=n(o+r),s=this&&this!==Fe&&this instanceof e?x:v;++i<o;)a[i]=y[i];for(;r--;)a[i++]=arguments[++t];return qe(s,w?b:this,a)}):(m=r,g=1&t,A=hi(p=e),function e(){return(this&&this!==Fe&&this instanceof e?A:p).apply(g?m:this,arguments)}),ao((f?Dr:ro)(c,d),e,t);throw new ge(a)}function Si(e,t,n,r){return void 0===e||aa(e,be[n])&&!Ee.call(r,n)?t:e}function _i(e,t,n,r,i,o){return ba(e)&&ba(t)&&(o.set(t,e),yr(e,t,void 0,_i,o),o.delete(t)),e}function Oi(e){return Ca(e)?void 0:e}function Ti(e,t,n,r,i,o){var a=1&n,s=e.length;if(s!=(u=t.length)&&!(a&&s<u))return!1;var u=o.get(e),c=o.get(t);if(u&&c)return u==t&&c==e;var l=-1,h=!0,f=2&n?new Tn:void 0;for(o.set(e,t),o.set(t,e);++l<s;){var d,p=e[l],m=t[l];if(void 0!==(d=r?a?r(m,p,l,t,e,o):r(p,m,l,e,t,o):d)){if(d)continue;h=!1;break}if(f){if(!rt(t,(function(e,t){return!bt(f,t)&&(p===e||i(p,e,n,r,o))&&f.push(t)}))){h=!1;break}}else if(p!==m&&!i(p,m,n,r,o)){h=!1;break}}return o.delete(e),o.delete(t),h}function Di(e){return oo(eo(e,void 0,Ao),e+"")}function Bi(e){return rr(e,Ya,Ui)}function Ii(e){return rr(e,Xa,zi)}var Mi=hn?function(e){return hn.get(e)}:_s;function ji(e){for(var t=e.name+"",n=fn[t],r=Ee.call(fn,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function Ni(e){return(Ee.call(yn,"placeholder")?yn:e).placeholder}function Fi(){var e=(e=yn.iteratee||Cs)===Cs?pr:e;return arguments.length?e(arguments[0],arguments[1]):e}function Ri(e,t){var n;e=e.__data__;return("string"==(n=typeof t)||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==t:null===t)?e["string"==typeof t?"string":"hash"]:e.map}function Pi(e){for(var t=Ya(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Ji(i)]}return t}function Li(e,t){return dr(e=null==e?void 0:e[t])?e:void 0}var Ui=Yt?function(e){return null==e?[]:(e=de(e),Ye(Yt(e),(function(t){return Lt.call(e,t)})))}:js,zi=Yt?function(e){for(var t=[];e;)et(t,Ui(e)),e=Rt(e);return t}:js,Hi=ir;function $i(e,t,n){for(var r=-1,i=(t=Gr(t,e)).length,o=!1;++r<i;){var a=ho(t[r]);if(!(o=null!=e&&n(e,a)))break;e=e[a]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&va(i)&&qi(a,i)&&(la(e)||ca(e))}function Qi(e){return"function"!=typeof e.constructor||Xi(e)?{}:wn(Rt(e))}function Vi(e){return la(e)||ca(e)||!!(zt&&e&&e[zt])}function qi(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&ce.test(e))&&-1<e&&e%1==0&&e<t}function Gi(e,t,n){var r;return!!ba(n)&&!!("number"==(r=typeof t)?fa(n)&&qi(t,n.length):"string"==r&&t in n)&&aa(n[t],e)}function Wi(e,t){var n;if(!la(e))return"number"==(n=typeof e)||"symbol"==n||"boolean"==n||null==e||_a(e)||V.test(e)||!Q.test(e)||null!=t&&e in de(t)}function Ki(e){var t=ji(e),n=yn[t];return"function"==typeof n&&t in En.prototype&&(e===n||(t=Mi(n))&&e===t[0])}(r&&Hi(new r(new ArrayBuffer(1)))!=E||sn&&Hi(new sn)!=g||un&&"[object Promise]"!=Hi(un.resolve())||cn&&Hi(new cn)!=y||t&&Hi(new t)!=C)&&(Hi=function(e){var t=ir(e);if(e=(e=t==v?e.constructor:void 0)?fo(e):"")switch(e){case dn:return E;case pn:return g;case mn:return"[object Promise]";case gn:return y;case An:return C}return t});var Yi=ye?ga:Ns;function Xi(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||be)}function Ji(e){return e==e&&!ba(e)}function Zi(e,t){return function(n){return null!=n&&n[e]===t&&(void 0!==t||e in de(n))}}function eo(e,t,r){return t=en(void 0===t?e.length-1:t,0),function(){for(var i=arguments,o=-1,a=en(i.length-t,0),s=n(a);++o<a;)s[o]=i[t+o];o=-1;for(var u=n(t+1);++o<t;)u[o]=i[o];return u[t]=r(s),qe(e,this,u)}}function to(e,t){return t.length<2?e:nr(e,Br(t,0,-1))}function no(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var ro=so(Dr),io=Gt||function(e,t){return Fe.setTimeout(e,t)},oo=so(ft);function ao(e,t,n){var r,i,o;return oo(e,(t=(e=t=t+"").match(J),i=t?t[1].split(Z):[],o=n,We(u,(function(e){var t="_."+e[0];o&e[1]&&!Xe(i,t)&&i.push(t)})),(n=(t=i.sort()).length)?(t[r=n-1]=(1<n?"& ":"")+t[r],t=t.join(2<n?", ":" "),e.replace(X,"{\n/* [wrapped with "+t+"] */\n")):e))}function so(e){var t=0,n=0;return function(){var r=nn(),i=16-(r-n);if(n=r,0<i){if(800<=++t)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function uo(e,t){var n=-1,r=e.length,i=r-1;for(t=void 0===t?r:t;++n<t;){var o=Sr(n,i),a=e[o];e[o]=e[n],e[n]=a}return e.length=t,e}co=(Vt=ta((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(q,(function(e,n,r,i){t.push(r?i.replace(ne,"$1"):n||e)})),t}),(function(e){return 500===co.size&&co.clear(),e}))).cache;var co,lo=Vt;function ho(e){var t;return"string"==typeof e||_a(e)?e:"0"==(t=e+"")&&1/e==-1/0?"-0":t}function fo(e){if(null!=e){try{return Ce.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function po(e){var t;return e instanceof En?e.clone():((t=new kn(e.__wrapped__,e.__chain__)).__actions__=ri(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t)}function mo(e,t,n){var r=null==e?0:e.length;return r?((n=null==n?0:Ma(n))<0&&(n=en(r+n,0)),at(e,Fi(t,3),n)):-1}function go(e,t,n){var r,i=null==e?0:e.length;return i?(r=i-1,void 0!==n&&(r=Ma(n),r=n<0?en(i+r,0):tn(r,i-1)),at(e,Fi(t,3),r,!0)):-1}function Ao(e){return null!=e&&e.length?Yn(e,1):[]}function vo(e){return e&&e.length?e[0]:void 0}function bo(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}function yo(e,t){return e&&e.length&&t&&t.length?kr(e,t):e}r=Or((function(e,t){return da(e)?Qn(e,Yn(t,1,da,!0)):[]})),un=Or((function(e,t){var n=bo(t);return da(n)&&(n=void 0),da(e)?Qn(e,Yn(t,1,da,!0),Fi(n,2)):[]})),t=Or((function(e,t){var n=bo(t);return da(n)&&(n=void 0),da(e)?Qn(e,Yn(t,1,da,!0),void 0,n):[]})),ye=Or((function(e){var t=Ze(e,Vr);return t.length&&t[0]===e[0]?ur(t):[]})),Gt=Or((function(e){var t=bo(e),n=Ze(e,Vr);return t===bo(n)?t=void 0:n.pop(),n.length&&n[0]===e[0]?ur(n,Fi(t,2)):[]})),ft=Or((function(e){var t=bo(e),n=Ze(e,Vr);return(t="function"==typeof t?t:void 0)&&n.pop(),n.length&&n[0]===e[0]?ur(n,void 0,t):[]})),Vt=Or(yo);var wo=Di((function(e,t){var n=null==e?0:e.length,r=Ln(e,t);return Er(e,Ze(t,(function(e){return qi(e,n)?+e:e})).sort(ei)),r}));function xo(e){return null==e?e:an.call(e)}var Co=Or((function(e){return Pr(Yn(e,1,da,!0))})),ko=Or((function(e){var t=bo(e);return da(t)&&(t=void 0),Pr(Yn(e,1,da,!0),Fi(t,2))})),Eo=Or((function(e){var t="function"==typeof(t=bo(e))?t:void 0;return Pr(Yn(e,1,da,!0),void 0,t)}));function So(e){var t;return e&&e.length?(t=0,e=Ye(e,(function(e){if(da(e))return t=en(e.length,t),!0})),mt(t,(function(t){return Ze(e,ht(t))}))):[]}function _o(e,t){return e&&e.length?(e=So(e),null==t?e:Ze(e,(function(e){return qe(t,void 0,e)}))):[]}var Oo=Or((function(e,t){return da(e)?Qn(e,t):[]})),To=Or((function(e){return $r(Ye(e,da))})),Do=Or((function(e){var t=bo(e);return da(t)&&(t=void 0),$r(Ye(e,da),Fi(t,2))})),Bo=Or((function(e){var t="function"==typeof(t=bo(e))?t:void 0;return $r(Ye(e,da),void 0,t)})),Io=Or(So),Mo=Or((function(e){var t="function"==typeof(t=1<(t=e.length)?e[t-1]:void 0)?(e.pop(),t):void 0;return _o(e,t)}));function jo(e){return(e=yn(e)).__chain__=!0,e}function No(e,t){return t(e)}var Fo=Di((function(e){function t(t){return Ln(t,e)}var n=e.length,r=n?e[0]:0,i=this.__wrapped__;return!(1<n||this.__actions__.length)&&i instanceof En&&qi(r)?((i=i.slice(r,+r+(n?1:0))).__actions__.push({func:No,args:[t],thisArg:void 0}),new kn(i,this.__chain__).thru((function(e){return n&&!e.length&&e.push(void 0),e}))):this.thru(t)})),Ro=oi((function(e,t,n){Ee.call(e,n)?++e[n]:Pn(e,n,1)})),Po=fi(mo),Lo=fi(go);function Uo(e,t){return(la(e)?We:Vn)(e,Fi(t,3))}function zo(e,t){return(la(e)?function(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}:qn)(e,Fi(t,3))}var Ho=oi((function(e,t,n){Ee.call(e,n)?e[n].push(t):Pn(e,n,[t])})),$o=Or((function(e,t,r){var i=-1,o="function"==typeof t,a=fa(e)?n(e.length):[];return Vn(e,(function(e){a[++i]=o?qe(t,e,r):cr(e,t,r)})),a})),Qo=oi((function(e,t,n){Pn(e,n,t)}));function Vo(e,t){return(la(e)?Ze:Ar)(e,Fi(t,3))}var qo=oi((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),Go=Or((function(e,t){var n;return null==e?[]:(1<(n=t.length)&&Gi(e,t[0],t[1])?t=[]:2<n&&Gi(t[0],t[1],t[2])&&(t=[t[0]]),xr(e,Yn(t,1),[]))})),Wo=qt||function(){return Fe.Date.now()};function Ko(e,t,n){return t=n?void 0:t,Ei(e,128,void 0,void 0,void 0,void 0,t=e&&null==t?e.length:t)}function Yo(e,t){var n;if("function"!=typeof t)throw new ge(a);return e=Ma(e),function(){return 0<--e&&(n=t.apply(this,arguments)),e<=1&&(t=void 0),n}}var Xo=Or((function(e,t,n){var r,i=1;return n.length&&(r=Ot(n,Ni(Xo)),i|=32),Ei(e,i,t,n,r)})),Jo=Or((function(e,t,n){var r,i=3;return n.length&&(r=Ot(n,Ni(Jo)),i|=32),Ei(t,i,e,n,r)}));function Zo(e,t,n){var r,i,o,s,u,c,l=0,h=!1,f=!1,d=!0;if("function"!=typeof e)throw new ge(a);function p(t){var n=r,o=i;return r=i=void 0,l=t,s=e.apply(o,n)}function m(e){var n=e-c;return void 0===c||t<=n||n<0||f&&o<=e-l}function g(){var e,n=Wo();if(m(n))return A(n);u=io(g,(e=t-(n-c),f?tn(e,o-(n-l)):e))}function A(e){return u=void 0,d&&r?p(e):(r=i=void 0,s)}function v(){var e=Wo(),n=m(e);if(r=arguments,i=this,c=e,n){if(void 0===u)return l=e=c,u=io(g,t),h?p(e):s;if(f)return Yr(u),u=io(g,t),p(c)}return void 0===u&&(u=io(g,t)),s}return t=Na(t)||0,ba(n)&&(h=!!n.leading,o=(f="maxWait"in n)?en(Na(n.maxWait)||0,t):o,d="trailing"in n?!!n.trailing:d),v.cancel=function(){void 0!==u&&Yr(u),r=c=i=u=void(l=0)},v.flush=function(){return void 0===u?s:A(Wo())},v}qt=Or((function(e,t){return $n(e,1,t)}));var ea=Or((function(e,t,n){return $n(e,Na(t)||0,n)}));function ta(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new ge(a);function n(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;return o.has(i)?o.get(i):(r=e.apply(this,r),n.cache=o.set(i,r)||o,r)}return n.cache=new(ta.Cache||On),n}function na(e){if("function"!=typeof e)throw new ge(a);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}ta.Cache=On;Wr=Wr((function(e,t){var n=(t=1==t.length&&la(t[0])?Ze(t[0],At(Fi())):Ze(Yn(t,1),At(Fi()))).length;return Or((function(r){for(var i=-1,o=tn(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return qe(e,this,r)}))}));var ra=Or((function(e,t){return Ei(e,32,void 0,t,Ot(t,Ni(ra)))})),ia=Or((function(e,t){return Ei(e,64,void 0,t,Ot(t,Ni(ia)))})),oa=Di((function(e,t){return Ei(e,256,void 0,void 0,void 0,t)}));function aa(e,t){return e===t||e!=e&&t!=t}var sa=yi(or),ua=yi((function(e,t){return t<=e})),ca=lr(function(){return arguments}())?lr:function(e){return ya(e)&&Ee.call(e,"callee")&&!Lt.call(e,"callee")},la=n.isArray,ha=Ue?At(Ue):function(e){return ya(e)&&ir(e)==k};function fa(e){return null!=e&&va(e.length)&&!ga(e)}function da(e){return ya(e)&&fa(e)}var pa=ve||Ns;ve=ze?At(ze):function(e){return ya(e)&&ir(e)==f};function ma(e){var t;return!!ya(e)&&((t=ir(e))==d||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!Ca(e))}function ga(e){return!!ba(e)&&((e=ir(e))==p||e==m||"[object AsyncFunction]"==e||"[object Proxy]"==e)}function Aa(e){return"number"==typeof e&&e==Ma(e)}function va(e){return"number"==typeof e&&-1<e&&e%1==0&&e<=9007199254740991}function ba(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function ya(e){return null!=e&&"object"==typeof e}var wa=He?At(He):function(e){return ya(e)&&Hi(e)==g};function xa(e){return"number"==typeof e||ya(e)&&ir(e)==A}function Ca(e){return!(!ya(e)||ir(e)!=v)&&(null===(e=Rt(e))||"function"==typeof(e=Ee.call(e,"constructor")&&e.constructor)&&e instanceof e&&Ce.call(e)==Re)}var ka=$e?At($e):function(e){return ya(e)&&ir(e)==b},Ea=Qe?At(Qe):function(e){return ya(e)&&Hi(e)==y};function Sa(e){return"string"==typeof e||!la(e)&&ya(e)&&ir(e)==w}function _a(e){return"symbol"==typeof e||ya(e)&&ir(e)==x}var Oa=Ve?At(Ve):function(e){return ya(e)&&va(e.length)&&!!Te[ir(e)]},Ta=yi(gr),Da=yi((function(e,t){return e<=t}));function Ba(e){if(!e)return[];if(fa(e))return(Sa(e)?Bt:ri)(e);var t;if(Ht&&e[Ht]){for(var n,r=e[Ht](),i=[];!(n=r.next()).done;)i.push(n.value);return i}return((t=Hi(e))==g?St:t==y?Tt:os)(e)}function Ia(e){return e?(e=Na(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function Ma(e){var t=(e=Ia(e))%1;return e==e?t?e-t:e:0}function ja(e){return e?Un(Ma(e),0,4294967295):0}function Na(e){if("number"==typeof e)return e;if(_a(e))return NaN;if("string"!=typeof(e=ba(e)?ba(t="function"==typeof e.valueOf?e.valueOf():e)?t+"":t:e))return 0===e?e:+e;e=gt(e);var t=ae.test(e);return t||ue.test(e)?Me(e.slice(2),t?2:8):oe.test(e)?NaN:+e}function Fa(e){return ii(e,Xa(e))}function Ra(e){return null==e?"":Rr(e)}var Pa=ai((function(e,t){if(Xi(t)||fa(t))ii(t,Ya(t),e);else for(var n in t)Ee.call(t,n)&&jn(e,n,t[n])})),La=ai((function(e,t){ii(t,Xa(t),e)})),Ua=ai((function(e,t,n,r){ii(t,Xa(t),e,r)})),za=ai((function(e,t,n,r){ii(t,Ya(t),e,r)})),Ha=Di(Ln),$a=Or((function(e,t){e=de(e);var n=-1,r=t.length,i=2<r?t[2]:void 0;for(i&&Gi(t[0],t[1],i)&&(r=1);++n<r;)for(var o=t[n],a=Xa(o),s=-1,u=a.length;++s<u;){var c=a[s],l=e[c];(void 0===l||aa(l,be[c])&&!Ee.call(e,c))&&(e[c]=o[c])}return e})),Qa=Or((function(e){return e.push(void 0,_i),qe(Za,void 0,e)}));function Va(e,t,n){return void 0===(e=null==e?void 0:nr(e,t))?n:e}function qa(e,t){return null!=e&&$i(e,t,sr)}var Ga=mi((function(e,t,n){e[t=null!=t&&"function"!=typeof t.toString?Ne.call(t):t]=n}),bs(xs)),Wa=mi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=Ne.call(t)),Ee.call(e,t)?e[t].push(n):e[t]=[n]}),Fi),Ka=Or(cr);function Ya(e){return(fa(e)?Bn:mr)(e)}function Xa(e){if(fa(e))return Bn(e,!0);var t=e;if(ba(t)){var n,r=Xi(t),i=[];for(n in t)("constructor"!=n||!r&&Ee.call(t,n))&&i.push(n);return i}var o=[];if(null!=t)for(var a in de(t))o.push(a);return o}var Ja=ai((function(e,t,n){yr(e,t,n)})),Za=ai((function(e,t,n,r){yr(e,t,n,r)})),es=Di((function(e,t){var n={};if(null!=e){var r=!1;t=Ze(t,(function(t){return t=Gr(t,e),r=r||1<t.length,t})),ii(e,Ii(e),n),r&&(n=zn(n,7,Oi));for(var i=t.length;i--;)Lr(n,t[i])}return n})),ts=Di((function(e,t){return null==e?{}:Cr(n=e,t,(function(e,t){return qa(n,t)}));var n}));function ns(e,t){var n;return null==e?{}:(n=Ze(Ii(e),(function(e){return[e]})),t=Fi(t),Cr(e,n,(function(e,n){return t(e,n[0])})))}var rs=ki(Ya),is=ki(Xa);function os(e){return null==e?[]:vt(e,Ya(e))}var as=li((function(e,t,n){return t=t.toLowerCase(),e+(n?ss(t):t)}));function ss(e){return ms(Ra(e).toLowerCase())}function us(e){return(e=Ra(e))&&e.replace(le,xt).replace(xe,"")}var cs=li((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),ls=li((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),hs=ci("toLowerCase"),fs=li((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),ds=li((function(e,t,n){return e+(n?" ":"")+ms(t)})),ps=li((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),ms=ci("toUpperCase");function gs(e,t,n){return e=Ra(e),void 0===(t=n?void 0:t)?(n=e,Se.test(n)?e.match(ke)||[]:e.match(ee)||[]):e.match(t)||[]}var As=Or((function(e,t){try{return qe(e,void 0,t)}catch(e){return ma(e)?e:new i(e)}})),vs=Di((function(e,t){return We(t,(function(t){t=ho(t),Pn(e,t,Xo(e[t],e))})),e}));function bs(e){return function(){return e}}var ys=di(),ws=di(!0);function xs(e){return e}function Cs(e){return pr("function"==typeof e?e:zn(e,1))}var ks=Or((function(e,t){return function(n){return cr(n,e,t)}})),Es=Or((function(e,t){return function(n){return cr(e,n,t)}}));function Ss(e,t,n){var r=Ya(t),i=tr(t,r),o=(null!=n||ba(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=tr(t,Ya(t))),!(ba(n)&&"chain"in n&&!n.chain)),a=ga(e);return We(i,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t,n=this.__chain__;return o||n?(((t=e(this.__wrapped__)).__actions__=ri(this.__actions__)).push({func:r,args:arguments,thisArg:e}),t.__chain__=n,t):r.apply(e,et([this.value()],arguments))})})),e}function _s(){}var Os=Ai(Ze),Ts=Ai(Ke),Ds=Ai(rt);function Bs(e){return Wi(e)?ht(ho(e)):(t=e,function(e){return nr(e,t)});var t}var Is=bi(),Ms=bi(!0);function js(){return[]}function Ns(){return!1}var Fs,Rs=gi((function(e,t){return e+t}),0),Ps=xi("ceil"),Ls=gi((function(e,t){return e/t}),1),Us=xi("floor"),zs=gi((function(e,t){return e*t}),1),Hs=xi("round"),$s=gi((function(e,t){return e-t}),0);return yn.after=function(e,t){if("function"!=typeof t)throw new ge(a);return e=Ma(e),function(){if(--e<1)return t.apply(this,arguments)}},yn.ary=Ko,yn.assign=Pa,yn.assignIn=La,yn.assignInWith=Ua,yn.assignWith=za,yn.at=Ha,yn.before=Yo,yn.bind=Xo,yn.bindAll=vs,yn.bindKey=Jo,yn.castArray=function(){var e;return arguments.length?la(e=arguments[0])?e:[e]:[]},yn.chain=jo,yn.chunk=function(e,t,r){t=(r?Gi(e,t,r):void 0===t)?1:en(Ma(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var o=0,a=0,s=n(Wt(i/t));o<i;)s[a++]=Br(e,o,o+=t);return s},yn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i},yn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=n(e-1),r=arguments[0],i=e;i--;)t[i-1]=arguments[i];return et(la(r)?ri(r):[r],Yn(t,1))},yn.cond=function(e){var t=null==e?0:e.length,n=Fi();return e=t?Ze(e,(function(e){if("function"!=typeof e[1])throw new ge(a);return[n(e[0]),e[1]]})):[],Or((function(n){for(var r=-1;++r<t;){var i=e[r];if(qe(i[0],this,n))return qe(i[1],this,n)}}))},yn.conforms=function(e){return t=zn(e,1),n=Ya(t),function(e){return Hn(e,t,n)};var t,n},yn.constant=bs,yn.countBy=Ro,yn.create=function(e,t){return e=wn(e),null==t?e:Rn(e,t)},yn.curry=function e(t,n,r){return(t=Ei(t,8,void 0,void 0,void 0,void 0,void 0,n=r?void 0:n)).placeholder=e.placeholder,t},yn.curryRight=function e(t,n,r){return(t=Ei(t,16,void 0,void 0,void 0,void 0,void 0,n=r?void 0:n)).placeholder=e.placeholder,t},yn.debounce=Zo,yn.defaults=$a,yn.defaultsDeep=Qa,yn.defer=qt,yn.delay=ea,yn.difference=r,yn.differenceBy=un,yn.differenceWith=t,yn.drop=function(e,t,n){var r=null==e?0:e.length;return r?Br(e,(t=n||void 0===t?1:Ma(t))<0?0:t,r):[]},yn.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?Br(e,0,(t=r-(n||void 0===t?1:Ma(t)))<0?0:t):[]},yn.dropRightWhile=function(e,t){return e&&e.length?zr(e,Fi(t,3),!0,!0):[]},yn.dropWhile=function(e,t){return e&&e.length?zr(e,Fi(t,3),!0):[]},yn.fill=function(e,t,n,r){if(u=null==e?0:e.length){n&&"number"!=typeof n&&Gi(e,t,n)&&(n=0,r=u);var i=e,o=t,a=n,s=r,u=i.length;for((a=Ma(a))<0&&(a=u<-a?0:u+a),(s=void 0===s||u<s?u:Ma(s))<0&&(s+=u),s=s<a?0:ja(s);a<s;)i[a++]=o;return i}return[]},yn.filter=function(e,t){return(la(e)?Ye:Kn)(e,Fi(t,3))},yn.flatMap=function(e,t){return Yn(Vo(e,t),1)},yn.flatMapDeep=function(e,t){return Yn(Vo(e,t),1/0)},yn.flatMapDepth=function(e,t,n){return n=void 0===n?1:Ma(n),Yn(Vo(e,t),n)},yn.flatten=Ao,yn.flattenDeep=function(e){return null!=e&&e.length?Yn(e,1/0):[]},yn.flattenDepth=function(e,t){return null!=e&&e.length?Yn(e,t=void 0===t?1:Ma(t)):[]},yn.flip=function(e){return Ei(e,512)},yn.flow=ys,yn.flowRight=ws,yn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},yn.functions=function(e){return null==e?[]:tr(e,Ya(e))},yn.functionsIn=function(e){return null==e?[]:tr(e,Xa(e))},yn.groupBy=Ho,yn.initial=function(e){return null!=e&&e.length?Br(e,0,-1):[]},yn.intersection=ye,yn.intersectionBy=Gt,yn.intersectionWith=ft,yn.invert=Ga,yn.invertBy=Wa,yn.invokeMap=$o,yn.iteratee=Cs,yn.keyBy=Qo,yn.keys=Ya,yn.keysIn=Xa,yn.map=Vo,yn.mapKeys=function(e,t){var n={};return t=Fi(t,3),Zn(e,(function(e,r,i){Pn(n,t(e,r,i),e)})),n},yn.mapValues=function(e,t){var n={};return t=Fi(t,3),Zn(e,(function(e,r,i){Pn(n,r,t(e,r,i))})),n},yn.matches=function(e){return vr(zn(e,1))},yn.matchesProperty=function(e,t){return br(e,zn(t,1))},yn.memoize=ta,yn.merge=Ja,yn.mergeWith=Za,yn.method=ks,yn.methodOf=Es,yn.mixin=Ss,yn.negate=na,yn.nthArg=function(e){return e=Ma(e),Or((function(t){return wr(t,e)}))},yn.omit=es,yn.omitBy=function(e,t){return ns(e,na(Fi(t)))},yn.once=function(e){return Yo(2,e)},yn.orderBy=function(e,t,n,r){return null==e?[]:xr(e,t=la(t)?t:null==t?[]:[t],n=la(n=r?void 0:n)?n:null==n?[]:[n])},yn.over=Os,yn.overArgs=Wr,yn.overEvery=Ts,yn.overSome=Ds,yn.partial=ra,yn.partialRight=ia,yn.partition=qo,yn.pick=ts,yn.pickBy=ns,yn.property=Bs,yn.propertyOf=function(e){return function(t){return null==e?void 0:nr(e,t)}},yn.pull=Vt,yn.pullAll=yo,yn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?kr(e,t,Fi(n,2)):e},yn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?kr(e,t,void 0,n):e},yn.pullAt=wo,yn.range=Is,yn.rangeRight=Ms,yn.rearg=oa,yn.reject=function(e,t){return(la(e)?Ye:Kn)(e,na(Fi(t,3)))},yn.remove=function(e,t){var n=[];if(e&&e.length){var r=-1,i=[],o=e.length;for(t=Fi(t,3);++r<o;){var a=e[r];t(a,r,e)&&(n.push(a),i.push(r))}Er(e,i)}return n},yn.rest=function(e,t){if("function"!=typeof e)throw new ge(a);return Or(e,t=void 0===t?t:Ma(t))},yn.reverse=xo,yn.sampleSize=function(e,t,n){return t=(n?Gi(e,t,n):void 0===t)?1:Ma(t),(la(e)?function(e,t){return uo(ri(e),Un(t,0,e.length))}:function(e,t){return uo(e=os(e),Un(t,0,e.length))})(e,t)},yn.set=function(e,t,n){return null==e?e:Tr(e,t,n)},yn.setWith=function(e,t,n,r){return r="function"==typeof r?r:void 0,null==e?e:Tr(e,t,n,r)},yn.shuffle=function(e){return(la(e)?function(e){return uo(ri(e))}:function(e){return uo(os(e))})(e)},yn.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n=n&&"number"!=typeof n&&Gi(e,t,n)?(t=0,r):(t=null==t?0:Ma(t),void 0===n?r:Ma(n)),Br(e,t,n)):[]},yn.sortBy=Go,yn.sortedUniq=function(e){return e&&e.length?Nr(e):[]},yn.sortedUniqBy=function(e,t){return e&&e.length?Nr(e,Fi(t,2)):[]},yn.split=function(e,t,n){return n&&"number"!=typeof n&&Gi(e,t,n)&&(t=n=void 0),(n=void 0===n?4294967295:n>>>0)?(e=Ra(e))&&("string"==typeof t||null!=t&&!ka(t))&&!(t=Rr(t))&&Et(e)?Kr(Bt(e),0,n):e.split(t,n):[]},yn.spread=function(e,t){if("function"!=typeof e)throw new ge(a);return t=null==t?0:en(Ma(t),0),Or((function(n){var r=n[t];n=Kr(n,0,t);return r&&et(n,r),qe(e,this,n)}))},yn.tail=function(e){var t=null==e?0:e.length;return t?Br(e,1,t):[]},yn.take=function(e,t,n){return e&&e.length?Br(e,0,(t=n||void 0===t?1:Ma(t))<0?0:t):[]},yn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?Br(e,(t=r-(n||void 0===t?1:Ma(t)))<0?0:t,r):[]},yn.takeRightWhile=function(e,t){return e&&e.length?zr(e,Fi(t,3),!1,!0):[]},yn.takeWhile=function(e,t){return e&&e.length?zr(e,Fi(t,3)):[]},yn.tap=function(e,t){return t(e),e},yn.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new ge(a);return ba(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Zo(e,t,{leading:r,maxWait:t,trailing:i})},yn.thru=No,yn.toArray=Ba,yn.toPairs=rs,yn.toPairsIn=is,yn.toPath=function(e){return la(e)?Ze(e,ho):_a(e)?[e]:ri(lo(Ra(e)))},yn.toPlainObject=Fa,yn.transform=function(e,t,n){var r,i=la(e),o=i||pa(e)||Oa(e);return t=Fi(t,4),null==n&&(r=e&&e.constructor,n=o?i?new r:[]:ba(e)&&ga(r)?wn(Rt(e)):{}),(o?We:Zn)(e,(function(e,r,i){return t(n,e,r,i)})),n},yn.unary=function(e){return Ko(e,1)},yn.union=Co,yn.unionBy=ko,yn.unionWith=Eo,yn.uniq=function(e){return e&&e.length?Pr(e):[]},yn.uniqBy=function(e,t){return e&&e.length?Pr(e,Fi(t,2)):[]},yn.uniqWith=function(e,t){return t="function"==typeof t?t:void 0,e&&e.length?Pr(e,void 0,t):[]},yn.unset=function(e,t){return null==e||Lr(e,t)},yn.unzip=So,yn.unzipWith=_o,yn.update=function(e,t,n){return null==e?e:Ur(e,t,qr(n))},yn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:void 0,null==e?e:Ur(e,t,qr(n),r)},yn.values=os,yn.valuesIn=function(e){return null==e?[]:vt(e,Xa(e))},yn.without=Oo,yn.words=gs,yn.wrap=function(e,t){return ra(qr(t),e)},yn.xor=To,yn.xorBy=Do,yn.xorWith=Bo,yn.zip=Io,yn.zipObject=function(e,t){return Qr(e||[],t||[],jn)},yn.zipObjectDeep=function(e,t){return Qr(e||[],t||[],Tr)},yn.zipWith=Mo,yn.entries=rs,yn.entriesIn=is,yn.extend=La,yn.extendWith=Ua,Ss(yn,yn),yn.add=Rs,yn.attempt=As,yn.camelCase=as,yn.capitalize=ss,yn.ceil=Ps,yn.clamp=function(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=Na(n))==n?n:0),void 0!==t&&(t=(t=Na(t))==t?t:0),Un(Na(e),t,n)},yn.clone=function(e){return zn(e,4)},yn.cloneDeep=function(e){return zn(e,5)},yn.cloneDeepWith=function(e,t){return zn(e,5,t="function"==typeof t?t:void 0)},yn.cloneWith=function(e,t){return zn(e,4,t="function"==typeof t?t:void 0)},yn.conformsTo=function(e,t){return null==t||Hn(e,t,Ya(t))},yn.deburr=us,yn.defaultTo=function(e,t){return null==e||e!=e?t:e},yn.divide=Ls,yn.endsWith=function(e,t,n){e=Ra(e),t=Rr(t);var r=e.length;r=n=void 0===n?r:Un(Ma(n),0,r);return 0<=(n-=t.length)&&e.slice(n,r)==t},yn.eq=aa,yn.escape=function(e){return(e=Ra(e))&&U.test(e)?e.replace(P,Ct):e},yn.escapeRegExp=function(e){return(e=Ra(e))&&W.test(e)?e.replace(G,"\\$&"):e},yn.every=function(e,t,n){return(la(e)?Ke:Gn)(e,Fi(t=n&&Gi(e,t,n)?void 0:t,3))},yn.find=Po,yn.findIndex=mo,yn.findKey=function(e,t){return ot(e,Fi(t,3),Zn)},yn.findLast=Lo,yn.findLastIndex=go,yn.findLastKey=function(e,t){return ot(e,Fi(t,3),er)},yn.floor=Us,yn.forEach=Uo,yn.forEachRight=zo,yn.forIn=function(e,t){return null==e?e:Xn(e,Fi(t,3),Xa)},yn.forInRight=function(e,t){return null==e?e:Jn(e,Fi(t,3),Xa)},yn.forOwn=function(e,t){return e&&Zn(e,Fi(t,3))},yn.forOwnRight=function(e,t){return e&&er(e,Fi(t,3))},yn.get=Va,yn.gt=sa,yn.gte=ua,yn.has=function(e,t){return null!=e&&$i(e,t,ar)},yn.hasIn=qa,yn.head=vo,yn.identity=xs,yn.includes=function(e,t,n,r){return e=fa(e)?e:os(e),n=n&&!r?Ma(n):0,r=e.length,n<0&&(n=en(r+n,0)),Sa(e)?n<=r&&-1<e.indexOf(t,n):!!r&&-1<st(e,t,n)},yn.indexOf=function(e,t,n){var r=null==e?0:e.length;return r?st(e,t,e=(e=null==n?0:Ma(n))<0?en(r+e,0):e):-1},yn.inRange=function(e,t,n){return t=Ia(t),void 0===n?(n=t,t=0):n=Ia(n),(e=e=Na(e))>=tn(t=t,n=n)&&e<en(t,n)},yn.invoke=Ka,yn.isArguments=ca,yn.isArray=la,yn.isArrayBuffer=ha,yn.isArrayLike=fa,yn.isArrayLikeObject=da,yn.isBoolean=function(e){return!0===e||!1===e||ya(e)&&ir(e)==h},yn.isBuffer=pa,yn.isDate=ve,yn.isElement=function(e){return ya(e)&&1===e.nodeType&&!Ca(e)},yn.isEmpty=function(e){if(null!=e){if(fa(e)&&(la(e)||"string"==typeof e||"function"==typeof e.splice||pa(e)||Oa(e)||ca(e)))return!e.length;var t,n=Hi(e);if(n==g||n==y)return!e.size;if(Xi(e))return!mr(e).length;for(t in e)if(Ee.call(e,t))return!1}return!0},yn.isEqual=function(e,t){return hr(e,t)},yn.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:void 0)?n(e,t):void 0;return void 0===r?hr(e,t,void 0,n):!!r},yn.isError=ma,yn.isFinite=function(e){return"number"==typeof e&&Xt(e)},yn.isFunction=ga,yn.isInteger=Aa,yn.isLength=va,yn.isMap=wa,yn.isMatch=function(e,t){return e===t||fr(e,t,Pi(t))},yn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:void 0,fr(e,t,Pi(t),n)},yn.isNaN=function(e){return xa(e)&&e!=+e},yn.isNative=function(e){if(Yi(e))throw new i("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return dr(e)},yn.isNil=function(e){return null==e},yn.isNull=function(e){return null===e},yn.isNumber=xa,yn.isObject=ba,yn.isObjectLike=ya,yn.isPlainObject=Ca,yn.isRegExp=ka,yn.isSafeInteger=function(e){return Aa(e)&&-9007199254740991<=e&&e<=9007199254740991},yn.isSet=Ea,yn.isString=Sa,yn.isSymbol=_a,yn.isTypedArray=Oa,yn.isUndefined=function(e){return void 0===e},yn.isWeakMap=function(e){return ya(e)&&Hi(e)==C},yn.isWeakSet=function(e){return ya(e)&&"[object WeakSet]"==ir(e)},yn.join=function(e,t){return null==e?"":Jt.call(e,t)},yn.kebabCase=cs,yn.last=bo,yn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(r){var i=r;if(void 0!==n&&(i=(i=Ma(n))<0?en(r+i,0):tn(i,r-1)),t==t){for(var o=e,a=t,s=i+1;s--;)if(o[s]===a)return s;return s}return at(e,ct,i,!0)}return-1},yn.lowerCase=ls,yn.lowerFirst=hs,yn.lt=Ta,yn.lte=Da,yn.max=function(e){return e&&e.length?Wn(e,xs,or):void 0},yn.maxBy=function(e,t){return e&&e.length?Wn(e,Fi(t,2),or):void 0},yn.mean=function(e){return lt(e,xs)},yn.meanBy=function(e,t){return lt(e,Fi(t,2))},yn.min=function(e){return e&&e.length?Wn(e,xs,gr):void 0},yn.minBy=function(e,t){return e&&e.length?Wn(e,Fi(t,2),gr):void 0},yn.stubArray=js,yn.stubFalse=Ns,yn.stubObject=function(){return{}},yn.stubString=function(){return""},yn.stubTrue=function(){return!0},yn.multiply=zs,yn.nth=function(e,t){return e&&e.length?wr(e,Ma(t)):void 0},yn.noConflict=function(){return Fe._===this&&(Fe._=Le),this},yn.noop=_s,yn.now=Wo,yn.pad=function(e,t,n){e=Ra(e);var r=(t=Ma(t))?Dt(e):0;return!t||t<=r?e:vi(Kt(t=(t-r)/2),n)+e+vi(Wt(t),n)},yn.padEnd=function(e,t,n){e=Ra(e);var r=(t=Ma(t))?Dt(e):0;return t&&r<t?e+vi(t-r,n):e},yn.padStart=function(e,t,n){e=Ra(e);var r=(t=Ma(t))?Dt(e):0;return t&&r<t?vi(t-r,n)+e:e},yn.parseInt=function(e,t,n){return t=n||null==t?0:t&&+t,rn(Ra(e).replace(K,""),t||0)},yn.random=function(e,t,n){var r;return n&&"boolean"!=typeof n&&Gi(e,t,n)&&(t=n=void 0),void 0===n&&("boolean"==typeof t?(n=t,t=void 0):"boolean"==typeof e&&(n=e,e=void 0)),void 0===e&&void 0===t?(e=0,t=1):(e=Ia(e),void 0===t?(t=e,e=0):t=Ia(t)),t<e&&(r=e,e=t,t=r),n||e%1||t%1?(r=on(),tn(e+r*(t-e+Ie("1e-"+((r+"").length-1))),t)):Sr(e,t)},yn.reduce=function(e,t,n){var r=la(e)?tt:dt,i=arguments.length<3;return r(e,Fi(t,4),n,i,Vn)},yn.reduceRight=function(e,t,n){var r=la(e)?nt:dt,i=arguments.length<3;return r(e,Fi(t,4),n,i,qn)},yn.repeat=function(e,t,n){return t=(n?Gi(e,t,n):void 0===t)?1:Ma(t),_r(Ra(e),t)},yn.replace=function(){var e=arguments,t=Ra(e[0]);return e.length<3?t:t.replace(e[1],e[2])},yn.result=function(e,t,n){var r=-1,i=(t=Gr(t,e)).length;for(i||(i=1,e=void 0);++r<i;){var o=null==e?void 0:e[ho(t[r])];void 0===o&&(r=i,o=n),e=ga(o)?o.call(e):o}return e},yn.round=Hs,yn.runInContext=e,yn.sample=function(e){return(la(e)?In:function(e){return In(os(e))})(e)},yn.size=function(e){var t;return null==e?0:fa(e)?Sa(e)?Dt(e):e.length:(t=Hi(e))==g||t==y?e.size:mr(e).length},yn.snakeCase=fs,yn.some=function(e,t,n){return(la(e)?rt:Ir)(e,Fi(t=n&&Gi(e,t,n)?void 0:t,3))},yn.sortedIndex=function(e,t){return Mr(e,t)},yn.sortedIndexBy=function(e,t,n){return jr(e,t,Fi(n,2))},yn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=Mr(e,t);if(r<n&&aa(e[r],t))return r}return-1},yn.sortedLastIndex=function(e,t){return Mr(e,t,!0)},yn.sortedLastIndexBy=function(e,t,n){return jr(e,t,Fi(n,2),!0)},yn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=Mr(e,t,!0)-1;if(aa(e[n],t))return n}return-1},yn.startCase=ds,yn.startsWith=function(e,t,n){return e=Ra(e),n=null==n?0:Un(Ma(n),0,e.length),t=Rr(t),e.slice(n,n+t.length)==t},yn.subtract=$s,yn.sum=function(e){return e&&e.length?pt(e,xs):0},yn.sumBy=function(e,t){return e&&e.length?pt(e,Fi(t,2)):0},yn.template=function(e,t,n){var r=yn.templateSettings;n&&Gi(e,t,n)&&(t=void 0),e=Ra(e),t=Ua({},t,r,Si);var a,s,u=Ya(n=Ua({},t.imports,r.imports,Si)),c=vt(n,u),l=0,h=(r=t.interpolate||he,"__p += '"),f=(n=pe((t.escape||he).source+"|"+r.source+"|"+(r===$?re:he).source+"|"+(t.evaluate||he).source+"|$","g"),"//# sourceURL="+(Ee.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Oe+"]")+"\n");if(r=(e.replace(n,(function(t,n,r,i,o,u){return r=r||i,h+=e.slice(l,u).replace(fe,kt),n&&(a=!0,h+="' +\n__e("+n+") +\n'"),o&&(s=!0,h+="';\n"+o+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=u+t.length,t})),h+="';\n",Ee.call(t,"variable")&&t.variable)){if(te.test(r))throw new i("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";if(h=(s?h.replace(j,""):h).replace(N,"$1").replace(F,"$1;"),h="function("+(r||"obj")+") {\n"+(r?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(a?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}",(n=As((function(){return o(u,f+"return "+h).apply(void 0,c)}))).source=h,ma(n))throw n;return n},yn.times=function(e,t){if((e=Ma(e))<1||9007199254740991<e)return[];var n=4294967295,r=tn(e,4294967295);for(e-=4294967295,r=mt(r,t=Fi(t));++n<e;)t(n);return r},yn.toFinite=Ia,yn.toInteger=Ma,yn.toLength=ja,yn.toLower=function(e){return Ra(e).toLowerCase()},yn.toNumber=Na,yn.toSafeInteger=function(e){return e?Un(Ma(e),-9007199254740991,9007199254740991):0===e?e:0},yn.toString=Ra,yn.toUpper=function(e){return Ra(e).toUpperCase()},yn.trim=function(e,t,n){return(e=Ra(e))&&(n||void 0===t)?gt(e):e&&(t=Rr(t))?Kr(n=Bt(e),yt(n,t=Bt(t)),wt(n,t)+1).join(""):e},yn.trimEnd=function(e,t,n){return(e=Ra(e))&&(n||void 0===t)?e.slice(0,It(e)+1):e&&(t=Rr(t))?Kr(n=Bt(e),0,wt(n,Bt(t))+1).join(""):e},yn.trimStart=function(e,t,n){return(e=Ra(e))&&(n||void 0===t)?e.replace(K,""):e&&(t=Rr(t))?Kr(n=Bt(e),yt(n,Bt(t))).join(""):e},yn.truncate=function(e,t){var n,r=30,i="...";ba(t)&&(n="separator"in t?t.separator:n,r="length"in t?Ma(t.length):r,i="omission"in t?Rr(t.omission):i),t=(e=Ra(e)).length;if((t=Et(e)?(o=Bt(e)).length:t)<=r)return e;if((t=r-Dt(i))<1)return i;var o;r=o?Kr(o,0,t).join(""):e.slice(0,t);if(void 0!==n)if(o&&(t+=r.length-t),ka(n)){if(e.slice(t).search(n)){var a,s=r;for((n=n.global?n:pe(n.source,Ra(ie.exec(n))+"g")).lastIndex=0;a=n.exec(s);)var u=a.index;r=r.slice(0,void 0===u?t:u)}}else e.indexOf(Rr(n),t)==t||-1<(o=r.lastIndexOf(n))&&(r=r.slice(0,o));return r+i},yn.unescape=function(e){return(e=Ra(e))&&L.test(e)?e.replace(R,Mt):e},yn.uniqueId=function(e){var t=++Be;return Ra(e)+t},yn.upperCase=ps,yn.upperFirst=ms,yn.each=Uo,yn.eachRight=zo,yn.first=vo,Ss(yn,(Fs={},Zn(yn,(function(e,t){Ee.call(yn.prototype,t)||(Fs[t]=e)})),Fs),{chain:!1}),yn.VERSION="4.17.21",We(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){yn[e].placeholder=yn})),We(["drop","take"],(function(e,t){En.prototype[e]=function(n){n=void 0===n?1:en(Ma(n),0);var r=this.__filtered__&&!t?new En(this):this.clone();return r.__filtered__?r.__takeCount__=tn(n,r.__takeCount__):r.__views__.push({size:tn(n,4294967295),type:e+(r.__dir__<0?"Right":"")}),r},En.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),We(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;En.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Fi(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),We(["head","last"],(function(e,t){var n="take"+(t?"Right":"");En.prototype[e]=function(){return this[n](1).value()[0]}})),We(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");En.prototype[e]=function(){return this.__filtered__?new En(this):this[n](1)}})),En.prototype.compact=function(){return this.filter(xs)},En.prototype.find=function(e){return this.filter(e).head()},En.prototype.findLast=function(e){return this.reverse().find(e)},En.prototype.invokeMap=Or((function(e,t){return"function"==typeof e?new En(this):this.map((function(n){return cr(n,e,t)}))})),En.prototype.reject=function(e){return this.filter(na(Fi(e)))},En.prototype.slice=function(e,t){e=Ma(e);var n=this;return n.__filtered__&&(0<e||t<0)?new En(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),n=void 0!==t?(t=Ma(t))<0?n.dropRight(-t):n.take(t-e):n)},En.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},En.prototype.toArray=function(){return this.take(4294967295)},Zn(En.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=yn[r?"take"+("last"==t?"Right":""):t],o=r||/^find/.test(t);i&&(yn.prototype[t]=function(){function t(e){return e=i.apply(yn,et([e],u)),r&&f?e[0]:e}var a,s=this.__wrapped__,u=r?[1]:arguments,c=s instanceof En,l=u[0],h=c||la(s),f=(h&&n&&"function"==typeof l&&1!=l.length&&(c=h=!1),this.__chain__),d=(l=!!this.__actions__.length,o&&!f);c=c&&!l;return!o&&h?(s=c?s:new En(this),(a=e.apply(s,u)).__actions__.push({func:No,args:[t],thisArg:void 0}),new kn(a,f)):d&&c?e.apply(this,u):(a=this.thru(t),d?r?a.value()[0]:a.value():a)})})),We(["pop","push","shift","sort","splice","unshift"],(function(e){var t=Ae[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);yn.prototype[e]=function(){var e,i=arguments;return r&&!this.__chain__?(e=this.value(),t.apply(la(e)?e:[],i)):this[n]((function(e){return t.apply(la(e)?e:[],i)}))}})),Zn(En.prototype,(function(e,t){var n,r=yn[t];r&&(n=r.name+"",Ee.call(fn,n)||(fn[n]=[]),fn[n].push({name:t,func:r}))})),fn[pi(void 0,2).name]=[{name:"wrapper",func:void 0}],En.prototype.clone=function(){var e=new En(this.__wrapped__);return e.__actions__=ri(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=ri(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=ri(this.__views__),e},En.prototype.reverse=function(){var e;return this.__filtered__?((e=new En(this)).__dir__=-1,e.__filtered__=!0):(e=this.clone()).__dir__*=-1,e},En.prototype.value=function(){var e,t=this.__wrapped__.value(),n=this.__dir__,r=la(t),i=n<0,o=r?t.length:0,a=(e=function(e,t,n){for(var r=-1,i=n.length;++r<i;){var o=n[r],a=o.size;switch(o.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=tn(t,e+a);break;case"takeRight":e=en(e,t-a)}}return{start:e,end:t}}(0,o,this.__views__)).start,s=(e=e.end)-a,u=i?e:a-1,c=this.__iteratees__,l=c.length,h=0,f=tn(s,this.__takeCount__);if(!r||!i&&o==s&&f==s)return Hr(t,this.__actions__);var d=[];e:for(;s--&&h<f;){for(var p=-1,m=t[u+=n];++p<l;){var g=(A=c[p]).iteratee,A=A.type;g=g(m);if(2==A)m=g;else if(!g){if(1==A)continue e;break e}}d[h++]=m}return d},yn.prototype.at=Fo,yn.prototype.chain=function(){return jo(this)},yn.prototype.commit=function(){return new kn(this.value(),this.__chain__)},yn.prototype.next=function(){void 0===this.__values__&&(this.__values__=Ba(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?void 0:this.__values__[this.__index__++]}},yn.prototype.plant=function(e){for(var t,n=this;n instanceof Cn;){var r=po(n),i=(r.__index__=0,r.__values__=void 0,t?i.__wrapped__=r:t=r,r);n=n.__wrapped__}return i.__wrapped__=e,t},yn.prototype.reverse=function(){var e=this.__wrapped__;return e instanceof En?(e=e,(e=(e=this.__actions__.length?new En(this):e).reverse()).__actions__.push({func:No,args:[xo],thisArg:void 0}),new kn(e,this.__chain__)):this.thru(xo)},yn.prototype.toJSON=yn.prototype.valueOf=yn.prototype.value=function(){return Hr(this.__wrapped__,this.__actions__)},yn.prototype.first=yn.prototype.head,Ht&&(yn.prototype[Ht]=function(){return this}),yn}();Fe._=jt,void 0!==(r=function(){return jt}.call(t,n,t,e))&&(e.exports=r)}.call(this)}},i={},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{"use strict";var e,t,r,i,o,a,s,u,c,l,h,f,d,p,m,g,A,v,b,y,w,x,C,k,E,S,O,T,D,B,I,M,j,N,F,R,P,L,U,z,H,$,Q,V,q,G,W,K,Y,X,J,Z=n(755),ee=n.n(Z),te=(Y=ee(),X=window,J=document,Y.site=Y.fn.site=function(e){var t,n=(new Date).getTime(),r=[],i=e,o="string"==typeof i,a=[].slice.call(arguments,1),s=Y.isPlainObject(e)?Y.extend(!0,{},Y.site.settings,e):Y.extend({},Y.site.settings),u=s.namespace,c=s.error,l="module-"+u,h=Y(J),f=this,d=h.data(l),p={initialize:function(){p.instantiate()},instantiate:function(){p.verbose("Storing instance of site",p),d=p,h.data(l,p)},normalize:function(){p.fix.console(),p.fix.requestAnimationFrame()},fix:{console:function(){p.debug("Normalizing window.console"),void 0!==console&&void 0!==console.log||(p.verbose("Console not available, normalizing events"),p.disable.console()),void 0!==console.group&&void 0!==console.groupEnd&&void 0!==console.groupCollapsed||(p.verbose("Console group not available, normalizing events"),X.console.group=function(){},X.console.groupEnd=function(){},X.console.groupCollapsed=function(){}),void 0===console.markTimeline&&(p.verbose("Mark timeline not available, normalizing events"),X.console.markTimeline=function(){})},consoleClear:function(){p.debug("Disabling programmatic console clearing"),X.console.clear=function(){}},requestAnimationFrame:function(){p.debug("Normalizing requestAnimationFrame"),void 0===X.requestAnimationFrame&&(p.debug("RequestAnimationFrame not available, normalizing event"),X.requestAnimationFrame=X.requestAnimationFrame||X.mozRequestAnimationFrame||X.webkitRequestAnimationFrame||X.msRequestAnimationFrame||function(e){setTimeout(e,0)})}},moduleExists:function(e){return void 0!==Y.fn[e]&&void 0!==Y.fn[e].settings},enabled:{modules:function(e){var t=[];return e=e||s.modules,Y.each(e,(function(e,n){p.moduleExists(n)&&t.push(n)})),t}},disabled:{modules:function(e){var t=[];return e=e||s.modules,Y.each(e,(function(e,n){p.moduleExists(n)||t.push(n)})),t}},change:{setting:function(e,t,n,r){n="string"==typeof n?"all"===n?s.modules:[n]:n||s.modules,r=void 0===r||r,Y.each(n,(function(n,i){var o=!p.moduleExists(i)||Y.fn[i].settings.namespace||!1;p.moduleExists(i)&&(p.verbose("Changing default setting",e,t,i),Y.fn[i].settings[e]=t,r&&o&&0<(o=Y(":data(module-"+o+")")).length&&(p.verbose("Modifying existing settings",o),o[i]("setting",e,t)))}))},settings:function(e,t,n){t="string"==typeof t?[t]:t||s.modules,n=void 0===n||n,Y.each(t,(function(t,r){var i;p.moduleExists(r)&&(p.verbose("Changing default setting",e,r),Y.extend(!0,Y.fn[r].settings,e),n&&u&&0<(i=Y(":data(module-"+u+")")).length&&(p.verbose("Modifying existing settings",i),i[r]("setting",e)))}))}},enable:{console:function(){p.console(!0)},debug:function(e,t){e=e||s.modules,p.debug("Enabling debug for modules",e),p.change.setting("debug",!0,e,t)},verbose:function(e,t){e=e||s.modules,p.debug("Enabling verbose debug for modules",e),p.change.setting("verbose",!0,e,t)}},disable:{console:function(){p.console(!1)},debug:function(e,t){e=e||s.modules,p.debug("Disabling debug for modules",e),p.change.setting("debug",!1,e,t)},verbose:function(e,t){e=e||s.modules,p.debug("Disabling verbose debug for modules",e),p.change.setting("verbose",!1,e,t)}},console:function(e){e?void 0===d.cache.console?p.error(c.console):(p.debug("Restoring console function"),X.console=d.cache.console):(p.debug("Disabling console function"),d.cache.console=X.console,X.console={clear:function(){},error:function(){},group:function(){},groupCollapsed:function(){},groupEnd:function(){},info:function(){},log:function(){},markTimeline:function(){},warn:function(){}})},destroy:function(){p.verbose("Destroying previous site for",h),h.removeData(l)},cache:{},setting:function(e,t){if(Y.isPlainObject(e))Y.extend(!0,s,e);else{if(void 0===t)return s[e];s[e]=t}},internal:function(e,t){if(Y.isPlainObject(e))Y.extend(!0,p,e);else{if(void 0===t)return p[e];p[e]=t}},debug:function(){s.debug&&(s.performance?p.performance.log(arguments):(p.debug=Function.prototype.bind.call(console.info,console,s.name+":"),p.debug.apply(console,arguments)))},verbose:function(){s.verbose&&s.debug&&(s.performance?p.performance.log(arguments):(p.verbose=Function.prototype.bind.call(console.info,console,s.name+":"),p.verbose.apply(console,arguments)))},error:function(){p.error=Function.prototype.bind.call(console.error,console,s.name+":"),p.error.apply(console,arguments)},performance:{log:function(e){var t,i;s.performance&&(i=(t=(new Date).getTime())-(n||t),n=t,r.push({Element:f,Name:e[0],Arguments:[].slice.call(e,1)||"","Execution Time":i})),clearTimeout(p.performance.timer),p.performance.timer=setTimeout(p.performance.display,500)},display:function(){s.name,n=!1,clearTimeout(p.performance.timer),Y.each(r,(function(e,t){t["Execution Time"]})),(void 0!==console.group||void 0!==console.table)&&0<r.length&&!console.table&&Y.each(r,(function(e,t){t.Name,t["Execution Time"]})),r=[]}},invoke:function(e,n,r){var i,o,s,u=d;return n=n||a,r=f||r,"string"==typeof e&&void 0!==u&&(e=e.split(/[\. ]/),i=e.length-1,Y.each(e,(function(t,n){var r=t!=i?n+e[t+1].charAt(0).toUpperCase()+e[t+1].slice(1):e;if(!Y.isPlainObject(u[r])||t==i)return void 0!==u[r]?(o=u[r],!1):Y.isPlainObject(u[n])&&t!=i?void(u=u[n]):(void 0!==u[n]?o=u[n]:p.error(c.method,e),!1);u=u[r]}))),Y.isFunction(o)?s=o.apply(r,n):void 0!==o&&(s=o),Y.isArray(t)?t.push(s):void 0!==t?t=[t,s]:void 0!==s&&(t=s),o}};return o?(void 0===d&&p.initialize(),p.invoke(i)):(void 0!==d&&p.destroy(),p.initialize()),void 0!==t?t:this},Y.site.settings={name:"Site",namespace:"site",error:{console:"Console cannot be restored, most likely it was overwritten outside of module",method:"The method you called is not defined."},debug:!1,verbose:!1,performance:!0,modules:["accordion","api","checkbox","dimmer","dropdown","embed","form","modal","nag","popup","rating","shape","sidebar","state","sticky","tab","transition","visit","visibility"],siteNamespace:"site",namespaceStub:{cache:{},config:{},sections:{},section:{},utilities:{}}},Y.extend(Y.expr[":"],{data:Y.expr.createPseudo?Y.expr.createPseudo((function(e){return function(t){return!!Y.data(t,e)}})):function(e,t,n){return!!Y.data(e,n[3])}}),W=ee(),Z=window,K=document,Z=void 0!==Z&&Z.Math==Math?Z:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),W.fn.form=function(e){var t,n=W(this),r=(n.selector,(new Date).getTime()),i=[],o=e,a=arguments[1],s="string"==typeof o,u=[].slice.call(arguments,1);return n.each((function(){var c,l,h,f,d,p,m,g,A,v,b,y,w,x,C,k,E=W(this),S=this,_=[],O=!1;(k={initialize:function(){k.get.settings(),s?(void 0===C&&k.instantiate(),k.invoke(o)):(void 0!==C&&C.invoke("destroy"),k.verbose("Initializing form validation",E,d),k.bindEvents(),k.set.defaults(),k.instantiate())},instantiate:function(){k.verbose("Storing instance of module",k),C=k,E.data(w,k)},destroy:function(){k.verbose("Destroying previous module",C),k.removeEvents(),E.removeData(w)},refresh:function(){k.verbose("Refreshing selector cache"),c=E.find(g.field),l=E.find(g.group),h=E.find(g.message),E.find(g.prompt),f=E.find(g.submit),E.find(g.clear),E.find(g.reset)},submit:function(){k.verbose("Submitting form",E),E.submit()},attachEvents:function(e,t){t=t||"submit",W(e).on("click"+x,(function(e){k[t](),e.preventDefault()}))},bindEvents:function(){k.verbose("Attaching form events"),E.on("submit"+x,k.validate.form).on("blur"+x,g.field,k.event.field.blur).on("click"+x,g.submit,k.submit).on("click"+x,g.reset,k.reset).on("click"+x,g.clear,k.clear),d.keyboardShortcuts&&E.on("keydown"+x,g.field,k.event.field.keydown),c.each((function(){var e=W(this),t=e.prop("type");t=k.get.changeEvent(t,e);W(this).on(t+x,k.event.field.change)}))},clear:function(){c.each((function(){var e=W(this),t=e.parent(),n=e.closest(l),r=n.find(g.prompt),i=e.data(m.defaultValue)||"",o=t.is(g.uiCheckbox),a=t.is(g.uiDropdown);n.hasClass(A.error)&&(k.verbose("Resetting error on field",n),n.removeClass(A.error),r.remove()),a?(k.verbose("Resetting dropdown value",t,i),t.dropdown("clear")):o?e.prop("checked",!1):(k.verbose("Resetting field value",e,i),e.val(""))}))},reset:function(){c.each((function(){var e=W(this),t=e.parent(),n=e.closest(l),r=n.find(g.prompt),i=e.data(m.defaultValue),o=t.is(g.uiCheckbox),a=t.is(g.uiDropdown),s=n.hasClass(A.error);void 0!==i&&(s&&(k.verbose("Resetting error on field",n),n.removeClass(A.error),r.remove()),a?(k.verbose("Resetting dropdown value",t,i),t.dropdown("restore defaults")):o?(k.verbose("Resetting checkbox value",t,i),e.prop("checked",i)):(k.verbose("Resetting field value",e,i),e.val(i)))}))},determine:{isValid:function(){var e=!0;return W.each(p,(function(t,n){k.validate.field(n,t,!0)||(e=!1)})),e}},is:{bracketedRule:function(e){return e.type&&e.type.match(d.regExp.bracket)},shorthandFields:function(e){return e=e[Object.keys(e)[0]],k.is.shorthandRules(e)},shorthandRules:function(e){return"string"==typeof e||W.isArray(e)},empty:function(e){return!e||0===e.length||(e.is('input[type="checkbox"]')?!e.is(":checked"):k.is.blank(e))},blank:function(e){return""===W.trim(e.val())},valid:function(e){var t=!0;return e?(k.verbose("Checking if field is valid",e),k.validate.field(p[e],e,!1)):(k.verbose("Checking if form is valid"),W.each(p,(function(e,n){k.is.valid(e)||(t=!1)})),t)}},removeEvents:function(){E.off(x),c.off(x),f.off(x),c.off(x)},event:{field:{keydown:function(e){var t=W(this),n=e.which,r=t.is(g.input),i=t.is(g.checkbox),o=0<t.closest(g.uiDropdown).length;27==n&&(k.verbose("Escape key pressed blurring field"),t.blur()),e.ctrlKey||13!=n||!r||o||i||(O||(t.one("keyup"+x,k.event.field.keyup),k.submit(),k.debug("Enter pressed on input submitting form")),O=!0)},keyup:function(){O=!1},blur:function(e){var t=W(this),n=t.closest(l),r=k.get.validation(t);n.hasClass(A.error)?(k.debug("Revalidating field",t,r),r&&k.validate.field(r)):"blur"==d.on&&r&&k.validate.field(r)},change:function(e){var t=W(this),n=t.closest(l),r=k.get.validation(t);r&&("change"==d.on||n.hasClass(A.error)&&d.revalidate)&&(clearTimeout(k.timer),k.timer=setTimeout((function(){k.debug("Revalidating field",t,k.get.validation(t)),k.validate.field(r)}),d.delay))}}},get:{ancillaryValue:function(e){return!(!e.type||!e.value&&!k.is.bracketedRule(e))&&(void 0!==e.value?e.value:e.type.match(d.regExp.bracket)[1]+"")},ruleName:function(e){return k.is.bracketedRule(e)?e.type.replace(e.type.match(d.regExp.bracket)[0],""):e.type},changeEvent:function(e,t){return"checkbox"==e||"radio"==e||"hidden"==e||t.is("select")?"change":k.get.inputEvent()},inputEvent:function(){return void 0!==K.createElement("input").oninput?"input":void 0!==K.createElement("input").onpropertychange?"propertychange":"keyup"},fieldsFromShorthand:function(e){var t={};return W.each(e,(function(e,n){"string"==typeof n&&(n=[n]),t[e]={rules:[]},W.each(n,(function(n,r){t[e].rules.push({type:r})}))})),t},prompt:function(e,t){var n=k.get.ruleName(e),r=k.get.ancillaryValue(e),i=k.get.field(t.identifier),o=i.val(),a=-1!==(o=W.isFunction(e.prompt)?e.prompt(o):e.prompt||d.prompt[n]||d.text.unspecifiedRule).search("{value}"),s=-1!==o.search("{name}");return a&&(o=o.replace("{value}",i.val())),s&&(s=1==(a=i.closest(g.group).find("label").eq(0)).length?a.text():i.prop("placeholder")||d.text.unspecifiedField,o=o.replace("{name}",s)),o=(o=o.replace("{identifier}",t.identifier)).replace("{ruleValue}",r),e.prompt||k.verbose("Using default validation prompt for type",o,n),o},settings:function(){var t;W.isPlainObject(e)?0<(t=Object.keys(e)).length&&void 0!==e[t[0]].identifier&&void 0!==e[t[0]].rules?(d=W.extend(!0,{},W.fn.form.settings,a),p=W.extend({},W.fn.form.settings.defaults,e),k.error(d.error.oldSyntax,S),k.verbose("Extending settings from legacy parameters",p,d)):(e.fields&&k.is.shorthandFields(e.fields)&&(e.fields=k.get.fieldsFromShorthand(e.fields)),d=W.extend(!0,{},W.fn.form.settings,e),p=W.extend({},W.fn.form.settings.defaults,d.fields),k.verbose("Extending settings",p,d)):(d=W.fn.form.settings,p=W.fn.form.settings.defaults,k.verbose("Using default form validation",p,d)),y=d.namespace,m=d.metadata,g=d.selector,A=d.className,v=d.regExp,b=d.error,w="module-"+y,x="."+y,C=E.data(w),k.refresh()},field:function(e){return k.verbose("Finding field with identifier",e),e=k.escape.string(e),0<c.filter("#"+e).length?c.filter("#"+e):0<c.filter('[name="'+e+'"]').length?c.filter('[name="'+e+'"]'):0<c.filter('[name="'+e+'[]"]').length?c.filter('[name="'+e+'[]"]'):0<c.filter("[data-"+m.validate+'="'+e+'"]').length?c.filter("[data-"+m.validate+'="'+e+'"]'):W("<input/>")},fields:function(e){var t=W();return W.each(e,(function(e,n){t=t.add(k.get.field(n))})),t},validation:function(e){var t,n;return!!p&&(W.each(p,(function(r,i){n=i.identifier||r,k.get.field(n)[0]==e[0]&&(i.identifier=n,t=i)})),t||!1)},value:function(e){var t=[];return t.push(e),k.get.values.call(S,t)[e]},values:function(e){e=W.isArray(e)?k.get.fields(e):c;var t={};return e.each((function(e,n){var r=((n=W(n)).prop("type"),n.prop("name")),i=n.val(),o=n.is(g.checkbox),a=n.is(g.radio),s=-1!==r.indexOf("[]");n=!!o&&n.is(":checked");r&&(s?(r=r.replace("[]",""),t[r]||(t[r]=[]),o?n?t[r].push(i||!0):t[r].push(!1):t[r].push(i)):a?void 0!==t[r]&&0!=t[r]||(t[r]=!!n&&(i||!0)):t[r]=o?!!n&&(i||!0):i)})),t}},has:{field:function(e){return k.verbose("Checking for existence of a field with identifier",e),"string"!=typeof(e=k.escape.string(e))&&k.error(b.identifier,e),0<c.filter("#"+e).length||0<c.filter('[name="'+e+'"]').length||0<c.filter("[data-"+m.validate+'="'+e+'"]').length}},escape:{string:function(e){return(e=String(e)).replace(v.escape,"\\$&")}},add:{rule:function(e,t){k.add.field(e,t)},field:function(e,t){var n={};k.is.shorthandRules(t)?(t=W.isArray(t)?t:[t],n[e]={rules:[]},W.each(t,(function(t,r){n[e].rules.push({type:r})}))):n[e]=t,p=W.extend({},p,n),k.debug("Adding rules",n,p)},fields:function(e){e=e&&k.is.shorthandFields(e)?k.get.fieldsFromShorthand(e):e,p=W.extend({},p,e)},prompt:function(e,t){var n=k.get.field(e).closest(l),r=n.children(g.prompt),i=0!==r.length;t="string"==typeof t?[t]:t,k.verbose("Adding field error state",e),n.addClass(A.error),d.inline&&(i||(r=d.templates.prompt(t)).appendTo(n),r.html(t[0]),i?k.verbose("Inline errors are disabled, no inline error added",e):d.transition&&void 0!==W.fn.transition&&E.transition("is supported")?(k.verbose("Displaying error with css transition",d.transition),r.transition(d.transition+" in",d.duration)):(k.verbose("Displaying error with fallback javascript animation"),r.fadeIn(d.duration)))},errors:function(e){k.debug("Adding form error messages",e),k.set.error(),h.html(d.templates.error(e))}},remove:{rule:function(e,t){var n=W.isArray(t)?t:[t];null==t?(k.debug("Removed all rules"),p[e].rules=[]):null!=p[e]&&W.isArray(p[e].rules)&&W.each(p[e].rules,(function(t,r){-1!==n.indexOf(r.type)&&(k.debug("Removed rule",r.type),p[e].rules.splice(t,1))}))},field:function(e){e=W.isArray(e)?e:[e],W.each(e,(function(e,t){k.remove.rule(t)}))},rules:function(e,t){W.isArray(e)?W.each(fields,(function(e,n){k.remove.rule(n,t)})):k.remove.rule(e,t)},fields:function(e){k.remove.field(e)},prompt:function(e){var t=k.get.field(e).closest(l),n=t.children(g.prompt);t.removeClass(A.error),d.inline&&n.is(":visible")&&(k.verbose("Removing prompt for field",e),d.transition&&void 0!==W.fn.transition&&E.transition("is supported")?n.transition(d.transition+" out",d.duration,(function(){n.remove()})):n.fadeOut(d.duration,(function(){n.remove()})))}},set:{success:function(){E.removeClass(A.error).addClass(A.success)},defaults:function(){c.each((function(){var e=W(this),t=0<e.filter(g.checkbox).length?e.is(":checked"):e.val();e.data(m.defaultValue,t)}))},error:function(){E.removeClass(A.success).addClass(A.error)},value:function(e,t){var n={};return n[e]=t,k.set.values.call(S,n)},values:function(e){W.isEmptyObject(e)||W.each(e,(function(e,t){var n,r=k.get.field(e),i=r.parent(),o=(e=W.isArray(t),i.is(g.uiCheckbox)),a=i.is(g.uiDropdown),s=r.is(g.radio)&&o;0<r.length&&(e&&o?(k.verbose("Selecting multiple",t,r),i.checkbox("uncheck"),W.each(t,(function(e,t){n=r.filter('[value="'+t+'"]'),i=n.parent(),0<n.length&&i.checkbox("check")}))):s?(k.verbose("Selecting radio value",t,r),r.filter('[value="'+t+'"]').parent(g.uiCheckbox).checkbox("check")):o?(k.verbose("Setting checkbox value",t,i),!0===t?i.checkbox("check"):i.checkbox("uncheck")):a?(k.verbose("Setting dropdown value",t,i),i.dropdown("set selected",t)):(k.verbose("Setting field value",t,r),r.val(t)))}))}},validate:{form:function(e,t){var n=k.get.values();if(O)return!1;if(_=[],k.determine.isValid()){if(k.debug("Form has no validation errors, submitting"),k.set.success(),!0!==t)return d.onSuccess.call(S,e,n)}else if(k.debug("Form has errors"),k.set.error(),d.inline||k.add.errors(_),void 0!==E.data("moduleApi")&&e.stopImmediatePropagation(),!0!==t)return d.onFailure.call(S,_,n)},field:function(e,t,n){n=void 0===n||n,"string"==typeof e&&(k.verbose("Validating field",e),e=p[t=e]);var r=e.identifier||t,i=(t=k.get.field(r),!!e.depends&&k.get.field(e.depends)),o=!0,a=[];return e.identifier||(k.debug("Using field name as identifier",r),e.identifier=r),t.prop("disabled")?(k.debug("Field is disabled. Skipping",r),o=!0):e.optional&&k.is.blank(t)?(k.debug("Field is optional and blank. Skipping",r),o=!0):e.depends&&k.is.empty(i)?(k.debug("Field depends on another value that is not present or empty. Skipping",i),o=!0):void 0!==e.rules&&W.each(e.rules,(function(t,n){k.has.field(r)&&!k.validate.rule(e,n)&&(k.debug("Field is invalid",r,n.type),a.push(k.get.prompt(n,e)),o=!1)})),o?(n&&(k.remove.prompt(r,a),d.onValid.call(t)),!0):(n&&(_=_.concat(a),k.add.prompt(r,a),d.onInvalid.call(t,a)),!1)},rule:function(e,t){e=k.get.field(e.identifier);var n=(t.type,e.val()),r=k.get.ancillaryValue(t),i=(t=k.get.ruleName(t),d.rules[t]);if(W.isFunction(i))return n=void 0===n||""===n||null===n?"":W.trim(n+""),i.call(e,n,r);k.error(b.noRule,t)}},setting:function(e,t){if(W.isPlainObject(e))W.extend(!0,d,e);else{if(void 0===t)return d[e];d[e]=t}},internal:function(e,t){if(W.isPlainObject(e))W.extend(!0,k,e);else{if(void 0===t)return k[e];k[e]=t}},debug:function(){!d.silent&&d.debug&&(d.performance?k.performance.log(arguments):(k.debug=Function.prototype.bind.call(console.info,console,d.name+":"),k.debug.apply(console,arguments)))},verbose:function(){!d.silent&&d.verbose&&d.debug&&(d.performance?k.performance.log(arguments):(k.verbose=Function.prototype.bind.call(console.info,console,d.name+":"),k.verbose.apply(console,arguments)))},error:function(){d.silent||(k.error=Function.prototype.bind.call(console.error,console,d.name+":"),k.error.apply(console,arguments))},performance:{log:function(e){var t,n;d.performance&&(n=(t=(new Date).getTime())-(r||t),r=t,i.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:S,"Execution Time":n})),clearTimeout(k.performance.timer),k.performance.timer=setTimeout(k.performance.display,500)},display:function(){d.name,r=!1,clearTimeout(k.performance.timer),W.each(i,(function(e,t){t["Execution Time"]})),1<n.length&&n.length,(void 0!==console.group||void 0!==console.table)&&0<i.length&&!console.table&&W.each(i,(function(e,t){t.Name,t["Execution Time"]})),i=[]}},invoke:function(e,n,r){var i,o,a,s=C;return n=n||u,r=S||r,"string"==typeof e&&void 0!==s&&(e=e.split(/[\. ]/),i=e.length-1,W.each(e,(function(t,n){var r=t!=i?n+e[t+1].charAt(0).toUpperCase()+e[t+1].slice(1):e;if(!W.isPlainObject(s[r])||t==i)return void 0!==s[r]?(o=s[r],!1):W.isPlainObject(s[n])&&t!=i?void(s=s[n]):void 0!==s[n]&&(o=s[n],!1);s=s[r]}))),W.isFunction(o)?a=o.apply(r,n):void 0!==o&&(a=o),W.isArray(t)?t.push(a):void 0!==t?t=[t,a]:void 0!==a&&(t=a),o}}).initialize()})),void 0!==t?t:this},W.fn.form.settings={name:"Form",namespace:"form",debug:!1,verbose:!1,performance:!0,fields:!1,keyboardShortcuts:!0,on:"submit",inline:!1,delay:200,revalidate:!0,transition:"scale",duration:200,onValid:function(){},onInvalid:function(){},onSuccess:function(){return!0},onFailure:function(){return!1},metadata:{defaultValue:"default",validate:"validate"},regExp:{htmlID:/^[a-zA-Z][\w:.-]*$/g,bracket:/\[(.*)\]/i,decimal:/^\d+\.?\d*$/,email:/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,escape:/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,flags:/^\/(.*)\/(.*)?/,integer:/^\-?\d+$/,number:/^\-?\d*(\.\d+)?$/,url:/(https?:\/\/(?:www\.|(?!www))[^\s\.]+\.[^\s]{2,}|www\.[^\s]+\.[^\s]{2,})/i},text:{unspecifiedRule:"Please enter a valid value",unspecifiedField:"This field"},prompt:{empty:"{name} must have a value",checked:"{name} must be checked",email:"{name} must be a valid e-mail",url:"{name} must be a valid url",regExp:"{name} is not formatted correctly",integer:"{name} must be an integer",decimal:"{name} must be a decimal number",number:"{name} must be set to a number",is:'{name} must be "{ruleValue}"',isExactly:'{name} must be exactly "{ruleValue}"',not:'{name} cannot be set to "{ruleValue}"',notExactly:'{name} cannot be set to exactly "{ruleValue}"',contain:'{name} must contain "{ruleValue}"',containExactly:'{name} must contain exactly "{ruleValue}"',doesntContain:'{name} cannot contain  "{ruleValue}"',doesntContainExactly:'{name} cannot contain exactly "{ruleValue}"',minLength:"{name} must be at least {ruleValue} characters",length:"{name} must be at least {ruleValue} characters",exactLength:"{name} must be exactly {ruleValue} characters",maxLength:"{name} cannot be longer than {ruleValue} characters",match:"{name} must match {ruleValue} field",different:"{name} must have a different value than {ruleValue} field",creditCard:"{name} must be a valid credit card number",minCount:"{name} must have at least {ruleValue} choices",exactCount:"{name} must have exactly {ruleValue} choices",maxCount:"{name} must have {ruleValue} or less choices"},selector:{checkbox:'input[type="checkbox"], input[type="radio"]',clear:".clear",field:"input, textarea, select",group:".field",input:"input",message:".error.message",prompt:".prompt.label",radio:'input[type="radio"]',reset:'.reset:not([type="reset"])',submit:'.submit:not([type="submit"])',uiCheckbox:".ui.checkbox",uiDropdown:".ui.dropdown"},className:{error:"error",label:"ui prompt label",pressed:"down",success:"success"},error:{identifier:"You must specify a string identifier for each field",method:"The method you called is not defined.",noRule:"There is no rule matching the one you specified",oldSyntax:"Starting in 2.0 forms now only take a single settings object. Validation settings converted to new syntax automatically."},templates:{error:function(e){var t='<ul class="list">';return W.each(e,(function(e,n){t+="<li>"+n+"</li>"})),W(t+="</ul>")},prompt:function(e){return W("<div/>").addClass("ui basic red pointing prompt label").html(e[0])}},rules:{empty:function(e){return!(void 0===e||""===e||W.isArray(e)&&0===e.length)},checked:function(){return 0<W(this).filter(":checked").length},email:function(e){return W.fn.form.settings.regExp.email.test(e)},url:function(e){return W.fn.form.settings.regExp.url.test(e)},regExp:function(e,t){var n,r;return t instanceof RegExp?e.match(t):((r=t.match(W.fn.form.settings.regExp.flags))&&(t=2<=r.length?r[1]:t,n=3<=r.length?r[2]:""),e.match(new RegExp(t,n)))},integer:function(e,t){var n,r,i=W.fn.form.settings.regExp.integer;return t&&-1===["",".."].indexOf(t)&&(-1==t.indexOf("..")?i.test(t)&&(n=r=+t):(t=t.split("..",2),i.test(t[0])&&(n=+t[0]),i.test(t[1])&&(r=+t[1]))),i.test(e)&&(void 0===n||n<=e)&&(void 0===r||e<=r)},decimal:function(e){return W.fn.form.settings.regExp.decimal.test(e)},number:function(e){return W.fn.form.settings.regExp.number.test(e)},is:function(e,t){return t="string"==typeof t?t.toLowerCase():t,(e="string"==typeof e?e.toLowerCase():e)==t},isExactly:function(e,t){return e==t},not:function(e,t){return(e="string"==typeof e?e.toLowerCase():e)!=("string"==typeof t?t.toLowerCase():t)},notExactly:function(e,t){return e!=t},contains:function(e,t){return t=t.replace(W.fn.form.settings.regExp.escape,"\\$&"),-1!==e.search(new RegExp(t,"i"))},containsExactly:function(e,t){return t=t.replace(W.fn.form.settings.regExp.escape,"\\$&"),-1!==e.search(new RegExp(t))},doesntContain:function(e,t){return t=t.replace(W.fn.form.settings.regExp.escape,"\\$&"),-1===e.search(new RegExp(t,"i"))},doesntContainExactly:function(e,t){return t=t.replace(W.fn.form.settings.regExp.escape,"\\$&"),-1===e.search(new RegExp(t))},minLength:function(e,t){return void 0!==e&&e.length>=t},length:function(e,t){return void 0!==e&&e.length>=t},exactLength:function(e,t){return void 0!==e&&e.length==t},maxLength:function(e,t){return void 0!==e&&e.length<=t},match:function(e,t){var n;return W(this),0<W('[data-validate="'+t+'"]').length?n=W('[data-validate="'+t+'"]').val():0<W("#"+t).length?n=W("#"+t).val():0<W('[name="'+t+'"]').length?n=W('[name="'+t+'"]').val():0<W('[name="'+t+'[]"]').length&&(n=W('[name="'+t+'[]"]')),void 0!==n&&e.toString()==n.toString()},different:function(e,t){var n;return W(this),0<W('[data-validate="'+t+'"]').length?n=W('[data-validate="'+t+'"]').val():0<W("#"+t).length?n=W("#"+t).val():0<W('[name="'+t+'"]').length?n=W('[name="'+t+'"]').val():0<W('[name="'+t+'[]"]').length&&(n=W('[name="'+t+'[]"]')),void 0!==n&&e.toString()!==n.toString()},creditCard:function(e,t){var n,r={visa:{pattern:/^4/,length:[16]},amex:{pattern:/^3[47]/,length:[15]},mastercard:{pattern:/^5[1-5]/,length:[16]},discover:{pattern:/^(6011|622(12[6-9]|1[3-9][0-9]|[2-8][0-9]{2}|9[0-1][0-9]|92[0-5]|64[4-9])|65)/,length:[16]},unionPay:{pattern:/^(62|88)/,length:[16,17,18,19]},jcb:{pattern:/^35(2[89]|[3-8][0-9])/,length:[16]},maestro:{pattern:/^(5018|5020|5038|6304|6759|676[1-3])/,length:[12,13,14,15,16,17,18,19]},dinersClub:{pattern:/^(30[0-5]|^36)/,length:[14]},laser:{pattern:/^(6304|670[69]|6771)/,length:[16,17,18,19]},visaElectron:{pattern:/^(4026|417500|4508|4844|491(3|7))/,length:[16]}},i={},o=!1;t="string"==typeof t&&t.split(",");if("string"==typeof e&&0!==e.length){if(e=e.replace(/[\-]/g,""),t&&(W.each(t,(function(t,a){(n=r[a])&&(i={length:-1!==W.inArray(e.length,n.length),pattern:-1!==e.search(n.pattern)}).length&&i.pattern&&(o=!0)})),!o))return!1;if((t={number:-1!==W.inArray(e.length,r.unionPay.length),pattern:-1!==e.search(r.unionPay.pattern)}).number&&t.pattern)return!0;for(var a=e.length,s=0,u=[[0,1,2,3,4,5,6,7,8,9],[0,2,4,6,8,1,3,5,7,9]],c=0;a--;)c+=u[s][parseInt(e.charAt(a),10)],s^=1;return c%10==0&&0<c}},minCount:function(e,t){return 0==t||(1==t?""!==e:e.split(",").length>=t)},exactCount:function(e,t){return 0==t?""===e:1==t?""!==e&&-1===e.search(","):e.split(",").length==t},maxCount:function(e,t){return 0!=t&&(1==t?-1===e.search(","):e.split(",").length<=t)}}},q=ee(),G=window,document,G=void 0!==G&&G.Math==Math?G:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),q.fn.accordion=function(e){var t,n=q(this),r=(new Date).getTime(),i=[],o=e,a="string"==typeof o,s=[].slice.call(arguments,1);return G.requestAnimationFrame||G.mozRequestAnimationFrame||G.webkitRequestAnimationFrame||G.msRequestAnimationFrame,n.each((function(){var u,c=q.isPlainObject(e)?q.extend(!0,{},q.fn.accordion.settings,e):q.extend({},q.fn.accordion.settings),l=c.className,h=c.namespace,f=c.selector,d=c.error,p="."+h,m="module-"+h,g=(n.selector,q(this)),A=g.find(f.title),v=g.find(f.content),b=this,y=g.data(m),w={initialize:function(){w.debug("Initializing",g),w.bind.events(),c.observeChanges&&w.observeChanges(),w.instantiate()},instantiate:function(){y=w,g.data(m,w)},destroy:function(){w.debug("Destroying previous instance",g),g.off(p).removeData(m)},refresh:function(){A=g.find(f.title),v=g.find(f.content)},observeChanges:function(){"MutationObserver"in G&&((u=new MutationObserver((function(e){w.debug("DOM tree modified, updating selector cache"),w.refresh()}))).observe(b,{childList:!0,subtree:!0}),w.debug("Setting up mutation observer",u))},bind:{events:function(){w.debug("Binding delegated events"),g.on(c.on+p,f.trigger,w.event.click)}},event:{click:function(){w.toggle.call(this)}},toggle:function(e){var t=(r=(e=void 0!==e?"number"==typeof e?A.eq(e):q(e).closest(f.title):q(this).closest(f.title)).next(v)).hasClass(l.animating),n=(r=r.hasClass(l.active))&&!t,r=!r&&t;w.debug("Toggling visibility of content",e),n||r?c.collapsible?w.close.call(e):w.debug("Cannot close accordion content collapsing is disabled"):w.open.call(e)},open:function(e){var t=(e=void 0!==e?"number"==typeof e?A.eq(e):q(e).closest(f.title):q(this).closest(f.title)).next(v),n=t.hasClass(l.animating);t.hasClass(l.active)||n?w.debug("Accordion already open, skipping",t):(w.debug("Opening accordion content",e),c.onOpening.call(t),c.onChanging.call(t),c.exclusive&&w.closeOthers.call(e),e.addClass(l.active),t.stop(!0,!0).addClass(l.animating),c.animateChildren&&(void 0!==q.fn.transition&&g.transition("is supported")?t.children().transition({animation:"fade in",queue:!1,useFailSafe:!0,debug:c.debug,verbose:c.verbose,duration:c.duration}):t.children().stop(!0,!0).animate({opacity:1},c.duration,w.resetOpacity)),t.slideDown(c.duration,c.easing,(function(){t.removeClass(l.animating).addClass(l.active),w.reset.display.call(this),c.onOpen.call(this),c.onChange.call(this)})))},close:function(e){var t=(e=void 0!==e?"number"==typeof e?A.eq(e):q(e).closest(f.title):q(this).closest(f.title)).next(v),n=t.hasClass(l.animating),r=t.hasClass(l.active);!r&&(r||!n)||r&&n||(w.debug("Closing accordion content",t),c.onClosing.call(t),c.onChanging.call(t),e.removeClass(l.active),t.stop(!0,!0).addClass(l.animating),c.animateChildren&&(void 0!==q.fn.transition&&g.transition("is supported")?t.children().transition({animation:"fade out",queue:!1,useFailSafe:!0,debug:c.debug,verbose:c.verbose,duration:c.duration}):t.children().stop(!0,!0).animate({opacity:0},c.duration,w.resetOpacity)),t.slideUp(c.duration,c.easing,(function(){t.removeClass(l.animating).removeClass(l.active),w.reset.display.call(this),c.onClose.call(this),c.onChange.call(this)})))},closeOthers:function(e){var t,n=(e=void 0!==e?A.eq(e):q(this).closest(f.title)).parents(f.content).prev(f.title),r=(e=e.closest(f.accordion),f.title+"."+l.active+":visible"),i=f.content+"."+l.active+":visible";i=(t=c.closeNested?e.find(r).not(n):(t=e.find(r).not(n),e=e.find(i).find(r).not(n),t.not(e))).next(v);0<t.length&&(w.debug("Exclusive enabled, closing other content",t),t.removeClass(l.active),i.removeClass(l.animating).stop(!0,!0),c.animateChildren&&(void 0!==q.fn.transition&&g.transition("is supported")?i.children().transition({animation:"fade out",useFailSafe:!0,debug:c.debug,verbose:c.verbose,duration:c.duration}):i.children().stop(!0,!0).animate({opacity:0},c.duration,w.resetOpacity)),i.slideUp(c.duration,c.easing,(function(){q(this).removeClass(l.active),w.reset.display.call(this)})))},reset:{display:function(){w.verbose("Removing inline display from element",this),q(this).css("display",""),""===q(this).attr("style")&&q(this).attr("style","").removeAttr("style")},opacity:function(){w.verbose("Removing inline opacity from element",this),q(this).css("opacity",""),""===q(this).attr("style")&&q(this).attr("style","").removeAttr("style")}},setting:function(e,t){if(w.debug("Changing setting",e,t),q.isPlainObject(e))q.extend(!0,c,e);else{if(void 0===t)return c[e];q.isPlainObject(c[e])?q.extend(!0,c[e],t):c[e]=t}},internal:function(e,t){if(w.debug("Changing internal",e,t),void 0===t)return w[e];q.isPlainObject(e)?q.extend(!0,w,e):w[e]=t},debug:function(){!c.silent&&c.debug&&(c.performance?w.performance.log(arguments):(w.debug=Function.prototype.bind.call(console.info,console,c.name+":"),w.debug.apply(console,arguments)))},verbose:function(){!c.silent&&c.verbose&&c.debug&&(c.performance?w.performance.log(arguments):(w.verbose=Function.prototype.bind.call(console.info,console,c.name+":"),w.verbose.apply(console,arguments)))},error:function(){c.silent||(w.error=Function.prototype.bind.call(console.error,console,c.name+":"),w.error.apply(console,arguments))},performance:{log:function(e){var t,n;c.performance&&(n=(t=(new Date).getTime())-(r||t),r=t,i.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:b,"Execution Time":n})),clearTimeout(w.performance.timer),w.performance.timer=setTimeout(w.performance.display,500)},display:function(){c.name,r=!1,clearTimeout(w.performance.timer),q.each(i,(function(e,t){t["Execution Time"]})),(void 0!==console.group||void 0!==console.table)&&0<i.length&&!console.table&&q.each(i,(function(e,t){t.Name,t["Execution Time"]})),i=[]}},invoke:function(e,n,r){var i,o,a,u=y;return n=n||s,r=b||r,"string"==typeof e&&void 0!==u&&(e=e.split(/[\. ]/),i=e.length-1,q.each(e,(function(t,n){var r=t!=i?n+e[t+1].charAt(0).toUpperCase()+e[t+1].slice(1):e;if(!q.isPlainObject(u[r])||t==i)return void 0!==u[r]?(o=u[r],!1):q.isPlainObject(u[n])&&t!=i?void(u=u[n]):(void 0!==u[n]?o=u[n]:w.error(d.method,e),!1);u=u[r]}))),q.isFunction(o)?a=o.apply(r,n):void 0!==o&&(a=o),q.isArray(t)?t.push(a):void 0!==t?t=[t,a]:void 0!==a&&(t=a),o}};a?(void 0===y&&w.initialize(),w.invoke(o)):(void 0!==y&&y.invoke("destroy"),w.initialize())})),void 0!==t?t:this},q.fn.accordion.settings={name:"Accordion",namespace:"accordion",silent:!1,debug:!1,verbose:!1,performance:!0,on:"click",observeChanges:!0,exclusive:!0,collapsible:!0,closeNested:!1,animateChildren:!0,duration:350,easing:"easeOutQuad",onOpening:function(){},onClosing:function(){},onChanging:function(){},onOpen:function(){},onClose:function(){},onChange:function(){},error:{method:"The method you called is not defined"},className:{active:"active",animating:"animating"},selector:{accordion:".accordion",title:".title",trigger:".title",content:".content"}},q.extend(q.easing,{easeOutQuad:function(e,t,n,r,i){return-r*(t/=i)*(t-2)+n}}),$=ee(),Q=window,V=document,Q=void 0!==Q&&Q.Math==Math?Q:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),$.fn.checkbox=function(e){var t,n=$(this),r=(n.selector,(new Date).getTime()),i=[],o=e,a="string"==typeof o,s=[].slice.call(arguments,1);return n.each((function(){var n,u=$.extend(!0,{},$.fn.checkbox.settings,e),c=u.className,l=u.namespace,h=u.selector,f=u.error,d="."+l,p="module-"+l,m=$(this),g=$(this).children(h.label),A=$(this).children(h.input),v=A[0],b=!1,y=!1,w=m.data(p),x=this,C={initialize:function(){C.verbose("Initializing checkbox",u),C.create.label(),C.bind.events(),C.set.tabbable(),C.hide.input(),C.observeChanges(),C.instantiate(),C.setup()},instantiate:function(){C.verbose("Storing instance of module",C),w=C,m.data(p,C)},destroy:function(){C.verbose("Destroying module"),C.unbind.events(),C.show.input(),m.removeData(p)},fix:{reference:function(){m.is(h.input)&&(C.debug("Behavior called on <input> adjusting invoked element"),m=m.closest(h.checkbox),C.refresh())}},setup:function(){C.set.initialLoad(),C.is.indeterminate()?(C.debug("Initial value is indeterminate"),C.indeterminate()):C.is.checked()?(C.debug("Initial value is checked"),C.check()):(C.debug("Initial value is unchecked"),C.uncheck()),C.remove.initialLoad()},refresh:function(){g=m.children(h.label),A=m.children(h.input),v=A[0]},hide:{input:function(){C.verbose("Modifying <input> z-index to be unselectable"),A.addClass(c.hidden)}},show:{input:function(){C.verbose("Modifying <input> z-index to be selectable"),A.removeClass(c.hidden)}},observeChanges:function(){"MutationObserver"in Q&&((n=new MutationObserver((function(e){C.debug("DOM tree modified, updating selector cache"),C.refresh()}))).observe(x,{childList:!0,subtree:!0}),C.debug("Setting up mutation observer",n))},attachEvents:function(e,t){var n=$(e);t=$.isFunction(C[t])?C[t]:C.toggle,0<n.length?(C.debug("Attaching checkbox events to element",e,t),n.on("click"+d,t)):C.error(f.notFound)},event:{click:function(e){var t=$(e.target);t.is(h.input)?C.verbose("Using default check action on initialized checkbox"):t.is(h.link)?C.debug("Clicking link inside checkbox, skipping toggle"):(C.toggle(),A.focus(),e.preventDefault())},keydown:function(e){var t=e.which;y=27==t?(C.verbose("Escape key pressed blurring field"),A.blur(),!0):!(e.ctrlKey||32!=t&&13!=t||(C.verbose("Enter/space key pressed, toggling checkbox"),C.toggle(),0))},keyup:function(e){y&&e.preventDefault()}},check:function(){C.should.allowCheck()&&(C.debug("Checking checkbox",A),C.set.checked(),C.should.ignoreCallbacks()||(u.onChecked.call(v),u.onChange.call(v)))},uncheck:function(){C.should.allowUncheck()&&(C.debug("Unchecking checkbox"),C.set.unchecked(),C.should.ignoreCallbacks()||(u.onUnchecked.call(v),u.onChange.call(v)))},indeterminate:function(){C.should.allowIndeterminate()?C.debug("Checkbox is already indeterminate"):(C.debug("Making checkbox indeterminate"),C.set.indeterminate(),C.should.ignoreCallbacks()||(u.onIndeterminate.call(v),u.onChange.call(v)))},determinate:function(){C.should.allowDeterminate()?C.debug("Checkbox is already determinate"):(C.debug("Making checkbox determinate"),C.set.determinate(),C.should.ignoreCallbacks()||(u.onDeterminate.call(v),u.onChange.call(v)))},enable:function(){C.is.enabled()?C.debug("Checkbox is already enabled"):(C.debug("Enabling checkbox"),C.set.enabled(),u.onEnable.call(v),u.onEnabled.call(v))},disable:function(){C.is.disabled()?C.debug("Checkbox is already disabled"):(C.debug("Disabling checkbox"),C.set.disabled(),u.onDisable.call(v),u.onDisabled.call(v))},get:{radios:function(){var e=C.get.name();return $('input[name="'+e+'"]').closest(h.checkbox)},otherRadios:function(){return C.get.radios().not(m)},name:function(){return A.attr("name")}},is:{initialLoad:function(){return b},radio:function(){return A.hasClass(c.radio)||"radio"==A.attr("type")},indeterminate:function(){return void 0!==A.prop("indeterminate")&&A.prop("indeterminate")},checked:function(){return void 0!==A.prop("checked")&&A.prop("checked")},disabled:function(){return void 0!==A.prop("disabled")&&A.prop("disabled")},enabled:function(){return!C.is.disabled()},determinate:function(){return!C.is.indeterminate()},unchecked:function(){return!C.is.checked()}},should:{allowCheck:function(){return C.is.determinate()&&C.is.checked()&&!C.should.forceCallbacks()?(C.debug("Should not allow check, checkbox is already checked"),!1):!1!==u.beforeChecked.apply(v)||(C.debug("Should not allow check, beforeChecked cancelled"),!1)},allowUncheck:function(){return C.is.determinate()&&C.is.unchecked()&&!C.should.forceCallbacks()?(C.debug("Should not allow uncheck, checkbox is already unchecked"),!1):!1!==u.beforeUnchecked.apply(v)||(C.debug("Should not allow uncheck, beforeUnchecked cancelled"),!1)},allowIndeterminate:function(){return C.is.indeterminate()&&!C.should.forceCallbacks()?(C.debug("Should not allow indeterminate, checkbox is already indeterminate"),!1):!1!==u.beforeIndeterminate.apply(v)||(C.debug("Should not allow indeterminate, beforeIndeterminate cancelled"),!1)},allowDeterminate:function(){return C.is.determinate()&&!C.should.forceCallbacks()?(C.debug("Should not allow determinate, checkbox is already determinate"),!1):!1!==u.beforeDeterminate.apply(v)||(C.debug("Should not allow determinate, beforeDeterminate cancelled"),!1)},forceCallbacks:function(){return C.is.initialLoad()&&u.fireOnInit},ignoreCallbacks:function(){return b&&!u.fireOnInit}},can:{change:function(){return!(m.hasClass(c.disabled)||m.hasClass(c.readOnly)||A.prop("disabled")||A.prop("readonly"))},uncheck:function(){return"boolean"==typeof u.uncheckable?u.uncheckable:!C.is.radio()}},set:{initialLoad:function(){b=!0},checked:function(){C.verbose("Setting class to checked"),m.removeClass(c.indeterminate).addClass(c.checked),C.is.radio()&&C.uncheckOthers(),C.is.indeterminate()||!C.is.checked()?(C.verbose("Setting state to checked",v),A.prop("indeterminate",!1).prop("checked",!0),C.trigger.change()):C.debug("Input is already checked, skipping input property change")},unchecked:function(){C.verbose("Removing checked class"),m.removeClass(c.indeterminate).removeClass(c.checked),C.is.indeterminate()||!C.is.unchecked()?(C.debug("Setting state to unchecked"),A.prop("indeterminate",!1).prop("checked",!1),C.trigger.change()):C.debug("Input is already unchecked")},indeterminate:function(){C.verbose("Setting class to indeterminate"),m.addClass(c.indeterminate),C.is.indeterminate()?C.debug("Input is already indeterminate, skipping input property change"):(C.debug("Setting state to indeterminate"),A.prop("indeterminate",!0),C.trigger.change())},determinate:function(){C.verbose("Removing indeterminate class"),m.removeClass(c.indeterminate),C.is.determinate()?C.debug("Input is already determinate, skipping input property change"):(C.debug("Setting state to determinate"),A.prop("indeterminate",!1))},disabled:function(){C.verbose("Setting class to disabled"),m.addClass(c.disabled),C.is.disabled()?C.debug("Input is already disabled, skipping input property change"):(C.debug("Setting state to disabled"),A.prop("disabled","disabled"),C.trigger.change())},enabled:function(){C.verbose("Removing disabled class"),m.removeClass(c.disabled),C.is.enabled()?C.debug("Input is already enabled, skipping input property change"):(C.debug("Setting state to enabled"),A.prop("disabled",!1),C.trigger.change())},tabbable:function(){C.verbose("Adding tabindex to checkbox"),void 0===A.attr("tabindex")&&A.attr("tabindex",0)}},remove:{initialLoad:function(){b=!1}},trigger:{change:function(){var e=V.createEvent("HTMLEvents"),t=A[0];t&&(C.verbose("Triggering native change event"),e.initEvent("change",!0,!1),t.dispatchEvent(e))}},create:{label:function(){0<A.prevAll(h.label).length?(A.prev(h.label).detach().insertAfter(A),C.debug("Moving existing label",g)):C.has.label()||(g=$("<label>").insertAfter(A),C.debug("Creating label",g))}},has:{label:function(){return 0<g.length}},bind:{events:function(){C.verbose("Attaching checkbox events"),m.on("click"+d,C.event.click).on("keydown"+d,h.input,C.event.keydown).on("keyup"+d,h.input,C.event.keyup)}},unbind:{events:function(){C.debug("Removing events"),m.off(d)}},uncheckOthers:function(){var e=C.get.otherRadios();C.debug("Unchecking other radios",e),e.removeClass(c.checked)},toggle:function(){C.can.change()?C.is.indeterminate()||C.is.unchecked()?(C.debug("Currently unchecked"),C.check()):C.is.checked()&&C.can.uncheck()&&(C.debug("Currently checked"),C.uncheck()):C.is.radio()||C.debug("Checkbox is read-only or disabled, ignoring toggle")},setting:function(e,t){if(C.debug("Changing setting",e,t),$.isPlainObject(e))$.extend(!0,u,e);else{if(void 0===t)return u[e];$.isPlainObject(u[e])?$.extend(!0,u[e],t):u[e]=t}},internal:function(e,t){if($.isPlainObject(e))$.extend(!0,C,e);else{if(void 0===t)return C[e];C[e]=t}},debug:function(){!u.silent&&u.debug&&(u.performance?C.performance.log(arguments):(C.debug=Function.prototype.bind.call(console.info,console,u.name+":"),C.debug.apply(console,arguments)))},verbose:function(){!u.silent&&u.verbose&&u.debug&&(u.performance?C.performance.log(arguments):(C.verbose=Function.prototype.bind.call(console.info,console,u.name+":"),C.verbose.apply(console,arguments)))},error:function(){u.silent||(C.error=Function.prototype.bind.call(console.error,console,u.name+":"),C.error.apply(console,arguments))},performance:{log:function(e){var t,n;u.performance&&(n=(t=(new Date).getTime())-(r||t),r=t,i.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:x,"Execution Time":n})),clearTimeout(C.performance.timer),C.performance.timer=setTimeout(C.performance.display,500)},display:function(){u.name,r=!1,clearTimeout(C.performance.timer),$.each(i,(function(e,t){t["Execution Time"]})),(void 0!==console.group||void 0!==console.table)&&0<i.length&&!console.table&&$.each(i,(function(e,t){t.Name,t["Execution Time"]})),i=[]}},invoke:function(e,n,r){var i,o,a,u=w;return n=n||s,r=x||r,"string"==typeof e&&void 0!==u&&(e=e.split(/[\. ]/),i=e.length-1,$.each(e,(function(t,n){var r=t!=i?n+e[t+1].charAt(0).toUpperCase()+e[t+1].slice(1):e;if(!$.isPlainObject(u[r])||t==i)return void 0!==u[r]?(o=u[r],!1):$.isPlainObject(u[n])&&t!=i?void(u=u[n]):(void 0!==u[n]?o=u[n]:C.error(f.method,e),!1);u=u[r]}))),$.isFunction(o)?a=o.apply(r,n):void 0!==o&&(a=o),$.isArray(t)?t.push(a):void 0!==t?t=[t,a]:void 0!==a&&(t=a),o}};a?(void 0===w&&C.initialize(),C.invoke(o)):(void 0!==w&&w.invoke("destroy"),C.initialize())})),void 0!==t?t:this},$.fn.checkbox.settings={name:"Checkbox",namespace:"checkbox",silent:!1,debug:!1,verbose:!0,performance:!0,uncheckable:"auto",fireOnInit:!1,onChange:function(){},beforeChecked:function(){},beforeUnchecked:function(){},beforeDeterminate:function(){},beforeIndeterminate:function(){},onChecked:function(){},onUnchecked:function(){},onDeterminate:function(){},onIndeterminate:function(){},onEnable:function(){},onDisable:function(){},onEnabled:function(){},onDisabled:function(){},className:{checked:"checked",indeterminate:"indeterminate",disabled:"disabled",hidden:"hidden",radio:"radio",readOnly:"read-only"},error:{method:"The method you called is not defined"},selector:{checkbox:".ui.checkbox",label:"label, .box",input:'input[type="checkbox"], input[type="radio"]',link:"a[href]"}},z=ee(),Z=window,H=document,Z=void 0!==Z&&Z.Math==Math?Z:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),z.fn.dimmer=function(e){var t,n=z(this),r=(new Date).getTime(),i=[],o=e,a="string"==typeof o,s=[].slice.call(arguments,1);return n.each((function(){var u,c,l,h=z.isPlainObject(e)?z.extend(!0,{},z.fn.dimmer.settings,e):z.extend({},z.fn.dimmer.settings),f=h.selector,d=h.namespace,p=h.className,m=h.error,g="."+d,A="module-"+d,v=(n.selector,"ontouchstart"in H.documentElement?"touchstart":"click"),b=z(this),y=this,w=b.data(A);(l={preinitialize:function(){u=l.is.dimmer()?(c=b.parent(),b):(c=b,l.has.dimmer()?h.dimmerName?c.find(f.dimmer).filter("."+h.dimmerName):c.find(f.dimmer):l.create())},initialize:function(){l.debug("Initializing dimmer",h),l.bind.events(),l.set.dimmable(),l.instantiate()},instantiate:function(){l.verbose("Storing instance of module",l),w=l,b.data(A,w)},destroy:function(){l.verbose("Destroying previous module",u),l.unbind.events(),l.remove.variation(),c.off(g)},bind:{events:function(){"hover"==h.on?c.on("mouseenter"+g,l.show).on("mouseleave"+g,l.hide):"click"==h.on&&c.on(v+g,l.toggle),l.is.page()&&(l.debug("Setting as a page dimmer",c),l.set.pageDimmer()),l.is.closable()&&(l.verbose("Adding dimmer close event",u),c.on(v+g,f.dimmer,l.event.click))}},unbind:{events:function(){b.removeData(A),c.off(g)}},event:{click:function(e){l.verbose("Determining if event occurred on dimmer",e),0!==u.find(e.target).length&&!z(e.target).is(f.content)||(l.hide(),e.stopImmediatePropagation())}},addContent:function(e){e=z(e),l.debug("Add content to dimmer",e),e.parent()[0]!==u[0]&&e.detach().appendTo(u)},create:function(){var e=z(h.template.dimmer());return h.dimmerName&&(l.debug("Creating named dimmer",h.dimmerName),e.addClass(h.dimmerName)),e.appendTo(c),e},show:function(e){e=z.isFunction(e)?e:function(){},l.debug("Showing dimmer",u,h),l.set.variation(),l.is.dimmed()&&!l.is.animating()||!l.is.enabled()?l.debug("Dimmer is already shown or disabled"):(l.animate.show(e),h.onShow.call(y),h.onChange.call(y))},hide:function(e){e=z.isFunction(e)?e:function(){},l.is.dimmed()||l.is.animating()?(l.debug("Hiding dimmer",u),l.animate.hide(e),h.onHide.call(y),h.onChange.call(y)):l.debug("Dimmer is not visible")},toggle:function(){l.verbose("Toggling dimmer visibility",u),l.is.dimmed()?l.hide():l.show()},animate:{show:function(e){e=z.isFunction(e)?e:function(){},h.useCSS&&void 0!==z.fn.transition&&u.transition("is supported")?((h.useFlex?(l.debug("Using flex dimmer"),l.remove):(l.debug("Using legacy non-flex dimmer"),l.set)).legacy(),"auto"!==h.opacity&&l.set.opacity(),u.transition({displayType:h.useFlex?"flex":"block",animation:h.transition+" in",queue:!1,duration:l.get.duration(),useFailSafe:!0,onStart:function(){l.set.dimmed()},onComplete:function(){l.set.active(),e()}})):(l.verbose("Showing dimmer animation with javascript"),l.set.dimmed(),"auto"==h.opacity&&(h.opacity=.8),u.stop().css({opacity:0,width:"100%",height:"100%"}).fadeTo(l.get.duration(),h.opacity,(function(){u.removeAttr("style"),l.set.active(),e()})))},hide:function(e){e=z.isFunction(e)?e:function(){},h.useCSS&&void 0!==z.fn.transition&&u.transition("is supported")?(l.verbose("Hiding dimmer with css"),u.transition({displayType:h.useFlex?"flex":"block",animation:h.transition+" out",queue:!1,duration:l.get.duration(),useFailSafe:!0,onStart:function(){l.remove.dimmed()},onComplete:function(){l.remove.variation(),l.remove.active(),e()}})):(l.verbose("Hiding dimmer with javascript"),l.remove.dimmed(),u.stop().fadeOut(l.get.duration(),(function(){l.remove.active(),u.removeAttr("style"),e()})))}},get:{dimmer:function(){return u},duration:function(){return"object"==typeof h.duration?l.is.active()?h.duration.hide:h.duration.show:h.duration}},has:{dimmer:function(){return h.dimmerName?0<b.find(f.dimmer).filter("."+h.dimmerName).length:0<b.find(f.dimmer).length}},is:{active:function(){return u.hasClass(p.active)},animating:function(){return u.is(":animated")||u.hasClass(p.animating)},closable:function(){return"auto"==h.closable?"hover"!=h.on:h.closable},dimmer:function(){return b.hasClass(p.dimmer)},dimmable:function(){return b.hasClass(p.dimmable)},dimmed:function(){return c.hasClass(p.dimmed)},disabled:function(){return c.hasClass(p.disabled)},enabled:function(){return!l.is.disabled()},page:function(){return c.is("body")},pageDimmer:function(){return u.hasClass(p.pageDimmer)}},can:{show:function(){return!u.hasClass(p.disabled)}},set:{opacity:function(e){var t=u.css("background-color"),n=t.split(","),r=n&&3==n.length,i=n&&4==n.length;e=0===h.opacity?0:h.opacity||e,t=r||i?(n[3]=e+")",n.join(",")):"rgba(0, 0, 0, "+e+")",l.debug("Setting opacity to",e),u.css("background-color",t)},legacy:function(){u.addClass(p.legacy)},active:function(){u.addClass(p.active)},dimmable:function(){c.addClass(p.dimmable)},dimmed:function(){c.addClass(p.dimmed)},pageDimmer:function(){u.addClass(p.pageDimmer)},disabled:function(){u.addClass(p.disabled)},variation:function(e){(e=e||h.variation)&&u.addClass(e)}},remove:{active:function(){u.removeClass(p.active)},legacy:function(){u.removeClass(p.legacy)},dimmed:function(){c.removeClass(p.dimmed)},disabled:function(){u.removeClass(p.disabled)},variation:function(e){(e=e||h.variation)&&u.removeClass(e)}},setting:function(e,t){if(l.debug("Changing setting",e,t),z.isPlainObject(e))z.extend(!0,h,e);else{if(void 0===t)return h[e];z.isPlainObject(h[e])?z.extend(!0,h[e],t):h[e]=t}},internal:function(e,t){if(z.isPlainObject(e))z.extend(!0,l,e);else{if(void 0===t)return l[e];l[e]=t}},debug:function(){!h.silent&&h.debug&&(h.performance?l.performance.log(arguments):(l.debug=Function.prototype.bind.call(console.info,console,h.name+":"),l.debug.apply(console,arguments)))},verbose:function(){!h.silent&&h.verbose&&h.debug&&(h.performance?l.performance.log(arguments):(l.verbose=Function.prototype.bind.call(console.info,console,h.name+":"),l.verbose.apply(console,arguments)))},error:function(){h.silent||(l.error=Function.prototype.bind.call(console.error,console,h.name+":"),l.error.apply(console,arguments))},performance:{log:function(e){var t,n;h.performance&&(n=(t=(new Date).getTime())-(r||t),r=t,i.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:y,"Execution Time":n})),clearTimeout(l.performance.timer),l.performance.timer=setTimeout(l.performance.display,500)},display:function(){h.name,r=!1,clearTimeout(l.performance.timer),z.each(i,(function(e,t){t["Execution Time"]})),1<n.length&&n.length,(void 0!==console.group||void 0!==console.table)&&0<i.length&&!console.table&&z.each(i,(function(e,t){t.Name,t["Execution Time"]})),i=[]}},invoke:function(e,n,r){var i,o,a,u=w;return n=n||s,r=y||r,"string"==typeof e&&void 0!==u&&(e=e.split(/[\. ]/),i=e.length-1,z.each(e,(function(t,n){var r=t!=i?n+e[t+1].charAt(0).toUpperCase()+e[t+1].slice(1):e;if(!z.isPlainObject(u[r])||t==i)return void 0!==u[r]?(o=u[r],!1):z.isPlainObject(u[n])&&t!=i?void(u=u[n]):(void 0!==u[n]?o=u[n]:l.error(m.method,e),!1);u=u[r]}))),z.isFunction(o)?a=o.apply(r,n):void 0!==o&&(a=o),z.isArray(t)?t.push(a):void 0!==t?t=[t,a]:void 0!==a&&(t=a),o}}).preinitialize(),a?(void 0===w&&l.initialize(),l.invoke(o)):(void 0!==w&&w.invoke("destroy"),l.initialize())})),void 0!==t?t:this},z.fn.dimmer.settings={name:"Dimmer",namespace:"dimmer",silent:!1,debug:!1,verbose:!1,performance:!0,useFlex:!0,dimmerName:!1,variation:!1,closable:"auto",useCSS:!0,transition:"fade",on:!1,opacity:"auto",duration:{show:500,hide:500},onChange:function(){},onShow:function(){},onHide:function(){},error:{method:"The method you called is not defined."},className:{active:"active",animating:"animating",dimmable:"dimmable",dimmed:"dimmed",dimmer:"dimmer",disabled:"disabled",hide:"hide",legacy:"legacy",pageDimmer:"page",show:"show"},selector:{dimmer:"> .ui.dimmer",content:".ui.dimmer > .content, .ui.dimmer > .content > .center"},template:{dimmer:function(){return z("<div />").attr("class","ui dimmer")}}},P=ee(),L=window,U=document,L=void 0!==L&&L.Math==Math?L:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),P.fn.dropdown=function(e){var t,n=P(this),r=P(U),i=(n.selector,"ontouchstart"in U.documentElement),o=(new Date).getTime(),a=[],s=e,u="string"==typeof s,c=[].slice.call(arguments,1);return n.each((function(l){var h,f,d,p,m,g,A,v=P.isPlainObject(e)?P.extend(!0,{},P.fn.dropdown.settings,e):P.extend({},P.fn.dropdown.settings),b=v.className,y=v.message,w=v.fields,x=v.keys,C=v.metadata,k=v.namespace,E=v.regExp,S=v.selector,_=v.error,O=v.templates,T="."+k,D="module-"+k,B=P(this),I=P(v.context),M=B.find(S.text),j=B.find(S.search),N=B.find(S.sizer),F=B.find(S.input),R=B.find(S.icon),z=0<B.prev().find(S.text).length?B.prev().find(S.text):B.prev(),H=B.children(S.menu),$=H.find(S.item),Q=!1,V=!1,q=!1,G=this,W=B.data(D),K={initialize:function(){K.debug("Initializing dropdown",v),K.is.alreadySetup()?K.setup.reference():(K.setup.layout(),v.values&&K.change.values(v.values),K.refreshData(),K.save.defaults(),K.restore.selected(),K.create.id(),K.bind.events(),K.observeChanges(),K.instantiate())},instantiate:function(){K.verbose("Storing instance of dropdown",K),W=K,B.data(D,K)},destroy:function(){K.verbose("Destroying previous dropdown",B),K.remove.tabbable(),B.off(T).removeData(D),H.off(T),r.off(p),K.disconnect.menuObserver(),K.disconnect.selectObserver()},observeChanges:function(){"MutationObserver"in L&&(g=new MutationObserver(K.event.select.mutation),A=new MutationObserver(K.event.menu.mutation),K.debug("Setting up mutation observer",g,A),K.observe.select(),K.observe.menu())},disconnect:{menuObserver:function(){A&&A.disconnect()},selectObserver:function(){g&&g.disconnect()}},observe:{select:function(){K.has.input()&&g.observe(B[0],{childList:!0,subtree:!0})},menu:function(){K.has.menu()&&A.observe(H[0],{childList:!0,subtree:!0})}},create:{id:function(){m=(Math.random().toString(16)+"000000000").substr(2,8),p="."+m,K.verbose("Creating unique id for element",m)},userChoice:function(e){var t,n;return!!(e=e||K.get.userValues())&&(e=P.isArray(e)?e:[e],P.each(e,(function(e,r){!1===K.get.item(r)&&(n=v.templates.addition(K.add.variables(y.addResult,r)),n=P("<div />").html(n).attr("data-"+C.value,r).attr("data-"+C.text,r).addClass(b.addition).addClass(b.item),v.hideAdditions&&n.addClass(b.hidden),t=void 0===t?n:t.add(n),K.verbose("Creating user choices for value",r,n))})),t)},userLabels:function(e){var t=K.get.userValues();t&&(K.debug("Adding user labels",t),P.each(t,(function(e,t){K.verbose("Adding custom user value"),K.add.label(t,t)})))},menu:function(){H=P("<div />").addClass(b.menu).appendTo(B)},sizer:function(){N=P("<span />").addClass(b.sizer).insertAfter(j)}},search:function(e){e=void 0!==e?e:K.get.query(),K.verbose("Searching for query",e),K.has.minCharacters(e)?K.filter(e):K.hide()},select:{firstUnfiltered:function(){K.verbose("Selecting first non-filtered element"),K.remove.selectedItem(),$.not(S.unselectable).not(S.addition+S.hidden).eq(0).addClass(b.selected)},nextAvailable:function(e){var t=(e=e.eq(0)).nextAll(S.item).not(S.unselectable).eq(0);e=e.prevAll(S.item).not(S.unselectable).eq(0);(0<t.length?(K.verbose("Moving selection to",t),t):(K.verbose("Moving selection to",e),e)).addClass(b.selected)}},setup:{api:function(){var e={debug:v.debug,urlData:{value:K.get.value(),query:K.get.query()},on:!1};K.verbose("First request, initializing API"),B.api(e)},layout:function(){B.is("select")&&(K.setup.select(),K.setup.returnedObject()),K.has.menu()||K.create.menu(),K.is.search()&&!K.has.search()&&(K.verbose("Adding search input"),j=P("<input />").addClass(b.search).prop("autocomplete","off").insertBefore(M)),K.is.multiple()&&K.is.searchSelection()&&!K.has.sizer()&&K.create.sizer(),v.allowTab&&K.set.tabbable()},select:function(){var e=K.get.selectValues();K.debug("Dropdown initialized on a select",e),0<(F=B.is("select")?B:F).parent(S.dropdown).length?(K.debug("UI dropdown already exists. Creating dropdown menu only"),B=F.closest(S.dropdown),K.has.menu()||K.create.menu(),H=B.children(S.menu),K.setup.menu(e)):(K.debug("Creating entire dropdown from select"),B=P("<div />").attr("class",F.attr("class")).addClass(b.selection).addClass(b.dropdown).html(O.dropdown(e)).insertBefore(F),F.hasClass(b.multiple)&&!1===F.prop("multiple")&&(K.error(_.missingMultiple),F.prop("multiple",!0)),F.is("[multiple]")&&K.set.multiple(),F.prop("disabled")&&(K.debug("Disabling dropdown"),B.addClass(b.disabled)),F.removeAttr("class").detach().prependTo(B)),K.refresh()},menu:function(e){H.html(O.menu(e,w)),$=H.find(S.item)},reference:function(){K.debug("Dropdown behavior was called on select, replacing with closest dropdown"),B=B.parent(S.dropdown),W=B.data(D),G=B.get(0),K.refresh(),K.setup.returnedObject()},returnedObject:function(){var e=n.slice(0,l),t=n.slice(l+1);n=e.add(B).add(t)}},refresh:function(){K.refreshSelectors(),K.refreshData()},refreshItems:function(){$=H.find(S.item)},refreshSelectors:function(){K.verbose("Refreshing selector cache"),M=B.find(S.text),j=B.find(S.search),F=B.find(S.input),R=B.find(S.icon),z=0<B.prev().find(S.text).length?B.prev().find(S.text):B.prev(),H=B.children(S.menu),$=H.find(S.item)},refreshData:function(){K.verbose("Refreshing cached metadata"),$.removeData(C.text).removeData(C.value)},clearData:function(){K.verbose("Clearing metadata"),$.removeData(C.text).removeData(C.value),B.removeData(C.defaultText).removeData(C.defaultValue).removeData(C.placeholderText)},toggle:function(){K.verbose("Toggling menu visibility"),K.is.active()?K.hide():K.show()},show:function(e){if(e=P.isFunction(e)?e:function(){},!K.can.show()&&K.is.remote()&&(K.debug("No API results retrieved, searching before show"),K.queryRemote(K.get.query(),K.show)),K.can.show()&&!K.is.active()){if(K.debug("Showing dropdown"),!K.has.message()||K.has.maxSelections()||K.has.allResultsFiltered()||K.remove.message(),K.is.allFiltered())return!0;!1!==v.onShow.call(G)&&K.animate.show((function(){K.can.click()&&K.bind.intent(),K.has.menuSearch()&&K.focusSearch(),K.set.visible(),e.call(G)}))}},hide:function(e){e=P.isFunction(e)?e:function(){},K.is.active()&&!K.is.animatingOutward()&&(K.debug("Hiding dropdown"),!1!==v.onHide.call(G)&&K.animate.hide((function(){K.remove.visible(),e.call(G)})))},hideOthers:function(){K.verbose("Finding other dropdowns to hide"),n.not(B).has(S.menu+"."+b.visible).dropdown("hide")},hideMenu:function(){K.verbose("Hiding menu  instantaneously"),K.remove.active(),K.remove.visible(),H.transition("hide")},hideSubMenus:function(){var e=H.children(S.item).find(S.menu);K.verbose("Hiding sub menus",e),e.transition("hide")},bind:{events:function(){i&&K.bind.touchEvents(),K.bind.keyboardEvents(),K.bind.inputEvents(),K.bind.mouseEvents()},touchEvents:function(){K.debug("Touch device detected binding additional touch events"),K.is.searchSelection()||K.is.single()&&B.on("touchstart"+T,K.event.test.toggle),H.on("touchstart"+T,S.item,K.event.item.mouseenter)},keyboardEvents:function(){K.verbose("Binding keyboard events"),B.on("keydown"+T,K.event.keydown),K.has.search()&&B.on(K.get.inputEvent()+T,S.search,K.event.input),K.is.multiple()&&r.on("keydown"+p,K.event.document.keydown)},inputEvents:function(){K.verbose("Binding input change events"),B.on("change"+T,S.input,K.event.change)},mouseEvents:function(){K.verbose("Binding mouse events"),K.is.multiple()&&B.on("click"+T,S.label,K.event.label.click).on("click"+T,S.remove,K.event.remove.click),K.is.searchSelection()?(B.on("mousedown"+T,K.event.mousedown).on("mouseup"+T,K.event.mouseup).on("mousedown"+T,S.menu,K.event.menu.mousedown).on("mouseup"+T,S.menu,K.event.menu.mouseup).on("click"+T,S.icon,K.event.icon.click).on("focus"+T,S.search,K.event.search.focus).on("click"+T,S.search,K.event.search.focus).on("blur"+T,S.search,K.event.search.blur).on("click"+T,S.text,K.event.text.focus),K.is.multiple()&&B.on("click"+T,K.event.click)):("click"==v.on?B.on("click"+T,K.event.test.toggle):"hover"==v.on?B.on("mouseenter"+T,K.delay.show).on("mouseleave"+T,K.delay.hide):B.on(v.on+T,K.toggle),B.on("click"+T,S.icon,K.event.icon.click).on("mousedown"+T,K.event.mousedown).on("mouseup"+T,K.event.mouseup).on("focus"+T,K.event.focus),K.has.menuSearch()?B.on("blur"+T,S.search,K.event.search.blur):B.on("blur"+T,K.event.blur)),H.on("mouseenter"+T,S.item,K.event.item.mouseenter).on("mouseleave"+T,S.item,K.event.item.mouseleave).on("click"+T,S.item,K.event.item.click)},intent:function(){K.verbose("Binding hide intent event to document"),i&&r.on("touchstart"+p,K.event.test.touch).on("touchmove"+p,K.event.test.touch),r.on("click"+p,K.event.test.hide)}},unbind:{intent:function(){K.verbose("Removing hide intent event from document"),i&&r.off("touchstart"+p).off("touchmove"+p),r.off("click"+p)}},filter:function(e){function t(){K.is.multiple()&&K.filterActive(),(e||!e&&0==K.get.activeItem().length)&&K.select.firstUnfiltered(),K.has.allResultsFiltered()?v.onNoResults.call(G,n)?v.allowAdditions?v.hideAdditions&&(K.verbose("User addition with no menu, setting empty style"),K.set.empty(),K.hideMenu()):(K.verbose("All items filtered, showing message",n),K.add.message(y.noResults)):(K.verbose("All items filtered, hiding dropdown",n),K.hideMenu()):(K.remove.empty(),K.remove.message()),v.allowAdditions&&K.add.userSuggestion(e),K.is.searchSelection()&&K.can.show()&&K.is.focusedOnSearch()&&K.show()}var n=void 0!==e?e:K.get.query();v.useLabels&&K.has.maxSelections()||(v.apiSettings?K.can.useAPI()?K.queryRemote(n,(function(){v.filterRemoteData&&K.filterItems(n),t()})):K.error(_.noAPI):(K.filterItems(n),t()))},queryRemote:function(e,t){e={errorDuration:!1,cache:"local",throttle:v.throttle,urlData:{query:e},onError:function(){K.add.message(y.serverError),t()},onFailure:function(){K.add.message(y.serverError),t()},onSuccess:function(e){var n=e[w.remoteValues];P.isArray(n)&&0<n.length?(K.remove.message(),K.setup.menu({values:e[w.remoteValues]})):K.add.message(y.noResults),t()}},B.api("get request")||K.setup.api(),e=P.extend(!0,{},e,v.apiSettings),B.api("setting",e).api("query")},filterItems:function(e){var t=void 0!==e?e:K.get.query(),n=null,r=(e=K.escape.string(t),new RegExp("^"+e,"igm"));K.has.query()&&(n=[],K.verbose("Searching for matching values",t),$.each((function(){var e,i=P(this);if("both"==v.match||"text"==v.match){if(-1!==(e=String(K.get.choiceText(i,!1))).search(r))return n.push(this),!0;if("exact"===v.fullTextSearch&&K.exactSearch(t,e))return n.push(this),!0;if(!0===v.fullTextSearch&&K.fuzzySearch(t,e))return n.push(this),!0}return"both"!=v.match&&"value"!=v.match||!(-1!==(i=String(K.get.choiceValue(i,e))).search(r)||"exact"===v.fullTextSearch&&K.exactSearch(t,i)||!0===v.fullTextSearch&&K.fuzzySearch(t,i))?void 0:(n.push(this),!0)}))),K.debug("Showing only matched items",t),K.remove.filteredItem(),n&&$.not(n).addClass(b.filtered)},fuzzySearch:function(e,t){var n=t.length,r=e.length;if(e=e.toLowerCase(),t=t.toLowerCase(),n<r)return!1;if(r===n)return e===t;e:for(var i=0,o=0;i<r;i++){for(var a=e.charCodeAt(i);o<n;)if(t.charCodeAt(o++)===a)continue e;return!1}return!0},exactSearch:function(e,t){return e=e.toLowerCase(),-1<(t=t.toLowerCase()).indexOf(e)},filterActive:function(){v.useLabels&&$.filter("."+b.active).addClass(b.filtered)},focusSearch:function(e){K.has.search()&&!K.is.focusedOnSearch()&&(e?(B.off("focus"+T,S.search),j.focus(),B.on("focus"+T,S.search,K.event.search.focus)):j.focus())},forceSelection:function(){var e=$.not(b.filtered).filter("."+b.selected).eq(0),t=$.not(b.filtered).filter("."+b.active).eq(0);0<(e=0<e.length?e:t).length&&!K.is.multiple()?(K.debug("Forcing partial selection to selected item",e),K.event.item.click.call(e,{},!0)):(v.allowAdditions&&K.set.selected(K.get.query()),K.remove.searchTerm())},change:{values:function(e){v.allowAdditions||K.clear(),K.debug("Creating dropdown with specified values",e),K.setup.menu({values:e}),P.each(e,(function(e,t){if(1==t.selected)return K.debug("Setting initial selection to",t.value),K.set.selected(t.value),!0}))}},event:{change:function(){q||(K.debug("Input changed, updating selection"),K.set.selected())},focus:function(){v.showOnFocus&&!Q&&K.is.hidden()&&!f&&K.show()},blur:function(e){f=U.activeElement===this,Q||f||(K.remove.activeLabel(),K.hide())},mousedown:function(){K.is.searchSelection()?d=!0:Q=!0},mouseup:function(){K.is.searchSelection()?d=!1:Q=!1},click:function(e){P(e.target).is(B)&&(K.is.focusedOnSearch()?K.show():K.focusSearch())},search:{focus:function(){Q=!0,K.is.multiple()&&K.remove.activeLabel(),v.showOnFocus&&K.search()},blur:function(e){f=U.activeElement===this,!K.is.searchSelection()||d||V||f||(v.forceSelection&&K.forceSelection(),K.hide()),d=!1}},icon:{click:function(e){R.hasClass(b.clear)?K.clear():K.can.click()&&K.toggle()}},text:{focus:function(e){Q=!0,K.focusSearch()}},input:function(e){(K.is.multiple()||K.is.searchSelection())&&K.set.filtered(),clearTimeout(K.timer),K.timer=setTimeout(K.search,v.delay.search)},label:{click:function(e){var t=P(this),n=B.find(S.label),r=n.filter("."+b.active),i=t.nextAll("."+b.active),o=t.prevAll("."+b.active);i=(0<i.length?t.nextUntil(i):t.prevUntil(o)).add(r).add(t);e.shiftKey?(r.removeClass(b.active),i.addClass(b.active)):e.ctrlKey?t.toggleClass(b.active):(r.removeClass(b.active),t.addClass(b.active)),v.onLabelSelect.apply(this,n.filter("."+b.active))}},remove:{click:function(){var e=P(this).parent();e.hasClass(b.active)?K.remove.activeLabels():K.remove.activeLabels(e)}},test:{toggle:function(e){var t=K.is.multiple()?K.show:K.toggle;K.is.bubbledLabelClick(e)||K.is.bubbledIconClick(e)||K.determine.eventOnElement(e,t)&&e.preventDefault()},touch:function(e){K.determine.eventOnElement(e,(function(){"touchstart"==e.type?K.timer=setTimeout((function(){K.hide()}),v.delay.touch):"touchmove"==e.type&&clearTimeout(K.timer)})),e.stopPropagation()},hide:function(e){K.determine.eventInModule(e,K.hide)}},select:{mutation:function(e){K.debug("<select> modified, recreating menu");var t=!1;P.each(e,(function(e,n){if(P(n.target).is("select")||P(n.addedNodes).is("select"))return t=!0})),t&&(K.disconnect.selectObserver(),K.refresh(),K.setup.select(),K.set.selected(),K.observe.select())}},menu:{mutation:function(e){var t=(e=e[0]).addedNodes?P(e.addedNodes[0]):P(!1);e=e.removedNodes?P(e.removedNodes[0]):P(!1),e=(t=t.add(e)).is(S.addition)||0<t.closest(S.addition).length,t=t.is(S.message)||0<t.closest(S.message).length;e||t?(K.debug("Updating item selector cache"),K.refreshItems()):(K.debug("Menu modified, updating selector cache"),K.refresh())},mousedown:function(){V=!0},mouseup:function(){V=!1}},item:{mouseenter:function(e){var t=P(e.target),n=(i=P(this)).children(S.menu),r=i.siblings(S.item).children(S.menu),i=0<n.length;0<n.find(t).length||!i||(clearTimeout(K.itemTimer),K.itemTimer=setTimeout((function(){K.verbose("Showing sub-menu",n),P.each(r,(function(){K.animate.hide(!1,P(this))})),K.animate.show(!1,n)}),v.delay.show),e.preventDefault())},mouseleave:function(e){var t=P(this).children(S.menu);0<t.length&&(clearTimeout(K.itemTimer),K.itemTimer=setTimeout((function(){K.verbose("Hiding sub-menu",t),K.animate.hide(!1,t)}),v.delay.hide))},click:function(e,t){var n=P(this),r=(e=P(e?e.target:""),n.find(S.menu)),i=K.get.choiceText(n),o=K.get.choiceValue(n,i),a=0<r.length;r=0<r.find(e).length;K.has.menuSearch()&&P(U.activeElement).blur(),r||a&&!v.allowCategorySelection||(K.is.searchSelection()&&(v.allowAdditions&&K.remove.userAddition(),K.remove.searchTerm(),K.is.focusedOnSearch()||1==t||K.focusSearch(!0)),v.useLabels||(K.remove.filteredItem(),K.set.scrollPosition(n)),K.determine.selectAction.call(this,i,o))}},document:{keydown:function(e){var t,n,r,i,o,a,s,u,c,l,h=e.which;K.is.inObject(h,x)&&((n=(t=B.find(S.label)).filter("."+b.active)).data(C.value),a=t.index(n),s=t.length,r=0<n.length,i=1<n.length,o=0===a,a=a+1==s,s=K.is.searchSelection(),u=K.is.focusedOnSearch(),c=K.is.focused(),l=u&&0===K.get.caretPosition(),s&&!r&&!u||(h==x.leftArrow?!c&&!l||r?r&&(e.shiftKey?K.verbose("Adding previous label to selection"):(K.verbose("Selecting previous label"),t.removeClass(b.active)),o&&!i?n.addClass(b.active):n.prev(S.siblingLabel).addClass(b.active).end(),e.preventDefault()):(K.verbose("Selecting previous label"),t.last().addClass(b.active)):h==x.rightArrow?(c&&!r&&t.first().addClass(b.active),r&&(e.shiftKey?K.verbose("Adding next label to selection"):(K.verbose("Selecting next label"),t.removeClass(b.active)),a?s?u?t.removeClass(b.active):K.focusSearch():(i?n.next(S.siblingLabel):n).addClass(b.active):n.next(S.siblingLabel).addClass(b.active),e.preventDefault())):h==x.deleteKey||h==x.backspace?r?(K.verbose("Removing active labels"),a&&s&&!u&&K.focusSearch(),n.last().next(S.siblingLabel).addClass(b.active),K.remove.activeLabels(n),e.preventDefault()):l&&!r&&h==x.backspace&&(K.verbose("Removing last label on input backspace"),n=t.last().addClass(b.active),K.remove.activeLabels(n)):n.removeClass(b.active)))}},keydown:function(e){var t=e.which;if(K.is.inObject(t,x)){var n,r=$.not(S.unselectable).filter("."+b.selected).eq(0),i=H.children("."+b.active).eq(0),o=(i=0<(r=0<r.length?r:i).length?r.siblings(":not(."+b.filtered+")").addBack():H.children(":not(."+b.filtered+")"),r.children(S.menu)),a=r.closest(S.menu),s=a.hasClass(b.visible)||a.hasClass(b.animating)||0<a.parent(S.menu).length,u=0<o.length,c=0<r.length,l=0<r.not(S.unselectable).length,h=t==x.delimiter&&v.allowAdditions&&K.is.multiple();if(v.allowAdditions&&v.hideAdditions&&(t==x.enter||h)&&l&&(K.verbose("Selecting item from keyboard shortcut",r),K.event.item.click.call(r,e),K.is.searchSelection()&&K.remove.searchTerm()),K.is.visible()){if(t!=x.enter&&!h||(t==x.enter&&c&&u&&!v.allowCategorySelection?(K.verbose("Pressed enter on unselectable category, opening sub menu"),t=x.rightArrow):l&&(K.verbose("Selecting item from keyboard shortcut",r),K.event.item.click.call(r,e),K.is.searchSelection()&&K.remove.searchTerm()),e.preventDefault()),c&&(t==x.leftArrow&&a[0]!==H[0]&&(K.verbose("Left key pressed, closing sub-menu"),K.animate.hide(!1,a),r.removeClass(b.selected),a.closest(S.item).addClass(b.selected),e.preventDefault()),t==x.rightArrow&&u&&(K.verbose("Right key pressed, opening sub-menu"),K.animate.show(!1,o),r.removeClass(b.selected),o.find(S.item).eq(0).addClass(b.selected),e.preventDefault())),t==x.upArrow){if(n=(c&&s?r.prevAll(S.item+":not("+S.unselectable+")"):$).eq(0),i.index(n)<0)return K.verbose("Up key pressed but reached top of current menu"),void e.preventDefault();K.verbose("Up key pressed, changing active item"),r.removeClass(b.selected),n.addClass(b.selected),K.set.scrollPosition(n),v.selectOnKeydown&&K.is.single()&&K.set.selectedItem(n),e.preventDefault()}if(t==x.downArrow){if(0===(n=(c&&s?r.nextAll(S.item+":not("+S.unselectable+")"):$).eq(0)).length)return K.verbose("Down key pressed but reached bottom of current menu"),void e.preventDefault();K.verbose("Down key pressed, changing active item"),$.removeClass(b.selected),n.addClass(b.selected),K.set.scrollPosition(n),v.selectOnKeydown&&K.is.single()&&K.set.selectedItem(n),e.preventDefault()}t==x.pageUp&&(K.scrollPage("up"),e.preventDefault()),t==x.pageDown&&(K.scrollPage("down"),e.preventDefault()),t==x.escape&&(K.verbose("Escape key pressed, closing dropdown"),K.hide())}else h&&e.preventDefault(),t!=x.downArrow||K.is.visible()||(K.verbose("Down key pressed, showing dropdown"),K.show(),e.preventDefault())}else K.has.search()||K.set.selectedLetter(String.fromCharCode(t))}},trigger:{change:function(){var e=U.createEvent("HTMLEvents"),t=F[0];t&&(K.verbose("Triggering native change event"),e.initEvent("change",!0,!1),t.dispatchEvent(e))}},determine:{selectAction:function(e,t){K.verbose("Determining action",v.action),P.isFunction(K.action[v.action])?(K.verbose("Triggering preset action",v.action,e,t),K.action[v.action].call(G,e,t,this)):P.isFunction(v.action)?(K.verbose("Triggering user action",v.action,e,t),v.action.call(G,e,t,this)):K.error(_.action,v.action)},eventInModule:function(e,t){var n=0<(e=P(e.target)).closest(U.documentElement).length;e=0<e.closest(B).length;return t=P.isFunction(t)?t:function(){},n&&!e?(K.verbose("Triggering event",t),t(),!0):(K.verbose("Event occurred in dropdown, canceling callback"),!1)},eventOnElement:function(e,t){var n=(r=P(e.target)).closest(S.siblingLabel),r=(e=U.body.contains(e.target),n=0===B.find(n).length,0===r.closest(H).length);return t=P.isFunction(t)?t:function(){},e&&n&&r?(K.verbose("Triggering event",t),t(),!0):(K.verbose("Event occurred in dropdown menu, canceling callback"),!1)}},action:{nothing:function(){},activate:function(e,t,n){t=void 0!==t?t:e,K.can.activate(P(n))&&(K.set.selected(t,P(n)),K.is.multiple()&&!K.is.allFiltered()||K.hideAndClear())},select:function(e,t,n){t=void 0!==t?t:e,K.can.activate(P(n))&&(K.set.value(t,e,P(n)),K.is.multiple()&&!K.is.allFiltered()||K.hideAndClear())},combo:function(e,t,n){K.set.selected(t=void 0!==t?t:e,P(n)),K.hideAndClear()},hide:function(e,t,n){K.set.value(t,e,P(n)),K.hideAndClear()}},get:{id:function(){return m},defaultText:function(){return B.data(C.defaultText)},defaultValue:function(){return B.data(C.defaultValue)},placeholderText:function(){return"auto"!=v.placeholder&&"string"==typeof v.placeholder?v.placeholder:B.data(C.placeholderText)||""},text:function(){return M.text()},query:function(){return P.trim(j.val())},searchWidth:function(e){return e=void 0!==e?e:j.val(),N.text(e),Math.ceil(N.width()+1)},selectionCount:function(){var e=K.get.values();return K.is.multiple()?P.isArray(e)?e.length:0:""!==K.get.value()?1:0},transition:function(e){return"auto"==v.transition?K.is.upward(e)?"slide up":"slide down":v.transition},userValues:function(){var e=K.get.values();return!!e&&(e=P.isArray(e)?e:[e],P.grep(e,(function(e){return!1===K.get.item(e)})))},uniqueArray:function(e){return P.grep(e,(function(t,n){return P.inArray(t,e)===n}))},caretPosition:function(){var e,t,n=j.get(0);return"selectionStart"in n?n.selectionStart:U.selection?(n.focus(),t=(e=U.selection.createRange()).text.length,e.moveStart("character",-n.value.length),e.text.length-t):void 0},value:function(){var e=0<F.length?F.val():B.data(C.value),t=P.isArray(e)&&1===e.length&&""===e[0];return void 0===e||t?"":e},values:function(){var e=K.get.value();return""===e?"":!K.has.selectInput()&&K.is.multiple()?"string"==typeof e?e.split(v.delimiter):"":e},remoteValues:function(){var e=K.get.values(),t=!1;return e&&P.each(e="string"==typeof e?[e]:e,(function(e,n){var r=K.read.remoteData(n);K.verbose("Restoring value from session data",r,n),r&&((t=t||{})[n]=r)})),t},choiceText:function(e,t){if(t=void 0!==t?t:v.preserveHTML,e)return 0<e.find(S.menu).length&&(K.verbose("Retrieving text of element with sub-menu"),(e=e.clone()).find(S.menu).remove(),e.find(S.menuIcon).remove()),void 0!==e.data(C.text)?e.data(C.text):t?P.trim(e.html()):P.trim(e.text())},choiceValue:function(e,t){return t=t||K.get.choiceText(e),!!e&&(void 0!==e.data(C.value)?String(e.data(C.value)):"string"==typeof t?P.trim(t.toLowerCase()):String(t))},inputEvent:function(){var e=j[0];return!!e&&(void 0!==e.oninput?"input":void 0!==e.onpropertychange?"propertychange":"keyup")},selectValues:function(){var e={values:[]};return B.find("option").each((function(){var t=(r=P(this)).html(),n=r.attr("disabled"),r=void 0!==r.attr("value")?r.attr("value"):t;"auto"===v.placeholder&&""===r?e.placeholder=t:e.values.push({name:t,value:r,disabled:n})})),v.placeholder&&"auto"!==v.placeholder&&(K.debug("Setting placeholder value to",v.placeholder),e.placeholder=v.placeholder),v.sortSelect?(e.values.sort((function(e,t){return e.name>t.name?1:-1})),K.debug("Retrieved and sorted values from select",e)):K.debug("Retrieved values from select",e),e},activeItem:function(){return $.filter("."+b.active)},selectedItem:function(){var e=$.not(S.unselectable).filter("."+b.selected);return 0<e.length?e:$.eq(0)},itemWithAdditions:function(e){var t=K.get.item(e);return(e=K.create.userChoice(e))&&0<e.length?0<t.length?t.add(e):e:t},item:function(e,t){var n=!1,r=null!=(e=void 0!==e?e:void 0!==K.get.values()?K.get.values():K.get.text()),i=K.is.multiple()&&P.isArray(e);return t=""===e||0===e||t||!1,r&&$.each((function(){var r=P(this),o=K.get.choiceText(r),a=K.get.choiceValue(r,o);if(null!=a)if(i)-1===P.inArray(String(a),e)&&-1===P.inArray(o,e)||(n=n?n.add(r):r);else if(t){if(K.verbose("Ambiguous dropdown value using strict type check",r,e),a===e||o===e)return n=r,!0}else if(String(a)==String(e)||o==e)return K.verbose("Found select item by value",a,e),n=r,!0})),n}},check:{maxSelections:function(e){return!v.maxSelections||((e=void 0!==e?e:K.get.selectionCount())>=v.maxSelections?(K.debug("Maximum selection count reached"),v.useLabels&&($.addClass(b.filtered),K.add.message(y.maxSelections)),!0):(K.verbose("No longer at maximum selection count"),K.remove.message(),K.remove.filteredItem(),K.is.searchSelection()&&K.filterItems(),!1))}},restore:{defaults:function(){K.clear(),K.restore.defaultText(),K.restore.defaultValue()},defaultText:function(){var e=K.get.defaultText();e===K.get.placeholderText?(K.debug("Restoring default placeholder text",e),K.set.placeholderText(e)):(K.debug("Restoring default text",e),K.set.text(e))},placeholderText:function(){K.set.placeholderText()},defaultValue:function(){var e=K.get.defaultValue();void 0!==e&&(K.debug("Restoring default value",e),""!==e?(K.set.value(e),K.set.selected()):(K.remove.activeItem(),K.remove.selectedItem()))},labels:function(){v.allowAdditions&&(v.useLabels||(K.error(_.labels),v.useLabels=!0),K.debug("Restoring selected values"),K.create.userLabels()),K.check.maxSelections()},selected:function(){K.restore.values(),K.is.multiple()?(K.debug("Restoring previously selected values and labels"),K.restore.labels()):K.debug("Restoring previously selected values")},values:function(){K.set.initialLoad(),v.apiSettings&&v.saveRemoteData&&K.get.remoteValues()?K.restore.remoteValues():K.set.selected(),K.remove.initialLoad()},remoteValues:function(){var e=K.get.remoteValues();K.debug("Recreating selected from session data",e),e&&(K.is.single()?P.each(e,(function(e,t){K.set.text(t)})):P.each(e,(function(e,t){K.add.label(e,t)})))}},read:{remoteData:function(e){if(void 0!==L.Storage)return void 0!==(e=sessionStorage.getItem(e))&&e;K.error(_.noStorage)}},save:{defaults:function(){K.save.defaultText(),K.save.placeholderText(),K.save.defaultValue()},defaultValue:function(){var e=K.get.value();K.verbose("Saving default value as",e),B.data(C.defaultValue,e)},defaultText:function(){var e=K.get.text();K.verbose("Saving default text as",e),B.data(C.defaultText,e)},placeholderText:function(){var e;!1!==v.placeholder&&M.hasClass(b.placeholder)&&(e=K.get.text(),K.verbose("Saving placeholder text as",e),B.data(C.placeholderText,e))},remoteData:function(e,t){void 0!==L.Storage?(K.verbose("Saving remote data to session storage",t,e),sessionStorage.setItem(t,e)):K.error(_.noStorage)}},clear:function(){K.is.multiple()&&v.useLabels?K.remove.labels():(K.remove.activeItem(),K.remove.selectedItem()),K.set.placeholderText(),K.clearValue()},clearValue:function(){K.set.value("")},scrollPage:function(e,t){var n=(t=t||K.get.selectedItem()).closest(S.menu),r=n.outerHeight(),i=n.scrollTop(),o=$.eq(0).outerHeight();r=Math.floor(r/o),n.prop("scrollHeight"),i="up"==e?i-o*r:i+o*r,o=$.not(S.unselectable),r="up"==e?o.index(t)-r:o.index(t)+r;0<(r=("up"==e?0<=r:r<o.length)?o.eq(r):"up"==e?o.first():o.last()).length&&(K.debug("Scrolling page",e,r),t.removeClass(b.selected),r.addClass(b.selected),v.selectOnKeydown&&K.is.single()&&K.set.selectedItem(r),n.scrollTop(i))},set:{filtered:function(){var e=K.is.multiple(),t=K.is.searchSelection(),n=e&&t,r="string"==typeof(t=t?K.get.query():"")&&0<t.length,i=K.get.searchWidth();t=""!==t;e&&r&&(K.verbose("Adjusting input width",i,v.glyphWidth),j.css("width",i)),r||n&&t?(K.verbose("Hiding placeholder text"),M.addClass(b.filtered)):e&&(!n||t)||(K.verbose("Showing placeholder text"),M.removeClass(b.filtered))},empty:function(){B.addClass(b.empty)},loading:function(){B.addClass(b.loading)},placeholderText:function(e){e=e||K.get.placeholderText(),K.debug("Setting placeholder text",e),K.set.text(e),M.addClass(b.placeholder)},tabbable:function(){K.is.searchSelection()?(K.debug("Added tabindex to searchable dropdown"),j.val("").attr("tabindex",0),H.attr("tabindex",-1)):(K.debug("Added tabindex to dropdown"),void 0===B.attr("tabindex")&&(B.attr("tabindex",0),H.attr("tabindex",-1)))},initialLoad:function(){K.verbose("Setting initial load"),h=!0},activeItem:function(e){v.allowAdditions&&0<e.filter(S.addition).length?e.addClass(b.filtered):e.addClass(b.active)},partialSearch:function(e){var t=K.get.query().length;j.val(e.substr(0,t))},scrollPosition:function(e,t){var n,r,i=(e=e||K.get.selectedItem()).closest(S.menu),o=e&&0<e.length;t=void 0!==t&&t,e&&0<i.length&&o&&(e.position().top,i.addClass(b.loading),e=(o=i.scrollTop())-i.offset().top+e.offset().top,t||(r=o+i.height()<e+5,n=e-5<o),K.debug("Scrolling to active item",e),(t||n||r)&&i.scrollTop(e),i.removeClass(b.loading))},text:function(e){"select"!==v.action&&("combo"==v.action?(K.debug("Changing combo button text",e,z),v.preserveHTML?z.html(e):z.text(e)):(e!==K.get.placeholderText()&&M.removeClass(b.placeholder),K.debug("Changing text",e,M),M.removeClass(b.filtered),v.preserveHTML?M.html(e):M.text(e)))},selectedItem:function(e){var t=K.get.choiceValue(e),n=K.get.choiceText(e,!1),r=K.get.choiceText(e,!0);K.debug("Setting user selection to item",e),K.remove.activeItem(),K.set.partialSearch(n),K.set.activeItem(e),K.set.selected(t,e),K.set.text(r)},selectedLetter:function(e){var t=$.filter("."+b.selected),n=0<t.length&&K.has.firstLetter(t,e),r=!1;n&&(n=t.nextAll($).eq(0),K.has.firstLetter(n,e)&&(r=n)),r||$.each((function(){if(K.has.firstLetter(P(this),e))return r=P(this),!1})),r&&(K.verbose("Scrolling to next value with letter",e),K.set.scrollPosition(r),t.removeClass(b.selected),r.addClass(b.selected),v.selectOnKeydown&&K.is.single()&&K.set.selectedItem(r))},direction:function(e){"auto"==v.direction?(K.remove.upward(),(K.can.openDownward(e)?K.remove:K.set).upward(e),K.is.leftward(e)||K.can.openRightward(e)||K.set.leftward(e)):"upward"==v.direction&&K.set.upward(e)},upward:function(e){(e||B).addClass(b.upward)},leftward:function(e){(e||H).addClass(b.leftward)},value:function(e,t,n){var r=K.escape.value(e),i=0<F.length,o=K.get.values(),a=void 0!==e?String(e):e;if(i){if(!v.allowReselection&&a==o&&(K.verbose("Skipping value update already same value",e,o),!K.is.initialLoad()))return;K.is.single()&&K.has.selectInput()&&K.can.extendSelect()&&(K.debug("Adding user option",e),K.add.optionValue(e)),K.debug("Updating input value",r,o),q=!0,F.val(r),!1===v.fireOnInit&&K.is.initialLoad()?K.debug("Input native change event ignored on initial load"):K.trigger.change(),q=!1}else K.verbose("Storing value in metadata",r,F),r!==o&&B.data(C.value,a);K.is.single()&&v.clearable&&(r?K.set:K.remove).clearable(),!1===v.fireOnInit&&K.is.initialLoad()?K.verbose("No callback on initial load",v.onChange):v.onChange.call(G,e,t,n)},active:function(){B.addClass(b.active)},multiple:function(){B.addClass(b.multiple)},visible:function(){B.addClass(b.visible)},exactly:function(e,t){K.debug("Setting selected to exact values"),K.clear(),K.set.selected(e,t)},selected:function(e,t){var n=K.is.multiple();(t=v.allowAdditions?t||K.get.itemWithAdditions(e):t||K.get.item(e))&&(K.debug("Setting selected menu item to",t),K.is.multiple()&&K.remove.searchWidth(),K.is.single()?(K.remove.activeItem(),K.remove.selectedItem()):v.useLabels&&K.remove.selectedItem(),t.each((function(){var e=P(this),r=K.get.choiceText(e),i=K.get.choiceValue(e,r),o=e.hasClass(b.filtered),a=e.hasClass(b.active),s=e.hasClass(b.addition),u=n&&1==t.length;n?!a||s?(v.apiSettings&&v.saveRemoteData&&K.save.remoteData(r,i),v.useLabels?(K.add.label(i,r,u),K.add.value(i,r,e),K.set.activeItem(e),K.filterActive(),K.select.nextAvailable(t)):(K.add.value(i,r,e),K.set.text(K.add.variables(y.count)),K.set.activeItem(e))):o||(K.debug("Selected active value, removing label"),K.remove.selected(i)):(v.apiSettings&&v.saveRemoteData&&K.save.remoteData(r,i),K.set.text(r),K.set.value(i,r,e),e.addClass(b.active).addClass(b.selected))})))},clearable:function(){R.addClass(b.clear)}},add:{label:function(e,t,n){var r,i=K.is.searchSelection()?j:M,o=K.escape.value(e);v.ignoreCase&&(o=o.toLowerCase()),r=P("<a />").addClass(b.label).attr("data-"+C.value,o).html(O.label(o,t)),r=v.onLabelCreate.call(r,o,t),K.has.label(e)?K.debug("User selection already exists, skipping",o):(v.label.variation&&r.addClass(v.label.variation),!0===n?(K.debug("Animating in label",r),r.addClass(b.hidden).insertBefore(i).transition(v.label.transition,v.label.duration)):(K.debug("Adding selection label",r),r.insertBefore(i)))},message:function(e){var t=H.children(S.message);e=v.templates.message(K.add.variables(e));0<t.length?t.html(e):P("<div/>").html(e).addClass(b.message).appendTo(H)},optionValue:function(e){var t=K.escape.value(e);0<F.find('option[value="'+K.escape.string(t)+'"]').length||(K.disconnect.selectObserver(),K.is.single()&&(K.verbose("Removing previous user addition"),F.find("option."+b.addition).remove()),P("<option/>").prop("value",t).addClass(b.addition).html(e).appendTo(F),K.verbose("Adding user addition as an <option>",e),K.observe.select())},userSuggestion:function(e){var t=H.children(S.addition),n=(n=K.get.item(e))&&n.not(S.addition).length,r=0<t.length;v.useLabels&&K.has.maxSelections()||(""===e||n?t.remove():(r?(t.data(C.value,e).data(C.text,e).attr("data-"+C.value,e).attr("data-"+C.text,e).removeClass(b.filtered),v.hideAdditions||(n=v.templates.addition(K.add.variables(y.addResult,e)),t.html(n)),K.verbose("Replacing user suggestion with new value",t)):((t=K.create.userChoice(e)).prependTo(H),K.verbose("Adding item choice to menu corresponding with user choice addition",t)),v.hideAdditions&&!K.is.allFiltered()||t.addClass(b.selected).siblings().removeClass(b.selected),K.refreshItems()))},variables:function(e,t){var n,r=-1!==e.search("{count}"),i=-1!==e.search("{maxCount}"),o=-1!==e.search("{term}");return K.verbose("Adding templated variables to message",e),r&&(n=K.get.selectionCount(),e=e.replace("{count}",n)),i&&(n=K.get.selectionCount(),e=e.replace("{maxCount}",v.maxSelections)),o&&(r=t||K.get.query(),e=e.replace("{term}",r)),e},value:function(e,t,n){var r,i=K.get.values();K.has.value(e)?K.debug("Value already selected"):""!==e?(r=P.isArray(i)?(r=i.concat([e]),K.get.uniqueArray(r)):[e],K.has.selectInput()?K.can.extendSelect()&&(K.debug("Adding value to select",e,r,F),K.add.optionValue(e)):(r=r.join(v.delimiter),K.debug("Setting hidden input to delimited value",r,F)),!1===v.fireOnInit&&K.is.initialLoad()?K.verbose("Skipping onadd callback on initial load",v.onAdd):v.onAdd.call(G,e,t,n),K.set.value(r,e,t,n),K.check.maxSelections()):K.debug("Cannot select blank values from multiselect")}},remove:{active:function(){B.removeClass(b.active)},activeLabel:function(){B.find(S.label).removeClass(b.active)},empty:function(){B.removeClass(b.empty)},loading:function(){B.removeClass(b.loading)},initialLoad:function(){h=!1},upward:function(e){(e||B).removeClass(b.upward)},leftward:function(e){(e||H).removeClass(b.leftward)},visible:function(){B.removeClass(b.visible)},activeItem:function(){$.removeClass(b.active)},filteredItem:function(){v.useLabels&&K.has.maxSelections()||((v.useLabels&&K.is.multiple()?$.not("."+b.active):$).removeClass(b.filtered),K.remove.empty())},optionValue:function(e){e=K.escape.value(e);var t=F.find('option[value="'+K.escape.string(e)+'"]');0<t.length&&t.hasClass(b.addition)&&(g&&(g.disconnect(),K.verbose("Temporarily disconnecting mutation observer")),t.remove(),K.verbose("Removing user addition as an <option>",e),g&&g.observe(F[0],{childList:!0,subtree:!0}))},message:function(){H.children(S.message).remove()},searchWidth:function(){j.css("width","")},searchTerm:function(){K.verbose("Cleared search term"),j.val(""),K.set.filtered()},userAddition:function(){$.filter(S.addition).remove()},selected:function(e,t){if(!(t=v.allowAdditions?t||K.get.itemWithAdditions(e):t||K.get.item(e)))return!1;t.each((function(){var e=P(this),t=K.get.choiceText(e),n=K.get.choiceValue(e,t);K.is.multiple()?v.useLabels?(K.remove.value(n,t,e),K.remove.label(n)):(K.remove.value(n,t,e),0===K.get.selectionCount()?K.set.placeholderText():K.set.text(K.add.variables(y.count))):K.remove.value(n,t,e),e.removeClass(b.filtered).removeClass(b.active),v.useLabels&&e.removeClass(b.selected)}))},selectedItem:function(){$.removeClass(b.selected)},value:function(e,t,n){var r,i=K.get.values();K.has.selectInput()?(K.verbose("Input is <select> removing selected option",e),r=K.remove.arrayValue(e,i),K.remove.optionValue(e)):(K.verbose("Removing from delimited values",e),r=(r=K.remove.arrayValue(e,i)).join(v.delimiter)),!1===v.fireOnInit&&K.is.initialLoad()?K.verbose("No callback on initial load",v.onRemove):v.onRemove.call(G,e,t,n),K.set.value(r,t,n),K.check.maxSelections()},arrayValue:function(e,t){return P.isArray(t)||(t=[t]),t=P.grep(t,(function(t){return e!=t})),K.verbose("Removed value from delimited string",e,t),t},label:function(e,t){e=B.find(S.label).filter("[data-"+C.value+'="'+K.escape.string(e)+'"]'),K.verbose("Removing label",e),e.remove()},activeLabels:function(e){e=e||B.find(S.label).filter("."+b.active),K.verbose("Removing active label selections",e),K.remove.labels(e)},labels:function(e){e=e||B.find(S.label),K.verbose("Removing labels",e),e.each((function(){var e=P(this),t=e.data(C.value),n=void 0!==t?String(t):t,r=K.is.userValue(n);!1!==v.onLabelRemove.call(e,t)?(K.remove.message(),r?(K.remove.value(n),K.remove.label(n)):K.remove.selected(n)):K.debug("Label remove callback cancelled removal")}))},tabbable:function(){(K.is.searchSelection()?(K.debug("Searchable dropdown initialized"),j):(K.debug("Simple selection dropdown initialized"),B)).removeAttr("tabindex"),H.removeAttr("tabindex")},clearable:function(){R.removeClass(b.clear)}},has:{menuSearch:function(){return K.has.search()&&0<j.closest(H).length},search:function(){return 0<j.length},sizer:function(){return 0<N.length},selectInput:function(){return F.is("select")},minCharacters:function(e){return!v.minCharacters||(e=String(void 0!==e?e:K.get.query())).length>=v.minCharacters},firstLetter:function(e,t){return!(!e||0===e.length||"string"!=typeof t)&&(e=K.get.choiceText(e,!1),(t=t.toLowerCase())==String(e).charAt(0).toLowerCase())},input:function(){return 0<F.length},items:function(){return 0<$.length},menu:function(){return 0<H.length},message:function(){return 0!==H.children(S.message).length},label:function(e){e=K.escape.value(e);var t=B.find(S.label);return v.ignoreCase&&(e=e.toLowerCase()),0<t.filter("[data-"+C.value+'="'+K.escape.string(e)+'"]').length},maxSelections:function(){return v.maxSelections&&K.get.selectionCount()>=v.maxSelections},allResultsFiltered:function(){var e=$.not(S.addition);return e.filter(S.unselectable).length===e.length},userSuggestion:function(){return 0<H.children(S.addition).length},query:function(){return""!==K.get.query()},value:function(e){return v.ignoreCase?K.has.valueIgnoringCase(e):K.has.valueMatchingCase(e)},valueMatchingCase:function(e){var t=K.get.values();return!!(P.isArray(t)?t&&-1!==P.inArray(e,t):t==e)},valueIgnoringCase:function(e){var t=K.get.values(),n=!1;return P.isArray(t)||(t=[t]),P.each(t,(function(t,r){if(String(e).toLowerCase()==String(r).toLowerCase())return!(n=!0)})),n}},is:{active:function(){return B.hasClass(b.active)},animatingInward:function(){return H.transition("is inward")},animatingOutward:function(){return H.transition("is outward")},bubbledLabelClick:function(e){return P(e.target).is("select, input")&&0<B.closest("label").length},bubbledIconClick:function(e){return 0<P(e.target).closest(R).length},alreadySetup:function(){return B.is("select")&&void 0!==B.parent(S.dropdown).data(D)&&0===B.prev().length},animating:function(e){return e?e.transition&&e.transition("is animating"):H.transition&&H.transition("is animating")},leftward:function(e){return(e||H).hasClass(b.leftward)},disabled:function(){return B.hasClass(b.disabled)},focused:function(){return U.activeElement===B[0]},focusedOnSearch:function(){return U.activeElement===j[0]},allFiltered:function(){return(K.is.multiple()||K.has.search())&&!(0==v.hideAdditions&&K.has.userSuggestion())&&!K.has.message()&&K.has.allResultsFiltered()},hidden:function(e){return!K.is.visible(e)},initialLoad:function(){return h},inObject:function(e,t){var n=!1;return P.each(t,(function(t,r){if(r==e)return n=!0})),n},multiple:function(){return B.hasClass(b.multiple)},remote:function(){return v.apiSettings&&K.can.useAPI()},single:function(){return!K.is.multiple()},selectMutation:function(e){var t=!1;return P.each(e,(function(e,n){if(n.target&&P(n.target).is("select"))return t=!0})),t},search:function(){return B.hasClass(b.search)},searchSelection:function(){return K.has.search()&&1===j.parent(S.dropdown).length},selection:function(){return B.hasClass(b.selection)},userValue:function(e){return-1!==P.inArray(e,K.get.userValues())},upward:function(e){return(e||B).hasClass(b.upward)},visible:function(e){return(e||H).hasClass(b.visible)},verticallyScrollableContext:function(){var e=I.get(0)!==L&&I.css("overflow-y");return"auto"==e||"scroll"==e},horizontallyScrollableContext:function(){var e=I.get(0)!==L&&I.css("overflow-X");return"auto"==e||"scroll"==e}},can:{activate:function(e){return!!v.useLabels||!K.has.maxSelections()||!(!K.has.maxSelections()||!e.hasClass(b.active))},openDownward:function(e){var t,n;return(e=e||H).addClass(b.loading),t={context:{offset:I.get(0)===L?{top:0,left:0}:I.offset(),scrollTop:I.scrollTop(),height:I.outerHeight()},menu:{offset:e.offset(),height:e.outerHeight()}},K.is.verticallyScrollableContext()&&(t.menu.offset.top+=t.context.scrollTop),n=(t={above:t.context.scrollTop<=t.menu.offset.top-t.context.offset.top-t.menu.height,below:t.context.scrollTop+t.context.height>=t.menu.offset.top-t.context.offset.top+t.menu.height}).below?(K.verbose("Dropdown can fit in context downward",t),!0):t.below||t.above?(K.verbose("Dropdown cannot fit below, opening upward",t),!1):(K.verbose("Dropdown cannot fit in either direction, favoring downward",t),!0),e.removeClass(b.loading),n},openRightward:function(e){var t,n=!0;return(e=e||H).addClass(b.loading),t={context:{offset:I.get(0)===L?{top:0,left:0}:I.offset(),scrollLeft:I.scrollLeft(),width:I.outerWidth()},menu:{offset:e.offset(),width:e.outerWidth()}},K.is.horizontallyScrollableContext()&&(t.menu.offset.left+=t.context.scrollLeft),(t=t.menu.offset.left-t.context.offset.left+t.menu.width>=t.context.scrollLeft+t.context.width)&&(K.verbose("Dropdown cannot fit in context rightward",t),n=!1),e.removeClass(b.loading),n},click:function(){return i||"click"==v.on},extendSelect:function(){return v.allowAdditions||v.apiSettings},show:function(){return!K.is.disabled()&&(K.has.items()||K.has.message())},useAPI:function(){return void 0!==P.fn.api}},animate:{show:function(e,t){var n=t||H,r=t?function(){}:function(){K.hideSubMenus(),K.hideOthers(),K.set.active()};e=P.isFunction(e)?e:function(){},K.verbose("Doing menu show animation",n),K.set.direction(t),t=K.get.transition(t),K.is.selection()&&K.set.scrollPosition(K.get.selectedItem(),!0),(K.is.hidden(n)||K.is.animating(n))&&("none"==t?(r(),n.transition("show"),e.call(G)):void 0!==P.fn.transition&&B.transition("is supported")?n.transition({animation:t+" in",debug:v.debug,verbose:v.verbose,duration:v.duration,queue:!0,onStart:r,onComplete:function(){e.call(G)}}):K.error(_.noTransition,t))},hide:function(e,t){var n=t||H,r=(v.duration,t?function(){}:function(){K.can.click()&&K.unbind.intent(),K.remove.active()});t=K.get.transition(t);e=P.isFunction(e)?e:function(){},(K.is.visible(n)||K.is.animating(n))&&(K.verbose("Doing menu hide animation",n),"none"==t?(r(),n.transition("hide"),e.call(G)):void 0!==P.fn.transition&&B.transition("is supported")?n.transition({animation:t+" out",duration:v.duration,debug:v.debug,verbose:v.verbose,queue:!1,onStart:r,onComplete:function(){e.call(G)}}):K.error(_.transition))}},hideAndClear:function(){K.remove.searchTerm(),K.has.maxSelections()||(K.has.search()?K.hide((function(){K.remove.filteredItem()})):K.hide())},delay:{show:function(){K.verbose("Delaying show event to ensure user intent"),clearTimeout(K.timer),K.timer=setTimeout(K.show,v.delay.show)},hide:function(){K.verbose("Delaying hide event to ensure user intent"),clearTimeout(K.timer),K.timer=setTimeout(K.hide,v.delay.hide)}},escape:{value:function(e){var t=P.isArray(e),n=!(r="string"==typeof e)&&!t,r=r&&-1!==e.search(E.quote),i=[];return n||!r?e:(K.debug("Encoding quote values for use in select",e),t?(P.each(e,(function(e,t){i.push(t.replace(E.quote,"&quot;"))})),i):e.replace(E.quote,"&quot;"))},string:function(e){return(e=String(e)).replace(E.escape,"\\$&")}},setting:function(e,t){if(K.debug("Changing setting",e,t),P.isPlainObject(e))P.extend(!0,v,e);else{if(void 0===t)return v[e];P.isPlainObject(v[e])?P.extend(!0,v[e],t):v[e]=t}},internal:function(e,t){if(P.isPlainObject(e))P.extend(!0,K,e);else{if(void 0===t)return K[e];K[e]=t}},debug:function(){!v.silent&&v.debug&&(v.performance?K.performance.log(arguments):(K.debug=Function.prototype.bind.call(console.info,console,v.name+":"),K.debug.apply(console,arguments)))},verbose:function(){!v.silent&&v.verbose&&v.debug&&(v.performance?K.performance.log(arguments):(K.verbose=Function.prototype.bind.call(console.info,console,v.name+":"),K.verbose.apply(console,arguments)))},error:function(){v.silent||(K.error=Function.prototype.bind.call(console.error,console,v.name+":"),K.error.apply(console,arguments))},performance:{log:function(e){var t,n;v.performance&&(n=(t=(new Date).getTime())-(o||t),o=t,a.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:G,"Execution Time":n})),clearTimeout(K.performance.timer),K.performance.timer=setTimeout(K.performance.display,500)},display:function(){v.name,o=!1,clearTimeout(K.performance.timer),P.each(a,(function(e,t){t["Execution Time"]})),(void 0!==console.group||void 0!==console.table)&&0<a.length&&!console.table&&P.each(a,(function(e,t){t.Name,t["Execution Time"]})),a=[]}},invoke:function(e,n,r){var i,o,a,s=W;return n=n||c,r=G||r,"string"==typeof e&&void 0!==s&&(e=e.split(/[\. ]/),i=e.length-1,P.each(e,(function(t,n){var r=t!=i?n+e[t+1].charAt(0).toUpperCase()+e[t+1].slice(1):e;if(!P.isPlainObject(s[r])||t==i)return void 0!==s[r]?(o=s[r],!1):P.isPlainObject(s[n])&&t!=i?void(s=s[n]):(void 0!==s[n]?o=s[n]:K.error(_.method,e),!1);s=s[r]}))),P.isFunction(o)?a=o.apply(r,n):void 0!==o&&(a=o),P.isArray(t)?t.push(a):void 0!==t?t=[t,a]:void 0!==a&&(t=a),o}};u?(void 0===W&&K.initialize(),K.invoke(s)):(void 0!==W&&W.invoke("destroy"),K.initialize())})),void 0!==t?t:n},P.fn.dropdown.settings={silent:!1,debug:!1,verbose:!1,performance:!0,on:"click",action:"activate",values:!1,clearable:!1,apiSettings:!1,selectOnKeydown:!0,minCharacters:0,filterRemoteData:!1,saveRemoteData:!0,throttle:200,context:L,direction:"auto",keepOnScreen:!0,match:"both",fullTextSearch:!1,placeholder:"auto",preserveHTML:!0,sortSelect:!1,forceSelection:!0,allowAdditions:!1,ignoreCase:!1,hideAdditions:!0,maxSelections:!1,useLabels:!0,delimiter:",",showOnFocus:!0,allowReselection:!1,allowTab:!0,allowCategorySelection:!1,fireOnInit:!1,transition:"auto",duration:200,glyphWidth:1.037,label:{transition:"scale",duration:200,variation:!1},delay:{hide:300,show:200,search:20,touch:50},onChange:function(e,t,n){},onAdd:function(e,t,n){},onRemove:function(e,t,n){},onLabelSelect:function(e){},onLabelCreate:function(e,t){return P(this)},onLabelRemove:function(e){return!0},onNoResults:function(e){return!0},onShow:function(){},onHide:function(){},name:"Dropdown",namespace:"dropdown",message:{addResult:"Add <b>{term}</b>",count:"{count} selected",maxSelections:"Max {maxCount} selections",noResults:"No results found.",serverError:"There was an error contacting the server"},error:{action:"You called a dropdown action that was not defined",alreadySetup:"Once a select has been initialized behaviors must be called on the created ui dropdown",labels:"Allowing user additions currently requires the use of labels.",missingMultiple:"<select> requires multiple property to be set to correctly preserve multiple values",method:"The method you called is not defined.",noAPI:"The API module is required to load resources remotely",noStorage:"Saving remote data requires session storage",noTransition:"This module requires ui transitions <https://github.com/Semantic-Org/UI-Transition>"},regExp:{escape:/[-[\]{}()*+?.,\\^$|#\s]/g,quote:/"/g},metadata:{defaultText:"defaultText",defaultValue:"defaultValue",placeholderText:"placeholder",text:"text",value:"value"},fields:{remoteValues:"results",values:"values",disabled:"disabled",name:"name",value:"value",text:"text"},keys:{backspace:8,delimiter:188,deleteKey:46,enter:13,escape:27,pageUp:33,pageDown:34,leftArrow:37,upArrow:38,rightArrow:39,downArrow:40},selector:{addition:".addition",dropdown:".ui.dropdown",hidden:".hidden",icon:"> .dropdown.icon",input:'> input[type="hidden"], > select',item:".item",label:"> .label",remove:"> .label > .delete.icon",siblingLabel:".label",menu:".menu",message:".message",menuIcon:".dropdown.icon",search:"input.search, .menu > .search > input, .menu input.search",sizer:"> input.sizer",text:"> .text:not(.icon)",unselectable:".disabled, .filtered"},className:{active:"active",addition:"addition",animating:"animating",clear:"clear",disabled:"disabled",empty:"empty",dropdown:"ui dropdown",filtered:"filtered",hidden:"hidden transition",item:"item",label:"ui label",loading:"loading",menu:"menu",message:"message",multiple:"multiple",placeholder:"default",sizer:"sizer",search:"search",selected:"selected",selection:"selection",upward:"upward",leftward:"left",visible:"visible"}},P.fn.dropdown.settings.templates={dropdown:function(e){var t=e.placeholder||!1,n=(e.values,"");return n+='<i class="dropdown icon"></i>',e.placeholder?n+='<div class="default text">'+t+"</div>":n+='<div class="text"></div>',n+='<div class="menu">',P.each(e.values,(function(e,t){n+=t.disabled?'<div class="disabled item" data-value="'+t.value+'">'+t.name+"</div>":'<div class="item" data-value="'+t.value+'">'+t.name+"</div>"})),n+="</div>"},menu:function(e,t){e=e[t.values]||{};var n="";return P.each(e,(function(e,r){var i=r[t.text]?'data-text="'+r[t.text]+'"':"",o=r[t.disabled]?"disabled ":"";n=(n+='<div class="'+o+'item" data-value="'+r[t.value]+'"'+i+">")+r[t.name]+"</div>"})),n},label:function(e,t){return t+'<i class="delete icon"></i>'},message:function(e){return e},addition:function(e){return e}},F=ee(),R=window,document,R=void 0!==R&&R.Math==Math?R:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),F.fn.embed=function(e){var t,n=F(this),r=(n.selector,(new Date).getTime()),i=[],o=e,a="string"==typeof o,s=[].slice.call(arguments,1);return n.each((function(){var u=F.isPlainObject(e)?F.extend(!0,{},F.fn.embed.settings,e):F.extend({},F.fn.embed.settings),c=u.selector,l=u.className,h=u.sources,f=u.error,d=u.metadata,p=u.namespace,m=u.templates,g="."+p,A="module-"+p,v=(F(R),F(this)),b=(v.find(c.placeholder),v.find(c.icon),v.find(c.embed)),y=this,w=v.data(A),x={initialize:function(){x.debug("Initializing embed"),x.determine.autoplay(),x.create(),x.bind.events(),x.instantiate()},instantiate:function(){x.verbose("Storing instance of module",x),w=x,v.data(A,x)},destroy:function(){x.verbose("Destroying previous instance of embed"),x.reset(),v.removeData(A).off(g)},refresh:function(){x.verbose("Refreshing selector cache"),v.find(c.placeholder),v.find(c.icon),b=v.find(c.embed)},bind:{events:function(){x.has.placeholder()&&(x.debug("Adding placeholder events"),v.on("click"+g,c.placeholder,x.createAndShow).on("click"+g,c.icon,x.createAndShow))}},create:function(){x.get.placeholder()?x.createPlaceholder():x.createAndShow()},createPlaceholder:function(e){var t=x.get.icon(),n=x.get.url();x.generate.embed(n),e=e||x.get.placeholder(),v.html(m.placeholder(e,t)),x.debug("Creating placeholder for embed",e,t)},createEmbed:function(e){x.refresh(),e=e||x.get.url(),b=F("<div/>").addClass(l.embed).html(x.generate.embed(e)).appendTo(v),u.onCreate.call(y,e),x.debug("Creating embed object",b)},changeEmbed:function(e){b.html(x.generate.embed(e))},createAndShow:function(){x.createEmbed(),x.show()},change:function(e,t,n){x.debug("Changing video to ",e,t,n),v.data(d.source,e).data(d.id,t),n?v.data(d.url,n):v.removeData(d.url),x.has.embed()?x.changeEmbed():x.create()},reset:function(){x.debug("Clearing embed and showing placeholder"),x.remove.data(),x.remove.active(),x.remove.embed(),x.showPlaceholder(),u.onReset.call(y)},show:function(){x.debug("Showing embed"),x.set.active(),u.onDisplay.call(y)},hide:function(){x.debug("Hiding embed"),x.showPlaceholder()},showPlaceholder:function(){x.debug("Showing placeholder image"),x.remove.active(),u.onPlaceholderDisplay.call(y)},get:{id:function(){return u.id||v.data(d.id)},placeholder:function(){return u.placeholder||v.data(d.placeholder)},icon:function(){return u.icon||(void 0!==v.data(d.icon)?v.data(d.icon):x.determine.icon())},source:function(e){return u.source||(void 0!==v.data(d.source)?v.data(d.source):x.determine.source())},type:function(){var e=x.get.source();return void 0!==h[e]&&h[e].type},url:function(){return u.url||(void 0!==v.data(d.url)?v.data(d.url):x.determine.url())}},determine:{autoplay:function(){x.should.autoplay()&&(u.autoplay=!0)},source:function(e){var t=!1;return(e=e||x.get.url())&&F.each(h,(function(n,r){if(-1!==e.search(r.domain))return t=n,!1})),t},icon:function(){var e=x.get.source();return void 0!==h[e]&&h[e].icon},url:function(){var e=u.id||v.data(d.id),t=u.source||v.data(d.source);return(t=void 0!==h[t]&&h[t].url.replace("{id}",e))&&v.data(d.url,t),t}},set:{active:function(){v.addClass(l.active)}},remove:{data:function(){v.removeData(d.id).removeData(d.icon).removeData(d.placeholder).removeData(d.source).removeData(d.url)},active:function(){v.removeClass(l.active)},embed:function(){b.empty()}},encode:{parameters:function(e){var t,n=[];for(t in e)n.push(encodeURIComponent(t)+"="+encodeURIComponent(e[t]));return n.join("&amp;")}},generate:{embed:function(e){x.debug("Generating embed html");var t,n=x.get.source();return(e=x.get.url(e))?(n=x.generate.parameters(n),t=m.iframe(e,n)):x.error(f.noURL,v),t},parameters:function(e,t){return e=h[e]&&void 0!==h[e].parameters?h[e].parameters(u):{},(t=t||u.parameters)&&(e=F.extend({},e,t)),e=u.onEmbed(e),x.encode.parameters(e)}},has:{embed:function(){return 0<b.length},placeholder:function(){return u.placeholder||v.data(d.placeholder)}},should:{autoplay:function(){return"auto"===u.autoplay?u.placeholder||void 0!==v.data(d.placeholder):u.autoplay}},is:{video:function(){return"video"==x.get.type()}},setting:function(e,t){if(x.debug("Changing setting",e,t),F.isPlainObject(e))F.extend(!0,u,e);else{if(void 0===t)return u[e];F.isPlainObject(u[e])?F.extend(!0,u[e],t):u[e]=t}},internal:function(e,t){if(F.isPlainObject(e))F.extend(!0,x,e);else{if(void 0===t)return x[e];x[e]=t}},debug:function(){!u.silent&&u.debug&&(u.performance?x.performance.log(arguments):(x.debug=Function.prototype.bind.call(console.info,console,u.name+":"),x.debug.apply(console,arguments)))},verbose:function(){!u.silent&&u.verbose&&u.debug&&(u.performance?x.performance.log(arguments):(x.verbose=Function.prototype.bind.call(console.info,console,u.name+":"),x.verbose.apply(console,arguments)))},error:function(){u.silent||(x.error=Function.prototype.bind.call(console.error,console,u.name+":"),x.error.apply(console,arguments))},performance:{log:function(e){var t,n;u.performance&&(n=(t=(new Date).getTime())-(r||t),r=t,i.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:y,"Execution Time":n})),clearTimeout(x.performance.timer),x.performance.timer=setTimeout(x.performance.display,500)},display:function(){u.name,r=!1,clearTimeout(x.performance.timer),F.each(i,(function(e,t){t["Execution Time"]})),1<n.length&&n.length,(void 0!==console.group||void 0!==console.table)&&0<i.length&&!console.table&&F.each(i,(function(e,t){t.Name,t["Execution Time"]})),i=[]}},invoke:function(e,n,r){var i,o,a,u=w;return n=n||s,r=y||r,"string"==typeof e&&void 0!==u&&(e=e.split(/[\. ]/),i=e.length-1,F.each(e,(function(t,n){var r=t!=i?n+e[t+1].charAt(0).toUpperCase()+e[t+1].slice(1):e;if(!F.isPlainObject(u[r])||t==i)return void 0!==u[r]?(o=u[r],!1):F.isPlainObject(u[n])&&t!=i?void(u=u[n]):(void 0!==u[n]?o=u[n]:x.error(f.method,e),!1);u=u[r]}))),F.isFunction(o)?a=o.apply(r,n):void 0!==o&&(a=o),F.isArray(t)?t.push(a):void 0!==t?t=[t,a]:void 0!==a&&(t=a),o}};a?(void 0===w&&x.initialize(),x.invoke(o)):(void 0!==w&&w.invoke("destroy"),x.initialize())})),void 0!==t?t:this},F.fn.embed.settings={name:"Embed",namespace:"embed",silent:!1,debug:!1,verbose:!1,performance:!0,icon:!1,source:!1,url:!1,id:!1,autoplay:"auto",color:"#444444",hd:!0,brandedUI:!1,parameters:!1,onDisplay:function(){},onPlaceholderDisplay:function(){},onReset:function(){},onCreate:function(e){},onEmbed:function(e){return e},metadata:{id:"id",icon:"icon",placeholder:"placeholder",source:"source",url:"url"},error:{noURL:"No URL specified",method:"The method you called is not defined"},className:{active:"active",embed:"embed"},selector:{embed:".embed",placeholder:".placeholder",icon:".icon"},sources:{youtube:{name:"youtube",type:"video",icon:"video play",domain:"youtube.com",url:"//www.youtube.com/embed/{id}",parameters:function(e){return{autohide:!e.brandedUI,autoplay:e.autoplay,color:e.color||void 0,hq:e.hd,jsapi:e.api,modestbranding:!e.brandedUI}}},vimeo:{name:"vimeo",type:"video",icon:"video play",domain:"vimeo.com",url:"//player.vimeo.com/video/{id}",parameters:function(e){return{api:e.api,autoplay:e.autoplay,byline:e.brandedUI,color:e.color||void 0,portrait:e.brandedUI,title:e.brandedUI}}}},templates:{iframe:function(e,t){return t&&(e+="?"+t),'<iframe src="'+e+'" width="100%" height="100%" frameborder="0" scrolling="no" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>'},placeholder:function(e,t){var n="";return t&&(n+='<i class="'+t+' icon"></i>'),e&&(n+='<img class="placeholder" src="'+e+'">'),n}},api:!1,onPause:function(){},onPlay:function(){},onStop:function(){}},M=ee(),j=window,N=document,j=void 0!==j&&j.Math==Math?j:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),M.fn.modal=function(e){var t,n=M(this),r=M(j),i=M(N),o=M("body"),a=(n.selector,(new Date).getTime()),s=[],u=e,c="string"==typeof u,l=[].slice.call(arguments,1),h=j.requestAnimationFrame||j.mozRequestAnimationFrame||j.webkitRequestAnimationFrame||j.msRequestAnimationFrame||function(e){setTimeout(e,0)};return n.each((function(){var n,f,d,p,m,g,A,v,b=M.isPlainObject(e)?M.extend(!0,{},M.fn.modal.settings,e):M.extend({},M.fn.modal.settings),y=b.selector,w=b.className,x=b.namespace,C=b.error,k="."+x,E="module-"+x,S=M(this),_=M(b.context),O=S.find(y.close),T=this,D=S.data(E),B=!1,I={initialize:function(){I.verbose("Initializing dimmer",_),I.create.id(),I.create.dimmer(),I.refreshModals(),I.bind.events(),b.observeChanges&&I.observeChanges(),I.instantiate()},instantiate:function(){I.verbose("Storing instance of modal"),D=I,S.data(E,D)},create:{dimmer:function(){var e={debug:b.debug,variation:!b.centered&&"top aligned",dimmerName:"modals"};e=M.extend(!0,e,b.dimmerSettings);void 0!==M.fn.dimmer?(I.debug("Creating dimmer"),p=_.dimmer(e),b.detachable?(I.verbose("Modal is detachable, moving content into dimmer"),p.dimmer("add content",S)):I.set.undetached(),m=p.dimmer("get dimmer")):I.error(C.dimmer)},id:function(){A=(Math.random().toString(16)+"000000000").substr(2,8),g="."+A,I.verbose("Creating unique id for element",A)}},destroy:function(){v&&v.disconnect(),I.verbose("Destroying previous modal"),S.removeData(E).off(k),r.off(g),m.off(g),O.off(k),_.dimmer("destroy")},observeChanges:function(){"MutationObserver"in j&&((v=new MutationObserver((function(e){I.debug("DOM tree modified, refreshing"),I.refresh()}))).observe(T,{childList:!0,subtree:!0}),I.debug("Setting up mutation observer",v))},refresh:function(){I.remove.scrolling(),I.cacheSizes(),I.can.useFlex()||I.set.modalOffset(),I.set.screenHeight(),I.set.type()},refreshModals:function(){f=S.siblings(y.modal),n=f.add(S)},attachEvents:function(e,t){var n=M(e);t=M.isFunction(I[t])?I[t]:I.toggle,0<n.length?(I.debug("Attaching modal events to element",e,t),n.off(k).on("click"+k,t)):I.error(C.notFound,e)},bind:{events:function(){I.verbose("Attaching events"),S.on("click"+k,y.close,I.event.close).on("click"+k,y.approve,I.event.approve).on("click"+k,y.deny,I.event.deny),r.on("resize"+g,I.event.resize)},scrollLock:function(){p.get(0).addEventListener("touchmove",I.event.preventScroll,{passive:!1})}},unbind:{scrollLock:function(){p.get(0).removeEventListener("touchmove",I.event.preventScroll,{passive:!1})}},get:{id:function(){return(Math.random().toString(16)+"000000000").substr(2,8)}},event:{approve:function(){B||!1===b.onApprove.call(T,M(this))?I.verbose("Approve callback returned false cancelling hide"):(B=!0,I.hide((function(){B=!1})))},preventScroll:function(e){e.preventDefault()},deny:function(){B||!1===b.onDeny.call(T,M(this))?I.verbose("Deny callback returned false cancelling hide"):(B=!0,I.hide((function(){B=!1})))},close:function(){I.hide()},click:function(e){var t;b.closable?(t=0<M(e.target).closest(y.modal).length,e=M.contains(N.documentElement,e.target),!t&&e&&I.is.active()&&(I.debug("Dimmer clicked, hiding all modals"),I.remove.clickaway(),b.allowMultiple?I.hide():I.hideAll())):I.verbose("Dimmer clicked but closable setting is disabled")},debounce:function(e,t){clearTimeout(I.timer),I.timer=setTimeout(e,t)},keyboard:function(e){27==e.which&&(b.closable?(I.debug("Escape key pressed hiding modal"),I.hide()):I.debug("Escape key pressed, but closable is set to false"),e.preventDefault())},resize:function(){p.dimmer("is active")&&(I.is.animating()||I.is.active())&&h(I.refresh)}},toggle:function(){I.is.active()||I.is.animating()?I.hide():I.show()},show:function(e){e=M.isFunction(e)?e:function(){},I.refreshModals(),I.set.dimmerSettings(),I.set.dimmerStyles(),I.showModal(e)},hide:function(e){e=M.isFunction(e)?e:function(){},I.refreshModals(),I.hideModal(e)},showModal:function(e){e=M.isFunction(e)?e:function(){},I.is.animating()||!I.is.active()?(I.showDimmer(),I.cacheSizes(),I.can.useFlex()?I.remove.legacy():(I.set.legacy(),I.set.modalOffset(),I.debug("Using non-flex legacy modal positioning.")),I.set.screenHeight(),I.set.type(),I.set.clickaway(),!b.allowMultiple&&I.others.active()?I.hideOthers(I.showModal):(b.allowMultiple&&b.detachable&&S.detach().appendTo(m),b.onShow.call(T),b.transition&&void 0!==M.fn.transition&&S.transition("is supported")?(I.debug("Showing modal with css animations"),S.transition({debug:b.debug,animation:b.transition+" in",queue:b.queue,duration:b.duration,useFailSafe:!0,onComplete:function(){b.onVisible.apply(T),b.keyboardShortcuts&&I.add.keyboardShortcuts(),I.save.focus(),I.set.active(),b.autofocus&&I.set.autofocus(),e()}})):I.error(C.noTransition))):I.debug("Modal is already visible")},hideModal:function(e,t){e=M.isFunction(e)?e:function(){},I.debug("Hiding modal"),!1!==b.onHide.call(T,M(this))?(I.is.animating()||I.is.active())&&(b.transition&&void 0!==M.fn.transition&&S.transition("is supported")?(I.remove.active(),S.transition({debug:b.debug,animation:b.transition+" out",queue:b.queue,duration:b.duration,useFailSafe:!0,onStart:function(){I.others.active()||t||I.hideDimmer(),b.keyboardShortcuts&&I.remove.keyboardShortcuts()},onComplete:function(){b.onHidden.call(T),I.remove.dimmerStyles(),I.restore.focus(),e()}})):I.error(C.noTransition)):I.verbose("Hide callback returned false cancelling hide")},showDimmer:function(){p.dimmer("is animating")||!p.dimmer("is active")?(I.debug("Showing dimmer"),p.dimmer("show")):I.debug("Dimmer already visible")},hideDimmer:function(){p.dimmer("is animating")||p.dimmer("is active")?(I.unbind.scrollLock(),p.dimmer("hide",(function(){I.remove.clickaway(),I.remove.screenHeight()}))):I.debug("Dimmer is not visible cannot hide")},hideAll:function(e){var t=n.filter("."+w.active+", ."+w.animating);e=M.isFunction(e)?e:function(){},0<t.length&&(I.debug("Hiding all visible modals"),I.hideDimmer(),t.modal("hide modal",e))},hideOthers:function(e){var t=f.filter("."+w.active+", ."+w.animating);e=M.isFunction(e)?e:function(){},0<t.length&&(I.debug("Hiding other modals",f),t.modal("hide modal",e,!0))},others:{active:function(){return 0<f.filter("."+w.active).length},animating:function(){return 0<f.filter("."+w.animating).length}},add:{keyboardShortcuts:function(){I.verbose("Adding keyboard shortcuts"),i.on("keyup"+k,I.event.keyboard)}},save:{focus:function(){0<M(N.activeElement).closest(S).length||(d=M(N.activeElement).blur())}},restore:{focus:function(){d&&0<d.length&&d.focus()}},remove:{active:function(){S.removeClass(w.active)},legacy:function(){S.removeClass(w.legacy)},clickaway:function(){m.off("click"+g)},dimmerStyles:function(){m.removeClass(w.inverted),p.removeClass(w.blurring)},bodyStyle:function(){""===o.attr("style")&&(I.verbose("Removing style attribute"),o.removeAttr("style"))},screenHeight:function(){I.debug("Removing page height"),o.css("height","")},keyboardShortcuts:function(){I.verbose("Removing keyboard shortcuts"),i.off("keyup"+k)},scrolling:function(){p.removeClass(w.scrolling),S.removeClass(w.scrolling)}},cacheSizes:function(){S.addClass(w.loading);var e=S.prop("scrollHeight"),t=S.outerWidth(),n=S.outerHeight();void 0!==I.cache&&0===n||(I.cache={pageHeight:M(N).outerHeight(),width:t,height:n+b.offset,scrollHeight:e+b.offset,contextHeight:("body"==b.context?M(j):p).height()},I.cache.topOffset=-I.cache.height/2),S.removeClass(w.loading),I.debug("Caching modal and container sizes",I.cache)},can:{useFlex:function(){return"auto"==b.useFlex?b.detachable&&!I.is.ie():b.useFlex},fit:function(){var e=I.cache.contextHeight,t=I.cache.contextHeight/2,n=I.cache.topOffset,r=I.cache.scrollHeight,i=I.cache.height,o=b.padding;return i<r?t+n+r+o<e:i+2*o<e}},is:{active:function(){return S.hasClass(w.active)},ie:function(){return!j.ActiveXObject&&"ActiveXObject"in j||"ActiveXObject"in j},animating:function(){return S.transition("is supported")?S.transition("is animating"):S.is(":visible")},scrolling:function(){return p.hasClass(w.scrolling)},modernBrowser:function(){return!(j.ActiveXObject||"ActiveXObject"in j)}},set:{autofocus:function(){var e,t=S.find("[tabindex], :input").filter(":visible");0<(e=(0<(e=t.filter("[autofocus]")).length?e:t).first()).length&&e.focus()},clickaway:function(){m.on("click"+g,I.event.click)},dimmerSettings:function(){var e;void 0!==M.fn.dimmer?(e={debug:b.debug,dimmerName:"modals",closable:"auto",useFlex:I.can.useFlex(),variation:!b.centered&&"top aligned",duration:{show:b.duration,hide:b.duration}},e=M.extend(!0,e,b.dimmerSettings),b.inverted&&(e.variation=void 0!==e.variation?e.variation+" inverted":"inverted"),_.dimmer("setting",e)):I.error(C.dimmer)},dimmerStyles:function(){b.inverted?m.addClass(w.inverted):m.removeClass(w.inverted),b.blurring?p.addClass(w.blurring):p.removeClass(w.blurring)},modalOffset:function(){var e=I.cache.width,t=I.cache.height;S.css({marginTop:b.centered&&I.can.fit()?-t/2:0,marginLeft:-e/2}),I.verbose("Setting modal offset for legacy mode")},screenHeight:function(){I.can.fit()?o.css("height",""):(I.debug("Modal is taller than page content, resizing page height"),o.css("height",I.cache.height+2*b.padding))},active:function(){S.addClass(w.active)},scrolling:function(){p.addClass(w.scrolling),S.addClass(w.scrolling),I.unbind.scrollLock()},legacy:function(){S.addClass(w.legacy)},type:function(){I.can.fit()?(I.verbose("Modal fits on screen"),I.others.active()||I.others.animating()||(I.remove.scrolling(),I.bind.scrollLock())):(I.verbose("Modal cannot fit on screen setting to scrolling"),I.set.scrolling())},undetached:function(){p.addClass(w.undetached)}},setting:function(e,t){if(I.debug("Changing setting",e,t),M.isPlainObject(e))M.extend(!0,b,e);else{if(void 0===t)return b[e];M.isPlainObject(b[e])?M.extend(!0,b[e],t):b[e]=t}},internal:function(e,t){if(M.isPlainObject(e))M.extend(!0,I,e);else{if(void 0===t)return I[e];I[e]=t}},debug:function(){!b.silent&&b.debug&&(b.performance?I.performance.log(arguments):(I.debug=Function.prototype.bind.call(console.info,console,b.name+":"),I.debug.apply(console,arguments)))},verbose:function(){!b.silent&&b.verbose&&b.debug&&(b.performance?I.performance.log(arguments):(I.verbose=Function.prototype.bind.call(console.info,console,b.name+":"),I.verbose.apply(console,arguments)))},error:function(){b.silent||(I.error=Function.prototype.bind.call(console.error,console,b.name+":"),I.error.apply(console,arguments))},performance:{log:function(e){var t,n;b.performance&&(n=(t=(new Date).getTime())-(a||t),a=t,s.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:T,"Execution Time":n})),clearTimeout(I.performance.timer),I.performance.timer=setTimeout(I.performance.display,500)},display:function(){b.name,a=!1,clearTimeout(I.performance.timer),M.each(s,(function(e,t){t["Execution Time"]})),(void 0!==console.group||void 0!==console.table)&&0<s.length&&!console.table&&M.each(s,(function(e,t){t.Name,t["Execution Time"]})),s=[]}},invoke:function(e,n,r){var i,o,a,s=D;return n=n||l,r=T||r,"string"==typeof e&&void 0!==s&&(e=e.split(/[\. ]/),i=e.length-1,M.each(e,(function(t,n){var r=t!=i?n+e[t+1].charAt(0).toUpperCase()+e[t+1].slice(1):e;if(!M.isPlainObject(s[r])||t==i)return void 0!==s[r]?(o=s[r],!1):M.isPlainObject(s[n])&&t!=i?void(s=s[n]):void 0!==s[n]&&(o=s[n],!1);s=s[r]}))),M.isFunction(o)?a=o.apply(r,n):void 0!==o&&(a=o),M.isArray(t)?t.push(a):void 0!==t?t=[t,a]:void 0!==a&&(t=a),o}};c?(void 0===D&&I.initialize(),I.invoke(u)):(void 0!==D&&D.invoke("destroy"),I.initialize())})),void 0!==t?t:this},M.fn.modal.settings={name:"Modal",namespace:"modal",useFlex:"auto",offset:0,silent:!1,debug:!1,verbose:!1,performance:!0,observeChanges:!1,allowMultiple:!1,detachable:!0,closable:!0,autofocus:!0,inverted:!1,blurring:!1,centered:!0,dimmerSettings:{closable:!1,useCSS:!0},keyboardShortcuts:!0,context:"body",queue:!1,duration:500,transition:"scale",padding:50,onShow:function(){},onVisible:function(){},onHide:function(){return!0},onHidden:function(){},onApprove:function(){return!0},onDeny:function(){return!0},selector:{close:"> .close",approve:".actions .positive, .actions .approve, .actions .ok",deny:".actions .negative, .actions .deny, .actions .cancel",modal:".ui.modal"},error:{dimmer:"UI Dimmer, a required component is not included in this page",method:"The method you called is not defined.",notFound:"The element you specified could not be found"},className:{active:"active",animating:"animating",blurring:"blurring",inverted:"inverted",legacy:"legacy",loading:"loading",scrolling:"scrolling",undetached:"undetached"}},B=ee(),I=window,document,I=void 0!==I&&I.Math==Math?I:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),B.fn.nag=function(e){var t,n=B(this),r=(n.selector,(new Date).getTime()),i=[],o=e,a="string"==typeof o,s=[].slice.call(arguments,1);return n.each((function(){var n,u=B.isPlainObject(e)?B.extend(!0,{},B.fn.nag.settings,e):B.extend({},B.fn.nag.settings),c=(u.className,u.selector),l=u.error,h=u.namespace,f="."+h,d=h+"-module",p=B(this),m=(p.find(c.close),u.context?B(u.context):B("body")),g=this,A=p.data(d);I.requestAnimationFrame||I.mozRequestAnimationFrame||I.webkitRequestAnimationFrame||I.msRequestAnimationFrame,n={initialize:function(){n.verbose("Initializing element"),p.on("click"+f,c.close,n.dismiss).data(d,n),u.detachable&&p.parent()[0]!==m[0]&&p.detach().prependTo(m),0<u.displayTime&&setTimeout(n.hide,u.displayTime),n.show()},destroy:function(){n.verbose("Destroying instance"),p.removeData(d).off(f)},show:function(){n.should.show()&&!p.is(":visible")&&(n.debug("Showing nag",u.animation.show),"fade"==u.animation.show?p.fadeIn(u.duration,u.easing):p.slideDown(u.duration,u.easing))},hide:function(){n.debug("Showing nag",u.animation.hide),"fade"==u.animation.show?p.fadeIn(u.duration,u.easing):p.slideUp(u.duration,u.easing)},onHide:function(){n.debug("Removing nag",u.animation.hide),p.remove(),u.onHide&&u.onHide()},dismiss:function(e){u.storageMethod&&n.storage.set(u.key,u.value),n.hide(),e.stopImmediatePropagation(),e.preventDefault()},should:{show:function(){return u.persist?(n.debug("Persistent nag is set, can show nag"),!0):n.storage.get(u.key)!=u.value.toString()?(n.debug("Stored value is not set, can show nag",n.storage.get(u.key)),!0):(n.debug("Stored value is set, cannot show nag",n.storage.get(u.key)),!1)}},get:{storageOptions:function(){var e={};return u.expires&&(e.expires=u.expires),u.domain&&(e.domain=u.domain),u.path&&(e.path=u.path),e}},clear:function(){n.storage.remove(u.key)},storage:{set:function(e,t){var r=n.get.storageOptions();"localstorage"==u.storageMethod&&void 0!==I.localStorage?(I.localStorage.setItem(e,t),n.debug("Value stored using local storage",e,t)):"sessionstorage"==u.storageMethod&&void 0!==I.sessionStorage?(I.sessionStorage.setItem(e,t),n.debug("Value stored using session storage",e,t)):void 0===B.cookie?n.error(l.noCookieStorage):(B.cookie(e,t,r),n.debug("Value stored using cookie",e,t,r))},get:function(e,t){var r;return"localstorage"==u.storageMethod&&void 0!==I.localStorage?r=I.localStorage.getItem(e):"sessionstorage"==u.storageMethod&&void 0!==I.sessionStorage?r=I.sessionStorage.getItem(e):void 0!==B.cookie?r=B.cookie(e):n.error(l.noCookieStorage),"undefined"!=r&&"null"!=r&&null!=r?r:void 0},remove:function(e){var t=n.get.storageOptions();"localstorage"==u.storageMethod&&void 0!==I.localStorage?I.localStorage.removeItem(e):"sessionstorage"==u.storageMethod&&void 0!==I.sessionStorage?I.sessionStorage.removeItem(e):void 0!==B.cookie?B.removeCookie(e,t):n.error(l.noStorage)}},setting:function(e,t){if(n.debug("Changing setting",e,t),B.isPlainObject(e))B.extend(!0,u,e);else{if(void 0===t)return u[e];B.isPlainObject(u[e])?B.extend(!0,u[e],t):u[e]=t}},internal:function(e,t){if(B.isPlainObject(e))B.extend(!0,n,e);else{if(void 0===t)return n[e];n[e]=t}},debug:function(){!u.silent&&u.debug&&(u.performance?n.performance.log(arguments):(n.debug=Function.prototype.bind.call(console.info,console,u.name+":"),n.debug.apply(console,arguments)))},verbose:function(){!u.silent&&u.verbose&&u.debug&&(u.performance?n.performance.log(arguments):(n.verbose=Function.prototype.bind.call(console.info,console,u.name+":"),n.verbose.apply(console,arguments)))},error:function(){u.silent||(n.error=Function.prototype.bind.call(console.error,console,u.name+":"),n.error.apply(console,arguments))},performance:{log:function(e){var t,o;u.performance&&(o=(t=(new Date).getTime())-(r||t),r=t,i.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:g,"Execution Time":o})),clearTimeout(n.performance.timer),n.performance.timer=setTimeout(n.performance.display,500)},display:function(){u.name,r=!1,clearTimeout(n.performance.timer),B.each(i,(function(e,t){t["Execution Time"]})),(void 0!==console.group||void 0!==console.table)&&0<i.length&&!console.table&&B.each(i,(function(e,t){t.Name,t["Execution Time"]})),i=[]}},invoke:function(e,r,i){var o,a,u,c=A;return r=r||s,i=g||i,"string"==typeof e&&void 0!==c&&(e=e.split(/[\. ]/),o=e.length-1,B.each(e,(function(t,r){var i=t!=o?r+e[t+1].charAt(0).toUpperCase()+e[t+1].slice(1):e;if(!B.isPlainObject(c[i])||t==o)return void 0!==c[i]?(a=c[i],!1):B.isPlainObject(c[r])&&t!=o?void(c=c[r]):(void 0!==c[r]?a=c[r]:n.error(l.method,e),!1);c=c[i]}))),B.isFunction(a)?u=a.apply(i,r):void 0!==a&&(u=a),B.isArray(t)?t.push(u):void 0!==t?t=[t,u]:void 0!==u&&(t=u),a}},a?(void 0===A&&n.initialize(),n.invoke(o)):(void 0!==A&&A.invoke("destroy"),n.initialize())})),void 0!==t?t:this},B.fn.nag.settings={name:"Nag",silent:!1,debug:!1,verbose:!1,performance:!0,namespace:"Nag",persist:!1,displayTime:0,animation:{show:"slide",hide:"slide"},context:!1,detachable:!1,expires:30,domain:!1,path:"/",storageMethod:"cookie",key:"nag",value:"dismiss",error:{noCookieStorage:"$.cookie is not included. A storage solution is required.",noStorage:"Neither $.cookie or store is defined. A storage solution is required for storing state",method:"The method you called is not defined."},className:{bottom:"bottom",fixed:"fixed"},selector:{close:".close.icon"},speed:500,easing:"easeOutQuad",onHide:function(){}},B.extend(B.easing,{easeOutQuad:function(e,t,n,r,i){return-r*(t/=i)*(t-2)+n}}),O=ee(),T=window,D=document,T=void 0!==T&&T.Math==Math?T:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),O.fn.popup=function(e){var t,n=O(this),r=O(D),i=O(T),o=O("body"),a=(n.selector,(new Date).getTime()),s=[],u=e,c="string"==typeof u,l=[].slice.call(arguments,1);return n.each((function(){var n,h,f,d,p,m=O.isPlainObject(e)?O.extend(!0,{},O.fn.popup.settings,e):O.extend({},O.fn.popup.settings),g=m.selector,A=m.className,v=m.error,b=m.metadata,y=m.namespace,w="."+m.namespace,x="module-"+y,C=O(this),k=O(m.context),E=O(m.scrollContext),S=O(m.boundary),_=m.target?O(m.target):C,B=0,I=!1,M=!1,j=this,N=C.data(x),F={initialize:function(){F.debug("Initializing",C),F.createID(),F.bind.events(),!F.exists()&&m.preserve&&F.create(),m.observeChanges&&F.observeChanges(),F.instantiate()},instantiate:function(){F.verbose("Storing instance",F),N=F,C.data(x,N)},observeChanges:function(){"MutationObserver"in T&&((f=new MutationObserver(F.event.documentChanged)).observe(D,{childList:!0,subtree:!0}),F.debug("Setting up mutation observer",f))},refresh:function(){m.popup?n=O(m.popup).eq(0):m.inline&&(n=_.nextAll(g.popup).eq(0),m.popup=n),m.popup?(n.addClass(A.loading),h=F.get.offsetParent(),n.removeClass(A.loading),m.movePopup&&F.has.popup()&&F.get.offsetParent(n)[0]!==h[0]&&(F.debug("Moving popup to the same offset parent as target"),n.detach().appendTo(h))):h=m.inline?F.get.offsetParent(_):F.has.popup()?F.get.offsetParent(n):o,h.is("html")&&h[0]!==o[0]&&(F.debug("Setting page as offset parent"),h=o),F.get.variation()&&F.set.variation()},reposition:function(){F.refresh(),F.set.position()},destroy:function(){F.debug("Destroying previous module"),f&&f.disconnect(),n&&!m.preserve&&F.removePopup(),clearTimeout(F.hideTimer),clearTimeout(F.showTimer),F.unbind.close(),F.unbind.events(),C.removeData(x)},event:{start:function(e){var t=O.isPlainObject(m.delay)?m.delay.show:m.delay;clearTimeout(F.hideTimer),M||(F.showTimer=setTimeout(F.show,t))},end:function(){var e=O.isPlainObject(m.delay)?m.delay.hide:m.delay;clearTimeout(F.showTimer),F.hideTimer=setTimeout(F.hide,e)},touchstart:function(e){M=!0,F.show()},resize:function(){F.is.visible()&&F.set.position()},documentChanged:function(e){[].forEach.call(e,(function(e){e.removedNodes&&[].forEach.call(e.removedNodes,(function(e){(e==j||0<O(e).find(j).length)&&(F.debug("Element removed from DOM, tearing down events"),F.destroy())}))}))},hideGracefully:function(e){var t=O(e.target),n=O.contains(D.documentElement,e.target);t=0<t.closest(g.popup).length;e&&!t&&n?(F.debug("Click occurred outside popup hiding popup"),F.hide()):F.debug("Click was inside popup, keeping popup open")}},create:function(){var e=F.get.html(),t=F.get.title(),r=F.get.content();e||r||t?(F.debug("Creating pop-up html"),e=e||m.templates.popup({title:t,content:r}),n=O("<div/>").addClass(A.popup).data(b.activator,C).html(e),m.inline?(F.verbose("Inserting popup element inline",n),n.insertAfter(C)):(F.verbose("Appending popup element to body",n),n.appendTo(k)),F.refresh(),F.set.variation(),m.hoverable&&F.bind.popup(),m.onCreate.call(n,j)):0!==_.next(g.popup).length?(F.verbose("Pre-existing popup found"),m.inline=!0,m.popup=_.next(g.popup).data(b.activator,C),F.refresh(),m.hoverable&&F.bind.popup()):m.popup?(O(m.popup).data(b.activator,C),F.verbose("Used popup specified in settings"),F.refresh(),m.hoverable&&F.bind.popup()):F.debug("No content specified skipping display",j)},createID:function(){p=(Math.random().toString(16)+"000000000").substr(2,8),d="."+p,F.verbose("Creating unique id for element",p)},toggle:function(){F.debug("Toggling pop-up"),F.is.hidden()?(F.debug("Popup is hidden, showing pop-up"),F.unbind.close(),F.show()):(F.debug("Popup is visible, hiding pop-up"),F.hide())},show:function(e){e=e||function(){},F.debug("Showing pop-up",m.transition),!F.is.hidden()||F.is.active()&&F.is.dropdown()||(F.exists()||F.create(),!1===m.onShow.call(n,j)?F.debug("onShow callback returned false, cancelling popup animation"):(m.preserve||m.popup||F.refresh(),n&&F.set.position()&&(F.save.conditions(),m.exclusive&&F.hideAll(),F.animate.show(e))))},hide:function(e){e=e||function(){},(F.is.visible()||F.is.animating())&&(!1===m.onHide.call(n,j)?F.debug("onHide callback returned false, cancelling popup animation"):(F.remove.visible(),F.unbind.close(),F.restore.conditions(),F.animate.hide(e)))},hideAll:function(){O(g.popup).filter("."+A.popupVisible).each((function(){O(this).data(b.activator).popup("hide")}))},exists:function(){return!!n&&(m.inline||m.popup?F.has.popup():1<=n.closest(k).length)},removePopup:function(){F.has.popup()&&!m.popup&&(F.debug("Removing popup",n),n.remove(),n=void 0,m.onRemove.call(n,j))},save:{conditions:function(){F.cache={title:C.attr("title")},F.cache.title&&C.removeAttr("title"),F.verbose("Saving original attributes",F.cache.title)}},restore:{conditions:function(){return F.cache&&F.cache.title&&(C.attr("title",F.cache.title),F.verbose("Restoring original attributes",F.cache.title)),!0}},supports:{svg:function(){return"undefined"==typeof SVGGraphicsElement}},animate:{show:function(e){e=O.isFunction(e)?e:function(){},m.transition&&void 0!==O.fn.transition&&C.transition("is supported")?(F.set.visible(),n.transition({animation:m.transition+" in",queue:!1,debug:m.debug,verbose:m.verbose,duration:m.duration,onComplete:function(){F.bind.close(),e.call(n,j),m.onVisible.call(n,j)}})):F.error(v.noTransition)},hide:function(e){e=O.isFunction(e)?e:function(){},F.debug("Hiding pop-up"),!1!==m.onHide.call(n,j)?m.transition&&void 0!==O.fn.transition&&C.transition("is supported")?n.transition({animation:m.transition+" out",queue:!1,duration:m.duration,debug:m.debug,verbose:m.verbose,onComplete:function(){F.reset(),e.call(n,j),m.onHidden.call(n,j)}}):F.error(v.noTransition):F.debug("onHide callback returned false, cancelling popup animation")}},change:{content:function(e){n.html(e)}},get:{html:function(){return C.removeData(b.html),C.data(b.html)||m.html},title:function(){return C.removeData(b.title),C.data(b.title)||m.title},content:function(){return C.removeData(b.content),C.data(b.content)||m.content||C.attr("title")},variation:function(){return C.removeData(b.variation),C.data(b.variation)||m.variation},popup:function(){return n},popupOffset:function(){return n.offset()},calculations:function(){var e=F.get.offsetParent(n),t=_[0],r=S[0]==T,o=m.inline||m.popup&&m.movePopup?_.position():_.offset(),a=r?{top:0,left:0}:S.offset(),s={};r=r?{top:i.scrollTop(),left:i.scrollLeft()}:{top:0,left:0},s={target:{element:_[0],width:_.outerWidth(),height:_.outerHeight(),top:o.top,left:o.left,margin:{}},popup:{width:n.outerWidth(),height:n.outerHeight()},parent:{width:h.outerWidth(),height:h.outerHeight()},screen:{top:a.top,left:a.left,scroll:{top:r.top,left:r.left},width:S.width(),height:S.height()}};return e.get(0)!==h.get(0)&&(o=e.offset(),s.target.top-=o.top,s.target.left-=o.left,s.parent.width=e.outerWidth(),s.parent.height=e.outerHeight()),m.setFluidWidth&&F.is.fluid()&&(s.container={width:n.parent().outerWidth()},s.popup.width=s.container.width),s.target.margin.top=m.inline?parseInt(T.getComputedStyle(t).getPropertyValue("margin-top"),10):0,s.target.margin.left=m.inline?F.is.rtl()?parseInt(T.getComputedStyle(t).getPropertyValue("margin-right"),10):parseInt(T.getComputedStyle(t).getPropertyValue("margin-left"),10):0,a=s.screen,s.boundary={top:a.top+a.scroll.top,bottom:a.top+a.scroll.top+a.height,left:a.left+a.scroll.left,right:a.left+a.scroll.left+a.width},s},id:function(){return p},startEvent:function(){return"hover"==m.on?"mouseenter":"focus"==m.on&&"focus"},scrollEvent:function(){return"scroll"},endEvent:function(){return"hover"==m.on?"mouseleave":"focus"==m.on&&"blur"},distanceFromBoundary:function(e,t){var n={},r=(t=t||F.get.calculations()).popup;t=t.boundary;return e&&(n={top:e.top-t.top,left:e.left-t.left,right:t.right-(e.left+r.width),bottom:t.bottom-(e.top+r.height)},F.verbose("Distance from boundaries determined",e,n)),n},offsetParent:function(e){var t=(void 0!==e?e:_)[0].parentNode,n=O(t);if(t)for(var r="none"===n.css("transform"),i="static"===n.css("position"),o=n.is("body");t&&!o&&i&&r;)t=t.parentNode,r="none"===(n=O(t)).css("transform"),i="static"===n.css("position"),o=n.is("body");return n&&0<n.length?n:O()},positions:function(){return{"top left":!1,"top center":!1,"top right":!1,"bottom left":!1,"bottom center":!1,"bottom right":!1,"left center":!1,"right center":!1}},nextPosition:function(e){var t=(n=e.split(" "))[0],n=n[1],r="top"==t||"bottom"==t,i=!1,o=!1,a=!1;return I||(F.verbose("All available positions available"),I=F.get.positions()),F.debug("Recording last position tried",e),I[e]=!0,"opposite"===m.prefer&&(a=(a=[{top:"bottom",bottom:"top",left:"right",right:"left"}[t],n]).join(" "),i=!0===I[a],F.debug("Trying opposite strategy",a)),"adjacent"===m.prefer&&r&&(a=(a=[t,{left:"center",center:"right",right:"left"}[n]]).join(" "),o=!0===I[a],F.debug("Trying adjacent strategy",a)),(o||i)&&(F.debug("Using backup position",a),a={"top left":"top center","top center":"top right","top right":"right center","right center":"bottom right","bottom right":"bottom center","bottom center":"bottom left","bottom left":"left center","left center":"top left"}[e]),a}},set:{position:function(e,t){if(0!==_.length&&0!==n.length){var r,i,o,a,s,u,c;if(t=t||F.get.calculations(),e=e||C.data(b.position)||m.position,r=C.data(b.offset)||m.offset,i=m.distanceAway,o=t.target,a=t.popup,s=t.parent,F.should.centerArrow(t)&&(F.verbose("Adjusting offset to center arrow on small target element"),"top left"!=e&&"bottom left"!=e||(r=(r+=o.width/2)-m.arrowPixelsFromEdge),"top right"!=e&&"bottom right"!=e||(r=(r-=o.width/2)+m.arrowPixelsFromEdge)),0===o.width&&0===o.height&&!F.is.svg(o.element))return F.debug("Popup target is hidden, no action taken"),!1;switch(m.inline&&(F.debug("Adding margin to calculation",o.margin),"left center"==e||"right center"==e?(r+=o.margin.top,i+=-o.margin.left):"top left"==e||"top center"==e||"top right"==e?(r+=o.margin.left,i-=o.margin.top):(r+=o.margin.left,i+=o.margin.top)),F.debug("Determining popup position from calculations",e,t),F.is.rtl()&&(e=e.replace(/left|right/g,(function(e){return"left"==e?"right":"left"})),F.debug("RTL: Popup position updated",e)),e=B==m.maxSearchDepth&&"string"==typeof m.lastResort?m.lastResort:e){case"top left":u={top:"auto",bottom:s.height-o.top+i,left:o.left+r,right:"auto"};break;case"top center":u={bottom:s.height-o.top+i,left:o.left+o.width/2-a.width/2+r,top:"auto",right:"auto"};break;case"top right":u={bottom:s.height-o.top+i,right:s.width-o.left-o.width-r,top:"auto",left:"auto"};break;case"left center":u={top:o.top+o.height/2-a.height/2+r,right:s.width-o.left+i,left:"auto",bottom:"auto"};break;case"right center":u={top:o.top+o.height/2-a.height/2+r,left:o.left+o.width+i,bottom:"auto",right:"auto"};break;case"bottom left":u={top:o.top+o.height+i,left:o.left+r,bottom:"auto",right:"auto"};break;case"bottom center":u={top:o.top+o.height+i,left:o.left+o.width/2-a.width/2+r,bottom:"auto",right:"auto"};break;case"bottom right":u={top:o.top+o.height+i,right:s.width-o.left-o.width-r,left:"auto",bottom:"auto"}}if(void 0===u&&F.error(v.invalidPosition,e),F.debug("Calculated popup positioning values",u),n.css(u).removeClass(A.position).addClass(e).addClass(A.loading),c=F.get.popupOffset(),c=F.get.distanceFromBoundary(c,t),F.is.offstage(c,e)){if(F.debug("Position is outside viewport",e),B<m.maxSearchDepth)return B++,e=F.get.nextPosition(e),F.debug("Trying new position",e),!!n&&F.set.position(e,t);if(!m.lastResort)return F.debug("Popup could not find a position to display",n),F.error(v.cannotPlace,j),F.remove.attempts(),F.remove.loading(),F.reset(),m.onUnplaceable.call(n,j),!1;F.debug("No position found, showing with last position")}return F.debug("Position is on stage",e),F.remove.attempts(),F.remove.loading(),m.setFluidWidth&&F.is.fluid()&&F.set.fluidWidth(t),!0}F.error(v.notFound)},fluidWidth:function(e){e=e||F.get.calculations(),F.debug("Automatically setting element width to parent width",e.parent.width),n.css("width",e.container.width)},variation:function(e){(e=e||F.get.variation())&&F.has.popup()&&(F.verbose("Adding variation to popup",e),n.addClass(e))},visible:function(){C.addClass(A.visible)}},remove:{loading:function(){n.removeClass(A.loading)},variation:function(e){(e=e||F.get.variation())&&(F.verbose("Removing variation",e),n.removeClass(e))},visible:function(){C.removeClass(A.visible)},attempts:function(){F.verbose("Resetting all searched positions"),B=0,I=!1}},bind:{events:function(){F.debug("Binding popup events to module"),"click"==m.on&&C.on("click"+w,F.toggle),"hover"==m.on&&C.on("touchstart"+w,F.event.touchstart),F.get.startEvent()&&C.on(F.get.startEvent()+w,F.event.start).on(F.get.endEvent()+w,F.event.end),m.target&&F.debug("Target set to element",_),i.on("resize"+d,F.event.resize)},popup:function(){F.verbose("Allowing hover events on popup to prevent closing"),n&&F.has.popup()&&n.on("mouseenter"+w,F.event.start).on("mouseleave"+w,F.event.end)},close:function(){(!0===m.hideOnScroll||"auto"==m.hideOnScroll&&"click"!=m.on)&&F.bind.closeOnScroll(),F.is.closable()?F.bind.clickaway():"hover"==m.on&&M&&F.bind.touchClose()},closeOnScroll:function(){F.verbose("Binding scroll close event to document"),E.one(F.get.scrollEvent()+d,F.event.hideGracefully)},touchClose:function(){F.verbose("Binding popup touchclose event to document"),r.on("touchstart"+d,(function(e){F.verbose("Touched away from popup"),F.event.hideGracefully.call(j,e)}))},clickaway:function(){F.verbose("Binding popup close event to document"),r.on("click"+d,(function(e){F.verbose("Clicked away from popup"),F.event.hideGracefully.call(j,e)}))}},unbind:{events:function(){i.off(d),C.off(w)},close:function(){r.off(d),E.off(d)}},has:{popup:function(){return n&&0<n.length}},should:{centerArrow:function(e){return!F.is.basic()&&e.target.width<=2*m.arrowPixelsFromEdge}},is:{closable:function(){return"auto"==m.closable?"hover"!=m.on:m.closable},offstage:function(e,t){var n=[];return O.each(e,(function(e,r){r<-m.jitter&&(F.debug("Position exceeds allowable distance from edge",e,r,t),n.push(e))})),0<n.length},svg:function(e){return F.supports.svg()&&e instanceof SVGGraphicsElement},basic:function(){return C.hasClass(A.basic)},active:function(){return C.hasClass(A.active)},animating:function(){return void 0!==n&&n.hasClass(A.animating)},fluid:function(){return void 0!==n&&n.hasClass(A.fluid)},visible:function(){return void 0!==n&&n.hasClass(A.popupVisible)},dropdown:function(){return C.hasClass(A.dropdown)},hidden:function(){return!F.is.visible()},rtl:function(){return"rtl"==C.css("direction")}},reset:function(){F.remove.visible(),m.preserve?void 0!==O.fn.transition&&n.transition("remove transition"):F.removePopup()},setting:function(e,t){if(O.isPlainObject(e))O.extend(!0,m,e);else{if(void 0===t)return m[e];m[e]=t}},internal:function(e,t){if(O.isPlainObject(e))O.extend(!0,F,e);else{if(void 0===t)return F[e];F[e]=t}},debug:function(){!m.silent&&m.debug&&(m.performance?F.performance.log(arguments):(F.debug=Function.prototype.bind.call(console.info,console,m.name+":"),F.debug.apply(console,arguments)))},verbose:function(){!m.silent&&m.verbose&&m.debug&&(m.performance?F.performance.log(arguments):(F.verbose=Function.prototype.bind.call(console.info,console,m.name+":"),F.verbose.apply(console,arguments)))},error:function(){m.silent||(F.error=Function.prototype.bind.call(console.error,console,m.name+":"),F.error.apply(console,arguments))},performance:{log:function(e){var t,n;m.performance&&(n=(t=(new Date).getTime())-(a||t),a=t,s.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:j,"Execution Time":n})),clearTimeout(F.performance.timer),F.performance.timer=setTimeout(F.performance.display,500)},display:function(){m.name,a=!1,clearTimeout(F.performance.timer),O.each(s,(function(e,t){t["Execution Time"]})),(void 0!==console.group||void 0!==console.table)&&0<s.length&&!console.table&&O.each(s,(function(e,t){t.Name,t["Execution Time"]})),s=[]}},invoke:function(e,n,r){var i,o,a,s=N;return n=n||l,r=j||r,"string"==typeof e&&void 0!==s&&(e=e.split(/[\. ]/),i=e.length-1,O.each(e,(function(t,n){var r=t!=i?n+e[t+1].charAt(0).toUpperCase()+e[t+1].slice(1):e;if(!O.isPlainObject(s[r])||t==i)return void 0!==s[r]?(o=s[r],!1):O.isPlainObject(s[n])&&t!=i?void(s=s[n]):void 0!==s[n]&&(o=s[n],!1);s=s[r]}))),O.isFunction(o)?a=o.apply(r,n):void 0!==o&&(a=o),O.isArray(t)?t.push(a):void 0!==t?t=[t,a]:void 0!==a&&(t=a),o}};c?(void 0===N&&F.initialize(),F.invoke(u)):(void 0!==N&&N.invoke("destroy"),F.initialize())})),void 0!==t?t:this},O.fn.popup.settings={name:"Popup",silent:!1,debug:!1,verbose:!1,performance:!0,namespace:"popup",observeChanges:!0,onCreate:function(){},onRemove:function(){},onShow:function(){},onVisible:function(){},onHide:function(){},onUnplaceable:function(){},onHidden:function(){},on:"hover",boundary:T,addTouchEvents:!0,position:"top left",variation:"",movePopup:!0,target:!1,popup:!1,inline:!1,preserve:!1,hoverable:!1,content:!1,html:!1,title:!1,closable:!0,hideOnScroll:"auto",exclusive:!1,context:"body",scrollContext:T,prefer:"opposite",lastResort:!1,arrowPixelsFromEdge:20,delay:{show:50,hide:70},setFluidWidth:!0,duration:200,transition:"scale",distanceAway:0,jitter:2,offset:0,maxSearchDepth:15,error:{invalidPosition:"The position you specified is not a valid position",cannotPlace:"Popup does not fit within the boundaries of the viewport",method:"The method you called is not defined.",noTransition:"This module requires ui transitions <https://github.com/Semantic-Org/UI-Transition>",notFound:"The target or popup you specified does not exist on the page"},metadata:{activator:"activator",content:"content",html:"html",offset:"offset",position:"position",title:"title",variation:"variation"},className:{active:"active",basic:"basic",animating:"animating",dropdown:"dropdown",fluid:"fluid",loading:"loading",popup:"ui popup",position:"top left center bottom right",visible:"visible",popupVisible:"visible"},selector:{popup:".ui.popup"},templates:{escape:function(e){var t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"};return/[&<>"'`]/.test(e)?e.replace(/[&<>"'`]/g,(function(e){return t[e]})):e},popup:function(e){var t="",n=O.fn.popup.settings.templates.escape;return e.title,e.title&&(e.title=n(e.title),t+='<div class="header">'+e.title+"</div>"),e.content,e.content&&(e.content=n(e.content),t+='<div class="content">'+e.content+"</div>"),t}}},E=ee(),Z=window,S=document,void 0!==(Z=void 0!==Z&&Z.Math==Math?Z:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")())&&Z.Math==Math||"undefined"!=typeof self&&self.Math==Math||Function("return this")(),E.fn.progress=function(e){var t,n=E(this),r=(n.selector,(new Date).getTime()),i=[],o=e,a="string"==typeof o,s=[].slice.call(arguments,1);return n.each((function(){var n=E.isPlainObject(e)?E.extend(!0,{},E.fn.progress.settings,e):E.extend({},E.fn.progress.settings),u=n.className,c=n.metadata,l=n.namespace,h=n.selector,f=n.error,d="."+l,p="module-"+l,m=E(this),g=E(this).find(h.bar),A=E(this).find(h.progress),v=E(this).find(h.label),b=this,y=m.data(p),w=!1,x={initialize:function(){x.debug("Initializing progress bar",n),x.set.duration(),x.set.transitionEvent(),x.read.metadata(),x.read.settings(),x.instantiate()},instantiate:function(){x.verbose("Storing instance of progress",x),y=x,m.data(p,x)},destroy:function(){x.verbose("Destroying previous progress for",m),clearInterval(y.interval),x.remove.state(),m.removeData(p),y=void 0},reset:function(){x.remove.nextValue(),x.update.progress(0)},complete:function(){(void 0===x.percent||x.percent<100)&&(x.remove.progressPoll(),x.set.percent(100))},read:{metadata:function(){var e={percent:m.data(c.percent),total:m.data(c.total),value:m.data(c.value)};e.percent&&(x.debug("Current percent value set from metadata",e.percent),x.set.percent(e.percent)),e.total&&(x.debug("Total value set from metadata",e.total),x.set.total(e.total)),e.value&&(x.debug("Current value set from metadata",e.value),x.set.value(e.value),x.set.progress(e.value))},settings:function(){!1!==n.total&&(x.debug("Current total set in settings",n.total),x.set.total(n.total)),!1!==n.value&&(x.debug("Current value set in settings",n.value),x.set.value(n.value),x.set.progress(x.value)),!1!==n.percent&&(x.debug("Current percent set in settings",n.percent),x.set.percent(n.percent))}},bind:{transitionEnd:function(e){var t=x.get.transitionEnd();g.one(t+d,(function(t){clearTimeout(x.failSafeTimer),e.call(this,t)})),x.failSafeTimer=setTimeout((function(){g.triggerHandler(t)}),n.duration+n.failSafeDelay),x.verbose("Adding fail safe timer",x.timer)}},increment:function(e){var t,n;x.has.total()?n=(t=x.get.value())+(e=e||1):(n=(t=x.get.percent())+(e=e||x.get.randomValue()),x.debug("Incrementing percentage by",t,n)),n=x.get.normalizedValue(n),x.set.progress(n)},decrement:function(e){var t,n;x.get.total()?(n=(t=x.get.value())-(e=e||1),x.debug("Decrementing value by",e,t)):(n=(t=x.get.percent())-(e=e||x.get.randomValue()),x.debug("Decrementing percentage by",e,t)),n=x.get.normalizedValue(n),x.set.progress(n)},has:{progressPoll:function(){return x.progressPoll},total:function(){return!1!==x.get.total()}},get:{text:function(e){var t=x.value||0,n=x.total||0,r=w?x.get.displayPercent():x.percent||0,i=0<x.total?n-t:100-r;return e=(e=e||"").replace("{value}",t).replace("{total}",n).replace("{left}",i).replace("{percent}",r),x.verbose("Adding variables to progress bar text",e),e},normalizedValue:function(e){if(e<0)return x.debug("Value cannot decrement below 0"),0;if(x.has.total()){if(e>x.total)return x.debug("Value cannot increment above total",x.total),x.total}else if(100<e)return x.debug("Value cannot increment above 100 percent"),100;return e},updateInterval:function(){return"auto"==n.updateInterval?n.duration:n.updateInterval},randomValue:function(){return x.debug("Generating random increment percentage"),Math.floor(Math.random()*n.random.max+n.random.min)},numericValue:function(e){return"string"==typeof e?""!==e.replace(/[^\d.]/g,"")&&+e.replace(/[^\d.]/g,""):e},transitionEnd:function(){var e,t=S.createElement("element"),n={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in n)if(void 0!==t.style[e])return n[e]},displayPercent:function(){var e=g.width(),t=m.width();e=e>parseInt(g.css("min-width"),10)?e/t*100:x.percent;return 0<n.precision?Math.round(e*(10*n.precision))/(10*n.precision):Math.round(e)},percent:function(){return x.percent||0},value:function(){return x.nextValue||x.value||0},total:function(){return x.total||!1}},create:{progressPoll:function(){x.progressPoll=setTimeout((function(){x.update.toNextValue(),x.remove.progressPoll()}),x.get.updateInterval())}},is:{complete:function(){return x.is.success()||x.is.warning()||x.is.error()},success:function(){return m.hasClass(u.success)},warning:function(){return m.hasClass(u.warning)},error:function(){return m.hasClass(u.error)},active:function(){return m.hasClass(u.active)},visible:function(){return m.is(":visible")}},remove:{progressPoll:function(){x.verbose("Removing progress poll timer"),x.progressPoll&&(clearTimeout(x.progressPoll),delete x.progressPoll)},nextValue:function(){x.verbose("Removing progress value stored for next update"),delete x.nextValue},state:function(){x.verbose("Removing stored state"),delete x.total,delete x.percent,delete x.value},active:function(){x.verbose("Removing active state"),m.removeClass(u.active)},success:function(){x.verbose("Removing success state"),m.removeClass(u.success)},warning:function(){x.verbose("Removing warning state"),m.removeClass(u.warning)},error:function(){x.verbose("Removing error state"),m.removeClass(u.error)}},set:{barWidth:function(e){100<e?x.error(f.tooHigh,e):e<0?x.error(f.tooLow,e):(g.css("width",e+"%"),m.attr("data-percent",parseInt(e,10)))},duration:function(e){e="number"==typeof(e=e||n.duration)?e+"ms":e,x.verbose("Setting progress bar transition duration",e),g.css({"transition-duration":e})},percent:function(e){e="string"==typeof e?+e.replace("%",""):e,e=0<n.precision?Math.round(e*(10*n.precision))/(10*n.precision):Math.round(e),x.percent=e,x.has.total()||(x.value=0<n.precision?Math.round(e/100*x.total*(10*n.precision))/(10*n.precision):Math.round(e/100*x.total*10)/10,n.limitValues&&(x.value=100<x.value?100:x.value<0?0:x.value)),x.set.barWidth(e),x.set.labelInterval(),x.set.labels(),n.onChange.call(b,e,x.value,x.total)},labelInterval:function(){clearInterval(x.interval),x.bind.transitionEnd((function(){x.verbose("Bar finished animating, removing continuous label updates"),clearInterval(x.interval),w=!1,x.set.labels()})),w=!0,x.interval=setInterval((function(){E.contains(S.documentElement,b)||(clearInterval(x.interval),w=!1),x.set.labels()}),n.framerate)},labels:function(){x.verbose("Setting both bar progress and outer label text"),x.set.barLabel(),x.set.state()},label:function(e){(e=e||"")&&(e=x.get.text(e),x.verbose("Setting label to text",e),v.text(e))},state:function(e){100===(e=void 0!==e?e:x.percent)?n.autoSuccess&&!(x.is.warning()||x.is.error()||x.is.success())?(x.set.success(),x.debug("Automatically triggering success at 100%")):(x.verbose("Reached 100% removing active state"),x.remove.active(),x.remove.progressPoll()):0<e?(x.verbose("Adjusting active progress bar label",e),x.set.active()):(x.remove.active(),x.set.label(n.text.active))},barLabel:function(e){void 0!==e?A.text(x.get.text(e)):"ratio"==n.label&&x.total?(x.verbose("Adding ratio to bar label"),A.text(x.get.text(n.text.ratio))):"percent"==n.label&&(x.verbose("Adding percentage to bar label"),A.text(x.get.text(n.text.percent)))},active:function(e){e=e||n.text.active,x.debug("Setting active state"),n.showActivity&&!x.is.active()&&m.addClass(u.active),x.remove.warning(),x.remove.error(),x.remove.success(),(e=n.onLabelUpdate("active",e,x.value,x.total))&&x.set.label(e),x.bind.transitionEnd((function(){n.onActive.call(b,x.value,x.total)}))},success:function(e){e=e||n.text.success||n.text.active,x.debug("Setting success state"),m.addClass(u.success),x.remove.active(),x.remove.warning(),x.remove.error(),x.complete(),e=n.text.success?n.onLabelUpdate("success",e,x.value,x.total):n.onLabelUpdate("active",e,x.value,x.total),x.set.label(e),x.bind.transitionEnd((function(){n.onSuccess.call(b,x.total)}))},warning:function(e){e=e||n.text.warning,x.debug("Setting warning state"),m.addClass(u.warning),x.remove.active(),x.remove.success(),x.remove.error(),x.complete(),(e=n.onLabelUpdate("warning",e,x.value,x.total))&&x.set.label(e),x.bind.transitionEnd((function(){n.onWarning.call(b,x.value,x.total)}))},error:function(e){e=e||n.text.error,x.debug("Setting error state"),m.addClass(u.error),x.remove.active(),x.remove.success(),x.remove.warning(),x.complete(),(e=n.onLabelUpdate("error",e,x.value,x.total))&&x.set.label(e),x.bind.transitionEnd((function(){n.onError.call(b,x.value,x.total)}))},transitionEvent:function(){x.get.transitionEnd()},total:function(e){x.total=e},value:function(e){x.value=e},progress:function(e){x.has.progressPoll()?(x.debug("Updated within interval, setting next update to use new value",e),x.set.nextValue(e)):(x.debug("First update in progress update interval, immediately updating",e),x.update.progress(e),x.create.progressPoll())},nextValue:function(e){x.nextValue=e}},update:{toNextValue:function(){var e=x.nextValue;e&&(x.debug("Update interval complete using last updated value",e),x.update.progress(e),x.remove.nextValue())},progress:function(e){var t;!1===(e=x.get.numericValue(e))&&x.error(f.nonNumeric,e),e=x.get.normalizedValue(e),x.has.total()?(x.set.value(e),t=e/x.total*100,x.debug("Calculating percent complete from total",t)):(t=e,x.debug("Setting value to exact percentage value",t)),x.set.percent(t)}},setting:function(e,t){if(x.debug("Changing setting",e,t),E.isPlainObject(e))E.extend(!0,n,e);else{if(void 0===t)return n[e];E.isPlainObject(n[e])?E.extend(!0,n[e],t):n[e]=t}},internal:function(e,t){if(E.isPlainObject(e))E.extend(!0,x,e);else{if(void 0===t)return x[e];x[e]=t}},debug:function(){!n.silent&&n.debug&&(n.performance?x.performance.log(arguments):(x.debug=Function.prototype.bind.call(console.info,console,n.name+":"),x.debug.apply(console,arguments)))},verbose:function(){!n.silent&&n.verbose&&n.debug&&(n.performance?x.performance.log(arguments):(x.verbose=Function.prototype.bind.call(console.info,console,n.name+":"),x.verbose.apply(console,arguments)))},error:function(){n.silent||(x.error=Function.prototype.bind.call(console.error,console,n.name+":"),x.error.apply(console,arguments))},performance:{log:function(e){var t,o;n.performance&&(o=(t=(new Date).getTime())-(r||t),r=t,i.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:b,"Execution Time":o})),clearTimeout(x.performance.timer),x.performance.timer=setTimeout(x.performance.display,500)},display:function(){n.name,r=!1,clearTimeout(x.performance.timer),E.each(i,(function(e,t){t["Execution Time"]})),(void 0!==console.group||void 0!==console.table)&&0<i.length&&!console.table&&E.each(i,(function(e,t){t.Name,t["Execution Time"]})),i=[]}},invoke:function(e,n,r){var i,o,a,u=y;return n=n||s,r=b||r,"string"==typeof e&&void 0!==u&&(e=e.split(/[\. ]/),i=e.length-1,E.each(e,(function(t,n){var r=t!=i?n+e[t+1].charAt(0).toUpperCase()+e[t+1].slice(1):e;if(!E.isPlainObject(u[r])||t==i)return void 0!==u[r]?(o=u[r],!1):E.isPlainObject(u[n])&&t!=i?void(u=u[n]):(void 0!==u[n]?o=u[n]:x.error(f.method,e),!1);u=u[r]}))),E.isFunction(o)?a=o.apply(r,n):void 0!==o&&(a=o),E.isArray(t)?t.push(a):void 0!==t?t=[t,a]:void 0!==a&&(t=a),o}};a?(void 0===y&&x.initialize(),x.invoke(o)):(void 0!==y&&y.invoke("destroy"),x.initialize())})),void 0!==t?t:this},E.fn.progress.settings={name:"Progress",namespace:"progress",silent:!1,debug:!1,verbose:!1,performance:!0,random:{min:2,max:5},duration:300,updateInterval:"auto",autoSuccess:!0,showActivity:!0,limitValues:!0,label:"percent",precision:0,framerate:1e3/30,percent:!1,total:!1,value:!1,failSafeDelay:100,onLabelUpdate:function(e,t,n,r){return t},onChange:function(e,t,n){},onSuccess:function(e){},onActive:function(e,t){},onError:function(e,t){},onWarning:function(e,t){},error:{method:"The method you called is not defined.",nonNumeric:"Progress value is non numeric",tooHigh:"Value specified is above 100%",tooLow:"Value specified is below 0%"},regExp:{variable:/\{\$*[A-z0-9]+\}/g},metadata:{percent:"percent",total:"total",value:"value"},selector:{bar:"> .bar",label:"> .label",progress:".bar > .progress"},text:{active:!1,error:!1,success:!1,warning:!1,percent:"{percent}%",ratio:"{value} of {total}"},className:{active:"active",error:"error",success:"success",warning:"warning"}},k=ee(),Z=window,document,Z=void 0!==Z&&Z.Math==Math?Z:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),k.fn.rating=function(e){var t,n=k(this),r=(n.selector,(new Date).getTime()),i=[],o=e,a="string"==typeof o,s=[].slice.call(arguments,1);return n.each((function(){var u,c=k.isPlainObject(e)?k.extend(!0,{},k.fn.rating.settings,e):k.extend({},k.fn.rating.settings),l=c.namespace,h=c.className,f=c.metadata,d=c.selector,p=(c.error,"."+l),m="module-"+l,g=this,A=k(this).data(m),v=k(this),b=v.find(d.icon),y={initialize:function(){y.verbose("Initializing rating module",c),0===b.length&&y.setup.layout(),c.interactive?y.enable():y.disable(),y.set.initialLoad(),y.set.rating(y.get.initialRating()),y.remove.initialLoad(),y.instantiate()},instantiate:function(){y.verbose("Instantiating module",c),A=y,v.data(m,y)},destroy:function(){y.verbose("Destroying previous instance",A),y.remove.events(),v.removeData(m)},refresh:function(){b=v.find(d.icon)},setup:{layout:function(){var e=y.get.maxRating();e=k.fn.rating.settings.templates.icon(e);y.debug("Generating icon html dynamically"),v.html(e),y.refresh()}},event:{mouseenter:function(){var e=k(this);e.nextAll().removeClass(h.selected),v.addClass(h.selected),e.addClass(h.selected).prevAll().addClass(h.selected)},mouseleave:function(){v.removeClass(h.selected),b.removeClass(h.selected)},click:function(){var e=k(this),t=y.get.rating();e=b.index(e)+1;("auto"==c.clearable?1===b.length:c.clearable)&&t==e?y.clearRating():y.set.rating(e)}},clearRating:function(){y.debug("Clearing current rating"),y.set.rating(0)},bind:{events:function(){y.verbose("Binding events"),v.on("mouseenter"+p,d.icon,y.event.mouseenter).on("mouseleave"+p,d.icon,y.event.mouseleave).on("click"+p,d.icon,y.event.click)}},remove:{events:function(){y.verbose("Removing events"),v.off(p)},initialLoad:function(){u=!1}},enable:function(){y.debug("Setting rating to interactive mode"),y.bind.events(),v.removeClass(h.disabled)},disable:function(){y.debug("Setting rating to read-only mode"),y.remove.events(),v.addClass(h.disabled)},is:{initialLoad:function(){return u}},get:{initialRating:function(){return void 0!==v.data(f.rating)?(v.removeData(f.rating),v.data(f.rating)):c.initialRating},maxRating:function(){return void 0!==v.data(f.maxRating)?(v.removeData(f.maxRating),v.data(f.maxRating)):c.maxRating},rating:function(){var e=b.filter("."+h.active).length;return y.verbose("Current rating retrieved",e),e}},set:{rating:function(e){var t=b.eq(0<=e-1?e-1:0);v.removeClass(h.selected),b.removeClass(h.selected).removeClass(h.active),0<e&&(y.verbose("Setting current rating to",e),t.prevAll().addBack().addClass(h.active)),y.is.initialLoad()||c.onRate.call(g,e)},initialLoad:function(){u=!0}},setting:function(e,t){if(y.debug("Changing setting",e,t),k.isPlainObject(e))k.extend(!0,c,e);else{if(void 0===t)return c[e];k.isPlainObject(c[e])?k.extend(!0,c[e],t):c[e]=t}},internal:function(e,t){if(k.isPlainObject(e))k.extend(!0,y,e);else{if(void 0===t)return y[e];y[e]=t}},debug:function(){!c.silent&&c.debug&&(c.performance?y.performance.log(arguments):(y.debug=Function.prototype.bind.call(console.info,console,c.name+":"),y.debug.apply(console,arguments)))},verbose:function(){!c.silent&&c.verbose&&c.debug&&(c.performance?y.performance.log(arguments):(y.verbose=Function.prototype.bind.call(console.info,console,c.name+":"),y.verbose.apply(console,arguments)))},error:function(){c.silent||(y.error=Function.prototype.bind.call(console.error,console,c.name+":"),y.error.apply(console,arguments))},performance:{log:function(e){var t,n;c.performance&&(n=(t=(new Date).getTime())-(r||t),r=t,i.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:g,"Execution Time":n})),clearTimeout(y.performance.timer),y.performance.timer=setTimeout(y.performance.display,500)},display:function(){c.name,r=!1,clearTimeout(y.performance.timer),k.each(i,(function(e,t){t["Execution Time"]})),1<n.length&&n.length,(void 0!==console.group||void 0!==console.table)&&0<i.length&&!console.table&&k.each(i,(function(e,t){t.Name,t["Execution Time"]})),i=[]}},invoke:function(e,n,r){var i,o,a,u=A;return n=n||s,r=g||r,"string"==typeof e&&void 0!==u&&(e=e.split(/[\. ]/),i=e.length-1,k.each(e,(function(t,n){var r=t!=i?n+e[t+1].charAt(0).toUpperCase()+e[t+1].slice(1):e;if(!k.isPlainObject(u[r])||t==i)return void 0!==u[r]?(o=u[r],!1):k.isPlainObject(u[n])&&t!=i?void(u=u[n]):void 0!==u[n]&&(o=u[n],!1);u=u[r]}))),k.isFunction(o)?a=o.apply(r,n):void 0!==o&&(a=o),k.isArray(t)?t.push(a):void 0!==t?t=[t,a]:void 0!==a&&(t=a),o}};a?(void 0===A&&y.initialize(),y.invoke(o)):(void 0!==A&&A.invoke("destroy"),y.initialize())})),void 0!==t?t:this},k.fn.rating.settings={name:"Rating",namespace:"rating",slent:!1,debug:!1,verbose:!1,performance:!0,initialRating:0,interactive:!0,maxRating:4,clearable:"auto",fireOnInit:!1,onRate:function(e){},error:{method:"The method you called is not defined",noMaximum:"No maximum rating specified. Cannot generate HTML automatically"},metadata:{rating:"rating",maxRating:"maxRating"},className:{active:"active",disabled:"disabled",selected:"selected",loading:"loading"},selector:{icon:".icon"},templates:{icon:function(e){for(var t=1,n="";t<=e;)n+='<i class="icon"></i>',t++;return n}}},w=ee(),x=window,C=document,x=void 0!==x&&x.Math==Math?x:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),w.fn.search=function(e){var t,n=w(this),r=(n.selector,(new Date).getTime()),i=[],o=e,a="string"==typeof o,s=[].slice.call(arguments,1);return w(this).each((function(){var u=w.isPlainObject(e)?w.extend(!0,{},w.fn.search.settings,e):w.extend({},w.fn.search.settings),c=u.className,l=u.metadata,h=u.regExp,f=u.fields,d=u.selector,p=u.error,m=u.namespace,g="."+m,A=m+"-module",v=w(this),b=v.find(d.prompt),y=v.find(d.searchButton),k=v.find(d.results),E=v.find(d.result),S=(v.find(d.category),this),_=v.data(A),O=!1,T=!1,D={initialize:function(){D.verbose("Initializing module"),D.get.settings(),D.determine.searchFields(),D.bind.events(),D.set.type(),D.create.results(),D.instantiate()},instantiate:function(){D.verbose("Storing instance of module",D),_=D,v.data(A,D)},destroy:function(){D.verbose("Destroying instance"),v.off(g).removeData(A)},refresh:function(){D.debug("Refreshing selector cache"),b=v.find(d.prompt),y=v.find(d.searchButton),v.find(d.category),k=v.find(d.results),E=v.find(d.result)},refreshResults:function(){k=v.find(d.results),E=v.find(d.result)},bind:{events:function(){D.verbose("Binding events to search"),u.automatic&&(v.on(D.get.inputEvent()+g,d.prompt,D.event.input),b.attr("autocomplete","off")),v.on("focus"+g,d.prompt,D.event.focus).on("blur"+g,d.prompt,D.event.blur).on("keydown"+g,d.prompt,D.handleKeyboard).on("click"+g,d.searchButton,D.query).on("mousedown"+g,d.results,D.event.result.mousedown).on("mouseup"+g,d.results,D.event.result.mouseup).on("click"+g,d.result,D.event.result.click)}},determine:{searchFields:function(){e&&void 0!==e.searchFields&&(u.searchFields=e.searchFields)}},event:{input:function(){u.searchDelay?(clearTimeout(D.timer),D.timer=setTimeout((function(){D.is.focused()&&D.query()}),u.searchDelay)):D.query()},focus:function(){D.set.focus(),u.searchOnFocus&&D.has.minimumCharacters()&&D.query((function(){D.can.show()&&D.showResults()}))},blur:function(e){function t(){D.cancel.query(),D.remove.focus(),D.timer=setTimeout(D.hideResults,u.hideDelay)}C.activeElement===this||(T=!1,D.resultsClicked?(D.debug("Determining if user action caused search to close"),v.one("click.close"+g,d.results,(function(e){D.is.inMessage(e)||O?b.focus():(O=!1,D.is.animating()||D.is.hidden()||t())}))):(D.debug("Input blurred without user action, closing results"),t()))},result:{mousedown:function(){D.resultsClicked=!0},mouseup:function(){D.resultsClicked=!1},click:function(e){D.debug("Search result selected");var t=(a=w(this)).find(d.title).eq(0),n=a.is("a[href]")?a:a.find("a[href]").eq(0),r=n.attr("href")||!1,i=n.attr("target")||!1,o=(t=(t.html(),0<t.length&&t.text()),D.get.results()),a=a.data(l.result)||D.get.result(t,o);w.isFunction(u.onSelect)&&!1===u.onSelect.call(S,a,o)?(D.debug("Custom onSelect callback cancelled default select action"),O=!0):(D.hideResults(),t&&D.set.value(t),r&&(D.verbose("Opening search link found in result",n),"_blank"==i||e.ctrlKey?x.open(r):x.location.href=r))}}},handleKeyboard:function(e){var t,n=v.find(d.result),r=v.find(d.category),i=n.filter("."+c.active),o=n.index(i),a=n.length,s=(i=0<i.length,e.which);if(27==s&&(D.verbose("Escape key pressed, blurring search field"),D.hideResults(),T=!0),D.is.visible())if(13==s){if(D.verbose("Enter key pressed, selecting active result"),0<n.filter("."+c.active).length)return D.event.result.click.call(n.filter("."+c.active),e),e.preventDefault(),!1}else 38==s&&i?(D.verbose("Up key pressed, changing active result"),t=o-1<0?o:o-1,r.removeClass(c.active),n.removeClass(c.active).eq(t).addClass(c.active).closest(r).addClass(c.active),e.preventDefault()):40==s&&(D.verbose("Down key pressed, changing active result"),t=a<=o+1?o:o+1,r.removeClass(c.active),n.removeClass(c.active).eq(t).addClass(c.active).closest(r).addClass(c.active),e.preventDefault());else 13==s&&(D.verbose("Enter key pressed, executing query"),D.query(),D.set.buttonPressed(),b.one("keyup",D.remove.buttonFocus))},setup:{api:function(e,t){var n={debug:u.debug,on:!1,cache:u.cache,action:"search",urlData:{query:e},onSuccess:function(n){D.parse.response.call(S,n,e),t()},onFailure:function(){D.displayMessage(p.serverError),t()},onAbort:function(e){},onError:D.error};w.extend(!0,n,u.apiSettings),D.verbose("Setting up API request",n),v.api(n)}},can:{useAPI:function(){return void 0!==w.fn.api},show:function(){return D.is.focused()&&!D.is.visible()&&!D.is.empty()},transition:function(){return u.transition&&void 0!==w.fn.transition&&v.transition("is supported")}},is:{animating:function(){return k.hasClass(c.animating)},hidden:function(){return k.hasClass(c.hidden)},inMessage:function(e){var t;if(e.target)return t=w(e.target),w.contains(C.documentElement,e.target)&&0<t.closest(d.message).length},empty:function(){return""===k.html()},visible:function(){return 0<k.filter(":visible").length},focused:function(){return 0<b.filter(":focus").length}},get:{settings:function(){w.isPlainObject(e)&&e.searchFullText&&(u.fullTextSearch=e.searchFullText,D.error(u.error.oldSearchSyntax,S))},inputEvent:function(){var e=b[0];return void 0!==e&&void 0!==e.oninput?"input":void 0!==e&&void 0!==e.onpropertychange?"propertychange":"keyup"},value:function(){return b.val()},results:function(){return v.data(l.results)},result:function(e,t){var n=["title","id"],r=!1;return e=void 0!==e?e:D.get.value(),t=void 0!==t?t:D.get.results(),"category"===u.type?(D.debug("Finding result that matches",e),w.each(t,(function(t,i){if(w.isArray(i.results)&&(r=D.search.object(e,i.results,n)[0]))return!1}))):(D.debug("Finding result in results object",e),r=D.search.object(e,t,n)[0]),r||!1}},select:{firstResult:function(){D.verbose("Selecting first result"),E.first().addClass(c.active)}},set:{focus:function(){v.addClass(c.focus)},loading:function(){v.addClass(c.loading)},value:function(e){D.verbose("Setting search input value",e),b.val(e)},type:function(e){e=e||u.type,"category"==u.type&&v.addClass(u.type)},buttonPressed:function(){y.addClass(c.pressed)}},remove:{loading:function(){v.removeClass(c.loading)},focus:function(){v.removeClass(c.focus)},buttonPressed:function(){y.removeClass(c.pressed)}},query:function(e){e=w.isFunction(e)?e:function(){};var t=D.get.value(),n=D.read.cache(t);e=e||function(){},D.has.minimumCharacters()?(n?(D.debug("Reading result from cache",t),D.save.results(n.results),D.addResults(n.html),D.inject.id(n.results),e()):(D.debug("Querying for",t),w.isPlainObject(u.source)||w.isArray(u.source)?(D.search.local(t),e()):D.can.useAPI()?D.search.remote(t,e):(D.error(p.source),e())),u.onSearchQuery.call(S,t)):D.hideResults()},search:{local:function(e){var t,n=D.search.object(e,u.content);D.set.loading(),D.save.results(n),D.debug("Returned full local search results",n),0<u.maxResults&&(D.debug("Using specified max results",n),n=n.slice(0,u.maxResults)),"category"==u.type&&(n=D.create.categoryResults(n)),t=D.generateResults({results:n}),D.remove.loading(),D.addResults(t),D.inject.id(n),D.write.cache(e,{html:t,results:n})},remote:function(e,t){t=w.isFunction(t)?t:function(){},v.api("is loading")&&v.api("abort"),D.setup.api(e,t),v.api("query")},object:function(e,t,n){function r(e,t){var n=-1==w.inArray(t,i),r=-1==w.inArray(t,a),s=-1==w.inArray(t,o);n&&r&&s&&e.push(t)}var i=[],o=[],a=[],s=e.toString().replace(h.escape,"\\$&"),c=new RegExp(h.beginsWith+s,"i");return t=t||u.source,n=void 0!==n?n:u.searchFields,w.isArray(n)||(n=[n]),void 0===t||!1===t?(D.error(p.source),[]):(w.each(n,(function(n,s){w.each(t,(function(t,n){"string"==typeof n[s]&&(-1!==n[s].search(c)?r(i,n):"exact"===u.fullTextSearch&&D.exactSearch(e,n[s])?r(o,n):1==u.fullTextSearch&&D.fuzzySearch(e,n[s])&&r(a,n))}))})),w.merge(o,a),w.merge(i,o),i)}},exactSearch:function(e,t){return e=e.toLowerCase(),-1<(t=t.toLowerCase()).indexOf(e)},fuzzySearch:function(e,t){var n=t.length,r=e.length;if("string"!=typeof e)return!1;if(e=e.toLowerCase(),t=t.toLowerCase(),n<r)return!1;if(r===n)return e===t;e:for(var i=0,o=0;i<r;i++){for(var a=e.charCodeAt(i);o<n;)if(t.charCodeAt(o++)===a)continue e;return!1}return!0},parse:{response:function(e,t){var n=D.generateResults(e);D.verbose("Parsing server response",e),void 0!==e&&void 0!==t&&void 0!==e[f.results]&&(D.addResults(n),D.inject.id(e[f.results]),D.write.cache(t,{html:n,results:e[f.results]}),D.save.results(e[f.results]))}},cancel:{query:function(){D.can.useAPI()&&v.api("abort")}},has:{minimumCharacters:function(){return D.get.value().length>=u.minCharacters},results:function(){return 0!==k.length&&""!=k.html()}},clear:{cache:function(e){var t=v.data(l.cache);e?t&&t[e]&&(D.debug("Removing value from cache",e),delete t[e],v.data(l.cache,t)):(D.debug("Clearing cache",e),v.removeData(l.cache))}},read:{cache:function(e){var t=v.data(l.cache);return!!u.cache&&(D.verbose("Checking cache for generated html for query",e),"object"==typeof t&&void 0!==t[e]&&t[e])}},create:{categoryResults:function(e){var t={};return w.each(e,(function(e,n){n.category&&(void 0===t[n.category]?(D.verbose("Creating new category of results",n.category),t[n.category]={name:n.category,results:[n]}):t[n.category].results.push(n))})),t},id:function(e,t){var n;e+=1;return void 0!==t?(n=String.fromCharCode(97+t)+e,D.verbose("Creating category result id",n)):D.verbose("Creating result id",n=e),n},results:function(){0===k.length&&(k=w("<div />").addClass(c.results).appendTo(v))}},inject:{result:function(e,t,n){D.verbose("Injecting result into results"),n=(void 0!==n?k.children().eq(n).children(d.results).first():k).children(d.result).eq(t),D.verbose("Injecting results metadata",n),n.data(l.result,e)},id:function(e){D.debug("Injecting unique ids into results");var t=0,n=0;return"category"===u.type?w.each(e,(function(e,r){n=0,w.each(r.results,(function(e,i){void 0===(e=r.results[e]).id&&(e.id=D.create.id(n,t)),D.inject.result(e,n,t),n++})),t++})):w.each(e,(function(t,r){void 0===(t=e[t]).id&&(t.id=D.create.id(n)),D.inject.result(t,n),n++})),e}},save:{results:function(e){D.verbose("Saving current search results to metadata",e),v.data(l.results,e)}},write:{cache:function(e,t){var n=void 0!==v.data(l.cache)?v.data(l.cache):{};u.cache&&(D.verbose("Writing generated html to cache",e,t),n[e]=t,v.data(l.cache,n))}},addResults:function(e){if(w.isFunction(u.onResultsAdd)&&!1===u.onResultsAdd.call(k,e))return D.debug("onResultsAdd callback cancelled default action"),!1;e?(k.html(e),D.refreshResults(),u.selectFirstResult&&D.select.firstResult(),D.showResults()):D.hideResults((function(){k.empty()}))},showResults:function(e){e=w.isFunction(e)?e:function(){},T||!D.is.visible()&&D.has.results()&&(D.can.transition()?(D.debug("Showing results with css animations"),k.transition({animation:u.transition+" in",debug:u.debug,verbose:u.verbose,duration:u.duration,onComplete:function(){e()},queue:!0})):(D.debug("Showing results with javascript"),k.stop().fadeIn(u.duration,u.easing)),u.onResultsOpen.call(k))},hideResults:function(e){e=w.isFunction(e)?e:function(){},D.is.visible()&&(D.can.transition()?(D.debug("Hiding results with css animations"),k.transition({animation:u.transition+" out",debug:u.debug,verbose:u.verbose,duration:u.duration,onComplete:function(){e()},queue:!0})):(D.debug("Hiding results with javascript"),k.stop().fadeOut(u.duration,u.easing)),u.onResultsClose.call(k))},generateResults:function(e){D.debug("Generating html from response",e);var t=u.templates[u.type],n=w.isPlainObject(e[f.results])&&!w.isEmptyObject(e[f.results]),r=w.isArray(e[f.results])&&0<e[f.results].length,i="";return n||r?(0<u.maxResults&&(n?"standard"==u.type&&D.error(p.maxResults):e[f.results]=e[f.results].slice(0,u.maxResults)),w.isFunction(t)?i=t(e,f):D.error(p.noTemplate,!1)):u.showNoResults&&(i=D.displayMessage(p.noResults,"empty")),u.onResults.call(S,e),i},displayMessage:function(e,t){return D.debug("Displaying message",e,t=t||"standard"),D.addResults(u.templates.message(e,t)),u.templates.message(e,t)},setting:function(e,t){if(w.isPlainObject(e))w.extend(!0,u,e);else{if(void 0===t)return u[e];u[e]=t}},internal:function(e,t){if(w.isPlainObject(e))w.extend(!0,D,e);else{if(void 0===t)return D[e];D[e]=t}},debug:function(){!u.silent&&u.debug&&(u.performance?D.performance.log(arguments):(D.debug=Function.prototype.bind.call(console.info,console,u.name+":"),D.debug.apply(console,arguments)))},verbose:function(){!u.silent&&u.verbose&&u.debug&&(u.performance?D.performance.log(arguments):(D.verbose=Function.prototype.bind.call(console.info,console,u.name+":"),D.verbose.apply(console,arguments)))},error:function(){u.silent||(D.error=Function.prototype.bind.call(console.error,console,u.name+":"),D.error.apply(console,arguments))},performance:{log:function(e){var t,n;u.performance&&(n=(t=(new Date).getTime())-(r||t),r=t,i.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:S,"Execution Time":n})),clearTimeout(D.performance.timer),D.performance.timer=setTimeout(D.performance.display,500)},display:function(){u.name,r=!1,clearTimeout(D.performance.timer),w.each(i,(function(e,t){t["Execution Time"]})),1<n.length&&n.length,(void 0!==console.group||void 0!==console.table)&&0<i.length&&!console.table&&w.each(i,(function(e,t){t.Name,t["Execution Time"]})),i=[]}},invoke:function(e,n,r){var i,o,a,u=_;return n=n||s,r=S||r,"string"==typeof e&&void 0!==u&&(e=e.split(/[\. ]/),i=e.length-1,w.each(e,(function(t,n){var r=t!=i?n+e[t+1].charAt(0).toUpperCase()+e[t+1].slice(1):e;if(!w.isPlainObject(u[r])||t==i)return void 0!==u[r]?(o=u[r],!1):w.isPlainObject(u[n])&&t!=i?void(u=u[n]):void 0!==u[n]&&(o=u[n],!1);u=u[r]}))),w.isFunction(o)?a=o.apply(r,n):void 0!==o&&(a=o),w.isArray(t)?t.push(a):void 0!==t?t=[t,a]:void 0!==a&&(t=a),o}};a?(void 0===_&&D.initialize(),D.invoke(o)):(void 0!==_&&_.invoke("destroy"),D.initialize())})),void 0!==t?t:this},w.fn.search.settings={name:"Search",namespace:"search",silent:!1,debug:!1,verbose:!1,performance:!0,type:"standard",minCharacters:1,selectFirstResult:!1,apiSettings:!1,source:!1,searchOnFocus:!0,searchFields:["title","description"],displayField:"",fullTextSearch:"exact",automatic:!0,hideDelay:0,searchDelay:200,maxResults:7,cache:!0,showNoResults:!0,transition:"scale",duration:200,easing:"easeOutExpo",onSelect:!1,onResultsAdd:!1,onSearchQuery:function(e){},onResults:function(e){},onResultsOpen:function(){},onResultsClose:function(){},className:{animating:"animating",active:"active",empty:"empty",focus:"focus",hidden:"hidden",loading:"loading",results:"results",pressed:"down"},error:{source:"Cannot search. No source used, and Semantic API module was not included",noResults:"Your search returned no results",logging:"Error in debug logging, exiting.",noEndpoint:"No search endpoint was specified",noTemplate:"A valid template name was not specified.",oldSearchSyntax:"searchFullText setting has been renamed fullTextSearch for consistency, please adjust your settings.",serverError:"There was an issue querying the server.",maxResults:"Results must be an array to use maxResults setting",method:"The method you called is not defined."},metadata:{cache:"cache",results:"results",result:"result"},regExp:{escape:/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,beginsWith:"(?:s|^)"},fields:{categories:"results",categoryName:"name",categoryResults:"results",description:"description",image:"image",price:"price",results:"results",title:"title",url:"url",action:"action",actionText:"text",actionURL:"url"},selector:{prompt:".prompt",searchButton:".search.button",results:".results",message:".results > .message",category:".category",result:".result",title:".title, .name"},templates:{escape:function(e){var t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"};return/[&<>"'`]/.test(e)?e.replace(/[&<>"'`]/g,(function(e){return t[e]})):e},message:function(e,t){var n="";return void 0!==e&&void 0!==t?(n+='<div class="message '+t+'">')+("empty"==t?'<div class="header">No Results</div class="header"><div class="description">'+e+'</div class="description">':' <div class="description">'+e+"</div>")+"</div>":n},category:function(e,t){var n="";return w.fn.search.settings.templates.escape,void 0!==e[t.categoryResults]&&(w.each(e[t.categoryResults],(function(e,r){void 0!==r[t.results]&&0<r.results.length&&(n+='<div class="category">',void 0!==r[t.categoryName]&&(n+='<div class="name">'+r[t.categoryName]+"</div>"),n+='<div class="results">',w.each(r.results,(function(e,r){r[t.url]?n+='<a class="result" href="'+r[t.url]+'">':n+='<a class="result">',void 0!==r[t.image]&&(n+='<div class="image"> <img src="'+r[t.image]+'"></div>'),n+='<div class="content">',void 0!==r[t.price]&&(n+='<div class="price">'+r[t.price]+"</div>"),void 0!==r[t.title]&&(n+='<div class="title">'+r[t.title]+"</div>"),void 0!==r[t.description]&&(n+='<div class="description">'+r[t.description]+"</div>"),n+="</div></a>"})),n+="</div></div>")})),e[t.action]&&(n+='<a href="'+e[t.action][t.actionURL]+'" class="action">'+e[t.action][t.actionText]+"</a>"),n)},standard:function(e,t){var n="";return void 0!==e[t.results]&&(w.each(e[t.results],(function(e,r){r[t.url]?n+='<a class="result" href="'+r[t.url]+'">':n+='<a class="result">',void 0!==r[t.image]&&(n+='<div class="image"> <img src="'+r[t.image]+'"></div>'),n+='<div class="content">',void 0!==r[t.price]&&(n+='<div class="price">'+r[t.price]+"</div>"),void 0!==r[t.title]&&(n+='<div class="title">'+r[t.title]+"</div>"),void 0!==r[t.description]&&(n+='<div class="description">'+r[t.description]+"</div>"),n+="</div></a>"})),e[t.action]&&(n+='<a href="'+e[t.action][t.actionURL]+'" class="action">'+e[t.action][t.actionText]+"</a>"),n)}}},v=ee(),b=window,y=document,b=void 0!==b&&b.Math==Math?b:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),v.fn.shape=function(e){var t,n=v(this),r=(v("body"),(new Date).getTime()),i=[],o=e,a="string"==typeof o,s=[].slice.call(arguments,1),u=b.requestAnimationFrame||b.mozRequestAnimationFrame||b.webkitRequestAnimationFrame||b.msRequestAnimationFrame||function(e){setTimeout(e,0)};return n.each((function(){n.selector;var c,l,h=v.isPlainObject(e)?v.extend(!0,{},v.fn.shape.settings,e):v.extend({},v.fn.shape.settings),f=h.namespace,d=h.selector,p=h.error,m=h.className,g="."+f,A="module-"+f,b=v(this),w=b.find(d.sides),x=b.find(d.side),C=!1,k=this,E=b.data(A),S={initialize:function(){S.verbose("Initializing module for",k),S.set.defaultSide(),S.instantiate()},instantiate:function(){S.verbose("Storing instance of module",S),E=S,b.data(A,E)},destroy:function(){S.verbose("Destroying previous module for",k),b.removeData(A).off(g)},refresh:function(){S.verbose("Refreshing selector cache for",k),b=v(k),w=v(this).find(d.shape),x=v(this).find(d.side)},repaint:function(){S.verbose("Forcing repaint event"),(w[0]||y.createElement("div")).offsetWidth},animate:function(e,t){S.verbose("Animating box with properties",e),t=t||function(e){S.verbose("Executing animation callback"),void 0!==e&&e.stopPropagation(),S.reset(),S.set.active()},h.beforeChange.call(l[0]),S.get.transitionEvent()?(S.verbose("Starting CSS animation"),b.addClass(m.animating),w.css(e).one(S.get.transitionEvent(),t),S.set.duration(h.duration),u((function(){b.addClass(m.animating),c.addClass(m.hidden)}))):t()},queue:function(e){S.debug("Queueing animation of",e),w.one(S.get.transitionEvent(),(function(){S.debug("Executing queued animation"),setTimeout((function(){b.shape(e)}),0)}))},reset:function(){S.verbose("Animating states reset"),b.removeClass(m.animating).attr("style","").removeAttr("style"),w.attr("style","").removeAttr("style"),x.attr("style","").removeAttr("style").removeClass(m.hidden),l.removeClass(m.animating).attr("style","").removeAttr("style")},is:{complete:function(){return x.filter("."+m.active)[0]==l[0]},animating:function(){return b.hasClass(m.animating)}},set:{defaultSide:function(){c=b.find("."+h.className.active),l=0<c.next(d.side).length?c.next(d.side):b.find(d.side).first(),C=!1,S.verbose("Active side set to",c),S.verbose("Next side set to",l)},duration:function(e){e="number"==typeof(e=e||h.duration)?e+"ms":e,S.verbose("Setting animation duration",e),!h.duration&&0!==h.duration||w.add(x).css({"-webkit-transition-duration":e,"-moz-transition-duration":e,"-ms-transition-duration":e,"-o-transition-duration":e,"transition-duration":e})},currentStageSize:function(){var e=(t=b.find("."+h.className.active)).outerWidth(!0),t=t.outerHeight(!0);b.css({width:e,height:t})},stageSize:function(){var e=b.clone().addClass(m.loading),t=e.find("."+h.className.active),n=C?e.find(d.side).eq(C):0<t.next(d.side).length?t.next(d.side):e.find(d.side).first(),r="next"==h.width?n.outerWidth(!0):"initial"==h.width?b.width():h.width,i="next"==h.height?n.outerHeight(!0):"initial"==h.height?b.height():h.height;t.removeClass(m.active),n.addClass(m.active),e.insertAfter(b),e.remove(),"auto"!=h.width&&(b.css("width",r+h.jitter),S.verbose("Specifying width during animation",r)),"auto"!=h.height&&(b.css("height",i+h.jitter),S.verbose("Specifying height during animation",i))},nextSide:function(e){C=e,l=x.filter(e),C=x.index(l),0===l.length&&(S.set.defaultSide(),S.error(p.side)),S.verbose("Next side manually set to",l)},active:function(){S.verbose("Setting new side to active",l),x.removeClass(m.active),l.addClass(m.active),h.onChange.call(l[0]),S.set.defaultSide()}},flip:{up:function(){var e;!S.is.complete()||S.is.animating()||h.allowRepeats?S.is.animating()?S.queue("flip up"):(S.debug("Flipping up",l),e=S.get.transform.up(),S.set.stageSize(),S.stage.above(),S.animate(e)):S.debug("Side already visible",l)},down:function(){var e;!S.is.complete()||S.is.animating()||h.allowRepeats?S.is.animating()?S.queue("flip down"):(S.debug("Flipping down",l),e=S.get.transform.down(),S.set.stageSize(),S.stage.below(),S.animate(e)):S.debug("Side already visible",l)},left:function(){var e;!S.is.complete()||S.is.animating()||h.allowRepeats?S.is.animating()?S.queue("flip left"):(S.debug("Flipping left",l),e=S.get.transform.left(),S.set.stageSize(),S.stage.left(),S.animate(e)):S.debug("Side already visible",l)},right:function(){var e;!S.is.complete()||S.is.animating()||h.allowRepeats?S.is.animating()?S.queue("flip right"):(S.debug("Flipping right",l),e=S.get.transform.right(),S.set.stageSize(),S.stage.right(),S.animate(e)):S.debug("Side already visible",l)},over:function(){!S.is.complete()||S.is.animating()||h.allowRepeats?S.is.animating()?S.queue("flip over"):(S.debug("Flipping over",l),S.set.stageSize(),S.stage.behind(),S.animate(S.get.transform.over())):S.debug("Side already visible",l)},back:function(){!S.is.complete()||S.is.animating()||h.allowRepeats?S.is.animating()?S.queue("flip back"):(S.debug("Flipping back",l),S.set.stageSize(),S.stage.behind(),S.animate(S.get.transform.back())):S.debug("Side already visible",l)}},get:{transform:{up:function(){return{transform:"translateY("+-(c.outerHeight(!0)-l.outerHeight(!0))/2+"px) translateZ("+-c.outerHeight(!0)/2+"px) rotateX(-90deg)"}},down:function(){return{transform:"translateY("+-(c.outerHeight(!0)-l.outerHeight(!0))/2+"px) translateZ("+-c.outerHeight(!0)/2+"px) rotateX(90deg)"}},left:function(){return{transform:"translateX("+-(c.outerWidth(!0)-l.outerWidth(!0))/2+"px) translateZ("+-c.outerWidth(!0)/2+"px) rotateY(90deg)"}},right:function(){return{transform:"translateX("+-(c.outerWidth(!0)-l.outerWidth(!0))/2+"px) translateZ("+-c.outerWidth(!0)/2+"px) rotateY(-90deg)"}},over:function(){return{transform:"translateX("+-(c.outerWidth(!0)-l.outerWidth(!0))/2+"px) rotateY(180deg)"}},back:function(){return{transform:"translateX("+-(c.outerWidth(!0)-l.outerWidth(!0))/2+"px) rotateY(-180deg)"}}},transitionEvent:function(){var e,t=y.createElement("element"),n={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in n)if(void 0!==t.style[e])return n[e]},nextSide:function(){return 0<c.next(d.side).length?c.next(d.side):b.find(d.side).first()}},stage:{above:function(){var e={origin:(c.outerHeight(!0)-l.outerHeight(!0))/2,depth:{active:l.outerHeight(!0)/2,next:c.outerHeight(!0)/2}};S.verbose("Setting the initial animation position as above",l,e),w.css({transform:"translateZ(-"+e.depth.active+"px)"}),c.css({transform:"rotateY(0deg) translateZ("+e.depth.active+"px)"}),l.addClass(m.animating).css({top:e.origin+"px",transform:"rotateX(90deg) translateZ("+e.depth.next+"px)"})},below:function(){var e={origin:(c.outerHeight(!0)-l.outerHeight(!0))/2,depth:{active:l.outerHeight(!0)/2,next:c.outerHeight(!0)/2}};S.verbose("Setting the initial animation position as below",l,e),w.css({transform:"translateZ(-"+e.depth.active+"px)"}),c.css({transform:"rotateY(0deg) translateZ("+e.depth.active+"px)"}),l.addClass(m.animating).css({top:e.origin+"px",transform:"rotateX(-90deg) translateZ("+e.depth.next+"px)"})},left:function(){var e=c.outerWidth(!0),t={origin:(e-(t=l.outerWidth(!0)))/2,depth:{active:t/2,next:e/2}};S.verbose("Setting the initial animation position as left",l,t),w.css({transform:"translateZ(-"+t.depth.active+"px)"}),c.css({transform:"rotateY(0deg) translateZ("+t.depth.active+"px)"}),l.addClass(m.animating).css({left:t.origin+"px",transform:"rotateY(-90deg) translateZ("+t.depth.next+"px)"})},right:function(){var e=c.outerWidth(!0),t={origin:(e-(t=l.outerWidth(!0)))/2,depth:{active:t/2,next:e/2}};S.verbose("Setting the initial animation position as left",l,t),w.css({transform:"translateZ(-"+t.depth.active+"px)"}),c.css({transform:"rotateY(0deg) translateZ("+t.depth.active+"px)"}),l.addClass(m.animating).css({left:t.origin+"px",transform:"rotateY(90deg) translateZ("+t.depth.next+"px)"})},behind:function(){var e=c.outerWidth(!0),t={origin:(e-(t=l.outerWidth(!0)))/2,depth:{active:t/2,next:e/2}};S.verbose("Setting the initial animation position as behind",l,t),c.css({transform:"rotateY(0deg)"}),l.addClass(m.animating).css({left:t.origin+"px",transform:"rotateY(-180deg)"})}},setting:function(e,t){if(S.debug("Changing setting",e,t),v.isPlainObject(e))v.extend(!0,h,e);else{if(void 0===t)return h[e];v.isPlainObject(h[e])?v.extend(!0,h[e],t):h[e]=t}},internal:function(e,t){if(v.isPlainObject(e))v.extend(!0,S,e);else{if(void 0===t)return S[e];S[e]=t}},debug:function(){!h.silent&&h.debug&&(h.performance?S.performance.log(arguments):(S.debug=Function.prototype.bind.call(console.info,console,h.name+":"),S.debug.apply(console,arguments)))},verbose:function(){!h.silent&&h.verbose&&h.debug&&(h.performance?S.performance.log(arguments):(S.verbose=Function.prototype.bind.call(console.info,console,h.name+":"),S.verbose.apply(console,arguments)))},error:function(){h.silent||(S.error=Function.prototype.bind.call(console.error,console,h.name+":"),S.error.apply(console,arguments))},performance:{log:function(e){var t,n;h.performance&&(n=(t=(new Date).getTime())-(r||t),r=t,i.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:k,"Execution Time":n})),clearTimeout(S.performance.timer),S.performance.timer=setTimeout(S.performance.display,500)},display:function(){h.name,r=!1,clearTimeout(S.performance.timer),v.each(i,(function(e,t){t["Execution Time"]})),1<n.length&&n.length,(void 0!==console.group||void 0!==console.table)&&0<i.length&&!console.table&&v.each(i,(function(e,t){t.Name,t["Execution Time"]})),i=[]}},invoke:function(e,n,r){var i,o,a,u=E;return n=n||s,r=k||r,"string"==typeof e&&void 0!==u&&(e=e.split(/[\. ]/),i=e.length-1,v.each(e,(function(t,n){var r=t!=i?n+e[t+1].charAt(0).toUpperCase()+e[t+1].slice(1):e;if(!v.isPlainObject(u[r])||t==i)return void 0!==u[r]?(o=u[r],!1):v.isPlainObject(u[n])&&t!=i?void(u=u[n]):void 0!==u[n]&&(o=u[n],!1);u=u[r]}))),v.isFunction(o)?a=o.apply(r,n):void 0!==o&&(a=o),v.isArray(t)?t.push(a):void 0!==t?t=[t,a]:void 0!==a&&(t=a),o}};a?(void 0===E&&S.initialize(),S.invoke(o)):(void 0!==E&&E.invoke("destroy"),S.initialize())})),void 0!==t?t:this},v.fn.shape.settings={name:"Shape",silent:!1,debug:!1,verbose:!1,jitter:0,performance:!0,namespace:"shape",width:"initial",height:"initial",beforeChange:function(){},onChange:function(){},allowRepeats:!1,duration:!1,error:{side:"You tried to switch to a side that does not exist.",method:"The method you called is not defined"},className:{animating:"animating",hidden:"hidden",loading:"loading",active:"active"},selector:{sides:".sides",side:".side"}},m=ee(),g=window,A=document,g=void 0!==g&&g.Math==Math?g:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),m.fn.sidebar=function(e){var t,n=m(this),r=m(g),i=m(A),o=m("html"),a=m("head"),s=(n.selector,(new Date).getTime()),u=[],c=e,l="string"==typeof c,h=[].slice.call(arguments,1),f=g.requestAnimationFrame||g.mozRequestAnimationFrame||g.webkitRequestAnimationFrame||g.msRequestAnimationFrame||function(e){setTimeout(e,0)};return n.each((function(){var n,d,p,v,b,y=m.isPlainObject(e)?m.extend(!0,{},m.fn.sidebar.settings,e):m.extend({},m.fn.sidebar.settings),w=y.selector,x=y.className,C=y.namespace,k=y.regExp,E=y.error,S="."+C,_="module-"+C,O=m(this),T=m(y.context),D=O.children(w.sidebar),B=(T.children(w.fixed),T.children(w.pusher)),I=this,M=O.data(_),j={initialize:function(){j.debug("Initializing sidebar",e),j.create.id(),b=j.get.transitionEvent(),y.delaySetup?f(j.setup.layout):j.setup.layout(),f((function(){j.setup.cache()})),j.instantiate()},instantiate:function(){j.verbose("Storing instance of module",j),M=j,O.data(_,j)},create:{id:function(){p=(Math.random().toString(16)+"000000000").substr(2,8),d="."+p,j.verbose("Creating unique id for element",p)}},destroy:function(){j.verbose("Destroying previous module for",O),O.off(S).removeData(_),j.is.ios()&&j.remove.ios(),T.off(d),r.off(d),i.off(d)},event:{clickaway:function(e){var t=0<B.find(e.target).length||B.is(e.target);e=T.is(e.target);t&&(j.verbose("User clicked on dimmed page"),j.hide()),e&&(j.verbose("User clicked on dimmable context (scaled out page)"),j.hide())},touch:function(e){},containScroll:function(e){I.scrollTop<=0&&(I.scrollTop=1),I.scrollTop+I.offsetHeight>=I.scrollHeight&&(I.scrollTop=I.scrollHeight-I.offsetHeight-1)},scroll:function(e){0===m(e.target).closest(w.sidebar).length&&e.preventDefault()}},bind:{clickaway:function(){j.verbose("Adding clickaway events to context",T),y.closable&&T.on("click"+d,j.event.clickaway).on("touchend"+d,j.event.clickaway)},scrollLock:function(){y.scrollLock&&(j.debug("Disabling page scroll"),r.on("DOMMouseScroll"+d,j.event.scroll)),j.verbose("Adding events to contain sidebar scroll"),i.on("touchmove"+d,j.event.touch),O.on("scroll"+S,j.event.containScroll)}},unbind:{clickaway:function(){j.verbose("Removing clickaway events from context",T),T.off(d)},scrollLock:function(){j.verbose("Removing scroll lock from page"),i.off(d),r.off(d),O.off("scroll"+S)}},add:{inlineCSS:function(){var e=j.cache.width||O.outerWidth(),t=j.cache.height||O.outerHeight(),r=j.is.rtl(),i=j.get.direction();t={left:e,right:-e,top:t,bottom:-t};r&&(j.verbose("RTL detected, flipping widths"),t.left=-e,t.right=e),r="<style>","left"===i||"right"===i?(j.debug("Adding CSS rules for animation distance",e),r+=" .ui.visible."+i+".sidebar ~ .fixed, .ui.visible."+i+".sidebar ~ .pusher {   -webkit-transform: translate3d("+t[i]+"px, 0, 0);           transform: translate3d("+t[i]+"px, 0, 0); }"):"top"!==i&&"bottom"!=i||(r+=" .ui.visible."+i+".sidebar ~ .fixed, .ui.visible."+i+".sidebar ~ .pusher {   -webkit-transform: translate3d(0, "+t[i]+"px, 0);           transform: translate3d(0, "+t[i]+"px, 0); }"),j.is.ie()&&("left"===i||"right"===i?(j.debug("Adding CSS rules for animation distance",e),r+=" body.pushable > .ui.visible."+i+".sidebar ~ .pusher:after {   -webkit-transform: translate3d("+t[i]+"px, 0, 0);           transform: translate3d("+t[i]+"px, 0, 0); }"):"top"!==i&&"bottom"!=i||(r+=" body.pushable > .ui.visible."+i+".sidebar ~ .pusher:after {   -webkit-transform: translate3d(0, "+t[i]+"px, 0);           transform: translate3d(0, "+t[i]+"px, 0); }"),r+=" body.pushable > .ui.visible.left.sidebar ~ .ui.visible.right.sidebar ~ .pusher:after, body.pushable > .ui.visible.right.sidebar ~ .ui.visible.left.sidebar ~ .pusher:after {   -webkit-transform: translate3d(0px, 0, 0);           transform: translate3d(0px, 0, 0); }"),n=m(r+="</style>").appendTo(a),j.debug("Adding sizing css to head",n)}},refresh:function(){j.verbose("Refreshing selector cache"),T=m(y.context),D=T.children(w.sidebar),B=T.children(w.pusher),T.children(w.fixed),j.clear.cache()},refreshSidebars:function(){j.verbose("Refreshing other sidebars"),D=T.children(w.sidebar)},repaint:function(){j.verbose("Forcing repaint event"),I.style.display="none",I.offsetHeight,I.scrollTop=I.scrollTop,I.style.display=""},setup:{cache:function(){j.cache={width:O.outerWidth(),height:O.outerHeight(),rtl:"rtl"==O.css("direction")}},layout:function(){0===T.children(w.pusher).length&&(j.debug("Adding wrapper element for sidebar"),j.error(E.pusher),B=m('<div class="pusher" />'),T.children().not(w.omitted).not(D).wrapAll(B),j.refresh()),0!==O.nextAll(w.pusher).length&&O.nextAll(w.pusher)[0]===B[0]||(j.debug("Moved sidebar to correct parent element"),j.error(E.movedSidebar,I),O.detach().prependTo(T),j.refresh()),j.clear.cache(),j.set.pushable(),j.set.direction()}},attachEvents:function(e,t){var n=m(e);t=m.isFunction(j[t])?j[t]:j.toggle,0<n.length?(j.debug("Attaching sidebar events to element",e,t),n.on("click"+S,t)):j.error(E.notFound,e)},show:function(e){if(e=m.isFunction(e)?e:function(){},j.is.hidden()){if(j.refreshSidebars(),y.overlay&&(j.error(E.overlay),y.transition="overlay"),j.refresh(),j.othersActive())if(j.debug("Other sidebars currently visible"),y.exclusive){if("overlay"!=y.transition)return void j.hideOthers(j.show);j.hideOthers()}else y.transition="overlay";j.pushPage((function(){e.call(I),y.onShow.call(I)})),y.onChange.call(I),y.onVisible.call(I)}else j.debug("Sidebar is already visible")},hide:function(e){e=m.isFunction(e)?e:function(){},(j.is.visible()||j.is.animating())&&(j.debug("Hiding sidebar",e),j.refreshSidebars(),j.pullPage((function(){e.call(I),y.onHidden.call(I)})),y.onChange.call(I),y.onHide.call(I))},othersAnimating:function(){return 0<D.not(O).filter("."+x.animating).length},othersVisible:function(){return 0<D.not(O).filter("."+x.visible).length},othersActive:function(){return j.othersVisible()||j.othersAnimating()},hideOthers:function(e){var t=D.not(O).filter("."+x.visible),n=t.length,r=0;e=e||function(){},t.sidebar("hide",(function(){++r==n&&e()}))},toggle:function(){j.verbose("Determining toggled direction"),j.is.hidden()?j.show():j.hide()},pushPage:function(e){var t,n,r=j.get.transition(),i="overlay"===r||j.othersActive()?O:B;e=m.isFunction(e)?e:function(){},"scale down"==y.transition&&j.scrollToTop(),j.set.transition(r),j.repaint(),r=function(){j.bind.clickaway(),j.add.inlineCSS(),j.set.animating(),j.set.visible()},t=function(){j.set.dimmed()},n=function(t){t.target==i[0]&&(i.off(b+d,n),j.remove.animating(),j.bind.scrollLock(),e.call(I))},i.off(b+d),i.on(b+d,n),f(r),y.dimPage&&!j.othersVisible()&&f(t)},pullPage:function(e){var t,n,r=j.get.transition(),i="overlay"==r||j.othersActive()?O:B;e=m.isFunction(e)?e:function(){},j.verbose("Removing context push state",j.get.direction()),j.unbind.clickaway(),j.unbind.scrollLock(),t=function(){j.set.transition(r),j.set.animating(),j.remove.visible(),y.dimPage&&!j.othersVisible()&&B.removeClass(x.dimmed)},n=function(t){t.target==i[0]&&(i.off(b+d,n),j.remove.animating(),j.remove.transition(),j.remove.inlineCSS(),("scale down"==r||y.returnScroll&&j.is.mobile())&&j.scrollBack(),e.call(I))},i.off(b+d),i.on(b+d,n),f(t)},scrollToTop:function(){j.verbose("Scrolling to top of page to avoid animation issues"),v=m(g).scrollTop(),O.scrollTop(0),g.scrollTo(0,0)},scrollBack:function(){j.verbose("Scrolling back to original page position"),g.scrollTo(0,v)},clear:{cache:function(){j.verbose("Clearing cached dimensions"),j.cache={}}},set:{ios:function(){o.addClass(x.ios)},pushed:function(){T.addClass(x.pushed)},pushable:function(){T.addClass(x.pushable)},dimmed:function(){B.addClass(x.dimmed)},active:function(){O.addClass(x.active)},animating:function(){O.addClass(x.animating)},transition:function(e){e=e||j.get.transition(),O.addClass(e)},direction:function(e){e=e||j.get.direction(),O.addClass(x[e])},visible:function(){O.addClass(x.visible)},overlay:function(){O.addClass(x.overlay)}},remove:{inlineCSS:function(){j.debug("Removing inline css styles",n),n&&0<n.length&&n.remove()},ios:function(){o.removeClass(x.ios)},pushed:function(){T.removeClass(x.pushed)},pushable:function(){T.removeClass(x.pushable)},active:function(){O.removeClass(x.active)},animating:function(){O.removeClass(x.animating)},transition:function(e){e=e||j.get.transition(),O.removeClass(e)},direction:function(e){e=e||j.get.direction(),O.removeClass(x[e])},visible:function(){O.removeClass(x.visible)},overlay:function(){O.removeClass(x.overlay)}},get:{direction:function(){return O.hasClass(x.top)?x.top:O.hasClass(x.right)?x.right:O.hasClass(x.bottom)?x.bottom:x.left},transition:function(){var e=j.get.direction();e=j.is.mobile()?"auto"==y.mobileTransition?y.defaultTransition.mobile[e]:y.mobileTransition:"auto"==y.transition?y.defaultTransition.computer[e]:y.transition;return j.verbose("Determined transition",e),e},transitionEvent:function(){var e,t=A.createElement("element"),n={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in n)if(void 0!==t.style[e])return n[e]}},is:{ie:function(){return!g.ActiveXObject&&"ActiveXObject"in g||"ActiveXObject"in g},ios:function(){var e=navigator.userAgent,t=e.match(k.ios),n=e.match(k.mobileChrome);return!(!t||n||(j.verbose("Browser was found to be iOS",e),0))},mobile:function(){var e=navigator.userAgent;return e.match(k.mobile)?(j.verbose("Browser was found to be mobile",e),!0):(j.verbose("Browser is not mobile, using regular transition",e),!1)},hidden:function(){return!j.is.visible()},visible:function(){return O.hasClass(x.visible)},open:function(){return j.is.visible()},closed:function(){return j.is.hidden()},vertical:function(){return O.hasClass(x.top)},animating:function(){return T.hasClass(x.animating)},rtl:function(){return void 0===j.cache.rtl&&(j.cache.rtl="rtl"==O.css("direction")),j.cache.rtl}},setting:function(e,t){if(j.debug("Changing setting",e,t),m.isPlainObject(e))m.extend(!0,y,e);else{if(void 0===t)return y[e];m.isPlainObject(y[e])?m.extend(!0,y[e],t):y[e]=t}},internal:function(e,t){if(m.isPlainObject(e))m.extend(!0,j,e);else{if(void 0===t)return j[e];j[e]=t}},debug:function(){!y.silent&&y.debug&&(y.performance?j.performance.log(arguments):(j.debug=Function.prototype.bind.call(console.info,console,y.name+":"),j.debug.apply(console,arguments)))},verbose:function(){!y.silent&&y.verbose&&y.debug&&(y.performance?j.performance.log(arguments):(j.verbose=Function.prototype.bind.call(console.info,console,y.name+":"),j.verbose.apply(console,arguments)))},error:function(){y.silent||(j.error=Function.prototype.bind.call(console.error,console,y.name+":"),j.error.apply(console,arguments))},performance:{log:function(e){var t,n;y.performance&&(n=(t=(new Date).getTime())-(s||t),s=t,u.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:I,"Execution Time":n})),clearTimeout(j.performance.timer),j.performance.timer=setTimeout(j.performance.display,500)},display:function(){y.name,s=!1,clearTimeout(j.performance.timer),m.each(u,(function(e,t){t["Execution Time"]})),(void 0!==console.group||void 0!==console.table)&&0<u.length&&!console.table&&m.each(u,(function(e,t){t.Name,t["Execution Time"]})),u=[]}},invoke:function(e,n,r){var i,o,a,s=M;return n=n||h,r=I||r,"string"==typeof e&&void 0!==s&&(e=e.split(/[\. ]/),i=e.length-1,m.each(e,(function(t,n){var r=t!=i?n+e[t+1].charAt(0).toUpperCase()+e[t+1].slice(1):e;if(!m.isPlainObject(s[r])||t==i)return void 0!==s[r]?(o=s[r],!1):m.isPlainObject(s[n])&&t!=i?void(s=s[n]):(void 0!==s[n]?o=s[n]:j.error(E.method,e),!1);s=s[r]}))),m.isFunction(o)?a=o.apply(r,n):void 0!==o&&(a=o),m.isArray(t)?t.push(a):void 0!==t?t=[t,a]:void 0!==a&&(t=a),o}};l?(void 0===M&&j.initialize(),j.invoke(c)):(void 0!==M&&j.invoke("destroy"),j.initialize())})),void 0!==t?t:this},m.fn.sidebar.settings={name:"Sidebar",namespace:"sidebar",silent:!1,debug:!1,verbose:!1,performance:!0,transition:"auto",mobileTransition:"auto",defaultTransition:{computer:{left:"uncover",right:"uncover",top:"overlay",bottom:"overlay"},mobile:{left:"uncover",right:"uncover",top:"overlay",bottom:"overlay"}},context:"body",exclusive:!1,closable:!0,dimPage:!0,scrollLock:!1,returnScroll:!1,delaySetup:!1,duration:500,onChange:function(){},onShow:function(){},onHide:function(){},onHidden:function(){},onVisible:function(){},className:{active:"active",animating:"animating",dimmed:"dimmed",ios:"ios",pushable:"pushable",pushed:"pushed",right:"right",top:"top",left:"left",bottom:"bottom",visible:"visible"},selector:{fixed:".fixed",omitted:"script, link, style, .ui.modal, .ui.dimmer, .ui.nag, .ui.fixed",pusher:".pusher",sidebar:".ui.sidebar"},regExp:{ios:/(iPad|iPhone|iPod)/g,mobileChrome:/(CriOS)/g,mobile:/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/g},error:{method:"The method you called is not defined.",pusher:"Had to add pusher element. For optimal performance make sure body content is inside a pusher element",movedSidebar:"Had to move sidebar. For optimal performance make sure sidebar and pusher are direct children of your body tag",overlay:"The overlay setting is no longer supported, use animation: overlay",notFound:"There were no elements that matched the specified selector"}},f=ee(),d=window,p=document,d=void 0!==d&&d.Math==Math?d:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),f.fn.sticky=function(e){var t,n=f(this),r=(n.selector,(new Date).getTime()),i=[],o=e,a="string"==typeof o,s=[].slice.call(arguments,1);return n.each((function(){var n,u,c,l,h=f.isPlainObject(e)?f.extend(!0,{},f.fn.sticky.settings,e):f.extend({},f.fn.sticky.settings),m=h.className,g=h.namespace,A=h.error,v="."+g,b="module-"+g,y=f(this),w=f(d),x=f(h.scrollContext),C=(y.selector,y.data(b)),k=d.requestAnimationFrame||d.mozRequestAnimationFrame||d.webkitRequestAnimationFrame||d.msRequestAnimationFrame||function(e){setTimeout(e,0)},E=this,S={initialize:function(){S.determineContainer(),S.determineContext(),S.verbose("Initializing sticky",h,n),S.save.positions(),S.checkErrors(),S.bind.events(),h.observeChanges&&S.observeChanges(),S.instantiate()},instantiate:function(){S.verbose("Storing instance of module",S),C=S,y.data(b,S)},destroy:function(){S.verbose("Destroying previous instance"),S.reset(),c&&c.disconnect(),l&&l.disconnect(),w.off("load"+v,S.event.load).off("resize"+v,S.event.resize),x.off("scrollchange"+v,S.event.scrollchange),y.removeData(b)},observeChanges:function(){"MutationObserver"in d&&(c=new MutationObserver(S.event.documentChanged),l=new MutationObserver(S.event.changed),c.observe(p,{childList:!0,subtree:!0}),l.observe(E,{childList:!0,subtree:!0}),l.observe(u[0],{childList:!0,subtree:!0}),S.debug("Setting up mutation observer",l))},determineContainer:function(){n=h.container?f(h.container):y.offsetParent()},determineContext:function(){0===(u=h.context?f(h.context):n).length&&S.error(A.invalidContext,h.context,y)},checkErrors:function(){S.is.hidden()&&S.error(A.visible,y),S.cache.element.height>S.cache.context.height&&(S.reset(),S.error(A.elementSize,y))},bind:{events:function(){w.on("load"+v,S.event.load).on("resize"+v,S.event.resize),x.off("scroll"+v).on("scroll"+v,S.event.scroll).on("scrollchange"+v,S.event.scrollchange)}},event:{changed:function(e){clearTimeout(S.timer),S.timer=setTimeout((function(){S.verbose("DOM tree modified, updating sticky menu",e),S.refresh()}),100)},documentChanged:function(e){[].forEach.call(e,(function(e){e.removedNodes&&[].forEach.call(e.removedNodes,(function(e){(e==E||0<f(e).find(E).length)&&(S.debug("Element removed from DOM, tearing down events"),S.destroy())}))}))},load:function(){S.verbose("Page contents finished loading"),k(S.refresh)},resize:function(){S.verbose("Window resized"),k(S.refresh)},scroll:function(){k((function(){x.triggerHandler("scrollchange"+v,x.scrollTop())}))},scrollchange:function(e,t){S.stick(t),h.onScroll.call(E)}},refresh:function(e){S.reset(),h.context||S.determineContext(),e&&S.determineContainer(),S.save.positions(),S.stick(),h.onReposition.call(E)},supports:{sticky:function(){var e=f("<div/>");return e[0],e.addClass(m.supported),e.css("position").match("sticky")}},save:{lastScroll:function(e){S.lastScroll=e},elementScroll:function(e){S.elementScroll=e},positions:function(){var e={height:x.height()},t={margin:{top:parseInt(y.css("margin-top"),10),bottom:parseInt(y.css("margin-bottom"),10)},offset:y.offset(),width:y.outerWidth(),height:y.outerHeight()},r={offset:u.offset(),height:u.outerHeight()};n.outerHeight(),S.is.standardScroll()||(S.debug("Non-standard scroll. Removing scroll offset from element offset"),e.top=x.scrollTop(),e.left=x.scrollLeft(),t.offset.top+=e.top,r.offset.top+=e.top,t.offset.left+=e.left,r.offset.left+=e.left),S.cache={fits:t.height+h.offset<=e.height,sameHeight:t.height==r.height,scrollContext:{height:e.height},element:{margin:t.margin,top:t.offset.top-t.margin.top,left:t.offset.left,width:t.width,height:t.height,bottom:t.offset.top+t.height},context:{top:r.offset.top,height:r.height,bottom:r.offset.top+r.height}},S.set.containerSize(),S.stick(),S.debug("Caching element positions",S.cache)}},get:{direction:function(e){var t="down";return e=e||x.scrollTop(),void 0!==S.lastScroll&&(S.lastScroll<e?t="down":S.lastScroll>e&&(t="up")),t},scrollChange:function(e){return e=e||x.scrollTop(),S.lastScroll?e-S.lastScroll:0},currentElementScroll:function(){return S.elementScroll||(S.is.top()?Math.abs(parseInt(y.css("top"),10))||0:Math.abs(parseInt(y.css("bottom"),10))||0)},elementScroll:function(e){e=e||x.scrollTop();var t=S.cache.element,n=S.cache.scrollContext;e=S.get.scrollChange(e),t=t.height-n.height+h.offset,n=(n=S.get.currentElementScroll())+e;return S.cache.fits||n<0?0:t<n?t:n}},remove:{lastScroll:function(){delete S.lastScroll},elementScroll:function(e){delete S.elementScroll},minimumSize:function(){n.css("min-height","")},offset:function(){y.css("margin-top","")}},set:{offset:function(){S.verbose("Setting offset on element",h.offset),y.css("margin-top",h.offset)},containerSize:function(){var e=n.get(0).tagName;"HTML"===e||"body"==e?S.determineContainer():((e=Math.max(S.cache.context.height,S.cache.element.height))-n.outerHeight()>h.jitter?(S.debug("Context is taller than container. Specifying exact height for container",S.cache.context.height),n.css({height:e})):n.css({height:""}),Math.abs(n.outerHeight()-S.cache.context.height)>h.jitter&&(S.debug("Context has padding, specifying exact height for container",S.cache.context.height),n.css({height:S.cache.context.height})))},minimumSize:function(){var e=S.cache.element;n.css("min-height",e.height)},scroll:function(e){S.debug("Setting scroll on element",e),S.elementScroll!=e&&(S.is.top()&&y.css("bottom","").css("top",-e),S.is.bottom()&&y.css("top","").css("bottom",e))},size:function(){0!==S.cache.element.height&&0!==S.cache.element.width&&(E.style.setProperty("width",S.cache.element.width+"px","important"),E.style.setProperty("height",S.cache.element.height+"px","important"))}},is:{standardScroll:function(){return x[0]==d},top:function(){return y.hasClass(m.top)},bottom:function(){return y.hasClass(m.bottom)},initialPosition:function(){return!S.is.fixed()&&!S.is.bound()},hidden:function(){return!y.is(":visible")},bound:function(){return y.hasClass(m.bound)},fixed:function(){return y.hasClass(m.fixed)}},stick:function(e){var t=e||x.scrollTop(),n=(a=S.cache).fits,r=a.sameHeight,i=a.element,o=a.scrollContext,a=a.context,s=(t=(e={top:t+(s=S.is.bottom()&&h.pushing?h.bottomOffset:h.offset),bottom:t+s+o.height},S.get.direction(e.top),n?0:S.get.elementScroll(e.top)),!n);0===i.height||r||(S.is.initialPosition()?e.top>=a.bottom?(S.debug("Initial element position is bottom of container"),S.bindBottom()):e.top>i.top&&(i.height+e.top-t>=a.bottom&&i.height<a.height?(S.debug("Initial element position is bottom of container"),S.bindBottom()):(S.debug("Initial element position is fixed"),S.fixTop())):S.is.fixed()?S.is.top()?e.top<=i.top?(S.debug("Fixed element reached top of container"),S.setInitialPosition()):i.height+e.top-t>=a.bottom?(S.debug("Fixed element reached bottom of container"),S.bindBottom()):s&&(S.set.scroll(t),S.save.lastScroll(e.top),S.save.elementScroll(t)):S.is.bottom()&&(e.bottom-i.height<=i.top?(S.debug("Bottom fixed rail has reached top of container"),S.setInitialPosition()):e.bottom>=a.bottom?(S.debug("Bottom fixed rail has reached bottom of container"),S.bindBottom()):s&&(S.set.scroll(t),S.save.lastScroll(e.top),S.save.elementScroll(t))):S.is.bottom()&&(e.top<=i.top?(S.debug("Jumped from bottom fixed to top fixed, most likely used home/end button"),S.setInitialPosition()):h.pushing?S.is.bound()&&e.bottom<=a.bottom&&(S.debug("Fixing bottom attached element to bottom of browser."),S.fixBottom()):S.is.bound()&&e.top<=a.bottom-i.height&&(S.debug("Fixing bottom attached element to top of browser."),S.fixTop())))},bindTop:function(){S.debug("Binding element to top of parent container"),S.remove.offset(),h.setSize&&S.set.size(),y.css({left:"",top:"",marginBottom:""}).removeClass(m.fixed).removeClass(m.bottom).addClass(m.bound).addClass(m.top),h.onTop.call(E),h.onUnstick.call(E)},bindBottom:function(){S.debug("Binding element to bottom of parent container"),S.remove.offset(),h.setSize&&S.set.size(),y.css({left:"",top:""}).removeClass(m.fixed).removeClass(m.top).addClass(m.bound).addClass(m.bottom),h.onBottom.call(E),h.onUnstick.call(E)},setInitialPosition:function(){S.debug("Returning to initial position"),S.unfix(),S.unbind()},fixTop:function(){S.debug("Fixing element to top of page"),h.setSize&&S.set.size(),S.set.minimumSize(),S.set.offset(),y.css({left:S.cache.element.left,bottom:"",marginBottom:""}).removeClass(m.bound).removeClass(m.bottom).addClass(m.fixed).addClass(m.top),h.onStick.call(E)},fixBottom:function(){S.debug("Sticking element to bottom of page"),h.setSize&&S.set.size(),S.set.minimumSize(),S.set.offset(),y.css({left:S.cache.element.left,bottom:"",marginBottom:""}).removeClass(m.bound).removeClass(m.top).addClass(m.fixed).addClass(m.bottom),h.onStick.call(E)},unbind:function(){S.is.bound()&&(S.debug("Removing container bound position on element"),S.remove.offset(),y.removeClass(m.bound).removeClass(m.top).removeClass(m.bottom))},unfix:function(){S.is.fixed()&&(S.debug("Removing fixed position on element"),S.remove.minimumSize(),S.remove.offset(),y.removeClass(m.fixed).removeClass(m.top).removeClass(m.bottom),h.onUnstick.call(E))},reset:function(){S.debug("Resetting elements position"),S.unbind(),S.unfix(),S.resetCSS(),S.remove.offset(),S.remove.lastScroll()},resetCSS:function(){y.css({width:"",height:""}),n.css({height:""})},setting:function(e,t){if(f.isPlainObject(e))f.extend(!0,h,e);else{if(void 0===t)return h[e];h[e]=t}},internal:function(e,t){if(f.isPlainObject(e))f.extend(!0,S,e);else{if(void 0===t)return S[e];S[e]=t}},debug:function(){!h.silent&&h.debug&&(h.performance?S.performance.log(arguments):(S.debug=Function.prototype.bind.call(console.info,console,h.name+":"),S.debug.apply(console,arguments)))},verbose:function(){!h.silent&&h.verbose&&h.debug&&(h.performance?S.performance.log(arguments):(S.verbose=Function.prototype.bind.call(console.info,console,h.name+":"),S.verbose.apply(console,arguments)))},error:function(){h.silent||(S.error=Function.prototype.bind.call(console.error,console,h.name+":"),S.error.apply(console,arguments))},performance:{log:function(e){var t,n;h.performance&&(n=(t=(new Date).getTime())-(r||t),r=t,i.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:E,"Execution Time":n})),clearTimeout(S.performance.timer),S.performance.timer=setTimeout(S.performance.display,0)},display:function(){h.name,r=!1,clearTimeout(S.performance.timer),f.each(i,(function(e,t){t["Execution Time"]})),(void 0!==console.group||void 0!==console.table)&&0<i.length&&!console.table&&f.each(i,(function(e,t){t.Name,t["Execution Time"]})),i=[]}},invoke:function(e,n,r){var i,o,a,u=C;return n=n||s,r=E||r,"string"==typeof e&&void 0!==u&&(e=e.split(/[\. ]/),i=e.length-1,f.each(e,(function(t,n){var r=t!=i?n+e[t+1].charAt(0).toUpperCase()+e[t+1].slice(1):e;if(!f.isPlainObject(u[r])||t==i)return void 0!==u[r]?(o=u[r],!1):f.isPlainObject(u[n])&&t!=i?void(u=u[n]):void 0!==u[n]&&(o=u[n],!1);u=u[r]}))),f.isFunction(o)?a=o.apply(r,n):void 0!==o&&(a=o),f.isArray(t)?t.push(a):void 0!==t?t=[t,a]:void 0!==a&&(t=a),o}};a?(void 0===C&&S.initialize(),S.invoke(o)):(void 0!==C&&C.invoke("destroy"),S.initialize())})),void 0!==t?t:this},f.fn.sticky.settings={name:"Sticky",namespace:"sticky",silent:!1,debug:!1,verbose:!0,performance:!0,pushing:!1,context:!1,container:!1,scrollContext:d,offset:0,bottomOffset:0,jitter:5,setSize:!0,observeChanges:!1,onReposition:function(){},onScroll:function(){},onStick:function(){},onUnstick:function(){},onTop:function(){},onBottom:function(){},error:{container:"Sticky element must be inside a relative container",visible:"Element is hidden, you must call refresh after element becomes visible. Use silent setting to surpress this warning in production.",method:"The method you called is not defined.",invalidContext:"Context specified does not exist",elementSize:"Sticky element is larger than its container, cannot create sticky."},className:{bound:"bound",fixed:"fixed",supported:"native",top:"top",bottom:"bottom"}},c=ee(),l=window,h=document,l=void 0!==l&&l.Math==Math?l:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),c.fn.tab=function(e){var t,n=c.isFunction(this)?c(l):c(this),r=(n.selector,(new Date).getTime()),i=[],o=e,a="string"==typeof o,s=[].slice.call(arguments,1),u=!1;return n.each((function(){var f,d,p,m,g,A=c.isPlainObject(e)?c.extend(!0,{},c.fn.tab.settings,e):c.extend({},c.fn.tab.settings),v=A.className,b=A.metadata,y=A.selector,w=A.error,x="."+A.namespace,C="module-"+A.namespace,k=c(this),E={},S=!0,_=0,O=this,T=k.data(C),D={initialize:function(){D.debug("Initializing tab menu item",k),D.fix.callbacks(),D.determineTabs(),D.debug("Determining tabs",A.context,d),A.auto&&D.set.auto(),D.bind.events(),A.history&&!u&&(D.initializeHistory(),u=!0),D.instantiate()},instantiate:function(){D.verbose("Storing instance of module",D),T=D,k.data(C,D)},destroy:function(){D.debug("Destroying tabs",k),k.removeData(C).off(x)},bind:{events:function(){c.isWindow(O)||(D.debug("Attaching tab activation events to element",k),k.on("click"+x,D.event.click))}},determineTabs:function(){var e;"parent"===A.context?(0<k.closest(y.ui).length?(e=k.closest(y.ui),D.verbose("Using closest UI element as parent",e)):e=k,f=e.parent(),D.verbose("Determined parent element for creating context",f)):A.context?(f=c(A.context),D.verbose("Using selector for tab context",A.context,f)):f=c("body"),A.childrenOnly?(d=f.children(y.tabs),D.debug("Searching tab context children for tabs",f,d)):(d=f.find(y.tabs),D.debug("Searching tab context for tabs",f,d))},fix:{callbacks:function(){c.isPlainObject(e)&&(e.onTabLoad||e.onTabInit)&&(e.onTabLoad&&(e.onLoad=e.onTabLoad,delete e.onTabLoad,D.error(w.legacyLoad,e.onLoad)),e.onTabInit&&(e.onFirstLoad=e.onTabInit,delete e.onTabInit,D.error(w.legacyInit,e.onFirstLoad)),A=c.extend(!0,{},c.fn.tab.settings,e))}},initializeHistory:function(){if(D.debug("Initializing page state"),void 0===c.address)return D.error(w.state),!1;if("state"==A.historyType){if(D.debug("Using HTML5 to manage state"),!1===A.path)return D.error(w.path),!1;c.address.history(!0).state(A.path)}c.address.bind("change",D.event.history.change)},event:{click:function(e){var t=c(this).data(b.tab);void 0!==t?(A.history?(D.verbose("Updating page state",e),c.address.value(t)):(D.verbose("Changing tab",e),D.changeTab(t)),e.preventDefault()):D.debug("No tab specified")},history:{change:function(e){var t=e.pathNames.join("/")||D.get.initialPath(),n=A.templates.determineTitle(t)||!1;D.performance.display(),D.debug("History change event",t,e),g=e,void 0!==t&&D.changeTab(t),n&&c.address.title(n)}}},refresh:function(){p&&(D.debug("Refreshing tab",p),D.changeTab(p))},cache:{read:function(e){return void 0!==e&&E[e]},add:function(e,t){e=e||p,D.debug("Adding cached content for",e),E[e]=t},remove:function(e){e=e||p,D.debug("Removing cached content for",e),delete E[e]}},set:{auto:function(){var e="string"==typeof A.path?A.path.replace(/\/$/,"")+"/{$tab}":"/{$tab}";D.verbose("Setting up automatic tab retrieval from server",e),c.isPlainObject(A.apiSettings)?A.apiSettings.url=e:A.apiSettings={url:e}},loading:function(e){var t=D.get.tabElement(e);t.hasClass(v.loading)||(D.verbose("Setting loading state for",t),t.addClass(v.loading).siblings(d).removeClass(v.active+" "+v.loading),0<t.length&&A.onRequest.call(t[0],e))},state:function(e){c.address.value(e)}},changeTab:function(e){var t=l.history&&l.history.pushState&&A.ignoreFirstLoad&&S,n=A.auto||c.isPlainObject(A.apiSettings),r=n&&!t?D.utilities.pathToArray(e):D.get.defaultPathArray(e);e=D.utilities.arrayToPath(r),c.each(r,(function(i,o){var a,s,u=r.slice(0,i+1),l=D.utilities.arrayToPath(u),h=D.is.tab(l),d=i+1==r.length,y=D.get.tabElement(l);return D.verbose("Looking for tab",o),h?(D.verbose("Tab was found",o),p=l,m=D.utilities.filterArray(r,u),d?s=!0:(h=r.slice(0,i+2),o=D.utilities.arrayToPath(h),(s=!D.is.tab(o))&&D.verbose("Tab parameters found",h)),s&&n?(t?(D.debug("Ignoring remote content on first tab load",l),S=!1,D.cache.add(e,y.html()),D.activate.all(l),A.onFirstLoad.call(y[0],l,m,g),A.onLoad.call(y[0],l,m,g)):(D.activate.navigation(l),D.fetch.content(l,e)),!1):(D.debug("Opened local tab",l),D.activate.all(l),D.cache.read(l)||(D.cache.add(l,!0),D.debug("First time tab loaded calling tab init"),A.onFirstLoad.call(y[0],l,m,g)),void A.onLoad.call(y[0],l,m,g))):-1!=e.search("/")||""===e?(D.error(w.missingTab,k,f,l),!1):(l=(a=c("#"+e+', a[name="'+e+'"]')).closest("[data-tab]").data(b.tab),y=D.get.tabElement(l),a&&0<a.length&&l?(D.debug("Anchor link used, opening parent tab",y,a),y.hasClass(v.active)||setTimeout((function(){D.scrollTo(a)}),0),D.activate.all(l),D.cache.read(l)||(D.cache.add(l,!0),D.debug("First time tab loaded calling tab init"),A.onFirstLoad.call(y[0],l,m,g)),A.onLoad.call(y[0],l,m,g),!1):void 0)}))},scrollTo:function(e){var t=!!(e&&0<e.length)&&e.offset().top;!1!==t&&(D.debug("Forcing scroll to an in-page link in a hidden tab",t,e),c(h).scrollTop(t))},update:{content:function(e,t,n){var r=D.get.tabElement(e),i=r[0];n=void 0!==n?n:A.evaluateScripts,"string"==typeof A.cacheType&&"dom"==A.cacheType.toLowerCase()&&"string"!=typeof t?r.empty().append(c(t).clone(!0)):n?(D.debug("Updating HTML and evaluating inline scripts",e,t),r.html(t)):(D.debug("Updating HTML",e,t),i.innerHTML=t)}},fetch:{content:function(e,t){var n,r=D.get.tabElement(e),i={dataType:"html",encodeParameters:!1,on:"now",cache:A.alwaysRefresh,headers:{"X-Remote":!0},onSuccess:function(n){"response"==A.cacheType&&D.cache.add(t,n),D.update.content(e,n),e==p?(D.debug("Content loaded",e),D.activate.tab(e)):D.debug("Content loaded in background",e),A.onFirstLoad.call(r[0],e,m,g),A.onLoad.call(r[0],e,m,g),A.loadOnce?D.cache.add(t,!0):"string"==typeof A.cacheType&&"dom"==A.cacheType.toLowerCase()&&0<r.children().length?setTimeout((function(){var e=(e=r.children().clone(!0)).not("script");D.cache.add(t,e)}),0):D.cache.add(t,r.html())},urlData:{tab:t}},o=(o=r.api("get request")||!1)&&"pending"===o.state();t=t||e,n=D.cache.read(t),A.cache&&n?(D.activate.tab(e),D.debug("Adding cached content",t),A.loadOnce||("once"==A.evaluateScripts?D.update.content(e,n,!1):D.update.content(e,n)),A.onLoad.call(r[0],e,m,g)):o?(D.set.loading(e),D.debug("Content is already loading",t)):void 0!==c.api?(n=c.extend(!0,{},A.apiSettings,i),D.debug("Retrieving remote content",t,n),D.set.loading(e),r.api(n)):D.error(w.api)}},activate:{all:function(e){D.activate.tab(e),D.activate.navigation(e)},tab:function(e){var t=D.get.tabElement(e),n="siblings"==A.deactivate?t.siblings(d):d.not(t),r=t.hasClass(v.active);D.verbose("Showing tab content for",t),r||(t.addClass(v.active),n.removeClass(v.active+" "+v.loading),0<t.length&&A.onVisible.call(t[0],e))},navigation:function(e){var t=D.get.navElement(e),r="siblings"==A.deactivate?t.siblings(n):n.not(t),i=t.hasClass(v.active);D.verbose("Activating tab navigation for",t,e),i||(t.addClass(v.active),r.removeClass(v.active+" "+v.loading))}},deactivate:{all:function(){D.deactivate.navigation(),D.deactivate.tabs()},navigation:function(){n.removeClass(v.active)},tabs:function(){d.removeClass(v.active+" "+v.loading)}},is:{tab:function(e){return void 0!==e&&0<D.get.tabElement(e).length}},get:{initialPath:function(){return n.eq(0).data(b.tab)||d.eq(0).data(b.tab)},path:function(){return c.address.value()},defaultPathArray:function(e){return D.utilities.pathToArray(D.get.defaultPath(e))},defaultPath:function(e){var t=n.filter("[data-"+b.tab+'^="'+e+'/"]').eq(0).data(b.tab)||!1;if(t){if(D.debug("Found default tab",t),_<A.maxDepth)return _++,D.get.defaultPath(t);D.error(w.recursion)}else D.debug("No default tabs found for",e,d);return _=0,e},navElement:function(e){return e=e||p,n.filter("[data-"+b.tab+'="'+e+'"]')},tabElement:function(e){var t;return e=e||p,t=D.utilities.pathToArray(e),t=D.utilities.last(t),e=d.filter("[data-"+b.tab+'="'+e+'"]'),t=d.filter("[data-"+b.tab+'="'+t+'"]'),0<e.length?e:t},tab:function(){return p}},utilities:{filterArray:function(e,t){return c.grep(e,(function(e){return-1==c.inArray(e,t)}))},last:function(e){return!!c.isArray(e)&&e[e.length-1]},pathToArray:function(e){return"string"==typeof(e=void 0===e?p:e)?e.split("/"):[e]},arrayToPath:function(e){return!!c.isArray(e)&&e.join("/")}},setting:function(e,t){if(D.debug("Changing setting",e,t),c.isPlainObject(e))c.extend(!0,A,e);else{if(void 0===t)return A[e];c.isPlainObject(A[e])?c.extend(!0,A[e],t):A[e]=t}},internal:function(e,t){if(c.isPlainObject(e))c.extend(!0,D,e);else{if(void 0===t)return D[e];D[e]=t}},debug:function(){!A.silent&&A.debug&&(A.performance?D.performance.log(arguments):(D.debug=Function.prototype.bind.call(console.info,console,A.name+":"),D.debug.apply(console,arguments)))},verbose:function(){!A.silent&&A.verbose&&A.debug&&(A.performance?D.performance.log(arguments):(D.verbose=Function.prototype.bind.call(console.info,console,A.name+":"),D.verbose.apply(console,arguments)))},error:function(){A.silent||(D.error=Function.prototype.bind.call(console.error,console,A.name+":"),D.error.apply(console,arguments))},performance:{log:function(e){var t,n;A.performance&&(n=(t=(new Date).getTime())-(r||t),r=t,i.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:O,"Execution Time":n})),clearTimeout(D.performance.timer),D.performance.timer=setTimeout(D.performance.display,500)},display:function(){A.name,r=!1,clearTimeout(D.performance.timer),c.each(i,(function(e,t){t["Execution Time"]})),(void 0!==console.group||void 0!==console.table)&&0<i.length&&!console.table&&c.each(i,(function(e,t){t.Name,t["Execution Time"]})),i=[]}},invoke:function(e,n,r){var i,o,a,u=T;return n=n||s,r=O||r,"string"==typeof e&&void 0!==u&&(e=e.split(/[\. ]/),i=e.length-1,c.each(e,(function(t,n){var r=t!=i?n+e[t+1].charAt(0).toUpperCase()+e[t+1].slice(1):e;if(!c.isPlainObject(u[r])||t==i)return void 0!==u[r]?(o=u[r],!1):c.isPlainObject(u[n])&&t!=i?void(u=u[n]):(void 0!==u[n]?o=u[n]:D.error(w.method,e),!1);u=u[r]}))),c.isFunction(o)?a=o.apply(r,n):void 0!==o&&(a=o),c.isArray(t)?t.push(a):void 0!==t?t=[t,a]:void 0!==a&&(t=a),o}};a?(void 0===T&&D.initialize(),D.invoke(o)):(void 0!==T&&T.invoke("destroy"),D.initialize())})),void 0!==t?t:this},c.tab=function(){c(l).tab.apply(this,arguments)},c.fn.tab.settings={name:"Tab",namespace:"tab",silent:!1,debug:!1,verbose:!1,performance:!0,auto:!1,history:!1,historyType:"hash",path:!1,context:!1,childrenOnly:!1,maxDepth:25,deactivate:"siblings",alwaysRefresh:!1,cache:!0,loadOnce:!1,cacheType:"response",ignoreFirstLoad:!1,apiSettings:!1,evaluateScripts:"once",onFirstLoad:function(e,t,n){},onLoad:function(e,t,n){},onVisible:function(e,t,n){},onRequest:function(e,t,n){},templates:{determineTitle:function(e){}},error:{api:"You attempted to load content without API module",method:"The method you called is not defined",missingTab:"Activated tab cannot be found. Tabs are case-sensitive.",noContent:"The tab you specified is missing a content url.",path:"History enabled, but no path was specified",recursion:"Max recursive depth reached",legacyInit:"onTabInit has been renamed to onFirstLoad in 2.0, please adjust your code.",legacyLoad:"onTabLoad has been renamed to onLoad in 2.0. Please adjust your code",state:"History requires Asual's Address library <https://github.com/asual/jquery-address>"},metadata:{tab:"tab",loaded:"loaded",promise:"promise"},className:{loading:"loading",active:"active"},selector:{tabs:".ui.tab",ui:".ui"}},a=ee(),s=window,u=document,s=void 0!==s&&s.Math==Math?s:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),a.fn.transition=function(){var e,t=a(this),n=(t.selector,(new Date).getTime()),r=[],i=arguments,o=i[0],c=[].slice.call(arguments,1),l="string"==typeof o;return s.requestAnimationFrame||s.mozRequestAnimationFrame||s.webkitRequestAnimationFrame||s.msRequestAnimationFrame,t.each((function(s){var h,f,d,p,m,g,A,v,b,y=a(this),w=this;(b={initialize:function(){h=b.get.settings.apply(w,i),p=h.className,d=h.error,m=h.metadata,v="."+h.namespace,A="module-"+h.namespace,f=y.data(A)||b,g=b.get.animationEndEvent(),!1===(l=l&&b.invoke(o))&&(b.verbose("Converted arguments into settings object",h),h.interval?b.delay(h.animate):b.animate(),b.instantiate())},instantiate:function(){b.verbose("Storing instance of module",b),f=b,y.data(A,f)},destroy:function(){b.verbose("Destroying previous module for",w),y.removeData(A)},refresh:function(){b.verbose("Refreshing display type on next animation"),delete b.displayType},forceRepaint:function(){b.verbose("Forcing element repaint");var e=y.parent(),t=y.next();0===t.length?y.detach().appendTo(e):y.detach().insertBefore(t)},repaint:function(){b.verbose("Repainting element"),w.offsetWidth},delay:function(e){var n=(n=b.get.animationDirection())||(b.can.transition()?b.get.direction():"static");e=void 0!==e?e:h.interval,e="auto"==h.reverse&&n==p.outward||1==h.reverse?(t.length-s)*h.interval:s*h.interval,b.debug("Delaying animation by",e),setTimeout(b.animate,e)},animate:function(e){if(h=e||h,!b.is.supported())return b.error(d.support),!1;if(b.debug("Preparing animation",h.animation),b.is.animating()){if(h.queue)return!h.allowRepeats&&b.has.direction()&&b.is.occurring()&&!0!==b.queuing?b.debug("Animation is currently occurring, preventing queueing same animation",h.animation):b.queue(h.animation),!1;if(!h.allowRepeats&&b.is.occurring())return b.debug("Animation is already occurring, will not execute repeated animation",h.animation),!1;b.debug("New animation started, completing previous early",h.animation),f.complete()}b.can.animate()?b.set.animating(h.animation):b.error(d.noAnimation,h.animation,w)},reset:function(){b.debug("Resetting animation to beginning conditions"),b.remove.animationCallbacks(),b.restore.conditions(),b.remove.animating()},queue:function(e){b.debug("Queueing animation of",e),b.queuing=!0,y.one(g+".queue"+v,(function(){b.queuing=!1,b.repaint(),b.animate.apply(this,h)}))},complete:function(e){b.debug("Animation complete",h.animation),b.remove.completeCallback(),b.remove.failSafe(),b.is.looping()||(b.is.outward()?(b.verbose("Animation is outward, hiding element"),b.restore.conditions(),b.hide()):b.is.inward()?(b.verbose("Animation is outward, showing element"),b.restore.conditions(),b.show()):(b.verbose("Static animation completed"),b.restore.conditions(),h.onComplete.call(w)))},force:{visible:function(){var e=y.attr("style"),t=b.get.userStyle(),n=b.get.displayType();t=t+"display: "+n+" !important;",e=void 0===e||""===e;y.css("display")!==n?(b.verbose("Overriding default display to show element",n),y.attr("style",t)):e&&y.removeAttr("style")},hidden:function(){var e=void 0===(e=y.attr("style"))||""===e;"none"===y.css("display")||b.is.hidden()?e&&y.removeAttr("style"):(b.verbose("Overriding default display to hide element"),y.css("display","none"))}},has:{direction:function(e){var t=!1;return"string"==typeof(e=e||h.animation)&&(e=e.split(" "),a.each(e,(function(e,n){n!==p.inward&&n!==p.outward||(t=!0)}))),t},inlineDisplay:function(){var e=y.attr("style")||"";return a.isArray(e.match(/display.*?;/,""))}},set:{animating:function(e){b.remove.completeCallback(),e=e||h.animation,e=b.get.animationClass(e),b.save.animation(e),b.force.visible(),b.remove.hidden(),b.remove.direction(),b.start.animation(e)},duration:function(e,t){!(t="number"==typeof(t=t||h.duration)?t+"ms":t)&&0!==t||(b.verbose("Setting animation duration",t),y.css({"animation-duration":t}))},direction:function(e){(e=e||b.get.direction())==p.inward?b.set.inward():b.set.outward()},looping:function(){b.debug("Transition set to loop"),y.addClass(p.looping)},hidden:function(){y.addClass(p.transition).addClass(p.hidden)},inward:function(){b.debug("Setting direction to inward"),y.removeClass(p.outward).addClass(p.inward)},outward:function(){b.debug("Setting direction to outward"),y.removeClass(p.inward).addClass(p.outward)},visible:function(){y.addClass(p.transition).addClass(p.visible)}},start:{animation:function(e){e=e||b.get.animationClass(),b.debug("Starting tween",e),y.addClass(e).one(g+".complete"+v,b.complete),h.useFailSafe&&b.add.failSafe(),b.set.duration(h.duration),h.onStart.call(w)}},save:{animation:function(e){b.cache||(b.cache={}),b.cache.animation=e},displayType:function(e){"none"!==e&&y.data(m.displayType,e)},transitionExists:function(e,t){a.fn.transition.exists[e]=t,b.verbose("Saving existence of transition",e,t)}},restore:{conditions:function(){var e=b.get.currentAnimation();e&&(y.removeClass(e),b.verbose("Removing animation class",b.cache)),b.remove.duration()}},add:{failSafe:function(){var e=b.get.duration();b.timer=setTimeout((function(){y.triggerHandler(g)}),e+h.failSafeDelay),b.verbose("Adding fail safe timer",b.timer)}},remove:{animating:function(){y.removeClass(p.animating)},animationCallbacks:function(){b.remove.queueCallback(),b.remove.completeCallback()},queueCallback:function(){y.off(".queue"+v)},completeCallback:function(){y.off(".complete"+v)},display:function(){y.css("display","")},direction:function(){y.removeClass(p.inward).removeClass(p.outward)},duration:function(){y.css("animation-duration","")},failSafe:function(){b.verbose("Removing fail safe timer",b.timer),b.timer&&clearTimeout(b.timer)},hidden:function(){y.removeClass(p.hidden)},visible:function(){y.removeClass(p.visible)},looping:function(){b.debug("Transitions are no longer looping"),b.is.looping()&&(b.reset(),y.removeClass(p.looping))},transition:function(){y.removeClass(p.visible).removeClass(p.hidden)}},get:{settings:function(e,t,n){return"object"==typeof e?a.extend(!0,{},a.fn.transition.settings,e):"function"==typeof n?a.extend({},a.fn.transition.settings,{animation:e,onComplete:n,duration:t}):"string"==typeof t||"number"==typeof t?a.extend({},a.fn.transition.settings,{animation:e,duration:t}):"object"==typeof t?a.extend({},a.fn.transition.settings,t,{animation:e}):"function"==typeof t?a.extend({},a.fn.transition.settings,{animation:e,onComplete:t}):a.extend({},a.fn.transition.settings,{animation:e})},animationClass:function(e){e=e||h.animation;var t=b.can.transition()&&!b.has.direction()?b.get.direction()+" ":"";return p.animating+" "+p.transition+" "+t+e},currentAnimation:function(){return!(!b.cache||void 0===b.cache.animation)&&b.cache.animation},currentDirection:function(){return b.is.inward()?p.inward:p.outward},direction:function(){return b.is.hidden()||!b.is.visible()?p.inward:p.outward},animationDirection:function(e){var t;return"string"==typeof(e=e||h.animation)&&(e=e.split(" "),a.each(e,(function(e,n){n===p.inward?t=p.inward:n===p.outward&&(t=p.outward)}))),t||!1},duration:function(e){return"string"==typeof(e=!1===(e=e||h.duration)?y.css("animation-duration")||0:e)?-1<e.indexOf("ms")?parseFloat(e):1e3*parseFloat(e):e},displayType:function(e){return e=void 0===e||e,h.displayType||(e&&void 0===y.data(m.displayType)&&b.can.transition(!0),y.data(m.displayType))},userStyle:function(e){return(e=e||y.attr("style")||"").replace(/display.*?;/,"")},transitionExists:function(e){return a.fn.transition.exists[e]},animationStartEvent:function(){var e,t=u.createElement("div"),n={animation:"animationstart",OAnimation:"oAnimationStart",MozAnimation:"mozAnimationStart",WebkitAnimation:"webkitAnimationStart"};for(e in n)if(void 0!==t.style[e])return n[e];return!1},animationEndEvent:function(){var e,t=u.createElement("div"),n={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"mozAnimationEnd",WebkitAnimation:"webkitAnimationEnd"};for(e in n)if(void 0!==t.style[e])return n[e];return!1}},can:{transition:function(e){var t,n,r,i,o=h.animation,s=b.get.transitionExists(o),u=b.get.displayType(!1);if(void 0===s||e){if(b.verbose("Determining whether animation exists"),e=y.attr("class"),t=y.prop("tagName"),n=(t=a("<"+t+" />").addClass(e).insertAfter(y)).addClass(o).removeClass(p.inward).removeClass(p.outward).addClass(p.animating).addClass(p.transition).css("animationName"),r=t.addClass(p.inward).css("animationName"),u||(u=t.attr("class",e).removeAttr("style").removeClass(p.hidden).removeClass(p.visible).show().css("display"),b.verbose("Determining final display state",u),b.save.displayType(u)),t.remove(),n!=r)b.debug("Direction exists for animation",o),i=!0;else{if("none"==n||!n)return void b.debug("No animation defined in css",o);b.debug("Static animation found",o,u),i=!1}b.save.transitionExists(o,i)}return void 0!==s?s:i},animate:function(){return void 0!==b.can.transition()}},is:{animating:function(){return y.hasClass(p.animating)},inward:function(){return y.hasClass(p.inward)},outward:function(){return y.hasClass(p.outward)},looping:function(){return y.hasClass(p.looping)},occurring:function(e){return e="."+(e=e||h.animation).replace(" ","."),0<y.filter(e).length},visible:function(){return y.is(":visible")},hidden:function(){return"hidden"===y.css("visibility")},supported:function(){return!1!==g}},hide:function(){b.verbose("Hiding element"),b.is.animating()&&b.reset(),w.blur(),b.remove.display(),b.remove.visible(),b.set.hidden(),b.force.hidden(),h.onHide.call(w),h.onComplete.call(w)},show:function(e){b.verbose("Showing element",e),b.remove.hidden(),b.set.visible(),b.force.visible(),h.onShow.call(w),h.onComplete.call(w)},toggle:function(){b.is.visible()?b.hide():b.show()},stop:function(){b.debug("Stopping current animation"),y.triggerHandler(g)},stopAll:function(){b.debug("Stopping all animation"),b.remove.queueCallback(),y.triggerHandler(g)},clear:{queue:function(){b.debug("Clearing animation queue"),b.remove.queueCallback()}},enable:function(){b.verbose("Starting animation"),y.removeClass(p.disabled)},disable:function(){b.debug("Stopping animation"),y.addClass(p.disabled)},setting:function(e,t){if(b.debug("Changing setting",e,t),a.isPlainObject(e))a.extend(!0,h,e);else{if(void 0===t)return h[e];a.isPlainObject(h[e])?a.extend(!0,h[e],t):h[e]=t}},internal:function(e,t){if(a.isPlainObject(e))a.extend(!0,b,e);else{if(void 0===t)return b[e];b[e]=t}},debug:function(){!h.silent&&h.debug&&(h.performance?b.performance.log(arguments):(b.debug=Function.prototype.bind.call(console.info,console,h.name+":"),b.debug.apply(console,arguments)))},verbose:function(){!h.silent&&h.verbose&&h.debug&&(h.performance?b.performance.log(arguments):(b.verbose=Function.prototype.bind.call(console.info,console,h.name+":"),b.verbose.apply(console,arguments)))},error:function(){h.silent||(b.error=Function.prototype.bind.call(console.error,console,h.name+":"),b.error.apply(console,arguments))},performance:{log:function(e){var t,i;h.performance&&(i=(t=(new Date).getTime())-(n||t),n=t,r.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:w,"Execution Time":i})),clearTimeout(b.performance.timer),b.performance.timer=setTimeout(b.performance.display,500)},display:function(){h.name,n=!1,clearTimeout(b.performance.timer),a.each(r,(function(e,t){t["Execution Time"]})),1<t.length&&t.length,(void 0!==console.group||void 0!==console.table)&&0<r.length&&!console.table&&a.each(r,(function(e,t){t.Name,t["Execution Time"]})),r=[]}},invoke:function(t,n,r){var i,o,s,u=f;return n=n||c,r=w||r,"string"==typeof t&&void 0!==u&&(t=t.split(/[\. ]/),i=t.length-1,a.each(t,(function(e,n){var r=e!=i?n+t[e+1].charAt(0).toUpperCase()+t[e+1].slice(1):t;if(!a.isPlainObject(u[r])||e==i)return void 0!==u[r]?(o=u[r],!1):a.isPlainObject(u[n])&&e!=i?void(u=u[n]):void 0!==u[n]&&(o=u[n],!1);u=u[r]}))),a.isFunction(o)?s=o.apply(r,n):void 0!==o&&(s=o),a.isArray(e)?e.push(s):void 0!==e?e=[e,s]:void 0!==s&&(e=s),void 0!==o&&o}}).initialize()})),void 0!==e?e:this},a.fn.transition.exists={},a.fn.transition.settings={name:"Transition",silent:!1,debug:!1,verbose:!1,performance:!0,namespace:"transition",interval:0,reverse:"auto",onStart:function(){},onComplete:function(){},onShow:function(){},onHide:function(){},useFailSafe:!0,failSafeDelay:100,allowRepeats:!1,displayType:!1,animation:"fade",duration:!1,queue:!0,metadata:{displayType:"display"},className:{animating:"animating",disabled:"disabled",hidden:"hidden",inward:"in",loading:"loading",looping:"looping",outward:"out",transition:"transition",visible:"visible"},error:{noAnimation:"Element is no longer attached to DOM. Unable to animate.  Use silent setting to surpress this warning in production.",repeated:"That animation is already occurring, cancelling repeated animation",method:"The method you called is not defined",support:"This browser does not support CSS animations"}},i=ee(),o=window,document,o=void 0!==o&&o.Math==Math?o:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),i.api=i.fn.api=function(e){var t,n=i.isFunction(this)?i(o):i(this),r=(n.selector,(new Date).getTime()),a=[],s=e,u="string"==typeof s,c=[].slice.call(arguments,1);return n.each((function(){var n,l,h,f,d=i.isPlainObject(e)?i.extend(!0,{},i.fn.api.settings,e):i.extend({},i.fn.api.settings),p=d.namespace,m=d.metadata,g=d.selector,A=d.error,v=d.className,b="."+p,y="module-"+p,w=i(this),x=w.closest(g.form),C=d.stateContext?i(d.stateContext):w,k=this,E=C[0],S=w.data(y),_={initialize:function(){u||_.bind.events(),_.instantiate()},instantiate:function(){_.verbose("Storing instance of module",_),S=_,w.data(y,S)},destroy:function(){_.verbose("Destroying previous module for",k),w.removeData(y).off(b)},bind:{events:function(){var e=_.get.event();e?(_.verbose("Attaching API events to element",e),w.on(e+b,_.event.trigger)):"now"==d.on&&(_.debug("Querying API endpoint immediately"),_.query())}},decode:{json:function(e){if(void 0!==e&&"string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}},read:{cachedResponse:function(e){var t;if(void 0!==o.Storage)return t=sessionStorage.getItem(e),_.debug("Using cached response",e,t),_.decode.json(t);_.error(A.noStorage)}},write:{cachedResponse:function(e,t){t&&""===t?_.debug("Response empty, not caching",t):void 0!==o.Storage?(i.isPlainObject(t)&&(t=JSON.stringify(t)),sessionStorage.setItem(e,t),_.verbose("Storing cached response for url",e,t)):_.error(A.noStorage)}},query:function(){if(_.is.disabled())_.debug("Element is disabled API request aborted");else{if(_.is.loading()){if(!d.interruptRequests)return void _.debug("Cancelling request, previous request is still pending");_.debug("Interrupting previous request"),_.abort()}d.defaultData&&i.extend(!0,d.urlData,_.get.defaultData()),d.serializeForm&&(d.data=_.add.formData(d.data)),!1===(l=_.get.settings())?(_.cancelled=!0,_.error(A.beforeSend)):(_.cancelled=!1,(h=_.get.templatedURL())||_.is.mocked()?((h=_.add.urlData(h))||_.is.mocked())&&(l.url=d.base+h,n=i.extend(!0,{},d,{type:d.method||d.type,data:void 0,url:d.base+h,beforeSend:d.beforeXHR,success:function(){},failure:function(){},complete:function(){}}),_.debug("Querying URL",n.url),_.verbose("Using AJAX settings",n),"local"===d.cache&&_.read.cachedResponse(h)?(_.debug("Response returned from local cache"),_.request=_.create.request(),_.request.resolveWith(E,[_.read.cachedResponse(h)])):d.throttle?d.throttleFirstRequest||_.timer?(_.debug("Throttling request",d.throttle),clearTimeout(_.timer),_.timer=setTimeout((function(){_.timer&&delete _.timer,_.debug("Sending throttled request",void 0,n.method),_.send.request()}),d.throttle)):(_.debug("Sending request",void 0,n.method),_.send.request(),_.timer=setTimeout((function(){}),d.throttle)):(_.debug("Sending request",void 0,n.method),_.send.request())):_.error(A.missingURL))}},should:{removeError:function(){return!0===d.hideError||"auto"===d.hideError&&!_.is.form()}},is:{disabled:function(){return 0<w.filter(g.disabled).length},expectingJSON:function(){return"json"===d.dataType||"jsonp"===d.dataType},form:function(){return w.is("form")||C.is("form")},mocked:function(){return d.mockResponse||d.mockResponseAsync||d.response||d.responseAsync},input:function(){return w.is("input")},loading:function(){return!!_.request&&"pending"==_.request.state()},abortedRequest:function(e){return e&&void 0!==e.readyState&&0===e.readyState?(_.verbose("XHR request determined to be aborted"),!0):(_.verbose("XHR request was not aborted"),!1)},validResponse:function(e){return _.is.expectingJSON()&&i.isFunction(d.successTest)?(_.debug("Checking JSON returned success",d.successTest,e),d.successTest(e)?(_.debug("Response passed success test",e),!0):(_.debug("Response failed success test",e),!1)):(_.verbose("Response is not JSON, skipping validation",d.successTest,e),!0)}},was:{cancelled:function(){return _.cancelled||!1},succesful:function(){return _.request&&"resolved"==_.request.state()},failure:function(){return _.request&&"rejected"==_.request.state()},complete:function(){return _.request&&("resolved"==_.request.state()||"rejected"==_.request.state())}},add:{urlData:function(e,t){var n,r;return e&&(n=e.match(d.regExp.required),r=e.match(d.regExp.optional),t=t||d.urlData,n&&(_.debug("Looking for required URL variables",n),i.each(n,(function(n,r){var o=-1!==r.indexOf("$")?r.substr(2,r.length-3):r.substr(1,r.length-2),a=i.isPlainObject(t)&&void 0!==t[o]?t[o]:void 0!==w.data(o)?w.data(o):void 0!==C.data(o)?C.data(o):t[o];if(void 0===a)return _.error(A.requiredParameter,o,e),e=!1;_.verbose("Found required variable",o,a),a=d.encodeParameters?_.get.urlEncodedValue(a):a,e=e.replace(r,a)}))),r&&(_.debug("Looking for optional URL variables",n),i.each(r,(function(n,r){var o=-1!==r.indexOf("$")?r.substr(3,r.length-4):r.substr(2,r.length-3),a=i.isPlainObject(t)&&void 0!==t[o]?t[o]:void 0!==w.data(o)?w.data(o):void 0!==C.data(o)?C.data(o):t[o];e=void 0!==a?(_.verbose("Optional variable Found",o,a),e.replace(r,a)):(_.verbose("Optional variable not found",o),-1!==e.indexOf("/"+r)?e.replace("/"+r,""):e.replace(r,""))})))),e},formData:function(e){var t=void 0!==i.fn.serializeObject,n=t?x.serializeObject():x.serialize();return e=e||d.data,i.isPlainObject(e)?t?(_.debug("Extending existing data with form data",e,n),i.extend(!0,{},e,n)):(_.error(A.missingSerialize),_.debug("Cant extend data. Replacing data with form data",e,n),n):(_.debug("Adding form data",n),n)}},send:{request:function(){_.set.loading(),_.request=_.create.request(),_.is.mocked()?_.mockedXHR=_.create.mockedXHR():_.xhr=_.create.xhr(),d.onRequest.call(E,_.request,_.xhr)}},event:{trigger:function(e){_.query(),"submit"!=e.type&&"click"!=e.type||e.preventDefault()},xhr:{always:function(){},done:function(e,t,n){var r=this,o=(new Date).getTime()-f,a=(o=d.loadingDuration-o,!!i.isFunction(d.onResponse)&&(_.is.expectingJSON()?d.onResponse.call(r,i.extend(!0,{},e)):d.onResponse.call(r,e)));o=0<o?o:0;a&&(_.debug("Modified API response in onResponse callback",d.onResponse,a,e),e=a),0<o&&_.debug("Response completed early delaying state change by",o),setTimeout((function(){_.is.validResponse(e)?_.request.resolveWith(r,[e,n]):_.request.rejectWith(r,[n,"invalid"])}),o)},fail:function(e,t,n){var r=this,i=(new Date).getTime()-f;0<(i=0<(i=d.loadingDuration-i)?i:0)&&_.debug("Response completed early delaying state change by",i),setTimeout((function(){_.is.abortedRequest(e)?_.request.rejectWith(r,[e,"aborted",n]):_.request.rejectWith(r,[e,"error",t,n])}),i)}},request:{done:function(e,t){_.debug("Successful API Response",e),"local"===d.cache&&h&&(_.write.cachedResponse(h,e),_.debug("Saving server response locally",_.cache)),d.onSuccess.call(E,e,w,t)},complete:function(e,t){var n,r;_.was.succesful()?(r=e,n=t):r=_.get.responseFromXHR(n=e),_.remove.loading(),d.onComplete.call(E,r,w,n)},fail:function(e,t,r){var i=_.get.responseFromXHR(e),o=_.get.errorFromRequest(i,t,r);if("aborted"==t)return _.debug("XHR Aborted (Most likely caused by page navigation or CORS Policy)",t,r),d.onAbort.call(E,t,w,e),!0;"invalid"==t?_.debug("JSON did not pass success test. A server-side error has most likely occurred",i):"error"==t&&void 0!==e&&(_.debug("XHR produced a server error",t,r),200!=e.status&&void 0!==r&&""!==r&&_.error(A.statusMessage+r,n.url),d.onError.call(E,o,w,e)),d.errorDuration&&"aborted"!==t&&(_.debug("Adding error state"),_.set.error(),_.should.removeError()&&setTimeout(_.remove.error,d.errorDuration)),_.debug("API Request failed",o,e),d.onFailure.call(E,i,w,e)}}},create:{request:function(){return i.Deferred().always(_.event.request.complete).done(_.event.request.done).fail(_.event.request.fail)},mockedXHR:function(){var e=d.mockResponse||d.response,t=d.mockResponseAsync||d.responseAsync,n=i.Deferred().always(_.event.xhr.complete).done(_.event.xhr.done).fail(_.event.xhr.fail);return e?(e=i.isFunction(e)?(_.debug("Using specified synchronous callback",e),e.call(E,l)):(_.debug("Using settings specified response",e),e),n.resolveWith(E,[e,!1,{responseText:e}])):i.isFunction(t)&&(e=function(e){_.debug("Async callback returned response",e),e?n.resolveWith(E,[e,!1,{responseText:e}]):n.rejectWith(E,[{responseText:e},!1,!1])},_.debug("Using specified async response callback",t),t.call(E,l,e)),n},xhr:function(){var e=i.ajax(n).always(_.event.xhr.always).done(_.event.xhr.done).fail(_.event.xhr.fail);return _.verbose("Created server request",e,n),e}},set:{error:function(){_.verbose("Adding error state to element",C),C.addClass(v.error)},loading:function(){_.verbose("Adding loading state to element",C),C.addClass(v.loading),f=(new Date).getTime()}},remove:{error:function(){_.verbose("Removing error state from element",C),C.removeClass(v.error)},loading:function(){_.verbose("Removing loading state from element",C),C.removeClass(v.loading)}},get:{responseFromXHR:function(e){return!!i.isPlainObject(e)&&(_.is.expectingJSON()?_.decode.json(e.responseText):e.responseText)},errorFromRequest:function(e,t,n){return i.isPlainObject(e)&&void 0!==e.error?e.error:void 0!==d.error[t]?d.error[t]:n},request:function(){return _.request||!1},xhr:function(){return _.xhr||!1},settings:function(){var e;return(e=d.beforeSend.call(E,d))&&(void 0!==e.success&&(_.debug("Legacy success callback detected",e),_.error(A.legacyParameters,e.success),e.onSuccess=e.success),void 0!==e.failure&&(_.debug("Legacy failure callback detected",e),_.error(A.legacyParameters,e.failure),e.onFailure=e.failure),void 0!==e.complete&&(_.debug("Legacy complete callback detected",e),_.error(A.legacyParameters,e.complete),e.onComplete=e.complete)),void 0===e&&_.error(A.noReturnedValue),!1===e?e:void 0!==e?i.extend(!0,{},e):i.extend(!0,{},d)},urlEncodedValue:function(e){var t=o.decodeURIComponent(e),n=o.encodeURIComponent(e);return t!==e?(_.debug("URL value is already encoded, avoiding double encoding",e),e):(_.verbose("Encoding value using encodeURIComponent",e,n),n)},defaultData:function(){var e={};return i.isWindow(k)||(_.is.input()?e.value=w.val():_.is.form()||(e.text=w.text())),e},event:function(){return i.isWindow(k)||"now"==d.on?(_.debug("API called without element, no events attached"),!1):"auto"==d.on?w.is("input")?void 0!==k.oninput?"input":void 0!==k.onpropertychange?"propertychange":"keyup":w.is("form")?"submit":"click":d.on},templatedURL:function(e){if(e=e||w.data(m.action)||d.action||!1,h=w.data(m.url)||d.url||!1)_.debug("Using specified url",h);else if(e){if(_.debug("Looking up url for action",e,d.api),void 0===d.api[e]&&!_.is.mocked())return void _.error(A.missingAction,d.action,d.api);h=d.api[e]}else _.is.form()&&(h=w.attr("action")||C.attr("action")||!1,_.debug("No url or action specified, defaulting to form action",h));return h}},abort:function(){var e=_.get.xhr();e&&"resolved"!==e.state()&&(_.debug("Cancelling API request"),e.abort())},reset:function(){_.remove.error(),_.remove.loading()},setting:function(e,t){if(_.debug("Changing setting",e,t),i.isPlainObject(e))i.extend(!0,d,e);else{if(void 0===t)return d[e];i.isPlainObject(d[e])?i.extend(!0,d[e],t):d[e]=t}},internal:function(e,t){if(i.isPlainObject(e))i.extend(!0,_,e);else{if(void 0===t)return _[e];_[e]=t}},debug:function(){!d.silent&&d.debug&&(d.performance?_.performance.log(arguments):(_.debug=Function.prototype.bind.call(console.info,console,d.name+":"),_.debug.apply(console,arguments)))},verbose:function(){!d.silent&&d.verbose&&d.debug&&(d.performance?_.performance.log(arguments):(_.verbose=Function.prototype.bind.call(console.info,console,d.name+":"),_.verbose.apply(console,arguments)))},error:function(){d.silent||(_.error=Function.prototype.bind.call(console.error,console,d.name+":"),_.error.apply(console,arguments))},performance:{log:function(e){var t,n;d.performance&&(n=(t=(new Date).getTime())-(r||t),r=t,a.push({Name:e[0],Arguments:[].slice.call(e,1)||"","Execution Time":n})),clearTimeout(_.performance.timer),_.performance.timer=setTimeout(_.performance.display,500)},display:function(){d.name,r=!1,clearTimeout(_.performance.timer),i.each(a,(function(e,t){t["Execution Time"]})),(void 0!==console.group||void 0!==console.table)&&0<a.length&&!console.table&&i.each(a,(function(e,t){t.Name,t["Execution Time"]})),a=[]}},invoke:function(e,n,r){var o,a,s,u=S;return n=n||c,r=k||r,"string"==typeof e&&void 0!==u&&(e=e.split(/[\. ]/),o=e.length-1,i.each(e,(function(t,n){var r=t!=o?n+e[t+1].charAt(0).toUpperCase()+e[t+1].slice(1):e;if(!i.isPlainObject(u[r])||t==o)return void 0!==u[r]?(a=u[r],!1):i.isPlainObject(u[n])&&t!=o?void(u=u[n]):(void 0!==u[n]?a=u[n]:_.error(A.method,e),!1);u=u[r]}))),i.isFunction(a)?s=a.apply(r,n):void 0!==a&&(s=a),i.isArray(t)?t.push(s):void 0!==t?t=[t,s]:void 0!==s&&(t=s),a}};u?(void 0===S&&_.initialize(),_.invoke(s)):(void 0!==S&&S.invoke("destroy"),_.initialize())})),void 0!==t?t:this},i.api.settings={name:"API",namespace:"api",debug:!1,verbose:!1,performance:!0,api:{},cache:!0,interruptRequests:!0,on:"auto",stateContext:!1,loadingDuration:0,hideError:"auto",errorDuration:2e3,encodeParameters:!0,action:!1,url:!1,base:"",urlData:{},defaultData:!0,serializeForm:!1,throttle:0,throttleFirstRequest:!0,method:"get",data:{},dataType:"json",mockResponse:!1,mockResponseAsync:!1,response:!1,responseAsync:!1,beforeSend:function(e){return e},beforeXHR:function(e){},onRequest:function(e,t){},onResponse:!1,onSuccess:function(e,t){},onComplete:function(e,t){},onFailure:function(e,t){},onError:function(e,t){},onAbort:function(e,t){},successTest:!1,error:{beforeSend:"The before send function has aborted the request",error:"There was an error with your request",exitConditions:"API Request Aborted. Exit conditions met",JSONParse:"JSON could not be parsed during error handling",legacyParameters:"You are using legacy API success callback names",method:"The method you called is not defined",missingAction:"API action used but no url was defined",missingSerialize:"jquery-serialize-object is required to add form data to an existing data object",missingURL:"No URL specified for api event",noReturnedValue:"The beforeSend callback must return a settings object, beforeSend ignored.",noStorage:"Caching responses locally requires session storage",parseError:"There was an error parsing your request",requiredParameter:"Missing a required URL parameter: ",statusMessage:"Server gave an error: ",timeout:"Your request timed out"},regExp:{required:/\{\$*[A-z0-9]+\}/g,optional:/\{\/\$*[A-z0-9]+\}/g},className:{loading:"loading",error:"error"},selector:{disabled:".disabled",form:"form"},metadata:{action:"action",url:"url"}},e=ee(),t=window,r=document,t=void 0!==t&&t.Math==Math?t:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),e.fn.visibility=function(n){var i,o=e(this),a=(o.selector,(new Date).getTime()),s=[],u=n,c="string"==typeof u,l=[].slice.call(arguments,1),h=o.length,f=0;return o.each((function(){var o,d,p,m=e.isPlainObject(n)?e.extend(!0,{},e.fn.visibility.settings,n):e.extend({},e.fn.visibility.settings),g=m.className,A=m.namespace,v=m.error,b=m.metadata,y="."+A,w="module-"+A,x=e(t),C=e(this),k=e(m.context),E=(C.selector,C.data(w)),S=t.requestAnimationFrame||t.mozRequestAnimationFrame||t.webkitRequestAnimationFrame||t.msRequestAnimationFrame||function(e){setTimeout(e,0)},_=this,O=!1,T={initialize:function(){T.debug("Initializing",m),T.setup.cache(),T.should.trackChanges()&&("image"==m.type&&T.setup.image(),"fixed"==m.type&&T.setup.fixed(),m.observeChanges&&T.observeChanges(),T.bind.events()),T.save.position(),T.is.visible()||T.error(v.visible,C),m.initialCheck&&T.checkVisibility(),T.instantiate()},instantiate:function(){T.debug("Storing instance",T),C.data(w,T),E=T},destroy:function(){T.verbose("Destroying previous module"),p&&p.disconnect(),d&&d.disconnect(),x.off("load"+y,T.event.load).off("resize"+y,T.event.resize),k.off("scroll"+y,T.event.scroll).off("scrollchange"+y,T.event.scrollchange),"fixed"==m.type&&(T.resetFixed(),T.remove.placeholder()),C.off(y).removeData(w)},observeChanges:function(){"MutationObserver"in t&&(d=new MutationObserver(T.event.contextChanged),p=new MutationObserver(T.event.changed),d.observe(r,{childList:!0,subtree:!0}),p.observe(_,{childList:!0,subtree:!0}),T.debug("Setting up mutation observer",p))},bind:{events:function(){T.verbose("Binding visibility events to scroll and resize"),m.refreshOnLoad&&x.on("load"+y,T.event.load),x.on("resize"+y,T.event.resize),k.off("scroll"+y).on("scroll"+y,T.event.scroll).on("scrollchange"+y,T.event.scrollchange)}},event:{changed:function(e){T.verbose("DOM tree modified, updating visibility calculations"),T.timer=setTimeout((function(){T.verbose("DOM tree modified, updating sticky menu"),T.refresh()}),100)},contextChanged:function(t){[].forEach.call(t,(function(t){t.removedNodes&&[].forEach.call(t.removedNodes,(function(t){(t==_||0<e(t).find(_).length)&&(T.debug("Element removed from DOM, tearing down events"),T.destroy())}))}))},resize:function(){T.debug("Window resized"),m.refreshOnResize&&S(T.refresh)},load:function(){T.debug("Page finished loading"),S(T.refresh)},scroll:function(){m.throttle?(clearTimeout(T.timer),T.timer=setTimeout((function(){k.triggerHandler("scrollchange"+y,[k.scrollTop()])}),m.throttle)):S((function(){k.triggerHandler("scrollchange"+y,[k.scrollTop()])}))},scrollchange:function(e,t){T.checkVisibility(t)}},precache:function(t,n){for(var i=(t=t instanceof Array?t:[t]).length,o=0,a=[],s=r.createElement("img"),u=function(){++o>=t.length&&e.isFunction(n)&&n()};i--;)(s=r.createElement("img")).onload=u,s.onerror=u,s.src=t[i],a.push(s)},enableCallbacks:function(){T.debug("Allowing callbacks to occur"),O=!1},disableCallbacks:function(){T.debug("Disabling all callbacks temporarily"),O=!0},should:{trackChanges:function(){return c?(T.debug("One time query, no need to bind events"),!1):(T.debug("Callbacks being attached"),!0)}},setup:{cache:function(){T.cache={occurred:{},screen:{},element:{}}},image:function(){var e=C.data(b.src);e&&(T.verbose("Lazy loading image",e),m.once=!0,m.observeChanges=!1,m.onOnScreen=function(){T.debug("Image on screen",_),T.precache(e,(function(){T.set.image(e,(function(){++f==h&&m.onAllLoaded.call(this),m.onLoad.call(this)}))}))})},fixed:function(){T.debug("Setting up fixed"),m.once=!1,m.observeChanges=!1,m.initialCheck=!0,m.refreshOnLoad=!0,n.transition||(m.transition=!1),T.create.placeholder(),T.debug("Added placeholder",o),m.onTopPassed=function(){T.debug("Element passed, adding fixed position",C),T.show.placeholder(),T.set.fixed(),m.transition&&void 0!==e.fn.transition&&C.transition(m.transition,m.duration)},m.onTopPassedReverse=function(){T.debug("Element returned to position, removing fixed",C),T.hide.placeholder(),T.remove.fixed()}}},create:{placeholder:function(){T.verbose("Creating fixed position placeholder"),o=C.clone(!1).css("display","none").addClass(g.placeholder).insertAfter(C)}},show:{placeholder:function(){T.verbose("Showing placeholder"),o.css("display","block").css("visibility","hidden")}},hide:{placeholder:function(){T.verbose("Hiding placeholder"),o.css("display","none").css("visibility","")}},set:{fixed:function(){T.verbose("Setting element to fixed position"),C.addClass(g.fixed).css({position:"fixed",top:m.offset+"px",left:"auto",zIndex:m.zIndex}),m.onFixed.call(_)},image:function(t,n){C.attr("src",t),m.transition?void 0!==e.fn.transition?C.hasClass(g.visible)?T.debug("Transition already occurred on this image, skipping animation"):C.transition(m.transition,m.duration,n):C.fadeIn(m.duration,n):C.show()}},is:{onScreen:function(){return T.get.elementCalculations().onScreen},offScreen:function(){return T.get.elementCalculations().offScreen},visible:function(){return!(!T.cache||!T.cache.element||0===T.cache.element.width&&0===T.cache.element.offset.top)},verticallyScrollableContext:function(){var e=k.get(0)!==t&&k.css("overflow-y");return"auto"==e||"scroll"==e},horizontallyScrollableContext:function(){var e=k.get(0)!==t&&k.css("overflow-x");return"auto"==e||"scroll"==e}},refresh:function(){T.debug("Refreshing constants (width/height)"),"fixed"==m.type&&T.resetFixed(),T.reset(),T.save.position(),m.checkOnRefresh&&T.checkVisibility(),m.onRefresh.call(_)},resetFixed:function(){T.remove.fixed(),T.remove.occurred()},reset:function(){T.verbose("Resetting all cached values"),e.isPlainObject(T.cache)&&(T.cache.screen={},T.cache.element={})},checkVisibility:function(e){T.verbose("Checking visibility of element",T.cache.element),!O&&T.is.visible()&&(T.save.scroll(e),T.save.calculations(),T.passed(),T.passingReverse(),T.topVisibleReverse(),T.bottomVisibleReverse(),T.topPassedReverse(),T.bottomPassedReverse(),T.onScreen(),T.offScreen(),T.passing(),T.topVisible(),T.bottomVisible(),T.topPassed(),T.bottomPassed(),m.onUpdate&&m.onUpdate.call(_,T.get.elementCalculations()))},passed:function(t,n){var r=T.get.elementCalculations();if(t&&n)m.onPassed[t]=n;else{if(void 0!==t)return T.get.pixelsPassed(t)>r.pixelsPassed;r.passing&&e.each(m.onPassed,(function(e,t){r.bottomVisible||r.pixelsPassed>T.get.pixelsPassed(e)?T.execute(t,e):m.once||T.remove.occurred(t)}))}},onScreen:function(e){var t=T.get.elementCalculations(),n=e||m.onOnScreen;if(e&&(T.debug("Adding callback for onScreen",e),m.onOnScreen=e),t.onScreen?T.execute(n,"onScreen"):m.once||T.remove.occurred("onScreen"),void 0!==e)return t.onOnScreen},offScreen:function(e){var t=T.get.elementCalculations(),n=e||m.onOffScreen;if(e&&(T.debug("Adding callback for offScreen",e),m.onOffScreen=e),t.offScreen?T.execute(n,"offScreen"):m.once||T.remove.occurred("offScreen"),void 0!==e)return t.onOffScreen},passing:function(e){var t=T.get.elementCalculations(),n=e||m.onPassing;if(e&&(T.debug("Adding callback for passing",e),m.onPassing=e),t.passing?T.execute(n,"passing"):m.once||T.remove.occurred("passing"),void 0!==e)return t.passing},topVisible:function(e){var t=T.get.elementCalculations(),n=e||m.onTopVisible;if(e&&(T.debug("Adding callback for top visible",e),m.onTopVisible=e),t.topVisible?T.execute(n,"topVisible"):m.once||T.remove.occurred("topVisible"),void 0===e)return t.topVisible},bottomVisible:function(e){var t=T.get.elementCalculations(),n=e||m.onBottomVisible;if(e&&(T.debug("Adding callback for bottom visible",e),m.onBottomVisible=e),t.bottomVisible?T.execute(n,"bottomVisible"):m.once||T.remove.occurred("bottomVisible"),void 0===e)return t.bottomVisible},topPassed:function(e){var t=T.get.elementCalculations(),n=e||m.onTopPassed;if(e&&(T.debug("Adding callback for top passed",e),m.onTopPassed=e),t.topPassed?T.execute(n,"topPassed"):m.once||T.remove.occurred("topPassed"),void 0===e)return t.topPassed},bottomPassed:function(e){var t=T.get.elementCalculations(),n=e||m.onBottomPassed;if(e&&(T.debug("Adding callback for bottom passed",e),m.onBottomPassed=e),t.bottomPassed?T.execute(n,"bottomPassed"):m.once||T.remove.occurred("bottomPassed"),void 0===e)return t.bottomPassed},passingReverse:function(e){var t=T.get.elementCalculations(),n=e||m.onPassingReverse;if(e&&(T.debug("Adding callback for passing reverse",e),m.onPassingReverse=e),t.passing?m.once||T.remove.occurred("passingReverse"):T.get.occurred("passing")&&T.execute(n,"passingReverse"),void 0!==e)return!t.passing},topVisibleReverse:function(e){var t=T.get.elementCalculations(),n=e||m.onTopVisibleReverse;if(e&&(T.debug("Adding callback for top visible reverse",e),m.onTopVisibleReverse=e),t.topVisible?m.once||T.remove.occurred("topVisibleReverse"):T.get.occurred("topVisible")&&T.execute(n,"topVisibleReverse"),void 0===e)return!t.topVisible},bottomVisibleReverse:function(e){var t=T.get.elementCalculations(),n=e||m.onBottomVisibleReverse;if(e&&(T.debug("Adding callback for bottom visible reverse",e),m.onBottomVisibleReverse=e),t.bottomVisible?m.once||T.remove.occurred("bottomVisibleReverse"):T.get.occurred("bottomVisible")&&T.execute(n,"bottomVisibleReverse"),void 0===e)return!t.bottomVisible},topPassedReverse:function(e){var t=T.get.elementCalculations(),n=e||m.onTopPassedReverse;if(e&&(T.debug("Adding callback for top passed reverse",e),m.onTopPassedReverse=e),t.topPassed?m.once||T.remove.occurred("topPassedReverse"):T.get.occurred("topPassed")&&T.execute(n,"topPassedReverse"),void 0===e)return!t.onTopPassed},bottomPassedReverse:function(e){var t=T.get.elementCalculations(),n=e||m.onBottomPassedReverse;if(e&&(T.debug("Adding callback for bottom passed reverse",e),m.onBottomPassedReverse=e),t.bottomPassed?m.once||T.remove.occurred("bottomPassedReverse"):T.get.occurred("bottomPassed")&&T.execute(n,"bottomPassedReverse"),void 0===e)return!t.bottomPassed},execute:function(e,t){var n=T.get.elementCalculations(),r=T.get.screenCalculations();(e=e||!1)&&(m.continuous?(T.debug("Callback being called continuously",t,n),e.call(_,n,r)):T.get.occurred(t)||(T.debug("Conditions met",t,n),e.call(_,n,r))),T.save.occurred(t)},remove:{fixed:function(){T.debug("Removing fixed position"),C.removeClass(g.fixed).css({position:"",top:"",left:"",zIndex:""}),m.onUnfixed.call(_)},placeholder:function(){T.debug("Removing placeholder content"),o&&o.remove()},occurred:function(e){var t;e?void 0!==(t=T.cache.occurred)[e]&&!0===t[e]&&(T.debug("Callback can now be called again",e),T.cache.occurred[e]=!1):T.cache.occurred={}}},save:{calculations:function(){T.verbose("Saving all calculations necessary to determine positioning"),T.save.direction(),T.save.screenCalculations(),T.save.elementCalculations()},occurred:function(e){!e||void 0!==T.cache.occurred[e]&&!0===T.cache.occurred[e]||(T.verbose("Saving callback occurred",e),T.cache.occurred[e]=!0)},scroll:function(e){e=e+m.offset||k.scrollTop()+m.offset,T.cache.scroll=e},direction:function(){var e=T.get.scroll(),t=T.get.lastScroll();return T.cache.direction=t<e&&t?"down":e<t&&t?"up":"static",T.cache.direction},elementPosition:function(){var e=T.cache.element,t=T.get.screenSize();return T.verbose("Saving element position"),e.fits=e.height<t.height,e.offset=C.offset(),e.width=C.outerWidth(),e.height=C.outerHeight(),T.is.verticallyScrollableContext()&&(e.offset.top+=k.scrollTop()-k.offset().top),T.is.horizontallyScrollableContext()&&(e.offset.left+=k.scrollLeft-k.offset().left),T.cache.element=e},elementCalculations:function(){var e=T.get.screenCalculations(),t=T.get.elementPosition();return m.includeMargin?(t.margin={},t.margin.top=parseInt(C.css("margin-top"),10),t.margin.bottom=parseInt(C.css("margin-bottom"),10),t.top=t.offset.top-t.margin.top,t.bottom=t.offset.top+t.height+t.margin.bottom):(t.top=t.offset.top,t.bottom=t.offset.top+t.height),t.topPassed=e.top>=t.top,t.bottomPassed=e.top>=t.bottom,t.topVisible=e.bottom>=t.top&&!t.topPassed,t.bottomVisible=e.bottom>=t.bottom&&!t.bottomPassed,t.pixelsPassed=0,t.percentagePassed=0,t.onScreen=(t.topVisible||t.passing)&&!t.bottomPassed,t.passing=t.topPassed&&!t.bottomPassed,t.offScreen=!t.onScreen,t.passing&&(t.pixelsPassed=e.top-t.top,t.percentagePassed=(e.top-t.top)/t.height),T.cache.element=t,T.verbose("Updated element calculations",t),t},screenCalculations:function(){var e=T.get.scroll();return T.save.direction(),T.cache.screen.top=e,T.cache.screen.bottom=e+T.cache.screen.height,T.cache.screen},screenSize:function(){T.verbose("Saving window position"),T.cache.screen={height:k.height()}},position:function(){T.save.screenSize(),T.save.elementPosition()}},get:{pixelsPassed:function(e){var t=T.get.elementCalculations();return-1<e.search("%")?t.height*(parseInt(e,10)/100):parseInt(e,10)},occurred:function(e){return void 0!==T.cache.occurred&&T.cache.occurred[e]||!1},direction:function(){return void 0===T.cache.direction&&T.save.direction(),T.cache.direction},elementPosition:function(){return void 0===T.cache.element&&T.save.elementPosition(),T.cache.element},elementCalculations:function(){return void 0===T.cache.element&&T.save.elementCalculations(),T.cache.element},screenCalculations:function(){return void 0===T.cache.screen&&T.save.screenCalculations(),T.cache.screen},screenSize:function(){return void 0===T.cache.screen&&T.save.screenSize(),T.cache.screen},scroll:function(){return void 0===T.cache.scroll&&T.save.scroll(),T.cache.scroll},lastScroll:function(){return void 0===T.cache.screen?(T.debug("First scroll event, no last scroll could be found"),!1):T.cache.screen.top}},setting:function(t,n){if(e.isPlainObject(t))e.extend(!0,m,t);else{if(void 0===n)return m[t];m[t]=n}},internal:function(t,n){if(e.isPlainObject(t))e.extend(!0,T,t);else{if(void 0===n)return T[t];T[t]=n}},debug:function(){!m.silent&&m.debug&&(m.performance?T.performance.log(arguments):(T.debug=Function.prototype.bind.call(console.info,console,m.name+":"),T.debug.apply(console,arguments)))},verbose:function(){!m.silent&&m.verbose&&m.debug&&(m.performance?T.performance.log(arguments):(T.verbose=Function.prototype.bind.call(console.info,console,m.name+":"),T.verbose.apply(console,arguments)))},error:function(){m.silent||(T.error=Function.prototype.bind.call(console.error,console,m.name+":"),T.error.apply(console,arguments))},performance:{log:function(e){var t,n;m.performance&&(n=(t=(new Date).getTime())-(a||t),a=t,s.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:_,"Execution Time":n})),clearTimeout(T.performance.timer),T.performance.timer=setTimeout(T.performance.display,500)},display:function(){m.name,a=!1,clearTimeout(T.performance.timer),e.each(s,(function(e,t){t["Execution Time"]})),(void 0!==console.group||void 0!==console.table)&&0<s.length&&!console.table&&e.each(s,(function(e,t){t.Name,t["Execution Time"]})),s=[]}},invoke:function(t,n,r){var o,a,s,u=E;return n=n||l,r=_||r,"string"==typeof t&&void 0!==u&&(t=t.split(/[\. ]/),o=t.length-1,e.each(t,(function(n,r){var i=n!=o?r+t[n+1].charAt(0).toUpperCase()+t[n+1].slice(1):t;if(!e.isPlainObject(u[i])||n==o)return void 0!==u[i]?(a=u[i],!1):e.isPlainObject(u[r])&&n!=o?void(u=u[r]):(void 0!==u[r]?a=u[r]:T.error(v.method,t),!1);u=u[i]}))),e.isFunction(a)?s=a.apply(r,n):void 0!==a&&(s=a),e.isArray(i)?i.push(s):void 0!==i?i=[i,s]:void 0!==s&&(i=s),a}};c?(void 0===E&&T.initialize(),E.save.scroll(),E.save.calculations(),T.invoke(u)):(void 0!==E&&E.invoke("destroy"),T.initialize())})),void 0!==i?i:this},e.fn.visibility.settings={name:"Visibility",namespace:"visibility",debug:!1,verbose:!1,performance:!0,observeChanges:!0,initialCheck:!0,refreshOnLoad:!0,refreshOnResize:!0,checkOnRefresh:!0,once:!0,continuous:!1,offset:0,includeMargin:!1,context:t,throttle:!1,type:!1,zIndex:"10",transition:"fade in",duration:1e3,onPassed:{},onOnScreen:!1,onOffScreen:!1,onPassing:!1,onTopVisible:!1,onBottomVisible:!1,onTopPassed:!1,onBottomPassed:!1,onPassingReverse:!1,onTopVisibleReverse:!1,onBottomVisibleReverse:!1,onTopPassedReverse:!1,onBottomPassedReverse:!1,onLoad:function(){},onAllLoaded:function(){},onFixed:function(){},onUnfixed:function(){},onUpdate:!1,onRefresh:function(){},metadata:{src:"src"},className:{fixed:"fixed",placeholder:"placeholder",visible:"visible"},error:{method:"The method you called is not defined.",visible:"Element is hidden, you must call refresh after element becomes visible"}},"xzparams");function ne(e){return(ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function re(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ie(e){return new oe(e,1<arguments.length&&void 0!==arguments[1]?arguments[1]:"")}(function(e,t){for(var n,r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(n=function(e){if("object"!==ne(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0===t)return String(e);if("object"!==ne(t=t.call(e,"string")))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}(i.key),"symbol"===ne(n)?n:String(n)),i)}})((Z=se).prototype,[{key:"data",value:function(e,t){return void 0!==t?(this.data[e]=t,this):this.data[e]}},{key:"on",value:function(e,t){var n,r=(e=function(e){if(Array.isArray(e))return e}(n=e.split("."))||function(){if("undefined"!=typeof Symbol&&null!=n[Symbol.iterator]||null!=n["@@iterator"])return Array.from(n)}()||function(e){var t;if(e)return"string"==typeof e?re(e,void 0):"Map"===(t="Object"===(t=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:t)||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?re(e,void 0):void 0}(n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0],i=e.slice(1);return"mousewheel"===(e=r)&&/Firefox/i.test(window.navigator.userAgent)&&(e="DOMMouseScroll"),this.el.addEventListener(e,(function(e){t(e);for(var n=0;n<i.length;n+=1){var r=i[n];if("left"===r&&0!==e.button)return;if("right"===r&&2!==e.button)return;"stop"===r&&e.stopPropagation()}})),this}},{key:"offset",value:function(e){var t,n=this;return void 0!==e?(Object.keys(e).forEach((function(t){n.css(t,"".concat(e[t],"px"))})),this):{top:(t=this.el).offsetTop,left:t.offsetLeft,height:t.offsetHeight,width:t.offsetWidth}}},{key:"scroll",value:function(e){var t=this.el;return void 0!==e&&(void 0!==e.left&&(t.scrollLeft=e.left),void 0!==e.top&&(t.scrollTop=e.top)),{left:t.scrollLeft,top:t.scrollTop}}},{key:"box",value:function(){return this.el.getBoundingClientRect()}},{key:"parent",value:function(){return new se(this.el.parentNode)}},{key:"children",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return 0===arguments.length?this.el.childNodes:(n.forEach((function(t){return e.child(t)})),this)}},{key:"removeChild",value:function(e){this.el.removeChild(e)}},{key:"child",value:function(e,t){var n=e;return"string"==typeof e?n=document.createTextNode(e):e instanceof se&&(n=e.el),this.el.appendChild(n),this}},{key:"innerHTML",value:function(e){return this.el.innerHTML=e,this}},{key:"contains",value:function(e){return this.el.contains(e)}},{key:"className",value:function(e){return void 0!==e?(this.el.className=e,this):this.el.className}},{key:"addClass",value:function(e){return this.el.classList.add(e),this}},{key:"hasClass",value:function(e){return this.el.classList.contains(e)}},{key:"removeClass",value:function(e){return this.el.classList.remove(e),this}},{key:"toggle",value:function(){return this.toggleClass(0<arguments.length&&void 0!==arguments[0]?arguments[0]:"active")}},{key:"toggleClass",value:function(e){return this.el.classList.toggle(e)}},{key:"active",value:function(){var e=!(0<arguments.length&&void 0!==arguments[0])||arguments[0],t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"active";return e?this.addClass(t):this.removeClass(t),this}},{key:"checked",value:function(){return this.active(!(0<arguments.length&&void 0!==arguments[0])||arguments[0],"checked"),this}},{key:"disabled",value:function(){return 0<arguments.length&&void 0!==arguments[0]&&!arguments[0]?this.removeClass("disabled"):this.addClass("disabled"),this}},{key:"attr",value:function(e,t){var n=this;if(void 0!==t)this.el.setAttribute(e,t);else{if("string"==typeof e)return this.el.getAttribute(e);Object.keys(e).forEach((function(t){n.el.setAttribute(t,e[t])}))}return this}},{key:"removeAttr",value:function(e){return this.el.removeAttribute(e),this}},{key:"html",value:function(e){return void 0!==e?(this.el.innerHTML=e,this):this.el.innerHTML}},{key:"val",value:function(e){return void 0!==e?(this.el.value=e,this):this.el.value}},{key:"focus",value:function(){this.el.focus()}},{key:"cssRemoveKeys",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach((function(t){return e.el.style.removeProperty(t)})),this}},{key:"css",value:function(e,t){var n=this;return void 0===t&&"string"!=typeof e?(Object.keys(e).forEach((function(t){n.el.style[t]=e[t]})),this):void 0!==t?(this.el.style[e]=t,this):this.el.style[e]}},{key:"computedStyle",value:function(){return window.getComputedStyle(this.el,null)}},{key:"show",value:function(){return this.css("display","block"),this}},{key:"hide",value:function(){return this.css("display","none"),this}}]),Object.defineProperty(Z,"prototype",{writable:!1});var oe=se,ae=(Z=n(486),n.n(Z));function se(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"",n=this,r=se;if(!(n instanceof r))throw new TypeError("Cannot call a class as a function");"string"==typeof e?(this.el=document.createElement(e),this.el.className=t):this.el=e,this.data={}}function ue(e){return(ue="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var ce={check:!1,label:"",type:"",childCheckContainer:null,indeterminateIndex:[],"data-key":null,labelTip:""},le=(function(e,t){for(var n,r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(n=function(e){if("object"!==ue(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0===t)return String(e);if("object"!==ue(t=t.call(e,"string")))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}(i.key),"symbol"===ue(n)?n:String(n)),i)}}((Z=he).prototype,[{key:"init",value:function(){this.labelEl=ie("label").innerHTML(this.label),this.option.labelTip&&this.labelEl.attr({title:this.option.labelTip}),this.el=ie("div","ui checkbox").children(ie("input").attr({type:"checkbox"}),this.labelEl).attr({"data-key":this.option["data-key"]}),ee()(this.el.el).checkbox(ee()(this).data("method")),this.change(this.option.check)}},{key:"addEvent",value:function(e){ee()(this.el.el).checkbox(e)}},{key:"indeterminateEvent",value:function(){var e=this,t=this.option,n=t.type,r=t.childCheckContainer,i=(t.indeterminateIndex,this);setTimeout((function(){var t;r&&"indeterminate"==n&&((t=ee()(e.el.el)).checkbox({onChecked:function(){var e=[];ee()(r.el),ee()(r.el).find(".checkbox").each((function(t,n){n=n.getAttribute(["data-key"]),e.push(n)})),i.option.indeterminateIndex=e,ee()(r.el).find(".checkbox").checkbox("check")},onUnchecked:function(){i.option.indeterminateIndex=[],ee()(r.el).find(".checkbox").checkbox("uncheck")}}),ee()(r.el).find(".checkbox"),ee()(r.el).find(".checkbox").checkbox({fireOnInit:!0,onChange:function(){var e=!0,n=!0,o=[];ee()(r.el).find(".checkbox").each((function(t,r){ee()(this).checkbox("is checked")?(r=r.getAttribute(["data-key"]),o.push(r),n=!1):e=!1})),i.option.indeterminateIndex=o,e?t.checkbox("set checked"):n?t.checkbox("set unchecked"):t.checkbox("set indeterminate")}}))}))}},{key:"getIndeterminateIndex",value:function(){return this.option.indeterminateIndex}},{key:"setLabelStyle",value:function(e){this.labelEl.css(e)}},{key:"setLabelClass",value:function(e){this.labelEl.addClass(e)}},{key:"change",value:function(e){e?this.check():this.uncheck()}},{key:"indeterminate",value:function(){ee()(this.el.el).checkbox("set indeterminate")}},{key:"check",value:function(){ee()(this.el.el).checkbox("check")}},{key:"uncheck",value:function(){ee()(this.el.el).checkbox("uncheck")}},{key:"isCheck",value:function(){return ee()(this.el.el).checkbox("is checked")}},{key:"update",value:function(e){this.option=Object.assign(this.option,e)}}]),Object.defineProperty(Z,"prototype",{writable:!1}),he);function he(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=this,n=he;if(!(t instanceof n))throw new TypeError("Cannot call a class as a function");this.option=Object.assign(ae().cloneDeep(ce),e),this.label=this.option.label,this.el=null,this.labelEl=null,this.init()}function fe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function de(e,t){(e=me(e,t))[0]&&(t=ee()(e[0])).next().after(t)}function pe(e,t){(e=me(e,t))[0]&&(t=ee()(e[0])).prev().before(t)}function me(e,t){e=e.find("tr");var n=(Array.isArray(t)||(t=[t]),[]);return e.each((function(e,r){var i=r.getAttribute(["data-key"]);t.includes(i)&&n.push(r)})),n}function ge(e,t){var n,r=function(e,t){var n,r,i,o,a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(a)return i=!(r=!0),{s:function(){a=a.call(e)},n:function(){var e=a.next();return r=e.done,e},e:function(e){i=!0,n=e},f:function(){try{r||null==a.return||a.return()}finally{if(i)throw n}}};if(Array.isArray(e)||(a=function(e){var t;if(e)return"string"==typeof e?fe(e,void 0):"Map"===(t="Object"===(t=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:t)||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?fe(e,void 0):void 0}(e))||t&&e&&"number"==typeof e.length)return a&&(e=a),o=0,{s:t=function(){},n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(me(e,t));try{for(r.s();!(n=r.n()).done;){var i=n.value;ee()(i).remove()}}catch(e){r.e(e)}finally{r.f()}}var Ae=[{name:"下拉单选",value:"1",selected:!0},{name:"下拉多选",value:"2"},{name:"展开单选",value:"3"},{name:"展开多选",value:"4"},{name:"输入框",value:"10"},{name:"文本区间",value:"11"}],ve=[{name:"下拉单选",value:"1",selected:!0},{name:"下拉多选",value:"2"},{name:"展开单选",value:"3"},{name:"展开多选",value:"4"},{name:"输入框",value:"10"},{name:"数字区间",value:"7"}],be=[{name:"下拉单选",value:"1",selected:!0},{name:"下拉多选",value:"2"},{name:"展开单选",value:"3"},{name:"展开多选",value:"4"},{name:"输入框",value:"10"},{name:"日期选择",value:"8"},{name:"日期区间",value:"9"}],ye=[{name:"下拉单选",value:"1",selected:!0},{name:"下拉多选",value:"2"},{name:"展开单选",value:"3"},{name:"展开多选",value:"4"},{name:"输入框",value:"10"}],we=[{name:"下拉单选",value:"1",selected:!0},{name:"下拉多选",value:"2"},{name:"展开单选",value:"3"},{name:"展开多选",value:"4"},{name:"输入框",value:"10"}],xe=[{name:"下拉单选",value:"1",selected:!0},{name:"下拉多选",value:"2"},{name:"展开单选",value:"3"},{name:"展开多选",value:"4"},{name:"输入框",value:"10"},{name:"日期选择",value:"8"}],Ce={1:"下拉单选",2:"下拉多选",3:"展开单选",4:"展开多选",10:"输入框",7:"数字区间",8:"日期选择",9:"日期区间",5:"搜索框",11:"文本区间"};function ke(e){return(ke="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Ee=["name","styleType","required"],Se=(function(e,t){for(var n,r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(n=function(e){if("object"!==ke(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0===t)return String(e);if("object"!==ke(t=t.call(e,"string")))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}(i.key),"symbol"===ke(n)?n:String(n)),i)}}((Z=_e).prototype,[{key:"on",value:function(e,t){this.eventMap.set(e,t)}},{key:"trigger",value:function(e){var t=this.eventMap;if(t.has(e)){for(var n=arguments.length,r=new Array(1<n?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];(t=t.get(e)).call.apply(t,[this].concat(r))}}},{key:"init",value:function(){var e=this,t=ie("div","".concat(te,"-move_position")).children(ie("span").html("查询面板"),ie("i","x icon ".concat(te,"-xIcon")).on("click",(function(){e.hide(),e.trigger("close")}))),n=this.createToolbarEl(),r=this.createTableEl();this.tableEl=r,this.panelMainEl=ie("div","".concat(te,"-design-panel-main")).children(n,r),this.el=ie("div","".concat(te,"-design-panel")).children(t,this.panelMainEl).css({top:this.option.top,right:this.option.right,zIndex:this.option.zIndex,left:this.option.left,bottom:this.option.bottom})}},{key:"show",value:function(){this.el.show()}},{key:"hide",value:function(){this.el.hide()}},{key:"createToolbarEl",value:function(){var e=this,t=ie("div","".concat(te,"-button-add ").concat(te,"-flex")).children(ie("i","plus icon"),ie("span").innerHTML("添加")).on("click",(function(){e.$dialogEl.show()})),n=ie("div","".concat(te,"-button-remove ").concat(te,"-flex")).children(ie("i","minus icon"),ie("span").innerHTML("删除")).on("click",(function(){var t=e.indeterminateIndex,n=e.tableEl.el;ge(ee()(n),t)})),r=ie("div","".concat(te,"-button-up ").concat(te,"-flex")).children(ie("i","angle up icon"),ie("span").innerHTML("上移")).on("click",(function(){var t=e.indeterminateIndex,n=e.tableEl.el;pe(ee()(n),t)})),i=ie("div","".concat(te,"-button-down ").concat(te,"-flex")).children(ie("i","angle down icon"),ie("span").innerHTML("下移")).on("click",(function(){var t=e.indeterminateIndex,n=e.tableEl.el;de(ee()(n),t)}));return ie("div","".concat(te,"-design-panel-toolbar ").concat(te,"-flex")).children(t,n,r,i)}},{key:"createTableEl",value:function(){var e=ie("tbody"),t=(this.tbodyEl=e,this),n=(this.indeterminateCheckEl=new le({label:""}),this.indeterminateCheckEl),r=(this.indeterminateCheckEl.addEvent({onChange:function(){var r;n.isCheck()?(r=[],ee()(e.el).find(".checkbox").each((function(e,t){t=t.getAttribute(["data-key"]),r.push(t)})),t.indeterminateIndex=r,ee()(e.el).find(".checkbox").checkbox("check")):(t.indeterminateIndex=[],ee()(e.el).find(".checkbox").checkbox("uncheck"))}}),ie("div","".concat(te,"-checkContainer")).children(this.indeterminateCheckEl.el));r=ie("thead","full-width").children(ie("tr").children(ie("th").child(r).css({width:"40px"}),ie("th").innerHTML("查询名称").css({width:"100px"}),ie("th").innerHTML("查询样式").css({width:"90px"}),ie("th").innerHTML("必填").css({width:"70px"}),ie("th").innerHTML("操作")));return this.theadEl=r,ie("div").child(ie("table","".concat(te,"-table ui selectable compact celled small table")).children(r,e)).css({overflow:"auto",marginTop:"10px"})}},{key:"createTbodyEl",value:function(e,t){var n=this;e=ee()(e.el),t.forEach((function(e,t){n.addTableRow(e,t)}))}},{key:"checkBoxState",value:function(){var e=this.tbodyEl,t=[],n=0;ee()(e.el).find(".checkbox").each((function(e,r){ee()(r).checkbox("is checked")&&(r=r.getAttribute(["data-key"]),t.push(r)),n+=1})),ee()(e.el).find(".checkbox"),0==t.length?this.indeterminateCheckEl.uncheck():t.length==n?this.indeterminateCheckEl.check():this.indeterminateCheckEl.indeterminate(),this.indeterminateIndex=t}},{key:"addTableRow",value:function(e){var t,n,r,i=this,o=(e.id||(e.id=(new Date).getTime()),ie("tr").attr({"data-key":e.id,"data-orginal":JSON.stringify(e)})),a=(o.on("click",(function(e){})),this),s=(this.tbodyEl,new le({"data-key":e.id}));for(t in s.addEvent({onChange:function(){a.checkBoxState()}}),o.child(ie("td").child(s.el)),e)Ee.includes(t)&&(n=r=e[t],"required"==t?n=1==r?"是":"否":"styleType"==t&&(n=Ce[r]),r=ie("td"),(r="name"==t?ie("td","".concat(te,"-table-td-max_width")):r).attr({"data-key":t}).innerHTML(n),o.child(r));s=ie("i","edit outline icon ".concat(te,"-pointer")).on("click",(function(){var e=(i.editDom=o).attr("data-orginal");e=JSON.parse(e);i.$parent.dialogEl.show(e,"edit")}));var u=ie("i","trash alternate outline icon ".concat(te,"-pointer")).on("click",(function(){ee()(o.el).remove(),a.checkBoxState()}));s=ie("div","".concat(te,"-buttons ").concat(te,"-color-409eff")).children(s,u);o.child(ie("td").child(s)),this.tbodyEl.child(o)}},{key:"editTableData",value:function(e){try{this.editDom.attr({"data-orginal":JSON.stringify(e)}),ee()(this.editDom.el).find("td").each((function(){var t,n,r=ee()(this).attr("data-key");ee()(this),r&&(n=t=e[r],"required"==r?n=1==t?"是":"否":"styleType"==r&&(n=Ce[t]),this.innerHTML=n)}))}catch(e){}}},{key:"setData",value:function(e){this.data=e,this.createTbodyEl(this.tableEl,e)}},{key:"getData",value:function(){var e=[];return ee()(this.tbodyEl.el).find("tr").each((function(){var t=ee()(this).attr("data-orginal");e.push(JSON.parse(t))})),e}}]),Object.defineProperty(Z,"prototype",{writable:!1}),_e);Z=n(545);function _e(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},r=this,i=_e;if(!(r instanceof i))throw new TypeError("Cannot call a class as a function");this.$parent=e,this.$dialogEl=t,this.el=null,this.tableEl=null,this.theadEl=null,this.tbodyEl=null,this.panelMainEl=null,this.indeterminateCheckEl=null,this.option=n,this.currentRowData=null,this.currentRowDom=[],this.editDom=null,this.data=[],this.eventMap=new Map,this.init(),this.hide(),this.indeterminateIndex=[]}const Oe=n.n(Z)();var Te=n(881);function De(){var e=new Date;return e.setHours(0,0,0,0),e}function Be(e,t){return t=t||"yyyy-MM-dd","number"==typeof e?function(e,t){var n,r={"M+":e.getMonth()+1,"d+":e.getDate(),"D+":e.getDate(),"h+":e.getHours()%12==0?12:e.getHours()%12,"H+":e.getHours(),"m+":e.getMinutes(),"s+":e.getSeconds(),"q+":Math.floor((e.getMonth()+3)/3),S:e.getMilliseconds()};for(n in/([yY]+)/.test(t)&&(t=t.replace(RegExp.$1,(e.getFullYear()+"").substr(4-RegExp.$1.length))),/([eE]+)/.test(t)&&(t=t.replace(RegExp.$1,(1<RegExp.$1.length?2<RegExp.$1.length?"/u661f/u671f":"/u5468":"")+{0:"/u65e5",1:"/u4e00",2:"/u4e8c",3:"/u4e09",4:"/u56db",5:"/u4e94",6:"/u516d"}[e.getDay()+""])),r)new RegExp("("+n+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?r[n]:("00"+r[n]).substr((""+r[n]).length)));return t}(new Date(e),t):e}function Ie(e){return(Ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Me={range:!1,multipleDatesSeparator:"  -  ",timepicker:!1,size:"small",placeholder:"请选择日期",minDate:"",maxDate:""},je=(function(e,t){for(var n,r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(n=function(e){if("object"!==Ie(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0===t)return String(e);if("object"!==Ie(t=t.call(e,"string")))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}(i.key),"symbol"===Ie(n)?n:String(n)),i)}}((Z=Ne).prototype,[{key:"init",value:function(){var e=this,t=ie("input").attr({type:"text",placeholder:this.options.placeholder});this.el=ie("div","ui ".concat(this.options.size," icon input")).children(t,ie("i","calendar alternate outline icon ".concat(te,"-xIcon"))),this.datePicker=new Oe(t.el,{locale:Te.Z,range:this.options.range,multipleDatesSeparator:this.options.multipleDatesSeparator,timepicker:this.options.timepicker,minDate:this.options.minDate,maxDate:this.options.maxDate}),setTimeout((function(){ee()(e.datePicker.$container).addClass("".concat(te,"-datePicker"))}))}},{key:"getValue",value:function(){var e=this.datePicker.selectedDates[0];try{e=Be(e.getTime())}catch(t){e=null}return e}},{key:"getMulValue",value:function(){return this.datePicker.selectedDates.map((function(e){return Be(e.getTime())}))}},{key:"setValue",value:function(e){this.datePicker.selectDate(e)}}]),Object.defineProperty(Z,"prototype",{writable:!1}),Ne);function Ne(e){if(!(this instanceof Ne))throw new TypeError("Cannot call a class as a function");this.options=Object.assign(Me,e),this.el=null,this.datePicker=null,this.init()}function Fe(e){return(Fe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Re(e,t){var n,r,i,o,a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(a)return i=!(r=!0),{s:function(){a=a.call(e)},n:function(){var e=a.next();return r=e.done,e},e:function(e){i=!0,n=e},f:function(){try{r||null==a.return||a.return()}finally{if(i)throw n}}};if(Array.isArray(e)||(a=function(e){var t;if(e)return"string"==typeof e?Pe(e,void 0):"Map"===(t="Object"===(t=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:t)||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Pe(e,void 0):void 0}(e))||t&&e&&"number"==typeof e.length)return a&&(e=a),o=0,{s:t=function(){},n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Pe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Le(e,t){var n,r=Re(t);try{for(r.s();!(n=r.n()).done;)if(e==n.value.value)return 1}catch(e){r.e(e)}finally{r.f()}}var Ue=[{name:"日期",value:"1"},{name:"数字",value:"2"},{name:"文本",value:"3",selected:!0}],ze=[{name:"自定义",value:1,checked:"checked"},{name:"关联数据表",value:2}],He=[{name:"无",value:"0",selected:!0},{name:"第一行值",value:"1"},{name:"内容值全选",value:"2"}],$e=[{name:"无",value:"0",selected:!0},{name:"第一行值",value:"1"}],Qe=[{name:"默认",value:0,checked:"checked"},{name:"升序",value:1},{name:"降序",value:2}],Ve=[{name:"【大于等于】——【小于等于】",value:1,selected:!0},{name:"大于等于 —— 小于",value:2},{name:"大于 —— 小于等于",value:3},{name:"大于 —— 小于",value:4}],qe=[{name:"不进行数据过滤",value:"1",selected:!0},{name:"按空字符串进行过滤",value:"2"}],Ge=[{name:"无",value:1,checked:"checked"},{name:"动态值",value:2},{name:"自定义值",value:3}],We=[{name:"今日",value:1,selected:!0},{name:"本月初",value:2},{name:"本年初",value:3},{name:"本季度初",value:4},{name:"本周一",value:5},{name:"本月末",value:6},{name:"本年末",value:7},{name:"本季度末",value:8},{name:"本周末",value:9},{name:"昨日",value:11},{name:"前天",value:12},{name:"去年今日",value:13},{name:"上月今日",value:14},{name:"上月初",value:21},{name:"去年本月初",value:22},{name:"上年初",value:31},{name:"前年初",value:32},{name:"上季度初",value:41},{name:"去年本季度初",value:42},{name:"上周一",value:43},{name:"明年初",value:51},{name:"后年初",value:61}],Ke=[{name:"默认",value:1,checked:"checked"},{name:"设置范围",value:2}],Ye=[{name:"匹配",value:1},{name:"包含",value:2},{name:"开头是",value:4},{name:"结尾是",value:5},{name:"不包含",value:7},{name:"开头不是",value:9},{name:"结尾不是",value:10}],Xe=[{name:"等于",value:1},{name:"大于",value:3},{name:"大于等于",value:4},{name:"小于",value:5},{name:"小于等于",value:6},{name:"不等于",value:2}],Je=[{name:"是",value:1},{name:"否",value:2}],Ze=[{name:"无",value:0},{name:"单引号",value:1},{name:"多引号",value:2}],et={name:"",type:1,linkColumn:"",valueType:3,styleType:1,optionsType:1,options:[],defaultValue:"0",textDefaultValue:"",required:"1",defaultScheme:"1",isNull:1,actualValue:"",showValue:"",rangeType:1,startValue:"",endValue:"",dateDefaultValueType:1,dateRangeType:1,dateStartValue:"",dateEndValue:"",dateStartDefaultValue:"",dateEndDefaultValue:"",ignoreCase:2,conditionType:1,quoteType:0,linkSheet:"",sheetOptions:{actual:"",show:""},order:0},tt=(function(e,t){for(var n,r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(n=function(e){if("object"!==Fe(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0===t)return String(e);if("object"!==Fe(t=t.call(e,"string")))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}(i.key),"symbol"===Fe(n)?n:String(n)),i)}}((Z=nt).prototype,[{key:"sheetSelect",value:function(e){var t=this;this.columnsDatas=e,ee()(this.sheetActualEl.el).dropdown({onChange:function(e,n,r){n=t.getColumnSelectValue(n,t.columnsDatas),t.form.sheetOptions.actual=n?n.name:""},values:t.columnsDatas}),ee()(this.sheetShowEl.el).dropdown({onChange:function(e,n,r){n=t.getColumnSelectValue(n,t.columnsDatas),t.form.sheetOptions.show=n?n.name:""},values:t.columnsDatas})}},{key:"setSheetList",value:function(e){var t=this;this.sheetDatas=e,this.formVdom.linkSheet&&ee()(this.formVdom.linkSheet.el).dropdown({onChange:function(n,r,i){(r=t.getColumnSelectValue(r,e))?(t.form.linkSheet=r.name,t.sheetSelect(r.columns||[])):(t.form.linkSheet="",t.sheetSelect([])),r=t.getColumnSelectText(t.form.sheetOptions.actual,t.columnsDatas),t.setSelectValue(t.sheetActualEl,r),r=t.getColumnSelectText(t.form.sheetOptions.show,t.columnsDatas),t.setSelectValue(t.sheetShowEl,r)},values:e})}},{key:"configChange",value:function(){var e,t=this,n=this.form,r=(this.styleTypeContent=[],n.linkColumn||(n.valueType=3),this.getColumnSelectText(n.valueType,Ue)),i=(r=(this.setSelectValue(this.formVdom.valueType,r),n.styleType),r=(1==n.type?(i=this.getColumnSelectValue(n.linkColumn,this.columns),this.setSelectValue(this.formVdom.linkColumn1,i),this.linkColumnEl1.show(),this.linkColumnEl2.hide(),1==n.valueType?(this.styleDropdown(be),this.styleTypeContent=be):2==n.valueType?(this.styleDropdown(ve),this.styleTypeContent=ve):3==n.valueType&&(this.styleDropdown(Ae),this.styleTypeContent=Ae),Le(n.styleType,this.styleTypeContent)?n.styleType=r:n.styleType=1,i=this.getColumnSelectText(n.styleType,this.styleTypeContent),this.setSelectValue(this.formVdom.styleType,i)):2==n.type&&(i=this.getColumnSelectValue(n.linkColumn,this.datasetParams),this.setSelectValue(this.formVdom.linkColumn2,i),this.linkColumnEl1.hide(),this.linkColumnEl2.show(),1==n.valueType?(this.styleDropdown(xe),this.styleTypeContent=xe):2==n.valueType?(this.styleDropdown(we),this.styleTypeContent=we):3==n.valueType&&(this.styleDropdown(ye),this.styleTypeContent=ye),Le(n.styleType,this.styleTypeContent)?n.styleType=r:n.styleType=1,i=this.getColumnSelectText(n.styleType,this.styleTypeContent),this.setSelectValue(this.formVdom.styleType,i)),null),n.conditionType);r=3==n.valueType?(ee()(this.formVdom.conditionType.el).dropdown({onChange:function(e,n,r){t.form.conditionType=e},values:Ye}),1):(ee()(this.formVdom.conditionType.el).dropdown({onChange:function(e,n,r){t.form.conditionType=e},values:Xe}),2),n.conditionType=i,i=1==r?Ye:Xe,Le(n.conditionType,i)?(i=this.getColumnSelectText(n.conditionType,i),this.setSelectValue(this.formVdom.conditionType,i)):(n.conditionType=1,this.setSelectValue(this.formVdom.conditionType,1==r?{name:"匹配",value:1}:{name:"等于",value:1})),i=n.defaultValue,r=null;2==n.styleType||4==n.styleType?(ee()(this.formVdom.defaultValue1.el).dropdown({onChange:function(e,n,r){2!=t.form.styleType&&4!=t.form.styleType||(t.form.defaultValue=e)},values:He}),r=He,n.defaultValue=i,e=this.getColumnSelectText(n.defaultValue,r),this.setSelectValue(this.formVdom.defaultValue1,e)):(ee()(this.formVdom.defaultValue1.el).dropdown({onChange:function(e,n,r){1!=t.form.styleType&&3!=t.form.styleType||(t.form.defaultValue=e)},values:$e}),r=$e,n.defaultValue=i,e=this.getColumnSelectText(n.defaultValue,r),this.setSelectValue(this.formVdom.defaultValue1,e))}},{key:"setDefaultValue",value:function(){}},{key:"styleTypeChange",value:function(){var e,t=this,n=this.form,r=(this.showContentByType1(n.styleType),this.showContentByType2(n.styleType),this.showContentByType3(n.styleType),this.showContentByType4(n.styleType),this.dataRangeStyle(n.styleType,n.dateDefaultValueType),this.ignoreCaseShow(),null);n=n.defaultValue;2==t.form.styleType||4==t.form.styleType?(ee()(t.formVdom.defaultValue1.el).dropdown({onChange:function(e,n,r){2!=t.form.styleType&&4!=t.form.styleType||(t.form.defaultValue=e)},values:He}),r=He,t.form.defaultValue=n,e=t.getColumnSelectText(t.form.defaultValue,r),this.setSelectValue(t.formVdom.defaultValue1,e)):(ee()(t.formVdom.defaultValue1.el).dropdown({onChange:function(e,n,r){1!=t.form.styleType&&3!=t.form.styleType||(t.form.defaultValue=e)},values:$e}),r=$e,t.form.defaultValue=n,e=t.getColumnSelectText(t.form.defaultValue,r),this.setSelectValue(t.formVdom.defaultValue1,e))}},{key:"ignoreCaseShow",value:function(){1==this.form.type?(1==this.form.valueType||2==this.form.valueType?this.ignoreCaseEl.hide():this.ignoreCaseEl.show(),this.conditionTypeEl.show(),this.quoteTypeEl.hide()):(this.ignoreCaseEl.hide(),this.conditionTypeEl.hide(),2==this.form.styleType||4==this.form.styleType?this.quoteTypeEl.show():this.quoteTypeEl.hide()),this.showContentByType3(this.form.styleType)}},{key:"bindEvent",value:function(){var e=this,t=this;this.formVdom.name.on("input",(function(t){t=t.target.value,(e.form.name=t)&&ee()(e.queryNameEl.el).find(".".concat(te,"-item__error")).hide()})),this.each(ee()(this.typeEl.el).find("[name=type]"),(function(e){ie(e).on("change",(function(){var e=t.getRadioElValue(t.formVdom.type,"type");t.form.type=Number(e),t.form.linkColumn="",t.configChange(),t.styleTypeChange()}))})),ee()(this.formVdom.linkColumn1.el).dropdown({onChange:function(e,n,r){(n=t.getColumnSelectValue(n,t.columns))?(t.form.linkColumn=n.name,t.form.valueType=n.data_type,t.setSelectValue(t.formVdom.valueType,Ue[n.data_type-1])):(t.form.linkColumn="",t.form.valueType=3,t.setSelectValue(t.formVdom.valueType,Ue[2])),ee()(t.linkColumnEl1.el).find(".".concat(te,"-item__error")).hide(),t.configChange(),t.styleTypeChange()}}),ee()(this.formVdom.linkColumn2.el).dropdown({onChange:function(e,n,r){(n=t.getColumnSelectValue(n,t.datasetParams))?(t.form.linkColumn=n.name,t.form.valueType=n.data_type,t.setSelectValue(t.formVdom.valueType,Ue[n.data_type-1])):(t.form.linkColumn="",t.form.valueType=3,t.setSelectValue(t.formVdom.valueType,Ue[2])),ee()(t.linkColumnEl1.el).find(".".concat(te,"-item__error")).hide(),t.configChange(),t.styleTypeChange()}}),ee()(this.formVdom.styleType.el).dropdown({onChange:function(e,n,r){t.form.styleType=e}}),this.each(ee()(this.selectOptionsEl.el).find("[name=optionsType]"),(function(e){ie(e).on("change",(function(){var e=t.getRadioElValue(t.formVdom.optionsType,"optionsType");t.form.optionsType=Number(e),t.showContentByType1(t.form.styleType)}))})),this.each(ee()(this.orderEl.el).find("[name=order]"),(function(e){ie(e).on("change",(function(){var e=t.getRadioElValue(t.formVdom.order,"order");t.form.order=Number(e)}))})),ee()(this.formVdom.isNull.el).dropdown({onChange:function(e,n,r){t.form.isNull=e}}),ee()(this.formVdom.rangeType.el).dropdown({onChange:function(e,n,r){t.form.rangeType=e}}),ee()(this.formVdom.conditionType.el).dropdown({onChange:function(e,n,r){t.form.conditionType=e}}),this.each(ee()(this.ignoreCaseEl.el).find("[name=ignoreCase]"),(function(e){ie(e).on("change",(function(){var e=t.getRadioElValue(t.formVdom.ignoreCase,"ignoreCase");t.form.ignoreCase=Number(e)}))})),this.each(ee()(this.quoteTypeEl.el).find("[name=quoteType]"),(function(e){ie(e).on("change",(function(){var e=t.getRadioElValue(t.formVdom.quoteType,"quoteType");t.form.quoteType=Number(e)}))})),this.formVdom.startValue.on("input",(function(t){t=t.target.value,e.form.startValue=t})),this.formVdom.endValue.on("input",(function(t){t=t.target.value,e.form.endValue=t})),ee()(this.formVdom.defaultValue1.el).dropdown({onChange:function(e,n,r){t.form.defaultValue=e}}),this.formVdom.inputDefaultValue.on("input",(function(t){t=t.target.value,e.form.textDefaultValue=t})),this.each(ee()(this.defaultValueTypeEl.el).find("[name=dateDefaultValueType]"),(function(e){ie(e).on("change",(function(){var e=t.getRadioElValue(t.formVdom.dateDefaultValueType,"dateDefaultValueType");t.form.dateDefaultValueType=Number(e),t.dataRangeStyle(t.form.styleType,t.form.dateDefaultValueType)}))})),ee()(this.formVdom.dateTrendsValue.el).dropdown({onChange:function(e,n,r){t.form.defaultValue=e}}),this.formVdom.dateCustomValue.datePicker.opts.onSelect=function(e){e.date,e.datepicker,e=e.formattedDate,t.form.defaultValue=e},this.formVdom.dateCustomValue1.datePicker.opts.onSelect=function(e){e.date,e.datepicker,e=e.formattedDate,t.form.defaultValue=e},this.each(ee()(this.dateRangeEl.el).find("[name=dateRangeType]"),(function(n){ie(n).on("change",(function(){var n=t.getRadioElValue(t.formVdom.dateRangeType,"dateRangeType");t.form.dateRangeType=Number(n),1==t.form.dateRangeType?(e.dateStartValueEl.hide(),e.dateEndValueEl.hide()):(e.dateStartValueEl.show(),e.dateEndValueEl.show())}))})),this.formVdom.dateStartValue.datePicker.opts.onSelect=function(e){e.date,e.datepicker,e=e.formattedDate,t.form.dateStartValue=e},this.formVdom.dateEndValue.datePicker.opts.onSelect=function(e){e.date,e.datepicker,e=e.formattedDate,t.form.dateEndValue=e},ee()(this.formVdom.dateStartDefaultValue.el).dropdown({onChange:function(e,n,r){t.form.dateStartDefaultValue=e}}),ee()(this.formVdom.dateEndDefaultValue.el).dropdown({onChange:function(e,n,r){t.form.dateEndDefaultValue=e}}),this.each(ee()(this.requireEl.el).find("[name=required]"),(function(e){ie(e).on("change",(function(){var e=t.getRadioElValue(t.formVdom.required,"required");t.form.required=Number(e)}))})),this.each(ee()(this.defaultSchemeEl.el).find("[name=defaultScheme]"),(function(e){ie(e).on("change",(function(){var e=t.getRadioElValue(t.formVdom.defaultScheme,"defaultScheme");t.form.defaultScheme=Number(e)}))}))}},{key:"setColumns",value:function(e){var t=this;this.columns=e,ee()(this.formVdom.linkColumn1.el).dropdown({onChange:function(e,n,r){var i;(n=t.getColumnSelectValue(n,t.columns))?(i=n.data_type,t.form.linkColumn=n.name,t.form.valueType=n.data_type,t.setSelectValue(t.formVdom.valueType,Ue[i-1])):(t.form.linkColumn="",t.form.valueType=3,t.setSelectValue(t.formVdom.valueType,Ue[2])),ee()(t.linkColumnEl1.el).find(".".concat(te,"-item__error")).hide(),t.configChange(),t.styleTypeChange()},values:this.columns})}},{key:"setDatasetParams",value:function(e){var t=this;this.datasetParams=e,ee()(this.formVdom.linkColumn2.el).dropdown({onChange:function(e,n,r){var i;(n=t.getColumnSelectValue(n,t.datasetParams))?(t.form.linkColumn=n.name,i=n.data_type,t.form.valueType=n.data_type,t.setSelectValue(t.formVdom.valueType,Ue[i-1])):(t.form.linkColumn="",t.form.valueType=3,t.setSelectValue(t.formVdom.valueType,Ue[2])),ee()(t.linkColumnEl2.el).find(".".concat(te,"-item__error")).hide(),t.configChange(),t.styleTypeChange()},values:this.datasetParams})}},{key:"setModel",value:function(e){this.model=e,e=this.getTitle(),this.titleEl.innerHTML(e)}},{key:"getTitle",value:function(){return"add"==this.model?"添加查询条件":"编辑查询条件"}},{key:"init",value:function(){var e=this;this.titleEl=ie("span"),this.bodyEl=ie("div","".concat(te,"-dialog__body")),this.headEl=ie("div","".concat(te,"-dialog__header")).children(this.titleEl.innerHTML(this.getTitle()),ie("i","x icon ".concat(te,"-xIcon")).on("click",(function(){e.hide()}))),this.footerEl=ie("div","".concat(te,"-dialog__footer")).children(ie("div").children(ie("button","ui primary button").innerHTML("确 定").on("click",(function(){e.submit()})),ie("button","ui basic button").innerHTML("取 消").on("click",(function(){e.hide()})))),this.createFormEl(),this.bindEvent(),this.el=ie("div","".concat(te,"-design-params_dialog ui modal")).children(this.headEl,this.bodyEl,this.footerEl),ee()(this.el.el).modal({closable:!1,autofocus:!1,allowMultiple:!0})}},{key:"each",value:function(e,t){for(var n=0;n<e.length;n++)t(e[n],n)}},{key:"setSelectValue",value:function(e,t){t?ee()(e.el).dropdown("set selected",t.name):ee()(e.el).dropdown("clear")}},{key:"isLinkSheet",value:function(e){1==e?(this.optionsEl.show(),this.dataSetOptionsEl.hide(),this.linkSheetEl.hide(),this.orderEl.hide()):(this.optionsEl.hide(),this.dataSetOptionsEl.show(),this.linkSheetEl.show(),this.orderEl.show())}},{key:"showContentByType1",value:function(e){1==e||2==e||3==e||4==e?(this.selectOptionsEl.show(),this.defaultValueEl.show(),this.isLinkSheet(this.form.optionsType)):(this.selectOptionsEl.hide(),this.defaultValueEl.hide(),this.optionsEl.hide(),this.dataSetOptionsEl.hide(),this.linkSheetEl.hide(),this.orderEl.hide()),this.searchValueIsNullEl.hide()}},{key:"showContentByType2",value:function(e){10==e?this.defaultValue1El.show():this.defaultValue1El.hide()}},{key:"showContentByType3",value:function(e){7==e||11==e?(this.RangeTypeEl.show(),this.startValueEl.show(),this.endValueEl.show(),this.conditionTypeEl.hide()):(this.RangeTypeEl.hide(),this.startValueEl.hide(),this.endValueEl.hide(),this.conditionTypeEl.show()),9==e&&(this.RangeTypeEl.show(),this.conditionTypeEl.hide())}},{key:"showContentByType4",value:function(e){8==e||9==e?(this.defaultValueTypeEl.show(),this.dateRangeEl.show()):(this.defaultValueTypeEl.hide(),this.dateRangeEl.hide())}},{key:"createFormEl",value:function(){var e=this.createFormInputEl({require:!0,title:"查询条件名称",placeholder:"查询条件名称",name:"name",requireTip:"请输入门店名称"}),t=(this.queryNameEl=e,this.createFormRadioEl({require:!0,title:"作用类型",name:"type",requireTip:"请选择作用类型",data:[{name:"数据表中字段",value:1,checked:"checked"},{name:"数据表中参数",value:2}]})),n=(this.typeEl=t,this.createFormSelectEl({require:!1,title:"查询值类型",name:"valueType",data:Ue,disabled:!0})),r=(this.searchValueTypeEl=n,this.createFormSelectEl({require:!0,title:"关联字段",name:"linkColumn1",requireTip:"请选择关联字段",data:this.columns})),i=(this.linkColumnEl1=r,this.createFormSelectEl({require:!0,title:"关联参数",name:"linkColumn2",requireTip:"请选择关联参数",data:this.datasetParams}).hide()),o=(this.linkColumnEl2=i,this.createOptions({title:""})),a=this.createOptions({title:""},!0),s=(this.optionsEl=o,this.dataSetOptionsEl=a,this.dataSetOptionsEl.hide(),this.createFormSelectEl({require:!1,title:"",name:"linkSheet",data:[]}).hide()),u=(this.linkSheetEl=s,this.createFormRadioEl({require:!1,title:"提示框内容",name:"optionsType",requireTip:"",data:ze})),c=(this.selectOptionsEl=u,this.createFormSelectEl({require:!1,title:"查询值为空时",name:"isNull",data:qe}).hide()),l=(this.searchValueIsNullEl=c,this.createFormSelectEl({require:!1,title:"区间作用方式",name:"rangeType",data:Ve}).hide()),h=(this.RangeTypeEl=l,this.createFormSelectEl({require:!1,title:"作用方式",name:"conditionType",data:Ye}).hide()),f=(this.conditionTypeEl=h,this.createFormRadioEl({require:!1,title:"忽略大小写",name:"ignoreCase",requireTip:"",data:Je}).hide()),d=(this.ignoreCaseEl=f,this.createFormRadioEl({require:!1,title:"添加引号",name:"quoteType",requireTip:"",data:Ze}).hide()),p=(this.quoteTypeEl=d,this.createFormInputEl({require:!1,title:"起始默认值",placeholder:"请输入起始默认值",name:"startValue",requireTip:""}).hide()),m=(this.startValueEl=p,this.createFormInputEl({require:!1,title:"截止默认值",placeholder:"请输入截止默认值",name:"endValue",requireTip:""}).hide()),g=(this.endValueEl=m,this.createFormSelectEl({require:!1,title:"默认值",name:"defaultValue1",data:$e})),A=(this.defaultValueEl=g,this.createFormInputEl({require:!1,title:"默认值",placeholder:"请输入默认值",name:"inputDefaultValue",requireTip:""}).hide()),v=(this.defaultValue1El=A,this.createFormRadioEl({require:!1,title:"默认值",name:"dateDefaultValueType",requireTip:"",data:Ge}).hide()),b=(this.defaultValueTypeEl=v,this.createFormSelectEl({require:!1,title:"日期默认值",name:"dateTrendsValue",data:We}).hide()),y=(this.dateTrendsValueEl=b,this.createFormDateInputEl({require:!1,title:"日期默认值",placeholder:"日期默认值",name:"dateCustomValue",requireTip:""}).hide()),w=(this.dateCustomValueEl=y,this.createFormDateInputEl({require:!1,title:"日期默认值",placeholder:"日期默认值",name:"dateCustomValue1",requireTip:"",range:!0}).hide()),x=(this.dateCustomValueEl1=w,this.createFormRadioEl({require:!1,title:"可选区间",name:"dateRangeType",requireTip:"",data:Ke}).hide()),C=(this.dateRangeEl=x,this.createFormDateInputEl({require:!1,title:"起始值",placeholder:"起始值",name:"dateStartValue",requireTip:""}).hide()),k=(this.dateStartValueEl=C,this.createFormDateInputEl({require:!1,title:"截止值",placeholder:"截止值",name:"dateEndValue",requireTip:""}).hide()),E=(this.dateEndValueEl=k,this.createFormSelectEl({require:!1,title:"日期默认值",name:"dateStartDefaultValue",data:We}).hide()),S=(this.dateStartDefaultValueEl=E,this.createFormSelectEl({require:!1,title:"日期默认值",name:"dateEndDefaultValue",data:We}).hide()),_=(this.dateEndDefaultValueEl=S,this.createFormSelectEl({require:!1,title:"查询样式",name:"styleType",data:Ae})),O=(this.searchStyleTypeEl=_,this.createFormSelectEl({require:!1,title:"实际值",name:"actualValue",data:[]}).hide()),T=this.createFormSelectEl({require:!1,title:"显示值",name:"showValue",data:[]}).hide(),D=this.createFormRadioEl({require:!1,title:"",name:"order",requireTip:"",data:Qe,lineTitle:"排序"}).show(),B=(this.orderEl=D,this.createFormRadioEl({require:!1,title:"必填",name:"required",requireTip:"",data:[{name:"是",value:1,checked:"checked"},{name:"否",value:2}]})),I=(this.requireEl=B,this.createFormRadioEl({require:!1,title:"默认方案",name:"defaultScheme",requireTip:"",data:[{name:"是",value:1,checked:"checked"},{name:"否",value:2}]}).hide());this.defaultSchemeEl=I,this.formEl=ie("div","ui form"),this.formEl.children(e,t,r,i,n,_,h,l,f,u,o,s,a,O,T,D,d,g,v,b,y,w,E,S,x,C,k,c,A,p,m,B,I),this.bodyEl.children(this.formEl)}},{key:"submit",value:function(){this.formValidate()&&(this.form.optionsType=this.getRadioElValue(this.formVdom.optionsType,"optionsType"),this.form.options=this.getOptionsTableData(this.formVdom.options),"add"==this.model?(this.form.id=(new Date).getTime(),this.form,this.$parent.panelEl.addTableRow(this.form),this.$parent.panelEl.checkBoxState()):(this.form,this.$parent.panelEl.editTableData(this.form)),this.hide())}},{key:"dataRangeStyle",value:function(e,t){1==t?(this.dateTrendsValueEl.hide(),this.dateCustomValueEl.hide(),this.dateStartDefaultValueEl.hide(),this.dateEndDefaultValueEl.hide(),this.dateCustomValueEl1.hide()):2==t?(8==e?(this.dateTrendsValueEl.show(),this.dateCustomValueEl.hide(),this.dateStartDefaultValueEl.hide(),this.dateEndDefaultValueEl.hide()):9==e?(this.dateTrendsValueEl.hide(),this.dateCustomValueEl.hide(),this.dateStartDefaultValueEl.show(),this.dateEndDefaultValueEl.show()):(this.dateTrendsValueEl.hide(),this.dateCustomValueEl.hide(),this.dateStartDefaultValueEl.hide(),this.dateEndDefaultValueEl.hide()),this.dateCustomValueEl1.hide()):3==t&&(8==e?(this.dateTrendsValueEl.hide(),this.dateCustomValueEl.show(),this.dateStartDefaultValueEl.hide(),this.dateEndDefaultValueEl.hide(),this.dateCustomValueEl1.hide()):9==e?(this.dateTrendsValueEl.hide(),this.dateCustomValueEl.hide(),this.dateStartDefaultValueEl.hide(),this.dateEndDefaultValueEl.hide(),this.dateCustomValueEl1.show()):(this.dateTrendsValueEl.hide(),this.dateCustomValueEl.hide(),this.dateStartDefaultValueEl.hide(),this.dateEndDefaultValueEl.hide(),this.dateCustomValueEl1.hide()))}},{key:"styleDropdown",value:function(e){var t=this;ee()(t.formVdom.styleType.el).dropdown({onChange:function(n,r,i){(r=t.getColumnSelectValue(r,e))&&(t.form.styleType=r.value),t.styleTypeChange()},values:e})}},{key:"getFormfieldValue",value:function(){var e=this.getSelectElValue(this.formVdom.styleType),t=ae().cloneDeep(et);return t.name=this.getInputElValue(this.formVdom.name),t.type=this.getRadioElValue(this.formVdom.type,"type"),1==t.type?t.linkColumn=this.getSelectElText(this.formVdom.linkColumn1):t.linkColumn=this.getSelectElText(this.formVdom.linkColumn2),t.valueType=this.getSelectElValue(this.formVdom.valueType),t.styleType=e,t.required=this.getRadioElValue(this.formVdom.required,"required"),t.defaultScheme=this.getRadioElValue(this.formVdom.defaultScheme,"defaultScheme"),1==e||2==e||3==e||4==e?this.getFormfieldValue1(t):10==e?this.getFormfieldValue2(t):8==e||9==e?this.getFormfieldValue3(t):7==e&&this.getFormfieldValue4(t),t}},{key:"getFormfieldValue1",value:function(e){e.optionsType=this.getRadioElValue(this.formVdom.optionsType,"optionsType"),e.options=this.getOptionsTableData(this.formVdom.options),e.defaultValue=this.getSelectElValue(this.formVdom.defaultValue1),e.isNull=this.getSelectElValue(this.formVdom.isNull),e.linkSheet=this.getSelectElValue(this.formVdom.linkSheet),e.order=this.getRadioElValue(this.formVdom.order,"order"),e.sheetOptions.actual=this.getSelectElValue(this.sheetActualEl),e.sheetOptions.show=this.getSelectElValue(this.sheetShowEl)}},{key:"getFormfieldValue2",value:function(e){e.textDefaultValue=this.getInputElValue(this.formVdom.inputDefaultValue)}},{key:"getFormfieldValue3",value:function(e){e.dateDefaultValueType=this.getRadioElValue(this.formVdom.dateDefaultValueType,"dateDefaultValueType"),2==e.dateDefaultValueType?8==e.styleType?e.defaultValue=this.getSelectElValue(this.formVdom.dateTrendsValue):9==e.styleType&&(e.dateStartDefaultValue=this.getSelectElValue(this.formVdom.dateStartDefaultValue),e.dateEndDefaultValue=this.getSelectElValue(this.formVdom.dateEndDefaultValue)):3==e.dateDefaultValueType&&(8==e.styleType?e.defaultValue=this.formVdom.dateCustomValue.getValue():9==e.styleType&&(e.defaultValue=this.formVdom.dateCustomValue1.getValue())),e.dateRangeType=this.getRadioElValue(this.formVdom.dateRangeType,"dateRangeType"),2==e.dateRangeType&&(e.dateStartValue=this.formVdom.dateStartValue.getValue(),e.dateEndValue=this.formVdom.dateEndValue.getValue()),e.rangeType=this.getSelectElValue(this.formVdom.rangeType),e.isNull=this.getSelectElValue(this.formVdom.isNull)}},{key:"getFormfieldValue4",value:function(e){e.rangeType=this.getRadioElValue(this.formVdom.rangeType,"rangeType"),e.startValue=this.getInputElValue(this.formVdom.startValue),e.endValue=this.getInputElValue(this.formVdom.endValue)}},{key:"formValidate",value:function(){var e=!0,t=(this.getInputElValue(this.formVdom.name)||(e=!1,ee()(this.queryNameEl.el).find(".".concat(te,"-item__error")).show()),this.getRadioElValue(this.formVdom.type,"type"));return t||(e=!1),1==t?this.getSelectElText(this.formVdom.linkColumn1)||(e=!1,ee()(this.linkColumnEl1.el).find(".".concat(te,"-item__error")).show()):2!=t||this.getSelectElText(this.formVdom.linkColumn2)||(e=!1,ee()(this.linkColumnEl2.el).find(".".concat(te,"-item__error")).show()),e}},{key:"getOptionsTableData",value:function(e){e=ee()(e.el).find("tr");var t=[];return this.each(e,(function(e){var n={};ee()(e).each((function(){ee()(this).find("input").each((function(e){var t=ee()(this).val();0==e?n.name=t:n.value=t}))})),t.push(n)})),t}},{key:"setOptionsTableData",value:function(e,t){var n=this;e.innerHTML(""),t.forEach((function(t){n.addOptionsTableRow(e,t)}))}},{key:"addOptionsTableRow",value:function(e,t){t=t||{name:"",value:""};var n=ie("input").attr({type:"text"}),r=ie("input").attr({type:"text"}),i=(ee()(n.el).val(t.name),ee()(r.el).val(t.value),ie("tr").children(ie("td").child(ie("div","ui input mini").child(n).css({width:"120px"})),ie("td").child(ie("div","ui input mini").child(r).css({width:"120px"})),ie("td").child(ie("i","minus circle icon ".concat(te,"-xIcon-primary")).on("click",(function(){ee()(i.el).remove()})))));e.child(i)}},{key:"addOptionsTableRow1",value:function(e,t){t=t||[];var n=ie("div","menu"),r=ie("div","menu");n=ie("div","ui selection dropdown").children(ie("input").attr({type:"hidden",name:"name"}),ie("i","dropdown icon"),ie("div","default text").innerHTML("请选择"),n).css({"min-width":"150px"}),r=ie("div","ui selection dropdown").children(ie("input").attr({type:"hidden",name:"value"}),ie("i","dropdown icon"),ie("div","default text").innerHTML("请选择"),r).css({"min-width":"150px"}),this.sheetActualEl=n,this.sheetShowEl=r,ee()(n.el).dropdown({values:t}),ee()(r.el).dropdown({values:t}),t=ie("tr").children(ie("td").child(r),ie("td").child(n));e.child(t)}},{key:"createOptions",value:function(e,t){var n=this,r=ie("table","ui celled table"),i=ie("tbody"),o=ie("thead"),a=ie("tr");return r.children(o.child(a.children(ie("th").innerHTML("显示值"),ie("th").innerHTML("实际值"))),i),t?(n.formVdom.dataSetOptions=i,n.addOptionsTableRow1(i)):(n.formVdom.options=i,a.children(ie("th").child(ie("i","plus circle icon ".concat(te,"-xIcon-primary")).on("click",(function(){n.addOptionsTableRow(i)}))))),ie("div","".concat(te,"-form_item field")).children(ie("div").children(ie("span","".concat(e.require?"require":"span_padding")).innerHTML("".concat(e.title)),ie("div","".concat(te,"-item_content")).children(r)).css({display:"flex","align-items":"center",width:"100%"}))}},{key:"createFormSelectOptionEl",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],t=1<arguments.length?arguments[1]:void 0;e.forEach((function(e){t.child(ie("div","item").attr({"data-value":e.value}).innerHTML(e.name))}))}},{key:"createFormSelectEl",value:function(e){var t="ui selection dropdown",n=(e.disabled&&(t+=" disabled"),ie("div","menu"));t=ie("div",t).children(ie("input").attr({type:"hidden",name:e.name}),ie("i","dropdown icon"),ie("div","default text").innerHTML(e.placeholder||""),n).css({width:"100%"}),n=ie("div","".concat(te,"-form_item field")).children(ie("div").children(ie("span","".concat(e.require?"require":"span_padding")).innerHTML("".concat(e.title)),ie("div","".concat(te,"-item_content")).children(t,ie("div","".concat(te,"-item__error")).innerHTML("".concat(e.requireTip)))).css({display:"flex","align-items":"center",width:"100%"}));return ee()(t.el).dropdown({values:e.data}),this.formVdom[e.name]=t,n}},{key:"createFormInputEl",value:function(e){var t=ie("input").attr({type:"text",placeholder:"".concat(e.placeholder),name:"".concat(e.name),autocomplete:"off"});return this.formVdom[e.name]=t,ie("div","".concat(te,"-form_item field")).children(ie("div").children(ie("span","".concat(e.require?"require":"span_padding")).innerHTML("".concat(e.title)),ie("div","".concat(te,"-item_content")).children(ie("div","ui input").children(t),ie("div","".concat(te,"-item__error")).innerHTML("".concat(e.requireTip)))).css({display:"flex","align-items":"center",width:"100%"}))}},{key:"createFormDateInputEl",value:function(e){var t=new je({range:e.range||!1});return e.range||t.setValue((new Date).getTime()),this.formVdom[e.name]=t,ie("div","".concat(te,"-form_item field")).children(ie("div").children(ie("span","".concat(e.require?"require":"span_padding")).innerHTML("".concat(e.title)),ie("div","".concat(te,"-item_content")).children(t.el,ie("div","".concat(te,"-item__error")).innerHTML("".concat(e.requireTip)))).css({display:"flex","align-items":"center",width:"100%"}))}},{key:"createFormRadioEl",value:function(e){var t,n=this,r=ie("div","".concat(te,"-item_content"));this.formVdom[e.name]=r,e.lineTitle&&(t=ie("span"),r.children(t.innerHTML(e.lineTitle).css({"padding-right":"30px"})));var i,o=null,a=Re(e.data);try{for(a.s();!(i=a.n()).done;){var s=i.value,u=ie("input").attr({type:"radio",name:e.name,value:s.value}),c=ie("div","ui radio checkbox").children(u,ie("label").innerHTML(s.name)).css({marginRight:"20px"});s.checked?(ee()(u.el).checkbox("check"),o=s.value):ee()(c.el).checkbox(),r.child(c)}}catch(e){a.e(e)}finally{a.f()}return setTimeout((function(){null!=o&&n.setRadioElValue(r,e.name,o)})),ie("div","".concat(te,"-form_item field")).children(ie("div").children(ie("span","".concat(e.require?"require":"span_padding")).innerHTML("".concat(e.title)),r.children(ie("div","".concat(te,"-item__error")).innerHTML("".concat(e.requireTip)))).css({display:"flex","align-items":"center",width:"100%"}))}},{key:"getRadioElValue",value:function(e,t){return ee()(e.el).find("[name=".concat(t,"]:checked")).val()}},{key:"setRadioElValue",value:function(e,t,n){ee()(e.el).find("[name=".concat(t,"]")).each((function(){ee()(this).val()==n&&ee()(this).prop("checked",!0)}))}},{key:"getInputElValue",value:function(e){return ee()(e.el).val()}},{key:"setInputElvalue",value:function(e,t){ee()(e.el).val(t)}},{key:"getSelectElValue",value:function(e){return ee()(e.el).dropdown("get value")}},{key:"getSelectElText",value:function(e){return ee()(e.el).dropdown("get text")}},{key:"show",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"add";e=e||ae().cloneDeep(et),this.form=e,void 0===this.form.order&&(this.form.order=0),void 0===this.form.linkSheet&&(this.form.linkSheet=""),void 0===this.form.sheetOptions&&(this.form.sheetOptions={actual:"",show:""}),this.setModel(t),this.setFormFieldValue(e),this.configChange(),this.styleTypeChange(),ee()(this.el.el).modal("show")}},{key:"getColumnSelectValue",value:function(e,t){return t.filter((function(t){if(t.name==e)return t}))[0]}},{key:"getColumnSelectText",value:function(e,t){return t.filter((function(t){if(t.value==e)return t}))[0]}},{key:"setFormFieldValue",value:function(e){this.setInputElvalue(this.formVdom.name,e.name),this.setRadioElValue(this.formVdom.type,"type",e.type),1==e.type?(t=this.getColumnSelectValue(e.linkColumn,this.columns),this.setSelectValue(this.formVdom.linkColumn1,t),this.linkColumnEl1.show(),this.linkColumnEl2.hide()):2==e.type&&(t=this.getColumnSelectValue(e.linkColumn,this.datasetParams),this.setSelectValue(this.formVdom.linkColumn2,t),this.linkColumnEl1.hide(),this.linkColumnEl2.show());var t=this.getColumnSelectText(e.valueType,Ue),n=(t=(this.setSelectValue(this.formVdom.valueType,t),this.getColumnSelectText(e.styleType,Ae)),t=(this.setSelectValue(this.formVdom.styleType,t),this.setRadioElValue(this.formVdom.optionsType,"optionsType",e.optionsType),this.getColumnSelectText(e.linkSheet,this.sheetDatas)),t=(this.setSelectValue(this.formVdom.linkSheet,t),this.setRadioElValue(this.formVdom.order,"order",e.order),this.setOptionsTableData(this.formVdom.options,e.options),this.setRadioElValue(this.formVdom.required,"required",e.required),this.setRadioElValue(this.formVdom.defaultScheme,"defaultScheme",e.defaultScheme),1==e.styleType||2==e.styleType||3==e.styleType||4==e.styleType?(t=this.getColumnSelectText(e.defaultValue,$e),this.setSelectValue(this.formVdom.defaultValue1,t)):this.setSelectValue(this.formVdom.defaultValue1,{name:"无",value:"0"}),this.setRadioElValue(this.formVdom.ignoreCase,"ignoreCase",e.ignoreCase),3==this.form.valueType?this.getColumnSelectText(this.form.conditionType,Ye):this.getColumnSelectText(this.form.conditionType,Xe)),t=(this.setSelectValue(this.formVdom.conditionType,t),this.setRadioElValue(this.formVdom.quoteType,"quoteType",this.form.quoteType),10==e.styleType?this.setInputElvalue(this.formVdom.inputDefaultValue,e.textDefaultValue):this.setInputElvalue(this.formVdom.inputDefaultValue,""),8==e.styleType?(t=this.getColumnSelectText(e.defaultValue,We),2==e.dateDefaultValueType?this.setSelectValue(this.formVdom.dateTrendsValue,t):3==e.dateDefaultValueType&&this.formVdom.dateCustomValue.setValue(e.defaultValue)):this.setSelectValue(this.formVdom.dateTrendsValue,{name:"今日",value:1}),9==e.styleType&&(2==e.dateDefaultValueType?(t=this.getColumnSelectText(e.dateStartDefaultValue,We),n=this.getColumnSelectText(e.dateEndDefaultValue,We),this.setSelectValue(this.formVdom.dateStartDefaultValue,t),this.setSelectValue(this.formVdom.dateEndDefaultValue,n)):3==e.dateDefaultValueType&&this.formVdom.dateCustomValue1.setValue(e.defaultValue)),this.getColumnSelectText(e.rangeType,Ve)),this.setSelectValue(this.formVdom.rangeType,t),this.setInputElvalue(this.formVdom.startValue,e.startValue),this.setInputElvalue(this.formVdom.endValue,e.endValue),this.setRadioElValue(this.formVdom.dateDefaultValueType,"dateDefaultValueType",e.dateDefaultValueType),this.setRadioElValue(this.formVdom.dateRangeType,"dateRangeType",e.dateRangeType),this.getColumnSelectText(e.isNull,qe));this.setSelectValue(this.formVdom.isNull,n),this.formVdom.dateStartValue.setValue(e.dateStartValue),this.formVdom.dateEndValue.setValue(e.dateEndValue)}},{key:"hide",value:function(){ee()(this.el.el).modal("hide")}}]),Object.defineProperty(Z,"prototype",{writable:!1}),nt);function nt(e){if(!(this instanceof nt))throw new TypeError("Cannot call a class as a function");this.$parent=e,this.model="add",this.el=null,this.headEl=null,this.bodyEl=null,this.footerEl=null,this.formEl=null,this.form=ae().cloneDeep(et),this.formVdom={},this.columns=[],this.datasetParams=[],this.queryNameEl=null,this.typeEl=null,this.searchValueTypeEl=null,this.linkColumnEl1=null,this.linkColumnEl2=null,this.selectOptionsEl=null,this.optionsEl=null,this.dataSetOptionsEl=null,this.linkSheetEl=null,this.searchValueIsNullEl=null,this.RangeTypeEl=null,this.conditionTypeEl=null,this.ignoreCaseEl=null,this.quoteTypeEl=null,this.startValueEl=null,this.endValueEl=null,this.defaultValueEl=null,this.defaultValue1El=null,this.defaultValueTypeEl=null,this.dateTrendsValueEl=null,this.dateCustomValueEl=null,this.dateCustomValueEl1=null,this.dateRangeEl=null,this.dateStartValueEl=null,this.dateEndValueEl=null,this.dateStartDefaultValueEl=null,this.dateEndDefaultValueEl=null,this.searchStyleTypeEl=null,this.actualValueEl=null,this.showValueEl=null,this.orderEl=null,this.requireEl=null,this.defaultSchemeEl=null,this.styleTypeContent=[],this.sheetDatas=[],this.columnsDatas=[],this.sheetActualEl=null,this.sheetShowEl=null,this.init()}function rt(e){return(rt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var it=["name","styleType"],ot=(function(e,t){for(var n,r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(n=function(e){if("object"!==rt(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0===t)return String(e);if("object"!==rt(t=t.call(e,"string")))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}(i.key),"symbol"===rt(n)?n:String(n)),i)}}((Z=at).prototype,[{key:"on",value:function(e,t){this.eventMap.set(e,t)}},{key:"trigger",value:function(e){var t=this.eventMap;if(t.has(e)){for(var n=arguments.length,r=new Array(1<n?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];(t=t.get(e)).call.apply(t,[this].concat(r))}}},{key:"init",value:function(){var e=this,t=(ie("div","".concat(te,"-move_position")).children(ie("span").html("查询面板"),ie("i","x icon ".concat(te,"-xIcon")).on("click",(function(){e.hide(),e.trigger("close")}))),this.createToolbarEl()),n=this.createTableEl();this.tableEl=n,this.panelMainEl=ie("div","".concat(te,"-design-panel-main")).children(t,n).css({height:"100%",padding:"0px"}),this.el=this.panelMainEl}},{key:"show",value:function(){this.el.show()}},{key:"hide",value:function(){this.el.hide()}},{key:"createToolbarEl",value:function(){var e=this,t=ie("div","".concat(te,"-button-add ").concat(te,"-flex")).children(ie("i","plus icon"),ie("span").innerHTML("添加")).on("click",(function(){e.$dialogEl.show()})),n=ie("div","".concat(te,"-button-remove ").concat(te,"-flex")).children(ie("i","minus icon"),ie("span").innerHTML("删除")).on("click",(function(){var t=e.indeterminateIndex,n=e.tableEl.el;ge(ee()(n),t)})),r=ie("div","".concat(te,"-button-up ").concat(te,"-flex")).children(ie("i","angle up icon"),ie("span").innerHTML("上移")).on("click",(function(){var t=e.indeterminateIndex,n=e.tableEl.el;pe(ee()(n),t)})),i=ie("div","".concat(te,"-button-down ").concat(te,"-flex")).children(ie("i","angle down icon"),ie("span").innerHTML("下移")).on("click",(function(){var t=e.indeterminateIndex,n=e.tableEl.el;de(ee()(n),t)}));return ie("div","".concat(te,"-design-panel-toolbar ").concat(te,"-flex")).children(t,n,r,i)}},{key:"createTableEl",value:function(){var e=ie("tbody"),t=(this.tbodyEl=e,this),n=(this.indeterminateCheckEl=new le({label:""}),this.indeterminateCheckEl),r=(this.indeterminateCheckEl.addEvent({onChange:function(){var r;n.isCheck()?(r=[],ee()(e.el).find(".checkbox").each((function(e,t){t=t.getAttribute(["data-key"]),r.push(t)})),t.indeterminateIndex=r,ee()(e.el).find(".checkbox").checkbox("check")):(t.indeterminateIndex=[],ee()(e.el).find(".checkbox").checkbox("uncheck"))}}),ie("div","".concat(te,"-checkContainer")).children(this.indeterminateCheckEl.el));r=ie("thead","full-width").children(ie("tr").children(ie("th").child(r).css({width:"35px"}),ie("th").innerHTML("查询名称").css("width","66px"),ie("th").innerHTML("查询样式").css("width","66px"),ie("th").innerHTML("操作").css("width","50px")));return this.theadEl=r,ie("div").child(ie("table","".concat(te,"-table ui selectable compact celled small table")).children(r,e)).css({overflow:"auto",marginTop:"10px"})}},{key:"createTbodyEl",value:function(e,t){var n=this;e=ee()(e.el),t.forEach((function(e,t){n.addTableRow(e,t)}))}},{key:"checkBoxState",value:function(){var e=this.tbodyEl,t=[],n=0;ee()(e.el).find(".checkbox").each((function(e,r){ee()(r).checkbox("is checked")&&(r=r.getAttribute(["data-key"]),t.push(r)),n+=1})),ee()(e.el).find(".checkbox"),0==t.length?this.indeterminateCheckEl.uncheck():t.length==n?this.indeterminateCheckEl.check():this.indeterminateCheckEl.indeterminate(),this.indeterminateIndex=t}},{key:"addTableRow",value:function(e){var t,n,r,i=this,o=(e.id||(e.id=(new Date).getTime()),ie("tr").attr({"data-key":e.id,"data-orginal":JSON.stringify(e)})),a=(o.on("click",(function(e){})),this),s=(this.tbodyEl,new le({"data-key":e.id}));for(t in s.addEvent({onChange:function(){a.checkBoxState()}}),o.child(ie("td").child(s.el)),e)it.includes(t)&&(n=r=e[t],"defaultScheme"==t?n=1==r?"是":"否":"styleType"==t&&(n=Ce[r]),r=ie("td"),(r="name"==t?ie("td","".concat(te,"-table-td-max_width")):r).attr({"data-key":t,title:n}).innerHTML(n),o.child(r));s=ie("i","edit outline icon ".concat(te,"-pointer")).on("click",(function(){var e=(i.editDom=o).attr("data-orginal");e=JSON.parse(e);i.$parent.dialogEl.show(e,"edit")}));var u=ie("i","trash alternate outline icon ".concat(te,"-pointer")).on("click",(function(){ee()(o.el).remove(),a.checkBoxState()}));s=ie("div","".concat(te,"-buttons ").concat(te,"-color-409eff")).children(s,u);o.child(ie("td").child(s)),this.tbodyEl.child(o)}},{key:"editTableData",value:function(e){try{this.editDom.attr({"data-orginal":JSON.stringify(e)}),ee()(this.editDom.el).find("td").each((function(){var t,n,r=ee()(this).attr("data-key");ee()(this),r&&(n=t=e[r],"defaultScheme"==r?n=1==t?"是":"否":"styleType"==r&&(n=Ce[t]),this.innerHTML=n)}))}catch(e){}}},{key:"setData",value:function(e){this.data=e,this.createTbodyEl(this.tableEl,e)}},{key:"getData",value:function(){var e=[];return ee()(this.tbodyEl.el).find("tr").each((function(){var t=ee()(this).attr("data-orginal");e.push(JSON.parse(t))})),e}}]),Object.defineProperty(Z,"prototype",{writable:!1}),at);function at(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},r=this,i=at;if(!(r instanceof i))throw new TypeError("Cannot call a class as a function");this.$parent=e,this.$dialogEl=t,this.el=null,this.tableEl=null,this.theadEl=null,this.tbodyEl=null,this.panelMainEl=null,this.indeterminateCheckEl=null,this.option=n,this.currentRowData=null,this.currentRowDom=[],this.editDom=null,this.data=[],this.eventMap=new Map,this.init(),this.hide(),this.indeterminateIndex=[]}function st(e){return(st="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}(function(e,t){for(var n,r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(n=function(e){if("object"!==st(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0===t)return String(e);if("object"!==st(t=t.call(e,"string")))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}(i.key),"symbol"===st(n)?n:String(n)),i)}})((Z=ct).prototype,[{key:"show",value:function(){this.panelEl.show()}},{key:"hide",value:function(){this.panelEl.hide()}},{key:"on",value:function(e,t){this.panelEl.on(e,t)}},{key:"getData",value:function(){return this.panelEl.getData()}},{key:"setData",value:function(e){this.panelEl.setData(e)}},{key:"setDatasetParams",value:function(e){this.dialogEl.setDatasetParams(e)}},{key:"setSheetList",value:function(e){this.dialogEl.setSheetList(e)}},{key:"setColumns",value:function(e){this.dialogEl.setColumns(e)}}]),Object.defineProperty(Z,"prototype",{writable:!1});var ut=ct;function ct(e,t){if(!(this instanceof ct))throw new TypeError("Cannot call a class as a function");"string"==typeof e&&(e=document.querySelector(e));var n=ie("div","".concat(te,"-design")),r=(e=(e.appendChild(n.el),this.rootEl=n,this.targetEl=e,new tt(this)),new(2==t.type?ot:Se)(this,e,t));2!=t.type?n.css({position:"absolute"}):n.css({position:"unset"}),this.panelEl=r,this.dialogEl=e,this.rootEl.children(r.el)}function lt(e){return(lt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ht(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,dt(r.key),r)}}function ft(e,t,n){(t=dt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function dt(e){return e=function(e){if("object"!==lt(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0===t)return String(e);if("object"!==lt(t=t.call(e,"string")))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}(e),"symbol"===lt(e)?e:String(e)}function pt(e){return(pt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function mt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,At(r.key),r)}}function gt(e,t,n){(t=At(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function At(e){return e=function(e){if("object"!==pt(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0===t)return String(e);if("object"!==pt(t=t.call(e,"string")))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}(e),"symbol"===pt(e)?e:String(e)}Z=function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function")},Lt&&ht(Z.prototype,Lt),vt&&ht(Z,vt),Object.defineProperty(Z,"prototype",{writable:!1}),ft(Lt=Z,"今日","1"),ft(Lt,"本月初","2"),ft(Lt,"本年初","3"),ft(Lt,"本季度初","4"),ft(Lt,"本周一","5"),ft(Lt,"本月末","6"),ft(Lt,"本年末","7"),ft(Lt,"本季度末","8"),ft(Lt,"本周末","9"),ft(Lt,"昨日","11"),ft(Lt,"前天","12"),ft(Lt,"去年今日","13"),ft(Lt,"上月今日","14"),ft(Lt,"上月初","21"),ft(Lt,"去年本月初","22"),ft(Lt,"上年初","31"),ft(Lt,"前年初","32"),ft(Lt,"上季度初","41"),ft(Lt,"去年本季度初","42"),ft(Lt,"上周一","43"),ft(Lt,"明年初","51"),ft(Lt,"后年初","61");var vt=Lt["今日"],bt=(Z=Lt["本月初"],Lt["本年初"]),yt=Lt["本季度初"],wt=Lt["本月末"],xt=Lt["本周一"],Ct=Lt["本月末"],kt=Lt["本年末"],Et=Lt["本季度末"],St=Lt["本周末"],_t=Lt["昨日"],Ot=Lt["前天"],Tt=Lt["去年今日"],Dt=Lt["上月今日"],Bt=Lt["上月初"],It=Lt["去年本月初"],Mt=Lt["上年初"],jt=Lt["前年初"],Nt=Lt["上季度初"],Ft=Lt["去年本季度初"],Rt=Lt["上周一"],Pt=Lt["明年初"],Lt=Lt["后年初"],Ut=(Zt=function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function")},$t&&mt(Zt.prototype,$t),Kt&&mt(Zt,Kt),Object.defineProperty(Zt,"prototype",{writable:!1}),Zt);function zt(e){return(zt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ht(e){return!!/^[\u4E00-\u9FA5]+/.test(e)}gt(Ut,vt,(function(){var e=new Date;return e.setHours(0,0,0,0),e.getTime()})),gt(Ut,Z,(function(){var e=new Date;return e.setDate(1),e.setHours(0,0,0,0),e.getTime()})),gt(Ut,bt,(function(){var e=new Date;return e.setMonth(0),e.setDate(1),e.setHours(0,0,0,0),e.getTime()})),gt(Ut,yt,(function(){var e=new Date,t=e.getMonth();t=3*(Math.floor((t+3)/3)-1);return new Date(e.getFullYear(),t,1).getTime()})),gt(Ut,wt,(function(){var e=new Date;return 11===e.getMonth()?e.setMonth(0):e.setMonth(e.getMonth()+1),e.setDate(1),e.setHours(0,0,0,0),e.getTime()})),gt(Ut,xt,(function(){var e=new Date,t=0===(t=(e.setHours(0,0,0,0),e.getDay()))?-6:1-t,n=new Date(e);return n.setDate(e.getDate()+t),n.getTime()})),gt(Ut,Ct,(function(){return t=(e=De()).getFullYear(),e=e.getMonth(),t=new Date(t,e+1,1),(e=new Date(t)).setDate(t.getDate()-1),e.getTime();var e,t})),gt(Ut,kt,(function(){return e=De().getFullYear(),e=new Date(e+1,0,1),(t=new Date(e)).setDate(e.getDate()-1),t.getTime();var e,t})),gt(Ut,Et,(function(){return function(e){var t,n=e.getFullYear(),r=(e=e.getMonth(),n%4==0&&n%100!=0||n%400==0);switch(e=3*Math.floor(e/3)+2){case 2:t=r?29:28;break;case 5:case 8:case 10:t=30;break;default:t=31}return new Date(n,e,t)}(De()).getTime()})),gt(Ut,St,(function(){return t=(e=De()).getFullYear(),n=e.getMonth(),r=e.getDate(),o=[],0==(i=e.getDay())?(o.push(e),o.push(new Date(t,n,r+1))):6==i?(o.push(new Date(t,n,r-1)),o.push(e)):(i=1+(e=6-i),o.push(new Date(t,n,r+e)),o.push(new Date(t,n,r+i))),o[1].getTime();var e,t,n,r,i,o})),gt(Ut,_t,(function(){return t=(e=De()).getDate(),e.setDate(t-1),e.getTime();var e,t})),gt(Ut,Ot,(function(){return t=(e=De()).getDate(),e.setDate(t-2),e.getTime();var e,t})),gt(Ut,Tt,(function(){return e=(n=De()).getFullYear(),t=n.getMonth(),n=n.getDate(),new Date(e-1,t,n).getTime();var e,t,n})),gt(Ut,Dt,(function(){return e=(n=De()).getFullYear(),t=n.getMonth(),n=n.getDate(),new Date(0===t?e-1:e,0===t?11:t-1,n).getTime();var e,t,n})),gt(Ut,Bt,(function(){return e=(t=De()).getFullYear(),t=t.getMonth(),new Date(0===t?e-1:e,0===t?11:t-1,1).getTime();var e,t})),gt(Ut,It,(function(){return e=(t=De()).getFullYear(),t=t.getMonth(),new Date(e-1,t,1).getTime();var e,t})),gt(Ut,Mt,(function(){return e=De().getFullYear(),new Date(e-1,1,1).getTime();var e})),gt(Ut,jt,(function(){return e=De().getFullYear(),new Date(e-2,1,1).getTime();var e})),gt(Ut,Nt,(function(){return t=(e=new Date).getFullYear(),(e=e.getMonth()-3)<0&&(e+=12,--t),e=3*Math.floor(e/3),new Date(t,e,1).getTime();var e,t})),gt(Ut,Ft,(function(){return e=(t=new Date).getFullYear(),t=t.getMonth(),t=Math.floor((t+3)/3),new Date(e-1,3*(t-1),1).getTime();var e,t})),gt(Ut,Rt,(function(){return getLastWeekStart().getTime()})),gt(Ut,Pt,(function(){return e=De().getFullYear(),new Date(e+1,1,1).getTime();var e})),gt(Ut,Lt,(function(){return e=De().getFullYear(),new Date(e+2,1,1).getTime();var e}));var $t,Qt={success:'<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896zm-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.272 38.272 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336L456.192 600.384z"></path></svg>',error:'<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896zm0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336L512 457.664z"></path></svg>',info:'<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M512 64a448 448 0 1 1 0 896.064A448 448 0 0 1 512 64zm67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344zM590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.992 12.992 0 0 1-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 0 1 7.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z"></path></svg>',warning:'<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896zm0 192a58.432 58.432 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.432 58.432 0 0 0 512 256zm0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4z"></path></svg>'},Vt={duration:3e3,type:"error",message:"错了哦，这是一条错误消息"},qt=("".concat(te,"-message--error"),"".concat(te,"-message--info"),"".concat(te,"-message--success"),"".concat(te,"-message--warning"),function(e,t){for(var n,r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(n=function(e){if("object"!==zt(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0===t)return String(e);if("object"!==zt(t=t.call(e,"string")))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}(i.key),"symbol"===zt(n)?n:String(n)),i)}}(($t=Gt).prototype,[{key:"init",value:function(){return ie("div","".concat(te,"-message")).children(ie("i","".concat(te,"-message__icon")).innerHTML(Qt[this.options.type]),ie("p","".concat(te,"-message__content")).innerHTML(this.options.message))}},{key:"initStyle",value:function(){var e=this.options.type,t="".concat(te,"-message--").concat(e),n=(e="".concat(te,"-icon-").concat(e),ee()(this.el.el));n.addClass(t),n.find(".".concat(te,"-message__icon")).addClass(e)}},{key:"durationDestory",value:function(){var e=this;setTimeout((function(){e.destory()}),this.options.duration)}},{key:"destory",value:function(){this.parent.removeChild(this.el.el)}}]),Object.defineProperty($t,"prototype",{writable:!1}),Gt);function Gt(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=this,n=Gt;if(!(t instanceof n))throw new TypeError("Cannot call a class as a function");t=document.body,this.parent=t,this.options=Object.assign({},Vt,e),this.el=this.init(),this.parent.appendChild(this.el.el),n=this.options.duration,this.initStyle(),n&&this.durationDestory()}function Wt(e){return(Wt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}(function(e,t){for(var n,r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(n=function(e){if("object"!==Wt(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0===t)return String(e);if("object"!==Wt(t=t.call(e,"string")))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}(i.key),"symbol"===Wt(n)?n:String(n)),i)}})((Kt=Xt).prototype,[{key:"element",value:function(){return ie("div","".concat(te,"-divider--vertical"))}},{key:"show",value:function(){this.el.show()}},{key:"hide",value:function(){this.el.hide()}}]),Object.defineProperty(Kt,"prototype",{writable:!1});var Kt,Yt=Xt;function Xt(e){if(!(this instanceof Xt))throw new TypeError("Cannot call a class as a function");this.el=this.element(),e&&this.el.css(e)}function Jt(e){return(Jt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}(function(e,t){for(var n,r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(n=function(e){if("object"!==Jt(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0===t)return String(e);if("object"!==Jt(t=t.call(e,"string")))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}(i.key),"symbol"===Jt(n)?n:String(n)),i)}})((Zt=tn).prototype,[{key:"init",value:function(){var e=this,t=this;this.titleEl=ie("span"),this.headEl=ie("div","".concat(te,"-dialog__header")).children(this.titleEl.innerHTML(this.getTitle()),ie("div").children(ie("i","x icon ".concat(te,"-xIcon")).on("click",(function(){e.hide()})))),this.inputEl=ie("input").attr({type:"text",placeholder:"请输入",autocomplete:"off"}),this.bodyEl=ie("div","".concat(te,"-dialog__body")).children(ie("div").children(ie("span").html("方案名称：").css({display:"inline-block",width:"70px"}),ie("div","ui small input").children(this.inputEl))),this.footerEl=ie("div","".concat(te,"-dialog__footer")).children(ie("div").children(ie("button","ui primary button").innerHTML("确 定").on("click",(function(){t.submit()})),ie("button","ui basic button").innerHTML("取 消").on("click",(function(){t.hide()})))),this.el=ie("div","".concat(te,"-auth_dialog  ui modal")).children(this.headEl,this.bodyEl,this.footerEl)}},{key:"getTitle",value:function(){return"另存为"}},{key:"show",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"add";e=e||"","edit"==(this.type=t)&&this.titleEl.html("编辑"),ee()(this.inputEl.el).val(e),ee()(this.el.el).modal("show")}},{key:"hide",value:function(){ee()(this.el.el).modal("hide")}},{key:"submit",value:function(){var e=ee()(this.inputEl.el).val();this.$parent.savePlan(e,this.type),this.hide()}}]),Object.defineProperty(Zt,"prototype",{writable:!1});var Zt,en=tn;function tn(e){if(!(this instanceof tn))throw new TypeError("Cannot call a class as a function");this.$parent=e,this.el=null,this.headEl=null,this.bodyEl=null,this.footerEl=null,this.inputEl=null,this.titleEl=null,this.type="add",this.init(),ee()(this.el.el).modal({closable:!1,autofocus:!1,allowMultiple:!0})}function nn(e){return(nn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}(function(e,t){for(var n,r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(n=function(e){if("object"!==nn(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0===t)return String(e);if("object"!==nn(t=t.call(e,"string")))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}(i.key),"symbol"===nn(n)?n:String(n)),i)}})((vt=on).prototype,[{key:"init",value:function(){var e=this;this.confirmEl=ie("div","ui primary button").css({padding:"9px 15px",marginLeft:"5px"}),this.cancelEl=ie("div","ui button").css({padding:"9px 15px"}),this.el=ie("div","ui modal ".concat(te,"-confirm-modal")).children(ie("div","".concat(te,"-confirm-header")).children(ie("div","".concat(te,"-confirm-title")).children(ie("span").innerHTML(this.options.title))),ie("div","".concat(te,"-confirm-content")).children(ie("div","".concat(te,"-confirm-container")).children(ie("div","".concat(te,"-confirm-message")).children(ie("p").innerHTML(this.options.message)))),ie("div","".concat(te,"-confirm-btns")).children(this.cancelEl.innerHTML("取消").on("click",(function(){e.hide(),e.destory(),e.reject("cancel")})),this.confirmEl.innerHTML("确定").on("click",(function(){e.hide(),e.destory(),e.resolve("confirm")})))).css("top","10vh"),ee()(this.el.el).modal({allowMultiple:!0})}},{key:"show",value:function(){ee()(this.el.el).modal("show")}},{key:"hide",value:function(){ee()(this.el.el).modal("hide")}},{key:"destory",value:function(){ee()(this.el.el).remove()}}]),Object.defineProperty(vt,"prototype",{writable:!1});var rn=on;function on(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=this,n=on;if(!(t instanceof n))throw new TypeError("Cannot call a class as a function");this.options=Object.assign({title:"提示",message:"消息提示"},e),this.options,this.confirmEl=null,this.el=null,this.cancelEl=null,this.init()}function an(e){return(an="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function sn(e,t){var n,r,i,o,a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(a)return i=!(r=!0),{s:function(){a=a.call(e)},n:function(){var e=a.next();return r=e.done,e},e:function(e){i=!0,n=e},f:function(){try{r||null==a.return||a.return()}finally{if(i)throw n}}};if(Array.isArray(e)||(a=function(e){var t;if(e)return"string"==typeof e?un(e,void 0):"Map"===(t="Object"===(t=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:t)||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?un(e,void 0):void 0}(e))||t&&e&&"number"==typeof e.length)return a&&(e=a),o=0,{s:t=function(){},n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function un(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}(function(e,t){for(var n,r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(n=function(e){if("object"!==an(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0===t)return String(e);if("object"!==an(t=t.call(e,"string")))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}(i.key),"symbol"===an(n)?n:String(n)),i)}})((Z=ln).prototype,[{key:"getTitle",value:function(){return"查询"}},{key:"init",value:function(){var e=this,t=this,n=ie("div","ui dropdown").children(ie("i","save outline icon ".concat(te,"-xIcon")),ie("i","dropdown icon ".concat(te,"-xIcon")).css({marginLeft:"2px"})),r=(ee()(n.el).dropdown({values:[{name:"另存为",value:2}],showOnFocus:!1,on:"click",onChange:function(e,n,r){2==e&&t.dialogEl.show("","add")}}),this.savebuttonEl=n,ie("div","ui accordion")),i=ie("div","public_content"),o=ie("div","ui accordion"),a=ie("div","private_content"),s=(this.publicContentEl=i,this.privateContentEl=a,ie("div","".concat(te,"-right_content")));this.paramsContentEl=s,this.createParamsContentEl(this.config),this.systemPlan=this._submit(!0),this.planEl=ie("div","".concat(te,"-left")),this.queryEl=ie("div","".concat(te,"-right")),this.createPlanContentEl([{name:"系统方案",active:!0}]),this.createPrivatePlanContentEl(this.plan),this.bodyEl=ie("div","".concat(te,"-dialog__body")).children(ie("div","".concat(te,"-main")).children(this.planEl.children(ie("div","".concat(te,"-left-toolbar")).children(ie("i","edit outline icon ".concat(te,"-xIcon")).on("click",(function(){e.editPlan(e.selectItem)})),(new Yt).el,n,(new Yt).el,ie("i","trash alternate outline icon ".concat(te,"-xIcon")).on("click",(function(){e.deletePlan(e.selectItem)}))),ie("div","".concat(te,"-left-public")).children(r.children(ie("div","title left_accordion_title active").children(ie("span","public_title").innerHTML("公共方案"),ie("i","dropdown icon ".concat(te,"-xIcon"))),ie("div","content active").children(i).css({"padding-top":"0px"}))),ie("div","".concat(te,"-left-private")).children(o.children(ie("div","title left_accordion_title active").children(ie("span","public_title").innerHTML("个人方案"),ie("i","dropdown icon ".concat(te,"-xIcon"))),ie("div","content active").children(a).css({"padding-top":"0px"})))),this.queryEl.children(this.paramsContentEl))),this.queryPlan?(this.planEl.show(),this.queryEl.css({width:"500px"})):(this.planEl.hide(),this.queryEl.css({width:"100%"})),ee()(r.el).accordion(),ee()(o.el).accordion(),this.headEl=ie("div","".concat(te,"-dialog__header")).children(ie("span").innerHTML(this.getTitle()),ie("div").children(ie("i","x icon ".concat(te,"-xIcon")).on("click",(function(){e.hide()})))),this.footerEl=ie("div","".concat(te,"-dialog__footer")).children(ie("div").children(ie("button","ui primary button").innerHTML("确 定").on("click",(function(){t.submit(!0,!0)})),ie("button","ui basic button").innerHTML("取 消").on("click",(function(){t.hide()})))),this.el=ie("div","".concat(te,"-report-params_dialog ui modal")).children(this.headEl,this.bodyEl,this.footerEl),ee()(this.el.el).modal({closable:!1,autofocus:!1,allowMultiple:!0})}},{key:"setQueryPlan",value:function(e){e&&(this.plan=e,this.createPrivatePlanContentEl(this.plan))}},{key:"savePlan",value:function(e,t){var n,r,i=this;e&&(r=(r=this._submit(!0)).map((function(e){return{name:e.name,value:e.value,styleType:e.styleType}})),this.selectItem&&this.selectItem.item&&((n=_.cloneDeep(this.selectItem.item)).name=e,n.plan=r,delete n.active,this.trigger("query-plan",n,t,(function(){"add"==t?i.createPrivatePlanItemEl(n):"edit"==t&&(i.editplanEl(i.selectItem.el,n),i.changeActive(i.selectItem.el,n,!1))}))))}},{key:"setPlan",value:function(e){e&&(this.plan=e,this.createPrivatePlanContentEl(this.plan))}},{key:"setSheetData",value:function(){this.sheetData=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];var e={},t=(this.config.forEach((function(t){2==t.optionsType&&(e[t.linkSheet]={actual:t.sheetOptions.actual,show:t.sheetOptions.show,order:t.order,id:t.id})})),{});if(Array.isArray(this.sheetData)){var n,r=sn(this.sheetData);try{for(r.s();!(n=r.n()).done;){var i=n.value,o=e[i.name];if(o){var a,s=[],u=sn(i.response_data);try{for(u.s();!(a=u.n()).done;){var c=a.value,l=c[o.actual],h=c[o.show];null!=l&&null!=h&&s.push({name:h,value:l})}}catch(t){u.e(t)}finally{u.f()}o.order&&(o.order=1==o.order,function(e,t,n){e.sort((function(e,r){return Ht(e[n])&&Ht(r[n])?t?e[n].localeCompare(r[n],"zh-CN"):r[n].localeCompare(e[n],"zh-CN"):e[n]>r[n]?t?1:-1:e[n]<r[n]?t?-1:1:0}))}(s,o.order,"name")),t[o.id]=_.uniqBy(s,"name")}}}catch(t){r.e(t)}finally{r.f()}}var f,d=sn(this.config);try{for(d.s();!(f=d.n()).done;){var p=f.value,m=t[p.id];m&&(p.options=m)}}catch(t){d.e(t)}finally{d.f()}this.createParamsContentEl(this.config)}},{key:"setData",value:function(e){var t=this;this.config=e,this.createParamsContentEl(this.config),setTimeout((function(){t.systemPlan=t._submit(!0)}))}},{key:"submit",value:function(e,t){var n=this,r=[];try{this.config.forEach((function(t){if(a=n.formVdom[t.id]){var i,o={name:t.linkColumn,type:t.type,styleType:t.styleType,valueType:t.valueType,conditionType:t.conditionType,ignoreCase:t.ignoreCase},a=(1==t.styleType||2==t.styleType?o.value=n.getSelectElValue(a):3==t.styleType?o.value=n.getRadioElValue(a,t.id):4==t.styleType?o.value=n.getCheckboxElValue(a):7==t.styleType?(o.value=n.getNumberElValue(a),o.rangeType=t.rangeType):8==t.styleType?o.value=a.getValue():9==t.styleType?(o.value=a.getMulValue(),o.rangeType=t.rangeType):10==t.styleType&&(o.value=n.getInputElValue(a)),t.type),s=t.styleType;if(Array.isArray(o.value)&&o.value.length<1&&(o.value=null),0==t.quoteType||2!=a||2!=s&&4!=s||(null,i=1==t.quoteType?"'":'"',Array.isArray(o.value)?o.value=o.value.map((function(e,t){return null!=e?i+e+i:e})):null!=o.value&&(o.value=i+o.value+i)),e&&1==t.required&&(null===o.value||void 0===o.value))throw new Error("有必选项未填写");r.push(o)}})),t&&this.trigger("submit",r),this.hide()}catch(e){new qt({message:"有必选项未填写"})}return r}},{key:"_submit",value:function(e){var t=this,n=[];try{this.config.forEach((function(r){if(a=t.formVdom[r.id]){var i,o={name:r.linkColumn,type:r.type,styleType:r.styleType,valueType:r.valueType,conditionType:r.conditionType,ignoreCase:r.ignoreCase,id:r.id},a=(1==r.styleType||2==r.styleType?o.value=t.getSelectElValue(a):3==r.styleType?o.value=t.getRadioElValue(a,r.id):4==r.styleType?o.value=t.getCheckboxElValue(a):7==r.styleType||11==r.styleType?(o.value=t.getNumberElValue(a),o.rangeType=r.rangeType):8==r.styleType?o.value=a.getValue():9==r.styleType?(o.value=a.getMulValue(),o.rangeType=r.rangeType):10==r.styleType&&(o.value=t.getInputElValue(a)),r.type),s=r.styleType;if(Array.isArray(o.value)&&o.value.length<1&&(o.value=null),0==r.quoteType||2!=a||2!=s&&4!=s||(null,i=1==r.quoteType?"'":'"',Array.isArray(o.value)?o.value=o.value.map((function(e,t){return null!=e?i+e+i:e})):null!=o.value&&(o.value=i+o.value+i)),e&&(o.name=r.name),!e&&1==r.required&&(null===o.value||void 0===o.value))throw new Error("有必选项未填写");n.push(o)}}))}catch(e){}return n}},{key:"isNullValue",value:function(e){return null===e||String(e).trim().length<1}},{key:"on",value:function(e,t){this.eventMap.set(e,t)}},{key:"trigger",value:function(e){var t=this.eventMap;if(t.has(e)){for(var n=arguments.length,r=new Array(1<n?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];(t=t.get(e)).call.apply(t,[this].concat(r))}}},{key:"changeActive",value:function(e,t,n){var r=this;ee()(this.publicContentEl.el).find(".".concat(te,"-plan_item")).removeClass("plan_item_active"),ee()(this.privateContentEl.el).find(".".concat(te,"-plan_item")).removeClass("plan_item_active"),ee()(e.el).addClass("plan_item_active"),this.selectItem={public:n,item:t,el:e},n?(this.systemPlan,this.systemItem=this.selectItem,this.setFieldsValue(this.systemPlan),ee()(this.savebuttonEl.el).dropdown({values:[{name:"另存为",value:2}],showOnFocus:!1,on:"click",onChange:function(e,t,n){2==e&&r.dialogEl.show("","add")}})):t.plan&&this.setFieldsValue(t.plan)}},{key:"deletePlan",value:function(e){var t,n,r=this;e.public||(n=function(){ee()(e.el.el).remove(),r.changeActive(r.systemItem.el,r.systemItem.item,!0)},e.el&&(t=new rn({message:"此操作将永久删除选中方案, 是否继续?"}),new Promise((function(e,n){t.show(),t.resolve=e,t.reject=n})).then((function(){r.trigger("query-plan",r.systemItem.item,"delete",n)})).catch((function(e){}))))}},{key:"editPlan",value:function(e){e.public||e.el&&this.dialogEl.show(this.selectItem.item.name,"edit")}},{key:"createPlanContentEl",value:function(e){var t=this,n=(this.publicContentEl.html(""),this);e.forEach((function(e){var r=ie("div","".concat(te,"-plan_item")).innerHTML(e.name).attr({title:e.name});r.on("click",(function(){ee()(t.savebuttonEl.el).dropdown({values:[{name:"另存为",value:2}],showOnFocus:!1,on:"click",onChange:function(e,t,r){2==e&&n.dialogEl.show("","add")}}),t.changeActive(r,e,!0)})),e.active&&t.changeActive(r,e,!0),t.publicContentEl.child(r)}))}},{key:"createPrivatePlanContentEl",value:function(e){var t=this;e=e||[],this.privateContentEl.html(""),e.forEach((function(e){t.createPrivatePlanItemEl(e)}))}},{key:"editplanEl",value:function(e,t){e.innerHTML(t.name).attr({title:t.name})}},{key:"createPrivatePlanItemEl",value:function(e){var t=this,n=ie("div","".concat(te,"-plan_item")).innerHTML(e.name).attr({title:e.name});n.on("click",(function(){ee()(t.savebuttonEl.el).dropdown({values:[{name:"保存",value:1},{name:"另存为",value:2}],showOnFocus:!1,on:"click",onChange:function(e,n,r){t.selectItem,2==e?t.dialogEl.show("","add"):1==e&&t.savePlan(t.selectItem.item.name,"edit")}}),t.changeActive(n,e,!1)})),e.active&&this.changeActive(n,e,!1),this.privateContentEl.child(n)}},{key:"setFieldsValue",value:function(e){var t=this;e.forEach((function(e){var n,r=sn(t.config);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(e.name==i.name){1==e.styleType||2==e.styleType||3==e.styleType||4==e.styleType||8==e.styleType||9==e.styleType?i._value=e.value:10==e.styleType?i.textDefaultValue=e.value:7!=e.styleType&&11!=e.styleType||(e.value&&null!=e.value.start?(i.startValue=e.value.start,i.endValue=e.value.end):(i.startValue="",i.endValue="")),i._defaultValue=3;break}}}catch(e){r.e(e)}finally{r.f()}})),this.createParamsContentEl(this.config)}},{key:"createParamsContentEl",value:function(e){var t=this;this.paramsContentEl.innerHTML(""),e.forEach((function(e,n){var r=ie("div","".concat(te,"-params-item_content")),i=ie("div","".concat(te,"-params-item_title")).innerHTML(e.name);1==e.required&&i.addClass("require"),i=ie("div","".concat(te,"-params-form_item")).children(i,r);t.createItemByType(e,r,n),t.paramsContentEl.child(i)}))}},{key:"createItemByType",value:function(e,t,n){1==e.styleType||2==e.styleType?this.createFormSelectEl(e,t,n):3==e.styleType?this.createFormRadioEl(e,t,n):4==e.styleType?this.createFormCheckBoxEl(e,t,n):8==e.styleType||9==e.styleType?this.createFormDatePicker(e,t,n):10==e.styleType?this.createInputEl(e,t,n):7!=e.styleType&&11!=e.styleType||this.createNumberRangeEl(e,t,n)}},{key:"createFormSelectEl",value:function(e,t,n){e.id||(e.id=(new Date).getTime()+String(n));var r=ie("select","ui selection mini dropdown");2==e.styleType&&r.attr({multiple:""}),e.options.forEach((function(t,n){if(String(t.value).length<1){for(var i=" ",o=0;o<n;o++)i+=" ";t.value=i}t=ie("option").attr({value:t.value}).innerHTML(t.name),(1==e.defaultValue&&0==n||2==e.defaultValue&&2==e.styleType)&&t.attr({selected:""}),r.child(t)})),this.formVdom[e.id]=r,t.child(r),ee()(r.el).dropdown({clearable:!0,useLabels:!1}),3==e._defaultValue&&ee()(r.el).dropdown("clear"),1!=e.defaultValue&&2!=e.defaultValue&&ee()(r.el).dropdown("clear"),setTimeout((function(){3==e._defaultValue&&ee()(r.el).dropdown("set selected",e._value)}))}},{key:"getSelectElValue",value:function(e){return e=ee()(e.el).dropdown("get value"),String(e).trim().length<1?String(e).trim():e}},{key:"getSelectElText",value:function(e){return ee()(e.el).dropdown("get text")}},{key:"setSelectValue",value:function(e,t){t?ee()(e.el).dropdown("set selected",t.name):ee()(e.el).dropdown("clear")}},{key:"createFormRadioEl",value:function(e,t,n){var r=ie("div").css({height:"30px",display:"flex","align-items":"center"});e.id||(e.id=(new Date).getTime()+String(n)),e.options.forEach((function(t,n){var i=ie("div","ui checkbox radio").children(ie("input").attr({type:"radio",name:e.id,value:t.value}),ie("label").innerHTML(t.name)).css({marginRight:"20px"});3==e._defaultValue?t.value==e._value?ee()(i.el).checkbox("check"):ee()(i.el).checkbox():1==e.defaultValue&&0==n?ee()(i.el).checkbox("check"):ee()(i.el).checkbox(),r.child(i)})),this.formVdom[e.id]=r,t.child(r)}},{key:"createFormCheckBoxEl",value:function(e,t,n){e.id||(e.id=(new Date).getTime()+String(n));var r=ie("div").css({height:"30px",display:"flex","align-items":"center"});e.options.forEach((function(t,n){var i=new le({label:t.name,"data-key":t.value,name:e.id});i.el.css("margin-right","10px"),3==e._defaultValue?Array.isArray(e._value)&&e._value.includes(t.value)?ee()(i.el.el).checkbox("check"):ee()(i.el.el).checkbox():2==e.defaultValue||1==e.defaultValue&&0==n?ee()(i.el.el).checkbox("check"):ee()(i.el.el).checkbox(),r.child(i.el)})),this.formVdom[e.id]=r,t.child(r)}},{key:"createInputEl",value:function(e,t,n){e.id||(e.id=(new Date).getTime()+String(n));n=ie("input").attr({type:"text",placeholder:"请输入",autocomplete:"off"});var r=ie("div","ui small input").children(n),i=(this.formVdom[e.id]=n,"");null!=e.textDefaultValue&&(i=e.textDefaultValue),this.setInputElvalue(n,i),t.child(r)}},{key:"createNumberRangeEl",value:function(e,t,n){e.id||(e.id=(new Date).getTime()+String(n));n=ie("input").attr({type:"text",placeholder:"请输入",autocomplete:"off"});var r=ie("input").attr({type:"text",placeholder:"请输入",autocomplete:"off"}),i=ie("div","ui small input").children(n).css({width:"160px"}),o=ie("div").css({display:"inline-block",color:"#c4bdbd",padding:"0px 5px"}).innerHTML("—"),a=ie("div","ui small input").children(r).css({width:"160px"});this.setInputElvalue(n,e.startValue),this.setInputElvalue(r,e.endValue),(this.formVdom[e.id]=t).children(i,o,a)}},{key:"getNumberElValue",value:function(e){var t={};return ee()(e.el).find("input").each((function(e){var n=ee()(this).val();0==e?t.start=n:1==e&&(t.end=n)})),t}},{key:"getInputElValue",value:function(e){return ee()(e.el).val()}},{key:"getRadioElValue",value:function(e,t){return ee()(e.el).find("[name=".concat(t,"]")),ee()(e.el).find("[name=".concat(t,"]:checked")).val()}},{key:"getCheckboxElValue",value:function(e){var t=[];return ee()(e.el).find(".checkbox").each((function(){var e=ee()(this);e.checkbox("is checked")&&t.push(e.attr("data-key"))})),t}},{key:"setInputElvalue",value:function(e,t){ee()(e.el).val(t)}},{key:"createFormDatePicker",value:function(e,t,n){e.id||(e.id=(new Date).getTime()+String(n));var r,i;n={range:!1},9==e.styleType&&(n.range=!0),2==e.dateRangeType&&(n.minDate=new Date(e.dateStartValue),n.maxDate=new Date(e.dateEndValue)),n=new je(n);3==e._defaultValue?n.setValue(e._value):2==e.dateDefaultValueType?9==e.styleType?(Ut[e.dateStartDefaultValue]||(e.dateStartDefaultValue=1),Ut[e.dateEndDefaultValue]||(e.dateEndDefaultValue=1),r=Ut[e.dateStartDefaultValue](),i=Ut[e.dateEndDefaultValue](),r=Be(r),i=Be(i),n.setValue([r,i])):(Ut[e.defaultValue]||(e.defaultValue=1),i=Be(r=Ut[e.defaultValue]()),n.setValue(i)):3==e.dateDefaultValueType&&n.setValue(e.defaultValue),this.formVdom[e.id]=n,t.child(n.el)}},{key:"show",value:function(){this.config,ee()(this.el.el).modal("show")}},{key:"hide",value:function(){ee()(this.el.el).modal("hide")}}]),Object.defineProperty(Z,"prototype",{writable:!1});var cn=ln;function ln(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:[],r=3<arguments.length?arguments[3]:void 0,i=this,o=ln;if(!(i instanceof o))throw new TypeError("Cannot call a class as a function");t=t||[],this.el=null,this.plan=n,this.headEl=null,this.bodyEl=null,this.messageEl=null,this.footerEl=null,this.queryPlan=r,this.paramsContentEl=null,this.sheetData=[],this.queryEl=null,this.formVdom={},this.savebuttonEl=null,this.selectItem=null,this.systemItem=null,this.publicContentEl=null,this.privateContentEl=null,this.eventMap=new Map,this.config=t,this.dialogEl=new en(this),this.systemPlan=null,this.init()}function hn(e){return(hn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}(function(e,t){for(var n,r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(n=function(e){if("object"!==hn(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0===t)return String(e);if("object"!==hn(t=t.call(e,"string")))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}(i.key),"symbol"===hn(n)?n:String(n)),i)}})((bt=dn).prototype,[{key:"show",value:function(){this.dialogEl.show()}},{key:"hide",value:function(){this.dialogEl.hide()}},{key:"setQueryPlan",value:function(e){this.dialogEl.setQueryPlan(e)}},{key:"on",value:function(e,t){this.dialogEl.on(e,t)}},{key:"getData",value:function(){return this.dialogEl._submit()}},{key:"setData",value:function(e){this.dialogEl.setData(e)}},{key:"setPlan",value:function(e){this.dialogEl.setPlan(e)}},{key:"setSheetData",value:function(e){this.dialogEl.setSheetData(e)}}]),Object.defineProperty(bt,"prototype",{writable:!1});var fn=dn;function dn(e,t,n){if(!(this instanceof dn))throw new TypeError("Cannot call a class as a function");this.dialogEl=new cn(this,e,t,n)}function pn(e){return(pn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}(function(e,t){for(var n,r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(n=function(e){if("object"!==pn(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0===t)return String(e);if("object"!==pn(t=t.call(e,"string")))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}(i.key),"symbol"===pn(n)?n:String(n)),i)}})((yt=gn).prototype,[{key:"update",value:function(e){this.config=e,this.setData(!0)}},{key:"init",value:function(){var e=this,t=this;this.headEl=ie("div","".concat(te,"-dialog__header")).children(ie("span").innerHTML(this.getTitle()),ie("div").children(ie("i","x icon ".concat(te,"-xIcon")).on("click",(function(){e.hide()})))),this.bodyEl=ie("div","".concat(te,"-dialog__body")),this.footerEl=ie("div","".concat(te,"-dialog__footer")).children(ie("div").children(ie("button","ui primary button").innerHTML("确 定").on("click",(function(){t.submit()})),ie("button","ui basic button").innerHTML("取 消").on("click",(function(){t.hide()})))),this.createFormEl(),this.el=ie("div","".concat(te,"-auth_dialog  ui modal")).children(this.headEl,this.bodyEl,this.footerEl)}},{key:"getTitle",value:function(){return"API服务授权配置"}},{key:"show",value:function(){ee()(this.el.el).modal("show")}},{key:"hide",value:function(){ee()(this.el.el).modal("hide")}},{key:"submit",value:function(e){var t,n;this.formValidate()&&(this.fieldValue=this.getFormFieldValue(),n=this.fieldValue,t=this.config,n=!(n.key+n.secret==t.key+t.secret),this.request(e,n),this.config=this.fieldValue)}},{key:"request",value:function(e,t){var n=this,r=(t=(e=e||t,this.fieldValue),"".concat(t.url).concat("/s/public/auth/api/")),i=(t="ApiToken ".concat(t.key,";").concat(t.secret),new Headers);i.append("Authorization",t),t=new Request(r);fetch(t,{method:"GET",headers:i,mode:"cors",cache:"default"}).then((function(e){return e.json()})).then((function(t){t=t.results,n.$parent.setDatasetList(t,e),n.hide()})).catch((function(e){}))}},{key:"formValidate",value:function(){var e,t,n,r=!0;for(e in this.form)this.form[e].require&&(t=(n=this.formVDom[e]).val,n=n.tip,ee()(t.el).val()||(ee()(n.el),ee()(n.el).show(),r=!1));return r}},{key:"getFormFieldValue",value:function(){var e,t={};for(e in this.formVDom){var n=this.formVDom[e];t[e]=ee()(n.val.el).val()}return t}},{key:"setData",value:function(e){var t=(r=this.config).url,n=r.key,r=r.secret,i=this.formVDom.url.val;ee()(i.el).val(t||""),i=this.formVDom.key.val,ee()(i.el).val(n||""),t=this.formVDom.secret.val;ee()(t.el).val(r||""),this.config.url&&this.config.key&&this.config.secret&&this.submit(e)}},{key:"createFormEl",value:function(){for(var e in this.formEl=ie("div","ui form"),this.form)e=this.createFormInputEl(this.form[e]),this.formEl.child(e);this.bodyEl.children(this.formEl)}},{key:"createFormInputEl",value:function(e){var t=ie("div","".concat(te,"-item__error")).innerHTML("".concat(e.requireTip)),n=ie("input").attr({type:"text",placeholder:"".concat(e.placeholder),name:"".concat(e.name),autocomplete:"off"}).on("input",(function(){ee()(t.el).hide()}));return this.formVDom[e.name]={val:n,tip:t},ie("div","".concat(te,"-form_item field")).children(ie("span","".concat(e.require?"require":"span_padding")).innerHTML("".concat(e.title)),ie("div","".concat(te,"-item_content")).children(ie("div","ui input").children(n),t))}}]),Object.defineProperty(yt,"prototype",{writable:!1});var mn=gn;function gn(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=this,r=gn;if(!(n instanceof r))throw new TypeError("Cannot call a class as a function");this.$parent=e,this.el=null,this.config=t,this.headEl=null,this.bodyEl=null,this.footerEl=null,this.formEl=null,this.formVDom={},this.form={url:{require:!0,title:"接口访问地址",placeholder:"",name:"url",requireTip:"请输入接口访问地址"},key:{require:!0,title:"接口Key",placeholder:"",name:"key",requireTip:"请输入接口Key"},secret:{require:!0,title:"接口Secret",placeholder:"",name:"secret",requireTip:"请输入接口Secret"}},this.fieldValue={},this.init(),this.setData(),ee()(this.el.el).modal({closable:!1,autofocus:!1,allowMultiple:!0})}function An(e){return(An="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}(function(e,t){for(var n,r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(n=function(e){if("object"!==An(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0===t)return String(e);if("object"!==An(t=t.call(e,"string")))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}(i.key),"symbol"===An(n)?n:String(n)),i)}})((wt=bn).prototype,[{key:"init",value:function(){var e=this;this.headEl=ie("div","".concat(te,"-dialog__header")).children(ie("span").innerHTML(this.getTitle()),ie("div").children(ie("i","x icon ".concat(te,"-xIcon")).on("click",(function(){e.hide()})))),this.datasetListEl=ie("div","".concat(te,"-dataset-content")),this.selectDatasetEl=ie("div","".concat(te,"-select-dataset-content")),this.countEl=ie("span"),this.setSelectCount(0,0),this.bodyEl=ie("div","".concat(te,"-dialog__body")).children(ie("div","".concat(te,"-main")).children(ie("div","".concat(te,"-left")).children(ie("div","".concat(te,"-Auth-config-main")).children(ie("div","".concat(te,"-Auth-config")).children(ie("i","cog icon ".concat(te,"-xIcon-primary")),ie("span","".concat(te,"-xIcon-primary")).innerHTML("配置授权")).on("click",(function(){e.authDialogEl.show()}))),ie("div","".concat(te,"-dataset-main")).children(ie("div","".concat(te,"-toolbar")).children(ie("div","ui icon mini input ".concat(te,"-toolbar-input")).children(ie("input").attr({type:"text",placeholder:"输入搜索关键词",autocomplete:"off"}).css("border-radius","20px").on("input",(function(t){t=t.target.value,e.search(t)})),ie("i","search icon ".concat(te,"-xIcon"))),ie("button","ui mini primary button").innerHTML("刷新").on("click",(function(){e.authDialogEl.submit()}))),this.datasetListEl)),ie("div","".concat(te,"-right")).children(ie("div","".concat(te,"-toolbar")).children(ie("div","".concat(te,"-select-dataset-count")).children(ie("span").innerHTML("已选").css("margin-right","10px"),this.countEl),ie("span","".concat(te,"-select-dataset-clear")).innerHTML("清空").on("click",(function(){e.clearSelectListEl()}))),this.selectDatasetEl))),this.footerEl=ie("div","".concat(te,"-dialog__footer")).children(ie("div").children(ie("button","ui primary button").innerHTML("确 定").on("click",(function(){var t=e.getSelectData();e.trigger("submit",t),e.hide()})),ie("button","ui basic button").innerHTML("取 消").on("click",(function(){e.hide()})))),this.el=ie("div","".concat(te,"-api-dataset_dialog ui modal")).children(this.headEl,this.bodyEl,this.footerEl)}},{key:"update",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{apiConfig:{},select:[]};this.options=e;try{this.authDialogEl.update(e.apiConfig)}catch(e){}}},{key:"getSelectData",value:function(){var e,t=[];for(e in this.selectDataset){var n=this.selectDataset[e];t.push(n)}return t}},{key:"on",value:function(e,t){this.eventMap.set(e,t)}},{key:"trigger",value:function(e){var t=this.eventMap;if(t.has(e)){for(var n=arguments.length,r=new Array(1<n?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];(t=t.get(e)).call.apply(t,[this].concat(r))}}},{key:"search",value:function(e){var t=this.datasetList.filter((function(t,n){if(t.name.includes(e))return t}));this.createDatasetListEl(t,!0)}},{key:"setSelectCount",value:function(){var e=Object.keys(this.selectDataset).length,t=this.datasetList.length;this.countEl.innerHTML("".concat(e,"/").concat(t))}},{key:"getDatasetList",value:function(){return this.datasetList}},{key:"setDatasetList",value:function(e,t){var n=this,r=(this.datasetList=e,this.options.select);if(this.createDatasetListEl(e),0<r.length)for(var i in this.datasetListVdom)!function(e){var t=n.datasetListVdom[e],i=n.datasetList.filter((function(t){if(t.name==e)return t}))[0];i&&r.includes(e)&&(t.check(),n.selectDataset[i.id]||(n.selectDataset,n.createSelectDatasetListEl(i,t)))}(i);t&&(e=this.getSelectData(),this.trigger("updated",e))}},{key:"getTitle",value:function(){return"添加API服务数据集"}},{key:"show",value:function(){ee()(this.el.el).modal("show")}},{key:"hide",value:function(){ee()(this.el.el).modal("hide")}},{key:"createDatasetListEl",value:function(e,t){var n=this,r=this;this.datasetListEl.innerHTML(""),e.forEach((function(e){var t=new le({label:e.name,"data-key":e.id,labelTip:e.name});t.setLabelClass("".concat(te,"-checkbox_label")),ee()(t.el.el).checkbox({onChecked:function(n){r.selectDataset[e.id]||r.createSelectDatasetListEl(e,t)},onUnchecked:function(t){try{var n=r.selectDataset[e.id];r.deleteSelectDataSetListEl(e,n.el)}catch(t){}}}),n.datasetListEl.child(ie("div","".concat(te,"-dataset-item")).child(t.el)),n.datasetListVdom[e.name]=t})),t||this.clearSelectListEl()}},{key:"clearSelectListEl",value:function(){try{for(var e in this.selectDatasetEl.innerHTML(""),this.selectDataset){var t=this.selectDataset[e];ee()(t.checkEl.el.el).checkbox("set unchecked")}this.selectDataset={},this.setSelectCount()}catch(e){}}},{key:"createSelectDatasetListEl",value:function(e,t){var n=this,r=ie("div","".concat(te,"-select-dataset-item")).children(ie("span").innerHTML(e.name),ie("i","x icon ".concat(te,"-xIcon-primary_b6")));r.on("click",(function(){n.deleteSelectDataSetListEl(e,r),ee()(t.el.el).checkbox("set unchecked")})),this.selectDatasetEl.child(r),this.selectDataset[e.id]={val:e,el:r,checkEl:t},this.setSelectCount()}},{key:"deleteSelectDataSetListEl",value:function(e,t){this.selectDatasetEl.removeChild(t.el),delete this.selectDataset[e.id],this.setSelectCount()}}]),Object.defineProperty(wt,"prototype",{writable:!1});var vn=bn;function bn(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{apiConfig:{},select:[]},n=this,r=bn;if(!(n instanceof r))throw new TypeError("Cannot call a class as a function");this.el=null,this.options=t,this.eventMap=new Map,this.headEl=null,this.bodyEl=null,this.footerEl=null,this.datasetListEl=null,this.selectDatasetEl=null,this.selectDataset={},this.datasetList=[],this.datasetListVdom={},this.authDialogEl=new mn(this,t.apiConfig),this.init(),ee()(this.el.el).modal({closable:!1,autofocus:!1,allowMultiple:!0})}function yn(e){return(yn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}(function(e,t){for(var n,r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(n=function(e){if("object"!==yn(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0===t)return String(e);if("object"!==yn(t=t.call(e,"string")))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}(i.key),"symbol"===yn(n)?n:String(n)),i)}})((xt=xn).prototype,[{key:"on",value:function(e,t){this.dialogEl.on(e,t)}},{key:"show",value:function(){this.dialogEl.show()}},{key:"hide",value:function(){this.dialogEl.hide()}},{key:"update",value:function(e){return this.dialogEl.update(e)}}]),Object.defineProperty(xt,"prototype",{writable:!1});var wn=xn;function xn(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{apiConfig:{},select:[]},t=this,n=xn;if(!(t instanceof n))throw new TypeError("Cannot call a class as a function");this.dialogEl=new vn(this,e)}function Cn(e){return(Cn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}(function(e,t){for(var n,r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(n=function(e){if("object"!==Cn(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0===t)return String(e);if("object"!==Cn(t=t.call(e,"string")))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}(i.key),"symbol"===Cn(n)?n:String(n)),i)}})((Ct=En).prototype,[{key:"init",value:function(){var e=this;this.headEl=ie("div","".concat(te,"-dialog__header")).children(ie("span").innerHTML(this.getTitle()),ie("div").children(ie("i","x icon ".concat(te,"-xIcon")).on("click",(function(){e.hide()})))),this.datasetListEl=ie("div","".concat(te,"-dataset-content")),this.selectDatasetEl=ie("div","".concat(te,"-select-dataset-content")),this.countEl=ie("span"),this.inputEl=ie("div","ui icon mini input ".concat(te,"-toolbar-input")).children(ie("input","me_input").attr({type:"text",placeholder:"输入搜索关键词",autocomplete:"off"}).css("border-radius","20px").on("input",(function(t){t=t.target.value,e.search(t)})),ie("i","search icon ".concat(te,"-xIcon"))),this.setSelectCount(0,0),this.bodyEl=ie("div","".concat(te,"-dialog__body")).children(ie("div","".concat(te,"-main")).children(ie("div","".concat(te,"-left")).children(ie("div","".concat(te,"-dataset-main")).children(ie("div","".concat(te,"-toolbar")).children(this.inputEl,ie("button","ui mini primary button").innerHTML("刷新").on("click",(function(){var t=e.getSelectData();e.trigger("refresh",t)}))).css({paddingTop:"0px",marginTop:"0px"}),this.datasetListEl)),ie("div","".concat(te,"-right")).children(ie("div","".concat(te,"-toolbar")).children(ie("div","".concat(te,"-select-dataset-count")).children(ie("span").innerHTML("已选").css("margin-right","10px"),this.countEl),ie("span","".concat(te,"-select-dataset-clear")).innerHTML("清空").on("click",(function(){e.clearSelectListEl()}))),this.selectDatasetEl))),this.footerEl=ie("div","".concat(te,"-dialog__footer")).children(ie("div").children(ie("button","ui primary button").innerHTML("确 定").on("click",(function(){var t=e.getSelectData();e.trigger("submit",t),e.hide()})),ie("button","ui basic button").innerHTML("取 消").on("click",(function(){e.hide()})))),this.el=ie("div","".concat(te,"-api-dataset_dialog ui modal")).children(this.headEl,this.bodyEl,this.footerEl)}},{key:"update",value:function(e){e&&(e.dataList&&(this.options.dataList=e.dataList),e.select&&(this.options.select=e.select),this.setDatasetList(this.options.dataList))}},{key:"getSelectData",value:function(){var e,t=[];for(e in this.selectDataset){var n=this.selectDataset[e];t.push(n.val)}return t}},{key:"on",value:function(e,t){this.eventMap.set(e,t)}},{key:"trigger",value:function(e){var t=this.eventMap;if(t.has(e)){for(var n=arguments.length,r=new Array(1<n?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];(t=t.get(e)).call.apply(t,[this].concat(r))}}},{key:"search",value:function(e){var t=this.datasetList.filter((function(t,n){if(t.name.includes(e))return t}));this.createDatasetListEl(t,!0)}},{key:"setSelectCount",value:function(){var e=Object.keys(this.selectDataset).length,t=this.datasetList.length;this.countEl.innerHTML("".concat(e,"/").concat(t))}},{key:"getDatasetList",value:function(){return this.datasetList}},{key:"setDatasetList",value:function(e,t){var n=this,r=(this.datasetList=e,this.options.select);if(this.createDatasetListEl(e),0<r.length)for(var i in this.datasetListVdom)!function(e){var t=n.datasetListVdom[e],i=n.datasetList.filter((function(t){if(t.name==e)return t}))[0];i&&r.includes(e)&&(t.check(),n.selectDataset[i.id]||(n.selectDataset,n.createSelectDatasetListEl(i,t)))}(i);t&&(e=this.getSelectData(),this.trigger("updated",e))}},{key:"getTitle",value:function(){return"添加数据集"}},{key:"show",value:function(){ee()(this.el.el).modal("show")}},{key:"emptyInput",value:function(){ee()(this.inputEl.el).find(".me_input").val("")}},{key:"hide",value:function(){ee()(this.el.el).modal("hide")}},{key:"createDatasetListEl",value:function(e,t){var n=this,r=this;this.datasetListEl.innerHTML(""),e.forEach((function(e){var t=new le({label:e.name,"data-key":e.id,labelTip:e.name});t.setLabelClass("".concat(te,"-checkbox_label")),ee()(t.el.el).checkbox({onChecked:function(n){r.selectDataset[e.id]||r.createSelectDatasetListEl(e,t)},onUnchecked:function(t){try{var n=r.selectDataset[e.id];r.deleteSelectDataSetListEl(e,n.el)}catch(t){}}}),n.datasetListEl.child(ie("div","".concat(te,"-dataset-item")).child(t.el)),n.datasetListVdom[e.name]=t})),t||this.clearSelectListEl()}},{key:"clearSelectListEl",value:function(){try{for(var e in this.selectDatasetEl.innerHTML(""),this.selectDataset){var t=this.selectDataset[e];ee()(t.checkEl.el.el).checkbox("set unchecked")}this.selectDataset={},this.setSelectCount()}catch(e){}}},{key:"createSelectDatasetListEl",value:function(e,t){var n=this,r=ie("div","".concat(te,"-select-dataset-item")).children(ie("span").innerHTML(e.name),ie("i","x icon ".concat(te,"-xIcon-primary_b6")));r.on("click",(function(){n.deleteSelectDataSetListEl(e,r),ee()(t.el.el).checkbox("set unchecked")})),this.selectDatasetEl.child(r),this.selectDataset[e.id]={val:e,el:r,checkEl:t},this.setSelectCount()}},{key:"deleteSelectDataSetListEl",value:function(e,t){this.selectDatasetEl.removeChild(t.el),delete this.selectDataset[e.id],this.setSelectCount()}}]),Object.defineProperty(Ct,"prototype",{writable:!1});var kn=En;function En(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{dataList:[],select:[]},n=this,r=En;if(!(n instanceof r))throw new TypeError("Cannot call a class as a function");this.el=null,this.options=t,this.eventMap=new Map,this.headEl=null,this.bodyEl=null,this.inputEl=null,this.footerEl=null,this.datasetListEl=null,this.selectDatasetEl=null,this.selectDataset={},this.datasetList=[],this.datasetListVdom={},this.init(),ee()(this.el.el).modal({closable:!1,autofocus:!1,allowMultiple:!0})}window&&(window.xzSearchManage=function(e){return new ut(e,1<arguments.length&&void 0!==arguments[1]?arguments[1]:{})},window.xzSearchPanel=function(){return new fn(0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],2<arguments.length&&void 0!==arguments[2]&&arguments[2])},window.xzApiDataset=function(){return new wn(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{apiConfig:{},select:[]})},window.xzDataset=function(e){return new kn(e)})})()},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){var r;n=[n(8)],void 0!==(t="function"==typeof(r=function(e){"use strict";var t=function(e,t){if("string"!=typeof t||t.length){var n="string"==typeof t?new RegExp(t,"i"):t,r=function(e){var t=0;if(3===e.nodeType){var i=e.data.search(n);if(i>=0&&e.data.length>0){var o=e.data.match(n),a=document.createElement("span");a.className="highlight";var s=e.splitText(i),u=(s.splitText(o[0].length),s.cloneNode(!0));a.appendChild(u),s.parentNode.replaceChild(a,s),t=1}}else if(1===e.nodeType&&e.childNodes&&!/(script|style)/i.test(e.tagName)&&("highlight"!==e.className||"SPAN"!==e.tagName))for(var c=0;c<e.childNodes.length;++c)c+=r(e.childNodes[c]);return t};return e.each((function(){r(this)}))}},n=(e.fn.removeHighlight=function(){return this.find("span.highlight").each((function(){this.parentNode.firstChild.nodeName;var e=this.parentNode;e.replaceChild(this.firstChild,this),e.normalize()})).end()},function(){}),r=(n.prototype={on:function(e,t){this._events=this._events||{},this._events[e]=this._events[e]||[],this._events[e].push(t)},off:function(e,t){var n=arguments.length;return 0===n?delete this._events:1===n?delete this._events[e]:(this._events=this._events||{},void(e in this._events!=!1&&this._events[e].splice(this._events[e].indexOf(t),1)))},trigger:function(e){const t=this._events=this._events||{};if(e in t!=!1)for(var n=0;n<t[e].length;n++)t[e][n].apply(this,Array.prototype.slice.call(arguments,1))}},n.mixin=function(e){for(var t=["on","off","trigger"],r=0;r<t.length;r++)e.prototype[t[r]]=n.prototype[t[r]]},{}),i=(r.mixin=function(e){e.plugins={},e.prototype.initializePlugins=function(e){var t,n,r,o=this,a=[];if(o.plugins={names:[],settings:{},requested:{},loaded:{}},i.isArray(e))for(t=0,n=e.length;t<n;t++)"string"==typeof e[t]?a.push(e[t]):(o.plugins.settings[e[t].name]=e[t].options,a.push(e[t].name));else if(e)for(r in e)e.hasOwnProperty(r)&&(o.plugins.settings[r]=e[r],a.push(r));for(;a.length;)o.require(a.shift())},e.prototype.loadPlugin=function(t){var n=this,r=n.plugins,i=e.plugins[t];if(!e.plugins.hasOwnProperty(t))throw new Error('Unable to find "'+t+'" plugin');r.requested[t]=!0,r.loaded[t]=i.fn.apply(n,[n.plugins.settings[t]||{}]),r.names.push(t)},e.prototype.require=function(e){var t=this,n=t.plugins;if(!t.plugins.loaded.hasOwnProperty(e)){if(n.requested[e])throw new Error('Plugin has circular dependency ("'+e+'")');t.loadPlugin(e)}return n.loaded[e]},e.define=function(t,n){e.plugins[t]={name:t,fn:n}}},{isArray:Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}}),o=function(e,t){this.items=e,this.settings=t||{diacritics:!0}},a=(o.prototype.tokenize=function(e,t){if(!(e=c(String(e||"").toLowerCase()))||!e.length)return[];var n,r,i,o,a=[],s=e.split(/ +/);for(n=0,r=s.length;n<r;n++){if(i=l(s[n]),this.settings.diacritics)for(o in f)f.hasOwnProperty(o)&&(i=i.replace(new RegExp(o,"g"),f[o]));t&&(i="\\b"+i),a.push({string:s[n],regex:new RegExp(i,"i")})}return a},o.prototype.iterator=function(e,t){(h(e)?Array.prototype.forEach||function(e){for(var t=0,n=this.length;t<n;t++)e(this[t],t,this)}:function(e){for(var t in this)this.hasOwnProperty(t)&&e(this[t],t,this)}).apply(e,[t])},o.prototype.getScoreFunction=function(e,t){var n,r,i,o;e=this.prepareSearch(e,t),r=e.tokens,n=e.options.fields,i=r.length,o=e.options.nesting;var a=function(e,t){var n,r;return e?-1===(r=(e=String(e||"")).search(t.regex))?0:(n=t.string.length/e.length,0===r&&(n+=.5),n):0},s=function(){var e=n.length;return e?1===e?function(e,t){return a(u(t,n[0],o),e)}:function(t,r){for(var i=0,s=0;i<e;i++)s+=a(u(r,n[i],o),t);return s/e}:function(){return 0}}();return i?1===i?function(e){return s(r[0],e)}:"and"===e.options.conjunction?function(e){for(var t,n=0,o=0;n<i;n++){if((t=s(r[n],e))<=0)return 0;o+=t}return o/i}:function(e){for(var t=0,n=0;t<i;t++)n+=s(r[t],e);return n/i}:function(){return 0}},o.prototype.getSortFunction=function(e,t){var n,r,i,o,s,c,l,h,f,d,p;if(p=!(e=(i=this).prepareSearch(e,t)).query&&t.sort_empty||t.sort,f=function(e,n){return"$score"===e?n.score:u(i.items[n.id],e,t.nesting)},s=[],p)for(n=0,r=p.length;n<r;n++)(e.query||"$score"!==p[n].field)&&s.push(p[n]);if(e.query){for(d=!0,n=0,r=s.length;n<r;n++)if("$score"===s[n].field){d=!1;break}d&&s.unshift({field:"$score",direction:"desc"})}else for(n=0,r=s.length;n<r;n++)if("$score"===s[n].field){s.splice(n,1);break}for(h=[],n=0,r=s.length;n<r;n++)h.push("desc"===s[n].direction?-1:1);return(c=s.length)?1===c?(o=s[0].field,l=h[0],function(e,t){return l*a(f(o,e),f(o,t))}):function(e,t){var n,r,i;for(n=0;n<c;n++)if(i=s[n].field,r=h[n]*a(f(i,e),f(i,t)))return r;return 0}:null},o.prototype.prepareSearch=function(e,t){if("object"==typeof e)return e;var n=(t=s({},t)).fields,r=t.sort,i=t.sort_empty;return n&&!h(n)&&(t.fields=[n]),r&&!h(r)&&(t.sort=[r]),i&&!h(i)&&(t.sort_empty=[i]),{options:t,query:String(e||"").toLowerCase(),tokens:this.tokenize(e,t.respect_word_boundaries),total:0,items:[]}},o.prototype.search=function(e,t){var n,r,i,o,a=this;return r=this.prepareSearch(e,t),t=r.options,e=r.query,o=t.score||a.getScoreFunction(r),e.length?a.iterator(a.items,(function(e,i){n=o(e),(!1===t.filter||n>0)&&r.items.push({score:n,id:i})})):a.iterator(a.items,(function(e,t){r.items.push({score:1,id:t})})),(i=a.getSortFunction(r,t))&&r.items.sort(i),r.total=r.items.length,"number"==typeof t.limit&&(r.items=r.items.slice(0,t.limit)),r},function(e,t){return"number"==typeof e&&"number"==typeof t?e>t?1:e<t?-1:0:(e=d(String(e||"")))>(t=d(String(t||"")))?1:t>e?-1:0}),s=function(e,t){var n,r,i,o;for(n=1,r=arguments.length;n<r;n++)if(o=arguments[n])for(i in o)o.hasOwnProperty(i)&&(e[i]=o[i]);return e},u=function(e,t,n){if(e&&t){if(!n)return e[t];for(var r=t.split(".");r.length&&(e=e[r.shift()]););return e}},c=function(e){return(e+"").replace(/^\s+|\s+$|/g,"")},l=function(e){return(e+"").replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")},h=Array.isArray||void 0!==e&&e.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},f={a:"[aḀḁĂăÂâǍǎȺⱥȦȧẠạÄäÀàÁáĀāÃãÅåąĄÃąĄ]",b:"[b␢βΒB฿𐌁ᛒ]",c:"[cĆćĈĉČčĊċC̄c̄ÇçḈḉȻȼƇƈɕᴄＣｃ]",d:"[dĎďḊḋḐḑḌḍḒḓḎḏĐđD̦d̦ƉɖƊɗƋƌᵭᶁᶑȡᴅＤｄð]",e:"[eÉéÈèÊêḘḙĚěĔĕẼẽḚḛẺẻĖėËëĒēȨȩĘęᶒɆɇȄȅẾếỀềỄễỂểḜḝḖḗḔḕȆȇẸẹỆệⱸᴇＥｅɘǝƏƐε]",f:"[fƑƒḞḟ]",g:"[gɢ₲ǤǥĜĝĞğĢģƓɠĠġ]",h:"[hĤĥĦħḨḩẖẖḤḥḢḣɦʰǶƕ]",i:"[iÍíÌìĬĭÎîǏǐÏïḮḯĨĩĮįĪīỈỉȈȉȊȋỊịḬḭƗɨɨ̆ᵻᶖİiIıɪＩｉ]",j:"[jȷĴĵɈɉʝɟʲ]",k:"[kƘƙꝀꝁḰḱǨǩḲḳḴḵκϰ₭]",l:"[lŁłĽľĻļĹĺḶḷḸḹḼḽḺḻĿŀȽƚⱠⱡⱢɫɬᶅɭȴʟＬｌ]",n:"[nŃńǸǹŇňÑñṄṅŅņṆṇṊṋṈṉN̈n̈ƝɲȠƞᵰᶇɳȵɴＮｎŊŋ]",o:"[oØøÖöÓóÒòÔôǑǒŐőŎŏȮȯỌọƟɵƠơỎỏŌōÕõǪǫȌȍՕօ]",p:"[pṔṕṖṗⱣᵽƤƥᵱ]",q:"[qꝖꝗʠɊɋꝘꝙq̃]",r:"[rŔŕɌɍŘřŖŗṘṙȐȑȒȓṚṛⱤɽ]",s:"[sŚśṠṡṢṣꞨꞩŜŝŠšŞşȘșS̈s̈]",t:"[tŤťṪṫŢţṬṭƮʈȚțṰṱṮṯƬƭ]",u:"[uŬŭɄʉỤụÜüÚúÙùÛûǓǔŰűŬŭƯưỦủŪūŨũŲųȔȕ∪]",v:"[vṼṽṾṿƲʋꝞꝟⱱʋ]",w:"[wẂẃẀẁŴŵẄẅẆẇẈẉ]",x:"[xẌẍẊẋχ]",y:"[yÝýỲỳŶŷŸÿỸỹẎẏỴỵɎɏƳƴ]",z:"[zŹźẐẑŽžŻżẒẓẔẕƵƶ]"},d=function(){var e,t,n,r,i="",o={};for(n in f)if(f.hasOwnProperty(n))for(i+=r=f[n].substring(2,f[n].length-1),e=0,t=r.length;e<t;e++)o[r.charAt(e)]=n;var a=new RegExp("["+i+"]","g");return function(e){return e.replace(a,(function(e){return o[e]})).toLowerCase()}}();function p(e,t){return navigator.userAgentData?e===navigator.userAgentData.platform:t.test(navigator.userAgent)}var m=p("macOS",/Mac/),g=m?91:17,A=m?18:17,v=!p("Android",/android/i)&&!!document.createElement("input").validity,b=function(e){return void 0!==e},y=function(e){return null==e?null:"boolean"==typeof e?e?"1":"0":e+""},w=function(e){return(e+"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")},x=function(e,t,n){var r=e[t];e[t]=function(){var t=r.apply(e,arguments);return n.apply(e,arguments),t}},C=function(e){var t=!1;return function(){t||(t=!0,e.apply(this,arguments))}},k=function(e,t){var n;return function(){var r=this,i=arguments;window.clearTimeout(n),n=window.setTimeout((function(){e.apply(r,i)}),t)}},E=function(e,t,n){var r,i=e.trigger,o={};for(r in e.trigger=function(){var n=arguments[0];if(-1===t.indexOf(n))return i.apply(e,arguments);o[n]=arguments},n.apply(e,[]),e.trigger=i,o)o.hasOwnProperty(r)&&i.apply(e,o[r])},S=function(e){var t={};if(void 0===e)return console.warn("WARN getInputSelection cannot locate input control"),t;if("selectionStart"in e)t.start=e.selectionStart,t.length=e.selectionEnd-t.start;else if(document.selection){e.focus();var n=document.selection.createRange(),r=document.selection.createRange().text.length;n.moveStart("character",-e.value.length),t.start=n.text.length-r,t.length=r}return t},_=function(t,n){return t?(T.$testInput||(T.$testInput=e("<span />").css({position:"absolute",width:"auto",padding:0,whiteSpace:"pre"}),e("<div />").css({position:"absolute",width:0,height:0,overflow:"hidden"}).append(T.$testInput).appendTo("body")),T.$testInput.text(t),function(e,t,n){var r,i,o={};if(n)for(r=0,i=n.length;r<i;r++)o[n[r]]=e.css(n[r]);else o=e.css();t.css(o)}(n,T.$testInput,["letterSpacing","fontSize","fontFamily","fontWeight","textTransform"]),T.$testInput.width()):0},O=function(e){var t=document.createElement("div");return t.appendChild(e.cloneNode(!0)),t.innerHTML},T=function(t,n){var r,i,a,s,u=this;(s=t[0]).selectize=u;var c=window.getComputedStyle&&window.getComputedStyle(s,null);if(a=(a=c?c.getPropertyValue("direction"):s.currentStyle&&s.currentStyle.direction)||t.parents("[dir]:first").attr("dir")||"",e.extend(u,{order:0,settings:n,$input:t,tabIndex:t.attr("tabindex")||"",tagType:"select"===s.tagName.toLowerCase()?1:2,rtl:/rtl/i.test(a),eventNS:".selectize"+ ++T.count,highlightedValue:null,isBlurring:!1,isOpen:!1,isDisabled:!1,isRequired:t.is("[required]"),isInvalid:!1,isLocked:!1,isFocused:!1,isInputHidden:!1,isSetup:!1,isShiftDown:!1,isCmdDown:!1,isCtrlDown:!1,ignoreFocus:!1,ignoreBlur:!1,ignoreHover:!1,hasOptions:!1,currentResults:null,lastValue:"",lastValidValue:"",lastOpenTarget:!1,caretPos:0,loading:0,loadedSearches:{},isDropdownClosing:!1,$activeOption:null,$activeItems:[],optgroups:{},options:{},userOptions:{},items:[],renderCache:{},onSearchChange:null===n.loadThrottle?u.onSearchChange:k(u.onSearchChange,n.loadThrottle)}),u.sifter=new o(this.options,{diacritics:n.diacritics}),u.settings.options){for(r=0,i=u.settings.options.length;r<i;r++)u.registerOption(u.settings.options[r]);delete u.settings.options}if(u.settings.optgroups){for(r=0,i=u.settings.optgroups.length;r<i;r++)u.registerOptionGroup(u.settings.optgroups[r]);delete u.settings.optgroups}u.settings.mode=u.settings.mode||(1===u.settings.maxItems?"single":"multi"),"boolean"!=typeof u.settings.hideSelected&&(u.settings.hideSelected="multi"===u.settings.mode),u.initializePlugins(u.settings.plugins),u.setupCallbacks(),u.setupTemplates(),u.setup()};return n.mixin(T),r.mixin(T),e.extend(T.prototype,{setup:function(){var t,n,r,i,o,a,s,u,c,l,h=this,f=h.settings,d=h.eventNS,p=e(window),b=e(document),y=h.$input;if(s=h.settings.mode,u=y.attr("class")||"",t=e("<div>").addClass(f.wrapperClass).addClass(u+" selectize-control").addClass(s),n=e("<div>").addClass(f.inputClass+" selectize-input items").appendTo(t),r=e('<input type="select-one" autocomplete="new-password" autofill="no" />').appendTo(n).attr("tabindex",y.is(":disabled")?"-1":h.tabIndex),a=e(f.dropdownParent||t),i=e("<div>").addClass(f.dropdownClass).addClass(s+" selectize-dropdown").hide().appendTo(a),o=e("<div>").addClass(f.dropdownContentClass+" selectize-dropdown-content").attr("tabindex","-1").appendTo(i),(l=y.attr("id"))&&(r.attr("id",l+"-selectized"),e("label[for='"+l+"']").attr("for",l+"-selectized")),h.settings.copyClassesToDropdown&&i.addClass(u),t.css({width:y[0].style.width}),h.plugins.names.length&&(c="plugin-"+h.plugins.names.join(" plugin-"),t.addClass(c),i.addClass(c)),(null===f.maxItems||f.maxItems>1)&&1===h.tagType&&y.attr("multiple","multiple"),h.settings.placeholder&&r.attr("placeholder",f.placeholder),h.settings.search||(r.attr("readonly",!0),r.attr("inputmode","none"),n.css("cursor","pointer")),!h.settings.splitOn&&h.settings.delimiter){var w=h.settings.delimiter.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&");h.settings.splitOn=new RegExp("\\s*"+w+"+\\s*")}y.attr("autocorrect")&&r.attr("autocorrect",y.attr("autocorrect")),y.attr("autocapitalize")&&r.attr("autocapitalize",y.attr("autocapitalize")),y.is("input")&&(r[0].type=y[0].type),h.$wrapper=t,h.$control=n,h.$control_input=r,h.$dropdown=i,h.$dropdown_content=o,i.on("mouseenter mousedown mouseup click","[data-disabled]>[data-selectable]",(function(e){e.stopImmediatePropagation()})),i.on("mouseenter","[data-selectable]",(function(){return h.onOptionHover.apply(h,arguments)})),i.on("mouseup click","[data-selectable]",(function(){return h.onOptionSelect.apply(h,arguments)})),function(e,t,n,r){e.on(t,n,(function(t){for(var n=t.target;n&&n.parentNode!==e[0];)n=n.parentNode;return t.currentTarget=n,r.apply(this,[t])}))}(n,"mouseup","*:not(input)",(function(){return h.onItemSelect.apply(h,arguments)})),function(e){var t=null,n=function(n,r){var i,o,a,s,u,c,l,h,f;r=r||{},(n=n||window.event||{}).metaKey||n.altKey||(r.force||!1!==e.data("grow"))&&(i=e.val(),n.type&&"keydown"===n.type.toLowerCase()&&(a=(o=n.keyCode)>=48&&o<=57||o>=65&&o<=90||o>=96&&o<=111||o>=186&&o<=222||32===o,46===o||8===o?(f=S(e[0])).length?i=i.substring(0,f.start)+i.substring(f.start+f.length):8===o&&f.start?i=i.substring(0,f.start-1)+i.substring(f.start+1):46===o&&void 0!==f.start&&(i=i.substring(0,f.start)+i.substring(f.start+1)):a&&(l=n.shiftKey,h=String.fromCharCode(n.keyCode),i+=h=l?h.toUpperCase():h.toLowerCase())),c=(u=e.attr("placeholder"))?_(u,e)+4:0,(s=Math.max(_(i,e),c)+4)!==t&&(t=s,e.width(s),e.triggerHandler("resize")))};e.on("keydown keyup update blur",n),n()}(r),n.on({mousedown:function(){return h.onMouseDown.apply(h,arguments)},click:function(){return h.onClick.apply(h,arguments)}}),r.on({mousedown:function(e){(""!==h.$control_input.val()||h.settings.openOnFocus)&&e.stopPropagation()},keydown:function(){return h.onKeyDown.apply(h,arguments)},keypress:function(){return h.onKeyPress.apply(h,arguments)},input:function(){return h.onInput.apply(h,arguments)},resize:function(){h.positionDropdown.apply(h,[])},focus:function(){return h.ignoreBlur=!1,h.onFocus.apply(h,arguments)},paste:function(){return h.onPaste.apply(h,arguments)}}),b.on("keydown"+d,(function(e){h.isCmdDown=e[m?"metaKey":"ctrlKey"],h.isCtrlDown=e[m?"altKey":"ctrlKey"],h.isShiftDown=e.shiftKey})),b.on("keyup"+d,(function(e){e.keyCode===A&&(h.isCtrlDown=!1),16===e.keyCode&&(h.isShiftDown=!1),e.keyCode===g&&(h.isCmdDown=!1)})),b.on("mousedown"+d,(function(e){if(h.isFocused){if(e.target===h.$dropdown[0]||e.target.parentNode===h.$dropdown[0])return!1;h.$dropdown.has(e.target).length||e.target===h.$control[0]||h.blur(e.target)}})),p.on(["scroll"+d,"resize"+d].join(" "),(function(){h.isOpen&&h.positionDropdown.apply(h,arguments)})),p.on("mousemove"+d,(function(){h.ignoreHover=h.settings.ignoreHover}));var x=e("<div></div>"),C=y.children().detach();y.replaceWith(x),x.replaceWith(y),this.revertSettings={$children:C,tabindex:y.attr("tabindex")},y.attr("tabindex",-1).hide().after(h.$wrapper),Array.isArray(f.items)&&(h.lastValidValue=f.items,h.setValue(f.items),delete f.items),v&&y.on("invalid"+d,(function(e){e.preventDefault(),h.isInvalid=!0,h.refreshState()})),h.updateOriginalInput(),h.refreshItems(),h.refreshState(),h.updatePlaceholder(),h.isSetup=!0,y.is(":disabled")&&h.disable(),h.on("change",this.onChange),y.data("selectize",h),y.addClass("selectized"),h.trigger("initialize"),!0===f.preload&&h.onSearchChange("")},setupTemplates:function(){var t=this,n=t.settings.labelField,r=t.settings.valueField,i=t.settings.optgroupLabelField,o={optgroup:function(e){return'<div class="optgroup">'+e.html+"</div>"},optgroup_header:function(e,t){return'<div class="optgroup-header">'+t(e[i])+"</div>"},option:function(e,t){var i=e.classes?" "+e.classes:"";return i+=""===e[r]?" selectize-dropdown-emptyoptionlabel":"","<div"+(e.styles?' style="'+e.styles+'"':"")+' class="option'+i+'">'+t(e[n])+"</div>"},item:function(e,t){return'<div class="item">'+t(e[n])+"</div>"},option_create:function(e,t){return'<div class="create">Add <strong>'+t(e.input)+"</strong>&#x2026;</div>"}};t.settings.render=e.extend({},o,t.settings.render)},setupCallbacks:function(){var e,t,n={initialize:"onInitialize",change:"onChange",item_add:"onItemAdd",item_remove:"onItemRemove",clear:"onClear",option_add:"onOptionAdd",option_remove:"onOptionRemove",option_clear:"onOptionClear",optgroup_add:"onOptionGroupAdd",optgroup_remove:"onOptionGroupRemove",optgroup_clear:"onOptionGroupClear",dropdown_open:"onDropdownOpen",dropdown_close:"onDropdownClose",type:"onType",load:"onLoad",focus:"onFocus",blur:"onBlur",dropdown_item_activate:"onDropdownItemActivate",dropdown_item_deactivate:"onDropdownItemDeactivate"};for(e in n)n.hasOwnProperty(e)&&(t=this.settings[n[e]])&&this.on(e,t)},onClick:function(e){var t=this;t.isDropdownClosing||t.isFocused&&t.isOpen||(t.focus(),e.preventDefault())},onMouseDown:function(t){var n=this,r=t.isDefaultPrevented();e(t.target);if(n.isFocused||r||window.setTimeout((function(){n.focus()}),0),t.target!==n.$control_input[0]||""===n.$control_input.val())return"single"===n.settings.mode?n.isOpen?n.close():n.open():(r||n.setActiveItem(null),n.settings.openOnFocus||(n.isOpen&&t.target===n.lastOpenTarget?(n.close(),n.lastOpenTarget=!1):(n.isOpen||(n.refreshOptions(),n.open()),n.lastOpenTarget=t.target))),!1},onChange:function(){var e=this;""!==e.getValue()&&(e.lastValidValue=e.getValue()),this.$input.trigger("input"),this.$input.trigger("change")},onPaste:function(e){var t=this;t.isFull()||t.isInputHidden||t.isLocked?e.preventDefault():t.settings.splitOn&&setTimeout((function(){var e=t.$control_input.val();if(e.match(t.settings.splitOn))for(var n=e.trim().split(t.settings.splitOn),r=0,i=n.length;r<i;r++)t.createItem(n[r])}),0)},onKeyPress:function(e){if(this.isLocked)return e&&e.preventDefault();var t=String.fromCharCode(e.keyCode||e.which);return this.settings.create&&"multi"===this.settings.mode&&t===this.settings.delimiter?(this.createItem(),e.preventDefault(),!1):void 0},onKeyDown:function(e){e.target,this.$control_input[0];var t=this;if(t.isLocked)9!==e.keyCode&&e.preventDefault();else{switch(e.keyCode){case 65:if(t.isCmdDown)return void t.selectAll();break;case 27:return void(t.isOpen&&(e.preventDefault(),e.stopPropagation(),t.close()));case 78:if(!e.ctrlKey||e.altKey)break;case 40:if(!t.isOpen&&t.hasOptions)t.open();else if(t.$activeOption){t.ignoreHover=!0;var n=t.getAdjacentOption(t.$activeOption,1);n.length&&t.setActiveOption(n,!0,!0)}return void e.preventDefault();case 80:if(!e.ctrlKey||e.altKey)break;case 38:if(t.$activeOption){t.ignoreHover=!0;var r=t.getAdjacentOption(t.$activeOption,-1);r.length&&t.setActiveOption(r,!0,!0)}return void e.preventDefault();case 13:return void(t.isOpen&&t.$activeOption&&(t.onOptionSelect({currentTarget:t.$activeOption}),e.preventDefault()));case 37:return void t.advanceSelection(-1,e);case 39:return void t.advanceSelection(1,e);case 9:return t.settings.selectOnTab&&t.isOpen&&t.$activeOption&&(t.onOptionSelect({currentTarget:t.$activeOption}),t.isFull()||e.preventDefault()),void(t.settings.create&&t.createItem()&&t.settings.showAddOptionOnCreate&&e.preventDefault());case 8:case 46:return void t.deleteSelection(e)}!t.isFull()&&!t.isInputHidden||(m?e.metaKey:e.ctrlKey)||e.preventDefault()}},onInput:function(e){var t=this,n=t.$control_input.val()||"";t.lastValue!==n&&(t.lastValue=n,t.onSearchChange(n),t.refreshOptions(),t.trigger("type",n))},onSearchChange:function(e){var t=this,n=t.settings.load;n&&(t.loadedSearches.hasOwnProperty(e)||(t.loadedSearches[e]=!0,t.load((function(r){n.apply(t,[e,r])}))))},onFocus:function(e){var t=this,n=t.isFocused;if(t.isDisabled)return t.blur(),e&&e.preventDefault(),!1;t.ignoreFocus||(t.isFocused=!0,"focus"===t.settings.preload&&t.onSearchChange(""),n||t.trigger("focus"),t.$activeItems.length||(t.showInput(),t.setActiveItem(null),t.refreshOptions(!!t.settings.openOnFocus)),t.refreshState())},onBlur:function(e,t){var n=this;if(n.isFocused&&(n.isFocused=!1,!n.ignoreFocus)){var r=function(){n.close(),n.setTextboxValue(""),n.setActiveItem(null),n.setActiveOption(null),n.setCaret(n.items.length),n.refreshState(),t&&t.focus&&t.focus(),n.isBlurring=!1,n.ignoreFocus=!1,n.trigger("blur")};n.isBlurring=!0,n.ignoreFocus=!0,n.settings.create&&n.settings.createOnBlur?n.createItem(null,!1,r):r()}},onOptionHover:function(e){this.ignoreHover||this.setActiveOption(e.currentTarget,!1)},onOptionSelect:function(t){var n,r,i=this;t.preventDefault&&(t.preventDefault(),t.stopPropagation()),(r=e(t.currentTarget)).hasClass("create")?i.createItem(null,(function(){i.settings.closeAfterSelect&&i.close()})):void 0!==(n=r.attr("data-value"))&&(i.lastQuery=null,i.setTextboxValue(""),i.addItem(n),i.settings.closeAfterSelect?i.close():!i.settings.hideSelected&&t.type&&/mouse/.test(t.type)&&i.setActiveOption(i.getOption(n)))},onItemSelect:function(e){var t=this;t.isLocked||"multi"===t.settings.mode&&(e.preventDefault(),t.setActiveItem(e.currentTarget,e))},load:function(e){var t=this,n=t.$wrapper.addClass(t.settings.loadingClass);t.loading++,e.apply(t,[function(e){t.loading=Math.max(t.loading-1,0),e&&e.length&&(t.addOption(e),t.refreshOptions(t.isFocused&&!t.isInputHidden)),t.loading||n.removeClass(t.settings.loadingClass),t.trigger("load",e)}])},getTextboxValue:function(){return this.$control_input.val()},setTextboxValue:function(e){var t=this.$control_input;t.val()!==e&&(t.val(e).triggerHandler("update"),this.lastValue=e)},getValue:function(){return 1===this.tagType&&this.$input.attr("multiple")?this.items:this.items.join(this.settings.delimiter)},setValue:function(e,t){(Array.isArray(e)?e:[e]).join("")!==this.items.join("")&&E(this,t?[]:["change"],(function(){this.clear(t),this.addItems(e,t)}))},setMaxItems:function(e){0===e&&(e=null),this.settings.maxItems=e,this.settings.mode=this.settings.mode||(1===this.settings.maxItems?"single":"multi"),this.refreshState()},setActiveItem:function(t,n){var r,i,o,a,s,u,c,l,h=this;if("single"!==h.settings.mode){if(!(t=e(t)).length)return e(h.$activeItems).removeClass("active"),h.$activeItems=[],void(h.isFocused&&h.showInput());if("mousedown"===(r=n&&n.type.toLowerCase())&&h.isShiftDown&&h.$activeItems.length){for(l=h.$control.children(".active:last"),(a=Array.prototype.indexOf.apply(h.$control[0].childNodes,[l[0]]))>(s=Array.prototype.indexOf.apply(h.$control[0].childNodes,[t[0]]))&&(c=a,a=s,s=c),i=a;i<=s;i++)u=h.$control[0].childNodes[i],-1===h.$activeItems.indexOf(u)&&(e(u).addClass("active"),h.$activeItems.push(u));n.preventDefault()}else"mousedown"===r&&h.isCtrlDown||"keydown"===r&&this.isShiftDown?t.hasClass("active")?(o=h.$activeItems.indexOf(t[0]),h.$activeItems.splice(o,1),t.removeClass("active")):h.$activeItems.push(t.addClass("active")[0]):(e(h.$activeItems).removeClass("active"),h.$activeItems=[t.addClass("active")[0]]);h.hideInput(),this.isFocused||h.focus()}},setActiveOption:function(t,n,r){var i,o,a,s,u,c=this;c.$activeOption&&(c.$activeOption.removeClass("active"),c.trigger("dropdown_item_deactivate",c.$activeOption.attr("data-value"))),c.$activeOption=null,(t=e(t)).length&&(c.$activeOption=t.addClass("active"),c.isOpen&&c.trigger("dropdown_item_activate",c.$activeOption.attr("data-value")),!n&&b(n)||(i=c.$dropdown_content.height(),o=c.$activeOption.outerHeight(!0),n=c.$dropdown_content.scrollTop()||0,s=a=c.$activeOption.offset().top-c.$dropdown_content.offset().top+n,u=a-i+o,a+o>i+n?c.$dropdown_content.stop().animate({scrollTop:u},r?c.settings.scrollDuration:0):a<n&&c.$dropdown_content.stop().animate({scrollTop:s},r?c.settings.scrollDuration:0)))},selectAll:function(){var e=this;"single"!==e.settings.mode&&(e.$activeItems=Array.prototype.slice.apply(e.$control.children(":not(input)").addClass("active")),e.$activeItems.length&&(e.hideInput(),e.close()),e.focus())},hideInput:function(){var e=this;e.setTextboxValue(""),e.$control_input.css({opacity:0,position:"absolute",left:e.rtl?1e4:0}),e.isInputHidden=!0},showInput:function(){this.$control_input.css({opacity:1,position:"relative",left:0}),this.isInputHidden=!1},focus:function(){var e=this;return e.isDisabled||(e.ignoreFocus=!0,e.$control_input[0].focus(),window.setTimeout((function(){e.ignoreFocus=!1,e.onFocus()}),0)),e},blur:function(e){return this.$control_input[0].blur(),this.onBlur(null,e),this},getScoreFunction:function(e){return this.sifter.getScoreFunction(e,this.getSearchOptions())},getSearchOptions:function(){var e=this.settings,t=e.sortField;return"string"==typeof t&&(t=[{field:t}]),{fields:e.searchField,conjunction:e.searchConjunction,sort:t,nesting:e.nesting,filter:e.filter,respect_word_boundaries:e.respect_word_boundaries}},search:function(t){var n,r,i,o=this,a=o.settings,s=this.getSearchOptions();if(a.score&&"function"!=typeof(i=o.settings.score.apply(this,[t])))throw new Error('Selectize "score" setting must be a function that returns a function');if(t!==o.lastQuery?(a.normalize&&(t=t.normalize("NFD").replace(/[\u0300-\u036f]/g,"")),o.lastQuery=t,r=o.sifter.search(t,e.extend(s,{score:i})),o.currentResults=r):r=e.extend(!0,{},o.currentResults),a.hideSelected)for(n=r.items.length-1;n>=0;n--)-1!==o.items.indexOf(y(r.items[n].id))&&r.items.splice(n,1);return r},refreshOptions:function(n){var r,i,o,a,s,u,c,l,h,f,d,p,m,g,A,v;void 0===n&&(n=!0);var b=this,w=b.$control_input.val().trim(),x=b.search(w),C=b.$dropdown_content,k=b.$activeOption&&y(b.$activeOption.attr("data-value"));for(a=x.items.length,"number"==typeof b.settings.maxOptions&&(a=Math.min(a,b.settings.maxOptions)),s={},u=[],r=0;r<a;r++)for(c=b.options[x.items[r].id],l=b.render("option",c),h=c[b.settings.optgroupField]||"",i=0,o=(f=Array.isArray(h)?h:[h])&&f.length;i<o;i++){var E;if(h=f[i],!b.optgroups.hasOwnProperty(h)&&"function"==typeof b.settings.optionGroupRegister)(E=b.settings.optionGroupRegister.apply(b,[h]))&&b.registerOptionGroup(E);b.optgroups.hasOwnProperty(h)||(h=""),s.hasOwnProperty(h)||(s[h]=document.createDocumentFragment(),u.push(h)),s[h].appendChild(l)}for(this.settings.lockOptgroupOrder&&u.sort((function(e,t){return(b.optgroups[e]&&b.optgroups[e].$order||0)-(b.optgroups[t]&&b.optgroups[t].$order||0)})),d=document.createDocumentFragment(),r=0,a=u.length;r<a;r++)h=u[r],b.optgroups.hasOwnProperty(h)&&s[h].childNodes.length?((p=document.createDocumentFragment()).appendChild(b.render("optgroup_header",b.optgroups[h])),p.appendChild(s[h]),d.appendChild(b.render("optgroup",e.extend({},b.optgroups[h],{html:O(p),dom:p})))):d.appendChild(s[h]);if(C.html(d),b.settings.highlight&&(C.removeHighlight(),x.query.length&&x.tokens.length))for(r=0,a=x.tokens.length;r<a;r++)t(C,x.tokens[r].regex);if(!b.settings.hideSelected)for(b.$dropdown.find(".selected").removeClass("selected"),r=0,a=b.items.length;r<a;r++)b.getOption(b.items[r]).addClass("selected");"auto"!==b.settings.dropdownSize.sizeType&&b.isOpen&&b.setupDropdownHeight(),(m=b.canCreate(w))&&b.settings.showAddOptionOnCreate&&(C.prepend(b.render("option_create",{input:w})),v=e(C[0].childNodes[0])),b.hasOptions=x.items.length>0||m&&b.settings.showAddOptionOnCreate||b.settings.setFirstOptionActive,b.hasOptions?(x.items.length>0?(A=k&&b.getOption(k),""!==x.query&&b.settings.setFirstOptionActive?g=C.find("[data-selectable]:first"):""!==x.query&&A&&A.length?g=A:"single"===b.settings.mode&&b.items.length&&(g=b.getOption(b.items[0])),g&&g.length||(g=v&&!b.settings.addPrecedence?b.getAdjacentOption(v,1):C.find("[data-selectable]:first"))):g=v,b.setActiveOption(g),n&&!b.isOpen&&b.open()):(b.setActiveOption(null),n&&b.isOpen&&b.close())},addOption:function(e){var t,n,r,i=this;if(Array.isArray(e))for(t=0,n=e.length;t<n;t++)i.addOption(e[t]);else(r=i.registerOption(e))&&(i.userOptions[r]=!0,i.lastQuery=null,i.trigger("option_add",r,e))},registerOption:function(e){var t=y(e[this.settings.valueField]);return null!=t&&!this.options.hasOwnProperty(t)&&(e.$order=e.$order||++this.order,this.options[t]=e,t)},registerOptionGroup:function(e){var t=y(e[this.settings.optgroupValueField]);return!!t&&(e.$order=e.$order||++this.order,this.optgroups[t]=e,t)},addOptionGroup:function(e,t){t[this.settings.optgroupValueField]=e,(e=this.registerOptionGroup(t))&&this.trigger("optgroup_add",e,t)},removeOptionGroup:function(e){this.optgroups.hasOwnProperty(e)&&(delete this.optgroups[e],this.renderCache={},this.trigger("optgroup_remove",e))},clearOptionGroups:function(){this.optgroups={},this.renderCache={},this.trigger("optgroup_clear")},updateOption:function(t,n){var r,i,o,a,s,u,c,l=this;if(t=y(t),o=y(n[l.settings.valueField]),null!==t&&l.options.hasOwnProperty(t)){if("string"!=typeof o)throw new Error("Value must be set in option data");c=l.options[t].$order,o!==t&&(delete l.options[t],-1!==(a=l.items.indexOf(t))&&l.items.splice(a,1,o)),n.$order=n.$order||c,l.options[o]=n,s=l.renderCache.item,u=l.renderCache.option,s&&(delete s[t],delete s[o]),u&&(delete u[t],delete u[o]),-1!==l.items.indexOf(o)&&(r=l.getItem(t),i=e(l.render("item",n)),r.hasClass("active")&&i.addClass("active"),r.replaceWith(i)),l.lastQuery=null,l.isOpen&&l.refreshOptions(!1)}},removeOption:function(e,t){var n=this;e=y(e);var r=n.renderCache.item,i=n.renderCache.option;r&&delete r[e],i&&delete i[e],delete n.userOptions[e],delete n.options[e],n.lastQuery=null,n.trigger("option_remove",e),n.removeItem(e,t)},clearOptions:function(t){var n=this;n.loadedSearches={},n.userOptions={},n.renderCache={};var r=n.options;e.each(n.options,(function(e,t){-1==n.items.indexOf(e)&&delete r[e]})),n.options=n.sifter.items=r,n.lastQuery=null,n.trigger("option_clear"),n.clear(t)},getOption:function(e){return this.getElementWithValue(e,this.$dropdown_content.find("[data-selectable]"))},getFirstOption:function(){var t=this.$dropdown.find("[data-selectable]");return t.length>0?t.eq(0):e()},getAdjacentOption:function(t,n){var r=this.$dropdown.find("[data-selectable]"),i=r.index(t)+n;return i>=0&&i<r.length?r.eq(i):e()},getElementWithValue:function(t,n){if(null!=(t=y(t)))for(var r=0,i=n.length;r<i;r++)if(n[r].getAttribute("data-value")===t)return e(n[r]);return e()},getElementWithTextContent:function(t,n,r){if(null!=(t=y(t)))for(var i=0,o=r.length;i<o;i++){var a=r[i].textContent;if(1==n&&(a=null!==a?a.toLowerCase():null,t=t.toLowerCase()),a===t)return e(r[i])}return e()},getItem:function(e){return this.getElementWithValue(e,this.$control.children())},getFirstItemMatchedByTextContent:function(e,t){return t=null!==t&&!0===t,this.getElementWithTextContent(e,t,this.$dropdown_content.find("[data-selectable]"))},addItems:function(e,t){this.buffer=document.createDocumentFragment();for(var n=this.$control[0].childNodes,r=0;r<n.length;r++)this.buffer.appendChild(n[r]);for(var i=Array.isArray(e)?e:[e],o=(r=0,i.length);r<o;r++)this.isPending=r<o-1,this.addItem(i[r],t);var a=this.$control[0];a.insertBefore(this.buffer,a.firstChild),this.buffer=null},addItem:function(t,n){E(this,n?[]:["change"],(function(){var r,i,o,a,s,u=this,c=u.settings.mode;t=y(t),-1===u.items.indexOf(t)?u.options.hasOwnProperty(t)&&("single"===c&&u.clear(n),"multi"===c&&u.isFull()||(r=e(u.render("item",u.options[t])),s=u.isFull(),u.items.splice(u.caretPos,0,t),u.insertAtCaret(r),(!u.isPending||!s&&u.isFull())&&u.refreshState(),u.isSetup&&(o=u.$dropdown_content.find("[data-selectable]"),u.isPending||(i=u.getOption(t),a=u.getAdjacentOption(i,1).attr("data-value"),u.refreshOptions(u.isFocused&&"single"!==c),a&&u.setActiveOption(u.getOption(a))),!o.length||u.isFull()?u.close():u.isPending||u.positionDropdown(),u.updatePlaceholder(),u.trigger("item_add",t,r),u.isPending||u.updateOriginalInput({silent:n})))):"single"===c&&u.close()}))},removeItem:function(t,n){var r,i,o,a=this;r=t instanceof e?t:a.getItem(t),t=y(r.attr("data-value")),-1!==(i=a.items.indexOf(t))&&(a.trigger("item_before_remove",t,r),r.remove(),r.hasClass("active")&&(r.removeClass("active"),o=a.$activeItems.indexOf(r[0]),a.$activeItems.splice(o,1),r.removeClass("active")),a.items.splice(i,1),a.lastQuery=null,!a.settings.persist&&a.userOptions.hasOwnProperty(t)&&a.removeOption(t,n),i<a.caretPos&&a.setCaret(a.caretPos-1),a.refreshState(),a.updatePlaceholder(),a.updateOriginalInput({silent:n}),a.positionDropdown(),a.trigger("item_remove",t,r))},createItem:function(e,t){var n=this,r=n.caretPos;e=e||(n.$control_input.val()||"").trim();var i=arguments[arguments.length-1];if("function"!=typeof i&&(i=function(){}),"boolean"!=typeof t&&(t=!0),!n.canCreate(e))return i(),!1;n.lock();var o="function"==typeof n.settings.create?this.settings.create:function(e){var t={};t[n.settings.labelField]=e;var r=e;if(n.settings.formatValueToKey&&"function"==typeof n.settings.formatValueToKey&&(null==(r=n.settings.formatValueToKey.apply(this,[r]))||"object"==typeof r||"function"==typeof r))throw new Error('Selectize "formatValueToKey" setting must be a function that returns a value other than object or function.');return t[n.settings.valueField]=r,t},a=C((function(e){if(n.unlock(),!e||"object"!=typeof e)return i();var o=y(e[n.settings.valueField]);if("string"!=typeof o)return i();n.setTextboxValue(""),n.addOption(e),n.setCaret(r),n.addItem(o),n.refreshOptions(t&&"single"!==n.settings.mode),i(e)})),s=o.apply(this,[e,a]);return void 0!==s&&a(s),!0},refreshItems:function(e){this.lastQuery=null,this.isSetup&&this.addItem(this.items,e),this.refreshState(),this.updateOriginalInput({silent:e})},refreshState:function(){this.refreshValidityState(),this.refreshClasses()},refreshValidityState:function(){if(!this.isRequired)return!1;var e=!this.items.length;this.isInvalid=e,this.$control_input.prop("required",e),this.$input.prop("required",!e)},refreshClasses:function(){var t=this,n=t.isFull(),r=t.isLocked;t.$wrapper.toggleClass("rtl",t.rtl),t.$control.toggleClass("focus",t.isFocused).toggleClass("disabled",t.isDisabled).toggleClass("required",t.isRequired).toggleClass("invalid",t.isInvalid).toggleClass("locked",r).toggleClass("full",n).toggleClass("not-full",!n).toggleClass("input-active",t.isFocused&&!t.isInputHidden).toggleClass("dropdown-active",t.isOpen).toggleClass("has-options",!e.isEmptyObject(t.options)).toggleClass("has-items",t.items.length>0),t.$control_input.data("grow",!n&&!r)},isFull:function(){return null!==this.settings.maxItems&&this.items.length>=this.settings.maxItems},updateOriginalInput:function(e){var t,n,r,i,o,a,s=this;e=e||{},1===s.tagType?(i=s.$input.find("option"),t=[],n=[],r=[],a=[],i.get().forEach((function(e){t.push(e.value)})),s.items.forEach((function(e){o=s.options[e][s.settings.labelField]||"",a.push(e),-1==t.indexOf(e)&&n.push('<option value="'+w(e)+'" selected="selected">'+w(o)+"</option>")})),r=t.filter((function(e){return a.indexOf(e)<0})).map((function(e){return'option[value="'+e+'"]'})),t.length-r.length+n.length!==0||s.$input.attr("multiple")||n.push('<option value="" selected="selected"></option>'),s.$input.find(r.join(", ")).remove(),s.$input.append(n.join(""))):(s.$input.val(s.getValue()),s.$input.attr("value",s.$input.val())),s.isSetup&&(e.silent||s.trigger("change",s.$input.val()))},updatePlaceholder:function(){if(this.settings.placeholder){var e=this.$control_input;this.items.length?e.removeAttr("placeholder"):e.attr("placeholder",this.settings.placeholder),e.triggerHandler("update",{force:!0})}},open:function(){var e=this;e.isLocked||e.isOpen||"multi"===e.settings.mode&&e.isFull()||(e.focus(),e.isOpen=!0,e.refreshState(),e.$dropdown.css({visibility:"hidden",display:"block"}),e.setupDropdownHeight(),e.positionDropdown(),e.$dropdown.css({visibility:"visible"}),e.trigger("dropdown_open",e.$dropdown))},close:function(){var e=this,t=e.isOpen;"single"===e.settings.mode&&e.items.length&&(e.hideInput(),e.isBlurring&&e.$control_input[0].blur()),e.isOpen=!1,e.$dropdown.hide(),e.setActiveOption(null),e.refreshState(),t&&e.trigger("dropdown_close",e.$dropdown)},positionDropdown:function(){var e=this.$control,t="body"===this.settings.dropdownParent?e.offset():e.position();t.top+=e.outerHeight(!0);var n=e[0].getBoundingClientRect().width;this.settings.minWidth&&this.settings.minWidth>n&&(n=this.settings.minWidth),this.$dropdown.css({width:n,top:t.top,left:t.left})},setupDropdownHeight:function(){if("object"==typeof this.settings.dropdownSize&&"auto"!==this.settings.dropdownSize.sizeType){var t=this.settings.dropdownSize.sizeValue;if("numberItems"===this.settings.dropdownSize.sizeType){for(var n=this.$dropdown_content.find("*").not(".optgroup, .highlight").not(this.settings.ignoreOnDropwdownHeight),r=0,i=0,o=0,a=0,s=0;s<t;s++){var u=e(n[s]);if(0===u.length)break;if(r+=u.outerHeight(!0),void 0===u.data("selectable")){if(u.hasClass("optgroup-header")){var c=window.getComputedStyle(u.parent()[0],":before");c&&(i=c.marginTop?Number(c.marginTop.replace(/\W*(\w)\w*/g,"$1")):0,o=c.marginBottom?Number(c.marginBottom.replace(/\W*(\w)\w*/g,"$1")):0,a=c.borderTopWidth?Number(c.borderTopWidth.replace(/\W*(\w)\w*/g,"$1")):0)}t++}}t=r+(this.$dropdown_content.css("padding-top")?Number(this.$dropdown_content.css("padding-top").replace(/\W*(\w)\w*/g,"$1")):0)+(this.$dropdown_content.css("padding-bottom")?Number(this.$dropdown_content.css("padding-bottom").replace(/\W*(\w)\w*/g,"$1")):0)+i+o+a+"px"}else if("fixedHeight"!==this.settings.dropdownSize.sizeType)return void console.warn('Selectize.js - Value of "sizeType" must be "fixedHeight" or "numberItems');this.$dropdown_content.css({height:t,maxHeight:"none"})}},clear:function(e){var t=this;t.items.length&&(t.$control.children(":not(input)").remove(),t.items=[],t.lastQuery=null,t.setCaret(0),t.setActiveItem(null),t.updatePlaceholder(),t.updateOriginalInput({silent:e}),t.refreshState(),t.showInput(),t.trigger("clear"))},insertAtCaret:function(e){var t=Math.min(this.caretPos,this.items.length),n=e[0],r=this.buffer||this.$control[0];0===t?r.insertBefore(n,r.firstChild):r.insertBefore(n,r.childNodes[t]),this.setCaret(t+1)},deleteSelection:function(t){var n,r,i,o,a,s,u,c,l,h=this;if(i=t&&8===t.keyCode?-1:1,o=S(h.$control_input[0]),h.$activeOption&&!h.settings.hideSelected&&(u="string"==typeof h.settings.deselectBehavior&&"top"===h.settings.deselectBehavior?h.getFirstOption().attr("data-value"):h.getAdjacentOption(h.$activeOption,-1).attr("data-value")),a=[],h.$activeItems.length){for(l=h.$control.children(".active:"+(i>0?"last":"first")),s=h.$control.children(":not(input)").index(l),i>0&&s++,n=0,r=h.$activeItems.length;n<r;n++)a.push(e(h.$activeItems[n]).attr("data-value"));t&&(t.preventDefault(),t.stopPropagation())}else(h.isFocused||"single"===h.settings.mode)&&h.items.length&&(i<0&&0===o.start&&0===o.length?a.push(h.items[h.caretPos-1]):i>0&&o.start===h.$control_input.val().length&&a.push(h.items[h.caretPos]));if(!a.length||"function"==typeof h.settings.onDelete&&!1===h.settings.onDelete.apply(h,[a]))return!1;for(void 0!==s&&h.setCaret(s);a.length;)h.removeItem(a.pop());return h.showInput(),h.positionDropdown(),h.refreshOptions(!0),u&&(c=h.getOption(u)).length&&h.setActiveOption(c),!0},advanceSelection:function(e,t){var n,r,i,o,a,s=this;0!==e&&(s.rtl&&(e*=-1),n=e>0?"last":"first",r=S(s.$control_input[0]),s.isFocused&&!s.isInputHidden?(o=s.$control_input.val().length,(e<0?0===r.start&&0===r.length:r.start===o)&&!o&&s.advanceCaret(e,t)):(a=s.$control.children(".active:"+n)).length&&(i=s.$control.children(":not(input)").index(a),s.setActiveItem(null),s.setCaret(e>0?i+1:i)))},advanceCaret:function(e,t){var n,r,i=this;0!==e&&(n=e>0?"next":"prev",i.isShiftDown?(r=i.$control_input[n]()).length&&(i.hideInput(),i.setActiveItem(r),t&&t.preventDefault()):i.setCaret(i.caretPos+e))},setCaret:function(t){var n,r,i,o,a=this;if(t="single"===a.settings.mode?a.items.length:Math.max(0,Math.min(a.items.length,t)),!a.isPending)for(n=0,r=(i=a.$control.children(":not(input)")).length;n<r;n++)o=e(i[n]).detach(),n<t?a.$control_input.before(o):a.$control.append(o);a.caretPos=t},lock:function(){this.close(),this.isLocked=!0,this.refreshState()},unlock:function(){this.isLocked=!1,this.refreshState()},disable:function(){var e=this;e.$input.prop("disabled",!0),e.$control_input.prop("disabled",!0).prop("tabindex",-1),e.isDisabled=!0,e.lock()},enable:function(){var e=this;e.$input.prop("disabled",!1),e.$control_input.prop("disabled",!1).prop("tabindex",e.tabIndex),e.isDisabled=!1,e.unlock()},destroy:function(){var t=this,n=t.eventNS,r=t.revertSettings;t.trigger("destroy"),t.off(),t.$wrapper.remove(),t.$dropdown.remove(),t.$input.html("").append(r.$children).removeAttr("tabindex").removeClass("selectized").attr({tabindex:r.tabindex}).show(),t.$control_input.removeData("grow"),t.$input.removeData("selectize"),0==--T.count&&T.$testInput&&(T.$testInput.remove(),T.$testInput=void 0),e(window).off(n),e(document).off(n),e(document.body).off(n),delete t.$input[0].selectize},render:function(t,n){var r,i,o="",a=!1,s=this;return"option"!==t&&"item"!==t||(a=!!(r=y(n[s.settings.valueField]))),a&&(b(s.renderCache[t])||(s.renderCache[t]={}),s.renderCache[t].hasOwnProperty(r))?s.renderCache[t][r]:(o=e(s.settings.render[t].apply(this,[n,w])),"option"===t||"option_create"===t?n[s.settings.disabledField]||o.attr("data-selectable",""):"optgroup"===t&&(i=n[s.settings.optgroupValueField]||"",o.attr("data-group",i),n[s.settings.disabledField]&&o.attr("data-disabled","")),"option"!==t&&"item"!==t||o.attr("data-value",r||""),a&&(s.renderCache[t][r]=o[0]),o[0])},clearCache:function(e){void 0===e?this.renderCache={}:delete this.renderCache[e]},canCreate:function(e){var t=this;if(!t.settings.create)return!1;var n=t.settings.createFilter;return e.length&&("function"!=typeof n||n.apply(t,[e]))&&("string"!=typeof n||new RegExp(n).test(e))&&(!(n instanceof RegExp)||n.test(e))}}),T.count=0,T.defaults={options:[],optgroups:[],plugins:[],delimiter:",",splitOn:null,persist:!0,diacritics:!0,create:!1,showAddOptionOnCreate:!0,createOnBlur:!1,createFilter:null,highlight:!0,openOnFocus:!0,maxOptions:1e3,maxItems:null,hideSelected:null,addPrecedence:!1,selectOnTab:!0,preload:!1,allowEmptyOption:!1,showEmptyOptionInDropdown:!1,emptyOptionLabel:"--",setFirstOptionActive:!1,closeAfterSelect:!1,closeDropdownThreshold:250,scrollDuration:60,deselectBehavior:"previous",loadThrottle:300,loadingClass:"loading",dataAttr:"data-data",optgroupField:"optgroup",valueField:"value",labelField:"text",disabledField:"disabled",optgroupLabelField:"label",optgroupValueField:"value",lockOptgroupOrder:!1,sortField:"$order",searchField:["text"],searchConjunction:"and",respect_word_boundaries:!0,mode:null,wrapperClass:"",inputClass:"",dropdownClass:"",dropdownContentClass:"",dropdownParent:null,copyClassesToDropdown:!0,dropdownSize:{sizeType:"auto",sizeValue:"auto"},normalize:!1,ignoreOnDropwdownHeight:"img, i",search:!0,render:{}},e.fn.selectize=function(t){var n=e.fn.selectize.defaults,r=e.extend({},n,t),i=r.dataAttr,o=r.labelField,a=r.valueField,s=r.disabledField,u=r.optgroupField,c=r.optgroupLabelField,l=r.optgroupValueField,h=function(t,n){var h,f,d,p,m=n.options,g={},A=function(e){var t=i&&e.attr(i),n=e.data(),r={};return"string"==typeof t&&t.length&&(!function(e){try{JSON.parse(str)}catch(e){return!1}return!0}()?r[t]=t:Object.assign(r,JSON.parse(t))),Object.assign(r,n),r||null},v=function(t,i){t=e(t);var c=y(t.val());if(c||r.allowEmptyOption)if(g.hasOwnProperty(c)){if(i){var l=g[c][u];l?Array.isArray(l)?l.push(i):g[c][u]=[l,i]:g[c][u]=i}}else{var h=A(t)||{};h[o]=h[o]||t.text(),h[a]=h[a]||c,h[s]=h[s]||t.prop("disabled"),h[u]=h[u]||i,h.styles=t.attr("style")||"",h.classes=t.attr("class")||"",g[c]=h,m.push(h),t.is(":selected")&&n.items.push(c)}},b=function(t){var r,i,o,a,u;for((o=(t=e(t)).attr("label"))&&((a=A(t)||{})[c]=o,a[l]=o,a[s]=t.prop("disabled"),n.optgroups.push(a)),r=0,i=(u=e("option",t)).length;r<i;r++)v(u[r],o)};for(n.maxItems=t.attr("multiple")?null:1,h=0,f=(p=t.children()).length;h<f;h++)"optgroup"===(d=p[h].tagName.toLowerCase())?b(p[h]):"option"===d&&v(p[h])};return this.each((function(){if(!this.selectize){var s=e(this),u=this.tagName.toLowerCase(),c=s.attr("placeholder")||s.attr("data-placeholder");if(c||r.allowEmptyOption||(c=s.children('option[value=""]').text()),r.allowEmptyOption&&r.showEmptyOptionInDropdown&&!s.children('option[value=""]').length){var l=s.html(),f=w(r.emptyOptionLabel||"--");s.html('<option value="">'+f+"</option>"+l)}var d={placeholder:c,options:[],optgroups:[],items:[]};"select"===u?h(s,d):function(e,t){var n,s,u,c,l=e.attr(i);if(l)for(t.options=JSON.parse(l),n=0,s=t.options.length;n<s;n++)t.items.push(t.options[n][a]);else{var h=(e.val()||"").trim();if(!r.allowEmptyOption&&!h.length)return;for(n=0,s=(u=h.split(r.delimiter)).length;n<s;n++)(c={})[o]=u[n],c[a]=u[n],t.options.push(c);t.items=u}}(s,d),new T(s,e.extend(!0,{},n,d,t)).settings_user=t}}))},e.fn.selectize.defaults=T.defaults,e.fn.selectize.support={validity:v},T.define("auto_position",(function(){const e="top",t="bottom";this.positionDropdown=function(){const n=this.$control,r="body"===this.settings.dropdownParent?n.offset():n.position();r.top+=n.outerHeight(!0);const i=this.$dropdown.prop("scrollHeight")+5,o=this.$control.get(0).getBoundingClientRect().top+i+this.$wrapper.height()>window.innerHeight?e:t,a={width:n.outerWidth(),left:r.left};if(o===e){const e={bottom:r.top,top:"unset"};"body"===this.settings.dropdownParent&&(e.top=r.top-this.$dropdown.outerHeight(!0)-n.outerHeight(!0),e.bottom="unset"),Object.assign(a,e),this.$dropdown.addClass("selectize-position-top"),this.$control.addClass("selectize-position-top")}else Object.assign(a,{top:r.top,bottom:"unset"}),this.$dropdown.removeClass("selectize-position-top"),this.$control.removeClass("selectize-position-top");this.$dropdown.css(a)}})),T.define("auto_select_on_type",(function(e){var t=this;t.onBlur=function(){var e=t.onBlur;return function(n){var r=t.getFirstItemMatchedByTextContent(t.lastValue,!0);return void 0!==r.attr("data-value")&&t.getValue()!==r.attr("data-value")&&t.setValue(r.attr("data-value")),e.apply(this,arguments)}}()})),T.define("autofill_disable",(function(e){var t=this;t.setup=function(){var e=t.setup;return function(){e.apply(t,arguments),t.$control_input.attr({autocomplete:"new-password",autofill:"no"})}}()})),T.define("clear_button",(function(t){var n=this;t=e.extend({title:"Clear",className:"clear",label:"×",html:function(e){return'<a class="'+e.className+'" title="'+e.title+'"> '+e.label+"</a>"}},t),n.setup=function(){var r=n.setup;return function(){r.apply(n,arguments),n.$button_clear=e(t.html(t)),"single"===n.settings.mode&&n.$wrapper.addClass("single"),n.$wrapper.append(n.$button_clear),""!==n.getValue()&&0!==n.getValue().length||n.$wrapper.find("."+t.className).css("display","none"),n.on("change",(function(){""===n.getValue()||0===n.getValue().length?n.$wrapper.find("."+t.className).css("display","none"):n.$wrapper.find("."+t.className).css("display","")})),n.$wrapper.on("click","."+t.className,(function(e){e.preventDefault(),e.stopImmediatePropagation(),e.stopPropagation(),n.isLocked||(n.clear(),n.$wrapper.find("."+t.className).css("display","none"))}))}}()})),T.define("drag_drop",(function(t){if(!e.fn.sortable)throw new Error('The "drag_drop" plugin requires jQuery UI "sortable".');if("multi"===this.settings.mode){var n=this;n.lock=function(){var e=n.lock;return function(){var t=n.$control.data("sortable");return t&&t.disable(),e.apply(n,arguments)}}(),n.unlock=function(){var e=n.unlock;return function(){var t=n.$control.data("sortable");return t&&t.enable(),e.apply(n,arguments)}}(),n.setup=function(){var t=n.setup;return function(){t.apply(this,arguments);var r=n.$control.sortable({items:"[data-value]",forcePlaceholderSize:!0,disabled:n.isLocked,start:function(e,t){t.placeholder.css("width",t.helper.css("width")),r.addClass("dragging")},stop:function(){r.removeClass("dragging");var t=n.$activeItems?n.$activeItems.slice():null,i=[];r.children("[data-value]").each((function(){i.push(e(this).attr("data-value"))})),n.isFocused=!1,n.setValue(i),n.isFocused=!0,n.setActiveItem(t),n.positionDropdown()}})}}()}})),T.define("dropdown_header",(function(t){var n=this;t=e.extend({title:"Untitled",headerClass:"selectize-dropdown-header",titleRowClass:"selectize-dropdown-header-title",labelClass:"selectize-dropdown-header-label",closeClass:"selectize-dropdown-header-close",html:function(e){return'<div class="'+e.headerClass+'"><div class="'+e.titleRowClass+'"><span class="'+e.labelClass+'">'+e.title+'</span><a href="javascript:void(0)" class="'+e.closeClass+'">&#xd7;</a></div></div>'}},t),n.setup=function(){var r=n.setup;return function(){r.apply(n,arguments),n.$dropdown_header=e(t.html(t)),n.$dropdown.prepend(n.$dropdown_header),n.$dropdown_header.find("."+t.closeClass).on("click",(function(){n.close()}))}}()})),T.define("optgroup_columns",(function(t){var n=this;t=e.extend({equalizeWidth:!0,equalizeHeight:!0},t),this.getAdjacentOption=function(t,n){var r=t.closest("[data-group]").find("[data-selectable]"),i=r.index(t)+n;return i>=0&&i<r.length?r.eq(i):e()},this.onKeyDown=function(){var e=n.onKeyDown;return function(t){var r,i,o,a;return!this.isOpen||37!==t.keyCode&&39!==t.keyCode?e.apply(this,arguments):(n.ignoreHover=!0,r=(a=this.$activeOption.closest("[data-group]")).find("[data-selectable]").index(this.$activeOption),void((i=(o=(a=37===t.keyCode?a.prev("[data-group]"):a.next("[data-group]")).find("[data-selectable]")).eq(Math.min(o.length-1,r))).length&&this.setActiveOption(i)))}}();var r=function(){var e,t=r.width,n=document;return void 0===t&&((e=n.createElement("div")).innerHTML='<div style="width:50px;height:50px;position:absolute;left:-50px;top:-50px;overflow:auto;"><div style="width:1px;height:100px;"></div></div>',e=e.firstChild,n.body.appendChild(e),t=r.width=e.offsetWidth-e.clientWidth,n.body.removeChild(e)),t},i=function(){var i,o,a,s,u,c,l;if((o=(l=e("[data-group]",n.$dropdown_content)).length)&&n.$dropdown_content.width()){if(t.equalizeHeight){for(a=0,i=0;i<o;i++)a=Math.max(a,l.eq(i).height());l.css({height:a})}t.equalizeWidth&&(c=n.$dropdown_content.innerWidth()-r(),s=Math.round(c/o),l.css({width:s}),o>1&&(u=c-s*(o-1),l.eq(o-1).css({width:u})))}};(t.equalizeHeight||t.equalizeWidth)&&(x(this,"positionDropdown",i),x(this,"refreshOptions",i))})),T.define("remove_button",(function(t){if("single"!==this.settings.mode){!function(t,n){var r=t,i='<a href="javascript:void(0)" class="'+n.className+'" tabindex="-1" title="'+w(n.title)+'">'+n.label+"</a>",o=function(e,t){var n=e.search(/(<\/[^>]+>\s*)$/);return e.substring(0,n)+t+e.substring(n)};t.setup=function(){var a=r.setup;return function(){if(n.append){var s=r.settings.render.item;r.settings.render.item=function(e){return o(s.apply(t,arguments),i)}}a.apply(t,arguments),t.$control.on("click","."+n.className,(function(t){if(t.preventDefault(),!r.isLocked){var n=e(t.currentTarget).parent();return r.setActiveItem(n),r.deleteSelection()&&r.setCaret(r.items.length),!1}}))}}()}(this,t=e.extend({label:"&#xd7;",title:"Remove",className:"remove",append:!0},t))}})),T.define("restore_on_backspace",(function(e){var t=this;e.text=e.text||function(e){return e[this.settings.labelField]},this.onKeyDown=function(){var n=t.onKeyDown;return function(t){var r,i;return 8===t.keyCode&&""===this.$control_input.val()&&!this.$activeItems.length&&(r=this.caretPos-1)>=0&&r<this.items.length?(i=this.options[this.items[r]],this.deleteSelection(t)&&(this.setTextboxValue(e.text.apply(this,[i])),this.refreshOptions(!0)),void t.preventDefault()):n.apply(this,arguments)}}()})),T.define("select_on_focus",(function(e){var t=this;t.on("focus",function(){var e=t.onFocus;return function(n){var r=t.getItem(t.getValue()).text();return t.clear(),t.setTextboxValue(r),t.$control_input.select(),setTimeout((function(){t.settings.selectOnTab&&t.setActiveOption(t.getFirstItemMatchedByTextContent(r)),t.settings.score=null}),0),e.apply(this,arguments)}}()),t.onBlur=function(){var e=t.onBlur;return function(n){return""===t.getValue()&&t.lastValidValue!==t.getValue()&&t.setValue(t.lastValidValue),setTimeout((function(){t.settings.score=function(){return function(){return 1}}}),0),e.apply(this,arguments)}}(),t.settings.score=function(){return function(){return 1}}})),T.define("tag_limit",(function(t){const n=this;t.tagLimit=t.tagLimit,this.onBlur=function(r){const i=n.onBlur;return function(n){if(i.apply(this,n),!n)return;const r=this.$control,o=r.find(".item"),a=t.tagLimit;void 0===a||o.length<=a||(o.toArray().forEach((function(t,n){n<a||e(t).hide()})),r.append("<span><b>"+(o.length-a)+"</b></span>"))}}(),this.onFocus=function(e){const t=n.onFocus;return function(e){if(t.apply(this,e),!e)return;const n=this.$control;n.find(".item").show(),n.find("span").remove()}}()})),T})?r.apply(t,n):r)&&(e.exports=t)},function(e,t,n){e.exports=function(e){var t=Math,n=e,r=n.lib,i=r.WordArray,o=r.Hasher,a=n.algo,s=[],u=[];function c(e){for(var n=t.sqrt(e),r=2;r<=n;r++)if(!(e%r))return!1;return!0}function l(e){return 4294967296*(e-(0|e))|0}for(var h=2,f=0;f<64;)c(h)&&(f<8&&(s[f]=l(t.pow(h,.5))),u[f]=l(t.pow(h,1/3)),f++),h++;var d=[],p=a.SHA256=o.extend({_doReset:function(){this._hash=new i.init(s.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],c=n[5],l=n[6],h=n[7],f=0;f<64;f++){if(f<16)d[f]=0|e[t+f];else{var p=d[f-15],m=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,g=d[f-2],A=(g<<15|g>>>17)^(g<<13|g>>>19)^g>>>10;d[f]=m+d[f-7]+A+d[f-16]}var v=r&i^r&o^i&o,b=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),y=h+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&c^~s&l)+u[f]+d[f];h=l,l=c,c=s,s=a+y|0,a=o,o=i,i=r,r=y+(b+v)|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+a|0,n[4]=n[4]+s|0,n[5]=n[5]+c|0,n[6]=n[6]+l|0,n[7]=n[7]+h|0},_doFinalize:function(){var e=this._data,n=e.words,r=8*this._nDataBytes,i=8*e.sigBytes;return n[i>>>5]|=128<<24-i%32,n[14+(i+64>>>9<<4)]=t.floor(r/4294967296),n[15+(i+64>>>9<<4)]=r,e.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});return n.SHA256=o._createHelper(p),n.HmacSHA256=o._createHmacHelper(p),e.SHA256}(n(39))},function(e,t,n){e.exports=function(e){var t=e,n=t.lib.Hasher,r=t.x64,i=r.Word,o=r.WordArray,a=t.algo;function s(){return i.create.apply(i,arguments)}for(var u=[s(1116352408,3609767458),s(1899447441,602891725),s(3049323471,3964484399),s(3921009573,2173295548),s(961987163,4081628472),s(1508970993,3053834265),s(2453635748,2937671579),s(2870763221,3664609560),s(3624381080,2734883394),s(310598401,1164996542),s(607225278,1323610764),s(1426881987,3590304994),s(1925078388,4068182383),s(2162078206,991336113),s(2614888103,633803317),s(3248222580,3479774868),s(3835390401,2666613458),s(4022224774,944711139),s(264347078,2341262773),s(604807628,2007800933),s(770255983,1495990901),s(1249150122,1856431235),s(1555081692,3175218132),s(1996064986,2198950837),s(2554220882,3999719339),s(2821834349,766784016),s(2952996808,2566594879),s(3210313671,3203337956),s(3336571891,1034457026),s(3584528711,2466948901),s(113926993,3758326383),s(338241895,168717936),s(666307205,1188179964),s(773529912,1546045734),s(1294757372,1522805485),s(1396182291,2643833823),s(1695183700,2343527390),s(1986661051,1014477480),s(2177026350,1206759142),s(2456956037,344077627),s(2730485921,1290863460),s(2820302411,3158454273),s(3259730800,3505952657),s(3345764771,106217008),s(3516065817,3606008344),s(3600352804,1432725776),s(4094571909,1467031594),s(275423344,851169720),s(430227734,3100823752),s(506948616,1363258195),s(659060556,3750685593),s(883997877,3785050280),s(958139571,3318307427),s(1322822218,3812723403),s(1537002063,2003034995),s(1747873779,3602036899),s(1955562222,1575990012),s(2024104815,1125592928),s(2227730452,2716904306),s(2361852424,442776044),s(2428436474,593698344),s(2756734187,3733110249),s(3204031479,2999351573),s(3329325298,3815920427),s(3391569614,3928383900),s(3515267271,566280711),s(3940187606,3454069534),s(4118630271,4000239992),s(116418474,1914138554),s(174292421,2731055270),s(289380356,3203993006),s(460393269,320620315),s(685471733,587496836),s(852142971,1086792851),s(1017036298,365543100),s(1126000580,2618297676),s(1288033470,3409855158),s(1501505948,4234509866),s(1607167915,987167468),s(1816402316,1246189591)],c=[],l=0;l<80;l++)c[l]=s();var h=a.SHA512=n.extend({_doReset:function(){this._hash=new o.init([new i.init(1779033703,4089235720),new i.init(3144134277,2227873595),new i.init(1013904242,4271175723),new i.init(2773480762,1595750129),new i.init(1359893119,2917565137),new i.init(2600822924,725511199),new i.init(528734635,4215389547),new i.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],a=n[3],s=n[4],l=n[5],h=n[6],f=n[7],d=r.high,p=r.low,m=i.high,g=i.low,A=o.high,v=o.low,b=a.high,y=a.low,w=s.high,x=s.low,C=l.high,k=l.low,E=h.high,S=h.low,_=f.high,O=f.low,T=d,D=p,B=m,I=g,M=A,j=v,N=b,F=y,R=w,P=x,L=C,U=k,z=E,H=S,$=_,Q=O,V=0;V<80;V++){var q,G,W=c[V];if(V<16)G=W.high=0|e[t+2*V],q=W.low=0|e[t+2*V+1];else{var K=c[V-15],Y=K.high,X=K.low,J=(Y>>>1|X<<31)^(Y>>>8|X<<24)^Y>>>7,Z=(X>>>1|Y<<31)^(X>>>8|Y<<24)^(X>>>7|Y<<25),ee=c[V-2],te=ee.high,ne=ee.low,re=(te>>>19|ne<<13)^(te<<3|ne>>>29)^te>>>6,ie=(ne>>>19|te<<13)^(ne<<3|te>>>29)^(ne>>>6|te<<26),oe=c[V-7],ae=oe.high,se=oe.low,ue=c[V-16],ce=ue.high,le=ue.low;G=(G=(G=J+ae+((q=Z+se)>>>0<Z>>>0?1:0))+re+((q+=ie)>>>0<ie>>>0?1:0))+ce+((q+=le)>>>0<le>>>0?1:0),W.high=G,W.low=q}var he,fe=R&L^~R&z,de=P&U^~P&H,pe=T&B^T&M^B&M,me=D&I^D&j^I&j,ge=(T>>>28|D<<4)^(T<<30|D>>>2)^(T<<25|D>>>7),Ae=(D>>>28|T<<4)^(D<<30|T>>>2)^(D<<25|T>>>7),ve=(R>>>14|P<<18)^(R>>>18|P<<14)^(R<<23|P>>>9),be=(P>>>14|R<<18)^(P>>>18|R<<14)^(P<<23|R>>>9),ye=u[V],we=ye.high,xe=ye.low,Ce=$+ve+((he=Q+be)>>>0<Q>>>0?1:0),ke=Ae+me;$=z,Q=H,z=L,H=U,L=R,U=P,R=N+(Ce=(Ce=(Ce=Ce+fe+((he=he+de)>>>0<de>>>0?1:0))+we+((he=he+xe)>>>0<xe>>>0?1:0))+G+((he=he+q)>>>0<q>>>0?1:0))+((P=F+he|0)>>>0<F>>>0?1:0)|0,N=M,F=j,M=B,j=I,B=T,I=D,T=Ce+(ge+pe+(ke>>>0<Ae>>>0?1:0))+((D=he+ke|0)>>>0<he>>>0?1:0)|0}p=r.low=p+D,r.high=d+T+(p>>>0<D>>>0?1:0),g=i.low=g+I,i.high=m+B+(g>>>0<I>>>0?1:0),v=o.low=v+j,o.high=A+M+(v>>>0<j>>>0?1:0),y=a.low=y+F,a.high=b+N+(y>>>0<F>>>0?1:0),x=s.low=x+P,s.high=w+R+(x>>>0<P>>>0?1:0),k=l.low=k+U,l.high=C+L+(k>>>0<U>>>0?1:0),S=h.low=S+H,h.high=E+z+(S>>>0<H>>>0?1:0),O=f.low=O+Q,f.high=_+$+(O>>>0<Q>>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[30+(r+128>>>10<<5)]=Math.floor(n/4294967296),t[31+(r+128>>>10<<5)]=n,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=n.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});return t.SHA512=n._createHelper(h),t.HmacSHA512=n._createHmacHelper(h),e.SHA512}(n(39),n(174))},function(e,t,n){e.exports=n.p+"icons/7268db9a886f7f827f7988d39a010a2d.jpg"},function(e,t,n){"use strict";var r=f(n(325)),i=f(n(173)),o=f(n(350)),a=f(n(351)),s=f(n(352)),u=f(n(238)),c=f(n(358)),l=n(241),h=f(n(239));function f(e){return e&&e.__esModule?e:{default:e}}function d(){}function p(e,t,n){var r=new d;if(void 0===e)throw Error("No element to render on was provided.");return r._renderProperties=(0,s.default)(e),r._encodings=[],r._options=h.default,r._errorHandler=new c.default(r),void 0!==t&&((n=n||{}).format||(n.format=A()),r.options(n)[n.format](t,n).render()),r}for(var m in p.getModule=function(e){return r.default[e]},r.default)r.default.hasOwnProperty(m)&&function(e,t){d.prototype[t]=d.prototype[t.toUpperCase()]=d.prototype[t.toLowerCase()]=function(n,r){var o=this;return o._errorHandler.wrapBarcodeCall((function(){r.text=void 0===r.text?void 0:""+r.text;var a=(0,i.default)(o._options,r),s=(a=(0,u.default)(a),e[t]);s=g(n,s,a);return o._encodings.push(s),o}))}}(r.default,m);function g(e,t,n){if(!(t=new t(e=""+e,n)).valid())throw new l.InvalidInputException(t.constructor.name,e);for(var r=t.encode(),a=(r=(0,o.default)(r),0);a<r.length;a++)r[a].options=(0,i.default)(n,r[a].options);return r}function A(){return r.default.CODE128?"CODE128":Object.keys(r.default)[0]}function v(e,t,n){t=(0,o.default)(t);for(var r=0;r<t.length;r++)t[r].options=(0,i.default)(n,t[r].options),(0,a.default)(t[r].options);(0,a.default)(n),new e.renderer(e.element,t,n).render(),e.afterRender&&e.afterRender()}d.prototype.options=function(e){return this._options=(0,i.default)(this._options,e),this},d.prototype.blank=function(e){return e=new Array(e+1).join("0"),this._encodings.push({data:e}),this},d.prototype.init=function(){if(this._renderProperties)for(var e in Array.isArray(this._renderProperties)||(this._renderProperties=[this._renderProperties]),this._renderProperties){var t=this._renderProperties[e],n=(0,i.default)(this._options,t.options);"auto"==n.format&&(n.format=A()),this._errorHandler.wrapBarcodeCall((function(){var e=g(n.value,r.default[n.format.toUpperCase()],n);v(t,e,n)}))}},d.prototype.render=function(){if(!this._renderProperties)throw new l.NoElementException;if(Array.isArray(this._renderProperties))for(var e=0;e<this._renderProperties.length;e++)v(this._renderProperties[e],this._encodings,this._options);else v(this._renderProperties,this._encodings,this._options);return this},d.prototype._defaults=h.default,"undefined"!=typeof window&&(window.JsBarcode=p),"undefined"!=typeof jQuery&&(jQuery.fn.JsBarcode=function(e,t){var n=[];return jQuery(this).each((function(){n.push(this)})),p(n,e,t)}),e.exports=p},function(e,t,n){"use strict";var r;void 0!==(t="function"==typeof(r=function(){function e(e){var t=e.scale||2,n=+e.scaleX||t,r=+e.scaleY||n;if(e.paddingleft=f(e.paddingleft,e.paddingwidth,e.padding,n),e.paddingright=f(e.paddingright,e.paddingwidth,e.padding,n),e.paddingtop=f(e.paddingtop,e.paddingheight,e.padding,r),e.paddingbottom=f(e.paddingbottom,e.paddingheight,e.padding,r),/^[0-9a-fA-F]{8}$/.test(""+e.backgroundcolor)){var i=e.backgroundcolor,o=parseInt(i.substr(0,2),16)/255,a=parseInt(i.substr(2,2),16)/255,s=parseInt(i.substr(4,2),16)/255,u=parseInt(i.substr(6,2),16)/255,c=Math.floor((1-o)*(1-u)*255).toString(16),l=Math.floor((1-a)*(1-u)*255).toString(16),h=Math.floor((1-s)*(1-u)*255).toString(16);e.backgroundcolor=(1==c.length?"0":"")+c+(1==l.length?"0":"")+l+(1==h.length?"0":"")+h}return e;function f(e,t,n,r){return null!=e?e*r:null!=t?t*r:n*r||0}}var t={bcid:1,text:1,scale:1,scaleX:1,scaleY:1,rotate:1,padding:1,paddingwidth:1,paddingheight:1,paddingtop:1,paddingleft:1,paddingright:1,paddingbottom:1,backgroundcolor:1};function n(n,r,i){var o=r.text;if(!o)throw new ReferenceError("bwip-js: bar code text not specified.");e(r);var a=r.scale||2,s=+r.scaleX||a,u=+r.scaleY||s,c=(r.rotate,new Jt(i)),l={};for(var h in r)t[h]||(l[h]=r[h]);return l.alttext&&(l.includetext=!0),+l.height&&n!=ke&&(l.height=l.height/25.4||.5),+l.width&&(l.width=l.width/25.4||0),c.scale(s,u),Yt(c,n,o,l),c.render()}var r=null,i=0,o=[],a={$error:new Map};function s(e){if(arguments.length){if(!(e instanceof Array)){n=0;for(var t=(e=new Array(+arguments[0])).length;n<t;n++)e[n]=null}}else{for(var n=i-1;n>=0&&o[n]!==1/0;n--);if(n<0)throw new Error("array-marker-not-found");e=o.splice(n+1,i-1-n),i=n}return e.b=e,e.o=0,e}function u(){for(var e=i-1;e>=0&&o[e]!==1/0;e-=2)if(o[e-1]===1/0)throw new Error("dict-malformed-stack");if(e<0)throw"dict-marker-not-found";for(var t=new Map,n=e+1;n<i;n+=2){var r=o[n],a=typeof r;if("number"==a||"string"==a)t.set(r,o[n+1]);else{if(!(r instanceof Uint8Array))throw"dict-not-a-valid-key("+r+")";t.set(h(r),o[n+1])}}return i=e,t}function c(e){var t=typeof e;if("number"===t)return new Uint8Array(e);"string"!==t&&(e=""+e);for(var n=new Uint8Array(e.length),r=0;r<e.length;r++)n[r]=e.charCodeAt(r);return n}function l(e,t){if(i<e)throw"roll: --stack-underflow--";if(t){if(t<0)var n=o.splice(i-e,-t);else n=o.splice(i-e,e-t);o.splice.apply(o,[i-n.length,0].concat(n))}}function h(e){return e instanceof Uint8Array?String.fromCharCode.apply(null,e):""+e}function f(e,t){if("string"==typeof e&&(e=c(e)),t instanceof Uint8Array)for(var n=0,r=t.length;n<r;n++)e[n]=t[n];else for(n=0,r=t.length;n<r;n++)e[n]=t.charCodeAt(n);return t.length<e.length?e.subarray(0,t.length):e}function d(e,t){for(var n=0,r=t.length;n<r;n++)e[n]=t[n];return e.length=t.length,e}function p(e){return e instanceof Uint8Array?0|String.fromCharCode.apply(null,e).replace(/\0+$/,""):""+e|0}function m(e,t,n){return f(e,(~~t).toString(n).toUpperCase())}function g(e){e=h(e);var t=/^\s*<((?:[0-9a-fA-F]{2})+)>\s*$/.exec(e);if(!t)throw"cvx: not a <HH> hex string literal";for(var n=t[1],r=n.length>>1,i=new Uint8Array(r),o=0,a=0;o<r;o++){var s=n.charCodeAt(a++),u=n.charCodeAt(a++);i[o]=((s<58?s-48:9+(15&s))<<4)+(u<58?u-48:9+(15&u))}return i}function A(e,t){return e instanceof Uint8Array?e[t]:"string"==typeof e?e.charCodeAt(t):e instanceof Array?e.b[e.o+t]:t instanceof Uint8Array?e.get(h(t)):e.get(t)}function v(e,t,n){if(e instanceof Uint8Array)e[t]=n;else if(e instanceof Array)e.b[e.o+t]=n;else{if("object"!=typeof e)throw"put-not-writable-"+typeof e;t instanceof Uint8Array?e.set(h(t),n):e.set(t,n)}}function b(e,t,n){if(e instanceof Uint8Array)return e.subarray(t,t+n);if(e instanceof Array){var r=new Array(n);return r.b=e.b,r.o=e.o+t,r}return e.substr(t,n)}function y(e,t,n){if(e instanceof Uint8Array)if("string"==typeof n)for(var r=0,i=n.length;r<i;r++)e[t+r]=n.charCodeAt(r);else for(r=n.length-1;r>=0;r--)e[t+r]=n[r];else{if(!(e instanceof Array))throw"putinterval-not-writable-"+typeof e;var o=e.b,a=t+e.o,s=n.b,u=n.o;for(r=0,i=n.length;r<i;r++)o[a+r]=s[u+r]}}function w(e){if(null==e)return"nulltype";var t=typeof e;return"number"==t?e%1?"realtype":"integertype":"boolean"==t?"booleantype":"string"==t||e instanceof Uint8Array?"stringtype":"function"==t?"operatortype":e instanceof Array?"arraytype":"dicttype"}function x(e,t){e instanceof Uint8Array||(e=c(e));var n=0,r=e.length,a=t.length;if(1==a){var s=t instanceof Uint8Array?t[0]:t.charCodeAt(0);n=e[0]==s?1:r}else if(t.length<=r)for(t instanceof Uint8Array||(t=c(t));n<a&&e[n]==t[n];n++);n==a?(o[i++]=e.subarray(a),o[i++]=e.subarray(0,a),o[i++]=!0):(o[i++]=e,o[i++]=!1)}function C(e,t){e instanceof Uint8Array||(e=c(e));var n=e.length;if(1==t.length)for(var r=1,a=t instanceof Uint8Array?t[0]:t.charCodeAt(0),s=0;s<n&&e[s]!=a;s++);else{t instanceof Uint8Array||(t=c(t));for(r=t.length,a=t[0],s=0;s<n&&e[s]!=a;s++);for(;s<n;){for(var u=1;u<r&&e[s+u]===t[u];u++);if(u===r)break;for(s++;s<n&&e[s]!=a;s++);}}s<n?(o[i++]=e.subarray(s+r),o[i++]=e.subarray(s,s+r),o[i++]=e.subarray(0,s),o[i++]=!0):(o[i++]=e,o[i++]=!1)}function k(e,t){if(e instanceof Uint8Array)for(var n=0,r=e.length;n<r&&(o[i++]=e[n],!t||!t());n++);else if(e instanceof Array){var a=e.b;for(n=e.o,r=e.o+e.length;n<r&&(o[i++]=a[n],!t||!t());n++);}else if("string"==typeof e)for(n=0,r=e.length;n<r&&(o[i++]=e.charCodeAt(n),!t||!t());n++);else if(e instanceof Map){var s=e.keys();for(n=0,r=e.size;n<r;n++){var u=s.next().value;if(o[i++]=u,o[i++]=e.get(u),t&&t())break}}else for(var u in e)if(o[i++]=u,o[i++]=e[u],t&&t())break}function E(){for(;i>0&&o[--i]!==1/0;);}function S(){for(var e=i-1;e>=0&&o[e]!==1/0;e--);return i-e-1}function _(e){for(var t=0,n=e.length,r=e.b,a=e.o;t<n;t++)o[i++]=r[a+t]}function O(e){for(var t=0,n=e.length,r=e.b,a=e.o+n-1;t<n;t++)r[a-t]=o[--i];o[i++]=e}function T(e,t){if("string"==typeof e&&"string"==typeof t)return e==t;if(e instanceof Uint8Array&&t instanceof Uint8Array){if(e.length!=t.length)return!1;for(var n=0,r=e.length;n<r;n++)if(e[n]!=t[n])return!1;return!0}return e instanceof Uint8Array&&"string"==typeof t||t instanceof Uint8Array&&"string"==typeof e?(e instanceof Uint8Array?e=h(e):t=h(t),e==t):e==t}function D(e,t){return!T(e,t)}function B(e,t){return e instanceof Uint8Array&&(e=h(e)),t instanceof Uint8Array&&(t=h(t)),e<t}function I(e,t){return e instanceof Uint8Array&&(e=h(e)),t instanceof Uint8Array&&(t=h(t)),e<=t}function M(e,t){return e instanceof Uint8Array&&(e=h(e)),t instanceof Uint8Array&&(t=h(t)),e>t}function j(e,t){return e instanceof Uint8Array&&(e=h(e)),t instanceof Uint8Array&&(t=h(t)),e>=t}function N(e,t){return"boolean"==typeof e?e&&t:e&t}function F(e,t){return"boolean"==typeof e?e||t:e|t}function R(e,t){return"boolean"==typeof e?!e&&t||e&&!t:e^t}function P(e){return"boolean"==typeof e?!e:~e}var L=function(e){return function(t){return Number.isInteger(t)?t:(e[0]=t,e[0])}}(new Float32Array(1));function U(){var e=o[--i],t=o[i-1],n=t instanceof Map;for(var r in e){var a;if(n){if(!t.has(r))continue;a=t.get(r)}else{if(!t.hasOwnProperty(r))continue;a=t[r]}var s=e[r],u=typeof s;if(null==s||"number"==u){if(!isFinite(+a))throw new ReferenceError("/bwipp.invalidOptionType: "+r+": not a realtype: "+a);"string"==typeof a&&(a=+a,n?t.set(r,a):t[r]=a)}else if("boolean"==u){if(!0!==a&&!1!==a){if(null==a||(0|a)===a)a=!!a;else if("true"==a)a=!0;else{if("false"!=a)throw new ReferenceError("/bwipp.invalidOptionType: "+r+": not a booleantype: "+a);a=!1}n?t.set(r,a):t[r]=a}}else if("string"==u||s instanceof Uint8Array)if("number"==typeof a)a=""+a,n?t.set(r,a):t[r]=a;else if("string"!=typeof a&&!(a instanceof Uint8Array))throw new ReferenceError("/bwipp.invalidOptionType: "+r+": not a stringtype: "+a);e[r]=a}}function z(){throw v(a.$error,"errorinfo",o[--i]),v(a.$error,"errorname",o[--i]),v(a.$error,"command",null),v(a.$error,"newerror",!0),new Error(h(a.$error.get("errorname"))+": "+h(a.$error.get("errorinfo")))}function H(){var e=Object.create(H.$ctx||(H.$ctx={}));e.fncvals=o[--i],e.barcode=o[--i];var t="parse";e[t]=A(e.fncvals,t),delete e.fncvals[t];var n="parsefnc";e[n]=A(e.fncvals,n),delete e.fncvals[n];var r="parseonly",a=void 0!==A(e.fncvals,r);e[r]=a,delete e.fncvals[r];var l="eci",h=void 0!==A(e.fncvals,l);for(e.eci=h,delete e.fncvals.eci,H.$ctx._225||function(){var t=Object.create(e);o[i++]=1/0;var n=s(["NUL","SOH","STX","ETX","EOT","ENQ","ACK","BEL","BS","TAB","LF","VT","FF","CR","","","DLE","DC1","DC2","DC3","DC4","NAK","SYN","ETB","CAN","EM","SUB","ESC","FS","GS","RS","US"]);o[i++]=0;for(var r=0,a=n.length;r<a;r++){var c=o[--i];o[i++]=A(n,r),o[i++]=c,o[i++]=L(c+1)}for(var l in i--,t.ctrl=u(),t)t.hasOwnProperty(l)&&(H.$ctx[l]=t[l]);H.$ctx._225=1}(),e.msg=s(e.barcode.length),e.j=0,o[i++]=e.barcode;;){C(o[--i],"^");var f=o[--i],d=o[--i];o[i++]=f,o[i++]=d.length,o[i++]=e.msg,o[i++]=e.j,o[i++]=d,o[i++]=1/0;var m=o[--i],g=o[--i];o[i++]=m,k(g);var w=s(),x=o[--i];if(y(o[--i],x,w),e.j=L(o[--i]+e.j),!o[--i])break;i--;for(var E=0;E<1;E++){if(N(P(e.parse),P(e.parsefnc))){v(e.msg,e.j,94),e.j=L(e.j+1);break}if(v(e.msg,e.j,94),e.j=L(e.j+1),e.parse){var S=o[--i];if(o[i++]=S,S.length>=3){var _=o[--i],O=b(_,0,3),D=e.ctrl,B=void 0!==A(D,O);if(o[i++]=_,o[i++]=D,o[i++]=O,B){e.j=L(e.j-1);var I=o[--i];v(e.msg,e.j,A(o[--i],I)),e.j=L(e.j+1);var M=o[--i];o[i++]=b(M,3,M.length-3);break}i-=2}var j=o[--i];if(o[i++]=j,j.length>=2){var R=o[--i],U=b(R,0,2),$=e.ctrl,Q=void 0!==A($,U);if(o[i++]=R,o[i++]=$,o[i++]=U,Q){e.j=L(e.j-1);var V=o[--i];v(e.msg,e.j,A(o[--i],V)),e.j=L(e.j+1);var q=o[--i];o[i++]=b(q,2,q.length-2);break}i-=2}var G=o[--i];if(o[i++]=G,G.length>=3){var W=o[--i],K=b(W,0,3);o[i++]=W,o[i++]=!0;for(var Y=0,X=K.length;Y<X;Y++){var J=A(K,Y);(J<48||J>57)&&(i--,o[i++]=!1)}if(o[--i]){var Z=o[--i],ee=p(b(Z,0,3));o[i++]=Z,o[i++]=ee,ee>255&&(i-=2,o[i++]="bwipp.invalidOrdinal#282",o[i++]="Ordinal must be 000 to 255",z()),e.j=L(e.j-1),v(e.msg,e.j,o[--i]),e.j=L(e.j+1);var te=o[--i];o[i++]=b(te,3,te.length-3)}}}if(F(e.parseonly,P(e.parsefnc))||94!=A(e.msg,L(e.j-1)))break;e.j=L(e.j-1);var ne=o[--i];o[i++]=ne,ne.length<3&&(i--,o[i++]="bwipp.truncatedFNC#301",o[i++]="Function character truncated",z());var re=o[--i];if(o[i++]=re,94==A(re,0)){v(e.msg,e.j,94),e.j=L(e.j+1);var ie=o[--i];o[i++]=b(ie,1,ie.length-1);break}var oe=o[--i];if(o[i++]=oe,T(b(oe,0,3),"ECI")&&e.eci){var ae=o[--i];o[i++]=ae,ae.length<9&&(i--,o[i++]="bwipp.truncatedECI#312",o[i++]="ECI truncated",z());var se=o[--i],ue=b(se,3,6);o[i++]=se,o[i++]=ue;for(var ce=0,le=ue.length;ce<le;ce++){var he=A(ue,ce);(he<48||he>57)&&(i-=2,o[i++]="bwipp.invalidECI#318",o[i++]="ECI must be 000000 to 999999",z())}var fe=o[--i];o[i++]=0,k(fe,(function(){var e=o[--i],t=o[--i];o[i++]=10*L(t-L(e-48))})),v(e.msg,e.j,~~(o[--i]/10)-1e6),e.j=L(e.j+1);var de=o[--i];o[i++]=b(de,9,de.length-9);break}var pe=o[--i];o[i++]=pe,pe.length<4&&(i--,o[i++]="bwipp.truncatedFNC#329",o[i++]="Function character truncated",z());var me=o[--i],ge=b(me,0,4),Ae=void 0!==A(e.fncvals,ge);if(o[i++]=me,o[i++]=ge,!Ae){var ve=o[--i],be=c(ve.length+28);y(be,28,ve),y(be,0,"Unknown function character: ");var ye=o[--i];o[i++]=be,o[i++]=ye,i--;var we=o[--i];o[i++]="bwipp.unknownFNC#335",o[i++]=we,z()}v(e.msg,e.j,A(e.fncvals,o[--i])),e.j=L(e.j+1);var xe=o[--i];o[i++]=b(xe,4,xe.length-4);break}}if(P(e.parseonly))o[i++]=b(e.msg,0,e.j);else{o[i++]=c(e.j);for(var Ce=0,ke=L(e.j-1);Ce<=ke;Ce+=1){var Ee=o[--i];v(Ee,Ce,A(e.msg,Ce)),o[i++]=Ee}}}function $(){var e=Object.create($.$ctx||($.$ctx={}));if($.$ctx._2270||function(){var t=Object.create(e),n=new Map([["cset","N"],["min",18],["max",18],["opt",!1],["linters",s(["lintcsum","lintkey"])]]),r=s([n]),i=s([]),o=new Map([["parts",r],["dlpkey",i]]),a=s(["lintcsum","lintkey"]),u=new Map([["cset","N"],["min",14],["max",14],["opt",!1],["linters",a]]),c=s([u]),l=s(["02","255","37"]),h=s(["22","10","21"]),f=s(["235"]),d=s([h,f]),p=new Map([["parts",c],["ex",l],["dlpkey",d]]),m=s(["lintcsum","lintkey"]),g=new Map([["cset","N"],["min",14],["max",14],["opt",!1],["linters",m]]),A=s([g]),v=s(["37"]),b=s([v]),y=new Map([["parts",A],["req",b]]),w=new Map([["cset","X"],["min",1],["max",20],["opt",!1],["linters",s([])]]),x=new Map([["parts",s([w])],["req",s([s(["01","02","8006","8026"])])]]),C=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s(["lintyymmd0"])]]),k=new Map([["parts",s([C])],["req",s([s(["01","02","8006","8026"])])]]),E=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s(["lintyymmd0"])]]),S=new Map([["parts",s([E])],["req",s([s(["8020"])])]]),_=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s(["lintyymmd0"])]]),O=new Map([["parts",s([_])],["req",s([s(["01","02","8006","8026"])])]]),T=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s(["lintyymmd0"])]]),D=new Map([["parts",s([T])],["req",s([s(["01","02","255","8006","8026"])])]]),B=new Map([["cset","N"],["min",2],["max",2],["opt",!1],["linters",s([])]]),I=new Map([["parts",s([B])],["req",s([s(["01","02","8006","8026"])])]]),M=new Map([["cset","X"],["min",1],["max",20],["opt",!1],["linters",s([])]]),j=new Map([["parts",s([M])],["ex",s(["235"])],["req",s([s(["01","8006"])])]]),N=new Map([["cset","X"],["min",1],["max",20],["opt",!1],["linters",s([])]]),F=new Map([["parts",s([N])],["req",s([s(["01"])])]]),R=new Map([["cset","X"],["min",1],["max",28],["opt",!1],["linters",s([])]]),P=new Map([["parts",s([R])],["req",s([s(["01"])])]]),L=new Map([["cset","X"],["min",1],["max",30],["opt",!1],["linters",s([])]]),U=new Map([["parts",s([L])],["req",s([s(["01","02","8006","8026"])])]]),z=new Map([["cset","N"],["min",1],["max",6],["opt",!1],["linters",s([])]]),H=new Map([["parts",s([z])],["req",s([s(["01","02","8006","8026"])])]]),Q=new Map([["cset","X"],["min",1],["max",20],["opt",!1],["linters",s([])]]),V=new Map([["parts",s([Q])],["req",s([s(["01"])])]]),q=new Map([["cset","X"],["min",1],["max",30],["opt",!1],["linters",s([])]]),G=new Map([["parts",s([q])],["req",s([s(["01","8006"]),s(["21"])])]]),W=new Map([["cset","X"],["min",1],["max",30],["opt",!1],["linters",s([])]]),K=new Map([["parts",s([W])],["req",s([s(["01","8006"])])]]),Y=new Map([["cset","N"],["min",13],["max",13],["opt",!1],["linters",s(["lintcsum","lintkey"])]]),X=new Map([["cset","X"],["min",1],["max",17],["opt",!0],["linters",s([])]]),J=new Map([["parts",s([Y,X])],["dlpkey",s([])]]),Z=new Map([["cset","X"],["min",1],["max",20],["opt",!1],["linters",s([])]]),ee=new Map([["parts",s([Z])],["req",s([s(["414"])])]]),te=new Map([["cset","N"],["min",13],["max",13],["opt",!1],["linters",s(["lintcsum","lintkey"])]]),ne=new Map([["cset","N"],["min",1],["max",12],["opt",!0],["linters",s([])]]),re=new Map([["parts",s([te,ne])],["ex",s(["01","02","415","8006","8020","8026"])],["dlpkey",s([])]]),ie=s([]),oe=new Map([["cset","N"],["min",1],["max",8],["opt",!1],["linters",ie]]),ae=new Map([["parts",s([oe])],["req",s([s(["01","02"])])]]),se=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s([])]]),ue=new Map([["parts",s([se])],["ex",s(["310n"])],["req",s([s(["01","02"])])]]),ce=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s([])]]),le=new Map([["parts",s([ce])],["ex",s(["311n"])],["req",s([s(["01","02"])])]]),he=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s([])]]),fe=new Map([["parts",s([he])],["ex",s(["312n"])],["req",s([s(["01","02"])])]]),de=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s([])]]),pe=new Map([["parts",s([de])],["ex",s(["313n"])],["req",s([s(["01","02"])])]]),me=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s([])]]),ge=new Map([["parts",s([me])],["ex",s(["314n"])],["req",s([s(["01","02"])])]]),Ae=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s([])]]),ve=new Map([["parts",s([Ae])],["ex",s(["315n"])],["req",s([s(["01","02"])])]]),be=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s([])]]),ye=new Map([["parts",s([be])],["ex",s(["316n"])],["req",s([s(["01","02"])])]]),we=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s([])]]),xe=new Map([["parts",s([we])],["ex",s(["320n"])],["req",s([s(["01","02"])])]]),Ce=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s([])]]),ke=new Map([["parts",s([Ce])],["ex",s(["321n"])],["req",s([s(["01","02"])])]]),Ee=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s([])]]),Se=new Map([["parts",s([Ee])],["ex",s(["322n"])],["req",s([s(["01","02"])])]]),_e=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s([])]]),Oe=new Map([["parts",s([_e])],["ex",s(["323n"])],["req",s([s(["01","02"])])]]),Te=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s([])]]),De=new Map([["parts",s([Te])],["ex",s(["324n"])],["req",s([s(["01","02"])])]]),Be=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s([])]]),Ie=new Map([["parts",s([Be])],["ex",s(["325n"])],["req",s([s(["01","02"])])]]),Me=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s([])]]),je=new Map([["parts",s([Me])],["ex",s(["326n"])],["req",s([s(["01","02"])])]]),Ne=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s([])]]),Fe=new Map([["parts",s([Ne])],["ex",s(["327n"])],["req",s([s(["01","02"])])]]),Re=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s([])]]),Pe=new Map([["parts",s([Re])],["ex",s(["328n"])],["req",s([s(["01","02"])])]]),Le=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s([])]]),Ue=new Map([["parts",s([Le])],["ex",s(["329n"])],["req",s([s(["01","02"])])]]),ze=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s([])]]),He=new Map([["parts",s([ze])],["ex",s(["330n"])],["req",s([s(["00","01"])])]]),$e=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s([])]]),Qe=new Map([["parts",s([$e])],["ex",s(["331n"])],["req",s([s(["00","01"])])]]),Ve=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s([])]]),qe=new Map([["parts",s([Ve])],["ex",s(["332n"])],["req",s([s(["00","01"])])]]),Ge=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s([])]]),We=new Map([["parts",s([Ge])],["ex",s(["333n"])],["req",s([s(["00","01"])])]]),Ke=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s([])]]),Ye=new Map([["parts",s([Ke])],["ex",s(["334n"])],["req",s([s(["00","01"])])]]),Xe=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s([])]]),Je=new Map([["parts",s([Xe])],["ex",s(["335n"])],["req",s([s(["00","01"])])]]),Ze=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s([])]]),et=new Map([["parts",s([Ze])],["ex",s(["336n"])],["req",s([s(["00","01"])])]]),tt=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s([])]]),nt=new Map([["parts",s([tt])],["ex",s(["337n"])],["req",s([s(["01"])])]]),rt=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s([])]]),it=new Map([["parts",s([rt])],["ex",s(["340n"])],["req",s([s(["00","01"])])]]),ot=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s([])]]),at=new Map([["parts",s([ot])],["ex",s(["341n"])],["req",s([s(["00","01"])])]]),st=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s([])]]),ut=new Map([["parts",s([st])],["ex",s(["342n"])],["req",s([s(["00","01"])])]]),ct=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s([])]]),lt=new Map([["parts",s([ct])],["ex",s(["343n"])],["req",s([s(["00","01"])])]]),ht=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s([])]]),ft=new Map([["parts",s([ht])],["ex",s(["344n"])],["req",s([s(["00","01"])])]]),dt=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s([])]]),pt=new Map([["parts",s([dt])],["ex",s(["345n"])],["req",s([s(["00","01"])])]]),mt=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s([])]]),gt=new Map([["parts",s([mt])],["ex",s(["346n"])],["req",s([s(["00","01"])])]]),At=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s([])]]),vt=new Map([["parts",s([At])],["ex",s(["347n"])],["req",s([s(["00","01"])])]]),bt=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s([])]]),yt=new Map([["parts",s([bt])],["ex",s(["348n"])],["req",s([s(["00","01"])])]]),wt=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s([])]]),xt=new Map([["parts",s([wt])],["ex",s(["349n"])],["req",s([s(["00","01"])])]]),Ct=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s([])]]),kt=new Map([["parts",s([Ct])],["ex",s(["350n"])],["req",s([s(["01","02"])])]]),Et=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s([])]]),St=new Map([["parts",s([Et])],["ex",s(["351n"])],["req",s([s(["01","02"])])]]),_t=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s([])]]),Ot=new Map([["parts",s([_t])],["ex",s(["352n"])],["req",s([s(["01","02"])])]]),Tt=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s([])]]),Dt=new Map([["parts",s([Tt])],["ex",s(["353n"])],["req",s([s(["00","01"])])]]),Bt=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s([])]]),It=new Map([["parts",s([Bt])],["ex",s(["354n"])],["req",s([s(["00","01"])])]]),Mt=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s([])]]),jt=new Map([["parts",s([Mt])],["ex",s(["355n"])],["req",s([s(["00","01"])])]]),Nt=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s([])]]),Ft=new Map([["parts",s([Nt])],["ex",s(["356n"])],["req",s([s(["01","02"])])]]),Rt=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s([])]]),Pt=new Map([["parts",s([Rt])],["ex",s(["357n"])],["req",s([s(["01","02"])])]]),Lt=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s([])]]),Ut=new Map([["parts",s([Lt])],["ex",s(["360n"])],["req",s([s(["01","02"])])]]),zt=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s([])]]),Ht=new Map([["parts",s([zt])],["ex",s(["361n"])],["req",s([s(["01","02"])])]]),$t=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s([])]]),Qt=new Map([["parts",s([$t])],["ex",s(["362n"])],["req",s([s(["00","01"])])]]),Vt=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s([])]]),qt=new Map([["parts",s([Vt])],["ex",s(["363n"])],["req",s([s(["00","01"])])]]),Gt=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s([])]]),Wt=new Map([["parts",s([Gt])],["ex",s(["364n"])],["req",s([s(["01","02"])])]]),Kt=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s([])]]),Yt=new Map([["parts",s([Kt])],["ex",s(["365n"])],["req",s([s(["01","02"])])]]),Xt=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s([])]]),Jt=new Map([["parts",s([Xt])],["ex",s(["366n"])],["req",s([s(["01","02"])])]]),Zt=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s([])]]),en=new Map([["parts",s([Zt])],["ex",s(["367n"])],["req",s([s(["00","01"])])]]),tn=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s([])]]),nn=new Map([["parts",s([tn])],["ex",s(["368n"])],["req",s([s(["00","01"])])]]),rn=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s([])]]),on=new Map([["parts",s([rn])],["ex",s(["369n"])],["req",s([s(["00","01"])])]]),an=new Map([["cset","N"],["min",1],["max",8],["opt",!1],["linters",s([])]]),sn=new Map([["parts",s([an])],["req",s([s(["00"]),s(["02","8026"])])]]),un=new Map([["cset","N"],["min",1],["max",15],["opt",!1],["linters",s([])]]),cn=new Map([["parts",s([un])],["ex",s(["390n","391n","394n","8111"])],["req",s([s(["255","8020"])])]]),ln=new Map([["cset","N"],["min",3],["max",3],["opt",!1],["linters",s(["lintiso4217"])]]),hn=new Map([["cset","N"],["min",1],["max",15],["opt",!1],["linters",s([])]]),fn=new Map([["parts",s([ln,hn])],["ex",s(["391n"])],["req",s([s(["8020"])])]]),dn=new Map([["cset","N"],["min",1],["max",15],["opt",!1],["linters",s([])]]),pn=new Map([["parts",s([dn])],["ex",s(["392n","393n"])],["req",s([s(["01"]),s(["30","31nn","32nn","35nn","36nn"])])]]),mn=new Map([["cset","N"],["min",3],["max",3],["opt",!1],["linters",s(["lintiso4217"])]]),gn=new Map([["cset","N"],["min",1],["max",15],["opt",!1],["linters",s([])]]),An=new Map([["parts",s([mn,gn])],["ex",s(["393n"])],["req",s([s(["30","31nn","32nn","35nn","36nn"])])]]),vn=new Map([["cset","N"],["min",4],["max",4],["opt",!1],["linters",s([])]]),bn=new Map([["parts",s([vn])],["ex",s(["394n","8111"])],["req",s([s(["255"])])]]),yn=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s([])]]),wn=new Map([["parts",s([yn])],["ex",s(["392n","393n","395n","8005"])],["req",s([s(["30","31nn","32nn","35nn","36nn"])])]]),xn=new Map([["cset","X"],["min",1],["max",30],["opt",!1],["linters",s([])]]),Cn=new Map([["parts",s([xn])]]),kn=new Map([["cset","X"],["min",1],["max",30],["opt",!1],["linters",s(["lintkey"])]]),En=new Map([["parts",s([kn])],["dlpkey",s([])]]),Sn=new Map([["cset","N"],["min",17],["max",17],["opt",!1],["linters",s(["lintcsum","lintkey"])]]),_n=new Map([["parts",s([Sn])],["dlpkey",s([])]]),On=new Map([["cset","X"],["min",1],["max",30],["opt",!1],["linters",s([])]]),Tn=new Map([["parts",s([On])],["req",s([s(["00"])])]]),Dn=new Map([["cset","N"],["min",13],["max",13],["opt",!1],["linters",s(["lintcsum","lintkey"])]]),Bn=new Map([["parts",s([Dn])]]),In=new Map([["cset","N"],["min",13],["max",13],["opt",!1],["linters",s(["lintcsum","lintkey"])]]),Mn=new Map([["parts",s([In])],["dlpkey",s([s(["254"]),s(["7040"])])]]),jn=new Map([["cset","N"],["min",13],["max",13],["opt",!1],["linters",s(["lintcsum","lintkey"])]]),Nn=new Map([["parts",s([jn])],["req",s([s(["8020"])])],["dlpkey",s([s(["8020"])])]]),Fn=new Map([["cset","N"],["min",13],["max",13],["opt",!1],["linters",s(["lintcsum","lintkey"])]]),Rn=new Map([["parts",s([Fn])]]),Pn=new Map([["cset","N"],["min",13],["max",13],["opt",!1],["linters",s(["lintcsum","lintkey"])]]),Ln=new Map([["parts",s([Pn])],["dlpkey",s([s(["7040"])])]]),Un=new Map([["cset","X"],["min",1],["max",20],["opt",!1],["linters",s([])]]),zn=new Map([["parts",s([Un])],["ex",s(["421"])]]),Hn=new Map([["cset","N"],["min",3],["max",3],["opt",!1],["linters",s(["lintiso3166"])]]),$n=new Map([["cset","X"],["min",1],["max",9],["opt",!1],["linters",s([])]]),Qn=new Map([["parts",s([Hn,$n])],["ex",s(["4307"])]]),Vn=new Map([["cset","N"],["min",3],["max",3],["opt",!1],["linters",s(["lintiso3166"])]]),qn=new Map([["parts",s([Vn])],["ex",s(["426"])],["req",s([s(["01","02","8006","8026"])])]]),Gn=new Map([["cset","N"],["min",1],["max",15],["opt",!1],["linters",s(["lintiso3166list"])]]),Wn=new Map([["parts",s([Gn])],["ex",s(["426"])],["req",s([s(["01","02"])])]]),Kn=new Map([["cset","N"],["min",3],["max",3],["opt",!1],["linters",s(["lintiso3166"])]]),Yn=new Map([["parts",s([Kn])],["ex",s(["426"])],["req",s([s(["01","02"])])]]),Xn=new Map([["cset","N"],["min",1],["max",15],["opt",!1],["linters",s(["lintiso3166list"])]]),Jn=new Map([["parts",s([Xn])],["ex",s(["426"])],["req",s([s(["01","02"])])]]),Zn=new Map([["cset","N"],["min",3],["max",3],["opt",!1],["linters",s(["lintiso3166"])]]),er=new Map([["parts",s([Zn])],["req",s([s(["01","02"])])]]),tr=new Map([["cset","X"],["min",1],["max",3],["opt",!1],["linters",s([])]]),nr=new Map([["parts",s([tr])],["req",s([s(["01","02"]),s(["422"])])]]),rr=new Map([["cset","X"],["min",1],["max",35],["opt",!1],["linters",s(["lintpcenc"])]]),ir=new Map([["parts",s([rr])],["req",s([s(["00"])])]]),or=new Map([["cset","X"],["min",1],["max",70],["opt",!1],["linters",s(["lintpcenc"])]]),ar=new Map([["parts",s([or])],["req",s([s(["00"])])]]),sr=new Map([["cset","X"],["min",1],["max",70],["opt",!1],["linters",s(["lintpcenc"])]]),ur=new Map([["parts",s([sr])],["req",s([s(["4302"])])]]),cr=new Map([["cset","X"],["min",1],["max",70],["opt",!1],["linters",s(["lintpcenc"])]]),lr=new Map([["parts",s([cr])],["req",s([s(["00"])])]]),hr=new Map([["cset","X"],["min",2],["max",2],["opt",!1],["linters",s(["lintiso3166alpha2"])]]),fr=new Map([["parts",s([hr])],["req",s([s(["00"])])]]),dr=new Map([["cset","X"],["min",1],["max",30],["opt",!1],["linters",s([])]]),pr=new Map([["parts",s([dr])],["req",s([s(["00"])])]]),mr=new Map([["cset","N"],["min",20],["max",20],["opt",!1],["linters",s(["lintlatlong"])]]),gr=new Map([["parts",s([mr])],["req",s([s(["00"])])]]),Ar=new Map([["cset","X"],["min",1],["max",35],["opt",!1],["linters",s(["lintpcenc"])]]),vr=new Map([["parts",s([Ar])],["req",s([s(["00"])])]]),br=new Map([["cset","X"],["min",1],["max",70],["opt",!1],["linters",s(["lintpcenc"])]]),yr=new Map([["parts",s([br])],["req",s([s(["00"])])]]),wr=new Map([["cset","X"],["min",1],["max",70],["opt",!1],["linters",s(["lintpcenc"])]]),xr=new Map([["parts",s([wr])],["req",s([s(["4312"])])]]),Cr=new Map([["cset","X"],["min",1],["max",70],["opt",!1],["linters",s(["lintpcenc"])]]),kr=new Map([["parts",s([Cr])],["req",s([s(["00"])])]]),Er=new Map([["cset","X"],["min",2],["max",2],["opt",!1],["linters",s(["lintiso3166alpha2"])]]),Sr=new Map([["parts",s([Er])],["req",s([s(["00"])])]]),_r=new Map([["cset","X"],["min",1],["max",20],["opt",!1],["linters",s([])]]),Or=new Map([["parts",s([_r])],["req",s([s(["00"])])]]),Tr=new Map([["cset","X"],["min",1],["max",30],["opt",!1],["linters",s([])]]),Dr=new Map([["parts",s([Tr])],["req",s([s(["00"])])]]),Br=new Map([["cset","X"],["min",1],["max",35],["opt",!1],["linters",s(["lintpcenc"])]]),Ir=new Map([["parts",s([Br])],["req",s([s(["00"])])]]),Mr=new Map([["cset","N"],["min",1],["max",1],["opt",!1],["linters",s(["lintyesno"])]]),jr=new Map([["parts",s([Mr])],["req",s([s(["00"])])]]),Nr=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s(["lintyymmd0"])]]),Fr=new Map([["cset","N"],["min",4],["max",4],["opt",!1],["linters",s(["linthhmm"])]]),Rr=new Map([["parts",s([Nr,Fr])],["req",s([s(["00"])])]]),Pr=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s(["lintyymmdd"])]]),Lr=new Map([["parts",s([Pr])],["req",s([s(["00"])])]]),Ur=new Map([["cset","N"],["min",13],["max",13],["opt",!1],["linters",s([])]]),zr=new Map([["parts",s([Ur])],["req",s([s(["01","02","8006","8026"])])]]),Hr=new Map([["cset","X"],["min",1],["max",30],["opt",!1],["linters",s([])]]),$r=new Map([["parts",s([Hr])],["req",s([s(["01","02"])])]]),Qr=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s(["lintyymmdd"])]]),Vr=new Map([["cset","N"],["min",4],["max",4],["opt",!1],["linters",s(["linthhmm"])]]),qr=new Map([["parts",s([Qr,Vr])],["req",s([s(["01","02"])])]]),Gr=new Map([["cset","N"],["min",1],["max",4],["opt",!1],["linters",s([])]]),Wr=new Map([["parts",s([Gr])],["req",s([s(["01"]),s(["10"])])]]),Kr=new Map([["cset","X"],["min",1],["max",12],["opt",!1],["linters",s([])]]),Yr=new Map([["parts",s([Kr])],["req",s([s(["01","02"])])]]),Xr=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s(["lintyymmdd"])]]),Jr=new Map([["parts",s([Xr])],["req",s([s(["01","02"])])]]),Zr=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s(["lintyymmdd"])]]),ei=new Map([["cset","N"],["min",6],["max",6],["opt",!0],["linters",s(["lintyymmdd"])]]),ti=new Map([["parts",s([Zr,ei])],["req",s([s(["01","02"])])]]),ni=new Map([["cset","X"],["min",1],["max",3],["opt",!1],["linters",s([])]]),ri=new Map([["parts",s([ni])],["req",s([s(["01","02"])])]]),ii=new Map([["cset","X"],["min",1],["max",10],["opt",!1],["linters",s([])]]),oi=new Map([["parts",s([ii])],["req",s([s(["01","02"])])]]),ai=new Map([["cset","X"],["min",1],["max",2],["opt",!1],["linters",s([])]]),si=new Map([["parts",s([ai])],["req",s([s(["01","02"])])]]),ui=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s(["lintyymmdd"])]]),ci=new Map([["cset","N"],["min",4],["max",4],["opt",!0],["linters",s(["linthhmm"])]]),li=new Map([["parts",s([ui,ci])],["req",s([s(["01","02"])])]]),hi=new Map([["cset","X"],["min",1],["max",20],["opt",!1],["linters",s([])]]),fi=new Map([["parts",s([hi])],["req",s([s(["01","8006"]),s(["416"])])]]),di=new Map([["cset","X"],["min",1],["max",20],["opt",!1],["linters",s([])]]),pi=new Map([["parts",s([di])],["req",s([s(["01","8006"])])]]),mi=new Map([["cset","X"],["min",1],["max",20],["opt",!1],["linters",s([])]]),gi=new Map([["parts",s([mi])],["req",s([s(["7021"])])]]),Ai=new Map([["cset","X"],["min",1],["max",30],["opt",!1],["linters",s(["lintkey"])]]),vi=new Map([["parts",s([Ai])]]),bi=new Map([["cset","N"],["min",3],["max",3],["opt",!1],["linters",s(["lintiso3166999"])]]),yi=new Map([["cset","X"],["min",1],["max",27],["opt",!1],["linters",s([])]]),wi=new Map([["parts",s([bi,yi])],["req",s([s(["01","02"])])]]),xi=new Map([["cset","N"],["min",1],["max",1],["opt",!1],["linters",s([])]]),Ci=new Map([["cset","X"],["min",1],["max",1],["opt",!1],["linters",s([])]]),ki=new Map([["cset","X"],["min",1],["max",1],["opt",!1],["linters",s([])]]),Ei=new Map([["cset","X"],["min",1],["max",1],["opt",!1],["linters",s(["lintimporteridx"])]]),Si=new Map([["parts",s([xi,Ci,ki,Ei])]]),_i=new Map([["cset","X"],["min",1],["max",20],["opt",!1],["linters",s([])]]),Oi=new Map([["parts",s([_i])],["req",s([s(["01"])])]]),Ti=new Map([["cset","X"],["min",2],["max",2],["opt",!1],["linters",s([])]]),Di=new Map([["cset","X"],["min",1],["max",28],["opt",!1],["linters",s([])]]),Bi=new Map([["parts",s([Ti,Di])],["req",s([s(["01","8004"])])]]),Ii=new Map([["cset","X"],["min",1],["max",20],["opt",!1],["linters",s([])]]),Mi=new Map([["parts",s([Ii])],["req",s([s(["01","8006"])])]]),ji=new Map([["cset","N"],["min",4],["max",4],["opt",!1],["linters",s(["lintnonzero"])]]),Ni=new Map([["cset","N"],["min",5],["max",5],["opt",!1],["linters",s(["lintnonzero"])]]),Fi=new Map([["cset","N"],["min",3],["max",3],["opt",!1],["linters",s(["lintnonzero"])]]),Ri=new Map([["cset","N"],["min",1],["max",1],["opt",!1],["linters",s(["lintwinding"])]]),Pi=new Map([["cset","N"],["min",1],["max",1],["opt",!1],["linters",s([])]]),Li=new Map([["parts",s([ji,Ni,Fi,Ri,Pi])],["req",s([s(["01"])])]]),Ui=new Map([["cset","X"],["min",1],["max",20],["opt",!1],["linters",s([])]]),zi=new Map([["parts",s([Ui])]]),Hi=new Map([["cset","N"],["min",1],["max",1],["opt",!1],["linters",s(["lintzero"])]]),$i=new Map([["cset","N"],["min",13],["max",13],["opt",!1],["linters",s(["lintcsum","lintkey"])]]),Qi=new Map([["cset","X"],["min",1],["max",16],["opt",!0],["linters",s([])]]),Vi=new Map([["parts",s([Hi,$i,Qi])],["dlpkey",s([])]]),qi=new Map([["cset","X"],["min",1],["max",30],["opt",!1],["linters",s(["lintkey"])]]),Gi=new Map([["parts",s([qi])],["dlpkey",s([s(["7040"])])]]),Wi=new Map([["cset","N"],["min",6],["max",6],["opt",!1],["linters",s([])]]),Ki=new Map([["parts",s([Wi])],["req",s([s(["01","02"])])]]),Yi=new Map([["cset","N"],["min",14],["max",14],["opt",!1],["linters",s(["lintcsum"])]]),Xi=new Map([["cset","N"],["min",4],["max",4],["opt",!1],["linters",s(["lintpieceoftotal"])]]),Ji=new Map([["parts",s([Yi,Xi])],["ex",s(["01","37"])],["dlpkey",s([s(["22","10","21"])])]]),Zi=new Map([["cset","X"],["min",1],["max",34],["opt",!1],["linters",s(["lintiban"])]]),eo=new Map([["parts",s([Zi])],["req",s([s(["415"])])]]),to=new Map([["cset","N"],["min",8],["max",8],["opt",!1],["linters",s(["lintyymmddhh"])]]),no=new Map([["cset","N"],["min",1],["max",4],["opt",!0],["linters",s(["lintmmoptss"])]]),ro=new Map([["parts",s([to,no])],["req",s([s(["01","02"])])]]),io=new Map([["cset","X"],["min",1],["max",50],["opt",!1],["linters",s([])]]),oo=new Map([["parts",s([io])],["req",s([s(["00","01"])])]]),ao=new Map([["cset","Y"],["min",1],["max",30],["opt",!1],["linters",s(["lintkey"])]]),so=new Map([["parts",s([ao])],["dlpkey",s([s(["8011"])])]]),uo=new Map([["cset","N"],["min",1],["max",12],["opt",!1],["linters",s(["lintnozeroprefix"])]]),co=new Map([["parts",s([uo])],["req",s([s(["8010"])])]]),lo=new Map([["cset","X"],["min",1],["max",20],["opt",!1],["linters",s([])]]),ho=new Map([["parts",s([lo])],["req",s([s(["01","8006"])])]]),fo=new Map([["cset","X"],["min",1],["max",25],["opt",!1],["linters",s(["lintcsumalpha","lintkey"])]]),po=new Map([["parts",s([fo])],["dlpkey",s([])]]),mo=new Map([["cset","N"],["min",18],["max",18],["opt",!1],["linters",s(["lintcsum"])]]),go=new Map([["parts",s([mo])],["dlpkey",s([s(["8019"])])]]),Ao=new Map([["cset","N"],["min",18],["max",18],["opt",!1],["linters",s(["lintcsum"])]]),vo=new Map([["parts",s([Ao])],["ex",s(["8017"])],["dlpkey",s([s(["8019"])])]]),bo=new Map([["cset","N"],["min",1],["max",10],["opt",!1],["linters",s([])]]),yo=new Map([["parts",s([bo])],["req",s([s(["8017","8018"])])]]),wo=new Map([["cset","X"],["min",1],["max",25],["opt",!1],["linters",s([])]]),xo=new Map([["parts",s([wo])],["req",s([s(["415"])])]]),Co=new Map([["cset","N"],["min",14],["max",14],["opt",!1],["linters",s(["lintcsum"])]]),ko=new Map([["cset","N"],["min",4],["max",4],["opt",!1],["linters",s(["lintpieceoftotal"])]]),Eo=new Map([["parts",s([Co,ko])],["ex",s(["02","8006"])],["req",s([s(["37"])])]]),So=new Map([["cset","X"],["min",1],["max",70],["opt",!1],["linters",s(["lintcouponcode"])]]),_o=new Map([["parts",s([So])]]),Oo=new Map([["cset","N"],["min",4],["max",4],["opt",!1],["linters",s([])]]),To=new Map([["parts",s([Oo])],["req",s([s(["255"])])]]),Do=new Map([["cset","X"],["min",1],["max",70],["opt",!1],["linters",s(["lintcouponposoffer"])]]),Bo=new Map([["parts",s([Do])]]),Io=new Map([["cset","X"],["min",1],["max",70],["opt",!1],["linters",s([])]]),Mo=new Map([["parts",s([Io])],["req",s([s(["01"])])]]),jo=new Map([["cset","X"],["min",1],["max",30],["opt",!1],["linters",s([])]]),No=new Map([["parts",s([jo])]]),Fo=new Map([["cset","X"],["min",1],["max",90],["opt",!1],["linters",s([])]]),Ro=new Map([["parts",s([Fo])]]),Po=new Map([["00",o],["01",p],["02",y],["10",x],["11",k],["12",S],["13",O],["15",O],["16",O],["17",D],["20",I],["21",j],["22",F],["235",P],["240",U],["241",U],["242",H],["243",V],["250",G],["251",K],["253",J],["254",ee],["255",re],["30",ae],["3100",ue],["3101",ue],["3102",ue],["3103",ue],["3104",ue],["3105",ue],["3110",le],["3111",le],["3112",le],["3113",le],["3114",le],["3115",le],["3120",fe],["3121",fe],["3122",fe],["3123",fe],["3124",fe],["3125",fe],["3130",pe],["3131",pe],["3132",pe],["3133",pe],["3134",pe],["3135",pe],["3140",ge],["3141",ge],["3142",ge],["3143",ge],["3144",ge],["3145",ge],["3150",ve],["3151",ve],["3152",ve],["3153",ve],["3154",ve],["3155",ve],["3160",ye],["3161",ye],["3162",ye],["3163",ye],["3164",ye],["3165",ye],["3200",xe],["3201",xe],["3202",xe],["3203",xe],["3204",xe],["3205",xe],["3210",ke],["3211",ke],["3212",ke],["3213",ke],["3214",ke],["3215",ke],["3220",Se],["3221",Se],["3222",Se],["3223",Se],["3224",Se],["3225",Se],["3230",Oe],["3231",Oe],["3232",Oe],["3233",Oe],["3234",Oe],["3235",Oe],["3240",De],["3241",De],["3242",De],["3243",De],["3244",De],["3245",De],["3250",Ie],["3251",Ie],["3252",Ie],["3253",Ie],["3254",Ie],["3255",Ie],["3260",je],["3261",je],["3262",je],["3263",je],["3264",je],["3265",je],["3270",Fe],["3271",Fe],["3272",Fe],["3273",Fe],["3274",Fe],["3275",Fe],["3280",Pe],["3281",Pe],["3282",Pe],["3283",Pe],["3284",Pe],["3285",Pe],["3290",Ue],["3291",Ue],["3292",Ue],["3293",Ue],["3294",Ue],["3295",Ue],["3300",He],["3301",He],["3302",He],["3303",He],["3304",He],["3305",He],["3310",Qe],["3311",Qe],["3312",Qe],["3313",Qe],["3314",Qe],["3315",Qe],["3320",qe],["3321",qe],["3322",qe],["3323",qe],["3324",qe],["3325",qe],["3330",We],["3331",We],["3332",We],["3333",We],["3334",We],["3335",We],["3340",Ye],["3341",Ye],["3342",Ye],["3343",Ye],["3344",Ye],["3345",Ye],["3350",Je],["3351",Je],["3352",Je],["3353",Je],["3354",Je],["3355",Je],["3360",et],["3361",et],["3362",et],["3363",et],["3364",et],["3365",et],["3370",nt],["3371",nt],["3372",nt],["3373",nt],["3374",nt],["3375",nt],["3400",it],["3401",it],["3402",it],["3403",it],["3404",it],["3405",it],["3410",at],["3411",at],["3412",at],["3413",at],["3414",at],["3415",at],["3420",ut],["3421",ut],["3422",ut],["3423",ut],["3424",ut],["3425",ut],["3430",lt],["3431",lt],["3432",lt],["3433",lt],["3434",lt],["3435",lt],["3440",ft],["3441",ft],["3442",ft],["3443",ft],["3444",ft],["3445",ft],["3450",pt],["3451",pt],["3452",pt],["3453",pt],["3454",pt],["3455",pt],["3460",gt],["3461",gt],["3462",gt],["3463",gt],["3464",gt],["3465",gt],["3470",vt],["3471",vt],["3472",vt],["3473",vt],["3474",vt],["3475",vt],["3480",yt],["3481",yt],["3482",yt],["3483",yt],["3484",yt],["3485",yt],["3490",xt],["3491",xt],["3492",xt],["3493",xt],["3494",xt],["3495",xt],["3500",kt],["3501",kt],["3502",kt],["3503",kt],["3504",kt],["3505",kt],["3510",St],["3511",St],["3512",St],["3513",St],["3514",St],["3515",St],["3520",Ot],["3521",Ot],["3522",Ot],["3523",Ot],["3524",Ot],["3525",Ot],["3530",Dt],["3531",Dt],["3532",Dt],["3533",Dt],["3534",Dt],["3535",Dt],["3540",It],["3541",It],["3542",It],["3543",It],["3544",It],["3545",It],["3550",jt],["3551",jt],["3552",jt],["3553",jt],["3554",jt],["3555",jt],["3560",Ft],["3561",Ft],["3562",Ft],["3563",Ft],["3564",Ft],["3565",Ft],["3570",Pt],["3571",Pt],["3572",Pt],["3573",Pt],["3574",Pt],["3575",Pt],["3600",Ut],["3601",Ut],["3602",Ut],["3603",Ut],["3604",Ut],["3605",Ut],["3610",Ht],["3611",Ht],["3612",Ht],["3613",Ht],["3614",Ht],["3615",Ht],["3620",Qt],["3621",Qt],["3622",Qt],["3623",Qt],["3624",Qt],["3625",Qt],["3630",qt],["3631",qt],["3632",qt],["3633",qt],["3634",qt],["3635",qt],["3640",Wt],["3641",Wt],["3642",Wt],["3643",Wt],["3644",Wt],["3645",Wt],["3650",Yt],["3651",Yt],["3652",Yt],["3653",Yt],["3654",Yt],["3655",Yt],["3660",Jt],["3661",Jt],["3662",Jt],["3663",Jt],["3664",Jt],["3665",Jt],["3670",en],["3671",en],["3672",en],["3673",en],["3674",en],["3675",en],["3680",nn],["3681",nn],["3682",nn],["3683",nn],["3684",nn],["3685",nn],["3690",on],["3691",on],["3692",on],["3693",on],["3694",on],["3695",on],["37",sn],["3900",cn],["3901",cn],["3902",cn],["3903",cn],["3904",cn],["3905",cn],["3906",cn],["3907",cn],["3908",cn],["3909",cn],["3910",fn],["3911",fn],["3912",fn],["3913",fn],["3914",fn],["3915",fn],["3916",fn],["3917",fn],["3918",fn],["3919",fn],["3920",pn],["3921",pn],["3922",pn],["3923",pn],["3924",pn],["3925",pn],["3926",pn],["3927",pn],["3928",pn],["3929",pn],["3930",An],["3931",An],["3932",An],["3933",An],["3934",An],["3935",An],["3936",An],["3937",An],["3938",An],["3939",An],["3940",bn],["3941",bn],["3942",bn],["3943",bn],["3950",wn],["3951",wn],["3952",wn],["3953",wn],["3954",wn],["3955",wn],["400",Cn],["401",En],["402",_n],["403",Tn],["410",Bn],["411",Bn],["412",Bn],["413",Bn],["414",Mn],["415",Nn],["416",Rn],["417",Ln],["420",zn],["421",Qn],["422",qn],["423",Wn],["424",Yn],["425",Jn],["426",er],["427",nr],["4300",ir],["4301",ir],["4302",ar],["4303",ur],["4304",lr],["4305",lr],["4306",lr],["4307",fr],["4308",pr],["4309",gr],["4310",vr],["4311",vr],["4312",yr],["4313",xr],["4314",kr],["4315",kr],["4316",kr],["4317",Sr],["4318",Or],["4319",Dr],["4320",Ir],["4321",jr],["4322",jr],["4323",jr],["4324",Rr],["4325",Rr],["4326",Lr],["7001",zr],["7002",$r],["7003",qr],["7004",Wr],["7005",Yr],["7006",Jr],["7007",ti],["7008",ri],["7009",oi],["7010",si],["7011",li],["7020",fi],["7021",pi],["7022",gi],["7023",vi],["7030",wi],["7031",wi],["7032",wi],["7033",wi],["7034",wi],["7035",wi],["7036",wi],["7037",wi],["7038",wi],["7039",wi],["7040",Si],["710",Oi],["711",Oi],["712",Oi],["713",Oi],["714",Oi],["715",Oi],["7230",Bi],["7231",Bi],["7232",Bi],["7233",Bi],["7234",Bi],["7235",Bi],["7236",Bi],["7237",Bi],["7238",Bi],["7239",Bi],["7240",Mi],["8001",Li],["8002",zi],["8003",Vi],["8004",Gi],["8005",Ki],["8006",Ji],["8007",eo],["8008",ro],["8009",oo],["8010",so],["8011",co],["8012",ho],["8013",po],["8017",go],["8018",vo],["8019",yo],["8020",xo],["8026",Eo],["8110",_o],["8111",To],["8112",Bo],["8200",Mo],["90",No],["91",Ro],["92",Ro],["93",Ro],["94",Ro],["95",Ro],["96",Ro],["97",Ro],["98",Ro],["99",Ro]]);for(var Lo in t.gs1syntax=Po,t)t.hasOwnProperty(Lo)&&($.$ctx[Lo]=t[Lo]);$.$ctx._2270=1}(),T(o[--i],"ai")){x(o[--i],"("),P(o[--i])&&(i--,o[i++]="bwipp.GS1aiMissingOpenParen#2278",o[i++]="AIs must start with '('",z()),i--,o[i++]=1/0;var t=o[--i],n=o[--i];for(o[i++]=t,o[i++]=n;;){var r=o[--i];if(o[i++]=r,T(r,"")){i--;break}C(o[--i],")"),P(o[--i])&&(E(),o[i++]="bwipp.GS1aiMissingCloseParen#2284",o[i++]="AIs must end with ')'",z());var a=o[--i],h=o[--i];o[i++]=a,o[i++]=h,i--;var d=o[--i],m=o[--i];if(o[i++]=d,C(m,"("),o[--i]){var w=o[--i],_=o[--i];o[i++]=w,o[i++]=_,i--;var B=o[--i],I=o[--i];o[i++]=B,o[i++]=I}else o[i++]=""}var j=S();if(o[i++]=j,j>0)for(var N=o[--i],F=N,R=1+~~(N/2);F>=R;F-=1)l(F,-1);else i--;O(s(~~(S()/2))),e.ais=o[--i],O(s(S())),o[i++]=1/0;var U=o[--i],Q=o[--i];o[i++]=U,k(Q,(function(){var t=new Map([["parse",e.parse],["parseonly",!0],["parsefnc",!1]]);o[i++]=t,H()})),e.vals=s(),i--}else{if(x(o[--i],"http://"),P(o[--i])&&(x(o[--i],"https://"),P(o[--i])&&(i--,o[i++]="bwipp.GS1dlURIbadScheme#2301",o[i++]="Scheme must be http:// or https://",z())),i--,C(o[--i],"/"),P(o[--i])&&(i--,o[i++]="bwipp.GS1dlMissingDomainOrPathInfo#2307",o[i++]="URI must contain a domain and path info",z()),i-=2,C(o[--i],"#"),o[--i]){var V=o[--i],q=o[--i];o[i++]=V,o[i++]=q,i--;var G=o[--i],W=o[--i];o[i++]=G,o[i++]=W,i--}if(C(o[--i],"?"),P(o[--i])){var K=o[--i];o[i++]="",o[i++]=null,o[i++]=K}for(e.pp=o[--i],i--,e.qp=o[--i],o[i++]=1/0,o[i++]=0,o[i++]=0,o[i++]=e.pp;;){if(C(o[--i],"/"),P(o[--i])){i--;break}var Y=o[--i],X=o[--i];o[i++]=Y.length+1,o[i++]=X,i--;var J=o[--i],Z=o[--i],ee=o[--i];o[i++]=ee,o[i++]=L(J+ee),o[i++]=Z}O(s(S()-1)),e.pipos=o[--i],i-=2,e.pipos.length<=1&&(o[i++]="bwipp.GS1dlNoAIinfo#2332",o[i++]="The path was too short to contain AI info",z()),o[i++]=!1;for(var te=e.pipos.length-2;te>=0;te-=2){var ne=A(e.pipos,te),re=b(e.pp,ne,L(L(A(e.pipos,te+1)-ne)-1)),ie=void 0!==A(e.gs1syntax,re);if(o[i++]=te,o[i++]=re,ie){if(void 0!==A(A(e.gs1syntax,o[--i]),"dlpkey")){var oe=o[--i],ae=o[--i];o[i++]=oe,o[i++]=ae,i--,o[i++]=!0;break}}else i--;i--}P(o[--i])&&(o[i++]="bwipp.GS1dlNoAIinfo#2351",o[i++]="The path does not contain a valid primary key",z());var se=A(e.pipos,o[--i]);for(e.pp=b(e.pp,se,L(e.pp.length-se)),e.uriunescape=function(){for(e.in=o[--i],e.out=c(e.in.length),o[i++]=0,o[i++]=0;;){var t=o[--i],n=o[--i];if(o[i++]=n,o[i++]=t,n>=e.in.length)break;var r=o[--i],a=o[--i],s=A(e.in,a);if(o[i++]=a,o[i++]=r,o[i++]=s,43==s){i--;var u=o[--i];v(e.out,u,32);var l=o[--i];o[i++]=L(l+1),o[i++]=L(u+1)}else{var h=o[--i],d=o[--i],p=o[--i];if(o[i++]=p,o[i++]=d,o[i++]=h,37==h&&p<e.in.length-2){i--;var m=f(c(4),"<  >"),w=o[--i],x=o[--i];y(m,1,b(e.in,L(x+1),2));try{o[i++]=x,o[i++]=w,o[i++]=g(m),o[i++]=!1}catch(t){o[i++]=!0}o[--i]&&(i-=2,o[i++]="bwipp.GS1dlBadHexCharacter#2369",o[i++]="Invalid hex character",z());var C=A(o[--i],0),k=o[--i];v(e.out,k,C);var E=o[--i];o[i++]=L(E+3),o[i++]=L(k+1)}else{var S=o[--i],_=o[--i];v(e.out,_,S);var O=o[--i];o[i++]=L(O+1),o[i++]=L(_+1)}}}e.out=b(e.out,0,o[--i]),i--,o[i++]=e.out},e.ais=s(99),e.vals=s(99),o[i++]=0,o[i++]=e.pp;;){if(C(o[--i],"/"),!o[--i]){i--;break}var ue=o[--i],ce=(o[--i],o[--i]),le=o[--i];if(v(e.ais,le,ue),o[i++]=le,C(ce,"/"),o[--i]){var he=o[--i],fe=o[--i];o[i++]=he,o[i++]=fe,i--}else{var de=o[--i];o[i++]="",o[i++]=de}var pe=o[--i],me=o[--i],ge=o[--i];o[i++]=ge,o[i++]=me,o[i++]=e.vals,o[i++]=ge,o[i++]=pe,e.uriunescape();var Ae=o[--i],ve=o[--i];v(o[--i],ve,Ae);var be=o[--i],ye=o[--i];o[i++]=L(ye+1),o[i++]=be}var we=o[--i];for(o[i++]=we,we>1&&(o[i++]=!1,k(A(A(e.gs1syntax,A(e.ais,0)),"dlpkey"),(function(){for(e.seq=o[--i],e.i=1,e.j=0;!(e.i>=e.ais.length)&&!(e.j>=e.seq.length);)T(A(e.ais,e.i),A(e.seq,e.j))&&(e.i=e.i+1),e.j=e.j+1;var t=o[--i],n=o[--i];if(o[i++]=n,o[i++]=t,e.i==n)return i--,o[i++]=!0,!0})),P(o[--i])&&(i--,o[i++]="bwipp.GS1dlBadPathInfo#2417",o[i++]="The AIs in the path are not a valid key-qualifier sequence for the key",z())),o[i++]=e.qp;;){var xe=o[--i];if(o[i++]=xe,T(xe,"")){i--;break}if(C(o[--i],"&"),o[--i]){var Ce=o[--i],ke=o[--i];o[i++]=Ce,o[i++]=ke,i--}else{var Ee=o[--i];o[i++]="",o[i++]=Ee}if(C(o[--i],"="),o[--i]){var Se=o[--i];if(o[i++]=Se,o[i++]=!0,k(Se,(function(){var e=o[--i],t=o[--i];o[i++]=t&&e>=48&&e<=57})),o[--i]){var _e=o[--i],Oe=(o[--i],o[--i]),Te=o[--i],De=o[--i];v(e.ais,De,_e),o[i++]=De,o[i++]=Te,o[i++]=e.vals,o[i++]=De,o[i++]=Oe,e.uriunescape();var Be=o[--i],Ie=o[--i];v(o[--i],Ie,Be);var Me=o[--i],je=o[--i];o[i++]=L(je+1),o[i++]=Me}else i-=3}else i--}var Ne=o[--i];e.ais=b(e.ais,0,Ne),e.vals=b(e.vals,0,Ne);for(var Fe=0,Re=e.ais.length-1;Fe<=Re;Fe+=1){if(o[i++]=Fe,T(A(e.ais,Fe),"01")){var Pe=o[--i],Le=A(e.vals,Pe),Ue=Le.length;if(o[i++]=Pe,o[i++]=Le,8==Ue||12==Ue||13==Ue){var ze=f(c(14),"00000000000000"),He=o[--i];y(ze,14-He.length,He);var $e=o[--i];v(e.vals,$e,ze),o[i++]=$e}else i--}i--}}$.$ctx._2468||function(){var t=Object.create(e);o[i++]=1/0;for(var n=s(["00","01","02","03","04","11","12","13","14","15","16","17","18","19","20","31","32","33","34","35","36","41"]),r=0,a=n.length;r<a;r++){var c=A(n,r);o[i++]=c,o[i++]=c}for(var l in t.aifixed=u(),t)t.hasOwnProperty(l)&&($.$ctx[l]=t[l]);$.$ctx._2468=1}(),o[i++]=1/0;for(var Qe=e.ais,Ve=0,qe=Qe.length;Ve<qe;Ve++){var Ge=A(Qe,Ve);if(o[i++]=!0,o[i++]=Ge,Ge.length>=2)void 0!==A(e.aifixed,b(o[--i],0,2))&&(i--,o[i++]=!1);else i--}if(e.fncs=s(),e.lintnumeric=function(){var e=o[--i];if(o[i++]=!0,k(e,(function(){var e=o[--i];if(e<48||e>57)return i--,o[i++]=!1,!0})),P(o[--i]))return i--,o[i++]="bwipp.GS1notNumeric#2488",o[i++]="Not numeric",o[i++]=!1,!0},e.lintcset82=function(){var e=o[--i];if(o[i++]=!0,k(e,(function(){var e=c(1);if(v(e,0,o[--i]),C("!\"%&'()*+,-./0123456789:;<=>?ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz",e),P(o[--i]))return i-=2,o[i++]=!1,!0;i-=3})),P(o[--i]))return i--,o[i++]="bwipp.GS1badCSET82character#2498",o[i++]="Invalid CSET 82 character",o[i++]=!1,!0},e.lintcset39=function(){var e=o[--i];if(o[i++]=!0,k(e,(function(){var e=c(1);if(v(e,0,o[--i]),C("#-/0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",e),P(o[--i]))return i-=2,o[i++]=!1,!0;i-=3})),P(o[--i]))return i--,o[i++]="bwipp.GS1badCSET39character#2508",o[i++]="Invalid CSET 39 character",o[i++]=!1,!0},e.lintkey=function(){var e=o[--i];if(o[i++]=e,e.length<2)return i-=2,o[i++]="bwipp.GS1keyTooShort#2512",o[i++]="Key is too short",o[i++]=!1,!0;var t=o[--i],n=A(t,0),r=A(t,1);return n<48||n>57||r<48||r>57?(i--,o[i++]="bwipp.GS1badGCP#2515",o[i++]="Non-numeric company prefix",o[i++]=!1,!0):void 0},e.lintimporteridx=function(){if(C("-0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz",o[--i]),P(o[--i]))return i-=2,o[i++]="bwipp.GS1badImporterIndex#2521",o[i++]="Invalid importer index",o[i++]=!1,!0;i-=3},e.lintcsum=function(){o[i++]=1/0;var e=o[--i],t=o[--i],n=t.length%2==0?3:1;o[i++]=e,o[i++]=n,k(t,(function(){var e=o[--i],t=o[--i];o[i++]=L(e-48)*t,o[i++]=L(4-t)})),i--;var r=S()+1;o[i++]=0;for(var a=0,s=r-1;a<s;a++){var u=o[--i],c=o[--i];o[i++]=L(c+u)}var l=o[--i],h=o[--i];if(o[i++]=l,o[i++]=h,i--,o[--i]%10!=0)return i--,o[i++]="bwipp.GS1badChecksum#2530",o[i++]="Bad checksum",o[i++]=!1,!0},$.$ctx._2543||function(){var t=Object.create(e);o[i++]=1/0,o[i++]=0;for(var n=0,r="!\"%&'()*+,-./0123456789:;<=>?ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz".length;n<r;n++){var a=o[--i];o[i++]=A("!\"%&'()*+,-./0123456789:;<=>?ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz",n),o[i++]=a,o[i++]=L(a+1)}i--,t.cset82=u(),o[i++]=1/0,o[i++]=0;for(var s=0,c="23456789ABCDEFGHJKLMNPQRSTUVWXYZ".length;s<c;s++){var l=o[--i];o[i++]=A("23456789ABCDEFGHJKLMNPQRSTUVWXYZ",s),o[i++]=l,o[i++]=L(l+1)}for(var h in i--,t.cset32=u(),t)t.hasOwnProperty(h)&&($.$ctx[h]=t[h]);$.$ctx._2543=1}(),e.lintcsumalpha=function(){var t=o[--i];if(o[i++]=t,t.length<2)return i-=2,o[i++]="bwipp.GS1alphaTooShort#2546",o[i++]="Alphanumeric string is too short to check",o[i++]=!1,!0;var n=o[--i];o[i++]=n,o[i++]=n.length-2,o[i++]=b(n,0,n.length-2),o[i++]=1/0;var r=o[--i],a=o[--i];o[i++]=r,k(a,(function(){var t=o[--i],n=void 0!==A(e.cset82,t);if(o[i++]=t,!n)return o[i++]=-1,!0;var r=A(e.cset82,o[--i]);o[i++]=r}));var u=o[--i];if(o[i++]=u,-1==u)return E(),i-=3,o[i++]="bwipp.GS1UnknownCSET82Character#2552",o[i++]="Unknown CSET 82 character",o[i++]=!1,!0;O(s(S()));var c=o[--i],l=o[--i];o[i++]=c,o[i++]=l,i--;var h=o[--i],f=o[--i],d=b(o[--i],f,2);o[i++]=h,o[i++]=d,o[i++]=1/0;var p=o[--i],m=o[--i];o[i++]=p,k(m,(function(){var t=o[--i],n=void 0!==A(e.cset32,t);if(o[i++]=t,!n)return o[i++]=-1,!0;var r=A(e.cset32,o[--i]);o[i++]=r}));var g=o[--i];if(o[i++]=g,-1==g)return E(),i-=2,o[i++]="bwipp.GS1UnknownCSET32Character#2558",o[i++]="Unknown CSET 32 character",o[i++]=!1,!0;O(s(S()));var v=o[--i],y=o[--i];o[i++]=v,o[i++]=y,i--;var w=o[--i],x=o[--i],C=s([2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83]),_=x.length;if(o[i++]=L((A(w,0)<<5)+A(w,1)),o[i++]=x,o[i++]=C,o[i++]=_,_>C.length)return i-=5,o[i++]="bwipp.GS1alphaTooLong#2563",o[i++]="Alphanumeric string is too long to check",o[i++]=!1,!0;for(var T=o[--i],D=b(o[--i],0,T),B=0,I=D.length;B<I;B++){var M=o[--i];o[i++]=A(D,B),o[i++]=M}var j=o[--i];o[i++]=0,k(j,(function(){var e=o[--i],t=o[--i],n=o[--i];o[i++]=L(t+n*e)}));var N=o[--i];return o[--i]!=N%1021?(i--,o[i++]="bwipp.GS1badAlphaCheckCharacters#2566",o[i++]="Bad alphanumeric check characters",o[i++]=!1,!0):void 0},$.$ctx._2590||function(){var t=Object.create(e);o[i++]=1/0;for(var n=s(["004","008","010","012","016","020","024","028","031","032","036","040","044","048","050","051","052","056","060","064","068","070","072","074","076","084","086","090","092","096","100","104","108","112","116","120","124","132","136","140","144","148","152","156","158","162","166","170","174","175","178","180","184","188","191","192","196","203","204","208","212","214","218","222","226","231","232","233","234","238","239","242","246","248","250","254","258","260","262","266","268","270","275","276","288","292","296","300","304","308","312","316","320","324","328","332","334","336","340","344","348","352","356","360","364","368","372","376","380","384","388","392","398","400","404","408","410","414","417","418","422","426","428","430","434","438","440","442","446","450","454","458","462","466","470","474","478","480","484","492","496","498","499","500","504","508","512","516","520","524","528","531","533","534","535","540","548","554","558","562","566","570","574","578","580","581","583","584","585","586","591","598","600","604","608","612","616","620","624","626","630","634","638","642","643","646","652","654","659","660","662","663","666","670","674","678","682","686","688","690","694","702","703","704","705","706","710","716","724","728","729","732","740","744","748","752","756","760","762","764","768","772","776","780","784","788","792","795","796","798","800","804","807","818","826","831","832","833","834","840","850","854","858","860","862","876","882","887","894"]),r=0,a=n.length;r<a;r++){var c=A(n,r);o[i++]=c,o[i++]=c}for(var l in t.iso3166=u(),t)t.hasOwnProperty(l)&&($.$ctx[l]=t[l]);$.$ctx._2590=1}(),e.lintiso3166=function(){if(!(void 0!==A(e.iso3166,o[--i])))return i--,o[i++]="bwipp.GS1UnknownCountry#2593",o[i++]="Unknown country code",o[i++]=!1,!0},e.lintiso3166999=function(){var t=o[--i];if(o[i++]=t,D(t,"999")){if(!(void 0!==A(e.iso3166,o[--i])))return i--,o[i++]="bwipp.GS1UnknownCountryOr999#2598",o[i++]="Unknown country code or not 999",o[i++]=!1,!0}else i--},e.lintiso3166list=function(){var t=o[--i];if(o[i++]=t,t.length%3!=0)return i-=2,o[i++]="bwipp.GS1BadCountryListLength#2606",o[i++]="Not a group of three-digit country codes",o[i++]=!1,!0;var n=o[--i];o[i++]=n,o[i++]=!0;for(var r=0,a=n.length-1;r<=a;r+=3){var s=o[--i],u=o[--i],c=void 0!==A(e.iso3166,b(u,r,3));if(o[i++]=u,o[i++]=s,!c){i-=2,o[i++]=!1;break}}if(P(o[--i]))return i--,o[i++]="bwipp.GS1UnknownCountry#2613",o[i++]="Unknown country code",o[i++]=!1,!0;i--},$.$ctx._2644||function(){var t=Object.create(e);o[i++]=1/0;for(var n=s(["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","ZA","ZM","ZW"]),r=0,a=n.length;r<a;r++){var c=A(n,r);o[i++]=c,o[i++]=c}for(var l in t.iso3166alpha2=u(),t)t.hasOwnProperty(l)&&($.$ctx[l]=t[l]);$.$ctx._2644=1}(),e.lintiso3166alpha2=function(){if(!(void 0!==A(e.iso3166alpha2,o[--i])))return i--,o[i++]="bwipp.GS1UnknownCountryAlpha#2647",o[i++]="Unknown country alpha code",o[i++]=!1,!0},$.$ctx._2675||function(){var t=Object.create(e);o[i++]=1/0;for(var n=s(["008","012","032","036","044","048","050","051","052","060","064","068","072","084","090","096","104","108","116","124","132","136","144","152","156","170","174","188","191","192","203","208","214","222","230","232","238","242","262","270","292","320","324","328","332","340","344","348","352","356","360","364","368","376","388","392","398","400","404","408","410","414","417","418","422","426","430","434","446","454","458","462","480","484","496","498","504","512","516","524","532","533","548","554","558","566","578","586","590","598","600","604","608","634","643","646","654","682","690","694","702","704","706","710","728","748","752","756","760","764","776","780","784","788","800","807","818","826","834","840","858","860","882","886","901","925","927","928","929","930","931","932","933","934","936","938","940","941","943","944","946","947","948","949","950","951","952","953","955","956","957","958","959","960","961","962","963","964","965","967","968","969","970","971","972","973","975","976","977","978","979","980","981","984","985","986","990","994","997","999"]),r=0,a=n.length;r<a;r++){var c=A(n,r);o[i++]=c,o[i++]=c}for(var l in t.iso4217=u(),t)t.hasOwnProperty(l)&&($.$ctx[l]=t[l]);$.$ctx._2675=1}(),e.lintiso4217=function(){if(!(void 0!==A(e.iso4217,o[--i])))return i--,o[i++]="bwipp.GS1UnknownCurrency#2678",o[i++]="Unknown currency code",o[i++]=!1,!0},e.lintiban=function(){var t=o[--i];if(o[i++]=t,t.length<=4)return i-=2,o[i++]="bwipp.GS1tooShort#2682",o[i++]="IBAN too short",o[i++]=!1,!0;var n=o[--i];if(o[i++]=n,o[i++]=!0,k(n,(function(){var e=c(1);if(v(e,0,o[--i]),C("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",e),P(o[--i]))return i-=2,o[i++]=!1,!0;i-=3})),P(o[--i]))return i--,o[i++]="bwipp.GS1badIBANcharacter#2689",o[i++]="Invalid IBAN character",o[i++]=!1,!0;var r=o[--i];o[i++]=r,o[i++]=r,o[i++]=1/0;var a=o[--i],u=o[--i];o[i++]=a,o[i++]=u,o[i++]=1/0;var h=o[--i],f=o[--i];o[i++]=h,k(f),l(S(),-4),O(s(S()));var d=o[--i],p=o[--i];o[i++]=d,o[i++]=p,i--,k(o[--i],(function(){var e=L(o[--i]-48);if(o[i++]=e,e>9){var t=L(o[--i]-7);o[i++]=~~(t/10),o[i++]=t%10}})),O(s(S()));var m=o[--i],g=o[--i];o[i++]=m,o[i++]=g,i--;var A=o[--i];if(o[i++]=0,k(A,(function(){var e=o[--i],t=o[--i];o[i++]=L(e+10*t)%97})),1!=o[--i])return i-=2,o[i++]="bwipp.GS1badIBANchecksum#2694",o[i++]="IBAN checksum incorrect",o[i++]=!1,!0;var y=b(o[--i],0,2);o[i++]=y,e.lintiso3166alpha2()},e.lintzero=function(){if(D(o[--i],"0"))return i--,o[i++]="bwipp.GS1zeroRequired#2699",o[i++]="Zero is required",o[i++]=!1,!0},e.lintnonzero=function(){var e=o[--i];if(o[i++]=!1,k(e,(function(){48!=o[--i]&&(i--,o[i++]=!0)})),P(o[--i]))return i--,o[i++]="bwipp.GS1zeroNotPermitted#2704",o[i++]="Zero not permitted",o[i++]=!1,!0},e.lintnozeroprefix=function(){var e=o[--i];if(e.length>1&&48==A(e,0))return i--,o[i++]="bwipp.GS1badZeroPrefix#2709",o[i++]="Zero prefix is not permitted",o[i++]=!1,!0},e.lintyymmd0=function(){var e=o[--i],t=p(b(e,2,2));if(o[i++]=e,t<1||t>12)return i--,o[i++]="bwipp.GS1badMonth#2714",o[i++]="Invalid month",o[i++]=!1,!0;var n=o[--i],r=p(b(n,0,2)),a=r-21;if(o[i++]=n,o[i++]=r,o[i++]=a,a>=51){i--;var u=o[--i];o[i++]=L(u+1900)}else if(o[--i]<=-50){var c=o[--i];o[i++]=L(c+2100)}else{var l=o[--i];o[i++]=L(l+2e3)}var h=o[--i];o[i++]=h%400==0||h%4==0&&h%100!=0,o[i++]=1/0;var f=o[--i],d=o[--i]?29:28;o[i++]=f,o[i++]=31,o[i++]=d,o[i++]=31,o[i++]=30,o[i++]=31,o[i++]=30,o[i++]=31,o[i++]=31,o[i++]=30,o[i++]=31,o[i++]=30,o[i++]=31;var m=s(),g=o[--i];return A(m,p(b(g,2,2))-1)<p(b(g,4,2))?(i--,o[i++]="bwipp.GS1badDay#2720",o[i++]="Invalid day of month",o[i++]=!1,!0):void 0},e.lintyymmdd=function(){var t=o[--i];if(o[i++]=t,6!=t.length)return i--,o[i++]="bwipp.GS1badDateLength#2724",o[i++]="Invalid length for date",o[i++]=!1,!0;var n=o[--i];if(o[i++]=n,p(b(n,4,2))<1)return i--,o[i++]="bwipp.GS1badDay#2725",o[i++]="Invalid day of month",o[i++]=!1,!0;e.lintyymmd0()},e.lintyymmddhh=function(){var t=o[--i];if(o[i++]=t,8!=t.length)return i--,o[i++]="bwipp.GS1badYYMMDDHHLength#2730",o[i++]="Invalid length for date with hour",o[i++]=!1,!0;var n=o[--i];if(o[i++]=n,p(b(n,6,2))>23)return i-=2,o[i++]="bwipp.GS1badHour#2731",o[i++]="Invalid hour of day",o[i++]=!1,!0;var r=b(o[--i],0,6);o[i++]=r,e.lintyymmdd()},e.linthhmm=function(){var e=o[--i];return o[i++]=e,p(b(e,0,2))>23?(i-=2,o[i++]="bwipp.GS1badHour#2736",o[i++]="Invalid hour of day",o[i++]=!1,!0):p(b(o[--i],2,2))>59?(i--,o[i++]="bwipp.GS1badMinute#2737",o[i++]="Invalid minute in the hour",o[i++]=!1,!0):void 0},e.lintmmoptss=function(){var e=o[--i],t=e.length;if(o[i++]=e,2!=t&&4!=t)return i--,o[i++]="bwipp.GS1badTimeLength#2742",o[i++]="Invalid length for optional minutes and seconds",o[i++]=!1,!0;var n=o[--i];if(o[i++]=n,p(b(n,0,2))>59)return i-=2,o[i++]="bwipp.GS1badMinute#2744",o[i++]="Invalid minute in the hour",o[i++]=!1,!0;var r=o[--i];if(o[i++]=r,r.length>=4){var a=o[--i];if(o[i++]=a,p(b(a,2,2))>59)return i-=2,o[i++]="bwipp.GS1badSecond#2746",o[i++]="Invalid second in the minute",o[i++]=!1,!0}i--},e.lintyesno=function(){var e=o[--i];if(D(e,"0")&&D(e,"1"))return i--,o[i++]="bwipp.GS1badBoolean#2753",o[i++]="Neither 0 nor 1 for yes or no",o[i++]=!1,!0},e.lintwinding=function(){var e=o[--i];if(D(e,"0")&&D(e,"1")&&D(e,"9"))return i--,o[i++]="bwipp.GS1badWinding#2759",o[i++]="Invalid winding direction",o[i++]=!1,!0},e.lintpieceoftotal=function(){var e=o[--i];if(o[i++]=e,e.length%2!=0)return i-=2,o[i++]="bwipp.GS1badPieceTotalLength#2764",o[i++]="Invalid piece/total length",o[i++]=!1,!0;var t=o[--i],n=p(b(t,0,~~(t.length/2)));if(o[i++]=t,o[i++]=n,0==n)return i-=3,o[i++]="bwipp.GS1badPieceNumber#2766",o[i++]="Invalid piece number",o[i++]=!1,!0;var r=o[--i],a=o[--i],s=~~(a.length/2),u=p(b(a,s,s));if(o[i++]=r,o[i++]=u,0==u)return i-=3,o[i++]="bwipp.GS1badPieceTotal#2768",o[i++]="Invalid total number",o[i++]=!1,!0;var c=o[--i];return M(o[--i],c)?(i--,o[i++]="bwipp.GS1pieceExceedsTotal#2769",o[i++]="Piece number exceeds total",o[i++]=!1,!0):void 0},e.lintpcenc=function(){for(;;){if(C(o[--i],"%"),P(o[--i])){i--;break}i-=2;var e=o[--i];if(o[i++]=e,e.length<2){i-=2,o[i++]="bwipp.GS1badPercentEscape#2775",o[i++]="Invalid % escape",o[i++]=!1;break}var t=o[--i],n=b(t,0,2);o[i++]=t,o[i++]=!0;for(var r=0,a=n.length;r<a;r++){var s=c(1);if(v(s,0,A(n,r)),C("0123456789ABCDEFabcdef",s),P(o[--i]))return i-=2,o[i++]=!1,!0;i-=3}if(P(o[--i])){i-=2,o[i++]="bwipp.GS1badPercentChars#2782",o[i++]="Invalid characters for percent encoding",o[i++]=!1;break}}},e.lintcouponcode=function(){var t=o[--i];if(o[i++]=t,o[i++]=!0,k(t,(function(){var e=o[--i];if(e<48||e>57)return i--,o[i++]=!1,!0})),P(o[--i]))return i-=2,o[i++]="bwipp.GS1couponNotNumeric#2790",o[i++]="Coupon not numeric",o[i++]=!1,!0;var n=o[--i];if(o[i++]=n,n.length<1)return i-=2,o[i++]="bwipp.GS1couponTooShortGCPVLI#2794",o[i++]="Coupon too short: Missing GCP VLI",o[i++]=!1,!0;var r=o[--i],a=p(b(r,0,1));if(o[i++]=r,o[i++]=a,a>6)return i-=2,o[i++]="bwipp.GS1couponBadGCPVLI#2797",o[i++]="Coupon GCP length indicator must be 0-6",o[i++]=!1,!0;var u=o[--i],c=o[--i];if(o[i++]=c,o[i++]=L(L(u+6)+1),L(L(u+6)+1)>c.length)return i-=3,o[i++]="bwipp.GS1couponTooShortGCP#2801",o[i++]="Coupon too short: GCP truncated",o[i++]=!1,!0;var l=o[--i],h=o[--i],f=b(h,l,L(h.length-l));if(o[i++]=f,f.length<6)return i-=2,o[i++]="bwipp.GS1couponTooShortOfferCode#2807",o[i++]="Coupon too short: Offer Code truncated",o[i++]=!1,!0;var d=o[--i],m=b(d,6,d.length-6);if(o[i++]=m,m.length<1)return i-=2,o[i++]="bwipp.GS1couponTooShortSaveValueVLI#2813",o[i++]="Coupon too short: Missing Save Value VLI",o[i++]=!1,!0;var g=o[--i],v=p(b(g,0,1));if(o[i++]=g,o[i++]=v,v<1||v>5)return i-=2,o[i++]="bwipp.GS1couponBadSaveValueVLI#2816",o[i++]="Coupon Save Value length indicator must be 1-5",o[i++]=!1,!0;var y=o[--i],w=o[--i];if(o[i++]=w,o[i++]=L(y+1),L(y+1)>w.length)return i-=3,o[i++]="bwipp.GS1couponTooShortSaveValue#2820",o[i++]="Coupon too short: Save Value truncated",o[i++]=!1,!0;var x=o[--i],C=o[--i],E=b(C,x,L(C.length-x));if(o[i++]=E,E.length<1)return i-=2,o[i++]="bwipp.GS1couponTooShort1stPurchaseRequirementVLI#2826",o[i++]="Coupon too short: Missing 1st Purchase Requirement VLI",o[i++]=!1,!0;var S=o[--i],_=p(b(S,0,1));if(o[i++]=S,o[i++]=_,_<1||_>5)return i-=2,o[i++]="bwipp.GS1couponBad1stPurchaseRequirementVLI#2829",o[i++]="Coupon 1st Purchase Requirement length indicator must be 1-5",o[i++]=!1,!0;var O=o[--i],T=o[--i];if(o[i++]=T,o[i++]=L(O+1),L(O+1)>T.length)return i-=3,o[i++]="bwipp.GS1couponTooShort1stPurchaseRequirement#2833",o[i++]="Coupon too short: 1st Purchase Requirement truncated",o[i++]=!1,!0;var D=o[--i],B=o[--i],I=b(B,D,L(B.length-D));if(o[i++]=I,I.length<1)return i-=2,o[i++]="bwipp.GS1couponTooShort1stPurchaseRequirementCode#2839",o[i++]="Coupon too short: Missing 1st Purchase Requirement Code",o[i++]=!1,!0;var M=o[--i],j=p(b(M,0,1));if(o[i++]=M,j>4&&9!=j)return i-=2,o[i++]="bwipp.GS1couponBad1stPurchaseRequirementCode#2842",o[i++]="Coupon 1st Purchase Requirement Code must be 0-4 or 9",o[i++]=!1,!0;var N=o[--i],F=b(N,1,N.length-1);if(o[i++]=F,F.length<3)return i-=2,o[i++]="bwipp.GS1couponTooShort1stPurchaseFamilyCode#2848",o[i++]="Coupon too short: 1st Purchase Family Code truncated",o[i++]=!1,!0;var R=o[--i],U=b(R,3,R.length-3);if(o[i++]=U,U.length>=1){var z=o[--i];if(o[i++]=z,1==p(b(z,0,1))){var H=o[--i],$=b(H,1,H.length-1);if(o[i++]=$,$.length<1)return i-=2,o[i++]="bwipp.GS1couponTooShortAdditionalPurchaseRulesCode#2858",o[i++]="Coupon too short: Missing Additional Purchase Rules Code",o[i++]=!1,!0;var Q=o[--i];if(o[i++]=Q,p(b(Q,0,1))>3)return i-=2,o[i++]="bwipp.GS1couponBadAdditionalPurchaseRulesCode#2861",o[i++]="Coupon Additional Purchase Rules Code must be 0-3",o[i++]=!1,!0;var V=o[--i],q=b(V,1,V.length-1);if(o[i++]=q,q.length<1)return i-=2,o[i++]="bwipp.GS1couponTooShort2ndPurchaseRequirementVLI#2867",o[i++]="Coupon too short: Missing 2nd Purchase Requirement VLI",o[i++]=!1,!0;var G=o[--i],W=p(b(G,0,1));if(o[i++]=G,o[i++]=W,W<1||W>5)return i-=2,o[i++]="bwipp.GS1couponBad2ndPurchaseRequirementVLI#2870",o[i++]="Coupon 2nd Purchase Requirement length indicator must be 1-5",o[i++]=!1,!0;var K=o[--i],Y=o[--i];if(o[i++]=Y,o[i++]=L(K+1),L(K+1)>Y.length)return i-=3,o[i++]="bwipp.GS1couponTooShort2ndPurchaseRequirement#2874",o[i++]="Coupon too short: 2nd Purchase Requirement truncated",o[i++]=!1,!0;var X=o[--i],J=o[--i],Z=b(J,X,L(J.length-X));if(o[i++]=Z,Z.length<1)return i-=2,o[i++]="bwipp.GS1couponTooShort2ndPurchaseRequirementCode#2880",o[i++]="Coupon too short: Missing 2nd Purchase Requirement Code",o[i++]=!1,!0;var ee=o[--i],te=p(b(ee,0,1));if(o[i++]=ee,te>4&&9!=te)return i-=2,o[i++]="bwipp.GS1couponBad2ndPurchaseRequirementCode#2883",o[i++]="Coupon 2nd Purchase Requirement Code must be 0-4 or 9",o[i++]=!1,!0;var ne=o[--i],re=b(ne,1,ne.length-1);if(o[i++]=re,re.length<3)return i-=2,o[i++]="bwipp.GS1couponTooShort2ndPurchaseFamilyCode#2889",o[i++]="Coupon too short: 2nd Purchase Family Code truncated",o[i++]=!1,!0;var ie=o[--i],oe=b(ie,3,ie.length-3);if(o[i++]=oe,oe.length<1)return i-=2,o[i++]="bwipp.GS1couponTooShort2ndPurchaseGCPVLI#2895",o[i++]="Coupon too short: Missing 2nd Purchase GCP VLI",o[i++]=!1,!0;var ae=o[--i],se=p(b(ae,0,1));if(o[i++]=ae,o[i++]=se,se>6&&9!=se)return i-=2,o[i++]="bwipp.GS1couponBad2ndPurchaseGCPVLI#2898",o[i++]="Coupon 2nd Purchase GCP length indicator must be 0-6 or 9",o[i++]=!1,!0;var ue=o[--i];if(o[i++]=ue,9!=ue){var ce=o[--i];o[i++]=L(ce+6)}else i--,o[i++]=0;var le=o[--i],he=o[--i];if(o[i++]=he,o[i++]=L(le+1),L(le+1)>he.length)return i-=3,o[i++]="bwipp.GS1couponTooShort2ndPurchaseGCP#2902",o[i++]="Coupon too short: 2nd Purchase GCP truncated",o[i++]=!1,!0;var fe=o[--i],de=o[--i];o[i++]=b(de,fe,L(de.length-fe))}}var pe=o[--i];if(o[i++]=pe,pe.length>=1){var me=o[--i];if(o[i++]=me,2==p(b(me,0,1))){var ge=o[--i],Ae=b(ge,1,ge.length-1);if(o[i++]=Ae,Ae.length<1)return i-=2,o[i++]="bwipp.GS1couponTooShort3rdPurchaseRequirementVLI#2914",o[i++]="Coupon too short: Missing 3rd Purchase Requirement VLI",o[i++]=!1,!0;var ve=o[--i],be=p(b(ve,0,1));if(o[i++]=ve,o[i++]=be,be<1||be>5)return i-=2,o[i++]="bwipp.GS1couponBad3rdPurchaseRequirementVLI#2917",o[i++]="Coupon 3rd Purchase Requirement length indicator must be 1-5",o[i++]=!1,!0;var ye=o[--i],we=o[--i];if(o[i++]=we,o[i++]=L(ye+1),L(ye+1)>we.length)return i-=3,o[i++]="bwipp.GS1couponTooShort3rdPurchaseRequirement#2921",o[i++]="Coupon too short: 3rd Purchase Requirement truncated",o[i++]=!1,!0;var xe=o[--i],Ce=o[--i],ke=b(Ce,xe,L(Ce.length-xe));if(o[i++]=ke,ke.length<1)return i-=2,o[i++]="bwipp.GS1couponTooShort3rdPurchaseRequirementCode#2927",o[i++]="Coupon too short: Missing 3rd Purchase Requirement Code",o[i++]=!1,!0;var Ee=o[--i],Se=p(b(Ee,0,1));if(o[i++]=Ee,Se>4&&9!=Se)return i-=2,o[i++]="bwipp.GS1couponBad3rdPurchaseRequirementCode#2930",o[i++]="Coupon 3rd Purchase Requirement Code must be 0-4 or 9",o[i++]=!1,!0;var _e=o[--i],Oe=b(_e,1,_e.length-1);if(o[i++]=Oe,Oe.length<3)return i-=2,o[i++]="bwipp.GS1couponTooShort3rdPurchaseFamilyCode#2936",o[i++]="Coupon too short: 3rd Purchase Family Code truncated",o[i++]=!1,!0;var Te=o[--i],De=b(Te,3,Te.length-3);if(o[i++]=De,De.length<1)return i-=2,o[i++]="bwipp.GS1couponTooShort3rdPurchaseGCPVLI#2942",o[i++]="Coupon too short: Missing 3rd Purchase GCP VLI",o[i++]=!1,!0;var Be=o[--i],Ie=p(b(Be,0,1));if(o[i++]=Be,o[i++]=Ie,Ie>6&&9!=Ie)return i-=2,o[i++]="bwipp.GS1couponBad3rdPurchaseGCPVLI#2945",o[i++]="Coupon 3rd Purchase GCP length indicator must be 0-6 or 9",o[i++]=!1,!0;var Me=o[--i];if(o[i++]=Me,9!=Me){var je=o[--i];o[i++]=L(je+6)}else i--,o[i++]=0;var Ne=o[--i],Fe=o[--i];if(o[i++]=Fe,o[i++]=L(Ne+1),L(Ne+1)>Fe.length)return i-=3,o[i++]="bwipp.GS1couponTooShort3rdPurchaseGCP#2949",o[i++]="Coupon too short: 3rd Purchase GCP truncated",o[i++]=!1,!0;var Re=o[--i],Pe=o[--i];o[i++]=b(Pe,Re,L(Pe.length-Re))}}e.couponexpire=-1;var Le=o[--i];if(o[i++]=Le,Le.length>=1){var Ue=o[--i];if(o[i++]=Ue,3==p(b(Ue,0,1))){var ze=o[--i],He=b(ze,1,ze.length-1);if(o[i++]=He,He.length<6)return i-=2,o[i++]="bwipp.GS1couponTooShortExpirationDate#2962",o[i++]="Coupon too short: Expiration date",o[i++]=!1,!0;var $e=o[--i],Qe=p(b($e,2,2));if(o[i++]=$e,Qe<1||Qe>12)return i-=2,o[i++]="bwipp.GS1couponExpirationDateBadMonth#2964",o[i++]="Invalid month in expiration date",o[i++]=!1,!0;var Ve=o[--i],qe=p(b(Ve,0,2)),Ge=qe-21;if(o[i++]=Ve,o[i++]=qe,o[i++]=Ge,Ge>=51){i--;var We=o[--i];o[i++]=L(We+1900)}else if(o[--i]<=-50){var Ke=o[--i];o[i++]=L(Ke+2100)}else{var Ye=o[--i];o[i++]=L(Ye+2e3)}var Xe=o[--i];o[i++]=Xe%400==0||Xe%4==0&&Xe%100!=0,o[i++]=1/0;var Je=o[--i],Ze=o[--i]?29:28;o[i++]=Je,o[i++]=31,o[i++]=Ze,o[i++]=31,o[i++]=30,o[i++]=31,o[i++]=30,o[i++]=31,o[i++]=31,o[i++]=30,o[i++]=31,o[i++]=30,o[i++]=31;var et=s(),tt=o[--i],nt=p(b(tt,4,2));if(o[i++]=tt,A(et,p(b(tt,2,2))-1)<nt||nt<1)return i-=2,o[i++]="bwipp.GS1couponExpirationDateBadDay#2971",o[i++]="Invalid day of month in expiration date",o[i++]=!1,!0;var rt=o[--i];e.couponexpire=p(b(rt,0,6)),o[i++]=b(rt,6,rt.length-6)}}var it=o[--i];if(o[i++]=it,it.length>=1){var ot=o[--i];if(o[i++]=ot,4==p(b(ot,0,1))){var at=o[--i],st=b(at,1,at.length-1);if(o[i++]=st,st.length<6)return i-=2,o[i++]="bwipp.GS1couponTooShortStartDate#2983",o[i++]="Coupon too short: Start date",o[i++]=!1,!0;var ut=o[--i],ct=p(b(ut,2,2));if(o[i++]=ut,ct<1||ct>12)return i-=2,o[i++]="bwipp.GS1couponStartDateBadMonth#2985",o[i++]="Invalid month in start date",o[i++]=!1,!0;var lt=o[--i],ht=p(b(lt,0,2)),ft=ht-21;if(o[i++]=lt,o[i++]=ht,o[i++]=ft,ft>=51){i--;var dt=o[--i];o[i++]=L(dt+1900)}else if(o[--i]<=-50){var pt=o[--i];o[i++]=L(pt+2100)}else{var mt=o[--i];o[i++]=L(mt+2e3)}var gt=o[--i];o[i++]=gt%400==0||gt%4==0&&gt%100!=0,o[i++]=1/0;var At=o[--i],vt=o[--i]?29:28;o[i++]=At,o[i++]=31,o[i++]=vt,o[i++]=31,o[i++]=30,o[i++]=31,o[i++]=30,o[i++]=31,o[i++]=31,o[i++]=30,o[i++]=31,o[i++]=30,o[i++]=31;var bt=s(),yt=o[--i],wt=p(b(yt,4,2));if(o[i++]=yt,A(bt,p(b(yt,2,2))-1)<wt||wt<1)return i-=2,o[i++]="bwipp.GS1couponStartDateBadDay#2992",o[i++]="Invalid day of month in start date",o[i++]=!1,!0;var xt=o[--i];if(e.couponstart=p(b(xt,0,6)),o[i++]=xt,-1!=e.couponexpire&&e.couponexpire<e.couponstart)return i-=2,o[i++]="bwipp.GS1couponExpireDateBeforeStartDate#2995",o[i++]="Coupon expires before it starts",o[i++]=!1,!0;var Ct=o[--i];o[i++]=b(Ct,6,Ct.length-6)}}var kt=o[--i];if(o[i++]=kt,kt.length>=1){var Et=o[--i];if(o[i++]=Et,5==p(b(Et,0,1))){var St=o[--i],_t=b(St,1,St.length-1);if(o[i++]=_t,_t.length<1)return i-=2,o[i++]="bwipp.GS1couponTooShortSerialNumberVLI#3007",o[i++]="Coupon too short: Missing Serial Number VLI",o[i++]=!1,!0;var Ot=o[--i],Tt=b(Ot,0,1);if(o[i++]=Ot,o[i++]=p(Tt)+6+1,p(Tt)+6+1>Ot.length)return i-=3,o[i++]="bwipp.GS1couponTooShortSerialNumber#3011",o[i++]="Coupon too short: Serial Number truncated",o[i++]=!1,!0;var Dt=o[--i],Bt=o[--i];o[i++]=b(Bt,Dt,L(Bt.length-Dt))}}var It=o[--i];if(o[i++]=It,It.length>=1){var Mt=o[--i];if(o[i++]=Mt,6==p(b(Mt,0,1))){var jt=o[--i],Nt=b(jt,1,jt.length-1);if(o[i++]=Nt,Nt.length<1)return i-=2,o[i++]="bwipp.GS1couponTooShortRetailerGCPGLNVLI#3023",o[i++]="Coupon too short: Missing Retailer GCP/GLN VLI",o[i++]=!1,!0;var Ft=o[--i],Rt=p(b(Ft,0,1));if(o[i++]=Ft,o[i++]=Rt,Rt<1||Rt>7)return i-=2,o[i++]="bwipp.GS1couponBadRetailerGCPGLNVLI#3026",o[i++]="Coupon Retailer GCP/GLN length indicator must be 1-7",o[i++]=!1,!0;var Pt=o[--i],Lt=o[--i];if(o[i++]=Lt,o[i++]=L(L(Pt+6)+1),L(L(Pt+6)+1)>Lt.length)return i-=3,o[i++]="bwipp.GS1couponTooShortRetailerGCPGLN#3030",o[i++]="Coupon too short: Retailer GCP/GLN truncated",o[i++]=!1,!0;var Ut=o[--i],zt=o[--i];o[i++]=b(zt,Ut,L(zt.length-Ut))}}var Ht=o[--i];if(o[i++]=Ht,Ht.length>=1){var $t=o[--i];if(o[i++]=$t,9==p(b($t,0,1))){var Qt=o[--i],Vt=b(Qt,1,Qt.length-1);if(o[i++]=Vt,Vt.length<1)return i-=2,o[i++]="bwipp.GS1couponTooShortSaveValueCode#3042",o[i++]="Coupon too short: Missing Save Value Code",o[i++]=!1,!0;var qt=o[--i],Gt=p(b(qt,0,1));if(o[i++]=qt,Gt>6||3==Gt||4==Gt)return i-=2,o[i++]="bwipp.GS1couponBadSaveValueCode#3045",o[i++]="Coupon Save Value Code must be 0,1,2,5 or 6",o[i++]=!1,!0;var Wt=o[--i],Kt=b(Wt,1,Wt.length-1);if(o[i++]=Kt,Kt.length<1)return i-=2,o[i++]="bwipp.GS1couponTooShortSaveValueAppliesToItem#3051",o[i++]="Coupon too short: Missing Save Value Applies to Item",o[i++]=!1,!0;var Yt=o[--i];if(o[i++]=Yt,p(b(Yt,0,1))>2)return i-=2,o[i++]="bwipp.GS1couponBadSaveValueAppliesToItem#3054",o[i++]="Coupon Save Value Applies to Item must be 0-2",o[i++]=!1,!0;var Xt=o[--i],Jt=b(Xt,1,Xt.length-1);if(o[i++]=Jt,Jt.length<1)return i-=2,o[i++]="bwipp.GS1couponTooShortStoreCouponFlag#3060",o[i++]="Coupon too short: Missing Store Coupon Flag",o[i++]=!1,!0;var Zt=o[--i],en=b(Zt,1,Zt.length-1);if(o[i++]=en,en.length<1)return i-=2,o[i++]="bwipp.GS1couponTooShortDontMultiplyFlag#3066",o[i++]="Coupon too short: Missing Don't Multiply Flag",o[i++]=!1,!0;var tn=o[--i];if(o[i++]=tn,p(b(tn,0,1))>1)return i-=2,o[i++]="bwipp.GS1couponBadDontMultiplyFlag#3069",o[i++]="Don't Multiply Flag must be 0 or 1",o[i++]=!1,!0;var nn=o[--i];o[i++]=b(nn,1,nn.length-1)}}var rn=o[--i];if(o[i++]=rn,0!=rn.length)return i-=2,o[i++]="bwipp.GS1couponUnrecognisedOptionalField#3076",o[i++]="Coupon fields must be 1,2,3,4,5,6 or 9, increasing order",o[i++]=!1,!0;i--},e.lintcouponposoffer=function(){var e=o[--i];if(o[i++]=e,o[i++]=!0,k(e,(function(){var e=o[--i];if(e<48||e>57)return i--,o[i++]=!1,!0})),P(o[--i]))return i-=2,o[i++]="bwipp.GS1couponNotNumeric#3085",o[i++]="Coupon not numeric",o[i++]=!1,!0;var t=o[--i];if(o[i++]=t,t.length<1)return i-=2,o[i++]="bwipp.GS1couponTooShortFormatCode#3088",o[i++]="Coupon too short: Missing Format Code",o[i++]=!1,!0;var n=o[--i],r=b(n,0,1);if(o[i++]=n,D(r,"0")&&D(r,"1"))return i-=2,o[i++]="bwipp.GS1couponBadFormatCode#3091",o[i++]="Coupon format must be 0 or 1",o[i++]=!1,!0;var a=o[--i],s=b(a,1,a.length-1);if(o[i++]=s,s.length<1)return i-=2,o[i++]="bwipp.GS1couponTooShortFunderVLI#3096",o[i++]="Coupon too short: Missing Funder VLI",o[i++]=!1,!0;var u=o[--i],c=p(b(u,0,1));if(o[i++]=u,o[i++]=c,c>6)return i-=3,o[i++]="bwipp.GS1couponBadFunderVLI#3099",o[i++]="Coupon Funder length indicator must be 0-6",o[i++]=!1,!0;var l=o[--i],h=o[--i];if(o[i++]=h,o[i++]=L(L(l+6)+1),L(L(l+6)+1)>h.length)return i-=3,o[i++]="bwipp.GS1couponTooShortFunder#3103",o[i++]="Coupon too short: Truncated Funder ID",o[i++]=!1,!0;var f=o[--i],d=o[--i],m=b(d,f,L(d.length-f));if(o[i++]=m,m.length<6)return i-=2,o[i++]="bwipp.GS1couponTooShortOfferCode#3108",o[i++]="Coupon too short: Truncated Offer Code",o[i++]=!1,!0;var g=o[--i],A=b(g,6,g.length-6);if(o[i++]=A,A.length<1)return i-=2,o[i++]="bwipp.GS1couponTooShortSnVLI#3113",o[i++]="Coupon too short: Missing SN VLI",o[i++]=!1,!0;var v=o[--i],y=b(v,0,1);if(o[i++]=v,o[i++]=p(y)+6+1,p(y)+6+1>v.length)return i-=3,o[i++]="bwipp.GS1couponTooShortSn#3118",o[i++]="Coupon too short: Truncated SN",o[i++]=!1,!0;var w=o[--i],x=o[--i],C=b(x,w,L(x.length-w));if(o[i++]=C,0!=C.length)return i-=2,o[i++]="bwipp.GS1couponTooLong#3122",o[i++]="Coupon too long",o[i++]=!1,!0;i--},e.lintlatlong=function(){var e=o[--i];if(o[i++]=e,20!=e.length)return i--,o[i++]="bwipp.GS1badGeoLength#3129",o[i++]="Invalid length for a geo-location",o[i++]=!1,!0;var t=o[--i];if(o[i++]=t,p(b(t,0,10))>18e8)return i--,o[i++]="bwipp.GS1badLatitude#3131",o[i++]="Invalid value for latitude",o[i++]=!1,!0;var n=o[--i];if(o[i++]=n,p(b(n,10,10))>36e8)return i--,o[i++]="bwipp.GS1badLongitude#3132",o[i++]="Invalid value for longitude",o[i++]=!1,!0;i--},!e.dontlint){o[i++]=!0;for(var We=0,Ke=e.vals.length-1;We<=Ke;We+=1){if(e.ai=A(e.ais,We),e.val=A(e.vals,We),!(void 0!==A(e.gs1syntax,e.ai))){i--,o[i++]="bwipp.GS1unknownAI#3174",o[i++]="Unrecognised AI",o[i++]=!1;break}var Ye=A(A(e.gs1syntax,e.ai),"parts");if(o[i++]=Ye,o[i++]=0,k(Ye,(function(){var e=o[--i];if(o[i++]=e,A(e,"opt"))i--,o[i++]=0;else{var t=A(o[--i],"min");o[i++]=t}var n=o[--i],r=o[--i];o[i++]=L(r+n)})),o[--i]>e.val.length){i--,o[i++]="bwipp.GS1valueTooShort#3147",o[i++]="Too short",o[i++]=!1;break}var Xe=o[--i];if(o[i++]=Xe,o[i++]=0,k(Xe,(function(){var e=A(o[--i],"max"),t=o[--i];o[i++]=L(t+e)})),o[--i]<e.val.length){i--,o[i++]="bwipp.GS1valueTooLong#3150",o[i++]="Too long",o[i++]=!1;break}k(o[--i],(function(){e.props=o[--i];var t=A(e.props,"max"),n=e.val,r=n.length;if(t>n.length){var a=r;r=t,t=a}e.eval=b(e.val,0,t);var s=e.eval.length;if(e.val=b(e.val,s,e.val.length-s),0==e.eval.length){if(P(A(e.props,"opt")))return i--,o[i++]="bwipp.GS1valueTooShort#3159",o[i++]="Too short",o[i++]=!1,!0}else{if(e.eval.length<A(e.props,"min"))return i--,o[i++]="bwipp.GS1valueTooShort#3163",o[i++]="Too short",o[i++]=!1,!0;var u=new Map([["N","lintnumeric"],["X","lintcset82"],["Y","lintcset39"]]);if(o[i++]=e.eval,!0===e[A(u,A(e.props,"cset"))]())return!0;k(A(e.props,"linters"),(function(){var t=e[o[--i]];if(o[i++]=e.eval,!0===t())return!0}))}}));var Je=o[--i];if(o[i++]=Je,P(Je))break;if(0!=e.val.length){i--,o[i++]="bwipp.GS1valueTooLong#3171",o[i++]="Too long",o[i++]=!1;break}}if(P(o[--i])){var Ze=o[--i],et=c(Ze.length+e.ai.length+5);y(et,0,"AI "),y(et,3,e.ai),y(et,3+e.ai.length,": "),y(et,5+e.ai.length,Ze),o[i++]=et,z()}e.aiexists=function(){e.this=o[--i],e.patt=o[--i];for(var t=0;t<1;t++){if(void 0!==A(e.aivals,e.patt)){o[i++]=!0;break}if(4==e.patt.length){if(T(b(e.patt,3,1),"n")){var n=T(b(e.patt,2,1),"n")?2:3;e.pfxlen=n;var r=e.ais;o[i++]=!1;for(var a=0,s=r.length;a<s;a++){var u=A(r,a);o[i++]=u,D(u,e.this)&&4==u.length?T(b(o[--i],0,e.pfxlen),b(e.patt,0,e.pfxlen))&&(i--,o[i++]=!0):i--}break}o[i++]=!1;break}o[i++]=!1;break}};e.vals;e.aivals=new Map;for(var tt=0,nt=e.vals.length-1;tt<=nt;tt+=1){if(e.ai=A(e.ais,tt),e.val=A(e.vals,tt),void 0!==A(e.aivals,e.ai)){if(D(A(e.aivals,e.ai),e.val)){var rt=c(e.ai.length+40);y(rt,0,"Repeated AIs ("),y(rt,14,e.ai),y(rt,14+e.ai.length,") must have the same value"),o[i++]="bwipp.GS1repeatedDifferingAIs#3224",o[i++]=rt,z()}}else v(e.aivals,e.ai,e.val)}for(var it=0,ot=e.vals.length-1;it<=ot;it+=1){e.ai=A(e.ais,it);var at=A(e.gs1syntax,e.ai),st=void 0!==A(at,"ex");if(o[i++]=at,o[i++]="ex",st){var ut=o[--i];k(A(o[--i],ut),(function(){if(e.patt=o[--i],o[i++]=e.patt,o[i++]=e.ai,e.aiexists(),o[--i]){var t=c(e.ai.length+e.patt.length+36);y(t,0,"AIs ("),y(t,5,e.ai),y(t,5+e.ai.length,") and ("),y(t,12+e.ai.length,e.patt),y(t,12+e.ai.length+e.patt.length,") are mutually exclusive"),o[i++]="bwipp.GS1exclusiveAIs#3244",o[i++]=t,z()}}))}else i-=2;if(e.lintreqs){var ct=A(e.gs1syntax,e.ai),lt=void 0!==A(ct,"req");if(o[i++]=ct,o[i++]="req",lt){var ht=o[--i];k(A(o[--i],ht),(function(){var t=o[--i];if(o[i++]=!1,k(t,(function(){o[i++]=e.ai,e.aiexists(),o[--i]&&(i--,o[i++]=!0)})),P(o[--i])){var n=c(e.ai.length+47);y(n,0,"One of more requisite AIs for AI ("),y(n,34,e.ai),y(n,34+e.ai.length,") are missing"),o[i++]="bwipp.GS1missingAIs#3261",o[i++]=n,z()}}))}else i-=2}}}o[i++]=e.ais,o[i++]=e.vals,o[i++]=e.fncs}function Q(){if(!a.bwipjs_dontdraw){var e=Object.create(Q.$ctx||(Q.$ctx={}));e.width=1,e.height=1,e.barcolor="unset",e.backgroundcolor="unset",e.colormap="unset",e.dotty=!1,e.inkspread=0,e.inkspreadh=0,e.inkspreadv=0,e.includetext=!1,e.txt=s([]),e.textcolor="unset",e.textxalign="unset",e.textyalign="unset",e.textfont="OCR-B",e.textsize=10,e.textxoffset=0,e.textyoffset=0,e.textgaps=0,e.alttext="",k(o[--i],(function(){var t=o[--i];e[o[--i]]=t})),o[i++]=e.opt,delete e.opt,o[i++]=e,U(),i--,0!=e.inkspread&&(e.inkspreadh=e.inkspread),0!=e.inkspread&&(e.inkspreadv=e.inkspread),e.xyget=function(){var t=o[--i],n=A(e.pixs,L(o[--i]+t*e.pixx));o[i++]=n},e.cget=function(){var t=o[--i],n=A(e.cache,L(o[--i]+t*e.pixx)),r=o[--i];o[i++]=N(r,n)},e.cput=function(){var t=o[--i];if(o[i++]=t,t%4==0){var n=o[--i],r=o[--i],a=o[--i],s=e.pixx,u=e.cache;v(u,L(a+r*s),F(A(u,L(a+r*s)),n))}else i-=3},e.abcd=function(){o[i++]=c(4),o[i++]=0,o[i++]=1/0;var t=o[--i],n=o[--i],r=o[--i],a=o[--i],u=L(o[--i]+a*e.pixx);o[i++]=r,o[i++]=n,o[i++]=t,o[i++]=u,_(b(e.pixs,u,2));var l=o[--i],h=o[--i],f=b(e.pixs,L(o[--i]+e.pixx),2);o[i++]=h,o[i++]=l,_(f);for(var d=s(),p=0,m=d.length;p<m;p++){var g=o[--i],y=o[--i];v(y,g,L(A(d,p)+48)),o[i++]=y,o[i++]=L(g+1)}i--},e.right=function(){1!=e.dir&&(o[i++]=e.x,o[i++]=e.y,o[i++]=e.dir,e.cput(),o[i++]=s([e.x,e.y])),e.x=e.x+1,e.dir=1},e.down=function(){2!=e.dir&&(o[i++]=e.x,o[i++]=e.y,o[i++]=e.dir,e.cput(),o[i++]=s([e.x,e.y])),e.y=e.y+1,e.dir=2},e.left=function(){4!=e.dir&&(o[i++]=e.x,o[i++]=e.y,o[i++]=e.dir,e.cput(),o[i++]=s([e.x,e.y])),e.x=e.x-1,e.dir=4},e.up=function(){8!=e.dir&&(o[i++]=e.x,o[i++]=e.y,o[i++]=e.dir,e.cput(),o[i++]=s([e.x,e.y])),e.y=e.y-1,e.dir=8},e.trace=function(){e.y=o[--i],e.x=o[--i],o[i++]="dir",o[i++]=L(e.x+1),o[i++]=L(e.y+1),e.xyget();var t=1==o[--i]?8:4;for(e[o[--i]]=t,e.sx=e.x,e.sy=e.y,e.sdir=e.dir,o[i++]=1/0;;){o[i++]=e.x,o[i++]=e.y,e.abcd();for(var n=0;n<1;n++){var r=o[--i];if(o[i++]=r,T(r,"0001")||T(r,"0011")||T(r,"1011")){i--,e.right();break}var a=o[--i];if(o[i++]=a,T(a,"0010")||T(a,"1010")||T(a,"1110")){i--,e.down();break}var u=o[--i];if(o[i++]=u,T(u,"1000")||T(u,"1100")||T(u,"1101")){i--,e.left();break}var c=o[--i];if(o[i++]=c,T(c,"0100")||T(c,"0101")||T(c,"0111")){i--,e.up();break}var l=o[--i];if(o[i++]=l,T(l,"1001")){if(2==e.dir){i--,e.left();break}i--,e.right();break}if(1==e.dir){i--,e.down();break}i--,e.up();break}if(T(e.x,e.sx)&&T(e.y,e.sy)&&e.dir==e.sdir)break}O(s(S()));var h=o[--i],f=o[--i];o[i++]=h,o[i++]=f,i--},e.drawlayer=function(){e.pixsorig=e.pixs,e.pixs=o[--i],o[i++]=1/0;for(var t=0,n=e.pixx+2;t<n;t++)o[i++]=0;for(var a=0,u=e.pixx,c=e.pixs.length-1;u<0?a>=c:a<=c;a+=u)o[i++]=0,_(b(e.pixs,a,e.pixx)),o[i++]=0;for(var l=0,h=e.pixx+2;l<h;l++)o[i++]=0;e.pixs=s(),e.pixx=e.pixx+2,e.pixy=e.pixy+2,o[i++]=1/0;for(var f=0,d=e.pixs.length;f<d;f++)o[i++]=0;e.cache=s(),o[i++]=1/0;for(var p=0,m=e.pixy-2;p<=m;p+=1){e.j=p;for(var g=0,v=e.pixx-2;g<=v;g+=1){e.i=g,o[i++]="k",o[i++]=e.i,o[i++]=e.j,e.abcd();var y=o[--i];e[o[--i]]=y,(T(e.k,"0001")||T(e.k,"1001"))&&(o[i++]=8,o[i++]=e.i,o[i++]=e.j,e.cget(),0==o[--i]&&(o[i++]=e.i,o[i++]=e.j,e.trace())),T(e.k,"1110")&&(o[i++]=4,o[i++]=e.i,o[i++]=e.j,e.cget(),0==o[--i]&&(o[i++]=e.i,o[i++]=e.j,e.trace()))}}e.paths=s(),e.pixx=e.pixx-2,e.pixy=e.pixy-2,r.newpath();for(var w=e.paths,x=0,C=w.length;x<C;x++){e.p=A(w,x),e.len=e.p.length,_(A(e.p,e.len-1)),_(A(e.p,0));for(var k=0,E=e.len-1;k<=E;k+=1){e.i=k,_(A(e.p,(e.i+1)%e.len));var S=o[--i],O=o[--i],D=o[--i],I=o[--i],j=o[--i],N=o[--i];if(o[i++]=I,o[i++]=D,o[i++]=O,o[i++]=S,o[i++]=N,o[i++]=I,o[i++]=e.inkspreadh,B(S,j)){var F=o[--i],R=o[--i];o[i++]=L(R+F)}else{var P=o[--i],U=o[--i];o[i++]=L(U-P)}var z=o[--i],H=o[--i],$=o[--i],Q=o[--i],V=o[--i];if(o[i++]=V,o[i++]=z,o[i++]=Q,o[i++]=$,o[i++]=V,o[i++]=e.inkspreadv,M(Q,H)){var q=o[--i],G=o[--i];o[i++]=L(G+q)}else{var W=o[--i],K=o[--i];o[i++]=L(K-W)}var Y=o[--i],X=o[--i],J=o[--i],Z=o[--i];if(o[i++]=J,o[i++]=X,o[i++]=Z,o[i++]=L(e.pixy-Y),0==e.i){var ee=o[--i];r.moveto(o[--i],ee)}else{var te=o[--i];r.lineto(o[--i],te)}}r.closepath(),i-=4}r.fill(),e.pixs=e.pixsorig},e.drawlayerdots=function(){e.pixsorig=e.pixs,e.pixs=o[--i],r.newpath();for(var t=0,n=e.pixs.length-1;t<=n;t+=1)e.x=t%e.pixx,e.y=~~(t/e.pixx),o[i++]=e.x,o[i++]=e.y,e.xyget(),1==o[--i]&&(r.moveto(L(e.x+.5),L(e.pixy-e.y-.5)),r.arc(L(e.x+.5),L(e.pixy-e.y-.5),L(.5-e.inkspread),0,360,1));r.fill(),e.pixs=e.pixsorig},r.save(),e.inkspread=e.inkspread/2,e.inkspreadh=e.inkspreadh/2,e.inkspreadv=e.inkspreadv/2;var t=r.currpos();if(r.translate(t.x,t.y),r.scale(e.width/e.pixx*72,e.height/e.pixy*72),r.moveto(0,0),r.lineto(e.pixx,0),r.lineto(e.pixx,e.pixy),r.lineto(0,e.pixy),r.closepath(),T(e.colormap,"unset")){var n=new Map([[1,e.barcolor]]);e.colormap=n}for(var u=e.colormap,l=u.size,h=u.keys(),f=0;f<l;f++){var d=h.next().value;r.setcolor(u.get(d)),e.key=d,o[i++]=1/0;for(var p=e.pixs,m=0,g=p.length;m<g;m++){var y=T(A(p,m),e.key)?1:0;o[i++]=y}var w=s();o[i++]=w,e.dotty?e.drawlayerdots():e.drawlayer()}if(D(e.textcolor,"unset")&&r.setcolor(e.textcolor),e.includetext)if(T(e.textxalign,"unset")&&T(e.textyalign,"unset")&&T(e.alttext,"")){e.s=0,e.fn="";for(var x=e.txt,C=0,E=x.length;C<E;C++){k(A(x,C));var I=o[--i],j=o[--i];if(o[i++]=j,o[i++]=I,I!=e.s||D(j,e.fn)){var R=o[--i],P=o[--i];e.s=R,e.fn=P,r.selectfont(P,R)}else i-=2;var z=o[--i];r.moveto(o[--i],z),r.show(o[--i],0,0)}}else{if(r.selectfont(e.textfont,e.textsize),T(e.alttext,"")){o[i++]=1/0;for(var H=e.txt,$=0,V=H.length;$<V;$++)k(A(A(H,$),0));e.txt=s(),e.tstr=c(e.txt.length);for(var q=0,G=e.txt.length-1;q<=G;q+=1)v(e.tstr,q,A(e.txt,q))}else e.tstr=e.alttext;if(0==e.tstr.length)o[i++]=0;else{r.save(),r.newpath(),r.moveto(0,0),r.charpath("0",!1);var W=r.pathbbox();r.restore(),o[i++]=W.ury}e.textascent=o[--i];var K=r.stringwidth(e.tstr);e.textwidth=L(K.w+(e.tstr.length-1)*e.textgaps),e.textxpos=L(e.textxoffset+L(e.pixx-e.textwidth)/2),T(e.textxalign,"left")&&(e.textxpos=e.textxoffset),T(e.textxalign,"right")&&(e.textxpos=L(e.pixx-e.textxoffset-e.textwidth)),T(e.textxalign,"offleft")&&(e.textxpos=-L(e.textwidth+e.textxoffset)),T(e.textxalign,"offright")&&(e.textxpos=e.pixx+e.textxoffset),T(e.textxalign,"justify")&&e.textwidth<e.pixx&&(e.textxpos=0,e.textgaps=L(e.pixx-e.textwidth)/(e.tstr.length-1)),e.textypos=-L(L(e.textyoffset+e.textascent)+1),T(e.textyalign,"above")&&(e.textypos=e.textyoffset+e.pixy+1),T(e.textyalign,"center")&&(e.textypos=L(e.textyoffset+L(e.pixy-e.textascent)/2)),r.moveto(e.textxpos,e.textypos),r.show(e.tstr,e.textgaps,0)}r.restore()}}function V(){var e=Object.create(V.$ctx||(V.$ctx={}));e.dontdraw=!1,e.includetext=!1,e.textfont="OCR-B",e.textsize=12,e.textxoffset=0,e.textyoffset=null,e.height=.7,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],T(e.textyoffset,null)&&(e.textyoffset=L(72*e.height+1)),5!=e.barcode.length&&(o[i++]="bwipp.ean5badLength#3932",o[i++]="EAN-5 add-on must be 5 digits",z()),k(e.barcode,(function(){var e=o[--i];(e<48||e>57)&&(o[i++]="bwipp.ean5badCharacter#3936",o[i++]="EAN-5 add-on must contain only digits",z())})),V.$ctx._3956||function(){var t=Object.create(e);for(var n in t.encs=s(["3211","2221","2122","1411","1132","1231","1114","1312","1213","3112","112","11"]),t.barchars="0123456789",t.mirrormaps=s(["11000","10100","10010","10001","01100","00110","00011","01010","01001","00101"]),t)t.hasOwnProperty(n)&&(V.$ctx[n]=t[n]);V.$ctx._3956=1}(),e.checksum=0;for(var t=0;t<=4;t+=1)e.i=t,e.barchar=L(A(e.barcode,e.i)-48),e.i%2==0?e.checksum=L(3*e.barchar+e.checksum):e.checksum=L(9*e.barchar+e.checksum);e.checksum=e.checksum%10,e.mirrormap=A(e.mirrormaps,e.checksum),e.sbs=c(31),e.txt=s(5);for(var n=0;n<=4;n+=1){if(e.i=n,0==e.i?y(e.sbs,0,A(e.encs,10)):y(e.sbs,6*(e.i-1)+7,A(e.encs,11)),C(e.barchars,b(e.barcode,e.i,1)),i--,e.indx=o[--i].length,i-=2,e.enc=A(e.encs,e.indx),49==A(e.mirrormap,e.i)){e.enclen=e.enc.length,e.revenc=c(e.enclen);for(var r=0,a=e.enclen-1;r<=a;r+=1)e.j=r,e.char=A(e.enc,e.j),v(e.revenc,e.enclen-e.j-1,e.char);e.enc=e.revenc}y(e.sbs,6*e.i+3,e.enc),v(e.txt,e.i,s([b(e.barcode,e.i,1),9*(e.i-1)+13+e.textxoffset,e.textyoffset,e.textfont,e.textsize]))}o[i++]=1/0,o[i++]=1/0;for(var l=e.sbs,h=0,f=l.length;h<f;h++)o[i++]=A(l,h)-48;var d=s();o[i++]=1/0;for(var p=0;p<16;p++)o[i++]=e.height;var m=s();o[i++]=1/0;for(var g=0;g<16;g++)o[i++]=0;var w=s();o[i++]="ren",o[i++]=Wt,o[i++]="sbs",o[i++]=d,o[i++]="bhs",o[i++]=m,o[i++]="bbs",o[i++]=w,e.includetext&&(o[i++]="txt",o[i++]=e.txt),o[i++]="opt",o[i++]=e.options,o[i++]="guardrightpos",o[i++]=10,o[i++]="guardrightypos",o[i++]=L(e.textyoffset+4),o[i++]="bordertop",o[i++]=10;var x=u();o[i++]=x,e.dontdraw||Wt()}function q(){var e=Object.create(q.$ctx||(q.$ctx={}));e.dontdraw=!1,e.includetext=!1,e.textfont="OCR-B",e.textsize=12,e.textxoffset=0,e.textyoffset=null,e.height=.7,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],T(e.textyoffset,null)&&(e.textyoffset=L(72*e.height+1)),2!=e.barcode.length&&(o[i++]="bwipp.ean2badLength#4075",o[i++]="EAN-2 add-on must be 2 digits",z()),k(e.barcode,(function(){var e=o[--i];(e<48||e>57)&&(o[i++]="bwipp.ean2badCharacter#4079",o[i++]="EAN-2 add-on must contain only digits",z())})),q.$ctx._4096||function(){var t=Object.create(e);for(var n in t.encs=s(["3211","2221","2122","1411","1132","1231","1114","1312","1213","3112","112","11"]),t.barchars="0123456789",t.mirrormaps=s(["00","01","10","11"]),t)t.hasOwnProperty(n)&&(q.$ctx[n]=t[n]);q.$ctx._4096=1}(),e.mirrormap=A(e.mirrormaps,p(b(e.barcode,0,2))%4),e.sbs=c(13),e.txt=s(2);for(var t=0;t<=1;t+=1){if(e.i=t,0==e.i?y(e.sbs,0,A(e.encs,10)):y(e.sbs,6*(e.i-1)+7,A(e.encs,11)),C(e.barchars,b(e.barcode,e.i,1)),i--,e.indx=o[--i].length,i-=2,e.enc=A(e.encs,e.indx),49==A(e.mirrormap,e.i)){e.enclen=e.enc.length,e.revenc=c(e.enclen);for(var n=0,r=e.enclen-1;n<=r;n+=1)e.j=n,e.char=A(e.enc,e.j),v(e.revenc,e.enclen-e.j-1,e.char);e.enc=e.revenc}y(e.sbs,6*e.i+3,e.enc),v(e.txt,e.i,s([b(e.barcode,e.i,1),9*(e.i-1)+13+e.textxoffset,e.textyoffset,e.textfont,e.textsize]))}o[i++]=1/0,o[i++]=1/0;for(var a=e.sbs,l=0,h=a.length;l<h;l++)o[i++]=A(a,l)-48;var f=s();o[i++]=1/0;for(var d=0;d<12;d++)o[i++]=e.height;var m=s();o[i++]=1/0;for(var g=0;g<12;g++)o[i++]=0;var w=s();o[i++]="ren",o[i++]=Wt,o[i++]="sbs",o[i++]=f,o[i++]="bhs",o[i++]=m,o[i++]="bbs",o[i++]=w,e.includetext&&(o[i++]="txt",o[i++]=e.txt),o[i++]="opt",o[i++]=e.options,o[i++]="guardrightpos",o[i++]=10,o[i++]="guardrightypos",o[i++]=L(e.textyoffset+4),o[i++]="bordertop",o[i++]=10;var x=u();o[i++]=x,e.dontdraw||Wt()}function G(){var e=Object.create(G.$ctx||(G.$ctx={}));e.dontdraw=!1,e.includetext=!1,e.textfont="OCR-B",e.textsize=12,e.textxoffset=-10,e.textyoffset=-4,e.height=1,e.addongap=12,e.addontextfont="unset",e.addontextsize=null,e.addontextxoffset=null,e.addontextyoffset=null,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],C(e.barcode," "),o[--i]?(e.barcode=o[--i],i--,e.addon=o[--i]):(i--,e.addon=""),12!=e.barcode.length&&13!=e.barcode.length&&(o[i++]="bwipp.ean13badLength#4217",o[i++]="EAN-13 must be 12 or 13 digits",z()),k(e.barcode,(function(){var e=o[--i];(e<48||e>57)&&(o[i++]="bwipp.ean13badCharacter#4221",o[i++]="EAN-13 must contain only digits",z())})),0!=e.addon.length&&2!=e.addon.length&&5!=e.addon.length&&(o[i++]="bwipp.ean13badAddOnLength#4225",o[i++]="Add-on for EAN-13 must be 2 or 5 digits",z()),e.pad=c(13),e.checksum=0;for(var t=0;t<=11;t+=1)e.i=t,e.barchar=L(A(e.barcode,e.i)-48),e.i%2==0?e.checksum=L(e.barchar+e.checksum):e.checksum=L(3*e.barchar+e.checksum);e.checksum=L(10-e.checksum%10)%10,13==e.barcode.length&&A(e.barcode,12)!=L(e.checksum+48)&&(o[i++]="bwipp.ean13badCheckDigit#4243",o[i++]="Incorrect EAN-13 check digit provided",z()),y(e.pad,0,e.barcode),v(e.pad,12,L(e.checksum+48)),e.barcode=e.pad,G.$ctx._4266||function(){var t=Object.create(e);for(var n in t.encs=s(["3211","2221","2122","1411","1132","1231","1114","1312","1213","3112","111","11111","111"]),t.barchars="0123456789",t.mirrormaps=s(["000000","001011","001101","001110","010011","011001","011100","010101","010110","011010"]),t)t.hasOwnProperty(n)&&(G.$ctx[n]=t[n]);G.$ctx._4266=1}(),e.sbs=c(59),e.txt=s(13),y(e.sbs,0,A(e.encs,10)),e.mirrormap=A(e.mirrormaps,A(e.barcode,0)-48),v(e.txt,0,s([b(e.barcode,0,1),e.textxoffset,e.textyoffset,e.textfont,e.textsize]));for(var n=1;n<=6;n+=1){if(e.i=n,C(e.barchars,b(e.barcode,e.i,1)),i--,e.indx=o[--i].length,i-=2,e.enc=A(e.encs,e.indx),49==A(e.mirrormap,e.i-1)){e.enclen=e.enc.length,e.revenc=c(e.enclen);for(var r=0,a=e.enclen-1;r<=a;r+=1)e.j=r,e.char=A(e.enc,e.j),v(e.revenc,e.enclen-e.j-1,e.char);e.enc=e.revenc}y(e.sbs,4*(e.i-1)+3,e.enc),v(e.txt,e.i,s([b(e.barcode,e.i,1),7*(e.i-1)+14+e.textxoffset,e.textyoffset,e.textfont,e.textsize]))}y(e.sbs,27,A(e.encs,11));for(var l=7;l<=12;l+=1)e.i=l,C(e.barchars,b(e.barcode,e.i,1)),i--,e.indx=o[--i].length,i-=2,e.enc=A(e.encs,e.indx),y(e.sbs,4*(e.i-1)+8,e.enc),v(e.txt,e.i,s([b(e.barcode,e.i,1),7*(e.i-1)+18+e.textxoffset,e.textyoffset,e.textfont,e.textsize]));y(e.sbs,56,A(e.encs,12)),o[i++]=1/0;for(var h=e.sbs,f=0,d=h.length;f<d;f++)o[i++]=A(h,f)-48;if(e.sbs=s(),e.includetext){o[i++]=1/0,o[i++]=e.height,o[i++]=e.height;for(var p=0;p<12;p++)o[i++]=L(e.height-.075);o[i++]=e.height,o[i++]=e.height;for(var m=0;m<12;m++)o[i++]=L(e.height-.075);o[i++]=e.height,o[i++]=e.height,e.bhs=s(),o[i++]=1/0,o[i++]=0,o[i++]=0;for(var g=0;g<12;g++)o[i++]=.075;o[i++]=0,o[i++]=0;for(var w=0;w<12;w++)o[i++]=.075;o[i++]=0,o[i++]=0,e.bbs=s()}else{o[i++]=1/0;for(var x=0;x<30;x++)o[i++]=e.height;e.bhs=s(),o[i++]=1/0;for(var E=0;E<30;E++)o[i++]=0;e.bbs=s(),e.txt=s([])}if(e.guardrightypos=0,D(e.addon,"")){o[i++]=1/0,o[i++]="dontdraw",o[i++]=!0,o[i++]="includetext",o[i++]=!0,o[i++]="height",o[i++]=L(e.height-.15),o[i++]="textxoffset",D(e.addontextxoffset,null)?o[i++]=e.addontextxoffset:o[i++]=95+e.addongap,D(e.addontextyoffset,null)&&(o[i++]="textyoffset",o[i++]=e.addontextyoffset),o[i++]="textsize",D(e.addontextsize,null)?o[i++]=e.addontextsize:o[i++]=e.textsize;var S=D(e.addontextfont,"unset")?e.addontextfont:e.textfont;o[i++]="textfont",o[i++]=S,e.addopts=u(),2==e.addon.length&&(o[i++]=e.addon,o[i++]=e.addopts,q()),5==e.addon.length&&(o[i++]=e.addon,o[i++]=e.addopts,V()),e.addcode=o[--i],o[i++]=1/0,_(e.sbs),o[i++]=e.addongap,_(A(e.addcode,"sbs")),e.sbs=s(),o[i++]=1/0,_(e.bhs),k(A(e.addcode,"bhs"),(function(){var e=o[--i];o[i++]=L(e-.075)})),e.bhs=s(),o[i++]=1/0,_(e.bbs),k(A(e.addcode,"bbs"),(function(){var e=o[--i];o[i++]=L(e+.075)})),e.bbs=s(),o[i++]=1/0,_(e.txt),_(A(e.addcode,"txt")),e.txt=s(),e.guardrightypos=72*e.height-6}var O=new Map([["ren",Wt],["sbs",e.sbs],["bhs",e.bhs],["bbs",e.bbs],["txt",e.txt],["opt",e.options],["guardrightpos",10],["guardrightypos",e.guardrightypos],["borderbottom",5]]);o[i++]=O,e.dontdraw||Wt()}function W(){var e=Object.create(W.$ctx||(W.$ctx={}));e.dontdraw=!1,e.includetext=!1,e.textfont="OCR-B",e.textsize=12,e.textxoffset=4,e.textyoffset=-4,e.height=1,e.addongap=12,e.addontextfont="unset",e.addontextsize=null,e.addontextxoffset=null,e.addontextyoffset=null,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],C(e.barcode," "),o[--i]?(e.barcode=o[--i],i--,e.addon=o[--i]):(i--,e.addon=""),7!=e.barcode.length&&8!=e.barcode.length&&(o[i++]="bwipp.ean8badLength#4434",o[i++]="EAN-8 must be 7 or 8 digits",z()),k(e.barcode,(function(){var e=o[--i];(e<48||e>57)&&(o[i++]="bwipp.ean8badCharacter#4438",o[i++]="EAN-8 must contain only digits",z())})),0!=e.addon.length&&2!=e.addon.length&&5!=e.addon.length&&(o[i++]="bwipp.ean8badAddOnLength#4442",o[i++]="Add-on for EAN-8 must be 2 or 5 digits",z()),e.pad=c(8),e.checksum=0;for(var t=0;t<=6;t+=1)e.i=t,e.barchar=L(A(e.barcode,e.i)-48),e.i%2!=0?e.checksum=L(e.barchar+e.checksum):e.checksum=L(3*e.barchar+e.checksum);e.checksum=L(10-e.checksum%10)%10,8==e.barcode.length&&A(e.barcode,7)!=L(e.checksum+48)&&(o[i++]="bwipp.ean8badCheckDigit#4460",o[i++]="Incorrect EAN-8 check digit provided",z()),y(e.pad,0,e.barcode),v(e.pad,7,L(e.checksum+48)),e.barcode=e.pad,W.$ctx._4477||function(){var t=Object.create(e);for(var n in t.encs=s(["3211","2221","2122","1411","1132","1231","1114","1312","1213","3112","111","11111","111"]),t.barchars="0123456789",t)t.hasOwnProperty(n)&&(W.$ctx[n]=t[n]);W.$ctx._4477=1}(),e.sbs=c(43),e.txt=s(8),y(e.sbs,0,A(e.encs,10));for(var n=0;n<=3;n+=1)e.i=n,C(e.barchars,b(e.barcode,e.i,1)),i--,e.indx=o[--i].length,i-=2,e.enc=A(e.encs,e.indx),y(e.sbs,4*e.i+3,e.enc),v(e.txt,e.i,s([b(e.barcode,e.i,1),7*e.i+e.textxoffset,e.textyoffset,e.textfont,e.textsize]));y(e.sbs,19,A(e.encs,11));for(var r=4;r<=7;r+=1)e.i=r,C(e.barchars,b(e.barcode,e.i,1)),i--,e.indx=o[--i].length,i-=2,e.enc=A(e.encs,e.indx),y(e.sbs,4*e.i+8,e.enc),v(e.txt,e.i,s([b(e.barcode,e.i,1),7*e.i+e.textxoffset+4,e.textyoffset,e.textfont,e.textsize]));y(e.sbs,40,A(e.encs,12)),o[i++]=1/0;for(var a=e.sbs,l=0,h=a.length;l<h;l++)o[i++]=A(a,l)-48;if(e.sbs=s(),e.includetext){o[i++]=1/0,o[i++]=e.height,o[i++]=e.height;for(var f=0;f<8;f++)o[i++]=L(e.height-.075);o[i++]=e.height,o[i++]=e.height;for(var d=0;d<8;d++)o[i++]=L(e.height-.075);o[i++]=e.height,o[i++]=e.height,e.bhs=s(),o[i++]=1/0,o[i++]=0,o[i++]=0;for(var p=0;p<8;p++)o[i++]=.075;o[i++]=0,o[i++]=0;for(var m=0;m<8;m++)o[i++]=.075;o[i++]=0,o[i++]=0,e.bbs=s()}else{o[i++]=1/0;for(var g=0;g<22;g++)o[i++]=e.height;e.bhs=s(),o[i++]=1/0;for(var w=0;w<22;w++)o[i++]=0;e.bbs=s(),e.txt=s([])}if(e.guardrightypos=0,D(e.addon,"")){o[i++]=1/0,o[i++]="dontdraw",o[i++]=!0,o[i++]="includetext",o[i++]=!0,o[i++]="height",o[i++]=L(e.height-.15),o[i++]="textxoffset",D(e.addontextxoffset,null)?o[i++]=e.addontextxoffset:o[i++]=67+e.addongap,D(e.addontextyoffset,null)&&(o[i++]="textyoffset",o[i++]=e.addontextyoffset),o[i++]="textsize",D(e.addontextsize,null)?o[i++]=e.addontextsize:o[i++]=e.textsize;var x=D(e.addontextfont,"unset")?e.addontextfont:e.textfont;o[i++]="textfont",o[i++]=x,e.addopts=u(),2==e.addon.length&&(o[i++]=e.addon,o[i++]=e.addopts,q()),5==e.addon.length&&(o[i++]=e.addon,o[i++]=e.addopts,V()),e.addcode=o[--i],o[i++]=1/0,_(e.sbs),o[i++]=e.addongap,_(A(e.addcode,"sbs")),e.sbs=s(),o[i++]=1/0,_(e.bhs),k(A(e.addcode,"bhs"),(function(){var e=o[--i];o[i++]=L(e-.075)})),e.bhs=s(),o[i++]=1/0,_(e.bbs),k(A(e.addcode,"bbs"),(function(){var e=o[--i];o[i++]=L(e+.075)})),e.bbs=s(),o[i++]=1/0,_(e.txt),_(A(e.addcode,"txt")),e.txt=s(),e.guardrightypos=72*e.height-6}var E=new Map([["ren",Wt],["sbs",e.sbs],["bhs",e.bhs],["bbs",e.bbs],["txt",e.txt],["opt",e.options],["guardleftpos",10],["guardrightpos",10],["guardrightypos",e.guardrightypos],["borderbottom",5]]);o[i++]=E,e.dontdraw||Wt()}function K(){var e=Object.create(K.$ctx||(K.$ctx={}));if(e.dontdraw=!1,e.includetext=!1,e.textfont="OCR-B",e.textsize=12,e.textxoffset=-7,e.textyoffset=-4,e.height=1,e.addongap=12,e.addontextfont="unset",e.addontextsize=null,e.addontextxoffset=null,e.addontextyoffset=null,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],C(e.barcode," "),o[--i]?(e.barcode=o[--i],i--,e.addon=o[--i]):(i--,e.addon=""),7==e.barcode.length||8==e.barcode.length){k(e.barcode,(function(){var e=o[--i];(e<48||e>57)&&(o[i++]="bwipp.upcAupcEbadCharacter#4635",o[i++]="UPC-E must contain only digits",z())}));var t=A(e.barcode,0);48!=t&&49!=t&&(o[i++]="bwipp.upcAupcEbadNumberSystem#4639",o[i++]="UPC-E must have number system 0 or 1",z());for(var n=0;n<1;n++){var r=8==e.barcode.length?12:11;if(e.upcacode=c(r),L(A(e.barcode,6)-48)<=2){y(e.upcacode,0,b(e.barcode,0,3)),y(e.upcacode,3,b(e.barcode,6,1)),y(e.upcacode,4,"0000"),y(e.upcacode,8,b(e.barcode,3,3));break}if(3==L(A(e.barcode,6)-48)){y(e.upcacode,0,b(e.barcode,0,4)),y(e.upcacode,4,"00000"),y(e.upcacode,9,b(e.barcode,4,2));break}if(4==L(A(e.barcode,6)-48)){y(e.upcacode,0,b(e.barcode,0,5)),y(e.upcacode,5,"00000"),y(e.upcacode,10,b(e.barcode,5,1));break}if(L(A(e.barcode,6)-48)>=5){y(e.upcacode,0,b(e.barcode,0,6)),y(e.upcacode,6,"0000"),y(e.upcacode,10,b(e.barcode,6,1));break}}8==e.barcode.length&&y(e.upcacode,11,b(e.barcode,7,1)),e.barcode=e.upcacode}11!=e.barcode.length&&12!=e.barcode.length&&(o[i++]="bwipp.upcAbadLength#4677",o[i++]="UPC-A must be 11 or 12 digits",z());for(var a=e.barcode,l=0,h=a.length;l<h;l++){var f=A(a,l);(f<48||f>57)&&(o[i++]="bwipp.upcAbadCharacter#4681",o[i++]="UPC-A must contain only digits",z())}0!=e.addon.length&&2!=e.addon.length&&5!=e.addon.length&&(o[i++]="bwipp.upcAbadAddOnLength#4685",o[i++]="Add-on for UPC-A must be 2 or 5 digits",z()),e.pad=c(12),e.checksum=0;for(var d=0;d<=10;d+=1)e.i=d,e.barchar=A(e.barcode,e.i)-48,e.i%2!=0?e.checksum=e.checksum+e.barchar:e.checksum=e.checksum+3*e.barchar;e.checksum=(10-e.checksum%10)%10,12==e.barcode.length&&A(e.barcode,11)!=e.checksum+48&&(o[i++]="bwipp.upcAbadCheckDigit#4703",o[i++]="Incorrect UPC check digit provided",z()),y(e.pad,0,e.barcode),v(e.pad,11,e.checksum+48),e.barcode=e.pad,K.$ctx._4720||function(){var t=Object.create(e);for(var n in t.encs=s(["3211","2221","2122","1411","1132","1231","1114","1312","1213","3112","111","11111","111"]),t.barchars="0123456789",t)t.hasOwnProperty(n)&&(K.$ctx[n]=t[n]);K.$ctx._4720=1}(),e.sbs=c(59),e.txt=s(12),y(e.sbs,0,A(e.encs,10));for(var p=0;p<=5;p+=1)e.i=p,C(e.barchars,b(e.barcode,e.i,1)),i--,e.indx=o[--i].length,i-=2,e.enc=A(e.encs,e.indx),y(e.sbs,4*e.i+3,e.enc),0==e.i?v(e.txt,0,s([b(e.barcode,0,1),e.textxoffset,e.textyoffset,e.textfont,e.textsize-2])):v(e.txt,e.i,s([b(e.barcode,e.i,1),7*e.i+11+e.textxoffset,e.textyoffset,e.textfont,e.textsize]));y(e.sbs,27,A(e.encs,11));for(var m=6;m<=11;m+=1)e.i=m,C(e.barchars,b(e.barcode,e.i,1)),i--,e.indx=o[--i].length,i-=2,e.enc=A(e.encs,e.indx),y(e.sbs,4*e.i+8,e.enc),11==e.i?v(e.txt,11,s([b(e.barcode,11,1),e.textxoffset+104,e.textyoffset,e.textfont,e.textsize-2])):v(e.txt,e.i,s([b(e.barcode,e.i,1),7*e.i+e.textxoffset+15,e.textyoffset,e.textfont,e.textsize]));y(e.sbs,56,A(e.encs,12)),o[i++]=1/0;for(var g=e.sbs,w=0,x=g.length;w<x;w++)o[i++]=A(g,w)-48;if(e.sbs=s(),e.includetext){o[i++]=1/0;for(var E=0;E<4;E++)o[i++]=e.height;for(var S=0;S<10;S++)o[i++]=L(e.height-.075);o[i++]=e.height,o[i++]=e.height;for(var O=0;O<10;O++)o[i++]=L(e.height-.075);for(var T=0;T<4;T++)o[i++]=e.height;e.bhs=s(),o[i++]=1/0,o[i++]=0,o[i++]=0,o[i++]=0,o[i++]=0;for(var B=0;B<10;B++)o[i++]=.075;o[i++]=0,o[i++]=0;for(var I=0;I<10;I++)o[i++]=.075;o[i++]=0,o[i++]=0,o[i++]=0,o[i++]=0,e.bbs=s()}else{o[i++]=1/0;for(var M=0;M<30;M++)o[i++]=e.height;e.bhs=s(),o[i++]=1/0;for(var j=0;j<30;j++)o[i++]=0;e.bbs=s(),e.txt=s([])}if(e.guardrightypos=0,D(e.addon,"")){o[i++]=1/0,o[i++]="dontdraw",o[i++]=!0,o[i++]="includetext",o[i++]=!0,o[i++]="height",o[i++]=L(e.height-.15),o[i++]="textxoffset",D(e.addontextxoffset,null)?o[i++]=e.addontextxoffset:o[i++]=95+e.addongap,D(e.addontextyoffset,null)&&(o[i++]="textyoffset",o[i++]=e.addontextyoffset),o[i++]="textsize",D(e.addontextsize,null)?o[i++]=e.addontextsize:o[i++]=e.textsize;var N=D(e.addontextfont,"unset")?e.addontextfont:e.textfont;o[i++]="textfont",o[i++]=N,e.addopts=u(),2==e.addon.length&&(o[i++]=e.addon,o[i++]=e.addopts,q()),5==e.addon.length&&(o[i++]=e.addon,o[i++]=e.addopts,V()),e.addcode=o[--i],o[i++]=1/0,_(e.sbs),o[i++]=e.addongap,_(A(e.addcode,"sbs")),e.sbs=s(),o[i++]=1/0,_(e.bhs),k(A(e.addcode,"bhs"),(function(){var e=o[--i];o[i++]=L(e-.075)})),e.bhs=s(),o[i++]=1/0,_(e.bbs),k(A(e.addcode,"bbs"),(function(){var e=o[--i];o[i++]=L(e+.075)})),e.bbs=s(),o[i++]=1/0,_(e.txt),_(A(e.addcode,"txt")),e.txt=s(),e.guardrightypos=72*e.height-6}var F=new Map([["ren",Wt],["sbs",e.sbs],["bhs",e.bhs],["bbs",e.bbs],["txt",e.txt],["opt",e.options],["guardrightpos",10],["guardrightypos",e.guardrightypos],["borderbottom",5]]);o[i++]=F,e.dontdraw||Wt()}function Y(){var e=Object.create(Y.$ctx||(Y.$ctx={}));if(e.dontdraw=!1,e.includetext=!1,e.textfont="OCR-B",e.textsize=12,e.textxoffset=-7,e.textyoffset=-4,e.height=1,e.addongap=12,e.addontextfont="unset",e.addontextsize=null,e.addontextxoffset=null,e.addontextyoffset=null,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],C(e.barcode," "),o[--i]?(e.barcode=o[--i],i--,e.addon=o[--i]):(i--,e.addon=""),11==e.barcode.length||12==e.barcode.length){k(e.barcode,(function(){var e=o[--i];(e<48||e>57)&&(o[i++]="bwipp.upcEupcAbadCharacter#4885",o[i++]="UPC-A must contain only digits",z())}));for(var t=0;t<1;t++){var n=12==e.barcode.length?8:7;if(e.upcecode=c(n),L(A(e.barcode,3)-48)<=2&&T(b(e.barcode,4,4),"0000")){y(e.upcecode,0,b(e.barcode,0,3)),y(e.upcecode,3,b(e.barcode,8,3)),y(e.upcecode,6,b(e.barcode,3,1));break}if(T(b(e.barcode,4,5),"00000")){y(e.upcecode,0,b(e.barcode,0,4)),y(e.upcecode,4,b(e.barcode,9,2)),y(e.upcecode,6,"3");break}if(T(b(e.barcode,5,5),"00000")){y(e.upcecode,0,b(e.barcode,0,5)),y(e.upcecode,5,b(e.barcode,10,1)),y(e.upcecode,6,"4");break}if(L(A(e.barcode,10)-48)>=5&&T(b(e.barcode,6,4),"0000")){y(e.upcecode,0,b(e.barcode,0,6)),y(e.upcecode,6,b(e.barcode,10,1));break}o[i++]="bwipp.upcEupcAnotCompressible#4913",o[i++]="UPC-A cannot be converted to a UPC-E",z()}12==e.barcode.length&&y(e.upcecode,7,b(e.barcode,11,1)),e.barcode=e.upcecode}7!=e.barcode.length&&8!=e.barcode.length&&(o[i++]="bwipp.upcEbadLength#4923",o[i++]="UPC-E must be 7 or 8 digits",z());for(var r=e.barcode,a=0,l=r.length;a<l;a++){var h=A(r,a);(h<48||h>57)&&(o[i++]="bwipp.upcEbadCharacter#4927",o[i++]="UPC-E must contain only digits",z())}0!=e.addon.length&&2!=e.addon.length&&5!=e.addon.length&&(o[i++]="bwipp.upcEbadAddOnLength#4931",o[i++]="Add-on for UPC-E must be 2 or 5 digits",z());var f=A(e.barcode,0);48!=f&&49!=f&&(o[i++]="bwipp.upcEbadNumberSystem#4936",o[i++]="UPC-E must have number system 0 or 1",z()),Y.$ctx._4954||function(){var t=Object.create(e);for(var n in t.encs=s(["3211","2221","2122","1411","1132","1231","1114","1312","1213","3112","111","111111"]),t.barchars="0123456789",t.mirrormaps=s(["000111","001011","001101","001110","010011","011001","011100","010101","010110","011010"]),t)t.hasOwnProperty(n)&&(Y.$ctx[n]=t[n]);Y.$ctx._4954=1}();for(var d=0;d<1;d++){if(e.upcacode=c(11),A(e.barcode,6)-48<=2){y(e.upcacode,0,b(e.barcode,0,3)),y(e.upcacode,3,b(e.barcode,6,1)),y(e.upcacode,4,"0000"),y(e.upcacode,8,b(e.barcode,3,3));break}if(A(e.barcode,6)-48==3){y(e.upcacode,0,b(e.barcode,0,4)),y(e.upcacode,4,"00000"),y(e.upcacode,9,b(e.barcode,4,2));break}if(A(e.barcode,6)-48==4){y(e.upcacode,0,b(e.barcode,0,5)),y(e.upcacode,5,"00000"),y(e.upcacode,10,b(e.barcode,5,1));break}if(A(e.barcode,6)-48>=5){y(e.upcacode,0,b(e.barcode,0,6)),y(e.upcacode,6,"0000"),y(e.upcacode,10,b(e.barcode,6,1));break}}e.checksum=0;for(var p=0;p<=10;p+=1)e.i=p,e.barchar=A(e.upcacode,e.i)-48,e.i%2!=0?e.checksum=e.checksum+e.barchar:e.checksum=e.checksum+3*e.barchar;if(e.checksum=(10-e.checksum%10)%10,8==e.barcode.length&&A(e.barcode,7)!=e.checksum+48&&(o[i++]="bwipp.upcEbadCheckDigit#4998",o[i++]="Incorrect UPC check digit provided",z()),e.pad=c(8),y(e.pad,0,e.barcode),v(e.pad,7,e.checksum+48),e.barcode=e.pad,e.txt=s(8),v(e.txt,0,s([b(e.barcode,0,1),e.textxoffset,e.textyoffset,e.textfont,e.textsize-2])),e.mirrormap=A(e.mirrormaps,e.checksum),48==A(e.barcode,0)){e.invt=c(e.mirrormap.length);for(var m=0,g=e.mirrormap.length-1;m<=g;m+=1)e.i=m,48==A(e.mirrormap,e.i)?v(e.invt,e.i,49):v(e.invt,e.i,48);e.mirrormap=e.invt}e.sbs=c(33),y(e.sbs,0,A(e.encs,10));for(var w=1;w<=6;w+=1){if(e.i=w,C(e.barchars,b(e.barcode,e.i,1)),i--,e.indx=o[--i].length,i-=2,e.enc=A(e.encs,e.indx),49==A(e.mirrormap,e.i-1)){e.enclen=e.enc.length,e.revenc=c(e.enclen);for(var x=0,E=e.enclen-1;x<=E;x+=1)e.j=x,e.char=A(e.enc,e.j),v(e.revenc,e.enclen-e.j-1,e.char);e.enc=e.revenc}y(e.sbs,4*(e.i-1)+3,e.enc),v(e.txt,e.i,s([b(e.barcode,e.i,1),7*(e.i-1)+11+e.textxoffset,e.textyoffset,e.textfont,e.textsize]))}v(e.txt,7,s([b(e.barcode,7,1),60+e.textxoffset,e.textyoffset,e.textfont,e.textsize-2])),y(e.sbs,27,A(e.encs,11)),o[i++]=1/0;for(var S=e.sbs,O=0,B=S.length;O<B;O++)o[i++]=A(S,O)-48;if(e.sbs=s(),e.includetext){o[i++]=1/0,o[i++]=e.height,o[i++]=e.height;for(var I=0;I<12;I++)o[i++]=L(e.height-.075);o[i++]=e.height,o[i++]=e.height,o[i++]=e.height,e.bhs=s(),o[i++]=1/0,o[i++]=0,o[i++]=0;for(var M=0;M<12;M++)o[i++]=.075;o[i++]=0,o[i++]=0,o[i++]=0,e.bbs=s()}else{o[i++]=1/0;for(var j=0;j<17;j++)o[i++]=e.height;e.bhs=s(),o[i++]=1/0;for(var N=0;N<17;N++)o[i++]=0;e.bbs=s(),e.txt=s([])}if(e.guardrightypos=0,D(e.addon,"")){o[i++]=1/0,o[i++]="dontdraw",o[i++]=!0,o[i++]="includetext",o[i++]=!0,o[i++]="height",o[i++]=L(e.height-.15),o[i++]="textxoffset",D(e.addontextxoffset,null)?o[i++]=e.addontextxoffset:o[i++]=51+e.addongap,D(e.addontextyoffset,null)&&(o[i++]="textyoffset",o[i++]=e.addontextyoffset),o[i++]="textsize",D(e.addontextsize,null)?o[i++]=e.addontextsize:o[i++]=e.textsize;var F=D(e.addontextfont,"unset")?e.addontextfont:e.textfont;o[i++]="textfont",o[i++]=F,e.addopts=u(),2==e.addon.length&&(o[i++]=e.addon,o[i++]=e.addopts,q()),5==e.addon.length&&(o[i++]=e.addon,o[i++]=e.addopts,V()),e.addcode=o[--i],o[i++]=1/0,_(e.sbs),o[i++]=e.addongap,_(A(e.addcode,"sbs")),e.sbs=s(),o[i++]=1/0,_(e.bhs),k(A(e.addcode,"bhs"),(function(){var e=o[--i];o[i++]=L(e-.075)})),e.bhs=s(),o[i++]=1/0,_(e.bbs),k(A(e.addcode,"bbs"),(function(){var e=o[--i];o[i++]=L(e+.075)})),e.bbs=s(),o[i++]=1/0,_(e.txt),_(A(e.addcode,"txt")),e.txt=s(),e.guardrightypos=72*e.height-6}var R=new Map([["ren",Wt],["sbs",e.sbs],["bhs",e.bhs],["bbs",e.bbs],["txt",e.txt],["opt",e.options],["guardrightpos",10],["guardrightypos",e.guardrightypos],["borderbottom",5]]);o[i++]=R,e.dontdraw||Wt()}function X(){var e=Object.create(X.$ctx||(X.$ctx={}));if(e.dontdraw=!1,e.includetext=!1,e.isbntextfont="OCR-A",e.isbntextsize=8,e.isbntextxoffset=null,e.isbntextyoffset=null,e.height=1,e.addongap=12,e.legacy=!1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],C(e.barcode," "),o[--i]?(e.barcode=o[--i],i--,e.addon=o[--i]):(i--,e.addon=""),15!=e.barcode.length&&17!=e.barcode.length&&11!=e.barcode.length&&13!=e.barcode.length&&(o[i++]="bwipp.isbnBadLength#5164",o[i++]="ISBN-13 must be 15 or 17 characters including dashes. ISBN-10 must be 11 or 13 characters including dashes",z()),0!=e.addon.length&&2!=e.addon.length&&5!=e.addon.length&&(o[i++]="bwipp.isbnBadAddOnLength#5167",o[i++]="Add-on for ISBN must be 2 or 5 digits",z()),e.barcode.length>=15){var t=b(e.barcode,0,4);D(t,"978-")&&D(t,"979-")&&(o[i++]="bwipp.isbn13badPrefix#5171",o[i++]="ISBN-13 prefix must be 978- or 979-",z()),e.wasdash=!1,e.numdash=0,e.numdigit=0;for(var n=b(e.barcode,5,9),r=0,a=n.length;r<a;r++){var u=A(n,r);o[i++]=u,45==u&&(e.wasdash&&(o[i++]="bwipp.isbn13adjacentDashes#5178",o[i++]="ISBN-13 does not permit adjacent dashes",z()),e.wasdash=!0,e.numdash=e.numdash+1);var l=o[--i];l>=48&&l<=57&&(e.wasdash=!1,e.numdigit=e.numdigit+1)}2==e.numdash&&7==e.numdigit||(o[i++]="bwipp.isbn13numDashesDigits#5189",o[i++]="Incorrect number of dashes and digits for ISBN-13",z());var h=A(e.barcode,14);if((h<48||h>57)&&(o[i++]="bwipp.isbn13character15#5192",o[i++]="ISBN-13 character 15 must be a digit",z()),17==e.barcode.length){D(b(e.barcode,15,1),"-")&&(o[i++]="bwipp.isbn13character16#5196",o[i++]="ISBN-13 penultimate character must be a dash",z());var f=A(e.barcode,16);(f<48||f>57)&&(o[i++]="bwipp.isbn13character17#5199",o[i++]="ISBN-13 final character must be a digit",z())}}else{var d=A(e.barcode,0);(d<48||d>57)&&(o[i++]="bwipp.isbn10FirstDigit#5204",o[i++]="ISBN-10 first character must be a digit",z()),e.wasdash=!1,e.numdash=0,e.numdigit=0;for(var p=b(e.barcode,1,9),m=0,g=p.length;m<g;m++){var w=A(p,m);o[i++]=w,45==w&&(e.wasdash&&(o[i++]="bwipp.isbn10adjacentDashes#5211",o[i++]="ISBN-10 does not permit adjacent dashes",z()),e.wasdash=!0,e.numdash=e.numdash+1);var x=o[--i];x>=48&&x<=57&&(e.wasdash=!1,e.numdigit=e.numdigit+1)}2==e.numdash&&7==e.numdigit||(o[i++]="bwipp.isbn10numDashesDigits#5222",o[i++]="Incorrect number of dashes and digits for ISBN-10",z());var k=A(e.barcode,10);if((k<48||k>57)&&(o[i++]="bwipp.isbn10character11#5225",o[i++]="ISBN-10 character 11 must be a digit",z()),13==e.barcode.length){D(b(e.barcode,11,1),"-")&&(o[i++]="bwipp.isbn10character12#5229",o[i++]="ISBN-10 penultimate character must be a dash",z());var E=A(e.barcode,12);(E<48||E>57)&&88!=E&&(o[i++]="bwipp.isbn10character13#5232",o[i++]="ISBN-10 final character must be a digit or X",z())}}if(e.isbntxt=e.barcode,e.isbntxt.length<=13){for(e.isbn=c(10),e.checksum=0,e.i=0,e.n=0;e.isbnchar=L(A(e.isbntxt,e.i)-48),-3!=e.isbnchar&&(v(e.isbn,e.n,L(e.isbnchar+48)),e.n<9&&(e.checksum=L(e.checksum+(10-e.n)*e.isbnchar)),e.n=e.n+1),e.i=e.i+1,e.i!=e.isbntxt.length;);var S=L(11-e.checksum%11)%11;o[i++]="checksum",o[i++]=S,10==S&&(i--,o[i++]=40);var _=o[--i];e[o[--i]]=L(_+48),e.isbn=b(e.isbn,0,9),13==e.isbntxt.length&&A(e.isbntxt,12)!=e.checksum&&(o[i++]="bwipp.isbn10badCheckDigit#5260",o[i++]="Incorrect ISBN-10 check digit provided",z())}if(!e.legacy||e.isbntxt.length>=15){for(e.isbntxt.length<=13&&(e.pad=c(15),y(e.pad,0,"978-"),y(e.pad,4,b(e.isbntxt,0,11)),e.isbntxt=e.pad),e.isbn=c(13),e.checksum=0,e.i=0,e.n=0;;){if(e.isbnchar=A(e.isbntxt,e.i)-48,-3!=e.isbnchar){if(v(e.isbn,e.n,e.isbnchar+48),e.n<12){if(o[i++]="checksum",o[i++]=e.isbnchar,e.n%2!=0){var O=o[--i];o[i++]=3*O}var B=o[--i];e[o[--i]]=L(B+e.checksum)}e.n=e.n+1}if(e.i=e.i+1,e.i==e.isbntxt.length)break}e.checksum=(10-e.checksum%10)%10+48,e.isbn=b(e.isbn,0,12),17==e.isbntxt.length&&A(e.isbntxt,16)!=e.checksum&&(o[i++]="bwipp.isbn13badCheckDigit#5295",o[i++]="Incorrect ISBN-13 check digit provided",z())}var I=12==e.isbn.length?22:18;if(e.pad=c(I),y(e.pad,0,"ISBN "),y(e.pad,5,e.isbntxt),v(e.pad,e.pad.length-2,45),v(e.pad,e.pad.length-1,e.checksum),e.isbntxt=e.pad,e.barcode=c(12),9==e.isbn.length?(y(e.barcode,0,"978"),y(e.barcode,3,e.isbn)):y(e.barcode,0,e.isbn),D(e.addon,"")){var M=c(12+e.addon.length+1);y(M,0,e.barcode),y(M,12," "),y(M,13,e.addon),e.barcode=M}v(e.options,"dontdraw",!0),v(e.options,"addongap",e.addongap),o[i++]="args",o[i++]=e.barcode,o[i++]=e.options,G();var j=o[--i];if(e[o[--i]]=j,e.includetext){if(T(e.isbntextxoffset,null)){o[i++]="isbntextxoffset",9==e.isbn.length?o[i++]=-1:o[i++]=-12;var N=o[--i];e[o[--i]]=N}T(e.isbntextyoffset,null)&&(e.isbntextyoffset=72*e.height+3),void 0!==A(e.args,"txt")?(e.txt=A(e.args,"txt"),e.newtxt=s(e.txt.length+1),y(e.newtxt,0,e.txt),v(e.newtxt,e.newtxt.length-1,s([e.isbntxt,e.isbntextxoffset,e.isbntextyoffset,e.isbntextfont,e.isbntextsize])),v(e.args,"txt",e.newtxt)):v(e.args,"txt",s([s([e.isbntxt,e.isbntextxoffset,e.isbntextyoffset,e.isbntextfont,e.isbntextsize])]))}v(e.args,"opt",e.options),o[i++]=e.args,e.dontdraw||Wt()}function J(){var e=Object.create(J.$ctx||(J.$ctx={}));if(e.dontdraw=!1,e.includetext=!1,e.ismntextfont="OCR-A",e.ismntextsize=8,e.ismntextxoffset=null,e.ismntextyoffset=null,e.height=1,e.addongap=12,e.legacy=!1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],C(e.barcode," "),o[--i]?(e.barcode=o[--i],i--,e.addon=o[--i]):(i--,e.addon=""),15!=e.barcode.length&&17!=e.barcode.length&&11!=e.barcode.length&&13!=e.barcode.length&&(o[i++]="bwipp.ismnBadLength#5414",o[i++]="ISMN-13 must be 15 or 17 characters including dashes. ISMN-10 must be 11 or 13 characters including dashes",z()),0!=e.addon.length&&2!=e.addon.length&&5!=e.addon.length&&(o[i++]="bwipp.ismnBadAddOnLength#5417",o[i++]="Add-on for ISMN must be 2 or 5 digits",z()),e.barcode.length>=15){D(b(e.barcode,0,4),"979-")&&(o[i++]="bwipp.ismn13badPrefix#5421",o[i++]="ISMN-13 prefix must be 979-",z()),e.wasdash=!1,e.numdash=0,e.numdigit=0;for(var t=b(e.barcode,5,9),n=0,r=t.length;n<r;n++){var a=A(t,n);o[i++]=a,45==a&&(e.wasdash&&(o[i++]="bwipp.ismn13adjacentDashes#5428",o[i++]="ISMN-13 does not permit adjacent dashes",z()),e.wasdash=!0,e.numdash=e.numdash+1);var u=o[--i];u>=48&&u<=57&&(e.wasdash=!1,e.numdigit=e.numdigit+1)}2==e.numdash&&7==e.numdigit||(o[i++]="bwipp.ismn13numDashesDigits#5439",o[i++]="Incorrect number of dashes and digits for ISMN-13",z());var l=A(e.barcode,14);if((l<48||l>57)&&(o[i++]="bwipp.ismn13character15#5442",o[i++]="ISMN-13 character 15 must be a digit",z()),17==e.barcode.length){D(b(e.barcode,15,1),"-")&&(o[i++]="bwipp.ismn13character16#5446",o[i++]="ISMN-13 penultimate character must be a dash",z());var h=A(e.barcode,16);(h<48||h>57)&&(o[i++]="bwipp.ismn13character17#5449",o[i++]="ISMN-13 final character must be a digit",z())}}else{D(b(e.barcode,0,2),"M-")&&(o[i++]="bwipp.ismn10badPrefix#5454",o[i++]="ISMN-10 prefix must be M-",z());var f=A(e.barcode,2);(f<48||f>57)&&(o[i++]="bwipp.ismn10character3#5457",o[i++]="ISMN-10 character 3 must be a digit",z()),e.wasdash=!1,e.numdash=0,e.numdigit=0;for(var d=b(e.barcode,3,7),p=0,m=d.length;p<m;p++){var g=A(d,p);o[i++]=g,45==g&&(e.wasdash&&(o[i++]="bwipp.ismn10adjacentDashes#5464",o[i++]="ISMN-10 does not permit adjacent dashes",z()),e.wasdash=!0,e.numdash=e.numdash+1);var w=o[--i];w>=48&&w<=57&&(e.wasdash=!1,e.numdigit=e.numdigit+1)}1==e.numdash&&6==e.numdigit||(o[i++]="bwipp.ismn10numDashesDigits#5475",o[i++]="Incorrect number of dashes and digits for ISMN-10",z());var x=A(e.barcode,10);if((x<48||x>57)&&(o[i++]="bwipp.ismn10character11#5478",o[i++]="ISMN-10 character 11 must be a digit",z()),13==e.barcode.length){D(b(e.barcode,11,1),"-")&&(o[i++]="bwipp.ismn10character12#5482",o[i++]="ISMN-10 penultimate character must be a dash",z());var k=A(e.barcode,12);(k<48||k>57)&&88!=k&&(o[i++]="bwipp.ismn10character13#5485",o[i++]="ISMN-10 final character must be a digit or X",z())}}for(e.ismntxt=e.barcode,e.legacytxt="",e.ismntxt.length<=13&&(e.legacytxt=e.ismntxt,e.pad=c(e.ismntxt.length+4),y(e.pad,0,"979-0-"),y(e.pad,6,b(e.ismntxt,2,e.ismntxt.length-2)),e.ismntxt=e.pad),e.ismn=c(13),e.checksum=0,e.i=0,e.n=0;e.ismnchar=A(e.ismntxt,e.i)-48,-3!=e.ismnchar&&(v(e.ismn,e.n,e.ismnchar+48),e.n<12&&(e.n%2==0?e.checksum=e.ismnchar+e.checksum:e.checksum=3*e.ismnchar+e.checksum),e.n=e.n+1),e.i=e.i+1,e.i!=e.ismntxt.length;);if(e.checksum=(10-e.checksum%10)%10+48,13==e.barcode.length||17==e.barcode.length){var E=e.barcode;A(E,E.length-1)!=e.checksum&&(o[i++]="bwipp.ismnBadCheckDigit#5527",o[i++]="Incorrect ISMN check digit provided",z())}if(e.legacy&&D(e.legacytxt,"")?(e.ismntxt=e.legacytxt,e.pad=c(18)):e.pad=c(22),y(e.pad,0,"ISMN "),y(e.pad,5,e.ismntxt),v(e.pad,e.pad.length-2,45),v(e.pad,e.pad.length-1,e.checksum),e.ismntxt=e.pad,e.barcode=b(e.ismn,0,12),D(e.addon,"")){var S=c(12+e.addon.length+1);y(S,0,e.barcode),y(S,12," "),y(S,13,e.addon),e.barcode=S}v(e.options,"dontdraw",!0),v(e.options,"addongap",e.addongap),o[i++]="args",o[i++]=e.barcode,o[i++]=e.options,G();var _=o[--i];if(e[o[--i]]=_,e.includetext){if(T(e.ismntextxoffset,null)){o[i++]="ismntextxoffset",18==e.ismntxt.length?o[i++]=-1:o[i++]=-12;var O=o[--i];e[o[--i]]=O}T(e.ismntextyoffset,null)&&(e.ismntextyoffset=72*e.height+3),void 0!==A(e.args,"txt")?(e.txt=A(e.args,"txt"),e.newtxt=s(e.txt.length+1),y(e.newtxt,0,e.txt),v(e.newtxt,e.newtxt.length-1,s([e.ismntxt,e.ismntextxoffset,e.ismntextyoffset,e.ismntextfont,e.ismntextsize])),v(e.args,"txt",e.newtxt)):v(e.args,"txt",s([s([e.ismntxt,e.ismntextxoffset,e.ismntextyoffset,e.ismntextfont,e.ismntextsize])]))}v(e.args,"opt",e.options),o[i++]=e.args,e.dontdraw||Wt()}function Z(){var e=Object.create(Z.$ctx||(Z.$ctx={}));e.dontdraw=!1,e.includetext=!1,e.issntextfont="OCR-A",e.issntextsize=8,e.issntextxoffset=null,e.issntextyoffset=null,e.height=1,e.addongap=12,o[i++]=e,U(),e.options=o[--i],e.issntxt=o[--i],C(e.issntxt," "),o[--i]?(e.issntxt=o[--i],i--,e.seqvar=o[--i]):(i--,e.seqvar="00"),C(e.seqvar," "),o[--i]?(e.seqvar=o[--i],i--,e.addon=o[--i]):(i--,e.addon=""),8!=e.issntxt.length&&9!=e.issntxt.length&&(o[i++]="bwipp.issnBadLength#5651",o[i++]="ISSN must be 8 or 9 characters including dash, in the format XXXX-XXXX",z());for(var t=b(e.issntxt,0,4),n=0,r=t.length;n<r;n++){var a=A(t,n);(a<48||a>57)&&(o[i++]="bwipp.issnFirstThroughFourthNotNumeric#5655",o[i++]="ISSN first four characters must be numeral characters",z())}D(b(e.issntxt,4,1),"-")&&(o[i++]="bwipp.issnNeedsDash#5659",o[i++]="ISSN fifth character must be a dash",z());for(var u=b(e.issntxt,5,3),l=0,h=u.length;l<h;l++){var f=A(u,l);(f<48||f>57)&&(o[i++]="bwipp.issnSixthThroughEighthNotNumeric#5663",o[i++]="ISSN sixth through eighth characters must be numerals",z())}if(9==e.issntxt.length){var d=A(e.issntxt,8);(d<48||d>57)&&88!=d&&(o[i++]="bwipp.issnNinthCharacterBadFormat#5668",o[i++]="ISSN ninth character must be a number or the character X",z())}for(2!=e.seqvar.length&&(o[i++]="bwipp.issnBadSequenceVariantLength#5672",o[i++]="Sequence variant for ISSN must be 2 digits",z()),k(e.seqvar,(function(){var e=o[--i];(e<48||e>57)&&(o[i++]="bwipp.issnSequenceVariantBadCharacter#5676",o[i++]="Sequence variant for ISSN must contain only digits",z())})),0!=e.addon.length&&2!=e.addon.length&&5!=e.addon.length&&(o[i++]="bwipp.issnBadAddOnLength#5680",o[i++]="Add-on for ISSN must be 2 or 5 digits",z()),e.issn=c(8),e.checksum=0,e.i=0,e.n=0;e.issnchar=L(A(e.issntxt,e.i)-48),-3!=e.issnchar&&(v(e.issn,e.n,L(e.issnchar+48)),e.n<7&&(e.checksum=L(e.checksum+e.issnchar*(8-e.n))),e.n=e.n+1),e.i=e.i+1,e.i!=e.issntxt.length;);e.checksum=L(11-e.checksum%11)%11;var p=L(e.checksum+48);o[i++]="checksum",o[i++]=p,58==p&&(i--,o[i++]=88);var m=o[--i];if(e[o[--i]]=m,9==e.issntxt.length&&A(e.issntxt,8)!=e.checksum&&(o[i++]="bwipp.issnBadCheckDigit#5703",o[i++]="Incorrect ISSN check digit provided",z()),e.pad=c(14),y(e.pad,0,"ISSN "),y(e.pad,5,e.issntxt),v(e.pad,13,e.checksum),e.issntxt=e.pad,e.barcode=b(e.issn,0,7),e.barcode=c(12),y(e.barcode,0,"977"),y(e.barcode,3,e.issn),y(e.barcode,10,e.seqvar),D(e.addon,"")){var g=c(12+e.addon.length+1);y(g,0,e.barcode),y(g,12," "),y(g,13,e.addon),e.barcode=g}v(e.options,"dontdraw",!0),v(e.options,"addongap",e.addongap),o[i++]="args",o[i++]=e.barcode,o[i++]=e.options,G();var w=o[--i];(e[o[--i]]=w,e.includetext)&&(T(e.issntextxoffset,null)&&(e.issntextxoffset=10),T(e.issntextyoffset,null)&&(e.issntextyoffset=72*e.height+3),void 0!==A(e.args,"txt")?(e.txt=A(e.args,"txt"),e.newtxt=s(e.txt.length+1),y(e.newtxt,0,e.txt),v(e.newtxt,e.newtxt.length-1,s([e.issntxt,e.issntextxoffset,e.issntextyoffset,e.issntextfont,e.issntextsize])),v(e.args,"txt",e.newtxt)):v(e.args,"txt",s([s([e.issntxt,e.issntextxoffset,e.issntextyoffset,e.issntextfont,e.issntextsize])])));v(e.args,"opt",e.options),o[i++]=e.args,e.dontdraw||Wt()}function ee(){var e=Object.create(ee.$ctx||(ee.$ctx={}));if(e.dontdraw=!1,e.includetext=!1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],e.barlen=e.barcode.length,7!=e.barlen&&8!=e.barlen&&(o[i++]="bwipp.MandSbadLength#5799",o[i++]="M&S barcode must be 7 or 8 characters",z()),7==e.barlen){var t=f(c(8),"00000000");y(t,1,e.barcode),e.barcode=t}v(e.options,"dontdraw",!0),o[i++]="args",o[i++]=e.barcode,o[i++]=e.options,W();var n=o[--i];e[o[--i]]=n;var r=A(e.args,"bbs");v(r,10,A(r,2)),v(r,11,A(r,2));var a=A(e.args,"bhs");if(v(a,10,A(a,2)),v(a,11,A(a,2)),e.txt=A(e.args,"txt"),7==e.barlen){for(var u=0;u<=6;u+=1){var l=e.txt;y(A(A(l,u),0),0,A(A(l,u+1),0))}y(A(A(e.txt,7),0),0," ")}var h=s(10);y(h,0,e.txt),e.txt=h;var p=A(e.txt,0);v(e.txt,8,d(s(p.length),p));var m=A(e.txt,0);v(e.txt,9,d(s(m.length),m)),v(A(e.txt,8),0,"M"),v(A(e.txt,8),1,-12),v(A(e.txt,9),0,"S"),v(A(e.txt,9),1,69),v(e.args,"txt",e.txt),v(e.args,"opt",e.options),o[i++]=e.args,e.dontdraw||Wt()}function te(){var e=Object.create(te.$ctx||(te.$ctx={}));e.dontdraw=!1,e.includetext=!1,e.textfont="OCR-B",e.textsize=10,e.textxoffset=0,e.textyoffset=-8,e.height=1,e.encoding="auto",e.raw=!1,e.parse=!1,e.parsefnc=!1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],te.$ctx._5900||function(){var t=Object.create(e);for(var n in t.sta=-1,t.stb=-2,t.stc=-3,t.swa=-4,t.swb=-5,t.swc=-6,t.fn1=-7,t.fn2=-8,t.fn3=-9,t.fn4=-10,t.sft=-11,t.stp=-12,t.lka=-13,t.lkc=-14,t)t.hasOwnProperty(n)&&(te.$ctx[n]=t[n]);te.$ctx._5900=1}();var t=e.fn1,n=new Map([["parse",e.parse],["parsefnc",e.parsefnc],["FNC1",t],["FNC1",e.fn1],["FNC2",e.fn2],["FNC3",e.fn3],["LNKA",e.lka],["LNKC",e.lkc]]);e.fncvals=n,o[i++]="msg",o[i++]=e.barcode,o[i++]=e.fncvals,H();var r=o[--i];if(e[o[--i]]=r,e.msglen=e.msg.length,te.$ctx._5973||function(){var t=Object.create(e);t.charmaps=s([s([32,32,"00"]),s(["!","!","01"]),s(['"','"',"02"]),s(["#","#","03"]),s(["$","$","04"]),s(["%","%","05"]),s(["&","&","06"]),s(["'","'","07"]),s([40,40,"08"]),s([41,41,"09"]),s(["*","*","10"]),s(["+","+","11"]),s([",",",","12"]),s(["-","-","13"]),s([".",".","14"]),s(["/","/","15"]),s(["0","0","16"]),s(["1","1","17"]),s(["2","2","18"]),s(["3","3","19"]),s(["4","4","20"]),s(["5","5","21"]),s(["6","6","22"]),s(["7","7","23"]),s(["8","8","24"]),s(["9","9","25"]),s([":",":","26"]),s([";",";","27"]),s(["<","<","28"]),s(["=","=","29"]),s([">",">","30"]),s(["?","?","31"]),s(["@","@","32"]),s(["A","A","33"]),s(["B","B","34"]),s(["C","C","35"]),s(["D","D","36"]),s(["E","E","37"]),s(["F","F","38"]),s(["G","G","39"]),s(["H","H","40"]),s(["I","I","41"]),s(["J","J","42"]),s(["K","K","43"]),s(["L","L","44"]),s(["M","M","45"]),s(["N","N","46"]),s(["O","O","47"]),s(["P","P","48"]),s(["Q","Q","49"]),s(["R","R","50"]),s(["S","S","51"]),s(["T","T","52"]),s(["U","U","53"]),s(["V","V","54"]),s(["W","W","55"]),s(["X","X","56"]),s(["Y","Y","57"]),s(["Z","Z","58"]),s(["[","[","59"]),s([92,92,"60"]),s(["]","]","61"]),s(["^","^","62"]),s(["_","_","63"]),s([0,"`","64"]),s([1,"a","65"]),s([2,"b","66"]),s([3,"c","67"]),s([4,"d","68"]),s([5,"e","69"]),s([6,"f","70"]),s([7,"g","71"]),s([8,"h","72"]),s([9,"i","73"]),s([10,"j","74"]),s([11,"k","75"]),s([12,"l","76"]),s([13,"m","77"]),s([14,"n","78"]),s([15,"o","79"]),s([16,"p","80"]),s([17,"q","81"]),s([18,"r","82"]),s([19,"s","83"]),s([20,"t","84"]),s([21,"u","85"]),s([22,"v","86"]),s([23,"w","87"]),s([24,"x","88"]),s([25,"y","89"]),s([26,"z","90"]),s([27,"{","91"]),s([28,"|","92"]),s([29,"}","93"]),s([30,"~","94"]),s([31,127,"95"]),s([t.fn3,t.fn3,"96"]),s([t.fn2,t.fn2,"97"]),s([t.sft,t.sft,"98"]),s([t.swc,t.swc,"99"]),s([t.swb,t.fn4,t.swb]),s([t.fn4,t.swa,t.swa]),s([t.fn1,t.fn1,t.fn1]),s([t.sta,t.sta,t.sta]),s([t.stb,t.stb,t.stb]),s([t.stc,t.stc,t.stc]),s([t.stp,t.stp,t.stp])]),t.charvals=s([new Map,new Map,new Map]);for(var n=0,r=t.charmaps.length-1;n<=r;n+=1){t.i=n,t.encs=A(t.charmaps,t.i);for(var a=0;a<=2;a+=1){t.j=a;var u=A(t.encs,t.j);if(o[i++]=u,T(w(u),"stringtype")){var c=A(o[--i],0);o[i++]=c}v(A(t.charvals,t.j),o[--i],t.i)}}for(var l in t.seta=A(t.charvals,0),t.setb=A(t.charvals,1),t.setc=A(t.charvals,2),t)t.hasOwnProperty(l)&&(te.$ctx[l]=t[l]);te.$ctx._5973=1}(),v(e.seta,e.lka,A(e.seta,e.swb)),v(e.seta,e.lkc,A(e.seta,e.swc)),v(e.setb,e.lka,A(e.setb,e.swc)),v(e.setb,e.lkc,A(e.setb,e.swa)),v(e.setc,e.lka,A(e.setc,e.swa)),v(e.setc,e.lkc,A(e.setc,e.swb)),e.raw&&(e.encoding="raw"),T(e.encoding,"raw")){for(e.cws=s(e.barcode.length),e.i=0,e.j=0;e.i!=e.barcode.length;)e.cw=p(b(e.barcode,e.i+1,3)),v(e.cws,e.j,e.cw),e.i=e.i+4,e.j=e.j+1;e.cws=b(e.cws,0,e.j),e.text=""}if(T(e.encoding,"auto")){e.text=c(e.msglen);for(var a=0,l=e.msglen-1;a<=l;a+=1){e.i=a;var h=A(e.msg,e.i);o[i++]=e.text,o[i++]=e.i,o[i++]=h,h<0&&(i--,o[i++]=32);var f=o[--i],d=o[--i];v(o[--i],d,f)}o[i++]=1/0;for(var m=0,g=e.msglen;m<g;m++)o[i++]=0;o[i++]=0,e.numSA=s(),o[i++]=1/0;for(var x=0,C=e.msglen;x<C;x++)o[i++]=0;o[i++]=0,e.numEA=s();for(var k=e.msglen-1;k>=0;k-=1)e.i=k,A(e.msg,e.i)>=0&&(A(e.msg,e.i)>=128?v(e.numEA,e.i,L(A(e.numEA,e.i+1)+1)):v(e.numSA,e.i,L(A(e.numSA,e.i+1)+1)));e.ea=!1,e.msgtmp=s([]);for(var E=0,S=e.msglen-1;E<=S;E+=1){if(e.i=E,e.c=A(e.msg,e.i),!R(e.ea,e.c<128)&&e.c>=0){e.ea?o[i++]=e.numSA:o[i++]=e.numEA;var O=A(o[--i],e.i);O<(L(O+e.i)==e.msglen?3:5)?(o[i++]=1/0,_(e.msgtmp),o[i++]=e.fn4,e.msgtmp=s()):(o[i++]=1/0,_(e.msgtmp),o[i++]=e.fn4,o[i++]=e.fn4,e.msgtmp=s(),e.ea=!e.ea)}o[i++]=1/0,_(e.msgtmp),e.c>=0?o[i++]=127&e.c:o[i++]=e.c,e.msgtmp=s()}e.msg=e.msgtmp,e.msglen=e.msg.length,e.numsscr=function(){for(e.n=0,e.s=0,e.p=o[--i];!(e.p>=e.msglen);){var t=A(e.msg,e.p),n=void 0!==A(e.setc,t);if(o[i++]=t,!n){i--;break}var r=o[--i];if(o[i++]=r,r<=-1){if(o[--i]!=e.fn1||e.s%2!=0)break;e.s=e.s+1}else i--;e.n=e.n+1,e.s=e.s+1,e.p=L(e.p+1)}o[i++]=e.n,o[i++]=e.s},e.enca=function(){v(e.cws,e.j,A(e.seta,o[--i])),e.j=e.j+1},e.encb=function(){v(e.cws,e.j,A(e.setb,o[--i])),e.j=e.j+1},e.encc=function(){var t=o[--i];if(o[i++]=t,D(w(t),"arraytype")){var n=A(e.setc,o[--i]);o[i++]=n}else{_(o[--i]);var r=o[--i],a=o[--i];o[i++]=L(L(r-48)+10*L(a-48))}v(e.cws,e.j,o[--i]),e.j=e.j+1},e.anotb=function(){var t=o[--i],n=void 0!==A(e.seta,t),r=void 0!==A(e.setb,t);o[i++]=n&&!r},e.bnota=function(){var t=o[--i],n=void 0!==A(e.setb,t),r=void 0!==A(e.seta,t);o[i++]=n&&!r},o[i++]=1/0;for(var I=0,M=e.msg.length;I<M;I++)o[i++]=0;o[i++]=9999,e.nextanotb=s(),o[i++]=1/0;for(var j=0,N=e.msg.length;j<N;j++)o[i++]=0;o[i++]=9999,e.nextbnota=s();for(var F=e.msg.length-1;F>=0;F-=1)e.i=F,o[i++]=A(e.msg,e.i),e.anotb(),o[--i]?v(e.nextanotb,e.i,0):v(e.nextanotb,e.i,L(A(e.nextanotb,e.i+1)+1)),o[i++]=A(e.msg,e.i),e.bnota(),o[--i]?v(e.nextbnota,e.i,0):v(e.nextbnota,e.i,L(A(e.nextbnota,e.i+1)+1));for(e.abeforeb=function(){var t=o[--i];o[i++]=B(A(e.nextanotb,t),A(e.nextbnota,t))},e.bbeforea=function(){var t=o[--i];o[i++]=B(A(e.nextbnota,t),A(e.nextanotb,t))},e.cws=s(2*e.barcode.length+3),e.j=0,e.msglen>0?(o[i++]=0,e.numsscr()):(o[i++]=-1,o[i++]=-1),e.nums=o[--i],e.nchars=o[--i];;){if(0==e.msglen){o[i++]=e.stb,e.enca(),e.cset="setb";break}if(2==e.msglen&&2==e.nums){o[i++]=e.stc,e.enca(),e.cset="setc";break}if(e.nums>=4){o[i++]=e.stc,e.enca(),e.cset="setc";break}if(o[i++]=0,e.abeforeb(),o[--i]){o[i++]=e.sta,e.enca(),e.cset="seta";break}o[i++]=e.stb,e.enca(),e.cset="setb";break}for(e.i=0;e.i!=e.msglen;)for(o[i++]=e.i,e.numsscr(),e.nums=o[--i],e.nchars=o[--i];;){if((T(e.cset,"seta")||T(e.cset,"setb"))&&e.nums>=4&&A(e.msg,e.i)!=e.fn1){if(e.nums%2==0){o[i++]=e.swc,T(e.cset,"seta")?e.enca():e.encb(),e.cset="setc";break}o[i++]=A(e.msg,e.i),T(e.cset,"seta")?e.enca():e.encb(),e.i=e.i+1,o[i++]=e.swc,T(e.cset,"seta")?e.enca():e.encb(),e.cset="setc";break}o[i++]=T(e.cset,"setb"),o[i++]=A(e.msg,e.i),e.anotb();var P=o[--i];if(o[--i]&&P){if(e.i<e.msglen-1&&(o[i++]=e.i+1,e.bbeforea(),o[--i])){o[i++]=e.sft,e.encb(),o[i++]=A(e.msg,e.i),e.enca(),e.i=e.i+1;break}o[i++]=e.swa,e.encb(),e.cset="seta";break}o[i++]=T(e.cset,"seta"),o[i++]=A(e.msg,e.i),e.bnota();var $=o[--i];if(o[--i]&&$){if(e.i<e.msglen-1&&(o[i++]=e.i+1,e.abeforeb(),o[--i])){o[i++]=e.sft,e.enca(),o[i++]=A(e.msg,e.i),e.encb(),e.i=e.i+1;break}o[i++]=e.swb,e.enca(),e.cset="setb";break}if(T(e.cset,"setc")&&e.nums<2&&(A(e.msg,e.i)>-1||A(e.msg,e.i)==e.fn4)){if(o[i++]=e.i,e.abeforeb(),o[--i]){o[i++]=e.swa,e.encc(),e.cset="seta";break}o[i++]=e.swb,e.encc(),e.cset="setb";break}if(T(e.cset,"seta")){o[i++]=A(e.msg,e.i),e.enca(),e.i=e.i+1;break}if(T(e.cset,"setb")){o[i++]=A(e.msg,e.i),e.encb(),e.i=e.i+1;break}if(T(e.cset,"setc")){A(e.msg,e.i)<=-1?(o[i++]=A(e.msg,e.i),e.encc(),e.i=e.i+1):(o[i++]=b(e.msg,e.i,2),e.encc(),e.i=e.i+2);break}break}e.cws=b(e.cws,0,e.j)}var Q=s(e.j+2);y(Q,0,e.cws),e.cws=Q,e.csum=A(e.cws,0);for(var V=1,q=e.j-1;V<=q;V+=1)e.i=V,e.csum=L(e.csum+A(e.cws,e.i)*e.i);e.csum=e.csum%103,v(e.cws,e.j,e.csum),v(e.cws,e.j+1,A(e.seta,e.stp)),void 0!==A(e.options,"debugcws")&&(o[i++]="bwipp.debugcws#6232",o[i++]=e.cws,z()),te.$ctx._6254||function(){var t=Object.create(e);for(var n in t.encs=s(["212222","222122","222221","121223","121322","131222","122213","122312","132212","221213","221312","231212","112232","122132","122231","113222","123122","123221","223211","221132","221231","213212","223112","312131","311222","321122","321221","312212","322112","322211","212123","212321","232121","111323","131123","131321","112313","132113","132311","211313","231113","231311","112133","112331","132131","113123","113321","133121","313121","211331","231131","213113","213311","213131","311123","311321","331121","312113","312311","332111","314111","221411","431111","111224","111422","121124","121421","141122","141221","112214","112412","122114","122411","142112","142211","241211","221114","413111","241112","134111","111242","121142","121241","114212","124112","124211","411212","421112","421211","212141","214121","412121","111143","111341","131141","114113","114311","411113","411311","113141","114131","311141","411131","211412","211214","211232","2331112"]),t)t.hasOwnProperty(n)&&(te.$ctx[n]=t[n]);te.$ctx._6254=1}(),e.sbs=c(6*e.cws.length+1);for(var G=0,W=e.cws.length-1;G<=W;G+=1)e.i=G,y(e.sbs,6*e.i,A(e.encs,A(e.cws,e.i)));o[i++]=1/0,o[i++]=1/0;for(var K=e.sbs,Y=0,X=K.length;Y<X;Y++)o[i++]=A(K,Y)-48;var J=s();o[i++]=1/0;for(var Z=0,ee=~~((e.sbs.length+1)/2);Z<ee;Z++)o[i++]=e.height;var ne=s();o[i++]=1/0;for(var re=0,ie=~~((e.sbs.length+1)/2);re<ie;re++)o[i++]=0;var oe=s();o[i++]="ren",o[i++]=Wt,o[i++]="sbs",o[i++]=J,o[i++]="bhs",o[i++]=ne,o[i++]="bbs",o[i++]=oe,o[i++]="txt",o[i++]=s([s([e.text,e.textxoffset,e.textyoffset,e.textfont,e.textsize])]),o[i++]="textxalign",o[i++]="center",o[i++]="opt",o[i++]=e.options;var ae=u();o[i++]=ae,e.dontdraw||Wt()}function ne(){var e=Object.create(ne.$ctx||(ne.$ctx={}));e.dontdraw=!1,e.includetext=!1,e.textfont="OCR-B",e.textsize=10,e.textxoffset=0,e.textyoffset=-8,e.height=.5,e.linkagea=!1,e.linkagec=!1,e.parse=!1,e.dontlint=!1,e.lintreqs=!1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],e.text=e.barcode,o[i++]=e.barcode,o[i++]="ai",$(),e.fncs=o[--i],e.vals=o[--i],e.ais=o[--i],e.fnc1=-1,e.c128=s([e.fnc1]);for(var t=0,n=e.ais.length-1;t<=n;t+=1){e.i=t,e.ai=A(e.ais,e.i),e.val=A(e.vals,e.i);var r=s(e.c128.length+e.ai.length+e.val.length);y(r,0,e.c128),o[i++]=r,o[i++]=r,o[i++]=e.c128.length,o[i++]=e.ai,o[i++]=1/0;var a=o[--i],u=o[--i];o[i++]=a,k(u);var l=s(),h=o[--i];y(o[--i],h,l);var f=o[--i];o[i++]=f,o[i++]=f,o[i++]=e.c128.length+e.ai.length,o[i++]=e.val,o[i++]=1/0;var d=o[--i],p=o[--i];o[i++]=d,k(p);var m=s(),g=o[--i];if(y(o[--i],g,m),e.c128=o[--i],e.i!=e.ais.length-1&&A(e.fncs,e.i)){var w=s(e.c128.length+1);y(w,0,e.c128),v(w,e.c128.length,e.fnc1),e.c128=w}}for(e.barcode=c(5*(e.c128.length+1)),e.i=0,e.j=0;e.i!=e.c128.length;){var x=A(e.c128,e.i);o[i++]=x,x==e.fnc1?(i--,y(e.barcode,e.j,"^FNC1"),e.j=e.j+4):v(e.barcode,e.j,o[--i]),e.i=e.i+1,e.j=e.j+1}if(e.linkagea||e.linkagec){o[i++]=e.barcode,o[i++]=e.j,e.linkagea?o[i++]="^LNKA":o[i++]="^LNKC";var C=o[--i],E=o[--i];y(o[--i],E,C),e.j=e.j+5}e.barcode=b(e.barcode,0,e.j),delete e.options.parse,v(e.options,"height",e.height),v(e.options,"dontdraw",!0),v(e.options,"parsefnc",!0),o[i++]="args",o[i++]=e.barcode,o[i++]=e.options,te();var S=o[--i];e[o[--i]]=S,v(e.args,"txt",s([s([e.text,e.textxoffset,e.textyoffset,e.textfont,e.textsize])])),v(e.args,"textxalign","center"),v(e.args,"opt",e.options),o[i++]=e.args,e.dontdraw||Wt()}function re(){var e=Object.create(re.$ctx||(re.$ctx={}));e.dontdraw=!1,e.includetext=!1,e.textfont="OCR-B",e.textsize=10,e.textxoffset=0,e.textyoffset=-8,e.height=1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],e.text=e.barcode;var t=e.barcode;o[i++]=c(t.length),o[i++]=0,k(t,(function(){var e=o[--i];if(o[i++]=e,32!=e){var t=o[--i],n=o[--i],r=o[--i];v(r,n,t),o[i++]=r,o[i++]=L(n+1)}else i--}));var n=o[--i];e.barcode=b(o[--i],0,n),e.hasspace=e.text.length!=e.barcode.length,D(b(e.barcode,0,4),"(01)")&&(o[i++]="bwipp.ean14badAI#6440",o[i++]="GS1-14 must begin with (01) application identifier",z()),17!=e.barcode.length&&18!=e.barcode.length&&(o[i++]="bwipp.ean14badLength#6443",o[i++]="GS1-14 must be 13 or 14 digits",z());for(var r=b(e.barcode,4,e.barcode.length-4),a=0,u=r.length;a<u;a++){var l=A(r,a);(l<48||l>57)&&(o[i++]="bwipp.ean14badCharacter#6447",o[i++]="GS1-14 must contain only digits",z())}e.checksum=0;for(var h=0;h<=12;h+=1){if(e.i=h,o[i++]="checksum",o[i++]=e.checksum,o[i++]=L(A(e.barcode,e.i+4)-48),e.i%2==0){var f=o[--i];o[i++]=3*f}var d=o[--i],p=o[--i];e[o[--i]]=L(p+d)}if(e.checksum=(10-e.checksum%10)%10,18==e.barcode.length)A(e.barcode,17)!=e.checksum+48&&(o[i++]="bwipp.ean14badCheckDigit#6460",o[i++]="Incorrect GS1-14 check digit provided",z());else{var m=c(18);y(m,0,e.barcode),v(m,17,e.checksum+48),e.barcode=m;var g=e.hasspace?2:1,w=c(e.text.length+g);y(w,w.length-2," "),v(w,w.length-1,e.checksum+48),y(w,0,e.text),e.text=w}e.gtin=b(e.barcode,4,14),e.barcode=c(21),y(e.barcode,0,"^FNC101");var x=e.gtin;y(e.barcode,7,x),v(e.options,"dontdraw",!0),v(e.options,"parsefnc",!0),o[i++]="args",o[i++]=e.barcode,o[i++]=e.options,te();var C=o[--i];e[o[--i]]=C,v(e.args,"txt",s([s([e.text,e.textxoffset,e.textyoffset,e.textfont,e.textsize])])),v(e.args,"textxalign","center"),v(e.args,"opt",e.options),o[i++]=e.args,e.dontdraw||Wt()}function ie(){var e=Object.create(ie.$ctx||(ie.$ctx={}));e.dontdraw=!1,e.includetext=!1,e.textfont="OCR-B",e.textsize=10,e.textxoffset=0,e.textyoffset=-8,e.height=1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],e.text=e.barcode;var t=e.barcode;o[i++]=c(t.length),o[i++]=0,k(t,(function(){var e=o[--i];if(o[i++]=e,32!=e){var t=o[--i],n=o[--i],r=o[--i];v(r,n,t),o[i++]=r,o[i++]=L(n+1)}else i--}));var n=o[--i];e.barcode=b(o[--i],0,n),e.hasspace=e.text.length!=e.barcode.length,D(b(e.barcode,0,4),"(00)")&&(o[i++]="bwipp.sscc18badAI#6544",o[i++]="SSCC-18 must begin with (00) application identifier",z()),21!=e.barcode.length&&22!=e.barcode.length&&(o[i++]="bwipp.sscc18badLength#6547",o[i++]="SSCC-18 must be 17 or 18 digits",z());for(var r=b(e.barcode,4,e.barcode.length-4),a=0,u=r.length;a<u;a++){var l=A(r,a);(l<48||l>57)&&(o[i++]="bwipp.sscc18badCharacter#6551",o[i++]="SSCC-18 must contain only digits",z())}e.checksum=0;for(var h=0;h<=16;h+=1){if(e.i=h,o[i++]="checksum",o[i++]=e.checksum,o[i++]=L(A(e.barcode,e.i+4)-48),e.i%2==0){var f=o[--i];o[i++]=3*f}var d=o[--i],p=o[--i];e[o[--i]]=L(p+d)}if(e.checksum=(10-e.checksum%10)%10,22==e.barcode.length)A(e.barcode,21)!=e.checksum+48&&(o[i++]="bwipp.sscc18badCheckDigit#6564",o[i++]="Incorrect SSCC-18 check digit provided",z());else{var m=c(22);y(m,0,e.barcode),v(m,21,e.checksum+48),e.barcode=m;var g=e.hasspace?2:1,w=c(e.text.length+g);y(w,w.length-2," "),v(w,w.length-1,e.checksum+48),y(w,0,e.text),e.text=w}e.sscc=b(e.barcode,4,18),e.barcode=c(25),y(e.barcode,0,"^FNC100");var x=e.sscc;y(e.barcode,7,x),v(e.options,"dontdraw",!0),v(e.options,"parsefnc",!0),o[i++]="args",o[i++]=e.barcode,o[i++]=e.options,te();var C=o[--i];e[o[--i]]=C,v(e.args,"txt",s([s([e.text,e.textxoffset,e.textyoffset,e.textfont,e.textsize])])),v(e.args,"textxalign","center"),v(e.args,"opt",e.options),o[i++]=e.args,e.dontdraw||Wt()}function oe(){var e=Object.create(oe.$ctx||(oe.$ctx={}));e.dontdraw=!1,e.includecheck=!1,e.validatecheck=!1,e.includetext=!1,e.includecheckintext=!1,e.hidestars=!1,e.textfont="OCR-B",e.textsize=10,e.textyoffset=-8,e.height=1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],oe.$ctx._6663||function(){var t=Object.create(e);t.encs=s(["1113313111","3113111131","1133111131","3133111111","1113311131","3113311111","1133311111","1113113131","3113113111","1133113111","3111131131","1131131131","3131131111","1111331131","3111331111","1131331111","1111133131","3111133111","1131133111","1111333111","3111111331","1131111331","3131111311","1111311331","3111311311","1131311311","1111113331","3111113311","1131113311","1111313311","3311111131","1331111131","3331111111","1311311131","3311311111","1331311111","1311113131","3311113111","1331113111","1313131111","1313111311","1311131311","1113131311","1311313111"]),t.barchars="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%",t.charvals=new Map;for(var n=0;n<=42;n+=1)v(t.charvals,b(t.barchars,n,1),n);for(var r in t)t.hasOwnProperty(r)&&(oe.$ctx[r]=t[r]);oe.$ctx._6663=1}();for(var t=0,n=e.barcode.length-1;t<=n;t+=1){void 0!==A(e.charvals,b(e.barcode,t,1))||(o[i++]="bwipp.code39badCharacter#6668",o[i++]="Code 39 must contain only digits, capital letters, spaces and the symbols -.$/+%",z())}if(o[i++]="barlen",o[i++]=e.barcode.length,e.validatecheck){var r=o[--i];o[i++]=L(r-1)}var a=o[--i];e[o[--i]]=a,e.checksum=0;for(var l=0,h=L(e.barlen-1);l<=h;l+=1)e.checksum=L(A(e.charvals,b(e.barcode,l,1))+e.checksum);e.checksum=e.checksum%43,e.validatecheck&&(A(e.barcode,e.barlen)!=A(e.barchars,e.checksum)&&(o[i++]="bwipp.code39badCheckDigit#6682",o[i++]="Incorrect Code 39 check digit provided",z()),e.barcode=b(e.barcode,0,e.barlen),e.includecheck=!0);var f=e.includecheck?3:2;e.sbs=c(10*L(e.barlen+f));var d=e.includecheck?3:2;e.txt=s(L(e.barlen+d)),y(e.sbs,0,A(e.encs,43)),e.hidestars?v(e.txt,0,s(["",0,e.textyoffset,e.textfont,e.textsize])):v(e.txt,0,s(["*",0,e.textyoffset,e.textfont,e.textsize]));for(var p=0,m=L(e.barlen-1);p<=m;p+=1)e.i=p,e.indx=A(e.charvals,b(e.barcode,e.i,1)),y(e.sbs,10*e.i+10,A(e.encs,e.indx)),v(e.txt,e.i+1,s([b(e.barcode,e.i,1),16*(e.i+1),e.textyoffset,e.textfont,e.textsize]));e.includecheck?(y(e.sbs,L(10*e.barlen+10),A(e.encs,e.checksum)),e.includecheckintext?v(e.txt,L(e.barlen+1),s([b(e.barchars,e.checksum,1),16*L(e.barlen+1),e.textyoffset,e.textfont,e.textsize])):v(e.txt,L(e.barlen+1),s(["",16*L(e.barlen+1),e.textyoffset,e.textfont,e.textsize])),y(e.sbs,L(10*e.barlen+20),A(e.encs,43)),e.hidestars?v(e.txt,L(e.barlen+2),s(["",16*L(e.barlen+2),e.textyoffset,e.textfont,e.textsize])):v(e.txt,L(e.barlen+2),s(["*",16*L(e.barlen+2),e.textyoffset,e.textfont,e.textsize]))):(y(e.sbs,L(10*e.barlen+10),A(e.encs,43)),e.hidestars?v(e.txt,L(e.barlen+1),s(["",16*L(e.barlen+1),e.textyoffset,e.textfont,e.textsize])):v(e.txt,L(e.barlen+1),s(["*",16*L(e.barlen+1),e.textyoffset,e.textfont,e.textsize]))),o[i++]=1/0,o[i++]=1/0;for(var g=e.sbs,w=0,x=g.length;w<x;w++)o[i++]=A(g,w)-48;var C=s();o[i++]=1/0;for(var k=0,E=~~((e.sbs.length+1)/2);k<E;k++)o[i++]=e.height;var S=s();o[i++]=1/0;for(var _=0,O=~~((e.sbs.length+1)/2);_<O;_++)o[i++]=0;var T=s();o[i++]="ren",o[i++]=Wt,o[i++]="sbs",o[i++]=C,o[i++]="bhs",o[i++]=S,o[i++]="bbs",o[i++]=T,e.includetext&&(o[i++]="txt",o[i++]=e.txt),o[i++]="opt",o[i++]=e.options;var D=u();o[i++]=D,e.dontdraw||Wt()}function ae(){var e=Object.create(ae.$ctx||(ae.$ctx={}));e.dontdraw=!1,e.includetext=!1,e.parse=!1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i];var t=new Map([["parse",e.parse],["parseonly",!0],["parsefnc",!1]]);e.fncvals=t,o[i++]="barcode",o[i++]=e.barcode,o[i++]=e.fncvals,H();var n=o[--i];e[o[--i]]=n,e.barlen=e.barcode.length,delete e.options.parse,k(e.barcode,(function(){o[--i]>=128&&(o[i++]="bwipp.code39extBadCharacter#6802",o[i++]="Code 39 Extended must contain only ASCII characters",z())})),ae.$ctx._6818||function(){var t=Object.create(e);for(var n in t.extencs=s(["%U","$A","$B","$C","$D","$E","$F","$G","$H","$I","$J","$K","$L","$M","$N","$O","$P","$Q","$R","$S","$T","$U","$V","$W","$X","$Y","$Z","%A","%B","%C","%D","%E"," ","/A","/B","/C","/D","/E","/F","/G","/H","/I","/J","/K","/L","-",".","/O","0","1","2","3","4","5","6","7","8","9","/Z","%F","%G","%H","%I","%J","%V","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","%K","%L","%M","%N","%O","%W","+A","+B","+C","+D","+E","+F","+G","+H","+I","+J","+K","+L","+M","+N","+O","+P","+Q","+R","+S","+T","+U","+V","+W","+X","+Y","+Z","%P","%Q","%R","%S","%T"]),t)t.hasOwnProperty(n)&&(ae.$ctx[n]=t[n]);ae.$ctx._6818=1}(),e.newcode=c(2*e.barlen),e.newtext=c(2*e.barlen),e.j=0;for(var r=0,a=e.barlen-1;r<=a;r+=1)e.i=r,e.extchar=A(e.extencs,A(e.barcode,e.i)),y(e.newcode,e.j,e.extchar),v(e.newtext,e.j,A(e.barcode,e.i)),1!=e.extchar.length&&y(e.newtext,e.j+1," "),e.j=e.j+e.extchar.length;e.newcode=b(e.newcode,0,e.j),e.newtext=b(e.newtext,0,e.j),v(e.options,"dontdraw",!0),o[i++]="args",o[i++]=e.newcode,o[i++]=e.options,oe();var u=o[--i];if(e[o[--i]]=u,e.includetext){e.txt=A(e.args,"txt");for(var l=0,h=e.newtext.length-1;l<=h;l+=1)e.i=l,e.txtentry=A(e.txt,e.i+1),v(e.txtentry,0,b(e.newtext,e.i,1)),v(e.txt,e.i+1,e.txtentry);v(e.args,"txt",e.txt)}v(e.args,"opt",e.options),o[i++]=e.args,e.dontdraw||Wt()}function se(){var e=Object.create(se.$ctx||(se.$ctx={}));e.dontdraw=!1,e.includetext=!1,e.textfont="OCR-B",e.textsize=10,e.textyoffset=-8,e.textxoffset=0,e.height=1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],8!=e.barcode.length&&9!=e.barcode.length&&(o[i++]="bwipp.code32badLength#6901",o[i++]="Italian Pharmacode must be 8 or 9 digits",z()),k(e.barcode,(function(){var e=o[--i];(e<48||e>57)&&(o[i++]="bwipp.code32badCharacter#6905",o[i++]="Italian Pharmacode must contain only digits",z())})),e.checksum=0;for(var t=0;t<=7;t+=1){if(e.i=t,o[i++]=L(A(e.barcode,e.i)-48),e.i%2!=0){var n=o[--i];o[i++]=2*n}var r=o[--i];if(o[i++]=r,r>9){var a=o[--i];o[i++]=L(a-9)}e.checksum=L(o[--i]+e.checksum)}e.checksum=e.checksum%10,9==e.barcode.length&&A(e.barcode,8)!=L(e.checksum+48)&&(o[i++]="bwipp.code32badCheckDigit#6919",o[i++]="Incorrect Italian Pharmacode check digit provided",z());var u=c(10);y(u,0,e.barcode),v(u,8,L(e.checksum+48)),e.text=u,e.val=m(c(6),p(e.text),32),e.barcode=c(6);for(var l=0;l<=5;l+=1)v(e.barcode,l,48);y(e.barcode,6-e.val.length,e.val);for(var h=0;h<=5;h+=1){var f=A(e.barcode,h);o[i++]=h,o[i++]=f,o[i++]=f;for(var d=0,g="AEIO".length;d<g;d++){if(o[--i]>=A("AEIO",d)){var w=o[--i];o[i++]=L(w+1)}var x=o[--i];o[i++]=x,o[i++]=x}i--;var C=o[--i];v(e.barcode,o[--i],C)}y(e.text,1,b(e.text,0,9)),v(e.text,0,65),v(e.options,"dontdraw",!0),o[i++]="args",o[i++]=e.barcode,o[i++]=e.options,oe();var E=o[--i];e[o[--i]]=E,v(e.args,"txt",s([s([e.text,e.textxoffset,e.textyoffset,e.textfont,e.textsize])])),v(e.args,"textxalign","center"),v(e.args,"opt",e.options),o[i++]=e.args,e.dontdraw||Wt()}function ue(){var e=Object.create(ue.$ctx||(ue.$ctx={}));e.dontdraw=!1,e.includetext=!1,e.textfont="OCR-B",e.textsize=10,e.textyoffset=-8,e.textxoffset=0,e.height=1,e.pzn8=!1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],e.pzn8?7!=e.barcode.length&&8!=e.barcode.length&&(o[i++]="bwipp.pzn8badLength#7002",o[i++]="PZN8 must be 7 or 8 digits",z()):6!=e.barcode.length&&7!=e.barcode.length&&(o[i++]="bwipp.pzn7badLength#7006",o[i++]="PZN7 must be 6 or 7 digits",z()),k(e.barcode,(function(){var e=o[--i];(e<48||e>57)&&(o[i++]="bwipp.pznBadCharacter#7011",o[i++]="PZN must contain only digits",z())}));var t=e.pzn8?9:8;e.msglen=t,e.checksum=0;for(var n=0,r=e.msglen-3;n<=r;n+=1){e.i=n;var a=e.pzn8?1:2;e.checksum=L(L(A(e.barcode,e.i)-48)*(e.i+a)+e.checksum)}e.checksum=e.checksum%11,10==e.checksum&&(o[i++]="bwipp.pznBadInputSequence#7025",o[i++]="Incorrect PZN input sequence provided",z()),e.barcode.length==e.msglen-1&&A(e.barcode,e.msglen-2)!=L(e.checksum+48)&&(o[i++]="bwipp.pznBadCheckDigit#7029",o[i++]="Incorrect PZN check digit provided",z());var u=c(e.msglen);v(u,0,45),y(u,1,e.barcode),v(u,e.msglen-1,L(e.checksum+48)),e.msg=u,v(e.options,"dontdraw",!0),o[i++]="args",o[i++]=e.msg,o[i++]=e.options,oe();var l=o[--i];e[o[--i]]=l,e.text=c(e.msglen+5),y(e.text,0,"PZN - "),y(e.text,6,b(e.msg,1,e.msglen-1));var h=s([s([e.text,e.textxoffset,e.textyoffset,e.textfont,e.textsize])]);v(e.args,"txt",h),v(e.args,"textxalign","center"),v(e.args,"opt",e.options),o[i++]=e.args,e.dontdraw||Wt()}function ce(){var e=Object.create(ce.$ctx||(ce.$ctx={}));e.dontdraw=!1,e.includecheck=!1,e.includetext=!1,e.textfont="OCR-B",e.textsize=10,e.textyoffset=-8,e.height=1,e.parse=!1,e.parsefnc=!1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],ce.$ctx._7129||function(){var t=Object.create(e);t.encs=s(["131112","111213","111312","111411","121113","121212","121311","111114","131211","141111","211113","211212","211311","221112","221211","231111","112113","112212","112311","122112","132111","111123","111222","111321","121122","131121","212112","212211","211122","211221","221121","222111","112122","112221","122121","123111","121131","311112","311211","321111","112131","113121","211131","121221","312111","311121","122211","111141","1111411"]),t.barchars="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%",t.charvals=new Map;for(var n=0;n<=42;n+=1)v(t.charvals,A(t.barchars,n),n);t.sft1=-1,t.sft2=-2,t.sft3=-3,t.sft4=-4;var r=t.charvals;for(var i in v(r,t.sft1,43),v(t.charvals,t.sft2,44),v(t.charvals,t.sft3,45),v(t.charvals,t.sft4,46),t)t.hasOwnProperty(i)&&(ce.$ctx[i]=t[i]);ce.$ctx._7129=1}();var t=new Map([["parse",e.parse],["parsefnc",e.parsefnc],["SFT$",e.sft1],["SFT%",e.sft2],["SFT/",e.sft3],["SFT+",e.sft4]]);e.fncvals=t,o[i++]="msg",o[i++]=e.barcode,o[i++]=e.fncvals,H();var n=o[--i];e[o[--i]]=n,e.msglen=e.msg.length,k(e.msg,(function(){void 0!==A(e.charvals,o[--i])||(o[i++]="bwipp.code93BadCharacter#7146",o[i++]="Code 93 must only contain digits, capital letters, spaces, the symbols -.$/+ and shift non-data characters",z())})),e.includecheck?e.sbs=c(6*e.msglen+25):e.sbs=c(6*e.msglen+13),e.txt=s(e.msglen),y(e.sbs,0,A(e.encs,47)),e.checksum1=0,e.checksum2=0;for(var r=0,a=e.msglen-1;r<=a;r+=1){e.i=r,e.indx=A(e.charvals,A(e.msg,e.i)),y(e.sbs,6*e.i+6,A(e.encs,e.indx));var l=A(e.msg,e.i);if(o[i++]="char",o[i++]=l,l<0)i--,o[i++]=" ";else{var h=c(1);v(h,0,o[--i]),o[i++]=h}var f=o[--i];e[o[--i]]=f,v(e.txt,e.i,s([e.char,9*e.i+9,e.textyoffset,e.textfont,e.textsize])),e.checksum1=L(e.checksum1+((e.msglen-e.i-1)%20+1)*e.indx),e.checksum2=L(e.checksum2+((e.msglen-e.i)%15+1)*e.indx)}e.includecheck?(e.checksum1=e.checksum1%47,e.checksum2=L(e.checksum2+e.checksum1)%47,y(e.sbs,6*e.msglen+6,A(e.encs,e.checksum1)),y(e.sbs,6*e.msglen+12,A(e.encs,e.checksum2)),y(e.sbs,6*e.msglen+18,A(e.encs,48))):y(e.sbs,6*e.msglen+6,A(e.encs,48)),o[i++]=1/0,o[i++]=1/0;for(var d=e.sbs,p=0,m=d.length;p<m;p++)o[i++]=A(d,p)-48;var g=s();o[i++]=1/0;for(var b=0,w=~~((e.sbs.length+1)/2);b<w;b++)o[i++]=e.height;var x=s();o[i++]=1/0;for(var C=0,E=~~((e.sbs.length+1)/2);C<E;C++)o[i++]=0;var S=s();o[i++]="ren",o[i++]=Wt,o[i++]="sbs",o[i++]=g,o[i++]="bhs",o[i++]=x,o[i++]="bbs",o[i++]=S,e.includetext&&(o[i++]="txt",o[i++]=e.txt),o[i++]="opt",o[i++]=e.options;var _=u();o[i++]=_,e.dontdraw||Wt()}function le(){var e=Object.create(le.$ctx||(le.$ctx={}));e.dontdraw=!1,e.includetext=!1,e.parse=!1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i];var t=new Map([["parse",e.parse],["parseonly",!0],["parsefnc",!1]]);e.fncvals=t,o[i++]="barcode",o[i++]=e.barcode,o[i++]=e.fncvals,H();var n=o[--i],r=o[--i];e[r]=n,e.barlen=e.barcode.length,delete e.options.parse,le.$ctx._7274||function(){var t=Object.create(e);for(var n in t.extencs=s(["^SFT%U","^SFT$A","^SFT$B","^SFT$C","^SFT$D","^SFT$E","^SFT$F","^SFT$G","^SFT$H","^SFT$I","^SFT$J","^SFT$K","^SFT$L","^SFT$M","^SFT$N","^SFT$O","^SFT$P","^SFT$Q","^SFT$R","^SFT$S","^SFT$T","^SFT$U","^SFT$V","^SFT$W","^SFT$X","^SFT$Y","^SFT$Z","^SFT%A","^SFT%B","^SFT%C","^SFT%D","^SFT%E"," ","^SFT/A","^SFT/B","^SFT/C","$","%","^SFT/F","^SFT/G","^SFT/H","^SFT/I","^SFT/J","+","^SFT/L","-",".","/","0","1","2","3","4","5","6","7","8","9","^SFT/Z","^SFT%F","^SFT%G","^SFT%H","^SFT%I","^SFT%J","^SFT%V","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","^SFT%K","^SFT%L","^SFT%M","^SFT%N","^SFT%O","^SFT%W","^SFT+A","^SFT+B","^SFT+C","^SFT+D","^SFT+E","^SFT+F","^SFT+G","^SFT+H","^SFT+I","^SFT+J","^SFT+K","^SFT+L","^SFT+M","^SFT+N","^SFT+O","^SFT+P","^SFT+Q","^SFT+R","^SFT+S","^SFT+T","^SFT+U","^SFT+V","^SFT+W","^SFT+X","^SFT+Y","^SFT+Z","^SFT%P","^SFT%Q","^SFT%R","^SFT%S","^SFT%T"]),t)t.hasOwnProperty(n)&&(le.$ctx[n]=t[n]);le.$ctx._7274=1}(),e.newcode=c(6*e.barlen),e.newtext=c(6*e.barlen),e.j=0,e.k=0;for(var a=0,u=e.barlen-1;a<=u;a+=1){e.i=a,e.extchar=A(e.extencs,A(e.barcode,e.i)),e.extlen=e.extchar.length,y(e.newcode,e.j,e.extchar),v(e.newtext,e.k,A(e.barcode,e.i)),1!=e.extlen&&y(e.newtext,e.k+1," "),e.j=e.j+e.extlen;var l=1==e.extlen?1:2;e.k=e.k+l}e.newcode=b(e.newcode,0,e.j),e.newtext=b(e.newtext,0,e.k),v(e.options,"dontdraw",!0),v(e.options,"parsefnc",!0),o[i++]="args",o[i++]=e.newcode,o[i++]=e.options,ce();var h=o[--i];if(e[o[--i]]=h,e.includetext){e.txt=A(e.args,"txt");for(var f=0,d=e.newtext.length-1;f<=d;f+=1)e.i=f,e.txtentry=A(e.txt,e.i),v(e.txtentry,0,b(e.newtext,e.i,1)),v(e.txt,e.i,e.txtentry);v(e.args,"txt",e.txt)}v(e.args,"opt",e.options),o[i++]=e.args,e.dontdraw||Wt()}function he(){var e=Object.create(he.$ctx||(he.$ctx={}));if(e.dontdraw=!1,e.includecheck=!1,e.includetext=!1,e.includecheckintext=!1,e.textfont="OCR-B",e.textsize=10,e.textyoffset=-8,e.height=1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],k(e.barcode,(function(){var e=o[--i];(e<48||e>57)&&(o[i++]="bwipp.interleaved2of5badCharacter#7365",o[i++]="Interleaved 2 of 5 must contain only digits",z())})),e.barlen=e.barcode.length,(e.barlen%2==0&&e.includecheck||e.barlen%2!=0&&!e.includecheck)&&(e.pad=c(e.barlen+1),v(e.pad,0,48),y(e.pad,1,e.barcode),e.barcode=e.pad,e.barlen=e.barlen+1),e.includecheck){e.checksum=0;for(var t=0,n=e.barlen-1;t<=n;t+=1)e.i=t,e.i%2==0?e.checksum=e.checksum+3*(A(e.barcode,e.i)-48):e.checksum=e.checksum+(A(e.barcode,e.i)-48);e.checksum=(10-e.checksum%10)%10,e.pad=c(e.barlen+1),y(e.pad,0,e.barcode),v(e.pad,e.barlen,e.checksum+48),e.barcode=e.pad,e.barlen=e.barlen+1}he.$ctx._7411||function(){var t=Object.create(e);for(var n in t.encs=s(["11221","21112","12112","22111","11212","21211","12211","11122","21121","12121","1111","2111"]),t.barchars="0123456789",t)t.hasOwnProperty(n)&&(he.$ctx[n]=t[n]);he.$ctx._7411=1}(),e.sbs=c(5*e.barlen+8),e.txt=s(e.barlen),y(e.sbs,0,A(e.encs,10));for(var r=0,a=e.barlen-1;r<=a;r+=2){e.i=r,C(e.barchars,b(e.barcode,e.i,1)),i--,e.indx=o[--i].length,i-=2,e.enca=A(e.encs,e.indx),C(e.barchars,b(e.barcode,e.i+1,1)),i--,e.indx=o[--i].length,i-=2,e.encb=A(e.encs,e.indx),e.intl=c(2*e.enca.length);for(var l=0,h=e.enca.length-1;l<=h;l+=1)e.j=l,e.achar=A(e.enca,e.j),e.bchar=A(e.encb,e.j),v(e.intl,2*e.j,e.achar),v(e.intl,2*e.j+1,e.bchar);y(e.sbs,5*e.i+4,e.intl),v(e.txt,e.i,s([b(e.barcode,e.i,1),9*e.i+4,e.textyoffset,e.textfont,e.textsize])),e.includecheck&&!e.includecheckintext&&e.barlen-2==e.i?v(e.txt,e.i+1,s([" ",9*(e.i+1)+4,e.textyoffset,e.textfont,e.textsize])):v(e.txt,e.i+1,s([b(e.barcode,e.i+1,1),9*(e.i+1)+4,e.textyoffset,e.textfont,e.textsize]))}y(e.sbs,5*e.barlen+4,A(e.encs,11)),o[i++]=1/0,o[i++]=1/0;for(var f=e.sbs,d=0,p=f.length;d<p;d++)o[i++]=A(f,d)-48;var m=s();o[i++]=1/0;for(var g=0,w=~~((e.sbs.length+1)/2);g<w;g++)o[i++]=e.height;var x=s();o[i++]=1/0;for(var E=0,S=~~((e.sbs.length+1)/2);E<S;E++)o[i++]=0;var _=s();o[i++]="ren",o[i++]=Wt,o[i++]="sbs",o[i++]=m,o[i++]="bhs",o[i++]=x,o[i++]="bbs",o[i++]=_,e.includetext&&(o[i++]="txt",o[i++]=e.txt),o[i++]="barratio",o[i++]=2,o[i++]="spaceratio",o[i++]=2,o[i++]="opt",o[i++]=e.options;var O=u();o[i++]=O,e.dontdraw||Wt()}function fe(){var e=Object.create(fe.$ctx||(fe.$ctx={}));e.dontdraw=!1,e.includetext=!1,e.includecheckintext=!0,e.textfont="OCR-B",e.textsize=10,e.textxoffset=0,e.textyoffset=3,e.height=.5,e.showborder=!0,e.borderwidth=4,e.borderleft=15,e.borderright=15,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],e.text=e.barcode;var t=e.barcode;o[i++]=c(t.length),o[i++]=0,k(t,(function(){var e=o[--i];if(o[i++]=e,32!=e){var t=o[--i],n=o[--i],r=o[--i];v(r,n,t),o[i++]=r,o[i++]=L(n+1)}else i--}));var n=o[--i];e.barcode=b(o[--i],0,n),e.hasspace=e.text.length!=e.barcode.length,13!=e.barcode.length&&14!=e.barcode.length&&(o[i++]="bwipp.itf14badLength#7531",o[i++]="ITF-14 must be 13 or 14 digits",z());for(var r=e.barcode,a=0,u=r.length;a<u;a++){var l=A(r,a);(l<48||l>57)&&(o[i++]="bwipp.itf14badCharacter#7535",o[i++]="ITF-14 must contain only digits",z())}e.checksum=0;for(var h=0;h<=12;h+=1){if(e.i=h,o[i++]="checksum",o[i++]=e.checksum,o[i++]=L(A(e.barcode,e.i)-48),e.i%2==0){var f=o[--i];o[i++]=3*f}var d=o[--i],p=o[--i];e[o[--i]]=L(p+d)}if(e.checksum=(10-e.checksum%10)%10,14==e.barcode.length)A(e.barcode,13)!=e.checksum+48&&(o[i++]="bwipp.itf14badCheckDigit#7548",o[i++]="Incorrect ITF-14 check digit provided",z());else{var m=c(14);y(m,0,e.barcode),v(m,13,e.checksum+48),e.barcode=m;var g=e.hasspace?2:1,w=c(e.text.length+g);y(w,w.length-2," "),v(w,w.length-1,e.checksum+48),y(w,0,e.text),e.text=w}v(e.options,"dontdraw",!0),v(e.options,"showborder",e.showborder),v(e.options,"borderwidth",e.borderwidth),v(e.options,"borderleft",e.borderleft),v(e.options,"borderright",e.borderright),v(e.options,"height",e.height),v(e.options,"textyoffset",e.textyoffset),o[i++]="args",o[i++]=e.barcode,o[i++]=e.options,he();var x=o[--i];e[o[--i]]=x,v(e.args,"txt",s([s([e.text,e.textxoffset,e.textyoffset,e.textfont,e.textsize])])),v(e.args,"textxalign","center"),v(e.args,"opt",e.options),o[i++]=e.args,e.dontdraw||Wt()}function de(){var e=Object.create(de.$ctx||(de.$ctx={}));e.dontdraw=!1,e.includetext=!1,e.textfont="OCR-B",e.textsize=10,e.textxoffset=0,e.textyoffset=-8,e.height=1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],11!=e.barcode.length&&12!=e.barcode.length&&(o[i++]="bwipp.identcodeBadLength#7624",o[i++]="Deutsche Post Identcode must be 11 or 12 digits",z()),k(e.barcode,(function(){var e=o[--i];(e<48||e>57)&&(o[i++]="bwipp.identcodeBadCharacter#7628",o[i++]="Deutsche Post Identcode must contain only digits",z())})),e.checksum=0;for(var t=0;t<=10;t+=1){if(e.i=t,o[i++]="checksum",o[i++]=e.checksum,o[i++]=L(A(e.barcode,e.i)-48),e.i%2==0){var n=o[--i];o[i++]=4*n}else{var r=o[--i];o[i++]=9*r}var a=o[--i],u=o[--i];e[o[--i]]=L(u+a)}e.checksum=(10-e.checksum%10)%10,12==e.barcode.length&&A(e.barcode,11)!=e.checksum+48&&(o[i++]="bwipp.identcodeBadCheckDigit#7641",o[i++]="Incorrect Deutsche Post Identcode check digit provided",z());var l=c(12);y(l,0,e.barcode),v(l,11,e.checksum+48),e.barcode=l,e.text=f(c(16),"  .       .     "),y(e.text,0,b(e.barcode,0,2)),y(e.text,3,b(e.barcode,2,3)),y(e.text,7,b(e.barcode,5,3)),y(e.text,11,b(e.barcode,8,3)),y(e.text,15,b(e.barcode,11,1)),v(e.options,"dontdraw",!0),v(e.options,"includecheck",!1);var h=e.barcode;o[i++]="args",o[i++]=h,o[i++]=e.options,he();var d=o[--i];e[o[--i]]=d;var p=e.textsize;v(e.args,"txt",s([s([e.text,e.textxoffset,e.textyoffset,e.textfont,p])])),v(e.args,"textxalign","center"),v(e.args,"opt",e.options),o[i++]=e.args,e.dontdraw||Wt()}function pe(){var e=Object.create(pe.$ctx||(pe.$ctx={}));e.dontdraw=!1,e.includetext=!1,e.textfont="OCR-B",e.textsize=10,e.textxoffset=0,e.textyoffset=-8,e.height=1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],13!=e.barcode.length&&14!=e.barcode.length&&(o[i++]="bwipp.leitcodeBadLength#7714",o[i++]="Deutsche Post Leitcode must be 13 or 14 digits",z()),k(e.barcode,(function(){var e=o[--i];(e<48||e>57)&&(o[i++]="bwipp.leitcodeBadCharacter#7718",o[i++]="Deutsche Post Leitcode must contain only digits",z())})),e.checksum=0;for(var t=0;t<=12;t+=1){if(e.i=t,o[i++]="checksum",o[i++]=e.checksum,o[i++]=L(A(e.barcode,e.i)-48),e.i%2==0){var n=o[--i];o[i++]=4*n}else{var r=o[--i];o[i++]=9*r}var a=o[--i],u=o[--i];e[o[--i]]=L(u+a)}e.checksum=(10-e.checksum%10)%10,14==e.barcode.length&&A(e.barcode,13)!=e.checksum+48&&(o[i++]="bwipp.leitcodeBadCheckDigit#7731",o[i++]="Incorrect Deutsche Post Leitcode check digit provided",z());var l=c(14);y(l,0,e.barcode),v(l,13,e.checksum+48),e.barcode=l,e.text=f(c(18),"     .   .   .    "),y(e.text,0,b(e.barcode,0,5)),y(e.text,6,b(e.barcode,5,3)),y(e.text,10,b(e.barcode,8,3)),y(e.text,14,b(e.barcode,11,2)),y(e.text,17,b(e.barcode,13,1)),v(e.options,"dontdraw",!0),v(e.options,"includecheck",!1);var h=e.barcode;o[i++]="args",o[i++]=h,o[i++]=e.options,he();var d=o[--i];e[o[--i]]=d;var p=e.textsize;v(e.args,"txt",s([s([e.text,e.textxoffset,e.textyoffset,e.textfont,p])])),v(e.args,"textxalign","center"),v(e.args,"opt",e.options),o[i++]=e.args,e.dontdraw||Wt()}function me(){var e=Object.create(me.$ctx||(me.$ctx={}));e.dontdraw=!1,e.height=33/72,e.linkage=!1,e.format="omni",e.barxmult=33,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],T(e.format,"truncated")&&(e.height=13/72),D(b(e.barcode,0,4),"(01)")&&(o[i++]="bwipp.databaromniBadAI#7808",o[i++]="GS1 DataBar Omnidirectional must begin with (01) application identifier",z()),17!=e.barcode.length&&18!=e.barcode.length&&(o[i++]="bwipp.databaromniBadLength#7811",o[i++]="GS1 DataBar Omnidirectional must be 13 or 14 digits",z());for(var t=b(e.barcode,4,e.barcode.length-4),n=0,r=t.length;n<r;n++){var a=A(t,n);(a<48||a>57)&&(o[i++]="bwipp.databaromniBadCharacter#7815",o[i++]="GS1 DataBar Omnidirectional must contain only digits",z())}e.checksum=0;for(var l=0;l<=12;l+=1){if(e.i=l,o[i++]="checksum",o[i++]=e.checksum,o[i++]=L(A(e.barcode,e.i+4)-48),e.i%2==0){var h=o[--i];o[i++]=3*h}var f=o[--i],d=o[--i];e[o[--i]]=L(d+f)}e.checksum=(10-e.checksum%10)%10,18==e.barcode.length&&A(e.barcode,17)!=e.checksum+48&&(o[i++]="bwipp.databaromniBadCheckDigit#7828",o[i++]="Incorrect GS1 DataBar Omnidirectional check digit provided",z());var p=c(18);y(p,0,e.barcode),v(p,17,e.checksum+48),e.barcode=p,e.txt=s(e.barcode.length);for(var m=0,g=e.barcode.length-1;m<=g;m+=1)e.i=m,v(e.txt,e.i,s([b(e.barcode,e.i,1),0,0,"",0]));e.ncr=function(){var e=o[--i],t=o[--i],n=L(t-e);if(e<L(t-e)){var r=n;n=e,e=r}o[i++]=n,o[i++]=1,o[i++]=1;for(var a=t,s=L(e+1);a>=s;a-=1){var u=o[--i],c=o[--i],l=o[--i];if(o[i++]=l,o[i++]=c,o[i++]=u*a,I(c,l)){var h=o[--i],f=o[--i];o[i++]=L(f+1),o[i++]=~~(h/f)}}for(;;){var d=o[--i],p=o[--i],m=o[--i];if(o[i++]=m,o[i++]=p,o[i++]=d,M(p,m))break;var g=o[--i],A=o[--i];o[i++]=L(A+1),o[i++]=~~(g/A)}var v=o[--i],b=o[--i];o[i++]=v,o[i++]=b,i--;var y=o[--i],w=o[--i];o[i++]=y,o[i++]=w,i--},e.getRSSwidths=function(){e.oe=o[--i],e.el=o[--i],e.mw=o[--i],e.nm=o[--i],e.val=o[--i],e.out=s(e.el),e.mask=0;for(var t=0,n=L(e.el-2);t<=n;t+=1){e.bar=t,e.ew=1;var r=e.bar;for(e.mask=e.mask|(r<0?1>>>-r:1<<r);;){o[i++]="sval",o[i++]=L(L(e.nm-e.ew)-1),o[i++]=L(L(e.el-e.bar)-2),e.ncr();var a=o[--i];if(e[o[--i]]=a,e.oe&&0==e.mask&&L(L(L(e.nm-e.ew)-2*e.el)+2*e.bar)>=-2){o[i++]="sval",o[i++]=e.sval,o[i++]=L(L(L(e.nm-e.ew)-e.el)+e.bar),o[i++]=L(L(e.el-e.bar)-2),e.ncr();var u=o[--i],c=o[--i];e[o[--i]]=L(c-u)}if(L(e.el-e.bar)>2){e.lval=0;for(var l=L(L(L(L(e.nm-e.ew)-e.el)+e.bar)+2),h=L(e.mw+1);l>=h;l-=1)o[i++]=L(L(L(e.nm-l)-e.ew)-1),o[i++]=L(L(e.el-e.bar)-3),e.ncr(),e.lval=L(o[--i]+e.lval);e.sval=L(e.sval-e.lval*L(L(e.el-e.bar)-1))}else L(e.nm-e.ew)>e.mw&&(e.sval=L(e.sval-1));if(e.val=L(e.val-e.sval),e.val<0)break;e.ew=e.ew+1;var f=e.bar;e.mask=e.mask&~(f<0?1>>>-f:1<<f)}e.val=L(e.val+e.sval),e.nm=L(e.nm-e.ew),v(e.out,e.bar,e.ew)}v(e.out,L(e.el-1),e.nm),o[i++]=e.out},o[i++]=1/0;var w=e.linkage?1:0,x=b(e.barcode,4,13);o[i++]=w;for(var C=0,E=x.length;C<E;C++)o[i++]=L(A(x,C)-48);e.binval=s();for(var S=0;S<=12;S+=1){e.i=S;var B=e.binval,j=e.i;v(B,j+1,L(A(B,j+1)+A(e.binval,e.i)%4537077*10)),v(e.binval,e.i,~~(A(e.binval,e.i)/4537077))}e.right=A(e.binval,13)%4537077;var N=e.binval;v(N,13,~~(A(N,13)/4537077)),e.left=0,e.i=!0;for(var F=0;F<=13;F+=1){e.j=F;var R=A(e.binval,e.j);o[i++]=R,0==R&&e.i?i--:(e.i=!1,e.left=L(e.left+o[--i]*~~Math.pow(10,13-e.j)))}for(e.d1=~~(e.left/1597),e.d2=e.left%1597,e.d3=~~(e.right/1597),e.d4=e.right%1597,me.$ctx._7944||function(){var t=Object.create(e);for(var n in t.tab164=s([160,0,12,4,8,1,161,1,960,161,10,6,6,3,80,10,2014,961,8,8,4,5,31,34,2714,2015,6,10,3,6,10,70,2840,2715,4,12,1,8,1,126]),t.tab154=s([335,0,5,10,2,7,4,84,1035,336,7,8,4,5,20,35,1515,1036,9,6,6,3,48,10,1596,1516,11,4,8,1,81,1]),t)t.hasOwnProperty(n)&&(me.$ctx[n]=t[n]);me.$ctx._7944=1}(),e.i=0;;){if(e.d1<=A(e.tab164,e.i)){for(var P=b(e.tab164,e.i+1,7),H=0,$=P.length;H<$;H++)o[i++]=A(P,H);e.d1te=o[--i],e.d1to=o[--i],e.d1mwe=o[--i],e.d1mwo=o[--i],e.d1ele=o[--i],e.d1elo=o[--i],e.d1gs=o[--i];break}e.i=e.i+8}for(e.i=0;;){if(e.d2<=A(e.tab154,e.i)){for(var V=b(e.tab154,e.i+1,7),q=0,G=V.length;q<G;q++)o[i++]=A(V,q);e.d2te=o[--i],e.d2to=o[--i],e.d2mwe=o[--i],e.d2mwo=o[--i],e.d2ele=o[--i],e.d2elo=o[--i],e.d2gs=o[--i];break}e.i=e.i+8}for(e.i=0;;){if(e.d3<=A(e.tab164,e.i)){for(var W=b(e.tab164,e.i+1,7),K=0,Y=W.length;K<Y;K++)o[i++]=A(W,K);e.d3te=o[--i],e.d3to=o[--i],e.d3mwe=o[--i],e.d3mwo=o[--i],e.d3ele=o[--i],e.d3elo=o[--i],e.d3gs=o[--i];break}e.i=e.i+8}for(e.i=0;;){if(e.d4<=A(e.tab154,e.i)){for(var X=b(e.tab154,e.i+1,7),J=0,Z=X.length;J<Z;J++)o[i++]=A(X,J);e.d4te=o[--i],e.d4to=o[--i],e.d4mwe=o[--i],e.d4mwo=o[--i],e.d4ele=o[--i],e.d4elo=o[--i],e.d4gs=o[--i];break}e.i=e.i+8}o[i++]="d1wo",o[i++]=~~(L(e.d1-e.d1gs)/e.d1te),o[i++]=e.d1elo,o[i++]=e.d1mwo,o[i++]=4,o[i++]=!1,e.getRSSwidths();var ee=o[--i];e[o[--i]]=ee,o[i++]="d1we",o[i++]=L(e.d1-e.d1gs)%e.d1te,o[i++]=e.d1ele,o[i++]=e.d1mwe,o[i++]=4,o[i++]=!0,e.getRSSwidths();var te=o[--i];e[o[--i]]=te,o[i++]="d2wo",o[i++]=L(e.d2-e.d2gs)%e.d2to,o[i++]=e.d2elo,o[i++]=e.d2mwo,o[i++]=4,o[i++]=!0,e.getRSSwidths();var ne=o[--i];e[o[--i]]=ne,o[i++]="d2we",o[i++]=~~(L(e.d2-e.d2gs)/e.d2to),o[i++]=e.d2ele,o[i++]=e.d2mwe,o[i++]=4,o[i++]=!1,e.getRSSwidths();var re=o[--i];e[o[--i]]=re,o[i++]="d3wo",o[i++]=~~(L(e.d3-e.d3gs)/e.d3te),o[i++]=e.d3elo,o[i++]=e.d3mwo,o[i++]=4,o[i++]=!1,e.getRSSwidths();var ie=o[--i];e[o[--i]]=ie,o[i++]="d3we",o[i++]=L(e.d3-e.d3gs)%e.d3te,o[i++]=e.d3ele,o[i++]=e.d3mwe,o[i++]=4,o[i++]=!0,e.getRSSwidths();var oe=o[--i];e[o[--i]]=oe,o[i++]="d4wo",o[i++]=L(e.d4-e.d4gs)%e.d4to,o[i++]=e.d4elo,o[i++]=e.d4mwo,o[i++]=4,o[i++]=!0,e.getRSSwidths();var ae=o[--i];e[o[--i]]=ae,o[i++]="d4we",o[i++]=~~(L(e.d4-e.d4gs)/e.d4to),o[i++]=e.d4ele,o[i++]=e.d4mwe,o[i++]=4,o[i++]=!1,e.getRSSwidths();var se=o[--i];e[o[--i]]=se,e.d1w=s(8);for(var ue=0;ue<=3;ue+=1)e.i=ue,v(e.d1w,2*e.i,A(e.d1wo,e.i)),v(e.d1w,2*e.i+1,A(e.d1we,e.i));e.d2w=s(8);for(var ce=0;ce<=3;ce+=1)e.i=ce,v(e.d2w,7-2*e.i,A(e.d2wo,e.i)),v(e.d2w,6-2*e.i,A(e.d2we,e.i));e.d3w=s(8);for(var le=0;le<=3;le+=1)e.i=le,v(e.d3w,7-2*e.i,A(e.d3wo,e.i)),v(e.d3w,6-2*e.i,A(e.d3we,e.i));e.d4w=s(8);for(var he=0;he<=3;he+=1)e.i=he,v(e.d4w,2*e.i,A(e.d4wo,e.i)),v(e.d4w,2*e.i+1,A(e.d4we,e.i));o[i++]=1/0;for(var fe=e.d1w,de=0,pe=fe.length;de<pe;de++)o[i++]=A(fe,de);for(var ge=e.d2w,Ae=0,ve=ge.length;Ae<ve;Ae++)o[i++]=A(ge,Ae);for(var be=e.d3w,ye=0,we=be.length;ye<we;ye++)o[i++]=A(be,ye);for(var xe=e.d4w,Ce=0,ke=xe.length;Ce<ke;Ce++)o[i++]=A(xe,Ce);e.widths=s(),me.$ctx._8051||function(){var t=Object.create(e);for(var n in t.checkweights=s([1,3,9,27,2,6,18,54,58,72,24,8,29,36,12,4,74,51,17,32,37,65,48,16,64,34,23,69,49,68,46,59]),t.checkwidths=s([3,8,2,1,1,3,5,5,1,1,3,3,7,1,1,3,1,9,1,1,2,7,4,1,1,2,5,6,1,1,2,3,8,1,1,1,5,7,1,1,1,3,9,1,1]),t)t.hasOwnProperty(n)&&(me.$ctx[n]=t[n]);me.$ctx._8051=1}(),e.checksum=0;for(var Ee=0;Ee<=31;Ee+=1)e.i=Ee,e.checksum=L(e.checksum+A(e.widths,e.i)*A(e.checkweights,e.i));e.checksum=e.checksum%79,e.checksum>=8&&(e.checksum=L(e.checksum+1)),e.checksum>=72&&(e.checksum=L(e.checksum+1)),e.checklt=b(e.checkwidths,5*~~(e.checksum/9),5),e.checkrtrev=b(e.checkwidths,e.checksum%9*5,5),e.checkrt=s(5);for(var Se=0;Se<=4;Se+=1)e.i=Se,v(e.checkrt,e.i,A(e.checkrtrev,4-e.i));if(T(e.format,"omni")||T(e.format,"truncated")){o[i++]=1/0;var _e=e.d1w;o[i++]=1;for(var Oe=0,Te=_e.length;Oe<Te;Oe++)o[i++]=A(_e,Oe);for(var De=e.checklt,Be=0,Ie=De.length;Be<Ie;Be++)o[i++]=A(De,Be);for(var Me=e.d2w,je=0,Ne=Me.length;je<Ne;je++)o[i++]=A(Me,je);for(var Fe=e.d4w,Re=0,Pe=Fe.length;Re<Pe;Re++)o[i++]=A(Fe,Re);for(var Le=e.checkrt,Ue=0,ze=Le.length;Ue<ze;Ue++)o[i++]=A(Le,Ue);for(var He=e.d3w,$e=0,Qe=He.length;$e<Qe;$e++)o[i++]=A(He,$e);o[i++]=1,o[i++]=1,e.sbs=s(),o[i++]=1/0;var Ve=e.sbs;o[i++]=1/0;for(var qe=0,Ge=~~((e.sbs.length+1)/2);qe<Ge;qe++)o[i++]=e.height;var We=s();o[i++]=1/0;for(var Ke=0,Ye=~~((e.sbs.length+1)/2);Ke<Ye;Ke++)o[i++]=0;var Xe=s();o[i++]="ren",o[i++]=Wt,o[i++]="sbs",o[i++]=Ve,o[i++]="bhs",o[i++]=We,o[i++]="bbs",o[i++]=Xe,o[i++]="txt",o[i++]=e.txt,o[i++]="textxalign",o[i++]="center",o[i++]="opt",o[i++]=e.options;var Je=u();o[i++]=Je,e.dontdraw||Wt()}else{o[i++]=1/0;var Ze=e.d1w;o[i++]=1,o[i++]=1;for(var et=0,tt=Ze.length;et<tt;et++)o[i++]=A(Ze,et);for(var nt=e.checklt,rt=0,it=nt.length;rt<it;rt++)o[i++]=A(nt,rt);for(var ot=e.d2w,at=0,st=ot.length;at<st;at++)o[i++]=A(ot,at);o[i++]=1,o[i++]=1,o[i++]=0,e.top=s(),o[i++]=1/0;var ut=e.d4w;o[i++]=1,o[i++]=1;for(var ct=0,lt=ut.length;ct<lt;ct++)o[i++]=A(ut,ct);for(var ht=e.checkrt,ft=0,dt=ht.length;ft<dt;ft++)o[i++]=A(ht,ft);for(var pt=e.d3w,mt=0,gt=pt.length;mt<gt;mt++)o[i++]=A(pt,mt);o[i++]=1,o[i++]=1,o[i++]=0,e.bot=s();for(var At=0;At<=24;At+=2){e.i=At;for(var vt=0,bt=A(e.top,e.i);vt<bt;vt++)o[i++]=0;for(var yt=0,wt=A(e.top,e.i+1);yt<wt;yt++)o[i++]=1}O(s(50)),e.top=o[--i];for(var xt=0;xt<=24;xt+=2){e.i=xt;for(var Ct=0,kt=A(e.bot,e.i);Ct<kt;Ct++)o[i++]=1;for(var Et=0,St=A(e.bot,e.i+1);Et<St;Et++)o[i++]=0}if(O(s(50)),e.bot=o[--i],T(e.format,"stacked")){e.sep=s(50),v(e.sep,0,0);for(var _t=1;_t<=49;_t+=1)e.i=_t,T(A(e.top,e.i),A(e.bot,e.i))?v(e.sep,e.i,L(1-A(e.top,e.i))):v(e.sep,e.i,L(1-A(e.sep,e.i-1)));y(e.sep,0,s([0,0,0,0])),y(e.sep,46,s([0,0,0,0])),o[i++]=1/0;for(var Ot=0;Ot<5;Ot++)_(e.top);_(e.sep);for(var Tt=0;Tt<7;Tt++)_(e.bot);e.pixs=s(),e.pixy=~~(e.pixs.length/50)}if(T(e.format,"stackedomni")){o[i++]=1/0,k(e.top,(function(){var e=o[--i];o[i++]=L(1-e)})),e.sep1=s(),y(e.sep1,0,s([0,0,0,0])),y(e.sep1,46,s([0,0,0,0]));for(var Dt=18;Dt<=30;Dt+=1){if(e.i=Dt,0==A(e.top,e.i))if(1==A(e.top,e.i-1))o[i++]=1;else{var Bt=0==A(e.sep1,e.i-1)?1:0;o[i++]=Bt}else o[i++]=0;v(e.sep1,e.i,o[--i])}o[i++]=1/0,o[i++]=0,o[i++]=0,o[i++]=0,o[i++]=0;for(var It=0;It<21;It++)o[i++]=0,o[i++]=1;o[i++]=0,o[i++]=0,o[i++]=0,o[i++]=0,e.sep2=s(),o[i++]=1/0,k(e.bot,(function(){var e=o[--i];o[i++]=L(1-e)})),e.sep3=s(),y(e.sep3,0,s([0,0,0,0])),y(e.sep3,46,s([0,0,0,0]));for(var Mt=19;Mt<=31;Mt+=1){if(e.i=Mt,0==A(e.bot,e.i))if(1==A(e.bot,e.i-1))o[i++]=1;else{var jt=0==A(e.sep3,e.i-1)?1:0;o[i++]=jt}else o[i++]=0;v(e.sep3,e.i,o[--i])}e.f3=s([1,1,1,1,1,1,1,1,1,0,1,1,1]),o[i++]=!0;for(var Nt=0;Nt<=12;Nt+=1){var Ft=o[--i];o[i++]=Ft&&T(A(e.bot,Nt+19),A(e.f3,Nt))}o[--i]&&y(e.sep3,19,s([0,0,0,0,0,0,0,0,0,0,1,0,0])),o[i++]=1/0;for(var Rt=0,Pt=e.barxmult;Rt<Pt;Rt++)_(e.top);_(e.sep1),_(e.sep2),_(e.sep3);for(var Lt=0,Ut=e.barxmult;Lt<Ut;Lt++)_(e.bot);e.pixs=s(),e.pixy=~~(e.pixs.length/50)}var zt=new Map([["ren",Q],["pixs",e.pixs],["pixx",50],["pixy",e.pixy],["height",e.pixy/72],["width",50/72],["opt",e.options]]);o[i++]=zt,e.dontdraw||Q()}}function ge(){var e=Object.create(ge.$ctx||(ge.$ctx={}));e.dontdraw=!1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],D(b(e.barcode,0,4),"(01)")&&(o[i++]="bwipp.databarstackedBadAI#8234",o[i++]="GS1 DataBar Stacked must begin with (01) application identifier",z()),17!=e.barcode.length&&18!=e.barcode.length&&(o[i++]="bwipp.databarstackedBadLength#8237",o[i++]="GS1 DataBar Stacked must be 13 or 14 digits",z());for(var t=b(e.barcode,4,e.barcode.length-4),n=0,r=t.length;n<r;n++){var a=A(t,n);(a<48||a>57)&&(o[i++]="bwipp.databarstackedBadCharacter#8241",o[i++]="GS1 DataBar Stacked must contain only digits",z())}e.checksum=0;for(var s=0;s<=12;s+=1){if(e.i=s,o[i++]="checksum",o[i++]=e.checksum,o[i++]=L(A(e.barcode,e.i+4)-48),e.i%2==0){var u=o[--i];o[i++]=3*u}var l=o[--i],h=o[--i];e[o[--i]]=L(h+l)}e.checksum=(10-e.checksum%10)%10,18==e.barcode.length&&A(e.barcode,17)!=e.checksum+48&&(o[i++]="bwipp.databarstackedBadCheckDigit#8254",o[i++]="Incorrect GS1 DataBar Stacked check digit provided",z());var f=c(18);y(f,0,e.barcode),v(f,17,e.checksum+48),e.barcode=f,v(e.options,"dontdraw",!0),v(e.options,"format","stacked"),o[i++]="args",o[i++]=e.barcode,o[i++]=e.options,me();var d=o[--i];e[o[--i]]=d,v(e.args,"opt",e.options),o[i++]=e.args,e.dontdraw||Q()}function Ae(){var e=Object.create(Ae.$ctx||(Ae.$ctx={}));e.dontdraw=!1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],D(b(e.barcode,0,4),"(01)")&&(o[i++]="bwipp.databarstackedomniBadAI#8312",o[i++]="GS1 DataBar Stacked Omnidirectional must begin with (01) application identifier",z()),17!=e.barcode.length&&18!=e.barcode.length&&(o[i++]="bwipp.databarstackedomniBadLength#8315",o[i++]="GS1 DataBar Stacked Omnidirectional must be 13 or 14 digits",z());for(var t=b(e.barcode,4,e.barcode.length-4),n=0,r=t.length;n<r;n++){var a=A(t,n);(a<48||a>57)&&(o[i++]="bwipp.databarstackedomniBadCharacter#8319",o[i++]="GS1 DataBar Stacked Omnidirectional must contain only digits",z())}e.checksum=0;for(var s=0;s<=12;s+=1){if(e.i=s,o[i++]="checksum",o[i++]=e.checksum,o[i++]=L(A(e.barcode,e.i+4)-48),e.i%2==0){var u=o[--i];o[i++]=3*u}var l=o[--i],h=o[--i];e[o[--i]]=L(h+l)}e.checksum=(10-e.checksum%10)%10,18==e.barcode.length&&A(e.barcode,17)!=e.checksum+48&&(o[i++]="bwipp.databarstackedomniBadCheckDigit#8332",o[i++]="Incorrect GS1 DataBar Stacked Omnidirectional check digit provided",z());var f=c(18);y(f,0,e.barcode),v(f,17,e.checksum+48),e.barcode=f,v(e.options,"dontdraw",!0),v(e.options,"format","stackedomni"),o[i++]="args",o[i++]=e.barcode,o[i++]=e.options,me();var d=o[--i];e[o[--i]]=d,v(e.args,"opt",e.options),o[i++]=e.args,e.dontdraw||Q()}function ve(){var e=Object.create(ve.$ctx||(ve.$ctx={}));e.dontdraw=!1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],D(b(e.barcode,0,4),"(01)")&&(o[i++]="bwipp.databartruncatedBadAI#8390",o[i++]="GS1 DataBar Truncated must begin with (01) application identifier",z()),17!=e.barcode.length&&18!=e.barcode.length&&(o[i++]="bwipp.databartruncatedBadLength#8393",o[i++]="GS1 DataBar Truncated must be 13 or 14 digits",z());for(var t=b(e.barcode,4,e.barcode.length-4),n=0,r=t.length;n<r;n++){var a=A(t,n);(a<48||a>57)&&(o[i++]="bwipp.databartruncatedBadCharacter#8397",o[i++]="GS1 DataBar Truncated must contain only digits",z())}e.checksum=0;for(var s=0;s<=12;s+=1){if(e.i=s,o[i++]="checksum",o[i++]=e.checksum,o[i++]=L(A(e.barcode,e.i+4)-48),e.i%2==0){var u=o[--i];o[i++]=3*u}var l=o[--i],h=o[--i];e[o[--i]]=L(h+l)}e.checksum=(10-e.checksum%10)%10,18==e.barcode.length&&A(e.barcode,17)!=e.checksum+48&&(o[i++]="bwipp.databartruncatedBadCheckDigit#8410",o[i++]="Incorrect GS1 DataBar Truncated check digit provided",z());var f=c(18);y(f,0,e.barcode),v(f,17,e.checksum+48),e.barcode=f,v(e.options,"dontdraw",!0),v(e.options,"format","truncated"),o[i++]="args",o[i++]=e.barcode,o[i++]=e.options,me();var d=o[--i];e[o[--i]]=d,v(e.args,"opt",e.options),o[i++]=e.args,e.dontdraw||Wt()}function be(){var e=Object.create(be.$ctx||(be.$ctx={}));e.dontdraw=!1,e.height=10/72,e.linkage=!1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],D(b(e.barcode,0,4),"(01)")&&(o[i++]="bwipp.databarlimitedBadAI#8473",o[i++]="GS1 DataBar Limited must begin with (01) application identifier",z()),17!=e.barcode.length&&18!=e.barcode.length&&(o[i++]="bwipp.databarlimitedBadLength#8476",o[i++]="GS1 DataBar Limited must be 13 or 14 digits",z());var t=A(e.barcode,4);(t<48||t>49)&&(o[i++]="bwipp.databarlimitedBadStartDigit#8479",o[i++]="GS1 DataBar Limited must begin with 0 or 1",z());for(var n=b(e.barcode,5,e.barcode.length-5),r=0,a=n.length;r<a;r++){var l=A(n,r);(l<48||l>57)&&(o[i++]="bwipp.databarlimitedBadCharacter#8483",o[i++]="GS1 DataBar Limited must contain only digits",z())}e.checksum=0;for(var h=0;h<=12;h+=1){if(e.i=h,o[i++]="checksum",o[i++]=e.checksum,o[i++]=L(A(e.barcode,e.i+4)-48),e.i%2==0){var f=o[--i];o[i++]=3*f}var d=o[--i],p=o[--i];e[o[--i]]=L(p+d)}e.checksum=(10-e.checksum%10)%10,18==e.barcode.length&&A(e.barcode,17)!=e.checksum+48&&(o[i++]="bwipp.databarlimitedBadCheckDigit#8496",o[i++]="Incorrect GS1 DataBar Limited check digit provided",z());var m=c(18);y(m,0,e.barcode),v(m,17,e.checksum+48),e.barcode=m,be.$ctx._8507||function(){var t=Object.create(e);for(var n in t.linkval=s([2,0,1,5,1,3,3,5,3,1,0,9,6]),t)t.hasOwnProperty(n)&&(be.$ctx[n]=t[n]);be.$ctx._8507=1}(),o[i++]=1/0;for(var g=b(e.barcode,4,13),w=0,x=g.length;w<x;w++)o[i++]=L(A(g,w)-48);if(e.binval=s(),e.linkage)for(var C=0,k=e.binval.length-1;C<=k;C+=1)e.i=C,v(e.binval,e.i,L(A(e.binval,e.i)+A(e.linkval,e.i)));e.txt=s(e.barcode.length);for(var E=0,S=e.barcode.length-1;E<=S;E+=1)e.i=E,v(e.txt,e.i,s([b(e.barcode,e.i,1),0,0,"",0]));e.ncr=function(){var e=o[--i],t=o[--i],n=L(t-e);if(e<L(t-e)){var r=n;n=e,e=r}o[i++]=n,o[i++]=1,o[i++]=1;for(var a=t,s=L(e+1);a>=s;a-=1){var u=o[--i],c=o[--i],l=o[--i];if(o[i++]=l,o[i++]=c,o[i++]=u*a,I(c,l)){var h=o[--i],f=o[--i];o[i++]=L(f+1),o[i++]=~~(h/f)}}for(;;){var d=o[--i],p=o[--i],m=o[--i];if(o[i++]=m,o[i++]=p,o[i++]=d,M(p,m))break;var g=o[--i],A=o[--i];o[i++]=L(A+1),o[i++]=~~(g/A)}var v=o[--i],b=o[--i];o[i++]=v,o[i++]=b,i--;var y=o[--i],w=o[--i];o[i++]=y,o[i++]=w,i--},e.getRSSwidths=function(){e.oe=o[--i],e.el=o[--i],e.mw=o[--i],e.nm=o[--i],e.val=o[--i],e.out=s(e.el),e.mask=0;for(var t=0,n=L(e.el-2);t<=n;t+=1){e.bar=t,e.ew=1;var r=e.bar;for(e.mask=e.mask|(r<0?1>>>-r:1<<r);;){o[i++]="sval",o[i++]=L(L(e.nm-e.ew)-1),o[i++]=L(L(e.el-e.bar)-2),e.ncr();var a=o[--i];if(e[o[--i]]=a,e.oe&&0==e.mask&&L(L(L(e.nm-e.ew)-2*e.el)+2*e.bar)>=-2){o[i++]="sval",o[i++]=e.sval,o[i++]=L(L(L(e.nm-e.ew)-e.el)+e.bar),o[i++]=L(L(e.el-e.bar)-2),e.ncr();var u=o[--i],c=o[--i];e[o[--i]]=L(c-u)}if(L(e.el-e.bar)>2){e.lval=0;for(var l=L(L(L(L(e.nm-e.ew)-e.el)+e.bar)+2),h=L(e.mw+1);l>=h;l-=1)o[i++]=L(L(L(e.nm-l)-e.ew)-1),o[i++]=L(L(e.el-e.bar)-3),e.ncr(),e.lval=L(o[--i]+e.lval);e.sval=L(e.sval-e.lval*L(L(e.el-e.bar)-1))}else L(e.nm-e.ew)>e.mw&&(e.sval=L(e.sval-1));if(e.val=L(e.val-e.sval),e.val<0)break;e.ew=e.ew+1;var f=e.bar;e.mask=e.mask&~(f<0?1>>>-f:1<<f)}e.val=L(e.val+e.sval),e.nm=L(e.nm-e.ew),v(e.out,e.bar,e.ew)}v(e.out,L(e.el-1),e.nm),o[i++]=e.out};for(var _=0;_<=11;_+=1){e.i=_;var O=e.binval,T=e.i;v(O,T+1,L(A(O,T+1)+A(e.binval,e.i)%2013571*10)),v(e.binval,e.i,~~(A(e.binval,e.i)/2013571))}e.d2=A(e.binval,12)%2013571;var B=e.binval;v(B,12,~~(A(B,12)/2013571)),e.d1=0,e.i=!0;for(var j=0;j<=12;j+=1){e.j=j;var N=A(e.binval,e.j);o[i++]=N,0==N&&e.i?i--:(e.i=!1,e.d1=L(e.d1+o[--i]*~~Math.pow(10,12-e.j)))}for(be.$ctx._8611||function(){var t=Object.create(e);for(var n in t.tab267=s([183063,0,17,9,6,3,6538,28,820063,183064,13,13,5,4,875,728,1000775,820064,9,17,3,6,28,6454,1491020,1000776,15,11,5,4,2415,203,1979844,1491021,11,15,4,5,203,2408,1996938,1979845,19,7,8,1,17094,1,2013570,1996939,7,19,1,8,1,16632]),t)t.hasOwnProperty(n)&&(be.$ctx[n]=t[n]);be.$ctx._8611=1}(),e.i=0;;){if(e.d1<=A(e.tab267,e.i)){for(var F=b(e.tab267,e.i+1,7),R=0,P=F.length;R<P;R++)o[i++]=A(F,R);e.d1te=o[--i],e.d1to=o[--i],e.d1mwe=o[--i],e.d1mwo=o[--i],e.d1ele=o[--i],e.d1elo=o[--i],e.d1gs=o[--i];break}e.i=e.i+8}for(e.i=0;;){if(e.d2<=A(e.tab267,e.i)){for(var H=b(e.tab267,e.i+1,7),$=0,Q=H.length;$<Q;$++)o[i++]=A(H,$);e.d2te=o[--i],e.d2to=o[--i],e.d2mwe=o[--i],e.d2mwo=o[--i],e.d2ele=o[--i],e.d2elo=o[--i],e.d2gs=o[--i];break}e.i=e.i+8}o[i++]="d1wo",o[i++]=~~(L(e.d1-e.d1gs)/e.d1te),o[i++]=e.d1elo,o[i++]=e.d1mwo,o[i++]=7,o[i++]=!1,e.getRSSwidths();var V=o[--i];e[o[--i]]=V,o[i++]="d1we",o[i++]=L(e.d1-e.d1gs)%e.d1te,o[i++]=e.d1ele,o[i++]=e.d1mwe,o[i++]=7,o[i++]=!0,e.getRSSwidths();var q=o[--i];e[o[--i]]=q,o[i++]="d2wo",o[i++]=~~(L(e.d2-e.d2gs)/e.d2te),o[i++]=e.d2elo,o[i++]=e.d2mwo,o[i++]=7,o[i++]=!1,e.getRSSwidths();var G=o[--i];e[o[--i]]=G,o[i++]="d2we",o[i++]=L(e.d2-e.d2gs)%e.d2te,o[i++]=e.d2ele,o[i++]=e.d2mwe,o[i++]=7,o[i++]=!0,e.getRSSwidths();var W=o[--i];e[o[--i]]=W,e.d1w=s(14);for(var K=0;K<=6;K+=1)e.i=K,v(e.d1w,2*e.i,A(e.d1wo,e.i)),v(e.d1w,2*e.i+1,A(e.d1we,e.i));e.d2w=s(14);for(var Y=0;Y<=6;Y+=1)e.i=Y,v(e.d2w,2*e.i,A(e.d2wo,e.i)),v(e.d2w,2*e.i+1,A(e.d2we,e.i));o[i++]=1/0;for(var X=e.d1w,J=0,Z=X.length;J<Z;J++)o[i++]=A(X,J);for(var ee=e.d2w,te=0,ne=ee.length;te<ne;te++)o[i++]=A(ee,te);e.widths=s(),be.$ctx._8682||function(){var t=Object.create(e);t.checkweights=s([1,3,9,27,81,65,17,51,64,14,42,37,22,66,20,60,2,6,18,54,73,41,34,13,39,28,84,74]),o[i++]=1/0;for(var n=0;n<=43;n+=1)o[i++]=n;o[i++]=45,o[i++]=52,o[i++]=57;for(var r=63;r<=66;r+=1)o[i++]=r;for(var a=73;a<=79;a+=1)o[i++]=a;o[i++]=82;for(var u=126;u<=130;u+=1)o[i++]=u;o[i++]=132;for(var c=141;c<=146;c+=1)o[i++]=c;for(var l=210;l<=217;l+=1)o[i++]=l;o[i++]=220;for(var h=316;h<=320;h+=1)o[i++]=h;for(var f in o[i++]=322,o[i++]=323,o[i++]=326,o[i++]=337,t.checkseq=s(),t)t.hasOwnProperty(f)&&(be.$ctx[f]=t[f]);be.$ctx._8682=1}(),e.checksum=0;for(var re=0;re<=27;re+=1)e.i=re,e.checksum=L(e.checksum+A(e.widths,e.i)*A(e.checkweights,e.i));e.checksum=e.checksum%89,e.seq=A(e.checkseq,e.checksum),o[i++]="swidths",o[i++]=~~(e.seq/21),o[i++]=8,o[i++]=3,o[i++]=6,o[i++]=!1,e.getRSSwidths();var ie=o[--i];e[o[--i]]=ie,o[i++]="bwidths",o[i++]=e.seq%21,o[i++]=8,o[i++]=3,o[i++]=6,o[i++]=!1,e.getRSSwidths();var oe=o[--i];e[o[--i]]=oe,e.checkwidths=s([0,0,0,0,0,0,0,0,0,0,0,0,1,1]);for(var ae=0;ae<=5;ae+=1)e.i=ae,v(e.checkwidths,2*e.i,A(e.swidths,e.i)),v(e.checkwidths,2*e.i+1,A(e.bwidths,e.i));o[i++]=1/0;var se=e.d1w;o[i++]=1;for(var ue=0,ce=se.length;ue<ce;ue++)o[i++]=A(se,ue);for(var le=e.checkwidths,he=0,fe=le.length;he<fe;he++)o[i++]=A(le,he);for(var de=e.d2w,pe=0,me=de.length;pe<me;pe++)o[i++]=A(de,pe);o[i++]=1,o[i++]=1,o[i++]=5,e.sbs=s(),o[i++]=1/0;var ge=e.sbs;o[i++]=1/0;for(var Ae=0,ve=~~((e.sbs.length+1)/2);Ae<ve;Ae++)o[i++]=e.height;var ye=s();o[i++]=1/0;for(var we=0,xe=~~((e.sbs.length+1)/2);we<xe;we++)o[i++]=0;var Ce=s();o[i++]="ren",o[i++]=Wt,o[i++]="sbs",o[i++]=ge,o[i++]="bhs",o[i++]=ye,o[i++]="bbs",o[i++]=Ce,o[i++]="txt",o[i++]=e.txt,o[i++]="textxalign",o[i++]="center",o[i++]="opt",o[i++]=e.options;var ke=u();o[i++]=ke,e.dontdraw||Wt()}function ye(){var e=Object.create(ye.$ctx||(ye.$ctx={}));if(e.parse=!1,e.dontlint=!1,e.lintreqs=!0,e.dontdraw=!1,e.height=34/72,e.format="expanded",e.segments=-1,e.linkage=!1,e.barxmult=34,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],-1==e.segments){var t=T(e.format,"expandedstacked")?4:22;e.segments=t}else(e.segments<2||e.segments>22||e.segments%2!=0)&&(o[i++]="bwipp.gs1databarexpandedBadSegments#8774",o[i++]="The number of segments must be even from 2 to 22",z());for(o[i++]=e.barcode,o[i++]="ai",$(),e.fncs=o[--i],e.vals=o[--i],e.ais=o[--i];;){if(2==e.ais.length&&T(A(e.ais,0),"01")&&T(A(e.ais,1),"3103")&&T(b(A(e.vals,0),0,1),"9")&&p(A(e.vals,1))<=32767){o[i++]="0100",o[i++]=!1;break}if(2==e.ais.length&&T(A(e.ais,0),"01")&&T(A(e.ais,1),"3202")&&T(b(A(e.vals,0),0,1),"9")&&p(A(e.vals,1))<=9999){o[i++]="0101",o[i++]=!1;break}if(2==e.ais.length&&T(A(e.ais,0),"01")&&T(A(e.ais,1),"3203")&&T(b(A(e.vals,0),0,1),"9")&&p(A(e.vals,1))<=22767){o[i++]="0101",o[i++]=!1;break}var n=e.ais.length;if(2==n||3==n){o[i++]="ai310x",o[i++]=!1;for(var r=3100;r<=3109;r+=1){var a=o[--i];o[i++]=a||T(m(c(4),r,10),A(e.ais,1))}var l=o[--i];e[o[--i]]=l,o[i++]="ai320x",o[i++]=!1;for(var h=3200;h<=3209;h+=1){var d=o[--i];o[i++]=d||T(m(c(4),h,10),A(e.ais,1))}var g=o[--i];if(e[o[--i]]=g,3==e.ais.length){var w=s(["11","13","15","17"]);o[i++]="aibad",o[i++]=!0;for(var x=0,C=w.length;x<C;x++){var E=o[--i];o[i++]=E&&D(A(w,x),A(e.ais,2))}var B=o[--i];e[o[--i]]=B}else e.aibad=!1;if(T(A(e.ais,0),"01")&&(e.ai310x||e.ai320x)&&!e.aibad)if(3==e.ais.length){var j=p(b(A(e.vals,2),2,2)),N=p(b(A(e.vals,2),4,2));if(T(b(A(e.vals,0),0,1),"9")&&p(A(e.vals,1))<=99999&&j>=1&&j<=12&&N>=0&&N<=31){if(e.ai310x&&T(A(e.ais,2),"11")){o[i++]="0111000",o[i++]=!1;break}if(e.ai320x&&T(A(e.ais,2),"11")){o[i++]="0111001",o[i++]=!1;break}if(e.ai310x&&T(A(e.ais,2),"13")){o[i++]="0111010",o[i++]=!1;break}if(e.ai320x&&T(A(e.ais,2),"13")){o[i++]="0111011",o[i++]=!1;break}if(e.ai310x&&T(A(e.ais,2),"15")){o[i++]="0111100",o[i++]=!1;break}if(e.ai320x&&T(A(e.ais,2),"15")){o[i++]="0111101",o[i++]=!1;break}if(e.ai310x&&T(A(e.ais,2),"17")){o[i++]="0111110",o[i++]=!1;break}if(e.ai320x&&T(A(e.ais,2),"17")){o[i++]="0111111",o[i++]=!1;break}}}else if(T(b(A(e.vals,0),0,1),"9")&&p(A(e.vals,1))<=99999){if(e.ai310x){o[i++]="0111000",o[i++]=!1;break}if(e.ai320x){o[i++]="0111001",o[i++]=!1;break}}}if(e.ais.length>=2){o[i++]="ai392x",o[i++]=!1;for(var F=3920;F<=3923;F+=1){var R=o[--i];o[i++]=R||T(m(c(4),F,10),A(e.ais,1))}var P=o[--i];if(e[o[--i]]=P,T(A(e.ais,0),"01")&&e.ai392x&&T(b(A(e.vals,0),0,1),"9")){o[i++]="01100",o[i++]=!0;break}}if(e.ais.length>=2){o[i++]="ai393x",o[i++]=!1;for(var H=3930;H<=3933;H+=1){var V=o[--i];o[i++]=V||T(m(c(4),H,10),A(e.ais,1))}var q=o[--i];if(e[o[--i]]=q,T(A(e.ais,0),"01")&&e.ai393x&&T(b(A(e.vals,0),0,1),"9")){o[i++]="01101",o[i++]=!0;break}}if(T(A(e.ais,0),"01")){o[i++]="1",o[i++]=!0;break}o[i++]="00",o[i++]=!0;break}if(e.gpfallow=o[--i],e.method=o[--i],e.conv12to40=function(){var e=f(c(40),"0000000000000000000000000000000000000000"),t=o[--i],n=m(c(10),p(b(t,0,3)),2);y(b(e,0,10),10-n.length,n);var r=m(c(10),p(b(t,3,3)),2);y(b(e,10,10),10-r.length,r);var a=m(c(10),p(b(t,6,3)),2);y(b(e,20,10),10-a.length,a);var s=m(c(10),p(b(t,9,3)),2);y(b(e,30,10),10-s.length,s),o[i++]=e,o[i++]=t,i--},e.conv13to44=function(){var t=f(c(44),"00000000000000000000000000000000000000000000"),n=o[--i],r=m(c(4),p(b(n,0,1)),2);y(b(t,0,4),4-r.length,r),o[i++]=t,o[i++]=t,o[i++]=b(n,1,12),e.conv12to40();var a=o[--i];y(o[--i],4,a)},e.tobin=function(){var e=c(o[--i]);o[i++]=e;for(var t=0,n=e.length-1;t<=n;t+=1){var r=o[--i];v(r,t,48),o[i++]=r}var a=o[--i],s=m(c(a.length),o[--i],2);y(a,a.length-s.length,s),o[i++]=a},e.fnc1=-1,e.lnumeric=-2,e.lalphanumeric=-3,e.liso646=-4,T(e.method,"00")&&(e.cdf=s([]),e.gpf=s([])),T(e.method,"1")){o[i++]="cdf",o[i++]=b(A(e.vals,0),0,13),e.conv13to44();var G=o[--i];e[o[--i]]=G,o[i++]=1/0;for(var W=e.cdf,K=0,Y=W.length;K<Y;K++)o[i++]=L(A(W,K)-48);e.cdf=s(),e.gpf=s([]),e.ais=b(e.ais,1,e.ais.length-1),e.vals=b(e.vals,1,e.vals.length-1),e.fncs=b(e.fncs,1,e.fncs.length-1)}if(T(e.method,"0100")){e.cdf=c(55),o[i++]=e.cdf,o[i++]=0,o[i++]=b(A(e.vals,0),1,12),e.conv12to40();var X=o[--i],J=o[--i];y(o[--i],J,X),o[i++]=e.cdf,o[i++]=40,o[i++]=p(A(e.vals,1)),o[i++]=15,e.tobin();var Z=o[--i],ee=o[--i];y(o[--i],ee,Z),o[i++]=1/0;for(var te=e.cdf,ne=0,re=te.length;ne<re;ne++)o[i++]=A(te,ne)-48;e.cdf=s(),e.gpf=s([]),e.ais=s([]),e.vals=s([]),e.fncs=s([])}if(T(e.method,"0101")){e.cdf=c(55),o[i++]=e.cdf,o[i++]=0,o[i++]=b(A(e.vals,0),1,12),e.conv12to40();var ie=o[--i],oe=o[--i];y(o[--i],oe,ie),T(A(e.ais,1),"3202")?(o[i++]=p(A(e.vals,1)),o[i++]=15,e.tobin()):(o[i++]=p(A(e.vals,1))+1e4,o[i++]=15,e.tobin()),y(e.cdf,40,o[--i]),o[i++]=1/0;for(var ae=e.cdf,se=0,ue=ae.length;se<ue;se++)o[i++]=A(ae,se)-48;e.cdf=s(),e.gpf=s([]),e.ais=s([]),e.vals=s([]),e.fncs=s([])}if(7==e.method.length){e.cdf=c(76),o[i++]=e.cdf,o[i++]=0,o[i++]=b(A(e.vals,0),1,12),e.conv12to40();var ce=o[--i],le=o[--i];y(o[--i],le,ce);var he=c(6);if(y(he,0,b(A(e.ais,1),3,1)),y(he,1,b(A(e.vals,1),1,5)),o[i++]=p(he),o[i++]=20,e.tobin(),y(e.cdf,40,o[--i]),3==e.ais.length){var fe=A(e.vals,2);o[i++]=384*p(b(fe,0,2))+(32*(p(b(fe,2,2))-1)+p(b(fe,4,2)))}else o[i++]=38400;o[i++]=16,e.tobin(),y(e.cdf,60,o[--i]),o[i++]=1/0;for(var de=e.cdf,pe=0,me=de.length;pe<me;pe++)o[i++]=A(de,pe)-48;e.cdf=s(),e.gpf=s([]),e.ais=s([]),e.vals=s([]),e.fncs=s([])}if(T(e.method,"01100")){e.cdf=c(42),o[i++]=e.cdf,o[i++]=0,o[i++]=b(A(e.vals,0),1,12),e.conv12to40();var ge=o[--i],Ae=o[--i];y(o[--i],Ae,ge),o[i++]=e.cdf,o[i++]=40,o[i++]=p(b(A(e.ais,1),3,1)),o[i++]=2,e.tobin();var ve=o[--i],be=o[--i];y(o[--i],be,ve),o[i++]=1/0;for(var we=e.cdf,xe=0,Ce=we.length;xe<Ce;xe++)o[i++]=A(we,xe)-48;e.cdf=s(),o[i++]=1/0,k(A(e.vals,1)),e.ais.length>2&&(o[i++]=e.fnc1),e.gpf=s(),e.ais=b(e.ais,2,e.ais.length-2),e.vals=b(e.vals,2,e.vals.length-2),e.fncs=b(e.fncs,2,e.fncs.length-2)}if(T(e.method,"01101")){e.cdf=c(52),o[i++]=e.cdf,o[i++]=0,o[i++]=b(A(e.vals,0),1,12),e.conv12to40();var ke=o[--i],Ee=o[--i];y(o[--i],Ee,ke),o[i++]=e.cdf,o[i++]=40,o[i++]=p(b(A(e.ais,1),3,1)),o[i++]=2,e.tobin();var Se=o[--i],_e=o[--i];y(o[--i],_e,Se),o[i++]=e.cdf,o[i++]=42,o[i++]=p(b(A(e.vals,1),0,3)),o[i++]=10,e.tobin();var Oe=o[--i],Te=o[--i];y(o[--i],Te,Oe),o[i++]=1/0;for(var De=e.cdf,Be=0,Ie=De.length;Be<Ie;Be++)o[i++]=A(De,Be)-48;e.cdf=s(),o[i++]=1/0;for(var Me=A(e.vals,1),je=b(Me,3,Me.length-3),Ne=0,Fe=je.length;Ne<Fe;Ne++)o[i++]=A(je,Ne);e.ais.length>2&&(o[i++]=e.fnc1),e.gpf=s(),e.ais=b(e.ais,2,e.ais.length-2),e.vals=b(e.vals,2,e.vals.length-2),e.fncs=b(e.fncs,2,e.fncs.length-2)}e.gpfallow?e.vlf=s(2):e.vlf=s([]),ye.$ctx._9026||function(){var t=Object.create(e);o[i++]=1/0;for(var n=0;n<=119;n+=1){var r=f(c(2),"00"),a=m(c(2),n,11);if(y(r,2-a.length,a),o[i++]=n,o[i++]=r,65==A(r,0)){var s=o[--i];v(s,0,94),o[i++]=s}var l=o[--i];if(o[i++]=l,65==A(l,1)){var h=o[--i];v(h,1,94),o[i++]=h}var d=o[--i],p=f(c(7),"0000000"),g=m(c(7),L(o[--i]+8),2);y(p,7-g.length,g),o[i++]=d,o[i++]=p}o[i++]=t.lalphanumeric,o[i++]="0000",t.numeric=u(),o[i++]=1/0;for(var b=48;b<=57;b+=1)o[i++]=b,o[i++]=b-43,o[i++]=5,t.tobin();o[i++]=t.fnc1,o[i++]="01111";for(var w=65;w<=90;w+=1)o[i++]=w,o[i++]=w-33,o[i++]=6,t.tobin();o[i++]=42,o[i++]="111010";for(var x=44;x<=47;x+=1)o[i++]=x,o[i++]=x+15,o[i++]=6,t.tobin();o[i++]=t.lnumeric,o[i++]="000",o[i++]=t.liso646,o[i++]="00100",t.alphanumeric=u(),o[i++]=1/0;for(var C=48;C<=57;C+=1)o[i++]=C,o[i++]=C-43,o[i++]=5,t.tobin();o[i++]=t.fnc1,o[i++]="01111";for(var k=65;k<=90;k+=1)o[i++]=k,o[i++]=k-1,o[i++]=7,t.tobin();for(var E=97;E<=122;E+=1)o[i++]=E,o[i++]=E-7,o[i++]=7,t.tobin();o[i++]=33,o[i++]="11101000",o[i++]=34,o[i++]="11101001";for(var S=37;S<=47;S+=1)o[i++]=S,o[i++]=S+197,o[i++]=8,t.tobin();for(var _=58;_<=63;_+=1)o[i++]=_,o[i++]=_+187,o[i++]=8,t.tobin();for(var O in o[i++]=95,o[i++]="11111011",o[i++]=32,o[i++]="11111100",o[i++]=t.lnumeric,o[i++]="000",o[i++]=t.lalphanumeric,o[i++]="00100",t.iso646=u(),t)t.hasOwnProperty(O)&&(ye.$ctx[O]=t[O]);ye.$ctx._9026=1}();for(var Re=0,Pe=e.ais.length-1;Re<=Pe;Re+=1){e.i=Re,e.ai=A(e.ais,e.i),e.val=A(e.vals,e.i);var Le=s(e.gpf.length+e.ai.length+e.val.length);y(Le,0,e.gpf),o[i++]=Le,o[i++]=Le,o[i++]=e.gpf.length,o[i++]=e.ai,o[i++]=1/0;var Ue=o[--i],ze=o[--i];o[i++]=Ue,k(ze);var He=s(),$e=o[--i];y(o[--i],$e,He);var Qe=o[--i];o[i++]=Qe,o[i++]=Qe,o[i++]=e.gpf.length+e.ai.length,o[i++]=e.val,o[i++]=1/0;var Ve=o[--i],qe=o[--i];o[i++]=Ve,k(qe);var Ge=s(),We=o[--i];if(y(o[--i],We,Ge),e.gpf=o[--i],e.i!=e.ais.length-1&&A(e.fncs,e.i)){var Ke=s(e.gpf.length+1);y(Ke,0,e.gpf),v(Ke,e.gpf.length,e.fnc1),e.gpf=Ke}}e.rembits=function(){var t=o[--i],n=48,r=12*~~Math.ceil(t/12);if(12*~~Math.ceil(t/12)<48){var a=n;n=r,r=a}var s=~~(r/12);if(o[i++]=t,o[i++]=r,o[i++]=s,s%e.segments==1){var u=o[--i],c=o[--i];o[i++]=12*L(u+1),o[i++]=c,i--}else i--;var l=o[--i],h=o[--i];o[i++]=L(l-h)},e.encode=function(){var t=o[--i];if(o[i++]=t,D(t,"raw")){var n=A(o[--i],o[--i]);o[i++]=n}else i--;o[i++]=1/0;var r=o[--i],a=o[--i];o[i++]=r,k(a,(function(){var e=o[--i];o[i++]=L(e-48)}));var u=s();y(e.gpfenc,e.j,u),e.j=u.length+e.j},o[i++]=1/0;for(var Ye=0,Xe=e.gpf.length;Ye<Xe;Ye++)o[i++]=0;o[i++]=0,o[i++]=-1,e.numericruns=s(),o[i++]=1/0;for(var Je=0,Ze=e.gpf.length;Je<Ze;Je++)o[i++]=0;o[i++]=0,e.alphanumericruns=s(),o[i++]=1/0;for(var et=0,tt=e.gpf.length;et<tt;et++)o[i++]=0;o[i++]=9999,e.nextiso646only=s();for(var nt=e.gpf.length-1;nt>=0;nt-=1){e.i=nt;var rt=f(c(2),"00"),it=A(e.gpf,e.i);o[i++]=A(e.gpf,e.i),o[i++]=rt,o[i++]=rt,o[i++]=0,o[i++]=it,it==e.fnc1&&(i--,o[i++]=94);var ot=o[--i],at=o[--i];if(v(o[--i],at,ot),e.i<e.gpf.length-1){var st=o[--i],ut=A(e.gpf,e.i+1);o[i++]=st,o[i++]=st,o[i++]=1,o[i++]=ut,ut==e.fnc1&&(i--,o[i++]=94);var ct=o[--i],lt=o[--i];v(o[--i],lt,ct)}var ht=void 0!==A(e.numeric,o[--i]);v(e.numericruns,e.i,ht?L(A(e.numericruns,e.i+2)+2):0);var ft=o[--i],dt=void 0!==A(e.alphanumeric,ft);o[i++]=ft,v(e.alphanumericruns,e.i,dt?L(A(e.alphanumericruns,e.i+1)+1):0);var pt=o[--i],mt=void 0!==A(e.iso646,pt),gt=void 0!==A(e.alphanumeric,pt);v(e.nextiso646only,e.i,mt&&!gt?0:L(A(e.nextiso646only,e.i+1)+1))}for(e.gpfenc=s(252),e.i=0,e.j=0,e.mode="numeric";e.i!=e.gpf.length;)for(;;){if(T(e.mode,"numeric")){if(e.i<=e.gpf.length-2){var At=c(2),vt=A(e.gpf,e.i);o[i++]=At,o[i++]=At,o[i++]=0,o[i++]=vt,vt==e.fnc1&&(i--,o[i++]=94);var bt=o[--i],yt=o[--i];v(o[--i],yt,bt);var wt=o[--i],xt=A(e.gpf,e.i+1);o[i++]=wt,o[i++]=wt,o[i++]=1,o[i++]=xt,xt==e.fnc1&&(i--,o[i++]=94);var Ct=o[--i],kt=o[--i];v(o[--i],kt,Ct);var Et=o[--i],St=void 0!==A(e.numeric,Et);if(o[i++]=Et,St){o[i++]=e.numeric,e.encode(),e.i=e.i+2;break}i--,o[i++]=e.lalphanumeric,o[i++]=e.numeric,e.encode(),e.mode="alphanumeric";break}var _t=A(e.gpf,e.i);if(_t<48||_t>57){o[i++]=e.lalphanumeric,o[i++]=e.numeric,e.encode(),e.mode="alphanumeric";break}o[i++]="rem",o[i++]=13+e.method.length+e.vlf.length+e.cdf.length+e.j,e.rembits();var Ot=o[--i];if(e[o[--i]]=Ot,e.rem>=4&&e.rem<=6){var Tt=b(f(c(6),"000000"),0,e.rem),Dt=m(c(4),L(A(e.gpf,e.i)-47),2);y(Tt,4-Dt.length,Dt),o[i++]=Tt,o[i++]="raw",e.encode(),e.i=e.i+1;break}var Bt=c(2);v(Bt,0,A(e.gpf,e.i)),v(Bt,1,94),o[i++]=Bt,o[i++]=e.numeric,e.encode(),e.i=e.i+1;break}if(T(e.mode,"alphanumeric")){if(A(e.gpf,e.i)==e.fnc1){o[i++]=e.fnc1,o[i++]=e.alphanumeric,e.encode(),e.mode="numeric",e.i=e.i+1;break}var It=A(e.gpf,e.i),Mt=void 0!==A(e.iso646,It),jt=void 0!==A(e.alphanumeric,It);if(Mt&&!jt){o[i++]=e.liso646,o[i++]=e.alphanumeric,e.encode(),e.mode="iso646";break}if(A(e.numericruns,e.i)>=6){o[i++]=e.lnumeric,o[i++]=e.alphanumeric,e.encode(),e.mode="numeric";break}var Nt=A(e.numericruns,e.i);if(Nt>=4&&L(Nt+e.i)==e.gpf.length){o[i++]=e.lnumeric,o[i++]=e.alphanumeric,e.encode(),e.mode="numeric";break}o[i++]=A(e.gpf,e.i),o[i++]=e.alphanumeric,e.encode(),e.i=e.i+1;break}if(T(e.mode,"iso646")){if(A(e.gpf,e.i)==e.fnc1){o[i++]=e.fnc1,o[i++]=e.iso646,e.encode(),e.mode="numeric",e.i=e.i+1;break}if(A(e.numericruns,e.i)>=4&&A(e.nextiso646only,e.i)>=10){o[i++]=e.lnumeric,o[i++]=e.iso646,e.encode(),e.mode="numeric";break}if(A(e.alphanumericruns,e.i)>=5&&A(e.nextiso646only,e.i)>=10){o[i++]=e.lalphanumeric,o[i++]=e.iso646,e.encode(),e.mode="alphanumeric";break}o[i++]=A(e.gpf,e.i),o[i++]=e.iso646,e.encode(),e.i=e.i+1;break}}e.gpf=b(e.gpfenc,0,e.j);var Ft=13+e.method.length+e.vlf.length+e.cdf.length+e.gpf.length;o[i++]=Ft,o[i++]=Ft,e.rembits();var Rt=o[--i];if(e.pad=s(Rt),o[i++]=Rt,0!=e.vlf.length){var Pt=o[--i],Lt=~~(L(o[--i]+Pt)/12);v(e.vlf,0,Lt%2);var Ut=Lt<=14?0:1;v(e.vlf,1,Ut)}else i-=2;if(e.pad.length>0){for(var zt=0,Ht=e.pad.length-1;zt<=Ht;zt+=5){e.i=zt;var $t=e.pad,Qt=e.i,Vt=s([0,0,1,0,0]),qt=e.pad,Gt=e.i,Kt=5,Yt=qt.length-Gt;if(qt.length-Gt>5){var Xt=Kt;Kt=Yt,Yt=Xt}y($t,Qt,b(Vt,0,Yt))}T(e.mode,"numeric")&&(o[i++]=1/0,o[i++]=0,o[i++]=0,o[i++]=0,o[i++]=0,_(e.pad),e.pad=b(s(),0,e.pad.length))}o[i++]=1/0;var Jt=e.linkage?1:0;o[i++]=Jt,k(e.method,(function(){var e=o[--i];o[i++]=L(e-48)})),_(e.vlf),_(e.cdf),_(e.gpf),_(e.pad),e.binval=s(),e.datalen=~~(e.binval.length/12),e.ncr=function(){var e=o[--i],t=o[--i],n=L(t-e);if(e<L(t-e)){var r=n;n=e,e=r}o[i++]=n,o[i++]=1,o[i++]=1;for(var a=t,s=L(e+1);a>=s;a-=1){var u=o[--i],c=o[--i],l=o[--i];if(o[i++]=l,o[i++]=c,o[i++]=u*a,I(c,l)){var h=o[--i],f=o[--i];o[i++]=L(f+1),o[i++]=~~(h/f)}}for(;;){var d=o[--i],p=o[--i],m=o[--i];if(o[i++]=m,o[i++]=p,o[i++]=d,M(p,m))break;var g=o[--i],A=o[--i];o[i++]=L(A+1),o[i++]=~~(g/A)}var v=o[--i],b=o[--i];o[i++]=v,o[i++]=b,i--;var y=o[--i],w=o[--i];o[i++]=y,o[i++]=w,i--},e.getRSSwidths=function(){e.oe=o[--i],e.el=o[--i],e.mw=o[--i],e.nm=o[--i],e.val=o[--i],e.out=s(e.el),e.mask=0;for(var t=0,n=L(e.el-2);t<=n;t+=1){e.bar=t,e.ew=1;var r=e.bar;for(e.mask=e.mask|(r<0?1>>>-r:1<<r);;){o[i++]="sval",o[i++]=L(L(e.nm-e.ew)-1),o[i++]=L(L(e.el-e.bar)-2),e.ncr();var a=o[--i];if(e[o[--i]]=a,e.oe&&0==e.mask&&L(L(L(e.nm-e.ew)-2*e.el)+2*e.bar)>=-2){o[i++]="sval",o[i++]=e.sval,o[i++]=L(L(L(e.nm-e.ew)-e.el)+e.bar),o[i++]=L(L(e.el-e.bar)-2),e.ncr();var u=o[--i],c=o[--i];e[o[--i]]=L(c-u)}if(L(e.el-e.bar)>2){e.lval=0;for(var l=L(L(L(L(e.nm-e.ew)-e.el)+e.bar)+2),h=L(e.mw+1);l>=h;l-=1)o[i++]=L(L(L(e.nm-l)-e.ew)-1),o[i++]=L(L(e.el-e.bar)-3),e.ncr(),e.lval=L(o[--i]+e.lval);e.sval=L(e.sval-e.lval*L(L(e.el-e.bar)-1))}else L(e.nm-e.ew)>e.mw&&(e.sval=L(e.sval-1));if(e.val=L(e.val-e.sval),e.val<0)break;e.ew=e.ew+1;var f=e.bar;e.mask=e.mask&~(f<0?1>>>-f:1<<f)}e.val=L(e.val+e.sval),e.nm=L(e.nm-e.ew),v(e.out,e.bar,e.ew)}v(e.out,L(e.el-1),e.nm),o[i++]=e.out},ye.$ctx._9283||function(){var t=Object.create(e);for(var n in t.tab174=s([347,0,12,5,7,2,87,4,1387,348,10,7,5,4,52,20,2947,1388,8,9,4,5,30,52,3987,2948,6,11,3,6,10,104,4191,3988,4,13,1,8,1,204]),t)t.hasOwnProperty(n)&&(ye.$ctx[n]=t[n]);ye.$ctx._9283=1}(),e.dxw=s(e.datalen);for(var Zt=0,en=e.datalen-1;Zt<=en;Zt+=1){e.x=Zt,e.d=b(e.binval,12*e.x,12),o[i++]="d",o[i++]=0;for(var tn=0;tn<=11;tn+=1){e.j=tn;var nn=o[--i];o[i++]=L(nn+~~Math.pow(2,11-e.j)*A(e.d,e.j))}var rn=o[--i];for(e[o[--i]]=rn,e.j=0;;){if(I(e.d,A(e.tab174,e.j))){for(var on=b(e.tab174,e.j+1,7),an=0,sn=on.length;an<sn;an++)o[i++]=A(on,an);e.dte=o[--i],e.dto=o[--i],e.dmwe=o[--i],e.dmwo=o[--i],e.dele=o[--i],e.delo=o[--i],e.dgs=o[--i];break}e.j=e.j+8}o[i++]="dwo",o[i++]=~~(L(e.d-e.dgs)/e.dte),o[i++]=e.delo,o[i++]=e.dmwo,o[i++]=4,o[i++]=!0,e.getRSSwidths();var un=o[--i];e[o[--i]]=un,o[i++]="dwe",o[i++]=L(e.d-e.dgs)%e.dte,o[i++]=e.dele,o[i++]=e.dmwe,o[i++]=4,o[i++]=!1,e.getRSSwidths();var cn=o[--i];if(e[o[--i]]=cn,e.dw=s(8),e.x%2==0)for(var ln=0;ln<=3;ln+=1)e.j=ln,v(e.dw,7-2*e.j,A(e.dwo,e.j)),v(e.dw,6-2*e.j,A(e.dwe,e.j));else for(var hn=0;hn<=3;hn+=1)e.j=hn,v(e.dw,2*e.j,A(e.dwo,e.j)),v(e.dw,2*e.j+1,A(e.dwe,e.j));v(e.dxw,e.x,e.dw)}ye.$ctx._9350||function(){var t=Object.create(e);for(var n in t.finderwidths=s([1,8,4,1,1,1,1,4,8,1,3,6,4,1,1,1,1,4,6,3,3,4,6,1,1,1,1,6,4,3,3,2,8,1,1,1,1,8,2,3,2,6,5,1,1,1,1,5,6,2,2,2,9,1,1,1,1,9,2,2]),t.finderseq=s([s([0,1]),s([0,3,2]),s([0,5,2,7]),s([0,9,2,7,4]),s([0,9,2,7,6,11]),s([0,9,2,7,8,11,10]),s([0,1,2,3,4,5,6,7]),s([0,1,2,3,4,5,6,9,8]),s([0,1,2,3,4,5,6,9,10,11]),s([0,1,2,3,4,7,6,9,8,11,10])]),t)t.hasOwnProperty(n)&&(ye.$ctx[n]=t[n]);ye.$ctx._9350=1}(),e.seq=A(e.finderseq,~~((e.datalen-2)/2)),e.fxw=s(e.seq.length);for(var fn=0,dn=e.seq.length-1;fn<=dn;fn+=1)e.x=fn,v(e.fxw,e.x,b(e.finderwidths,5*A(e.seq,e.x),5));ye.$ctx._9386||function(){var t=Object.create(e);for(var n in t.checkweights=s([-1,-1,-1,-1,-1,-1,-1,-1,77,96,32,81,27,9,3,1,20,60,180,118,143,7,21,63,205,209,140,117,39,13,145,189,193,157,49,147,19,57,171,91,132,44,85,169,197,136,186,62,185,133,188,142,4,12,36,108,50,87,29,80,97,173,128,113,150,28,84,41,123,158,52,156,166,196,206,139,187,203,138,46,76,17,51,153,37,111,122,155,146,119,110,107,106,176,129,43,16,48,144,10,30,90,59,177,164,125,112,178,200,137,116,109,70,210,208,202,184,130,179,115,190,204,68,93,31,151,191,134,148,22,66,198,172,94,71,2,40,154,192,64,162,54,18,6,120,149,25,75,14,42,126,167,175,199,207,69,23,78,26,79,103,98,83,38,114,131,182,124,159,53,88,170,127,183,61,161,55,165,73,8,24,72,5,15,89,100,174,58,160,194,135,45]),t)t.hasOwnProperty(n)&&(ye.$ctx[n]=t[n]);ye.$ctx._9386=1}(),o[i++]=1/0,k(e.seq,(function(){_(b(e.checkweights,16*o[--i],16))}));var pn=s();e.checkweightseq=b(pn,8,pn.length-8),o[i++]=1/0;for(var mn=e.dxw,gn=0,An=mn.length;gn<An;gn++)k(A(mn,gn));e.widths=s(),e.checksum=0;for(var vn=0,bn=e.widths.length-1;vn<=bn;vn+=1)e.i=vn,e.checksum=L(e.checksum+A(e.widths,e.i)*A(e.checkweightseq,e.i));for(e.checksum=L(e.checksum%211+211*(e.datalen-3)),e.i=0;;){if(e.checksum<=A(e.tab174,e.i)){for(var yn=b(e.tab174,e.i+1,7),wn=0,xn=yn.length;wn<xn;wn++)o[i++]=A(yn,wn);e.cte=o[--i],e.cto=o[--i],e.cmwe=o[--i],e.cmwo=o[--i],e.cele=o[--i],e.celo=o[--i],e.cgs=o[--i];break}e.i=e.i+8}o[i++]="cwo",o[i++]=~~(L(e.checksum-e.cgs)/e.cte),o[i++]=e.celo,o[i++]=e.cmwo,o[i++]=4,o[i++]=!0,e.getRSSwidths();var Cn=o[--i];e[o[--i]]=Cn,o[i++]="cwe",o[i++]=L(e.checksum-e.cgs)%e.cte,o[i++]=e.cele,o[i++]=e.cmwe,o[i++]=4,o[i++]=!1,e.getRSSwidths();var kn=o[--i];e[o[--i]]=kn,e.cw=s(8);for(var En=0;En<=3;En+=1)e.i=En,v(e.cw,2*e.i,A(e.cwo,e.i)),v(e.cw,2*e.i+1,A(e.cwe,e.i));var Sn=s(22);v(Sn,0,e.cw),y(Sn,1,e.dxw),e.dxw=b(Sn,0,e.datalen+1),e.datalen=e.dxw.length,e.rows=s(~~Math.ceil(e.datalen/e.segments)),e.numrows=e.rows.length;for(var _n=0,On=e.numrows-1;_n<=On;_n+=1){e.r=_n,o[i++]=1/0,e.segments%4!=0&&e.r%2==1&&(o[i++]=0),o[i++]=1,o[i++]=1;for(var Tn=0,Dn=e.segments-1;Tn<=Dn;Tn+=1)e.pos=Tn+e.r*e.segments,e.pos<e.datalen&&(k(A(e.dxw,e.pos)),e.pos%2==0&&k(A(e.fxw,~~(e.pos/2))));var Bn=S()+2;o[i++]=1,o[i++]=1,O(s(Bn)),v(e.rows,e.r,o[--i]),i--}if(D(e.format,"expandedstacked")){var In=A(e.rows,0);e.sbs=b(In,1,In.length-1),o[i++]=1/0,o[i++]=1;for(var Mn=0,jn=e.datalen-1;Mn<=jn;Mn+=1)e.i=Mn,k(A(e.dxw,e.i)),e.i%2==0&&k(A(e.fxw,~~(e.i/2)));o[i++]=1,o[i++]=1,e.sbs=s(),delete e.options.parse,o[i++]=1/0;var Nn=e.sbs;o[i++]=1/0;for(var Fn=0,Rn=~~((e.sbs.length+1)/2);Fn<Rn;Fn++)o[i++]=e.height;var Pn=s();o[i++]=1/0;for(var Ln=0,Un=~~((e.sbs.length+1)/2);Ln<Un;Ln++)o[i++]=0;var zn=s();o[i++]="ren",o[i++]=Wt,o[i++]="sbs",o[i++]=Nn,o[i++]="bhs",o[i++]=Pn,o[i++]="bbs",o[i++]=zn,o[i++]="opt",o[i++]=e.options;var Hn=u();o[i++]=Hn,e.dontdraw||Wt()}else{e.seps=s(e.numrows);for(var $n=0,Qn=e.numrows-1;$n<=Qn;$n+=1){e.r=$n,e.row=A(e.rows,e.r),o[i++]=1/0;for(var Vn=0,qn=e.row.length-1;Vn<=qn;Vn+=2){e.i=Vn;for(var Gn=0,Wn=A(e.row,e.i);Gn<Wn;Gn++)o[i++]=0;if(e.i<e.row.length-1)for(var Kn=0,Yn=A(e.row,e.i+1);Kn<Yn;Kn++)o[i++]=1}O(s(S())),e.row=o[--i],i--,o[i++]=1/0,k(e.row,(function(){var e=o[--i];o[i++]=L(1-e)})),e.sep=s(),o[i++]=1/0;for(var Xn=19,Jn=e.row.length-13;Xn<=Jn;Xn+=98)o[i++]=Xn;for(var Zn=68,er=e.row.length-13;Zn<=er;Zn+=98)o[i++]=Zn;e.finderpos=s();for(var tr=e.finderpos,nr=0,rr=tr.length;nr<rr;nr++)for(var ir=A(tr,nr),or=ir,ar=L(ir+14);or<=ar;or+=1){if(e.i=or,0==A(e.row,e.i))if(1==A(e.row,e.i-1))o[i++]=1;else{var sr=0==A(e.sep,e.i-1)?1:0;o[i++]=sr}else o[i++]=0;v(e.sep,e.i,o[--i])}if(y(e.sep,0,s([0,0,0,0])),y(e.sep,e.row.length-4,s([0,0,0,0])),e.segments%4==0&&e.r%2==1)if(A(e.rows,e.r).length!=A(e.rows,0).length&&e.finderpos.length%2==1)o[i++]=1/0,o[i++]=0,_(e.row),e.row=s(),o[i++]=1/0,o[i++]=0,_(e.sep),e.sep=s();else{for(var ur=e.row.length-1;ur>=0;ur-=1)o[i++]=A(e.row,ur);O(e.row),i--;for(var cr=e.sep.length-1;cr>=0;cr-=1)o[i++]=A(e.sep,cr);O(e.sep),i--}v(e.rows,e.r,e.row),v(e.seps,e.r,e.sep)}e.pixx=A(e.rows,0).length,o[i++]=1/0;for(var lr=0,hr=e.pixx;lr<hr;lr++)o[i++]=0;var fr=s();y(fr,0,A(e.rows,e.numrows-1)),v(e.rows,e.numrows-1,fr),o[i++]=1/0;for(var dr=0,pr=e.pixx;dr<pr;dr++)o[i++]=0;var mr=s();y(mr,0,A(e.seps,e.numrows-1)),v(e.seps,e.numrows-1,mr),o[i++]=1/0;for(var gr=0,Ar=1+~~(e.pixx/2);gr<Ar;gr++)o[i++]=0,o[i++]=1;e.sep=b(s(),0,e.pixx),y(e.sep,0,s([0,0,0,0])),y(e.sep,e.pixx-4,s([0,0,0,0])),o[i++]=1/0;for(var vr=0,br=e.numrows-1;vr<=br;vr+=1){e.r=vr,0!=e.r&&_(A(e.seps,e.r));for(var yr=0,wr=e.barxmult;yr<wr;yr++)_(A(e.rows,e.r));e.r!=e.numrows-1&&(_(A(e.seps,e.r)),_(e.sep))}e.pixs=s(),delete e.options.parse;var xr=new Map([["ren",Q],["pixs",e.pixs],["pixx",e.pixx],["pixy",~~(e.pixs.length/e.pixx)],["height",~~(e.pixs.length/e.pixx)/72],["width",e.pixx/72],["opt",e.options]]);o[i++]=xr,e.dontdraw||Q()}}function we(){var e=Object.create(we.$ctx||(we.$ctx={}));e.dontdraw=!1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],v(e.options,"dontdraw",!0),v(e.options,"format","expandedstacked"),o[i++]="args",o[i++]=e.barcode,o[i++]=e.options,ye();var t=o[--i];e[o[--i]]=t,v(e.args,"opt",e.options),o[i++]=e.args,e.dontdraw||Q()}function xe(){var e=Object.create(xe.$ctx||(xe.$ctx={}));e.dontdraw=!1,e.includetext=!1,e.coupontextfont="OCR-B",e.coupontextsize=9,e.coupontextxoffset=null,e.coupontextyoffset=null,e.parse=!1,e.dontlint=!1,e.lintreqs=!0,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],o[i++]=e.barcode,o[i++]="ai",$(),i--,e.vals=o[--i],e.ais=o[--i],1!=e.ais.length&&(o[i++]="bwipp.gs1northamericancouponBadAIStructure#9682",o[i++]="A GS1 North American Coupon should consist of a single AI (8110)",z()),D(A(e.ais,0),"8110")&&(o[i++]="bwipp.gs1northamericancouponBadAIStructure#9685",o[i++]="A GS1 North American Coupon should consist of a single AI (8110)",z()),e.val=A(e.vals,0),e.vli=L(A(e.val,0)-48),(e.vli<0||e.vli>6)&&(o[i++]="bwipp.gs1northamericancouponBadVLI#9692",o[i++]="The AI (8110) data should start with a Company Prefix length indicator in the range 0 to 6",z()),e.gcp=b(e.val,1,L(e.vli+6)),e.cod=b(e.val,L(e.vli+7),6),e.coupontext=c(e.gcp.length+7),y(e.coupontext,0,e.gcp),y(e.coupontext,e.gcp.length,"-"),y(e.coupontext,e.gcp.length+1,e.cod),delete e.options.parse,v(e.options,"dontdraw",!0),o[i++]="args",o[i++]=e.barcode,o[i++]=e.options,we();var t=o[--i];(e[o[--i]]=t,e.includetext)&&(T(e.coupontextxoffset,null)&&(e.coupontextxoffset=0),T(e.coupontextyoffset,null)&&(e.coupontextyoffset=L(72*A(e.args,"height")+3)),void 0!==A(e.args,"txt")?(e.txt=A(e.args,"txt"),e.newtxt=s(e.txt.length+1),y(e.newtxt,0,e.txt),v(e.newtxt,e.newtxt.length-1,s([e.coupontext,e.coupontextxoffset,e.coupontextyoffset,e.coupontextfont,e.coupontextsize])),v(e.args,"txt",e.newtxt)):v(e.args,"txt",s([s([e.coupontext,e.coupontextxoffset,e.coupontextyoffset,e.coupontextfont,e.coupontextsize])])));v(e.args,"opt",e.options),o[i++]=e.args,e.dontdraw||Q()}function Ce(){var e=Object.create(Ce.$ctx||(Ce.$ctx={}));e.dontdraw=!1,e.height=.315,e.nwidth=1.4175,e.wwidth=1.5*2.835,e.swidth=2.835,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],(e.barcode.length<1||e.barcode.length>6)&&(o[i++]="bwipp.pharmacodeBadLength#9773",o[i++]="Pharmacode must be 1 to 6 digits",z()),k(e.barcode,(function(){var e=o[--i];(e<48||e>57)&&(o[i++]="bwipp.pharmacodeBadCharacter#9777",o[i++]="Pharmacode must contain only digits",z())}));var t=p(e.barcode);(t<3||t>131070)&&(o[i++]="bwipp.pharmacodeBadValue#9781",o[i++]="Pharmacode value must be between 3 and 131070",z()),e.txt=s(e.barcode.length);for(var n=0,r=e.barcode.length-1;n<=r;n+=1)e.i=n,v(e.txt,e.i,s([b(e.barcode,e.i,1),0,0,"",0]));e.barcode=m(c(17),p(e.barcode)+1,2),e.barcode=b(e.barcode,1,e.barcode.length-1),e.barlen=e.barcode.length,e.sbs=s(2*e.barlen);for(var a=0,l=e.barlen-1;a<=l;a+=1)e.i=a,e.enc=b(e.barcode,e.i,1),T(e.enc,"0")?v(e.sbs,2*e.i,e.nwidth):v(e.sbs,2*e.i,e.wwidth),v(e.sbs,2*e.i+1,e.swidth);o[i++]=1/0;var h=e.sbs;o[i++]=1/0;for(var f=0,d=~~((e.sbs.length+1)/2);f<d;f++)o[i++]=e.height;var g=s();o[i++]=1/0;for(var A=0,y=~~((e.sbs.length+1)/2);A<y;A++)o[i++]=0;var w=s();o[i++]="ren",o[i++]=Wt,o[i++]="sbs",o[i++]=h,o[i++]="bhs",o[i++]=g,o[i++]="bbs",o[i++]=w,o[i++]="txt",o[i++]=e.txt,o[i++]="textxalign",o[i++]="center",o[i++]="opt",o[i++]=e.options;var x=u();o[i++]=x,e.dontdraw||Wt()}function ke(){var e=Object.create(ke.$ctx||(ke.$ctx={}));e.dontdraw=!1,e.includetext=!1,e.height=4,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],(e.barcode.length<1||e.barcode.length>8)&&(o[i++]="bwipp.pharmacode2BadLength#9862",o[i++]="Two-track Pharmacode must be 1 to 6 digits",z()),k(e.barcode,(function(){var e=o[--i];(e<48||e>57)&&(o[i++]="bwipp.pharmacode2badCharacter#9866",o[i++]="Two-track Pharmacode must contain only digits",z())}));var t=p(e.barcode);(t<4||t>64570080)&&(o[i++]="bwipp.pharmacode2badValue#9870",o[i++]="Two-track Pharmacode value must be between 4 and 64570080",z()),e.txt=s(e.barcode.length);for(var n=0,r=e.barcode.length-1;n<=r;n+=1)e.i=n,v(e.txt,e.i,s([b(e.barcode,e.i,1),0,0,"",0]));for(e.encstr=c(16),e.sbs=s(32),e.bar=1/25.4*e.height,e.spc=1/25.4*72,e.i=15,e.val=p(e.barcode);0!=e.val;){var a=e.val%3;e.val=~~(L(e.val-A(s([3,1,2]),a))/3),v(e.encstr,e.i,A(s([2,0,1]),a)),e.i=e.i-1}e.encstr=b(e.encstr,e.i+1,15-e.i),e.bhs=s(e.encstr.length),e.bbs=s(e.encstr.length);for(var l=0,h=e.encstr.length-1;l<=h;l+=1){e.i=l;var f=A(e.encstr,e.i);v(e.bhs,e.i,e.bar*A(s([1,1,2]),f)),v(e.bbs,e.i,A(s([0,e.bar,0]),f))}o[i++]=1/0;var d=e.bhs,m=e.bbs;o[i++]=1/0;for(var g=0,y=2*e.encstr.length;g<y;g++)o[i++]=e.spc;var w=s();o[i++]="ren",o[i++]=Wt,o[i++]="bhs",o[i++]=d,o[i++]="bbs",o[i++]=m,o[i++]="sbs",o[i++]=w,o[i++]="txt",o[i++]=e.txt,o[i++]="textxalign",o[i++]="center",o[i++]="textyoffset",o[i++]=4,o[i++]="opt",o[i++]=e.options;var x=u();o[i++]=x,e.dontdraw||Wt()}function Ee(){var e=Object.create(Ee.$ctx||(Ee.$ctx={}));if(e.dontdraw=!1,e.includecheck=!1,e.validatecheck=!1,e.includetext=!1,e.includecheckintext=!1,e.textfont="OCR-B",e.textsize=10,e.textyoffset=-8,e.height=1,e.version="industrial",o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],k(e.barcode,(function(){var e=o[--i];(e<48||e>57)&&(o[i++]="bwipp.code2of5badCharacter#9973",o[i++]="Code 25 must contain only digits",z())})),o[i++]="barlen",o[i++]=e.barcode.length,e.validatecheck){var t=o[--i];o[i++]=L(t-1)}var n=o[--i];e[o[--i]]=n,e.checksum=0;for(var r=0,a=L(e.barlen-1);r<=a;r+=1){if(e.i=r,o[i++]="checksum",o[i++]=e.checksum,o[i++]=L(A(e.barcode,e.i)-48),L(e.barlen-e.i)%2!=0){var l=o[--i];o[i++]=3*l}var h=o[--i],f=o[--i];e[o[--i]]=L(f+h)}e.checksum=(10-e.checksum%10)%10,e.validatecheck&&(A(e.barcode,e.barlen)!=e.checksum+48&&(o[i++]="bwipp.code2of5badCheckDigit#9987",o[i++]="Incorrect Code 25 check digit provided",z()),e.barcode=b(e.barcode,0,e.barlen),e.includecheck=!0),Ee.$ctx._10019||function(){var t=Object.create(e),n=new Map([["industrial",s(["1111313111","3111111131","1131111131","3131111111","1111311131","3111311111","1131311111","1111113131","3111113111","1131113111","313111","31113"])],["iata",s(["1111313111","3111111131","1131111131","3131111111","1111311131","3111311111","1131311111","1111113131","3111113111","1131113111","1111","311"])],["matrix",s(["113311","311131","131131","331111","113131","313111","133111","111331","311311","131311","311111","31111"])],["coop",s(["331111","111331","113131","113311","131131","131311","133111","311131","311311","313111","3131","133"])],["datalogic",s(["113311","311131","131131","331111","113131","313111","133111","111331","311311","131311","1111","311"])]]);for(var r in t.versions=n,t)t.hasOwnProperty(r)&&(Ee.$ctx[r]=t[r]);Ee.$ctx._10019=1}(),void 0!==A(e.versions,e.version)||(o[i++]="bwipp.code2of5badVersion#10022",o[i++]="Unrecognised Code 25 version",z()),e.encs=A(e.versions,e.version),e.cs=A(e.encs,0).length,o[i++]="cw",o[i++]=0,k(A(e.encs,0),(function(){var e=o[--i],t=o[--i];o[i++]=L(t+L(e-48))}));var d=o[--i];e[o[--i]]=d,e.ss=A(e.encs,10).length,o[i++]="sw",o[i++]=0,k(A(e.encs,10),(function(){var e=o[--i],t=o[--i];o[i++]=L(t+L(e-48))}));var p=o[--i];if(e[o[--i]]=p,e.es=A(e.encs,11).length,Ee.$ctx._10035||function(){var t=Object.create(e);for(var n in t.barchars="0123456789",t)t.hasOwnProperty(n)&&(Ee.$ctx[n]=t[n]);Ee.$ctx._10035=1}(),o[i++]="sbs",o[i++]=e.barlen,e.includecheck){var m=o[--i];o[i++]=L(m+1)}var g=c(L(L(o[--i]*e.cs+e.ss)+e.es));if(e[o[--i]]=g,o[i++]="txt",o[i++]=e.barlen,e.includecheck){var w=o[--i];o[i++]=L(w+1)}var x=s(o[--i]);e[o[--i]]=x,y(e.sbs,0,A(e.encs,10));for(var E=0,S=L(e.barlen-1);E<=S;E+=1)e.i=E,C(e.barchars,b(e.barcode,e.i,1)),i--,e.indx=o[--i].length,i-=2,e.enc=A(e.encs,e.indx),y(e.sbs,e.i*e.cs+e.ss,e.enc),v(e.txt,e.i,s([b(e.barcode,e.i,1),L(e.i*e.cw+e.sw),e.textyoffset,e.textfont,e.textsize]));e.includecheck?(y(e.sbs,L(e.barlen*e.cs+e.ss),A(e.encs,e.checksum)),y(e.sbs,L(L(e.barlen*e.cs+e.cs)+e.ss),A(e.encs,11)),e.includecheckintext?v(e.txt,e.barlen,s([b(e.barchars,e.checksum,1),L(e.barlen*e.cw+e.sw),e.textyoffset,e.textfont,e.textsize])):v(e.txt,e.barlen,s([" ",L(e.barlen*e.cw+e.sw),e.textyoffset,e.textfont,e.textsize]))):y(e.sbs,L(e.barlen*e.cs+e.ss),A(e.encs,11)),o[i++]=1/0,o[i++]=1/0,k(e.sbs,(function(){var e=o[--i];o[i++]=L(e-48)}));var _=s();o[i++]=1/0;for(var O=0,T=~~((e.sbs.length+1)/2);O<T;O++)o[i++]=e.height;var D=s();o[i++]=1/0;for(var B=0,I=~~((e.sbs.length+1)/2);B<I;B++)o[i++]=0;var M=s();o[i++]="ren",o[i++]=Wt,o[i++]="sbs",o[i++]=_,o[i++]="bhs",o[i++]=D,o[i++]="bbs",o[i++]=M,e.includetext&&(o[i++]="txt",o[i++]=e.txt),o[i++]="opt",o[i++]=e.options;var j=u();o[i++]=j,e.dontdraw||Wt()}function Se(){var e=Object.create(Se.$ctx||(Se.$ctx={}));e.dontdraw=!1,e.includetext=!1,e.textfont="OCR-B",e.textsize=10,e.textxoffset=0,e.textyoffset=-8,e.height=1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],v(e.options,"dontdraw",!0),v(e.options,"version","industrial"),o[i++]="args",o[i++]=e.barcode,o[i++]=e.options,Ee();var t=o[--i];e[o[--i]]=t,v(e.args,"opt",e.options),o[i++]=e.args,e.dontdraw||Wt()}function _e(){var e=Object.create(_e.$ctx||(_e.$ctx={}));e.dontdraw=!1,e.includetext=!1,e.textfont="OCR-B",e.textsize=10,e.textxoffset=0,e.textyoffset=-8,e.height=1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],v(e.options,"dontdraw",!0),v(e.options,"version","iata"),o[i++]="args",o[i++]=e.barcode,o[i++]=e.options,Ee();var t=o[--i];e[o[--i]]=t,v(e.args,"opt",e.options),o[i++]=e.args,e.dontdraw||Wt()}function Oe(){var e=Object.create(Oe.$ctx||(Oe.$ctx={}));e.dontdraw=!1,e.includetext=!1,e.textfont="OCR-B",e.textsize=10,e.textxoffset=0,e.textyoffset=-8,e.height=1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],v(e.options,"dontdraw",!0),v(e.options,"version","matrix"),o[i++]="args",o[i++]=e.barcode,o[i++]=e.options,Ee();var t=o[--i];e[o[--i]]=t,v(e.args,"opt",e.options),o[i++]=e.args,e.dontdraw||Wt()}function Te(){var e=Object.create(Te.$ctx||(Te.$ctx={}));e.dontdraw=!1,e.includetext=!1,e.textfont="OCR-B",e.textsize=10,e.textxoffset=0,e.textyoffset=-8,e.height=1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],v(e.options,"dontdraw",!0),v(e.options,"version","coop"),o[i++]="args",o[i++]=e.barcode,o[i++]=e.options,Ee();var t=o[--i];e[o[--i]]=t,v(e.args,"opt",e.options),o[i++]=e.args,e.dontdraw||Wt()}function De(){var e=Object.create(De.$ctx||(De.$ctx={}));e.dontdraw=!1,e.includetext=!1,e.textfont="OCR-B",e.textsize=10,e.textxoffset=0,e.textyoffset=-8,e.height=1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],v(e.options,"dontdraw",!0),v(e.options,"version","datalogic"),o[i++]="args",o[i++]=e.barcode,o[i++]=e.options,Ee();var t=o[--i];e[o[--i]]=t,v(e.args,"opt",e.options),o[i++]=e.args,e.dontdraw||Wt()}function Be(){var e=Object.create(Be.$ctx||(Be.$ctx={}));e.dontdraw=!1,e.includecheck=!1,e.validatecheck=!1,e.includetext=!1,e.includecheckintext=!1,e.textfont="OCR-B",e.textsize=10,e.textyoffset=-8,e.height=1,o[i++]=e,U(),e.options=o[--i];var t=o[--i];e.barcode=t,Be.$ctx._10413||function(){var t=Object.create(e);t.encs=s(["111131","311131","131131","331111","113131","313111","133111","111331","311311","311111","113111","113311"]),t.barchars="0123456789-",t.charvals=new Map;for(var n=0;n<=10;n+=1)v(t.charvals,b(t.barchars,n,1),n);for(var r in t)t.hasOwnProperty(r)&&(Be.$ctx[r]=t[r]);Be.$ctx._10413=1}();for(var n=0,r=e.barcode.length-1;n<=r;n+=1){void 0!==A(e.charvals,b(e.barcode,n,1))||(o[i++]="bwipp.code11badCharacter#10418",o[i++]="Code 11 must contain only digits and dashes",z())}if(e.barlen=e.barcode.length,e.validatecheck){11==e.barlen&&(o[i++]="bwipp.code11badLength#10425",o[i++]="Code 11 cannot be 11 characters using check digits",z());var a=e.barlen<=10?1:2;e.barlen=e.barlen-a}if(o[i++]="numchecks",e.includecheck||e.validatecheck){var l=e.barlen>=10?2:1;o[i++]=l}else o[i++]=0;var h=o[--i];e[o[--i]]=h,e.checksum1=0,e.checksum2=0;for(var f=0,d=e.barlen-1;f<=d;f+=1)e.i=f,e.indx=A(e.charvals,b(e.barcode,e.i,1)),e.checksum1=L(e.checksum1+((e.barlen-e.i-1)%10+1)*e.indx),e.checksum2=L(e.checksum2+((e.barlen-e.i)%9+1)*e.indx);if(e.checksum1=e.checksum1%11,e.checksum2=L(e.checksum2+e.checksum1)%11,e.validatecheck){if(1==e.numchecks){var p=A(e.barchars,e.checksum1);A(e.barcode,e.barlen)!=p&&(o[i++]="bwipp.code11badCheckDigit#10443",o[i++]="Incorrect Code 11 check digit provided",z())}else A(e.barcode,e.barlen)==A(e.barchars,e.checksum1)&&A(e.barcode,e.barlen+1)==A(e.barchars,e.checksum2)||(o[i++]="bwipp.code11badCheckDigits#10448",o[i++]="Incorrect Code 11 check digits provided",z());e.barcode=b(e.barcode,0,e.barlen),e.includecheck=!0}e.sbs=c(L(6*L(e.barlen+e.numchecks)+12)),e.txt=s(L(e.barlen+e.numchecks)),y(e.sbs,0,A(e.encs,11)),e.xpos=8;for(var m=0,g=e.barlen-1;m<=g;m+=1){e.i=m,e.indx=A(e.charvals,b(e.barcode,e.i,1)),e.enc=A(e.encs,e.indx),y(e.sbs,6*e.i+6,e.enc),v(e.txt,e.i,s([b(e.barcode,e.i,1),e.xpos,e.textyoffset,e.textfont,e.textsize]));for(var w=0;w<=5;w+=1)e.xpos=L(L(A(e.enc,w)-48)+e.xpos)}if(e.includecheck)if(e.barlen>=10){if(y(e.sbs,6*e.barlen+6,A(e.encs,e.checksum1)),y(e.sbs,6*e.barlen+12,A(e.encs,e.checksum2)),e.includecheckintext){v(e.txt,e.barlen,s([b(e.barchars,e.checksum1,1),e.xpos,e.textyoffset,e.textfont,e.textsize])),e.enc=A(e.encs,e.checksum1);for(var x=0;x<=5;x+=1)e.xpos=L(L(A(e.enc,x)-48)+e.xpos);v(e.txt,e.barlen+1,s([b(e.barchars,e.checksum2,1),e.xpos,e.textyoffset,e.textfont,e.textsize]))}else v(e.txt,e.barlen,s(["",e.xpos,e.textyoffset,e.textfont,e.textsize])),v(e.txt,e.barlen+1,s(["",e.xpos,e.textyoffset,e.textfont,e.textsize]));y(e.sbs,6*e.barlen+18,A(e.encs,11))}else y(e.sbs,6*e.barlen+6,A(e.encs,e.checksum1)),e.includecheckintext?v(e.txt,e.barlen,s([b(e.barchars,e.checksum1,1),e.xpos,e.textyoffset,e.textfont,e.textsize])):v(e.txt,e.barlen,s(["",e.xpos,e.textyoffset,e.textfont,e.textsize])),y(e.sbs,6*e.barlen+12,A(e.encs,11));else y(e.sbs,6*e.barlen+6,A(e.encs,11));o[i++]=1/0,o[i++]=1/0;for(var C=e.sbs,k=0,E=C.length;k<E;k++)o[i++]=A(C,k)-48;var S=s();o[i++]=1/0;for(var _=0,O=~~((e.sbs.length+1)/2);_<O;_++)o[i++]=e.height;var T=s();o[i++]=1/0;for(var D=0,B=~~((e.sbs.length+1)/2);D<B;D++)o[i++]=0;var I=s();o[i++]="ren",o[i++]=Wt,o[i++]="sbs",o[i++]=S,o[i++]="bhs",o[i++]=T,o[i++]="bbs",o[i++]=I,e.includetext&&(o[i++]="txt",o[i++]=e.txt),o[i++]="opt",o[i++]=e.options;var M=u();o[i++]=M,e.dontdraw||Wt()}function Ie(){var e=Object.create(Ie.$ctx||(Ie.$ctx={}));e.dontdraw=!1,e.includecheck=!1,e.validatecheck=!1,e.includetext=!1,e.includecheckintext=!1,e.includestartstop=!1,e.semi=!1,e.textfont="OCR-B",e.textsize=10,e.textyoffset=-8,e.height=1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],e.semi&&(e.includestartstop=!0),Ie.$ctx._10579||function(){var t=Object.create(e);t.barchars="0R9GLVHA8EZ4NTS1J2Q6C7DYKBUIX3FWP5M",t.charvals=new Map;for(var n=0;n<=34;n+=1)v(t.charvals,b(t.barchars,n,1),n);for(var r in t)t.hasOwnProperty(r)&&(Ie.$ctx[r]=t[r]);Ie.$ctx._10579=1}();for(var t=0,n=e.barcode.length-1;t<=n;t+=1){void 0!==A(e.charvals,b(e.barcode,t,1))||(o[i++]="bwipp.bc412badCharacter#10584",o[i++]="BC412 must contain only digits and capital letters except O",z())}if(e.semi){e.validatecheck?(e.barcode.length<8||e.barcode.length>19)&&(o[i++]="bwipp.bc412semivalidateBadLength#10592",o[i++]="BC412 semi with check digit must be 8 to 19 characters long",z()):(e.barcode.length<7||e.barcode.length>18)&&(o[i++]="bwipp.bc412semiBadLength#10596",o[i++]="BC412 semi must be 7 to 18 characters long",z()),e.barlen=e.barcode.length,e.validatecheck||(e.barlen=e.barlen+1,e.sbarcode=c(e.barlen),v(e.sbarcode,0,A(e.barcode,0)),v(e.sbarcode,1,48),y(e.sbarcode,2,b(e.barcode,1,e.barlen-2)),e.barcode=e.sbarcode),e.sumodd=0,e.sumeven=0;for(var r=0,a=e.barlen-1;r<=a;r+=1)e.i=r,o[i++]=A(e.charvals,b(e.barcode,e.i,1)),e.i%2==0?e.sumodd=L(o[--i]+e.sumodd):e.sumeven=L(o[--i]+e.sumeven);e.checksum=L(e.sumodd%35+e.sumeven%35*2)%35,e.validatecheck?0!=e.checksum&&(o[i++]="bwipp.bc412semiBadCheckDigit#10622",o[i++]="Incorrect BC412 semi check digit provided",z()):(e.checksum=17*e.checksum%35,v(e.barcode,1,A(e.barchars,e.checksum)))}else{if(o[i++]="barlen",o[i++]=e.barcode.length,e.validatecheck){var l=o[--i];o[i++]=L(l-1)}var h=o[--i];e[o[--i]]=h,e.checksum=0;for(var f=0,d=e.barlen-1;f<=d;f+=1)e.checksum=L(A(e.charvals,b(e.barcode,f,1))+e.checksum);e.checksum=e.checksum%35,e.validatecheck&&(A(e.barcode,e.barlen)!=A(e.barchars,e.checksum)&&(o[i++]="bwipp.bc412badCheckDigit#10639",o[i++]="Incorrect BC412 check digit provided",z()),e.barcode=b(e.barcode,0,e.barlen),e.includecheck=!0)}Ie.$ctx._10658||function(){var t=Object.create(e);for(var n in t.encs=s(["11111115","13111212","11131113","12111213","12121311","13131111","12111312","11131212","11121411","11151111","15111111","11111511","12131211","13121112","13111311","11111214","12121113","11111313","13111113","11121213","11141112","11121312","11141211","14121111","12121212","11131311","13121211","12111411","14111211","11111412","12111114","14111112","12141111","11121114","12131112","12","111"]),t)t.hasOwnProperty(n)&&(Ie.$ctx[n]=t[n]);Ie.$ctx._10658=1}(),e.sbs=c(8*(e.barlen+1)+5),e.includecheck?e.txt=s(e.barlen+1):e.txt=s(e.barlen),e.includestartstop?(y(e.sbs,0,A(e.encs,35)),e.pos=2,e.txtpos=3):(e.pos=0,e.txtpos=0);for(var p=0,m=e.barlen-1;p<=m;p+=1)e.i=p,e.indx=A(e.charvals,b(e.barcode,e.i,1)),y(e.sbs,e.pos,A(e.encs,e.indx)),v(e.txt,e.i,s([b(e.barcode,e.i,1),12*e.i+e.txtpos,e.textyoffset,e.textfont,e.textsize])),e.pos=e.pos+8;e.includecheck&&(y(e.sbs,e.pos,A(e.encs,e.checksum)),e.includecheckintext?v(e.txt,e.barlen,s([b(e.barchars,e.checksum,1),12*e.barlen+e.txtpos,e.textyoffset,e.textfont,e.textsize])):v(e.txt,e.barlen,s(["",12*e.barlen+e.txtpos,e.textyoffset,e.textfont,e.textsize])),e.pos=e.pos+8),e.includestartstop&&(y(e.sbs,e.pos,A(e.encs,36)),e.pos=e.pos+3),e.sbs=b(e.sbs,0,e.pos),o[i++]=1/0,o[i++]=1/0;for(var g=e.sbs,w=0,x=g.length;w<x;w++)o[i++]=L(A(g,w)-48);var C=s();o[i++]=1/0;for(var k=0,E=~~((e.sbs.length+1)/2);k<E;k++)o[i++]=e.height;var S=s();o[i++]=1/0;for(var _=0,O=~~((e.sbs.length+1)/2);_<O;_++)o[i++]=0;var T=s();o[i++]="ren",o[i++]=Wt,o[i++]="sbs",o[i++]=C,o[i++]="bhs",o[i++]=S,o[i++]="bbs",o[i++]=T,e.includetext&&(o[i++]="txt",o[i++]=e.txt),o[i++]="opt",o[i++]=e.options;var D=u();o[i++]=D,e.dontdraw||Wt()}function Me(){var e=Object.create(Me.$ctx||(Me.$ctx={}));e.dontdraw=!1,e.altstartstop=!1,e.includecheck=!1,e.validatecheck=!1,e.includetext=!1,e.includecheckintext=!1,e.textfont="OCR-B",e.textsize=10,e.textyoffset=-8,e.height=1,o[i++]=e,U(),e.options=o[--i];var t=o[--i];e.barcode=t,Me.$ctx._10780||function(){var t=Object.create(e);for(var n in t.encs=s(["11111331","11113311","11131131","33111111","11311311","31111311","13111131","13113111","13311111","31131111","11133111","11331111","31113131","31311131","31313111","11313131","11331311","13131131","11131331","11133311"]),t.barcharsnormal="0123456789-$:/.+ABCD",t.barcharsalt="0123456789-$:/.+TN*E",t)t.hasOwnProperty(n)&&(Me.$ctx[n]=t[n]);Me.$ctx._10780=1}();var n=e.altstartstop?e.barcharsalt:e.barcharsnormal;e.barchars=n,e.charvals=new Map;for(var r=0;r<=19;r+=1)v(e.charvals,b(e.barchars,r,1),r);e.bodyvals=new Map;for(var a=0;a<=15;a+=1)v(e.bodyvals,b(e.barchars,a,1),a);e.ssvals=new Map;for(var l=16;l<=19;l+=1)v(e.ssvals,b(e.barchars,l,1),l);var h=void 0!==A(e.ssvals,b(e.barcode,0,1)),f=void 0!==A(e.ssvals,b(e.barcode,e.barcode.length-1,1));h&&f||(e.altstartstop?(o[i++]="bwipp.rationalizedCodabarBadAltStartStop#10795",o[i++]="Codabar start and stop characters must be one of E N T or *",z()):(o[i++]="bwipp.rationalizedCodabarBadStartStop#10797",o[i++]="Codabar start and stop characters must be one of A B C or D",z()));for(var d=1,p=e.barcode.length-2;d<=p;d+=1){void 0!==A(e.bodyvals,b(e.barcode,d,1))||(o[i++]="bwipp.rationalizedCodabarBadCharacter#10802",o[i++]="Codabar body must contain only digits and symbols - $ : / . +",z())}if(o[i++]="barlen",o[i++]=e.barcode.length,e.validatecheck){var m=o[--i];o[i++]=L(m-1)}var g=o[--i];e[o[--i]]=g,e.checksum=0;for(var w=0,x=L(e.barlen-2);w<=x;w+=1)e.checksum=L(A(e.charvals,b(e.barcode,w,1))+e.checksum);if(e.checksum=L(A(e.charvals,b(e.barcode,e.barcode.length-1,1))+e.checksum),e.checksum=L(16-e.checksum%16)%16,e.validatecheck){A(e.barcode,L(e.barlen-1))!=A(e.barchars,e.checksum)&&(o[i++]="bwipp.rationalizedCodabarBadCheckDigit#10818",o[i++]="Incorrect Codabar check digit provided",z());var C=c(e.barlen);y(C,0,b(e.barcode,0,L(e.barlen-1))),y(C,L(e.barlen-1),b(e.barcode,e.barlen,1)),e.barcode=C,e.includecheck=!0}if(o[i++]="sbs",o[i++]=e.barlen,e.includecheck){var E=o[--i];o[i++]=L(E+1)}var S=c(8*o[--i]);if(e[o[--i]]=S,o[i++]="txt",o[i++]=e.barlen,e.includecheck){var _=o[--i];o[i++]=L(_+1)}var O=s(o[--i]);e[o[--i]]=O,e.xpos=0;for(var T=0,D=L(e.barlen-2);T<=D;T+=1){e.i=T,e.indx=A(e.charvals,b(e.barcode,e.i,1)),e.enc=A(e.encs,e.indx),y(e.sbs,8*e.i,e.enc),v(e.txt,e.i,s([b(e.barcode,e.i,1),e.xpos,e.textyoffset,e.textfont,e.textsize]));for(var B=0;B<=7;B+=1)e.xpos=L(L(A(e.enc,B)-48)+e.xpos)}if(e.includecheck){y(e.sbs,L(8*e.barlen-8),A(e.encs,e.checksum)),e.includecheckintext?v(e.txt,L(e.barlen-1),s([b(e.barchars,e.checksum,1),e.xpos,e.textyoffset,e.textfont,e.textsize])):v(e.txt,L(e.barlen-1),s([" ",e.xpos,e.textyoffset,e.textfont,e.textsize]));for(var I=0;I<=7;I+=1)e.xpos=L(L(A(A(e.encs,e.checksum),I)-48)+e.xpos);e.indx=A(e.charvals,b(e.barcode,L(e.barlen-1),1)),e.enc=A(e.encs,e.indx),y(e.sbs,8*e.barlen,e.enc),v(e.txt,e.barlen,s([b(e.barcode,L(e.barlen-1),1),e.xpos,e.textyoffset,e.textfont,e.textsize]))}else e.indx=A(e.charvals,b(e.barcode,L(e.barlen-1),1)),e.enc=A(e.encs,e.indx),y(e.sbs,L(8*e.barlen-8),e.enc),v(e.txt,L(e.barlen-1),s([b(e.barcode,L(e.barlen-1),1),e.xpos,e.textyoffset,e.textfont,e.textsize]));o[i++]=1/0,o[i++]=1/0,k(e.sbs,(function(){var e=o[--i];o[i++]=L(e-48)}));var M=s();o[i++]=1/0;for(var j=0,N=~~((e.sbs.length+1)/2);j<N;j++)o[i++]=e.height;var F=s();o[i++]=1/0;for(var R=0,P=~~((e.sbs.length+1)/2);R<P;R++)o[i++]=0;var H=s();o[i++]="ren",o[i++]=Wt,o[i++]="sbs",o[i++]=M,o[i++]="bhs",o[i++]=F,o[i++]="bbs",o[i++]=H,e.includetext&&(o[i++]="txt",o[i++]=e.txt),o[i++]="opt",o[i++]=e.options;var $=u();o[i++]=$,e.dontdraw||Wt()}function je(){var e=Object.create(je.$ctx||(je.$ctx={}));e.dontdraw=!1,e.height=.15,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],e.barlen=e.barcode.length,o[i++]=1/0;var t=T(b(e.barcode,5,1),"9")?14:11;o[i++]=2,o[i++]=2,o[i++]=5,o[i++]=5,o[i++]=t,o[i++]=t,o[i++]=20,o[i++]=20,o[i++]=25,o[i++]=25,o[i++]=29,o[i++]=29,e.txtdict=u(),e.txt=s(e.barlen+6),e.spacecnt=0;for(var n=0,r=e.barlen-1;n<=r;n+=1){e.i=n,void 0!==A(e.txtdict,e.i)&&(v(e.txt,e.i+e.spacecnt,s([" ",0,0,"",0])),e.spacecnt=e.spacecnt+1),v(e.txt,e.i+e.spacecnt,s([b(e.barcode,e.i,1),0,0,"",0]))}e.txt=b(e.txt,0,e.barcode.length+e.spacecnt),e.normalize=function(){e.base=o[--i],e.num=o[--i];for(var t=e.num.length-1;t>=1;t-=1){e.i=t;var n=e.num,r=e.i;v(n,r-1,L(A(n,r-1)+~~(A(e.num,e.i)/e.base))),v(e.num,e.i,A(e.num,e.i)%e.base)}for(;!B(A(e.num,0),e.base);)o[i++]=1/0,o[i++]=0,k(e.num),e.num=s(),v(e.num,0,L(A(e.num,0)+~~(A(e.num,1)/e.base))),v(e.num,1,A(e.num,1)%e.base);o[i++]=1/0,e.i=!0;for(var a=e.num,u=0,c=a.length;u<c;u++){var l=A(a,u);o[i++]=l,0==l&&e.i?i--:e.i=!1}e.num=s(),0==e.num.length&&(e.num=s([0])),o[i++]=e.num},e.bigadd=function(){var t=o[--i],n=o[--i];if(e.offset=Math.abs(t.length-n.length),t.length<n.length){var r=t;t=n,n=r}e.a=t,e.b=n;for(var a=0,s=e.b.length-1;a<=s;a+=1){var u=e.a,c=e.offset;v(u,a+c,L(A(u,a+c)+A(e.b,a)))}o[i++]=e.a},20==e.barlen&&(o[i++]=s([0])),25==e.barlen&&(o[i++]=s([1])),29==e.barlen&&(o[i++]=s([1,0,0,0,0,1])),31==e.barlen&&(o[i++]=s([1,0,0,0,1,0,0,0,0,1]));var a=o[--i];o[i++]="binval",o[i++]=a,o[i++]=1/0;for(var c=b(e.barcode,20,e.barlen-20),l=0,h=c.length;l<h;l++)o[i++]=L(A(c,l)-48);var f=s();o[i++]=f,e.bigadd();var d=o[--i];e[o[--i]]=d,o[i++]=1/0;for(var p=e.binval,m=0,g=p.length;m<g;m++)o[i++]=A(p,m);o[i++]=L(A(e.barcode,0)-48),e.binval=s(),o[i++]=1/0;for(var y=e.binval,w=0,x=y.length;w<x;w++)o[i++]=5*A(y,w);var C=s();o[i++]="binval",o[i++]=C,o[i++]=s([L(A(e.barcode,1)-48)]),e.bigadd(),o[i++]=10,e.normalize();var E=o[--i];e[o[--i]]=E,o[i++]=1/0;for(var S=e.binval,_=0,O=S.length;_<O;_++)o[i++]=A(S,_);for(var D=b(e.barcode,2,18),I=0,M=D.length;I<M;I++)o[i++]=L(A(D,I)-48);e.binval=s(),e.bytes=s(13),o[i++]=1/0;for(var j=e.binval,N=0,F=j.length;N<F;N++)o[i++]=A(j,N);e.bintmp=s();for(var R=12;R>=0;R-=1){e.i=R;for(var P=0,z=e.bintmp.length-2;P<=z;P+=1){e.j=P;var H=e.bintmp,$=e.j;v(H,$+1,L(A(H,$+1)+A(e.bintmp,e.j)%256*10)),v(e.bintmp,e.j,~~(A(e.bintmp,e.j)/256))}v(e.bytes,e.i,A(e.bintmp,e.bintmp.length-1)%256);var Q=e.bintmp,V=e.bintmp;v(Q,V.length-1,~~(A(Q,V.length-1)/256))}e.fcs=2047,e.dat=A(e.bytes,0)<<5;for(var q=0;q<6;q++)0!=(1024&(e.fcs^e.dat))?e.fcs=e.fcs<<1^3893:e.fcs=e.fcs<<1,e.fcs=2047&e.fcs,e.dat=e.dat<<1;for(var G=1;G<=12;G+=1){e.dat=A(e.bytes,G)<<3;for(var W=0;W<8;W++)0!=(1024&(e.fcs^e.dat))?e.fcs=e.fcs<<1^3893:e.fcs=e.fcs<<1,e.fcs=2047&e.fcs,e.dat=e.dat<<1}e.codewords=s(10);for(var K=9;K>=0;K-=1){e.i=K,9==e.i?e.b=636:e.b=1365;for(var Y=0,X=e.binval.length-2;Y<=X;Y+=1){e.j=Y;var J=e.binval,Z=e.j;v(J,Z+1,L(A(J,Z+1)+A(e.binval,e.j)%e.b*10)),v(e.binval,e.j,~~(A(e.binval,e.j)/e.b))}v(e.codewords,e.i,A(e.binval,e.binval.length-1)%e.b);var ee=e.binval,te=e.binval;v(ee,te.length-1,~~(A(ee,te.length-1)/e.b))}v(e.codewords,9,2*A(e.codewords,9)),0!=(1024&e.fcs)&&v(e.codewords,0,L(A(e.codewords,0)+659)),je.$ctx._11150||function(){var t=Object.create(e);for(var n in t.tab513=s([31,7936,47,7808,55,7552,59,7040,61,6016,62,3968,79,7744,87,7488,91,6976,93,5952,94,3904,103,7360,107,6848,109,5824,110,3776,115,6592,117,5568,118,3520,121,5056,122,3008,124,1984,143,7712,151,7456,155,6944,157,5920,158,3872,167,7328,171,6816,173,5792,174,3744,179,6560,181,5536,182,3488,185,5024,186,2976,188,1952,199,7264,203,6752,205,5728,206,3680,211,6496,213,5472,214,3424,217,4960,218,2912,220,1888,227,6368,229,5344,230,3296,233,4832,234,2784,236,1760,241,4576,242,2528,244,1504,248,992,271,7696,279,7440,283,6928,285,5904,286,3856,295,7312,299,6800,301,5776,302,3728,307,6544,309,5520,310,3472,313,5008,314,2960,316,1936,327,7248,331,6736,333,5712,334,3664,339,6480,341,5456,342,3408,345,4944,346,2896,348,1872,355,6352,357,5328,358,3280,361,4816,362,2768,364,1744,369,4560,370,2512,372,1488,376,976,391,7216,395,6704,397,5680,398,3632,403,6448,405,5424,406,3376,409,4912,410,2864,412,1840,419,6320,421,5296,422,3248,425,4784,426,2736,428,1712,433,4528,434,2480,436,1456,440,944,451,6256,453,5232,454,3184,457,4720,458,2672,460,1648,465,4464,466,2416,468,1392,472,880,481,4336,482,2288,484,1264,488,752,527,7688,535,7432,539,6920,541,5896,542,3848,551,7304,555,6792,557,5768,558,3720,563,6536,565,5512,566,3464,569,5e3,570,2952,572,1928,583,7240,587,6728,589,5704,590,3656,595,6472,597,5448,598,3400,601,4936,602,2888,604,1864,611,6344,613,5320,614,3272,617,4808,618,2760,620,1736,625,4552,626,2504,628,1480,632,968,647,7208,651,6696,653,5672,654,3624,659,6440,661,5416,662,3368,665,4904,666,2856,668,1832,675,6312,677,5288,678,3240,681,4776,682,2728,684,1704,689,4520,690,2472,692,1448,696,936,707,6248,709,5224,710,3176,713,4712,714,2664,716,1640,721,4456,722,2408,724,1384,728,872,737,4328,738,2280,740,1256,775,7192,779,6680,781,5656,782,3608,787,6424,789,5400,790,3352,793,4888,794,2840,796,1816,803,6296,805,5272,806,3224,809,4760,810,2712,812,1688,817,4504,818,2456,820,1432,824,920,835,6232,837,5208,838,3160,841,4696,842,2648,844,1624,849,4440,850,2392,852,1368,865,4312,866,2264,868,1240,899,6200,901,5176,902,3128,905,4664,906,2616,908,1592,913,4408,914,2360,916,1336,929,4280,930,2232,932,1208,961,4216,962,2168,964,1144,1039,7684,1047,7428,1051,6916,1053,5892,1054,3844,1063,7300,1067,6788,1069,5764,1070,3716,1075,6532,1077,5508,1078,3460,1081,4996,1082,2948,1084,1924,1095,7236,1099,6724,1101,5700,1102,3652,1107,6468,1109,5444,1110,3396,1113,4932,1114,2884,1116,1860,1123,6340,1125,5316,1126,3268,1129,4804,1130,2756,1132,1732,1137,4548,1138,2500,1140,1476,1159,7204,1163,6692,1165,5668,1166,3620,1171,6436,1173,5412,1174,3364,1177,4900,1178,2852,1180,1828,1187,6308,1189,5284,1190,3236,1193,4772,1194,2724,1196,1700,1201,4516,1202,2468,1204,1444,1219,6244,1221,5220,1222,3172,1225,4708,1226,2660,1228,1636,1233,4452,1234,2404,1236,1380,1249,4324,1250,2276,1287,7188,1291,6676,1293,5652,1294,3604,1299,6420,1301,5396,1302,3348,1305,4884,1306,2836,1308,1812,1315,6292,1317,5268,1318,3220,1321,4756,1322,2708,1324,1684,1329,4500,1330,2452,1332,1428,1347,6228,1349,5204,1350,3156,1353,4692,1354,2644,1356,1620,1361,4436,1362,2388,1377,4308,1378,2260,1411,6196,1413,5172,1414,3124,1417,4660,1418,2612,1420,1588,1425,4404,1426,2356,1441,4276,1442,2228,1473,4212,1474,2164,1543,7180,1547,6668,1549,5644,1550,3596,1555,6412,1557,5388,1558,3340,1561,4876,1562,2828,1564,1804,1571,6284,1573,5260,1574,3212,1577,4748,1578,2700,1580,1676,1585,4492,1586,2444,1603,6220,1605,5196,1606,3148,1609,4684,1610,2636,1617,4428,1618,2380,1633,4300,1634,2252,1667,6188,1669,5164,1670,3116,1673,4652,1674,2604,1681,4396,1682,2348,1697,4268,1698,2220,1729,4204,1730,2156,1795,6172,1797,5148,1798,3100,1801,4636,1802,2588,1809,4380,1810,2332,1825,4252,1826,2204,1857,4188,1858,2140,1921,4156,1922,2108,2063,7682,2071,7426,2075,6914,2077,5890,2078,3842,2087,7298,2091,6786,2093,5762,2094,3714,2099,6530,2101,5506,2102,3458,2105,4994,2106,2946,2119,7234,2123,6722,2125,5698,2126,3650,2131,6466,2133,5442,2134,3394,2137,4930,2138,2882,2147,6338,2149,5314,2150,3266,2153,4802,2154,2754,2161,4546,2162,2498,2183,7202,2187,6690,2189,5666,2190,3618,2195,6434,2197,5410,2198,3362,2201,4898,2202,2850,2211,6306,2213,5282,2214,3234,2217,4770,2218,2722,2225,4514,2226,2466,2243,6242,2245,5218,2246,3170,2249,4706,2250,2658,2257,4450,2258,2402,2273,4322,2311,7186,2315,6674,2317,5650,2318,3602,2323,6418,2325,5394,2326,3346,2329,4882,2330,2834,2339,6290,2341,5266,2342,3218,2345,4754,2346,2706,2353,4498,2354,2450,2371,6226,2373,5202,2374,3154,2377,4690,2378,2642,2385,4434,2401,4306,2435,6194,2437,5170,2438,3122,2441,4658,2442,2610,2449,4402,2465,4274,2497,4210,2567,7178,2571,6666,2573,5642,2574,3594,2579,6410,2581,5386,2582,3338,2585,4874,2586,2826,2595,6282,2597,5258,2598,3210,2601,4746,2602,2698,2609,4490,2627,6218,2629,5194,2630,3146,2633,4682,2641,4426,2657,4298,2691,6186,2693,5162,2694,3114,2697,4650,2705,4394,2721,4266,2753,4202,2819,6170,2821,5146,2822,3098,2825,4634,2833,4378,2849,4250,2881,4186,2945,4154,3079,7174,3083,6662,3085,5638,3086,3590,3091,6406,3093,5382,3094,3334,3097,4870,3107,6278,3109,5254,3110,3206,3113,4742,3121,4486,3139,6214,3141,5190,3145,4678,3153,4422,3169,4294,3203,6182,3205,5158,3209,4646,3217,4390,3233,4262,3265,4198,3331,6166,3333,5142,3337,4630,3345,4374,3361,4246,3393,4182,3457,4150,3587,6158,3589,5134,3593,4622,3601,4366,3617,4238,3649,4174,3713,4142,3841,4126,4111,7681,4119,7425,4123,6913,4125,5889,4135,7297,4139,6785,4141,5761,4147,6529,4149,5505,4153,4993,4167,7233,4171,6721,4173,5697,4179,6465,4181,5441,4185,4929,4195,6337,4197,5313,4201,4801,4209,4545,4231,7201,4235,6689,4237,5665,4243,6433,4245,5409,4249,4897,4259,6305,4261,5281,4265,4769,4273,4513,4291,6241,4293,5217,4297,4705,4305,4449,4359,7185,4363,6673,4365,5649,4371,6417,4373,5393,4377,4881,4387,6289,4389,5265,4393,4753,4401,4497,4419,6225,4421,5201,4425,4689,4483,6193,4485,5169,4489,4657,4615,7177,4619,6665,4621,5641,4627,6409,4629,5385,4633,4873,4643,6281,4645,5257,4649,4745,4675,6217,4677,5193,4739,6185,4741,5161,4867,6169,4869,5145,5127,7173,5131,6661,5133,5637,5139,6405,5141,5381,5155,6277,5157,5253,5187,6213,5251,6181,5379,6165,5635,6157,6151,7171,6155,6659,6163,6403,6179,6275,6211,5189,4681,4433,4321,3142,2634,2386,2274,1612,1364,1252,856,744,496]),t.tab213=s([3,6144,5,5120,6,3072,9,4608,10,2560,12,1536,17,4352,18,2304,20,1280,24,768,33,4224,34,2176,36,1152,40,640,48,384,65,4160,66,2112,68,1088,72,576,80,320,96,192,129,4128,130,2080,132,1056,136,544,144,288,257,4112,258,2064,260,1040,264,528,513,4104,514,2056,516,1032,1025,4100,1026,2052,2049,4098,4097,2050,1028,520,272,160]),t)t.hasOwnProperty(n)&&(je.$ctx[n]=t[n]);je.$ctx._11150=1}(),e.chars=s(10);for(var ne=0;ne<=9;ne+=1){e.i=ne;var re=A(e.codewords,e.i);if(o[i++]=re,re<=1286){var ie=A(e.tab513,o[--i]);o[i++]=ie}else{var oe=A(e.tab213,L(o[--i]-1287));o[i++]=oe}v(e.chars,e.i,o[--i])}for(var ae=9;ae>=0;ae-=1)e.i=ae,0!=(~~Math.pow(2,e.i)&e.fcs)&&v(e.chars,e.i,8191^A(e.chars,e.i));je.$ctx._11187||function(){var t=Object.create(e);for(var n in t.barmap=s([7,2,4,3,1,10,0,0,9,12,2,8,5,5,6,11,8,9,3,1,0,1,5,12,2,5,1,8,4,4,9,11,6,3,8,10,3,9,7,6,5,11,1,4,8,5,2,12,9,10,0,2,7,1,6,7,3,6,4,9,0,3,8,6,6,4,2,7,1,1,9,9,7,10,5,2,4,0,3,8,6,2,0,4,8,11,1,0,9,8,3,12,2,6,7,7,5,1,4,10,1,12,6,9,7,3,8,0,5,8,9,7,4,6,2,10,3,4,0,5,8,4,5,7,7,11,1,9,6,0,9,6,0,6,4,8,2,1,3,2,5,9,8,12,4,11,6,1,9,5,7,4,3,3,1,2,0,7,2,0,1,3,4,1,6,10,3,5,8,7,9,4,2,11,5,6,0,8,7,12,4,2,8,1,5,10,3,0,9,3,0,9,6,5,2,4,7,8,1,7,5,0,4,5,2,3,0,10,6,12,9,2,3,11,1,6,8,8,7,9,5,4,0,11,1,5,2,2,9,1,4,12,8,3,6,6,7,0,3,7,4,7,7,5,0,12,1,11,2,9,9,0,6,8,5,3,3,10,8,2]),t)t.hasOwnProperty(n)&&(je.$ctx[n]=t[n]);je.$ctx._11187=1}(),e.bbs=s(65),e.bhs=s(65);for(var se=0;se<=64;se+=1)e.i=se,e.dec=0!=(A(e.chars,A(e.barmap,4*e.i))&~~Math.pow(2,A(e.barmap,4*e.i+1))),e.asc=0!=(A(e.chars,A(e.barmap,4*e.i+2))&~~Math.pow(2,A(e.barmap,4*e.i+3))),e.dec||e.asc||(v(e.bbs,e.i,3*e.height/8),v(e.bhs,e.i,2*e.height/8)),!e.dec&&e.asc&&(v(e.bbs,e.i,3*e.height/8),v(e.bhs,e.i,5*e.height/8)),e.dec&&!e.asc&&(v(e.bbs,e.i,0*e.height/8),v(e.bhs,e.i,5*e.height/8)),e.dec&&e.asc&&(v(e.bbs,e.i,0*e.height/8),v(e.bhs,e.i,8*e.height/8));o[i++]=1/0;var ue=e.bbs,ce=e.bhs;o[i++]=1/0;for(var le=0,he=e.bhs.length-1;le<he;le++)o[i++]=1.44,o[i++]=1.872;o[i++]=1.44;var fe=s();o[i++]="ren",o[i++]=Wt,o[i++]="bbs",o[i++]=ue,o[i++]="bhs",o[i++]=ce,o[i++]="sbs",o[i++]=fe,o[i++]="txt",o[i++]=e.txt,o[i++]="textxalign",o[i++]="left",o[i++]="textfont",o[i++]="OCR-B",o[i++]="textyoffset",o[i++]=1,o[i++]="textxoffset",o[i++]=-.3,o[i++]="opt",o[i++]=e.options;var de=u();o[i++]=de,e.dontdraw||Wt()}function Ne(){var e=Object.create(Ne.$ctx||(Ne.$ctx={}));if(e.dontdraw=!1,e.includetext=!1,e.validatecheck=!1,e.includecheckintext=!1,e.textfont="OCR-B",e.textsize=10,e.textyoffset=-8,e.height=.125,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],o[i++]="barlen",o[i++]=e.barcode.length,e.validatecheck){var t=o[--i];o[i++]=L(t-1)}var n=o[--i];e[o[--i]]=n,5!=e.barlen&&9!=e.barlen&&11!=e.barlen&&(o[i++]="bwipp.postnetBadLength#11282",o[i++]="USPS POSTNET must be 5, 9 or 11 digits excluding check digit",z()),k(e.barcode,(function(){var e=o[--i];(e<48||e>57)&&(o[i++]="bwipp.postnetBadCharacter#11286",o[i++]="USPS POSTNET must contain only digits",z())})),Ne.$ctx._11300||function(){var t=Object.create(e);for(var n in t.barchars="0123456789",t.encs=s(["55222","22255","22525","22552","25225","25252","25522","52225","52252","52522","5","5"]),t)t.hasOwnProperty(n)&&(Ne.$ctx[n]=t[n]);Ne.$ctx._11300=1}(),e.checksum=0;for(var r=0,a=L(e.barlen-1);r<=a;r+=1)e.i=r,e.checksum=L(e.checksum+L(A(e.barcode,e.i)-48));e.checksum=L(10-e.checksum%10)%10,e.validatecheck&&(A(e.barcode,e.barlen)!=A(e.barchars,e.checksum)&&(o[i++]="bwipp.postnetBadCheckDigit#11310",o[i++]="Incorrect USPS POSTNET check digit provided",z()),e.barcode=b(e.barcode,0,e.barlen)),e.bhs=s(L(5*e.barlen+7)),e.txt=s(L(e.barlen+1)),e.enc=A(e.encs,10),e.heights=s(e.enc.length);for(var c=0,l=e.enc.length-1;c<=l;c+=1)e.j=c,v(e.heights,e.j,p(b(e.enc,e.j,1))*e.height/5);y(e.bhs,0,e.heights);for(var h=0,f=L(e.barlen-1);h<=f;h+=1){e.i=h,e.enc=A(e.encs,L(A(e.barcode,e.i)-48)),e.heights=s(e.enc.length);for(var d=0,m=e.enc.length-1;d<=m;d+=1)e.j=d,v(e.heights,e.j,p(b(e.enc,e.j,1))*e.height/5);y(e.bhs,5*e.i+1,e.heights),v(e.txt,e.i,s([b(e.barcode,e.i,1),3.312*(5*e.i+1),e.textyoffset,e.textfont,e.textsize]))}e.enc=A(e.encs,e.checksum),e.heights=s(e.enc.length);for(var g=0,w=e.enc.length-1;g<=w;g+=1)e.j=g,v(e.heights,e.j,p(b(e.enc,e.j,1))*e.height/5);y(e.bhs,L(5*e.barlen+1),e.heights),e.includecheckintext?v(e.txt,e.barlen,s([b(e.barchars,e.checksum,1),3.312*L(5*e.barlen+1),e.textyoffset,e.textfont,e.textsize])):v(e.txt,e.barlen,s([" ",72*L(5*e.barlen+1)/25,e.textyoffset,e.textfont,e.textsize])),e.enc=A(e.encs,11),e.heights=s(e.enc.length);for(var x=0,C=e.enc.length-1;x<=C;x+=1)e.j=x,v(e.heights,e.j,p(b(e.enc,e.j,1))*e.height/5);y(e.bhs,L(5*e.barlen+6),e.heights),o[i++]=1/0;var E=e.bhs;o[i++]=1/0;for(var S=0,_=e.bhs.length;S<_;S++)o[i++]=0;var O=s();o[i++]=1/0;for(var T=0,D=e.bhs.length-1;T<D;T++)o[i++]=1.44,o[i++]=1.872;o[i++]=1.44;var B=s();o[i++]="ren",o[i++]=Wt,o[i++]="bhs",o[i++]=E,o[i++]="bbs",o[i++]=O,o[i++]="sbs",o[i++]=B,e.includetext&&(o[i++]="txt",o[i++]=e.txt),o[i++]="opt",o[i++]=e.options;var I=u();o[i++]=I,e.dontdraw||Wt()}function Fe(){var e=Object.create(Fe.$ctx||(Fe.$ctx={}));if(e.dontdraw=!1,e.includetext=!1,e.validatecheck=!1,e.includecheckintext=!1,e.textfont="OCR-B",e.textsize=10,e.textyoffset=-8,e.height=.125,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],o[i++]="barlen",o[i++]=e.barcode.length,e.validatecheck){var t=o[--i];o[i++]=L(t-1)}var n=o[--i];e[o[--i]]=n,11!=e.barlen&&13!=e.barlen&&(o[i++]="bwipp.planetBadLength#11430",o[i++]="USPS PLANET must be 11 or 13 digits excluding check digit",z()),k(e.barcode,(function(){var e=o[--i];(e<48||e>57)&&(o[i++]="bwipp.planetBadCharacter#11434",o[i++]="USPS PLANET must contain only digits",z())})),Fe.$ctx._11448||function(){var t=Object.create(e);for(var n in t.barchars="0123456789",t.encs=s(["22555","55522","55252","55225","52552","52525","52255","25552","25525","25255","5","5"]),t)t.hasOwnProperty(n)&&(Fe.$ctx[n]=t[n]);Fe.$ctx._11448=1}(),e.checksum=0;for(var r=0,a=L(e.barlen-1);r<=a;r+=1)e.i=r,e.checksum=L(e.checksum+L(A(e.barcode,e.i)-48));e.checksum=L(10-e.checksum%10)%10,e.validatecheck&&(A(e.barcode,e.barlen)!=A(e.barchars,e.checksum)&&(o[i++]="bwipp.planetBadCheckDigit#11459",o[i++]="Incorrect USPS PLANET check digit provided",z()),e.barcode=b(e.barcode,0,e.barlen)),e.bhs=s(L(5*e.barlen+7)),e.txt=s(L(e.barlen+1)),e.enc=A(e.encs,10),e.heights=s(e.enc.length);for(var c=0,l=e.enc.length-1;c<=l;c+=1)e.j=c,v(e.heights,e.j,p(b(e.enc,e.j,1))*e.height/5);y(e.bhs,0,e.heights);for(var h=0,f=L(e.barlen-1);h<=f;h+=1){e.i=h,e.enc=A(e.encs,L(A(e.barcode,e.i)-48)),e.heights=s(e.enc.length);for(var d=0,m=e.enc.length-1;d<=m;d+=1)e.j=d,v(e.heights,e.j,p(b(e.enc,e.j,1))*e.height/5);y(e.bhs,5*e.i+1,e.heights),v(e.txt,e.i,s([b(e.barcode,e.i,1),3.312*(5*e.i+1),e.textyoffset,e.textfont,e.textsize]))}e.enc=A(e.encs,e.checksum),e.heights=s(e.enc.length);for(var g=0,w=e.enc.length-1;g<=w;g+=1)e.j=g,v(e.heights,e.j,p(b(e.enc,e.j,1))*e.height/5);y(e.bhs,L(5*e.barlen+1),e.heights),e.includecheckintext?v(e.txt,e.barlen,s([b(e.barchars,e.checksum,1),3.312*L(5*e.barlen+1),e.textyoffset,e.textfont,e.textsize])):v(e.txt,e.barlen,s([" ",72*L(5*e.barlen+1)/25,e.textyoffset,e.textfont,e.textsize])),e.enc=A(e.encs,11),e.heights=s(e.enc.length);for(var x=0,C=e.enc.length-1;x<=C;x+=1)e.j=x,v(e.heights,e.j,p(b(e.enc,e.j,1))*e.height/5);y(e.bhs,L(5*e.barlen+6),e.heights),o[i++]=1/0;var E=e.bhs;o[i++]=1/0;for(var S=0,_=e.bhs.length;S<_;S++)o[i++]=0;var O=s();o[i++]=1/0;for(var T=0,D=e.bhs.length-1;T<D;T++)o[i++]=1.44,o[i++]=1.872;o[i++]=1.44;var B=s();o[i++]="ren",o[i++]=Wt,o[i++]="bhs",o[i++]=E,o[i++]="bbs",o[i++]=O,o[i++]="sbs",o[i++]=B,e.includetext&&(o[i++]="txt",o[i++]=e.txt),o[i++]="opt",o[i++]=e.options;var I=u();o[i++]=I,e.dontdraw||Wt()}function Re(){var e=Object.create(Re.$ctx||(Re.$ctx={}));e.dontdraw=!1,e.includetext=!1,e.validatecheck=!1,e.includecheckintext=!1,e.textfont="OCR-B",e.textsize=10,e.textyoffset=-8,e.height=.175,o[i++]=e,U(),e.options=o[--i];var t=o[--i];e.barcode=t,Re.$ctx._11591||function(){var t=Object.create(e);t.barchars="ZUVWXY501234B6789AHCDEFGNIJKLMTOPQRS",t.charvals=new Map;for(var n=0;n<=35;n+=1)v(t.charvals,b(t.barchars,n,1),n);for(var r in t.encs=s(["3300","2211","2301","2310","3201","3210","1122","0033","0123","0132","1023","1032","1302","0213","0303","0312","1203","1212","1320","0231","0321","0330","1221","1230","3102","2013","2103","2112","3003","3012","3120","2031","2121","2130","3021","3030","2","3"]),t)t.hasOwnProperty(r)&&(Re.$ctx[r]=t[r]);Re.$ctx._11591=1}();for(var n=0,r=e.barcode.length-1;n<=r;n+=1){void 0!==A(e.charvals,b(e.barcode,n,1))||(o[i++]="bwipp.royalmailBadCharacter#11596",o[i++]="RM4SCC must contain only capital letters and digits",z())}if(o[i++]="barlen",o[i++]=e.barcode.length,e.validatecheck){var a=o[--i];o[i++]=L(a-1)}var l=o[--i];e[o[--i]]=l,e.checksumrow=0,e.checksumcol=0;for(var h=0,f=L(e.barlen-1);h<=f;h+=1)e.i=h,e.indx=A(e.charvals,b(e.barcode,e.i,1)),e.checksumrow=e.checksumrow+~~(e.indx/6),e.checksumcol=L(e.checksumcol+e.indx%6);e.checksum=L(e.checksumrow%6*6+e.checksumcol%6),e.validatecheck&&(A(e.barcode,e.barlen)!=A(e.barchars,e.checksum)&&(o[i++]="bwipp.royalmailBadCheckDigit#11613",o[i++]="Incorrect RM4SCC check digit provided",z()),e.barcode=b(e.barcode,0,e.barlen)),e.encstr=c(L(4*e.barlen+6)),e.txt=s(L(e.barlen+1)),y(e.encstr,0,A(e.encs,36));for(var d=0,p=L(e.barlen-1);d<=p;d+=1)e.i=d,e.indx=A(e.charvals,b(e.barcode,e.i,1)),y(e.encstr,4*e.i+1,A(e.encs,e.indx)),v(e.txt,e.i,s([b(e.barcode,e.i,1),3.312*(4*e.i+1),e.textyoffset,e.textfont,e.textsize]));y(e.encstr,L(4*e.barlen+1),A(e.encs,e.checksum)),e.includecheckintext?v(e.txt,e.barlen,s([b(e.barchars,e.checksum,1),3.312*L(4*e.barlen+1),e.textyoffset,e.textfont,e.textsize])):v(e.txt,e.barlen,s([" ",3.312*L(4*e.barlen+1),e.textyoffset,e.textfont,e.textsize])),y(e.encstr,L(4*e.barlen+5),A(e.encs,37)),e.bbs=s(e.encstr.length),e.bhs=s(e.encstr.length);for(var m=0,g=e.encstr.length-1;m<=g;m+=1)e.i=m,e.enc=b(e.encstr,e.i,1),T(e.enc,"0")&&(v(e.bbs,e.i,3*e.height/8),v(e.bhs,e.i,2*e.height/8)),T(e.enc,"1")&&(v(e.bbs,e.i,0*e.height/8),v(e.bhs,e.i,5*e.height/8)),T(e.enc,"2")&&(v(e.bbs,e.i,3*e.height/8),v(e.bhs,e.i,5*e.height/8)),T(e.enc,"3")&&(v(e.bbs,e.i,0*e.height/8),v(e.bhs,e.i,8*e.height/8));o[i++]=1/0;var w=e.bbs,x=e.bhs;o[i++]=1/0;for(var C=0,k=e.bhs.length-1;C<k;C++)o[i++]=1.44,o[i++]=1.872;o[i++]=1.44;var E=s();o[i++]="ren",o[i++]=Wt,o[i++]="bbs",o[i++]=w,o[i++]="bhs",o[i++]=x,o[i++]="sbs",o[i++]=E,e.includetext&&(o[i++]="txt",o[i++]=e.txt),o[i++]="opt",o[i++]=e.options;var S=u();o[i++]=S,e.dontdraw||Wt()}function Pe(){var e=Object.create(Pe.$ctx||(Pe.$ctx={}));e.dontdraw=!1,e.includetext=!1,e.textfont="OCR-B",e.textsize=10,e.textyoffset=-8,e.height=.175,e.custinfoenc="character",o[i++]=e,U(),e.options=o[--i];var t=o[--i];e.barcode=t,Pe.$ctx._11744||function(){var t=Object.create(e);for(var n in t.encs=s(["000","001","002","010","011","012","020","021","022","100","101","102","110","111","112","120","121","122","200","201","202","210","211","212","220","221","222","300","301","302","310","311","312","320","321","322","023","030","031","032","033","103","113","123","130","131","132","133","203","213","223","230","231","232","233","303","313","323","330","331","332","333","003","013","00","01","02","10","11","12","20","21","22","30","13","3"]),t.barchars="ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789abcdefghijklmnopqrstuvwxyz #",t)t.hasOwnProperty(n)&&(Pe.$ctx[n]=t[n]);Pe.$ctx._11744=1}(),e.barlen=e.barcode.length,T(b(e.barcode,0,2),"11")&&(o[i++]=37),T(b(e.barcode,0,2),"45")&&(o[i++]=37),T(b(e.barcode,0,2),"59")&&(o[i++]=52),T(b(e.barcode,0,2),"62")&&(o[i++]=67),e.encstr=c(o[--i]),e.txt=s(e.barlen-2),y(e.encstr,0,A(e.encs,74));for(var n=0;n<=1;n+=1)e.i=n,y(e.encstr,2*e.i+2,A(e.encs,p(b(e.barcode,e.i,1))+64));for(var r=2;r<=9;r+=1)e.i=r,y(e.encstr,2*e.i+2,A(e.encs,p(b(e.barcode,e.i,1))+64)),v(e.txt,e.i-2,s([b(e.barcode,e.i,1),3.312*(2*(e.i-2)+6),e.textyoffset,e.textfont,e.textsize]));if(T(e.custinfoenc,"numeric")){for(var a=0,l=e.barlen-11;a<=l;a+=1)e.i=a,y(e.encstr,2*e.i+22,A(e.encs,p(b(e.barcode,e.i+10,1))+64)),v(e.txt,e.i+8,s([b(e.barcode,e.i+10,1),3.312*(2*e.i+22),e.textyoffset,e.textfont,e.textsize]));e.ciflen=2*(e.barlen-10)}else{for(var h=0,d=e.barlen-11;h<=d;h+=1)e.i=h,C(e.barchars,b(e.barcode,e.i+10,1)),i--,e.indx=o[--i].length,i-=2,e.enc=A(e.encs,e.indx),y(e.encstr,3*e.i+22,e.enc),v(e.txt,e.i+8,s([b(e.barcode,e.i+10,1),3.312*(3*e.i+22),e.textyoffset,e.textfont,e.textsize]));e.ciflen=3*(e.barlen-10)}for(var g=22+e.ciflen,w=e.encstr.length-14;g<=w;g+=1)y(e.encstr,g,A(e.encs,75));Pe.$ctx._11821||function(){var t=Object.create(e);t.rstable=s(4096),o[i++]=t.rstable,o[i++]=0,o[i++]=1/0;for(var n=0;n<64;n++)o[i++]=0;var r=s(),a=o[--i];y(o[--i],a,r),o[i++]=t.rstable,o[i++]=64,o[i++]=1/0;for(var u=0;u<=63;u+=1)o[i++]=u;var c=s(),l=o[--i];y(o[--i],l,c),t.prev=1;for(var h=0;h<64;h++){t.next=t.prev<<1,0!=(64&t.next)&&(t.next=67^t.next);for(var f=0;f<=63;f+=1){t.j=f,t.nextcell=function(){o[i++]=t.rstable,o[i++]=64*t.next+t.j},t.nextcell();var d=o[--i];v(o[--i],d,A(t.rstable,64*t.prev+t.j)<<1),t.nextcell();var p=o[--i];if(0!=(64&A(o[--i],p))){t.nextcell(),t.nextcell();var m=o[--i],g=A(o[--i],m),b=o[--i];v(o[--i],b,67^g)}}t.prev=t.next}for(var w in t)t.hasOwnProperty(w)&&(Pe.$ctx[w]=t[w]);Pe.$ctx._11821=1}(),e.rscodes=s(4+~~((e.encstr.length-16)/3)),o[i++]=e.rscodes,o[i++]=0,o[i++]=1/0;for(var x=0;x<4;x++)o[i++]=0;var k=s(),E=o[--i];y(o[--i],E,k);for(var S=2,_=e.encstr.length-16;S<=_;S+=3)e.i=S,v(e.rscodes,e.rscodes.length-~~((e.i-2)/3)-1,16*p(b(e.encstr,e.i,1))+4*p(b(e.encstr,e.i+1,1))+p(b(e.encstr,e.i+2,1)));for(var O=e.rscodes.length-5;O>=0;O-=1){e.i=O;for(var D=0;D<=4;D+=1)e.j=D,v(e.rscodes,e.i+e.j,R(A(e.rscodes,e.i+e.j),A(e.rstable,L(64*A(s([48,17,29,30,1]),e.j)+A(e.rscodes,e.i+4)))))}e.checkcode=f(c(12),"000000000000");for(var B=0;B<=3;B+=1)e.i=B,e.enc=m(c(3),A(e.rscodes,3-e.i),4),y(e.checkcode,3*e.i+(3-e.enc.length),e.enc);y(e.encstr,e.encstr.length-14,e.checkcode),y(e.encstr,e.encstr.length-2,A(e.encs,74)),e.bbs=s(e.encstr.length),e.bhs=s(e.encstr.length);for(var I=0,M=e.encstr.length-1;I<=M;I+=1)e.i=I,e.enc=b(e.encstr,e.i,1),T(e.enc,"0")&&(v(e.bbs,e.i,0*e.height/8),v(e.bhs,e.i,8*e.height/8)),T(e.enc,"1")&&(v(e.bbs,e.i,3*e.height/8),v(e.bhs,e.i,5*e.height/8)),T(e.enc,"2")&&(v(e.bbs,e.i,0*e.height/8),v(e.bhs,e.i,5*e.height/8)),T(e.enc,"3")&&(v(e.bbs,e.i,3*e.height/8),v(e.bhs,e.i,2*e.height/8));o[i++]=1/0;var j=e.bbs,N=e.bhs;o[i++]=1/0;for(var F=0,P=e.bhs.length-1;F<P;F++)o[i++]=1.44,o[i++]=1.872;o[i++]=1.44;var z=s();o[i++]="ren",o[i++]=Wt,o[i++]="bbs",o[i++]=j,o[i++]="bhs",o[i++]=N,o[i++]="sbs",o[i++]=z,e.includetext&&(o[i++]="txt",o[i++]=e.txt),o[i++]="opt",o[i++]=e.options;var H=u();o[i++]=H,e.dontdraw||Wt()}function Le(){var e=Object.create(Le.$ctx||(Le.$ctx={}));e.dontdraw=!1,e.includetext=!1,e.textfont="OCR-B",e.textsize=10,e.textyoffset=-8,e.height=.175,o[i++]=e,U(),e.options=o[--i];var t=o[--i];e.barcode=t,Le.$ctx._11953||function(){var t=Object.create(e);t.encs=s(["0033","0123","0132","1023","1032","1122","0213","0303","0312","1203","1212","1302","0231","0321","0330","1221","1230","1320","2013","2103","2112","3003","3012","3102","2031","2121","2130","3021","3030","3120","2211","2301","2310","3201","3210","3300"]),t.barchars="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",t.charvals=new Map;for(var n=0;n<=35;n+=1)v(t.charvals,b(t.barchars,n,1),n);for(var r in t)t.hasOwnProperty(r)&&(Le.$ctx[r]=t[r]);Le.$ctx._11953=1}();for(var n=0,r=e.barcode.length-1;n<=r;n+=1){void 0!==A(e.charvals,b(e.barcode,n,1))||(o[i++]="bwipp.kixBadCharacter#11958",o[i++]="KIX must contain only capital letters and digits",z())}e.barlen=e.barcode.length,e.encstr=c(4*e.barlen),e.txt=s(e.barlen);for(var a=0,l=e.barlen-1;a<=l;a+=1)e.i=a,e.indx=A(e.charvals,b(e.barcode,e.i,1)),y(e.encstr,4*e.i,A(e.encs,e.indx)),v(e.txt,e.i,s([b(e.barcode,e.i,1),4*e.i*3.312,e.textyoffset,e.textfont,e.textsize]));e.bbs=s(e.encstr.length),e.bhs=s(e.encstr.length);for(var h=0,f=e.encstr.length-1;h<=f;h+=1)e.i=h,e.enc=b(e.encstr,e.i,1),T(e.enc,"0")&&(v(e.bbs,e.i,3*e.height/8),v(e.bhs,e.i,2*e.height/8)),T(e.enc,"1")&&(v(e.bbs,e.i,0*e.height/8),v(e.bhs,e.i,5*e.height/8)),T(e.enc,"2")&&(v(e.bbs,e.i,3*e.height/8),v(e.bhs,e.i,5*e.height/8)),T(e.enc,"3")&&(v(e.bbs,e.i,0*e.height/8),v(e.bhs,e.i,8*e.height/8));o[i++]=1/0;var d=e.bbs,p=e.bhs;o[i++]=1/0;for(var m=0,g=e.bhs.length-1;m<g;m++)o[i++]=1.44,o[i++]=1.872;o[i++]=1.44;var w=s();o[i++]="ren",o[i++]=Wt,o[i++]="bbs",o[i++]=d,o[i++]="bhs",o[i++]=p,o[i++]="sbs",o[i++]=w,e.includetext&&(o[i++]="txt",o[i++]=e.txt),o[i++]="opt",o[i++]=e.options;var x=u();o[i++]=x,e.dontdraw||Wt()}function Ue(){var e=Object.create(Ue.$ctx||(Ue.$ctx={}));e.dontdraw=!1,e.includetext=!1,e.includecheckintext=!1,e.textfont="OCR-B",e.textsize=10,e.textyoffset=-8,e.height=.175,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],k(e.barcode,(function(){var e=o[--i];if(!(e>=48&&e<=57||e>=65&&e<=90||45==e)&&(o[i++]="bwipp.japanPostBadCharacter#12063",o[i++]="Japan Post must contain only digits, capital letters and the dash symbol",!0==="raiseerror"()))return!0})),Ue.$ctx._12077||function(){var t=Object.create(e);for(var n in t.encs=s(["300","330","312","132","321","303","123","231","213","033","030","120","102","210","012","201","021","003","333","31","13"]),t.barchars="0123456789-ABCDEFGHIJKLMNOPQRSTUVWXYZ",t)t.hasOwnProperty(n)&&(Ue.$ctx[n]=t[n]);Ue.$ctx._12077=1}(),e.barlen=e.barcode.length,e.encstr=c(67),e.digits=s(20),e.txt=s(e.barlen+1),y(e.encstr,0,A(e.encs,19)),e.checksum=0,e.j=0,e.i=0;for(var t=0,n=e.barlen-1;t<=n;t+=1){if(e.i=t,C(e.barchars,b(e.barcode,e.i,1)),i--,e.indx=o[--i].length,i-=2,e.indx>=11&&e.indx<37){if(e.j>18)break;e.digit=10+~~((e.indx-1)/10),y(e.encstr,3*e.j+2,A(e.encs,e.digit)),e.checksum=e.checksum+e.digit,v(e.digits,e.j,e.digit),e.j=e.j+1}if(e.j>19)break;e.digit=0,37==e.indx&&(e.digit=14),e.indx>=11&&e.indx<37&&(e.digit=(e.indx-1)%10),e.indx<11&&(e.digit=e.indx),y(e.encstr,3*e.j+2,A(e.encs,e.digit)),e.checksum=e.checksum+e.digit,v(e.digits,e.j,e.digit),v(e.txt,e.i,s([b(e.barcode,e.i,1),3.312*(3*e.j+2),e.textyoffset,e.textfont,e.textsize])),e.j=e.j+1}for(var r=e.j;r<=19;r+=1)e.k=r,y(e.encstr,3*e.k+2,A(e.encs,14)),e.checksum=e.checksum+14,v(e.digits,e.k,14);e.checksum=19-e.checksum%19,y(e.encstr,62,A(e.encs,e.checksum)),y(e.encstr,65,A(e.encs,20)),e.checkdigit=" ",e.includecheckintext&&(e.checkdigit=b(e.barchars,e.checksum,1)),v(e.txt,e.i+1,s([e.checkdigit,205.344,e.textyoffset,e.textfont,e.textsize])),y(e.encstr,65,A(e.encs,20)),e.bbs=s(67),e.bhs=s(e.bbs.length);for(var a=0,l=e.bbs.length-1;a<=l;a+=1)e.i=a,e.enc=b(e.encstr,e.i,1),e.bunit=0,e.hunit=0,T(e.enc,"0")&&(e.bunit=3,e.hunit=2),T(e.enc,"1")&&(e.bunit=0,e.hunit=5),T(e.enc,"2")&&(e.bunit=3,e.hunit=5),T(e.enc,"3")&&(e.bunit=0,e.hunit=8),v(e.bbs,e.i,e.bunit*e.height/8),v(e.bhs,e.i,e.hunit*e.height/8);o[i++]=1/0;var h=e.bbs,f=e.bhs;o[i++]=1/0;for(var d=0,p=e.bhs.length-1;d<p;d++)o[i++]=1.44,o[i++]=1.872;o[i++]=1.44;var m=s();o[i++]="ren",o[i++]=Wt,o[i++]="bbs",o[i++]=h,o[i++]="bhs",o[i++]=f,o[i++]="sbs",o[i++]=m,e.includetext&&(o[i++]="txt",o[i++]=e.txt),o[i++]="opt",o[i++]=e.options;var g=u();o[i++]=g,e.dontdraw||Wt()}function ze(){var e=Object.create(ze.$ctx||(ze.$ctx={}));e.dontdraw=!1,e.includecheck=!1,e.includetext=!1,e.includecheckintext=!1,e.checktype="mod10",e.badmod11=!1,e.textfont="OCR-B",e.textsize=10,e.textyoffset=-8,e.height=1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],k(e.barcode,(function(){var e=o[--i];(e<48||e>57)&&(o[i++]="bwipp.msiBadCharacter#12243",o[i++]="MSI must contain only digits",z())})),ze.$ctx._12257||function(){var t=Object.create(e);for(var n in t.encs=s(["12121212","12121221","12122112","12122121","12211212","12211221","12212112","12212121","21121212","21121221","21","121"]),t.barchars="0123456789",t)t.hasOwnProperty(n)&&(ze.$ctx[n]=t[n]);ze.$ctx._12257=1}(),e.barlen=e.barcode.length,e.txtlen=e.barlen,e.mod10=function(){e.code=o[--i],o[i++]=0,o[i++]=0,k(e.code,(function(){var e=o[--i],t=o[--i],n=o[--i];o[i++]=L(L(e-48)+10*t),o[i++]=n})),i--;var t=o[--i];for(o[i++]=2*t,o[i++]=0;;){var n=o[--i],r=o[--i],a=~~(r/10);if(o[i++]=L(n+r%10),o[i++]=a,0==a){i--;break}var s=o[--i],u=o[--i];o[i++]=s,o[i++]=u}o[i++]=0,o[i++]=0,k(e.code,(function(){var e=o[--i],t=o[--i],n=o[--i];o[i++]=L(t+L(e-48)),o[i++]=n}));var l=o[--i],h=o[--i];o[i++]=l,o[i++]=h,i--;var f=o[--i],d=c(e.code.length+1);y(d,0,e.code),v(d,e.code.length,L(L(10-L(o[--i]+f)%10)%10+48)),o[i++]=d},e.mod11=function(){e.code=o[--i],o[i++]=e.code.length-1,k(e.code,(function(){var e=o[--i],t=o[--i];o[i++]=L(e-48),o[i++]=L(t%6+2),o[i++]=L(t-1)})),i--,o[i++]=0;for(var t=0,n=e.code.length;t<n;t++){var r=o[--i],a=o[--i],s=o[--i];o[i++]=L(r+s*a)}var u=L(11-o[--i]%11)%11;if(o[i++]=u,10==u&&e.badmod11){i--;var l=c(e.code.length+2);y(l,0,e.code),y(l,e.code.length,"10"),o[i++]=l}else{var h=c(e.code.length+1);y(h,0,e.code),v(h,e.code.length,L(o[--i]+48)),o[i++]=h}},e.ncrmod11=function(){e.code=o[--i],o[i++]=e.code.length-1,k(e.code,(function(){var e=o[--i],t=o[--i];o[i++]=L(e-48),o[i++]=L(t%8+2),o[i++]=L(t-1)})),i--,o[i++]=0;for(var t=0,n=e.code.length;t<n;t++){var r=o[--i],a=o[--i],s=o[--i];o[i++]=L(r+s*a)}var u=L(11-o[--i]%11)%11;if(o[i++]=u,10==u&&e.badmod11){i--;var l=c(e.code.length+2);y(l,0,e.code),y(l,e.code.length,"10"),o[i++]=l}else{var h=c(e.code.length+1);y(h,0,e.code),v(h,e.code.length,L(o[--i]+48)),o[i++]=h}},e.includecheck&&(T(e.checktype,"mod10")&&(o[i++]=e.barcode,e.mod10()),T(e.checktype,"mod1010")&&(o[i++]=e.barcode,e.mod10(),e.mod10()),T(e.checktype,"mod11")&&(o[i++]=e.barcode,e.mod11()),T(e.checktype,"ncrmod11")&&(o[i++]=e.barcode,e.ncrmod11()),T(e.checktype,"mod1110")&&(o[i++]=e.barcode,e.mod11(),e.mod10()),T(e.checktype,"ncrmod1110")&&(o[i++]=e.barcode,e.ncrmod11(),e.mod10()),e.barcode=o[--i],e.barlen=e.barcode.length,e.includecheckintext&&(e.txtlen=e.barlen)),e.sbs=c(8*e.barlen+5),e.txt=s(e.barlen),y(e.sbs,0,A(e.encs,10));for(var t=0,n=e.barlen-1;t<=n;t+=1)e.i=t,C(e.barchars,b(e.barcode,e.i,1)),i--,e.indx=o[--i].length,i-=2,e.enc=A(e.encs,e.indx),y(e.sbs,8*e.i+2,e.enc),v(e.txt,e.i,s([b(e.barcode,e.i,1),12*e.i+3,e.textyoffset,e.textfont,e.textsize]));y(e.sbs,8*e.barlen+2,A(e.encs,11)),o[i++]=1/0,o[i++]=1/0;for(var r=e.sbs,a=0,l=r.length;a<l;a++)o[i++]=A(r,a)-48;var h=s();o[i++]=1/0;for(var f=0,d=~~((e.sbs.length+1)/2);f<d;f++)o[i++]=e.height;var p=s();o[i++]=1/0;for(var m=0,g=~~((e.sbs.length+1)/2);m<g;m++)o[i++]=0;var w=s();o[i++]="ren",o[i++]=Wt,o[i++]="sbs",o[i++]=h,o[i++]="bhs",o[i++]=p,o[i++]="bbs",o[i++]=w,e.includetext&&(o[i++]="txt",o[i++]=b(e.txt,0,e.txtlen)),o[i++]="opt",o[i++]=e.options;var x=u();o[i++]=x,e.dontdraw||Wt()}function He(){var e=Object.create(He.$ctx||(He.$ctx={}));e.dontdraw=!1,e.includetext=!1,e.validatecheck=!1,e.includecheckintext=!1,e.unidirectional=!1,e.textfont="OCR-B",e.textsize=10,e.textyoffset=-8,e.height=1,o[i++]=e,U(),e.options=o[--i];var t=o[--i];e.barcode=t,He.$ctx._12407||function(){var t=Object.create(e);t.barchars="0123456789ABCDEF",t.charvals=new Map;for(var n=0;n<=15;n+=1)v(t.charvals,b(t.barchars,n,1),n);for(var r in t.encs=s(["14141414","32141414","14321414","32321414","14143214","32143214","14323214","32323214","14141432","32141432","14321432","32321432","14143232","32143232","14323232","32323232","32321432","541412323","323"]),t)t.hasOwnProperty(r)&&(He.$ctx[r]=t[r]);He.$ctx._12407=1}();for(var n=0,r=e.barcode.length-1;n<=r;n+=1){void 0!==A(e.charvals,b(e.barcode,n,1))||(o[i++]="bwipp.plesseyBadCharacter#12412",o[i++]="Plessey must contain only digits and letters A B C D E F",z())}if(o[i++]="barlen",o[i++]=e.barcode.length,e.validatecheck){var a=o[--i];o[i++]=L(a-2)}var l=o[--i];e[o[--i]]=l,e.checkbits=s(L(4*e.barlen+8)),y(e.checkbits,4*e.barlen,s([0,0,0,0,0,0,0,0]));for(var h=0,f=L(e.barlen-1);h<=f;h+=1)e.i=h,e.indx=A(e.charvals,b(e.barcode,e.i,1)),y(e.checkbits,4*e.i,s([1&e.indx,e.indx>>>1&1,e.indx>>>2&1,e.indx>>>3]));e.checksalt=s([1,1,1,1,0,1,0,0,1]);for(var d=0,p=L(4*e.barlen-1);d<=p;d+=1)if(e.i=d,1==A(e.checkbits,e.i))for(var m=0;m<=8;m+=1)e.j=m,v(e.checkbits,e.i+e.j,R(A(e.checkbits,e.i+e.j),A(e.checksalt,e.j)));e.checkval=0;for(var g=0;g<=7;g+=1)e.i=g,e.checkval=L(e.checkval+~~Math.pow(2,e.i)*A(e.checkbits,L(4*e.barlen+e.i)));e.checksum1=15&e.checkval,e.checksum2=e.checkval>>>4,e.validatecheck&&(A(e.barcode,e.barlen)==A(e.barchars,e.checksum1)&&A(e.barcode,L(e.barlen+1))==A(e.barchars,e.checksum2)||(o[i++]="bwipp.plesseyBadCheckDigits#12451",o[i++]="Incorrect Plessey check digits provided",z()),e.barcode=b(e.barcode,0,e.barlen));var w=e.unidirectional?27:33;e.sbs=c(L(8*e.barlen+w)),e.txt=s(L(e.barlen+2)),y(e.sbs,0,A(e.encs,16));for(var x=0,C=L(e.barlen-1);x<=C;x+=1)e.i=x,e.indx=A(e.charvals,b(e.barcode,e.i,1)),y(e.sbs,8*e.i+8,A(e.encs,e.indx)),v(e.txt,e.i,s([b(e.barcode,e.i,1),20*e.i+20,e.textyoffset,e.textfont,e.textsize]));y(e.sbs,L(8*e.barlen+8),A(e.encs,e.checksum1)),y(e.sbs,L(8*e.barlen+16),A(e.encs,e.checksum2)),e.includecheckintext?(v(e.txt,e.barlen,s([b(e.barchars,e.checksum1,1),L(20*e.barlen+20),e.textyoffset,e.textfont,e.textsize])),v(e.txt,L(e.barlen+1),s([b(e.barchars,e.checksum2,1),L(20*L(e.barlen+1)+20),e.textyoffset,e.textfont,e.textsize]))):(v(e.txt,e.barlen,s([" ",L(20*e.barlen+20),e.textyoffset,e.textfont,e.textsize])),v(e.txt,L(e.barlen+1),s([" ",L(20*L(e.barlen+1)+20),e.textyoffset,e.textfont,e.textsize])));var k=e.unidirectional?18:17;y(e.sbs,L(8*e.barlen+24),A(e.encs,k)),o[i++]=1/0,o[i++]=1/0;for(var E=e.sbs,S=0,_=E.length;S<_;S++)o[i++]=A(E,S)-48;var O=s();o[i++]=1/0;for(var T=0,D=~~((e.sbs.length+1)/2);T<D;T++)o[i++]=e.height;var B=s();o[i++]=1/0;for(var I=0,M=~~((e.sbs.length+1)/2);I<M;I++)o[i++]=0;var j=s();o[i++]="ren",o[i++]=Wt,o[i++]="sbs",o[i++]=O,o[i++]="bhs",o[i++]=B,o[i++]="bbs",o[i++]=j,e.includetext&&(o[i++]="txt",o[i++]=e.txt),o[i++]="opt",o[i++]=e.options;var N=u();o[i++]=N,e.dontdraw||Wt()}function $e(){var e=Object.create($e.$ctx||($e.$ctx={}));e.numeric=!1,e.dontdraw=!1,e.includetext=!1,e.textfont="OCR-B",e.textsize=10,e.textyoffset=-8,e.height=1,e.parse=!1,o[i++]=e,U(),e.options=o[--i];var t=o[--i];e.barcode=t;var n=new Map([["parse",e.parse],["parseonly",!0],["parsefnc",!1]]);e.fncvals=n,o[i++]="barcode",o[i++]=e.barcode,o[i++]=e.fncvals,H();var r=o[--i];for(e[o[--i]]=r,e.barlen=e.barcode.length,delete e.options.parse,$e.$ctx._12593||function(){var t=Object.create(e);for(var n in t.encs=s(["31313131","1131313111","33313111","1111313131","3111313111","11333131","13133131","111111313111","31333111","1131113131","33113131","1111333111","3111113131","1113133111","1311133111","111111113131","3131113111","11313331","333331","111131113111","31113331","1133113111","1313113111","1111113331","31131331","113111113111","3311113111","1111131331","311111113111","1113111331","1311111331","11111111113111","31313311","1131311131","33311131","1111313311","3111311131","11333311","13133311","111111311131","31331131","1131113311","33113311","1111331131","3111113311","1113131131","1311131131","111111113311","3131111131","1131131311","33131311","111131111131","3111131311","1133111131","1313111131","111111131311","3113111311","113111111131","3311111131","111113111311","311111111131","111311111311","131111111311","11111111111131","3131311111","11313133","333133","111131311111","31113133","1133311111","1313311111","1111113133","313333","113111311111","3311311111","11113333","311111311111","11131333","13111333","11111111311111","31311133","1131331111","33331111","1111311133","3111331111","11331133","13131133","111111331111","3113131111","1131111133","33111133","111113131111","3111111133","111311131111","131111131111","111111111133","31311313","113131111111","3331111111","1111311313","311131111111","11331313","13131313","11111131111111","3133111111","1131111313","33111313","111133111111","3111111313","111313111111","131113111111","111111111313","313111111111","1131131113","33131113","11113111111111","3111131113","113311111111","131311111111","111111131113","3113111113","11311111111111","331111111111","111113111113","31111111111111","111311111113","131111111113","1111111111111111"]),t)t.hasOwnProperty(n)&&($e.$ctx[n]=t[n]);$e.$ctx._12593=1}(),e.barlen=e.barcode.length,e.sbs=c(16*e.barlen+48),e.txt=s(e.barlen),e.enc=A(e.encs,95),y(e.sbs,0,e.enc),e.l=e.enc.length,e.checksum=0,e.i=0,e.j=0;e.i!=e.barlen;)e.numeric?A(e.barcode,e.i)>16?(e.np=b(e.barcode,e.i,2),T(b(e.np,1,1),"X")?e.indx=p(b(e.np,0,1))+17:e.indx=p(e.np)+27,v(e.txt,e.j,s([e.np,16*e.j+16,e.textyoffset,e.textfont,e.textsize])),e.i=e.i+2):(e.indx=A(e.barcode,e.i),v(e.txt,e.j,s([" ",16*e.j+16,e.textyoffset,e.textfont,e.textsize])),e.i=e.i+1):(e.indx=A(e.barcode,e.i),e.indx>=32&&e.indx<=126?v(e.txt,e.j,s([b(e.barcode,e.i,1),16*e.j+16,e.textyoffset,e.textfont,e.textsize])):v(e.txt,e.j,s([" ",16*e.j+16,e.textyoffset,e.textfont,e.textsize])),e.i=e.i+1),e.checksum=L(e.checksum+e.indx),e.enc=A(e.encs,e.indx),y(e.sbs,e.l,e.enc),e.l=e.l+e.enc.length,e.j=e.j+1;e.checksum=L(127-e.checksum%127)%127,e.enc=A(e.encs,e.checksum),y(e.sbs,e.l,e.enc),e.l=e.l+e.enc.length,e.enc=A(e.encs,122),y(e.sbs,e.l,e.enc),e.l=e.l+e.enc.length,e.sbs=b(e.sbs,0,e.l),e.txt=b(e.txt,0,e.j),o[i++]=1/0,o[i++]=1/0;for(var a=e.sbs,l=0,h=a.length;l<h;l++)o[i++]=L(A(a,l)-48);var f=s();o[i++]=1/0;for(var d=0,m=~~((e.sbs.length+1)/2);d<m;d++)o[i++]=e.height;var g=s();o[i++]=1/0;for(var w=0,x=~~((e.sbs.length+1)/2);w<x;w++)o[i++]=0;var C=s();o[i++]="ren",o[i++]=Wt,o[i++]="sbs",o[i++]=f,o[i++]="bhs",o[i++]=g,o[i++]="bbs",o[i++]=C,e.includetext&&(o[i++]="txt",o[i++]=e.txt),o[i++]="opt",o[i++]=e.options;var k=u();o[i++]=k,e.dontdraw||Wt()}function Qe(){var e=Object.create(Qe.$ctx||(Qe.$ctx={}));e.dontdraw=!1,e.includetext=!1,e.textfont="OCR-B",e.textsize=10,e.textxoffset=0,e.textyoffset=-8,e.height=1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],v(e.options,"dontdraw",!0),v(e.options,"numeric",!0),o[i++]="args",o[i++]=e.barcode,o[i++]=e.options,$e();var t=o[--i];e[o[--i]]=t,v(e.args,"opt",e.options),o[i++]=e.args,e.dontdraw||Wt()}function Ve(){var e=Object.create(Ve.$ctx||(Ve.$ctx={}));e.dontdraw=!1,e.includetext=!1,e.textfont="OCR-B",e.textsize=10,e.textxoffset=0,e.textyoffset=-8,e.height=1,e.encoding="auto",e.version="a",e.checkoffset=0,e.raw=!1,e.parse=!1,e.parsefnc=!1,o[i++]=e,U(),e.options=o[--i];var t=o[--i];e.barcode=t,Ve.$ctx._12818||function(){var t=Object.create(e);t.la0=-1,t.la1=-2,t.la2=-3,t.sf0=-4,t.sf1=-5,t.sf2=-6,t.fn1=-7,t.fn2=-8,t.fn3=-9,t.fn4=-10,t.charmapsnormal=s([s(["0","^","'"]),s(["1",";",27]),s(["2","<",28]),s(["3","=",29]),s(["4",">",30]),s(["5","?",31]),s(["6","@","!"]),s(["7","[",'"']),s(["8",92,"#"]),s(["9","]","&"]),s(["A","a",1]),s(["B","b",2]),s(["C","c",3]),s(["D","d",4]),s(["E","e",5]),s(["F","f",6]),s(["G","g",7]),s(["H","h",8]),s(["I","i",9]),s(["J","j",10]),s(["K","k",11]),s(["L","l",12]),s(["M","m",13]),s(["N","n",14]),s(["O","o",15]),s(["P","p",16]),s(["Q","q",17]),s(["R","r",18]),s(["S","s",19]),s(["T","t",20]),s(["U","u",21]),s(["V","v",22]),s(["W","w",23]),s(["X","x",24]),s(["Y","y",25]),s(["Z","z",26]),s(["-","_",40]),s([".","`",41]),s([" ",127,0]),s(["$","{","*"]),s(["/","|",","]),s(["+","}",":"]),s(["%","~",t.fn1]),s([t.la1,t.la0,t.fn2]),s([t.sf1,t.sf0,t.fn3]),s([t.sf2,t.sf2,t.fn4])]);var n=s(["5",-98,-98]);for(var r in t.chapmapslimited=s([s(["0",-98,-98]),s(["1",-98,-98]),s(["2",-98,-98]),s(["3",-98,-98]),s(["4",-98,-98]),n,s(["6",-98,-98]),s(["7",-98,-98]),s(["8",-98,-98]),s(["9",-98,-98]),s(["A",-98,-98]),s(["B",-98,-98]),s(["C",-98,-98]),s(["D",-98,-98]),s(["E",-98,-98]),s(["F",-98,-98]),s(["G",-98,-98]),s(["H",-98,-98]),s(["I",-98,-98]),s(["J",-98,-98]),s(["K",-98,-98]),s(["L",-98,-98]),s(["M",-98,-98]),s(["N",-98,-98]),s(["O",-98,-98]),s(["P",-98,-98]),s(["Q",-98,-98]),s(["R",-98,-98]),s(["S",-98,-98]),s(["T",-98,-98]),s(["U",-98,-98]),s(["V",-98,-98]),s(["W",-98,-98]),s(["X",-98,-98]),s(["Y",-98,-98]),s(["Z",-98,-98]),s(["-",-98,-98]),s([".",-98,-98])]),t)t.hasOwnProperty(r)&&(Ve.$ctx[r]=t[r]);Ve.$ctx._12818=1}(),o[i++]="charmaps",T(e.version,"a")||T(e.version,"b")?o[i++]=e.charmapsnormal:o[i++]=e.chapmapslimited;var n=o[--i];e[o[--i]]=n;e.charmaps,e.charmaps,e.charmaps;e.charvals=s([new Map,new Map,new Map]);for(var r=0,a=e.charmaps.length-1;r<=a;r+=1){e.i=r,e.encs=A(e.charmaps,e.i);for(var l=0;l<=2;l+=1){e.j=l;var h=A(e.encs,e.j);if(o[i++]=h,T(w(h),"stringtype")){var d=A(o[--i],0);o[i++]=d}v(A(e.charvals,e.j),o[--i],e.i)}}if(e.set0=A(e.charvals,0),e.set1=A(e.charvals,1),e.set2=A(e.charvals,2),e.raw&&(e.encoding="raw"),T(e.encoding,"raw")){for(e.cws=s(e.barcode.length),e.i=0,e.j=0;e.i!=e.barcode.length;)e.cw=p(b(e.barcode,e.i+1,3)),v(e.cws,e.j,e.cw),e.i=e.i+4,e.j=e.j+1;e.cws=b(e.cws,0,e.j),e.text=""}if(T(e.encoding,"auto")){var m=new Map([["parse",e.parse],["parsefnc",e.parsefnc],["FNC1",e.fn1],["FNC2",e.fn2],["FNC3",e.fn3]]);e.fncvals=m,o[i++]="msg",o[i++]=e.barcode,o[i++]=e.fncvals,H();var g=o[--i];e[o[--i]]=g,e.msglen=e.msg.length,e.text=c(e.msglen);for(var x=0,C=e.msglen-1;x<=C;x+=1){e.i=x;var k=A(e.msg,e.i);o[i++]=e.text,o[i++]=e.i,o[i++]=k,k<0&&(i--,o[i++]=32);var E=o[--i],S=o[--i];v(o[--i],S,E)}o[i++]=1/0;for(var O=0,D=e.msglen;O<D;O++)o[i++]=0;o[i++]=0,e.numSA=s(),o[i++]=1/0;for(var B=0,I=e.msglen;B<I;B++)o[i++]=0;o[i++]=0,e.numEA=s();for(var M=e.msglen-1;M>=0;M-=1)e.i=M,A(e.msg,e.i)>=0&&(A(e.msg,e.i)>=128?v(e.numEA,e.i,L(A(e.numEA,e.i+1)+1)):v(e.numSA,e.i,L(A(e.numSA,e.i+1)+1)));e.ea=!1,e.msgtmp=s([]);for(var j=0,N=e.msglen-1;j<=N;j+=1){if(e.i=j,e.c=A(e.msg,e.i),!R(e.ea,e.c<128)&&e.c>=0){e.ea?o[i++]=e.numSA:o[i++]=e.numEA;var F=A(o[--i],e.i);F<(L(F+e.i)==e.msglen?3:5)?(o[i++]=1/0,_(e.msgtmp),o[i++]=e.fn4,e.msgtmp=s()):(o[i++]=1/0,_(e.msgtmp),o[i++]=e.fn4,o[i++]=e.fn4,e.msgtmp=s(),e.ea=!e.ea)}o[i++]=1/0,_(e.msgtmp),e.c>=0?o[i++]=127&e.c:o[i++]=e.c,e.msgtmp=s()}for(e.msg=e.msgtmp,e.msglen=e.msg.length,e.enc=function(){var t=o[--i];v(e.cws,e.j,A(t,o[--i])),e.j=e.j+1},e.cws=s(2*e.msglen),e.i=0,e.j=0,e.cset="set0";e.i!=e.msglen;)for(;;){e.char1=A(e.msg,e.i),o[i++]="char2",e.i+1<e.msglen?o[i++]=A(e.msg,e.i+1):o[i++]=-99;var P=o[--i];if(e[o[--i]]=P,void 0!==A(e[e.cset],e.char1)){o[i++]=e.char1,o[i++]=e[e.cset],e.enc(),e.i=e.i+1;break}if(void 0!==A(e.set2,e.char1)){o[i++]=e.sf2,o[i++]=e[e.cset],e.enc(),o[i++]=e.char1,o[i++]=e.set2,e.enc(),e.i=e.i+1;break}if(void 0!==A(e[e.cset],e.char2)){T(e.cset,"set0")?(o[i++]=e.sf1,o[i++]=e[e.cset],e.enc(),o[i++]=e.char1,o[i++]=e.set1,e.enc()):(o[i++]=e.sf0,o[i++]=e[e.cset],e.enc(),o[i++]=e.char1,o[i++]=e.set0,e.enc()),e.i=e.i+1;break}T(e.cset,"set0")?(o[i++]=e.la1,o[i++]=e[e.cset],e.enc(),e.cset="set1"):(o[i++]=e.la0,o[i++]=e[e.cset],e.enc(),e.cset="set0");break}e.cws=b(e.cws,0,e.j)}Ve.$ctx._13018||function(){var t=Object.create(e),n=new Map([["a",s(["141112","131212","121312","111412","131113","121213","111313","121114","111214","111115","181111","171211","161311","151411","141511","131611","121711","111811","171112","161212","151312","141412","131512","121612","111712","161113","151213","141313","131413","121513","111613","151114","141214","131314","121414","111514","141115","131215","121315","111415","131116","121216","111316","121117","111217","111118","1<111112","111111111;1"])],["b",s(["151213","141313","131413","121513","141214","131314","121414","131215","121315","121216","191212","181312","171412","161512","151612","141712","131812","121912","181213","171313","161413","151513","141613","131713","121813","171214","161314","151414","141514","131614","121714","161215","151315","141415","131515","121615","151216","141316","131416","121516","141217","131317","121417","131218","121318","121219","1<121312","121212121<1"])],["limiteda",s(["111411","111312","111213","111114","121311","121212","121113","141111","131211","131112","171111","161211","151311","141411","131511","121611","111711","161112","151212","141312","131412","121512","111612","151113","141213","131313","121413","111513","141114","131214","121314","111414","131115","121215","111315","121116","111216","111117","151111","1"])],["limitedb",s(["121512","121413","121314","121215","131412","131313","131214","151212","141312","141213","181212","171312","161412","151512","141612","131712","121812","171213","161313","151413","141513","131613","121713","161214","151314","141414","131514","121614","151215","141315","131415","121515","141216","131316","121416","131217","121317","121218","141212","1"])]]);for(var r in t.encmaps=n,t)t.hasOwnProperty(r)&&(Ve.$ctx[r]=t[r]);Ve.$ctx._13018=1}(),e.encs=A(e.encmaps,e.version),Ve.$ctx._13029||function(){var t=Object.create(e);for(var n in t.c2w=s([s([495,330,210,126,70,35,15,5]),s([165,120,84,56,35,20,10,4]),s([45,36,28,21,15,10,6,3]),s([9,8,7,6,5,4,3,2]),s([1,1,1,1,1,1,1,1])]),t)t.hasOwnProperty(n)&&(Ve.$ctx[n]=t[n]);Ve.$ctx._13029=1}(),e.v=0;for(var z=e.cws,$=0,Q=z.length;$<Q;$++){e.cw=A(z,$);for(var V=0;V<6;V++)0!=(1&(e.cw^e.v))&&(e.v=7682^e.v),e.v=e.v>>>1,e.cw=e.cw>>>1}for(e.v=e.v+e.checkoffset,T(e.version,"limiteda")||T(e.version,"limitedb")?(e.v=1023&e.v,e.v>824&&e.v<853&&(e.v=e.v+292)):e.v=45+(1023&e.v),e.d=s([2,2,2,2,2,2]),e.r=0,e.c=0,e.w=0,e.sum=0;e.sum!=e.v;)e.t=L(e.sum+A(A(e.c2w,e.r),e.c)),e.t==e.v&&(e.w=e.w+1,v(e.d,e.r,e.w+2),e.sum=e.t),e.t>e.v&&(v(e.d,e.r,e.w+2),e.r=e.r+1,e.w=0),e.t<e.v&&(e.c=e.c+1,e.w=e.w+1,e.sum=e.t);o[i++]=20;for(var q=0;q<=4;q+=1){var G=o[--i];o[i++]=L(G-A(e.d,q))}if(v(e.d,5,o[--i]),T(e.version,"b")||T(e.version,"limitedb")){o[i++]=1/0;for(var W=e.d,K=0,Y=W.length;K<Y;K++)o[i++]=L(A(W,K)+1);e.d=s()}e.cbs=f(c(12),"111111111111");for(var X=5;X>=0;X-=1)e.i=X,v(e.cbs,2*(5-e.i)+1,L(A(e.d,e.i)+47));e.sbs=c(6*e.cws.length+31);var J=A(e.encs,e.encs.length-2);y(e.sbs,0,J),e.j=J.length;for(var Z=0,ee=e.cws.length-1;Z<=ee;Z+=1)e.i=Z,y(e.sbs,e.j,A(e.encs,A(e.cws,e.i))),e.j=e.j+6;y(e.sbs,e.j,e.cbs),e.j=e.j+12;var te=A(e.encs,e.encs.length-1);y(e.sbs,e.j,te),e.j=te.length+e.j,e.sbs=b(e.sbs,0,e.j),o[i++]=1/0,o[i++]=1/0;for(var ne=e.sbs,re=0,ie=ne.length;re<ie;re++)o[i++]=L(A(ne,re)-48);var oe=s();o[i++]=1/0;for(var ae=0,se=~~((e.sbs.length+1)/2);ae<se;ae++)o[i++]=e.height;var ue=s();o[i++]=1/0;for(var ce=0,le=~~((e.sbs.length+1)/2);ce<le;ce++)o[i++]=0;var he=s();o[i++]="ren",o[i++]=Wt,o[i++]="sbs",o[i++]=oe,o[i++]="bhs",o[i++]=ue,o[i++]="bbs",o[i++]=he,o[i++]="txt",o[i++]=s([s([e.text,e.textxoffset,e.textyoffset,e.textfont,e.textsize])]),o[i++]="textxalign",o[i++]="center",o[i++]="opt",o[i++]=e.options;var fe=u();o[i++]=fe,e.dontdraw||Wt()}function qe(){var e=Object.create(qe.$ctx||(qe.$ctx={}));e.dontdraw=!1,e.rows=-1,e.columns=8,e.rowheight=10,e.sepheight=1,e.parse=!1,e.parsefnc=!1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],o[i++]="c",e.columns>=4&&e.columns<=62?o[i++]=e.columns:o[i++]=8;var t=o[--i];e[o[--i]]=t,o[i++]="rows",e.rows>=2&&e.rows<=44?o[i++]=e.rows:o[i++]=-1;var n=o[--i];e[o[--i]]=n,e.swa=-1,e.swb=-2,e.swc=-3,e.sft=-4,e.fn1=-5,e.fn2=-6,e.fn3=-7,e.fn4=-8,e.sta=-9,e.stp=-10;var r=new Map([["parse",e.parse],["parsefnc",e.parsefnc],["FNC1",e.fn1],["FNC3",e.fn3]]);e.fncvals=r,o[i++]="msg",o[i++]=e.barcode,o[i++]=e.fncvals,H();var a=o[--i];e[o[--i]]=a,e.msglen=e.msg.length,e.msgtmp=s([]);for(var u=e.msg,c=0,l=u.length;c<l;c++)e.char=A(u,c),o[i++]=1/0,_(e.msgtmp),e.char<128?o[i++]=e.char:(o[i++]=e.fn4,o[i++]=127&e.char),e.msgtmp=s();e.kmsg=e.msg,e.msg=e.msgtmp,e.msglen=e.msg.length,qe.$ctx._13248||function(){var t=Object.create(e);t.charmaps=s([s([32,32,"00"]),s(["!","!","01"]),s(['"','"',"02"]),s(["#","#","03"]),s(["$","$","04"]),s(["%","%","05"]),s(["&","&","06"]),s(["'","'","07"]),s([40,40,"08"]),s([41,41,"09"]),s(["*","*","10"]),s(["+","+","11"]),s([",",",","12"]),s(["-","-","13"]),s([".",".","14"]),s(["/","/","15"]),s(["0","0","16"]),s(["1","1","17"]),s(["2","2","18"]),s(["3","3","19"]),s(["4","4","20"]),s(["5","5","21"]),s(["6","6","22"]),s(["7","7","23"]),s(["8","8","24"]),s(["9","9","25"]),s([":",":","26"]),s([";",";","27"]),s(["<","<","28"]),s(["=","=","29"]),s([">",">","30"]),s(["?","?","31"]),s(["@","@","32"]),s(["A","A","33"]),s(["B","B","34"]),s(["C","C","35"]),s(["D","D","36"]),s(["E","E","37"]),s(["F","F","38"]),s(["G","G","39"]),s(["H","H","40"]),s(["I","I","41"]),s(["J","J","42"]),s(["K","K","43"]),s(["L","L","44"]),s(["M","M","45"]),s(["N","N","46"]),s(["O","O","47"]),s(["P","P","48"]),s(["Q","Q","49"]),s(["R","R","50"]),s(["S","S","51"]),s(["T","T","52"]),s(["U","U","53"]),s(["V","V","54"]),s(["W","W","55"]),s(["X","X","56"]),s(["Y","Y","57"]),s(["Z","Z","58"]),s(["[","[","59"]),s([92,92,"60"]),s(["]","]","61"]),s(["^","^","62"]),s(["_","_","63"]),s([0,"`","64"]),s([1,"a","65"]),s([2,"b","66"]),s([3,"c","67"]),s([4,"d","68"]),s([5,"e","69"]),s([6,"f","70"]),s([7,"g","71"]),s([8,"h","72"]),s([9,"i","73"]),s([10,"j","74"]),s([11,"k","75"]),s([12,"l","76"]),s([13,"m","77"]),s([14,"n","78"]),s([15,"o","79"]),s([16,"p","80"]),s([17,"q","81"]),s([18,"r","82"]),s([19,"s","83"]),s([20,"t","84"]),s([21,"u","85"]),s([22,"v","86"]),s([23,"w","87"]),s([24,"x","88"]),s([25,"y","89"]),s([26,"z","90"]),s([27,"{","91"]),s([28,"|","92"]),s([29,"}","93"]),s([30,"~","94"]),s([31,127,"95"]),s([t.fn3,t.fn3,"96"]),s([t.fn2,t.fn2,"97"]),s([t.sft,t.sft,"98"]),s([t.swc,t.swc,"99"]),s([t.swb,t.fn4,t.swb]),s([t.fn4,t.swa,t.swa]),s([t.fn1,t.fn1,t.fn1]),s([t.sta,t.sta,t.sta]),s([t.stp,t.stp,t.stp])]),t.charvals=s([new Map,new Map,new Map]);for(var n=0,r=t.charmaps.length-1;n<=r;n+=1){t.i=n,t.encs=A(t.charmaps,t.i);for(var a=0;a<=2;a+=1){t.j=a;var u=A(t.encs,t.j);if(o[i++]=u,T(w(u),"stringtype")){var c=A(o[--i],0);o[i++]=c}v(A(t.charvals,t.j),o[--i],t.i)}}for(var l in t.seta=A(t.charvals,0),t.setb=A(t.charvals,1),t.setc=A(t.charvals,2),t)t.hasOwnProperty(l)&&(qe.$ctx[l]=t[l]);qe.$ctx._13248=1}(),e.numsscr=function(){for(e.n=0,e.s=0,e.p=o[--i];!(e.p>=e.msglen);){var t=A(e.msg,e.p),n=void 0!==A(e.setc,t);if(o[i++]=t,!n){i--;break}if(o[--i]==e.fn1){if(e.s%2!=0)break;e.s=e.s+1}e.n=e.n+1,e.s=e.s+1,e.p=L(e.p+1)}o[i++]=e.n,o[i++]=e.s},e.enca=function(){v(e.cws,e.j,A(e.seta,o[--i])),e.j=e.j+1},e.encb=function(){v(e.cws,e.j,A(e.setb,o[--i])),e.j=e.j+1},e.encc=function(){var t=o[--i];if(o[i++]=t,D(w(t),"arraytype")){var n=A(e.setc,o[--i]);o[i++]=n}else{_(o[--i]);var r=o[--i],a=o[--i];o[i++]=L(L(r-48)+10*L(a-48))}v(e.cws,e.j,o[--i]),e.j=e.j+1},e.anotb=function(){var t=o[--i],n=void 0!==A(e.seta,t),r=void 0!==A(e.setb,t);o[i++]=n&&!r},e.bnota=function(){var t=o[--i],n=void 0!==A(e.setb,t),r=void 0!==A(e.seta,t);o[i++]=n&&!r},o[i++]=1/0;for(var h=0,f=e.msg.length;h<f;h++)o[i++]=0;o[i++]=9999,e.nextanotb=s(),o[i++]=1/0;for(var d=0,p=e.msg.length;d<p;d++)o[i++]=0;o[i++]=9999,e.nextbnota=s();for(var m=e.msg.length-1;m>=0;m-=1)e.i=m,o[i++]=A(e.msg,e.i),e.anotb(),o[--i]?v(e.nextanotb,e.i,0):v(e.nextanotb,e.i,L(A(e.nextanotb,e.i+1)+1)),o[i++]=A(e.msg,e.i),e.bnota(),o[--i]?v(e.nextbnota,e.i,0):v(e.nextbnota,e.i,L(A(e.nextbnota,e.i+1)+1));for(e.abeforeb=function(){var t=o[--i];o[i++]=B(A(e.nextanotb,t),A(e.nextbnota,t))},e.bbeforea=function(){var t=o[--i];o[i++]=B(A(e.nextbnota,t),A(e.nextanotb,t))},e.padrow=function(){for(var t=0,n=o[--i];t<n;t++)for(;;){if(T(e.cset,"seta")){o[i++]=e.swc,e.enca(),e.cset="setc";break}if(T(e.cset,"setb")){o[i++]=e.swc,e.encb(),e.cset="setc";break}if(T(e.cset,"setc")){o[i++]=e.swb,e.encc(),e.cset="setb";break}}},e.encafitsrow=function(){if(e.rem<=2&&A(e.msg,e.i)==e.fn4){var t=2==e.rem&&A(e.msg,e.i+1)<=95;o[i++]=t,t&&(o[i++]=e.fn4,e.enca(),o[i++]=A(e.msg,e.i+1),e.enca(),e.i=e.i+2)}else o[i++]=A(e.msg,e.i),e.enca(),e.i=e.i+1,o[i++]=!0},e.encbfitsrow=function(){if(e.rem<=2&&A(e.msg,e.i)==e.fn4){var t=2==e.rem&&A(e.msg,e.i+1)>=32;o[i++]=t,t&&(o[i++]=e.fn4,e.encb(),o[i++]=A(e.msg,e.i+1),e.encb(),e.i=e.i+2)}else o[i++]=A(e.msg,e.i),e.encb(),e.i=e.i+1,o[i++]=!0},e.cws=s(44*L(e.c+5)),e.i=0,e.j=0,e.r=1,e.lastrow=!1;!e.lastrow;){for(o[i++]=e.sta,e.enca(),e.i<e.msglen?(o[i++]=e.i,e.numsscr()):(o[i++]=-1,o[i++]=-1),e.nums=o[--i],e.nchars=o[--i];;){if(0==e.msglen){o[i++]=e.swb,e.enca(),e.cset="setb";break}if(e.nums>=2){o[i++]=e.swc,e.enca(),e.cset="setc";break}if(o[i++]=e.i,e.abeforeb(),o[--i]){o[i++]=e.sft,e.enca(),e.cset="seta";break}o[i++]=e.swb,e.enca(),e.cset="setb";break}for(e.j=e.j+1,e.endofrow=!1;e.rem=L(L(e.c+3)-e.j%L(e.c+5)),e.i!=e.msglen&&!e.endofrow;){o[i++]=e.i,e.numsscr(),e.nums=o[--i],e.nchars=o[--i],o[i++]="remnums",e.nums>2*e.rem?o[i++]=2*e.rem:o[i++]=e.nums;var g=o[--i];for(e[o[--i]]=g;;){if((T(e.cset,"seta")||T(e.cset,"setb"))&&e.remnums>=4&&A(e.msg,e.i)!=e.fn1){if(e.remnums%2==0&&e.rem>=3){o[i++]=e.swc,T(e.cset,"seta")?e.enca():e.encb(),e.cset="setc";for(var y=0;y<2;y++)A(e.msg,e.i)==e.fn1?(o[i++]=e.fn1,e.encc(),e.i=e.i+1):(o[i++]=b(e.msg,e.i,2),e.encc(),e.i=e.i+2);break}if(e.remnums%2!=0&&e.rem>=4){o[i++]=A(e.msg,e.i),T(e.cset,"seta")?e.enca():e.encb(),e.i=e.i+1,o[i++]=e.swc,T(e.cset,"seta")?e.enca():e.encb(),e.cset="setc";for(var x=0;x<2;x++)A(e.msg,e.i)==e.fn1?(o[i++]=e.fn1,e.encc(),e.i=e.i+1):(o[i++]=b(e.msg,e.i,2),e.encc(),e.i=e.i+2);break}}o[i++]=T(e.cset,"setb"),o[i++]=A(e.msg,e.i),e.anotb();var C=o[--i];if(o[--i]&&C&&e.rem>=2){if(e.i<e.msglen-1&&(o[i++]=e.i+1,e.bbeforea(),o[--i])){o[i++]=e.sft,e.encb(),o[i++]=A(e.msg,e.i),e.enca(),e.i=e.i+1;break}o[i++]=e.swa,e.encb(),e.cset="seta",o[i++]=A(e.msg,e.i),e.enca(),e.i=e.i+1;break}o[i++]=T(e.cset,"seta"),o[i++]=A(e.msg,e.i),e.bnota();var E=o[--i];if(o[--i]&&E&&e.rem>=2){if(e.i<e.msglen-1&&(o[i++]=e.i+1,e.abeforeb(),o[--i])){o[i++]=e.sft,e.enca(),o[i++]=A(e.msg,e.i),e.encb(),e.i=e.i+1;break}o[i++]=e.swb,e.enca(),e.cset="setb",o[i++]=A(e.msg,e.i),e.encb(),e.i=e.i+1;break}if(T(e.cset,"setc")&&e.remnums<2&&e.rem>=2)if(e.rem=L(e.rem-1),o[i++]=e.i,e.abeforeb(),o[--i]){if(o[i++]=e.swa,e.encc(),e.cset="seta",e.encafitsrow(),o[--i])break}else if(o[i++]=e.swb,e.encc(),e.cset="setb",e.encbfitsrow(),o[--i])break;var I=void 0!==A(e.seta,A(e.msg,e.i));if(T(e.cset,"seta")&&I&&e.rem>=1&&(e.encafitsrow(),o[--i]))break;var M=void 0!==A(e.setb,A(e.msg,e.i));if(T(e.cset,"setb")&&M&&e.rem>=1&&(e.encbfitsrow(),o[--i]))break;if(T(e.cset,"setc")&&e.remnums>=2&&e.rem>=1){A(e.msg,e.i)==e.fn1?(o[i++]=e.fn1,e.encc(),e.i=e.i+1):(o[i++]=b(e.msg,e.i,2),e.encc(),e.i=e.i+2);break}e.endofrow=!0;break}}(e.r>=e.rows||-1==e.rows)&&e.r>1&&e.i==e.msglen&&e.rem>=2?(o[i++]=L(e.rem-2),e.padrow(),e.j=e.j+3,o[i++]=e.stp,e.enca(),e.lastrow=!0):(o[i++]=e.rem,e.padrow(),e.j=e.j+1,o[i++]=e.stp,e.enca(),e.r=e.r+1)}e.cws=b(e.cws,0,e.j),qe.$ctx._13533||function(){var t=Object.create(e);o[i++]=1/0;for(var n=64;n<=95;n+=1)o[i++]=n;for(var r=0;r<=15;r+=1)o[i++]=r;for(var a=26;a<=63;a+=1)o[i++]=a;t.abmap=s(),o[i++]=1/0;for(var u=0;u<=85;u+=1)o[i++]=u;for(var c in t.cmap=s(),t)t.hasOwnProperty(c)&&(qe.$ctx[c]=t[c]);qe.$ctx._13533=1}(),e.chkmsg=s(e.kmsg.length),e.j=0;for(var j=0,N=e.kmsg.length-1;j<=N;j+=1)e.i=j,e.char=A(e.kmsg,e.i),e.char>=0&&(v(e.chkmsg,e.j,e.char),e.j=e.j+1),e.char==e.fn1&&0!=e.i&&(v(e.chkmsg,e.j,29),e.j=e.j+1);e.t1=0,e.t2=0,e.k1=0,e.k2=0;for(var F=0,R=e.j-1;F<=R;F+=1)e.i=F,e.t1=A(e.chkmsg,e.i)*e.i%86,e.t2=L(e.t1+A(e.chkmsg,e.i))%86,e.k1=L(e.k1+e.t2)%86,e.k2=L(e.k2+e.t1)%86;o[i++]=e.cws,o[i++]=e.cws.length-4,D(e.cset,"setc")?o[i++]=e.abmap:o[i++]=e.cmap;var P=A(o[--i],e.k1),$=o[--i];v(o[--i],$,P),o[i++]=e.cws,o[i++]=e.cws.length-3,D(e.cset,"setc")?o[i++]=e.abmap:o[i++]=e.cmap;var V=A(o[--i],e.k2),q=o[--i];v(o[--i],q,V);var G=e.cws;o[i++]=G,o[i++]=2,99!=A(G,1)?o[i++]=e.abmap:o[i++]=e.cmap;var W=A(o[--i],e.r-2),K=o[--i];v(o[--i],K,W);for(var Y=1,X=e.r-1;Y<=X;Y+=1){e.i=Y;var J=e.cws,Z=e.i,ee=e.c;o[i++]=J,o[i++]=L(Z*L(ee+5)+2),99!=A(J,L(L(Z*L(ee+5)+2)-1))?o[i++]=e.abmap:o[i++]=e.cmap;var te=A(o[--i],e.i+42),ne=o[--i];v(o[--i],ne,te)}for(var re=0,ie=e.r-1;re<=ie;re+=1){e.rcws=b(e.cws,re*L(e.c+5),L(e.c+4)),e.csum=A(e.rcws,0);for(var oe=1,ae=e.rcws.length-2;oe<=ae;oe+=1)e.i=oe,e.csum=L(e.csum+A(e.rcws,e.i)*e.i);v(e.rcws,e.rcws.length-1,e.csum%103)}void 0!==A(e.options,"debugcws")&&(o[i++]="bwipp.debugcws#13573",o[i++]=e.cws,z()),qe.$ctx._13594||function(){var t=Object.create(e);for(var n in t.encs=s(["212222","222122","222221","121223","121322","131222","122213","122312","132212","221213","221312","231212","112232","122132","122231","113222","123122","123221","223211","221132","221231","213212","223112","312131","311222","321122","321221","312212","322112","322211","212123","212321","232121","111323","131123","131321","112313","132113","132311","211313","231113","231311","112133","112331","132131","113123","113321","133121","313121","211331","231131","213113","213311","213131","311123","311321","331121","312113","312311","332111","314111","221411","431111","111224","111422","121124","121421","141122","141221","112214","112412","122114","122411","142112","142211","241211","221114","413111","241112","134111","111242","121142","121241","114212","124112","124211","411212","421112","421211","212141","214121","412121","111143","111341","131141","114113","114311","411113","411311","113141","114131","311141","411131","211412","2331112"]),t)t.hasOwnProperty(n)&&(qe.$ctx[n]=t[n]);qe.$ctx._13594=1}(),e.rowbits=s(e.r);for(var se=0,ue=e.r-1;se<=ue;se+=1){e.i=se,o[i++]=1/0;for(var ce=b(e.cws,e.i*L(e.c+5),L(e.c+5)),le=0,he=ce.length;le<he;le++)k(A(e.encs,A(ce,le)),(function(){var e=o[--i];o[i++]=L(e-48)}));e.sbs=s(),o[i++]=1/0;var fe=e.sbs;o[i++]=0;for(var de=0,pe=fe.length;de<pe;de++){var me=o[--i],ge=1==me?0:1;o[i++]=me;for(var Ae=0,ve=A(fe,de);Ae<ve;Ae++)o[i++]=ge}O(s(S()-1));var be=o[--i],ye=o[--i];o[i++]=be,o[i++]=ye,i--;var we=o[--i],xe=o[--i];o[i++]=we,o[i++]=xe,i--,v(e.rowbits,e.i,o[--i])}e.symwid=L(11*e.c+57),o[i++]=1/0;for(var Ce=0,ke=e.symwid*e.sepheight;Ce<ke;Ce++)o[i++]=1;for(var Ee=0,Se=e.r-2;Ee<=Se;Ee+=1){e.i=Ee;for(var _e=0,Oe=e.rowheight;_e<Oe;_e++)_(A(e.rowbits,e.i));for(var Te=0,De=e.sepheight;Te<De;Te++){o[i++]=1,o[i++]=1,o[i++]=0,o[i++]=1,o[i++]=0,o[i++]=0,o[i++]=0,o[i++]=0,o[i++]=1,o[i++]=0,o[i++]=0;for(var Be=0,Ie=L(e.symwid-24);Be<Ie;Be++)o[i++]=1;o[i++]=1,o[i++]=1,o[i++]=0,o[i++]=0,o[i++]=0,o[i++]=1,o[i++]=1,o[i++]=1,o[i++]=0,o[i++]=1,o[i++]=0,o[i++]=1,o[i++]=1}}for(var Me=0,je=e.rowheight;Me<je;Me++)_(A(e.rowbits,e.r-1));for(var Ne=0,Fe=e.symwid*e.sepheight;Ne<Fe;Ne++)o[i++]=1;e.pixs=s();var Re=new Map([["ren",Q],["pixs",e.pixs],["pixx",e.symwid],["pixy",~~(e.pixs.length/e.symwid)],["height",~~(e.pixs.length/e.symwid)/72],["width",e.symwid/72],["opt",e.options]]);o[i++]=Re,e.dontdraw||Q()}function Ge(){var e=Object.create(Ge.$ctx||(Ge.$ctx={}));if(e.dontdraw=!1,e.mode=-1,e.pos=-1,e.rows=0,e.rowheight=8,e.sepheight=1,e.encoding="auto",e.raw=!1,e.parse=!1,e.parsefnc=!1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],-1!=e.pos&&(e.rows=16),Ge.$ctx._13758||function(){var t=Object.create(e);t.swa=-1,t.swb=-2,t.swc=-3,t.sa1=-4,t.sb1=-5,t.sc1=-6,t.sa2=-7,t.sb2=-8,t.sc2=-9,t.pad=-10,t.sb3=-11,t.sc3=-12,t.fn1=-13,t.fn2=-14,t.fn3=-15,t.fn4=-16,t.charmaps=s([s([32,32,"00"]),s(["!","!","01"]),s(['"','"',"02"]),s(["#","#","03"]),s(["$","$","04"]),s(["%","%","05"]),s(["&","&","06"]),s(["'","'","07"]),s([40,40,"08"]),s([41,41,"09"]),s(["*","*","10"]),s(["+","+","11"]),s([",",",","12"]),s(["-","-","13"]),s([".",".","14"]),s(["/","/","15"]),s(["0","0","16"]),s(["1","1","17"]),s(["2","2","18"]),s(["3","3","19"]),s(["4","4","20"]),s(["5","5","21"]),s(["6","6","22"]),s(["7","7","23"]),s(["8","8","24"]),s(["9","9","25"]),s([":",":","26"]),s([";",";","27"]),s(["<","<","28"]),s(["=","=","29"]),s([">",">","30"]),s(["?","?","31"]),s(["@","@","32"]),s(["A","A","33"]),s(["B","B","34"]),s(["C","C","35"]),s(["D","D","36"]),s(["E","E","37"]),s(["F","F","38"]),s(["G","G","39"]),s(["H","H","40"]),s(["I","I","41"]),s(["J","J","42"]),s(["K","K","43"]),s(["L","L","44"]),s(["M","M","45"]),s(["N","N","46"]),s(["O","O","47"]),s(["P","P","48"]),s(["Q","Q","49"]),s(["R","R","50"]),s(["S","S","51"]),s(["T","T","52"]),s(["U","U","53"]),s(["V","V","54"]),s(["W","W","55"]),s(["X","X","56"]),s(["Y","Y","57"]),s(["Z","Z","58"]),s(["[","[","59"]),s([92,92,"60"]),s(["]","]","61"]),s(["^","^","62"]),s(["_","_","63"]),s([0,"`","64"]),s([1,"a","65"]),s([2,"b","66"]),s([3,"c","67"]),s([4,"d","68"]),s([5,"e","69"]),s([6,"f","70"]),s([7,"g","71"]),s([8,"h","72"]),s([9,"i","73"]),s([10,"j","74"]),s([11,"k","75"]),s([12,"l","76"]),s([13,"m","77"]),s([14,"n","78"]),s([15,"o","79"]),s([16,"p","80"]),s([17,"q","81"]),s([18,"r","82"]),s([19,"s","83"]),s([20,"t","84"]),s([21,"u","85"]),s([22,"v","86"]),s([23,"w","87"]),s([24,"x","88"]),s([25,"y","89"]),s([26,"z","90"]),s([27,"{","91"]),s([28,"|","92"]),s([29,"}","93"]),s([30,"~","94"]),s([31,127,"95"]),s([t.fn3,t.fn3,"96"]),s([t.fn2,t.fn2,"97"]),s([t.sb1,t.sa1,"98"]),s([t.swc,t.swc,"99"]),s([t.swb,t.fn4,t.swb]),s([t.fn4,t.swa,t.swa]),s([t.fn1,t.fn1,t.fn1]),s([t.pad,t.pad,t.pad]),s([t.sb2,t.sa2,t.sb1]),s([t.sc2,t.sc2,t.sb2]),s([t.sc3,t.sc3,t.sb3])]),t.charvals=s([new Map,new Map,new Map]);for(var n=0,r=t.charmaps.length-1;n<=r;n+=1){t.i=n,t.encs=A(t.charmaps,t.i);for(var a=0;a<=2;a+=1){t.j=a;var u=A(t.encs,t.j);if(o[i++]=u,T(w(u),"stringtype")){var c=A(o[--i],0);o[i++]=c}v(A(t.charvals,t.j),o[--i],t.i)}}for(var l in t.seta=A(t.charvals,0),t.setb=A(t.charvals,1),t.setc=A(t.charvals,2),t)t.hasOwnProperty(l)&&(Ge.$ctx[l]=t[l]);Ge.$ctx._13758=1}(),e.raw&&(e.encoding="raw"),T(e.encoding,"raw")){for(e.cws=s(e.barcode.length),e.i=0,e.j=0;e.i!=e.barcode.length;)e.cw=p(b(e.barcode,e.i+1,3)),v(e.cws,e.j,e.cw),e.i=e.i+4,e.j=e.j+1;e.cws=b(e.cws,0,e.j)}if(T(e.encoding,"auto")){var t=new Map([["parse",e.parse],["parsefnc",e.parsefnc],["eci",!0],["FNC1",e.fn1],["FNC2",e.fn2],["FNC3",e.fn3]]);e.fncvals=t,o[i++]="msg",o[i++]=e.barcode,o[i++]=e.fncvals,H();var n=o[--i];e[o[--i]]=n,e.msglen=e.msg.length,o[i++]=1/0;for(var r=0,a=e.msglen;r<a;r++)o[i++]=0;o[i++]=0,e.numSA=s(),o[i++]=1/0;for(var u=0,c=e.msglen;u<c;u++)o[i++]=0;o[i++]=0,e.numEA=s();for(var l=e.msglen-1;l>=0;l-=1)e.i=l,A(e.msg,e.i)>=0&&(A(e.msg,e.i)>=128?v(e.numEA,e.i,L(A(e.numEA,e.i+1)+1)):v(e.numSA,e.i,L(A(e.numSA,e.i+1)+1)));e.ea=!1,e.msgtmp=s([]);for(var h=0,f=e.msglen-1;h<=f;h+=1){if(e.i=h,e.c=A(e.msg,e.i),!R(e.ea,e.c<128)&&e.c>=0){e.ea?o[i++]=e.numSA:o[i++]=e.numEA;var d=A(o[--i],e.i);d<(L(d+e.i)==e.msglen?3:5)?(o[i++]=1/0,_(e.msgtmp),o[i++]=e.fn4,e.msgtmp=s()):(o[i++]=1/0,_(e.msgtmp),o[i++]=e.fn4,o[i++]=e.fn4,e.msgtmp=s(),e.ea=!e.ea)}o[i++]=1/0,_(e.msgtmp),e.c>=0?o[i++]=127&e.c:o[i++]=e.c,e.msgtmp=s()}e.msg=e.msgtmp,e.msglen=e.msg.length,e.numsscr=function(){for(e.n=0,e.s=0,e.p=o[--i];!(e.p>=e.msglen);){var t=A(e.msg,e.p),n=void 0!==A(e.setc,t);if(o[i++]=t,!n){i--;break}if(o[--i]==e.fn1){if(e.s%2!=0)break;e.s=e.s+1}e.n=e.n+1,e.s=e.s+1,e.p=L(e.p+1)}o[i++]=e.n,o[i++]=e.s},e.enca=function(){v(e.cws,e.j,A(e.seta,o[--i])),e.j=e.j+1},e.encb=function(){v(e.cws,e.j,A(e.setb,o[--i])),e.j=e.j+1},e.encc=function(){var t=o[--i];if(o[i++]=t,D(w(t),"arraytype")){var n=A(e.setc,o[--i]);o[i++]=n}else{_(o[--i]);var r=o[--i],a=o[--i];o[i++]=L(L(r-48)+10*L(a-48))}v(e.cws,e.j,o[--i]),e.j=e.j+1},e.anotb=function(){var t=o[--i],n=void 0!==A(e.seta,t),r=void 0!==A(e.setb,t);o[i++]=n&&!r},e.bnota=function(){var t=o[--i],n=void 0!==A(e.setb,t),r=void 0!==A(e.seta,t);o[i++]=n&&!r},o[i++]=1/0;for(var m=0,g=e.msg.length;m<g;m++)o[i++]=0;o[i++]=9999,e.nextanotb=s(),o[i++]=1/0;for(var y=0,x=e.msg.length;y<x;y++)o[i++]=0;o[i++]=9999,e.nextbnota=s();for(var C=e.msg.length-1;C>=0;C-=1)e.i=C,o[i++]=A(e.msg,e.i),e.anotb(),o[--i]?v(e.nextanotb,e.i,0):v(e.nextanotb,e.i,L(A(e.nextanotb,e.i+1)+1)),o[i++]=A(e.msg,e.i),e.bnota(),o[--i]?v(e.nextbnota,e.i,0):v(e.nextbnota,e.i,L(A(e.nextbnota,e.i+1)+1));for(e.abeforeb=function(){var t=o[--i];o[i++]=B(A(e.nextanotb,t),A(e.nextbnota,t))},e.bbeforea=function(){var t=o[--i];o[i++]=B(A(e.nextbnota,t),A(e.nextanotb,t))},e.cws=s(2*e.barcode.length+3),e.i=0,e.j=0;;){if(-1!=e.pos){v(e.cws,0,~~(e.pos/10)-1),v(e.cws,1,e.pos%10-1),e.j=2,e.cset="setb",e.mode=7;break}if(0==e.msglen){e.cset="setb",e.mode=1;break}if(e.msglen>=2){o[i++]=A(e.msg,0)==e.fn1,o[i++]=1,e.numsscr();var E=o[--i],I=o[--i];o[i++]=E,o[i++]=I,i--;var M=o[--i];if(o[--i]&&M>=2){e.cset="setc",e.mode=4,e.i=1;break}}if(A(e.msg,0)==e.fn1){e.cset="setb",e.mode=3,e.i=1;break}if(e.msglen>=2){o[i++]=0,e.numsscr();var j=o[--i],F=o[--i];o[i++]=j,o[i++]=F,i--;var P=o[--i];if(P>=2&&P%2==0){e.cset="setc",e.mode=2;break}o[i++]=0,e.numsscr();var $=o[--i],V=o[--i];o[i++]=$,o[i++]=V,i--;var q=o[--i];if(q>=3&&q%2==1){o[i++]=A(e.msg,0),e.encb(),e.cset="setc",e.mode=5,e.i=1;break}var G=void 0!==A(e.setb,A(e.msg,0));o[i++]=G,o[i++]=1,e.numsscr();var W=o[--i],K=o[--i];o[i++]=W,o[i++]=K,i--;var Y=o[--i];if(o[--i]&&Y>=2&&Y%2==0){o[i++]=A(e.msg,0),e.encb(),e.cset="setc",e.mode=5,e.i=1;break}var X=void 0!==A(e.setb,A(e.msg,0));o[i++]=X,o[i++]=1,e.numsscr();var J=o[--i],Z=o[--i];o[i++]=J,o[i++]=Z,i--;var ee=o[--i];if(o[--i]&&ee>=3&&ee%2==1){o[i++]=A(e.msg,0),e.encb(),o[i++]=A(e.msg,1),e.encb(),e.cset="setc",e.mode=6,e.i=2;break}var te=void 0!==A(e.setb,A(e.msg,0)),ne=void 0!==A(e.setb,A(e.msg,1));o[i++]=te&&ne,o[i++]=2,e.numsscr();var re=o[--i],ie=o[--i];o[i++]=re,o[i++]=ie,i--;var oe=o[--i];if(o[--i]&&oe>=2&&oe%2==0){o[i++]=A(e.msg,0),e.encb(),o[i++]=A(e.msg,1),e.encb(),e.cset="setc",e.mode=6,e.i=2;break}}if(o[i++]=0,e.abeforeb(),o[--i]){e.cset="seta",e.mode=0;break}e.cset="setb",e.mode=1;break}for(;e.i!=e.msglen;)for(o[i++]=e.i,e.numsscr(),e.nums=o[--i],e.nchars=o[--i];;){if(T(e.cset,"seta")){if(e.i<e.msglen-1){o[i++]=A(e.msg,e.i),e.bnota(),o[i++]=e.i+1,e.abeforeb();var ae=o[--i];if(o[--i]&&ae){o[i++]=e.sb1,e.enca(),o[i++]=A(e.msg,e.i),e.encb(),e.i=e.i+1;break}}if(e.i<e.msglen-2){o[i++]=A(e.msg,e.i),e.bnota(),o[i++]=A(e.msg,e.i+1),e.bnota();var se=o[--i],ue=o[--i];o[i++]=N(ue,se),o[i++]=e.i+2,e.abeforeb();var ce=o[--i];if(o[--i]&&ce){o[i++]=e.sb2,e.enca(),o[i++]=A(e.msg,e.i),e.encb(),o[i++]=A(e.msg,e.i+1),e.encb(),e.i=e.i+2;break}}if(o[i++]=A(e.msg,e.i),e.bnota(),o[--i]){o[i++]=e.swb,e.enca(),e.cset="setb";break}if(e.i<e.msglen-4){var le=void 0!==A(e.seta,A(e.msg,e.i+4));if(4==e.nums&&le){o[i++]=e.sc2,e.enca();for(var he=0;he<2;he++)A(e.msg,e.i)==e.fn1?(o[i++]=e.fn1,e.encc(),e.i=e.i+1):(o[i++]=b(e.msg,e.i,2),e.encc(),e.i=e.i+2);break}}if(e.i<e.msglen-6){var fe=void 0!==A(e.seta,A(e.msg,e.i+6));if(6==e.nums&&fe){o[i++]=e.sc3,e.enca();for(var de=0;de<3;de++)A(e.msg,e.i)==e.fn1?(o[i++]=e.fn1,e.encc(),e.i=e.i+1):(o[i++]=b(e.msg,e.i,2),e.encc(),e.i=e.i+2);break}}if(e.nums>=4&&e.nums%2==0){o[i++]=e.swc,e.enca(),e.cset="setc";break}o[i++]=A(e.msg,e.i),e.enca(),e.i=e.i+1;break}if(T(e.cset,"setb")){if(e.i<e.msglen-1){o[i++]=A(e.msg,e.i),e.anotb(),o[i++]=e.i+1,e.bbeforea();var pe=o[--i];if(o[--i]&&pe){o[i++]=e.sa1,e.encb(),o[i++]=A(e.msg,e.i),e.enca(),e.i=e.i+1;break}}if(e.i<e.msglen-2){o[i++]=A(e.msg,e.i),e.anotb(),o[i++]=A(e.msg,e.i+1),e.anotb();var me=o[--i],ge=o[--i];o[i++]=N(ge,me),o[i++]=e.i+2,e.bbeforea();var Ae=o[--i];if(o[--i]&&Ae){o[i++]=e.sa2,e.encb(),o[i++]=A(e.msg,e.i),e.enca(),o[i++]=A(e.msg,e.i+1),e.enca(),e.i=e.i+2;break}}if(o[i++]=A(e.msg,e.i),e.anotb(),o[--i]){o[i++]=e.swa,e.encb(),e.cset="seta";break}if(e.i<e.msglen-4){var ve=void 0!==A(e.setb,A(e.msg,e.i+4));if(4==e.nums&&ve){o[i++]=e.sc2,e.encb();for(var be=0;be<2;be++)A(e.msg,e.i)==e.fn1?(o[i++]=e.fn1,e.encc(),e.i=e.i+1):(o[i++]=b(e.msg,e.i,2),e.encc(),e.i=e.i+2);break}}if(e.i<e.msglen-6){var ye=void 0!==A(e.setb,A(e.msg,e.i+6));if(6==e.nums&&ye){o[i++]=e.sc3,e.encb();for(var we=0;we<3;we++)A(e.msg,e.i)==e.fn1?(o[i++]=e.fn1,e.encc(),e.i=e.i+1):(o[i++]=b(e.msg,e.i,2),e.encc(),e.i=e.i+2);break}}if(e.nums>=4&&e.nums%2==0){o[i++]=e.swc,e.encb(),e.cset="setc";break}o[i++]=A(e.msg,e.i),e.encb(),e.i=e.i+1;break}if(T(e.cset,"setc")){if(e.nums>=2){A(e.msg,e.i)==e.fn1?(o[i++]=e.fn1,e.encc(),e.i=e.i+1):(o[i++]=b(e.msg,e.i,2),e.encc(),e.i=e.i+2);break}if(e.i<e.msglen-1){var xe=void 0!==A(e.setb,A(e.msg,e.i));o[i++]=xe,o[i++]=e.i+1,e.numsscr();var Ce=o[--i],ke=o[--i];o[i++]=Ce,o[i++]=ke,i--;var Ee=o[--i];if(o[--i]&&Ee>=2&&Ee%2==0){o[i++]=e.sb1,e.encc(),o[i++]=A(e.msg,e.i),e.encb(),e.i=e.i+1;break}}if(e.i<e.msglen-1){var Se=void 0!==A(e.setb,A(e.msg,e.i));o[i++]=Se,o[i++]=e.i+1,e.numsscr();var _e=o[--i],Oe=o[--i];o[i++]=_e,o[i++]=Oe,i--;var Te=o[--i];if(o[--i]&&Te>=3&&Te%2==1){o[i++]=e.sb2,e.encc(),o[i++]=A(e.msg,e.i),e.encb(),o[i++]=A(e.msg,e.i+1),e.encb(),e.i=e.i+2;break}}if(e.i<e.msglen-2){var De=void 0!==A(e.setb,A(e.msg,e.i)),Be=void 0!==A(e.setb,A(e.msg,e.i+1));o[i++]=De&&Be,o[i++]=e.i+2,e.numsscr();var Ie=o[--i],Me=o[--i];o[i++]=Ie,o[i++]=Me,i--;var je=o[--i];if(o[--i]&&je>=2&&je%2==0){o[i++]=e.sb2,e.encc(),o[i++]=A(e.msg,e.i),e.encb(),o[i++]=A(e.msg,e.i+1),e.encb(),e.i=e.i+2;break}}if(e.i<e.msglen-3){var Ne=void 0!==A(e.setb,A(e.msg,e.i)),Fe=void 0!==A(e.setb,A(e.msg,e.i+1));o[i++]=Ne&&Fe,o[i++]=e.i+2,e.numsscr();var Re=o[--i],Pe=o[--i];o[i++]=Re,o[i++]=Pe,i--;var Le=o[--i];if(o[--i]&&Le>=3&&Le%2==1){o[i++]=e.sb3,e.encc(),o[i++]=A(e.msg,e.i),e.encb(),o[i++]=A(e.msg,e.i+1),e.encb(),o[i++]=A(e.msg,e.i+2),e.encb(),e.i=e.i+3;break}}if(e.i<e.msglen-3){var Ue=void 0!==A(e.setb,A(e.msg,e.i)),ze=void 0!==A(e.setb,A(e.msg,e.i+1)),He=void 0!==A(e.setb,A(e.msg,e.i+2));o[i++]=Ue&&ze&&He,o[i++]=e.i+3,e.numsscr();var $e=o[--i],Qe=o[--i];o[i++]=$e,o[i++]=Qe,i--;var Ve=o[--i];if(o[--i]&&Ve>=2&&Ve%2==0){o[i++]=e.sb3,e.encc(),o[i++]=A(e.msg,e.i),e.encb(),o[i++]=A(e.msg,e.i+1),e.encb(),o[i++]=A(e.msg,e.i+2),e.encb(),e.i=e.i+3;break}}if(o[i++]=e.i,e.abeforeb(),o[--i]){o[i++]=e.swa,e.encc(),e.cset="seta";break}o[i++]=e.swb,e.encc(),e.cset="setb";break}break}e.cws=b(e.cws,0,e.j)}Ge.$ctx._14246||function(){var t=Object.create(e);for(var n in t.metrics=s([s([2,7]),s([3,12]),s([4,17]),s([5,22]),s([6,27]),s([7,32]),s([8,37]),s([9,42]),s([10,47]),s([11,52]),s([12,57]),s([13,62]),s([14,67]),s([15,72]),s([16,77])]),t)t.hasOwnProperty(n)&&(Ge.$ctx[n]=t[n]);Ge.$ctx._14246=1}(),e.urows=e.rows;for(var qe=0,We=e.metrics.length-1;qe<=We&&(e.i=qe,e.m=A(e.metrics,e.i),e.r=A(e.m,0),e.dcws=A(e.m,1),e.okay=!0,0!=e.urows&&e.urows!=e.r&&(e.okay=!1),e.cws.length>e.dcws&&(e.okay=!1),!e.okay);qe+=1);e.okay||(o[i++]="bwipp.code16kNoValidSymbol#14262",o[i++]="Maximum length exceeded or data too large for given options",z()),o[i++]=1/0,_(e.cws);for(var Ke=0,Ye=L(e.dcws-e.cws.length);Ke<Ye;Ke++)o[i++]=103;e.cws=s(),o[i++]=1/0,o[i++]=L(7*L(e.r-2)+e.mode),_(e.cws),e.cws=s(),o[i++]=0;for(var Xe=0,Je=e.dcws;Xe<=Je;Xe+=1){var Ze=o[--i];o[i++]=L(Ze+(Xe+2)*A(e.cws,Xe))}e.c1=o[--i]%107,o[i++]=0;for(var et=0,tt=e.dcws;et<=tt;et+=1){var nt=o[--i];o[i++]=L(nt+(et+1)*A(e.cws,et))}e.c2=L(o[--i]+e.c1*L(e.dcws+2))%107,o[i++]=1/0,_(e.cws),o[i++]=e.c1,o[i++]=e.c2,e.cws=s(),void 0!==A(e.options,"debugcws")&&(o[i++]="bwipp.debugcws#14278",o[i++]=e.cws,z()),Ge.$ctx._14314||function(){var t=Object.create(e);for(var n in t.encs=s(["212222","222122","222221","121223","121322","131222","122213","122312","132212","221213","221312","231212","112232","122132","122231","113222","123122","123221","223211","221132","221231","213212","223112","312131","311222","321122","321221","312212","322112","322211","212123","212321","232121","111323","131123","131321","112313","132113","132311","211313","231113","231311","112133","112331","132131","113123","113321","133121","313121","211331","231131","213113","213311","213131","311123","311321","331121","312113","312311","332111","314111","221411","431111","111224","111422","121124","121421","141122","141221","112214","112412","122114","122411","142112","142211","241211","221114","413111","241112","134111","111242","121142","121241","114212","124112","124211","411212","421112","421211","212141","214121","412121","111143","111341","131141","114113","114311","411113","411311","113141","114131","311141","411131","211412","211214","211232","211133"]),t.startencs=s(["3211","2221","2122","1411","1132","1231","1114","3112","3211","2221","2122","1411","1132","1231","1114","3112"]),t.stopencsodd=s(["3211","2221","2122","1411","1132","1231","1114","3112","1132","1231","1114","3112","3211","2221","2122","1411"]),t.stopencseven=s(["2122","1411","1132","1231","1114","3112","1132","1231","1114","3112","3211","2221","2122","1411","3211","2221"]),t)t.hasOwnProperty(n)&&(Ge.$ctx[n]=t[n]);Ge.$ctx._14314=1}(),-1==e.pos||~~(e.pos/10)%2==1?e.stopencs=e.stopencsodd:e.stopencs=e.stopencseven,e.rowbits=s(e.r);for(var rt=0,it=L(e.r-1);rt<=it;rt+=1){e.i=rt,o[i++]=1/0,o[i++]=10,k(A(e.startencs,e.i),(function(){var e=o[--i];o[i++]=L(e-48)}));var ot=b(e.cws,5*e.i,5);o[i++]=1;for(var at=0,st=ot.length;at<st;at++)k(A(e.encs,A(ot,at)),(function(){var e=o[--i];o[i++]=L(e-48)}));k(A(e.stopencs,e.i),(function(){var e=o[--i];o[i++]=L(e-48)})),o[i++]=1,e.sbs=s(),o[i++]=1/0;var ut=e.sbs;o[i++]=1;for(var ct=0,lt=ut.length;ct<lt;ct++){var ht=o[--i],ft=0==ht?1:0;o[i++]=ht;for(var dt=0,pt=A(ut,ct);dt<pt;dt++)o[i++]=ft}O(s(S()-1));var mt=o[--i],gt=o[--i];o[i++]=mt,o[i++]=gt,i--;var At=o[--i],vt=o[--i];o[i++]=At,o[i++]=vt,i--,v(e.rowbits,e.i,o[--i])}o[i++]=1/0;for(var bt=0,yt=81*e.sepheight;bt<yt;bt++)o[i++]=1;for(var wt=0,xt=L(e.r-2);wt<=xt;wt+=1){e.i=wt;for(var Ct=0,kt=e.rowheight;Ct<kt;Ct++)_(A(e.rowbits,e.i));for(var Et=0,St=e.sepheight;Et<St;Et++){for(var _t=0;_t<10;_t++)o[i++]=0;for(var Ot=0;Ot<70;Ot++)o[i++]=1;o[i++]=0}}for(var Tt=0,Dt=e.rowheight;Tt<Dt;Tt++)_(A(e.rowbits,L(e.r-1)));for(var Bt=0,It=81*e.sepheight;Bt<It;Bt++)o[i++]=1;e.pixs=s();var Mt=new Map([["ren",Q],["pixs",e.pixs],["pixx",81],["pixy",~~(e.pixs.length/81)],["height",~~(e.pixs.length/81)/72],["width",1.125],["opt",e.options]]);o[i++]=Mt,e.dontdraw||Q()}function We(){var e=Object.create(We.$ctx||(We.$ctx={}));e.dontdraw=!1,e.mode=-1,e.pos=-1,e.rows=0,e.rowheight=8,e.sepheight=1,e.parse=!1,e.parsefnc=!1,o[i++]=e,U(),e.options=o[--i];var t=o[--i];e.barcode=t,We.$ctx._14419||function(){var t=Object.create(e);for(var n in t.s1=-1,t.s2=-2,t.fn1=-3,t.fn2=-4,t.fn3=-5,t.ns=-6,t)t.hasOwnProperty(n)&&(We.$ctx[n]=t[n]);We.$ctx._14419=1}();var n=new Map([["parse",e.parse],["parsefnc",e.parsefnc],["FNC1",e.fn1],["FNC2",e.fn2],["FNC3",e.fn3]]);e.fncvals=n,o[i++]="msg",o[i++]=e.barcode,o[i++]=e.fncvals,H();var r=o[--i];e[o[--i]]=r,e.msglen=e.msg.length,We.$ctx._14472||function(){var t=Object.create(e);t.charmap=s(["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","-","."," ","$","/","+","%",t.s1,t.s2,t.fn1,t.fn2,t.fn3,t.ns]),t.charvals=new Map;for(var n=0;n<=48;n+=1){t.i=n;var r=A(t.charmap,t.i);if(o[i++]=r,T(w(r),"stringtype")){var a=A(o[--i],0);o[i++]=a}v(t.charvals,o[--i],t.i)}t.combos=s(["1 ","1A","1B","1C","1D","1E","1F","1G","1H","1I","1J","1K","1L","1M","1N","1O","1P","1Q","1R","1S","1T","1U","1V","1W","1X","1Y","1Z","11","12","13","14","15","  ","16","17","18"," $"," %","19","10","1-","1.","1$"," +","1/"," -"," ."," /"," 0"," 1"," 2"," 3"," 4"," 5"," 6"," 7"," 8"," 9","1+","21","22","23","24","25","26"," A"," B"," C"," D"," E"," F"," G"," H"," I"," J"," K"," L"," M"," N"," O"," P"," Q"," R"," S"," T"," U"," V"," W"," X"," Y"," Z","27","28","29","20","2-","2.","2A","2B","2C","2D","2E","2F","2G","2H","2I","2J","2K","2L","2M","2N","2O","2P","2Q","2R","2S","2T","2U","2V","2W","2X","2Y","2Z","2$","2/","2+","2%","2 "]);for(var u=0;u<=127;u+=1){t.i=u;var c=A(t.combos,t.i);t.c1=A(c,0),t.c2=A(c,1),49==t.c1&&v(t.charvals,t.i,s([A(t.charvals,t.s1),A(t.charvals,t.c2)])),50==t.c1&&v(t.charvals,t.i,s([A(t.charvals,t.s2),A(t.charvals,t.c2)]))}for(var l in t)t.hasOwnProperty(l)&&(We.$ctx[l]=t[l]);We.$ctx._14472=1}(),e.encodealpha=function(){var t=A(e.charvals,o[--i]);o[i++]=t,D(w(t),"arraytype")&&O(s(1));var n=o[--i];y(e.cws,e.j,n),e.j=n.length+e.j},e.base48=function(){var t=o[--i];o[i++]=0,k(t,(function(){var e=o[--i],t=o[--i];o[i++]=L(L(e-48)+10*t)})),o[i++]=1/0;var n=o[--i],r=o[--i],a=o[--i];o[i++]=n,o[i++]=r;for(var u=0,c=L(a-1);u<c;u++){var l=o[--i];o[i++]=l%48,o[i++]=~~(l/48)}var h=s();o[i++]=h,o[i++]=1/0;var f=o[--i],d=o[--i];o[i++]=f,o[i++]=d;for(var p=d.length-1;p>=0;p-=1){var m=o[--i];o[i++]=A(m,p),o[i++]=m}i--;var g=s();y(e.cws,e.j,g),e.j=g.length+e.j},e.encodenumeric=function(){e.nums=o[--i];var t=e.nums.length,n=t%5;if(o[i++]="pre",o[i++]=t,o[i++]=n,2!=n){var r=o[--i],a=o[--i];o[i++]=L(a-r)}else{var u=o[--i],c=o[--i];o[i++]=L(L(c-u)-5)}var l=o[--i];e[o[--i]]=l;for(var h=0,f=L(e.pre-1);h<=f;h+=5)o[i++]=3,o[i++]=b(e.nums,h,5),e.base48();e.nums=b(e.nums,e.pre,L(e.nums.length-e.pre));var d=e.nums.length;o[i++]=d,1==d&&(o[i++]=A(e.nums,e.i),e.encodealpha());var p=o[--i];o[i++]=p,3==p&&(o[i++]=2,o[i++]=e.nums,e.base48());var m=o[--i];if(o[i++]=m,4==m){o[i++]=3,o[i++]=1/0,o[i++]=49,o[i++]=48,_(e.nums);var g=s();o[i++]=g,e.base48()}if(7==o[--i]){o[i++]=3,o[i++]=1/0,o[i++]=49,o[i++]=48,_(b(e.nums,0,4));var v=s();o[i++]=v,e.base48(),o[i++]=2,o[i++]=b(e.nums,4,3),e.base48()}},o[i++]=1/0;for(var a=0,u=e.msglen;a<u;a++)o[i++]=0;o[i++]=0,e.numericruns=s();for(var c=e.msglen-1;c>=0;c-=1){e.i=c;var l=A(e.msg,e.i);v(e.numericruns,e.i,l>=48&&l<=57?L(A(e.numericruns,e.i+1)+1):0)}if(-1==e.mode)for(;;){if(-1!=e.pos){e.mode=3;break}if(A(e.numericruns,0)>=5){e.mode=2;break}var h=A(e.charvals,A(e.msg,0));if(o[i++]=h,D(w(h),"arraytype")){i--,e.mode=0;break}var f=43==A(o[--i],0)?4:5;e.mode=f;break}if(e.cws=s(2*e.msglen+1),e.method="alpha",e.i=-1,e.j=-1,We.$ctx._14542||function(){var t=Object.create(e);for(var n in t.posval=s([12,22,13,23,33,14,24,34,44,15,25,35,45,55,16,26,36,46,56,66,17,27,37,47,57,67,77,18,28,38,48,58,68,78,88,19,29,39,49,59,69,79,89,99]),t)t.hasOwnProperty(n)&&(We.$ctx[n]=t[n]);We.$ctx._14542=1}(),0!=e.mode&&1!=e.mode||(e.method="alpha",e.i=0,e.j=0),2==e.mode&&(e.method="numeric",e.i=0,e.j=0),3==e.mode){o[i++]=e.cws,o[i++]=0;for(var d=0;d<=43;d+=1)o[i++]=d,A(e.posval,d)!=e.pos&&i--;var p=o[--i],m=o[--i];v(o[--i],m,L(p+1)),e.method="alpha",e.i=0,e.j=1}for(4!=e.mode&&5!=e.mode||(v(e.cws,0,A(A(e.charvals,A(e.msg,0)),1)),e.method="alpha",e.i=1,e.j=1);e.i!=e.msglen;)for(;;){if(T(e.method,"alpha")){if(A(e.numericruns,e.i)>=5){o[i++]=e.ns,e.encodealpha(),e.method="numeric";break}o[i++]=A(e.msg,e.i),e.encodealpha(),e.i=e.i+1;break}if(T(e.method,"numeric")){if(A(e.numericruns,e.i)<5){o[i++]=e.ns,e.encodealpha(),e.method="alpha";break}o[i++]=b(e.msg,e.i,A(e.numericruns,e.i)),e.encodenumeric(),e.i=L(e.i+A(e.numericruns,e.i));break}}for(e.cws=b(e.cws,0,e.j),We.$ctx._14596||function(){var t=Object.create(e);for(var n in t.metrics=s([s([2,9]),s([3,16]),s([4,23]),s([5,30]),s([6,37]),s([7,42]),s([8,49])]),t)t.hasOwnProperty(n)&&(We.$ctx[n]=t[n]);We.$ctx._14596=1}(),e.urows=e.rows,e.i=0;e.m=A(e.metrics,e.i),e.r=A(e.m,0),e.dcws=A(e.m,1),e.okay=!0,0!=e.urows&&e.urows!=e.r&&(e.okay=!1),e.cws.length>e.dcws&&(e.okay=!1),!e.okay;)e.i=e.i+1;o[i++]=1/0,_(e.cws);for(var g=0,x=L(e.dcws-e.cws.length);g<x;g++)o[i++]=48;e.cws=s(),e.ccs=s(8*e.r),e.j=0;for(var C=0,E=L(e.r-2);C<=E;C+=1){e.i=C,e.cc=b(e.cws,e.j,7),y(e.ccs,8*e.i,e.cc);var B=e.cc;o[i++]=e.ccs,o[i++]=8*e.i+7,o[i++]=0;for(var I=0,M=B.length;I<M;I++){var j=o[--i];o[i++]=L(j+A(B,I))}var N=o[--i],F=o[--i];v(o[--i],F,N%49),e.j=e.j+7}if(e.j<e.dcws&&y(e.ccs,e.ccs.length-8,b(e.cws,e.j,L(e.dcws-e.j))),e.cr7=L(7*L(e.r-2)+e.mode),v(e.ccs,e.ccs.length-2,e.cr7),We.$ctx._14640||function(){var t=Object.create(e),n=s([1,9,31,26,2,12,17,23,37,18,22,6,27,44,15,43,39,11,13,5,41,33,36,8,4,32,3,19,40,25,29,10,24,30]);o[i++]=n,o[i++]=n,o[i++]=1/0;var r=o[--i],a=b(o[--i],0,32);o[i++]=r,o[i++]=20,_(a),t.weightx=s();var u=o[--i];o[i++]=u,o[i++]=u,o[i++]=1/0;var c=o[--i],l=b(o[--i],1,32);o[i++]=c,o[i++]=16,_(l),t.weighty=s(),o[i++]=1/0;var h=o[--i],f=b(o[--i],2,32);for(var d in o[i++]=h,o[i++]=38,_(f),t.weightz=s(),t)t.hasOwnProperty(d)&&(We.$ctx[d]=t[d]);We.$ctx._14640=1}(),e.calccheck=function(){e.weights=o[--i],e.score=0;for(var t=0,n=~~(8*L(e.r-1)/2)-1;t<=n;t+=1)e.i=t,e.score=L(L(49*A(e.ccs,2*e.i)+A(e.ccs,2*e.i+1))*A(e.weights,e.i+1)+e.score);o[i++]=e.score},e.lastrow=b(e.ccs,e.ccs.length-8,8),e.r>=7){o[i++]=e.cr7*A(e.weightz,0),o[i++]=e.weightz,e.calccheck();var R=o[--i],P=L(o[--i]+R)%2401;o[i++]=~~(P/49),o[i++]=P%49,O(s(2)),y(e.lastrow,0,o[--i])}e.wr1=L(49*A(e.lastrow,0)+A(e.lastrow,1)),o[i++]=e.cr7*A(e.weighty,0),o[i++]=e.weighty,e.calccheck();var z=o[--i],$=L(L(o[--i]+z)+e.wr1*A(e.weighty,L(4*e.r-3)))%2401;e.wr2=$,o[i++]=~~($/49),o[i++]=$%49,O(s(2)),y(e.lastrow,2,o[--i]),o[i++]=e.cr7*A(e.weightx,0),o[i++]=e.weightx,e.calccheck();var V=o[--i],q=L(L(L(o[--i]+V)+e.wr1*A(e.weightx,L(4*e.r-3)))+e.wr2*A(e.weightx,L(4*e.r-2)))%2401;o[i++]=~~(q/49),o[i++]=q%49,O(s(2)),y(e.lastrow,4,o[--i]);var G=b(e.ccs,e.ccs.length-8,7);o[i++]=0;for(var W=0,K=G.length;W<K;W++){var Y=o[--i];o[i++]=L(Y+A(G,W))}v(e.ccs,e.ccs.length-1,o[--i]%49),We.$ctx._15376||function(){var t=Object.create(e);for(var n in t.patterns=s([s(["11521132","25112131","14212132","25121221","14221222","12412132","23321221","12421222","21521221","15112222","15121312","13312222","24221311","13321312","11512222","22421311","11521312","25112311","14212312","23312311","12412312","21512311","16121131","14321131","12521131","15212131","15221221","13412131","13421221","11612131","16112221","16121311","14312221","14321311","12512221","12521311","15212311","13412311","11612311","11131135","31131133","51131131","21122134","41122132","21131224","41131222","11113135","31113133","51113131","11122225","31122223","51122221","11131315","31131313","51131311","21113224","41113222","21122314","41122312","11113315","31113313","51113311","12131134","32131132","21231133","41231131","22122133","42122131","11222134","22131223","42131221","11231224","31231222","12113134","32113132","12122224","32122222","12131314","32131312","21231313","41231311","22113223","42113221","11213224","22122313","42122311","11222314","31222312","12113314","32113312","21213313","41213311","13131133","33131131","22231132","11331133","31331131","23122132","12222133","23131222","12231223","32231221","21331222","13113133","33113131","13122223","33122221","11313133","13131313","33131311","11322223","22231312","11331313","31331311","23113222","12213223","23122312","12222313","32222311","21322312","13113313","33113311","22213312","11313313","31313311","14131132","23231131","12331132","21431131","24122131","13222132","24131221","13231222","11422132","22331221","11431222","14113132","14122222","12313132","14131312","12322222","23231311","12331312","21431311","24113221","13213222","24122311","13222312","11413222","22322311","11422312","14113312","23213311","12313312","21413311","15131131","13331131","14222131","14231221","12422131","12431221","15113131","15122221","13313131","15131311","13322221","11513131","13331311","11522221","14213221","14222311","12413221","12422311","15113311","13313311","11513311","11141134","31141132","21132133","41132131","21141223","41141221","11123134","31123132","11132224","31132222","11141314","31141312","21114133","41114131","21123223","41123221","21132313","41132311","11114224","31114222","11123314","31123312","21114313","41114311","12141133","32141131","21241132","22132132","11232133","22141222","11241223","31241221","12123133","32123131","12132223","32132221","12141313","32141311","21241312","22114132","11214133","22123222","11223223","22132312","11232313","31232311","12114223","32114221","12123313","32123311","21223312","22114312","11214313","31214311","13141132","22241131","11341132","23132131","12232132","23141221","12241222","21341221","13123132","13132222","11323132","13141312","11332222","22241311","11341312","23114131","12214132","23123221","12223222","23132311","12232312","21332311","13114222","13123312","11314222","22223311","11323312","23114311","12214312","21314311","14141131","12341131","13232131","13241221","11432131","14123131","14132221","12323131","14141311","12332221","12341311","13214131","13223221","11414131","13232311","11423221","11432311","14114221","14123311","12314221","12323311","13214311","11414311","11151133","31151131","21142132","21151222","11133133","31133131","11142223","31142221","11151313","31151311","21124132","21133222","21142312","11115133","31115131","11124223","31124221","11133313","31133311","21115222","21124312","12151132","21251131","22142131","11242132","22151221","11251222","12133132","12142222","12151312","21251311","22124131","11224132","22133221","11233222","22142311","11242312","12115132","12124222","12133312","21233311","22115221","11215222","22124311","11224312","13151131","12242131","12251221","13133131","13142221","11333131","13151311","11342221","12224131","12233221","12242311","13115131","13124221","11315131","13133311","11324221","11333311","12215221","12224311","11161132","21152131","21161221","11143132","11152222","11161312","21134131","21143221","21152311","11125132","11134222","11143312","21116131","21125221","21134311","12161131","11252131","12143131","12152221","12161311","11234131","11243221","11252311","12125131","12134221","12143311","11216131","11225221","11234311","11111236","31111234","51111232","21111325","41111323","61111321","11111416","31111414","51111412","31211143","51211141","12111235","32111233","52111231","21211234","41211232","22111324","42111322","11211325","31211323","51211321","12111415","32111413","52111411","21211414","41211412","12211144","32211142","21311143","41311141","13111234","33111232","22211233","42211231","11311234","31311232","23111323","43111321","12211324","32211322","21311323","41311321","13111414","33111412","22211413","42211411","11311414","31311412","13211143","33211141","22311142","11411143","31411141","14111233","34111231","23211232","12311233","32311231","21411232","24111322","13211323","33211321","22311322","11411323","31411321","14111413","34111411","23211412","12311413","32311411","21411412","14211142","23311141","12411142","21511141","15111232","24211231","13311232","22411231","11511232","25111321","14211322","23311321","12411322","21511321","15111412","24211411","13311412","22411411","11511412","15211141","13411141","11611141","16111231","14311231","12511231","15211321","13411321","11611321","16111411","14311411","12511411","21121144","41121142","11112145","31112143","51112141","11121235","31121233","51121231","21112234","41112232","21121324","41121322","11112325","31112323","51112321","11121415","31121413","51121411","21112414","41112412","22121143","42121141","11221144","31221142","12112144","32112142","12121234","32121232","21221233","41221231","22112233","42112231","11212234","22121323","42121321","11221324","31221322","12112324","32112322","12121414","32121412","21221413","41221411","22112413","42112411","11212414","31212412","23121142","12221143","32221141","21321142","13112143","33112141","13121233","33121231","11312143","22221232","11321233","31321231","23112232","12212233","23121322","12221323","32221321","21321322","13112323","33112321","13121413","33121411","11312323","22221412","11321413","31321411","23112412","12212413","32212411","21312412","24121141","13221142","22321141","11421142","14112142","14121232","12312142","23221231","12321232","21421231","24112231","13212232","24121321","13221322","11412232","22321321","11421322","14112322","14121412","12312322","23221411","12321412","21421411","24112411","13212412","22312411","11412412","14221141","12421141","15112141","15121231","13312141","13321231","11512141","11521231","14212231","14221321","12412231","12421321","15112321","15121411","13312321","13321411","11512321","11521411","14212411","12412411","21131143","41131141","11122144","31122142","11131234","31131232","21113143","41113141","21122233","41122231","21131323","41131321","11113234","31113232","11122324","31122322","11131414","31131412","21113323","41113321","21122413","41122411","11113414","31113412","22131142","11231143","31231141","12122143","32122141","12131233","32131231","21231232","22113142","11213143","22122232","11222233","22131322","11231323","31231321","12113233","32113231","12122323","32122321","12131413","32131411","21231412","22113322","11213323","22122412","11222413","31222411","12113413","32113411","21213412","23131141","12231142","21331141","13122142","13131232","11322142","22231231","11331232","23113141","12213142","23122231","12222232","23131321","12231322","21331321","13113232","13122322","11313232","13131412","11322322","22231411","11331412","23113321","12213322","23122411","12222412","21322411","13113412","22213411","11313412","13231141","11431141","14122141","14131231","12322141","12331231","13213141","13222231","11413141","13231321","11422231","11431321","14113231","14122321","12313231","14131411","12322321","12331411","13213321","13222411","11413321","11422411","14113411","12313411","21141142","11132143","31132141","11141233","31141231","21123142","21132232","21141322","11114143","31114141","11123233","31123231","11132323","31132321","11141413","31141411","21114232","21123322","21132412","11114323","31114321","11123413","31123411","22141141","11241142","12132142","12141232","21241231","22123141","11223142","22132231","11232232","22141321","11241322","12114142","12123232","12132322","12141412","21241411","22114231","11214232","22123321","11223322","22132411","11232412","12114322","12123412","21223411","12241141","13132141","13141231","11332141","11341231","12223141","12232231","12241321","13114141","13123231","11314141","13132321","11323231","13141411","11332321","11341411","12214231","12223321","12232411","13114321","13123411","11314321","11323411","21151141","11142142","11151232","21133141","21142231","21151321","11124142","11133232","11142322","11151412","21115141","21124231","21133321","21142411","11115232","11124322","11133412","11251141","12142141","12151231","11233141","11242231","11251321","12124141","12133231","12142321","12151411","11215141","11224231","11233321","11242411","12115231","12124321","12133411","11152141","11161231","11134141","11143231","11152321","11161411","11116141","11125231","11134321","11143411","21111244","41111242","11111335","31111333","51111331","21111424","41111422","11111515","31111513","51111511","21211153","41211151","22111243","42111241","11211244","31211242","12111334","32111332","21211333","41211331","22111423","42111421","11211424","31211422","12111514","32111512","21211513","41211511","22211152","11311153","31311151","23111242","12211243","32211241","21311242","13111333","33111331","22211332","11311333","31311331","23111422","12211423","32211421","21311422","13111513","33111511","22211512","11311513","31311511","23211151","12311152","21411151","24111241","13211242","22311241","11411242","14111332","23211331","12311332","21411331","24111421","13211422","22311421","11411422","14111512","23211511","12311512","21411511","13311151","11511151","14211241","12411241","15111331","13311331","11511331","14211421","12411421","15111511","13311511","11511511","31121152","21112153","41112151","21121243","41121241","11112244","31112242","11121334","31121332","21112333","41112331","21121423","41121421","11112424","31112422","11121514","31121512","21112513","41112511","12121153","32121151","21221152","22112152","11212153","22121242","11221243","31221241","12112243","32112241","12121333","32121331","21221332","22112332","11212333","22121422","11221423","31221421","12112423","32112421","12121513","32121511","21221512","22112512","11212513","31212511","13121152","22221151","11321152","23112151","12212152","23121241","12221242","21321241","13112242","13121332","11312242","22221331","11321332","23112331","12212332","23121421","12221422","21321421","13112422","13121512","11312422","22221511","11321512","23112511","12212512","21312511","14121151","12321151","13212151","13221241","11412151","11421241","14112241","14121331","12312241","12321331","13212331","13221421","11412331","11421421","14112421","14121511","12312421","12321511","13212511","11412511","11131153","31131151","21122152","21131242","11113153","31113151","11122243","31122241","11131333","31131331","21113242","21122332","21131422","11113333","31113331","11122423","31122421","11131513","31131511","21113422","21122512","12131152","21231151","22122151","11222152","22131241","11231242","12113152","12122242","12131332","21231331","22113241","11213242","22122331","11222332","22131421","11231422","12113332","12122422","12131512","21231511","22113421","11213422","22122511","11222512","13131151","11331151","12222151","12231241","13113151","13122241","11313151","13131331","11322241","11331331","12213241","12222331","12231421","13113331","13122421","11313331","13131511","11322421","11331511","12213421","12222511","11141152","21132151","21141241","11123152","11132242","11141332","21114151","21123241","21132331","21141421","11114242","11123332","11132422","11141512","21114331","21123421","21132511","12141151","11232151","11241241","12123151","12132241","12141331","11214151","11223241","11232331","11241421","12114241","12123331","12132421","12141511","11214331","11223421","11232511","11151151","11133151","11142241","11151331","11115151","11124241","11133331","11142421","11151511","11111254","31111252","21111343","41111341","11111434","31111432","21111523","41111521","11111614","31111612","31211161","12111253","32111251","21211252","22111342","11211343","31211341","12111433","32111431","21211432","22111522","11211523","31211521","12111613","32111611","21211612","12211162","21311161","13111252","22211251","11311252","23111341","12211342","21311341","13111432","22211431","11311432","23111521","12211522","21311521","13111612","22211611","11311612","13211161","11411161","14111251","12311251","13211341","11411341","14111431","12311431","13211521","11411521","14111611","12311611","21121162","11112163","31112161","11121253","31121251","21112252","21121342","11112343","31112341","11121433","31121431","21112432","21121522","11112523","31112521","11121613","31121611","22121161","11221162","12112162","12121252","21221251","22112251","11212252","22121341","11221342","12112342","12121432","21221431","22112431","11212432","22121521","11221522","12112522","12121612","21221611","12221161","13112161","13121251","11312161","11321251","32121115","52121113","21221116","41221114","61221112","22112116","42112114","31212115","51212113","13121116","33121114","22221115","42221113","11321116","31321114","51321112","23112115","43112113","12212116","32212114","52212112","21312115","41312113","61312111","14121115","34121113","23221114","43221112","12321115","32321113","52321111","21421114","41421112","24112114","13212115","33212113","22312114","42312112","11412115","31412113","51412111","15121114","24221113","13321114","33321112","22421113","42421111","11521114","31521112","25112113","14212114","34212112","23312113","43312111","12412114","32412112","21512113","41512111","16121113","25221112","14321113","34321111","23421112","12521113","32521111","15212113","24312112","13412113","33412111","22512112","11612113","31612111","31131115","51131113","21122116","41122114","61122112","31113115","51113113","12131116","32131114","52131112","21231115","41231113","61231111","22122115","42122113","11222116","31222114","51222112","12113116","32113114","52113112","21213115","41213113","61213111","13131115","33131113","22231114","42231112","11331115","31331113","51331111","23122114","43122112","12222115","32222113","52222111","21322114","41322112","13113115","33113113","22213114","42213112","11313115","31313113","51313111","14131114","34131112","23231113","43231111","12331114","32331112","21431113","41431111","24122113","13222114","33222112","22322113","42322111","11422114","31422112","14113114","34113112","23213113","43213111","12313114","32313112","21413113","41413111","15131113","24231112","13331113","33331111","22431112","25122112","14222113","34222111","23322112","12422113","32422111","21522112","15113113","24213112","13313113","33313111","22413112","11513113","31513111","16131112","25231111","14331112","23431111","15222112","24322111","13422112","22522111","16113112","25213111","14313112","23413111","12513112","21613111","11141116","31141114","51141112","21132115","41132113","61132111","11123116","31123114","51123112","21114115","41114113","61114111","12141115","32141113","52141111","21241114","41241112","22132114","42132112","11232115","31232113","51232111","12123115","32123113","52123111","21223114","41223112","22114114","42114112","11214115","31214113","51214111","13141114","33141112","22241113","42241111","11341114","31341112","23132113","43132111","12232114","32232112","21332113","41332111","13123114","33123112","22223113","42223111","11323114","31323112","23114113","43114111","12214114","32214112","21314113","41314111","14141113","34141111","23241112","12341113","32341111","24132112","13232113","33232111","22332112","11432113","31432111","14123113","34123111","23223112","12323113","32323111","21423112","24114112","13214113","33214111","22314112","11414113","31414111","15141112","24241111","13341112","25132111","14232112","23332111","12432112","15123112","24223111","13323112","22423111","11523112","25114111","14214112","23314111","12414112","21514111","16141111","14341111","15232111","13432111","16123111","14323111","12523111","15214111","13414111","11614111","11151115","31151113","51151111","21142114","41142112","11133115","31133113","51133111","21124114","41124112","11115115","31115113","51115111","12151114","32151112","21251113","41251111","22142113","42142111","11242114","31242112","12133114","32133112","21233113","41233111","22124113","42124111","11224114","31224112","12115114","32115112","21215113","41215111","13151113","33151111","22251112","23142112","12242113","32242111","21342112","13133113","33133111","22233112","11333113","31333111","23124112","12224113","32224111","21324112","13115113","33115111","22215112","11315113","31315111","14151112","23251111","24142111","13242112","22342111","14133112","23233111","12333112","21433111","24124111","13224112","22324111","11424112","14115112","23215111","12315112","21415111","15151111","14242111","15133111","13333111","14224111","12424111","15115111","13315111","11515111","11161114","31161112","21152113","41152111","11143114","31143112","21134113","41134111","11125114","31125112","21116113","41116111","12161113","32161111","22152112","11252113","31252111","12143113","32143111","21243112","22134112","11234113","31234111","12125113","32125111","21225112","22116112","11216113","31216111","13161112","23152111","12252112","13143112","22243111","11343112","23134111","12234112","21334111","13125112","22225111","11325112","23116111","12216112","21316111","14161111","13252111","14143111","12343111","13234111","11434111","14125111","12325111","13216111","11416111","31111216","51111214","31211125","51211123","32111215","52111213","21211216","41211214","61211212","12211126","32211124","52211122","21311125","41311123","61311121","13111216","33111214","22211215","42211213","11311216","31311214","51311212","13211125","33211123","22311124","42311122","11411125","31411123","51411121","14111215","34111213","23211214","43211212","12311215","32311213","52311211","21411214","41411212","14211124","34211122","23311123","43311121","12411124","32411122","21511123","41511121","15111214","24211213","13311214","33311212","22411213","42411211","11511214","31511212","15211123","24311122","13411123","33411121","22511122","11611123","31611121","16111213","25211212","14311213","34311211","23411212","12511213","32511211","21611212","21121126","41121124","61121122","31112125","51112123","31121215","51121213","21112216","41112214","61112212","22121125","42121123","11221126","31221124","51221122","12112126","32112124","52112122","12121216","32121214","52121212","21221215","41221213","61221211","22112215","42112213","11212216","31212214","51212212","23121124","43121122","12221125","32221123","52221121","21321124","41321122","13112125","33112123","13121215","33121213","11312125","22221214","42221212","11321215","31321213","51321211","23112214","43112212","12212215","32212213","52212211","21312214","41312212","24121123","13221124","33221122","22321123","42321121","11421124","31421122","14112124","34112122","14121214","34121212","12312124","23221213","43221211","12321214","32321212","21421213","41421211","24112213","13212214","33212212","22312213","42312211","11412214","31412212","25121122","14221123","34221121","23321122","12421123","32421121","21521122","15112123","15121213","13312123","24221212","13321213","33321211","11512123","22421212","11521213","31521211","25112212","14212213","34212211","23312212","12412213","32412211","21512212","15221122","24321121","13421122","22521121","16112122","16121212","14312122","25221211","14321212","12512122","23421211","12521212","15212212","24312211","13412212","22512211","11612212","21131125","41131123","61131121","11122126","31122124","51122122","11131216","31131214","51131212","21113125","41113123","61113121","21122215","41122213","61122211","11113216","31113214","51113212","22131124","42131122","11231125","31231123","51231121","12122125","32122123","52122121","12131215","32131213","52131211","21231214","41231212","22113124","42113122","11213125","22122214","42122212","11222215","31222213","51222211","12113215","32113213","52113211","21213214","41213212","23131123","43131121","12231124","32231122","21331123","41331121","13122124","33122122","13131214","33131212","11322124","22231213","42231211","11331214","31331212","23113123","43113121","12213124","23122213","43122211","12222214","32222212","21322213","41322211","13113214","33113212","22213213","42213211","11313214","31313212","24131122","13231123","33231121","22331122","11431123","31431121","14122123","34122121","14131213","34131211","12322123","23231212","12331213","32331211","21431212","24113122","13213123","24122212","13222213","33222211","11413123","22322212","11422213","31422211","14113213","34113211","23213212","12313213","32313211","21413212","25131121","14231122","23331121","12431122","15122122","15131212","13322122","24231211","13331212","11522122","22431211","25113121","14213122","25122211","14222212","12413122","23322211","12422212","21522211","15113212","24213211","13313212","22413211","11513212","15231121","13431121","16122121","16131211","14322121","14331211","12522121","15213121","15222211","13413121","13422211","11613121","16113211","14313211","12513211","21141124","41141122","11132125","31132123","51132121","11141215","31141213","51141211","21123124","41123122","21132214","41132212","11114125","31114123","51114121","11123215","31123213","51123211","21114214","41114212","22141123","42141121","11241124","31241122","12132124","32132122","12141214","32141212","21241213","41241211","22123123","42123121","11223124","22132213","42132211","11232214","31232212","12114124","32114122","12123214","32123212","21223213","41223211","22114213","42114211","11214214","31214212","23141122","12241123","32241121","21341122","13132123","33132121","13141213","33141211","11332123","22241212","11341213","31341211","23123122","12223123","23132212","12232213","32232211","21332212","13114123","33114121","13123213","33123211","11314123","22223212","11323213","31323211","23114212","12214213","32214211","21314212","24141121","13241122","22341121","14132122","14141212","12332122","23241211","12341212","24123121","13223122","24132211","13232212","11423122","22332211","11432212","14114122","14123212","12314122","23223211","12323212","21423211","24114211","13214212","22314211","11414212","14241121","15132121","15141211","13332121","13341211","14223121","14232211","12423121","12432211","15114121","15123211","13314121","13323211","11514121","11523211","14214211","12414211","21151123","41151121","11142124","31142122","11151214","31151212","21133123","41133121","21142213","41142211","11124124","31124122","11133214","31133212","21115123","41115121","21124213","41124211","11115214","31115212","22151122","11251123","31251121","12142123","32142121","12151213","32151211","21251212","22133122","11233123","22142212","11242213","31242211","12124123","32124121","12133213","32133211","21233212","22115122","11215123","22124212","11224213","31224211","12115213","32115211","21215212","23151121","12251122","13142122","13151212","11342122","22251211","23133121","12233122","23142211","12242212","21342211","13124122","13133212","11324122","22233211","11333212","23115121","12215122","23124211","12224212","21324211","13115212","22215211","11315212","13251121","14142121","14151211","12342121","13233121","13242211","11433121","14124121","14133211","12324121","12333211","13215121","13224211","11415121","11424211","14115211","12315211","21161122","11152123","31152121","11161213","31161211","21143122","21152212","11134123","31134121","11143213","31143211","21125122","21134212","11116123","31116121","11125213","31125211","22161121","12152122","12161212","22143121","11243122","22152211","11252212","12134122","12143212","21243211","22125121","11225122","22134211","11234212","12116122","12125212","21225211","13152121","13161211","12243121","12252211","13134121","13143211","11334121","11343211","12225121","12234211","13116121","13125211","11316121","11325211","21111226","41111224","61111222","31111315","51111313","21211135","41211133","61211131","22111225","42111223","11211226","31211224","51211222","12111316","32111314","52111312","21211315","41211313","61211311","22211134","42211132","11311135","31311133","51311131","23111224","43111222","12211225","32211223","52211221","21311224","41311222","13111315","33111313","22211314","42211312","11311315","31311313","51311311","23211133","43211131","12311134","32311132","21411133","41411131","24111223","13211224","33211222","22311223","42311221","11411224","31411222","14111314","34111312","23211313","43211311","12311314","32311312","21411313","41411311","24211132","13311133","33311131","22411132","11511133","31511131","25111222","14211223","34211221","23311222","12411223","32411221","21511222","15111313","24211312","13311313","33311311","22411312","11511313","31511311","25211131","14311132","23411131","12511132","21611131","15211222","24311221","13411222","22511221","11611222","16111312","25211311","14311312","23411311","12511312","21611311","31121134","51121132","21112135","41112133","61112131","21121225","41121223","61121221","11112226","31112224","51112222","11121316","31121314","51121312","21112315","41112313","61112311","12121135","32121133","52121131","21221134","41221132","22112134","42112132","11212135","22121224","42121222","11221225","31221223","51221221","12112225","32112223","52112221","12121315","32121313","52121311","21221314","41221312","22112314","42112312","11212315","31212313","51212311","13121134","33121132","22221133","42221131","11321134","31321132","23112133","43112131","12212134","23121223","43121221","12221224","32221222","21321223","41321221","13112224","33112222","13121314","33121312","11312224","22221313","42221311","11321314","31321312","23112313","43112311","12212314","32212312","21312313","41312311","14121133","34121131","23221132","12321133","32321131","21421132","24112132","13212133","24121222","13221223","33221221","11412133","22321222","11421223","31421221","14112223","34112221","14121313","34121311","12312223","23221312","12321313","32321311","21421312","24112312","13212313","33212311","22312312","11412313","31412311","15121132","24221131","13321132","22421131"]),s(["22121116","42121114","31221115","51221113","32112115","52112113","21212116","41212114","61212112","23121115","43121113","12221116","32221114","52221112","21321115","41321113","61321111","13112116","33112114","22212115","42212113","11312116","31312114","51312112","24121114","13221115","33221113","22321114","42321112","11421115","31421113","51421111","14112115","34112113","23212114","43212112","12312115","32312113","52312111","21412114","41412112","25121113","14221114","34221112","23321113","43321111","12421114","32421112","21521113","41521111","15112114","24212113","13312114","33312112","22412113","42412111","11512114","31512112","15221113","24321112","13421113","33421111","22521112","16112113","25212112","14312113","34312111","23412112","12512113","32512111","21612112","21131116","41131114","61131112","31122115","51122113","21113116","41113114","61113112","22131115","42131113","11231116","31231114","51231112","12122116","32122114","52122112","21222115","41222113","61222111","22113115","42113113","11213116","31213114","51213112","23131114","43131112","12231115","32231113","52231111","21331114","41331112","13122115","33122113","22222114","42222112","11322115","31322113","51322111","23113114","43113112","12213115","32213113","52213111","21313114","41313112","24131113","13231114","33231112","22331113","42331111","11431114","31431112","14122114","34122112","23222113","43222111","12322114","32322112","21422113","41422111","24113113","13213114","33213112","22313113","42313111","11413114","31413112","25131112","14231113","34231111","23331112","12431113","32431111","15122113","24222112","13322113","33322111","22422112","11522113","31522111","25113112","14213113","34213111","23313112","12413113","32413111","21513112","15231112","24331111","13431112","16122112","25222111","14322112","23422111","12522112","15213112","24313111","13413112","22513111","11613112","21141115","41141113","61141111","11132116","31132114","51132112","21123115","41123113","61123111","11114116","31114114","51114112","22141114","42141112","11241115","31241113","51241111","12132115","32132113","52132111","21232114","41232112","22123114","42123112","11223115","31223113","51223111","12114115","32114113","52114111","21214114","41214112","23141113","43141111","12241114","32241112","21341113","41341111","13132114","33132112","22232113","42232111","11332114","31332112","23123113","43123111","12223114","32223112","21323113","41323111","13114114","33114112","22214113","42214111","11314114","31314112","24141112","13241113","33241111","22341112","14132113","34132111","23232112","12332113","32332111","21432112","24123112","13223113","33223111","22323112","11423113","31423111","14114113","34114111","23214112","12314113","32314111","21414112","25141111","14241112","23341111","15132112","24232111","13332112","22432111","25123111","14223112","23323111","12423112","21523111","15114112","24214111","13314112","22414111","11514112","15241111","16132111","14332111","15223111","13423111","16114111","14314111","12514111","21151114","41151112","11142115","31142113","51142111","21133114","41133112","11124115","31124113","51124111","21115114","41115112","22151113","42151111","11251114","31251112","12142114","32142112","21242113","41242111","22133113","42133111","11233114","31233112","12124114","32124112","21224113","41224111","22115113","42115111","11215114","31215112","23151112","12251113","32251111","13142113","33142111","22242112","11342113","31342111","23133112","12233113","32233111","21333112","13124113","33124111","22224112","11324113","31324111","23115112","12215113","32215111","21315112","24151111","13251112","14142112","23242111","12342112","24133111","13233112","22333111","11433112","14124112","23224111","12324112","21424111","24115111","13215112","22315111","11415112","14251111","15142111","13342111","14233111","12433111","15124111","13324111","11524111","14215111","12415111","21161113","41161111","11152114","31152112","21143113","41143111","11134114","31134112","21125113","41125111","11116114","31116112","22161112","12152113","32152111","21252112","22143112","11243113","31243111","12134113","32134111","21234112","22125112","11225113","31225111","12116113","32116111","21216112","23161111","13152112","22252111","23143111","12243112","21343111","13134112","22234111","11334112","23125111","12225112","21325111","13116112","22216111","11316112","14152111","13243111","14134111","12334111","13225111","11425111","14116111","12316111","41111215","61111213","21211126","41211124","61211122","22111216","42111214","31211215","51211213","22211125","42211123","11311126","31311124","51311122","23111215","43111213","12211216","32211214","52211212","21311215","41311213","61311211","23211124","43211122","12311125","32311123","52311121","21411124","41411122","24111214","13211215","33211213","22311214","42311212","11411215","31411213","51411211","24211123","13311124","33311122","22411123","42411121","11511124","31511122","25111213","14211214","34211212","23311213","43311211","12411214","32411212","21511213","41511211","25211122","14311123","34311121","23411122","12511123","32511121","21611122","15211213","24311212","13411213","33411211","22511212","11611213","31611211","31121125","51121123","21112126","41112124","61112122","21121216","41121214","61121212","31112215","51112213","12121126","32121124","52121122","21221125","41221123","61221121","22112125","42112123","11212126","22121215","42121213","11221216","31221214","51221212","12112216","32112214","52112212","21212215","41212213","61212211","13121125","33121123","22221124","42221122","11321125","31321123","51321121","23112124","43112122","12212125","23121214","43121212","12221215","32221213","52221211","21321214","41321212","13112215","33112213","22212214","42212212","11312215","31312213","51312211","14121124","34121122","23221123","43221121","12321124","32321122","21421123","41421121","24112123","13212124","24121213","13221214","33221212","11412124","22321213","42321211","11421214","31421212","14112214","34112212","23212213","43212211","12312214","32312212","21412213","41412211","15121123","24221122","13321123","33321121","22421122","11521123","31521121","25112122","14212123","25121212","14221213","34221211","12412123","23321212","12421213","32421211","21521212","15112213","24212212","13312213","33312211","22412212","11512213","31512211","16121122","25221121","14321122","23421121","12521122","15212122","15221212","13412122","24321211","13421212","11612122","22521211","16112212","25212211","14312212","23412211","12512212","21612211","11131126","31131124","51131122","21122125","41122123","61122121","21131215","41131213","61131211","11113126","31113124","51113122","11122216","31122214","51122212","21113215","41113213","61113211","12131125","32131123","52131121","21231124","41231122","22122124","42122122","11222125","22131214","42131212","11231215","31231213","51231211","12113125","32113123","52113121","12122215","32122213","52122211","21222214","41222212","22113214","42113212","11213215","31213213","51213211","13131124","33131122","22231123","42231121","11331124","31331122","23122123","43122121","12222124","23131213","43131211","12231214","32231212","21331213","41331211","13113124","33113122","13122214","33122212","11313124","22222213","42222211","11322214","31322212","23113213","43113211","12213214","32213212","21313213","41313211","14131123","34131121","23231122","12331123","32331121","21431122","24122122","13222123","24131212","13231213","33231211","11422123","22331212","11431213","31431211","14113123","34113121","14122213","34122211","12313123","23222212","12322213","32322211","21422212","24113212","13213213","33213211","22313212","11413213","31413211","15131122","24231121","13331122","22431121","25122121","14222122","25131211","14231212","12422122","23331211","12431212","15113122","15122212","13313122","24222211","13322212","11513122","22422211","11522212","25113211","14213212","23313211","12413212","21513211","16131121","14331121","15222121","15231211","13422121","13431211","16113121","16122211","14313121","14322211","12513121","12522211","15213211","13413211","11613211","11141125","31141123","51141121","21132124","41132122","21141214","41141212","11123125","31123123","51123121","11132215","31132213","51132211","21114124","41114122","21123214","41123212","11114215","31114213","51114211","12141124","32141122","21241123","41241121","22132123","42132121","11232124","22141213","42141211","11241214","31241212","12123124","32123122","12132214","32132212","21232213","41232211","22114123","42114121","11214124","22123213","42123211","11223214","31223212","12114214","32114212","21214213","41214211","13141123","33141121","22241122","11341123","31341121","23132122","12232123","23141212","12241213","32241211","21341212","13123123","33123121","13132213","33132211","11323123","22232212","11332213","31332211","23114122","12214123","23123212","12223213","32223211","21323212","13114213","33114211","22214212","11314213","31314211","14141122","23241121","12341122","24132121","13232122","24141211","13241212","11432122","22341211","14123122","14132212","12323122","23232211","12332212","21432211","24114121","13214122","24123211","13223212","11414122","22323211","11423212","14114212","23214211","12314212","21414211","15141121","13341121","14232121","14241211","12432121","15123121","15132211","13323121","13332211","11523121","14214121","14223211","12414121","12423211","15114211","13314211","11514211","11151124","31151122","21142123","41142121","21151213","41151211","11133124","31133122","11142214","31142212","21124123","41124121","21133213","41133211","11115124","31115122","11124214","31124212","21115213","41115211","12151123","32151121","21251122","22142122","11242123","22151212","11251213","31251211","12133123","32133121","12142213","32142211","21242212","22124122","11224123","22133212","11233213","31233211","12115123","32115121","12124213","32124211","21224212","22115212","11215213","31215211","13151122","22251121","23142121","12242122","23151211","12251212","13133122","13142212","11333122","22242211","11342212","23124121","12224122","23133211","12233212","21333211","13115122","13124212","11315122","22224211","11324212","23115211","12215212","21315211","14151121","13242121","13251211","14133121","14142211","12333121","12342211","13224121","13233211","11424121","11433211","14115121","14124211","12315121","12324211","13215211","11415211","11161123","31161121","21152122","21161212","11143123","31143121","11152213","31152211","21134122","21143212","11125123","31125121","11134213","31134211","21116122","21125212","12161122","22152121","11252122","22161211","12143122","12152212","21252211","22134121","11234122","22143211","11243212","12125122","12134212","21234211","22116121","11216122","22125211","11225212","13161121","12252121","13143121","13152211","11343121","12234121","12243211","13125121","13134211","11325121","11334211","12216121","12225211","31111225","51111223","21111316","41111314","61111312","31211134","51211132","12111226","32111224","52111222","21211225","41211223","61211221","22111315","42111313","11211316","31211314","51211312","12211135","32211133","52211131","21311134","41311132","13111225","33111223","22211224","42211222","11311225","31311223","51311221","23111314","43111312","12211315","32211313","52211311","21311314","41311312","13211134","33211132","22311133","42311131","11411134","31411132","14111224","34111222","23211223","43211221","12311224","32311222","21411223","41411221","24111313","13211314","33211312","22311313","42311311","11411314","31411312","14211133","34211131","23311132","12411133","32411131","21511132","15111223","24211222","13311223","33311221","22411222","11511223","31511221","25111312","14211313","34211311","23311312","12411313","32411311","21511312","15211132","24311131","13411132","22511131","11611132","16111222","25211221","14311222","23411221","12511222","21611221","15211312","24311311","13411312","22511311","11611312","21121135","41121133","61121131","11112136","31112134","51112132","11121226","31121224","51121222","21112225","41112223","61112221","21121315","41121313","61121311","11112316","31112314","51112312","22121134","42121132","11221135","31221133","51221131","12112135","32112133","52112131","12121225","32121223","52121221","21221224","41221222","22112224","42112222","11212225","22121314","42121312","11221315","31221313","51221311","12112315","32112313","52112311","21212314","41212312","23121133","43121131","12221134","32221132","21321133","41321131","13112134","33112132","13121224","33121222","11312134","22221223","42221221","11321224","31321222","23112223","43112221","12212224","23121313","43121311","12221314","32221312","21321313","41321311","13112314","33112312","22212313","42212311","11312314","31312312","24121132","13221133","33221131","22321132","11421133","31421131","14112133","34112131","14121223","34121221","12312133","23221222","12321223","32321221","21421222","24112222","13212223","24121312","13221313","33221311","11412223","22321312","11421313","31421311","14112313","34112311","23212312","12312313","32312311","21412312","25121131","14221132","23321131","12421132","21521131","15112132","15121222","13312132","24221221","13321222","11512132","22421221","11521222","25112221","14212222","25121311","14221312","12412222","23321311","12421312","21521311","15112312","24212311","13312312","22412311","11512312","15221131","13421131","16112131","16121221","14312131","14321221","12512131","12521221","15212221","15221311","13412221","13421311","11612221","16112311","14312311","12512311","21131134","41131132","11122135","31122133","51122131","11131225","31131223","51131221","21113134","41113132","21122224","41122222","21131314","41131312","11113225","31113223","51113221","11122315","31122313","51122311","21113314","41113312","22131133","42131131","11231134","31231132","12122134","32122132","12131224","32131222","21231223","41231221","22113133","42113131","11213134","22122223","42122221","11222224","22131313","42131311","11231314","31231312","12113224","32113222","12122314","32122312","21222313","41222311","22113313","42113311","11213314","31213312","23131132","12231133","32231131","21331132","13122133","33122131","13131223","33131221","11322133","22231222","11331223","31331221","23113132","12213133","23122222","12222223","23131312","12231313","32231311","21331312","13113223","33113221","13122313","33122311","11313223","22222312","11322313","31322311","23113312","12213313","32213311","21313312","24131131","13231132","22331131","11431132","14122132","14131222","12322132","23231221","12331222","21431221","24113131","13213132","24122221","13222222","24131311","11413132","13231312","11422222","22331311","11431312","14113222","14122312","12313222","23222311","12322312","21422311","24113311","13213312","22313311","11413312","14231131","12431131","15122131","15131221","13322131","13331221","11522131","14213131","14222221","12413131","14231311","12422221","12431311","15113221","15122311","13313221","13322311","11513221","11522311","14213311","12413311","21141133","41141131","11132134","31132132","11141224","31141222","21123133","41123131","21132223","41132221","21141313","41141311","11114134","31114132","11123224","31123222","11132314","31132312","21114223","41114221","21123313","41123311","11114314","31114312","22141132","11241133","31241131","12132133","32132131","12141223","32141221","21241222","22123132","11223133","22132222","11232223","22141312","11241313","31241311","12114133","32114131","12123223","32123221","12132313","32132311","21232312","22114222","11214223","22123312","11223313","31223311","12114313","32114311","21214312","23141131","12241132","21341131","13132132","13141222","11332132","22241221","11341222","23123131","12223132","23132221","12232222","23141311","12241312","21341311","13114132","13123222","11314132","13132312","11323222","22232311","11332312","23114221","12214222","23123311","12223312","21323311","13114312","22214311","11314312","13241131","14132131","14141221","12332131","12341221","13223131","13232221","11423131","13241311","11432221","14114131","14123221","12314131","14132311","12323221","12332311","13214221","13223311","11414221","11423311","14114311","12314311","21151132","11142133","31142131","11151223","31151221","21133132","21142222","21151312","11124133","31124131","11133223","31133221","11142313","31142311","21115132","21124222","21133312","11115223","31115221","11124313","31124311","22151131","11251132","12142132","12151222","21251221","22133131","11233132","22142221","11242222","22151311","11251312","12124132","12133222","12142312","21242311","22115131","11215132","22124221","11224222","22133311","11233312","12115222","12124312","21224311","12251131","13142131","13151221","11342131","12233131","12242221","12251311","13124131","13133221","11324131","13142311","11333221","11342311","12215131","12224221","12233311","13115221","13124311","11315221","11324311","21161131","11152132","11161222","21143131","21152221","21161311","11134132","11143222","11152312","21125131","21134221","21143311","11116132","11125222","11134312","12152131","12161221","11243131","11252221","12134131","12143221","12152311","11225131","11234221","11243311","12116131","12125221","12134311","21111235","41111233","61111231","11111326","31111324","51111322","21111415","41111413","61111411","21211144","41211142","22111234","42111232","11211235","31211233","51211231","12111325","32111323","52111321","21211324","41211322","22111414","42111412","11211415","31211413","51211411","22211143","42211141","11311144","31311142","23111233","43111231","12211234","32211232","21311233","41311231","13111324","33111322","22211323","42211321","11311324","31311322","23111413","43111411","12211414","32211412","21311413","41311411","23211142","12311143","32311141","21411142","24111232","13211233","33211231","22311232","11411233","31411231","14111323","34111321","23211322","12311323","32311321","21411322","24111412","13211413","33211411","22311412","11411413","31411411","24211141","13311142","22411141","11511142","25111231","14211232","23311231","12411232","21511231","15111322","24211321","13311322","22411321","11511322","25111411","14211412","23311411","12411412","21511411","14311141","12511141","15211231","13411231","11611231","16111321","14311321","12511321","15211411","13411411","11611411","31121143","51121141","21112144","41112142","21121234","41121232","11112235","31112233","51112231","11121325","31121323","51121321","21112324","41112322","21121414","41121412","11112415","31112413","51112411","12121144","32121142","21221143","41221141","22112143","42112141","11212144","22121233","42121231","11221234","31221232","12112234","32112232","12121324","32121322","21221323","41221321","22112323","42112321","11212324","22121413","42121411","11221414","31221412","12112414","32112412","21212413","41212411","13121143","33121141","22221142","11321143","31321141","23112142","12212143","23121232","12221233","32221231","21321232","13112233","33112231","13121323","33121321","11312233","22221322","11321323","31321321","23112322","12212323","23121412","12221413","32221411","21321412","13112413","33112411","22212412","11312413","31312411","14121142","23221141","12321142","21421141","24112141","13212142","24121231","13221232","11412142","22321231","11421232","14112232","14121322","12312232","23221321","12321322","21421321","24112321","13212322","24121411","13221412","11412322","22321411","11421412","14112412","23212411","12312412","21412411","15121141","13321141","11521141","14212141","14221231","12412141","12421231","15112231","15121321","13312231","13321321","11512231","11521321","14212321","14221411","12412321","12421411","15112411","13312411","11512411","11131144","31131142","21122143","41122141","21131233","41131231","11113144","31113142","11122234","31122232","11131324","31131322","21113233","41113231","21122323","41122321","21131413","41131411","11113324","31113322","11122414","31122412","21113413","41113411","12131143","32131141","21231142","22122142","11222143","22131232","11231233","31231231","12113143","32113141","12122233","32122231","12131323","32131321","21231322","22113232","11213233","22122322","11222323","22131412","11231413","31231411","12113323","32113321","12122413","32122411","21222412","22113412","11213413","31213411","13131142","22231141","11331142","23122141","12222142","23131231","12231232","21331231","13113142","13122232","11313142","13131322","11322232","22231321","11331322","23113231","12213232","23122321","12222322","23131411","12231412","21331411","13113322","13122412","11313322","22222411","11322412","23113411","12213412","21313411","14131141","12331141","13222141","13231231","11422141","11431231","14113141","14122231","12313141","14131321","12322231","12331321","13213231","13222321","11413231","13231411","11422321","11431411","14113321","14122411","12313321","12322411","13213411","11413411","11141143","31141141","21132142","21141232","11123143","31123141","11132233","31132231","11141323","31141321","21114142","21123232","21132322","21141412","11114233","31114231","11123323","31123321","11132413","31132411","21114322","21123412","12141142","21241141","22132141","11232142","22141231","11241232","12123142","12132232","12141322","21241321","22114141","11214142","22123231","11223232","22132321","11232322","22141411","11241412","12114232","12123322","12132412","21232411","22114321","11214322","22123411","11223412","13141141","11341141","12232141","12241231","13123141","13132231","11323141","13141321","11332231","11341321","12214141","12223231","12232321","12241411","13114231","13123321","11314231","13132411","11323321","11332411","12214321","12223411","11151142","21142141","21151231","11133142","11142232","11151322","21124141","21133231","21142321","21151411","11115142","11124232","11133322","11142412","21115231","21124321","21133411","12151141","11242141","11251231","12133141","12142231","12151321","11224141","11233231","11242321","11251411","12115141","12124231","12133321","12142411","11215231","11224321","11233411","11161141","11143141","11152231","11161321","11125141","11134231","11143321","11152411","11111245","31111243","51111241","21111334","41111332","11111425","31111423","51111421","21111514","41111512","31211152","12111244","32111242","21211243","41211241","22111333","42111331","11211334","31211332","12111424","32111422","21211423","41211421","22111513","42111511","11211514","31211512","12211153","32211151","21311152","13111243","33111241","22211242","11311243","31311241","23111332","12211333","32211331","21311332","13111423","33111421","22211422","11311423","31311421","23111512","12211513","32211511","21311512","13211152","22311151","11411152","14111242","23211241","12311242","21411241","24111331","13211332","22311331","11411332","14111422","23211421","12311422","21411421","24111511","13211512","22311511","11411512","14211151","12411151","15111241","13311241","11511241","14211331","12411331","15111421","13311421","11511421","14211511","12411511","21121153","41121151","11112154","31112152","11121244","31121242","21112243","41112241","21121333","41121331","11112334","31112332","11121424","31121422","21112423","41112421","21121513","41121511","11112514","31112512","22121152","11221153","31221151","12112153","32112151","12121243","32121241","21221242","22112242","11212243","22121332","11221333","31221331","12112333","32112331","12121423","32121421","21221422","22112422","11212423","22121512","11221513","31221511","12112513","32112511","21212512","23121151","12221152","21321151","13112152","13121242","11312152","22221241","11321242","23112241","12212242","23121331","12221332","21321331","13112332","13121422","11312332","22221421","11321422","23112421","12212422","23121511","12221512","21321511","13112512","22212511","11312512","13221151","11421151","14112151","14121241","12312151","12321241","13212241","13221331","11412241","11421331","14112331","14121421","12312331","12321421","13212421","13221511","11412421","11421511","14112511","12312511","21131152","11122153","31122151","11131243","31131241","21113152","21122242","21131332","11113243","31113241","11122333","31122331","11131423","31131421","21113332","21122422","21131512","11113423","31113421","11122513","31122511","22131151","11231152","12122152","12131242","21231241","22113151","11213152","22122241","11222242","22131331","11231332","12113242","12122332","12131422","21231421","22113331","11213332","22122421","11222422","22131511","11231512","12113422","12122512","21222511","12231151","13122151","13131241","11322151","11331241","12213151","12222241","12231331","13113241","13122331","11313241","13131421","11322331","11331421","12213331","12222421","12231511","13113421","13122511","11313421","11322511","21141151","11132152","11141242","21123151","21132241","21141331","11114152","11123242","11132332","11141422","21114241","21123331","21132421","21141511","11114332","11123422","11132512","11241151","12132151","12141241","11223151","11232241","11241331","12114151","12123241","12132331","12141421","11214241","11223331","11232421","11241511","12114331","12123421","12132511","11142151","11151241","11124151","11133241","11142331","11151421","11115241","11124331","11133421","11142511","21111253","41111251","11111344","31111342","21111433","41111431","11111524","31111522","21111613","41111611","21211162","22111252","11211253","31211251","12111343","32111341","21211342","22111432","11211433","31211431","12111523","32111521","21211522","22111612","11211613","31211611","22211161","11311162","23111251","12211252","21311251","13111342","22211341","11311342","23111431","12211432","21311431","13111522","22211521","11311522","23111611","12211612","21311611","12311161","13211251","11411251","14111341","12311341","13211431","11411431","14111521","12311521","13211611","11411611","31121161","21112162","21121252","11112253","31112251","11121343","31121341","21112342","21121432","11112433","31112431","11121523","31121521","21112522","21121612","12121162","21221161","22112161","11212162","22121251","11221252","12112252","12121342","21221341","22112341","11212342","22121431","11221432","12112432","12121522","21221521","22112521","11212522","22121611","11221612","13121161","11321161","12212161","12221251","13112251","13121341","11312251","11321341","12212341","12221431","13112431","13121521","11312431","11321521","12212521","12221611","11131162","21122161","21131251","11113162"])]),t.parity=s(["1001","0101","1100","0011","1010","0110","1111","0000"]),t)t.hasOwnProperty(n)&&(We.$ctx[n]=t[n]);We.$ctx._15376=1}(),e.rowbits=s(e.r);for(var X=0,J=L(e.r-1);X<=J;X+=1){e.i=X,o[i++]="p",e.i!=L(e.r-1)?o[i++]=A(e.parity,e.i):o[i++]="0000";var Z=o[--i];e[o[--i]]=Z,e.ccrow=b(e.ccs,8*e.i,8),o[i++]=1/0;for(var ee=0;ee<=7;ee+=2){_(b(e.ccrow,ee,2));var te=o[--i],ne=o[--i];o[i++]=L(te+49*ne)}e.scrow=s(),o[i++]=1/0,o[i++]=10,o[i++]=1,o[i++]=1;for(var re=0;re<=3;re+=1)e.j=re,k(A(A(e.patterns,L(A(e.p,e.j)-48)),A(e.scrow,e.j)),(function(){var e=o[--i];o[i++]=L(e-48)}));o[i++]=4,o[i++]=1,e.sbs=s(),o[i++]=1/0;var ie=e.sbs;o[i++]=1;for(var oe=0,ae=ie.length;oe<ae;oe++){var se=o[--i],ue=0==se?1:0;o[i++]=se;for(var ce=0,le=A(ie,oe);ce<le;ce++)o[i++]=ue}O(s(S()-1));var he=o[--i],fe=o[--i];o[i++]=he,o[i++]=fe,i--;var de=o[--i],pe=o[--i];o[i++]=de,o[i++]=pe,i--,v(e.rowbits,e.i,o[--i])}o[i++]=1/0;for(var me=0,ge=81*e.sepheight;me<ge;me++)o[i++]=1;for(var Ae=0,ve=L(e.r-2);Ae<=ve;Ae+=1){e.i=Ae;for(var be=0,ye=e.rowheight;be<ye;be++)_(A(e.rowbits,e.i));for(var we=0,xe=e.sepheight;we<xe;we++){for(var Ce=0;Ce<10;Ce++)o[i++]=0;for(var ke=0;ke<70;ke++)o[i++]=1;o[i++]=0}}for(var Ee=0,Se=e.rowheight;Ee<Se;Ee++)_(A(e.rowbits,L(e.r-1)));for(var _e=0,Oe=81*e.sepheight;_e<Oe;_e++)o[i++]=1;e.pixs=s();var Te=new Map([["ren",Q],["pixs",e.pixs],["pixx",81],["pixy",~~(e.pixs.length/81)],["height",~~(e.pixs.length/81)/72],["width",1.125],["opt",e.options]]);o[i++]=Te,e.dontdraw||Q()}function Ke(){var e=Object.create(Ke.$ctx||(Ke.$ctx={}));e.dontdraw=!1,e.includetext=!1,e.textfont="OCR-B",e.textsize=10,e.textyoffset=-8,e.height=.3,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],k(e.barcode,(function(){var e=o[--i];(e<48||e>57)&&(o[i++]="bwipp.flattermarkenBadCharacter#15738",o[i++]="Flattermarken must contain only digits",z())})),Ke.$ctx._15751||function(){var t=Object.create(e);for(var n in t.encs=s(["0018","0117","0216","0315","0414","0513","0612","0711","0810","0900"]),t.barchars="1234567890",t)t.hasOwnProperty(n)&&(Ke.$ctx[n]=t[n]);Ke.$ctx._15751=1}(),e.barlen=e.barcode.length,e.sbs=c(4*e.barlen),e.txt=s(e.barlen);for(var t=0,n=e.barlen-1;t<=n;t+=1)e.i=t,C(e.barchars,b(e.barcode,e.i,1)),i--,e.indx=o[--i].length,i-=2,e.enc=A(e.encs,e.indx),y(e.sbs,4*e.i,e.enc),v(e.txt,e.i,s([b(e.barcode,e.i,1),9*e.i,e.textyoffset,e.textfont,e.textsize]));o[i++]=1/0,o[i++]=1/0;for(var r=e.sbs,a=0,l=r.length;a<l;a++)o[i++]=A(r,a)-48;var h=s();o[i++]=1/0;for(var f=0,d=~~((e.sbs.length+1)/2);f<d;f++)o[i++]=e.height;var p=s();o[i++]=1/0;for(var m=0,g=~~((e.sbs.length+1)/2);m<g;m++)o[i++]=0;var w=s();o[i++]="ren",o[i++]=Wt,o[i++]="sbs",o[i++]=h,o[i++]="bhs",o[i++]=p,o[i++]="bbs",o[i++]=w,o[i++]="txt",o[i++]=e.txt,o[i++]="opt",o[i++]=e.options;var x=u();o[i++]=x,e.dontdraw||Wt()}function Ye(){var e=Object.create(Ye.$ctx||(Ye.$ctx={}));e.dontdraw=!1,e.height=1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],k(e.barcode,(function(){var e=o[--i];(e<49||e>57)&&(o[i++]="bwipp.rawBadCharacter#15824",o[i++]="Raw must contain only digits 1 to 9",z())})),o[i++]=1/0,o[i++]=1/0,k(e.barcode,(function(){var e=o[--i];o[i++]=L(e-48)}));var t=s();o[i++]=1/0;for(var n=0,r=~~((e.barcode.length+1)/2);n<r;n++)o[i++]=e.height;var a=s();o[i++]=1/0;for(var c=0,l=~~((e.barcode.length+1)/2);c<l;c++)o[i++]=0;var h=s();o[i++]="ren",o[i++]=Wt,o[i++]="sbs",o[i++]=t,o[i++]="bhs",o[i++]=a,o[i++]="bbs",o[i++]=h,o[i++]="opt",o[i++]=e.options;var f=u();o[i++]=f,e.dontdraw||Wt()}function Xe(){var e=Object.create(Xe.$ctx||(Xe.$ctx={}));e.dontdraw=!1,e.height=.175,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],k(e.barcode,(function(){var e=o[--i];68!=e&&65!=e&&70!=e&&84!=e&&(o[i++]="bwipp.daftBadCharacter#15878",o[i++]="DAFT must contain only characters D, A, F and T",z())})),e.barlen=e.barcode.length,e.bbs=s(e.barlen),e.bhs=s(e.barlen);for(var t=0,n=e.barlen-1;t<=n;t+=1)e.i=t,e.enc=b(e.barcode,e.i,1),T(e.enc,"D")&&(v(e.bbs,e.i,0*e.height/8),v(e.bhs,e.i,5*e.height/8)),T(e.enc,"A")&&(v(e.bbs,e.i,3*e.height/8),v(e.bhs,e.i,5*e.height/8)),T(e.enc,"F")&&(v(e.bbs,e.i,0*e.height/8),v(e.bhs,e.i,8*e.height/8)),T(e.enc,"T")&&(v(e.bbs,e.i,3*e.height/8),v(e.bhs,e.i,2*e.height/8));o[i++]=1/0;var r=e.bbs,a=e.bhs;o[i++]=1/0;for(var c=0,l=e.bhs.length-1;c<l;c++)o[i++]=1.44,o[i++]=1.872;o[i++]=1.44;var h=s();o[i++]="ren",o[i++]=Wt,o[i++]="bbs",o[i++]=r,o[i++]="bhs",o[i++]=a,o[i++]="sbs",o[i++]=h,o[i++]="opt",o[i++]=e.options;var f=u();o[i++]=f,e.dontdraw||Wt()}function Je(){var e=Object.create(Je.$ctx||(Je.$ctx={}));e.dontdraw=!1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i];var t=new Map([["fima",function(){e.sbs=s([2.25,2.25,2.25,11.25,2.25,11.25,2.25,2.25,2.25]),e.bhs=s([.625,.625,.625,.625,.625]),e.bbs=s([0,0,0,0,0])}],["fimb",function(){e.sbs=s([2.25,6.75,2.25,2.25,2.25,6.25,2.25,2.25,2.25,6.75,2.25]),e.bhs=s([.625,.625,.625,.625,.625,.625]),e.bbs=s([0,0,0,0,0,0])}],["fimc",function(){e.sbs=s([2.25,2.25,2.25,6.75,2.25,6.75,2.25,6.75,2.25,2.25,2.25]),e.bhs=s([.625,.625,.625,.625,.625,.625]),e.bbs=s([0,0,0,0,0,0])}],["fimd",function(){e.sbs=s([2.25,2.25,2.25,2.25,2.25,6.75,2.25,6.75,2.25,2.25,2.25,2.25,2.25]),e.bhs=s([.625,.625,.625,.625,.625,.625,.625]),e.bbs=s([0,0,0,0,0,0,0])}],["fime",function(){e.sbs=s([2.25,6.75,2.25,15.75,2.25,6.75,2.25]),e.bhs=s([.625,.625,.625,.625,.625,.625,.625]),e.bbs=s([0,0,0,0,0,0,0])}]]);if(e.symbols=t,void 0!==A(e.symbols,e.barcode)||(o[i++]="bwipp.symbolUnknownSymbol#15984",o[i++]="Unknown symbol name provided",z()),!0===A(e.symbols,e.barcode)())return!0;var n=new Map([["ren",Wt],["sbs",e.sbs],["bhs",e.bhs],["bbs",e.bbs],["opt",e.options]]);o[i++]=n,e.dontdraw||Wt()}function Ze(){var e=Object.create(Ze.$ctx||(Ze.$ctx={}));e.dontdraw=!1,e.compact=!1,e.eclevel=-1,e.columns=0,e.rows=0,e.rowmult=3,e.encoding="auto",e.ccc=!1,e.raw=!1,e.parse=!1,e.parsefnc=!1,o[i++]=e,U(),e.options=o[--i];var t=o[--i];if(e.barcode=t,Ze.$ctx._16140||function(){var t=Object.create(e);t.T=0,t.N=1,t.B=2,t.A=0,t.L=1,t.M=2,t.P=3,t.tl=-1,t.nl=-2,t.bl=-3,t.bl6=-4,t.bs=-5,t.al=-6,t.ll=-7,t.ml=-8,t.pl=-9,t.as=-10,t.ps=-11,t.charmaps=s([s(["A","a","0",";"]),s(["B","b","1","<"]),s(["C","c","2",">"]),s(["D","d","3","@"]),s(["E","e","4","["]),s(["F","f","5",92]),s(["G","g","6","]"]),s(["H","h","7","_"]),s(["I","i","8","`"]),s(["J","j","9","~"]),s(["K","k","&","!"]),s(["L","l",13,13]),s(["M","m",9,9]),s(["N","n",",",","]),s(["O","o",":",":"]),s(["P","p","#",10]),s(["Q","q","-","-"]),s(["R","r",".","."]),s(["S","s","$","$"]),s(["T","t","/","/"]),s(["U","u","+",'"']),s(["V","v","%","|"]),s(["W","w","*","*"]),s(["X","x","=",40]),s(["Y","y","^",41]),s(["Z","z",t.pl,"?"]),s([" "," "," ","{"]),s([t.ll,t.as,t.ll,"}"]),s([t.ml,t.ml,t.al,"'"]),s([t.ps,t.ps,t.ps,t.al])]),t.charvals=s([new Map,new Map,new Map,new Map]),t.alltext=new Map;for(var n=0,r=t.charmaps.length-1;n<=r;n+=1){t.i=n,t.encs=A(t.charmaps,t.i);for(var a=0;a<=3;a+=1){t.j=a;var c=A(t.encs,t.j);if(o[i++]=c,T(w(c),"stringtype")){var l=A(o[--i],0);o[i++]=l}var h=o[--i];v(A(t.charvals,t.j),h,t.i),v(t.alltext,h,-1)}}t.e=1e4;var f=s([s([0,1,1,2]),s([2,0,1,2]),s([1,1,0,1]),s([1,2,2,0])]);for(var d in t.latlen=f,t.latseq=s([s([s([]),s([t.ll]),s([t.ml]),s([t.ml,t.pl])]),s([s([t.ml,t.al]),s([]),s([t.ml]),s([t.ml,t.pl])]),s([s([t.al]),s([t.ll]),s([]),s([t.pl])]),s([s([t.al]),s([t.al,t.ll]),s([t.al,t.ml]),s([])])]),t.shftlen=s([s([t.e,t.e,t.e,1]),s([1,t.e,t.e,1]),s([t.e,t.e,t.e,1]),s([t.e,t.e,t.e,t.e])]),o[i++]=1/0,o[i++]=t.tl,o[i++]=900,o[i++]=t.bl,o[i++]=901,o[i++]=t.bl6,o[i++]=924,o[i++]=t.nl,o[i++]=902,o[i++]=t.bs,o[i++]=913,t.latchcws=u(),t)t.hasOwnProperty(d)&&(Ze.$ctx[d]=t[d]);Ze.$ctx._16140=1}(),e.raw&&(e.encoding="raw"),T(e.encoding,"raw")){for(e.datcws=s(e.barcode.length),e.i=0,e.j=0;e.i!=e.barcode.length;)e.cw=p(b(e.barcode,e.i+1,3)),v(e.datcws,e.j,e.cw),e.i=e.i+4,e.j=e.j+1;e.datcws=b(e.datcws,0,e.j)}if(e.ccc&&(e.encoding="ccc"),e.encb=function(){e.in=o[--i],e.inlen=e.in.length,e.out=s(5*~~(e.inlen/6)+e.inlen%6);for(var t=0,n=~~(e.inlen/6)-1;t<=n;t+=1){e.k=t,o[i++]=1/0,_(b(e.in,6*e.k,3)),e.msbs=s(),o[i++]=1/0,_(e.msbs);var r=o[--i],a=o[--i],u=o[--i];o[i++]=L(L(r+256*a)+65536*u);for(var c=0;c<3;c++){var l=o[--i];o[i++]=l%900,o[i++]=~~(l/900)}e.mscs=s(),o[i++]=1/0,_(b(e.in,6*e.k+3,3)),e.lsbs=s(),o[i++]=1/0,_(e.lsbs);var h=o[--i],f=o[--i],d=o[--i];o[i++]=L(L(h+256*f)+65536*d);for(var p=0;p<3;p++){var m=o[--i];o[i++]=m%900,o[i++]=~~(m/900)}e.lscs=s();var g=A(e.lscs,0),w=A(e.mscs,0);v(e.out,5*e.k+4,L(g+316*w)%900);var x=A(e.lscs,1),C=A(e.mscs,0),k=A(e.mscs,1);v(e.out,5*e.k+3,L(L(L(~~(L(g+316*w)/900)+x)+641*C)+316*k)%900);var E=A(e.lscs,2),S=A(e.mscs,0),O=A(e.mscs,1),T=A(e.mscs,2);v(e.out,5*e.k+2,L(L(L(L(~~(L(L(L(~~(L(g+316*w)/900)+x)+641*C)+316*k)/900)+E)+20*S)+641*O)+316*T)%900);var D=A(e.lscs,3),B=A(e.mscs,1),I=A(e.mscs,2);v(e.out,5*e.k+1,L(L(L(~~(L(L(L(L(~~(L(L(L(~~(L(g+316*w)/900)+x)+641*C)+316*k)/900)+E)+20*S)+641*O)+316*T)/900)+D)+20*B)+641*I)%900),v(e.out,5*e.k,L(~~(L(L(L(~~(L(L(L(L(~~(L(L(L(~~(L(g+316*w)/900)+x)+641*C)+316*k)/900)+E)+20*S)+641*O)+316*T)/900)+D)+20*B)+641*I)/900)+20*A(e.mscs,2))%900)}if(e.rem=e.inlen%6,0!=e.rem){o[i++]=e.out,o[i++]=e.out.length-e.rem,o[i++]=1/0,_(b(e.in,e.inlen-e.rem,e.rem));var M=s(),j=o[--i];y(o[--i],j,M)}o[i++]=e.out},T(e.encoding,"byte")||T(e.encoding,"ccc")){e.barlen=e.barcode.length,e.datcws=s(5*~~(e.barlen/6)+e.barlen%6+1);var n=e.barlen%6==0?924:901;v(e.datcws,0,n),o[i++]=e.datcws,o[i++]=1,o[i++]=1/0,k(e.barcode);var r=s();o[i++]=r,e.encb();var a=o[--i],l=o[--i];y(o[--i],l,a),T(e.encoding,"ccc")&&(o[i++]=1/0,o[i++]=920,_(e.datcws),e.datcws=s())}if(T(e.encoding,"auto")){var h=new Map([["parse",e.parse],["parsefnc",e.parsefnc],["eci",!0]]);e.fncvals=h,o[i++]="msg",o[i++]=e.barcode,o[i++]=e.fncvals,H();var f=o[--i];e[o[--i]]=f,e.msglen=e.msg.length,o[i++]=1/0;for(var d=0,g=e.msglen;d<g;d++)o[i++]=0;o[i++]=0,e.numdigits=s(),o[i++]=1/0;for(var x=0,C=e.msglen;x<C;x++)o[i++]=0;o[i++]=0,e.numtext=s(),o[i++]=1/0;for(var E=0,S=e.msglen;E<S;E++)o[i++]=0;o[i++]=0,e.numbytes=s(),o[i++]=1/0;for(var B=0,I=e.msglen;B<I;B++)o[i++]=0;o[i++]=0,e.iseci=s();for(var M=e.msglen-1;M>=0;M-=1){e.i=M;var j=A(e.msg,e.i);j>=48&&j<=57&&v(e.numdigits,e.i,L(A(e.numdigits,e.i+1)+1)),void 0!==A(e.alltext,A(e.msg,e.i))&&A(e.numdigits,e.i)<13&&v(e.numtext,e.i,L(A(e.numtext,e.i+1)+1)),A(e.msg,e.i)>=0&&A(e.numtext,e.i)<5&&A(e.numdigits,e.i)<13&&v(e.numbytes,e.i,L(A(e.numbytes,e.i+1)+1)),v(e.iseci,e.i,A(e.msg,e.i)<=-1e6)}for(e.numdigits=b(e.numdigits,0,e.msglen),e.numtext=b(e.numtext,0,e.msglen),e.numbytes=b(e.numbytes,0,e.msglen),e.seq=s([]),e.seqlen=0,e.state=e.T,e.p=0;e.p!=e.msglen;)if(A(e.iseci,e.p)){if(e.eci=A(e.msg,e.p),o[i++]=1/0,_(e.seq),o[i++]=s([e.eci]),e.seq=s(),e.p=e.p+1,o[i++]="seqlen",o[i++]=e.seqlen,e.eci<=-1810900)o[i++]=2;else{var N=e.eci<=-1000900?3:2;o[i++]=N}var F=o[--i],R=o[--i];e[o[--i]]=L(R+F)}else if(e.n=A(e.numdigits,e.p),e.n>=13||e.n==e.msglen&&e.n>=8){o[i++]=1/0,_(e.seq),o[i++]=e.nl,o[i++]=1/0,_(b(e.msg,e.p,e.n));var P=s();o[i++]=P,e.seq=s(),e.state=e.N,e.p=L(e.p+e.n),e.seqlen=L(e.seqlen+1+e.n)}else if(e.t=A(e.numtext,e.p),e.t>=5){o[i++]=1/0,_(e.seq),e.state!=e.T&&(o[i++]=e.tl),o[i++]=1/0,_(b(e.msg,e.p,e.t));var $=s();o[i++]=$,e.seq=s(),e.state=e.T,e.p=L(e.p+e.t),e.seqlen=L(L(e.seqlen+1)+e.t)}else if(e.b=A(e.numbytes,e.p),1==e.b&&e.state==e.T)o[i++]=1/0,_(e.seq),o[i++]=e.bs,o[i++]=s([A(e.msg,e.p)]),e.seq=s(),e.p=L(e.p+e.b),e.seqlen=L(e.seqlen+2);else{o[i++]=1/0,_(e.seq);var V=e.b%6!=0?e.bl:e.bl6;o[i++]=V,o[i++]=1/0,_(b(e.msg,e.p,e.b));var q=s();o[i++]=q,e.seq=s(),e.state=e.B,e.p=L(e.p+e.b),e.seqlen=L(L(e.seqlen+1)+e.b)}for(e.enca=function(){var t=A(A(e.charvals,e.A),o[--i]);o[i++]=t},e.encl=function(){var t=A(A(e.charvals,e.L),o[--i]);o[i++]=t},e.encm=function(){var t=A(A(e.charvals,e.M),o[--i]);o[i++]=t},e.encp=function(){var t=A(A(e.charvals,e.P),o[--i]);o[i++]=t},e.textencfuncs=s(["enca","encl","encm","encp"]),e.addtotext=function(){v(e.text,e.l,o[--i]),e.l=e.l+1},e.enct=function(){e.in=o[--i],e.curlen=s([e.e,e.e,e.e,e.e]),v(e.curlen,e.submode,0),e.curseq=s([s([]),s([]),s([]),s([])]),k(e.in,(function(){for(e.char=o[--i];;){e.imp=!1;for(var t=s([e.A,e.L,e.M,e.P]),n=0,r=t.length;n<r;n++){e.x=A(t,n);for(var a=s([e.A,e.L,e.M,e.P]),u=0,c=a.length;u<c;u++)if(e.y=A(a,u),e.cost=L(A(e.curlen,e.x)+A(A(e.latlen,e.x),e.y)),e.cost<A(e.curlen,e.y)){v(e.curlen,e.y,e.cost),o[i++]=e.curseq,o[i++]=e.y,o[i++]=1/0,_(A(e.curseq,e.x)),_(A(A(e.latseq,e.x),e.y));var l=s(),h=o[--i];v(o[--i],h,l),e.imp=!0}}if(!e.imp)break}e.nxtlen=s([e.e,e.e,e.e,e.e]),e.nxtseq=s(4);for(var f=s([e.A,e.L,e.M,e.P]),d=0,p=f.length;d<p;d++)for(e.x=A(f,d);;){if(!(void 0!==A(A(e.charvals,e.x),e.char)))break;if(e.cost=L(A(e.curlen,e.x)+1),e.cost<A(e.nxtlen,e.x)){v(e.nxtlen,e.x,e.cost),o[i++]=e.nxtseq,o[i++]=e.x,o[i++]=1/0,_(A(e.curseq,e.x)),o[i++]=e.char;var m=s(),g=o[--i];v(o[--i],g,m)}for(var b=s([e.A,e.L,e.M,e.P]),y=0,w=b.length;y<w;y++)if(e.y=A(b,y),D(e.x,e.y)&&(e.cost=L(L(A(e.curlen,e.y)+A(A(e.shftlen,e.y),e.x))+1),e.cost<A(e.nxtlen,e.y))){v(e.nxtlen,e.y,e.cost),o[i++]=e.nxtseq,o[i++]=e.y,o[i++]=1/0,_(A(e.curseq,e.y));var x=e.x==e.A?e.as:e.ps;o[i++]=x,o[i++]=e.char;var C=s(),k=o[--i];v(o[--i],k,C)}break}e.curlen=e.nxtlen,e.curseq=e.nxtseq})),e.minseq=e.e;for(var t=s([e.A,e.L,e.M,e.P]),n=0,r=t.length;n<r;n++)e.k=A(t,n),A(e.curlen,e.k)<e.minseq&&(e.minseq=A(e.curlen,e.k),e.txtseq=A(e.curseq,e.k));for(e.text=s(e.minseq),e.k=0,e.l=0;!(e.k>=e.txtseq.length)&&(e.char=A(e.txtseq,e.k),o[i++]=e.char,!0!==e[A(e.textencfuncs,e.submode)]());)e.addtotext(),e.k=e.k+1,e.char!=e.as&&e.char!=e.ps||(o[i++]=A(e.txtseq,e.k),e.char==e.as?e.enca():e.encp(),e.addtotext(),e.k=e.k+1),e.char==e.al&&(e.submode=e.A),e.char==e.ll&&(e.submode=e.L),e.char==e.ml&&(e.submode=e.M),e.char==e.pl&&(e.submode=e.P);if(e.text.length%2==1){if(e.submode==e.P){o[i++]="pad",o[i++]=e.al,e.encp();var a=o[--i];e[o[--i]]=a,e.submode=e.A}else{e.nextecitext=!1;for(var u=e.i+1,c=e.seq.length-1;u<=c;u+=1){if(e.ti=u,D(w(A(e.seq,e.ti)),"arraytype")){e.nextecitext=!1;break}if(A(A(e.seq,e.ti),0)>-1e6)break;e.nextecitext=!0}if(e.nextecitext)if(e.submode==e.A){if(void 0!==A(A(e.charvals,e.L),A(A(e.seq,e.ti),0))){o[i++]="pad",o[i++]=e.ll,e.enca();var l=o[--i];e[o[--i]]=l,e.submode=e.L}else{o[i++]="pad",o[i++]=e.ml,e.enca();var h=o[--i];e[o[--i]]=h,e.submode=e.M}}else if(e.submode==e.M){if(void 0!==A(A(e.charvals,e.L),A(A(e.seq,e.ti),0))){o[i++]="pad",o[i++]=e.ll,e.encm();var f=o[--i];e[o[--i]]=f,e.submode=e.L}else{if(void 0!==A(A(e.charvals,e.P),A(A(e.seq,e.ti),0))){o[i++]="pad",o[i++]=e.pl,e.encm();var d=o[--i];e[o[--i]]=d,e.submode=e.P}else{o[i++]="pad",o[i++]=e.al,e.encm();var p=o[--i];e[o[--i]]=p,e.submode=e.A}}}else{o[i++]="pad",o[i++]=e.ml,e.encl();var m=o[--i];e[o[--i]]=m,e.submode=e.M}else{if(o[i++]="pad",o[i++]=e.ps,!0===e[A(e.textencfuncs,e.submode)]())return!0;var g=o[--i];e[o[--i]]=g}}o[i++]=1/0,_(e.text),o[i++]=e.pad,e.text=s()}e.out=s(~~(e.text.length/2));for(var b=0,y=e.out.length-1;b<=y;b+=1)e.k=b,v(e.out,e.k,L(30*A(e.text,2*e.k)+A(e.text,2*e.k+1)));o[i++]=e.out},e.encn=function(){e.in=o[--i],e.out=s([]);for(var t=0,n=e.in.length-1;t<=n;t+=44){e.k=t,o[i++]=1/0;var r=e.in.length-e.k;o[i++]=1,o[i++]=e.in,o[i++]=e.k,o[i++]=r,r>44&&(i--,o[i++]=44);for(var a=o[--i],u=o[--i],c=b(o[--i],u,a),l=0,h=c.length;l<h;l++)o[i++]=L(A(c,l)-48);for(e.gmod=s(),e.cwn=s([]);;){for(e.dv=900,e.gmul=s([]),e.val=0;0!=e.gmod.length;)e.val=L(10*e.val+A(e.gmod,0)),e.gmod=b(e.gmod,1,e.gmod.length-1),e.val<e.dv?0!=e.gmul.length&&(o[i++]=1/0,_(e.gmul),o[i++]=0,e.gmul=s()):(o[i++]=1/0,_(e.gmul),o[i++]=~~(e.val/e.dv),e.gmul=s()),e.val=e.val%e.dv;if(e.dv=e.val,o[i++]=1/0,o[i++]=e.dv,_(e.cwn),e.cwn=s(),e.gmod=e.gmul,0==e.gmul.length)break}o[i++]=1/0,_(e.out),_(e.cwn),e.out=s()}o[i++]=e.out},e.ence=function(){var e=L(-A(o[--i],0)-1e6);if(o[i++]=e,e<=899){var t=o[--i];o[i++]=927,o[i++]=t,O(s(2))}else{var n=o[--i];if(o[i++]=n,n<=810899){var r=o[--i];o[i++]=926,o[i++]=~~(r/900)-1,o[i++]=r%900,O(s(3))}else{var a=o[--i];if(o[i++]=a,a<=811799){var u=o[--i];o[i++]=925,o[i++]=L(u-810900),O(s(2))}else o[i++]="bwipp.pdf417badECI#16517",o[i++]="PDF417 supports ECIs 000000 to 811799",z()}}},e.encfuncs=s(["enct","encn","encb"]),e.addtocws=function(){var t=o[--i];y(e.datcws,e.j,t),e.j=t.length+e.j},e.state=e.T,e.submode=e.A,e.datcws=s(e.seqlen),e.i=0,e.j=0;!(e.i>=e.seq.length);){if(e.chars=A(e.seq,e.i),T(w(e.chars),"arraytype"))if(A(e.chars,0)<=-1e6)o[i++]=e.chars,e.ence(),e.addtocws();else{if(o[i++]=e.chars,!0===e[A(e.encfuncs,e.state)]())break;e.addtocws()}else o[i++]=s([A(e.latchcws,e.chars)]),e.addtocws(),e.chars==e.tl&&(e.state=e.T,e.submode=e.A),e.chars==e.nl&&(e.state=e.N),e.chars!=e.bl&&e.chars!=e.bl6||(e.state=e.B),e.chars==e.bs&&(e.i=e.i+1,o[i++]=A(e.seq,e.i),e.encb(),e.addtocws());e.i=e.i+1}e.datcws=b(e.datcws,0,e.j)}e.m=e.datcws.length,-1==e.eclevel&&(e.m<=40&&(e.eclevel=2),e.m>=41&&e.m<=160&&(e.eclevel=3),e.m>=161&&e.m<=320&&(e.eclevel=4),e.m>=321&&(e.eclevel=5)),e.maxeclevel=~~(Math.log(927-e.m)/Math.log(2))-1,e.eclevel>e.maxeclevel&&(e.eclevel=e.maxeclevel),e.k=~~Math.pow(2,e.eclevel+1),0==e.columns&&(e.columns=~~Math.round(Math.sqrt((e.m+e.k)/3))),o[i++]="c",e.columns>=1?o[i++]=e.columns:o[i++]=1;var G=o[--i];e[o[--i]]=G,e.r=~~Math.ceil((e.m+e.k+1)/e.columns),e.r<e.rows&&e.rows<=90&&(e.r=e.rows),e.r<3&&(e.r=3),e.r>90&&(o[i++]="bwipp.pdf417insufficientCapacity#16580",o[i++]="Insufficient capacity in the symbol",z());var W=e.c,K=e.r,Y=e.m,X=8,J=~~(Math.log(L(L(W*K-1)-Y))/Math.log(2))-1;if(~~(Math.log(L(L(W*K-1)-Y))/Math.log(2))-1>8){var Z=X;X=J,J=Z}e.maxeclevel=J,e.maxeclevel>e.eclevel&&(e.eclevel=e.maxeclevel,e.k=~~Math.pow(2,e.eclevel+1)),e.n=L(e.c*e.r-e.k),e.cws=s(L(e.c*e.r+1)),v(e.cws,0,e.n),y(e.cws,1,e.datcws),o[i++]=e.cws,o[i++]=e.m+1,o[i++]=1/0;for(var ee=0,te=L(L(e.n-e.m)-1);ee<te;ee++)o[i++]=900;var ne=s(),re=o[--i];y(o[--i],re,ne),o[i++]=e.cws,o[i++]=e.n,o[i++]=1/0;for(var ie=0,oe=e.k;ie<oe;ie++)o[i++]=0;o[i++]=0;var ae=s(),se=o[--i];y(o[--i],se,ae),o[i++]=1/0,o[i++]=1;for(var ue=0;ue<928;ue++){var ce=o[--i];o[i++]=ce,o[i++]=3*ce%929}e.rsalog=s(),e.rslog=s(929);for(var le=1;le<=928;le+=1)v(e.rslog,A(e.rsalog,le),le);e.rsprod=function(){var t=o[--i],n=o[--i];if(o[i++]=n,o[i++]=t,0!=t&&0!=n){var r=A(e.rslog,o[--i]),a=A(e.rsalog,L(r+A(e.rslog,o[--i]))%928);o[i++]=a}else i-=2,o[i++]=0},o[i++]=1/0,o[i++]=1;for(var he=0,fe=e.k;he<fe;he++)o[i++]=0;e.coeffs=s();for(var de=1,pe=e.k;de<=pe;de+=1){e.i=de,v(e.coeffs,e.i,A(e.coeffs,e.i-1));for(var me=e.i-1;me>=1;me-=1){e.j=me,o[i++]=e.coeffs,o[i++]=e.j,o[i++]=A(e.coeffs,e.j-1),o[i++]=A(e.coeffs,e.j),o[i++]=A(e.rsalog,e.i),e.rsprod();var ge=o[--i],Ae=o[--i],ve=o[--i];v(o[--i],ve,L(Ae+ge)%929)}o[i++]=e.coeffs,o[i++]=0,o[i++]=A(e.coeffs,0),o[i++]=A(e.rsalog,e.i),e.rsprod();var be=o[--i],ye=o[--i];v(o[--i],ye,be)}e.coeffs=b(e.coeffs,0,e.coeffs.length-1);for(var we=e.coeffs.length-1;we>=0;we-=2){var xe=e.coeffs;v(xe,we,L(929-A(xe,we)))}for(var Ce=0,ke=L(e.n-1);Ce<=ke;Ce+=1){e.t=L(A(e.cws,Ce)+A(e.cws,e.n))%929;for(var Ee=0,Se=e.k-1;Ee<=Se;Ee+=1)e.j=Ee,v(e.cws,L(e.n+e.j),L(A(e.cws,L(L(e.n+e.j)+1))+L(929-e.t*A(e.coeffs,e.k-e.j-1)%929))%929)}for(var _e=e.n,Oe=L(e.n+e.k);_e<=Oe;_e+=1)v(e.cws,_e,L(929-A(e.cws,_e))%929);e.cws=b(e.cws,0,e.cws.length-1),void 0!==A(e.options,"debugcws")&&(o[i++]="bwipp.debugcws#16639",o[i++]=e.cws,z()),Ze.$ctx._16883||function(){var t=Object.create(e);for(var n in t.clusters=s([s([120256,125680,128380,120032,125560,128318,108736,119920,108640,86080,108592,86048,110016,120560,125820,109792,120440,125758,88256,109680,88160,89536,110320,120700,89312,110200,120638,89200,110140,89840,110460,89720,110398,89980,128506,119520,125304,128190,107712,119408,125244,107616,119352,84032,107568,119324,84e3,107544,83984,108256,119672,125374,85184,108144,119612,85088,108088,119582,85040,108060,85728,108408,119742,85616,108348,85560,108318,85880,108478,85820,85790,107200,119152,125116,107104,119096,125086,83008,107056,119068,82976,107032,82960,82952,83648,107376,119228,83552,107320,119198,83504,107292,83480,83468,83824,107452,83768,107422,83740,83900,106848,118968,125022,82496,106800,118940,82464,106776,118926,82448,106764,82440,106758,82784,106936,119006,82736,106908,82712,106894,82700,82694,106974,82830,82240,106672,118876,82208,106648,118862,82192,106636,82184,106630,82180,82352,82328,82316,82080,118830,106572,106566,82050,117472,124280,127678,103616,117360,124220,103520,117304,124190,75840,103472,75808,104160,117624,124350,76992,104048,117564,76896,103992,76848,76824,77536,104312,117694,77424,104252,77368,77340,77688,104382,77628,77758,121536,126320,128700,121440,126264,128670,111680,121392,126236,111648,121368,126222,111632,121356,103104,117104,124092,112320,103008,117048,124062,112224,121656,126366,93248,74784,102936,117006,93216,112152,93200,75456,103280,117180,93888,75360,103224,117150,93792,112440,121758,93744,75288,93720,75632,103356,94064,75576,103326,94008,112542,93980,75708,94140,75678,94110,121184,126136,128606,111168,121136,126108,111136,121112,126094,111120,121100,111112,111108,102752,116920,123998,111456,102704,116892,91712,74272,121244,116878,91680,74256,102668,91664,111372,102662,74244,74592,102840,116958,92e3,74544,102812,91952,111516,102798,91928,74508,74502,74680,102878,92088,74652,92060,74638,92046,92126,110912,121008,126044,110880,120984,126030,110864,120972,110856,120966,110852,110850,74048,102576,116828,90944,74016,102552,116814,90912,111e3,121038,90896,73992,102534,90888,110982,90884,74160,102620,91056,74136,102606,91032,111054,91020,74118,91014,91100,91086,110752,120920,125998,110736,120908,110728,120902,110724,110722,73888,102488,116782,90528,73872,102476,90512,110796,102470,90504,73860,90500,73858,73944,90584,90572,90566,120876,120870,110658,102444,73800,90312,90308,90306,101056,116080,123580,100960,116024,70720,100912,115996,70688,100888,70672,70664,71360,101232,116156,71264,101176,116126,71216,101148,71192,71180,71536,101308,71480,101278,71452,71612,71582,118112,124600,127838,105024,118064,124572,104992,118040,124558,104976,118028,104968,118022,100704,115896,123486,105312,100656,115868,79424,70176,118172,115854,79392,105240,100620,79376,70152,79368,70496,100792,115934,79712,70448,118238,79664,105372,100750,79640,70412,79628,70584,100830,79800,70556,79772,70542,70622,79838,122176,126640,128860,122144,126616,128846,122128,126604,122120,126598,122116,104768,117936,124508,113472,104736,126684,124494,113440,122264,126670,113424,104712,117894,113416,122246,104706,69952,100528,115804,78656,69920,100504,115790,96064,78624,104856,117966,96032,113560,122318,100486,96016,78600,104838,96008,69890,70064,100572,78768,70040,100558,96176,78744,104910,96152,113614,70022,78726,70108,78812,70094,96220,78798,122016,126552,128814,122e3,126540,121992,126534,121988,121986,104608,117848,124462,113056,104592,126574,113040,122060,117830,113032,104580,113028,104578,113026,69792,100440,115758,78240,69776,100428,95136,78224,104652,100422,95120,113100,69764,95112,78212,69762,78210,69848,100462,78296,69836,95192,78284,69830,95180,78278,69870,95214,121936,126508,121928,126502,121924,121922,104528,117804,112848,104520,117798,112840,121958,112836,104514,112834,69712,100396,78032,69704,100390,94672,78024,104550,94664,112870,69698,94660,78018,94658,78060,94700,94694,126486,121890,117782,104484,104482,69672,77928,94440,69666,77922,99680,68160,99632,68128,99608,115342,68112,99596,68104,99590,68448,99768,115422,68400,99740,68376,99726,68364,68358,68536,99806,68508,68494,68574,101696,116400,123740,101664,116376,101648,116364,101640,116358,101636,67904,99504,115292,72512,67872,116444,115278,72480,101784,116430,72464,67848,99462,72456,101766,67842,68016,99548,72624,67992,99534,72600,101838,72588,67974,68060,72668,68046,72654,118432,124760,127918,118416,124748,118408,124742,118404,118402,101536,116312,105888,101520,116300,105872,118476,116294,105864,101508,105860,101506,105858,67744,99416,72096,67728,116334,80800,72080,101580,99398,80784,105932,67716,80776,72068,67714,72066,67800,99438,72152,67788,80856,72140,67782,80844,72134,67822,72174,80878,126800,128940,126792,128934,126788,126786,118352,124716,122576,126828,124710,122568,126822,122564,118338,122562,101456,116268,105680,101448,116262,114128,105672,118374,114120,122598,101442,114116,105666,114114,67664,99372,71888,67656,99366,80336,71880,101478,97232,80328,105702,67650,97224,114150,71874,97220,67692,71916,67686,80364,71910,97260,80358,97254,126760,128918,126756,126754,118312,124694,122472,126774,122468,118306,122466,101416,116246,105576,101412,113896,105572,101410,113892,105570,113890,67624,99350,71784,101430,80104,71780,67618,96744,80100,71778,96740,80098,96738,71798,96758,126738,122420,122418,105524,113780,113778,71732,79988,96500,96498,66880,66848,98968,66832,66824,66820,66992,66968,66956,66950,67036,67022,1e5,99984,115532,99976,115526,99972,99970,66720,98904,69024,100056,98892,69008,100044,69e3,100038,68996,66690,68994,66776,98926,69080,100078,69068,66758,69062,66798,69102,116560,116552,116548,116546,99920,102096,116588,115494,102088,116582,102084,99906,102082,66640,68816,66632,98854,73168,68808,66628,73160,68804,66626,73156,68802,66668,68844,66662,73196,68838,73190,124840,124836,124834,116520,118632,124854,118628,116514,118626,99880,115478,101992,116534,106216,101988,99874,106212,101986,106210,66600,98838,68712,99894,72936,68708,66594,81384,72932,68706,81380,72930,66614,68726,72950,81398,128980,128978,124820,126900,124818,126898,116500,118580,116498,122740,118578,122738,99860,101940,99858,106100,101938,114420]),s([128352,129720,125504,128304,129692,125472,128280,129678,125456,128268,125448,128262,125444,125792,128440,129758,120384,125744,128412,120352,125720,128398,120336,125708,120328,125702,120324,120672,125880,128478,110144,120624,125852,110112,120600,125838,110096,120588,110088,120582,110084,110432,120760,125918,89664,110384,120732,89632,110360,120718,89616,110348,89608,110342,89952,110520,120798,89904,110492,89880,110478,89868,90040,110558,90012,89998,125248,128176,129628,125216,128152,129614,125200,128140,125192,128134,125188,125186,119616,125360,128220,119584,125336,128206,119568,125324,119560,125318,119556,119554,108352,119728,125404,108320,119704,125390,108304,119692,108296,119686,108292,108290,85824,108464,119772,85792,108440,119758,85776,108428,85768,108422,85764,85936,108508,85912,108494,85900,85894,85980,85966,125088,128088,129582,125072,128076,125064,128070,125060,125058,119200,125144,128110,119184,125132,119176,125126,119172,119170,107424,119256,125166,107408,119244,107400,119238,107396,107394,83872,107480,119278,83856,107468,83848,107462,83844,83842,83928,107502,83916,83910,83950,125008,128044,125e3,128038,124996,124994,118992,125036,118984,125030,118980,118978,106960,119020,106952,119014,106948,106946,82896,106988,82888,106982,82884,82882,82924,82918,124968,128022,124964,124962,118888,124982,118884,118882,106728,118902,106724,106722,82408,106742,82404,82402,124948,124946,118836,118834,106612,106610,124224,127664,129372,124192,127640,129358,124176,127628,124168,127622,124164,124162,117568,124336,127708,117536,124312,127694,117520,124300,117512,124294,117508,117506,104256,117680,124380,104224,117656,124366,104208,117644,104200,117638,104196,104194,77632,104368,117724,77600,104344,117710,77584,104332,77576,104326,77572,77744,104412,77720,104398,77708,77702,77788,77774,128672,129880,93168,128656,129868,92664,128648,129862,92412,128644,128642,124064,127576,129326,126368,124048,129902,126352,128716,127558,126344,124036,126340,124034,126338,117152,124120,127598,121760,117136,124108,121744,126412,124102,121736,117124,121732,117122,121730,103328,117208,124142,112544,103312,117196,112528,121804,117190,112520,103300,112516,103298,112514,75680,103384,117230,94112,75664,103372,94096,112588,103366,94088,75652,94084,75650,75736,103406,94168,75724,94156,75718,94150,75758,128592,129836,91640,128584,129830,91388,128580,91262,128578,123984,127532,126160,123976,127526,126152,128614,126148,123970,126146,116944,124012,121296,116936,124006,121288,126182,121284,116930,121282,102864,116972,111568,102856,116966,111560,121318,111556,102850,111554,74704,102892,92112,74696,102886,92104,111590,92100,74690,92098,74732,92140,74726,92134,128552,129814,90876,128548,90750,128546,123944,127510,126056,128566,126052,123938,126050,116840,123958,121064,116836,121060,116834,121058,102632,116854,111080,121078,111076,102626,111074,74216,102646,91112,74212,91108,74210,91106,74230,91126,128532,90494,128530,123924,126004,123922,126002,116788,120948,116786,120946,102516,110836,102514,110834,73972,90612,73970,90610,128522,123914,125978,116762,120890,102458,110714,123552,127320,129198,123536,127308,123528,127302,123524,123522,116128,123608,127342,116112,123596,116104,123590,116100,116098,101280,116184,123630,101264,116172,101256,116166,101252,101250,71584,101336,116206,71568,101324,71560,101318,71556,71554,71640,101358,71628,71622,71662,127824,129452,79352,127816,129446,79100,127812,78974,127810,123472,127276,124624,123464,127270,124616,127846,124612,123458,124610,115920,123500,118224,115912,123494,118216,124646,118212,115906,118210,100816,115948,105424,100808,115942,105416,118246,105412,100802,105410,70608,100844,79824,70600,100838,79816,105446,79812,70594,79810,70636,79852,70630,79846,129960,95728,113404,129956,95480,113278,129954,95356,95294,127784,129430,78588,128872,129974,95996,78462,128868,127778,95870,128866,123432,127254,124520,123428,126696,128886,123426,126692,124514,126690,115816,123446,117992,115812,122344,117988,115810,122340,117986,122338,100584,115830,104936,100580,113640,104932,100578,113636,104930,113634,70120,100598,78824,70116,96232,78820,70114,96228,78818,96226,70134,78838,129940,94968,113022,129938,94844,94782,127764,78206,128820,127762,95102,128818,123412,124468,123410,126580,124466,126578,115764,117876,115762,122100,117874,122098,100468,104692,100466,113140,104690,113138,69876,78324,69874,95220,78322,95218,129930,94588,94526,127754,128794,123402,124442,126522,115738,117818,121978,100410,104570,112890,69754,78074,94714,94398,123216,127148,123208,127142,123204,123202,115408,123244,115400,123238,115396,115394,99792,115436,99784,115430,99780,99778,68560,99820,68552,99814,68548,68546,68588,68582,127400,129238,72444,127396,72318,127394,123176,127126,123752,123172,123748,123170,123746,115304,123190,116456,115300,116452,115298,116450,99560,115318,101864,99556,101860,99554,101858,68072,99574,72680,68068,72676,68066,72674,68086,72694,129492,80632,105854,129490,80508,80446,127380,72062,127924,127378,80766,127922,123156,123700,123154,124788,123698,124786,115252,116340,115250,118516,116338,118514,99444,101620,99442,105972,101618,105970,67828,72180,67826,80884,72178,80882,97008,114044,96888,113982,96828,96798,129482,80252,130010,97148,80190,97086,127370,127898,128954,123146,123674,124730,126842,115226,116282,118394,122618,99386,101498,105722,114170,67706,71930,80378,96632,113854,96572,96542,80062,96702,96444,96414,96350,123048,123044,123042,115048,123062,115044,115042,99048,115062,99044,99042,67048,99062,67044,67042,67062,127188,68990,127186,123028,123316,123026,123314,114996,115572,114994,115570,98932,100084,98930,100082,66804,69108,66802,69106,129258,73084,73022,127178,127450,123018,123290,123834,114970,115514,116602,98874,99962,102138,66682,68858,73210,81272,106174,81212,81182,72894,81342,97648,114364,97592,114334,97564,97550,81084,97724,81054,97694,97464,114270,97436,97422,80990,97502,97372,97358,97326,114868,114866,98676,98674,66292,66290,123098,114842,115130,98618,99194,66170,67322,69310,73404,73374,81592,106334,81564,81550,73310,81630,97968,114524,97944,114510,97932,97926,81500,98012,81486,97998,97880,114478,97868,97862,81454,97902,97836,97830,69470,73564,73550,81752,106414,81740,81734,73518,81774,81708,81702]),s([109536,120312,86976,109040,120060,86496,108792,119934,86256,108668,86136,129744,89056,110072,129736,88560,109820,129732,88312,109694,129730,88188,128464,129772,89592,128456,129766,89340,128452,89214,128450,125904,128492,125896,128486,125892,125890,120784,125932,120776,125926,120772,120770,110544,120812,110536,120806,110532,84928,108016,119548,84448,107768,119422,84208,107644,84088,107582,84028,129640,85488,108284,129636,85240,108158,129634,85116,85054,128232,129654,85756,128228,85630,128226,125416,128246,125412,125410,119784,125430,119780,119778,108520,119798,108516,108514,83424,107256,119166,83184,107132,83064,107070,83004,82974,129588,83704,107390,129586,83580,83518,128116,83838,128114,125172,125170,119284,119282,107508,107506,82672,106876,82552,106814,82492,82462,129562,82812,82750,128058,125050,119034,82296,106686,82236,82206,82366,82108,82078,76736,103920,117500,76256,103672,117374,76016,103548,75896,103486,75836,129384,77296,104188,129380,77048,104062,129378,76924,76862,127720,129398,77564,127716,77438,127714,124392,127734,124388,124386,117736,124406,117732,117730,104424,117750,104420,104418,112096,121592,126334,92608,111856,121468,92384,111736,121406,92272,111676,92216,111646,92188,75232,103160,117118,93664,74992,103036,93424,112252,102974,93304,74812,93244,74782,93214,129332,75512,103294,129908,129330,93944,75388,129906,93820,75326,93758,127604,75646,128756,127602,94078,128754,124148,126452,124146,126450,117236,121844,117234,121842,103412,103410,91584,111344,121212,91360,111224,121150,91248,111164,91192,111134,91164,91150,74480,102780,91888,74360,102718,91768,111422,91708,74270,91678,129306,74620,129850,92028,74558,91966,127546,128634,124026,126202,116986,121338,102906,90848,110968,121022,90736,110908,90680,110878,90652,90638,74104,102590,91e3,74044,90940,74014,90910,74174,91070,90480,110780,90424,110750,90396,90382,73916,90556,73886,90526,90296,110686,90268,90254,73822,90334,90204,90190,71136,101112,116094,70896,100988,70776,100926,70716,70686,129204,71416,101246,129202,71292,71230,127348,71550,127346,123636,123634,116212,116210,101364,101362,79296,105200,118140,79072,105080,118078,78960,105020,78904,104990,78876,78862,70384,100732,79600,70264,100670,79480,105278,79420,70174,79390,129178,70524,129466,79740,70462,79678,127290,127866,123514,124666,115962,118266,100858,113376,122232,126654,95424,113264,122172,95328,113208,122142,95280,113180,95256,113166,95244,78560,104824,117950,95968,78448,104764,95856,113468,104734,95800,78364,95772,78350,95758,70008,100542,78712,69948,96120,78652,69918,96060,78622,96030,70078,78782,96190,94912,113008,122044,94816,112952,122014,94768,112924,94744,112910,94732,94726,78192,104636,95088,78136,104606,95032,113054,95004,78094,94990,69820,78268,69790,95164,78238,95134,94560,112824,121950,94512,112796,94488,112782,94476,94470,78008,104542,94648,77980,94620,77966,94606,69726,78046,94686,94384,112732,94360,112718,94348,94342,77916,94428,77902,94414,94296,112686,94284,94278,77870,94318,94252,94246,68336,99708,68216,99646,68156,68126,68476,68414,127162,123258,115450,99834,72416,101752,116414,72304,101692,72248,101662,72220,72206,67960,99518,72568,67900,72508,67870,72478,68030,72638,80576,105840,118460,80480,105784,118430,80432,105756,80408,105742,80396,80390,72048,101564,80752,71992,101534,80696,71964,80668,71950,80654,67772,72124,67742,80828,72094,80798,114016,122552,126814,96832,113968,122524,96800,113944,122510,96784,113932,96776,113926,96772,80224,105656,118366,97120,80176,105628,97072,114076,105614,97048,80140,97036,80134,97030,71864,101470,80312,71836,97208,80284,71822,97180,80270,97166,67678,71902,80350,97246,96576,113840,122460,96544,113816,122446,96528,113804,96520,113798,96516,96514,80048,105564,96688,80024,105550,96664,113870,96652,80006,96646,71772,80092,71758,96732,80078,96718,96416,113752,122414,96400,113740,96392,113734,96388,96386,79960,105518,96472,79948,96460,79942,96454,71726,79982,96494,96336,113708,96328,113702,96324,96322,79916,96364,79910,96358,96296,113686,96292,96290,79894,96310,66936,99006,66876,66846,67006,68976,100028,68920,99998,68892,68878,66748,69052,66718,69022,73056,102072,116574,73008,102044,72984,102030,72972,72966,68792,99934,73144,68764,73116,68750,73102,66654,68830,73182,81216,106160,118620,81184,106136,118606,81168,106124,81160,106118,81156,81154,72880,101980,81328,72856,101966,81304,106190,81292,72838,81286,68700,72924,68686,81372,72910,81358,114336,122712,126894,114320,122700,114312,122694,114308,114306,81056,106072,118574,97696,81040,106060,97680,114380,106054,97672,81028,97668,81026,97666,72792,101934,81112,72780,97752,81100,72774,97740,81094,97734,68654,72814,81134,97774,114256,122668,114248,122662,114244,114242,80976,106028,97488,80968,106022,97480,114278,97476,80962,97474,72748,81004,72742,97516,80998,97510,114216,122646,114212,114210,80936,106006,97384,80932,97380,80930,97378,72726,80950,97398,114196,114194,80916,97332,80914,97330,66236,66206,67256,99166,67228,67214,66142,67294,69296,100188,69272,100174,69260,69254,67164,69340,67150,69326,73376,102232,116654,73360,102220,73352,102214,73348,73346,69208,100142,73432,102254,73420,69190,73414,67118,69230,73454,106320,118700,106312,118694,106308,106306,73296,102188,81616,106348,102182,81608,73284,81604,73282,81602,69164,73324,69158,81644,73318,81638,122792,126934,122788,122786,106280,118678,114536,106276,114532,106274,114530,73256,102166,81512,73252,98024,81508,73250,98020,81506,98018,69142,73270,81526,98038,122772,122770,106260,114484,106258,114482,73236,81460,73234,97908,81458,97906,122762,106250,114458,73226,81434,97850,66396,66382,67416,99246,67404,67398,66350,67438,69456,100268,69448,100262,69444,69442,67372,69484,67366,69478,102312,116694,102308,102306,69416,100246,73576,102326,73572,69410,73570,67350,69430,73590,118740,118738,102292,106420,102290,106418,69396,73524,69394,81780,73522,81778,118730,102282,106394,69386,73498,81722,66476,66470,67496,99286,67492,67490,66454,67510,100308,100306,67476,69556,67474,69554,116714])]),t)t.hasOwnProperty(n)&&(Ze.$ctx[n]=t[n]);Ze.$ctx._16883=1}(),e.cwtobits=function(){var t=A(e.clusters,o[--i]);e.v=A(t,o[--i]),o[i++]=1/0;for(var n=0;n<17;n++)o[i++]=0;for(var r=m(c(17),e.v,2),a=0,u=r.length;a<u;a++)o[i++]=A(r,a)-48;var l=s();o[i++]=b(l,l.length-17,17)},e.compact?e.rwid=L(L(L(17*e.c+17)+17)+1):e.rwid=L(L(L(L(17*e.c+17)+17)+17)+18),e.pixs=s(e.rwid*e.r);for(var Te=0,De=e.r-1;Te<=De;Te+=1){e.i=Te,e.i%3==0&&(e.lcw=30*~~(e.i/3)+~~((e.r-1)/3),e.rcw=L(L(30*~~(e.i/3)+e.c)-1)),e.i%3==1&&(e.lcw=30*~~(e.i/3)+3*e.eclevel+(e.r-1)%3,e.rcw=30*~~(e.i/3)+~~((e.r-1)/3)),e.i%3==2&&(e.lcw=L(L(30*~~(e.i/3)+e.c)-1),e.rcw=30*~~(e.i/3)+3*e.eclevel+(e.r-1)%3),o[i++]=e.pixs,o[i++]=e.rwid*e.i,o[i++]=1/0,o[i++]=1,o[i++]=1,o[i++]=1,o[i++]=1,o[i++]=1,o[i++]=1,o[i++]=1,o[i++]=1,o[i++]=0,o[i++]=1,o[i++]=0,o[i++]=1,o[i++]=0,o[i++]=1,o[i++]=0,o[i++]=0,o[i++]=0,o[i++]=e.lcw,o[i++]=e.i%3,e.cwtobits(),k(o[--i]);for(var Be=b(e.cws,e.c*e.i,e.c),Ie=0,Me=Be.length;Ie<Me;Ie++)o[i++]=A(Be,Ie),o[i++]=e.i%3,e.cwtobits(),k(o[--i]);e.compact||(o[i++]=e.rcw,o[i++]=e.i%3,e.cwtobits(),k(o[--i]),o[i++]=1,o[i++]=1,o[i++]=1,o[i++]=1,o[i++]=1,o[i++]=1,o[i++]=1,o[i++]=0,o[i++]=1,o[i++]=0,o[i++]=0,o[i++]=0,o[i++]=1,o[i++]=0,o[i++]=1,o[i++]=0,o[i++]=0),o[i++]=1;var je=s(),Ne=o[--i];y(o[--i],Ne,je)}var Fe=new Map([["ren",Q],["pixs",e.pixs],["pixx",e.rwid],["pixy",e.r],["height",e.r/72*e.rowmult],["width",e.rwid/72],["opt",e.options]]);o[i++]=Fe,e.dontdraw||Q()}function et(){var e=Object.create(et.$ctx||(et.$ctx={}));e.dontdraw=!1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],v(e.options,"dontdraw",!0),v(e.options,"compact",!0),o[i++]="args",o[i++]=e.barcode,o[i++]=e.options,Ze();var t=o[--i];e[o[--i]]=t,v(e.args,"opt",e.options),o[i++]=e.args,e.dontdraw||Q()}function tt(){var e=Object.create(tt.$ctx||(tt.$ctx={}));if(e.dontdraw=!1,e.version="unset",e.columns=0,e.rows=0,e.rowmult=2,e.encoding="auto",e.cca=!1,e.ccb=!1,e.raw=!1,e.parse=!1,e.parsefnc=!1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],D(e.version,"unset")&&(C(e.version,"x"),i--,e.columns=p(o[--i]),i--,e.rows=p(o[--i])),tt.$ctx._17135||function(){var t=Object.create(e);t.T=0,t.N=1,t.B=2,t.A=0,t.L=1,t.M=2,t.P=3,t.tl=-1,t.nl=-2,t.bl=-3,t.bl6=-4,t.bs=-5,t.al=-6,t.ll=-7,t.ml=-8,t.pl=-9,t.as=-10,t.ps=-11,t.charmaps=s([s(["A","a","0",";"]),s(["B","b","1","<"]),s(["C","c","2",">"]),s(["D","d","3","@"]),s(["E","e","4","["]),s(["F","f","5",92]),s(["G","g","6","]"]),s(["H","h","7","_"]),s(["I","i","8","`"]),s(["J","j","9","~"]),s(["K","k","&","!"]),s(["L","l",13,13]),s(["M","m",9,9]),s(["N","n",",",","]),s(["O","o",":",":"]),s(["P","p","#",10]),s(["Q","q","-","-"]),s(["R","r",".","."]),s(["S","s","$","$"]),s(["T","t","/","/"]),s(["U","u","+",'"']),s(["V","v","%","|"]),s(["W","w","*","*"]),s(["X","x","=",40]),s(["Y","y","^",41]),s(["Z","z",t.pl,"?"]),s([" "," "," ","{"]),s([t.ll,t.as,t.ll,"}"]),s([t.ml,t.ml,t.al,"'"]),s([t.ps,t.ps,t.ps,t.al])]),t.charvals=s([new Map,new Map,new Map,new Map]),t.alltext=new Map;for(var n=0,r=t.charmaps.length-1;n<=r;n+=1){t.i=n,t.encs=A(t.charmaps,t.i);for(var a=0;a<=3;a+=1){t.j=a;var u=A(t.encs,t.j);if(o[i++]=u,T(w(u),"stringtype")){var c=A(o[--i],0);o[i++]=c}var l=o[--i];v(A(t.charvals,t.j),l,t.i),v(t.alltext,l,-1)}}t.e=1e4;var h=s([2,0,1,2]);for(var f in t.latlen=s([s([0,1,1,2]),h,s([1,1,0,1]),s([1,2,2,0])]),t.latseq=s([s([s([]),s([t.ll]),s([t.ml]),s([t.ml,t.pl])]),s([s([t.ml,t.al]),s([]),s([t.ml]),s([t.ml,t.pl])]),s([s([t.al]),s([t.ll]),s([]),s([t.pl])]),s([s([t.al]),s([t.al,t.ll]),s([t.al,t.ml]),s([])])]),t.shftlen=s([s([t.e,t.e,t.e,1]),s([1,t.e,t.e,1]),s([t.e,t.e,t.e,1]),s([t.e,t.e,t.e,t.e])]),t)t.hasOwnProperty(f)&&(tt.$ctx[f]=t[f]);tt.$ctx._17135=1}(),e.raw&&(e.encoding="raw"),e.cca&&(e.encoding="cca"),T(e.encoding,"raw")||T(e.encoding,"cca")){for(e.datcws=s(e.barcode.length),e.i=0,e.j=0;e.i!=e.barcode.length;)e.cw=p(b(e.barcode,e.i+1,3)),v(e.datcws,e.j,e.cw),e.i=e.i+4,e.j=e.j+1;e.datcws=b(e.datcws,0,e.j)}if(e.ccb&&(e.encoding="ccb"),e.encb=function(){e.in=o[--i],e.inlen=e.in.length,e.out=s(5*~~(e.inlen/6)+e.inlen%6);for(var t=0,n=~~(e.inlen/6)-1;t<=n;t+=1){e.k=t,o[i++]=1/0,_(b(e.in,6*e.k,3)),e.msbs=s(),o[i++]=1/0,_(e.msbs);var r=o[--i],a=o[--i],u=o[--i];o[i++]=L(L(r+256*a)+65536*u);for(var c=0;c<3;c++){var l=o[--i];o[i++]=l%900,o[i++]=~~(l/900)}e.mscs=s(),o[i++]=1/0,_(b(e.in,6*e.k+3,3)),e.lsbs=s(),o[i++]=1/0,_(e.lsbs);var h=o[--i],f=o[--i],d=o[--i];o[i++]=L(L(h+256*f)+65536*d);for(var p=0;p<3;p++){var m=o[--i];o[i++]=m%900,o[i++]=~~(m/900)}e.lscs=s();var g=A(e.lscs,0),w=A(e.mscs,0);v(e.out,5*e.k+4,L(g+316*w)%900);var x=A(e.lscs,1),C=A(e.mscs,0),k=A(e.mscs,1);v(e.out,5*e.k+3,L(L(L(~~(L(g+316*w)/900)+x)+641*C)+316*k)%900);var E=A(e.lscs,2),S=A(e.mscs,0),O=A(e.mscs,1),T=A(e.mscs,2);v(e.out,5*e.k+2,L(L(L(L(~~(L(L(L(~~(L(g+316*w)/900)+x)+641*C)+316*k)/900)+E)+20*S)+641*O)+316*T)%900);var D=A(e.lscs,3),B=A(e.mscs,1),I=A(e.mscs,2);v(e.out,5*e.k+1,L(L(L(~~(L(L(L(L(~~(L(L(L(~~(L(g+316*w)/900)+x)+641*C)+316*k)/900)+E)+20*S)+641*O)+316*T)/900)+D)+20*B)+641*I)%900),v(e.out,5*e.k,L(~~(L(L(L(~~(L(L(L(L(~~(L(L(L(~~(L(g+316*w)/900)+x)+641*C)+316*k)/900)+E)+20*S)+641*O)+316*T)/900)+D)+20*B)+641*I)/900)+20*A(e.mscs,2))%900)}if(e.rem=e.inlen%6,0!=e.rem){o[i++]=e.out,o[i++]=e.out.length-e.rem,o[i++]=1/0,_(b(e.in,e.inlen-e.rem,e.rem));var M=s(),j=o[--i];y(o[--i],j,M)}o[i++]=e.out},T(e.encoding,"byte")||T(e.encoding,"ccb")){e.barlen=e.barcode.length,e.datcws=s(5*~~(e.barlen/6)+e.barlen%6+1);var t=e.barlen%6==0?924:901;v(e.datcws,0,t),o[i++]=e.datcws,o[i++]=1,o[i++]=1/0,k(e.barcode);var n=s();o[i++]=n,e.encb();var r=o[--i],a=o[--i];y(o[--i],a,r),T(e.encoding,"ccb")&&(o[i++]=1/0,o[i++]=920,_(e.datcws),e.datcws=s())}if(T(e.encoding,"auto")){var l=new Map([["parse",e.parse],["parsefnc",e.parsefnc],["eci",!0]]);e.fncvals=l,o[i++]="msg",o[i++]=e.barcode,o[i++]=e.fncvals,H();var h=o[--i];e[o[--i]]=h,e.msglen=e.msg.length,o[i++]=1/0;for(var f=0,d=e.msglen;f<d;f++)o[i++]=0;o[i++]=0,e.numdigits=s(),o[i++]=1/0;for(var g=0,x=e.msglen;g<x;g++)o[i++]=0;o[i++]=0,e.numtext=s(),o[i++]=1/0;for(var E=0,S=e.msglen;E<S;E++)o[i++]=0;o[i++]=0,e.numbytes=s(),o[i++]=1/0;for(var B=0,I=e.msglen;B<I;B++)o[i++]=0;e.iseci=s();for(var M=e.msglen-1;M>=0;M-=1){e.i=M;var j=A(e.msg,e.i);j>=48&&j<=57&&v(e.numdigits,e.i,L(A(e.numdigits,e.i+1)+1)),void 0!==A(e.alltext,A(e.msg,e.i))&&A(e.numdigits,e.i)<13&&v(e.numtext,e.i,L(A(e.numtext,e.i+1)+1)),A(e.msg,e.i)>=0&&A(e.numtext,e.i)<5&&A(e.numdigits,e.i)<13&&v(e.numbytes,e.i,L(A(e.numbytes,e.i+1)+1)),v(e.iseci,e.i,A(e.msg,e.i)<=-1e6)}for(e.numdigits=b(e.numdigits,0,e.msglen),e.numtext=b(e.numtext,0,e.msglen),e.numbytes=b(e.numbytes,0,e.msglen),e.seq=s([]),e.seqlen=0,e.state=e.B,e.p=0;e.p!=e.msglen;)if(A(e.iseci,e.p)){if(e.eci=A(e.msg,e.p),o[i++]=1/0,_(e.seq),o[i++]=s([e.eci]),e.seq=s(),e.p=e.p+1,o[i++]="seqlen",o[i++]=e.seqlen,e.eci<=-1810900)o[i++]=2;else{var N=e.eci<=-1000900?3:2;o[i++]=N}var F=o[--i],R=o[--i];e[o[--i]]=L(R+F)}else if(e.n=A(e.numdigits,e.p),e.n>=13||e.n==e.msglen&&e.n>=8){o[i++]=1/0,_(e.seq),o[i++]=e.nl,o[i++]=1/0,_(b(e.msg,e.p,e.n));var P=s();o[i++]=P,e.seq=s(),e.state=e.N,e.p=L(e.p+e.n),e.seqlen=L(e.seqlen+1+e.n)}else if(e.t=A(e.numtext,e.p),e.t>=5){o[i++]=1/0,_(e.seq),e.state!=e.T&&(o[i++]=e.tl),o[i++]=1/0,_(b(e.msg,e.p,e.t));var $=s();o[i++]=$,e.seq=s(),e.state=e.T,e.p=L(e.p+e.t),e.seqlen=L(L(e.seqlen+1)+e.t)}else if(e.b=A(e.numbytes,e.p),1==e.b&&e.state==e.T)o[i++]=1/0,_(e.seq),o[i++]=e.bs,o[i++]=s([A(e.msg,e.p)]),e.seq=s(),e.p=L(e.p+e.b),e.seqlen=L(e.seqlen+2);else{o[i++]=1/0,_(e.seq);var V=e.b%6!=0?e.bl:e.bl6;o[i++]=V,o[i++]=1/0,_(b(e.msg,e.p,e.b));var q=s();o[i++]=q,e.seq=s(),e.state=e.B,e.p=L(e.p+e.b),e.seqlen=L(L(e.seqlen+1)+e.b)}for(o[i++]=1/0,o[i++]=e.tl,o[i++]=900,o[i++]=e.bl,o[i++]=901,o[i++]=e.bl6,o[i++]=924,o[i++]=e.nl,o[i++]=902,o[i++]=e.bs,o[i++]=913,e.latchcws=u(),e.enca=function(){var t=A(A(e.charvals,e.A),o[--i]);o[i++]=t},e.encl=function(){var t=A(A(e.charvals,e.L),o[--i]);o[i++]=t},e.encm=function(){var t=A(A(e.charvals,e.M),o[--i]);o[i++]=t},e.encp=function(){var t=A(A(e.charvals,e.P),o[--i]);o[i++]=t},e.textencfuncs=s(["enca","encl","encm","encp"]),e.addtotext=function(){v(e.text,e.l,o[--i]),e.l=e.l+1},e.enct=function(){e.in=o[--i],e.curlen=s([e.e,e.e,e.e,e.e]),v(e.curlen,e.submode,0),e.curseq=s([s([]),s([]),s([]),s([])]),k(e.in,(function(){for(e.char=o[--i];;){e.imp=!1;for(var t=s([e.A,e.L,e.M,e.P]),n=0,r=t.length;n<r;n++){e.x=A(t,n);for(var a=s([e.A,e.L,e.M,e.P]),u=0,c=a.length;u<c;u++)if(e.y=A(a,u),e.cost=L(A(e.curlen,e.x)+A(A(e.latlen,e.x),e.y)),e.cost<A(e.curlen,e.y)){v(e.curlen,e.y,e.cost),o[i++]=e.curseq,o[i++]=e.y,o[i++]=1/0,_(A(e.curseq,e.x)),_(A(A(e.latseq,e.x),e.y));var l=s(),h=o[--i];v(o[--i],h,l),e.imp=!0}}if(!e.imp)break}e.nxtlen=s([e.e,e.e,e.e,e.e]),e.nxtseq=s(4);for(var f=s([e.A,e.L,e.M,e.P]),d=0,p=f.length;d<p;d++)for(e.x=A(f,d);;){if(!(void 0!==A(A(e.charvals,e.x),e.char)))break;if(e.cost=L(A(e.curlen,e.x)+1),e.cost<A(e.nxtlen,e.x)){v(e.nxtlen,e.x,e.cost),o[i++]=e.nxtseq,o[i++]=e.x,o[i++]=1/0,_(A(e.curseq,e.x)),o[i++]=e.char;var m=s(),g=o[--i];v(o[--i],g,m)}for(var b=s([e.A,e.L,e.M,e.P]),y=0,w=b.length;y<w;y++)if(e.y=A(b,y),D(e.x,e.y)&&(e.cost=L(L(A(e.curlen,e.y)+A(A(e.shftlen,e.y),e.x))+1),e.cost<A(e.nxtlen,e.y))){v(e.nxtlen,e.y,e.cost),o[i++]=e.nxtseq,o[i++]=e.y,o[i++]=1/0,_(A(e.curseq,e.y));var x=e.x==e.A?e.as:e.ps;o[i++]=x,o[i++]=e.char;var C=s(),k=o[--i];v(o[--i],k,C)}break}e.curlen=e.nxtlen,e.curseq=e.nxtseq})),e.minseq=e.e;for(var t=s([e.A,e.L,e.M,e.P]),n=0,r=t.length;n<r;n++)e.k=A(t,n),A(e.curlen,e.k)<e.minseq&&(e.minseq=A(e.curlen,e.k),e.txtseq=A(e.curseq,e.k));for(e.text=s(e.minseq),e.k=0,e.l=0;!(e.k>=e.txtseq.length)&&(e.char=A(e.txtseq,e.k),o[i++]=e.char,!0!==e[A(e.textencfuncs,e.submode)]());)e.addtotext(),e.k=e.k+1,e.char!=e.as&&e.char!=e.ps||(o[i++]=A(e.txtseq,e.k),e.char==e.as?e.enca():e.encp(),e.addtotext(),e.k=e.k+1),e.char==e.al&&(e.submode=e.A),e.char==e.ll&&(e.submode=e.L),e.char==e.ml&&(e.submode=e.M),e.char==e.pl&&(e.submode=e.P);if(e.text.length%2==1){if(e.submode==e.P){o[i++]="pad",o[i++]=e.al,e.encp();var a=o[--i];e[o[--i]]=a,e.submode=e.A}else{e.nextecitext=!1;for(var u=e.i+1,c=e.seq.length-1;u<=c;u+=1){if(e.ti=u,D(w(A(e.seq,e.ti)),"arraytype")){e.nextecitext=!1;break}if(A(A(e.seq,e.ti),0)>-1e6)break;e.nextecitext=!0}if(e.nextecitext)if(e.submode==e.A){if(void 0!==A(A(e.charvals,e.L),A(A(e.seq,e.ti),0))){o[i++]="pad",o[i++]=e.ll,e.enca();var l=o[--i];e[o[--i]]=l,e.submode=e.L}else{o[i++]="pad",o[i++]=e.ml,e.enca();var h=o[--i];e[o[--i]]=h,e.submode=e.M}}else if(e.submode==e.M){if(void 0!==A(A(e.charvals,e.L),A(A(e.seq,e.ti),0))){o[i++]="pad",o[i++]=e.ll,e.encm();var f=o[--i];e[o[--i]]=f,e.submode=e.L}else{if(void 0!==A(A(e.charvals,e.P),A(A(e.seq,e.ti),0))){o[i++]="pad",o[i++]=e.pl,e.encm();var d=o[--i];e[o[--i]]=d,e.submode=e.P}else{o[i++]="pad",o[i++]=e.al,e.encm();var p=o[--i];e[o[--i]]=p,e.submode=e.A}}}else{o[i++]="pad",o[i++]=e.ml,e.encl();var m=o[--i];e[o[--i]]=m,e.submode=e.M}else{if(o[i++]="pad",o[i++]=e.ps,!0===e[A(e.textencfuncs,e.submode)]())return!0;var g=o[--i];e[o[--i]]=g}}o[i++]=1/0,_(e.text),o[i++]=e.pad,e.text=s()}e.out=s(~~(e.text.length/2));for(var b=0,y=e.out.length-1;b<=y;b+=1)e.k=b,v(e.out,e.k,L(30*A(e.text,2*e.k)+A(e.text,2*e.k+1)));o[i++]=e.out},e.encn=function(){e.in=o[--i],e.out=s([]);for(var t=0,n=e.in.length-1;t<=n;t+=44){e.k=t,o[i++]=1/0;var r=e.in.length-e.k;o[i++]=1,o[i++]=e.in,o[i++]=e.k,o[i++]=r,r>44&&(i--,o[i++]=44);for(var a=o[--i],u=o[--i],c=b(o[--i],u,a),l=0,h=c.length;l<h;l++)o[i++]=L(A(c,l)-48);for(e.gmod=s(),e.cwn=s([]);;){for(e.dv=900,e.gmul=s([]),e.val=0;0!=e.gmod.length;)e.val=L(10*e.val+A(e.gmod,0)),e.gmod=b(e.gmod,1,e.gmod.length-1),e.val<e.dv?0!=e.gmul.length&&(o[i++]=1/0,_(e.gmul),o[i++]=0,e.gmul=s()):(o[i++]=1/0,_(e.gmul),o[i++]=~~(e.val/e.dv),e.gmul=s()),e.val=e.val%e.dv;if(e.dv=e.val,o[i++]=1/0,o[i++]=e.dv,_(e.cwn),e.cwn=s(),e.gmod=e.gmul,0==e.gmul.length)break}o[i++]=1/0,_(e.out),_(e.cwn),e.out=s()}o[i++]=e.out},e.ence=function(){var e=L(-A(o[--i],0)-1e6);if(o[i++]=e,e<=899){var t=o[--i];o[i++]=927,o[i++]=t,O(s(2))}else{var n=o[--i];if(o[i++]=n,n<=810899){var r=o[--i];o[i++]=926,o[i++]=~~(r/900)-1,o[i++]=r%900,O(s(3))}else{var a=o[--i];if(o[i++]=a,a<=811799){var u=o[--i];o[i++]=925,o[i++]=L(u-810900),O(s(2))}else o[i++]="bwipp.pdf417badECI#17518",o[i++]="PDF417 supports ECIs 000000 to 811799",z()}}},e.encfuncs=s(["enct","encn","encb"]),e.addtocws=function(){var t=o[--i];y(e.datcws,e.j,t),e.j=t.length+e.j},e.datcws=s(e.seqlen),e.i=0,e.j=0;!(e.i>=e.seq.length);){if(e.chars=A(e.seq,e.i),T(w(e.chars),"arraytype"))if(A(e.chars,0)<=-1e6)o[i++]=e.chars,e.ence(),e.addtocws();else{if(o[i++]=e.chars,!0===e[A(e.encfuncs,e.state)]())break;e.addtocws()}else o[i++]=s([A(e.latchcws,e.chars)]),e.addtocws(),e.chars==e.tl&&(e.state=e.T,e.submode=e.A),e.chars==e.nl&&(e.state=e.N),e.chars!=e.bl&&e.chars!=e.bl6||(e.state=e.B),e.chars==e.bs&&(e.i=e.i+1,o[i++]=A(e.seq,e.i),e.encb(),e.addtocws());e.i=e.i+1}e.datcws=b(e.datcws,0,e.j)}tt.$ctx._17617||function(){var t=Object.create(e);for(var n in t.ccametrics=s([s([2,5,4,39,0,19]),s([2,6,4,1,0,33]),s([2,7,5,32,0,12]),s([2,8,5,8,0,40]),s([2,9,6,14,0,46]),s([2,10,6,43,0,23]),s([2,12,7,20,0,52]),s([3,4,4,11,43,23]),s([3,5,5,1,33,13]),s([3,6,6,5,37,17]),s([3,7,7,15,47,27]),s([3,8,7,21,1,33]),s([4,3,4,40,20,52]),s([4,4,5,43,23,3]),s([4,5,6,46,26,6]),s([4,6,7,34,14,46]),s([4,7,8,29,9,41])]),t.nonccametrics=s([s([1,11,7,1,0,9]),s([1,14,7,8,0,8]),s([1,17,7,36,0,36]),s([1,20,8,19,0,19]),s([1,24,8,9,0,17]),s([1,28,8,25,0,33]),s([2,8,8,1,0,1]),s([2,11,9,1,0,9]),s([2,14,9,8,0,8]),s([2,17,10,36,0,36]),s([2,20,11,19,0,19]),s([2,23,13,9,0,17]),s([2,26,15,27,0,35]),s([3,6,12,1,1,1]),s([3,8,14,7,7,7]),s([3,10,16,15,15,15]),s([3,12,18,25,25,25]),s([3,15,21,37,37,37]),s([3,20,26,1,17,33]),s([3,26,32,1,9,17]),s([3,32,38,21,29,37]),s([3,38,44,15,31,47]),s([3,44,50,1,25,49]),s([4,4,8,47,19,43]),s([4,6,12,1,1,1]),s([4,8,14,7,7,7]),s([4,10,16,15,15,15]),s([4,12,18,25,25,25]),s([4,15,21,37,37,37]),s([4,20,26,1,17,33]),s([4,26,32,1,9,17]),s([4,32,38,21,29,37]),s([4,38,44,15,31,47]),s([4,44,50,1,25,49])]),t)t.hasOwnProperty(n)&&(tt.$ctx[n]=t[n]);tt.$ctx._17617=1}(),o[i++]="metrics",e.cca?o[i++]=e.ccametrics:o[i++]=e.nonccametrics;var G=o[--i];for(e[o[--i]]=G,e.urows=e.rows,e.ucols=e.columns,e.i=0;e.m=A(e.metrics,e.i),e.c=A(e.m,0),e.r=A(e.m,1),e.k=A(e.m,2),e.rapl=A(e.m,3),e.rapc=A(e.m,4),e.rapr=A(e.m,5),e.ncws=L(e.r*e.c-e.k),e.okay=!0,e.datcws.length>e.ncws&&(e.okay=!1),0!=e.urows&&e.urows!=e.r&&(e.okay=!1),0!=e.ucols&&e.ucols!=e.c&&(e.okay=!1),!e.okay;)e.i=e.i+1;e.m=e.datcws.length,e.n=L(e.c*e.r-e.k),e.cws=s(L(e.c*e.r+1)),y(e.cws,0,e.datcws),o[i++]=e.cws,o[i++]=e.m,o[i++]=1/0;for(var W=0,K=L(e.n-e.m);W<K;W++)o[i++]=900;var Y=s(),X=o[--i];y(o[--i],X,Y),o[i++]=e.cws,o[i++]=e.n,o[i++]=1/0;for(var J=0,Z=e.k;J<Z;J++)o[i++]=0;o[i++]=0;var ee=s(),te=o[--i];y(o[--i],te,ee),tt.$ctx._17655||function(){var t=Object.create(e);o[i++]=1/0,o[i++]=1;for(var n=0;n<928;n++){var r=o[--i];o[i++]=r,o[i++]=3*r%929}t.rsalog=s(),t.rslog=s(929);for(var a=1;a<=928;a+=1)v(t.rslog,A(t.rsalog,a),a);for(var u in t)t.hasOwnProperty(u)&&(tt.$ctx[u]=t[u]);tt.$ctx._17655=1}(),e.rsprod=function(){var t=o[--i],n=o[--i];if(o[i++]=n,o[i++]=t,0!=t&&0!=n){var r=A(e.rslog,o[--i]),a=A(e.rsalog,L(r+A(e.rslog,o[--i]))%928);o[i++]=a}else i-=2,o[i++]=0},o[i++]=1/0,o[i++]=1;for(var ne=0,re=e.k;ne<re;ne++)o[i++]=0;e.coeffs=s();for(var ie=1,oe=e.k;ie<=oe;ie+=1){e.i=ie,v(e.coeffs,e.i,A(e.coeffs,e.i-1));for(var ae=e.i-1;ae>=1;ae-=1){e.j=ae,o[i++]=e.coeffs,o[i++]=e.j,o[i++]=A(e.coeffs,e.j-1),o[i++]=A(e.coeffs,e.j),o[i++]=A(e.rsalog,e.i),e.rsprod();var se=o[--i],ue=o[--i],ce=o[--i];v(o[--i],ce,L(ue+se)%929)}o[i++]=e.coeffs,o[i++]=0,o[i++]=A(e.coeffs,0),o[i++]=A(e.rsalog,e.i),e.rsprod();var le=o[--i],he=o[--i];v(o[--i],he,le)}e.coeffs=b(e.coeffs,0,e.coeffs.length-1);for(var fe=e.coeffs.length-1;fe>=0;fe-=2){var de=e.coeffs;v(de,fe,L(929-A(de,fe)))}for(var pe=0,me=L(e.n-1);pe<=me;pe+=1){e.t=L(A(e.cws,pe)+A(e.cws,e.n))%929;for(var ge=0,Ae=L(e.k-1);ge<=Ae;ge+=1)e.j=ge,v(e.cws,L(e.n+e.j),L(A(e.cws,L(L(e.n+e.j)+1))+L(929-e.t*A(e.coeffs,L(L(e.k-e.j)-1))%929))%929)}for(var ve=e.n,be=L(e.n+e.k);ve<=be;ve+=1)v(e.cws,ve,L(929-A(e.cws,ve))%929);e.cws=b(e.cws,0,e.cws.length-1),void 0!==A(e.options,"debugcws")&&(o[i++]="bwipp.debugcws#17693",o[i++]=e.cws,z()),tt.$ctx._17952||function(){var t=Object.create(e);for(var n in t.clusters=s([s([120256,125680,128380,120032,125560,128318,108736,119920,108640,86080,108592,86048,110016,120560,125820,109792,120440,125758,88256,109680,88160,89536,110320,120700,89312,110200,120638,89200,110140,89840,110460,89720,110398,89980,128506,119520,125304,128190,107712,119408,125244,107616,119352,84032,107568,119324,84e3,107544,83984,108256,119672,125374,85184,108144,119612,85088,108088,119582,85040,108060,85728,108408,119742,85616,108348,85560,108318,85880,108478,85820,85790,107200,119152,125116,107104,119096,125086,83008,107056,119068,82976,107032,82960,82952,83648,107376,119228,83552,107320,119198,83504,107292,83480,83468,83824,107452,83768,107422,83740,83900,106848,118968,125022,82496,106800,118940,82464,106776,118926,82448,106764,82440,106758,82784,106936,119006,82736,106908,82712,106894,82700,82694,106974,82830,82240,106672,118876,82208,106648,118862,82192,106636,82184,106630,82180,82352,82328,82316,82080,118830,106572,106566,82050,117472,124280,127678,103616,117360,124220,103520,117304,124190,75840,103472,75808,104160,117624,124350,76992,104048,117564,76896,103992,76848,76824,77536,104312,117694,77424,104252,77368,77340,77688,104382,77628,77758,121536,126320,128700,121440,126264,128670,111680,121392,126236,111648,121368,126222,111632,121356,103104,117104,124092,112320,103008,117048,124062,112224,121656,126366,93248,74784,102936,117006,93216,112152,93200,75456,103280,117180,93888,75360,103224,117150,93792,112440,121758,93744,75288,93720,75632,103356,94064,75576,103326,94008,112542,93980,75708,94140,75678,94110,121184,126136,128606,111168,121136,126108,111136,121112,126094,111120,121100,111112,111108,102752,116920,123998,111456,102704,116892,91712,74272,121244,116878,91680,74256,102668,91664,111372,102662,74244,74592,102840,116958,92e3,74544,102812,91952,111516,102798,91928,74508,74502,74680,102878,92088,74652,92060,74638,92046,92126,110912,121008,126044,110880,120984,126030,110864,120972,110856,120966,110852,110850,74048,102576,116828,90944,74016,102552,116814,90912,111e3,121038,90896,73992,102534,90888,110982,90884,74160,102620,91056,74136,102606,91032,111054,91020,74118,91014,91100,91086,110752,120920,125998,110736,120908,110728,120902,110724,110722,73888,102488,116782,90528,73872,102476,90512,110796,102470,90504,73860,90500,73858,73944,90584,90572,90566,120876,120870,110658,102444,73800,90312,90308,90306,101056,116080,123580,100960,116024,70720,100912,115996,70688,100888,70672,70664,71360,101232,116156,71264,101176,116126,71216,101148,71192,71180,71536,101308,71480,101278,71452,71612,71582,118112,124600,127838,105024,118064,124572,104992,118040,124558,104976,118028,104968,118022,100704,115896,123486,105312,100656,115868,79424,70176,118172,115854,79392,105240,100620,79376,70152,79368,70496,100792,115934,79712,70448,118238,79664,105372,100750,79640,70412,79628,70584,100830,79800,70556,79772,70542,70622,79838,122176,126640,128860,122144,126616,128846,122128,126604,122120,126598,122116,104768,117936,124508,113472,104736,126684,124494,113440,122264,126670,113424,104712,117894,113416,122246,104706,69952,100528,115804,78656,69920,100504,115790,96064,78624,104856,117966,96032,113560,122318,100486,96016,78600,104838,96008,69890,70064,100572,78768,70040,100558,96176,78744,104910,96152,113614,70022,78726,70108,78812,70094,96220,78798,122016,126552,128814,122e3,126540,121992,126534,121988,121986,104608,117848,124462,113056,104592,126574,113040,122060,117830,113032,104580,113028,104578,113026,69792,100440,115758,78240,69776,100428,95136,78224,104652,100422,95120,113100,69764,95112,78212,69762,78210,69848,100462,78296,69836,95192,78284,69830,95180,78278,69870,95214,121936,126508,121928,126502,121924,121922,104528,117804,112848,104520,117798,112840,121958,112836,104514,112834,69712,100396,78032,69704,100390,94672,78024,104550,94664,112870,69698,94660,78018,94658,78060,94700,94694,126486,121890,117782,104484,104482,69672,77928,94440,69666,77922,99680,68160,99632,68128,99608,115342,68112,99596,68104,99590,68448,99768,115422,68400,99740,68376,99726,68364,68358,68536,99806,68508,68494,68574,101696,116400,123740,101664,116376,101648,116364,101640,116358,101636,67904,99504,115292,72512,67872,116444,115278,72480,101784,116430,72464,67848,99462,72456,101766,67842,68016,99548,72624,67992,99534,72600,101838,72588,67974,68060,72668,68046,72654,118432,124760,127918,118416,124748,118408,124742,118404,118402,101536,116312,105888,101520,116300,105872,118476,116294,105864,101508,105860,101506,105858,67744,99416,72096,67728,116334,80800,72080,101580,99398,80784,105932,67716,80776,72068,67714,72066,67800,99438,72152,67788,80856,72140,67782,80844,72134,67822,72174,80878,126800,128940,126792,128934,126788,126786,118352,124716,122576,126828,124710,122568,126822,122564,118338,122562,101456,116268,105680,101448,116262,114128,105672,118374,114120,122598,101442,114116,105666,114114,67664,99372,71888,67656,99366,80336,71880,101478,97232,80328,105702,67650,97224,114150,71874,97220,67692,71916,67686,80364,71910,97260,80358,97254,126760,128918,126756,126754,118312,124694,122472,126774,122468,118306,122466,101416,116246,105576,101412,113896,105572,101410,113892,105570,113890,67624,99350,71784,101430,80104,71780,67618,96744,80100,71778,96740,80098,96738,71798,96758,126738,122420,122418,105524,113780,113778,71732,79988,96500,96498,66880,66848,98968,66832,66824,66820,66992,66968,66956,66950,67036,67022,1e5,99984,115532,99976,115526,99972,99970,66720,98904,69024,100056,98892,69008,100044,69e3,100038,68996,66690,68994,66776,98926,69080,100078,69068,66758,69062,66798,69102,116560,116552,116548,116546,99920,102096,116588,115494,102088,116582,102084,99906,102082,66640,68816,66632,98854,73168,68808,66628,73160,68804,66626,73156,68802,66668,68844,66662,73196,68838,73190,124840,124836,124834,116520,118632,124854,118628,116514,118626,99880,115478,101992,116534,106216,101988,99874,106212,101986,106210,66600,98838,68712,99894,72936,68708,66594,81384,72932,68706,81380,72930,66614,68726,72950,81398,128980,128978,124820,126900,124818,126898,116500,118580,116498,122740,118578,122738,99860,101940,99858,106100,101938,114420]),s([128352,129720,125504,128304,129692,125472,128280,129678,125456,128268,125448,128262,125444,125792,128440,129758,120384,125744,128412,120352,125720,128398,120336,125708,120328,125702,120324,120672,125880,128478,110144,120624,125852,110112,120600,125838,110096,120588,110088,120582,110084,110432,120760,125918,89664,110384,120732,89632,110360,120718,89616,110348,89608,110342,89952,110520,120798,89904,110492,89880,110478,89868,90040,110558,90012,89998,125248,128176,129628,125216,128152,129614,125200,128140,125192,128134,125188,125186,119616,125360,128220,119584,125336,128206,119568,125324,119560,125318,119556,119554,108352,119728,125404,108320,119704,125390,108304,119692,108296,119686,108292,108290,85824,108464,119772,85792,108440,119758,85776,108428,85768,108422,85764,85936,108508,85912,108494,85900,85894,85980,85966,125088,128088,129582,125072,128076,125064,128070,125060,125058,119200,125144,128110,119184,125132,119176,125126,119172,119170,107424,119256,125166,107408,119244,107400,119238,107396,107394,83872,107480,119278,83856,107468,83848,107462,83844,83842,83928,107502,83916,83910,83950,125008,128044,125e3,128038,124996,124994,118992,125036,118984,125030,118980,118978,106960,119020,106952,119014,106948,106946,82896,106988,82888,106982,82884,82882,82924,82918,124968,128022,124964,124962,118888,124982,118884,118882,106728,118902,106724,106722,82408,106742,82404,82402,124948,124946,118836,118834,106612,106610,124224,127664,129372,124192,127640,129358,124176,127628,124168,127622,124164,124162,117568,124336,127708,117536,124312,127694,117520,124300,117512,124294,117508,117506,104256,117680,124380,104224,117656,124366,104208,117644,104200,117638,104196,104194,77632,104368,117724,77600,104344,117710,77584,104332,77576,104326,77572,77744,104412,77720,104398,77708,77702,77788,77774,128672,129880,93168,128656,129868,92664,128648,129862,92412,128644,128642,124064,127576,129326,126368,124048,129902,126352,128716,127558,126344,124036,126340,124034,126338,117152,124120,127598,121760,117136,124108,121744,126412,124102,121736,117124,121732,117122,121730,103328,117208,124142,112544,103312,117196,112528,121804,117190,112520,103300,112516,103298,112514,75680,103384,117230,94112,75664,103372,94096,112588,103366,94088,75652,94084,75650,75736,103406,94168,75724,94156,75718,94150,75758,128592,129836,91640,128584,129830,91388,128580,91262,128578,123984,127532,126160,123976,127526,126152,128614,126148,123970,126146,116944,124012,121296,116936,124006,121288,126182,121284,116930,121282,102864,116972,111568,102856,116966,111560,121318,111556,102850,111554,74704,102892,92112,74696,102886,92104,111590,92100,74690,92098,74732,92140,74726,92134,128552,129814,90876,128548,90750,128546,123944,127510,126056,128566,126052,123938,126050,116840,123958,121064,116836,121060,116834,121058,102632,116854,111080,121078,111076,102626,111074,74216,102646,91112,74212,91108,74210,91106,74230,91126,128532,90494,128530,123924,126004,123922,126002,116788,120948,116786,120946,102516,110836,102514,110834,73972,90612,73970,90610,128522,123914,125978,116762,120890,102458,110714,123552,127320,129198,123536,127308,123528,127302,123524,123522,116128,123608,127342,116112,123596,116104,123590,116100,116098,101280,116184,123630,101264,116172,101256,116166,101252,101250,71584,101336,116206,71568,101324,71560,101318,71556,71554,71640,101358,71628,71622,71662,127824,129452,79352,127816,129446,79100,127812,78974,127810,123472,127276,124624,123464,127270,124616,127846,124612,123458,124610,115920,123500,118224,115912,123494,118216,124646,118212,115906,118210,100816,115948,105424,100808,115942,105416,118246,105412,100802,105410,70608,100844,79824,70600,100838,79816,105446,79812,70594,79810,70636,79852,70630,79846,129960,95728,113404,129956,95480,113278,129954,95356,95294,127784,129430,78588,128872,129974,95996,78462,128868,127778,95870,128866,123432,127254,124520,123428,126696,128886,123426,126692,124514,126690,115816,123446,117992,115812,122344,117988,115810,122340,117986,122338,100584,115830,104936,100580,113640,104932,100578,113636,104930,113634,70120,100598,78824,70116,96232,78820,70114,96228,78818,96226,70134,78838,129940,94968,113022,129938,94844,94782,127764,78206,128820,127762,95102,128818,123412,124468,123410,126580,124466,126578,115764,117876,115762,122100,117874,122098,100468,104692,100466,113140,104690,113138,69876,78324,69874,95220,78322,95218,129930,94588,94526,127754,128794,123402,124442,126522,115738,117818,121978,100410,104570,112890,69754,78074,94714,94398,123216,127148,123208,127142,123204,123202,115408,123244,115400,123238,115396,115394,99792,115436,99784,115430,99780,99778,68560,99820,68552,99814,68548,68546,68588,68582,127400,129238,72444,127396,72318,127394,123176,127126,123752,123172,123748,123170,123746,115304,123190,116456,115300,116452,115298,116450,99560,115318,101864,99556,101860,99554,101858,68072,99574,72680,68068,72676,68066,72674,68086,72694,129492,80632,105854,129490,80508,80446,127380,72062,127924,127378,80766,127922,123156,123700,123154,124788,123698,124786,115252,116340,115250,118516,116338,118514,99444,101620,99442,105972,101618,105970,67828,72180,67826,80884,72178,80882,97008,114044,96888,113982,96828,96798,129482,80252,130010,97148,80190,97086,127370,127898,128954,123146,123674,124730,126842,115226,116282,118394,122618,99386,101498,105722,114170,67706,71930,80378,96632,113854,96572,96542,80062,96702,96444,96414,96350,123048,123044,123042,115048,123062,115044,115042,99048,115062,99044,99042,67048,99062,67044,67042,67062,127188,68990,127186,123028,123316,123026,123314,114996,115572,114994,115570,98932,100084,98930,100082,66804,69108,66802,69106,129258,73084,73022,127178,127450,123018,123290,123834,114970,115514,116602,98874,99962,102138,66682,68858,73210,81272,106174,81212,81182,72894,81342,97648,114364,97592,114334,97564,97550,81084,97724,81054,97694,97464,114270,97436,97422,80990,97502,97372,97358,97326,114868,114866,98676,98674,66292,66290,123098,114842,115130,98618,99194,66170,67322,69310,73404,73374,81592,106334,81564,81550,73310,81630,97968,114524,97944,114510,97932,97926,81500,98012,81486,97998,97880,114478,97868,97862,81454,97902,97836,97830,69470,73564,73550,81752,106414,81740,81734,73518,81774,81708,81702]),s([109536,120312,86976,109040,120060,86496,108792,119934,86256,108668,86136,129744,89056,110072,129736,88560,109820,129732,88312,109694,129730,88188,128464,129772,89592,128456,129766,89340,128452,89214,128450,125904,128492,125896,128486,125892,125890,120784,125932,120776,125926,120772,120770,110544,120812,110536,120806,110532,84928,108016,119548,84448,107768,119422,84208,107644,84088,107582,84028,129640,85488,108284,129636,85240,108158,129634,85116,85054,128232,129654,85756,128228,85630,128226,125416,128246,125412,125410,119784,125430,119780,119778,108520,119798,108516,108514,83424,107256,119166,83184,107132,83064,107070,83004,82974,129588,83704,107390,129586,83580,83518,128116,83838,128114,125172,125170,119284,119282,107508,107506,82672,106876,82552,106814,82492,82462,129562,82812,82750,128058,125050,119034,82296,106686,82236,82206,82366,82108,82078,76736,103920,117500,76256,103672,117374,76016,103548,75896,103486,75836,129384,77296,104188,129380,77048,104062,129378,76924,76862,127720,129398,77564,127716,77438,127714,124392,127734,124388,124386,117736,124406,117732,117730,104424,117750,104420,104418,112096,121592,126334,92608,111856,121468,92384,111736,121406,92272,111676,92216,111646,92188,75232,103160,117118,93664,74992,103036,93424,112252,102974,93304,74812,93244,74782,93214,129332,75512,103294,129908,129330,93944,75388,129906,93820,75326,93758,127604,75646,128756,127602,94078,128754,124148,126452,124146,126450,117236,121844,117234,121842,103412,103410,91584,111344,121212,91360,111224,121150,91248,111164,91192,111134,91164,91150,74480,102780,91888,74360,102718,91768,111422,91708,74270,91678,129306,74620,129850,92028,74558,91966,127546,128634,124026,126202,116986,121338,102906,90848,110968,121022,90736,110908,90680,110878,90652,90638,74104,102590,91e3,74044,90940,74014,90910,74174,91070,90480,110780,90424,110750,90396,90382,73916,90556,73886,90526,90296,110686,90268,90254,73822,90334,90204,90190,71136,101112,116094,70896,100988,70776,100926,70716,70686,129204,71416,101246,129202,71292,71230,127348,71550,127346,123636,123634,116212,116210,101364,101362,79296,105200,118140,79072,105080,118078,78960,105020,78904,104990,78876,78862,70384,100732,79600,70264,100670,79480,105278,79420,70174,79390,129178,70524,129466,79740,70462,79678,127290,127866,123514,124666,115962,118266,100858,113376,122232,126654,95424,113264,122172,95328,113208,122142,95280,113180,95256,113166,95244,78560,104824,117950,95968,78448,104764,95856,113468,104734,95800,78364,95772,78350,95758,70008,100542,78712,69948,96120,78652,69918,96060,78622,96030,70078,78782,96190,94912,113008,122044,94816,112952,122014,94768,112924,94744,112910,94732,94726,78192,104636,95088,78136,104606,95032,113054,95004,78094,94990,69820,78268,69790,95164,78238,95134,94560,112824,121950,94512,112796,94488,112782,94476,94470,78008,104542,94648,77980,94620,77966,94606,69726,78046,94686,94384,112732,94360,112718,94348,94342,77916,94428,77902,94414,94296,112686,94284,94278,77870,94318,94252,94246,68336,99708,68216,99646,68156,68126,68476,68414,127162,123258,115450,99834,72416,101752,116414,72304,101692,72248,101662,72220,72206,67960,99518,72568,67900,72508,67870,72478,68030,72638,80576,105840,118460,80480,105784,118430,80432,105756,80408,105742,80396,80390,72048,101564,80752,71992,101534,80696,71964,80668,71950,80654,67772,72124,67742,80828,72094,80798,114016,122552,126814,96832,113968,122524,96800,113944,122510,96784,113932,96776,113926,96772,80224,105656,118366,97120,80176,105628,97072,114076,105614,97048,80140,97036,80134,97030,71864,101470,80312,71836,97208,80284,71822,97180,80270,97166,67678,71902,80350,97246,96576,113840,122460,96544,113816,122446,96528,113804,96520,113798,96516,96514,80048,105564,96688,80024,105550,96664,113870,96652,80006,96646,71772,80092,71758,96732,80078,96718,96416,113752,122414,96400,113740,96392,113734,96388,96386,79960,105518,96472,79948,96460,79942,96454,71726,79982,96494,96336,113708,96328,113702,96324,96322,79916,96364,79910,96358,96296,113686,96292,96290,79894,96310,66936,99006,66876,66846,67006,68976,100028,68920,99998,68892,68878,66748,69052,66718,69022,73056,102072,116574,73008,102044,72984,102030,72972,72966,68792,99934,73144,68764,73116,68750,73102,66654,68830,73182,81216,106160,118620,81184,106136,118606,81168,106124,81160,106118,81156,81154,72880,101980,81328,72856,101966,81304,106190,81292,72838,81286,68700,72924,68686,81372,72910,81358,114336,122712,126894,114320,122700,114312,122694,114308,114306,81056,106072,118574,97696,81040,106060,97680,114380,106054,97672,81028,97668,81026,97666,72792,101934,81112,72780,97752,81100,72774,97740,81094,97734,68654,72814,81134,97774,114256,122668,114248,122662,114244,114242,80976,106028,97488,80968,106022,97480,114278,97476,80962,97474,72748,81004,72742,97516,80998,97510,114216,122646,114212,114210,80936,106006,97384,80932,97380,80930,97378,72726,80950,97398,114196,114194,80916,97332,80914,97330,66236,66206,67256,99166,67228,67214,66142,67294,69296,100188,69272,100174,69260,69254,67164,69340,67150,69326,73376,102232,116654,73360,102220,73352,102214,73348,73346,69208,100142,73432,102254,73420,69190,73414,67118,69230,73454,106320,118700,106312,118694,106308,106306,73296,102188,81616,106348,102182,81608,73284,81604,73282,81602,69164,73324,69158,81644,73318,81638,122792,126934,122788,122786,106280,118678,114536,106276,114532,106274,114530,73256,102166,81512,73252,98024,81508,73250,98020,81506,98018,69142,73270,81526,98038,122772,122770,106260,114484,106258,114482,73236,81460,73234,97908,81458,97906,122762,106250,114458,73226,81434,97850,66396,66382,67416,99246,67404,67398,66350,67438,69456,100268,69448,100262,69444,69442,67372,69484,67366,69478,102312,116694,102308,102306,69416,100246,73576,102326,73572,69410,73570,67350,69430,73590,118740,118738,102292,106420,102290,106418,69396,73524,69394,81780,73522,81778,118730,102282,106394,69386,73498,81722,66476,66470,67496,99286,67492,67490,66454,67510,100308,100306,67476,69556,67474,69554,116714])]),t.raps=s([s([802,930,946,818,882,890,826,954,922,986,970,906,778,794,786,914,978,982,980,916,948,932,934,942,940,936,808,812,814,806,822,950,918,790,788,820,884,868,870,878,876,872,840,856,860,862,846,844,836,838,834,866]),s([718,590,622,558,550,566,534,530,538,570,562,546,610,626,634,762,754,758,630,628,612,614,582,578,706,738,742,740,748,620,556,552,616,744,712,716,708,710,646,654,652,668,664,696,688,656,720,592,600,604,732,734])]),t)t.hasOwnProperty(n)&&(tt.$ctx[n]=t[n]);tt.$ctx._17952=1}(),e.cwtobits=function(){var t=A(e.clusters,o[--i]);e.v=A(t,o[--i]),o[i++]=1/0;for(var n=0;n<17;n++)o[i++]=0;for(var r=m(c(17),e.v,2),a=0,u=r.length;a<u;a++)o[i++]=A(r,a)-48;var l=s();o[i++]=b(l,l.length-17,17)},e.raptobits=function(){var t=A(e.raps,o[--i]);e.v=A(t,o[--i]),o[i++]=1/0;for(var n=0;n<10;n++)o[i++]=0;for(var r=m(c(10),e.v,2),a=0,u=r.length;a<u;a++)o[i++]=A(r,a)-48;var l=s();o[i++]=b(l,l.length-10,10)},e.rwid=A(s([38,55,82,99]),L(e.c-1)),3==e.c&&e.cca&&(e.rwid=72),e.pixs=s(e.rwid*e.r);for(var ye=0,we=L(e.r-1);ye<=we;ye+=1){e.i=ye,e.clst=L(L(e.i+e.rapl)-1)%3,o[i++]=e.pixs,o[i++]=e.rwid*e.i,o[i++]=1/0,1==e.c&&(o[i++]=L(L(e.i+e.rapl)-1)%52,o[i++]=0,e.raptobits(),_(o[--i]),o[i++]=A(e.cws,e.i),o[i++]=e.clst,e.cwtobits(),_(o[--i]),o[i++]=L(L(e.i+e.rapr)-1)%52,o[i++]=0,e.raptobits(),_(o[--i])),2==e.c&&(o[i++]=L(L(e.i+e.rapl)-1)%52,o[i++]=0,e.raptobits(),_(o[--i]),o[i++]=A(e.cws,2*e.i),o[i++]=e.clst,e.cwtobits(),_(o[--i]),o[i++]=A(e.cws,2*e.i+1),o[i++]=e.clst,e.cwtobits(),_(o[--i]),o[i++]=L(L(e.i+e.rapr)-1)%52,o[i++]=0,e.raptobits(),_(o[--i])),3==e.c&&(e.cca||(o[i++]=L(L(e.i+e.rapl)-1)%52,o[i++]=0,e.raptobits(),_(o[--i])),o[i++]=A(e.cws,3*e.i),o[i++]=e.clst,e.cwtobits(),_(o[--i]),o[i++]=L(L(e.i+e.rapc)-1)%52,o[i++]=1,e.raptobits(),_(o[--i]),o[i++]=A(e.cws,3*e.i+1),o[i++]=e.clst,e.cwtobits(),_(o[--i]),o[i++]=A(e.cws,3*e.i+2),o[i++]=e.clst,e.cwtobits(),_(o[--i]),o[i++]=L(L(e.i+e.rapr)-1)%52,o[i++]=0,e.raptobits(),_(o[--i])),4==e.c&&(o[i++]=L(L(e.i+e.rapl)-1)%52,o[i++]=0,e.raptobits(),_(o[--i]),o[i++]=A(e.cws,4*e.i),o[i++]=e.clst,e.cwtobits(),_(o[--i]),o[i++]=A(e.cws,4*e.i+1),o[i++]=e.clst,e.cwtobits(),_(o[--i]),o[i++]=L(L(e.i+e.rapc)-1)%52,o[i++]=1,e.raptobits(),_(o[--i]),o[i++]=A(e.cws,4*e.i+2),o[i++]=e.clst,e.cwtobits(),_(o[--i]),o[i++]=A(e.cws,4*e.i+3),o[i++]=e.clst,e.cwtobits(),_(o[--i]),o[i++]=L(L(e.i+e.rapr)-1)%52,o[i++]=0,e.raptobits(),_(o[--i])),o[i++]=1;var xe=s(),Ce=o[--i];y(o[--i],Ce,xe)}var ke=new Map([["ren",Q],["pixs",e.pixs],["pixx",e.rwid],["pixy",e.r],["height",e.r/72*e.rowmult],["width",e.rwid/72],["opt",e.options]]);o[i++]=ke,e.dontdraw||Q()}function nt(){var e=Object.create(nt.$ctx||(nt.$ctx={}));if(e.dontdraw=!1,e.columns=0,e.rows=0,e.format="unset",e.version="unset",e.parse=!1,e.parsefnc=!1,e.encoding="auto",e.c40headerlength=-1,e.raw=!1,e.dmre=!1,e.dindmre=!1,e.isodmre=!1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],e.isodmre=e.dmre,T(e.format,"unset")&&T(e.version,"unset")){o[i++]="format",e.isodmre||e.dindmre?o[i++]="rectangle":o[i++]="square";var t=o[--i];e[o[--i]]=t}D(e.version,"unset")&&(C(e.version,"x"),i--,e.rows=p(o[--i]),i--,e.columns=p(o[--i])),o[i++]=1/0,o[i++]=s([10,10,1,1,5,1]),o[i++]=s([12,12,1,1,7,1]),o[i++]=s([14,14,1,1,10,1]),o[i++]=s([16,16,1,1,12,1]),o[i++]=s([18,18,1,1,14,1]),o[i++]=s([20,20,1,1,18,1]),o[i++]=s([22,22,1,1,20,1]),o[i++]=s([24,24,1,1,24,1]),o[i++]=s([26,26,1,1,28,1]),o[i++]=s([32,32,2,2,36,1]),o[i++]=s([36,36,2,2,42,1]),o[i++]=s([40,40,2,2,48,1]),o[i++]=s([44,44,2,2,56,1]),o[i++]=s([48,48,2,2,68,1]),o[i++]=s([52,52,2,2,84,2]),o[i++]=s([64,64,4,4,112,2]),o[i++]=s([72,72,4,4,144,4]),o[i++]=s([80,80,4,4,192,4]),o[i++]=s([88,88,4,4,224,4]),o[i++]=s([96,96,4,4,272,4]),o[i++]=s([104,104,4,4,336,6]),o[i++]=s([120,120,6,6,408,6]),o[i++]=s([132,132,6,6,496,8]),o[i++]=s([144,144,6,6,620,10]),o[i++]=s([8,18,1,1,7,1]),o[i++]=s([8,32,1,2,11,1]),(e.dindmre||e.isodmre)&&(o[i++]=s([8,48,1,2,15,1])),(e.dindmre||e.isodmre)&&(o[i++]=s([8,64,1,4,18,1])),e.isodmre&&(o[i++]=s([8,80,1,4,22,1])),e.isodmre&&(o[i++]=s([8,96,1,4,28,1])),e.isodmre&&(o[i++]=s([8,120,1,6,32,1])),e.isodmre&&(o[i++]=s([8,144,1,6,36,1])),o[i++]=s([12,26,1,1,14,1]),o[i++]=s([12,36,1,2,18,1]),(e.dindmre||e.isodmre)&&(o[i++]=s([12,64,1,4,27,1])),e.isodmre&&(o[i++]=s([12,88,1,4,36,1])),o[i++]=s([16,36,1,2,24,1]),o[i++]=s([16,48,1,2,28,1]),(e.dindmre||e.isodmre)&&(o[i++]=s([16,64,1,4,36,1])),e.isodmre&&(o[i++]=s([20,36,1,2,28,1])),e.isodmre&&(o[i++]=s([20,44,1,2,34,1])),e.isodmre&&(o[i++]=s([20,64,1,4,42,1])),e.isodmre&&(o[i++]=s([22,48,1,2,38,1])),e.dindmre&&(o[i++]=s([24,32,1,2,28,1])),e.dindmre&&(o[i++]=s([24,36,1,2,33,1])),(e.dindmre||e.isodmre)&&(o[i++]=s([24,48,1,2,41,1])),(e.dindmre||e.isodmre)&&(o[i++]=s([24,64,1,4,46,1])),e.dindmre&&(o[i++]=s([26,32,1,2,32,1])),(e.dindmre||e.isodmre)&&(o[i++]=s([26,40,1,2,38,1])),(e.dindmre||e.isodmre)&&(o[i++]=s([26,48,1,2,42,1])),(e.dindmre||e.isodmre)&&(o[i++]=s([26,64,1,4,50,1])),e.metrics=s(),e.urows=e.rows,e.ucols=e.columns,e.fullcws=s([]);for(var n=e.metrics,r=0,a=n.length;r<a;r++)e.m=A(n,r),e.rows=A(e.m,0),e.cols=A(e.m,1),e.regh=A(e.m,2),e.regv=A(e.m,3),e.rscw=A(e.m,4),e.rsbl=A(e.m,5),e.mrows=L(e.rows-2*e.regh),e.mcols=L(e.cols-2*e.regv),e.ncws=L(~~(e.mrows*e.mcols/8)-e.rscw),e.okay=!0,0!=e.urows&&e.urows!=e.rows&&(e.okay=!1),0!=e.ucols&&e.ucols!=e.cols&&(e.okay=!1),T(e.format,"square")&&D(e.rows,e.cols)&&(e.okay=!1),T(e.format,"rectangle")&&T(e.rows,e.cols)&&(e.okay=!1),e.okay&&(o[i++]=1/0,_(e.fullcws),o[i++]=e.ncws,e.fullcws=s());o[i++]=1/0;for(var l=0;l<1558;l++)o[i++]=1e4;e.numremcws=s();for(var h=e.fullcws,d=0,g=h.length;d<g;d++)v(e.numremcws,L(A(h,d)-1),1);for(var w=1556;w>=0;w-=1)e.i=w,1!=A(e.numremcws,e.i)&&v(e.numremcws,e.i,L(A(e.numremcws,e.i+1)+1));if(nt.$ctx._18292||function(){var t=Object.create(e);t.fnc1=-1,t.prog=-2,t.m05=-3,t.m06=-4,t.lC=-5,t.lB=-6,t.lX=-7,t.lT=-8,t.lE=-9,t.unl=-10,t.sapp=-11,t.usft=-12,t.sft1=-13,t.sft2=-14,t.sft3=-15,t.eci=-16,t.pad=-17,t.unlcw=254,o[i++]=1/0;for(var n=0;n<=128;n+=1)o[i++]=n,o[i++]=n+1;o[i++]=t.pad,o[i++]=129;for(var r=0;r<=99;r+=1){var a=m(c(2),r,10),l=f(c(2),"00");y(l,2-a.length,a),o[i++]=l,o[i++]=r+130}var h=s([t.lC,t.lB,t.fnc1,t.sapp,t.prog,t.usft,t.m05,t.m06,t.lX,t.lT,t.lE,t.eci]);o[i++]=229;for(var d=0,p=h.length;d<p;d++){var g=L(o[--i]+1);o[i++]=A(h,d),o[i++]=g,o[i++]=g}i--,t.Avals=u(),o[i++]=1/0;for(var b=t.Avals,w=b.size,x=b.keys(),C=0;C<w;C++){var k=x.next().value;o[i++]=k,o[i++]=b.get(k),o[i++]=1/0;var E=o[--i],S=o[--i];o[i++]=E,o[i++]=S;var O=s();o[i++]=O}t.Avals=u(),o[i++]=1/0,o[i++]=t.sft1,o[i++]=0,o[i++]=t.sft2,o[i++]=1,o[i++]=t.sft3,o[i++]=2,o[i++]=32,o[i++]=3;for(var T=48;T<=57;T+=1)o[i++]=T,o[i++]=T-44;for(var D=65;D<=90;D+=1)o[i++]=D,o[i++]=D-51;t.CNvals=u(),o[i++]=1/0;for(var B=0;B<=31;B+=1)o[i++]=B,o[i++]=B;t.C1vals=u(),o[i++]=1/0;for(var I=33;I<=47;I+=1)o[i++]=I,o[i++]=I-33;for(var M=58;M<=64;M+=1)o[i++]=M,o[i++]=M-43;for(var j=91;j<=95;j+=1)o[i++]=j,o[i++]=j-69;o[i++]=t.fnc1,o[i++]=27,o[i++]=t.usft,o[i++]=30,t.C2vals=u(),o[i++]=1/0;for(var N=96;N<=127;N+=1)o[i++]=N,o[i++]=N-96;t.C3vals=u(),o[i++]=1/0;for(var F=t.CNvals,R=F.size,P=F.keys(),U=0;U<R;U++){var z=P.next().value;o[i++]=z,o[i++]=F.get(z),o[i++]=1/0;var H=o[--i],$=o[--i];o[i++]=H,o[i++]=$;var Q=s();o[i++]=Q}for(var V=t.C1vals,q=V.size,G=V.keys(),W=0;W<q;W++){var K=G.next().value;o[i++]=K,o[i++]=V.get(K),o[i++]=1/0;var Y=o[--i],X=o[--i];o[i++]=Y,o[i++]=A(t.CNvals,t.sft1),o[i++]=X;var J=s();o[i++]=J}for(var Z=t.C2vals,ee=Z.size,te=Z.keys(),ne=0;ne<ee;ne++){var re=te.next().value;o[i++]=re,o[i++]=Z.get(re),o[i++]=1/0;var ie=o[--i],oe=o[--i];o[i++]=ie,o[i++]=A(t.CNvals,t.sft2),o[i++]=oe;var ae=s();o[i++]=ae}for(var se=t.C3vals,ue=se.size,ce=se.keys(),le=0;le<ue;le++){var he=ce.next().value;o[i++]=he,o[i++]=se.get(he),o[i++]=1/0;var fe=o[--i],de=o[--i];o[i++]=fe,o[i++]=A(t.CNvals,t.sft3),o[i++]=de;var pe=s();o[i++]=pe}t.Cvals=u(),o[i++]=1/0,o[i++]=t.sft1,o[i++]=0,o[i++]=t.sft2,o[i++]=1,o[i++]=t.sft3,o[i++]=2,o[i++]=32,o[i++]=3;for(var me=48;me<=57;me+=1)o[i++]=me,o[i++]=me-44;for(var ge=97;ge<=122;ge+=1)o[i++]=ge,o[i++]=ge-83;t.TNvals=u(),o[i++]=1/0;for(var Ae=0;Ae<=31;Ae+=1)o[i++]=Ae,o[i++]=Ae;t.T1vals=u(),o[i++]=1/0;for(var ve=33;ve<=47;ve+=1)o[i++]=ve,o[i++]=ve-33;for(var be=58;be<=64;be+=1)o[i++]=be,o[i++]=be-43;for(var ye=91;ye<=95;ye+=1)o[i++]=ye,o[i++]=ye-69;o[i++]=t.fnc1,o[i++]=27,o[i++]=t.usft,o[i++]=30,t.T2vals=u(),o[i++]=1/0,o[i++]=96,o[i++]=0;for(var we=65;we<=90;we+=1)o[i++]=we,o[i++]=we-64;for(var xe=123;xe<=127;xe+=1)o[i++]=xe,o[i++]=xe-96;t.T3vals=u(),o[i++]=1/0;for(var Ce=t.TNvals,ke=Ce.size,Ee=Ce.keys(),Se=0;Se<ke;Se++){var _e=Ee.next().value;o[i++]=_e,o[i++]=Ce.get(_e),o[i++]=1/0;var Oe=o[--i],Te=o[--i];o[i++]=Oe,o[i++]=Te;var De=s();o[i++]=De}for(var Be=t.T1vals,Ie=Be.size,Me=Be.keys(),je=0;je<Ie;je++){var Ne=Me.next().value;o[i++]=Ne,o[i++]=Be.get(Ne),o[i++]=1/0;var Fe=o[--i],Re=o[--i];o[i++]=Fe,o[i++]=A(t.TNvals,t.sft1),o[i++]=Re;var Pe=s();o[i++]=Pe}for(var Le=t.T2vals,Ue=Le.size,ze=Le.keys(),He=0;He<Ue;He++){var $e=ze.next().value;o[i++]=$e,o[i++]=Le.get($e),o[i++]=1/0;var Qe=o[--i],Ve=o[--i];o[i++]=Qe,o[i++]=A(t.TNvals,t.sft2),o[i++]=Ve;var qe=s();o[i++]=qe}for(var Ge=t.T3vals,We=Ge.size,Ke=Ge.keys(),Ye=0;Ye<We;Ye++){var Xe=Ke.next().value;o[i++]=Xe,o[i++]=Ge.get(Xe),o[i++]=1/0;var Je=o[--i],Ze=o[--i];o[i++]=Je,o[i++]=A(t.TNvals,t.sft3),o[i++]=Ze;var et=s();o[i++]=et}t.Tvals=u();for(var tt=128;tt<=255;tt+=1){t.i=tt,o[i++]=t.Avals,o[i++]=t.i,o[i++]=1/0,_(A(t.Avals,t.usft)),_(A(t.Avals,t.i-128));var rt=s(),it=o[--i];v(o[--i],it,rt),o[i++]=t.Cvals,o[i++]=t.i,o[i++]=1/0,_(A(t.Cvals,t.usft)),_(A(t.Cvals,t.i-128));var ot=s(),at=o[--i];v(o[--i],at,ot),o[i++]=t.Tvals,o[i++]=t.i,o[i++]=1/0,_(A(t.Tvals,t.usft)),_(A(t.Tvals,t.i-128));var st=s(),ut=o[--i];v(o[--i],ut,st)}o[i++]=1/0,o[i++]=13,o[i++]=0,o[i++]=42,o[i++]=1,o[i++]=62,o[i++]=2,o[i++]=32,o[i++]=3;for(var ct=48;ct<=57;ct+=1)o[i++]=ct,o[i++]=ct-44;for(var lt=65;lt<=90;lt+=1)o[i++]=lt,o[i++]=lt-51;t.Xvals=u(),o[i++]=1/0;for(var ht=t.Xvals,ft=ht.size,dt=ht.keys(),pt=0;pt<ft;pt++){var mt=dt.next().value;o[i++]=mt,o[i++]=ht.get(mt),o[i++]=1/0;var gt=o[--i],At=o[--i];o[i++]=gt,o[i++]=At;var vt=s();o[i++]=vt}t.Xvals=u(),o[i++]=1/0;for(var bt=64;bt<=94;bt+=1)o[i++]=bt,o[i++]=bt-64;o[i++]=t.unl,o[i++]=31;for(var yt=32;yt<=63;yt+=1)o[i++]=yt,o[i++]=yt;t.Evals=u(),o[i++]=1/0;for(var wt=t.Evals,xt=wt.size,Ct=wt.keys(),kt=0;kt<xt;kt++){var Et=Ct.next().value;o[i++]=Et,o[i++]=wt.get(Et),o[i++]=1/0;var St=o[--i],_t=o[--i];o[i++]=St,o[i++]=_t;var Ot=s();o[i++]=Ot}t.Evals=u(),o[i++]=1/0;for(var Tt=0;Tt<=255;Tt+=1)o[i++]=Tt,o[i++]=Tt;t.Bvals=u(),o[i++]=1/0;for(var Dt=t.Bvals,Bt=Dt.size,It=Dt.keys(),Mt=0;Mt<Bt;Mt++){var jt=It.next().value;o[i++]=jt,o[i++]=Dt.get(jt),o[i++]=1/0;var Nt=o[--i],Ft=o[--i];o[i++]=Nt,o[i++]=Ft;var Rt=s();o[i++]=Rt}for(var Pt in t.Bvals=u(),t.encvals=s([t.Avals,t.Cvals,t.Tvals,t.Xvals,t.Evals,t.Bvals]),t.A=0,t.C=1,t.T=2,t.X=3,t.E=4,t.B=5,t)t.hasOwnProperty(Pt)&&(nt.$ctx[Pt]=t[Pt]);nt.$ctx._18292=1}(),e.raw&&(e.encoding="raw"),T(e.encoding,"raw")){for(e.cws=s(e.barcode.length),e.i=0,e.j=0;e.i!=e.barcode.length;)e.cw=p(b(e.barcode,e.i+1,3)),v(e.cws,e.j,e.cw),e.i=e.i+4,e.j=e.j+1;e.cws=b(e.cws,0,e.j)}if(T(e.encoding,"auto")){var x=new Map([["parse",e.parse],["parsefnc",e.parsefnc],["eci",!0],["FNC1",e.fnc1],["PROG",e.prog]]);e.fncvals=x,o[i++]="msg",o[i++]=e.barcode,o[i++]=e.fncvals,H();var E=o[--i];if(e[o[--i]]=E,e.msglen=e.msg.length,e.msglen>=9){_(b(e.msg,0,7));var I=o[--i],M=o[--i];o[i++]=29==I,o[i++]=M,i--;var j=o[--i],N=o[--i],$=o[--i],V=o[--i],q=o[--i],G=o[--i];if(j&&48==N&&30==$&&62==V&&41==q&&91==G){_(b(e.msg,e.msglen-2,2));var W=o[--i],K=o[--i];4==W&&30==K&&(53==A(e.msg,5)?(o[i++]=1/0,o[i++]=e.m05,_(b(e.msg,7,e.msg.length-9)),e.msg=s()):54==A(e.msg,5)&&(o[i++]=1/0,o[i++]=e.m06,_(b(e.msg,7,e.msg.length-9)),e.msg=s()))}}e.msglen=e.msg.length,o[i++]=1/0;for(var Y=0,X=e.msglen;Y<X;Y++)o[i++]=0;o[i++]=0,e.numD=s(),o[i++]=1/0;for(var J=0,Z=e.msglen;J<Z;J++)o[i++]=0;o[i++]=9999,e.nextXterm=s(),o[i++]=1/0;for(var ee=0,te=e.msglen;ee<te;ee++)o[i++]=0;o[i++]=9999,e.nextNonX=s(),o[i++]=1/0;for(var ne=0,re=e.msglen;ne<re;ne++)o[i++]=!1;o[i++]=!1,e.isECI=s();for(var ie=e.msglen-1;ie>=0;ie-=1){e.i=ie,e.barchar=A(e.msg,e.i),e.barchar>=48&&e.barchar<=57&&v(e.numD,e.i,L(A(e.numD,e.i+1)+1)),13==e.barchar||42==e.barchar||62==e.barchar?v(e.nextXterm,e.i,0):v(e.nextXterm,e.i,L(A(e.nextXterm,e.i+1)+1));var oe=void 0!==A(e.Xvals,e.barchar);v(e.nextNonX,e.i,oe?L(A(e.nextNonX,e.i+1)+1):0),v(e.isECI,e.i,e.barchar<=-1e6)}o[i++]=1/0;for(var ae=e.nextXterm,se=0,ue=ae.length;se<ue;se++){var ce=A(ae,se);o[i++]=ce,ce>1e4&&(i--,o[i++]=1e4)}e.nextXterm=s(),o[i++]=1/0;for(var le=e.nextNonX,he=0,fe=le.length;he<fe;he++){var de=A(le,he);o[i++]=de,de>1e4&&(i--,o[i++]=1e4)}for(e.nextNonX=s(),e.isD=function(){o[i++]=e.char>=48&&e.char<=57},e.isC=function(){var t=void 0!==A(e.CNvals,e.char);o[i++]=t},e.isT=function(){var t=void 0!==A(e.TNvals,e.char);o[i++]=t},e.isX=function(){var t=void 0!==A(e.Xvals,e.char);o[i++]=t},e.isE=function(){var t=void 0!==A(e.Evals,e.char);o[i++]=t},e.isEA=function(){o[i++]=e.char>127},e.isFN=function(){o[i++]=e.char<0},e.XtermFirst=function(){var t=o[--i];o[i++]=B(A(e.nextXterm,t),A(e.nextNonX,t))},e.lookup=function(){e.ac=1,e.cc=2,e.tc=2,e.xc=2,e.ec=2,e.bc=2.25,e.mode==e.A&&(e.ac=0,e.cc=1,e.tc=1,e.xc=1,e.ec=1,e.bc=1.25),e.mode==e.C&&(e.cc=0),e.mode==e.T&&(e.tc=0),e.mode==e.X&&(e.xc=0),e.mode==e.E&&(e.ec=0),e.mode==e.B&&(e.bc=0);for(var t=0;t<1;t++){if(A(e.isECI,e.i)){o[i++]=e.A;break}if(-1!=e.c40headerlength&&e.i<e.c40headerlength){o[i++]=e.C;break}for(e.k=0;;){if(e.i+e.k==e.msglen){for(var n=s(["ac","cc","tc","xc","ec","bc"]),r=0,a=n.length;r<a;r++){var u=A(n,r);e[u]=Math.ceil(e[u])}var c=s([e.cc,e.tc,e.xc,e.ec,e.bc]);o[i++]=!0;for(var l=0,h=c.length;l<h;l++){var f=o[--i];o[i++]=f&&e.ac<=A(c,l)}if(o[--i]){o[i++]=e.A;break}var d=s([e.ac,e.cc,e.tc,e.xc,e.ec]);o[i++]=!0;for(var p=0,m=d.length;p<m;p++){var g=o[--i];o[i++]=g&&e.bc<A(d,p)}if(o[--i]){o[i++]=e.B;break}var v=s([e.ac,e.cc,e.tc,e.xc,e.bc]);o[i++]=!0;for(var b=0,y=v.length;b<y;b++){var w=o[--i];o[i++]=w&&e.ec<A(v,b)}if(o[--i]){o[i++]=e.E;break}var x=s([e.ac,e.cc,e.xc,e.ec,e.bc]);o[i++]=!0;for(var C=0,k=x.length;C<k;C++){var E=o[--i];o[i++]=E&&e.tc<A(x,C)}if(o[--i]){o[i++]=e.T;break}var S=s([e.ac,e.cc,e.tc,e.ec,e.bc]);o[i++]=!0;for(var _=0,O=S.length;_<O;_++){var T=o[--i];o[i++]=T&&e.xc<A(S,_)}if(o[--i]){o[i++]=e.X;break}o[i++]=e.C;break}if(e.char=A(e.msg,e.i+e.k),o[i++]="ac",o[i++]=e.ac,e.isD(),o[--i]){var D=o[--i];o[i++]=L(D+.5)}else if(e.isEA(),o[--i]){var B=o[--i];o[i++]=Math.ceil(B)+2}else{var I=o[--i];o[i++]=Math.ceil(I)+1}var M=o[--i];if(e[o[--i]]=M,o[i++]="cc",o[i++]=e.cc,e.isC(),o[--i]){var j=o[--i];o[i++]=L(j+.6666667)}else if(e.isEA(),o[--i]){var N=o[--i];o[i++]=L(N+2.6666667)}else{var F=o[--i];o[i++]=L(F+1.3333334)}var R=o[--i];if(e[o[--i]]=R,o[i++]="tc",o[i++]=e.tc,e.isT(),o[--i]){var P=o[--i];o[i++]=L(P+.6666667)}else if(e.isEA(),o[--i]){var U=o[--i];o[i++]=L(U+2.6666667)}else{var z=o[--i];o[i++]=L(z+1.3333334)}var H=o[--i];if(e[o[--i]]=H,o[i++]="xc",o[i++]=e.xc,e.isX(),o[--i]){var $=o[--i];o[i++]=L($+.6666667)}else if(e.isEA(),o[--i]){var Q=o[--i];o[i++]=L(Q+4.3333334)}else{var V=o[--i];o[i++]=L(V+3.3333334)}var q=o[--i];if(e[o[--i]]=q,o[i++]="ec",o[i++]=e.ec,e.isE(),o[--i]){var G=o[--i];o[i++]=L(G+3/4)}else if(e.isEA(),o[--i]){var W=o[--i];o[i++]=L(W+4.25)}else{var K=o[--i];o[i++]=L(K+3.25)}var Y=o[--i];if(e[o[--i]]=Y,o[i++]="bc",o[i++]=e.bc,e.isFN(),o[--i]){var X=o[--i];o[i++]=L(X+4)}else{var J=o[--i];o[i++]=L(J+1)}var Z=o[--i];if(e[o[--i]]=Z,e.k>=4){var ee=s([e.cc,e.tc,e.xc,e.ec,e.bc]);o[i++]=!0;for(var te=0,ne=ee.length;te<ne;te++){var re=o[--i];o[i++]=re&&e.ac+1<=A(ee,te)}if(o[--i]){o[i++]=e.A;break}if(e.bc+1<=e.ac){o[i++]=e.B;break}var ie=s([e.cc,e.tc,e.xc,e.ec]);o[i++]=!0;for(var oe=0,ae=ie.length;oe<ae;oe++){var se=o[--i];o[i++]=se&&e.bc+1<A(ie,oe)}if(o[--i]){o[i++]=e.B;break}var ue=s([e.ac,e.cc,e.tc,e.xc,e.bc]);o[i++]=!0;for(var ce=0,le=ue.length;ce<le;ce++){var he=o[--i];o[i++]=he&&e.ec+1<A(ue,ce)}if(o[--i]){o[i++]=e.E;break}var fe=s([e.ac,e.cc,e.xc,e.ec,e.bc]);o[i++]=!0;for(var de=0,pe=fe.length;de<pe;de++){var me=o[--i];o[i++]=me&&e.tc+1<A(fe,de)}if(o[--i]){o[i++]=e.T;break}var ge=s([e.ac,e.cc,e.tc,e.ec,e.bc]);o[i++]=!0;for(var Ae=0,ve=ge.length;Ae<ve;Ae++){var be=o[--i];o[i++]=be&&e.xc+1<A(ge,Ae)}if(o[--i]){o[i++]=e.X;break}var ye=s([e.ac,e.tc,e.ec,e.bc]);o[i++]=!0;for(var we=0,xe=ye.length;we<xe;we++){var Ce=o[--i];o[i++]=Ce&&e.cc+1<A(ye,we)}if(o[--i]){if(e.cc<e.xc){o[i++]=e.C;break}if(e.cc==e.xc){if(o[i++]=e.i+e.k+1,e.XtermFirst(),o[--i]){o[i++]=e.X;break}o[i++]=e.C;break}}}e.k=e.k+1}}},e.addtocws=function(){var t=o[--i];y(e.cws,e.j,t),e.j=t.length+e.j},e.ECItocws=function(){var e=L(-o[--i]-1e6);if(o[i++]=e,e<=126){var t=o[--i];o[i++]=L(t+1),O(s(1))}else{var n=o[--i];if(o[i++]=n,n<=16382){var r=L(o[--i]-127);o[i++]=128+~~(r/254),o[i++]=L(r%254+1),O(s(2))}else{var a=L(o[--i]-16383);o[i++]=192+~~(a/64516),o[i++]=~~(a/254)%254+1,o[i++]=L(a%254+1),O(s(3))}}},e.encA=function(){for(var t=0;t<1;t++){if(A(e.isECI,e.i)){o[i++]=A(e.Avals,e.eci),e.addtocws(),o[i++]=A(e.msg,e.i),e.ECItocws(),e.addtocws(),e.i=e.i+1;break}if(A(e.numD,e.i)>=2){var n=c(2);v(n,0,A(e.msg,e.i)),v(n,1,A(e.msg,e.i+1)),o[i++]=A(e.Avals,n),e.addtocws(),e.i=e.i+2;break}o[i++]="newmode",e.lookup();var r=o[--i];if(e[o[--i]]=r,e.newmode!=e.mode){o[i++]=A(e.Avals,A(s([-1,e.lC,e.lT,e.lX,e.lE,e.lB]),e.newmode)),e.addtocws(),e.mode=e.newmode;break}o[i++]=A(e.Avals,A(e.msg,e.i)),e.addtocws(),e.i=e.i+1;break}},e.CTXvalstocws=function(){e.in=o[--i],o[i++]=1/0;for(var t=0,n=e.in.length-1;t<=n;t+=3){var r=b(e.in,t,3);o[i++]=0;for(var a=0,u=r.length;a<u;a++){var c=o[--i];o[i++]=40*L(c+A(r,a))}var l=1+~~(o[--i]/40);o[i++]=~~(l/256),o[i++]=l%256}O(s(S()));var h=o[--i],f=o[--i];o[i++]=h,o[i++]=f,i--},e.encCTX=function(){for(e.p=0,e.ctxvals=s(2500),e.done=!1;e.i!=e.msglen;){if(!(void 0!==A(A(e.encvals,e.mode),A(e.msg,e.i))))break;if(e.p%3==0){if(e.p>0){o[i++]="newmode",e.lookup();var t=o[--i];if(e[o[--i]]=t,D(e.newmode,e.mode)){o[i++]=b(e.ctxvals,0,e.p),e.CTXvalstocws(),e.addtocws(),o[i++]=s([e.unlcw]),e.addtocws(),e.newmode!=e.A&&(o[i++]=A(e.Avals,A(s([-1,e.lC,e.lT,e.lX,e.lE,e.lB]),e.newmode)),e.addtocws()),e.mode=e.newmode,e.done=!0;break}}if(e.msglen-e.i<=3){e.remcws=A(e.numremcws,e.j+2*~~(e.p/3)),o[i++]=1/0;for(var n=b(e.msg,e.i,e.msglen-e.i),r=0,a=n.length;r<a;r++){var u=A(n,r),l=void 0!==A(A(e.encvals,e.mode),u);o[i++]=u,l?_(A(A(e.encvals,e.mode),o[--i])):(i--,o[i++]=-1,o[i++]=-1,o[i++]=-1,o[i++]=-1)}if(e.remvals=s(),2==e.remcws&&3==e.remvals.length){o[i++]=1/0,_(b(e.ctxvals,0,e.p)),_(e.remvals);var h=s();o[i++]=h,e.CTXvalstocws(),e.addtocws(),e.mode=e.A,e.i=e.msglen,e.done=!0;break}if(2==e.remcws&&2==e.remvals.length&&e.mode!=e.X){o[i++]=1/0,_(b(e.ctxvals,0,e.p)),_(e.remvals),_(A(A(e.encvals,e.mode),e.sft1));var f=s();o[i++]=f,e.CTXvalstocws(),e.addtocws(),e.mode=e.A,e.i=e.msglen,e.done=!0;break}if(2==e.remcws&&1==e.remvals.length){o[i++]=b(e.ctxvals,0,e.p),e.CTXvalstocws(),e.addtocws(),o[i++]=s([e.unlcw]),e.addtocws(),o[i++]=A(e.Avals,A(e.msg,e.i)),e.addtocws(),e.mode=e.A,e.i=e.msglen,e.done=!0;break}if(1==e.remcws&&1==e.remvals.length){o[i++]=b(e.ctxvals,0,e.p),e.CTXvalstocws(),e.addtocws(),o[i++]=A(e.Avals,A(e.msg,e.i)),e.addtocws(),e.mode=e.A,e.i=e.msglen,e.done=!0;break}}}var d=A(A(e.encvals,e.mode),A(e.msg,e.i));y(e.ctxvals,e.p,d),e.p=d.length+e.p,e.i=e.i+1}if(!e.done){for(;e.p%3!=0;)e.i=e.i-1,e.p=e.p-A(A(e.encvals,e.mode),A(e.msg,e.i)).length;o[i++]=1/0,_(b(e.ctxvals,0,e.p));var p=s();if(o[i++]=p,e.CTXvalstocws(),e.addtocws(),o[i++]=s([e.unlcw]),e.addtocws(),e.mode=e.A,e.i!=e.msglen&&P(A(e.isECI,e.i)))if(A(e.numD,e.i)>=2){var m=c(2);v(m,0,A(e.msg,e.i)),v(m,1,A(e.msg,e.i+1)),o[i++]=A(e.Avals,m),e.addtocws(),e.i=e.i+2}else o[i++]=A(e.Avals,A(e.msg,e.i)),e.addtocws(),e.i=e.i+1}},e.Evalstocws=function(){e.in=o[--i],e.inlen=e.in.length,e.outlen=~~Math.ceil(e.in.length/4*3),o[i++]=1/0,_(e.in),o[i++]=0,o[i++]=0,o[i++]=0,e.in=s(),o[i++]=1/0;for(var t=0,n=e.inlen-1;t<=n;t+=4){var r=b(e.in,t,4);o[i++]=0;for(var a=0,u=r.length;a<u;a++){var c=o[--i];o[i++]=F(c,A(r,a))<<6}var l=o[--i]>>>6;o[i++]=l>>>16&255,o[i++]=l>>>8&255,o[i++]=255&l}O(s(S()));var h=o[--i],f=o[--i];o[i++]=h,o[i++]=f,i--;var d=b(o[--i],0,e.outlen);o[i++]=d},e.encE=function(){for(e.p=0,e.edifactvals=s(2100);e.i!=e.msglen;){if(!(void 0!==A(e.Evals,A(e.msg,e.i))))break;if(e.p%4==0){if(e.msglen-e.i<=2){e.remcws=A(e.numremcws,e.j+3*~~(e.p/4)),o[i++]=1/0;for(var t=b(e.msg,e.i,e.msglen-e.i),n=0,r=t.length;n<r;n++)_(A(e.Avals,A(t,n)));if(e.remvals=s(),(1==e.remcws||2==e.remcws)&&e.remvals.length<=e.remcws){o[i++]=b(e.edifactvals,0,e.p),e.Evalstocws(),e.addtocws(),o[i++]=e.remvals,e.addtocws(),e.mode=e.A,e.i=e.msglen;break}}if(e.lookup(),o[--i]!=e.mode)break}var a=A(e.Evals,A(e.msg,e.i));y(e.edifactvals,e.p,a),e.p=a.length+e.p,e.i=e.i+1}if(e.mode!=e.A){if(e.remcws=L(A(e.numremcws,e.j+3*~~(e.p/4)-1)-1),e.p%4!=0||e.i!=e.msglen||e.remcws>=3){var u=A(e.Evals,e.unl);y(e.edifactvals,e.p,u),e.p=u.length+e.p}if(o[i++]=b(e.edifactvals,0,e.p),e.Evalstocws(),e.addtocws(),e.mode=e.A,e.i!=e.msglen&&P(A(e.isECI,e.i)))if(A(e.numD,e.i)>=2){var l=c(2);v(l,0,A(e.msg,e.i)),v(l,1,A(e.msg,e.i+1)),o[i++]=A(e.Avals,l),e.addtocws(),e.i=e.i+2}else o[i++]=A(e.Avals,A(e.msg,e.i)),e.addtocws(),e.i=e.i+1}},e.encB=function(){for(e.p=0,e.bvals=s(1558);e.i!=e.msglen&&(e.lookup(),o[--i]==e.mode);)v(e.bvals,e.p,A(e.msg,e.i)),e.p=e.p+1,e.i=e.i+1;e.remcws=L(A(e.numremcws,e.j+e.p)-1),o[i++]=1/0,0==e.remcws&&e.i==e.msglen?o[i++]=0:e.p<250?o[i++]=e.p:(o[i++]=249+~~(e.p/250),o[i++]=e.p%250),_(b(e.bvals,0,e.p)),e.bvals=s();for(var t=0,n=e.bvals.length-1;t<=n;t+=1){e.p=t;var r=L(149*(e.j+e.p+1)%255+1+A(e.bvals,e.p));if(o[i++]=r,r>=256){var a=o[--i];o[i++]=L(a-256)}v(e.bvals,e.p,o[--i])}o[i++]=e.bvals,e.addtocws(),e.mode=e.A},e.cws=s(1558),e.mode=e.A,e.i=0,e.j=0;!(e.i>=e.msglen)&&!0!==e[A(s(["encA","encCTX","encCTX","encCTX","encE","encB"]),e.mode)](););e.cws=b(e.cws,0,e.j)}if(e.datlen=e.cws.length,e.remcws=L(A(e.numremcws,e.j-1)-1),e.remcws>0){o[i++]=1/0,_(e.cws);for(var pe=0,me=e.remcws;pe<me;pe++)o[i++]=129;e.cws=s();for(var ge=e.datlen+1,Ae=L(L(e.datlen+e.remcws)-1);ge<=Ae;ge+=1){e.i=ge;var ve=149*(e.i+1)%253+1+129;if(o[i++]=ve,ve>254){var be=o[--i];o[i++]=L(be-254)}v(e.cws,e.i,o[--i])}}for(void 0!==A(e.options,"debugcws")&&(o[i++]="bwipp.debugcws#18715",o[i++]=e.cws,z()),e.i=0;e.m=A(e.metrics,e.i),e.rows=A(e.m,0),e.cols=A(e.m,1),e.regh=A(e.m,2),e.regv=A(e.m,3),e.rscw=A(e.m,4),e.rsbl=A(e.m,5),e.mrows=L(e.rows-2*e.regh),e.mcols=L(e.cols-2*e.regv),e.rrows=~~(e.mrows/e.regh),e.rcols=~~(e.mcols/e.regv),e.ncws=L(~~(e.mrows*e.mcols/8)-e.rscw),e.okay=!0,e.cws.length!=e.ncws&&(e.okay=!1),0!=e.urows&&e.urows!=e.rows&&(e.okay=!1),0!=e.ucols&&e.ucols!=e.cols&&(e.okay=!1),T(e.format,"square")&&D(e.rows,e.cols)&&(e.okay=!1),T(e.format,"rectangle")&&T(e.rows,e.cols)&&(e.okay=!1),!e.okay;)e.i=e.i+1;e.cwbs=s(e.rsbl),e.ecbs=s(e.rsbl);for(var ye=0,we=L(e.rsbl-1);ye<=we;ye+=1){e.i=ye,1558!=e.cws.length?e.cwbsize=~~(e.cws.length/e.rsbl):e.i<=7?e.cwbsize=156:e.cwbsize=155,e.cwb=s(e.cwbsize);for(var xe=0,Ce=e.cwbsize-1;xe<=Ce;xe+=1)e.j=xe,v(e.cwb,e.j,A(e.cws,L(e.j*e.rsbl+e.i)));v(e.cwbs,e.i,e.cwb),o[i++]=e.ecbs,o[i++]=e.i,o[i++]=1/0;for(var ke=0,Ee=~~(e.rscw/e.rsbl);ke<Ee;ke++)o[i++]=0;var Se=s(),_e=o[--i];v(o[--i],_e,Se)}nt.$ctx._18765||function(){var t=Object.create(e);o[i++]=1/0,o[i++]=1;for(var n=0;n<255;n++){var r=o[--i],a=2*r;if(o[i++]=r,o[i++]=a,a>=256){var u=o[--i];o[i++]=301^u}}t.rsalog=s(),t.rslog=s(256);for(var c=1;c<=255;c+=1)v(t.rslog,A(t.rsalog,c),c);for(var l in t)t.hasOwnProperty(l)&&(nt.$ctx[l]=t[l]);nt.$ctx._18765=1}(),e.rsprod=function(){var t=o[--i],n=o[--i];if(o[i++]=n,o[i++]=t,0!=t&&0!=n){var r=A(e.rslog,o[--i]),a=A(e.rsalog,L(r+A(e.rslog,o[--i]))%255);o[i++]=a}else i-=2,o[i++]=0},o[i++]=1/0,o[i++]=1;for(var Oe=0,Te=~~(e.rscw/e.rsbl);Oe<Te;Oe++)o[i++]=0;e.coeffs=s();for(var De=1,Be=~~(e.rscw/e.rsbl);De<=Be;De+=1){e.i=De,v(e.coeffs,e.i,A(e.coeffs,e.i-1));for(var Ie=e.i-1;Ie>=1;Ie-=1){e.j=Ie,o[i++]=e.coeffs,o[i++]=e.j,o[i++]=A(e.coeffs,e.j-1),o[i++]=A(e.coeffs,e.j),o[i++]=A(e.rsalog,e.i),e.rsprod();var Me=o[--i],je=o[--i],Ne=o[--i];v(o[--i],Ne,R(je,Me))}o[i++]=e.coeffs,o[i++]=0,o[i++]=A(e.coeffs,0),o[i++]=A(e.rsalog,e.i),e.rsprod();var Fe=o[--i],Re=o[--i];v(o[--i],Re,Fe)}e.coeffs=b(e.coeffs,0,e.coeffs.length-1);for(var Pe=0,Le=e.cwbs.length-1;Pe<=Le;Pe+=1){e.i=Pe,e.cwb=A(e.cwbs,e.i),e.ecb=A(e.ecbs,e.i);for(var Ue=0,ze=e.cwb.length-1;Ue<=ze;Ue+=1){e.t=R(A(e.cwb,Ue),A(e.ecb,0));for(var He=e.ecb.length-1;He>=0;He-=1){e.j=He,e.p=e.ecb.length-e.j-1,o[i++]=e.ecb,o[i++]=e.p,o[i++]=e.t,o[i++]=A(e.coeffs,e.j),e.rsprod();var $e=o[--i],Qe=o[--i];v(o[--i],Qe,$e),e.j>0&&v(e.ecb,e.p,R(A(e.ecb,e.p+1),A(e.ecb,e.p)))}}}if(1558==e.ncws){o[i++]=1/0;for(var Ve=b(e.ecbs,8,2),qe=0,Ge=Ve.length;qe<Ge;qe++)o[i++]=A(Ve,qe);for(var We=b(e.ecbs,0,8),Ke=0,Ye=We.length;Ke<Ye;Ke++)o[i++]=A(We,Ke);e.ecbs=s()}o[i++]=1/0;for(var Xe=e.cws,Je=0,Ze=Xe.length;Je<Ze;Je++)o[i++]=A(Xe,Je);for(var et=0,tt=e.rscw;et<tt;et++)o[i++]=0;e.cws=s();for(var rt=0,it=L(e.rscw-1);rt<=it;rt+=1)e.i=rt,v(e.cws,L(e.ncws+e.i),A(A(e.ecbs,e.i%e.rsbl),~~(e.i/e.rsbl)));e.module=function(){var t=o[--i],n=o[--i],r=o[--i],a=f(c(8),"00000000"),s=m(c(8),o[--i],2);y(a,8-s.length,s),o[i++]=r,o[i++]=n,o[i++]=t,o[i++]=a;for(var u=7;u>=0;u-=1){var l=o[--i];o[i++]=L(A(l,u)-48),o[i++]=l}i--;var h=o[--i],d=o[--i],p=o[--i],g=o[--i],b=o[--i],w=o[--i],x=o[--i],C=o[--i],E=o[--i],S=o[--i],_=o[--i];o[i++]=C,o[i++]=x,o[i++]=w,o[i++]=b,o[i++]=g,o[i++]=p,o[i++]=d,o[i++]=h,o[i++]=_,o[i++]=S,k(E,(function(){if(!0===o[--i]())return!0;var t=o[--i],n=o[--i];if(o[i++]=n,o[i++]=t,n<0){var r=o[--i],a=o[--i];o[i++]=L(a+e.mrows),o[i++]=L(r+L(4-L(e.mrows+4)%8))}var s=o[--i];if(o[i++]=s,s<0){var u=o[--i],c=o[--i];o[i++]=L(c+L(4-L(e.mcols+4)%8)),o[i++]=L(u+e.mcols)}var l=o[--i],h=o[--i];if(o[i++]=h,o[i++]=l,h>=e.mrows){var f=o[--i],d=o[--i];o[i++]=L(d-e.mrows),o[i++]=f}var p=o[--i],m=o[--i],g=o[--i],A=o[--i];v(e.mmat,L(p+m*e.mcols),o[--i]),o[i++]=A,o[i++]=g}))};var ot=s([function(){var e=o[--i],t=o[--i];o[i++]=t,o[i++]=e,o[i++]=L(t-2),o[i++]=L(e-2)},function(){var e=o[--i],t=o[--i];o[i++]=t,o[i++]=e,o[i++]=L(t-2),o[i++]=L(e-1)},function(){var e=o[--i],t=o[--i];o[i++]=t,o[i++]=e,o[i++]=L(t-1),o[i++]=L(e-2)},function(){var e=o[--i],t=o[--i];o[i++]=t,o[i++]=e,o[i++]=L(t-1),o[i++]=L(e-1)},function(){var e=o[--i],t=o[--i];o[i++]=t,o[i++]=e,o[i++]=L(t-1),o[i++]=e},function(){var e=o[--i],t=o[--i];o[i++]=t,o[i++]=e,o[i++]=t,o[i++]=L(e-2)},function(){var e=o[--i],t=o[--i];o[i++]=t,o[i++]=e,o[i++]=t,o[i++]=L(e-1)},function(){var e=o[--i],t=o[--i];o[i++]=t,o[i++]=e,o[i++]=t,o[i++]=e}]);e.dmn=ot;var at=s([function(){o[i++]=L(e.mrows-1),o[i++]=0},function(){o[i++]=L(e.mrows-1),o[i++]=1},function(){o[i++]=L(e.mrows-1),o[i++]=2},function(){o[i++]=0,o[i++]=L(e.mcols-2)},function(){o[i++]=0,o[i++]=L(e.mcols-1)},function(){o[i++]=1,o[i++]=L(e.mcols-1)},function(){o[i++]=2,o[i++]=L(e.mcols-1)},function(){o[i++]=3,o[i++]=L(e.mcols-1)}]);e.dmc1=at;var st=s([function(){o[i++]=L(e.mrows-3),o[i++]=0},function(){o[i++]=L(e.mrows-2),o[i++]=0},function(){o[i++]=L(e.mrows-1),o[i++]=0},function(){o[i++]=0,o[i++]=L(e.mcols-4)},function(){o[i++]=0,o[i++]=L(e.mcols-3)},function(){o[i++]=0,o[i++]=L(e.mcols-2)},function(){o[i++]=0,o[i++]=L(e.mcols-1)},function(){o[i++]=1,o[i++]=L(e.mcols-1)}]);e.dmc2=st;var ut=s([function(){o[i++]=L(e.mrows-3),o[i++]=0},function(){o[i++]=L(e.mrows-2),o[i++]=0},function(){o[i++]=L(e.mrows-1),o[i++]=0},function(){o[i++]=0,o[i++]=L(e.mcols-2)},function(){o[i++]=0,o[i++]=L(e.mcols-1)},function(){o[i++]=1,o[i++]=L(e.mcols-1)},function(){o[i++]=2,o[i++]=L(e.mcols-1)},function(){o[i++]=3,o[i++]=L(e.mcols-1)}]);e.dmc3=ut;var ct=s([function(){o[i++]=L(e.mrows-1),o[i++]=0},function(){o[i++]=L(e.mrows-1),o[i++]=L(e.mcols-1)},function(){o[i++]=0,o[i++]=L(e.mcols-3)},function(){o[i++]=0,o[i++]=L(e.mcols-2)},function(){o[i++]=0,o[i++]=L(e.mcols-1)},function(){o[i++]=1,o[i++]=L(e.mcols-3)},function(){o[i++]=1,o[i++]=L(e.mcols-2)},function(){o[i++]=1,o[i++]=L(e.mcols-1)}]);e.dmc4=ct,o[i++]=1/0;for(var lt=0,ht=e.mrows*e.mcols;lt<ht;lt++)o[i++]=-1;e.mmat=s();for(var ft=e.cws.length-1;ft>=0;ft-=1)o[i++]=A(e.cws,ft);for(o[i++]=4,o[i++]=0;;){var dt=o[--i],pt=o[--i];o[i++]=pt,o[i++]=dt,0==dt&&pt==e.mrows&&(o[i++]=e.dmc1,e.module());var mt=o[--i],gt=o[--i];o[i++]=gt,o[i++]=mt,0==mt&&gt==L(e.mrows-2)&&e.mcols%4!=0&&(o[i++]=e.dmc2,e.module());var At=o[--i],vt=o[--i];o[i++]=vt,o[i++]=At,0==At&&vt==L(e.mrows-2)&&e.mcols%8==4&&(o[i++]=e.dmc3,e.module());var bt=o[--i],yt=o[--i];for(o[i++]=yt,o[i++]=bt,2==bt&&yt==L(e.mrows+4)&&e.mcols%8==0&&(o[i++]=e.dmc4,e.module());;){var wt=o[--i],xt=o[--i];if(o[i++]=xt,o[i++]=wt,wt>=0&&xt<e.mrows){var Ct=o[--i],kt=o[--i];o[i++]=kt,o[i++]=Ct,-1==A(e.mmat,L(Ct+kt*e.mcols))&&(o[i++]=e.dmn,e.module())}var Et=o[--i],St=o[--i];if(o[i++]=L(St-2),o[i++]=L(Et+2),!(L(Et+2)<e.mcols&&L(St-2)>=0))break}var _t=o[--i],Ot=o[--i];for(o[i++]=L(Ot+1),o[i++]=L(_t+3);;){var Tt=o[--i],Dt=o[--i];if(o[i++]=Dt,o[i++]=Tt,Tt<e.mcols&&Dt>=0){var Bt=o[--i],It=o[--i];o[i++]=It,o[i++]=Bt,-1==A(e.mmat,L(Bt+It*e.mcols))&&(o[i++]=e.dmn,e.module())}var Mt=o[--i],jt=o[--i];if(o[i++]=L(jt+2),o[i++]=L(Mt-2),!(L(Mt-2)>=0&&L(jt+2)<e.mrows))break}var Nt=o[--i],Ft=o[--i];if(o[i++]=L(Ft+3),o[i++]=L(Nt+1),!(L(Nt+1)<e.mcols||L(Ft+3)<e.mrows)){i-=2;break}}-1==A(e.mmat,L(e.mrows*e.mcols-1))&&(y(e.mmat,L(e.mrows*L(e.mcols-1)-2),s([1,0])),y(e.mmat,L(e.mrows*e.mcols-2),s([0,1]))),e.pixs=s(e.rows*e.cols),e.cwpos=0;for(var Rt=0,Pt=L(e.rows-1);Rt<=Pt;Rt+=1){if(e.i=Rt,e.i%(e.rrows+2)==0){o[i++]=e.pixs,o[i++]=e.i*e.cols,o[i++]=1/0;for(var Lt=0,Ut=~~(e.cols/2);Lt<Ut;Lt++)o[i++]=1,o[i++]=0;var zt=s(),Ht=o[--i];y(o[--i],Ht,zt)}if(e.i%(e.rrows+2)==e.rrows+1){o[i++]=e.pixs,o[i++]=e.i*e.cols,o[i++]=1/0;for(var $t=0,Qt=e.cols;$t<Qt;$t++)o[i++]=1;var Vt=s(),qt=o[--i];y(o[--i],qt,Vt)}if(e.i%(e.rrows+2)!=0&&e.i%(e.rrows+2)!=e.rrows+1)for(var Gt=0,Wt=L(e.cols-1);Gt<=Wt;Gt+=1)e.j=Gt,e.j%(e.rcols+2)==0&&v(e.pixs,L(e.i*e.cols+e.j),1),e.j%(e.rcols+2)==e.rcols+1&&v(e.pixs,L(e.i*e.cols+e.j),e.i%2),e.j%(e.rcols+2)!=0&&e.j%(e.rcols+2)!=e.rcols+1&&(v(e.pixs,L(e.i*e.cols+e.j),A(e.mmat,e.cwpos)),e.cwpos=e.cwpos+1)}var Kt=new Map([["ren",Q],["pixs",e.pixs],["pixx",e.cols],["pixy",e.rows],["height",2*e.rows/72],["width",2*e.cols/72],["opt",e.options]]);o[i++]=Kt,e.dontdraw||Q()}function rt(){var e=Object.create(rt.$ctx||(rt.$ctx={}));e.dontdraw=!1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],v(e.options,"dontdraw",!0),v(e.options,"format","rectangle"),o[i++]="args",o[i++]=e.barcode,o[i++]=e.options,nt();var t=o[--i];e[o[--i]]=t,v(e.args,"opt",e.options),o[i++]=e.args,e.dontdraw||Q()}function it(){var e=Object.create(it.$ctx||(it.$ctx={}));e.dontdraw=!1,e.dmre=!1,e.dindmre=!1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],v(e.options,"dontdraw",!0),e.dindmre||e.dmre?(v(e.options,"dmre",e.dmre),v(e.options,"dindmre",e.dindmre)):v(e.options,"dmre",!0),o[i++]="args",o[i++]=e.barcode,o[i++]=e.options,nt();var t=o[--i];e[o[--i]]=t,v(e.args,"opt",e.options),o[i++]=e.args,e.dontdraw||Q()}function ot(){var e=Object.create(ot.$ctx||(ot.$ctx={}));e.type="unset",e.parse=!1,e.dontdraw=!1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i];var t=new Map([["parse",e.parse],["parseonly",!0],["parsefnc",!1]]);e.fncvals=t,o[i++]="barcode",o[i++]=e.barcode,o[i++]=e.fncvals,H();var n=o[--i];e[o[--i]]=n,e.barlen=e.barcode.length,delete e.options.parse;var r=e.type;D(r,"7")&&D(r,"9")&&D(r,"29")&&(o[i++]="bwipp.mailmarkBadType#19120",o[i++]="Royal Mail Mailmark type must be 7, 9 or 29",z());var a=new Map([["7","24x24"],["9","32x32"],["29","16x48"]]);e.version=A(a,e.type);var s=new Map([["7","square"],["9","square"],["29","rectangle"]]);e.format=A(s,e.type),e.barcode.length<45&&(o[i++]="bwipp.mailmarkBadLength#19136",o[i++]="Royal Mail Mailmark must contain at least 45 characters of Mailmark formatted data, including any required space padding",z()),D(b(e.barcode,0,4),"JGB ")&&(o[i++]="bwipp.mailmarkBadIndicator#19139",o[i++]="Royal Mail Mailmark must begin with JGB<space> identifier",z()),v(e.options,"dontdraw",!0),v(e.options,"version",e.version),v(e.options,"format",e.format),v(e.options,"c40headerlength",45),o[i++]="args",o[i++]=e.barcode,o[i++]=e.options,nt();var u=o[--i];e[o[--i]]=u,v(e.args,"opt",e.options),o[i++]=e.args,e.dontdraw||Q()}function at(){var e=Object.create(at.$ctx||(at.$ctx={}));if(e.dontdraw=!1,e.format="unset",e.version="unset",e.eclevel="unset",e.parse=!1,e.parsefnc=!1,e.mask=-1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],D(e.version,"unset")?T(e.format,"unset")&&(o[i++]="full",T(b(e.version,0,1),"M")&&(i--,o[i++]="micro"),T(b(e.version,0,1),"R")&&(i--,o[i++]="rmqr"),e.format=o[--i]):T(e.format,"unset")&&(e.format="full"),T(e.eclevel,"unset")){o[i++]="eclevel",D(e.format,"micro")?o[i++]="M":o[i++]="L";var t=o[--i];e[o[--i]]=t}e.fn1=-1;var n=new Map([["parse",e.parse],["parsefnc",e.parsefnc],["eci",!0],["FNC1",e.fn1]]);e.fncvals=n,o[i++]="msg",o[i++]=e.barcode,o[i++]=e.fncvals,H();var r=o[--i];if(e[o[--i]]=r,e.msglen=e.msg.length,e.fnc1first=!1,e.msglen>0&&A(e.msg,0)==e.fn1){e.fnc1first=!0,o[i++]=1/0;for(var a=b(e.msg,1,e.msglen-1),l=0,h=a.length;l<h;l++){var f=A(a,l);if(o[i++]=f,37==f){var d=o[--i];o[i++]=d,o[i++]=d}}e.msg=s(),e.msglen=e.msg.length}at.$ctx._19356||function(){var t=Object.create(e),n=s(["v1to9","v10to26","v27to40","vM1","vM2","vM3","vM4","vR7x43","vR7x59","vR7x77","vR7x99","vR7x139","vR9x43","vR9x59","vR9x77","vR9x99","vR9x139","vR11x27","vR11x43","vR11x59","vR11x77","vR11x99","vR11x139","vR13x27","vR13x43","vR13x59","vR13x77","vR13x99","vR13x139","vR15x43","vR15x59","vR15x77","vR15x99","vR15x139","vR17x43","vR17x59","vR17x77","vR17x99","vR17x139"]);o[i++]=0;for(var r=0,a=n.length;r<a;r++){var c=o[--i];e[A(n,r)]=c,o[i++]=L(c+1)}i--,t.N=0,t.A=1,t.B=2,t.K=3,t.E=4,o[i++]=1/0,o[i++]=1/0;for(var l=48;l<=57;l+=1)o[i++]=l;for(var h=s(),f=0,d=h.length;f<d;f++)o[i++]=A(h,f),o[i++]=-1;t.Nexcl=u(),o[i++]=1/0,o[i++]=1/0,o[i++]=32,o[i++]=36,o[i++]=37,o[i++]=42,o[i++]=43,o[i++]=45,o[i++]=46,o[i++]=47,o[i++]=58;for(var p=65;p<=90;p+=1)o[i++]=p;o[i++]=t.fn1;for(var m=s(),g=0,b=m.length;g<b;g++)o[i++]=A(m,g),o[i++]=-1;t.Aexcl=u(),o[i++]=1/0,o[i++]=1/0;for(var y=129;y<=159;y+=1)o[i++]=y;for(var w=224;w<=235;w+=1)o[i++]=w;for(var x=s(),C=0,k=x.length;C<k;C++)o[i++]=A(x,C),o[i++]=-1;t.Kexcl=u(),o[i++]=1/0,o[i++]=s(["0001","0010","0100","1000","0111"]),o[i++]=s(["0001","0010","0100","1000","0111"]),o[i++]=s(["0001","0010","0100","1000","0111"]),o[i++]=s(["",-1,-1,-1,-1]),o[i++]=s(["0","1",-1,-1,-1]),o[i++]=s(["00","01","10","11",-1]),o[i++]=s(["000","001","010","011",-1]);for(var E=0;E<32;E++)o[i++]=s(["001","010","011","100","111"]);t.mids=s(),t.cclens=s([s([10,9,8,8]),s([12,11,16,10]),s([14,13,16,12]),s([3,-1,-1,-1]),s([4,3,-1,-1]),s([5,4,4,3]),s([6,5,5,4]),s([4,3,3,2]),s([5,5,4,3]),s([6,5,5,4]),s([7,6,5,5]),s([7,6,6,5]),s([5,5,4,3]),s([6,5,5,4]),s([7,6,5,5]),s([7,6,6,5]),s([8,7,6,6]),s([4,4,3,2]),s([6,5,5,4]),s([7,6,5,5]),s([7,6,6,5]),s([8,7,6,6]),s([8,7,7,6]),s([5,5,4,3]),s([6,6,5,5]),s([7,6,6,5]),s([7,7,6,6]),s([8,7,7,6]),s([8,8,7,7]),s([7,6,6,5]),s([7,7,6,5]),s([8,7,7,6]),s([8,7,7,6]),s([9,8,7,7]),s([7,6,6,5]),s([8,7,6,6]),s([8,7,7,6]),s([8,8,7,6]),s([9,8,8,7])]),o[i++]=1/0;for(var S=0;S<3;S++)o[i++]=4;o[i++]=3,o[i++]=5,o[i++]=7,o[i++]=9;for(var _=0;_<32;_++)o[i++]=3;t.termlens=s(),t.padstrs=s(["11101100","00010001"]),t.charmap="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",t.charvals=new Map;for(var O=0;O<=44;O+=1)v(t.charvals,A(t.charmap,O),O);for(var T in t)t.hasOwnProperty(T)&&(at.$ctx[T]=t[T]);at.$ctx._19356=1}(),e.tobin=function(){var e=c(o[--i]);o[i++]=e;for(var t=0,n=e.length-1;t<=n;t+=1){var r=o[--i];v(r,t,48),o[i++]=r}var a=o[--i],s=m(c(a.length),o[--i],2);y(a,a.length-s.length,s),o[i++]=a},e.encA=function(){for(e.in=o[--i],e.fnc1first&&(o[i++]=1/0,k(e.in,(function(){var t=o[--i];o[i++]=t,t==e.fn1&&(i--,o[i++]=37)})),e.in=s()),e.out=c(1+~~(11*e.in.length/2)),e.k=0,e.m=0;e.k!=e.in.length;){e.k<e.in.length-1?(o[i++]=L(45*A(e.charvals,A(e.in,e.k))+A(e.charvals,A(e.in,e.k+1))),o[i++]=11,e.tobin(),e.k=e.k+2):(o[i++]=A(e.charvals,A(e.in,e.k)),o[i++]=6,e.tobin(),e.k=e.k+1);var t=o[--i];y(e.out,e.m,t),e.m=t.length+e.m}o[i++]=b(e.out,0,e.m)},e.encN=function(){for(e.in=o[--i],e.out=c(1+~~(10*e.in.length/3)),e.k=0,e.m=0;e.k!=e.in.length;){if(e.k<e.in.length-2){var t=b(e.in,e.k,3);o[i++]=0;for(var n=0,r=t.length;n<r;n++){var a=o[--i];o[i++]=L(A(t,n)+L(10*a-48))}o[i++]=10,e.tobin(),e.k=e.k+3}else if(e.k==e.in.length-2){var s=b(e.in,e.k,2);o[i++]=0;for(var u=0,l=s.length;u<l;u++){var h=o[--i];o[i++]=L(A(s,u)+L(10*h-48))}o[i++]=7,e.tobin(),e.k=e.k+2}else{var f=b(e.in,e.k,1);o[i++]=0;for(var d=0,p=f.length;d<p;d++){var m=o[--i];o[i++]=L(A(f,d)+L(10*m-48))}o[i++]=4,e.tobin(),e.k=e.k+1}var g=o[--i];y(e.out,e.m,g),e.m=g.length+e.m}o[i++]=b(e.out,0,e.m)},e.encB=function(){e.in=o[--i],e.fnc1first&&(o[i++]=1/0,k(e.in,(function(){var t=o[--i];o[i++]=t,t==e.fn1&&(i--,o[i++]=29)})),e.in=s()),e.out=c(8*e.in.length);for(var t=0,n=e.in.length-1;t<=n;t+=1)e.k=t,o[i++]=p(A(e.in,e.k)),o[i++]=8,e.tobin(),y(e.out,8*e.k,o[--i]);o[i++]=e.out},e.encK=function(){for(e.in=o[--i],e.out=c(13*~~(e.in.length/2)),e.k=0,e.m=0;e.k!=e.in.length;){var t=L(256*A(e.in,e.k)+A(e.in,e.k+1));o[i++]=t,o[i++]=t<57408?33088:49472;var n=o[--i],r=L(o[--i]-n);o[i++]=L(192*(r>>>8)+(255&r)),o[i++]=13,e.tobin();var a=o[--i];y(e.out,e.m,a),e.m=a.length+e.m,e.k=e.k+2}o[i++]=e.out},e.encE=function(){var t=L(-A(o[--i],0)-1e6);if(o[i++]=t,t<=127)o[i++]=8,e.tobin();else{var n=o[--i];if(o[i++]=n,n<=16383){var r=o[--i];o[i++]=L(r+32768),o[i++]=16,e.tobin()}else{var a=o[--i];o[i++]=L(a+12582912),o[i++]=24,e.tobin()}}},e.encfuncs=s(["encN","encA","encB","encK","encE"]),e.addtobits=function(){var t=o[--i];y(e.bits,e.j,t),e.j=t.length+e.j},o[i++]=1/0;for(var g=0,w=e.msglen;g<w;g++)o[i++]=0;o[i++]=0,e.numNs=s(),o[i++]=1/0;for(var x=0,M=e.msglen;x<M;x++)o[i++]=0;o[i++]=0,e.numAs=s(),o[i++]=1/0;for(var F=0,$=e.msglen;F<$;F++)o[i++]=0;o[i++]=0,e.numAorNs=s(),o[i++]=1/0;for(var V=0,q=e.msglen;V<q;V++)o[i++]=0;o[i++]=0,e.numBs=s(),o[i++]=1/0;for(var G=0,W=e.msglen;G<W;G++)o[i++]=0;o[i++]=0,e.numKs=s(),o[i++]=1/0;for(var K=0,Y=e.msglen;K<Y;K++)o[i++]=0;o[i++]=9999,e.nextNs=s(),o[i++]=1/0;for(var X=0,J=e.msglen;X<J;X++)o[i++]=0;o[i++]=9999,e.nextBs=s(),o[i++]=1/0;for(var Z=0,ee=e.msglen;Z<ee;Z++)o[i++]=0;o[i++]=9999,e.nextAs=s(),o[i++]=1/0;for(var te=0,ne=e.msglen;te<ne;te++)o[i++]=0;o[i++]=9999,e.nextKs=s(),e.isECI=s(e.msglen);for(var re=e.msglen-1;re>=0;re-=1){if(e.i=re,e.barchar=A(e.msg,e.i),void 0!==A(e.Kexcl,e.barchar)){o[i++]="sjis",e.i+1<e.msglen?o[i++]=L(256*e.barchar+A(e.msg,e.i+1)):o[i++]=0;var ie=o[--i];e[o[--i]]=ie,e.sjis>=33088&&e.sjis<=40956||e.sjis>=57408&&e.sjis<=60351?(v(e.nextKs,e.i,0),v(e.numKs,e.i,L(A(e.numKs,e.i+2)+1))):v(e.nextKs,e.i,L(A(e.nextKs,e.i+1)+1))}else v(e.nextKs,e.i,L(A(e.nextKs,e.i+1)+1));void 0!==A(e.Nexcl,e.barchar)?(v(e.nextNs,e.i,0),v(e.numNs,e.i,L(A(e.numNs,e.i+1)+1)),v(e.numAorNs,e.i,L(A(e.numAorNs,e.i+1)+1))):v(e.nextNs,e.i,L(A(e.nextNs,e.i+1)+1)),void 0!==A(e.Aexcl,e.barchar)?(v(e.nextAs,e.i,0),v(e.numAs,e.i,L(A(e.numAs,e.i+1)+1)),v(e.numAorNs,e.i,L(A(e.numAorNs,e.i+1)+1))):v(e.nextAs,e.i,L(A(e.nextAs,e.i+1)+1)),v(e.isECI,e.i,e.barchar<=-1e6)}for(var oe=0,ae=e.msglen-1;oe<=ae;oe+=1)e.i=oe,A(e.numKs,e.i)>0&&(v(e.numKs,e.i+1,0),v(e.nextKs,e.i+1,L(A(e.nextKs,e.i+1)+1)));for(var se=e.msglen-1;se>=0;se-=1)e.i=se,0==L(A(e.numNs,e.i)+L(A(e.numAs,e.i)+A(e.numKs,e.i)))&&P(A(e.isECI,e.i))?(v(e.nextBs,e.i,0),v(e.numBs,e.i,L(A(e.numBs,e.i+1)+1))):v(e.nextBs,e.i,L(A(e.nextBs,e.i+1)+1));if(e.KbeforeB=function(){var t=A(o[--i],e.ver);o[i++]=j(e.numK,t)&&0==A(e.nextBs,L(2*e.numK+e.i))},e.KbeforeA=function(){var t=A(o[--i],e.ver);o[i++]=j(e.numK,t)&&0==A(e.nextAs,L(2*e.numK+e.i))},e.KbeforeN=function(){var t=A(o[--i],e.ver);o[i++]=j(e.numK,t)&&0==A(e.nextNs,L(2*e.numK+e.i))},e.KbeforeE=function(){var t=A(o[--i],e.ver);o[i++]=j(e.numK,t)&&L(2*e.numK+e.i)==e.msglen},e.AbeforeK=function(){var t=A(o[--i],e.ver);o[i++]=j(e.numA,t)&&0==A(e.nextKs,L(e.numA+e.i))},e.AbeforeB=function(){var t=A(o[--i],e.ver);o[i++]=j(e.numA,t)&&0==A(e.nextBs,L(e.numA+e.i))},e.AbeforeN=function(){var t=A(o[--i],e.ver);o[i++]=j(e.numA,t)&&0==A(e.nextNs,L(e.numA+e.i))},e.AbeforeE=function(){var t=A(o[--i],e.ver);o[i++]=j(e.numA,t)&&L(e.numA+e.i)==e.msglen},e.NbeforeK=function(){var t=A(o[--i],e.ver);o[i++]=j(e.numN,t)&&0==A(e.nextKs,L(e.numN+e.i))},e.NbeforeB=function(){var t=A(o[--i],e.ver);o[i++]=j(e.numN,t)&&0==A(e.nextBs,L(e.numN+e.i))},e.NbeforeA=function(){var t=A(o[--i],e.ver);o[i++]=j(e.numN,t)&&0==A(e.nextAs,L(e.numN+e.i))},e.NbeforeE=function(){var t=A(o[--i],e.ver);o[i++]=j(e.numN,t)&&L(e.numN+e.i)==e.msglen},e.AorNbeforeB=function(){var t=A(o[--i],e.ver);o[i++]=j(e.numAorN,t)&&0==A(e.nextBs,L(e.numAorN+e.i))},e.AorNbeforeE=function(){var t=A(o[--i],e.ver);o[i++]=j(e.numAorN,t)&&L(e.numAorN+e.i)==e.msglen},e.nextNslt=function(){if(A(e.nextNs,e.i)>=e.msglen)i--,o[i++]=!0;else{var t=A(o[--i],e.ver);o[i++]=B(A(e.numNs,L(A(e.nextNs,e.i)+e.i)),t)}},at.$ctx._19556||function(){var t=Object.create(e);o[i++]=1/0;for(var n=0;n<=9;n+=1)o[i++]=m(c(2),n,10),o[i++]=t.v1to9;for(var r=10;r<=26;r+=1)o[i++]=m(c(2),r,10),o[i++]=t.v10to26;for(var a=27;a<=40;a+=1)o[i++]=m(c(2),a,10),o[i++]=t.v27to40;for(var l in o[i++]="M1",o[i++]=t.vM1,o[i++]="M2",o[i++]=t.vM2,o[i++]="M3",o[i++]=t.vM3,o[i++]="M4",o[i++]=t.vM4,o[i++]="R7x43",o[i++]=t.vR7x43,o[i++]="R7x59",o[i++]=t.vR7x59,o[i++]="R7x77",o[i++]=t.vR7x77,o[i++]="R7x99",o[i++]=t.vR7x99,o[i++]="R7x139",o[i++]=t.vR7x139,o[i++]="R9x43",o[i++]=t.vR9x43,o[i++]="R9x59",o[i++]=t.vR9x59,o[i++]="R9x77",o[i++]=t.vR9x77,o[i++]="R9x99",o[i++]=t.vR9x99,o[i++]="R9x139",o[i++]=t.vR9x139,o[i++]="R11x27",o[i++]=t.vR11x27,o[i++]="R11x43",o[i++]=t.vR11x43,o[i++]="R11x59",o[i++]=t.vR11x59,o[i++]="R11x77",o[i++]=t.vR11x77,o[i++]="R11x99",o[i++]=t.vR11x99,o[i++]="R11x139",o[i++]=t.vR11x139,o[i++]="R13x27",o[i++]=t.vR13x27,o[i++]="R13x43",o[i++]=t.vR13x43,o[i++]="R13x59",o[i++]=t.vR13x59,o[i++]="R13x77",o[i++]=t.vR13x77,o[i++]="R13x99",o[i++]=t.vR13x99,o[i++]="R13x139",o[i++]=t.vR13x139,o[i++]="R15x43",o[i++]=t.vR15x43,o[i++]="R15x59",o[i++]=t.vR15x59,o[i++]="R15x77",o[i++]=t.vR15x77,o[i++]="R15x99",o[i++]=t.vR15x99,o[i++]="R15x139",o[i++]=t.vR15x139,o[i++]="R17x43",o[i++]=t.vR17x43,o[i++]="R17x59",o[i++]=t.vR17x59,o[i++]="R17x77",o[i++]=t.vR17x77,o[i++]="R17x99",o[i++]=t.vR17x99,o[i++]="R17x139",o[i++]=t.vR17x139,t.versetmap=u(),t.versetfull=s([t.v1to9,t.v10to26,t.v27to40]),t.versetmicro=s([t.vM1,t.vM2,t.vM3,t.vM4]),t)t.hasOwnProperty(l)&&(at.$ctx[l]=t[l]);at.$ctx._19556=1}(),D(e.version,"unset")){o[i++]="verset",o[i++]=A(e.versetmap,e.version),o[i++]=1/0;var ue=o[--i],ce=o[--i];o[i++]=ue,o[i++]=ce;var le=s();e[o[--i]]=le}else T(e.format,"full")&&(e.verset=e.versetfull),T(e.format,"micro")&&(e.verset=e.versetmicro);o[i++]=1/0;for(var he=0;he<39;he++)o[i++]=-1;e.msgbits=s(),e.e=1e4,at.$ctx._19599||function(){var t=Object.create(e);for(var n in t.mode0forceKB=s([1,1,1,t.e,t.e,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]),t.mode0forceA=s([1,1,1,t.e,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]),t.mode0forceN=s([1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]),t.mode0NbeforeB=s([4,4,5,t.e,t.e,2,3,2,2,3,3,3,2,3,3,3,3,2,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3]),t.modeBKbeforeB=s([9,12,13,t.e,t.e,4,6,4,5,6,6,6,5,6,6,6,7,4,6,6,6,7,7,5,6,6,7,7,7,6,6,7,7,7,6,7,7,7,8]),t.modeBKbeforeA=s([8,10,11,t.e,t.e,4,5,4,5,5,6,6,5,5,6,6,6,4,5,6,6,6,6,5,6,6,6,6,7,6,6,6,6,7,6,6,6,7,7]),t.modeBKbeforeN=s([8,9,11,t.e,t.e,3,5,3,4,5,5,5,4,5,5,5,6,3,5,5,5,6,6,4,5,5,6,6,6,5,5,6,6,7,5,6,6,6,7]),t.modeBKbeforeE=s([5,5,6,t.e,t.e,2,3,2,3,3,3,3,3,3,3,3,4,2,3,3,3,4,4,3,3,3,4,4,4,3,3,4,4,4,3,4,4,4,4]),t.modeBAbeforeK=s([11,12,14,t.e,t.e,5,7,5,6,7,8,8,6,7,8,8,8,6,7,8,8,8,8,6,8,8,8,8,9,8,8,8,8,9,8,8,8,9,9]),t.modeBAbeforeB=s([11,15,16,t.e,t.e,6,7,6,7,7,8,8,7,7,8,8,8,6,7,8,8,8,9,7,8,8,8,9,9,8,8,9,9,9,8,8,9,9,10]),t.modeBAbeforeN=s([12,13,15,t.e,t.e,6,8,6,7,8,8,8,7,8,8,8,9,6,8,8,8,9,9,7,8,8,9,9,10,8,9,9,9,10,8,9,9,10,10]),t.modeBAbeforeE=s([6,7,8,t.e,t.e,3,4,3,4,4,4,4,4,4,4,4,5,4,4,4,4,5,5,4,4,4,5,5,5,4,5,5,5,5,4,5,5,5,5]),t.modeBNbeforeK=s([6,7,8,t.e,t.e,3,4,3,4,4,5,5,4,4,5,5,5,3,4,5,5,5,5,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5]),t.modeBNbeforeB=s([6,8,9,t.e,t.e,3,4,3,4,4,5,5,4,4,5,5,5,3,4,5,5,5,5,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,6]),t.modeBNbeforeA=s([6,7,8,t.e,t.e,3,4,3,4,4,5,5,4,4,5,5,5,4,4,5,5,5,5,4,5,5,5,5,5,5,5,5,5,6,5,5,5,5,6]),t.modeBNbeforeE=s([3,4,4,t.e,t.e,2,3,2,2,3,3,3,2,3,3,3,3,2,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3]),t.modeANbeforeA=s([13,15,17,t.e,5,7,9,7,8,9,9,9,8,9,9,9,11,7,9,9,9,11,11,8,9,9,10,11,11,9,10,11,11,11,9,11,11,11,11]),t.modeANbeforeB=s([13,17,18,t.e,t.e,7,9,7,8,9,9,9,8,9,9,9,10,7,9,9,9,10,11,8,9,9,9,11,11,9,9,11,11,11,9,10,11,11,11]),t.modeANbeforeE=s([7,8,9,t.e,3,4,5,4,5,5,5,5,5,5,5,5,6,4,5,5,5,6,6,5,5,5,5,6,6,5,5,6,6,6,5,6,6,6,6]),t)t.hasOwnProperty(n)&&(at.$ctx[n]=t[n]);at.$ctx._19599=1}();for(var fe=e.verset,de=0,pe=fe.length;de<pe;de++){for(e.ver=A(fe,de),e.mode=-1,e.seq=s([]),e.i=0;!(e.i>=e.msglen);){if(e.numK=A(e.numKs,e.i),e.numB=A(e.numBs,e.i),e.numA=A(e.numAs,e.i),e.numN=A(e.numNs,e.i),e.numAorN=A(e.numAorNs,e.i),e.eci=A(e.isECI,e.i),T(e.ver,e.vM1)&&e.numA>=1){e.seq=-1;break}if(T(e.ver,e.vM1)&&e.numB>=1){e.seq=-1;break}if(T(e.ver,e.vM1)&&e.numK>=1){e.seq=-1;break}if(T(e.ver,e.vM1)&&e.eci){e.seq=-1;break}if(T(e.ver,e.vM2)&&e.numB>=1){e.seq=-1;break}if(T(e.ver,e.vM2)&&e.numK>=1){e.seq=-1;break}if(T(e.ver,e.vM2)&&e.eci){e.seq=-1;break}if(T(e.ver,e.vM3)&&e.eci){e.seq=-1;break}if(T(e.ver,e.vM4)&&e.eci){e.seq=-1;break}for(;;){if(e.eci){o[i++]=e.E;break}if(-1==e.mode){if(o[i++]=e.mode0forceKB,e.KbeforeA(),o[--i]){o[i++]=e.K;break}if(o[i++]=e.mode0forceKB,e.KbeforeN(),o[--i]){o[i++]=e.K;break}if(o[i++]=e.modeBKbeforeE,e.KbeforeB(),o[--i]){o[i++]=e.K;break}if(o[i++]=e.mode0forceKB,e.KbeforeE(),o[--i]){o[i++]=e.K;break}if(e.numK>=1){o[i++]=e.B;break}if(o[i++]=e.mode0NbeforeB,e.NbeforeB(),o[--i]){o[i++]=e.N;break}if(o[i++]=e.mode0forceKB,e.NbeforeB(),o[--i]){o[i++]=e.B;break}if(o[i++]=e.modeANbeforeE,e.NbeforeA(),o[--i]){o[i++]=e.N;break}if(o[i++]=e.mode0forceN,e.NbeforeE(),o[--i]){o[i++]=e.N;break}if(o[i++]=e.modeBAbeforeE,e.AbeforeK(),o[--i]){o[i++]=e.A;break}if(o[i++]=e.modeBAbeforeE,e.AorNbeforeB(),o[--i]){o[i++]=e.A;break}if(o[i++]=e.mode0forceA,e.AorNbeforeE(),o[--i]){o[i++]=e.A;break}o[i++]=e.B;break}if(e.mode==e.B){if(o[i++]=e.modeBKbeforeB,e.KbeforeB(),o[--i]){o[i++]=e.K;break}if(o[i++]=e.modeBKbeforeA,e.KbeforeA(),o[--i]){o[i++]=e.K;break}if(o[i++]=e.modeBKbeforeN,e.KbeforeN(),o[--i]){o[i++]=e.K;break}if(o[i++]=e.modeBKbeforeE,e.KbeforeE(),o[--i]){o[i++]=e.K;break}if(o[i++]=e.modeBAbeforeK,e.AbeforeK(),o[--i]){o[i++]=e.A;break}if(o[i++]=e.modeBAbeforeB,e.AbeforeB(),o[--i]){o[i++]=e.A;break}if(o[i++]=e.modeBAbeforeN,e.AbeforeN(),o[--i]){o[i++]=e.A;break}if(o[i++]=e.modeBAbeforeE,e.AbeforeE(),o[--i]){o[i++]=e.A;break}if(o[i++]=e.modeBNbeforeK,e.NbeforeK(),o[--i]){o[i++]=e.N;break}if(o[i++]=e.modeBNbeforeB,e.NbeforeB(),o[--i]){o[i++]=e.N;break}if(o[i++]=e.modeBNbeforeA,e.NbeforeA(),o[--i]){o[i++]=e.N;break}if(o[i++]=e.modeBNbeforeE,e.NbeforeE(),o[--i]){o[i++]=e.N;break}if(o[i++]=e.modeBAbeforeE,e.AorNbeforeE(),o[--i]&&I(e.numAorN,A(e.modeBAbeforeN,e.ver))&&(o[i++]=e.modeBNbeforeA,e.nextNslt(),o[--i])){o[i++]=e.A;break}o[i++]=e.B;break}if(e.mode==e.A){if(e.numK>=1){o[i++]=e.K;break}if(e.numB>=1){o[i++]=e.B;break}if(o[i++]=e.modeANbeforeA,e.NbeforeA(),o[--i]){o[i++]=e.N;break}if(o[i++]=e.modeANbeforeB,e.NbeforeB(),o[--i]){o[i++]=e.N;break}if(o[i++]=e.modeANbeforeE,e.NbeforeE(),o[--i]){o[i++]=e.N;break}if(e.numA>=1||e.numN>=1){o[i++]=e.A;break}o[i++]=e.B;break}if(e.mode==e.N){if(e.numK>=1){o[i++]=e.K;break}if(e.numB>=1){o[i++]=e.B;break}if(e.numA>=1){o[i++]=e.A;break}if(e.numN>=1){o[i++]=e.N;break}o[i++]=e.B;break}if(e.mode==e.K){if(e.numB>=1){o[i++]=e.B;break}if(e.numA>=1){o[i++]=e.A;break}if(e.numN>=1){o[i++]=e.N;break}if(e.numK>=1){o[i++]=e.K;break}o[i++]=e.B;break}}var me=o[--i];o[i++]=me,me==e.K&&e.fnc1first&&(i--,o[i++]=e.B);var ge=o[--i];if(o[i++]=ge,ge==e.mode){i--;var Ae=e.mode==e.K?2:1;e.dat=b(e.msg,e.i,Ae),o[i++]=1/0,_(e.seq),o[i++]=1/0;var ve=o[--i],be=o[--i];o[i++]=ve,_(be),_(e.dat);var ye=s();o[i++]=ye,e.seq=s()}else e.mode=o[--i],e.mode==e.K&&(o[i++]=e.K,o[i++]=b(e.msg,e.i,2*e.numK)),e.mode==e.B&&(o[i++]=e.B,o[i++]=b(e.msg,e.i,e.numB)),e.mode==e.A&&(o[i++]=e.A,o[i++]=b(e.msg,e.i,e.numA)),e.mode==e.N&&(o[i++]=e.N,o[i++]=b(e.msg,e.i,e.numN)),e.mode==e.E&&(e.mode=-1,o[i++]=e.E,o[i++]=b(e.msg,e.i,1)),e.dat=o[--i],e.sw=o[--i],o[i++]=1/0,_(e.seq),o[i++]=e.sw,o[i++]=e.dat,e.seq=s();e.i=e.i+e.dat.length}for(;-1!=e.seq;){e.bits=c(23648),e.j=0,e.fnc1first&&(B(e.ver,e.vR7x43)?o[i++]="0101":o[i++]="101",e.addtobits()),e.abort=!1;for(var we=0,xe=e.seq.length-1;we<=xe;we+=2){if(e.i=we,e.mode=A(e.seq,e.i),o[i++]=A(A(e.mids,e.ver),e.mode),e.addtobits(),e.chars=A(e.seq,e.i+1),o[i++]="charslen",o[i++]=e.chars.length,e.mode==e.K){var Ce=o[--i];o[i++]=~~(Ce/2)}var ke=o[--i];if(e[o[--i]]=ke,e.mode!=e.E){if(e.cclen=A(A(e.cclens,e.ver),e.mode),e.charslen>=~~Math.pow(2,e.cclen)){e.abort=!0;break}o[i++]=e.charslen,o[i++]=e.cclen,e.tobin(),e.addtobits()}if(o[i++]=e.chars,!0===e[A(e.encfuncs,e.mode)]())break;e.addtobits()}if(e.abort)break;e.bits=b(e.bits,0,e.j),v(e.msgbits,e.ver,e.bits);break}}at.$ctx._19817||function(){var t=Object.create(e);for(var n in t.metrics=s([s(["micro","M1",t.vM1,11,11,98,99,36,s([2,99,99,99]),s([1,0,-1,-1,-1,-1,-1,-1])]),s(["micro","M2",t.vM2,13,13,98,99,80,s([5,6,99,99]),s([1,0,1,0,-1,-1,-1,-1])]),s(["micro","M3",t.vM3,15,15,98,99,132,s([6,8,99,99]),s([1,0,1,0,-1,-1,-1,-1])]),s(["micro","M4",t.vM4,17,17,98,99,192,s([8,10,14,99]),s([1,0,1,0,1,0,-1,-1])]),s(["full","1",t.v1to9,21,21,98,99,208,s([7,10,13,17]),s([1,0,1,0,1,0,1,0])]),s(["full","2",t.v1to9,25,25,18,99,359,s([10,16,22,28]),s([1,0,1,0,1,0,1,0])]),s(["full","3",t.v1to9,29,29,22,99,567,s([15,26,36,44]),s([1,0,1,0,2,0,2,0])]),s(["full","4",t.v1to9,33,33,26,99,807,s([20,36,52,64]),s([1,0,2,0,2,0,4,0])]),s(["full","5",t.v1to9,37,37,30,99,1079,s([26,48,72,88]),s([1,0,2,0,2,2,2,2])]),s(["full","6",t.v1to9,41,41,34,99,1383,s([36,64,96,112]),s([2,0,4,0,4,0,4,0])]),s(["full","7",t.v1to9,45,45,22,38,1568,s([40,72,108,130]),s([2,0,4,0,2,4,4,1])]),s(["full","8",t.v1to9,49,49,24,42,1936,s([48,88,132,156]),s([2,0,2,2,4,2,4,2])]),s(["full","9",t.v1to9,53,53,26,46,2336,s([60,110,160,192]),s([2,0,3,2,4,4,4,4])]),s(["full","10",t.v10to26,57,57,28,50,2768,s([72,130,192,224]),s([2,2,4,1,6,2,6,2])]),s(["full","11",t.v10to26,61,61,30,54,3232,s([80,150,224,264]),s([4,0,1,4,4,4,3,8])]),s(["full","12",t.v10to26,65,65,32,58,3728,s([96,176,260,308]),s([2,2,6,2,4,6,7,4])]),s(["full","13",t.v10to26,69,69,34,62,4256,s([104,198,288,352]),s([4,0,8,1,8,4,12,4])]),s(["full","14",t.v10to26,73,73,26,46,4651,s([120,216,320,384]),s([3,1,4,5,11,5,11,5])]),s(["full","15",t.v10to26,77,77,26,48,5243,s([132,240,360,432]),s([5,1,5,5,5,7,11,7])]),s(["full","16",t.v10to26,81,81,26,50,5867,s([144,280,408,480]),s([5,1,7,3,15,2,3,13])]),s(["full","17",t.v10to26,85,85,30,54,6523,s([168,308,448,532]),s([1,5,10,1,1,15,2,17])]),s(["full","18",t.v10to26,89,89,30,56,7211,s([180,338,504,588]),s([5,1,9,4,17,1,2,19])]),s(["full","19",t.v10to26,93,93,30,58,7931,s([196,364,546,650]),s([3,4,3,11,17,4,9,16])]),s(["full","20",t.v10to26,97,97,34,62,8683,s([224,416,600,700]),s([3,5,3,13,15,5,15,10])]),s(["full","21",t.v10to26,101,101,28,50,9252,s([224,442,644,750]),s([4,4,17,0,17,6,19,6])]),s(["full","22",t.v10to26,105,105,26,50,10068,s([252,476,690,816]),s([2,7,17,0,7,16,34,0])]),s(["full","23",t.v10to26,109,109,30,54,10916,s([270,504,750,900]),s([4,5,4,14,11,14,16,14])]),s(["full","24",t.v10to26,113,113,28,54,11796,s([300,560,810,960]),s([6,4,6,14,11,16,30,2])]),s(["full","25",t.v10to26,117,117,32,58,12708,s([312,588,870,1050]),s([8,4,8,13,7,22,22,13])]),s(["full","26",t.v10to26,121,121,30,58,13652,s([336,644,952,1110]),s([10,2,19,4,28,6,33,4])]),s(["full","27",t.v27to40,125,125,34,62,14628,s([360,700,1020,1200]),s([8,4,22,3,8,26,12,28])]),s(["full","28",t.v27to40,129,129,26,50,15371,s([390,728,1050,1260]),s([3,10,3,23,4,31,11,31])]),s(["full","29",t.v27to40,133,133,30,54,16411,s([420,784,1140,1350]),s([7,7,21,7,1,37,19,26])]),s(["full","30",t.v27to40,137,137,26,52,17483,s([450,812,1200,1440]),s([5,10,19,10,15,25,23,25])]),s(["full","31",t.v27to40,141,141,30,56,18587,s([480,868,1290,1530]),s([13,3,2,29,42,1,23,28])]),s(["full","32",t.v27to40,145,145,34,60,19723,s([510,924,1350,1620]),s([17,0,10,23,10,35,19,35])]),s(["full","33",t.v27to40,149,149,30,58,20891,s([540,980,1440,1710]),s([17,1,14,21,29,19,11,46])]),s(["full","34",t.v27to40,153,153,34,62,22091,s([570,1036,1530,1800]),s([13,6,14,23,44,7,59,1])]),s(["full","35",t.v27to40,157,157,30,54,23008,s([570,1064,1590,1890]),s([12,7,12,26,39,14,22,41])]),s(["full","36",t.v27to40,161,161,24,50,24272,s([600,1120,1680,1980]),s([6,14,6,34,46,10,2,64])]),s(["full","37",t.v27to40,165,165,28,54,25568,s([630,1204,1770,2100]),s([17,4,29,14,49,10,24,46])]),s(["full","38",t.v27to40,169,169,32,58,26896,s([660,1260,1860,2220]),s([4,18,13,32,48,14,42,32])]),s(["full","39",t.v27to40,173,173,26,54,28256,s([720,1316,1950,2310]),s([20,4,40,7,43,22,10,67])]),s(["full","40",t.v27to40,177,177,30,58,29648,s([750,1372,2040,2430]),s([19,6,18,31,34,34,20,61])]),s(["rmqr","R7x43",t.vR7x43,7,43,22,99,104,s([99,7,99,10]),s([-1,-1,1,0,-1,-1,1,0])]),s(["rmqr","R7x59",t.vR7x59,7,59,20,40,171,s([99,9,99,14]),s([-1,-1,1,0,-1,-1,1,0])]),s(["rmqr","R7x77",t.vR7x77,7,77,26,52,261,s([99,12,99,22]),s([-1,-1,1,0,-1,-1,1,0])]),s(["rmqr","R7x99",t.vR7x99,7,99,24,50,358,s([99,16,99,30]),s([-1,-1,1,0,-1,-1,1,0])]),s(["rmqr","R7x139",t.vR7x139,7,139,28,56,545,s([99,24,99,44]),s([-1,-1,1,0,-1,-1,2,0])]),s(["rmqr","R9x43",t.vR9x43,9,43,22,99,170,s([99,9,99,14]),s([-1,-1,1,0,-1,-1,1,0])]),s(["rmqr","R9x59",t.vR9x59,9,59,20,40,267,s([99,12,99,22]),s([-1,-1,1,0,-1,-1,1,0])]),s(["rmqr","R9x77",t.vR9x77,9,77,26,52,393,s([99,18,99,32]),s([-1,-1,1,0,-1,-1,1,1])]),s(["rmqr","R9x99",t.vR9x99,9,99,24,50,532,s([99,24,99,44]),s([-1,-1,1,0,-1,-1,2,0])]),s(["rmqr","R9x139",t.vR9x139,9,139,28,56,797,s([99,36,99,66]),s([-1,-1,1,1,-1,-1,3,0])]),s(["rmqr","R11x27",t.vR11x27,11,27,98,99,122,s([99,8,99,10]),s([-1,-1,1,0,-1,-1,1,0])]),s(["rmqr","R11x43",t.vR11x43,11,43,22,99,249,s([99,12,99,20]),s([-1,-1,1,0,-1,-1,1,0])]),s(["rmqr","R11x59",t.vR11x59,11,59,20,40,376,s([99,16,99,32]),s([-1,-1,1,0,-1,-1,1,1])]),s(["rmqr","R11x77",t.vR11x77,11,77,26,52,538,s([99,24,99,44]),s([-1,-1,1,0,-1,-1,1,1])]),s(["rmqr","R11x99",t.vR11x99,11,99,24,50,719,s([99,32,99,60]),s([-1,-1,1,1,-1,-1,1,1])]),s(["rmqr","R11x139",t.vR11x139,11,139,28,56,1062,s([99,48,99,90]),s([-1,-1,2,0,-1,-1,3,0])]),s(["rmqr","R13x27",t.vR13x27,13,27,98,99,172,s([99,9,99,14]),s([-1,-1,1,0,-1,-1,1,0])]),s(["rmqr","R13x43",t.vR13x43,13,43,22,99,329,s([99,14,99,28]),s([-1,-1,1,0,-1,-1,1,0])]),s(["rmqr","R13x59",t.vR13x59,13,59,20,40,486,s([99,22,99,40]),s([-1,-1,1,0,-1,-1,2,0])]),s(["rmqr","R13x77",t.vR13x77,13,77,26,52,684,s([99,32,99,56]),s([-1,-1,1,1,-1,-1,1,1])]),s(["rmqr","R13x99",t.vR13x99,13,99,24,50,907,s([99,40,99,78]),s([-1,-1,1,1,-1,-1,1,2])]),s(["rmqr","R13x139",t.vR13x139,13,139,28,56,1328,s([99,60,99,112]),s([-1,-1,2,1,-1,-1,2,2])]),s(["rmqr","R15x43",t.vR15x43,15,43,22,99,409,s([99,18,99,36]),s([-1,-1,1,0,-1,-1,1,1])]),s(["rmqr","R15x59",t.vR15x59,15,59,20,40,596,s([99,26,99,48]),s([-1,-1,1,0,-1,-1,2,0])]),s(["rmqr","R15x77",t.vR15x77,15,77,26,52,830,s([99,36,99,72]),s([-1,-1,1,1,-1,-1,2,1])]),s(["rmqr","R15x99",t.vR15x99,15,99,24,50,1095,s([99,48,99,88]),s([-1,-1,2,0,-1,-1,4,0])]),s(["rmqr","R15x139",t.vR15x139,15,139,28,56,1594,s([99,72,99,130]),s([-1,-1,2,1,-1,-1,1,4])]),s(["rmqr","R17x43",t.vR17x43,17,43,22,99,489,s([99,22,99,40]),s([-1,-1,1,0,-1,-1,1,1])]),s(["rmqr","R17x59",t.vR17x59,17,59,20,40,706,s([99,32,99,60]),s([-1,-1,2,0,-1,-1,2,0])]),s(["rmqr","R17x77",t.vR17x77,17,77,26,52,976,s([99,44,99,84]),s([-1,-1,2,0,-1,-1,1,2])]),s(["rmqr","R17x99",t.vR17x99,17,99,24,50,1283,s([99,60,99,104]),s([-1,-1,2,1,-1,-1,4,0])]),s(["rmqr","R17x139",t.vR17x139,17,139,28,56,1860,s([99,80,99,156]),s([-1,-1,4,0,-1,-1,2,4])])]),t)t.hasOwnProperty(n)&&(at.$ctx[n]=t[n]);at.$ctx._19817=1}(),o[i++]="eclval",C("LMQH",e.eclevel),i--;var Ee=o[--i],Se=o[--i];o[i++]=Ee.length,o[i++]=Se,i--;var _e=o[--i],Oe=o[--i];o[i++]=_e,o[i++]=Oe,i--;var Te=o[--i];e[o[--i]]=Te;for(var De=0,Be=e.metrics.length-1;De<=Be;De+=1){e.i=De,e.m=A(e.metrics,e.i),e.frmt=A(e.m,0),e.vers=A(e.m,1),e.vergrp=A(e.m,2),e.verind=e.i-44,e.rows=A(e.m,3),e.cols=A(e.m,4),e.asp2=A(e.m,5),e.asp3=A(e.m,6),e.nmod=A(e.m,7),e.ncws=~~(e.nmod/8),e.rbit=e.nmod%8,e.lc4b=!1,(T(e.vers,"M1")||T(e.vers,"M3"))&&(e.ncws=e.ncws+1,e.rbit=0,e.lc4b=!0),e.ecws=A(A(e.m,8),e.eclval),e.dcws=L(e.ncws-e.ecws);var Ie=e.lc4b?4:0;if(e.dmod=L(8*e.dcws-Ie),e.ecb1=A(A(e.m,9),2*e.eclval),e.ecb2=A(A(e.m,9),L(2*e.eclval+1)),e.okay=!0,D(e.format,e.frmt)&&(e.okay=!1),T(e.frmt,"micro")&&e.fnc1first&&(e.okay=!1),D(e.version,"unset")&&D(e.version,e.vers)&&(e.okay=!1),-1!=e.ecb1&&-1!=e.ecb2||(e.okay=!1),e.verbits=A(e.msgbits,e.vergrp),(-1==e.verbits||e.verbits.length>e.dmod)&&(e.okay=!1),e.term=b("000000000",0,A(e.termlens,e.vergrp)),e.okay)break}e.okay||(o[i++]="bwipp.qrcodeNoValidSymbol#19861",o[i++]="Maximum length exceeded or invalid content",z()),e.format=e.frmt,e.version=e.vers,e.msgbits=e.verbits,e.dcpb=~~(e.dcws/L(e.ecb1+e.ecb2)),e.ecpb=~~(e.ncws/L(e.ecb1+e.ecb2))-e.dcpb;var Me=e.term,je=e.dmod,Ne=e.msgbits,Fe=e.term,Re=Fe.length,Pe=L(je-Ne.length);if(L(je-Ne.length)>Fe.length){var Le=Re;Re=Pe,Pe=Le}e.term=b(Me,0,Pe);var Ue=c(e.msgbits.length+e.term.length);y(Ue,0,e.msgbits),y(Ue,e.msgbits.length,e.term),e.msgbits=Ue,e.pad=c(e.dmod);for(var ze=0,He=e.pad.length-1;ze<=He;ze+=1)v(e.pad,ze,48);y(e.pad,0,e.msgbits),e.padnum=0;for(var $e=e.lc4b?5:1,Qe=~~(8*Math.ceil(e.msgbits.length/8)),Ve=L(e.dmod-$e);Qe<=Ve;Qe+=8)y(e.pad,Qe,A(e.padstrs,e.padnum)),e.padnum=(e.padnum+1)%2;e.cws=s(e.dcws);for(var qe=0,Ge=e.cws.length-1;qe<=Ge;qe+=1){e.c=qe,e.bpcw=8,e.lc4b&&e.c==e.cws.length-1&&(e.bpcw=4),e.cwb=b(e.pad,8*e.c,e.bpcw),e.cw=0;for(var We=0,Ke=e.bpcw-1;We<=Ke;We+=1)e.i=We,e.cw=L(e.cw+~~Math.pow(2,e.bpcw-e.i-1)*L(A(e.cwb,e.i)-48));v(e.cws,e.c,e.cw)}if(e.lc4b){var Ye=e.cws,Xe=e.cws;v(Ye,Xe.length-1,A(Ye,Xe.length-1)<<4)}void 0!==A(e.options,"debugcws")&&(o[i++]="bwipp.debugcws#19905",o[i++]=e.cws,z()),at.$ctx._19912||function(){var t=Object.create(e);o[i++]=1/0,o[i++]=1;for(var n=0;n<255;n++){var r=o[--i],a=2*r;if(o[i++]=r,o[i++]=a,a>=256){var u=o[--i];o[i++]=285^u}}t.rsalog=s(),t.rslog=s(256);for(var c=1;c<=255;c+=1)v(t.rslog,A(t.rsalog,c),c);for(var l in t)t.hasOwnProperty(l)&&(at.$ctx[l]=t[l]);at.$ctx._19912=1}(),e.rsprod=function(){var t=o[--i],n=o[--i];if(o[i++]=n,o[i++]=t,0!=t&&0!=n){var r=A(e.rslog,o[--i]),a=A(e.rsalog,L(r+A(e.rslog,o[--i]))%255);o[i++]=a}else i-=2,o[i++]=0},o[i++]=1/0,o[i++]=1;for(var Je=0,Ze=e.ecpb;Je<Ze;Je++)o[i++]=0;e.coeffs=s();for(var et=0,tt=e.ecpb-1;et<=tt;et+=1){e.i=et,v(e.coeffs,e.i+1,A(e.coeffs,e.i));for(var nt=e.i;nt>=1;nt-=1){e.j=nt,o[i++]=e.coeffs,o[i++]=e.j,o[i++]=A(e.coeffs,e.j-1),o[i++]=A(e.coeffs,e.j),o[i++]=A(e.rsalog,e.i),e.rsprod();var rt=o[--i],it=o[--i],ot=o[--i];v(o[--i],ot,R(it,rt))}o[i++]=e.coeffs,o[i++]=0,o[i++]=A(e.coeffs,0),o[i++]=A(e.rsalog,e.i),e.rsprod();var st=o[--i],ut=o[--i];v(o[--i],ut,st)}e.coeffs=b(e.coeffs,0,e.coeffs.length-1),e.rscodes=function(){e.rscws=o[--i],e.rsnd=e.rscws.length,o[i++]=1/0,k(e.rscws);for(var t=0,n=e.ecpb;t<n;t++)o[i++]=0;e.rscws=s();for(var r=0,a=e.rsnd-1;r<=a;r+=1){e.m=r,e.k=A(e.rscws,e.m);for(var u=0,c=e.ecpb-1;u<=c;u+=1){e.j=u,o[i++]=e.rscws,o[i++]=e.m+e.j+1,o[i++]=A(e.coeffs,e.ecpb-e.j-1),o[i++]=e.k,e.rsprod();var l=o[--i],h=o[--i];v(o[--i],h,R(l,A(e.rscws,e.m+e.j+1)))}}o[i++]=b(e.rscws,e.rsnd,e.ecpb)},e.dcwsb=s(L(e.ecb1+e.ecb2)),e.ecwsb=s(L(e.ecb1+e.ecb2));for(var ct=0,lt=L(e.ecb1-1);ct<=lt;ct+=1){e.i=ct,v(e.dcwsb,e.i,b(e.cws,e.i*e.dcpb,e.dcpb)),o[i++]=e.ecwsb,o[i++]=e.i,o[i++]=A(e.dcwsb,e.i),e.rscodes();var ht=o[--i],ft=o[--i];v(o[--i],ft,ht)}for(var dt=0,pt=L(e.ecb2-1);dt<=pt;dt+=1){e.i=dt,v(e.dcwsb,L(e.ecb1+e.i),b(e.cws,L(e.ecb1*e.dcpb+e.i*(e.dcpb+1)),e.dcpb+1)),o[i++]=e.ecwsb,o[i++]=L(e.ecb1+e.i),o[i++]=A(e.dcwsb,L(e.ecb1+e.i)),e.rscodes();var mt=o[--i],gt=o[--i];v(o[--i],gt,mt)}e.cws=s(e.ncws),e.cw=0;for(var At=0,vt=e.dcpb;At<=vt;At+=1){e.i=At;for(var bt=0,yt=L(L(e.ecb1+e.ecb2)-1);bt<=yt;bt+=1)e.j=bt,e.i<A(e.dcwsb,e.j).length&&(v(e.cws,e.cw,A(A(e.dcwsb,e.j),e.i)),e.cw=e.cw+1)}for(var wt=0,xt=e.ecpb-1;wt<=xt;wt+=1){e.i=wt;for(var Ct=0,kt=L(L(e.ecb1+e.ecb2)-1);Ct<=kt;Ct+=1)e.j=Ct,v(e.cws,e.cw,A(A(e.ecwsb,e.j),e.i)),e.cw=e.cw+1}if(e.rbit>0&&(e.pad=s(e.cws.length+1),y(e.pad,0,e.cws),v(e.pad,e.pad.length-1,0),e.cws=e.pad),e.lc4b){var Et=e.cws,St=e.dcws;v(Et,L(St-1),A(Et,L(St-1))>>>4);for(var _t=L(e.dcws-1),Ot=e.ncws-2;_t<=Ot;_t+=1)e.i=_t,v(e.cws,e.i,(15&A(e.cws,e.i))<<4),v(e.cws,e.i,A(e.cws,e.i+1)>>>4&15|A(e.cws,e.i));v(e.cws,e.ncws-1,(15&A(e.cws,e.ncws-1))<<4)}void 0!==A(e.options,"debugecc")&&(o[i++]="bwipp.debugecc#20007",o[i++]=e.cws,z()),o[i++]=1/0;for(var Tt=0,Dt=e.rows*e.cols;Tt<Dt;Tt++)o[i++]=-1;if(e.pixs=s(),e.qmv=function(){var t=o[--i],n=o[--i];o[i++]=L(n+t*e.cols)},T(e.format,"full"))for(var Bt=8,It=L(e.cols-9);Bt<=It;Bt+=1){e.i=Bt,o[i++]=e.pixs,o[i++]=e.i,o[i++]=6,e.qmv();var Mt=o[--i];v(o[--i],Mt,(e.i+1)%2),o[i++]=e.pixs,o[i++]=6,o[i++]=e.i,e.qmv();var jt=o[--i];v(o[--i],jt,(e.i+1)%2)}if(T(e.format,"micro"))for(var Nt=8,Ft=L(e.cols-1);Nt<=Ft;Nt+=1){e.i=Nt,o[i++]=e.pixs,o[i++]=e.i,o[i++]=0,e.qmv();var Rt=o[--i];v(o[--i],Rt,(e.i+1)%2),o[i++]=e.pixs,o[i++]=0,o[i++]=e.i,e.qmv();var Pt=o[--i];v(o[--i],Pt,(e.i+1)%2)}if(T(e.format,"rmqr")){for(var Lt=3,Ut=L(e.cols-4);Lt<=Ut;Lt+=1){e.i=Lt,o[i++]=e.pixs,o[i++]=e.i,o[i++]=0,e.qmv();var zt=o[--i];v(o[--i],zt,(e.i+1)%2),o[i++]=e.pixs,o[i++]=e.i,o[i++]=L(e.rows-1),e.qmv();var Ht=o[--i];v(o[--i],Ht,(e.i+1)%2)}for(var $t=3,Qt=L(e.rows-4);$t<=Qt;$t+=1){e.i=$t,o[i++]=e.pixs,o[i++]=0,o[i++]=e.i,e.qmv();var Vt=o[--i];v(o[--i],Vt,(e.i+1)%2),o[i++]=e.pixs,o[i++]=L(e.cols-1),o[i++]=e.i,e.qmv();var qt=o[--i];v(o[--i],qt,(e.i+1)%2)}for(var Gt=L(e.asp2-1),Wt=L(e.asp3-e.asp2),Kt=L(e.cols-13);Wt<0?Gt>=Kt:Gt<=Kt;Gt+=Wt){e.i=Gt;for(var Yt=3,Xt=L(e.rows-4);Yt<=Xt;Yt+=1){e.j=Yt,o[i++]=e.pixs,o[i++]=e.i,o[i++]=e.j,e.qmv();var Jt=o[--i];v(o[--i],Jt,(e.j+1)%2)}}}at.$ctx._20096||function(){var t=Object.create(e);t.fpat=s([s([1,1,1,1,1,1,1,0]),s([1,0,0,0,0,0,1,0]),s([1,0,1,1,1,0,1,0]),s([1,0,1,1,1,0,1,0]),s([1,0,1,1,1,0,1,0]),s([1,0,0,0,0,0,1,0]),s([1,1,1,1,1,1,1,0]),s([0,0,0,0,0,0,0,0])]),t.fsubpat=s([s([1,1,1,1,1,9,9,9]),s([1,0,0,0,1,9,9,9]),s([1,0,1,0,1,9,9,9]),s([1,0,0,0,1,9,9,9]),s([1,1,1,1,1,9,9,9]),s([9,9,9,9,9,9,9,9]),s([9,9,9,9,9,9,9,9]),s([9,9,9,9,9,9,9,9])]),t.fcorpat=s([s([1,1,1,9,9,9,9,9]),s([1,0,9,9,9,9,9,9]),s([1,9,9,9,9,9,9,9]),s([9,9,9,9,9,9,9,9]),s([9,9,9,9,9,9,9,9]),s([9,9,9,9,9,9,9,9]),s([9,9,9,9,9,9,9,9]),s([9,9,9,9,9,9,9,9])]),t.fnullpat=s([s([9,9,9,9,9,9,9,9]),s([9,9,9,9,9,9,9,9]),s([9,9,9,9,9,9,9,9]),s([9,9,9,9,9,9,9,9]),s([9,9,9,9,9,9,9,9]),s([9,9,9,9,9,9,9,9]),s([9,9,9,9,9,9,9,9]),s([9,9,9,9,9,9,9,9])]);var n=new Map([["full",s([t.fpat,t.fpat,t.fpat,t.fnullpat])],["micro",s([t.fpat,t.fnullpat,t.fnullpat,t.fnullpat])],["rmqr",s([t.fpat,t.fcorpat,t.fcorpat,t.fsubpat])]]);for(var r in t.fpatmap=n,t)t.hasOwnProperty(r)&&(at.$ctx[r]=t[r]);at.$ctx._20096=1}(),e.fpats=A(e.fpatmap,e.format);for(var Zt=0;Zt<=7;Zt+=1){e.y=Zt;for(var en=0;en<=7;en+=1){if(e.x=en,e.fpb0=A(A(A(e.fpats,0),e.y),e.x),e.fpb1=A(A(A(e.fpats,1),e.y),e.x),e.fpb2=A(A(A(e.fpats,2),e.y),e.x),e.fpb3=A(A(A(e.fpats,3),e.y),e.x),9!=e.fpb0&&e.y<e.rows){o[i++]=e.pixs,o[i++]=e.x,o[i++]=e.y,e.qmv();var tn=o[--i];v(o[--i],tn,e.fpb0)}if(9!=e.fpb1){o[i++]=e.pixs,o[i++]=L(L(e.cols-e.x)-1),o[i++]=e.y,e.qmv();var nn=o[--i];v(o[--i],nn,e.fpb1)}if(9!=e.fpb2){o[i++]=e.pixs,o[i++]=e.x,o[i++]=L(L(e.rows-e.y)-1),e.qmv();var rn=o[--i];v(o[--i],rn,e.fpb2)}if(9!=e.fpb3){o[i++]=e.pixs,o[i++]=L(L(e.cols-e.x)-1),o[i++]=L(L(e.rows-e.y)-1),e.qmv();var on=o[--i];v(o[--i],on,e.fpb3)}}}if(at.$ctx._20129||function(){var t=Object.create(e);for(var n in t.algnpatfull=s([s([1,1,1,1,1]),s([1,0,0,0,1]),s([1,0,1,0,1]),s([1,0,0,0,1]),s([1,1,1,1,1])]),t.algnpatrmqr=s([s([1,1,1,9,9]),s([1,0,1,9,9]),s([1,1,1,9,9]),s([9,9,9,9,9]),s([9,9,9,9,9])]),t)t.hasOwnProperty(n)&&(at.$ctx[n]=t[n]);at.$ctx._20129=1}(),e.putalgnpat=function(){e.py=o[--i],e.px=o[--i];for(var t=0;t<=4;t+=1){e.pb=t;for(var n=0;n<=4;n+=1)if(e.pa=n,e.algnb=A(A(e.algnpat,e.pb),e.pa),9!=e.algnb){o[i++]=e.pixs,o[i++]=L(e.px+e.pa),o[i++]=L(e.py+e.pb),e.qmv();var r=o[--i];v(o[--i],r,e.algnb)}}},T(e.format,"full")){e.algnpat=e.algnpatfull;for(var an=L(e.asp2-2),sn=L(e.asp3-e.asp2),un=L(e.cols-13);sn<0?an>=un:an<=un;an+=sn)e.i=an,o[i++]=e.i,o[i++]=4,e.putalgnpat(),o[i++]=4,o[i++]=e.i,e.putalgnpat();for(var cn=L(e.asp2-2),ln=L(e.asp3-e.asp2),hn=L(e.cols-9);ln<0?cn>=hn:cn<=hn;cn+=ln){e.x=cn;for(var fn=L(e.asp2-2),dn=L(e.asp3-e.asp2),pn=L(e.rows-9);dn<0?fn>=pn:fn<=pn;fn+=dn)e.y=fn,o[i++]=e.x,o[i++]=e.y,e.putalgnpat()}}if(T(e.format,"rmqr")){e.algnpat=e.algnpatrmqr;for(var mn=L(e.asp2-2),gn=L(e.asp3-e.asp2),An=L(e.cols-13);gn<0?mn>=An:mn<=An;mn+=gn)e.i=mn,o[i++]=e.i,o[i++]=0,e.putalgnpat(),o[i++]=e.i,o[i++]=L(e.rows-3),e.putalgnpat()}at.$ctx._20176||function(){var t=Object.create(e);for(var n in t.formatmapmicro=s([s([s([1,8])]),s([s([2,8])]),s([s([3,8])]),s([s([4,8])]),s([s([5,8])]),s([s([6,8])]),s([s([7,8])]),s([s([8,8])]),s([s([8,7])]),s([s([8,6])]),s([s([8,5])]),s([s([8,4])]),s([s([8,3])]),s([s([8,2])]),s([s([8,1])])]),t)t.hasOwnProperty(n)&&(at.$ctx[n]=t[n]);at.$ctx._20176=1}();var vn=new Map([["full",s([s([s([0,8]),s([8,L(e.cols-1)])]),s([s([1,8]),s([8,L(e.cols-2)])]),s([s([2,8]),s([8,L(e.cols-3)])]),s([s([3,8]),s([8,L(e.cols-4)])]),s([s([4,8]),s([8,L(e.cols-5)])]),s([s([5,8]),s([8,L(e.cols-6)])]),s([s([7,8]),s([8,L(e.cols-7)])]),s([s([8,8]),s([L(e.cols-8),8])]),s([s([8,7]),s([L(e.cols-7),8])]),s([s([8,5]),s([L(e.cols-6),8])]),s([s([8,4]),s([L(e.cols-5),8])]),s([s([8,3]),s([L(e.cols-4),8])]),s([s([8,2]),s([L(e.cols-3),8])]),s([s([8,1]),s([L(e.cols-2),8])]),s([s([8,0]),s([L(e.cols-1),8])])])],["micro",e.formatmapmicro],["rmqr",s([s([s([11,3]),s([L(e.cols-3),L(e.rows-6)])]),s([s([11,2]),s([L(e.cols-4),L(e.rows-6)])]),s([s([11,1]),s([L(e.cols-5),L(e.rows-6)])]),s([s([10,5]),s([L(e.cols-6),L(e.rows-2)])]),s([s([10,4]),s([L(e.cols-6),L(e.rows-3)])]),s([s([10,3]),s([L(e.cols-6),L(e.rows-4)])]),s([s([10,2]),s([L(e.cols-6),L(e.rows-5)])]),s([s([10,1]),s([L(e.cols-6),L(e.rows-6)])]),s([s([9,5]),s([L(e.cols-7),L(e.rows-2)])]),s([s([9,4]),s([L(e.cols-7),L(e.rows-3)])]),s([s([9,3]),s([L(e.cols-7),L(e.rows-4)])]),s([s([9,2]),s([L(e.cols-7),L(e.rows-5)])]),s([s([9,1]),s([L(e.cols-7),L(e.rows-6)])]),s([s([8,5]),s([L(e.cols-8),L(e.rows-2)])]),s([s([8,4]),s([L(e.cols-8),L(e.rows-3)])]),s([s([8,3]),s([L(e.cols-8),L(e.rows-4)])]),s([s([8,2]),s([L(e.cols-8),L(e.rows-5)])]),s([s([8,1]),s([L(e.cols-8),L(e.rows-6)])])])]]);e.formatmap=A(vn,e.format),k(e.formatmap,(function(){k(o[--i],(function(){k(o[--i]),e.qmv(),v(e.pixs,o[--i],1)}))})),T(e.format,"full")&&e.cols>=45?e.versionmap=s([s([s([L(e.cols-9),5]),s([5,L(e.cols-9)])]),s([s([L(e.cols-10),5]),s([5,L(e.cols-10)])]),s([s([L(e.cols-11),5]),s([5,L(e.cols-11)])]),s([s([L(e.cols-9),4]),s([4,L(e.cols-9)])]),s([s([L(e.cols-10),4]),s([4,L(e.cols-10)])]),s([s([L(e.cols-11),4]),s([4,L(e.cols-11)])]),s([s([L(e.cols-9),3]),s([3,L(e.cols-9)])]),s([s([L(e.cols-10),3]),s([3,L(e.cols-10)])]),s([s([L(e.cols-11),3]),s([3,L(e.cols-11)])]),s([s([L(e.cols-9),2]),s([2,L(e.cols-9)])]),s([s([L(e.cols-10),2]),s([2,L(e.cols-10)])]),s([s([L(e.cols-11),2]),s([2,L(e.cols-11)])]),s([s([L(e.cols-9),1]),s([1,L(e.cols-9)])]),s([s([L(e.cols-10),1]),s([1,L(e.cols-10)])]),s([s([L(e.cols-11),1]),s([1,L(e.cols-11)])]),s([s([L(e.cols-9),0]),s([0,L(e.cols-9)])]),s([s([L(e.cols-10),0]),s([0,L(e.cols-10)])]),s([s([L(e.cols-11),0]),s([0,L(e.cols-11)])])]):e.versionmap=s([]);for(var bn=e.versionmap,yn=0,wn=bn.length;yn<wn;yn++)k(A(bn,yn),(function(){k(o[--i]),e.qmv(),v(e.pixs,o[--i],0)}));if(T(e.format,"full")){o[i++]=e.pixs,o[i++]=8,o[i++]=L(e.rows-8),e.qmv();var xn=o[--i];v(o[--i],xn,0)}var Cn=s([function(){var e=o[--i],t=o[--i];o[i++]=L(t+e)%2},function(){var e=o[--i],t=o[--i];o[i++]=e,o[i++]=t,i--;var n=o[--i];o[i++]=n%2},function(){i--;var e=o[--i];o[i++]=e%3},function(){var e=o[--i],t=o[--i];o[i++]=L(t+e)%3},function(){var e=o[--i],t=o[--i];o[i++]=(~~(e/2)+~~(t/3))%2},function(){var e=o[--i],t=o[--i]*e;o[i++]=L(t%2+t%3)},function(){var e=o[--i],t=o[--i]*e;o[i++]=L(t%2+t%3)%2},function(){var e=o[--i],t=o[--i];o[i++]=L(t*e%3+L(t+e)%2)%2}]),kn=s([function(){var e=o[--i],t=o[--i];o[i++]=e,o[i++]=t,i--;var n=o[--i];o[i++]=n%2},function(){var e=o[--i],t=o[--i];o[i++]=(~~(e/2)+~~(t/3))%2},function(){var e=o[--i],t=o[--i]*e;o[i++]=L(t%2+t%3)%2},function(){var e=o[--i],t=o[--i];o[i++]=L(t*e%3+L(t+e)%2)%2}]),En=s([function(){var e=o[--i],t=o[--i];o[i++]=(~~(e/2)+~~(t/3))%2}]),Sn=new Map([["full",Cn],["micro",kn],["rmqr",En]]);e.maskfuncs=A(Sn,e.format),-1!=e.mask&&(e.maskfuncs=s([A(e.maskfuncs,e.mask-1)]),e.bestmaskval=e.mask-1),e.masks=s(e.maskfuncs.length);for(var _n=0,On=e.masks.length-1;_n<=On;_n+=1){e.m=_n,e.mask=s(e.rows*e.cols);for(var Tn=0,Dn=L(e.rows-1);Tn<=Dn;Tn+=1){e.j=Tn;for(var Bn=0,In=L(e.cols-1);Bn<=In&&(e.i=Bn,o[i++]=e.i,o[i++]=e.j,!0!==A(e.maskfuncs,e.m)());Bn+=1){var Mn=o[--i];o[i++]=0==Mn,o[i++]=e.pixs,o[i++]=e.i,o[i++]=e.j,e.qmv();var jn=o[--i],Nn=A(o[--i],jn),Fn=o[--i]&&-1==Nn?1:0;o[i++]=Fn,o[i++]=e.mask,o[i++]=e.i,o[i++]=e.j,e.qmv();var Rn=o[--i];v(o[--i],Rn,o[--i])}}v(e.masks,e.m,e.mask)}var Pn=D(e.format,"rmqr")?1:2;for(e.posx=L(e.cols-Pn),e.posy=L(e.rows-1),e.dir=-1,e.col=1,e.num=0;!(e.posx<0);){o[i++]=e.pixs,o[i++]=e.posx,o[i++]=e.posy,e.qmv();var Ln=o[--i];if(-1==A(o[--i],Ln)){var Un=A(e.cws,~~(e.num/8)),zn=-(7-e.num%8);o[i++]=1&(zn<0?Un>>>-zn:Un<<zn),o[i++]=e.pixs,o[i++]=e.posx,o[i++]=e.posy,e.qmv();var Hn=o[--i];v(o[--i],Hn,o[--i]),e.num=e.num+1}1==e.col?(e.col=0,e.posx=L(e.posx-1)):(e.col=1,e.posx=L(e.posx+1),e.posy=L(e.posy+e.dir),(e.posy<0||e.posy>=e.rows)&&(e.dir=-1*e.dir,e.posy=L(e.posy+e.dir),e.posx=L(e.posx-2),T(e.format,"full")&&6==e.posx&&(e.posx=L(e.posx-1))))}e.evalfulln1n3=function(){e.scrle=o[--i],o[i++]="scr1",o[i++]=0,k(e.scrle,(function(){var e=o[--i];if(o[i++]=e,e>=5){var t=o[--i],n=L(L(o[--i]+t)-2);o[i++]=n,o[i++]=n}i--}));var t=o[--i];e[o[--i]]=t,e.scr3=0;for(var n=3,r=e.scrle.length-3;n<=r;n+=2)if(e.j=n,A(e.scrle,e.j)%3==0){e.fact=~~(A(e.scrle,e.j)/3);for(var a=b(e.scrle,e.j-2,5),s=0,u=a.length;s<u;s++)o[i++]=A(a,s)==e.fact;var c=o[--i],l=o[--i],h=o[--i];o[i++]=N(l,c),o[i++]=h,i--;var f=o[--i],d=o[--i];o[--i]&&d&&f&&(3==e.j||e.j+4>=e.scrle.length||A(e.scrle,e.j-3)>=4||A(e.scrle,e.j+3)>=4)&&(e.scr3=e.scr3+40)}o[i++]=e.scr1,o[i++]=e.scr3},e.evalfull=function(){e.sym=o[--i],e.n1=0,e.n2=0,e.n3=0,e.rle=s(L(e.cols+1)),e.lastpairs=s(e.cols),e.thispairs=s(e.cols),e.colsadd1=L(e.cols+1);for(var t=0,n=L(e.cols-1);t<=n;t+=1){e.i=t,o[i++]=1/0;var r=e.cols;o[i++]=0,o[i++]=0;for(var a=e.i,u=r,c=L(r*r-1);u<0?a>=c:a<=c;a+=u){var l=A(e.sym,a),h=o[--i];if(o[i++]=l,T(h,l)){var f=o[--i],d=o[--i];o[i++]=L(d+1),o[i++]=f}else{var p=o[--i];o[i++]=1,o[i++]=p}}i--;var m=S()+2;O(b(e.rle,0,m-2)),e.evalfulln1n3(),e.n3=L(o[--i]+e.n3),e.n1=L(o[--i]+e.n1),i--,e.symrow=b(e.sym,e.i*e.cols,e.cols),o[i++]=1/0;var g=e.symrow;o[i++]=0,o[i++]=0;for(var v=0,y=g.length;v<y;v++){var w=A(g,v),x=o[--i];if(o[i++]=w,T(x,w)){var C=o[--i],D=o[--i];o[i++]=L(D+1),o[i++]=C}else{var B=o[--i];o[i++]=1,o[i++]=B}}i--;var I=S()+2;O(b(e.rle,0,I-2)),e.evalfulln1n3(),e.n3=L(o[--i]+e.n3),e.n1=L(o[--i]+e.n1),i--;var M=e.thispairs;e.thispairs=e.lastpairs,e.lastpairs=M;var j=1==A(e.symrow,0)?0:1,N=e.symrow;o[i++]=j;for(var F=0,R=N.length;F<R;F++){var P=A(N,F),U=o[--i];o[i++]=L(U+P),o[i++]=P}if(i--,O(e.thispairs),i--,e.i>0){o[i++]=1/0,_(e.lastpairs),_(e.thispairs),o[i++]=e.n2;for(var z=0,H=e.cols;z<H;z++){var $=o[--i],Q=o[--i];o[i++]=$,o[i++]=Q;var V=o[i-1-e.colsadd1];if(0==(3&L(o[--i]+V))){var q=o[--i];o[i++]=L(q+3)}}e.n2=o[--i],E()}}o[i++]="dark",o[i++]=0,k(e.sym,(function(){var e=o[--i],t=o[--i];o[i++]=L(t+e)}));var G=o[--i];e[o[--i]]=G;var W=e.cols;e.n4=10*~~(Math.abs(L(100*e.dark/(W*W)-50))/5),o[i++]=L(L(L(e.n1+e.n2)+e.n3)+e.n4)},e.evalmicro=function(){e.sym=o[--i],e.dkrhs=0,e.dkbot=0;for(var t=1,n=L(e.cols-1);t<=n;t+=1){e.i=t,o[i++]="dkrhs",o[i++]=e.dkrhs,o[i++]=e.sym,o[i++]=L(e.cols-1),o[i++]=e.i,e.qmv();var r=o[--i],a=A(o[--i],r),s=o[--i];e[o[--i]]=L(s+a),o[i++]="dkbot",o[i++]=e.dkbot,o[i++]=e.sym,o[i++]=e.i,o[i++]=L(e.cols-1),e.qmv();var u=o[--i],c=A(o[--i],u),l=o[--i];e[o[--i]]=L(l+c)}e.dkrhs<=e.dkbot?o[i++]=-(16*e.dkrhs+e.dkbot):o[i++]=-(16*e.dkbot+e.dkrhs)},e.bestscore=999999999;for(var $n=0,Qn=e.masks.length-1;$n<=Qn;$n+=1){e.m=$n,e.masksym=s(e.rows*e.cols);for(var Vn=0,qn=L(e.rows*e.cols-1);Vn<=qn;Vn+=1)e.i=Vn,v(e.masksym,e.i,R(A(e.pixs,e.i),A(A(e.masks,e.m),e.i)));1!=e.masks.length?(T(e.format,"full")?(o[i++]=e.masksym,e.evalfull(),e.score=o[--i]):(o[i++]=e.masksym,e.evalmicro(),e.score=o[--i]),e.score<e.bestscore&&(e.bestsym=e.masksym,e.bestmaskval=e.m,e.bestscore=e.score)):e.bestsym=e.masksym}if(e.pixs=e.bestsym,T(e.format,"full")){o[i++]=e.pixs,o[i++]=8,o[i++]=L(e.cols-8),e.qmv();var Gn=o[--i];v(o[--i],Gn,1)}if(at.$ctx._20458||function(){var t=Object.create(e);for(var n in t.fmtvalsfull=s([21522,20773,24188,23371,17913,16590,20375,19104,30660,29427,32170,30877,26159,25368,27713,26998,5769,5054,7399,6608,1890,597,3340,2107,13663,12392,16177,14854,9396,8579,11994,11245]),t.fmtvalsmicro=s([17477,16754,20011,19228,21934,20633,24512,23287,26515,25252,28157,26826,30328,29519,31766,31009,1758,1001,3248,2439,5941,4610,7515,6252,9480,8255,12134,10833,13539,12756,16013,15290]),t.fmtvalsrmqr1=s([129714,124311,121821,115960,112748,108361,104707,99878,98062,90155,89697,82244,81360,74485,72895,66458,61898,61167,53413,53120,45844,44081,37499,36190,29814,27475,21785,19004,13992,10637,6087,2274,258919,257090,250376,249133,242105,241308,233686,233459,227035,223742,219060,215185,209925,207648,202090,199247,194591,190266,186736,181845,178881,173540,170926,165003,163235,156294,154828,148457,147325,139352,138770,131383]),t.fmtvalsrmqr2=s([133755,136542,142100,144433,149669,153472,158154,161519,167879,168162,175784,176525,183577,184892,191606,193363,196867,204326,204908,212809,213981,220408,221874,228759,230591,236442,239056,244469,247393,252228,255758,260139,942,7307,8897,15844,16752,24149,24607,32570,34322,39223,42877,47192,50380,56297,58787,64134,67798,71667,76217,79516,84488,87341,93031,95298,101738,102991,109573,111392,118708,118929,126683,127486]),t)t.hasOwnProperty(n)&&(at.$ctx[n]=t[n]);at.$ctx._20458=1}(),T(e.format,"full")){o[i++]="ecid",C("MLHQ",e.eclevel),i--;var Wn=o[--i],Kn=o[--i];o[i++]=Wn.length,o[i++]=Kn,i--;var Yn=o[--i],Xn=o[--i];o[i++]=Yn,o[i++]=Xn,i--;var Jn=o[--i];e[o[--i]]=Jn,e.fmtval=A(e.fmtvalsfull,(e.ecid<<3)+e.bestmaskval);for(var Zn=0,er=e.formatmap.length-1;Zn<=er;Zn+=1)e.i=Zn,k(A(e.formatmap,e.i),(function(){var t=o[--i];o[i++]=e.pixs,_(t),e.qmv();var n=e.fmtval,r=-(14-e.i),a=o[--i];v(o[--i],a,1&(r<0?n>>>-r:n<<r))}))}if(T(e.format,"micro")){e.symid=A(A(s([s([0]),s([1,2]),s([3,4]),s([5,6,7])]),~~(L(e.cols-11)/2)),e.eclval),e.fmtval=A(e.fmtvalsmicro,(e.symid<<2)+e.bestmaskval);for(var tr=0,nr=e.formatmap.length-1;tr<=nr;tr+=1){e.i=tr,o[i++]=e.pixs,_(A(A(e.formatmap,e.i),0)),e.qmv();var rr=e.fmtval,ir=-(14-e.i),or=o[--i];v(o[--i],or,1&(ir<0?rr>>>-ir:rr<<ir))}}if(T(e.format,"rmqr")){o[i++]="fmtvalu",C("MH",e.eclevel),i--;var ar=o[--i],sr=o[--i];o[i++]=ar.length,o[i++]=sr,i--;var ur=o[--i],cr=o[--i];o[i++]=ur,o[i++]=cr,i--;var lr=o[--i];e[o[--i]]=(lr<<5)+e.verind,e.fmtval1=A(e.fmtvalsrmqr1,e.fmtvalu),e.fmtval2=A(e.fmtvalsrmqr2,e.fmtvalu);for(var hr=0,fr=e.formatmap.length-1;hr<=fr;hr+=1){e.i=hr,o[i++]=e.pixs,_(A(A(e.formatmap,e.i),0)),e.qmv();var dr=e.fmtval1,pr=-(17-e.i),mr=o[--i];v(o[--i],mr,1&(pr<0?dr>>>-pr:dr<<pr)),o[i++]=e.pixs,_(A(A(e.formatmap,e.i),1)),e.qmv();var gr=e.fmtval2,Ar=-(17-e.i),vr=o[--i];v(o[--i],vr,1&(Ar<0?gr>>>-Ar:gr<<Ar))}}if(at.$ctx._20497||function(){var t=Object.create(e);for(var n in t.vervals=s([31892,34236,39577,42195,48118,51042,55367,58893,63784,68472,70749,76311,79154,84390,87683,92361,96236,102084,102881,110507,110734,117786,119615,126325,127568,133589,136957,141498,145311,150283,152622,158308,161089,167017]),t)t.hasOwnProperty(n)&&(at.$ctx[n]=t[n]);at.$ctx._20497=1}(),T(e.format,"full")&&e.cols>=45){e.verval=A(e.vervals,~~(L(e.cols-17)/4)-7);for(var br=0,yr=e.versionmap.length-1;br<=yr;br+=1)e.i=br,k(A(e.versionmap,e.i),(function(){var t=o[--i];o[i++]=e.pixs,k(t),e.qmv();var n=e.verval,r=-(17-e.i),a=o[--i];v(o[--i],a,1&(r<0?n>>>-r:n<<r))}))}var wr=new Map([["ren",Q],["pixs",e.pixs],["pixx",e.cols],["pixy",e.rows],["height",2*e.rows/72],["width",2*e.cols/72],["opt",e.options]]);o[i++]=wr,e.dontdraw||Q()}function st(){var e=Object.create(st.$ctx||(st.$ctx={}));e.dontdraw=!1,e.parse=!1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i];var t=new Map([["parse",e.parse],["parseonly",!0],["parsefnc",!1]]);e.fncvals=t,o[i++]="barcode",o[i++]=e.barcode,o[i++]=e.fncvals,H();var n=o[--i];e[o[--i]]=n,e.barlen=e.barcode.length,delete e.options.parse,e.barcode.length>997&&(o[i++]="bwipp.swissqrcodeBadLength#20574",o[i++]="Swiss QR Code input must not exceed 997 digits",z()),v(e.options,"dontdraw",!0),o[i++]="args",o[i++]=e.barcode,o[i++]=e.options,at();var a=o[--i];if(e[o[--i]]=a,v(e.args,"opt",e.options),o[i++]=e.args,!e.dontdraw){r.save();var s=r.currpos();r.translate(s.x,s.y);var u=72/25.4;r.scale(u,u),r.save(),r.newpath(),r.moveto(0,0),r.lineto(46,0),r.lineto(46,46),r.lineto(0,46),r.closepath(),r.moveto(19.5,19.5),r.lineto(19.5,26.5),r.lineto(26.5,26.5),r.lineto(26.5,19.5),r.closepath(),r.clip(),r.save(),r.moveto(0,0);var c=46/A(e.args,"pixx")/2;r.scale(c,c),Q(),r.restore(),r.restore(),r.translate(19.5,19.5);r.scale(7/83,7/83),r.newpath(),r.moveto(6,6),r.lineto(6,77),r.lineto(77,77),r.lineto(77,6),r.closepath(),r.moveto(49,18),r.lineto(49,34),r.lineto(65,34),r.lineto(65,49),r.lineto(49,49),r.lineto(49,65),r.lineto(34,65),r.lineto(34,49),r.lineto(18,49),r.lineto(18,34),r.lineto(34,34),r.lineto(34,18),r.closepath(),r.setrgbcolor(0,0,0),r.fill(),r.restore()}}function ut(){var e=Object.create(ut.$ctx||(ut.$ctx={}));e.dontdraw=!1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],v(e.options,"dontdraw",!0),v(e.options,"format","micro"),o[i++]="args",o[i++]=e.barcode,o[i++]=e.options,at();var t=o[--i];e[o[--i]]=t,v(e.args,"opt",e.options),o[i++]=e.args,e.dontdraw||Q()}function ct(){var e=Object.create(ct.$ctx||(ct.$ctx={}));e.dontdraw=!1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],v(e.options,"dontdraw",!0),v(e.options,"format","rmqr"),o[i++]="args",o[i++]=e.barcode,o[i++]=e.options,at();var t=o[--i];e[o[--i]]=t,v(e.args,"opt",e.options),o[i++]=e.args,e.dontdraw||Q()}function lt(){var e=Object.create(lt.$ctx||(lt.$ctx={}));e.dontdraw=!1,e.mode=-1,e.sam=-1,e.parse=!1,e.parsefnc=!1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i];var t=new Map([["parse",e.parse],["parsefnc",e.parsefnc],["eci",!0]]);e.fncvals=t,o[i++]="msg",o[i++]=e.barcode,o[i++]=e.fncvals,H();var n=o[--i];if(e[o[--i]]=n,e.msglen=e.msg.length,2==e.mode||3==e.mode){e.barcode=c(e.msglen);for(var r=0,a=e.msglen-1;r<=a;r+=1)e.i=r,A(e.msg,e.i)>0&&v(e.barcode,e.i,A(e.msg,e.i));e.barlen=e.barcode.length,T(b(e.barcode,0,7),"[)>01")?(e.fid=b(e.barcode,0,9),e.barcode=b(e.barcode,9,e.barlen-9)):e.fid="",C(e.barcode,""),i--,e.pcode=o[--i],i--,C(o[--i],""),i--,e.ccode=o[--i],i--,C(o[--i],""),i--,e.scode=o[--i],i--,e.barcode=o[--i];var u=c(e.barcode.length+e.fid.length);y(u,0,e.fid),y(u,e.fid.length,e.barcode),e.barcode=u,e.barlen=e.barcode.length,o[i++]=1/0;for(var l=e.barcode,h=0,d=l.length;h<d;h++)o[i++]=A(l,h);e.msg=s(),e.msglen=e.msg.length}lt.$ctx._20936||function(){var t=Object.create(e);t.eci=-1,t.pad=-2,t.ns=-3,t.la=-4,t.lb=-5,t.sa=-6,t.sb=-7,t.sc=-8,t.sd=-9,t.se=-10,t.sa2=-11,t.sa3=-12,t.lkc=-13,t.lkd=-14,t.lke=-15,t.pd2=-16,t.pd3=-17,t.charmaps=s([s([13,"`",192,224,0]),s(["A","a",193,225,1]),s(["B","b",194,226,2]),s(["C","c",195,227,3]),s(["D","d",196,228,4]),s(["E","e",197,229,5]),s(["F","f",198,230,6]),s(["G","g",199,231,7]),s(["H","h",200,232,8]),s(["I","i",201,233,9]),s(["J","j",202,234,10]),s(["K","k",203,235,11]),s(["L","l",204,236,12]),s(["M","m",205,237,13]),s(["N","n",206,238,14]),s(["O","o",207,239,15]),s(["P","p",208,240,16]),s(["Q","q",209,241,17]),s(["R","r",210,242,18]),s(["S","s",211,243,19]),s(["T","t",212,244,20]),s(["U","u",213,245,21]),s(["V","v",214,246,22]),s(["W","w",215,247,23]),s(["X","x",216,248,24]),s(["Y","y",217,249,25]),s(["Z","z",218,250,26]),s([t.eci,t.eci,t.eci,t.eci,t.eci]),s([28,28,28,28,t.pad]),s([29,29,29,29,t.pad]),s([30,30,30,30,27]),s([t.ns,t.ns,t.ns,t.ns,t.ns]),s([" ","{",219,251,28]),s([t.pad,t.pad,220,252,29]),s(['"',"}",221,253,30]),s(["#","~",222,254,31]),s(["$",127,223,255,159]),s(["%",";",170,161,160]),s(["&","<",172,168,162]),s(["'","=",177,171,163]),s([40,">",178,175,164]),s([41,"?",179,176,165]),s(["*","[",181,180,166]),s(["+",92,185,183,167]),s([",","]",186,184,169]),s(["-","^",188,187,173]),s([".","_",189,191,174]),s(["/"," ",190,138,182]),s(["0",",",128,139,149]),s(["1",".",129,140,150]),s(["2","/",130,141,151]),s(["3",":",131,142,152]),s(["4","@",132,143,153]),s(["5","!",133,144,154]),s(["6","|",134,145,155]),s(["7",t.pd2,135,146,156]),s(["8",t.sa2,136,147,157]),s(["9",t.sa3,137,148,158]),s([":",t.pd3,t.la,t.la,t.la]),s([t.sb,t.sa," "," "," "]),s([t.sc,t.sc,t.lkc,t.sc,t.sc]),s([t.sd,t.sd,t.sd,t.lkd,t.sd]),s([t.se,t.se,t.se,t.se,t.lke]),s([t.lb,t.la,t.lb,t.lb,t.lb])]),t.charvals=s([new Map,new Map,new Map,new Map,new Map]);for(var n=0,r=t.charmaps.length-1;n<=r;n+=1){t.i=n,t.encs=A(t.charmaps,t.i);for(var a=0;a<=4;a+=1){t.j=a;var u=A(t.encs,t.j);if(o[i++]=u,T(w(u),"stringtype")){var c=A(o[--i],0);o[i++]=c}v(A(t.charvals,t.j),o[--i],t.i)}}for(var l in t.seta=A(t.charvals,0),t.setb=A(t.charvals,1),t.setc=A(t.charvals,2),t.setd=A(t.charvals,3),t.sete=A(t.charvals,4),t)t.hasOwnProperty(l)&&(lt.$ctx[l]=t[l]);lt.$ctx._20936=1}(),o[i++]=1/0;for(var g=0,x=e.msglen+1;g<x;g++)o[i++]=0;e.nseq=s();for(var E=e.msglen-1;E>=0;E-=1){e.i=E;var S=A(e.msg,e.i);v(e.nseq,e.i,S>=48&&S<=57?L(A(e.nseq,e.i+1)+1):0)}for(e.nseq=b(e.nseq,0,e.msglen),e.prefixinset=function(){for(o[i++]=0;;){var e=o[--i],t=o[--i];if(o[i++]=t,o[i++]=e,e>=t.length)break;var n=o[--i],r=o[--i],a=o[--i],s=void 0!==A(a,A(r,n));if(o[i++]=a,o[i++]=r,o[i++]=n,!s)break;var u=o[--i];o[i++]=L(u+1)}var c=o[--i],l=o[--i];o[i++]=c,o[i++]=l,i--;var h=o[--i],f=o[--i];o[i++]=h,o[i++]=f,i--},e.enc=function(){var t=o[--i];v(e.out,e.j,A(t,o[--i])),e.j=e.j+1},e.out=s(144),e.i=0,e.j=0,e.cset="seta";;){if(e.i==e.msglen){D(e.cset,"seta")&&D(e.cset,"setb")&&(o[i++]=e.la,o[i++]=e[e.cset],e.enc(),e.cset="seta");break}for(;;){if(A(e.msg,e.i)<=-1e6){o[i++]=e.eci,o[i++]=e[e.cset],e.enc();var B=L(-A(e.msg,e.i)-1e6);if(o[i++]=B,B<=31){var I=o[--i];o[i++]=63&I,O(s(1))}else{var M=o[--i];if(o[i++]=M,M<=1023){var j=o[--i];o[i++]=j>>>6&31|32,o[i++]=63&j,O(s(2))}else{var N=o[--i];if(o[i++]=N,N<=32767){var F=o[--i];o[i++]=F>>>12&47|48,o[i++]=F>>>6&63,o[i++]=63&F,O(s(3))}else{var P=o[--i];o[i++]=P>>>18&55|56,o[i++]=P>>>12&63,o[i++]=P>>>6&63,o[i++]=63&P,O(s(4))}}}var z=o[--i];y(e.out,e.j,z),e.j=z.length+e.j,e.i=e.i+1;break}if(A(e.nseq,e.i)>=9){var $=b(e.msg,e.i,9);o[i++]=0;for(var Q=0,V=$.length;Q<V;Q++){var q=o[--i];o[i++]=10*L(q+L(A($,Q)-48))}var G=o[--i];o[i++]=~~(G/10);for(var W=0;W<4;W++){var K=o[--i];o[i++]=63&K,o[i++]=K>>>6}o[i++]=A(e[e.cset],e.ns);for(var Y=0;Y<=10;Y+=2){var X=o[i-1-Y];o[i++]=X}O(s(6));var J=o[--i],Z=o[--i],ee=o[--i],te=o[--i],ne=o[--i],re=o[--i],ie=o[--i];o[i++]=J,o[i++]=ie,o[i++]=re,o[i++]=ne,o[i++]=te,o[i++]=ee,o[i++]=Z;for(var oe=0;oe<6;oe++)i--;y(e.out,e.j,o[--i]),e.i=e.i+9,e.j=e.j+6;break}e.char1=A(e.msg,e.i),o[i++]="char2",e.i+1<e.msglen?o[i++]=A(e.msg,e.i+1):o[i++]=-99;var ae=o[--i];e[o[--i]]=ae,o[i++]="char3",e.i+2<e.msglen?o[i++]=A(e.msg,e.i+2):o[i++]=-99;var se=o[--i];if(e[o[--i]]=se,void 0!==A(e[e.cset],e.char1)){o[i++]=e.char1,o[i++]=e[e.cset],e.enc(),e.i=e.i+1;break}var ue=void 0!==A(e.setb,e.char1);if(T(e.cset,"seta")&&ue){void 0!==A(e.setb,e.char2)?(o[i++]=e.lb,o[i++]=e.seta,e.enc(),e.cset="setb"):(o[i++]=e.sb,o[i++]=e.seta,e.enc(),o[i++]=e.char1,o[i++]=e.setb,e.enc(),e.i=e.i+1);break}var ce=void 0!==A(e.seta,e.char1);if(T(e.cset,"setb")&&ce){var le=e.seta,he=e.msg,fe=e.i,de=e.msglen,pe=e.i,me=de-pe,ge=4;if(4>de-pe){var Ae=me;me=ge,ge=Ae}o[i++]="p",o[i++]=le,o[i++]=b(he,fe,ge),e.prefixinset();var ve=o[--i];e[o[--i]]=ve,1==e.p&&(o[i++]=e.sa,o[i++]=e.setb,e.enc(),o[i++]=e.char1,o[i++]=e.seta,e.enc(),e.i=e.i+1),2==e.p&&(o[i++]=e.sa2,o[i++]=e.setb,e.enc(),o[i++]=e.char1,o[i++]=e.seta,e.enc(),o[i++]=e.char2,o[i++]=e.seta,e.enc(),e.i=e.i+2),3==e.p&&(o[i++]=e.sa3,o[i++]=e.setb,e.enc(),o[i++]=e.char1,o[i++]=e.seta,e.enc(),o[i++]=e.char2,o[i++]=e.seta,e.enc(),o[i++]=e.char3,o[i++]=e.seta,e.enc(),e.i=e.i+3),e.p>=4&&(o[i++]=e.la,o[i++]=e.setb,e.enc(),e.cset="seta");break}if(void 0!==A(e.seta,e.char1)){o[i++]=e.la,o[i++]=e[e.cset],e.enc(),e.cset="seta";break}if(void 0!==A(e.setb,e.char1)){o[i++]=e.lb,o[i++]=e[e.cset],e.enc(),e.cset="setb";break}void 0!==A(e.setc,e.char1)&&(e.setx="setc",e.sx=e.sc,e.lkx=e.lkc),void 0!==A(e.setd,e.char1)&&(e.setx="setd",e.sx=e.sd,e.lkx=e.lkd),void 0!==A(e.sete,e.char1)&&(e.setx="sete",e.sx=e.se,e.lkx=e.lke);var be=e[e.setx],ye=e.msg,we=e.i,xe=e.msglen,Ce=e.i,ke=xe-Ce,Ee=4;if(4>xe-Ce){Ae=ke;ke=Ee,Ee=Ae}o[i++]="p",o[i++]=be,o[i++]=b(ye,we,Ee),e.prefixinset();var Se=o[--i];e[o[--i]]=Se,1==e.p&&(o[i++]=e.sx,o[i++]=e[e.cset],e.enc(),o[i++]=e.char1,o[i++]=e[e.setx],e.enc(),e.i=e.i+1),2==e.p&&(o[i++]=e.sx,o[i++]=e[e.cset],e.enc(),o[i++]=e.char1,o[i++]=e[e.setx],e.enc(),o[i++]=e.sx,o[i++]=e[e.cset],e.enc(),o[i++]=e.char2,o[i++]=e[e.setx],e.enc(),e.i=e.i+2),3==e.p&&(o[i++]=e.sx,o[i++]=e[e.cset],e.enc(),o[i++]=e.char1,o[i++]=e[e.setx],e.enc(),o[i++]=e.sx,o[i++]=e[e.cset],e.enc(),o[i++]=e.char2,o[i++]=e[e.setx],e.enc(),o[i++]=e.sx,o[i++]=e[e.cset],e.enc(),o[i++]=e.char3,o[i++]=e[e.setx],e.enc(),e.i=e.i+3),e.p>=4&&(o[i++]=e.sx,o[i++]=e[e.cset],e.enc(),o[i++]=e.lkx,o[i++]=e[e.setx],e.enc(),e.cset=e.setx);break}}if(e.encmsg=b(e.out,0,e.j),e.padval=A(e[e.cset],e.pad),e.sami=s([]),-1!=e.sam&&(e.sami=s(2),v(e.sami,0,A(e.seta,e.pad)),v(e.sami,1,8*(~~(e.sam/10)-1)+(e.sam%10-1))),o[i++]=1/0,_(e.sami),_(e.encmsg),e.encmsg=s(),2==e.mode||3==e.mode){var _e=f(c(4),"0000"),Oe=m(c(4),~~e.mode,2);y(_e,4-Oe.length,Oe),e.mdb=_e;var Te=f(c(10),"0000000000"),De=m(c(10),p(e.ccode),2);y(Te,10-De.length,De),e.ccb=Te;var Be=f(c(10),"0000000000"),Ie=m(c(10),p(e.scode),2);if(y(Be,10-Ie.length,Ie),e.scb=Be,e.pcb=f(c(36),"000000000000000000000000000000000000"),2==e.mode){var Me=m(c(6),e.pcode.length,2);y(e.pcb,6-Me.length,Me);var je=m(c(30),p(e.pcode),2);y(e.pcb,36-je.length,je)}else{o[i++]=1/0;var Ne=f(c(6),"      ");o[i++]=Ne,o[i++]=Ne,o[i++]=0,e.pcode.length>6?o[i++]=b(e.pcode,0,6):o[i++]=e.pcode;var Fe=o[--i],Re=o[--i];y(o[--i],Re,Fe),k(o[--i],(function(){var t=A(e.seta,o[--i]);o[i++]=t})),e.pccw=s();for(var Pe=0;Pe<=5;Pe+=1){e.i=Pe;var Le=m(c(6),A(e.pccw,e.i),2);y(e.pcb,6*e.i+6-Le.length,Le)}}e.scm=c(60),y(e.scm,2,e.mdb),y(e.scm,38,b(e.pcb,0,4)),y(e.scm,30,b(e.pcb,4,6)),y(e.scm,24,b(e.pcb,10,6)),y(e.scm,18,b(e.pcb,16,6)),y(e.scm,12,b(e.pcb,22,6)),y(e.scm,6,b(e.pcb,28,6)),y(e.scm,0,b(e.pcb,34,2)),y(e.scm,52,b(e.ccb,0,2)),y(e.scm,42,b(e.ccb,2,6)),y(e.scm,36,b(e.ccb,8,2)),y(e.scm,54,b(e.scb,0,6)),y(e.scm,48,b(e.scb,6,4)),e.pri=s([0,0,0,0,0,0,0,0,0,0]);for(var Ue=0;Ue<=59;Ue+=1)e.i=Ue,e.ps=~~(e.i/6),e.ep=~~Math.pow(2,5-e.i%6)*(A(e.scm,e.i)-48),v(e.pri,e.ps,L(A(e.pri,e.ps)+e.ep));o[i++]=1/0;for(var ze=0;ze<84;ze++)o[i++]=e.padval;e.sec=s(),y(e.sec,0,e.encmsg)}if(4==e.mode||5==e.mode||6==e.mode||-1==e.mode){if(-1==e.mode){var He=e.encmsg.length<=77?5:4;e.mode=He}o[i++]=1/0;for(var $e=0,Qe=5==e.mode?78:94;$e<Qe;$e++)o[i++]=e.padval;e.cws=s(),v(e.cws,0,e.mode),y(e.cws,1,e.encmsg),e.pri=b(e.cws,0,10),e.sec=b(e.cws,10,e.cws.length-10)}o[i++]=1/0,o[i++]=1;for(var Ve=0;Ve<63;Ve++){var qe=o[--i],Ge=2*qe;if(o[i++]=qe,o[i++]=Ge,Ge>=64){var We=o[--i];o[i++]=67^We}}e.rsalog=s(),e.rslog=s(64);for(var Ke=1;Ke<=63;Ke+=1)v(e.rslog,A(e.rsalog,Ke),Ke);e.rsprod=function(){var t=o[--i],n=o[--i];if(o[i++]=n,o[i++]=t,0!=t&&0!=n){var r=A(e.rslog,o[--i]),a=A(e.rsalog,L(r+A(e.rslog,o[--i]))%63);o[i++]=a}else i-=2,o[i++]=0},e.rscodes=function(){e.rsnum=o[--i],e.cwb=o[--i],o[i++]=1/0,o[i++]=1;for(var t=0,n=e.rsnum;t<n;t++)o[i++]=0;e.coeffs=s();for(var r=1,a=e.rsnum;r<=a;r+=1){e.i=r,v(e.coeffs,e.i,A(e.coeffs,e.i-1));for(var u=e.i-1;u>=1;u-=1){e.j=u,o[i++]=e.coeffs,o[i++]=e.j,o[i++]=A(e.coeffs,e.j-1),o[i++]=A(e.coeffs,e.j),o[i++]=A(e.rsalog,e.i),e.rsprod();var c=o[--i],l=o[--i],h=o[--i];v(o[--i],h,R(l,c))}o[i++]=e.coeffs,o[i++]=0,o[i++]=A(e.coeffs,0),o[i++]=A(e.rsalog,e.i),e.rsprod();var f=o[--i],d=o[--i];v(o[--i],d,f)}e.coeffs=b(e.coeffs,0,e.coeffs.length-1),o[i++]=1/0;for(var p=0,m=e.rsnum;p<m;p++)o[i++]=0;e.ecb=s();for(var g=0,y=e.cwb.length-1;g<=y;g+=1){e.t=R(A(e.cwb,g),A(e.ecb,0));for(var w=e.ecb.length-1;w>=0;w-=1){e.i=w,e.p=e.ecb.length-e.i-1,o[i++]=e.ecb,o[i++]=e.p,o[i++]=e.t,o[i++]=A(e.coeffs,e.i),e.rsprod();var x=o[--i],C=o[--i];v(o[--i],C,x),e.i>0&&v(e.ecb,e.p,R(A(e.ecb,e.p+1),A(e.ecb,e.p)))}}o[i++]=e.ecb},o[i++]=1/0;for(var Ye=0,Xe=e.sec.length-1;Ye<=Xe;Ye+=2)o[i++]=A(e.sec,Ye);e.seco=s(),o[i++]=1/0;for(var Je=1,Ze=e.sec.length-1;Je<=Ze;Je+=2)o[i++]=A(e.sec,Je);e.sece=s();var et=84==e.sec.length?20:28;e.scodes=et,o[i++]="secochk",o[i++]=e.seco,o[i++]=e.scodes,e.rscodes();var tt=o[--i];e[o[--i]]=tt,o[i++]="secechk",o[i++]=e.sece,o[i++]=e.scodes,e.rscodes();var nt=o[--i];e[o[--i]]=nt,o[i++]=1/0;for(var rt=0,it=e.scodes-1;rt<=it;rt+=1)o[i++]=A(e.secochk,rt),o[i++]=A(e.secechk,rt);e.secchk=s(),o[i++]=1/0,_(e.pri),o[i++]=e.pri,o[i++]=10,e.rscodes(),_(o[--i]),_(e.sec),_(e.secchk),e.codewords=s(),o[i++]=1/0;for(var ot=0;ot<864;ot++)o[i++]=0;e.mods=s();for(var at=0;at<=143;at+=1){e.i=at,o[i++]=1/0;for(var st=m(c(6),A(e.codewords,e.i),2),ut=0,ct=st.length;ut<ct;ut++)o[i++]=A(st,ut)-48;e.cw=s(),y(e.mods,6*e.i+(6-e.cw.length),e.cw)}lt.$ctx._21329||function(){var t=Object.create(e);for(var n in t.modmap=s([469,529,286,316,347,346,673,672,703,702,647,676,283,282,313,312,370,610,618,379,378,409,408,439,705,704,559,589,588,619,458,518,640,701,675,674,285,284,315,314,310,340,531,289,288,319,349,348,456,486,517,516,471,470,369,368,399,398,429,428,549,548,579,578,609,608,649,648,679,678,709,708,639,638,669,668,699,698,279,278,309,308,339,338,381,380,411,410,441,440,561,560,591,590,621,620,547,546,577,576,607,606,367,366,397,396,427,426,291,290,321,320,351,350,651,650,681,680,711,710,1,0,31,30,61,60,3,2,33,32,63,62,5,4,35,34,65,64,7,6,37,36,67,66,9,8,39,38,69,68,11,10,41,40,71,70,13,12,43,42,73,72,15,14,45,44,75,74,17,16,47,46,77,76,19,18,49,48,79,78,21,20,51,50,81,80,23,22,53,52,83,82,25,24,55,54,85,84,27,26,57,56,87,86,117,116,147,146,177,176,115,114,145,144,175,174,113,112,143,142,173,172,111,110,141,140,171,170,109,108,139,138,169,168,107,106,137,136,167,166,105,104,135,134,165,164,103,102,133,132,163,162,101,100,131,130,161,160,99,98,129,128,159,158,97,96,127,126,157,156,95,94,125,124,155,154,93,92,123,122,153,152,91,90,121,120,151,150,181,180,211,210,241,240,183,182,213,212,243,242,185,184,215,214,245,244,187,186,217,216,247,246,189,188,219,218,249,248,191,190,221,220,251,250,193,192,223,222,253,252,195,194,225,224,255,254,197,196,227,226,257,256,199,198,229,228,259,258,201,200,231,230,261,260,203,202,233,232,263,262,205,204,235,234,265,264,207,206,237,236,267,266,297,296,327,326,357,356,295,294,325,324,355,354,293,292,323,322,353,352,277,276,307,306,337,336,275,274,305,304,335,334,273,272,303,302,333,332,271,270,301,300,331,330,361,360,391,390,421,420,363,362,393,392,423,422,365,364,395,394,425,424,383,382,413,412,443,442,385,384,415,414,445,444,387,386,417,416,447,446,477,476,507,506,537,536,475,474,505,504,535,534,473,472,503,502,533,532,455,454,485,484,515,514,453,452,483,482,513,512,451,450,481,480,511,510,541,540,571,570,601,600,543,542,573,572,603,602,545,544,575,574,605,604,563,562,593,592,623,622,565,564,595,594,625,624,567,566,597,596,627,626,657,656,687,686,717,716,655,654,685,684,715,714,653,652,683,682,713,712,637,636,667,666,697,696,635,634,665,664,695,694,633,632,663,662,693,692,631,630,661,660,691,690,721,720,751,750,781,780,723,722,753,752,783,782,725,724,755,754,785,784,727,726,757,756,787,786,729,728,759,758,789,788,731,730,761,760,791,790,733,732,763,762,793,792,735,734,765,764,795,794,737,736,767,766,797,796,739,738,769,768,799,798,741,740,771,770,801,800,743,742,773,772,803,802,745,744,775,774,805,804,747,746,777,776,807,806,837,836,867,866,897,896,835,834,865,864,895,894,833,832,863,862,893,892,831,830,861,860,891,890,829,828,859,858,889,888,827,826,857,856,887,886,825,824,855,854,885,884,823,822,853,852,883,882,821,820,851,850,881,880,819,818,849,848,879,878,817,816,847,846,877,876,815,814,845,844,875,874,813,812,843,842,873,872,811,810,841,840,871,870,901,900,931,930,961,960,903,902,933,932,963,962,905,904,935,934,965,964,907,906,937,936,967,966,909,908,939,938,969,968,911,910,941,940,971,970,913,912,943,942,973,972,915,914,945,944,975,974,917,916,947,946,977,976,919,918,949,948,979,978,921,920,951,950,981,980,923,922,953,952,983,982,925,924,955,954,985,984,927,926,957,956,987,986,58,89,88,118,149,148,178,209,208,238,269,268,298,329,328,358,389,388,418,449,448,478,509,508,538,569,568,598,629,628,658,689,688,718,749,748,778,809,808,838,869,868,898,929,928,958,989,988]),t)t.hasOwnProperty(n)&&(lt.$ctx[n]=t[n]);lt.$ctx._21329=1}(),e.pixs=s(864),e.j=0;for(var ht=0,ft=e.mods.length-1;ht<=ft;ht+=1)e.i=ht,1==A(e.mods,e.i)&&(v(e.pixs,e.j,A(e.modmap,e.i)),e.j=e.j+1);o[i++]=1/0;for(var dt=b(e.pixs,0,e.j),pt=0,mt=dt.length;pt<mt;pt++)o[i++]=A(dt,pt);o[i++]=28,o[i++]=29,o[i++]=280,o[i++]=281,o[i++]=311,o[i++]=457,o[i++]=488,o[i++]=500,o[i++]=530,o[i++]=670,o[i++]=700,o[i++]=677,o[i++]=707,e.pixs=s();var gt=new Map([["ren",Kt],["pixs",e.pixs],["opt",e.options]]);o[i++]=gt,e.dontdraw||Kt()}function ht(){var e=Object.create(ht.$ctx||(ht.$ctx={}));if(e.dontdraw=!1,e.format="unset",e.readerinit=!1,e.layers=-1,e.eclevel=23,e.ecaddchars=3,e.raw=!1,e.parse=!1,e.parsefnc=!1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],T(e.format,"rune")){0==e.barcode.length&&(o[i++]="bwipp.aztecRuneNotNumeric#21405",o[i++]="Aztec runes must be numeric",z()),k(e.barcode,(function(){var e=o[--i];(e<48||e>57)&&(o[i++]="bwipp.aztecRuneNotNumeric#21409",o[i++]="Aztec runes must be numeric",z())}));var t=p(e.barcode);(t<0||t>255)&&(o[i++]="bwipp.aztecRuneInvalid#21413",o[i++]="Aztec runes must be 0 to 255",z())}e.fn1=-1;var n=new Map([["parse",e.parse],["parsefnc",e.parsefnc],["eci",!0],["FNC1",e.fn1]]);e.fncvals=n,o[i++]="msg",o[i++]=e.barcode,o[i++]=e.fncvals,H();var r=o[--i];if(e[o[--i]]=r,e.msglen=e.msg.length,ht.$ctx._21526||function(){var t=Object.create(e);t.U=0,t.L=1,t.M=2,t.P=3,t.D=4,t.B=5,t.lu=-2,t.ll=-3,t.lm=-4,t.lp=-5,t.ld=-6,t.su=-7,t.sp=-8,t.sb=-9,t.fl=-10,t.p2=-11,t.p3=-12,t.p4=-13,t.p5=-14,t.charmaps=s([s([t.sp,t.sp,t.sp,t.fl,t.sp]),s([32,32,32,13,32]),s(["A","a",1,t.p2,"0"]),s(["B","b",2,t.p3,"1"]),s(["C","c",3,t.p4,"2"]),s(["D","d",4,t.p5,"3"]),s(["E","e",5,"!","4"]),s(["F","f",6,'"',"5"]),s(["G","g",7,"#","6"]),s(["H","h",8,"$","7"]),s(["I","i",9,"%","8"]),s(["J","j",10,"&","9"]),s(["K","k",11,"'",","]),s(["L","l",12,40,"."]),s(["M","m",13,41,t.lu]),s(["N","n",27,"*",t.su]),s(["O","o",28,"+",-99]),s(["P","p",29,",",-99]),s(["Q","q",30,"-",-99]),s(["R","r",31,".",-99]),s(["S","s","@","/",-99]),s(["T","t",92,":",-99]),s(["U","u","^",";",-99]),s(["V","v","_","<",-99]),s(["W","w","`","=",-99]),s(["X","x","|",">",-99]),s(["Y","y","~","?",-99]),s(["Z","z",127,"[",-99]),s([t.ll,t.su,t.ll,"]",-99]),s([t.lm,t.lm,t.lu,"{",-99]),s([t.ld,t.ld,t.lp,"}",-99]),s([t.sb,t.sb,t.sb,t.lu,-99])]),t.charvals=s([new Map,new Map,new Map,new Map,new Map]);for(var n=0,r=t.charmaps.length-1;n<=r;n+=1){t.i=n,t.encs=A(t.charmaps,t.i);for(var a=0;a<=4;a+=1){t.j=a;var u=A(t.encs,t.j);if(o[i++]=u,T(w(u),"stringtype")){var c=A(o[--i],0);o[i++]=c}v(A(t.charvals,t.j),o[--i],t.i)}}var l=new Map([["\r\n",t.p2],[". ",t.p3],[", ",t.p4],[": ",t.p5]]);t.pcomp=l,t.e=1e4,t.latlen=s([s([0,5,5,10,5,10]),s([9,0,5,10,5,10]),s([5,5,0,5,10,10]),s([5,10,10,0,10,15]),s([4,9,9,14,0,14]),s([0,0,0,0,0,0])]);var h=t.lp;for(var f in t.latseq=s([s([s([]),s([t.ll]),s([t.lm]),s([t.lm,t.lp]),s([t.ld]),s([t.sb])]),s([s([t.ld,t.lu]),s([]),s([t.lm]),s([t.lm,h]),s([t.ld]),s([t.sb])]),s([s([t.lu]),s([t.ll]),s([]),s([t.lp]),s([t.lu,t.ld]),s([t.sb])]),s([s([t.lu]),s([t.lu,t.ll]),s([t.lu,t.lm]),s([]),s([t.lu,t.ld]),s([t.lu,t.sb])]),s([s([t.lu]),s([t.lu,t.ll]),s([t.lu,t.lm]),s([t.lu,t.lm,t.lp]),s([]),s([t.lu,t.sb])]),s([s([t.lu]),s([t.ll]),s([t.lm]),s([]),s([]),s([])])]),t.shftlen=s([s([t.e,t.e,t.e,5,t.e]),s([5,t.e,t.e,5,t.e]),s([t.e,t.e,t.e,5,t.e]),s([t.e,t.e,t.e,t.e,t.e]),s([4,t.e,t.e,4,t.e])]),t)t.hasOwnProperty(f)&&(ht.$ctx[f]=t[f]);ht.$ctx._21526=1}(),e.msgbits="",D(e.format,"rune")&&e.raw&&(e.msgbits=e.barcode),D(e.format,"rune")&&!e.raw){e.charsize=function(){var t=o[--i];if(o[i++]=t,t>=0){i--;var n=A(s([5,5,5,5,4,8]),o[--i]);o[i++]=n}else{var r=o[--i],a=o[--i];o[i++]=r,o[i++]=a,i--;var u=o[--i];if(o[i++]=u,u==e.fn1)i--,o[i++]=8;else{var c=L(-o[--i]-1e6);o[i++]=c,0==c&&(i--,o[i++]=1);var l=o[--i];o[i++]=4*(1+~~(Math.log(l)/Math.log(10)))+8}}},e.curlen=s([0,e.e,e.e,e.e,e.e,e.e]),e.curseq=s([s([]),s([]),s([]),s([]),s([]),s([])]),e.backto=e.U,e.lastchar="",k(e.msg,(function(){for(e.char=o[--i];;){e.imp=!1;for(var t=s([e.U,e.L,e.M,e.P,e.D,e.B]),n=0,r=t.length;n<r;n++){e.x=A(t,n);for(var a=s([e.U,e.L,e.M,e.P,e.D,e.B]),u=0,h=a.length;u<h;u++)if(e.y=A(a,u),(e.x!=e.B||e.y==e.backto)&&(e.cost=L(A(e.curlen,e.x)+A(A(e.latlen,e.x),e.y)),e.cost<A(e.curlen,e.y))){v(e.curlen,e.y,e.cost),o[i++]=e.curseq,o[i++]=e.y,o[i++]=1/0,_(A(e.curseq,e.x)),_(A(A(e.latseq,e.x),e.y));var f=s(),d=o[--i];if(v(o[--i],d,f),e.y==e.B){o[i++]="backto",e.x==e.P||e.x==e.D?o[i++]=e.U:o[i++]=e.x;var p=o[--i];e[o[--i]]=p}e.imp=!0}}if(!e.imp)break}e.nxtlen=s([e.e,e.e,e.e,e.e,e.e,e.e]),e.nxtseq=s(6);for(var m=s([e.U,e.L,e.M,e.P,e.D,e.B]),g=0,b=m.length;g<b;g++)for(e.x=A(m,g);;){if(e.char>=0){if(e.x!=e.B)if(!(void 0!==A(A(e.charvals,e.x),e.char)))break}else if(e.x!=e.P)break;o[i++]="cost",o[i++]=A(e.curlen,e.x),o[i++]=e.x,o[i++]=e.char,e.charsize();var y=o[--i],w=o[--i];if(e[o[--i]]=L(w+y),e.cost<A(e.nxtlen,e.x)){v(e.nxtlen,e.x,e.cost),o[i++]=e.nxtseq,o[i++]=e.x,o[i++]=1/0,_(A(e.curseq,e.x)),o[i++]=e.char;var x=s(),C=o[--i];v(o[--i],C,x)}if(e.x==e.B)break;for(var E=s([e.U,e.L,e.M,e.P,e.D]),S=0,O=E.length;S<O;S++)if(e.y=A(E,S),D(e.x,e.y)){o[i++]="cost",o[i++]=L(A(e.curlen,e.y)+A(A(e.shftlen,e.y),e.x)),o[i++]=e.x,o[i++]=e.char,e.charsize();var I=o[--i],M=o[--i];if(e[o[--i]]=L(M+I),e.cost<A(e.nxtlen,e.y)){v(e.nxtlen,e.y,e.cost),o[i++]=e.nxtseq,o[i++]=e.y,o[i++]=1/0,_(A(e.curseq,e.y));var j=e.x==e.U?e.su:e.sp;o[i++]=j,o[i++]=e.char;var N=s(),F=o[--i];v(o[--i],F,N)}}break}if(D(e.lastchar,"")&&e.char>=0){var R=c(2);if(v(R,0,e.lastchar),v(R,1,e.char),e.pchars=R,void 0!==A(e.pcomp,e.pchars))for(var P=s([e.U,e.L,e.M,e.P,e.D]),U=0,z=P.length;U<z;U++)if(e.i=A(P,U),e.inP=!0,e.i==e.M?13==e.lastchar&&(e.inP=!1):e.i==e.D&&(44!=e.lastchar&&46!=e.lastchar||(e.inP=!1)),e.inP&&B(A(e.curlen,e.i),A(e.nxtlen,e.i))){e.curseqi=A(e.curseq,e.i),e.lastld=!1,e.lastsp=!1,e.lastidx=-1;for(var H=e.curseqi.length-1;H>=0;H-=1)if(e.idx=H,e.ch=A(e.curseqi,e.idx),-1==e.lastidx)T(e.ch,e.lastchar)&&(e.lastidx=e.idx,e.idx>0&&A(e.curseqi,e.idx-1)==e.sp&&(e.lastsp=!0));else if(e.ch<0&&e.ch>=e.ld){e.i==e.P?e.ch==e.ld&&(e.lastld=!0):e.ch!=e.lp&&(e.inP=e.lastsp);break}if(e.inP&&e.lastidx>=0)if(v(e.nxtlen,e.i,A(e.curlen,e.i)),e.lastidx<e.curseqi.length-1)if(e.i==e.P){e.lastld&&v(e.nxtlen,e.i,L(A(e.nxtlen,e.i)+1)),o[i++]=e.nxtseq,o[i++]=e.i,o[i++]=1/0,_(e.curseqi),l(e.curseqi.length-e.lastidx,-1),i--,o[i++]=A(e.pcomp,e.pchars);var $=s(),Q=o[--i];v(o[--i],Q,$)}else{o[i++]=e.nxtseq,o[i++]=e.i,o[i++]=1/0,_(e.curseqi);var V=s(),q=o[--i];v(o[--i],q,V),v(A(e.nxtseq,e.i),e.lastidx,A(e.pcomp,e.pchars))}else{o[i++]=e.nxtseq,o[i++]=e.i,o[i++]=1/0,_(e.curseqi),i--,o[i++]=A(e.pcomp,e.pchars);var G=s(),W=o[--i];v(o[--i],W,G)}}}D(A(e.nxtseq,e.B),null)&&(e.numbytes=0,k(A(e.nxtseq,e.B),(function(){o[--i]==e.sb?o[i++]=0:o[i++]=e.numbytes+1,e.numbytes=o[--i]})),32==e.numbytes&&v(e.nxtlen,e.B,L(A(e.nxtlen,e.B)+11))),e.curlen=e.nxtlen,e.curseq=e.nxtseq,o[i++]="lastchar",e.char>=0?o[i++]=e.char:o[i++]="";var K=o[--i];e[o[--i]]=K})),e.minseq=e.e;for(var a=s([e.U,e.L,e.M,e.P,e.D,e.B]),u=0,h=a.length;u<h;u++)e.i=A(a,u),A(e.curlen,e.i)<e.minseq&&(e.minseq=A(e.curlen,e.i),e.seq=A(e.curseq,e.i));for(e.tobin=function(){var e=c(o[--i]);o[i++]=e;for(var t=0,n=e.length-1;t<=n;t+=1){var r=o[--i];v(r,t,48),o[i++]=r}var a=o[--i],s=m(c(a.length),o[--i],2);y(a,a.length-s.length,s),o[i++]=a},e.encu=function(){var t=A(A(e.charvals,e.U),o[--i]);o[i++]=t,o[i++]=5,e.tobin()},e.encl=function(){var t=A(A(e.charvals,e.L),o[--i]);o[i++]=t,o[i++]=5,e.tobin()},e.encm=function(){var t=A(A(e.charvals,e.M),o[--i]);o[i++]=t,o[i++]=5,e.tobin()},e.encd=function(){var t=A(A(e.charvals,e.D),o[--i]);o[i++]=t,o[i++]=4,e.tobin()},e.encp=function(){var t=o[--i];if(o[i++]=t,t==e.fn1)i--,o[i++]="00000000";else{var n=o[--i];if(o[i++]=n,n<=-1e6){var r=L(-o[--i]-1e6);o[i++]=r,o[i++]=r,0==r&&(i--,o[i++]=1);var a=~~(Math.log(o[--i])/Math.log(10)),s=c(4*(a+1)+8);y(s,0,"00000"),o[i++]=a,o[i++]=s,o[i++]=s,o[i++]=a+1,o[i++]=3,e.tobin();var u=o[--i];y(o[--i],5,u);var l=o[--i],h=o[--i],f=o[--i];o[i++]=l,o[i++]=f;for(var d=h;d>=0;d-=1){var p=o[--i],m=o[--i];o[i++]=m,o[i++]=~~(p/10),o[i++]=m,o[i++]=4*d+8,o[i++]=L(p%10+2),o[i++]=4,e.tobin();var g=o[--i],v=o[--i];y(o[--i],v,g)}i--}else{var b=A(A(e.charvals,e.P),o[--i]);o[i++]=b,o[i++]=5,e.tobin()}}},e.encfuncs=s(["encu","encl","encm","encp","encd"]),e.addtomsgbits=function(){e.v=o[--i],y(e.msgbits,e.j,e.v),e.j=e.j+e.v.length},e.state=e.U,e.msgbits=c(e.minseq),e.i=0,e.j=0;!(e.i>=e.seq.length);)if(e.state!=e.B){if(e.char=A(e.seq,e.i),o[i++]=e.char,!0===e[A(e.encfuncs,e.state)]())break;e.addtomsgbits(),e.i=e.i+1,e.char!=e.su&&e.char!=e.sp||(o[i++]=A(e.seq,e.i),e.char==e.su?e.encu():e.encp(),e.addtomsgbits(),e.i=e.i+1),e.char==e.lu&&(e.state=e.U),e.char==e.ll&&(e.state=e.L),e.char==e.lm&&(e.state=e.M),e.char==e.lp&&(e.state=e.P),e.char==e.ld&&(e.state=e.D),e.char==e.sb&&(e.state=e.B)}else{for(e.numbytes=0;!(e.i+e.numbytes>=e.seq.length)&&!(A(e.seq,e.i+e.numbytes)<0);)e.numbytes=e.numbytes+1;e.numbytes<=31?(o[i++]=e.numbytes,o[i++]=5,e.tobin(),e.addtomsgbits()):(o[i++]=0,o[i++]=5,e.tobin(),e.addtomsgbits(),o[i++]=e.numbytes-31,o[i++]=11,e.tobin(),e.addtomsgbits());for(var d=0,g=e.numbytes;d<g;d++)o[i++]=A(e.seq,e.i),o[i++]=8,e.tobin(),e.addtomsgbits(),e.i=e.i+1;e.i<e.seq.length&&(e.char=A(e.seq,e.i),e.i=e.i+1,e.char==e.lu&&(e.state=e.U),e.char==e.ll&&(e.state=e.L),e.char==e.lm&&(e.state=e.M))}}for(ht.$ctx._21840||function(){var t=Object.create(e);for(var n in t.metrics=s([s(["rune",0,0,0,6]),s(["compact",1,1,17,6]),s(["full",1,1,21,6]),s(["compact",2,0,40,6]),s(["full",2,1,48,6]),s(["compact",3,0,51,8]),s(["full",3,1,60,8]),s(["compact",4,0,76,8]),s(["full",4,1,88,8]),s(["full",5,1,120,8]),s(["full",6,1,156,8]),s(["full",7,1,196,8]),s(["full",8,1,240,8]),s(["full",9,1,230,10]),s(["full",10,1,272,10]),s(["full",11,1,316,10]),s(["full",12,1,364,10]),s(["full",13,1,416,10]),s(["full",14,1,470,10]),s(["full",15,1,528,10]),s(["full",16,1,588,10]),s(["full",17,1,652,10]),s(["full",18,1,720,10]),s(["full",19,1,790,10]),s(["full",20,1,864,10]),s(["full",21,1,940,10]),s(["full",22,1,1020,10]),s(["full",23,0,920,12]),s(["full",24,0,992,12]),s(["full",25,0,1066,12]),s(["full",26,0,1144,12]),s(["full",27,0,1224,12]),s(["full",28,0,1306,12]),s(["full",29,0,1392,12]),s(["full",30,0,1480,12]),s(["full",31,0,1570,12]),s(["full",32,0,1664,12])]),t)t.hasOwnProperty(n)&&(ht.$ctx[n]=t[n]);ht.$ctx._21840=1}(),e.i=0;e.m=A(e.metrics,e.i),e.frmt=A(e.m,0),e.mlyr=A(e.m,1),e.icap=A(e.m,2),e.ncws=A(e.m,3),e.bpcw=A(e.m,4),e.numecw=~~Math.ceil(L(e.ncws*e.eclevel/100+e.ecaddchars)),0==e.msgbits.length&&(e.numecw=0),e.numdcw=L(e.ncws-e.numecw),e.okay=!0,D(e.format,"unset")&&D(e.format,e.frmt)&&(e.okay=!1),e.readerinit&&1!=e.icap&&(e.okay=!1),-1!=e.layers&&e.layers!=e.mlyr&&(e.okay=!1),~~Math.ceil(e.msgbits.length/e.bpcw)>e.numdcw&&(e.okay=!1),!e.okay;)e.i=e.i+1;for(e.layers=e.mlyr,e.format=e.frmt,e.allzero=function(){var e=o[--i];o[i++]=T(e,b("000000000000",0,e.length))},e.allones=function(){var e=o[--i];o[i++]=T(e,b("111111111111",0,e.length))},e.cws=s(e.ncws),e.m=0,e.c=0;!(e.msgbits.length<=e.m);){if(e.msgbits.length-e.m>=e.bpcw){e.cwb=b(e.msgbits,e.m,L(e.bpcw-1)),e.cwf=b(e.msgbits,L(L(e.m+e.bpcw)-1),1),o[i++]=e.cwb,e.allzero(),o[--i]&&(e.cwf="1",e.m=e.m-1),o[i++]=e.cwb,e.allones(),o[--i]&&(e.cwf="0",e.m=e.m-1);var x=c(12);y(x,0,e.cwb),y(x,L(e.bpcw-1),e.cwf),e.cwb=b(x,0,e.bpcw)}else{e.cwb=b(e.msgbits,e.m,e.msgbits.length-e.m);var C=f(c(12),"111111111111");y(C,0,e.cwb),e.cwb=b(C,0,e.bpcw),o[i++]=e.cwb,e.allones(),o[--i]&&y(e.cwb,e.cwb.length-1,"0")}e.cw=0;for(var E=0,S=L(e.bpcw-1);E<=S;E+=1)e.i=E,e.cw=L(e.cw+~~Math.pow(2,L(L(e.bpcw-e.i)-1))*L(A(e.cwb,e.i)-48));v(e.cws,e.c,e.cw),e.m=L(e.m+e.bpcw),e.c=e.c+1}if(e.cws=b(e.cws,0,e.c),void 0!==A(e.options,"debugcws")&&(o[i++]="bwipp.debugcws#21898",o[i++]=e.cws,z()),e.rscodes=function(){e.rspm=o[--i],e.rsgf=o[--i],e.rsnc=o[--i],e.rscws=o[--i],o[i++]=1/0,o[i++]=1;for(var t=0,n=L(e.rsgf-1);t<n;t++){var r=o[--i],a=2*r;if(o[i++]=r,o[i++]=a,a>=e.rsgf){var u=o[--i];o[i++]=R(u,e.rspm)}}e.rsalog=s(),e.rslog=s(e.rsgf);for(var c=1,l=L(e.rsgf-1);c<=l;c+=1)v(e.rslog,A(e.rsalog,c),c);e.rsprod=function(){var t=o[--i],n=o[--i];if(o[i++]=n,o[i++]=t,0!=t&&0!=n){var r=A(e.rslog,o[--i]),a=A(e.rsalog,L(r+A(e.rslog,o[--i]))%L(e.rsgf-1));o[i++]=a}else i-=2,o[i++]=0},o[i++]=1/0,o[i++]=1;for(var h=0,f=e.rsnc;h<f;h++)o[i++]=0;e.coeffs=s();for(var d=1,p=e.rsnc;d<=p;d+=1){e.i=d,v(e.coeffs,e.i,A(e.coeffs,e.i-1));for(var m=e.i-1;m>=1;m-=1){e.j=m,o[i++]=e.coeffs,o[i++]=e.j,o[i++]=A(e.coeffs,e.j-1),o[i++]=A(e.coeffs,e.j),o[i++]=A(e.rsalog,e.i),e.rsprod();var g=o[--i],y=o[--i],w=o[--i];v(o[--i],w,R(y,g))}o[i++]=e.coeffs,o[i++]=0,o[i++]=A(e.coeffs,0),o[i++]=A(e.rsalog,e.i),e.rsprod();var x=o[--i],C=o[--i];v(o[--i],C,x)}e.nd=e.rscws.length,o[i++]=1/0,k(e.rscws);for(var E=0,S=e.rsnc;E<S;E++)o[i++]=0;o[i++]=0,e.rscws=s();for(var _=0,O=e.nd-1;_<=O;_+=1){e.k=R(A(e.rscws,_),A(e.rscws,e.nd));for(var T=0,D=L(e.rsnc-1);T<=D;T+=1){e.j=T,o[i++]=e.rscws,o[i++]=e.nd+e.j,o[i++]=A(e.rscws,e.nd+e.j+1),o[i++]=e.k,o[i++]=A(e.coeffs,L(L(e.rsnc-e.j)-1)),e.rsprod();var B=o[--i],I=o[--i],M=o[--i];v(o[--i],M,R(I,B))}}o[i++]=b(e.rscws,0,e.rscws.length-1)},T(e.format,"full")){e.mode=(L(e.layers-1)<<11)+(e.cws.length-1),e.readerinit&&(e.mode=1024|e.mode),e.mode=s([(61440&e.mode)>>>12,(3840&e.mode)>>>8,(240&e.mode)>>>4,15&e.mode]),o[i++]="mode",o[i++]=e.mode,o[i++]=6,o[i++]=16,o[i++]=19,e.rscodes();var O=o[--i];e[o[--i]]=O}if(T(e.format,"compact")){e.mode=(L(e.layers-1)<<6)+(e.cws.length-1),e.readerinit&&(e.mode=32|e.mode),e.mode=s([(240&e.mode)>>>4,15&e.mode]),o[i++]="mode",o[i++]=e.mode,o[i++]=5,o[i++]=16,o[i++]=19,e.rscodes();var I=o[--i];e[o[--i]]=I}if(T(e.format,"rune")){e.mode=p(e.barcode),e.mode=s([(240&e.mode)>>>4,15&e.mode]),o[i++]="mode",o[i++]=e.mode,o[i++]=5,o[i++]=16,o[i++]=19,e.rscodes();var M=o[--i];e[o[--i]]=M,o[i++]=1/0;for(var j=e.mode,N=0,F=j.length;N<F;N++)o[i++]=10^A(j,N);e.mode=s()}e.modebits=c(4*e.mode.length);for(var P=0,$=e.modebits.length-1;P<=$;P+=1)y(e.modebits,P,"0");for(var V=0,q=e.mode.length-1;V<=q;V+=1){e.i=V;var G=m(c(4),A(e.mode,e.i),2);y(e.modebits,4-G.length+4*e.i,G)}ht.$ctx._21999||function(){var t=Object.create(e);for(var n in t.rsparams=s([s([]),s([]),s([]),s([]),s([]),s([]),s([64,67]),s([]),s([256,301]),s([]),s([1024,1033]),s([]),s([4096,4201])]),t)t.hasOwnProperty(n)&&(ht.$ctx[n]=t[n]);ht.$ctx._21999=1}(),o[i++]="cws",o[i++]=e.cws,o[i++]=L(e.ncws-e.cws.length),k(A(e.rsparams,e.bpcw)),e.rscodes();var W=o[--i];e[o[--i]]=W,T(e.format,"full")?e.databits=c(L(e.layers*e.layers*16+112*e.layers)):e.databits=c(L(e.layers*e.layers*16+88*e.layers));for(var K=0,Y=e.databits.length-1;K<=Y;K+=1)y(e.databits,K,"0");for(var X=0,J=L(e.ncws-1);X<=J;X+=1){e.i=X;var Z=m(c(e.bpcw),A(e.cws,e.i),2);y(e.databits,L(L(L(e.bpcw-Z.length)+e.bpcw*e.i)+L(e.databits.length-e.ncws*e.bpcw)),Z)}e.cmv=function(){var t=o[--i],n=o[--i];o[i++]=L(L(n-t*e.size)+e.mid)},e.lmv=function(){e.lbit=o[--i],e.llyr=o[--i],e.lwid=L(e.fw+4*e.llyr),e.ldir=~~(~~(e.lbit/2)/e.lwid),0==e.ldir&&(o[i++]=L(1-~~(L(e.lwid-1)/2)+~~(e.lbit/2)%e.lwid),o[i++]=L(L(~~((e.fw-1)/2)+2*e.llyr)+e.lbit%2),e.cmv()),1==e.ldir&&(o[i++]=L(L(~~(e.fw/2)+2*e.llyr)+e.lbit%2),o[i++]=L(~~(L(e.lwid-1)/2)-1-~~(e.lbit/2)%e.lwid),e.cmv()),2==e.ldir&&(o[i++]=-L(1-~~(e.lwid/2)+~~(e.lbit/2)%e.lwid),o[i++]=-L(L(~~(e.fw/2)+2*e.llyr)+e.lbit%2),e.cmv()),3==e.ldir&&(o[i++]=-L(L(~~((e.fw-1)/2)+2*e.llyr)+e.lbit%2),o[i++]=-L(~~(e.lwid/2)-1-~~(e.lbit/2)%e.lwid),e.cmv())},T(e.format,"full")?e.fw=12:e.fw=9,e.size=L(L(e.fw+4*e.layers)+2),o[i++]=1/0;for(var ee=0,te=e.size*e.size;ee<te;ee++)o[i++]=-1;e.pixs=s(),e.mid=L(~~(L(e.size-1)/2)*e.size+~~(L(e.size-1)/2)),e.i=0;for(var ne=1,re=e.layers;ne<=re;ne+=1){e.layer=ne;for(var ie=0,oe=8*(e.fw+4*e.layer)-1;ie<=oe;ie+=1){e.pos=ie,o[i++]=e.pixs,o[i++]=e.layer,o[i++]=e.pos,e.lmv();var ae=o[--i];v(o[--i],ae,A(e.databits,e.databits.length-e.i-1)-48),e.i=e.i+1}}if(T(e.format,"full")){e.fw=13,e.size=L(L(L(e.fw+4*e.layers)+2)+2*~~L(L(e.layers+10.5)/7.5-1)),e.mid=~~(e.size*e.size/2),o[i++]=1/0;for(var se=0,ue=e.size*e.size;se<ue;se++)o[i++]=-2;e.npixs=s();for(var ce=0,le=~~(e.size/2);ce<=le;ce+=16){e.i=ce;for(var he=0,fe=L(e.size-1);he<=fe;he+=1){e.j=he,o[i++]=e.npixs,o[i++]=-~~(e.size/2)+e.j,o[i++]=e.i,e.cmv();var de=o[--i];y(o[--i],de,s([(~~(e.size/2)+e.j+e.i+1)%2])),o[i++]=e.npixs,o[i++]=-~~(e.size/2)+e.j,o[i++]=-e.i,e.cmv();var pe=o[--i];y(o[--i],pe,s([(~~(e.size/2)+e.j+e.i+1)%2])),o[i++]=e.npixs,o[i++]=e.i,o[i++]=-~~(e.size/2)+e.j,e.cmv();var me=o[--i];y(o[--i],me,s([(~~(e.size/2)+e.j+e.i+1)%2])),o[i++]=e.npixs,o[i++]=-e.i,o[i++]=-~~(e.size/2)+e.j,e.cmv();var ge=o[--i];y(o[--i],ge,s([(~~(e.size/2)+e.j+e.i+1)%2]))}}e.j=0;for(var Ae=0,ve=e.npixs.length-1;Ae<=ve;Ae+=1)e.i=Ae,-2==A(e.npixs,e.i)&&(v(e.npixs,e.i,A(e.pixs,e.j)),e.j=e.j+1);e.pixs=e.npixs}e.fw=~~(e.fw/2);for(var be=-e.fw,ye=e.fw;be<=ye;be+=1){e.i=be;for(var we=-e.fw,xe=e.fw;we<=xe;we+=1){e.j=we,o[i++]=e.pixs,o[i++]=e.i,o[i++]=e.j,e.cmv(),Math.abs(e.i)>Math.abs(e.j)?o[i++]=Math.abs(e.i):o[i++]=Math.abs(e.j);var Ce=o[--i],ke=o[--i];v(o[--i],ke,L(Ce+1)%2)}}for(var Ee=s([s([-(e.fw+1),e.fw,1]),s([-(e.fw+1),e.fw+1,1]),s([-e.fw,e.fw+1,1]),s([e.fw+1,e.fw+1,1]),s([e.fw+1,e.fw,1]),s([e.fw+1,-e.fw,1]),s([e.fw,e.fw+1,0]),s([e.fw+1,-(e.fw+1),0]),s([e.fw,-(e.fw+1),0]),s([-e.fw,-(e.fw+1),0]),s([-(e.fw+1),-(e.fw+1),0]),s([-(e.fw+1),-e.fw,0])]),Se=0,_e=Ee.length;Se<_e;Se++){o[i++]=e.pixs,k(A(Ee,Se));var Oe=o[--i],Te=o[--i],De=o[--i];o[i++]=Oe,o[i++]=De,o[i++]=Te,e.cmv();var Be=o[--i],Ie=o[--i];v(o[--i],Be,Ie)}ht.$ctx._22125||function(){var t=Object.create(e);for(var n in t.modemapfull=s([s([-5,7]),s([-4,7]),s([-3,7]),s([-2,7]),s([-1,7]),s([1,7]),s([2,7]),s([3,7]),s([4,7]),s([5,7]),s([7,5]),s([7,4]),s([7,3]),s([7,2]),s([7,1]),s([7,-1]),s([7,-2]),s([7,-3]),s([7,-4]),s([7,-5]),s([5,-7]),s([4,-7]),s([3,-7]),s([2,-7]),s([1,-7]),s([-1,-7]),s([-2,-7]),s([-3,-7]),s([-4,-7]),s([-5,-7]),s([-7,-5]),s([-7,-4]),s([-7,-3]),s([-7,-2]),s([-7,-1]),s([-7,1]),s([-7,2]),s([-7,3]),s([-7,4]),s([-7,5])]),t.modemapcompact=s([s([-3,5]),s([-2,5]),s([-1,5]),s([0,5]),s([1,5]),s([2,5]),s([3,5]),s([5,3]),s([5,2]),s([5,1]),s([5,0]),s([5,-1]),s([5,-2]),s([5,-3]),s([3,-5]),s([2,-5]),s([1,-5]),s([0,-5]),s([-1,-5]),s([-2,-5]),s([-3,-5]),s([-5,-3]),s([-5,-2]),s([-5,-1]),s([-5,0]),s([-5,1]),s([-5,2]),s([-5,3])]),t)t.hasOwnProperty(n)&&(ht.$ctx[n]=t[n]);ht.$ctx._22125=1}(),o[i++]="modemap",T(e.format,"full")?o[i++]=e.modemapfull:o[i++]=e.modemapcompact;var Me=o[--i];e[o[--i]]=Me;for(var je=0,Ne=e.modemap.length-1;je<=Ne;je+=1){e.i=je,o[i++]=e.pixs,k(A(e.modemap,e.i)),e.cmv();var Fe=o[--i];v(o[--i],Fe,A(e.modebits,e.i)-48)}var Re=new Map([["ren",Q],["pixs",e.pixs],["pixx",e.size],["pixy",e.size],["height",2*e.size/72],["width",2*e.size/72],["opt",e.options]]);o[i++]=Re,e.dontdraw||Q()}function ft(){var e=Object.create(ft.$ctx||(ft.$ctx={}));e.dontdraw=!1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],v(e.options,"dontdraw",!0),v(e.options,"format","compact"),o[i++]="args",o[i++]=e.barcode,o[i++]=e.options,ht();var t=o[--i];e[o[--i]]=t,v(e.args,"opt",e.options),o[i++]=e.args,e.dontdraw||Q()}function dt(){var e=Object.create(dt.$ctx||(dt.$ctx={}));e.dontdraw=!1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],v(e.options,"dontdraw",!0),v(e.options,"format","rune"),o[i++]="args",o[i++]=e.barcode,o[i++]=e.options,ht();var t=o[--i];e[o[--i]]=t,v(e.args,"opt",e.options),o[i++]=e.args,e.dontdraw||Q()}function pt(){var e=Object.create(pt.$ctx||(pt.$ctx={}));e.dontdraw=!1,e.version="unset",e.parse=!1,e.parsefnc=!1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i];var t=e.version;if(e.stype=T(b(t,0,1),"S"),pt.$ctx._22444||function(){var t=Object.create(e);t.stypevals=s(["1","1010","1100100","1111101000","10011100010000","11000011010100000","11110100001001000000","100110001001011010000000","101111101011110000100000000","111011100110101100101000000000","1001010100000010111110010000000000","1011101001000011101101110100000000000","1110100011010100101001010001000000000000","10010001100001001110011100101010000000000000","10110101111001100010000011110100100000000000000","11100011010111111010100100110001101000000000000000","100011100001101111001001101111110000010000000000000000","101100011010001010111100001011101100010100000000000000000"]),t.stypemetrics=s([s(["S-10",8,11,10,4,4,1,99,99,99]),s(["S-20",8,21,20,8,8,1,99,99,99]),s(["S-30",8,31,30,12,12,1,99,99,99])]),t.nonstypemetrics=s([s(["A",16,18,16,10,10,1,4,99,6]),s(["B",22,22,20,19,16,1,4,99,8]),s(["C",28,32,28,44,26,1,4,22,11]),s(["D",40,42,36,91,44,1,4,16,16]),s(["E",52,54,48,182,70,1,4,22,22]),s(["F",70,76,68,370,140,2,4,22,31]),s(["G",104,98,88,732,280,4,6,21,47]),s(["H",148,134,120,1480,560,8,6,20,69]),s(["T-16",16,17,16,10,10,1,99,99,99]),s(["T-32",16,33,32,24,16,1,99,99,99]),s(["T-48",16,49,48,38,22,1,99,99,99])]),t.fnc1=-1,t.fnc3=-2,t.lC=-5,t.lB=-6,t.lX=-7,t.lT=-8,t.lD=-9,t.unl=-10,t.fnc2=-11,t.fnc4=-12,t.sft1=-13,t.sft2=-14,t.sft3=-15,t.eci=-16,t.pad=-17,t.fnc1lD=-18,t.unlcw=255,o[i++]=1/0;for(var n=0;n<=128;n+=1)o[i++]=n,o[i++]=n+1;o[i++]=t.pad,o[i++]=129;for(var r=0;r<=99;r+=1){var a=m(c(2),r,10),l=f(c(2),"00");y(l,2-a.length,a),o[i++]=l,o[i++]=r+130}var h=s([t.lC,t.lB,t.fnc1,t.fnc2,t.fnc3,t.fnc4,t.fnc1lD]);o[i++]=229;for(var d=0,p=h.length;d<p;d++){var g=L(o[--i]+1);o[i++]=A(h,d),o[i++]=g,o[i++]=g}i--,o[i++]=t.lX,o[i++]=238,o[i++]=t.lT,o[i++]=239,t.Avals=u(),o[i++]=1/0;for(var b=t.Avals,w=b.size,x=b.keys(),C=0;C<w;C++){var k=x.next().value;o[i++]=k,o[i++]=b.get(k),o[i++]=1/0;var E=o[--i],S=o[--i];o[i++]=E,o[i++]=S;var O=s();o[i++]=O}t.Avals=u(),o[i++]=1/0,o[i++]=t.sft1,o[i++]=0,o[i++]=t.sft2,o[i++]=1,o[i++]=t.sft3,o[i++]=2,o[i++]=32,o[i++]=3;for(var T=48;T<=57;T+=1)o[i++]=T,o[i++]=T-44;for(var D=65;D<=90;D+=1)o[i++]=D,o[i++]=D-51;t.CNvals=u(),o[i++]=1/0;for(var B=0;B<=31;B+=1)o[i++]=B,o[i++]=B;t.C1vals=u(),o[i++]=1/0;for(var I=33;I<=47;I+=1)o[i++]=I,o[i++]=I-33;for(var M=58;M<=64;M+=1)o[i++]=M,o[i++]=M-43;for(var j=91;j<=95;j+=1)o[i++]=j,o[i++]=j-69;o[i++]=t.fnc1,o[i++]=27,o[i++]=t.fnc2,o[i++]=28,o[i++]=t.fnc3,o[i++]=29,o[i++]=t.fnc4,o[i++]=30,o[i++]=t.pad,o[i++]=31,t.C2vals=u(),o[i++]=1/0;for(var N=96;N<=127;N+=1)o[i++]=N,o[i++]=N-96;t.C3vals=u(),o[i++]=1/0;for(var F=t.CNvals,R=F.size,P=F.keys(),U=0;U<R;U++){var z=P.next().value;o[i++]=z,o[i++]=F.get(z),o[i++]=1/0;var H=o[--i],$=o[--i];o[i++]=H,o[i++]=$;var Q=s();o[i++]=Q}for(var V=t.C1vals,q=V.size,G=V.keys(),W=0;W<q;W++){var K=G.next().value;o[i++]=K,o[i++]=V.get(K),o[i++]=1/0;var Y=o[--i],X=o[--i];o[i++]=Y,o[i++]=A(t.CNvals,t.sft1),o[i++]=X;var J=s();o[i++]=J}for(var Z=t.C2vals,ee=Z.size,te=Z.keys(),ne=0;ne<ee;ne++){var re=te.next().value;o[i++]=re,o[i++]=Z.get(re),o[i++]=1/0;var ie=o[--i],oe=o[--i];o[i++]=ie,o[i++]=A(t.CNvals,t.sft2),o[i++]=oe;var ae=s();o[i++]=ae}for(var se=t.C3vals,ue=se.size,ce=se.keys(),le=0;le<ue;le++){var he=ce.next().value;o[i++]=he,o[i++]=se.get(he),o[i++]=1/0;var fe=o[--i],de=o[--i];o[i++]=fe,o[i++]=A(t.CNvals,t.sft3),o[i++]=de;var pe=s();o[i++]=pe}t.Cvals=u(),o[i++]=1/0,o[i++]=t.sft1,o[i++]=0,o[i++]=t.sft2,o[i++]=1,o[i++]=t.sft3,o[i++]=2,o[i++]=32,o[i++]=3;for(var me=48;me<=57;me+=1)o[i++]=me,o[i++]=me-44;for(var ge=97;ge<=122;ge+=1)o[i++]=ge,o[i++]=ge-83;t.TNvals=u(),o[i++]=1/0;for(var Ae=0;Ae<=31;Ae+=1)o[i++]=Ae,o[i++]=Ae;t.T1vals=u(),o[i++]=1/0;for(var ve=33;ve<=47;ve+=1)o[i++]=ve,o[i++]=ve-33;for(var be=58;be<=64;be+=1)o[i++]=be,o[i++]=be-43;for(var ye=91;ye<=95;ye+=1)o[i++]=ye,o[i++]=ye-69;o[i++]=t.fnc1,o[i++]=27,o[i++]=t.fnc2,o[i++]=28,o[i++]=t.fnc3,o[i++]=29,o[i++]=t.fnc4,o[i++]=30,o[i++]=t.pad,o[i++]=31,t.T2vals=u(),o[i++]=1/0,o[i++]=96,o[i++]=0;for(var we=65;we<=90;we+=1)o[i++]=we,o[i++]=we-64;for(var xe=123;xe<=127;xe+=1)o[i++]=xe,o[i++]=xe-96;t.T3vals=u(),o[i++]=1/0;for(var Ce=t.TNvals,ke=Ce.size,Ee=Ce.keys(),Se=0;Se<ke;Se++){var _e=Ee.next().value;o[i++]=_e,o[i++]=Ce.get(_e),o[i++]=1/0;var Oe=o[--i],Te=o[--i];o[i++]=Oe,o[i++]=Te;var De=s();o[i++]=De}for(var Be=t.T1vals,Ie=Be.size,Me=Be.keys(),je=0;je<Ie;je++){var Ne=Me.next().value;o[i++]=Ne,o[i++]=Be.get(Ne),o[i++]=1/0;var Fe=o[--i],Re=o[--i];o[i++]=Fe,o[i++]=A(t.TNvals,t.sft1),o[i++]=Re;var Pe=s();o[i++]=Pe}for(var Le=t.T2vals,Ue=Le.size,ze=Le.keys(),He=0;He<Ue;He++){var $e=ze.next().value;o[i++]=$e,o[i++]=Le.get($e),o[i++]=1/0;var Qe=o[--i],Ve=o[--i];o[i++]=Qe,o[i++]=A(t.TNvals,t.sft2),o[i++]=Ve;var qe=s();o[i++]=qe}for(var Ge=t.T3vals,We=Ge.size,Ke=Ge.keys(),Ye=0;Ye<We;Ye++){var Xe=Ke.next().value;o[i++]=Xe,o[i++]=Ge.get(Xe),o[i++]=1/0;var Je=o[--i],Ze=o[--i];o[i++]=Je,o[i++]=A(t.TNvals,t.sft3),o[i++]=Ze;var et=s();o[i++]=et}t.Tvals=u();for(var tt=128;tt<=255;tt+=1){t.i=tt,o[i++]=t.Avals,o[i++]=t.i,o[i++]=1/0,_(A(t.Avals,t.fnc4)),_(A(t.Avals,t.i-128));var nt=s(),rt=o[--i];v(o[--i],rt,nt),o[i++]=t.Cvals,o[i++]=t.i,o[i++]=1/0,_(A(t.Cvals,t.fnc4)),_(A(t.Cvals,t.i-128));var it=s(),ot=o[--i];v(o[--i],ot,it),o[i++]=t.Tvals,o[i++]=t.i,o[i++]=1/0,_(A(t.Tvals,t.fnc4)),_(A(t.Tvals,t.i-128));var at=s(),st=o[--i];v(o[--i],st,at)}o[i++]=1/0,o[i++]=13,o[i++]=0,o[i++]=42,o[i++]=1,o[i++]=62,o[i++]=2,o[i++]=32,o[i++]=3;for(var ut=48;ut<=57;ut+=1)o[i++]=ut,o[i++]=ut-44;for(var ct=65;ct<=90;ct+=1)o[i++]=ct,o[i++]=ct-51;t.Xvals=u(),o[i++]=1/0;for(var lt=t.Xvals,ht=lt.size,ft=lt.keys(),dt=0;dt<ht;dt++){var mt=ft.next().value;o[i++]=mt,o[i++]=lt.get(mt),o[i++]=1/0;var gt=o[--i],At=o[--i];o[i++]=gt,o[i++]=At;var vt=s();o[i++]=vt}t.Xvals=u(),o[i++]=1/0;for(var bt=0;bt<=255;bt+=1)o[i++]=bt,o[i++]=bt;t.Bvals=u(),o[i++]=1/0;for(var yt=t.Bvals,wt=yt.size,xt=yt.keys(),Ct=0;Ct<wt;Ct++){var kt=xt.next().value;o[i++]=kt,o[i++]=yt.get(kt),o[i++]=1/0;var Et=o[--i],St=o[--i];o[i++]=Et,o[i++]=St;var _t=s();o[i++]=_t}for(var Ot in t.Bvals=u(),t.encvals=s([t.Avals,t.Cvals,t.Tvals,t.Xvals,-1,t.Bvals]),t.A=0,t.C=1,t.T=2,t.X=3,t.D=4,t.B=5,t)t.hasOwnProperty(Ot)&&(pt.$ctx[Ot]=t[Ot]);pt.$ctx._22444=1}(),e.stype){e.normalize=function(){e.base=o[--i],e.num=o[--i];for(var t=e.num.length-1;t>=1;t-=1){e.i=t;var n=e.num,r=e.i;v(n,r-1,L(A(n,r-1)+~~(A(e.num,e.i)/e.base))),v(e.num,e.i,A(e.num,e.i)%e.base)}for(;!B(A(e.num,0),e.base);)o[i++]=1/0,o[i++]=0,k(e.num),e.num=s(),v(e.num,0,L(A(e.num,0)+~~(A(e.num,1)/e.base))),v(e.num,1,A(e.num,1)%e.base);o[i++]=1/0,e.i=!0;for(var a=e.num,u=0,c=a.length;u<c;u++){var l=A(a,u);o[i++]=l,0==l&&e.i?i--:e.i=!1}e.num=s(),0==e.num.length&&(e.num=s([0])),o[i++]=e.num},e.bigadd=function(){var t=o[--i],n=o[--i];if(e.offset=Math.abs(t.length-n.length),t.length<n.length){var r=t;t=n,n=r}e.a=t,e.b=n;for(var a=0,s=e.b.length-1;a<=s;a+=1){var u=e.a,c=e.offset;v(u,a+c,L(A(u,a+c)+A(e.b,a)))}o[i++]=e.a},e.barlen=e.barcode.length,e.v=s([1]);for(var n=0,r=e.barlen-1;n<=r;n+=1){e.i=n,o[i++]=1/0,k(A(e.stypevals,e.i),(function(){var t=o[--i];o[i++]=L(t-48)*L(A(e.barcode,e.barlen-e.i-1)-48)}));var a=s();o[i++]=a,o[i++]=e.v,e.bigadd(),e.v=o[--i]}o[i++]="v",o[i++]=e.v,o[i++]=2,e.normalize();var l=o[--i];e[o[--i]]=l,o[i++]=1/0;for(var h=0,d=(5-e.v.length%5)%5;h<d;h++)o[i++]=0;_(e.v),e.v=s(),e.cws=s(~~(e.v.length/5));for(var p=0,g=e.cws.length-1;p<=g;p+=1){e.i=p;var w=b(e.v,5*e.i,5);o[i++]=0;for(var x=0,C=w.length;x<C;x++){var E=o[--i];o[i++]=2*L(E+A(w,x))}v(e.cws,e.i,~~(o[--i]/2))}e.metrics=e.stypemetrics}else{var I=new Map([["parse",e.parse],["parsefnc",e.parsefnc],["eci",!0],["FNC1",e.fnc1],["FNC3",e.fnc3]]);e.fncvals=I,o[i++]="msg",o[i++]=e.barcode,o[i++]=e.fncvals,H();var M=o[--i];e[o[--i]]=M,e.msglen=e.msg.length,e.eciesc=92;var j=e.msg;o[i++]="numecis",o[i++]=0;for(var N=0,F=j.length;N<F;N++)if(A(j,N)<=-1e6){var P=o[--i];o[i++]=L(P+1)}var $=o[--i];if(e[o[--i]]=$,e.numecis>0){e.msgtmp=s(L(L(2*e.msg.length+6*e.numecis)+2)),v(e.msgtmp,0,e.pad),v(e.msgtmp,1,e.eciesc),e.j=2;for(var V=0,q=e.msg.length-1;V<=q;V+=1){var G=A(e.msg,V);if(o[i++]=G,G<=-1e6){for(var W=b(m(c(7),-o[--i],10),1,6),K=0,Y=W.length;K<Y;K++)o[i++]=A(W,K);O(s(6)),y(e.msgtmp,e.j+1,o[--i]),v(e.msgtmp,e.j,e.eciesc),e.j=e.j+7}else{var X=o[--i];o[i++]=X,X!=e.eciesc?(v(e.msgtmp,e.j,o[--i]),e.j=e.j+1):(i--,v(e.msgtmp,e.j,e.eciesc),v(e.msgtmp,e.j+1,e.eciesc),e.j=e.j+2)}}e.msg=b(e.msgtmp,0,e.j),e.msglen=e.msg.length}e.metrics=e.nonstypemetrics,e.fullcws=s([]);for(var J=e.metrics,Z=0,ee=J.length;Z<ee;Z++)e.m=A(J,Z),e.vers=A(e.m,0),e.dcws=A(e.m,4),e.okay=!0,T(e.version,"unset")?1!=e.vers.length&&(e.okay=!1):D(e.version,e.vers)&&(e.okay=!1),e.okay&&(o[i++]=1/0,_(e.fullcws),o[i++]=e.dcws,e.fullcws=s());o[i++]=1/0;for(var te=0;te<1480;te++)o[i++]=1e4;e.numremcws=s();for(var ne=e.fullcws,re=0,ie=ne.length;re<ie;re++)v(e.numremcws,L(A(ne,re)-1),1);for(var oe=1478;oe>=0;oe-=1)e.i=oe,1!=A(e.numremcws,e.i)&&v(e.numremcws,e.i,L(A(e.numremcws,e.i+1)+1));o[i++]=1/0;for(var ae=0,se=e.msglen;ae<se;ae++)o[i++]=0;o[i++]=0,e.numD=s(),o[i++]=1/0;for(var ue=0,ce=e.msglen;ue<ce;ue++)o[i++]=0;o[i++]=9999,e.nextXterm=s(),o[i++]=1/0;for(var le=0,he=e.msglen;le<he;le++)o[i++]=0;o[i++]=9999,e.nextNonX=s();for(var fe=e.msglen-1;fe>=0;fe-=1){e.i=fe,e.barchar=A(e.msg,e.i),e.barchar>=48&&e.barchar<=57&&v(e.numD,e.i,L(A(e.numD,e.i+1)+1)),13==e.barchar||42==e.barchar||62==e.barchar?v(e.nextXterm,e.i,0):v(e.nextXterm,e.i,L(A(e.nextXterm,e.i+1)+1));var de=void 0!==A(e.Xvals,e.barchar);v(e.nextNonX,e.i,de?L(A(e.nextNonX,e.i+1)+1):0)}o[i++]=1/0;for(var pe=e.nextXterm,me=0,ge=pe.length;me<ge;me++){var Ae=A(pe,me);o[i++]=Ae,Ae>1e4&&(i--,o[i++]=1e4)}e.nextXterm=s(),o[i++]=1/0;for(var ve=e.nextNonX,be=0,ye=ve.length;be<ye;be++){var we=A(ve,be);o[i++]=we,we>1e4&&(i--,o[i++]=1e4)}for(e.nextNonX=s(),e.isD=function(){o[i++]=e.char>=48&&e.char<=57},e.isC=function(){var t=void 0!==A(e.CNvals,e.char);o[i++]=t},e.isT=function(){var t=void 0!==A(e.TNvals,e.char);o[i++]=t},e.isX=function(){var t=void 0!==A(e.Xvals,e.char);o[i++]=t},e.isEA=function(){o[i++]=e.char>127},e.isFN=function(){o[i++]=e.char<0},e.XtermFirst=function(){var t=o[--i];o[i++]=B(A(e.nextXterm,t),A(e.nextNonX,t))},e.lookup=function(){e.ac=1,e.cc=2,e.tc=2,e.xc=2,e.bc=3,e.mode==e.A&&(e.ac=0,e.cc=1,e.tc=1,e.xc=1,e.bc=2),e.mode==e.C&&(e.cc=0),e.mode==e.T&&(e.tc=0),e.mode==e.X&&(e.xc=0),e.mode==e.B&&(e.bc=0);for(var t=0;t<1;t++)for(e.k=0;;){if(e.i+e.k==e.msglen){var n=s([e.ac,e.cc,e.tc,e.xc]);o[i++]=!0;for(var r=0,a=n.length;r<a;r++){var u=o[--i];o[i++]=u&&e.bc<=Math.ceil(A(n,r))}if(o[--i]){o[i++]=e.B;break}var c=s([e.cc,e.tc,e.xc,e.bc]);o[i++]=!0;for(var l=0,h=c.length;l<h;l++){var f=o[--i];o[i++]=f&&e.ac<=Math.ceil(A(c,l))}if(o[--i]){o[i++]=e.A;break}var d=s([e.tc,e.xc]);o[i++]=!0;for(var p=0,m=d.length;p<m;p++){var g=o[--i];o[i++]=g&&Math.ceil(e.cc)<=Math.ceil(A(d,p))}if(o[--i]){o[i++]=e.C;break}var v=s([e.xc]);o[i++]=!0;for(var b=0,y=v.length;b<y;b++){var w=o[--i];o[i++]=w&&Math.ceil(e.tc)<=Math.ceil(A(v,b))}if(o[--i]){o[i++]=e.T;break}o[i++]=e.X;break}if(e.char=A(e.msg,e.i+e.k),o[i++]="ac",o[i++]=e.ac,e.isD(),o[--i]){var x=o[--i];o[i++]=L(x+.5)}else if(e.isEA(),o[--i]){var C=o[--i];o[i++]=Math.ceil(C)+2}else{var k=o[--i];o[i++]=Math.ceil(k)+1}var E=o[--i];if(e[o[--i]]=E,o[i++]="cc",o[i++]=e.cc,e.isC(),o[--i]){var S=o[--i];o[i++]=L(S+.6666667)}else if(e.isEA(),o[--i]){var _=o[--i];o[i++]=L(_+2.6666667)}else{var O=o[--i];o[i++]=L(O+1.3333334)}var T=o[--i];if(e[o[--i]]=T,o[i++]="tc",o[i++]=e.tc,e.isT(),o[--i]){var D=o[--i];o[i++]=L(D+.6666667)}else if(e.isEA(),o[--i]){var B=o[--i];o[i++]=L(B+2.6666667)}else{var I=o[--i];o[i++]=L(I+1.3333334)}var M=o[--i];if(e[o[--i]]=M,o[i++]="xc",o[i++]=e.xc,e.isX(),o[--i]){var j=o[--i];o[i++]=L(j+.6666667)}else if(e.isEA(),o[--i]){var N=o[--i];o[i++]=L(N+4.3333334)}else{var F=o[--i];o[i++]=L(F+3.3333334)}var R=o[--i];if(e[o[--i]]=R,o[i++]="bc",o[i++]=e.bc,e.isFN(),o[--i]){var P=o[--i];o[i++]=L(P+3)}else{var U=o[--i];o[i++]=L(U+1)}var z=o[--i];if(e[o[--i]]=z,e.k>=3){var H=s([e.ac,e.cc,e.tc,e.xc]);o[i++]=!0;for(var $=0,Q=H.length;$<Q;$++){var V=o[--i];o[i++]=V&&e.bc+1<=Math.ceil(A(H,$))}if(o[--i]){o[i++]=e.B;break}var q=s([e.cc,e.tc,e.xc,e.bc]);o[i++]=!0;for(var G=0,W=q.length;G<W;G++){var K=o[--i];o[i++]=K&&e.ac+1<=Math.ceil(A(q,G))}if(o[--i]){o[i++]=e.A;break}var Y=s([e.ac,e.cc,e.xc,e.bc]);o[i++]=!0;for(var X=0,J=Y.length;X<J;X++){var Z=o[--i];o[i++]=Z&&Math.ceil(e.tc)+1<=Math.ceil(A(Y,X))}if(o[--i]){o[i++]=e.T;break}var ee=s([e.ac,e.tc]);o[i++]=!0;for(var te=0,ne=ee.length;te<ne;te++){var re=o[--i];o[i++]=re&&Math.ceil(e.cc)+1<=Math.ceil(A(ee,te))}if(o[--i]){if(Math.ceil(e.cc)<Math.ceil(e.xc)){o[i++]=e.C;break}if(e.cc==e.xc){if(o[i++]=e.i+e.k+1,e.XtermFirst(),o[--i]){o[i++]=e.X;break}o[i++]=e.C;break}}var ie=s([e.ac,e.cc,e.tc,e.bc]);o[i++]=!0;for(var oe=0,ae=ie.length;oe<ae;oe++){var se=o[--i];o[i++]=se&&Math.ceil(e.xc)+1<=Math.ceil(A(ie,oe))}if(o[--i]){o[i++]=e.X;break}}e.k=e.k+1}},e.addtocws=function(){var t=o[--i];y(e.cws,e.j,t),e.j=t.length+e.j},e.tobin=function(){var e=c(o[--i]);o[i++]=e;for(var t=0,n=e.length-1;t<=n;t+=1){var r=o[--i];v(r,t,48),o[i++]=r}var a=o[--i],u=m(c(a.length),o[--i],2);y(a,a.length-u.length,u),o[i++]=a,o[i++]=1/0;var l=o[--i],h=o[--i];o[i++]=l,k(h,(function(){var e=o[--i];o[i++]=L(e-48)}));var f=s();o[i++]=f},e.encA=function(){for(var t=0;t<1;t++){if(A(e.numD,e.i)>=21){e.Dbits=s([1,1,1,1]),e.mode=e.D;break}var n=A(e.numD,e.i);if(n>=13&&L(n+e.i)==e.msglen){e.Dbits=s([1,1,1,1]),e.mode=e.D;break}if(A(e.numD,e.i)>=2){var r=c(2);v(r,0,A(e.msg,e.i)),v(r,1,A(e.msg,e.i+1)),o[i++]=A(e.Avals,r),e.addtocws(),e.i=e.i+2;break}if(A(e.msg,e.i)==e.fnc1){if(A(e.numD,e.i+1)>=15){o[i++]=A(e.Avals,e.fnc1lD),e.addtocws(),e.i=e.i+1,e.Dbits=s([]),e.mode=e.D;break}var a=A(e.numD,e.i+1);if(a>=7&&L(L(a+e.i)+1)==e.msglen){o[i++]=A(e.Avals,e.fnc1lD),e.addtocws(),e.i=e.i+1,e.Dbits=s([]),e.mode=e.D;break}}o[i++]="newmode",e.lookup();var u=o[--i];if(e[o[--i]]=u,e.newmode!=e.mode){o[i++]=A(e.Avals,A(s([-1,e.lC,e.lT,e.lX,e.lD,e.lB]),e.newmode)),e.addtocws(),e.mode=e.newmode;break}o[i++]=A(e.Avals,A(e.msg,e.i)),e.addtocws(),e.i=e.i+1;break}},e.CTXvalstocws=function(){e.in=o[--i],o[i++]=1/0;for(var t=0,n=e.in.length-1;t<=n;t+=3){var r=b(e.in,t,3);o[i++]=0;for(var a=0,u=r.length;a<u;a++){var c=o[--i];o[i++]=40*L(c+A(r,a))}var l=1+~~(o[--i]/40);o[i++]=~~(l/256),o[i++]=l%256}O(s(S()));var h=o[--i],f=o[--i];o[i++]=h,o[i++]=f,i--},e.encCTX=function(){for(e.p=0,e.ctxvals=s(2220);e.i!=e.msglen;){if(e.p%3==0){if(A(e.numD,e.i)>=12){o[i++]=b(e.ctxvals,0,e.p),e.CTXvalstocws(),e.addtocws(),o[i++]=s([e.unlcw]),e.addtocws(),e.mode=e.A;break}var t=A(e.numD,e.i);if(t>=8&&L(t+e.i)==e.msglen){o[i++]=b(e.ctxvals,0,e.p),e.CTXvalstocws(),e.addtocws(),o[i++]=s([e.unlcw]),e.addtocws(),e.mode=e.A;break}if(e.mode==e.X){if(!(void 0!==A(e.Xvals,A(e.msg,e.i)))){o[i++]=b(e.ctxvals,0,e.p),e.CTXvalstocws(),e.addtocws(),(1!=A(e.numremcws,e.j)||A(e.msg,e.i)>127)&&(o[i++]=s([e.unlcw]),e.addtocws()),e.mode=e.A;break}if(e.i+1<e.msglen){if(!(void 0!==A(e.Xvals,A(e.msg,e.i+1))))break;if(e.i+2<e.msglen)if(!(void 0!==A(e.Xvals,A(e.msg,e.i+2))))break}}else if(e.lookup(),o[--i]!=e.mode){o[i++]=b(e.ctxvals,0,e.p),e.CTXvalstocws(),e.addtocws(),o[i++]=s([e.unlcw]),e.addtocws(),e.mode=e.A;break}if(e.msglen-e.i<=3){e.remcws=A(e.numremcws,e.j+2*~~(e.p/3)),o[i++]=1/0;for(var n=b(e.msg,e.i,e.msglen-e.i),r=0,a=n.length;r<a;r++){var u=A(n,r),l=void 0!==A(A(e.encvals,e.mode),u);o[i++]=u,l?_(A(A(e.encvals,e.mode),o[--i])):(i--,o[i++]=-1,o[i++]=-1,o[i++]=-1,o[i++]=-1)}if(e.remvals=s(),2==e.remcws&&3==e.remvals.length){o[i++]=1/0,_(b(e.ctxvals,0,e.p)),_(e.remvals);var h=s();o[i++]=h,e.CTXvalstocws(),e.addtocws(),e.mode=e.A,e.i=e.msglen;break}if(2==e.remcws&&2==e.remvals.length&&e.mode!=e.X){o[i++]=1/0,_(b(e.ctxvals,0,e.p)),_(e.remvals),_(A(A(e.encvals,e.mode),e.sft1));var f=s();o[i++]=f,e.CTXvalstocws(),e.addtocws(),e.mode=e.A,e.i=e.msglen;break}if(2==e.remcws&&1==e.remvals.length){o[i++]=b(e.ctxvals,0,e.p),e.CTXvalstocws(),e.addtocws(),o[i++]=s([e.unlcw]),e.addtocws(),o[i++]=A(e.Avals,A(e.msg,e.i)),e.addtocws(),e.mode=e.A,e.i=e.msglen;break}if(1==e.remcws&&1==e.remvals.length){o[i++]=b(e.ctxvals,0,e.p),e.CTXvalstocws(),e.addtocws(),o[i++]=A(e.Avals,A(e.msg,e.i)),e.addtocws(),e.mode=e.A,e.i=e.msglen;break}}}var d=A(A(e.encvals,e.mode),A(e.msg,e.i));y(e.ctxvals,e.p,d),e.p=d.length+e.p,e.i=e.i+1}if(e.mode!=e.A){for(;e.p%3!=0;)e.i=e.i-1,e.p=e.p-A(A(e.encvals,e.mode),A(e.msg,e.i)).length;o[i++]=1/0,_(b(e.ctxvals,0,e.p));var p=s();if(o[i++]=p,e.CTXvalstocws(),e.addtocws(),o[i++]=s([e.unlcw]),e.addtocws(),e.mode=e.A,e.i!=e.msglen)if(A(e.numD,e.i)>=2){var m=c(2);v(m,0,A(e.msg,e.i)),v(m,1,A(e.msg,e.i+1)),o[i++]=A(e.Avals,m),e.addtocws(),e.i=e.i+2}else o[i++]=A(e.Avals,A(e.msg,e.i)),e.addtocws(),e.i=e.i+1}},e.encD=function(){for(;;){if(A(e.numD,e.i)<3){if(e.Drem=(8-e.Dbits.length%8)%8,e.remcws=A(e.numremcws,e.j+~~(e.Dbits.length/8)),(0==L(A(e.numremcws,e.j+~~(e.Dbits.length/8)-1)-1)&&0==e.Drem||1==e.remcws&&0!=e.Drem)&&e.i==e.msglen){4!=e.Drem&&6!=e.Drem||(o[i++]=1/0,_(e.Dbits),o[i++]=1,o[i++]=1,o[i++]=1,o[i++]=1,e.Dbits=s()),2!=e.Drem&&6!=e.Drem||(o[i++]=1/0,_(e.Dbits),o[i++]=0,o[i++]=1,e.Dbits=s());break}if((e.i==e.msglen-1&&1==A(e.numD,e.i)||e.i==e.msglen-2&&2==A(e.numD,e.i))&&1==e.remcws&&0==e.Drem)break;(e.i!=e.msglen-1||1!=A(e.numD,e.i)||1!=e.remcws||4!=e.Drem&&6!=e.Drem)&&(o[i++]=1/0,_(e.Dbits),o[i++]=1,o[i++]=1,o[i++]=1,o[i++]=1,o[i++]=1,o[i++]=1,e.Dbits=s(),e.Drem=(8-e.Dbits.length%8)%8),4!=e.Drem&&6!=e.Drem||(A(e.numD,e.i)>=1?(o[i++]=1/0,_(e.Dbits),o[i++]=L(L(A(e.msg,e.i)-48)+1),o[i++]=4,e.tobin(),_(o[--i]),e.Dbits=s(),e.i=e.i+1):(o[i++]=1/0,_(e.Dbits),o[i++]=1,o[i++]=1,o[i++]=1,o[i++]=1,e.Dbits=s()),e.Drem=e.Drem-4),2==e.Drem&&(o[i++]=1/0,_(e.Dbits),o[i++]=0,o[i++]=1,e.Dbits=s(),e.Drem=0);break}o[i++]=1/0,_(e.Dbits);var t=b(e.msg,e.i,3);o[i++]=0;for(var n=0,r=t.length;n<r;n++){var a=o[--i];o[i++]=10*L(a+L(A(t,n)-48))}var u=o[--i];o[i++]=1+~~(u/10),o[i++]=10,e.tobin(),_(o[--i]),e.Dbits=s(),e.i=e.i+3}o[i++]=1/0;for(var c=0,l=e.Dbits.length-1;c<=l;c+=8){var h=b(e.Dbits,c,8);o[i++]=0;for(var f=0,d=h.length;f<d;f++){var p=o[--i];o[i++]=2*L(p+A(h,f))}var m=o[--i];o[i++]=~~(m/2)}O(s(S()));var g=o[--i],v=o[--i];o[i++]=g,o[i++]=v,i--,e.addtocws(),e.mode=e.A},e.encB=function(){for(e.p=0,e.bvals=s(1480);e.i!=e.msglen&&!(A(e.msg,e.i)<0)&&(e.lookup(),o[--i]==e.mode);)v(e.bvals,e.p,A(e.msg,e.i)),e.p=e.p+1,e.i=e.i+1;e.remcws=L(A(e.numremcws,e.j+e.p)-1),o[i++]=1/0,0==e.remcws&&e.i==e.msglen?o[i++]=0:e.p<250?o[i++]=e.p:(o[i++]=249+~~(e.p/250),o[i++]=e.p%250),_(b(e.bvals,0,e.p)),e.bvals=s(),o[i++]=e.bvals,e.addtocws(),e.mode=e.A},e.cws=s(1480),e.mode=e.A,e.i=0,e.j=0;!(e.i>=e.msglen)&&!0!==e[A(s(["encA","encCTX","encCTX","encCTX","encD","encB"]),e.mode)](););e.cws=b(e.cws,0,e.j)}for(e.i=0;e.m=A(e.metrics,e.i),e.vers=A(e.m,0),e.rows=A(e.m,1),e.cols=A(e.m,2),e.dcol=A(e.m,3),e.dcws=A(e.m,4),e.rscw=A(e.m,5),e.rsbl=A(e.m,6),e.riso=A(e.m,7),e.risi=A(e.m,8),e.risl=A(e.m,9),e.dcpb=~~(e.dcws/e.rsbl),e.ecpb=~~(e.rscw/e.rsbl),e.okay=!0,D(e.version,"unset")&&D(e.version,e.vers)&&(e.okay=!1),e.cws.length>e.dcws&&(e.okay=!1),!e.okay;)e.i=e.i+1;if(e.stype){o[i++]=1/0;for(var xe=0,Ce=L(e.dcws-e.cws.length);xe<Ce;xe++)o[i++]=0;_(e.cws),e.cws=s()}else{o[i++]=1/0,_(e.cws);for(var ke=0,Ee=L(e.dcws-e.cws.length);ke<Ee;ke++)o[i++]=129;e.cws=s()}void 0!==A(e.options,"debugcws")&&(o[i++]="bwipp.debugcws#22962",o[i++]=e.cws,z()),e.cwbs=s(e.rsbl),e.ecbs=s(e.rsbl);for(var Se=0,_e=L(e.rsbl-1);Se<=_e;Se+=1){e.i=Se,e.cwb=s(e.dcpb);for(var Oe=0,Te=e.dcpb-1;Oe<=Te;Oe+=1)e.j=Oe,v(e.cwb,e.j,A(e.cws,L(e.j*e.rsbl+e.i)));v(e.cwbs,e.i,e.cwb)}var De=e.stype?32:256;e.gf=De,e["gf-1"]=e.gf-1;var Be=e.stype?37:301;e.pm=Be,o[i++]=1/0,o[i++]=1;for(var Ie=0,Me=e["gf-1"];Ie<Me;Ie++){var je=o[--i],Ne=2*je;if(o[i++]=je,o[i++]=Ne,Ne>=e.gf){var Fe=o[--i];o[i++]=Fe^e.pm}}e.rsalog=s(),e.rslog=s(e.gf);for(var Re=1,Pe=e["gf-1"];Re<=Pe;Re+=1)v(e.rslog,A(e.rsalog,Re),Re);e.rsprod=function(){var t=o[--i],n=o[--i];if(o[i++]=n,o[i++]=t,0!=t&&0!=n){var r=A(e.rslog,o[--i]),a=A(e.rsalog,L(r+A(e.rslog,o[--i]))%e["gf-1"]);o[i++]=a}else i-=2,o[i++]=0},o[i++]=1/0,o[i++]=1;for(var Le=0,Ue=e.ecpb;Le<Ue;Le++)o[i++]=0;e.coeffs=s();for(var ze=0,He=e.ecpb-1;ze<=He;ze+=1){e.i=ze,v(e.coeffs,e.i+1,A(e.coeffs,e.i));for(var $e=e.i;$e>=1;$e-=1){e.j=$e,o[i++]=e.coeffs,o[i++]=e.j,o[i++]=A(e.coeffs,e.j-1),o[i++]=A(e.coeffs,e.j),o[i++]=A(e.rsalog,e.i),e.rsprod();var Qe=o[--i],Ve=o[--i],qe=o[--i];v(o[--i],qe,R(Ve,Qe))}o[i++]=e.coeffs,o[i++]=0,o[i++]=A(e.coeffs,0),o[i++]=A(e.rsalog,e.i),e.rsprod();var Ge=o[--i],We=o[--i];v(o[--i],We,Ge)}e.coeffs=b(e.coeffs,0,e.coeffs.length-1);for(var Ke=0,Ye=e.cwbs.length-1;Ke<=Ye;Ke+=1){e.i=Ke,o[i++]=1/0,_(A(e.cwbs,e.i));for(var Xe=0,Je=e.ecpb;Xe<Je;Xe++)o[i++]=0;e.rscws=s();for(var Ze=0,et=e.dcpb-1;Ze<=et;Ze+=1){e.m=Ze,e.k=A(e.rscws,e.m);for(var tt=0,nt=e.ecpb-1;tt<=nt;tt+=1){e.j=tt,o[i++]=e.rscws,o[i++]=e.m+e.j+1,o[i++]=A(e.coeffs,e.ecpb-e.j-1),o[i++]=e.k,e.rsprod();var rt=o[--i],it=o[--i];v(o[--i],it,R(rt,A(e.rscws,e.m+e.j+1)))}}v(e.ecbs,e.i,b(e.rscws,e.dcpb,e.ecpb))}o[i++]=1/0,_(e.cws);for(var ot=0,at=e.rscw;ot<at;ot++)o[i++]=0;e.cws=s();for(var st=0,ut=L(e.rscw-1);st<=ut;st+=1)e.i=st,v(e.cws,L(e.dcws+e.i),A(A(e.ecbs,e.i%e.rsbl),~~(e.i/e.rsbl)));var ct=e.stype?5:8;e.mmat=s(L(e.dcws+e.rscw)*ct),e.r=0,e.c=0;for(var lt=0,ht=e.stype?2:1,ft=e.cws.length-1;ht<0?lt>=ft:lt<=ft;lt+=ht){if(e.i=lt,e.stype){var dt=f(c(5),"00000"),mt=m(c(5),A(e.cws,e.i),2);y(dt,5-mt.length,mt),o[i++]=dt,o[i++]=1/0;var gt=o[--i],At=o[--i];o[i++]=gt,k(At,(function(){var e=o[--i];o[i++]=L(e-48)})),e.c1=s();var vt=f(c(5),"00000"),bt=m(c(5),A(e.cws,e.i+1),2);y(vt,5-bt.length,bt),o[i++]=vt,o[i++]=1/0;var yt=o[--i],wt=o[--i];o[i++]=yt,k(wt,(function(){var e=o[--i];o[i++]=L(e-48)})),e.c2=s(),o[i++]=1/0,_(b(e.c1,0,3)),_(b(e.c2,0,2)),e.top=s(),o[i++]=1/0,_(b(e.c1,3,2)),_(b(e.c2,2,3)),e.bot=s()}else{var xt=f(c(8),"00000000"),Ct=m(c(8),A(e.cws,e.i),2);y(xt,8-Ct.length,Ct),o[i++]=xt,o[i++]=1/0;var kt=o[--i],Et=o[--i];o[i++]=kt,k(Et,(function(){var e=o[--i];o[i++]=L(e-48)}));var St=s();e.top=b(St,0,4),e.bot=b(St,4,4)}y(e.mmat,L(e.r*e.dcol+e.c),e.top),y(e.mmat,L((e.r+1)*e.dcol+e.c),e.bot),e.c=e.c+e.top.length,e.c==e.dcol&&(e.c=0,e.r=e.r+2)}e.mmv=function(){var t=o[--i],n=o[--i];o[i++]=L(n+t*e.cols)},o[i++]=1/0;for(var _t=0,Ot=e.rows*e.cols;_t<Ot;_t++)o[i++]=-1;e.pixs=s();var Tt=s([function(){for(var t=0,n=e.cols;t<n;t++)o[i++]=0},function(){for(var t=0,n=e.cols;t<n;t++)o[i++]=1},function(){o[i++]=0;for(var t=0,n=L(e.cols-2);t<n;t++)o[i++]=1;o[i++]=0},function(){o[i++]=0,o[i++]=1;for(var t=0,n=L(e.cols-4);t<n;t++)o[i++]=0;o[i++]=1,o[i++]=0},function(){for(var t=0,n=~~(L(e.cols-1)/2);t<n;t++)o[i++]=-1;o[i++]=1;for(var r=0,a=~~(L(e.cols-1)/2);r<a;r++)o[i++]=-1},function(){for(var t=0,n=~~(L(e.cols-1)/2);t<n;t++)o[i++]=-1;o[i++]=0;for(var r=0,a=~~(L(e.cols-1)/2);r<a;r++)o[i++]=-1},function(){o[i++]=1;for(var t=0,n=L(e.cols-2);t<n;t++)o[i++]=0;o[i++]=1},function(){o[i++]=1,o[i++]=0;for(var t=0,n=L(e.cols-4);t<n;t++)o[i++]=1;o[i++]=0,o[i++]=1}]);e.artifact=Tt,pt.$ctx._23081||function(){var t=Object.create(e),n=new Map([["A","121343"],["B","12134343"],["C","12121343"],["D","1213434343"],["E","1212134343"],["F","1212121343"],["G","121213434343"],["H","121212134343"],["S","56661278"],["T","5666666666127878"]]);for(var r in t.cpatmap=n,t)t.hasOwnProperty(r)&&(pt.$ctx[r]=t[r]);pt.$ctx._23081=1}(),e.cpat=A(e.cpatmap,b(e.vers,0,1)),o[i++]=e.pixs,o[i++]=0,o[i++]=~~(L(e.rows-e.cpat.length)/2),e.mmv(),o[i++]=1/0,k(e.cpat,(function(){if(!0===A(e.artifact,L(o[--i]-49))())return!0}));var Dt=s(),Bt=o[--i];y(o[--i],Bt,Dt);for(var It=0,Mt=L(e.risl-1);It<=Mt;It+=1){e.i=It;for(var jt=e.riso,Nt=e.risi,Ft=L(e.cols-1);Nt<0?jt>=Ft:jt<=Ft;jt+=Nt){e.j=jt;var Rt=s([1,e.i%12==0?1:0]);o[i++]=Rt,o[i++]=Rt,o[i++]=e.pixs,o[i++]=e.j,o[i++]=e.i,e.mmv();var Pt=o[--i];if(y(o[--i],Pt,o[--i]),e.i!=L(e.risl-1)){o[i++]=e.pixs,o[i++]=L(L(e.cols-e.j)-2),o[i++]=L(L(e.rows-e.i)-1),e.mmv();var Lt=o[--i];y(o[--i],Lt,o[--i])}else i--}}pt.$ctx._23119||function(){var t=Object.create(e),n=new Map([["A",s([s([12,5])])],["B",s([s([16,7])])],["C",s([s([26,12])])],["D",s([])],["E",s([s([26,23])])],["F",s([s([26,32]),s([70,32]),s([26,34]),s([70,34])])],["G",s([s([27,48]),s([69,48])])],["H",s([s([26,70]),s([66,70]),s([106,70]),s([26,72]),s([66,72]),s([106,72])])],["S-10",s([])],["S-20",s([s([10,4])])],["S-30",s([s([15,4]),s([15,6])])],["T-16",s([s([8,10])])],["T-32",s([s([16,10]),s([16,12])])],["T-48",s([s([24,10]),s([24,12]),s([24,14])])]]);for(var r in t.blackdotmap=n,t)t.hasOwnProperty(r)&&(pt.$ctx[r]=t[r]);pt.$ctx._23119=1}(),k(A(e.blackdotmap,e.vers),(function(){var t=o[--i];o[i++]=e.pixs,_(t),e.mmv();var n=o[--i];v(o[--i],n,1)})),e.j=0;for(var Ut=0,zt=e.pixs.length-1;Ut<=zt;Ut+=1)e.i=Ut,-1==A(e.pixs,e.i)&&(v(e.pixs,e.i,A(e.mmat,e.j)),e.j=e.j+1);var Ht=new Map([["ren",Q],["pixs",e.pixs],["pixx",e.cols],["pixy",e.rows],["height",e.rows/72*2],["width",e.cols/72*2],["opt",e.options]]);o[i++]=Ht,e.dontdraw||Q()}function mt(){var e=Object.create(mt.$ctx||(mt.$ctx={}));e.dontdraw=!1,e.version="unset",e.eclevel="unset",e.parse=!1,e.parsefnc=!1,e.mask=-1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i];var t=new Map([["parse",e.parse],["parsefnc",e.parsefnc]]);e.fncvals=t,o[i++]="msg",o[i++]=e.barcode,o[i++]=e.fncvals,H();var n=o[--i];e[o[--i]]=n,e.msglen=e.msg.length,T(e.eclevel,"unset")&&(e.eclevel="L2"),e.tobin=function(){var e=c(o[--i]);o[i++]=e;for(var t=0,n=e.length-1;t<=n;t+=1){var r=o[--i];v(r,t,48),o[i++]=r}var a=o[--i],s=m(c(a.length),o[--i],2);y(a,a.length-s.length,s),o[i++]=a},e.bits=c(17+8*e.msglen),y(e.bits,0,"0011"),o[i++]=e.bits,o[i++]=4,o[i++]=e.msglen,o[i++]=13,e.tobin();var r=o[--i],a=o[--i];y(o[--i],a,r);for(var u=0,l=e.msglen-1;u<=l;u+=1){e.i=u,o[i++]=e.bits,o[i++]=17+8*e.i,o[i++]=A(e.msg,e.i),o[i++]=8,e.tobin();var h=o[--i],f=o[--i];y(o[--i],f,h)}mt.$ctx._23561||function(){var t=Object.create(e),n=s([1,12,20]);for(var r in t.metrics=s([s(["1",23,-1,0,205,s([1,21,4]),s([0,-1,-1]),s([0,-1,-1]),s([1,17,8]),s([0,-1,-1]),s([0,-1,-1]),s([1,13,12]),s([0,-1,-1]),s([0,-1,-1]),s([1,9,16]),s([0,-1,-1]),s([0,-1,-1])]),s(["2",25,-1,0,301,s([1,31,6]),s([0,-1,-1]),s([0,-1,-1]),s([1,25,12]),s([0,-1,-1]),s([0,-1,-1]),s([1,19,18]),s([0,-1,-1]),s([0,-1,-1]),s([1,15,22]),s([0,-1,-1]),s([0,-1,-1])]),s(["3",27,-1,0,405,s([1,42,8]),s([0,-1,-1]),s([0,-1,-1]),s([1,34,16]),s([0,-1,-1]),s([0,-1,-1]),s([1,26,24]),s([0,-1,-1]),s([0,-1,-1]),s([1,20,30]),s([0,-1,-1]),s([0,-1,-1])]),s(["4",29,14,1,439,s([1,46,8]),s([0,-1,-1]),s([0,-1,-1]),s([1,38,16]),s([0,-1,-1]),s([0,-1,-1]),s([1,30,24]),s([0,-1,-1]),s([0,-1,-1]),s([1,22,32]),s([0,-1,-1]),s([0,-1,-1])]),s(["5",31,16,1,555,s([1,57,12]),s([0,-1,-1]),s([0,-1,-1]),s([1,49,20]),s([0,-1,-1]),s([0,-1,-1]),s([1,37,32]),s([0,-1,-1]),s([0,-1,-1]),s([1,14,20]),s([1,13,22]),s([0,-1,-1])]),s(["6",33,16,1,675,s([1,70,14]),s([0,-1,-1]),s([0,-1,-1]),s([1,58,26]),s([0,-1,-1]),s([0,-1,-1]),s([1,24,20]),s([1,22,18]),s([0,-1,-1]),s([1,16,24]),s([1,18,26]),s([0,-1,-1])]),s(["7",35,17,1,805,s([1,84,16]),s([0,-1,-1]),s([0,-1,-1]),s([1,70,30]),s([0,-1,-1]),s([0,-1,-1]),s([1,26,22]),s([1,28,24]),s([0,-1,-1]),s([2,14,20]),n,s([0,-1,-1])]),s(["8",37,18,1,943,s([1,99,18]),s([0,-1,-1]),s([0,-1,-1]),s([1,40,18]),s([1,41,18]),s([0,-1,-1]),s([1,31,26]),s([1,32,28]),s([0,-1,-1]),s([2,16,24]),s([1,15,22]),s([0,-1,-1])]),s(["9",39,19,1,1089,s([1,114,22]),s([0,-1,-1]),s([0,-1,-1]),s([2,48,20]),s([0,-1,-1]),s([0,-1,-1]),s([2,24,20]),s([1,26,22]),s([0,-1,-1]),s([2,18,28]),s([1,18,26]),s([0,-1,-1])]),s(["10",41,20,1,1243,s([1,131,24]),s([0,-1,-1]),s([0,-1,-1]),s([1,52,22]),s([1,57,24]),s([0,-1,-1]),s([2,27,24]),s([1,29,24]),s([0,-1,-1]),s([2,21,32]),s([1,19,30]),s([0,-1,-1])]),s(["11",43,14,2,1289,s([1,135,26]),s([0,-1,-1]),s([0,-1,-1]),s([1,56,24]),s([1,57,24]),s([0,-1,-1]),s([2,28,24]),s([1,31,26]),s([0,-1,-1]),s([2,22,32]),s([1,21,32]),s([0,-1,-1])]),s(["12",45,15,2,1455,s([1,153,28]),s([0,-1,-1]),s([0,-1,-1]),s([1,62,26]),s([1,65,28]),s([0,-1,-1]),s([2,32,28]),s([1,33,28]),s([0,-1,-1]),s([3,17,26]),s([1,22,30]),s([0,-1,-1])]),s(["13",47,16,2,1629,s([1,86,16]),s([1,85,16]),s([0,-1,-1]),s([1,71,30]),s([1,72,30]),s([0,-1,-1]),s([2,37,32]),s([1,35,30]),s([0,-1,-1]),s([3,20,30]),s([1,21,32]),s([0,-1,-1])]),s(["14",49,16,2,1805,s([1,94,18]),s([1,95,18]),s([0,-1,-1]),s([2,51,22]),s([1,55,24]),s([0,-1,-1]),s([3,30,26]),s([1,31,26]),s([0,-1,-1]),s([4,18,28]),s([1,17,24]),s([0,-1,-1])]),s(["15",51,17,2,1995,s([1,104,20]),s([1,105,20]),s([0,-1,-1]),s([2,57,24]),s([1,61,26]),s([0,-1,-1]),s([3,33,28]),s([1,36,30]),s([0,-1,-1]),s([4,20,30]),s([1,19,30]),s([0,-1,-1])]),s(["16",53,17,2,2187,s([1,115,22]),s([1,114,22]),s([0,-1,-1]),s([2,65,28]),s([1,61,26]),s([0,-1,-1]),s([3,38,32]),s([1,33,30]),s([0,-1,-1]),s([5,19,28]),s([1,14,24]),s([0,-1,-1])]),s(["17",55,18,2,2393,s([1,126,24]),s([1,125,24]),s([0,-1,-1]),s([2,70,30]),s([1,69,30]),s([0,-1,-1]),s([4,33,28]),s([1,29,26]),s([0,-1,-1]),s([5,20,30]),s([1,19,30]),s([0,-1,-1])]),s(["18",57,19,2,2607,s([1,136,26]),s([1,137,26]),s([0,-1,-1]),s([3,56,24]),s([1,59,26]),s([0,-1,-1]),s([5,35,30]),s([0,-1,-1]),s([0,-1,-1]),s([6,18,28]),s([1,21,28]),s([0,-1,-1])]),s(["19",59,20,2,2829,s([1,148,28]),s([1,149,28]),s([0,-1,-1]),s([3,61,26]),s([1,64,28]),s([0,-1,-1]),s([7,24,20]),s([1,23,22]),s([0,-1,-1]),s([6,20,30]),s([1,21,32]),s([0,-1,-1])]),s(["20",61,20,2,3053,s([3,107,20]),s([0,-1,-1]),s([0,-1,-1]),s([3,65,28]),s([1,72,30]),s([0,-1,-1]),s([7,26,22]),s([1,23,22]),s([0,-1,-1]),s([7,19,28]),s([1,20,32]),s([0,-1,-1])]),s(["21",63,21,2,3291,s([3,115,22]),s([0,-1,-1]),s([0,-1,-1]),s([4,56,24]),s([1,63,28]),s([0,-1,-1]),s([7,28,24]),s([1,25,22]),s([0,-1,-1]),s([8,18,28]),s([1,21,22]),s([0,-1,-1])]),s(["22",65,16,3,3383,s([2,116,22]),s([1,122,24]),s([0,-1,-1]),s([4,56,24]),s([1,72,30]),s([0,-1,-1]),s([7,28,24]),s([1,32,26]),s([0,-1,-1]),s([8,18,28]),s([1,24,30]),s([0,-1,-1])]),s(["23",67,17,3,3631,s([3,127,24]),s([0,-1,-1]),s([0,-1,-1]),s([5,51,22]),s([1,62,26]),s([0,-1,-1]),s([7,30,26]),s([1,35,26]),s([0,-1,-1]),s([8,20,30]),s([1,21,32]),s([0,-1,-1])]),s(["24",69,17,3,3887,s([2,135,26]),s([1,137,26]),s([0,-1,-1]),s([5,56,24]),s([1,59,26]),s([0,-1,-1]),s([7,33,28]),s([1,30,28]),s([0,-1,-1]),s([11,16,24]),s([1,19,26]),s([0,-1,-1])]),s(["25",71,18,3,4151,s([3,105,20]),s([1,121,22]),s([0,-1,-1]),s([5,61,26]),s([1,57,26]),s([0,-1,-1]),s([9,28,24]),s([1,28,22]),s([0,-1,-1]),s([10,19,28]),s([1,18,30]),s([0,-1,-1])]),s(["26",73,18,3,4423,s([2,157,30]),s([1,150,28]),s([0,-1,-1]),s([5,65,28]),s([1,61,26]),s([0,-1,-1]),s([8,33,28]),s([1,34,30]),s([0,-1,-1]),s([10,19,28]),s([2,15,26]),s([0,-1,-1])]),s(["27",75,19,3,4703,s([3,126,24]),s([1,115,22]),s([0,-1,-1]),s([7,51,22]),s([1,54,22]),s([0,-1,-1]),s([8,35,30]),s([1,37,30]),s([0,-1,-1]),s([15,15,22]),s([1,10,22]),s([0,-1,-1])]),s(["28",77,19,3,4991,s([4,105,20]),s([1,103,20]),s([0,-1,-1]),s([7,56,24]),s([1,45,18]),s([0,-1,-1]),s([10,31,26]),s([1,27,26]),s([0,-1,-1]),s([10,17,26]),s([3,20,28]),s([1,21,28])]),s(["29",79,20,3,5287,s([3,139,26]),s([1,137,28]),s([0,-1,-1]),s([6,66,28]),s([1,66,30]),s([0,-1,-1]),s([9,36,30]),s([1,34,32]),s([0,-1,-1]),s([13,19,28]),s([1,17,32]),s([0,-1,-1])]),s(["30",81,20,3,5591,s([6,84,16]),s([1,82,16]),s([0,-1,-1]),s([6,70,30]),s([1,68,30]),s([0,-1,-1]),s([7,35,30]),s([3,33,28]),s([1,32,28]),s([13,20,30]),s([1,20,28]),s([0,-1,-1])]),s(["31",83,21,3,5903,s([5,105,20]),s([1,94,18]),s([0,-1,-1]),s([6,74,32]),s([1,71,30]),s([0,-1,-1]),s([11,33,28]),s([1,34,32]),s([0,-1,-1]),s([13,19,28]),s([3,16,26]),s([0,-1,-1])]),s(["32",85,17,4,6033,s([4,127,24]),s([1,126,24]),s([0,-1,-1]),s([7,66,28]),s([1,66,30]),s([0,-1,-1]),s([12,30,24]),s([1,24,28]),s([1,24,30]),s([15,19,28]),s([1,17,32]),s([0,-1,-1])]),s(["33",87,17,4,6353,s([7,84,16]),s([1,78,16]),s([0,-1,-1]),s([7,70,30]),s([1,66,28]),s([0,-1,-1]),s([12,33,28]),s([1,32,30]),s([0,-1,-1]),s([14,21,32]),s([1,24,28]),s([0,-1,-1])]),s(["34",89,18,4,6689,s([5,117,22]),s([1,117,24]),s([0,-1,-1]),s([8,66,28]),s([1,58,26]),s([0,-1,-1]),s([11,38,32]),s([1,34,32]),s([0,-1,-1]),s([15,20,30]),s([2,17,26]),s([0,-1,-1])]),s(["35",91,18,4,7025,s([4,148,28]),s([1,146,28]),s([0,-1,-1]),s([8,68,30]),s([1,70,24]),s([0,-1,-1]),s([10,36,32]),s([3,38,28]),s([0,-1,-1]),s([16,19,28]),s([3,16,26]),s([0,-1,-1])]),s(["36",93,19,4,7377,s([4,126,24]),s([2,135,26]),s([0,-1,-1]),s([8,70,28]),s([2,43,26]),s([0,-1,-1]),s([13,32,28]),s([2,41,30]),s([0,-1,-1]),s([17,19,28]),s([3,15,26]),s([0,-1,-1])]),s(["37",95,19,4,7729,s([5,136,26]),s([1,132,24]),s([0,-1,-1]),s([5,67,30]),s([4,68,28]),s([1,69,28]),s([14,35,30]),s([1,32,24]),s([0,-1,-1]),s([18,18,26]),s([3,16,28]),s([1,14,28])]),s(["38",97,19,4,8089,s([3,142,26]),s([3,141,28]),s([0,-1,-1]),s([8,70,30]),s([1,73,32]),s([1,74,32]),s([12,34,30]),s([3,34,26]),s([1,35,28]),s([18,21,32]),s([1,27,30]),s([0,-1,-1])]),s(["39",99,20,4,8465,s([5,116,22]),s([2,103,20]),s([1,102,20]),s([9,74,32]),s([1,74,30]),s([0,-1,-1]),s([14,34,28]),s([2,32,32]),s([1,32,30]),s([19,21,32]),s([1,25,26]),s([0,-1,-1])]),s(["40",101,20,4,8841,s([7,116,22]),s([1,117,22]),s([0,-1,-1]),s([11,65,28]),s([1,58,24]),s([0,-1,-1]),s([15,38,32]),s([1,27,28]),s([0,-1,-1]),s([20,20,30]),s([1,20,32]),s([1,21,32])]),s(["41",103,17,5,9009,s([6,136,26]),s([1,130,24]),s([0,-1,-1]),s([11,66,28]),s([1,62,30]),s([0,-1,-1]),s([14,34,28]),s([3,34,32]),s([1,30,30]),s([18,20,30]),s([3,20,28]),s([2,15,26])]),s(["42",105,17,5,9401,s([5,105,20]),s([2,115,22]),s([2,116,22]),s([10,75,32]),s([1,73,32]),s([0,-1,-1]),s([16,38,32]),s([1,27,28]),s([0,-1,-1]),s([22,19,28]),s([2,16,30]),s([1,19,30])]),s(["43",107,18,5,9799,s([6,147,28]),s([1,146,28]),s([0,-1,-1]),s([11,66,28]),s([2,65,30]),s([0,-1,-1]),s([18,33,28]),s([2,33,30]),s([0,-1,-1]),s([22,21,32]),s([1,28,30]),s([0,-1,-1])]),s(["44",109,18,5,10207,s([6,116,22]),s([3,125,24]),s([0,-1,-1]),s([11,75,32]),s([1,68,30]),s([0,-1,-1]),s([13,35,28]),s([6,34,32]),s([1,30,30]),s([23,21,32]),s([1,26,30]),s([0,-1,-1])]),s(["45",111,18,5,10623,s([7,105,20]),s([4,95,18]),s([0,-1,-1]),s([12,67,28]),s([1,63,30]),s([1,62,32]),s([21,31,26]),s([2,33,32]),s([0,-1,-1]),s([23,21,32]),s([2,24,30]),s([0,-1,-1])]),s(["46",113,19,5,11045,s([10,116,22]),s([0,-1,-1]),s([0,-1,-1]),s([12,74,32]),s([1,78,30]),s([0,-1,-1]),s([18,37,32]),s([1,39,30]),s([1,41,28]),s([25,21,32]),s([1,27,28]),s([0,-1,-1])]),s(["47",115,19,5,11477,s([5,126,24]),s([4,115,22]),s([1,114,22]),s([12,67,28]),s([2,66,32]),s([1,68,30]),s([21,35,30]),s([1,39,30]),s([0,-1,-1]),s([26,21,32]),s([1,28,28]),s([0,-1,-1])]),s(["48",117,19,5,11917,s([9,126,24]),s([1,117,22]),s([0,-1,-1]),s([13,75,32]),s([1,68,30]),s([0,-1,-1]),s([20,35,30]),s([3,35,28]),s([0,-1,-1]),s([27,21,32]),s([1,28,30]),s([0,-1,-1])]),s(["49",119,17,6,12111,s([9,126,24]),s([1,137,26]),s([0,-1,-1]),s([13,71,30]),s([2,68,32]),s([0,-1,-1]),s([20,37,32]),s([1,39,28]),s([1,38,28]),s([24,20,32]),s([5,25,28]),s([0,-1,-1])]),s(["50",121,17,6,12559,s([8,147,28]),s([1,141,28]),s([0,-1,-1]),s([10,73,32]),s([4,74,30]),s([1,73,30]),s([16,36,32]),s([6,39,30]),s([1,37,30]),s([27,21,32]),s([3,20,26]),s([0,-1,-1])]),s(["51",123,18,6,13025,s([9,137,26]),s([1,135,26]),s([0,-1,-1]),s([12,70,30]),s([4,75,32]),s([0,-1,-1]),s([24,35,30]),s([1,40,28]),s([0,-1,-1]),s([23,20,32]),s([8,24,30]),s([0,-1,-1])]),s(["52",125,18,6,13489,s([14,95,18]),s([1,86,18]),s([0,-1,-1]),s([13,73,32]),s([3,77,30]),s([0,-1,-1]),s([24,35,30]),s([2,35,28]),s([0,-1,-1]),s([26,21,32]),s([5,21,30]),s([1,23,30])]),s(["53",127,18,6,13961,s([9,147,28]),s([1,142,28]),s([0,-1,-1]),s([10,73,30]),s([6,70,32]),s([1,71,32]),s([25,35,30]),s([2,34,26]),s([0,-1,-1]),s([29,21,32]),s([4,22,30]),s([0,-1,-1])]),s(["54",129,18,6,14441,s([11,126,24]),s([1,131,24]),s([0,-1,-1]),s([16,74,32]),s([1,79,30]),s([0,-1,-1]),s([25,38,32]),s([1,25,30]),s([0,-1,-1]),s([33,21,32]),s([1,28,28]),s([0,-1,-1])]),s(["55",131,19,6,14939,s([14,105,20]),s([1,99,18]),s([0,-1,-1]),s([19,65,28]),s([1,72,28]),s([0,-1,-1]),s([24,37,32]),s([2,40,30]),s([1,41,30]),s([31,21,32]),s([4,24,32]),s([0,-1,-1])]),s(["56",133,19,6,15435,s([10,147,28]),s([1,151,28]),s([0,-1,-1]),s([15,71,30]),s([3,71,32]),s([1,73,32]),s([24,37,32]),s([3,38,30]),s([1,39,30]),s([36,19,30]),s([3,29,26]),s([0,-1,-1])]),s(["57",135,19,6,15939,s([15,105,20]),s([1,99,18]),s([0,-1,-1]),s([19,70,30]),s([1,64,28]),s([0,-1,-1]),s([27,38,32]),s([2,25,26]),s([0,-1,-1]),s([38,20,30]),s([2,18,28]),s([0,-1,-1])]),s(["58",137,17,7,16171,s([14,105,20]),s([1,113,22]),s([1,114,22]),s([17,67,30]),s([3,92,32]),s([0,-1,-1]),s([30,35,30]),s([1,41,30]),s([0,-1,-1]),s([36,21,32]),s([1,26,30]),s([1,27,30])]),s(["59",139,17,7,16691,s([11,146,28]),s([1,146,26]),s([0,-1,-1]),s([20,70,30]),s([1,60,26]),s([0,-1,-1]),s([29,38,32]),s([1,24,32]),s([0,-1,-1]),s([40,20,30]),s([2,17,26]),s([0,-1,-1])]),s(["60",141,18,7,17215,s([3,137,26]),s([1,136,26]),s([10,126,24]),s([22,65,28]),s([1,75,30]),s([0,-1,-1]),s([30,37,32]),s([1,51,30]),s([0,-1,-1]),s([42,20,30]),s([1,21,30]),s([0,-1,-1])]),s(["61",143,18,7,17751,s([12,126,24]),s([2,118,22]),s([1,116,22]),s([19,74,32]),s([1,74,30]),s([1,72,28]),s([30,38,32]),s([2,29,30]),s([0,-1,-1]),s([39,20,32]),s([2,37,26]),s([1,38,26])]),s(["62",145,18,7,18295,s([12,126,24]),s([3,136,26]),s([0,-1,-1]),s([21,70,30]),s([2,65,28]),s([0,-1,-1]),s([34,35,30]),s([1,44,32]),s([0,-1,-1]),s([42,20,30]),s([2,19,28]),s([2,18,28])]),s(["63",147,18,7,18847,s([12,126,24]),s([3,117,22]),s([1,116,22]),s([25,61,26]),s([2,62,28]),s([0,-1,-1]),s([34,35,30]),s([1,40,32]),s([1,41,32]),s([45,20,30]),s([1,20,32]),s([1,21,32])]),s(["64",149,19,7,19403,s([15,105,20]),s([2,115,22]),s([2,116,22]),s([25,65,28]),s([1,72,28]),s([0,-1,-1]),s([18,35,30]),s([17,37,32]),s([1,50,32]),s([42,20,30]),s([6,19,28]),s([1,15,28])]),s(["65",151,19,7,19971,s([19,105,20]),s([1,101,20]),s([0,-1,-1]),s([33,51,22]),s([1,65,22]),s([0,-1,-1]),s([40,33,28]),s([1,28,28]),s([0,-1,-1]),s([49,20,30]),s([1,18,28]),s([0,-1,-1])]),s(["66",153,17,8,20229,s([18,105,20]),s([2,117,22]),s([0,-1,-1]),s([26,65,28]),s([1,80,30]),s([0,-1,-1]),s([35,35,30]),s([3,35,28]),s([1,36,28]),s([52,18,28]),s([2,38,30]),s([0,-1,-1])]),s(["67",155,17,8,20805,s([26,84,16]),s([0,-1,-1]),s([0,-1,-1]),s([26,70,30]),s([0,-1,-1]),s([0,-1,-1]),s([45,31,26]),s([1,9,26]),s([0,-1,-1]),s([52,20,30]),s([0,-1,-1]),s([0,-1,-1])]),s(["68",157,17,8,21389,s([16,126,24]),s([1,114,22]),s([1,115,22]),s([23,70,30]),s([3,65,28]),s([1,66,28]),s([40,35,30]),s([1,43,30]),s([0,-1,-1]),s([46,20,30]),s([7,19,28]),s([1,16,28])]),s(["69",159,18,8,21993,s([19,116,22]),s([1,105,22]),s([0,-1,-1]),s([20,70,30]),s([7,66,28]),s([1,63,28]),s([40,35,30]),s([1,42,32]),s([1,43,32]),s([54,20,30]),s([1,19,30]),s([0,-1,-1])]),s(["70",161,18,8,22593,s([17,126,24]),s([2,115,22]),s([0,-1,-1]),s([24,70,30]),s([4,74,32]),s([0,-1,-1]),s([48,31,26]),s([2,18,26]),s([0,-1,-1]),s([54,19,28]),s([6,15,26]),s([1,14,26])]),s(["71",163,18,8,23201,s([29,84,16]),s([0,-1,-1]),s([0,-1,-1]),s([29,70,30]),s([0,-1,-1]),s([0,-1,-1]),s([6,34,30]),s([3,36,30]),s([38,33,28]),s([58,20,30]),s([0,-1,-1]),s([0,-1,-1])]),s(["72",165,18,8,23817,s([16,147,28]),s([1,149,28]),s([0,-1,-1]),s([31,66,28]),s([1,37,26]),s([0,-1,-1]),s([48,33,28]),s([1,23,26]),s([0,-1,-1]),s([53,20,30]),s([6,19,28]),s([1,17,28])]),s(["73",167,19,8,24453,s([20,115,22]),s([2,134,24]),s([0,-1,-1]),s([29,66,28]),s([2,56,26]),s([2,57,26]),s([45,36,30]),s([2,15,28]),s([0,-1,-1]),s([59,20,30]),s([2,21,32]),s([0,-1,-1])]),s(["74",169,19,8,25085,s([17,147,28]),s([1,134,26]),s([0,-1,-1]),s([26,70,30]),s([5,75,32]),s([0,-1,-1]),s([47,35,30]),s([1,48,32]),s([0,-1,-1]),s([64,18,28]),s([2,33,30]),s([1,35,30])]),s(["75",171,17,9,25373,s([22,115,22]),s([1,133,24]),s([0,-1,-1]),s([33,65,28]),s([1,74,28]),s([0,-1,-1]),s([43,36,30]),s([5,27,28]),s([1,30,28]),s([57,20,30]),s([5,21,32]),s([1,24,32])]),s(["76",173,17,9,26021,s([18,136,26]),s([2,142,26]),s([0,-1,-1]),s([33,66,28]),s([2,49,26]),s([0,-1,-1]),s([48,35,30]),s([2,38,28]),s([0,-1,-1]),s([64,20,30]),s([1,20,32]),s([0,-1,-1])]),s(["77",175,17,9,26677,s([19,126,24]),s([2,135,26]),s([1,136,26]),s([32,66,28]),s([2,55,26]),s([2,56,26]),s([49,36,30]),s([2,18,32]),s([0,-1,-1]),s([65,18,28]),s([5,27,30]),s([1,29,30])]),s(["78",177,18,9,27335,s([20,137,26]),s([1,130,26]),s([0,-1,-1]),s([30,75,32]),s([2,71,32]),s([0,-1,-1]),s([46,35,30]),s([6,39,32]),s([0,-1,-1]),s([3,12,30]),s([70,19,28]),s([0,-1,-1])]),s(["79",179,18,9,28007,s([20,147,28]),s([0,-1,-1]),s([0,-1,-1]),s([35,70,30]),s([0,-1,-1]),s([0,-1,-1]),s([49,35,30]),s([5,35,28]),s([0,-1,-1]),s([70,20,30]),s([0,-1,-1]),s([0,-1,-1])]),s(["80",181,18,9,28687,s([21,136,26]),s([1,155,28]),s([0,-1,-1]),s([34,70,30]),s([1,64,28]),s([1,65,28]),s([54,35,30]),s([1,45,30]),s([0,-1,-1]),s([68,20,30]),s([3,18,28]),s([1,19,28])]),s(["81",183,18,9,29375,s([19,126,24]),s([5,115,22]),s([1,114,22]),s([33,70,30]),s([3,65,28]),s([1,64,28]),s([52,35,30]),s([3,41,32]),s([1,40,32]),s([67,20,30]),s([5,21,32]),s([1,24,32])]),s(["82",185,18,9,30071,s([2,150,28]),s([21,136,26]),s([0,-1,-1]),s([32,70,30]),s([6,65,28]),s([0,-1,-1]),s([52,38,32]),s([2,27,32]),s([0,-1,-1]),s([73,20,30]),s([2,22,32]),s([0,-1,-1])]),s(["83",187,17,10,30387,s([21,126,24]),s([4,136,26]),s([0,-1,-1]),s([30,74,32]),s([6,73,30]),s([0,-1,-1]),s([54,35,30]),s([4,40,32]),s([0,-1,-1]),s([75,20,30]),s([1,20,28]),s([0,-1,-1])]),s(["84",189,17,10,31091,s([30,105,20]),s([1,114,22]),s([0,-1,-1]),s([3,45,22]),s([55,47,20]),s([0,-1,-1]),s([2,26,26]),s([62,33,28]),s([0,-1,-1]),s([79,18,28]),s([4,33,30]),s([0,-1,-1])])]),t)t.hasOwnProperty(r)&&(mt.$ctx[r]=t[r]);mt.$ctx._23561=1}(),e.eclval=A(e.eclevel,1)-49;for(var d=0;d<=83;d+=1){e.i=d,e.m=A(e.metrics,e.i),e.vers=A(e.m,0),e.size=A(e.m,1),e.alnk=A(e.m,2),e.alnn=A(e.m,3),e.alnr=L(e.size-e.alnk*e.alnn),e.nmod=A(e.m,4),e.ncws=~~(e.nmod/8),e.rbit=e.nmod%8,e.ecbs=b(e.m,5+3*e.eclval,3);var p=e.ecbs;o[i++]="ecws",o[i++]=0;for(var g=0,w=p.length;g<w;g++){var x=A(p,g),C=o[--i];o[i++]=L(C+A(x,0)*A(x,2))}var E=o[--i];if(e[o[--i]]=E,e.dcws=L(e.ncws-e.ecws),e.dmod=8*e.dcws,e.okay=!0,D(e.version,"unset")&&D(e.version,e.vers)&&(e.okay=!1),e.bits.length>e.dmod&&(e.okay=!1),e.okay)break}e.okay||(o[i++]="bwipp.hanxinNoValidSymbol#23586",o[i++]="Maximum length exceeded or invalid content",z()),e.version=e.vers,e.msgbits=e.bits,e.e1nb=A(A(e.ecbs,0),0),e.e2nb=A(A(e.ecbs,1),0),e.e3nb=A(A(e.ecbs,2),0),e.e1dcws=A(A(e.ecbs,0),1),e.e2dcws=A(A(e.ecbs,1),1),e.e3dcws=A(A(e.ecbs,2),1),e.e1ecws=A(A(e.ecbs,0),2),e.e2ecws=A(A(e.ecbs,1),2),e.e3ecws=A(A(e.ecbs,2),2),e.pad=c(e.dmod);for(var B=0,I=e.pad.length-1;B<=I;B+=1)v(e.pad,B,48);y(e.pad,0,e.msgbits),e.cws=s(e.dcws);for(var M=0,j=e.cws.length-1;M<=j;M+=1){e.c=M,e.cwb=b(e.pad,8*e.c,8),e.cw=0;for(var N=0;N<=7;N+=1)e.i=N,e.cw=L(e.cw+~~Math.pow(2,8-e.i-1)*L(A(e.cwb,e.i)-48));v(e.cws,e.c,e.cw)}e.rscodes=function(){e.rspm=o[--i],e.rsgf=o[--i],e.rsnc=o[--i],e.rscws=o[--i],o[i++]=1/0,o[i++]=1;for(var t=0,n=L(e.rsgf-1);t<n;t++){var r=o[--i],a=2*r;if(o[i++]=r,o[i++]=a,a>=e.rsgf){var u=o[--i];o[i++]=R(u,e.rspm)}}e.rsalog=s(),e.rslog=s(e.rsgf);for(var c=1,l=L(e.rsgf-1);c<=l;c+=1)v(e.rslog,A(e.rsalog,c),c);e.rsprod=function(){var t=o[--i],n=o[--i];if(o[i++]=n,o[i++]=t,0!=t&&0!=n){var r=A(e.rslog,o[--i]),a=A(e.rsalog,L(r+A(e.rslog,o[--i]))%L(e.rsgf-1));o[i++]=a}else i-=2,o[i++]=0},o[i++]=1/0,o[i++]=1;for(var h=0,f=e.rsnc;h<f;h++)o[i++]=0;e.coeffs=s();for(var d=1,p=e.rsnc;d<=p;d+=1){e.i=d,v(e.coeffs,e.i,A(e.coeffs,e.i-1));for(var m=e.i-1;m>=1;m-=1){e.j=m,o[i++]=e.coeffs,o[i++]=e.j,o[i++]=A(e.coeffs,e.j-1),o[i++]=A(e.coeffs,e.j),o[i++]=A(e.rsalog,e.i),e.rsprod();var g=o[--i],y=o[--i],w=o[--i];v(o[--i],w,R(y,g))}o[i++]=e.coeffs,o[i++]=0,o[i++]=A(e.coeffs,0),o[i++]=A(e.rsalog,e.i),e.rsprod();var x=o[--i],C=o[--i];v(o[--i],C,x)}e.nd=e.rscws.length,o[i++]=1/0,k(e.rscws);for(var E=0,S=e.rsnc;E<S;E++)o[i++]=0;o[i++]=0,e.rscws=s();for(var _=0,O=e.nd-1;_<=O;_+=1){e.k=R(A(e.rscws,_),A(e.rscws,e.nd));for(var T=0,D=L(e.rsnc-1);T<=D;T+=1){e.j=T,o[i++]=e.rscws,o[i++]=e.nd+e.j,o[i++]=A(e.rscws,e.nd+e.j+1),o[i++]=e.k,o[i++]=A(e.coeffs,L(L(e.rsnc-e.j)-1)),e.rsprod();var B=o[--i],I=o[--i],M=o[--i];v(o[--i],M,R(I,B))}}o[i++]=b(e.rscws,0,e.rscws.length-1)},e.dcwsb=s(L(L(e.e1nb+e.e2nb)+e.e3nb)),e.ecwsb=s(e.dcwsb.length),e.in=0,e.out=0;for(var F=0,P=e.e1nb;F<P;F++){o[i++]=b(e.cws,e.in,e.e1dcws),o[i++]=e.e1ecws,o[i++]=256,o[i++]=355,e.rscodes();var $=o[--i];v(e.dcwsb,e.out,b($,0,e.e1dcws)),v(e.ecwsb,e.out,b($,e.e1dcws,e.e1ecws)),e.in=L(e.in+e.e1dcws),e.out=e.out+1}for(var V=0,q=e.e2nb;V<q;V++){o[i++]=b(e.cws,e.in,e.e2dcws),o[i++]=e.e2ecws,o[i++]=256,o[i++]=355,e.rscodes();var G=o[--i];v(e.dcwsb,e.out,b(G,0,e.e2dcws)),v(e.ecwsb,e.out,b(G,e.e2dcws,e.e2ecws)),e.in=L(e.in+e.e2dcws),e.out=e.out+1}for(var W=0,K=e.e3nb;W<K;W++){o[i++]=b(e.cws,e.in,e.e3dcws),o[i++]=e.e3ecws,o[i++]=256,o[i++]=355,e.rscodes();var Y=o[--i];v(e.dcwsb,e.out,b(Y,0,e.e3dcws)),v(e.ecwsb,e.out,b(Y,e.e3dcws,e.e3ecws)),e.in=L(e.in+e.e3dcws),e.out=e.out+1}e.cws=s(e.ncws),e.cw=0;for(var X=0,J=e.dcwsb.length-1;X<=J;X+=1){e.i=X;var Z=A(e.dcwsb,e.i);y(e.cws,e.cw,Z),e.cw=Z.length+e.cw;var ee=A(e.ecwsb,e.i);y(e.cws,e.cw,ee),e.cw=ee.length+e.cw}o[i++]=1/0;var te=e.ncws,ne=12,re=te-1;if(te-1>12){var ie=ne;ne=re,re=ie}for(var oe=0,ae=re;oe<=ae;oe+=1)for(var se=oe,ue=e.ncws-1;se<=ue;se+=13)if(o[i++]=se,se<e.ncws){var ce=A(e.cws,o[--i]);o[i++]=ce}else i--;e.cws=s(),e.rbit>0&&(e.pad=s(e.cws.length+1),y(e.pad,0,e.cws),v(e.pad,e.pad.length-1,0),e.cws=e.pad),o[i++]=1/0;for(var le=0,he=e.size*e.size;le<he;le++)o[i++]=-1;if(e.pixs=s(),e.qmv=function(){var t=o[--i],n=o[--i];o[i++]=L(n+t*e.size)},0!=e.alnn){for(e.trmv=function(){var t=o[--i],n=o[--i];o[i++]=L(L(L(t*e.size+e.size)-1)-n)},e.aplot=function(){var t=o[--i],n=o[--i],r=o[--i];o[i++]=t,o[i++]=r,o[i++]=n,o[i++]=t,o[i++]=n,o[i++]=r,e.trmv();var a=o[--i];v(e.pixs,a,o[--i]),e.trmv();var s=o[--i];v(e.pixs,s,o[--i])},e.i=0,e.stag=0;!(e.i>=e.size);){for(var fe=0,de=L(e.size-1);fe<=de;fe+=1)if(e.j=fe,L(e.j+e.alnr)<e.size?o[i++]=(~~(e.j/e.alnk)+e.stag)%2==0&&!(0==e.i&&e.j<e.alnk)||e.j%e.alnk==0:o[i++]=L(e.alnn+e.stag)%2==0,o[--i]){o[i++]=e.j,o[i++]=e.i,o[i++]=1,e.aplot();var pe=e.j,me=e.i;o[i++]=pe+1,o[i++]=me+1,me+1<e.size&&pe+1<e.size?(o[i++]=0,e.aplot()):i-=2}L(e.i+e.alnr)==e.size?e.i=L(L(e.i+e.alnr)-1):e.i=L(e.i+e.alnk),e.stag=1-e.stag}for(var ge=e.alnk,Ae=e.alnk,ve=L(e.size-2);Ae<0?ge>=ve:ge<=ve;ge+=Ae){if(e.i=ge,~~(e.i/e.alnk)%2!=0){o[i++]=e.pixs,o[i++]=0,o[i++]=e.i-1,e.trmv();var be=o[--i];v(o[--i],be,0),o[i++]=e.pixs,o[i++]=0,o[i++]=e.i+1,e.trmv();var ye=o[--i];v(o[--i],ye,0),o[i++]=e.pixs,o[i++]=1,o[i++]=e.i-1,e.trmv();var we=o[--i];v(o[--i],we,0),o[i++]=e.pixs,o[i++]=1,o[i++]=e.i,e.trmv();var xe=o[--i];v(o[--i],xe,0),o[i++]=e.pixs,o[i++]=1,o[i++]=e.i+1,e.trmv();var Ce=o[--i];v(o[--i],Ce,0),o[i++]=e.pixs,o[i++]=e.i-1,o[i++]=0,e.trmv();var ke=o[--i];v(o[--i],ke,0),o[i++]=e.pixs,o[i++]=e.i+1,o[i++]=0,e.trmv();var Ee=o[--i];v(o[--i],Ee,0),o[i++]=e.pixs,o[i++]=e.i-1,o[i++]=1,e.trmv();var Se=o[--i];v(o[--i],Se,0),o[i++]=e.pixs,o[i++]=e.i,o[i++]=1,e.trmv();var _e=o[--i];v(o[--i],_e,0),o[i++]=e.pixs,o[i++]=e.i+1,o[i++]=1,e.trmv();var Oe=o[--i];v(o[--i],Oe,0)}o[i++]=e.pixs,o[i++]=L(e.size-1),o[i++]=e.i-1,e.trmv();var Te=o[--i];if(1!=A(o[--i],Te)){o[i++]=e.pixs,o[i++]=L(e.size-1),o[i++]=e.i-1,e.trmv();var De=o[--i];v(o[--i],De,0),o[i++]=e.pixs,o[i++]=L(e.size-2),o[i++]=e.i-1,e.trmv();var Be=o[--i];v(o[--i],Be,0),o[i++]=e.pixs,o[i++]=L(e.size-2),o[i++]=e.i,e.trmv();var Ie=o[--i];v(o[--i],Ie,0),o[i++]=e.pixs,o[i++]=L(e.size-2),o[i++]=e.i+1,e.trmv();var Me=o[--i];v(o[--i],Me,0),o[i++]=e.pixs,o[i++]=L(e.size-1),o[i++]=e.i+1,e.trmv();var je=o[--i];v(o[--i],je,0),o[i++]=e.pixs,o[i++]=e.i-1,o[i++]=L(e.size-1),e.trmv();var Ne=o[--i];v(o[--i],Ne,0),o[i++]=e.pixs,o[i++]=e.i-1,o[i++]=L(e.size-2),e.trmv();var Fe=o[--i];v(o[--i],Fe,0),o[i++]=e.pixs,o[i++]=e.i,o[i++]=L(e.size-2),e.trmv();var Re=o[--i];v(o[--i],Re,0),o[i++]=e.pixs,o[i++]=e.i+1,o[i++]=L(e.size-2),e.trmv();var Pe=o[--i];v(o[--i],Pe,0),o[i++]=e.pixs,o[i++]=e.i+1,o[i++]=L(e.size-1),e.trmv();var Le=o[--i];v(o[--i],Le,0)}}}mt.$ctx._23794||function(){var t=Object.create(e);for(var n in t.fpat=s([s([1,1,1,1,1,1,1,0]),s([1,0,0,0,0,0,0,0]),s([1,0,1,1,1,1,1,0]),s([1,0,1,0,0,0,0,0]),s([1,0,1,0,1,1,1,0]),s([1,0,1,0,1,1,1,0]),s([1,0,1,0,1,1,1,0]),s([0,0,0,0,0,0,0,0])]),t.fpat2=s([s([1,1,1,0,1,0,1,0]),s([1,1,1,0,1,0,1,0]),s([1,1,1,0,1,0,1,0]),s([0,0,0,0,1,0,1,0]),s([1,1,1,1,1,0,1,0]),s([0,0,0,0,0,0,1,0]),s([1,1,1,1,1,1,1,0]),s([0,0,0,0,0,0,0,0])]),t)t.hasOwnProperty(n)&&(mt.$ctx[n]=t[n]);mt.$ctx._23794=1}();for(var Ue=0,ze=e.fpat.length-1;Ue<=ze;Ue+=1){e.y=Ue;for(var He=0,$e=A(e.fpat,0).length-1;He<=$e;He+=1){e.x=He,e.fpb=A(A(e.fpat,e.y),e.x),e.fpb2=A(A(e.fpat2,e.y),e.x),o[i++]=e.pixs,o[i++]=e.x,o[i++]=e.y,e.qmv();var Qe=o[--i];v(o[--i],Qe,e.fpb),o[i++]=e.pixs,o[i++]=L(L(e.size-e.x)-1),o[i++]=e.y,e.qmv();var Ve=o[--i];v(o[--i],Ve,e.fpb),o[i++]=e.pixs,o[i++]=L(L(e.size-e.x)-1),o[i++]=L(L(e.size-e.y)-1),e.qmv();var qe=o[--i];v(o[--i],qe,e.fpb),o[i++]=e.pixs,o[i++]=e.x,o[i++]=L(L(e.size-e.y)-1),e.qmv();var Ge=o[--i];v(o[--i],Ge,e.fpb2)}}e.functionmap=s([s([s([0,8]),s([L(e.size-1),L(e.size-9)])]),s([s([1,8]),s([L(e.size-2),L(e.size-9)])]),s([s([2,8]),s([L(e.size-3),L(e.size-9)])]),s([s([3,8]),s([L(e.size-4),L(e.size-9)])]),s([s([4,8]),s([L(e.size-5),L(e.size-9)])]),s([s([5,8]),s([L(e.size-6),L(e.size-9)])]),s([s([6,8]),s([L(e.size-7),L(e.size-9)])]),s([s([7,8]),s([L(e.size-8),L(e.size-9)])]),s([s([8,8]),s([L(e.size-9),L(e.size-9)])]),s([s([8,7]),s([L(e.size-9),L(e.size-8)])]),s([s([8,6]),s([L(e.size-9),L(e.size-7)])]),s([s([8,5]),s([L(e.size-9),L(e.size-6)])]),s([s([8,4]),s([L(e.size-9),L(e.size-5)])]),s([s([8,3]),s([L(e.size-9),L(e.size-4)])]),s([s([8,2]),s([L(e.size-9),L(e.size-3)])]),s([s([8,1]),s([L(e.size-9),L(e.size-2)])]),s([s([8,0]),s([L(e.size-9),L(e.size-1)])]),s([s([L(e.size-9),0]),s([8,L(e.size-1)])]),s([s([L(e.size-9),1]),s([8,L(e.size-2)])]),s([s([L(e.size-9),2]),s([8,L(e.size-3)])]),s([s([L(e.size-9),3]),s([8,L(e.size-4)])]),s([s([L(e.size-9),4]),s([8,L(e.size-5)])]),s([s([L(e.size-9),5]),s([8,L(e.size-6)])]),s([s([L(e.size-9),6]),s([8,L(e.size-7)])]),s([s([L(e.size-9),7]),s([8,L(e.size-8)])]),s([s([L(e.size-9),8]),s([8,L(e.size-9)])]),s([s([L(e.size-8),8]),s([7,L(e.size-9)])]),s([s([L(e.size-7),8]),s([6,L(e.size-9)])]),s([s([L(e.size-6),8]),s([5,L(e.size-9)])]),s([s([L(e.size-5),8]),s([4,L(e.size-9)])]),s([s([L(e.size-4),8]),s([3,L(e.size-9)])]),s([s([L(e.size-3),8]),s([2,L(e.size-9)])]),s([s([L(e.size-2),8]),s([1,L(e.size-9)])]),s([s([L(e.size-1),8]),s([0,L(e.size-9)])])]);for(var We=e.functionmap,Ke=0,Ye=We.length;Ke<Ye;Ke++)k(A(We,Ke),(function(){k(o[--i]),e.qmv(),v(e.pixs,o[--i],0)}));var Xe=s([function(){i-=2,o[i++]=1},function(){var e=o[--i],t=o[--i];o[i++]=L(t+e)%2},function(){var e=o[--i],t=o[--i];o[i++]=L(L(e+t)%3+t%3)%2},function(){var e=o[--i],t=o[--i];o[i++]=L(t%e+L(e%t+L(e%3+t%3)))%2}]);e.maskfuncs=Xe,-1!=e.mask&&(e.maskfuncs=s([A(e.maskfuncs,e.mask-1)]),e.bestmaskval=e.mask-1),e.masks=s(e.maskfuncs.length);for(var Je=0,Ze=e.masks.length-1;Je<=Ze;Je+=1){e.m=Je,e.mask=s(e.size*e.size);for(var et=0,tt=L(e.size-1);et<=tt;et+=1){e.j=et;for(var nt=0,rt=L(e.size-1);nt<=rt&&(e.i=nt,o[i++]=e.i+1,o[i++]=e.j+1,!0!==A(e.maskfuncs,e.m)());nt+=1){var it=o[--i];o[i++]=0==it,o[i++]=e.pixs,o[i++]=e.i,o[i++]=e.j,e.qmv();var ot=o[--i],at=A(o[--i],ot),st=o[--i]&&-1==at?1:0;o[i++]=st,o[i++]=e.mask,o[i++]=e.i,o[i++]=e.j,e.qmv();var ut=o[--i];v(o[--i],ut,o[--i])}}v(e.masks,e.m,e.mask)}for(e.posx=0,e.posy=0,e.num=0;e.posy!=e.size;){o[i++]=e.pixs,o[i++]=e.posx,o[i++]=e.posy,e.qmv();var ct=o[--i];if(-1==A(o[--i],ct)){var lt=A(e.cws,~~(e.num/8)),ht=-(7-e.num%8);o[i++]=1&(ht<0?lt>>>-ht:lt<<ht),o[i++]=e.pixs,o[i++]=e.posx,o[i++]=e.posy,e.qmv();var ft=o[--i];v(o[--i],ft,o[--i]),e.num=e.num+1}e.posx=e.posx+1,e.posx==e.size&&(e.posx=0,e.posy=e.posy+1)}e.evalfulln1n3=function(){e.scrle=o[--i],o[i++]="scr1",o[i++]=0,k(e.scrle,(function(){var e=o[--i];if(o[i++]=e,e>=3){var t=o[--i],n=L(o[--i]+4*t);o[i++]=n,o[i++]=n}i--}));var t=o[--i];e[o[--i]]=t,e.scr3=0;for(var n=5,r=e.scrle.length-1;n<=r;n+=2)if(e.j=n,A(e.scrle,e.j)%3==0){e.fact=~~(A(e.scrle,e.j)/3);for(var a=b(e.scrle,e.j-4,4),s=0,u=a.length;s<u;s++)o[i++]=A(a,s)==e.fact;var c=o[--i],l=o[--i],h=o[--i];o[--i]&&h&&l&&c&&(5==e.j||e.j+2>=e.scrle.length||A(e.scrle,e.j-5)>=3||A(e.scrle,e.j+1)>=3)&&(e.scr3=e.scr3+50)}for(var f=1,d=e.scrle.length-5;f<=d;f+=2)if(e.j=f,A(e.scrle,e.j)%3==0){e.fact=~~(A(e.scrle,e.j)/3);for(var p=b(e.scrle,e.j+1,4),m=0,g=p.length;m<g;m++)o[i++]=A(p,m)==e.fact;var v=o[--i],y=o[--i],w=o[--i];o[--i]&&w&&y&&v&&(1==e.j||e.j+6>=e.scrle.length||A(e.scrle,e.j-1)>=3||A(e.scrle,e.j+5)>=3)&&(e.scr3=e.scr3+50)}o[i++]=e.scr1,o[i++]=e.scr3},e.evalfull=function(){e.sym=o[--i],e.n1=0,e.n3=0,e.rle=s(L(e.size+1)),e.lastpairs=s(e.size),e.thispairs=s(e.size),e.sizeadd1=L(e.size+1);for(var t=0,n=L(e.size-1);t<=n;t+=1){e.i=t,o[i++]=1/0;var r=e.size;o[i++]=0,o[i++]=0;for(var a=e.i,u=r,c=L(r*r-1);u<0?a>=c:a<=c;a+=u){var l=A(e.sym,a),h=o[--i];if(o[i++]=l,T(h,l)){var f=o[--i],d=o[--i];o[i++]=L(d+1),o[i++]=f}else{var p=o[--i];o[i++]=1,o[i++]=p}}i--;var m=S()+2;O(b(e.rle,0,m-2)),e.evalfulln1n3(),e.n3=L(o[--i]+e.n3),e.n1=L(o[--i]+e.n1),i--,e.symrow=b(e.sym,e.i*e.size,e.size),o[i++]=1/0;var g=e.symrow;o[i++]=0,o[i++]=0;for(var v=0,y=g.length;v<y;v++){var w=A(g,v),x=o[--i];if(o[i++]=w,T(x,w)){var C=o[--i],k=o[--i];o[i++]=L(k+1),o[i++]=C}else{var E=o[--i];o[i++]=1,o[i++]=E}}i--;var _=S()+2;O(b(e.rle,0,_-2)),e.evalfulln1n3(),e.n3=L(o[--i]+e.n3),e.n1=L(o[--i]+e.n1),i--}o[i++]=L(e.n1+e.n3)},e.bestscore=999999999;for(var dt=0,pt=e.masks.length-1;dt<=pt;dt+=1){e.m=dt,e.masksym=s(e.size*e.size);for(var gt=0,At=L(e.size*e.size-1);gt<=At;gt+=1)e.i=gt,v(e.masksym,e.i,R(A(e.pixs,e.i),A(A(e.masks,e.m),e.i)));1!=e.masks.length?(o[i++]=e.masksym,e.evalfull(),e.score=o[--i],e.score<e.bestscore&&(e.bestsym=e.masksym,e.bestmaskval=e.m,e.bestscore=e.score)):e.bestsym=e.masksym}e.pixs=e.bestsym,e.funval=4*(4*(20+~~(L(e.size-21)/2))+e.eclval)+e.bestmaskval,o[i++]=s([(3840&e.funval)>>>8,(240&e.funval)>>>4,15&e.funval]),o[i++]=4,o[i++]=16,o[i++]=19,e.rscodes(),e.funvals=o[--i],o[i++]=1/0,k(e.funvals,(function(){o[i++]=4,e.tobin(),k(o[--i],(function(){var e=o[--i];o[i++]=L(e-48)}))})),o[i++]=0,o[i++]=1,o[i++]=0,o[i++]=1,o[i++]=0,o[i++]=1,e.funbits=s();for(var vt=0,bt=e.functionmap.length-1;vt<=bt;vt+=1)e.i=vt,k(A(e.functionmap,e.i),(function(){var t=o[--i];o[i++]=e.pixs,_(t),e.qmv();var n=o[--i];v(o[--i],n,A(e.funbits,e.i))}));var yt=new Map([["ren",Q],["pixs",e.pixs],["pixx",e.size],["pixy",e.size],["height",2*e.size/72],["width",2*e.size/72],["opt",e.options]]);o[i++]=yt,e.dontdraw||Q()}function gt(){var e=Object.create(gt.$ctx||(gt.$ctx={}));e.dontdraw=!1,e.rows=-1,e.columns=-1,e.ratio=-1,e.parse=!1,e.parsefnc=!1,e.raw=!1,e.fast=!1,e.mask=-1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],-1==e.ratio&&-1==e.rows&&-1==e.columns&&(e.ratio=1.5),gt.$ctx._24075||function(){var t=Object.create(e);for(var n in t.laa=-1,t.lab=-2,t.lac=-3,t.bin=-4,t.sfa=-5,t.sfb=-6,t.sb2=-7,t.sb3=-8,t.sb4=-9,t.sb5=-10,t.sb6=-11,t.sfc=-12,t.sc2=-13,t.sc3=-14,t.sc4=-15,t.sc5=-16,t.sc6=-17,t.sc7=-18,t.bsa=-19,t.bsb=-20,t.tma=-21,t.tmb=-22,t.tmc=-23,t.tms=-24,t.fn1=-25,t.fn2=-26,t.fn3=-27,t.crl=-28,t.aim=-29,t.m05=-30,t.m06=-31,t.m12=-32,t.mac=-33,t)t.hasOwnProperty(n)&&(gt.$ctx[n]=t[n]);gt.$ctx._24075=1}();var t=new Map([["parse",e.parse],["parsefnc",e.parsefnc],["eci",!0],["FNC1",e.fn1],["FNC3",e.fn3]]);e.fncvals=t,o[i++]="msg",o[i++]=e.barcode,o[i++]=e.fncvals,H();var n=o[--i];e[o[--i]]=n,e.msglen=e.msg.length;var r=e.msg;o[i++]="numecis",o[i++]=0;for(var a=0,l=r.length;a<l;a++)if(A(r,a)<=-1e6){var h=o[--i];o[i++]=L(h+1)}var f=o[--i];e[o[--i]]=f,e.msgtmp=s(L(e.msg.length+6*e.numecis)),e.j=0;for(var p=0,g=e.msg.length-1;p<=g;p+=1){var x=A(e.msg,p);if(o[i++]=x,x<=-1e6){for(var C=b(m(c(7),-o[--i],10),1,6),S=0,D=C.length;S<D;S++)o[i++]=A(C,S);O(s(6)),y(e.msgtmp,e.j+1,o[--i]),v(e.msgtmp,e.j,e.fn2),e.j=e.j+7}else v(e.msgtmp,e.j,o[--i]),e.j=e.j+1}e.msg=e.msgtmp,e.msglen=e.msg.length,gt.$ctx._24174||function(){var t=Object.create(e);t.charmaps=s([s([32,32,"00"]),s(["!","!","01"]),s(['"','"',"02"]),s(["#","#","03"]),s(["$","$","04"]),s(["%","%","05"]),s(["&","&","06"]),s(["'","'","07"]),s([40,40,"08"]),s([41,41,"09"]),s(["*","*","10"]),s(["+","+","11"]),s([",",",","12"]),s(["-","-","13"]),s([".",".","14"]),s(["/","/","15"]),s(["0","0","16"]),s(["1","1","17"]),s(["2","2","18"]),s(["3","3","19"]),s(["4","4","20"]),s(["5","5","21"]),s(["6","6","22"]),s(["7","7","23"]),s(["8","8","24"]),s(["9","9","25"]),s([":",":","26"]),s([";",";","27"]),s(["<","<","28"]),s(["=","=","29"]),s([">",">","30"]),s(["?","?","31"]),s(["@","@","32"]),s(["A","A","33"]),s(["B","B","34"]),s(["C","C","35"]),s(["D","D","36"]),s(["E","E","37"]),s(["F","F","38"]),s(["G","G","39"]),s(["H","H","40"]),s(["I","I","41"]),s(["J","J","42"]),s(["K","K","43"]),s(["L","L","44"]),s(["M","M","45"]),s(["N","N","46"]),s(["O","O","47"]),s(["P","P","48"]),s(["Q","Q","49"]),s(["R","R","50"]),s(["S","S","51"]),s(["T","T","52"]),s(["U","U","53"]),s(["V","V","54"]),s(["W","W","55"]),s(["X","X","56"]),s(["Y","Y","57"]),s(["Z","Z","58"]),s(["[","[","59"]),s([92,92,"60"]),s(["]","]","61"]),s(["^","^","62"]),s(["_","_","63"]),s([0,"`","64"]),s([1,"a","65"]),s([2,"b","66"]),s([3,"c","67"]),s([4,"d","68"]),s([5,"e","69"]),s([6,"f","70"]),s([7,"g","71"]),s([8,"h","72"]),s([9,"i","73"]),s([10,"j","74"]),s([11,"k","75"]),s([12,"l","76"]),s([13,"m","77"]),s([14,"n","78"]),s([15,"o","79"]),s([16,"p","80"]),s([17,"q","81"]),s([18,"r","82"]),s([19,"s","83"]),s([20,"t","84"]),s([21,"u","85"]),s([22,"v","86"]),s([23,"w","87"]),s([24,"x","88"]),s([25,"y","89"]),s([26,"z","90"]),s([27,"{","91"]),s([28,"|","92"]),s([29,"}","93"]),s([30,"~","94"]),s([31,127,"95"]),s([t.sfb,t.crl,"96"]),s([t.sb2,9,"97"]),s([t.sb3,28,"98"]),s([t.sb4,29,"99"]),s([t.sb5,30,t.aim]),s([t.sb6,t.sfa,t.laa]),s([t.lab,t.laa,t.sfb]),s([t.sc2,t.sc2,t.sb2]),s([t.sc3,t.sc3,t.sb3]),s([t.sc4,t.sc4,t.sb4]),s([t.lac,t.lac,t.lab]),s([t.fn1,t.fn1,t.fn1]),s([t.fn2,t.fn2,t.fn2]),s([t.fn3,t.fn3,t.fn3]),s([t.bsa,t.bsa,t.bsa]),s([t.bsb,t.bsb,t.bsb]),s([t.bin,t.bin,t.bin])]),t.charvals=s([new Map,new Map,new Map]);for(var n=0,r=t.charmaps.length-1;n<=r;n+=1){t.i=n,t.encs=A(t.charmaps,t.i);for(var a=0;a<=2;a+=1){t.j=a;var c=A(t.encs,t.j);if(o[i++]=c,T(w(c),"stringtype")){var l=A(o[--i],0);o[i++]=l}v(A(t.charvals,t.j),o[--i],t.i)}}t.Avals=A(t.charvals,0),t.Bvals=A(t.charvals,1),v(t.Bvals,t.m05,97),v(t.Bvals,t.m06,98),v(t.Bvals,t.m12,99),v(t.Bvals,t.mac,100),t.Cvals=A(t.charvals,2),o[i++]=1/0;var h=s([t.sc2,t.sc3,t.sc4,t.sc5,t.sc6,t.sc7,t.tma,t.tmb,t.tmc,t.tms]);o[i++]=102;for(var f=0,d=h.length;f<d;f++){var p=L(o[--i]+1);o[i++]=A(h,f),o[i++]=p,o[i++]=p}for(var m in i--,t.BINvals=u(),t.A=0,t.B=1,t.C=2,t.BIN=3,t)t.hasOwnProperty(m)&&(gt.$ctx[m]=t[m]);gt.$ctx._24174=1}(),o[i++]=1/0;for(var B=0,I=e.msglen+1;B<I;B++)o[i++]=0;e.nDigits=s(),o[i++]=1/0;for(var j=0,N=e.msglen+1;j<N;j++)o[i++]=!1;e.SeventeenTen=s(),o[i++]=1/0;for(var F=0,R=e.msglen+1;F<R;F++)o[i++]=!1;e.ECI=s(),o[i++]=1/0;for(var P=0,$=e.msglen+1;P<$;P++)o[i++]=!1;e.DatumA=s(),o[i++]=1/0;for(var V=0,q=e.msglen+1;V<q;V++)o[i++]=!1;e.DatumB=s(),o[i++]=1/0;for(var G=0,W=e.msglen+1;G<W;G++)o[i++]=!1;e.DatumC=s(),o[i++]=1/0;for(var K=0,Y=e.msglen+8;K<Y;K++)o[i++]=!1;e.Binary=s(),o[i++]=1/0;for(var X=0,J=e.msglen+1;X<J;X++)o[i++]=0;e.AheadC=s(),o[i++]=1/0;for(var Z=0,ee=e.msglen+1;Z<ee;Z++)o[i++]=0;e.TryC=s(),o[i++]=1/0;for(var te=0,ne=e.msglen+1;te<ne;te++)o[i++]=0;e.AheadA=s(),o[i++]=1/0;for(var re=0,ie=e.msglen+1;re<ie;re++)o[i++]=0;e.AheadB=s(),o[i++]=1/0;for(var oe=0,ae=e.msglen+1;oe<ae;oe++)o[i++]=0;e.UntilEndSeg=s();for(var se=e.msglen-1;se>=0;se-=1){if(e.i=se,e.barchar=A(e.msg,e.i),e.barchar>=48&&e.barchar<=57&&v(e.nDigits,e.i,L(A(e.nDigits,e.i+1)+1)),void 0!==A(e.Avals,e.barchar)&&v(e.DatumA,e.i,!0),void 0!==A(e.Bvals,e.barchar)&&v(e.DatumB,e.i,!0),e.CRLF=!1,13==e.barchar&&e.i<e.msglen-1&&10==A(e.msg,e.i+1)&&(e.CRLF=!0),e.CRLF&&v(e.DatumB,e.i,!0),A(e.nDigits,e.i)>=2&&v(e.DatumC,e.i,!0),e.barchar<0&&v(e.DatumC,e.i,!0),e.barchar>=128&&v(e.Binary,e.i,!0),A(e.nDigits,e.i)>=10){o[i++]=1/0,_(b(e.msg,e.i,10));for(var ue=0;ue<1;ue++){if(48!=o[--i]){o[i++]=!1;break}if(49!=o[--i]){o[i++]=!1;break}if(i-=6,55!=o[--i]){o[i++]=!1;break}if(49!=o[--i]){o[i++]=!1;break}o[i++]=!0}v(e.SeventeenTen,e.i,o[--i]),E()}if(A(e.nDigits,e.i+1)>=6&&A(e.msg,e.i)==e.fn2&&v(e.ECI,e.i,!0),e.barchar<0&&e.barchar!=e.fn3?v(e.AheadC,e.i,L(A(e.AheadC,e.i+1)+1)):A(e.nDigits,e.i)<=1?v(e.AheadC,e.i,0):v(e.AheadC,e.i,L(A(e.AheadC,e.i+2)+1)),A(e.nDigits,e.i)>0&&M(A(e.AheadC,e.i),A(e.AheadC,e.i+1))&&v(e.TryC,e.i,A(e.AheadC,e.i)),A(e.DatumA,e.i)&&A(e.TryC,e.i)<2&&e.barchar!=e.fn3&&v(e.AheadA,e.i,L(A(e.AheadA,e.i+1)+1)),A(e.DatumB,e.i)&&A(e.TryC,e.i)<2&&e.barchar!=e.fn3){if(o[i++]=e.AheadB,o[i++]=e.i,o[i++]=e.AheadB,o[i++]=e.i+1,e.CRLF){var ce=o[--i];o[i++]=L(ce+1)}var le=o[--i],he=A(o[--i],le),fe=o[--i];v(o[--i],fe,L(he+1))}e.barchar!=e.fn3&&v(e.UntilEndSeg,e.i,L(A(e.UntilEndSeg,e.i+1)+1))}for(e.addtocws=function(){var t=o[--i];y(e.cws,e.j,t),e.j=t.length+e.j},e.base259to103=function(){e.in=o[--i],e.inlen=e.in.length,o[i++]=1/0;for(var t=0,n=5-e.inlen;t<n;t++)o[i++]=0;_(e.in),e.in=s(),e.out=s(6),o[i++]=1/0,_(b(e.in,0,2)),e.msbs=s(),o[i++]=1/0,_(e.msbs);var r=o[--i],a=o[--i];o[i++]=L(r+259*a);for(var u=0;u<2;u++){var c=o[--i];o[i++]=c%103,o[i++]=~~(c/103)}e.mscs=s(),o[i++]=1/0,_(b(e.in,2,3)),e.lsbs=s(),o[i++]=1/0,_(e.lsbs);var l=o[--i],h=o[--i],f=o[--i];o[i++]=L(L(l+259*h)+67081*f);for(var d=0;d<3;d++){var p=o[--i];o[i++]=p%103,o[i++]=~~(p/103)}e.lscs=s();var m=A(e.lscs,0),g=A(e.mscs,0);v(e.out,5,L(m+42*g)%103);var y=A(e.lscs,1),w=A(e.mscs,0),x=A(e.mscs,1);v(e.out,4,L(L(L(~~(L(m+42*g)/103)+y)+68*w)+42*x)%103);var C=A(e.lscs,2),k=A(e.mscs,0),E=A(e.mscs,1),S=A(e.mscs,2);v(e.out,3,L(L(L(L(~~(L(L(L(~~(L(m+42*g)/103)+y)+68*w)+42*x)/103)+C)+92*k)+68*E)+42*S)%103);var O=A(e.lscs,3),T=A(e.mscs,0),D=A(e.mscs,1),B=A(e.mscs,2);v(e.out,2,L(L(L(L(~~(L(L(L(L(~~(L(L(L(~~(L(m+42*g)/103)+y)+68*w)+42*x)/103)+C)+92*k)+68*E)+42*S)/103)+O)+15*T)+92*D)+68*B)%103);var I=A(e.mscs,1),M=A(e.mscs,2);v(e.out,1,L(L(~~(L(L(L(L(~~(L(L(L(L(~~(L(L(L(~~(L(m+42*g)/103)+y)+68*w)+42*x)/103)+C)+92*k)+68*E)+42*S)/103)+O)+15*T)+92*D)+68*B)/103)+15*I)+92*M)%103),v(e.out,0,L(~~(L(L(~~(L(L(L(L(~~(L(L(L(L(~~(L(L(L(~~(L(m+42*g)/103)+y)+68*w)+42*x)/103)+C)+92*k)+68*E)+42*S)/103)+O)+15*T)+92*D)+68*B)/103)+15*I)+92*M)/103)+15*A(e.mscs,2))%103),o[i++]=b(e.out,6-e.inlen-1,e.inlen+1)},e.finaliseBIN=function(){0!=e.bpos&&(o[i++]=b(e.bvals,0,e.bpos),e.base259to103(),_(o[--i]),e.bpos=0)},e.addtobin=function(){v(e.bvals,e.bpos,o[--i]),e.bpos=e.bpos+1,5==e.bpos&&e.finaliseBIN()},e.ECIabc=function(){var t=b(e.msg,e.i+1,6);o[i++]=0;for(var n=0,r=t.length;n<r;n++){var a=o[--i];o[i++]=10*L(a+L(A(t,n)-48))}var s=~~(o[--i]/10);if(o[i++]=s,s>=40){var u=L(o[--i]-40),c=u%12769;o[i++]=40+~~(u/12769),o[i++]=~~(c/113),o[i++]=c%113}},e.ECIbin=function(){o[i++]=1/0;var t=b(e.msg,e.i+1,6);o[i++]=0;for(var n=0,r=t.length;n<r;n++){var a=o[--i];o[i++]=10*L(a+L(A(t,n)-48))}var u=~~(o[--i]/10);if(o[i++]=u,u>=65536){var c=o[--i],l=c%65536;o[i++]=258,o[i++]=~~(c/65536),o[i++]=~~(l/256),o[i++]=l%256}else{var h=o[--i];if(o[i++]=h,h>=256){var f=o[--i];o[i++]=257,o[i++]=~~(f/256),o[i++]=f%256}else{var d=o[--i];o[i++]=256,o[i++]=d}}for(var p=s(),m=0,g=p.length;m<g;m++)o[i++]=A(p,m),e.addtobin()},e.encC=function(){for(var t=0;t<1;t++){if(e.i==e.segstart){for(var n=0;n<1;n++){if(e.i>L(e.segend-7)){o[i++]=0;break}if(91!=A(e.msg,e.segstart)){o[i++]=0;break}if(41!=A(e.msg,e.segstart+1)){o[i++]=0;break}if(62!=A(e.msg,e.segstart+2)){o[i++]=0;break}if(30!=A(e.msg,e.segstart+3)){o[i++]=0;break}var r=A(e.msg,e.segstart+4);if(r<48||r>57){o[i++]=0;break}var a=A(e.msg,e.segstart+5);if(a<48||a>57){o[i++]=0;break}if(4!=A(e.msg,L(e.segend-1))){o[i++]=0;break}var u=L(10*L(A(e.msg,e.segstart+4)-48)+L(A(e.msg,e.segstart+5)-48));if(o[i++]=u,5!=u&&6!=u&&12!=u){i--,o[i++]=e.mac;break}if(29!=A(e.msg,e.segstart+6)){i--,o[i++]=0;break}if(30!=A(e.msg,L(e.segend-2))){i--,o[i++]=0;break}var c=o[--i];if(o[i++]=c,5==c){i--,o[i++]=e.m05;break}if(6==o[--i]){o[i++]=e.m06;break}o[i++]=e.m12;break}if(e.inmac=o[--i],0!=e.inmac){o[i++]=s([A(e.Cvals,e.lab)]),e.addtocws(),e.mode=e.B,o[i++]=s([A(e.Bvals,e.inmac)]),e.addtocws(),e.inmac==e.mac?(o[i++]=s([A(e.Bvals,A(e.msg,e.segstart+4))]),e.addtocws(),o[i++]=s([A(e.Bvals,A(e.msg,e.segstart+5))]),e.addtocws(),e.i=e.i+6):e.i=e.i+7;break}}if(e.i==e.segstart&&(A(e.nDigits,e.i)>=2&&(o[i++]=s([A(e.Cvals,e.fn1)]),e.addtocws()),A(e.msg,e.i)==e.fn1&&A(e.nDigits,e.i+1)>=2&&(e.i=e.i+1)),A(e.SeventeenTen,e.i)){o[i++]=s([A(e.Cvals,e.aim),L(10*L(A(e.msg,e.i+2)-48)+L(A(e.msg,e.i+3)-48)),L(10*L(A(e.msg,e.i+4)-48)+L(A(e.msg,e.i+5)-48)),L(10*L(A(e.msg,e.i+6)-48)+L(A(e.msg,e.i+7)-48))]),e.addtocws(),e.i=e.i+10;break}if(A(e.DatumC,e.i)){var l=A(e.msg,e.i);if(l==e.fn1||l==e.fn2||l==e.fn3){if(o[i++]=s([A(e.Cvals,A(e.msg,e.i))]),e.addtocws(),A(e.ECI,e.i)){o[i++]=1/0,e.ECIabc();var h=s();o[i++]=h,e.addtocws(),e.i=e.i+7;break}if(A(e.msg,e.i)==e.fn3&&e.segstart!=e.i){e.i=e.i+1,e.inmac=0,e.segstart=e.i,e.segend=L(e.i+A(e.UntilEndSeg,e.i));break}e.i=e.i+1;break}o[i++]=s([L(10*L(A(e.msg,e.i)-48)+L(A(e.msg,e.i+1)-48))]),e.addtocws(),e.i=e.i+2;break}if(A(e.Binary,e.i)){if(A(e.nDigits,e.i+1)>0){A(e.msg,e.i)<160?(o[i++]=s([A(e.Cvals,e.bsa),A(e.Avals,L(A(e.msg,e.i)-128))]),e.addtocws()):(o[i++]=s([A(e.Cvals,e.bsb),A(e.Bvals,L(A(e.msg,e.i)-128))]),e.addtocws()),e.i=e.i+1;break}o[i++]=s([A(e.Cvals,e.bin)]),e.addtocws(),e.mode=e.BIN;break}if(e.m=A(e.AheadA,e.i),e.n=A(e.AheadB,e.i),M(e.m,e.n)){o[i++]=s([A(e.Cvals,e.laa)]),e.addtocws(),e.mode=e.A;break}if(e.i==e.segstart){var f=A(e.msg,e.i);if(9==f||28==f||29==f||30==f){o[i++]=s([A(e.Cvals,e.laa)]),e.addtocws(),e.mode=e.A;break}}if(e.n>4){o[i++]=s([A(e.Cvals,e.lab)]),e.addtocws(),e.mode=e.B;break}o[i++]=s([A(e.Cvals,A(s([e.sfb,e.sb2,e.sb3,e.sb4]),L(e.n-1)))]),e.addtocws();for(var d=0,p=e.n;d<p;d++)13==A(e.msg,e.i)?(o[i++]=s([A(e.Bvals,e.crl)]),e.addtocws(),e.i=e.i+2):(o[i++]=s([A(e.Bvals,A(e.msg,e.i))]),e.addtocws(),e.i=e.i+1);break}},e.encB=function(){for(var t=0;t<1;t++){if(e.n=A(e.TryC,e.i),e.n>=2){if(e.n>4){o[i++]=s([A(e.Bvals,e.lac)]),e.addtocws(),e.mode=e.C;break}o[i++]=s([A(e.Bvals,A(s([e.sfc,e.sc2,e.sc3,e.sc4]),L(e.n-1)))]),e.addtocws();for(var n=0,r=e.n;n<r;n++)A(e.msg,e.i)<0?(o[i++]=s([A(e.Cvals,A(e.msg,e.i))]),e.addtocws(),e.i=e.i+1):(o[i++]=s([L(10*L(A(e.msg,e.i)-48)+L(A(e.msg,e.i+1)-48))]),e.addtocws(),e.i=e.i+2);break}if(A(e.DatumB,e.i)){var a=A(e.msg,e.i);if(a==e.fn1||a==e.fn2||a==e.fn3){if(o[i++]=s([A(e.Bvals,A(e.msg,e.i))]),e.addtocws(),A(e.ECI,e.i)){o[i++]=1/0,e.ECIabc();var u=s();o[i++]=u,e.addtocws(),e.i=e.i+7;break}if(A(e.msg,e.i)==e.fn3&&e.i!=e.segstart){e.i=e.i+1,e.mode=e.C,e.inmac=0,e.segstart=e.i,e.segend=L(e.i+A(e.UntilEndSeg,e.i));break}e.i=e.i+1;break}if(13==A(e.msg,e.i)&&e.i<e.msglen-1&&10==A(e.msg,e.i+1)){o[i++]=s([A(e.Bvals,e.crl)]),e.addtocws(),e.i=e.i+2;break}o[i++]=s([A(e.Bvals,A(e.msg,e.i))]),e.addtocws(),e.i=e.i+1;break}if(A(e.Binary,e.i)){if(A(e.DatumB,e.i+1)){A(e.msg,e.i)<160?(o[i++]=s([A(e.Bvals,e.bsa),A(e.Avals,L(A(e.msg,e.i)-128))]),e.addtocws()):(o[i++]=s([A(e.Bvals,e.bsb),A(e.Bvals,L(A(e.msg,e.i)-128))]),e.addtocws()),e.i=e.i+1;break}o[i++]=s([A(e.Bvals,e.bin)]),e.addtocws(),e.mode=e.BIN;break}if(1==A(e.AheadA,e.i)){o[i++]=s([A(e.Bvals,e.sfa),A(e.Avals,A(e.msg,e.i))]),e.addtocws(),e.i=e.i+1;break}o[i++]=s([A(e.Bvals,e.laa)]),e.addtocws(),e.mode=e.A;break}},e.encA=function(){for(var t=0;t<1;t++){if(e.n=A(e.TryC,e.i),e.n>=2){if(e.n>4){o[i++]=s([A(e.Avals,e.lac)]),e.addtocws(),e.mode=e.C;break}o[i++]=s([A(e.Avals,A(s([e.sfc,e.sc2,e.sc3,e.sc4]),L(e.n-1)))]),e.addtocws();for(var n=0,r=e.n;n<r;n++)A(e.msg,e.i)<0?(o[i++]=s([A(e.Cvals,A(e.msg,e.i))]),e.addtocws(),e.i=e.i+1):(o[i++]=s([L(10*L(A(e.msg,e.i)-48)+L(A(e.msg,e.i+1)-48))]),e.addtocws(),e.i=e.i+2);break}if(A(e.DatumA,e.i)){var a=A(e.msg,e.i);if(a==e.fn1||a==e.fn2||a==e.fn3){if(o[i++]=s([A(e.Avals,A(e.msg,e.i))]),e.addtocws(),A(e.ECI,e.i)){o[i++]=1/0,e.ECIabc();var u=s();o[i++]=u,e.addtocws(),e.i=e.i+7;break}if(A(e.msg,e.i)==e.fn3&&e.i!=e.segstart){e.i=e.i+1,e.mode=e.C,e.inmac=0,e.segstart=e.i,e.segend=L(e.i+A(e.UntilEndSeg,e.i));break}e.i=e.i+1;break}o[i++]=s([A(e.Avals,A(e.msg,e.i))]),e.addtocws(),e.i=e.i+1;break}if(A(e.Binary,e.i)){if(A(e.DatumA,e.i+1)){A(e.msg,e.i)<160?(o[i++]=s([A(e.Avals,e.bsa),A(e.Avals,L(A(e.msg,e.i)-128))]),e.addtocws()):(o[i++]=s([A(e.Avals,e.bsb),A(e.Bvals,L(A(e.msg,e.i)-128))]),e.addtocws()),e.i=e.i+1;break}o[i++]=s([A(e.Avals,e.bin)]),e.addtocws(),e.mode=e.BIN;break}if(e.n=A(e.AheadB,e.i),e.n>6){o[i++]=s([A(e.Avals,e.lab)]),e.addtocws(),e.mode=e.B;break}o[i++]=s([A(e.Avals,A(s([e.sfb,e.sb2,e.sb3,e.sb4,e.sb5,e.sb6]),L(e.n-1)))]),e.addtocws();for(var c=0,l=e.n;c<l;c++)13==A(e.msg,e.i)?(o[i++]=s([A(e.Bvals,e.crl)]),e.addtocws(),e.i=e.i+2):(o[i++]=s([A(e.Bvals,A(e.msg,e.i))]),e.addtocws(),e.i=e.i+1);break}},e.encBIN=function(){for(var t=0;t<1;t++){if(e.n=A(e.TryC,e.i),e.n>=2){o[i++]=1/0,e.finaliseBIN();var n=s();if(o[i++]=n,e.addtocws(),e.n>7){o[i++]=s([A(e.BINvals,e.tmc)]),e.addtocws(),e.mode=e.C;break}o[i++]=s([A(e.BINvals,A(s([e.sc2,e.sc3,e.sc4,e.sc5,e.sc6,e.sc7]),L(e.n-2)))]),e.addtocws();for(var r=0,a=e.n;r<a;r++)A(e.msg,e.i)<0?(o[i++]=s([A(e.Cvals,A(e.msg,e.i))]),e.addtocws(),e.i=e.i+1):(o[i++]=s([L(10*L(A(e.msg,e.i)-48)+L(A(e.msg,e.i+1)-48))]),e.addtocws(),e.i=e.i+2);break}if(A(e.ECI,e.i)&&A(e.Binary,e.i+7)){o[i++]=1/0,e.ECIbin();var u=s();if(o[i++]=u,e.addtocws(),e.i=e.i+7,e.i==e.msglen){o[i++]=1/0,e.finaliseBIN();var c=s();o[i++]=c,e.addtocws()}break}if(A(e.msg,e.i)>=0&&(A(e.Binary,e.i)||A(e.Binary,e.i+1)||A(e.Binary,e.i+2)||A(e.Binary,e.i+3)||A(e.ECI,e.i+1)&&A(e.Binary,e.i+8))){o[i++]=1/0,o[i++]=A(e.msg,e.i),e.addtobin();var l=s();if(o[i++]=l,e.addtocws(),e.i=e.i+1,e.i==e.msglen){o[i++]=1/0,e.finaliseBIN();var h=s();o[i++]=h,e.addtocws()}break}o[i++]=1/0,e.finaliseBIN();var f=s();if(o[i++]=f,e.addtocws(),e.i!=e.msglen-1){if(A(e.msg,e.i)==e.fn3&&e.i!=e.segstart){o[i++]=s([A(e.BINvals,e.tms)]),e.addtocws(),e.i=e.i+1,e.mode=e.C,e.inmac=0,e.segstart=e.i,e.segend=L(e.i+A(e.UntilEndSeg,e.i));break}M(A(e.AheadA,e.i),A(e.AheadB,e.i))?(o[i++]=s([A(e.BINvals,e.tma)]),e.addtocws(),e.mode=e.A):(o[i++]=s([A(e.BINvals,e.tmb)]),e.addtocws(),e.mode=e.B);break}break}},e.cws=s(2*e.msglen+1),e.mode=e.C,e.bvals=s(5),e.bpos=0,e.inmac=0,e.segstart=0,e.segend=A(e.UntilEndSeg,0),e.i=0,e.j=0;!(e.i>=e.msglen);){if(0!=e.inmac){if(e.inmac!=e.mac&&e.i==L(e.segend-2)&&(e.i=e.i+2,e.i>=e.msglen))break;if(e.inmac==e.mac&&e.i==L(e.segend-1)&&(e.i=e.i+1,e.i>=e.msglen))break}if(!0===e[A(s(["encA","encB","encC","encBIN"]),e.mode)]())break}if(e.cws=b(e.cws,0,e.j),e.nd=e.cws.length,e.minarea=2*(9*(e.nd+3+~~(e.nd/2))+2),-1!=e.ratio)e.hgt=Math.sqrt(e.minarea/e.ratio),e.wid=Math.sqrt(e.minarea*e.ratio),e.h=~~e.hgt,e.w=~~e.wid,(e.h+e.w)%2==1?e.h*e.w<e.minarea&&(e.h=e.h+1,e.w=e.w+1):e.hgt*e.w<e.wid*e.h?(e.w=e.w+1,e.h*e.w<e.minarea&&(e.w=e.w-1,e.h=e.h+1,e.h*e.w<e.minarea&&(e.w=e.w+2))):(e.h=e.h+1,e.h*e.w<e.minarea&&(e.h=e.h-1,e.w=e.w+1,e.h*e.w<e.minarea&&(e.h=e.h+2))),e.rows=e.h,e.columns=e.w;else{if(-1==e.columns){var de=~~((e.minarea+e.rows-1)/e.rows);if(o[i++]="columns",o[i++]=de,(de+e.rows)%2==0){var pe=o[--i];o[i++]=L(pe+1)}var me=o[--i];e[o[--i]]=me}if(-1==e.rows){var ge=~~((e.minarea+e.columns-1)/e.columns);if(o[i++]="rows",o[i++]=ge,(ge+e.columns)%2==0){var Ae=o[--i];o[i++]=L(Ae+1)}var ve=o[--i];e[o[--i]]=ve}}for(e.ndots=~~(e.rows*e.columns/2);;){var be=e.nd+1;if(9*(be+(3+~~(be/2)))+2>e.ndots)break;e.nd=e.nd+1}if(e.nc=3+~~(e.nd/2),e.nw=e.nd+e.nc,e.rembits=e.ndots-(9*e.nw+2),e.nd>e.cws.length){o[i++]=1/0,_(e.cws);var ye=e.mode==e.BIN?109:106;o[i++]=ye;for(var we=0,xe=e.nd-e.cws.length-1;we<xe;we++)o[i++]=106;e.cws=s()}void 0!==A(e.options,"debugcws")&&(o[i++]="bwipp.debugcws#24731",o[i++]=e.cws,z()),gt.$ctx._24760||function(){var t=Object.create(e);for(var n in t.encs=s(["101010101","010101011","010101101","010110101","011010101","101010110","101011010","101101010","110101010","010101110","010110110","010111010","011010110","011011010","011101010","100101011","100101101","100110101","101001011","101001101","101010011","101011001","101100101","101101001","110010101","110100101","110101001","001010111","001011011","001011101","001101011","001101101","001110101","010010111","010011011","010011101","010100111","010110011","010111001","011001011","011001101","011010011","011011001","011100101","011101001","100101110","100110110","100111010","101001110","101011100","101100110","101101100","101110010","101110100","110010110","110011010","110100110","110101100","110110010","110110100","111001010","111010010","111010100","001011110","001101110","001110110","001111010","010011110","010111100","011001110","011011100","011100110","011101100","011110010","011110100","100010111","100011011","100011101","100100111","100110011","100111001","101000111","101100011","101110001","110001011","110001101","110010011","110011001","110100011","110110001","111000101","111001001","111010001","000101111","000110111","000111011","000111101","001001111","001100111","001110011","001111001","010001111","011000111","011100011","011110001","100011110","100111100","101111000","110001110","110011100","110111000","111000110","111001100"]),t)t.hasOwnProperty(n)&&(gt.$ctx[n]=t[n]);gt.$ctx._24760=1}(),e.rows%2==0?e.sixedges=s([s([e.columns-1,e.rows-2]),s([0,e.rows-2]),s([e.columns-2,e.rows-1]),s([1,e.rows-1]),s([e.columns-1,0]),s([0,0])]):e.sixedges=s([s([e.columns-2,0]),s([e.columns-2,e.rows-1]),s([e.columns-1,1]),s([e.columns-1,e.rows-2]),s([0,0]),s([0,e.rows-1])]),e.dmv=function(){var t=o[--i],n=o[--i];o[i++]=L(n+t*e.columns)},e.outline=s(e.rows*e.columns);for(var Ce=0,ke=e.rows-1;Ce<=ke;Ce+=1){e.y=Ce;for(var Ee=0,Se=e.columns-1;Ee<=Se;Ee+=1){e.x=Ee,o[i++]=e.outline,o[i++]=e.x,o[i++]=e.y,e.dmv();var _e=o[--i];v(o[--i],_e,(e.x+e.y)%2-1)}}for(var Oe=e.sixedges,Te=0,De=Oe.length;Te<De;Te++){o[i++]=e.outline,_(A(Oe,Te)),e.dmv();var Be=o[--i];v(o[--i],Be,1)}e.clearcol=function(){e.x=o[--i],o[i++]=!0;for(var t=1&e.x,n=e.rows-1;t<=n;t+=2)if(o[i++]=e.x,o[i++]=t,e.dmv(),1==A(e.sym,o[--i])){i--,o[i++]=!1;break}},e.clearrow=function(){e.y=o[--i],o[i++]=!0;for(var t=1&e.y,n=e.columns-1;t<=n;t+=2)if(o[i++]=t,o[i++]=e.y,e.dmv(),1==A(e.sym,o[--i])){i--,o[i++]=!1;break}},e.evalsymbol=function(){e.sym=o[--i],e.worst=9999999;for(var t=s([s(["x",0]),s(["x",1]),s(["y",0]),s(["y",1])]),n=0,r=t.length;n<r;n++){_(A(t,n)),e.fl=o[--i],e.dir=o[--i],e.sum=0,e.first=-1,e.last=-1;for(var a=0,u=(T(e.dir,"x")?e.columns:e.rows)-1;a<=u;a+=1){e[e.dir]=a;var c=e.sym,l=e[e.dir],h=((T(e.dir,"x")?e.rows:e.columns)-1)*e.fl;if(T(e.dir,"y")){var f=h;h=l,l=f}o[i++]=c,o[i++]=l,o[i++]=h,e.dmv();var d=o[--i];1==A(o[--i],d)&&(-1==e.first&&(e.first=e[e.dir]),e.last=e[e.dir],e.sum=e.sum+1)}var p=T(e.dir,"x")?e.rows:e.columns,m=L(L(e.sum+e.last)-e.first)*p;o[i++]=m,m<e.worst?e.worst=o[--i]:i--}if(e.pen=0,e.rows%2==1||e.rows<=12){e.sum=0,e.p=0;for(var g=1,v=e.columns-2;g<=v;g+=1)if(o[i++]=g,e.clearcol(),o[--i]){e.sum=e.sum+1,o[i++]="p",1==e.sum?o[i++]=e.rows:o[i++]=e.p*e.rows;var y=o[--i];e[o[--i]]=y}else e.sum=0,e.pen=e.pen+e.p,e.p=0;e.pen=e.pen+e.p}if(e.rows%2==0||e.columns<=12){e.sum=0,e.p=0;for(var w=1,x=e.rows-2;w<=x;w+=1)if(o[i++]=w,e.clearrow(),o[--i]){e.sum=e.sum+1,o[i++]="p",1==e.sum?o[i++]=e.columns:o[i++]=e.p*e.columns;var C=o[--i];e[o[--i]]=C}else e.sum=0,e.pen=e.pen+e.p,e.p=0;e.pen=e.pen+e.p}o[i++]=1/0;for(var k=0,E=2*(e.columns+4);k<E;k++)o[i++]=0;for(var S=0,O=e.columns,D=e.sym.length-1;O<0?S>=D:S<=D;S+=O)o[i++]=0,o[i++]=0,_(b(e.sym,S,e.columns)),o[i++]=0,o[i++]=0;for(var B=0,I=2*(e.columns+4);B<I;B++)o[i++]=0;e.symp=s(),e.columns=e.columns+4,e.rows=e.rows+4,e.sum=0;for(var M=2,j=e.rows-3;M<=j;M+=1){e.y=M;for(var N=2+(1&e.y),F=e.columns-3;N<=F;N+=2){e.x=N;for(var R=0;R<1;R++){o[i++]=e.symp,o[i++]=e.x-1,o[i++]=e.y-1,e.dmv();var P=o[--i];if(1==A(o[--i],P))break;o[i++]=e.symp,o[i++]=e.x+1,o[i++]=e.y-1,e.dmv();var U=o[--i];if(1==A(o[--i],U))break;o[i++]=e.symp,o[i++]=e.x-1,o[i++]=e.y+1,e.dmv();var z=o[--i];if(1==A(o[--i],z))break;o[i++]=e.symp,o[i++]=e.x+1,o[i++]=e.y+1,e.dmv();var H=o[--i];if(1==A(o[--i],H))break;o[i++]=e.symp,o[i++]=e.x,o[i++]=e.y,e.dmv();var $=o[--i];if(0==A(o[--i],$)){e.sum=e.sum+1;break}o[i++]=e.symp,o[i++]=e.x-2,o[i++]=e.y,e.dmv();var Q=o[--i];if(1==A(o[--i],Q))break;o[i++]=e.symp,o[i++]=e.x,o[i++]=e.y-2,e.dmv();var V=o[--i];if(1==A(o[--i],V))break;o[i++]=e.symp,o[i++]=e.x+2,o[i++]=e.y,e.dmv();var q=o[--i];if(1==A(o[--i],q))break;o[i++]=e.symp,o[i++]=e.x,o[i++]=e.y+2,e.dmv();var G=o[--i];if(1==A(o[--i],G))break;e.sum=e.sum+1}}}e.columns=e.columns-4,e.rows=e.rows-4,0==e.worst?o[i++]=-99999:o[i++]=L(L(e.worst-e.sum*e.sum)-e.pen)},o[i++]=1/0,o[i++]=1;for(var Ie=0;Ie<112;Ie++){var Me=o[--i];o[i++]=Me,o[i++]=3*Me%113}e.rsalog=s(),e.step=1+~~(e.nw/112),e.offset=function(){var t=o[--i];o[i++]=L(t*e.step+e.start)},e.bestscore=-99999999,o[i++]="masks",-1!=e.mask?o[i++]=s([e.mask]):e.fast?o[i++]=s([3,2,1,0]):o[i++]=s([0,1,2,3]);var je=o[--i];e[o[--i]]=je,e.litmasks=s(4),k(e.masks,(function(){e.mask=o[--i],o[i++]=1/0;var t=e.cws;o[i++]=e.mask,o[i++]=A(s([0,3,7,17]),e.mask),o[i++]=0;for(var n=0,r=t.length;n<r;n++){var a=o[--i],u=o[--i];o[i++]=L(A(t,n)+a)%113,o[i++]=u,o[i++]=L(a+u)}i-=2;for(var l=0,h=e.nc;l<h;l++)o[i++]=0;e.rscws=s();for(var f=0,p=e.step-1;f<=p;f+=1){e.start=f,e.ND=~~((e.nd+1-e.start+e.step-1)/e.step),e.NW=~~((e.nw+1-e.start+e.step-1)/e.step),e.NC=e.NW-e.ND,o[i++]=1/0,o[i++]=1;for(var m=0,g=e.NC;m<g;m++)o[i++]=0;e.coeffs=s();for(var w=1,x=e.NC;w<=x;w+=1){e.i=w;for(var C=e.NC;C>=1;C-=1)e.j=C,v(e.coeffs,e.j,L(L(A(e.coeffs,e.j)+113)-A(e.rsalog,e.i)*A(e.coeffs,e.j-1)%113)%113)}for(var k=0,E=e.ND-1;k<=E;k+=1){o[i++]="t",o[i++]=e.rscws,o[i++]=k,e.offset();var S=o[--i],O=A(o[--i],S);o[i++]=O,o[i++]=e.rscws,o[i++]=e.ND,e.offset();var T=o[--i],D=A(o[--i],T),B=o[--i];e[o[--i]]=L(B+D)%113;for(var I=0,j=e.NC-2;I<=j;I+=1){e.j=I,o[i++]=e.rscws,o[i++]=e.ND+e.j,e.offset(),o[i++]=e.rscws,o[i++]=e.ND+e.j+1,e.offset();var N=o[--i],F=A(o[--i],N),R=o[--i];v(o[--i],R,L(L(F+113)-e.t*A(e.coeffs,e.j+1)%113)%113)}o[i++]=e.rscws,o[i++]=e.ND+e.NC-1,e.offset();var P=o[--i];v(o[--i],P,L(113-e.t*A(e.coeffs,e.NC)%113)%113)}for(var U=e.ND,z=e.NW-1;U<=z;U+=1){o[i++]=U,o[i++]=e.rscws,o[i++]=U,e.offset();var H=o[--i],$=o[--i],Q=o[--i];o[i++]=$,o[i++]=H,o[i++]=113,o[i++]=e.rscws,o[i++]=Q,e.offset();var V=o[--i],q=A(o[--i],V),G=o[--i],W=o[--i];v(o[--i],W,L(G-q)%113)}}e.bits=c(e.ndots),y(e.bits,0,A(s(["00","01","10","11"]),e.mask));for(var K=1,Y=e.nw;K<=Y;K+=1)e.i=K,y(e.bits,9*(e.i-1)+2,A(e.encs,A(e.rscws,e.i)));e.rembits>0&&y(e.bits,9*e.nw+2,b("11111111111111111",0,e.rembits));var X=e.outline;e.pixs=d(s(X.length),X),e.posx=0,o[i++]="posy",e.rows%2==0?o[i++]=0:o[i++]=e.rows-1;var J=o[--i];e[o[--i]]=J;for(var Z=b(e.bits,0,e.bits.length-6),ee=0,te=Z.length;ee<te;ee++){for(o[i++]=A(Z,ee);;){o[i++]=e.pixs,o[i++]=e.posx,o[i++]=e.posy,e.dmv();var ne=o[--i];if(-1==A(o[--i],ne))break;e.rows%2==0?(e.posy=e.posy+1,e.posy==e.rows&&(e.posy=0,e.posx=e.posx+1)):(e.posx=e.posx+1,e.posx==e.columns&&(e.posx=0,e.posy=e.posy-1))}o[i++]=e.pixs,o[i++]=e.posx,o[i++]=e.posy,e.dmv();var re=o[--i];v(o[--i],re,L(o[--i]-48))}for(var ie=0;ie<=5;ie+=1){e.i=ie,o[i++]=e.pixs,_(A(e.sixedges,e.i)),e.dmv();var oe=o[--i];v(o[--i],oe,A(e.bits,e.bits.length-6+e.i)-48)}o[i++]="score",o[i++]=e.pixs,e.evalsymbol();var ae=o[--i];if(e[o[--i]]=ae,e.score>e.bestscore&&(e.bestsym=e.pixs,e.bestscore=e.score,e.fast&&e.bestscore>~~(e.rows*e.columns/2)))return!0;var se=e.pixs;e.litmask=d(s(se.length),se);for(var ue=0;ue<=5;ue+=1){e.i=ue,o[i++]=e.litmask,_(A(e.sixedges,e.i)),e.dmv();var ce=o[--i];v(o[--i],ce,1)}if(v(e.litmasks,e.mask,e.litmask),e.fast){o[i++]="score",o[i++]=e.litmask,e.evalsymbol();var le=o[--i];if(e[o[--i]]=le,M(e.score,e.bestscore)&&(e.bestsym=e.litmask,e.bestscore=e.score,e.bestscore>~~(e.rows*e.columns/2)))return!0}})),e.pixs=e.bestsym,!e.fast&&e.bestscore<=~~(e.rows*e.columns/2)&&(e.bestscore=-99999999,k(e.masks,(function(){e.litmask=A(e.litmasks,o[--i]),o[i++]="score",o[i++]=e.litmask,e.evalsymbol();var t=o[--i];e[o[--i]]=t,e.score>e.bestscore&&(e.bestsym=e.litmask,e.bestscore=e.score)})),e.pixs=e.bestsym);var Ne=new Map([["ren",Q],["dotty",!0],["pixs",e.pixs],["pixx",e.columns],["pixy",e.rows],["height",2*e.rows/72],["width",2*e.columns/72],["opt",e.options]]);o[i++]=Ne,e.dontdraw||Q()}function At(){var e=Object.create(At.$ctx||(At.$ctx={}));e.dontdraw=!1,e.eclevel="EC2",e.encoding="auto",e.parse=!1,e.parsefnc=!1,e.start=257,e.link1=0,e.raw=!1,e.rev=1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i];var t=e.rev;if(1!=t&&2!=t&&(o[i++]="bwipp.ultracodeInvalidRevision#25122",o[i++]="Valid revisions are 1 and 2",z()),e.raw&&(e.encoding="raw"),T(e.encoding,"raw")){for(e.dcws=s(e.barcode.length),e.i=0,e.j=0;e.i!=e.barcode.length;)e.cw=p(b(e.barcode,e.i+1,3)),v(e.dcws,e.j,e.cw),e.i=e.i+4,e.j=e.j+1;e.dcws=b(e.dcws,0,e.j)}if(T(e.encoding,"auto")){e.fn1=-1,e.fn3=-2;var n=new Map([["parse",e.parse],["parsefnc",e.parsefnc],["FNC1",e.fn1],["FNC3",e.fn3]]);e.fncvals=n,o[i++]="msg",o[i++]=e.barcode,o[i++]=e.fncvals,H();var r=o[--i];e[o[--i]]=r,e.msglen=e.msg.length,e.scr=s([]),e.scp=s([]),o[i++]=1/0,_(e.scr),_(e.scp),k(e.msg,(function(){var t=o[--i];o[i++]=t,t==e.fn1&&(i--,o[i++]=268);var n=o[--i];o[i++]=n,n==e.fn3&&(i--,o[i++]=269)})),e.dcws=s()}if(void 0!==A(e.options,"debugcws")&&(o[i++]="bwipp.debugcws#25169",o[i++]=e.dcws,z()),e.mcc=e.dcws.length+3,e.eclval=A(e.eclevel,2)-48,0!=e.eclval){if(o[i++]="qcc",o[i++]=A(s([0,1,2,4,6,8]),e.eclval),o[i++]=~~(e.mcc/25),e.mcc%25!=0){var a=o[--i];o[i++]=L(a+1)}var u=o[--i],l=o[--i];e[o[--i]]=L(l*u+5)}else e.qcc=3;e.acc=e.qcc-3+78*e.link1,e.tcc=e.mcc+e.qcc,At.$ctx._25191||function(){var t=Object.create(e);for(var n in t.metrics=s([s([2,7,37,5]),s([3,36,84,13]),s([4,85,161,22]),s([5,142,282,29])]),t)t.hasOwnProperty(n)&&(At.$ctx[n]=t[n]);At.$ctx._25191=1}();for(var h=0;h<=3&&(e.i=h,e.m=A(e.metrics,e.i),e.rows=A(e.m,0),e.minc=A(e.m,1),e.maxc=A(e.m,2),e.mcol=A(e.m,3),e.okay=!0,(e.tcc<e.minc||e.tcc>e.maxc)&&(e.okay=!1),!e.okay);h+=1);e.okay||(o[i++]="bwipp.ultracodeNoValidSymbol#25206",o[i++]="Maximum length exceeded or invalid content",z());for(var f=e.mcol;f<=61;f+=1){if(e.columns=f,o[i++]=e.columns,e.columns>=15){var d=o[--i];o[i++]=L(d-1)}if(e.columns>=31){var g=o[--i];o[i++]=L(g-1)}if(e.columns>=47){var y=o[--i];o[i++]=L(y-1)}var w=L(L(o[--i]*e.rows-3)-e.tcc);if(o[i++]=w,w>=0){e.pads=o[--i];break}i--}e.dcc=L(e.columns-e.mcol),o[i++]=1/0,o[i++]=e.start,o[i++]=e.mcc,o[i++]=e.acc,_(e.dcws);for(var x=0,C=e.qcc;x<C;x++)o[i++]=0;o[i++]=0,e.rsseq=s(),o[i++]=1/0,o[i++]=1;for(var E=0;E<282;E++){var S=o[--i];o[i++]=S,o[i++]=3*S%283}e.rsalog=s(),e.rslog=s(283);for(var O=1;O<=282;O+=1)v(e.rslog,A(e.rsalog,O),O);e.rsprod=function(){var t=o[--i],n=o[--i];if(o[i++]=n,o[i++]=t,0!=t&&0!=n){var r=A(e.rslog,o[--i]),a=A(e.rsalog,L(r+A(e.rslog,o[--i]))%282);o[i++]=a}else i-=2,o[i++]=0},e.n=e.mcc,e.k=e.qcc,o[i++]=1/0,o[i++]=1;for(var D=0,B=e.k;D<B;D++)o[i++]=0;e.coeffs=s();for(var I=1,M=e.k;I<=M;I+=1){e.i=I,v(e.coeffs,e.i,A(e.coeffs,e.i-1));for(var j=e.i-1;j>=1;j-=1){e.j=j,o[i++]=e.coeffs,o[i++]=e.j,o[i++]=A(e.coeffs,e.j-1),o[i++]=A(e.coeffs,e.j),o[i++]=A(e.rsalog,e.i),e.rsprod();var N=o[--i],F=o[--i],R=o[--i];v(o[--i],R,L(F+N)%283)}o[i++]=e.coeffs,o[i++]=0,o[i++]=A(e.coeffs,0),o[i++]=A(e.rsalog,e.i),e.rsprod();var P=o[--i],$=o[--i];v(o[--i],$,P)}e.coeffs=b(e.coeffs,0,e.coeffs.length-1);for(var V=e.coeffs.length-1;V>=0;V-=2){var q=e.coeffs;v(q,V,L(283-A(q,V)))}for(var G=0,W=e.n-1;G<=W;G+=1){e.t=L(A(e.rsseq,G)+A(e.rsseq,e.n))%283;for(var K=0,Y=e.k-1;K<=Y;K+=1)e.j=K,v(e.rsseq,e.n+e.j,L(A(e.rsseq,e.n+e.j+1)+L(283-e.t*A(e.coeffs,e.k-e.j-1)%283))%283)}for(var X=e.n,J=e.n+e.k;X<=J;X+=1)v(e.rsseq,X,L(283-A(e.rsseq,X))%283);e.ecws=b(e.rsseq,e.n,e.k),void 0!==A(e.options,"debugecc")&&(o[i++]="bwipp.debugecc#25274",o[i++]=e.ecws,z()),At.$ctx._25333||function(){var t=Object.create(e);for(var n in t.tiles=s([13135,13136,13153,13156,13163,13165,13513,13515,13516,13531,13535,13536,13561,13563,13565,13613,13615,13616,13631,13635,13636,13651,13653,13656,15135,15136,15153,15163,15165,15313,15315,15316,15351,15353,15356,15361,15363,15365,15613,15615,15616,15631,15635,15636,15651,15653,15656,16135,16136,16153,16156,16165,16313,16315,16316,16351,16353,16356,16361,16363,16365,16513,16515,16516,16531,16535,16536,16561,16563,16565,31315,31316,31351,31356,31361,31365,31513,31515,31516,31531,31535,31536,31561,31563,31565,31613,31615,31631,31635,31636,31651,31653,31656,35131,35135,35136,35151,35153,35156,35161,35163,35165,35315,35316,35351,35356,35361,35365,35613,35615,35616,35631,35635,35636,35651,35653,35656,36131,36135,36136,36151,36153,36156,36163,36165,36315,36316,36351,36356,36361,36365,36513,36515,36516,36531,36535,36536,36561,36563,36565,51313,51315,51316,51351,51353,51356,51361,51363,51365,51513,51516,51531,51536,51561,51563,51613,51615,51616,51631,51635,51636,51651,51653,51656,53131,53135,53136,53151,53153,53156,53161,53163,53165,53513,53516,53531,53536,53561,53563,53613,53615,53616,53631,53635,53636,53651,53653,53656,56131,56135,56136,56151,56153,56156,56161,56163,56165,56313,56315,56316,56351,56353,56356,56361,56363,56365,56513,56516,56531,56536,56561,56563,61313,61315,61316,61351,61353,61356,61361,61363,61365,61513,61515,61516,61531,61535,61536,61561,61563,61565,61615,61631,61635,61651,61653,63131,63135,63136,63151,63153,63156,63161,63163,63165,63513,63515,63516,63531,63535,63536,63561,63563,63565,63613,63615,63631,63635,63651,63653,65131,65135,65136,65151,65153,65156,65161,65163,65165,65313,65315,65316,65351,65353,65356,65361,65363,65365,65613,65615,65631,65635,65651,65653,56565,51515]),t.dccurev1=s([51363,51563,51653,53153,53163,53513,53563,53613,53653,56153,56163,56313,56353,56363,56513,56563,51316,51356,51536,51616,53156,53516,53536,53616,53636,53656,56136,56156,56316,56356,56516,56536]),t.dcclrev1=s([61351,61361,61531,61561,61631,61651,63131,63151,63161,63531,63561,63631,65131,65161,65351,65631,31351,31361,31531,31561,31631,31651,35131,35151,35161,35361,35631,35651,36131,36151,36351,36531]),t.dccurev2=s([15316,16316,13516,16516,13616,15616,13136,15136,16136,13536,16536,13636,13156,16156,15356,13656,15313,16313,13513,16513,13613,15613,13153,15153,16153,16353,13653,15653,13163,15163,15363,13563]),t.dcclrev2=s([36315,36515,35615,35135,36135,31535,36535,31635,35635,35165,36165,31365,35365,36365,31565,36565,61315,65315,63515,61615,65135,61535,63535,61635,63635,65635,63165,65165,61365,65365,61565,63565]),t)t.hasOwnProperty(n)&&(At.$ctx[n]=t[n]);At.$ctx._25333=1}(),o[i++]="dccu",1==e.rev?o[i++]=e.dccurev1:o[i++]=e.dccurev2;var Z=o[--i];e[o[--i]]=Z,o[i++]="dccl",1==e.rev?o[i++]=e.dcclrev1:o[i++]=e.dcclrev2;var ee=o[--i];e[o[--i]]=ee,e.rows=L(6*e.rows+1),e.columns=e.columns+6,o[i++]=1/0;for(var te=0,ne=e.rows*e.columns;te<ne;te++)o[i++]=-1;e.pixs=s(),e.qmv=function(){var t=o[--i],n=o[--i];o[i++]=L(n+t*e.columns)};for(var re=0,ie=e.columns-1;re<=ie;re+=1){e.i=re;for(var oe=0,ae=L(e.rows-1);oe<=ae;oe+=6)if(e.j=oe,e.i>=5){o[i++]=e.pixs,o[i++]=e.i,o[i++]=e.j,e.qmv();var se=o[--i];v(o[--i],se,e.i%2*9)}o[i++]=e.pixs,o[i++]=e.i,o[i++]=0,e.qmv();var ue=o[--i];v(o[--i],ue,9),o[i++]=e.pixs,o[i++]=e.i,o[i++]=L(e.rows-1),e.qmv();var ce=o[--i];v(o[--i],ce,9)}for(var le=1,he=L(e.rows-2);le<=he;le+=1){e.i=le;for(var fe=3,de=e.columns-1;fe<=de;fe+=16){e.j=fe,o[i++]=e.pixs,o[i++]=e.j,o[i++]=e.i,e.qmv();var pe=o[--i];v(o[--i],pe,9*(1-e.i%2))}o[i++]=e.pixs,o[i++]=0,o[i++]=e.i,e.qmv();var me=o[--i];v(o[--i],me,9),o[i++]=e.pixs,o[i++]=1,o[i++]=e.i,e.qmv();var ge=o[--i];v(o[--i],ge,9*(1-e.i%2)),o[i++]=e.pixs,o[i++]=2,o[i++]=e.i,e.qmv();var Ae=o[--i];v(o[--i],Ae,0),o[i++]=e.pixs,o[i++]=3,o[i++]=e.i,e.qmv();var ve=o[--i];v(o[--i],ve,9),o[i++]=e.pixs,o[i++]=4,o[i++]=e.i,e.qmv();var be=o[--i];v(o[--i],be,0),o[i++]=e.pixs,o[i++]=e.columns-1,o[i++]=e.i,e.qmv();var ye=o[--i];v(o[--i],ye,9)}e.i=~~(e.rows/2)-5,o[i++]=1/0;for(var we=m(c(5),A(e.dccu,e.dcc),10),xe=0,Ce=we.length;xe<Ce;xe++)o[i++]=A(we,xe)-48;var ke=m(c(5),A(e.dccl,e.dcc),10);o[i++]=0;for(var Ee=0,Se=ke.length;Ee<Se;Ee++)o[i++]=A(ke,Ee)-48;for(var _e=s(),Oe=0,Te=_e.length;Oe<Te;Oe++){o[i++]=A(_e,Oe),o[i++]=e.pixs,o[i++]=2,o[i++]=e.i,e.qmv();var De=o[--i];v(o[--i],De,o[--i]),e.i=e.i+1}o[i++]=1/0,o[i++]=e.start,o[i++]=e.mcc,_(e.ecws),o[i++]=e.tcc,o[i++]=283,o[i++]=e.acc,_(e.dcws);for(var Be=0,Ie=e.pads;Be<Ie;Be++)o[i++]=284;o[i++]=e.qcc,e.tileseq=s(),e.x=5,e.y=1;for(var Me=e.tileseq,je=0,Ne=Me.length;je<Ne;je++){for(var Fe=m(c(5),A(e.tiles,A(Me,je)),10),Re=0,Pe=Fe.length;Re<Pe;Re++){o[i++]=A(Fe,Re),o[i++]=e.pixs,o[i++]=e.x,o[i++]=e.y,e.qmv();var Le=o[--i];v(o[--i],Le,L(o[--i]-48)),e.y=e.y+1}if(e.y!=L(e.rows-1))e.y=e.y+1;else{e.x=e.x+1,e.y=1,o[i++]=e.pixs,o[i++]=e.x,o[i++]=e.y,e.qmv();var Ue=o[--i];-1!=A(o[--i],Ue)&&(e.x=e.x+1)}}At.$ctx._25415||function(){var t=Object.create(e),n=new Map([[0,"FFFFFF"],[9,"000000"],[1,"00FFFF"],[3,"FF00FF"],[5,"FFFF00"],[6,"00FF00"]]);for(var r in t.colormap=n,t)t.hasOwnProperty(r)&&(At.$ctx[r]=t[r]);At.$ctx._25415=1}();var ze=new Map([["ren",Q],["pixs",e.pixs],["pixx",e.columns],["pixy",e.rows],["height",e.rows/72*2],["width",e.columns/72*2],["colormap",e.colormap],["opt",e.options]]);o[i++]=ze,e.dontdraw||Q()}function vt(){var e=Object.create(vt.$ctx||(vt.$ctx={}));e.dontdraw=!1,e.rows=-1,e.columns=-1,e.slave=!1,e.colors=16,e.eclevel=6,e.raw=!1,e.parse=!1,e.parsefnc=!1,e.mask=-1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],e.databpm=~~Math.round(Math.log(e.colors)/Math.log(2));var t=e.colors;o[i++]="metabpm",o[i++]=t,t>8&&(i--,o[i++]=8);var n=o[--i];e[o[--i]]=~~Math.round(Math.log(n)/Math.log(2)),e.fn1=-1;var r=new Map([["parse",e.parse],["parsefnc",e.parsefnc],["FNC1",e.fn1]]);e.fncvals=r,o[i++]="msg",o[i++]=e.barcode,o[i++]=e.fncvals,H();var a=o[--i];e[o[--i]]=a,e.msglen=e.msg.length,e.addtobits=function(){var t=o[--i];y(e.bits,e.j,t),e.j=t.length+e.j},e.tofixedbits=function(){var e=f(c(13),"0000000000000"),t=o[--i],n=m(c(13),o[--i],2);y(e,L(t-n.length),n),o[i++]=b(e,0,t)};var l=e.msglen<=15?4:17;e.bits=c(7+l+8*e.msglen+12),e.j=0,o[i++]=31,o[i++]=5,e.tofixedbits(),e.addtobits(),o[i++]="00",e.addtobits(),e.msglen<=15?(o[i++]=e.msglen,o[i++]=4,e.tofixedbits(),e.addtobits()):(o[i++]="0000",e.addtobits(),o[i++]=e.msglen-16,o[i++]=13,e.tofixedbits(),e.addtobits());for(var h=0,p=e.msglen-1;h<=p;h+=1)o[i++]=A(e.msg,h),o[i++]=8,e.tofixedbits(),e.addtobits();if(o[i++]=28,o[i++]=5,e.tofixedbits(),e.addtobits(),o[i++]=31,o[i++]=5,e.tofixedbits(),e.addtobits(),o[i++]="11",e.addtobits(),e.diffside=21,e.sameshape=!1,e.sameecc=!1,e.hasslaves=!1,e.metrics=function(){e.mc=o[--i],e.mr=o[--i];var t=e.mc,n=e.mr,r=e.mc,a=e.mr,u=e.colors,c=64;if(64>u){var l=u;u=c,c=l}var h=e.slave?7:17;if(o[i++]=t*n,o[i++]=7*((2+~~(L(r-25)/16))*(2+~~(L(a-25)/16))-4),o[i++]=2*c,o[i++]=4*h,e.slave){if(o[i++]=3,!e.sameshape){var f=o[--i];o[i++]=L(f+5)}if(e.hasslaves){var d=o[--i];o[i++]=L(d+3)}if(!e.sameecc){var p=e.mr,m=e.mc;if(B(p,m)){l=m;m=p,p=l}var g=o[--i];o[i++]=L(g+A(s([10,12,14,14,16,16,16,16]),~~(L(p-21)/16)))}var v=~~Math.ceil(2*o[--i]/e.metabpm);e.nummetabits=v*e.metabpm,o[i++]=v}else{var b=T(e.mr,e.mc)?0:1;e.metass=b;var y=e.mr,w=e.mc;if(B(y,w)){var l=w;w=y,y=l}e.metavf=A(s([0,1,2,2,3,3,3,3]),~~(L(y-21)/16)),o[i++]="metavlen",0==e.metass?o[i++]=s([2,2,3,4]):o[i++]=s([4,6,8,10]);var x=A(o[--i],e.metavf);if(e[o[--i]]=x,e.metaelen=L(2*e.metavf+10),o[i++]=L(L(7+e.metavlen)+e.metaelen),e.hasslaves){var C=o[--i];o[i++]=L(C+4)}var k=~~Math.ceil(2*o[--i]/e.metabpm);e.nummetabits=L(k*e.metabpm+6),o[i++]=k+6}var E=o[--i];e.nummetamodules=E;var S=o[--i],_=o[--i],O=o[--i];e.numdatamodules=L(o[--i]-L(O+L(_+L(S+E)))),e.numdatabits=e.numdatamodules*e.databpm},e.coderate=A(s([.67,.63,.57,.55,.5,.43,.34,.25,.2,.17,.14]),e.eclevel),e.grosslen=~~Math.ceil(e.bits.length/e.coderate),e.snapsize=function(){var e=~~Math.ceil(o[--i])-18;o[i++]=e,e<0&&(i--,o[i++]=0);var t=o[--i];o[i++]=4*~~(t/4)+21},-1==e.rows&&-1==e.columns){o[i++]="size",o[i++]=Math.sqrt(e.grosslen),e.snapsize();var g=o[--i];for(e[o[--i]]=g;o[i++]=e.size,o[i++]=e.size,e.metrics(),!(e.grosslen<=e.numdatabits);)e.size=L(e.size+4);e.rows=e.size,e.columns=e.size}else{if(-1==e.columns&&-1!=e.rows){o[i++]="columns",o[i++]=e.grosslen/e.rows,e.snapsize();var w=o[--i];for(e[o[--i]]=w;o[i++]=e.rows,o[i++]=e.columns,e.metrics(),!(e.grosslen<=e.numdatabits);)e.columns=L(e.columns+4)}if(-1==e.rows&&-1!=e.columns){o[i++]="rows",o[i++]=e.grosslen/e.columns,e.snapsize();var x=o[--i];for(e[o[--i]]=x;o[i++]=e.rows,o[i++]=e.columns,e.metrics(),!(e.grosslen<=e.numdatabits);)e.rows=L(e.rows+4)}-1!=e.rows&&-1!=e.columns&&(o[i++]=e.rows,o[i++]=e.columns,e.metrics())}e.C=e.numdatabits,e.cols=e.columns,(e.rows>145||e.cols>145)&&(o[i++]="bwipp.jabcodeNoValidSymbol#25627",o[i++]="Maximum length exceeded or invalid content",z()),e.min=e.C;for(var C=3;C<=8;C+=1){e.i=C;for(var I=e.i+1;I<=9;I+=1)e.j=I,e.dist=~~(e.C/e.j)*e.j-~~(e.C/e.j)*e.i-e.bits.length,e.dist<e.min&&e.dist>=0&&(e.datawc=e.i,e.datawr=e.j,e.min=e.dist)}e.tmpbits=c(~~(e.C/e.datawr)*e.datawr-~~(e.C/e.datawr)*e.datawc),y(e.tmpbits,0,e.bits);for(var M=e.bits.length,j=e.tmpbits.length-1;M<=j;M+=1){var F=A(e.tmpbits,M-1);if(o[i++]=M,o[i++]=F,F%2==0){var $=o[--i];o[i++]=L($+1)}else{var V=o[--i];o[i++]=L(V-1)}var q=o[--i];v(e.tmpbits,o[--i],q)}e.bits=e.tmpbits,e.m0=22610,e.m1=-3027,e.m2=19605,e.m3=32557,e.lcg64_temper=function(){e.p00=e.m0*e.s0,e.p01=e.m0*e.s1,e.p02=e.m0*e.s2,e.p03=e.m0*e.s3,e.p10=e.m1*e.s0,e.p11=e.m1*e.s1,e.p12=e.m1*e.s2,e.p13=e.m1*e.s3,e.p20=e.m2*e.s0,e.p21=e.m2*e.s1,e.p22=e.m2*e.s2,e.p23=e.m2*e.s3,e.p30=e.m3*e.s0,e.p31=e.m3*e.s1,e.p32=e.m3*e.s2,e.p33=e.m3*e.s3,e.s3=e.p33%65536+1,e.s2=e.p32%65536+~~(e.p33/65536)+e.p23%65536,e.s1=e.p31%65536+~~(e.p32/65536)+(e.p22%65536+~~(e.p23/65536))+e.p13%65536,e.s0=e.p30%65536+~~(e.p31/65536)+(e.p21%65536+~~(e.p22/65536))+(e.p12%65536+~~(e.p13/65536))+e.p03%65536,e.s3=e.s3+65536,e.s2=e.s2+65535,e.s1=e.s1+65535,e.s0=e.s0+65535,e.s2=~~(e.s3/65536)+e.s2,e.s3=e.s3%65536,e.s1=~~(e.s2/65536)+e.s1,e.s2=e.s2%65536,e.s0=~~(e.s1/65536)+e.s0,e.s1=e.s1%65536,e.s0=e.s0%65536;var t=4294967295&(65536*(e.s0-32768)+e.s1^2147483648),n=t^t>>>11,r=n^n<<7&-1658038656,a=4294967295&(r^r<<15&-272236544);o[i++]=a^a>>>18},e.createMatrixA=function(){o[i++]="nb_pcb",e.wr<4?o[i++]=~~(e.Pg_sub_block/2):o[i++]=~~(e.Pg_sub_block/e.wr)*e.wc;var t=o[--i];e[o[--i]]=t,e.offset=~~Math.ceil(e.Pg_sub_block/32),e.effwidth=32*e.offset,e.matrixA=s(e.offset*e.nb_pcb);for(var n=0,r=e.offset*e.nb_pcb-1;n<=r;n+=1)v(e.matrixA,n,0);e.permutation=s(e.Pg_sub_block);for(var a=0,u=e.Pg_sub_block-1;a<=u;a+=1)v(e.permutation,a,a);for(var c=0,l=~~(e.Pg_sub_block/e.wr)-1;c<=l;c+=1){e.i=c;for(var h=0,f=L(e.wr-1);h<=f;h+=1){e.j=h;var d=e.matrixA,p=e.i,m=e.effwidth,g=e.wr,b=e.j,y=L(31-L(e.i*L(e.effwidth+e.wr)+e.j)%32);v(d,~~(L(p*L(m+g)+b)/32),A(d,~~(L(p*L(m+g)+b)/32))|(y<0?1>>>-y:1<<y))}}e.s0=0,e.s1=0,e.s2=11,e.s3=64569;for(var w=1,x=L(e.wc-1);w<=x;w+=1){e.i=w,e.off_index=~~(e.Pg_sub_block/e.wr)*e.i;for(var C=0,k=e.Pg_sub_block-1;C<=k;C+=1){e.j=C,e.lcg64_temper();var E=o[--i];if(o[i++]=E,E<0){var S=o[--i];o[i++]=L(2147483648+(2147483648^S))}e.pos=~~(o[--i]/4294967296*(e.Pg_sub_block-e.j));for(var _=0,O=~~(e.Pg_sub_block/e.wr)-1;_<=O;_+=1){e.k=_;var T=e.matrixA,D=e.off_index,B=e.k,I=e.offset,M=e.j,j=A(e.matrixA,~~(A(e.permutation,e.pos)/32)+e.k*e.offset),N=-L(31-A(e.permutation,e.pos)%32),F=31-e.j%32;v(T,(D+B)*I+~~(M/32),A(T,(D+B)*I+~~(M/32))|(F<0?(1&(N<0?j>>>-N:j<<N))>>>-F:(1&(N<0?j>>>-N:j<<N))<<F))}var R=e.permutation,P=e.Pg_sub_block,U=e.j;v(R,P-1-U,A(e.permutation,e.pos)),v(e.permutation,e.pos,A(R,P-1-U))}}},e.createMetadataMatrixA=function(){e.nb_pcb=~~(e.Pg_sub_block/2),e.offset=~~Math.ceil(e.Pg_sub_block/32),e.matrixA=s(e.offset*e.nb_pcb);for(var t=0,n=e.offset*e.nb_pcb-1;t<=n;t+=1)v(e.matrixA,t,0);e.permutation=s(e.Pg_sub_block);for(var r=0,a=e.Pg_sub_block-1;r<=a;r+=1)v(e.permutation,r,r);e.s0=0,e.s1=0,e.s2=0,e.s3=38545,e.nb_once=~~(~~L(e.nb_pcb/e.wc*e.Pg_sub_block+3)/e.nb_pcb);for(var u=0,c=e.nb_pcb-1;u<=c;u+=1){e.i=u;for(var l=0,h=e.nb_once-1;l<=h;l+=1){e.j=l,e.lcg64_temper();var f=o[--i];if(o[i++]=f,f<0){var d=o[--i];o[i++]=L(2147483648+(2147483648^d))}e.pos=~~(o[--i]/4294967296*(e.Pg_sub_block-e.j));var p=e.matrixA,m=e.i,g=e.offset,b=A(e.permutation,e.pos),y=L(31-A(e.permutation,e.pos)%32);v(p,m*g+~~(b/32),A(p,m*g+~~(b/32))|(y<0?1>>>-y:1<<y));var w=e.permutation,x=e.Pg_sub_block,C=e.j;v(w,x-1-C,A(e.permutation,e.pos)),v(e.permutation,e.pos,A(w,x-1-C))}}},e.GaussJordan=function(){o[i++]="nb_pcb",e.wr<4?o[i++]=~~(e.Pg_sub_block/2):o[i++]=~~(e.Pg_sub_block/e.wr)*e.wc;var t=o[--i];e[o[--i]]=t,e.offset=~~Math.ceil(e.Pg_sub_block/32);var n=e.matrixA;e.matrixH=d(s(n.length),n),o[i++]=1/0;for(var r=0,a=e.Pg_sub_block;r<a;r++)o[i++]=0;e.column_arrangement=s(),o[i++]=1/0;for(var u=0,c=e.Pg_sub_block;u<c;u++)o[i++]=!1;e.processed_column=s(),o[i++]=1/0;for(var l=0,h=e.nb_pcb;l<h;l++)o[i++]=0;e.zero_lines_nb=s(),o[i++]=1/0;for(var f=0,p=2*e.Pg_sub_block;f<p;f++)o[i++]=0;e.swap_col=s(),e.zero_lines=0,e.loop0=0;for(var m=0,g=e.nb_pcb-1;m<=g;m+=1){e.i=m,e.pivot_column=e.Pg_sub_block+1;for(var b=0,y=e.Pg_sub_block-1;b<=y;b+=1){e.j=b;var w=A(e.matrixH,~~((32*e.offset*e.i+e.j)/32)),x=-(31-(32*e.offset*e.i+e.j)%32);if(1==(1&(x<0?w>>>-x:w<<x))){e.pivot_column=e.j;break}}if(e.pivot_column<e.Pg_sub_block){v(e.processed_column,e.pivot_column,!0),v(e.column_arrangement,e.pivot_column,e.i),e.pivot_column>=e.nb_pcb&&(v(e.swap_col,2*e.loop0,e.pivot_column),e.loop0=e.loop0+1),e.off_index=~~(e.pivot_column/32),e.off_index1=e.pivot_column%32;for(var C=0,k=e.nb_pcb-1;C<=k;C+=1)if(e.j=C,e.i!=e.j){var E=A(e.matrixH,e.off_index+e.j*e.offset),S=-(31-e.off_index1);if(1==(1&(S<0?E>>>-S:E<<S)))for(var _=0,O=e.offset-1;_<=O;_+=1){e.k=_;var T=e.matrixH,D=e.offset,B=e.j,I=e.k;v(T,D*B+I,R(A(T,D*B+I),A(e.matrixH,e.offset*e.i+e.k)))}}}else v(e.zero_lines_nb,e.zero_lines,e.i),e.zero_lines=e.zero_lines+1}e.matrix_rank=e.nb_pcb-e.zero_lines,e.loop2=0;for(var M=e.matrix_rank,j=e.nb_pcb-1;M<=j;M+=1)if(e.i=M,A(e.column_arrangement,e.i)>0)for(var N=0,F=e.nb_pcb-1;N<=F;N+=1)if(e.j=N,P(A(e.processed_column,e.j))){v(e.column_arrangement,e.j,A(e.column_arrangement,e.i)),v(e.column_arrangement,e.i,0),v(e.processed_column,e.j,!0),v(e.processed_column,e.i,!1),v(e.swap_col,2*e.loop0,e.i),v(e.swap_col,2*e.loop0+1,e.j),v(e.column_arrangement,e.i,e.j),e.loop0=e.loop0+1,e.loop2=e.loop2+1;break}e.loop1=0;for(var U=0,z=e.nb_pcb-1;U<=z;U+=1)e.kl=U,P(A(e.processed_column,e.kl))&&e.loop1<e.loop0-e.loop2&&(v(e.column_arrangement,e.kl,A(e.column_arrangement,A(e.swap_col,2*e.loop1))),v(e.processed_column,e.kl,!0),v(e.swap_col,2*e.loop1+1,e.kl),e.loop1=e.loop1+1);e.loop1=0;for(var H=0,$=e.nb_pcb-1;H<=$;H+=1)e.kl=H,P(A(e.processed_column,e.kl))&&(v(e.column_arrangement,e.kl,A(e.zero_lines_nb,e.loop1)),e.loop1=e.loop1+1);for(var Q=0,V=e.nb_pcb-1;Q<=V;Q+=1){e.i=Q;for(var q=0,G=e.offset-1;q<=G;q+=1)e.j=q,v(e.matrixA,e.i*e.offset+e.j,A(e.matrixH,L(A(e.column_arrangement,e.i)*e.offset+e.j)))}e.tmp=0;for(var W=0,K=e.loop0-1;W<=K;W+=1){e.i=W;for(var Y=0,X=e.nb_pcb-1;Y<=X;Y+=1){e.j=Y;var J=A(e.matrixA,~~(A(e.swap_col,2*e.i)/32)+e.j*e.offset),Z=-L(31-A(e.swap_col,2*e.i)%32);e.tmp=1&(-(1&(Z<0?J>>>-Z:J<<Z))^e.tmp)^e.tmp;var ee=e.matrixA,te=A(e.swap_col,2*e.i),ne=e.j,re=e.offset,ie=A(e.matrixA,~~(A(e.swap_col,2*e.i+1)/32)+e.j*e.offset),oe=-L(31-A(e.swap_col,2*e.i+1)%32),ae=L(31-A(e.swap_col,2*e.i)%32);v(ee,~~(te/32)+ne*re,A(ee,~~(te/32)+ne*re)^(-(1&(oe<0?ie>>>-oe:ie<<oe))^A(e.matrixA,~~(A(e.swap_col,2*e.i)/32)+e.j*e.offset))&(ae<0?1>>>-ae:1<<ae));var se=e.matrixA,ue=A(e.swap_col,2*e.i+1),ce=e.j,le=e.offset,he=L(31-A(e.swap_col,2*e.i+1)%32);v(se,~~(ue/32)+ce*le,A(se,~~(ue/32)+ce*le)^(-(1&e.tmp)^A(e.matrixA,~~(A(e.swap_col,2*e.i+1)/32)+e.j*e.offset))&(he<0?1>>>-he:1<<he))}}},e.createGeneratorMatrix=function(){e.pn=e.Pg_sub_block-e.matrix_rank,e.offset=~~Math.ceil(e.pn/32),e.effwidth=32*e.offset,e.offset_cap=~~Math.ceil(e.Pg_sub_block/32),e.G=s(e.offset*e.Pg_sub_block);for(var t=0,n=e.offset*e.Pg_sub_block-1;t<=n;t+=1)v(e.G,t,0);for(var r=0,i=e.pn-1;r<=i;r+=1){e.i=r;var o=e.G,a=e.Pg_sub_block,u=e.pn,c=e.i,l=e.offset,h=e.i,f=31-e.i%32;v(o,(a-u+c)*l+~~(h/32),A(o,(a-u+c)*l+~~(h/32))|(f<0?1>>>-f:1<<f))}e.matrix_index=e.Pg_sub_block-e.pn,e.loop0=0;for(var d=0,p=(e.Pg_sub_block-e.pn)*e.effwidth-1;d<=p;d+=1)if(e.i=d,e.matrix_index>=e.Pg_sub_block&&(e.loop0=e.loop0+1,e.matrix_index=e.Pg_sub_block-e.pn),e.i%e.effwidth<e.pn){var m=e.G,g=e.i,b=A(e.matrixA,~~(e.matrix_index/32)+e.offset_cap*e.loop0),y=-(31-e.matrix_index%32),w=31-e.i%32;v(m,~~(g/32),A(m,~~(g/32))^(-(1&(y<0?b>>>-y:b<<y))^A(e.G,~~(e.i/32)))&(w<0?1>>>-w:1<<w)),e.matrix_index=e.matrix_index+1}},e.ldpc=function(){e.wr=o[--i],e.wc=o[--i],o[i++]=1/0;var t=o[--i],n=o[--i];if(o[i++]=t,k(n,(function(){var e=o[--i];o[i++]=L(e-48)})),e.data=s(),e.Pn=e.data.length,-1!=e.wr){if(e.Pg=~~(Math.ceil(Math.ceil(e.Pn*e.wr/L(e.wr-e.wc))/e.wr)*e.wr),e.nb_sub_blocks=1+~~(e.Pg/2700),e.Pg_sub_block=~~(~~(e.Pg/e.nb_sub_blocks)/e.wr)*e.wr,e.Pn_sub_block=~~(e.Pg_sub_block*L(e.wr-e.wc)/e.wr),e.nb_sub_blocks=~~(e.Pg/e.Pg_sub_block),o[i++]="encoding_iterations",o[i++]=~~(e.Pg/e.Pg_sub_block),e.Pn_sub_block*e.nb_sub_blocks<e.Pn){var r=o[--i];o[i++]=L(r-1)}var a=o[--i];e[o[--i]]=a,e.createMatrixA()}else e.Pg=2*e.Pn,e.nb_sub_blocks=1,e.Pg_sub_block=e.Pg,e.Pn_sub_block=e.Pn,e.encoding_iterations=1,e.createMetadataMatrixA();e.GaussJordan(),e.createGeneratorMatrix(),e.ecc_encoded_data=s(e.Pg),e.offset=~~Math.ceil((e.Pg_sub_block-e.matrix_rank)/32);for(var u=0,l=e.encoding_iterations-1;u<=l;u+=1){e.iter=u;for(var h=0,f=e.Pg_sub_block-1;h<=f;h+=1){e.i=h,e.temp=0,e.loop0=0,e.offset_index=e.offset*e.i;for(var d=e.iter*e.Pn_sub_block,p=(e.iter+1)*e.Pn_sub_block-1;d<=p;d+=1){var m=A(e.G,e.offset_index+~~(e.loop0/32)),g=-(31-e.loop0%32);e.temp=1&A(e.data,d)&(g<0?m>>>-g:m<<g)^e.temp,e.loop0=e.loop0+1}v(e.ecc_encoded_data,e.i+e.iter*e.Pg_sub_block,e.temp)}}if(e.encoding_iterations!=e.nb_sub_blocks){e.start=e.encoding_iterations*e.Pn_sub_block,e.last_index=e.encoding_iterations*e.Pg_sub_block,e.Pg_sub_block=e.Pg-e.encoding_iterations*e.Pg_sub_block,e.Pn_sub_block=~~(e.Pg_sub_block*L(e.wr-e.wc)/e.wr),e.createMatrixA(),e.GaussJordan(),e.createGeneratorMatrix(),e.offset=~~Math.ceil((e.Pg_sub_block-e.matrix_rank)/32);for(var b=0,y=e.Pg_sub_block-1;b<=y;b+=1){e.i=b,e.temp=0,e.loop0=0,e.offset_index=e.offset*e.i;for(var w=e.start,x=e.Pn-1;w<=x;w+=1){var C=A(e.G,e.offset_index+~~(e.loop0/32)),E=-(31-e.loop0%32);e.temp=1&A(e.data,w)&(E<0?C>>>-E:C<<E)^e.temp,e.loop0=e.loop0+1}v(e.ecc_encoded_data,e.i+e.last_index,e.temp)}}e.out=c(e.Pg);for(var S=0,_=e.Pg-1;S<=_;S+=1)v(e.out,S,L(A(e.ecc_encoded_data,S)+48));o[i++]=e.out},o[i++]="bits",o[i++]=e.bits,o[i++]=e.datawc,o[i++]=e.datawr,e.ldpc();var G=o[--i];e[o[--i]]=G,e.s0=0,e.s1=0,e.s2=3,e.s3=30151;for(var W=e.bits.length-1;W>=1;W-=1){e.l=W,e.lcg64_temper();var K=o[--i];if(o[i++]=K,K<0){var Y=o[--i];o[i++]=L(2147483648+(2147483648^Y))}e.r=~~(o[--i]/4294967296*(e.l+1)),v(e.bits,e.l,A(e.bits,e.r)),v(e.bits,e.r,A(e.bits,e.l))}e.tmpbits=c(e.C),y(e.tmpbits,0,e.bits),e.j=e.bits.length;for(var X=0,J=~~(L(L(e.C-e.j)+1)/2);X<J;X++)v(e.tmpbits,e.j,48),e.j+1<e.C&&v(e.tmpbits,e.j+1,49),e.j=e.j+2;if(e.bits=e.tmpbits,4==e.colors)e.bi=0,e.gi=1,e.mi=2,e.yi=3,e.ki=4,e.wi=5,o[i++]=1/0,o[i++]=e.bi,o[i++]="0000FF",o[i++]=e.gi,o[i++]="00FF00",o[i++]=e.mi,o[i++]="FF00FF",o[i++]=e.yi,o[i++]="FFFF00",o[i++]=e.ki,o[i++]="000000",o[i++]=e.wi,o[i++]="FFFFFF",e.palette=u(),e.metacolorindex=s([e.bi,e.gi,e.mi,e.yi]),e.palettelayout=s([e.bi,e.gi,e.mi,e.yi]);else{var Z=new Map([[8,s([2,2,2])],[16,s([4,2,2])],[32,s([4,4,2])],[64,s([4,4,4])],[128,s([8,4,4])],[256,s([8,8,4])]]);e.rgbres=A(Z,e.colors),o[i++]="rvals",o[i++]=A(e.rgbres,0),o[i++]=1/0;var ee=o[--i],te=L(o[--i]-1);o[i++]=ee,o[i++]=te;for(var ne=0,re=te;ne<=re;ne+=1){var ie=o[--i];o[i++]=~~Math.round(ne*(255/ie)),o[i++]=ie}i--;var oe=s();e[o[--i]]=oe,o[i++]="gvals",o[i++]=A(e.rgbres,1),o[i++]=1/0;var ae=o[--i],se=L(o[--i]-1);o[i++]=ae,o[i++]=se;for(var ue=0,ce=se;ue<=ce;ue+=1){var le=o[--i];o[i++]=~~Math.round(ue*(255/le)),o[i++]=le}i--;var he=s();e[o[--i]]=he,o[i++]="bvals",o[i++]=A(e.rgbres,2),o[i++]=1/0;var fe=o[--i],de=L(o[--i]-1);o[i++]=fe,o[i++]=de;for(var pe=0,me=de;pe<=me;pe+=1){var ge=o[--i];o[i++]=~~Math.round(pe*(255/ge)),o[i++]=ge}i--;var Ae=s();e[o[--i]]=Ae;e.colors;e.palette=new Map;var ve=e.colors,be=64;if(64>ve){var ye=ve;ve=be,be=ye}e.palettelayout=s(be),e.i=0,e.j=8,k(e.rvals,(function(){e.r=o[--i],k(e.gvals,(function(){e.g=o[--i],k(e.bvals,(function(){e.b=o[--i];var t=f(c(6),"000000"),n=m(c(6),e.r<<16|e.g<<8|e.b,16);y(t,6-n.length,n),o[i++]=t,o[i++]=!1,T(t,"000000")&&(e.ki=e.i,i--,o[i++]=!0);var r=o[--i],a=o[--i];o[i++]=a,o[i++]=r,T(a,"0000FF")&&(e.bi=e.i,i--,o[i++]=!0);var s=o[--i],u=o[--i];o[i++]=u,o[i++]=s,T(u,"00FF00")&&(e.gi=e.i,i--,o[i++]=!0);var l=o[--i],h=o[--i];o[i++]=h,o[i++]=l,T(h,"00FFFF")&&(e.ci=e.i,i--,o[i++]=!0);var d=o[--i],p=o[--i];o[i++]=p,o[i++]=d,T(p,"FF0000")&&(e.ri=e.i,i--,o[i++]=!0);var g=o[--i],A=o[--i];o[i++]=A,o[i++]=g,T(A,"FF00FF")&&(e.mi=e.i,i--,o[i++]=!0);var b=o[--i],w=o[--i];o[i++]=w,o[i++]=b,T(w,"FFFF00")&&(e.yi=e.i,i--,o[i++]=!0);var x=o[--i],C=o[--i];o[i++]=C,o[i++]=x,T(C,"FFFFFF")&&(e.wi=e.i,i--,o[i++]=!0),P(o[--i])&&(e.colors<=64||128==e.colors&&(0==e.r||73==e.r||182==e.r||255==e.r)||256==e.colors&&(0==e.r||73==e.r||182==e.r||255==e.r)&&(0==e.g||73==e.g||182==e.g||255==e.g))&&(v(e.palettelayout,e.j,e.i),e.j=e.j+1),v(e.palette,e.i,o[--i]),e.i=e.i+1}))}))})),y(e.palettelayout,0,s([e.ki,e.bi,e.gi,e.ci,e.ri,e.mi,e.yi,e.wi])),e.metacolorindex=s([e.ki,e.bi,e.gi,e.ci,e.ri,e.mi,e.yi,e.wi])}o[i++]=1/0;for(var we=0,xe=e.rows*e.cols;we<xe;we++)o[i++]=-1;e.pixs=s(),e.jmv=function(){var t=o[--i],n=o[--i];o[i++]=L(n+t*e.cols)},e.slave?(e.fpat=s([s([0,0,0,0,0]),s([0,2,2,0,0]),s([0,2,1,2,0]),s([0,0,2,2,0]),s([0,0,0,0,0])]),e.fmap=s([s([-1,e.ki,e.wi]),s([-1,e.ki,e.wi]),s([-1,e.ki,e.wi]),s([-1,e.ki,e.wi])])):(e.fpat=s([s([1,1,1,0,0]),s([1,2,2,0,0]),s([1,2,1,2,1]),s([0,0,2,2,1]),s([0,0,1,1,1])]),e.fmap=s([s([-1,e.bi,e.yi]),s([-1,e.yi,e.bi]),s([-1,e.gi,e.mi]),s([-1,e.mi,e.gi])]));for(var Ce=0;Ce<=4;Ce+=1){e.y=Ce;for(var ke=0;ke<=4;ke+=1){e.x=ke,e.fpb=A(A(e.fpat,e.y),e.x),o[i++]=e.pixs,o[i++]=e.x+1,o[i++]=e.y+1,e.jmv();var Ee=o[--i];v(o[--i],Ee,A(A(e.fmap,0),e.fpb)),o[i++]=e.pixs,o[i++]=e.x+1,o[i++]=L(L(e.rows-e.y)-2),e.jmv();var Se=o[--i];v(o[--i],Se,A(A(e.fmap,1),e.fpb)),o[i++]=e.pixs,o[i++]=L(L(e.x+e.cols)-6),o[i++]=e.y+1,e.jmv();var _e=o[--i];v(o[--i],_e,A(A(e.fmap,2),e.fpb)),o[i++]=e.pixs,o[i++]=L(L(e.x+e.cols)-6),o[i++]=L(L(e.rows-e.y)-2),e.jmv();var Oe=o[--i];v(o[--i],Oe,A(A(e.fmap,3),e.fpb))}}if(e.algnpat0=s([s([e.ki,e.ki,-1]),s([e.ki,e.wi,e.ki]),s([-1,e.ki,e.ki])]),e.algnpat1=s([s([-1,e.ki,e.ki]),s([e.ki,e.wi,e.ki]),s([e.ki,e.ki,-1])]),e.num=~~Math.round(e.cols/16)-1,e.algnrpos=s([3,17]),e.num>0){o[i++]=1/0;for(var Te=0,De=e.num;Te<=De;Te+=1)o[i++]=3+~~(Te*(L(e.cols-7)/e.num));e.algnrpos=s()}if(e.num=~~Math.round(e.rows/16)-1,e.algncpos=s([3,17]),e.num>0){o[i++]=1/0;for(var Be=0,Ie=e.num;Be<=Ie;Be+=1)o[i++]=3+~~(Be*(L(e.rows-7)/e.num));e.algncpos=s()}e.putalgnpat=function(){e.pp=o[--i],e.py=o[--i],e.px=o[--i];for(var t=0;t<=2;t+=1){e.pb=t;for(var n=0;n<=2;n+=1){e.pa=n,o[i++]=e.pixs,o[i++]=L(e.px+e.pa),o[i++]=L(e.py+e.pb),e.jmv();var r=o[--i];v(o[--i],r,A(A(e.pp,e.pb),e.pa))}}};for(var Me=0,je=e.algncpos.length-1;Me<=je;Me+=1){e.j=Me,e.y=A(e.algncpos,e.j);for(var Ne=0,Fe=e.algnrpos.length-1;Ne<=Fe;Ne+=1){e.i=Ne,e.x=A(e.algnrpos,e.i),o[i++]=e.pixs,o[i++]=e.x,o[i++]=e.y,e.jmv();var Re=o[--i];-1==A(o[--i],Re)&&(o[i++]=L(e.x-1),o[i++]=L(e.y-1),(e.i+e.j)%2==0?o[i++]=e.algnpat0:o[i++]=e.algnpat1,e.putalgnpat())}}if(e.slave){o[i++]=1/0;for(var Pe=1;Pe<=19;Pe+=1)e.i=Pe,o[i++]=s([0,e.i]),o[i++]=s([1,e.i]);for(var Le=5;Le<=12;Le+=1)e.i=Le,o[i++]=s([2,e.i]),o[i++]=s([3,e.i]);e.metadatamap=s(),o[i++]=1/0;for(var Ue=5;Ue<=12;Ue+=1){o[i++]=Ue,o[i++]=1/0;var ze=o[--i],He=o[--i];o[i++]=ze,o[i++]=4,o[i++]=He;var $e=s();o[i++]=$e}for(var Qe=12;Qe>=5;Qe-=1){o[i++]=Qe,o[i++]=1/0;var Ve=o[--i],qe=o[--i];o[i++]=Ve,o[i++]=5,o[i++]=qe;var Ge=s();o[i++]=Ge}for(var We=5;We<=12;We+=1){o[i++]=We,o[i++]=1/0;var Ke=o[--i],Ye=o[--i];o[i++]=Ke,o[i++]=6,o[i++]=Ye;var Xe=s();o[i++]=Xe}for(var Je=12;Je>=5;Je-=1){o[i++]=Je,o[i++]=1/0;var Ze=o[--i],et=o[--i];o[i++]=Ze,o[i++]=7,o[i++]=et;var tt=s();o[i++]=tt}e.palettemap1=s(),o[i++]=1/0;for(var nt=e.palettemap1,rt=0,it=nt.length;rt<it;rt++){o[i++]=A(nt,rt),o[i++]=1/0;var ot=o[--i],at=o[--i];o[i++]=ot,_(at);var st=o[--i],ut=o[--i];o[i++]=-ut,o[i++]=-st;var ct=s();o[i++]=ct}e.palettemap2=s()}else{for(var lt=s([s([6,1]),s([6,2]),s([6,3]),s([6,4]),s([6,5]),s([6,6]),s([5,6]),s([4,6]),s([3,6]),s([2,6]),s([1,6]),s([7,1]),s([7,2]),s([7,3]),s([7,4]),s([7,5]),s([7,6]),s([7,7]),s([6,7]),s([5,7]),s([4,7]),s([3,7]),s([2,7]),s([1,7]),s([8,1]),s([8,2]),s([8,3]),s([8,4]),s([8,5]),s([8,6]),s([8,7]),s([8,8]),s([7,8]),s([6,8]),s([5,8]),s([4,8]),s([3,8]),s([2,8]),s([1,8]),s([9,1]),s([9,2]),s([9,3]),s([9,4]),s([9,5])]),ht=0,ft=lt.length;ht<ft;ht++)_(A(lt,ht)),e.y=o[--i],e.x=o[--i],o[i++]=s([e.x,e.y]),o[i++]=s([-e.x,e.y]),o[i++]=s([-e.x,-e.y]),o[i++]=s([e.x,-e.y]);O(s(176)),e.metadatamap=o[--i],e.palettemap1=s([s([4,1]),s([4,2]),s([5,1]),s([5,2]),s([2,4]),s([2,5]),s([1,4]),s([1,5]),s([-2,1]),s([-2,2]),s([-1,1]),s([-1,2]),s([-4,4]),s([-4,5]),s([-5,4]),s([-5,5])]),e.palettemap2=s([s([-4,-5]),s([-4,-4]),s([-5,-5]),s([-5,-4]),s([-2,-2]),s([-2,-1]),s([-1,-2]),s([-1,-1]),s([2,-5]),s([2,-4]),s([1,-5]),s([1,-4]),s([4,-2]),s([4,-1]),s([5,-2]),s([5,-1])])}for(var dt=e.metadatamap,pt=0,mt=dt.length;pt<mt;pt++){var gt=A(dt,pt),At=A(gt,0);if(o[i++]=gt,o[i++]=At,At<0){var bt=o[--i],yt=o[--i];v(yt,0,L(L(bt+e.cols)-1)),o[i++]=yt}else i--;var wt=o[--i],xt=A(wt,1);if(o[i++]=wt,o[i++]=xt,xt<0){var Ct=o[--i],kt=o[--i];v(kt,1,L(L(Ct+e.rows)-1)),o[i++]=kt}else i--;i--}for(var Et=e.palettemap1,St=0,_t=Et.length;St<_t;St++){var Ot=A(Et,St),Tt=A(Ot,0);if(o[i++]=Ot,o[i++]=Tt,Tt<0){var Dt=o[--i],Bt=o[--i];v(Bt,0,L(L(Dt+e.cols)-1)),o[i++]=Bt}else i--;var It=o[--i],Mt=A(It,1);if(o[i++]=It,o[i++]=Mt,Mt<0){var jt=o[--i],Nt=o[--i];v(Nt,1,L(L(jt+e.rows)-1)),o[i++]=Nt}else i--;i--}for(var Ft=e.palettemap2,Rt=0,Pt=Ft.length;Rt<Pt;Rt++){var Lt=A(Ft,Rt),Ut=A(Lt,0);if(o[i++]=Lt,o[i++]=Ut,Ut<0){var zt=o[--i],Ht=o[--i];v(Ht,0,L(L(zt+e.cols)-1)),o[i++]=Ht}else i--;var $t=o[--i],Qt=A($t,1);if(o[i++]=$t,o[i++]=Qt,Qt<0){var Vt=o[--i],qt=o[--i];v(qt,1,L(L(Vt+e.rows)-1)),o[i++]=qt}else i--;i--}for(var Gt=0,Wt=L(e.nummetamodules-1);Gt<=Wt;Gt+=1){o[i++]=e.pixs,_(A(e.metadatamap,Gt)),e.jmv();var Kt=o[--i];v(o[--i],Kt,0)}if(e.slave)e.i=0;else{var Yt=e.colors,Xt=16;if(16>Yt){ye=Yt;Yt=Xt,Xt=ye}for(var Jt=0,Zt=Xt-1;Jt<=Zt;Jt+=1){e.i=Jt;var en=A(e.palettelayout,e.i);o[i++]=en,o[i++]=e.pixs,o[i++]=en,_(A(e.palettemap1,e.i)),e.jmv();var tn=o[--i],nn=o[--i];v(o[--i],tn,nn);var rn=o[--i];o[i++]=e.pixs,o[i++]=rn,_(A(e.palettemap2,e.i)),e.jmv();var on=o[--i],an=o[--i];v(o[--i],on,an)}e.i=16}e.j=e.nummetamodules;for(var sn=e.i,un=e.palettelayout.length-1;sn<=un;sn+=2){e.i=sn;var cn=A(e.palettelayout,e.i);o[i++]=cn,o[i++]=e.pixs,o[i++]=cn,_(A(e.metadatamap,e.j)),e.jmv();var ln=o[--i],hn=o[--i];v(o[--i],ln,hn);var fn=o[--i];o[i++]=e.pixs,o[i++]=fn,_(A(e.metadatamap,L(e.j+2))),e.jmv();var dn=o[--i],pn=o[--i];v(o[--i],dn,pn);var mn=A(e.palettelayout,e.i+1);o[i++]=mn,o[i++]=e.pixs,o[i++]=mn,_(A(e.metadatamap,L(e.j+1))),e.jmv();var gn=o[--i],An=o[--i];v(o[--i],gn,An);var vn=o[--i];o[i++]=e.pixs,o[i++]=vn,_(A(e.metadatamap,L(e.j+3))),e.jmv();var bn=o[--i],yn=o[--i];v(o[--i],bn,yn),e.j=L(e.j+4)}var wn=s([function(){var t=o[--i],n=o[--i];o[i++]=L(n+t)%e.colors},function(){i--;var t=o[--i];o[i++]=t%e.colors},function(){var t=o[--i],n=o[--i];o[i++]=t,o[i++]=n,i--;var r=o[--i];o[i++]=r%e.colors},function(){var t=o[--i],n=o[--i];o[i++]=(~~(t/3)+~~(n/2))%e.colors},function(){var t=o[--i],n=o[--i];o[i++]=(~~(t/2)+~~(n/3))%e.colors},function(){var t=o[--i],n=L(o[--i]+t);o[i++]=(~~(n/2)+~~(n/3))%e.colors},function(){var t=o[--i],n=o[--i];o[i++]=L(t*(n*n)%7+2*L(t+n*n)%19)%e.colors},function(){var t=o[--i],n=o[--i];o[i++]=L(n*(t*t)%5+L(t*t+2*n)%13)%e.colors}]);e.maskfuncs=wn,-1!=e.mask&&(e.maskfuncs=s([A(e.maskfuncs,e.mask)]),e.bestmaskval=e.mask),e.masks=s(e.maskfuncs.length);for(var xn=0,Cn=e.masks.length-1;xn<=Cn;xn+=1){e.m=xn,e.mask=s(e.rows*e.cols);for(var kn=0,En=L(e.rows-1);kn<=En;kn+=1){e.j=kn;for(var Sn=0,_n=L(e.cols-1);Sn<=_n;Sn+=1){e.i=Sn,o[i++]=e.pixs,o[i++]=e.i,o[i++]=e.j,e.jmv();var On=o[--i];if(-1==A(o[--i],On)){if(o[i++]=e.i,o[i++]=e.j,!0===A(e.maskfuncs,e.m)())break}else o[i++]=0;o[i++]=e.mask,o[i++]=e.i,o[i++]=e.j,e.jmv();var Tn=o[--i];v(o[--i],Tn,o[--i])}}v(e.masks,e.m,e.mask)}for(e.posx=0,e.posy=0,e.i=0;e.posx!=e.cols;){o[i++]=e.pixs,o[i++]=e.posx,o[i++]=e.posy,e.jmv();var Dn=o[--i];if(-1==A(o[--i],Dn)){var Bn=b(e.bits,e.i,e.databpm);o[i++]=0;for(var In=0,Mn=Bn.length;In<Mn;In++){var jn=o[--i];o[i++]=2*L(jn+L(A(Bn,In)-48))}var Nn=o[--i];o[i++]=~~(Nn/2),o[i++]=e.pixs,o[i++]=e.posx,o[i++]=e.posy,e.jmv();var Fn=o[--i];v(o[--i],Fn,o[--i]),e.i=e.i+e.databpm}e.posy=e.posy+1,e.posy==e.rows&&(e.posy=0,e.posx=e.posx+1)}e.evalrle=function(){e.scrle=o[--i],e.scr1=0,e.scr3=0;for(var t=0,n=e.scrle.length-2;t<=n;t+=2)if(e.j=t,-1!=A(e.scrle,e.j+1)){var r=A(e.scrle,e.j);if(o[i++]=r,r>=5?e.scr1=L(L(o[--i]-2)+e.scr1):i--,e.j>=4&&e.j<=e.scrle.length-5){var a=b(e.scrle,e.j-4,10);o[i++]=a;for(var s=0,u=a.length;s<u;s++)o[i++]=1==A(a,s);i--;for(var c=0;c<4;c++){var l=o[--i],h=o[--i];o[i++]=l,o[i++]=h,i--;var f=o[--i],d=o[--i];o[i++]=N(d,f)}if(o[--i]){o[i++]=1/0;var p=o[--i],m=o[--i];o[i++]=p,_(m);var g=o[--i],v=o[--i],y=o[--i],w=o[--i],x=o[--i],C=o[--i],k=o[--i],S=o[--i],O=o[--i];if(o[i++]=O,o[i++]=S,o[i++]=k,o[i++]=C,o[i++]=x,o[i++]=w,o[i++]=y,o[i++]=v,o[i++]=g,T(O,x)&&T(O,g)&&T(k,y)){var D=o[--i],B=o[--i],I=o[--i];e.c4=I,e.c5=D,o[i++]=I,o[i++]=B,(e.c4==e.bi&&e.c5==e.yi||e.c4==e.yi&&e.c5==e.bi||e.c4==e.gi&&e.c5==e.mi||e.c4==e.mi&&e.c5==e.gi)&&(e.scr3=e.scr3+100)}E()}else i--}}o[i++]=e.scr1,o[i++]=e.scr3},e.evalmask=function(){e.sym=o[--i],e.n1=0,e.n2=0,e.n3=0;var t=e.rows,n=e.cols;if(t<n){var r=n;n=t,t=r}e.rle=s(L(2*t+2)),e.lastpairs=s(e.cols),e.thispairs=s(e.cols);for(var a=0,u=L(e.cols-1);a<=u;a+=1){e.i=a,o[i++]=1/0,o[i++]=0,o[i++]=-1;for(var c=e.i,l=e.cols,h=L(e.rows*e.cols-1);l<0?c>=h:c<=h;c+=l){var f=A(e.sym,c),d=o[--i];if(o[i++]=d,o[i++]=f,T(d,f)){i--;var p=o[--i],m=o[--i];o[i++]=L(m+1),o[i++]=p}else{var g=o[--i];o[i++]=1,o[i++]=g}}var v=S()+2;O(b(e.rle,0,v-2)),e.evalrle(),e.n3=L(o[--i]+e.n3),e.n1=L(o[--i]+e.n1),i--}for(var y=0,w=L(e.rows-1);y<=w;y+=1){e.i=y,e.symrow=b(e.sym,e.i*e.cols,e.cols),o[i++]=1/0;var x=e.symrow;o[i++]=0,o[i++]=-1;for(var C=0,k=x.length;C<k;C++){var B=A(x,C),I=o[--i];if(o[i++]=I,o[i++]=B,T(I,B)){i--;var M=o[--i],j=o[--i];o[i++]=L(j+1),o[i++]=M}else{var N=o[--i];o[i++]=1,o[i++]=N}}var F=S()+2;O(b(e.rle,0,F-2)),e.evalrle(),e.n3=L(o[--i]+e.n3),e.n1=L(o[--i]+e.n1),i--;var R=e.thispairs;e.thispairs=e.lastpairs,e.lastpairs=R;var P=e.symrow;o[i++]=-1;for(var U=0,z=P.length;U<z;U++){var H=A(P,U),$=o[--i];if(o[i++]=H,o[i++]=$,D(H,$)){i--;var Q=o[--i];o[i++]=-1,o[i++]=Q}}if(i--,O(e.thispairs),i--,e.i>0){o[i++]=1/0,_(e.lastpairs),_(e.thispairs),o[i++]=e.n2;for(var V=0,q=e.cols;V<q;V++){var G=o[--i],W=o[--i];if(o[i++]=G,o[i++]=W,-1!=W){var K=o[i-1-L(e.cols+1)];if(T(o[--i],K)){var Y=o[--i];o[i++]=L(Y+3)}}else i--}e.n2=o[--i],E()}}o[i++]=L(L(e.n1+e.n2)+e.n3)},e.bestscore=999999999;for(var Rn=0,Pn=e.masks.length-1;Rn<=Pn;Rn+=1){e.m=Rn,e.masksym=s(e.rows*e.cols);for(var Ln=0,Un=L(e.rows*e.cols-1);Ln<=Un;Ln+=1)e.i=Ln,v(e.masksym,e.i,R(A(e.pixs,e.i),A(A(e.masks,e.m),e.i)));1!=e.masks.length?(o[i++]=e.masksym,e.evalmask(),e.score=o[--i],e.score<e.bestscore&&(e.bestsym=e.masksym,e.bestmaskval=e.m,e.bestscore=e.score)):e.bestsym=e.masksym}if(e.pixs=e.bestsym,e.metamask=e.bestmaskval,e.addtometapart=function(){var t=o[--i];y(e.metapart,e.p,t),e.p=t.length+e.p},e.addtometabits=function(){var t=o[--i];y(e.metabits,e.q,t),e.q=t.length+e.q},e.metapart=c(40),e.metabits=c(e.nummetabits),e.p=0,e.q=0,e.slave){var zn=e.sameshape?0:1;o[i++]=zn,o[i++]=1,e.tofixedbits(),e.addtometapart();var Hn=e.sameecc?0:1;o[i++]=Hn,o[i++]=1,e.tofixedbits(),e.addtometapart();var $n=e.hasslaves?1:0;o[i++]=$n,o[i++]=1,e.tofixedbits(),e.addtometapart(),o[i++]=b(e.metapart,0,e.p),o[i++]=2,o[i++]=-1,e.ldpc(),e.addtometabits(),e.p=0,e.sameshape||(o[i++]=~~((e.diffside-17)/4)-1,o[i++]=5,e.tofixedbits(),e.addtometapart()),e.hasslaves&&(o[i++]=0,o[i++]=3,e.tofixedbits(),e.addtometapart()),o[i++]=b(e.metapart,0,e.p),o[i++]=2,o[i++]=-1,e.ldpc(),e.addtometabits(),e.p=0,e.sameecc||(o[i++]=e.datawc-3,o[i++]=~~(e.metaelen/2),e.tofixedbits(),e.addtometapart(),o[i++]=e.datawr-4,o[i++]=~~(e.metaelen/2),e.tofixedbits(),e.addtometapart()),o[i++]=b(e.metapart,0,e.p),o[i++]=2,o[i++]=-1,e.ldpc(),e.addtometabits(),e.p=0}else o[i++]=~~Math.round(Math.log(e.colors)/Math.log(2))-1,o[i++]=3,e.tofixedbits(),e.addtometapart(),o[i++]=b(e.metapart,0,e.p),o[i++]=2,o[i++]=-1,e.ldpc(),e.addtometabits(),e.p=0,o[i++]=e.metass,o[i++]=1,e.tofixedbits(),e.addtometapart(),o[i++]=e.metavf,o[i++]=2,e.tofixedbits(),e.addtometapart(),o[i++]=e.metamask,o[i++]=3,e.tofixedbits(),e.addtometapart(),e.hasslaves?o[i++]="1":o[i++]="0",e.addtometapart(),o[i++]=b(e.metapart,0,e.p),o[i++]=2,o[i++]=-1,e.ldpc(),e.addtometabits(),e.p=0,0==e.metass?(o[i++]=L(L(~~(L(e.cols-17)/4)-A(s([0,4,8,16]),e.metavf))-1),o[i++]=e.metavlen,e.tofixedbits(),e.addtometapart()):(o[i++]=~~(L(e.cols-17)/4)-1,o[i++]=~~(e.metavlen/2),e.tofixedbits(),e.addtometapart(),o[i++]=~~(L(e.rows-17)/4)-1,o[i++]=~~(e.metavlen/2),e.tofixedbits(),e.addtometapart()),o[i++]=e.datawc-3,o[i++]=~~(e.metaelen/2),e.tofixedbits(),e.addtometapart(),o[i++]=e.datawr-4,o[i++]=~~(e.metaelen/2),e.tofixedbits(),e.addtometapart(),e.hasslaves&&(o[i++]=0,o[i++]=4,e.tofixedbits(),e.addtometapart()),o[i++]=b(e.metapart,0,e.p),o[i++]=2,o[i++]=-1,e.ldpc(),e.addtometabits(),e.p=0;for(var Qn=e.q,Vn=L(e.nummetabits-1);Qn<=Vn;Qn+=1)v(e.metabits,Qn,48);if(e.i=0,e.j=0,!e.slave){for(var qn=b(e.metabits,e.i,6),Gn=0,Wn=qn.length;Gn<Wn;Gn++){o[i++]=A(qn,Gn),4==e.colors?o[i++]=s([e.bi,e.yi]):o[i++]=s([e.ki,e.wi]);var Kn=A(o[--i],L(o[--i]-48));o[i++]=Kn,o[i++]=e.pixs,_(A(e.metadatamap,e.j)),e.jmv();var Yn=o[--i];v(o[--i],Yn,o[--i]),e.j=e.j+1}e.i=e.i+6}for(var Xn=0,Jn=~~(L(e.nummetabits-e.i)/e.metabpm);Xn<Jn;Xn++){var Zn=b(e.metabits,e.i,e.metabpm);o[i++]=0;for(var er=0,tr=Zn.length;er<tr;er++){var nr=o[--i];o[i++]=2*L(nr+L(A(Zn,er)-48))}var rr=A(e.metacolorindex,~~(o[--i]/2));o[i++]=rr,o[i++]=e.pixs,_(A(e.metadatamap,e.j)),e.jmv();var ir=o[--i];v(o[--i],ir,o[--i]),e.i=L(e.i+e.metabpm),e.j=e.j+1}var or=new Map([["ren",Q],["pixs",e.pixs],["pixx",e.cols],["pixy",e.rows],["colormap",e.palette],["height",2*e.rows/72],["width",2*e.cols/72],["opt",e.options]]);o[i++]=or,e.dontdraw||Q()}function bt(){var e=Object.create(bt.$ctx||(bt.$ctx={}));for(e.parse=!1,e.dontlint=!1,e.lintreqs=!1,e.dontdraw=!1,e.ccversion="a",e.cccolumns=-1,e.lintype="",e.linwidth=-1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],-1==e.cccolumns&&(o[i++]=1/0,o[i++]="ean13",o[i++]=4,o[i++]="upca",o[i++]=4,o[i++]="ean8",o[i++]=3,o[i++]="upce",o[i++]=2,o[i++]="gs1-128",D(e.ccversion,"c")?o[i++]=4:o[i++]=~~((e.linwidth-52)/17),o[i++]="databaromni",o[i++]=4,o[i++]="databarstacked",o[i++]=2,o[i++]="databarstackedomni",o[i++]=2,o[i++]="databartruncated",o[i++]=4,o[i++]="databarlimited",o[i++]=3,o[i++]="databarexpanded",o[i++]=4,o[i++]="databarexpandedstacked",o[i++]=4,e.cccolumns=A(u(),e.lintype)),o[i++]=e.barcode,o[i++]="ai",$(),e.fncs=o[--i],e.vals=o[--i],e.ais=o[--i],e.isupper=function(){var e=o[--i];o[i++]=e>=65&&e<=90},e.isnum0=function(){var e=o[--i];o[i++]=e>=48&&e<=57},e.isnum1=function(){var e=o[--i];o[i++]=e>=49&&e<=57};;){if(e.ais.length>=1&&(T(A(e.ais,0),"10")||T(A(e.ais,0),"11")||T(A(e.ais,0),"17"))){o[i++]=-1,o[i++]="10";break}if(e.ais.length>=1&&T(A(e.ais,0),"90")){if(e.v=A(e.vals,0),e.v.length>=1&&(o[i++]=A(e.v,0),e.isupper(),o[--i])){o[i++]=0,o[i++]="11";break}if(e.v.length>=2){o[i++]=A(e.v,0),e.isnum1(),o[i++]=A(e.v,1),e.isupper();var t=o[--i];if(o[--i]&&t){o[i++]=1,o[i++]="11";break}}if(e.v.length>=3){o[i++]=A(e.v,0),e.isnum1(),o[i++]=A(e.v,1),e.isnum0();var n=o[--i],r=o[--i];o[i++]=N(r,n),o[i++]=A(e.v,2),e.isupper();var a=o[--i];if(o[--i]&&a){o[i++]=2,o[i++]="11";break}}if(e.v.length>=4){o[i++]=A(e.v,0),e.isnum1(),o[i++]=A(e.v,1),e.isnum0();var l=o[--i],h=o[--i];o[i++]=N(h,l),o[i++]=A(e.v,2),e.isnum0();var d=o[--i],g=o[--i];o[i++]=N(g,d),o[i++]=A(e.v,3),e.isupper();var w=o[--i];if(o[--i]&&w){o[i++]=3,o[i++]="11";break}}}o[i++]=-1,o[i++]="0";break}if(e.method=o[--i],e.npre=o[--i],e.tobin=function(){var e=c(o[--i]);o[i++]=e;for(var t=0,n=e.length-1;t<=n;t+=1){var r=o[--i];v(r,t,48),o[i++]=r}var a=o[--i],s=m(c(a.length),o[--i],2);y(a,a.length-s.length,s),o[i++]=a},bt.$ctx._26742||function(){var t=Object.create(e);t.fnc1=-1,t.lnumeric=-2,t.lalphanumeric=-3,t.liso646=-4,o[i++]=1/0;for(var n=65;n<=90;n+=1)o[i++]=n,o[i++]=n-65,o[i++]=5,t.tobin();for(var r=48;r<=57;r+=1)o[i++]=r,o[i++]=r+4,o[i++]=6,t.tobin();o[i++]=t.fnc1,o[i++]="11111",t.alpha=u(),o[i++]=1/0;for(var a=0;a<=119;a+=1){var s=f(c(2),"00"),l=m(c(2),a,11);if(y(s,2-l.length,l),o[i++]=a,o[i++]=s,65==A(s,0)){var h=o[--i];v(h,0,94),o[i++]=h}var d=o[--i];if(o[i++]=d,65==A(d,1)){var p=o[--i];v(p,1,94),o[i++]=p}var g=o[--i],b=f(c(7),"0000000"),w=m(c(7),L(o[--i]+8),2);y(b,7-w.length,w),o[i++]=g,o[i++]=b}o[i++]=t.lalphanumeric,o[i++]="0000",t.numeric=u(),o[i++]=1/0;for(var x=48;x<=57;x+=1)o[i++]=x,o[i++]=x-43,o[i++]=5,t.tobin();o[i++]=t.fnc1,o[i++]="01111";for(var C=65;C<=90;C+=1)o[i++]=C,o[i++]=C-33,o[i++]=6,t.tobin();o[i++]=42,o[i++]="111010";for(var k=44;k<=47;k+=1)o[i++]=k,o[i++]=k+15,o[i++]=6,t.tobin();o[i++]=t.lnumeric,o[i++]="000",o[i++]=t.liso646,o[i++]="00100",t.alphanumeric=u(),o[i++]=1/0;for(var E=48;E<=57;E+=1)o[i++]=E,o[i++]=E-43,o[i++]=5,t.tobin();o[i++]=t.fnc1,o[i++]="01111";for(var S=65;S<=90;S+=1)o[i++]=S,o[i++]=S-1,o[i++]=7,t.tobin();for(var _=97;_<=122;_+=1)o[i++]=_,o[i++]=_-7,o[i++]=7,t.tobin();o[i++]=33,o[i++]="11101000",o[i++]=34,o[i++]="11101001";for(var O=37;O<=47;O+=1)o[i++]=O,o[i++]=O+197,o[i++]=8,t.tobin();for(var T=58;T<=63;T+=1)o[i++]=T,o[i++]=T+187,o[i++]=8,t.tobin();for(var D in o[i++]=95,o[i++]="11111011",o[i++]=32,o[i++]="11111100",o[i++]=t.lnumeric,o[i++]="000",o[i++]=t.lalphanumeric,o[i++]="00100",t.iso646=u(),t)t.hasOwnProperty(D)&&(bt.$ctx[D]=t[D]);bt.$ctx._26742=1}(),T(e.method,"10")){if(T(A(e.ais,0),"11")||T(A(e.ais,0),"17")){var x=A(e.vals,0),E=f(c(16),"0000000000000000"),S=m(c(16),384*p(b(x,0,2))+(32*(p(b(x,2,2))-1)+p(b(x,4,2))),2);y(E,16-S.length,S),o[i++]=E,o[i++]=1/0;var O=o[--i],B=o[--i];o[i++]=O,o[i++]=1,o[i++]=0,k(B,(function(){var e=o[--i];o[i++]=L(e-48)}));var I=T(A(e.ais,0),"11")?0:1;o[i++]=I,e.cdf=s(),e.ais=b(e.ais,1,e.ais.length-1),e.vals=b(e.vals,1,e.vals.length-1),e.fncs=b(e.fncs,1,e.fncs.length-1)}else e.cdf=s([1,0,1,1]);0!=e.ais.length?T(A(e.ais,0),"10")?(o[i++]=1/0,k(A(e.vals,0)),e.gpf=s(),e.ais.length>1&&(o[i++]=1/0,_(e.gpf),o[i++]=e.fnc1,e.gpf=s()),e.ais=b(e.ais,1,e.ais.length-1),e.vals=b(e.vals,1,e.vals.length-1),e.fncs=b(e.fncs,1,e.fncs.length-1)):e.gpf=s([e.fnc1]):(o[i++]=1/0,_(e.cdf),o[i++]=0,o[i++]=0,o[i++]=0,o[i++]=0,o[i++]=0,o[i++]=1,o[i++]=1,o[i++]=1,o[i++]=1,e.cdf=s(),e.gpf=s([])),e.mode="numeric"}if(T(e.method,"11")){e.cdf=s([1,1]),e.ai90=A(e.vals,0),L(e.npre+1)!=e.ai90.length?o[i++]=b(e.ai90,L(e.npre+1),L(L(e.ai90.length-e.npre)-1)):o[i++]="",e.ai90rem=o[--i],o[i++]="nalpha",o[i++]=0,k(e.ai90rem,(function(){var e=o[--i];if(e>=65&&e<=90){var t=o[--i];o[i++]=L(t+1)}}));var F=o[--i];e[o[--i]]=F,o[i++]="nnums",o[i++]=0,k(e.ai90rem,(function(){var e=o[--i];if(e>=48&&e<=57){var t=o[--i];o[i++]=L(t+1)}}));var R=o[--i];e[o[--i]]=R,o[i++]="mode",M(e.nalpha,e.nnums)?o[i++]="alpha":0==e.nalpha?o[i++]="numeric":o[i++]="alphanumeric";var P=o[--i];e[o[--i]]=P,L(e.nalpha+e.nnums)!=e.ai90rem.length&&(e.mode="alphanumeric"),o[i++]=1/0,_(e.cdf),T(e.mode,"alphanumeric")&&(o[i++]=0),T(e.mode,"numeric")&&(o[i++]=1,o[i++]=0),T(e.mode,"alpha")&&(o[i++]=1,o[i++]=1),e.cdf=s(),o[i++]="ais1",e.ais.length>1?o[i++]=A(e.ais,1):o[i++]=-1;var z=o[--i];e[o[--i]]=z,o[i++]="vals1",e.vals.length>1?o[i++]=A(e.vals,1):o[i++]=-1;var H=o[--i];e[o[--i]]=H,T(e.ais1,"21")||T(e.ais1,"8004")?(o[i++]=1/0,_(e.cdf),T(e.ais1,"21")?(o[i++]=1,o[i++]=0):(o[i++]=1,o[i++]=1),e.cdf=s()):(o[i++]=1/0,_(e.cdf),o[i++]=0,e.cdf=s()),o[i++]="nval",0!=e.npre?o[i++]=p(b(e.ai90,0,e.npre)):o[i++]=0;var V=o[--i];if(e[o[--i]]=V,C("BDHIJKLNPQRSTVXZ",b(e.ai90,e.npre,1)),o[--i]){var q=o[--i],G=o[--i];o[i++]=q.length,o[i++]=G,i--;var W=o[--i],K=o[--i];o[i++]=W,o[i++]=K,i--,e.aval=o[--i]}else i--,e.aval=-1;if(e.nval<31&&-1!=e.aval){var Y=f(c(5),"00000"),X=m(c(5),e.nval,2);y(Y,5-X.length,X),o[i++]=Y,o[i++]=1/0;var J=o[--i],Z=o[--i];o[i++]=J,k(Z,(function(){var e=o[--i];o[i++]=L(e-48)})),e.nbits=s();var ee=f(c(4),"0000"),te=m(c(4),e.aval,2);y(ee,4-te.length,te),o[i++]=ee,o[i++]=1/0;var ne=o[--i],re=o[--i];o[i++]=ne,k(re,(function(){var e=o[--i];o[i++]=L(e-48)})),e.abits=s(),o[i++]=1/0,_(e.cdf),_(e.nbits),_(e.abits),e.cdf=s()}else{var ie=f(c(10),"0000000000"),oe=m(c(10),e.nval,2);y(ie,10-oe.length,oe),o[i++]=ie,o[i++]=1/0;var ae=o[--i],se=o[--i];o[i++]=ae,k(se,(function(){var e=o[--i];o[i++]=L(e-48)})),e.nbits=s();var ue=f(c(5),"00000"),ce=m(c(5),L(A(e.ai90,e.npre)-65),2);y(ue,5-ce.length,ce),o[i++]=ue,o[i++]=1/0;var le=o[--i],he=o[--i];o[i++]=le,k(he,(function(){var e=o[--i];o[i++]=L(e-48)})),e.abits=s(),o[i++]=1/0,_(e.cdf),o[i++]=1,o[i++]=1,o[i++]=1,o[i++]=1,o[i++]=1,_(e.nbits),_(e.abits),e.cdf=s()}if(D(e.mode,"alpha"))o[i++]=1/0,k(e.ai90rem),e.ais.length>1&&(o[i++]=e.fnc1),e.gpf=s();else{o[i++]=1/0,k(e.ai90rem),e.ais.length>1&&(o[i++]=e.fnc1),e.in=s(),e.out=s(6*e.in.length),e.j=0;for(var fe=0,de=e.in.length-1;fe<=de;fe+=1){var pe=A(e.alpha,A(e.in,fe));o[i++]=pe,o[i++]=pe,o[i++]=1/0;var me=o[--i],ge=o[--i];o[i++]=me,k(ge,(function(){var e=o[--i];o[i++]=L(e-48)})),y(e.out,e.j,s()),e.j=o[--i].length+e.j}o[i++]=1/0,_(e.cdf),_(b(e.out,0,e.j)),e.cdf=s(),e.gpf=s([]),e.ais.length>1&&(e.mode="numeric")}e.ais=b(e.ais,1,e.ais.length-1),e.vals=b(e.vals,1,e.vals.length-1),e.fncs=b(e.fncs,1,e.fncs.length-1),0!=e.ais.length&&(T(e.ais1,"21")||T(e.ais1,"8004"))&&(o[i++]=1/0,_(e.gpf),k(e.vals1),e.gpf=s(),e.ais=b(e.ais,1,e.ais.length-1),e.vals=b(e.vals,1,e.vals.length-1),e.fncs=b(e.fncs,1,e.fncs.length-1),0!=e.ais.length&&(o[i++]=1/0,_(e.gpf),o[i++]=e.fnc1,e.gpf=s()))}T(e.method,"0")&&(e.cdf=s([0]),e.gpf=s([]),e.mode="numeric");for(var Ae=0,ve=e.ais.length-1;Ae<=ve;Ae+=1){e.i=Ae,e.ai=A(e.ais,e.i),e.val=A(e.vals,e.i);var be=s(e.gpf.length+e.ai.length+e.val.length);y(be,0,e.gpf),o[i++]=be,o[i++]=be,o[i++]=e.gpf.length,o[i++]=e.ai,o[i++]=1/0;var ye=o[--i],we=o[--i];o[i++]=ye,k(we);var xe=s(),Ce=o[--i];y(o[--i],Ce,xe);var ke=o[--i];o[i++]=ke,o[i++]=ke,o[i++]=e.gpf.length+e.ai.length,o[i++]=e.val,o[i++]=1/0;var Ee=o[--i],Se=o[--i];o[i++]=Ee,k(Se);var _e=s(),Oe=o[--i];if(y(o[--i],Oe,_e),e.gpf=o[--i],e.i!=e.ais.length-1&&A(e.fncs,e.i)){var Te=s(e.gpf.length+1);y(Te,0,e.gpf),v(Te,e.gpf.length,e.fnc1),e.gpf=Te}}bt.$ctx._26911||function(){var t=Object.create(e),n=new Map([["a",s([s([167,138,118,108,88,78,59]),s([167,138,118,98,78]),s([197,167,138,108,78])])],["b",s([s([336,296,256,208,160,104,56]),s([768,648,536,416,304,208,152,112,72,32]),s([1184,1016,840,672,496,352,264,208,152,96,56])])]]);for(var r in t.bitcapsmaps=n,t)t.hasOwnProperty(r)&&(bt.$ctx[r]=t[r]);bt.$ctx._26911=1}(),e.rembits=function(){if(e.used=o[--i],D(e.ccversion,"c")){e.bitcaps=A(A(e.bitcapsmaps,e.ccversion),L(e.cccolumns-2)),o[i++]=-1,k(e.bitcaps,(function(){var t=o[--i];if(o[i++]=t,j(t,e.used)){var n=o[--i],r=o[--i];o[i++]=n,o[i++]=r}i--}));var t=o[--i];if(o[i++]=t,-1!=t){var n=o[--i];o[i++]=L(n-e.used)}}else{A(new Map([["c",-1]]),e.ccversion);var r=~~Math.ceil(e.used/8);for(e.m=5*~~(r/6)+r%6,e.m<=40&&(o[i++]=8),e.m>=41&&e.m<=160&&(o[i++]=16),e.m>=161&&e.m<=320&&(o[i++]=32),e.m>=321&&e.m<=833&&(o[i++]=64),e.m>=834&&(o[i++]=32),e.eccws=o[--i],e.m=L(L(e.m+e.eccws)+3),e.cccolumns>30&&(e.cccolumns=30);!(~~Math.ceil(e.m/e.cccolumns)<=30||e.cccolumns>=30);)e.cccolumns=e.cccolumns+1;e.r=~~Math.ceil(e.m/e.cccolumns),e.r<3&&(e.r=3);var a=L(L(e.cccolumns*e.r-e.eccws)-3);e.tgt=8*L(6*~~(a/5)+a%5),e.used<=8304?o[i++]=L(e.tgt-e.used):o[i++]=-1}var s=o[--i];o[i++]=s,-1==s&&(i--,T(e.ccversion,"a")?e.ccversion="b":T(e.ccversion,"b")&&T(e.lintype,"gs1-128")?(e.ccversion="c",e.cccolumns=~~((e.linwidth-52)/17)):e.ccversion=-1,o[i++]=e.used,e.rembits())},e.encode=function(){var t=o[--i];if(o[i++]=t,D(t,"raw")){var n=A(o[--i],o[--i]);o[i++]=n}else i--;o[i++]=1/0;var r=o[--i],a=o[--i];o[i++]=r,k(a,(function(){var e=o[--i];o[i++]=L(e-48)}));var u=s();y(e.gpfenc,e.j,u),e.j=u.length+e.j},o[i++]=1/0;for(var De=0,Be=e.gpf.length;De<Be;De++)o[i++]=0;o[i++]=0,o[i++]=-1,e.numericruns=s(),o[i++]=1/0;for(var Ie=0,Me=e.gpf.length;Ie<Me;Ie++)o[i++]=0;o[i++]=0,e.alphanumericruns=s(),o[i++]=1/0;for(var je=0,Ne=e.gpf.length;je<Ne;je++)o[i++]=0;o[i++]=9999,e.nextiso646only=s();for(var Fe=e.gpf.length-1;Fe>=0;Fe-=1){e.i=Fe;var Re=f(c(2),"00"),Pe=A(e.gpf,e.i);o[i++]=A(e.gpf,e.i),o[i++]=Re,o[i++]=Re,o[i++]=0,o[i++]=Pe,Pe==e.fnc1&&(i--,o[i++]=94);var Le=o[--i],Ue=o[--i];if(v(o[--i],Ue,Le),e.i<e.gpf.length-1){var ze=o[--i],He=A(e.gpf,e.i+1);o[i++]=ze,o[i++]=ze,o[i++]=1,o[i++]=He,He==e.fnc1&&(i--,o[i++]=94);var $e=o[--i],Qe=o[--i];v(o[--i],Qe,$e)}var Ve=void 0!==A(e.numeric,o[--i]);v(e.numericruns,e.i,Ve?L(A(e.numericruns,e.i+2)+2):0);var qe=o[--i],Ge=void 0!==A(e.alphanumeric,qe);o[i++]=qe,v(e.alphanumericruns,e.i,Ge?L(A(e.alphanumericruns,e.i+1)+1):0);var We=o[--i],Ke=void 0!==A(e.iso646,We),Ye=void 0!==A(e.alphanumeric,We);v(e.nextiso646only,e.i,Ke&&!Ye?0:L(A(e.nextiso646only,e.i+1)+1))}for(e.gpfenc=s(8304),e.i=0,e.j=0;e.i!=e.gpf.length;)for(;;){if(T(e.mode,"numeric")){if(e.i<=e.gpf.length-2){var Xe=c(2),Je=A(e.gpf,e.i);o[i++]=Xe,o[i++]=Xe,o[i++]=0,o[i++]=Je,Je==e.fnc1&&(i--,o[i++]=94);var et=o[--i],nt=o[--i];v(o[--i],nt,et);var rt=o[--i],it=A(e.gpf,e.i+1);o[i++]=rt,o[i++]=rt,o[i++]=1,o[i++]=it,it==e.fnc1&&(i--,o[i++]=94);var ot=o[--i],at=o[--i];v(o[--i],at,ot);var st=o[--i],ut=void 0!==A(e.numeric,st);if(o[i++]=st,ut){o[i++]=e.numeric,e.encode(),e.i=e.i+2;break}i--,o[i++]=e.lalphanumeric,o[i++]=e.numeric,e.encode(),e.mode="alphanumeric";break}var ct=A(e.gpf,e.i);if(ct<48||ct>57){o[i++]=e.lalphanumeric,o[i++]=e.numeric,e.encode(),e.mode="alphanumeric";break}o[i++]="rem",o[i++]=e.cdf.length+e.j,e.rembits();var lt=o[--i];if(e[o[--i]]=lt,e.rem>=4&&e.rem<=6){var ht=b(f(c(6),"000000"),0,e.rem),ft=m(c(4),L(A(e.gpf,e.i)-47),2);y(ht,4-ft.length,ft),o[i++]=ht,o[i++]="raw",e.encode(),e.i=e.i+1;break}var dt=c(2);v(dt,0,A(e.gpf,e.i)),v(dt,1,94),o[i++]=dt,o[i++]=e.numeric,e.encode(),e.i=e.i+1;break}if(T(e.mode,"alphanumeric")){if(A(e.gpf,e.i)==e.fnc1){o[i++]=e.fnc1,o[i++]=e.alphanumeric,e.encode(),e.mode="numeric",e.i=e.i+1;break}var pt=A(e.gpf,e.i),mt=void 0!==A(e.iso646,pt),gt=void 0!==A(e.alphanumeric,pt);if(mt&&!gt){o[i++]=e.liso646,o[i++]=e.alphanumeric,e.encode(),e.mode="iso646";break}if(A(e.numericruns,e.i)>=6){o[i++]=e.lnumeric,o[i++]=e.alphanumeric,e.encode(),e.mode="numeric";break}var At=A(e.numericruns,e.i);if(At>=4&&L(At+e.i)==e.gpf.length){o[i++]=e.lnumeric,o[i++]=e.alphanumeric,e.encode(),e.mode="numeric";break}o[i++]=A(e.gpf,e.i),o[i++]=e.alphanumeric,e.encode(),e.i=e.i+1;break}if(T(e.mode,"iso646")){if(A(e.gpf,e.i)==e.fnc1){o[i++]=e.fnc1,o[i++]=e.iso646,e.encode(),e.mode="numeric",e.i=e.i+1;break}if(A(e.numericruns,e.i)>=4&&A(e.nextiso646only,e.i)>=10){o[i++]=e.lnumeric,o[i++]=e.iso646,e.encode(),e.mode="numeric";break}if(A(e.alphanumericruns,e.i)>=5&&A(e.nextiso646only,e.i)>=10){o[i++]=e.lalphanumeric,o[i++]=e.iso646,e.encode(),e.mode="alphanumeric";break}o[i++]=A(e.gpf,e.i),o[i++]=e.iso646,e.encode(),e.i=e.i+1;break}}e.gpf=b(e.gpfenc,0,e.j),o[i++]="pad",o[i++]=e.cdf.length+e.gpf.length,e.rembits();var vt=s(o[--i]);if(e[o[--i]]=vt,e.pad.length>0){for(var yt=0,wt=e.pad.length-1;yt<=wt;yt+=5){e.i=yt;var xt=e.pad,Ct=e.i,kt=s([0,0,1,0,0]),Et=e.pad,St=e.i,_t=5,Ot=Et.length-St;if(Et.length-St>5){var Tt=_t;_t=Ot,Ot=Tt}y(xt,Ct,b(kt,0,Ot))}T(e.mode,"numeric")&&(o[i++]=1/0,o[i++]=0,o[i++]=0,o[i++]=0,o[i++]=0,_(e.pad),e.pad=b(s(),0,e.pad.length)),T(e.mode,"alpha")&&(o[i++]=1/0,o[i++]=1,o[i++]=1,o[i++]=1,o[i++]=1,o[i++]=1,o[i++]=0,o[i++]=0,o[i++]=0,o[i++]=0,_(e.pad),e.pad=b(s(),0,e.pad.length))}if(o[i++]=1/0,_(e.cdf),_(e.gpf),_(e.pad),e.bits=s(),bt.$ctx._27122||function(){var t=Object.create(e);o[i++]=1/0,o[i++]=s([0,0,0,0,0,0,1]);for(var n=0;n<68;n++)o[i++]=s(7);t.pwr928=s();for(var r=1;r<=68;r+=1){t.j=r,t.v=0;for(var a=6;a>=1;a-=1)t.i=a,t.v=L(2*A(A(t.pwr928,t.j-1),t.i)+~~(t.v/928)),v(A(t.pwr928,t.j),t.i,t.v%928);v(A(t.pwr928,t.j),0,L(2*A(A(t.pwr928,t.j-1),0)+~~(t.v/928)))}for(var u in t)t.hasOwnProperty(u)&&(bt.$ctx[u]=t[u]);bt.$ctx._27122=1}(),"a"==e.ccversion){o[i++]=1/0;for(var Dt=0;Dt<28;Dt++)o[i++]=0;for(e.cws=s(),e.b=0,e.c=0;e.b!=e.bits.length;){var Bt=e.bits,It=e.b,Mt=e.bits,jt=e.b,Nt=Mt.length-jt,Ft=69;if(69>Mt.length-jt){Tt=Nt;Nt=Ft,Ft=Tt}e.bs=b(Bt,It,Ft),e.bsl=e.bs.length,e.cs=b(e.cws,e.c,1+~~(e.bsl/10)),e.csl=e.cs.length;for(var Rt=0,Pt=e.bsl-1;Rt<=Pt;Rt+=1){e.i=Rt;for(var Lt=0,Ut=e.csl-1;Lt<=Ut;Lt+=1){e.j=Lt;var zt=e.cs,Ht=e.j;v(zt,Ht,L(A(zt,Ht)+A(A(e.pwr928,e.i),e.j+7-e.csl)*A(e.bs,e.bsl-e.i-1)))}}for(var $t=e.csl-1;$t>=1;$t-=1){e.i=$t;var Qt=e.cs,Vt=e.i;v(Qt,Vt-1,L(A(Qt,Vt-1)+~~(A(e.cs,e.i)/928)));var qt=e.cs,Gt=e.i;v(qt,Gt,A(qt,Gt)%928)}e.b=e.b+e.bsl,e.c=e.c+e.csl}e.cws=b(e.cws,0,e.c),e.barcode=c(4*e.cws.length);for(var Wt=0,Kt=e.cws.length-1;Wt<=Kt;Wt+=1){e.i=Wt;var Yt=f(c(4),"^   "),Xt=m(c(4),A(e.cws,e.i),10);y(Yt,4-Xt.length,Xt),y(e.barcode,4*e.i,Yt)}delete e.options.parse,v(e.options,"dontdraw",!0),v(e.options,"cca",!0),v(e.options,"columns",e.cccolumns),o[i++]="args",o[i++]=e.barcode,o[i++]=e.options,tt();var Jt=o[--i];e[o[--i]]=Jt}if("b"==e.ccversion){e.barcode=c(~~(e.bits.length/8));for(var Zt=0,en=e.barcode.length-1;Zt<=en;Zt+=1){e.i=Zt;var tn=b(e.bits,8*e.i,8);o[i++]=0;for(var nn=0,rn=tn.length;nn<rn;nn++){var on=o[--i];o[i++]=2*L(on+A(tn,nn))}v(e.barcode,e.i,~~(o[--i]/2))}delete e.options.parse,v(e.options,"dontdraw",!0),v(e.options,"ccb",!0),v(e.options,"columns",e.cccolumns),o[i++]="args",o[i++]=e.barcode,o[i++]=e.options,tt();var an=o[--i];e[o[--i]]=an}if("c"==e.ccversion){e.barcode=c(~~(e.bits.length/8));for(var sn=0,un=e.barcode.length-1;sn<=un;sn+=1){e.i=sn;var cn=b(e.bits,8*e.i,8);o[i++]=0;for(var ln=0,hn=cn.length;ln<hn;ln++){var fn=o[--i];o[i++]=2*L(fn+A(cn,ln))}v(e.barcode,e.i,~~(o[--i]/2))}delete e.options.parse,v(e.options,"dontdraw",!0),v(e.options,"ccc",!0),v(e.options,"columns",e.cccolumns),v(e.options,"eclevel",~~(Math.log(e.eccws)/Math.log(2))-1),o[i++]="args",o[i++]=e.barcode,o[i++]=e.options,Ze();var dn=o[--i];e[o[--i]]=dn}o[i++]=e.args,e.dontdraw||Q()}function yt(){var e=Object.create(yt.$ctx||(yt.$ctx={}));e.dontdraw=!1,e.usematrix=!1,e.parse=!1,e.dontlint=!1,e.lintreqs=!0,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],e.dontdraw&&(e.usematrix=!0),C(e.barcode,"|"),o[--i]?(e.linear=o[--i],i--,e.comp=o[--i]):(i--,o[i++]="bwipp.missingCompositeComponent#27252",o[i++]="A Composite Component must be provided following a pipe character",z()),v(e.options,"lintype","ean13"),v(e.options,"inkspread","0"),v(e.options,"dontdraw",!0),v(e.options,"dontlint",!0);var t=c(e.comp.length+18);if(y(t,0,"(01)00000000000000"),y(t,18,e.comp),o[i++]=t,o[i++]="ai",$(),i-=3,o[i++]=e.linear,o[i++]=e.options,G(),e.usematrix){e.linsym=o[--i],e.sbs=A(e.linsym,"sbs"),e.bhs=A(e.linsym,"bhs"),e.bbs=A(e.linsym,"bbs"),o[i++]="linwidth",o[i++]=0,k(e.sbs,(function(){var e=o[--i],t=o[--i];o[i++]=L(t+p(e))}));var n=o[--i];e[o[--i]]=n,o[i++]="compsym",o[i++]=e.comp,o[i++]=e.options,bt();var a=o[--i];e[o[--i]]=a,e.ccpixs=A(e.compsym,"pixs"),e.ccpixx=A(e.compsym,"pixx"),o[i++]=1/0;for(var l=0,h=L(e.ccpixx-97);l<h;l++)o[i++]=0;if(e.linpad=s(),e.diff=L(L(L(e.linwidth+e.linpad.length)+2)-e.ccpixx),e.diff>0){o[i++]=1/0;for(var f=0,d=e.diff;f<d;f++)o[i++]=0;e.ccrpad=s(),e.pixx=L(e.ccpixx+e.diff)}else e.ccrpad=s(0),e.pixx=e.ccpixx;o[i++]=1/0;for(var m=0,g=e.ccpixx,w=e.ccpixs.length-1;g<0?m>=w:m<=w;m+=g){e.i=m;for(var x=0;x<2;x++)_(b(e.ccpixs,e.i,e.ccpixx)),_(e.ccrpad)}for(var E=0;E<2;E++){_(e.linpad),o[i++]=0,o[i++]=1;for(var S=0;S<93;S++)o[i++]=0;o[i++]=1,o[i++]=0,_(e.ccrpad)}for(var O=0;O<2;O++){_(e.linpad),o[i++]=1,o[i++]=0;for(var T=0;T<93;T++)o[i++]=0;o[i++]=0,o[i++]=1,_(e.ccrpad)}for(var D=0;D<2;D++){_(e.linpad),o[i++]=0,o[i++]=1;for(var B=0;B<93;B++)o[i++]=0;o[i++]=1,o[i++]=0,_(e.ccrpad)}for(var I=71;I>=0;I-=1){e.y=I,_(e.linpad),o[i++]=0;for(var M=0,j=e.sbs.length-1;M<=j;M+=1)if(e.i=M,e.i%2==0){var N=72*A(e.bbs,~~(e.i/2));if(N>e.y||L(N+72*A(e.bhs,~~(e.i/2)))<e.y)for(var F=0,R=p(A(e.sbs,e.i));F<R;F++)o[i++]=0;else for(var P=0,H=p(A(e.sbs,e.i));P<H;P++)o[i++]=1}else for(var V=0,q=p(A(e.sbs,e.i));V<q;V++)o[i++]=0;o[i++]=0}e.pixs=s(),e.pixy=~~(e.pixs.length/e.pixx);var W=new Map([["ren",Q],["pixs",e.pixs],["pixx",e.pixx],["pixy",e.pixy],["height",e.pixy/72],["width",e.pixx/72],["opt",e.options]]);o[i++]=W,e.dontdraw||(r.save(),Q(),r.restore())}else{r.save(),Wt(),r.rmoveto(-1,72),o[i++]=1/0,o[i++]=1/0,o[i++]=0,o[i++]=1;for(var K=0;K<93;K++)o[i++]=0;o[i++]=1,o[i++]=0,o[i++]=1,o[i++]=0;for(var Y=0;Y<93;Y++)o[i++]=0;o[i++]=0,o[i++]=1,o[i++]=0,o[i++]=1;for(var X=0;X<93;X++)o[i++]=0;o[i++]=1,o[i++]=0;var J=s();o[i++]="ren",o[i++]=Q,o[i++]="pixs",o[i++]=J,o[i++]="pixx",o[i++]=97,o[i++]="pixy",o[i++]=3,o[i++]="height",o[i++]=6/72,o[i++]="width",o[i++]=97/72,o[i++]="opt",o[i++]=e.options;var Z=u();o[i++]=Z,Q(),r.rmoveto(-2,6),o[i++]=e.comp,o[i++]=e.options,bt(),Q(),r.restore()}}function wt(){var e=Object.create(wt.$ctx||(wt.$ctx={}));e.dontdraw=!1,e.usematrix=!1,e.parse=!1,e.dontlint=!1,e.lintreqs=!0,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],e.dontdraw&&(e.usematrix=!0),C(e.barcode,"|"),o[--i]?(e.linear=o[--i],i--,e.comp=o[--i]):(i--,o[i++]="bwipp.missingCompositeComponent#27413",o[i++]="A Composite Component must be provided following a pipe character",z()),v(e.options,"lintype","ean8"),v(e.options,"inkspread","0"),v(e.options,"dontdraw",!0),v(e.options,"dontlint",!0);var t=c(e.comp.length+18);if(y(t,0,"(01)00000000000000"),y(t,18,e.comp),o[i++]=t,o[i++]="ai",$(),i-=3,o[i++]=e.linear,o[i++]=e.options,W(),e.usematrix){e.linsym=o[--i],e.sbs=A(e.linsym,"sbs"),e.bhs=A(e.linsym,"bhs"),e.bbs=A(e.linsym,"bbs"),o[i++]="linwidth",o[i++]=0,k(e.sbs,(function(){var e=o[--i],t=o[--i];o[i++]=L(t+p(e))}));var n=o[--i];e[o[--i]]=n;var a=e.comp;o[i++]="compsym",o[i++]=a,o[i++]=e.options,bt();var l=o[--i];e[o[--i]]=l,e.ccpixs=A(e.compsym,"pixs"),e.ccpixx=A(e.compsym,"pixx"),o[i++]=1/0;for(var h=0,f=L(e.ccpixx-69);h<f;h++)o[i++]=0;if(e.linpad=s(),e.diff=L(L(L(e.linwidth+e.linpad.length)+2)-e.ccpixx),e.diff>0){o[i++]=1/0;for(var d=0,m=e.diff;d<m;d++)o[i++]=0;e.ccrpad=s(),e.pixx=L(e.ccpixx+e.diff)}else e.ccrpad=s(0),e.pixx=e.ccpixx;o[i++]=1/0;for(var g=0,w=e.ccpixx,x=e.ccpixs.length-1;w<0?g>=x:g<=x;g+=w){e.i=g;for(var E=0;E<2;E++)_(b(e.ccpixs,e.i,e.ccpixx)),_(e.ccrpad)}for(var S=0;S<2;S++){_(e.linpad),o[i++]=0,o[i++]=1;for(var O=0;O<65;O++)o[i++]=0;o[i++]=1,o[i++]=0,_(e.ccrpad)}for(var T=0;T<2;T++){_(e.linpad),o[i++]=1,o[i++]=0;for(var D=0;D<65;D++)o[i++]=0;o[i++]=0,o[i++]=1,_(e.ccrpad)}for(var B=0;B<2;B++){_(e.linpad),o[i++]=0,o[i++]=1;for(var I=0;I<65;I++)o[i++]=0;o[i++]=1,o[i++]=0,_(e.ccrpad)}for(var M=71;M>=0;M-=1){e.y=M,_(e.linpad),o[i++]=0;for(var j=0,N=e.sbs.length-1;j<=N;j+=1)if(e.i=j,e.i%2==0){var F=72*A(e.bbs,~~(e.i/2));if(F>e.y||L(F+72*A(e.bhs,~~(e.i/2)))<e.y)for(var R=0,P=p(A(e.sbs,e.i));R<P;R++)o[i++]=0;else for(var H=0,V=p(A(e.sbs,e.i));H<V;H++)o[i++]=1}else for(var q=0,G=p(A(e.sbs,e.i));q<G;q++)o[i++]=0;o[i++]=0}e.pixs=s(),e.pixy=~~(e.pixs.length/e.pixx);var K=new Map([["ren",Q],["pixs",e.pixs],["pixx",e.pixx],["pixy",e.pixy],["height",e.pixy/72],["width",e.pixx/72],["opt",e.options]]);o[i++]=K,e.dontdraw||(r.save(),Q(),r.restore())}else{r.save(),Wt(),r.rmoveto(-1,72),o[i++]=1/0,o[i++]=1/0,o[i++]=0,o[i++]=1;for(var Y=0;Y<65;Y++)o[i++]=0;o[i++]=1,o[i++]=0,o[i++]=1,o[i++]=0;for(var X=0;X<65;X++)o[i++]=0;o[i++]=0,o[i++]=1,o[i++]=0,o[i++]=1;for(var J=0;J<65;J++)o[i++]=0;o[i++]=1,o[i++]=0;var Z=s();o[i++]="ren",o[i++]=Q,o[i++]="pixs",o[i++]=Z,o[i++]="pixx",o[i++]=69,o[i++]="pixy",o[i++]=3,o[i++]="height",o[i++]=6/72,o[i++]="width",o[i++]=69/72,o[i++]="opt",o[i++]=e.options;var ee=u();o[i++]=ee,Q(),o[i++]=e.comp,o[i++]=e.options,bt();var te=o[--i];r.rmoveto(L(69-A(te,"pixx")),6),o[i++]=te,Q(),r.restore()}}function xt(){var e=Object.create(xt.$ctx||(xt.$ctx={}));e.dontdraw=!1,e.usematrix=!1,e.parse=!1,e.dontlint=!1,e.lintreqs=!0,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],e.dontdraw&&(e.usematrix=!0),C(e.barcode,"|"),o[--i]?(e.linear=o[--i],i--,e.comp=o[--i]):(i--,o[i++]="bwipp.missingCompositeComponent#27577",o[i++]="A Composite Component must be provided following a pipe character",z()),v(e.options,"lintype","ean13"),v(e.options,"inkspread","0"),v(e.options,"dontdraw",!0),v(e.options,"dontlint",!0);var t=c(e.comp.length+18);if(y(t,0,"(01)00000000000000"),y(t,18,e.comp),o[i++]=t,o[i++]="ai",$(),i-=3,o[i++]=e.linear,o[i++]=e.options,K(),e.usematrix){e.linsym=o[--i],e.sbs=A(e.linsym,"sbs"),e.bhs=A(e.linsym,"bhs"),e.bbs=A(e.linsym,"bbs"),o[i++]="linwidth",o[i++]=0,k(e.sbs,(function(){var e=o[--i],t=o[--i];o[i++]=L(t+p(e))}));var n=o[--i];e[o[--i]]=n,o[i++]="compsym",o[i++]=e.comp,o[i++]=e.options,bt();var a=o[--i];e[o[--i]]=a,e.ccpixs=A(e.compsym,"pixs"),e.ccpixx=A(e.compsym,"pixx"),o[i++]=1/0;for(var l=0,h=L(e.ccpixx-97);l<h;l++)o[i++]=0;if(e.linpad=s(),e.diff=L(L(L(e.linwidth+e.linpad.length)+2)-e.ccpixx),e.diff>0){o[i++]=1/0;for(var f=0,d=e.diff;f<d;f++)o[i++]=0;e.ccrpad=s(),e.pixx=L(e.ccpixx+e.diff)}else e.ccrpad=s(0),e.pixx=e.ccpixx;o[i++]=1/0;for(var m=0,g=e.ccpixx,w=e.ccpixs.length-1;g<0?m>=w:m<=w;m+=g){e.i=m;for(var x=0;x<2;x++)_(b(e.ccpixs,e.i,e.ccpixx)),_(e.ccrpad)}for(var E=0;E<2;E++){_(e.linpad),o[i++]=0,o[i++]=1;for(var S=0;S<93;S++)o[i++]=0;o[i++]=1,o[i++]=0,_(e.ccrpad)}for(var O=0;O<2;O++){_(e.linpad),o[i++]=1,o[i++]=0;for(var T=0;T<93;T++)o[i++]=0;o[i++]=0,o[i++]=1,_(e.ccrpad)}for(var D=0;D<2;D++){_(e.linpad),o[i++]=0,o[i++]=1;for(var B=0;B<93;B++)o[i++]=0;o[i++]=1,o[i++]=0,_(e.ccrpad)}for(var I=71;I>=0;I-=1){e.y=I,_(e.linpad),o[i++]=0;for(var M=0,j=e.sbs.length-1;M<=j;M+=1)if(e.i=M,e.i%2==0){var N=72*A(e.bbs,~~(e.i/2));if(N>e.y||L(N+72*A(e.bhs,~~(e.i/2)))<e.y)for(var F=0,R=p(A(e.sbs,e.i));F<R;F++)o[i++]=0;else for(var P=0,H=p(A(e.sbs,e.i));P<H;P++)o[i++]=1}else for(var V=0,q=p(A(e.sbs,e.i));V<q;V++)o[i++]=0;o[i++]=0}e.pixs=s(),e.pixy=~~(e.pixs.length/e.pixx);var G=new Map([["ren",Q],["pixs",e.pixs],["pixx",e.pixx],["pixy",e.pixy],["height",e.pixy/72],["width",e.pixx/72],["opt",e.options]]);o[i++]=G,e.dontdraw||(r.save(),Q(),r.restore())}else{r.save(),Wt(),r.rmoveto(-1,72),o[i++]=1/0,o[i++]=1/0,o[i++]=0,o[i++]=1;for(var W=0;W<93;W++)o[i++]=0;o[i++]=1,o[i++]=0,o[i++]=1,o[i++]=0;for(var Y=0;Y<93;Y++)o[i++]=0;o[i++]=0,o[i++]=1,o[i++]=0,o[i++]=1;for(var X=0;X<93;X++)o[i++]=0;o[i++]=1,o[i++]=0;var J=s();o[i++]="ren",o[i++]=Q,o[i++]="pixs",o[i++]=J,o[i++]="pixx",o[i++]=97,o[i++]="pixy",o[i++]=3,o[i++]="height",o[i++]=6/72,o[i++]="width",o[i++]=97/72,o[i++]="opt",o[i++]=e.options;var Z=u();o[i++]=Z,Q(),r.rmoveto(-2,6),o[i++]=e.comp,o[i++]=e.options,bt(),Q(),r.restore()}}function Ct(){var e=Object.create(Ct.$ctx||(Ct.$ctx={}));e.dontdraw=!1,e.usematrix=!1,e.parse=!1,e.dontlint=!1,e.lintreqs=!0,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],e.dontdraw&&(e.usematrix=!0),C(e.barcode,"|"),o[--i]?(e.linear=o[--i],i--,e.comp=o[--i]):(i--,o[i++]="bwipp.missingCompositeComponent#27738",o[i++]="A Composite Component must be provided following a pipe character",z()),v(e.options,"lintype","upce"),v(e.options,"inkspread","0"),v(e.options,"dontdraw",!0),v(e.options,"dontlint",!0);var t=c(e.comp.length+18);if(y(t,0,"(01)00000000000000"),y(t,18,e.comp),o[i++]=t,o[i++]="ai",$(),i-=3,o[i++]=e.linear,o[i++]=e.options,Y(),e.usematrix){e.linsym=o[--i],e.sbs=A(e.linsym,"sbs"),e.bhs=A(e.linsym,"bhs"),e.bbs=A(e.linsym,"bbs"),o[i++]="linwidth",o[i++]=0,k(e.sbs,(function(){var e=o[--i],t=o[--i];o[i++]=L(t+p(e))}));var n=o[--i];e[o[--i]]=n,o[i++]="compsym",o[i++]=e.comp,o[i++]=e.options,bt();var a=o[--i];e[o[--i]]=a,e.ccpixs=A(e.compsym,"pixs"),e.ccpixx=A(e.compsym,"pixx"),o[i++]=1/0;for(var l=0,h=L(e.ccpixx-53);l<h;l++)o[i++]=0;if(e.linpad=s(),e.diff=L(L(L(e.linwidth+e.linpad.length)+2)-e.ccpixx),e.diff>0){o[i++]=1/0;for(var f=0,d=e.diff;f<d;f++)o[i++]=0;e.ccrpad=s(),e.pixx=L(e.ccpixx+e.diff)}else e.ccrpad=s(0),e.pixx=e.ccpixx;o[i++]=1/0;for(var m=0,g=e.ccpixx,w=e.ccpixs.length-1;g<0?m>=w:m<=w;m+=g){e.i=m;for(var x=0;x<2;x++)_(b(e.ccpixs,e.i,e.ccpixx)),_(e.ccrpad)}for(var E=0;E<2;E++){_(e.linpad),o[i++]=0,o[i++]=1;for(var S=0;S<49;S++)o[i++]=0;o[i++]=1,o[i++]=0,_(e.ccrpad)}for(var O=0;O<2;O++){_(e.linpad),o[i++]=1,o[i++]=0;for(var T=0;T<49;T++)o[i++]=0;o[i++]=0,o[i++]=1,_(e.ccrpad)}for(var D=0;D<2;D++){_(e.linpad),o[i++]=0,o[i++]=1;for(var B=0;B<49;B++)o[i++]=0;o[i++]=1,o[i++]=0,_(e.ccrpad)}for(var I=71;I>=0;I-=1){e.y=I,_(e.linpad),o[i++]=0;for(var M=0,j=e.sbs.length-1;M<=j;M+=1)if(e.i=M,e.i%2==0){var N=72*A(e.bbs,~~(e.i/2));if(N>e.y||L(N+72*A(e.bhs,~~(e.i/2)))<e.y)for(var F=0,R=p(A(e.sbs,e.i));F<R;F++)o[i++]=0;else for(var P=0,H=p(A(e.sbs,e.i));P<H;P++)o[i++]=1}else for(var V=0,q=p(A(e.sbs,e.i));V<q;V++)o[i++]=0;o[i++]=0}e.pixs=s(),e.pixy=~~(e.pixs.length/e.pixx);var G=new Map([["ren",Q],["pixs",e.pixs],["pixx",e.pixx],["pixy",e.pixy],["height",e.pixy/72],["width",e.pixx/72],["opt",e.options]]);o[i++]=G,e.dontdraw||(r.save(),Q(),r.restore())}else{r.save(),Wt(),r.rmoveto(-1,72),o[i++]=1/0,o[i++]=1/0,o[i++]=0,o[i++]=1;for(var W=0;W<49;W++)o[i++]=0;o[i++]=1,o[i++]=0,o[i++]=1,o[i++]=0;for(var K=0;K<49;K++)o[i++]=0;o[i++]=0,o[i++]=1,o[i++]=0,o[i++]=1;for(var X=0;X<49;X++)o[i++]=0;o[i++]=1,o[i++]=0;var J=s();o[i++]="ren",o[i++]=Q,o[i++]="pixs",o[i++]=J,o[i++]="pixx",o[i++]=53,o[i++]="pixy",o[i++]=3,o[i++]="height",o[i++]=6/72,o[i++]="width",o[i++]=53/72,o[i++]="opt",o[i++]=e.options;var Z=u();o[i++]=Z,Q(),r.rmoveto(-2,6),o[i++]=e.comp,o[i++]=e.options,bt(),Q(),r.restore()}}function kt(){var e=Object.create(kt.$ctx||(kt.$ctx={}));e.dontdraw=!1,e.usematrix=!1,e.parse=!1,e.dontlint=!1,e.lintreqs=!0,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],e.dontdraw&&(e.usematrix=!0),C(e.barcode,"|"),o[--i]?(e.linear=o[--i],i--,e.comp=o[--i]):(i--,o[i++]="bwipp.missingCompositeComponent#27899",o[i++]="A Composite Component must be provided following a pipe character",z()),e.usematrix||r.save(),v(e.options,"lintype","databaromni"),v(e.options,"linkage",!0),v(e.options,"inkspread","0"),v(e.options,"dontdraw",!0),v(e.options,"dontlint",!0);var t=c(e.linear.length+e.comp.length);y(t,0,e.linear),y(t,e.linear.length,e.comp),o[i++]=t,o[i++]="ai",$(),i-=3,o[i++]=e.linear,o[i++]=e.options,me();var n=o[--i];if(e.linsbs=A(n,"sbs"),e.linheight=72*A(A(n,"bhs"),0),o[i++]=n,e.usematrix?i--:Wt(),e.sepfinder=function(){e.fp=o[--i];for(var t=e.fp,n=L(e.fp+12);t<=n;t+=1){if(e.i=t,0==A(e.bot,e.i))if(1==A(e.bot,e.i-1))o[i++]=1;else{var r=0==A(e.sep,e.i-1)?1:0;o[i++]=r}else o[i++]=0;v(e.sep,e.i,o[--i])}e.f3=s([1,1,1,1,1,1,1,1,1,0,1,1,1]),o[i++]=!0;for(var a=0;a<=12;a+=1){var u=o[--i];o[i++]=u&&T(A(e.bot,L(a+e.fp)),A(e.f3,a))}o[--i]&&y(e.sep,e.fp,s([0,0,0,0,0,0,0,0,0,0,1,0,0]))},o[i++]=1/0,o[i++]=0,k(e.linsbs,(function(){var e=o[--i],t=o[--i],n=1==t?0:1;o[i++]=t;for(var r=0,a=e;r<a;r++)o[i++]=n})),O(s(S()-1)),e.bot=o[--i],i-=2,o[i++]=1/0,k(e.bot,(function(){var e=o[--i];o[i++]=L(1-e)})),e.sep=s(),y(e.sep,0,s([0,0,0])),y(e.sep,e.sep.length-4,s([0,0,0,0])),o[i++]=18,e.sepfinder(),o[i++]=64,e.sepfinder(),e.usematrix){o[i++]="compsym",o[i++]=e.comp,o[i++]=e.options,bt();var a=o[--i];e[o[--i]]=a,e.ccpixs=A(e.compsym,"pixs"),e.ccpixx=A(e.compsym,"pixx"),o[i++]=1/0,o[i++]=0,k(e.linsbs,(function(){var e=o[--i],t=o[--i],n=0==t?1:0;o[i++]=t;for(var r=0,a=p(e);r<a;r++)o[i++]=n})),e.linpixs=s(),o[i++]=1/0,o[i++]=0,_(e.sep),e.sep=s(),e.linheight=~~e.linheight,o[i++]=1/0;for(var u=0,l=e.ccpixx,h=e.ccpixs.length-1;l<0?u>=h:u<=h;u+=l){e.i=u;for(var f=0;f<2;f++)_(b(e.ccpixs,e.i,e.ccpixx)),o[i++]=0}o[i++]=0,o[i++]=0,o[i++]=0,o[i++]=0,_(e.sep);for(var d=0,m=e.linheight;d<m;d++)o[i++]=0,o[i++]=0,o[i++]=0,o[i++]=0,_(e.linpixs);e.pixs=s(),e.pixx=L(e.ccpixx+1),e.pixy=~~(e.pixs.length/e.pixx);var g=new Map([["ren",Q],["pixs",e.pixs],["pixx",e.pixx],["pixy",e.pixy],["height",e.pixy/72],["width",e.pixx/72],["opt",e.options]]);o[i++]=g,e.dontdraw||(r.save(),Q(),r.restore())}else{r.rmoveto(0,e.linheight);var w=new Map([["ren",Q],["pixs",e.sep],["pixx",e.sep.length],["pixy",1],["height",1/72],["width",e.sep.length/72],["opt",e.options]]);o[i++]=w,Q(),r.rmoveto(-5,1),o[i++]=e.comp,o[i++]=e.options,bt(),Q(),r.restore()}}function Et(){var e=Object.create(Et.$ctx||(Et.$ctx={}));e.dontdraw=!1,e.usematrix=!1,e.parse=!1,e.dontlint=!1,e.lintreqs=!0,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],e.dontdraw&&(e.usematrix=!0),C(e.barcode,"|"),o[--i]?(e.linear=o[--i],i--,e.comp=o[--i]):(i--,o[i++]="bwipp.missingCompositeComponent#28056",o[i++]="A Composite Component must be provided following a pipe character",z()),e.usematrix||r.save(),v(e.options,"lintype","databarstacked"),v(e.options,"linkage",!0),v(e.options,"inkspread","0"),v(e.options,"dontdraw",!0),v(e.options,"dontlint",!0);var t=c(e.linear.length+e.comp.length);y(t,0,e.linear),y(t,e.linear.length,e.comp),o[i++]=t,o[i++]="ai",$(),i-=3,o[i++]=e.linear,o[i++]=e.options,ge();var n=o[--i];e.bot=b(A(n,"pixs"),0,A(n,"pixx")),e.linheight=A(n,"pixy"),o[i++]=n,e.usematrix?e.linpixs=A(o[--i],"pixs"):Q(),e.sepfinder=function(){e.fp=o[--i];for(var t=e.fp,n=L(e.fp+12);t<=n;t+=1){if(e.i=t,0==A(e.bot,e.i))if(1==A(e.bot,e.i-1))o[i++]=1;else{var r=0==A(e.sep,e.i-1)?1:0;o[i++]=r}else o[i++]=0;v(e.sep,e.i,o[--i])}e.f3=s([1,1,1,1,1,1,1,1,1,0,1,1,1]),o[i++]=!0;for(var a=0;a<=12;a+=1){var u=o[--i];o[i++]=u&&T(A(e.bot,L(a+e.fp)),A(e.f3,a))}o[--i]&&y(e.sep,e.fp,s([0,0,0,0,0,0,0,0,0,0,1,0,0]))},o[i++]=1/0;for(var a=e.bot,u=0,l=a.length;u<l;u++)o[i++]=L(1-A(a,u));if(e.sep=s(),y(e.sep,0,s([0,0,0,0])),y(e.sep,e.sep.length-4,s([0,0,0,0])),o[i++]=18,e.sepfinder(),e.usematrix){o[i++]="compsym",o[i++]=e.comp,o[i++]=e.options,bt();var h=o[--i];e[o[--i]]=h,e.ccpixs=A(e.compsym,"pixs"),e.ccpixx=A(e.compsym,"pixx"),e.linwidth=e.sep.length,o[i++]=1/0;for(var f=0,d=e.ccpixx,p=e.ccpixs.length-1;d<0?f>=p:f<=p;f+=d){e.i=f;for(var m=0;m<2;m++)o[i++]=0,_(b(e.ccpixs,e.i,e.ccpixx))}_(e.sep),o[i++]=0,o[i++]=0,o[i++]=0,o[i++]=0,o[i++]=0,o[i++]=0;for(var g=0,w=e.linwidth,x=e.linpixs.length-1;w<0?g>=x:g<=x;g+=w)e.i=g,_(b(e.linpixs,e.i,e.linwidth)),o[i++]=0,o[i++]=0,o[i++]=0,o[i++]=0,o[i++]=0,o[i++]=0;e.pixs=s(),e.pixx=L(e.ccpixx+1),e.pixy=~~(e.pixs.length/e.pixx);var k=new Map([["ren",Q],["pixs",e.pixs],["pixx",e.pixx],["pixy",e.pixy],["height",e.pixy/72],["width",e.pixx/72],["opt",e.options]]);o[i++]=k,e.dontdraw||(r.save(),Q(),r.restore())}else{r.rmoveto(0,e.linheight);var E=new Map([["ren",Q],["pixs",e.sep],["pixx",e.sep.length],["pixy",1],["height",1/72],["width",e.sep.length/72],["opt",e.options]]);o[i++]=E,Q(),r.rmoveto(1,1),o[i++]=e.comp,o[i++]=e.options,bt(),Q(),r.restore()}}function St(){var e=Object.create(St.$ctx||(St.$ctx={}));e.dontdraw=!1,e.usematrix=!1,e.parse=!1,e.dontlint=!1,e.lintreqs=!0,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],e.dontdraw&&(e.usematrix=!0),C(e.barcode,"|"),o[--i]?(e.linear=o[--i],i--,e.comp=o[--i]):(i--,o[i++]="bwipp.missingCompositeComponent#28209",o[i++]="A Composite Component must be provided following a pipe character",z()),e.usematrix||r.save(),v(e.options,"lintype","databarstackedomni"),v(e.options,"linkage",!0),v(e.options,"inkspread","0"),v(e.options,"dontdraw",!0),v(e.options,"dontlint",!0);var t=c(e.linear.length+e.comp.length);y(t,0,e.linear),y(t,e.linear.length,e.comp),o[i++]=t,o[i++]="ai",$(),i-=3,o[i++]=e.linear,o[i++]=e.options,Ae();var n=o[--i];e.bot=b(A(n,"pixs"),0,A(n,"pixx")),e.linheight=A(n,"pixy"),o[i++]=n,e.usematrix?e.linpixs=A(o[--i],"pixs"):Q(),e.sepfinder=function(){e.fp=o[--i];for(var t=e.fp,n=L(e.fp+12);t<=n;t+=1){if(e.i=t,0==A(e.bot,e.i))if(1==A(e.bot,e.i-1))o[i++]=1;else{var r=0==A(e.sep,e.i-1)?1:0;o[i++]=r}else o[i++]=0;v(e.sep,e.i,o[--i])}e.f3=s([1,1,1,1,1,1,1,1,1,0,1,1,1]),o[i++]=!0;for(var a=0;a<=12;a+=1){var u=o[--i];o[i++]=u&&T(A(e.bot,L(a+e.fp)),A(e.f3,a))}o[--i]&&y(e.sep,e.fp,s([0,0,0,0,0,0,0,0,0,0,1,0,0]))},o[i++]=1/0;for(var a=e.bot,u=0,l=a.length;u<l;u++)o[i++]=L(1-A(a,u));if(e.sep=s(),y(e.sep,0,s([0,0,0,0])),y(e.sep,e.sep.length-4,s([0,0,0,0])),o[i++]=18,e.sepfinder(),e.usematrix){o[i++]="compsym",o[i++]=e.comp,o[i++]=e.options,bt();var h=o[--i];e[o[--i]]=h,e.ccpixs=A(e.compsym,"pixs"),e.ccpixx=A(e.compsym,"pixx"),e.linwidth=e.sep.length,o[i++]=1/0;for(var f=0,d=e.ccpixx,p=e.ccpixs.length-1;d<0?f>=p:f<=p;f+=d){e.i=f;for(var m=0;m<2;m++)o[i++]=0,_(b(e.ccpixs,e.i,e.ccpixx))}_(e.sep),o[i++]=0,o[i++]=0,o[i++]=0,o[i++]=0,o[i++]=0,o[i++]=0;for(var g=0,w=e.linwidth,x=e.linpixs.length-1;w<0?g>=x:g<=x;g+=w)e.i=g,_(b(e.linpixs,e.i,e.linwidth)),o[i++]=0,o[i++]=0,o[i++]=0,o[i++]=0,o[i++]=0,o[i++]=0;e.pixs=s(),e.pixx=L(e.ccpixx+1),e.pixy=~~(e.pixs.length/e.pixx);var k=new Map([["ren",Q],["pixs",e.pixs],["pixx",e.pixx],["pixy",e.pixy],["height",e.pixy/72],["width",e.pixx/72],["opt",e.options]]);o[i++]=k,e.dontdraw||(r.save(),Q(),r.restore())}else{r.rmoveto(0,e.linheight);var E=new Map([["ren",Q],["pixs",e.sep],["pixx",e.sep.length],["pixy",1],["height",1/72],["width",e.sep.length/72],["opt",e.options]]);o[i++]=E,Q(),r.rmoveto(1,1),o[i++]=e.comp,o[i++]=e.options,bt(),Q(),r.restore()}}function _t(){var e=Object.create(_t.$ctx||(_t.$ctx={}));e.dontdraw=!1,e.usematrix=!1,e.parse=!1,e.dontlint=!1,e.lintreqs=!0,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],e.dontdraw&&(e.usematrix=!0),C(e.barcode,"|"),o[--i]?(e.linear=o[--i],i--,e.comp=o[--i]):(i--,o[i++]="bwipp.missingCompositeComponent#28363",o[i++]="A Composite Component must be provided following a pipe character",z()),e.usematrix||r.save(),v(e.options,"lintype","databartruncated"),v(e.options,"linkage",!0),v(e.options,"inkspread","0"),v(e.options,"dontdraw",!0),v(e.options,"dontlint",!0);var t=c(e.linear.length+e.comp.length);y(t,0,e.linear),y(t,e.linear.length,e.comp),o[i++]=t,o[i++]="ai",$(),i-=3,o[i++]=e.linear,o[i++]=e.options,ve();var n=o[--i];if(e.linsbs=A(n,"sbs"),e.linheight=72*A(A(n,"bhs"),0),o[i++]=n,e.usematrix?i--:Wt(),e.sepfinder=function(){e.fp=o[--i];for(var t=e.fp,n=L(e.fp+12);t<=n;t+=1){if(e.i=t,0==A(e.bot,e.i))if(1==A(e.bot,e.i-1))o[i++]=1;else{var r=0==A(e.sep,e.i-1)?1:0;o[i++]=r}else o[i++]=0;v(e.sep,e.i,o[--i])}e.f3=s([1,1,1,1,1,1,1,1,1,0,1,1,1]),o[i++]=!0;for(var a=0;a<=12;a+=1){var u=o[--i];o[i++]=u&&T(A(e.bot,L(a+e.fp)),A(e.f3,a))}o[--i]&&y(e.sep,e.fp,s([0,0,0,0,0,0,0,0,0,0,1,0,0]))},o[i++]=1/0,o[i++]=0,k(e.linsbs,(function(){var e=o[--i],t=o[--i],n=1==t?0:1;o[i++]=t;for(var r=0,a=e;r<a;r++)o[i++]=n})),O(s(S()-1)),e.bot=o[--i],i-=2,o[i++]=1/0,k(e.bot,(function(){var e=o[--i];o[i++]=L(1-e)})),e.sep=s(),y(e.sep,0,s([0,0,0])),y(e.sep,e.sep.length-4,s([0,0,0,0])),o[i++]=18,e.sepfinder(),o[i++]=64,e.sepfinder(),e.usematrix){o[i++]="compsym",o[i++]=e.comp,o[i++]=e.options,bt();var a=o[--i];e[o[--i]]=a,e.ccpixs=A(e.compsym,"pixs"),e.ccpixx=A(e.compsym,"pixx"),o[i++]=1/0,o[i++]=0,k(e.linsbs,(function(){var e=o[--i],t=o[--i],n=0==t?1:0;o[i++]=t;for(var r=0,a=p(e);r<a;r++)o[i++]=n})),e.linpixs=s(),o[i++]=1/0,o[i++]=0,_(e.sep),e.sep=s(),e.linheight=~~e.linheight,o[i++]=1/0;for(var u=0,l=e.ccpixx,h=e.ccpixs.length-1;l<0?u>=h:u<=h;u+=l){e.i=u;for(var f=0;f<2;f++)_(b(e.ccpixs,e.i,e.ccpixx)),o[i++]=0}o[i++]=0,o[i++]=0,o[i++]=0,o[i++]=0,_(e.sep);for(var d=0,m=e.linheight;d<m;d++)o[i++]=0,o[i++]=0,o[i++]=0,o[i++]=0,_(e.linpixs);e.pixs=s(),e.pixx=L(e.ccpixx+1),e.pixy=~~(e.pixs.length/e.pixx);var g=new Map([["ren",Q],["pixs",e.pixs],["pixx",e.pixx],["pixy",e.pixy],["height",e.pixy/72],["width",e.pixx/72],["opt",e.options]]);o[i++]=g,e.dontdraw||(r.save(),Q(),r.restore())}else{r.rmoveto(0,e.linheight);var w=new Map([["ren",Q],["pixs",e.sep],["pixx",e.sep.length],["pixy",1],["height",1/72],["width",e.sep.length/72],["opt",e.options]]);o[i++]=w,Q(),r.rmoveto(-5,1),o[i++]=e.comp,o[i++]=e.options,bt(),Q(),r.restore()}}function Ot(){var e=Object.create(Ot.$ctx||(Ot.$ctx={}));e.dontdraw=!1,e.usematrix=!1,e.parse=!1,e.dontlint=!1,e.lintreqs=!0,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],e.dontdraw&&(e.usematrix=!0),C(e.barcode,"|"),o[--i]?(e.linear=o[--i],i--,e.comp=o[--i]):(i--,o[i++]="bwipp.missingCompositeComponent#28521",o[i++]="A Composite Component must be provided following a pipe character",z()),e.usematrix||r.save(),v(e.options,"lintype","databarlimited"),v(e.options,"linkage",!0),v(e.options,"inkspread","0"),v(e.options,"dontdraw",!0),v(e.options,"dontlint",!0);var t=c(e.linear.length+e.comp.length);y(t,0,e.linear),y(t,e.linear.length,e.comp),o[i++]=t,o[i++]="ai",$(),i-=3,o[i++]=e.linear,o[i++]=e.options,be();var n=o[--i];e.linsbs=A(n,"sbs"),e.linheight=72*A(A(n,"bhs"),0),o[i++]=n,e.usematrix?i--:Wt(),o[i++]=1/0,o[i++]=1,k(e.linsbs,(function(){var e=o[--i],t=o[--i],n=0==t?1:0;o[i++]=t;for(var r=0,a=e;r<a;r++)o[i++]=n})),O(s(S()-1)),e.sep=o[--i],i-=2,y(e.sep,0,s([0,0,0]));var a=e.sep;if(y(e.sep,a.length-9,s([0,0,0,0,0,0,0,0,0])),e.usematrix){o[i++]="compsym",o[i++]=e.comp,o[i++]=e.options,bt();var u=o[--i];if(e[o[--i]]=u,e.ccpixs=A(e.compsym,"pixs"),e.ccpixx=A(e.compsym,"pixx"),o[i++]=1/0,o[i++]=0,k(e.linsbs,(function(){var e=o[--i],t=o[--i],n=0==t?1:0;o[i++]=t;for(var r=0,a=p(e);r<a;r++)o[i++]=n})),e.linpixs=s(),o[i++]=1/0,o[i++]=0,_(e.sep),e.sep=s(),e.linheight=~~e.linheight,72==e.ccpixx){o[i++]=1/0;for(var l=0,h=e.ccpixx,f=e.ccpixs.length-1;h<0?l>=f:l<=f;l+=h){e.i=l;for(var d=0;d<2;d++)o[i++]=0,_(b(e.ccpixs,e.i,e.ccpixx)),o[i++]=0,o[i++]=0,o[i++]=0,o[i++]=0,o[i++]=0,o[i++]=0}_(e.sep);for(var m=0,g=e.linheight;m<g;m++)_(e.linpixs);e.pixs=s(),e.pixx=e.linpixs.length}else{o[i++]=1/0;for(var w=0,x=e.ccpixx,E=e.ccpixs.length-1;x<0?w>=E:w<=E;w+=x){e.i=w;for(var T=0;T<2;T++)_(b(e.ccpixs,e.i,e.ccpixx)),o[i++]=0,o[i++]=0,o[i++]=0,o[i++]=0,o[i++]=0,o[i++]=0}o[i++]=0,o[i++]=0,o[i++]=0,o[i++]=0,o[i++]=0,o[i++]=0,o[i++]=0,o[i++]=0,o[i++]=0,_(e.sep);for(var D=0,B=e.linheight;D<B;D++)o[i++]=0,o[i++]=0,o[i++]=0,o[i++]=0,o[i++]=0,o[i++]=0,o[i++]=0,o[i++]=0,o[i++]=0,_(e.linpixs);e.pixs=s(),e.pixx=L(e.ccpixx+6)}e.pixy=~~(e.pixs.length/e.pixx);var I=new Map([["ren",Q],["pixs",e.pixs],["pixx",e.pixx],["pixy",e.pixy],["height",e.pixy/72],["width",e.pixx/72],["opt",e.options]]);o[i++]=I,e.dontdraw||(r.save(),Q(),r.restore())}else{r.rmoveto(0,e.linheight);var M=e.sep,j=new Map([["ren",Q],["pixs",M],["pixx",e.sep.length],["pixy",1],["height",1/72],["width",e.sep.length/72],["opt",e.options]]);o[i++]=j,Q(),o[i++]=e.comp,o[i++]=e.options,bt();var N=o[--i];r.rmoveto(L(72-A(N,"pixx")),1),o[i++]=N,Q(),r.restore()}}function Tt(){var e=Object.create(Tt.$ctx||(Tt.$ctx={}));e.dontdraw=!1,e.usematrix=!1,e.parse=!1,e.dontlint=!1,e.lintreqs=!0,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],e.dontdraw&&(e.usematrix=!0),C(e.barcode,"|"),o[--i]?(e.linear=o[--i],i--,e.comp=o[--i]):(i--,o[i++]="bwipp.missingCompositeComponent#28670",o[i++]="A Composite Component must be provided following a pipe character",z()),e.usematrix||r.save(),v(e.options,"lintype","databarexpanded"),v(e.options,"linkage",!0),v(e.options,"inkspread","0"),v(e.options,"dontdraw",!0),v(e.options,"dontlint",!0);var t=c(e.linear.length+e.comp.length);y(t,0,e.linear),y(t,e.linear.length,e.comp),o[i++]=t,o[i++]="ai",$(),i-=3,o[i++]=e.linear,o[i++]=e.options,ye();var n=o[--i];e.linsbs=A(n,"sbs"),e.linheight=72*A(A(n,"bhs"),0),o[i++]=n,e.usematrix?i--:Wt(),e.sepfinder=function(){e.fp=o[--i];for(var t=e.fp,n=L(e.fp+12);t<=n;t+=1){if(e.i=t,0==A(e.bot,e.i))if(1==A(e.bot,e.i-1))o[i++]=1;else{var r=0==A(e.sep,e.i-1)?1:0;o[i++]=r}else o[i++]=0;v(e.sep,e.i,o[--i])}},o[i++]=1/0,o[i++]=0,k(e.linsbs,(function(){var e=o[--i],t=o[--i],n=1==t?0:1;o[i++]=t;for(var r=0,a=e;r<a;r++)o[i++]=n})),O(s(S()-1)),e.bot=o[--i],i-=2,o[i++]=1/0,k(e.bot,(function(){var e=o[--i];o[i++]=L(1-e)})),e.sep=s(),y(e.sep,0,s([0,0,0])),y(e.sep,e.sep.length-4,s([0,0,0,0])),o[i++]=1/0;for(var a=18,u=e.bot.length-13;a<=u;a+=98)o[i++]=a;for(var l=69,h=e.bot.length-13;l<=h;l+=98)o[i++]=l;for(var f=s(),d=0,m=f.length;d<m;d++)o[i++]=A(f,d),e.sepfinder();if(e.usematrix){o[i++]="compsym",o[i++]=e.comp,o[i++]=e.options,bt();var g=o[--i];e[o[--i]]=g,e.ccpixs=A(e.compsym,"pixs"),e.ccpixx=A(e.compsym,"pixx"),o[i++]=1/0,o[i++]=0,k(e.linsbs,(function(){var e=o[--i],t=o[--i],n=0==t?1:0;o[i++]=t;for(var r=0,a=p(e);r<a;r++)o[i++]=n})),e.linpixs=s(),o[i++]=1/0,o[i++]=0,_(e.sep),e.sep=s(),e.linheight=~~e.linheight,e.diff=L(e.linpixs.length-e.ccpixx),o[i++]=1/0;for(var w=0,x=L(e.diff-2);w<x;w++)o[i++]=0;e.ccrpad=s(),o[i++]=1/0;for(var E=0,T=e.ccpixx,D=e.ccpixs.length-1;T<0?E>=D:E<=D;E+=T){e.i=E;for(var B=0;B<2;B++)o[i++]=0,o[i++]=0,_(b(e.ccpixs,e.i,e.ccpixx)),_(e.ccrpad)}_(e.sep);for(var I=0,M=e.linheight;I<M;I++)_(e.linpixs);e.pixs=s(),e.pixx=e.linpixs.length,e.pixy=~~(e.pixs.length/e.pixx);var j=new Map([["ren",Q],["pixs",e.pixs],["pixx",e.pixx],["pixy",e.pixy],["height",e.pixy/72],["width",e.pixx/72],["opt",e.options]]);o[i++]=j,e.dontdraw||(r.save(),Q(),r.restore())}else{r.rmoveto(0,e.linheight);var N=new Map([["ren",Q],["pixs",e.sep],["pixx",e.sep.length],["pixy",1],["height",1/72],["width",e.sep.length/72],["opt",e.options]]);o[i++]=N,Q(),r.rmoveto(1,1),o[i++]=e.comp,o[i++]=e.options,bt(),Q(),r.restore()}}function Dt(){var e=Object.create(Dt.$ctx||(Dt.$ctx={}));e.dontdraw=!1,e.usematrix=!1,e.parse=!1,e.dontlint=!1,e.lintreqs=!0,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],e.dontdraw&&(e.usematrix=!0),C(e.barcode,"|"),o[--i]?(e.linear=o[--i],i--,e.comp=o[--i]):(i--,o[i++]="bwipp.missingCompositeComponent#28827",o[i++]="A Composite Component must be provided following a pipe character",z()),e.usematrix||r.save(),v(e.options,"lintype","databarexpandedstacked"),v(e.options,"linkage",!0),v(e.options,"inkspread","0"),v(e.options,"dontdraw",!0),v(e.options,"dontlint",!0);var t=c(e.linear.length+e.comp.length);y(t,0,e.linear),y(t,e.linear.length,e.comp),o[i++]=t,o[i++]="ai",$(),i-=3,o[i++]=e.linear,o[i++]=e.options,we();var n=o[--i];e.bot=b(A(n,"pixs"),0,A(n,"pixx")),e.linheight=A(n,"pixy"),o[i++]=n,e.usematrix?e.linpixs=A(o[--i],"pixs"):Q(),e.sepfinder=function(){e.fp=o[--i];for(var t=e.fp,n=L(e.fp+12);t<=n;t+=1){if(e.i=t,0==A(e.bot,e.i))if(1==A(e.bot,e.i-1))o[i++]=1;else{var r=0==A(e.sep,e.i-1)?1:0;o[i++]=r}else o[i++]=0;v(e.sep,e.i,o[--i])}},o[i++]=1/0;for(var a=e.bot,u=0,l=a.length;u<l;u++)o[i++]=L(1-A(a,u));e.sep=s(),y(e.sep,0,s([0,0,0,0])),y(e.sep,e.sep.length-4,s([0,0,0,0])),o[i++]=1/0;for(var h=19,f=e.bot.length-13;h<=f;h+=98)o[i++]=h;for(var d=70,p=e.bot.length-13;d<=p;d+=98)o[i++]=d;for(var m=s(),g=0,w=m.length;g<w;g++)o[i++]=A(m,g),e.sepfinder();if(e.usematrix){o[i++]="compsym",o[i++]=e.comp,o[i++]=e.options,bt();var x=o[--i];e[o[--i]]=x,e.ccpixs=A(e.compsym,"pixs"),e.ccpixx=A(e.compsym,"pixx"),e.pixx=e.sep.length,o[i++]=1/0;for(var k=0,E=~~(L(L(e.pixx-e.ccpixx)+1)/2);k<E;k++)o[i++]=0;e.cclpad=s(),o[i++]=1/0;for(var S=0,O=~~(L(e.pixx-e.ccpixx)/2);S<O;S++)o[i++]=0;e.ccrpad=s(),o[i++]=1/0;for(var T=0,D=e.ccpixx,B=e.ccpixs.length-1;D<0?T>=B:T<=B;T+=D){e.i=T;for(var I=0;I<2;I++)_(e.cclpad),_(b(e.ccpixs,e.i,e.ccpixx)),_(e.ccrpad)}_(e.sep),_(e.linpixs),e.pixs=s(),e.pixy=~~(e.pixs.length/e.pixx);var M=new Map([["ren",Q],["pixs",e.pixs],["pixx",e.pixx],["pixy",e.pixy],["height",e.pixy/72],["width",e.pixx/72],["opt",e.options]]);o[i++]=M,e.dontdraw||(r.save(),Q(),r.restore())}else{r.rmoveto(0,e.linheight);var j=new Map([["ren",Q],["pixs",e.sep],["pixx",e.sep.length],["pixy",1],["height",1/72],["width",e.sep.length/72],["opt",e.options]]);o[i++]=j,Q();var N=0==A(e.bot,0)?2:0;r.rmoveto(N,1),o[i++]=e.comp,o[i++]=e.options,bt(),Q(),r.restore()}}function Bt(){var e=Object.create(Bt.$ctx||(Bt.$ctx={}));e.dontdraw=!1,e.usematrix=!1,e.parse=!1,e.dontlint=!1,e.lintreqs=!0,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],e.dontdraw&&(e.usematrix=!0),C(e.barcode,"|"),o[--i]?(e.linear=o[--i],i--,e.comp=o[--i]):(i--,o[i++]="bwipp.missingCompositeComponent#28976",o[i++]="A Composite Component must be provided following a pipe character",z()),e.usematrix||r.save(),v(e.options,"inkspread","0"),v(e.options,"dontdraw",!0),v(e.options,"dontlint",!0);var t=c(e.linear.length+e.comp.length);y(t,0,e.linear),y(t,e.linear.length,e.comp),o[i++]=t,o[i++]="ai",$(),i-=3,v(e.options,"linkagea",!0),o[i++]=e.linear,o[i++]=1/0,k(e.options);var n=u();o[i++]=n,ne();var a=A(o[--i],"sbs");o[i++]=0,k(a,(function(){var e=o[--i],t=o[--i];o[i++]=L(t+e)})),e.linwidth=o[--i],v(e.options,"lintype","gs1-128"),v(e.options,"linwidth",e.linwidth),o[i++]=e.comp,o[i++]=e.options,bt(),e.compsym=o[--i],99==A(e.compsym,"pixx")?o[i++]="a":o[i++]="c",e.linktype=o[--i],T(e.linktype,"a")?(v(e.options,"linkagea",!0),v(e.options,"linkagec",!1)):(v(e.options,"linkagea",!1),v(e.options,"linkagec",!0)),o[i++]=e.linear,o[i++]=1/0,k(e.options);var l=u();o[i++]=l,ne();var h=o[--i];if(e.linsbs=A(h,"sbs"),e.linheight=72*A(A(h,"bhs"),0),o[i++]=h,e.usematrix?i--:Wt(),o[i++]=1/0,o[i++]=1,k(e.linsbs,(function(){var e=o[--i],t=o[--i],n=0==t?1:0;o[i++]=t;for(var r=0,a=e;r<a;r++)o[i++]=n})),O(s(S()-1)),e.sep=o[--i],i-=2,!e.usematrix){r.rmoveto(0,e.linheight);var f=new Map([["ren",Q],["pixs",e.sep],["pixx",e.sep.length],["pixy",1],["height",1/72],["width",e.sep.length/72],["opt",e.options]]);o[i++]=f,Q()}if(T(e.linktype,"a")){if(e.s=~~(L(e.linwidth-2)/11),e.p=~~((e.s-9)/2),o[i++]="x",o[i++]=11*(e.s-e.p-1)+10,0==e.p){var d=o[--i];o[i++]=L(d+2)}var p=o[--i];e[o[--i]]=L(p-99)}else e.x=-7;if(e.usematrix){if(e.ccpixs=A(e.compsym,"pixs"),e.ccpixx=A(e.compsym,"pixx"),o[i++]=1/0,k(e.linsbs,(function(){var e=o[--i],t=o[--i],n=1==t?0:1;o[i++]=t;for(var r=0,a=e;r<a;r++)o[i++]=n})),e.linpixs=s(),e.x>0){o[i++]=1/0;for(var m=0,g=e.x;m<g;m++)o[i++]=0;e.cclpad=s(),e.linlpad=s(0)}else{e.cclpad=s(0),o[i++]=1/0;for(var w=0,x=-e.x;w<x;w++)o[i++]=0;e.linlpad=s()}if(e.diff=L(e.linwidth-L(e.ccpixx+e.x)),e.diff>0){o[i++]=1/0;for(var E=0,D=e.diff;E<D;E++)o[i++]=0;e.ccrpad=s(),e.linrpad=s(0)}else{e.ccrpad=s(0),o[i++]=1/0;for(var B=0,I=-e.diff;B<I;B++)o[i++]=0;e.linrpad=s()}e.linheight=~~e.linheight;var M=T(e.linktype,"a")?2:3;e.ccrepeat=M,o[i++]=1/0;for(var j=0,N=e.ccpixx,F=e.ccpixs.length-1;N<0?j>=F:j<=F;j+=N){e.i=j;for(var R=0,P=e.ccrepeat;R<P;R++)_(e.cclpad),_(b(e.ccpixs,e.i,e.ccpixx)),_(e.ccrpad)}_(e.linlpad),_(e.sep),_(e.linrpad);for(var H=0,V=e.linheight;H<V;H++)_(e.linlpad),_(e.linpixs),_(e.linrpad);e.pixs=s(),e.pixx=L(L(e.cclpad.length+e.ccpixx)+e.ccrpad.length),e.pixy=~~(e.pixs.length/e.pixx);var q=new Map([["ren",Q],["pixs",e.pixs],["pixx",e.pixx],["pixy",e.pixy],["height",e.pixy/72],["width",e.pixx/72],["opt",e.options]]);o[i++]=q,e.dontdraw||(r.save(),Q(),r.restore())}else r.rmoveto(e.x,1),o[i++]=e.compsym,Q(),r.restore()}function It(){var e=Object.create(It.$ctx||(It.$ctx={}));e.dontdraw=!1,e.parse=!1,e.dontlint=!1,e.lintreqs=!0,e.gssep=!1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],o[i++]=e.barcode,o[i++]="ai",$(),e.fncs=o[--i],e.vals=o[--i],e.ais=o[--i],e.fnc1=-1,e.dmtx=s([e.fnc1]);for(var t=0,n=e.ais.length-1;t<=n;t+=1){e.i=t,e.ai=A(e.ais,e.i),e.val=A(e.vals,e.i);var r=s(e.dmtx.length+e.ai.length+e.val.length);y(r,0,e.dmtx),o[i++]=r,o[i++]=r,o[i++]=e.dmtx.length,o[i++]=e.ai,o[i++]=1/0;var a=o[--i],u=o[--i];o[i++]=a,k(u);var l=s(),h=o[--i];y(o[--i],h,l);var f=o[--i];o[i++]=f,o[i++]=f,o[i++]=e.dmtx.length+e.ai.length,o[i++]=e.val,o[i++]=1/0;var d=o[--i],p=o[--i];o[i++]=d,k(p);var m=s(),g=o[--i];if(y(o[--i],g,m),e.dmtx=o[--i],e.i!=e.ais.length-1&&A(e.fncs,e.i)){var w=s(e.dmtx.length+1);y(w,0,e.dmtx),o[i++]=w,o[i++]=w,o[i++]=e.dmtx.length,e.gssep?o[i++]=29:o[i++]=e.fnc1;var x=o[--i],C=o[--i];v(o[--i],C,x),e.dmtx=o[--i]}}for(e.barcode=c(5*(e.dmtx.length+1)),e.i=0,e.j=0;e.i!=e.dmtx.length;){var E=A(e.dmtx,e.i);o[i++]=E,E==e.fnc1?(i--,y(e.barcode,e.j,"^FNC1"),e.j=e.j+4):v(e.barcode,e.j,o[--i]),e.i=e.i+1,e.j=e.j+1}e.barcode=b(e.barcode,0,e.j),delete e.options.parse,v(e.options,"dontdraw",!0),v(e.options,"parsefnc",!0),o[i++]="args",o[i++]=e.barcode,o[i++]=e.options,nt();var S=o[--i];e[o[--i]]=S,v(e.args,"opt",e.options),o[i++]=e.args,e.dontdraw||Q()}function Mt(){var e=Object.create(Mt.$ctx||(Mt.$ctx={}));e.parse=!1,e.dontlint=!1,e.lintreqs=!0,e.dontdraw=!1,e.gssep=!1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],o[i++]=e.barcode,o[i++]="ai",$(),e.fncs=o[--i],e.vals=o[--i],e.ais=o[--i],e.fnc1=-1,e.dmtx=s([e.fnc1]);for(var t=0,n=e.ais.length-1;t<=n;t+=1){e.i=t,e.ai=A(e.ais,e.i),e.val=A(e.vals,e.i);var r=s(e.dmtx.length+e.ai.length+e.val.length);y(r,0,e.dmtx),o[i++]=r,o[i++]=r,o[i++]=e.dmtx.length,o[i++]=e.ai,o[i++]=1/0;var a=o[--i],u=o[--i];o[i++]=a,k(u);var l=s(),h=o[--i];y(o[--i],h,l);var f=o[--i];o[i++]=f,o[i++]=f,o[i++]=e.dmtx.length+e.ai.length,o[i++]=e.val,o[i++]=1/0;var d=o[--i],p=o[--i];o[i++]=d,k(p);var m=s(),g=o[--i];if(y(o[--i],g,m),e.dmtx=o[--i],e.i!=e.ais.length-1&&A(e.fncs,e.i)){var w=s(e.dmtx.length+1);y(w,0,e.dmtx),o[i++]=w,o[i++]=w,o[i++]=e.dmtx.length,e.gssep?o[i++]=29:o[i++]=e.fnc1;var x=o[--i],C=o[--i];v(o[--i],C,x),e.dmtx=o[--i]}}for(e.barcode=c(5*(e.dmtx.length+1)),e.i=0,e.j=0;e.i!=e.dmtx.length;){var E=A(e.dmtx,e.i);o[i++]=E,E==e.fnc1?(i--,y(e.barcode,e.j,"^FNC1"),e.j=e.j+4):v(e.barcode,e.j,o[--i]),e.i=e.i+1,e.j=e.j+1}e.barcode=b(e.barcode,0,e.j),delete e.options.parse,v(e.options,"dontdraw",!0),v(e.options,"parsefnc",!0),v(e.options,"format","rectangle"),o[i++]="args",o[i++]=e.barcode,o[i++]=e.options,nt();var S=o[--i];e[o[--i]]=S,v(e.args,"opt",e.options),o[i++]=e.args,e.dontdraw||Q()}function jt(){var e=Object.create(jt.$ctx||(jt.$ctx={}));e.parse=!1,e.dontlint=!1,e.lintreqs=!0,e.dontdraw=!1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i];var t=new Map([["parse",e.parse],["parseonly",!0],["parsefnc",!1]]);e.fncvals=t,o[i++]="barcode",o[i++]=e.barcode,o[i++]=e.fncvals,H();var n=o[--i];e[o[--i]]=n,o[i++]=e.barcode,o[i++]="dl",$(),i-=3,delete e.options.parse,v(e.options,"dontdraw",!0),o[i++]="args",o[i++]=e.barcode,o[i++]=e.options,nt();var r=o[--i];e[o[--i]]=r,v(e.args,"opt",e.options),o[i++]=e.args,e.dontdraw||Q()}function Nt(){var e=Object.create(Nt.$ctx||(Nt.$ctx={}));e.parse=!1,e.dontlint=!1,e.lintreqs=!0,e.dontdraw=!1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],o[i++]=e.barcode,o[i++]="ai",$(),e.fncs=o[--i],e.vals=o[--i],e.ais=o[--i],e.fnc1=-1,e.qrc=s([e.fnc1]);for(var t=0,n=e.ais.length-1;t<=n;t+=1){e.i=t,e.ai=A(e.ais,e.i),e.val=A(e.vals,e.i);var r=s(e.qrc.length+e.ai.length+e.val.length);y(r,0,e.qrc),o[i++]=r,o[i++]=r,o[i++]=e.qrc.length,o[i++]=e.ai,o[i++]=1/0;var a=o[--i],u=o[--i];o[i++]=a,k(u);var l=s(),h=o[--i];y(o[--i],h,l);var f=o[--i];o[i++]=f,o[i++]=f,o[i++]=e.qrc.length+e.ai.length,o[i++]=e.val,o[i++]=1/0;var d=o[--i],p=o[--i];o[i++]=d,k(p);var m=s(),g=o[--i];if(y(o[--i],g,m),e.qrc=o[--i],e.i!=e.ais.length-1&&A(e.fncs,e.i)){var w=s(e.qrc.length+1);y(w,0,e.qrc),v(w,e.qrc.length,e.fnc1),e.qrc=w}}for(e.barcode=c(5*(e.qrc.length+1)),e.i=0,e.j=0;e.i!=e.qrc.length;){var x=A(e.qrc,e.i);o[i++]=x,x==e.fnc1?(i--,y(e.barcode,e.j,"^FNC1"),e.j=e.j+4):v(e.barcode,e.j,o[--i]),e.i=e.i+1,e.j=e.j+1}e.barcode=b(e.barcode,0,e.j),delete e.options.parse,v(e.options,"dontdraw",!0),v(e.options,"parsefnc",!0),o[i++]="args",o[i++]=e.barcode,o[i++]=e.options,at();var C=o[--i];e[o[--i]]=C,v(e.args,"opt",e.options),o[i++]=e.args,e.dontdraw||Q()}function Ft(){var e=Object.create(Ft.$ctx||(Ft.$ctx={}));e.parse=!1,e.dontlint=!1,e.lintreqs=!0,e.dontdraw=!1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i];var t=new Map([["parse",e.parse],["parseonly",!0],["parsefnc",!1]]);e.fncvals=t,o[i++]="barcode",o[i++]=e.barcode,o[i++]=e.fncvals,H();var n=o[--i];e[o[--i]]=n,o[i++]=e.barcode,o[i++]="dl",$(),i-=3,delete e.options.parse,v(e.options,"dontdraw",!0),o[i++]="args",o[i++]=e.barcode,o[i++]=e.options,at();var r=o[--i];e[o[--i]]=r,v(e.args,"opt",e.options),o[i++]=e.args,e.dontdraw||Q()}function Rt(){var e=Object.create(Rt.$ctx||(Rt.$ctx={}));e.dontdraw=!1,e.parse=!1,e.dontlint=!1,e.lintreqs=!0,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],o[i++]=e.barcode,o[i++]="ai",$(),e.fncs=o[--i],e.vals=o[--i],e.ais=o[--i],e.fnc1=-1,e.dmtx=s([e.fnc1]);for(var t=0,n=e.ais.length-1;t<=n;t+=1){e.i=t,e.ai=A(e.ais,e.i),e.val=A(e.vals,e.i);var r=s(e.dmtx.length+e.ai.length+e.val.length);y(r,0,e.dmtx),o[i++]=r,o[i++]=r,o[i++]=e.dmtx.length,o[i++]=e.ai,o[i++]=1/0;var a=o[--i],u=o[--i];o[i++]=a,k(u);var l=s(),h=o[--i];y(o[--i],h,l);var f=o[--i];o[i++]=f,o[i++]=f,o[i++]=e.dmtx.length+e.ai.length,o[i++]=e.val,o[i++]=1/0;var d=o[--i],p=o[--i];o[i++]=d,k(p);var m=s(),g=o[--i];if(y(o[--i],g,m),e.dmtx=o[--i],e.i!=e.ais.length-1&&A(e.fncs,e.i)){var w=s(e.dmtx.length+1);y(w,0,e.dmtx),v(w,e.dmtx.length,e.fnc1),e.dmtx=w}}for(e.barcode=c(5*(e.dmtx.length+1)),e.i=0,e.j=0;e.i!=e.dmtx.length;){var x=A(e.dmtx,e.i);o[i++]=x,x==e.fnc1?(i--,y(e.barcode,e.j,"^FNC1"),e.j=e.j+4):v(e.barcode,e.j,o[--i]),e.i=e.i+1,e.j=e.j+1}e.barcode=b(e.barcode,0,e.j),delete e.options.parse,v(e.options,"dontdraw",!0),v(e.options,"parsefnc",!0),o[i++]="args",o[i++]=e.barcode,o[i++]=e.options,gt();var C=o[--i];e[o[--i]]=C,v(e.args,"opt",e.options),o[i++]=e.args,e.dontdraw||Q()}function Pt(){var e=Object.create(Pt.$ctx||(Pt.$ctx={}));e.dontdraw=!1,e.textfont="OCR-B",e.textsize=10,e.textyoffset=-8,e.textxoffset=0,e.validatecheck=!1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],Pt.$ctx._29642||function(){var t=Object.create(e);t.barchars="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%",t.charvals=new Map;for(var n=0;n<=42;n+=1)v(t.charvals,b(t.barchars,n,1),n);for(var r in t)t.hasOwnProperty(r)&&(Pt.$ctx[r]=t[r]);Pt.$ctx._29642=1}();for(var t=0,n=e.barcode.length-1;t<=n;t+=1){void 0!==A(e.charvals,b(e.barcode,t,1))||(o[i++]="bwipp.hibccode39badCharacter#29647",o[i++]="HIBC Code 39 must contain only digits, capital letters, spaces and the symbols -.$/+%",z())}if(o[i++]="barlen",o[i++]=e.barcode.length,e.validatecheck){var r=o[--i];o[i++]=L(r-1)}var a=o[--i];e[o[--i]]=a,e.checksum=41;for(var u=0,l=L(e.barlen-1);u<=l;u+=1)e.checksum=L(A(e.charvals,b(e.barcode,u,1))+e.checksum);e.checksum=e.checksum%43,e.validatecheck&&(A(e.barcode,e.barlen)!=A(e.barchars,e.checksum)&&(o[i++]="bwipp.hibccode39badCheckDigit#29661",o[i++]="Incorrect HIBC Code 39 check digit provided",z()),e.barcode=b(e.barcode,0,e.barlen));var h=c(L(e.barlen+2));y(h,1,e.barcode),e.barcode=h,v(e.barcode,0,43),v(e.barcode,L(e.barlen+1),A(e.barchars,e.checksum)),e.text=c(L(e.barlen+4)),v(e.text,0,42),y(e.text,1,e.barcode);var f=A(e.barcode,L(e.barlen+1));o[i++]=e.text,o[i++]=L(e.barlen+2),o[i++]=f,32==f&&(i--,o[i++]=95);var d=o[--i],p=o[--i];v(o[--i],p,d),v(e.text,L(e.barlen+3),42),v(e.options,"dontdraw",!0),v(e.options,"includecheck",!1),v(e.options,"validatecheck",!1),o[i++]="args",o[i++]=e.barcode,o[i++]=e.options,oe();var m=o[--i];e[o[--i]]=m,v(e.args,"txt",s([s([e.text,e.textxoffset,e.textyoffset,e.textfont,e.textsize])])),v(e.args,"textxalign","center"),v(e.args,"opt",e.options),o[i++]=e.args,e.dontdraw||Wt()}function Lt(){var e=Object.create(Lt.$ctx||(Lt.$ctx={}));e.dontdraw=!1,e.textfont="OCR-B",e.textsize=10,e.textyoffset=-8,e.textxoffset=0,e.validatecheck=!1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],Lt.$ctx._29742||function(){var t=Object.create(e);t.barchars="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%",t.charvals=new Map;for(var n=0;n<=42;n+=1)v(t.charvals,b(t.barchars,n,1),n);for(var r in t)t.hasOwnProperty(r)&&(Lt.$ctx[r]=t[r]);Lt.$ctx._29742=1}();for(var t=0,n=e.barcode.length-1;t<=n;t+=1){void 0!==A(e.charvals,b(e.barcode,t,1))||(o[i++]="bwipp.hibccode128badCharacter#29747",o[i++]="HIBC Code 128 must contain only digits, capital letters, spaces and the symbols -.$/+%",z())}if(o[i++]="barlen",o[i++]=e.barcode.length,e.validatecheck){var r=o[--i];o[i++]=L(r-1)}var a=o[--i];e[o[--i]]=a,e.checksum=41;for(var u=0,l=L(e.barlen-1);u<=l;u+=1)e.checksum=L(A(e.charvals,b(e.barcode,u,1))+e.checksum);e.checksum=e.checksum%43,e.validatecheck&&(A(e.barcode,e.barlen)!=A(e.barchars,e.checksum)&&(o[i++]="bwipp.hibccode128badCheckDigit#29761",o[i++]="Incorrect HIBC Code 128 check digit provided",z()),e.barcode=b(e.barcode,0,e.barlen));var h=c(L(e.barlen+2));y(h,1,e.barcode),e.barcode=h,v(e.barcode,0,43),v(e.barcode,L(e.barlen+1),A(e.barchars,e.checksum)),e.text=c(L(e.barlen+4)),v(e.text,0,42),y(e.text,1,e.barcode);var f=A(e.barcode,L(e.barlen+1));o[i++]=e.text,o[i++]=L(e.barlen+2),o[i++]=f,32==f&&(i--,o[i++]=95);var d=o[--i],p=o[--i];v(o[--i],p,d),v(e.text,L(e.barlen+3),42),v(e.options,"dontdraw",!0),v(e.options,"validatecheck",!1),o[i++]="args",o[i++]=e.barcode,o[i++]=e.options,te();var m=o[--i];e[o[--i]]=m,v(e.args,"txt",s([s([e.text,e.textxoffset,e.textyoffset,e.textfont,e.textsize])])),v(e.args,"textxalign","center"),v(e.args,"opt",e.options),o[i++]=e.args,e.dontdraw||Wt()}function Ut(){var e=Object.create(Ut.$ctx||(Ut.$ctx={}));e.dontdraw=!1,e.validatecheck=!1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],Ut.$ctx._29837||function(){var t=Object.create(e);t.barchars="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%",t.charvals=new Map;for(var n=0;n<=42;n+=1)v(t.charvals,b(t.barchars,n,1),n);for(var r in t)t.hasOwnProperty(r)&&(Ut.$ctx[r]=t[r]);Ut.$ctx._29837=1}();for(var t=0,n=e.barcode.length-1;t<=n;t+=1){void 0!==A(e.charvals,b(e.barcode,t,1))||(o[i++]="bwipp.hibcdatamatrixBadCharacter#29842",o[i++]="HIBC Data Matrix must contain only digits, capital letters, spaces and the symbols -.$/+%",z())}if(o[i++]="barlen",o[i++]=e.barcode.length,e.validatecheck){var r=o[--i];o[i++]=L(r-1)}var a=o[--i];e[o[--i]]=a,e.checksum=41;for(var s=0,u=L(e.barlen-1);s<=u;s+=1)e.checksum=L(A(e.charvals,b(e.barcode,s,1))+e.checksum);e.checksum=e.checksum%43,e.validatecheck&&(A(e.barcode,e.barlen)!=A(e.barchars,e.checksum)&&(o[i++]="bwipp.hibcdatamatrixBadCheckDigit#29856",o[i++]="Incorrect HIBC Data Matrix check digit provided",z()),e.barcode=b(e.barcode,0,e.barlen));var l=c(L(e.barlen+2));y(l,1,e.barcode),e.barcode=l,v(e.barcode,0,43),v(e.barcode,L(e.barlen+1),A(e.barchars,e.checksum)),v(e.options,"dontdraw",!0),v(e.options,"validatecheck",!1),o[i++]="args",o[i++]=e.barcode,o[i++]=e.options,nt();var h=o[--i];e[o[--i]]=h,v(e.args,"opt",e.options),o[i++]=e.args,e.dontdraw||Q()}function zt(){var e=Object.create(zt.$ctx||(zt.$ctx={}));e.dontdraw=!1,e.validatecheck=!1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],zt.$ctx._29924||function(){var t=Object.create(e);t.barchars="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%",t.charvals=new Map;for(var n=0;n<=42;n+=1)v(t.charvals,b(t.barchars,n,1),n);for(var r in t)t.hasOwnProperty(r)&&(zt.$ctx[r]=t[r]);zt.$ctx._29924=1}();for(var t=0,n=e.barcode.length-1;t<=n;t+=1){void 0!==A(e.charvals,b(e.barcode,t,1))||(o[i++]="bwipp.hibcdatamatrixrectangularBadCharacter#29929",o[i++]="HIBC Data Matrix Rectangular must contain only digits, capital letters, spaces and the symbols -.$/+%",z())}if(o[i++]="barlen",o[i++]=e.barcode.length,e.validatecheck){var r=o[--i];o[i++]=L(r-1)}var a=o[--i];e[o[--i]]=a,e.checksum=41;for(var s=0,u=L(e.barlen-1);s<=u;s+=1)e.checksum=L(A(e.charvals,b(e.barcode,s,1))+e.checksum);e.checksum=e.checksum%43,e.validatecheck&&(A(e.barcode,e.barlen)!=A(e.barchars,e.checksum)&&(o[i++]="bwipp.hibcdatamatrixrectangularBadCheckDigit#29943",o[i++]="Incorrect HIBC Data Matrix Rectangular check digit provided",z()),e.barcode=b(e.barcode,0,e.barlen));var l=c(L(e.barlen+2));y(l,1,e.barcode),e.barcode=l,v(e.barcode,0,43),v(e.barcode,L(e.barlen+1),A(e.barchars,e.checksum)),v(e.options,"dontdraw",!0),v(e.options,"validatecheck",!1),v(e.options,"format","rectangle"),o[i++]="args",o[i++]=e.barcode,o[i++]=e.options,nt();var h=o[--i],f=o[--i];e[f]=h,v(e.args,"opt",e.options),o[i++]=e.args,e.dontdraw||Q()}function Ht(){var e=Object.create(Ht.$ctx||(Ht.$ctx={}));e.dontdraw=!1,e.columns=2,e.validatecheck=!1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],Ht.$ctx._30013||function(){var t=Object.create(e);t.barchars="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%",t.charvals=new Map;for(var n=0;n<=42;n+=1)v(t.charvals,b(t.barchars,n,1),n);for(var r in t)t.hasOwnProperty(r)&&(Ht.$ctx[r]=t[r]);Ht.$ctx._30013=1}();for(var t=0,n=e.barcode.length-1;t<=n;t+=1){void 0!==A(e.charvals,b(e.barcode,t,1))||(o[i++]="bwipp.hibcpdf417BadCharacter#30018",o[i++]="HIBC PDF417 must contain only digits, capital letters, spaces and the symbols -.$/+%",z())}if(o[i++]="barlen",o[i++]=e.barcode.length,e.validatecheck){var r=o[--i];o[i++]=L(r-1)}var a=o[--i];e[o[--i]]=a,e.checksum=41;for(var s=0,u=L(e.barlen-1);s<=u;s+=1)e.checksum=L(A(e.charvals,b(e.barcode,s,1))+e.checksum);e.checksum=e.checksum%43,e.validatecheck&&(A(e.barcode,e.barlen)!=A(e.barchars,e.checksum)&&(o[i++]="bwipp.hibcpdf417BadCheckDigit#30032",o[i++]="Incorrect HIBC PDF417 check digit provided",z()),e.barcode=b(e.barcode,0,e.barlen));var l=c(L(e.barlen+2));y(l,1,e.barcode),e.barcode=l,v(e.barcode,0,43),v(e.barcode,L(e.barlen+1),A(e.barchars,e.checksum)),v(e.options,"dontdraw",!0),v(e.options,"columns",e.columns),v(e.options,"validatecheck",!1);var h=e.barcode;o[i++]="args",o[i++]=h,o[i++]=e.options,Ze();var f=o[--i];e[o[--i]]=f,v(e.args,"opt",e.options),o[i++]=e.args,e.dontdraw||Q()}function $t(){var e=Object.create($t.$ctx||($t.$ctx={}));e.dontdraw=!1,e.columns=2,e.validatecheck=!1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],$t.$ctx._30102||function(){var t=Object.create(e);t.barchars="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%",t.charvals=new Map;for(var n=0;n<=42;n+=1)v(t.charvals,b(t.barchars,n,1),n);for(var r in t)t.hasOwnProperty(r)&&($t.$ctx[r]=t[r]);$t.$ctx._30102=1}();for(var t=0,n=e.barcode.length-1;t<=n;t+=1){void 0!==A(e.charvals,b(e.barcode,t,1))||(o[i++]="bwipp.hibcmicropdf417BadCharacter#30107",o[i++]="HIBC MicroPDF417 must contain only digits, capital letters, spaces and the symbols -.$/+%",z())}if(o[i++]="barlen",o[i++]=e.barcode.length,e.validatecheck){var r=o[--i];o[i++]=L(r-1)}var a=o[--i];e[o[--i]]=a,e.checksum=41;for(var s=0,u=L(e.barlen-1);s<=u;s+=1)e.checksum=L(A(e.charvals,b(e.barcode,s,1))+e.checksum);e.checksum=e.checksum%43,e.validatecheck&&(A(e.barcode,e.barlen)!=A(e.barchars,e.checksum)&&(o[i++]="bwipp.hibcmicropdf417BadCheckDigit#30121",o[i++]="Incorrect HIBC MicroPDF417 check digit provided",z()),e.barcode=b(e.barcode,0,e.barlen));var l=c(L(e.barlen+2));y(l,1,e.barcode),e.barcode=l,v(e.barcode,0,43),v(e.barcode,L(e.barlen+1),A(e.barchars,e.checksum)),v(e.options,"dontdraw",!0),v(e.options,"columns",e.columns),v(e.options,"validatecheck",!1),o[i++]="args",o[i++]=e.barcode,o[i++]=e.options,tt();var h=o[--i];e[o[--i]]=h,v(e.args,"opt",e.options),o[i++]=e.args,e.dontdraw||Q()}function Qt(){var e=Object.create(Qt.$ctx||(Qt.$ctx={}));e.dontdraw=!1,e.validatecheck=!1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],Qt.$ctx._30190||function(){var t=Object.create(e);t.barchars="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%",t.charvals=new Map;for(var n=0;n<=42;n+=1)v(t.charvals,b(t.barchars,n,1),n);for(var r in t)t.hasOwnProperty(r)&&(Qt.$ctx[r]=t[r]);Qt.$ctx._30190=1}();for(var t=0,n=e.barcode.length-1;t<=n;t+=1){void 0!==A(e.charvals,b(e.barcode,t,1))||(o[i++]="bwipp.hibcqrcodeBadCharacter#30195",o[i++]="HIBC QR Code must contain only digits, capital letters, spaces and the symbols -.$/+%",z())}if(o[i++]="barlen",o[i++]=e.barcode.length,e.validatecheck){var r=o[--i];o[i++]=L(r-1)}var a=o[--i];e[o[--i]]=a,e.checksum=41;for(var s=0,u=L(e.barlen-1);s<=u;s+=1)e.checksum=L(A(e.charvals,b(e.barcode,s,1))+e.checksum);e.checksum=e.checksum%43,e.validatecheck&&(A(e.barcode,e.barlen)!=A(e.barchars,e.checksum)&&(o[i++]="bwipp.hibcqrcodeBadCheckDigit#30209",o[i++]="Incorrect HIBC QR Code check digit provided",z()),e.barcode=b(e.barcode,0,e.barlen));var l=c(L(e.barlen+2));y(l,1,e.barcode),e.barcode=l,v(e.barcode,0,43),v(e.barcode,L(e.barlen+1),A(e.barchars,e.checksum)),v(e.options,"dontdraw",!0),v(e.options,"validatecheck",!1),o[i++]="args",o[i++]=e.barcode,o[i++]=e.options,at();var h=o[--i];e[o[--i]]=h,v(e.args,"opt",e.options),o[i++]=e.args,e.dontdraw||Q()}function Vt(){var e=Object.create(Vt.$ctx||(Vt.$ctx={}));e.dontdraw=!1,e.validatecheck=!1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],Vt.$ctx._30277||function(){var t=Object.create(e);t.barchars="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%",t.charvals=new Map;for(var n=0;n<=42;n+=1)v(t.charvals,b(t.barchars,n,1),n);for(var r in t)t.hasOwnProperty(r)&&(Vt.$ctx[r]=t[r]);Vt.$ctx._30277=1}();for(var t=0,n=e.barcode.length-1;t<=n;t+=1){void 0!==A(e.charvals,b(e.barcode,t,1))||(o[i++]="bwipp.codablockfBadCharacter#30282",o[i++]="HIBC Codablock F must contain only digits, capital letters, spaces and the symbols -.$/+%",z())}if(o[i++]="barlen",o[i++]=e.barcode.length,e.validatecheck){var r=o[--i];o[i++]=L(r-1)}var a=o[--i];e[o[--i]]=a,e.checksum=41;for(var s=0,u=L(e.barlen-1);s<=u;s+=1)e.checksum=L(A(e.charvals,b(e.barcode,s,1))+e.checksum);e.checksum=e.checksum%43,e.validatecheck&&(A(e.barcode,e.barlen)!=A(e.barchars,e.checksum)&&(o[i++]="bwipp.hibccodablockfBadCheckDigit#30296",o[i++]="Incorrect HIBC Codablock F check digit provided",z()),e.barcode=b(e.barcode,0,e.barlen));var l=e.barlen,h=c(L(l+2));y(h,1,e.barcode),e.barcode=h,v(e.barcode,0,43),v(e.barcode,L(e.barlen+1),A(e.barchars,e.checksum)),v(e.options,"dontdraw",!0),v(e.options,"validatecheck",!1),o[i++]="args",o[i++]=e.barcode,o[i++]=e.options,qe();var f=o[--i];e[o[--i]]=f,v(e.args,"opt",e.options),o[i++]=e.args,e.dontdraw||Q()}function qt(){var e=Object.create(qt.$ctx||(qt.$ctx={}));e.dontdraw=!1,e.validatecheck=!1,o[i++]=e,U(),e.options=o[--i],e.barcode=o[--i],qt.$ctx._30364||function(){var t=Object.create(e);t.barchars="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%",t.charvals=new Map;for(var n=0;n<=42;n+=1)v(t.charvals,b(t.barchars,n,1),n);for(var r in t)t.hasOwnProperty(r)&&(qt.$ctx[r]=t[r]);qt.$ctx._30364=1}();for(var t=0,n=e.barcode.length-1;t<=n;t+=1){void 0!==A(e.charvals,b(e.barcode,t,1))||(o[i++]="bwipp.hibcazteccodeBadCharacter#30369",o[i++]="HIBC Aztec Code must contain only digits, capital letters, spaces and the symbols -.$/+%",z())}if(o[i++]="barlen",o[i++]=e.barcode.length,e.validatecheck){var r=o[--i];o[i++]=L(r-1)}var a=o[--i];e[o[--i]]=a,e.checksum=41;for(var s=0,u=L(e.barlen-1);s<=u;s+=1)e.checksum=L(A(e.charvals,b(e.barcode,s,1))+e.checksum);e.checksum=e.checksum%43,e.validatecheck&&(A(e.barcode,e.barlen)!=A(e.barchars,e.checksum)&&(o[i++]="bwipp.hibcazteccodeBadCheckDigit#30383",o[i++]="Incorrect HIBC Aztec Code check digit provided",z()),e.barcode=b(e.barcode,0,e.barlen));var l=c(L(e.barlen+2));y(l,1,e.barcode),e.barcode=l,v(e.barcode,0,43),v(e.barcode,L(e.barlen+1),A(e.barchars,e.checksum)),v(e.options,"dontdraw",!0),v(e.options,"validatecheck",!1),o[i++]="args",o[i++]=e.barcode,o[i++]=e.options,ht();var h=o[--i];e[o[--i]]=h,v(e.args,"opt",e.options),o[i++]=e.args,e.dontdraw||Q()}function Gt(){var e=Object.create(Gt.$ctx||(Gt.$ctx={}));e.options=o[--i],e.barcode=o[--i],e.dontdraw=!1,e.shortfinder=!1,e.includetext=!1,e.includecheck=!1,e.height=1,k(e.options,(function(){var t=o[--i];e[o[--i]]=t})),e.height=+e.height,(e.barcode.length<2||e.barcode.length>7)&&(o[i++]="bwipp.channelcodeBadLength#30458",o[i++]="Channel Code must be 2 to 7 digits",z()),k(e.barcode,(function(){var e=o[--i];(e<48||e>57)&&(o[i++]="bwipp.channelcodeBadCharacter#30462",o[i++]="Channel Code must contain only digits",z())})),p(e.barcode)>A(s([26,292,3493,44072,576688,7742862]),e.barcode.length-2)&&(o[i++]="bwipp.channelcodeTooBig#30466",o[i++]="The Channel Code value is too big for the number of channels",z()),e.nextb=function(){var t=o[--i],n=L(A(e.s,t)+L(A(e.b,L(t-1))+L(A(e.b,L(t-2))+A(e.s,L(t-1)))))>4?1:2;if(o[i++]=t,o[i++]=n,t<L(e.chan+2)){var r=o[--i],a=o[--i],u=o[--i];o[i++]=u,o[i++]=a,o[i++]=r;for(var c=r,l=u;c<=l;c+=1){var h=o[--i],f=o[--i];v(e.b,f,c);var d=o[--i],p=o[--i];o[i++]=p,o[i++]=d,o[i++]=f,o[i++]=h,o[i++]=L(L(d-c)+1),o[i++]=p,o[i++]=L(f+1),e.nexts()}}else{var m=o[--i],g=o[--i],y=o[--i];if(o[i++]=y,o[i++]=g,o[i++]=m,I(m,y)){var w=o[--i],x=o[--i],C=o[--i];if(v(e.b,x,C),o[i++]=C,o[i++]=x,o[i++]=w,e.value==e.target){o[i++]=1/0;for(var k=3;k<=10;k+=1)o[i++]=A(e.s,k),o[i++]=A(e.b,k);e.out=b(s(),0,2*e.chan)}e.value=e.value+1}}i-=4},e.nexts=function(){var t=o[--i];if(o[i++]=t,t<L(e.chan+2))o[i++]=1;else{var n=o[--i],r=o[--i];o[i++]=r,o[i++]=n,o[i++]=r}var a=o[--i],s=o[--i],u=o[--i];o[i++]=u,o[i++]=s;for(var c=a,l=u;c<=l;c+=1){var h=o[--i];v(e.s,h,c);var f=o[--i],d=o[--i];o[i++]=d,o[i++]=f,o[i++]=h,o[i++]=L(L(f-c)+1),o[i++]=d,o[i++]=h,e.nextb()}i-=3},e.encode=function(){e.chan=o[--i],e.target=o[--i],e.value=0,e.out=-1,e.b=s([1,1,1,0,0,0,0,0,0,0,0]),e.s=s([0,1,1,0,0,0,0,0,0,0,0]);var t=e.chan;o[i++]=t,o[i++]=t,o[i++]=3,e.nexts(),o[i++]=e.out},e.barlen=e.barcode.length,o[i++]="finder",e.shortfinder?o[i++]=s([1,1,1,1,1]):o[i++]=s([1,1,1,1,1,1,1,1,1]);var t=o[--i];e[o[--i]]=t,o[i++]="data",o[i++]=p(e.barcode),o[i++]=e.barlen+1,e.encode();var n=o[--i];if(e[o[--i]]=n,e.check=s([]),e.includecheck){e.mod23=A(s([s([]),s([]),s([13,12,4,9,3,1]),s([13,2,12,3,18,16,4,1]),s([11,16,17,8,20,4,10,2,5,1]),s([1,4,16,18,3,12,2,8,9,13,6,1]),s([20,16,22,13,15,12,5,4,8,9,21,3,7,1]),s([2,6,18,8,1,3,9,4,12,13,16,2,6,18,8,1])]),e.barlen),o[i++]=0;for(var r=0,a=e.data.length-1;r<=a;r+=1){var c=o[--i];o[i++]=L(c+L(A(e.data,r)-1)*A(e.mod23,r))}var l=o[--i];o[i++]=l%23,o[i++]=3,e.encode(),e.check=o[--i]}o[i++]=1/0,_(e.finder),_(e.data),_(e.check),e.sbs=s(),e.txt=s(e.barlen);for(var h=0,f=e.barlen-1;h<=f;h+=1)e.i=h,v(e.txt,e.i,s([b(e.barcode,e.i,1),0,0,"",0]));o[i++]=1/0;var d=e.sbs;o[i++]=1/0;for(var m=0,g=~~((e.sbs.length+1)/2);m<g;m++)o[i++]=e.height;var y=s();o[i++]=1/0;for(var w=0,x=~~((e.sbs.length+1)/2);w<x;w++)o[i++]=0;var C=s();o[i++]="ren",o[i++]=Wt,o[i++]="sbs",o[i++]=d,o[i++]="bhs",o[i++]=y,o[i++]="bbs",o[i++]=C,o[i++]="txt",o[i++]=e.txt,o[i++]="textxalign",o[i++]="center",o[i++]="opt",o[i++]=e.options;var E=u();o[i++]=E,e.dontdraw||Wt()}function Wt(){if(!a.bwipjs_dontdraw){var e=Object.create(Wt.$ctx||(Wt.$ctx={}));e.args=o[--i],e.sbs=s([]),e.bhs=s([]),e.bbs=s([]),e.txt=s([]),e.barcolor="unset",e.includetext=!1,e.textcolor="unset",e.textxalign="unset",e.textyalign="unset",e.textfont="OCR-B",e.textsize=10,e.textxoffset=0,e.textyoffset=0,e.textgaps=0,e.alttext="",e.bordercolor="unset",e.backgroundcolor="unset",e.inkspread=0,e.width=0,e.barratio=1,e.spaceratio=1,e.showborder=!1,e.borderleft=10,e.borderright=10,e.bordertop=1,e.borderbottom=1,e.borderwidth=.5,e.guardwhitespace=!1,e.guardleftpos=0,e.guardleftypos=0,e.guardrightpos=0,e.guardrightypos=0,e.guardwidth=7,e.guardheight=7,k(e.args,(function(){var t=o[--i];e[o[--i]]=t}));for(var t=e.opt,n=t.size,u=t.keys(),l=0;l<n;l++){var h=u.next().value;e[h]=t.get(h)}e.barcolor=""+e.barcolor,e.textcolor=""+e.textcolor,e.textxalign=""+e.textxalign,e.textyalign=""+e.textyalign,e.textfont=""+e.textfont,e.textsize=+e.textsize,e.textxoffset=+e.textxoffset,e.textyoffset=+e.textyoffset,e.textgaps=+e.textgaps,e.alttext=""+e.alttext,e.bordercolor=""+e.bordercolor,e.backgroundcolor=""+e.backgroundcolor,e.inkspread=+e.inkspread,e.width=+e.width,e.barratio=+e.barratio,e.spaceratio=+e.spaceratio,e.borderleft=+e.borderleft,e.borderright=+e.borderright,e.bordertop=+e.bordertop,e.borderbottom=+e.borderbottom,e.borderwidth=+e.borderwidth,e.guardleftpos=+e.guardleftpos,e.guardleftypos=+e.guardleftypos,e.guardrightpos=+e.guardrightpos,e.guardrightypos=+e.guardrightypos,e.guardwidth=+e.guardwidth,e.guardheight=+e.guardheight,e.bars=s(~~((e.sbs.length+1)/2)),e.x=0,e.maxh=0;for(var f=0,d=2*~~((e.sbs.length+1)/2)-2;f<=d;f+=1)e.i=f,e.i%2==0?(e.d=L(L(A(e.sbs,e.i)*e.barratio-e.barratio)+1),0!=A(e.sbs,e.i)?(e.h=72*A(e.bhs,~~(e.i/2)),e.c=L(e.d/2+e.x),e.y=72*A(e.bbs,~~(e.i/2)),e.w=L(e.d-e.inkspread),v(e.bars,~~(e.i/2),s([e.h,e.c,e.y,e.w])),L(e.h+e.y)>e.maxh&&(e.maxh=L(e.h+e.y))):v(e.bars,~~(e.i/2),-1)):e.d=L(L(A(e.sbs,e.i)*e.spaceratio-e.spaceratio)+1),e.x=L(e.x+e.d);r.save();var p=r.currpos();r.translate(p.x,p.y),0!=e.width&&r.scale(72*e.width/e.x,1),r.newpath(),r.moveto(-e.borderleft,-e.borderbottom),r.rlineto(L(L(e.x+e.borderleft)+e.borderright),0),r.rlineto(0,L(L(e.maxh+e.borderbottom)+e.bordertop)),r.rlineto(-L(L(e.x+e.borderleft)+e.borderright),0),r.rlineto(0,-L(L(e.maxh+e.borderbottom)+e.bordertop)),r.closepath(),e.showborder&&(r.save(),D(e.bordercolor,"unset")&&r.setcolor(e.bordercolor),r.setlinewidth(e.borderwidth),r.stroke(),r.restore()),r.save(),D(e.barcolor,"unset")&&r.setcolor(e.barcolor);for(var m=e.bars,g=0,b=m.length;g<b;g++){var y=A(m,g);if(o[i++]=y,-1!=y){_(o[--i]),r.newpath(),r.setlinewidth(o[--i]);var w=o[--i];r.moveto(o[--i],w),r.rlineto(0,o[--i]),r.stroke()}else i--}if(r.restore(),D(e.textcolor,"unset")&&r.setcolor(e.textcolor),e.includetext)if(T(e.textxalign,"unset")&&T(e.textyalign,"unset")&&T(e.alttext,"")){e.s=0,e.fn="";for(var x=e.txt,C=0,E=x.length;C<E;C++){k(A(x,C));var S=o[--i],O=o[--i];if(o[i++]=O,o[i++]=S,S!=e.s||D(O,e.fn)){var B=o[--i],I=o[--i];e.s=B,e.fn=I,r.selectfont(I,B)}else i-=2;var M=o[--i];r.moveto(o[--i],M),r.show(o[--i],0,0)}}else{if(r.selectfont(e.textfont,e.textsize),T(e.alttext,"")){o[i++]=1/0;for(var j=e.txt,N=0,F=j.length;N<F;N++)k(A(A(j,N),0));e.txt=s(),e.tstr=c(e.txt.length);for(var R=0,P=e.txt.length-1;R<=P;R+=1)v(e.tstr,R,A(e.txt,R))}else e.tstr=e.alttext;if(0==e.tstr.length)o[i++]=0;else{r.save(),r.newpath(),r.moveto(0,0),r.charpath("0",!1);var U=r.pathbbox();r.restore(),o[i++]=U.ury}e.textascent=o[--i];var z=r.stringwidth(e.tstr);e.textwidth=L(z.w+(e.tstr.length-1)*e.textgaps),e.textxpos=L(e.textxoffset+L(e.x-e.textwidth)/2),T(e.textxalign,"left")&&(e.textxpos=e.textxoffset),T(e.textxalign,"right")&&(e.textxpos=L(L(e.x-e.textxoffset)-e.textwidth)),T(e.textxalign,"offleft")&&(e.textxpos=-L(e.textwidth+e.textxoffset)),T(e.textxalign,"offright")&&(e.textxpos=L(e.x+e.textxoffset)),T(e.textxalign,"justify")&&e.textwidth<e.x&&(e.textxpos=0,e.textgaps=L(e.x-e.textwidth)/(e.tstr.length-1)),e.textypos=-L(L(e.textyoffset+e.textascent)+1),T(e.textyalign,"above")&&(e.textypos=L(L(e.textyoffset+e.maxh)+1)),T(e.textyalign,"center")&&(e.textypos=L(e.textyoffset+L(e.maxh-e.textascent)/2)),r.moveto(e.textxpos,e.textypos),r.show(e.tstr,e.textgaps,0)}e.guardwhitespace&&(r.selectfont("OCR-B",2*e.guardheight),0!=e.guardleftpos&&(r.moveto(L(-e.guardleftpos-1),L(L(e.guardleftypos-e.guardheight/2)-1.5)),r.show("<",0,0)),0!=e.guardrightpos&&(r.moveto(L(L(L(e.guardrightpos+e.x)-e.guardwidth)+1),L(L(e.guardrightypos-e.guardheight/2)-1.5)),r.show(">",0,0))),r.restore()}}function Kt(){if(!a.bwipjs_dontdraw){var e=Object.create(Kt.$ctx||(Kt.$ctx={}));e.args=o[--i],e.barcolor="unset",e.backgroundcolor="unset",k(e.args,(function(){var t=o[--i];e[o[--i]]=t}));for(var t=e.opt,n=t.size,s=t.keys(),u=0;u<n;u++){var c=s.next().value;e[c]=t.get(c)}e.barcolor=""+e.barcolor,e.backgroundcolor=""+e.backgroundcolor,r.save(),D(e.barcolor,"unset")&&r.setcolor(e.barcolor),r.maxicode(e.pixs),r.restore()}}function Yt(e,t,n,s,u){if("string"!=typeof n)throw new Error("bwipp.typeError: barcode text not a string ("+n+")");if("string"==typeof(s=s||{})){var c=s.split(" ");s={};for(var l=0;l<c.length;l++)if(c[l]){var h=c[l].indexOf("=");-1==h?s[c[l]]=!0:s[c[l].substr(0,h)]=c[l].substr(h+1)}}else if("object"!=typeof s||s.constructor!==Object)throw new Error("bwipp.typeError: options not an object");/[\u0100-\uffff]/.test(n)&&(n=unescape(encodeURIComponent(n))),a.bwipjs_dontdraw=s.dontdraw||u||!1;var f=new Map;for(var d in s)s.hasOwnProperty(d)&&f.set(d,s[d]);return r=e,o=[n,f],i=2,t(),!i||o.splice(0,i)}function Xt(e){if(!e)throw new Error("bwipp.undefinedEncoder: bcid is not defined");switch(e.replace(/-/g,"_")){case"auspost":return Pe;case"azteccode":return ht;case"azteccodecompact":return ft;case"aztecrune":return dt;case"bc412":return Ie;case"channelcode":return Gt;case"codablockf":return qe;case"code11":return Be;case"code128":return te;case"code16k":return Ge;case"code2of5":return Ee;case"code32":return se;case"code39":return oe;case"code39ext":return ae;case"code49":return We;case"code93":return ce;case"code93ext":return le;case"codeone":return pt;case"coop2of5":return Te;case"daft":return Xe;case"databarexpanded":return ye;case"databarexpandedcomposite":return Tt;case"databarexpandedstacked":return we;case"databarexpandedstackedcomposite":return Dt;case"databarlimited":return be;case"databarlimitedcomposite":return Ot;case"databaromni":return me;case"databaromnicomposite":return kt;case"databarstacked":return ge;case"databarstackedcomposite":return Et;case"databarstackedomni":return Ae;case"databarstackedomnicomposite":return St;case"databartruncated":return ve;case"databartruncatedcomposite":return _t;case"datalogic2of5":return De;case"datamatrix":return nt;case"datamatrixrectangular":return rt;case"datamatrixrectangularextension":return it;case"dotcode":return gt;case"ean13":return G;case"ean13composite":return yt;case"ean14":return re;case"ean2":return q;case"ean5":return V;case"ean8":return W;case"ean8composite":return wt;case"flattermarken":return Ke;case"gs1_128":return ne;case"gs1_128composite":return Bt;case"gs1_cc":return bt;case"gs1datamatrix":return It;case"gs1datamatrixrectangular":return Mt;case"gs1dldatamatrix":return jt;case"gs1dlqrcode":return Ft;case"gs1dotcode":return Rt;case"gs1northamericancoupon":return xe;case"gs1qrcode":return Nt;case"hanxin":return mt;case"hibcazteccode":return qt;case"hibccodablockf":return Vt;case"hibccode128":return Lt;case"hibccode39":return Pt;case"hibcdatamatrix":return Ut;case"hibcdatamatrixrectangular":return zt;case"hibcmicropdf417":return $t;case"hibcpdf417":return Ht;case"hibcqrcode":return Qt;case"iata2of5":return _e;case"identcode":return de;case"industrial2of5":return Se;case"interleaved2of5":return he;case"isbn":return X;case"ismn":return J;case"issn":return Z;case"itf14":return fe;case"jabcode":return vt;case"japanpost":return Ue;case"kix":return Le;case"leitcode":return pe;case"mailmark":return ot;case"mands":return ee;case"matrix2of5":return Oe;case"maxicode":return lt;case"micropdf417":return tt;case"microqrcode":return ut;case"msi":return ze;case"onecode":return je;case"pdf417":return Ze;case"pdf417compact":return et;case"pharmacode":return Ce;case"pharmacode2":return ke;case"planet":return Fe;case"plessey":return He;case"posicode":return Ve;case"postnet":return Ne;case"pzn":return ue;case"qrcode":return at;case"rationalizedCodabar":return Me;case"raw":return Ye;case"rectangularmicroqrcode":return ct;case"royalmail":return Re;case"sscc18":return ie;case"swissqrcode":return st;case"symbol":return Je;case"telepen":return $e;case"telepennumeric":return Qe;case"ultracode":return At;case"upca":return K;case"upcacomposite":return xt;case"upce":return Y;case"upcecomposite":return Ct}throw new Error("bwipp.unknownEncoder: unknown encoder name: "+e)}var Jt=function(){var e=Math.floor,t=Math.round,n=Math.ceil,r=Math.min,i=Math.max;function o(e){if(this.constructor!==o)return new o(e);this.gstk=[],this.cmds=[],this.drawing=e,this.reset(),this.minx=this.miny=1/0,this.maxx=this.maxy=-1/0}return o.prototype.reset=function(){this.g_tdx=0,this.g_tdy=0,this.g_tsx=1,this.g_tsy=1,this.g_posx=0,this.g_posy=0,this.g_penw=1,this.g_path=[],this.g_font=null,this.g_rgb=[0,0,0],this.g_clip=!1},o.prototype.save=function(){var e={};for(var t in this)0==t.indexOf("g_")&&(e[t]=n(this[t]));function n(e){if(e instanceof Array){for(var t=[],r=0;r<e.length;r++)t[r]=n(e[r]);return t}if(e instanceof Object){t={};for(var i in e)t[i]=n(e[i]);return t}return e}this.gstk.push(e)},o.prototype.restore=function(){if(!this.gstk.length)throw new Error("grestore: stack underflow");var e=this.gstk.pop(),t=this;for(var n in this.g_clip&&!e.g_clip&&this.cmds.push((function(){t.drawing.unclip()})),e)this[n]=e[n]},o.prototype.currpos=function(){return{x:(this.g_posx-this.g_tdx)/this.g_tsx,y:(this.g_posy-this.g_tdy)/this.g_tsy}},o.prototype.currfont=function(){return this.g_font},o.prototype.translate=function(e,t){this.g_tdx=this.g_tsx*e,this.g_tdy=this.g_tsy*t},o.prototype.scale=function(e,t){this.g_tsx*=e,this.g_tsy*=t;var n=this.drawing.scale(this.g_tsx,this.g_tsy);n&&n[0]&&n[1]&&(this.g_tsx=n[0],this.g_tsy=n[1])},o.prototype.setlinewidth=function(e){this.g_penw=e},o.prototype.selectfont=function(e,t){this.g_font={FontName:this.jsstring(e),FontSize:+t}},o.prototype.getfont=function(){return this.g_font.FontName},o.prototype.jsstring=function(e){if(e instanceof Uint8Array){for(var t=0,n=e.length;t<n&&e[t];t++);return t<n?String.fromCharCode.apply(null,e.subarray(0,t)):String.fromCharCode.apply(null,e)}return""+e},o.prototype.setcolor=function(e){if(e instanceof Uint8Array&&(e=this.jsstring(e)),6==e.length){var n=parseInt(e.substr(0,2),16),r=parseInt(e.substr(2,2),16),i=parseInt(e.substr(4,2),16);this.g_rgb=[n,r,i]}else if(8==e.length){var o=parseInt(e.substr(0,2),16)/255,a=parseInt(e.substr(2,2),16)/255,s=parseInt(e.substr(4,2),16)/255,u=parseInt(e.substr(6,2),16)/255;n=t((1-o)*(1-u)*255),r=t((1-a)*(1-u)*255),i=t((1-s)*(1-u)*255);this.g_rgb=[n,r,i]}},o.prototype.setrgbcolor=function(e,t,n){this.g_rgb=[e,t,n]},o.prototype.getRGB=function(){var e=this.g_rgb[0].toString(16),t=this.g_rgb[1].toString(16),n=this.g_rgb[2].toString(16);return"00".substr(e.length)+e+"00".substr(t.length)+t+"00".substr(n.length)+n},o.prototype.newpath=function(){this.g_path=[]},o.prototype.closepath=function(){var e=this.g_path,t=e.length;if(t){for(var n=t-1;n>=0&&"l"==e[n].op;n--);if(++n<t-1){for(var r=[],i=1/0,o=1/0,a=-1/0,s=-1/0,u=n;u<t;u++){var c=e[u];r.push([c.x0,c.y0]),i>c.x0&&(i=c.x0),a<c.x0&&(a=c.x0),o>c.y0&&(o=c.y0),s<c.y0&&(s=c.y0)}c=e[t-1];var l=e[n];c.x1==l.x0&&c.y1==l.y0||(r.push([c.x1,c.y1]),i>c.x1&&(i=c.x1),a<c.x1&&(a=c.x1),o>c.y1&&(o=c.y1),s<c.y1&&(s=c.y1)),e.splice(n,t-n,{op:"p",x0:i,y0:o,x1:a,y1:s,poly:r})}else e.push({op:"c"})}},o.prototype.moveto=function(e,t){this.g_posx=this.g_tdx+this.g_tsx*e,this.g_posy=this.g_tdy+this.g_tsy*t},o.prototype.rmoveto=function(e,t){this.g_posx+=this.g_tsx*e,this.g_posy+=this.g_tsy*t},o.prototype.lineto=function(e,n){var r=t(this.g_posx),i=t(this.g_posy);this.g_posx=this.g_tdx+this.g_tsx*e,this.g_posy=this.g_tdy+this.g_tsy*n;var o=t(this.g_posx),a=t(this.g_posy);this.g_path.push({op:"l",x0:r,y0:i,x1:o,y1:a})},o.prototype.rlineto=function(e,n){var r=t(this.g_posx),i=t(this.g_posy);this.g_posx+=this.g_tsx*e,this.g_posy+=this.g_tsy*n;var o=t(this.g_posx),a=t(this.g_posy);this.g_path.push({op:"l",x0:r,y0:i,x1:o,y1:a})},o.prototype.arc=function(e,t,n,r,i,o){if(r!=i){if(0!=r&&360!=r||0!=i&&360!=i)throw new Error("arc: not a full circle ("+r+","+i+")");e=this.g_tdx+this.g_tsx*e,t=this.g_tdy+this.g_tsy*t;var a=n*this.g_tsx,s=n*this.g_tsy;this.g_path.push({op:"e",x0:e-a,y0:t-s,x1:e+a,y1:t+s,x:e,y:t,rx:a,ry:s,sa:r,ea:i,ccw:o})}},o.prototype.stringwidth=function(e){var t=this.g_tsx,n=this.g_tsy,r=+this.g_font.FontSize||10;e=this.jsstring(e);var i=this.drawing.measure(e,this.g_font.FontName,r*t,r*n);return{w:i.width/t,h:(i.ascent+i.descent)/n,a:i.ascent/n,d:i.descent/n}},o.prototype.charpath=function(e,t){var n=this.stringwidth(e);this.rlineto(0,n.a),this.rlineto(n.w,0),this.rlineto(0,-n.h)},o.prototype.pathbbox=function(){if(!this.g_path.length)throw new Error("pathbbox: --nocurrentpoint--");for(var e=this.g_path,t=1/0,n=1/0,r=-1/0,i=-1/0,o=0;o<e.length;o++){var a=e[o];"c"!=a.op&&(a.x0<a.x1?(t>a.x0&&(t=a.x0),r<a.x1&&(r=a.x1)):(t>a.x1&&(t=a.x1),r<a.x0&&(r=a.x0)),a.y0<a.y1?(n>a.y0&&(n=a.y0),i<a.y1&&(i=a.y1)):(n>a.y1&&(n=a.y1),i<a.y0&&(i=a.y0)))}return{llx:(t-this.g_tdx)/this.g_tsx,lly:(n-this.g_tdy)/this.g_tsy,urx:(r-this.g_tdx)/this.g_tsx,ury:(i-this.g_tdy)/this.g_tsy}},o.prototype.transform=function(e){for(var t=this.minx,n=this.maxy,r=0;r<e.length;r++){var i=e[r];i[0]=i[0]-t,i[1]=n-i[1]}},o.prototype.stroke=function(){var t=this.g_tsx,o=this.g_tsy,a=this.g_path,s=this.getRGB();this.g_path=[];for(var u=e(this.g_penw*t+.66),c=e(this.g_penw*o+.66),l=0;l<a.length;l++){var h=a[l];if("l"==h.op){if(h.x0!=h.x1&&h.y0!=h.y1)throw new Error("stroke: --not-orthogonal--");var f=h.x0,d=h.y0,p=h.x1,m=h.y1,g=u/2,A=c/2;if(f>p){var v=f;f=p,p=v}if(d>m){v=d;d=m,m=v}f==p?this.bbox(f-g,d,f+u-g-1,m):this.bbox(f,d-c+A+1,p,m+A)}else{if("p"!=h.op)throw new Error("stroke: --not-a-line--");var b=1/0,y=1/0,w=-1/0,x=-1/0,C=h.poly;if(4!=C.length)throw new Error("stroke: --not-a-rect--");l=0;for(var k=C.length-1;l<C.length;k=l++){var E=C[k][0],S=C[k][1],_=C[l][0],O=C[l][1];if(_!=E&&O!=S)throw new Error("stroke: --not-orthogonal--");_<b&&(b=_),_>w&&(w=_),O<y&&(y=O),O>x&&(x=O)}g=n(u/2),A=n(c/2);this.bbox(b-g,y-A,w+g,x+A)}}var T=this;this.cmds.push((function(){for(var e=n(u/2),t=n(c/2),o=u-e,l=c-t,h=0;h<a.length;h++){var f=a[h];if("l"==f.op){var d=[[f.x0,f.y0],[f.x1,f.y1]];T.transform(d),T.drawing.line(d[0][0],d[0][1],d[1][0],d[1][1],f.x0==f.x1?u:c,s),T.fill(s)}else{d=f.poly;T.transform(d);var p=r(d[0][0],d[2][0]),m=i(d[0][0],d[2][0]),g=r(d[0][1],d[2][1]),A=i(d[0][1],d[2][1]);T.drawing.polygon([[p-e,g-t],[p-e,A+t+1],[m+e+1,A+t+1],[m+e+1,g-t]]),T.drawing.polygon([[p+o,g+l],[p+o,A-l+1],[m-o+1,A-l+1],[m-o+1,g+l]]),T.drawing.fill(s)}}}))},o.prototype.fill=function(){var e=this.g_path,t=this.getRGB();this.g_path=[];for(var n=0;n<e.length;n++){var r=e[n];if("p"==r.op){for(var i=1/0,o=1/0,a=-1/0,s=-1/0,u=r.poly,c=0;c<u.length;c++){var l=u[c][0],h=u[c][1];l<i&&(i=l),l>a&&(a=l),h<o&&(o=h),h>s&&(s=h)}this.bbox(i,o+1,a-1,s)}else{if("e"!=r.op)throw new Error("fill: --not-a-polygon--");this.bbox(r.x-r.rx,r.y-r.ry,r.x+r.rx,r.y+r.ry)}}var f=this;this.cmds.push((function(){for(var n=0;n<e.length;n++){var r=e[n];if("p"==r.op){var i=r.poly;f.transform(i),f.drawing.polygon(i)}else if("e"==r.op){i=[[r.x,r.y]];f.transform(i),f.drawing.ellipse(i[0][0],i[0][1],r.rx,r.ry,r.ccw)}}f.drawing.fill(t)}))},o.prototype.clip=function(){var e=this.g_path;this.g_path=[],this.g_clip=!0;var t=this;this.cmds.push((function(){for(var n=[],r=0;r<e.length;r++){var i=e[r];if("p"!=i.op)throw new Error("clip: only polygon regions supported");var o=i.poly;t.transform(o),n.push(o)}t.drawing.clip(n)}))},o.prototype.maxicode=function(e){var t,n,r,i,o=this.g_tsx,a=this.g_tsy,s=this.getRGB(),u=1.04*o*100,c=u/30|0;u-(30*c-1)>9&&c++,1&(t=c-(r=o/2|0))&&t--;var l=t/2-1,h=(l+1)/2|0,f=(n=(4*a|0)-(i=a/2|0))-2-2*h;this.bbox(0,0,30*c-r,3*a*32+4*a-i);var d=this;this.cmds.push((function(){for(var t=0;t<e.length;t++){var r=e[t],i=r%30;i*=c,i+=1&(p=r/30|0)?c:c/2,p=33-p,p*=3*a,p+=2*a-n/2,p|=0;var u=[[(i|=0)-.5,p--]];p-=h-1,u.push([i-1-l,p--]),p-=f,u.push([i-1-l,p--]),p-=h-1,u.push([i-.5,p++]),p+=h-1,u.push([i+l,p++]),p+=f,u.push([i+l,p++]),d.transform(u),d.drawing.hexagon(u,s)}d.drawing.fill(s);i=14*c+c/2+.01|0;var p=51*a-h/2+.01|0;d.drawing.ellipse(i,p,2.0209*o+.01|0,2.0209*a+.01|0,!0),d.drawing.ellipse(i,p,4.67565*o+.01|0,4.67565*a+.01|0,!1),d.drawing.fill(s),d.drawing.ellipse(i,p,2.1058*3.5*o+.01|0,2.1058*3.5*a+.01|0,!0),d.drawing.ellipse(i,p,10.0254*o+.01|0,10.0254*a+.01|0,!1),d.drawing.fill(s),d.drawing.ellipse(i,p,12.68015*o+.01|0,12.68015*a+.01|0,!0),d.drawing.ellipse(i,p,4.3814*3.5*o+.01|0,4.3814*3.5*a+.01|0,!1),d.drawing.fill(s)}))},o.prototype.show=function(e,t,n){if(e.length){var r=this.g_tsx,i=this.g_tsy,o=this.g_font.FontName||"OCR-B",a=this.g_font.FontSize||10,s=a*r,u=a*i,c=this.g_posx,l=this.g_posy,h=this.getRGB();e=this.jsstring(e),t=r*t||0;var f=l+(n=i*n||0),d=this.drawing.measure(e,o,s,u),p=d.width+(e.length-1)*t;this.bbox(c,f-d.descent+1,c+p-1,f+d.ascent),this.g_posx+=p;var m=this;m.cmds.push((function(){var n=c-m.minx,r=m.maxy-l;m.drawing.text(n,r,e,h,{name:o,width:s,height:u,dx:t})}))}},o.prototype.bbox=function(t,r,i,o){if(t>i){var a=t;t=i,i=a}if(r>o){a=r;r=o,o=a}t=e(t),r=e(r),i=n(i),o=n(o),this.minx>t&&(this.minx=t),this.maxx<i&&(this.maxx=i),this.miny>r&&(this.miny=r),this.maxy<o&&(this.maxy=o)},o.prototype.render=function(){if(this.minx===1/0)return new Promise((function(e,t){e(null)}));this.drawing.init(this.maxx-this.minx+1,this.maxy-this.miny+1,this.g_tsx,this.g_tsy);for(var e=0,t=this.cmds.length;e<t;e++)this.cmds[e]();return this.drawing.end()},o}();function Zt(e){Math.floor;var t,n,r,i,o,a,s,u,c,l,h,f=0,d=0,p=0,m=0,g=0,A=0;return{scale:function(t,n){return"swissqrcode"==e.bcid?[t,n]:[0|t||1,0|n||1]},measure:function(e,t,n,r){n|=0,r|=0;for(var i=tn.lookup(t),o=0,a=0,s=0,u=0,c=e.length;u<c;u++){var l=e.charCodeAt(u),h=tn.getglyph(i,l,n,r);a=Math.max(a,h.top),s=Math.max(s,h.height-h.top),o+=u==c-1?h.left+h.width:h.advance}return{width:o,ascent:a,descent:s}},init:function(v,b){var y=e.paddingleft,w=e.paddingright,x=e.paddingtop,C=e.paddingbottom,k=e.rotate||"N";if(v+=y+w,b+=x+C,+e.sizelimit&&+e.sizelimit<v*b)throw new Error("Image size over limit");switch(k){case"R":d=-1,p=1,m=1;break;case"I":f=-1,p=1,g=-1,A=1;break;case"L":d=1,m=-1,A=1;break;default:f=g=1}var E="L"==k||"R"==k;r=E?b:v,i=E?v:b,o=y,a=x,(l=[]).min=1/0,h=null,s=u=c=0;var S=this.image(r,i);t=S.buffer,n=S.ispng?1:0},line:function(e,t,n,r,i,o){if(e|=0,t|=0,n|=0,r|=0,i=Math.round(i)||1,r<t){var a=t;t=r,r=a}if(n<e){a=e;e=n,n=a}s=parseInt(o.substr(0,2),16),u=parseInt(o.substr(2,2),16),c=parseInt(o.substr(4,2),16);var l=i/2|0;e==n?(e=e-i+l,n=n+l-1):(t-=l,r=r+i-l-1);for(var h=t;h<=r;h++)for(var f=e;f<=n;f++)v(f,h,255)},polygon:function(e){for(var t=e.length,n=t-1,r=0;r<t;n=r++)if(e[n][0]==e[r][0]){var i=0|e[n][0],o=0|e[n][1],a=0|e[r][1];if(o>a)for(var s=a+1;s<o;s++)b(i,s);else for(s=o+1;s<a;s++)b(i,s)}else{i=0|e[n][0];var u=0|e[r][0];o=0|e[n][1];if(i<u){var c=e[0==n?t-1:n-1][1],l=e[r==t-1?0:r+1][1];c>o&&b(i,o),l>o&&b(u,o)}else{c=e[r==t-1?0:r+1][1],l=e[0==n?t-1:n-1][1];c>o&&b(u,o),l>o&&b(i,o)}}},hexagon:function(e,t){var n=0|e[0][0],r=0|e[0][1],i=e[1][1]-e[0][1]|0,o=e[2][1]-e[1][1]-1|0,a=0|e[2][0],l=0|e[4][0];s=parseInt(t.substr(0,2),16),u=parseInt(t.substr(2,2),16),c=parseInt(t.substr(4,2),16),y(n,n+1,r++);for(var h=1;h<i;h++)y(n-2*h,n+1+2*h,r++);for(h=0;h<=o;h++)y(a,l,r++);for(h=i-1;h>=1;h--)y(n-2*h,n+1+2*h,r++);y(n,n+1,r)},ellipse:function(e,t,n,r,i){!function(e,t,n,r,i){e|=0,t|=0,n|=0,r|=0;var o,a=Math.abs(n-e),s=Math.abs(r-t),u=1&s,c=4*(1-a)*s*s,l=4*(u+1)*a*a,h=c+l+u*a*a,f=[],d=[];f.min=d.min=1/0,e>n&&(e=n,n+=a);t>r&&(t=r);r=(t+=(s+1)/2|0)-u,a*=8*a,u=8*s*s;do{A(d,n,t),g(f,e,t),g(f,e,r),A(d,n,r),(o=2*h)>=c&&(e++,n--,h+=c+=u),o<=l&&(t++,r--,h+=l+=a)}while(e<=n);for(;t-r<s;)A(d,n+1,t),g(f,e-1,t++),g(f,e-1,r),A(d,n+1,r--);for(var p=f.min,m=f.length-1;p<=m;p++)b(f[p],p);for(p=d.min,m=d.length-1;p<=m;p++)b(d[p]+1,p);function g(e,t,n){e.min>n&&(e.min=n);var r=e[n];(null==r||r>t)&&(e[n]=t)}function A(e,t,n){e.min>n&&(e.min=n);var r=e[n];(null==r||r<t)&&(e[n]=t)}}(e-n|0,t-r|0,e+n|0,t+r|0)},fill:function(e){s=parseInt(e.substr(0,2),16),u=parseInt(e.substr(2,2),16),c=parseInt(e.substr(4,2),16),function(){for(var e=l.min,t=l.length-1,n=e;n<=t;n++){var r=l[n];if(r){r.sort((function(e,t){return e-t}));for(var i=!1,o=0,a=0,s=r.length;a<s;a++){var u=r[a];i?y(o,u-1,n):o=u,i=!i}}}}(),(l=[]).min=1/0},clip:function(e){h||((h=[]).min=1/0);var t=l;l=h;for(var n=0,r=e.length;n<r;n++)this.polygon(e[n]);l=t},unclip:function(){h=null},text:function(e,t,n,r,i){e|=0,t|=0,s=parseInt(r.substr(0,2),16),u=parseInt(r.substr(2,2),16),c=parseInt(r.substr(4,2),16);for(var o=tn.lookup(i.name),a=0|i.width,l=0|i.height,h=0|i.dx,f=0;f<n.length;f++){for(var d=n.charCodeAt(f),p=tn.getglyph(o,d,a,l),m=t-p.top,g=p.left,A=p.width,b=p.height,y=p.bytes,w=p.offset,x=0;x<A;x++)for(var C=0;C<b;C++){var k=y[w+C*A+x];k&&v(e+g+x,m+C,k)}e+=p.advance+h}},end:function(){}};function v(e,l,v){if(!h||!function(e,t){var n=h[t];if(!n)return!0;n.sorted||(n.sort((function(e,t){return e-t})),n.sorted=!0);for(var r=!1,i=0,o=n.length;i<o;i++){var a=n[i];if(a>e)return!r;if(a==e)return r;r=!r}return!0}(e,l)){var b=m*(e+=o)+g*(l+=a)+0*(r-1)+A*(i-1),y=4*(b*r+(f*e+d*l+p*(r-1)+0*(i-1)))+(b+1)*n,w=v/255,x=(1-w)*(t[y+3]/255),C=w+x;t[y+0]=(s*w+t[y+0]*x)/C|0,t[y+1]=(u*w+t[y+1]*x)/C|0,t[y+2]=(c*w+t[y+2]*x)/C|0,t[y+3]=255*C|0}}function b(e,t){l.min>t&&(l.min=t),l[t]?l[t].push(e):l[t]=[e]}function y(e,t,n){for(;e<=t;)v(e++,n,255)}}function en(e,t){if(null==typeof window)throw new Error("DrawingCanvas: not a browser");var n,r=t.getContext("2d",{willReadFrequently:!0}),i=Zt(e);return i.image=function(i,o){t.width=i,t.height=o,r.setTransform(1,0,0,1,0,0),/^[0-9a-fA-F]{6}$/.test(""+e.backgroundcolor)?(r.fillStyle="#"+e.backgroundcolor,r.fillRect(0,0,i,o)):r.clearRect(0,0,i,o);return{buffer:(n=r.getImageData(0,0,i,o)).data,ispng:!1}},i.end=function(){r.putImageData(n,0,0)},i}var tn=function(){var e=[],t={},n={},r={},i=0;return r.next=r,r.prev=r,{lookup:function(e){var n=t[e.toUpperCase()];return void 0===n?1:n},monochrome:function(e){if(e)throw new Error("fontlib: monochrome not implemented")},getglyph:function(t,o,a,s){o|=0,(!(a=+a)||a<8)&&(a=8);(!(s=+s)||s<8)&&(s=a);((t|=0)<0||t>=e.length)&&(t=1);(!o||o<32)&&(o=32);var u=t+"c"+o+"w"+a+"h"+s;if(c=n[u]){return c.prev.next=c.next,c.next.prev=c.prev,(h=r).next.prev=c,c.next=h.next,c.prev=h,h.next=c,c}var c,l=e[t];if((c=nn.GetGlyph(l,o,a*l.bwipjs_multx/100,s*l.bwipjs_multy/100)).bytes=c.pixels,c.cachekey=u,c.offset=0,i>250){var h,f=(h=r).prev;f.prev.next=h,h.prev=f.prev,f.next=f.prev=null,delete n[f.cachekey]}else i++;return n[u]=c,(h=r).next.prev=c,c.next=h.next,c.prev=h,h.next=c,c},getpaths:function(t,n,r,i){n|=0,(!(r=+r)||r<8)&&(r=8);(!(i=+i)||i<8)&&(i=r);((t|=0)<0||t>=e.length)&&(t=1);(!n||n<32)&&(n=32);var o=e[t];return nn.GetPaths(o,n,r*o.bwipjs_multx/100,i*o.bwipjs_multy/100)},loadFont:function(n){var r=100,i=100,o=null;if(2==arguments.length)o=arguments[1];else if(3==arguments.length)r=i=+arguments[1]||100,o=arguments[2];else{if(4!=arguments.length)throw new Error("loadFont(): invalid number of arguments");i=+arguments[1]||100,r=+arguments[2]||100,o=arguments[3]}var a=nn.InitFont(rn(o));a.bwipjs_name=n,a.bwipjs_multx=r,a.bwipjs_multy=i;var s=e.push(a)-1;return t[n.toUpperCase()]=s,s}}}(),nn=function(){var e=Math.floor,t=Math.ceil,n=Math.sqrt,r=Math.abs;function i(e){for(var t=[],n=0;n<e;n++)t.push({});return t}function o(e){return e[e.cursor++]||0}function a(e){return e[e.cursor]}function s(e,t){e.cursor=t>e.length||t<0?e.length:t}function u(e,t){s(e,e.cursor+t)}function c(e,t){for(var n=0,r=0;r<t;r++)n=n<<8|o(e);return n}function l(e,t,n){if(t<0||n<0||t>e.length||n>e.length-t)return{length:0};var r=e.subarray(t,t+n);return r.cursor=0,r}function h(e){var t=e.cursor,n=c(e,2);if(n){var r=o(e);u(e,r*n),u(e,c(e,r)-1)}return l(e,t,e.cursor-t)}function f(e){var t=o(e);return t>=32&&t<=246?t-139:t>=247&&t<=250?256*(t-247)+o(e)+108:t>=251&&t<=254?256*-(t-251)-o(e)-108:28==t?c(e,2):29==t?c(e,4):0}function d(e){if(30==a(e))for(u(e,1);e.cursor<e.length;){var t=o(e);if(15==(15&t)||t>>4==15)break}else f(e)}function p(e,t){for(s(e,0);e.cursor<e.length;){for(var n,r,i=e.cursor;a(e)>=28;)d(e);if(n=e.cursor,12==(r=o(e))&&(r=256|o(e)),r==t)return l(e,i,n-i)}return l(e,0,0)}function m(e,t,n){var r=p(e,t);return r.cursor<r.length&&(n=f(r)),n}function g(e,t){var n,r,i;return s(e,0),n=c(e,2),u(e,t*(r=o(e))),l(e,2+(n+1)*r+(i=c(e,r)),c(e,r)-i)}function A(e){return 32768&e?(4294901760|e)>>0:e}function v(e,t){return 256*e[t]+e[t+1]}function b(e,t){var n=256*e[t]+e[t+1];return 32768&n?(4294901760|n)>>0:n}function y(e,t){return(e[t]<<24)+(e[t+1]<<16)+(e[t+2]<<8)+e[t+3]}function w(e,t,n){for(var r=v(e,t+4),i=t+12,o=0;o<r;++o){var a=i+16*o;if(e[a]==n[0]&&e[a+1]==n[1]&&e[a+2]==n[2]&&e[a+3]==n[3])return y(e,a+8)}return 0}function x(e,t){var n=[0,0];if(function(e,t,n,r){for(var i=p(e,t),o=0;o<n&&i.cursor<i.length;o++)r[o]=f(i)}(t,18,2,n),!n[1]||!n[0])return{length:0};var r=m(l(e,n[1],n[0]),19,0);return r?(s(e,n[1]+r),h(e)):{length:0}}function C(e,t,n){var r,i,a,c;if(e.data=t,e.fontstart=n,e.cff={length:0},r=w(t,n,[99,109,97,112]),e.loca=w(t,n,[108,111,99,97]),e.head=w(t,n,[104,101,97,100]),e.glyf=w(t,n,[103,108,121,102]),e.hhea=w(t,n,[104,104,101,97]),e.hmtx=w(t,n,[104,109,116,120]),e.kern=w(t,n,[107,101,114,110]),!(r&&e.head&&e.hhea&&e.hmtx))return 0;if(e.glyf){if(!e.loca)return 0}else{var f,d,p,A=2,b=0,C=0,k=0;if(!(p=w(t,n,[67,70,70,32])))return 0;if(e.fontdicts={length:0},e.fdselect={length:0},e.cff=t.subarray(p),e.cff.cursor=0,u(f=e.cff,2),s(f,o(f)),h(f),d=g(h(f),0),h(f),e.gsubrs=h(f),b=m(d,17,b),A=m(d,262,A),C=m(d,292,C),k=m(d,293,k),e.subrs=x(f,d),2!=A)return 0;if(0==b)return 0;if(C){if(!k)return 0;s(f,C),e.fontdicts=h(f),e.fdselect=l(f,k,f.length-k)}s(f,b),e.charstrings=h(f)}for(i=w(t,n,[109,97,120,112]),e.numGlyphs=i?v(t,i+4):65535,c=v(t,r+2),e.index_map=0,a=0;a<c;++a){var E=r+4+8*a;switch(v(t,E)){case 3:switch(v(t,E+2)){case 1:case 10:e.index_map=r+y(t,E+4)}break;case 0:e.index_map=r+y(t,E+4)}}return 0==e.index_map?0:(e.indexToLocFormat=v(t,e.head+50),1)}function k(e,t){var n=e.data,r=e.index_map,i=v(n,r+0);if(0==i)return t<v(n,r+2)-6?n[r+6+t]:0;if(6==i){var o=v(n,r+6),a=v(n,r+8);return t>=o&&t<o+a?v(n,r+10+2*(t-o)):0}if(2==i)return 0;if(4==i){var s=v(n,r+6)>>1,u=v(n,r+8)>>1,c=v(n,r+10),l=v(n,r+12)>>1,h=r+14,f=h;if(t>65535)return 0;for(t>=v(n,f+2*l)&&(f+=2*l),f-=2;c;){t>v(n,f+2*(u>>=1))&&(f+=2*u),--c}var d,p,m=(f+=2)-h>>>1;return t<(p=v(n,r+14+2*s+2+2*m))?0:0==(d=v(n,r+14+6*s+2+2*m))?t+b(n,r+14+4*s+2+2*m):v(n,d+2*(t-p)+r+14+6*s+2+2*m)}if(12==i||13==i){for(var g=0,A=y(n,r+12);g<A;){var w=g+(A-g>>1),x=y(n,r+16+12*w),C=y(n,r+16+12*w+4);if(t<x)A=w;else{if(!(t>C)){var k=y(n,r+16+12*w+8);return 12==i?k+t-x:k}g=w+1}}return 0}return 0}function E(e,t,n,r,i,o){e.type=t,e.x=n,e.y=r,e.cx=i,e.cy=o}function S(e,t){var n,r;return t>=e.numGlyphs||e.indexToLocFormat>=2?-1:(0==e.indexToLocFormat?(n=e.glyf+2*v(e.data,e.loca+2*t),r=e.glyf+2*v(e.data,e.loca+2*t+2)):(n=e.glyf+y(e.data,e.loca+4*t),r=e.glyf+y(e.data,e.loca+4*t+4)),n==r?-1:n)}function _(e,t,n){if(e.cff.length)!function(e,t,n){var r={started:0,first_x:0,first_y:0,x:0,y:0,min_x:0,max_x:0,min_y:0,max_y:0,vertices:[]},i=R(e,t,r);n.x0=i?r.min_x:0,n.y0=i?r.min_y:0,n.x1=i?r.max_x:0,n.y1=i?r.max_y:0,i&&r.vertices&&r.vertices.length}(e,t,n);else{var r=S(e,t);if(r<0)return 0;n.x0=b(e.data,r+2),n.y0=b(e.data,r+4),n.x1=b(e.data,r+6),n.y1=b(e.data,r+8)}return 1}function O(e,t,n,r,i,o,a,s,u,c){return r?(n&&E(e[t++],3,u+a>>1,c+s>>1,u,c),E(e[t++],3,i,o,a,s)):n?E(e[t++],3,i,o,u,c):E(e[t++],2,i,o,0,0),t}function T(e,t,n){(t>e.max_x||!e.started)&&(e.max_x=t),(n>e.max_y||!e.started)&&(e.max_y=n),(t<e.min_x||!e.started)&&(e.min_x=t),(n<e.min_y||!e.started)&&(e.min_y=n),e.started=1}function D(e,t,n,r,i,o,a,s){T(e,n,r),4==t&&(T(e,i,o),T(e,a,s));var u={};E(u,t,n,r,i,o),u.cx1=a,u.cy1=s,e.vertices.push(u)}function B(e){e.first_x==e.x&&e.first_y==e.y||D(e,2,e.first_x,e.first_y,0,0,0,0)}function I(e,t,n){B(e),e.first_x=e.x=e.x+t,e.first_y=e.y=e.y+n,D(e,1,e.x,e.y,0,0,0,0)}function M(e,t,n){e.x+=t,e.y+=n,D(e,2,e.x,e.y,0,0,0,0)}function j(e,t,n,r,i,o,a){var s=e.x+t,u=e.y+n,c=s+r,l=u+i;e.x=c+o,e.y=l+a,D(e,4,e.x,e.y,s,u,c,l)}function N(e,t){var n=function(e){return s(e,0),c(e,2)}(e),r=107;return n>=33900?r=32768:n>=1240&&(r=1131),(t+=r)<0||t>=n?{length:0}:g(e,t)}function F(e,t){var n,r,i,a,l,h,f=e.fdselect,d=-1;if(s(f,0),0==(l=o(f)))u(f,t),d=o(f);else if(3==l)for(n=c(f,2),r=c(f,2),h=0;h<n;h++){if(a=o(f),i=c(f,2),t>=r&&t<i){d=a;break}r=i}return x(e.cff,g(e.fontdicts,d))}function R(e,t,n){var i,a,s,l,h,d,p=1,m=0,A=0,v=0,b=0,y=[],w=[],x=e.subrs;for(h=g(e.charstrings,t);h.cursor<h.length;){switch(a=0,l=1,s=o(h)){case 19:case 20:p&&(m+=v/2|0),p=0,u(h,(m+7)/8|0);break;case 1:case 3:case 18:case 23:m+=v/2|0;break;case 21:if(p=0,v<2)return 0;I(n,y[v-2],y[v-1]);break;case 4:if(p=0,v<1)return 0;I(n,0,y[v-1]);break;case 22:if(p=0,v<1)return 0;I(n,y[v-1],0);break;case 5:if(v<2)return 0;for(;a+1<v;a+=2)M(n,y[a],y[a+1]);break;case 7:if(v<1)return 0;for(;!(a>=v)&&(M(n,0,y[a]),!(++a>=v));)M(n,y[a],0),a++;break;case 6:if(v<1)return 0;for(;!(a>=v)&&(M(n,y[a],0),!(++a>=v));)M(n,0,y[a]),a++;break;case 31:if(v<4)return 0;for(;!(a+3>=v)&&(j(n,y[a],0,y[a+1],y[a+2],v-a==5?y[a+4]:0,y[a+3]),!((a+=4)+3>=v));)j(n,0,y[a],y[a+1],y[a+2],y[a+3],v-a==5?y[a+4]:0),a+=4;break;case 30:if(v<4)return 0;for(;!(a+3>=v)&&(j(n,0,y[a],y[a+1],y[a+2],y[a+3],v-a==5?y[a+4]:0),!((a+=4)+3>=v));)j(n,y[a],0,y[a+1],y[a+2],v-a==5?y[a+4]:0,y[a+3]),a+=4;break;case 8:if(v<6)return 0;for(;a+5<v;a+=6)j(n,y[a],y[a+1],y[a+2],y[a+3],y[a+4],y[a+5]);break;case 24:if(v<8)return 0;for(;a+5<v-2;a+=6)j(n,y[a],y[a+1],y[a+2],y[a+3],y[a+4],y[a+5]);if(a+1>=v)return 0;M(n,y[a],y[a+1]);break;case 25:if(v<8)return 0;for(;a+1<v-6;a+=2)M(n,y[a],y[a+1]);if(a+5>=v)return 0;j(n,y[a],y[a+1],y[a+2],y[a+3],y[a+4],y[a+5]);break;case 26:case 27:if(v<4)return 0;for(d=0,1&v&&(d=y[a],a++);a+3<v;a+=4)27==s?j(n,y[a],d,y[a+1],y[a+2],y[a+3],0):j(n,d,y[a],y[a+1],y[a+2],0,y[a+3]),d=0;break;case 10:b||(e.fdselect.length&&(x=F(e,t)),b=1);case 29:if(v<1)return 0;if(i=0|y[--v],A>=10)return 0;if(w[A++]=h,0==(h=N(10==s?x:e.gsubrs,i)).length)return 0;h.cursor=0,l=0;break;case 11:if(A<=0)return 0;h=w[--A],l=0;break;case 14:return B(n),1;case 12:var C,k,E,S,_,O,T,D,R,P,L,U,z,H;switch(o(h)){case 34:if(v<7)return 0;C=y[0],k=y[1],D=y[2],E=y[3],S=y[4],_=y[5],O=y[6],j(n,C,0,k,D,E,0),j(n,S,0,_,-D,O,0);break;case 35:if(v<13)return 0;C=y[0],T=y[1],k=y[2],D=y[3],E=y[4],R=y[5],S=y[6],P=y[7],_=y[8],L=y[9],O=y[10],U=y[11],j(n,C,T,k,D,E,R),j(n,S,P,_,L,O,U);break;case 36:if(v<9)return 0;C=y[0],T=y[1],k=y[2],D=y[3],E=y[4],S=y[5],_=y[6],L=y[7],O=y[8],j(n,C,T,k,D,E,0),j(n,S,0,_,L,O,-(T+D+L));break;case 37:if(v<11)return 0;C=y[0],T=y[1],k=y[2],D=y[3],E=y[4],R=y[5],S=y[6],P=y[7],_=y[8],L=y[9],O=U=y[10],H=T+D+R+P+L,r(z=C+k+E+S+_)>r(H)?U=-H:O=-z,j(n,C,T,k,D,E,R),j(n,S,P,_,L,O,U);break;default:return 0}break;default:if(255!=s&&28!=s&&(s<32||s>254))return 0;if(255==s?d=(0|c(h,4))/65536:(u(h,-1),d=(f(h)<<16|0)>>16),v>=48)return 0;y[v++]=d,l=0}l&&(v=0)}return 0}function P(t,r){return t.cff.length?function(e,t){var n={started:0,first_x:0,first_y:0,x:0,y:0,min_x:0,max_x:0,min_y:0,max_y:0,vertices:[]};return R(e,t,n)?n.vertices:null}(t,r):function(t,r){var a=t.data,s=S(t,r);if(s<0)return null;var u=[],c=b(a,s);if(c>0){var l,h,f,d,p,m,g,y,w,x=0,C=0,k=0,_=0,T=s+10,D=v(a,s+10+2*c),B=a.subarray(s+10+2*c+2+D),I=0;for(u=i(z=(H=1+v(a,T+2*c-2))+2*c),h=0,l=0,f=z-H,Q=0;Q<H;++Q)0==l?8&(x=B[I++])&&(l=B[I++]):--l,u[f+Q].type=x;for(q=0,Q=0;Q<H;++Q){if(2&(x=u[f+Q].type)){var M=B[I++];q+=16&x?M:-M}else 16&x||(q+=A(256*B[I]+B[I+1]),I+=2);u[f+Q].x=q}for(G=0,Q=0;Q<H;++Q){if(4&(x=u[f+Q].type)){var j=B[I++];G+=32&x?j:-j}else 32&x||(G+=A(256*B[I]+B[I+1]),I+=2);u[f+Q].y=G}var N=0;for(m=g=d=p=y=w=0,Q=0;Q<H;++Q)x=u[f+Q].type,q=u[f+Q].x,G=u[f+Q].y,h==Q?(0!=Q&&(N=O(u,N,k,_,m,g,y,w,d,p)),(_=!(1&x))?(y=q,w=G,1&u[f+Q+1].type?(m=u[f+Q+1].x,g=u[f+Q+1].y,++Q):(m=q+u[f+Q+1].x>>1,g=G+u[f+Q+1].y>>1)):(m=q,g=G),E(u[N++],1,m,g,0,0),k=0,h=1+v(a,T+2*C),++C):1&x?(k?E(u[N++],3,q,G,d,p):E(u[N++],2,q,G,0,0),k=0):(k&&E(u[N++],3,d+q>>1,p+G>>1,d,p),d=q,p=G,k=1);u.length=O(u,N,k,_,m,g,y,w,d,p)}else if(-1==c)for(var F=1,R=s+10;F;){var L,U=[1,0,0,1,0,0];x=b(a,R),L=b(a,R+=2),R+=2,2&x&&(1&x?(U[4]=b(a,R),R+=2,U[5]=b(a,R),R+=2):(U[4]=o(a),R+=1,U[5]=o(a),R+=1)),8&x?(U[0]=U[3]=b(a,R)/16384,R+=2,U[1]=U[2]=0):64&x?(U[0]=b(a,R)/16384,R+=2,U[1]=U[2]=0,U[3]=b(a,R)/16384,R+=2):128&x&&(U[0]=b(a,R)/16384,R+=2,U[1]=b(a,R)/16384,R+=2,U[2]=b(a,R)/16384,R+=2,U[3]=b(a,R)/16384,R+=2);var z=n(U[0]*U[0]+U[1]*U[1]),H=n(U[2]*U[2]+U[3]*U[3]),$=P(t,L);if($.length>0){for(var Q=0,V=$.length;Q<V;++Q){var q,G,W=$[Q];q=W.x,G=W.y,W.x=e(z*(U[0]*q+U[2]*G+U[4])),W.y=e(H*(U[1]*q+U[3]*G+U[5])),q=W.cx,G=W.cy,W.cx=e(z*(U[0]*q+U[2]*G+U[4])),W.cy=e(H*(U[1]*q+U[3]*G+U[5]))}u=u.concat($)}F=32&x}return u}(t,r)}function L(e,t){var n=v(e.data,e.hhea+34);return t<n?{advanceWidth:b(e.data,e.hmtx+4*t),leftSideBearing:b(e.data,e.hmtx+4*t+2)}:{advanceWidth:b(e.data,e.hmtx+4*(n-1)),leftSideBearing:b(e.data,e.hmtx+4*n+2*(t-n))}}function U(n,r,i,o,a,s){var u={};return _(n,r,u)?{x0:e(u.x0*i+a),y0:e(-u.y1*o+s),x1:t(u.x1*i+a),y1:t(-u.y0*o+s)}:{x0:0,y0:0,x1:0,y1:0}}function z(e,t,n){var r=(e.x1-e.x0)/(e.y1-e.y0);return{fdx:r,fdy:0!=r?1/r:0,fx:e.x0+r*(n-e.y0)-(0|t),direction:e.invert?1:-1,sy:e.y0,ey:e.y1,next:0}}function H(e,t,n,r,i,o,a){t|=0,i!=a&&(i>n.ey||a<n.sy||(i<n.sy&&(r+=(o-r)*(n.sy-i)/(a-i),i=n.sy),a>n.ey&&(o+=(o-r)*(n.ey-a)/(a-i),a=n.ey),r<=t&&o<=t?e[t]+=n.direction*(a-i):r>=t+1&&o>=t+1||(e[t]+=n.direction*(a-i)*(1-(r-t+(o-t))/2))))}function $(e,t,n,r,i){for(var o=i+1;r;){if(0==r.fdx){(l=r.fx)<n&&(l>=0?(H(e,l,r,l,i,l,o),H(t,l+1,r,l,i,l,o)):H(t,0,r,l,i,l,o))}else{var a,s,u,c,l=r.fx,h=r.fdx,f=l+h,d=r.fdy;if(r.sy>i?(a=l+h*(r.sy-i),u=r.sy):(a=l,u=i),r.ey<o?(s=l+h*(r.ey-i),c=r.ey):(s=f,c=o),a>=0&&s>=0&&a<n&&s<n)if((0|a)==(0|s)){var p=c-u;e[y=0|a]+=r.direction*(1-(a-y+(s-y))/2)*p,t[y+1]+=r.direction*p}else{var m,g,A,v,b;for(a>s&&(m=u=o-(u-i),u=c=o-(c-i),c=m,m=s,s=a,a=m,h=-h,d=-d,m=l,l=f,f=m),C=0|s,g=((w=0|a)+1-l)*d+i,b=(v=r.direction)*(g-u),e[w]+=b*(1-(a-w+(w+1-w))/2),A=v*d,y=w+1;y<C;++y)e[y]+=b+A/2,b+=A;g+=d*(C-(w+1)),e[C]+=b+v*(1-(C-C+(s-C))/2)*(c-g),t[C+1]+=v*(c-u)}else for(var y=0;y<n;++y){var w,x=i,C=y+1,k=f,E=o,S=(y-l)/h+i,_=(y+1-l)/h+i;l<(w=y)&&k>C?(H(e,y,r,l,x,w,S),H(e,y,r,w,S,C,_),H(e,y,r,C,_,k,E)):k<w&&l>C?(H(e,y,r,l,x,C,_),H(e,y,r,C,_,w,S),H(e,y,r,w,S,k,E)):l<w&&k>w||k<w&&l>w?(H(e,y,r,l,x,w,S),H(e,y,r,w,S,k,E)):l<C&&k>C||k<C&&l>C?(H(e,y,r,l,x,C,_),H(e,y,r,C,_,k,E)):H(e,y,r,l,x,k,E)}}r=r.next}}function Q(e,t){!function e(t,n,r){for(;r>12;){var i,o,a,s,u=r>>1,c=t[n].y0<t[n+u].y0,l=t[n+u].y0<t[n+r-1].y0;for(c!=l&&(i=t[n+(s=t[n].y0<t[n+r-11].y0==l?0:r-1)],t[n+s]=t[n+u],t[n+u]=i),i=t[n],t[n]=t[n+u],t[n+u]=i,o=1,a=r-1;;){for(;t[n+o].y0<t[n].y0;++o);for(;t[n].y0<t[n+a].y0;--a);if(o>=a)break;i=t[n+o],t[n+o]=t[n+a],t[n+a]=i,++o,--a}a<r-o?(e(t,n,a),n+=o,r-=o):(e(t,n+o,r-o),r=a)}}(e,0,t),function(e,t){for(var n=1;n<t;++n){for(var r=e[n],i=n;i>0&&r.y0<e[i-1].y0;)e[i]=e[i-1],--i;n!=i&&(e[i]=r)}}(e,t)}function V(e,t,n,o,a,s,u,c,l,h){var f,d,p,m,g,A,v=h?-a:a;for(d=0,p=0;p<n.length;++p)d+=n[p];for(f=i(d+1),d=0,A=0,p=0;p<n.length;++p){var b=A;for(A+=n[p],m=n[p]-1,g=0;g<n[p];m=g++){var y=g,w=m;t[b+m].y!=t[b+g].y&&(f[d].invert=0,(h?t[b+m].y>t[b+g].y:t[b+m].y<t[b+g].y)&&(f[d].invert=1,y=m,w=g),f[d].x0=t[b+y].x*o+s,f[d].y0=1*(t[b+y].y*v+u),f[d].x1=t[b+w].x*o+s,f[d].y1=1*(t[b+w].y*v+u),++d)}}Q(f,d),function(e,t,n,i,o,a){o|=0;var s,u=null,c=a|=0,l=0,h=new Float32Array(2*e.w+1),f=h.subarray(e.w),d=0;for(t[n].y0=a+e.h+1;l<e.h;){var p=c+0,m=c+1,g=u;if(h.fill)h.fill(0);else for(var A=0,v=h.length;A<v;A++)h[A]=0;for(;g;)g=(s=g).next,s.ey<=p&&(s.direction=0);for(;t[d].y0<=m;)t[d].y0!=t[d].y1&&((s=z(t[d],o,p)).next=u,u=s),++d;u&&$(h,f,e.w,u,p);for(var b=0,y=0;b<e.w;++b){var w,x;y+=f[b],w=h[b]+y,(x=(w=255*r(w)+.5)>>>0)>255&&(x=255),e.pixels[l*e.stride+b]=x}for(g=u;g;)(s=g).fx+=s.fdx,g=s.next;++c,++l}}(e,f,d,0,c,l)}function q(e,t,n,r,i,o,a,s,u){var c=(t+2*r+o)/4,l=(n+2*i+a)/4,h=(t+o)/2-c,f=(n+a)/2-l;return u>16||(h*h+f*f>s?(q(e,t,n,(t+r)/2,(n+i)/2,c,l,s,u+1),q(e,c,l,(r+o)/2,(i+a)/2,o,a,s,u+1)):e.push({x:o,y:a})),1}function G(e,t,r,i,o,a,s,u,c,l,h){var f=i-t,d=o-r,p=a-i,m=s-o,g=u-a,A=c-s,v=u-t,b=c-r,y=n(f*f+d*d)+n(p*p+m*m)+n(g*g+A*A),w=n(v*v+b*b);if(!(h>16))if(y*y-w*w>l){var x=(t+i)/2,C=(r+o)/2,k=(i+a)/2,E=(o+s)/2,S=(a+u)/2,_=(s+c)/2,O=(x+k)/2,T=(C+E)/2,D=(k+S)/2,B=(E+_)/2,I=(O+D)/2,M=(T+B)/2;G(e,t,r,x,C,O,T,I,M,l,h+1),G(e,I,M,D,B,S,_,u,c,l,h+1)}else e.push({x:u,y:c})}function W(e,t,n,r,i,o,a,s,u,c){s|=0,u|=0;var l=[],h=function(e,t,n){for(var r=[],i=t*t,o=-1,a=0,s=0,u=0,c=0,l=e.length;c<l;++c)switch(e[c].type){case 1:o>=0&&(n[o]=r.length-a),++o,a=r.length,s=e[c].x,u=e[c].y,r.push({x:s,y:u});break;case 2:s=e[c].x,u=e[c].y,r.push({x:s,y:u});break;case 3:q(r,s,u,e[c].cx,e[c].cy,e[c].x,e[c].y,i,0),s=e[c].x,u=e[c].y;break;case 4:G(r,s,u,e[c].cx,e[c].cy,e[c].cx1,e[c].cy1,e[c].x,e[c].y,i,0),s=e[c].x,u=e[c].y}return n[o]=r.length-a,r}(n,t/(r>i?i:r),l);h&&V(e,h,l,r,i,o,a,s,u,c)}return{InitFont:function(e){var t={};if(!C(t,e,0))return null;var n=function(e){return{ascent:b(e.data,e.hhea+4),descent:b(e.data,e.hhea+6),linegap:b(e.data,e.hhea+8)}}(t);return t.ascent=n.ascent,t.descent=n.descent,t.linegap=n.linegap,t},GetGlyph:function(t,n,r,i){i=i||r;var o=r/t.ascent,a=i/t.ascent,s=k(t,n);if(!s&&n)return null;var u=P(t,s),c=U(t,s,o,a,0,0),l=c.x1-c.x0,h=c.y1-c.y0,f=null;l&&h&&W({pixels:f=new Uint8Array(l*h),w:l,h:h,stride:l},.35,u,o,a,0,0,c.x0,c.y0,1);var d=L(t,s);return{glyph:s,pixels:f,width:l,height:h,top:-c.y0,left:c.x0,advance:e(d.advanceWidth*o)}},GetPaths:function(e,t,n,r){r=r||n;var i=n/e.ascent,o=r/e.ascent,a=k(e,t);if(!a&&t)return null;var s=P(e,a),u=L(e,a),c=0,l=0,h=[];if(s)for(var f=0,d=s.length;f<d;f++){var p,m=s[f];if(1==m.type)p={type:"M",x:m.x*i,y:m.y*o};else if(2==m.type)p={type:"L",x:m.x*i,y:m.y*o};else if(3==m.type)p={type:"Q",x:m.x*i,y:m.y*o,cx:m.cx*i,cy:m.cy*o};else{if(4!=m.type)continue;p={type:"C",x:m.x*i,y:m.y*o,cx1:m.cx*i,cy1:m.cy*o,cx2:m.cx1*i,cy2:m.cy1*o}}p.y>c&&(c=p.y),p.y<l&&(l=p.y),h.push(p)}return h.advance=u.advanceWidth*i,h.ascent=c,h.descent=l,h}}}();function rn(e){if("string"==typeof e){for(var t=/[^A-Za-z0-9+\/=\s]/.test(e)?e:atob(e),n=t.length,r=new Uint8Array(n),i=0;i<n;i++)r[i]=t.charCodeAt(i);return r}if(e instanceof Uint8Array)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);throw new ReferenceError("data must be a binary or base64 encoded string or Uint8Array")}return tn.loadFont("OCR-A",100,100,"[encoded data, 17712 characters]"),tn.loadFont("OCR-B",96,100,"[encoded data, 19692 characters]"),{toCanvas:function(e,t){if("string"==typeof t?t=document.getElementById(t)||document.querySelector(t):"string"==typeof e&&(e=document.getElementById(e)||document.querySelector(e)),e instanceof HTMLCanvasElement){var r=e;e=t,t=r}else if(!(t instanceof HTMLCanvasElement))throw"bwipjs: Not a canvas";return n(Xt(e.bcid),e,en(e,t)),t},render:function(e,t){return n(Xt(e.bcid),e,t)},raw:function(e,t,n){1==arguments.length&&(e=(n=e).bcid,t=n.text);for(var r=new Jt(Zt({})),i=Yt(r,Xt(e),t,n,!0),o={pixs:1,pixx:1,pixy:1,sbs:1,bbs:1,bhs:1,width:1,height:1},a=0;a<i.length;a++){var s=i[a];if(s instanceof Map){for(var u={},c=s.keys(),l=s.size,h=0;h<l;h++){var f=c.next().value;if(o[f]){var d=s.get(f);u[f]=d instanceof Array?d.b.slice(d.o,d.o+d.length):d}}i[a]=u}else i.splice(a--,1)}return i},fixupOptions:e,loadFont:tn.loadFont,BWIPJS_VERSION:"3.3.0 (2023-02-16)",BWIPP_VERSION:"2023-02-16",BWIPJS:Jt,STBTT:nn,FontLib:tn,DrawingBuiltin:Zt,DrawingCanvas:en}})?r.apply(t,[]):r)&&(e.exports=t)},function(e,t,n){(function(r){var i;function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
/** @license
 *
 * jsPDF - PDF Document creation from JavaScript
 * Version 2.3.1 Built on 2021-03-08T15:44:11.672Z
 *                      CommitID 00000000
 *
 * Copyright (c) 2010-2020 James Hall <james@parall.ax>, https://github.com/MrRio/jsPDF
 *               2015-2020 yWorks GmbH, http://www.yworks.com
 *               2015-2020 Lukas Holländer <lukas.hollaender@yworks.com>, https://github.com/HackbrettXXX
 *               2016-2018 Aras Abbasi <aras.abbasi@gmail.com>
 *               2010 Aaron Spike, https://github.com/acspike
 *               2012 Willow Systems Corporation, willow-systems.com
 *               2012 Pablo Hess, https://github.com/pablohess
 *               2012 Florian Jenett, https://github.com/fjenett
 *               2013 Warren Weckesser, https://github.com/warrenweckesser
 *               2013 Youssef Beddad, https://github.com/lifof
 *               2013 Lee Driscoll, https://github.com/lsdriscoll
 *               2013 Stefan Slonevskiy, https://github.com/stefslon
 *               2013 Jeremy Morel, https://github.com/jmorel
 *               2013 Christoph Hartmann, https://github.com/chris-rock
 *               2014 Juan Pablo Gaviria, https://github.com/juanpgaviria
 *               2014 James Makes, https://github.com/dollaruw
 *               2014 Diego Casorran, https://github.com/diegocr
 *               2014 Steven Spungin, https://github.com/Flamenco
 *               2014 Kenneth Glassey, https://github.com/Gavvers
 *
 * Permission is hereby granted, free of charge, to any person obtaining
 * a copy of this software and associated documentation files (the
 * "Software"), to deal in the Software without restriction, including
 * without limitation the rights to use, copy, modify, merge, publish,
 * distribute, sublicense, and/or sell copies of the Software, and to
 * permit persons to whom the Software is furnished to do so, subject to
 * the following conditions:
 *
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 *
 * Contributor(s):
 *    siefkenj, ahwolf, rickygu, Midnith, saintclair, eaparango,
 *    kim3er, mfo, alnorth, Flamenco
 */i=function(t){"use strict";var i=function(){return"undefined"!=typeof window?window:void 0!==r?r:"undefined"!=typeof self?self:this}();function a(){i.console&&"function"==typeof i.console.log&&i.console.log.apply(i.console,arguments)}var s={log:a,warn:function(e){i.console&&("function"==typeof i.console.warn?i.console.warn.apply(i.console,arguments):a.call(null,arguments))},error:function(e){i.console&&("function"==typeof i.console.error?i.console.error.apply(i.console,arguments):a(e))}};
/**
     * @license
     * FileSaver.js
     * A saveAs() FileSaver implementation.
     *
     * By Eli Grey, http://eligrey.com
     *
     * License : https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md (MIT)
     * source  : http://purl.eligrey.com/github/FileSaver.js
     */function u(e,t,n){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){h(r.response,t,n)},r.onerror=function(){s.error("could not download file")},r.send()}function c(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&t.status<=299}function l(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(n){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var h=i.saveAs||("object"!=("undefined"==typeof window?"undefined":o(window))||window!==i?function(){}:"undefined"!=typeof HTMLAnchorElement&&"download"in HTMLAnchorElement.prototype?function(e,t,n){var r=i.URL||i.webkitURL,o=document.createElement("a");t=t||e.name||"download",o.download=t,o.rel="noopener","string"==typeof e?(o.href=e,o.origin!==location.origin?c(o.href)?u(e,t,n):l(o,o.target="_blank"):l(o)):(o.href=r.createObjectURL(e),setTimeout((function(){r.revokeObjectURL(o.href)}),4e4),setTimeout((function(){l(o)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,t,n){var r;t=t||e.name||"download","string"==typeof e?c(e)?u(e,t,n):((r=document.createElement("a")).href=e,r.target="_blank",setTimeout((function(){l(r)}))):navigator.msSaveOrOpenBlob((e=e,void 0===(n=n)?n={autoBom:!1}:"object"!=o(n)&&(s.warn("Deprecated: Expected third argument to be a object"),n={autoBom:!n}),n.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([String.fromCharCode(65279),e],{type:e.type}):e),t)}:function(e,t,n,r){if((r=r||open("","_blank"))&&(r.document.title=r.document.body.innerText="downloading..."),"string"==typeof e)return u(e,t,n);t="application/octet-stream"===e.type,n=/constructor/i.test(i.HTMLElement)||i.safari;var a,s,c,l=/CriOS\/[\d]+/.test(navigator.userAgent);(l||t&&n)&&"object"==("undefined"==typeof FileReader?"undefined":o(FileReader))?((a=new FileReader).onloadend=function(){var e=a.result;e=l?e:e.replace(/^data:[^;]*;/,"data:attachment/file;");r?r.location.href=e:location=e,r=null},a.readAsDataURL(e)):(s=i.URL||i.webkitURL,c=s.createObjectURL(e),r?r.location=c:location.href=c,r=null,setTimeout((function(){s.revokeObjectURL(c)}),4e4))});
/**
     * A class to parse color values
     * @author Stoyan Stefanov <sstoo@gmail.com>
     * {@link   http://www.phpied.com/rgb-color-parser-in-javascript/}
     * @license Use it if you like it
     */function f(e){e=e||"",this.ok=!1,e={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"}[e=(e=(e="#"==e.charAt(0)?e.substr(1,6):e).replace(/ /g,"")).toLowerCase()]||e;for(var t=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(e){return[parseInt(e[1]),parseInt(e[2]),parseInt(e[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}}],n=0;n<t.length;n++){var r=t[n].re,i=t[n].process;(r=r.exec(e))&&(i=i(r),this.r=i[0],this.g=i[1],this.b=i[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:255<this.r?255:this.r,this.g=this.g<0||isNaN(this.g)?0:255<this.g?255:this.g,this.b=this.b<0||isNaN(this.b)?0:255<this.b?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var e=this.r.toString(16),t=this.g.toString(16),n=this.b.toString(16);return"#"+(e=1==e.length?"0"+e:e)+(t=1==t.length?"0"+t:t)+(1==n.length?"0"+n:n)}}
/**
     * @license
     * Joseph Myers does not specify a particular license for his work.
     *
     * Author: Joseph Myers
     * Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js
     *
     * Modified by: Owen Leong
     */function d(e,t){var n=m(e[0],o=e[1],i=e[2],r=e[3],t[0],7,-680876936),r=m(r,n,o,i,t[1],12,-389564586),i=m(i,r,n,o,t[2],17,606105819),o=m(o,i,r,n,t[3],22,-1044525330);n=m(n,o,i,r,t[4],7,-176418897),r=m(r,n,o,i,t[5],12,1200080426),i=m(i,r,n,o,t[6],17,-1473231341),o=m(o,i,r,n,t[7],22,-45705983),n=m(n,o,i,r,t[8],7,1770035416),r=m(r,n,o,i,t[9],12,-1958414417),i=m(i,r,n,o,t[10],17,-42063),o=m(o,i,r,n,t[11],22,-1990404162),n=m(n,o,i,r,t[12],7,1804603682),r=m(r,n,o,i,t[13],12,-40341101),i=m(i,r,n,o,t[14],17,-1502002290),n=g(n,o=m(o,i,r,n,t[15],22,1236535329),i,r,t[1],5,-165796510),r=g(r,n,o,i,t[6],9,-1069501632),i=g(i,r,n,o,t[11],14,643717713),o=g(o,i,r,n,t[0],20,-373897302),n=g(n,o,i,r,t[5],5,-701558691),r=g(r,n,o,i,t[10],9,38016083),i=g(i,r,n,o,t[15],14,-660478335),o=g(o,i,r,n,t[4],20,-405537848),n=g(n,o,i,r,t[9],5,568446438),r=g(r,n,o,i,t[14],9,-1019803690),i=g(i,r,n,o,t[3],14,-187363961),o=g(o,i,r,n,t[8],20,1163531501),n=g(n,o,i,r,t[13],5,-1444681467),r=g(r,n,o,i,t[2],9,-51403784),i=g(i,r,n,o,t[7],14,1735328473),n=A(n,o=g(o,i,r,n,t[12],20,-1926607734),i,r,t[5],4,-378558),r=A(r,n,o,i,t[8],11,-2022574463),i=A(i,r,n,o,t[11],16,1839030562),o=A(o,i,r,n,t[14],23,-35309556),n=A(n,o,i,r,t[1],4,-1530992060),r=A(r,n,o,i,t[4],11,1272893353),i=A(i,r,n,o,t[7],16,-155497632),o=A(o,i,r,n,t[10],23,-1094730640),n=A(n,o,i,r,t[13],4,681279174),r=A(r,n,o,i,t[0],11,-358537222),i=A(i,r,n,o,t[3],16,-722521979),o=A(o,i,r,n,t[6],23,76029189),n=A(n,o,i,r,t[9],4,-640364487),r=A(r,n,o,i,t[12],11,-421815835),i=A(i,r,n,o,t[15],16,530742520),n=v(n,o=A(o,i,r,n,t[2],23,-995338651),i,r,t[0],6,-198630844),r=v(r,n,o,i,t[7],10,1126891415),i=v(i,r,n,o,t[14],15,-1416354905),o=v(o,i,r,n,t[5],21,-57434055),n=v(n,o,i,r,t[12],6,1700485571),r=v(r,n,o,i,t[3],10,-1894986606),i=v(i,r,n,o,t[10],15,-1051523),o=v(o,i,r,n,t[1],21,-2054922799),n=v(n,o,i,r,t[8],6,1873313359),r=v(r,n,o,i,t[15],10,-30611744),i=v(i,r,n,o,t[6],15,-1560198380),o=v(o,i,r,n,t[13],21,1309151649),n=v(n,o,i,r,t[4],6,-145523070),r=v(r,n,o,i,t[11],10,-1120210379),i=v(i,r,n,o,t[2],15,718787259),o=v(o,i,r,n,t[9],21,-343485551),e[0]=E(n,e[0]),e[1]=E(o,e[1]),e[2]=E(i,e[2]),e[3]=E(r,e[3])}function p(e,t,n,r,i,o){return t=E(E(t,e),E(r,o)),E(t<<i|t>>>32-i,n)}function m(e,t,n,r,i,o,a){return p(t&n|~t&r,e,t,i,o,a)}function g(e,t,n,r,i,o,a){return p(t&r|n&~r,e,t,i,o,a)}function A(e,t,n,r,i,o,a){return p(t^n^r,e,t,i,o,a)}function v(e,t,n,r,i,o,a){return p(n^(t|~r),e,t,i,o,a)}function b(e){for(var t=e.length,n=[1732584193,-271733879,-1732584194,271733878],r=64;r<=e.length;r+=64)d(n,function(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return n}(e.substring(r-64,r)));e=e.substring(r-64);var i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(r=0;r<e.length;r++)i[r>>2]|=e.charCodeAt(r)<<(r%4<<3);if(i[r>>2]|=128<<(r%4<<3),55<r)for(d(n,i),r=0;r<16;r++)i[r]=0;return i[14]=8*t,d(n,i),n}var y=i.atob.bind(i),w=i.btoa.bind(i),x="0123456789abcdef".split("");function C(e){return String.fromCharCode((255&e)>>0,(65280&e)>>8,(16711680&e)>>16,(4278190080&e)>>24)}function k(e){return b(e).map(C).join("")}function E(e,t){return e+t&4294967295}
/**
     * @license
     * FPDF is released under a permissive license: there is no usage restriction.
     * You may embed it freely in your application (commercial or not), with or
     * without modifications.
     *
     * Reference: http://www.fpdf.org/en/script/script37.php
     */function S(e,t){var n;if(void 0!==e){n=1+(256/(e=e).length>>0);for(var r=new Array(1+n).join(e),i=[],o=0;o<256;o++)i[o]=o;var a=0;for(o=0;o<256;o++){var s=i[o];a=(a+s+r.charCodeAt(o))%256;i[o]=i[a],i[a]=s}n=i}else i=n;var u=t.length,c=0,l=0,h="";for(o=0;o<u;o++)l=(l+(s=i[c=(c+1)%256]))%256,i[c]=i[l],i[l]=s,r=i[(i[c]+i[l])%256],h+=String.fromCharCode(t.charCodeAt(o)^r);return h}
/**
     * @license
     * Licensed under the MIT License.
     * http://opensource.org/licenses/mit-license
     * Author: Owen Leong (@owenl131)
     * Date: 15 Oct 2020
     * References:
     * https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt
     * https://github.com/foliojs/pdfkit/blob/master/lib/security.js
     * http://www.fpdf.org/en/script/script37.php
     */!function(e){for(var t=0;t<e.length;t++)e[t]=function(e){for(var t="",n=0;n<4;n++)t+=x[e>>8*n+4&15]+x[e>>8*n&15];return t}(e[t]);e.join("")}(b("hello"));var _={print:4,modify:8,copy:16,"annot-forms":32};function O(e,t,n,r){this.v=1,this.r=2;var i=192;e.forEach((function(e){if(void 0!==_.perm)throw new Error("Invalid permission: "+e);i+=_[e]})),this.padding="(¿N^NuAd\0NVÿú\b..\0¶Ðh>/\f©þdSiz",e=(t+this.padding).substr(0,32),t=(n+this.padding).substr(0,32);this.O=this.processOwnerPassword(e,t),this.P=-(1+(255^i)),this.encryptionKey=k(e+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(r)).substr(0,5),this.U=S(this.encryptionKey,this.padding)}function T(e){if("object"!=o(e))throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var t={};this.subscribe=function(e,n,r){if(r=r||!1,"string"!=typeof e||"function"!=typeof n||"boolean"!=typeof r)throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");t.hasOwnProperty(e)||(t[e]={});var i=Math.random().toString(35);return t[e][i]=[n,!!r],i},this.unsubscribe=function(e){for(var n in t)if(t[n][e])return delete t[n][e],0===Object.keys(t[n]).length&&delete t[n],!0;return!1},this.publish=function(n){if(t.hasOwnProperty(n)){var r,o=Array.prototype.slice.call(arguments,1),a=[];for(r in t[n]){var u=t[n][r];try{u[0].apply(e,o)}catch(n){i.console&&s.error("jsPDF PubSub Error",n.message,n)}u[1]&&a.push(r)}a.length&&a.forEach(this.unsubscribe)}},this.getTopics=function(){return t}}function D(e){if(!(this instanceof D))return new D(e);var t,n="opacity,stroke-opacity".split(",");for(t in e)e.hasOwnProperty(t)&&0<=n.indexOf(t)&&(this[t]=e[t]);this.id="",this.objectNumber=-1}function B(e,t){this.gState=e,this.matrix=t,this.id="",this.objectNumber=-1}function I(e,t,n,r,i){if(!(this instanceof I))return new I(e,t,n,r,i);this.type="axial"===e?2:3,this.coords=t,this.colors=n,B.call(this,r,i)}function M(e,t,n,r,i){if(!(this instanceof M))return new M(e,t,n,r,i);this.boundingBox=e,this.xStep=t,this.yStep=n,this.stream="",this.cloneIndex=0,B.call(this,r,i)}function j(e){var t,n="string"==typeof arguments[0]?arguments[0]:"p",r=arguments[1],a=arguments[2],u=arguments[3],c=[],l=1,d=16,p="S",m=null,g=("object"==o(e=e||{})&&(n=e.orientation,r=e.unit||r,a=e.format||a,u=e.compress||e.compressPdf||u,null!==(m=e.encryption||null)&&(m.userPassword=m.userPassword||"",m.ownerPassword=m.ownerPassword||"",m.userPermissions=m.userPermissions||[]),l="number"==typeof e.userUnit?Math.abs(e.userUnit):1,void 0!==e.precision&&(t=e.precision),void 0!==e.floatPrecision&&(d=e.floatPrecision),p=e.defaultPathOperation||"S"),c=e.filters||(!0===u?["FlateEncode"]:c),r=r||"mm",n=(""+(n||"P")).toLowerCase(),e.putOnlyUsedFonts||!1),A={},v={internal:{},__private__:{}},b=(v.__private__.PubSub=T,"1.3"),y=(u=v.__private__.getPdfVersion=function(){return b},v.__private__.setPdfVersion=function(e){b=e},{a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]}),x=(v.__private__.getPageFormats=function(){return y},v.__private__.getPageFormat=function(e){return y[e]}),C=(a=a||"a4",{COMPAT:"compat",ADVANCED:"advanced"}),k=C.COMPAT;function E(){this.saveGraphicsState(),se(new Ke(Te,0,0,-Te,0,En()*Te).toString()+" cm"),this.setFontSize(this.getFontSize()/Te),p="n",k=C.ADVANCED}function S(){this.restoreGraphicsState(),p="S",k=C.COMPAT}function _(e,t){if("bold"==e&&"normal"==t||"bold"==e&&400==t||"normal"==e&&"italic"==t||"bold"==e&&"italic"==t)throw new Error("Invalid Combination of fontweight and fontstyle");return t&&e!==t?400==t?"italic"==e?"italic":"normal":700==t&&"italic"!==e?"bold":e+""+t:e}function B(e){if(k!==C.ADVANCED)throw new Error(e+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")}function N(e){return U((e=e,k===C.COMPAT?En()-e:k===C.ADVANCED?e:void 0))}v.advancedAPI=function(e){var t=k===C.COMPAT;return t&&E.call(this),"function"==typeof e&&(e(this),t&&S.call(this)),this},v.compatAPI=function(e){var t=k===C.ADVANCED;return t&&S.call(this),"function"==typeof e&&(e(this),t&&E.call(this)),this},v.isAdvancedAPI=function(){return k===C.ADVANCED};var F=v.roundToPrecision=v.__private__.roundToPrecision=function(e,n){if(n=t||n,isNaN(e)||isNaN(n))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return e.toFixed(n).replace(/0+$/,"")},R=v.hpf=v.__private__.hpf="number"==typeof d?function(e){if(isNaN(e))throw new Error("Invalid argument passed to jsPDF.hpf");return F(e,d)}:"smart"===d?function(e){if(isNaN(e))throw new Error("Invalid argument passed to jsPDF.hpf");return F(e,-1<e&&e<1?16:5)}:function(e){if(isNaN(e))throw new Error("Invalid argument passed to jsPDF.hpf");return F(e,16)},P=v.f2=v.__private__.f2=function(e){if(isNaN(e))throw new Error("Invalid argument passed to jsPDF.f2");return F(e,2)},L=v.__private__.f3=function(e){if(isNaN(e))throw new Error("Invalid argument passed to jsPDF.f3");return F(e,3)},U=v.scale=v.__private__.scale=function(e){if(isNaN(e))throw new Error("Invalid argument passed to jsPDF.scale");return k===C.COMPAT?e*Te:k===C.ADVANCED?e:void 0};v.__private__.setPrecision=v.setPrecision=function(e){"number"==typeof parseInt(e,10)&&(t=parseInt(e,10))};var z,H="00000000000000000000000000000000",$=v.__private__.getFileId=function(){return H},Q=v.__private__.setFileId=function(e){return H=void 0!==e&&/^[a-fA-F0-9]{32}$/.test(e)?e.toUpperCase():H.split("").map((function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))})).join(""),null!==m&&(jt=new O(m.userPermissions,m.userPassword,m.ownerPassword,H)),H},V=(v.setFileId=function(e){return Q(e),this},v.getFileId=function(){return $()},v.__private__.convertDateToPDFDate=function(e){var t=(r=e.getTimezoneOffset())<0?"+":"-",n=Math.floor(Math.abs(r/60)),r=Math.abs(r%60);t=[t,X(n),"'",X(r),"'"].join("");return["D:",e.getFullYear(),X(e.getMonth()+1),X(e.getDate()),X(e.getHours()),X(e.getMinutes()),X(e.getSeconds()),t].join("")}),q=v.__private__.convertPDFDateToDate=function(e){var t=parseInt(e.substr(2,4),10),n=parseInt(e.substr(6,2),10)-1,r=parseInt(e.substr(8,2),10),i=parseInt(e.substr(10,2),10),o=parseInt(e.substr(12,2),10);e=parseInt(e.substr(14,2),10);return new Date(t,n,r,i,o,e,0)},G=v.__private__.setCreationDate=function(e){var t;if((e=void 0===e?new Date:e)instanceof Date)t=V(e);else{if(!/^D:(20[0-2][0-9]|203[0-7]|19[7-9][0-9])(0[0-9]|1[0-2])([0-2][0-9]|3[0-1])(0[0-9]|1[0-9]|2[0-3])(0[0-9]|[1-5][0-9])(0[0-9]|[1-5][0-9])(\+0[0-9]|\+1[0-4]|-0[0-9]|-1[0-1])'(0[0-9]|[1-5][0-9])'?$/.test(e))throw new Error("Invalid argument passed to jsPDF.setCreationDate");t=e}return z=t},W=v.__private__.getCreationDate=function(e){var t=z;return"jsDate"===e?q(z):t};function K(e){oe||(ae=e)}v.setCreationDate=function(e){return G(e),this},v.getCreationDate=function(e){return W(e)};var Y,X=v.__private__.padd2=function(e){return("0"+parseInt(e)).slice(-2)},J=v.__private__.padd2Hex=function(e){return("00"+(e=e.toString())).substr(e.length)},Z=0,ee=[],te=[],ne=0,re=[],ie=[],oe=!1,ae=te,se=(v.__private__.setCustomOutputDestination=function(e){oe=!0,ae=e},v.__private__.resetCustomOutputDestination=function(){oe=!1,ae=te},v.__private__.out=function(e){return e=e.toString(),ne+=e.length+1,ae.push(e),ae}),ue=v.__private__.write=function(e){return se(1===arguments.length?e.toString():Array.prototype.join.call(arguments," "))},ce=v.__private__.getArrayBuffer=function(e){for(var t=e.length,n=new ArrayBuffer(t),r=new Uint8Array(n);t--;)r[t]=e.charCodeAt(t);return n},le=[["Helvetica","helvetica","normal","WinAnsiEncoding"],["Helvetica-Bold","helvetica","bold","WinAnsiEncoding"],["Helvetica-Oblique","helvetica","italic","WinAnsiEncoding"],["Helvetica-BoldOblique","helvetica","bolditalic","WinAnsiEncoding"],["Courier","courier","normal","WinAnsiEncoding"],["Courier-Bold","courier","bold","WinAnsiEncoding"],["Courier-Oblique","courier","italic","WinAnsiEncoding"],["Courier-BoldOblique","courier","bolditalic","WinAnsiEncoding"],["Times-Roman","times","normal","WinAnsiEncoding"],["Times-Bold","times","bold","WinAnsiEncoding"],["Times-Italic","times","italic","WinAnsiEncoding"],["Times-BoldItalic","times","bolditalic","WinAnsiEncoding"],["ZapfDingbats","zapfdingbats","normal",null],["Symbol","symbol","normal",null]],he=(v.__private__.getStandardFonts=function(){return le},e.fontSize||16);v.__private__.setFontSize=v.setFontSize=function(e){return he=k===C.ADVANCED?e/Te:e,this};var fe,de=v.__private__.getFontSize=v.getFontSize=function(){return k===C.COMPAT?he:he*Te},pe=e.R2L||!1;v.__private__.setR2L=v.setR2L=function(e){return pe=e,this},v.__private__.getR2L=v.getR2L=function(){return pe};var me,ge=v.__private__.setZoomMode=function(e){if(/^\d*\.?\d*%$/.test(e))fe=e;else if(isNaN(e)){if(-1===[void 0,null,"fullwidth","fullheight","fullpage","original"].indexOf(e))throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+e+'" is not recognized.');fe=e}else fe=parseInt(e,10)};v.__private__.getZoomMode=function(){return fe};var Ae,ve=v.__private__.setPageMode=function(e){if(-1==[void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(e))throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+e+'" is not recognized.');me=e},be=(v.__private__.getPageMode=function(){return me},v.__private__.setLayoutMode=function(e){if(-1==[void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(e))throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+e+'" is not recognized.');Ae=e}),ye=(v.__private__.getLayoutMode=function(){return Ae},v.__private__.setDisplayMode=v.setDisplayMode=function(e,t,n){return ge(e),be(t),ve(n),this},{title:"",subject:"",author:"",keywords:"",creator:""});function we(e){tt(e.resourcesOid,!0),se("<<"),se("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),At(),vt(),bt(e.objectOid),yt(),gt(),se(">>"),se("endobj")}function xe(){var e,t,n,r=[];for(e in je)je.hasOwnProperty(e)&&(!1===g||!0===g&&A.hasOwnProperty(e))&&ht(je[e]);for(t in Le)Le.hasOwnProperty(t)&&mt(Le[t]);for(n in qe)qe.hasOwnProperty(n)&&ft(qe[n]);var i,o=r;for(i in Re)Re.hasOwnProperty(i)&&(Re[i]instanceof I?dt(Re[i]):Re[i]instanceof M&&pt(Re[i],o));Qe.publish("putResources"),r.forEach(we),we({resourcesOid:it,objectOid:Number.MAX_SAFE_INTEGER}),Qe.publish("postPutResources")}function Ce(e){Ne[e.fontName]=Ne[e.fontName]||{},Ne[e.fontName][e.fontStyle]=e.id}function ke(e,t,n,r,i){return e={id:"F"+(Object.keys(je).length+1).toString(10),postScriptName:e,fontName:t,fontStyle:n,encoding:r,isStandardFont:i||!1,metadata:{}},Qe.publish("addFont",{font:e,instance:this}),je[e.id]=e,Ce(e),e.id}function Ee(e,t){var r,i;switch(n=t||n,"string"==typeof e&&(t=x(e.toLowerCase()),Array.isArray(t)&&(r=t[0],i=t[1])),Array.isArray(e)&&(r=e[0]*Te,i=e[1]*Te),isNaN(r)&&(r=a[0],i=a[1]),(14400<r||14400<i)&&(s.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),r=Math.min(14400,r),i=Math.min(14400,i)),a=[r,i],n.substr(0,1)){case"l":r<i&&(a=[i,r]);break;case"p":i<r&&(a=[i,r])}xt(a),Zt(Jt),se(sn),0!==fn&&se(fn+" J"),0!==dn&&se(dn+" j"),Qe.publish("addPage",{pageNumber:He})}function Se(e,t,n){var r,i=void 0;return n=n||{},e=void 0!==e?e:je[Oe].fontName,t=void 0!==t?t:je[Oe].fontStyle,r=e.toLowerCase(),void 0!==Ne[r]&&void 0!==Ne[r][t]?i=Ne[r][t]:void 0!==Ne[e]&&void 0!==Ne[e][t]?i=Ne[e][t]:!1===n.disableWarning&&s.warn("Unable to look up font label for font '"+e+"', '"+t+"'. Refer to getFontList() for available fonts."),i||n.noFallback||null==(i=Ne.times[t])&&(i=Ne.times.normal),i}function _e(e){return!0===Array.isArray(Ve)&&-1<Ve.indexOf(e)}v.__private__.getDocumentProperty=function(e){if(-1===Object.keys(ye).indexOf(e))throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return ye[e]},v.__private__.getDocumentProperties=function(){return ye},v.__private__.setDocumentProperties=v.setProperties=v.setDocumentProperties=function(e){for(var t in ye)ye.hasOwnProperty(t)&&e[t]&&(ye[t]=e[t]);return this},v.__private__.setDocumentProperty=function(e,t){if(-1===Object.keys(ye).indexOf(e))throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return ye[e]=t};var Oe,Te,De,Be,Ie,Me,je={},Ne={},Fe=[],Re={},Pe={},Le={},Ue={},ze=null,He=0,$e=[],Qe=new T(v),Ve=e.hotfixes||[],qe={},Ge={},We=[],Ke=function e(t,n,r,i,o,a){if(!(this instanceof e))return new e(t,n,r,i,o,a);isNaN(t)&&(t=1),isNaN(n)&&(n=0),isNaN(r)&&(r=0),isNaN(i)&&(i=1),isNaN(o)&&(o=0),isNaN(a)&&(a=0),this._matrix=[t,n,r,i,o,a]},Ye=(Object.defineProperty(Ke.prototype,"sx",{get:function(){return this._matrix[0]},set:function(e){this._matrix[0]=e}}),Object.defineProperty(Ke.prototype,"shy",{get:function(){return this._matrix[1]},set:function(e){this._matrix[1]=e}}),Object.defineProperty(Ke.prototype,"shx",{get:function(){return this._matrix[2]},set:function(e){this._matrix[2]=e}}),Object.defineProperty(Ke.prototype,"sy",{get:function(){return this._matrix[3]},set:function(e){this._matrix[3]=e}}),Object.defineProperty(Ke.prototype,"tx",{get:function(){return this._matrix[4]},set:function(e){this._matrix[4]=e}}),Object.defineProperty(Ke.prototype,"ty",{get:function(){return this._matrix[5]},set:function(e){this._matrix[5]=e}}),Object.defineProperty(Ke.prototype,"a",{get:function(){return this._matrix[0]},set:function(e){this._matrix[0]=e}}),Object.defineProperty(Ke.prototype,"b",{get:function(){return this._matrix[1]},set:function(e){this._matrix[1]=e}}),Object.defineProperty(Ke.prototype,"c",{get:function(){return this._matrix[2]},set:function(e){this._matrix[2]=e}}),Object.defineProperty(Ke.prototype,"d",{get:function(){return this._matrix[3]},set:function(e){this._matrix[3]=e}}),Object.defineProperty(Ke.prototype,"e",{get:function(){return this._matrix[4]},set:function(e){this._matrix[4]=e}}),Object.defineProperty(Ke.prototype,"f",{get:function(){return this._matrix[5]},set:function(e){this._matrix[5]=e}}),Object.defineProperty(Ke.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(Ke.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(Ke.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(Ke.prototype,"isIdentity",{get:function(){return 1===this.sx&&0===this.shy&&0===this.shx&&1===this.sy&&0===this.tx&&0===this.ty}}),Ke.prototype.join=function(e){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(R).join(e)},Ke.prototype.multiply=function(e){var t=e.sx*this.sx+e.shy*this.shx,n=e.sx*this.shy+e.shy*this.sy,r=e.shx*this.sx+e.sy*this.shx,i=e.shx*this.shy+e.sy*this.sy,o=e.tx*this.sx+e.ty*this.shx+this.tx;e=e.tx*this.shy+e.ty*this.sy+this.ty;return new Ke(t,n,r,i,o,e)},Ke.prototype.decompose=function(){var e=this.sx,t=this.shy,n=this.shx,r=this.sy,i=this.tx,o=this.ty,a=Math.sqrt(e*e+t*t),s=(e/=a)*n+(t/=a)*r,u=(n-=e*s,r-=t*s,Math.sqrt(n*n+r*r));return s/=u,e*(r/=u)<t*(n/=u)&&(e=-e,t=-t,s=-s,a=-a),{scale:new Ke(a,0,0,u,0,0),translate:new Ke(1,0,0,1,i,o),rotate:new Ke(e,t,-t,e,0,0),skew:new Ke(1,0,s,1,0,0)}},Ke.prototype.toString=function(e){return this.join(" ")},Ke.prototype.inversed=function(){var e=this.sx,t=this.shy,n=this.shx,r=this.sy,i=this.tx,o=this.ty,a=1/(e*r-t*n);return new Ke(r=r*a,t=-t*a,n=-n*a,e=e*a,-r*i-n*o,-t*i-e*o)},Ke.prototype.applyToPoint=function(e){var t=e.x*this.sx+e.y*this.shx+this.tx;e=e.x*this.shy+e.y*this.sy+this.ty;return new mn(t,e)},Ke.prototype.applyToRectangle=function(e){var t=this.applyToPoint(e);e=this.applyToPoint(new mn(e.x+e.w,e.y+e.h));return new gn(t.x,t.y,e.x-t.x,e.y-t.y)},Ke.prototype.clone=function(){var e=this.sx,t=this.shy,n=this.shx,r=this.sy,i=this.tx,o=this.ty;return new Ke(e,t,n,r,i,o)},v.Matrix=Ke,v.matrixMult=function(e,t){return t.multiply(e)}),Xe=new Ke(1,0,0,1,0,0),Je=(v.unitMatrix=v.identityMatrix=Xe,function(e,t){var n;Pe[e]||(n=(t instanceof I?"Sh":"P")+(Object.keys(Re).length+1).toString(10),t.id=n,Pe[e]=n,Re[n]=t,Qe.publish("addPattern",t))}),Ze=(v.ShadingPattern=I,v.TilingPattern=M,v.addShadingPattern=function(e,t){return B("addShadingPattern()"),Je(e,t),this},v.beginTilingPattern=function(e){B("beginTilingPattern()"),An(e.boundingBox[0],e.boundingBox[1],e.boundingBox[2]-e.boundingBox[0],e.boundingBox[3]-e.boundingBox[1],e.matrix)},v.endTilingPattern=function(e,t){B("endTilingPattern()"),t.stream=ie[Y].join("\n"),Je(e,t),Qe.publish("endTilingPattern",t),We.pop().restore()},v.__private__.newObject=function(){var e=et();return tt(e,!0),e}),et=v.__private__.newObjectDeferred=function(){return ee[++Z]=function(){return ne},Z},tt=function(e,t){return t="boolean"==typeof t&&t,ee[e]=ne,t&&se(e+" 0 obj"),e},nt=v.__private__.newAdditionalObject=function(){var e={objId:et(),content:""};return re.push(e),e},rt=et(),it=et(),ot=v.__private__.decodeColorString=function(e){var t=e.split(" ");2!==t.length||"g"!==t[1]&&"G"!==t[1]?5!==t.length||"k"!==t[4]&&"K"!==t[4]||(t=[(1-t[0])*(1-t[3]),(1-t[1])*(1-t[3]),(1-t[2])*(1-t[3]),"r"]):t=[e=parseFloat(t[0]),e,e,"r"];for(var n="#",r=0;r<3;r++)n+=("0"+Math.floor(255*parseFloat(t[r])).toString(16)).slice(-2);return n},at=v.__private__.encodeColorString=function(e){var t,n=(e="string"==typeof e?{ch1:e}:e).ch1,r=e.ch2,i=e.ch3,a=e.ch4,s="draw"===e.pdfColorType?["G","RG","K"]:["g","rg","k"];if("string"==typeof n&&"#"!==n.charAt(0)){var u=new f(n);if(u.ok)n=u.toHex();else if(!/^\d*\.?\d*$/.test(n))throw new Error('Invalid color "'+n+'" passed to jsPDF.encodeColorString.')}if("string"==typeof(n="string"==typeof n&&/^#[0-9A-Fa-f]{3}$/.test(n)?"#"+n[1]+n[1]+n[2]+n[2]+n[3]+n[3]:n)&&/^#[0-9A-Fa-f]{6}$/.test(n)&&(n=(u=parseInt(n.substr(1),16))>>16&255,r=u>>8&255,i=255&u),void 0===r||void 0===a&&n===r&&r===i)t="string"==typeof n?n+" "+s[0]:2===e.precision?P(n/255)+" "+s[0]:L(n/255)+" "+s[0];else if(void 0===a||"object"==o(a)){if(a&&!isNaN(a.a)&&0===a.a)return["1.","1.","1.",s[1]].join(" ");t=("string"==typeof n?[n,r,i,s[1]]:2===e.precision?[P(n/255),P(r/255),P(i/255),s[1]]:[L(n/255),L(r/255),L(i/255),s[1]]).join(" ")}else t=("string"==typeof n?[n,r,i,a,s[2]]:2===e.precision?[P(n),P(r),P(i),P(a),s[2]]:[L(n),L(r),L(i),L(a),s[2]]).join(" ");return t},st=v.__private__.getFilters=function(){return c},ut=v.__private__.putStream=function(e){var t=(e=e||{}).data||"",n=e.filters||st(),r=e.alreadyAppliedFilters||[],i=e.addLength1||!1,o=t.length,a=e.objectId,s=function(e){return e};if(null!==m&&void 0===a)throw new Error("ObjectId must be passed to putStream for file encryption");null!==m&&(s=jt.encryptor(a,0));var u={},c=(!0===n&&(n=["FlateEncode"]),e.additionalKeyValues||[]);a=(u=void 0!==j.API.processDataByFilters?j.API.processDataByFilters(t,n):{data:t,reverseChain:[]}).reverseChain+(Array.isArray(r)?r.join(" "):r.toString());if(0!==u.data.length&&(c.push({key:"Length",value:u.data.length}),!0===i&&c.push({key:"Length1",value:o})),0!=a.length)if(a.split("/").length-1==1)c.push({key:"Filter",value:a});else{c.push({key:"Filter",value:"["+a+"]"});for(var l=0;l<c.length;l+=1)if("DecodeParms"===c[l].key){for(var h=[],f=0;f<u.reverseChain.split("/").length-1;f+=1)h.push("null");h.push(c[l].value),c[l].value="["+h.join(" ")+"]"}}se("<<");for(var d=0;d<c.length;d++)se("/"+c[d].key+" "+c[d].value);se(">>"),0!==u.data.length&&(se("stream"),se(s(u.data)),se("endstream"))},ct=v.__private__.putPage=function(e){var t=e.number,n=e.data,r=e.objId,i=e.contentsObjId;tt(r,!0),se("<</Type /Page"),se("/Parent "+e.rootDictionaryObjId+" 0 R"),se("/Resources "+e.resourceDictionaryObjId+" 0 R"),se("/MediaBox ["+parseFloat(R(e.mediaBox.bottomLeftX))+" "+parseFloat(R(e.mediaBox.bottomLeftY))+" "+R(e.mediaBox.topRightX)+" "+R(e.mediaBox.topRightY)+"]"),null!==e.cropBox&&se("/CropBox ["+R(e.cropBox.bottomLeftX)+" "+R(e.cropBox.bottomLeftY)+" "+R(e.cropBox.topRightX)+" "+R(e.cropBox.topRightY)+"]"),null!==e.bleedBox&&se("/BleedBox ["+R(e.bleedBox.bottomLeftX)+" "+R(e.bleedBox.bottomLeftY)+" "+R(e.bleedBox.topRightX)+" "+R(e.bleedBox.topRightY)+"]"),null!==e.trimBox&&se("/TrimBox ["+R(e.trimBox.bottomLeftX)+" "+R(e.trimBox.bottomLeftY)+" "+R(e.trimBox.topRightX)+" "+R(e.trimBox.topRightY)+"]"),null!==e.artBox&&se("/ArtBox ["+R(e.artBox.bottomLeftX)+" "+R(e.artBox.bottomLeftY)+" "+R(e.artBox.topRightX)+" "+R(e.artBox.topRightY)+"]"),"number"==typeof e.userUnit&&1!==e.userUnit&&se("/UserUnit "+e.userUnit),Qe.publish("putPage",{objId:r,pageContext:$e[t],pageNumber:t,page:n}),se("/Contents "+i+" 0 R"),se(">>"),se("endobj"),e=n.join("\n");return k===C.ADVANCED&&(e+="\nQ"),tt(i,!0),ut({data:e,filters:st(),objectId:i}),se("endobj"),r},lt=v.__private__.putPages=function(){for(var e=[],t=1;t<=He;t++)$e[t].objId=et(),$e[t].contentsObjId=et();for(t=1;t<=He;t++)e.push(ct({number:t,data:ie[t],objId:$e[t].objId,contentsObjId:$e[t].contentsObjId,mediaBox:$e[t].mediaBox,cropBox:$e[t].cropBox,bleedBox:$e[t].bleedBox,trimBox:$e[t].trimBox,artBox:$e[t].artBox,userUnit:$e[t].userUnit,rootDictionaryObjId:rt,resourceDictionaryObjId:it}));tt(rt,!0),se("<</Type /Pages");for(var n="/Kids [",r=0;r<He;r++)n+=e[r]+" 0 R ";se(n+"]"),se("/Count "+He),se(">>"),se("endobj"),Qe.publish("postPutPages")},ht=function(e){function t(e,t){return-1!==e.indexOf(" ")?"("+wt(e,t)+")":wt(e,t)}Qe.publish("putFont",{font:e,out:se,newObject:Ze,putStream:ut,pdfEscapeWithNeededParanthesis:t}),!0!==e.isAlreadyPutted&&(e.objectNumber=Ze(),se("<<"),se("/Type /Font"),se("/BaseFont /"+t(e.postScriptName)),se("/Subtype /Type1"),"string"==typeof e.encoding&&se("/Encoding /"+e.encoding),se("/FirstChar 32"),se("/LastChar 255"),se(">>"),se("endobj"))},ft=function(e){e.objectNumber=Ze();var t=[],n=(t.push({key:"Type",value:"/XObject"}),t.push({key:"Subtype",value:"/Form"}),t.push({key:"BBox",value:"["+[R(e.x),R(e.y),R(e.x+e.width),R(e.y+e.height)].join(" ")+"]"}),t.push({key:"Matrix",value:"["+e.matrix.toString()+"]"}),e.pages[1].join("\n"));ut({data:n,additionalKeyValues:t,objectId:e.objectNumber}),se("endobj")},dt=function(e,t){t=t||21;var n=Ze(),r=function(e,t){for(var n=[],r=1/(t-1),i=0;i<1;i+=r)n.push(i);n.push(1),0!=e[0].offset&&(t={offset:0,color:e[0].color},e.unshift(t)),1!=e[e.length-1].offset&&(t={offset:1,color:e[e.length-1].color},e.push(t));for(var o="",a=0,s=0;s<n.length;s++){for(i=n[s];i>e[a+1].offset;)a++;var u=(i-(u=e[a].offset))/(e[a+1].offset-u),c=e[a].color,l=e[a+1].color;o+=J(Math.round((1-u)*c[0]+u*l[0]).toString(16))+J(Math.round((1-u)*c[1]+u*l[1]).toString(16))+J(Math.round((1-u)*c[2]+u*l[2]).toString(16))}return o.trim()}(e.colors,t),i=[];i.push({key:"FunctionType",value:"0"}),i.push({key:"Domain",value:"[0.0 1.0]"}),i.push({key:"Size",value:"["+t+"]"}),i.push({key:"BitsPerSample",value:"8"}),i.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),i.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),ut({data:r,additionalKeyValues:i,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:n}),se("endobj"),e.objectNumber=Ze(),se("<< /ShadingType "+e.type),se("/ColorSpace /DeviceRGB"),t="/Coords ["+R(parseFloat(e.coords[0]))+" "+R(parseFloat(e.coords[1]))+" ";2===e.type?t+=R(parseFloat(e.coords[2]))+" "+R(parseFloat(e.coords[3])):t+=R(parseFloat(e.coords[2]))+" "+R(parseFloat(e.coords[3]))+" "+R(parseFloat(e.coords[4]))+" "+R(parseFloat(e.coords[5])),se(t+="]"),e.matrix&&se("/Matrix ["+e.matrix.toString()+"]"),se("/Function "+n+" 0 R"),se("/Extend [true true]"),se(">>"),se("endobj")},pt=function(e,t){var n=et(),r=Ze();(t=(t.push({resourcesOid:n,objectOid:r}),e.objectNumber=r,[])).push({key:"Type",value:"/Pattern"}),t.push({key:"PatternType",value:"1"}),t.push({key:"PaintType",value:"1"}),t.push({key:"TilingType",value:"1"}),t.push({key:"BBox",value:"["+e.boundingBox.map(R).join(" ")+"]"}),t.push({key:"XStep",value:R(e.xStep)}),t.push({key:"YStep",value:R(e.yStep)}),t.push({key:"Resources",value:n+" 0 R"}),e.matrix&&t.push({key:"Matrix",value:"["+e.matrix.toString()+"]"}),ut({data:e.stream,additionalKeyValues:t,objectId:e.objectNumber}),se("endobj")},mt=function(e){for(var t in e.objectNumber=Ze(),se("<<"),e)switch(t){case"opacity":se("/ca "+P(e[t]));break;case"stroke-opacity":se("/CA "+P(e[t]))}se(">>"),se("endobj")},gt=function(){for(var e in se("/XObject <<"),qe)qe.hasOwnProperty(e)&&0<=qe[e].objectNumber&&se("/"+e+" "+qe[e].objectNumber+" 0 R");Qe.publish("putXobjectDict"),se(">>")},At=function(){for(var e in se("/Font <<"),je)je.hasOwnProperty(e)&&(!1===g||!0===g&&A.hasOwnProperty(e))&&se("/"+e+" "+je[e].objectNumber+" 0 R");se(">>")},vt=function(){if(0<Object.keys(Re).length){for(var e in se("/Shading <<"),Re)Re.hasOwnProperty(e)&&Re[e]instanceof I&&0<=Re[e].objectNumber&&se("/"+e+" "+Re[e].objectNumber+" 0 R");Qe.publish("putShadingPatternDict"),se(">>")}},bt=function(e){if(0<Object.keys(Re).length){for(var t in se("/Pattern <<"),Re)Re.hasOwnProperty(t)&&Re[t]instanceof v.TilingPattern&&0<=Re[t].objectNumber&&Re[t].objectNumber<e&&se("/"+t+" "+Re[t].objectNumber+" 0 R");Qe.publish("putTilingPatternDict"),se(">>")}},yt=function(){if(0<Object.keys(Le).length){for(var e in se("/ExtGState <<"),Le)Le.hasOwnProperty(e)&&0<=Le[e].objectNumber&&se("/"+e+" "+Le[e].objectNumber+" 0 R");Qe.publish("putGStateDict"),se(">>")}},wt=v.__private__.pdfEscape=v.pdfEscape=function(e,t){return function(e,t){var n,r,i,o,a,s,u=(t=t||{}).sourceEncoding||"Unicode",c=t.outputEncoding;if((t.autoencode||c)&&je[Oe].metadata&&je[Oe].metadata[u]&&je[Oe].metadata[u].encoding&&(u=je[Oe].metadata[u].encoding,c="string"==typeof(c=!(c=!c&&je[Oe].encoding?je[Oe].encoding:c)&&u.codePages?u.codePages[0]:c)?u[c]:c)){for(o=!1,i=[],n=0,r=e.length;n<r;n++)(a=c[e.charCodeAt(n)])?i.push(String.fromCharCode(a)):i.push(e[n]),i[n].charCodeAt(0)>>8&&(o=!0);e=i.join("")}for(n=e.length;void 0===o&&0!==n;)e.charCodeAt(n-1)>>8&&(o=!0),n--;if(!o)return e;for(i=t.noBOM?[]:[254,255],n=0,r=e.length;n<r;n++){if((s=(a=e.charCodeAt(n))>>8)>>8)throw new Error("Character at position "+n+" of string '"+e+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");i.push(s),i.push(a-(s<<8))}return String.fromCharCode.apply(void 0,i)}(e,t).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},xt=v.__private__.beginPage=function(e){ie[++He]=[],$e[He]={objId:0,contentsObjId:0,userUnit:Number(l),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(e[0]),topRightY:Number(e[1])}},Ct(He),K(ie[Y])},Ct=function(e){0<e&&e<=He&&(Y=e)},kt=v.__private__.getNumberOfPages=v.getNumberOfPages=function(){return ie.length-1},Et=v.__private__.putInfo=function(){var e,t=Ze(),n=function(e){return e};for(e in null!==m&&(n=jt.encryptor(t,0)),se("<<"),se("/Producer ("+wt(n("jsPDF "+j.version))+")"),ye)ye.hasOwnProperty(e)&&ye[e]&&se("/"+e.substr(0,1).toUpperCase()+e.substr(1)+" ("+wt(n(ye[e]))+")");se("/CreationDate ("+wt(n(z))+")"),se(">>"),se("endobj")},St=v.__private__.putCatalog=function(e){switch(e=(e=e||{}).rootDictionaryObjId||rt,Ze(),se("<<"),se("/Type /Catalog"),se("/Pages "+e+" 0 R"),fe=fe||"fullwidth"){case"fullwidth":se("/OpenAction [3 0 R /FitH null]");break;case"fullheight":se("/OpenAction [3 0 R /FitV null]");break;case"fullpage":se("/OpenAction [3 0 R /Fit]");break;case"original":se("/OpenAction [3 0 R /XYZ null null 1]");break;default:var t=""+fe;"number"==typeof(fe="%"===t.substr(t.length-1)?parseInt(fe)/100:fe)&&se("/OpenAction [3 0 R /XYZ null null "+P(fe)+"]")}switch(Ae=Ae||"continuous"){case"continuous":se("/PageLayout /OneColumn");break;case"single":se("/PageLayout /SinglePage");break;case"two":case"twoleft":se("/PageLayout /TwoColumnLeft");break;case"tworight":se("/PageLayout /TwoColumnRight")}me&&se("/PageMode /"+me),Qe.publish("putCatalog"),se(">>"),se("endobj")},_t=v.__private__.putTrailer=function(){se("trailer"),se("<<"),se("/Size "+(Z+1)),se("/Root "+Z+" 0 R"),se("/Info "+(Z-1)+" 0 R"),null!==m&&se("/Encrypt "+jt.oid+" 0 R"),se("/ID [ <"+H+"> <"+H+"> ]"),se(">>")},Ot=v.__private__.putHeader=function(){se("%PDF-"+b),se("%ºß¬à")},Tt=v.__private__.putXRef=function(){var e="0000000000";se("xref"),se("0 "+(Z+1)),se("0000000000 65535 f ");for(var t=1;t<=Z;t++)"function"==typeof ee[t]?se((e+ee[t]()).slice(-10)+" 00000 n "):void 0!==ee[t]?se((e+ee[t]).slice(-10)+" 00000 n "):se("0000000000 00000 n ")},Dt=v.__private__.buildDocument=function(){ne=Z=0,te=[],ee=[],re=[],rt=et(),it=et(),K(te),Qe.publish("buildDocument"),Ot(),lt(),Qe.publish("putAdditionalObjects");for(var e=0;e<re.length;e++){var t=re[e];tt(t.objId,!0),se(t.content),se("endobj")}Qe.publish("postPutAdditionalObjects"),xe(),null!==m&&(jt.oid=Ze(),se("<<"),se("/Filter /Standard"),se("/V "+jt.v),se("/R "+jt.r),se("/U <"+jt.toHexString(jt.U)+">"),se("/O <"+jt.toHexString(jt.O)+">"),se("/P "+jt.P),se(">>"),se("endobj")),Et(),St();var n=ne;return Tt(),_t(),se("startxref"),se(""+n),se("%%EOF"),K(ie[Y]),te.join("\n")},Bt=v.__private__.getBlob=function(e){return new Blob([ce(e)],{type:"application/pdf"})},It=v.output=v.__private__.output=((Me=function(e,t){switch("string"==typeof(t=t||{})?t={filename:t}:t.filename=t.filename||"generated.pdf",e){case void 0:return Dt();case"save":v.save(t.filename);break;case"arraybuffer":return ce(Dt());case"blob":return Bt(Dt());case"bloburi":case"bloburl":if(void 0!==i.URL&&"function"==typeof i.URL.createObjectURL)return i.URL&&i.URL.createObjectURL(Bt(Dt()))||void 0;s.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var n="",r=Dt();try{n=w(r)}catch(e){n=w(unescape(encodeURIComponent(r)))}return"data:application/pdf;filename="+t.filename+";base64,"+n;case"pdfobjectnewwindow":if("[object Window]"===Object.prototype.toString.call(i))return r='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style><body><script src="'+(t.pdfObjectUrl||"https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js")+'"><\/script><script >PDFObject.embed("'+this.output("dataurlstring")+'", '+JSON.stringify(t)+");<\/script></body></html>",null!==(n=i.open())&&n.document.write(r),n;throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":var o,a;if("[object Window]"===Object.prototype.toString.call(i))return r='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style><body><iframe id="pdfViewer" src="'+(t.pdfJsUrl||"examples/PDF.js/web/viewer.html")+"?file=&downloadName="+t.filename+'" width="500px" height="400px" /></body></html>',null!==(o=i.open())&&(o.document.write(r),a=this,o.document.documentElement.querySelector("#pdfViewer").onload=function(){o.document.title=t.filename,o.document.documentElement.querySelector("#pdfViewer").contentWindow.PDFViewerApplication.open(a.output("bloburl"))}),o;throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if("[object Window]"!==Object.prototype.toString.call(i))throw new Error("The option dataurlnewwindow just works in a browser-environment.");if(n='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}  </style><body><iframe src="'+this.output("datauristring",t)+'"></iframe></body></html>',null!==(r=i.open())&&(r.document.write(n),r.document.title=t.filename),r||"undefined"==typeof safari)return r;break;case"datauri":case"dataurl":return i.document.location.href=this.output("datauristring",t);default:return null}}).foo=function(){try{return Me.apply(this,arguments)}catch(t){var e="Error in function "+(e=~(e=t.stack||"").indexOf(" at ")?e.split(" at ")[1]:e).split("\n")[0].split("<")[0]+": "+t.message;if(!i.console)throw new Error(e);i.console.error(e,t),i.alert&&alert(e)}},(Me.foo.bar=Me).foo);switch(r){case"pt":Te=1;break;case"mm":Te=72/25.4;break;case"cm":Te=72/2.54;break;case"in":Te=72;break;case"px":Te=1==_e("px_scaling")?.75:96/72;break;case"pc":case"em":Te=12;break;case"ex":Te=6;break;default:throw new Error("Invalid unit: "+r)}function Mt(e){null===e||k===C.ADVANCED&&void 0===e||(e=Ut(e),se(e))}var jt=null,Nt=(G(),Q(),v.__private__.getPageInfo=v.getPageInfo=function(e){if(isNaN(e)||e%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfo");return{objId:$e[e].objId,pageNumber:e,pageContext:$e[e]}}),Ft=v.__private__.getPageInfoByObjId=function(e){if(isNaN(e)||e%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var t in $e)if($e[t].objId===e)break;return Nt(t)},Rt=v.__private__.getCurrentPageInfo=v.getCurrentPageInfo=function(){return{objId:$e[Y].objId,pageNumber:Y,pageContext:$e[Y]}},Pt=(v.addPage=function(){return Ee.apply(this,arguments),this},v.setPage=function(){return Ct.apply(this,arguments),K.call(this,ie[Y]),this},v.insertPage=function(e){return this.addPage(),this.movePage(Y,e),this},v.movePage=function(e,t){if(t<e){for(var n=ie[e],r=$e[e],i=e;t<i;i--)ie[i]=ie[i-1],$e[i]=$e[i-1];ie[t]=n,$e[t]=r,this.setPage(t)}else if(e<t){n=ie[e],r=$e[e];for(var o=e;o<t;o++)ie[o]=ie[o+1],$e[o]=$e[o+1];ie[t]=n,$e[t]=r,this.setPage(t)}return this},v.deletePage=function(){return function(e){0<e&&e<=He&&(ie.splice(e,1),$e.splice(e,1),--He<Y&&(Y=He),this.setPage(Y))}.apply(this,arguments),this},v.__private__.text=v.text=function(e,t,n,r,i){var a=(r=r||{}).scope||this;if("number"!=typeof e||"number"!=typeof t||"string"!=typeof n&&!Array.isArray(n)||(u=n,n=t,t=e,e=u),arguments[3]instanceof Ke==0?(_=i,O=arguments[5],"object"==o(M=arguments[3])&&null!==M||("string"==typeof _&&(O=_,_=null),"string"==typeof M&&(O=M,M=null),"number"==typeof M&&(_=M,M=null),r={flags:M,angle:_,align:O})):(B("The transform parameter of text() with a Matrix value"),g=i),isNaN(t)||isNaN(n)||null==e)throw new Error("Invalid arguments passed to jsPDF.text");if(0!==e.length){var s,u="",c=(i="number"==typeof r.lineHeightFactor?r.lineHeightFactor:Yt,a.internal.scaleFactor),l=!1,h=!0;if("string"==typeof e)l=!0;else if(Array.isArray(e)){for(var f,d=e.concat(),p=[],m=d.length;m--;)("string"!=typeof(f=d.shift())||Array.isArray(f)&&"string"!=typeof f[0])&&(h=!1);l=h}if(!1===l)throw new Error('Type of text must be string or Array. "'+e+'" is not recognized.');"string"==typeof e&&(e=e.match(/[\r?\n]/)?e.split(/\r\n|\r|\n/g):[e]);var g,v=he/a.internal.scaleFactor,b=v*(Yt-1);switch(r.baseline){case"bottom":n-=b;break;case"top":n+=v-b;break;case"hanging":n+=v-2*b;break;case"middle":n+=v/2-b}0<(H=r.maxWidth||0)&&("string"==typeof e?e=a.splitTextToSize(e,H):"[object Array]"===Object.prototype.toString.call(e)&&(e=e.reduce((function(e,t){return e.concat(a.splitTextToSize(t,H))}),[]))),l={text:e,x:t,y:n,options:r,mutex:{pdfEscape:wt,activeFontKey:Oe,fonts:je,activeFontSize:he}},Qe.publish("preProcessText",l),e=l.text,_=(r=l.options).angle,g instanceof Ke==0&&_&&"number"==typeof _?(_*=Math.PI/180,0===r.rotationDirection&&(_=-_),k===C.ADVANCED&&(_=-_),x=Math.cos(_),w=Math.sin(_),g=new Ke(x,w,-w,x,0,0)):_&&_ instanceof Ke&&(g=_),k!==C.ADVANCED||g||(g=Xe),void 0!==(I=r.charSpace||hn)&&(u+=R(U(I))+" Tc\n",this.setCharSpace(this.getCharSpace()||0)),r.lang;var y=-1,w=void 0!==r.renderingMode?r.renderingMode:r.stroke,x=a.internal.getCurrentPageInfo().pageContext;switch(w){case 0:case!1:case"fill":y=0;break;case 1:case!0:case"stroke":y=1;break;case 2:case"fillThenStroke":y=2;break;case 3:case"invisible":y=3;break;case 4:case"fillAndAddForClipping":y=4;break;case 5:case"strokeAndAddPathForClipping":y=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":y=6;break;case 7:case"addToPathForClipping":y=7}var E,S,_=void 0!==x.usedRenderingMode?x.usedRenderingMode:-1,O=(-1!==y?u+=y+" Tr\n":-1!==_&&(u+="0 Tr\n"),-1!==y&&(x.usedRenderingMode=y),r.align||"left"),T=he*i,D=(w=a.internal.pageSize.getWidth(),je[Oe]),I=r.charSpace||hn,M=(H=r.maxWidth||0,Object.assign({autoencode:!0,noBOM:!0},r.flags)),j=[];if("[object Array]"===Object.prototype.toString.call(e)){p=X(e),"left"!==O&&(E=p.map((function(e){return a.getStringUnitWidth(e,{font:D,charSpace:I,fontSize:he,doKerning:!1})*he/c})));var N,F=0;if("right"===O){t-=E[0],e=[];m=p.length;for(var P=0;P<m;P++)S=0===P?(N=rn(t),on(n)):(N=U(F-E[P]),-T),e.push([p[P],N,S]),F=E[P]}else if("center"===O){t-=E[0]/2,e=[],m=p.length;for(var L=0;L<m;L++)S=0===L?(N=rn(t),on(n)):(N=U((F-E[L])/2),-T),e.push([p[L],N,S]),F=E[L]}else if("left"===O){e=[],m=p.length;for(var z=0;z<m;z++)e.push(p[z])}else{if("justify"!==O)throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');e=[],m=p.length;for(var H=0!==H?H:w,$=0;$<m;$++)S=0===$?on(n):-T,N=0===$?rn(t):0,$<m-1&&j.push(R(U((H-E[$])/(p[$].split(" ").length-1)))),e.push([p[$],N,S])}}l={text:e=!0===("boolean"==typeof r.R2L?r.R2L:pe)?J(e,(function(e,t,n){return[e.split("").reverse().join(""),t,n]})):e,x:t,y:n,options:r,mutex:{pdfEscape:wt,activeFontKey:Oe,fonts:je,activeFontSize:he}},Qe.publish("postProcessText",l),e=l.text,s=l.mutex.isHex||!1,p=X(e="WinAnsiEncoding"!==(_=je[Oe].encoding)&&"StandardEncoding"!==_?e:J(e,(function(e,t,n){return[(e=(e=e).split("\t").join(Array(r.TabLen||9).join(" ")),wt(e,M)),t,n]}))),e=[];for(var Q,V,q,G=Array.isArray(p[0])?1:0,W="",K=function(e,t,n){return n instanceof Ke?(n="number"==typeof r.angle?Ye(n,new Ke(1,0,0,1,e,t)):Ye(new Ke(1,0,0,1,e,t),n),(n=k===C.ADVANCED?Ye(new Ke(1,0,0,-1,0,0),n):n).join(" ")+" Tm\n"):R(e)+" "+R(t)+" Td\n"},Y=0;Y<p.length;Y++){switch(W="",G){case 1:q=(s?"<":"(")+p[Y][0]+(s?">":")"),Q=parseFloat(p[Y][1]),V=parseFloat(p[Y][2]);break;case 0:q=(s?"<":"(")+p[Y]+(s?">":")"),Q=rn(t),V=on(n)}void 0!==j&&void 0!==j[Y]&&(W=j[Y]+" Tw\n"),0===Y?e.push(W+K(Q,V,g)+q):0==G?e.push(W+q):1==G&&e.push(W+K(Q,V,g)+q)}e=0==G?e.join(" Tj\nT* "):e.join(" Tj\n"),e+=" Tj\n",x="BT\n/",x=(x+=Oe+" "+he+" Tf\n")+R(he*i)+" TL\n",se(x=(x=x+(cn+"\n")+u)+e+"ET"),A[Oe]=!0}return a;function X(e){for(var t,n=e.concat(),r=[],i=n.length;i--;)"string"==typeof(t=n.shift())?r.push(t):Array.isArray(e)&&(1===t.length||void 0===t[1]&&void 0===t[2])?r.push(t[0]):r.push([t[0],t[1],t[2]]);return r}function J(e,t){var n;if("string"==typeof e)n=t(e)[0];else if(Array.isArray(e)){for(var r,i=e.concat(),o=[],a=i.length;a--;)"string"==typeof(r=i.shift())?o.push(t(r)[0]):Array.isArray(r)&&"string"==typeof r[0]&&(r=t(r[0],r[1],r[2]),o.push([r[0],r[1],r[2]]));n=o}return n}},v.__private__.clip=v.clip=function(e){return se("evenodd"===e?"W*":"W"),this}),Lt=(v.clipEvenOdd=function(){return Pt("evenodd")},v.__private__.discardPath=v.discardPath=function(){return se("n"),this},v.__private__.isValidStyle=function(e){var t=!1;return-1!==[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(e)||t}),Ut=(v.__private__.setDefaultPathOperation=v.setDefaultPathOperation=function(e){return Lt(e)&&(p=e),this},v.__private__.getStyle=v.getStyle=function(e){var t=p;switch(e){case"D":case"S":t="S";break;case"F":t="f";break;case"FD":case"DF":t="B";break;case"f":case"f*":case"B":case"B*":t=e}return t}),zt=v.close=function(){return se("h"),this},Ht=(v.stroke=function(){return se("S"),this},v.fill=function(e){return Ht("f",e),this},v.fillEvenOdd=function(e){return Ht("f*",e),this},v.fillStroke=function(e){return Ht("B",e),this},v.fillStrokeEvenOdd=function(e){return Ht("B*",e),this},function(e,t){"object"==o(t)?$t(t,e):se(e)}),$t=function(e,t){var n,r=Pe[e.key],i=Re[r];i instanceof I?(se("q"),se(Qt(t)),i.gState&&v.setGState(i.gState),se(e.matrix.toString()+" cm"),se("/"+r+" sh"),se("Q")):i instanceof M&&(n=new Ke(1,0,0,-1,0,En()),e.matrix&&(n=n.multiply(e.matrix||Xe),r=function(e,t,n,r,i){return(t=new M(t||this.boundingBox,n||this.xStep,r||this.yStep,this.gState,i||this.matrix)).stream=this.stream,n=e+"$$"+this.cloneIndex+++"$$",Je(n,t),t}.call(i,e.key,e.boundingBox,e.xStep,e.yStep,n).id),se("q"),se("/Pattern cs"),se("/"+r+" scn"),i.gState&&v.setGState(i.gState),se(t),se("Q"))},Qt=function(e){switch(e){case"f":case"F":return"W n";case"f*":return"W* n";case"B":return"W S";case"B*":return"W* S";case"S":return"W S";case"n":return"W n"}},Vt=v.moveTo=function(e,t){return se(R(U(e))+" "+R(N(t))+" m"),this},qt=v.lineTo=function(e,t){return se(R(U(e))+" "+R(N(t))+" l"),this},Gt=v.curveTo=function(e,t,n,r,i,o){return se([R(U(e)),R(N(t)),R(U(n)),R(N(r)),R(U(i)),R(N(o)),"c"].join(" ")),this},Wt=(v.__private__.line=v.line=function(e,t,n,r,i){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r)||!Lt(i))throw new Error("Invalid arguments passed to jsPDF.line");return k===C.COMPAT?this.lines([[n-e,r-t]],e,t,[1,1],i||"S"):this.lines([[n-e,r-t]],e,t,[1,1]).stroke()},v.__private__.lines=v.lines=function(e,t,n,r,i,o){var a,s,u,c,l,h,f,d,p,m,g,A;if("number"==typeof e&&(A=n,n=t,t=e,e=A),r=r||[1,1],o=o||!1,isNaN(t)||isNaN(n)||!Array.isArray(e)||!Array.isArray(r)||!Lt(i)||"boolean"!=typeof o)throw new Error("Invalid arguments passed to jsPDF.lines");for(Vt(t,n),a=r[0],s=r[1],c=e.length,m=t,g=n,u=0;u<c;u++)2===(l=e[u]).length?(m=l[0]*a+m,g=l[1]*s+g,qt(m,g)):(h=l[0]*a+m,f=l[1]*s+g,d=l[2]*a+m,p=l[3]*s+g,m=l[4]*a+m,g=l[5]*s+g,Gt(h,f,d,p,m,g));return o&&zt(),Mt(i),this},v.path=function(e){for(var t=0;t<e.length;t++){var n=e[t],r=n.c;switch(n.op){case"m":Vt(r[0],r[1]);break;case"l":qt(r[0],r[1]);break;case"c":Gt.apply(this,r);break;case"h":zt()}}return this},v.__private__.rect=v.rect=function(e,t,n,r,i){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r)||!Lt(i))throw new Error("Invalid arguments passed to jsPDF.rect");return k===C.COMPAT&&(r=-r),se([R(U(e)),R(N(t)),R(U(n)),R(U(r)),"re"].join(" ")),Mt(i),this},v.__private__.triangle=v.triangle=function(e,t,n,r,i,o,a){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r)||isNaN(i)||isNaN(o)||!Lt(a))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[n-e,r-t],[i-n,o-r],[e-i,t-o]],e,t,[1,1],a,!0),this},v.__private__.roundedRect=v.roundedRect=function(e,t,n,r,i,o,a){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r)||isNaN(i)||isNaN(o)||!Lt(a))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var s=4/3*(Math.SQRT2-1);return i=Math.min(i,.5*n),o=Math.min(o,.5*r),this.lines([[n-2*i,0],[i*s,0,i,o-o*s,i,o],[0,r-2*o],[0,o*s,-i*s,o,-i,o],[2*i-n,0],[-i*s,0,-i,-o*s,-i,-o],[0,2*o-r],[0,-o*s,i*s,-o,i,-o]],e+i,t,[1,1],a,!0),this},v.__private__.ellipse=v.ellipse=function(e,t,n,r,i){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r)||!Lt(i))throw new Error("Invalid arguments passed to jsPDF.ellipse");var o=4/3*(Math.SQRT2-1)*n,a=4/3*(Math.SQRT2-1)*r;return Vt(e+n,t),Gt(e+n,t-a,e+o,t-r,e,t-r),Gt(e-o,t-r,e-n,t-a,e-n,t),Gt(e-n,t+a,e-o,t+r,e,t+r),Gt(e+o,t+r,e+n,t+a,e+n,t),Mt(i),this},v.__private__.circle=v.circle=function(e,t,n,r){if(isNaN(e)||isNaN(t)||isNaN(n)||!Lt(r))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(e,t,n,n,r)},v.setFont=function(e,t,n){return n&&(t=_(t,n)),Oe=Se(e,t,{disableWarning:!1}),this},v.__private__.getFont=v.getFont=function(){return je[Se.apply(v,arguments)]});function Kt(){this.page=He,this.currentPage=Y,this.pages=ie.slice(0),this.pagesContext=$e.slice(0),this.x=De,this.y=Be,this.matrix=Ie,this.width=Cn(Y),this.height=En(Y),this.outputDestination=ae,this.id="",this.objectNumber=-1}v.__private__.getFontList=v.getFontList=function(){var e,t,n={};for(e in Ne)if(Ne.hasOwnProperty(e))for(t in n[e]=[],Ne[e])Ne[e].hasOwnProperty(t)&&n[e].push(t);return n},v.addFont=function(e,t,n,r,i){var o=["StandardEncoding","MacRomanEncoding","Identity-H","WinAnsiEncoding"];return r&&-1!==o.indexOf(r)?i=r:r&&-1==o.indexOf(r)&&(n=_(n,r)),ke.call(this,e,t,n,i=i||"Identity-H")};var Yt,Xt,Jt=e.lineWidth||.200025,Zt=v.__private__.setLineWidth=v.setLineWidth=function(e){return se(R(U(e))+" w"),this},en=(v.__private__.setLineDash=j.API.setLineDash=j.API.setLineDashPattern=function(e,t){if(e=e||[],t=t||0,isNaN(t)||!Array.isArray(e))throw new Error("Invalid arguments passed to jsPDF.setLineDash");return e=e.map((function(e){return R(U(e))})).join(" "),t=R(U(t)),se("["+e+"] "+t+" d"),this},v.__private__.getLineHeight=v.getLineHeight=function(){return he*Yt}),tn=(v.__private__.getLineHeight=v.getLineHeight=function(){return he*Yt},v.__private__.setLineHeightFactor=v.setLineHeightFactor=function(e){return"number"==typeof(e=e||1.15)&&(Yt=e),this}),nn=v.__private__.getLineHeightFactor=v.getLineHeightFactor=function(){return Yt},rn=(tn(e.lineHeight),v.__private__.getHorizontalCoordinate=function(e){return U(e)}),on=v.__private__.getVerticalCoordinate=function(e){return k===C.ADVANCED?e:$e[Y].mediaBox.topRightY-$e[Y].mediaBox.bottomLeftY-U(e)},an=(tn=v.__private__.getHorizontalCoordinateString=v.getHorizontalCoordinateString=function(e){return R(rn(e))},v.__private__.getVerticalCoordinateString=v.getVerticalCoordinateString=function(e){return R(on(e))}),sn=e.strokeColor||"0 G",un=(v.__private__.getStrokeColor=v.getDrawColor=function(){return ot(sn)},v.__private__.setStrokeColor=v.setDrawColor=function(e,t,n,r){return sn=at({ch1:e,ch2:t,ch3:n,ch4:r,pdfColorType:"draw",precision:2}),se(sn),this},e.fillColor||"0 g"),cn=(v.__private__.getFillColor=v.getFillColor=function(){return ot(un)},v.__private__.setFillColor=v.setFillColor=function(e,t,n,r){return un=at({ch1:e,ch2:t,ch3:n,ch4:r,pdfColorType:"fill",precision:2}),se(un),this},e.textColor||"0 g"),ln=v.__private__.getTextColor=v.getTextColor=function(){return ot(cn)},hn=(v.__private__.setTextColor=v.setTextColor=function(e,t,n,r){return cn=at({ch1:e,ch2:t,ch3:n,ch4:r,pdfColorType:"text",precision:3}),this},e.charSpace),fn=(e=v.__private__.getCharSpace=v.getCharSpace=function(){return parseFloat(hn||0)},v.__private__.setCharSpace=v.setCharSpace=function(e){if(isNaN(e))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return hn=e,this},0),dn=(v.CapJoinStyles={0:0,butt:0,but:0,miter:0,1:1,round:1,rounded:1,circle:1,2:2,projecting:2,project:2,square:2,bevel:2},v.__private__.setLineCap=v.setLineCap=function(e){var t=v.CapJoinStyles[e];if(void 0===t)throw new Error("Line cap style of '"+e+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return se((fn=t)+" J"),this},0),pn=(v.__private__.setLineJoin=v.setLineJoin=function(e){var t=v.CapJoinStyles[e];if(void 0===t)throw new Error("Line join style of '"+e+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return se((dn=t)+" j"),this},v.__private__.setLineMiterLimit=v.__private__.setMiterLimit=v.setLineMiterLimit=v.setMiterLimit=function(e){if(e=e||0,isNaN(e))throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");return se(R(U(e))+" M"),this},v.GState=D,v.setGState=function(e){(e="string"==typeof e?Le[Ue[e]]:pn(null,e)).equals(ze)||(se("/"+e.id+" gs"),ze=e)},function(e,t){if(!e||!Ue[e]){var n,r,i=!1;for(n in Le)if(Le.hasOwnProperty(n)&&Le[n].equals(t)){i=!0;break}return i?t=Le[n]:(r="GS"+(Object.keys(Le).length+1).toString(10),(Le[r]=t).id=r),e&&(Ue[e]=t.id),Qe.publish("addGState",t),t}}),mn=(v.addGState=function(e,t){return pn(e,t),this},v.saveGraphicsState=function(){return se("q"),Fe.push({key:Oe,size:he,color:cn}),this},v.restoreGraphicsState=function(){se("Q");var e=Fe.pop();return Oe=e.key,he=e.size,cn=e.color,ze=null,this},v.setCurrentTransformationMatrix=function(e){return se(e.toString()+" cm"),this},v.comment=function(e){return se("#"+e),this},function(e,t){var n=e||0,r=(Object.defineProperty(this,"x",{enumerable:!0,get:function(){return n},set:function(e){isNaN(e)||(n=parseFloat(e))}}),t||0),i=(Object.defineProperty(this,"y",{enumerable:!0,get:function(){return r},set:function(e){isNaN(e)||(r=parseFloat(e))}}),"pt");return Object.defineProperty(this,"type",{enumerable:!0,get:function(){return i},set:function(e){i=e.toString()}}),this}),gn=function(e,t,n,r){mn.call(this,e,t),this.type="rect";var i=n||0,o=(Object.defineProperty(this,"w",{enumerable:!0,get:function(){return i},set:function(e){isNaN(e)||(i=parseFloat(e))}}),r||0);return Object.defineProperty(this,"h",{enumerable:!0,get:function(){return o},set:function(e){isNaN(e)||(o=parseFloat(e))}}),this},An=(Kt.prototype.restore=function(){He=this.page,Y=this.currentPage,$e=this.pagesContext,ie=this.pages,De=this.x,Be=this.y,Ie=this.matrix,kn(Y,this.width),Sn(Y,this.height),ae=this.outputDestination},function(e,t,n,r,i){We.push(new Kt),He=Y=0,ie=[],De=e,Be=t,Ie=i,xt([n,r])});for(Xt in v.beginFormObject=function(e,t,n,r,i){return An(e,t,n,r,i),this},v.endFormObject=function(e){return Ge[e=e]||(t=new Kt,n="Xo"+(Object.keys(qe).length+1).toString(10),t.id=n,Ge[e]=n,qe[n]=t,Qe.publish("addFormObject",t),We.pop().restore()),this;var t,n},v.doFormObject=function(e,t){return e=qe[Ge[e]],se("q"),se(t.toString()+" cm"),se("/"+e.id+" Do"),se("Q"),this},v.getFormObject=function(e){return{x:(e=qe[Ge[e]]).x,y:e.y,width:e.width,height:e.height,matrix:e.matrix}},v.save=function(e,t){return e=e||"generated.pdf",(t=t||{}).returnPromise=t.returnPromise||!1,!1===t.returnPromise?(h(Bt(Dt()),e),"function"==typeof h.unload&&i.setTimeout&&setTimeout(h.unload,911),this):new Promise((function(t,n){try{var r=h(Bt(Dt()),e);"function"==typeof h.unload&&i.setTimeout&&setTimeout(h.unload,911),t(r)}catch(t){n(t.message)}}))},j.API)if(j.API.hasOwnProperty(Xt))if("events"===Xt&&j.API.events.length){xn=bn=vn=void 0;for(var vn,bn,yn=Qe,wn=j.API.events,xn=wn.length-1;-1!==xn;xn--)vn=wn[xn][0],bn=wn[xn][1],yn.subscribe.apply(yn,[vn].concat("function"==typeof bn?[bn]:bn))}else v[Xt]=j.API[Xt];var Cn=v.getPageWidth=function(e){return($e[e=e||Y].mediaBox.topRightX-$e[e].mediaBox.bottomLeftX)/Te},kn=v.setPageWidth=function(e,t){$e[e].mediaBox.topRightX=t*Te+$e[e].mediaBox.bottomLeftX},En=v.getPageHeight=function(e){return($e[e=e||Y].mediaBox.topRightY-$e[e].mediaBox.bottomLeftY)/Te},Sn=v.setPageHeight=function(e,t){$e[e].mediaBox.topRightY=t*Te+$e[e].mediaBox.bottomLeftY};return v.internal={pdfEscape:wt,getStyle:Ut,getFont:Wt,getFontSize:de,getCharSpace:e,getTextColor:ln,getLineHeight:en,getLineHeightFactor:nn,write:ue,getHorizontalCoordinate:rn,getVerticalCoordinate:on,getCoordinateString:tn,getVerticalCoordinateString:an,collections:{},newObject:Ze,newAdditionalObject:nt,newObjectDeferred:et,newObjectDeferredBegin:tt,getFilters:st,putStream:ut,events:Qe,scaleFactor:Te,pageSize:{getWidth:function(){return Cn(Y)},setWidth:function(e){kn(Y,e)},getHeight:function(){return En(Y)},setHeight:function(e){Sn(Y,e)}},encryptionOptions:m,encryption:jt,getEncryptor:function(e){return null!==m?jt.encryptor(e,0):function(e){return e}},output:It,getNumberOfPages:kt,pages:ie,out:se,f2:P,f3:L,getPageInfo:Nt,getPageInfoByObjId:Ft,getCurrentPageInfo:Rt,getPDFVersion:u,Point:mn,Rectangle:gn,Matrix:Ke,hasHotfix:_e},Object.defineProperty(v.internal.pageSize,"width",{get:function(){return Cn(Y)},set:function(e){kn(Y,e)},enumerable:!0,configurable:!0}),Object.defineProperty(v.internal.pageSize,"height",{get:function(){return En(Y)},set:function(e){Sn(Y,e)},enumerable:!0,configurable:!0}),function(e){for(var t=0,n=le.length;t<n;t++){var r=ke.call(this,e[t][0],e[t][1],e[t][2],le[t][3],!0),i=(!1===g&&(A[r]=!0),e[t][0].split("-"));Ce({id:r,fontName:i[0],fontStyle:i[1]||""})}Qe.publish("addFonts",{fonts:je,dictionary:Ne})}.call(v,le),Oe="F1",Ee(a,n),Qe.publish("initialized"),v}function N(e){return e.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")}function F(e){return e.toFixed(5)}function R(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e}function P(e){return e*je}function L(e,t,n){var r=t.scope.internal.getFont(t.fontName,t.fontStyle);e=t.scope.getStringUnitWidth(e,{font:r,fontSize:parseFloat(n),charSpace:0})*parseFloat(n);return{height:t.scope.getStringUnitWidth("3",{font:r,fontSize:parseFloat(n),charSpace:0})*parseFloat(n)*1.5,width:e}}function U(e,t,n){var r=function(e){return e};return void 0!==t&&n&&(r=n.internal.getEncryptor(t)),(e=e||"").toString(),"("+Ne(r(e))+")"}function z(){this._objId=void 0,this._scope=void 0,Object.defineProperty(this,"objId",{get:function(){if(void 0===this._objId){if(void 0===this.scope)return;this._objId=this.scope.internal.newObjectDeferred()}return this._objId},set:function(e){this._objId=e}}),Object.defineProperty(this,"scope",{value:this._scope,writable:!0})}function H(){z.call(this),Object.defineProperty(this,"Type",{value:"/XObject",configurable:!1,writable:!0}),Object.defineProperty(this,"Subtype",{value:"/Form",configurable:!1,writable:!0}),Object.defineProperty(this,"FormType",{value:1,configurable:!1,writable:!0});var e,t=[];Object.defineProperty(this,"BBox",{configurable:!1,get:function(){return t},set:function(e){t=e}}),Object.defineProperty(this,"Resources",{value:"2 0 R",configurable:!1,writable:!0}),Object.defineProperty(this,"stream",{enumerable:!1,configurable:!0,set:function(t){e=t.trim()},get:function(){return e||null}})}function $(){z.call(this);var e,t=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){return 0<t.length?t:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return t}}),Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){var t;if(e)return t=function(e){return e},this.scope&&(t=this.scope.internal.getEncryptor(this.objId)),"("+Ne(t(e))+")"},set:function(t){e=t}})}function Q(){z.call(this);var e=4,t=(Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return e},set:function(t){if(isNaN(t))throw new Error('Invalid value "'+t+'" for attribute F supplied.');e=t}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return Boolean(ze(e,3))},set:function(t){!0===Boolean(t)?this.F=He(e,3):this.F=$e(e,3)}}),0),n=(Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return t},set:function(e){if(isNaN(e))throw new Error('Invalid value "'+e+'" for attribute Ff supplied.');t=e}}),[]),r=(Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(0!==n.length)return n},set:function(e){n=void 0!==e?e:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[0])?0:n[0]},set:function(e){n[0]=e}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[1])?0:n[1]},set:function(e){n[1]=e}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[2])?0:n[2]},set:function(e){n[2]=e}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!n||isNaN(n[3])?0:n[3]},set:function(e){n[3]=e}}),""),i=(Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return r},set:function(e){switch(e){case"/Btn":case"/Tx":case"/Ch":case"/Sig":r=e;break;default:throw new Error('Invalid value "'+e+'" for attribute FT supplied.')}}}),null),o=(Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!i||i.length<1){if(this instanceof Ke)return;i="FieldObject"+Q.FieldNum++}var e=function(e){return e};return this.scope&&(e=this.scope.internal.getEncryptor(this.objId)),"("+Ne(e(i))+")"},set:function(e){i=e.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return i},set:function(e){i=e}}),"helvetica"),a=(Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return o},set:function(e){o=e}}),"normal"),s=(Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return a},set:function(e){a=e}}),0),u=void Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return s},set:function(e){s=e}}),c=(Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return void 0===u?50/je:u},set:function(e){u=e}}),"black"),l=(Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return c},set:function(e){c=e}}),"/F1 0 Tf 0 g"),h=(Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!l||this instanceof Ke||this instanceof Ye))return U(l,this.objId,this.scope)},set:function(e){e=e.toString(),l=e}}),null),f=(Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(h)return this instanceof We==0?U(h,this.objId,this.scope):h},set:function(e){e=e.toString(),h=this instanceof We==0?"("===e.substr(0,1)?N(e.substr(1,e.length-2)):N(e):e}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof We==1?N(h.substr(1,h.length-1)):h},set:function(e){e=e.toString(),h=this instanceof We==1?"/"+e:e}}),null);Object.defineProperty(this,"_V",{enumerable:!1,configurable:!1,get:function(){if(f)return f},set:function(e){this.V=e}}),Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(f)return this instanceof We==0?U(f,this.objId,this.scope):f},set:function(e){e=e.toString(),f=this instanceof We==0?"("===e.substr(0,1)?N(e.substr(1,e.length-2)):N(e):e}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof We==1?N(f.substr(1,f.length-1)):f},set:function(e){e=e.toString(),f=this instanceof We==1?"/"+e:e}}),Object.defineProperty(this,"hasAnnotation",{enumerable:!0,configurable:!0,get:function(){return this.Rect}}),Object.defineProperty(this,"Type",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Annot":null}}),Object.defineProperty(this,"Subtype",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Widget":null}});var d,p=!1,m=(Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return p},set:function(e){e=Boolean(e),p=e}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,get:function(){if(d)return d},set:function(e){d=e}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return Boolean(ze(this.Ff,1))},set:function(e){!0===Boolean(e)?this.Ff=He(this.Ff,1):this.Ff=$e(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return Boolean(ze(this.Ff,2))},set:function(e){!0===Boolean(e)?this.Ff=He(this.Ff,2):this.Ff=$e(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return Boolean(ze(this.Ff,3))},set:function(e){!0===Boolean(e)?this.Ff=He(this.Ff,3):this.Ff=$e(this.Ff,3)}}),null);Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(null!==m)return m},set:function(e){if(-1===[0,1,2].indexOf(e))throw new Error('Invalid value "'+e+'" for attribute Q supplied.');m=e}}),Object.defineProperty(this,"textAlign",{get:function(){var e;switch(m){case 0:default:e="left";break;case 1:e="center";break;case 2:e="right"}return e},configurable:!0,enumerable:!0,set:function(e){switch(e){case"right":case 2:m=2;break;case"center":case 1:m=1;break;default:m=0}}})}function V(){Q.call(this),this.FT="/Ch",this.V="()",this.fontName="zapfdingbats";var e=0,t=(Object.defineProperty(this,"TI",{enumerable:!0,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"topIndex",{enumerable:!0,configurable:!0,get:function(){return e},set:function(t){e=t}}),[]);Object.defineProperty(this,"Opt",{enumerable:!0,configurable:!1,get:function(){return Ge(t,this.objId,this.scope)},set:function(e){var n=[];"string"==typeof e&&(n=function(e,t,n){n=n||1;for(var r,i=[];r=t.exec(e);)i.push(r[n]);return i}(e,/\((.*?)\)/g)),t=n}}),this.getOptions=function(){return t},this.setOptions=function(e){t=e,this.sort&&t.sort()},this.addOption=function(e){e=(e=e||"").toString(),t.push(e),this.sort&&t.sort()},this.removeOption=function(e,n){for(n=n||!1,e=(e=e||"").toString();-1!==t.indexOf(e)&&(t.splice(t.indexOf(e),1),!1!==n););},Object.defineProperty(this,"combo",{enumerable:!0,configurable:!0,get:function(){return Boolean(ze(this.Ff,18))},set:function(e){!0===Boolean(e)?this.Ff=He(this.Ff,18):this.Ff=$e(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return Boolean(ze(this.Ff,19))},set:function(e){!0===this.combo&&(!0===Boolean(e)?this.Ff=He(this.Ff,19):this.Ff=$e(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return Boolean(ze(this.Ff,20))},set:function(e){!0===Boolean(e)?(this.Ff=He(this.Ff,20),t.sort()):this.Ff=$e(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return Boolean(ze(this.Ff,22))},set:function(e){!0===Boolean(e)?this.Ff=He(this.Ff,22):this.Ff=$e(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return Boolean(ze(this.Ff,23))},set:function(e){!0===Boolean(e)?this.Ff=He(this.Ff,23):this.Ff=$e(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return Boolean(ze(this.Ff,27))},set:function(e){!0===Boolean(e)?this.Ff=He(this.Ff,27):this.Ff=$e(this.Ff,27)}}),this.hasAppearanceStream=!1}function q(){V.call(this),this.fontName="helvetica",this.combo=!1}function G(){q.call(this),this.combo=!0}function W(){G.call(this),this.edit=!0}function K(){We.call(this),this.pushButton=!0}function Y(){We.call(this),this.radio=!0,this.pushButton=!1;var e=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return e},set:function(t){e=void 0!==t?t:[]}})}function X(){We.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=Xe.CheckBox.createAppearanceStream()}function J(){Ye.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return Boolean(ze(this.Ff,14))},set:function(e){!0===Boolean(e)?this.Ff=He(this.Ff,14):this.Ff=$e(this.Ff,14)}}),this.password=!0}O.prototype.lsbFirstWord=function(e){return String.fromCharCode(e>>0&255,e>>8&255,e>>16&255,e>>24&255)},O.prototype.toHexString=function(e){return e.split("").map((function(e){return("0"+(255&e.charCodeAt(0)).toString(16)).slice(-2)})).join("")},O.prototype.hexToBytes=function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(String.fromCharCode(parseInt(e.substr(n,2),16)));return t.join("")},O.prototype.processOwnerPassword=function(e,t){return S(k(t).substr(0,5),e)},O.prototype.encryptor=function(e,t){var n=k(this.encryptionKey+String.fromCharCode(255&e,e>>8&255,e>>16&255,255&t,t>>8&255)).substr(0,10);return function(e){return S(n,e)}},D.prototype.equals=function(e){var t,n="id,objectNumber,equals";if(!e||o(e)!=o(this))return!1;var r=0;for(t in this)if(!(0<=n.indexOf(t))){if(this.hasOwnProperty(t)&&!e.hasOwnProperty(t))return!1;if(this[t]!==e[t])return!1;r++}for(t in e)e.hasOwnProperty(t)&&n.indexOf(t)<0&&r--;return 0===r},j.API={events:[]},j.version="2.3.1";var Z,ee,te,ne,re,ie,oe,ae,se,ue,ce,le,he,fe,de,pe,me,ge,Ae,ve,be,ye,we,xe,Ce,ke,Ee,Se,_e,Oe,Te,De,Be,Ie,Me=j.API,je=1,Ne=function(e){return e.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Fe=function(e){return e.toFixed(2)},Re=(Me.__acroform__={},function(e){var t=new H,n=Xe.internal.getHeight(e)||0;e=Xe.internal.getWidth(e)||0;return t.BBox=[0,0,Number(Fe(e)),Number(Fe(n))],t}),Pe=Me.__acroform__.setBit=function(e,t){if(e=e||0,t=t||0,isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return e|1<<t},Le=Me.__acroform__.clearBit=function(e,t){if(e=e||0,t=t||0,isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");return e&~(1<<t)},Ue=Me.__acroform__.getBit=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return 0==(e&1<<t)?0:1},ze=Me.__acroform__.getBitForPdf=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return Ue(e,t-1)},He=Me.__acroform__.setBitForPdf=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return Pe(e,t-1)},$e=Me.__acroform__.clearBitForPdf=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return Le(e,t-1)},Qe=Me.__acroform__.calculateCoordinates=function(e,t){var n=t.internal.getHorizontalCoordinate,r=(t=t.internal.getVerticalCoordinate,e[0]),i=e[1],o=e[2],a=(e=e[3],{});return a.lowerLeft_X=n(r)||0,a.lowerLeft_Y=t(i+e)||0,a.upperRight_X=n(r+o)||0,a.upperRight_Y=t(i)||0,[Number(Fe(a.lowerLeft_X)),Number(Fe(a.lowerLeft_Y)),Number(Fe(a.upperRight_X)),Number(Fe(a.upperRight_Y))]},Ve=function(e,t){var n,r=0===e.fontSize?e.maxFontSize:e.fontSize,i={text:"",fontSize:""},o=(t=")"==(t="("==t.substr(0,1)?t.substr(1):t).substr(t.length-1)?t.substr(0,t.length-1):t).split(" "),a=r,s=(s=Xe.internal.getHeight(e)||0)<0?-s:s,u=(u=Xe.internal.getWidth(e)||0)<0?-u:u;a++;e:for(;0<a;){t="";var c,l,h=L("3",e,--a).height,f=e.multiline?s-a:(s-h)/2,d=f+=2,p=0,m=0;if(a<=0){t="(...) Tj\n",t+="% Width of Text: "+L(t,e,a=12).width+", FieldWidth:"+u+"\n";break}var g,A="",v=0;for(g in o)if(o.hasOwnProperty(g)){A=" "==(A+=o[g]+" ").substr(A.length-1)?A.substr(0,A.length-1):A;var b=parseInt(g),y=(w=A,n=a,(y=b)+1<o.length&&L(w=w+" "+o[y+1],e,n).width<=u-4),w=g>=o.length-1;if(y&&!w)A+=" ";else{if(y||w){if(w)m=b;else if(e.multiline&&s<(h+2)*(v+2)+2)continue e}else{if(!e.multiline)continue e;if(s<(h+2)*(v+2)+2)continue e;m=b}for(var x="",C=p;C<=m;C++)x+=o[C]+" ";switch(l=L(x=" "==x.substr(x.length-1)?x.substr(0,x.length-1):x,e,a).width,e.textAlign){case"right":c=u-l-2;break;case"center":c=(u-l)/2;break;default:c=2}t=(t=(t+=Fe(c)+" "+Fe(d)+" Td\n")+"("+Ne(x)+") Tj\n")+-Fe(c)+" 0 Td\n",d=-(a+2),l=0,p=m+1,v++,A=""}}break}return i.text=t,i.fontSize=a,i},qe={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},Ge=Me.__acroform__.arrayToPdfArray=function(e,t,n){var r=function(e){return e};if(Array.isArray(e)){for(var i="[",a=0;a<e.length;a++)switch(0!==a&&(i+=" "),o(e[a])){case"boolean":case"number":case"object":i+=e[a].toString();break;case"string":"/"!==e[a].substr(0,1)?(void 0!==t&&n&&(r=n.internal.getEncryptor(t)),i+="("+Ne(r(e[a].toString()))+")"):i+=e[a].toString()}return i+"]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},We=(z.prototype.toString=function(){return this.objId+" 0 R"},z.prototype.putStream=function(){var e=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:e,objectId:this.objId}),this.scope.internal.out("endobj")},z.prototype.getKeyValueListForStream=function(){var e,t,n,r=[],i=Object.getOwnPropertyNames(this).filter((function(e){return"content"!=e&&"appearanceStreamContent"!=e&&"scope"!=e&&"objId"!=e&&"_"!=e.substring(0,1)}));for(e in i)!1!==Object.getOwnPropertyDescriptor(this,i[e]).configurable||(n=this[t=i[e]])&&(Array.isArray(n)?r.push({key:t,value:Ge(n,this.objId,this.scope)}):n instanceof z?(n.scope=this.scope,r.push({key:t,value:n.objId+" 0 R"})):"function"!=typeof n&&r.push({key:t,value:n}));return r},R(H,z),R($,z),R(Q,z),R(V,Q),R(q,V),R(G,q),R(W,G),function(){Q.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return Boolean(ze(this.Ff,15))},set:function(e){!0===Boolean(e)?this.Ff=He(this.Ff,15):this.Ff=$e(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return Boolean(ze(this.Ff,16))},set:function(e){!0===Boolean(e)?this.Ff=He(this.Ff,16):this.Ff=$e(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return Boolean(ze(this.Ff,17))},set:function(e){!0===Boolean(e)?this.Ff=He(this.Ff,17):this.Ff=$e(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return Boolean(ze(this.Ff,26))},set:function(e){!0===Boolean(e)?this.Ff=He(this.Ff,26):this.Ff=$e(this.Ff,26)}});var e,t={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var e=function(e){return e};if(this.scope&&(e=this.scope.internal.getEncryptor(this.objId)),0!==Object.keys(t).length){var n,r=[];for(n in r.push("<<"),t)r.push("/"+n+" ("+Ne(e(t[n]))+")");return r.push(">>"),r.join("\n")}},set:function(e){"object"==o(e)&&(t=e)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return t.CA||""},set:function(e){"string"==typeof e&&(t.CA=e)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return e.substr(1,e.length-1)},set:function(t){e="/"+t}})}),Ke=(R(We,Q),R(K,We),R(Y,We),function(){var e,t;Q.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return t},set:function(e){t=e}});var n,r={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var e=function(e){return e};this.scope&&(e=this.scope.internal.getEncryptor(this.objId));var t,n=[];for(t in n.push("<<"),r)n.push("/"+t+" ("+Ne(e(r[t]))+")");return n.push(">>"),n.join("\n")},set:function(e){"object"==o(e)&&(r=e)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return r.CA||""},set:function(e){"string"==typeof e&&(r.CA=e)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return n},set:function(e){n=e}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return n.substr(1,n.length-1)},set:function(e){n="/"+e}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=Xe.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)}),Ye=(R(Ke,Q),Y.prototype.setAppearance=function(e){if(!("createAppearanceStream"in e)||!("getCA"in e))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var t in this.Kids)this.Kids.hasOwnProperty(t)&&((t=this.Kids[t]).appearanceStreamContent=e.createAppearanceStream(t.optionName),t.caption=e.getCA())},Y.prototype.createOption=function(e){var t=new Ke;return t.Parent=this,t.optionName=e,this.Kids.push(t),Je.call(this.scope,t),t},R(X,We),function(){Q.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return Boolean(ze(this.Ff,13))},set:function(e){!0===Boolean(e)?this.Ff=He(this.Ff,13):this.Ff=$e(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return Boolean(ze(this.Ff,21))},set:function(e){!0===Boolean(e)?this.Ff=He(this.Ff,21):this.Ff=$e(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return Boolean(ze(this.Ff,23))},set:function(e){!0===Boolean(e)?this.Ff=He(this.Ff,23):this.Ff=$e(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return Boolean(ze(this.Ff,24))},set:function(e){!0===Boolean(e)?this.Ff=He(this.Ff,24):this.Ff=$e(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return Boolean(ze(this.Ff,25))},set:function(e){!0===Boolean(e)?this.Ff=He(this.Ff,25):this.Ff=$e(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return Boolean(ze(this.Ff,26))},set:function(e){!0===Boolean(e)?this.Ff=He(this.Ff,26):this.Ff=$e(this.Ff,26)}});var e=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return e},set:function(t){Number.isInteger(t)&&(e=t)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})}),Xe=(R(Ye,Q),R(J,Ye),{CheckBox:{createAppearanceStream:function(){return{N:{On:Xe.CheckBox.YesNormal},D:{On:Xe.CheckBox.YesPushDown,Off:Xe.CheckBox.OffPushDown}}},YesPushDown:function(e){var t=Re(e),n=(t.scope=e.scope,[]),r=e.scope.internal.getFont(e.fontName,e.fontStyle).id,i=e.scope.__private__.encodeColorString(e.color),o=Ve(e,e.caption);return n.push("0.749023 g"),n.push("0 0 "+Fe(Xe.internal.getWidth(e))+" "+Fe(Xe.internal.getHeight(e))+" re"),n.push("f"),n.push("BMC"),n.push("q"),n.push("0 0 1 rg"),n.push("/"+r+" "+Fe(o.fontSize)+" Tf "+i),n.push("BT"),n.push(o.text),n.push("ET"),n.push("Q"),n.push("EMC"),t.stream=n.join("\n"),t},YesNormal:function(e){var t=Re(e),n=(t.scope=e.scope,e.scope.internal.getFont(e.fontName,e.fontStyle).id),r=e.scope.__private__.encodeColorString(e.color),i=[],o=Xe.internal.getHeight(e),a=Xe.internal.getWidth(e);e=Ve(e,e.caption);return i.push("1 g"),i.push("0 0 "+Fe(a)+" "+Fe(o)+" re"),i.push("f"),i.push("q"),i.push("0 0 1 rg"),i.push("0 0 "+Fe(a-1)+" "+Fe(o-1)+" re"),i.push("W"),i.push("n"),i.push("0 g"),i.push("BT"),i.push("/"+n+" "+Fe(e.fontSize)+" Tf "+r),i.push(e.text),i.push("ET"),i.push("Q"),t.stream=i.join("\n"),t},OffPushDown:function(e){var t=Re(e),n=(t.scope=e.scope,[]);return n.push("0.749023 g"),n.push("0 0 "+Fe(Xe.internal.getWidth(e))+" "+Fe(Xe.internal.getHeight(e))+" re"),n.push("f"),t.stream=n.join("\n"),t}},RadioButton:{Circle:{createAppearanceStream:function(e){var t={D:{Off:Xe.RadioButton.Circle.OffPushDown},N:{}};return t.N[e]=Xe.RadioButton.Circle.YesNormal,t.D[e]=Xe.RadioButton.Circle.YesPushDown,t},getCA:function(){return"l"},YesNormal:function(e){var t=Re(e),n=(t.scope=e.scope,[]),r=Xe.internal.getWidth(e)<=Xe.internal.getHeight(e)?Xe.internal.getWidth(e)/4:Xe.internal.getHeight(e)/4,i=(r=Number((.9*r).toFixed(5)),Xe.internal.Bezier_C);i=Number((r*i).toFixed(5));return n.push("q"),n.push("1 0 0 1 "+F(Xe.internal.getWidth(e)/2)+" "+F(Xe.internal.getHeight(e)/2)+" cm"),n.push(r+" 0 m"),n.push(r+" "+i+" "+i+" "+r+" 0 "+r+" c"),n.push("-"+i+" "+r+" -"+r+" "+i+" -"+r+" 0 c"),n.push("-"+r+" -"+i+" -"+i+" -"+r+" 0 -"+r+" c"),n.push(i+" -"+r+" "+r+" -"+i+" "+r+" 0 c"),n.push("f"),n.push("Q"),t.stream=n.join("\n"),t},YesPushDown:function(e){var t=Re(e),n=(t.scope=e.scope,[]),r=Xe.internal.getWidth(e)<=Xe.internal.getHeight(e)?Xe.internal.getWidth(e)/4:Xe.internal.getHeight(e)/4,i=(r=Number((.9*r).toFixed(5)),Number((2*r).toFixed(5))),o=Number((i*Xe.internal.Bezier_C).toFixed(5)),a=Number((r*Xe.internal.Bezier_C).toFixed(5));return n.push("0.749023 g"),n.push("q"),n.push("1 0 0 1 "+F(Xe.internal.getWidth(e)/2)+" "+F(Xe.internal.getHeight(e)/2)+" cm"),n.push(i+" 0 m"),n.push(i+" "+o+" "+o+" "+i+" 0 "+i+" c"),n.push("-"+o+" "+i+" -"+i+" "+o+" -"+i+" 0 c"),n.push("-"+i+" -"+o+" -"+o+" -"+i+" 0 -"+i+" c"),n.push(o+" -"+i+" "+i+" -"+o+" "+i+" 0 c"),n.push("f"),n.push("Q"),n.push("0 g"),n.push("q"),n.push("1 0 0 1 "+F(Xe.internal.getWidth(e)/2)+" "+F(Xe.internal.getHeight(e)/2)+" cm"),n.push(r+" 0 m"),n.push(r+" "+a+" "+a+" "+r+" 0 "+r+" c"),n.push("-"+a+" "+r+" -"+r+" "+a+" -"+r+" 0 c"),n.push("-"+r+" -"+a+" -"+a+" -"+r+" 0 -"+r+" c"),n.push(a+" -"+r+" "+r+" -"+a+" "+r+" 0 c"),n.push("f"),n.push("Q"),t.stream=n.join("\n"),t},OffPushDown:function(e){var t=Re(e),n=(t.scope=e.scope,[]),r=Xe.internal.getWidth(e)<=Xe.internal.getHeight(e)?Xe.internal.getWidth(e)/4:Xe.internal.getHeight(e)/4,i=(r=Number((.9*r).toFixed(5)),r=Number((2*r).toFixed(5)),Number((r*Xe.internal.Bezier_C).toFixed(5)));return n.push("0.749023 g"),n.push("q"),n.push("1 0 0 1 "+F(Xe.internal.getWidth(e)/2)+" "+F(Xe.internal.getHeight(e)/2)+" cm"),n.push(r+" 0 m"),n.push(r+" "+i+" "+i+" "+r+" 0 "+r+" c"),n.push("-"+i+" "+r+" -"+r+" "+i+" -"+r+" 0 c"),n.push("-"+r+" -"+i+" -"+i+" -"+r+" 0 -"+r+" c"),n.push(i+" -"+r+" "+r+" -"+i+" "+r+" 0 c"),n.push("f"),n.push("Q"),t.stream=n.join("\n"),t}},Cross:{createAppearanceStream:function(e){var t={D:{Off:Xe.RadioButton.Cross.OffPushDown},N:{}};return t.N[e]=Xe.RadioButton.Cross.YesNormal,t.D[e]=Xe.RadioButton.Cross.YesPushDown,t},getCA:function(){return"8"},YesNormal:function(e){var t=Re(e),n=(t.scope=e.scope,[]),r=Xe.internal.calculateCross(e);return n.push("q"),n.push("1 1 "+Fe(Xe.internal.getWidth(e)-2)+" "+Fe(Xe.internal.getHeight(e)-2)+" re"),n.push("W"),n.push("n"),n.push(Fe(r.x1.x)+" "+Fe(r.x1.y)+" m"),n.push(Fe(r.x2.x)+" "+Fe(r.x2.y)+" l"),n.push(Fe(r.x4.x)+" "+Fe(r.x4.y)+" m"),n.push(Fe(r.x3.x)+" "+Fe(r.x3.y)+" l"),n.push("s"),n.push("Q"),t.stream=n.join("\n"),t},YesPushDown:function(e){var t=Re(e),n=(t.scope=e.scope,Xe.internal.calculateCross(e)),r=[];return r.push("0.749023 g"),r.push("0 0 "+Fe(Xe.internal.getWidth(e))+" "+Fe(Xe.internal.getHeight(e))+" re"),r.push("f"),r.push("q"),r.push("1 1 "+Fe(Xe.internal.getWidth(e)-2)+" "+Fe(Xe.internal.getHeight(e)-2)+" re"),r.push("W"),r.push("n"),r.push(Fe(n.x1.x)+" "+Fe(n.x1.y)+" m"),r.push(Fe(n.x2.x)+" "+Fe(n.x2.y)+" l"),r.push(Fe(n.x4.x)+" "+Fe(n.x4.y)+" m"),r.push(Fe(n.x3.x)+" "+Fe(n.x3.y)+" l"),r.push("s"),r.push("Q"),t.stream=r.join("\n"),t},OffPushDown:function(e){var t=Re(e),n=(t.scope=e.scope,[]);return n.push("0.749023 g"),n.push("0 0 "+Fe(Xe.internal.getWidth(e))+" "+Fe(Xe.internal.getHeight(e))+" re"),n.push("f"),t.stream=n.join("\n"),t}}},createDefaultAppearanceStream:function(e){var t=e.scope.internal.getFont(e.fontName,e.fontStyle).id,n=e.scope.__private__.encodeColorString(e.color);return"/"+t+" "+e.fontSize+" Tf "+n}}),Je=(Xe.internal={Bezier_C:.551915024494,calculateCross:function(e){var t=Xe.internal.getWidth(e),n=(e=Xe.internal.getHeight(e),Math.min(t,e));return{x1:{x:(t-n)/2,y:(e-n)/2+n},x2:{x:(t-n)/2+n,y:(e-n)/2},x3:{x:(t-n)/2,y:(e-n)/2},x4:{x:(t-n)/2+n,y:(e-n)/2+n}}}},Xe.internal.getWidth=function(e){var t=0;return"object"==o(e)?P(e.Rect[2]):t},Xe.internal.getHeight=function(e){var t=0;return"object"==o(e)?P(e.Rect[3]):t},Me.addField=function(e){var t;if(function(e,t){if(void 0!==(t.scope=e).internal&&(void 0===e.internal.acroformPlugin||!1===e.internal.acroformPlugin.isInitialized)){if(Q.FieldNum=0,e.internal.acroformPlugin=JSON.parse(JSON.stringify(qe)),e.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");je=e.internal.scaleFactor,e.internal.acroformPlugin.acroFormDictionaryRoot=new $,(e.internal.acroformPlugin.acroFormDictionaryRoot.scope=e).internal.acroformPlugin.acroFormDictionaryRoot._eventID=e.internal.events.subscribe("postPutResources",(function(){var t;(t=e).internal.events.unsubscribe(t.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete t.internal.acroformPlugin.acroFormDictionaryRoot._eventID,t.internal.acroformPlugin.printedOut=!0})),e.internal.events.subscribe("buildDocument",(function(){var t=e;t.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var n,r,i=t.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(n in i)i.hasOwnProperty(n)&&((r=i[n]).objId=void 0,r.hasAnnotation&&function(e,t){var n={type:"reference",object:e};void 0===t.internal.getPageInfo(e.page).pageContext.annotations.find((function(e){return e.type===n.type&&e.object===n.object}))&&t.internal.getPageInfo(e.page).pageContext.annotations.push(n)}(r,t))})),e.internal.events.subscribe("putCatalog",(function(){var t=e;if(void 0===t.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("putCatalogCallback: Root missing.");t.internal.write("/AcroForm "+t.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")})),e.internal.events.subscribe("postPutPages",(function(t){var n,r,i,a=t,s=e;t=!a;for(g in a||(s.internal.newObjectDeferredBegin(s.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),s.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),a=a||s.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(a.hasOwnProperty(g)){var u,c=a[g],l=[],h=c.Rect;if(c.Rect&&(c.Rect=Qe(c.Rect,s)),s.internal.newObjectDeferredBegin(c.objId,!0),c.DA=Xe.createDefaultAppearanceStream(c),"object"==o(c)&&"function"==typeof c.getKeyValueListForStream&&(l=c.getKeyValueListForStream()),c.Rect=h,c.hasAppearanceStream&&!c.appearanceStreamContent&&(r=u=h=void 0,u=(n=c).appearanceStreamContent||(n.V||n.DV?(h=[],u=n._V||n.DV,u=Ve(n,u),r=n.scope.internal.getFont(n.fontName,n.fontStyle).id,h.push("/Tx BMC"),h.push("q"),h.push("BT"),h.push(n.scope.__private__.encodeColorString(n.color)),h.push("/"+r+" "+Fe(u.fontSize)+" Tf"),h.push("1 0 0 1 0 0 Tm"),h.push(u.text),h.push("ET"),h.push("Q"),h.push("EMC"),(r=Re(n)).scope=n.scope,r.stream=h.join("\n"),r):void 0),l.push({key:"AP",value:"<</N "+u+">>"}),s.internal.acroformPlugin.xForms.push(u)),c.appearanceStreamContent){var f,d="";for(f in c.appearanceStreamContent)if(c.appearanceStreamContent.hasOwnProperty(f)){var p,m=c.appearanceStreamContent[f];d=d+"/"+f+" <<";if(1<=Object.keys(m).length||Array.isArray(m))for(var g in m)m.hasOwnProperty(g)&&(d+="/"+g+" "+(p="function"==typeof(p=m[g])?p.call(s,c):p)+" ",0<=s.internal.acroformPlugin.xForms.indexOf(p)||s.internal.acroformPlugin.xForms.push(p));else d+="/"+g+" "+(p="function"==typeof(p=m)?p.call(s,c):p),0<=s.internal.acroformPlugin.xForms.indexOf(p)||s.internal.acroformPlugin.xForms.push(p);d+=">>"}l.push({key:"AP",value:"<<\n"+d+">>"})}s.internal.putStream({additionalKeyValues:l,objectId:c.objId}),s.internal.out("endobj")}if(t){var A,v=s.internal.acroformPlugin.xForms,b=s;for(A in v)v.hasOwnProperty(A)&&(i=v[A=A],b.internal.newObjectDeferredBegin(i.objId,!0),"object"==o(i)&&"function"==typeof i.putStream&&i.putStream(),delete v[A])}})),e.internal.acroformPlugin.isInitialized=!0}}(this,e),e instanceof Q)return(t=e).scope.internal.acroformPlugin.printedOut&&(t.scope.internal.acroformPlugin.printedOut=!1,t.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),t.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(t),e.page=e.scope.internal.getCurrentPageInfo().pageNumber,this;throw new Error("Invalid argument passed to jsPDF.addField.")});
/** @license
     * jsPDF addImage plugin
     * Copyright (c) 2012 Jason Siefken, https://github.com/siefkenj/
     *               2013 Chris Dowling, https://github.com/gingerchris
     *               2013 Trinh Ho, https://github.com/ineedfat
     *               2013 Edwin Alejandro Perez, https://github.com/eaparango
     *               2013 Norah Smith, https://github.com/burnburnrocket
     *               2014 Diego Casorran, https://github.com/diegocr
     *               2014 James Robb, https://github.com/jamesbrobb
     *
     * Permission is hereby granted, free of charge, to any person obtaining
     * a copy of this software and associated documentation files (the
     * "Software"), to deal in the Software without restriction, including
     * without limitation the rights to use, copy, modify, merge, publish,
     * distribute, sublicense, and/or sell copies of the Software, and to
     * permit persons to whom the Software is furnished to do so, subject to
     * the following conditions:
     *
     * The above copyright notice and this permission notice shall be
     * included in all copies or substantial portions of the Software.
     *
     * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
     * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
     * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
     * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
     * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
     * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
     * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
     */Me.AcroFormChoiceField=V,Me.AcroFormListBox=q,Me.AcroFormComboBox=G,Me.AcroFormEditBox=W,Me.AcroFormButton=We,Me.AcroFormPushButton=K,Me.AcroFormRadioButton=Y,Me.AcroFormCheckBox=X,Me.AcroFormTextField=Ye,Me.AcroFormPasswordField=J,Me.AcroFormAppearance=Xe,Me.AcroForm={ChoiceField:V,ListBox:q,ComboBox:G,EditBox:W,Button:We,PushButton:K,RadioButton:Y,CheckBox:X,TextField:Ye,PasswordField:J,Appearance:Xe},j.AcroForm={ChoiceField:V,ListBox:q,ComboBox:G,EditBox:W,Button:We,PushButton:K,RadioButton:Y,CheckBox:X,TextField:Ye,PasswordField:J,Appearance:Xe},Me=j.AcroForm;function Ze(e){return e.reduce((function(e,t,n){return e[t]=n,e}),{})}function et(){void 0===this.internal.__cell__&&(this.internal.__cell__={},this.internal.__cell__.padding=3,this.internal.__cell__.headerFunction=void 0,this.internal.__cell__.margins=Object.assign({},Z),this.internal.__cell__.margins.width=this.getPageWidth(),tt.call(this))}function tt(){this.internal.__cell__.lastCell=new te,this.internal.__cell__.pages=1}function nt(){var e=void 0,t=(Object.defineProperty(this,"pdf",{get:function(){return e},set:function(t){e=t}}),150),n=(Object.defineProperty(this,"width",{get:function(){return t},set:function(e){t=isNaN(e)||!1===Number.isInteger(e)||e<0?150:e,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=t+1)}}),300),r=(Object.defineProperty(this,"height",{get:function(){return n},set:function(e){n=isNaN(e)||!1===Number.isInteger(e)||e<0?300:e,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=n+1)}}),[]),i=(Object.defineProperty(this,"childNodes",{get:function(){return r},set:function(e){r=e}}),{});Object.defineProperty(this,"style",{get:function(){return i},set:function(e){i=e}}),Object.defineProperty(this,"parentNode",{})}function rt(e){var t,n,r=0,i=0,o="",a=(e=e||"").split("\\s+"),s=[];for(r=0;r<a.length;r+=1){for(s.push(""),i=0;i<a[r].length;i+=1)o=a[r][i],t=a[r][i-1],n=a[r][i+1],ce(o)?(t=me(o,t,n),s[r]+=-1!==t?String.fromCharCode(ie[o.charCodeAt(0)][t]):o):s[r]+=o;s[r]=pe(s[r])}return s.join(" ")}function it(e){return void 0!==e&&""!=e}function ot(){var e,t=this.internal.collections.addImage_images;for(e in t)ye.call(this,t[e])}function at(){var e,t,n=this.internal.collections.addImage_images,r=this.internal.write;for(t in n)r("/I"+(e=n[t]).index,e.objectId,"0","R")}function st(e){return"function"==typeof ge["process"+e.toUpperCase()]}function ut(e){return"object"==o(e)&&1===e.nodeType}function ct(e,t){if("IMG"===e.nodeName&&e.hasAttribute("src")){var n=""+e.getAttribute("src");if(0===n.indexOf("data:image/"))return y(unescape(n).split("base64,").pop());if(void 0!==(n=ge.loadFile(n,!0)))return n}if("CANVAS"===e.nodeName){var r;switch(t){case"PNG":r="image/png";break;case"WEBP":r="image/webp";break;default:r="image/jpeg"}return y(e.toDataURL(r,1).split("base64,").pop())}}function lt(e,t,n,r,i,o){var a,s=function(e,t,n){return e||t||(t=e=-96),e<0&&(e=-1*n.width*72/e/this.internal.scaleFactor),t<0&&(t=-1*n.height*72/t/this.internal.scaleFactor),[e=0===e?t*n.width/n.height:e,t=0===t?e*n.height/n.width:t]}.call(this,n,r,i),u=this.internal.getCoordinateString,c=this.internal.getVerticalCoordinateString,l=function(){var e=this.internal.collections.addImage_images;return we.call(this),e}.call(this);n=s[0],r=s[1],l[i.index]=i,o&&(o*=Math.PI/180,s=Math.cos(o),l=Math.sin(o),a=[(a=function(e){return e.toFixed(4)})(s),a(l),a(-1*l),a(s),0,0,"cm"]),this.internal.write("q"),o?(this.internal.write([1,"0","0",1,u(e),c(t+r),"cm"].join(" ")),this.internal.write(a.join(" ")),this.internal.write([u(n),"0","0",u(r),"0","0","cm"].join(" "))):this.internal.write([u(n),"0","0",u(r),u(e),c(t+r),"cm"].join(" ")),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,"cm"].join(" ")),this.internal.write("/I"+i.index+" Do"),this.internal.write("Q")}(ge=j.API).__addimage__={},Ae="UNKNOWN",ve={PNG:[[137,80,78,71]],TIFF:[[77,77,0,42],[73,73,42,0]],JPEG:[[255,216,255,224,void 0,void 0,74,70,73,70,0],[255,216,255,225,void 0,void 0,69,120,105,102,0,0],[255,216,255,219],[255,216,255,238]],JPEG2000:[[0,0,0,12,106,80,32,32]],GIF87a:[[71,73,70,56,55,97]],GIF89a:[[71,73,70,56,57,97]],WEBP:[[82,73,70,70,void 0,void 0,void 0,void 0,87,69,66,80]],BMP:[[66,77],[66,65],[67,73],[67,80],[73,67],[80,84]]},be=ge.__addimage__.getImageFileTypeByImageData=function(e,t){var n,r;t=t||Ae;var i,o,a,s=Ae;if(Oe(e))for(a in ve)for(i=ve[a],n=0;n<i.length;n+=1){for(o=!0,r=0;r<i[n].length;r+=1)if(void 0!==i[n][r]&&i[n][r]!==e[r]){o=!1;break}if(!0===o){s=a;break}}else for(a in ve)for(i=ve[a],n=0;n<i.length;n+=1){for(o=!0,r=0;r<i[n].length;r+=1)if(void 0!==i[n][r]&&i[n][r]!==e.charCodeAt(r)){o=!1;break}if(!0===o){s=a;break}}return s===Ae&&t!==Ae?t:s},ye=function e(t){for(var n=this.internal.write,r=this.internal.putStream,i=(0,this.internal.getFilters)();-1!==i.indexOf("FlateEncode");)i.splice(i.indexOf("FlateEncode"),1);t.objectId=this.internal.newObject();var o=[];if(o.push({key:"Type",value:"/XObject"}),o.push({key:"Subtype",value:"/Image"}),o.push({key:"Width",value:t.width}),o.push({key:"Height",value:t.height}),t.colorSpace===xe.INDEXED?o.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(t.palette.length/3-1)+" "+("sMask"in t&&void 0!==t.sMask?t.objectId+2:t.objectId+1)+" 0 R]"}):(o.push({key:"ColorSpace",value:"/"+t.colorSpace}),t.colorSpace===xe.DEVICE_CMYK&&o.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),o.push({key:"BitsPerComponent",value:t.bitsPerComponent}),"decodeParameters"in t&&void 0!==t.decodeParameters&&o.push({key:"DecodeParms",value:"<<"+t.decodeParameters+">>"}),"transparency"in t&&Array.isArray(t.transparency)){for(var a="",s=0,u=t.transparency.length;s<u;s++)a+=t.transparency[s]+" "+t.transparency[s]+" ";o.push({key:"Mask",value:"["+a+"]"})}void 0!==t.sMask&&o.push({key:"SMask",value:t.objectId+1+" 0 R"});var c=void 0!==t.filter?["/"+t.filter]:void 0;r({data:t.data,additionalKeyValues:o,alreadyAppliedFilters:c,objectId:t.objectId}),n("endobj"),"sMask"in t&&void 0!==t.sMask&&(o="/Predictor "+t.predictor+" /Colors 1 /BitsPerComponent "+t.bitsPerComponent+" /Columns "+t.width,c={width:t.width,height:t.height,colorSpace:"DeviceGray",bitsPerComponent:t.bitsPerComponent,decodeParameters:o,data:t.sMask},"filter"in t&&(c.filter=t.filter),e.call(this,c)),t.colorSpace===xe.INDEXED&&(o=this.internal.newObject(),r({data:De(new Uint8Array(t.palette)),objectId:o}),n("endobj"))},we=function(){this.internal.collections.addImage_images||(this.internal.collections.addImage_images={},this.internal.events.subscribe("putResources",ot),this.internal.events.subscribe("putXobjectDict",at))},xe=ge.color_spaces={DEVICE_RGB:"DeviceRGB",DEVICE_GRAY:"DeviceGray",DEVICE_CMYK:"DeviceCMYK",CAL_GREY:"CalGray",CAL_RGB:"CalRGB",LAB:"Lab",ICC_BASED:"ICCBased",INDEXED:"Indexed",PATTERN:"Pattern",SEPARATION:"Separation",DEVICE_N:"DeviceN"},ge.decode={DCT_DECODE:"DCTDecode",FLATE_DECODE:"FlateDecode",LZW_DECODE:"LZWDecode",JPX_DECODE:"JPXDecode",JBIG2_DECODE:"JBIG2Decode",ASCII85_DECODE:"ASCII85Decode",ASCII_HEX_DECODE:"ASCIIHexDecode",RUN_LENGTH_DECODE:"RunLengthDecode",CCITT_FAX_DECODE:"CCITTFaxDecode"},Ce=ge.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},ke=ge.__addimage__.sHashCode=function(e){var t,n,r=0;if("string"==typeof e)for(n=e.length,t=0;t<n;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;else if(Oe(e))for(n=e.byteLength/2,t=0;t<n;t++)r=(r<<5)-r+e[t],r|=0;return r},Ee=ge.__addimage__.validateStringAsBase64=function(e){(e=e||"").toString().trim();var t=!0;return 0===e.length&&(t=!1),e.length%4!=0&&(t=!1),!1===/^[A-Za-z0-9+/]+$/.test(e.substr(0,e.length-2))&&(t=!1),!1!==/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(e.substr(-2))&&t},Se=ge.__addimage__.extractImageFromDataUrl=function(e){var t,n=null;return 2===(e=(e=e||"").split("base64,")).length&&(t=/^data:(\w*\/\w*);*(charset=(?!charset=)[\w=-]*)*;*$/.exec(e[0]),Array.isArray(t)&&(n={mimeType:t[1],charset:t[2],data:e[1]})),n},_e=ge.__addimage__.supportsArrayBuffer=function(){return"undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array},ge.__addimage__.isArrayBuffer=function(e){return _e()&&e instanceof ArrayBuffer},Oe=ge.__addimage__.isArrayBufferView=function(e){return _e()&&"undefined"!=typeof Uint32Array&&(e instanceof Int8Array||e instanceof Uint8Array||"undefined"!=typeof Uint8ClampedArray&&e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array)},Te=ge.__addimage__.binaryStringToUint8Array=function(e){for(var t=e.length,n=new Uint8Array(t),r=0;r<t;r++)n[r]=e.charCodeAt(r);return n},De=ge.__addimage__.arrayBufferToBinaryString=function(e){try{return y(w(String.fromCharCode.apply(null,e)))}catch(t){if("undefined"!=typeof Uint8Array&&void 0!==Uint8Array.prototype.reduce)return new Uint8Array(e).reduce((function(e,t){return e.push(String.fromCharCode(t)),e}),[]).join("")}},ge.addImage=function(){c="number"==typeof arguments[1]?(t=Ae,n=arguments[1],r=arguments[2],i=arguments[3],a=arguments[4],s=arguments[5],u=arguments[6],arguments[7]):(t=arguments[1],n=arguments[2],r=arguments[3],i=arguments[4],a=arguments[5],s=arguments[6],u=arguments[7],arguments[8]),"object"==o(e=arguments[0])&&!ut(e)&&"imageData"in e&&(e=(l=e).imageData,t=l.format||t||Ae,n=l.x||n||0,r=l.y||r||0,i=l.w||l.width||i,a=l.h||l.height||a,s=l.alias||s,u=l.compression||u,c=l.rotation||l.angle||c);var e,t,n,r,i,a,s,u,c,l=this.internal.getFilters();if(void 0===u&&-1!==l.indexOf("FlateEncode")&&(u="SLOW"),isNaN(n)||isNaN(r))throw new Error("Invalid coordinates passed to jsPDF.addImage");return we.call(this),l=Be.call(this,e,t,s,u),lt.call(this,n,r,i,a,l,c),this},Be=function(e,t,n,r){var i,o,a;if("string"==typeof e&&be(e)===Ae&&(e=unescape(e),""===(a=Ie(e,!1))&&void 0===(a=ge.loadFile(e,!0))||(e=a)),ut(e)&&(e=ct(e,t)),!st(t=be(e,t)))throw new Error("addImage does not support files of type '"+t+"', please ensure that a plugin for '"+t+"' support is added.");if(null!=n&&0!==n.length||(n="string"==typeof(a=e)||Oe(a)?ke(a):null),(i=function(e){var t=this.internal.collections.addImage_images;if(t)for(var n in t)if(e===t[n].alias)return t[n]}.call(this,n))||(!_e()||e instanceof Uint8Array||(e=Te(o=e)),i=this["process"+t.toUpperCase()](e,function(){return Object.keys(this.internal.collections.addImage_images).length}.call(this),n,(t=(t=r)&&"string"==typeof t?t.toUpperCase():t)in ge.image_compression?t:Ce.NONE,o)),i)return i;throw new Error("An unknown error occurred whilst processing the image.")},Ie=ge.__addimage__.convertBase64ToBinaryString=function(e,t){t="boolean"!=typeof t||t;var n,r="";if("string"==typeof e){n=null!==(n=Se(e))?n.data:e;try{r=y(n)}catch(e){if(t)throw Ee(n)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+e.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return r},ge.getImageProperties=function(e){var t="";if("string"==typeof(e=ut(e)?ct(e):e)&&be(e)===Ae&&(e=t=""===(t=Ie(e,!1))?ge.loadFile(e)||"":t),!st(t=be(e)))throw new Error("addImage does not support files of type '"+t+"', please ensure that a plugin for '"+t+"' support is added.");if(!_e()||e instanceof Uint8Array||(e=Te(e)),e=this["process"+t.toUpperCase()](e))return e.fileType=t,e;throw new Error("An unknown error occurred whilst processing the image")},
/**
     * @license
     * Copyright (c) 2014 Steven Spungin (TwelveTone LLC)  steven@twelvetone.tv
     *
     * Licensed under the MIT License.
     * http://opensource.org/licenses/mit-license
     */
hr=j.API,j.API.events.push(["addPage",function(e){this.internal.getPageInfo(e.pageNumber).pageContext.annotations=[]}]),hr.events.push(["putPage",function(e){for(var t=this.internal.getCoordinateString,n=this.internal.getVerticalCoordinateString,r=this.internal.getPageInfoByObjId(e.objId),i=e.pageContext.annotations,o=!1,a=0;a<i.length&&!o;a++)switch((u=i[a]).type){case"link":(it(u.options.url)||it(u.options.pageNumber))&&(o=!0);break;case"reference":case"text":case"freetext":o=!0}if(0!=o){this.internal.write("/Annots [");for(var s=0;s<i.length;s++){var u=i[s],c=this.internal.pdfEscape,l=this.internal.getEncryptor(e.objId);switch(u.type){case"reference":this.internal.write(" "+u.object.objId+" 0 R ");break;case"text":var h=this.internal.newAdditionalObject(),f=this.internal.newAdditionalObject(),d=this.internal.getEncryptor(h.objId),p=u.title||"Note",m="<</Type /Annot /Subtype /Text "+(g="/Rect ["+t(u.bounds.x)+" "+n(u.bounds.y+u.bounds.h)+" "+t(u.bounds.x+u.bounds.w)+" "+n(u.bounds.y)+"] ")+"/Contents ("+c(d(u.contents))+")";d=(m=(m=(m+=" /Popup "+f.objId+" 0 R")+" /P "+r.objId+" 0 R")+" /T ("+c(d(p))+") >>",h.content=m,h.objId+" 0 R");m="<</Type /Annot /Subtype /Popup "+(g="/Rect ["+t(u.bounds.x+30)+" "+n(u.bounds.y+u.bounds.h)+" "+t(u.bounds.x+u.bounds.w+30)+" "+n(u.bounds.y)+"] ")+" /Parent "+d,u.open&&(m+=" /Open true"),m+=" >>",f.content=m,this.internal.write(h.objId,"0 R",f.objId,"0 R");break;case"freetext":var g="/Rect ["+t(u.bounds.x)+" "+n(u.bounds.y)+" "+t(u.bounds.x+u.bounds.w)+" "+n(u.bounds.y+u.bounds.h)+"] ";p=u.color||"#000000";m="<</Type /Annot /Subtype /FreeText "+g+"/Contents ("+c(l(u.contents))+")",m=(m+=" /DS(font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+p+")")+" /Border [0 0 0] >>",this.internal.write(m);break;case"link":if(u.options.name?(d=this.annotations._nameMap[u.options.name],u.options.pageNumber=d.page,u.options.top=d.y):u.options.top||(u.options.top=0),g="/Rect ["+u.finalBounds.x+" "+u.finalBounds.y+" "+u.finalBounds.w+" "+u.finalBounds.h+"] ",m="",u.options.url)m="<</Type /Annot /Subtype /Link "+g+"/Border [0 0 0] /A <</S /URI /URI ("+c(l(u.options.url))+") >>";else if(u.options.pageNumber)switch(m="<</Type /Annot /Subtype /Link "+g+"/Border [0 0 0] /Dest ["+this.internal.getPageInfo(u.options.pageNumber).objId+" 0 R",u.options.magFactor=u.options.magFactor||"XYZ",u.options.magFactor){case"Fit":m+=" /Fit]";break;case"FitH":m+=" /FitH "+u.options.top+"]";break;case"FitV":u.options.left=u.options.left||0,m+=" /FitV "+u.options.left+"]";break;default:var A=n(u.options.top);u.options.left=u.options.left||0,void 0===u.options.zoom&&(u.options.zoom=0),m+=" /XYZ "+u.options.left+" "+A+" "+u.options.zoom+"]"}""!=m&&(m+=" >>",this.internal.write(m))}}this.internal.write("]")}}]),hr.createAnnotation=function(e){var t=this.internal.getCurrentPageInfo();switch(e.type){case"link":this.link(e.bounds.x,e.bounds.y,e.bounds.w,e.bounds.h,e);break;case"text":case"freetext":t.pageContext.annotations.push(e)}},hr.link=function(e,t,n,r,i){var o=this.internal.getCurrentPageInfo(),a=this.internal.getCoordinateString,s=this.internal.getVerticalCoordinateString;o.pageContext.annotations.push({finalBounds:{x:a(e),y:s(t),w:a(e+n),h:s(t+r)},options:i,type:"link"})},hr.textWithLink=function(e,t,n,r){var i=this.getTextWidth(e),o=this.internal.getLineHeight()/this.internal.scaleFactor;return this.text(e,t,n,r),"center"===r.align&&(t-=i/2),"right"===r.align&&(t-=i),this.link(t,(n+=.2*o)-o,i,o,r),i},hr.getTextWidth=function(e){var t=this.internal.getFontSize();return this.getStringUnitWidth(e)*t/this.internal.scaleFactor},
/**
     * @license
     * Copyright (c) 2017 Aras Abbasi
     *
     * Licensed under the MIT License.
     * http://opensource.org/licenses/mit-license
     */
hr=j.API,ie={1569:[65152],1570:[65153,65154],1571:[65155,65156],1572:[65157,65158],1573:[65159,65160],1574:[65161,65162,65163,65164],1575:[65165,65166],1576:[65167,65168,65169,65170],1577:[65171,65172],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194],1584:[65195,65196],1585:[65197,65198],1586:[65199,65200],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1649:[64336,64337],1655:[64477],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393],1676:[64388,64389],1677:[64386,64387],1678:[64390,64391],1681:[64396,64397],1688:[64394,64395],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421],1729:[64422,64423,64424,64425],1733:[64480,64481],1734:[64473,64474],1735:[64471,64472],1736:[64475,64476],1737:[64482,64483],1739:[64478,64479],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431],1747:[64432,64433]},oe={65247:{65154:65269,65156:65271,65160:65273,65166:65275},65248:{65154:65270,65156:65272,65160:65274,65166:65276},65165:{65247:{65248:{65258:65010}}},1617:{1612:64606,1613:64607,1614:64608,1615:64609,1616:64610}},ae={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},se=[1570,1571,1573,1575],hr.__arabicParser__={},ue=hr.__arabicParser__.isInArabicSubstitutionA=function(e){return void 0!==ie[e.charCodeAt(0)]},ce=hr.__arabicParser__.isArabicLetter=function(e){return"string"==typeof e&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(e)},le=hr.__arabicParser__.isArabicEndLetter=function(e){return ce(e)&&ue(e)&&ie[e.charCodeAt(0)].length<=2},he=hr.__arabicParser__.isArabicAlfLetter=function(e){return ce(e)&&0<=se.indexOf(e.charCodeAt(0))},hr.__arabicParser__.arabicLetterHasIsolatedForm=function(e){return ce(e)&&ue(e)&&1<=ie[e.charCodeAt(0)].length},fe=hr.__arabicParser__.arabicLetterHasFinalForm=function(e){return ce(e)&&ue(e)&&2<=ie[e.charCodeAt(0)].length},hr.__arabicParser__.arabicLetterHasInitialForm=function(e){return ce(e)&&ue(e)&&3<=ie[e.charCodeAt(0)].length},de=hr.__arabicParser__.arabicLetterHasMedialForm=function(e){return ce(e)&&ue(e)&&4==ie[e.charCodeAt(0)].length},pe=hr.__arabicParser__.resolveLigatures=function(e){var t=0,n=oe,r="",i=0;for(t=0;t<e.length;t+=1)void 0!==n[e.charCodeAt(t)]?(i++,"number"==typeof(n=n[e.charCodeAt(t)])&&(r+=String.fromCharCode(n),n=oe,i=0),t===e.length-1&&(n=oe,r+=e.charAt(t-(i-1)),t-=i-1,i=0)):(n=oe,r+=e.charAt(t-i),t-=i,i=0);return r},hr.__arabicParser__.isArabicDiacritic=function(e){return void 0!==e&&void 0!==ae[e.charCodeAt(0)]},me=hr.__arabicParser__.getCorrectForm=function(e,t,n){return ce(e)&&!1!==ue(e)?!fe(e)||!ce(t)&&!ce(n)||!ce(n)&&le(t)||le(e)&&!ce(t)||le(e)&&he(t)||le(e)&&le(t)?0:de(e)&&ce(t)&&!le(t)&&ce(n)&&fe(n)?3:le(e)||!ce(n)?1:2:-1},Cr=hr.__arabicParser__.processArabic=hr.processArabic=function(){var e,t="string"==typeof arguments[0]?arguments[0]:arguments[0].text,n=[];if(Array.isArray(t)){var r=0;for(n=[],r=0;r<t.length;r+=1)Array.isArray(t[r])?n.push([rt(t[r][0]),t[r][1],t[r][2]]):n.push([rt(t[r])]);e=n}else e=rt(t);return"string"==typeof arguments[0]?e:(arguments[0].text=e,arguments[0])},hr.events.push(["preProcessText",Cr]),j.API.autoPrint=function(e){var t;return"javascript"===((e=e||{}).variant=e.variant||"non-conform",e.variant)?this.addJS("print({});"):(this.internal.events.subscribe("postPutResources",(function(){t=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /Named"),this.internal.out("/Type /Action"),this.internal.out("/N /Print"),this.internal.out(">>"),this.internal.out("endobj")})),this.internal.events.subscribe("putCatalog",(function(){this.internal.out("/OpenAction "+t+" 0 R")}))),this
/**
     * @license
     * Copyright (c) 2014 Steven Spungin (TwelveTone LLC)  steven@twelvetone.tv
     *
     * Licensed under the MIT License.
     * http://opensource.org/licenses/mit-license
     */},hr=j.API,nt.prototype.getContext=function(e,t){if("2d"!==(e=e||"2d"))return null;for(var n in t)this.pdf.context2d.hasOwnProperty(n)&&(this.pdf.context2d[n]=t[n]);return(this.pdf.context2d._canvas=this).pdf.context2d},nt.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},hr.events.push(["initialized",function(){this.canvas=new nt,this.canvas.pdf=this}]),
/**
     * @license
     * ====================================================================
     * Copyright (c) 2013 Youssef Beddad, youssef.beddad@gmail.com
     *               2013 Eduardo Menezes de Morais, eduardo.morais@usp.br
     *               2013 Lee Driscoll, https://github.com/lsdriscoll
     *               2014 Juan Pablo Gaviria, https://github.com/juanpgaviria
     *               2014 James Hall, james@parall.ax
     *               2014 Diego Casorran, https://github.com/diegocr
     *
     * Permission is hereby granted, free of charge, to any person obtaining
     * a copy of this software and associated documentation files (the
     * "Software"), to deal in the Software without restriction, including
     * without limitation the rights to use, copy, modify, merge, publish,
     * distribute, sublicense, and/or sell copies of the Software, and to
     * permit persons to whom the Software is furnished to do so, subject to
     * the following conditions:
     *
     * The above copyright notice and this permission notice shall be
     * included in all copies or substantial portions of the Software.
     *
     * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
     * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
     * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
     * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
     * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
     * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
     * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
     * ====================================================================
     */
Cr=j.API,ee=!(Z={left:0,top:0,bottom:0,right:0}),(te=function(){var e=arguments[0],t=(Object.defineProperty(this,"x",{enumerable:!0,get:function(){return e},set:function(t){e=t}}),arguments[1]),n=(Object.defineProperty(this,"y",{enumerable:!0,get:function(){return t},set:function(e){t=e}}),arguments[2]),r=(Object.defineProperty(this,"width",{enumerable:!0,get:function(){return n},set:function(e){n=e}}),arguments[3]),i=(Object.defineProperty(this,"height",{enumerable:!0,get:function(){return r},set:function(e){r=e}}),arguments[4]),o=(Object.defineProperty(this,"text",{enumerable:!0,get:function(){return i},set:function(e){i=e}}),arguments[5]),a=(Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return o},set:function(e){o=e}}),arguments[6]);return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return a},set:function(e){a=e}}),this}).prototype.clone=function(){return new te(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},te.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},Cr.setHeaderFunction=function(e){return et.call(this),this.internal.__cell__.headerFunction="function"==typeof e?e:void 0,this},Cr.getTextDimensions=function(e,t){et.call(this);var n,r=(t=t||{}).fontSize||this.getFontSize(),i=t.font||this.getFont(),o=t.scaleFactor||this.internal.scaleFactor,a=0,s=0,u=this;if(!Array.isArray(e)&&"string"!=typeof e){if("number"!=typeof e)throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");e=String(e)}var c=t.maxWidth;0<c?"string"==typeof e?e=this.splitTextToSize(e,c):"[object Array]"===Object.prototype.toString.call(e)&&(e=e.reduce((function(e,t){return e.concat(u.splitTextToSize(t,c))}),[])):e=Array.isArray(e)?e:[e];for(var l=0;l<e.length;l++)a<(n=this.getStringUnitWidth(e[l],{font:i})*r)&&(a=n);return 0!==a&&(s=e.length),{w:a/=o,h:Math.max((s*r*this.getLineHeightFactor()-r*(this.getLineHeightFactor()-1))/o,0)}},Cr.cellAddPage=function(){et.call(this),this.addPage();var e=this.internal.__cell__.margins||Z;return this.internal.__cell__.lastCell=new te(e.left,e.top,void 0,void 0),this.internal.__cell__.pages+=1,this},ne=Cr.cell=function(){var e=arguments[0]instanceof te?arguments[0]:new te(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5]),t=(et.call(this),this.internal.__cell__.lastCell),n=this.internal.__cell__.padding,r=this.internal.__cell__.margins||Z,i=this.internal.__cell__.tableHeaderRow,o=this.internal.__cell__.printHeaders;return void 0!==t.lineNumber&&(t.lineNumber===e.lineNumber?(e.x=(t.x||0)+(t.width||0),e.y=t.y||0):t.y+t.height+e.height+r.bottom>this.getPageHeight()?(this.cellAddPage(),e.y=r.top,o&&i&&(this.printHeaderRow(e.lineNumber,!0),e.y+=i[0].height)):e.y=t.y+t.height||e.y),void 0!==e.text[0]&&(this.rect(e.x,e.y,e.width,e.height,!0===ee?"FD":void 0),"right"===e.align?this.text(e.text,e.x+e.width-n,e.y+n,{align:"right",baseline:"top"}):"center"===e.align?this.text(e.text,e.x+e.width/2,e.y+n,{align:"center",baseline:"top",maxWidth:e.width-n-n}):this.text(e.text,e.x+n,e.y+n,{align:"left",baseline:"top",maxWidth:e.width-n-n})),this.internal.__cell__.lastCell=e,this},Cr.table=function(e,t,n,r,i){if(et.call(this),!n)throw new Error("No data for PDF table.");var a,s,u=[],c=[],l=[],h={},f={},d=[],p=(i=i||{}).autoSize||!1,m=!1!==i.printHeaders,g=i.css&&void 0!==i.css["font-size"]?16*i.css["font-size"]:i.fontSize||12,A=i.margins||Object.assign({width:this.getPageWidth()},Z),v="number"==typeof i.padding?i.padding:3;i=i.headerBackgroundColor||"#c8c8c8";if(tt.call(this),this.internal.__cell__.printHeaders=m,this.internal.__cell__.margins=A,this.internal.__cell__.table_font_size=g,this.internal.__cell__.padding=v,this.internal.__cell__.headerBackgroundColor=i,this.setFontSize(g),null==r)c=u=Object.keys(n[0]),l=u.map((function(){return"left"}));else if(Array.isArray(r)&&"object"==o(r[0]))for(u=r.map((function(e){return e.name})),c=r.map((function(e){return e.prompt||e.name||""})),l=r.map((function(e){return e.align||"left"})),y=0;y<r.length;y+=1)f[r[y].name]=r[y].width*(19.049976/25.4);else Array.isArray(r)&&"string"==typeof r[0]&&(c=u=r,l=u.map((function(){return"left"})));if(p||Array.isArray(r)&&"string"==typeof r[0])for(y=0;y<u.length;y+=1){for(h[s=u[y]]=n.map((function(e){return e[s]})),this.setFont(void 0,"bold"),d.push(this.getTextDimensions(c[y],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),a=h[s],this.setFont(void 0,"normal"),k=0;k<a.length;k+=1)d.push(this.getTextDimensions(a[k],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);f[s]=Math.max.apply(null,d)+v+v,d=[]}if(m){for(var b={},y=0;y<u.length;y+=1)b[u[y]]={},b[u[y]].text=c[y],b[u[y]].align=l[y];var w=re.call(this,b,f);A=u.map((function(n){return new te(e,t,f[n],w,b[n].text,void 0,b[n].align)}));this.setTableHeaderRow(A),this.printHeaderRow(1,!1)}var x=r.reduce((function(e,t){return e[t.name]=t.align,e}),{});for(y=0;y<n.length;y+=1)for(var C=re.call(this,n[y],f),k=0;k<u.length;k+=1)ne.call(this,new te(e,t,f[u[k]],C,n[y][u[k]],y+2,x[u[k]]));return this.internal.__cell__.table_x=e,this.internal.__cell__.table_y=t,this},re=function(e,t){var n=this.internal.__cell__.padding,r=this.internal.__cell__.table_font_size,i=this.internal.scaleFactor;return Object.keys(e).map((function(r){var i=e[r];return this.splitTextToSize(i.hasOwnProperty("text")?i.text:i,t[r]-n-n)}),this).map((function(e){return this.getLineHeightFactor()*e.length*r/i+n+n}),this).reduce((function(e,t){return Math.max(e,t)}),0)},Cr.setTableHeaderRow=function(e){et.call(this),this.internal.__cell__.tableHeaderRow=e},Cr.printHeaderRow=function(e,t){if(et.call(this),!this.internal.__cell__.tableHeaderRow)throw new Error("Property tableHeaderRow does not exist.");var n,r;ee=!0,"function"==typeof this.internal.__cell__.headerFunction&&(r=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages),this.internal.__cell__.lastCell=new te(r[0],r[1],r[2],r[3],void 0,-1)),this.setFont(void 0,"bold");for(var i=[],o=0;o<this.internal.__cell__.tableHeaderRow.length;o+=1)n=this.internal.__cell__.tableHeaderRow[o].clone(),t&&(n.y=this.internal.__cell__.margins.top||0,i.push(n)),n.lineNumber=e,this.setFillColor(this.internal.__cell__.headerBackgroundColor),ne.call(this,n);0<i.length&&this.setTableHeaderRow(i),this.setFont(void 0,"normal"),ee=!1};var ht={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},ft=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],dt=Ze(ft),pt=[100,200,300,400,500,600,700,800,900],mt=Ze(pt);function gt(e){var t=e.family.replace(/"|'/g,"").toLowerCase(),n=(n=e.style,ht[n=n||"normal"]?n:"normal"),r=(r=e.weight)?"number"==typeof r?100<=r&&r<=900&&r%100==0?r:400:/^\d00$/.test(r)?parseInt(r):"bold"!==r?400:700:400,i=(i=e.stretch,"number"==typeof dt[i=i||"normal"]?i:"normal");return{family:t,style:n,weight:r,stretch:i,src:e.src||[],ref:e.ref||{name:t,style:[i,n,r].join(" ")}}}function At(e,t,n,r){for(var i=n;0<=i&&i<t.length;i+=r)if(e[t[i]])return e[t[i]];for(i=n;0<=i&&i<t.length;i-=r)if(e[t[i]])return e[t[i]]}var vt={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},bt={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function yt(e){return[e.stretch,e.style,e.weight,e.family].join(" ")}function wt(e){return e.trimLeft()}var xt,Ct,kt,Et,St,_t,Ot,Tt,Dt,Bt,It,Mt,jt,Nt,Ft,Rt,Pt,Lt,Ut,zt,Ht,$t,Qt,Vt,qt,Gt,Wt,Kt,Yt,Xt,Jt,Zt,en,tn=["times"];function nn(e){return this.isStrokeTransparent=(e=e||{}).isStrokeTransparent||!1,this.strokeOpacity=e.strokeOpacity||1,this.strokeStyle=e.strokeStyle||"#000000",this.fillStyle=e.fillStyle||"#000000",this.isFillTransparent=e.isFillTransparent||!1,this.fillOpacity=e.fillOpacity||1,this.font=e.font||"10px sans-serif",this.textBaseline=e.textBaseline||"alphabetic",this.textAlign=e.textAlign||"left",this.lineWidth=e.lineWidth||1,this.lineJoin=e.lineJoin||"miter",this.lineCap=e.lineCap||"butt",this.path=e.path||[],this.transform=void 0!==e.transform?e.transform.clone():new Tt,this.globalCompositeOperation=e.globalCompositeOperation||"normal",this.globalAlpha=e.globalAlpha||1,this.clip_path=e.clip_path||[],this.currentPoint=e.currentPoint||new _t,this.miterLimit=e.miterLimit||10,this.lastPoint=e.lastPoint||new _t,this.ignoreClearRect="boolean"!=typeof e.ignoreClearRect||e.ignoreClearRect,this}j.API.events.push(["initialized",function(){this.context2d=new Bt(this),xt=this.internal.f2,Ct=this.internal.getCoordinateString,kt=this.internal.getVerticalCoordinateString,Et=this.internal.getHorizontalCoordinate,St=this.internal.getVerticalCoordinate,_t=this.internal.Point,Ot=this.internal.Rectangle,Tt=this.internal.Matrix,Dt=new nn}]),(Bt=function(e){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var t=e,n=(Object.defineProperty(this,"pdf",{get:function(){return t}}),!1),r=(Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return n},set:function(e){n=Boolean(e)}}),!1),i=(Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return r},set:function(e){r=Boolean(e)}}),0),o=(Object.defineProperty(this,"posX",{get:function(){return i},set:function(e){isNaN(e)||(i=e)}}),0),a=(Object.defineProperty(this,"posY",{get:function(){return o},set:function(e){isNaN(e)||(o=e)}}),!1),s=(Object.defineProperty(this,"autoPaging",{get:function(){return a},set:function(e){a=Boolean(e)}}),0),u=(Object.defineProperty(this,"lastBreak",{get:function(){return s},set:function(e){s=e}}),[]),c=(Object.defineProperty(this,"pageBreaks",{get:function(){return u},set:function(e){u=e}}),Object.defineProperty(this,"ctx",{get:function(){return Dt},set:function(e){e instanceof nn&&(Dt=e)}}),Object.defineProperty(this,"path",{get:function(){return Dt.path},set:function(e){Dt.path=e}}),[]),l=(Object.defineProperty(this,"ctxStack",{get:function(){return c},set:function(e){c=e}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(e){e=It(e),this.ctx.fillStyle=e.style,this.ctx.isFillTransparent=0===e.a,this.ctx.fillOpacity=e.a,this.pdf.setFillColor(e.r,e.g,e.b,{a:e.a}),this.pdf.setTextColor(e.r,e.g,e.b,{a:e.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(e){e=It(e),this.ctx.strokeStyle=e.style,this.ctx.isStrokeTransparent=0===e.a,this.ctx.strokeOpacity=e.a,0===e.a?this.pdf.setDrawColor(255,255,255):(e.a,this.pdf.setDrawColor(e.r,e.g,e.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(e){-1!==["butt","round","square"].indexOf(e)&&(this.ctx.lineCap=e,this.pdf.setLineCap(e))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(e){isNaN(e)||(this.ctx.lineWidth=e,this.pdf.setLineWidth(e))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(e){-1!==["bevel","round","miter"].indexOf(e)&&(this.ctx.lineJoin=e,this.pdf.setLineJoin(e))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(e){isNaN(e)||(this.ctx.miterLimit=e,this.pdf.setMiterLimit(e))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(e){this.ctx.textBaseline=e}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(e){-1!==["right","end","center","left","start"].indexOf(e)&&(this.ctx.textAlign=e)}}),null);function h(e,t){var n,r;return null===l&&(n=e.getFontList(),r=[],Object.keys(n).forEach((function(e){n[e].forEach((function(t){var n=null;switch(t){case"bold":n={family:e,weight:"bold"};break;case"italic":n={family:e,style:"italic"};break;case"bolditalic":n={family:e,weight:"bold",style:"italic"};break;case"":case"normal":n={family:e}}null!==n&&(n.ref={name:e,style:t},r.push(n))}))})),l=function(e){for(var t={},n=0;n<e.length;++n){var r=gt(e[n]),i=r.family,o=r.stretch,a=r.style,s=r.weight;t[i]=t[i]||{},t[i][o]=t[i][o]||{},t[i][o][a]=t[i][o][a]||{},t[i][o][a][s]=r}return t}(r.concat(t))),l}var f=null;Object.defineProperty(this,"fontFaces",{get:function(){return f},set:function(e){l=null,f=e}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(e){if(this.ctx.font=e,null!==(e=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-_,\"\'\sa-z]+?)\s*$/i.exec(e))){var t=e[1],n=(e[2],e[3]),r=e[4],i=(e[5],e[6]),o=(r="px"!==(e=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(r)[2])&&"em"===e?Math.floor(parseFloat(r)*this.pdf.getFontSize()):Math.floor(parseFloat(r)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(r),function(){var e,t,n,r,o=[],a=i.trim();if(""===a)return tn;if(a in bt)return[bt[a]];for(;""!==a;){switch(t=null,e=(a=wt(a)).charAt(0)){case'"':case"'":t=function(e,t){for(var n=0;n<e.length;){if(e.charAt(n)===t)return[e.substring(0,n),e.substring(n+1)];n+=1}return null}(a.substring(1),e);break;default:void 0,t=null===(r=(n=a).match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i))?null:[r[0],n.substring(r[0].length)]}if(null===t)return tn;if(o.push(t[0]),""!==(a=wt(t[1]))&&","!==a.charAt(0))return tn;a=a.replace(/^,/,"")}return o}());if(this.fontFaces)e=function(e,t,n){for(var r=(n=n||{}).defaultFontFamily||"times",i=Object.assign({},vt,n.genericFontFamilies||{}),o=null,a=null,s=0;s<t.length;++s)if(i[(o=gt(t[s])).family]&&(o.family=i[o.family]),e.hasOwnProperty(o.family)){a=e[o.family];break}if(!(a=a||e[r]))throw new Error("Could not find a font-family for the rule '"+yt(o)+"' and default family '"+r+"'.");if(a=function(e,t){if(t[e])return t[e];var n=dt[e],r=n<=dt.normal?-1:1;if(t=At(t,ft,n,r))return t;throw new Error("Could not find a matching font-stretch value for "+e)}(o.stretch,a),a=function(e,t){if(t[e])return t[e];for(var n=ht[e],r=0;r<n.length;++r)if(t[n[r]])return t[n[r]];throw new Error("Could not find a matching font-style for "+e)}(o.style,a),a=function(e,t){if(t[e])return t[e];if(400===e&&t[500])return t[500];if(500===e&&t[400])return t[400];var n=mt[e];if(t=At(t,pt,n,e<400?-1:1))return t;throw new Error("Could not find a matching font-weight for value "+e)}(o.weight,a))return a;throw new Error("Failed to resolve a font for the rule '"+yt(o)+"'.")}(h(this.pdf,this.fontFaces),o.map((function(e){return{family:e,stretch:"normal",weight:n,style:t}}))),this.pdf.setFont(e.ref.name,e.ref.style);else{var a="";("bold"===n||700<=parseInt(n,10)||"bold"===t)&&(a="bold"),"italic"===t&&(a+="italic"),0===a.length&&(a="normal");for(var s="",u={arial:"Helvetica",Arial:"Helvetica",verdana:"Helvetica",Verdana:"Helvetica",helvetica:"Helvetica",Helvetica:"Helvetica","sans-serif":"Helvetica",fixed:"Courier",monospace:"Courier",terminal:"Courier",cursive:"Times",fantasy:"Times",serif:"Times"},c=0;c<o.length;c++){if(void 0!==this.pdf.internal.getFont(o[c],a,{noFallback:!0,disableWarning:!0})){s=o[c];break}if("bolditalic"===a&&void 0!==this.pdf.internal.getFont(o[c],"bold",{noFallback:!0,disableWarning:!0}))s=o[c],a="bold";else if(void 0!==this.pdf.internal.getFont(o[c],"normal",{noFallback:!0,disableWarning:!0})){s=o[c],a="normal";break}}if(""===s)for(var l=0;l<o.length;l++)if(u[o[l]]){s=u[o[l]];break}this.pdf.setFont(s=""===s?"Times":s,a)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(e){this.ctx.globalCompositeOperation=e}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(e){this.ctx.globalAlpha=e}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(e){this.ctx.ignoreClearRect=Boolean(e)}})}).prototype.fill=function(){Lt.call(this,"fill",!1)},Bt.prototype.stroke=function(){Lt.call(this,"stroke",!1)},Bt.prototype.beginPath=function(){this.path=[{type:"begin"}]},Bt.prototype.moveTo=function(e,t){if(isNaN(e)||isNaN(t))throw s.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.moveTo");var n=this.ctx.transform.applyToPoint(new _t(e,t));this.path.push({type:"mt",x:n.x,y:n.y}),this.ctx.lastPoint=new _t(e,t)},Bt.prototype.closePath=function(){var e=new _t(0,0),t=0;for(t=this.path.length-1;-1!==t;t--)if("begin"===this.path[t].type&&"object"==o(this.path[t+1])&&"number"==typeof this.path[t+1].x){e=new _t(this.path[t+1].x,this.path[t+1].y),this.path.push({type:"lt",x:e.x,y:e.y});break}"object"==o(this.path[t+2])&&"number"==typeof this.path[t+2].x&&this.path.push(JSON.parse(JSON.stringify(this.path[t+2]))),this.path.push({type:"close"}),this.ctx.lastPoint=new _t(e.x,e.y)},Bt.prototype.lineTo=function(e,t){if(isNaN(e)||isNaN(t))throw s.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.lineTo");e=this.ctx.transform.applyToPoint(new _t(e,t)),this.path.push({type:"lt",x:e.x,y:e.y}),this.ctx.lastPoint=new _t(e.x,e.y)},Bt.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),Lt.call(this,null,!0)},Bt.prototype.quadraticCurveTo=function(e,t,n,r){if(isNaN(n)||isNaN(r)||isNaN(e)||isNaN(t))throw s.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");n=this.ctx.transform.applyToPoint(new _t(n,r)),r=this.ctx.transform.applyToPoint(new _t(e,t)),this.path.push({type:"qct",x1:r.x,y1:r.y,x:n.x,y:n.y}),this.ctx.lastPoint=new _t(n.x,n.y)},Bt.prototype.bezierCurveTo=function(e,t,n,r,i,o){if(isNaN(i)||isNaN(o)||isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r))throw s.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");i=this.ctx.transform.applyToPoint(new _t(i,o)),o=this.ctx.transform.applyToPoint(new _t(e,t)),e=this.ctx.transform.applyToPoint(new _t(n,r)),this.path.push({type:"bct",x1:o.x,y1:o.y,x2:e.x,y2:e.y,x:i.x,y:i.y}),this.ctx.lastPoint=new _t(i.x,i.y)},Bt.prototype.arc=function(e,t,n,r,i,o){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r)||isNaN(i))throw s.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");var a,u;o=Boolean(o),this.ctx.transform.isIdentity||(e=(a=this.ctx.transform.applyToPoint(new _t(e,t))).x,t=a.y,a=this.ctx.transform.applyToPoint(new _t(0,n)),u=this.ctx.transform.applyToPoint(new _t(0,0)),n=Math.sqrt(Math.pow(a.x-u.x,2)+Math.pow(a.y-u.y,2))),Math.abs(i-r)>=2*Math.PI&&(r=0,i=2*Math.PI),this.path.push({type:"arc",x:e,y:t,radius:n,startAngle:r,endAngle:i,counterclockwise:o})},Bt.prototype.arcTo=function(e,t,n,r,i){throw new Error("arcTo not implemented.")},Bt.prototype.rect=function(e,t,n,r){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r))throw s.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(e,t),this.lineTo(e+n,t),this.lineTo(e+n,t+r),this.lineTo(e,t+r),this.lineTo(e,t),this.lineTo(e+n,t),this.lineTo(e,t)},Bt.prototype.fillRect=function(e,t,n,r){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r))throw s.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");var i;Mt.call(this)||(i={},"butt"!==this.lineCap&&(i.lineCap=this.lineCap,this.lineCap="butt"),"miter"!==this.lineJoin&&(i.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(e,t,n,r),this.fill(),i.hasOwnProperty("lineCap")&&(this.lineCap=i.lineCap),i.hasOwnProperty("lineJoin")&&(this.lineJoin=i.lineJoin))},Bt.prototype.strokeRect=function(e,t,n,r){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r))throw s.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");jt.call(this)||(this.beginPath(),this.rect(e,t,n,r),this.stroke())},Bt.prototype.clearRect=function(e,t,n,r){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r))throw s.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(e,t,n,r))},Bt.prototype.save=function(e){e="boolean"!=typeof e||e;for(var t=this.pdf.internal.getCurrentPageInfo().pageNumber,n=0;n<this.pdf.internal.getNumberOfPages();n++)this.pdf.setPage(n+1),this.pdf.internal.out("q");this.pdf.setPage(t),e&&(this.ctx.fontSize=this.pdf.internal.getFontSize(),t=new nn(this.ctx),this.ctxStack.push(this.ctx),this.ctx=t)},Bt.prototype.restore=function(e){e="boolean"!=typeof e||e;for(var t=this.pdf.internal.getCurrentPageInfo().pageNumber,n=0;n<this.pdf.internal.getNumberOfPages();n++)this.pdf.setPage(n+1),this.pdf.internal.out("Q");this.pdf.setPage(t),e&&0!==this.ctxStack.length&&(this.ctx=this.ctxStack.pop(),this.fillStyle=this.ctx.fillStyle,this.strokeStyle=this.ctx.strokeStyle,this.font=this.ctx.font,this.lineCap=this.ctx.lineCap,this.lineWidth=this.ctx.lineWidth,this.lineJoin=this.ctx.lineJoin)},Bt.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.")},It=function(e){var t,n,r,i,o;return(e=!0===e.isCanvasGradient?e.getColor():e)?(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(e)?o=r=n=t=0:null!==(i=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(e))?(t=parseInt(i[1]),n=parseInt(i[2]),r=parseInt(i[3]),o=1):null!==(i=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(e))?(t=parseInt(i[1]),n=parseInt(i[2]),r=parseInt(i[3]),o=parseFloat(i[4])):(o=1,4===(e="string"==typeof e&&"#"!==e.charAt(0)?(i=new f(e)).ok?i.toHex():"#000000":e).length?(t=e.substring(1,2),t+=t,n=e.substring(2,3),n+=n,r=e.substring(3,4),r+=r):(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7)),t=parseInt(t,16),n=parseInt(n,16),r=parseInt(r,16)),{r:t,g:n,b:r,a:o,style:e}):{r:0,g:0,b:0,a:0,style:e}},Mt=function(){return this.ctx.isFillTransparent||0==this.globalAlpha},jt=function(){return Boolean(this.ctx.isStrokeTransparent||0==this.globalAlpha)},Bt.prototype.fillText=function(e,t,n,r){if(isNaN(t)||isNaN(n)||"string"!=typeof e)throw s.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");var i,o;r=isNaN(r)?void 0:r,Mt.call(this)||(n=zt.call(this,n),i=Jt(this.ctx.transform.rotation),o=this.ctx.transform.scaleX,qt.call(this,{text:e,x:t,y:n,scale:o,angle:i,align:this.textAlign,maxWidth:r}))},Bt.prototype.strokeText=function(e,t,n,r){if(isNaN(t)||isNaN(n)||"string"!=typeof e)throw s.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");var i,o;jt.call(this)||(r=isNaN(r)?void 0:r,n=zt.call(this,n),i=Jt(this.ctx.transform.rotation),o=this.ctx.transform.scaleX,qt.call(this,{text:e,x:t,y:n,scale:o,renderingMode:"stroke",angle:i,align:this.textAlign,maxWidth:r}))},Bt.prototype.measureText=function(e){if("string"!=typeof e)throw s.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var t=this.pdf,n=this.pdf.internal.scaleFactor,r=t.internal.getFontSize();e=t.getStringUnitWidth(e)*r/t.internal.scaleFactor;return new function(e){var t=(e=e||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return t}}),this}({width:e*=Math.round(96*n/72*1e4)/1e4})},Bt.prototype.scale=function(e,t){if(isNaN(e)||isNaN(t))throw s.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");e=new Tt(e,0,0,t,0,0),this.ctx.transform=this.ctx.transform.multiply(e)},Bt.prototype.rotate=function(e){if(isNaN(e))throw s.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");e=new Tt(Math.cos(e),Math.sin(e),-Math.sin(e),Math.cos(e),0,0),this.ctx.transform=this.ctx.transform.multiply(e)},Bt.prototype.translate=function(e,t){if(isNaN(e)||isNaN(t))throw s.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");e=new Tt(1,0,0,1,e,t),this.ctx.transform=this.ctx.transform.multiply(e)},Bt.prototype.transform=function(e,t,n,r,i,o){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r)||isNaN(i)||isNaN(o))throw s.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");e=new Tt(e,t,n,r,i,o),this.ctx.transform=this.ctx.transform.multiply(e)},Bt.prototype.setTransform=function(e,t,n,r,i,o){e=isNaN(e)?1:e,t=isNaN(t)?0:t,n=isNaN(n)?0:n,r=isNaN(r)?1:r,i=isNaN(i)?0:i,o=isNaN(o)?0:o,this.ctx.transform=new Tt(e,t,n,r,i,o)},Bt.prototype.drawImage=function(e,t,n,r,i,o,a,s,u){var c=this.pdf.getImageProperties(e),l=1,h=1,f=1,d=1;void 0!==r&&void 0!==s&&(f=s/r,d=u/i,l=c.width/r*s/r,h=c.height/i*u/i),void 0===o&&(o=t,a=n,n=t=0),void 0!==r&&void 0===s&&(s=r,u=i),void 0===r&&void 0===s&&(s=c.width,u=c.height);s=this.ctx.transform.decompose();for(var p=Jt(s.rotate.shx),m=(new Tt).multiply(s.translate).multiply(s.skew).multiply(s.scale).applyToRectangle(new Ot(o-t*f,a-n*d,r*l,i*h)),g=Nt.call(this,m),A=[],v=0;v<g.length;v+=1)-1===A.indexOf(g[v])&&A.push(g[v]);if(Pt(A),this.autoPaging){c=A[0];for(var b=A[A.length-1],y=c;y<b+1;y++){this.pdf.setPage(y),0!==this.ctx.clip_path.length&&(w=this.path,x=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=Rt(x,this.posX,-1*this.pdf.internal.pageSize.height*(y-1)+this.posY),Ut.call(this,"fill",!0),this.path=w);var w,x=JSON.parse(JSON.stringify(m));x=Rt([x],this.posX,-1*this.pdf.internal.pageSize.height*(y-1)+this.posY)[0];this.pdf.addImage(e,"JPEG",x.x,x.y,x.w,x.h,null,null,p)}}else this.pdf.addImage(e,"JPEG",m.x,m.y,m.w,m.h,null,null,p)},Nt=function(e,t,n){var r=[];switch(t=t||this.pdf.internal.pageSize.width,n=n||this.pdf.internal.pageSize.height,e.type){default:case"mt":case"lt":r.push(Math.floor((e.y+this.posY)/n)+1);break;case"arc":r.push(Math.floor((e.y+this.posY-e.radius)/n)+1),r.push(Math.floor((e.y+this.posY+e.radius)/n)+1);break;case"qct":var i=Zt(this.ctx.lastPoint.x,this.ctx.lastPoint.y,e.x1,e.y1,e.x,e.y);r.push(Math.floor(i.y/n)+1),r.push(Math.floor((i.y+i.h)/n)+1);break;case"bct":i=en(this.ctx.lastPoint.x,this.ctx.lastPoint.y,e.x1,e.y1,e.x2,e.y2,e.x,e.y),r.push(Math.floor(i.y/n)+1),r.push(Math.floor((i.y+i.h)/n)+1);break;case"rect":r.push(Math.floor((e.y+this.posY)/n)+1),r.push(Math.floor((e.y+e.h+this.posY)/n)+1)}for(var o=0;o<r.length;o+=1)for(;this.pdf.internal.getNumberOfPages()<r[o];)Ft.call(this);return r},Ft=function(){var e=this.fillStyle,t=this.strokeStyle,n=this.font,r=this.lineCap,i=this.lineWidth,o=this.lineJoin;this.pdf.addPage(),this.fillStyle=e,this.strokeStyle=t,this.font=n,this.lineCap=r,this.lineWidth=i,this.lineJoin=o},Rt=function(e,t,n){for(var r=0;r<e.length;r++)switch(e[r].type){case"bct":e[r].x2+=t,e[r].y2+=n;case"qct":e[r].x1+=t,e[r].y1+=n;default:e[r].x+=t,e[r].y+=n}return e},Pt=function(e){return e.sort((function(e,t){return e-t}))},Lt=function(e,t){for(var n=this.fillStyle,r=this.strokeStyle,i=this.lineCap,o=this.lineWidth,a=o*this.ctx.transform.scaleX,s=this.lineJoin,u=JSON.parse(JSON.stringify(this.path)),c=JSON.parse(JSON.stringify(this.path)),l=[],h=0;h<c.length;h++)if(void 0!==c[h].x)for(var f=Nt.call(this,c[h]),d=0;d<f.length;d+=1)-1===l.indexOf(f[d])&&l.push(f[d]);for(var p,m,g=0;g<l.length;g++)for(;this.pdf.internal.getNumberOfPages()<l[g];)Ft.call(this);if(Pt(l),this.autoPaging)for(var A=l[0],v=l[l.length-1],b=A;b<v+1;b++)this.pdf.setPage(b),this.fillStyle=n,this.strokeStyle=r,this.lineCap=i,this.lineWidth=a,this.lineJoin=s,0!==this.ctx.clip_path.length&&(p=this.path,m=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=Rt(m,this.posX,-1*this.pdf.internal.pageSize.height*(b-1)+this.posY),Ut.call(this,e,!0),this.path=p),m=JSON.parse(JSON.stringify(u)),this.path=Rt(m,this.posX,-1*this.pdf.internal.pageSize.height*(b-1)+this.posY),!1!==t&&0!==b||Ut.call(this,e,t),this.lineWidth=o;else this.lineWidth=a,Ut.call(this,e,t),this.lineWidth=o;this.path=u},Ut=function(e,t){if(("stroke"!==e||t||!jt.call(this))&&("stroke"===e||t||!Mt.call(this))){for(var n=[],r=this.path,i=0;i<r.length;i++){var o=r[i];switch(o.type){case"begin":n.push({begin:!0});break;case"close":n.push({close:!0});break;case"mt":n.push({start:o,deltas:[],abs:[]});break;case"lt":var a=n.length;if(!isNaN(r[i-1].x)&&(d=[o.x-r[i-1].x,o.y-r[i-1].y],0<a))for(;0<=a;a--)if(!0!==n[a-1].close&&!0!==n[a-1].begin){n[a-1].deltas.push(d),n[a-1].abs.push(o);break}break;case"bct":d=[o.x1-r[i-1].x,o.y1-r[i-1].y,o.x2-r[i-1].x,o.y2-r[i-1].y,o.x-r[i-1].x,o.y-r[i-1].y],n[n.length-1].deltas.push(d);break;case"qct":var s=r[i-1].x+2/3*(o.x1-r[i-1].x),u=r[i-1].y+2/3*(o.y1-r[i-1].y),c=o.x+2/3*(o.x1-o.x),l=o.y+2/3*(o.y1-o.y),h=o.x,f=o.y,d=[s-r[i-1].x,u-r[i-1].y,c-r[i-1].x,l-r[i-1].y,h-r[i-1].x,f-r[i-1].y];n[n.length-1].deltas.push(d);break;case"arc":n.push({deltas:[],abs:[],arc:!0}),Array.isArray(n[n.length-1].abs)&&n[n.length-1].abs.push(o)}}for(var p,m,g=t?null:"stroke"===e?"stroke":"fill",A=0;A<n.length;A++){if(n[A].arc){for(var v=n[A].abs,b=0;b<v.length;b++){var y=v[b];"arc"===y.type?Ht.call(this,y.x,y.y,y.radius,y.startAngle,y.endAngle,y.counterclockwise,void 0,t):Gt.call(this,y.x,y.y)}$t.call(this,g),this.pdf.internal.out("h")}n[A].arc||!0===n[A].close||!0===n[A].begin||(p=n[A].start.x,m=n[A].start.y,Wt.call(this,n[A].deltas,p,m))}g&&$t.call(this,g),t&&Qt.call(this)}},zt=function(e){var t=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,n=t*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return e-n;case"top":return e+t-n;case"hanging":return e+t-2*n;case"middle":return e+t/2-n;case"ideographic":default:return e}},Bt.prototype.createLinearGradient=function(){function e(){}return e.colorStops=[],e.addColorStop=function(e,t){this.colorStops.push([e,t])},e.getColor=function(){return 0===this.colorStops.length?"#000000":this.colorStops[0][1]},e.isCanvasGradient=!0,e},Bt.prototype.createPattern=function(){return this.createLinearGradient()},Bt.prototype.createRadialGradient=function(){return this.createLinearGradient()},Ht=function(e,t,n,r,i,o,a,s){for(var u=Yt.call(this,n,r,i,o),c=0;c<u.length;c++){var l=u[c];0===c&&Vt.call(this,l.x1+e,l.y1+t),Kt.call(this,e,t,l.x2,l.y2,l.x3,l.y3,l.x4,l.y4)}s?Qt.call(this):$t.call(this,a)},$t=function(e){switch(e){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},Qt=function(){this.pdf.clip(),this.pdf.discardPath()},Vt=function(e,t){this.pdf.internal.out(Ct(e)+" "+kt(t)+" m")},qt=function(e){var t;switch(e.align){case"right":case"end":t="right";break;case"center":t="center";break;default:t="left"}for(var n,r,i=this.ctx.transform.applyToPoint(new _t(e.x,e.y)),o=this.ctx.transform.decompose(),a=(a=(a=(a=new Tt).multiply(o.translate)).multiply(o.skew)).multiply(o.scale),s=(o=this.pdf.getTextDimensions(e.text),this.ctx.transform.applyToRectangle(new Ot(e.x,e.y,o.w,o.h))),u=(a=a.applyToRectangle(new Ot(e.x,e.y-o.h,o.w,o.h)),Nt.call(this,a)),c=[],l=0;l<u.length;l+=1)-1===c.indexOf(u[l])&&c.push(u[l]);if(Pt(c),!0===this.autoPaging){o=c[0];for(var h=c[c.length-1],f=o;f<h+1;f++){this.pdf.setPage(f),0!==this.ctx.clip_path.length&&(d=this.path,p=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=Rt(p,this.posX,-1*this.pdf.internal.pageSize.height*(f-1)+this.posY),Ut.call(this,"fill",!0),this.path=d);var d,p=JSON.parse(JSON.stringify(s));p=Rt([p],this.posX,-1*this.pdf.internal.pageSize.height*(f-1)+this.posY)[0];.01<=e.scale&&(n=this.pdf.internal.getFontSize(),this.pdf.setFontSize(n*e.scale),r=this.lineWidth,this.lineWidth=r*e.scale),this.pdf.text(e.text,p.x,p.y,{angle:e.angle,align:t,renderingMode:e.renderingMode,maxWidth:e.maxWidth}),.01<=e.scale&&(this.pdf.setFontSize(n),this.lineWidth=r)}}else.01<=e.scale&&(n=this.pdf.internal.getFontSize(),this.pdf.setFontSize(n*e.scale),r=this.lineWidth,this.lineWidth=r*e.scale),this.pdf.text(e.text,i.x+this.posX,i.y+this.posY,{angle:e.angle,align:t,renderingMode:e.renderingMode,maxWidth:e.maxWidth}),.01<=e.scale&&(this.pdf.setFontSize(n),this.lineWidth=r)},Gt=function(e,t,n,r){r=r||0,this.pdf.internal.out(Ct(e+(n=n||0))+" "+kt(t+r)+" l")},Wt=function(e,t,n){return this.pdf.lines(e,t,n,null,null)},Kt=function(e,t,n,r,i,o,a,s){this.pdf.internal.out([xt(Et(n+e)),xt(St(r+t)),xt(Et(i+e)),xt(St(o+t)),xt(Et(a+e)),xt(St(s+t)),"c"].join(" "))},Yt=function(e,t,n,r){for(var i=2*Math.PI,o=Math.PI/2;n<t;)t-=i;var a=Math.abs(n-t);a<i&&r&&(a=i-a);for(var s=[],u=r?-1:1,c=t;1e-5<a;){var l=c+u*Math.min(a,o);s.push(Xt.call(this,e,c,l)),a-=Math.abs(l-c),c=l}return s},Xt=function(e,t,n){var r,i=(n-t)/2,o=(u=(c=a=e*Math.cos(i))*c+(s=-(r=e*Math.sin(i)))*s)+c*a+s*r,a=o=c-(u=4/3*(Math.sqrt(2*u*o)-o)/(c*r-s*a))*s,s=-(r=s+u*c),u=i+t,c=Math.cos(u);i=Math.sin(u);return{x1:e*Math.cos(t),y1:e*Math.sin(t),x2:o*c-r*i,y2:o*i+r*c,x3:a*c-s*i,y3:a*i+s*c,x4:e*Math.cos(n),y4:e*Math.sin(n)}},Jt=function(e){return 180*e/Math.PI},Zt=function(e,t,n,r,i,o){var a=e+.5*(n-e),s=t+.5*(r-t),u=(n=i+.5*(n-i),r=o+.5*(r-o),Math.min(e,i,a,n));e=Math.max(e,i,a,n),i=Math.min(t,o,s,r),a=Math.max(t,o,s,r);return new Ot(u,i,e-u,a-i)},en=function(e,t,n,r,i,o,a,s){for(var u,c,l,h,f,d,p,m,g=n-e,A=r-t,v=i-n,b=o-r,y=a-i,w=s-o,x=0;x<41;x++)l=(c=(c=e+(h=x/40)*g)+h*((l=n+h*v)-c))+h*(l+h*(i+h*y-l)-c),h=(c=(c=t+h*A)+h*((u=r+h*b)-c))+h*(u+h*(o+h*w-u)-c),m=0==x?(p=f=l,d=h):(f=Math.min(f,l),d=Math.min(d,h),p=Math.max(p,l),Math.max(m,h));return new Ot(Math.round(f),Math.round(d),Math.round(p-f),Math.round(m-d))};try{n(!function(){var e=new Error("Cannot find module 'worker_threads'");throw e.code="MODULE_NOT_FOUND",e}()).Worker}catch(t){}function rn(e,t){for(var n=new an(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];var i=new sn(n[30]);for(r=1;r<30;++r)for(var o=n[r];o<n[r+1];++o)i[o]=o-n[r]<<5|r;return[n,i]}var on=Uint8Array,an=Uint16Array,sn=Uint32Array,un=new on([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),cn=new on([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),ln=new on([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),hn=(hr=rn(un,2))[0],fn=hr[1];hn[28]=258,fn[258]=28;for(var dn=(Cr=rn(cn,0))[0],pn=Cr[1],mn=new an(32768),gn=0;gn<32768;++gn){var An=(61680&(An=(52428&(An=(43690&gn)>>>1|(21845&gn)<<1))>>>2|(13107&An)<<2))>>>4|(3855&An)<<4;mn[gn]=((65280&An)>>>8|(255&An)<<8)>>>1}var vn=function(e,t,n){for(var r=e.length,i=0,o=new an(t);i<r;++i)++o[e[i]-1];var a=new an(t);for(i=0;i<t;++i)a[i]=a[i-1]+o[i-1]<<1;if(n){var s=new an(1<<t),u=15-t;for(i=0;i<r;++i)if(e[i])for(var c=i<<4|e[i],l=t-e[i],h=a[e[i]-1]++<<l,f=h|(1<<l)-1;h<=f;++h)s[mn[h]>>>u]=c}else for(s=new an(r),i=0;i<r;++i)s[i]=mn[a[e[i]-1]++]>>>15-e[i];return s},bn=new on(288);for(gn=0;gn<144;++gn)bn[gn]=8;for(gn=144;gn<256;++gn)bn[gn]=9;for(gn=256;gn<280;++gn)bn[gn]=7;for(gn=280;gn<288;++gn)bn[gn]=8;var yn=new on(32);for(gn=0;gn<32;++gn)yn[gn]=5;function wn(e){for(var t=e[0],n=1;n<e.length;++n)e[n]>t&&(t=e[n]);return t}function xn(e,t,n){var r=t/8>>0;return(e[r]|e[1+r]<<8)>>>(7&t)&n}function Cn(e,t){var n=t/8>>0;return(e[n]|e[1+n]<<8|e[2+n]<<16)>>>(7&t)}function kn(e){return(e/8>>0)+(7&e&&1)}function En(e,t,n){(null==t||t<0)&&(t=0),(null==n||n>e.length)&&(n=e.length);var r=new(e instanceof an?an:e instanceof sn?sn:on)(n-t);return r.set(e.subarray(t,n)),r}function Sn(e,t,n){var r=t/8>>0;e[r]|=n<<=7&t,e[1+r]|=n>>>8}function _n(e,t,n){var r=t/8>>0;e[r]|=n<<=7&t,e[1+r]|=n>>>8,e[2+r]|=n>>>16}function On(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var i=n.length,o=n.slice();if(!i)return[new on(0),0];if(1==i)return(m=new on(n[0].s+1))[n[0].s]=1,[m,1];n.sort((function(e,t){return e.f-t.f})),n.push({s:-1,f:25001});var a=n[0],s=n[1],u=0,c=1,l=2;for(n[0]={s:-1,f:a.f+s.f,l:a,r:s};c!=i-1;)a=n[n[u].f<n[l].f?u++:l++],s=n[u!=c&&n[u].f<n[l].f?u++:l++],n[c++]={s:-1,f:a.f+s.f,l:a,r:s};var h=o[0].s;for(r=1;r<i;++r)o[r].s>h&&(h=o[r].s);var f=new an(h+1),d=function e(t,n,r){return-1==t.s?Math.max(e(t.l,n,r+1),e(t.r,n,r+1)):n[t.s]=r}(n[c-1],f,0);if(t<d){r=0;var p=0,m=d-t,g=1<<m;for(o.sort((function(e,t){return f[t.s]-f[e.s]||e.f-t.f}));r<i;++r){var A=o[r].s;if(!(f[A]>t))break;p+=g-(1<<d-f[A]),f[A]=t}for(p>>>=m;0<p;){var v=o[r].s;f[v]<t?p-=1<<t-f[v]++-1:++r}for(;0<=r&&p;--r){var b=o[r].s;f[b]==t&&(--f[b],++p)}d=t}return[new on(f),d]}function Tn(e){for(var t=e.length;t&&!e[--t];);for(var n=new an(++t),r=0,i=e[0],o=1,a=function(e){n[r++]=e},s=1;s<=t;++s)if(e[s]==i&&s!=t)++o;else{if(!i&&2<o){for(;138<o;o-=138)a(32754);2<o&&(a(10<o?o-11<<5|28690:o-3<<5|12305),o=0)}else if(3<o){for(a(i),--o;6<o;o-=6)a(8304);2<o&&(a(o-3<<5|8208),o=0)}for(;o--;)a(i);o=1,i=e[s]}return[n.subarray(0,r),t]}function Dn(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n}function Bn(e,t,n){var r=n.length,i=kn(t+2);e[i]=255&r,e[i+1]=r>>>8,e[i+2]=255^e[i],e[i+3]=255^e[i+1];for(var o=0;o<r;++o)e[i+o+4]=n[o];return 8*(i+4+r)}function In(e,t,n,r,i,o,a,s,u,c,l){Sn(t,l++,n),++i[256];for(var h=(n=On(i,15))[0],f=(n=n[1],(d=On(o,15))[0]),d=d[1],p=(m=Tn(h))[0],m=m[1],g=(A=Tn(f))[0],A=A[1],v=new an(19),b=0;b<p.length;++b)v[31&p[b]]++;for(b=0;b<g.length;++b)v[31&g[b]]++;for(var y=(w=On(v,7))[0],w=w[1],x=19;4<x&&!y[ln[x-1]];--x);var C,k=c+5<<3,E=Dn(i,bn)+Dn(o,yn)+a;i=Dn(i,h)+Dn(o,f)+a+14+3*x+Dn(v,y)+(2*v[16]+3*v[17]+7*v[18]);if(k<=E&&k<=i)return Bn(t,l,e.subarray(u,u+c));if(Sn(t,l,1+(i<E)),l+=2,i<E){var S=vn(h,n,0),_=h,O=vn(f,d,0),T=f,D=vn(y,w,0);for(Sn(t,l,m-257),Sn(t,l+5,A-1),Sn(t,l+10,x-4),l+=14,b=0;b<x;++b)Sn(t,l+3*b,y[ln[b]]);l+=3*x;for(var B=[p,g],I=0;I<2;++I){var M=B[I];for(b=0;b<M.length;++b){var j=31&M[b];Sn(t,l,D[j]),l+=y[j],15<j&&(Sn(t,l,M[b]>>>5&127),l+=M[b]>>>12)}}}else S=Pn,_=bn,O=Un,T=yn;for(b=0;b<s;++b)255<r[b]?(_n(t,l,S[(j=r[b]>>>18&31)+257]),l+=_[j+257],7<j&&(Sn(t,l,r[b]>>>23&31),l+=un[j]),_n(t,l,O[C=31&r[b]]),l+=T[C],3<C&&(_n(t,l,r[b]>>>5&8191),l+=cn[C])):(_n(t,l,S[r[b]]),l+=_[r[b]]);return _n(t,l,S[256]),l+_[256]}var Mn,jn,Nn,Fn,Rn,Pn=vn(bn,9,0),Ln=vn(bn,9,1),Un=vn(yn,5,0),zn=vn(yn,5,1),Hn=new sn([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),$n=new on(0);function Qn(e,t){void 0===t&&(t={}),n=1,r=0;for(var n,r,i,o={p:function(e){for(var t=n,i=r,o=e.length,a=0;a!=o;){for(var s=Math.min(a+5552,o);a<s;++a)i+=t+=e[a];t%=65521,i%=65521}n=t,r=i},d:function(){return(n>>>8<<16|(255&r)<<8|r>>>8)+2*((255&n)<<23)}},a=(e=(o.p(e),function(e,t,n,r,i){var o=e,a=null==t.level?6:t.level,s=(e=null==t.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+t.mem,t=n,n=r,!i),u=o.length,c=(r=new on(t+u+5*(1+Math.floor(u/7e3))+n)).subarray(t,r.length-n),l=0;if(!a||u<8)for(var h=0;h<=u;h+=65535){var f=h+65535;l=f<u?Bn(c,l,o.subarray(h,f)):(c[h]=s,Bn(c,l,o.subarray(h,u)))}else{for(var d=(a=Hn[a-1])>>>13,p=8191&a,m=(1<<e)-1,g=new an(32768),A=new an(m+1),v=Math.ceil(e/3),b=2*v,y=function(e){return(o[e]^o[e+1]<<v^o[e+2]<<b)&m},w=new sn(25e3),x=new an(288),C=new an(32),k=0,E=0,S=h=0,_=0,O=0;h<u;++h){var T=y(h),D=32767&h,B=A[T];if(g[D]=B,A[T]=D,_<=h){var I=u-h;if((7e3<k||24576<S)&&423<I){l=In(o,c,0,w,x,C,E,S,O,h-O,l);S=k=E=0,O=h;for(var M=0;M<286;++M)x[M]=0;for(M=0;M<30;++M)C[M]=0}var j=2,N=0,F=p,R=D-B&32767;if(2<I&&T==y(h-R))for(var P=Math.min(d,I)-1,L=Math.min(32767,h),U=Math.min(258,I);R<=L&&--F&&D!=B;){if(o[h+j]==o[h+j-R]){for(var z=0;z<U&&o[h+z]==o[h+z-R];++z);if(j<z){if(N=R,P<(j=z))break;var H=Math.min(R,z-2),$=0;for(M=0;M<H;++M){var Q=h-R+M+32768&32767,V=Q-g[Q]+32768&32767;$<V&&($=V,B=Q)}}}R+=(D=B)-(B=g[D])+32768&32767}N?(w[S++]=268435456|fn[j]<<18|pn[N],T=31&fn[j],I=31&pn[N],E+=un[T]+cn[I],++x[257+T],++C[I],_=h+j,++k):(w[S++]=o[h],++x[o[h]])}}l=In(o,c,s,w,x,C,E,S,O,h-O,l),s||(l=Bn(c,l,$n))}return En(r,0,t+kn(l)+n)}(e,t,2,4)),i=e,t=0==(t=t.level)?0:t<6?1:9==t?3:2,i[0]=120,i[1]=t<<6|(t?32-2*t:1),e),s=e.length-4,u=o.d();u;++s)a[s]=u,u>>>=8;return e}
/**
     * @license
     * jsPDF filters PlugIn
     * Copyright (c) 2014 Aras Abbasi
     *
     * Licensed under the MIT License.
     * http://opensource.org/licenses/mit-license
     */
function Vn(){return(i.html2canvas?Promise.resolve(i.html2canvas):"object"==o(t)&&void 0!==e?new Promise((function(e,t){try{e(n(242))}catch(e){t(e)}})):new Promise((function(e,t){try{Promise.resolve().then(function(){var t=[n(242)];e.apply(null,t)}.bind(this)).catch(n.oe)}catch(e){t(e)}}))).catch((function(e){return Promise.reject(new Error("Could not load html2canvas: "+e))})).then((function(e){return e.default||e}))}function qn(){return(i.DOMPurify?Promise.resolve(i.DOMPurify):"object"==o(t)&&void 0!==e?new Promise((function(e,t){try{e(n(243))}catch(e){t(e)}})):new Promise((function(e,t){try{Promise.resolve().then(function(){var t=[n(243)];e.apply(null,t)}.bind(this)).catch(n.oe)}catch(e){t(e)}}))).catch((function(e){return Promise.reject(new Error("Could not load dompurify: "+e))})).then((function(e){return e.default||e}))}function Gn(e){var t=o(e);return"undefined"===t?"undefined":"string"===t||e instanceof String?"string":"number"===t||e instanceof Number?"number":"function"===t||e instanceof Function?"function":e&&e.constructor===Array?"array":e&&1===e.nodeType?"element":"object"===t?"object":"unknown"}function Wn(e,t){var n,r=document.createElement(e);for(n in t.className&&(r.className=t.className),t.innerHTML&&t.dompurify&&(r.innerHTML=t.dompurify.sanitize(t.innerHTML)),t.style)r.style[n]=t.style[n];return r}function Kn(e){var t=Object.assign(Kn.convert(Promise.resolve()),JSON.parse(JSON.stringify(Kn.template)));return(t=(t=Kn.convert(Promise.resolve(),t)).setProgress(1,Kn,1,[Kn])).set(e)}j.API.processDataByFilters=function(e,t){var n=0,r=e||"",i=[];for("string"==typeof(t=t||[])&&(t=[t]),n=0;n<t.length;n+=1)switch(t[n]){case"ASCII85Decode":case"/ASCII85Decode":r=function(e){var t,n,r,i,o,a=String,s="length",u="charCodeAt";for(e.slice(-2),e=e.slice(0,-2).replace(/\s/g,"").replace("z","!!!!!"),r=[],i=0,o=(e+=t="uuuuu".slice(e[s]%5||5))[s];i<o;i+=5)n=52200625*(e[u](i)-33)+614125*(e[u](i+1)-33)+7225*(e[u](i+2)-33)+85*(e[u](i+3)-33)+(e[u](i+4)-33),r.push(255&n>>24,255&n>>16,255&n>>8,255&n);for(var c=r,l=t[s];0<l;l--)c.pop();return a.fromCharCode.apply(a,r)}(r),i.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":r=function(e){var t,n,r,i,o,a,s,u,c;for(/[^\x00-\xFF]/.test(e),n=[],r=0,i=(e+=t="\0\0\0\0".slice(e.length%4||4)).length;r<i;r+=4)0!==(a=(e.charCodeAt(r)<<24)+(e.charCodeAt(r+1)<<16)+(e.charCodeAt(r+2)<<8)+e.charCodeAt(r+3))?(o=((a=((a=((a=(a-(c=a%85))/85)-(u=a%85))/85)-(s=a%85))/85)-(a%=85))/85%85,n.push(33+o,33+a,33+s,33+u,33+c)):n.push(122);for(var l=n,h=t.length;0<h;h--)l.pop();return String.fromCharCode.apply(String,n)+"~>"}(r),i.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":r=function(e){var t=new RegExp(/^([0-9A-Fa-f]{2})+$/);if((e=-1!==(e=e.replace(/\s/g,"")).indexOf(">")?e.substr(0,e.indexOf(">")):e).length%2&&(e+="0"),!1===t.test(e))return"";for(var n="",r=0;r<e.length;r+=2)n+=String.fromCharCode("0x"+(e[r]+e[r+1]));return n}(r),i.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":r=r.split("").map((function(e){return("0"+e.charCodeAt().toString(16)).slice(-2)})).join("")+">",i.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":r=function(e){for(var t=new Uint8Array(e.length),n=e.length;n--;)t[n]=e.charCodeAt(n);return(t=Qn(t)).reduce((function(e,t){return e+String.fromCharCode(t)}),"")}(r),i.push("/FlateDecode");break;default:throw new Error('The filter: "'+t[n]+'" is not implemented')}return{data:r,reverseChain:i.reverse().join(" ")}},
/**
     * @license
     * jsPDF fileloading PlugIn
     * Copyright (c) 2018 Aras Abbasi (aras.abbasi@gmail.com)
     *
     * Licensed under the MIT License.
     * http://opensource.org/licenses/mit-license
     */(hr=j.API).loadFile=function(e,t,n){var r,i=e;e=0,e=!1!==t,t=void(r="function"==typeof n?n:function(){});try{t=function(e,t,n){function r(e){var t=e.length,n=[],r=String.fromCharCode;for(o=0;o<t;o+=1)n.push(r(255&e.charCodeAt(o)));return n.join("")}var i=new XMLHttpRequest,o=0;if(i.open("GET",e,!t),i.overrideMimeType("text/plain; charset=x-user-defined"),0==t&&(i.onload=function(){200===i.status?n(r(this.responseText)):n(void 0)}),i.send(null),t&&200===i.status)return r(i.responseText)}(i,e,r)}catch(i){}return t},hr.loadImageFile=hr.loadFile,
/**
     * @license
     * Copyright (c) 2018 Erik Koopmans
     * Released under the MIT License.
     *
     * Licensed under the MIT License.
     * http://opensource.org/licenses/mit-license
     */
Cr=j.API,((Kn.prototype=Object.create(Promise.prototype)).constructor=Kn).convert=function(e,t){return e.__proto__=t||Kn.prototype,e},Kn.template={prop:{src:null,container:null,overlay:null,canvas:null,img:null,pdf:null,pageSize:null,callback:function(){}},progress:{val:0,state:null,n:0,stack:[]},opt:{filename:"file.pdf",margin:[0,0,0,0],enableLinks:!0,x:0,y:0,html2canvas:{},jsPDF:{},backgroundColor:"transparent"}},Kn.prototype.from=function(e,t){return this.then((function(){switch(t=t||function(e){switch(Gn(e)){case"string":return"string";case"element":return"canvas"===e.nodeName.toLowerCase()?"canvas":"element";default:return"unknown"}}(e)){case"string":return this.then(qn).then((function(t){return this.set({src:Wn("div",{innerHTML:e,dompurify:t})})}));case"element":return this.set({src:e});case"canvas":return this.set({canvas:e});case"img":return this.set({img:e});default:return this.error("Unknown source type.")}}))},Kn.prototype.to=function(e){switch(e){case"container":return this.toContainer();case"canvas":return this.toCanvas();case"img":return this.toImg();case"pdf":return this.toPdf();default:return this.error("Invalid target.")}},Kn.prototype.toContainer=function(){return this.thenList([function(){return this.prop.src||this.error("Cannot duplicate - no source HTML.")},function(){return this.prop.pageSize||this.setPageSize()}]).then((function(){var e={position:"relative",display:"inline-block",width:Math.max(this.prop.src.clientWidth,this.prop.src.scrollWidth,this.prop.src.offsetWidth)+"px",left:0,right:0,top:0,margin:"auto",backgroundColor:this.opt.backgroundColor},t=function e(t,n){for(var r=3===t.nodeType?document.createTextNode(t.nodeValue):t.cloneNode(!1),i=t.firstChild;i;i=i.nextSibling)!0!==n&&1===i.nodeType&&"SCRIPT"===i.nodeName||r.appendChild(e(i,n));return 1===t.nodeType&&("CANVAS"===t.nodeName?(r.width=t.width,r.height=t.height,r.getContext("2d").drawImage(t,0,0)):"TEXTAREA"!==t.nodeName&&"SELECT"!==t.nodeName||(r.value=t.value),r.addEventListener("load",(function(){r.scrollTop=t.scrollTop,r.scrollLeft=t.scrollLeft}),!0)),r}(this.prop.src,this.opt.html2canvas.javascriptEnabled);"BODY"===t.tagName&&(e.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=Wn("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=Wn("div",{className:"html2pdf__container",style:e}),this.prop.container.appendChild(t),this.prop.container.firstChild.appendChild(Wn("div",{style:{clear:"both",border:"0 none transparent",margin:0,padding:0,height:0}})),this.prop.container.style.float="none",this.prop.overlay.appendChild(this.prop.container),document.body.appendChild(this.prop.overlay),this.prop.container.firstChild.style.position="relative",this.prop.container.height=Math.max(this.prop.container.firstChild.clientHeight,this.prop.container.firstChild.scrollHeight,this.prop.container.firstChild.offsetHeight)+"px"}))},Kn.prototype.toCanvas=function(){return this.thenList([function(){return document.body.contains(this.prop.container)||this.toContainer()}]).then(Vn).then((function(e){var t=Object.assign({},this.opt.html2canvas);return delete t.onrendered,e(this.prop.container,t)})).then((function(e){(this.opt.html2canvas.onrendered||function(){})(e),this.prop.canvas=e,document.body.removeChild(this.prop.overlay)}))},Kn.prototype.toContext2d=function(){return this.thenList([function(){return document.body.contains(this.prop.container)||this.toContainer()}]).then(Vn).then((function(e){var t=this.opt.jsPDF,n=this.opt.fontFaces,r=Object.assign({async:!0,allowTaint:!0,scale:1,scrollX:this.opt.scrollX||0,scrollY:this.opt.scrollY||0,backgroundColor:"#ffffff",imageTimeout:15e3,logging:!0,proxy:null,removeContainer:!0,foreignObjectRendering:!1,useCORS:!1},this.opt.html2canvas);if(delete r.onrendered,t.context2d.autoPaging=!0,t.context2d.posX=this.opt.x,t.context2d.posY=this.opt.y,t.context2d.fontFaces=n)for(var i=0;i<n.length;++i){var o=n[i],a=o.src.find((function(e){return"truetype"===e.format}));a&&t.addFont(a.url,o.ref.name,o.ref.style)}return r.windowHeight=r.windowHeight||0,r.windowHeight=0==r.windowHeight?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):r.windowHeight,e(this.prop.container,r)})).then((function(e){(this.opt.html2canvas.onrendered||function(){})(e),this.prop.canvas=e,document.body.removeChild(this.prop.overlay)}))},Kn.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then((function(){var e=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=e}))},Kn.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then((function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF}))},Kn.prototype.output=function(e,t,n){return"img"===(n=n||"pdf").toLowerCase()||"image"===n.toLowerCase()?this.outputImg(e,t):this.outputPdf(e,t)},Kn.prototype.outputPdf=function(e,t){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then((function(){return this.prop.pdf.output(e,t)}))},Kn.prototype.outputImg=function(e){return this.thenList([function(){return this.prop.img||this.toImg()}]).then((function(){switch(e){case void 0:case"img":return this.prop.img;case"datauristring":case"dataurlstring":return this.prop.img.src;case"datauri":case"dataurl":return document.location.href=this.prop.img.src;default:throw'Image output type "'+e+'" is not supported.'}}))},Kn.prototype.save=function(e){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(e?{filename:e}:null).then((function(){this.prop.pdf.save(this.opt.filename)}))},Kn.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then((function(){this.prop.callback(this.prop.pdf)}))},Kn.prototype.set=function(e){var t;return"object"!==Gn(e)?this:(t=Object.keys(e||{}).map((function(t){if(t in Kn.template.prop)return function(){this.prop[t]=e[t]};switch(t){case"margin":return this.setMargin.bind(this,e.margin);case"jsPDF":return function(){return this.opt.jsPDF=e.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,e.pageSize);default:return function(){this.opt[t]=e[t]}}}),this),this.then((function(){return this.thenList(t)})))},Kn.prototype.get=function(e,t){return this.then((function(){var n=(e in Kn.template.prop?this.prop:this.opt)[e];return t?t(n):n}))},Kn.prototype.setMargin=function(e){return this.then((function(){switch(Gn(e)){case"number":e=[e,e,e,e];case"array":if(4===(e=2===e.length?[e[0],e[1],e[0],e[1]]:e).length)break;default:return this.error("Invalid margin array.")}this.opt.margin=e})).then(this.setPageSize)},Kn.prototype.setPageSize=function(e){function t(e,t){return Math.floor(e*t/72*96)}return this.then((function(){(e=e||j.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(e.inner={width:e.width-this.opt.margin[1]-this.opt.margin[3],height:e.height-this.opt.margin[0]-this.opt.margin[2]},e.inner.px={width:t(e.inner.width,e.k),height:t(e.inner.height,e.k)},e.inner.ratio=e.inner.height/e.inner.width),this.prop.pageSize=e}))},Kn.prototype.setProgress=function(e,t,n,r){return null!=e&&(this.progress.val=e),null!=t&&(this.progress.state=t),null!=n&&(this.progress.n=n),null!=r&&(this.progress.stack=r),this.progress.ratio=this.progress.val/this.progress.state,this},Kn.prototype.updateProgress=function(e,t,n,r){return this.setProgress(e?this.progress.val+e:null,t||null,n?this.progress.n+n:null,r?this.progress.stack.concat(r):null)},Kn.prototype.then=function(e,t){var n=this;return this.thenCore(e,t,(function(e,t){return n.updateProgress(null,null,1,[e]),Promise.prototype.then.call(this,(function(t){return n.updateProgress(null,e),t})).then(e,t).then((function(e){return n.updateProgress(1),e}))}))},Kn.prototype.thenCore=function(e,t,n){n=n||Promise.prototype.then,e=e&&e.bind(this),t=t&&t.bind(this);var r=-1!==Promise.toString().indexOf("[native code]")&&"Promise"===Promise.name?this:Kn.convert(Object.assign({},this),Promise.prototype);n=n.call(r,e,t);return Kn.convert(n,this.__proto__)},Kn.prototype.thenExternal=function(e,t){return Promise.prototype.then.call(this,e,t)},Kn.prototype.thenList=function(e){var t=this;return e.forEach((function(e){t=t.thenCore(e)})),t},Kn.prototype.catch=function(e){return e=e&&e.bind(this),e=Promise.prototype.catch.call(this,e),Kn.convert(e,this)},Kn.prototype.catchExternal=function(e){return Promise.prototype.catch.call(this,e)},Kn.prototype.error=function(e){return this.then((function(){throw new Error(e)}))},Kn.prototype.using=Kn.prototype.set,Kn.prototype.saveAs=Kn.prototype.save,Kn.prototype.export=Kn.prototype.output,Kn.prototype.run=Kn.prototype.then,j.getPageSize=function(e,t,n){"object"==o(e)&&(e=(i=e).orientation,t=i.unit||t,n=i.format||n),t=t||"mm",n=n||"a4",e=(""+(e||"P")).toLowerCase();var r,i=(""+n).toLowerCase(),a={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};switch(t){case"pt":r=1;break;case"mm":r=72/25.4;break;case"cm":r=72/2.54;break;case"in":r=72;break;case"px":r=.75;break;case"pc":case"em":r=12;break;case"ex":r=6;break;default:throw"Invalid unit: "+t}var s,u=0,c=0;if(a.hasOwnProperty(i))u=a[i][1]/r,c=a[i][0]/r;else try{u=n[1],c=n[0]}catch(e){throw new Error("Invalid format: "+n)}if("p"===e||"portrait"===e)e="p",u<c&&(s=c,c=u,u=s);else{if("l"!==e&&"landscape"!==e)throw"Invalid orientation: "+e;e="l",c<u&&(s=c,c=u,u=s)}return{width:c,height:u,unit:t,k:r,orientation:e}},Cr.html=function(e,t){(t=t||{}).callback=t.callback||function(){},t.html2canvas=t.html2canvas||{},t.html2canvas.canvas=t.html2canvas.canvas||this.canvas,t.jsPDF=t.jsPDF||this,t.fontFaces=t.fontFaces?t.fontFaces.map(gt):null;var n=new Kn(t);return t.worker?n:n.from(e).doCallback()},j.API.addJS=function(e){return Rn=e,this.internal.events.subscribe("postPutResources",(function(){Nn=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(Nn+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),Fn=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+Rn+")"),this.internal.out(">>"),this.internal.out("endobj")})),this.internal.events.subscribe("putCatalog",(function(){void 0!==Nn&&void 0!==Fn&&this.internal.out("/Names <</JavaScript "+Nn+" 0 R>>")})),this},
/**
     * @license
     * Copyright (c) 2014 Steven Spungin (TwelveTone LLC)  steven@twelvetone.tv
     *
     * Licensed under the MIT License.
     * http://opensource.org/licenses/mit-license
     */(hr=j.API).events.push(["postPutResources",function(){var e=this,t=/^(\d+) 0 obj$/;if(0<this.outline.root.children.length)for(var n=e.outline.render().split(/\r\n/),r=0;r<n.length;r++){var i=n[r],o=t.exec(i);null!=o&&(o=o[1],e.internal.newObjectDeferredBegin(o,!1)),e.internal.write(i)}if(this.outline.createNamedDestinations){var a=this.internal.pages.length,s=[];for(r=0;r<a;r++){var u=e.internal.newObject();u=(s.push(u),e.internal.getPageInfo(r+1));e.internal.write("<< /D["+u.objId+" 0 R /XYZ null null null]>> endobj")}var c=e.internal.newObject();for(e.internal.write("<< /Names [ "),r=0;r<s.length;r++)e.internal.write("(page_"+(r+1)+")"+s[r]+" 0 R");e.internal.write(" ] >>","endobj"),jn=e.internal.newObject(),e.internal.write("<< /Dests "+c+" 0 R"),e.internal.write(">>","endobj")}}]),hr.events.push(["putCatalog",function(){0<this.outline.root.children.length&&(this.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&this.internal.write("/Names "+jn+" 0 R"))}]),hr.events.push(["initialized",function(){var e=this;e.outline={createNamedDestinations:!1,root:{children:[]}},e.outline.add=function(e,t,n){return t={title:t,options:n,children:[]},(e=null==e?this.root:e).children.push(t),t},e.outline.render=function(){return this.ctx={},this.ctx.val="",this.ctx.pdf=e,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},e.outline.genIds_r=function(t){t.id=e.internal.newObjectDeferred();for(var n=0;n<t.children.length;n++)this.genIds_r(t.children[n])},e.outline.renderRoot=function(e){this.objStart(e),this.line("/Type /Outlines"),0<e.children.length&&(this.line("/First "+this.makeRef(e.children[0])),this.line("/Last "+this.makeRef(e.children[e.children.length-1]))),this.line("/Count "+this.count_r({count:0},e)),this.objEnd()},e.outline.renderItems=function(t){for(var n=this.ctx.pdf.internal.getVerticalCoordinateString,r=0;r<t.children.length;r++){var i=t.children[r],o=(this.objStart(i),this.line("/Title "+this.makeString(i.title)),this.line("/Parent "+this.makeRef(t)),0<r&&this.line("/Prev "+this.makeRef(t.children[r-1])),r<t.children.length-1&&this.line("/Next "+this.makeRef(t.children[r+1])),0<i.children.length&&(this.line("/First "+this.makeRef(i.children[0])),this.line("/Last "+this.makeRef(i.children[i.children.length-1]))),this.count=this.count_r({count:0},i));0<o&&this.line("/Count "+o),i.options&&i.options.pageNumber&&(o=e.internal.getPageInfo(i.options.pageNumber),this.line("/Dest ["+o.objId+" 0 R /XYZ 0 "+n(0)+" 0]")),this.objEnd()}for(var a=0;a<t.children.length;a++)this.renderItems(t.children[a])},e.outline.line=function(e){this.ctx.val+=e+"\r\n"},e.outline.makeRef=function(e){return e.id+" 0 R"},e.outline.makeString=function(t){return"("+e.internal.pdfEscape(t)+")"},e.outline.objStart=function(e){this.ctx.val+="\r\n"+e.id+" 0 obj\r\n<<\r\n"},e.outline.objEnd=function(){this.ctx.val+=">> \r\nendobj\r\n"},e.outline.count_r=function(e,t){for(var n=0;n<t.children.length;n++)e.count++,this.count_r(e,t.children[n]);return e.count}}]),
/**
     * @license
     *
     * Licensed under the MIT License.
     * http://opensource.org/licenses/mit-license
     */
Cr=j.API,Mn=[192,193,194,195,196,197,198,199],Cr.processJPEG=function(e,t,n,r,i,o){var a=this.decode.DCT_DECODE,s=null;if("string"==typeof e||this.__addimage__.isArrayBuffer(e)||this.__addimage__.isArrayBufferView(e)){switch(e=this.__addimage__.isArrayBuffer(e=i||e)?new Uint8Array(e):e,(i=function(e){for(var t,n=256*e.charCodeAt(4)+e.charCodeAt(5),r=e.length,i={width:0,height:0,numcomponents:1},o=4;o<r;o+=2){if(o+=n,-1!==Mn.indexOf(e.charCodeAt(o+1))){t=256*e.charCodeAt(o+5)+e.charCodeAt(o+6),i={width:256*e.charCodeAt(o+7)+e.charCodeAt(o+8),height:t,numcomponents:e.charCodeAt(o+9)};break}n=256*e.charCodeAt(o+2)+e.charCodeAt(o+3)}return i}(e=this.__addimage__.isArrayBufferView(e)?this.__addimage__.arrayBufferToBinaryString(e):e)).numcomponents){case 1:o=this.color_spaces.DEVICE_GRAY;break;case 4:o=this.color_spaces.DEVICE_CMYK;break;case 3:o=this.color_spaces.DEVICE_RGB}s={data:e,width:i.width,height:i.height,colorSpace:o,bitsPerComponent:8,filter:a,index:t,alias:n}}return s};var Yn,Xn,Jn,Zn,er,tr,nr,rr,ir,or,ar,sr,ur,cr,lr,hr,fr=function(){var e,t,n;function r(e){var t,n,r,i,o,a,s,u,c,l,h;for(this.data=e,this.pos=8,this.palette=[],this.imgData=[],this.transparency={},this.animation=null,this.text={},i=null;;){switch(t=this.readUInt32(),a=function(){for(var e=[],t=0;t<4;++t)e.push(String.fromCharCode(this.data[this.pos++]));return e}.call(this).join("")){case"IHDR":this.width=this.readUInt32(),this.height=this.readUInt32(),this.bits=this.data[this.pos++],this.colorType=this.data[this.pos++],this.compressionMethod=this.data[this.pos++],this.filterMethod=this.data[this.pos++],this.interlaceMethod=this.data[this.pos++];break;case"acTL":this.animation={numFrames:this.readUInt32(),numPlays:this.readUInt32()||1/0,frames:[]};break;case"PLTE":this.palette=this.read(t);break;case"fcTL":i&&this.animation.frames.push(i),this.pos+=4,i={width:this.readUInt32(),height:this.readUInt32(),xOffset:this.readUInt32(),yOffset:this.readUInt32()},u=this.readUInt16(),o=this.readUInt16()||100,i.delay=1e3*u/o,i.disposeOp=this.data[this.pos++],i.blendOp=this.data[this.pos++],i.data=[];break;case"IDAT":case"fdAT":for("fdAT"===a&&(this.pos+=4,t-=4),e=(null!=i?i.data:void 0)||this.imgData,c=0;0<=t?c<t:t<c;0<=t?++c:--c)e.push(this.data[this.pos++]);break;case"tRNS":switch(this.transparency={},this.colorType){case 3:if(r=this.palette.length/3,this.transparency.indexed=this.read(t),this.transparency.indexed.length>r)throw new Error("More transparent colors than palette size");if(0<(s=r-this.transparency.indexed.length))for(l=0;0<=s?l<s:s<l;0<=s?++l:--l)this.transparency.indexed.push(255);break;case 0:this.transparency.grayscale=this.read(t)[0];break;case 2:this.transparency.rgb=this.read(t)}break;case"tEXt":o=(u=this.read(t)).indexOf(0),h=String.fromCharCode.apply(String,u.slice(0,o)),this.text[h]=String.fromCharCode.apply(String,u.slice(o+1));break;case"IEND":return i&&this.animation.frames.push(i),this.colors=function(){switch(this.colorType){case 0:case 3:case 4:return 1;case 2:case 6:return 3}}.call(this),this.hasAlphaChannel=4===(h=this.colorType)||6===h,n=this.colors+(this.hasAlphaChannel?1:0),this.pixelBitlength=this.bits*n,this.colorSpace=function(){switch(this.colors){case 1:return"DeviceGray";case 3:return"DeviceRGB"}}.call(this),void(this.imgData=new Uint8Array(this.imgData));default:this.pos+=t}if(this.pos+=4,this.pos>this.data.length)throw new Error("Incomplete or corrupt PNG file")}}function o(){if("[object Window]"!==Object.prototype.toString.call(i))return!1;try{t=i.document.createElement("canvas"),n=t.getContext("2d")}catch(e){return!1}return!0}return r.prototype.read=function(e){for(var t=[],n=0;0<=e?n<e:e<n;0<=e?++n:--n)t.push(this.data[this.pos++]);return t},r.prototype.readUInt32=function(){return this.data[this.pos++]<<24|this.data[this.pos++]<<16|this.data[this.pos++]<<8|this.data[this.pos++]},r.prototype.readUInt16=function(){return this.data[this.pos++]<<8|this.data[this.pos++]},r.prototype.decodePixels=function(e){var t=this.pixelBitlength/8,n=new Uint8Array(this.width*this.height*t),r=0,i=this;return 0===(e=null==e?this.imgData:e).length?new Uint8Array(0):(e=function(e,t){!function(){if(8!=(15&e[0])||7<e[0]>>>4||(e[0]<<8|e[1])%31)throw"invalid zlib data";if(32&e[1])throw"invalid zlib data: preset dictionaries not supported"}();var n=e.subarray(2,-4),r=t,i=void 0;function o(e){var t=r.length;t<e&&((t=new on(Math.max(2*t,e))).set(r),r=t)}var a=n.length,s=!r||i,u=!i||i.i,c=(i=i||{},r=r||new on(3*a),i.f||0),l=i.p||0,h=i.b||0,f=i.l,d=i.d,p=i.m,m=i.n,g=8*a;do{if(!f){i.f=c=xn(n,l,1);var A=xn(n,l+1,3);if(l+=3,!A){var v=n[(_=kn(l)+4)-4]|n[_-3]<<8;if(a<(k=_+v)){if(u)throw"unexpected EOF";break}s&&o(h+v),r.set(n.subarray(_,k),h),i.b=h+=v,i.p=l=8*k;continue}if(1==A)f=Ln,d=zn,p=9,m=5;else{if(2!=A)throw"invalid block type";v=xn(n,l,31)+257;var b=xn(n,l+10,15)+4,y=v+xn(n,l+5,31)+1;l+=14;for(var w=new on(y),x=new on(19),C=0;C<b;++C)x[ln[C]]=xn(n,l+3*C,7);l+=3*b;var k,E=(1<<(k=wn(x)))-1;if(!u&&g<l+y*(k+7))break;var S=vn(x,k,1);for(C=0;C<y;){var _,O=S[xn(n,l,E)];if(l+=15&O,(_=O>>>4)<16)w[C++]=_;else{var T=0,D=0;for(16==_?(D=3+xn(n,l,3),l+=2,T=w[C-1]):17==_?(D=3+xn(n,l,7),l+=3):18==_&&(D=11+xn(n,l,127),l+=7);D--;)w[C++]=T}}A=w.subarray(0,v);var B=w.subarray(v);p=wn(A),m=wn(B),f=vn(A,p,1),d=vn(B,m,1)}if(g<l)throw"unexpected EOF"}s&&o(h+131072);for(var I=(1<<p)-1,M=(1<<m)-1,j=p+m+18;u||l+j<g;){var N=(T=f[Cn(n,l)&I])>>>4;if((l+=15&T)>g)throw"unexpected EOF";if(!T)throw"invalid length/literal";if(N<256)r[h++]=N;else{if(256==N){f=null;break}var F,R=N-254,P=(N=(264<N&&(R=xn(n,l,(1<<(F=un[C=N-257]))-1)+hn[C],l+=F),d[Cn(n,l)&M]))>>>4;if(!N)throw"invalid distance";if(l+=15&N,B=dn[P],3<P&&(F=cn[P],B+=Cn(n,l)&(1<<F)-1,l+=F),g<l)throw"unexpected EOF";s&&o(h+131072);for(var L=h+R;h<L;h+=4)r[h]=r[h-B],r[h+1]=r[h+1-B],r[h+2]=r[h+2-B],r[h+3]=r[h+3-B];h=L}}i.l=f,i.p=l,i.b=h,f&&(c=1,i.m=p,i.d=d,i.n=m)}while(!c);return h==r.length?r:En(r,0,h)}(e),1==i.interlaceMethod?(o(0,0,8,8),o(4,0,8,8),o(0,4,4,8),o(2,0,4,4),o(0,2,2,4),o(1,0,2,2),o(0,1,1,2)):o(0,0,1,1),n);function o(o,a,s,u){for(var c,l,h,f,d,p,m,g,A,v,b,y,w,x=Math.ceil((i.width-o)/s),C=Math.ceil((i.height-a)/u),k=i.width==x&&i.height==C,E=t*x,S=k?n:new Uint8Array(E*C),_=e.length,O=0,T=0;O<C&&r<_;){switch(e[r++]){case 0:for(I=A=0;A<E;I=A+=1)S[T++]=e[r++];break;case 1:for(I=v=0;v<E;I=v+=1)c=e[r++],h=I<t?0:S[T-t],S[T++]=(c+h)%256;break;case 2:for(I=b=0;b<E;I=b+=1)c=e[r++],l=(I-I%t)/t,m=O&&S[(O-1)*E+l*t+I%t],S[T++]=(m+c)%256;break;case 3:for(I=y=0;y<E;I=y+=1)c=e[r++],l=(I-I%t)/t,h=I<t?0:S[T-t],m=O&&S[(O-1)*E+l*t+I%t],S[T++]=(c+Math.floor((h+m)/2))%256;break;case 4:for(I=w=0;w<E;I=w+=1)c=e[r++],l=(I-I%t)/t,h=I<t?0:S[T-t],0===O?m=g=0:(m=S[(O-1)*E+l*t+I%t],g=l&&S[(O-1)*E+(l-1)*t+I%t]),p=h+m-g,f=Math.abs(p-h),d=Math.abs(p-m),p=Math.abs(p-g),S[T++]=(c+(f<=d&&f<=p?h:d<=p?m:g))%256;break;default:throw new Error("Invalid filter algorithm: "+e[r-1])}if(!k)for(var D=((a+O*u)*i.width+o)*t,B=O*E,I=0;I<x;I+=1){for(var M=0;M<t;M+=1)n[D++]=S[B++];D+=(s-1)*t}O++}}},r.prototype.decodePalette=function(){for(var e,t,n=this.palette,r=this.transparency.indexed||[],i=new Uint8Array((r.length||0)+n.length),o=0,a=0,s=e=0,u=n.length;e<u;s=e+=3)i[o++]=n[s],i[o++]=n[s+1],i[o++]=n[s+2],i[o++]=null!=(t=r[a++])?t:255;return i},r.prototype.copyToImageData=function(e,t){var n,r,i,o,a,s,u,c,l=this.colors,h=null,f=this.hasAlphaChannel;if(this.palette.length&&(h=null!=(c=this._decodedPalette)?c:this._decodedPalette=this.decodePalette(),l=4,f=!0),s=(n=e.data||e).length,i=h||t,r=o=0,1===l)for(;r<s;)a=h?4*t[r/4]:o,u=i[a++],n[r++]=u,n[r++]=u,n[r++]=u,n[r++]=f?i[a++]:255,o=a;else for(;r<s;)a=h?4*t[r/4]:o,n[r++]=i[a++],n[r++]=i[a++],n[r++]=i[a++],n[r++]=f?i[a++]:255,o=a},r.prototype.decode=function(){var e=new Uint8Array(this.width*this.height*4);return this.copyToImageData(e,this.decodePixels()),e},o(),e=function(e){if(!0===o())return n.width=e.width,n.height=e.height,n.clearRect(0,0,e.width,e.height),n.putImageData(e,0,0),(e=new Image).src=t.toDataURL(),e;throw new Error("This method requires a Browser with Canvas-capability.")},r.prototype.decodeFrames=function(t){var n,r,i,o,a,s,u,c;if(this.animation){for(c=[],r=a=0,s=(u=this.animation.frames).length;a<s;r=++a)n=u[r],i=t.createImageData(n.width,n.height),o=this.decodePixels(new Uint8Array(n.data)),this.copyToImageData(i,o),n.imageData=i,c.push(n.image=e(i));return c}},r.prototype.renderFrame=function(e,t){var n=(r=this.animation.frames)[t],r=r[t-1];return 0===t&&e.clearRect(0,0,this.width,this.height),1===(null!=r?r.disposeOp:void 0)?e.clearRect(r.xOffset,r.yOffset,r.width,r.height):2===(null!=r?r.disposeOp:void 0)&&e.putImageData(r.imageData,r.xOffset,r.yOffset),0===n.blendOp&&e.clearRect(n.xOffset,n.yOffset,n.width,n.height),e.drawImage(n.image,n.xOffset,n.yOffset)},r.prototype.animate=function(e){var t,n=this,r=0,i=this.animation,o=i.numFrames,a=i.frames,s=i.numPlays;return(t=function(){var i=r++%o,u=a[i];if(n.renderFrame(e,i),1<o&&r/o<s)return n.animation._timeout=setTimeout(t,u.delay)})()},r.prototype.stopAnimation=function(){var e;return clearTimeout(null!=(e=this.animation)?e._timeout:void 0)},r.prototype.render=function(e){var t;return e._png&&e._png.stopAnimation(),e._png=this,e.width=this.width,e.height=this.height,e=e.getContext("2d"),this.animation?(this.decodeFrames(e),this.animate(e)):(t=e.createImageData(this.width,this.height),this.copyToImageData(t,this.decodePixels()),e.putImageData(t,0,0))},r}();
/**
     * @license
     *
     * Copyright (c) 2014 James Robb, https://github.com/jamesbrobb
     *
     * Permission is hereby granted, free of charge, to any person obtaining
     * a copy of this software and associated documentation files (the
     * "Software"), to deal in the Software without restriction, including
     * without limitation the rights to use, copy, modify, merge, publish,
     * distribute, sublicense, and/or sell copies of the Software, and to
     * permit persons to whom the Software is furnished to do so, subject to
     * the following conditions:
     *
     * The above copyright notice and this permission notice shall be
     * included in all copies or substantial portions of the Software.
     *
     * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
     * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
     * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
     * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
     * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
     * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
     * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
     * ====================================================================
     */
/**
     * @license
     * (c) Dean McNamee <dean@gmail.com>, 2013.
     *
     * https://github.com/deanm/omggif
     *
     * Permission is hereby granted, free of charge, to any person obtaining a copy
     * of this software and associated documentation files (the "Software"), to
     * deal in the Software without restriction, including without limitation the
     * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
     * sell copies of the Software, and to permit persons to whom the Software is
     * furnished to do so, subject to the following conditions:
     *
     * The above copyright notice and this permission notice shall be included in
     * all copies or substantial portions of the Software.
     *
     * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
     * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
     * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
     * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
     * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
     * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
     * IN THE SOFTWARE.
     *
     * omggif is a JavaScript implementation of a GIF 89a encoder and decoder,
     * including animation and compression.  It does not rely on any specific
     * underlying system, so should run in the browser, Node, or Plask.
     */function dr(e){var t=0;if(71!==e[t++]||73!==e[t++]||70!==e[t++]||56!==e[t++]||56!=(e[t++]+1&253)||97!==e[t++])throw new Error("Invalid GIF 87a/89a header.");var n=e[t++]|e[t++]<<8,r=e[t++]|e[t++]<<8,i=e[t++],o=1<<1+(7&i),a=(e[t++],e[t++],null),s=null,u=(i>>7&&(a=t,t+=3*(s=o)),!0),c=[],l=0,h=null,f=0,d=null;for(this.width=n,this.height=r;u&&t<e.length;)switch(e[t++]){case 33:switch(e[t++]){case 255:if(11!==e[t]||78==e[t+1]&&69==e[t+2]&&84==e[t+3]&&83==e[t+4]&&67==e[t+5]&&65==e[t+6]&&80==e[t+7]&&69==e[t+8]&&50==e[t+9]&&46==e[t+10]&&48==e[t+11]&&3==e[t+12]&&1==e[t+13]&&0==e[t+16])t+=14,d=e[t++]|e[t++]<<8,t++;else for(t+=12;;){if(!(0<=(m=e[t++])))throw Error("Invalid block size");if(0===m)break;t+=m}break;case 249:if(4!==e[t++]||0!==e[t+4])throw new Error("Invalid graphics extension block.");var p=e[t++];l=e[t++]|e[t++]<<8,h=e[t++];0==(1&p)&&(h=null),f=p>>2&7,t++;break;case 254:for(;;){if(!(0<=(m=e[t++])))throw Error("Invalid block size");if(0===m)break;t+=m}break;default:throw new Error("Unknown graphic control label: 0x"+e[t-1].toString(16))}break;case 44:var m,g=e[t++]|e[t++]<<8,A=e[t++]|e[t++]<<8,v=e[t++]|e[t++]<<8,b=e[t++]|e[t++]<<8,y=(k=e[t++])>>6&1,w=a,x=s,C=!1,k=(k>>7&&(C=!0,w=t,t+=3*(x=1<<1+(7&k))),t);for(t++;;){if(!(0<=(m=e[t++])))throw Error("Invalid block size");if(0===m)break;t+=m}c.push({x:g,y:A,width:v,height:b,has_local_palette:C,palette_offset:w,palette_size:x,data_offset:k,data_length:t-k,transparent_index:h,interlaced:!!y,delay:l,disposal:f});break;case 59:u=!1;break;default:throw new Error("Unknown gif block: 0x"+e[t-1].toString(16))}this.numFrames=function(){return c.length},this.loopCount=function(){return d},this.frameInfo=function(e){if(e<0||e>=c.length)throw new Error("Frame index out of range.");return c[e]},this.decodeAndBlitFrameBGRA=function(t,r){var i=(t=this.frameInfo(t)).width*t.height,o=new Uint8Array(i),a=(pr(e,t.data_offset,o,i),t.palette_offset),s=t.transparent_index,u=(null===s&&(s=256),t.width),c=n-u,l=u,h=4*(t.y*n+t.x),f=4*((t.y+t.height)*n+t.x),d=h,p=4*c;!0===t.interlaced&&(p+=4*n*7);for(var m=8,g=0,A=o.length;g<A;++g){var v,b,y=o[g];0===l&&(l=u,(d+=p)>=f&&(p=4*c+4*n*(m-1),d=h+(u+c)*(m<<1),m>>=1)),y===s?d+=4:(v=e[a+3*y],b=e[a+3*y+1],y=e[a+3*y+2],r[d++]=y,r[d++]=b,r[d++]=v,r[d++]=255),--l}},this.decodeAndBlitFrameRGBA=function(t,r){var i=(t=this.frameInfo(t)).width*t.height,o=new Uint8Array(i),a=(pr(e,t.data_offset,o,i),t.palette_offset),s=t.transparent_index,u=(null===s&&(s=256),t.width),c=n-u,l=u,h=4*(t.y*n+t.x),f=4*((t.y+t.height)*n+t.x),d=h,p=4*c;!0===t.interlaced&&(p+=4*n*7);for(var m=8,g=0,A=o.length;g<A;++g){var v,b,y=o[g];0===l&&(l=u,(d+=p)>=f&&(p=4*c+4*n*(m-1),d=h+(u+c)*(m<<1),m>>=1)),y===s?d+=4:(v=e[a+3*y],b=e[a+3*y+1],y=e[a+3*y+2],r[d++]=v,r[d++]=b,r[d++]=y,r[d++]=255),--l}}}function pr(e,t,n,r){for(var i=e[t++],o=1<<i,a=1+o,u=1+a,c=i+1,l=(1<<c)-1,h=0,f=0,d=0,p=e[t++],m=new Int32Array(4096),g=null;;){for(;h<16&&0!==p;)f|=e[t++]<<h,h+=8,1===p?p=e[t++]:--p;if(h<c)break;var A=f&l;if(f>>=c,h-=c,A!=o){if(A==a)break;for(var v=A<u?A:g,b=0,y=v;o<y;)y=m[y]>>8,++b;var w=y;if(r<d+b+(v!==A?1:0))return s.log("Warning, gif stream longer than expected.");n[d++]=w;var x=d+=b;for(v!==A&&(n[d++]=w),y=v;b--;)y=m[y],n[--x]=255&y,y>>=8;null!==g&&u<4096&&(m[u++]=g<<8|w,l+1<=u&&c<12&&(++c,l=l<<1|1)),g=A}else u=1+a,l=(1<<(c=i+1))-1,g=null}d!==r&&s.log("Warning, gif stream shorter than expected.")}
/**
     * @license
      Copyright (c) 2008, Adobe Systems Incorporated
      All rights reserved.
  
      Redistribution and use in source and binary forms, with or without 
      modification, are permitted provided that the following conditions are
      met:
  
      * Redistributions of source code must retain the above copyright notice, 
        this list of conditions and the following disclaimer.
      
      * Redistributions in binary form must reproduce the above copyright
        notice, this list of conditions and the following disclaimer in the 
        documentation and/or other materials provided with the distribution.
      
      * Neither the name of Adobe Systems Incorporated nor the names of its 
        contributors may be used to endorse or promote products derived from 
        this software without specific prior written permission.
  
      THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
      IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
      THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
      PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 
      CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
      EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
      PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
      PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
      LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
      NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
      SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    */function mr(e){var t,n=Math.floor,r=new Array(64),i=new Array(64),o=new Array(64),a=new Array(64),s=new Array(65535),u=new Array(65535),c=new Array(64),l=new Array(64),h=[],f=0,d=7,p=new Array(64),m=new Array(64),g=new Array(64),A=new Array(256),v=new Array(2048),b=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],y=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],w=[0,1,2,3,4,5,6,7,8,9,10,11],x=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],C=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],k=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],E=[0,1,2,3,4,5,6,7,8,9,10,11],S=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],_=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function O(e,t){for(var n=0,r=0,i=new Array,o=1;o<=16;o++){for(var a=1;a<=e[o];a++)i[t[r]]=[],i[t[r]][0]=n,i[t[r]][1]=o,r++,n++;n*=2}return i}function T(e){for(var t=e[0],n=e[1]-1;0<=n;)t&1<<n&&(f|=1<<d),n--,--d<0&&(255==f?(D(255),D(0)):D(f),d=7,f=0)}function D(e){h.push(e)}function B(e){D(e>>8&255),D(255&e)}function I(e,t,n,r,i){for(var o,a=i[0],h=i[240],f=function(e,t){for(var n,r,i=0,o=0;o<8;++o){var a=e[i],s=e[i+1],u=e[i+2],l=e[i+3],h=e[i+4],f=e[i+5],d=e[i+6],p=a+(n=e[i+7]),m=a-n,g=s-d,A=u-f,v=l-h,b=p+(y=l+h),y=(p=p-y,(w=s+d)+(x=u+f)),w=w-x,x=(e[i]=b+y,e[i+4]=b-y,.707106781*(w+p));y=(e[i+2]=p+x,e[i+6]=p-x,.382683433*((b=v+A)-(w=g+m))),p=.5411961*b+y,x=1.306562965*w+y,b=m+(v=.707106781*(A+g)),w=m-v;e[i+5]=w+p,e[i+3]=w-p,e[i+1]=b+x,e[i+7]=b-x,i+=8}for(o=i=0;o<8;++o){a=e[i],s=e[i+8],u=e[i+16],l=e[i+24],h=e[i+32],f=e[i+40],d=e[i+48];var C=a+(n=e[i+56]),k=a-n,E=s-d,S=u-f,_=l-h,O=C+(T=l+h),T=(C=C-T,(D=s+d)+(B=u+f)),D=D-B,B=(e[i]=O+T,e[i+32]=O-T,.707106781*(D+C));T=(e[i+16]=C+B,e[i+48]=C-B,.382683433*((O=_+S)-(D=E+k))),C=.5411961*O+T,B=1.306562965*D+T,O=k+(_=.707106781*(S+E)),D=k-_;e[i+40]=D+C,e[i+24]=D-C,e[i+8]=O+B,e[i+56]=O-B,i++}for(o=0;o<64;++o)r=e[o]*t[o],c[o]=0<r?.5+r|0:r-.5|0;return c}(e,t),d=0;d<64;++d)l[b[d]]=f[d];e=l[0]-n,n=l[0],0==e?T(r[0]):(T(r[u[o=32767+e]]),T(s[o]));for(var p=63;0<p&&0==l[p];)p--;if(0==p)T(a);else{for(var m=1;m<=p;){for(var g=m;0==l[m]&&m<=p;)++m;if(16<=(g=m-g)){for(var A=g>>4,v=1;v<=A;++v)T(h);g&=15}o=32767+l[m],T(i[(g<<4)+u[o]]),T(s[o]),m++}63!=p&&T(a)}return n}function M(e){if(e=Math.min(Math.max(e,1),100),t!=e){for(var s=e<50?Math.floor(5e3/e):Math.floor(200-2*e),u=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],c=0;c<64;c++){var l=n((u[c]*s+50)/100);l=Math.min(Math.max(l,1),255);r[b[c]]=l}for(var h=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],f=0;f<64;f++){var d=n((h[f]*s+50)/100);d=Math.min(Math.max(d,1),255);i[b[f]]=d}for(var p=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],m=0,g=0;g<8;g++)for(var A=0;A<8;A++)o[m]=1/(r[b[m]]*p[g]*p[A]*8),a[m]=1/(i[b[m]]*p[g]*p[A]*8),m++;t=e}}this.encode=function(e,t){t&&M(t),h=new Array,f=0,d=7,B(65496),B(65504),B(16),D(74),D(70),D(73),D(70),D(0),D(1),D(1),D(0),B(1),B(1),D(0),D(0),B(65499),B(132),D(0);for(var n=0;n<64;n++)D(r[n]);D(1);for(var s=0;s<64;s++)D(i[s]);t=e.width,Y=e.height,B(65472),B(17),D(8),B(Y),B(t),D(3),D(1),D(17),D(0),D(2),D(17),D(1),D(3),D(17),D(1),B(65476),B(418),D(0);for(var u=0;u<16;u++)D(y[u+1]);for(var c=0;c<=11;c++)D(w[c]);D(16);for(var l=0;l<16;l++)D(x[l+1]);for(var A=0;A<=161;A++)D(C[A]);D(1);for(var b=0;b<16;b++)D(k[b+1]);for(var O=0;O<=11;O++)D(E[O]);D(17);for(var j=0;j<16;j++)D(S[j+1]);for(var N=0;N<=161;N++)D(_[N]);B(65498),B(12),D(3),D(1),D(0),D(2),D(17),D(3),D(17),D(0),D(63),D(0);var U=0,z=0,H=0;f=0,d=7,this.encode.displayName="_encode_";for(var $,Q,V,q,G,W,K=e.data,Y=e.width,X=e.height,J=4*Y,Z=0;Z<X;){for($=0;$<J;){for(Q=J*Z+$,W=0;W<64;W++)V=Q+(G=W>>3)*J+(q=4*(7&W)),X<=Z+G&&(V-=J*(Z+1+G-X)),J<=$+q&&(V-=$+q-J+4),G=K[V++],q=K[V++],V=K[V++],p[W]=(v[G]+v[q+256>>0]+v[V+512>>0]>>16)-128,m[W]=(v[G+768>>0]+v[q+1024>>0]+v[V+1280>>0]>>16)-128,g[W]=(v[G+1280>>0]+v[q+1536>>0]+v[V+1792>>0]>>16)-128;U=I(p,o,U,F,P),z=I(m,a,z,R,L),H=I(g,a,H,R,L),$+=32}Z+=8}return 0<=d&&((t=[])[1]=d+1,t[0]=(1<<d+1)-1,T(t)),B(65497),new Uint8Array(h)},e=e||50;for(var j=String.fromCharCode,N=0;N<256;N++)A[N]=j(N);for(var F=O(y,w),R=O(k,E),P=O(x,C),L=O(S,_),U=1,z=2,H=1;H<=15;H++){for(var $=U;$<z;$++)u[32767+$]=H,s[32767+$]=[],s[32767+$][1]=H,s[32767+$][0]=$;for(var Q=-(z-1);Q<=-U;Q++)u[32767+Q]=H,s[32767+Q]=[],s[32767+Q][1]=H,s[32767+Q][0]=z-1+Q;U<<=1,z<<=1}for(var V=0;V<256;V++)v[V]=19595*V,v[V+256>>0]=38470*V,v[V+512>>0]=7471*V+32768,v[V+768>>0]=-11059*V,v[V+1024>>0]=-21709*V,v[V+1280>>0]=32768*V+8421375,v[V+1536>>0]=-27439*V,v[V+1792>>0]=-5329*V;M(e)}
/**
     * @license
     * Copyright (c) 2017 Aras Abbasi
     *
     * Licensed under the MIT License.
     * http://opensource.org/licenses/mit-license
     */function gr(e,t){if(this.pos=0,this.buffer=e,this.datav=new DataView(e.buffer),this.is_with_alpha=!!t,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,-1===["BM","BA","CI","CP","IC","PT"].indexOf(this.flag))throw new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function Ar(e){function t(e){if(!e)throw Error("assert :P")}function n(e,t,n){for(var r=0;r<4;r++)if(e[t+r]!=n.charCodeAt(r))return 1}function r(e,t,n,r,i){for(var o=0;o<i;o++)e[t+o]=n[r+o]}function i(e,t,n,r){for(var i=0;i<r;i++)e[t+i]=n}function o(e){return new Int32Array(e)}function a(e,t){for(var n=[],r=0;r<e;r++)n.push(new t);return n}function s(e,t){var n=[];return function e(n,r,i){for(var o=i[r],a=0;a<o&&(n.push(i.length>r+1?[]:new t),!(i.length<r+1));a++)e(n[a],r+1,i)}(n,0,e),n}function u(e,t){return(e[t+0]<<0|e[t+1]<<8|e[t+2]<<16)>>>0}function c(e,t){return(e[t+0]<<0|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}new(Ar=function(){var e=this;function u(e,t){for(var n=1<<t-1>>>0;e&n;)n>>>=1;return n?(e&n-1)+n:e}function c(e,n,r,i,o){for(t(!(i%r));e[n+(i-=r)]=o,0<i;);}function l(e,n,r,i,a){if(t(a<=2328),a<=512)var s=o(512);else if(null==(s=o(a)))return 0;var l=e,f=n,d=r,p=i,m=a,g=s,A=f,v=1<<d,b=o(16),y=o(16);for(t(0!=m),t(null!=p),t(null!=l),t(0<d),O=0;O<m;++O){if(15<p[O])return 0;++b[p[O]]}if(b[0]==m)return 0;for(y[1]=0,T=1;T<15;++T){if(b[T]>1<<T)return 0;y[T+1]=y[T]+b[T]}for(O=0;O<m;++O)T=p[O],0<p[O]&&(g[y[T]++]=O);if(1==y[15])return(p=new h).g=0,p.value=g[0],c(l,A,1,v,p),v;var w,x=-1,C=v-1,k=0,E=1,S=1,_=1<<d,O=0,T=1;for(m=2;T<=d;++T,m<<=1){if(E+=S<<=1,(S-=b[T])<0)return 0;for(;0<b[T];--b[T])(p=new h).g=T,p.value=g[O++],c(l,A+k,m,_,p),k=u(k,T)}for(T=d+1,m=2;T<=15;++T,m<<=1){if(E+=S<<=1,(S-=b[T])<0)return 0;for(;0<b[T];--b[T]){if(p=new h,(k&C)!=x){for(A+=_,w=1<<(x=T)-d;x<15&&!((w-=b[x])<=0);)++x,w<<=1;v+=_=1<<(w=x-d),l[f+(x=k&C)].g=w+d,l[f+x].value=A-f-x}p.g=T-d,p.value=g[O++],c(l,A+(k>>d),m,_,p),k=u(k,T)}}return E!=2*y[15]-1?0:v}function h(){this.value=this.g=0}function f(){this.value=this.g=0}function d(){this.G=a(5,h),this.H=o(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=a(Fn,f)}function p(e,n,r,i){t(null!=e),t(null!=n),t(i<2147483648),e.Ca=254,e.I=0,e.b=-8,e.Ka=0,e.oa=n,e.pa=r,e.Jd=n,e.Yc=r+i,e.Zc=4<=i?r+i-4+1:r,S(e)}function m(e,t){for(var n=0;0<t--;)n|=O(e,128)<<t;return n}function g(e,t){return t=m(e,t),_(e)?-t:t}function A(e,n,r,i){var o,a=0;for(t(null!=e),t(null!=n),t(i<4294967288),e.Sb=i,e.Ra=0,e.u=0,4<i&&(i=4),o=e.h=0;o<i;++o)a+=n[r+o]<<8*o;e.Ra=a,e.bb=i,e.oa=n,e.pa=r}function v(e){for(;8<=e.u&&e.bb<e.Sb;)e.Ra>>>=8,e.Ra+=e.oa[e.pa+e.bb]<<Ln-8>>>0,++e.bb,e.u-=8;C(e)&&(e.h=1,e.u=0)}function b(e,n){var r;return t(0<=n),!e.h&&n<=Pn?(r=x(e)&Rn[n],e.u+=n,v(e),r):(e.h=1,e.u=0)}function y(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function w(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function x(e){return e.Ra>>>(e.u&Ln-1)>>>0}function C(e){return t(e.bb<=e.Sb),e.h||e.bb==e.Sb&&e.u>Ln}function k(e,t){e.u=t,e.h=C(e)}function E(e){e.u>=Un&&(t(e.u>=Un),v(e))}function S(e){t(null!=e&&null!=e.oa),e.pa<e.Zc?(e.I=(e.oa[e.pa++]|e.I<<8)>>>0,e.b+=8):(t(null!=e&&null!=e.oa),e.pa<e.Yc?(e.b+=8,e.I=e.oa[e.pa++]|e.I<<8):e.Ka?e.b=0:(e.I<<=8,e.b+=8,e.Ka=1))}function _(e){return m(e,1)}function O(e,t){var n=e.Ca,r=(e.b<0&&S(e),e.b),i=n*t>>>8;for((t=+(e.I>>>r>i))?(n-=i,e.I-=i+1<<r>>>0):n=i+1,r=n,i=0;256<=r;)i+=8,r>>=8;return r=7^i+zn[r],e.b-=r,e.Ca=(n<<r)-1,t}function T(e,t,n){e[t+0]=n>>24&255,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=n>>0&255}function D(e,t){return e[t+0]<<0|e[t+1]<<8}function B(e,t){return D(e,t)|e[t+2]<<16}function I(e,t){return D(e,t)|D(e,t+2)<<16}function M(e,n){var r=1<<n;return t(null!=e),t(0<n),e.X=o(r),null!=e.X&&(e.Mb=32-n,e.Xa=n,1)}function j(e,n){t(null!=e),t(null!=n),t(e.Xa==n.Xa),r(n.X,0,e.X,0,1<<n.Xa)}function N(){this.X=[],this.Xa=this.Mb=0}function F(e,n,r,i){t(null!=r),t(null!=i);var o=r[0],a=i[0];return 0==o&&(o=(e*a+n/2)/n),0==a&&(a=(n*o+e/2)/e),!(o<=0||a<=0)&&(r[0]=o,i[0]=a,1)}function R(e,t){return e+(1<<t)-1>>>t}function P(e,t){return((4278255360&e)+(4278255360&t)>>>0&4278255360)+((16711935&e)+(16711935&t)>>>0&16711935)>>>0}function L(t,n){e[n]=function(n,r,i,o,a,s,u){for(var c=0;c<a;++c){var l=e[t](s[u+c-1],i,o+c);s[u+c]=P(n[r+c],l)}}}function U(){this.ud=this.hd=this.jd=0}function z(e,t){return((4278124286&(e^t))>>>1)+(e&t)>>>0}function H(e){return 0<=e&&e<256?e:e<0?0:255<e?255:void 0}function $(e,t){return H(e+(e-t+.5>>1))}function Q(e,t,n){return Math.abs(t-n)-Math.abs(e-n)}function V(e,t,n,r,i,o,a){for(r=o[a-1],n=0;n<i;++n)o[a+n]=r=P(e[t+n],r)}function q(e,t,n,r,i){for(var o=0;o<n;++o){var a=e[t+o],s=a>>8&255,u=16711935&(u=16711935&a)+((s<<16)+s);r[i+o]=(4278255360&a)+u>>>0}}function G(e,t){t.jd=e>>0&255,t.hd=e>>8&255,t.ud=e>>16&255}function W(e,t,n,r,i,o){for(var a=0;a<r;++a){var s=t[n+a],u=s>>>8,c=s,l=255&(l=s>>>16)+((e.jd<<24>>24)*(u<<24>>24)>>>5);c=255&(c+=(e.hd<<24>>24)*(u<<24>>24)>>>5)+((e.ud<<24>>24)*(l<<24>>24)>>>5);i[o+a]=(4278255360&s)+(l<<16)+c}}function K(t,n,r,i,o){e[n]=function(e,t,n,r,a,s,u,c,l){for(r=u;r<c;++r)for(u=0;u<l;++u)a[s++]=o(n[i(e[t++])])},e[t]=function(t,n,a,s,u,c,l){var h=8>>t.b,f=t.Ea,d=t.K[0],p=t.w;if(h<8)for(t=(1<<t.b)-1,p=(1<<h)-1;n<a;++n)for(var m=0,g=0;g<f;++g)g&t||(m=i(s[u++])),c[l++]=o(d[m&p]),m>>=h;else e["VP8LMapColor"+r](s,u,d,p,c,l,n,a,f)}}function Y(e,t,n,r,i){for(n=t+n;t<n;){var o=e[t++];r[i++]=o>>16&255,r[i++]=o>>8&255,r[i++]=o>>0&255}}function X(e,t,n,r,i){for(n=t+n;t<n;){var o=e[t++];r[i++]=o>>16&255,r[i++]=o>>8&255,r[i++]=o>>0&255,r[i++]=o>>24&255}}function J(e,t,n,r,i){for(n=t+n;t<n;){var o=(a=e[t++])>>16&240|a>>12&15,a=a>>0&240|a>>28&15;r[i++]=o,r[i++]=a}}function Z(e,t,n,r,i){for(n=t+n;t<n;){var o=(a=e[t++])>>16&248|a>>13&7,a=a>>5&224|a>>3&31;r[i++]=o,r[i++]=a}}function ee(e,t,n,r,i){for(n=t+n;t<n;){var o=e[t++];r[i++]=o>>0&255,r[i++]=o>>8&255,r[i++]=o>>16&255}}function te(e,t,n,i,o,a){if(0==a)for(n=t+n;t<n;)T(i,((a=e[t++])[0]>>24|a[1]>>8&65280|a[2]<<8&16711680|a[3]<<24)>>>0),o+=32;else r(i,o,e,t,n)}function ne(t,n){e[n][0]=e[t+"0"],e[n][1]=e[t+"1"],e[n][2]=e[t+"2"],e[n][3]=e[t+"3"],e[n][4]=e[t+"4"],e[n][5]=e[t+"5"],e[n][6]=e[t+"6"],e[n][7]=e[t+"7"],e[n][8]=e[t+"8"],e[n][9]=e[t+"9"],e[n][10]=e[t+"10"],e[n][11]=e[t+"11"],e[n][12]=e[t+"12"],e[n][13]=e[t+"13"],e[n][14]=e[t+"0"],e[n][15]=e[t+"0"]}function re(e){return e==Ur||e==zr||e==Hr||e==$r}function ie(){this.eb=[],this.size=this.A=this.fb=0}function oe(){this.y=[],this.f=[],this.ea=[],this.F=[],this.Tc=this.Ed=this.Cd=this.Fd=this.lb=this.Db=this.Ab=this.fa=this.J=this.W=this.N=this.O=0}function ae(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new ie,this.f.kb=new oe,this.sd=null}function se(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function ue(){this.Id=this.fd=this.Md=this.hb=this.ib=this.da=this.bd=this.cd=this.j=this.v=this.Da=this.Sd=this.ob=0}function ce(e){return alert("todo:WebPSamplerProcessPlane"),e.T}function le(e,t){var n=e.T,i=t.ba.f.RGBA,o=i.eb,a=i.fb+e.ka*i.A,s=pi[t.ba.S],u=e.y,c=e.O,l=e.f,h=e.N,f=e.ea,d=e.W,p=t.cc,m=t.dc,g=t.Mc,A=t.Nc,v=e.ka,b=e.ka+e.T,y=e.U,w=y+1>>1;for(0==v?s(u,c,null,null,l,h,f,d,l,h,f,d,o,a,null,null,y):(s(t.ec,t.fc,u,c,p,m,g,A,l,h,f,d,o,a-i.A,o,a,y),++n);v+2<b;v+=2)m=h,A=d,h+=e.Rc,d+=e.Rc,a+=2*i.A,s(u,(c+=2*e.fa)-e.fa,u,c,p=l,m,g=f,A,l,h,f,d,o,a-i.A,o,a,y);return c+=e.fa,e.j+b<e.o?(r(t.ec,t.fc,u,c,y),r(t.cc,t.dc,l,h,w),r(t.Mc,t.Nc,f,d,w),n--):1&b||s(u,c,null,null,l,h,f,d,l,h,f,d,o,a+i.A,null,null,y),n}function he(e,n,r){var i,o,a,s,u,c,l=e.F,h=[e.J];return null!=l&&(i=e.U,a=(o=n.ba.S)==Rr||o==Hr,n=n.ba.f.RGBA,c=e.ka,(s=[0])[0]=e.T,e.Kb&&(0==c?--s[0]:(--c,h[0]-=e.width),e.j+e.ka+e.T==e.o&&(s[0]=e.o-e.j-c)),u=n.eb,c=n.fb+c*n.A,e=xr(l,h[0],e.width,i,s,u,c+(a?0:3),n.A),t(r==s),e&&re(o)&&yr(u,c,a,i,s,n.A)),0}function fe(e){var t=e.ma,n=t.ba.S,r=n<11,i=n==jr||n==Fr||n==Rr||n==Pr||12==n||re(n);if(t.memory=null,t.Ib=null,t.Jb=null,t.Nd=null,!Mn(t.Oa,e,i?11:12))return 0;if(i&&re(n)&&gn(),e.da)alert("todo:use_scaling");else{if(r){if(t.Ib=ce,e.Kb){if(n=e.U+1>>1,t.memory=o(e.U+2*n),null==t.memory)return 0;t.ec=t.memory,t.fc=0,t.cc=t.ec,t.dc=t.fc+e.U,t.Mc=t.cc,t.Nc=t.dc+n,t.Ib=le,gn()}}else alert("todo:EmitYUV");i&&(t.Jb=he,r&&pn())}if(r&&!Oi){for(e=0;e<256;++e)Ti[e]=89858*(e-128)+Ci>>xi,Ii[e]=-22014*(e-128)+Ci,Bi[e]=-45773*(e-128),Di[e]=113618*(e-128)+Ci>>xi;for(e=ki;e<Ei;++e)Mi[e-ki]=Qe(t=76283*(e-16)+Ci>>xi,255),ji[e-ki]=Qe(t+8>>4,15);Oi=1}return 1}function de(e){var n=e.ma,r=e.U,i=e.T;return t(!(1&e.ka)),r<=0||i<=0?0:(r=n.Ib(e,n),null!=n.Jb&&n.Jb(e,n,r),n.Dc+=r,1)}function pe(e){e.ma.memory=null}function me(e,t,n,r){return 47==b(e,8)&&(t[0]=b(e,14)+1,n[0]=b(e,14)+1,r[0]=b(e,1),0==b(e,3)&&!e.h)}function ge(e,t){return e<4?e+1:(2+(1&e)<<(e=e-2>>1))+b(t,e)+1}function Ae(e,t){return 120<t?t-120:1<=(t=((t=Kr[t-1])>>4)*e+(8-(15&t)))?t:1}function ve(e,t,n){var r,i=e[t+=255&x(n)].g-8;return 0<i&&(k(n,n.u+8),r=x(n),t=t+e[t].value+(r&(1<<i)-1)),k(n,n.u+e[t].g),e[t].value}function be(e,n,r){return r.g+=e.g,r.value+=e.value<<n>>>0,t(r.g<=8),e.g}function ye(e,n,r){var i=e.xc;return t((n=0==i?0:e.vc[e.md*(r>>i)+(n>>i)])<e.Wb),e.Ya[n]}function we(e,n,i,o){var a=e.ab,s=e.c*n,u=e.C,c=(n=u+n,i),l=o;for(o=e.Ta,i=e.Ua;0<a--;){var h=e.gc[a],f=u,d=n,p=c,m=l,g=(l=o,c=i,h.Ea);switch(t(f<d),t(d<=h.nc),h.hc){case 2:Qn(p,m,(d-f)*g,l,c);break;case 0:var A=f,v=d,b=l,y=c,w=(S=h).Ea;0==A&&(Hn(p,m,null,null,1,b,y),V(p,m+1,0,0,w-1,b,y+1),m+=w,y+=w,++A);for(var x=1<<S.b,C=x-1,k=R(w,S.b),E=S.K,S=S.w+(A>>S.b)*k;A<v;){var _=E,O=S,T=1;for($n(p,m,b,y-w,1,b,y);T<w;){var D=(T&~C)+x;w<D&&(D=w),(0,Kn[_[O++]>>8&15])(p,m+ +T,b,y+T-w,D-T,b,y+T),T=D}m+=w,y+=w,++A&C||(S+=k)}d!=h.nc&&r(l,c-g,l,c+(d-f-1)*g,g);break;case 1:for(g=p,v=m,w=(p=h.Ea)-(y=p&~(b=(m=1<<h.b)-1)),A=R(p,h.b),x=h.K,h=h.w+(f>>h.b)*A;f<d;){for(C=x,k=h,E=new U,S=v+y,_=v+p;v<S;)G(C[k++],E),Yn(E,g,v,m,l,c),v+=m,c+=m;v<_&&(G(C[k++],E),Yn(E,g,v,w,l,c),v+=w,c+=w),++f&b||(h+=A)}break;case 3:if(p==l&&m==c&&0<h.b){for(v=l,p=g=c+(d-f)*g-(y=(d-f)*R(h.Ea,h.b)),m=l,b=c,A=[],y=(w=y)-1;0<=y;--y)A[y]=m[b+y];for(y=w-1;0<=y;--y)v[p+y]=A[y];Vn(h,f,d,l,g,l,c)}else Vn(h,f,d,p,m,l,c)}c=o,l=i}l!=i&&r(o,i,c,l,s)}function xe(e,n){var r=e.V,i=e.Ba+e.c*e.C,o=n-e.C;if(t(n<=e.l.o),t(o<=16),0<o){var a,s=e.l,u=e.Ta,c=e.Ua,l=s.width;if(we(e,o,r,i),o=c=[c],t((r=e.C)<(i=n)),t(s.v<s.va),i>s.o&&(i=s.o),r<s.j&&(a=s.j-r,r=s.j,o[0]+=a*l),r=i<=r?0:(o[0]+=4*s.v,s.ka=r-s.j,s.U=s.va-s.v,s.T=i-r,1)){if(c=c[0],(r=e.ca).S<11){var h=r.f.RGBA,f=(i=r.S,o=s.U,s=s.T,a=h.eb,h.A),d=s;for(h=h.fb+e.Ma*h.A;0<d--;){var p=u,m=c,g=o,A=a,v=h;switch(i){case Mr:Xn(p,m,g,A,v);break;case jr:Jn(p,m,g,A,v);break;case Ur:Jn(p,m,g,A,v),yr(A,v,0,g,1,0);break;case Nr:tr(p,m,g,A,v);break;case Fr:te(p,m,g,A,v,1);break;case zr:te(p,m,g,A,v,1),yr(A,v,0,g,1,0);break;case Rr:te(p,m,g,A,v,0);break;case Hr:te(p,m,g,A,v,0),yr(A,v,1,g,1,0);break;case Pr:Zn(p,m,g,A,v);break;case $r:Zn(p,m,g,A,v),wr(A,v,g,1,0);break;case Lr:er(p,m,g,A,v);break;default:t(0)}c+=l,h+=f}e.Ma+=s}else alert("todo:EmitRescaledRowsYUVA");t(e.Ma<=r.height)}}e.C=n,t(e.C<=e.i)}function Ce(e){var t;if(0<e.ua)return 0;for(t=0;t<e.Wb;++t){var n=e.Ya[t].G,r=e.Ya[t].H;if(0<n[1][r[1]+0].g||0<n[2][r[2]+0].g||0<n[3][r[3]+0].g)return 0}return 1}function ke(e,n,r,i,o,a){if(0!=e.Z){var s=e.qd,u=e.rd;for(t(null!=di[e.Z]);n<r;++n)di[e.Z](s,u,i,o,i,o,a),s=i,u=o,o+=a;e.qd=s,e.rd=u}}function Ee(e,n){var r,i,o,a,s,u,c=e.l.ma,l=0==c.Z||1==c.Z?e.l.j:e.C;l=e.C<l?l:e.C;t(n<=e.l.o),l<n&&(r=e.l.width,i=c.ca,o=c.tb+r*l,a=e.V,s=e.Ba+e.c*l,u=e.gc,t(1==e.ab),t(3==u[0].hc),Gn(u[0],l,n,a,s,i,o),ke(c,l,n,i,o,r)),e.C=e.Ma=n}function Se(e,n,r,i,o,a,s){var u=e.$/i,c=e.$%i,l=e.m,h=e.s,f=r+e.$,d=f,p=(o=r+i*o,r+i*a),m=280+h.ua,g=e.Pb?u:16777216,A=0<h.ua?h.Wa:null,v=h.wc,b=f<p?ye(h,c,u):null,y=(t(e.C<a),t(p<=o),!1);e:for(;;){for(;y||f<p;){var w,S,_,O=0;if(g<=u&&(w=f-r,t((g=e).Pb),g.wd=g.m,g.xd=w,0<g.s.ua&&j(g.s.Wa,g.s.vb),g=u+Xr),t(null!=(b=c&v?b:ye(h,c,u))),b.Qb&&(n[f]=b.qb,y=!0),y||(E(l),b.jc?(w=n,S=f,_=b.pd[x(O=l)&Fn-1],t(b.jc),0==(O=_.g<256?(k(O,O.u+_.g),w[S]=_.value,0):(k(O,O.u+_.g-256),t(256<=_.value),_.value))&&(y=!0)):O=ve(b.G[0],b.H[0],l)),l.h)break;if(y||O<256){if(!y)if(b.nd)n[f]=(b.qb|O<<8)>>>0;else{if(E(l),y=ve(b.G[1],b.H[1],l),E(l),w=ve(b.G[2],b.H[2],l),S=ve(b.G[3],b.H[3],l),l.h)break;n[f]=(S<<24|y<<16|O<<8|w)>>>0}if(y=!1,++f,++c>=i&&(c=0,++u,null!=s&&u<=a&&!(u%16)&&s(e,u),null!=A))for(;d<f;)O=n[d++],A.X[(506832829*O&4294967295)>>>A.Mb]=O}else if(O<280){if(O=ge(O-256,l),w=ve(b.G[4],b.H[4],l),E(l),w=Ae(i,w=ge(w,l)),l.h)break;if(f-r<w||o-f<O)break e;for(S=0;S<O;++S)n[f+S]=n[f+S-w];for(f+=O,c+=O;i<=c;)c-=i,++u,null!=s&&u<=a&&!(u%16)&&s(e,u);if(t(f<=o),c&v&&(b=ye(h,c,u)),null!=A)for(;d<f;)O=n[d++],A.X[(506832829*O&4294967295)>>>A.Mb]=O}else{if(!(O<m))break e;for(y=O-280,t(null!=A);d<f;)O=n[d++],A.X[(506832829*O&4294967295)>>>A.Mb]=O;O=f,t(!(y>>>(w=A).Xa)),n[O]=w.X[y],y=!0}y||t(l.h==C(l))}if(e.Pb&&l.h&&f<o)t(e.m.h),e.a=5,e.m=e.wd,e.$=e.xd,0<e.s.ua&&j(e.s.vb,e.s.Wa);else{if(l.h)break;null!=s&&s(e,a<u?a:u),e.a=0,e.$=f-r}return 1}return e.a=3,0}function _e(){var t=new on;return null==t?null:(t.a=0,t.xb=fi,ne("Predictor","VP8LPredictors"),ne("Predictor","VP8LPredictors_C"),ne("PredictorAdd","VP8LPredictorsAdd"),ne("PredictorAdd","VP8LPredictorsAdd_C"),Qn=q,Yn=W,Xn=Y,Jn=X,Zn=J,er=Z,tr=ee,e.VP8LMapColor32b=qn,e.VP8LMapColor8b=Wn,t)}function Oe(e,n,r,s,u){for(var c,f=1,p=[e],m=[n],g=s.m,A=s.s,v=null,y=0;;){if(r)for(;f&&b(g,1);){var w=p,C=m,S=s,_=1,O=S.m,T=S.gc[S.ab],D=b(O,2);if(S.Oc&1<<D)f=0;else{switch(S.Oc|=1<<D,T.hc=D,T.Ea=w[0],T.nc=C[0],T.K=[null],++S.ab,t(S.ab<=4),D){case 0:case 1:T.b=b(O,3)+2,_=Oe(R(T.Ea,T.b),R(T.nc,T.b),0,S,T.K),T.K=T.K[0];break;case 3:var B=16<(j=b(O,8)+1)?0:4<j?1:2<j?2:3;if(w[0]=R(T.Ea,B),T.b=B,B=_=Oe(j,1,0,S,T.K)){var I,j,N=j,F=1<<(8>>(j=T).b),L=o(F);if(null==L)B=0;else{var U=j.K[0],z=j.w;for(L[0]=j.K[0][0],I=1;I<+N;++I)L[I]=P(U[z+I],L[I-1]);for(;I<4*F;++I)L[I]=0;j.K[0]=null,j.K[0]=L,B=1}}_=B;break;case 2:break;default:t(0)}f=_}}if(p=p[0],m=m[0],f&&b(g,1)&&!(f=1<=(y=b(g,4))&&y<=11)){s.a=3;break}if(c=f)e:{var H,$=s,Q=p,V=m,q=y,G=r,W=$.m,K=$.s,Y=[null],X=1,J=0,Z=Yr[q];t:for(;;){if(G&&b(W,1)){var ee=(oe=R(Q,ie=b(W,3)+2))*(re=R(V,ie));if(!Oe(oe,re,0,$,Y))break;for(Y=Y[0],K.xc=ie,ce=0;ce<ee;++ce){var te=Y[ce]>>8&65535;X<=(Y[ce]=te)&&(X=1+te)}}if(W.h)break;for(ge=0;ge<5;++ge){var ne=qr[ge];!ge&&0<q&&(ne+=1<<q),J<ne&&(J=ne)}var re,ie,oe=a(X*Z,h),ae=null==(ie=a(re=X,d))?null:(t(re<=65536),ie),se=o(J);if(null==ae||null==se||null==oe){$.a=1;break}for(var ue=oe,ce=H=0;ce<X;++ce){for(var le=ae[ce],he=le.G,fe=le.H,de=0,pe=1,me=0,ge=0;ge<5;++ge){ne=qr[ge],!ge&&0<q&&(ne+=1<<q);n:{var Ae,ve=ne,ye=$,we=se,xe=he[ge]=ue,Ce=fe[ge]=H,ke=0,Ee=ye.m,_e=b(Ee,1);if(i(we,0,0,ve),_e){_e=b(Ee,1)+1;var Te=b(Ee,1);Te=(we[b(Ee,0==Te?1:8)]=1,2==_e&&(we[b(Ee,8)]=1),1)}else{var De=o(19),Be=b(Ee,4)+4;if(19<Be){ye.a=3;var Ie=0;break n}for(Ae=0;Ae<Be;++Ae)De[Wr[Ae]]=b(Ee,3);var Me=void 0,je=void 0,Ne=De,Fe=ve,Re=we,Pe=0,Le=(_e=ye).m,Ue=8,ze=a(128,h);r:for(;l(ze,0,7,Ne,19);){if(b(Le,1)){var He=2+2*b(Le,3);if((Me=2+b(Le,He))>Fe)break}else Me=Fe;for(je=0;je<Fe&&Me--;){E(Le);var $e=ze[127&x(Le)];if(($e=(k(Le,Le.u+$e.g),$e.value))<16)0!=(Re[je++]=$e)&&(Ue=$e);else{var Qe=16==$e,Ve=Vr[$e=$e-16],qe=b(Le,Qr[$e])+Ve;if(Fe<je+qe)break r;for(var Ge=Qe?Ue:0;0<qe--;)Re[je++]=Ge}}Pe=1;break}Pe||(_e.a=3),Te=Pe}(Te=Te&&!Ee.h)&&(ke=l(xe,Ce,8,we,ve)),Ie=Te&&0!=ke?ke:(ye.a=3,0)}if(0==Ie)break t;if(pe&&1==Gr[ge]&&(pe=0==ue[H].g),de+=ue[H].g,H+=Ie,ge<=3){for(var We=se[0],Ke=1;Ke<ne;++Ke)se[Ke]>We&&(We=se[Ke]);me+=We}}if(le.nd=pe,le.Qb=0,pe&&(le.qb=(he[3][fe[3]+0].value<<24|he[1][fe[1]+0].value<<16|he[2][fe[2]+0].value)>>>0,0==de&&he[0][fe[0]+0].value<256&&(le.Qb=1,le.qb+=he[0][fe[0]+0].value<<8)),le.jc=!le.Qb&&me<6,le.jc)for(var Ye=le,Xe=0;Xe<Fn;++Xe){var Je=Xe,Ze=Ye.pd[Je],et=Ye.G[0][Ye.H[0]+Je];256<=et.value?(Ze.g=et.g+256,Ze.value=et.value):(Ze.g=0,Ze.value=0,Je=(Je=(Je>>=be(et,8,Ze))>>be(Ye.G[1][Ye.H[1]+Je],16,Ze))>>be(Ye.G[2][Ye.H[2]+Je],0,Ze),be(Ye.G[3][Ye.H[3]+Je],24,Ze))}}K.vc=Y,K.Wb=X,K.Ya=ae,K.yc=oe,c=1;break e}c=0}if(!(f=c)){s.a=3;break}if(0<y){if(A.ua=1<<y,!M(A.Wa,y)){s.a=1,f=0;break}}else A.ua=0;var tt=s,nt=p,rt=m,it=tt.s,ot=it.xc;if(tt.c=nt,tt.i=rt,it.md=R(nt,ot),it.wc=0==ot?-1:(1<<ot)-1,r){s.xb=hi;break}if(null==(v=o(p*m))){s.a=1,f=0;break}f=(f=Se(s,v,0,p,m,m,null))&&!g.h;break}return f&&(null!=u?u[0]=v:(t(null==v),t(r)),s.$=0,r)||function(e){t(null!=e),e.vc=null,e.yc=null,e.Ya=null;var n=e.Wa;null!=n&&(n.X=null),t((e.vb=null)!=e)}(A),f}function Te(e,n){var r=e.c*e.i,i=r+n+16*n;return t(e.c<=n),e.V=o(i),null==e.V?(e.Ta=null,e.Ua=0,e.a=1,0):(e.Ta=e.V,e.Ua=e.Ba+r+n,1)}function De(e,n){var r=e.C,i=n-r,o=e.V,a=e.Ba+e.c*r;for(t(n<=e.l.o);0<i;){var s=16<i?16:i,u=e.l.ma,c=e.l.width,l=c*s,h=u.ca,f=u.tb+c*r,d=e.Ta,p=e.Ua;we(e,s,o,a),Cr(d,p,h,f,l),ke(u,r,r+s,h,f,c),i-=s,o+=s*e.c,r+=s}t(r==n),e.C=e.Ma=n}function Be(){this.ub=this.yd=this.td=this.Rb=0}function Ie(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function Me(){this.Fb=this.Bb=this.Cb=0,this.Zb=o(4),this.Lb=o(4)}function je(){var e;this.Yb=(function e(t,n,r){for(var i=r[n],o=0;o<i&&(t.push(r.length>n+1?[]:0),!(r.length<n+1));o++)e(t[o],n+1,r)}(e=[],0,[3,11]),e)}function Ne(){this.jb=o(3),this.Wc=s([4,8],je),this.Xc=s([4,17],je)}function Fe(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new o(4),this.od=new o(4)}function Re(){this.ld=this.La=this.dd=this.tc=0}function Pe(){this.Na=this.la=0}function Le(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function Ue(){this.ad=o(384),this.Za=0,this.Ob=o(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function ze(){this.uc=this.M=this.Nb=0,this.wa=Array(new Re),this.Y=0,this.ya=Array(new Ue),this.aa=0,this.l=new Ve}function He(){this.y=o(16),this.f=o(8),this.ea=o(8)}function $e(){this.cb=this.a=0,this.sc="",this.m=new y,this.Od=new Be,this.Kc=new Ie,this.ed=new Fe,this.Qa=new Me,this.Ic=this.$c=this.Aa=0,this.D=new ze,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=a(8,y),this.ia=0,this.pb=a(4,Le),this.Pa=new Ne,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new He),this.Hd=0,this.rb=Array(new Pe),this.sb=0,this.wa=Array(new Re),this.Y=0,this.oc=[],this.pc=0,this.sa=[],this.ta=0,this.qa=[],this.ra=0,this.Ha=[],this.B=this.R=this.Ia=0,this.Ec=[],this.M=this.ja=this.Vb=this.Fc=0,this.ya=Array(new Ue),this.L=this.aa=0,this.gd=s([4,2],Re),this.ga=null,this.Fa=[],this.Cc=this.qc=this.P=0,this.Gb=[],this.Uc=0,this.mb=[],this.nb=0,this.rc=[],this.Ga=this.Vc=0}function Qe(e,t){return e<0?0:t<e?t:e}function Ve(){this.T=this.U=this.ka=this.height=this.width=0,this.y=[],this.f=[],this.ea=[],this.Rc=this.fa=this.W=this.N=this.O=0,this.ma="void",this.put="VP8IoPutHook",this.ac="VP8IoSetupHook",this.bc="VP8IoTeardownHook",this.ha=this.Kb=0,this.data=[],this.hb=this.ib=this.da=this.o=this.j=this.va=this.v=this.Da=this.ob=this.w=0,this.F=[],this.J=0}function qe(){var e=new $e;return null!=e&&(e.a=0,e.sc="OK",e.cb=0,e.Xb=0,ei=ei||Ye),e}function Ge(e,t,n){return 0==e.a&&(e.a=t,e.sc=n,e.cb=0),0}function We(e,t,n){return 3<=n&&157==e[t+0]&&1==e[t+1]&&42==e[t+2]}function Ke(e,n){if(null!=e){if(e.a=0,e.sc="OK",null==n)return Ge(e,2,"null VP8Io passed to VP8GetHeaders()"),0;var r=n.data,o=n.w;if((f=n.ha)<4)return Ge(e,7,"Truncated header."),0;var a=r[o+0]|r[o+1]<<8|r[o+2]<<16,s=e.Od;if(s.Rb=!(1&a),s.td=a>>1&7,s.yd=a>>4&1,s.ub=a>>5,3<s.td)return Ge(e,3,"Incorrect keyframe parameters."),0;if(!s.yd)return Ge(e,4,"Frame not displayable."),0;o+=3,f-=3;var u=e.Kc;if(s.Rb){if(f<7)return Ge(e,7,"cannot parse picture header"),0;if(!We(r,o,f))return Ge(e,3,"Bad code word"),0;u.c=16383&(r[o+4]<<8|r[o+3]),u.Td=r[o+4]>>6,u.i=16383&(r[o+6]<<8|r[o+5]),u.Ud=r[o+6]>>6,o+=7,f-=7,e.za=u.c+15>>4,e.Ub=u.i+15>>4,n.width=u.c,n.height=u.i,n.Da=0,n.j=0,n.v=0,n.va=n.width,n.o=n.height,n.da=0,n.ib=n.width,n.hb=n.height,n.U=n.width,n.T=n.height,i((a=e.Pa).jb,0,255,a.jb.length),t(null!=(a=e.Qa)),a.Cb=0,a.Bb=0,a.Fb=1,i(a.Zb,0,0,a.Zb.length),i(a.Lb,0,0,a.Lb)}if(s.ub>f)return Ge(e,7,"bad partition length"),0;p(a=e.m,r,o,s.ub),o+=s.ub,f-=s.ub,s.Rb&&(u.Ld=_(a),u.Kd=_(a));u=e.Qa;var c,l=e.Pa;if(t(null!=a),t(null!=u),u.Cb=_(a),u.Cb){if(u.Bb=_(a),_(a)){for(u.Fb=_(a),c=0;c<4;++c)u.Zb[c]=_(a)?g(a,7):0;for(c=0;c<4;++c)u.Lb[c]=_(a)?g(a,6):0}if(u.Bb)for(c=0;c<3;++c)l.jb[c]=_(a)?m(a,8):255}else u.Bb=0;if(a.Ka)return Ge(e,3,"cannot parse segment header"),0;if((u=e.ed).zd=_(a),u.Tb=m(a,6),u.wb=m(a,3),u.Pc=_(a),u.Pc&&_(a)){for(l=0;l<4;++l)_(a)&&(u.vd[l]=g(a,6));for(l=0;l<4;++l)_(a)&&(u.od[l]=g(a,6))}if(e.L=0==u.Tb?0:u.zd?1:2,a.Ka)return Ge(e,3,"cannot parse filter header"),0;var h=f,f=c=o;o=c+h;if(u=h,e.Xb=(1<<m(e.m,2))-1,h<3*(l=e.Xb))r=7;else{for(c+=3*l,u-=3*l,h=0;h<l;++h){var d=r[f+0]|r[f+1]<<8|r[f+2]<<16;u<d&&(d=u),p(e.Jc[+h],r,c,d),c+=d,u-=d,f+=3}p(e.Jc[+l],r,c,u),r=c<o?0:5}if(0!=r)return Ge(e,r,"cannot parse partitions"),0;for(r=m(c=e.m,7),f=_(c)?g(c,4):0,o=_(c)?g(c,4):0,u=_(c)?g(c,4):0,l=_(c)?g(c,4):0,c=_(c)?g(c,4):0,h=e.Qa,d=0;d<4;++d){if(h.Cb){var A=h.Zb[d];h.Fb||(A+=r)}else{if(0<d){e.pb[d]=e.pb[0];continue}A=r}var v=e.pb[d];v.Sc[0]=Jr[Qe(A+f,127)],v.Sc[1]=Zr[Qe(A+0,127)],v.Eb[0]=2*Jr[Qe(A+o,127)],v.Eb[1]=101581*Zr[Qe(A+u,127)]>>16,v.Eb[1]<8&&(v.Eb[1]=8),v.Qc[0]=Jr[Qe(A+l,117)],v.Qc[1]=Zr[Qe(A+c,127)],v.lc=A+c}if(!s.Rb)return Ge(e,4,"Not a key frame."),0;for(_(a),s=e.Pa,r=0;r<4;++r){for(f=0;f<8;++f)for(o=0;o<3;++o)for(u=0;u<11;++u)l=O(a,ai[r][f][o][u])?m(a,8):ii[r][f][o][u],s.Wc[r][f].Yb[o][u]=l;for(f=0;f<17;++f)s.Xc[r][f]=s.Wc[r][si[f]]}return e.kc=_(a),e.kc&&(e.Bd=m(a,8)),e.cb=1}}function Ye(e,t,n,r,i,o,a){var s=t[i].Yb[n];for(n=0;i<16;++i){if(!O(e,s[n+0]))return i;for(;!O(e,s[n+1]);)if(s=t[++i].Yb[0],n=0,16==i)return 16;var u=t[i+1].Yb;if(O(e,s[n+2])){var c=e,l=0;if(O(c,(f=s)[(h=n)+3]))if(O(c,f[h+6])){for(s=0,h=2*(l=O(c,f[h+8]))+(f=O(c,f[h+9+l])),l=0,f=ti[h];f[s];++s)l+=l+O(c,f[s]);l+=3+(8<<h)}else O(c,f[h+7])?(l=7+2*O(c,165),l+=O(c,145)):l=5+O(c,159);else l=O(c,f[h+4])?3+O(c,f[h+5]):2;s=u[2]}else s=u[l=1];u=a+ni[i],(c=e).b<0&&S(c);var h,f=c.b,d=(h=c.Ca>>1)-(c.I>>f)>>31;--c.b,c.Ca+=d,c.Ca|=1,c.I-=(h+1&d)<<f,o[u]=((l^d)-d)*r[+(0<i)]}return 16}function Xe(e){var t=e.rb[e.sb-1];t.la=0,t.Na=0,i(e.zc,0,0,e.zc.length),e.ja=0}function Je(e,t,n,r,i){i=e[t+n+32*r]+(i>>3),e[t+n+32*r]=-256&i?i<0?0:255:i}function Ze(e,t,n,r,i,o){Je(e,t,0,n,r+i),Je(e,t,1,n,r+o),Je(e,t,2,n,r-o),Je(e,t,3,n,r-i)}function et(e){return(20091*e>>16)+e}function tt(e,t,n,r){for(var i=0,a=o(16),s=0;s<4;++s){var u=e[t+0]+e[t+8],c=e[t+0]-e[t+8],l=(35468*e[t+4]>>16)-et(e[t+12]),h=et(e[t+4])+(35468*e[t+12]>>16);a[i+0]=u+h,a[i+1]=c+l,a[i+2]=c-l,a[i+3]=u-h,i+=4,t++}for(s=i=0;s<4;++s)u=(e=a[i+0]+4)+a[i+8],c=e-a[i+8],l=(35468*a[i+4]>>16)-et(a[i+12]),Je(n,r,0,0,u+(h=et(a[i+4])+(35468*a[i+12]>>16))),Je(n,r,1,0,c+l),Je(n,r,2,0,c-l),Je(n,r,3,0,u-h),i++,r+=32}function nt(e,t,n,r){var i=e[t+0]+4,o=35468*e[t+4]>>16,a=et(e[t+4]),s=35468*e[t+1]>>16;Ze(n,r,0,i+a,e=et(e[t+1]),s),Ze(n,r,1,i+o,e,s),Ze(n,r,2,i-o,e,s),Ze(n,r,3,i-a,e,s)}function rt(e,t,n,r,i){tt(e,t,n,r),i&&tt(e,t+16,n,r+4)}function it(e,t,n,r){rr(e,t+0,n,r,1),rr(e,t+32,n,r+128,1)}function ot(e,t,n,r){var i;for(e=e[t+0]+4,i=0;i<4;++i)for(t=0;t<4;++t)Je(n,r,t,i,e)}function at(e,t,n,r){e[t+0]&&ar(e,t+0,n,r),e[t+16]&&ar(e,t+16,n,r+4),e[t+32]&&ar(e,t+32,n,r+128),e[t+48]&&ar(e,t+48,n,r+128+4)}function st(e,t,n,r){for(var i=o(16),a=0;a<4;++a){var s=e[t+0+a]+e[t+12+a],u=e[t+4+a]+e[t+8+a],c=e[t+4+a]-e[t+8+a],l=e[t+0+a]-e[t+12+a];i[0+a]=s+u,i[8+a]=s-u,i[4+a]=l+c,i[12+a]=l-c}for(a=0;a<4;++a)s=(e=i[0+4*a]+3)+i[3+4*a],u=i[1+4*a]+i[2+4*a],c=i[1+4*a]-i[2+4*a],l=e-i[3+4*a],n[r+0]=s+u>>3,n[r+16]=l+c>>3,n[r+32]=s-u>>3,n[r+48]=l-c>>3,r+=64}function ut(e,t,n){for(var r=t-32,i=Br,o=255-e[r-1],a=0;a<n;++a){for(var s=i,u=o+e[t-1],c=0;c<n;++c)e[t+c]=s[u+e[r+c]];t+=32}}function ct(e,t){ut(e,t,4)}function lt(e,t){ut(e,t,8)}function ht(e,t){ut(e,t,16)}function ft(e,t){for(var n=0;n<16;++n)r(e,t+32*n,e,t-32,16)}function dt(e,t){for(var n=16;0<n;--n)i(e,t,e[t-1],16),t+=32}function pt(e,t,n){for(var r=0;r<16;++r)i(t,n+32*r,e,16)}function mt(e,t){for(var n=16,r=0;r<16;++r)n+=e[t-1+32*r]+e[t+r-32];pt(n>>5,e,t)}function gt(e,t){for(var n=8,r=0;r<16;++r)n+=e[t-1+32*r];pt(n>>4,e,t)}function At(e,t){for(var n=8,r=0;r<16;++r)n+=e[t+r-32];pt(n>>4,e,t)}function vt(e,t){pt(128,e,t)}function bt(e,t,n){return e+2*t+n+2>>2}function yt(e,t){for(var n=t-32,i=(n=new Uint8Array([bt(e[n-1],e[n],e[1+n]),bt(e[n],e[1+n],e[2+n]),bt(e[1+n],e[2+n],e[3+n]),bt(e[2+n],e[3+n],e[4+n])]),0);i<4;++i)r(e,t+32*i,n,0,n.length)}function wt(e,t){var n=e[t-1],r=e[t-1+32],i=e[t-1+64],o=e[t-1+96];T(e,t+0,16843009*bt(e[t-1-32],n,r)),T(e,t+32,16843009*bt(n,r,i)),T(e,t+64,16843009*bt(r,i,o)),T(e,t+96,16843009*bt(i,o,o))}function xt(e,t){for(var n=4,r=0;r<4;++r)n+=e[t+r-32]+e[t-1+32*r];for(n>>=3,r=0;r<4;++r)i(e,t+32*r,n,4)}function Ct(e,t){var n=e[t-1],r=e[t-1+32],i=e[t-1+64],o=e[t-1-32],a=e[t+0-32],s=e[t+1-32],u=e[t+2-32],c=e[t+3-32];e[t+0+96]=bt(r,i,e[t-1+96]),e[t+1+96]=e[t+0+64]=bt(n,r,i),e[t+2+96]=e[t+1+64]=e[t+0+32]=bt(o,n,r),e[t+3+96]=e[t+2+64]=e[t+1+32]=e[t+0+0]=bt(a,o,n),e[t+3+64]=e[t+2+32]=e[t+1+0]=bt(s,a,o),e[t+3+32]=e[t+2+0]=bt(u,s,a),e[t+3+0]=bt(c,u,s)}function kt(e,t){var n=e[t+1-32],r=e[t+2-32],i=e[t+3-32],o=e[t+4-32],a=e[t+5-32],s=e[t+6-32],u=e[t+7-32];e[t+0+0]=bt(e[t+0-32],n,r),e[t+1+0]=e[t+0+32]=bt(n,r,i),e[t+2+0]=e[t+1+32]=e[t+0+64]=bt(r,i,o),e[t+3+0]=e[t+2+32]=e[t+1+64]=e[t+0+96]=bt(i,o,a),e[t+3+32]=e[t+2+64]=e[t+1+96]=bt(o,a,s),e[t+3+64]=e[t+2+96]=bt(a,s,u),e[t+3+96]=bt(s,u,u)}function Et(e,t){var n=e[t-1],r=e[t-1+32],i=e[t-1+64],o=e[t-1-32],a=e[t+0-32],s=e[t+1-32],u=e[t+2-32],c=e[t+3-32];e[t+0+0]=e[t+1+64]=o+a+1>>1,e[t+1+0]=e[t+2+64]=a+s+1>>1,e[t+2+0]=e[t+3+64]=s+u+1>>1,e[t+3+0]=u+c+1>>1,e[t+0+96]=bt(i,r,n),e[t+0+64]=bt(r,n,o),e[t+0+32]=e[t+1+96]=bt(n,o,a),e[t+1+32]=e[t+2+96]=bt(o,a,s),e[t+2+32]=e[t+3+96]=bt(a,s,u),e[t+3+32]=bt(s,u,c)}function St(e,t){var n=e[t+0-32],r=e[t+1-32],i=e[t+2-32],o=e[t+3-32],a=e[t+4-32],s=e[t+5-32],u=e[t+6-32],c=e[t+7-32];e[t+0+0]=n+r+1>>1,e[t+1+0]=e[t+0+64]=r+i+1>>1,e[t+2+0]=e[t+1+64]=i+o+1>>1,e[t+3+0]=e[t+2+64]=o+a+1>>1,e[t+0+32]=bt(n,r,i),e[t+1+32]=e[t+0+96]=bt(r,i,o),e[t+2+32]=e[t+1+96]=bt(i,o,a),e[t+3+32]=e[t+2+96]=bt(o,a,s),e[t+3+64]=bt(a,s,u),e[t+3+96]=bt(s,u,c)}function _t(e,t){var n=e[t-1],r=e[t-1+32],i=e[t-1+64],o=e[t-1+96];e[t+0+0]=n+r+1>>1,e[t+2+0]=e[t+0+32]=r+i+1>>1,e[t+2+32]=e[t+0+64]=i+o+1>>1,e[t+1+0]=bt(n,r,i),e[t+3+0]=e[t+1+32]=bt(r,i,o),e[t+3+32]=e[t+1+64]=bt(i,o,o),e[t+3+64]=e[t+2+64]=e[t+0+96]=e[t+1+96]=e[t+2+96]=e[t+3+96]=o}function Ot(e,t){var n=e[t-1],r=e[t-1+32],i=e[t-1+64],o=e[t-1+96],a=e[t-1-32],s=e[t+0-32],u=e[t+1-32],c=e[t+2-32];e[t+0+0]=e[t+2+32]=n+a+1>>1,e[t+0+32]=e[t+2+64]=r+n+1>>1,e[t+0+64]=e[t+2+96]=i+r+1>>1,e[t+0+96]=o+i+1>>1,e[t+3+0]=bt(s,u,c),e[t+2+0]=bt(a,s,u),e[t+1+0]=e[t+3+32]=bt(n,a,s),e[t+1+32]=e[t+3+64]=bt(r,n,a),e[t+1+64]=e[t+3+96]=bt(i,r,n),e[t+1+96]=bt(o,i,r)}function Tt(e,t){for(var n=0;n<8;++n)r(e,t+32*n,e,t-32,8)}function Dt(e,t){for(var n=0;n<8;++n)i(e,t,e[t-1],8),t+=32}function Bt(e,t,n){for(var r=0;r<8;++r)i(t,n+32*r,e,8)}function It(e,t){for(var n=8,r=0;r<8;++r)n+=e[t+r-32]+e[t-1+32*r];Bt(n>>4,e,t)}function Mt(e,t){for(var n=4,r=0;r<8;++r)n+=e[t+r-32];Bt(n>>3,e,t)}function jt(e,t){for(var n=4,r=0;r<8;++r)n+=e[t-1+32*r];Bt(n>>3,e,t)}function Nt(e,t){Bt(128,e,t)}function Ft(e,t,n){var r=e[t-n],i=e[t+0],o=3*(i-r)+Tr[1020+e[t-2*n]-e[t+n]],a=Dr[112+(o+4>>3)];e[t-n]=Br[255+r+Dr[112+(o+3>>3)]],e[t+0]=Br[255+i-a]}function Rt(e,t,n,r){var i=e[t+0],o=e[t+n];return Ir[255+e[t-2*n]-e[t-n]]>r||Ir[255+o-i]>r}function Pt(e,t,n,r){return 4*Ir[255+e[t-n]-e[t+0]]+Ir[255+e[t-2*n]-e[t+n]]<=r}function Lt(e,t,n,r,i){var o=e[t-3*n],a=e[t-2*n],s=e[t-n],u=e[t+0],c=e[t+n],l=e[t+2*n],h=e[t+3*n];return!(4*Ir[255+s-u]+Ir[255+a-c]>r)&&Ir[255+e[t-4*n]-o]<=i&&Ir[255+o-a]<=i&&Ir[255+a-s]<=i&&Ir[255+h-l]<=i&&Ir[255+l-c]<=i&&Ir[255+c-u]<=i}function Ut(e,t,n,r){var i=2*r+1;for(r=0;r<16;++r)Pt(e,t+r,n,i)&&Ft(e,t+r,n)}function zt(e,t,n,r){var i=2*r+1;for(r=0;r<16;++r)Pt(e,t+r*n,1,i)&&Ft(e,t+r*n,1)}function Ht(e,t,n,r){for(var i=3;0<i;--i)Ut(e,t+=4*n,n,r)}function $t(e,t,n,r){for(var i=3;0<i;--i)zt(e,t+=4,n,r)}function Qt(e,t,n,r,i,o,a,s){for(o=2*o+1;0<i--;){var u,c,l,h,f,d,p,m,g,A,v;Lt(e,t,n,o,a)&&(Rt(e,t,n,s)?Ft(e,t,n):(h=(u=e)[(c=t)-2*(l=n)],f=u[c-l],d=u[c+0],p=u[c+l],m=u[c+2*l],g=27*(v=Tr[1020+3*(d-f)+Tr[1020+h-p]])+63>>7,A=18*v+63>>7,u[c-3*l]=Br[255+u[c-3*l]+(v=9*v+63>>7)],u[c-2*l]=Br[255+h+A],u[c-l]=Br[255+f+g],u[c+0]=Br[255+d-g],u[c+l]=Br[255+p-A],u[c+2*l]=Br[255+m-v])),t+=r}}function Vt(e,t,n,r,i,o,a,s){for(o=2*o+1;0<i--;){var u,c,l,h,f,d,p,m,g;Lt(e,t,n,o,a)&&(Rt(e,t,n,s)?Ft(e,t,n):(h=(u=e)[(c=t)-(l=n)],f=u[c+0],d=u[c+l],p=Dr[112+(4+(m=3*(f-h))>>3)],m=Dr[112+(3+m>>3)],u[c-2*l]=Br[255+u[c-2*l]+(g=p+1>>1)],u[c-l]=Br[255+h+m],u[c+0]=Br[255+f-p],u[c+l]=Br[255+d-g])),t+=r}}function qt(e,t,n,r,i,o){Qt(e,t,n,1,16,r,i,o)}function Gt(e,t,n,r,i,o){Qt(e,t,1,n,16,r,i,o)}function Wt(e,t,n,r,i,o){for(var a=3;0<a;--a)Vt(e,t+=4*n,n,1,16,r,i,o)}function Kt(e,t,n,r,i,o){for(var a=3;0<a;--a)Vt(e,t+=4,1,n,16,r,i,o)}function Yt(e,t,n,r,i,o,a,s){Qt(e,t,i,1,8,o,a,s),Qt(n,r,i,1,8,o,a,s)}function Xt(e,t,n,r,i,o,a,s){Qt(e,t,1,i,8,o,a,s),Qt(n,r,1,i,8,o,a,s)}function Jt(e,t,n,r,i,o,a,s){Vt(e,t+4*i,i,1,8,o,a,s),Vt(n,r+4*i,i,1,8,o,a,s)}function Zt(e,t,n,r,i,o,a,s){Vt(e,t+4,1,i,8,o,a,s),Vt(n,r+4,1,i,8,o,a,s)}function en(){this.ba=new ae,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new ue,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function tn(){this.data=[],this.offset=this.kd=this.ha=this.w=0,this.na=[],this.xa=this.gb=this.Ja=this.Sa=this.P=0}function nn(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function rn(){this.ua=0,this.Wa=new N,this.vb=new N,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new d,this.yc=new h}function on(){this.xb=this.a=0,this.l=new Ve,this.ca=new ae,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new w,this.Pb=0,this.wd=new w,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new rn,this.ab=0,this.gc=a(4,nn),this.Oc=0}function an(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new Ve,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function sn(e,t,n,r,i,o,a){for(e=null==e?0:e[t+0],t=0;t<a;++t)i[o+t]=e+n[r+t]&255,e=i[o+t]}function un(e,t,n,r,i,o,a){var s;if(null==e)sn(null,null,n,r,i,o,a);else for(s=0;s<a;++s)i[o+s]=e[t+s]+n[r+s]&255}function cn(e,t,n,r,i,o,a){if(null==e)sn(null,null,n,r,i,o,a);else for(var s=e[t+0],u=s,c=s,l=0;l<a;++l)u=c+(s=e[t+l])-u,c=n[r+l]+(-256&u?u<0?0:255:u)&255,u=s,i[o+l]=c}function ln(e,t,n,r,i,o){for(;0<i--;){for(var a=e,s=t+(n?1:0),u=e,c=t+(n?0:3),l=0;l<r;++l){var h=u[c+4*l];255!=h&&(h*=32897,a[s+4*l+0]=a[s+4*l+0]*h>>23,a[s+4*l+1]=a[s+4*l+1]*h>>23,a[s+4*l+2]=a[s+4*l+2]*h>>23)}t+=o}}function hn(e,t,n,r,i){for(;0<r--;){for(var o=0;o<n;++o){var a=e[t+2*o+0],s=15&(c=e[t+2*o+1]),u=4369*s,c=(240&c|c>>4)*u>>16;e[t+2*o+0]=(240&a|a>>4)*u>>16&240|(15&a|a<<4)*u>>16>>4&15,e[t+2*o+1]=240&c|s}t+=i}}function fn(e,t,n,r,i,o,a,s){for(var u,c=255,l=0;l<i;++l){for(u=0;u<r;++u){var h=e[t+u];c&=o[a+4*u]=h}t+=n,a+=s}return 255!=c}function dn(e,t,n,r,i){for(var o=0;o<i;++o)n[r+o]=e[t+o]>>8}function pn(){yr=ln,wr=hn,xr=fn,Cr=dn}function mn(n,r,i){e[n]=function(e,n,o,a,s,u,c,l,h,f,d,p,m,g,A,v,b){var y,w=b-1>>1,x=s[u+0]|c[l+0]<<16,C=h[f+0]|d[p+0]<<16,k=(t(null!=e),3*x+C+131074>>2);for(r(e[n+0],255&k,k>>16,m,g),null!=o&&r(o[a+0],255&(k=3*C+x+131074>>2),k>>16,A,v),y=1;y<=w;++y){var E=s[u+y]|c[l+y]<<16,S=h[f+y]|d[p+y]<<16,_=x+E+C+S+524296,O=_+2*(E+C)>>3;k=O+x>>1,x=(_=_+2*(x+S)>>3)+E>>1;r(e[n+2*y-1],255&k,k>>16,m,g+(2*y-1)*i),r(e[+(n+2*y)],255&x,x>>16,m,g+2*y*i),null!=o&&(x=O+S>>1,r(o[a+2*y-1],255&(k=_+C>>1),k>>16,A,v+(2*y-1)*i),r(o[a+2*y+0],255&x,x>>16,A,v+(2*y+0)*i)),x=E,C=S}1&b||(r(e[n+b-1],255&(k=3*x+C+131074>>2),k>>16,m,g+(b-1)*i),null!=o&&r(o[a+b-1],255&(k=3*C+x+131074>>2),k>>16,A,v+(b-1)*i))}}function gn(){pi[Mr]=mi,pi[jr]=Ai,pi[Nr]=gi,pi[Fr]=vi,pi[Rr]=bi,pi[Pr]=yi,pi[Lr]=wi,pi[Ur]=Ai,pi[zr]=vi,pi[Hr]=bi,pi[$r]=yi}function An(e){return e&~_i?e<0?0:255:e>>Si}function vn(e,t){return An((19077*e>>8)+(26149*t>>8)-14234)}function bn(e,t,n){return An((19077*e>>8)-(6419*t>>8)-(13320*n>>8)+8708)}function yn(e,t){return An((19077*e>>8)+(33050*t>>8)-17685)}function wn(e,t,n,r,i){r[i+0]=vn(e,n),r[i+1]=bn(e,t,n),r[i+2]=yn(e,t)}function xn(e,t,n,r,i){r[i+0]=yn(e,t),r[i+1]=bn(e,t,n),r[i+2]=vn(e,n)}function Cn(e,t,n,r,i){var o=bn(e,t,n);t=o<<3&224|yn(e,t)>>3,r[i+0]=248&vn(e,n)|o>>5,r[i+1]=t}function kn(e,t,n,r,i){var o=240&yn(e,t)|15;r[i+0]=240&vn(e,n)|bn(e,t,n)>>4,r[i+1]=o}function En(e,t,n,r,i){r[i+0]=255,wn(e,t,n,r,i+1)}function Sn(e,t,n,r,i){xn(e,t,n,r,i),r[i+3]=255}function _n(e,t,n,r,i){wn(e,t,n,r,i),r[i+3]=255}function Qe(e,t){return e<0?0:t<e?t:e}function On(t,n,r){e[t]=function(e,t,i,o,a,s,u,c,l){for(var h=c+(-2&l)*r;c!=h;)n(e[t+0],i[o+0],a[s+0],u,c),n(e[t+1],i[o+0],a[s+0],u,c+r),t+=2,++o,++s,c+=2*r;1&l&&n(e[t+0],i[o+0],a[s+0],u,c)}}function Tn(e,t,n){return 0==n?0==e?0==t?6:5:0==t?4:0:n}function Dn(e,t,n,r,i){switch(e>>>30){case 3:rr(t,n,r,i,0);break;case 2:ir(t,n,r,i);break;case 1:ar(t,n,r,i)}}function Bn(e,t){for(var n,o=t.M,a=t.Nb,s=e.oc,u=e.pc+40,c=e.oc,l=e.pc+584,h=e.oc,f=e.pc+600,d=0;d<16;++d)s[u+32*d-1]=129;for(d=0;d<8;++d)c[l+32*d-1]=129,h[f+32*d-1]=129;for(0<o?s[u-1-32]=c[l-1-32]=h[f-1-32]=129:(i(s,u-32-1,127,21),i(c,l-32-1,127,9),i(h,f-32-1,127,9)),n=0;n<e.za;++n){var p=t.ya[t.aa+n];if(0<n){for(d=-1;d<16;++d)r(s,u+32*d-4,s,u+32*d+12,4);for(d=-1;d<8;++d)r(c,l+32*d-4,c,l+32*d+4,4),r(h,f+32*d-4,h,f+32*d+4,4)}var m=e.Gd,g=e.Hd+n,A=p.ad,v=p.Hc;if(0<o&&(r(s,u-32,m[g].y,0,16),r(c,l-32,m[g].f,0,8),r(h,f-32,m[g].ea,0,8)),p.Za){var b=s,y=u-32+16;for(0<o&&(n>=e.za-1?i(b,y,m[g].y[15],4):r(b,y,m[g+1].y,0,4)),d=0;d<4;d++)b[y+128+d]=b[y+256+d]=b[y+384+d]=b[y+0+d];for(d=0;d<16;++d,v<<=2)y=u+Ni[d],ci[p.Ob[d]](b=s,y),Dn(v,A,16*+d,b,y)}else if(b=Tn(n,o,p.Ob[0]),ui[b](s,u),0!=v)for(d=0;d<16;++d,v<<=2)Dn(v,A,16*+d,s,u+Ni[d]);for(d=p.Gc,b=Tn(n,o,p.Dd),li[b](c,l),li[b](h,f),v=A,b=c,y=l,255&(p=d>>0)&&(170&p?or:sr)(v,256,b,y),p=h,v=f,255&(d>>=8)&&(170&d?or:sr)(A,320,p,v),o<e.Ub-1&&(r(m[g].y,0,s,u+480,16),r(m[g].f,0,c,l+224,8),r(m[g].ea,0,h,f+224,8)),d=8*a*e.B,m=e.sa,g=e.ta+16*n+16*a*e.R,A=e.qa,p=e.ra+8*n+d,v=e.Ha,b=e.Ia+8*n+d,d=0;d<16;++d)r(m,g+d*e.R,s,u+32*d,16);for(d=0;d<8;++d)r(A,p+d*e.B,c,l+32*d,8),r(v,b+d*e.B,h,f+32*d,8)}}function In(e,r,i,o,a,s,u,c,l){var h=[0],f=[0],d=0,p=null!=l?l.kd:0,m=null!=l?l:new tn;if(null==e||i<12)return 7;m.data=e,r=[m.w=r],i=[m.ha=i],m.gb=[m.gb];e:{var g=r,v=i,b=m.gb;if(t(null!=e),t(null!=v),t(null!=b),12<=v[b[0]=0]&&!n(e,g[0],"RIFF")){if(n(e,g[0]+8,"WEBP")){b=3;break e}if((S=I(e,g[0]+4))<12||4294967286<S){b=3;break e}if(p&&S>v[0]-8){b=7;break e}b[0]=S,g[0]+=12,v[0]-=12}b=0}if(0!=b)return b;for(S=0<m.gb[0],i=i[0];;){e:{var y=e,x=(v=r,h),C=f,k=g=[0];if((b=i)[(_=d=[d])[0]=0]<8)b=7;else{if(!n(y,v[0],"VP8X")){if(10!=I(y,v[0]+4)){b=3;break e}if(b[0]<18){b=7;break e}var E=I(y,v[0]+8);if(2147483648<=(O=1+B(y,v[0]+12))*(y=1+B(y,v[0]+15))){b=3;break e}null!=k&&(k[0]=E),null!=x&&(x[0]=O),null!=C&&(C[0]=y),v[0]+=18,b[0]-=18,_[0]=1}b=0}}if(d=d[0],g=g[0],0!=b)return b;if(v=!!(2&g),!S&&d)return 3;if(null!=s&&(s[0]=!!(16&g)),null!=u&&(u[0]=v),null!=c&&(c[0]=0),u=h[0],g=f[0],d&&v&&null==l){b=0;break}if(i<4){b=7;break}if(S&&d||!S&&!d&&!n(e,r[0],"ALPH")){i=[i],m.na=[m.na],m.P=[m.P],m.Sa=[m.Sa];e:{E=e,b=r;var S=i,_=m.gb,O=(x=m.na,C=m.P,k=m.Sa,22),T=(y=(t(null!=E),t(null!=S),b[0]),S[0]);for(t(null!=x),t(null!=k),x[0]=null,C[0]=null,k[0]=0;;){if(b[0]=y,(S[0]=T)<8){b=7;break e}var D=I(E,y+4);if(4294967286<D){b=3;break e}var M=8+D+1&-2;if(O+=M,0<_&&_<O){b=3;break e}if(!n(E,y,"VP8 ")||!n(E,y,"VP8L")){b=0;break e}if(T[0]<M){b=7;break e}n(E,y,"ALPH")||(x[0]=E,C[0]=y+8,k[0]=D),y+=M,T-=M}}if(i=i[0],m.na=m.na[0],m.P=m.P[0],m.Sa=m.Sa[0],0!=b)break}i=[i],m.Ja=[m.Ja],m.xa=[m.xa];e:if(_=e,b=r,S=i,x=m.gb[0],C=m.Ja,k=m.xa,y=!n(_,E=b[0],"VP8 "),O=!n(_,E,"VP8L"),t(null!=_),t(null!=S),t(null!=C),t(null!=k),S[0]<8)b=7;else{if(y||O){if(_=I(_,E+4),12<=x&&x-12<_){b=3;break e}if(p&&_>S[0]-8){b=7;break e}C[0]=_,b[0]+=8,S[0]-=8,k[0]=O}else k[0]=5<=S[0]&&47==_[E+0]&&!(_[E+4]>>5),C[0]=S[0];b=0}if(i=i[0],m.Ja=m.Ja[0],m.xa=m.xa[0],r=r[0],0!=b)break;if(4294967286<m.Ja)return 3;if(null==c||v||(c[0]=m.xa?2:1),u=[u],g=[g],m.xa){if(i<5){b=7;break}c=u,p=g,v=s,e=null==e||i<5||!(5<=i)||47!=e[r+0]||e[r+4]>>5||(S=[0],_=[0],x=[0],A(C=new w,e,r,i),!me(C,S,_,x))?0:(null!=c&&(c[0]=S[0]),null!=p&&(p[0]=_[0]),null!=v&&(v[0]=x[0]),1)}else{if(i<10){b=7;break}c=g,e=null==e||i<10||!We(e,r+3,i-3)||(p=e[r+0]|e[r+1]<<8|e[r+2]<<16,v=16383&(e[r+7]<<8|e[r+6]),e=16383&(e[r+9]<<8|e[r+8]),1&p||3<(p>>1&7)||!(p>>4&1)||p>>5>=m.Ja||!v||!e)?0:(u&&(u[0]=v),c&&(c[0]=e),1)}if(!e)return 3;if(u=u[0],g=g[0],d&&(h[0]!=u||f[0]!=g))return 3;null!=l&&(l[0]=m,l.offset=r-l.w,t(r-l.w<4294967286),t(l.offset==l.ha-i));break}return 0==b||7==b&&d&&null==l?(null!=s&&(s[0]|=null!=m.na&&0<m.na.length),null!=o&&(o[0]=u),null!=a&&(a[0]=g),0):b}function Mn(e,t,n){var r=t.width,i=t.height,o=0,a=0,s=r,u=i;if(t.Da=null!=e&&0<e.Da,!(t.Da&&(s=e.cd,u=e.bd,o=e.v,a=e.j,n<11||(o&=-2,a&=-2),o<0||a<0||s<=0||u<=0||r<o+s||i<a+u))){if(t.v=o,t.j=a,t.va=o+s,t.o=a+u,t.U=s,t.T=u,t.da=null!=e&&0<e.da,t.da){if(!F(s,u,n=[e.ib],o=[e.hb]))return;t.ib=n[0],t.hb=o[0]}return t.ob=null!=e&&e.ob,t.Kb=null==e||!e.Sd,t.da&&(t.ob=t.ib<3*r/4&&t.hb<3*i/4,t.Kb=0),1}}function jn(e){var t;return null==e?2:(e.S<11?((t=e.f.RGBA).fb+=(e.height-1)*t.A,t.A=-t.A):(t=e.f.kb,e=e.height,t.O+=(e-1)*t.fa,t.fa=-t.fa,t.N+=(e-1>>1)*t.Ab,t.Ab=-t.Ab,t.W+=(e-1>>1)*t.Db,t.Db=-t.Db,null!=t.F&&(t.J+=(e-1)*t.lb,t.lb=-t.lb)),0)}function Nn(e,t,n,r){if(null==r||e<=0||t<=0)return 2;if(null!=n){if(n.Da){var i=n.cd,a=n.bd,s=-2&n.v,u=-2&n.j;if(s<0||u<0||i<=0||a<=0||e<s+i||t<u+a)return 2;e=i,t=a}if(n.da){if(!F(e,t,i=[n.ib],a=[n.hb]))return 2;e=i[0],t=a[0]}}r.width=e,r.height=t;e:{var c,l,h=r.width,f=r.height;if(e=r.S,h<=0||f<=0||!(Mr<=e&&e<13))e=2;else{if(r.Rd<=0&&null==r.sd){s=a=i=t=0;var d=(u=h*Pi[e])*f;if(e<11||(a=(f+1)/2*(t=(h+1)/2),12==e&&(s=(i=h)*f)),null==(f=o(d+2*a+s))){e=1;break e}r.sd=f,e<11?((h=r.f.RGBA).eb=f,h.fb=0,h.A=u,h.size=d):((h=r.f.kb).y=f,h.O=0,h.fa=u,h.Fd=d,h.f=f,h.N=0+d,h.Ab=t,h.Cd=a,h.ea=f,h.W=0+d+a,h.Db=t,h.Ed=a,12==e&&(h.F=f,h.J=0+d+2*a),h.Tc=s,h.lb=i)}t=1,i=r.S,a=r.width,s=r.height,Mr<=i&&i<13?i<11?(e=r.f.RGBA,t=(t=(t&=(u=Math.abs(e.A))*(s-1)+a<=e.size)&u>=a*Pi[i])&null!=e.eb):(e=r.f.kb,u=(a+1)/2,d=(s+1)/2,h=Math.abs(e.fa),f=Math.abs(e.Ab),c=Math.abs(e.Db),l=Math.abs(e.lb),t=(t=(t=(t&=h*(s-1)+a<=e.Fd)&f*(d-1)+u<=e.Cd)&c*(d-1)+u<=e.Ed)&a<=h&u<=f&u<=c,t=(t=(t&=null!=e.y)&null!=e.f)&null!=e.ea,12==i&&(t=(t=t&a<=l&l*(s-1)+a<=e.Tc)&null!=e.F)):t=0,e=t?0:2}}return 0==e&&null!=n&&n.fd?jn(r):e}var Fn=64,Rn=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215],Pn=24,Ln=32,Un=8,zn=[0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7],Hn=(L("Predictor0","PredictorAdd0"),e.Predictor0=function(){return 4278190080},e.Predictor1=function(e){return e},e.Predictor2=function(e,t,n){return t[n+0]},e.Predictor3=function(e,t,n){return t[n+1]},e.Predictor4=function(e,t,n){return t[n-1]},e.Predictor5=function(e,t,n){return z(z(e,t[n+1]),t[n+0])},e.Predictor6=function(e,t,n){return z(e,t[n-1])},e.Predictor7=function(e,t,n){return z(e,t[n+0])},e.Predictor8=function(e,t,n){return z(t[n-1],t[n+0])},e.Predictor9=function(e,t,n){return z(t[n+0],t[n+1])},e.Predictor10=function(e,t,n){return z(z(e,t[n-1]),z(t[n+0],t[n+1]))},e.Predictor11=function(e,t,n){var r=t[n+0];return Q(r>>24&255,e>>24&255,(t=t[n-1])>>24&255)+Q(r>>16&255,e>>16&255,t>>16&255)+Q(r>>8&255,e>>8&255,t>>8&255)+Q(255&r,255&e,255&t)<=0?r:e},e.Predictor12=function(e,t,n){var r=t[n+0];return(H((e>>24&255)+(r>>24&255)-((t=t[n-1])>>24&255))<<24|H((e>>16&255)+(r>>16&255)-(t>>16&255))<<16|H((e>>8&255)+(r>>8&255)-(t>>8&255))<<8|H((255&e)+(255&r)-(255&t)))>>>0},e.Predictor13=function(e,t,n){var r=t[n-1];return($((e=z(e,t[n+0]))>>24&255,r>>24&255)<<24|$(e>>16&255,r>>16&255)<<16|$(e>>8&255,r>>8&255)<<8|$(e>>0&255,r>>0&255))>>>0},e.PredictorAdd0),$n=(e.PredictorAdd1=V,L("Predictor2","PredictorAdd2"),L("Predictor3","PredictorAdd3"),L("Predictor4","PredictorAdd4"),L("Predictor5","PredictorAdd5"),L("Predictor6","PredictorAdd6"),L("Predictor7","PredictorAdd7"),L("Predictor8","PredictorAdd8"),L("Predictor9","PredictorAdd9"),L("Predictor10","PredictorAdd10"),L("Predictor11","PredictorAdd11"),L("Predictor12","PredictorAdd12"),L("Predictor13","PredictorAdd13"),e.PredictorAdd2);K("ColorIndexInverseTransform","MapARGB","32b",(function(e){return e>>8&255}),(function(e){return e})),K("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",(function(e){return e}),(function(e){return e>>8&255}));var Qn,Vn=e.ColorIndexInverseTransform,qn=e.MapARGB,Gn=e.VP8LColorIndexInverseTransformAlpha,Wn=e.MapAlpha,Kn=e.VP8LPredictorsAdd=[];Kn.length=16,(e.VP8LPredictors=[]).length=16,(e.VP8LPredictorsAdd_C=[]).length=16,(e.VP8LPredictors_C=[]).length=16;var Yn,Xn,Jn,Zn,er,tr,nr,rr,ir,or,ar,sr,ur,cr,lr,hr,fr,dr,pr,mr,gr,Ar,vr,br,yr,wr,xr,Cr,kr=o(511),Er=o(2041),Sr=o(225),_r=o(767),Or=0,Tr=Er,Dr=Sr,Br=_r,Ir=kr,Mr=0,jr=1,Nr=2,Fr=3,Rr=4,Pr=5,Lr=6,Ur=7,zr=8,Hr=9,$r=10,Qr=[2,3,7],Vr=[3,3,11],qr=[280,256,256,256,40],Gr=[0,1,1,1,0],Wr=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],Kr=[24,7,23,25,40,6,39,41,22,26,38,42,56,5,55,57,21,27,54,58,37,43,72,4,71,73,20,28,53,59,70,74,36,44,88,69,75,52,60,3,87,89,19,29,86,90,35,45,68,76,85,91,51,61,104,2,103,105,18,30,102,106,34,46,84,92,67,77,101,107,50,62,120,1,119,121,83,93,17,31,100,108,66,78,118,122,33,47,117,123,49,63,99,109,82,94,0,116,124,65,79,16,32,98,110,48,115,125,81,95,64,114,126,97,111,80,113,127,96,112],Yr=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],Xr=8,Jr=[4,5,6,7,8,9,10,10,11,12,13,14,15,16,17,17,18,19,20,20,21,21,22,22,23,23,24,25,25,26,27,28,29,30,31,32,33,34,35,36,37,37,38,39,40,41,42,43,44,45,46,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,76,77,78,79,80,81,82,83,84,85,86,87,88,89,91,93,95,96,98,100,101,102,104,106,108,110,112,114,116,118,122,124,126,128,130,132,134,136,138,140,143,145,148,151,154,157],Zr=[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,119,122,125,128,131,134,137,140,143,146,149,152,155,158,161,164,167,170,173,177,181,185,189,193,197,201,205,209,213,217,221,225,229,234,239,245,249,254,259,264,269,274,279,284],ei=null,ti=[[173,148,140,0],[176,155,140,135,0],[180,157,141,134,130,0],[254,254,243,230,196,177,153,140,133,130,129,0]],ni=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],ri=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],ii=[[[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]],[[253,136,254,255,228,219,128,128,128,128,128],[189,129,242,255,227,213,255,219,128,128,128],[106,126,227,252,214,209,255,255,128,128,128]],[[1,98,248,255,236,226,255,255,128,128,128],[181,133,238,254,221,234,255,154,128,128,128],[78,134,202,247,198,180,255,219,128,128,128]],[[1,185,249,255,243,255,128,128,128,128,128],[184,150,247,255,236,224,128,128,128,128,128],[77,110,216,255,236,230,128,128,128,128,128]],[[1,101,251,255,241,255,128,128,128,128,128],[170,139,241,252,236,209,255,255,128,128,128],[37,116,196,243,228,255,255,255,128,128,128]],[[1,204,254,255,245,255,128,128,128,128,128],[207,160,250,255,238,128,128,128,128,128,128],[102,103,231,255,211,171,128,128,128,128,128]],[[1,152,252,255,240,255,128,128,128,128,128],[177,135,243,255,234,225,128,128,128,128,128],[80,129,211,255,194,224,128,128,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[246,1,255,128,128,128,128,128,128,128,128],[255,128,128,128,128,128,128,128,128,128,128]]],[[[198,35,237,223,193,187,162,160,145,155,62],[131,45,198,221,172,176,220,157,252,221,1],[68,47,146,208,149,167,221,162,255,223,128]],[[1,149,241,255,221,224,255,255,128,128,128],[184,141,234,253,222,220,255,199,128,128,128],[81,99,181,242,176,190,249,202,255,255,128]],[[1,129,232,253,214,197,242,196,255,255,128],[99,121,210,250,201,198,255,202,128,128,128],[23,91,163,242,170,187,247,210,255,255,128]],[[1,200,246,255,234,255,128,128,128,128,128],[109,178,241,255,231,245,255,255,128,128,128],[44,130,201,253,205,192,255,255,128,128,128]],[[1,132,239,251,219,209,255,165,128,128,128],[94,136,225,251,218,190,255,255,128,128,128],[22,100,174,245,186,161,255,199,128,128,128]],[[1,182,249,255,232,235,128,128,128,128,128],[124,143,241,255,227,234,128,128,128,128,128],[35,77,181,251,193,211,255,205,128,128,128]],[[1,157,247,255,236,231,255,255,128,128,128],[121,141,235,255,225,227,255,255,128,128,128],[45,99,188,251,195,217,255,224,128,128,128]],[[1,1,251,255,213,255,128,128,128,128,128],[203,1,248,255,255,128,128,128,128,128,128],[137,1,177,255,224,255,128,128,128,128,128]]],[[[253,9,248,251,207,208,255,192,128,128,128],[175,13,224,243,193,185,249,198,255,255,128],[73,17,171,221,161,179,236,167,255,234,128]],[[1,95,247,253,212,183,255,255,128,128,128],[239,90,244,250,211,209,255,255,128,128,128],[155,77,195,248,188,195,255,255,128,128,128]],[[1,24,239,251,218,219,255,205,128,128,128],[201,51,219,255,196,186,128,128,128,128,128],[69,46,190,239,201,218,255,228,128,128,128]],[[1,191,251,255,255,128,128,128,128,128,128],[223,165,249,255,213,255,128,128,128,128,128],[141,124,248,255,255,128,128,128,128,128,128]],[[1,16,248,255,255,128,128,128,128,128,128],[190,36,230,255,236,255,128,128,128,128,128],[149,1,255,128,128,128,128,128,128,128,128]],[[1,226,255,128,128,128,128,128,128,128,128],[247,192,255,128,128,128,128,128,128,128,128],[240,128,255,128,128,128,128,128,128,128,128]],[[1,134,252,255,255,128,128,128,128,128,128],[213,62,250,255,255,128,128,128,128,128,128],[55,93,255,128,128,128,128,128,128,128,128]],[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]]],[[[202,24,213,235,186,191,220,160,240,175,255],[126,38,182,232,169,184,228,174,255,187,128],[61,46,138,219,151,178,240,170,255,216,128]],[[1,112,230,250,199,191,247,159,255,255,128],[166,109,228,252,211,215,255,174,128,128,128],[39,77,162,232,172,180,245,178,255,255,128]],[[1,52,220,246,198,199,249,220,255,255,128],[124,74,191,243,183,193,250,221,255,255,128],[24,71,130,219,154,170,243,182,255,255,128]],[[1,182,225,249,219,240,255,224,128,128,128],[149,150,226,252,216,205,255,171,128,128,128],[28,108,170,242,183,194,254,223,255,255,128]],[[1,81,230,252,204,203,255,192,128,128,128],[123,102,209,247,188,196,255,233,128,128,128],[20,95,153,243,164,173,255,203,128,128,128]],[[1,222,248,255,216,213,128,128,128,128,128],[168,175,246,252,235,205,255,255,128,128,128],[47,116,215,255,211,212,255,255,128,128,128]],[[1,121,236,253,212,214,255,255,128,128,128],[141,84,213,252,201,202,255,219,128,128,128],[42,80,160,240,162,185,255,205,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[244,1,255,128,128,128,128,128,128,128,128],[238,1,255,128,128,128,128,128,128,128,128]]]],oi=[[[231,120,48,89,115,113,120,152,112],[152,179,64,126,170,118,46,70,95],[175,69,143,80,85,82,72,155,103],[56,58,10,171,218,189,17,13,152],[114,26,17,163,44,195,21,10,173],[121,24,80,195,26,62,44,64,85],[144,71,10,38,171,213,144,34,26],[170,46,55,19,136,160,33,206,71],[63,20,8,114,114,208,12,9,226],[81,40,11,96,182,84,29,16,36]],[[134,183,89,137,98,101,106,165,148],[72,187,100,130,157,111,32,75,80],[66,102,167,99,74,62,40,234,128],[41,53,9,178,241,141,26,8,107],[74,43,26,146,73,166,49,23,157],[65,38,105,160,51,52,31,115,128],[104,79,12,27,217,255,87,17,7],[87,68,71,44,114,51,15,186,23],[47,41,14,110,182,183,21,17,194],[66,45,25,102,197,189,23,18,22]],[[88,88,147,150,42,46,45,196,205],[43,97,183,117,85,38,35,179,61],[39,53,200,87,26,21,43,232,171],[56,34,51,104,114,102,29,93,77],[39,28,85,171,58,165,90,98,64],[34,22,116,206,23,34,43,166,73],[107,54,32,26,51,1,81,43,31],[68,25,106,22,64,171,36,225,114],[34,19,21,102,132,188,16,76,124],[62,18,78,95,85,57,50,48,51]],[[193,101,35,159,215,111,89,46,111],[60,148,31,172,219,228,21,18,111],[112,113,77,85,179,255,38,120,114],[40,42,1,196,245,209,10,25,109],[88,43,29,140,166,213,37,43,154],[61,63,30,155,67,45,68,1,209],[100,80,8,43,154,1,51,26,71],[142,78,78,16,255,128,34,197,171],[41,40,5,102,211,183,4,1,221],[51,50,17,168,209,192,23,25,82]],[[138,31,36,171,27,166,38,44,229],[67,87,58,169,82,115,26,59,179],[63,59,90,180,59,166,93,73,154],[40,40,21,116,143,209,34,39,175],[47,15,16,183,34,223,49,45,183],[46,17,33,183,6,98,15,32,183],[57,46,22,24,128,1,54,17,37],[65,32,73,115,28,128,23,128,205],[40,3,9,115,51,192,18,6,223],[87,37,9,115,59,77,64,21,47]],[[104,55,44,218,9,54,53,130,226],[64,90,70,205,40,41,23,26,57],[54,57,112,184,5,41,38,166,213],[30,34,26,133,152,116,10,32,134],[39,19,53,221,26,114,32,73,255],[31,9,65,234,2,15,1,118,73],[75,32,12,51,192,255,160,43,51],[88,31,35,67,102,85,55,186,85],[56,21,23,111,59,205,45,37,192],[55,38,70,124,73,102,1,34,98]],[[125,98,42,88,104,85,117,175,82],[95,84,53,89,128,100,113,101,45],[75,79,123,47,51,128,81,171,1],[57,17,5,71,102,57,53,41,49],[38,33,13,121,57,73,26,1,85],[41,10,67,138,77,110,90,47,114],[115,21,2,10,102,255,166,23,6],[101,29,16,10,85,128,101,196,26],[57,18,10,102,102,213,34,20,43],[117,20,15,36,163,128,68,1,26]],[[102,61,71,37,34,53,31,243,192],[69,60,71,38,73,119,28,222,37],[68,45,128,34,1,47,11,245,171],[62,17,19,70,146,85,55,62,70],[37,43,37,154,100,163,85,160,1],[63,9,92,136,28,64,32,201,85],[75,15,9,9,64,255,184,119,16],[86,6,28,5,64,255,25,248,1],[56,8,17,132,137,255,55,116,128],[58,15,20,82,135,57,26,121,40]],[[164,50,31,137,154,133,25,35,218],[51,103,44,131,131,123,31,6,158],[86,40,64,135,148,224,45,183,128],[22,26,17,131,240,154,14,1,209],[45,16,21,91,64,222,7,1,197],[56,21,39,155,60,138,23,102,213],[83,12,13,54,192,255,68,47,28],[85,26,85,85,128,128,32,146,171],[18,11,7,63,144,171,4,4,246],[35,27,10,146,174,171,12,26,128]],[[190,80,35,99,180,80,126,54,45],[85,126,47,87,176,51,41,20,32],[101,75,128,139,118,146,116,128,85],[56,41,15,176,236,85,37,9,62],[71,30,17,119,118,255,17,18,138],[101,38,60,138,55,70,43,26,142],[146,36,19,30,171,255,97,27,20],[138,45,61,62,219,1,81,188,64],[32,41,20,117,151,142,20,21,163],[112,19,12,61,195,128,48,4,24]]],ai=[[[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[176,246,255,255,255,255,255,255,255,255,255],[223,241,252,255,255,255,255,255,255,255,255],[249,253,253,255,255,255,255,255,255,255,255]],[[255,244,252,255,255,255,255,255,255,255,255],[234,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255]],[[255,246,254,255,255,255,255,255,255,255,255],[239,253,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[251,255,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[251,254,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,254,253,255,254,255,255,255,255,255,255],[250,255,254,255,254,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[217,255,255,255,255,255,255,255,255,255,255],[225,252,241,253,255,255,254,255,255,255,255],[234,250,241,250,253,255,253,254,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[223,254,254,255,255,255,255,255,255,255,255],[238,253,254,254,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[249,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,255,255,255,255,255,255,255,255,255],[247,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[252,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[186,251,250,255,255,255,255,255,255,255,255],[234,251,244,254,255,255,255,255,255,255,255],[251,251,243,253,254,255,254,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[236,253,254,255,255,255,255,255,255,255,255],[251,253,253,254,254,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[254,254,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[254,254,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[248,255,255,255,255,255,255,255,255,255,255],[250,254,252,254,255,255,255,255,255,255,255],[248,254,249,253,255,255,255,255,255,255,255]],[[255,253,253,255,255,255,255,255,255,255,255],[246,253,253,255,255,255,255,255,255,255,255],[252,254,251,254,254,255,255,255,255,255,255]],[[255,254,252,255,255,255,255,255,255,255,255],[248,254,253,255,255,255,255,255,255,255,255],[253,255,254,254,255,255,255,255,255,255,255]],[[255,251,254,255,255,255,255,255,255,255,255],[245,251,254,255,255,255,255,255,255,255,255],[253,253,254,255,255,255,255,255,255,255,255]],[[255,251,253,255,255,255,255,255,255,255,255],[252,253,254,255,255,255,255,255,255,255,255],[255,254,255,255,255,255,255,255,255,255,255]],[[255,252,255,255,255,255,255,255,255,255,255],[249,255,254,255,255,255,255,255,255,255,255],[255,255,254,255,255,255,255,255,255,255,255]],[[255,255,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]]],si=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],ui=[],ci=[],li=[],hi=1,fi=2,di=[],pi=[],mi=(mn("UpsampleRgbLinePair",wn,3),mn("UpsampleBgrLinePair",xn,3),mn("UpsampleRgbaLinePair",_n,4),mn("UpsampleBgraLinePair",Sn,4),mn("UpsampleArgbLinePair",En,4),mn("UpsampleRgba4444LinePair",kn,2),mn("UpsampleRgb565LinePair",Cn,2),e.UpsampleRgbLinePair),gi=e.UpsampleBgrLinePair,Ai=e.UpsampleRgbaLinePair,vi=e.UpsampleBgraLinePair,bi=e.UpsampleArgbLinePair,yi=e.UpsampleRgba4444LinePair,wi=e.UpsampleRgb565LinePair,xi=16,Ci=1<<xi-1,ki=-227,Ei=482,Si=6,_i=(256<<Si)-1,Oi=0,Ti=o(256),Di=o(256),Bi=o(256),Ii=o(256),Mi=o(Ei-ki),ji=o(Ei-ki),Ni=(On("YuvToRgbRow",wn,3),On("YuvToBgrRow",xn,3),On("YuvToRgbaRow",_n,4),On("YuvToBgraRow",Sn,4),On("YuvToArgbRow",En,4),On("YuvToRgba4444Row",kn,2),On("YuvToRgb565Row",Cn,2),[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396]),Fi=[0,2,8],Ri=[8,7,6,4,4,2,2,2,1,1,1,1],Pi=(this.WebPDecodeRGBA=function(e,n,s,u,c){var l=jr,h=new en,f=new ae,d=((h.ba=f).S=l,f.width=[f.width],f.height=[f.height],f.width),p=f.height,m=new se,g=null==m||null==e?2:(t(null!=m),In(e,n,s,m.width,m.height,m.Pd,m.Qd,m.format,null));if(d=0!=g?0:(null!=d&&(d[0]=m.width[0]),null!=p&&(p[0]=m.height[0]),1)){f.width=f.width[0],f.height=f.height[0],null!=u&&(u[0]=f.width),null!=c&&(c[0]=f.height);e:{if(u=new Ve,(c=new tn).data=e,c.w=n,c.ha=s,c.kd=1,n=[0],t(null!=c),0==(n=e=0!=(e=In(c.data,c.w,c.ha,null,null,null,n,null,c))&&7!=e||!n[0]?e:4)){if(t(null!=h),u.data=c.data,u.w=c.w+c.offset,u.ha=c.ha-c.offset,u.put=de,u.ac=fe,u.bc=pe,u.ma=h,c.xa){if(null==(e=_e())){h=1;break e}if(function(e,n){for(var r=[0],i=[0],o=[0];;){if(null==e)return;if(null==n)return e.a=2,0;if(e.l=n,e.a=0,A(e.m,n.data,n.w,n.ha),!me(e.m,r,i,o)){e.a=3;break}if(e.xb=fi,n.width=r[0],n.height=i[0],Oe(r[0],i[0],1,e,null))return 1;break}return t(0!=e.a),0}(e,u)){if(u=0==(n=Nn(u.width,u.height,h.Oa,h.ba))){t:{for(u=e;;){if(null==u){u=0;break t}if(t(null!=u.s.yc),t(null!=u.s.Ya),t(0<u.s.Wb),t(null!=(s=u.l)),t(null!=(c=s.ma)),0!=u.xb){if(u.ca=c.ba,u.tb=c.tb,t(null!=u.ca),!Mn(c.Oa,s,Fr)){u.a=2;break}if(!Te(u,s.width))break;if(s.da)break;if((s.da||re(u.ca.S))&&pn(),u.ca.S<11||(alert("todo:WebPInitConvertARGBToYUV"),null!=u.ca.f.kb.F&&pn()),u.Pb&&0<u.s.ua&&null==u.s.vb.X&&!M(u.s.vb,u.s.Wa.Xa)){u.a=1;break}u.xb=0}if(!Se(u,u.V,u.Ba,u.c,u.i,s.o,xe))break;c.Dc=u.Ma,u=1;break t}t(0!=u.a),u=0}u=!u}u&&(n=e.a)}else n=e.a}else{if(null==(e=new qe)){h=1;break e}if(e.Fa=c.na,e.P=c.P,e.qc=c.Sa,Ke(e,u)){if(0==(n=Nn(u.width,u.height,h.Oa,h.ba))){if(e.Aa=0,s=h.Oa,t(null!=(c=e)),null!=s){if(0<(d=(d=s.Md)<0?0:100<d?255:255*d/100)){for(p=m=0;p<4;++p)(g=c.pb[p]).lc<12&&(g.ia=d*Ri[g.lc<0?0:g.lc]>>3),m|=g.ia;m&&(alert("todo:VP8InitRandom"),c.ia=1)}c.Ga=s.Id,100<c.Ga?c.Ga=100:c.Ga<0&&(c.Ga=0)}(function(e,n){if(null!=e){if(null==n)return Ge(e,2,"NULL VP8Io parameter in VP8Decode()."),0;if(e.cb||Ke(e,n)){if(t(e.cb),null==n.ac||n.ac(n)){n.ob&&(e.L=0);var s=Fi[e.L];if(2==e.L?(e.yb=0,e.zb=0):(e.yb=n.v-s>>4,e.zb=n.j-s>>4,e.yb<0&&(e.yb=0),e.zb<0&&(e.zb=0)),e.Va=n.o+15+s>>4,e.Hb=n.va+15+s>>4,e.Hb>e.za&&(e.Hb=e.za),e.Va>e.Ub&&(e.Va=e.Ub),0<e.L){var u,c,l=e.ed;for(s=0;s<4;++s)for(e.Qa.Cb?(c=e.Qa.Lb[s],e.Qa.Fb||(c+=l.Tb)):c=l.Tb,u=0;u<=1;++u){var h,f=e.gd[s][u],d=c;l.Pc&&(d+=l.vd[0],u&&(d+=l.od[0])),0<(d=d<0?0:63<d?63:d)?(h=d,(h=0<l.wb&&(h=4<l.wb?h>>2:h>>1)>9-l.wb?9-l.wb:h)<1&&(h=1),f.dd=h,f.tc=2*d+h,f.ld=40<=d?2:15<=d?1:0):f.tc=0,f.La=u}}s=0}else Ge(e,6,"Frame setup failed"),s=e.a;if(s=0==s){if(s){(e.$c=0)<e.Aa||(e.Ic=1);t:{s=e.Ic;l=4*(h=e.za);var p=32*h,m=h+1,g=0<e.L?h*(0<e.Aa?2:1):0,v=(2==e.Aa?2:1)*h;if((f=l+832+(u=3*(16*s+Fi[e.L])/2*p)+(c=null!=e.Fa&&0<e.Fa.length?e.Kc.c*e.Kc.i:0))!=f)s=0;else{if(f>e.Vb){if(e.Vb=0,e.Ec=o(f),e.Fc=0,null==e.Ec){s=Ge(e,1,"no memory during frame initialization.");break t}e.Vb=f}f=e.Ec,d=e.Fc,e.Ac=f,e.Bc=d,d+=l,e.Gd=a(p,He),e.Hd=0,e.rb=a(m+1,Pe),e.sb=1,e.wa=g?a(g,Re):null,e.Y=0,e.D.Nb=0,e.D.wa=e.wa,e.D.Y=e.Y,0<e.Aa&&(e.D.Y+=h),t(!0),e.oc=f,e.pc=d,d+=832,e.ya=a(v,Ue),e.aa=0,e.D.ya=e.ya,e.D.aa=e.aa,2==e.Aa&&(e.D.aa+=h),e.R=16*h,e.B=8*h,h=(p=Fi[e.L])*e.R,p=p/2*e.B,e.sa=f,e.ta=d+h,e.qa=e.sa,e.ra=e.ta+16*s*e.R+p,e.Ha=e.qa,e.Ia=e.ra+8*s*e.B+p,e.$c=0,d+=u,e.mb=c?f:null,e.nb=c?d:null,t(d+c<=e.Fc+e.Vb),Xe(e),i(e.Ac,e.Bc,0,l),s=1}}if(s){if(n.ka=0,n.y=e.sa,n.O=e.ta,n.f=e.qa,n.N=e.ra,n.ea=e.Ha,n.Vd=e.Ia,n.fa=e.R,n.Rc=e.B,n.F=null,n.J=0,!Or){for(s=-255;s<=255;++s)kr[255+s]=s<0?-s:s;for(s=-1020;s<=1020;++s)Er[1020+s]=s<-128?-128:127<s?127:s;for(s=-112;s<=112;++s)Sr[112+s]=s<-16?-16:15<s?15:s;for(s=-255;s<=510;++s)_r[255+s]=s<0?0:255<s?255:s;Or=1}nr=st,rr=rt,or=it,ar=ot,sr=at,ir=nt,ur=qt,cr=Gt,lr=Yt,hr=Xt,fr=Wt,dr=Kt,pr=Jt,mr=Zt,gr=Ut,Ar=zt,vr=Ht,br=$t,ci[0]=xt,ci[1]=ct,ci[2]=yt,ci[3]=wt,ci[4]=Ct,ci[5]=Et,ci[6]=kt,ci[7]=St,ci[8]=Ot,ci[9]=_t,ui[0]=mt,ui[1]=ht,ui[2]=ft,ui[3]=dt,ui[4]=gt,ui[5]=At,ui[6]=vt,li[0]=It,li[1]=lt,li[2]=Tt,li[3]=Dt,li[4]=jt,li[5]=Mt,li[6]=Nt,s=1}else s=0}s=s&&function(e,n){for(e.M=0;e.M<e.Va;++e.M){for(var a=e.Jc[e.M&e.Xb],s=e.m,u=e,c=0;c<u.za;++c){var l=s,h=(v=u).Ac,f=v.Bc+4*c,d=v.zc,p=v.ya[v.aa+c];if(v.Qa.Bb?p.$b=O(l,v.Pa.jb[0])?2+O(l,v.Pa.jb[2]):O(l,v.Pa.jb[1]):p.$b=0,v.kc&&(p.Ad=O(l,v.Bd)),p.Za=+!O(l,145),p.Za)for(var m=p.Ob,g=0,v=0;v<4;++v){for(var b=d[0+v],y=0;y<4;++y){b=oi[h[f+y]][b];for(var w=ri[O(l,b[0])];0<w;)w=ri[2*w+O(l,b[w])];h[f+y]=b=-w}r(m,g,h,f,4),g+=4,d[0+v]=b}else b=O(l,156)?O(l,128)?1:3:O(l,163)?2:0,i(h,f,p.Ob[0]=b,4),i(d,0,b,4);p.Dd=O(l,142)?O(l,114)?O(l,183)?1:3:2:0}if(u.m.Ka)return Ge(e,7,"Premature end-of-partition0 encountered.");for(;e.ja<e.za;++e.ja){if(u=a,l=(s=e).rb[s.sb-1],h=s.rb[s.sb+s.ja],c=s.ya[s.aa+s.ja],f=s.kc?c.Ad:0)l.la=h.la=0,c.Za||(l.Na=h.Na=0),c.Hc=0,c.Gc=0,c.ia=0;else{var x;l=h,h=u,f=s.Pa.Xc,d=s.ya[s.aa+s.ja],p=s.pb[d.$b];if(v=d.ad,g=s.rb[s.sb-1],i(v,m=0,b=y=0,384),d.Za)var k=0,S=f[3];else{w=o(16);var _=l.Na+g.Na;_=ei(h,f[1],_,p.Eb,0,w,0);if(l.Na=g.Na=+(0<_),1<_)nr(w,0,v,m);else{var T=w[0]+3>>3;for(w=0;w<256;w+=16)v[m+w]=T}k=1,S=f[0]}var D=15&l.la,B=15&g.la;for(w=0;w<4;++w){var I=1&B;for(T=x=0;T<4;++T)D=D>>1|(I=(_=ei(h,S,_=I+(1&D),p.Sc,k,v,m))>k)<<7,x=x<<2|(3<_?3:1<_?2:0!=v[m+0]),m+=16;D>>=4,B=B>>1|I<<7,y=(y<<8|x)>>>0}for(S=D,k=B>>4,L=0;L<4;L+=2){for(D=l.la>>4+L,B=g.la>>4+L,w=x=0;w<2;++w){for(I=1&B,T=0;T<2;++T)D=D>>1|(I=0<(_=ei(h,f[2],_=I+(1&D),p.Qc,0,v,m)))<<3,x=x<<2|(3<_?3:1<_?2:0!=v[m+0]),m+=16;D>>=2,B=B>>1|I<<5}b|=x<<4*L,S|=D<<4<<L,k|=(240&B)<<L}l.la=S,g.la=k,d.Hc=y,d.Gc=b,d.ia=43690&b?0:p.ia,f=!(y|b)}if(0<s.L&&(s.wa[s.Y+s.ja]=s.gd[c.$b][c.Za],s.wa[s.Y+s.ja].La|=!f),u.Ka)return Ge(e,7,"Premature end-of-file encountered.")}if(Xe(e),s=n,u=1,c=(a=e).D,l=0<a.L&&a.M>=a.zb&&a.M<=a.Va,0==a.Aa)t:{if(c.M=a.M,c.uc=l,Bn(a,c),c=(x=a.D).Nb,l=(b=Fi[a.L])*a.R,h=b/2*a.B,w=16*c*a.R,T=8*c*a.B,f=a.sa,d=a.ta-l+w,p=a.qa,v=a.ra-h+T,m=a.Ha,g=a.Ia-h+T,B=0==(D=x.M),y=D>=a.Va-(u=1),2==a.Aa&&Bn(a,x),x.uc)for(I=(_=a).D.M,t(_.D.uc),x=_.yb;x<_.Hb;++x){k=x,S=I;var M,j,N,F,R,P=(U=(R=_).D).Nb,L=R.R,U=U.wa[U.Y+k],z=R.sa,H=R.ta+16*P*L+16*k,$=U.dd,Q=U.tc;0!=Q&&(t(3<=Q),1==R.L?(0<k&&Ar(z,H,L,Q+4),U.La&&br(z,H,L,Q),0<S&&gr(z,H,L,Q+4),U.La&&vr(z,H,L,Q)):(M=R.B,j=R.qa,N=R.ra+8*P*M+8*k,F=R.Ha,R=R.Ia+8*P*M+8*k,P=U.ld,0<k&&(cr(z,H,L,Q+4,$,P),hr(j,N,F,R,M,Q+4,$,P)),U.La&&(dr(z,H,L,Q,$,P),mr(j,N,F,R,M,Q,$,P)),0<S&&(ur(z,H,L,Q+4,$,P),lr(j,N,F,R,M,Q+4,$,P)),U.La&&(fr(z,H,L,Q,$,P),pr(j,N,F,R,M,Q,$,P))))}if(a.ia&&alert("todo:DitherRow"),null!=s.put){if(x=16*D,D=16*(D+1),B?(s.y=a.sa,s.O=a.ta+w,s.f=a.qa,s.N=a.ra+T,s.ea=a.Ha,s.W=a.Ia+T):(x-=b,s.y=f,s.O=d,s.f=p,s.N=v,s.ea=m,s.W=g),y||(D-=b),D>s.o&&(D=s.o),s.F=null,(s.J=null)!=a.Fa&&0<a.Fa.length&&x<D&&(s.J=function(e,n,i,a){var s,u=n.width,c=n.o;if(t(null!=e&&null!=n),i<0||a<=0||c<i+a)return null;if(!e.Cc){if(null==e.ga){if(e.ga=new an,(s=null==e.ga)||(s=n.width*n.o,t(0==e.Gb.length),e.Gb=o(s),e.Uc=0,s=!(s=null==e.Gb?0:(e.mb=e.Gb,e.nb=e.Uc,e.rc=null,1))),!s){s=e.ga;var l=e.Fa,h=e.P,f=e.qc,d=e.mb,p=e.nb,m=h+1,g=f-1,v=s.l;if(t(null!=l&&null!=d&&null!=n),di[0]=null,di[1]=sn,di[2]=un,di[3]=cn,s.ca=d,s.tb=p,s.c=n.width,s.i=n.height,t(0<s.c&&0<s.i),f<=1)n=0;else if(s.$a=l[h+0]>>0&3,s.Z=l[h+0]>>2&3,s.Lc=l[h+0]>>4&3,h=l[h+0]>>6&3,s.$a<0||1<s.$a||4<=s.Z||1<s.Lc||h)n=0;else if(v.put=de,v.ac=fe,v.bc=pe,v.ma=s,v.width=n.width,v.height=n.height,v.Da=n.Da,v.v=n.v,v.va=n.va,v.j=n.j,v.o=n.o,s.$a)n:{for(t(1==s.$a),n=_e();;){if(null==n){n=0;break n}if(t(null!=s),(s.mc=n).c=s.c,n.i=s.i,n.l=s.l,n.l.ma=s,n.l.width=s.c,n.l.height=s.i,n.a=0,A(n.m,l,m,g),!Oe(s.c,s.i,1,n,null))break;if(!(n=1==n.ab&&3==n.gc[0].hc&&Ce(n.s)?(s.ic=1,l=n.c*n.i,n.Ta=null,n.Ua=0,n.V=o(l),n.Ba=0,null==n.V?(n.a=1,0):1):(s.ic=0,Te(n,s.c))))break;n=1;break n}s.mc=null,n=0}else n=g>=s.c*s.i;s=!n}if(s)return null;1!=e.ga.Lc?e.Ga=0:a=c-i}t(null!=e.ga),t(i+a<=c);n:{if(n=(l=e.ga).c,c=l.l.o,0==l.$a){if(m=e.rc,g=e.Vc,v=e.Fa,h=e.P+1+i*n,f=e.mb,d=e.nb+i*n,t(h<=e.P+e.qc),0!=l.Z)for(t(null!=di[l.Z]),s=0;s<a;++s)di[l.Z](m,g,v,h,f,d,n),m=f,g=d,d+=n,h+=n;else for(s=0;s<a;++s)r(f,d,v,h,n),m=f,g=d,d+=n,h+=n;e.rc=m,e.Vc=g}else{if(t(null!=l.mc),n=i+a,t(null!=(s=l.mc)),t(n<=s.i),s.C>=n)n=1;else if(l.ic||pn(),l.ic){l=s.V,m=s.Ba,g=s.c;var b=s.i,y=(v=1,h=s.$/g,f=s.$%g,d=s.m,p=s.s,s.$),w=g*b,x=g*n,k=p.wc,S=y<x?ye(p,f,h):null;t(y<=w),t(n<=b),t(Ce(p));r:for(;;){for(;!d.h&&y<x;){if(t(null!=(S=f&k?S:ye(p,f,h))),E(d),(b=ve(S.G[0],S.H[0],d))<256)l[m+y]=b,++y,++f>=g&&(f=0,++h<=n&&!(h%16)&&Ee(s,h));else{if(!(b<280)){v=0;break r}b=ge(b-256,d);var _,O=ve(S.G[4],S.H[4],d);if(E(d),!(y>=(O=Ae(g,O=ge(O,d)))&&b<=w-y)){v=0;break r}for(_=0;_<b;++_)l[m+y+_]=l[m+y+_-O];for(y+=b,f+=b;g<=f;)f-=g,++h<=n&&!(h%16)&&Ee(s,h);y<x&&f&k&&(S=ye(p,f,h))}t(d.h==C(d))}Ee(s,n<h?n:h);break}!v||d.h&&y<w?(v=0,s.a=d.h?5:3):s.$=y,n=v}else n=Se(s,s.V,s.Ba,s.c,s.i,n,De);if(!n){a=0;break n}}c<=i+a&&(e.Cc=1),a=1}if(!a)return null;if(e.Cc&&(null!=(a=e.ga)&&(a.mc=null),e.ga=null,0<e.Ga))return alert("todo:WebPDequantizeLevels"),null}return e.nb+i*u}(a,s,x,D-x),s.F=a.mb,null==s.F&&0==s.F.length)){u=Ge(a,3,"Could not decode alpha data.");break t}x<s.j&&(b=s.j-x,x=s.j,t(!(1&b)),s.O+=a.R*b,s.N+=a.B*(b>>1),s.W+=a.B*(b>>1),null!=s.F&&(s.J+=s.width*b)),x<D&&(s.O+=s.v,s.N+=s.v>>1,s.W+=s.v>>1,null!=s.F&&(s.J+=s.v),s.ka=x-s.j,s.U=s.va-s.v,s.T=D-x,u=s.put(s))}c+1!=a.Ic||y||(r(a.sa,a.ta-l,f,d+16*a.R,l),r(a.qa,a.ra-h,p,v+8*a.B,h),r(a.Ha,a.Ia-h,m,g+8*a.B,h))}if(!u)return Ge(e,6,"Output aborted.")}return 1}(e,n),null!=n.bc&&n.bc(n),s&=1}return s&&(e.cb=0,s)}}})(e,u)||(n=e.a)}}else n=e.a}0==n&&null!=h.Oa&&h.Oa.fd&&(n=jn(h.ba))}h=n}l=0!=h?null:l<11?f.f.RGBA.eb:f.f.kb.y}else l=null;return l},[3,4,3,4,4,2,2,4,4,4,2,1,1])});var l=[0],h=[0],f=[],d=new Ar,p=((A=function(e,t){var n={},r=0,i=!1,o=0,a=0;if(n.frames=[],!
/** @license
           * Copyright (c) 2017 Dominik Homberger
      
        Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
      
        The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
      
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
      
        https://webpjs.appspot.com
        WebPRiffParser dominikhlbg@gmail.com
        */
function(e,t){for(var n=0;n<4;n++)if(e[t+n]!="RIFF".charCodeAt(n))return 1}(e,t)){for(c(e,t+=4),t+=8;t<e.length;){var s,l,h=function(e,t){for(var n="",r=0;r<4;r++)n+=String.fromCharCode(e[t++]);return n}(e,t),f=c(e,t+=4),d=(t+=4,f+(1&f));switch(h){case"VP8 ":case"VP8L":void 0===n.frames[r]&&(n.frames[r]={}),(l=n.frames[r]).src_off=i?a:t-8,l.src_size=o+f+8,r++,i&&(i=!1,a=o=0);break;case"VP8X":(l=n.header={}).feature_flags=e[t];var p=t+4;l.canvas_width=1+u(e,p),p+=3,l.canvas_height=1+u(e,p),p+=3;break;case"ALPH":i=!0,o=d+8,a=t-8;break;case"ANIM":(l=n.header).bgcolor=c(e,t),l.loop_count=e[(s=p=t+4)+0]<<0|e[s+1]<<8,p+=2;break;case"ANMF":(l=n.frames[r]={}).offset_x=2*u(e,t),t+=3,l.offset_y=2*u(e,t),t+=3,l.width=1+u(e,t),t+=3,l.height=1+u(e,t),t+=3,l.duration=u(e,t),t+=3,s=e[t++],l.dispose=1&s,l.blend=s>>1&1}"ANMF"!=h&&(t+=d)}return n}}(e,0)).response=e,A.rgbaoutput=!0,A.dataurl=!1,A.header||null),m=A.frames||null;if(p){p.loop_counter=p.loop_count;l=[p.canvas_height],h=[p.canvas_width];for(var g=0;g<m.length&&0!=m[g].blend;g++);}var A=m[0],v=d.WebPDecodeRGBA(e,A.src_off,A.src_size,h,l);A.rgba=v,A.imgwidth=h[0],A.imgheight=l[0];for(var b=0;b<h[0]*l[0]*4;b++)f[b]=v[b];return this.width=h,this.height=l,this.data=f,this}sr=j.API,ur=function(e,t,n){var r,i,o;return e===t&&t===n||(r=Math.abs(t-n),i=Math.abs(e-n),o=Math.abs(e+t-n-n),r<=i&&r<=o)?e:i<=o?t:n},cr=function(){return[Pr,Lr,Ur,zr,Hr]},lr=function(e){return(e=e.map((function(e){return e.reduce((function(e,t){return e+Math.abs(t)}),0)}))).indexOf(Math.min.apply(null,e))},sr.processPNG=function(e,t,n,r){var i,o,a,s,u,c,l,h,f,d=this.decode.FLATE_DECODE,p="";if(this.__addimage__.isArrayBuffer(e)&&(e=new Uint8Array(e)),this.__addimage__.isArrayBufferView(e)){if(e=(a=new fr(e)).imgData,o=a.bits,i=a.colorSpace,u=a.colors,-1!==[4,6].indexOf(a.colorType)){if(8===a.bits)for(var m,g=(h=new(32==a.pixelBitlength?Uint32Array:16==a.pixelBitlength?Uint16Array:Uint8Array)(a.decodePixels().buffer)).length,A=new Uint8Array(g*a.colors),v=new Uint8Array(g),b=a.pixelBitlength-a.bits,y=0,w=0;y<g;y++){for(f=h[y],m=0;m<b;)A[w++]=f>>>m&255,m+=a.bits;v[y]=f>>>m&255}if(16===a.bits){g=(h=new Uint32Array(a.decodePixels().buffer)).length,A=new Uint8Array(g*(32/a.pixelBitlength)*a.colors),v=new Uint8Array(g*(32/a.pixelBitlength));for(var x=1<a.colors,C=w=y=0;y<g;)f=h[y++],A[w++]=f>>>0&255,x&&(A[w++]=f>>>16&255,f=h[y++],A[w++]=f>>>0&255),v[C++]=f>>>16&255;o=8}r!==sr.image_compression.NONE?(e=Rr(A,a.width*a.colors,a.colors,r),l=Rr(v,a.width,1,r)):(e=A,l=v,d=void 0)}if(3===a.colorType&&(i=this.color_spaces.INDEXED,c=a.palette,a.transparency.indexed)){var k=a.transparency.indexed,E=0;for(y=0,g=k.length;y<g;++y)E+=k[y];if((E/=255)==g-1&&-1!==k.indexOf(0))s=[k.indexOf(0)];else if(E!==g){for(h=a.decodePixels(),v=new Uint8Array(h.length),y=0,g=h.length;y<g;y++)v[y]=k[h[y]];l=Rr(v,a.width,1)}}var S=function(){var e;switch(r){case sr.image_compression.FAST:e=11;break;case sr.image_compression.MEDIUM:e=13;break;case sr.image_compression.SLOW:e=14;break;default:e=12}return e}();return d===this.decode.FLATE_DECODE&&(p="/Predictor "+S+" "),p+="/Colors "+u+" /BitsPerComponent "+o+" /Columns "+a.width,{alias:n,data:e=this.__addimage__.isArrayBuffer(e)||this.__addimage__.isArrayBufferView(e)?this.__addimage__.arrayBufferToBinaryString(e):e,index:t,filter:d,decodeParameters:p,transparency:s,palette:c,sMask:l=l&&this.__addimage__.isArrayBuffer(l)||this.__addimage__.isArrayBufferView(l)?this.__addimage__.arrayBufferToBinaryString(l):l,predictor:S,width:a.width,height:a.height,bitsPerComponent:o,colorSpace:i}}},(ar=j.API).processGIF89A=function(e,t,n,r){var i=(e=new dr(e)).width,o=e.height,a=[];e.decodeAndBlitFrameRGBA(0,a),e={data:a,width:i,height:o},a=new mr(100).encode(e,100);return ar.processJPEG.call(this,a,t,n,r)},ar.processGIF87A=ar.processGIF89A,gr.prototype.parseHeader=function(){if(this.fileSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.reserved=this.datav.getUint32(this.pos,!0),this.pos+=4,this.offset=this.datav.getUint32(this.pos,!0),this.pos+=4,this.headerSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.width=this.datav.getUint32(this.pos,!0),this.pos+=4,this.height=this.datav.getInt32(this.pos,!0),this.pos+=4,this.planes=this.datav.getUint16(this.pos,!0),this.pos+=2,this.bitPP=this.datav.getUint16(this.pos,!0),this.pos+=2,this.compress=this.datav.getUint32(this.pos,!0),this.pos+=4,this.rawSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.hr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.vr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.colors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.importantColors=this.datav.getUint32(this.pos,!0),this.pos+=4,16===this.bitPP&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var e=0===this.colors?1<<this.bitPP:this.colors;this.palette=new Array(e);for(var t=0;t<e;t++){var n=this.datav.getUint8(this.pos++,!0),r=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0);this.palette[t]={red:i,green:r,blue:n,quad:o}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},gr.prototype.parseBGR=function(){this.pos=this.offset;try{var e="bit"+this.bitPP,t=this.width*this.height*4;this.data=new Uint8Array(t),this[e]()}catch(e){s.log("bit decode error:"+e)}},gr.prototype.bit1=function(){for(var e=Math.ceil(this.width/8),t=e%4,n=this.height-1;0<=n;n--){for(var r=this.bottom_up?n:this.height-1-n,i=0;i<e;i++)for(var o=this.datav.getUint8(this.pos++,!0),a=r*this.width*4+8*i*4,s=0;s<8&&8*i+s<this.width;s++){var u=this.palette[o>>7-s&1];this.data[a+4*s]=u.blue,this.data[a+4*s+1]=u.green,this.data[a+4*s+2]=u.red,this.data[a+4*s+3]=255}0!=t&&(this.pos+=4-t)}},gr.prototype.bit4=function(){for(var e=Math.ceil(this.width/2),t=e%4,n=this.height-1;0<=n;n--){for(var r=this.bottom_up?n:this.height-1-n,i=0;i<e;i++){var o=this.datav.getUint8(this.pos++,!0),a=r*this.width*4+2*i*4,s=15&o;o=this.palette[o>>4];if(this.data[a]=o.blue,this.data[1+a]=o.green,this.data[2+a]=o.red,this.data[3+a]=255,2*i+1>=this.width)break;o=this.palette[s],this.data[4+a]=o.blue,this.data[4+a+1]=o.green,this.data[4+a+2]=o.red,this.data[4+a+3]=255}0!=t&&(this.pos+=4-t)}},gr.prototype.bit8=function(){for(var e=this.width%4,t=this.height-1;0<=t;t--){for(var n=this.bottom_up?t:this.height-1-t,r=0;r<this.width;r++){var i=this.datav.getUint8(this.pos++,!0),o=n*this.width*4+4*r;i<this.palette.length?(i=this.palette[i],this.data[o]=i.red,this.data[1+o]=i.green,this.data[2+o]=i.blue):(this.data[o]=255,this.data[1+o]=255,this.data[2+o]=255),this.data[3+o]=255}0!=e&&(this.pos+=4-e)}},gr.prototype.bit15=function(){for(var e=this.width%3,t=parseInt("11111",2),n=this.height-1;0<=n;n--){for(var r=this.bottom_up?n:this.height-1-n,i=0;i<this.width;i++){var o=this.datav.getUint16(this.pos,!0),a=(this.pos+=2,(o&t)/t*255|0),s=(o>>5&t)/t*255|0,u=o>>15?255:0,c=r*this.width*4+4*i;this.data[c]=(o>>10&t)/t*255|0,this.data[1+c]=s,this.data[2+c]=a,this.data[3+c]=u}this.pos+=e}},gr.prototype.bit16=function(){for(var e=this.width%3,t=parseInt("11111",2),n=parseInt("111111",2),r=this.height-1;0<=r;r--){for(var i=this.bottom_up?r:this.height-1-r,o=0;o<this.width;o++){var a=this.datav.getUint16(this.pos,!0),s=(this.pos+=2,(a&t)/t*255|0),u=(a>>5&n)/n*255|0,c=i*this.width*4+4*o;this.data[c]=(a>>11)/t*255|0,this.data[1+c]=u,this.data[2+c]=s,this.data[3+c]=255}this.pos+=e}},gr.prototype.bit24=function(){for(var e=this.height-1;0<=e;e--){for(var t=this.bottom_up?e:this.height-1-e,n=0;n<this.width;n++){var r=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),a=t*this.width*4+4*n;this.data[a]=o,this.data[1+a]=i,this.data[2+a]=r,this.data[3+a]=255}this.pos+=this.width%4}},gr.prototype.bit32=function(){for(var e=this.height-1;0<=e;e--)for(var t=this.bottom_up?e:this.height-1-e,n=0;n<this.width;n++){var r=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),s=t*this.width*4+4*n;this.data[s]=o,this.data[1+s]=i,this.data[2+s]=r,this.data[3+s]=a}},gr.prototype.getData=function(){return this.data},
/**
     * @license
     * Copyright (c) 2018 Aras Abbasi
     *
     * Licensed under the MIT License.
     * http://opensource.org/licenses/mit-license
     */(or=j.API).processBMP=function(e,t,n,r){var i=(e=new gr(e,!1)).width,o=e.height;e={data:e.getData(),width:i,height:o},i=new mr(100).encode(e,100);return or.processJPEG.call(this,i,t,n,r)},Ar.prototype.getData=function(){return this.data},
/**
     * @license
     * Copyright (c) 2019 Aras Abbasi
     *
     * Licensed under the MIT License.
     * http://opensource.org/licenses/mit-license
     */(ir=j.API).processWEBP=function(e,t,n,r){var i=(e=new Ar(e,!1)).width,o=e.height;e={data:e.getData(),width:i,height:o},i=new mr(100).encode(e,100);return ir.processJPEG.call(this,i,t,n,r)},j.API.setLanguage=function(e){return void 0===this.internal.languageSettings&&(this.internal.languageSettings={},this.internal.languageSettings.isSubscribed=!1),void 0!=={af:"Afrikaans",sq:"Albanian",ar:"Arabic (Standard)","ar-DZ":"Arabic (Algeria)","ar-BH":"Arabic (Bahrain)","ar-EG":"Arabic (Egypt)","ar-IQ":"Arabic (Iraq)","ar-JO":"Arabic (Jordan)","ar-KW":"Arabic (Kuwait)","ar-LB":"Arabic (Lebanon)","ar-LY":"Arabic (Libya)","ar-MA":"Arabic (Morocco)","ar-OM":"Arabic (Oman)","ar-QA":"Arabic (Qatar)","ar-SA":"Arabic (Saudi Arabia)","ar-SY":"Arabic (Syria)","ar-TN":"Arabic (Tunisia)","ar-AE":"Arabic (U.A.E.)","ar-YE":"Arabic (Yemen)",an:"Aragonese",hy:"Armenian",as:"Assamese",ast:"Asturian",az:"Azerbaijani",eu:"Basque",be:"Belarusian",bn:"Bengali",bs:"Bosnian",br:"Breton",bg:"Bulgarian",my:"Burmese",ca:"Catalan",ch:"Chamorro",ce:"Chechen",zh:"Chinese","zh-HK":"Chinese (Hong Kong)","zh-CN":"Chinese (PRC)","zh-SG":"Chinese (Singapore)","zh-TW":"Chinese (Taiwan)",cv:"Chuvash",co:"Corsican",cr:"Cree",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch (Standard)","nl-BE":"Dutch (Belgian)",en:"English","en-AU":"English (Australia)","en-BZ":"English (Belize)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-JM":"English (Jamaica)","en-NZ":"English (New Zealand)","en-PH":"English (Philippines)","en-ZA":"English (South Africa)","en-TT":"English (Trinidad & Tobago)","en-GB":"English (United Kingdom)","en-US":"English (United States)","en-ZW":"English (Zimbabwe)",eo:"Esperanto",et:"Estonian",fo:"Faeroese",fj:"Fijian",fi:"Finnish",fr:"French (Standard)","fr-BE":"French (Belgium)","fr-CA":"French (Canada)","fr-FR":"French (France)","fr-LU":"French (Luxembourg)","fr-MC":"French (Monaco)","fr-CH":"French (Switzerland)",fy:"Frisian",fur:"Friulian",gd:"Gaelic (Scots)","gd-IE":"Gaelic (Irish)",gl:"Galacian",ka:"Georgian",de:"German (Standard)","de-AT":"German (Austria)","de-DE":"German (Germany)","de-LI":"German (Liechtenstein)","de-LU":"German (Luxembourg)","de-CH":"German (Switzerland)",el:"Greek",gu:"Gujurati",ht:"Haitian",he:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",iu:"Inuktitut",ga:"Irish",it:"Italian (Standard)","it-CH":"Italian (Switzerland)",ja:"Japanese",kn:"Kannada",ks:"Kashmiri",kk:"Kazakh",km:"Khmer",ky:"Kirghiz",tlh:"Klingon",ko:"Korean","ko-KP":"Korean (North Korea)","ko-KR":"Korean (South Korea)",la:"Latin",lv:"Latvian",lt:"Lithuanian",lb:"Luxembourgish",mk:"FYRO Macedonian",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi",mo:"Moldavian",nv:"Navajo",ng:"Ndonga",ne:"Nepali",no:"Norwegian",nb:"Norwegian (Bokmal)",nn:"Norwegian (Nynorsk)",oc:"Occitan",or:"Oriya",om:"Oromo",fa:"Persian","fa-IR":"Persian/Iran",pl:"Polish",pt:"Portuguese","pt-BR":"Portuguese (Brazil)",pa:"Punjabi","pa-IN":"Punjabi (India)","pa-PK":"Punjabi (Pakistan)",qu:"Quechua",rm:"Rhaeto-Romanic",ro:"Romanian","ro-MO":"Romanian (Moldavia)",ru:"Russian","ru-MO":"Russian (Moldavia)",sz:"Sami (Lappish)",sg:"Sango",sa:"Sanskrit",sc:"Sardinian",sd:"Sindhi",si:"Singhalese",sr:"Serbian",sk:"Slovak",sl:"Slovenian",so:"Somani",sb:"Sorbian",es:"Spanish","es-AR":"Spanish (Argentina)","es-BO":"Spanish (Bolivia)","es-CL":"Spanish (Chile)","es-CO":"Spanish (Colombia)","es-CR":"Spanish (Costa Rica)","es-DO":"Spanish (Dominican Republic)","es-EC":"Spanish (Ecuador)","es-SV":"Spanish (El Salvador)","es-GT":"Spanish (Guatemala)","es-HN":"Spanish (Honduras)","es-MX":"Spanish (Mexico)","es-NI":"Spanish (Nicaragua)","es-PA":"Spanish (Panama)","es-PY":"Spanish (Paraguay)","es-PE":"Spanish (Peru)","es-PR":"Spanish (Puerto Rico)","es-ES":"Spanish (Spain)","es-UY":"Spanish (Uruguay)","es-VE":"Spanish (Venezuela)",sx:"Sutu",sw:"Swahili",sv:"Swedish","sv-FI":"Swedish (Finland)","sv-SV":"Swedish (Sweden)",ta:"Tamil",tt:"Tatar",te:"Teluga",th:"Thai",tig:"Tigre",ts:"Tsonga",tn:"Tswana",tr:"Turkish",tk:"Turkmen",uk:"Ukrainian",hsb:"Upper Sorbian",ur:"Urdu",ve:"Venda",vi:"Vietnamese",vo:"Volapuk",wa:"Walloon",cy:"Welsh",xh:"Xhosa",ji:"Yiddish",zu:"Zulu"}[e]&&(this.internal.languageSettings.languageCode=e,!1===this.internal.languageSettings.isSubscribed&&(this.internal.events.subscribe("putCatalog",(function(){this.internal.write("/Lang ("+this.internal.languageSettings.languageCode+")")})),this.internal.languageSettings.isSubscribed=!0)),this
/** @license
     * MIT license.
     * Copyright (c) 2012 Willow Systems Corporation, willow-systems.com
     *               2014 Diego Casorran, https://github.com/diegocr
     *
     * Permission is hereby granted, free of charge, to any person obtaining
     * a copy of this software and associated documentation files (the
     * "Software"), to deal in the Software without restriction, including
     * without limitation the rights to use, copy, modify, merge, publish,
     * distribute, sublicense, and/or sell copies of the Software, and to
     * permit persons to whom the Software is furnished to do so, subject to
     * the following conditions:
     *
     * The above copyright notice and this permission notice shall be
     * included in all copies or substantial portions of the Software.
     *
     * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
     * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
     * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
     * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
     * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
     * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
     * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
     * ====================================================================
     */},Yn=j.API,Xn=Yn.getCharWidthsArray=function(e,t){for(var n,r,i=(t=t||{}).font||this.internal.getFont(),a=t.fontSize||this.internal.getFontSize(),s=t.charSpace||this.internal.getCharSpace(),u=t.widths||i.metadata.Unicode.widths,c=u.fof||1,l=t.kerning||i.metadata.Unicode.kerning,h=l.fof||1,f=!1!==t.doKerning,d=e.length,p=0,m=u[0]||c,g=[],A=0;A<d;A++)n=e.charCodeAt(A),"function"==typeof i.metadata.widthOfString?g.push((i.metadata.widthOfGlyph(i.metadata.characterToGlyph(n))+s*(1e3/a)||0)/1e3):(r=f&&"object"==o(l[n])&&!isNaN(parseInt(l[n][p],10))?l[n][p]/h:0,g.push((u[n]||m)/c+r)),p=n;return g},Jn=Yn.getStringUnitWidth=function(e,t){var n=(t=t||{}).fontSize||this.internal.getFontSize(),r=t.font||this.internal.getFont();t=t.charSpace||this.internal.getCharSpace();return Yn.processArabic&&(e=Yn.processArabic(e)),"function"==typeof r.metadata.widthOfString?r.metadata.widthOfString(e,n,t)/n:Xn.apply(this,arguments).reduce((function(e,t){return e+t}),0)},Zn=function(e,t,n,r){for(var i=[],o=0,a=e.length,s=0;o!==a&&s+t[o]<n;)s+=t[o],o++;i.push(e.slice(0,o));var u=o;for(s=0;o!==a;)s+t[o]>r&&(i.push(e.slice(u,o)),s=0,u=o),s+=t[o],o++;return u!==o&&i.push(e.slice(u,o)),i},er=function(e,t,n){var r,i,o,a,s,u,c,l=[],h=[l],f=(n=n||{}).textIndent||0,d=0,p=0,m=e.split(" "),g=Xn.apply(this,[" ",n])[0];for((s=-1===n.lineIndent?m[0].length+2:n.lineIndent||0)&&(u=Array(s).join(" "),c=[],m.map((function(e){1<(e=e.split(/\s*\n/)).length?c=c.concat(e.map((function(e,t){return(t&&e.length?"\n":"")+e}))):c.push(e[0])})),m=c,s=Jn.apply(this,[u,n])),i=0,o=m.length;i<o;i++){var A=0,v=m[i];if(s&&"\n"==v[0]&&(v=v.substr(1),A=1),f+d+(p=(r=Xn.apply(this,[v,n])).reduce((function(e,t){return e+t}),0))>t||A){if(t<p){for(a=Zn.apply(this,[v,r,t-(f+d),t]),l.push(a.shift()),l=[a.pop()];a.length;)h.push([a.shift()]);p=r.slice(v.length-(l[0]?l[0].length:0)).reduce((function(e,t){return e+t}),0)}else l=[v];h.push(l),f=p+s}else l.push(v),f+=d+p;d=g}return h.map(s?function(e,t){return(t?u:"")+e.join(" ")}:function(e){return e.join(" ")})},Yn.splitTextToSize=function(e,t,n){var r=(n=n||{}).fontSize||this.internal.getFontSize(),i=function(e){return e.widths&&e.kerning?{widths:e.widths,kerning:e.kerning}:(e=this.internal.getFont(e.fontName,e.fontStyle)).metadata.Unicode?{widths:e.metadata.Unicode.widths||{0:1},kerning:e.metadata.Unicode.kerning||{}}:{font:e.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}.call(this,n),o=Array.isArray(e)?e:String(e).split(/\r?\n/),a=+this.internal.scaleFactor*t/r;i.textIndent=n.textIndent?+n.textIndent*this.internal.scaleFactor/r:0,i.lineIndent=n.lineIndent;for(var s=[],u=0,c=o.length;u<c;u++)s=s.concat(er.apply(this,[o[u],a,i]));return s},(hr=j.API).__fontmetrics__=hr.__fontmetrics__||{};for(var vr="klmnopqrstuvwxyz",br={},yr={},wr=0;wr<vr.length;wr++)br[vr[wr]]="0123456789abcdef"[wr],yr["0123456789abcdef"[wr]]=vr[wr];function xr(e){return"0x"+parseInt(e,10).toString(16)}var Cr,kr=hr.__fontmetrics__.compress=function(e){var t,n,r,i,a=["{"];for(i in e){if(t=e[i],n=isNaN(parseInt(i,10))?"'"+i+"'":(n=xr(i=parseInt(i,10)).slice(2)).slice(0,-1)+yr[n.slice(-1)],"number"==typeof t)r=(t<0?(r=xr(t).slice(3),"-"):(r=xr(t).slice(2),""))+r.slice(0,-1)+yr[r.slice(-1)];else{if("object"!=o(t))throw new Error("Don't know what to do with value type "+o(t)+".");r=kr(t)}a.push(n+r)}return a.push("}"),a.join("")},Er={Unicode:{Courier:Dr={codePages:["WinAnsiEncoding"],WinAnsiEncoding:(Cr=hr.__fontmetrics__.uncompress=function(e){if("string"!=typeof e)throw new Error("Invalid argument passed to uncompress.");for(var t,n,r,i,o={},a=1,s=o,u=[],c="",l="",h=e.length-1,f=1;f<h;f+=1)"'"==(i=e[f])?t=t?void(r=t.join("")):[]:t?t.push(i):"{"==i?(u.push([s,r]),s={},r=void 0):"}"==i?((n=u.pop())[0][n[1]]=s,r=void 0,s=n[0]):"-"==i?a=-1:void 0===r?br.hasOwnProperty(i)?(c+=br[i],r=parseInt(c,16)*a,a=1,c=""):c+=i:br.hasOwnProperty(i)?(l+=br[i],s[r]=parseInt(l,16)*a,a=1,r=void 0,l=""):l+=i;return o})("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},"Courier-Bold":Dr,"Courier-BoldOblique":Dr,"Courier-Oblique":Dr,Helvetica:Dr,"Helvetica-Bold":Dr,"Helvetica-BoldOblique":Dr,"Helvetica-Oblique":Dr,"Times-Roman":Dr,"Times-Bold":Dr,"Times-BoldItalic":Dr,"Times-Italic":Dr}},Sr={Unicode:{"Courier-Oblique":Cr("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":Cr("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":Cr("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),Courier:Cr("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":Cr("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":Cr("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),Symbol:Cr("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:Cr("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),"Helvetica-BoldOblique":Cr("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),ZapfDingbats:Cr("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":Cr("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":Cr("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),"Times-Roman":Cr("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),"Helvetica-Oblique":Cr("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}},_r=(hr.events.push(["addFont",function(e){var t;e=e.font;(t=((t=Sr.Unicode[e.postScriptName])&&(e.metadata.Unicode={},e.metadata.Unicode.widths=t.widths,e.metadata.Unicode.kerning=t.kerning),Er.Unicode[e.postScriptName]))&&(e.metadata.Unicode.encoding=t,e.encoding=t.codePages[0])}]),
/**
     * @license
     * Licensed under the MIT License.
     * http://opensource.org/licenses/mit-license
     */(rr=j).API.events.push(["addFont",function(e){var t=e.font;e=e.instance;if(!t.isStandardFont){if(void 0===e)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+t.postScriptName+"').");if("string"!=typeof(e=!1===e.existsFileInVFS(t.postScriptName)?e.loadFile(t.postScriptName):e.getFileFromVFS(t.postScriptName)))throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+t.postScriptName+"').");t=t,e=/^\x00\x01\x00\x00/.test(e=e)?Fr(e):Fr(y(e)),t.metadata=rr.API.TTFFont.open(e),t.metadata.Unicode=t.metadata.Unicode||{encoding:{},kerning:{},widths:[]},t.metadata.glyIdsUsed=[0]}}]),j.API.addSvgAsImage=function(r,a,u,c,l,h,f,d){if(isNaN(a)||isNaN(u))throw s.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(c)||isNaN(l))throw s.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var p=document.createElement("canvas"),m=(p.width=c,p.height=l,p.getContext("2d")),g=(m.fillStyle="#fff",m.fillRect(0,0,p.width,p.height),{ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0}),A=this;return(i.canvg?Promise.resolve(i.canvg):"object"==o(t)&&void 0!==e?new Promise((function(e,t){try{e(n(244))}catch(e){t(e)}})):new Promise((function(e,t){try{Promise.resolve().then(function(){var t=[n(244)];e.apply(null,t)}.bind(this)).catch(n.oe)}catch(e){t(e)}}))).catch((function(e){return Promise.reject(new Error("Could not load canvg: "+e))})).then((function(e){return e.default||e})).then((function(e){return e.fromString(m,r,g)}),(function(){return Promise.reject(new Error("Could not load canvg."))})).then((function(e){return e.render(g)})).then((function(){A.addImage(p.toDataURL("image/jpeg",1),a,u,c,l,f,d)}))},j.API.putTotalPages=function(e){for(var t,n=parseInt(this.internal.getFont().id.substr(1),10)<15?(t=new RegExp(e,"g"),this.internal.getNumberOfPages()):(t=new RegExp(this.pdfEscape16(e,this.internal.getFont()),"g"),this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont())),r=1;r<=this.internal.getNumberOfPages();r++)for(var i=0;i<this.internal.pages[r].length;i++)this.internal.pages[r][i]=this.internal.pages[r][i].replace(t,n);return this},j.API.viewerPreferences=function(e,t){var n;e=e||{},t=t||!1;var r,i,a,s={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},u=Object.keys(s),c=[],l=0,h=0,f=0;function d(e,t){for(var n=!1,r=0;r<e.length;r+=1)e[r]===t&&(n=!0);return n}if(void 0===this.internal.viewerpreferences&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(s)),this.internal.viewerpreferences.isSubscribed=!1),n=this.internal.viewerpreferences.configuration,"reset"===e||!0===t){var p=u.length;for(f=0;f<p;f+=1)n[u[f]].value=n[u[f]].defaultValue,n[u[f]].explicitSet=!1}if("object"==o(e))for(i in e)if(a=e[i],d(u,i)&&void 0!==a){if("boolean"===n[i].type&&"boolean"==typeof a)n[i].value=a;else if("name"===n[i].type&&d(n[i].valueSet,a))n[i].value=a;else if("integer"===n[i].type&&Number.isInteger(a))n[i].value=a;else if("array"===n[i].type){for(l=0;l<a.length;l+=1)if(r=!0,1===a[l].length&&"number"==typeof a[l][0])c.push(String(a[l]-1));else if(1<a[l].length){for(h=0;h<a[l].length;h+=1)"number"!=typeof a[l][h]&&(r=!1);!0===r&&c.push([a[l][0]-1,a[l][1]-1].join(" "))}n[i].value="["+c.join(" ")+"]"}else n[i].value=n[i].defaultValue;n[i].explicitSet=!0}return!1===this.internal.viewerpreferences.isSubscribed&&(this.internal.events.subscribe("putCatalog",(function(){var e,t=[];for(e in n)!0===n[e].explicitSet&&("name"===n[e].type?t.push("/"+e+" /"+n[e].value):t.push("/"+e+" "+n[e].value));0!==t.length&&this.internal.write("/ViewerPreferences\n<<\n"+t.join("\n")+"\n>>")})),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=n,this},j.API.addMetadata=function(e,t){return void 0===this.internal.__metadata__&&(this.internal.__metadata__={metadata:e,namespaceuri:t||"http://jspdf.default.namespaceuri/"},this.internal.events.subscribe("putCatalog",Nr),this.internal.events.subscribe("postPutResources",jr)),this},j);function Or(e){var t,n,r,i,o,a,s="/CIDInit /ProcSet findresource begin\n12 dict begin\nbegincmap\n/CIDSystemInfo <<\n  /Registry (Adobe)\n  /Ordering (UCS)\n  /Supplement 0\n>> def\n/CMapName /Adobe-Identity-UCS def\n/CMapType 2 def\n1 begincodespacerange\n<0000><ffff>\nendcodespacerange";for(r=[],o=0,a=(n=Object.keys(e).sort((function(e,t){return e-t}))).length;o<a;o++)t=n[o],100<=r.length&&(s+="\n"+r.length+" beginbfchar\n"+r.join("\n")+"\nendbfchar",r=[]),void 0!==e[t]&&null!==e[t]&&"function"==typeof e[t].toString&&(i=("0000"+e[t].toString(16)).slice(-4),t=("0000"+(+t).toString(16)).slice(-4),r.push("<"+t+"><"+i+">"));return r.length&&(s+="\n"+r.length+" beginbfchar\n"+r.join("\n")+"\nendbfchar\n"),s+"endcmap\nCMapName currentdict /CMap defineresource pop\nend\nend"}function Tr(e){var t,n=e.text||"",r=e.x,i=e.y,o=e.options||{},a=(e=e.mutex||{}).pdfEscape,s=e.activeFontKey,u=e.fonts,c=s,l="",h=0,f="",d=u[c].encoding;if("Identity-H"!==u[c].encoding)return{text:n,x:r,y:i,options:o,mutex:e};for(f=n,c=s,Array.isArray(n)&&(f=n[0]),h=0;h<f.length;h+=1)(t=u[c].metadata.hasOwnProperty("cmap")?u[c].metadata.cmap.unicode.codeMap[f[h].charCodeAt(0)]:t)||f[h].charCodeAt(0)<256&&u[c].metadata.hasOwnProperty("Unicode")?l+=f[h]:l+="";return s="",parseInt(c.slice(1))<14||"WinAnsiEncoding"===d?s=a(l,c).split("").map((function(e){return e.charCodeAt(0).toString(16)})).join(""):"Identity-H"===d&&(s=Br(l,u[c])),e.isHex=!0,{text:s,x:r,y:i,options:o,mutex:e}}var Dr,Br=(Dr=_r.API).pdfEscape16=function(e,t){for(var n,r=t.metadata.Unicode.widths,i=["","0","00","000","0000"],o=[""],a=0,s=e.length;a<s;++a){if(n=t.metadata.characterToGlyph(e.charCodeAt(a)),t.metadata.glyIdsUsed.push(n),t.metadata.toUnicode[n]=e.charCodeAt(a),-1==r.indexOf(n)&&(r.push(n),r.push([parseInt(t.metadata.widthOfGlyph(n),10)])),"0"==n)return o.join("");n=n.toString(16),o.push(i[4-n.length],n)}return o.join("")};function Ir(e){if(this.rawData=e,e=this.contents=new Gr(e),this.contents.pos=4,"ttcf"===e.readString(4))throw new Error("TTCF not supported.");e.pos=0,this.parse(),this.subset=new li(this),this.registerTTF()}function Mr(){return void 0===this.internal.vFS&&(this.internal.vFS={}),!0}function jr(){var e='<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:jspdf="'+this.internal.__metadata__.namespaceuri+'"><jspdf:metadata>',t=unescape(encodeURIComponent('<x:xmpmeta xmlns:x="adobe:ns:meta/">')),n=(e=unescape(encodeURIComponent(e)),unescape(encodeURIComponent(this.internal.__metadata__.metadata))),r=unescape(encodeURIComponent("</jspdf:metadata></rdf:Description></rdf:RDF>")),i=unescape(encodeURIComponent("</x:xmpmeta>")),o=e.length+n.length+r.length+t.length+i.length;this.internal.__metadata__.metadata_object_number=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+o+" >>"),this.internal.write("stream"),this.internal.write(t+e+n+r+i),this.internal.write("endstream"),this.internal.write("endobj")}function Nr(){this.internal.__metadata__.metadata_object_number&&this.internal.write("/Metadata "+this.internal.__metadata__.metadata_object_number+" 0 R")}function Fr(e){for(var t=e.length,n=new Uint8Array(t),r=0;r<t;r++)n[r]=e.charCodeAt(r);return n}function Rr(e,t,n,r){var i=4,o=Ur;switch(r){case sr.image_compression.FAST:i=1,o=Lr;break;case sr.image_compression.MEDIUM:i=6,o=zr;break;case sr.image_compression.SLOW:i=9,o=Hr}return r=Qn(e=function(e,t,n,r){for(var i,o,a,s=e.length/t,u=new Uint8Array(e.length+s),c=cr(),l=0;l<s;l+=1){if(i=e.subarray(a=l*t,a+t),r)u.set(r(i,n,o),a+l);else{for(var h,f=c.length,d=[];h<f;h+=1)d[h]=c[h](i,n,o);var p=lr(d.concat());u.set(d[p],a+l)}o=i}return u}(e,t,n,o),{level:i}),sr.__addimage__.arrayBufferToBinaryString(r)}function Pr(e){return(e=Array.apply([],e)).unshift(0),e}function Lr(e,t){var n,r=[],i=e.length;r[0]=1;for(var o=0;o<i;o+=1)n=e[o-t]||0,r[o+1]=e[o]-n+256&255;return r}function Ur(e,t,n){var r,i=[],o=e.length;i[0]=2;for(var a=0;a<o;a+=1)r=n&&n[a]||0,i[a+1]=e[a]-r+256&255;return i}function zr(e,t,n){var r,i,o=[],a=e.length;o[0]=3;for(var s=0;s<a;s+=1)r=e[s-t]||0,i=n&&n[s]||0,o[s+1]=e[s]+256-(r+i>>>1)&255;return o}function Hr(e,t,n){var r,i,o,a=[],s=e.length;a[0]=4;for(var u=0;u<s;u+=1)o=e[u-t]||0,r=n&&n[u]||0,i=n&&n[u-t]||0,o=ur(o,r,i),a[u+1]=e[u]-o+256&255;return a}function $r(e,t){for(var n in t)Kr.call(t,n)&&(e[n]=t[n]);function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype}function Qr(e,t){this.raw=e,this.length=e.length,this.platformID=t.platformID,this.encodingID=t.encodingID,this.languageID=t.languageID}Dr.events.push(["putFont",function(e){var t=e.font,n=e.out,r=e.newObject,i=e.putStream;e=e.pdfEscapeWithNeededParanthesis;if(t.metadata instanceof _r.API.TTFFont&&"Identity-H"===t.encoding){for(var o=t.metadata.Unicode.widths,a=t.metadata.subset.encode(t.metadata.glyIdsUsed,1),s="",u=0;u<a.length;u++)s+=String.fromCharCode(a[u]);var c=(i({data:s,addLength1:!0,objectId:l=r()}),n("endobj"),r()),l=(i=(i({data:Or(t.metadata.toUnicode),addLength1:!0,objectId:c}),n("endobj"),r()),n("<<"),n("/Type /FontDescriptor"),n("/FontName /"+e(t.fontName)),n("/FontFile2 "+l+" 0 R"),n("/FontBBox "+_r.API.PDFObject.convert(t.metadata.bbox)),n("/Flags "+t.metadata.flags),n("/StemV "+t.metadata.stemV),n("/ItalicAngle "+t.metadata.italicAngle),n("/Ascent "+t.metadata.ascender),n("/Descent "+t.metadata.decender),n("/CapHeight "+t.metadata.capHeight),n(">>"),n("endobj"),r());n("<<"),n("/Type /Font"),n("/BaseFont /"+e(t.fontName)),n("/FontDescriptor "+i+" 0 R"),n("/W "+_r.API.PDFObject.convert(o)),n("/CIDToGIDMap /Identity"),n("/DW 1000"),n("/Subtype /CIDFontType2"),n("/CIDSystemInfo"),n("<<"),n("/Supplement 0"),n("/Registry (Adobe)"),n("/Ordering ("+t.encoding+")"),n(">>"),n(">>"),n("endobj"),t.objectNumber=r(),n("<<"),n("/Type /Font"),n("/Subtype /Type0"),n("/ToUnicode "+c+" 0 R"),n("/BaseFont /"+e(t.fontName)),n("/Encoding /"+t.encoding),n("/DescendantFonts ["+l+" 0 R]"),n(">>"),n("endobj"),t.isAlreadyPutted=!0}}]),Dr.events.push(["putFont",function(e){var t=e.font,n=e.out,r=e.newObject,i=e.putStream;e=e.pdfEscapeWithNeededParanthesis;if(t.metadata instanceof _r.API.TTFFont&&"WinAnsiEncoding"===t.encoding){for(var o=t.metadata.rawData,a="",s=0;s<o.length;s++)a+=String.fromCharCode(o[s]);var u=r(),c=(i({data:a,addLength1:!0,objectId:u}),n("endobj"),r());i=(i({data:Or(t.metadata.toUnicode),addLength1:!0,objectId:c}),n("endobj"),r());n("<<"),n("/Descent "+t.metadata.decender),n("/CapHeight "+t.metadata.capHeight),n("/StemV "+t.metadata.stemV),n("/Type /FontDescriptor"),n("/FontFile2 "+u+" 0 R"),n("/Flags 96"),n("/FontBBox "+_r.API.PDFObject.convert(t.metadata.bbox)),n("/FontName /"+e(t.fontName)),n("/ItalicAngle "+t.metadata.italicAngle),n("/Ascent "+t.metadata.ascender),n(">>"),n("endobj"),t.objectNumber=r();for(var l=0;l<t.metadata.hmtx.widths.length;l++)t.metadata.hmtx.widths[l]=parseInt(t.metadata.hmtx.widths[l]*(1e3/t.metadata.head.unitsPerEm));n("<</Subtype/TrueType/Type/Font/ToUnicode "+c+" 0 R/BaseFont/"+e(t.fontName)+"/FontDescriptor "+i+" 0 R/Encoding/"+t.encoding+" /FirstChar 29 /LastChar 255 /Widths "+_r.API.PDFObject.convert(t.metadata.hmtx.widths)+">>"),n("endobj"),t.isAlreadyPutted=!0}}]),Dr.events.push(["postProcessText",function(e){var t=e.text||"",n=[],r={text:t,x:e.x,y:e.y,options:e.options,mutex:e.mutex};if(Array.isArray(t)){var i=0;for(i=0;i<t.length;i+=1)Array.isArray(t[i])&&3===t[i].length?n.push([Tr(Object.assign({},r,{text:t[i][0]})).text,t[i][1],t[i][2]]):n.push(Tr(Object.assign({},r,{text:t[i]})).text);e.text=n}else e.text=Tr(Object.assign({},r,{text:t})).text}]),
/**
     * @license
     * jsPDF virtual FileSystem functionality
     *
     * Licensed under the MIT License.
     * http://opensource.org/licenses/mit-license
     */(Cr=j.API).existsFileInVFS=function(e){return Mr.call(this),void 0!==this.internal.vFS[e]},Cr.addFileToVFS=function(e,t){return Mr.call(this),this.internal.vFS[e]=t,this},Cr.getFileFromVFS=function(e){return Mr.call(this),void 0!==this.internal.vFS[e]?this.internal.vFS[e]:null},
/**
     * @license
     * Unicode Bidi Engine based on the work of Alex Shensis (@asthensis)
     * MIT License
     */(hr=j).__bidiEngine__=hr.prototype.__bidiEngine__=function(e){function t(e){for(var t,n=0;n<e.length;n++){if("L"===(t=y(e.charAt(n))))return!1;if("R"===t)return!0}return!1}function n(e,t,n){return e=e.split(""),n&&x(e,n,{hiLevel:b}),e.reverse(),t&&t.reverse(),e.join("")}function r(e,t,n){e=e.split("");var r={hiLevel:b},i=(x(e,n=n||[],r),e),o=n;if(0!==r.hiLevel&&l)for(var a,s=0;s<i.length;s++)1===o[s]&&0<=(a=g.indexOf(i[s]))&&(i[s]=g[a+1]);return C(2,e,t,n,r),C(1,e,t,n,r),e.join("")}var i,o,a,s,u,c,l,h=tr,f=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],d=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],p={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},m={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},g=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","‹","›","‹","⁅","⁆","⁅","⁽","⁾","⁽","₍","₎","₍","≤","≥","≤","〈","〉","〈","﹙","﹚","﹙","﹛","﹜","﹛","﹝","﹞","﹝","﹤","﹥","﹤"],A=new RegExp(/^([1-4|9]|1[0-9]|2[0-9]|3[0168]|4[04589]|5[012]|7[78]|159|16[0-9]|17[0-2]|21[569]|22[03489]|250)$/),v=!1,b=0,y=(this.__bidiEngine__={},function(e){var t=(e=e.charCodeAt())>>8,n=m[t];return void 0!==n?h[256*n+(255&e)]:252==t||253==t?"AL":A.test(t)?"L":8==t?"R":"N"}),w=function(e,t,n,r){var u,c,l=t[r];switch(l){case"L":case"R":v=!1;break;case"N":case"AN":break;case"EN":v&&(l="AN");break;case"AL":v=!0,l="R";break;case"WS":l="N";break;case"CS":r<1||r+1>=t.length||"EN"!==(f=n[r-1])&&"AN"!==f||"EN"!==(h=t[r+1])&&"AN"!==h?l="N":v&&(h="AN"),l=h===f?h:"N";break;case"ES":l="EN"===(f=0<r?n[r-1]:"B")&&r+1<t.length&&"EN"===t[r+1]?"EN":"N";break;case"ET":if(0<r&&"EN"===n[r-1])l="EN";else if(v)l="N";else{for(u=r+1,c=t.length;u<c&&"ET"===t[u];)u++;l=u<c&&"EN"===t[u]?"EN":"N"}break;case"NSM":if(a&&!s){for(c=t.length,u=r+1;u<c&&"NSM"===t[u];)u++;if(u<c){var h=e[r],f=t[u];if((1425<=h&&h<=2303||64286===h)&&("R"===f||"AL"===f)){l="R";break}}}l=r<1||"B"===(f=t[r-1])?"N":n[r-1];break;case"B":i=!(v=!1),l=b;break;case"S":o=!0,l="N";break;case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":v=!1;break;case"BN":l="N"}return l},x=function(e,t,n){var r,a,s,u,c=-1,l=e.length,h=0,m=[],g=b?d:f,A=[];for(o=i=v=!1,r=0;r<l;r++)A[r]=y(e[r]);for(a=0;a<l;a++){if(u=h,m[a]=w(e,A,m,a),u=240&(h=g[u][p[m[a]]]),h&=15,t[a]=s=g[h][5],0<u){if(16==u)for(r=c;r<a;r++)t[r]=1;c=-1}if(g[h][6])-1===c&&(c=a);else if(-1<c){for(r=c;r<a;r++)t[r]=s;c=-1}"B"===A[a]&&(t[a]=0),n.hiLevel|=s}if(o)for(var x=A,C=t,k=l,E=0;E<k;E++)if("S"===x[E]){C[E]=b;for(var S=E-1;0<=S&&"WS"===x[S];S--)C[S]=b}},C=function(e,t,n,r,o){if(!(o.hiLevel<e))if(1!==e||1!==b||i)for(var a,s,u,c,l=t.length,h=0;h<l;){if(r[h]>=e){for(u=h+1;u<l&&r[u]>=e;)u++;for(c=h,s=u-1;c<s;c++,s--)a=t[c],t[c]=t[s],t[s]=a,n&&(a=n[c],n[c]=n[s],n[s]=a);h=u}h++}else t.reverse(),n&&n.reverse()};return this.__bidiEngine__.doBidiReorder=function(e,i,o){var h,f=e,d=i;if(d)for(var p=0;p<f.length;p++)d[p]=p;return void 0===s&&(s=t(f)),void 0===c&&(c=t(f)),a||!u||c?a&&u&&s^c?(b=s?1:0,e=n(e,i,o)):!a&&u&&c?(b=s?1:0,e=n(e=r(e,i,o),i)):!a||s||u||c?a&&!u&&s^c?(e=n(e,i),e=s?(b=0,r(e,i,o)):(b=1,n(e=r(e,i,o),i))):a&&s&&!u&&c?(b=1,e=n(e=r(e,i,o),i)):!a&&!u&&s^c&&(h=l,s?(b=1,e=r(e,i,o),b=0,l=!1,e=r(e,i,o),l=h):(b=0,e=n(e=r(e,i,o),i),l=!(b=1),e=r(e,i,o),l=h,e=n(e,i))):(b=0,e=r(e,i,o)):(b=s?1:0,e=r(e,i,o)),e},this.__bidiEngine__.setOptions=function(e){e&&(a=e.isInputVisual,u=e.isOutputVisual,s=e.isInputRtl,c=e.isOutputRtl,l=e.isSymmetricSwapping)},this.__bidiEngine__.setOptions(e),this.__bidiEngine__},tr=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","N","ET","ET","ET","ET","N","N","N","N","L","N","N","BN","N","N","ET","ET","EN","EN","N","L","N","N","N","EN","L","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","N","N","N","N","N","ET","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","NSM","R","NSM","NSM","R","NSM","NSM","R","NSM","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","N","N","N","N","N","R","R","R","R","R","N","N","N","N","N","N","N","N","N","N","N","AN","AN","AN","AN","AN","AN","N","N","AL","ET","ET","AL","CS","AL","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","N","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","NSM","NSM","N","NSM","NSM","NSM","NSM","AL","AL","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","R","N","N","N","N","R","N","N","N","N","N","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","BN","BN","BN","L","R","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","B","LRE","RLE","PDF","LRO","RLO","CS","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","BN","BN","BN","BN","BN","N","LRI","RLI","FSI","PDI","BN","BN","BN","BN","BN","BN","EN","L","N","N","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","L","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","N","N","N","N","N","R","NSM","R","R","R","R","R","R","R","R","R","R","ES","R","R","R","R","R","R","R","R","R","R","R","R","R","N","R","R","R","R","R","N","R","N","R","R","N","R","R","N","R","R","R","R","R","R","R","R","R","R","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","CS","N","N","CS","N","N","N","N","N","N","N","N","N","ET","N","N","ES","ES","N","N","N","N","N","ET","ET","N","N","N","N","N","AL","AL","AL","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","BN","N","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","N","N","N","ET","ET","N","N","N","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N"],nr=new hr.__bidiEngine__({isInputVisual:!0}),hr.API.events.push(["postProcessText",function(e){var t=e.text,n=(e.x,e.y,e.options||{}),r=(e.mutex,n.lang,[]);if(n.isInputVisual="boolean"!=typeof n.isInputVisual||n.isInputVisual,nr.setOptions(n),"[object Array]"===Object.prototype.toString.call(t)){var i=0;for(r=[],i=0;i<t.length;i+=1)"[object Array]"===Object.prototype.toString.call(t[i])?r.push([nr.doBidiReorder(t[i][0]),t[i][1],t[i][2]]):r.push([nr.doBidiReorder(t[i])]);e.text=r}else e.text=nr.doBidiReorder(t);nr.setOptions({isInputVisual:!0})}]),j.API.TTFFont=(Ir.open=function(e){return new Ir(e)},Ir.prototype.parse=function(){return this.directory=new Wr(this.contents),this.head=new Yr(this),this.name=new ni(this),this.cmap=new Jr(this),this.toUnicode={},this.hhea=new Zr(this),this.maxp=new ri(this),this.hmtx=new ii(this),this.post=new ti(this),this.os2=new ei(this),this.loca=new ci(this),this.glyf=new ai(this),this.ascender=this.os2.exists&&this.os2.ascender||this.hhea.ascender,this.decender=this.os2.exists&&this.os2.decender||this.hhea.decender,this.lineGap=this.os2.exists&&this.os2.lineGap||this.hhea.lineGap,this.bbox=[this.head.xMin,this.head.yMin,this.head.xMax,this.head.yMax]},Ir.prototype.registerTTF=function(){var e,t,n;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=function(){for(var t,n=[],r=0,i=(t=this.bbox).length;r<i;r++)e=t[r],n.push(Math.round(e*this.scaleFactor));return n}.call(this),this.stemV=0,this.post.exists?(t=255&(n=this.post.italic_angle),0!=(32768&(n>>=16))&&(n=-(1+(65535^n))),this.italicAngle=+(n+"."+t)):this.italicAngle=0,this.ascender=Math.round(this.ascender*this.scaleFactor),this.decender=Math.round(this.decender*this.scaleFactor),this.lineGap=Math.round(this.lineGap*this.scaleFactor),this.capHeight=this.os2.exists&&this.os2.capHeight||this.ascender,this.xHeight=this.os2.exists&&this.os2.xHeight||0,this.familyClass=(this.os2.exists&&this.os2.familyClass||0)>>8,this.isSerif=1===(n=this.familyClass)||2===n||3===n||4===n||5===n||7===n,this.isScript=10===this.familyClass,this.flags=0,this.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),0!==this.italicAngle&&(this.flags|=64),this.flags|=32,!this.cmap.unicode)throw new Error("No unicode cmap for font")},Ir.prototype.characterToGlyph=function(e){var t;return(null!=(t=this.cmap.unicode)?t.codeMap[e]:void 0)||0},Ir.prototype.widthOfGlyph=function(e){var t=1e3/this.head.unitsPerEm;return this.hmtx.forGlyph(e).advance*t},Ir.prototype.widthOfString=function(e,t,n){for(var r,i=0,o=0,a=(e=""+e).length;0<=a?o<a:a<o;o=0<=a?++o:--o)r=e.charCodeAt(o),i+=this.widthOfGlyph(this.characterToGlyph(r))+n*(1e3/t)||0;return i*(t/1e3)},Ir.prototype.lineHeight=function(e,t){return t=(t=null!=t&&t)?this.lineGap:0,(this.ascender+t-this.decender)/1e3*e},Ir),_i.prototype.readByte=function(){return this.data[this.pos++]},_i.prototype.writeByte=function(e){return this.data[this.pos++]=e},_i.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},_i.prototype.writeUInt32=function(e){return this.writeByte(e>>>24&255),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e)},_i.prototype.readInt32=function(){var e;return 2147483648<=(e=this.readUInt32())?e-4294967296:e},_i.prototype.writeInt32=function(e){return e<0&&(e+=4294967296),this.writeUInt32(e)},_i.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},_i.prototype.writeUInt16=function(e){return this.writeByte(e>>8&255),this.writeByte(255&e)},_i.prototype.readInt16=function(){var e;return 32768<=(e=this.readUInt16())?e-65536:e},_i.prototype.writeInt16=function(e){return e<0&&(e+=65536),this.writeUInt16(e)},_i.prototype.readString=function(e){for(var t=[],n=0;0<=e?n<e:e<n;n=0<=e?++n:--n)t[n]=String.fromCharCode(this.readByte());return t.join("")},_i.prototype.writeString=function(e){for(var t=[],n=0,r=e.length;0<=r?n<r:r<n;n=0<=r?++n:--n)t.push(this.writeByte(e.charCodeAt(n)));return t},_i.prototype.readShort=function(){return this.readInt16()},_i.prototype.writeShort=function(e){return this.writeInt16(e)},_i.prototype.readLongLong=function(){var e=this.readByte(),t=this.readByte(),n=this.readByte(),r=this.readByte(),i=this.readByte(),o=this.readByte(),a=this.readByte(),s=this.readByte();return 128&e?-1*(72057594037927940*(255^e)+281474976710656*(255^t)+1099511627776*(255^n)+4294967296*(255^r)+16777216*(255^i)+65536*(255^o)+256*(255^a)+(255^s)+1):72057594037927940*e+281474976710656*t+1099511627776*n+4294967296*r+16777216*i+65536*o+256*a+s},_i.prototype.writeLongLong=function(e){var t=Math.floor(e/4294967296);e&=4294967295;return this.writeByte(t>>24&255),this.writeByte(t>>16&255),this.writeByte(t>>8&255),this.writeByte(255&t),this.writeByte(e>>24&255),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e)},_i.prototype.readInt=function(){return this.readInt32()},_i.prototype.writeInt=function(e){return this.writeInt32(e)},_i.prototype.read=function(e){for(var t=[],n=0;0<=e?n<e:e<n;n=0<=e?++n:--n)t.push(this.readByte());return t},_i.prototype.write=function(e){for(var t,n=[],r=0,i=e.length;r<i;r++)t=e[r],n.push(this.writeByte(t));return n};var Vr,qr,Gr=_i,Wr=(Si.prototype.encode=function(e){var t,n,r,i,o,a,s=Object.keys(e).length,u=Math.log(2),c=16*Math.floor(Math.log(s)/u),l=(u=Math.floor(c/u),16*s-c);for(a in(t=new Gr).writeInt(this.scalarType),t.writeShort(s),t.writeShort(c),t.writeShort(u),t.writeShort(l),r=t.pos+16*s,n=null,o=[],e)for(i=e[a],t.writeString(a),t.writeInt(Vr(i)),t.writeInt(r),t.writeInt(i.length),o=o.concat(i),"head"===a&&(n=r),r+=i.length;r%4;)o.push(0),r++;return t.write(o),c=2981146554-Vr(t.data),t.pos=n+8,t.writeUInt32(c),t.data},Vr=function(e){var t,n,r,i;for(e=oi.call(e);e.length%4;)e.push(0);for(r=new Gr(e),t=n=0,i=e.length;t<i;t+=4)n+=r.readUInt32();return 4294967295&n},Si),Kr={}.hasOwnProperty,Yr=(Ei.prototype.parse=function(){},Ei.prototype.encode=function(){},Ei.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},$r(ki,Dr=Ei),ki.prototype.tag="head",ki.prototype.parse=function(e){return e.pos=this.offset,this.version=e.readInt(),this.revision=e.readInt(),this.checkSumAdjustment=e.readInt(),this.magicNumber=e.readInt(),this.flags=e.readShort(),this.unitsPerEm=e.readShort(),this.created=e.readLongLong(),this.modified=e.readLongLong(),this.xMin=e.readShort(),this.yMin=e.readShort(),this.xMax=e.readShort(),this.yMax=e.readShort(),this.macStyle=e.readShort(),this.lowestRecPPEM=e.readShort(),this.fontDirectionHint=e.readShort(),this.indexToLocFormat=e.readShort(),this.glyphDataFormat=e.readShort()},ki.prototype.encode=function(e){var t;return(t=new Gr).writeInt(this.version),t.writeInt(this.revision),t.writeInt(this.checkSumAdjustment),t.writeInt(this.magicNumber),t.writeShort(this.flags),t.writeShort(this.unitsPerEm),t.writeLongLong(this.created),t.writeLongLong(this.modified),t.writeShort(this.xMin),t.writeShort(this.yMin),t.writeShort(this.xMax),t.writeShort(this.yMax),t.writeShort(this.macStyle),t.writeShort(this.lowestRecPPEM),t.writeShort(this.fontDirectionHint),t.writeShort(e),t.writeShort(this.glyphDataFormat),t.data},ki),Xr=(Ci.encode=function(e,t){var n,r,i,o,a,s,u,c,l,h,f,d,p,m,g,A,v,b,y,w,x,C,k,E,S,_,O,T,D,B,I,M,j,N,F,R,P,L,U,z,H,$,Q,V,q=new Gr,G=Object.keys(e).sort((function(e,t){return e-t}));switch(t){case"macroman":for(d=0,p=function(){var e=[];for(f=0;f<256;++f)e.push(0);return e}(),g={0:0},i={},O=0,I=G.length;O<I;O++)null==g[H=e[r=G[O]]]&&(g[H]=++d),i[r]={old:e[r],new:g[e[r]]},p[r]=g[e[r]];return q.writeUInt16(1),q.writeUInt16(0),q.writeUInt32(12),q.writeUInt16(0),q.writeUInt16(262),q.writeUInt16(0),q.write(p),{charMap:i,subtable:q.data,maxGlyphID:d+1};case"unicode":for(S=[],c=[],g={},n={},m=s=null,T=A=0,M=G.length;T<M;T++)null==g[b=e[r=G[T]]]&&(g[b]=++A),n[r]={old:b,new:g[b]},o=g[b]-r,null!=m&&o===s||(m&&c.push(m),S.push(r),s=o),m=r;for(m&&c.push(m),c.push(65535),S.push(65535),k=2*(C=S.length),x=2*Math.pow(Math.log(C)/Math.LN2,2),l=Math.log(x/2)/Math.LN2,w=2*C-x,a=[],y=[],h=[],f=D=0,j=S.length;D<j;f=++D){if(E=S[f],u=c[f],65535===E){a.push(0),y.push(0);break}if(32768<=E-(_=n[E].new))for(a.push(0),y.push(2*(h.length+C-f)),r=B=E;E<=u?B<=u:u<=B;r=E<=u?++B:--B)h.push(n[r].new);else a.push(_-E),y.push(0)}for(q.writeUInt16(3),q.writeUInt16(1),q.writeUInt32(12),q.writeUInt16(4),q.writeUInt16(16+8*C+2*h.length),q.writeUInt16(0),q.writeUInt16(k),q.writeUInt16(x),q.writeUInt16(l),q.writeUInt16(w),U=0,N=c.length;U<N;U++)r=c[U],q.writeUInt16(r);for(q.writeUInt16(0),z=0,F=S.length;z<F;z++)r=S[z],q.writeUInt16(r);for($=0,R=a.length;$<R;$++)o=a[$],q.writeUInt16(o);for(Q=0,P=y.length;Q<P;Q++)v=y[Q],q.writeUInt16(v);for(V=0,L=h.length;V<L;V++)d=h[V],q.writeUInt16(d);return{charMap:n,subtable:q.data,maxGlyphID:A+1}}},Ci),Jr=($r(xi,Dr),xi.prototype.tag="cmap",xi.prototype.parse=function(e){var t,n,r;for(e.pos=this.offset,this.version=e.readUInt16(),r=e.readUInt16(),this.tables=[],this.unicode=null,n=0;0<=r?n<r:r<n;n=0<=r?++n:--n)t=new Xr(e,this.offset),this.tables.push(t),t.isUnicode&&null==this.unicode&&(this.unicode=t);return!0},xi.encode=function(e,t){return e=Xr.encode(e,t=null==t?"macroman":t),(t=new Gr).writeUInt16(0),t.writeUInt16(1),e.table=t.data.concat(e.subtable),e},xi),Zr=($r(wi,Dr),wi.prototype.tag="hhea",wi.prototype.parse=function(e){return e.pos=this.offset,this.version=e.readInt(),this.ascender=e.readShort(),this.decender=e.readShort(),this.lineGap=e.readShort(),this.advanceWidthMax=e.readShort(),this.minLeftSideBearing=e.readShort(),this.minRightSideBearing=e.readShort(),this.xMaxExtent=e.readShort(),this.caretSlopeRise=e.readShort(),this.caretSlopeRun=e.readShort(),this.caretOffset=e.readShort(),e.pos+=8,this.metricDataFormat=e.readShort(),this.numberOfMetrics=e.readUInt16()},wi),ei=($r(yi,Dr),yi.prototype.tag="OS/2",yi.prototype.parse=function(e){if(e.pos=this.offset,this.version=e.readUInt16(),this.averageCharWidth=e.readShort(),this.weightClass=e.readUInt16(),this.widthClass=e.readUInt16(),this.type=e.readShort(),this.ySubscriptXSize=e.readShort(),this.ySubscriptYSize=e.readShort(),this.ySubscriptXOffset=e.readShort(),this.ySubscriptYOffset=e.readShort(),this.ySuperscriptXSize=e.readShort(),this.ySuperscriptYSize=e.readShort(),this.ySuperscriptXOffset=e.readShort(),this.ySuperscriptYOffset=e.readShort(),this.yStrikeoutSize=e.readShort(),this.yStrikeoutPosition=e.readShort(),this.familyClass=e.readShort(),this.panose=function(){for(var t=[],n=0;n<10;++n)t.push(e.readByte());return t}(),this.charRange=function(){for(var t=[],n=0;n<4;++n)t.push(e.readInt());return t}(),this.vendorID=e.readString(4),this.selection=e.readShort(),this.firstCharIndex=e.readShort(),this.lastCharIndex=e.readShort(),0<this.version&&(this.ascent=e.readShort(),this.descent=e.readShort(),this.lineGap=e.readShort(),this.winAscent=e.readShort(),this.winDescent=e.readShort(),this.codePageRange=function(){for(var t=[],n=0;n<2;n=++n)t.push(e.readInt());return t}(),1<this.version))return this.xHeight=e.readShort(),this.capHeight=e.readShort(),this.defaultChar=e.readShort(),this.breakChar=e.readShort(),this.maxContext=e.readShort()},yi),ti=($r(bi,Dr),bi.prototype.tag="post",bi.prototype.parse=function(e){var t,n;switch(e.pos=this.offset,this.format=e.readInt(),this.italicAngle=e.readInt(),this.underlinePosition=e.readShort(),this.underlineThickness=e.readShort(),this.isFixedPitch=e.readInt(),this.minMemType42=e.readInt(),this.maxMemType42=e.readInt(),this.minMemType1=e.readInt(),this.maxMemType1=e.readInt(),this.format){case 65536:break;case 131072:var r,i=e.readUInt16();for(this.glyphNameIndex=[],r=0;0<=i?r<i:i<r;r=0<=i?++r:--r)this.glyphNameIndex.push(e.readUInt16());for(this.names=[],n=[];e.pos<this.offset+this.length;)t=e.readByte(),n.push(this.names.push(e.readString(t)));return n;case 151552:return i=e.readUInt16(),this.offsets=e.read(i);case 196608:break;case 262144:return this.map=function(){var t,n,i=[];for(r=t=0,n=this.file.maxp.numGlyphs;0<=n?t<n:n<t;r=0<=n?++t:--t)i.push(e.readUInt32());return i}.call(this)}},bi),ni=($r(vi,Dr),vi.prototype.tag="name",vi.prototype.parse=function(e){var t,n,r,i,o,a,s,u,c,l;for(e.pos=this.offset,e.readShort(),t=e.readShort(),o=e.readShort(),n=[],i=0;0<=t?i<t:t<i;i=0<=t?++i:--i)n.push({platformID:e.readShort(),encodingID:e.readShort(),languageID:e.readShort(),nameID:e.readShort(),length:e.readShort(),offset:this.offset+o+e.readShort()});for(a={},i=u=0,c=n.length;u<c;i=++u)r=n[i],e.pos=r.offset,s=new Qr(s=e.readString(r.length),r),null==a[l=r.nameID]&&(a[l]=[]),a[r.nameID].push(s);this.strings=a,this.copyright=a[0],this.fontFamily=a[1],this.fontSubfamily=a[2],this.uniqueSubfamily=a[3],this.fontName=a[4],this.version=a[5];try{this.postscriptName=a[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}catch(e){this.postscriptName=a[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}return this.trademark=a[7],this.manufacturer=a[8],this.designer=a[9],this.description=a[10],this.vendorUrl=a[11],this.designerUrl=a[12],this.license=a[13],this.licenseUrl=a[14],this.preferredFamily=a[15],this.preferredSubfamily=a[17],this.compatibleFull=a[18],this.sampleText=a[19]},vi),ri=($r(Ai,Dr),Ai.prototype.tag="maxp",Ai.prototype.parse=function(e){return e.pos=this.offset,this.version=e.readInt(),this.numGlyphs=e.readUInt16(),this.maxPoints=e.readUInt16(),this.maxContours=e.readUInt16(),this.maxCompositePoints=e.readUInt16(),this.maxComponentContours=e.readUInt16(),this.maxZones=e.readUInt16(),this.maxTwilightPoints=e.readUInt16(),this.maxStorage=e.readUInt16(),this.maxFunctionDefs=e.readUInt16(),this.maxInstructionDefs=e.readUInt16(),this.maxStackElements=e.readUInt16(),this.maxSizeOfInstructions=e.readUInt16(),this.maxComponentElements=e.readUInt16(),this.maxComponentDepth=e.readUInt16()},Ai),ii=($r(gi,Dr),gi.prototype.tag="hmtx",gi.prototype.parse=function(e){var t,n,r,i,o,a,s;for(e.pos=this.offset,this.metrics=[],t=0,a=this.file.hhea.numberOfMetrics;0<=a?t<a:a<t;t=0<=a?++t:--t)this.metrics.push({advance:e.readUInt16(),lsb:e.readInt16()});for(r=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=function(){var n,i=[];for(t=n=0;0<=r?n<r:r<n;t=0<=r?++n:--n)i.push(e.readInt16());return i}(),this.widths=function(){for(var e,t=[],n=0,r=(e=this.metrics).length;n<r;n++)i=e[n],t.push(i.advance);return t}.call(this),n=this.widths[this.widths.length-1],s=[],t=o=0;0<=r?o<r:r<o;t=0<=r?++o:--o)s.push(this.widths.push(n));return s},gi.prototype.forGlyph=function(e){return e in this.metrics?this.metrics[e]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[e-this.metrics.length]}},gi),oi=[].slice,ai=($r(mi,Dr),mi.prototype.tag="glyf",mi.prototype.parse=function(){return this.cache={}},mi.prototype.glyphFor=function(e){var t,n,r,i,o,a;return e in this.cache?this.cache[e]:(i=this.file.loca,t=this.file.contents,n=i.indexOf(e),0===(i=i.lengthOf(e))?this.cache[e]=null:(t.pos=this.offset+n,t=(n=new Gr(t.read(i))).readShort(),i=n.readShort(),a=n.readShort(),r=n.readShort(),o=n.readShort(),this.cache[e]=-1===t?new ui(n,i,a,r,o):new si(n,t,i,a,r,o),this.cache[e]))},mi.prototype.encode=function(e,t,n){for(var r,i=[],o=[],a=0,s=t.length;a<s;a++)r=e[t[a]],o.push(i.length),r&&(i=i.concat(r.encode(n)));return o.push(i.length),{table:i,offsets:o}},mi),si=(pi.prototype.encode=function(){return this.raw.data},pi),ui=(di.prototype.encode=function(){for(var e=new Gr(oi.call(this.raw.data)),t=0,n=this.glyphIDs.length;t<n;++t)e.pos=this.glyphOffsets[t];return e.data},di),ci=($r(fi,Dr),fi.prototype.tag="loca",fi.prototype.parse=function(e){var t,n;return e.pos=this.offset,t=this.file.head.indexToLocFormat,this.offsets=(0===t?function(){var t,r=[];for(n=0,t=this.length;n<t;n+=2)r.push(2*e.readUInt16());return r}:function(){var t,r=[];for(n=0,t=this.length;n<t;n+=4)r.push(e.readUInt32());return r}).call(this)},fi.prototype.indexOf=function(e){return this.offsets[e]},fi.prototype.lengthOf=function(e){return this.offsets[e+1]-this.offsets[e]},fi.prototype.encode=function(e,t){for(var n,r=new Uint32Array(this.offsets.length),i=0,o=0,a=0;a<r.length;++a)r[a]=i,o<t.length&&t[o]==a&&(++o,r[a]=i,n=this.offsets[a],0<(n=this.offsets[a+1]-n)&&(i+=n));for(var s=new Array(4*r.length),u=0;u<r.length;++u)s[4*u+3]=255&r[u],s[4*u+2]=(65280&r[u])>>8,s[4*u+1]=(16711680&r[u])>>16,s[4*u]=(4278190080&r[u])>>24;return s},fi),li=(hi.prototype.generateCmap=function(){var e,t,n,r=this.font.cmap.tables[0].codeMap,i={};for(e in n=this.subset)t=n[e],i[e]=r[t];return i},hi.prototype.glyphsFor=function(e){for(var t,n,r,i,o={},a=0,s=e.length;a<s;a++)o[r=e[a]]=this.font.glyf.glyphFor(r);for(r in t=[],o)null!=(n=o[r])&&n.compound&&t.push.apply(t,n.glyphIDs);if(0<t.length)for(r in i=this.glyphsFor(t))n=i[r],o[r]=n;return o},hi.prototype.encode=function(e,t){var n,r,i,o,a,s,u,c,l=Jr.encode(this.generateCmap(),"unicode"),h=(e=this.glyphsFor(e),{0:0});for(n in c=l.charMap)h[(i=c[n]).old]=i.new;for(u in s=l.maxGlyphID,e)u in h||(h[u]=s++);return o=function(e){var t,n={};for(t in e)n[e[t]]=t;return n}(h),a=Object.keys(o).sort((function(e,t){return e-t})),l=function(){for(var e=[],t=0,n=a.length;t<n;t++)r=a[t],e.push(o[r]);return e}(),e=this.font.glyf.encode(e,l,h),l=this.font.loca.encode(e.offsets,l),e={cmap:this.font.cmap.raw(),glyf:e.table,loca:l,hmtx:this.font.hmtx.raw(),hhea:this.font.hhea.raw(),maxp:this.font.maxp.raw(),post:this.font.post.raw(),name:this.font.name.raw(),head:this.font.head.encode(t)},this.font.os2.exists&&(e["OS/2"]=this.font.os2.raw()),this.font.directory.encode(e)},hi);function hi(e){this.font=e,this.subset={},this.unicodes={},this.next=33}function fi(){return fi.__super__.constructor.apply(this,arguments)}function di(e,t,n,r,i){var o,a;for(this.raw=e,this.xMin=t,this.yMin=n,this.xMax=r,this.yMax=i,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],o=this.raw;a=o.readShort(),this.glyphOffsets.push(o.pos),this.glyphIDs.push(o.readUInt16()),32&a;)o.pos+=1&a?4:2,128&a?o.pos+=8:64&a?o.pos+=4:8&a&&(o.pos+=2)}function pi(e,t,n,r,i,o){this.raw=e,this.numberOfContours=t,this.xMin=n,this.yMin=r,this.xMax=i,this.yMax=o,this.compound=!1}function mi(){return mi.__super__.constructor.apply(this,arguments)}function gi(){return gi.__super__.constructor.apply(this,arguments)}function Ai(){return Ai.__super__.constructor.apply(this,arguments)}function vi(){return vi.__super__.constructor.apply(this,arguments)}function bi(){return bi.__super__.constructor.apply(this,arguments)}function yi(){return yi.__super__.constructor.apply(this,arguments)}function wi(){return wi.__super__.constructor.apply(this,arguments)}function xi(){return xi.__super__.constructor.apply(this,arguments)}function Ci(e,t){var n,r,i,o,a,s,u,c,l,h,f,d,p,m,g,A;switch(this.platformID=e.readUInt16(),this.encodingID=e.readShort(),this.offset=t+e.readInt(),t=e.pos,e.pos=this.offset,this.format=e.readUInt16(),this.length=e.readUInt16(),this.language=e.readUInt16(),this.isUnicode=3===this.platformID&&1===this.encodingID&&4===this.format||0===this.platformID&&4===this.format,this.codeMap={},this.format){case 0:for(s=0;s<256;++s)this.codeMap[s]=e.readByte();break;case 4:for(h=e.readUInt16(),l=h/2,e.pos+=6,i=function(){var t,n=[];for(s=t=0;0<=l?t<l:l<t;s=0<=l?++t:--t)n.push(e.readUInt16());return n}(),e.pos+=2,d=function(){var t,n=[];for(s=t=0;0<=l?t<l:l<t;s=0<=l?++t:--t)n.push(e.readUInt16());return n}(),u=function(){var t,n=[];for(s=t=0;0<=l?t<l:l<t;s=0<=l?++t:--t)n.push(e.readUInt16());return n}(),c=function(){var t,n=[];for(s=t=0;0<=l?t<l:l<t;s=0<=l?++t:--t)n.push(e.readUInt16());return n}(),r=(this.length-e.pos+this.offset)/2,a=function(){var t,n=[];for(s=t=0;0<=r?t<r:r<t;s=0<=r?++t:--t)n.push(e.readUInt16());return n}(),s=m=0,A=i.length;m<A;s=++m)for(p=i[s],n=g=f=d[s];f<=p?g<=p:p<=g;n=f<=p?++g:--g)0===c[s]?o=n+u[s]:0!==(o=a[c[s]/2+(n-f)-(l-s)]||0)&&(o+=u[s]),this.codeMap[n]=65535&o}e.pos=t}function ki(){return ki.__super__.constructor.apply(this,arguments)}function Ei(e){this.file=e,e=this.file.directory.tables[this.tag],this.exists=!!e,e&&(this.offset=e.offset,this.length=e.length,this.parse(this.file.contents))}function Si(e){var t,n,r;for(this.scalarType=e.readInt(),this.tableCount=e.readShort(),this.searchRange=e.readShort(),this.entrySelector=e.readShort(),this.rangeShift=e.readShort(),this.tables={},n=0,r=this.tableCount;0<=r?n<r:r<n;n=0<=r?++n:--n)t={tag:e.readString(4),checksum:e.readInt(),offset:e.readInt(),length:e.readInt()},this.tables[t.tag]=t}function _i(e){this.data=null!=e?e:[],this.pos=0,this.length=this.data.length}function Oi(){}j.API.PDFObject=(qr=function(e,t){return(Array(t+1).join("0")+e).slice(-t)},Oi.convert=function(e){var t,n,r,i;if(Array.isArray(e))return"["+function(){for(var n=[],r=0,i=e.length;r<i;r++)t=e[r],n.push(Oi.convert(t));return n}().join(" ")+"]";if("string"==typeof e)return"/"+e;if(null!=e&&e.isString)return"("+e+")";if(e instanceof Date)return"(D:"+qr(e.getUTCFullYear(),4)+qr(e.getUTCMonth(),2)+qr(e.getUTCDate(),2)+qr(e.getUTCHours(),2)+qr(e.getUTCMinutes(),2)+qr(e.getUTCSeconds(),2)+"Z)";if("[object Object]"!=={}.toString.call(e))return""+e;for(n in r=["<<"],e)i=e[n],r.push("/"+n+" "+Oi.convert(i));return r.push(">>"),r.join("\n")},Oi),t.AcroForm=Me,t.AcroFormAppearance=Xe,t.AcroFormButton=We,t.AcroFormCheckBox=X,t.AcroFormChoiceField=V,t.AcroFormComboBox=G,t.AcroFormEditBox=W,t.AcroFormListBox=q,t.AcroFormPasswordField=J,t.AcroFormPushButton=K,t.AcroFormRadioButton=Y,t.AcroFormTextField=Ye,t.GState=D,t.ShadingPattern=I,t.TilingPattern=M,t.default=j,t.jsPDF=j,Object.defineProperty(t,"__esModule",{value:!0})},"object"==o(t)&&void 0!==e?i(t):void 0!==(i="function"==typeof(i=i)?i.apply(t,[t]):i)&&(e.exports=i)}).call(this,n(67))},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.d(t,"a",(function(){return s}));var i=[512,512,456,512,328,456,335,512,405,328,271,456,388,335,292,512,454,405,364,328,298,271,496,456,420,388,360,335,312,292,273,512,482,454,428,405,383,364,345,328,312,298,284,271,259,496,475,456,437,420,404,388,374,360,347,335,323,312,302,292,282,273,265,512,497,482,468,454,441,428,417,405,394,383,373,364,354,345,337,328,320,312,305,298,291,284,278,271,265,259,507,496,485,475,465,456,446,437,428,420,412,404,396,388,381,374,367,360,354,347,341,335,329,323,318,312,307,302,297,292,287,282,278,273,269,265,261,512,505,497,489,482,475,468,461,454,447,441,435,428,422,417,411,405,399,394,389,383,378,373,368,364,359,354,350,345,341,337,332,328,324,320,316,312,309,305,301,298,294,291,287,284,281,278,274,271,268,265,262,259,257,507,501,496,491,485,480,475,470,465,460,456,451,446,442,437,433,428,424,420,416,412,408,404,400,396,392,388,385,381,377,374,370,367,363,360,357,354,350,347,344,341,338,335,332,329,326,323,320,318,315,312,310,307,304,302,299,297,294,292,289,287,285,282,280,278,275,273,271,269,267,265,263,261,259],o=[9,11,12,13,13,14,14,15,15,15,15,16,16,16,16,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,19,19,19,19,19,19,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24];function a(e,t,n,i,o){if(!(e="string"==typeof e?document.getElementById(e):e)||"object"!==r(e)||!("getContext"in e))throw new TypeError("Expecting canvas with `getContext` method in processCanvasRGB(A) calls!");e=e.getContext("2d");try{return e.getImageData(t,n,i,o)}catch(e){throw new Error("unable to access image data: "+e)}}function s(e,t,n,r,s,c){var l;isNaN(c)||c<1||(c|=0,l=function(e,t,n,r){for(var a,s=e.data,c=2*r+1,l=t-1,h=n-1,f=r+1,d=f*(f+1)/2,p=new u,m=p,g=1;g<c;g++)m=m.next=new u,g===f&&(a=m);m.next=p;for(var A=null,v=null,b=0,y=0,w=i[r],x=o[r],C=0;C<n;C++){m=p;for(var k=s[y],E=s[y+1],S=s[y+2],_=s[y+3],O=0;O<f;O++)m.r=k,m.g=E,m.b=S,m.a=_,m=m.next;for(var T=0,D=0,B=0,I=0,M=f*k,j=f*E,N=f*S,F=f*_,R=d*k,P=d*E,L=d*S,U=d*_,z=1;z<f;z++){var H=s[V=y+((l<z?l:z)<<2)],$=s[V+1],Q=s[V+2],V=s[V+3],q=f-z;R+=(m.r=H)*q,P+=(m.g=$)*q,L+=(m.b=Q)*q,U+=(m.a=V)*q,T+=H,D+=$,B+=Q,I+=V,m=m.next}A=p,v=a;for(var G=0;G<t;G++){var W=U*w>>x;W=b+((W=(0!=(s[y+3]=W)?(W=255/W,s[y]=(R*w>>x)*W,s[y+1]=(P*w>>x)*W,s[y+2]=(L*w>>x)*W):s[y]=s[y+1]=s[y+2]=0,R-=M,P-=j,L-=N,U-=F,M-=A.r,j-=A.g,N-=A.b,F-=A.a,G+r+1))<l?W:l)<<2,R+=T+=A.r=s[W],P+=D+=A.g=s[W+1],L+=B+=A.b=s[W+2],U+=I+=A.a=s[W+3],A=A.next;W=v.r;var K=v.g,Y=v.b,X=v.a;M+=W,j+=K,N+=Y,F+=X,T-=W,D-=K,B-=Y,I-=X,v=v.next,y+=4}b+=t}for(var J=0;J<t;J++){var Z=s[y=J<<2],ee=s[y+1],te=s[y+2],ne=s[y+3],re=f*Z,ie=f*ee,oe=f*te,ae=f*ne,se=d*Z,ue=d*ee,ce=d*te,le=d*ne;m=p;for(var he=0;he<f;he++)m.r=Z,m.g=ee,m.b=te,m.a=ne,m=m.next;for(var fe=t,de=0,pe=0,me=0,ge=0,Ae=1;Ae<=r;Ae++){y=fe+J<<2;var ve=f-Ae;se+=(m.r=Z=s[y])*ve,ue+=(m.g=ee=s[y+1])*ve,ce+=(m.b=te=s[y+2])*ve,le+=(m.a=ne=s[y+3])*ve,ge+=Z,de+=ee,pe+=te,me+=ne,m=m.next,Ae<h&&(fe+=t)}y=J,A=p,v=a;for(var be=0;be<n;be++){var ye=y<<2;s[ye+3]=ne=le*w>>x,0<ne?(ne=255/ne,s[ye]=(se*w>>x)*ne,s[ye+1]=(ue*w>>x)*ne,s[ye+2]=(ce*w>>x)*ne):s[ye]=s[ye+1]=s[ye+2]=0,se-=re,ue-=ie,ce-=oe,le-=ae,re-=A.r,ie-=A.g,oe-=A.b,ae-=A.a,ye=J+((ye=be+f)<h?ye:h)*t<<2,se+=ge+=A.r=s[ye],ue+=de+=A.g=s[ye+1],ce+=pe+=A.b=s[ye+2],le+=me+=A.a=s[ye+3],A=A.next,re+=Z=v.r,ie+=ee=v.g,oe+=te=v.b,ae+=ne=v.a,ge-=Z,de-=ee,pe-=te,me-=ne,v=v.next,y+=t}}return e}(l=a(e,t,n,r,s),r,s,c),e.getContext("2d").putImageData(l,t,n))}var u=function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.r=0,this.g=0,this.b=0,this.a=0,this.next=null}},function(e,t,n){"use strict";n.r(t),n.d(t,"json",(function(){return r}));
/**
 * @license
 * Copyright 2022 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
const r=[{tfOpName:"Add",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"AddV2",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"AddN",category:"arithmetic",inputs:[{start:0,end:0,name:"tensors",type:"tensors"}]},{tfOpName:"BiasAdd",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0},{tfName:"data_format",name:"dataFormat",type:"string",notSupported:!0}]},{tfOpName:"Sub",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"RealDiv",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Div",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"DivNoNan",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"FloorDiv",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Mul",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Maximum",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Minimum",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Pow",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"SquaredDifference",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Mod",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"FloorMod",category:"arithmetic",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]}]},function(e,t,n){"use strict";n.r(t),n.d(t,"json",(function(){return r}));
/**
 * @license
 * Copyright 2022 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
const r=[{tfOpName:"Abs",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Acos",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Asin",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Atan",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Atan2",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"y",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Ceil",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"ClipByValue",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"clipValueMin",type:"number"},{start:2,name:"clipValueMax",type:"number"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Complex",category:"basic_math",inputs:[{start:0,name:"real",type:"tensor"},{start:1,name:"imag",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"ComplexAbs",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Cos",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Cosh",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Elu",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Exp",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Floor",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Log",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Imag",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0},{tfName:"Tout",name:"outputType",type:"dtype",notSupported:!0}]},{tfOpName:"Neg",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Real",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0},{tfName:"Tout",name:"outputType",type:"dtype",notSupported:!0}]},{tfOpName:"Prelu",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"alpha",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Relu",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Relu6",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Selu",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Sigmoid",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Sin",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Sinh",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Sqrt",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Rsqrt",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Square",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Tan",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Tanh",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Sign",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Round",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Expm1",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Log1p",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Reciprocal",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Softplus",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Asinh",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Acosh",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Atanh",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Erf",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Prod",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axes",type:"number[]"}],attrs:[{tfName:"keep_dims",name:"keepDims",type:"bool",notSupported:!0},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"LeakyRelu",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"alpha",name:"alpha",type:"number",defaultValue:.2},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"IsNan",category:"basic_math",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]}]},function(e,t,n){"use strict";n.r(t),n.d(t,"json",(function(){return r}));
/**
 * @license
 * Copyright 2022 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
const r=[{tfOpName:"EmptyTensorList",category:"control",inputs:[{start:0,name:"elementShape",type:"shape"},{start:1,name:"maxNumElements",type:"number"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"LoopCond",category:"control",inputs:[{start:0,name:"pred",type:"tensor"}]},{tfOpName:"Switch",category:"control",inputs:[{start:0,name:"data",type:"tensor"},{start:1,name:"pred",type:"tensor"}]},{tfOpName:"Merge",category:"control",inputs:[{start:0,end:0,name:"tensors",type:"tensors"}]},{tfOpName:"Enter",category:"control",inputs:[{start:0,name:"tensor",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0},{tfName:"frame_name",name:"frameName",type:"string"},{tfName:"is_constant",name:"isConstant",type:"bool"}]},{tfOpName:"Exit",category:"control",inputs:[{start:0,name:"tensor",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"NextIteration",category:"control",inputs:[{start:0,name:"tensor",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"TensorArrayV3",category:"control",inputs:[{start:0,name:"size",type:"number"}],attrs:[{tfName:"dtype",name:"dtype",type:"dtype"},{tfName:"element_shape",name:"elementShape",type:"shape"},{tfName:"dynamic_size",name:"dynamicSize",type:"bool"},{tfName:"clear_after_read",name:"clearAfterRead",type:"bool"},{tfName:"identical_element_shapes",name:"identicalElementShapes",type:"bool"},{tfName:"tensor_array_name",name:"name",type:"string"}]},{tfOpName:"TensorArrayWriteV3",category:"control",inputs:[{start:0,name:"tensorArrayId",type:"tensor"},{start:1,name:"index",type:"number"},{start:2,name:"tensor",type:"tensor"},{start:3,name:"flowIn",type:"number"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"TensorArrayReadV3",category:"control",inputs:[{start:0,name:"tensorArrayId",type:"tensor"},{start:1,name:"index",type:"number"},{start:2,name:"flowIn",type:"number"}],attrs:[{tfName:"dtype",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"TensorArrayGatherV3",category:"control",inputs:[{start:0,name:"tensorArrayId",type:"tensor"},{start:1,name:"indices",type:"number[]"},{start:2,name:"flowIn",type:"number"}],attrs:[{tfName:"dtype",name:"dtype",type:"dtype"},{tfName:"element_shape",name:"elementShape",type:"shape"}]},{tfOpName:"TensorArrayScatterV3",category:"control",inputs:[{start:0,name:"tensorArrayId",type:"tensor"},{start:1,name:"indices",type:"number[]"},{start:2,name:"tensor",type:"tensor"},{start:3,name:"flowIn",type:"number"}],attrs:[{tfName:"T",name:"dtype",type:"dtype"}]},{tfOpName:"TensorArrayConcatV3",category:"control",inputs:[{start:0,name:"tensorArrayId",type:"tensor"},{start:1,name:"flowIn",type:"number"}],attrs:[{tfName:"dtype",name:"dtype",type:"dtype"},{tfName:"element_shape_except0",name:"elementShapeExcept0",type:"shape",notSupported:!0}]},{tfOpName:"TensorArraySplitV3",category:"control",inputs:[{start:0,name:"tensorArrayId",type:"tensor"},{start:1,name:"tensor",type:"tensor"},{start:2,name:"lengths",type:"number[]"},{start:3,name:"flowIn",type:"number"}],attrs:[{tfName:"T",name:"dtype",type:"dtype"}]},{tfOpName:"TensorArraySizeV3",category:"control",inputs:[{start:0,name:"tensorArrayId",type:"tensor"},{start:1,name:"flowIn",type:"number"}]},{tfOpName:"TensorArrayCloseV3",category:"control",inputs:[{start:0,name:"tensorArrayId",type:"tensor"}]},{tfOpName:"StatelessIf",category:"control",inputs:[{start:0,name:"cond",type:"tensor"},{start:1,end:0,name:"args",type:"tensors"}],attrs:[{tfName:"then_branch",name:"thenBranch",type:"func"},{tfName:"else_branch",name:"elseBranch",type:"func"}]},{tfOpName:"If",category:"control",inputs:[{start:0,name:"cond",type:"tensor"},{start:1,end:0,name:"args",type:"tensors"}],attrs:[{tfName:"then_branch",name:"thenBranch",type:"func"},{tfName:"else_branch",name:"elseBranch",type:"func"}]},{tfOpName:"StatelessWhile",category:"control",inputs:[{start:0,end:0,name:"args",type:"tensors"}],attrs:[{tfName:"cond",name:"cond",type:"func"},{tfName:"body",name:"body",type:"func"}]},{tfOpName:"While",category:"control",inputs:[{start:0,end:0,name:"args",type:"tensors"}],attrs:[{tfName:"cond",name:"cond",type:"func"},{tfName:"body",name:"body",type:"func"}]},{tfOpName:"TensorListScatter",category:"control",inputs:[{start:0,name:"tensor",type:"tensor"},{start:1,name:"indices",type:"number[]"},{start:2,name:"elementShape",type:"shape"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListScatterV2",category:"control",inputs:[{start:0,name:"tensor",type:"tensor"},{start:1,name:"indices",type:"number[]"},{start:2,name:"elementShape",type:"shape"},{start:3,name:"numElements",type:"number"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListGather",category:"control",inputs:[{start:0,name:"tensorListId",type:"tensor"},{start:1,name:"indices",type:"number[]"},{start:2,name:"elementShape",type:"shape"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListGetItem",category:"control",inputs:[{start:0,name:"tensorListId",type:"tensor"},{start:1,name:"index",type:"number"},{start:2,name:"elementShape",type:"shape"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListSetItem",category:"control",inputs:[{start:0,name:"tensorListId",type:"tensor"},{start:1,name:"index",type:"number"},{start:2,name:"tensor",type:"tensor"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListReserve",category:"control",inputs:[{start:0,name:"elementShape",type:"shape"},{start:1,name:"numElements",type:"number"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListFromTensor",category:"control",inputs:[{start:0,name:"tensor",type:"tensor"},{start:1,name:"elementShape",type:"shape"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListStack",category:"control",inputs:[{start:0,name:"tensorListId",type:"tensor"},{start:1,name:"elementShape",type:"shape"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"},{tfName:"num_elements",name:"numElements",type:"dtype"}]},{tfOpName:"TensorListSplit",category:"control",inputs:[{start:0,name:"tensor",type:"tensor"},{start:1,name:"elementShape",type:"shape"},{start:2,name:"lengths",type:"number[]"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListConcat",category:"control",inputs:[{start:0,name:"tensorListId",type:"tensor"}],attrs:[{tfName:"element_shape",name:"elementShape",type:"shape"},{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListConcatV2",category:"control",inputs:[{start:0,name:"tensorListId",type:"tensor"}],attrs:[{tfName:"element_shape",name:"elementShape",type:"shape"},{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListPopBack",category:"control",inputs:[{start:0,name:"tensorListId",type:"tensor"},{start:1,name:"elementShape",type:"shape"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListPushBack",category:"control",inputs:[{start:0,name:"tensorListId",type:"tensor"},{start:1,name:"tensor",type:"tensor"}],attrs:[{tfName:"element_dtype",name:"elementDType",type:"dtype"}]},{tfOpName:"TensorListLength",category:"control",inputs:[{start:0,name:"tensorListId",type:"tensor"}]},{tfOpName:"TensorListResize",category:"control",inputs:[{start:0,name:"tensorListId",type:"tensor"},{start:1,name:"size",type:"number"}]}]},function(e,t,n){"use strict";n.r(t),n.d(t,"json",(function(){return r}));
/**
 * @license
 * Copyright 2022 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
const r=[{tfOpName:"AvgPool",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",notSupported:!0},{tfName:"ksize",name:"kernelSize",type:"number[]"},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"MaxPool",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",notSupported:!0},{tfName:"ksize",name:"kernelSize",type:"number[]"},{tfName:"explicit_paddings",name:"explicitPaddings",type:"number[]",defaultValue:[],notSupported:!0},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"MaxPoolWithArgmax",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"ksize",name:"kernelSize",type:"number[]"},{tfName:"include_batch_in_index",name:"includeBatchInIndex",type:"bool"},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"AvgPool3D",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",notSupported:!0},{tfName:"ksize",name:"kernelSize",type:"number[]"},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"MaxPool3D",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",notSupported:!0},{tfName:"ksize",name:"kernelSize",type:"number[]"},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Conv1D",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"filter",type:"tensor"}],attrs:[{tfName:"stride",name:"stride",type:"number"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",defaultValue:"NWC"},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0},{tfName:"dilation",name:"dilation",type:"number",defaultValue:1}]},{tfOpName:"Conv2D",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"filter",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0},{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"useCudnnOnGpu",name:"useCudnnOnGpu",type:"bool"},{tfName:"data_format",name:"dataFormat",type:"string",defaultValue:"NHWC"},{tfName:"explicit_paddings",name:"explicitPaddings",type:"number[]",defaultValue:[]},{tfName:"dilations",name:"dilations",type:"number[]"}]},{tfOpName:"_FusedConv2D",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"filter",type:"tensor"},{start:2,end:0,name:"args",type:"tensors"}],attrs:[{tfName:"num_args",name:"numArgs",type:"number"},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0},{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"explicit_paddings",name:"explicitPaddings",type:"number[]",defaultValue:[]},{tfName:"use_cudnn_on_gpu",name:"useCudnnOnGpu",type:"bool",defaultValue:!0},{tfName:"data_format",name:"dataFormat",type:"string",defaultValue:"NHWC"},{tfName:"dilations",name:"dilations",type:"number[]",defaultValue:[1,1,1,1]},{tfName:"fused_ops",name:"fusedOps",type:"string[]",defaultValue:[]},{tfName:"epsilon",name:"epsilon",type:"number",defaultValue:1e-4},{tfName:"leakyrelu_alpha",name:"leakyreluAlpha",type:"number",defaultValue:.2}]},{tfOpName:"Conv2DBackpropInput",category:"convolution",inputs:[{start:2,name:"x",type:"tensor"},{start:1,name:"filter",type:"tensor"},{start:0,name:"outputShape",type:"number[]"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",notSupported:!0},{tfName:"explicit_paddings",name:"explicitPaddings",type:"number[]",defaultValue:[]},{tfName:"dilations",name:"dilations",type:"number[]",notSupported:!0}]},{tfOpName:"DepthwiseConv2d",category:"convolution",inputs:[{start:0,name:"input",type:"tensor"},{start:1,name:"filter",type:"tensor"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",defaultValue:"NHWC"},{tfName:"explicit_paddings",name:"explicitPaddings",type:"number[]",defaultValue:[]},{tfName:"dilations",name:"dilations",type:"number[]"}]},{tfOpName:"DepthwiseConv2dNative",category:"convolution",inputs:[{start:0,name:"input",type:"tensor"},{start:1,name:"filter",type:"tensor"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",defaultValue:"NHWC"},{tfName:"explicit_paddings",name:"explicitPaddings",type:"number[]",defaultValue:[]},{tfName:"dilations",name:"dilations",type:"number[]"}]},{tfOpName:"FusedDepthwiseConv2dNative",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"filter",type:"tensor"},{start:2,end:0,name:"args",type:"tensors"}],attrs:[{tfName:"num_args",name:"numArgs",type:"number"},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0},{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",defaultValue:"NHWC"},{tfName:"dilations",name:"dilations",type:"number[]",defaultValue:[1,1,1,1]},{tfName:"fused_ops",name:"fusedOps",type:"string[]",defaultValue:[]},{tfName:"explicit_paddings",name:"explicitPaddings",type:"number[]",defaultValue:[]}]},{tfOpName:"Conv3D",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"filter",type:"tensor"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"padding",name:"pad",type:"string"},{tfName:"data_format",name:"dataFormat",type:"string",defaultValue:"NHWC"},{tfName:"dilations",name:"dilations",type:"number[]"}]},{tfOpName:"Dilation2D",category:"convolution",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"filter",type:"tensor"}],attrs:[{tfName:"strides",name:"strides",type:"number[]"},{tfName:"rates",name:"dilations",type:"number[]"},{tfName:"padding",name:"pad",type:"string"}]}]},function(e,t,n){"use strict";n.r(t),n.d(t,"json",(function(){return r}));
/**
 * @license
 * Copyright 2022 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
const r=[{tfOpName:"Fill",category:"creation",inputs:[{start:0,name:"shape",type:"number[]"},{start:1,name:"value",type:"number"}],attrs:[{tfName:"T",name:"dtype",type:"dtype"}]},{tfOpName:"LinSpace",category:"creation",inputs:[{start:0,name:"start",type:"number"},{start:1,name:"stop",type:"number"},{start:2,name:"num",type:"number"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"OneHot",category:"creation",inputs:[{start:0,name:"indices",type:"tensor"},{start:1,name:"depth",type:"number"},{start:2,name:"onValue",type:"number",defaultValue:1},{start:3,name:"offValue",type:"number",defaultValue:0}],attrs:[{tfName:"axis",name:"axis",type:"number",notSupported:!0},{tfName:"T",name:"dtype",type:"dtype"}]},{tfOpName:"Ones",category:"creation",inputs:[{start:0,name:"shape",type:"number[]"}],attrs:[{tfName:"T",name:"dtype",type:"dtype"}]},{tfOpName:"OnesLike",category:"creation",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"dtype",name:"dtype",type:"dtype"}]},{tfOpName:"RandomStandardNormal",category:"creation",inputs:[{start:0,name:"shape",type:"number[]"}],attrs:[{tfName:"seed",name:"seed",type:"number",defaultValue:0},{tfName:"seed2",name:"seed2",type:"number",defaultValue:0,notSupported:!0},{tfName:"dtype",name:"dtype",type:"dtype"},{tfName:"T",name:"T",type:"number",notSupported:!0}]},{tfOpName:"RandomUniform",category:"creation",inputs:[{start:0,name:"shape",type:"number[]"}],attrs:[{tfName:"minval",name:"minval",type:"number",defaultValue:0},{tfName:"maxval",name:"maxval",type:"number",defaultValue:1},{tfName:"dtype",name:"dtype",type:"dtype"},{tfName:"seed",name:"seed",type:"number",defaultValue:0},{tfName:"seed2",name:"seed2",type:"number",defaultValue:0,notSupported:!0},{tfName:"T",name:"T",type:"number",notSupported:!0}]},{tfOpName:"Range",category:"creation",inputs:[{start:0,name:"start",type:"number"},{start:1,name:"stop",type:"number"},{start:2,name:"step",type:"number",defaultValue:0}],attrs:[{tfName:"Tidx",name:"dtype",type:"dtype"}]},{tfOpName:"TruncatedNormal",category:"creation",inputs:[{start:0,name:"shape",type:"number[]"}],attrs:[{tfName:"means",name:"mean",type:"number",defaultValue:0},{tfName:"stddev",name:"stdDev",type:"number",defaultValue:1},{tfName:"seed",name:"seed",type:"number"},{tfName:"seed2",name:"seed2",type:"number",defaultValue:0,notSupported:!0},{tfName:"dtype",name:"dtype",type:"dtype"},{tfName:"T",name:"T",type:"number",notSupported:!0}]},{tfOpName:"Zeros",category:"creation",inputs:[{start:0,name:"shape",type:"number[]"}],attrs:[{tfName:"T",name:"dtype",type:"dtype"}]},{tfOpName:"ZerosLike",category:"creation",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype"}]},{tfOpName:"Multinomial",category:"creation",inputs:[{start:0,name:"logits",type:"tensor"},{start:1,name:"numSamples",type:"number"}],attrs:[{tfName:"seed",name:"seed",type:"number"},{tfName:"seed2",name:"seed2",type:"number"},{tfName:"T",name:"dtype",type:"dtype"},{tfName:"output_dtype",name:"output_dtype",type:"dtype"}]}]},function(e,t,n){"use strict";n.r(t),n.d(t,"json",(function(){return r}));
/**
 * @license
 * Copyright 2022 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
const r=[{tfOpName:"NonMaxSuppressionV2",category:"dynamic",inputs:[{start:0,name:"boxes",type:"tensor"},{start:1,name:"scores",type:"tensor"},{start:2,name:"maxOutputSize",type:"number"},{start:3,name:"iouThreshold",type:"number"}]},{tfOpName:"NonMaxSuppressionV3",category:"dynamic",inputs:[{start:0,name:"boxes",type:"tensor"},{start:1,name:"scores",type:"tensor"},{start:2,name:"maxOutputSize",type:"number"},{start:3,name:"iouThreshold",type:"number"},{start:4,name:"scoreThreshold",type:"number"}]},{tfOpName:"NonMaxSuppressionV4",category:"dynamic",inputs:[{start:0,name:"boxes",type:"tensor"},{start:1,name:"scores",type:"tensor"},{start:2,name:"maxOutputSize",type:"number"},{start:3,name:"iouThreshold",type:"number"},{start:4,name:"scoreThreshold",type:"number"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0},{tfName:"T_threshold",name:"threshold",type:"dtype",notSupported:!0},{tfName:"pad_to_max_output_size",name:"padToMaxOutputSize",type:"bool"}]},{tfOpName:"NonMaxSuppressionV5",category:"dynamic",inputs:[{start:0,name:"boxes",type:"tensor"},{start:1,name:"scores",type:"tensor"},{start:2,name:"maxOutputSize",type:"number"},{start:3,name:"iouThreshold",type:"number"},{start:4,name:"scoreThreshold",type:"number"},{start:5,name:"softNmsSigma",type:"number"}]},{tfOpName:"Where",category:"dynamic",inputs:[{start:0,name:"condition",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"ListDiff",category:"dynamic",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"y",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]}]},function(e,t,n){"use strict";n.r(t),n.d(t,"json",(function(){return r}));
/**
 * @license
 * Copyright 2022 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
const r=[{tfOpName:"LowerBound",category:"evaluation",inputs:[{start:0,name:"sortedSequence",type:"tensor"},{start:1,name:"values",type:"tensor"}]},{tfOpName:"TopKV2",category:"evaluation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"k",type:"number"}],attrs:[{tfName:"sorted",name:"sorted",type:"bool"}]},{tfOpName:"UpperBound",category:"evaluation",inputs:[{start:0,name:"sortedSequence",type:"tensor"},{start:1,name:"values",type:"tensor"}]},{tfOpName:"Unique",category:"evaluation",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"UniqueV2",category:"evaluation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number"}]}]},function(e,t,n){"use strict";n.r(t),n.d(t,"json",(function(){return r}));
/**
 * @license
 * Copyright 2022 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
const r=[{tfOpName:"PlaceholderWithDefault",category:"graph",inputs:[{start:0,name:"default",type:"tensor"}],attrs:[{tfName:"shape",name:"shape",type:"shape"},{tfName:"dtype",name:"dtype",type:"dtype"}]},{tfOpName:"Placeholder",category:"graph",attrs:[{tfName:"shape",name:"shape",type:"shape"},{tfName:"dtype",name:"dtype",type:"dtype"}]},{tfOpName:"Const",category:"graph"},{tfOpName:"Identity",category:"graph",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"IdentityN",category:"graph",inputs:[{start:0,end:0,name:"x",type:"tensors"}]},{tfOpName:"Snapshot",category:"graph",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"Rank",category:"graph",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"Size",category:"graph",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"Shape",category:"graph",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"ShapeN",category:"graph",inputs:[{start:0,end:0,name:"x",type:"tensors"}]},{tfOpName:"Print",category:"graph",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"data",type:"tensors"}],attrs:[{tfName:"message",name:"message",type:"string"},{tfName:"first_n",name:"firstN",type:"number",notSupported:!0},{tfName:"summarize",name:"summarize",type:"number",defaultValue:3}]},{tfOpName:"NoOp",category:"graph",inputs:[]},{tfOpName:"StopGradient",category:"graph",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"FakeQuantWithMinMaxVars",category:"graph",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"min",name:"min",type:"number"},{tfName:"max",name:"max",type:"number"}]}]},function(e,t,n){"use strict";n.r(t),n.d(t,"json",(function(){return r}));
/**
 * @license
 * Copyright 2022 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
const r=[{tfOpName:"HashTable",category:"hash_table",inputs:[],attrs:[{tfName:"shared_name",name:"sharedName",type:"string"},{tfName:"use_node_name_sharing",name:"useNodeNameSharing",type:"bool"},{tfName:"key_dtype",name:"keyDType",type:"dtype"},{tfName:"value_dtype",name:"valueDType",type:"dtype"}]},{tfOpName:"HashTableV2",category:"hash_table",inputs:[],attrs:[{tfName:"shared_name",name:"sharedName",type:"string"},{tfName:"use_node_name_sharing",name:"useNodeNameSharing",type:"bool"},{tfName:"key_dtype",name:"keyDType",type:"dtype"},{tfName:"value_dtype",name:"valueDType",type:"dtype"}]},{tfOpName:"LookupTableImport",category:"hash_table",inputs:[{start:0,name:"tableHandle",type:"tensor"},{start:1,name:"keys",type:"tensor"},{start:2,name:"values",type:"tensor"}],attrs:[{tfName:"Tin",name:"tIn",type:"dtype",notSupported:!0},{tfName:"Tout",name:"tOut",type:"dtype",notSupported:!0}]},{tfOpName:"LookupTableImportV2",category:"hash_table",inputs:[{start:0,name:"tableHandle",type:"tensor"},{start:1,name:"keys",type:"tensor"},{start:2,name:"values",type:"tensor"}],attrs:[{tfName:"Tin",name:"tIn",type:"dtype",notSupported:!0},{tfName:"Tout",name:"tOut",type:"dtype",notSupported:!0}]},{tfOpName:"LookupTableFind",category:"hash_table",inputs:[{start:0,name:"tableHandle",type:"tensor"},{start:1,name:"keys",type:"tensor"},{start:2,name:"defaultValue",type:"tensor"}],attrs:[{tfName:"Tin",name:"tIn",type:"dtype",notSupported:!0},{tfName:"Tout",name:"tOut",type:"dtype",notSupported:!0}]},{tfOpName:"LookupTableFindV2",category:"hash_table",inputs:[{start:0,name:"tableHandle",type:"tensor"},{start:1,name:"keys",type:"tensor"},{start:2,name:"defaultValue",type:"tensor"}],attrs:[{tfName:"Tin",name:"tIn",type:"dtype",notSupported:!0},{tfName:"Tout",name:"tOut",type:"dtype",notSupported:!0}]},{tfOpName:"LookupTableSize",category:"hash_table",inputs:[{start:0,name:"tableHandle",type:"tensor"}]},{tfOpName:"LookupTableSizeV2",category:"hash_table",inputs:[{start:0,name:"tableHandle",type:"tensor"}]},{tfOpName:"InitializeTable",category:"hash_table",inputs:[{start:0,name:"tableHandle",type:"tensor"},{start:1,name:"keys",type:"tensor"},{start:2,name:"values",type:"tensor"}]},{tfOpName:"InitializeTableV2",category:"hash_table",inputs:[{start:0,name:"tableHandle",type:"tensor"},{start:1,name:"keys",type:"tensor"},{start:2,name:"values",type:"tensor"}]}]},function(e,t,n){"use strict";n.r(t),n.d(t,"json",(function(){return r}));
/**
 * @license
 * Copyright 2022 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
const r=[{tfOpName:"ResizeBilinear",category:"image",inputs:[{start:0,name:"images",type:"tensor"},{start:1,name:"size",type:"number[]"}],attrs:[{tfName:"align_corners",name:"alignCorners",type:"bool"},{tfName:"half_pixel_centers",name:"halfPixelCenters",type:"bool"},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"ResizeNearestNeighbor",category:"image",inputs:[{start:0,name:"images",type:"tensor"},{start:1,name:"size",type:"number[]"}],attrs:[{tfName:"align_corners",name:"alignCorners",type:"bool"},{tfName:"half_pixel_centers",name:"halfPixelCenters",type:"bool"},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"CropAndResize",category:"image",inputs:[{start:0,name:"image",type:"tensor"},{start:1,name:"boxes",type:"tensor"},{start:2,name:"boxInd",type:"tensor"},{start:3,name:"cropSize",type:"number[]"}],attrs:[{tfName:"method",name:"method",type:"string"},{tfName:"extrapolation_value",name:"extrapolationValue",type:"number"}]},{tfOpName:"ImageProjectiveTransformV3",category:"image",inputs:[{start:0,name:"images",type:"tensor"},{start:1,name:"transforms",type:"tensor"},{start:2,name:"outputShape",type:"number[]"},{start:3,name:"fillValue",type:"number"}],attrs:[{tfName:"interpolation",name:"interpolation",type:"string"},{tfName:"fill_mode",name:"fillMode",type:"string"}]}]},function(e,t,n){"use strict";n.r(t),n.d(t,"json",(function(){return r}));
/**
 * @license
 * Copyright 2022 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
const r=[{tfOpName:"Equal",category:"logical",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"NotEqual",category:"logical",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Greater",category:"logical",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"GreaterEqual",category:"logical",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Less",category:"logical",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"LessEqual",category:"logical",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"LogicalAnd",category:"logical",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"LogicalNot",category:"logical",inputs:[{start:0,name:"a",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"LogicalOr",category:"logical",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Select",category:"logical",inputs:[{start:0,name:"condition",type:"tensor"},{start:1,name:"a",type:"tensor"},{start:2,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"SelectV2",category:"logical",inputs:[{start:0,name:"condition",type:"tensor"},{start:1,name:"a",type:"tensor"},{start:2,name:"b",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]}]},function(e,t,n){"use strict";n.r(t),n.d(t,"json",(function(){return r}));
/**
 * @license
 * Copyright 2022 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
const r=[{tfOpName:"_FusedMatMul",category:"matrices",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"},{start:2,end:0,name:"args",type:"tensors"}],attrs:[{tfName:"num_args",name:"numArgs",type:"number"},{tfName:"fused_ops",name:"fusedOps",type:"string[]",defaultValue:[]},{tfName:"epsilon",name:"epsilon",type:"number",defaultValue:1e-4},{tfName:"transpose_a",name:"transposeA",type:"bool",defaultValue:!1},{tfName:"transpose_b",name:"transposeB",type:"bool",defaultValue:!1},{tfName:"leakyrelu_alpha",name:"leakyreluAlpha",type:"number",defaultValue:.2},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"MatMul",category:"matrices",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"transpose_a",name:"transposeA",type:"bool",defaultValue:!1},{tfName:"transpose_b",name:"transposeB",type:"bool",defaultValue:!1},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"BatchMatMul",category:"matrices",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"adj_x",name:"transposeA",type:"bool",defaultValue:!1},{tfName:"adj_y",name:"transposeB",type:"bool",defaultValue:!1},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"BatchMatMulV2",category:"matrices",inputs:[{start:0,name:"a",type:"tensor"},{start:1,name:"b",type:"tensor"}],attrs:[{tfName:"adj_x",name:"transposeA",type:"bool",defaultValue:!1},{tfName:"adj_y",name:"transposeB",type:"bool",defaultValue:!1},{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Transpose",category:"matrices",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"perm",type:"number[]"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"Einsum",category:"matrices",inputs:[{start:0,end:0,name:"tensors",type:"tensors"}],attrs:[{tfName:"equation",name:"equation",type:"string"},{tfName:"N",name:"n",type:"number",defaultValue:2},{tfName:"T",name:"dtype",type:"dtype"}]}]},function(e,t,n){"use strict";n.r(t),n.d(t,"json",(function(){return r}));
/**
 * @license
 * Copyright 2022 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
const r=[{tfOpName:"EuclideanNorm",category:"normalization",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number[]"}],attrs:[{tfName:"keep_dims",name:"keepDims",type:"bool",defaultValue:!1}]},{tfOpName:"FusedBatchNorm",category:"normalization",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"scale",type:"tensor"},{start:2,name:"offset",type:"tensor"},{start:3,name:"mean",type:"tensor"},{start:4,name:"variance",type:"tensor"}],attrs:[{tfName:"epsilon",name:"epsilon",type:"number",defaultValue:.001},{tfName:"data_format",name:"dataFormat",type:"string",notSupported:!0}]},{tfOpName:"FusedBatchNormV2",category:"normalization",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"scale",type:"tensor"},{start:2,name:"offset",type:"tensor"},{start:3,name:"mean",type:"tensor"},{start:4,name:"variance",type:"tensor"}],attrs:[{tfName:"epsilon",name:"epsilon",type:"number",defaultValue:.001},{tfName:"data_format",name:"dataFormat",type:"string",notSupported:!0}]},{tfOpName:"FusedBatchNormV3",category:"normalization",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"scale",type:"tensor"},{start:2,name:"offset",type:"tensor"},{start:3,name:"mean",type:"tensor"},{start:4,name:"variance",type:"tensor"}],attrs:[{tfName:"epsilon",name:"epsilon",type:"number",defaultValue:.001},{tfName:"data_format",name:"dataFormat",type:"string",notSupported:!0}]},{tfOpName:"LRN",category:"normalization",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"depth_radius",name:"radius",type:"number",defaultValue:5},{tfName:"bias",name:"bias",type:"number",defaultValue:1},{tfName:"alpha",name:"alpha",type:"number",defaultValue:1},{tfName:"beta",name:"beta",type:"number",defaultValue:.5}]},{tfOpName:"Softmax",category:"normalization",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"LogSoftmax",category:"normalization",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"SparseToDense",category:"normalization",inputs:[{start:0,name:"sparseIndices",type:"tensor"},{start:1,name:"outputShape",type:"number[]"},{start:2,name:"sparseValues",type:"tensor"},{start:3,name:"defaultValue",type:"tensor"}],attrs:[{tfName:"validate_indices",name:"validateIndices",type:"bool",defaultValue:!0,notSupported:!0}]}]},function(e,t,n){"use strict";n.r(t),n.d(t,"json",(function(){return r}));
/**
 * @license
 * Copyright 2022 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
const r=[{tfOpName:"Bincount",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"size",type:"number"},{start:2,name:"weights",type:"tensor"}]},{tfOpName:"DenseBincount",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"size",type:"number"},{start:2,name:"weights",type:"tensor"}],attrs:[{tfName:"binary_output",name:"binaryOutput",type:"bool"}]},{tfOpName:"Max",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number[]"}],attrs:[{tfName:"keep_dims",name:"keepDims",type:"bool"}]},{tfOpName:"Mean",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number[]"}],attrs:[{tfName:"keep_dims",name:"keepDims",type:"bool"}]},{tfOpName:"Min",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number[]"}],attrs:[{tfName:"keep_dims",name:"keepDims",type:"bool"}]},{tfOpName:"Sum",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number[]"}],attrs:[{tfName:"keep_dims",name:"keepDims",type:"bool"}]},{tfOpName:"All",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number[]"}],attrs:[{tfName:"keep_dims",name:"keepDims",type:"bool"}]},{tfOpName:"Any",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number[]"}],attrs:[{tfName:"keep_dims",name:"keepDims",type:"bool"}]},{tfOpName:"ArgMax",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number"}]},{tfOpName:"ArgMin",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number"}]},{tfOpName:"Prod",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number[]"}],attrs:[{tfName:"keep_dims",name:"keepDims",type:"bool"}]},{tfOpName:"Cumprod",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number"}],attrs:[{tfName:"exclusive",name:"exclusive",type:"bool"},{tfName:"reverse",name:"reverse",type:"bool"}]},{tfOpName:"Cumsum",category:"reduction",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number"}],attrs:[{tfName:"exclusive",name:"exclusive",type:"bool"},{tfName:"reverse",name:"reverse",type:"bool"}]}]},function(e,t,n){"use strict";n.r(t),n.d(t,"json",(function(){return r}));
/**
 * @license
 * Copyright 2022 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
const r=[{tfOpName:"ConcatV2",category:"slice_join",inputs:[{start:0,end:-1,name:"tensors",type:"tensors"},{start:-1,name:"axis",type:"number"}],attrs:[{tfName:"N",name:"n",type:"number",defaultValue:2}]},{tfOpName:"Concat",category:"slice_join",inputs:[{start:1,end:0,name:"tensors",type:"tensors"},{start:0,name:"axis",type:"number"}],attrs:[{tfName:"N",name:"n",type:"number",defaultValue:2}]},{tfOpName:"GatherV2",category:"slice_join",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"indices",type:"tensor"},{start:2,name:"axis",type:"number",defaultValue:0}],attrs:[{tfName:"batch_dims",name:"batchDims",type:"number",defaultValue:0}]},{tfOpName:"Gather",category:"slice_join",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"indices",type:"tensor"}],attrs:[{tfName:"validate_indices",name:"validateIndices",type:"bool",notSupported:!0}]},{tfOpName:"Reverse",category:"slice_join",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"dims",type:"bool[]"}]},{tfOpName:"ReverseV2",category:"slice_join",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number[]"}]},{tfOpName:"Slice",category:"slice_join",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"begin",type:"number[]"},{start:2,name:"size",type:"number[]"}]},{tfOpName:"StridedSlice",category:"slice_join",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"begin",type:"number[]"},{start:2,name:"end",type:"number[]"},{start:3,name:"strides",type:"number[]"}],attrs:[{tfName:"begin_mask",name:"beginMask",type:"number",defaultValue:0},{tfName:"end_mask",name:"endMask",type:"number",defaultValue:0},{tfName:"new_axis_mask",name:"newAxisMask",type:"number",defaultValue:0},{tfName:"ellipsis_mask",name:"ellipsisMask",type:"number",defaultValue:0},{tfName:"shrink_axis_mask",name:"shrinkAxisMask",type:"number",defaultValue:0}]},{tfOpName:"Pack",category:"slice_join",inputs:[{start:0,end:0,name:"tensors",type:"tensors"}],attrs:[{tfName:"axis",name:"axis",type:"number",defaultValue:0}]},{tfOpName:"Unpack",category:"slice_join",inputs:[{start:0,name:"tensor",type:"tensor"}],attrs:[{tfName:"axis",name:"axis",type:"number",defaultValue:0},{tfName:"num",name:"num",type:"number",defaultValue:0,notSupported:!0}]},{tfOpName:"Tile",category:"slice_join",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"reps",type:"number[]"}]},{tfOpName:"Split",category:"slice_join",inputs:[{start:0,name:"axis",type:"number",defaultValue:0},{start:1,name:"x",type:"tensor"}],attrs:[{tfName:"num_split",name:"numOrSizeSplits",type:"number",defaultValue:1}]},{tfOpName:"SplitV",category:"slice_join",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"numOrSizeSplits",type:"number[]"},{start:2,name:"axis",type:"number",defaultValue:0}]},{tfOpName:"ScatterNd",category:"slice_join",inputs:[{start:0,name:"indices",type:"tensor"},{start:1,name:"values",type:"tensor"},{start:2,name:"shape",type:"number[]"}]},{tfOpName:"GatherNd",category:"slice_join",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"indices",type:"tensor"}]},{tfOpName:"SparseToDense",category:"slice_join",inputs:[{start:0,name:"sparseIndices",type:"tensor"},{start:1,name:"outputShape",type:"number[]"},{start:2,name:"sparseValues",type:"tensor"},{start:3,name:"defaultValue",type:"tensor"}],attrs:[{tfName:"validate_indices",name:"validateIndices",type:"bool",defaultValue:!1,notSupported:!0}]}]},function(e,t,n){"use strict";n.r(t),n.d(t,"json",(function(){return r}));
/**
 * @license
 * Copyright 2022 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
const r=[{tfOpName:"SparseFillEmptyRows",category:"sparse",inputs:[{start:0,name:"indices",type:"tensor"},{start:1,name:"values",type:"tensor"},{start:2,name:"denseShape",type:"tensor"},{start:3,name:"defaultValue",type:"tensor"}]},{tfOpName:"SparseReshape",category:"sparse",inputs:[{start:0,name:"inputIndices",type:"tensor"},{start:1,name:"inputShape",type:"tensor"},{start:2,name:"newShape",type:"tensor"}],attrs:[{tfName:"T",name:"dtype",type:"dtype",notSupported:!0}]},{tfOpName:"SparseSegmentMean",category:"sparse",inputs:[{start:0,name:"data",type:"tensor"},{start:1,name:"indices",type:"tensor"},{start:2,name:"segmentIds",type:"tensor"}]},{tfOpName:"SparseSegmentSum",category:"sparse",inputs:[{start:0,name:"data",type:"tensor"},{start:1,name:"indices",type:"tensor"},{start:2,name:"segmentIds",type:"tensor"}]}]},function(e,t,n){"use strict";n.r(t),n.d(t,"json",(function(){return r}));
/**
 * @license
 * Copyright 2022 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
const r=[{tfOpName:"FFT",category:"spectral",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"IFFT",category:"spectral",inputs:[{start:0,name:"x",type:"tensor"}]},{tfOpName:"RFFT",category:"spectral",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"fft_length",type:"number",notSupported:!0}]},{tfOpName:"IRFFT",category:"spectral",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"fft_length",type:"number",notSupported:!0}]}]},function(e,t,n){"use strict";n.r(t),n.d(t,"json",(function(){return r}));
/**
 * @license
 * Copyright 2022 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
const r=[{tfOpName:"StringNGrams",category:"string",inputs:[{start:0,name:"data",type:"tensor"},{start:1,name:"dataSplits",type:"tensor"}],attrs:[{tfName:"separator",name:"separator",type:"string"},{tfName:"ngram_widths",name:"nGramWidths",type:"number[]"},{tfName:"left_pad",name:"leftPad",type:"string"},{tfName:"right_pad",name:"rightPad",type:"string"},{tfName:"pad_width",name:"padWidth",type:"number"},{tfName:"preserve_short_sequences",name:"preserveShortSequences",type:"bool"}],outputs:["ngrams","ngrams_splits"]},{tfOpName:"StringSplit",category:"string",inputs:[{start:0,name:"input",type:"tensor"},{start:1,name:"delimiter",type:"tensor"}],attrs:[{tfName:"skip_empty",name:"skipEmpty",type:"bool"}],outputs:["indices","values","shape"]},{tfOpName:"StringToHashBucketFast",category:"string",inputs:[{start:0,name:"input",type:"tensor"}],attrs:[{tfName:"num_buckets",name:"numBuckets",type:"number"}]}]},function(e,t,n){"use strict";n.r(t),n.d(t,"json",(function(){return r}));
/**
 * @license
 * Copyright 2022 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */
const r=[{tfOpName:"Cast",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"SrcT",name:"sdtype",type:"dtype",notSupported:!0},{tfName:"DstT",name:"dtype",type:"dtype"}]},{tfOpName:"ExpandDims",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"axis",type:"number"}]},{tfOpName:"MirrorPad",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"padding",type:"number[]"}],attrs:[{tfName:"mode",name:"mode",type:"string"}]},{tfOpName:"Pad",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"padding",type:"number[]"}],attrs:[{tfName:"constant_value",name:"constantValue",type:"number",defaultValue:0}]},{tfOpName:"PadV2",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"padding",type:"number[]"},{start:2,name:"constantValue",type:"number",defaultValue:0}]},{tfOpName:"Reshape",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"shape",type:"number[]"}]},{tfOpName:"Squeeze",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"axis",tfDeprecatedName:"squeeze_dims",name:"axis",type:"number[]"}]},{tfOpName:"SpaceToBatchND",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"blockShape",type:"number[]"},{start:2,name:"paddings",type:"number[]"}]},{tfOpName:"BatchToSpaceND",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"blockShape",type:"number[]"},{start:2,name:"crops",type:"number[]"}]},{tfOpName:"DepthToSpace",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"}],attrs:[{tfName:"block_size",name:"blockSize",type:"number"},{tfName:"data_format",name:"dataFormat",type:"string"}]},{tfOpName:"BroadcastTo",category:"transformation",inputs:[{start:0,name:"x",type:"tensor"},{start:1,name:"shape",type:"number[]"}],attrs:[]},{tfOpName:"BroadcastArgs",category:"transformation",inputs:[{start:0,name:"s0",type:"tensor"},{start:1,name:"s1",type:"tensor"}],attrs:[]}]},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return a}));var r=n(0),i=n(55),o=n(303);
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * =============================================================================
 */class a extends i.a{decodeUTF8(){return new s(this)}}class s extends o.a{constructor(e){super(),this.upstream=e,this.impl=new u(e)}summary(){return this.impl.summary()}async next(){return this.impl.next()}}class u extends i.b{constructor(e){if(super(),this.upstream=e,Object(r.hf)().get("IS_BROWSER"))this.decoder=new TextDecoder("utf-8");else{const e=n(378).StringDecoder;this.decoder=new e("utf8")}}summary(){return this.upstream.summary()+" -> Utf8"}async pump(){var t=await this.upstream.next();let n,i;return!t.done&&(n=t.value,i=Object(r.hf)().get("IS_BROWSER")?this.decoder.decode(n,{stream:!0}):this.decoder.write(e.from(n.buffer)),this.outputQueue.push(i),!0)}}}).call(this,n(163).Buffer)},function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),t=n(55);
/**
 * @license
 * Copyright 2018 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * =============================================================================
 */
class r extends t.a{split(e){return new i(this,e)}}class i extends r{constructor(e,t){super(),this.upstream=e,this.impl=new o(e,t)}summary(){return this.impl.summary()}async next(){return this.impl.next()}}class o extends t.b{constructor(e,t){super(),this.upstream=e,this.separator=t,this.carryover=""}summary(){return`${this.upstream.summary()} -> Split('${this.separator}')`}async pump(){const e=await this.upstream.next();if(e.done)return""!==this.carryover&&(this.outputQueue.push(this.carryover),!(this.carryover=""));const t=e.value.split(this.separator);t[0]=this.carryover+t[0];for(const e of t.slice(0,-1))this.outputQueue.push(e);return this.carryover=t[t.length-1],!0}}},function(e,t,n){var r=n(380);e.exports=function(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){(function(e){var n;function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
/*! For license information please see jsencrypt.min.js.LICENSE.txt */window,n=function(){return t={155:function(e){var t,n;e=e.exports={};function r(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function o(e){if(t===setTimeout)return setTimeout(e,0);if((t===r||!t)&&setTimeout)return(t=setTimeout)(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}try{t="function"==typeof setTimeout?setTimeout:r}catch(e){t=r}try{n="function"==typeof clearTimeout?clearTimeout:i}catch(e){n=i}var a,s=[],u=!1,c=-1;function l(){u&&a&&(u=!1,a.length?s=a.concat(s):c=-1,s.length&&h())}function h(){if(!u){var e=o(l);u=!0;for(var t=s.length;t;){for(a=s,s=[];++c<t;)a&&a[c].run();c=-1,t=s.length}a=null,u=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===i||!n)&&clearTimeout)return(n=clearTimeout)(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function d(){}e.nextTick=function(e){var t=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];s.push(new f(e,t)),1!==s.length||u||o(h)},f.prototype.run=function(){this.fun.apply(null,this.array)},e.title="browser",e.browser=!0,e.env={},e.argv=[],e.version="",e.versions={},e.on=d,e.addListener=d,e.once=d,e.off=d,e.removeListener=d,e.removeAllListeners=d,e.emit=d,e.prependListener=d,e.prependOnceListener=d,e.listeners=function(e){return[]},e.binding=function(e){throw new Error("process.binding is not supported")},e.cwd=function(){return"/"},e.chdir=function(e){throw new Error("process.chdir is not supported")},e.umask=function(){return 0}}},n={},e.d=function(t,n){for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},e.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r={},function(){"use strict";function t(e){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(e)}function n(e,t){return e&t}function i(e,t){return e|t}function o(e,t){return e^t}function a(e,t){return e&~t}e.d(r,{default:function(){return ue}});var s,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function c(e){for(var t,n="",r=0;r+3<=e.length;r+=3)t=parseInt(e.substring(r,r+3),16),n+=u.charAt(t>>6)+u.charAt(63&t);for(r+1==e.length?(t=parseInt(e.substring(r,r+1),16),n+=u.charAt(t<<2)):r+2==e.length&&(t=parseInt(e.substring(r,r+2),16),n+=u.charAt(t>>2)+u.charAt((3&t)<<4));0<(3&n.length);)n+="=";return n}function l(e){for(var n="",r=0,i=0,o=0;o<e.length&&"="!=e.charAt(o);++o){var a=u.indexOf(e.charAt(o));a<0||(r=0==r?(n+=t(a>>2),i=3&a,1):1==r?(n+=t(i<<2|a>>4),i=15&a,2):2==r?(n=(n+=t(i))+t(a>>2),i=3&a,3):(n=(n+=t(i<<2|a>>4))+t(15&a),0))}return 1==r&&(n+=t(i<<2)),n}var h,f={decode:function(e){if(void 0===h){var t="= \f\n\r\t \u2028\u2029";for(h=Object.create(null),o=0;o<64;++o)h["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(o)]=o;for(h["-"]=62,h._=63,o=0;o<t.length;++o)h[t.charAt(o)]=-1}for(var n=[],r=0,i=0,o=0;o<e.length;++o){var a=e.charAt(o);if("="==a)break;if(-1!=(a=h[a])){if(void 0===a)throw new Error("Illegal character at offset "+o);r|=a,4<=++i?(n[n.length]=r>>16,n[n.length]=r>>8&255,n[n.length]=255&r,i=r=0):r<<=6}}switch(i){case 1:throw new Error("Base64 encoding incomplete: at least 2 bits missing");case 2:n[n.length]=r>>10;break;case 3:n[n.length]=r>>16,n[n.length]=r>>8&255}return n},re:/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,unarmor:function(e){var t=f.re.exec(e);if(t)if(t[1])e=t[1];else{if(!t[2])throw new Error("RegExp out of sync");e=t[2]}return f.decode(e)}},d=(g.prototype.mulAdd=function(e,t){for(var n,r=this.buf,i=r.length,o=0;o<i;++o)(n=r[o]*e+t)<1e13?t=0:n-=1e13*(t=0|n/1e13),r[o]=n;0<t&&(r[o]=t)},g.prototype.sub=function(e){for(var t,n=this.buf,r=n.length,i=0;i<r;++i)e=(t=n[i]-e)<0?(t+=1e13,1):0,n[i]=t;for(;0===n[n.length-1];)n.pop()},g.prototype.toString=function(e){if(10!=(e||10))throw new Error("only base 10 is supported");for(var t=this.buf,n=t[t.length-1].toString(),r=t.length-2;0<=r;--r)n+=(1e13+t[r]).toString().substring(1);return n},g.prototype.valueOf=function(){for(var e=this.buf,t=0,n=e.length-1;0<=n;--n)t=1e13*t+e[n];return t},g.prototype.simplify=function(){var e=this.buf;return 1==e.length?e[0]:this},g),p=/^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,m=/^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;function g(e){this.buf=[+e||0]}function A(e,t){return e.length>t?e.substring(0,t)+"…":e}N.prototype.get=function(e){if((e=void 0===e?this.pos++:e)>=this.enc.length)throw new Error("Requesting byte offset ".concat(e," on a stream of length ").concat(this.enc.length));return"string"==typeof this.enc?this.enc.charCodeAt(e):this.enc[e]},N.prototype.hexByte=function(e){return this.hexDigits.charAt(e>>4&15)+this.hexDigits.charAt(15&e)},N.prototype.hexDump=function(e,t,n){for(var r="",i=e;i<t;++i)if(r+=this.hexByte(this.get(i)),!0!==n)switch(15&i){case 7:r+="  ";break;case 15:r+="\n";break;default:r+=" "}return r},N.prototype.isASCII=function(e,t){for(var n=e;n<t;++n){var r=this.get(n);if(r<32||176<r)return!1}return!0},N.prototype.parseStringISO=function(e,t){for(var n="",r=e;r<t;++r)n+=String.fromCharCode(this.get(r));return n},N.prototype.parseStringUTF=function(e,t){for(var n="",r=e;r<t;){var i=this.get(r++);n+=i<128?String.fromCharCode(i):191<i&&i<224?String.fromCharCode((31&i)<<6|63&this.get(r++)):String.fromCharCode((15&i)<<12|(63&this.get(r++))<<6|63&this.get(r++))}return n},N.prototype.parseStringBMP=function(e,t){for(var n,r,i="",o=e;o<t;)n=this.get(o++),r=this.get(o++),i+=String.fromCharCode(n<<8|r);return i},N.prototype.parseTime=function(e,t,n){return e=this.parseStringISO(e,t),(t=(n?p:m).exec(e))?(n&&(t[1]=+t[1],t[1]+=+t[1]<70?2e3:1900),e=t[1]+"-"+t[2]+"-"+t[3]+" "+t[4],t[5]&&(e+=":"+t[5],t[6]&&(e+=":"+t[6],t[7]&&(e+="."+t[7]))),t[8]&&(e+=" UTC","Z"!=t[8]&&(e+=t[8],t[9]&&(e+=":"+t[9]))),e):"Unrecognized time: "+e},N.prototype.parseInteger=function(e,t){for(var n,r=this.get(e),i=127<r,o=i?255:0,a="";r==o&&++e<t;)r=this.get(e);if(0==(n=t-e))return i?-1:0;if(4<n){for(a=r,n<<=3;0==(128&(+a^o));)a=+a<<1,--n;a="("+n+" bit)\n"}i&&(r-=256);for(var s=new d(r),u=e+1;u<t;++u)s.mulAdd(256,this.get(u));return a+s.toString()},N.prototype.parseBitString=function(e,t,n){for(var r=this.get(e),i="("+((t-e-1<<3)-r)+" bit)\n",o="",a=e+1;a<t;++a){for(var s=this.get(a),u=a==t-1?r:0,c=7;u<=c;--c)o+=s>>c&1?"1":"0";if(o.length>n)return i+A(o,n)}return i+o},N.prototype.parseOctetString=function(e,t,n){if(this.isASCII(e,t))return A(this.parseStringISO(e,t),n);var r=t-e,i="("+r+" byte)\n";r>(n/=2)&&(t=e+n);for(var o=e;o<t;++o)i+=this.hexByte(this.get(o));return n<r&&(i+="…"),i},N.prototype.parseOID=function(e,t,n){for(var r="",i=new d,o=0,a=e;a<t;++a){var s=this.get(a);if(i.mulAdd(128,127&s),o+=7,!(128&s)){if(""===r?r=(i=i.simplify())instanceof d?(i.sub(80),"2."+i.toString()):(s=i<80?i<40?0:1:2)+"."+(i-40*s):r+="."+i.toString(),r.length>n)return A(r,n);i=new d,o=0}}return 0<o&&(r+=".incomplete"),r};var v=N,b=(j.prototype.typeName=function(){switch(this.tag.tagClass){case 0:switch(this.tag.tagNumber){case 0:return"EOC";case 1:return"BOOLEAN";case 2:return"INTEGER";case 3:return"BIT_STRING";case 4:return"OCTET_STRING";case 5:return"NULL";case 6:return"OBJECT_IDENTIFIER";case 7:return"ObjectDescriptor";case 8:return"EXTERNAL";case 9:return"REAL";case 10:return"ENUMERATED";case 11:return"EMBEDDED_PDV";case 12:return"UTF8String";case 16:return"SEQUENCE";case 17:return"SET";case 18:return"NumericString";case 19:return"PrintableString";case 20:return"TeletexString";case 21:return"VideotexString";case 22:return"IA5String";case 23:return"UTCTime";case 24:return"GeneralizedTime";case 25:return"GraphicString";case 26:return"VisibleString";case 27:return"GeneralString";case 28:return"UniversalString";case 30:return"BMPString"}return"Universal_"+this.tag.tagNumber.toString();case 1:return"Application_"+this.tag.tagNumber.toString();case 2:return"["+this.tag.tagNumber.toString()+"]";case 3:return"Private_"+this.tag.tagNumber.toString()}},j.prototype.content=function(e){if(void 0!==this.tag){void 0===e&&(e=1/0);var t=this.posContent(),n=Math.abs(this.length);if(!this.tag.isUniversal())return null!==this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(t,t+n,e);switch(this.tag.tagNumber){case 1:return 0===this.stream.get(t)?"false":"true";case 2:return this.stream.parseInteger(t,t+n);case 3:return this.sub?"("+this.sub.length+" elem)":this.stream.parseBitString(t,t+n,e);case 4:return this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(t,t+n,e);case 6:return this.stream.parseOID(t,t+n,e);case 16:case 17:return null!==this.sub?"("+this.sub.length+" elem)":"(no elem)";case 12:return A(this.stream.parseStringUTF(t,t+n),e);case 18:case 19:case 20:case 21:case 22:case 26:return A(this.stream.parseStringISO(t,t+n),e);case 30:return A(this.stream.parseStringBMP(t,t+n),e);case 23:case 24:return this.stream.parseTime(t,t+n,23==this.tag.tagNumber)}}return null},j.prototype.toString=function(){return this.typeName()+"@"+this.stream.pos+"[header:"+this.header+",length:"+this.length+",sub:"+(null===this.sub?"null":this.sub.length)+"]"},j.prototype.toPrettyString=function(e){var t=(e=void 0===e?"":e)+this.typeName()+" @"+this.stream.pos;if(0<=this.length&&(t+="+"),t+=this.length,this.tag.tagConstructed?t+=" (constructed)":!this.tag.isUniversal()||3!=this.tag.tagNumber&&4!=this.tag.tagNumber||null===this.sub||(t+=" (encapsulates)"),t+="\n",null!==this.sub){e+="  ";for(var n=0,r=this.sub.length;n<r;++n)t+=this.sub[n].toPrettyString(e)}return t},j.prototype.posStart=function(){return this.stream.pos},j.prototype.posContent=function(){return this.stream.pos+this.header},j.prototype.posEnd=function(){return this.stream.pos+this.header+Math.abs(this.length)},j.prototype.toHexString=function(){return this.stream.hexDump(this.posStart(),this.posEnd(),!0)},j.decodeLength=function(e){var t=127&(n=e.get());if(t==n)return t;if(6<t)throw new Error("Length over 48 bits not supported at position "+(e.pos-1));if(0==t)return null;for(var n=0,r=0;r<t;++r)n=256*n+e.get();return n},j.prototype.getHexStringValue=function(){var e=this.toHexString(),t=2*this.header,n=2*this.length;return e.substr(t,n)},j.decode=function(e){function t(){var e=[];if(null!==i){for(var t=o+i;n.pos<t;)e[e.length]=j.decode(n);if(n.pos!=t)throw new Error("Content size is not correct for container starting at offset "+o)}else try{for(;;){var r=j.decode(n);if(r.tag.isEOC())break;e[e.length]=r}i=o-n.pos}catch(e){throw new Error("Exception while decoding undefined length content: "+e)}return e}var n=e instanceof v?e:new v(e,0),r=(e=new v(n),new y(n)),i=j.decodeLength(n),o=n.pos,a=o-e.pos,s=null;if(r.tagConstructed)s=t();else if(r.isUniversal()&&(3==r.tagNumber||4==r.tagNumber))try{if(3==r.tagNumber&&0!=n.get())throw new Error("BIT STRINGs with unused bits cannot encapsulate.");s=t();for(var u=0;u<s.length;++u)if(s[u].tag.isEOC())throw new Error("EOC is not supposed to be actual content.")}catch(e){s=null}if(null===s){if(null===i)throw new Error("We can't skip over an invalid tag with undefined length at offset "+o);n.pos=o+Math.abs(i)}return new j(e,a,i,r,s)},j),y=(M.prototype.isUniversal=function(){return 0===this.tagClass},M.prototype.isEOC=function(){return 0===this.tagClass&&0===this.tagNumber},M),w=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],x=(1<<26)/w[w.length-1],C=(I.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var n;if(16==e)n=4;else if(8==e)n=3;else if(2==e)n=1;else if(32==e)n=5;else{if(4!=e)return this.toRadix(e);n=2}var r,i=(1<<n)-1,o=!1,a="",s=this.t,u=this.DB-s*this.DB%n;if(0<s--)for(u<this.DB&&0<(r=this[s]>>u)&&(o=!0,a=t(r));0<=s;)u<n?(r=(this[s]&(1<<u)-1)<<n-u,r|=this[--s]>>(u+=this.DB-n)):(r=this[s]>>(u-=n)&i,u<=0&&(u+=this.DB,--s)),(o=0<r||o)&&(a+=t(r));return o?a:"0"},I.prototype.negate=function(){var e=F();return I.ZERO.subTo(this,e),e},I.prototype.abs=function(){return this.s<0?this.negate():this},I.prototype.compareTo=function(e){var t=this.s-e.s;if(0!=t)return t;var n=this.t;if(0!=(t=n-e.t))return this.s<0?-t:t;for(;0<=--n;)if(0!=(t=this[n]-e[n]))return t;return 0},I.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+Q(this[this.t-1]^this.s&this.DM)},I.prototype.mod=function(e){var t=F();return this.abs().divRemTo(e,null,t),this.s<0&&0<t.compareTo(I.ZERO)&&e.subTo(t,t),t},I.prototype.modPowInt=function(e,t){return t=new(e<256||t.isEven()?E:S)(t),this.exp(e,t)},I.prototype.clone=function(){var e=F();return this.copyTo(e),e},I.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},I.prototype.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},I.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},I.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},I.prototype.toByteArray=function(){var e=this.t,t=[];t[0]=this.s;var n,r=this.DB-e*this.DB%8,i=0;if(0<e--)for(r<this.DB&&(n=this[e]>>r)!=(this.s&this.DM)>>r&&(t[i++]=n|this.s<<this.DB-r);0<=e;)r<8?(n=(this[e]&(1<<r)-1)<<8-r,n|=this[--e]>>(r+=this.DB-8)):(n=this[e]>>(r-=8)&255,r<=0&&(r+=this.DB,--e)),0!=(128&n)&&(n|=-256),0==i&&(128&this.s)!=(128&n)&&++i,(0<i||n!=this.s)&&(t[i++]=n);return t},I.prototype.equals=function(e){return 0==this.compareTo(e)},I.prototype.min=function(e){return this.compareTo(e)<0?this:e},I.prototype.max=function(e){return 0<this.compareTo(e)?this:e},I.prototype.and=function(e){var t=F();return this.bitwiseTo(e,n,t),t},I.prototype.or=function(e){var t=F();return this.bitwiseTo(e,i,t),t},I.prototype.xor=function(e){var t=F();return this.bitwiseTo(e,o,t),t},I.prototype.andNot=function(e){var t=F();return this.bitwiseTo(e,a,t),t},I.prototype.not=function(){for(var e=F(),t=0;t<this.t;++t)e[t]=this.DM&~this[t];return e.t=this.t,e.s=~this.s,e},I.prototype.shiftLeft=function(e){var t=F();return e<0?this.rShiftTo(-e,t):this.lShiftTo(e,t),t},I.prototype.shiftRight=function(e){var t=F();return e<0?this.lShiftTo(-e,t):this.rShiftTo(e,t),t},I.prototype.getLowestSetBit=function(){for(var e,t,n=0;n<this.t;++n)if(0!=this[n])return n*this.DB+(t=void 0,0==(e=this[n])?-1:((t=0)==(65535&e)&&(e>>=16,t+=16),0==(255&e)&&(e>>=8,t+=8),0==(15&e)&&(e>>=4,t+=4),0==(3&e)&&(e>>=2,t+=2),0==(1&e)&&++t,t));return this.s<0?this.t*this.DB:-1},I.prototype.bitCount=function(){for(var e=0,t=this.s&this.DM,n=0;n<this.t;++n)e+=function(e){for(var t=0;0!=e;)e&=e-1,++t;return t}(this[n]^t);return e},I.prototype.testBit=function(e){var t=Math.floor(e/this.DB);return t>=this.t?0!=this.s:0!=(this[t]&1<<e%this.DB)},I.prototype.setBit=function(e){return this.changeBit(e,i)},I.prototype.clearBit=function(e){return this.changeBit(e,a)},I.prototype.flipBit=function(e){return this.changeBit(e,o)},I.prototype.add=function(e){var t=F();return this.addTo(e,t),t},I.prototype.subtract=function(e){var t=F();return this.subTo(e,t),t},I.prototype.multiply=function(e){var t=F();return this.multiplyTo(e,t),t},I.prototype.divide=function(e){var t=F();return this.divRemTo(e,t,null),t},I.prototype.remainder=function(e){var t=F();return this.divRemTo(e,null,t),t},I.prototype.divideAndRemainder=function(e){var t=F(),n=F();return this.divRemTo(e,t,n),[t,n]},I.prototype.modPow=function(e,t){var n=e.bitLength(),r=$(1);if(n<=0)return r;var i=n<18?1:n<48?3:n<144?4:n<768?5:6,o=new(n<8?E:t.isEven()?_:S)(t),a=[],s=3,u=i-1,c=(1<<i)-1;if(a[1]=o.convert(this),1<i){var l=F();for(o.sqrTo(a[1],l);s<=c;)a[s]=F(),o.mulTo(l,a[s-2],a[s]),s+=2}var h,f,d=e.t-1,p=!0,m=F();for(n=Q(e[d])-1;0<=d;){for(u<=n?h=e[d]>>n-u&c:(h=(e[d]&(1<<n+1)-1)<<u-n,0<d&&(h|=e[d-1]>>this.DB+n-u)),s=i;0==(1&h);)h>>=1,--s;if((n-=s)<0&&(n+=this.DB,--d),p)a[h].copyTo(r),p=!1;else{for(;1<s;)o.sqrTo(r,m),o.sqrTo(m,r),s-=2;0<s?o.sqrTo(r,m):(f=r,r=m,m=f),o.mulTo(m,a[h],r)}for(;0<=d&&0==(e[d]&1<<n);)o.sqrTo(r,m),f=r,r=m,m=f,--n<0&&(n=this.DB-1,--d)}return o.revert(r)},I.prototype.modInverse=function(e){var t=e.isEven();if(this.isEven()&&t||0==e.signum())return I.ZERO;for(var n=e.clone(),r=this.clone(),i=$(1),o=$(0),a=$(0),s=$(1);0!=n.signum();){for(;n.isEven();)n.rShiftTo(1,n),t?(i.isEven()&&o.isEven()||(i.addTo(this,i),o.subTo(e,o)),i.rShiftTo(1,i)):o.isEven()||o.subTo(e,o),o.rShiftTo(1,o);for(;r.isEven();)r.rShiftTo(1,r),t?(a.isEven()&&s.isEven()||(a.addTo(this,a),s.subTo(e,s)),a.rShiftTo(1,a)):s.isEven()||s.subTo(e,s),s.rShiftTo(1,s);0<=n.compareTo(r)?(n.subTo(r,n),t&&i.subTo(a,i),o.subTo(s,o)):(r.subTo(n,r),t&&a.subTo(i,a),s.subTo(o,s))}return 0!=r.compareTo(I.ONE)?I.ZERO:0<=s.compareTo(e)?s.subtract(e):s.signum()<0&&(s.addTo(e,s),s.signum()<0)?s.add(e):s},I.prototype.pow=function(e){return this.exp(e,new k)},I.prototype.gcd=function(e){var t=this.s<0?this.negate():this.clone(),n=e.s<0?e.negate():e.clone(),r=(t.compareTo(n)<0&&(e=t,t=n,n=e),t.getLowestSetBit());if((e=n.getLowestSetBit())<0)return t;for(0<(e=r<e?r:e)&&(t.rShiftTo(e,t),n.rShiftTo(e,n));0<t.signum();)0<(r=t.getLowestSetBit())&&t.rShiftTo(r,t),0<(r=n.getLowestSetBit())&&n.rShiftTo(r,n),0<=t.compareTo(n)?(t.subTo(n,t),t.rShiftTo(1,t)):(n.subTo(t,n),n.rShiftTo(1,n));return 0<e&&n.lShiftTo(e,n),n},I.prototype.isProbablePrime=function(e){var t,n=this.abs();if(1==n.t&&n[0]<=w[w.length-1]){for(t=0;t<w.length;++t)if(n[0]==w[t])return!0;return!1}if(n.isEven())return!1;for(t=1;t<w.length;){for(var r=w[t],i=t+1;i<w.length&&r<x;)r*=w[i++];for(r=n.modInt(r);t<i;)if(r%w[t++]==0)return!1}return n.millerRabin(e)},I.prototype.copyTo=function(e){for(var t=this.t-1;0<=t;--t)e[t]=this[t];e.t=this.t,e.s=this.s},I.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,0<e?this[0]=e:e<-1?this[0]=e+this.DV:this.t=0},I.prototype.fromString=function(e,t){var n;if(16==t)n=4;else if(8==t)n=3;else if(256==t)n=8;else if(2==t)n=1;else if(32==t)n=5;else{if(4!=t)return void this.fromRadix(e,t);n=2}this.t=0,this.s=0;for(var r=e.length,i=!1,o=0;0<=--r;){var a=8==n?255&+e[r]:H(e,r);a<0?"-"==e.charAt(r)&&(i=!0):(i=!1,0==o?this[this.t++]=a:o+n>this.DB?(this[this.t-1]|=(a&(1<<this.DB-o)-1)<<o,this[this.t++]=a>>this.DB-o):this[this.t-1]|=a<<o,(o+=n)>=this.DB&&(o-=this.DB))}8==n&&0!=(128&+e[0])&&(this.s=-1,0<o&&(this[this.t-1]|=(1<<this.DB-o)-1<<o)),this.clamp(),i&&I.ZERO.subTo(this,this)},I.prototype.clamp=function(){for(var e=this.s&this.DM;0<this.t&&this[this.t-1]==e;)--this.t},I.prototype.dlShiftTo=function(e,t){for(var n=this.t-1;0<=n;--n)t[n+e]=this[n];for(n=e-1;0<=n;--n)t[n]=0;t.t=this.t+e,t.s=this.s},I.prototype.drShiftTo=function(e,t){for(var n=e;n<this.t;++n)t[n-e]=this[n];t.t=Math.max(this.t-e,0),t.s=this.s},I.prototype.lShiftTo=function(e,t){for(var n=e%this.DB,r=this.DB-n,i=(1<<r)-1,o=Math.floor(e/this.DB),a=this.s<<n&this.DM,s=this.t-1;0<=s;--s)t[s+o+1]=this[s]>>r|a,a=(this[s]&i)<<n;for(s=o-1;0<=s;--s)t[s]=0;t[o]=a,t.t=this.t+o+1,t.s=this.s,t.clamp()},I.prototype.rShiftTo=function(e,t){t.s=this.s;var n=Math.floor(e/this.DB);if(n>=this.t)t.t=0;else{var r=e%this.DB,i=this.DB-r,o=(1<<r)-1;t[0]=this[n]>>r;for(var a=n+1;a<this.t;++a)t[a-n-1]|=(this[a]&o)<<i,t[a-n]=this[a]>>r;0<r&&(t[this.t-n-1]|=(this.s&o)<<i),t.t=this.t-n,t.clamp()}},I.prototype.subTo=function(e,t){for(var n=0,r=0,i=Math.min(e.t,this.t);n<i;)r+=this[n]-e[n],t[n++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r-=e.s;n<this.t;)r+=this[n],t[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<e.t;)r-=e[n],t[n++]=r&this.DM,r>>=this.DB;r-=e.s}t.s=r<0?-1:0,r<-1?t[n++]=this.DV+r:0<r&&(t[n++]=r),t.t=n,t.clamp()},I.prototype.multiplyTo=function(e,t){var n=this.abs(),r=e.abs(),i=n.t;for(t.t=i+r.t;0<=--i;)t[i]=0;for(i=0;i<r.t;++i)t[i+n.t]=n.am(0,r[i],t,i,0,n.t);t.s=0,t.clamp(),this.s!=e.s&&I.ZERO.subTo(t,t)},I.prototype.squareTo=function(e){for(var t=this.abs(),n=e.t=2*t.t;0<=--n;)e[n]=0;for(n=0;n<t.t-1;++n){var r=t.am(n,t[n],e,2*n,0,1);(e[n+t.t]+=t.am(n+1,2*t[n],e,2*n+1,r,t.t-n-1))>=t.DV&&(e[n+t.t]-=t.DV,e[n+t.t+1]=1)}0<e.t&&(e[e.t-1]+=t.am(n,t[n],e,2*n,0,1)),e.s=0,e.clamp()},I.prototype.divRemTo=function(e,t,n){if(!((c=e.abs()).t<=0)){var r=this.abs();if(r.t<c.t)null!=t&&t.fromInt(0),null!=n&&this.copyTo(n);else{null==n&&(n=F());var i=F(),o=this.s,a=(e=e.s,this.DB-Q(c[c.t-1])),s=(0<a?(c.lShiftTo(a,i),r.lShiftTo(a,n)):(c.copyTo(i),r.copyTo(n)),i.t),u=i[s-1];if(0!=u){var c=u*(1<<this.F1)+(1<s?i[s-2]>>this.F2:0),l=this.FV/c,h=(1<<this.F1)/c,f=1<<this.F2,d=n.t,p=d-s,m=null==t?F():t;for(i.dlShiftTo(p,m),0<=n.compareTo(m)&&(n[n.t++]=1,n.subTo(m,n)),I.ONE.dlShiftTo(s,m),m.subTo(i,i);i.t<s;)i[i.t++]=0;for(;0<=--p;){var g=n[--d]==u?this.DM:Math.floor(n[d]*l+(n[d-1]+f)*h);if((n[d]+=i.am(0,g,n,p,0,s))<g)for(i.dlShiftTo(p,m),n.subTo(m,n);n[d]<--g;)n.subTo(m,n)}null!=t&&(n.drShiftTo(s,t),o!=e&&I.ZERO.subTo(t,t)),n.t=s,n.clamp(),0<a&&n.rShiftTo(a,n),o<0&&I.ZERO.subTo(n,n)}}}},I.prototype.invDigit=function(){var e,t;return this.t<1||0==(1&(e=this[0]))?0:0<(t=(t=(t=(t=(t=3&e)*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)?this.DV-t:-t},I.prototype.isEven=function(){return 0==(0<this.t?1&this[0]:this.s)},I.prototype.exp=function(e,t){if(4294967295<e||e<1)return I.ONE;var n,r=F(),i=F(),o=t.convert(this),a=Q(e)-1;for(o.copyTo(r);0<=--a;)t.sqrTo(r,i),0<(e&1<<a)?t.mulTo(i,o,r):(n=r,r=i,i=n);return t.revert(r)},I.prototype.chunkSize=function(e){return Math.floor(Math.LN2*this.DB/Math.log(e))},I.prototype.toRadix=function(e){if(null==e&&(e=10),0==this.signum()||e<2||36<e)return"0";var t=this.chunkSize(e),n=Math.pow(e,t),r=$(n),i=F(),o=F(),a="";for(this.divRemTo(r,i,o);0<i.signum();)a=(n+o.intValue()).toString(e).substr(1)+a,i.divRemTo(r,i,o);return o.intValue().toString(e)+a},I.prototype.fromRadix=function(e,t){this.fromInt(0);for(var n=this.chunkSize(t=null==t?10:t),r=Math.pow(t,n),i=!1,o=0,a=0,s=0;s<e.length;++s){var u=H(e,s);u<0?"-"==e.charAt(s)&&0==this.signum()&&(i=!0):(a=t*a+u,++o>=n&&(this.dMultiply(r),this.dAddOffset(a,0),a=o=0))}0<o&&(this.dMultiply(Math.pow(t,o)),this.dAddOffset(a,0)),i&&I.ZERO.subTo(this,this)},I.prototype.fromNumber=function(e,t,n){if("number"==typeof t)if(e<2)this.fromInt(1);else for(this.fromNumber(e,n),this.testBit(e-1)||this.bitwiseTo(I.ONE.shiftLeft(e-1),i,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(I.ONE.shiftLeft(e-1),this);else{var r=7&e;(n=[]).length=1+(e>>3),t.nextBytes(n),0<r?n[0]&=(1<<r)-1:n[0]=0,this.fromString(n,256)}},I.prototype.bitwiseTo=function(e,t,n){for(var r,i=Math.min(e.t,this.t),o=0;o<i;++o)n[o]=t(this[o],e[o]);if(e.t<this.t){for(r=e.s&this.DM,o=i;o<this.t;++o)n[o]=t(this[o],r);n.t=this.t}else{for(r=this.s&this.DM,o=i;o<e.t;++o)n[o]=t(r,e[o]);n.t=e.t}n.s=t(this.s,e.s),n.clamp()},I.prototype.changeBit=function(e,t){return e=I.ONE.shiftLeft(e),this.bitwiseTo(e,t,e),e},I.prototype.addTo=function(e,t){for(var n=0,r=0,i=Math.min(e.t,this.t);n<i;)r+=this[n]+e[n],t[n++]=r&this.DM,r>>=this.DB;if(e.t<this.t){for(r+=e.s;n<this.t;)r+=this[n],t[n++]=r&this.DM,r>>=this.DB;r+=this.s}else{for(r+=this.s;n<e.t;)r+=e[n],t[n++]=r&this.DM,r>>=this.DB;r+=e.s}t.s=r<0?-1:0,0<r?t[n++]=r:r<-1&&(t[n++]=this.DV+r),t.t=n,t.clamp()},I.prototype.dMultiply=function(e){this[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()},I.prototype.dAddOffset=function(e,t){if(0!=e){for(;this.t<=t;)this[this.t++]=0;for(this[t]+=e;this[t]>=this.DV;)this[t]-=this.DV,++t>=this.t&&(this[this.t++]=0),++this[t]}},I.prototype.multiplyLowerTo=function(e,t,n){var r=Math.min(this.t+e.t,t);for(n.s=0,n.t=r;0<r;)n[--r]=0;for(var i=n.t-this.t;r<i;++r)n[r+this.t]=this.am(0,e[r],n,r,0,this.t);for(i=Math.min(e.t,t);r<i;++r)this.am(0,e[r],n,r,0,t-r);n.clamp()},I.prototype.multiplyUpperTo=function(e,t,n){var r=n.t=this.t+e.t- --t;for(n.s=0;0<=--r;)n[r]=0;for(r=Math.max(t-this.t,0);r<e.t;++r)n[this.t+r-t]=this.am(t-r,e[r],n,0,0,this.t+r-t);n.clamp(),n.drShiftTo(1,n)},I.prototype.modInt=function(e){if(e<=0)return 0;var t=this.DV%e,n=this.s<0?e-1:0;if(0<this.t)if(0==t)n=this[0]%e;else for(var r=this.t-1;0<=r;--r)n=(t*n+this[r])%e;return n},I.prototype.millerRabin=function(e){var t=this.subtract(I.ONE),n=t.getLowestSetBit();if(n<=0)return!1;var r=t.shiftRight(n);(e=e+1>>1)>w.length&&(e=w.length);for(var i=F(),o=0;o<e;++o){i.fromInt(w[Math.floor(Math.random()*w.length)]);var a=i.modPow(r,this);if(0!=a.compareTo(I.ONE)&&0!=a.compareTo(t)){for(var s=1;s++<n&&0!=a.compareTo(t);)if(0==(a=a.modPowInt(2,this)).compareTo(I.ONE))return!1;if(0!=a.compareTo(t))return!1}}return!0},I.prototype.square=function(){var e=F();return this.squareTo(e),e},I.prototype.gcda=function(e,t){var n=this.s<0?this.negate():this.clone(),r=e.s<0?e.negate():e.clone(),i=(n.compareTo(r)<0&&(e=n,n=r,r=e),n.getLowestSetBit()),o=r.getLowestSetBit();o<0?t(n):(0<(o=i<o?i:o)&&(n.rShiftTo(o,n),r.rShiftTo(o,r)),setTimeout((function e(){0<(i=n.getLowestSetBit())&&n.rShiftTo(i,n),0<(i=r.getLowestSetBit())&&r.rShiftTo(i,r),0<=n.compareTo(r)?(n.subTo(r,n),n.rShiftTo(1,n)):(r.subTo(n,r),r.rShiftTo(1,r)),0<n.signum()?setTimeout(e,0):(0<o&&r.lShiftTo(o,r),setTimeout((function(){t(r)}),0))}),10))},I.prototype.fromNumberAsync=function(e,t,n,r){var o,a;"number"==typeof t?e<2?this.fromInt(1):(this.fromNumber(e,n),this.testBit(e-1)||this.bitwiseTo(I.ONE.shiftLeft(e-1),i,this),this.isEven()&&this.dAddOffset(1,0),o=this,setTimeout((function n(){o.dAddOffset(2,0),o.bitLength()>e&&o.subTo(I.ONE.shiftLeft(e-1),o),o.isProbablePrime(t)?setTimeout((function(){r()}),0):setTimeout(n,0)}),0)):(n=7&e,(a=[]).length=1+(e>>3),t.nextBytes(a),0<n?a[0]&=(1<<n)-1:a[0]=0,this.fromString(a,256))},I),k=(B.prototype.convert=function(e){return e},B.prototype.revert=function(e){return e},B.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n)},B.prototype.sqrTo=function(e,t){e.squareTo(t)},B),E=(D.prototype.convert=function(e){return e.s<0||0<=e.compareTo(this.m)?e.mod(this.m):e},D.prototype.revert=function(e){return e},D.prototype.reduce=function(e){e.divRemTo(this.m,null,e)},D.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},D.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},D),S=(T.prototype.convert=function(e){var t=F();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&0<t.compareTo(C.ZERO)&&this.m.subTo(t,t),t},T.prototype.revert=function(e){var t=F();return e.copyTo(t),this.reduce(t),t},T.prototype.reduce=function(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t<this.m.t;++t){var n=32767&e[t],r=n*this.mpl+((n*this.mph+(e[t]>>15)*this.mpl&this.um)<<15)&e.DM;for(e[n=t+this.m.t]+=this.m.am(0,r,e,t,0,this.m.t);e[n]>=e.DV;)e[n]-=e.DV,e[++n]++}e.clamp(),e.drShiftTo(this.m.t,e),0<=e.compareTo(this.m)&&e.subTo(this.m,e)},T.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},T.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},T),_=(O.prototype.convert=function(e){var t;return e.s<0||e.t>2*this.m.t?e.mod(this.m):e.compareTo(this.m)<0?e:(t=F(),e.copyTo(t),this.reduce(t),t)},O.prototype.revert=function(e){return e},O.prototype.reduce=function(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);0<=e.compareTo(this.m);)e.subTo(this.m,e)},O.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},O.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},O);function O(e){this.m=e,this.r2=F(),this.q3=F(),C.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e)}function T(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<e.DB-15)-1,this.mt2=2*e.t}function D(e){this.m=e}function B(){}function I(e,t,n){null!=e&&("number"==typeof e?this.fromNumber(e,t,n):null==t&&"string"!=typeof e?this.fromString(e,256):this.fromString(e,t))}function M(e){var t=e.get();if(this.tagClass=t>>6,this.tagConstructed=0!=(32&t),this.tagNumber=31&t,31==this.tagNumber){for(var n=new d;t=e.get(),n.mulAdd(128,127&t),128&t;);this.tagNumber=n.simplify()}}function j(e,t,n,r,i){if(!(r instanceof y))throw new Error("Invalid tag value.");this.stream=e,this.header=t,this.length=n,this.tag=r,this.sub=i}function N(e,t){this.hexDigits="0123456789ABCDEF",e instanceof N?(this.enc=e.enc,this.pos=e.pos):(this.enc=e,this.pos=t)}function F(){return new C(null)}function R(e,t){return new C(e,t)}var P=(P="undefined"!=typeof navigator)&&"Microsoft Internet Explorer"==navigator.appName?(C.prototype.am=function(e,t,n,r,i,o){for(var a=32767&t,s=t>>15;0<=--o;){var u=32767&this[e],c=this[e++]>>15,l=s*u+c*a;i=((u=a*u+((32767&l)<<15)+n[r]+(1073741823&i))>>>30)+(l>>>15)+s*c+(i>>>30),n[r++]=1073741823&u}return i},30):P&&"Netscape"!=navigator.appName?(C.prototype.am=function(e,t,n,r,i,o){for(;0<=--o;){var a=t*this[e++]+n[r]+i;i=Math.floor(a/67108864),n[r++]=67108863&a}return i},26):(C.prototype.am=function(e,t,n,r,i,o){for(var a=16383&t,s=t>>14;0<=--o;){var u=16383&this[e],c=this[e++]>>14,l=s*u+c*a;i=((u=a*u+((16383&l)<<14)+n[r]+i)>>28)+(l>>14)+s*c,n[r++]=268435455&u}return i},28);C.prototype.DB=P,C.prototype.DM=(1<<P)-1,C.prototype.DV=1<<P,C.prototype.FV=Math.pow(2,52),C.prototype.F1=52-P,C.prototype.F2=2*P-52;for(var L=[],U="0".charCodeAt(0),z=0;z<=9;++z)L[U++]=z;for(U="a".charCodeAt(0),z=10;z<36;++z)L[U++]=z;for(U="A".charCodeAt(0),z=10;z<36;++z)L[U++]=z;function H(e,t){return null==(e=L[e.charCodeAt(t)])?-1:e}function $(e){var t=F();return t.fromInt(e),t}function Q(e){var t,n=1;return 0!=(t=e>>>16)&&(e=t,n+=16),0!=(t=e>>8)&&(e=t,n+=8),0!=(t=e>>4)&&(e=t,n+=4),0!=(t=e>>2)&&(e=t,n+=2),0!=(t=e>>1)&&(e=t,n+=1),n}C.ZERO=$(0),C.ONE=$(1),W.prototype.init=function(e){for(var t,n,r=0;r<256;++r)this.S[r]=r;for(r=t=0;r<256;++r)t=t+this.S[r]+e[r%e.length]&255,n=this.S[r],this.S[r]=this.S[t],this.S[t]=n;this.i=0,this.j=0},W.prototype.next=function(){var e;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,e=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=e,this.S[e+this.S[this.i]&255]};var V,q=W,G=null;function W(){this.i=0,this.j=0,this.S=[]}G=[];var K=0,Y=void 0;if("undefined"!=typeof window&&window.crypto&&window.crypto.getRandomValues){var X=new Uint32Array(256);for(window.crypto.getRandomValues(X),Y=0;Y<X.length;++Y)G[K++]=255&X[Y]}function J(e){if(256<=(Z=Z||0)||256<=K)window.removeEventListener?window.removeEventListener("mousemove",J,!1):window.detachEvent&&window.detachEvent("onmousemove",J);else try{var t=e.x+e.y;G[K++]=255&t,Z+=1}catch(e){}}var Z=0;"undefined"!=typeof window&&(window.addEventListener?window.addEventListener("mousemove",J,!1):window.attachEvent&&window.attachEvent("onmousemove",J)),re.prototype.nextBytes=function(e){for(var t=0;t<e.length;++t)e[t]=function(){if(null==V){for(V=new q;K<256;){var e=Math.floor(65536*Math.random());G[K++]=255&e}for(V.init(G),K=0;K<G.length;++K)G[K]=0;K=0}return V.next()}()};var ee=re,te=(P=(ne.prototype.doPublic=function(e){return e.modPowInt(this.e,this.n)},ne.prototype.doPrivate=function(e){if(null==this.p||null==this.q)return e.modPow(this.d,this.n);for(var t=e.mod(this.p).modPow(this.dmp1,this.p),n=e.mod(this.q).modPow(this.dmq1,this.q);t.compareTo(n)<0;)t=t.add(this.p);return t.subtract(n).multiply(this.coeff).mod(this.p).multiply(this.q).add(n)},ne.prototype.setPublic=function(e,t){null!=e&&null!=t&&0<e.length&&0<t.length&&(this.n=R(e,16),this.e=parseInt(t,16))},ne.prototype.encrypt=function(e){var t=this.n.bitLength()+7>>3;if(null==(e=function(e,t){if(t<e.length+11)return null;for(var n=[],r=e.length-1;0<=r&&0<t;){var i=e.charCodeAt(r--);i<128?n[--t]=i:127<i&&i<2048?(n[--t]=63&i|128,n[--t]=i>>6|192):(n[--t]=63&i|128,n[--t]=i>>6&63|128,n[--t]=i>>12|224)}n[--t]=0;for(var o=new ee,a=[];2<t;){for(a[0]=0;0==a[0];)o.nextBytes(a);n[--t]=a[0]}return n[--t]=2,n[--t]=0,new C(n)}(e,t)))return null;if(null==(e=this.doPublic(e)))return null;for(var n=e.toString(16),r=n.length,i=0;i<2*t-r;i++)n="0"+n;return n},ne.prototype.setPrivate=function(e,t,n){null!=e&&null!=t&&0<e.length&&0<t.length&&(this.n=R(e,16),this.e=parseInt(t,16),this.d=R(n,16))},ne.prototype.setPrivateEx=function(e,t,n,r,i,o,a,s){null!=e&&null!=t&&0<e.length&&0<t.length&&(this.n=R(e,16),this.e=parseInt(t,16),this.d=R(n,16),this.p=R(r,16),this.q=R(i,16),this.dmp1=R(o,16),this.dmq1=R(a,16),this.coeff=R(s,16))},ne.prototype.generate=function(e,t){var n=new ee,r=e>>1;this.e=parseInt(t,16);for(var i=new C(t,16);;){for(;this.p=new C(e-r,1,n),0!=this.p.subtract(C.ONE).gcd(i).compareTo(C.ONE)||!this.p.isProbablePrime(10););for(;this.q=new C(r,1,n),0!=this.q.subtract(C.ONE).gcd(i).compareTo(C.ONE)||!this.q.isProbablePrime(10););this.p.compareTo(this.q)<=0&&(o=this.p,this.p=this.q,this.q=o);var o=this.p.subtract(C.ONE),a=this.q.subtract(C.ONE),s=o.multiply(a);if(0==s.gcd(i).compareTo(C.ONE)){this.n=this.p.multiply(this.q),this.d=i.modInverse(s),this.dmp1=this.d.mod(o),this.dmq1=this.d.mod(a),this.coeff=this.q.modInverse(this.p);break}}},ne.prototype.decrypt=function(e){if(e=R(e,16),null==(e=this.doPrivate(e)))return null;for(var t=this.n.bitLength()+7>>3,n=e.toByteArray(),r=0;r<n.length&&0==n[r];)++r;if(n.length-r!=t-1||2!=n[r])return null;for(++r;0!=n[r];)if(++r>=n.length)return null;for(var i="";++r<n.length;){var o=255&n[r];o<128?i+=String.fromCharCode(o):191<o&&o<224?(i+=String.fromCharCode((31&o)<<6|63&n[r+1]),++r):(i+=String.fromCharCode((15&o)<<12|(63&n[r+1])<<6|63&n[r+2]),r+=2)}return i},ne.prototype.generateAsync=function(e,t,n){var r=new ee,i=e>>1,o=(this.e=parseInt(t,16),new C(t,16)),a=this;setTimeout((function t(){function s(){a.q=F(),a.q.fromNumberAsync(i,1,r,(function(){a.q.subtract(C.ONE).gcda(o,(function(e){0==e.compareTo(C.ONE)&&a.q.isProbablePrime(10)?setTimeout(u,0):setTimeout(s,0)}))}))}var u=function(){a.p.compareTo(a.q)<=0&&(e=a.p,a.p=a.q,a.q=e);var e=a.p.subtract(C.ONE),r=a.q.subtract(C.ONE),i=e.multiply(r);0==i.gcd(o).compareTo(C.ONE)?(a.n=a.p.multiply(a.q),a.d=o.modInverse(i),a.dmp1=a.d.mod(e),a.dmq1=a.d.mod(r),a.coeff=a.q.modInverse(a.p),setTimeout((function(){n()}),0)):setTimeout(t,0)};setTimeout((function t(){a.p=F(),a.p.fromNumberAsync(e-i,1,r,(function(){a.p.subtract(C.ONE).gcda(o,(function(e){0==e.compareTo(C.ONE)&&a.p.isProbablePrime(10)?setTimeout(s,0):setTimeout(t,0)}))}))}),0)}),0)},ne.prototype.sign=function(e,t,n){return null==(n=function(e,t){if(t<e.length+22)return null;for(var n=t-e.length-6,r="",i=0;i<n;i+=2)r+="ff";return R("0001"+r+"00"+e,16)}((te[n]||"")+t(e).toString(),this.n.bitLength()/4))||null==(t=this.doPrivate(n))?null:0==(1&(e=t.toString(16)).length)?e:"0"+e},ne.prototype.verify=function(e,t,n){return t=R(t,16),null==(t=this.doPublic(t))?null:function(e){for(var t in te)if(te.hasOwnProperty(t)){var n=(t=te[t]).length;if(e.substr(0,n)==t)return e.substr(n)}return e}(t.toString(16).replace(/^1f+00/,""))==n(e).toString()},ne),{md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",ripemd160:"3021300906052b2403020105000414"});function ne(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}function re(){}(ae={}).lang={extend:function(e,t,n){if(!t||!e)throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");function r(){}if(r.prototype=t.prototype,e.prototype=new r,(e.prototype.constructor=e).superclass=t.prototype,t.prototype.constructor==Object.prototype.constructor&&(t.prototype.constructor=t),n){for(var i in n)e.prototype[i]=n[i];t=function(){};var o=["toString","valueOf"];try{/MSIE/.test(navigator.userAgent)&&(t=function(e,t){for(i=0;i<o.length;i+=1){var n=o[i],r=t[n];"function"==typeof r&&r!=Object.prototype[n]&&(e[n]=r)}})}catch(e){}t(e.prototype,n)}}};var ie={};void 0!==ie.asn1&&ie.asn1||(ie.asn1={}),ie.asn1.ASN1Util=new function(){this.integerToByteHex=function(e){return(e=e.toString(16)).length%2==1?"0"+e:e},this.bigIntToMinTwosComplementsHex=function(e){var t=e.toString(16);if("-"!=t.substr(0,1))t.length%2==1?t="0"+t:t.match(/^[0-7]/)||(t="00"+t);else{var n=t.substr(1).length;n%2==1?n+=1:t.match(/^[0-7]/)||(n+=2);for(var r="",i=0;i<n;i++)r+="f";t=new C(r,16).xor(e).add(C.ONE).toString(16).replace(/^-/,"")}return t},this.getPEMStringFromHex=function(e,t){return hextopem(e,t)},this.newObject=function(e){var t,n=(t=ie.asn1).DERBoolean,r=t.DERInteger,i=t.DERBitString,o=t.DEROctetString,a=t.DERNull,s=t.DERObjectIdentifier,u=t.DEREnumerated,c=t.DERUTF8String,l=t.DERNumericString,h=t.DERPrintableString,f=t.DERTeletexString,d=t.DERIA5String,p=t.DERUTCTime,m=t.DERGeneralizedTime,g=t.DERSequence,A=t.DERSet,v=t.DERTaggedObject,b=t.ASN1Util.newObject;if(1!=(t=Object.keys(e)).length)throw"key of param shall be only one.";if(t=t[0],-1==":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":"+t+":"))throw"undefined key: "+t;if("bool"==t)return new n(e[t]);if("int"==t)return new r(e[t]);if("bitstr"==t)return new i(e[t]);if("octstr"==t)return new o(e[t]);if("null"==t)return new a(e[t]);if("oid"==t)return new s(e[t]);if("enum"==t)return new u(e[t]);if("utf8str"==t)return new c(e[t]);if("numstr"==t)return new l(e[t]);if("prnstr"==t)return new h(e[t]);if("telstr"==t)return new f(e[t]);if("ia5str"==t)return new d(e[t]);if("utctime"==t)return new p(e[t]);if("gentime"==t)return new m(e[t]);if("seq"==t){for(var y=e[t],w=[],x=0;x<y.length;x++){var C=b(y[x]);w.push(C)}return new g({array:w})}if("set"==t){for(y=e[t],w=[],x=0;x<y.length;x++)C=b(y[x]),w.push(C);return new A({array:w})}if("tag"==t){if(n=e[t],"[object Array]"===Object.prototype.toString.call(n)&&3==n.length)return r=b(n[2]),new v({tag:n[0],explicit:n[1],obj:r});if(i={},void 0!==n.explicit&&(i.explicit=n.explicit),void 0!==n.tag&&(i.tag=n.tag),void 0===n.obj)throw"obj shall be specified for 'tag'.";return i.obj=b(n.obj),new v(i)}},this.jsonToASN1HEX=function(e){return this.newObject(e).getEncodedHex()}},ie.asn1.ASN1Util.oidHexToInt=function(e){for(var t="",n=parseInt(e.substr(0,2),16),r=(t=Math.floor(n/40)+"."+n%40,""),i=2;i<e.length;i+=2){var o=("00000000"+parseInt(e.substr(i,2),16).toString(2)).slice(-8);r+=o.substr(1,7),"0"==o.substr(0,1)&&(t=t+"."+new C(r,2).toString(10),r="")}return t},ie.asn1.ASN1Util.oidIntToHex=function(e){function t(e){return 1==(e=e.toString(16)).length?"0"+e:e}if(!e.match(/^[0-9.]+$/))throw"malformed oid string: "+e;var n="",r=e.split(".");n+=t(e=40*parseInt(r[0])+parseInt(r[1])),r.splice(0,2);for(var i=0;i<r.length;i++)n+=function(e){var n="",r=new C(e,10).toString(2),i=7-r.length%7;7==i&&(i=0);for(var o="",a=0;a<i;a++)o+="0";for(r=o+r,a=0;a<r.length-1;a+=7){var s=r.substr(a,7);a!=r.length-7&&(s="1"+s),n+=t(parseInt(s,2))}return n}(r[i]);return n},ie.asn1.ASN1Object=function(){this.getLengthHexFromValue=function(){if(void 0===this.hV||null==this.hV)throw"this.hV is null or undefined.";if(this.hV.length%2==1)throw"value hex must be even length: n="+"".length+",v="+this.hV;var e=this.hV.length/2,t=e.toString(16);if(t.length%2==1&&(t="0"+t),e<128)return t;var n=t.length/2;if(15<n)throw"ASN.1 length too long to represent by 8x: n = "+e.toString(16);return(128+n).toString(16)+t},this.getEncodedHex=function(){return null!=this.hTLV&&!this.isModified||(this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1),this.hTLV},this.getValueHex=function(){return this.getEncodedHex(),this.hV},this.getFreshValueHex=function(){return""}},ie.asn1.DERAbstractString=function(e){ie.asn1.DERAbstractString.superclass.constructor.call(this),this.getString=function(){return this.s},this.setString=function(e){this.hTLV=null,this.isModified=!0,this.s=e,this.hV=stohex(this.s)},this.setStringHex=function(e){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=e},this.getFreshValueHex=function(){return this.hV},void 0!==e&&("string"==typeof e?this.setString(e):void 0!==e.str?this.setString(e.str):void 0!==e.hex&&this.setStringHex(e.hex))},ae.lang.extend(ie.asn1.DERAbstractString,ie.asn1.ASN1Object),ie.asn1.DERAbstractTime=function(e){ie.asn1.DERAbstractTime.superclass.constructor.call(this),this.localDateToUTC=function(e){return utc=e.getTime()+6e4*e.getTimezoneOffset(),new Date(utc)},this.formatDate=function(e,t,n){var r=this.zeroPadding,i=(e=this.localDateToUTC(e),String(e.getFullYear()));t=(i="utc"==t?i.substr(2,2):i)+r(String(e.getMonth()+1),2)+r(String(e.getDate()),2)+r(String(e.getHours()),2)+r(String(e.getMinutes()),2)+r(String(e.getSeconds()),2);return(t=!0===n&&0!=(i=e.getMilliseconds())?t+"."+r(String(i),3).replace(/[0]+$/,""):t)+"Z"},this.zeroPadding=function(e,t){return e.length>=t?e:new Array(t-e.length+1).join("0")+e},this.getString=function(){return this.s},this.setString=function(e){this.hTLV=null,this.isModified=!0,this.s=e,this.hV=stohex(e)},this.setByDateValue=function(e,t,n,r,i,o){e=new Date(Date.UTC(e,t-1,n,r,i,o,0)),this.setByDate(e)},this.getFreshValueHex=function(){return this.hV}},ae.lang.extend(ie.asn1.DERAbstractTime,ie.asn1.ASN1Object),ie.asn1.DERAbstractStructured=function(e){ie.asn1.DERAbstractString.superclass.constructor.call(this),this.setByASN1ObjectArray=function(e){this.hTLV=null,this.isModified=!0,this.asn1Array=e},this.appendASN1Object=function(e){this.hTLV=null,this.isModified=!0,this.asn1Array.push(e)},this.asn1Array=new Array,void 0!==e&&void 0!==e.array&&(this.asn1Array=e.array)},ae.lang.extend(ie.asn1.DERAbstractStructured,ie.asn1.ASN1Object),ie.asn1.DERBoolean=function(){ie.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"},ae.lang.extend(ie.asn1.DERBoolean,ie.asn1.ASN1Object),ie.asn1.DERInteger=function(e){ie.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(e){this.hTLV=null,this.isModified=!0,this.hV=ie.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e)},this.setByInteger=function(e){e=new C(String(e),10),this.setByBigInteger(e)},this.setValueHex=function(e){this.hV=e},this.getFreshValueHex=function(){return this.hV},void 0!==e&&(void 0!==e.bigint?this.setByBigInteger(e.bigint):void 0!==e.int?this.setByInteger(e.int):"number"==typeof e?this.setByInteger(e):void 0!==e.hex&&this.setValueHex(e.hex))},ae.lang.extend(ie.asn1.DERInteger,ie.asn1.ASN1Object),ie.asn1.DERBitString=function(e){var t;void 0!==e&&void 0!==e.obj&&(t=ie.asn1.ASN1Util.newObject(e.obj),e.hex="00"+t.getEncodedHex()),ie.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(e){this.hTLV=null,this.isModified=!0,this.hV=e},this.setUnusedBitsAndHexValue=function(e,t){if(e<0||7<e)throw"unused bits shall be from 0 to 7: u = "+e;e="0"+e,this.hTLV=null,this.isModified=!0,this.hV=e+t},this.setByBinaryString=function(e){var t=8-(e=e.replace(/0+$/,"")).length%8;8==t&&(t=0);for(var n=0;n<=t;n++)e+="0";var r="";for(n=0;n<e.length-1;n+=8){var i=e.substr(n,8);r+=i=1==(i=parseInt(i,2).toString(16)).length?"0"+i:i}this.hTLV=null,this.isModified=!0,this.hV="0"+t+r},this.setByBooleanArray=function(e){for(var t="",n=0;n<e.length;n++)1==e[n]?t+="1":t+="0";this.setByBinaryString(t)},this.newFalseArray=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=!1;return t},this.getFreshValueHex=function(){return this.hV},void 0!==e&&("string"==typeof e&&e.toLowerCase().match(/^[0-9a-f]+$/)?this.setHexValueIncludingUnusedBits(e):void 0!==e.hex?this.setHexValueIncludingUnusedBits(e.hex):void 0!==e.bin?this.setByBinaryString(e.bin):void 0!==e.array&&this.setByBooleanArray(e.array))},ae.lang.extend(ie.asn1.DERBitString,ie.asn1.ASN1Object),ie.asn1.DEROctetString=function(e){var t;void 0!==e&&void 0!==e.obj&&(t=ie.asn1.ASN1Util.newObject(e.obj),e.hex=t.getEncodedHex()),ie.asn1.DEROctetString.superclass.constructor.call(this,e),this.hT="04"},ae.lang.extend(ie.asn1.DEROctetString,ie.asn1.DERAbstractString),ie.asn1.DERNull=function(){ie.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"},ae.lang.extend(ie.asn1.DERNull,ie.asn1.ASN1Object),ie.asn1.DERObjectIdentifier=function(e){var t=function(e){return 1==(e=e.toString(16)).length?"0"+e:e};ie.asn1.DERObjectIdentifier.superclass.constructor.call(this),this.hT="06",this.setValueHex=function(e){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=e},this.setValueOidString=function(e){if(!e.match(/^[0-9.]+$/))throw"malformed oid string: "+e;var n="",r=e.split(".");e=40*parseInt(r[0])+parseInt(r[1]);n+=t(e),r.splice(0,2);for(var i=0;i<r.length;i++)n+=function(e){var n="",r=new C(e,10).toString(2),i=7-r.length%7;7==i&&(i=0);for(var o="",a=0;a<i;a++)o+="0";for(r=o+r,a=0;a<r.length-1;a+=7){var s=r.substr(a,7);a!=r.length-7&&(s="1"+s),n+=t(parseInt(s,2))}return n}(r[i]);this.hTLV=null,this.isModified=!0,this.s=null,this.hV=n},this.setValueName=function(e){var t=ie.asn1.x509.OID.name2oid(e);if(""===t)throw"DERObjectIdentifier oidName undefined: "+e;this.setValueOidString(t)},this.getFreshValueHex=function(){return this.hV},void 0!==e&&("string"==typeof e?e.match(/^[0-2].[0-9.]+$/)?this.setValueOidString(e):this.setValueName(e):void 0!==e.oid?this.setValueOidString(e.oid):void 0!==e.hex?this.setValueHex(e.hex):void 0!==e.name&&this.setValueName(e.name))},ae.lang.extend(ie.asn1.DERObjectIdentifier,ie.asn1.ASN1Object),ie.asn1.DEREnumerated=function(e){ie.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(e){this.hTLV=null,this.isModified=!0,this.hV=ie.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e)},this.setByInteger=function(e){e=new C(String(e),10),this.setByBigInteger(e)},this.setValueHex=function(e){this.hV=e},this.getFreshValueHex=function(){return this.hV},void 0!==e&&(void 0!==e.int?this.setByInteger(e.int):"number"==typeof e?this.setByInteger(e):void 0!==e.hex&&this.setValueHex(e.hex))},ae.lang.extend(ie.asn1.DEREnumerated,ie.asn1.ASN1Object),ie.asn1.DERUTF8String=function(e){ie.asn1.DERUTF8String.superclass.constructor.call(this,e),this.hT="0c"},ae.lang.extend(ie.asn1.DERUTF8String,ie.asn1.DERAbstractString),ie.asn1.DERNumericString=function(e){ie.asn1.DERNumericString.superclass.constructor.call(this,e),this.hT="12"},ae.lang.extend(ie.asn1.DERNumericString,ie.asn1.DERAbstractString),ie.asn1.DERPrintableString=function(e){ie.asn1.DERPrintableString.superclass.constructor.call(this,e),this.hT="13"},ae.lang.extend(ie.asn1.DERPrintableString,ie.asn1.DERAbstractString),ie.asn1.DERTeletexString=function(e){ie.asn1.DERTeletexString.superclass.constructor.call(this,e),this.hT="14"},ae.lang.extend(ie.asn1.DERTeletexString,ie.asn1.DERAbstractString),ie.asn1.DERIA5String=function(e){ie.asn1.DERIA5String.superclass.constructor.call(this,e),this.hT="16"},ae.lang.extend(ie.asn1.DERIA5String,ie.asn1.DERAbstractString),ie.asn1.DERUTCTime=function(e){ie.asn1.DERUTCTime.superclass.constructor.call(this,e),this.hT="17",this.setByDate=function(e){this.hTLV=null,this.isModified=!0,this.date=e,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)),this.hV},void 0!==e&&(void 0!==e.str?this.setString(e.str):"string"==typeof e&&e.match(/^[0-9]{12}Z$/)?this.setString(e):void 0!==e.hex?this.setStringHex(e.hex):void 0!==e.date&&this.setByDate(e.date))},ae.lang.extend(ie.asn1.DERUTCTime,ie.asn1.DERAbstractTime),ie.asn1.DERGeneralizedTime=function(e){ie.asn1.DERGeneralizedTime.superclass.constructor.call(this,e),this.hT="18",this.withMillis=!1,this.setByDate=function(e){this.hTLV=null,this.isModified=!0,this.date=e,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return void 0===this.date&&void 0===this.s&&(this.date=new Date,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)),this.hV},void 0!==e&&(void 0!==e.str?this.setString(e.str):"string"==typeof e&&e.match(/^[0-9]{14}Z$/)?this.setString(e):void 0!==e.hex?this.setStringHex(e.hex):void 0!==e.date&&this.setByDate(e.date),!0===e.millis&&(this.withMillis=!0))},ae.lang.extend(ie.asn1.DERGeneralizedTime,ie.asn1.DERAbstractTime),ie.asn1.DERSequence=function(e){ie.asn1.DERSequence.superclass.constructor.call(this,e),this.hT="30",this.getFreshValueHex=function(){for(var e="",t=0;t<this.asn1Array.length;t++)e+=this.asn1Array[t].getEncodedHex();return this.hV=e,this.hV}},ae.lang.extend(ie.asn1.DERSequence,ie.asn1.DERAbstractStructured),ie.asn1.DERSet=function(e){ie.asn1.DERSet.superclass.constructor.call(this,e),this.hT="31",this.sortFlag=!0,this.getFreshValueHex=function(){for(var e=new Array,t=0;t<this.asn1Array.length;t++){var n=this.asn1Array[t];e.push(n.getEncodedHex())}return 1==this.sortFlag&&e.sort(),this.hV=e.join(""),this.hV},void 0!==e&&void 0!==e.sortflag&&0==e.sortflag&&(this.sortFlag=!1)},ae.lang.extend(ie.asn1.DERSet,ie.asn1.DERAbstractStructured),ie.asn1.DERTaggedObject=function(e){ie.asn1.DERTaggedObject.superclass.constructor.call(this),this.hT="a0",this.hV="",this.isExplicit=!0,this.asn1Object=null,this.setASN1Object=function(e,t,n){this.hT=t,this.isExplicit=e,this.asn1Object=n,this.isExplicit?(this.hV=this.asn1Object.getEncodedHex(),this.hTLV=null,this.isModified=!0):(this.hV=null,this.hTLV=n.getEncodedHex(),this.hTLV=this.hTLV.replace(/^../,t),this.isModified=!1)},this.getFreshValueHex=function(){return this.hV},void 0!==e&&(void 0!==e.tag&&(this.hT=e.tag),void 0!==e.explicit&&(this.isExplicit=e.explicit),void 0!==e.obj&&(this.asn1Object=e.obj,this.setASN1Object(this.isExplicit,this.hT,this.asn1Object)))},ae.lang.extend(ie.asn1.DERTaggedObject,ie.asn1.ASN1Object),oe=function(e,t){return(oe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};var oe,ae,se=function(e){function t(n){var r=e.call(this)||this;return n&&("string"==typeof n?r.parseKey(n):(t.hasPrivateKeyProperty(n)||t.hasPublicKeyProperty(n))&&r.parsePropertiesFrom(n)),r}var n=t,r=e;if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function i(){this.constructor=n}return oe(n,r),n.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i),t.prototype.parseKey=function(e){try{var t=0,n=0,r=/^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/.test(e)?function(e){if(void 0===s){var t="0123456789ABCDEF",n=" \f\n\r\t \u2028\u2029";for(s={},a=0;a<16;++a)s[t.charAt(a)]=a;for(t=t.toLowerCase(),a=10;a<16;++a)s[t.charAt(a)]=a;for(a=0;a<n.length;++a)s[n.charAt(a)]=-1}for(var r=[],i=0,o=0,a=0;a<e.length;++a){var u=e.charAt(a);if("="==u)break;if(-1!=(u=s[u])){if(void 0===u)throw new Error("Illegal character at offset "+a);i|=u,2<=++o?(r[r.length]=i,o=i=0):i<<=4}}if(o)throw new Error("Hex encoding incomplete: 4 bits missing");return r}(e):f.unarmor(e),i=b.decode(r);if(9===(i=3===i.sub.length?i.sub[2].sub[0]:i).sub.length){t=i.sub[1].getHexStringValue(),this.n=R(t,16),n=i.sub[2].getHexStringValue(),this.e=parseInt(n,16);var o=i.sub[3].getHexStringValue(),a=(this.d=R(o,16),i.sub[4].getHexStringValue()),u=(this.p=R(a,16),i.sub[5].getHexStringValue()),c=(this.q=R(u,16),i.sub[6].getHexStringValue()),l=(this.dmp1=R(c,16),i.sub[7].getHexStringValue()),h=(this.dmq1=R(l,16),i.sub[8].getHexStringValue());this.coeff=R(h,16)}else{if(2!==i.sub.length)return!1;var d;n=(i.sub[0].sub?(t=(d=i.sub[1].sub[0]).sub[0].getHexStringValue(),this.n=R(t,16),d):(t=i.sub[0].getHexStringValue(),this.n=R(t,16),i)).sub[1].getHexStringValue();this.e=parseInt(n,16)}return!0}catch(e){return!1}},t.prototype.getPrivateBaseKey=function(){var e={array:[new ie.asn1.DERInteger({int:0}),new ie.asn1.DERInteger({bigint:this.n}),new ie.asn1.DERInteger({int:this.e}),new ie.asn1.DERInteger({bigint:this.d}),new ie.asn1.DERInteger({bigint:this.p}),new ie.asn1.DERInteger({bigint:this.q}),new ie.asn1.DERInteger({bigint:this.dmp1}),new ie.asn1.DERInteger({bigint:this.dmq1}),new ie.asn1.DERInteger({bigint:this.coeff})]};return new ie.asn1.DERSequence(e).getEncodedHex()},t.prototype.getPrivateBaseKeyB64=function(){return c(this.getPrivateBaseKey())},t.prototype.getPublicBaseKey=function(){var e=new ie.asn1.DERSequence({array:[new ie.asn1.DERObjectIdentifier({oid:"1.2.840.113549.1.1.1"}),new ie.asn1.DERNull]}),t=new ie.asn1.DERSequence({array:[new ie.asn1.DERInteger({bigint:this.n}),new ie.asn1.DERInteger({int:this.e})]});t=new ie.asn1.DERBitString({hex:"00"+t.getEncodedHex()});return new ie.asn1.DERSequence({array:[e,t]}).getEncodedHex()},t.prototype.getPublicBaseKeyB64=function(){return c(this.getPublicBaseKey())},t.wordwrap=function(e,t){return e&&(t="(.{1,"+(t=t||64)+"})( +|$\n?)|(.{1,"+t+"})",e.match(RegExp(t,"g")).join("\n"))},t.prototype.getPrivateKey=function(){return"-----BEGIN RSA PRIVATE KEY-----\n"+t.wordwrap(this.getPrivateBaseKeyB64())+"\n-----END RSA PRIVATE KEY-----"},t.prototype.getPublicKey=function(){return"-----BEGIN PUBLIC KEY-----\n"+t.wordwrap(this.getPublicBaseKeyB64())+"\n-----END PUBLIC KEY-----"},t.hasPublicKeyProperty=function(e){return(e=e||{}).hasOwnProperty("n")&&e.hasOwnProperty("e")},t.hasPrivateKeyProperty=function(e){return(e=e||{}).hasOwnProperty("n")&&e.hasOwnProperty("e")&&e.hasOwnProperty("d")&&e.hasOwnProperty("p")&&e.hasOwnProperty("q")&&e.hasOwnProperty("dmp1")&&e.hasOwnProperty("dmq1")&&e.hasOwnProperty("coeff")},t.prototype.parsePropertiesFrom=function(e){this.n=e.n,this.e=e.e,e.hasOwnProperty("d")&&(this.d=e.d,this.p=e.p,this.q=e.q,this.dmp1=e.dmp1,this.dmq1=e.dmq1,this.coeff=e.coeff)},t}(P),ue=(P=void 0===(ae=e(155))||null==ae.env?void 0:"3.3.1",ce.prototype.setKey=function(e){this.log&&this.key,this.key=new se(e)},ce.prototype.setPrivateKey=function(e){this.setKey(e)},ce.prototype.setPublicKey=function(e){this.setKey(e)},ce.prototype.decrypt=function(e){try{return this.getKey().decrypt(l(e))}catch(e){return!1}},ce.prototype.encrypt=function(e){try{return c(this.getKey().encrypt(e))}catch(e){return!1}},ce.prototype.sign=function(e,t,n){try{return c(this.getKey().sign(e,t,n))}catch(e){return!1}},ce.prototype.verify=function(e,t,n){try{return this.getKey().verify(e,l(t),n)}catch(e){return!1}},ce.prototype.getKey=function(e){if(!this.key){if(this.key=new se,e&&"[object Function]"==={}.toString.call(e))return void this.key.generateAsync(this.default_key_size,this.default_public_exponent,e);this.key.generate(this.default_key_size,this.default_public_exponent)}return this.key},ce.prototype.getPrivateKey=function(){return this.getKey().getPrivateKey()},ce.prototype.getPrivateKeyB64=function(){return this.getKey().getPrivateBaseKeyB64()},ce.prototype.getPublicKey=function(){return this.getKey().getPublicKey()},ce.prototype.getPublicKeyB64=function(){return this.getKey().getPublicBaseKeyB64()},ce.version=P,ce);function ce(e){this.default_key_size=(e=(e=void 0===e?{}:e)||{}).default_key_size?parseInt(e.default_key_size,10):1024,this.default_public_exponent=e.default_public_exponent||"010001",this.log=e.log||!1,this.key=null}}(),r.default;function e(r){var i=n[r];return void 0!==i||(i=n[r]={exports:{}},t[r](i,i.exports,e)),i.exports}var t,n,r},"object"==r(t)&&"object"==r(e)?e.exports=n():void 0!==(n="function"==typeof(n=n)?n.apply(t,[]):n)&&(e.exports=n)}).call(this,n(100)(e))},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return export_xlsx}));var lodash__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(32),lodash__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_0__),_core_alphabet__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(14),exceljs__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(218),exceljs__WEBPACK_IMPORTED_MODULE_2___default=__webpack_require__.n(exceljs__WEBPACK_IMPORTED_MODULE_2__),file_saver__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(307),file_saver__WEBPACK_IMPORTED_MODULE_3___default=__webpack_require__.n(file_saver__WEBPACK_IMPORTED_MODULE_3__);function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,t){var n;if(e)return"string"==typeof e?_arrayLikeToArray(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _iterableToArrayLimit(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}function _arrayWithHoles(e){if(Array.isArray(e))return e}var exportConfig={fileName:"download",exportHideCol:!0,exportFormula:!0},isHas=function(e){return null!=(e=0===e?e.toString():e)&&"null"!=e&&null!=e&&"undefined"!=e&&""!=e},n_decimal=function(e){return e<5?e:5==e?0:15==e?5:16==e?6:""},xtos=function xtos(spreadSheet,spreadData,options,Excel){options=Object.assign(exportConfig,options);for(var workbook=new Excel.Workbook,_options=options,fileName=_options.fileName,exportHideCol=_options.exportHideCol,exportFormula=_options.exportFormula,zip=_options.zip,zipName=_options.zipName,_loop=(workbook.creator="Me",workbook.lastModifiedBy="Me",workbook.created=new Date,workbook.modified=new Date,function _loop(index){for(var s_sheet=spreadData[index],oSheet=s_sheet,sheetname="",freeze=(sheet_rows=s_sheet.rows,colWidth=s_sheet.cols,sheetStyle=s_sheet.styles,s_sheet.freeze),rowIndexObj=(sheetMerges=lodash__WEBPACK_IMPORTED_MODULE_0___default.a.cloneDeep(s_sheet.merges),sheet=workbook.addWorksheet(sheetname),r_index=0,{}),_rowIndexObj={},colIndexObj={},_colIndexObj={},key=0,_expr2xy,_expr2xy2,x,y;key<colWidth.len;key++)if(colWidth[key].hide&&!exportHideCol)for(var _index=0;_index<sheetMerges.length;_index++){var el=sheetMerges[_index];Object(_core_alphabet__WEBPACK_IMPORTED_MODULE_1__.b)(el.split(":")[0])[0]!=key&&Object(_core_alphabet__WEBPACK_IMPORTED_MODULE_1__.b)(el.split(":")[1])[0]!=key||(sheetMerges.splice(_index,1),_index--)}for(i=0;i<sheet_rows.len;i++)if(sheet_rows[i]){var columns=sheet_rows[i].cells,hide=sheet_rows[i].hide;if(hide&&!exportHideCol)for(var _index2=0;_index2<sheetMerges.length;_index2++){var _el=sheetMerges[_index2];Object(_core_alphabet__WEBPACK_IMPORTED_MODULE_1__.b)(_el.split(":")[0])[1]!=i&&Object(_core_alphabet__WEBPACK_IMPORTED_MODULE_1__.b)(_el.split(":")[1])[1]!=i||(sheetMerges.splice(_index2,1),_index2--)}for(var _h=sheet_rows[i].height||25,columnHeight=1.5*_h,colArr=(freeze&&(columnHeight/=2),[]),cellText=null,c_index=0,_key=0,s_row,_s_row;_key<colWidth.len;_key++)colWidth[_key]&&colWidth[_key].hide&&!exportHideCol||(columns[_key]&&(0==columns[_key].text||columns[_key].text)?columns[_key].s_text?0===columns[_key].s_text||columns[_key].s_text?colArr.push(columns[_key].s_text):colArr.push(null):2==columns[_key].valueType||0!==columns[_key].text&&!columns[_key].text?colArr.push(null):colArr.push(columns[_key].text):colArr.push(cellText)),exportHideCol?colIndexObj[_key+1]=_key:(colIndexObj[c_index+1]=_key,_colIndexObj[_key]=c_index,colWidth[_key].hide||c_index++);0==colArr.length&&(colArr=[null]),exportHideCol?(rowIndexObj[i+1]=i,s_row=sheet.getRow(i+1),s_row.values=colArr,s_row.height=columnHeight,hide&&(s_row.hidden=!0)):(rowIndexObj[r_index+1]=i,_rowIndexObj[i]=r_index,_s_row=sheet.getRow(r_index+1),_s_row.values=colArr,_s_row.height=columnHeight,hide||r_index++)}if(freeze&&"A1"!=freeze?(_expr2xy=Object(_core_alphabet__WEBPACK_IMPORTED_MODULE_1__.b)(freeze),_expr2xy2=_slicedToArray(_expr2xy,2),x=_expr2xy2[0],y=_expr2xy2[1],exportHideCol||(x=_colIndexObj[x],y=_rowIndexObj[y]),sheet.views=[{state:"frozen",xSplit:x,ySplit:y,zoomScaleNormal:100,zoomScale:100,showGridLines:!1}]):sheet.views=[{zoomScaleNormal:100,zoomScale:100,showGridLines:!1}],!exportHideCol)for(var _i=0;_i<sheetMerges.length;_i++){var _el2=sheetMerges[_i],elarr=_el2.split(":"),farr=Object(_core_alphabet__WEBPACK_IMPORTED_MODULE_1__.b)(elarr[0]),sarr=Object(_core_alphabet__WEBPACK_IMPORTED_MODULE_1__.b)(elarr[1]),str1=Object(_core_alphabet__WEBPACK_IMPORTED_MODULE_1__.e)(_colIndexObj[farr[0]],_rowIndexObj[farr[1]]),str2=Object(_core_alphabet__WEBPACK_IMPORTED_MODULE_1__.e)(_colIndexObj[sarr[0]],_rowIndexObj[sarr[1]]);sheetMerges[_i]=str1+":"+str2}sheet.eachRow({includeEmpty:!0},(function(row,rowNumber){row.eachCell({includeEmpty:!0},(function(cell,colNumber){if(0==colIndexObj[colNumber]||colIndexObj[colNumber]){var _col=sheet.getColumn(colNumber);if(exportHideCol&&colWidth[colIndexObj[colNumber]].hide&&(_col.hidden=colWidth[colIndexObj[colNumber]].hide),colWidth[colIndexObj[colNumber]].width?_col.width=colWidth[colIndexObj[colNumber]].width/8:_col.width=12.5,sheet_rows[rowIndexObj[rowNumber]]){var cellObj=sheet_rows[rowIndexObj[rowNumber]].cells[colIndexObj[colNumber]];if(null!=cellObj){var preflag=!0,result,result,formulaText,_result2,cellStyle,format,replaceNullText,_result3,base64,base64Str,imageId,imgObj,value;if("string"==typeof cellObj.text&&"="===cellObj.text[0]&&preflag)try{isNaN(eval(cellObj.text.substring(1)))?(result=null,result=spreadSheet.sheet.table.formatRender(cellObj.text,oSheet,{row:rowNumber-1,col:colNumber-1}),isNaN(result)||(result=Number(result)),formulaText=cellObj.text.substr(1),exportHideCol||(formulaText=formulaText.replace(/[a-zA-Z]{1,3}\d+/g,(function(e){e=e.toUpperCase();var t=(e=_slicedToArray(Object(_core_alphabet__WEBPACK_IMPORTED_MODULE_1__.b)(e),2))[0];e=e[1];return Object(_core_alphabet__WEBPACK_IMPORTED_MODULE_1__.e)(_colIndexObj[t],_rowIndexObj[e])}))),cell.value=exportFormula?{formula:formulaText,result:result}:result):cell.value=eval(cellObj.text.substring(1))}catch(e){var _result=null,_result=spreadSheet.sheet.table.formatRender(cellObj.text,oSheet,{row:rowNumber-1,col:colNumber-1}),_formulaText=(isNaN(_result)||(_result=Number(_result)),"object"===_typeof(_result)&&(_result="Error: #N/A"),cellObj.text.substr(1));exportHideCol||(_formulaText=_formulaText.replace(/[a-zA-Z]{1,3}\d+/g,(function(e){e=e.toUpperCase();var t=(e=_slicedToArray(Object(_core_alphabet__WEBPACK_IMPORTED_MODULE_1__.b)(e),2))[0];e=e[1];return Object(_core_alphabet__WEBPACK_IMPORTED_MODULE_1__.e)(_colIndexObj[t],_rowIndexObj[e])}))),cell.value=exportFormula?{formula:_formulaText,result:_result}:_result}if("string"==typeof cellObj.text&&-1!=cellObj.text.indexOf("$")&&(_result2=spreadSheet.sheet.table.fmtRender(cellObj.text,index,s_sheet._sheetParams),cell.value=_result2),"style"in cellObj&&(cellStyle=sheetStyle[cellObj.style],cellStyle&&"format"in cellStyle&&(format=cellStyle.format,format&&null!=format.replaceNullText&&format.replaceNullText.type&&(replaceNullText=format.replaceNullText,replaceNullText&&(_result3=replaceNullText,isNaN(_result3)||(_result3=Number(_result3)),cellObj.text?"string"==typeof cellObj.text&&"="===cellObj.text[0]&&("object"===_typeof(cell.value)?void 0===cell.value.result&&(cell.value=_result3):cell.value||(cell.value=_result3)):cell.value=_result3)))),0==cellObj.style||cellObj.style){var _cellStyle=sheetStyle[cellObj.style],font={},argb,argb,color;if(_cellStyle.hasOwnProperty("strike")&&(font.strike=_cellStyle.strike),_cellStyle.hasOwnProperty("underline")&&(font.underline=_cellStyle.underline),_cellStyle.hasOwnProperty("font")&&isHas(_cellStyle.font))for(var _i2 in _cellStyle.font)font[_i2]=_cellStyle.font[_i2];font.size?font.size=font.size:font.size=10,font.name||(font.name="Arial"),_cellStyle.hasOwnProperty("color")&&isHas(_cellStyle.color)&&(argb="",argb=-1!=_cellStyle.color.indexOf("#")&&9<=_cellStyle.color.length?_cellStyle.color.substr(1,7):_cellStyle.color.substr(1),color={argb:argb},font.color=color),0<Object.keys(font).length&&(cell.font=font);var alignment={},fill=(_cellStyle.hasOwnProperty("align")?alignment.horizontal=_cellStyle.align:alignment.vertical="center",_cellStyle.hasOwnProperty("valign")?alignment.vertical=_cellStyle.valign:alignment.vertical="middle",(isHas(_cellStyle.textwrap)||isHas(_cellStyle.wrapType)&&2==_cellStyle.wrapType)&&(alignment.wrapText=!0),0<Object.keys(alignment).length&&(cell.alignment=alignment),{type:"pattern",pattern:"solid"}),_argb,_argb,border=(_cellStyle.hasOwnProperty("bgcolor")&&isHas(_cellStyle.bgcolor)&&(_argb="",_argb=-1!=_cellStyle.bgcolor.indexOf("#")&&9<=_cellStyle.bgcolor.length?_cellStyle.bgcolor.substr(1,7):_cellStyle.bgcolor.substr(1),fill.fgColor={},fill.fgColor.argb=_argb,cell.fill=fill),{});if(_cellStyle.hasOwnProperty("border")&&!_cellStyle.hasOwnProperty("borderType")&&isHas(_cellStyle.border)){for(var _i3 in _cellStyle.border)border[_i3]={},_cellStyle.border[_i3][0]?border[_i3].style=_cellStyle.border[_i3][0]:_cellStyle.border[_i3][1]&&(border[_i3].color={},border[_i3].color.argb=_cellStyle.border[_i3][1].str(1));cell.border=border}if("format"in _cellStyle){var _format=_cellStyle.format,numFmt="",res=null,preflag,_result4,_result4,_result5,_arr5,_arr6,_arr7,_arr8;if("date"in _format||"addPreText"in _format&&_format.addPreText||"addNextText"in _format&&_format.addNextText||"removePreText"in _format&&_format.removePreText||"removeNextText"in _format&&_format.removeNextText)"string"==typeof cellObj.text&&"="===cellObj.text[0]?(preflag=!1,_result4=null,_result4=spreadSheet.sheet.table.formatRender(cellObj.text,oSheet,{row:rowNumber-1,col:colNumber-1}),cell.value=spreadSheet.sheet.table.styleFmt(cellObj,_result4,_format)):"string"==typeof cellObj.text&&-1!=cellObj.text.indexOf("$")?(_result5=spreadSheet.sheet.table.fmtRender(cellObj.text,index,s_sheet._sheetParams),cell.value=spreadSheet.sheet.table.styleFmt(cellObj,_result5,_format)):cell.value=spreadSheet.sheet.table.styleFmt(cellObj,cellObj.text,_format);else{if("decimal"in _format&&0!=_format.decimal)res=n_decimal(_format.decimal);else try{var cellArr=cell.text.split(".");1<cellArr.length&&(res=cellArr[cellArr.length-1].length)}catch(e){}if("quantile"in _format&&0!=_format.quantile){if(1==_format.quantile){numFmt="#,#0";var qflag=!1,arr,numFmt,_arr2,_arr3,_arr4;if("multiplying"in _format)switch(qflag=!0,_format.multiplying){case 5:res?(arr=new Array(res).fill(0),numFmt=numFmt+"."+arr.join("")+"%"):numFmt+="%";break;case 1:res?(_arr2=new Array(res).fill(0),numFmt=numFmt+"."+_arr2.join("")+',"千"'):numFmt+='.000000,"千"';break;case 3:res?(_arr3=new Array(res).fill(0),numFmt=numFmt+"."+_arr3.join("")+',,"百万"'):numFmt+='.000000,,"百万"'}qflag||res&&(_arr4=new Array(res).fill(0),numFmt=numFmt+"."+_arr4.join(""))}}else if("multiplying"in _format&&0!=_format.multiplying)switch(numFmt="0",_format.multiplying){case 5:res?(_arr5=new Array(res).fill(0),numFmt=numFmt+"."+_arr5.join("")+"%"):numFmt+="%";break;case 1:res?(_arr6=new Array(res).fill(0),numFmt=numFmt+"."+_arr6.join("")+',"千"'):numFmt+='.000000,"千"';break;case 3:res?(_arr7=new Array(res).fill(0),numFmt=numFmt+"."+_arr7.join("")+',,"百万"'):numFmt+='.000000,,"百万"'}numFmt||0!=res&&!res||(_arr8=new Array(res).fill(0),numFmt=0==res?"0":"0."+_arr8.join("")),!isNaN(cell.value)&&cell.value<0&&_format.minus&&1==_format.minus&&(numFmt=numFmt?";(".concat(numFmt,")"):";(0)"),numFmt&&(cell.numFmt=numFmt)}}}2==cellObj.valueType&&(cellObj.base64Image?(base64=cellObj.base64Image,base64Str="",base64.replace(/\/.*;/,(function(e,t){base64Str=e})),base64Str=base64Str.substring(1,base64Str.length-1),imageId=workbook.addImage({base64:base64,extension:base64Str}),imgObj={tl:{col:colIndexObj[colNumber],row:rowIndexObj[rowNumber]},ext:{height:sheet_rows[rowIndexObj[rowNumber]].height||25,width:colWidth[colIndexObj[colNumber]].width||100}},sheet.addImage(imageId,imgObj)):cell.value=cellObj.text),cell.value&&(value=cell.value,"object"==_typeof(cell.value)?(value=cell.value.result,"string"==typeof value&&(value.replace(/\n/g,(function(e){return String.fromCharCode(10)})),cell.value.result=value)):"string"==typeof value&&(value.replace(/\n/g,(function(e){return String.fromCharCode(10)})),cell.value=value))}}}}))})),sheetMerges.forEach((function(e){try{sheet.mergeCells(e)}catch(e){}}))}),index=0,sheet_rows,colWidth,sheetStyle,sheetMerges,sheet,r_index,i;index<spreadData.length;index++)_loop(index);workbook.xlsx.writeBuffer().then((function(e){e=new Blob([e],{type:"EXCEL_TYPE"}),file_saver__WEBPACK_IMPORTED_MODULE_3___default.a.saveAs(e,"".concat(fileName,".xlsx"))}))},export_xlsx=function(e,t){var n=e._getData();try{xtos(e,n,t,exceljs__WEBPACK_IMPORTED_MODULE_2___default.a)}catch(e){}}},function(e,t,n){(function(n){var r;void 0!==(r="function"==typeof(r=function(){"use strict";function t(e,t,n){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){s(r.response,t,n)},r.onerror=function(){console.error("could not download file")},r.send()}function r(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function i(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(n){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var o="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n&&n.global===n?n:void 0,a=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),s=o.saveAs||("object"!=typeof window||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!a?function(e,n,a){var s=o.URL||o.webkitURL,u=document.createElement("a");n=n||e.name||"download",u.download=n,u.rel="noopener","string"==typeof e?(u.href=e,u.origin===location.origin?i(u):r(u.href)?t(e,n,a):i(u,u.target="_blank")):(u.href=s.createObjectURL(e),setTimeout((function(){s.revokeObjectURL(u.href)}),4e4),setTimeout((function(){i(u)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,n,o){if(n=n||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}(e,o),n);else if(r(e))t(e,n,o);else{var a=document.createElement("a");a.href=e,a.target="_blank",setTimeout((function(){i(a)}))}}:function(e,n,r,i){if((i=i||open("","_blank"))&&(i.document.title=i.document.body.innerText="downloading..."),"string"==typeof e)return t(e,n,r);var s="application/octet-stream"===e.type,u=/constructor/i.test(o.HTMLElement)||o.safari,c=/CriOS\/[\d]+/.test(navigator.userAgent);if((c||s&&u||a)&&"undefined"!=typeof FileReader){var l=new FileReader;l.onloadend=function(){var e=l.result;e=c?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=e:location=e,i=null},l.readAsDataURL(e)}else{var h=o.URL||o.webkitURL,f=h.createObjectURL(e);i?i.location=f:location.href=f,i=null,setTimeout((function(){h.revokeObjectURL(f)}),4e4)}});o.saveAs=s.saveAs=s,e.exports=s})?r.apply(t,[]):r)&&(e.exports=r)}).call(this,n(67))},,,function(e,t,n){var r,i;!function(){"use strict";i=[t],void 0!==(i="function"==typeof(r=function(e){var t,n,r,i,o,a,s,u,c,l,h,f,d,p,m,g,A,v;function b(e,t){if(!e)throw new Error("ASSERT: "+t)}function y(e){return e>=48&&e<=57}function w(e){return"0123456789abcdefABCDEF".indexOf(e)>=0}function x(e){return"01234567".indexOf(e)>=0}function C(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0}function k(e){return 10===e||13===e||8232===e||8233===e}function E(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||92===e||e>=128&&s.NonAsciiIdentifierStart.test(String.fromCharCode(e))}function S(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&s.NonAsciiIdentifierPart.test(String.fromCharCode(e))}function _(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}}function O(e){return"eval"===e||"arguments"===e}function T(e,t,n,r,i){var o;b("number"==typeof n,"Comment must have valid position"),A.lastCommentStart>=n||(A.lastCommentStart=n,o={type:e,value:t},v.range&&(o.range=[n,r]),v.loc&&(o.loc=i),v.comments.push(o),v.attachComment&&(v.leadingComments.push(o),v.trailingComments.push(o)))}function D(e){var t,n,r,i;for(t=h-e,n={start:{line:f,column:h-d-e}};h<p;)if(r=c.charCodeAt(h),++h,k(r))return v.comments&&(i=c.slice(t+e,h-1),n.end={line:f,column:h-d-1},T("Line",i,t,h-1,n)),13===r&&10===c.charCodeAt(h)&&++h,++f,void(d=h);v.comments&&(i=c.slice(t+e,h),n.end={line:f,column:h-d},T("Line",i,t,h,n))}function B(){var e,t,n,r;for(v.comments&&(e=h-2,t={start:{line:f,column:h-d-2}});h<p;)if(k(n=c.charCodeAt(h)))13===n&&10===c.charCodeAt(h+1)&&++h,++f,++h,d=h,h>=p&&G({},a.UnexpectedToken,"ILLEGAL");else if(42===n){if(47===c.charCodeAt(h+1))return++h,++h,void(v.comments&&(r=c.slice(e+2,h-2),t.end={line:f,column:h-d},T("Block",r,e,h,t)));++h}else++h;G({},a.UnexpectedToken,"ILLEGAL")}function I(){var e,t;for(t=0===h;h<p;)if(C(e=c.charCodeAt(h)))++h;else if(k(e))++h,13===e&&10===c.charCodeAt(h)&&++h,++f,d=h,t=!0;else if(47===e)if(47===(e=c.charCodeAt(h+1)))++h,++h,D(2),t=!0;else{if(42!==e)break;++h,++h,B()}else if(t&&45===e){if(45!==c.charCodeAt(h+1)||62!==c.charCodeAt(h+2))break;h+=3,D(3)}else{if(60!==e)break;if("!--"!==c.slice(h+1,h+4))break;++h,++h,++h,++h,D(4)}}function M(e){var t,n,r,i=0;for(n="u"===e?4:2,t=0;t<n;++t){if(!(h<p&&w(c[h])))return"";r=c[h++],i=16*i+"0123456789abcdef".indexOf(r.toLowerCase())}return String.fromCharCode(i)}function j(){var e,t;for(e=c.charCodeAt(h++),t=String.fromCharCode(e),92===e&&(117!==c.charCodeAt(h)&&G({},a.UnexpectedToken,"ILLEGAL"),++h,(e=M("u"))&&"\\"!==e&&E(e.charCodeAt(0))||G({},a.UnexpectedToken,"ILLEGAL"),t=e);h<p&&S(e=c.charCodeAt(h));)++h,t+=String.fromCharCode(e),92===e&&(t=t.substr(0,t.length-1),117!==c.charCodeAt(h)&&G({},a.UnexpectedToken,"ILLEGAL"),++h,(e=M("u"))&&"\\"!==e&&S(e.charCodeAt(0))||G({},a.UnexpectedToken,"ILLEGAL"),t+=e);return t}function N(){var e,n;return e=h,{type:1===(n=92===c.charCodeAt(h)?j():function(){var e,t;for(e=h++;h<p;){if(92===(t=c.charCodeAt(h)))return h=e,j();if(!S(t))break;++h}return c.slice(e,h)}()).length?t.Identifier:function(e){if(l&&_(e))return!0;switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e||"let"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}}(n)?t.Keyword:"null"===n?t.NullLiteral:"true"===n||"false"===n?t.BooleanLiteral:t.Identifier,value:n,lineNumber:f,lineStart:d,start:e,end:h}}function F(){var e,n,r,i,o=h,s=c.charCodeAt(h),u=c[h];switch(s){case 46:case 40:case 41:case 59:case 44:case 123:case 125:case 91:case 93:case 58:case 63:case 126:return++h,v.tokenize&&(40===s?v.openParenToken=v.tokens.length:123===s&&(v.openCurlyToken=v.tokens.length)),{type:t.Punctuator,value:String.fromCharCode(s),lineNumber:f,lineStart:d,start:o,end:h};default:if(61===(e=c.charCodeAt(h+1)))switch(s){case 43:case 45:case 47:case 60:case 62:case 94:case 124:case 37:case 38:case 42:return h+=2,{type:t.Punctuator,value:String.fromCharCode(s)+String.fromCharCode(e),lineNumber:f,lineStart:d,start:o,end:h};case 33:case 61:return h+=2,61===c.charCodeAt(h)&&++h,{type:t.Punctuator,value:c.slice(o,h),lineNumber:f,lineStart:d,start:o,end:h}}}return">>>="===(i=c.substr(h,4))?(h+=4,{type:t.Punctuator,value:i,lineNumber:f,lineStart:d,start:o,end:h}):">>>"===(r=i.substr(0,3))||"<<="===r||">>="===r?(h+=3,{type:t.Punctuator,value:r,lineNumber:f,lineStart:d,start:o,end:h}):u===(n=r.substr(0,2))[1]&&"+-<>&|".indexOf(u)>=0||"=>"===n?(h+=2,{type:t.Punctuator,value:n,lineNumber:f,lineStart:d,start:o,end:h}):"<>=!+-*%&|^/".indexOf(u)>=0?(++h,{type:t.Punctuator,value:u,lineNumber:f,lineStart:d,start:o,end:h}):void G({},a.UnexpectedToken,"ILLEGAL")}function R(){var e,n,r;if(b(y((r=c[h]).charCodeAt(0))||"."===r,"Numeric literal must start with a decimal digit or a decimal point"),n=h,e="","."!==r){if(e=c[h++],r=c[h],"0"===e){if("x"===r||"X"===r)return++h,function(e){for(var n="";h<p&&w(c[h]);)n+=c[h++];return 0===n.length&&G({},a.UnexpectedToken,"ILLEGAL"),E(c.charCodeAt(h))&&G({},a.UnexpectedToken,"ILLEGAL"),{type:t.NumericLiteral,value:parseInt("0x"+n,16),lineNumber:f,lineStart:d,start:e,end:h}}(n);if(x(r)&&function(){var e,t;for(e=h+1;e<p;++e){if("8"===(t=c[e])||"9"===t)return!1;if(!x(t))return!0}return!0}())return function(e){for(var n="0"+c[h++];h<p&&x(c[h]);)n+=c[h++];return(E(c.charCodeAt(h))||y(c.charCodeAt(h)))&&G({},a.UnexpectedToken,"ILLEGAL"),{type:t.NumericLiteral,value:parseInt(n,8),octal:!0,lineNumber:f,lineStart:d,start:e,end:h}}(n)}for(;y(c.charCodeAt(h));)e+=c[h++];r=c[h]}if("."===r){for(e+=c[h++];y(c.charCodeAt(h));)e+=c[h++];r=c[h]}if("e"===r||"E"===r)if(e+=c[h++],"+"!==(r=c[h])&&"-"!==r||(e+=c[h++]),y(c.charCodeAt(h)))for(;y(c.charCodeAt(h));)e+=c[h++];else G({},a.UnexpectedToken,"ILLEGAL");return E(c.charCodeAt(h))&&G({},a.UnexpectedToken,"ILLEGAL"),{type:t.NumericLiteral,value:parseFloat(e),lineNumber:f,lineStart:d,start:n,end:h}}function P(){var e,n,r,i;return g=null,I(),e=h,n=function(){var e,t,n,r;for(b("/"===(e=c[h]),"Regular expression literal must start with a slash"),t=c[h++],n=!1,r=!1;h<p;)if(t+=e=c[h++],"\\"===e)k((e=c[h++]).charCodeAt(0))&&G({},a.UnterminatedRegExp),t+=e;else if(k(e.charCodeAt(0)))G({},a.UnterminatedRegExp);else if(n)"]"===e&&(n=!1);else{if("/"===e){r=!0;break}"["===e&&(n=!0)}return r||G({},a.UnterminatedRegExp),{value:t.substr(1,t.length-2),literal:t}}(),r=function(){var e,t,n,r;for(t="",n="";h<p&&S((e=c[h]).charCodeAt(0));)if(++h,"\\"===e&&h<p)if("u"===(e=c[h])){if(r=++h,e=M("u"))for(n+=e,t+="\\u";r<h;++r)t+=c[r];else h=r,n+="u",t+="\\u";W({},a.UnexpectedToken,"ILLEGAL")}else t+="\\",W({},a.UnexpectedToken,"ILLEGAL");else n+=e,t+=e;return{value:n,literal:t}}(),i=function(e,t){var n;try{n=new RegExp(e,t)}catch(e){G({},a.InvalidRegExp)}return n}(n.value,r.value),v.tokenize?{type:t.RegularExpression,value:i,lineNumber:f,lineStart:d,start:e,end:h}:{literal:n.literal+r.literal,value:i,start:e,end:h}}function L(){var e,t,n,r;return I(),e=h,t={start:{line:f,column:h-d}},n=P(),t.end={line:f,column:h-d},v.tokenize||(v.tokens.length>0&&(r=v.tokens[v.tokens.length-1]).range[0]===e&&"Punctuator"===r.type&&("/"!==r.value&&"/="!==r.value||v.tokens.pop()),v.tokens.push({type:"RegularExpression",value:n.literal,range:[e,h],loc:t})),n}function U(){var e;return I(),h>=p?{type:t.EOF,lineNumber:f,lineStart:d,start:h,end:h}:E(e=c.charCodeAt(h))?N():40===e||41===e||59===e?F():39===e||34===e?function(){var e,n,r,i,o,s,u,l,m="",g=!1;for(u=f,l=d,b("'"===(e=c[h])||'"'===e,"String literal must starts with a quote"),n=h,++h;h<p;){if((r=c[h++])===e){e="";break}if("\\"===r)if((r=c[h++])&&k(r.charCodeAt(0)))++f,"\r"===r&&"\n"===c[h]&&++h,d=h;else switch(r){case"u":case"x":s=h,(o=M(r))?m+=o:(h=s,m+=r);break;case"n":m+="\n";break;case"r":m+="\r";break;case"t":m+="\t";break;case"b":m+="\b";break;case"f":m+="\f";break;case"v":m+="\v";break;default:x(r)?(0!==(i="01234567".indexOf(r))&&(g=!0),h<p&&x(c[h])&&(g=!0,i=8*i+"01234567".indexOf(c[h++]),"0123".indexOf(r)>=0&&h<p&&x(c[h])&&(i=8*i+"01234567".indexOf(c[h++]))),m+=String.fromCharCode(i)):m+=r}else{if(k(r.charCodeAt(0)))break;m+=r}}return""!==e&&G({},a.UnexpectedToken,"ILLEGAL"),{type:t.StringLiteral,value:m,octal:g,startLineNumber:u,startLineStart:l,lineNumber:f,lineStart:d,start:n,end:h}}():46===e?y(c.charCodeAt(h+1))?R():F():y(e)?R():v.tokenize&&47===e?function(){var e,t;if(!(e=v.tokens[v.tokens.length-1]))return L();if("Punctuator"===e.type){if("]"===e.value)return F();if(")"===e.value)return!(t=v.tokens[v.openParenToken-1])||"Keyword"!==t.type||"if"!==t.value&&"while"!==t.value&&"for"!==t.value&&"with"!==t.value?F():L();if("}"===e.value){if(v.tokens[v.openCurlyToken-3]&&"Keyword"===v.tokens[v.openCurlyToken-3].type){if(!(t=v.tokens[v.openCurlyToken-4]))return F()}else{if(!v.tokens[v.openCurlyToken-4]||"Keyword"!==v.tokens[v.openCurlyToken-4].type)return F();if(!(t=v.tokens[v.openCurlyToken-5]))return L()}return r.indexOf(t.value)>=0?F():L()}return L()}return"Keyword"===e.type&&"this"!==e.value?L():F()}():F()}function z(){var e,r,i;return I(),e={start:{line:f,column:h-d}},r=U(),e.end={line:f,column:h-d},r.type!==t.EOF&&(i=c.slice(r.start,r.end),v.tokens.push({type:n[r.type],value:i,range:[r.start,r.end],loc:e})),r}function H(){var e;return h=(e=g).end,f=e.lineNumber,d=e.lineStart,g=void 0!==v.tokens?z():U(),h=e.end,f=e.lineNumber,d=e.lineStart,e}function $(){var e,t,n;e=h,t=f,n=d,g=void 0!==v.tokens?z():U(),h=e,f=t,d=n}function Q(e,t){this.line=e,this.column=t}function V(e,t,n,r){this.start=new Q(e,t),this.end=new Q(n,r)}function q(){var e,t,n,r;return e=h,t=f,n=d,I(),r=f!==t,h=e,f=t,d=n,r}function G(e,t){var n,r=Array.prototype.slice.call(arguments,2),i=t.replace(/%(\d)/g,(function(e,t){return b(t<r.length,"Message reference must be in range"),r[t]}));throw"number"==typeof e.lineNumber?((n=new Error("Line "+e.lineNumber+": "+i)).index=e.start,n.lineNumber=e.lineNumber,n.column=e.start-d+1):((n=new Error("Line "+f+": "+i)).index=h,n.lineNumber=f,n.column=h-d+1),n.description=i,n}function W(){try{G.apply(null,arguments)}catch(e){if(!v.errors)throw e;v.errors.push(e)}}function K(e){if(e.type===t.EOF&&G(e,a.UnexpectedEOS),e.type===t.NumericLiteral&&G(e,a.UnexpectedNumber),e.type===t.StringLiteral&&G(e,a.UnexpectedString),e.type===t.Identifier&&G(e,a.UnexpectedIdentifier),e.type===t.Keyword){if(function(e){switch(e){case"class":case"enum":case"export":case"extends":case"import":case"super":return!0;default:return!1}}(e.value))G(e,a.UnexpectedReserved);else if(l&&_(e.value))return void W(e,a.StrictReservedWord);G(e,a.UnexpectedToken,e.value)}G(e,a.UnexpectedToken,e.value)}function Y(e){var n=H();n.type===t.Punctuator&&n.value===e||K(n)}function X(e){var n=H();n.type===t.Keyword&&n.value===e||K(n)}function J(e){return g.type===t.Punctuator&&g.value===e}function Z(e){return g.type===t.Keyword&&g.value===e}function ee(){var e,n=h,r=f,i=d,o=g;if(59===c.charCodeAt(h)||J(";"))H();else{if(e=f,I(),f!==e)return h=n,f=r,d=i,void(g=o);g.type===t.EOF||J("}")||K(g)}}function te(e){return e.type===i.Identifier||e.type===i.MemberExpression}function ne(e,t){var n,r,i;return n=l,i=g,r=Ee(),t&&l&&O(e[0].name)&&W(t,a.StrictParamName),l=n,m.markEnd(m.createFunctionExpression(null,e,[],r),i)}function re(){var e,n;return n=g,(e=H()).type===t.StringLiteral||e.type===t.NumericLiteral?(l&&e.octal&&W(e,a.StrictOctalLiteral),m.markEnd(m.createLiteral(e),n)):m.markEnd(m.createIdentifier(e.value),n)}function ie(){var e,n,r,i,o,s;return s=g,(e=g).type===t.Identifier?(r=re(),"get"!==e.value||J(":")?"set"!==e.value||J(":")?(Y(":"),i=me(),m.markEnd(m.createProperty("init",r,i),s)):(n=re(),Y("("),(e=g).type!==t.Identifier?(Y(")"),W(e,a.UnexpectedToken,e.value),i=ne([])):(o=[ve()],Y(")"),i=ne(o,e)),m.markEnd(m.createProperty("set",n,i),s)):(n=re(),Y("("),Y(")"),i=ne([]),m.markEnd(m.createProperty("get",n,i),s))):e.type!==t.EOF&&e.type!==t.Punctuator?(n=re(),Y(":"),i=me(),m.markEnd(m.createProperty("init",n,i),s)):void K(e)}function oe(){var e,n,r,s;if(J("("))return function(){var e;return Y("("),e=ge(),Y(")"),e}();if(J("["))return function(){var e,t=[];for(e=g,Y("[");!J("]");)J(",")?(H(),t.push(null)):(t.push(me()),J("]")||Y(","));return H(),m.markEnd(m.createArrayExpression(t),e)}();if(J("{"))return function(){var e,t,n,r,s,u=[],c={},h=String;for(s=g,Y("{");!J("}");)t=(e=ie()).key.type===i.Identifier?e.key.name:h(e.key.value),r="init"===e.kind?o.Data:"get"===e.kind?o.Get:o.Set,n="$"+t,Object.prototype.hasOwnProperty.call(c,n)?(c[n]===o.Data?l&&r===o.Data?W({},a.StrictDuplicateProperty):r!==o.Data&&W({},a.AccessorDataProperty):r===o.Data?W({},a.AccessorDataProperty):c[n]&r&&W({},a.AccessorGetSet),c[n]|=r):c[n]=r,u.push(e),J("}")||Y(",");return Y("}"),m.markEnd(m.createObjectExpression(u),s)}();if(e=g.type,s=g,e===t.Identifier)r=m.createIdentifier(H().value);else if(e===t.StringLiteral||e===t.NumericLiteral)l&&g.octal&&W(g,a.StrictOctalLiteral),r=m.createLiteral(H());else if(e===t.Keyword){if(Z("function"))return function(){var e,t,n,r,i,o,s,u,c,h=null;c=g,X("function"),J("(")||(e=g,h=ve(),l?O(e.value)&&W(e,a.StrictFunctionName):O(e.value)?(n=e,r=a.StrictFunctionName):_(e.value)&&(n=e,r=a.StrictReservedWord));i=Se(n),o=i.params,t=i.stricted,n=i.firstRestricted,i.message&&(r=i.message);u=l,s=Ee(),l&&n&&G(n,r);l&&t&&W(t,r);return l=u,m.markEnd(m.createFunctionExpression(h,o,[],s),c)}();Z("this")?(H(),r=m.createThisExpression()):K(H())}else e===t.BooleanLiteral?((n=H()).value="true"===n.value,r=m.createLiteral(n)):e===t.NullLiteral?((n=H()).value=null,r=m.createLiteral(n)):J("/")||J("/=")?(r=void 0!==v.tokens?m.createLiteral(L()):m.createLiteral(P()),$()):K(H());return m.markEnd(r,s)}function ae(){var e=[];if(Y("("),!J(")"))for(;h<p&&(e.push(me()),!J(")"));)Y(",");return Y(")"),e}function se(){var e,n;return n=g,function(e){return e.type===t.Identifier||e.type===t.Keyword||e.type===t.BooleanLiteral||e.type===t.NullLiteral}(e=H())||K(e),m.markEnd(m.createIdentifier(e.value),n)}function ue(){return Y("."),se()}function ce(){var e;return Y("["),e=ge(),Y("]"),e}function le(){var e,t,n;return n=g,X("new"),e=function(){var e,t,n;b(A.allowIn,"callee of new expression always allow in keyword."),n=g,e=Z("new")?le():oe();for(;J(".")||J("[");)J("[")?(t=ce(),e=m.createMemberExpression("[",e,t)):(t=ue(),e=m.createMemberExpression(".",e,t)),m.markEnd(e,n);return e}(),t=J("(")?ae():[],m.markEnd(m.createNewExpression(e,t),n)}function he(){var e,n,r=g;return e=function(){var e,t,n,r,i=A.allowIn;for(r=g,A.allowIn=!0,e=Z("new")?le():oe();;){if(J("."))n=ue(),e=m.createMemberExpression(".",e,n);else if(J("("))t=ae(),e=m.createCallExpression(e,t);else{if(!J("["))break;n=ce(),e=m.createMemberExpression("[",e,n)}m.markEnd(e,r)}return A.allowIn=i,e}(),g.type===t.Punctuator&&(!J("++")&&!J("--")||q()||(l&&e.type===i.Identifier&&O(e.name)&&W({},a.StrictLHSPostfix),te(e)||W({},a.InvalidLHSInAssignment),n=H(),e=m.markEnd(m.createPostfixExpression(n.value,e),r))),e}function fe(){var e,n,r;return g.type!==t.Punctuator&&g.type!==t.Keyword?n=he():J("++")||J("--")?(r=g,e=H(),n=fe(),l&&n.type===i.Identifier&&O(n.name)&&W({},a.StrictLHSPrefix),te(n)||W({},a.InvalidLHSInAssignment),n=m.createUnaryExpression(e.value,n),n=m.markEnd(n,r)):J("+")||J("-")||J("~")||J("!")?(r=g,e=H(),n=fe(),n=m.createUnaryExpression(e.value,n),n=m.markEnd(n,r)):Z("delete")||Z("void")||Z("typeof")?(r=g,e=H(),n=fe(),n=m.createUnaryExpression(e.value,n),n=m.markEnd(n,r),l&&"delete"===n.operator&&n.argument.type===i.Identifier&&W({},a.StrictDelete)):n=he(),n}function de(e,n){var r=0;if(e.type!==t.Punctuator&&e.type!==t.Keyword)return 0;switch(e.value){case"||":r=1;break;case"&&":r=2;break;case"|":r=3;break;case"^":r=4;break;case"&":r=5;break;case"==":case"!=":case"===":case"!==":r=6;break;case"<":case">":case"<=":case">=":case"instanceof":r=7;break;case"in":r=n?7:0;break;case"<<":case">>":case">>>":r=8;break;case"+":case"-":r=9;break;case"*":case"/":case"%":r=11}return r}function pe(){var e,t,n,r,i;return i=g,e=function(){var e,t,n,r,i,o,a,s,u,c;if(e=g,u=fe(),0===(i=de(r=g,A.allowIn)))return u;for(r.prec=i,H(),t=[e,g],o=[u,r,a=fe()];(i=de(g,A.allowIn))>0;){for(;o.length>2&&i<=o[o.length-2].prec;)a=o.pop(),s=o.pop().value,u=o.pop(),n=m.createBinaryExpression(s,u,a),t.pop(),e=t[t.length-1],m.markEnd(n,e),o.push(n);(r=H()).prec=i,o.push(r),t.push(g),n=fe(),o.push(n)}for(n=o[c=o.length-1],t.pop();c>1;)n=m.createBinaryExpression(o[c-1].value,o[c-2],n),c-=2,e=t.pop(),m.markEnd(n,e);return n}(),J("?")&&(H(),t=A.allowIn,A.allowIn=!0,n=me(),A.allowIn=t,Y(":"),r=me(),e=m.createConditionalExpression(e,n,r),m.markEnd(e,i)),e}function me(){var e,n,r,o,s;return e=g,s=g,o=n=pe(),function(){var e;return g.type===t.Punctuator&&("="===(e=g.value)||"*="===e||"/="===e||"%="===e||"+="===e||"-="===e||"<<="===e||">>="===e||">>>="===e||"&="===e||"^="===e||"|="===e)}()&&(te(n)||W({},a.InvalidLHSInAssignment),l&&n.type===i.Identifier&&O(n.name)&&W(e,a.StrictLHSAssignment),e=H(),r=me(),o=m.markEnd(m.createAssignmentExpression(e.value,n,r),s)),o}function ge(){var e,t=g;if(e=me(),J(",")){for(e=m.createSequenceExpression([e]);h<p&&J(",");)H(),e.expressions.push(me());m.markEnd(e,t)}return e}function Ae(){var e,t;return t=g,Y("{"),e=function(){for(var e,t=[];h<p&&!J("}")&&void 0!==(e=Oe());)t.push(e);return t}(),Y("}"),m.markEnd(m.createBlockStatement(e),t)}function ve(){var e,n;return n=g,(e=H()).type!==t.Identifier&&K(e),m.markEnd(m.createIdentifier(e.value),n)}function be(e){var t,n,r=null;return n=g,t=ve(),l&&O(t.name)&&W({},a.StrictVarName),"const"===e?(Y("="),r=me()):J("=")&&(H(),r=me()),m.markEnd(m.createVariableDeclarator(t,r),n)}function ye(e){var t=[];do{if(t.push(be(e)),!J(","))break;H()}while(h<p);return t}function we(){var e,t,n,r,i,o,s,u=A.allowIn;return e=t=n=null,X("for"),Y("("),J(";")?H():(Z("var")||Z("let")?(A.allowIn=!1,e=function(){var e,t,n;return n=g,e=H(),t=ye(),m.markEnd(m.createVariableDeclaration(t,e.value),n)}(),A.allowIn=u,1===e.declarations.length&&Z("in")&&(H(),r=e,i=ge(),e=null)):(A.allowIn=!1,e=ge(),A.allowIn=u,Z("in")&&(te(e)||W({},a.InvalidLHSInForIn),H(),r=e,i=ge(),e=null)),void 0===r&&Y(";")),void 0===r&&(J(";")||(t=ge()),Y(";"),J(")")||(n=ge())),Y(")"),s=A.inIteration,A.inIteration=!0,o=ke(),A.inIteration=s,void 0===r?m.createForStatement(e,t,n,o):m.createForInStatement(r,i,o)}function xe(){var e,t,n,r=[];for(n=g,Z("default")?(H(),e=null):(X("case"),e=ge()),Y(":");h<p&&!(J("}")||Z("default")||Z("case"));)t=ke(),r.push(t);return m.markEnd(m.createSwitchCase(e,r),n)}function Ce(){var e,t=[],n=null;return X("try"),e=Ae(),Z("catch")&&t.push(function(){var e,t,n;return n=g,X("catch"),Y("("),J(")")&&K(g),e=ve(),l&&O(e.name)&&W({},a.StrictCatchVariable),Y(")"),t=Ae(),m.markEnd(m.createCatchClause(e,t),n)}()),Z("finally")&&(H(),n=Ae()),0!==t.length||n||G({},a.NoCatchOrFinally),m.createTryStatement(e,[],t,n)}function ke(){var e,n,r,o,s=g.type;if(s===t.EOF&&K(g),s===t.Punctuator&&"{"===g.value)return Ae();if(o=g,s===t.Punctuator)switch(g.value){case";":return m.markEnd((Y(";"),m.createEmptyStatement()),o);case"(":return m.markEnd(function(){var e=ge();return ee(),m.createExpressionStatement(e)}(),o)}if(s===t.Keyword)switch(g.value){case"break":return m.markEnd(function(){var e,n=null;return X("break"),59===c.charCodeAt(h)?(H(),A.inIteration||A.inSwitch||G({},a.IllegalBreak),m.createBreakStatement(null)):q()?(A.inIteration||A.inSwitch||G({},a.IllegalBreak),m.createBreakStatement(null)):(g.type===t.Identifier&&(e="$"+(n=ve()).name,Object.prototype.hasOwnProperty.call(A.labelSet,e)||G({},a.UnknownLabel,n.name)),ee(),null!==n||A.inIteration||A.inSwitch||G({},a.IllegalBreak),m.createBreakStatement(n))}(),o);case"continue":return m.markEnd(function(){var e,n=null;return X("continue"),59===c.charCodeAt(h)?(H(),A.inIteration||G({},a.IllegalContinue),m.createContinueStatement(null)):q()?(A.inIteration||G({},a.IllegalContinue),m.createContinueStatement(null)):(g.type===t.Identifier&&(e="$"+(n=ve()).name,Object.prototype.hasOwnProperty.call(A.labelSet,e)||G({},a.UnknownLabel,n.name)),ee(),null!==n||A.inIteration||G({},a.IllegalContinue),m.createContinueStatement(n))}(),o);case"debugger":return m.markEnd((X("debugger"),ee(),m.createDebuggerStatement()),o);case"do":return m.markEnd(function(){var e,t,n;return X("do"),n=A.inIteration,A.inIteration=!0,e=ke(),A.inIteration=n,X("while"),Y("("),t=ge(),Y(")"),J(";")&&H(),m.createDoWhileStatement(e,t)}(),o);case"for":return m.markEnd(we(),o);case"function":return m.markEnd(_e(),o);case"if":return m.markEnd(function(){var e,t,n;return X("if"),Y("("),e=ge(),Y(")"),t=ke(),Z("else")?(H(),n=ke()):n=null,m.createIfStatement(e,t,n)}(),o);case"return":return m.markEnd(function(){var e=null;return X("return"),A.inFunctionBody||W({},a.IllegalReturn),32===c.charCodeAt(h)&&E(c.charCodeAt(h+1))?(e=ge(),ee(),m.createReturnStatement(e)):q()?m.createReturnStatement(null):(J(";")||J("}")||g.type===t.EOF||(e=ge()),ee(),m.createReturnStatement(e))}(),o);case"switch":return m.markEnd(function(){var e,t,n,r,i;if(X("switch"),Y("("),e=ge(),Y(")"),Y("{"),t=[],J("}"))return H(),m.createSwitchStatement(e,t);for(r=A.inSwitch,A.inSwitch=!0,i=!1;h<p&&!J("}");)null===(n=xe()).test&&(i&&G({},a.MultipleDefaultsInSwitch),i=!0),t.push(n);return A.inSwitch=r,Y("}"),m.createSwitchStatement(e,t)}(),o);case"throw":return m.markEnd(function(){var e;return X("throw"),q()&&G({},a.NewlineAfterThrow),e=ge(),ee(),m.createThrowStatement(e)}(),o);case"try":return m.markEnd(Ce(),o);case"var":return m.markEnd(function(){var e;return X("var"),e=ye(),ee(),m.createVariableDeclaration(e,"var")}(),o);case"while":return m.markEnd(function(){var e,t,n;return X("while"),Y("("),e=ge(),Y(")"),n=A.inIteration,A.inIteration=!0,t=ke(),A.inIteration=n,m.createWhileStatement(e,t)}(),o);case"with":return m.markEnd(function(){var e,t;return l&&(I(),W({},a.StrictModeWith)),X("with"),Y("("),e=ge(),Y(")"),t=ke(),m.createWithStatement(e,t)}(),o)}return(e=ge()).type===i.Identifier&&J(":")?(H(),r="$"+e.name,Object.prototype.hasOwnProperty.call(A.labelSet,r)&&G({},a.Redeclaration,"Label",e.name),A.labelSet[r]=!0,n=ke(),delete A.labelSet[r],m.markEnd(m.createLabeledStatement(e,n),o)):(ee(),m.markEnd(m.createExpressionStatement(e),o))}function Ee(){var e,n,r,o,s,u,f,d,v=[];for(d=g,Y("{");h<p&&g.type===t.StringLiteral&&(n=g,e=Oe(),v.push(e),e.expression.type===i.Literal);)"use strict"===c.slice(n.start+1,n.end-1)?(l=!0,r&&W(r,a.StrictOctalLiteral)):!r&&n.octal&&(r=n);for(o=A.labelSet,s=A.inIteration,u=A.inSwitch,f=A.inFunctionBody,A.labelSet={},A.inIteration=!1,A.inSwitch=!1,A.inFunctionBody=!0;h<p&&!J("}")&&void 0!==(e=Oe());)v.push(e);return Y("}"),A.labelSet=o,A.inIteration=s,A.inSwitch=u,A.inFunctionBody=f,m.markEnd(m.createBlockStatement(v),d)}function Se(e){var t,n,r,i,o,s,u=[];if(Y("("),!J(")"))for(i={};h<p&&(n=g,t=ve(),o="$"+n.value,l?(O(n.value)&&(r=n,s=a.StrictParamName),Object.prototype.hasOwnProperty.call(i,o)&&(r=n,s=a.StrictParamDupe)):e||(O(n.value)?(e=n,s=a.StrictParamName):_(n.value)?(e=n,s=a.StrictReservedWord):Object.prototype.hasOwnProperty.call(i,o)&&(e=n,s=a.StrictParamDupe)),u.push(t),i[o]=!0,!J(")"));)Y(",");return Y(")"),{params:u,stricted:r,firstRestricted:e,message:s}}function _e(){var e,t,n,r,i,o,s,u,c,h;return h=g,X("function"),r=g,e=ve(),l?O(r.value)&&W(r,a.StrictFunctionName):O(r.value)?(s=r,u=a.StrictFunctionName):_(r.value)&&(s=r,u=a.StrictReservedWord),t=(o=Se(s)).params,i=o.stricted,s=o.firstRestricted,o.message&&(u=o.message),c=l,n=Ee(),l&&s&&G(s,u),l&&i&&W(i,u),l=c,m.markEnd(m.createFunctionDeclaration(e,t,[],n),h)}function Oe(){if(g.type===t.Keyword)switch(g.value){case"const":case"let":return function(e){var t,n;return n=g,X(e),t=ye(e),ee(),m.markEnd(m.createVariableDeclaration(t,e),n)}(g.value);case"function":return _e();default:return ke()}if(g.type!==t.EOF)return ke()}function Te(){var e,n;return I(),$(),n=g,l=!1,e=function(){for(var e,n,r,o=[];h<p&&(n=g).type===t.StringLiteral&&(e=Oe(),o.push(e),e.expression.type===i.Literal);)"use strict"===c.slice(n.start+1,n.end-1)?(l=!0,r&&W(r,a.StrictOctalLiteral)):!r&&n.octal&&(r=n);for(;h<p&&void 0!==(e=Oe());)o.push(e);return o}(),m.markEnd(m.createProgram(e),n)}function De(){var e,t,n,r=[];for(e=0;e<v.tokens.length;++e)n={type:(t=v.tokens[e]).type,value:t.value},v.range&&(n.range=t.range),v.loc&&(n.loc=t.loc),r.push(n);v.tokens=r}(n={})[(t={BooleanLiteral:1,EOF:2,Identifier:3,Keyword:4,NullLiteral:5,NumericLiteral:6,Punctuator:7,StringLiteral:8,RegularExpression:9}).BooleanLiteral]="Boolean",n[t.EOF]="<end>",n[t.Identifier]="Identifier",n[t.Keyword]="Keyword",n[t.NullLiteral]="Null",n[t.NumericLiteral]="Numeric",n[t.Punctuator]="Punctuator",n[t.StringLiteral]="String",n[t.RegularExpression]="RegularExpression",r=["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="],i={AssignmentExpression:"AssignmentExpression",ArrayExpression:"ArrayExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",Program:"Program",Property:"Property",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement"},o={Data:1,Get:2,Set:4},a={UnexpectedToken:"Unexpected token %0",UnexpectedNumber:"Unexpected number",UnexpectedString:"Unexpected string",UnexpectedIdentifier:"Unexpected identifier",UnexpectedReserved:"Unexpected reserved word",UnexpectedEOS:"Unexpected end of input",NewlineAfterThrow:"Illegal newline after throw",InvalidRegExp:"Invalid regular expression",UnterminatedRegExp:"Invalid regular expression: missing /",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NoCatchOrFinally:"Missing catch or finally after try",UnknownLabel:"Undefined label '%0'",Redeclaration:"%0 '%1' has already been declared",IllegalContinue:"Illegal continue statement",IllegalBreak:"Illegal break statement",IllegalReturn:"Illegal return statement",StrictModeWith:"Strict mode code may not include a with statement",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictDuplicateProperty:"Duplicate data property in object literal not allowed in strict mode",AccessorDataProperty:"Object literal may not have data and accessor property with the same name",AccessorGetSet:"Object literal may not have multiple get/set accessors with the same name",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictReservedWord:"Use of future reserved word in strict mode"},s={NonAsciiIdentifierStart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ﬀ-ﬆﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼＡ-Ｚａ-ｚｦ-ﾾￂ-ￇￊ-ￏￒ-ￗￚ-ￜ]"),NonAsciiIdentifierPart:new RegExp("[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԧԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠࢢ-ࢬࣤ-ࣾऀ-ॣ०-९ॱ-ॷॹ-ॿঁ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఁ-ఃఅ-ఌఎ-ఐఒ-నప-ళవ-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤜᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶᴀ-ᷦ᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚗꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺꩻꪀ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ﬀ-ﬆﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︦︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ０-９Ａ-Ｚ＿ａ-ｚｦ-ﾾￂ-ￇￊ-ￏￒ-ￗￚ-ￜ]")},u={name:"SyntaxTree",processComment:function(e){var t,n;if(!(e.type===i.Program&&e.body.length>0)){for(v.trailingComments.length>0?v.trailingComments[0].range[0]>=e.range[1]?(n=v.trailingComments,v.trailingComments=[]):v.trailingComments.length=0:v.bottomRightStack.length>0&&v.bottomRightStack[v.bottomRightStack.length-1].trailingComments&&v.bottomRightStack[v.bottomRightStack.length-1].trailingComments[0].range[0]>=e.range[1]&&(n=v.bottomRightStack[v.bottomRightStack.length-1].trailingComments,delete v.bottomRightStack[v.bottomRightStack.length-1].trailingComments);v.bottomRightStack.length>0&&v.bottomRightStack[v.bottomRightStack.length-1].range[0]>=e.range[0];)t=v.bottomRightStack.pop();t?t.leadingComments&&t.leadingComments[t.leadingComments.length-1].range[1]<=e.range[0]&&(e.leadingComments=t.leadingComments,delete t.leadingComments):v.leadingComments.length>0&&v.leadingComments[v.leadingComments.length-1].range[1]<=e.range[0]&&(e.leadingComments=v.leadingComments,v.leadingComments=[]),n&&(e.trailingComments=n),v.bottomRightStack.push(e)}},markEnd:function(e,t){return v.range&&(e.range=[t.start,h]),v.loc&&(e.loc=new V(void 0===t.startLineNumber?t.lineNumber:t.startLineNumber,t.start-(void 0===t.startLineStart?t.lineStart:t.startLineStart),f,h-d),this.postProcess(e)),v.attachComment&&this.processComment(e),e},postProcess:function(e){return v.source&&(e.loc.source=v.source),e},createArrayExpression:function(e){return{type:i.ArrayExpression,elements:e}},createAssignmentExpression:function(e,t,n){return{type:i.AssignmentExpression,operator:e,left:t,right:n}},createBinaryExpression:function(e,t,n){return{type:"||"===e||"&&"===e?i.LogicalExpression:i.BinaryExpression,operator:e,left:t,right:n}},createBlockStatement:function(e){return{type:i.BlockStatement,body:e}},createBreakStatement:function(e){return{type:i.BreakStatement,label:e}},createCallExpression:function(e,t){return{type:i.CallExpression,callee:e,arguments:t}},createCatchClause:function(e,t){return{type:i.CatchClause,param:e,body:t}},createConditionalExpression:function(e,t,n){return{type:i.ConditionalExpression,test:e,consequent:t,alternate:n}},createContinueStatement:function(e){return{type:i.ContinueStatement,label:e}},createDebuggerStatement:function(){return{type:i.DebuggerStatement}},createDoWhileStatement:function(e,t){return{type:i.DoWhileStatement,body:e,test:t}},createEmptyStatement:function(){return{type:i.EmptyStatement}},createExpressionStatement:function(e){return{type:i.ExpressionStatement,expression:e}},createForStatement:function(e,t,n,r){return{type:i.ForStatement,init:e,test:t,update:n,body:r}},createForInStatement:function(e,t,n){return{type:i.ForInStatement,left:e,right:t,body:n,each:!1}},createFunctionDeclaration:function(e,t,n,r){return{type:i.FunctionDeclaration,id:e,params:t,defaults:n,body:r,rest:null,generator:!1,expression:!1}},createFunctionExpression:function(e,t,n,r){return{type:i.FunctionExpression,id:e,params:t,defaults:n,body:r,rest:null,generator:!1,expression:!1}},createIdentifier:function(e){return{type:i.Identifier,name:e}},createIfStatement:function(e,t,n){return{type:i.IfStatement,test:e,consequent:t,alternate:n}},createLabeledStatement:function(e,t){return{type:i.LabeledStatement,label:e,body:t}},createLiteral:function(e){return{type:i.Literal,value:e.value,raw:c.slice(e.start,e.end)}},createMemberExpression:function(e,t,n){return{type:i.MemberExpression,computed:"["===e,object:t,property:n}},createNewExpression:function(e,t){return{type:i.NewExpression,callee:e,arguments:t}},createObjectExpression:function(e){return{type:i.ObjectExpression,properties:e}},createPostfixExpression:function(e,t){return{type:i.UpdateExpression,operator:e,argument:t,prefix:!1}},createProgram:function(e){return{type:i.Program,body:e}},createProperty:function(e,t,n){return{type:i.Property,key:t,value:n,kind:e}},createReturnStatement:function(e){return{type:i.ReturnStatement,argument:e}},createSequenceExpression:function(e){return{type:i.SequenceExpression,expressions:e}},createSwitchCase:function(e,t){return{type:i.SwitchCase,test:e,consequent:t}},createSwitchStatement:function(e,t){return{type:i.SwitchStatement,discriminant:e,cases:t}},createThisExpression:function(){return{type:i.ThisExpression}},createThrowStatement:function(e){return{type:i.ThrowStatement,argument:e}},createTryStatement:function(e,t,n,r){return{type:i.TryStatement,block:e,guardedHandlers:t,handlers:n,finalizer:r}},createUnaryExpression:function(e,t){return"++"===e||"--"===e?{type:i.UpdateExpression,operator:e,argument:t,prefix:!0}:{type:i.UnaryExpression,operator:e,argument:t,prefix:!0}},createVariableDeclaration:function(e,t){return{type:i.VariableDeclaration,declarations:e,kind:t}},createVariableDeclarator:function(e,t){return{type:i.VariableDeclarator,id:e,init:t}},createWhileStatement:function(e,t){return{type:i.WhileStatement,test:e,body:t}},createWithStatement:function(e,t){return{type:i.WithStatement,object:e,body:t}}},e.version="1.2.5",e.tokenize=function(e,n){var r;"string"==typeof e||e instanceof String||(e=String(e)),m=u,h=0,f=(c=e).length>0?1:0,d=0,p=c.length,g=null,A={allowIn:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1},v={},(n=n||{}).tokens=!0,v.tokens=[],v.tokenize=!0,v.openParenToken=-1,v.openCurlyToken=-1,v.range="boolean"==typeof n.range&&n.range,v.loc="boolean"==typeof n.loc&&n.loc,"boolean"==typeof n.comment&&n.comment&&(v.comments=[]),"boolean"==typeof n.tolerant&&n.tolerant&&(v.errors=[]);try{if($(),g.type===t.EOF)return v.tokens;for(H();g.type!==t.EOF;)try{H()}catch(e){if(g,v.errors){v.errors.push(e);break}throw e}De(),r=v.tokens,void 0!==v.comments&&(r.comments=v.comments),void 0!==v.errors&&(r.errors=v.errors)}catch(e){throw e}finally{v={}}return r},e.parse=function(e,t){var n,r;r=String,"string"==typeof e||e instanceof String||(e=r(e)),m=u,h=0,f=(c=e).length>0?1:0,d=0,p=c.length,g=null,A={allowIn:!0,labelSet:{},inFunctionBody:!1,inIteration:!1,inSwitch:!1,lastCommentStart:-1},v={},void 0!==t&&(v.range="boolean"==typeof t.range&&t.range,v.loc="boolean"==typeof t.loc&&t.loc,v.attachComment="boolean"==typeof t.attachComment&&t.attachComment,v.loc&&null!==t.source&&void 0!==t.source&&(v.source=r(t.source)),"boolean"==typeof t.tokens&&t.tokens&&(v.tokens=[]),"boolean"==typeof t.comment&&t.comment&&(v.comments=[]),"boolean"==typeof t.tolerant&&t.tolerant&&(v.errors=[]),v.attachComment&&(v.range=!0,v.comments=[],v.bottomRightStack=[],v.trailingComments=[],v.leadingComments=[]));try{n=Te(),void 0!==v.comments&&(n.comments=v.comments),void 0!==v.tokens&&(De(),n.tokens=v.tokens),void 0!==v.errors&&(n.errors=v.errors)}catch(e){throw e}finally{v={}}return n},e.Syntax=function(){var e,t={};for(e in"function"==typeof Object.create&&(t=Object.create(null)),i)i.hasOwnProperty(e)&&(t[e]=i[e]);return"function"==typeof Object.freeze&&Object.freeze(t),t}()})?r.apply(t,i):r)&&(e.exports=i)}()},function(e,t,n){(function(e){!function(){"use strict";var r,i,o,a,s,u,c,l,h,f,d,p,m,g,A,v,b,y,w,x,C;function k(e){return q.Statement.hasOwnProperty(e.type)}var E,S=n(312),_=n(314),O=S.Syntax,T={"||":(E={Sequence:0,Yield:1,Assignment:1,Conditional:2,ArrowFunction:2,LogicalOR:3,LogicalAND:4,BitwiseOR:5,BitwiseXOR:6,BitwiseAND:7,Equality:8,Relational:9,BitwiseSHIFT:10,Additive:11,Multiplicative:12,Exponentiation:13,Await:14,Unary:14,Postfix:15,Call:16,New:17,TaggedTemplate:18,Member:19,Primary:20}).LogicalOR,"&&":E.LogicalAND,"|":E.BitwiseOR,"^":E.BitwiseXOR,"&":E.BitwiseAND,"==":E.Equality,"!=":E.Equality,"===":E.Equality,"!==":E.Equality,is:E.Equality,isnt:E.Equality,"<":E.Relational,">":E.Relational,"<=":E.Relational,">=":E.Relational,in:E.Relational,instanceof:E.Relational,"<<":E.BitwiseSHIFT,">>":E.BitwiseSHIFT,">>>":E.BitwiseSHIFT,"+":E.Additive,"-":E.Additive,"*":E.Multiplicative,"%":E.Multiplicative,"/":E.Multiplicative,"**":E.Exponentiation};function D(e,t){var n="";for(t|=0;0<t;t>>>=1,e+=e)1&t&&(n+=e);return n}function B(e){var t=e.length;return t&&_.code.isLineTerminator(e.charCodeAt(t-1))}function I(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])}function M(e,t){var n,r;function i(e){return"object"==typeof e&&e instanceof Object&&!(e instanceof RegExp)}for(n in t)t.hasOwnProperty(n)&&(i(r=t[n])?i(e[n])?M(e[n],r):e[n]=M({},r):e[n]=r);return e}function j(e,t){return 8232==(-2&e)?(t?"u":"\\u")+(8232===e?"2028":"2029"):10===e||13===e?(t?"":"\\")+(10===e?"n":"r"):String.fromCharCode(e)}function N(e){for(var t,n,r,i,o,s,u="",h=0,f=0,d=0,p=e.length;d<p;++d){if(39===(t=e.charCodeAt(d)))++h;else if(34===t)++f;else if(47===t&&a)u+="\\";else{if(_.code.isLineTerminator(t)||92===t){u+=function(e){if(92===e)return"\\\\";if(10===e)return"\\n";if(13===e)return"\\r";if(8232===e)return"\\u2028";if(8233===e)return"\\u2029";throw new Error("Incorrectly classified character")}(t);continue}if(!_.code.isIdentifierPartES5(t)&&(a&&t<32||!a&&!l&&(t<32||126<t))){u+=(i=t,o=e.charCodeAt(d+1),s=void 0,8===i?"\\b":12===i?"\\f":9===i?"\\t":(s=i.toString(16).toUpperCase(),a||255<i?"\\u"+"0000".slice(s.length)+s:0!==i||_.code.isDecimalDigit(o)?11===i?"\\x0B":"\\x"+"00".slice(s.length)+s:"\\0"));continue}}u+=String.fromCharCode(t)}if(r=(n=!("double"===c||"auto"===c&&f<h))?"'":'"',!(n?h:f))return r+u+r;for(e=u,u=r,d=0,p=e.length;d<p;++d)(39===(t=e.charCodeAt(d))&&n||34===t&&!n)&&(u+="\\"),u+=String.fromCharCode(t);return u+r}function F(e,t){if(!b)return Array.isArray(e)?function e(t){for(var n,r="",i=0,o=t.length;i<o;++i)n=t[i],r+=Array.isArray(n)?e(n):n;return r}(e):e;if(null==t){if(e instanceof r)return e;t={}}return null==t.loc?new r(null,null,b,e,t.name||null):new r(t.loc.start.line,t.loc.start.column,!0===b?t.loc.source||null:b,e,t.name||null)}function R(){return f||" "}function P(e,t){var n,r=F(e).toString();return 0===r.length?[t]:0===(n=F(t).toString()).length?[e]:(r=r.charCodeAt(r.length-1),n=n.charCodeAt(0),(43===r||45===r)&&r===n||_.code.isIdentifierPartES5(r)&&_.code.isIdentifierPartES5(n)||47===r&&105===n?[e,R(),t]:_.code.isWhiteSpace(r)||_.code.isLineTerminator(r)||_.code.isWhiteSpace(n)||_.code.isLineTerminator(n)?[e,t]:[e,f,t])}function L(e){return[i,e]}function U(e){var t=i;e(i+=o),i=t}function z(e,t){if("Line"===e.type)return B(e.value)?"//"+e.value:(s="//"+e.value,w||(s+="\n"),s);if(A.format.indent.adjustMultilineComment&&/[\n\r]/.test(e.value)){for(var n,r,o,a,s="/*"+e.value+"*/",u=s.split(/\r\n|[\r\n]/),c=Number.MAX_VALUE,l=1,h=u.length;l<h;++l){for(n=u[l],r=0;r<n.length&&_.code.isWhiteSpace(n.charCodeAt(r));)++r;r<c&&(c=r)}for(void 0!==t?(o=i,"*"===u[1][c]&&(t+=" "),i=t):(1&c&&--c,o=i),l=1,h=u.length;l<h;++l)a=F(L(u[l].slice(c))),u[l]=b?a.join(""):a;return i=o,u.join("\n")}return"/*"+e.value+"*/"}function H(e,t){var n,r,a,s,u,c,l,h,f,d,p,g;if(e.leadingComments&&0<e.leadingComments.length){if(s=t,w){for(t=[],h=(a=e.leadingComments[0]).extendedRange,f=a.range,0<(g=((p=y.substring(h[0],f[0])).match(/\n/g)||[]).length)?(t.push(D("\n",g)),t.push(L(z(a)))):(t.push(p),t.push(z(a))),d=f,n=1,r=e.leadingComments.length;n<r;n++)f=(a=e.leadingComments[n]).range,g=(y.substring(d[1],f[0]).match(/\n/g)||[]).length,t.push(D("\n",g)),t.push(L(z(a))),d=f;g=(y.substring(f[1],h[1]).match(/\n/g)||[]).length,t.push(D("\n",g))}else for(a=e.leadingComments[0],t=[],m&&e.type===O.Program&&0===e.body.length&&t.push("\n"),t.push(z(a)),B(F(t).toString())||t.push("\n"),n=1,r=e.leadingComments.length;n<r;++n)B(F(l=[z(a=e.leadingComments[n])]).toString())||l.push("\n"),t.push(L(l));t.push(L(s))}if(e.trailingComments)if(w)h=(a=e.trailingComments[0]).extendedRange,f=a.range,0<(g=((p=y.substring(h[0],f[0])).match(/\n/g)||[]).length)?(t.push(D("\n",g)),t.push(L(z(a)))):(t.push(p),t.push(z(a)));else for(u=!B(F(t).toString()),c=D(" ",function(e){for(var t=e.length-1;0<=t&&!_.code.isLineTerminator(e.charCodeAt(t));--t);return e.length-1-t}(F([i,t,o]).toString())),n=0,r=e.trailingComments.length;n<r;++n)a=e.trailingComments[n],u?(t=0===n?[t,o]:[t,c]).push(z(a,c)):t=[t,L(z(a))],n===r-1||B(F(t).toString())||(t=[t,"\n"]);return t}function $(e,t,n){for(var r=0,i=e;i<t;i++)"\n"===y[i]&&r++;for(i=1;i<r;i++)n.push(h)}function Q(e,t,n){return t<n?["(",e,")"]:e}function V(e){for(var t=e.split(/\r\n|\n/),n=1,r=t.length;n<r;n++)t[n]=h+i+t[n];return t}function q(){}function G(e){return F(e.name,e)}function W(e,t){return e.async?"async"+(t?R():f):""}function K(e){return e.generator&&!A.moz.starlessGenerator?"*"+f:""}function Y(e){var t=e.value,n="";return t.async&&(n+=W(t,!e.computed)),t.generator&&(n+=K(t)?"*":""),n}function X(e){var t=new q;if(k(e))return t.generateStatement(e,1);if(q.Expression.hasOwnProperty(e.type))return t.generateExpression(e,E.Sequence,7);throw new Error("Unknown node type: "+e.type)}q.prototype.maybeBlock=function(e,t){var n,r=this,i=!A.comment||!e.leadingComments;return e.type===O.BlockStatement&&i?[f,this.generateStatement(e,t)]:e.type===O.EmptyStatement&&i?";":(U((function(){n=[h,L(r.generateStatement(e,t))]})),n)},q.prototype.maybeBlockSuffix=function(e,t){var n=B(F(t).toString());return e.type!==O.BlockStatement||A.comment&&e.leadingComments||n?n?[t,i]:[t,h,i]:[t,f]},q.prototype.generatePattern=function(e,t,n){return e.type===O.Identifier?G(e):this.generateExpression(e,t,n)},q.prototype.generateFunctionParams=function(e){var t,n,r,i=!1;if(e.type!==O.ArrowFunctionExpression||e.rest||e.defaults&&0!==e.defaults.length||1!==e.params.length||e.params[0].type!==O.Identifier){for((r=e.type===O.ArrowFunctionExpression?[W(e,!1)]:[]).push("("),e.defaults&&(i=!0),t=0,n=e.params.length;t<n;++t)i&&e.defaults[t]?r.push(this.generateAssignment(e.params[t],e.defaults[t],"=",E.Assignment,7)):r.push(this.generatePattern(e.params[t],E.Assignment,7)),t+1<n&&r.push(","+f);e.rest&&(e.params.length&&r.push(","+f),r.push("..."),r.push(G(e.rest))),r.push(")")}else r=[W(e,!0),G(e.params[0])];return r},q.prototype.generateFunctionBody=function(e){var t,n=this.generateFunctionParams(e);return e.type===O.ArrowFunctionExpression&&(n.push(f),n.push("=>")),e.expression?(n.push(f),"{"===(t=this.generateExpression(e.body,E.Assignment,7)).toString().charAt(0)&&(t=["(",t,")"]),n.push(t)):n.push(this.maybeBlock(e.body,9)),n},q.prototype.generateIterationForStatement=function(e,t,n){var r=["for"+(t.await?R()+"await":"")+f+"("],i=this;return U((function(){t.left.type===O.VariableDeclaration?U((function(){r.push(t.left.kind+R()),r.push(i.generateStatement(t.left.declarations[0],0))})):r.push(i.generateExpression(t.left,E.Call,7)),r=P(r,e),r=[P(r,i.generateExpression(t.right,E.Assignment,7)),")"]})),r.push(this.maybeBlock(t.body,n)),r},q.prototype.generatePropertyKey=function(e,t){var n=[];return t&&n.push("["),n.push(this.generateExpression(e,E.Assignment,7)),t&&n.push("]"),n},q.prototype.generateAssignment=function(e,t,n,r,i){return E.Assignment<r&&(i|=1),Q([this.generateExpression(e,E.Call,i),f+n+f,this.generateExpression(t,E.Assignment,i)],E.Assignment,r)},q.prototype.semicolon=function(e){return!p&&32&e?"":";"},I(q.prototype,q.Statement={BlockStatement:function(e,t){var n,r,i=["{",h],o=this;return U((function(){var a,s,u,c;for(0===e.body.length&&w&&2<(n=e.range)[1]-n[0]&&(r=y.substring(n[0]+1,n[1]-1),(i="\n"===r[0]?["{"]:i).push(r)),c=1,8&t&&(c|=16),a=0,s=e.body.length;a<s;++a)w&&(0===a&&(e.body[0].leadingComments&&(n=e.body[0].leadingComments[0].extendedRange,"\n"===(r=y.substring(n[0],n[1]))[0]&&(i=["{"])),e.body[0].leadingComments||$(e.range[0],e.body[0].range[0],i)),0<a&&(e.body[a-1].trailingComments||e.body[a].leadingComments||$(e.body[a-1].range[1],e.body[a].range[0],i))),a===s-1&&(c|=32),u=e.body[a].leadingComments&&w?o.generateStatement(e.body[a],c):L(o.generateStatement(e.body[a],c)),i.push(u),B(F(u).toString())||w&&a<s-1&&e.body[a+1].leadingComments||i.push(h),!w||a!==s-1||e.body[a].trailingComments||$(e.body[a].range[1],e.range[1],i)})),i.push(L("}")),i},BreakStatement:function(e,t){return e.label?"break "+e.label.name+this.semicolon(t):"break"+this.semicolon(t)},ContinueStatement:function(e,t){return e.label?"continue "+e.label.name+this.semicolon(t):"continue"+this.semicolon(t)},ClassBody:function(e,t){var n=["{",h],r=this;return U((function(t){for(var i=0,o=e.body.length;i<o;++i)n.push(t),n.push(r.generateExpression(e.body[i],E.Sequence,7)),i+1<o&&n.push(h)})),B(F(n).toString())||n.push(h),n.push(i),n.push("}"),n},ClassDeclaration:function(e,t){var n,r=["class"];return e.id&&(r=P(r,this.generateExpression(e.id,E.Sequence,7))),e.superClass&&(n=P("extends",this.generateExpression(e.superClass,E.Unary,7)),r=P(r,n)),r.push(f),r.push(this.generateStatement(e.body,33)),r},DirectiveStatement:function(e,t){return A.raw&&e.raw?e.raw+this.semicolon(t):function(e){for(var t,n="double"===c?'"':"'",r=0,i=e.length;r<i;++r){if(39===(t=e.charCodeAt(r))){n='"';break}if(34===t){n="'";break}92===t&&++r}return n+e+n}(e.directive)+this.semicolon(t)},DoWhileStatement:function(e,t){var n=P("do",this.maybeBlock(e.body,1));return P(this.maybeBlockSuffix(e.body,n),["while"+f+"(",this.generateExpression(e.test,E.Sequence,7),")"+this.semicolon(t)])},CatchClause:function(e,t){var n,r=this;return U((function(){var t;e.param?(n=["catch"+f+"(",r.generateExpression(e.param,E.Sequence,7),")"],e.guard&&(t=r.generateExpression(e.guard,E.Sequence,7),n.splice(2,0," if ",t))):n=["catch"]})),n.push(this.maybeBlock(e.body,1)),n},DebuggerStatement:function(e,t){return"debugger"+this.semicolon(t)},EmptyStatement:function(e,t){return";"},ExportDefaultDeclaration:function(e,t){var n=32&t?33:1,r=P(r=["export"],"default");return k(e.declaration)?P(r,this.generateStatement(e.declaration,n)):P(r,this.generateExpression(e.declaration,E.Assignment,7)+this.semicolon(t))},ExportNamedDeclaration:function(e,t){var n=["export"],r=this,o=32&t?33:1;return e.declaration?P(n,this.generateStatement(e.declaration,o)):(e.specifiers&&(0===e.specifiers.length?n=P(n,"{"+f+"}"):e.specifiers[0].type===O.ExportBatchSpecifier?n=P(n,this.generateExpression(e.specifiers[0],E.Sequence,7)):(n=P(n,"{"),U((function(t){var i,o;for(n.push(h),i=0,o=e.specifiers.length;i<o;++i)n.push(t),n.push(r.generateExpression(e.specifiers[i],E.Sequence,7)),i+1<o&&n.push(","+h)})),B(F(n).toString())||n.push(h),n.push(i+"}")),e.source?n=P(n,["from"+f,this.generateExpression(e.source,E.Sequence,7),this.semicolon(t)]):n.push(this.semicolon(t))),n)},ExportAllDeclaration:function(e,t){return["export"+f,"*"+f,"from"+f,this.generateExpression(e.source,E.Sequence,7),this.semicolon(t)]},ExpressionStatement:function(e,t){var n,r,i;return 123===(r=F(n=[this.generateExpression(e.expression,E.Sequence,7)]).toString()).charCodeAt(0)||"class"===(i=r).slice(0,5)&&(123===(i=i.charCodeAt(5))||_.code.isWhiteSpace(i)||_.code.isLineTerminator(i))||"function"===(i=r).slice(0,8)&&(40===(i=i.charCodeAt(8))||_.code.isWhiteSpace(i)||42===i||_.code.isLineTerminator(i))||function(e){var t,n,r;if("async"===e.slice(0,5)&&_.code.isWhiteSpace(e.charCodeAt(5))){for(n=6,r=e.length;n<r&&_.code.isWhiteSpace(e.charCodeAt(n));++n);return n!==r?"function"===e.slice(n,n+8)&&(40===(t=e.charCodeAt(n+8))||_.code.isWhiteSpace(t)||42===t||_.code.isLineTerminator(t)):void 0}}(r)||g&&16&t&&e.expression.type===O.Literal&&"string"==typeof e.expression.value?n=["(",n,")"+this.semicolon(t)]:n.push(this.semicolon(t)),n},ImportDeclaration:function(e,t){var n,r,o=this;return 0===e.specifiers.length?["import",f,this.generateExpression(e.source,E.Sequence,7),this.semicolon(t)]:(n=["import"],r=0,e.specifiers[r].type===O.ImportDefaultSpecifier&&(n=P(n,[this.generateExpression(e.specifiers[r],E.Sequence,7)]),++r),e.specifiers[r]&&(0!==r&&n.push(","),e.specifiers[r].type===O.ImportNamespaceSpecifier?n=P(n,[f,this.generateExpression(e.specifiers[r],E.Sequence,7)]):(n.push(f+"{"),e.specifiers.length-r==1?(n.push(f),n.push(this.generateExpression(e.specifiers[r],E.Sequence,7)),n.push(f+"}"+f)):(U((function(t){var i,a;for(n.push(h),i=r,a=e.specifiers.length;i<a;++i)n.push(t),n.push(o.generateExpression(e.specifiers[i],E.Sequence,7)),i+1<a&&n.push(","+h)})),B(F(n).toString())||n.push(h),n.push(i+"}"+f)))),n=P(n,["from"+f,this.generateExpression(e.source,E.Sequence,7),this.semicolon(t)]))},VariableDeclarator:function(e,t){return t=1&t?7:6,e.init?[this.generateExpression(e.id,E.Assignment,t),f,"=",f,this.generateExpression(e.init,E.Assignment,t)]:this.generatePattern(e.id,E.Assignment,t)},VariableDeclaration:function(e,t){var n,r,i,o,a,s=this;function u(){for(o=e.declarations[0],A.comment&&o.leadingComments?(n.push("\n"),n.push(L(s.generateStatement(o,a)))):(n.push(R()),n.push(s.generateStatement(o,a))),r=1,i=e.declarations.length;r<i;++r)o=e.declarations[r],A.comment&&o.leadingComments?(n.push(","+h),n.push(L(s.generateStatement(o,a)))):(n.push(","+f),n.push(s.generateStatement(o,a)))}return n=[e.kind],a=1&t?1:0,1<e.declarations.length?U(u):u(),n.push(this.semicolon(t)),n},ThrowStatement:function(e,t){return[P("throw",this.generateExpression(e.argument,E.Sequence,7)),this.semicolon(t)]},TryStatement:function(e,t){var n,r,i,o=["try",this.maybeBlock(e.block,1)];if(o=this.maybeBlockSuffix(e.block,o),e.handlers)for(n=0,r=e.handlers.length;n<r;++n)o=P(o,this.generateStatement(e.handlers[n],1)),!e.finalizer&&n+1===r||(o=this.maybeBlockSuffix(e.handlers[n].body,o));else{for(n=0,r=(i=e.guardedHandlers||[]).length;n<r;++n)o=P(o,this.generateStatement(i[n],1)),!e.finalizer&&n+1===r||(o=this.maybeBlockSuffix(i[n].body,o));if(e.handler)if(Array.isArray(e.handler))for(n=0,r=e.handler.length;n<r;++n)o=P(o,this.generateStatement(e.handler[n],1)),!e.finalizer&&n+1===r||(o=this.maybeBlockSuffix(e.handler[n].body,o));else o=P(o,this.generateStatement(e.handler,1)),e.finalizer&&(o=this.maybeBlockSuffix(e.handler.body,o))}return e.finalizer?P(o,["finally",this.maybeBlock(e.finalizer,1)]):o},SwitchStatement:function(e,t){var n,r,i,o,a,s=this;if(U((function(){n=["switch"+f+"(",s.generateExpression(e.discriminant,E.Sequence,7),")"+f+"{"+h]})),e.cases)for(a=1,i=0,o=e.cases.length;i<o;++i)i===o-1&&(a|=32),r=L(this.generateStatement(e.cases[i],a)),n.push(r),B(F(r).toString())||n.push(h);return n.push(L("}")),n},SwitchCase:function(e,t){var n,r,i,o,a,s=this;return U((function(){for(n=e.test?[P("case",s.generateExpression(e.test,E.Sequence,7)),":"]:["default:"],i=0,(o=e.consequent.length)&&e.consequent[0].type===O.BlockStatement&&(r=s.maybeBlock(e.consequent[0],1),n.push(r),i=1),i===o||B(F(n).toString())||n.push(h),a=1;i<o;++i)i===o-1&&32&t&&(a|=32),r=L(s.generateStatement(e.consequent[i],a)),n.push(r),i+1===o||B(F(r).toString())||n.push(h)})),n},IfStatement:function(e,t){var n,r,i=this;return U((function(){n=["if"+f+"(",i.generateExpression(e.test,E.Sequence,7),")"]})),r=1,32&t&&(r|=32),e.alternate?(n.push(this.maybeBlock(e.consequent,1)),n=this.maybeBlockSuffix(e.consequent,n),n=e.alternate.type===O.IfStatement?P(n,["else ",this.generateStatement(e.alternate,r)]):P(n,P("else",this.maybeBlock(e.alternate,r)))):n.push(this.maybeBlock(e.consequent,r)),n},ForStatement:function(e,t){var n,r=this;return U((function(){n=["for"+f+"("],e.init?e.init.type===O.VariableDeclaration?n.push(r.generateStatement(e.init,0)):(n.push(r.generateExpression(e.init,E.Sequence,6)),n.push(";")):n.push(";"),e.test&&(n.push(f),n.push(r.generateExpression(e.test,E.Sequence,7))),n.push(";"),e.update&&(n.push(f),n.push(r.generateExpression(e.update,E.Sequence,7))),n.push(")")})),n.push(this.maybeBlock(e.body,32&t?33:1)),n},ForInStatement:function(e,t){return this.generateIterationForStatement("in",e,32&t?33:1)},ForOfStatement:function(e,t){return this.generateIterationForStatement("of",e,32&t?33:1)},LabeledStatement:function(e,t){return[e.label.name+":",this.maybeBlock(e.body,32&t?33:1)]},Program:function(e,t){for(var n,r=e.body.length,i=[m&&0<r?"\n":""],o=17,a=0;a<r;++a)m||a!==r-1||(o|=32),w&&(0!==a||e.body[0].leadingComments||$(e.range[0],e.body[a].range[0],i),0<a&&(e.body[a-1].trailingComments||e.body[a].leadingComments||$(e.body[a-1].range[1],e.body[a].range[0],i))),n=L(this.generateStatement(e.body[a],o)),i.push(n),a+1<r&&!B(F(n).toString())&&(w&&e.body[a+1].leadingComments||i.push(h)),!w||a!==r-1||e.body[a].trailingComments||$(e.body[a].range[1],e.range[1],i);return i},FunctionDeclaration:function(e,t){return[W(e,!0),"function",K(e)||R(),e.id?G(e.id):"",this.generateFunctionBody(e)]},ReturnStatement:function(e,t){return e.argument?[P("return",this.generateExpression(e.argument,E.Sequence,7)),this.semicolon(t)]:["return"+this.semicolon(t)]},WhileStatement:function(e,t){var n,r=this;return U((function(){n=["while"+f+"(",r.generateExpression(e.test,E.Sequence,7),")"]})),n.push(this.maybeBlock(e.body,32&t?33:1)),n},WithStatement:function(e,t){var n,r=this;return U((function(){n=["with"+f+"(",r.generateExpression(e.object,E.Sequence,7),")"]})),n.push(this.maybeBlock(e.body,32&t?33:1)),n}}),I(q.prototype,q.Expression={SequenceExpression:function(e,t,n){var r,i,o;for(E.Sequence<t&&(n|=1),r=[],i=0,o=e.expressions.length;i<o;++i)r.push(this.generateExpression(e.expressions[i],E.Assignment,n)),i+1<o&&r.push(","+f);return Q(r,E.Sequence,t)},AssignmentExpression:function(e,t,n){return this.generateAssignment(e.left,e.right,e.operator,t,n)},ArrowFunctionExpression:function(e,t,n){return Q(this.generateFunctionBody(e),E.ArrowFunction,t)},ConditionalExpression:function(e,t,n){return E.Conditional<t&&(n|=1),Q([this.generateExpression(e.test,E.LogicalOR,n),f+"?"+f,this.generateExpression(e.consequent,E.Assignment,n),f+":"+f,this.generateExpression(e.alternate,E.Assignment,n)],E.Conditional,t)},LogicalExpression:function(e,t,n){return this.BinaryExpression(e,t,n)},BinaryExpression:function(e,t,n){var r,i=T[e.operator],o="**"===e.operator?E.Postfix:i,a="**"===e.operator?i:i+1;return i<t&&(n|=1),r=47===(r=(o=this.generateExpression(e.left,o,n)).toString()).charCodeAt(r.length-1)&&_.code.isIdentifierPartES5(e.operator.charCodeAt(0))?[o,R(),e.operator]:P(o,e.operator),o=this.generateExpression(e.right,a,n),"/"===e.operator&&"/"===o.toString().charAt(0)||"<"===e.operator.slice(-1)&&"!--"===o.toString().slice(0,3)?(r.push(R()),r.push(o)):r=P(r,o),"in"!==e.operator||1&n?Q(r,i,t):["(",r,")"]},CallExpression:function(e,t,n){var r,i,o=[this.generateExpression(e.callee,E.Call,3)];for(o.push("("),r=0,i=e.arguments.length;r<i;++r)o.push(this.generateExpression(e.arguments[r],E.Assignment,7)),r+1<i&&o.push(","+f);return o.push(")"),2&n?Q(o,E.Call,t):["(",o,")"]},NewExpression:function(e,t,n){var r,i,o=e.arguments.length,a=4&n&&!d&&0===o?5:1,s=P("new",this.generateExpression(e.callee,E.New,a));if(!(4&n)||d||0<o){for(s.push("("),r=0,i=o;r<i;++r)s.push(this.generateExpression(e.arguments[r],E.Assignment,7)),r+1<i&&s.push(","+f);s.push(")")}return Q(s,E.New,t)},MemberExpression:function(e,t,n){var r=[this.generateExpression(e.object,E.Call,2&n?3:1)];return e.computed?(r.push("["),r.push(this.generateExpression(e.property,E.Sequence,2&n?7:5)),r.push("]")):(e.object.type===O.Literal&&"number"==typeof e.object.value&&(n=F(r).toString()).indexOf(".")<0&&!/[eExX]/.test(n)&&_.code.isDecimalDigit(n.charCodeAt(n.length-1))&&!(2<=n.length&&48===n.charCodeAt(0))&&r.push(" "),r.push("."),r.push(G(e.property))),Q(r,E.Member,t)},MetaProperty:function(e,t,n){var r=[];return r.push("string"==typeof e.meta?e.meta:G(e.meta)),r.push("."),r.push("string"==typeof e.property?e.property:G(e.property)),Q(r,E.Member,t)},UnaryExpression:function(e,t,n){var r,i,o=this.generateExpression(e.argument,E.Unary,7);return""===f?r=P(e.operator,o):(r=[e.operator],2<e.operator.length?r=P(r,o):(e=(e=F(r).toString()).charCodeAt(e.length-1),i=o.toString().charCodeAt(0),((43===e||45===e)&&e===i||_.code.isIdentifierPartES5(e)&&_.code.isIdentifierPartES5(i))&&r.push(R()),r.push(o))),Q(r,E.Unary,t)},YieldExpression:function(e,t,n){var r=e.delegate?"yield*":"yield";return Q(r=e.argument?P(r,this.generateExpression(e.argument,E.Yield,7)):r,E.Yield,t)},AwaitExpression:function(e,t,n){return Q(P(e.all?"await*":"await",this.generateExpression(e.argument,E.Await,7)),E.Await,t)},UpdateExpression:function(e,t,n){return e.prefix?Q([e.operator,this.generateExpression(e.argument,E.Unary,7)],E.Unary,t):Q([this.generateExpression(e.argument,E.Postfix,7),e.operator],E.Postfix,t)},FunctionExpression:function(e,t,n){var r=[W(e,!0),"function"];return e.id?(r.push(K(e)||R()),r.push(G(e.id))):r.push(K(e)||f),r.push(this.generateFunctionBody(e)),r},ArrayPattern:function(e,t,n){return this.ArrayExpression(e,t,n,!0)},ArrayExpression:function(e,t,n,r){var o,a,s=this;return e.elements.length?(a=!r&&1<e.elements.length,o=["[",a?h:""],U((function(t){for(var n=0,r=e.elements.length;n<r;++n)e.elements[n]?(o.push(a?t:""),o.push(s.generateExpression(e.elements[n],E.Assignment,7))):(a&&o.push(t),n+1===r&&o.push(",")),n+1<r&&o.push(","+(a?h:f))})),a&&!B(F(o).toString())&&o.push(h),o.push(a?i:""),o.push("]"),o):"[]"},RestElement:function(e,t,n){return"..."+this.generatePattern(e.argument)},ClassExpression:function(e,t,n){var r,i=["class"];return e.id&&(i=P(i,this.generateExpression(e.id,E.Sequence,7))),e.superClass&&(r=P("extends",this.generateExpression(e.superClass,E.Unary,7)),i=P(i,r)),i.push(f),i.push(this.generateStatement(e.body,33)),i},MethodDefinition:function(e,t,n){var r=e.static?["static"+f]:[];e="get"===e.kind||"set"===e.kind?[P(e.kind,this.generatePropertyKey(e.key,e.computed)),this.generateFunctionBody(e.value)]:[Y(e),this.generatePropertyKey(e.key,e.computed),this.generateFunctionBody(e.value)];return P(r,e)},Property:function(e,t,n){return"get"===e.kind||"set"===e.kind?[e.kind,R(),this.generatePropertyKey(e.key,e.computed),this.generateFunctionBody(e.value)]:e.shorthand?"AssignmentPattern"===e.value.type?this.AssignmentPattern(e.value,E.Sequence,7):this.generatePropertyKey(e.key,e.computed):e.method?[Y(e),this.generatePropertyKey(e.key,e.computed),this.generateFunctionBody(e.value)]:[this.generatePropertyKey(e.key,e.computed),":"+f,this.generateExpression(e.value,E.Assignment,7)]},ObjectExpression:function(e,t,n){var r,o,a,s=this;return e.properties.length?(r=1<e.properties.length,U((function(){a=s.generateExpression(e.properties[0],E.Sequence,7)})),r||/[\r\n]/g.test(F(a).toString())?(U((function(t){var n,i;if(o=["{",h,t,a],r)for(o.push(","+h),n=1,i=e.properties.length;n<i;++n)o.push(t),o.push(s.generateExpression(e.properties[n],E.Sequence,7)),n+1<i&&o.push(","+h)})),B(F(o).toString())||o.push(h),o.push(i),o.push("}"),o):["{",f,a,f,"}"]):"{}"},AssignmentPattern:function(e,t,n){return this.generateAssignment(e.left,e.right,"=",t,n)},ObjectPattern:function(e,t,n){var r,o,a,s,u,c=this;if(!e.properties.length)return"{}";if(s=!1,1===e.properties.length)(u=e.properties[0]).type===O.Property&&u.value.type!==O.Identifier&&(s=!0);else for(o=0,a=e.properties.length;o<a;++o)if((u=e.properties[o]).type===O.Property&&!u.shorthand){s=!0;break}return r=["{",s?h:""],U((function(t){for(var n=0,i=e.properties.length;n<i;++n)r.push(s?t:""),r.push(c.generateExpression(e.properties[n],E.Sequence,7)),n+1<i&&r.push(","+(s?h:f))})),s&&!B(F(r).toString())&&r.push(h),r.push(s?i:""),r.push("}"),r},ThisExpression:function(e,t,n){return"this"},Super:function(e,t,n){return"super"},Identifier:G,ImportDefaultSpecifier:function(e,t,n){return G(e.id||e.local)},ImportNamespaceSpecifier:function(e,t,n){var r=["*"];return(e=e.id||e.local)&&r.push(f+"as"+R()+G(e)),r},ImportSpecifier:function(e,t,n){var r=e.imported,i=[r.name];return(e=e.local)&&e.name!==r.name&&i.push(R()+"as"+R()+G(e)),i},ExportSpecifier:function(e,t,n){var r=e.local,i=[r.name];return(e=e.exported)&&e.name!==r.name&&i.push(R()+"as"+R()+G(e)),i},Literal:function(e,t,n){if(e.hasOwnProperty("raw")&&v&&A.raw)try{if((l=v(e.raw).body[0].expression).type===O.Literal&&l.value===e.value)return e.raw}catch(e){}if(e.regex)return"/"+e.regex.pattern+"/"+e.regex.flags;if(null===e.value)return"null";if("string"==typeof e.value)return N(e.value);if("number"==typeof e.value){var r,i,o,c,l=e.value;if(l!=l)throw new Error("Numeric literal whose value is NaN");if(l<0||0===l&&1/l<0)throw new Error("Numeric literal whose value is negative");if(l===1/0)return a?"null":s?"1e400":"1e+400";if(r=""+l,s&&!(r.length<3)){for(h=r.indexOf("."),a||48!==r.charCodeAt(0)||1!==h||(h=0,r=r.slice(1)),r=(i=r).replace("e+","e"),(o=0)<(c=i.indexOf("e"))&&(o=+i.slice(c+1),i=i.slice(0,c)),0<=h&&(o-=i.length-h-1,i=+(i.slice(0,h)+i.slice(h+1))+""),c=0;48===i.charCodeAt(i.length+c-1);)--c;0!==c&&(o-=c,i=i.slice(0,c)),0!==o&&(i+="e"+o),(i.length<r.length||u&&1e12<l&&Math.floor(l)===l&&(i="0x"+l.toString(16)).length<r.length)&&+i===l&&(r=i)}return r}if("boolean"==typeof e.value)return e.value?"true":"false";var h,f,d,p,m,g,b=e.value,y=b.toString();if(b.source){if(!(h=y.match(/\/([^/]*)$/)))return y;for(h=h[1],y="",g=m=!1,f=0,d=b.source.length;f<d;++f)p=b.source.charCodeAt(f),g=g?(y+=j(p,g),!1):(m?93===p&&(m=!1):47===p?y+="\\":91===p&&(m=!0),y+=j(p,g),92===p);return"/"+y+"/"+h}return y},GeneratorExpression:function(e,t,n){return this.ComprehensionExpression(e,t,n)},ComprehensionExpression:function(e,t,n){var r,i,o,a=this,s=e.type===O.GeneratorExpression?["("]:["["];return A.moz.comprehensionExpressionStartsWithAssignment&&(o=this.generateExpression(e.body,E.Assignment,7),s.push(o)),e.blocks&&U((function(){for(r=0,i=e.blocks.length;r<i;++r)o=a.generateExpression(e.blocks[r],E.Sequence,7),0<r||A.moz.comprehensionExpressionStartsWithAssignment?s=P(s,o):s.push(o)})),e.filter&&(s=P(s,"if"+f),o=this.generateExpression(e.filter,E.Sequence,7),s=P(s,["(",o,")"])),A.moz.comprehensionExpressionStartsWithAssignment||(o=this.generateExpression(e.body,E.Assignment,7),s=P(s,o)),s.push(e.type===O.GeneratorExpression?")":"]"),s},ComprehensionBlock:function(e,t,n){var r=e.left.type===O.VariableDeclaration?[e.left.kind,R(),this.generateStatement(e.left.declarations[0],0)]:this.generateExpression(e.left,E.Call,7);return r=P(r,e.of?"of":"in"),r=P(r,this.generateExpression(e.right,E.Sequence,7)),["for"+f+"(",r,")"]},SpreadElement:function(e,t,n){return["...",this.generateExpression(e.argument,E.Assignment,7)]},TaggedTemplateExpression:function(e,t,n){var r=3;return Q([this.generateExpression(e.tag,E.Call,r=2&n?r:1),this.generateExpression(e.quasi,E.Primary,4)],E.TaggedTemplate,t)},TemplateElement:function(e,t,n){return e.value.raw},TemplateLiteral:function(e,t,n){for(var r=["`"],i=0,o=e.quasis.length;i<o;++i)r.push(this.generateExpression(e.quasis[i],E.Primary,7)),i+1<o&&(r.push("${"+f),r.push(this.generateExpression(e.expressions[i],E.Sequence,7)),r.push(f+"}"));return r.push("`"),r},ModuleSpecifier:function(e,t,n){return this.Literal(e,t,n)},ImportExpression:function(e,t,n){return Q(["import(",this.generateExpression(e.source,E.Assignment,7),")"],E.Call,t)}}),q.prototype.generateExpression=function(e,t,n){var r,i,o,a=e.type||O.Property;return A.verbatim&&e.hasOwnProperty(A.verbatim)?(i=t,F("string"==typeof(o=(r=e)[A.verbatim])?Q(V(o),E.Sequence,i):Q(V(o.content),null!=o.precedence?o.precedence:E.Sequence,i),r)):(o=this[a](e,t,n),F(o=A.comment?H(e,o):o,e))},x={indent:{style:"",base:0},renumber:!0,hexadecimal:!0,quotes:"auto",escapeless:!0,compact:!0,parentheses:!(q.prototype.generateStatement=function(e,t){t=this[e.type](e,t);var n=F(t=A.comment?H(e,t):t).toString();return e.type!==O.Program||m||""!==h||"\n"!==n.charAt(n.length-1)||(t=b?F(t).replaceRight(/\s+$/,""):n.replace(/\s+$/,"")),F(t,e)}),semicolons:!1},C={indent:{style:"    ",base:0,adjustMultilineComment:!1},newline:"\n",space:" ",json:!1,renumber:!1,hexadecimal:!1,quotes:"single",escapeless:!1,compact:!1,parentheses:!0,semicolons:!0,safeConcatenation:!1,preserveBlankLines:!1},t.version=n(324).version,t.generate=function(x,C){var k,E={indent:null,base:null,parse:null,comment:!1,format:{indent:{style:"    ",base:0,adjustMultilineComment:!1},newline:"\n",space:" ",json:!1,renumber:!1,hexadecimal:!1,quotes:"single",escapeless:!1,compact:!1,parentheses:!0,semicolons:!0,safeConcatenation:!1,preserveBlankLines:!1},moz:{comprehensionExpressionStartsWithAssignment:!1,starlessGenerator:!1},sourceMap:null,sourceMapRoot:null,sourceMapWithCode:!1,directive:!1,raw:!0,verbatim:null,sourceCode:null};return i=null!=C?("string"==typeof C.indent&&(E.format.indent.style=C.indent),"number"==typeof C.base&&(E.format.indent.base=C.base),C=M(E,C),o=C.format.indent.style,"string"==typeof C.base?C.base:D(o,C.format.indent.base)):D(o=(C=E).format.indent.style,C.format.indent.base),a=C.format.json,s=C.format.renumber,u=!a&&C.format.hexadecimal,c=a?"double":C.format.quotes,l=C.format.escapeless,h=C.format.newline,f=C.format.space,C.format.compact&&(h=f=o=i=""),d=C.format.parentheses,p=C.format.semicolons,m=C.format.safeConcatenation,g=C.directive,v=a?null:C.parse,b=C.sourceMap,y=C.sourceCode,w=C.format.preserveBlankLines&&null!==y,A=C,b&&(r=(t.browser?e.sourceMap:n(317)).SourceNode),E=X(x),b?(k=E.toStringWithSourceMap({file:C.file,sourceRoot:C.sourceMapRoot}),C.sourceContent&&k.map.setSourceContent(C.sourceMap,C.sourceContent),C.sourceMapWithCode?k:k.map.toString()):(k={code:E.toString(),map:null},C.sourceMapWithCode?k:k.code)},t.attachComments=S.attachComments,t.Precedence=M({},E),t.browser=!1,t.FORMAT_MINIFY=x,t.FORMAT_DEFAULTS=C}()}).call(this,n(67))},function(e,t,n){!function e(t){"use strict";var r,i,o,a,s,u,c,l,h;function f(e){var t,n,r={};for(t in e)e.hasOwnProperty(t)&&(n=e[t],r[t]="object"==typeof n&&null!==n?f(n):n);return r}function d(){}function p(e,t){this.parent=e,this.key=t}function m(e,t,n,r){this.node=e,this.path=t,this.wrap=n,this.ref=r}function g(){}function A(e){return null!=e&&"object"==typeof e&&"string"==typeof e.type}function v(e,t){return(e===r.ObjectExpression||e===r.ObjectPattern)&&"properties"===t}function b(e,t){return(new g).traverse(e,t)}function y(e,t){var n=function(e,t){for(var n,r,i=e.length,o=0;i;)t(e[r=o+(n=i>>>1)])?i=n:(o=r+1,i-=1+n);return o}(t,(function(t){return t.range[0]>e.range[0]}));return e.extendedRange=[e.range[0],e.range[1]],n!==t.length&&(e.extendedRange[1]=t[n].range[0]),0<=--n&&(e.extendedRange[0]=t[n].range[1]),e}return i=(i=Array.isArray)||function(e){return"[object Array]"===Object.prototype.toString.call(e)},s=Object.create||function(e){return d.prototype=e,new d},u=Object.keys||function(e){var t,n=[];for(t in e)n.push(t);return n},r={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ComprehensionBlock:"ComprehensionBlock",ComprehensionExpression:"ComprehensionExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DebuggerStatement:"DebuggerStatement",DirectiveStatement:"DirectiveStatement",DoWhileStatement:"DoWhileStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForInStatement:"ForInStatement",ForOfStatement:"ForOfStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",GeneratorExpression:"GeneratorExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",ModuleSpecifier:"ModuleSpecifier",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchStatement:"SwitchStatement",SwitchCase:"SwitchCase",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"},a={AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AwaitExpression:["argument"],BlockStatement:["body"],BinaryExpression:["left","right"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ClassBody:["body"],ClassDeclaration:["id","superClass","body"],ClassExpression:["id","superClass","body"],ComprehensionBlock:["left","right"],ComprehensionExpression:["blocks","filter","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["source"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["declaration","specifiers","source"],ExportSpecifier:["exported","local"],ExpressionStatement:["expression"],ForStatement:["init","test","update","body"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],GeneratorExpression:["blocks","filter","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportDeclaration:["specifiers","source"],ImportDefaultSpecifier:["local"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],Literal:[],LabeledStatement:["label","body"],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["key","value"],ModuleSpecifier:[],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],Program:["body"],Property:["key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],Super:[],SwitchStatement:["discriminant","cases"],SwitchCase:["test","consequent"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],WithStatement:["object","body"],YieldExpression:["argument"]},o={Break:c={},Skip:l={},Remove:h={}},p.prototype.replace=function(e){this.parent[this.key]=e},p.prototype.remove=function(){return i(this.parent)?(this.parent.splice(this.key,1),!0):(this.replace(null),!1)},g.prototype.path=function(){var e,t,n,r,o;function a(e,t){if(i(t))for(n=0,r=t.length;n<r;++n)e.push(t[n]);else e.push(t)}if(!this.__current.path)return null;for(o=[],e=2,t=this.__leavelist.length;e<t;++e)a(o,this.__leavelist[e].path);return a(o,this.__current.path),o},g.prototype.type=function(){return this.current().type||this.__current.wrap},g.prototype.parents=function(){for(var e=[],t=1,n=this.__leavelist.length;t<n;++t)e.push(this.__leavelist[t].node);return e},g.prototype.current=function(){return this.__current.node},g.prototype.__execute=function(e,t){var n=void 0,r=this.__current;return this.__current=t,this.__state=null,e&&(n=e.call(this,t.node,this.__leavelist[this.__leavelist.length-1].node)),this.__current=r,n},g.prototype.notify=function(e){this.__state=e},g.prototype.skip=function(){this.notify(l)},g.prototype.break=function(){this.notify(c)},g.prototype.remove=function(){this.notify(h)},g.prototype.__initialize=function(e,t){this.visitor=t,this.root=e,this.__worklist=[],this.__leavelist=[],this.__current=null,this.__state=null,this.__fallback=null,"iteration"===t.fallback?this.__fallback=u:"function"==typeof t.fallback&&(this.__fallback=t.fallback),this.__keys=a,t.keys&&(this.__keys=function(e,t){for(var n,r=u(t),i=0,o=r.length;i<o;i+=1)e[n=r[i]]=t[n];return e}(s(this.__keys),t.keys))},g.prototype.traverse=function(e,t){var n,r,o,a,s,u,h,f,d,p,g,b;for(this.__initialize(e,t),b={},n=this.__worklist,r=this.__leavelist,n.push(new m(e,null,null,null)),r.push(new m(null,null,null,null));n.length;)if((o=n.pop())===b){if(o=r.pop(),u=this.__execute(t.leave,o),this.__state===c||u===c)return}else if(o.node){if(u=this.__execute(t.enter,o),this.__state===c||u===c)return;if(n.push(b),r.push(o),this.__state!==l&&u!==l){if(s=(a=o.node).type||o.wrap,!(p=this.__keys[s])){if(!this.__fallback)throw new Error("Unknown node type "+s+".");p=this.__fallback(a)}for(f=p.length;0<=--f;)if(g=a[h=p[f]])if(i(g)){for(d=g.length;0<=--d;)if(g[d]){if(v(s,p[f]))o=new m(g[d],[h,d],"Property",null);else{if(!A(g[d]))continue;o=new m(g[d],[h,d],null,null)}n.push(o)}}else A(g)&&n.push(new m(g,h,null,null))}}},g.prototype.replace=function(e,t){var n,r,o,a,s,u,f,d,g,b,y,w,x;function C(e){var t,r,i,o;if(e.ref.remove())for(r=e.ref.key,o=e.ref.parent,t=n.length;t--;)if((i=n[t]).ref&&i.ref.parent===o){if(i.ref.key<r)break;--i.ref.key}}for(this.__initialize(e,t),y={},n=this.__worklist,r=this.__leavelist,u=new m(e,null,null,new p(w={root:e},"root")),n.push(u),r.push(u);n.length;)if((u=n.pop())===y){if(u=r.pop(),void 0!==(s=this.__execute(t.leave,u))&&s!==c&&s!==l&&s!==h&&u.ref.replace(s),this.__state!==h&&s!==h||C(u),this.__state===c||s===c)return w.root}else{if(void 0!==(s=this.__execute(t.enter,u))&&s!==c&&s!==l&&s!==h&&(u.ref.replace(s),u.node=s),this.__state!==h&&s!==h||(C(u),u.node=null),this.__state===c||s===c)return w.root;if((o=u.node)&&(n.push(y),r.push(u),this.__state!==l&&s!==l)){if(a=o.type||u.wrap,!(g=this.__keys[a])){if(!this.__fallback)throw new Error("Unknown node type "+a+".");g=this.__fallback(o)}for(f=g.length;0<=--f;)if(b=o[x=g[f]])if(i(b)){for(d=b.length;0<=--d;)if(b[d]){if(v(a,g[f]))u=new m(b[d],[x,d],"Property",new p(b,d));else{if(!A(b[d]))continue;u=new m(b[d],[x,d],null,new p(b,d))}n.push(u)}}else A(b)&&n.push(new m(b,x,null,new p(o,x)))}}return w.root},t.version=n(313).version,t.Syntax=r,t.traverse=b,t.replace=function(e,t){return(new g).replace(e,t)},t.attachComments=function(e,t,n){var r,i,a,s,u=[];if(!e.range)throw new Error("attachComments needs range information");if(n.length){for(a=0,i=t.length;a<i;a+=1)u.push(y(f(t[a]),n));s=0,b(e,{enter:function(e){for(var t;s<u.length&&!((t=u[s]).extendedRange[1]>e.range[0]);)t.extendedRange[1]===e.range[0]?(e.leadingComments||(e.leadingComments=[]),e.leadingComments.push(t),u.splice(s,1)):s+=1;return s===u.length?o.Break:u[s].extendedRange[0]>e.range[1]?o.Skip:void 0}}),s=0,b(e,{leave:function(e){for(var t;s<u.length&&(t=u[s],!(e.range[1]<t.extendedRange[0]));)e.range[1]===t.extendedRange[0]?(e.trailingComments||(e.trailingComments=[]),e.trailingComments.push(t),u.splice(s,1)):s+=1;return s===u.length?o.Break:u[s].extendedRange[0]>e.range[1]?o.Skip:void 0}})}else if(t.length){for(a=0,i=t.length;a<i;a+=1)(r=f(t[a])).extendedRange=[0,e.range[0]],u.push(r);e.leadingComments=u}return e},t.VisitorKeys=a,t.VisitorOption=o,t.Controller=g,t.cloneEnvironment=function(){return e({})},t}(t)},function(e){e.exports=JSON.parse('{"_args":[["estraverse@4.2.0","C:\\\\Users\\\\admin\\\\Desktop\\\\SDK"]],"_from":"estraverse@4.2.0","_id":"estraverse@4.2.0","_inBundle":false,"_integrity":"sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=","_location":"/estraverse","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"estraverse@4.2.0","name":"estraverse","escapedName":"estraverse","rawSpec":"4.2.0","saveSpec":null,"fetchSpec":"4.2.0"},"_requiredBy":["/escodegen","/eslint-scope","/eslint/eslint-scope","/esquery","/esrecurse"],"_resolved":"http://registry.npm.taobao.org/estraverse/download/estraverse-4.2.0.tgz","_spec":"4.2.0","_where":"C:\\\\Users\\\\admin\\\\Desktop\\\\SDK","bugs":{"url":"https://github.com/estools/estraverse/issues"},"description":"ECMAScript JS AST traversal functions","devDependencies":{"babel-preset-es2015":"^6.3.13","babel-register":"^6.3.13","chai":"^2.1.1","espree":"^1.11.0","gulp":"^3.8.10","gulp-bump":"^0.2.2","gulp-filter":"^2.0.0","gulp-git":"^1.0.1","gulp-tag-version":"^1.2.1","jshint":"^2.5.6","mocha":"^2.1.0"},"engines":{"node":">=0.10.0"},"homepage":"https://github.com/estools/estraverse","license":"BSD-2-Clause","main":"estraverse.js","maintainers":[{"name":"Yusuke Suzuki","email":"utatane.tea@gmail.com","url":"http://github.com/Constellation"}],"name":"estraverse","repository":{"type":"git","url":"git+ssh://git@github.com/estools/estraverse.git"},"scripts":{"lint":"jshint estraverse.js","test":"npm run-script lint && npm run-script unit-test","unit-test":"mocha --compilers js:babel-register"},"version":"4.2.0"}')},function(e,t,n){!function(){"use strict";t.ast=n(315),t.code=n(231),t.keyword=n(316)}()},function(e,t){!function(){"use strict";function t(e){if(null!=e)switch(e.type){case"BlockStatement":case"BreakStatement":case"ContinueStatement":case"DebuggerStatement":case"DoWhileStatement":case"EmptyStatement":case"ExpressionStatement":case"ForInStatement":case"ForStatement":case"IfStatement":case"LabeledStatement":case"ReturnStatement":case"SwitchStatement":case"ThrowStatement":case"TryStatement":case"VariableDeclaration":case"WhileStatement":case"WithStatement":return!0}return!1}function n(e){switch(e.type){case"IfStatement":return null!=e.alternate?e.alternate:e.consequent;case"LabeledStatement":case"ForStatement":case"ForInStatement":case"WhileStatement":case"WithStatement":return e.body}return null}e.exports={isExpression:function(e){if(null!=e)switch(e.type){case"ArrayExpression":case"AssignmentExpression":case"BinaryExpression":case"CallExpression":case"ConditionalExpression":case"FunctionExpression":case"Identifier":case"Literal":case"LogicalExpression":case"MemberExpression":case"NewExpression":case"ObjectExpression":case"SequenceExpression":case"ThisExpression":case"UnaryExpression":case"UpdateExpression":return!0}return!1},isStatement:t,isIterationStatement:function(e){if(null!=e)switch(e.type){case"DoWhileStatement":case"ForInStatement":case"ForStatement":case"WhileStatement":return!0}return!1},isSourceElement:function(e){return t(e)||null!=e&&"FunctionDeclaration"===e.type},isProblematicIfStatement:function(e){var t;if("IfStatement"===e.type&&null!=e.alternate){t=e.consequent;do{if("IfStatement"===t.type&&null==t.alternate)return!0}while(t=n(t))}return!1},trailingStatement:n}}()},function(e,t,n){!function(){"use strict";var t=n(231);function r(e,t){return!(!t&&"yield"===e)&&i(e,t)}function i(e,t){if(t&&function(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"let":return 1;default:return}}(e))return!0;switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}}function o(e,t){return"null"===e||"true"===e||"false"===e||r(e,t)}function a(e,t){return"null"===e||"true"===e||"false"===e||i(e,t)}function s(e){var n,r,i;if(0===e.length)return!1;if(i=e.charCodeAt(0),!t.isIdentifierStartES5(i))return!1;for(n=1,r=e.length;n<r;++n)if(i=e.charCodeAt(n),!t.isIdentifierPartES5(i))return!1;return!0}function u(e){var n,r,i,o,a;if(0===e.length)return!1;for(a=t.isIdentifierStartES6,n=0,r=e.length;n<r;++n){if(55296<=(i=e.charCodeAt(n))&&i<=56319){if(r<=++n)return!1;if(!(56320<=(o=e.charCodeAt(n))&&o<=57343))return!1;i=1024*(i-55296)+(o-56320)+65536}if(!a(i))return!1;a=t.isIdentifierPartES6}return!0}e.exports={isKeywordES5:r,isKeywordES6:i,isReservedWordES5:o,isReservedWordES6:a,isRestrictedWord:function(e){return"eval"===e||"arguments"===e},isIdentifierNameES5:s,isIdentifierNameES6:u,isIdentifierES5:function(e,t){return s(e)&&!o(e,t)},isIdentifierES6:function(e,t){return u(e)&&!a(e,t)}}}()},function(e,t,n){t.SourceMapGenerator=n(232).SourceMapGenerator,t.SourceMapConsumer=n(320).SourceMapConsumer,t.SourceNode=n(323).SourceNode},function(e,t){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");t.encode=function(e){if(0<=e&&e<n.length)return n[e];throw new TypeError("Must be between 0 and 63: "+e)},t.decode=function(e){return 65<=e&&e<=90?e-65:97<=e&&e<=122?e-97+26:48<=e&&e<=57?e-48+52:43==e?62:47==e?63:-1}},function(e,t,n){var r=n(157);function i(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}i.prototype.unsortedForEach=function(e,t){this._array.forEach(e,t)},i.prototype.add=function(e){var t,n,i,o,a,s;n=e,i=(t=this._last).generatedLine,o=n.generatedLine,a=t.generatedColumn,s=n.generatedColumn,i<o||o==i&&a<=s||r.compareByGeneratedPositionsInflated(t,n)<=0?this._last=e:this._sorted=!1,this._array.push(e)},i.prototype.toArray=function(){return this._sorted||(this._array.sort(r.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},t.MappingList=i},function(e,t,n){var r=n(157),i=n(321),o=n(234).ArraySet,a=n(233),s=n(322).quickSort;function u(e,t){var n=e;return new(null!=(n="string"==typeof e?r.parseSourceMapInput(e):n).sections?h:c)(n,t)}function c(e,t){var n=e,i=(e=("string"==typeof e&&(n=r.parseSourceMapInput(e)),r.getArg(n,"version")),r.getArg(n,"sources")),a=r.getArg(n,"names",[]),s=r.getArg(n,"sourceRoot",null),u=r.getArg(n,"sourcesContent",null),c=r.getArg(n,"mappings");n=r.getArg(n,"file",null);if(e!=this._version)throw new Error("Unsupported version: "+e);s=s&&r.normalize(s),i=i.map(String).map(r.normalize).map((function(e){return s&&r.isAbsolute(s)&&r.isAbsolute(e)?r.relative(s,e):e})),this._names=o.fromArray(a.map(String),!0),this._sources=o.fromArray(i,!0),this._absoluteSources=this._sources.toArray().map((function(e){return r.computeSourceURL(s,e,t)})),this.sourceRoot=s,this.sourcesContent=u,this._mappings=c,this._sourceMapURL=t,this.file=n}function l(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function h(e,t){var n=e;"string"==typeof e&&(n=r.parseSourceMapInput(e)),e=r.getArg(n,"version"),n=r.getArg(n,"sections");if(e!=this._version)throw new Error("Unsupported version: "+e);this._sources=new o,this._names=new o;var i={line:-1,column:0};this._sections=n.map((function(e){if(e.url)throw new Error("Support for url field in sections not implemented.");var n=r.getArg(e,"offset"),o=r.getArg(n,"line"),a=r.getArg(n,"column");if(o<i.line||o===i.line&&a<i.column)throw new Error("Section offsets must be ordered and non-overlapping.");return i=n,{generatedOffset:{generatedLine:o+1,generatedColumn:a+1},consumer:new u(r.getArg(e,"map"),t)}}))}u.fromSourceMap=function(e,t){return c.fromSourceMap(e,t)},u.prototype._version=3,u.prototype.__generatedMappings=null,Object.defineProperty(u.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),u.prototype.__originalMappings=null,Object.defineProperty(u.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),u.prototype._charIsMappingSeparator=function(e,t){return";"===(e=e.charAt(t))||","===e},u.prototype._parseMappings=function(e,t){throw new Error("Subclasses must implement _parseMappings")},u.GENERATED_ORDER=1,u.ORIGINAL_ORDER=2,u.GREATEST_LOWER_BOUND=1,u.LEAST_UPPER_BOUND=2,u.prototype.eachMapping=function(e,t,n){var i;t=t||null;switch(n||u.GENERATED_ORDER){case u.GENERATED_ORDER:i=this._generatedMappings;break;case u.ORIGINAL_ORDER:i=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var o=this.sourceRoot;i.map((function(e){var t=null===e.source?null:this._sources.at(e.source);return{source:r.computeSourceURL(o,t,this._sourceMapURL),generatedLine:e.generatedLine,generatedColumn:e.generatedColumn,originalLine:e.originalLine,originalColumn:e.originalColumn,name:null===e.name?null:this._names.at(e.name)}}),this).forEach(e,t)},u.prototype.allGeneratedPositionsFor=function(e){var t=r.getArg(e,"line"),n={source:r.getArg(e,"source"),originalLine:t,originalColumn:r.getArg(e,"column",0)};if(n.source=this._findSourceIndex(n.source),n.source<0)return[];var o=[],a=this._findMapping(n,this._originalMappings,"originalLine","originalColumn",r.compareByOriginalPositions,i.LEAST_UPPER_BOUND);if(0<=a){var s=this._originalMappings[a];if(void 0===e.column)for(var u=s.originalLine;s&&s.originalLine===u;)o.push({line:r.getArg(s,"generatedLine",null),column:r.getArg(s,"generatedColumn",null),lastColumn:r.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++a];else for(var c=s.originalColumn;s&&s.originalLine===t&&s.originalColumn==c;)o.push({line:r.getArg(s,"generatedLine",null),column:r.getArg(s,"generatedColumn",null),lastColumn:r.getArg(s,"lastGeneratedColumn",null)}),s=this._originalMappings[++a]}return o},t.SourceMapConsumer=u,(c.prototype=Object.create(u.prototype)).consumer=u,c.prototype._findSourceIndex=function(e){var t,n=e;if(null!=this.sourceRoot&&(n=r.relative(this.sourceRoot,n)),this._sources.has(n))return this._sources.indexOf(n);for(t=0;t<this._absoluteSources.length;++t)if(this._absoluteSources[t]==e)return t;return-1},c.fromSourceMap=function(e,t){for(var n=Object.create(c.prototype),i=n._names=o.fromArray(e._names.toArray(),!0),a=n._sources=o.fromArray(e._sources.toArray(),!0),u=(n.sourceRoot=e._sourceRoot,n.sourcesContent=e._generateSourcesContent(n._sources.toArray(),n.sourceRoot),n.file=e._file,n._sourceMapURL=t,n._absoluteSources=n._sources.toArray().map((function(e){return r.computeSourceURL(n.sourceRoot,e,t)})),e._mappings.toArray().slice()),h=n.__generatedMappings=[],f=n.__originalMappings=[],d=0,p=u.length;d<p;d++){var m=u[d],g=new l;g.generatedLine=m.generatedLine,g.generatedColumn=m.generatedColumn,m.source&&(g.source=a.indexOf(m.source),g.originalLine=m.originalLine,g.originalColumn=m.originalColumn,m.name&&(g.name=i.indexOf(m.name)),f.push(g)),h.push(g)}return s(n.__originalMappings,r.compareByOriginalPositions),n},c.prototype._version=3,Object.defineProperty(c.prototype,"sources",{get:function(){return this._absoluteSources.slice()}}),c.prototype._parseMappings=function(e,t){for(var n,i,o,u,c=1,h=0,f=0,d=0,p=0,m=0,g=e.length,A=0,v={},b={},y=[],w=[];A<g;)if(";"===e.charAt(A))c++,A++,h=0;else if(","===e.charAt(A))A++;else{for((n=new l).generatedLine=c,u=A;u<g&&!this._charIsMappingSeparator(e,u);u++);if(o=v[i=e.slice(A,u)])A+=i.length;else{for(o=[];A<u;)a.decode(e,A,b),A=b.rest,o.push(b.value);if(2===o.length)throw new Error("Found a source, but no line and column");if(3===o.length)throw new Error("Found a source and line, but no column");v[i]=o}n.generatedColumn=h+o[0],h=n.generatedColumn,1<o.length&&(n.source=p+o[1],p+=o[1],n.originalLine=f+o[2],f=n.originalLine,n.originalLine+=1,n.originalColumn=d+o[3],d=n.originalColumn,4<o.length&&(n.name=m+o[4],m+=o[4])),w.push(n),"number"==typeof n.originalLine&&y.push(n)}s(w,r.compareByGeneratedPositionsDeflated),this.__generatedMappings=w,s(y,r.compareByOriginalPositions),this.__originalMappings=y},c.prototype._findMapping=function(e,t,n,r,o,a){if(e[n]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+e[n]);if(e[r]<0)throw new TypeError("Column must be greater than or equal to 0, got "+e[r]);return i.search(e,t,o,a)},c.prototype.computeColumnSpans=function(){for(var e=0;e<this._generatedMappings.length;++e){var t=this._generatedMappings[e];if(e+1<this._generatedMappings.length){var n=this._generatedMappings[e+1];if(t.generatedLine===n.generatedLine){t.lastGeneratedColumn=n.generatedColumn-1;continue}}t.lastGeneratedColumn=1/0}},c.prototype.originalPositionFor=function(e){var t,n={generatedLine:r.getArg(e,"line"),generatedColumn:r.getArg(e,"column")};if(0<=(e=this._findMapping(n,this._generatedMappings,"generatedLine","generatedColumn",r.compareByGeneratedPositionsDeflated,r.getArg(e,"bias",u.GREATEST_LOWER_BOUND)))&&(e=this._generatedMappings[e]).generatedLine===n.generatedLine)return null!==(n=r.getArg(e,"source",null))&&(n=this._sources.at(n),n=r.computeSourceURL(this.sourceRoot,n,this._sourceMapURL)),null!==(t=r.getArg(e,"name",null))&&(t=this._names.at(t)),{source:n,line:r.getArg(e,"originalLine",null),column:r.getArg(e,"originalColumn",null),name:t};return{source:null,line:null,column:null,name:null}},c.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some((function(e){return null==e}))},c.prototype.sourceContentFor=function(e,t){if(!this.sourcesContent)return null;if(0<=(i=this._findSourceIndex(e)))return this.sourcesContent[i];var n,i=e;if(null!=this.sourceRoot&&(i=r.relative(this.sourceRoot,i)),null!=this.sourceRoot&&(n=r.urlParse(this.sourceRoot))){if(e=i.replace(/^file:\/\//,""),"file"==n.scheme&&this._sources.has(e))return this.sourcesContent[this._sources.indexOf(e)];if((!n.path||"/"==n.path)&&this._sources.has("/"+i))return this.sourcesContent[this._sources.indexOf("/"+i)]}if(t)return null;throw new Error('"'+i+'" is not in the SourceMap.')},c.prototype.generatedPositionFor=function(e){var t=r.getArg(e,"source");return!((t=this._findSourceIndex(t))<0)&&(t={source:t,originalLine:r.getArg(e,"line"),originalColumn:r.getArg(e,"column")},0<=(e=this._findMapping(t,this._originalMappings,"originalLine","originalColumn",r.compareByOriginalPositions,r.getArg(e,"bias",u.GREATEST_LOWER_BOUND)))&&(e=this._originalMappings[e]).source===t.source)?{line:r.getArg(e,"generatedLine",null),column:r.getArg(e,"generatedColumn",null),lastColumn:r.getArg(e,"lastGeneratedColumn",null)}:{line:null,column:null,lastColumn:null}},t.BasicSourceMapConsumer=c,(h.prototype=Object.create(u.prototype)).constructor=u,h.prototype._version=3,Object.defineProperty(h.prototype,"sources",{get:function(){for(var e=[],t=0;t<this._sections.length;t++)for(var n=0;n<this._sections[t].consumer.sources.length;n++)e.push(this._sections[t].consumer.sources[n]);return e}}),h.prototype.originalPositionFor=function(e){var t={generatedLine:r.getArg(e,"line"),generatedColumn:r.getArg(e,"column")},n=i.search(t,this._sections,(function(e,t){return e.generatedLine-t.generatedOffset.generatedLine||e.generatedColumn-t.generatedOffset.generatedColumn}));return(n=this._sections[n])?n.consumer.originalPositionFor({line:t.generatedLine-(n.generatedOffset.generatedLine-1),column:t.generatedColumn-(n.generatedOffset.generatedLine===t.generatedLine?n.generatedOffset.generatedColumn-1:0),bias:e.bias}):{source:null,line:null,column:null,name:null}},h.prototype.hasContentsOfAllSources=function(){return this._sections.every((function(e){return e.consumer.hasContentsOfAllSources()}))},h.prototype.sourceContentFor=function(e,t){for(var n=0;n<this._sections.length;n++){var r=this._sections[n].consumer.sourceContentFor(e,!0);if(r)return r}if(t)return null;throw new Error('"'+e+'" is not in the SourceMap.')},h.prototype.generatedPositionFor=function(e){for(var t=0;t<this._sections.length;t++){var n=this._sections[t];if(-1!==n.consumer._findSourceIndex(r.getArg(e,"source"))){var i=n.consumer.generatedPositionFor(e);if(i)return{line:i.line+(n.generatedOffset.generatedLine-1),column:i.column+(n.generatedOffset.generatedLine===i.line?n.generatedOffset.generatedColumn-1:0)}}}return{line:null,column:null}},h.prototype._parseMappings=function(e,t){this.__generatedMappings=[],this.__originalMappings=[];for(var n=0;n<this._sections.length;n++)for(var i=this._sections[n],o=i.consumer._generatedMappings,a=0;a<o.length;a++){var u=o[a],c=i.consumer._sources.at(u.source),l=(c=r.computeSourceURL(i.consumer.sourceRoot,c,this._sourceMapURL),this._sources.add(c),c=this._sources.indexOf(c),null);c=(u.name&&(l=i.consumer._names.at(u.name),this._names.add(l),l=this._names.indexOf(l)),{source:c,generatedLine:u.generatedLine+(i.generatedOffset.generatedLine-1),generatedColumn:u.generatedColumn+(i.generatedOffset.generatedLine===u.generatedLine?i.generatedOffset.generatedColumn-1:0),originalLine:u.originalLine,originalColumn:u.originalColumn,name:l});this.__generatedMappings.push(c),"number"==typeof c.originalLine&&this.__originalMappings.push(c)}s(this.__generatedMappings,r.compareByGeneratedPositionsDeflated),s(this.__originalMappings,r.compareByOriginalPositions)},t.IndexedSourceMapConsumer=h},function(e,t){t.GREATEST_LOWER_BOUND=1,t.LEAST_UPPER_BOUND=2,t.search=function(e,n,r,i){if(0===n.length)return-1;var o=function e(n,r,i,o,a,s){var u=Math.floor((r-n)/2)+n,c=a(i,o[u],!0);return 0===c?u:0<c?1<r-u?e(u,r,i,o,a,s):s==t.LEAST_UPPER_BOUND?r<o.length?r:-1:u:1<u-n?e(n,u,i,o,a,s):s==t.LEAST_UPPER_BOUND?u:n<0?-1:n}(-1,n.length,e,n,r,i||t.GREATEST_LOWER_BOUND);if(o<0)return-1;for(;0<=o-1&&0===r(n[o],n[o-1],!0);)--o;return o}},function(e,t){function n(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}t.quickSort=function(e,t){!function e(t,r,i,o){if(i<o){l=o;for(var a=(c=i)-1,s=(n(t,Math.round(c+Math.random()*(l-c)),o),t[o]),u=i;u<o;u++)r(t[u],s)<=0&&n(t,a+=1,u);n(t,a+1,u),e(t,r,i,(l=a+1)-1),e(t,r,l+1,o)}var c,l}(e,t,0,e.length-1)}},function(e,t,n){var r=n(232).SourceMapGenerator,i=n(157),o=/(\r?\n)/,a="$$$isSourceNode$$$";function s(e,t,n,r,i){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==t?null:t,this.source=null==n?null:n,this.name=null==i?null:i,this[a]=!0,null!=r&&this.add(r)}s.fromStringWithSourceMap=function(e,t,n){function r(){return e()+(e()||"");function e(){return c<u.length?u[c++]:void 0}}var a=new s,u=e.split(o),c=0,l=1,h=0,f=null;return t.eachMapping((function(e){if(null!==f){var t;if(!(l<e.generatedLine))return t=(n=u[c]||"").substr(0,e.generatedColumn-h),u[c]=n.substr(e.generatedColumn-h),h=e.generatedColumn,d(f,t),void(f=e);d(f,r()),l++,h=0}for(;l<e.generatedLine;)a.add(r()),l++;var n;h<e.generatedColumn&&(n=u[c]||"",a.add(n.substr(0,e.generatedColumn)),u[c]=n.substr(e.generatedColumn),h=e.generatedColumn),f=e}),this),c<u.length&&(f&&d(f,r()),a.add(u.splice(c).join(""))),t.sources.forEach((function(e){var r=t.sourceContentFor(e);null!=r&&(null!=n&&(e=i.join(n,e)),a.setSourceContent(e,r))})),a;function d(e,t){var r;null===e||void 0===e.source?a.add(t):(r=n?i.join(n,e.source):e.source,a.add(new s(e.originalLine,e.originalColumn,r,t,e.name)))}},s.prototype.add=function(e){if(Array.isArray(e))e.forEach((function(e){this.add(e)}),this);else{if(!e[a]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);e&&this.children.push(e)}return this},s.prototype.prepend=function(e){if(Array.isArray(e))for(var t=e.length-1;0<=t;t--)this.prepend(e[t]);else{if(!e[a]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this},s.prototype.walk=function(e){for(var t,n=0,r=this.children.length;n<r;n++)(t=this.children[n])[a]?t.walk(e):""!==t&&e(t,{source:this.source,line:this.line,column:this.column,name:this.name})},s.prototype.join=function(e){var t,n,r=this.children.length;if(0<r){for(t=[],n=0;n<r-1;n++)t.push(this.children[n]),t.push(e);t.push(this.children[n]),this.children=t}return this},s.prototype.replaceRight=function(e,t){var n=this.children[this.children.length-1];return n[a]?n.replaceRight(e,t):"string"==typeof n?this.children[this.children.length-1]=n.replace(e,t):this.children.push("".replace(e,t)),this},s.prototype.setSourceContent=function(e,t){this.sourceContents[i.toSetString(e)]=t},s.prototype.walkSourceContents=function(e){for(var t=0,n=this.children.length;t<n;t++)this.children[t][a]&&this.children[t].walkSourceContents(e);var r=Object.keys(this.sourceContents);for(t=0,n=r.length;t<n;t++)e(i.fromSetString(r[t]),this.sourceContents[r[t]])},s.prototype.toString=function(){var e="";return this.walk((function(t){e+=t})),e},s.prototype.toStringWithSourceMap=function(e){var t={code:"",line:1,column:0},n=new r(e),i=!1,o=null,a=null,s=null,u=null;return this.walk((function(e,r){t.code+=e,null!==r.source&&null!==r.line&&null!==r.column?(o===r.source&&a===r.line&&s===r.column&&u===r.name||n.addMapping({source:r.source,original:{line:r.line,column:r.column},generated:{line:t.line,column:t.column},name:r.name}),o=r.source,a=r.line,s=r.column,u=r.name,i=!0):i&&(n.addMapping({generated:{line:t.line,column:t.column}}),o=null,i=!1);for(var c=0,l=e.length;c<l;c++)10===e.charCodeAt(c)?(t.line++,t.column=0,c+1===l?(o=null,i=!1):i&&n.addMapping({source:r.source,original:{line:r.line,column:r.column},generated:{line:t.line,column:t.column},name:r.name})):t.column++})),this.walkSourceContents((function(e,t){n.setSourceContent(e,t)})),{code:t.code,map:n}},t.SourceNode=s},function(e){e.exports=JSON.parse('{"_args":[["escodegen@1.14.3","C:\\\\Users\\\\admin\\\\Desktop\\\\SDK"]],"_from":"escodegen@1.14.3","_id":"escodegen@1.14.3","_inBundle":false,"_integrity":"sha512-qFcX0XJkdg+PB3xjZZG/wKSuT1PnQWx57+TVSjIMmILd2yC/6ByYElPwJnslDsuWuSAp4AwJGumarAAmJch5Kw==","_location":"/escodegen","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"escodegen@1.14.3","name":"escodegen","escapedName":"escodegen","rawSpec":"1.14.3","saveSpec":null,"fetchSpec":"1.14.3"},"_requiredBy":["/operator-overloading","/static-eval"],"_resolved":"https://registry.npmmirror.com/escodegen/-/escodegen-1.14.3.tgz","_spec":"1.14.3","_where":"C:\\\\Users\\\\admin\\\\Desktop\\\\SDK","bin":{"esgenerate":"bin/esgenerate.js","escodegen":"bin/escodegen.js"},"bugs":{"url":"https://github.com/estools/escodegen/issues"},"dependencies":{"esprima":"^4.0.1","estraverse":"^4.2.0","esutils":"^2.0.2","optionator":"^0.8.1","source-map":"~0.6.1"},"description":"ECMAScript code generator","devDependencies":{"acorn":"^7.1.0","bluebird":"^3.4.7","bower-registry-client":"^1.0.0","chai":"^3.5.0","commonjs-everywhere":"^0.9.7","gulp":"^3.8.10","gulp-eslint":"^3.0.1","gulp-mocha":"^3.0.1","semver":"^5.1.0"},"engines":{"node":">=4.0"},"files":["LICENSE.BSD","README.md","bin","escodegen.js","package.json"],"homepage":"http://github.com/estools/escodegen","license":"BSD-2-Clause","main":"escodegen.js","maintainers":[{"name":"Yusuke Suzuki","email":"utatane.tea@gmail.com","url":"http://github.com/Constellation"}],"name":"escodegen","optionalDependencies":{"source-map":"~0.6.1"},"repository":{"type":"git","url":"git+ssh://git@github.com/estools/escodegen.git"},"scripts":{"build":"cjsify -a path: tools/entry-point.js > escodegen.browser.js","build-min":"cjsify -ma path: tools/entry-point.js > escodegen.browser.min.js","lint":"gulp lint","release":"node tools/release.js","test":"gulp travis","unit-test":"gulp test"},"version":"1.14.3"}')},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(326),i=n(327),o=n(333),a=n(339),s=n(342),u=n(347),c=n(348);n=n(349);t.default={CODE39:r.CODE39,CODE128:i.CODE128,CODE128A:i.CODE128A,CODE128B:i.CODE128B,CODE128C:i.CODE128C,EAN13:o.EAN13,EAN8:o.EAN8,EAN5:o.EAN5,EAN2:o.EAN2,UPC:o.UPC,UPCE:o.UPCE,ITF14:a.ITF14,ITF:a.ITF,MSI:s.MSI,MSI10:s.MSI10,MSI11:s.MSI11,MSI1010:s.MSI1010,MSI1110:s.MSI1110,pharmacode:u.pharmacode,codabar:c.codabar,GenericBarcode:n.GenericBarcode}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CODE39=void 0;var r=function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e};function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}n=function(e){var t=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);function n(e,t){if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");e=e.toUpperCase(),t.mod43&&(e+=(r=function(e){for(var t=0,n=0;n<e.length;n++)t+=u(e[n]);return t%43}(e),o[r]));var r=this;e=(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t);if(r)return!e||"object"!=typeof e&&"function"!=typeof e?r:e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e),r(n,[{key:"encode",value:function(){for(var e=s("*"),t=0;t<this.data.length;t++)e+=s(this.data[t])+"0";return{data:e+=s("*"),text:this.text}}},{key:"valid",value:function(){return-1!==this.data.search(/^[0-9A-Z\-\.\ \$\/\+\%]+$/)}}]),n}(((n=n=n(75))&&n.__esModule?n:{default:n}).default);var o=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","-","."," ","$","/","+","%","*"],a=[20957,29783,23639,30485,20951,29813,23669,20855,29789,23645,29975,23831,30533,22295,30149,24005,21623,29981,23837,22301,30023,23879,30545,22343,30161,24017,21959,30065,23921,22385,29015,18263,29141,17879,29045,18293,17783,29021,18269,17477,17489,17681,20753,35770];function s(e){return e=u(e),a[e].toString(2)}function u(e){return o.indexOf(e)}t.CODE39=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CODE128C=t.CODE128B=t.CODE128A=t.CODE128=void 0;var r=a(n(328)),i=a(n(330)),o=a(n(331));n=a(n(332));function a(e){return e&&e.__esModule?e:{default:e}}t.CODE128=r.default,t.CODE128A=i.default,t.CODE128B=o.default,t.CODE128C=n.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(171)),i=o(n(329));function o(e){return e&&e.__esModule?e:{default:e}}function a(e,t){if(e)return!t||"object"!=typeof t&&"function"!=typeof t?e:t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}n=function(e){var t=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);function n(e,t){if(this instanceof n)return e=/^[\x00-\x7F\xC8-\xD3]+$/.test(e)?a(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,(0,i.default)(e),t)):a(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t)),a(e);throw new TypeError("Cannot call a class as a function")}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e),n}(r.default),t.default=n},function(e,t,n){"use strict";function r(e){return e.match(new RegExp("^"+a.A_CHARS+"*"))[0].length}function i(e){return e.match(new RegExp("^"+a.B_CHARS+"*"))[0].length}function o(e){return e.match(new RegExp("^"+a.C_CHARS+"*"))[0]}Object.defineProperty(t,"__esModule",{value:!0});var a=n(158);function s(e,t){var n=t?a.A_CHARS:a.B_CHARS,r=e.match(new RegExp("^("+n+"+?)(([0-9]{2}){2,})([^0-9]|$)"));return r?r[1]+String.fromCharCode(204)+u(e.substring(r[1].length)):(r=e.match(new RegExp("^"+n+"+"))[0]).length===e.length?e:r+String.fromCharCode(t?205:206)+s(e.substring(r.length),!t)}function u(e){var t=o(e),n=t.length;return n===e.length?e:(n=r(e=e.substring(n))>=i(e),t+String.fromCharCode(n?206:205)+s(e,n))}t.default=function(e){var t;return(2<=o(e).length?a.C_START_CHAR+u(e):((t=r(e)>i(e))?a.A_START_CHAR:a.B_START_CHAR)+s(e,t)).replace(/[\xCD\xCE]([^])[\xCD\xCE]/,(function(e,t){return String.fromCharCode(203)+t}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e};function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o=(o=o=n(171))&&o.__esModule?o:{default:o},a=n(158);n=function(e){var t=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);function n(e,t){if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");e=(n.__proto__||Object.getPrototypeOf(n)).call(this,a.A_START_CHAR+e,t);if(this)return!e||"object"!=typeof e&&"function"!=typeof e?this:e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e),r(n,[{key:"valid",value:function(){return new RegExp("^"+a.A_CHARS+"+$").test(this.data)}}]),n}(o.default),t.default=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e};function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o=(o=o=n(171))&&o.__esModule?o:{default:o},a=n(158);n=function(e){var t=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);function n(e,t){if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");e=(n.__proto__||Object.getPrototypeOf(n)).call(this,a.B_START_CHAR+e,t);if(this)return!e||"object"!=typeof e&&"function"!=typeof e?this:e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e),r(n,[{key:"valid",value:function(){return new RegExp("^"+a.B_CHARS+"+$").test(this.data)}}]),n}(o.default),t.default=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e};function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o=(o=o=n(171))&&o.__esModule?o:{default:o},a=n(158);n=function(e){var t=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);function n(e,t){if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");e=(n.__proto__||Object.getPrototypeOf(n)).call(this,a.C_START_CHAR+e,t);if(this)return!e||"object"!=typeof e&&"function"!=typeof e?this:e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e),r(n,[{key:"valid",value:function(){return new RegExp("^"+a.C_CHARS+"+$").test(this.data)}}]),n}(o.default),t.default=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UPCE=t.UPC=t.EAN2=t.EAN5=t.EAN8=t.EAN13=void 0;var r=u(n(334)),i=u(n(335)),o=u(n(336)),a=u(n(337)),s=u(n(236));n=u(n(338));function u(e){return e&&e.__esModule?e:{default:e}}t.EAN13=r.default,t.EAN8=i.default,t.EAN5=o.default,t.EAN2=a.default,t.UPC=s.default,t.UPCE=n.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e,t,n){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,t);return void 0!==r?"value"in r?r.value:void 0!==(r=r.get)?r.call(n):void 0:null!==(r=Object.getPrototypeOf(e))?i(r,t,n):void 0}var o=n(159);function a(e){return(10-e.substr(0,12).split("").map((function(e){return+e})).reduce((function(e,t,n){return n%2?e+3*t:e+t}),0)%10)%10}n=function(e){var t=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);function n(e,t){if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");return-1!==e.search(/^[0-9]{12}$/)&&(e+=a(e)),(e=function(e,t){if(e)return!t||"object"!=typeof t&&"function"!=typeof t?e:t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))).lastChar=t.lastChar,e}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e),function(e,t,n){t&&r(e.prototype,t),n&&r(e,n)}(n,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{13}$/)&&+this.data[12]===a(this.data)}},{key:"leftText",value:function(){return i(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"leftText",this).call(this,1,6)}},{key:"leftEncode",value:function(){var e=this.data.substr(1,6),t=o.EAN13_STRUCTURE[this.data[0]];return i(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"leftEncode",this).call(this,e,t)}},{key:"rightText",value:function(){return i(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"rightText",this).call(this,7,6)}},{key:"rightEncode",value:function(){var e=this.data.substr(7,6);return i(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"rightEncode",this).call(this,e,"RRRRRR")}},{key:"encodeGuarded",value:function(){var e=i(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"encodeGuarded",this).call(this);return this.options.displayValue&&(e.unshift({data:"000000000000",text:this.text.substr(0,1),options:{textAlign:"left",fontSize:this.fontSize}}),this.options.lastChar&&(e.push({data:"00"}),e.push({data:"00000",text:this.options.lastChar,options:{fontSize:this.fontSize}}))),e}}]),n}((n=(n=n=n(235))&&n.__esModule?n:{default:n}).default),t.default=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e};function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){null===e&&(e=Function.prototype);var r=Object.getOwnPropertyDescriptor(e,t);return void 0!==r?"value"in r?r.value:void 0!==(r=r.get)?r.call(n):void 0:null!==(r=Object.getPrototypeOf(e))?o(r,t,n):void 0}function a(e){return(10-e.substr(0,7).split("").map((function(e){return+e})).reduce((function(e,t,n){return n%2?e+t:e+3*t}),0)%10)%10}n=function(e){var t=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);function n(e,t){if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");-1!==e.search(/^[0-9]{7}$/)&&(e+=a(e));e=(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t);if(this)return!e||"object"!=typeof e&&"function"!=typeof e?this:e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e),r(n,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{8}$/)&&+this.data[7]===a(this.data)}},{key:"leftText",value:function(){return o(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"leftText",this).call(this,0,4)}},{key:"leftEncode",value:function(){var e=this.data.substr(0,4);return o(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"leftEncode",this).call(this,e,"LLLL")}},{key:"rightText",value:function(){return o(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"rightText",this).call(this,4,4)}},{key:"rightEncode",value:function(){var e=this.data.substr(4,4);return o(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"rightEncode",this).call(this,e,"RRRR")}}]),n}((n=(n=n=n(235))&&n.__esModule?n:{default:n}).default),t.default=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e};function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o=n(159),a=s(n(160));function s(e){return e&&e.__esModule?e:{default:e}}n=function(e){var t=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);function n(e,t){if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");e=(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t);if(this)return!e||"object"!=typeof e&&"function"!=typeof e?this:e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e),r(n,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{5}$/)}},{key:"encode",value:function(){var e=o.EAN5_STRUCTURE[this.data.split("").map((function(e){return+e})).reduce((function(e,t,n){return n%2?e+9*t:e+3*t}),0)%10];return{data:"1011"+(0,a.default)(this.data,e,"01"),text:this.text}}}]),n}((n=s(n(75))).default),t.default=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e};function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o=n(159),a=s(n(160));function s(e){return e&&e.__esModule?e:{default:e}}n=function(e){var t=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);function n(e,t){if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");e=(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t);if(this)return!e||"object"!=typeof e&&"function"!=typeof e?this:e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e),r(n,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{2}$/)}},{key:"encode",value:function(){var e=o.EAN2_STRUCTURE[parseInt(this.data)%4];return{data:"1011"+(0,a.default)(this.data,e,"01"),text:this.text}}}]),n}(s(n(75)).default),t.default=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e};function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o=u(n(160)),a=u(n(75)),s=n(236);function u(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(e)return!t||"object"!=typeof t&&"function"!=typeof t?e:t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}var l=["XX00000XXX","XX10000XXX","XX20000XXX","XXX00000XX","XXXX00000X","XXXXX00005","XXXXX00006","XXXXX00007","XXXXX00008","XXXXX00009"],h=[["EEEOOO","OOOEEE"],["EEOEOO","OOEOEE"],["EEOOEO","OOEEOE"],["EEOOOE","OOEEEO"],["EOEEOO","OEOOEE"],["EOOEEO","OEEOOE"],["EOOOEE","OEEEOO"],["EOEOEO","OEOEOE"],["EOEOOE","OEOEEO"],["EOOEOE","OEEOEO"]];n=function(e){var t=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);function n(e,t){if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");var r=c(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t));if(r.isValid=!1,-1!==e.search(/^[0-9]{6}$/))r.middleDigits=e,r.upcA=f(e,"0"),r.text=t.text||""+r.upcA[0]+e+r.upcA[r.upcA.length-1];else{if(-1===e.search(/^[01][0-9]{7}$/))return c(r);if(r.middleDigits=e.substring(1,e.length-1),r.upcA=f(r.middleDigits,e[0]),r.upcA[r.upcA.length-1]!==e[e.length-1])return c(r)}return r.isValid=!0,r.displayValue=t.displayValue,t.fontSize>10*t.width?r.fontSize=10*t.width:r.fontSize=t.fontSize,r.guardHeight=t.height+r.fontSize/2+t.textMargin,r}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e),r(n,[{key:"valid",value:function(){return this.isValid}},{key:"encode",value:function(){return this.options.flat?this.flatEncoding():this.guardedEncoding()}},{key:"flatEncoding",value:function(){var e="";return{data:(e+="101")+this.encodeMiddleDigits()+"010101",text:this.text}}},{key:"guardedEncoding",value:function(){var e=[];return this.displayValue&&e.push({data:"00000000",text:this.text[0],options:{textAlign:"left",fontSize:this.fontSize}}),e.push({data:"101",options:{height:this.guardHeight}}),e.push({data:this.encodeMiddleDigits(),text:this.text.substring(1,7),options:{fontSize:this.fontSize}}),e.push({data:"010101",options:{height:this.guardHeight}}),this.displayValue&&e.push({data:"00000000",text:this.text[7],options:{textAlign:"right",fontSize:this.fontSize}}),e}},{key:"encodeMiddleDigits",value:function(){var e=this.upcA[0],t=this.upcA[this.upcA.length-1];t=h[parseInt(t)][parseInt(e)];return(0,o.default)(this.middleDigits,t)}}]),n}(a.default);function f(e,t){for(var n=parseInt(e[e.length-1]),r=l[n],i="",o=0,a=0;a<r.length;a++){var u=r[a];i+="X"===u?e[o++]:u}return(i=""+t+i)+(0,s.checksum)(i)}t.default=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ITF14=t.ITF=void 0;var r=i(n(237));n=i(n(341));function i(e){return e&&e.__esModule?e:{default:e}}t.ITF=r.default,t.ITF14=n.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.START_BIN="1010",t.END_BIN="11101",t.BINARIES=["00110","10001","01001","11000","00101","10100","01100","00011","10010","01010"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e};function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e){return e=e.substr(0,13).split("").map((function(e){return parseInt(e,10)})).reduce((function(e,t,n){return e+t*(3-n%2*2)}),0),10*Math.ceil(e/10)-e}n=function(e){var t=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);function n(e,t){if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");-1!==e.search(/^[0-9]{13}$/)&&(e+=o(e));e=(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t);if(this)return!e||"object"!=typeof e&&"function"!=typeof e?this:e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e),r(n,[{key:"valid",value:function(){return-1!==this.data.search(/^[0-9]{14}$/)&&+this.data[13]===o(this.data)}}]),n}((n=(n=n=n(237))&&n.__esModule?n:{default:n}).default),t.default=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MSI1110=t.MSI1010=t.MSI11=t.MSI10=t.MSI=void 0;var r=s(n(161)),i=s(n(343)),o=s(n(344)),a=s(n(345));n=s(n(346));function s(e){return e&&e.__esModule?e:{default:e}}t.MSI=r.default,t.MSI10=i.default,t.MSI11=o.default,t.MSI1010=a.default,t.MSI1110=n.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=(r=r=n(161))&&r.__esModule?r:{default:r},i=n(172);n=function(e){var t=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);function n(e,t){if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");e=(n.__proto__||Object.getPrototypeOf(n)).call(this,e+(0,i.mod10)(e),t);if(this)return!e||"object"!=typeof e&&"function"!=typeof e?this:e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e),n}(r.default),t.default=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=(r=r=n(161))&&r.__esModule?r:{default:r},i=n(172);n=function(e){var t=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);function n(e,t){if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");e=(n.__proto__||Object.getPrototypeOf(n)).call(this,e+(0,i.mod11)(e),t);if(this)return!e||"object"!=typeof e&&"function"!=typeof e?this:e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e),n}(r.default),t.default=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=(r=r=n(161))&&r.__esModule?r:{default:r},i=n(172);n=function(e){var t=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);function n(e,t){if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");e=(e+=(0,i.mod10)(e))+(0,i.mod10)(e);e=(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t);if(this)return!e||"object"!=typeof e&&"function"!=typeof e?this:e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e),n}(r.default),t.default=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=(r=r=n(161))&&r.__esModule?r:{default:r},i=n(172);n=function(e){var t=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);function n(e,t){if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");e=(e+=(0,i.mod11)(e))+(0,i.mod10)(e);e=(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t);if(this)return!e||"object"!=typeof e&&"function"!=typeof e?this:e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e),n}(r.default),t.default=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pharmacode=void 0;function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}n=function(e){var t=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);function n(e,t){if(this instanceof n)return(t=function(e,t){if(e)return!t||"object"!=typeof t&&"function"!=typeof t?e:t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t))).number=parseInt(e,10),t;throw new TypeError("Cannot call a class as a function")}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e),function(e,t,n){t&&r(e.prototype,t),n&&r(e,n)}(n,[{key:"encode",value:function(){for(var e=this.number,t="";!isNaN(e)&&0!=e;)e=e%2==0?(t="11100"+t,(e-2)/2):(t="100"+t,(e-1)/2);return{data:t=t.slice(0,-2),text:this.text}}},{key:"valid",value:function(){return 3<=this.number&&this.number<=131070}}]),n}(((n=n=n(75))&&n.__esModule?n:{default:n}).default),t.pharmacode=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.codabar=void 0;function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}n=function(e){var t=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);function n(e,t){if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");return 0===e.search(/^[0-9\-\$\:\.\+\/]+$/)&&(e="A"+e+"A"),(e=function(e,t){if(e)return!t||"object"!=typeof t&&"function"!=typeof t?e:t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e.toUpperCase(),t))).text=e.options.text||e.text.replace(/[A-D]/g,""),e}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e),function(e,t,n){t&&r(e.prototype,t),n&&r(e,n)}(n,[{key:"valid",value:function(){return-1!==this.data.search(/^[A-D][0-9\-\$\:\.\+\/]+[A-D]$/)}},{key:"encode",value:function(){for(var e=[],t=this.getEncodings(),n=0;n<this.data.length;n++)e.push(t[this.data.charAt(n)]),n!==this.data.length-1&&e.push("0");return{text:this.text,data:e.join("")}}},{key:"getEncodings",value:function(){return{0:"101010011",1:"101011001",2:"101001011",3:"110010101",4:"101101001",5:"110101001",6:"100101011",7:"100101101",8:"100110101",9:"110100101","-":"101001101",$:"101100101",":":"1101011011","/":"1101101011",".":"1101101101","+":"1011011011",A:"1011001001",B:"1001001011",C:"1010010011",D:"1010011001"}}}]),n}(((n=n=n(75))&&n.__esModule?n:{default:n}).default),t.codabar=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GenericBarcode=void 0;var r=function(e,t,n){return t&&i(e.prototype,t),n&&i(e,n),e};function i(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}n=function(e){var t=n;if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);function n(e,t){if(!(this instanceof n))throw new TypeError("Cannot call a class as a function");e=(n.__proto__||Object.getPrototypeOf(n)).call(this,e,t);if(this)return!e||"object"!=typeof e&&"function"!=typeof e?this:e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e),r(n,[{key:"encode",value:function(){return{data:"10101010101010101010101010101010101010101",text:this.text}}},{key:"valid",value:function(){return!0}}]),n}(((n=n=n(75))&&n.__esModule?n:{default:n}).default),t.GenericBarcode=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=[];return function e(n){if(Array.isArray(n))for(var r=0;r<n.length;r++)e(n[r]);else n.text=n.text||"",n.data=n.data||"",t.push(n)}(e),t}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e.marginTop=e.marginTop||e.margin,e.marginBottom=e.marginBottom||e.margin,e.marginRight=e.marginRight||e.margin,e.marginLeft=e.marginLeft||e.margin,e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=s(n(353)),o=s(n(354)),a=n(241);function s(e){return e&&e.__esModule?e:{default:e}}t.default=function e(t){if("string"!=typeof t){if(Array.isArray(t)){for(var n=[],s=0;s<t.length;s++)n.push(e(t[s]));return n}if("undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLImageElement)return u=t,{element:c=document.createElement("canvas"),options:(0,i.default)(u),renderer:o.default.CanvasRenderer,afterRender:function(){u.setAttribute("src",c.toDataURL())}};if(t&&t.nodeName&&"svg"===t.nodeName.toLowerCase()||"undefined"!=typeof SVGElement&&t instanceof SVGElement)return{element:t,options:(0,i.default)(t),renderer:o.default.SVGRenderer};if("undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement)return{element:t,options:(0,i.default)(t),renderer:o.default.CanvasRenderer};if(t&&t.getContext)return{element:t,renderer:o.default.CanvasRenderer};if(t&&"object"===(void 0===t?"undefined":r(t))&&!t.nodeName)return{element:t,renderer:o.default.ObjectRenderer};throw new a.InvalidElementException}var u,c,l=t,h=document.querySelectorAll(l);if(0!==h.length){for(var f=[],d=0;d<h.length;d++)f.push(e(h[d]));return f}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(238)),i=o(n(239));function o(e){return e&&e.__esModule?e:{default:e}}t.default=function(e){var t,n={};for(t in i.default)i.default.hasOwnProperty(t)&&(e.hasAttribute("jsbarcode-"+t.toLowerCase())&&(n[t]=e.getAttribute("jsbarcode-"+t.toLowerCase())),e.hasAttribute("data-"+t.toLowerCase())&&(n[t]=e.getAttribute("data-"+t.toLowerCase())));return n.value=e.getAttribute("jsbarcode-value")||e.getAttribute("data-value"),(0,r.default)(n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(355)),i=o(n(356));n=o(n(357));function o(e){return e&&e.__esModule?e:{default:e}}t.default={CanvasRenderer:r.default,SVGRenderer:i.default,ObjectRenderer:n.default}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=n(173),o=(i=i)&&i.__esModule?i:{default:i},a=n(240);function s(e,t,n){if(!(this instanceof s))throw new TypeError("Cannot call a class as a function");this.canvas=e,this.encodings=t,this.options=n}!function(e,t,n){t&&r(e.prototype,t),n&&r(e,n)}(s,[{key:"render",value:function(){if(!this.canvas.getContext)throw new Error("The browser does not support canvas.");this.prepareCanvas();for(var e=0;e<this.encodings.length;e++){var t=(0,o.default)(this.options,this.encodings[e].options);this.drawCanvasBarcode(t,this.encodings[e]),this.drawCanvasText(t,this.encodings[e]),this.moveCanvasDrawing(this.encodings[e])}this.restoreCanvas()}},{key:"prepareCanvas",value:function(){var e=this.canvas.getContext("2d"),t=(e.save(),(0,a.calculateEncodingAttributes)(this.encodings,this.options,e),(0,a.getTotalWidthOfEncodings)(this.encodings)),n=(0,a.getMaximumHeightOfEncodings)(this.encodings);this.canvas.width=t+this.options.marginLeft+this.options.marginRight,this.canvas.height=n,e.clearRect(0,0,this.canvas.width,this.canvas.height),this.options.background&&(e.fillStyle=this.options.background,e.fillRect(0,0,this.canvas.width,this.canvas.height)),e.translate(this.options.marginLeft,0)}},{key:"drawCanvasBarcode",value:function(e,t){var n=this.canvas.getContext("2d"),r=t.data,i="top"==e.textPosition?e.marginTop+e.fontSize+e.textMargin:e.marginTop;n.fillStyle=e.lineColor;for(var o=0;o<r.length;o++){var a=o*e.width+t.barcodePadding;"1"===r[o]?n.fillRect(a,i,e.width,e.height):r[o]&&n.fillRect(a,i,e.width,e.height*r[o])}}},{key:"drawCanvasText",value:function(e,t){var n,r,i=this.canvas.getContext("2d"),o=e.fontOptions+" "+e.fontSize+"px "+e.font;e.displayValue&&(r="top"==e.textPosition?e.marginTop+e.fontSize-e.textMargin:e.height+e.textMargin+e.marginTop+e.fontSize,i.font=o,"left"==e.textAlign||0<t.barcodePadding?(n=0,i.textAlign="left"):"right"==e.textAlign?(n=t.width-1,i.textAlign="right"):(n=t.width/2,i.textAlign="center"),i.fillText(t.text,n,r))}},{key:"moveCanvasDrawing",value:function(e){this.canvas.getContext("2d").translate(e.width,0)}},{key:"restoreCanvas",value:function(){this.canvas.getContext("2d").restore()}}]),i=s,t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=(s=s=n(173))&&s.__esModule?s:{default:s},o=n(240),a="http://www.w3.org/2000/svg",s=(function(e,t,n){t&&r(e.prototype,t),n&&r(e,n)}(u,[{key:"render",value:function(){var e=this.options.marginLeft;this.prepareSVG();for(var t=0;t<this.encodings.length;t++){var n=this.encodings[t],r=(0,i.default)(this.options,n.options),o=this.createGroup(e,r.marginTop,this.svg);this.setGroupOptions(o,r),this.drawSvgBarcode(o,r,n),this.drawSVGText(o,r,n),e+=n.width}}},{key:"prepareSVG",value:function(){for(;this.svg.firstChild;)this.svg.removeChild(this.svg.firstChild);(0,o.calculateEncodingAttributes)(this.encodings,this.options);var e=(0,o.getTotalWidthOfEncodings)(this.encodings),t=(0,o.getMaximumHeightOfEncodings)(this.encodings);e=e+this.options.marginLeft+this.options.marginRight;this.setSvgAttributes(e,t),this.options.background&&this.drawRect(0,0,e,t,this.svg).setAttribute("style","fill:"+this.options.background+";")}},{key:"drawSvgBarcode",value:function(e,t,n){for(var r=n.data,i="top"==t.textPosition?t.fontSize+t.textMargin:0,o=0,a=0,s=0;s<r.length;s++)a=s*t.width+n.barcodePadding,"1"===r[s]?o++:0<o&&(this.drawRect(a-t.width*o,i,t.width*o,t.height,e),o=0);0<o&&this.drawRect(a-t.width*(o-1),i,t.width*o,t.height,e)}},{key:"drawSVGText",value:function(e,t,n){var r,i,o=this.document.createElementNS(a,"text");t.displayValue&&(o.setAttribute("style","font:"+t.fontOptions+" "+t.fontSize+"px "+t.font),i="top"==t.textPosition?t.fontSize-t.textMargin:t.height+t.textMargin+t.fontSize,"left"==t.textAlign||0<n.barcodePadding?(r=0,o.setAttribute("text-anchor","start")):"right"==t.textAlign?(r=n.width-1,o.setAttribute("text-anchor","end")):(r=n.width/2,o.setAttribute("text-anchor","middle")),o.setAttribute("x",r),o.setAttribute("y",i),o.appendChild(this.document.createTextNode(n.text)),e.appendChild(o))}},{key:"setSvgAttributes",value:function(e,t){var n=this.svg;n.setAttribute("width",e+"px"),n.setAttribute("height",t+"px"),n.setAttribute("x","0px"),n.setAttribute("y","0px"),n.setAttribute("viewBox","0 0 "+e+" "+t),n.setAttribute("xmlns",a),n.setAttribute("version","1.1"),n.setAttribute("style","transform: translate(0,0)")}},{key:"createGroup",value:function(e,t,n){var r=this.document.createElementNS(a,"g");return r.setAttribute("transform","translate("+e+", "+t+")"),n.appendChild(r),r}},{key:"setGroupOptions",value:function(e,t){e.setAttribute("style","fill:"+t.lineColor+";")}},{key:"drawRect",value:function(e,t,n,r,i){var o=this.document.createElementNS(a,"rect");return o.setAttribute("x",e),o.setAttribute("y",t),o.setAttribute("width",n),o.setAttribute("height",r),i.appendChild(o),o}}]),u);function u(e,t,n){if(!(this instanceof u))throw new TypeError("Cannot call a class as a function");this.svg=e,this.encodings=t,this.options=n,this.document=n.xmlDocument||document}t.default=s},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e,t,n){if(!(this instanceof i))throw new TypeError("Cannot call a class as a function");this.object=e,this.encodings=t,this.options=n}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t,n){t&&r(e.prototype,t)}(i,[{key:"render",value:function(){this.object.encodings=this.encodings}}]),t.default=i},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e){if(!(this instanceof i))throw new TypeError("Cannot call a class as a function");this.api=e}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t,n){t&&r(e.prototype,t)}(i,[{key:"handleCatch",value:function(e){if("InvalidInputException"!==e.name)throw e;if(this.api._options.valid===this.api._defaults.valid)throw e.message;this.api._options.valid(!1),this.api.render=function(){}}},{key:"wrapBarcodeCall",value:function(e){try{var t=e.apply(void 0,arguments);return this.api._options.valid(!0),t}catch(e){return this.handleCatch(e),this.api}}}]),t.default=i},function(e,t,n){(function(t){(function(){var n,r,i,o,a,s;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:null!=t&&t.hrtime?(e.exports=function(){return(n()-a)/1e6},r=t.hrtime,o=(n=function(){var e=r();return 1e9*e[0]+e[1]})(),s=1e9*t.uptime(),a=o-s):i=Date.now?(e.exports=function(){return Date.now()-i},Date.now()):(e.exports=function(){return(new Date).getTime()-i},(new Date).getTime())}).call(this)}).call(this,n(117))},function(e,t,n){},function(e,t,n){"use strict";t.byteLength=function(e){return 3*((e=c(e))[0]+(e=e[1]))/4-e},t.toByteArray=function(e){for(var t,n=(r=c(e))[0],r=r[1],a=new o(function(e,t){return 3*(e+t)/4-t}(n,r)),s=0,u=0<r?n-4:n,l=0;l<u;l+=4)t=i[e.charCodeAt(l)]<<18|i[e.charCodeAt(l+1)]<<12|i[e.charCodeAt(l+2)]<<6|i[e.charCodeAt(l+3)],a[s++]=t>>16&255,a[s++]=t>>8&255,a[s++]=255&t;return 2===r&&(t=i[e.charCodeAt(l)]<<2|i[e.charCodeAt(l+1)]>>4,a[s++]=255&t),1===r&&(t=i[e.charCodeAt(l)]<<10|i[e.charCodeAt(l+1)]<<4|i[e.charCodeAt(l+2)]>>2,a[s++]=t>>8&255,a[s++]=255&t),a},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=0,s=n-i;a<s;a+=16383)o.push(function(e,t,n){for(var i,o=[],a=t;a<n;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),o.push(function(e){return r[e>>18&63]+r[e>>12&63]+r[e>>6&63]+r[63&e]}(i));return o.join("")}(e,a,s<a+16383?s:a+16383));return 1==i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2==i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,u=a.length;s<u;++s)r[s]=a[s],i[a.charCodeAt(s)]=s;function c(e){var t=e.length;if(0<t%4)throw new Error("Invalid string. Length must be a multiple of 4");return t=(e=-1===(e=e.indexOf("="))?t:e)===t?0:4-e%4,[e,t]}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,i){var o,a,s=8*i-r-1,u=(1<<s)-1,c=u>>1,l=-7,h=n?i-1:0,f=n?-1:1;i=e[t+h];for(h+=f,o=i&(1<<-l)-1,i>>=-l,l+=s;0<l;o=256*o+e[t+h],h+=f,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=r;0<l;a=256*a+e[t+h],h+=f,l-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(i?-1:1);a+=Math.pow(2,r),o-=c}return(i?-1:1)*a*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var a,s,u=8*o-i-1,c=(1<<u)-1,l=c>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:o-1,d=r?1:-1;o=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(r=Math.pow(2,-a))<1&&(a--,r*=2),2<=(t+=1<=a+l?h/r:h*Math.pow(2,1-l))*r&&(a++,r/=2),c<=a+l?(s=0,a=c):1<=a+l?(s=(t*r-1)*Math.pow(2,i),a+=l):(s=t*Math.pow(2,l-1)*Math.pow(2,i),a=0));8<=i;e[n+f]=255&s,f+=d,s/=256,i-=8);for(a=a<<i|s,u+=i;0<u;e[n+f]=255&a,f+=d,a/=256,u-=8);e[n+f-d]|=128*o}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";(function(e){var t=n(24);
/**
 * @license
 * Copyright 2019 Google LLC. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * =============================================================================
 */const r=()=>n(365);let i;Object(t.c)().get("IS_NODE")&&!Object(t.c)().get("IS_BROWSER")&&Object(t.c)().setPlatform("node",new class{constructor(){this.util=n(366),this.textEncoder=new this.util.TextEncoder}fetch(e,n){return null!=Object(t.c)().global.fetch?Object(t.c)().global.fetch(e,n):(i=null==i?r():i)(e,n)}now(){var t=e.hrtime();return 1e3*t[0]+t[1]/1e6}encode(e,t){if("utf-8"!==t&&"utf8"!==t)throw new Error("Node built-in encoder only supports utf-8, but got "+t);return this.textEncoder.encode(e)}decode(e,t){return 0===e.length?"":new this.util.TextDecoder(t).decode(e)}})}).call(this,n(117))},function(e,t){},function(e,t){},function(e,t,n){(function(e){var r;!function(e){function i(e){var t,n=this,r=(t=4022871197,function(e){e=String(e);for(var n=0;n<e.length;n++){var r=.02519603282416938*(t+=e.charCodeAt(n));t=(r=(r-(t=r>>>0))*t)>>>0,t+=4294967296*(r-=t)}return 2.3283064365386963e-10*(t>>>0)});n.next=function(){var e=2091639*n.s0+2.3283064365386963e-10*n.c;return n.s0=n.s1,n.s1=n.s2,n.s2=e-(n.c=0|e)},n.c=1,n.s0=r(" "),n.s1=r(" "),n.s2=r(" "),n.s0-=r(e),n.s0<0&&(n.s0+=1),n.s1-=r(e),n.s1<0&&(n.s1+=1),n.s2-=r(e),n.s2<0&&(n.s2+=1)}function o(e,t){return t.c=e.c,t.s0=e.s0,t.s1=e.s1,t.s2=e.s2,t}function a(e,t){var n=new i(e),r=(e=t&&t.state,n.next);return r.int32=function(){return 4294967296*n.next()|0},r.double=function(){return r()+11102230246251565e-32*(2097152*r()|0)},r.quick=r,e&&("object"==typeof e&&o(e,n),r.state=function(){return o(n,{})}),r}e&&e.exports?e.exports=a:n(76)&&n(128)?void 0!==(r=function(){return a}.call(t,n,t,e))&&(e.exports=r):this.alea=a}(e,n(76))}).call(this,n(100)(e))},function(e,t,n){(function(e){var r;!function(e){function i(e){var t=this,n="";t.x=0,t.y=0,t.z=0,t.w=0,t.next=function(){var e=t.x^t.x<<11;return t.x=t.y,t.y=t.z,t.z=t.w,t.w^=t.w>>>19^e^e>>>8},e===(0|e)?t.x=e:n+=e;for(var r=0;r<n.length+64;r++)t.x^=0|n.charCodeAt(r),t.next()}function o(e,t){return t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t}function a(e,t){function n(){return(r.next()>>>0)/4294967296}var r=new i(e);e=t&&t.state;return n.double=function(){do{var e=((r.next()>>>11)+(r.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},n.int32=r.next,n.quick=n,e&&("object"==typeof e&&o(e,r),n.state=function(){return o(r,{})}),n}e&&e.exports?e.exports=a:n(76)&&n(128)?void 0!==(r=function(){return a}.call(t,n,t,e))&&(e.exports=r):this.xor128=a}(e,n(76))}).call(this,n(100)(e))},function(e,t,n){(function(e){var r;!function(e){function i(e){var t=this,n="";t.next=function(){var e=t.x^t.x>>>2;return t.x=t.y,t.y=t.z,t.z=t.w,t.w=t.v,(t.d=t.d+362437|0)+(t.v=t.v^t.v<<4^e^e<<1)|0},t.x=0,t.y=0,t.z=0,t.w=0,e===((t.v=0)|e)?t.x=e:n+=e;for(var r=0;r<n.length+64;r++)t.x^=0|n.charCodeAt(r),r==n.length&&(t.d=t.x<<10^t.x>>>4),t.next()}function o(e,t){return t.x=e.x,t.y=e.y,t.z=e.z,t.w=e.w,t.v=e.v,t.d=e.d,t}function a(e,t){function n(){return(r.next()>>>0)/4294967296}var r=new i(e);e=t&&t.state;return n.double=function(){do{var e=((r.next()>>>11)+(r.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},n.int32=r.next,n.quick=n,e&&("object"==typeof e&&o(e,r),n.state=function(){return o(r,{})}),n}e&&e.exports?e.exports=a:n(76)&&n(128)?void 0!==(r=function(){return a}.call(t,n,t,e))&&(e.exports=r):this.xorwow=a}(e,n(76))}).call(this,n(100)(e))},function(e,t,n){(function(e){var r;!function(e){function i(e){var t=this;t.next=function(){var e=t.x,n=t.i,r=e[n],i=(r^=r>>>7)^r<<24;return i=(i^=(r=e[n+1&7])^r>>>10)^(r=e[n+3&7])^r>>>3^(r=e[n+4&7])^r<<7,r=e[n+7&7],e[n]=i^=(r^=r<<13)^r<<9,t.i=n+1&7,i};var n,r=t,i=e,o=[];if(i===(0|i))o[0]=i;else for(i=""+i,n=0;n<i.length;++n)o[7&n]=o[7&n]<<15^i.charCodeAt(n)+o[n+1&7]<<13;for(;o.length<8;)o.push(0);for(n=0;n<8&&0===o[n];++n);for(8==n?o[7]=-1:o[n],r.x=o,r.i=0,n=256;0<n;--n)r.next()}function o(e,t){return t.x=e.x.slice(),t.i=e.i,t}function a(e,t){function n(){return(r.next()>>>0)/4294967296}var r=new i(e=null==e?+new Date:e);e=t&&t.state;return n.double=function(){do{var e=((r.next()>>>11)+(r.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},n.int32=r.next,n.quick=n,e&&(e.x&&o(e,r),n.state=function(){return o(r,{})}),n}e&&e.exports?e.exports=a:n(76)&&n(128)?void 0!==(r=function(){return a}.call(t,n,t,e))&&(e.exports=r):this.xorshift7=a}(e,n(76))}).call(this,n(100)(e))},function(e,t,n){(function(e){var r;!function(e){function i(e){var t=this;t.next=function(){var e,n,r=t.w,i=t.X,o=t.i;return t.w=r=r+1640531527|0,n=i[o+34&127],e=i[o=o+1&127],n=i[o]=(n^=n<<13)^n>>>15^(e^=e<<17)^e>>>12,t.i=o,n+(r^r>>>16)|0};var n,r,i,o,a,s=t,u=e,c=[],l=128;for(u===(0|u)?(r=u,u=null):(u+="\0",r=0,l=Math.max(l,u.length)),i=0,o=-32;o<l;++o)u&&(r^=u.charCodeAt((o+32)%u.length)),0===o&&(a=r),r=(r=(r=(r^=r<<10)^r>>>15)^r<<4)^r>>>13,0<=o&&(i=0==(n=c[127&o]^=r+(a=a+1640531527|0))?i+1:0);for(128<=i&&(c[127&(u&&u.length||0)]=-1),i=127,o=512;0<o;--o)r=c[i+34&127],n=c[i=i+1&127],r=(r^=r<<13)^r>>>15,n=(n^=n<<17)^n>>>12,c[i]=r^n;s.w=a,s.X=c,s.i=i}function o(e,t){return t.i=e.i,t.w=e.w,t.X=e.X.slice(),t}function a(e,t){function n(){return(r.next()>>>0)/4294967296}var r=new i(e=null==e?+new Date:e);e=t&&t.state;return n.double=function(){do{var e=((r.next()>>>11)+(r.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},n.int32=r.next,n.quick=n,e&&(e.X&&o(e,r),n.state=function(){return o(r,{})}),n}e&&e.exports?e.exports=a:n(76)&&n(128)?void 0!==(r=function(){return a}.call(t,n,t,e))&&(e.exports=r):this.xor4096=a}(e,n(76))}).call(this,n(100)(e))},function(e,t,n){(function(e){var r;!function(e){function i(e){var t=this,n="";t.next=function(){var e=(e=t.b)<<25^e>>>7^(n=t.c),n=n-(r=t.d)|0,r=r<<24^r>>>8^(i=t.a),i=i-e|0;return t.b=e=e<<20^e>>>12^n,t.c=n=n-r|0,t.d=r<<16^n>>>16^i,t.a=i-e|0},t.a=0,t.b=0,t.c=-1640531527,t.d=1367130551,e===Math.floor(e)?(t.a=e/4294967296|0,t.b=0|e):n+=e;for(var r=0;r<n.length+20;r++)t.b^=0|n.charCodeAt(r),t.next()}function o(e,t){return t.a=e.a,t.b=e.b,t.c=e.c,t.d=e.d,t}function a(e,t){function n(){return(r.next()>>>0)/4294967296}var r=new i(e);e=t&&t.state;return n.double=function(){do{var e=((r.next()>>>11)+(r.next()>>>0)/4294967296)/(1<<21)}while(0===e);return e},n.int32=r.next,n.quick=n,e&&("object"==typeof e&&o(e,r),n.state=function(){return o(r,{})}),n}e&&e.exports?e.exports=a:n(76)&&n(128)?void 0!==(r=function(){return a}.call(t,n,t,e))&&(e.exports=r):this.tychei=a}(e,n(76))}).call(this,n(100)(e))},function(e,t,n){var r,i="undefined"!=typeof self?self:this,o=[],a=Math,s=256,u=a.pow(s,6),c=a.pow(2,52),l=2*c,h=255;function f(e,t,n){function h(){for(var e=A.g(6),t=u,n=0;e<c;)e=(e+n)*s,t*=s,n=A.g(1);for(;l<=e;)e/=2,t/=2,n>>>=1;return(e+n)/t}var f=[],A=(e=m(function e(t,n){var r,i=[],o=typeof t;if(n&&"object"==o)for(r in t)try{i.push(e(t[r],n-1))}catch(e){}return i.length?i:"string"==o?t:t+"\0"}((t=1==t?{entropy:!0}:t||{}).entropy?[e,g(o)]:null==e?function(){try{return r&&(e=r.randomBytes)?e=e(s):(e=new Uint8Array(s),(i.crypto||i.msCrypto).getRandomValues(e)),g(e)}catch(t){var e=(e=i.navigator)&&e.plugins;return[+new Date,i,e,i.screen,g(o)]}}():e,3),f),new d(f));return h.int32=function(){return 0|A.g(4)},h.quick=function(){return A.g(4)/4294967296},h.double=h,m(g(A.S),o),(t.pass||n||function(e,t,n,r){return r&&(r.S&&p(r,A),e.state=function(){return p(A,{})}),n?(a.random=e,t):e})(h,e,"global"in t?t.global:this==a,t.state)}function d(e){var t,n=e.length,r=this,i=0,o=r.i=r.j=0,a=r.S=[];for(n||(e=[n++]);i<s;)a[i]=i++;for(i=0;i<s;i++)a[i]=a[o=h&o+e[i%n]+(t=a[i])],a[o]=t;(r.g=function(e){for(var t,n=0,i=r.i,o=r.j,a=r.S;e--;)t=a[i=h&i+1],n=n*s+a[h&(a[i]=a[o=h&o+t])+(a[o]=t)];return r.i=i,r.j=o,n})(s)}function p(e,t){return t.i=e.i,t.j=e.j,t.S=e.S.slice(),t}function m(e,t){for(var n,r=e+"",i=0;i<r.length;)t[h&i]=h&(n^=19*t[h&i])+r.charCodeAt(i++);return g(t)}function g(e){return String.fromCharCode.apply(0,e)}if(m(a.random(),o),e.exports){e.exports=f;try{r=n(374)}catch(e){}}else void 0!==(n=function(){return f}.call(t,n,t,e))&&(e.exports=n)},function(e,t){},function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(i.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new o(i.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;0<=t&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(376),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(67))},function(e,t,n){(function(e,t){!function(e,n){"use strict";var r,i,o,a,s,u,c,l;function h(e){delete i[e]}function f(e){if(o)setTimeout(f,0,e);else{var t=i[e];if(t){o=!0;try{var n=t,r=n.callback,a=n.args;switch(a.length){case 0:r();break;case 1:r(a[0]);break;case 2:r(a[0],a[1]);break;case 3:r(a[0],a[1],a[2]);break;default:r.apply(void 0,a)}}finally{h(e),o=!1}}}}e.setImmediate||(r=1,o=!(i={}),a=e.document,l=(l=Object.getPrototypeOf&&Object.getPrototypeOf(e))&&l.setTimeout?l:e,"[object process]"==={}.toString.call(e.process)?s=function(e){t.nextTick((function(){f(e)}))}:function(){var t,n;if(e.postMessage&&!e.importScripts)return t=!0,n=e.onmessage,e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}()?function(){function t(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(n)&&f(+t.data.slice(n.length))}var n="setImmediate$"+Math.random()+"$";e.addEventListener?e.addEventListener("message",t,!1):e.attachEvent("onmessage",t),s=function(t){e.postMessage(n+t,"*")}}():s=e.MessageChannel?((c=new MessageChannel).port1.onmessage=function(e){f(e.data)},function(e){c.port2.postMessage(e)}):a&&"onreadystatechange"in a.createElement("script")?(u=a.documentElement,function(e){var t=a.createElement("script");t.onreadystatechange=function(){f(e),t.onreadystatechange=null,u.removeChild(t),t=null},u.appendChild(t)}):function(e){setTimeout(f,0,e)},l.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];return i[r]={callback:e,args:t},s(r),r++},l.clearImmediate=h)}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,n(67),n(117))},function(e,t){},function(e,t){},function(e,t){},function(e,t,n){var r=n(267).default,i=n(381);e.exports=function(e){return e=i(e,"string"),"symbol"===r(e)?e:String(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(267).default;e.exports=function(e,t){if("object"!==r(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);if(n=n.call(e,t||"default"),"object"!==r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t){class n extends HTMLBRElement{constructor(){super(),this.someMethod=!0}}customElements.get("any-class")||customElements.define("any-class",n,{extends:"br"});const r=document.createElement("br",{is:"any-class"}).someMethod;!function(){"use strict";if(r)return;const e=Object.keys,{document:t,MutationObserver:n,Set:i,WeakMap:o}=self,a=e=>"querySelectorAll"in e,s=[].filter;var u=e=>{const r=new o,u=t=>{var n=e.query;if(n.length)for(let e=0,r=t.length;e<r;e++)c(s.call(t[e].addedNodes,a),!0,n),c(s.call(t[e].removedNodes,a),!1,n)},c=(t,n,o,a=new i)=>{for(let s,u,h=0,d=t.length;h<d;h++)if(!a.has(u=t[h])){if(a.add(u),n)for(let t,a=l(u),c=0,h=o.length;c<h;c++)a.call(u,t=o[c])&&(r.has(u)||r.set(u,new i),(s=r.get(u)).has(t)||(s.add(t),e.handle(u,n,t)));else r.has(u)&&(s=r.get(u),r.delete(u),s.forEach(t=>{e.handle(u,n,t)}));c(f(u),n,o,a)}},l=e=>e.matches||e.webkitMatchesSelector||e.msMatchesSelector;var h=(t,n=!0)=>{c(t,n,e.query)};const f=e=>m.length?e.querySelectorAll(m):m,d=new n(u);var p=e.root||t;const m=e.query;return d.observe(p,{childList:!0,subtree:!0}),h(f(p)),{drop:e=>{for(let t=0,n=e.length;t<n;t++)r.delete(e[t])},flush:()=>{u(d.takeRecords())},observer:d,parse:h}};const{customElements:c,document:l,Element:h,MutationObserver:f,Object:d,Promise:p,Map:m,Set:g,WeakMap:A,Reflect:v}=self,b=h.prototype.attachShadow,y=l.createElement,{define:w,get:x}=c,C=(v||{construct(e){return e.call(this)}}).construct,{defineProperty:k,getOwnPropertyNames:E,setPrototypeOf:S}=d,_=new A,O=new g,T=new m,D=new m,B=new m,I=new m,M=[],j=[],N=e=>I.get(e)||x.call(c,e),F=(t,n,r)=>{const i=B.get(r);if(n&&!i.isPrototypeOf(t)){const n=(t=>{const n=e(t),r=[],i=n.length;for(let e=0;e<i;e++)r[e]=t[n[e]],delete t[n[e]];return()=>{for(let e=0;e<i;e++)t[n[e]]=r[e]}})(t);z=S(t,i);try{new i.constructor}finally{z=null,n()}}(r=(n?"":"dis")+"connectedCallback")in i&&t[r]()},R=u({query:j,handle:F}).parse,P=u({query:M,handle(e,t){_.has(e)&&(t?O.add(e):O.delete(e),j.length&&H.call(j,e))}}).parse,L=e=>{if(!D.has(e)){let t,n=new p(e=>{t=e});D.set(e,{$:n,_:t})}return D.get(e).$},U=((e,t)=>{const n=e=>{for(let t=0,n=e.length;t<n;t++)r(e[t])},r=({target:e,attributeName:t,oldValue:n})=>{e.attributeChangedCallback(t,n,e.getAttribute(t))};return(i,o)=>{const a=i.constructor.observedAttributes;return a&&e(o).then(()=>{new t(n).observe(i,{attributes:!0,attributeOldValue:!0,attributeFilter:a});for(let e=0,t=a.length;e<t;e++)i.hasAttribute(a[e])&&r({target:i,attributeName:a[e],oldValue:null})}),i}})(L,f);let z=null;function H(e){const{parse:t,root:n}=_.get(e);t(n.querySelectorAll(this),e.isConnected)}E(self).filter(e=>/^HTML/.test(e)).forEach(e=>{const t=self[e];function n(){var e=this.constructor;if(!T.has(e))throw new TypeError("Illegal constructor");var{is:n,tag:r}=T.get(e);if(n){if(z)return U(z,n);const t=y.call(l,r);return t.setAttribute("is",n),U(S(t,e.prototype),n)}return C.call(this,t,[],e)}S(n,t),k(n.prototype=t.prototype,"constructor",{value:n}),k(self,e,{value:n})}),k(l,"createElement",{configurable:!0,value(e,t){if(t=t&&t.is){const n=I.get(t);if(n&&T.get(n).tag===e)return new n}const n=y.call(l,e);return t&&n.setAttribute("is",t),n}}),b&&k(h.prototype,"attachShadow",{configurable:!0,value(){var e=b.apply(this,arguments),t=u({query:j,root:e,handle:F}).parse;return _.set(this,{root:e,parse:t}),e}}),k(c,"get",{configurable:!0,value:N}),k(c,"whenDefined",{configurable:!0,value:L}),k(c,"define",{configurable:!0,value(e,t,n){if(N(e))throw new Error(`'${e}' has already been defined as a custom element`);let r;const i=n&&n.extends;T.set(t,i?{is:e,tag:i}:{is:"",tag:e}),i?(r=i+`[is="${e}"]`,B.set(r,t.prototype),I.set(e,t),j.push(r)):(w.apply(c,arguments),M.push(r=e)),L(e).then(()=>{i?(R(l.querySelectorAll(r)),O.forEach(H,[r])):P(l.querySelectorAll(r))}),D.get(e)._(t)}})}()},function(e,t,n){},function(e,t){var n,r,i,o,a,s,u,c,l,h;n=document,!(r=window).isKeyEventBind&&n.addEventListener&&(b=navigator.platform||navigator.userAgent,T="windows",/mac/i.test(b)&&(T="mac"),i="chrome",void 0!==n.mozFullScreen?i="moz":void 0===n.msHidden&&void 0!==n.hidden||(i="ie"),o={windows:{ctrlKey:!1,altKey:!0,shiftKey:!1},mac:{ctrlKey:!0,altKey:!0,shiftKey:!1}}[T],a=null,s=function(){clearTimeout(a);var e=n.querySelectorAll(".AK_Tips");[].slice.call(e).forEach((function(e){e.fromTarget&&(e.fromTarget.hasTipsShow=null),n.body.removeChild(e)})),n.hasTipsShow=null},n.addEventListener("keydown",(function(e){var t,r,u,c,l,h=!1,f=e.target||n.activeElement;0!=(l=(("textarea"==(l=f.tagName.toLowerCase())||"input"==l&&0==/checkbox|radio|select|file|button|image|hidden/i.test(f.type))&&(h=!0),n.querySelectorAll("a[accesskey],area[accesskey],button[accesskey],input[accesskey],label[accesskey],legend[accesskey],textarea[accesskey]"))).length&&(f=(t=[].slice.call(l)).map((function(e){return e.getAttribute("accesskey")})),r=-1,f.forEach((function(t,n){if(e.key&&e.key==t||e.keyIdentifier&&parseInt(e.keyIdentifier.toLowerCase().replace("u+",""),16)==parseInt(function(e,t){if(!e)return"";t=t||"x";for(var n,r="",i=0;i<e.length;i+=1)55296<=e.charCodeAt(i)&&e.charCodeAt(i)<=56319?(n=(65536+1024*(Number(e.charCodeAt(i))-55296)+Number(e.charCodeAt(i+1))-56320).toString(16),i+=1):n=e.charCodeAt(i).toString(16),r+=t+n;return r.substr(t.length)}(t),16))return r=n,!1})),0==e.altKey&&0==e.shiftKey&&0==e.ctrlKey?h||t[r]&&(setTimeout((function(){t[r].focus()}),1),e.preventDefault()):0==e.altKey&&1==e.shiftKey&&0==e.ctrlKey?191!=e.keyCode||h||(n.hasTipsShow?s():(l=t,n.hasTipsShow||(u=n.documentElement.scrollTop||n.body.scrollTop,c=n.documentElement.scrollLeft||n.body.scrollLeft,l.forEach((function(e){if(e.clientHeight*e.clientWidth!=0){var t,r=e.getAttribute("accesskey"),i=[];for(t in o)o[t]&&i.push(t);i.push(r);r=e.getBoundingClientRect();var a=n.createElement("div");a.className="ui-kbd-tips AK_Tips",a.setAttribute("style","top:"+(r.top+u)+"px;left:"+(r.left+c)+"px;"),a.innerHTML=i.map((function(e){return"<kbd>"+e.replace("Key","")+"</kbd>"})).join("+"),n.body.appendChild(a),a.fromTarget=e}})),n.hasTipsShow=!0,a=setTimeout((function(){s()}),3e3)))):!t[r]||h||"ie"!=i&&"moz"!=i||!e.altKey||e.shiftKey||e.ctrlKey||t[r].click())})),n.addEventListener("mousedown",(function(){s()})),u={37:"left",38:"up",39:"right",40:"down",13:"enter",9:"tab",27:"esc"},l={add:function(e){e.classList.add(c)},remove:function(e){e.classList.remove(c)},removeAll:function(){[].slice.call(n.querySelectorAll("."+c)).forEach((function(e){l.remove(e)}))},has:function(e){e.classList.contains(c)}},h=null,r.isKeyEvent=!(c="ui-outline"),n.addEventListener("keydown",(function(e){r.isKeyEvent=!0,clearTimeout(h),h=setTimeout((function(){r.isKeyEvent=!1}),100);var t=u[e.keyCode];if(t){var i=n.activeElement;if(i&&!/body/i.test(i.tagName))if("enter"!=t||!/^radio|checkbox$/i.test(i.type)&&"0"!=i.getAttribute("tabindex")){var o,a=null,s=n.querySelectorAll(".ESC"),f=("esc"==t&&s.length&&[].slice.call(s).forEach((function(e){var t=e.id;(a=t&&n.querySelector('[data-target="'+t+'"],[data-target2="'+t+'"],ui-drop[target="'+t+'"]'))&&"none"!==e.style.display&&0<e.clientHeight?a.hide?a.hide():a["ui-drop"]?a["ui-drop"].hide():a.click():e==document.activeElement&&e.click&&e.click()})),i.getAttribute("data-focus")),d=(s=i.getAttribute("data-target"),null);if((f||s)&&(f?d=n.getElementById(f):s&&(d=n.getElementById(s)),d&&(0!=d.clientWidth||0!=d.clientHeight)))if("tab"==t)l.removeAll(),(p=(p=d).getAttribute("tabindex")?p:d.querySelector("a[href], button:not(:disabled), input:not(:disabled)"))&&p.focus();else{if("enter"==t){var p=d.querySelector("."+c);if(p&&f)return e.preventDefault(),void p.click();if(s)return}"esc"==t?(a=n.querySelector('a[data-target="'+s+'"],input[data-target="'+s+'"]'),f?i.blur():a&&0==/ESC/.test(a.className)&&a.click()):(p=[].slice.call(d.querySelectorAll("a[href], button:not(:disabled), input:not(:disabled)")),o=-1,0!=p.length&&(p.forEach((function(e,t){f?l.has(e)&&(o=t):i==e&&(o=t),l.remove(e)})),e.preventDefault(),"left"==t||"up"==t?--o<0&&(o=-1):"right"!=t&&"down"!=t||++o>p.length-1&&(o=p.length),p[o]&&(f?l.add(p[o]):p[o].focus())))}}else i.click(),e.preventDefault()}})),n.addEventListener("mousedown",(function(e){(e=e.target)&&!l.has(e)&&l.removeAll()})),n.addEventListener("click",(function(e){e=e.target;var t=n.activeElement,i=e.getAttribute("tabindex")||"-1";e&&e==t&&(/^radio|checkbox$/i.test(t.type)||0<=i)&&0==r.isKeyEvent&&0==/none/.test(getComputedStyle(e).outline)&&t.blur()})),n.addEventListener("focusin",(function(e){var t,n=e.target;n&&(/^javascript/.test(n.href)&&!n.getAttribute("role")&&n.setAttribute("role","button"),r.isKeyEvent&&(t=window.getComputedStyle(n),!/none|auto/.test(t.outlineStyle)||e.path&&e.path[0]!==n||l.add(n)))})),n.addEventListener("focusout",(function(e){(e=e.target)&&l.remove(e)})),r.isKeyEventBind=!0),HTMLElement.prototype.follow=function(e,t){var n,r={offsets:{x:0,y:0},safeArea:[0,0,0,0],position:"4-1",edgeAdjust:!0};for(n in e&&"[object Object]"===Object.prototype.toString.call(e)&&(t=e,e=null),t=t||{})void 0===t[n]&&delete t[n];let i=Object.assign({},r,t);if(!e){if(!(u=this.getAttribute("is-follow")||this.dataset.target))return;if(!(e=document.getElementById(u)||document.querySelector("."+u)||document.querySelector(u)))return}let o=["4-1","1-4","5-7","2-3","2-1","6-8","3-4","4-3","8-6","1-2","7-5","3-2"],a=this.dataset.offsets,s=[];i.offsets.map&&i.offsets.length?s=i.offsets:"string"==typeof i.offsets&&(s=i.offsets.trim().split(/,\s*|\s+/)),(s=a&&!t.offsets?a.trim().split(/,\s*|\s+/):s).length&&(i.offsets={},i.offsets.x=s[0],i.offsets.y=s[1]||s[0]);var u=this.dataset.offsetX,c=this.dataset.offsetY;u&&(i.offsets.x=u),c&&(i.offsets.y=c),i.offsets.x*=1,i.offsets.y*=1;let l=this.dataset.position,h=this.dataset.align;u=o.some(e=>e===h),!(l=!l&&h&&u?h:l)||t&&t.position||(i.position=l);let f=!("0"===(c=this.dataset.edgeAdjust||i.edgeAdjust)||"none"===c||"false"===c||!1===c);"string"==typeof c&&"boolean"!=typeof i.edgeAdjust&&(i.edgeAdjust=f),"absolute"!=(u=e.style.position)&&(e.style.position="absolute");let d=this.getBoundingClientRect(),p=e.getBoundingClientRect();if(p.width*p.height==0)e.style.position=u||"",window.console.warn((e.id?"id为"+e.id+"的":"")+"目前元素尺寸为0，无法定位");else{c=window.pageYOffset,u=window.pageXOffset;var m=window.innerWidth,g=window.innerHeight;(d.left<0&&d.right<0||d.top<0&&d.bottom<0||d.left>m&&d.right>m||d.top>g&&d.bottom>g)&&(i.edgeAdjust=f=!1);let t=e.offsetParent;var A=t.getBoundingClientRect(),v={follow:e};v=(this.element=this.element?Object.assign(this.element,v):v,this.params=this.params?Object.assign(this.params,i):i,i.offsets);let n,a,s=A.top+c,l=A.left+u,h=(t===document.body&&"static"===window.getComputedStyle(t).position&&(s=0,l=0),i.position);function b(){var n=window.getComputedStyle(e);n=Number(n.zIndex);let r=19;t.childNodes.forEach(t=>{var n,i;1===t.nodeType&&(i=+(n=window.getComputedStyle(t)).zIndex)&&e!==t&&"none"!==n.display&&(r=Math.max(1+i,r))}),r!==n&&(e.style.zIndex=r)}if("string"!=typeof h&&2===h.length)n=(A=h)[0]+v.x,a=A[1]+v.y,!0===i.edgeAdjust&&(n+p.width>m+u&&(n=m+u-p.width-v.x),a+p.height>g+c&&(a=g+c-p.height-v.y)),e.style.left=n+"px",e.style.top=a+"px",e.dataset.align="3-1",b();else{!1===o.some(e=>e===h)&&(h=r.position);let t=this.dataset.safeArea||getComputedStyle(e).getPropertyValue("--safe-area")||i.safeArea;1==(t=(t="string"==typeof t?t.trim().split(/(?:,\s*|\s+)/):t).map((function(e){return parseFloat(e)||0}))).length?t=t.concat(t[0],t[0],t[0]):2==t.length?(t.push(t[0]),t.push(t[1])):3==t.length&&t.push(t[1]);const A={"left-right":p.width+v.x+t[3]>d.left,"top-bottom":d.top-(p.height+v.y+t[0])<0,"right-left":d.right+p.width+v.x+t[1]>m,"bottom-top":d.bottom+p.height+v.y+t[2]>g,"right-right":p.width+v.x+t[3]>d.right,"left-left":d.left+p.width+v.x+t[1]>m,"bottom-bottom":p.height+v.y+t[0]>d.bottom,"top-top":d.top+p.height+v.y+t[2]>g};let w="bottom";var y=()=>{switch(h){case"1-4":case"5-7":case"2-3":a=d.top-p.height,n="1-4"===h?d.left:"5-7"===h?d.left-(p.width-d.width)/2:d.left-(p.width-d.width),w="top",f&&A["top-bottom"]&&(A["bottom-top"]?A["left-right"]&&A["right-left"]||(h={"1-4":"2-1","5-7":"6-8","2-3":"3-4"}[h],y()):(h={"1-4":"4-1","5-7":"7-5","2-3":"3-2"}[h],y()));break;case"2-1":case"6-8":case"3-4":n=d.right,a="2-1"===h?d.top:"6-8"===h?d.top-(p.height-d.height)/2:d.top-(p.height-d.height),w="right",f&&A["right-left"]&&(A["left-right"]?A["top-bottom"]&&A["bottom-top"]||(h={"2-1":"1-4","6-8":"5-7","3-4":"2-3"}[h],y()):(h={"2-1":"1-2","6-8":"8-6","3-4":"4-3"}[h],y()));break;case"4-1":case"7-5":case"3-2":a=d.bottom,n="4-1"===h?d.left:"7-5"===h?d.left-(p.width-d.width)/2:d.left-(p.width-d.width),w="bottom",f&&A["bottom-top"]&&(A["top-bottom"]?A["left-right"]&&A["right-left"]||(h={"4-1":"2-1","7-5":"6-8","3-2":"3-4"}[h],y()):(h={"4-1":"1-4","7-5":"5-7","3-2":"2-3"}[h],y()));break;case"1-2":case"8-6":case"4-3":n=d.left-p.width,a="1-2"===h?d.top:"8-6"===h?d.top-(p.height-d.height)/2:d.top-(p.height-d.height),w="left",f&&A["left-right"]&&(A["right-left"]?A["top-bottom"]&&A["bottom-top"]||(h={"1-2":"1-4","8-6":"5-7","4-3":"2-3"}[h],y()):(h={"1-2":"2-1","8-6":"6-8","4-3":"3-4"}[h],y()))}};y(),n=n+v.x-l,a=a+v.y-s,f&&("top"==w?a-=t[2]:"bottom"==w?a+=t[0]:"left"==w?n-=t[1]:n+=t[3]),a+=c,n+=u,e.style.left=Math.round(n)+"px",e.style.top=Math.round(a)+"px",p=e.getBoundingClientRect(),f&&("top"==w||"bottom"==w?p.left<t[3]?n+=t[3]-p.left:p.right+t[1]>m&&(n-=p.right+t[1]-m):p.top<t[0]?a+=t[0]-p.top:p.bottom+t[2]>g&&(a-=p.bottom+t[2]-g),e.style.left=Math.round(n)+"px",e.style.top=Math.round(a)+"px"),e.dataset.align=h,e.dataset.direction=w,b(),e.zIndex||(e.zIndex=b)}}},[NodeList.prototype,HTMLCollection.prototype].forEach(e=>{e.follow=function(){[...this].forEach(e=>{1===e.nodeType&&e.follow.apply(e,this.arguments)})}});class f extends HTMLElement{static get observedAttributes(){return["open"]}static get defaults(){return{eventType:"click",history:!1,autoplay:3e3}}constructor(e,t){super();let n=null;if("string"==typeof e?n=document.getElementById(e):"object"==typeof e&&(e.tagName?n=e:t=t||e),t=t||{},n){let i=n.getAttribute("is-tab");const o=n.dataset.name;if(o&&("prev"==i||"next"==i))return n.addEventListener("click",()=>{const e=document.querySelectorAll('ui-tab[name="'+o+'"]');var t=[...e].findIndex(e=>e.open);("prev"==i?e[t-1]||e[e.length-1]:e[t+1]||e[0]).switch()}),n.addEventListener("mouseenter",()=>{document.querySelectorAll('ui-tab[name="'+o+'"][autoplay]').forEach(e=>{clearTimeout(e.timer)})}),void n.addEventListener("mouseout",()=>{[...document.querySelectorAll('ui-tab[name="'+o+'"][autoplay]')].some(e=>{if(e.open)return e.autoSwitch(),!0})});for(var r in n.id||(e=("lulu_"+Math.random()).replace("0.",""),n.id=e,this.htmlFor=e),n.getAttribute("name")&&(this.name=n.getAttribute("name")),n.hasAttribute("open")&&(this.open=!0),f.defaults)void 0!==n.dataset[r.toLowerCase()]?this[r]=n.dataset[r.toLowerCase()]:void 0!==t[r]&&(this[r]=n.dataset[r.toLowerCase()]=t[r]);i&&!n.dataset.target&&(n.dataset.target=i),-1==n.tabIndex&&n.setAttribute("tabindex",0)}if(e=this.element||{},this.element=new Proxy(e,{get:(e,t)=>{if("target"!=t)return"trigger"==t?this.htmlFor&&document.getElementById(this.htmlFor)||this:e[t];{let e=this.target,t=null,n=this.element.trigger;return!e&&n&&(e=n.dataset.target||n.getAttribute("href"))&&/#/.test(e)&&(e=e.split("#")[1]),t=e?document.getElementById(e):t}},set:(e,t,n)=>{if((n="string"==typeof n?document.getElementById(n)||document.querySelector(n):n)&&"number"!=typeof n.nodeType)return!1;if(e[t]=n,"target"==t&&n){let e=n,t=e.id;t||(t=("lulu_"+Math.random()).replace("0.",""),e.id=t),this.element.trigger==this?this.target!=t&&(this.target=t):this.element.trigger&&this.element.trigger.setAttribute("data-target",t)}return!0}}),this.setParams(t),n&&!this.parentElement&&n!=this){let e=document.querySelector('body > div[hidden="tab"]');e||((e=document.createElement("div")).setAttribute("hidden","tab"),document.body.append(e)),e.append(this)}}get eventType(){let e=this.getAttribute("eventtype")||f.defaults.eventType;return"hover"==e?"mouseenter":e}set eventType(e){this.setAttribute("eventtype",e)}get history(){return this.hasAttribute("history")||f.defaults.history}set history(e){this.toggleAttribute("history",e)}get autoplay(){var e=this.getAttribute("autoplay");return"string"==typeof e&&(/^\d+$/.test(e)?+e:f.defaults.autoplay)}set autoplay(e){e||""===e?this.setAttribute("autoplay",e):this.removeAttribute("autoplay")}get name(){return this.getAttribute("name")}set name(e){this.setAttribute("name",e)}get htmlFor(){return this.getAttribute("for")}set htmlFor(e){this.setAttribute("for",e)}get target(){return this.getAttribute("target")}set target(e){this.setAttribute("target",e)}get open(){return this.hasAttribute("open")}set open(e){this.toggleAttribute("open",e)}setParams(e){this.params=this.params||{},e=e||{},Object.assign(this.params,e)}switch(){var e=this.name;let t=[];e?(t=document.querySelectorAll('ui-tab[name="'+e+'"]'),this.open||(t.forEach(e=>{e.open&&(e.open=!1)}),this.open=!0)):this.open=!this.open;const n=window.location;if(1==this.history&&e&&0==/tab\d{10,16}/.test(e)&&this.element.target){var r=this.element.target.id;const t=new URLSearchParams(n.search);t.set(e,r);let i=n.hash;r==i&&(n.hash=i=""),window.history.replaceState(null,document.title,n.href.split("?")[0]+"?"+t.toString()+i)}}autoSwitch(){var e=this.autoplay,t=this.name;if(e&&t){let n=document.querySelectorAll('ui-tab[name="'+t+'"]');if(clearTimeout(this.timer),e&&t&&1<n.length){let t=[].slice.call(n).findIndex(e=>e==this);++t>=n.length&&(t=0),this.timer=setTimeout(()=>{n[t].switch(),n[t].autoSwitch()},e)}}}events(){if("mouseover"!=this.eventType&&"mouseenter"!=this.eventType||(this.element.trigger.addEventListener(this.eventType,()=>{f.hoverTimer=setTimeout(()=>{this.switch()},150)},!1),this.element.trigger.addEventListener(this.eventType.replace("over","out").replace("enter","leave"),()=>{clearTimeout(f.hoverTimer)})),this.element.trigger.addEventListener("click",e=>{/^(:?javas|#)/.test(e.target.getAttribute("href"))&&e.preventDefault(),this.switch()},!1),this.autoplay&&this.name){[this.element.trigger,this.element.target].forEach(e=>{e.addEventListener("mouseenter",()=>{clearTimeout(this.timer)}),e.addEventListener("mouseleave",()=>{this.autoSwitch()})});let e=document.querySelector('ui-tab[name="'+this.name+'"][open]');e&&e.autoSwitch()}}connectedCallback(){this.closest("a, button")||this.querySelector("a, button")||this.setAttribute("tabindex","0");let e=this.element.target,t=this.element.trigger;(t&&t.setAttribute("role","tab"),e&&e.setAttribute("role","tabpanel"),this.events(),new URLSearchParams(window.location.search)).forEach((n,r)=>{t&&e&&this.name==r&&e.id==n&&!t.hasAttribute("open")&&t.click()}),this.dispatchEvent(new CustomEvent("connected",{detail:{type:"ui-tab"}})),this.isConnectedCallback=!0,this.dispatchEvent(new CustomEvent("DOMContentLoaded")),t!=this&&(t.dispatchEvent(new CustomEvent("DOMContentLoaded")),t.hasAttribute("is-tab")&&(t.dispatchEvent(new CustomEvent("connected",{detail:{type:"ui-tab"}})),t.setAttribute("defined","")))}attributeChangedCallback(e,t,n){if(this.element&&"open"===e&&typeof t!=typeof n){const e=this.element.target;if(e){this.open?(e.classList.add("active"),this.setAttribute("aria-selected","true"),this.dispatchEvent(new CustomEvent("show",{detail:{type:"ui-tab"}}))):(e.classList.remove("active"),this.setAttribute("aria-selected","false"),this.dispatchEvent(new CustomEvent("hide",{detail:{type:"ui-tab"}})));let t=this.element.trigger;t&&t!=this&&t.toggleAttribute("open",this.open),t&&this.name&&/ui-tab/.test(t.className)&&(t.parentElement.style.setProperty("--ui-tab-width",t.clientWidth),t.parentElement.style.setProperty("--ui-tab-left",t.offsetLeft)),this.dispatchEvent(new CustomEvent("switch"))}}}}function d(){document.querySelectorAll("[is-tab]").forEach((function(e){e["ui-tab"]||(e["ui-tab"]=new f(e))})),new MutationObserver((function(e){e.forEach((function(e){e.addedNodes.forEach((function(e){e.tagName&&(e.hasAttribute("is-tab")?e["ui-tab"]||(e["ui-tab"]=new f(e)):e.querySelectorAll("[is-tab]").forEach((function(e){e["ui-tab"]||(e["ui-tab"]=new f(e))})))}))}))})).observe(document.body,{childList:!0,subtree:!0})}NodeList.prototype.tab=function(e={}){var t,n;let r=e.name||"";for(t of this)!r&&t.getAttribute("name")&&(r=t.getAttribute("name"));for(n of(r=r||("tab"+Math.random()).replace("0.",""),this))n.setAttribute("name",r),n["ui-tab"]=new f(n,e)},customElements.get("ui-tab")||customElements.define("ui-tab",f),window.Tab=f,"loading"!=document.readyState?d():window.addEventListener("DOMContentLoaded",d);const p=HTMLElement.prototype.hasOwnProperty("popover");class m extends HTMLSelectElement{static get observedAttributes(){return["multiple","disabled","width"]}constructor(){super(),this.element||(this.element={button:null,combobox:null,datalist:null}),this.observer=null,this.resizeObserver=null,this.setProperty()}static addClass(){return["ui","select"].concat([].slice.call(arguments)).join("-")}set multiple(e){return this.toggleAttribute("multiple",Boolean(e))}get multiple(){return this.hasAttribute("multiple")}render(){this.create(),this.refresh(),this.events()}remove(){this.parentElement&&this.parentElement.removeChild(this),this.element.combobox&&this.element.combobox.remove()}getData(){if(!this.options.length)return[{html:""}];let e=this.querySelectorAll("optgroup"),t=!!this.querySelector("optgroup[label]");if(e.length){let n=[];return e.forEach(e=>{n.push({html:e.label,disabled:e.disabled,className:e.className,divide:!t}),e.querySelectorAll("option").forEach(r=>{n.push({html:r.innerHTML,value:r.value,selected:r.selected,disabled:e.disabled||r.disabled,className:r.className,intent:t})})}),n}return[].slice.call(this.options).map(e=>({html:e.innerHTML,value:e.value,selected:e.selected,disabled:e.disabled,className:e.className}))}get width(){let e=this.getAttribute("width");return e&&Number(e)===parseFloat(e)&&(e+="px"),e}set width(e){0!=/\d/.test(e)&&this.setAttribute("width",e)}getWidth(){return this.style.width||this.width||this.offsetWidth+"px"}setWidth(){if(this.element.combobox){const e=this.getWidth();this.element.combobox.style.width=e,this.style.transform="",-1!==e.lastIndexOf("%")&&"absolute"!=this.originPosition&&"fixed"!=this.originPosition&&(this.style.transform=`scaleX(${this.parentElement.clientWidth*parseFloat(e)*.01/this.offsetWidth})`)}}create(){if(!this.element||!this.element.combobox){var e=("lulu_"+(this.id||Math.random())).replace("0.",""),t=m.addClass("button"),n=m.addClass("datalist"),r=window.getComputedStyle(this).position,i=(this.originPosition=r,/windows/i.test(navigator.userAgent)),o=!this.dataset.cssPosition&&!this.hasAttribute("is-css-position")&&p;this.insertAdjacentHTML("afterend",`<div style="width: ${this.getWidth()}">\n           ${this.multiple?"":`<button\n                type="button"\n                class="${t}"\n                ${o?"popovertarget":"data-target"}="${e}"\n                aria-owns="${e}"\n                aria-expanded="false"\n                style="display: ${this.multiple?"none":"block"}"\n                ${this.disabled?"disabled ":""}\n            /></button>`}\n           <ui-select-list id="${e}" ${o?"popover":""} role="listbox" aria-expanded="false" class="${n}" ${this.multiple?"":'aria-hidden="true"'} data-custom-scroll="${i}"></ui-select-list>\n        </div>`);let a=this.nextElementSibling;Object.assign(this.element,{combobox:a,button:a.querySelector("."+t),datalist:a.querySelector("."+n)}),"fixed"!=r&&(this.style.position="absolute"),this.dispatchEvent(new CustomEvent("DOMContentLoaded"))}}refresh(e){const t=this.multiple;var n;const r=this.element.combobox,i=this.element.button,o=this.element.datalist;if(o){const a=o.id;e=e||this.getData(),r.className=(this.className+" "+m.addClass()).trim(),t?r.style.height=this.style.height||this.offsetHeight+"px":this[this.selectedIndex]&&(n=this[this.selectedIndex].innerHTML,i.innerHTML=`<span class="${m.addClass("text")}">${n}</span><i class="${m.addClass("icon")}" aria-hidden="true"></i>`,i.dataset.value=this[this.selectedIndex].value);let s=-1;o.innerHTML=e.map(e=>{let n=[m.addClass("datalist","li"),e.className];return e.selected&&n.push("selected"),e.disabled&&n.push("disabled"),void 0!==e.divide?e.divide?`<div class="${(n=[m.addClass("datalist","hr"),e.className]).join(" ")}"></div>`:`<div class="${n.join(" ")}" role="heading">${e.html}</div>`:(s++,e.intent&&n.push(m.addClass("intent")),e.html?t?`<a class="${n.join(" ")}" data-index=${s}>${e.html}</a>`:`<a\n                ${e.disabled?"":' href="javascript:" '}\n                class="${n.join(" ")}"\n                data-index=${s}\n                data-target="${a}"\n                role="option"\n                aria-selected="${e.selected}"\n            >${e.html}</a>`:`<span class="${n.join(" ")} disabled"></span>`)}).join("")}}events(){this.multiple?this.createMultipleEvent():this.createNormalEvent()}zIndex(){let e=this.element.datalist;var t=window.getComputedStyle(e);t=Number(t.zIndex);let n=19;document.body.childNodes.forEach(t=>{var r,i;1===t.nodeType&&(i=+(r=window.getComputedStyle(t)).zIndex)&&e!==t&&"none"!==r.display&&(n=Math.max(1+i,n))}),n!==t&&(e.style.zIndex=n)}position(){var e,t,n=this.element;let r=n.combobox,i=n.button,o=n.datalist;r.classList.contains("active")&&(n=i.getBoundingClientRect(),r.contains(o)&&!i.popoverTargetElement||(o.style.left=n.left+document.scrollingElement.scrollLeft+"px",o.style.top=n.bottom+document.scrollingElement.scrollTop-1+"px",o.style.width=r.getBoundingClientRect().width+"px",o.classList.add("active"),this.zIndex()),t=(e=o.getBoundingClientRect()).bottom+window.pageYOffset>Math.max(document.body.clientHeight,window.innerHeight),r.classList[t?"add":"remove"]("reverse"),!t||this.dataset.cssPosition||this.hasAttribute("is-css-position")||(o.style.top=n.top+document.scrollingElement.scrollTop-e.height+1+"px"))}createNormalEvent(){var e=this.element;let t=e.combobox,n=e.button,r=e.datalist;n.addEventListener("click",()=>{if(this.disabled)return!1;var e,i;t.classList.toggle("active"),t.classList.contains("active")?((this.dataset.cssPosition||this.hasAttribute("is-css-position")||p?t:document.body).appendChild(r),this.position(),n.setAttribute("aria-expanded","true"),e=t.dataScrollTop,i=r.querySelector(".selected"),e&&i&&e[1]===i.getAttribute("data-index")&&e[2]===i.innerText&&(r.scrollTop=e[0],delete t.dataScrollTop)):(t.classList.remove("reverse"),n.setAttribute("aria-expanded","false"),r.remove())}),r.addEventListener("click",e=>{var i,o,a,s;(e=e.target)&&e.closest&&(i=null,o=(e=e).classList.contains("disabled"),a=e.getAttribute("data-index"),s=r.scrollTop,t.dataScrollTop=[s,a,e.innerText],o||(i=this[a])&&(i.selected=!0),t.classList.remove("active"),n.setAttribute("aria-expanded","false"),r.remove(),n.focus(),n.blur(),o||(this.refresh(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))))});const i=[],o=e=>{e!=document.body&&("auto"==window.getComputedStyle(e).overflow&&i.push(e),o(e.parentElement))};this.dataset.cssPosition||this.hasAttribute("is-css-position")||p||(o(n.parentElement),i.forEach(e=>{e.addEventListener("scroll",()=>{this.position()})})),document.isSelectMouseEvent||(document.addEventListener("mouseup",e=>{if(e=e.target){const n=document.querySelector("select+.ui-select.active");if(n){var t=n.previousElementSibling;const r=t.element&&t.element.datalist;r.contains(e)||n.contains(e)||(n.classList.remove("active"),n.classList.remove("reverse"),r.remove())}}}),document.isSelectMouseEvent=!0)}createMultipleEvent(){const e=this.element.datalist;this.addEventListener("change",()=>{this.refresh()}),this.addEventListener("scroll",()=>{e.scrollTop=this.scrollTop}),this.addEventListener("mousedown",()=>{this.setAttribute("data-active","true")}),this.addEventListener("mousemove",t=>{if(this.getAttribute("data-active"))this.refresh();else for(var n=t.clientY,r=(t=t.clientX,document.elementsFromPoint(t,n)),i=e.querySelectorAll("a"),o=0;o<i.length;o++){var a=i[o];if(a.removeAttribute("href"),[...r].includes(a)){a.classList.contains("selected")||a.classList.contains("disabled")||(a.href="javascript:");break}}}),this.addEventListener("mouseout",()=>{e.querySelectorAll("a[href]").forEach((function(e){e.removeAttribute("href")}))}),document.addEventListener("mouseup",()=>{this.removeAttribute("data-active")})}setProperty(){Object.defineProperty(this,"value",{configurable:!0,enumerable:!0,writeable:!0,get:()=>[...this.selectedOptions].map(e=>e.value).join(),set:e=>{[...this.options].some(t=>{if(e.split(",").includes(t.value)){if(t.selected=!0,!this.multiple)return!0}else this.multiple&&(t.selected=!1)})}});var e=Object.getOwnPropertyDescriptor(HTMLSelectElement.prototype,"selectedIndex");Object.defineProperty(HTMLSelectElement.prototype,"selectedIndex",{...e,set(e){this.options[e]&&(this.options[e].selected=!0)}})}attributeChangedCallback(e){const t=this.element.button;"disabled"===e?t&&(t.disabled=this.disabled):"multiple"===e?this.element.combobox&&(this.element.combobox.remove(),this.render()):"width"==e&&this.setWidth()}connectedCallback(){this.observer=new MutationObserver(e=>{let t=!0;e.forEach(e=>{"attributes"==e.type&&e.target.hasAttribute("selected")&&(e.target.selected=!0,t=!1)}),t&&this.refresh()}),this.resizeObserver=new ResizeObserver(()=>{this.setWidth(),this.position()}),this.observer.observe(this,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["selected"]}),this.resizeObserver.observe(this),this.dispatchEvent(new CustomEvent("connected",{detail:{type:"ui-select"}})),this.isConnectedCallback=!0,this.render()}disconnectedCallback(){this.observer&&this.resizeObserver&&(this.remove(),this.observer.disconnect(),this.resizeObserver.disconnect())}}const g=Object.getOwnPropertyDescriptor(HTMLOptionElement.prototype,"selected");Object.defineProperty(HTMLOptionElement.prototype,"selected",{...g,set(e){g.set.call(this,e),this.parentElement&&this.parentElement.refresh&&this.parentElement.refresh()}}),customElements.get("ui-select")||customElements.define("ui-select",m,{extends:"select"});class A extends HTMLElement{static get observedAttributes(){return["open","target"]}static get defaults(){return{eventtype:"click",position:"7-5"}}constructor(e,t,n){super(),n=n||{},this.params=this.params||{},this.params=new Proxy(this.params,{get:(e,t)=>{if(t){let n=e[t=t.toLowerCase()],r=this.element.trigger;return void 0===n&&(n=r.getAttribute(t)||r.dataset[t],void 0===(n="width"==t?r!==this?r.dataset[t]:r.getAttribute(t):n)&&A.defaults[t]&&(n=A.defaults[t])),n}},set:(e,t,n)=>(e[t.toLowerCase()]=n,!0)});var r=this.element||{};this.element=new Proxy(r,{get:(e,t)=>{if("target"!=t)return"trigger"==t?e[t]||this:e[t];{var n=this.getAttribute("target");let r=e[t];return r=!r&&n?document.getElementById(n):r}},set:(e,t,n)=>{if((n="string"==typeof n?document.getElementById(n)||document.querySelector(n):n)&&"number"!=typeof n.nodeType)return!1;if(e[t]=n,"target"==t&&n){let t=n,r=t.id,i=(r||(r=("lulu_"+Math.random()).replace("0.",""),t.id=r),this.element.trigger);i==this?this.target!=r&&(this.target=r):i&&((e=i.dataset.target)&&document.querySelector('datalist[id="'+e+'"]')?i.setAttribute("data-target2",r):i.setAttribute("data-target",r))}return!0}}),[...arguments].forEach((function(e){"object"==typeof e&&e&&!e.tagName&&(n=e)})),e&&(this.element.trigger=e),(e=this.element.trigger)&&(t&&t!==n?this.element.target=t:!t&&e.dataset&&e.dataset.target&&(this.element.target=e.dataset.target)),this.setParams(n),this.open&&("loading"!=document.readyState?this.show():window.addEventListener("DOMContentLoaded",()=>{this.show()})),e!==this&&(this.addEventListener("connected",(function(){this.remove()})),e["ui-drop"]=this,document.body.append(this))}get htmlFor(){return this.getAttribute("for")}set htmlFor(e){this.setAttribute("for",e)}get target(){return this.getAttribute("target")}set target(e){this.setAttribute("target",e)}get eventType(){return this.getAttribute("eventtype")||"click"}set eventType(e){this.setAttribute("eventtype",e)}get open(){return this.hasAttribute("open")}set open(e){this.toggleAttribute("open",e)}setParams(e){let t=(e=e||{}).onShow,n=e.onHide;"function"==typeof t&&(this.addEventListener("show",(function(e){t.call(this,e),this.position()})),delete e.onShow),"function"==typeof n&&(this.addEventListener("hide",(function(e){n.call(this,e)})),delete e.onHide),Object.assign(this.params,e||{})}events(e){let t=this.element.trigger,n=this.element.target;if((n||e)&&(!n||!n.matches("datalist"))){const e=this.params,r=n=>e.selector&&(n=n.closest(e.selector),0!=t.contains(n))?n:null;switch(e.eventType){case"null":break;case"hover":case"mouseover":case"mouseenter":if(!n)return void setTimeout(()=>{this.element.target&&this.events()},1);n.timerHover=null,n.timerHold=null,t.isBindDropEvents||(t.addEventListener("mouseover",t=>{t.relatedTarget!==t.target&&((t=r(t.target))&&(this.element.trigger=t),e.selector&&!t||(n.timerHover=setTimeout(()=>{this.show()},150),clearTimeout(n.timerHold)))}),t.addEventListener("mouseout",e=>{this.element.trigger!=e.target&&!this.element.trigger.contains(e.target)||(clearTimeout(n.timerHover),n.timerHold=setTimeout(()=>{this.hide()},200))}),n&&!n.isBindDropHover&&(n.addEventListener("mouseenter",()=>{clearTimeout(n.timerHold)}),n.addEventListener("mouseleave",()=>{n.timerHold=setTimeout(()=>{let e=n.element.trigger;e&&"hover"==e.eventType&&e.hide()},100)}),n.isBindDropHover=!0),t.addEventListener("click",t=>{window.isKeyEvent&&(t.preventDefault(),(t=r(t.target))&&(this.element.trigger=t),e.selector&&!t||(this.open?this.hide():this.show()))}),"hover"!=this.eventType&&(this.eventType="hover"));break;case"click":case"contextmenu":t.isBindDropEvents&&t.isBindDropEvents===e.eventType||t.addEventListener(e.eventType,t=>{t.preventDefault();var n=r(t.target);n&&(this.element.trigger=n),e.selector&&!n||("contextmenu"==e.eventType?(e.position=[t.pageX,t.pageY],this.show()):this.open?this.hide():this.show())})}"null"==e.eventType||t.isBindDocMouseUp||(document.addEventListener("mouseup",e=>{if((e=e&&e.target)&&this.open){let t=this.element.trigger,n=this.element.target;0!=t.contains(e)||n&&0!=n.contains(e)||this.hide()}}),t.isBindDocMouseUp=!0),t.isBindDropEvents=e.eventType||!0,window.addEventListener("resize",()=>{this.position()}),this.dispatchEvent(new CustomEvent("DOMContentLoaded")),t!=this&&t.dispatchEvent(new CustomEvent("DOMContentLoaded"))}}position(){let e=this.element.trigger;var t=this.element.target;return this.open&&t&&"none"!=window.getComputedStyle(e).display&&e.follow(t,{offsets:this.params.offsets,position:this.params.position,edgeAdjust:this.params.edgeAdjust}),this}show(){let e=this.element.trigger,t=this.element.target;return t&&0==document.body.contains(t)&&document.body.appendChild(t),t&&(t.style.position="absolute",t.style.display="inline",t.classList.add("ESC"),t.tabIndex=-1,t.focus({preventScroll:!0}),t.element=t.element||{},t.element.trigger=this),e.setAttribute("aria-expanded","true"),this.open||(this.open=!0),this.position(),this.dispatchEvent(new CustomEvent("show")),e!=this&&e.dispatchEvent(new CustomEvent("show",{detail:{type:"ui-drop"}})),this}hide(){let e=this.element.trigger,t=this.element.target;return t&&(t.style.display="none",t.classList.remove("ESC"),t.element&&delete t.element.trigger),e.setAttribute("aria-expanded","false"),window.isKeyEvent&&e.focus(),this.open&&(this.open=!1),this.dispatchEvent(new CustomEvent("hide")),e!=this&&e.dispatchEvent(new CustomEvent("hide",{detail:{type:"ui-drop"}})),this}list(e,t,n){function r(e){let t={id:e.id||e.value,value:e.innerHTML||e.value,className:e.className,disabled:e.disabled,label:e.label,accessKey:e.accessKey};var n=e.closest("optgroup");return n&&n.disabled&&(t.disabled=!0),e.hasAttribute("href")&&(t.href=e.getAttribute("href")),t}if([...arguments].forEach(i=>{var o=typeof i;"string"==o?e=document.getElementById(i)||document.querySelector(i):"function"==o?t=i:"object"==o&&("number"==typeof i.nodeType?i.matches("datalist")?(t=function(){let e=i.querySelectorAll("optgroup"),t=!!i.querySelector("optgroup[label]");if(e.length){let n=[];return e.forEach(e=>{t?n.push({id:"-1",value:e.label,disabled:e.disabled,className:e.className,heading:!0}):n.push({}),e.querySelectorAll("option").forEach(e=>{n.push(r(e))})}),n}return[...i.querySelectorAll("option")].map((e,t)=>{let n=r(e);return n.value?(n.id||(n.id=t),n):{}})},e==i&&(e=null)):e=i:i.map?t=i:n=i)}),e=(e=e&&"number"!=typeof e.nodeType?null:e)||this.element.trigger){t=t||[];const r={eventType:"click",offsets:{x:0,y:0},position:"4-1",selector:"",width:"",onShow:()=>{},onHide:()=>{},onSelect:()=>{}},o={},a=(n=n||{},Object.keys(r).forEach(e=>{o[e]=n[e]||this.params[e]||r[e]}),"selected"),s="disabled",u={add:function(){return["ui-droplist"].concat([].slice.call(arguments)).join("-")},toString:()=>"ui-droplist"};let c="innerHTML",l=(e.matches("input")&&(c="value"),document.createElement("div"));l.setAttribute("role","listbox"),l.setAttribute("tabindex","-1"),/^\d+$/.test(o.width)?l.style.width=o.width+"px":l.style.width=o.width,l.className=u.add("x");var i=this.data=t;let h=t=>{let n="-1",r=!1,i=(t,o)=>{t&&t.length&&t.forEach((t,u)=>{const l=o.concat(u);t&&t.data?i(t.data,l):(t&&t[a]&&!t[s]&&t.value&&(e[c]=t.value,n=l.join("-")),t&&t[a]&&(r=!0))})};i(t,[]);const o=(e[c]||"").trim();return 0==r&&o&&(i=(e,t)=>{e&&e.length&&e.forEach((e,r)=>{const s=t.concat(r);e&&e.data?i(e.data,s):"string"==typeof e.value&&e.value.trim()==o&&(n=s.join("-"),e[a]=!0)})})(t,[]),n},f=-1;"function"!=typeof t&&t.length&&t.map&&(f=h(i)),this.setParams({eventType:o.eventType,offsets:o.offsets,selector:o.selector,position:o.position,onShow:function(){((e,t)=>{"function"==typeof t&&(t=t(),f=h(t));let n=(t=t&&t.length?t.map(e=>"string"==typeof e&&"-"!==e?{value:e}:e):[{value:"没有数据",disabled:!0}]).some(e=>e&&e[a]);e.innerHTML=(()=>{const e=(t,r)=>{let i="";return t.forEach((t,o)=>{if("-"==t||null===t||"{}"==JSON.stringify(t))i+='<hr class="'+u.add("hr")+'">';else{const c=r.concat(o);let l=t.href,h=(l="string"!=typeof l?"javascript:":l||location.href.split("#")[0],""),d=(t.target&&(h=' target="'+t.target+'"'),""),p=(t.data&&(d=" data-sublist"),""),m=(t.label&&(p=' aria-label="'+t.label+'"'),""),g=(t.accessKey&&(m=` accesskey="${t.accessKey}"`),0==n&&f==c.join("-")&&(t[a]=!0),u.add("li")+" "+t.className);g=(g=t[a]?g+" "+a:g).trim(),1==t.heading?(t.disabled&&(g+=" disabled"),i+='<div class="'+g+'"'+p+' role="heading">'+t.value+"</div>"):1!=t[s]?(i+='<a href="'+l+'"'+h+p+m+' class="'+g+'" data-index="'+c.join("-")+'" role="option" aria-selected="'+(t[a]||"false")+'" '+d+">"+t.value+"</a>",t.data&&(i+='<div class="'+u.add("xx")+'"><div class="'+u.add("x")+'" role="listbox">'+e(t.data,c)+"</div></div>")):i+='<span class="'+g+'"'+p+m+">"+t.value+"</span>"}}),i};return""+e(t,[])})(),e.listData=t}).call(this,l,this.data),o.onShow.apply(this,arguments)},onHide:o.onHide}),this.element.trigger=e,this.element.target=l,this.events(),l.addEventListener("click",t=>{if(1==t.target.nodeType&&t.target.closest){const n=t.target.closest("a");if(n){const r=l.listData,i=n.getAttribute("data-index");if(i){let s=null;if(i.split("-").forEach(e=>{s=(null===s?r:s.data||s)[e]}),s)if("string"==typeof n.getAttribute("data-sublist")){n.classList.add(a);const e=n.nextElementSibling.querySelector("."+u.add("x"));if(!e)return;e.style.transform="",e.classList.remove("reverse"),(t=e.getBoundingClientRect()).right>document.documentElement.clientWidth&&e.classList.add("reverse");let r=0;t.bottom>window.innerHeight&&(r=window.innerHeight-t.bottom),e.style.transform="translateY("+r+"px)"}else{if(i!=f){let e=null;"-1"!=f&&(f.split("-").forEach(t=>{e=(null===e?r:e.data||e)[t]}),e&&delete e[a]),s[a]=!0,f=i}(this.params.onSelect||o.onSelect).call(this,s,n),this.dispatchEvent(new CustomEvent("select",{detail:{data:s,target:n}})),e!=this&&e.dispatchEvent(new CustomEvent("select",{detail:{type:"ui-drop",data:s,target:n}})),"contextmenu"==o.eventType||""!=o.selector||s.href||(e[c]=s.value),this.hide()}}}}}),l.addEventListener("mouseover",e=>{if(1==e.target.nodeType&&e.target.closest){const t=e.target.closest("a");if(t){const e=t.parentElement.querySelector("."+a+"[data-sublist]");e&&e!=t&&e.classList.remove(a),0==t.classList.contains(a)&&"string"==typeof t.getAttribute("data-sublist")&&t.click()}}})}return this}panel(e,t){if(2===arguments.length)e=arguments[0],t=arguments[1];else if(1===arguments.length){if((t=arguments[0]).matches&&t.matches("dialog")){let e=t,r=e.dataset.buttons;var n=[];""!==r&&"null"!==r&&"false"!==r&&(n=[{value:(r=r||"").split(",")[0].trim(),events:()=>{e.dispatchEvent(new CustomEvent("ensure",{detail:{drop:this}}))}},{value:(r.split(",")[1]||"").trim(),events:()=>{e.dispatchEvent(new CustomEvent("cancel",{detail:{drop:this}})),this.hide()}}]),t={content:e.innerHTML,title:e.title,buttons:n}}e=null}if(e=(e="string"==typeof e?document.querySelector(e):e)||this.element.trigger){t=t||{},["width","eventType","selector","offsets","position"].forEach((function(n){var r=e.getAttribute(n)||e.dataset[n];r&&void 0===t[n]&&(t[n]=r)}));const n=Object.assign({},{title:"",content:"",buttons:[{},{}],width:"auto",eventType:"click",selector:"",offsets:{x:0,y:0},position:"4-1",onShow:()=>{},onHide:()=>{}},t),r={add:function(){return["ui-dropanel"].concat([].slice.call(arguments)).join("-")},toString:()=>"ui-dropanel"},i=document.createElement("div"),o=(i.className=r.add("x"),/^\d+$/.test(n.width)?i.style.width=n.width+"px":/^\d+\D+$/.test(n.width)&&(i.style.width=n.width),document.createElement("h5")),a=(o.className=r.add("title"),o.innerHTML=n.title,document.createElement("button")),s=(a.setAttribute("aria-label","关闭"),a.className=r.add("close"),document.createElement("content")),u=(s.className=r.add("content"),s.innerHTML=n.content,document.createElement("div"));u.className=r.add("footer"),i.appendChild(o),i.appendChild(a),i.appendChild(s),i.appendChild(u),this.setParams({eventType:n.eventType,offsets:n.offsets,selector:n.selector,position:n.position,onShow:n.onShow,onHide:n.onHide}),Object.assign(this.element,{trigger:e,target:i,panel:i,title:o,close:a,content:s,footer:u}),this.events(),a.addEventListener("click",()=>{this.hide()},!1),n.buttons.forEach((e,t)=>{let i=(e=e||{}).type||"",o=(i||0!=t||(i=1<n.buttons.length?"danger":"primary"),e.value),a=(o=o||["确定","取消"][t],e.events||{click:()=>{this.hide()}}),s=("function"==typeof a&&(a={click:a}),null);e.for?((s=document.createElement("label")).setAttribute("for",e.for),s.setAttribute("role","button")):e.form?(s.setAttribute("form",e.form),s.type="submit"):(s=document.createElement("button"),this.element["button"+t]=s),s.innerHTML=o,s.className=String(r).replace("dropanel","button")+" "+r.add("button")+" "+(e.className||""),s.setAttribute("data-type",i||"normal"),this.element["button"+t]=s;for(let e in a)s.addEventListener(e,t=>{t.drop=this,a[e](t)},!1);this.element.footer.appendChild(s)})}return this}connectedCallback(){let e=this.element.target,t=this.element.trigger;t.open?t.setAttribute("aria-expanded","true"):t.setAttribute("aria-expanded","false"),e?e.matches("datalist")?this.list(e):e.matches("dialog")?this.panel(e):this.events():this.events(t===this),this.querySelector("a, button")||this.closest("a, button")||(this.tabIndex=0,this.role="button"),this.dispatchEvent(new CustomEvent("connected",{detail:{type:"ui-drop"}})),t!=this&&t.hasAttribute("is-drop")&&(t.dispatchEvent(new CustomEvent("connected",{detail:{type:"ui-drop"}})),t.setAttribute("defined","")),this.isConnectedCallback=!0}attributeChangedCallback(e,t,n){"target"==e?(n=document.getElementById(n))&&(this.element.target=n):"open"==e&&(n=this.element.trigger.getAttribute("aria-expanded"),this.open&&"false"==n?this.show():this.open||"true"!=n||this.hide())}}window.Drop=A,customElements.get("ui-drop")||customElements.define("ui-drop",A),HTMLElement.prototype.drop=function(e,t){return this.matches("ui-drop, [is-drop]")||this["ui-drop"]||(this["ui-drop"]=new A(this,e,t)),this};const v=e=>{(e||document.querySelectorAll("[is-drop]")).forEach(e=>{let t=e.getAttribute("is-drop");t&&!e.dataset.target&&(e.dataset.target=t);var n=(t=e.dataset.target)&&document.getElementById(t);n&&(e["ui-drop"]=new A(e,n))})};var b=()=>{v();new MutationObserver(e=>{e.forEach(e=>{e.addedNodes&&e.addedNodes.forEach(e=>{e.tagName&&(e.hasAttribute("is-drop")?v([e]):v(e.querySelectorAll("[is-drop]")))})})}).observe(document.body,{childList:!0,subtree:!0})};"loading"!=document.readyState?b():window.addEventListener("DOMContentLoaded",b);class y extends HTMLElement{static get observedAttributes(){return["title","reverse","for","eventType","align"]}constructor(e,t,n){if(super(),(e="string"==typeof e&&/^#?\w+(?:[-_]\w+)*$/.test(e)?document.getElementById(e.replace("#","")):e)&&e.tips)return e.tips(t,n),e["ui-tips"];this.target=null}get title(){let e=this.getAttribute("title");return e?(this.setAttribute("data-title",e),this.removeAttribute("title")):e=this.getAttribute("data-title")||"",e}set title(e){this.setAttribute("data-title",e),this.setAttribute("aria-label",e)}get reverse(){return null!==this.getAttribute("reverse")||this.classList.contains("reverse")}set reverse(e){e?this.setAttribute("reverse",""):this.removeAttribute("reverse")}get htmlFor(){return this.getAttribute("for")}set htmlFor(e){this.setAttribute("for",e)}get align(){return this.getAttribute("align")||"auto"}set align(e){this.setAttribute("align",e)}get eventType(){return this.getAttribute("eventtype")||"hover"}set eventType(e){this.setAttribute("eventtype",e)}get trigger(){var e=this.htmlFor;let t;return(t=e?document.getElementById(e):t)||this}create(){let e=this.trigger;var t=this.title;let n=document.createElement("div");n.classList.add("ui-tips-x"),n.innerHTML=t,e.getAttribute("aria-label")||(t="lulu_"+(Math.random()+"").replace("0.",""),e.setAttribute("aria-labelledby",t)),document.body.appendChild(n),this.target=n,this.dispatchEvent(new CustomEvent("DOMContentLoaded")),e!=this&&e.dispatchEvent(new CustomEvent("DOMContentLoaded"))}show(){let e=this.trigger;var t=this.title;this.target?this.target.innerHTML=t:this.create(),this.target.style.display="block";let n="5-7",r=this.align;t=this.reverse,"center"===(r="auto"===r?e.dataset.align||e.dataset.position||"center":r)?n=t?"7-5":"5-7":"left"===r?n=t?"4-1":"1-4":"right"===r?n=t?"3-2":"2-3":/^\d-\d$/.test(r)&&(n=r),e.follow(this.target,{position:n,edgeAdjust:!1}),this.target.style.setProperty("--ui-width",e.offsetWidth),this.target.style.setProperty("--ui-height",e.offsetHeight),e.dispatchEvent(new CustomEvent("show",{detail:{type:"ui-tips"}}))}hide(){this.target&&(this.target.style.display="none",this.trigger.dispatchEvent(new CustomEvent("hide",{detail:{type:"ui-tips"}})))}events(){let e=this.trigger;this.timerTips=null,this.handleMouseEnter=()=>{this.timerTips=setTimeout(()=>{this.show()},100)},this.handleMouseLeave=()=>{clearTimeout(this.timerTips),this.hide()},this.handleFocus=()=>{window.isKeyEvent&&this.show()},this.handleMouseUp=t=>{t=t.target,e.contains(t)||this.target.contains(t)||this.hide()},"hover"===this.eventType?(e.addEventListener("mouseenter",this.handleMouseEnter),e.addEventListener("mouseleave",this.handleMouseLeave),e.addEventListener("focus",this.handleFocus),e.addEventListener("blur",this.hide)):"click"===this.eventType?(e.addEventListener("click",this.show),document.addEventListener("mouseup",this.handleMouseUp)):this.show()}connectedCallback(){let e=this.trigger;e.originTitle=this.title,this.isConnectedCallback||(/^a|input|button|area$/i.test(e.tagName)||(e.setAttribute("tabindex","0"),e.setAttribute("role","tooltip")),this.events(),this.dispatchEvent(new CustomEvent("connected",{detail:{type:"ui-tips"}})),e!=this&&e.hasAttribute("is-tips")&&(e.dispatchEvent(new CustomEvent("connected",{detail:{type:"ui-tips"}})),e.setAttribute("defined","")),this.isConnectedCallback=!0)}}function w(){const e=".ui-tips, [is-tips]";document.querySelectorAll(e).forEach(e=>{e.tips&&e.tips()}),new MutationObserver((function(t){t.forEach((function(t){var n=t.addedNodes;t=t.removedNodes;n.length&&n.forEach((function(t){t.matches&&(t.matches(e)?t.tips():t.querySelectorAll(e).forEach(e=>{e.tips()}))})),t.length&&t.forEach((function(t){t.matches&&(t["ui-tips"]&&t["ui-tips"].target?t["ui-tips"].target.remove():t.querySelectorAll(e).forEach((function(e){e["ui-tips"]&&e["ui-tips"].target&&e["ui-tips"].target.remove()})))}))}))})).observe(document.body,{childList:!0,subtree:!0})}customElements.get("ui-tips")||customElements.define("ui-tips",y),window.Tips=y,HTMLElement.prototype.tips=function(e,t={}){if("css"===this.getAttribute("is-tips")||this.classList.contains("ui-tips"))this.title&&(this.setAttribute("data-title",this.title),this.setAttribute("aria-label",this.title),this.removeAttribute("title"));else{"string"!=typeof e&&(t=e||{});var n=this.hasAttribute("reverse")||this.classList.contains("reverse");if(this["ui-tips"])this["ui-tips"].toggleAttribute("reverse",n),void 0!==t.eventType&&"hover"!=t.eventType&&"click"!=t.eventType&&this["ui-tips"].show();else{let r=document.createElement("ui-tips");r.title="string"==typeof e?e:this.getAttribute("title")||t.content||"",r.toggleAttribute("reverse",n),this.removeAttribute("title"),this.id||(this.id="lulu_"+(Math.random()+"").replace("0.","")),r.htmlFor=this.id,t.eventType&&(r.eventType=t.eventType),t.align&&(r.align=t.align),(this["ui-tips"]=r).addEventListener("connected",(function(){this.remove()})),document.body.appendChild(r)}}},"loading"!=document.readyState?w():window.addEventListener("DOMContentLoaded",w);class x extends HTMLElement{static get observedAttributes(){return["open"]}constructor(){super(),arguments.length&&x.custom.apply(this,arguments)}get type(){return this.getAttribute("type")}get time(){var e=this.getAttribute("time");return isNaN(e)||isNaN(parseFloat(e))?3e3:Number(e)}set type(e){this.setAttribute("type",e)}set time(e){this.setAttribute("time",e)}get open(){return this.hasAttribute("open")}set open(e){this.toggleAttribute("open",e)}connectedCallback(){this.setAttribute("tabIndex",0),this.setAttribute("role","tooltip"),this.closeMode||(this.closeMode="hide"),this.addEventListener("click",()=>{this[this.closeMode]()}),this.dispatchEvent(new CustomEvent("connected",{detail:{type:"ui-lighttip"}})),this.isConnectedCallback=!0}attributeChangedCallback(e,t,n){"open"==e&&typeof t!=typeof n&&("string"==typeof n?(clearTimeout(this.timer),this.timer=setTimeout(()=>{this.isTimeHide=!0,this[this.closeMode](),this.position()},this.time),this.setAttribute("data-tid",this.timer),this.classList.add("ESC"),this.zIndex(),this.position()):this.classList.remove("ESC"),this.tabIndex(),this.isTimeHide=null)}zIndex(){var e=19;this.parentElement&&[...this.parentElement.childNodes].forEach((function(t){var n;1==t.nodeType&&(n=+(t=window.getComputedStyle(t)).zIndex)&&"none"!=t.display&&(e=Math.max(1+n,e))})),this.style.zIndex=e}position(){var e=[...document.querySelectorAll('ui-lighttip[open]:not([type="loading"])')].sort((function(e,t){return(e.getAttribute("data-tid")||0)-(t.getAttribute("data-tid")||0)})),t={},n=-1;e.forEach(e=>{var r=e.textContent;void 0===t[r]&&(n++,t[r]=n),e.style.setProperty("--ui-sort-index",t[r])})}tabIndex(){var e,t=x.lastActiveElement;return 1==this.open?(e=document.activeElement)&&!e.closest("[keepfocus]")&&(this!==e&&(x.lastActiveElement=e),this.focus()):t&&!t.matches("body")&&(t.focus({preventScroll:!0}),window.isKeyEvent||this.isTimeHide||t.blur(),x.lastActiveElement=null),this}static success(e,t=3e3){return this.custom(e,"success",t)}static error(e,t=3e3){return this.custom(e,"error",t)}static normal(e,t=3e3){return this.custom(e,"normal",t)}static loading(e){return this.custom(e=e||"正在加载中...","loading")}static custom(e="",t,n){if(!this.matches||!this.matches("ui-lighttip"))return x.custom.apply(document.createElement("ui-lighttip"),arguments);if("object"==typeof e&&(t=e,e=""),"string"!=typeof e)return this;if(this.closeMode="remove",t&&"object"==typeof t)x.custom.call(this,e,t.type,t.time);else{if("number"!=typeof t)return"loading"==t&&(e=e||"正在加载中...",n=999999),n&&(this.time=n),t&&(this.type=t),this.innerHTML=e,"success"==t?this.setAttribute("aria-lable","操作成功"):"error"==t&&this.setAttribute("aria-lable","操作失败"),this.parentElement||(document.body.appendChild(this),this.dispatchEvent(new CustomEvent("DOMContentLoaded"))),this.show(),this;x.custom.call(this,e,n,t)}}remove(){this.parentElement&&this.parentElement.removeChild(this),this.open=!1}show(){0<this.time&&(this.open=!0)}hide(){this.open=!1}}customElements.get("ui-lighttip")||customElements.define("ui-lighttip",x),window.LightTip=x;class C{static allHide(e){C.collectionErrorTip.forEach(t=>{e!=t&&t.hide()})}constructor(e,t,n){n={unique:!0,scroller:null,onShow:()=>{},onHide:()=>{},...n};let r=t;if("string"!=typeof(r="function"==typeof r?r():r))return this;this.callback={show:n.onShow,hide:n.onHide},this.params={unique:n.unique,scroller:n.scroller};const i=e;let o=i.data&&i.data.errorTip;if(o)return o.content=r,o.callback={show:n.onShow,hide:n.onHide},o.element.tips.trigger=i,o.show(),this;let a,s=C.collectionErrorTip;t=s[s.length-1],a=1==n.unique&&t?t.element.tips:0==n.unique&&i.data&&i.data.errorTip?i.data.errorTip.element.tips:this.create(i),1==n.unique&&0==s.includes(this)&&s.push(this),a.trigger=i;let u=this.params.scroller;!u&&i&&(e=i.dataset.scroller)&&(u=i.closest(e)||i.closest("#"+e)),u&&u!=document.scrollingElement&&!i.errorTipScroller&&(u.addEventListener("scroll",()=>{this.display&&this.position()}),i.errorTipScroller=u),this.element={trigger:i,tips:a},this.content=r,i.data||(i.data={}),(i.data.errorTip=this).show()}create(){const e=document.createElement("div");return e.className="ui-tips-x ui-tips-error",document.body.appendChild(e),this.events(e),e}events(e){document.addEventListener("keydown",e=>{/Control|Shift/i.test(e.code)||(C.allHide(this),this.hide())}),document.addEventListener("mousedown",t=>{var n=document.activeElement;const r=e.trigger;t=t.target,n&&r&&n==t&&n==r&&!r.getAttribute("data-focus")||(C.allHide(this),this.hide())}),window.addEventListener("resize",()=>{C.allHide(this),this.hide()})}position(){var e=this.element,t=e.tips;e.trigger.follow(t,{position:"5-7",edgeAdjust:!1})}show(){var e=this.element;const t=e.tips,n=e.trigger;t.innerHTML=this.content,t.style.display="",this.position(),n.setAttribute("aria-label","错误提示："+this.content),n.toggleAttribute("is-error",!0),n.classList.add("valided"),this.display=!0,this.callback&&this.callback.show&&this.callback.show.call(this,n,t),n.dispatchEvent(new CustomEvent("show",{detail:{type:"ui-errortip",content:this.content}}))}hide(){if(this.display){const e=this.element.tips,t=this.element.trigger;t.removeAttribute("aria-label"),t.removeAttribute("is-error"),e.style.display="none",this.display=!1,this.callback&&this.callback.hide&&this.callback.hide.call(this,t,e),t.dispatchEvent(new CustomEvent("hide",{detail:{type:"ui-errortip"}}))}}}if(C.collectionErrorTip=[],window.ErrorTip=C,HTMLElement.prototype.errorTip=function(e,t={}){return new C(this,e,t),this},!("loading"in HTMLElement.prototype)){let e="loading",t="ui-"+e,n=(Object.defineProperty(HTMLElement.prototype,"loading",{configurable:!0,enumerable:!0,get(){return!(!this.classList.contains(t)&&!this.matches(t))},set(n){let r="remove";if(n&&(r="add",this.loading))return n;n=t.replace(e,"button"),this.classList.contains(n)||this.getAttribute("is")==n?this.classList[r](e):this.classList[r](t)}}),null),r=null;Object.defineProperty(document,"loading",{get:()=>Boolean(n&&document.querySelector("ui-lighttip[type=loading]")),set(e){if(e){n?(document.body.append(n),n.open=!0):n=new x({type:"loading"});let t=0,i=["正在加载中<ui-dot>...</ui-dot>","仍在加载中<ui-dot>...</ui-dot>","请再稍等片刻<ui-dot>...</ui-dot>"];"string"==typeof e?i=[e]:Array.isArray(e)&&(i=e),n.innerHTML=i[t],clearInterval(r),r=setInterval(()=>{t++,n.innerHTML=i[t]||i[t-1],t>=i.length-1&&clearInterval(r)},6e3)}else n&&n.remove(),clearInterval(r)}})}class k extends HTMLElement{constructor(){super()}get size(){return this.getAttribute("size")||2}set size(e){this.setAttribute("size",e)}get rows(){return this.getAttribute("rows")}set rows(e){this.setAttribute("rows",e)}}customElements.get("ui-loading")||customElements.define("ui-loading",k);class E extends HTMLInputElement{static get observedAttributes(){return["max","min","step","disabled"]}get defaultrange(){return this.getAttribute("range")||(this.getAttribute("from")||this.min||0)+","+(this.getAttribute("to")||this.max||100)}set multiple(e){return this.toggleAttribute("multiple",e)}get multiple(){return null!==this.getAttribute("multiple")}get from(){return this.element&&this.element.otherRange?Math.min(this.value,this.element.otherRange.value):""}get to(){return this.element&&this.element.otherRange?Math.max(this.value,this.element.otherRange.value):""}get range(){return this.multiple?this.from+","+this.to:""}get isFrom(){return!(!this.element||!this.element.otherRange)&&this.value-this.element.otherRange.value<0}set from(e){this.element&&this.element.otherRange&&(this.isFrom?this.value=e:this.element.otherRange.value=e)}set to(e){this.element&&this.element.otherRange&&(this.isFrom?this.element.otherRange.value=e:this.value=e)}set range(e){var t;this.multiple&&([e,t]=e.split(","),this.to=t,this.from=e)}connectedCallback(){this.tips=this.dataset.tips,this.addEventListener("input",this.render),this.addEventListener("change",this.change),this.addEventListener("touchstart",this.stopPropagation),this.form&&this.form.addEventListener("reset",()=>{setTimeout(()=>{this.render()},1)}),this.element=this.element||{},this.multiple&&!this.element.otherRange&&("static"===getComputedStyle(this.parentNode).position&&(this.parentNode.style.position="relative"),Object.assign(this.element,{otherRange:this.cloneNode(!1)}),this.element.otherRange.tips=this.tips,this.element.otherRange.element={otherRange:this},this.before(this.element.otherRange),this.setAttribute("data-range","to"),this.element.otherRange.setAttribute("data-range","from"),this.range=this.defaultrange),null===this.getAttribute("is")&&this.setAttribute("is","ui-range"),this.dispatchEvent(new CustomEvent("connected",{detail:{type:"ui-range"}})),this.isConnectedCallback=!0,this.render(),this.dispatchEvent(new CustomEvent("DOMContentLoaded"))}disconnectedCallback(){this.removeEventListener("input",this.render),this.removeEventListener("change",this.change),this.removeEventListener("touchstart",this.stopPropagation),this.element&&this.element.otherRange&&!this.exchange&&this.element.otherRange.remove()}stopPropagation(e){e.stopPropagation()}attributeChangedCallback(e,t,n){t!==n&&("disabled"===e&&this.element&&this.element.otherRange?this.element.otherRange.disabled=null!==n:this.render())}change(){const e=this.element&&this.element.otherRange;var t,n,r,i;e&&(t=!this.isFrom&&this.nextElementSibling===e,n=this.isFrom&&this.nextElementSibling!==e,r=!this.isFrom&&this.nextElementSibling!==e,i=this.isFrom&&this.nextElementSibling===e,(r||n||i||t)&&(this.exchange=!0,r||n?(e.before(this),this.setAttribute("data-range","from"),e.setAttribute("data-range","to")):(e.after(this),this.setAttribute("data-range","to"),e.setAttribute("data-range","from")),this.exchange=!1,this.focus()))}render(){var e=this.max||100,t=this.min||0;this.style.setProperty("--percent",(this.value-t)/(e-t)),"string"==typeof this.tips&&(/^\d+$/.test(this.tips)?this.dataset.tips=this.value:/^\${value}/.test(this.tips)?this.dataset.tips=this.tips.replace(/\${value}/g,this.value):this.dataset.tips=this.tips.replace(/\d+/,this.value)),this.style.setProperty("--from",this.from),this.style.setProperty("--to",this.to);const n=this.element&&this.element.otherRange;n&&(n.style.setProperty("--from",this.from),n.style.setProperty("--to",this.to))}addEventListener(...e){document.addEventListener.apply(this,e);var t=this.element&&this.element.otherRange;t&&document.addEventListener.apply(t,e)}}const S=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),_=(Object.defineProperty(E.prototype,"value",{...S,set(e){S.set.call(this,e),this.render()}}),customElements.get("ui-range")||customElements.define("ui-range",E,{extends:"input"}),"background-color");class O extends HTMLInputElement{static get observedAttributes(){return["disabled"]}constructor(){super(),this.setProperty()}static addClass(...e){return["ui","color",...e].join("-")}static funHslToHex(e,t,n,r){let i,o,a;var s;0==t?i=o=a=n:(i=(s=function(e,t,n){return n<0&&(n+=1),1<n&&--n,n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e})(t=2*n-(n=n<.5?n*(1+t):n+t-n*t),n,e+1/3),o=s(t,n,e),a=s(t,n,e-1/3));const u=[Math.round(255*i),Math.round(255*o),Math.round(255*a)];return r&&u.push(Math.round(255*r)),u.map(e=>1==(e=e.toString(16)).length?"0"+e:e).join("")}static funHexToHsl(e){3!=(e=(e||"").replace("#","")).length&&4!=e.length||(e=e.split("").map((function(e){return e+e})).join(""));var t=parseInt(e.slice(0,2),16)/255,n=parseInt(e.slice(2,4),16)/255,r=parseInt(e.slice(4,6),16)/255,i=Math.max(t,n,r),o=Math.min(t,n,r);let a,s;var u=(i+o)/2;if(i==o)a=s=0;else{var c=i-o;switch(s=.5<u?c/(2-i-o):c/(i+o),i){case t:a=(n-r)/c+(n<r?6:0);break;case n:a=(r-t)/c+2;break;case r:a=(t-n)/c+4}a/=6}return 8==e.length?[a,s,u,o=parseInt(e.slice(6,8),16)/255]:[a,s,u]}static funRgbToHex(e){var t,n;return e?(t=[],n=[],e=e.replace("#","").toLowerCase(),/^[0-9A-F]{1,6}$/i.test(e)?"#"+e.repeat(Math.ceil(6/e.length)).slice(0,6):/^[0-9A-F]{1,8}$/i.test(e)?"#"+e.repeat(Math.ceil(8/e.length)).slice(0,8):(t=e.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)/i),n=e.match(/^rgba\((\d+),\s*(\d+),\s*(\d+),\s*([0|1]?\.?\d+)/i),e=e=>("0"+parseInt(e,10).toString(16)).slice(-2),t&&4==t.length?"#"+e(t[1])+e(t[2])+e(t[3]):n&&5==n.length?"#"+e(n[1])+e(n[2])+e(n[3])+Math.round(255*n[4]).toString(16).padStart(2,"0"):O.defaultValue)):O.defaultValue}get type(){return this.getAttribute("type")||"color"}set type(e){return this.setAttribute("type",e||"color")}events(){const e=this.element,t=e.target,n=e.circle,r=e.fill,i=e.arrow,o=e.field,a=e.opacity,s=(t.addEventListener("click",t=>{const n=t.target;var r;t=n.className;/cancel/.test(t)?this.hide():/lump/.test(t)?(r=n.getAttribute("data-color"),this.value="#"+r):/switch/.test(t)&&("更多"===n.textContent?(e.more.style.display="block",e.basic.style.display="none",n.textContent="基本",e.mode.setAttribute("data-mode","basic")):(e.more.style.display="none",e.basic.style.display="block",n.textContent="更多",e.mode.setAttribute("data-mode","more")),this.match())}),o.addEventListener("input",()=>{var e=this.value;/^[0-9A-F]{6}$/i.test(e)||/^[0-9A-F]{8}$/i.test(e)?this.match():/^[0-9A-F]{3, 4}$/i.test(e)&&this.match(O.funRgbToHex("#"+e).replace("#",""))}),o.addEventListener("keyup",e=>{if(13==e.keyCode){let e=o.value;e&&(e=(a?O.funRgbToHex("#"+e):O.funRgbToHex("#"+e.slice(0,6))).replace("#",""),this.value="#"+e),this.hide()}}),a&&a.addEventListener("input",()=>{let e=o.value;var t=Math.round(a.value/100*255).toString(16).padStart(2,"0");e&&(t=e.slice(0,6)+t,this.value=t)}),{}),u={};return i.addEventListener("pointerdown",e=>{e.preventDefault(),s.pageY=e.pageY,s.top=parseFloat(window.getComputedStyle(i).top)}),r.addEventListener("pointerdown",e=>{e.preventDefault();var t=e.target.getBoundingClientRect();t=e.pageY-window.pageYOffset-t.top;i.style.top=t+"px",this.isTrustedEvent=!0,this.value=this.getValueByStyle(),s.pageY=e.pageY,s.top=parseFloat(window.getComputedStyle(i).top)}),n.parentElement.querySelectorAll("a").forEach(e=>{e.addEventListener("pointerdown",e=>{e.preventDefault(),u.pageY=e.pageY,u.pageX=e.pageX,n.style.left=e.offsetX+"px",n.style.top=e.offsetY+"px",u.top=parseFloat(e.offsetY),u.left=parseFloat(e.offsetX),this.isTrustedEvent=!0,this.value=this.getValueByStyle()})}),document.addEventListener("pointermove",e=>{if("number"==typeof s.top){e.preventDefault();let n=s.top+(e.pageY-s.pageY);var t=i.parentElement.clientHeight;n<0?n=0:n>t&&(n=t),i.style.top=n+"px",this.isTrustedEvent=!0,this.value=this.getValueByStyle()}else if("number"==typeof u.top){e.preventDefault();const r={top:e.pageY-u.pageY+u.top,left:e.pageX-u.pageX+u.left};t={top:n.parentElement.clientHeight,left:n.parentElement.clientWidth},r.left<0?r.left=0:r.left>t.left&&(r.left=t.left),r.top<0?r.top=0:r.top>t.top&&(r.top=t.top),e=r.left/t.left,t=1-r.top/t.top,n.style.left=r.left+"px",n.style.top=r.top+"px",e=`hsl('${[360*e,100*t+"%","50%"].join()})`,n.style[_]=e,this.isTrustedEvent=!0,this.value=this.getValueByStyle()}},{passive:!1}),document.addEventListener("pointerup",()=>{s.top=null,u.top=null}),r.parentElement.querySelectorAll("a").forEach(e=>{e.addEventListener("keydown",e=>{if(38==e.keyCode||40==e.keyCode){e.preventDefault();let n=parseFloat(window.getComputedStyle(i).top);var t=r.clientHeight;38==e.keyCode?--n<0&&(n=0):++n>t&&(n=t);const o=i.getAttribute("aria-label");i.style.top=n+"px",i.setAttribute("aria-label",o.replace(/\d+/,Math.round(100*n/t))),this.isTrustedEvent=!0,this.value=this.getValueByStyle()}})}),n.parentElement.querySelectorAll("a").forEach(e=>{e.addEventListener("keydown",t=>{if(37<=t.keyCode&&t.keyCode<=40){t.preventDefault();var r=window.getComputedStyle(n);let o=parseFloat(r.top),a=parseFloat(r.left);r=e.clientHeight;var i=e.clientWidth;38==t.keyCode?--o<0&&(o=0):40==t.keyCode?++o>r&&(o=r):37==t.keyCode?--a<0&&(a=0):39==t.keyCode&&++a>i&&(a=i),n.style.left=a+"px",n.style.top=o+"px",this.isTrustedEvent=!0,this.value=this.getValueByStyle()}})}),this}create(){const e=this.element.target,t="color-opacity"===this.type;var n=`<button class="${O.addClass("switch")} colorMode" data-mode="more" role="button">更多</button>`,r=`<div class="${O.addClass("current")}">\n            <i class="${t?O.addClass("current","square","opacity"):O.addClass("current","square")} colorCurrent"></i>\n            #<input class="${O.addClass("current","input")}" value="${this.value.replace("#","")}">\n        </div>`;const i=this.params.color.basicPreset,o=this.params.color.fixed;var a=`<div class="${O.addClass("body")}">`+function(){var e=`<div class="${O.addClass("basic")} colorBasicX" role="listbox">`;let n=(localStorage.commonColors||"").split(",");return(e+=`<aside class="${O.addClass("basic","l")}">`+o.concat(n[0]||"0ff",n[1]||"800180").map((function(e){return e=O.funRgbToHex(e).replace("#",""),`<a href="javascript:" class="${O.addClass("lump")}" data-color="${e}" aria-label="${e}" style="${_}:#${e}" role="option"></a>`})).join("")+"</aside>")+`<div class="${O.addClass("basic","r")}">`+function(){let e="";return i.forEach(n=>{e+=`<a href="javascript:" title="#${n}${t?"ff":""}" class="${O.addClass("lump","preset")}" data-color="${n}${t?"ff":""}" style="${_}:#${n}${t?"ff":""}" aria-label="${n}${t?"ff":""}" role="option"></a>`}),e}()+"</div></div>"}()+(a=`<div class="${O.addClass("more")} colorMoreX">`,(a+=`<div class="${O.addClass("more","l")}">\n                <a href="javascript:" class="${O.addClass("cover","white")}" aria-label="色域背景块" role="region"></a><div class="${O.addClass("circle")} colorCircle"></div>\n                <div class="${O.addClass("gradient")}">\n                </div>\n                </div><div class="${O.addClass("more","r")}">\n                    <div class="${O.addClass("more","fill")} colorFill">\n                        <a href="javascript:" class="${O.addClass("more","cover")}" aria-label="明度控制背景条" role="region"></a>\n                        <div class="${O.addClass("gradient")}" style="background: linear-gradient(#ffffff 0%, rgba(255,255,255,0) 50%, rgba(0,0,0,0) 50%, ${O.defaultValue} 100%);">\n                        </div>\n                    </div>\n                    <a href="javascript:" class="${O.addClass("more","arrow")} colorArrow" role="slider" aria-label="明度控制按钮：100%"></a>\n                </div>`)+"</div>")+(t?`<div class="${O.addClass("opacity")}">透明度：<input class="${O.addClass("opacity","range")} colorOpacity"type="range"  value="100" min="0" max="100" step="1" data-tips="\${value}%" is="ui-range"></div>`:"")+"</div>";e.innerHTML=n+r+a,Object.assign(this.element,{field:e.querySelector("input"),basic:e.querySelector(".colorBasicX"),more:e.querySelector(".colorMoreX"),mode:e.querySelector(".colorMode"),opacity:e.querySelector(".colorOpacity"),circle:e.querySelector(".colorCircle"),fill:e.querySelector(".colorFill"),arrow:e.querySelector(".colorArrow"),current:e.querySelector(".colorCurrent")});const s=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value");let u=this.element.field;return Object.defineProperty(u,"value",{...s,set(e){s.set.call(this,e),u.dispatchEvent(new CustomEvent("change"))}}),0==document.body.contains(e)&&document.body.appendChild(e),this.events(),this}match(e){if(1==this.display){var t=this.element;const r=t.target,i=t.current;var n=t.more;const o=t.circle,a=t.fill,s=t.arrow,u=t.field,c=t.opacity;let l=!0,h=(!1===e&&(l=!1),e||u.value);if(""==h&&(h=O.funRgbToHex(getComputedStyle(i)[_]).replace("#",""),u.value=h),h=h.replace("#",""),c?(/^[0-9A-F]{8}$/i.test(h)&&(c.value=parseInt(h.slice(6,8),16)/255*100),/^[0-9A-F]{6}$/i.test(h)&&(u.value+=Math.round(c.value/100*255).toString(16).padStart(2,"0"))):i.style[_]="#"+h,"none"==window.getComputedStyle(n).display){const e=r.querySelector(".active"),t=(e&&e.classList.remove("active"),r.querySelector(`a[data-color="${h.toUpperCase()}"]`));t&&t.classList.add("active")}else{t=o.parentElement.clientWidth,e=o.parentElement.clientHeight;let r=0,i=1;1==l?(r=(n=O.funHexToHsl(h))[0],i=n[1],n=n[2],o.style.left=t*r+"px",o.style.top=e*(1-i)+"px",s.style.top=s.parentElement.clientHeight*(1-n)+"px"):(r=parseFloat(o.style.left||0)/t,i=1-parseFloat(o.style.top||0)/e),n="hsl("+[360*r,Math.round(100*i)+"%","50%"].join(),a.style[_]=n,o.style[_]=n}}return this}position(){return this.follow(),this}show(){let e=this.element.target;""==e.innerHTML.trim()&&this.create(),this.display=!0,e.style.display="inline",e.classList.add("ESC"),this.setAttribute("aria-expanded","true"),this.position();const t=this.element.current;return t.getAttribute("style")||(t.style[_]=this.value),this.match(),this.dispatchEvent(new CustomEvent("show",{detail:{type:"ui-color"}})),this}hide(){let e=this.element.target;return e.style.display="none",e.classList.remove("ESC"),this.setAttribute("aria-expanded","false"),this.display=!1,this.focus(),this.dispatchEvent(new CustomEvent("hide",{detail:{type:"ui-color"}})),this}setProperty(){Object.defineProperty(this,"getValueByStyle",{value:()=>{var e=this.element.circle,t=this.element.arrow,n=this.element.opacity;if(e.length*t.length==0)return O.defaultValue;let r,i,o;return r=e.style.left?parseFloat(window.getComputedStyle(e).left)/e.parentElement.clientWidth:0,i=e.style.top?1-parseFloat(window.getComputedStyle(e).top)/e.parentElement.clientHeight:1,o=t.style.top?1-parseFloat(window.getComputedStyle(t).top)/t.parentElement.clientHeight:0,n&&n.value?"#"+O.funHslToHex(r,i,o,n.value/100):"#"+O.funHslToHex(r,i,o)}});const e=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value");Object.defineProperty(O.prototype,"value",{...e,set(t){let n=t,r=this.value;if("string"==typeof t){if(/^[a-z]{3,}$/.test(n)&&(document.head.style.backgroundColor=n,n=window.getComputedStyle(document.head).backgroundColor,document.head.style.backgroundColor=""),n=O.funRgbToHex(n),e.set.call(this,n),!this.params)return;let r=(localStorage.commonColors||"").split(",");if(0==this.params.color.fixed.some(e=>O.funRgbToHex(e)==n)){(r=r.filter(e=>e&&e!=n.replace("#",""))).unshift(n.replace("#","")),localStorage.commonColors=r.join();const e=this.element.basic;if(e){const i=(t=e.querySelectorAll("aside a"))[t.length-2],o=t[t.length-1];i.setAttribute("data-color",r[0]),i.setAttribute("aria-label",r[0]),i.style[_]=n,t=r[1]||"0ff",o.setAttribute("data-color",t),o.setAttribute("aria-label",t),o.style[_]="#"+t}}this.style.setProperty("--ui-color-opacity",n),this.element.target.style.setProperty("--ui-color-opacity",n),this.element.field&&(this.element.field.value=n.replace("#","")),this.isTrustedEvent?(this.match(!1),this.isTrustedEvent=null):this.match()}else r||(r=O.defaultValue,e.set.call(this,r));r&&n!=r&&(this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this.dispatchEvent(new CustomEvent("input",{bubbles:!0})))}}),this.title||(this.title=(this.disabled?"禁止":"")+"颜色选择")}attributeChangedCallback(e){"disabled"==e&&("颜色选择"==this.title&&this.disabled?this.title="禁止颜色选择":"禁止颜色选择"!=this.title||this.disabled||(this.title="颜色选择"))}connectedCallback(){this.id||(this.id="lulu_"+(Math.random()+"").split(".")[1]),this.addEventListener("click",e=>{e.preventDefault(),1!=this.display&&this.show()}),this.dataset.position||(this.dataset.position="7-5");const e=document.createElement("div"),t=(e.classList.add(O.addClass("container")),e.id=("lulu_"+Math.random()).replace("0.",""),this.dataset.target=e.id,this.element={target:e},"color-opacity"===this.getAttribute("type")&&(this.style.setProperty("--ui-color-opacity",this.value),e.style.setProperty("--ui-color-opacity",this.value)),["0","3","6","9","c","f"]);var n=t.concat("eb4646","1cad70","2a80eb","f59b00");this.params=this.params||{},this.params.color={basic:t,basicPreset:["2a80eb","0057c3","7fdbff","f7f9fa","1cad70","3d9970","39cccc","dddddd","eb4646","ab2526","ef8a5e","a2a9b6","f59b00","de6d00","ffdc00","4c5161"],fixed:n},document.addEventListener("click",t=>{(t=t&&t.target)&&this.display&&t!=this&&0==e.contains(t)&&this.hide()}),window.addEventListener("resize",()=>{this.display&&this.position()}),this.dispatchEvent(new CustomEvent("connected",{detail:{type:"ui-color"}})),this.isConnectedCallback=!0}}O.defaultValue="#000000",customElements.get("ui-color")||customElements.define("ui-color",O,{extends:"input"});var T=(()=>{const e="dialog",t={add:(...e)=>"ui-dialog-"+e.join("-"),toString:t=>"ui-"+(t||e)};function n(e){this.element={dialog:e},e.hasAttribute("role")||e.setAttribute("role","dialog"),e.show=this.show.bind(this),e.showModal=this.showModal.bind(this),e.close=this.close.bind(this),e.zIndex=this.zIndex.bind(this),Object.defineProperty(e,"open",{set:this.setOpen.bind(this),get:e.hasAttribute.bind(e,"open")})}n.prototype={get dialog(){return this.element.dialog},show(){this.setOpen(!0),this.zIndex()},showModal(){this.setOpen(!0)},close(){this.setOpen(!1),this.dialog.dispatchEvent(new CustomEvent("close",{bubbles:!1,cancelable:!1}))},setOpen(e){e?this.dialog.setAttribute("open",""):this.dialog.removeAttribute("open")},zIndex(){var e=this.dialog,t=(t=(this.matches&&this.matches("dialog")&&(e=this),window.getComputedStyle(e))).zIndex;let n=19;[...document.body.children].forEach((function(t){var r=window.getComputedStyle(t),i=+r.zIndex;i&&e!==t&&"none"!==r.display&&(n=Math.max(1+i,n))})),n!==t&&(e.style.zIndex=n)}};const r=function(r){if(!r.hide||!r.button){if("open"in document.createElement("dialog")==0&&new n(r),"ui-dialog"==r.getAttribute("is")){Object.defineProperties(r,{open:{get(){return this.hasAttribute("open")},set(e){this.toggleAttribute("open",e)}},setParams:{value:function(e){return Object.assign(this.params,e||{}),"function"==typeof e.onShow&&this.addEventListener("show",(function(t){e.onShow.call(this,t)})),"function"==typeof e.onHide&&this.addEventListener("hide",(function(t){e.onHide.call(this,t)})),"function"==typeof e.onRemove&&this.addEventListener("remove",(function(t){e.onRemove.call(this,t)})),this.params}},button:{value:function(){const e=this.params,n=this.element;n.footer.innerHTML="";for(const e in n)/^button/.test(e)&&delete n[e];return e.buttons.forEach((function(e,r){let i=(e=e||{type:"normal"}).type,o=e.value,a=("remind"===i||!i&&0===r?i="primary":i||1!==r||(i="normal"),o=o||["确定","取消"][r],document.createElement("button"));e.for?(a=document.createElement("label")).setAttribute("for",e.for):e.form&&(a.setAttribute("form",e.form),a.type="submit"),e.className&&(a.className=e.className),a.classList.add(t.toString("button")),i&&a.setAttribute("data-type",i),a.disabled=Boolean(e.disabled),a.innerHTML=o,n.footer.appendChild(a),n["button"+r]=a})),e.buttons.forEach((e,t)=>{e=e||{};const r=n["button"+t];if(r&&!e.for&&!e.form){let t=e.events||{click:()=>{this[this.closeMode]()}};for(const e in t="function"==typeof t?{click:t}:t)r.addEventListener(e,n=>{n.dialog=this,t[e](n)});r.addEventListener("focus",(function(){window.isKeyEvent?this.style.outline="":this.style.outline="none"}))}}),this}},events:{value:function(){var n=this.element;this.addEventListener("animationend",(function(n){n.target.tagName.toLowerCase()===e&&this.classList.remove(t.add("animation"))}));const r=n.close;return r&&r.addEventListener("click",()=>{const e=document.activeElement;var t=e.getAttribute("data-target");let n=null;t&&(n=document.getElementById(t)),window.isKeyEvent&&n&&e!==r&&document.querySelector('a[data-target="'+t+'"],input[data-target="'+t+'"],button[data-target="'+t+'"]')&&0<n.clientWidth||this[this.closeMode]()}),this.dispatchEvent(new CustomEvent("DOMContentLoaded")),this}},alert:{value:function(e,n){if(e){let r=e;e={title:"",type:"remind",buttons:[{}]};const i={...e,...n};return"error"===i.type||"fail"===i.type?i.type="danger":"primary"===i.type&&(i.type="remind"),i.buttons.length&&!i.buttons[0].type&&(i.buttons[0].type=i.type,!1===/^remind|success|warning|danger$/.test(i.type)&&(i.buttons[0].type=e.type)),1==(n=(new DOMParser).parseFromString(r,"text/html").body.childNodes).length?3===n[0].nodeType&&(r='<p class="'+t.add("wrap")+'">'+r+"</p>"):r='<div class="'+t.add("wrap")+'">'+r+"</div>",r='<div class="'+t.add(i.type)+" "+t.add("alert")+'">'+r+"</div>",this.setParams({width:"auto",title:i.title,buttons:i.buttons,content:r}),this.type="alert",this.showModal(),this}}},confirm:{value:function(e,n){if(e){let r=e;e={title:"",type:"danger",buttons:[{},{}]};const i={...e,...n};return"error"!==i.type&&"fail"!==i.type||(i.type="danger"),"primary"===i.type&&(i.type="remind"),i.buttons.length&&!i.buttons[0].type&&(i.buttons[0].type=i.type,!1===/^remind|success|warning|danger$/.test(i.type)&&(i.buttons[0].type=e.type)),1==(n=(new DOMParser).parseFromString(r,"text/html").body.childNodes).length?3===n[0].nodeType&&(r='<p class="'+t.add("wrap")+'">'+r+"</p>"):r='<div class="'+t.add("wrap")+'">'+r+"</div>",r='<div class="'+t.add(i.type)+" "+t.add("confirm")+'">'+r+"</div>",this.setParams({width:"auto",title:i.title,buttons:i.buttons,content:r}),this.type="confirm",this.showModal(),this}}},loading:{value:function(){const e=this.element;return this.params.content='<ui-loading rows="10" size="3"></ui-loading>',e.dialog.classList.add(t.add("loading")),this.showModal(),this}},content:{get(){return this.params.content},set(e){if(e!=this.params.content)this.params.content=e;else{let r=this.element.body;if(this.element.dialog.classList.remove(t.add("loading")),"function"==typeof e)e=e();else if("string"==typeof e&&/^#?\w+(?:[-_]\w+)*$/i.test(e)){let t=document.querySelector(e);t&&(e=t.matches("textarea")?t.value:t.matches("script")?t.innerHTML:t)}if(this.closeMode="string"==typeof e?"remove":"hide","hide"==this.closeMode&&r.innerHTML){let e=document.createElement("div");e.setAttribute("hidden",""),r.childNodes.forEach(t=>{e.appendChild(t)}),document.body.appendChild(e)}if(r.innerHTML="","remove"==this.closeMode)r.innerHTML=e;else{let t=e.parentElement;var n=t&&t.matches("div[hidden]");r.appendChild(e),n&&""===t.innerHTML.trim()&&t.remove(),1===e.nodeType&&"none"==getComputedStyle(e).display&&(e.removeAttribute("hidden"),e.style.display="","none"==getComputedStyle(e).display&&(e.style.display="revert"))}}}},scrollbar:{value:function(){var e=document.querySelectorAll('dialog[is="ui-dialog"]'),t=(e=[].slice.call(e).some((function(e){return"none"!==window.getComputedStyle(e).display})),document.documentElement.style.overflow="",document.body.style.borderRight="",window.innerWidth-document.documentElement.clientWidth);return e&&(document.documentElement.style.overflow="hidden",document.body.style.borderRight=t+"px solid transparent"),this}},show:{value:function(){return this.open||(this.classList.add(t.add("animation")),"function"==typeof HTMLDialogElement&&HTMLDialogElement.prototype.show.call(this)),this.zIndex||(this.zIndex=n.prototype.zIndex.bind(this)),this.zIndex&&this.zIndex(),this.dispatchEvent(new CustomEvent("show",{detail:{type:"ui-dialog"}})),this}},hide:{value:function(){return this.close(),this.dispatchEvent(new CustomEvent("hide",{detail:{type:"ui-dialog"}})),this}},remove:{value:function(){return this.open=!1,this.parentElement.removeChild(this),this.dispatchEvent(new CustomEvent("remove",{detail:{type:"ui-dialog"}})),this}}}),r.removeAttribute=function(e){"open"==e?r.hide():HTMLElement.prototype.removeAttribute.call(this,e)},r.setAttribute=function(e,t){"open"==e?r.toggleAttribute("open",!0):HTMLElement.prototype.setAttribute.call(this,e,t)},r.toggleAttribute=function(e,t){"open"==e?(void 0!==t?t:!r.open)?this.hasAttribute("modal")?this.showModal():this.show():this.hide():HTMLElement.prototype.toggleAttribute.call(this,e,t)},r.params=new Proxy(r.params||{},{get:(e,t)=>e[t],set(e,n,i){if(!r.element)return!1;if(e[n]=i,"title"==n&&r.element.title)r.element.title.innerHTML=i;else if("content"==n)r.content=i;else if("buttons"==n)r.button();else if("closable"==n&&r.element.close)r.element.close.style.display=i?"":"none";else if(r.element.dialog&&("width"==n||"height"==n)){let e=r.element.dialog;e.classList.remove(t.add("stretch")),""!==i&&Number(i)==i?e.style[n]=i+"px":"height"==n&&"stretch"==i?e.classList.add(t.add(i)):("auto"==i&&(i=""),e.style[n]=i)}return!0}});const s=r,u=(s.classList.add(t),document.createElement("h4"));u.classList.add(t.add("title")),u.innerHTML=r.title,r.removeAttribute("title");var i=("lulu_"+Math.random()).replace("0.","");const c=document.createElement("button"),l=(c.textContent="关闭",c.classList.add(t.add("close"),"ESC"),c.id=i,c.setAttribute("data-target",i),document.createElement("div")),h=(l.classList.add(t.add("body")),document.createElement("div"));h.classList.add(t.add("footer")),r.element=Object.assign(r.element||{},{dialog:s,close:c,title:u,body:l,footer:h});var o=((i=[...r.childNodes].filter(e=>1==e.nodeType||3==e.nodeType)).length?(s.prepend(c),u.innerHTML&&s.prepend(u)):s.append(c,u,l,h),r.dataset.params||r.getAttribute("params"));if(o&&/{/.test(o))try{var a=new Function("return "+o)();i.length&&(a.buttons&&s.append(h),a.title&&!s.contains(u)&&s.prepend(u)),r.setParams(a)}catch(i){}new MutationObserver((function(e){e.forEach(e=>{let t=e.target;"attributes"==e.type&&t.scrollbar()})})).observe(r,{attributes:!0,attributeFilter:["open"]}),r.closeMode="hide",r.events()}r.dispatchEvent(new CustomEvent("connected",{detail:{type:"ui-dialog"}})),r.setAttribute("defined",""),r.isConnectedCallback=!0}};function i(){document.querySelectorAll("dialog").forEach(e=>{r(e)}),new MutationObserver((function(e){e.forEach((function(e){e.addedNodes.forEach((function(e){e.matches&&e.matches("dialog")?r(e):e.querySelector&&e.querySelectorAll("dialog").forEach(e=>{r(e)})}))}))})).observe(document.body,{childList:!0,subtree:!0})}return"loading"!=document.readyState?i():window.addEventListener("DOMContentLoaded",i),class{constructor(t={}){const n={title:"",content:"",width:"auto",height:"auto",buttons:[],closable:!0,onShow:function(){},onHide:function(){},onRemove:function(){},...t},i=document.createElement(e),o=(i.setAttribute("is","ui-dialog"),i.addEventListener("DOMContentLoaded",()=>{'"{}"'!=JSON.stringify(t)&&i.setParams({...n}),i.hasAttribute("modal")?i.showModal():i.show()}),document.querySelector("body > "+e));return o?o.insertAdjacentElement("beforebegin",i):document.body.appendChild(i),r(i),i}}})(),D=(window.Dialog=T,(()=>{const e="datalist",t="selected",n="disabled",r={add:t=>["ui",e].concat([t]).join("-"),toString:()=>"ui-"+e};let i={end:"mouseup"};"ontouchstart"in document&&(i={end:"touchend"});class o extends HTMLInputElement{constructor(){super(),this.params||(this.params={}),this.element||(this.element={})}static stripHTML(e){return"string"==typeof e?e.replace(/<\/?[^<>]*>/g,"").replace(/<\/?[^<>]*>/g,""):""}static encodeHTML(e){return"string"==typeof e?e.replace(/<|&|>/g,(function(e){return{"<":"&lt;",">":"&gt;","&":"&amp;"}[e]})):""}static decodeHTML(e){return"string"==typeof e?e.replace(/&lt;|&gt;|&amp;/gi,e=>({"&lt;":"<","&gt;":">","&amp;":"&"}[e.toLowerCase()])):""}setParams(e){Object.assign(this.params,e||{})}convertData(t){if(this.params.data=t||this.params.data,"auto"==this.params.data){let t=this.getAttribute("list");if(t){let e=document.getElementById(t);e?(this.removeAttribute("list"),this.params.data=function(){return[].slice.call(e.querySelectorAll("option")).map((function(e){let t={};return[].slice.call(e.attributes).forEach((function(e){t[e.name]=e.value})),t.value=t.value||"",e.hasAttribute("value")||(t.value=e.textContent||""),t.label=t.label||"",t}))}):setTimeout(()=>{document.getElementById(t)&&this.convertData()},1)}else!this.name||""!==this.autocomplete&&"on"!=this.autocomplete?this.params.data=function(){return[]}:(this.params.twice=!0,this.params.placeholder=!1,this.params.data=()=>{let t=[],n=localStorage[e+"-"+this.name];return n&&n.split(",").forEach((function(e){e&&e.trim()&&t.push({label:"",value:e})})),t})}else if(this.params.data instanceof Array){let e=this.params.data;this.params.data=function(){return e}}else if("function"!=typeof this.params.data&&"object"==typeof this.params.data&&this.params.data.url){let e=null,t={...this.params.data};this.params.data=()=>{clearTimeout(e);var n=t.name||this.name||"k";let r=this.value.trim();if(""==r)return this.datalist=[],[];let i=new URLSearchParams(t.data),a=(i.append(n,r),t.url.split("#")[0]);a=1<a.split("?").length?a+"&"+i.toString():a+"?"+i.toString(),e=setTimeout(async()=>{const e=await fetch(a);this.setAttribute("aria-busy","true");var n=await e.json();if(this.removeAttribute("aria-busy"),n&&n.data){let e=n.data;this.params.encode&&e.map&&(e=e.map(e=>(e.value&&(e.value=o.encodeHTML(e.value)),e))),this.refresh(this.params.filter.call(this,e,r)),t.success&&t.success(n)}else t.error&&t.error(n)},200)},this.params.placeholder=!1,this.dataset.edgeAdjust||(this.dataset.edgeAdjust="false")}}store(){var t=this.val(),n=this.name;if(t&&n){let i=(localStorage[e+"-"+n]||"").split(",");var r=i.indexOf(t);-1==r?i.unshift(t):0!=r&&(t=i.splice(r,1),i=[t,...i]),localStorage[e+"-"+n]=i.join()}return this}removeStore(t){var n=this.name;if((t=t||this.val())&&n)if(!0===t)localStorage.removeItem(e+"-"+n);else if("string"==typeof t){let r=(localStorage[e+"-"+n]||"").split(",");-1!=(t=r.indexOf(t))&&(r.splice(t,1),localStorage[e+"-"+n]=r.join())}return this}refresh(i){let a=this.element.target;a||(this.create(),a=this.element.target);const s=this.val();let u=i;if(void 0===u){if("function"!=typeof this.params.data&&this.convertData(),"function"!=typeof this.params.data)return this;if(!(u=this.params.data()))return this;if(this.params.encode&&u.map&&(u=u.map(e=>(e.value&&(e.value=o.encodeHTML(e.value)),e))),(u=this.params.filter.call(this,u,s))instanceof Array==0)return this}i=this.getAttribute("results");var c=Number(i);i&&(u=u.slice(0,c)),this.datalist=u;let l="";if(u&&u.length){this.params.index=-1;const e=this.getAttribute("placeholder"),i=this.params.placeholder;u.forEach((a,u)=>{var c=a.value||"",h=o.stripHTML(c).trim().replace(/\n/g,""),f=o.stripHTML(a.label||"").trim().replace(/\n/g,"");let d="";(s&&h==s||!s&&h==e&&h!=i)&&(d=" "+t,this.params.index=u),!a[n]&&"string"!=typeof a[n]||(d=" "+n),l=a.label?`${l}<li class="${r.add("option")}${d}" data-value="${h}" label="${f}" data-index="${u}"><label class="${r.add("label")}">${a.label}</label><span class="${r.add("value")}">${c}</span></li>`:`${l}<li class="${r.add("option")}${d}" data-value="${h}" data-index="${u}"><span class="${r.add("value")}">${c}</span></li>`})}""!=l&&(l=`<ul class="${r.add(e)}">${l}</ul>`),a.innerHTML=l;const h=a.querySelector("."+t);1==this.display&&h&&((i=h.offsetTop-(a.lastScrollTop||0))<0||i>=h.parentElement.clientHeight?(h.parentElement.scrollTop=h.offsetTop,a.lastScrollTop=h.offsetTop):h.parentElement.scrollTop=a.lastScrollTop||0),l?(0==this.display&&this.show(),this.position()):1==this.display&&this.hide()}create(){if(!this.element.target){var e;this.element.datalist&&this.element.datalist.id||(e=("lulu_"+Math.random()).replace("0.",""),this.setAttribute("data-target",e));const t=document.createElement("div");t.classList.add(r),t.addEventListener("click",e=>{if((e=e.touches&&e.touches.length?e.touches[0]:e).target){const t=e.target.closest("li");t&&0==t.classList.contains(n)&&(e=t.getAttribute("data-index"),this.params.index=Number(e),this.val(this.datalist[this.params.index]),this.hide(),this.dispatchEvent(new CustomEvent("select",{detail:this.datalist[this.params.index]})))}}),this.id&&t.classList.add(r.add(this.id.replace(/[A-Z]/g,e=>"-"+e.toLowerCase()).replace(/^-+|-+$/g,""))),document.body.appendChild(t),this.element.target=t,this.display=!1,this.dispatchEvent(new CustomEvent("DOMContentLoaded"))}return this}val(e={}){const t=e.value;if(void 0===t)return o.encodeHTML(this.value.trim());const n=t.toString();return this.value=o.decodeHTML(o.stripHTML(n.trim())),n!=this.oldValue&&(this.dispatchEvent(new CustomEvent("change",{bubbles:!0,detail:{...e}})),this.dispatchEvent(new CustomEvent("input",{bubbles:!0,detail:{...e}}))),this.oldValue=n,this}events(){return document.activeElement!=this&&(this.isFocus=!1),this.addEventListener("blur",(function(){this.isFocus=!1})),this.addEventListener("focus",(function(){window.isKeyEvent&&this.click()})),this.addEventListener("click",()=>{0==this.display&&(!0===this.params.placeholder&&(this.focusValue=this.value.trim(),this.focusValue&&this.setAttribute("placeholder",this.focusValue),this.value=""),(1!=this.params.twice||1!=this.isFocus)&&this.params.twice||this.refresh()),this.isFocus=!0}),this.addEventListener("input",e=>{!1!==e.isTrusted&&(1==this.params.placeholder||this.value.trim()?this.refresh():this.hide())}),this.addEventListener("keydown",e=>{let r=this.datalist,i=this.params.index;const o=this.element.target;if(o){const s=o.querySelector("."+t);switch(e.code){case"Escape":case"Enter":1==this.display&&(this.hide(),e.preventDefault(),s&&(s.click(),e.preventDefault(),setTimeout((function(){if(this.setSelectionRange)try{this.setSelectionRange(this.value.length,this.value.length)}catch(e){this.value=this.value}else this.value=this.value;this.dispatchEvent(new CustomEvent("input",{bubbles:!0,detail:r[i]}))}),17)));break;case"ArrowUp":case"ArrowDown":if(1==this.display&&r&&r.length){e.preventDefault();const t=[];if(r.forEach((e,r)=>{e[n]||""===e[n]||t.push(r)}),0==t.length)return;let o=t.indexOf(i);"ArrowUp"==e.code?o--:o++,i=o<0?t[t.length-1]:o>t.length-1?t[0]:t[o]}r[i]&&(a=r[i],this.val(a)),this.select(),this.refresh(r);break;case"Delete":if(1==this.display&&1==this.params.twice&&s){let t=s.getAttribute("data-value");this.removeStore(t),r=r.filter(e=>e.value!=t),e.preventDefault();var a=r[i]||r[i-1];a?(this.val(a.value),this.refresh(r)):(this.value="",this.hide())}}}}),this.form&&"auto"==this.params.data&&this.name&&(""==this.autocomplete||"on"==this.autocomplete)&&this.form.addEventListener("submit",()=>{this.store()}),document.addEventListener(i.end,e=>{e=(e=e.touches&&e.touches.length?e.touches[0]:e).target;const t=this.element.target;t&&1==e.nodeType&&0==t.contains(e)&&this.hide(),e!=this&&""==this.value.trim()&&(this.focusValue?this.value=this.focusValue:"string"==typeof this.params.placeholder&&"auto"!==this.params.placeholder&&this.setAttribute("placeholder",this.params.placeholder))}),window.addEventListener("resize",()=>{1==this.display&&this.position()}),this}position(){var e=this.element.target;return this&&e&&(this.follow(e),1==this.display&&this.classList.add("active")),this}show(){let e=this.element.target;e||(this.create(),e=this.element.target);var t=this.display;let n=this.params.width;var r=this.getBoundingClientRect().width||this.clientWidth;"auto"==n?n=r:"function"==typeof n&&(n=n.call(this,e)),"auto"!=n&&"number"!=typeof n&&(n=r),e.style.display="block",e.style.width=n+"px","number"==typeof e.lastScrollTop&&e.querySelector("ul")&&(e.querySelector("ul").scrollTop=e.lastScrollTop),this.display=!0,this.position(),0==t&&this.dispatchEvent(new CustomEvent("show",{detail:{type:"ui-datalist"}}))}hide(){const e=this.element.target;e&&1==this.display&&(e.querySelector("ul")&&(e.lastScrollTop=e.querySelector("ul").scrollTop),e.style.display="none",e.classList.remove("reverse"),this.dispatchEvent(new CustomEvent("hide",{detail:{type:"ui-datalist"}}))),this.classList.remove("active"),this.classList.remove("reverse"),this.display=!1}connectedCallback(){this.params=Object.assign(this.params,{filter(e,t){const n=[];return e&&e.forEach&&e.forEach((function(e){t&&0!=e.value.indexOf(t)||n.push(e)})),n},encode:!0,index:-1,data:"auto",placeholder:"auto",width:"auto"});var e=this.getAttribute("placeholder");e&&(this.params.placeholder=e),this.display=!1,"auto"==this.params.placeholder&&(this.params.placeholder=!0),this.events(),this.convertData(),this.form?this.setAttribute("autocomplete","off"):this.setAttribute("autocomplete","new-password"),this.dispatchEvent(new CustomEvent("connected",{detail:{type:"ui-datalist"}})),this.isConnectedCallback=!0}}return o})());customElements.get("ui-datalist")||customElements.define("ui-datalist",D,{extends:"input"}),D=(()=>{const e={toString:()=>"ui-datetime"},t=(["date","range","day","year","month","hour","minute","time","datetime"].forEach(t=>{e[t]=(...e)=>["ui",t,...e].join("-")}),"selected"),n=/-|\//g;String.prototype.toDate=function(){var e=+(r=this.replace(/年|月|日/g,"-").split(n))[0],t=r[1]||1,r=r[2]||1;return e?new Date(e,t-1,r):new Date},String.prototype.toTime=function(){let e=this.trim().split(":").map((e,t)=>!e||/\D/.test(e)?"":e<0?"00":(0===t?23<e&&(e="23"):59<e&&(e="59"),e.padStart(2,"0"))).filter(e=>e).slice(0,3);return 1==e.length&&e.push("00"),e},Date.prototype.toArray=function(){var e=this.getFullYear();let t=this.getMonth()+1,n=this.getDate();return t<10&&(t="0"+t),n<10&&(n="0"+n),[e,t,n]};class r extends HTMLInputElement{constructor(){super()}minMaxConvert(e){"number"==typeof e&&Number.isInteger(e)&&(1e7<e?e=new Date(e):e<9999&&(e=String(e)));let t=[],n=[];if(e.toArray)t=e.toArray(),n=(e.getHours()+":"+e.getMinutes()).toTime();else if(e&&"string"==typeof e){const r=e.split(/\s+|T/);t=r[0].toDate().toArray(),r[1]&&r[1].includes(":")&&(n=r[1].toTime())}var r=this.getAttribute("type")||"date";if("date"==r||"date-range"==r)e=t.join("-");else if("year"==r)e=t[0];else if("month"==r||"month-range"==r)e=t.slice(0,2).join("-");else if(/^datetime/.test(r))e=t.join("-")+" "+n.join(":");else{let t=(e=e.toArray?e.getHours()+":"+e.getMinutes():e).toTime();if(!t[0])return"";e=t.join(":")}return e}get min(){var e=this.getAttribute("min")||"";return e&&this.minMaxConvert(e).toString()}set min(e){e?this.setAttribute("min",this.minMaxConvert(e)):this.removeAttribute("min")}get max(){var e=this.getAttribute("max")||"";return e&&this.minMaxConvert(e).toString()}set max(e){e?this.setAttribute("max",this.minMaxConvert(e)):this.removeAttribute("max")}get step(){var e=this.getAttribute("step"),t=this.params.type;let n=Number(e);return e&&/^\d+$/.test(e)?("time"==t?60<e?(e%60!=0||30<e/60)&&(n=1):30<n&&(n=1):"hour"==t?12<n&&(n=1):"minute"==t&&30<n&&(n=1),n):""}set step(e){e?this.setAttribute("step",e):this.removeAttribute("step")}events(){const e=this.element.target;return e.addEventListener("click",n=>{if(1==n.target.nodeType&&n.target.closest){const u=n.target.closest("a, button");if(u){let n,c=0,l=0,h=0,f=0,d=[],p="";switch(e.dataset.type){case"date":if(/prev|next/.test(u.className)){l=u.dataset.month,this[t][1]=+l;const n=this.getMonthDay(this[t]);var r=l-1<0?n[11]:l>n.length?n[0]:n[l-1],i=(f=this[t][2],e.dataDayOverflow);i?this[t][2]=Math.min(i,r):this[t][2]>r&&(this[t][2]=r,e.dataDayOverflow=f),this[t]=this[t].join("-").toDate().toArray(),this.date(),e.querySelector(`.${t}[href]`)&&this.setValue()}else/item/.test(u.className)?(f=u.innerHTML,/\D/.test(f)?this[t]=(new Date).toArray():(f<10&&(f="0"+f),this[t][2]=f),this.setValue(),this.hide(),delete e.dataDayOverflow):"month"==u.dataset.type&&this.month();break;case"date-range":/prev|next/.test(u.className)?(l=+u.dataset.month,d=e.dataDate||this[t][0],e.dataDate=new Date(d[0],l-1,1).toArray(),this["date-range"]()):/item/.test(u.className)?(c=u.dataset.year,l=u.dataset.month,f=u.innerHTML,l<10&&(l="0"+l),f<10&&(f="0"+f),(n=this[t])[0].join()==n[1].join()?c+l+f>n[0].join("")?n[1]=[c,l,f]:n[0]=[c,l,f]:n=[[c,l,f],[c,l,f]],this[t]=n,this["date-range"]()):/button/.test(u.className)&&("primary"==(p=u.dataset.type)?(this.setValue(),this.dataRangeSelected=this[t],this.hide()):"normal"==p&&(this.dataRangeSelected&&(this[t]=this.dataRangeSelected),this.hide()));break;case"month-range":/prev|next/.test(u.className)?(c=+u.dataset.year,d=e.dataDate||this[t][0],e.dataDate=new Date(c,d[1],1).toArray(),this["month-range"]()):/item/.test(u.className)?(c=u.dataset.year,l=u.dataset.value,f="01",(n=this[t])[0].join()==n[1].join()?c+l+f>n[0].join("")?n[1]=[c,l,f]:n[0]=[c,l,f]:n=[[c,l,f],[c,l,f]],this[t]=n,this["month-range"]()):/button/.test(u.className)&&("primary"==(p=u.dataset.type)?(this.setValue(),this.dataRangeSelected=this[t],this.hide()):"normal"==p&&(this.dataRangeSelected&&(this[t]=this.dataRangeSelected),this.hide()));break;case"month":/prev|next/.test(u.className)?(c=u.dataset.year,this[t][0]=+c,this.month(),e.querySelector(`.${t}[href]`)&&this.setValue()):/item/.test(u.className)?((i=u.dataset.value)?this[t][1]=i:(r=(new Date).toArray(),this[t][0]=r[0],this[t][1]=r[1]),this[t][2]>(o=this.getMonthDay(this[t]))[this[t][1]-1]&&(this[t][2]=o[this[t][1]-1]),this.setValue(),"month"==this.params.type?this.hide():this.date()):"year"==u.dataset.type&&this.year();break;case"year":/prev|next/.test(u.className)?(c=u.dataset.year,this[t][0]=+c,this.year(),e.querySelector(`.${t}[href]`)&&this.setValue()):/item/.test(u.className)&&("今年"==u.innerHTML?this[t][0]=(new Date).getFullYear():this[t][0]=+u.innerHTML,this.setValue(),"year"==this.params.type?this.hide():this.month());break;case"time":if("BUTTON"==u.tagName&&0==u.classList.contains(t)){i=u.parentElement.dataset.type;let e=u.dataset.index;"ampm"==i?("0"==e?this[t][0]-=12:this[t][0]=Number(this[t][0])+12,this[t][0]=String(this[t][0]).padStart(2,"0")):"hour"==i?this[t][0]=e.padStart(2,"0"):"minute"==i?this[t][1]=e.padStart(2,"0"):"second"==i&&(this[t][2]=e.padStart(2,"0")),this.setValue(),this.time()}break;case"minute":/prev|next/.test(u.className)?(1==(h=u.getAttribute("data-hour")).length&&(h="0"+h),this[t][0]=h,this.minute(),e.querySelector(`.${t}[href]`)&&this.setValue()):/item/.test(u.className)?(this[t]=u.innerHTML.split(":"),this.setValue(),this.hide()):"hour"==u.dataset.type&&this.hour();break;case"hour":/item/.test(u.className)&&(this[t][0]=u.innerHTML.split(":")[0],this.setValue(),"hour"==this.params.type?this.hide():this.minute());break;case"datetime":{r=this[t],i=u.closest('[data-type="date"]');const n=u.closest('[data-type="month"]'),h=u.closest('[data-type="year"]');var o,a=e.querySelector('[data-type="time"]');if(i){const n=r[0];if(/prev|next/.test(u.className)){l=u.dataset.month,n[1]=+l;const o=this.getMonthDay(this[t]);r=l-1<0?o[11]:l>o.length?o[0]:o[l-1];var s=(f=n[2],e.dataDayOverflow);s?n[2]=Math.min(s,r):n[2]>r&&(n[2]=r,e.dataDayOverflow=f),this[t][0]=n.join("-").toDate().toArray(),this.date(i),this.time(a),e.querySelector(`[data-type="date"] .${t}[href]`)&&this.setValue()}else/item/.test(u.className)?(f=u.innerHTML,/\D/.test(f)?this[t][0]=(new Date).toArray():(f<10&&(f="0"+f),this[t][0][2]=f),this.setValue(),this.date(i),this.time(a),delete e.dataDayOverflow):"month"==u.dataset.type&&this.month(i)}else if(n)/prev|next/.test(u.className)?(c=u.dataset.year,this[t][0][0]=+c,this.month(n),this.time(a),n.querySelector(`.${t}[href]`)&&this.setValue()):/item/.test(u.className)?((o=u.dataset.value)?this[t][0][1]=o:(s=(new Date).toArray(),this[t][0][0]=s[0],this[t][0][1]=s[1]),this.setValue(),this.date(n),this.time(a)):"year"==u.dataset.type&&this.year(n);else if(h)/prev|next/.test(u.className)?(c=u.dataset.year,this[t][0][0]=+c,this.year(h),this.time(a),h.querySelector(`.${t}[href]`)&&this.setValue()):/item/.test(u.className)&&("今年"==u.innerHTML?this[t][0][0]=(new Date).getFullYear():this[t][0][0]=+u.innerHTML,this.setValue(),this.month(h),this.time(a));else if("BUTTON"==u.tagName&&0==u.classList.contains(t)){const e=this[t][1];r=u.parentElement.dataset.type;let n=u.dataset.index;"ampm"==r?("0"==n?e[0]-=12:e[0]=Number(e[0])+12,e[0]=String(e[0]).padStart(2,"0")):"hour"==r?e[0]=n.padStart(2,"0"):"minute"==r?e[1]=n.padStart(2,"0"):"second"==r&&(e[2]=n.padStart(2,"0")),this[t][1]=e,this.setValue(),this.time(a)}}}}}}),this.addEventListener("click",e=>{e.preventDefault(),this.display?this.hide():this.show()}),this.addEventListener("keydown",e=>{"Enter"==e.code&&(e.preventDefault(),this.click())}),document.addEventListener("mouseup",t=>{(t=t.target)&&t!=this&&0==e.contains(t)&&this.display&&this.hide()}),document.addEventListener("keydown",n=>{const r=e.dataset.type;if(r&&r.includes("time")&&1==this.display&&e.contains(document.activeElement)){if(/^arrow/i.test(n.key)){n.preventDefault();let o=[...e.querySelectorAll("."+t)],a=(o=r.includes("datetime")?[...e.querySelectorAll('[data-type="time"] .'+t)]:o).findIndex(e=>e==n.target),s=[...n.target.parentElement.querySelectorAll('button:enabled:not([data-visibility="false"])')];var i=s.findIndex(e=>e==n.target);if("ArrowLeft"==n.key)a--,o[a]&&o[a].focus();else if("ArrowRight"==n.key)a++,o[a]&&o[a].focus();else if("ArrowUp"==n.key){let e=s[i-1];(e=e||s[s.length-1])&&(e.click(),e.focus())}else if("ArrowDown"==n.key){let e=s[i+1];(e=e||s[0])&&(e.click(),e.focus())}}"Enter"==n.key&&this.hide()}}),window.addEventListener("resize",()=>{this.display&&this.position()}),this}format(){var e=this.params.type;const n=this.value.trim();if(n)switch(e){case"date":case"year":case"month":var r=n.toDate().toArray();this[t]=r;break;case"time":case"hour":case"minute":1<(r=n.toTime()).length&&(this[t]=[...r]);break;case"datetime":case"datetime-local":{const e=n.split(/\s+|T/);r=e[0].toDate().toArray();let i=["00","00"];e[1]&&e[1].includes(":")&&(i=e[1].toTime()),this[t]=[r,i];break}case"date-range":case"month-range":{let e=new Date,r=new Date;const i=n.split(" ");3==i.length&&(e=i[0].toDate(),r=i[i.length-1].toDate(),this[t]=[e.toArray(),r.toArray()]);break}}return this}setValue(){const e=this[t];var n=this.value;switch(this.params.type){case"date":this.value=e.join("-");break;case"month":this.value=e.slice(0,2).join("-");break;case"year":this.value=e[0];break;case"date-range":this.value=e[0].join("-")+" 至 "+e[1].join("-");break;case"month-range":this.value=e[0].slice(0,2).join("-")+" 至 "+e[1].slice(0,2).join("-");break;case"time":case"minute":this.value=e.join(":");break;case"hour":this.value=e[0]+":00";break;case"datetime":case"datetime-local":this.value=e[0].join("-")+" "+e[1].join(":")}return this.value!=n&&this.dispatchEvent(new CustomEvent("change",{bubbles:!0})),this.value}getCalendarData(n){var r="";let i=this.min,o=this.max;const a=this.params.type;a.includes("datetime")&&(i=i&&i.split(/\s+/)[0],o=o&&this.max.split(/\s+/)[0]);let s=(i||"0001-01-01").toDate(),u=(o||"9999-00-01").toDate();const c=["日","一","二","三","四","五","六"],l=this.getMonthDay(n),h=n.join("-").toDate();r=`<div class="${e.day("x")}">${(()=>{let t="";return c.forEach((n,r)=>{t=`${t}<span class="${e.day("item")} col${r}">${n}</span>`}),t})()}</div>`;const f=n.join("-").toDate();let d=0,p=(f.setDate(1),2==f.getDate()&&f.setDate(0),d=f.getDay(),f.getMonth()-1);p<0&&(p=11);const m=`data-year="${n[0]}" data-month="${f.getMonth()+1}"`,g="data-date=";let A="";return r+=`<div class="${e.date("body")}">${(()=>{let r="",i="";for(let b=0;b<6;b++){r=`${r}<div class="${e.date("tr")}">`;for(let y=0;y<7;y++){i=e.date("item")+" col"+y;var o=n[0],c=f.getMonth()+1;let w,x;if("date"==a||a.includes("datetime"))r=0==b&&y<d?(w=l[p]-d+y+1,x=new Date(o,p,w),A=g+x.toArray().join("-"),`${r}<span class="${i}" ${A}>${w}</span>`):(w=7*b+y-d+1)<=l[f.getMonth()]?(x=new Date(o,f.getMonth(),w),A=g+x.toArray().join("-"),h.getDate()==w&&(i=i+" "+t),x>=s&&x<=u?`${r}<a href="javascript:;" ${m} class="${i}" ${A}>${w}</a>`:`${r}<span class="${i}" ${A}>${w}</span>`):(w-=l[f.getMonth()],A=g+new Date(o,c,w).toArray().join("-"),`${r}<span class="${i}" ${A}>${w}</span>`);else if("date-range"==a)if(0==b&&y<d)r=`${r}<span class="${i}"></span>`;else if((w=7*b+y-d+1)<=l[f.getMonth()]){x=new Date(o,f.getMonth(),w),A=g+x.toArray().join("-");const n=this[t][0].join("-").toDate(),a=this[t][1].join("-").toDate();c=x.getTime(),o=n.getTime();var v=a.getTime();o<=c&&c<=v&&(i=i+" "+t,c==o&&(i=i+" "+e.date("begin")),c==v&&(i=i+" "+e.date("end")),1==w?i=i+" "+e.date("first"):w==l[f.getMonth()]&&(i=i+" "+e.date("last"))),r=x>=s&&x<=u?`${r}<a href="javascript:;" ${m} class="${i}" ${A}>${w}</a>`:`${r}<span class="${i}" ${A}>${w}</span>`}else r=`${r}<span class="${i}"></span>`}r+="</div>"}return r})()}</div>`,{monthDay:l,html:r,min:s,max:u}}getMonthData(r){const i=this.params.type;let o=this.min,a=this.max,s=(i.includes("datetime")&&(o=o&&o.split(/\s+/)[0],a=a&&this.max.split(/\s+/)[0]),(o||"000000").replace(n,"").slice(0,6)),u=(a||"999912").replace(n,"").slice(0,6);const c=["一","二","三","四","五","六","七","八","九","十","十一","十二"],l=+r[0];return{html:`<div class="${e.month("body")}">${(()=>{let n="",o="",a="";for(let d=1;d<=12;d+=1){var h,f;a=d<10?"0"+d:""+d,o=e.date("item"),"month"==i||i.includes("datetime")?d==r[1]&&(o=o+" "+t):"month-range"==i&&(f=this[t][0].slice(0,2).join(""),h=this[t][1].slice(0,2).join(""),f<=(f=l+a)&&f<=h&&(o=o+" "+t)),n=l+a>=s&&l+a<=u?`${n}<a href="javascript:" class="${o}" data-year="${l}" data-value="${a}">${c[d-1]}月</a>`:`${n}<span class="${o}" data-value="${a}">${c[d-1]}月</span>`}return n})()}</div>`,min:s,max:u}}getMonthDay(e){let t=e;const n=[31,28,31,30,31,30,31,31,30,31,30,31];return((t="object"==typeof e||e.map?t:e.toArray())[0]%4==0&&t[0]%100!=0||t[0]%400==0)&&(n[1]=29),n}getDatePrevMonth(e){let t=e;e=+(t="object"==typeof e||e.map?t:e.toArray())[1];const n=this.getMonthDay(t);return(1==e?[t[0]-1,12,t[2]]:n[e-2]<t[2]?[t[0],e-1,n[e-2]]:[t[0],e-1,t[2]]).join("-").toDate()}getDateNextMonth(e){let t=e;e=+(t="object"==typeof e||e.map?t:e.toArray())[1];const n=this.getMonthDay(t);return(12==e?[t[0]+1,1,t[2]]:n[e]<t[2]?[t[0],1+e,n[e]]:[t[0],1+e,t[2]]).join("-").toDate()}date(n){const r=n||this.element.target;let i=this[t];n=(i=this.params.type.includes("datetime")?i[0]:i)[1]-1;var o=+i[1]+1,a=this.getCalendarData(i);let s=`<div class="${e.date("x")}">`;s=`${s}<div class="${e.date("head")}">`;const u=this.getDatePrevMonth(i);var c=u.getMonth(),l=u.getFullYear();s=(l=new Date(l,c,a.monthDay[c]))>=a.min?`${s}<a href="javascript:" class="${e.date("prev")}" data-month="${n}" role="button" aria-label="上一月"></a>`:`${s}<span class="${e.date("prev")}" aria-label="上一月"></span>`;const h=this.getDateNextMonth(i);return c=h.getMonth(),l=h.getFullYear(),s=`${s=new Date(l,c,1)<=a.max?`${s}<a href="javascript:" class="${e.date("next")}" data-month="${o}" role="button" aria-label="下一月"></a>`:`${s}<span class="${e.date("next")}" aria-label="下一月"></span>`}<a href="javascript:" class="${e.date("switch")}" data-type="month" role="button" aria-label="快速切换月份">${i.slice(0,2).join("-")}</a></div>`,s+=a.html,s=new Date>=a.min&&new Date<=a.max?`${s}<a href="javascript:" class="${e.date("item")} ${e.date("now")}" role="button">今天</a>`:`${s}<span class="${e.date("item")} ${e.date("now")}">今天</span>`,s+="</div>",r.dataset.type="date",r.innerHTML=s,this}"date-range"(n){const r=n||this.element.target;n=this[t],n=r.dataDate||n[0];var i=(r.dataDate=n)[1]-1,o=+n[1]+1,a=this.getCalendarData(n);let s=`<div class="${e.range("x")}">`;s=`${s}<div class="${e.date("head")}"><div class="${e.date("half")}">`;var u=new Date(n[0],i-1,a.monthDay[i]);s=`${s=u>=a.min?`${s}<a href="javascript:" class="${e.date("prev")}" data-month="${i}" aria-label="上一个月，当前${n[1]}月"></a>`:`${s}<span class="${e.date("prev")}"></span>`}<span class="${e.date("switch")}">${new Date(n[0],i,n[2]).toArray().slice(0,2).join("-")}</span></div><div class="${e.date("half")}">`;const c=new Date(n[0],n[1],1);return s=`${s=(u=new Date(n[0],o,n[2]))<=a.max?`${s}<a href="javascript:" class="${e.date("next")}" data-month="${o}" aria-label="下一个月，当前${o}月"></a>`:`${s}<span class="${e.date("next")}"></span>`}<span class="${e.date("switch")}">${c.toArray().slice(0,2).join("-")}</span></div>`,s=(s=(s+="</div>")+`<div class="${e.range("body")} ${e.range("date","body")}">            <div class="${e.date("half")}">${a.html}</div>            <div class="${e.date("half")}">${this.getCalendarData(c.toArray()).html}</div>            </div>`)+`<div class="${e.range("footer")}">            <button class="ui-button" data-type="primary">确定</button>            <button class="ui-button" data-type="normal">取消</button>            </div>`,s+="</div>",r.dataset.type="date-range",r.innerHTML=s,this}month(n){const r=n||this.element.target;let i=this[t];this.params.type.includes("datetime")&&(i=i[0]);var o=(n=this.getMonthData(i)).min,a=n.max;let s=`<div class="${e.month("x")}">`;var u=+i[0];s=`${s}<div class="${e.date("head")}">`,s=u-1>=Math.floor(o/100)&&u-1<=Math.floor(a/100)?`${s}<a href="javascript:" class="${e.date("prev")}" data-year="${u-1}" role="button" aria-label="上一年"></a>`:`${s}<span class="${e.date("prev")}" aria-label="上一年"></span>`,s=(s=1+u>=Math.floor(o/100)&&1+u<=Math.floor(a/100)?`${s}<a href="javascript:" class="${e.date("next")}" data-year="${1+u}" role="button" aria-label="下一年"></a>`:`${s}<span class="${e.date("next")}"></span>`)+`<a href="javascript:" class="${e.date("switch")}" data-type="year" role="button" title="快速切换年份" aria-label="快速切换年份">${u}</a>            </div>`,s+=n.html,u=(new Date).toArray().slice(0,2).join("");return s=o<=u&&u<=a?`${s}<a href="javascript:" class="${e.date("item")} ${e.date("now")}">今月</a>`:`${s}<span class="${e.date("item")} ${e.date("now")}">今月</span>`,s+="</div>",r.dataset.type="month",r.innerHTML=s,this}"month-range"(n){const r=n||this.element.target;n=this[t],n=r.dataDate||n[0];var i=+(r.dataDate=n)[0]-1,o=+n[0]+1;const a=this.getMonthData(n);var s=a.max.slice(0,4),u=a.min.slice(0,4);let c=`<div class="${e.range("x")}">`;return c+=`<div class="${e.date("head")}">            <div class="${e.date("half")}">`,c=(c=u<=i&&i<=s?`${c}<a href="javascript:" class="${e.date("prev")}" data-year="${i}" role="button" aria-label="上一年"></a>`:`${c}<span class="${e.date("prev")}" aria-label="上一年"></span>`)+`<span class="${e.date("switch")}">${n[0]}</span>            </div>            <div class="${e.date("half")}">`,c=(c=u<=o&&o<s?`${c}<a href="javascript:" class="${e.date("next")}" data-year="${o}" role="button" aria-label="下一年"></a>`:`${c}<span class="${e.date("next")}" aria-label="下一年"></span>`)+`<span class="${e.date("switch")}">${o}</span>            </div>`,c=(c=(c+="</div>")+`<div class="${e.range("body")} ${e.range("month","body")}">            <div class="${e.date("half")}">${a.html}</div>            <div class="${e.date("half")}">${this.getMonthData([o,n[1],n[2]]).html}</div>            </div>`)+`<div class="${e.range("footer")}">            <button class="ui-button" data-type="primary">确定</button>            <button class="ui-button" data-type="normal">取消</button>            </div>`,c+="</div>",r.dataset.type="month-range",r.innerHTML=c,this}year(n){const r=n||this.element.target;let i=this.min,o=this.max,a=0,s=9999;const u=this.params.type;let c=this[t],l=(u.includes("datetime")&&(c=c[0],i&&(a=i.split(/\s+/)[0].toDate().getFullYear()),o&&(s=o.split(/\s+/)[0].toDate().getFullYear())),`<div class="${e.year("x")}">`);const h=c[0];return l=`${l}<div class="${e.date("head")}">`,l=h-12>=a&&h-12<=s?`${l}<a href="javascript:" class="${e.date("prev")}" data-year="${h-12}" role="button" aria-label="上一个12年"></a>`:`${l}<span class="${e.date("prev")}"></span>`,l=`${l=`${l=h+12>=a&&h+12<=s?`${l}<a href="javascript:" class="${e.date("next")}" data-year="${h+12}" role="button" aria-label="下一个12年"></a>`:`${l}<span class="${e.date("next")}"></span>`}<span class="${e.date("switch")}">${[h-6,h+5].join("-")}</span></div>`}<div class="${e.year("body")}">${(()=>{let n="",r="";for(let i=h-6;i<h+6;i+=1)r=e.date("item"),i==h&&(r=r+" "+t),n=i>=a&&i<=s?`${n}<a href="javascript:" class="${r}">${i}</a>`:`${n}<span class="${r}">${i}</span>`;return n})()}</div>`,l=(l=(n=(new Date).getFullYear())>=a&&n<=s?`${l}<a href="javascript:" class="${e.date("item")} ${e.date("now")}" role="button">今年</a>`:`${l}<span class="${e.date("item")} ${e.date("now")}">今年</span>`)+"</div></div>",r.dataset.type="year",r.innerHTML=l,this}hour(n){const r=n||this.element.target,i=this[t];let o=this.step||1,a=Number(this.min.split(":")[0])||0,s=Number(this.max.split(":")[0]);return!isNaN(s)&&this.max||(s=24),n=(n=`<div class="${e.hour("x")}">`)+`<div class="${e.hour("body")}">${(()=>{let n="";var r;let u="";for(let c=0;c<24;c+=o)r=String(c).padStart(2,"0"),u=e.date("item"),r==i[0]&&(u=u+" "+t),n=c>=a&&c<=s?`${n}<a href="javascript:" class="${u}">${r}:00</a>`:`${n}<span class="${u}">${r}:00</span>`;return n})()}</div></div>`,r.dataset.type="hour",r.innerHTML=n,this}time(n){const r=n||this.element.target;let i=this[t],o=null;const a=this.params.type;a.includes("datetime")&&(o=this[t][0],i=this[t][1]);let s=Number(i[0]),u=Number(i[1]),c=Number(i[2]),l=+this.step||1,h=(60<l&&(l=Math.floor(l/60)),this.min),f=this.max;if(a.includes("datetime")&&o&&(h||f)){let e="",t="",n=(h&&(e=h.split(/\s+/)[0],t=h.split(/\s+/)[1]),""),r="";f&&(n=f.split(/\s+/)[0],r=f.split(/\s+/)[1]),e&&o.join("-").toDate()<e.toDate()||n&&o.join("-").toDate()>n.toDate()?(h="24:60:60",f="00:00:00"):o.join("-")==e?(h=t,f="23:59:59"):o.join("-")==n&&(f=r,h="00:00:00")}h=h||"00:00:00",f=f||"23:59:59";let d=Number(h.split(":")[0])||0,p=Number(h.split(":")[1])||0,m=Number(h.split(":")[2])||0,g=Number(f.split(":")[0]),A=(isNaN(g)&&(g=23),Number(f.split(":")[1])),v=Number(f.split(":")[2]),b=(isNaN(A)&&(A=59),isNaN(v)&&(v=59),[]),y=("H:mm"!=this.datetimeformat&&(b=[0,1].map(e=>0==e?{value:"上午",selected:s<=11}:{value:"下午",selected:11<s})),Array(24).fill().map((e,t)=>{let n=!1,r=((t<d||t>g)&&(n=!0),!0),i=!1,o=String(t).padStart(2,"0");return"H:mm"!=this.datetimeformat&&((11<t&&b[0].selected||t<=11&&b[1].selected)&&(r=!1),"00"==(o=12<=t?String(t-12).padStart(2,"0"):o)&&(o="12")),t==s&&(i=!0),{value:o,disabled:n,selected:i,visibility:r}})),w=Array(60).fill().map((e,t)=>{let n=!1,r=!0,o=!1;return(s==d&&t<p||s==g&&t>A||s<d||s>g)&&(n=!0),2==i.length&&t%l!=0&&(r=!1),t==u&&(o=!0),{value:String(t).padStart(2,"0"),disabled:n,visibility:r,selected:o}}),x=Array(60).fill().map((e,t)=>{let n=!1,r=!0,o=!1;return(s==d&&u==p&&t<m||s==g&&u==A&&t>v)&&(n=!0),3==i.length&&t%l!=0&&(r=!1),t==c&&(o=!0),{value:String(t).padStart(2,"0"),disabled:n,visibility:r,selected:o}});if(r.innerHTML)return[...r.querySelectorAll("button")].forEach((function(e){e.classList.remove(t),e.disabled=!1,e.dataset.visibility="true";var n=e.dataset.index,r=e.parentElement.dataset.type;"ampm"==r?b[n].selected&&e.classList.add(t):((r={hour:y,minute:w,second:x}[r][n]).selected&&e.classList.add(t),r.disabled&&(e.disabled=!0),0==r.visibility&&(e.dataset.visibility="false"))})),this;let C=`<div class="${e.time("x")}" data-step="${l}">`;"H:mm"!=this.datetimeformat&&(C+=`<div class="${e.time("col")}" data-type="ampm">\n                    ${b.map((t,n)=>`<button class="${e.time("item")}${t.selected?" selected":""}" data-index="${n}">${t.value}</button>`).join("")}\n                </div>`),C=(C+=`<div class="${e.time("col")}" data-type="hour">\n                ${y.map((n,r)=>`<button class="${e.time("item")}${n.selected?" "+t:""}" data-index="${r}"${n.disabled?" disabled":""} data-visibility="${n.visibility}">${n.value}</button>`).join("")}\n            </div>`)+`<div class="${e.time("col")}" data-type="minute">\n                ${w.map((n,r)=>`<button class="${e.time("item")}${n.selected?" "+t:""}" data-index="${r}"${n.disabled?" disabled":""} data-visibility="${n.visibility}">${n.value}</button>`).join("")}\n            </div>`,3==i.length&&(C+=`<div class="${e.time("col")}" data-type="second">\n                    ${x.map((n,r)=>`<button class="${e.time("item")}${n.selected?" "+t:""}" data-index="${r}"${n.disabled?" disabled":""} data-visibility="${n.visibility}">${n.value}</button>`).join("")}\n                </div>`),C+="</div>",r.dataset.type="time",r.innerHTML=C}minute(n){const r=n||this.element.target,i=this[t],o=+this.step||1;let a=+(this.min||"0").replace(":",""),s=+(this.max||"2359").replace(":",""),u=`<div class="${e.minute("x")}" data-step="${o}">`;return n=+i[0],u=`${u}<div class="${e.date("head")}">`,u=n<=Math.floor(a/100)?`${u}<span class="${e.date("prev")}"></span>`:`${u}<a href="javascript:" class="${e.date("prev")}" data-hour="${n-1}" role="button" aria-label="上一个小时"></a>`,u=`${u=`${u=n>=Math.floor(s/100)?`${u}<span class="${e.date("next")}"></span>`:`${u}<a href="javascript:" class="${e.date("next")}" data-hour="${1+n}" role="button" aria-label="下一个小时"></a>`}<a href="javascript:" class="${e.date("switch")}" data-type="hour">${i[0]}:00</a></div>`}<div class="${e.minute("body")}">${(()=>{let n="",r="",u="";for(let c=0;c<60;c+=o)1==(r=""+c).length&&(r="0"+r),u=e.date("item"),n=+(i[0]+r)>=a&&+(i[0]+r)<=s?(r==i[1]&&(u=u+" "+t),`${n}<a href="javascript:" class="${u}">${[i[0],r].join(":")}</a>`):`${n}<span class="${u}">${[i[0],r].join(":")}</span>`;return n})()}</div>`,u+="</div>",r.dataset.type="minute",r.innerHTML=u,this}datetime(t){const n=t||this.element.target,r=(n.dataset.type="datetime",n.innerHTML=`<div class="${e.datetime("x")}"></div>`,document.createElement("div")),i=document.createElement("div");return r.className=e.datetime("date"),i.className=e.datetime("time"),n.querySelector("div").append(r,i),this.date(r),this.time(i),this}"datetime-local"(){return this.datetime()}position(){return this.follow(),this}show(){const e=this.element.target;if(!this.disabled){this.format(),"date-range"==this.params.type?(this.dataRangeSelected||(this.dataRangeSelected=this[t]),this["date-range"]()):"month-range"==this.params.type?(this.dataRangeSelected||(this.dataRangeSelected=this[t]),this["month-range"]()):this[this.params.type]?this[this.params.type]():this.date(),0==document.body.contains(e)&&(document.body.appendChild(e),this.dispatchEvent(new CustomEvent("DOMContentLoaded"))),e.style.display="inline-block",this.classList.add("active"),this.position(),this.display=!0;let n=null;"time"==this.params.type?n=e.querySelectorAll("."+t):this.params.type.includes("datetime")&&(n=e.querySelectorAll('[data-type="time"] .'+t)),n&&n.forEach((e,t)=>{e.scrollIntoViewIfNeeded?e.scrollIntoViewIfNeeded():(e.offsetTop-5>e.parentElement.scrollTop+e.parentElement.clientHeight||e.offsetTop-5<e.parentElement.scrollTop)&&(e.parentElement.scrollTop=e.offsetTop-5),0==t&&e.focus({preventScroll:!0})}),this.dispatchEvent(new CustomEvent("show",{detail:{type:"ui-datetime"}}))}return this}hide(){const e=this.element.target;return 1==this.display&&(e.style.display="none",this.classList.remove("active"),document.activeElement!=document.body&&!e.contains(document.activeElement)||(this.focus(),this.blur())),this.display=!1,this.dispatchEvent(new CustomEvent("hide",{detail:{type:"ui-datetime"}})),this}connectedCallback(){if(!this.isConnectedCallback){let s=this.getAttribute("type"),u=(0==["date","year","month","time","hour","minute","datetime","datetime-local","date-range","month-range"].includes(s)&&(s="date")&&this.removeAttribute("type"),this.params=this.params||{},this.params.type=s,null),c=(this.setAttribute("readonly","readonly"),this.toggleAttribute("required",!0),this.id),l=(c||(c="lulu_"+String(Math.random()).replace("0.",""),this.id=c),this.getAttribute("value")||this.value);switch(s){case"date":case"year":case"month":{const e=l.toDate().toArray();"date"==s?this.value=e.join("-"):"year"==s?this.value=e[0]:"month"==s&&(this.value=e.slice(0,2).join("-")),this[t]=e;break}case"time":{var n=l.toTime();let e=new Date;var r=e.getHours(),i=e.getMinutes(),o=e.getSeconds();let a=String(n[0]||r).padStart(2,"0"),u=String(n[1]||i).padStart(2,"0"),c=String(n[2]||o).padStart(2,"0");r=this.step,"time"==s&&(!r&&n[2]||0<r&&r<=30)?this.value=[a,u,c].join(":"):this.value=[a,u].join(":"),this[t]=[a,u,c];break}case"hour":case"minute":{i=l.toTime();let e=new Date;o=e.getHours(),n=e.getMinutes();let r=String(i[0]||o).padStart(2,"0"),a=String(i[1]||n).padStart(2,"0");i[0]||"hour"!=s||(a="00"),this.value=[r,a].join(":"),this[t]=[r,a];break}case"datetime":case"datetime-local":{const e=l.split(/\s+|T/),n=e[0].toDate().toArray();let r=new Date,i=[String(r.getHours()).padStart(2,"0"),String(r.getMinutes()).padStart(2,"0")];e[1]&&e[1].includes(":")&&(i=e[1].toTime()),this.value=n.join("-")+" "+i.join(":"),this[t]=[n,i];break}case"date-range":case"month-range":{let e=new Date,n=new Date;const r=l.split(" ");if(""!=l&&1==r.length){const t=r[0].toDate();t.getTime()>e.getTime()?n=t:e=t}else e=r[0].toDate(),n=r[r.length-1].toDate();const i=e.toArray(),o=n.toArray();this.value="date-range"==s?i.join("-")+" 至 "+o.join("-"):i.slice(0,2).join("-")+" 至 "+o.slice(0,2).join("-"),this[t]=[i,o];break}}if(/time/.test(s)&&(this.datetimeformat="H:mm",!s.includes("datetime"))){let e=document.createElement("input");e.setAttribute("type","time"),e.value="00:00",document.body.append(e),e.style.position="absolute",e.style.left="-999px",e.style.fontFamily="revert","time"==e.type&&(e.style.fontSize="20px",a=e.clientWidth,e.style.fontSize="30px",a=e.clientWidth-a,5<=Math.ceil(a/10)&&(this.datetimeformat="ah:mm"),e.remove())}(u=document.createElement("div")).classList.add(e.date("container"));var a="lulu_"+String(Math.random()).replace("0.","");u.setAttribute("id",a),u.classList.add("ESC"),this.setAttribute("data-target",a),u.setAttribute("data-id",c),this.element=this.element||{},this.element.target=u,this.events(),this.dispatchEvent(new CustomEvent("connected",{detail:{type:"ui-datetime"}})),this.isConnectedCallback=!0}}}return r})();customElements.get("ui-datetime")||customElements.define("ui-datetime",D,{extends:"input"});const B=(window.DBC2SBC=e=>{let t,n,r="";for(t=0;t<e.length;t++)n=e.charCodeAt(t),r+=65281<=n&&n<=65373?String.fromCharCode(e.charCodeAt(t)-65248):12288==n?String.fromCharCode(e.charCodeAt(t)-12288+32):e.charAt(t);return r},window.scrollTopTo=(e,t)=>{let n=document.scrollingElement.scrollTop;const r=()=>{n+=(e-n)/2,Math.abs(n-e)<=1?(document.scrollingElement.scrollTop=e,t&&t()):(document.scrollingElement.scrollTop=n,requestAnimationFrame(r))};r()},document.validate={reg:{email:"^[a-z0-9._%-]+@([a-z0-9-]+\\.)+[a-z]{2,4}$",number:"^\\-?\\d+(\\.\\d+)?$",url:"^(http|https)\\:\\/\\/[a-z0-9\\-\\.]+\\.[a-z]{2,3}(:[a-z0-9]*)?\\/?([a-z0-9\\-\\._\\:\\?\\,\\'\\/\\\\\\+&amp;%\\$#\\=~])*$",tel:"^1\\d{10}$",zipcode:"^\\d{6}$",date:"^\\d{4}\\-(0\\d|1[0-2])\\-([0-2]\\d|3[0-1])$",time:"^[0-2]\\d\\:[0-5]\\d$",hour:"^[0-2]\\d\\:00$",minute:"^[0-2]\\d\\:[0-5]\\d$","date-range":"^\\d{4}(\\-\\d{2}){2}\\s至\\s\\d{4}(\\-\\d{2}){2}$","month-range":"^\\d{4}\\-\\d{2}\\s至\\s\\d{4}\\-\\d{2}$"},name:{email:"邮箱",tel:"手机号码",url:"网址",zipcode:"邮编",password:"密码",number:"数值",range:"数值",date:"日期",year:"年份",month:"月份",hour:"小时",minute:"分钟",time:"时间",datetime:"日期时间","date-range":"日期范围","month-range":"月份范围"},selectRange(e,t,n){if(e)if(e.createTextRange){const r=e.createTextRange();r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r.select()}else e.focus&&(e.focus(),e.setSelectionRange(t,n))},getTel(e){let t=e||"";return(t=t.replace("+86","")).match(/\d/)&&11==t.match(/\d/g).length?t.replace(/\D/g,""):t},getLength(e,t){if("password"==e.type)return t||e.value.length;var n=e.getAttribute("lang");const r=e.value.trim();if(!n)return t||r.length;if(""==r)return 0;let i=1,o=1;if(/zh/i.test(n)?o=.5:/en/i.test(n)&&(i=2),!t)return e=r.replace(/[\x00-\xff]/g,"").length,n=r.length-e,Math.ceil(n*o)+Math.ceil(e*i);let a=0,s=t;return r.split("").forEach((e,n)=>{a>=t||(/[\x00-\xff]/.test(e)?a+=o:a+=i,a>=t&&(s=n+1))}),s},getType(e){let t=e.getAttribute("type")||e.type||"";return"select-one"==t?"select":t},getReportText(e){var t={name:this.name,badInput:"值无效",customError:"包含错误",patternMismatch:{pattern:"内容格式不符合要求",multiple:"某项内容格式不符合要求"},valueMissing:{radio:"请选择一个选项",checkbox:"如果要继续，请选中此框",select:"请选择列表中的一项","select-one":"请选择列表中的一项",empty:"请填写此字段"},rangeOverflow:"值偏大",rangeUnderflow:"值偏小",stepMismatch:"值不在间隔要求范围内",tooLong:"内容长度偏大",tooShort:"内容长度偏小",typeMismatch:"值和输入框类型不匹配"};if(!e)return"";var n=e.validity;if(1==n.valid)return"";let r="";const i=e.id,o=this.getType(e),a=e.customValidate||{};var s=a.report||{},u=t.name[o]||function(){if(a.label&&i&&!/checkbox|radio/.test(o)){let e="";return document.querySelectorAll('label[for="'+i+'"]').forEach((function(t){const n=t.cloneNode(!0);[].slice.call(n.children).forEach((function(e){e.remove()})),(t=n.innerHTML.trim().replace(/\d/g,"").replace("：","")).length>e.length&&(e=t)})),2<=e.length?e:void 0}}();if(n.valueMissing)r=(r=(r=s.valueMissing)||(o&&u?"select"!=o?u+"不能为空":"您尚未选择"+u:t.valueMissing[o]))||t.valueMissing.empty;else if(n.patternMismatch)(r=s.patternMismatch)||(c=e.hasAttribute("multiple")&&1<e.value.split(",").length,r=t.patternMismatch[c?"multiple":"pattern"],o&&u&&(r=u+r));else if(n.badInput)r=(r=s.badInput)||(u||"")+t.badInput;else if(n.typeMismatch)(r=s.typeMismatch)||(r=t.typeMismatch,u&&(r=r.replace("输入框",u)));else if(n.rangeUnderflow||n.rangeOverflow){if(!(r=s.rangeUnderflow||s.rangeOverflow)&&o&&u){let t=e.getAttribute("min"),i=e.getAttribute("max");"month-range"==o&&(t=t.slice(0,7),i=i.slice(0,7));var c="必须要大于或等于"+t,l="必须要小于或等于"+i;n.rangeUnderflow&&n.rangeOverflow?r="起始日期"+c+"，结束日期"+l:n.rangeUnderflow?(r=u+c,"-range"==o.slice(-6)&&(r="起始日期"+c)):(r=u+l,"-range"==o.slice(-6)&&(r="结束日期"+l))}r=r||"值不在要求的范围内"}else if(n.stepMismatch){if(!(r=s.stepMismatch)){const t=+e.getAttribute("min"),n=+e.getAttribute("max"),i=+e.getAttribute("step")||1;r="number"==o||"range"==o?"请输入有效的值。两个最接近的有效值是"+function(){var r=+e.value.trim();let o=t;for(let e=t;e<n;e+=i)if(e<r&&e+i>r){o=e;break}return[o,o+i].join("和")}():"请"+(e.hasAttribute("readonly")?"选择":"输入")+"有效的值。"+(u||"")+"间隔是"+i}r=r||t.stepMismatch}else if(n.tooLong||n.tooShort){c=e.getAttribute("lang");let t="";/zh/i.test(c)?t="个汉字(2字母=1汉字)":/en/i.test(c)&&(t="个字符(1汉字=2字符)"),n.tooLong?(r=s.tooLong)||(r=(u||"")+"内容长度不能大于"+(e.maxlength||e.getAttribute("maxlength")).replace(/\D/g,"")+t):(r=s.tooShort)||(r="内容长度不能小于"+(l=e.getAttribute("minlength"))+t)}else n.customError&&(r=s.customError||t.customError);return"function"==typeof r?r.call(e,e):r},getMissingState(e){const t={valueMissing:!1};if(e&&!e.disabled){var n=this.getType(e);let r=e.value;if(e.hasAttribute("required")){if("radio"==n){let n=[e];const r=e.closest("form")||e.parentElement.parentElement;return e.name&&r&&(n=r.querySelectorAll('input[type="radio"][name="'+e.name+'"]')),0==[].slice.call(n).some((function(e){return e.checked}))&&(t.valueMissing=!0),t}if("checkbox"==n)return 0==e.checked&&(t.valueMissing=!0),t;""==(r="password"!=n?r.trim():r)&&(e.value="",t.valueMissing=!0)}}return t},isMissing(e){return this.getMissingState(e).valueMissing},getMismatchState(e,t,n){const r={patternMismatch:!1,typeMismatch:!1};if(!e||e.disabled)return!1;const i=e.value;let o=i;const a=this.getType(e);if(!/^radio|checkbox|select$/i.test(a)&&("password"!=a&&(o=i.trim()),0==/^text|textarea|password$/i.test(a)&&(o=window.DBC2SBC(o)),"tel"==a&&(o=this.getTel(o)),!1!==document.validate.focusable&&0!==document.validate.focusable&&o!=i&&(e.value=o),""!=o&&(t=t||e.getAttribute("pattern")||a&&a.split("|").map((function(e){if(e=document.validate.reg[e])return e})).join("|")))){var s=e.hasAttribute("multiple");const i=new RegExp(t,n||"i");let u=!0;s&&0==/^number|range$/i.test(a)?o.split(",").forEach((function(e){e=e.trim(),u&&!i.test(e)&&(u=!1)})):u=i.test(o),0==u&&(e.hasAttribute("pattern")?r.patternMismatch=!0:r.typeMismatch=!0)}return r},isMismatch(e,t,n){return(e=this.getMismatchState(e,t,n)).patternMismatch||e.typeMismatch},getRangeState(e){const t={badInput:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1};if(e&&!e.disabled){const i=this.getType(e);let o=e.value.trim();if(!/radio|checkbox|select|textarea/i.test(i)&&""!=o){let a=e.getAttribute("min"),s=e.getAttribute("max");var n,r;e=Number(e.getAttribute("step"))||1,"number"!=i&&"range"!=i||/[-+]?[0-9]/.test(o)||(t.badInput=!0),"-range"!=i.slice(-6)?("0"!=o&&Number(o)!=o||(o=+o),i.includes("datetime")&&(o=o.replace("T"," "),a&&a.replaceAll("/","-").replace("T"," "),s&&s.replaceAll("/","-").replace("T"," ")),a&&o<a&&(t.rangeUnderflow=!0),s&&o>s&&(t.rangeOverflow=!0),"number"!=i&&"range"!=i||!e||!a||/^\d+$/.test(Math.abs(o-a)/e)||(t.stepMismatch=!0),("hour"==i||"minute"==i||"time"==i)&&a&&e&&(r=o.split(":")[1],n=a.split(":")[1],("hour"!=i||r==n&&(o.split(":")[0]-a.split(":")[0])%e==0)&&(r-n)%e==0||(t.stepMismatch=!0))):(r=o.split(" "),"month-range"==i&&(a=a&&a.slice(0,7),s=s&&s.slice(0,7)),3==r.length&&(a&&r[0]<a&&(t.rangeUnderflow=!0),s&&r[2]>s&&(t.rangeOverflow=!0)))}}return t},isOut(e){return(e=this.getRangeState(e)).badInput||e.rangeOverflow||e.rangeUnderflow||e.stepMismatch},getLengthState(e){const t={tooLong:!1,tooShort:!1};if(e&&!e.disabled&&!/^radio|checkbox|select$/i.test(e.type)){var n=e.getAttribute("minlength");let r=e.maxlength||e.getAttribute("maxlength");""!=e.value&&(e=this.getLength(e),n&&e<n&&(t.tooShort=!0),r&&e>(r=r.replace(/\D/g,""))&&(t.tooLong=!0))}return t},isOverflow(e){return(e=this.getLengthState(e)).tooLong||e.tooShort},getCustomState(e){const t={customError:!1},n=e.customValidate;var r;return n&&"function"==typeof n.method&&(r=n.method.call(n.owner,e))&&(t.customError=!0,"object"==typeof r&&r.customError?this.setCustomValidity(e,r.customError):this.setCustomValidity(e,r)),t},setCustomValidity(e,t){t&&(e.customValidate||(e.customValidate={report:{}}),e.customValidate.report||(e.customValidate.report={}),e.customValidate.report.customError=t)},checkValidity(e){var t,n;return!(e&&!e.disabled)||(t=e.getAttribute("type")||e.type,n=e.tagName.toLowerCase(),1==/^button|submit|reset|file|image$/.test(t)||"button"==n||(1==(e=0==e.matches("input, select, textarea")&&e.children?e.querySelectorAll("input, select, textarea"):e).nodeType?this.getValidity(e).valid:!e.length||[].slice.call(e).every(function(e){return this.checkValidity(e)}.bind(this))))},getValidity(e){if(e.lastValidateState&&e.lastValue===e.value&&0==/radio|checkbox/.test(e.type))return e.lastValidateState;let t={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:!0,valueMissing:!1},n=!1;for(var r in t=Object.assign({},t,this.getMissingState(e),this.getMismatchState(e),this.getRangeState(e),this.getLengthState(e),this.getCustomState(e)))"valid"!=r&&1==t[r]&&(n=!0);return t.valid=!n,e.lastValue=e.value,e.lastValidateState=t,setTimeout((function(){delete e.lastValidateState}),1),t},reportValidity(e,t){return t=t||this.getReportText(e),this.errorTip(e,t),""===t&&e.data&&e.data.errorTip&&e.data.errorTip.hide(),t=!t,this.styleError(e,t),t},styleError(e,t){if(!e)return this;void 0===t?t=e.validity.valid:e.dispatchEvent(new CustomEvent(t?"valid":"invalid"));const n=this.getTarget(e);if(n){const r=e.form||e.closest("form")||e.customValidate&&e.customValidate.owner;"radio"==e.type&&e.name&&r?r.querySelectorAll("input[type=radio][name="+e.name+"]").forEach(function(e){const n=this.getTarget(e);t?(n.removeAttribute("is-error"),n.removeAttribute("aria-label")):n.setAttribute("is-error","")}.bind(this)):t?(n.removeAttribute("is-error"),n.removeAttribute("aria-label")):n.setAttribute("is-error","")}return t},errorTip(e,t){const n=this.getTarget(e);if(n&&t){var r=window.getComputedStyle(n);if("none"!=r.display&&"hidden"!=r.visibility){function i(){const n=document.validate.errorTip.control,r=document.validate.errorTip.target;var i,o;r.errorTip(t,{onShow(e,t){var n=.5*(t.clientWidth-r.clientWidth);t.style.marginLeft=n<0?.5*(t.clientWidth-r.clientWidth)+"px":0,!1===document.validate.focusable?t.classList.add("none"):t.classList.remove("none")},onHide(e,t){var r=n.form||n.closest("form");r&&r.isImmediated&&(t.style.marginLeft="",document.validate.styleError(n))}}),!1!==document.validate.focusable&&0!==document.validate.focusable&&(document.validate.focusable=null,document.validate.getType(n)&&(-1!=t.indexOf("内容长度")&&-1!=t.indexOf("大")?(i=n.value.length,o=n.maxlength||n.getAttribute("maxlength").replace(/\D/g,""),i&&o&&document.validate.selectRange(e,document.validate.getLength(e,o),i)):n.focus&&n.select&&(n.focus(),n.select())))}document.validate.errorTip.control=e;let o=-1;(r=(document.validate.errorTip.target=n).getBoundingClientRect()).top<50?o=window.pageYOffset-(50-r.top):r.bottom>window.innerHeight&&(o=window.pageYOffset+(r.bottom-window.innerHeight)),0<=o?window.scrollTopTo(o,i):i()}}return this},getTarget(e){if(!e)return null;let t=e;var n=e.getAttribute("type")||e.type,r=e.id,i=e.tagName.toLowerCase(),o=window.getComputedStyle(e);return"radio"==n?"1"!=o.opacity&&(t=e.parentElement.querySelector('label.ui-radio[for="'+r+'"]')):"checkbox"==n?"1"!=o.opacity&&(t=e.parentElement.querySelector('label.ui-checkbox[for="'+r+'"]')):"select"==n||"select"==i?"1"!=o.opacity&&(t=e.nextElementSibling):"range"==n?"none"==o.display&&(t=e.nextElementSibling):"hidden"==n||"none"==o.display||"hidden"==o.visibility?(r=document.getElementById(t.getAttribute("data-target"))||e.dataTarget)&&(t=document.validate.getTarget(r)):"textarea"==n||"textarea"==i?0==e.classList.contains("ui-textarea")&&e.parentElement.querySelector(".ui-textarea")&&(t=e.parentElement.querySelector(".ui-textarea")):"input"==i&&0==e.classList.contains("ui-input")&&e.parentElement.querySelector(".ui-input")&&(t=e.parentElement.querySelector(".ui-input")),t}},[HTMLInputElement.prototype,HTMLSelectElement.prototype,HTMLTextAreaElement.prototype].forEach((function(e){Object.defineProperty(e,"validity",{get(){return document.validate.getValidity(this)},configurable:!0}),Object.defineProperty(e,"validationMessage",{get(){return document.validate.getReportText(this)},configurable:!0}),Object.defineProperty(e,"checkValidity",{value(){return this.validity.valid},configurable:!0}),Object.defineProperty(e,"reportValidity",{value(e){return document.validate.reportValidity(this,e)},configurable:!0}),Object.defineProperty(e,"setCustomValidity",{value(e){e&&(this.customValidate||(this.customValidate={}),this.customValidate.report||(this.customValidate.report={}),"string"==typeof e?["badInput","customError","patternMismatch","rangeOverflow","rangeUnderflow","stepMismatch","tooLong","tooShort","typeMismatch","valueMissing"].forEach((function(t){this.customValidate.report[t]=e})):"object"==typeof e&&Object.assign(this.customValidate.report,e))},configurable:!0})})),Object.defineProperty(HTMLFormElement.prototype,"checkValidity",{value(){return document.validate.checkValidity(this)},configurable:!0}),class{constructor(e,t,n){if(e="string"==typeof e?document.getElementById(e)||document.querySelector(e):e){const r=e;if(r.data&&r.data.validate)return r.data.validate;r.setAttribute("novalidate","novalidate"),"object"==typeof t&&(n=t,t=null),e=Object.assign({},{multiple:!0,immediate:!0,label:!0,validate:[]},n||{}),r.querySelectorAll('[type="submit"]:disabled, [type="image"]:disabled').forEach((function(e){e.disabled=!1})),r.addEventListener("submit",e=>{if(!this.stopValidate)return e.preventDefault(),this.checkValidity()&&("function"==typeof t&&t.call(this,r),r.dispatchEvent(new CustomEvent("valid"))),!1}),this.element={form:r},this.params={multiple:e.multiple,immediate:e.immediate,label:e.label},this.setCustomValidity(e.validate),this.count(),this.enhance(),r.data||(r.data={}),r.data.validate=this}return this}setCustomValidity(e){let t=e||this.dataValidate;if(!t||!this.element||!this.element.form)return this;(t="function"==typeof t?t():t)&&!t.forEach&&t.id&&(t=[t]);const n=this.params.label;var r=this.element.form.elements||this.element.form.querySelectorAll("input, textarea, select");if(!r.length)return this;[...r].forEach(e=>{const r=e.id;let i={label:n,owner:this};r&&t&&t.length&&t.forEach(function(e){e.id==r&&(e.label=n,e.owner=this,i=e)}.bind(this)),this.element.form.data&&this.element.form.data.validate||(e.lastValue=e.value||""),e.customValidate=i}),this.dataValidate=e}count(){const e=this.element.form,t=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),n=Object.getOwnPropertyDescriptor(HTMLTextAreaElement.prototype,"value");return e.querySelectorAll("input, textarea").forEach((function(r){let i=r.getAttribute("maxlength");if(i)try{r.setAttribute("maxlength","_"+i+"_")}catch(e){r.removeAttribute("maxlength"),r.maxlength=i}const o=r.getAttribute("minlength");if(i){i=i&&i.replace(/\D/g,"");const a=r.tagName.toLowerCase(),s=function(){return["ui",a].concat([].slice.call(arguments)).join("-")};let u=r.parentElement.querySelector("."+s("count"))||e.querySelector("."+s("count")+'[for="'+r.id+'"]');if(u||r.parentElement.classList.contains(s("x"))){let e=r.id;e||(e=("lulu_"+Math.random()).replace("0.",""),r.id=e),u?u.hasAttribute("for")||u.setAttribute("for",e):((u=document.createElement("label")).className=s("count"),u.setAttribute("for",e),u.innerHTML="<span>0</span><slash>/</slash><span>"+(o?o+"-":"")+i+"</span>",r.parentElement.appendChild(u));const c=u.querySelector("span, output")||u,l=function(){var e=document.validate.getLength(r);0!=(c.innerHTML=e)&&(e>i||o&&e<o)?(c.classList.add("error"),c.toggleAttribute("is-error",!0)):(c.classList.remove("error"),c.toggleAttribute("is-error",!1))};r.count=l,r.addEventListener("input",l),"input"==a?Object.defineProperty(r,"value",{...t,set(e){t.set.call(this,e),l()}}):"textarea"==a&&Object.defineProperty(r,"value",{...n,set(e){n.set.call(this,e),l()}}),l()}}})),e.addEventListener("reset",(function(){this.querySelectorAll("input, textarea").forEach((function(e){e.count&&setTimeout(()=>{e.count()},1)}))})),this}enhance(){this.element.form.querySelectorAll("input, textarea").forEach((function(e){var t=document.validate.getType(e);0==/^checkbox|radio|range$/i.test(t)&&["paste","drop"].forEach(t=>{e.addEventListener(t,(function(t){var n,r=this.getAttribute("type")||this.type;const i=t.clipboardData||t.dataTransfer;let o="";i&&"false"!=this.dataset.enhance&&(n=this.value.slice(e.selectionStart,e.selectionEnd),""!=this.value.trim()&&n!==this.value||(t.preventDefault(),o=i.getData("text")||"","password"!=r&&(o=o.trim()),"email"==r?o=o.replace("#","@"):"tel"==r&&(o=document.validate.getTel(o)),this.value=o,e.dispatchEvent(new CustomEvent("input"))))}))})}))}immediate(){const e=this.element.form;if(!e.isImmediated){const t=e=>{0!=this.params.immediate&&this.reportValidity(e.target)},n=e=>{this.params.immediate&&setTimeout(function(){document.validate.focusable=0,this.reportValidity(e.target)}.bind(this),20)},r=e=>{0!=this.params.immediate&&(document.validate.focusable=!1,this.reportValidity(e.target),e.target.lastValue=e.target.value)},i=(e.querySelectorAll("input, select, textarea").forEach((function(e){var i=e.type,o=e.getAttribute("type");"button"!=i&&"submit"!=i&&"reset"!=i&&"file"!=i&&"image"!=i&&("radio"==i||"checkbox"==i?e.addEventListener("click",t):/select/.test(i)||/range|date|time|hour|minute|hidden/.test(o)?e.addEventListener("change",t):(e.addEventListener("focus",n),e.addEventListener("input",r)))})),e.isImmediated=!0,function(){[...e.elements].forEach(e=>{var i,o=e.type;["button","submit","reset","file","image"].includes(o)||(i=e.getAttribute("type"),"radio"==o||"checkbox"==o?e.removeEventListener("click",t):/select/.test(o)||/range|date|time|hour|minute|hidden/.test(i)?e.removeEventListener("change",t):(e.removeEventListener("focus",n),e.removeEventListener("input",r)))}),[...e.querySelectorAll(".valided")].forEach(e=>{e.classList.remove("valided")}),[...e.querySelectorAll("[is-error]")].forEach(e=>{let t=e.data&&e.data.errorTip;t&&t.hide(),e.removeAttribute("is-error")}),e.isImmediated=!1,e.removeEventListener("reset",i)});e.addEventListener("reset",i)}return this}checkValidity(){const e=this.element.form;let t=!0;return document.validate.focusable=!0,e.querySelectorAll("input, select, textarea").forEach(e=>{var n;1!=t&&!this.params.multiple||(n=e.validity.valid,1==t&&0==n?(this.reportValidity(e),t=!1):document.validate.styleError(e,n))}),!e.isImmediated&&this.params.immediate&&this.immediate(),t}reportValidity(e,t){e&&document.validate.reportValidity(e,t)}});window.Validate=B,HTMLFormElement.prototype.validate=function(){return new B(this),this};{const e=e=>{(e||document.querySelectorAll("[is-validate]")).forEach(e=>{e.validate(),e.dispatchEvent(new CustomEvent("connected",{detail:{type:"ui-validate"}})),e.dispatchEvent(new CustomEvent("DOMContentLoaded"))})};D=()=>{e();new MutationObserver(t=>{t.forEach(t=>{t.addedNodes&&t.addedNodes.forEach(t=>{t.tagName&&(t.hasAttribute("is-validate")?e([t]):e(t.querySelectorAll("[is-validate]")))})})}).observe(document.body,{childList:!0,subtree:!0})},"loading"!=document.readyState?D():window.addEventListener("DOMContentLoaded",D)}class I extends HTMLElement{static get observedAttributes(){return["per","total","current","loading"]}constructor({per:e,total:t,current:n,loading:r,href:i,container:o=null,onChange:a=(()=>{})}={}){super();const s=this.attachShadow({mode:"open"});i=i||this.href?"a":"button",e&&(this.per=e),t&&(this.total=t),n&&this.setAttribute("current",n),this.loading=r,this.onchange=a,s.innerHTML=`\n        <style>\n        :host {\n            display: flex;\n            font-size: 14px;\n            height: 30px;\n            align-items: center;\n        }\n\n        .ui-page {\n            display: inline-flex;\n            min-width: 18px;\n            padding: 0 var(--ui-page-padding, 2px);\n            margin: 0 5px;\n            height: var(--ui-page-height, 28px);\n            border: 1px solid transparent;\n            border-radius: var(--ui-page-radius, 0);\n            color: var(--ui-gray, #a2a9b6);\n            font-size: var(--ui-font, 14px);\n            font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;\n            transition: border-color var(--ui-animate-time, .2s), background-color var(--ui-animate-time, .2s);\n            text-decoration: none;\n            user-select: none;\n            position: relative;\n            justify-content: center;\n            align-items: center;\n            background: none;\n            box-sizing: content-box;\n        }\n\n        .ui-page:not(:focus-visible){\n            outline: 0;\n        }\n\n        .ui-page[current] {\n            cursor: default;\n        }\n\n        .ui-page:not([current]):not([disabled]):not(:disabled):hover {\n            border-color: #b6bbc6;\n            color: var(--ui-gray, #a2a9b6);\n            cursor: pointer;\n        }\n\n        .ui-page:disabled {\n            color: #ccd0d7;\n            cursor: default;\n        }\n\n        .ui-page > svg {\n            width: 20px;\n            height: 20px;\n        }\n\n        .ui-page-prev,\n        .ui-page-next {\n            text-align: center;\n            fill: currentColor;\n            overflow: hidden;\n        }\n\n        /* 当前不可点的按钮颜色 */\n        span.ui-page-prev,\n        span.ui-page-next {\n            color: var(--ui-diabled, #ccd0d7);\n        }\n\n        .ui-page-next svg {\n            transform: scaleX(-1);\n        }\n\n        .ui-page-prev {\n            margin-left: 0;\n        }\n\n        .ui-page-next {\n            margin-right: 0;\n        }\n\n        .ui-page-ellipsis {\n            display: inline-block;\n        }\n\n        :host(:not([loading]):not([data-loading=true])) .ui-page[current] {\n            color: var(--ui-white, #ffffff);\n            background-color: var(--ui-blue, #2a80eb);\n        }\n\n        .ui-page-text {\n            color: var(--ui-dark, #4c5161);\n        }\n\n        .ui-page.loading > svg {\n            visibility: hidden;\n        }\n\n        :host([loading]) .ui-page[current]::before,\n        :host([data-loading=true]) .ui-page[current]::before {\n            content: "";\n            position: absolute;\n            left: 0;\n            top: 0;\n            right: 0;\n            bottom: 0;\n            background-repeat: no-repeat;\n            width: 20px;\n            height: 20px;\n            background: url("data:image/svg+xml,%3Csvg viewBox='0 0 1024 1024' xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cpath d='M512 1024q-104 0-199-40-92-39-163-110T40 711Q0 616 0 512q0-15 10.5-25.5T36 476t25.5 10.5T72 512q0 90 35 171 33 79 94 140t140 95q81 34 171 34t171-35q79-33 140-94t95-140q34-81 34-171t-35-171q-33-79-94-140t-140-95q-81-34-171-34-15 0-25.5-10.5T476 36t10.5-25.5T512 0q104 0 199 40 92 39 163 110t110 163q40 95 40 199t-40 199q-39 92-110 163T711 984q-95 40-199 40z' fill='%232a80eb'/%3E%3C/svg%3E")\n                no-repeat center;\n            background-size: 20px 20px;\n            margin: auto;\n            animation: spin 1s linear infinite;\n        }\n\n        @keyframes spin {\n            from {\n                transform: rotate(0);\n            }\n            to {\n                transform: rotate(360deg);\n            }\n        }\n\n        .simple-page {\n            width: auto;\n            padding: 0 .625em;\n            pointer-events: none;\n            color: #4c5161;\n        }\n        .page {\n            display: inline-flex;\n            height: 100%;\n            align-items: center;\n        }\n        .pagination-wrap {\n            display: contents;\n            visibility: var(--ui-visibility, initial);\n        }\n        @media (prefers-reduced-motion: reduce) {\n            .ui-page {\n                transition: none;\n            }\n        }\n        </style>\n        <fieldset id="wrap" class="pagination-wrap">\n            <${i} class="ui-page ui-page-prev" id="left">\n                <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="200" height="200" viewBox="0 0 200 200"><path d="M85.876,100.5l49.537-50.526c4.089-4.215,4.089-11.049,0-15.262 c-4.089-4.218-10.719-4.218-14.808,0L63.586,92.868c-4.089,4.215-4.089,11.049,0,15.264l57.018,58.156 c4.089,4.215,10.719,4.215,14.808,0c4.089-4.215,4.089-11.049,0-15.262L85.876,100.5z"></path></svg>\n            </${i}>\n            <div class="page" id="page"></div>\n            <${i} class="ui-page ui-page-next" id="right">\n                <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="200" height="200" viewBox="0 0 200 200"><path d="M85.876,100.5l49.537-50.526c4.089-4.215,4.089-11.049,0-15.262 c-4.089-4.218-10.719-4.218-14.808,0L63.586,92.868c-4.089,4.215-4.089,11.049,0,15.264l57.018,58.156 c4.089,4.215,10.719,4.215,14.808,0c4.089-4.215,4.089-11.049,0-15.262L85.876,100.5z"></path></svg>\n            </${i}>\n        </fieldset>\n        `,this.element=new Proxy({},{get:(e,t)=>{if("trigger"==t)return this.htmlFor&&document.getElementById(this.htmlFor)}}),(o="string"==typeof o?document.querySelector(o):o)&&o.append(this)}get per(){return Number(this.getAttribute("per"))||15}get simple(){return"short"===this.getAttribute("mode")}get total(){return Number(this.getAttribute("total"))||0}get current(){return Number(this.getAttribute("current"))||1}get loading(){return null!==this.getAttribute("loading")}get href(){return this.getAttribute("href")}set current(e){this.setAttribute("current",Math.min(Math.max(1,e),this.count))}set per(e){this.setAttribute("per",e)}set total(e){this.setAttribute("total",e)}set loading(e){e?this.setAttribute("loading",""):this.removeAttribute("loading")}get htmlFor(){return this.getAttribute("for")}set htmlFor(e){this.setAttribute("for",e)}render(e,t){const n=this.href?"a":"button",r=(this.count=Math.ceil(t/e)||1,Math.min(Math.max(1,this.current),this.count));if(this.simple)t=`<div class="simple-page ui-page" >${r} / ${this.count}</div>`,this.page.innerHTML=t;else{e=Array.from({length:this.count}).splice(0,9).map((e,t)=>`<${n} class="ui-page" data-current="${t+1}" aria-label="第${t+1}页，共${this.count}页">${t+1}</${n}>`).join(""),this.page.innerHTML=e}clearTimeout(this.timerRender),this.timerRender=setTimeout(()=>{this.updatePage(r)})}updatePage(e=this.current){if(1==e?(this.left.setAttribute("disabled",!0),this.left.setAttribute("aria-label","已经是第一页了"),this.left.removeAttribute("href")):(this.left.removeAttribute("disabled"),this.left.setAttribute("aria-label",`上一页，当前第${e}页`),this.left.href=this.href?this.href.replace(/\${current}/g,e-1):"javascript:;"),e==this.count?(this.right.setAttribute("disabled",!0),this.right.setAttribute("aria-label","已经是最后一页了"),this.right.removeAttribute("href")):(this.right.removeAttribute("disabled"),this.right.setAttribute("aria-label",`下一页，当前第${e}页`),this.right.href=this.href?this.href.replace(/\${current}/g,e+1):"javascript:;"),this.simple)this.page.querySelector(".simple-page").textContent=e+" / "+this.count;else if(9<this.count){let t=[];switch(e){case 1:case 2:case 3:case 4:case 5:t=[1,2,3,4,5,6,7,"next",this.count];break;case this.count:case this.count-1:case this.count-2:case this.count-3:case this.count-4:t=[1,"pre",this.count-6,this.count-5,this.count-4,this.count-3,this.count-2,this.count-1,this.count];break;default:t=[1,"pre",e-2,e-1,e,e+1,e+2,"next",this.count]}this.page.querySelectorAll(".ui-page").forEach((n,r)=>{"number"==typeof t[r]?(n.dataset.current=t[r],n.textContent=t[r],n.disabled=!1,n.href="javascript:;",t[r]==e?(n.setAttribute("current",""),this.isKeepFocusIn&&n.focus({preventScroll:!0})):n.removeAttribute("current"),n.removeAttribute("disabled"),n.setAttribute("aria-label",`第${t[r]}页，共${this.count}页`),this.href&&(n.href=this.href.replace(/\${current}/g,n.dataset.current))):(n.textContent="...",n.removeAttribute("current"),n.removeAttribute("data-current"),n.removeAttribute("aria-label"),n.setAttribute("disabled",!0),n.removeAttribute("href"))})}else this.page.querySelectorAll(".ui-page").forEach(t=>{t.dataset.current==e?(t.setAttribute("current",""),this.isKeepFocusIn&&t.focus({preventScroll:!0})):t.removeAttribute("current"),this.href&&(t.href=this.href.replace(/\${current}/g,t.dataset.current))})}focusPrev(){var e=this.shadowRoot.activeElement;if(e===this.right)(this.simple?this.left:this.page.lastElementChild).focus();else{const t=e.previousElementSibling;(t?t.disabled?t.previousElementSibling:t:this.left).focus()}}focusNext(){var e=this.shadowRoot.activeElement;if(e===this.left)(this.simple?this.right:this.page.firstElementChild).focus();else{const t=e.nextElementSibling;(t?t.disabled?t.nextElementSibling:t:this.right).focus()}}connectedCallback(){if(this.isConnectedCallback)return this;this.page=this.shadowRoot.getElementById("page"),this.left=this.shadowRoot.getElementById("left"),this.right=this.shadowRoot.getElementById("right"),this.wrap=this.shadowRoot.getElementById("wrap"),this.render(this.per,this.total),this.page.addEventListener("click",e=>{(e=e.target.closest(".ui-page"))&&(this.nativeClick=!0,this.current=Number(e.dataset.current))}),this.page.addEventListener("focusin",()=>{this.isKeepFocusIn=!0}),this.addEventListener("keydown",e=>{if(!this.loading)switch(e.key){case"ArrowDown":case"PageDown":e.preventDefault(),this.nativeClick=!0,this.current--;break;case"ArrowUp":case"PageUp":e.preventDefault(),this.nativeClick=!0,this.current++;break;case"ArrowLeft":this.focusPrev();break;case"ArrowRight":this.focusNext()}}),this.left.addEventListener("click",()=>{this.nativeClick=!0,this.current--,this.left.focus()}),this.right.addEventListener("click",()=>{this.nativeClick=!0,this.current++,this.right.focus()}),this.dispatchEvent(new CustomEvent("connected",{detail:{type:"ui-pagination"}})),this.isConnectedCallback=!0,this.dispatchEvent(new CustomEvent("DOMContentLoaded"))}attributeChangedCallback(e,t,n){if(this.page&&t!==n){let r=this.element&&this.element.trigger;"per"==e?(this.render(n,this.total),r&&(r.dataset.per=n)):"total"==e?(this.render(this.per,n),r&&(r.dataset.total=n)):"loading"==e?(this.wrap.disabled=null!==n,r&&(r.dataset.loading=null!==n)):"current"==e&&t!==n&&(clearTimeout(this.timerRender),this.timerRender=setTimeout(()=>{this.updatePage(Number(n))}),r&&(r.dataset.current=n),this.nativeClick&&(this.nativeClick=!1,this.dispatchEvent(new CustomEvent("change",{detail:{current:Number(n),per:this.per,total:this.total}})),r&&r!=this&&r.dispatchEvent(new CustomEvent("change",{detail:{current:Number(n),per:this.per,total:this.total}}))))}}}customElements.get("ui-pagination")||customElements.define("ui-pagination",I),window.Pagination=I,HTMLElement.prototype.pagination=function(e){if(!this.matches("ui-pagination")&&!this["ui-pagination"]){var{total:t=0,current:n=1,per:r=15,href:i=null,loading:o=!1}=this.dataset,r=Object.assign({},{per:r,total:t,href:i,loading:o},e||{});const a=new I(r);t=this.id||("lulu_"+Math.random()).replace("0.",""),this.innerHTML="",this.id=t,(this["ui-pagination"]=a).htmlFor=t,a.setAttribute("current",n),a.addEventListener("connected",()=>{this.dispatchEvent(new CustomEvent("connected",{detail:{type:"ui-pagination"}})),a.remove(),this.dispatchEvent(new CustomEvent("DOMContentLoaded"))}),document.body.append(a);this.attachShadow({mode:"open"}).append(a.shadowRoot),this.setAttribute("defined","")}return this};{const e=e=>{(e||document.querySelectorAll("[is-pagination]")).forEach(e=>{e.pagination()})};D=()=>{e();new MutationObserver(t=>{t.forEach(t=>{t.addedNodes&&t.addedNodes.forEach(t=>{t.tagName&&(t.hasAttribute("is-pagination")?e([t]):e(t.querySelectorAll("[is-pagination]")))})})}).observe(document.body,{childList:!0,subtree:!0})},"loading"!=document.readyState?D():window.addEventListener("DOMContentLoaded",D)}D=function(){let e="checked",t="table-x",n="table-null-x",r="table-error-x",i="table-page",o='[type="checkbox"]';class a extends HTMLTableElement{static get defaultKeyMap(){return{key:"",total:"total",per:"per",current:"current"}}static scrollTopTo(e,t){let n=document.scrollingElement.scrollTop;!function r(){n+=(e-n)/2,Math.abs(n-e)<=1?(document.scrollingElement.scrollTop=e,t&&t()):(document.scrollingElement.scrollTop=n,requestAnimationFrame(r))}()}constructor(){super(),this.params=this.params||{},this.element=this.element||{},this.params.parse=e=>this.params.template?this.params.template.interpolate(e):"",this.params.ajax={},this.params.form={},this.params.list=[15,30,50],this.params.page={total:0,per:15,current:1,keyMap:a.defaultKeyMap}}setParams(e){let t=(e=e||{}).page;return t&&(t.keyMap=Object.assign({},this.params.page.keyMap||a.defaultKeyMap,t.keyMap||{})),this.params=Object.assign(this.params,e),this}events(){let t=this.params;var n=this.element;this.addEventListener("click",(function(t){let n=t.target;if(n&&"checkbox"==n.type){if(n.closest("tr").querySelector(":first-child "+o)===n){let r=[],i=(this.querySelectorAll("tr").forEach((function(e){0!=e.clientWidth&&(e=e.querySelector("td:first-child "+o+":enabled"))&&r.push(e)})),!1),a=!1;n.closest("th")?(i=n[e],a=!i,r.forEach((function(t){t[e]=i}))):(t=[].slice.call(r).filter((function(t){return t[e]})).length,i=r.length==t,a=0==t);let s=this.querySelector("th:first-child "+o);s&&(s[e]=i),r.forEach((function(t){t.closest("tr").classList[t[e]?"add":"remove"]("selected")})),this.dispatchEvent(new CustomEvent("check",{detail:{isAllChecked:i,isAllUnchecked:a,target:n,allEnabledCheckbox:r}}))}}})),this.addEventListener("click",(function(e){let t=e.target,n=null;t&&0==/^(?:a|input|textarea|tbody|i|select|label|th)$/i.test(t.tagName)&&(n=t.closest("tr")&&t.closest("tr").querySelector("td:first-child "+o+":enabled"))&&n.click()}));let r=this.element.pagination,i=(r&&r.addEventListener("change",e=>{e=e.detail.current,t.page.current=e,r.loading=!0,this.ajax()}),this.id),a=t.page.per,s=n.drop;s&&s.list&&(i&&localStorage[i]&&(a=localStorage[i],t.page.per=Number(a)),s.textContent=a,s.list(()=>t.list.map((function(e){return{value:e}})),{width:60,onSelect:e=>{e=e.value,i&&(localStorage[i]=e),t.page.per!=e&&(t.page.per=e,t.page.current=1,this.ajax())}})),(n=this.form)&&new B(n,()=>{t.page.current=1,this.ajax({data:this.params.form.data||{}})},{validate:()=>this.params.form.validate||[]})}ajax(e){e=e||{};let t=this.params,i=this.element;if("true"!=this.getAttribute("aria-busy")){let s=this.parentElement,u=this.querySelector("tbody"),c=this.form,l={data:{}};c&&((o=c.getAttribute("action"))&&(l.url=o),c.querySelectorAll("input[name]:enabled, select[name]:enabled, textarea[name]:enabled").forEach(e=>{/^(?:submit|image|file)$/.test(e.type)||(l.data[e.name]=e.value)}));let h=Object.assign({},this.dataset,l,t.ajax,e);if(h.url){/^\/\//.test(h.url)&&(h.url=location.protocol+h.url);let c=e.data||{},f=l.data,d=t.ajax.data||{},p=("function"==typeof d&&(d=d()||{}),"function"==typeof f&&(f=f()||{}),"function"==typeof c&&(c=c()||{}),{}),m=t.page.keyMap;m&&(p[m.current]=t.page.current,p[m.per]=t.page.per);var o=Object.assign({},p,f,d,c);m&&(t.page.current=o[m.current],t.page.per=o[m.per]);let g=new URLSearchParams(o),A=h.url,v="?",b=(1<A.split("?").length&&(v=v+A.split("?")[1]+"&"),A=A.split("?")[0]+v+g.toString(),e=>{let t=i.error||s.querySelector("."+r);t||((t=document.createElement("div")).className=r,this.insertAdjacentElement("afterend",t),i.error=t),t.style.display="flex",t.innerHTML=e||"数据没有获取成功","function"==typeof h.error&&h.error()}),y=()=>{this.removeAttribute("aria-busy"),i.loading&&(i.loading.style.display="none"),i.pagination&&(i.pagination.loading=!1),"function"==typeof h.complete&&h.complete(),this.show()};e=()=>{let e=new XMLHttpRequest;e.open("GET",A),e.onload=()=>{let r={};try{r=JSON.parse(e.responseText)||{}}catch(e){return void b("解析异常，请稍后重试")}if(0!==r.code&&0!==r.error)b(r.msg||"返回数据格式不符合要求");else{let e=t.parse(r),a=(u.innerHTML=e||"",i.empty);e&&e.trim()||(a||((a=document.querySelector("."+n)||document.createElement("div")).className=n,this.insertAdjacentElement("afterend",a),i.empty=a),a.style.display="flex");var o=m.key;let c;!(c=(o?r.data[o]:r.data)[m.total])&&0!=c||(s.querySelectorAll('output[data-type="total"]').forEach((function(e){e.innerHTML=c})),t.page.total=c),this.page(),"function"==typeof h.success&&h.success(r)}},e.onerror=()=>{b("网络异常，数据没有获取成功，您可以稍后重试！")},e.onloadend=()=>{y()},e.send(),this.setAttribute("aria-busy","true")};let w=window.pageYOffset,x=i.loading;x||((x=document.createElement("ui-loading")).setAttribute("rows",15),this.insertAdjacentElement("afterend",x),i.loading=x),x.style.paddingBottom="","none"==window.getComputedStyle(x).display&&(o=this.querySelector("thead"),x.style.height=this.clientHeight-(o?o.clientHeight:0)+"px",""==u.innerHTML.trim()&&(x.style.height="")),0<(o=parseFloat(x.style.height)-window.innerHeight)&&(x.style.paddingBottom=o+"px"),x.style.display="block",i.empty&&(i.empty.style.display="none"),i.error&&(i.error.style.display="none"),u.innerHTML="",o=this.getBoundingClientRect(),!this.isFirstAjax&&o.top<0?(w=o.top+w,a.scrollTopTo(w,e)):!this.isFirstAjax&&o.top>window.innerHeight?(w-=o.top,a.scrollTopTo(w,e)):(e(),this.isFirstAjax=!1)}else this.element.pagination&&(this.element.pagination.loading=!1)}return this}page(e){var t=this.params.page;let n=this.element.pagination;if(n){var r,i={total:e||t.total,current:t.current,per:t.per,mode:t.mode||"long"};for(r in i)n[r]=i[r]}}show(){this.element.loading&&(this.element.loading.style.paddingBottom="");let t=this.querySelector("th:first-child "+o);return t&&(t[e]=!1),this.dispatchEvent(new CustomEvent("show",{detail:{type:"ui-table"}})),this}connectedCallback(){let e=this.querySelector("tbody");e||(e=document.createElement("tbody"),this.append(e));var n=this.querySelector("template");n&&(this.params.template=n.innerHTML);let r=this.closest("."+t),o=null;if(r){if(o=r.querySelector("ui-pagination"))this.element.pagination=o,this.setParams({page:{current:o.current,total:o.total,per:o.per}});else{o=document.createElement("ui-pagination"),this.element.pagination=o;let e=r.querySelector("."+i);e&&e.appendChild(o)}(n=r.querySelector("ui-loading"))&&(this.element.loading=n),(n=r.querySelector('ui-drop[data-type="per"]'))&&(this.element.drop=n)}setTimeout(()=>{this.events(),""==e.textContent.trim()?(this.isFirstAjax=!0,this.ajax()):this.page()},1),this.dispatchEvent(new CustomEvent("connected",{detail:{type:"ui-table"}})),this.isConnectedCallback=!0,this.dispatchEvent(new CustomEvent("DOMContentLoaded"))}}return"".interpolate||(String.prototype.interpolate=function(e){var t=Object.keys(e);e=Object.values(e);return new Function(...t,`return \`${t=this,t.replace(/&(lt|gt|amp|quot);/gi,(function(e,t){return{lt:"<",gt:">",amp:"&",quot:'"'}[t]}))}\`;`)(...e)}),a}(),Object.defineProperty(HTMLTableElement.prototype,"form",{get(){var e=this.getAttribute("form");return e?document.getElementById(e):null}}),customElements.get("ui-table")||customElements.define("ui-table",D,{extends:"table"});class M extends HTMLFormElement{constructor(){return super(),this.element=this.element||{},this.params=this.params||{},this.callback=this.callback||{},Object.defineProperty(this.params,"validate",{set(e){this.validate&&this.validate.setCustomValidity(e)}}),this}ajax(){let e=this.callback,t=("function"==typeof(e=e||function(){})&&(e={success:e}),[...this.elements].filter((function(e){return e.type&&/^(?:submit|image)$/i.test(e.type)}))[0]||this.querySelector("button:nth-last-of-type(1)")),n=(t=t||(()=>{let e=document.createElement("button");return e.type="submit",e.setAttribute("hidden",""),this.appendChild(e),e})(),this.element.submit=t,null),r=(n=(n=t.id&&document.querySelector("label[for="+t.id+"]"))||t,this.element.button=n,this.action.split("#")[0]||location.href.split("#")[0]),i=this.method||"POST",o=this.getAttribute("enctype")||this.enctype,a=(n.loading=!0,t.setAttribute("disabled","disabled"),new FormData(this));this.params.data&&Object.keys(this.params.data).forEach(e=>{a.append(e,this.params.data[e])});var s=new URLSearchParams(a).toString();"get"==i.toLowerCase()&&(r=1<r.split("?").length?r+"&"+s:r+"?"+s);let u=new XMLHttpRequest;if(u.open(i,r),e.beforeSend&&e.beforeSend.call(this,u,a),u.onload=()=>{let t={};try{t=JSON.parse(u.responseText)}catch(t){return new x("返回数据解析出错。","error"),e.error&&e.error.call(this,t),void this.dispatchEvent(new CustomEvent("error",{detail:{data:{code:-1,msg:"解析出错"}}}))}!t||0!==t.code&&0!==t.error?(new x(t&&t.msg||"返回数据格式不符合要求。","error"),e.error&&e.error.call(this,t),this.dispatchEvent(new CustomEvent("error",{detail:{data:t}}))):(e.success?e.success.call(this,t):(new x(t.msg||"操作成功。","success"),this.reset()),this.dispatchEvent(new CustomEvent("success",{detail:{data:t}})))},u.onerror=()=>{new x("网络异常，刚才的操作没有成功，您可以稍后重试。","error"),e.error&&e.error.apply(this,arguments),this.dispatchEvent(new CustomEvent("error",{detail:{code:-1,msg:"网络异常"}}))},u.onloadend=()=>{n.loading=!1,t.removeAttribute("disabled"),e.complete&&e.complete.apply(this,arguments),this.dispatchEvent(new CustomEvent("complete"))},o&&"application/x-www-form-urlencoded"===o.toLowerCase())u.send(s);else if("application/json"==o){u.setRequestHeader("Content-Type",o);const e={};a.forEach((function(t,n){e[n]=t})),u.send(JSON.stringify(e))}else u.send(a)}connectedCallback(){this.validate=new B(this,()=>{let e=this.params.avoidSend||this.callback.avoidSend;e&&e(this)||this.ajax()},this.params.validate||{}),this.dispatchEvent(new CustomEvent("connected",{detail:{type:"ui-form"}})),this.isConnectedCallback=!0,this.dispatchEvent(new CustomEvent("DOMContentLoaded"))}}customElements.get("ui-form")||customElements.define("ui-form",M,{extends:"form"})},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t,n){},function(e,t){},function(e,t,n){var r;e.exports=(r=n(39),function(){var e,t;"function"==typeof ArrayBuffer&&(e=r.lib.WordArray,t=e.init,(e.init=function(e){if((e=(e=e instanceof ArrayBuffer?new Uint8Array(e):e)instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e)instanceof Uint8Array){for(var n=e.byteLength,r=[],i=0;i<n;i++)r[i>>>2]|=e[i]<<24-i%4*8;t.call(this,r,n)}else t.apply(this,arguments)}).prototype=e)}(),r.lib.WordArray)},function(e,t,n){function r(e){return e<<8&4278255360|e>>>8&16711935}var i;e.exports=(e=n(39),i=e.lib.WordArray,(n=e.enc).Utf16=n.Utf16BE={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i<n;i+=2){var o=t[i>>>2]>>>16-i%4*8&65535;r.push(String.fromCharCode(o))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>1]|=e.charCodeAt(r)<<16-r%2*16;return i.create(n,2*t)}},n.Utf16LE={stringify:function(e){for(var t=e.words,n=e.sigBytes,i=[],o=0;o<n;o+=2){var a=r(t[o>>>2]>>>16-o%4*8&65535);i.push(String.fromCharCode(a))}return i.join("")},parse:function(e){for(var t=e.length,n=[],o=0;o<t;o++)n[o>>>1]|=r(e.charCodeAt(o)<<16-o%2*16);return i.create(n,2*t)}},e.enc.Utf16)},function(e,t,n){var r;e.exports=(e=n(39),r=e.lib.WordArray,e.enc.Base64url={stringify:function(e,t=!0){for(var n=e.words,r=e.sigBytes,i=t?this._safe_map:this._map,o=(e.clamp(),[]),a=0;a<r;a+=3)for(var s=(n[a>>>2]>>>24-a%4*8&255)<<16|(n[a+1>>>2]>>>24-(a+1)%4*8&255)<<8|n[a+2>>>2]>>>24-(a+2)%4*8&255,u=0;u<4&&a+.75*u<r;u++)o.push(i.charAt(s>>>6*(3-u)&63));var c=i.charAt(64);if(c)for(;o.length%4;)o.push(c);return o.join("")},parse:function(e,t=!0){var n=e.length,i=t?this._safe_map:this._map;if(!(o=this._reverseMap))for(var o=this._reverseMap=[],a=0;a<i.length;a++)o[i.charCodeAt(a)]=a;return(t=i.charAt(64))&&-1!==(t=e.indexOf(t))&&(n=t),function(e,t,n){for(var i,o,a=[],s=0,u=0;u<t;u++)u%4&&(i=n[e.charCodeAt(u-1)]<<u%4*2,o=n[e.charCodeAt(u)]>>>6-u%4*2,a[s>>>2]|=(i|o)<<24-s%4*8,s++);return r.create(a,s)}(e,n,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",_safe_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"},e.enc.Base64url)},function(e,t,n){var r,i,o;e.exports=(e=n(39),n(276),r=(n=e).lib.WordArray,o=n.algo,i=o.SHA256,o=o.SHA224=i.extend({_doReset:function(){this._hash=new r.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=i._doFinalize.call(this);return e.sigBytes-=4,e}}),n.SHA224=i._createHelper(o),n.HmacSHA224=i._createHmacHelper(o),e.SHA224)},function(e,t,n){var r,i,o,a;e.exports=(e=n(39),n(174),n(277),a=(n=e).x64,r=a.Word,i=a.WordArray,a=n.algo,o=a.SHA512,a=a.SHA384=o.extend({_doReset:function(){this._hash=new i.init([new r.init(3418070365,3238371032),new r.init(1654270250,914150663),new r.init(2438529370,812702999),new r.init(355462360,4144912697),new r.init(1731405415,4290775857),new r.init(2394180231,1750603025),new r.init(3675008525,1694076839),new r.init(1203062813,3204075428)])},_doFinalize:function(){var e=o._doFinalize.call(this);return e.sigBytes-=16,e}}),n.SHA384=o._createHelper(a),n.HmacSHA384=o._createHmacHelper(a),e.SHA384)},function(e,t,n){e.exports=function(e){for(var t=Math,n=e,r=n.lib,i=r.WordArray,o=r.Hasher,a=n.x64.Word,s=n.algo,u=[],c=[],l=[],h=1,f=0,d=0;d<24;d++){u[h+5*f]=(d+1)*(d+2)/2%64;var p=(2*h+3*f)%5;h=f%5,f=p}for(h=0;h<5;h++)for(f=0;f<5;f++)c[h+5*f]=f+(2*h+3*f)%5*5;for(var m=1,g=0;g<24;g++){for(var A=0,v=0,b=0;b<7;b++){if(1&m){var y=(1<<b)-1;y<32?v^=1<<y:A^=1<<y-32}128&m?m=m<<1^113:m<<=1}l[g]=a.create(A,v)}for(var w=[],x=0;x<25;x++)w[x]=a.create();var C=s.SHA3=o.extend({cfg:o.cfg.extend({outputLength:512}),_doReset:function(){for(var e=this._state=[],t=0;t<25;t++)e[t]=new a.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(e,t){for(var n=this._state,r=this.blockSize/2,i=0;i<r;i++){var o=e[t+2*i],a=e[t+2*i+1];o=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),a=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),(O=n[i]).high^=a,O.low^=o}for(var s=0;s<24;s++){for(var h=0;h<5;h++){for(var f=0,d=0,p=0;p<5;p++){f^=(O=n[h+5*p]).high,d^=O.low}var m=w[h];m.high=f,m.low=d}for(h=0;h<5;h++){var g=w[(h+4)%5],A=w[(h+1)%5],v=A.high,b=A.low;for(f=g.high^(v<<1|b>>>31),d=g.low^(b<<1|v>>>31),p=0;p<5;p++){(O=n[h+5*p]).high^=f,O.low^=d}}for(var y=1;y<25;y++){var x=(O=n[y]).high,C=O.low,k=u[y];k<32?(f=x<<k|C>>>32-k,d=C<<k|x>>>32-k):(f=C<<k-32|x>>>64-k,d=x<<k-32|C>>>64-k);var E=w[c[y]];E.high=f,E.low=d}var S=w[0],_=n[0];S.high=_.high,S.low=_.low;for(h=0;h<5;h++)for(p=0;p<5;p++){var O=n[y=h+5*p],T=w[y],D=w[(h+1)%5+5*p],B=w[(h+2)%5+5*p];O.high=T.high^~D.high&B.high,O.low=T.low^~D.low&B.low}O=n[0];var I=l[s];O.high^=I.high,O.low^=I.low}},_doFinalize:function(){var e=this._data,n=e.words,r=(this._nDataBytes,8*e.sigBytes),o=32*this.blockSize;n[r>>>5]|=1<<24-r%32,n[(t.ceil((r+1)/o)*o>>>5)-1]|=128,e.sigBytes=4*n.length,this._process();for(var a=this._state,s=this.cfg.outputLength/8,u=s/8,c=[],l=0;l<u;l++){var h=a[l],f=h.high,d=h.low;f=16711935&(f<<8|f>>>24)|4278255360&(f<<24|f>>>8),d=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8),c.push(d),c.push(f)}return new i.init(c,s)},clone:function(){for(var e=o.clone.call(this),t=e._state=this._state.slice(0),n=0;n<25;n++)t[n]=t[n].clone();return e}});return n.SHA3=o._createHelper(C),n.HmacSHA3=o._createHmacHelper(C),e.SHA3}(n(39),n(174))},function(e,t,n){function r(e,t,n){return e&t|~e&n}function i(e,t,n){return e&n|t&~n}function o(e,t){return e<<t|e>>>32-t}var a,s,u,c,l,h,f,d,p;e.exports=(e=n(39),Math,p=(n=e).lib,a=p.WordArray,s=p.Hasher,p=n.algo,u=a.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),c=a.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),l=a.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),h=a.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),f=a.create([0,1518500249,1859775393,2400959708,2840853838]),d=a.create([1352829926,1548603684,1836072691,2053994217,0]),p=p.RIPEMD160=s.extend({_doReset:function(){this._hash=a.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var a=t+n,s=e[a];e[a]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}var p,m,g,A,v,b,y=this._hash.words,w=f.words,x=d.words,C=u.words,k=c.words,E=l.words,S=h.words,_=p=y[0],O=m=y[1],T=g=y[2],D=A=y[3],B=v=y[4];for(n=0;n<80;n+=1)b=(b=o(b=(b=p+e[t+C[n]]|0)+(n<16?(m^g^A)+w[0]:n<32?r(m,g,A)+w[1]:n<48?((m|~g)^A)+w[2]:n<64?i(m,g,A)+w[3]:(m^(g|~A))+w[4])|0,E[n]))+v|0,p=v,v=A,A=o(g,10),g=m,m=b,b=(b=o(b=(b=_+e[t+k[n]]|0)+(n<16?(O^(T|~D))+x[0]:n<32?i(O,T,D)+x[1]:n<48?((O|~T)^D)+x[2]:n<64?r(O,T,D)+x[3]:(O^T^D)+x[4])|0,S[n]))+B|0,_=B,B=D,D=o(T,10),T=O,O=b;b=y[1]+g+D|0,y[1]=y[2]+A+B|0,y[2]=y[3]+v+_|0,y[3]=y[4]+p+O|0,y[4]=y[0]+m+T|0,y[0]=b},_doFinalize:function(){for(var e,t=this._data,n=t.words,r=8*this._nDataBytes,i=(e=(n[(e=8*t.sigBytes)>>>5]|=128<<24-e%32,n[14+(64+e>>>9<<4)]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8),t.sigBytes=4*(n.length+1),this._process(),this._hash)).words,o=0;o<5;o++){var a=i[o];i[o]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8)}return e},clone:function(){var e=s.clone.call(this);return e._hash=this._hash.clone(),e}}),n.RIPEMD160=s._createHelper(p),n.HmacRIPEMD160=s._createHmacHelper(p),e.RIPEMD160)},function(e,t,n){var r,i,o,a,s,u;e.exports=(e=n(39),n(222),n(223),r=(o=(n=e).lib).Base,i=o.WordArray,a=(o=n.algo).SHA1,s=o.HMAC,u=o.PBKDF2=r.extend({cfg:r.extend({keySize:4,hasher:a,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n=this.cfg,r=s.create(n.hasher,e),o=i.create(),a=i.create([1]),u=o.words,c=a.words,l=n.keySize,h=n.iterations;u.length<l;){for(var f=r.update(t).finalize(a),d=(r.reset(),f.words),p=d.length,m=f,g=1;g<h;g++){m=r.finalize(m),r.reset();for(var A=m.words,v=0;v<p;v++)d[v]^=A[v]}o.concat(f),c[0]++}return o.sigBytes=4*l,o}}),n.PBKDF2=function(e,t,n){return u.create(n).compute(e,t)},e.PBKDF2)},function(e,t,n){var r;e.exports=(r=n(39),n(57),r.mode.CFB=function(){var e=r.lib.BlockCipherMode.extend();function t(e,t,n,r){var i,o=this._iv;o?(i=o.slice(0),this._iv=void 0):i=this._prevBlock,r.encryptBlock(i,0);for(var a=0;a<n;a++)e[t+a]^=i[a]}return e.Encryptor=e.extend({processBlock:function(e,n){var r=this._cipher,i=r.blockSize;t.call(this,e,n,i,r),this._prevBlock=e.slice(n,n+i)}}),e.Decryptor=e.extend({processBlock:function(e,n){var r=this._cipher,i=r.blockSize,o=e.slice(n,n+i);t.call(this,e,n,i,r),this._prevBlock=o}}),e}(),r.mode.CFB)},function(e,t,n){var r;e.exports=(r=n(39),n(57),r.mode.CTR=function(){var e=r.lib.BlockCipherMode.extend(),t=e.Encryptor=e.extend({processBlock:function(e,t){var n=this._cipher,r=n.blockSize,i=this._iv,o=this._counter,a=(i&&(o=this._counter=i.slice(0),this._iv=void 0),o.slice(0));n.encryptBlock(a,0),o[r-1]=o[r-1]+1|0;for(var s=0;s<r;s++)e[t+s]^=a[s]}});return e.Decryptor=t,e}(),r.mode.CTR)},function(e,t,n){var r;e.exports=(r=n(39),n(57),
/** @preserve
	 * Counter block mode compatible with  Dr Brian Gladman fileenc.c
	 * derived from CryptoJS.mode.CTR
	 * Jan Hruby jhruby.web@gmail.com
	 */
r.mode.CTRGladman=function(){var e=r.lib.BlockCipherMode.extend();function t(e){var t,n,r;return 255==(e>>24&255)?(n=e>>8&255,r=255&e,255==(t=e>>16&255)?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e=(e+=t<<16)+(n<<8)+r):e+=1<<24,e}var n=e.Encryptor=e.extend({processBlock:function(e,n){var r=this._cipher,i=r.blockSize,o=this._iv,a=this._counter,s=(o&&(a=this._counter=o.slice(0),this._iv=void 0),0===((o=a)[0]=t(o[0]))&&(o[1]=t(o[1])),a.slice(0));r.encryptBlock(s,0);for(var u=0;u<i;u++)e[n+u]^=s[u]}});return e.Decryptor=n,e}(),r.mode.CTRGladman)},function(e,t,n){var r;e.exports=(r=n(39),n(57),r.mode.OFB=function(){var e=r.lib.BlockCipherMode.extend(),t=e.Encryptor=e.extend({processBlock:function(e,t){var n=this._cipher,r=n.blockSize,i=this._iv,o=this._keystream;i&&(o=this._keystream=i.slice(0),this._iv=void 0),n.encryptBlock(o,0);for(var a=0;a<r;a++)e[t+a]^=o[a]}});return e.Decryptor=t,e}(),r.mode.OFB)},function(e,t,n){var r;e.exports=(r=n(39),n(57),r.mode.ECB=function(){var e=r.lib.BlockCipherMode.extend();return e.Encryptor=e.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),e.Decryptor=e.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),e}(),r.mode.ECB)},function(e,t,n){e.exports=(e=n(39),n(57),e.pad.AnsiX923={pad:function(e,t){var n=(n=e.sigBytes)+(t=(t=4*t)-n%t)-1;e.clamp(),e.words[n>>>2]|=t<<24-n%4*8,e.sigBytes+=t},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},e.pad.Ansix923)},function(e,t,n){var r;e.exports=(r=n(39),n(57),r.pad.Iso10126={pad:function(e,t){t*=4,t-=e.sigBytes%t,e.concat(r.lib.WordArray.random(t-1)).concat(r.lib.WordArray.create([t<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},r.pad.Iso10126)},function(e,t,n){var r;e.exports=(r=n(39),n(57),r.pad.Iso97971={pad:function(e,t){e.concat(r.lib.WordArray.create([2147483648],1)),r.pad.ZeroPadding.pad(e,t)},unpad:function(e){r.pad.ZeroPadding.unpad(e),e.sigBytes--}},r.pad.Iso97971)},function(e,t,n){e.exports=(e=n(39),n(57),e.pad.ZeroPadding={pad:function(e,t){t*=4,e.clamp(),e.sigBytes+=t-(e.sigBytes%t||t)},unpad:function(e){var t=e.words,n=e.sigBytes-1;for(n=e.sigBytes-1;0<=n;n--)if(t[n>>>2]>>>24-n%4*8&255){e.sigBytes=n+1;break}}},e.pad.ZeroPadding)},function(e,t,n){e.exports=(e=n(39),n(57),e.pad.NoPadding={pad:function(){},unpad:function(){}},e.pad.NoPadding)},function(e,t,n){var r,i;e.exports=(e=n(39),n(57),r=e.lib.CipherParams,i=e.enc.Hex,e.format.Hex={stringify:function(e){return e.ciphertext.toString(i)},parse:function(e){return e=i.parse(e),r.create({ciphertext:e})}},e.format.Hex)},function(e,t,n){e.exports=function(e){for(var t=e,n=t.lib.BlockCipher,r=t.algo,i=[],o=[],a=[],s=[],u=[],c=[],l=[],h=[],f=[],d=[],p=[],m=0;m<256;m++)p[m]=m<128?m<<1:m<<1^283;var g=0,A=0;for(m=0;m<256;m++){var v=A^A<<1^A<<2^A<<3^A<<4;v=v>>>8^255&v^99,i[g]=v,o[v]=g;var b=p[g],y=p[b],w=p[y],x=257*p[v]^16843008*v;a[g]=x<<24|x>>>8,s[g]=x<<16|x>>>16,u[g]=x<<8|x>>>24,c[g]=x;x=16843009*w^65537*y^257*b^16843008*g;l[v]=x<<24|x>>>8,h[v]=x<<16|x>>>16,f[v]=x<<8|x>>>24,d[v]=x,g?(g=b^p[p[p[w^b]]],A^=p[p[A]]):g=A=1}var C=[0,1,2,4,8,16,32,64,128,27,54],k=r.AES=n.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,n=e.sigBytes/4,r=4*((this._nRounds=n+6)+1),o=this._keySchedule=[],a=0;a<r;a++)a<n?o[a]=t[a]:(c=o[a-1],a%n?n>6&&a%n==4&&(c=i[c>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c]):(c=i[(c=c<<8|c>>>24)>>>24]<<24|i[c>>>16&255]<<16|i[c>>>8&255]<<8|i[255&c],c^=C[a/n|0]<<24),o[a]=o[a-n]^c);for(var s=this._invKeySchedule=[],u=0;u<r;u++){a=r-u;if(u%4)var c=o[a];else c=o[a-4];s[u]=u<4||a<=4?c:l[i[c>>>24]]^h[i[c>>>16&255]]^f[i[c>>>8&255]]^d[i[255&c]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,a,s,u,c,i)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,l,h,f,d,o);n=e[t+1];e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,r,i,o,a,s){for(var u=this._nRounds,c=e[t]^n[0],l=e[t+1]^n[1],h=e[t+2]^n[2],f=e[t+3]^n[3],d=4,p=1;p<u;p++){var m=r[c>>>24]^i[l>>>16&255]^o[h>>>8&255]^a[255&f]^n[d++],g=r[l>>>24]^i[h>>>16&255]^o[f>>>8&255]^a[255&c]^n[d++],A=r[h>>>24]^i[f>>>16&255]^o[c>>>8&255]^a[255&l]^n[d++],v=r[f>>>24]^i[c>>>16&255]^o[l>>>8&255]^a[255&h]^n[d++];c=m,l=g,h=A,f=v}m=(s[c>>>24]<<24|s[l>>>16&255]<<16|s[h>>>8&255]<<8|s[255&f])^n[d++],g=(s[l>>>24]<<24|s[h>>>16&255]<<16|s[f>>>8&255]<<8|s[255&c])^n[d++],A=(s[h>>>24]<<24|s[f>>>16&255]<<16|s[c>>>8&255]<<8|s[255&l])^n[d++],v=(s[f>>>24]<<24|s[c>>>16&255]<<16|s[l>>>8&255]<<8|s[255&h])^n[d++];e[t]=m,e[t+1]=g,e[t+2]=A,e[t+3]=v},keySize:8});return t.AES=n._createHelper(k),e.AES}(n(39),(n(129),n(130),n(118),n(57)))},function(e,t,n){function r(e,t){t=(this._lBlock>>>e^this._rBlock)&t,this._rBlock^=t,this._lBlock^=t<<e}function i(e,t){t=(this._rBlock>>>e^this._lBlock)&t,this._lBlock^=t,this._rBlock^=t<<e}var o,a,s,u,c,l,h,f,d;e.exports=(e=n(39),n(129),n(130),n(118),n(57),a=(n=e).lib,o=a.WordArray,a=a.BlockCipher,d=n.algo,s=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],u=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],c=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],l=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],h=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],f=d.DES=a.extend({_doReset:function(){for(var e=this._key.words,t=[],n=0;n<56;n++){var r=s[n]-1;t[n]=e[r>>>5]>>>31-r%32&1}for(var i=this._subKeys=[],o=0;o<16;o++){var a=i[o]=[],l=c[o];for(n=0;n<24;n++)a[n/6|0]|=t[(u[n]-1+l)%28]<<31-n%6,a[4+(n/6|0)]|=t[28+(u[n+24]-1+l)%28]<<31-n%6;for(a[0]=a[0]<<1|a[0]>>>31,n=1;n<7;n++)a[n]=a[n]>>>4*(n-1)+3;a[7]=a[7]<<5|a[7]>>>27}var h=this._invSubKeys=[];for(n=0;n<16;n++)h[n]=i[15-n]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,n){this._lBlock=e[t],this._rBlock=e[t+1],r.call(this,4,252645135),r.call(this,16,65535),i.call(this,2,858993459),i.call(this,8,16711935),r.call(this,1,1431655765);for(var o=0;o<16;o++){for(var a=n[o],s=this._lBlock,u=this._rBlock,c=0,f=0;f<8;f++)c|=l[f][((u^a[f])&h[f])>>>0];this._lBlock=u,this._rBlock=s^c}var d=this._lBlock;this._lBlock=this._rBlock,this._rBlock=d,r.call(this,1,1431655765),i.call(this,8,16711935),i.call(this,2,858993459),r.call(this,16,65535),r.call(this,4,252645135),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2}),n.DES=a._createHelper(f),d=d.TripleDES=a.extend({_doReset:function(){if(2!==(n=this._key.words).length&&4!==n.length&&n.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var e=n.slice(0,2),t=n.length<4?n.slice(0,2):n.slice(2,4),n=n.length<6?n.slice(0,2):n.slice(4,6);this._des1=f.createEncryptor(o.create(e)),this._des2=f.createEncryptor(o.create(t)),this._des3=f.createEncryptor(o.create(n))},encryptBlock:function(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t)},decryptBlock:function(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t)},keySize:6,ivSize:2,blockSize:2}),n.TripleDES=a._createHelper(d),e.TripleDES)},function(e,t,n){function r(){for(var e=this._S,t=this._i,n=this._j,r=0,i=0;i<4;i++){n=(n+e[t=(t+1)%256])%256;var o=e[t];e[t]=e[n],e[n]=o,r|=e[(e[t]+e[n])%256]<<24-8*i}return this._i=t,this._j=n,r}var i,o,a;e.exports=(e=n(39),n(129),n(130),n(118),n(57),i=(n=e).lib.StreamCipher,a=n.algo,o=a.RC4=i.extend({_doReset:function(){for(var e=this._key,t=e.words,n=e.sigBytes,r=this._S=[],i=0;i<256;i++)r[i]=i;i=0;for(var o=0;i<256;i++){var a=t[(a=i%n)>>>2]>>>24-a%4*8&255;o=(o+r[i]+a)%256,a=r[i];r[i]=r[o],r[o]=a}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=r.call(this)},keySize:8,ivSize:0}),n.RC4=i._createHelper(o),a=a.RC4Drop=o.extend({cfg:o.cfg.extend({drop:192}),_doReset:function(){o._doReset.call(this);for(var e=this.cfg.drop;0<e;e--)r.call(this)}}),n.RC4Drop=i._createHelper(a),e.RC4)},function(e,t,n){function r(){for(var e=this._X,t=this._C,n=0;n<8;n++)a[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<a[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<a[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<a[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<a[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<a[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<a[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<a[6]>>>0?1:0)|0,this._b=t[7]>>>0<a[7]>>>0?1:0,n=0;n<8;n++){var r=e[n]+t[n],i=65535&r,o=r>>>16;s[n]=((i*i>>>17)+i*o>>>15)+o*o^((4294901760&r)*r|0)+((65535&r)*r|0)}e[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,e[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,e[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,e[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,e[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,e[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,e[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,e[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}var i,o,a,s,u;e.exports=(e=n(39),n(129),n(130),n(118),n(57),i=(n=e).lib.StreamCipher,u=n.algo,o=[],a=[],s=[],u=u.Rabbit=i.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,n=0;n<4;n++)e[n]=16711935&(e[n]<<8|e[n]>>>24)|4278255360&(e[n]<<24|e[n]>>>8);var i=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],o=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(n=this._b=0;n<4;n++)r.call(this);for(n=0;n<8;n++)o[n]^=i[n+4&7];if(t){var a,s=(a=16711935&((a=(t=t.words)[0])<<8|a>>>24)|4278255360&(a<<24|a>>>8))>>>16|4294901760&(t=16711935&((t=t[1])<<8|t>>>24)|4278255360&(t<<24|t>>>8)),u=t<<16|65535&a;for(o[0]^=a,o[1]^=s,o[2]^=t,o[3]^=u,o[4]^=a,o[5]^=s,o[6]^=t,o[7]^=u,n=0;n<4;n++)r.call(this)}},_doProcessBlock:function(e,t){var n=this._X;r.call(this),o[0]=n[0]^n[5]>>>16^n[3]<<16,o[1]=n[2]^n[7]>>>16^n[5]<<16,o[2]=n[4]^n[1]>>>16^n[7]<<16,o[3]=n[6]^n[3]>>>16^n[1]<<16;for(var i=0;i<4;i++)o[i]=16711935&(o[i]<<8|o[i]>>>24)|4278255360&(o[i]<<24|o[i]>>>8),e[t+i]^=o[i]},blockSize:4,ivSize:2}),n.Rabbit=i._createHelper(u),e.Rabbit)},function(e,t,n){function r(){for(var e=this._X,t=this._C,n=0;n<8;n++)a[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<a[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<a[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<a[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<a[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<a[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<a[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<a[6]>>>0?1:0)|0,this._b=t[7]>>>0<a[7]>>>0?1:0,n=0;n<8;n++){var r=e[n]+t[n],i=65535&r,o=r>>>16;s[n]=((i*i>>>17)+i*o>>>15)+o*o^((4294901760&r)*r|0)+((65535&r)*r|0)}e[0]=s[0]+(s[7]<<16|s[7]>>>16)+(s[6]<<16|s[6]>>>16)|0,e[1]=s[1]+(s[0]<<8|s[0]>>>24)+s[7]|0,e[2]=s[2]+(s[1]<<16|s[1]>>>16)+(s[0]<<16|s[0]>>>16)|0,e[3]=s[3]+(s[2]<<8|s[2]>>>24)+s[1]|0,e[4]=s[4]+(s[3]<<16|s[3]>>>16)+(s[2]<<16|s[2]>>>16)|0,e[5]=s[5]+(s[4]<<8|s[4]>>>24)+s[3]|0,e[6]=s[6]+(s[5]<<16|s[5]>>>16)+(s[4]<<16|s[4]>>>16)|0,e[7]=s[7]+(s[6]<<8|s[6]>>>24)+s[5]|0}var i,o,a,s,u;e.exports=(e=n(39),n(129),n(130),n(118),n(57),i=(n=e).lib.StreamCipher,u=n.algo,o=[],a=[],s=[],u=u.RabbitLegacy=i.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,n=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],i=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]],o=this._b=0;o<4;o++)r.call(this);for(o=0;o<8;o++)i[o]^=n[o+4&7];if(t){var a=(t=16711935&((t=(e=t.words)[0])<<8|t>>>24)|4278255360&(t<<24|t>>>8))>>>16|4294901760&(e=16711935&((e=e[1])<<8|e>>>24)|4278255360&(e<<24|e>>>8)),s=e<<16|65535&t;for(i[0]^=t,i[1]^=a,i[2]^=e,i[3]^=s,i[4]^=t,i[5]^=a,i[6]^=e,i[7]^=s,o=0;o<4;o++)r.call(this)}},_doProcessBlock:function(e,t){var n=this._X;r.call(this),o[0]=n[0]^n[5]>>>16^n[3]<<16,o[1]=n[2]^n[7]>>>16^n[5]<<16,o[2]=n[4]^n[1]>>>16^n[7]<<16,o[3]=n[6]^n[3]>>>16^n[1]<<16;for(var i=0;i<4;i++)o[i]=16711935&(o[i]<<8|o[i]>>>24)|4278255360&(o[i]<<24|o[i]>>>8),e[t+i]^=o[i]},blockSize:4,ivSize:2}),n.RabbitLegacy=i._createHelper(u),e.RabbitLegacy)},function(e,t,n){},function(e,t,n){},function(e,t,n){"use strict";n.r(t);var r={};function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}n.r(r),n.d(r,"updateProps",(function(){return tT})),n.d(r,"initProps",(function(){return nT})),n.d(r,"removeElement",(function(){return iT})),n.d(r,"removeElementWithFadeOut",(function(){return aT})),n.d(r,"isElementRemoved",(function(){return rT})),n.d(r,"extendShape",(function(){return ON})),n.d(r,"extendPath",(function(){return TN})),n.d(r,"registerShape",(function(){return DN})),n.d(r,"getShapeClass",(function(){return BN})),n.d(r,"makePath",(function(){return IN})),n.d(r,"makeImage",(function(){return MN})),n.d(r,"mergePath",(function(){return NN})),n.d(r,"resizePath",(function(){return FN})),n.d(r,"subPixelOptimizeLine",(function(){return RN})),n.d(r,"subPixelOptimizeRect",(function(){return PN})),n.d(r,"subPixelOptimize",(function(){return LN})),n.d(r,"getTransform",(function(){return UN})),n.d(r,"applyTransform",(function(){return zN})),n.d(r,"transformDirection",(function(){return HN})),n.d(r,"groupTransition",(function(){return QN})),n.d(r,"clipPointsByRect",(function(){return VN})),n.d(r,"clipRectByRect",(function(){return qN})),n.d(r,"createIcon",(function(){return GN})),n.d(r,"linePolygonIntersect",(function(){return WN})),n.d(r,"lineLineIntersect",(function(){return KN})),n.d(r,"setTooltipConfig",(function(){return YN})),n.d(r,"traverseElements",(function(){return JN})),n.d(r,"Group",(function(){return cE})),n.d(r,"Image",(function(){return B_})),n.d(r,"Text",(function(){return nO})),n.d(r,"Circle",(function(){return hj})),n.d(r,"Ellipse",(function(){return pj})),n.d(r,"Sector",(function(){return Bj})),n.d(r,"Ring",(function(){return jj})),n.d(r,"Polygon",(function(){return Uj})),n.d(r,"Polyline",(function(){return Qj})),n.d(r,"Rect",(function(){return z_})),n.d(r,"Line",(function(){return Kj})),n.d(r,"BezierCurve",(function(){return tN})),n.d(r,"Arc",(function(){return oN})),n.d(r,"IncrementalDisplayable",(function(){return kN})),n.d(r,"CompoundPath",(function(){return uN})),n.d(r,"LinearGradient",(function(){return fN})),n.d(r,"RadialGradient",(function(){return pN})),n.d(r,"BoundingRect",(function(){return Zx})),n.d(r,"OrientedBoundingRect",(function(){return wN})),n.d(r,"Point",(function(){return $x})),n.d(r,"Path",(function(){return C_}));var a=function(){function e(t){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"",r=this,i=e;if(!(r instanceof i))throw new TypeError("Cannot call a class as a function");"string"==typeof t?(this.el=document.createElement(t),this.el.className=n):this.el=t,this.data={}}var t,n;return t=e,(n=[{key:"data",value:function(e,t){return void 0!==t?(this.data[e]=t,this):this.data[e]}},{key:"on",value:function(e,t){var n=(e=function(e){return function(e){if(Array.isArray(e))return e}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){var n;if(e)return"string"==typeof e?i(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e.split(".")))[0],r=e.slice(1);return"mousewheel"===(e=n)&&/Firefox/i.test(window.navigator.userAgent)&&(e="DOMMouseScroll"),this.el.addEventListener(e,(function(e){t(e);for(var n=0;n<r.length;n+=1){var i=r[n];if("left"===i&&0!==e.button)return;if("right"===i&&2!==e.button)return;"stop"===i&&e.stopPropagation()}})),this}},{key:"offset",value:function(e){var t,n=this;return void 0!==e?(Object.keys(e).forEach((function(t){n.css(t,"".concat(e[t],"px"))})),this):{top:(t=this.el).offsetTop,left:t.offsetLeft,height:t.offsetHeight,width:t.offsetWidth}}},{key:"scroll",value:function(e){var t=this.el;return void 0!==e&&(void 0!==e.left&&(t.scrollLeft=e.left),void 0!==e.top&&(t.scrollTop=e.top)),{left:t.scrollLeft,top:t.scrollTop}}},{key:"box",value:function(){return this.el.getBoundingClientRect()}},{key:"parent",value:function(){return new e(this.el.parentNode)}},{key:"children",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return 0===arguments.length?this.el.childNodes:(n.forEach((function(t){return e.child(t)})),this)}},{key:"removeChild",value:function(e){this.el.removeChild(e)}},{key:"child",value:function(t,n){var r=t;return"string"==typeof t?r=document.createTextNode(t):t instanceof e&&(r=t.el),this.el.appendChild(r),this}},{key:"innerHTML",value:function(e){return this.el.innerHTML=e,this}},{key:"contains",value:function(e){return this.el.contains(e)}},{key:"className",value:function(e){return void 0!==e?(this.el.className=e,this):this.el.className}},{key:"addClass",value:function(e){return this.el.classList.add(e),this}},{key:"hasClass",value:function(e){return this.el.classList.contains(e)}},{key:"removeClass",value:function(e){return this.el.classList.remove(e),this}},{key:"toggle",value:function(){return this.toggleClass(0<arguments.length&&void 0!==arguments[0]?arguments[0]:"active")}},{key:"toggleClass",value:function(e){return this.el.classList.toggle(e)}},{key:"active",value:function(){var e=!(0<arguments.length&&void 0!==arguments[0])||arguments[0],t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"active";return e?this.addClass(t):this.removeClass(t),this}},{key:"checked",value:function(){return this.active(!(0<arguments.length&&void 0!==arguments[0])||arguments[0],"checked"),this}},{key:"disabled",value:function(){return 0<arguments.length&&void 0!==arguments[0]&&!arguments[0]?this.removeClass("disabled"):this.addClass("disabled"),this}},{key:"attr",value:function(e,t){var n=this;if(void 0!==t)this.el.setAttribute(e,t);else{if("string"==typeof e)return this.el.getAttribute(e);Object.keys(e).forEach((function(t){n.el.setAttribute(t,e[t])}))}return this}},{key:"removeAttr",value:function(e){return this.el.removeAttribute(e),this}},{key:"html",value:function(e){return void 0!==e?(this.el.innerHTML=e,this):this.el.innerHTML}},{key:"val",value:function(e){return void 0!==e?(this.el.value=e,this):this.el.value}},{key:"focus",value:function(){this.el.focus()}},{key:"cssRemoveKeys",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.forEach((function(t){return e.el.style.removeProperty(t)})),this}},{key:"css",value:function(e,t){var n=this;return void 0===t&&"string"!=typeof e?(Object.keys(e).forEach((function(t){n.el.style[t]=e[t]})),this):void 0!==t?(this.el.style[e]=t,this):this.el.style[e]}},{key:"computedStyle",value:function(){return window.getComputedStyle(this.el,null)}},{key:"show",value:function(){return this.css("display","block"),this}},{key:"hide",value:function(){return this.css("display","none"),this}}])&&o(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),s=function(e){return new a(e,1<arguments.length&&void 0!==arguments[1]?arguments[1]:"")},u=n(14);function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(e,t)||function(e,t){var n;if(e)return"string"==typeof e?l(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function h(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var f=function(){function e(t,n,r,i){var o=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,a=5<arguments.length&&void 0!==arguments[5]?arguments[5]:0,s=this,u=e;if(!(s instanceof u))throw new TypeError("Cannot call a class as a function");this.sri=t,this.sci=n,this.eri=r,this.eci=i,this.w=o,this.h=a}var t,n,r;return t=e,r=[{key:"valueOf",value:function(t){t=t.split(":");var n,r=(n=c(Object(u.b)(t[0]),2))[0],i=n=n[1],o=r;return 1<t.length&&(o=(t=c(Object(u.b)(t[1]),2))[0],i=t[1]),new e(n,r,i,o)}}],(n=[{key:"set",value:function(e,t,n,r){this.sri=e,this.sci=t,this.eri=n,this.eci=r}},{key:"multiple",value:function(){return 0<this.eri-this.sri||0<this.eci-this.sci}},{key:"includes",value:function(){for(var e=0,t=0,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];1===r.length?(t=(o=c(Object(u.b)(r[0]),2))[0],e=o[1]):2===r.length&&(e=r[0],t=r[1]);var o=this.sri,a=this.sci,s=this.eri,l=this.eci;return o<=e&&e<=s&&a<=t&&t<=l}},{key:"each",value:function(e){for(var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:function(){return!0},n=this.sri,r=this.sci,i=this.eri,o=this.eci,a=n;a<=i;a+=1)if(t(a))for(var s=r;s<=o;s+=1)e(a,s)}},{key:"contains",value:function(e){return this.sri<=e.sri&&this.sci<=e.sci&&this.eri>=e.eri&&this.eci>=e.eci}},{key:"within",value:function(e){return this.sri>=e.sri&&this.sci>=e.sci&&this.eri<=e.eri&&this.eci<=e.eci}},{key:"disjoint",value:function(e){return this.sri>e.eri||this.sci>e.eci||e.sri>this.eri||e.sci>this.eci}},{key:"intersects",value:function(e){return this.sri<=e.eri&&this.sci<=e.eci&&e.sri<=this.eri&&e.sci<=this.eci}},{key:"union",value:function(t){var n=this.sri,r=this.sci,i=this.eri,o=this.eci;return new e(t.sri<n?t.sri:n,t.sci<r?t.sci:r,t.eri>i?t.eri:i,t.eci>o?t.eci:o)}},{key:"difference",value:function(t){function n(t,n,i,o){r.push(new e(t,n,i,o))}var r=[],i=this.sri,o=this.sci,a=this.eri,s=this.eci,u=t.sri-i,c=t.sci-o,l=a-t.eri,h=s-t.eci;return 0<u?(n(i,o,t.sri-1,s),0<l?(n(t.eri+1,o,a,s),0<c&&n(t.sri,o,t.eri,t.sci-1),0<h&&n(t.sri,t.eci+1,t.eri,s)):(0<c&&n(t.sri,o,a,t.sci-1),0<h&&n(t.sri,t.eci+1,a,s))):0<l&&(n(t.eri+1,o,a,s),0<c&&n(i,o,t.eri,t.sci-1),0<h&&n(i,t.eci+1,t.eri,s)),0<c?(n(i,o,a,t.sci-1),0<h?(n(i,t.eri+1,a,s),0<u&&n(i,t.sci,t.sri-1,t.eci),0<l&&n(t.sri+1,t.sci,a,t.eci)):(0<u&&n(i,t.sci,t.sri-1,s),0<l&&n(t.sri+1,t.sci,a,s))):0<h&&(n(a,t.eci+1,a,s),0<u&&n(i,o,t.sri-1,t.eci),0<l&&n(t.eri+1,o,a,t.eci)),r}},{key:"size",value:function(){return[this.eri-this.sri+1,this.eci-this.sci+1]}},{key:"toString",value:function(){var e=this.sri,t=this.sci,n=this.eri,r=this.eci;t=Object(u.e)(t,e);return this.multiple()?"".concat(t,":").concat(Object(u.e)(r,n)):t}},{key:"clone",value:function(){return new e(this.sri,this.sci,this.eri,this.eci,this.w,this.h)}},{key:"equals",value:function(e){return this.eri===e.eri&&this.eci===e.eci&&this.sri===e.sri&&this.sci===e.sci}}])&&h(t.prototype,n),r&&h(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var p=function(){function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.range=new f(0,0,0,0),this.ri=0,this.ci=0}var t,n;return t=e,(n=[{key:"multiple",value:function(){return this.range.multiple()}},{key:"setIndexes",value:function(e,t){this.ri=e,this.ci=t}},{key:"size",value:function(){return this.range.size()}}])&&d(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function m(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var g=function(e,t,n){return t&&m(e.prototype,t),n&&m(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.x=0,this.y=0,this.ri=0,this.ci=0,this.XDirection=1,this.YDirection=1,this.fx=0,this.fy=0,this.lastX=0,this.lastY=0}));function A(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var v=function(){function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.undoItems=[],this.redoItems=[]}var t,n;return t=e,(n=[{key:"add",value:function(e){this.undoItems.push(_.cloneDeep(e)),this.redoItems=[]}},{key:"canUndo",value:function(){return 0<this.undoItems.length}},{key:"canRedo",value:function(){return 0<this.redoItems.length}},{key:"undo",value:function(e,t){var n=this.undoItems,r=this.redoItems;this.canUndo()&&(r.push(_.cloneDeep(e)),t(n.pop()))}},{key:"redo",value:function(e,t){var n=this.undoItems,r=this.redoItems;this.canRedo()&&(n.push(_.cloneDeep(e)),t(r.pop()))}}])&&A(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function b(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var y=function(){function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.range=null,this.state="clear"}var t,n;return t=e,(n=[{key:"copy",value:function(e){return this.range=e,this.state="copy",this}},{key:"cut",value:function(e){return this.range=e,this.state="cut",this}},{key:"isCopy",value:function(){return"copy"===this.state}},{key:"isCut",value:function(){return"cut"===this.state}},{key:"isClear",value:function(){return"clear"===this.state}},{key:"clear",value:function(){this.range=null,this.state="clear"}}])&&b(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function w(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function x(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function C(e,t,n){t&&x(e.prototype,t),n&&x(e,n),Object.defineProperty(e,"prototype",{writable:!1})}var k=function(){function e(t,n,r){w(this,e),this.ci=t,this.operator=n,this.value=r}return C(e,[{key:"set",value:function(e,t){this.operator=e,this.value=t}},{key:"includes",value:function(e){var t=this.operator,n=this.value;return"all"===t||"in"===t&&n.includes(e)}},{key:"vlength",value:function(){var e=this.operator,t=this.value;return"in"===e?t.length:0}},{key:"getData",value:function(){return{ci:this.ci,operator:this.operator,value:this.value}}}]),e}(),E=function(){function e(t,n){w(this,e),this.ci=t,this.order=n}return C(e,[{key:"asc",value:function(){return"asc"===this.order}},{key:"desc",value:function(){return"desc"===this.order}}]),e}(),S=function(){function e(){w(this,e),this.ref=null,this.filters=[],this.sort=null}return C(e,[{key:"setData",value:function(e){var t=e.ref,n=e.filters;e=e.sort;null!=t&&(this.ref=t,this.fitlers=n.map((function(e){return new k(e.ci,e.operator,e.value)})),e&&(this.sort=new E(e.ci,e.order)))}},{key:"getData",value:function(){var e,t,n;return this.active()?(e=this.ref,t=this.filters,n=this.sort,{ref:e,filters:t.map((function(e){return e.getData()})),sort:n}):{}}},{key:"addFilter",value:function(e,t,n){var r=this.getFilter(e);null==r?this.filters.push(new k(e,t,n)):r.set(t,n)}},{key:"setSort",value:function(e,t){this.sort=t?new E(e,t):null}},{key:"includes",value:function(e,t){return!!this.active()&&this.hrange().includes(e,t)}},{key:"getSort",value:function(e){var t=this.sort;return t&&t.ci===e?t:null}},{key:"getFilter",value:function(e){for(var t=this.filters,n=0;n<t.length;n+=1)if(t[n].ci===e)return t[n];return null}},{key:"filteredRows",value:function(e){var t=new Set,n=new Set;if(this.active())for(var r=this.range(),i=r.sri,o=r.eri,a=this.filters,s=i+1;s<=o;s+=1)for(var u=0;u<a.length;u+=1){var c=a[u],l=(l=e(s,c.ci))?l.text:"";if(!c.includes(l)){t.add(s);break}n.add(s)}return{rset:t,fset:n}}},{key:"items",value:function(e,t){var n={};if(this.active())for(var r=this.range(),i=r.sri,o=r.eri,a=i+1;a<=o;a+=1){var s,u=t(a,e);null===u||/^\s*$/.test(u.text)?n[""]=(n[""]||0)+1:(s=(n[u=u.text]||0)+1,n[u]=s)}return n}},{key:"range",value:function(){return f.valueOf(this.ref)}},{key:"hrange",value:function(){var e=this.range();return e.eri=e.sri,e}},{key:"clear",value:function(){this.ref=null,this.filters=[],this.sort=null}},{key:"active",value:function(){return null!==this.ref}}]),e}();function O(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var T=function(){function e(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],n=this,r=e;if(!(n instanceof r))throw new TypeError("Cannot call a class as a function");this._=t}var t,n;return t=e,(n=[{key:"forEach",value:function(e){this._.forEach(e)}},{key:"each",value:function(e){for(var t=0;t<this._.length;t++)e(this._[t])}},{key:"deleteWithin",value:function(e){this._=this._.filter((function(t){return!t.within(e)}))}},{key:"getFirstIncludes",value:function(e,t){for(var n=0;n<this._.length;n+=1){var r=this._[n];if(r.includes(e,t))return r}return null}},{key:"filterIntersects",value:function(t){return new e(this._.filter((function(e){return e.intersects(t)})))}},{key:"intersects",value:function(e){for(var t=0;t<this._.length;t+=1)if(this._[t].intersects(e))return!0;return!1}},{key:"union",value:function(e){var t=e;return this._.forEach((function(e){e.intersects(t)&&(t=e.union(t))})),t}},{key:"clear",value:function(){for(var e=0;e<this._.length;e++){var t=this._[e];t.eri===t.sri&&t.sci===t.eci&&(this._.splice(e,1),e--)}}},{key:"add",value:function(e){this.deleteWithin(e),this._.push(e)}},{key:"addMerge",value:function(e,t,n,r){e=new f(e,t,n,r),this.add(e)}},{key:"shift",value:function(e,t,n,r){this._.forEach((function(i){var o=i.sri,a=i.sci,s=i.eri,u=i.eci;"row"===e?t<=o?(i.sri+=n,i.eri+=n):o<t&&t<=s&&(i.eri+=n,r(o,a,n,0)):"column"===e&&(t<=a?(i.sci+=n,i.eci+=n):a<t&&t<=u&&(i.eci+=n,r(o,a,0,n)))}))}},{key:"move",value:function(e,t,n){this._.forEach((function(r){r.within(e)&&(r.eri+=t,r.sri+=t,r.sci+=n,r.eci+=n)}))}},{key:"setData",value:function(e){return this._=e.map((function(e){return f.valueOf(e)})),this}},{key:"getData",value:function(){return this._.map((function(e){return e.toString()}))}}])&&O(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),D=n(38);function B(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(e,t)||function(e,t){var n;if(e)return"string"==typeof e?I(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?I(e,t):void 0}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function I(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function M(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var j=function(){function e(t){var n=t.len,r=t.height;t=t.minHeight;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this._={},this.len=n,this.height=r,this.eventMap=new Map,this.minHeight=t}var t,n;return t=e,(n=[{key:"getHeight",value:function(e){return this.isHide(e)?0:((e=this.get(e))&&e.height?e:this).height}},{key:"setHeight",value:function(e,t){var n=this.getOrNew(e);t<=0?(this.setHide(e,!0),n.height=0):n.height=t}},{key:"setAuto",value:function(e,t){this.getOrNew(e).auto=t}},{key:"on",value:function(e,t){return this.eventMap.set(e,t),this}},{key:"trigger",value:function(e){var t=this.eventMap;if(t.has(e)){for(var n=arguments.length,r=new Array(1<n?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];(t=t.get(e)).call.apply(t,[this].concat(r))}}},{key:"removeBlankRow",value:function(){}},{key:"unhide",value:function(e){for(var t=e;0<t&&this.isHide(--t);)this.setHide(t,!1)}},{key:"my_unhide",value:function(e){for(var t=e;0<t&&this.isHide(--t);)this.setHide(t,!1)}},{key:"cellFold",value:function(e,t,n,r,i,o){var a=null;a=this||o;if(this||(a=o),e){var s=e.fold;o=null,e=null;if(null!=i&&(s.isOpen=i),s.isOpen){o=s.closeIcon,e=s.closeColor;for(var u=0;u<=s.row;u++)a.setHide(t+u,!1)}else{o=s.openIcon,e=s.openColor;for(var c=t+Number(s.showRow),l=0;l<=s.row;l++){var h=t+l;h===c?a.setHide(h,!1):a.setHide(h,!0)}}n.FoldIcon(r,o,e)}}},{key:"isHide",value:function(e){return(e=this.get(e))&&e.hide}},{key:"setHide",value:function(e,t){e=this.getOrNew(e),!0===t?e.hide=!0:delete e.hide}},{key:"setStyle",value:function(e,t){this.getOrNew(e).style=t}},{key:"sumHeight",value:function(e,t,n){var r=this;return D.a.rangeSum(e,t,(function(e){return n&&n.has(e)?0:r.getHeight(e)}))}},{key:"totalHeight",value:function(){return this.sumHeight(0,this.len)}},{key:"get",value:function(e){return this._[e]}},{key:"getCols",value:function(e){var t,n={};for(t in this._)for(var r in this._[t]){var i=this._[t].cells;i&&i[e]&&(n[t]=i[e])}return n}},{key:"getOrNew",value:function(e){return this._[e]=this._[e]||{cells:{}},this._[e]}},{key:"getCell",value:function(e,t){return void 0!==(e=this.get(e))&&void 0!==e.cells&&void 0!==e.cells[t]?e.cells[t]:null}},{key:"getCellMerge",value:function(e,t){return(e=this.getCell(e,t))&&e.merge?e.merge:[0,0]}},{key:"getCellOrNew",value:function(e,t){return(e=this.getOrNew(e)).cells[t]=e.cells[t]||{},e.cells[t]}},{key:"setCell",value:function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:"all";e=this.getOrNew(e);"all"===r?e.cells[t]=n:"text"===r?(e.cells[t]=e.cells[t]||{},e.cells[t].text=n.text):"format"===r&&(e.cells[t]=e.cells[t]||{},e.cells[t].style=n.style,n.merge&&(e.cells[t].merge=n.merge))}},{key:"setCellText",value:function(e,t,n){this.getCellOrNew(e,t).text=n}},{key:"setCellPlaceholder",value:function(e,t,n){this.getCellOrNew(e,t).placeholder=n}},{key:"setCellImgText",value:function(e,t,n){this.getCellOrNew(e,t).imgText=n}},{key:"setCellBindObj",value:function(e,t,n){this.getCellOrNew(e,t).bindObj=n}},{key:"setCellWarning",value:function(e,t,n){this.getCellOrNew(e,t).warn=n}},{key:"setCellValueType",value:function(e,t,n){this.getCellOrNew(e,t).valueType=n}},{key:"setCellConfig",value:function(e,t,n,r){this.getCellOrNew(e,t)[n]=r}},{key:"setCellExpansion",value:function(e,t,n){this.getCellOrNew(e,t).Expansion=n}},{key:"setCellOrder",value:function(e,t,n){this.getCellOrNew(e,t).Order=n}},{key:"setCellAxisType",value:function(e,t,n){this.getCellOrNew(e,t).AxisType=n}},{key:"setCellAggregate",value:function(e,t,n){this.getCellOrNew(e,t).Aggregate=n}},{key:"setCellMerge",value:function(e,t,n){this.getCellOrNew(e,t).Merge=n}},{key:"setCellMyFormat",value:function(e,t,n){this.getCellOrNew(e,t).myFormat=n}},{key:"setCellBindFrozen",value:function(e,t,n){this.getCellOrNew(e,t).forzen=n}},{key:"copyPaste",value:function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]&&arguments[3],i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:function(){},o=e.sri,a=e.sci,s=e.eri,c=e.eci,l=t.sri,h=t.sci,f=t.eri,d=t.eci,p=(e=B(e.size(),2))[0],m=e[1],g=(t=(e=B(t.size(),2))[0],e=e[1],!0),A=0;(f<o||d<a)&&(g=!1,A=f<o?t:e);for(var v=o;v<=s;v+=1)if(this._[v])for(var b=a;b<=c;b+=1)if(this._[v].cells&&this._[v].cells[b])for(var y=l;y<=f;y+=p)for(var w=h;w<=d;w+=m){var x=y+(v-o),C=w+(b-a),k=D.a.cloneDeep(this._[v].cells[b]);r&&k&&k.text&&0<k.text.length&&function(){var e,t,n=k.text,r=w-h+(y-l)+2;g||(r-=A+1),"="===n[0]?k.text=n.replace(/\w{1,3}\d/g,(function(e){var t=0,n=0;return o===l?t=r-1:n=r-1,Object(u.a)(e,t,n)})):null!==(e=/[\\.\d]+$/.exec(n))&&(t=Number(e[0])+r-1,k.text=n.substring(0,e.index)+t)}(),this.setCell(x,C,k,n),i(x,C,k)}}},{key:"cutPaste",value:function(e,t){var n=this,r={};this.each((function(i){n.eachCells(i,(function(o){var a=parseInt(i,10),s=parseInt(o,10);e.includes(i,o)&&(a=t.sri+(a-e.sri),s=t.sci+(s-e.sci)),r[a]=r[a]||{cells:{}},r[a].cells[s]=n._[i].cells[o]}))})),this._=r}},{key:"paste",value:function(e,t){var n,r,i=this;e.length<=0||(n=t.sri,r=t.sci,e.forEach((function(e,t){var o=n+t;e.forEach((function(e,t){var n,a=r+t;if(e&&e.constructor===Object){if(!("editable"in e)||0!=e.editable)for(var s in e)Object.hasOwnProperty.call(e,s)&&(n=e[s],i.setCellConfig(o,a,s,n))}else i.setCellText(o,a,e)}))})))}},{key:"insert",value:function(e){var t=this,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1,r={};this.each((function(i,o){var a=parseInt(i,10);e<=a&&(a+=n),t.eachCells(i,(function(r,i){i.text&&"="===i.text[0]&&(i.text=i.text.replace(/[a-zA-Z]{1,3}\d+/g,(function(r){return Object(u.a)(r,0,n,t.iRowFormulaCb,e)})))})),r[a]=o})),this._=r,this.len+=n}},{key:"iRowFormulaCb",value:function(e,t,n,r,i){return n<e?Object(u.e)(t+r,n):Object(u.e)(t+r,n+i)}},{key:"delete",value:function(e,t,n){var r=this,i=t-e+1,o={};this.each((function(a,s){var c=parseInt(a,10);c<e?o[c]=s:t<a&&(o[c-i]=s),r.eachCells(a,(function(o,c){c.text&&"="===c.text[0]&&(c.text=c.text.replace(/[a-zA-Z]{1,3}\d+/g,(function(e){return Object(u.a)(e,0,-i,r.dRowFormulaCb,t)}))),n&&e<=a&&a<parseInt(t)+1&&c.merge&&c.merge[0]>=i&&r.changeMerge(a,e,t,o,c,i,s,n)}))})),this._=o,this.len-=i}},{key:"changeMerge",value:function(e,t,n,r,i,o,a,s){var u=this;if((e=(e=parseInt(e),t=parseInt(t),n=parseInt(n),r=parseInt(r),parseInt(e)+1))>parseInt(n)){var c=i.merge;if(!this._[e].cells[r]){(l={}).text=i.text,l.merge=[c[0]-o,c[1]],0!=i.style&&!i.style||(l.style=i.style),u._[e].cells[r]=l;for(var l=e+c[0]-o,h=(u=r+c[1],l=new f(e,r,l,u),s._),d=0;d<h.length;d++){var p=h[d];if(p.sri==t&&p.sci==r&&p.eri==t+c[0]&&p.eci==r+c[1]){h.splice(d,1);break}}h.push(l)}}else this.changeMerge(e,t,n,r,i,o,a,s)}},{key:"dRowFormulaCb",value:function(e,t,n,r,i){return e<n?Object(u.e)(t+r,n+i):Object(u.e)(t+r,n)}},{key:"insertColumn",value:function(e){var t=this,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1;this.each((function(r,i){var o={};t.eachCells(r,(function(r,i){r=parseInt(r,10),e<=r&&(r+=n),i.text&&"="===i.text[0]&&(i.text=i.text.replace(/[a-zA-Z]{1,3}\d+/g,(function(r){return Object(u.a)(r,n,0,t.iColFormulaCb,e)}))),o[r]=i})),i.cells=o}))}},{key:"insertColumnRight",value:function(e){var t=this,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1;this.each((function(r,i){var o={};t.eachCells(r,(function(r,i){r=parseInt(r,10),e<r&&(r+=n),i.text&&"="===i.text[0]&&(i.text=i.text.replace(/[a-zA-Z]{1,3}\d+/g,(function(r){return Object(u.a)(r,n,0,t.iColFormulaCb,e)}))),o[r]=i})),i.cells=o}))}},{key:"iColFormulaCb",value:function(e,t,n,r,i){return t<e?Object(u.e)(t,n+i):Object(u.e)(t+r,n+i)}},{key:"deleteColumn",value:function(e,t){var n=this,r=t-e+1;this.each((function(i,o){var a={};n.eachCells(i,(function(i,o){(i=parseInt(i,10))<e?a[i]=o:t<i&&(a[i-r]=o),o.text&&"="===o.text[0]&&(o.text=o.text.replace(/[a-zA-Z]{1,3}\d+/g,(function(e){return Object(u.a)(e,-r,0,n.dColFormulaCb,t)})))})),o.cells=a}))}},{key:"dColFormulaCb",value:function(e,t,n,r,i){return e<t?Object(u.e)(t+r,n+i):Object(u.e)(t,n+i)}},{key:"deleteCells",value:function(e){var t=this,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"all",r=2<arguments.length?arguments[2]:void 0;e.each((function(e,i){t.deleteCell(e,i,n,r)}))}},{key:"deleteCell",value:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"all",r=3<arguments.length?arguments[3]:void 0,i=this.get(e),o=this.getCell(e,t);if("format"!=n&&this.trigger("deleteCell",o,n),!o||!("editable"in o)||o.editable||!r)if(r)null!==i&&null!==o&&("all"===n?delete i.cells[t]:"text"===n?delete o.text:"format"===n?(void 0!==o.style&&delete o.style,o.merge&&delete o.merge):"merge"===n&&o.merge&&delete o.merge);else if(null!==i&&null!==o)if("all"===n)delete i.cells[t];else if("text"===n)for(var a in o)"style"!=a&&"merge"!=a&&delete o[a];else"format"===n?(void 0!==o.style&&delete o.style,o.merge&&delete o.merge):"merge"===n&&o.merge&&delete o.merge}},{key:"maxCell",value:function(e){for(var t=Object.keys(this._),n=parseInt(t[t.length-1]),r=0,i={},o=0,a=0;a<t.length;a++){var s=t[a],u=this._[s];u&&function(){for(var t=u.cells,n=Object.keys(t),s=0,c=(n.forEach((function(e){parseInt(e)>s&&(s=parseInt(e))})),s),l=s;0<=l;l--){var h=t[l];if(h){var f=e[h.style];if(0===h.text||h.text||null!=f&&f.bgcolor||10==h.valueType)break}--c}o=c,i[a]=o,r<o&&(r=o)}()}for(var c=n;0<=c&&i[c]<0;c--)--n;for(var l=r=parseInt(r),h=0;h<t.length;h++){var f=t[h];!(f=this._[f])||(f=f.cells[r])&&"merge"in f&&(f=f.merge[1],r<f+l&&(r=f+l))}return[n,r]}},{key:"each",value:function(e){Object.entries(this._).forEach((function(t){var n=(t=B(t,2))[0];t=t[1];e(n,t)}))}},{key:"eachCells",value:function(e,t){this._[e]&&this._[e].cells&&Object.entries(this._[e].cells).forEach((function(e){var n=(e=B(e,2))[0];e=e[1];t(n,e)}))}},{key:"setData",value:function(e){e.len&&(this.len=e.len,delete e.len),this._=e}},{key:"getData",value:function(){var e=this.len;return Object.assign({len:e},this._)}}])&&M(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function N(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var F=function(){function e(t){var n=t.len,r=t.width,i=t.indexWidth;t=t.minWidth;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this._={},this.len=n,this.width=r,this.indexWidth=i,this.minWidth=t}var t,n;return t=e,(n=[{key:"setData",value:function(e){e.len&&(this.len=e.len,delete e.len),this._=e}},{key:"getData",value:function(){var e=this.len;return Object.assign({len:e},this._)}},{key:"removeBlankCol",value:function(){}},{key:"getWidth",value:function(e){return this.isHide(e)?0:((e=this._[e])&&e.width?e:this).width}},{key:"getShowWidth",value:function(e){return((e=this._[e])&&e.width?e:this).width}},{key:"insert",value:function(e){var t,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1,r={},i=this._;for(t in i){var o=parseInt(t,10),a=i[t];e<=o&&(o+=n),r[o]=a}this._=r,this.len+=n}},{key:"insertRight",value:function(e){var t,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1,r={},i=this._;for(t in i){var o=parseInt(t,10),a=i[t];e<o&&(o+=n),r[o]=a}this._=r,this.len+=n}},{key:"delete",value:function(e,t){var n,r=t-e+1,i={},o=this._;for(n in o){var a=parseInt(n,10),s=o[n];a<e?i[a]=s:t<a&&(i[a-r]=s)}this._=i,this.len-=t-e}},{key:"getOrNew",value:function(e){return this._[e]=this._[e]||{},this._[e]}},{key:"get",value:function(e){return this._[e]}},{key:"setWidth",value:function(e,t){var n=this.getOrNew(e);t<=0?(this.setHide(e,!0),n.width=0):n.width=t}},{key:"unhide",value:function(e){for(var t=e;0<t&&this.isHide(--t);)this.setHide(t,!1)}},{key:"my_unhide",value:function(e){for(var t=e;0<t&&this.isHide(--t);)this.setHide(t,!1)}},{key:"cellFold",value:function(e,t,n,r,i,o){var a=null;a=this||o;if(this||(a=o),e){var s=e.fold;o=null,e=null;if(null!=i&&(s.isOpen=i),s.isOpen){o=s.closeIcon,e=s.closeColor;for(var u=0;u<=s.col;u++)a.setHide(t+u,!1)}else{o=s.openIcon,e=s.openColor;for(var c=t+Number(s.showCol),l=0;l<=s.col;l++){var h=t+l;h===c?a.setHide(h,!1):a.setHide(h,!0)}}n.FoldIcon(r,o,e)}}},{key:"isHide",value:function(e){return(e=this._[e])&&e.hide}},{key:"setHide",value:function(e,t){e=this.getOrNew(e),!0===t?e.hide=!0:delete e.hide}},{key:"setStyle",value:function(e,t){this.getOrNew(e).style=t}},{key:"sumWidth",value:function(e,t){var n=this;return D.a.rangeSum(e,t,(function(e){return n.getWidth(e)}))}},{key:"totalWidth",value:function(){return this.sumWidth(0,this.len)}}])&&N(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),R="zh-cn",P={en:{toolbar:{undo:"Undo",redo:"Redo",print:"Print",paintformat:"Paint format",clearformat:"Clear format",format:"Format",fontName:"Font",fontSize:"Font size",fontBold:"Font bold",fontItalic:"Font italic",underline:"Underline",strike:"Strike",color:"Text color",bgcolor:"Fill color",border:"Borders",merge:"Merge cells",align:"Horizontal align",alignLeft:"Left align ",alignRight:"Right clign",alignCenter:"Center clign",indent:"Right indent",indentReduce:"Left indent",valign:"Vertical align",valignTop:"Top align",valignMiddle:"Middle align",valignBottom:"Bottom align",textwrap:"Text wrapping",freeze:"Freeze cell",autofilter:"Filter",formula:"Functions",more:"More",copy:"Copy",cut:"Cut",paste:"Paste",sheetSetting:"Sheet Setting",warn:"Warn",filter:"Filter",hyperlink:"Hyperlink",headerSetting:"HeaderSetting",reportSetting:"ReportSetting",printSetting:"PrintSetting",insertImage:"InsertImage",import:"Import",group:"Group"},contextmenu:{copy:"Copy",cut:"Cut",paste:"Paste",pasteValue:"Paste values only",pasteFormat:"Paste format only",hide:"Hide",insertRow:"Insert row",insertColumnLeft:"Insert column on the left",insertColumnRight:"Insert column on the right",deleteSheet:"Delete",copySheet:"Copy sheet",mergeSheet:"Merge sheet",deleteRow:"Delete row",deleteColumn:"Delete column",deleteCell:"Delete cell",deleteCellText:"Delete cell text",validation:"Data validations",cellprintable:"Enable export",cellnonprintable:"Disable export",celleditable:"Enable editing",cellnoneditable:"Disable editing"},print:{size:"Paper size",orientation:"Page orientation",orientations:["Landscape","Portrait"]},format:{normal:"Normal",text:"Plain Text",number:"Number",percent:"Percent",rmb:"RMB",usd:"USD",eur:"EUR",date:"Date",time:"Time",datetime:"Date time",duration:"Duration"},formula:{sum:"Sum",average:"Average",max:"Max",min:"Min",count:"Count",_if:"IF",and:"AND",or:"OR",concat:"Concat"},validation:{required:"it must be required",notMatch:"it not match its validation rule",between:"it is between {} and {}",notBetween:"it is not between {} and {}",notIn:"it is not in list",equal:"it equal to {}",notEqual:"it not equal to {}",lessThan:"it less than {}",lessThanEqual:"it less than or equal to {}",greaterThan:"it greater than {}",greaterThanEqual:"it greater than or equal to {}"},error:{pasteForMergedCell:"Unable to do this for merged cells"},calendar:{weeks:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"]},button:{next:"Next",cancel:"Cancel",remove:"Remove",save:"Save",ok:"OK"},sort:{desc:"Sort Z -> A",asc:"Sort A -> Z"},filter:{empty:"empty"},dataValidation:{mode:"Mode",range:"Cell Range",criteria:"Criteria",modeType:{cell:"Cell",column:"Colun",row:"Row"},type:{list:"List",number:"Number",date:"Date",phone:"Phone",email:"Email"},operator:{be:"between",nbe:"not betwwen",lt:"less than",lte:"less than or equal to",gt:"greater than",gte:"greater than or equal to",eq:"equal to",neq:"not equal to"}}},"zh-cn":{toolbar:{undo:"撤销",redo:"恢复",print:"打印",paintformat:"格式刷",clearformat:"清除格式",format:"数据格式",fontName:"字体",fontSize:"字号",fontBold:"加粗",fontItalic:"倾斜",underline:"下划线",strike:"删除线",color:"字体颜色",bgcolor:"填充颜色",border:"边框",merge:"合并单元格",align:"水平对齐",valign:"垂直对齐",textwrap:"自动换行",freeze:"冻结",autofilter:"自动筛选",formula:"函数",more:"更多",copy:"复制",cut:"剪切",paste:"粘贴",alignLeft:"居左对齐",alignRight:"居右对齐",alignCenter:"居中对齐",indent:"右缩进",indentReduce:"左缩进",valignTop:"靠上对齐",valignMiddle:"垂直对齐",valignBottom:"靠下对齐",sheetSetting:"表格设置",warn:"条件格式",filter:"数据过滤",hyperlink:"超级链接",headerSetting:"表头设置",reportSetting:"报表设置",printSetting:"打印设置",insertImage:"插入图片",import:"导入文件",group:"添加分组",chart:"插入图表"},contextmenu:{copy:"复制",cut:"剪切",paste:"粘贴",pasteValue:"粘贴数据",pasteFormat:"粘贴格式",hide:"隐藏",insertRow:"插入行",insertColumnLeft:"在左侧插入列",insertColumnRight:"在右侧插入列",deleteSheet:"删除",copySheet:"复制页签",mergeSheet:"合并表格",deleteRow:"删除行",deleteColumn:"删除列",deleteCell:"删除",deleteCellText:"删除数据",validation:"数据验证",cellprintable:"可打印",cellnonprintable:"不可打印",celleditable:"可编辑",cellnoneditable:"不可编辑"},print:{size:"纸张大小",orientation:"方向",orientations:["横向","纵向"]},format:{normal:"正常",text:"文本",number:"数值",percent:"百分比",rmb:"人民币",usd:"美元",eur:"欧元",date:"短日期",time:"时间",datetime:"长日期",duration:"持续时间"},formula:{sum:"求和",average:"求平均值",max:"求最大值",min:"求最小值",count:"计数",concat:"字符拼接",_if:"条件判断",and:"和",or:"或",getPage:"打印总页数",getCurrentPage:"当前页数",getParam:"参数映射"},validation:{required:"此值必填",notMatch:"此值不匹配验证规则",between:"此值应在 {} 和 {} 之间",notBetween:"此值不应在 {} 和 {} 之间",notIn:"此值不在列表中",equal:"此值应该等于 {}",notEqual:"此值不应该等于 {}",lessThan:"此值应该小于 {}",lessThanEqual:"此值应该小于等于 {}",greaterThan:"此值应该大于 {}",greaterThanEqual:"此值应该大于等于 {}"},error:{pasteForMergedCell:"无法对合并的单元格执行此操作"},calendar:{weeks:["日","一","二","三","四","五","六"],months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},button:{next:"下一步",cancel:"取消",remove:"删除",save:"保存",ok:"确认"},sort:{desc:"降序",asc:"升序"},filter:{empty:"空白"},dataValidation:{mode:"模式",range:"单元区间",criteria:"条件",modeType:{cell:"单元格",column:"列模式",row:"行模式"},type:{list:"列表",number:"数字",date:"日期",phone:"手机号",email:"电子邮件"},operator:{be:"在区间",nbe:"不在区间",lt:"小于",lte:"小于等于",gt:"大于",gte:"大于等于",eq:"等于",neq:"不等于"}}},nl:{toolbar:{undo:"Ongedaan maken",redo:"Opnieuw uitvoeren",paintformat:"Opmaak kopiëren/plakken",clearformat:"Opmaak wissen",format:"Opmaak",font:"Lettertype",fontSize:"Tekengrootte",fontBold:"Vet",fontItalic:"Cursief",underline:"Onderstrepen",strike:"Doorstrepen",textColor:"Tekstkleur",fillColor:"Opvulkleur",border:"Randen",merge:"Cellen samenvoegen",align:"Horizontale uitlijning",valign:"Verticale uitlijning",textwrap:"Terugloop",freeze:"Cel bevriezen",formula:"Functies",more:"Meer"},contextmenu:{copy:"Kopiëren",cut:"Knippen",paste:"Plakken",pasteValue:"Alleen waarden plakken",pasteFormat:"Alleen opmaak plakken",insertRow:"Rij invoegen",insertColumn:"Kolom invoegen",deleteRow:"Rij verwijderen",deleteColumn:"Kolom verwijderen",deleteCell:"Cel verwijderen",deleteCellText:"Celtekst verwijderen"},format:{normal:"Standaard",text:"Tekst",number:"Nummer",percent:"Percentage",rmb:"RMB",usd:"USD",date:"Datum",time:"Tijdstip",datetime:"Datum tijd",duration:"Duratie"},formula:{sum:"Som",average:"Gemiddelde",max:"Max",min:"Min",concat:"Concat"}},de:{toolbar:{undo:"Rückgängig machen",redo:"Wiederherstellen",paintformat:"Format kopieren/einfügen",clearformat:"Format löschen",format:"Format",font:"Schriftart",fontSize:"Schriftgrad",fontBold:"Fett",fontItalic:"Kursiv",underline:"Betonen",strike:"Streichen",textColor:"Text Farbe",fillColor:"Füllung Farbe",border:"Umrandung",merge:"Zellen verbinden",align:"Waagrechte Ausrichtung",valign:"Vertikale uitlijning",textwrap:"Textumbruch",freeze:"Zelle sperren",formula:"Funktionen",more:"Mehr"},contextmenu:{copy:"Kopieren",cut:"Ausschneiden",paste:"Einfügen",pasteValue:"Nur Werte einfügen",pasteFormat:"Nur Format einfügen",insertRow:"Zeile einfügen",insertColumn:"Spalte einfügen",deleteRow:"Zeile löschen",deleteColumn:"Spalte löschen",deleteCell:"Zelle löschen",deleteCellText:"Zellentext löschen"},format:{normal:"Regulär",text:"Text",number:"Nummer",percent:"Prozent",rmb:"RMB",usd:"USD",date:"Datum",time:"Termin",datetime:"Datum Termin",duration:"Dauer"},formula:{sum:"Summe",average:"Durchschnittliche",max:"Max",min:"Min",concat:"Concat"}}};function L(e,t){if(t&&t[R])for(var n=t[R],r=e.split("."),i=0;i<r.length;i+=1){var o=n[r[i]];if(i===r.length-1)return o;if(!o)return;n=o}}function U(e){var t,n=L(e,P);return(n=!n&&window&&(t=window.x_spreadsheet||window.XZReport||window.XZReportDesigner)?L(e,t.$messages):n)||""}function z(e){return function(){return U(e)}}function H(e,t){R=e,t&&(P[e]=t)}function $(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(e,t)||function(e,t){var n;if(e)return"string"==typeof e?Q(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Q(e,t):void 0}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Q(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function V(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var q={phone:/^[1-9]\d{10}$/,email:/w+([-+.]w+)*@w+([-.]w+)*.w+([-.]w+)*/};function G(e,t){var n="";if(!e){for(var r=arguments.length,i=new Array(2<r?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];n=U.apply(void 0,["validation.".concat(t)].concat(i))}return[e,n]}var W=function(){function e(t,n,r,i){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.required=n,this.value=r,this.type=t,this.operator=i,this.message=""}var t,n;return t=e,(n=[{key:"parseValue",value:function(e){var t=this.type;return"date"===t?new Date(e):"number"===t?Number(e):e}},{key:"equals",value:function(e){var t=this.type===e.type&&this.required===e.required&&this.operator===e.operator;return t&&(Array.isArray(this.value)?D.a.arrayEquals(this.value,e.value):this.value===e.value)}},{key:"values",value:function(){return this.value.split(",")}},{key:"validate",value:function(e){var t=this.required,n=this.operator,r=this.value,i=this.type;if(t&&/^\s*$/.test(e))return G(!1,"required");if(!/^\s*$/.test(e)){if(q[i]&&!q[i].test(e))return G(!1,"notMatch");if("list"===i)return G(this.values().includes(e),"notIn");if(n){if(t=this.parseValue(e),"be"===n)return e=(i=$(r,2))[0],i=i[1],G(t>=this.parseValue(e)&&t<=this.parseValue(i),"between",e,i);if("nbe"===n)return i=(e=$(r,2))[0],e=e[1],G(t<this.parseValue(i)||t>this.parseValue(e),"notBetween",i,e);if("eq"===n)return G(t===this.parseValue(r),"equal",r);if("neq"===n)return G(t!==this.parseValue(r),"notEqual",r);if("lt"===n)return G(t<this.parseValue(r),"lessThan",r);if("lte"===n)return G(t<=this.parseValue(r),"lessThanEqual",r);if("gt"===n)return G(t>this.parseValue(r),"greaterThan",r);if("gte"===n)return G(t>=this.parseValue(r),"greaterThanEqual",r)}}return[!0]}}])&&V(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function K(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Y(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function X(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function J(e,t,n){t&&X(e.prototype,t),n&&X(e,n),Object.defineProperty(e,"prototype",{writable:!1})}var Z=function(){function e(t,n,r){Y(this,e),this.refs=n,this.mode=t,this.validator=r}return J(e,[{key:"includes",value:function(e,t){for(var n=this.refs,r=0;r<n.length;r+=1)if(f.valueOf(n[r]).includes(e,t))return!0;return!1}},{key:"addRef",value:function(e){this.remove(f.valueOf(e)),this.refs.push(e)}},{key:"remove",value:function(e){var t=[];this.refs.forEach((function(n){var r=f.valueOf(n);r.intersects(e)?r.difference(e).forEach((function(e){return t.push(e.toString())})):t.push(n)})),this.refs=t}},{key:"getData",value:function(){var e=this.refs,t=this.mode,n=this.validator;return{refs:e,mode:t,type:n.type,required:n.required,operator:n.operator,value:n.value}}}],[{key:"valueOf",value:function(t){var n=t.refs,r=t.mode,i=t.type,o=t.required,a=t.operator;t=t.value;return new e(r,n,new W(i,o,t,a))}}]),e}(),ee=function(){function e(){Y(this,e),this._=[],this.errors=new Map}return J(e,[{key:"getError",value:function(e,t){return this.errors.get("".concat(e,"_").concat(t))}},{key:"validate",value:function(e,t,n){var r=this.get(e,t);e="".concat(e,"_").concat(t),t=this.errors;return null===r||(n=(r=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(e,t)||function(e,t){var n;if(e)return"string"==typeof e?K(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?K(e,t):void 0}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(r.validator.validate(n),2))[0],r=r[1],n)?t.delete(e):t.set(e,r),!0}},{key:"add",value:function(e,t,n){var r=n.type,i=n.required,o=n.value;n=n.operator,r=new W(r,i,o,n);null!==(i=this.getByValidator(r))?i.addRef(t):this._.push(new Z(e,[t],r))}},{key:"getByValidator",value:function(e){for(var t=0;t<this._.length;t+=1){var n=this._[t];if(n.validator.equals(e))return n}return null}},{key:"get",value:function(e,t){for(var n=0;n<this._.length;n+=1){var r=this._[n];if(r.includes(e,t))return r}return null}},{key:"remove",value:function(e){this.each((function(t){t.remove(e)}))}},{key:"each",value:function(e){this._.forEach((function(t){return e(t)}))}},{key:"getData",value:function(){return this._.filter((function(e){return 0<e.refs.length})).map((function(e){return e.getData()}))}},{key:"setData",value:function(e){this._=e.map((function(e){return Z.valueOf(e)}))}}]),e}();function te(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ne(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(e,t)||re(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function re(e,t){var n;if(e)return"string"==typeof e?ie(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ie(e,t):void 0}function ie(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function oe(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var ae={mode:"edit",view:{height:function(){return document.documentElement.clientHeight},width:function(){return document.documentElement.clientWidth}},adaptive:!1,showGrid:!0,showToolbar:!1,showPreviewToolbar:!0,showBottombar:!0,showBottombarMenu:!0,showFreeze:!0,showHeader:!0,showContextmenu:!1,showEditSheetName:!1,renderFormularText:!0,renderImgCell:!0,renderArrow:!0,isNoSelector:!0,showSelector:!0,showClipboard:!0,hideRowCol:!0,showSelect:!0,onQueryPlan:!1,disableRunScript:!1,disableFreeze:!1,row:{len:1,height:25,minHeight:0},designEdit:!1,col:{len:1,width:100,indexWidth:60,minWidth:0},style:{bgcolor:"#ffffff",align:"left",valign:"middle",textwrap:!1,strike:!1,underline:!1,color:"#0a0a0a",font:{name:"Arial",size:10,bold:!1,italic:!1},indent:0},thirdDataset:null,onUpdateData:null},se=[{type:3,rule:["quantile","multiplying","decimal","date"]},{type:2,rule:["removePreText","removeNextText","date"]},{type:1,rule:["quantile","multiplying","decimal"]}];function ue(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:function(){},r=this.merges,i=t.clone(),o=(e=ne(e.size(),2))[0],a=(e=e[1],(s=ne(t.size(),2))[0]),s=s[1];return a<o&&(i.eri=t.sri+o-1),s<e&&(i.eci=t.sci+e-1),!r.intersects(i)||(n(U("error.pasteForMergedCell")),!1)}function ce(e,t,n){var r=this,i=3<arguments.length&&void 0!==arguments[3]&&arguments[3],o=this.rows,a=this.merges,s=("all"!==n&&"format"!==n||(o.deleteCells(t,n),a.deleteWithin(t)),this.styles);o.copyPaste(e,t,n,i,(function(e,t,n){if(n&&n.merge){var i=(o=ne(n.merge,2))[0],o=o[1];if(i<=0&&o<=0)return;a.add(new f(e,t,e+i,t+o))}if(n&&n.bindObj&&(e=s[n.style])&&e.format){for(var u=(i=_.cloneDeep(e)).format,c=0;c<se.length;c++){var l=se[c],h=n.bindObj.type||n.bindObj.data_type;if(l.type==h){l.rule.forEach((function(e){delete u[e]}));break}}n.style=r.addStyle(i)}}))}function le(e,t,n){var r=this.styles;e=this.rows.getCellOrNew(e,t),t={};void 0!==e.style&&(t=D.a.cloneDeep(r[e.style])),t=D.a.merge(t,{border:n}),e.style=this.addStyle(t)}function he(e,t){for(var n=this.rows,r=this.settings,i=this.freezeTotalHeight(),o=r=r.hideRowCol?0:n.height,a=(i+r<e&&(o-=t),this.exceptRowSet),s=0,u=o,c=n.height;s<n.len&&!(e<u);s+=1)a.has(s)||(u+=c=n.getHeight(s));return(u-=c)<0?{ri:-1,top:0,height:c}:{ri:s-1,top:u,height:c}}function fe(e,t){var n=this.cols,r=this.settings,i=this.freezeTotalWidth(),o=r=r.hideRowCol?0:n.indexWidth;return i+r<e&&(o-=t),t=(i=ne(D.a.rangeReduceIf(0,n.len,o,r,e,(function(e){return n.getWidth(e)})),3))[0],o=i[1],e=i[2],o<0?{ci:-1,left:0,width:r}:{ci:t-1,left:o,width:e}}var de=function(){function e(t,n,r){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.settings=D.a.merge(ae,r||{}),this.name=t||"sheet",this._index=n||0,this.freeze=[0,0],this.styles=[],this.penetrates=[],this.XAxle=[],this.merges=new T,this.rows=new j(this.settings.row),this.cols=new F(this.settings.col),this.validations=new ee,this.hyperlinks={},this.comments={},this.groupConfig=[],this.selector=new p,this.scroll=new g,this.history=new v,this.clipboard=new y,this.autoFilter=new S,this.change=function(){},this.exceptRowSet=new Set,this.sortedRowMap=new Map,this.unsortedRowMap=new Map,this.fbi_vtotalDis=null,this.fbi_htotalDis=null,this.printRepeat=null,this.printParams=null,this.workBookPrint=null,this.printOptions=null,this.sheetScale=1,this.currentEditRowIdx=null,this.currentEditColIdx=null,this.freezeMergeMap={},this.collapse=[],this.error_msg=null,this._sheetGroupConfig=null,this._sheetPaging=null,this._sheetPageBase=null,this.waterMask=null,this.waterMaskImageConfig=null,this.warnMap=null,this.or=null,this.oc=null,this.toolbarButtonList=D.a.defaultToolbarButtons,this.paramsConfig=[],this.apiConfig={},this.thirdDatasetConfig=[],this.dataConfig=[]}var t,n;return t=e,(n=[{key:"setConfig",value:function(e,t){this[e]=t}},{key:"addValidation",value:function(e,t,n){var r=this;this.changeData((function(){r.validations.add(e,t,n)}))}},{key:"setCollapse",value:function(e){this.collapse=e}},{key:"getCollapse",value:function(){return this.collapse}},{key:"setFbiVDistance",value:function(e,t){this.fbi_vtotalDis=t}},{key:"setFbiHDistance",value:function(e,t){this.fbi_htotalDis=t}},{key:"on",value:function(e,t){return this.rows.on(e,t),this}},{key:"removeValidation",value:function(){var e=this,t=this.selector.range;this.changeData((function(){e.validations.remove(t)}))}},{key:"getSelectedValidator",value:function(){var e=(t=this.selector).ri,t=t.ci;return(e=this.validations.get(e,t))?e.validator:null}},{key:"getSelectedValidation",value:function(){var e=(n=this.selector).ri,t=n.ci,n=n.range;e=this.validations.get(e,t),t={ref:n.toString()};return null!==e&&(t.mode=e.mode,t.validator=e.validator),t}},{key:"canUndo",value:function(){return this.history.canUndo()}},{key:"canRedo",value:function(){return this.history.canRedo()}},{key:"undo",value:function(){var e=this;this.history.undo(this.getData(),(function(t){e.setData(t)}))}},{key:"redo",value:function(){var e=this;this.history.redo(this.getData(),(function(t){e.setData(t)}))}},{key:"copy",value:function(){this.clipboard.copy(this.selector.range)}},{key:"copyToSystemClipboard",value:function(){for(var e,t="",n=this.rows.getData(),r=this.selector.range.sri;r<=this.selector.range.eri;r+=1){if(oe(n,r))for(var i,o=this.selector.range.sci;o<=this.selector.range.eci;o+=1)o>this.selector.range.sci&&(t+="\t"),oe(n[r].cells,o)&&(null==(i=n[r].cells[o].text)&&(i=""),-1===(i=String(i)).indexOf("\n")&&-1===i.indexOf("\t")&&-1===i.indexOf('"')?t+=i:t+='"'.concat(i,'"'));else for(var a=this.selector.range.sci;a<=this.selector.range.eci;a+=1)t+="\t";t+="\n"}if(!navigator.clipboard||!window.isSecureContext)return(e=document.createElement("textarea")).value=t,e.style.position="absolute",e.style.opacity=0,e.style.left="-999999px",e.style.top="-999999px",document.body.appendChild(e),e.focus(),e.select(),new Promise((function(t,n){(document.execCommand("copy")?t:n)(),e.remove()}));navigator.clipboard.writeText(t).then((function(){}),(function(e){}))}},{key:"cut",value:function(){this.clipboard.cut(this.selector.range)}},{key:"paste",value:function(){var e=this,t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"all",n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:function(){},r=this.clipboard,i=this.selector;return!r.isClear()&&!!ue.call(this,r.range,i.range,n)&&(this.changeData((function(){r.isCopy()?ce.call(e,r.range,i.range,t):r.isCut()&&function(e,t){var n=this.clipboard,r=this.rows,i=this.merges;r.cutPaste(e,t),i.move(e,t.sri-e.sri,t.sci-e.sci),n.clear()}.call(e,r.range,i.range)})),!0)}},{key:"pasteFromText",value:function(e){var t=e.split("\r\n").map((function(e){return e.replace(/"/g,"").split("\t")})),n=(0<t.length&&--t.length,this.rows),r=this.selector;this.changeData((function(){n.paste(t,r.range)}))}},{key:"autofill",value:function(e,t){var n=this,r=this.selector.range;return!!ue.call(this,r,e,2<arguments.length&&void 0!==arguments[2]?arguments[2]:function(){})&&(this.changeData((function(){ce.call(n,r,e,t,!0)})),!0)}},{key:"clearClipboard",value:function(){this.clipboard.clear()}},{key:"calSelectedRangeByEnd",value:function(e,t){var n=this.selector,r=this.rows,i=this.cols,o=this.merges,a=(c=n.range).sri,s=c.sci,u=c.eri,c=c.eci,l=n.ri,h=n.ci,d=e,p=t;u=l<(d=e<0?r.len-1:d)?(a=l,d):(a=d,l),c=h<(p=t<0?i.len-1:p)?(s=h,p):(s=p,h);return n.range=o.union(new f(a,s,u,c)),n.range=o.union(n.range),n.range}},{key:"calSelectedRangeByStart",value:function(e,t){var n=this.selector,r=this.rows,i=this.cols,o=this.merges.getFirstIncludes(e,t);return null===o&&(o=new f(e,t,e,t),-1===e&&(o.sri=0,o.eri=r.len-1),-1===t&&(o.sci=0,o.eci=i.len-1)),n.range=o}},{key:"setSelectedCellFormat",value:function(e){var t=this;this.changeData((function(){var n=t.selector,r=t.styles,i=t.rows;n.range.each((function(n,o){n=i.getCellOrNew(n,o),o={},(o=void 0!==n.style?D.a.cloneDeep(r[n.style]):o).format=e,n.style=t.addStyle(o)}))}))}},{key:"setSelectedCellAttr",value:function(e,t){var n=this;this.changeData((function(){var r=n.selector,i=n.styles,o=n.rows;if("merge"===e){var a=o.getCellOrNew(r.range.sri,r.range.sci);t?(n.merge(),s={},a&&"style"in a&&Object.assign(s,i[a.style]),n.mergeStyle(a,s)):n.unmerge()}else if("border"===e)(function(e){var t=this,n=e.mode,r=e.style,i=e.color,o=this.styles,a=(e=this.selector,this.rows),s=e.range,u=s.sri,c=s.sci,l=s.eri,h=s.eci,f=!this.isSignleSelected();if(f||"inside"!==n&&"horizontal"!==n&&"vertical"!==n)if("outside"!==n||f)if("none"===n)e.range.each((function(e,n){(e=a.getCell(e,n))&&void 0!==e.style&&(delete(n=D.a.cloneDeep(o[e.style])).border,e.style=t.addStyle(n))}));else if("all"===n||"inside"===n||"outside"===n||"horizontal"===n||"vertical"===n)for(var d=[],p=u;p<=l;p+=1)for(var m=c;m<=h;m+=1){for(var g=[],A=0;A<d.length;A+=1){var v=(w=ne(d[A],4))[0],b=w[1],y=w[2],w=w[3];if(p===v+y+1&&g.push(A),v<=p&&p<=v+y&&m===b){m+=w+1;break}}if(g.forEach((function(e){return d.splice(e,1)})),h<m)break;var x=0,C=0,k=((k=a.getCell(p,m))&&k.merge&&(x=(k=ne(k.merge,2))[0],C=k[1],d.push([p,m,x,C])),0<x&&p+x===l),E=(x=0<C&&m+C===h,{});"all"===n?E={bottom:[r,i],top:[r,i],left:[r,i],right:[r,i]}:"inside"===n?(!x&&m<h&&(E.right=[r,i]),!k&&p<l&&(E.bottom=[r,i])):"horizontal"===n?!k&&p<l&&(E.bottom=[r,i]):"vertical"===n?!x&&m<h&&(E.right=[r,i]):"outside"===n&&f&&(u===p&&(E.top=[r,i]),!k&&l!==p||(E.bottom=[r,i]),c===m&&(E.left=[r,i]),!x&&h!==m||(E.right=[r,i])),0<Object.keys(E).length&&le.call(t,p,m,E),m+=C}else"top"===n||"bottom"===n?"top"===n?le.call(this,u,c,{top:[r,i]}):"bottom"===n&&le.call(this,u,c,{bottom:[r,i]}):"left"!==n&&"right"!==n||("left"===n?le.call(this,u,c,{left:[r,i]}):"right"===n&&le.call(this,u,c,{right:[r,i]}));else le.call(this,u,c,{top:[r,i],bottom:[r,i],left:[r,i],right:[r,i]})}).call(n,t);else if("formula"===e){a=r.ri;var s=r.ci,c=r.range;if(r.multiple()){var l=(h=ne(r.size(),2))[0],h=h[1],f=c.sri,d=c.sci,p=c.eri,m=c.eci;if(1<l)for(var g=d;g<=m;g+=1)o.getCellOrNew(p+1,g).text="=".concat(t,"(").concat(Object(u.e)(g,f),":").concat(Object(u.e)(g,p),")");else 1<h&&(o.getCellOrNew(a,m+1).text="=".concat(t,"(").concat(Object(u.e)(d,a),":").concat(Object(u.e)(m,a),")"))}else o.getCellOrNew(a,s).text="=".concat(t,"()")}else r.range.each((function(r,a){var s;r=o.getCellOrNew(r,a),a={};void 0!==r.style&&(a=D.a.cloneDeep(i[r.style])),"format"===e?(a.format=t,r.style=n.addStyle(a)):"font-bold"===e||"font-italic"===e||"font-name"===e||"font-size"===e?((s={})[e.split("-")[1]]=t,a.font=Object.assign(a.font||{},s),r.style=n.addStyle(a)):"strike"===e||"textwrap"===e||"underline"===e||"align"===e||"valign"===e||"color"===e||"bgcolor"===e||"indent"==e||"indentIsAdd"==e?(a[e]=t,r.style=n.addStyle(a)):r[e]=t}))}))}},{key:"mergeStyle",value:function(e,t){t.align="center",t.valign="middle",e.style=this.addStyle(t)}},{key:"setSelectedCellText",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"input",n=2<arguments.length?arguments[2]:void 0,r=3<arguments.length?arguments[3]:void 0,i=this.autoFilter,o=this.selector,a=this.rows,s=null,u=null,c=(s=n||o.ri,u=r||o.ci,n=s,(r=(this.unsortedRowMap.has(s)&&(n=this.unsortedRowMap.get(s)),a.getCell(n,u)))?r.text:"");this.setCellText(n,u,e,t),i.active()&&(o=i.getFilter(u))&&0<=(s=o.value.findIndex((function(e){return e===c})))&&o.value.splice(s,1,e)}},{key:"getSelectedCell",value:function(){var e=(t=this.selector).ri,t=t.ci,n=e;return this.unsortedRowMap.has(e)&&(n=this.unsortedRowMap.get(e)),this.rows.getCell(n,t)}},{key:"xyInSelectedRect",value:function(e,t){var n=(o=this.getSelectedRect()).left,r=o.top,i=o.width,o=o.height,a=this.cols,s=this.settings,u=this.rows;e-=s.hideRowCol?0:a.indexWidth,a=t-(s.hideRowCol?0:u.height);return n<e&&e<n+i&&r<a&&a<r+o}},{key:"getSelectedRect",value:function(e){return e=e||this.selector.range,this.getRect(e)}},{key:"getClipboardRect",value:function(){var e=this.clipboard;return e.isClear()?{left:-100,top:-100}:this.getRect(e.range)}},{key:"getRect",value:function(e){var t,n,r=this.scroll,i=this.rows,o=this.cols,a=this.exceptRowSet,s=e.sri,u=e.sci,c=e.eri;e=e.eci;return s<0&&u<0?{left:0,l:0,top:0,t:0,scroll:r}:(t=o.sumWidth(0,u),n=i.sumHeight(0,s,a),i=i.sumHeight(s,c+1,a),s=o.sumWidth(u,e+1),c=t-r.x,a=n-r.y,o=this.freezeTotalHeight(),{l:t,t:n,left:c=0<(u=this.freezeTotalWidth())&&t<u?t:c,top:a=0<o&&n<o?n:a,height:i,width:s,scroll:r})}},{key:"getCellRectByXY",value:function(e,t){var n=this.scroll,r=this.merges,i=this.rows,o=this.cols,a=(t=he.call(this,t,n.y)).ri,s=t.top,u=(t=t.height,n=(e=fe.call(this,e,n.x)).ci,e.left);e=e.width;return-1===n&&(e=o.totalWidth()),-1===a&&(t=i.totalHeight()),(0<=a||0<=n)&&(o=r.getFirstIncludes(a,n))&&(a=o.sri,n=o.sci,u=(i=this.cellRect(a,n)).left,s=i.top,e=i.width,t=i.height),{ri:a,ci:n,left:u,top:s,width:e,height:t}}},{key:"isSignleSelected",value:function(){var e=(r=this.selector.range).sri,t=r.sci,n=r.eri,r=r.eci;if((o=this.getCell(e,t))&&o.merge){var i=(o=ne(o.merge,2))[0],o=o[1];if(e+i===n&&t+o===r)return!0}return!this.selector.multiple()}},{key:"canUnmerge",value:function(){var e=(r=this.selector.range).sri,t=r.sci,n=r.eri,r=r.eci;if((o=this.getCell(e,t))&&o.merge){var i=(o=ne(o.merge,2))[0],o=o[1];if(e+i===n&&t+o===r)return!0}return!1}},{key:"merge",value:function(){var e,t,n,r,i,o=this,a=this.selector,s=this.rows;this.isSignleSelected()||(n=ne(a.size(),2),e=n[0],t=n[1],(1<e||1<t)&&(n=a.range,r=n.sri,i=n.sci,this.changeData((function(){var n=s.getCellOrNew(r,i);n.merge=[e-1,t-1],o.merges.add(a.range),o.rows.deleteCells(a.range),o.rows.setCell(r,i,n)}))))}},{key:"getViewCoordinate",value:function(e){}},{key:"unmerge",value:function(){var e,t,n,r=this,i=this.selector;this.isSignleSelected()&&(e=i.range,t=e.sri,n=e.sci,this.changeData((function(){r.rows.deleteCell(t,n,"merge"),r.merges.deleteWithin(i.range)})))}},{key:"canAutofilter",value:function(){return!this.autoFilter.active()}},{key:"autofilter",value:function(){var e=this,t=this.autoFilter,n=this.selector;this.changeData((function(){t.active()?(t.clear(),e.exceptRowSet=new Set,e.sortedRowMap=new Map,e.unsortedRowMap=new Map):t.ref=n.range.toString()}))}},{key:"setAutoFilter",value:function(e,t,n,r){var i=this.autoFilter;i.addFilter(e,n,r),i.setSort(e,t),this.resetAutoFilter()}},{key:"resetAutoFilter",value:function(){var e,t,n,r,i=this,o=this.autoFilter,a=this.rows;o.active()&&(e=o.sort,t=(o=o.filteredRows((function(e,t){return a.getCell(e,t)}))).rset,o=o.fset,n=Array.from(o),r=Array.from(o),e&&n.sort((function(t,n){return"asc"===e.order?t-n:"desc"===e.order?n-t:0})),this.exceptRowSet=t,this.sortedRowMap=new Map,this.unsortedRowMap=new Map,n.forEach((function(e,t){i.sortedRowMap.set(r[t],e),i.unsortedRowMap.set(e,r[t])})))}},{key:"deleteCell",value:function(){var e=this,t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"all",n=this.selector,r=this.settings;this.changeData((function(){e.rows.deleteCells(n.range,t,r.designEdit),"all"!==t&&"format"!==t||e.merges.deleteWithin(n.range)}))}},{key:"insert",value:function(e){var t=this,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1,r=2<arguments.length?arguments[2]:void 0;this.changeData((function(){var i=t.selector.range.sci,o=r||t.selector.range.sri,a=t.rows,s=t.merges,u=t.cols,c=o,l={};"row"===e?(a.insert(o,n),l={index:o,n:n,type:"ir",cb:a.iRowFormulaCb},t.groupConfigChange(l)):"column"===e&&(u.insert(i,n),a.insertColumn(i,n),l={index:i,n:n,type:"ic",cb:a.iColFormulaCb},t.groupConfigChange(l),c=i,u.len+=1),s.shift(e,c,n,(function(e,t,n,r){(e=a.getCell(e,t)).merge[0]+=n,e.merge[1]+=r}))}))}},{key:"insertCR",value:function(){var e=this,t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:1,n=1<arguments.length?arguments[1]:void 0;this.changeData((function(){var r,i=e.selector.range.eci,o=(n||e.selector.range.sri,e.rows),a=e.merges,s=e.cols;s.insertRight(i,t),o.insertColumnRight(i,t),r={index:i,n:t,type:"ic",cb:o.iColFormulaCb},e.groupConfigChange(r),r=i,s.len+=1,a.shift("column",r,t,(function(e,t,n,r){(e=o.getCell(e,t)).merge[0]+=n,e.merge[1]+=r}))}))}},{key:"groupConfigChange",value:function(e){var t=this.groupConfig;this.rows;try{this.groupChange(t,e)}catch(e){}}},{key:"groupChange",value:function(e,t){var n=this,r=t.index,i=t.n,o=t.type,a=t.cb;return e.forEach((function(e){e.children&&n.groupChange(e.children,t);var s=(c=e.label.split("-"))[0],c=c[1],l=("ir"==o?(s=Object(u.a)(s,0,i,a,r),c=Object(u.a)(c,0,i,a,r)):"dr"==o?(s=Object(u.a)(s,0,-i,a,r),c=Object(u.a)(c,0,-i,a,r)):"ic"==o?(s=Object(u.a)(s,i,0,a,r),c=Object(u.a)(c,i,0,a,r)):"dc"==o&&(s=Object(u.a)(s,-i,0,a,r),c=Object(u.a)(c,-i,0,a,r)),Object(u.b)(s)),h=Object(u.b)(c);e.label=s+"-"+c,e.sri=l[1],e.sci=l[0],e.eri=h[1],e.eci=h[0]})),e}},{key:"delete",value:function(e,t){var n=this;this.changeData((function(){var r,i,o,a,s,u,c,l=n.rows,h=n.merges,f=n.selector,d=n.cols,p=(f=t?(c=(a=t).rsize,t.csize):(a=f.range,c=(f=f.range.size())[0],f[1]),u=a.sri,r=a.sci,i=a.eri,o=a.eci,u),m={};"row"===e?(s=i-u+1,t?l.delete(u,i,h):l.delete(u,i),m={index:i,n:s,type:"dr",cb:l.dRowFormulaCb},n.groupConfigChange(m)):"column"===e&&(u=o-r+1,d.delete(r,o),l.deleteColumn(r,o),m={index:o,n:u,type:"dc",cb:l.dColFormulaCb},n.groupConfigChange(m),p=a.sci,c=f,d.len-=o-r+1),h.shift(e,p,-c,(function(e,t,n,r){(e=l.getCell(e,t)).merge[0]+=n,e.merge[1]+=r,0===e.merge[0]&&0===e.merge[1]&&delete e.merge}))}))}},{key:"scrollx",value:function(e,t){var n=this.scroll,r=(this.freeze,this.cols),i=this.freeze,o=(i=ne(i=this.settings.disableFreeze?[0,0]:i,2)[1],(i=ne(D.a.rangeReduceIf(i,r.len,0,0,e,(function(e){return r.getWidth(e)})),3))[0]),a=i[1];i=i[2];e>=n.fx?n.XDirection=1:n.XDirection=-1,0<e&&(a+=i),n.fx=e,n.x!==a&&(n.ci=0<e?o:0,n.lastX=n.x,n.x=a,t())}},{key:"scrolly",value:function(e,t){var n=this.scroll,r=(this.freeze,this.rows),i=this.freeze,o=(i=ne(i=this.settings.disableFreeze?[0,0]:i,1)[0],(i=ne(D.a.rangeReduceIf(i,r.len,0,0,e,(function(e){return r.getHeight(e)})),3))[0]),a=i[1];i=i[2];e>=n.fy?n.YDirection=1:n.YDirection=-1,0<e&&(a+=i),n.fy=e,n.y!==a&&(n.ri=0<e?o:0,n.lastY=n.y,n.y=a,t())}},{key:"cellRect",value:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,r=this.rows,i=this.cols,o=i.sumWidth(3<arguments.length&&void 0!==arguments[3]?arguments[3]:0,t),a=(n=r.sumHeight(n,e),r.getCell(e,t)),s=i.getWidth(t),u=i.getShowWidth(t),c=r.getHeight(e);if(null!==a&&a.merge){var l=ne(a.merge,2),h=l[0],f=l[1];if(0<h)for(var d=1;d<=h;d+=1)c+=r.getHeight(e+d);if(0<f)for(var p=1;p<=f;p+=1)s+=i.getWidth(t+p),u+=i.getShowWidth(t+1)}return{left:o,top:n,width:s,height:c,cell:a,showWidth:u}}},{key:"mycellRect",value:function(e,t){var n=this.rows,r=this.cols,i=r.sumWidth(0,t),o=n.sumHeight(0,e),a=n.getCell(e,t);return{left:i,top:o,width:r.getWidth(t),height:n.getHeight(e),cell:a}}},{key:"getCheckedRows",value:function(){var e=this.rows,t=[],n=[];return e.each((function(r,i){e.eachCells(r,(function(e,o){o&&o.isChecked&&-1==n.indexOf(r)&&t.push(i)}))})),t}},{key:"myMergeCellRect",value:function(e,t,n){var r=this.rows,i=this.cols,o=i.sumWidth(0,t),a=r.sumHeight(0,e),s=r.getCell(e,t),u=i.getWidth(t),c=r.getHeight(e);if(n){var l=(n=ne(n,2))[0],h=n[1];if(0<l)for(var f=1;f<=l;f+=1)c+=r.getHeight(e+f);if(0<h)for(var d=1;d<=h;d+=1)u+=i.getWidth(t+d)}return{left:o,top:a,width:u,height:c,cell:s}}},{key:"getCell",value:function(e,t){return this.rows.getCell(e,t)}},{key:"getCellValue",value:function(e,t){var n,r=this.interfaceData;return r&&(n=null,(n=(r=r.rows[e]||{}).cells?r.cells[t]:n)&&(0===n.text||n.text))?n.text:""}},{key:"getCellTextOrDefault",value:function(e,t){return(e=this.getCell(e,t))&&(0===e.text||e.text)?e.text:""}},{key:"getCellStyle",value:function(e,t){return(e=this.getCell(e,t))&&void 0!==e.style?this.styles[e.style]:null}},{key:"getCellStyleOrDefault",value:function(e,t){var n=this.styles;t=(e=this.rows.getCell(e,t))&&void 0!==e.style?n[e.style]:{};return D.a.merge(this.defaultStyle(),t||{})}},{key:"getStyle",value:function(e){return this.styles[e]}},{key:"getSelectedCellStyle",value:function(){var e=(t=this.selector).ri,t=t.ci;return this.getCellStyleOrDefault(e,t)}},{key:"isStartEditing",value:function(e,t){return null===this.currentEditRowIdx&&null===this.currentEditColIdx&&(this.currentEditRowIdx=e,this.currentEditColIdx=t,!0)}},{key:"stopEditing",value:function(){this.currentEditRowIdx=null,this.currentEditColIdx=null}},{key:"setCellText",value:function(e,t,n,r){var i=this.rows,o=this.history,a=this.validations;"finished"===r?(i.setCellText(e,t,n),this.stopEditing()):(this.isStartEditing(e,t)&&o.add(this.getData()),i.setCellText(e,t,n),this.change(this.getData())),a.validate(e,t,n)}},{key:"setCellPlaceholder",value:function(e,t,n,r){var i=this.rows,o=this.history;this.validations,"finished"===r?(i.setCellPlaceholder(e,t,""),o.add(this.getData()),i.setCellPlaceholder(e,t,n)):(i.setCellPlaceholder(e,t,n),this.change(this.getData()))}},{key:"setCellImgText",value:function(e,t,n){var r=this.rows;this.history,this.validations,r.setCellImgText(e,t,n),this.change(this.getData())}},{key:"setCellBindObj",value:function(e,t,n){var r=this.rows;this.history,this.validations,r.setCellBindObj(e,t,n),this.change(this.getData())}},{key:"setCellConfig",value:function(e,t,n,r){this.rows.setCellConfig(e,t,n,r),this.change(this.getData())}},{key:"setCellWarning",value:function(e,t,n){var r=this.rows;this.history,this.validations,r.setCellWarning(e,t,n),this.change(this.getData())}},{key:"setCellValueType",value:function(e,t,n){var r=this.rows;this.history,this.validations,r.setCellValueType(e,t,n),this.change(this.getData())}},{key:"setCellExpansion",value:function(e,t,n){var r=this.rows;this.history,this.validations,r.setCellExpansion(e,t,n),this.change(this.getData())}},{key:"setCellAxisType",value:function(e,t,n){var r=this.rows;this.history,this.validations,r.setCellAxisType(e,t,n),this.change(this.getData())}},{key:"setCellAggregate",value:function(e,t,n){var r=this.rows;this.history,this.validations,r.setCellAggregate(e,t,n),this.change(this.getData())}},{key:"setCellMerge",value:function(e,t,n){var r=this.rows;this.history,this.validations,r.setCellMerge(e,t,n),this.change(this.getData())}},{key:"setCellOrder",value:function(e,t,n){var r=this.rows;this.history,this.validations,r.setCellOrder(e,t,n),this.change(this.getData())}},{key:"setCellMyFormat",value:function(e,t,n){var r=this.rows;this.history,this.validations,r.setCellMyFormat(e,t,n),this.change(this.getData())}},{key:"freezeIsActive",value:function(){var e=this.freeze,t=(e=ne(e=this.settings.disableFreeze?[0,0]:e,2))[0];e=e[1];return 0<t||0<e}},{key:"setFreeze",value:function(e,t){var n=this;this.changeData((function(){n.freeze=[e,t]}))}},{key:"filterMerge",value:function(e,t,n){for(var r=this.merges._,i=0;i<r.length;i++)r[i]}},{key:"freezeTotalWidth",value:function(){var e=this.freeze;return this.settings.disableFreeze&&(e=[0,0]),this.cols.sumWidth(0,e[1])}},{key:"freezeTotalHeight",value:function(){var e=this.freeze;return this.settings.disableFreeze&&(e=[0,0]),this.rows.sumHeight(0,e[0])}},{key:"setRowHeight",value:function(e,t){var n=this;this.changeData((function(){n.rows.setHeight(e,t)}))}},{key:"setColWidth",value:function(e,t){var n=this;this.changeData((function(){n.cols.setWidth(e,t)}))}},{key:"viewHeight",value:function(e){var t=(i=this.settings).view,n=i.showToolbar,r=i.showBottombar,i=i.showPreviewToolbar,o=this.sheetScale;t=t.height();return r&&(t-=41),n&&(t-=61),i&&(t-=41),e?t:o<1?Math.floor(t/o):Math.floor(t*o)}},{key:"viewWidth",value:function(e){var t=this.sheetScale,n=this.settings.view.width();return e?n:t<1?Math.floor(n/t):Math.floor(n*t)}},{key:"removeBlankRowCol",value:function(){this.rows.removeBlankRow(),this.cols.removeBlankCol()}},{key:"freezeViewRange",value:function(){var e=this.freeze,t=(e=ne(e=this.settings.disableFreeze?[0,0]:e,2))[0];e=e[1];return new f(0,0,t-1,e-1,this.freezeTotalWidth(),this.freezeTotalHeight())}},{key:"getViewContent",value:function(e){var t,n=e.sri,r=e.sci,i=e.eri,o=e.eci,a=this.rows._,s={};for(t in a)if(parseInt(t)>=n&&parseInt(t)<=i){var u,c,l=a[t],h=[];for(u in l.cells)parseInt(u)>=r&&parseInt(u)<=o&&(c=l.cells[u],h.push(c));s[t]=h}return s}},{key:"contentRange",value:function(e,t){var n,r,i=this.rows,o=this.cols;e&&t?(n=e,r=t):(n=(e=ne(i.maxCell(this.styles),2))[0],r=e[1],n+=1,r+=1),t=i.sumHeight(0,n),e=o.sumWidth(0,r);return new f(0,0,n,r,e,t)}},{key:"exceptRowTotalHeight",value:function(e,t){var n=this.exceptRowSet,r=this.rows,i=(n=Array.from(n),0);return n.forEach((function(n){(n<e||t<n)&&(n=r.getHeight(n),i+=n)})),i}},{key:"viewRange",value:function(){for(var e=this.scroll,t=this.rows,n=this.cols,r=this.freeze,i=this.exceptRowSet,o=e.ri,a=(e=e.ci,this.settings.disableFreeze&&(r=[0,0]),o<=0&&(o=ne(r,1)[0]),e<=0&&(e=ne(r,2)[1]),0),s=0,u=(r=[t.len,n.len])[0],c=r[1],l=this.viewWidth(),h=this.viewHeight(),d=o;d<t.len&&(i.has(d)||(s+=t.getHeight(d),u=d),!(h<s));d+=1);for(var p=e;p<n.len&&(c=p,!(l<(a+=n.getWidth(p))));p+=1);return new f(o,e,u,c,a,s)}},{key:"viewAllRange",value:function(){for(var e=this.rows,t=this.cols,n=0,r=0,i=e.len-1,o=t.len-1,a=0;a<e.len;a+=1)r+=e.getHeight(a);for(var s=0;s<t.len;s+=1)n+=t.getWidth(s);return new f(0,0,i,o,n,r)}},{key:"eachMergesInView",value:function(e,t){this.merges.filterIntersects(e).forEach((function(e){return t(e)}))}},{key:"addMerge",value:function(e){this.merges.add(e)}},{key:"myeachMergesInView",value:function(e,t){this.merges.filterIntersects(e).forEach((function(e,n){return t(e,n)}))}},{key:"clearMerge",value:function(){this.merges.clear()}},{key:"myeach",value:function(e){this.merges.each(e)}},{key:"hideRowsOrCols",value:function(){var e,t=this.rows,n=this.cols,r=(i=ne((e=this.selector).size(),2))[0],i=i[1],o=(e=e.range).sri,a=e.sci,s=e.eri,u=e.eci;if(r===t.len)for(var c=a;c<=u;c+=1)n.setHide(c,!0);else if(i===n.len)for(var l=o;l<=s;l+=1)t.setHide(l,!0)}},{key:"unhideRowsOrCols",value:function(e,t){this["".concat(e,"s")].unhide(t)}},{key:"my_unhideRowsOrCols",value:function(){var e,t=this.rows,n=this.cols,r=(i=ne((e=this.selector).size(),2))[0],i=i[1],o=(e=e.range).sri,a=e.sci,s=e.eri,u=e.eci;if(r===t.len)for(var c=a;c<=u;c+=1)n.my_unhide(c,!0);else if(i===n.len)for(var l=o;l<=s;l+=1)t.my_unhide(l,!0)}},{key:"rowEach",value:function(e,t,n){for(var r=0,i=this.rows,o=this.exceptRowSet,a=function(e){return function(e){if(Array.isArray(e))return ie(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||re(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(o),s=0,u=0;u<a.length;u+=1)a[u]<e&&(s+=1);for(var c=e+s;c<=t+s;c+=1)if(o.has(c))s+=1;else{var l=i.getHeight(c);if(0<l&&(n(c,r,l),(r+=l)>this.viewHeight()))break}}},{key:"getOrNewri",value:function(e){return this.rows.getOrNew(e)}},{key:"getOrNewci",value:function(e){return this.rows.getCols(e)}},{key:"colEach",value:function(e,t,n){for(var r=0,i=this.cols,o=this.viewWidth(),a=e;a<=t;a+=1){var s=i.getWidth(a);if(0<s&&(n(a,r,s),o<(r+=s)))break}}},{key:"defaultStyle",value:function(){return this.settings.style}},{key:"addStyle",value:function(e){for(var t=this.styles,n=0;n<t.length;n+=1){var r=t[n];if(D.a.equals(r,e))return n}return t.push(e),t.length-1}},{key:"addPenetrates",value:function(e){for(var t=this.penetrates,n=0;n<t.length;n+=1){var r=t[n];if(D.a.equals(r,e))return n}return t.push(e),t.length-1}},{key:"changeData",value:function(e){this.history.add(this.getData()),e(),this.change(this.getData())}},{key:"setData",value:function(e){var t=this;return Object.keys(e).forEach((function(n){var r,i;"merges"===n||"rows"===n||"cols"===n||"validations"===n?t[n].setData(e[n]):"freeze"===n?(r=(i=ne(Object(u.b)(e[n]),2))[0],i=i[1],t.freeze=[i,r]):void 0!==e[n]&&(t[n]=e[n])})),this}},{key:"getData",value:function(){var e=this.name,t=this._index,n=this.freeze,r=this.styles,i=this.merges,o=this.rows,a=this.cols,s=this.validations,c=this.autoFilter,l=this.groupConfig,h=this.penetrates,f=this.XAxle,d=this.fbi_vtotalDis,p=this.fbi_htotalDis,m=this.printRepeat,g=this.printParams,A=this.workBookPrint,v=this.sheetScale,b=this.collapse,y=this.error_msg,w=this.printOptions,x=this.settings,C=this.warnMap,k=this.waterMask,E=this.toolbarButtonList,S=this.paramsConfig,_=this.dataConfig,O=this.apiConfig,T=this.thirdDatasetConfig,D=this.waterMaskImageConfig,B=this.or,I=this.oc;return{name:e,_index:t,settings:x,freeze:Object(u.e)(n[1],n[0]),styles:r,merges:i.getData(),rows:o.getData(),cols:a.getData(),validations:s.getData(),autofilter:c.getData(),penetrates:h,groupConfig:l,XAxle:f,printRepeat:m,printParams:g,fbi_vtotalDis:d,fbi_htotalDis:p,workBookPrint:A,sheetScale:v,collapse:b,error_msg:y,printOptions:w,warnMap:C,waterMask:k,toolbarButtonList:E,paramsConfig:S,dataConfig:_,apiConfig:O,thirdDatasetConfig:T,waterMaskImageConfig:D,or:B,oc:I}}}])&&te(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),pe="xzdesign",me=(window.devicePixelRatio,"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAANBJREFUWEftV0EKwyAQnBUPyauaviz0ZbWvSg6iJYGK2GJlV1gCekvA3clkZlwJxZqMXct3PZ/34B95PSqLz2SfICw9m6ZaEW6L/v4XQCS4EqkU0MEsRSwDwDUZmGBZotzh3Uc7Ig3MxkaOCLfgk8tEANQZ4Hz9r4AbNmQzwD0f8jQVifA8HxgrDx0RAEbvry0DwLUZ0I9i5pjWzYbDBeoM1KK4dXgV2bDmgnzoqDElAqD+CwYAFQYQ8OrRONUwuDVPRKqXU+4I3spWflk59rwBpaFnMFvQJtcAAAAASUVORK5CYII="),ge="1.5.2.43621",Ae=n(8),ve=n.n(Ae);function be(e,t,n){e.addEventListener(t,n)}function ye(e,t,n){e.removeEventListener(t,n)}function we(e){e.xclickoutside&&(ye(window.document.body,"click",e.xclickoutside),delete e.xclickoutside)}function xe(e,t,n){e.xclickoutside=function(r){if(n){var i=ve()(e.el).find(".".concat(pe,"-dropdown-content"));if(0<i.length&&i[0].contains(r.target))return}r.target.className=="".concat(pe,"-icon-img-line-color")||r.target.className=="".concat(pe,"-icon-img-line-type")||2===r.detail||e.contains(r.target)||(t||(e.hide(),we))(e)},be(window.document.body,"click",e.xclickoutside)}function Ce(e,t,n){be(e,"mousemove",t),e.xEvtUp=function(r){ye(e,"mousemove",t),ye(e,"mouseup",e.xEvtUp),n(r)},be(e,"mouseup",e.xEvtUp)}function ke(e,t,n,r){Math.abs(e)>Math.abs(t)?r(0<e?"right":"left",e,n):r(0<t?"down":"up",t,n)}n(230);var Ee=[{key:"Arial",title:"Arial"},{key:"Helvetica",title:"Helvetica"},{key:"Source Sans Pro",title:"Source Sans Pro"},{key:"Comic Sans MS",title:"Comic Sans MS"},{key:"Courier New",title:"Courier New"},{key:"Verdana",title:"Verdana"},{key:"Lato",title:"Lato"},{key:"宋体",title:"宋体"},{key:"黑体",title:"黑体"},{key:"楷体",title:"楷体"},{key:"仿宋",title:"仿宋"},{key:"新宋体",title:"新宋体"}],Se=[{pt:3,px:4},{pt:4,px:5.3},{pt:5,px:6.7},{pt:6,px:8},{pt:7,px:9.3},{pt:8,px:10.7},{pt:9,px:12},{pt:10,px:13.3},{pt:11,px:14.7},{pt:12,px:16},{pt:13,px:17.3},{pt:14,px:18.7},{pt:15,px:20},{pt:16,px:21.3},{pt:18,px:24},{pt:22,px:29.3},{pt:24,px:32},{pt:26,px:34.7},{pt:36,px:48},{pt:42,px:56}];function _e(e){for(var t=0;t<Se.length;t+=1){var n=Se[t];if(n.pt===e)return n.px}return e}var Oe=[{key:"文本",title:"文本"},{key:"数值",title:"数值"},{key:"日期",title:"日期"},{key:"图片",title:"图片"},{key:"二维码",title:"二维码"},{key:"条形码",title:"条形码"},{key:"Html",title:"Html"},{key:"占位",title:"占位"},{key:"设置显示格式",title:"设置显示格式"}];function Te(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function De(){var e=this;be(window,"keydown",(function(t){(function(e){var t=e.keyCode,n=e.altKey;13!==t&&9!==t&&e.stopPropagation(),13===t&&n&&e.preventDefault(),13!==t||n||this.selector&&("row"===this.name?this.rowHeightFn():"col"===this.name&&this.colWidthFn(),this.el.el.children[0].children[1].children[1].children[1].value="",this.hide())}).call(e,t)}))}var Be=function(){function e(t,n){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.cb=function(){},this.el=this.init(t,this.cb).hide(),this.rici=null,this.inputValue=0,this.table=null,this.selector=null,this.data=null,this.self=null,this.name=t,this.auto=!1,De.call(this)}var t,n;return t=e,(n=[{key:"init",value:function(e,t){var n=this,r=this,i="row"===e?"行高":"列宽";return s("div","".concat(pe,"-dialog_wrapper")).css("z-index","2010").children(s("div","".concat(pe,"-dialog")).css("margin-top","30vh").children(s("div","".concat(pe,"-dialog_header")).children(s("span","".concat(pe,"-dialog_title")).innerHTML("".concat(i,"设置")).css({"border-bottom":"none"}),s("button","".concat(pe,"-dialog__headerbtn")).attr("type","button").children(s("i","".concat(pe,"-dialog__close"))).on("click",(function(){r.hide()}))).css({height:"47px"}),s("div","".concat(pe,"-dialog__body")).children(s("div","".concat(pe,"-dialog_body_item")).children(s("span","".concat(pe,"-dialog_body_span")).innerHTML("".concat(i,"方式：")),s("div","".concat(pe,"-dialog_body_radio")).css("margin-left","4px").children(s("div","radio").children(s("input","").attr({name:"setValueRadio",type:"radio",id:"$$change_radio-handle",value:0,checked:"checked"}).on("click",(function(e){n.auto=!1,n.showSetValueDom()})),s("label","".concat(pe,"-dialog_body_span radio-label")).attr("for","$$change_radio-handle").innerHTML("固定".concat(i))),s("div","radio").children(s("input","").attr({name:"setValueRadio",type:"radio",id:"$$change_radio-auto",value:1}).on("click",(function(e){n.auto=!0,n.hideSetValueDom()})),s("label","".concat(pe,"-dialog_body_span radio-label")).attr("for","$$change_radio-auto").innerHTML("自动".concat(i))))),s("div","".concat(pe,"-dialog_body_item")).children(s("span","".concat(pe,"-dialog_body_span")).innerHTML("".concat(i,"设置")),s("input","".concat(pe,"-dialog_input")).on("input",(function(e){1e3<(e=parseInt(e.target.value))&&(n.el.el.children[0].children[1].children[1].children[1].value=1e3),r.inputValue=1e3<e?e=1e3:e})),s("span","".concat(pe,"-dialog_body_span")).innerHTML("PX"))).css({height:"auto"}),s("div","".concat(pe,"-dialog__footer")).children(s("span","dialog-footer").children(s("button","".concat(pe,"-dialog_button el-button-default")).children(s("span","").innerHTML("取消")).on("click",(function(){r.hide()})),s("button","".concat(pe,"-dialog_button el-button-primary")).children(s("span","").innerHTML("确认")).on("click",(function(){"row"===e?r.rowHeightFn():"col"===e&&r.colWidthFn(),n.el.el.children[0].children[1].children[1].children[1].value="",r.hide()}))))).css({height:"auto"}))}},{key:"hide",value:function(){this.el.hide()}},{key:"getHandleRadioDom",value:function(){return this.el.el.children[0].children[1].children[0].children[1].children[0].children[0]}},{key:"getAutoRadioDom",value:function(){return this.el.el.children[0].children[1].children[0].children[1].children[1].children[0]}},{key:"showSetValueDom",value:function(){this.el.el.children[0].children[1].children[1].style.display="block"}},{key:"hideSetValueDom",value:function(){this.el.el.children[0].children[1].children[1].style.display="none"}},{key:"setCb",value:function(e,t,n,r,i,o){this.rici=e,this.cb=t,this.table=n,this.selector=r,this.data=i,this.self=o}},{key:"setShowVal",value:function(e,t){this.auto=!!t,(this.auto?this.getAutoRadioDom():this.getHandleRadioDom()).click(),this.inputValue=e,this.el.el.children[0].children[1].children[1].children[1].value=e}},{key:"show",value:function(){this.el.show()}},{key:"rowHeightFn",value:function(){var e,t=this.inputValue,n=(n=(e=this.rici).sri)==(e=e.eri)?n:[n,e];this.cb(n,t,this.table,this.selector,this.data,this.self,this.auto)}},{key:"colWidthFn",value:function(){var e,t=this.inputValue,n=(n=(e=this.rici).sci)==(e=e.eci)?n:[n,e];this.cb(n,t,this.table,this.selector,this.data,this.self,this.auto)}},{key:"cm2px",value:function(e){return 96*e/2.54}},{key:"inches2px",value:function(e){return 96*e}},{key:"setOffset",value:function(e){var t=this.el;t.offset(e),t.show()}}])&&Te(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Ie(e){return function(e){if(Array.isArray(e))return Me(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){var n;if(e)return"string"==typeof e?Me(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Me(e,t):void 0}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Me(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function je(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ne(e){e.preventDefault();var t=this.filterItems;t.length<=0||(e.stopPropagation(),this.itemIndex<0&&(this.itemIndex=0),t[this.itemIndex].el.click(),this.hide())}function Fe(e){var t=e.keyCode;switch(e.ctrlKey&&e.stopPropagation(),t){case 37:e.stopPropagation();break;case 38:(function(e){e.preventDefault(),e.stopPropagation(),(e=this.filterItems).length<=0||(0<=this.itemIndex&&e[this.itemIndex].toggle(),--this.itemIndex,this.itemIndex<0&&(this.itemIndex=e.length-1),e[this.itemIndex].toggle())}).call(this,e);break;case 39:e.stopPropagation();break;case 40:(function(e){e.stopPropagation(),(e=this.filterItems).length<=0||(0<=this.itemIndex&&e[this.itemIndex].toggle(),this.itemIndex+=1,this.itemIndex>e.length-1&&(this.itemIndex=0),e[this.itemIndex].toggle())}).call(this,e);break;case 13:case 9:Ne.call(this,e);break;default:e.stopPropagation()}}var Re=function(){function e(t,n){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"200px",i=this,o=e;if(!(i instanceof o))throw new TypeError("Cannot call a class as a function");this.filterItems=[],this.items=t,this.el=s("div","".concat(pe,"-suggest")).css("width",r).hide(),this.itemClick=n,this.itemIndex=-1}var t,n;return t=e,(n=[{key:"setOffset",value:function(e){this.el.cssRemoveKeys("top","bottom").offset(e)}},{key:"hide",value:function(){var e=this.el;this.filterItems=[],this.itemIndex=-1,e.hide(),we(this.el.parent())}},{key:"setItems",value:function(e){this.items=e}},{key:"search",value:function(e){var t,n,r=this,i=this.items,o=(i=(i="$"==e||/^\s*$/.test(e)?i:i.filter((function(t){return(t.key||t).startsWith(e.toUpperCase())}))).map((function(t){var n=((n=t.title)?"function"==typeof n&&(n=n()):n=t,s("div","".concat(pe,"-item")).child(n).on("click.stop",(function(){r.itemClick(t),r.hide()})));return t.label&&n.child(s("div","label").html(t.label)),"$"==e&&t.type&&"print"==t.type||"$"!=e&&!t.type?n:void 0})),[]);i.forEach((function(e){e&&o.push(e)})),this.filterItems=i=o,i.length<=0||((t=(n=this.el).html("")).children.apply(t,Ie(i)).show(),xe(n.parent(),(function(){r.hide()})))}},{key:"addItem",value:function(){var e,t=this,n=(n=this.items).map((function(e){return s("div","".concat(pe,"-item")).child(e.name).on("click.stop",(function(){t.itemClick(e),t.hide()}))})),r=this.el;(e=r.html("")).children.apply(e,Ie(n)).show(),xe(r.parent(),(function(){t.hide()}))}},{key:"bindInputEvents",value:function(e){var t=this;e.on("keydown",(function(e){return Fe.call(t,e)}))}}])&&je(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Pe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Le=function(){function e(){var t=this,n=0<arguments.length&&void 0!==arguments[0]&&arguments[0],r=1<arguments.length?arguments[1]:void 0,i=this,o=e;if(!(i instanceof o))throw new TypeError("Cannot call a class as a function");this.moving=!1,this.vertical=n,this.el=s("div","".concat(pe,"-resizer ").concat(n?"vertical":"horizontal")).children(this.unhideHoverEl=s("div","".concat(pe,"-resizer-hover")).on("dblclick.stop",(function(e){return t.mousedblclickHandler(e)})).css("position","absolute").hide(),this.hoverEl=s("div","".concat(pe,"-resizer-hover")).on("mousedown.stop",(function(e){return t.mousedownHandler(e)})),this.lineEl=s("div","".concat(pe,"-resizer-line")).hide()).hide(),this.cRect=null,this.finishedFn=null,this.minDistance=r,this.unhideFn=function(){}}var t,n;return t=e,(n=[{key:"showUnhide",value:function(e){this.unhideIndex=e,this.unhideHoverEl.show()}},{key:"hideUnhide",value:function(){this.unhideHoverEl.hide()}},{key:"show",value:function(e,t){var n,r,i=this.moving,o=this.vertical,a=this.hoverEl,s=this.lineEl,u=this.el,c=this.unhideHoverEl;i||(i=(this.cRect=e).left,n=e.top,r=e.width,e=e.height,u.offset({left:o?i+r-5:i,top:o?n:n+e-5}).show(),a.offset({width:o?5:r,height:o?e:5}),s.offset({width:o?0:t.width,height:o?t.height:0}),c.offset({left:o?5-r:i,top:o?n:5-e,width:o?5:r,height:o?e:5}))}},{key:"hide",value:function(){this.el.offset({left:0,top:0}).hide(),this.hideUnhide()}},{key:"mousedblclickHandler",value:function(){this.unhideIndex&&this.unhideFn(this.unhideIndex)}},{key:"mousedownHandler",value:function(e){var t=this,n=e,r=this.el,i=this.lineEl,o=this.cRect,a=this.vertical,s=this.minDistance,u=a?o.width:o.height,c=u,l=(i.show(),e.x),h=e.y;Ce(window,(function(e){t.moving=!0,null!==n&&1===e.buttons&&(a?(c=e.x-l+u,s<c&&r.css("left","".concat(o.left+c,"px"))):(c=e.y-h+u,s<c&&r.css("top","".concat(o.top+c,"px"))),n=e)}),(function(){n=null,i.hide(),t.moving=!1,t.hide(),t.finishedFn&&(c<s&&(c=s),t.finishedFn(o,c))}))}}])&&Pe(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Ue(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var ze=function(){function e(t){var n=this;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.vertical=t,this.moveFn=null,this.panelHeight=0,this.ver=null,this.el=s("div","".concat(pe,"-scrollbar ").concat(t?"vertical":"horizontal")).child(this.contentEl=s("div","")).on("mousemove.stop",(function(){})).on("scroll.stop",(function(e){var t=(r=e.target).scrollTop,r=r.scrollLeft;t=n.vertical?t:r;n.moveFn&&n.moveFn(t,e)}))}var t,n;return t=e,(n=[{key:"move",value:function(e){return this.ver=e,this.el.scroll(e),this}},{key:"scroll",value:function(){return this.el.scroll()}},{key:"setPanelHeight",value:function(e){this.panelHeight=e}},{key:"set",value:function(e,t){var n,r=e.flag,i=e.oWidth,o=e.oHeight;e=e.total;return r?(r=this.vertical?(n="height",o):(n="width",i),e-=15,void 0!==t&&1<t&&(e=(e-15)*t),this.el.css(n,"".concat(r-15,"px")).show(),this.contentEl.css(this.vertical?"width":"height","1px").css(n,"".concat(e,"px"))):this.el.hide(),this}}])&&Ue(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function He(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Qe(e,t,n){t&&$e(e.prototype,t),n&&$e(e,n),Object.defineProperty(e,"prototype",{writable:!1})}var Ve=10,qe=function(){function e(){var t=this,n=0<arguments.length&&void 0!==arguments[0]&&arguments[0];He(this,e),this.useHideInput=n,this.inputChange=function(){},this.cornerEl=s("div","".concat(pe,"-selector-corner")),this.areaEl=s("div","".concat(pe,"-selector-area")).child(this.cornerEl).hide(),this.clipboardEl=s("div","".concat(pe,"-selector-clipboard")).hide(),this.autofillEl=s("div","".concat(pe,"-selector-autofill")).hide(),this.el=s("div","".concat(pe,"-selector")).css("z-index","".concat(Ve)).children(this.areaEl,this.clipboardEl,this.autofillEl).hide(),n&&(this.hideInput=s("input","").on("compositionend",(function(e){t.inputChange(e.target.value)})),this.el.child(this.hideInputDiv=s("div","hide-input").child(this.hideInput)),this.el.child(this.hideInputDiv=s("div","hide-input").child(this.hideInput))),Ve+=1}return Qe(e,[{key:"setOffset",value:function(e){return this.el.offset(e).show(),this}},{key:"hide",value:function(){return this.el.hide(),this}},{key:"setAreaOffset",value:function(e){var t=e.left,n=e.top;e={width:e.width,height:e.height,left:t,top:n};this.areaEl.offset(e).show(),this.useHideInput&&(this.hideInputDiv.offset(e),this.hideInput.val("").focus())}},{key:"setClipboardOffset",value:function(e){var t=e.left,n=e.top,r=e.width;e=e.height;this.clipboardEl.offset({left:t,top:n,width:r-1,height:e})}},{key:"showAutofill",value:function(e){var t=e.left,n=e.top,r=e.width;e=e.height;this.autofillEl.offset({width:r-3,height:e-3,left:t,top:n}).show()}},{key:"hideAutofill",value:function(){this.autofillEl.hide()}},{key:"showClipboard",value:function(){this.clipboardEl.show()}},{key:"hideClipboard",value:function(){this.clipboardEl.hide()}}]),e}();function Ge(e){var t=this.data,n=e.left,r=e.top,i=e.width,o=e.height,a=e.scroll,s=e.l,u=(e=e.t,t.freezeTotalWidth());t=t.freezeTotalHeight(),n-=u,s<u&&(n-=a.x),s=r-t;return e<t&&(s-=a.y),{left:n,top:s,width:i,height:o}}function We(e){var t=this.data,n=e.left,r=e.width,i=e.height,o=e.l,a=e.t;e=e.scroll,n-=t=t.freezeTotalWidth();return o<t&&(n-=e.x),{left:n,top:a,width:r,height:i}}function Ke(e){var t=this.data,n=e.top,r=e.width,i=e.height,o=e.l,a=e.t;e=e.scroll,n-=t=t.freezeTotalHeight();return a<t&&(n-=e.y),{left:o,top:n,width:r,height:i}}function Ye(e){this.br.setAreaOffset(Ge.call(this,e))}function Xe(e){this.t.setAreaOffset(We.call(this,e))}function Je(e){this.l.setAreaOffset(Ke.call(this,e))}function Ze(e){this.l.setClipboardOffset(Ke.call(this,e))}function et(e){this.br.setClipboardOffset(Ge.call(this,e))}function tt(e){this.t.setClipboardOffset(We.call(this,e))}function nt(e){Ye.call(this,e),function(e){this.tl.setAreaOffset(e)}.call(this,e),Xe.call(this,e),Je.call(this,e)}function rt(e){et.call(this,e),function(e){this.tl.setClipboardOffset(e)}.call(this,e),tt.call(this,e),Ze.call(this,e)}var it=function(){function e(t){var n=this;He(this,e),this.inputChange=function(){},this.data=t,this.br=new qe(!0),this.t=new qe,this.l=new qe,this.tl=new qe,this.br.inputChange=function(e){n.inputChange(e)},this.br.el.show(),this.offset=null,this.areaOffset=null,this.indexes=null,this.range=null,this.arange=null,this.el=s("div","".concat(pe,"-selectors")).children(this.tl.el,this.t.el,this.l.el,this.br.el).hide(),this.lastri=-1,this.lastci=-1,Ve+=1}return Qe(e,[{key:"resetData",value:function(e){this.data=e,this.range=e.selector.range,this.resetAreaOffset()}},{key:"hide",value:function(){this.el.hide()}},{key:"show",value:function(){this.el.show()}},{key:"resetOffset",value:function(){var e=this.data,t=this.tl,n=this.t,r=this.l,i=this.br,o=e.freezeTotalHeight();e=e.freezeTotalWidth();0<o||0<e?(t.setOffset({width:e,height:o}),n.setOffset({left:e,height:o}),r.setOffset({top:o,width:e}),i.setOffset({left:e,top:o})):(t.hide(),n.hide(),r.hide(),i.setOffset({left:0,top:0}))}},{key:"resetAreaOffset",value:function(){var e=this.data.getSelectedRect(),t=this.data.getClipboardRect();nt.call(this,e),rt.call(this,t),this.resetOffset()}},{key:"resetBRTAreaOffset",value:function(){var e=this.data.getSelectedRect(),t=this.data.getClipboardRect();Ye.call(this,e),Xe.call(this,e),et.call(this,t),tt.call(this,t),this.resetOffset()}},{key:"resetBRLAreaOffset",value:function(){var e=this.data.getSelectedRect(),t=this.data.getClipboardRect();Ye.call(this,e),Je.call(this,e),et.call(this,t),Ze.call(this,t),this.resetOffset()}},{key:"set",value:function(e,t){var n=!(2<arguments.length&&void 0!==arguments[2])||arguments[2],r=this.data,i=r.calSelectedRangeByStart(e,t),o=i.sri,a=i.sci;n&&(r.selector.setIndexes(n=(n=e)<0?0:e,e=(e=t)<0?0:t),this.indexes=[n,e]),this.moveIndexes=[o,a],this.range=i,this.resetAreaOffset(),r.settings.showSelector?this.show():this.hide()}},{key:"setEnd",value:function(e,t){var n=this.data,r=this.lastri,i=this.lastci;if(!(2<arguments.length&&void 0!==arguments[2])||arguments[2]){if(e===r&&t===i)return;this.lastri=e,this.lastci=t}this.range=n.calSelectedRangeByEnd(e,t),nt.call(this,this.data.getSelectedRect())}},{key:"reset",value:function(){var e=(t=this.data.selector.range).eri,t=t.eci;this.setEnd(e,t)}},{key:"showAutofill",value:function(e,t){if(-1!==e||-1!==t){var n,r=(n=this.range).sri,i=n.sci,o=n.eri,a=e,s=t,u=r-e,c=(e=o-e,(n=n.eci)-t);if(0<i-t)this.arange=new f(r,s,o,i-1);else if(0<u)this.arange=new f(a,i,r-1,n);else if(c<0)this.arange=new f(r,n+1,o,s);else{if(!(e<0))return void(this.arange=null);this.arange=new f(o+1,i,a,n)}null!==this.arange&&((t=this.data.getRect(this.arange)).width+=2,t.height+=2,u=this.br,c=this.l,r=this.t,s=this.tl,u.showAutofill(Ge.call(this,t)),c.showAutofill(Ke.call(this,t)),r.showAutofill(We.call(this,t)),s.showAutofill(t))}}},{key:"hideAutofill",value:function(){var e=this;["br","l","t","tl"].forEach((function(t){e[t].hideAutofill()}))}},{key:"showClipboard",value:function(){var e=this,t=this.data.getClipboardRect();rt.call(this,t),["br","l","t","tl"].forEach((function(t){e[t].showClipboard()}))}},{key:"hideClipboard",value:function(){var e=this;["br","l","t","tl"].forEach((function(t){e[t].hideClipboard()}))}}]),e}();function ot(e){return(ot="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function at(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function st(e,t){return(st=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ut(e){return(ut=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ct=function(){var e=r,t=a;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&st(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ut(e);n=t?(n=ut(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===ot(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(e,t){if(this instanceof r)return t=t||"",(t=n.call(this,"div","".concat(pe,"-icon ").concat(t))).iconNameEl=s("div","".concat(pe,"-icon-img-").concat(e)),t.child(t.iconNameEl,e),t;throw new TypeError("Cannot call a class as a function")}return e=r,(t=[{key:"setName",value:function(e){this.iconNameEl.className("".concat(pe,"-icon-img ").concat(e))}}])&&at(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),r}();function lt(e){return function(e){if(Array.isArray(e))return ht(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){var n;if(e)return"string"==typeof e?ht(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ht(e,t):void 0}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ht(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ft(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function dt(e,t){e.setMonth(e.getMonth()+t)}var pt=function(){function e(t){var n=this;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.value=t,this.cvalue=new Date(t),this.headerLeftEl=s("div","calendar-header-left"),this.bodyEl=s("tbody",""),this.buildAll(),this.el=s("div","xzreport-calendar").children(s("div","calendar-header").children(this.headerLeftEl,s("div","calendar-header-right").children(s("a","calendar-prev").on("click.stop",(function(){return n.prev()})).child(new ct("chevron-left")),s("a","calendar-next").on("click.stop",(function(){return n.next()})).child(new ct("chevron-right")))),s("table","calendar-body").children(s("thead","").child((t=s("tr","")).children.apply(t,lt(U("calendar.weeks").map((function(e){return s("th","cell").child(e)}))))),this.bodyEl)),this.selectChange=function(){}}var t,n;return t=e,(n=[{key:"setValue",value:function(e){this.value=e,this.cvalue=new Date(e),this.buildAll()}},{key:"prev",value:function(){dt(this.value,-1),this.buildAll()}},{key:"next",value:function(){dt(this.value,1),this.buildAll()}},{key:"buildAll",value:function(){this.buildHeaderLeft(),this.buildBody()}},{key:"buildHeaderLeft",value:function(){var e=this.value;this.headerLeftEl.html("".concat(U("calendar.months")[e.getMonth()]," ").concat(e.getFullYear()))}},{key:"buildBody",value:function(){var e=this,t=this.value,n=this.cvalue,r=this.bodyEl;t=function(e,t,n){for(var r=new Date(e,t,1,23,59,59),i=[[],[],[],[],[],[]],o=0;o<6;o+=1)for(var a=0;a<7;a+=1){u=r,s=7*o+a,c=void 0,(c=new Date(u)).setDate(s-u.getDay()+1);var s=c,u=s.getMonth()!==t,c=s.getMonth()===n.getMonth()&&s.getDate()===n.getDate();i[o][a]={d:s,disabled:u,active:c}}return i}(t.getFullYear(),t.getMonth(),n).map((function(t){var n;t=t.map((function(t){var n="cell";return t.disabled&&(n+=" disabled"),t.active&&(n+=" active"),s("td","").child(s("div",n).on("click.stop",(function(){e.selectChange(t.d)})).child(t.d.getDate().toString()))}));return(n=s("tr","")).children.apply(n,lt(t))}));(n=r.html("")).children.apply(n,lt(t))}}])&&ft(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function mt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var gt=function(){function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.calendar=new pt(new Date),this.el=s("div","".concat(pe,"-datepicker")).child(this.calendar.el).hide()}var t,n;return t=e,(n=[{key:"setValue",value:function(e){var t=this.calendar;return"string"==typeof e?/^\d{4}-\d{1,2}-\d{1,2}$/.test(e)&&t.setValue(new Date(e.replace(new RegExp("-","g"),"/"))):e instanceof Date&&t.setValue(e),this}},{key:"change",value:function(e){var t=this;this.calendar.selectChange=function(n){e(n),t.hide()}}},{key:"show",value:function(){this.el.show()}},{key:"hide",value:function(){this.el.hide()}}])&&mt(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function At(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function vt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function bt(){var e=this.inputText;if(!/^\s*$/.test(e)){var t=this.textlineEl,n=this.textEl,r=this.areaOffset;try{var i,o=e.split("\n"),a=Math.max.apply(Math,function(e){return function(e){if(Array.isArray(e))return vt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){var n;if(e)return"string"==typeof e?vt(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?vt(e,t):void 0}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(o.map((function(e){return e.length})))),s=t.offset().width/e.length,u=(a+1)*s+5,c=this.viewFn().width-r.left-s,l=o.length;u>r.width&&(c<(i=u)&&(i=c,l=l+parseInt(u/c,10)+(0<u%c?1:0)),n.css("width","".concat(i,"px"))),(l*=this.rowHeight)>r.height&&n.css("height","".concat(l,"px"))}catch(e){}}}function yt(e){var t=e.keyCode,n=e.altKey;13!==t&&9!==t&&e.stopPropagation(),13===t&&n&&(function(e,t){var n=(e=e.target).value,r=e.selectionEnd;t="".concat(n.slice(0,r)).concat(t).concat(n.slice(r));e.value=t,e.setSelectionRange(r+1,r+1),this.inputText=t,this.textlineEl.html(t),bt.call(this)}.call(this,e,"\n"),e.stopPropagation()),13!==t||n||e.preventDefault()}function wt(e,t){var n=this.textEl,r=this.textlineEl;n.el.blur(),n.val(e),r.html(e),function(e){var t=this.textEl.el;setTimeout((function(){t.focus(),t.setSelectionRange(e,e)}),0)}.call(this,t)}var xt=function(){function e(t,n,r,i,o){var a=this;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.viewFn=n,this.rowHeight=r,this.formulas=t,this.status="hide",this.$parent=o,this.dataProxy=i,this.suggest=new Re(t,(function(e){(function(e){var t,n=this.inputText,r=this.validator,i=0;r&&"list"===r.type?(this.inputText=e,i=this.inputText.length):(r=n.lastIndexOf("."),t=n.substring(0,r+1),r=-1!==(r=n.substring(r+1)).indexOf(")")?r.substring(r.indexOf(")")):"","TOTAL_PAGE"==e.key||"CUR_PAGE"==e.key||"PARAM"==e.key?(n=n.substring(0,n.lastIndexOf("$")+1),this.inputText="".concat(n).concat(e.key,"()")):(this.inputText="".concat(t+e.key,"("),i=this.inputText.length,this.inputText+=")".concat(r))),this.change("input",this.inputText),wt.call(this,this.inputText,i)}).call(a,e)})),this.eventMap=new Map,this.qxhSelect=new Re([],(function(e){(function(e){this.inputText;var t=this.el,n=e.name;-1!=n.indexOf("：")&&(n=Number(n.split("：")[1])),this.inputText=n,e.isQXHOneKey?(this.trigger("selectItemClick",e),this.change("placeholder",this.inputText)):this.change("input",this.inputText),wt.call(this,this.inputText,this.inputText.length),t.hide(),this.status="hide"}).call(a,e)})),this.linkSelect=new Re([],(function(e){(function(e){}).call(a.it)})),this.datepicker=new gt,this.datepicker.change((function(e){var t,n;a.setText((t=(e=e).getMonth()+1,n=e.getDate(),t<10&&(t="0".concat(t)),n<10&&(n="0".concat(n)),"".concat(e.getFullYear(),"-").concat(t,"-").concat(n))),a.clear()})),this.areaEl=s("div","".concat(pe,"-editor-area")).children(this.textEl=s("textarea","").on("input",(function(e){return function(e){var t=e.target.value,n=this.dataProxy.settings.mode,r=this.suggest,i=(this.qxhSelectType,this.textlineEl),o=this.validator,a=this.cell;null!==a?"print"==n||"editable"in a&&!0===a.editable||void 0===a.editable?(this.inputText=t,o?"list"===o.type?r.search(t):r.hide():(n=t.lastIndexOf("."),"$"===t[0]&&r.search(t.substring(n+1))),i.html(t),bt.call(this),this.change("input",t)):e.target.value="":(this.inputText=t,o?"list"===o.type?r.search(t):r.hide():(a=t.lastIndexOf("."),"$"===t[0]&&r.search(t.substring(a+1))),i.html(t),bt.call(this),this.change("input",t))}.call(a,e)})).on("paste.stop",(function(){})).on("keydown",(function(e){return yt.call(a,e)})),this.textlineEl=s("div","textline"),this.suggest.el,this.qxhSelect.el,this.datepicker.el).on("mousemove.stop",(function(){})).on("mousedown.stop",(function(){})),this.el=s("div","".concat(pe,"-editor")).child(this.areaEl).hide(),this.suggest.bindInputEvents(this.textEl),this.qxhSelect.bindInputEvents(this.textEl),this.areaOffset=null,this.freeze={w:0,h:0},this.cell=null,this.inputText="",this.change=function(){}}var t,n;return t=e,(n=[{key:"setFreezeLengths",value:function(e,t){this.freeze.w=e,this.freeze.h=t}},{key:"trigger",value:function(e){var t=this.eventMap;if(t.has(e)){for(var n=arguments.length,r=new Array(1<n?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];(t=t.get(e)).call.apply(t,[this].concat(r))}}},{key:"on",value:function(e,t){return this.eventMap.set(e,t),this}},{key:"clear",value:function(){""!==this.inputText&&this.change("finished",this.inputText),this.cell=null,this.areaOffset=null,this.inputText="",this.el.hide(),this.status="hide",this.textEl.val(""),this.textlineEl.html(""),function(){this.suggest.setItems(this.formulas)}.call(this),this.datepicker.hide()}},{key:"changeInputValue",value:function(e){this.textEl.val(e)}},{key:"setOffset",value:function(e){var t,n,r,i,o,a,s=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"top",u=this.textEl,c=this.areaEl,l=this.suggest,h=this.freeze,f=this.el;e&&(t=(this.areaOffset=e).left,n=e.top,r=e.width,i=e.height,a=e.l,e=e.t,o={left:0,top:0},h.w>a&&h.h>e||(h.w<a&&h.h<e?(o.left=h.w,o.top=h.h):h.w>a?o.top=h.h:h.h>e&&(o.left=h.w)),f.offset(o),c.offset({left:t-o.left-.8,top:n-o.top-.8}),u.offset({width:r-9+.8,height:i-3+.8}),(a={left:0})[s]=i,l.setOffset(a),l.hide())}},{key:"setCell",value:function(e,t){var n=this.el,r=this.datepicker,i=this.suggest;n.show(),this.status="show",n=(this.cell=e)&&e.text||"";this.setText(n),(this.validator=t)&&("date"===(e=t.type)&&(r.show(),/^\s*$/.test(n)||r.setValue(n)),"list"===e&&(i.setItems(t.values()),i.search("")))}},{key:"setText",value:function(e){this.inputText=e,wt.call(this,e,e.length),bt.call(this)}},{key:"linkSelectShow",value:function(e){var t=this.linkSelect;t.setItems(e),t.addItem()}},{key:"qxhSelectShow",value:function(e){var t=this.qxhSelect;t.setItems(e),t.addItem()}},{key:"show",value:function(){this.el.show(),this.status="show"}},{key:"hide",value:function(){this.clear(),this.el.hide(),this.status="hide"}}])&&At(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Ct(e){return(Ct="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function kt(e,t){return(kt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Et(e){return(Et=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var St=function(){var e=r,t=a;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&kt(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Et(e);n=t?(n=Et(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===Ct(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"",i=this,o=r;if(i instanceof o)return(i=n.call(this,"div","".concat(pe,"-button ").concat(t))).child(U("button.".concat(e))),i;throw new TypeError("Cannot call a class as a function")}return e=r,Object.defineProperty(e,"prototype",{writable:!1}),e}(),_t=n(37),Ot=n(116);function Tt(e){return function(e){if(Array.isArray(e))return Dt(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){var n;if(e)return"string"==typeof e?Dt(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Dt(e,t):void 0}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Dt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}Ae=[{key:"SUM",title:z("formula.sum"),render:function(e){return formulajs.sum(e)}},{key:"AVG",title:z("formula.average"),render:function(e){var t=!1;return e.forEach((function(e){isNaN(Number(e))&&(t=!0)})),t?"":e.reduce((function(e,t){return Number(e)+Number(t)}),0)/e.length}},{key:"MAX",title:z("formula.max"),render:function(e){var t=!1;return e.forEach((function(e){isNaN(Number(e))&&(t=!0)})),t?"":Math.max.apply(Math,Tt(e.map((function(e){return Number(e)}))))}},{key:"MIN",title:z("formula.min"),render:function(e){var t=!1;return e.forEach((function(e){isNaN(Number(e))&&(t=!0)})),t?"":Math.min.apply(Math,Tt(e.map((function(e){return Number(e)}))))}},{key:"COUNT",title:z("formula.count"),render:function(e){var t=0;return e.forEach((function(e){""==e&&null==e&&void 0===e||t++})),t}}];var Bt=[{key:"TOTAL_PAGE",title:z("formula.getPage"),type:"print",render:function(e){var t=0;return e.forEach((function(e){""==e&&null==e&&void 0===e||t++})),t}},{key:"CUR_PAGE",title:z("formula.getCurrentPage"),type:"print",render:function(e){var t=0;return e.forEach((function(e){""==e&&null==e&&void 0===e||t++})),t}},{key:"PARAM",title:z("formula.getParam"),type:"print",render:function(e){var t=0;return e.forEach((function(e){""==e&&null==e&&void 0===e||t++})),t}}],It=(Ae=Ae.concat(Bt),["$TOTAL_PAGE()","$CUR_PAGE()","$PARAM"]),Mt=Bt,jt={};function Nt(e,t){var n;if(e)return"string"==typeof e?Ft(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ft(e,t):void 0}function Ft(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Rt(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function Pt(e){return e}function Lt(e,t){var n=1,r=(e=(e<0&&(n=-1),Math.abs(e)),Math.pow(10,t));e=Math.round(e*r)/r;return(Number(e)*n).toFixed(t).toString()}function Ut(e){var t,n;return/^(-?\d*.?\d*)$/.test(e)?(t=(n=function(e){return function(e){if(Array.isArray(e))return e}(e)||Rt(e)||Nt(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(Number(e).toFixed(2).toString().split("\\.")))[0],n=n.slice(1),[t.replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,")].concat(function(e){return function(e){if(Array.isArray(e))return Ft(e)}(e)||Rt(e)||Nt(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(n))):e}function zt(e){"number"==typeof e&&(e=e.toString());var t="",n=/[\u4e00-\u9fa5|%]/g;return!1!==$t(e.match(n))?e.match(n).join(""):t}function Ht(e,t){return Number(e)<0?"(".concat(t?t.slice(1,t.length):Math.abs(e),")"):t||e}Ae.forEach((function(e){jt[e.key]=e}));var $t=function(e){return null!=(e=0===e?e.toString():e)&&"null"!=e&&null!=e&&"undefined"!=e&&""!=e},Qt=(Bt=[{key:"normal",title:z("format.normal"),type:"string",render:Pt},{key:"text",title:z("format.text"),type:"string",render:Pt},{key:"number",title:z("format.number"),type:"number",label:"1,000.12",render:Ut},{key:"percent",title:z("format.percent"),type:"number",label:"10.12%",render:function(e){return"".concat(e,"%")}},{key:"rmb",title:z("format.rmb"),type:"number",label:"￥10.00",render:function(e){return"￥".concat(Ut(e))}},{key:"usd",title:z("format.usd"),type:"number",label:"$10.00",render:function(e){return"$".concat(Ut(e))}},{key:"eur",title:z("format.eur"),type:"number",label:"€10.00",render:function(e){return"€".concat(Ut(e))}},{key:"date",title:z("format.date"),type:"date",label:"26/09/2008",render:Pt},{key:"time",title:z("format.time"),type:"date",label:"15:59:00",render:Pt},{key:"datetime",title:z("format.datetime"),type:"date",label:"26/09/2008 15:59:00",render:Pt},{key:"duration",title:z("format.duration"),type:"date",label:"24:01:00",render:Pt},{key:"quantile",title:z("format.number"),type:"number",render:function e(t,n){if(Array.isArray(t))return t.map((function(t){return e(t,n)}));var r;if(!isNaN(parseFloat(t))){switch(n){case 0:r="";break;case 1:r=3;break;case 2:r=4}var i=zt(t),o=(-1!==t.toString().indexOf(".")&&(i=""),new RegExp("(\\d)(?=(\\d{"+r+"})+\\.)","g")),a=new RegExp("(\\d)(?=(\\d{"+r+"})+$)","g");t=t&&(-1!==t.toString().indexOf(".")?t.toString().replace(o,(function(e,t){return t+","})):parseFloat(t).toString().replace(a,(function(e,t){return t+","})))+i}return t}},{key:"multiplying",title:z("format.number"),type:"number",render:function e(t,n){if(Array.isArray(t))return t.map((function(t){return e(t,n)}));var r={divide:null,unit:""};if(!isNaN(parseFloat(t))&&0!=n){switch(n){case 1:r.divide=1e3,r.unit="千";break;case 2:r.divide=1e4,r.unit="万";break;case 3:r.divide=1e6,r.unit="百万";break;case 4:r.divide=1e8,r.unit="亿";break;case 5:r.divide=100,r.unit="%"}t="%"===r.unit?Math.round(1e6*parseFloat(t),6)/1e4+r.unit:Lt(parseFloat(t)/r.divide,6)+r.unit}return t}},{key:"decimal",title:z("format.number"),type:"number",render:function e(t,n){var r;return Array.isArray(t)?t.map((function(t){return e(t,n)})):(r=t,isNaN(parseFloat(t))?r:0==n?t:(5==n?n=0:10<n&&(n=parseInt(n%10)),Lt(parseFloat(t),n)+zt(t)))}},{key:"removePreText",title:z("format.string"),type:"string",render:function e(t,n){var r;return Array.isArray(t)?t.map((function(t){return e(t,n)})):(r=function(e,t){if(!t)return e;try{var n,r=new RegExp("^"+t),i=e.match(r);return i?(n=e.indexOf(i[0])+i[0].length,e=e.slice(n)):e}catch(t){return e}}(t,n),$t(r)?r:t)}},{key:"removeNextText",title:z("format.string"),type:"string",render:function e(t,n){var r;return Array.isArray(t)?t.map((function(t){return e(t,n)})):(r=function(e,t){if(!t)return e;try{var n,r=new RegExp(t+"$"),i=e.match(r);return i?(n=i.index,e=e.slice(0,n)):e}catch(t){return e}}(t,n),$t(r)?r:t)}},{key:"addPreText",title:z("format.string"),type:"string",render:function e(t,n){return Array.isArray(t)?t.map((function(t){return e(t,n)})):""===t||null==t?"":n+t}},{key:"addNextText",title:z("format.string"),type:"string",render:function e(t,n){return Array.isArray(t)?t.map((function(t){return e(t,n)})):""===t||null==t?"":t+n}},{key:"date",title:z("format.date"),type:"Date",render:function e(t,n){var r;return Array.isArray(t)?t.map((function(t){return e(t,n)})):(r=new Date(t).getTime(),"number"==typeof(t=isNaN(r)?t:r)&&(t=function(e,t){t.value&&(t=t.value);var n,r={"M+":e.getMonth()+1,"d+":e.getDate(),"D+":e.getDate(),"h+":e.getHours()%12==0?12:e.getHours()%12,"H+":e.getHours(),"m+":e.getMinutes(),"s+":e.getSeconds(),"q+":Math.floor((e.getMonth()+3)/3),S:e.getMilliseconds()};for(n in/([yY]+)/.test(t)&&(t=t.replace(RegExp.$1,(e.getFullYear()+"").substr(4-RegExp.$1.length))),/([eE]+)/.test(t)&&(t=t.replace(RegExp.$1,(1<RegExp.$1.length?2<RegExp.$1.length?"/u661f/u671f":"/u5468":"")+{0:"/u65e5",1:"/u4e00",2:"/u4e8c",3:"/u4e09",4:"/u56db",5:"/u4e94",6:"/u516d"}[e.getDay()+""])),r)new RegExp("("+n+")").test(t)&&(t=t.replace(RegExp.$1,1==RegExp.$1.length?r[n]:("00"+r[n]).substr((""+r[n]).length)));return t}(new Date(t-288e5),n)),t)}},{key:"replaceNullText",title:z("format.replaceNullText"),type:"string",render:function e(t,n,r){return Array.isArray(t)?t.map((function(t){return e(t,n,r)})):n&&(0==t||!t||Number(t)===-1/0||Number(t)===1/0||isNaN(t)&&"number"==typeof t)?r:t}},{key:"minus",title:z("format.minus"),type:"number",render:function e(t,n){if(Array.isArray(t))return t.map((function(t){return e(t,n)}));if(n)switch(n){case 1:if(!isNaN(t))return Ht(t);var r=String(t).replace(/,|%/g,"");if(isNaN(r))break;return Ht(r,t)}return t}}],{});function Vt(e){var t={};return e.forEach((function(e){switch(e.flag){case"pagerOrientation":t.pagerOrientation=e.val;break;case"width":t.width=Wt(e.val,e.unit);break;case"height":t.height=Wt(e.val,e.unit);break;case"top":t.top=Wt(e.val,e.unit);break;case"bottom":t.bottom=Wt(e.val,e.unit);break;case"left":t.left=Wt(e.val,e.unit);break;case"right":t.right=Wt(e.val,e.unit)}})),t}function qt(e){return 96*(e-.02)}Bt.forEach((function(e){Qt[e.key]=e}));var Gt={1:"px",2:"英寸",3:"厘米"};function Wt(e,t){var n=Gt[t];return"英寸"==(t=n||t)?qt(Number(e)):"厘米"==t?96*Number(e)/2.54:Number(e)}function Kt(e,t){try{return n=e.padding,r=t.padding,i={},n.forEach((function(e){switch(e.name){case"上边距":i.top=Wt(e.value,e.unitVal)||r;break;case"下边距":i.bottom=Wt(e.value,e.unitVal)||r;break;case"左边距":i.left=Wt(e.value,e.unitVal)||r;break;case"右边距":i.right=Wt(e.value,e.unitVal)||r}})),i}catch(e){return{top:t.padding,bottom:t.padding,right:t.padding,left:t.padding}}var n,r,i}var Yt={1:"px",3:"厘米",2:"英寸"};function Xt(e){if(e.params)return{width:Wt(e.params.width,Yt[e.params.unit||1]),height:Wt(e.params.height,Yt[e.params.unit||1])}}function Jt(e,t){var n={top:t,bottom:t,left:t,right:t};if(e)for(var r in e){var i=e[r],o=i.unitVal||i.unit||1;n[r]=Wt(i.value,o)}return n}Ae=n(279);var Zt=n.n(Ae),en=(Bt=n(280),n.n(Bt));function tn(e){return(tn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function nn(e,t,n){for(var r=[],i=!1,o=!1,a=function(a){var s={},c=e[a];if(!c)return{v:void 0};for(var l=e[a].name,h=c.ColumnHead,f=c.RowHead,d=c.CellConfig||[],p=0,m=(f.forEach((function(e,t){e.Row>p&&(p=e.Row)})),{name:l||"sheet",rows:{},styles:[],cols:{},merges:[],penetrates:[],or:{},oc:{},warnMap:c.WarnMap}),g=(m.error_msg=e[a].error_msg,c.freeze&&(m.freeze=c.freeze,"A1"!=c.freeze&&Object(u.b)(c.freeze)),m.styles=c.StylesConfig,m.groupConfig=c.GroupConfig,m.waterMask=c.waterMask,m.PivotConfig=c.PivotConfig,m.sheetPageBase=c.sheetPageBase,m.printOptions=c.print,m.pageFreezeConfig=c.pageFreezeConfig,m._sheetPaging=c._sheetPaging,m.toolbarButtonList=c.toolbarButtonList,m.paramsConfig=c.paramsConfig,m.apiConfig=c.apiConfig,m.thirdDatasetConfig=c.thirdDatasetConfig,m.dataConfig=c.dataConfig,{}),A={},v=0;v<h.length;v++){var b={};b.width=h[v].Width,h[v].hide&&(b.hide=h[v].hide),m.cols[v]=b}for(var y=f.length,w=h.length,x=[],C=0;C<=p;C++){var k={};x.push(k),f[C]&&f[C].height&&(k.height=f[C].height),f[C]&&f[C].hide&&(k.hide=f[C].hide),f[C]&&f[C].auto&&(k.auto=f[C].auto),k.cells={}}for(var E=0;E<d.length;E++){var S={};if(d[E]){var _,O,T=d[E].Row,D=d[E],B=(d[E].ColumnSpan&&((B=[])[1]=d[E].ColumnSpan-1,B[0]=d[E].RowSpan-1,0==B[1]&&0==B[0]||(S.merge=B,B=Object(u.d)(d[E].Column),_=Object(u.d)(d[E].Column+d[E].ColumnSpan-1),O=T+d[E].RowSpan,m.merges.push(B+(T+1)+":"+_+O))),d[E].o_c&&(m.oc[d[E].Column]=d[E].o_c),d[E].o_r&&(m.or[d[E].Row]=d[E].o_r),"".concat(D.o_r,":").concat(D.o_c));if(A[B]?(_=A[B],D.Column>_[0]&&(_[0]=D.Column),D.Row>_[1]&&(_[1]=D.Row)):A[B]=[D.Column,D.Row],D.waterMaskImageConfig&&D.waterMaskImageConfig.url&&(g[B]=D.waterMaskImageConfig),d[E]){for(var I in rn)rn[I]in d[E]&&("warn"!==I&&"Warn"!==I&&"warnStyle"!==I||(o=!0),"wrapType"===I&&2===d[E].wrapType?i=!0:"valueType"===I&&2===d[E].ValueType&&function(e,t){var n=new XMLHttpRequest;n.onload=function(t){var r=new FileReader;r.onloadend=function(){!function(e,t){t.base64Image=e}(r.result,e)},r.readAsDataURL(n.response)},n.open("GET",e.text),n.responseType="blob",n.send()}(S),S[I]=d[E][rn[I]]);d[E].collapsible&&d[E].CollapseKey&&(s[O=d[E].CollapseKey]?s[O][s[O].length]=d[E]:(s[O]=[],s[O][0]=d[E]))}x[T].cells[d[E].Column]=S}}var M;l=!1;try{for(var j in g){var N,F=g[j],R=on(n,M=F)?Object(u.b)(M.cell.toUpperCase()):null,P="".concat(R[1],":").concat(R[0]);A[P]&&(N=A[P],g[j]={c:F,cell:R,xy:N})}}catch(a){l=!0}if(x.forEach((function(e,t){m.rows[t]=e})),t&&(t.col>w&&(w=t.col),t.row>y&&(y=t.row)),0!=Object.keys(s).length&&(void 0).sheetToTree(s,m),0<Object.keys(g).length&&!l)for(var L in g){var U,z,H,$,Q=(L=g[L]).c,V=L.xy,q=0,G=0,W=0,K=0,Y=(L=Q.w,Q.h),X=Q.angle,J=Q.x,Z=Q.y;for(U in m.rows)"len"!=U&&(z=void 0===(z=m.rows[U]).height?25:z.height,V[1]==Number(U)&&(G=q),q+=z);for(H in m.cols)"len"!=H&&($=void 0===($=m.cols[H]).width?100:$.width,V[0]==Number(H)&&(K=W),W+=$);L=L,Y=Y,ee=void 0,X=(X=Number(X))*Math.PI/180,ee=Math.sin(X),X=Math.cos(X);var ee=(L={nw:Math.abs(L*X)+Math.abs(Y*ee),nh:Math.abs(L*ee)+Math.abs(Y*X)}).nw;L=((X=((Y=q-(G+L.nh+Number(Z)))<0&&(Y=Math.abs(Y),y+=Math.ceil(Y/25)),W-(K+ee+Number(J))))<0&&(X=Math.abs(X),w+=Math.ceil(X/25)),Number(J));0<(Y=Number(Z))?Y=-Y:Y<0&&(Y=Math.abs(Y)),Q.x=L+K,Q.y=Y+G}m.waterMaskImageConfig=g,m.rows.len=y,m.cols.len=w,r.push(m)},s=0;s<e.length;s++){var c=a(s);if("object"===tn(c))return c.v}return[r,i,o]}var rn={text:"Value",valueType:"ValueType",wrapType:"wrapType",Expansion:"Expansion",placeholder:"placeholder",collapsible:"collapsible",style:"StyleIndex",penetrate:"PenetrateIndex",editable:"Editable",scaleType:"scaleType",warn:"Warn",customIcon:"customIcon",slash:"slash",bindObj:"DataConfig",PenetrateDict:"PenetrateDict",dataType:"dataType",controlType:"controlType",btnText:"btnText",btnStyle:"btnStyle",clickType:"clickType",script:"script",barCodeType:"barCodeType",type:"type",links:"links",expansion:"expansion",warnStyle:"warnStyle",barCodeValue:"barCodeValue",waterMaskImageConfig:"waterMaskImageConfig"},on=function(e,t){return t&&t.url&&t.cell&&"preview"==e},an={paper:{type:2,params:{unit:2,width:"8.27",height:"11.69"}},repeat:{repeatRowHead:{start:"",end:""},repeatColHead:{start:"",end:""},repeatRowFoot:{start:"",end:""},repeatColFoot:{start:"",end:""}},params:{autoFill:!1,padding:{top:{unit:3,value:"0.0"},bottom:{unit:3,value:"0.0"},left:{unit:3,value:"0.0"},right:{unit:3,value:"0.0"}},direction:2,imgUrl:""}};function sn(e,t){var n,r,i,o,a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(a)return r=!(n=!0),{s:function(){a=a.call(e)},n:function(){var e=a.next();return n=e.done,e},e:function(e){r=!0,i=e},f:function(){try{n||null==a.return||a.return()}finally{if(r)throw i}}};if(Array.isArray(e)||(a=un(e))||t&&e&&"number"==typeof e.length)return a&&(e=a),o=0,{s:t=function(){},n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function un(e,t){var n;if(e)return"string"==typeof e?cn(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?cn(e,t):void 0}function cn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ln(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function hn(e){return(hn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var fn={fillStyle:"#f4f5f8"},dn={fillStyle:"#fff",lineWidth:Object(_t.g)(),strokeStyle:"#e6e6e6"},pn=(Object(_t.g)(),["date","replaceNullText","multiplying","decimal","quantile","removePreText","addPreText","removeNextText","addNextText","minus"]),mn={1:"CODE128",2:"CODE128A",3:"CODE128B",4:"CODE128C",5:"EAN13",6:"EAN8",7:"EAN5",8:"EAN2",9:"UPC",10:"CODE39",11:"CODE39",12:"ITF14",13:"MSI",14:"MSI10",15:"MSI11",16:"MSI1010",17:"MSI1110",18:"pharmacode",19:"codabar"},gn={1:"qrcode",2:"datamatrix",3:"datamatrixrectangular",4:"datamatrixrectangularextension",5:"dotcode",6:"hanxin",7:"maxicode",8:"micropdf417",9:"microqrcode"};function An(e,t,n,r,i,o,a,s){return r=3<arguments.length&&void 0!==r?r:0,i=4<arguments.length&&void 0!==i?i:0,o=5<arguments.length&&void 0!==o?o:0,a=6<arguments.length&&void 0!==a?a:null,s=7<arguments.length&&void 0!==s?s:null,t=(e=e.cellRect(t,n,i,o)).left,n=e.top,i=e.width,o=e.height,a&&(n+=a),s&&(t+=s),new _t.b(t,n+r,i,o,5)}function vn(e,t,n,r,i,o,a,s,u,c,l){i=4<arguments.length&&void 0!==i?i:0,s=7<arguments.length&&void 0!==s?s:null,l=10<arguments.length?l:void 0;var h,f=t.sortedRowMap,d=t.rows,p=t.cols,m=(t.settings,t.styles,n);f.has(n)&&(m=f.get(n)),d.isHide(n)||p.isHide(r)||!t.getCell(m,r)||(f=t.getCellStyle(m,r))&&(s&&s.st?h=An(t,n,r,i,s.sri,s.sci,s.st,s.sl):(h=An(t,n,r,i),s&&(d=t.cols.sumWidth(s.sci,r),p=t.rows.sumHeight(s.sri,n),s.st=h.y-p,s.sl=h.x-d)),m=!1,l&&!f.bgcolor?(h.bgcolor="#ffffff",m=!0):h.bgcolor=f.bgcolor,null!=h.bgcolor&&e.rectCellBg(h,m))}function bn(e,t,n,r,i,o,a,u,c,l,h){i=4<arguments.length&&void 0!==i?i:0,a=6<arguments.length?a:void 0,u=7<arguments.length&&void 0!==u?u:null,c=8<arguments.length?c:void 0;var f=9<arguments.length?l:void 0,d=(l=10<arguments.length?h:void 0,h=null,t.sortedRowMap),p=t.rows,m=t.cols,g=t.settings;if(t.styles,!p.isHide(n)&&!m.isHide(r)){var A=n,v=(d.has(n)&&(A=d.get(n)),t.getCell(A,r));if(null!==v){var b,y,w,x,C,k,E,S,_,O,T,D,B=!1,I=("editable"in v&&!1===v.editable&&(B=!0),t.getCellStyleOrDefault(A,r)),M=(u&&u.st?b=An(t,n,r,i,u.sri,u.sci,u.st,u.sl):(b=An(t,n,r,i),u&&(d=t.cols.sumWidth(u.sci,r),i=t.rows.sumHeight(u.sri,n),u.st=b.y-i,u.sl=b.x-d)),I.gradient&&(b.gradient=I.gradient),void 0!==I.border&&(b.setBorders(I.border),e.strokeBorders(b,l)),Object.assign({},I.font)),j=(M.size=_e(M.size),g.hideRowCol?0:m.indexWidth),N=g.hideRowCol?0:p.height;if(2==v.valueType&&(v.imgurl&&v.text!==v.imgurl&&v.imgObj&&delete v.imgObj,v.imgurl=v.text),c&&delete v.imgObj,2==v.valueType&&(v.text||v.Value))v.imgObj?e.drawImageCell(b,v.imgObj,v.text,v.scaleType):((y=new Image).src=v.text||v.Value,(v.imgObj=y).crossOrigin="Anonymous",h=new Promise((function(t,n){y.onload=function(){e.save(),e.translate(j,N),f?e.noNpxDrawImageCell(b,y,v.text,v.scaleType):e.drawImageCell(b,y,v.text,v.scaleType),e.restore(),t("success")},y.onerror=function(){t("success")}})));else if(3==v.valueType&&v.text&&g.renderFormularText){u=(i=b).width,d=i.height,l=i.x,c=i.y,i=u;var F=d,R=v.codeType||1;R={bcid:gn[R],text:v.text,height:d,width:u,scale:1},F=((i=(d<u?u=d:d=u,l+=(i-u)/2+10,c+=(F-d)/2+10,u-=20,d-=20,document.createElement("canvas"))).width=R.width,i.height=R.height,en.a.toCanvas(i,R),i.getContext("2d"));e.drawCode(i,l,c,u,d),F.clearRect(0,0,i.width,i.height)}else if((11==v.valueType||4==v.valueType)&&v.text&&g.renderFormularText)v.imgObj?e.drawHtml(v.imgObj,b,I.wrapType):(R=v.text,w=b,x=e,l=v,C=j,k=N,E=I.wrapType,S=p,_=a,O=n,wn(R=function(e,t){var n=document.createElement("div");return n.innerHTML=e,n.style.display="inline-block",n.style.width=t.width+"px",document.body.appendChild(n),xn(n.offsetWidth,n.offsetHeight,0,0,n)}(R,w),l).then((function(e){x.save(),x.translate(C,k),x.drawHtml(e,w,E),x.restore(),2==E&&e.height>w.height&&(S.setHeight(O,e.height),_.isflex=!0)})).catch((function(e){})));else if(12==v.valueType&&v.text&&v.barCodeType&&g.renderFormularText)try{var P=b,L=P.width,U=P.height,z=P.x,H=P.y,$=(z+=(L-L)/2+2,H+=(U-U)/2+2,L-=4,U-=4,void 0===v.barCodeValue&&(v.barCodeValue=!0),s("canvas","barcode-canvas")),Q={format:mn[v.barCodeType],displayValue:v.barCodeValue},V=(11==v.barCodeType&&(Q.mod43=!0),Zt()($.el,v.text,Q),$.el);e.drawCode(V,z,H,L,U)}catch(i){}else{if(g.renderFormularText){c=0==v.text||v.text?v.text:"",i=((u={TOTAL_PAGE:t.totalPage,CUR_PAGE:t.currentPage,"$TOTAL_PAGE()":t.totalPage,"$CUR_PAGE()":t.currentPage}).$PARAM=(d=a.fbi_params,F=t._index,d.length<2?d[0]:d[F]),function(e,t){var n=[];try{e=(e=e.trim()).toUpperCase();for(var r=0;r<t.length;r++){var i=t[r];-1!=e.indexOf(i)&&n.push(i)}}catch(e){}return n}(c,It));var q=kn(c,"$(TOTAL_PAGE)")||kn(c,"$(CUR_PAGE)")?(D=u,c.replace(/\$\((\w+)\)/g,(function(e,t){return t=t.toUpperCase(),D[t]||1}))):0<i.length?(T=u,c.replace(/\$.*?\)/g,(function(e,t){var n;return-1!=e.indexOf("$PARAM")?(n="",e.replace(/\((.*)\)/g,(function(e,t){T.$PARAM.forEach((function(e){e.newName==t&&(n=e.value)}))})),n):T[e]||1}))):"cacheResult"in v?v.cacheResult:Ot.a.render(c,jt,(function(e,n){return t.getCellTextOrDefault(n,e)}),{},0,{row:A,col:r})}else if(q=0==v.text||v.text?v.text:"",v.bindObj&&v.bindObj.Aggregate)switch(v.bindObj.Aggregate){case 1:q=v.text+".SUM()";break;case 5:q=v.text+".AVG()";break;case 2:q=v.text+".COUNT()";break;case 6:q=v.text+".DCOUNT()";break;case 4:q=v.text+".MAX()";break;case 3:q=v.text+".MIN()"}var G,W;l=q;I.format&&"object"==hn(I.format)&&(G=I.format,W=[],pn.forEach((function(e){var t;"object"==hn(G[e])&&!1 in G[e]?W.push(G[e]):null!=G[e]&&(t={name:e,value:G[e]},"replaceNullText"===e&&(t="string"==typeof G[e]?{name:e,value:!0,replaceText:G[e]}:{name:e,value:Boolean(G[e].type),replaceText:G[e].value}),W.push(t))})),q=yn(q,W)),f&&(b.bgcolor=I.bgcolor,e.rectCellBg(b,!0)),e.rect(b,(function(){var i=q;if(I.indent)for(var o=0;o<I.indent;o++)i="  "+i;var a=null,s=(v.slash&&(v.slash.isShow||v.slash.text)&&(a=v.slash),0!==v.text&&!v.text&&v.placeholder&&(i=v.placeholder),{x:b.x,y:b.y}),u=I.wrapType||v.wrapType,c=2==u||3==u||I.textwrap;e.text(i,b,{align:I.align,valign:I.valign,font:M,color:I.color,strike:I.strike,underline:I.underline},c,u,a,v.fold),t.validations.getError(n,r)&&g.renderArrow&&e.error(b),B&&g.renderArrow&&e.frozen(b),v.customIcon&&e.drawFoldIcon(b,v.customIcon),g.renderArrow&&(c=v.Expansion,u=e,a=b,1==c?u.expansionDown(a):2==c?u.expansionRight(a):3==c&&u.expansionTwoWay(a)),10==v.type&&(1==v.controlType?v.isChecked?(e.FoldIcon(b,"\\uf14a","#409eff",null,"center"),e.checked(b,"#409eff")):e.FoldIcon(b,"\\uf096","#dcdfe6",16,"center"):2==v.controlType&&(c=v.btnStyle||{},c=Object.assign({bgcolor:"#409eff",fontSize:12,color:"#000000"},v.btnStyle),e.buttonControl(b,c,v.btnText))),v.fold&&(v.fold.row&&p.cellFold(v,A,e,s),v.fold.col&&m.cellFold(v,r,e,s))}),v,l,f)}return h}}}function yn(e,t){var n=e;return t.forEach((function(t){t&&(e=Qt[t.name].render(e,t.value,t.replaceText,n))})),e}function wn(e,t){return new Promise((function(n,r){var i=new Image;(t.imgObj=i).onload=function(){return n(i)},i.onerror=r,i.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent((new XMLSerializer).serializeToString(e))}))}var xn=function(){var e=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,t=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0,n=4<arguments.length?arguments[4]:void 0,r=(r=0<arguments.length&&void 0!==arguments[0]?arguments[0]:100)||100,i=(i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:25)||25,o="http://www.w3.org/2000/svg",a=document.createElementNS(o,"svg");o=document.createElementNS(o,"foreignObject");return a.setAttributeNS(null,"width",r.toString()),a.setAttributeNS(null,"height",i.toString()),o.setAttributeNS(null,"width","100%"),o.setAttributeNS(null,"height","100%"),o.setAttributeNS(null,"x",e.toString()),o.setAttributeNS(null,"y",t.toString()),o.setAttributeNS(null,"externalResourcesRequired","true"),a.appendChild(o),o.appendChild(n),a};function Cn(e,t,n,r,i,o){function a(e){var t=l.has(e);return t&&(e=c.rows.getHeight(e),u.translate(0,-e)),!t}var s=this,u=this.draw,c=this.data,l=(u.save(),u.translate(t,n).translate(r,i),c.exceptRowSet),h=(r=c.exceptRowTotalHeight(e.sri,e.eri),u.save(),u.translate(0,-r),e.each((function(t,n){vn(u,c,t,n,0,0,s,e,o)}),a),u.restore(),u.save(),u.translate(0,-r),e.each((function(t,n){bn(u,c,t,n,0,0,s,e,o,!1,!1)}),a),u.restore(),new Set),f=(u.save(),u.translate(0,-r),c.eachMergesInView(e,(function(e){var t=e.sri,n=e.sci;e=e.eri;l.has(t)?h.has(t)||(h.add(t),e=c.rows.sumHeight(t,e+1),u.translate(0,-e)):vn(u,c,t,n,0,0,s,null,o,null,!0)})),u.restore(),new Set);u.save(),u.translate(0,-r),c.eachMergesInView(e,(function(e){var t=e.sri,n=e.sci;e=e.eri;l.has(t)?f.has(t)||(f.add(t),e=c.rows.sumHeight(t,e+1),u.translate(0,-e)):bn(u,c,t,n,0,0,s,null,o,null,!0)})),u.restore(),this._showPrintBgUrl&&this.drawBackgroudImage(this.printBgUrl,this._showPrintBgUrl,t,n),this.showPrintLine&&this.controlPrintArea(),function(e){var t,n=this.data,r=this.draw;e&&(t=n.autoFilter).active()&&(t=t.hrange(),e.intersects(t)&&t.each((function(e,t){e=An(n,e,t),r.dropdown(e)})))}.call(this,e),u.restore()}function kn(e,t){try{return-1!=(e=(e=e.trim()).toUpperCase()).indexOf(t)?1:void 0}catch(e){}}function En(e,t,n,r){var i=this.draw;this.data.settings.hideRowCol||(i.save(),i.attr({fillStyle:"rgba(75, 137, 255, 0.08)"}).fillRect(e,t,n,r),i.restore())}function Sn(e,t,n,r,i,o){var a,s,c,l,h,f,d,p,m=this,g=this.draw,A=this.data;A.settings.hideRowCol||(a=t.h,s=t.w,c=o+r,l=i+n,g.save(),g.attr(fn),"all"!==e&&"left"!==e||g.fillRect(0,c,n,a),"all"!==e&&"top"!==e||g.fillRect(l,0,s,r),o=A.selector.range,h=o.sri,f=o.sci,d=o.eri,p=o.eci,g.attr({textAlign:"center",textBaseline:"middle",font:"500 ".concat(Object(_t.f)(12),"px Source Sans Pro"),fillStyle:"#585757",lineWidth:Object(_t.g)(),strokeStyle:"#e6e6e6"}),"all"!==e&&"left"!==e||(A.rowEach(t.sri,t.eri,(function(e,t,r){t=c+t;var i=e;g.line([0,t],[n,t]),h<=i&&i<d+1&&En.call(m,0,t,n,r),g.fillText(i+1,n/2,t+r/2),0<e&&A.rows.isHide(e-1)&&(g.save(),g.attr({strokeStyle:"#c6c6c6"}),g.line([5,t+5],[n-5,t+5]),g.restore())})),g.line([0,a+c],[n,a+c]),g.line([n,c],[n,a+c])),"all"!==e&&"top"!==e||(A.colEach(t.sci,t.eci,(function(e,t,n){t=l+t;var i=e;g.line([t,0],[t,r]),f<=i&&i<p+1&&En.call(m,t,0,n,r),g.fillText(Object(u.d)(i),t+n/2,r/2),0<e&&A.cols.isHide(e-1)&&(g.save(),g.attr({strokeStyle:"#c6c6c6"}),g.line([t+5,5],[t+5,r-5]),g.restore())})),g.line([s+l,0],[s+l,r]),g.line([0,r],[s+l,r])),g.restore())}function _n(e,t,n,r,i){var o=e.sri,a=e.sci,s=e.eri,u=e.eci,c=e.w,l=e.h,h=this.draw,f=(e=this.data).settings;h.save(),f.showGrid&&(h.attr(dn).translate(t+r,n+i),e.rowEach(o,s,(function(e,t,n){h.line([0,t],[c,t]),e===s&&h.line([0,t+n],[c,t+n])})),e.colEach(a,u,(function(e,t,n){h.line([t,0],[t,l]),e===u&&h.line([t+n,0],[t+n,l])}))),h.restore()}var On=function(){function e(t,n,r,i,o){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.el=t,this.draw=new _t.a(t,n.viewWidth(),n.viewHeight()),this.data=n,this.isflex=!1,this.eventMap=new Map,this.fbi_params=[[]],this.interfaceData=[],this.printBgUrl=null,this._showPrintBgUrl=!1,this.showPrintLine=!1,this.sheetPrintOptions=null,this.bgImgObj=null,this.bgImgText="",this.verticalScrollbarSet=r,this.editorSetOffset=i,this.$parent=o,this.waterMaskImgObj={}}var t,n;return t=e,(n=[{key:"setFbiParams",value:function(e){this.fbi_params=e}},{key:"getAutoHeight",value:function(e,t,n,r,i,o){var a=e.getOrNewri(i),s=a.cells;if(o||a.auto)for(var u in s){var c=Number(u),l=s[u];if(l&&(!l.valueType||1==l.valueType)){var h=e.getCellStyleOrDefault(i,c),f=((c=((u=n.getDrawBox(e,i,c)).bgcolor=h.bgcolor,Object.assign({},h.font))).size=_e(c.size),"");if(0!=l.text&&!l.text||(f=l.text),l.bindObj&&l.bindObj.Aggregate)switch(l.bindObj.Aggregate){case 1:f=l.text+".SUM()";break;case 5:f=l.text+".AVG()";break;case 2:f=l.text+".COUNT()";break;case 6:f=l.text+".DCOUNT()";break;case 4:f=l.text+".MAX()";break;case 3:f=l.text+".MIN()"}if(h.format&&"object"==hn(h.format)&&function(){var e=h.format,t=[];pn.forEach((function(n){var r;"object"==hn(e[n])?t.push(e[n]):null!=e[n]&&(r={name:n,value:e[n]},"replaceNullText"===n&&(r={name:n,value:!0,replaceText:e[n]}),t.push(r))})),f=n.nformat(f,t)}(),h.indent)for(var d=0;d<h.indent;d++)f="  "+f;var p=h.wrapType||l.wrapType,m=2==p||h.textwrap;u=Math.ceil(r.getTextHeight(f,u,{align:h.align,valign:h.valign,font:c,color:h.color,strike:h.strike,underline:h.underline},m,p))+1;2===p||m?t<u&&(t=u):t<(c=a.height||25)&&(t=c)}}else t=a.height||25;return t}},{key:"cacheCellResult",value:function(e,t,n,r){return Ot.a.render(e,jt,(function(e,n){return t(n,e)}),{},0,{row:n,col:r})}},{key:"on",value:function(e,t){return this.eventMap.set(e,t),this}},{key:"trigger",value:function(e){var t=this.eventMap;if(t.has(e)){for(var n=arguments.length,r=new Array(1<n?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];(t=t.get(e)).call.apply(t,[this].concat(r))}}},{key:"myequal",value:function(e,t){try{return-1!=(e=(e=e.trim()).toUpperCase()).indexOf(t)}catch(e){return!1}}},{key:"new_myequal",value:function(e,t){try{e=(e=e.trim()).toUpperCase();for(var n=!1,r=0;r<t.length;r++){var i=t[r];if(-1!=e.indexOf(i)){n=!0;break}}return n}catch(e){return!1}}},{key:"resetData",value:function(e){this.data=e,this.waterMaskImgObj={},this.render()}},{key:"getDrawBoxBG",value:function(e,t,n,r){var i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0;n=(t=t.myMergeCellRect(n,r,e)).left,r=t.top,e=t.width,t=t.height;return new _t.b(n,r+i,e,t,5)}},{key:"getDrawBox",value:function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0,i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,o=(t=(e=e.cellRect(t,n,0,0)).left,n=e.top,e.width),a=e.height;e=e.showWidth;return new _t.b(t+i,n+r,o,a,5,e)}},{key:"styleFmt",value:function(e,t,n){var r=n,i=[];return pn.forEach((function(e){var t;"object"==hn(r[e])&&!1 in r[e]?i.push(r[e]):null!=r[e]&&(t={name:e,value:r[e]},"replaceNullText"===e&&(t="string"==typeof r[e]?{name:e,value:!0,replaceText:r[e]}:{name:e,value:Boolean(r[e].type),replaceText:r[e].value}),i.push(t))})),yn(t,i)}},{key:"format",value:function(e){for(var t=arguments.length,n=new Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.forEach((function(t){t&&(e=Qt[t.name].render(e,t.value,t.replaceText))})),e}},{key:"nformat",value:function(e,t){return t.forEach((function(t){t&&(e=Qt[t.name].render(e,t.value,t.replaceText))})),e}},{key:"exportPrintArea",value:function(e){var t;e&&(t=e.papersize,e=e.padding,t=Vt(t),e=Vt(e),this.printArea(t,e))}},{key:"controlPrintArea",value:function(){try{var e,t,n,r,i,o;this.sheetPrintOptions&&(t=Jt((e=this.sheetPrintOptions).params.padding,0),n=Xt(e.paper),r=0,i=1==e.params.direction?(r=n.height,n.width):(r=n.width,n.height),o={width:r,height:i},this.printArea(o,t))}catch(e){}}},{key:"formatRender",value:function(e,t,n){var r=this.data;return t&&(r=t),Ot.a.render(e,jt,(function(e,t){return r.getCellTextOrDefault(t,e)}),{},0,n)}},{key:"formatRenderInterface",value:function(e,t,n){var r=this.data;return r.interfaceData=t,Ot.a.render(e,jt,(function(e,t){return r.getCellValue(t,e)}),{},0,n)}},{key:"render",value:function(e,t,n){var r=this,i=this.draw,o=this.data,a=o.rows,s=o.cols,u=o.settings,c="design";try{c=this.$parent.$parent.sheetType}catch(e){}var l=u.hideRowCol?0:s.indexWidth,h=u.hideRowCol?0:a.height;this.draw.resize(o.viewWidth(),o.viewHeight()),this.clear();var f=(s=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(e,t)||un(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(o.freeze,2))[0],d=s[1],p=null;p=e?o.viewAllRange():o.viewRange();if(!n&&"design"!=c){a=document.createElement("canvas");for(var m=new _t.a(a,100,100),g=o.rows,A=(e=(s=p).sri,s.eri),v=0,b=e;b<=A;b++)v=this.getAutoHeight(o,v=0,this,m,b),g.setHeight(b,v=v||25);if(0<f)for(var y=f-1,w=0;w<=y;w++)v=this.getAutoHeight(o,v=0,this,m,w),g.setHeight(w,v=v||25)}function x(){var e;_n.call(r,p,l,h,C,k),Cn.call(r,p,l,h,-E,-S,t),Object(_t.h)(o.waterMask,i,l,h,E,S,o.scroll),r.$parent.$parent.gs()&&(e=r.$parent.$parent.gsd(),Object(_t.c)(i,e)),Sn.call(r,"all",p,l,h,C,k),function(e,t){var n=this.draw;this.data.settings.hideRowCol||(n.save(),n.attr({fillStyle:"#f4f5f8"}).fillRect(0,0,e,t),n.restore())}.call(r,l,h),(0<f||0<d)&&(0<f&&((e=p.clone()).sri=0,e.eri=f-1,e.h=k,_n.call(r,e,l,h,C,0),Cn.call(r,e,l,h,-E,0,t),Sn.call(r,"top",e,l,h,C,0)),0<d&&((e=p.clone()).sci=0,e.eci=d-1,e.w=C,_n.call(r,e,l,h,0,k),Sn.call(r,"left",e,l,h,0,k),Cn.call(r,e,l,h,0,-S,t)),e=o.freezeViewRange(),_n.call(r,e,l,h,0,0),Sn.call(r,"all",e,l,h,0,0),Cn.call(r,e,l,h,0,0,t),function(e,t,n,r){var i=this.draw,o=(s=this.data).settings,a=s.viewWidth()-e,s=s.viewHeight()-t;i.save().translate(e,t).attr({strokeStyle:"rgba(75, 137, 255, .6)"}),o.showFreeze&&(i.line([0,r],[a,r]),i.line([n,0],[n,s])),i.restore()}.call(r,l,h,C,k)),r.trigger("tableRender",p)}u.disableFreeze;var C=o.freezeTotalWidth(),k=o.freezeTotalHeight(),E=(n=o.scroll).x,S=n.y,_=o.waterMaskImageConfig;if("preview"==this.$parent.$parent.sheetType&&_&&0<Object.keys(_).length){var O,T={},D={};for(O in _){var B=_[O].c;2==B.layer?T[O]=B:D[O]=B}var I,M=[];for(I in D){var j=D[I];M.push(i.waterImage(j,l,h,null,this.waterMaskImgObj[I],E,S,I))}Promise.all(M).then((function(e){if(e&&Array.isArray(e)){var t,n=sn(e);try{for(n.s();!(t=n.n()).done;){var o=t.value;r.waterMaskImgObj[o[0]]=o[1]}}catch(e){n.e(e)}finally{n.f()}}x();var a,s=[];for(a in T){var u=T[a];s.push(i.waterImage(u,l,h,null,r.waterMaskImgObj[a],E,S,a))}Promise.all(s).then((function(e){if(e&&Array.isArray(e)){var t,n=sn(e);try{for(n.s();!(t=n.n()).done;){var i=t.value;r.waterMaskImgObj[i[0]]=i[1]}}catch(e){n.e(e)}finally{n.f()}}})).catch((function(e){x()}))})).catch((function(e){x()}))}else x()}},{key:"renderPrintLine",value:function(e,t){var n,r=this.draw,i=this.data,o=(i.cols,i.rows,i.fbi_htotalDis),a=i.fbi_vtotalDis;r.save().attr({strokeStyle:"rgba(64, 158, 255,1)"}),r.lineWidth(1),r.setLineDash(),"row"==t?(0!=(o=o||0)&&(o+=100),n=i.viewRange().w+o,r.line([0,e],[n,e])):"col"==t&&(0!=(o=a||0)&&(o+=20),n=i.viewRange().h+o,r.line([e,0],[e,n])),r.restore()}},{key:"templateFun",value:function(e,t){return e.replace(/\$\((\w+)\)/g,(function(e,n){return n=n.toUpperCase(),t[n]||1}))}},{key:"new_templateFun",value:function(e,t){return e.replace(/\$.*?\)/g,(function(e,n){var r;return-1!=e.indexOf("$PARAM")?(r="",e.replace(/\((.*)\)/g,(function(e,n){t.$PARAM.forEach((function(e){e.newName==n&&(r=e.value)}))})),r):t[e]||1}))}},{key:"fmtRender",value:function(e,t,n,r){var i=this.data,o=(isNaN(t)&&(t=i._index),{TOTAL_PAGE:i.totalPage,CUR_PAGE:i.currentPage,"$TOTAL_PAGE()":i.totalPage,"$CUR_PAGE()":i.currentPage});return o.$PARAM=n?n.fbi_params:this.getTableOSData(this.fbi_params,t),this.myequal(e,"$(TOTAL_PAGE)")||this.myequal(e,"$(CUR_PAGE)")?this.templateFun(e,o):this.new_myequal(e,It)?this.new_templateFun(e,o):Ot.a.render(e,jt,(function(e,t){return i.getCellTextOrDefault(t,e)}),{},0,r)}},{key:"renderFmtCellText",value:function(e,t){var n=e.text,r={TOTAL_PAGE:data.totalPage,CUR_PAGE:data.currentPage,"$TOTAL_PAGE()":data.totalPage,"$CUR_PAGE()":data.currentPage};return r.$PARAM=t.fbi_params,this.myequal(n,"$(TOTAL_PAGE)")||this.myequal(n,"$(CUR_PAGE)")?this.templateFun(n,r):this.new_myequal(n,It)?this.new_templateFun(n,r):e.cacheResult}},{key:"getTableOSData",value:function(e,t){return e.length<2?e[0]:e[t]}},{key:"printArea",value:function(e,t){for(var n=this.data,r=e.width,i=(e=e.height,t.top),o=t.bottom,a=t.left,s=(t=t.right,n.viewRange()),u=s.eri,c=s.eci,l=parseInt(r)-parseInt(a)-parseInt(t),h=parseInt(e)-parseInt(i)-parseInt(o),f=0,d=0,p=0;p<u;p++)f+=n.rows.getHeight(p);for(var m=0;m<c;m++)d+=n.cols.getWidth(m);for(var g=parseInt(f/h),A=parseInt(d/l),v=0;v<A;v++)this.renderPrintLine(l*(v+1),"col");for(var b=0;b<g;b++)this.renderPrintLine(h*(b+1),"row")}},{key:"drawBackgroudImage",value:function(e,t,n,r){var i,o=this.draw,a=An(this.data,0,0,0,0);e&&(this.bgImgText=e),t?this.bgImgObj&&this.bgImgText?o.drawBackgroudImage(a,this.bgImgObj):this.bgImgText&&((i=new Image).src=this.bgImgText,(this.bgImgObj=i).onload=function(){o.save(),o.translate(n,r),o.drawBackgroudImage(a,i),o.restore()}):this.bgImgObj=null}},{key:"createPattern",value:function(e){var t,n,r,i,o,a,s,u,c,l,h=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0;e&&(t=this.draw,r=(n=this.data).rows,s=n.cols,i=n.settings,o=i.hideRowCol?0:s.indexWidth,a=i.hideRowCol?0:r.height,s=n.scroll,u=s.x,c=s.y,(l=new Image).src=e,l.onload=function(){t.save(),t.translate(o,a).translate(-u,-c),t.createPattern(l,h),t.restore()})}},{key:"clear",value:function(){this.draw.clear()}}])&&ln(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),Tn=n(281);function Dn(e){return(Dn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Bn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function In(e){return function(e){if(Array.isArray(e))return jn(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Mn(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Mn(e,t){var n;if(e)return"string"==typeof e?jn(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?jn(e,t):void 0}function jn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Nn=[["A3",11.69,16.54],["A4",8.27,11.69],["A5",5.83,8.27],["B4",9.84,13.9],["B5",6.93,9.84]],Fn=["横向打印","竖向打印"];function Rn(e){this.data.merges._=this.newMerges,this.data.rows._=this.newRows,"cancel"===e?this.el.hide():this.toPrint()}function Pn(e,t,n){var r=0;if(t-e==0)return 0;for(var i=e;i<t;i++)r+=n.rows.getHeight(i);return r}var Ln=function(){function e(t,n){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.mockData=[],this.paper={width:qt(Nn[1][1]),height:qt(Nn[1][2]),padding:0,orientation:Fn[0]},this.paperWidth=qt(Nn[1][1]),this.paperHeight=qt(Nn[1][2]),this.data=t,this.table=n,this.newMerges=null,this.newRows=null,this.papersize=null,this.m_padding=null,this.mode="print",this.fileName="pdf",this.imgPromiseList=[],this.el=s("div","".concat(pe,"-print")).children(s("div","".concat(pe,"-print-bar")).children(s("div","-title").child("Print settings"),s("div","-right").children(s("div","".concat(pe,"-buttons")).children(new St("cancel").on("click",Rn.bind(this,"cancel")),new St("next","primary").on("click",Rn.bind(this,"next"))))),s("div","".concat(pe,"-print-content")).children(this.contentEl=s("div","-content"),s("div","-sider").child(s("form","").children(s("fieldset","").children(s("label","").child("纸张大小"),(t=s("select","")).children.apply(t,In(Nn.map((function(e,t){return 1==t?s("option","").attr("value",t).child("".concat(e[0]," ( ").concat(e[1],"''x").concat(e[2],"'' )")).attr("selected","selected"):s("option","").attr("value",t).child("".concat(e[0]," ( ").concat(e[1],"''x").concat(e[2],"'' )"))})))).on("change",function(e){this.data.merges._=this.newMerges,this.data.rows._=this.newRows;var t=this.paper;e=e.target.value,e=Nn[e];t.w=qt(e[1]),t.h=qt(e[2]),this.preview()}.bind(this))),s("fieldset","").children(s("label","").child("方向"),(n=s("select","")).children.apply(n,In(Fn.map((function(e,t){return s("option","").attr("value",t).child("".concat(Fn[t]))})))).on("change",function(e){this.data.merges._=this.newMerges,this.data.rows._=this.newRows;var t=this.paper;e=e.target.value,e=Fn[e];t.orientation=e,this.preview()}.bind(this))))))).hide()}var t,n;return t=e,(n=[{key:"resetData",value:function(e){this.data=e}},{key:"setMockData",value:function(e){this.mockData=e}},{key:"setPrintParams",value:function(e){if(e)return[Vt(e.papersize),Vt(e.padding)]}},{key:"preview",value:function(e,t){var n,r,i,o=this,a=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"print",u=3<arguments.length&&void 0!==arguments[3]?arguments[3]:"pdf",c=4<arguments.length?arguments[4]:void 0,l=5<arguments.length?arguments[5]:void 0,h=(window.tizdata_dpr_param=4,this.fileName=u,this.paper),d=this.table,p=(u=null,u=t||this.mockData,0);if(c)try{h.orientation=1==e.params.direction?"landscape":"portrait"}catch(t){h.orientation="portrait"}else u[0].printParams?h.orientation=u[0].printParams.paper[0].value:h.orientation="portrait";var m,g,A=null;if(e)try{var v=0,b=0;if(c){try{var y=Xt(e.paper);v=y.width,b=y.height}catch(t){}A=function(e){var t={};if(e)for(var n in e){var r=e[n],i={isHead:n.includes("Head"),isRow:n.includes("Row")};(r.start||r.end)&&(t[n]=Object.assign(i,r))}return t}(e.repeat)}else{m=e.params,g={wbWidth:0,wbHeight:0},m.forEach((function(e){switch(e.flag){case"width":g.wbWidth=Wt(e.val,e.unit);break;case"height":g.wbHeight=Wt(e.val,e.unit)}}));var w=g;v=w.wbWidth,b=w.wbHeight}void 0!==v&&0!==v||(v=h.width),void 0!==b&&0!==b||(b=h.height),p="landscape"===h.orientation?(i=b,v):(i=v,b)}catch(t){p="landscape"===h.orientation?(i=h.height,h.width):(i=h.width,h.height)}else p="landscape"===h.orientation?(i=h.height,h.width):(i=h.width,h.height);return this.paperWidth=i,this.paperHeight=p,this.canvases=[],this.mode=a,u.forEach((function(t,a){var u,m,g,v=!1,b=0,y=(n=t.or,r=t.oc,"portrait"),w=0,x=0,C=0,k=0;if(c){if(e&&e.params){v=e.params.autoFill;try{var E=Jt(e.params.padding,h.padding);w=E.top,x=E.left,C=E.right,k=E.bottom}catch(u){w=h.padding,x=h.padding,C=h.padding,k=h.padding}}y=h.orientation,g=i,b=p}else t.printParams&&(y=t.printParams.paper[0].value,E=Kt(t.printParams,h),w=E.top,x=E.left,C=E.right,k=E.bottom,v=t.printParams.isAutoFill),b=y!==h.orientation?(g=p,i):(g=i,p);u=g-(x+C),E=m=b-(w+k),t.removeBlankRowCol(),o.newMerges=_.cloneDeep(t.merges._),o.newRows=_.cloneDeep(t.rows._);C=function(e){var t,n=0;for(t in e)"len"!=t&&(n+=1);return n}(t.rows._),k=function(e){var t,n,r=0;for(t in e)"len"==t||(n=e[t])&&n.cells&&(n=(n=Object.keys(n.cells)).map((function(e){return Number(e)})),r<(n=Math.max.apply(Math,In(n)))&&(r=n));return r}(t.rows._);var S=t.contentRange(C,k),O=o.splitCol(S,u,t),T=0,D=0,B=0,I=0,M={},j={},N={},F={},R=!1,P=!1,L=!1,U=!1,z=0,H=0,$=0,Q=0,V=0,q=A||t.printRepeat;if(q)for(var G in q){var W=q[G];if("isAutoFill"!=G){ae=oe=re=ie=ne=te=ee=Z=X=J=Y=K=void 0;var K=parseInt(W.start)-1,Y=parseInt(W.end)-1;if(isNaN(K)||isNaN(Y)||Y<K)throw new Error("data Error");if(W.isRow){var X,J={};for(X in n)K==n[X]&&(K=parseInt(X)),Y==n[X]&&(Y=parseInt(X));for(var Z=0,ee=K;ee<=Y;ee++){var te=t.getOrNewri(ee),ne=t.rows.getHeight(ee)||25;m-=ne,Z+=ne,W.isHead&&(D+=ne),J[ee]=te}W.isHead?(z=Z,R=!0,Object.assign(M,J)):(T=Pn(0,K,t),H=Z,P=!0,Q=K,V=Y,Object.assign(j,J))}else{var re,ie={};for(re in r)K==r[re]&&(K=parseInt(re)),Y==r[re]&&(Y=parseInt(re));for(var oe=K;oe<=Y;oe++){var ae=t.getOrNewci(oe);u-=t.cols.getWidth(oe),I+=t.cols.getWidth(oe),W.isHead?I+=t.cols.getWidth(oe):t.cols.getWidth(oe),ie[oe]=ae}$=Y,W.isHead?(B=I,L=!0,Object.assign(N,ie)):(B=u,U=!0,Object.assign(F,ie))}}}C=E-(z+H);var se=o.getPages(S,C,t).length,ue=O.length,ce=(t.totalPage=se*ue,0),le=1/Object(_t.e)();1<le&&(x+=(u-S.w)/2);var he=null,fe=null;if(v){for(var de=Object.entries(t.rows._),me=de.length-1;0<=me;me--){var ge=de[me][1],Ae=!1;try{for(var ve in ge.cells){var be=ge.cells[ve];if(be.valueType&&1==be.valueType)throw fe=me,new Error("找到了")}}catch(u){Ae=!0}if(Ae){var ye,we=(he=_.cloneDeep(ge)).cells;for(ye in we)we[ye]&&(0===we[ye].text||we[ye].text)&&delete we[ye].text;break}}k=o.splitRow(S,m,se,z,H,R),C=E-z-k[k.length-1].height;for(var xe=Math.floor(C/he.height),Ce=(t.insert("row",xe,fe+1),t.rows._),ke=1;ke<=xe;ke++)Ce[fe+ke]=he;if(P&&0<Object.keys(j).length){var Ee,Se={};for(Ee in j)Number(Ee)>fe?Se[Number(Ee)+xe]=j[Ee]:Se[Ee]=j[Ee];j=Se,T=Pn(0,Math.max.apply(Math,In(Object.keys(Se))),t)}S.eri+=xe}o.contentEl.html("");for(var _e={sri:0,sci:0,eri:0,eci:0},Oe=(t.clearMerge(),function(e){var n,r,i=0==e?x:x-(n=e,r=0,O.forEach((function(e,t){0<t&&t<=n&&(r+=e.w)})),r),a=_e.sri=0,u=0,c=0,h=0;if(!O[e])return{v:void 0};for(var p=0;p<se;p+=1)a>S.eri||function(){function n(e,n){var r,o,a,s=n?M:j;for(r in k.save(),k.translate(i/Object(_t.e)(),e/Object(_t.e)()),le<1&&k.scale(le,le),s)for(o in s[r].cells)_e.sci<=parseInt(o)&&parseInt(o)<=_e.eci&&(a=bn(k,t,parseInt(r),parseInt(o),0,0,d,null,!1,l))&&this.imgPromiseList.push(a);k.restore()}ce+=1,t.currentPage=ce;var r=0,A=0,v=!0,C=s("canvas","".concat(pe,"-canvas")).css("background","#fff"),k=(C.el.style.margin="0px !important",C.el.style.padding="0px !important",C.el.myorientation=y,C.el.paddingLeft=x,C.el.parentSheet=t.name,new _t.a(C.el,g,b));for(k.save(),k.ctx.fillStyle="#fff",k.ctx.fillRect(0,0,g,b),k.restore(),k.save(),R&&0==p?(h=m+z,k.translate((i+I)/Object(_t.e)(),(w-z)/Object(_t.e)())):(h=m,k.translate((i+I)/Object(_t.e)(),w/Object(_t.e)())),p==se-1&&(h=m+H),le<1&&k.scale(le,le);a<=S.eri;a+=1){var E=t.rows.getHeight(a);if(!((r+=E)<(0<h?h:m))){v=!(Q<=a-1&&a-1<=V),A=-(r-E);break}for(var _=O[e].sci;_<=O[e].eci;_+=1){var q=t.getCell(a,_);q&&q.merge||(q=bn(k,t,a,_,u+D,0,d,null,!1,l))&&o.imgPromiseList.push(q)}}_e.eri=a-1,_e.sci=O[e].sci,_e.eci=O[e].eci,k.restore();var G=u,W=(c+=A,k.save(),R&&0==p?k.translate((i+I)/Object(_t.e)(),(w-z)/Object(_t.e)()):k.translate((i+I)/Object(_t.e)(),w/Object(_t.e)()),le<1&&k.scale(le,le),t.merges._);if(t.myeachMergesInView(_e,(function(n,r){var i,s,u,c,l,h,d=n.sri,p=n.sci,m=n.eri;(n=(n.eci,t.getCell(d,p)))&&"merge"in n&&(i=(s=n.merge.concat([]))[0],s=s[1],d<=a&&a<=d+i&&O[e].eci>=p&&p+s>=O[e].eci?(W[r].eri=a-1,W[r].eci=O[e].eci,l=i-(a-d),u=s-(O[e].eci-p),c=[a-d-1,O[e].eci-p],n.merge=c,t.setCellText(a,p,""),c=t.getCell(a,p),o.copyData(c,n),h=new f(a,p,a+l-1,O[e].eci,0,0),c.merge=[l,O[e].eci-p],W.push(h),t.setCellText(d,O[e].eci+1,""),h=t.getCell(d,O[e].eci+1),o.copyData(h,n),h=new f(d,O[e].eci+1,a-1,O[e].eci+u+1,0,0),c.merge=[a-d-1,O[e].eci-p+1],W.push(h),t.setCellText(a,O[e].eci+1,""),h=t.getCell(a,O[e].eci+1),o.copyData(h,n),h=new f(a,O[e].eci,a+l-1,O[e].eci+u+1,0,0),c.merge=[l,O[e].eci-p+1],W.push(h)):d<a&&a<=d+i?(W[r].eri=a-1,u=[a-d-1,s],n.merge=u,t.setCellText(a,p,""),c=t.getCell(a,p),o.copyData(c,n),l=i-(a-d),h=new f(a,W[r].sci,a+l-1,W[r].eci,0,0),c.merge=[l,s],W.push(h)):O[e].eci>p&&p+s>O[e].eci&&(W[r].eci=O[e].eci,u=[i,O[e].eci-p],n.merge=u,t.setCellText(d,O[e].eci+1,""),c=t.getCell(d,O[e].eci+1),o.copyData(c,n),l=s-(O[e].eci-p),h=new f(d,O[e].eci+1,m,O[e].eci+l,0,0),c.merge=[i,l-1],W.push(h)))})),t.myeachMergesInView(_e,(function(e,n){(e=bn(k,t,e.sri,e.sci,G+D,0,d,null,!1,l))&&o.imgPromiseList.push(e)})),k.restore(),(0<Object.keys(M).length||0<Object.keys(j).length)&&(P&&p<se-1&&v&&n(0==p?w+Math.abs(A)-T:w+Math.abs(A)-T+z,!1),R&&0<p&&n(w,!0)),0<Object.keys(N).length||0<Object.keys(F).length){if(L&&0<e){var K,Y=0;Y=0<p?c:0;for(K in k.save(),k.translate((i+B)/Object(_t.e)(),(w+Y)/Object(_t.e)()),le<1&&k.scale(le,le),N)!function(e){Object.keys(N[e]).forEach((function(n){_e.sri<=parseInt(n)&&parseInt(n)<=_e.eri&&(n=bn(k,t,parseInt(n),parseInt(e),0,0,d,null,!1,l))&&o.imgPromiseList.push(n)}))}(K);k.restore()}if(U&&e<ue-1){var X;Y=0,Y=0<p?c:0;for(X in k.save(),k.translate((i-function(e,t,n){for(var r=0,i=e+1;i<=t-1;i++)r+=n.cols.getWidth(i);return r}(_e.eci,$,t))/Object(_t.e)(),(w+Y)/Object(_t.e)()),le<1&&k.scale(le,le),F)!function(e){Object.keys(F[e]).forEach((function(n){_e.sri<=parseInt(n)&&parseInt(n)<=_e.eri&&(n=bn(k,t,parseInt(n),parseInt(e),0,0,d,null,!1,l))&&o.imgPromiseList.push(n)}))}(X);k.restore()}}_e.sri=_e.eri+1,_e.sci=_e.eci,u+=A,o.canvases.push(C)}()}),Te=0;Te<ue;Te++){var De=Oe(Te);if("object"===Dn(De))return De.v}t.merges._=o.newMerges,t.rows._=o.newRows,t.totalPage=null,t.currentPage=null})),t=null,"hidePrint"==this.mode?t=this.getPdf():Promise.all(this.imgPromiseList).then((function(e){o.canvases=o.canvases.map((function(e){return o.rotateCanvas(e.el.cloneNode(),e.el)})),o.toPrint()})).catch((function(e){})),window.tizdata_dpr_param=!window.devicePixelRatio||window.devicePixelRatio<2?2:window.devicePixelRatio,t}},{key:"copyData",value:function(e,t){var n,r=_.cloneDeep(t);for(n in r)e[n]=r[n]}},{key:"getDrawBox",value:function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0,i=(t=(e=e.cellRect(t,n)).left,n=e.top,e.width);e=e.height;return new _t.b(t,n+r,i,e,5)}},{key:"splitCol",value:function(e,t,n){for(var r,i,o=0,a=0,s=0,u=[],c=0,l=0;l<e.eci;l++){var h={},f=n.cols.getWidth(l);t<(o+=f)&&(a+=1,c=o-f,0===u.length?(h.sci=0,h.eci=l-1,h.w=o-f,h.w1=t-o-f):(s+=1,h.sci=u[u.length-1].eci+1,h.eci=l-a+s,h.w=o-f,h.w1=t-o-f,h.eci,h.sci),u.push(h),o=0,l--)}return 0==u.length?u.push({sci:e.sci,eci:e.eci,w:c}):(r=u[u.length-1].eci+1,i=e.eci,u.push({sci:r,eci:i,w:c})),u}},{key:"splitRow",value:function(e,t,n,r,i,o,a){for(var s=this.data,u=[],c=0,l=0;l<n;l++){for(var h,f=c,d=0,p=o&&0==l?t+r:t;c<=e.eri;c+=1)if((0<p?p:t)<(d+=s.rows.getHeight(c))){u.push({sri:f,eri:c});break}l==n-1&&(h={sri:f,eri:e.eri,height:d},u.push(h))}return u}},{key:"getPages",value:function(e,t,n){for(var r,i,o=0,a=0,s=0,u=[],c=0;c<e.eri;c++){var l={};t<(o+=n.rows.getHeight(c)||25)&&(a+=1,0===u.length?(l.sri=0,l.eri=c-1,l.rc=c-1):(s+=1,l.sri=u[u.length-1].eri+1,l.eri=c-a+s,l.rc=c-a+s-(u[u.length-1].eri+1)),u.push(l),o=0,c--)}return 0==u.length?u.push({sri:e.sri,eri:e.eri,rc:e.eri-e.sri}):(r=u[u.length-1].eri+1,i=e.eri,u.push({sri:r,eri:i,rc:i-r})),u}},{key:"toPrint",value:function(){this.el.hide(),this.toPdf()}},{key:"getPdf",value:function(){return this.toPdf()}},{key:"rotateCanvas",value:function(e,t){e.style.margin="0",e.style.padding="0";var n,r,i=e.getContext("2d");return t.myorientation!=this.paper.orientation&&(n=t.style.width,r=t.style.height,e.style.height=n,e.style.width=r,n=4*parseFloat(n),r=4*parseFloat(r),i.translate(n,-t.paddingLeft),i.rotate(Math.PI/2),i.scale(r/n,n/r)),i.drawImage(t,0,0),e.toDataURL("image/jpeg",.7)}},{key:"toPdf",value:function(){var e=this.canvases,t=this.paperWidth,n=this.paperHeight,r=null,i=n<t?"l":"p";if("pdf"==this.mode){r=new Tn.jsPDF(i,"px",[t,n],!0);for(var o=0;o<e.length;o++)0<o&&r.addPage(),r.addImage(e[o],"png",0,0,t,n);r.autoPrint(),window.open(r.output("bloburl"),"_blank")}else{i=((i=document.getElementById("xzprintImgIframe"))&&i.parentNode.removeChild(i),s("iframe").attr({name:"xzprintImgIframe",id:"xzprintImgIframe"}).css("display","none"));var a,u=(window.document.body.appendChild(i.el),i.el.contentWindow),c=function(e,t){var n,r,i,o,a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(a)return r=!(n=!0),{s:function(){a=a.call(e)},n:function(){var e=a.next();return n=e.done,e},e:function(e){r=!0,i=e},f:function(){try{n||null==a.return||a.return()}finally{if(r)throw i}}};if(Array.isArray(e)||(a=Mn(e))||t&&e&&"number"==typeof e.length)return a&&(e=a),o=0,{s:t=function(){},n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(e);try{for(c.s();!(a=c.n()).done;){var l=a.value;u.document.body.appendChild(s("img").attr({src:l,width:t+"px",height:n+"px"}).el)}}catch(e){c.e(e)}finally{c.f()}var h=window.frames.xzprintImgIframe;setTimeout((function(){h.print()}))}return r}}])&&Bn(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),Un=(n(360),n(13)),zn=n(216),Hn=n(114);function $n(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function Qn(e,t){this._pairs=[],e&&Object(Hn.a)(e,this,t)}const Vn=Qn.prototype;Vn.append=function(e,t){this._pairs.push([e,t])},Vn.toString=function(e){const t=e?function(t){return e.call(this,t,$n)}:$n;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var qn=Qn;function Gn(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Wn(e,t,n){if(t){var r=n&&n.encode||Gn;const i=n&&n.serialize;let o;(o=i?i(t,n):Un.a.isURLSearchParams(t)?t.toString():new qn(t,n).toString(r))&&(-1!==(t=e.indexOf("#"))&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+o)}return e}var Kn=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Un.a.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},Yn=n(36),Xn={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Jn=(Ae="undefined"!=typeof URLSearchParams?URLSearchParams:qn,Bt=FormData,("undefined"==typeof navigator||"ReactNative"!==(Jn=navigator.product)&&"NativeScript"!==Jn&&"NS"!==Jn)&&"undefined"!=typeof window&&"undefined"!=typeof document),Zn="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,er={isBrowser:!0,classes:{URLSearchParams:Ae,FormData:Bt,Blob:Blob},isStandardBrowserEnv:Jn,isStandardBrowserWebWorkerEnv:Zn,protocols:["http","https","file","blob","url","data"]},tr=function(e){if(Un.a.isFormData(e)&&Un.a.isFunction(e.entries)){const t={};return Un.a.forEachEntry(e,(e,n)=>{!function e(t,n,r,i){let o=t[i++];var a=Number.isFinite(+o),s=i>=t.length;return o=!o&&Un.a.isArray(r)?r.length:o,s?Un.a.hasOwnProp(r,o)?r[o]=[r[o],n]:r[o]=n:(r[o]&&Un.a.isObject(r[o])||(r[o]=[]),e(t,n,r[o],i)&&Un.a.isArray(r[o])&&(r[o]=function(e){const t={};var n=Object.keys(e);let r;var i,o=n.length;for(r=0;r<o;r++)t[i=n[r]]=e[i];return t}(r[o]))),!a}(Un.a.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0]),n,t,0)}),t}return null};const nr={"Content-Type":void 0},rr={transitional:Xn,adapter:["xhr","http"],transformRequest:[function(e,t){const n=t.getContentType()||"";var r=-1<n.indexOf("application/json");if(o=((a=Un.a.isObject(e))&&Un.a.isHTMLForm(e)&&(e=new FormData(e)),Un.a.isFormData(e)))return r?JSON.stringify(tr(e)):e;if(!(Un.a.isArrayBuffer(e)||Un.a.isBuffer(e)||Un.a.isStream(e)||Un.a.isFile(e)||Un.a.isBlob(e))){if(Un.a.isArrayBufferView(e))return e.buffer;if(Un.a.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();if(a){if(-1<n.indexOf("application/x-www-form-urlencoded"))return o=e,i=this.formSerializer,Object(Hn.a)(o,new er.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return er.isNode&&Un.a.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},i)).toString();if((o=Un.a.isFileList(e))||-1<n.indexOf("multipart/form-data")){const t=this.env&&this.env.FormData;return Object(Hn.a)(o?{"files[]":e}:e,t&&new t,this.formSerializer)}}if(a||r){t.setContentType("application/json",!1);var i=e,o=void 0,a=void 0;if(Un.a.isString(i))try{return(o||JSON.parse)(i),Un.a.trim(i)}catch(e){if("SyntaxError"!==e.name)throw e}return(a||JSON.stringify)(i)}}return e}],transformResponse:[function(e){var t=this.transitional||rr.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(e&&Un.a.isString(e)&&(n&&!this.responseType||r)){n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw Yn.a.from(e,Yn.a.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:er.classes.FormData,Blob:er.classes.Blob},validateStatus:function(e){return 200<=e&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};Un.a.forEach(["delete","get","head"],(function(e){rr.headers[e]={}})),Un.a.forEach(["post","put","patch"],(function(e){rr.headers[e]=Un.a.merge(nr)}));var ir=rr;const or=Un.a.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),ar=Symbol("internals");function sr(e){return e&&String(e).trim().toLowerCase()}function ur(e){return!1===e||null==e?e:Un.a.isArray(e)?e.map(ur):String(e)}function cr(e,t,n,r){return Un.a.isFunction(r)?r.call(this,t,n):Un.a.isString(t)&&(Un.a.isString(r)?-1!==t.indexOf(r):Un.a.isRegExp(r)&&r.test(t))}class lr{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function i(e,t,n){var i=sr(t);if(!i)throw new Error("header name must be a non-empty string");(i=Un.a.findKey(r,i))&&void 0!==r[i]&&!0!==n&&(void 0!==n||!1===r[i])||(r[i||t]=ur(e))}var o=(e,t)=>Un.a.forEach(e,(e,n)=>i(e,n,t));return Un.a.isPlainObject(e)||e instanceof this.constructor?o(e,t):Un.a.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z]+$/.test(e.trim())?o((e=>{const t={};let n,r,i;return e&&e.split("\n").forEach((function(e){i=e.indexOf(":"),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim(),!n||t[n]&&or[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t):null!=e&&i(t,e,n),this}get(e,t){if((e=sr(e))&&(e=Un.a.findKey(this,e))){var n,r=this[e];if(!t)return r;if(!0===t){var i=r;const e=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;for(;n=t.exec(i);)e[n[1]]=n[2];return e}if(Un.a.isFunction(t))return t.call(this,r,e);if(Un.a.isRegExp(t))return t.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}has(e,t){return!!(e=sr(e))&&!(!(e=Un.a.findKey(this,e))||void 0===this[e]||t&&!cr(0,this[e],e,t))}delete(e,t){const n=this;let r=!1;function i(e){(e=sr(e))&&(e=Un.a.findKey(n,e))&&(!t||cr(0,n[e],e,t))&&(delete n[e],r=!0)}return Un.a.isArray(e)?e.forEach(i):i(e),r}clear(e){var t=Object.keys(this);let n=t.length,r=!1;for(;n--;){var i=t[n];e&&!cr(0,this[i],i,e)||(delete this[i],r=!0)}return r}normalize(e){const t=this,n={};return Un.a.forEach(this,(r,i)=>{var o=Un.a.findKey(n,i);o?(t[o]=ur(r),delete t[i]):((o=e?i.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n):String(i).trim())!==i&&delete t[i],t[o]=ur(r),n[o]=!0)}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Un.a.forEach(this,(n,r)=>{null!=n&&!1!==n&&(t[r]=e&&Un.a.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[ar]=this[ar]={accessors:{}}).accessors,n=this.prototype;function r(e){var r=sr(e);if(!t[r]){{var i=n,o=e;const t=Un.a.toCamelCase(" "+o);["get","set","has"].forEach(e=>{Object.defineProperty(i,e+t,{value:function(t,n,r){return this[e].call(this,o,t,n,r)},configurable:!0})})}t[r]=!0}}return Un.a.isArray(e)?e.forEach(r):r(e),this}}lr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Un.a.freezeMethods(lr.prototype),Un.a.freezeMethods(lr);var hr=lr;function fr(e,t){const n=this||ir;var r=t||n;const i=hr.from(r.headers);let o=r.data;return Un.a.forEach(e,(function(e){o=e.call(n,o,i.normalize(),t?t.status:void 0)})),i.normalize(),o}function dr(e){return!(!e||!e.__CANCEL__)}function pr(e,t,n){Yn.a.call(this,null==e?"canceled":e,Yn.a.ERR_CANCELED,t,n),this.name="CanceledError"}Un.a.inherits(pr,Yn.a,{__CANCEL__:!0});var mr=pr,gr=(Ae=n(217),er.isStandardBrowserEnv?{write:function(e,t,n,r,i,o){const a=[];a.push(e+"="+encodeURIComponent(t)),Un.a.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),Un.a.isString(r)&&a.push("path="+r),Un.a.isString(i)&&a.push("domain="+i),!0===o&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){return(e=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)")))?decodeURIComponent(e[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}});function Ar(e,t){var n;return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?(e=e,(n=t)?e.replace(/\/+$/,"")+"/"+n.replace(/^\/+/,""):e):t}var vr=er.isStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(e){return(e=Un.a.isString(e)?r(e):e).protocol===n.protocol&&e.host===n.host}}():function(){return!0};function br(e,t){let n=0;const r=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let i,o=0,a=0;return t=void 0!==t?t:1e3,function(s){var u=Date.now(),c=r[a];i=i||u,n[o]=s,r[o]=u;let l=a,h=0;for(;l!==o;)h+=n[l++],l%=e;return(o=(o+1)%e)===a&&(a=(a+1)%e),u-i<t||!(s=c&&u-c)?void 0:Math.round(1e3*h/s)}}(50,250);return i=>{var o=i.loaded,a=i.lengthComputable?i.total:void 0,s=o-n,u=r(s);const c={loaded:n=o,total:a,progress:a?o/a:void 0,bytes:s,rate:u||void 0,estimated:u&&a&&o<=a?(a-o)/u:void 0,event:i};c[t?"download":"upload"]=!0,e(c)}}Bt="undefined"!=typeof XMLHttpRequest;const yr={http:Ae.a,xhr:Bt&&function(e){return new Promise((function(t,n){var r=e.data;const i=hr.from(e.headers).normalize(),o=e.responseType;let a;function s(){e.cancelToken&&e.cancelToken.unsubscribe(a),e.signal&&e.signal.removeEventListener("abort",a)}Un.a.isFormData(r)&&(er.isStandardBrowserEnv||er.isStandardBrowserWebWorkerEnv)&&i.setContentType(!1);let u=new XMLHttpRequest;e.auth&&(c=e.auth.username||"",h=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"",i.set("Authorization","Basic "+btoa(c+":"+h)));var c=Ar(e.baseURL,e.url);function l(){if(u){var r=hr.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders());{const i=(r={data:o&&"text"!==o&&"json"!==o?u.response:u.responseText,status:u.status,statusText:u.statusText,headers:r,config:e,request:u}).config.validateStatus;r.status&&i&&!i(r.status)?function(e){n(e),s()}(new Yn.a("Request failed with status code "+r.status,[Yn.a.ERR_BAD_REQUEST,Yn.a.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):function(e){t(e),s()}(r)}u=null}}u.open(e.method.toUpperCase(),Wn(c,e.params,e.paramsSerializer),!0),u.timeout=e.timeout,"onloadend"in u?u.onloadend=l:u.onreadystatechange=function(){u&&4===u.readyState&&(0!==u.status||u.responseURL&&0===u.responseURL.indexOf("file:"))&&setTimeout(l)},u.onabort=function(){u&&(n(new Yn.a("Request aborted",Yn.a.ECONNABORTED,e,u)),u=null)},u.onerror=function(){n(new Yn.a("Network Error",Yn.a.ERR_NETWORK,e,u)),u=null},u.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";var r=e.transitional||Xn;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new Yn.a(t,r.clarifyTimeoutError?Yn.a.ETIMEDOUT:Yn.a.ECONNABORTED,e,u)),u=null},er.isStandardBrowserEnv&&(h=(e.withCredentials||vr(c))&&e.xsrfCookieName&&gr.read(e.xsrfCookieName))&&i.set(e.xsrfHeaderName,h),void 0===r&&i.setContentType(null),"setRequestHeader"in u&&Un.a.forEach(i.toJSON(),(function(e,t){u.setRequestHeader(t,e)})),Un.a.isUndefined(e.withCredentials)||(u.withCredentials=!!e.withCredentials),o&&"json"!==o&&(u.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&u.addEventListener("progress",br(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&u.upload&&u.upload.addEventListener("progress",br(e.onUploadProgress)),(e.cancelToken||e.signal)&&(a=t=>{u&&(n(!t||t.type?new mr(null,e,u):t),u.abort(),u=null)},e.cancelToken&&e.cancelToken.subscribe(a),e.signal&&(e.signal.aborted?a():e.signal.addEventListener("abort",a)));var h,f=(h=/^([-+\w]{1,25})(:?\/\/|:)/.exec(h=c))&&h[1]||"";f&&-1===er.protocols.indexOf(f)?n(new Yn.a("Unsupported protocol "+f+":",Yn.a.ERR_BAD_REQUEST,e)):u.send(r||null)}))}};Un.a.forEach(yr,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});function wr(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new mr(null,e)}function xr(e){wr(e),e.headers=hr.from(e.headers),e.data=fr.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return(e=>{var t=(e=Un.a.isArray(e)?e:[e]).length;let n,r;for(let i=0;i<t&&(n=e[i],!(r=Un.a.isString(n)?yr[n.toLowerCase()]:n));i++);if(!r){if(!1===r)throw new Yn.a(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT");throw new Error(Un.a.hasOwnProp(yr,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`)}if(Un.a.isFunction(r))return r;throw new TypeError("adapter is not a function")})(e.adapter||ir.adapter)(e).then((function(t){return wr(e),t.data=fr.call(e,e.transformResponse,t),t.headers=hr.from(t.headers),t}),(function(t){return dr(t)||(wr(e),t&&t.response&&(t.response.data=fr.call(e,e.transformResponse,t.response),t.response.headers=hr.from(t.response.headers))),Promise.reject(t)}))}const Cr=e=>e instanceof hr?e.toJSON():e;function kr(e,t){t=t||{};const n={};function r(e,t,n){return Un.a.isPlainObject(e)&&Un.a.isPlainObject(t)?Un.a.merge.call({caseless:n},e,t):Un.a.isPlainObject(t)?Un.a.merge({},t):Un.a.isArray(t)?t.slice():t}function i(e,t,n){return Un.a.isUndefined(t)?Un.a.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function o(e,t){if(!Un.a.isUndefined(t))return r(void 0,t)}function a(e,t){return Un.a.isUndefined(t)?Un.a.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function s(n,i,o){return o in t?r(n,i):o in e?r(void 0,n):void 0}const u={url:o,method:o,data:o,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t)=>i(Cr(e),Cr(t),!0)};return Un.a.forEach(Object.keys(e).concat(Object.keys(t)),(function(r){const o=u[r]||i;var a=o(e[r],t[r],r);Un.a.isUndefined(a)&&o!==s||(n[r]=a)})),n}const Er={},Sr=(["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Er[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}),{});Er.transitional=function(e,t,n){function r(e,t){return"[Axios v1.3.2] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,i,o)=>{if(!1===e)throw new Yn.a(r(i," has been removed"+(t?" in "+t:"")),Yn.a.ERR_DEPRECATED);return t&&!Sr[i]&&(Sr[i]=!0),!e||e(n,i,o)}};var _r={assertOptions:function(e,t,n){if("object"!=typeof e)throw new Yn.a("options must be an object",Yn.a.ERR_BAD_OPTION_VALUE);var r=Object.keys(e);let i=r.length;for(;0<i--;){var o=r[i];const s=t[o];var a;if(s){if(!0!==(a=void 0===(a=e[o])||s(a,o,e)))throw new Yn.a("option "+o+" must be "+a,Yn.a.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new Yn.a("Unknown option "+o,Yn.a.ERR_BAD_OPTION)}},validators:Er};const Or=_r.validators;class Tr{constructor(e){this.defaults=e,this.interceptors={request:new Kn,response:new Kn}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{};const{transitional:n,paramsSerializer:r,headers:i}=t=kr(this.defaults,t);void 0!==n&&_r.assertOptions(n,{silentJSONParsing:Or.transitional(Or.boolean),forcedJSONParsing:Or.transitional(Or.boolean),clarifyTimeoutError:Or.transitional(Or.boolean)},!1),void 0!==r&&_r.assertOptions(r,{encode:Or.function,serialize:Or.function},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase(),(e=i&&Un.a.merge(i.common,i[t.method]))&&Un.a.forEach(["delete","get","head","post","put","patch","common"],e=>{delete i[e]}),t.headers=hr.concat(e,i);const o=[];let a=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,o.unshift(e.fulfilled,e.rejected))}));const s=[];this.interceptors.response.forEach((function(e){s.push(e.fulfilled,e.rejected)}));let u,c,l=0;if(a){c=o.length;let n=t;for(l=0;l<c;){const t=o[l++],r=o[l++];try{n=t(n)}catch(e){r.call(this,e);break}}try{u=xr.call(this,n)}catch(e){return Promise.reject(e)}for(l=0,c=s.length;l<c;)u=u.then(s[l++],s[l++])}else{const e=[xr.bind(this),void 0];for(e.unshift.apply(e,o),e.push.apply(e,s),c=e.length,u=Promise.resolve(t);l<c;)u=u.then(e[l++],e[l++])}return u}getUri(e){return Wn(Ar((e=kr(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}Un.a.forEach(["delete","get","head","options"],(function(e){Tr.prototype[e]=function(t,n){return this.request(kr(n||{},{method:e,url:t,data:(n||{}).data}))}})),Un.a.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,i){return this.request(kr(i||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Tr.prototype[e]=t(),Tr.prototype[e+"Form"]=t(!0)}));var Dr=Tr;Zn=class e{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then(e=>{if(n._listeners){let t=n._listeners.length;for(;0<t--;)n._listeners[t](e);n._listeners=null}}),this.promise.then=e=>{let t;const r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,i){n.reason||(n.reason=new mr(e,r,i),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){this._listeners&&-1!==(e=this._listeners.indexOf(e))&&this._listeners.splice(e,1)}static source(){let t;return{token:new e((function(e){t=e})),cancel:t}}};const Br={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Br).forEach(([e,t])=>{Br[t]=e}),Ae=Br;const Ir=function e(t){var n=new Dr(t);const r=Object(zn.a)(Dr.prototype.request,n);return Un.a.extend(r,Dr.prototype,n,{allOwnKeys:!0}),Un.a.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(kr(t,n))},r}(ir);Ir.Axios=Dr,Ir.CanceledError=mr,Ir.CancelToken=Zn,Ir.isCancel=dr,Ir.VERSION="1.3.2",Ir.toFormData=Hn.a,Ir.AxiosError=Yn.a,Ir.Cancel=Ir.CanceledError,Ir.all=function(e){return Promise.all(e)},Ir.spread=function(e){return function(t){return e.apply(null,t)}},Ir.isAxiosError=function(e){return Un.a.isObject(e)&&!0===e.isAxiosError},Ir.mergeConfig=kr,Ir.AxiosHeaders=hr,Ir.formToJSON=e=>tr(Un.a.isHTMLForm(e)?new FormData(e):e),Ir.HttpStatusCode=Ae;var Mr=Ir.default=Ir,jr={tableMaxRow:10,tableMaxColInConsole:10,dtypeTestLim:20,lowMemoryMode:!1},Nr=["float32","int32","string","boolean","undefined"],Fr=function(){return(Fr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};
/**
*  @license
* Copyright 2022 JsData. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.

* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ==========================================================================
*/function Rr(e){var t=(e=Fr({tableDisplayConfig:{},tableMaxRow:10,tableMaxColInConsole:10,dtypeTestLim:20,lowMemoryMode:!1},e)).tableDisplayConfig,n=e.tableMaxRow,r=e.tableMaxColInConsole,i=e.dtypeTestLim;e=e.lowMemoryMode;this.tableDisplayConfig=t,this.tableMaxRow=n,this.tableMaxColInConsole=r,this.dtypeTestLim=i,this.lowMemoryMode=e}Rr.prototype.setTableDisplayConfig=function(e){this.tableDisplayConfig=e},Object.defineProperty(Rr.prototype,"getTableDisplayConfig",{get:function(){return this.tableDisplayConfig},enumerable:!1,configurable:!0}),Rr.prototype.setTableMaxColInConsole=function(e){this.tableMaxColInConsole=e},Object.defineProperty(Rr.prototype,"getTableMaxColInConsole",{get:function(){return this.tableMaxColInConsole},enumerable:!1,configurable:!0}),Rr.prototype.setMaxRow=function(e){this.tableMaxRow=e},Object.defineProperty(Rr.prototype,"getMaxRow",{get:function(){return this.tableMaxRow},enumerable:!1,configurable:!0}),Object.defineProperty(Rr.prototype,"getDtypeTestLim",{get:function(){return this.dtypeTestLim},enumerable:!1,configurable:!0}),Rr.prototype.setDtypeTestLim=function(e){this.dtypeTestLim=e},Object.defineProperty(Rr.prototype,"isLowMemoryMode",{get:function(){return this.lowMemoryMode},enumerable:!1,configurable:!0}),Rr.prototype.setIsLowMemoryMode=function(e){this.lowMemoryMode=e};var Pr=Rr,Lr=new function(){this.throwColumnNamesLengthError=function(e,t){throw t="ParamError: Column names length mismatch. You provided a column of length "+t.length+" but Ndframe columns has length of "+e.shape[1],new Error(t)},this.throwIndexLengthError=function(e,t){throw t="IndexError: You provided an index of length "+t.length+" but Ndframe rows has length of "+e.shape[0],new Error(t)},this.throwIndexDuplicateError=function(){throw new Error("IndexError: Row index must contain unique values")},this.throwColumnDuplicateError=function(){throw new Error("ColumnIndexError: Column index must contain unique values")},this.throwDtypesLengthError=function(e,t){throw t="DtypeError: You provided a dtype array of length "+t.length+" but Ndframe columns has length of "+e.shape[1],new Error(t)},this.throwDtypeNotSupportedError=function(e){throw new Error('DtypeError: Dtype "'+e+'" not supported. dtype must be one of "'+Nr+'"')},this.throwDtypeWithoutColumnError=function(){throw new Error("DtypeError: columns parameter must be provided when dtypes parameter is provided")},this.throwColumnLengthError=function(e,t){throw t="ParamError: Column data length mismatch. You provided data with length "+t+" but Ndframe has column of length "+e.shape[0],new Error(t)},this.throwRowLengthError=function(e,t){throw t="ParamError: Row data length mismatch. You provided data with length "+t+" but Ndframe has row of length "+e.shape[0],new Error(t)},this.throwColumnNotFoundError=function(e){throw e="ParamError: Column not found!. Column name must be one of "+e.columns,new Error(e)},this.throwNotImplementedError=function(){throw new Error("Method not implemented")},this.throwIlocRowIndexError=function(){throw new Error('ParamError: rows parameter must be a Array. For example: rows: [1,2] or rows: ["0:10"]')},this.throwIlocColumnsIndexError=function(){throw new Error('ParamError: columns parameter must be a Array. For example: columns: [1,2] or columns: ["0:10"]')},this.throwStringDtypeOperationError=function(e){throw new Error("DtypeError: String data type does not support "+e+" operation")},this.throwSeriesMathOpLengthError=function(e,t){throw t="ParamError: Row length mismatch. Length of other ("+t.shape[0]+"), must be the same as Ndframe ("+e.shape[0]+")",new Error(t)}};function Ur(e){return(Ur="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}
/**
*  @license
* Copyright 2022 JsData. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.

* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ==========================================================================
*/var zr=function(){return(zr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},Hr=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||((r=r||Array.prototype.slice.call(t,0,i))[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},$r=new Pr(jr);function Qr(){}Qr.prototype.removeElementFromArray=function(e,t){return e.filter((function(e,n){return n!=t}))},Qr.prototype.isString=function(e){return"string"==typeof e},Qr.prototype.isNumber=function(e){return"number"==typeof e&&isFinite(e)},Qr.prototype.isObject=function(e){return e&&"object"===Ur(e)&&e.constructor&&"Object"===e.constructor.name},Qr.prototype.isNull=function(e){return null===e},Qr.prototype.isUndefined=function(e){return void 0===e},Qr.prototype.isEmpty=function(e){return null==e||isNaN(e)&&"string"!=typeof e},Qr.prototype.range=function(e,t){if(t<e)throw new Error("ParamError: end must be greater than start");if(e===t)return[e];for(var n=[],r=e;r<=t;r++)n.push(r);return n},Qr.prototype.keyInObject=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},Qr.prototype.transposeArray=function(e){if(0!==e.length){var t=e.length;if(Array.isArray(e[0])){for(var n=e[0].length,r=[],i=0;i<=n-1;i++){for(var o=[],a=0;a<t;a++){var s=e[a][i];o.push(s)}r.push(o)}return r}}return e},Qr.prototype.getRowAndColValues=function(e){var t=Object.keys(e),n=(e=Object.values(e))[0].length;return e.forEach((function(e){if(e.length!=n)throw Error("Length Error: Length of columns must be the same!")})),[this.transposeArray(e),t]},Qr.prototype.convert2DArrayToSeriesArray=function(e){var t=this;return e.map((function(e){return t.isObject(e)?JSON.stringify(e):""+e}))},Qr.prototype.replaceUndefinedWithNaN=function(e,t){if(0===e.length)return e;if(t&&Array.isArray(e))return e.map((function(e){return void 0===e||"number"==typeof e&&(isNaN(e)||e==1/0)||null==e?NaN:e}));var n=[];if(Array.isArray(e))for(var r=0;r<e.length;r++){var i=e[r].map((function(e){return void 0===e||"number"==typeof e&&(isNaN(e)||e==1/0)||null==e?NaN:e}));n.push(i)}return n},Qr.prototype.inferDtype=function(e){var t=this;return this.is1DArray(e)?[this.$typeChecker(e)]:this.transposeArray(e.slice(0,$r.getDtypeTestLim)).map((function(e){return t.$typeChecker(e)}))},Qr.prototype.$typeChecker=function(e){for(var t=[],n=[],r=[],i=[],o=e.length<$r.getDtypeTestLim?e.length:$r.getDtypeTestLim,a=e.slice(0,o),s=0;s<o;s++){var u=a[s];"boolean"==typeof u?(n.push(!1),t.push(!1),r.push(!1),i.push(!0)):(this.isEmpty(u)?(n.push(!0),t.push(!1),r.push(!1)):isNaN(Number(u))?(n.push(!1),t.push(!1),r.push(!0)):(u.toString().includes(".")?(n.push(!0),t.push(!1)):(n.push(!1),t.push(!0)),r.push(!1)),i.push(!1))}function c(e){return 1==e}return r.some(c)?"string":n.some(c)?"float32":t.some(c)?"int32":i.some(c)?"boolean":"undefined"},Qr.prototype.unique=function(e){return e=new Set(e),Array.from(e)},Qr.prototype.is1DArray=function(e){return"number"==typeof e[0]||"string"==typeof e[0]||"boolean"==typeof e[0]||null===e[0]},Qr.prototype.convertArrayToObject=function(e){for(var t={},n=0;n<e.length;n++)t[n]=e[n];return t},Qr.prototype.countNaNs=function(e,t,n){if(void 0===t&&(t=!0),n){for(var r=0,i=0,o=0;o<e.length;o++){var a=e[o];Number.isNaN(a)?r+=1:i+=1}return t?i:r}var s=[];for(o=0;o<e.length;o++){for(var u=e[o],c=(r=0,i=0,0);c<u.length;c++)a=u[c],Number.isNaN(a)?r+=1:i+=1;t?s.push(i):s.push(r)}return s},Qr.prototype.round=function(e,t,n){if((t=void 0===t?1:t)<0&&(t=1),n){for(var r=[],i=0;i<e.length;i++)"number"!=typeof(s=e[i])||isNaN(s)||null==s?r.push(s):r.push(Number(s.toFixed(t)));return r}var o=[];for(i=0;i<e.length;i++){var a=e[i];r=[];if(Array.isArray(a)){for(var s,u=0;u<a.length;u++)"number"!=typeof(s=a[u])||isNaN(s)||null==s?r.push(s):r.push(Number(s.toFixed(t)));o.push(r)}else"number"!=typeof a||isNaN(a)||null==a?r.push(a):r.push(Number(a.toFixed(t)))}return o},Qr.prototype.isFunction=function(e){return"function"==typeof e},Qr.prototype.randNumberGenerator=function(e,t,n){var r=[];function i(e,t){return Math.floor(Math.random()*(t-e)+e)}for(var o=0;o<n;o++){var a=function n(r,o){if(!o.includes(r))return r;n(r=i(e,t),o)}(i(e,t),r);r.push(a)}return r},Qr.prototype.throwErrorOnWrongParams=function(e,t){for(var n=Object.keys(e),r=[],i=0;i<n.length;i++)t.includes(n[i])?r.push(!0):r.push(!1);if(r.some((function(e){return 0==e})))throw Error("Params Error: Required parameter not found. Your params must include the following ["+t+"]")},Qr.prototype.mapIntegersToBooleans=function(e,t){var n,r;return 2==t?(n=[],e.map((function(e){var t=[];e.map((function(e){return t.push(1==e)})),n.push(t)})),n):(r=[],e.map((function(e){return r.push(1==e)})),r)},Qr.prototype.mapBooleansToIntegers=function(e,t){var n,r;return 2==t?(n=[],e.map((function(e){var t=[];e.map((function(e){return t.push(e?1:0)})),n.push(t)})),n):(r=[],e.map((function(e){return r.push(e?1:0)})),r)},Qr.prototype.zeros=function(e,t){for(var n=[],r=0;r<e;r++){for(var i=Array(t),o=0;o<t;o++)i[o]=0;n.push(i)}return n},Qr.prototype.shuffle=function(e,t){for(var n,r,i=e.length;i--;)n=Math.floor(Math.random()*(i+1)),r=e[i],e[i]=e[n],e[n]=r;return e.slice(0,t)},Qr.prototype.sort=function(e,t){return void 0===t&&(t=!0),Hr([],e,!0).sort((function(e,n){return t?"string"==typeof e&&"string"==typeof n?e.charCodeAt(0)-n.charCodeAt(0):e-n:"string"==typeof e&&"string"==typeof n?n.charCodeAt(0)-e.charCodeAt(0):n-e}))},Qr.prototype.isBrowserEnv=function(){return new Function("try {return this===window;}catch(e){ return false;}")()},Qr.prototype.isNodeEnv=function(){return new Function("try {return this===global;}catch(e){return false;}")()},Qr.prototype.removeMissingValuesFromArray=function(e){var t=this;return e.filter((function(e){return!t.isEmpty(e)}))},Qr.prototype.replaceNanWithNull=function(e){return e.map((function(e){return isNaN(e)?null:e}))},Qr.prototype.getDuplicate=function(e){for(var t,n={},r={},i=0;i<e.length;i++){var o=e[i];this.keyInObject(n,o)?(n[o].count+=1,n[o].index.push(i)):(n[o]={},n[o].count=1,n[o].index=[i])}for(t in n)2<=n[t].count&&(r[t]={},r[t].count=n[t].count,r[t].index=n[t].index);return r},Qr.prototype.sortArrayByIndex=function(e,t,n){return e=e.map((function(e,n){return[t[n],e]})),"string"==n?e.sort():e.sort((function(e,t){return e=e[0],t[0]-e})),e.map((function(e){return e[1]}))},Qr.prototype.createNdframeFromNewDataWithOldProps=function(e){var t=e.ndFrame,n=e.newData;return new(e.isSeries?Fs:ms)(n,{index:Hr([],t.index,!0),columns:Hr([],t.columns,!0),dtypes:Hr([],t.dtypes,!0),config:zr({},t.config)})},Qr.prototype.checkSeriesOpCompactibility=function(e){var t=e.firstSeries,n=e.secondSeries;e=e.operation;t.shape[0]!=n.shape[0]&&Lr.throwSeriesMathOpLengthError(t,n),"string"!=t.dtypes[0]&&"string"!=n.dtypes[0]||Lr.throwStringDtypeOperationError(e)},Qr.prototype.sortObj=function(e,t){return e.sort((function(e,n){return n=n.value,e=e.value,t?"string"==typeof n&&"string"==typeof e?(n=n.toUpperCase(),(e=e.toUpperCase())<n?-1:n<e?1:0):Number(e)-Number(n):"string"==typeof n&&"string"==typeof e?(n=n.toUpperCase())<(e=e.toUpperCase())?-1:e<n?1:0:Number(n)-Number(e)}))};Bt=Qr;var Vr=n(115),qr=function(){return(qr=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},Gr=new Bt;function Wr(e){var t=e.data,n=e.index,r=e.columns,i=e.dtypes,o=e.config;e=e.isSeries;if(this.$dataIncolumnFormat=[],this.$index=[],this.$columns=[],this.$dtypes=[],this.$isSeries=e,this.$config=new Pr(o?qr(qr({},jr),o):jr),void 0===(t=t instanceof Vr.Tensor?t.arraySync():t)||Array.isArray(t)&&0===t.length)void 0===i&&(i=[]),0===(r=void 0===r?[]:r).length&&0!==i.length&&Lr.throwDtypeWithoutColumnError(),this.loadArrayIntoNdframe({data:[],index:[],columns:r,dtypes:i});else if(Gr.is1DArray(t))this.loadArrayIntoNdframe({data:t,index:n,columns:r,dtypes:i});else if(Array.isArray(t)&&Gr.isObject(t[0]))this.loadObjectIntoNdframe({data:t,type:1,index:n,columns:r,dtypes:i});else if(Gr.isObject(t))this.loadObjectIntoNdframe({data:t,type:2,index:n,columns:r,dtypes:i});else{if(!(Array.isArray(t[0])||Gr.isNumber(t[0])||Gr.isString(t[0])))throw new Error("File format not supported!");this.loadArrayIntoNdframe({data:t,index:n,columns:r,dtypes:i})}}Wr.prototype.loadArrayIntoNdframe=function(e){var t=e.data,n=e.index,r=e.columns;e=e.dtypes;this.$data=t,this.$config.isLowMemoryMode||(this.$dataIncolumnFormat=Gr.transposeArray(t)),this.$setIndex(n),this.$setDtypes(e),this.$setColumnNames(r)},Wr.prototype.loadObjectIntoNdframe=function(e){var t,n,r=e.data,i=e.type,o=e.index,a=e.columns;e=e.dtypes;1===i&&Array.isArray(r)?(t=r.map((function(e){return Object.values(e)})),n=void 0,n=a||Object.keys(r[0]),this.loadArrayIntoNdframe({data:t,index:o,columns:n,dtypes:e})):(t=(i=Gr.getRowAndColValues(r))[0],r=i[1],n=void 0,this.loadArrayIntoNdframe({data:t,index:o,columns:n=a||r,dtypes:e}))},Object.defineProperty(Wr.prototype,"tensor",{get:function(){return this.$isSeries?Vr.tensor1d(this.$data,this.$dtypes[0]):Vr.tensor2d(this.$data,this.shape,"float32")},enumerable:!1,configurable:!0}),Object.defineProperty(Wr.prototype,"dtypes",{get:function(){return this.$dtypes},enumerable:!1,configurable:!0}),Wr.prototype.$setDtypes=function(e){this.$isSeries?e?(0!=this.$data.length&&1!=e.length&&Lr.throwDtypesLengthError(this,e),Nr.includes(""+e[0])||Lr.throwDtypeNotSupportedError(e[0]),this.$dtypes=e):this.$dtypes=Gr.inferDtype(this.$data):e?(0!=this.$data.length&&e.length!=this.shape[1]&&Lr.throwDtypesLengthError(this,e),0==this.$data.length&&0==e.length||e.forEach((function(e){Nr.includes(e)||Lr.throwDtypeNotSupportedError(e)})),this.$dtypes=e):this.$dtypes=Gr.inferDtype(this.$data)},Object.defineProperty(Wr.prototype,"ndim",{get:function(){return this.$isSeries?1:2},enumerable:!1,configurable:!0}),Object.defineProperty(Wr.prototype,"axis",{get:function(){return{index:this.$index,columns:this.$columns}},enumerable:!1,configurable:!0}),Object.defineProperty(Wr.prototype,"config",{get:function(){return this.$config},enumerable:!1,configurable:!0}),Wr.prototype.$setConfig=function(e){this.$config=e},Object.defineProperty(Wr.prototype,"index",{get:function(){return this.$index},enumerable:!1,configurable:!0}),Wr.prototype.$setIndex=function(e){e?(0!=this.$data.length&&e.length!=this.shape[0]&&Lr.throwIndexLengthError(this,e),Array.from(new Set(e)).length!==this.shape[0]&&Lr.throwIndexDuplicateError(),this.$index=e):this.$index=Gr.range(0,this.shape[0]-1)},Wr.prototype.$resetIndex=function(){this.$index=Gr.range(0,this.shape[0]-1)},Object.defineProperty(Wr.prototype,"columns",{get:function(){return this.$columns},enumerable:!1,configurable:!0}),Wr.prototype.$setColumnNames=function(e){this.$isSeries?e?(0!=this.$data.length&&1!=e.length&&"string"!=typeof e&&Lr.throwColumnNamesLengthError(this,e),this.$columns=e):this.$columns=["0"]:e?(0!=this.$data.length&&e.length!=this.shape[1]&&Lr.throwColumnNamesLengthError(this,e),Array.from(new Set(e)).length!==e.length&&Lr.throwColumnDuplicateError(),this.$columns=e):this.$columns=Gr.range(0,this.shape[1]-1).map((function(e){return""+e}))},Object.defineProperty(Wr.prototype,"shape",{get:function(){return 0===this.$data.length?0===this.$columns.length?[0,0]:[0,this.$columns.length]:this.$isSeries?[this.$data.length,1]:[this.$data.length,this.$data[0].length]},enumerable:!1,configurable:!0}),Object.defineProperty(Wr.prototype,"values",{get:function(){return this.$data},enumerable:!1,configurable:!0}),Wr.prototype.$setValues=function(e,t,n){var r=this;void 0===t&&(t=!0),void 0===n&&(n=!0),this.$isSeries?(t&&e.length!=this.shape[0]&&Lr.throwRowLengthError(this,e.length),this.$data=e,this.$dtypes=Gr.inferDtype(e),this.$config.isLowMemoryMode||(this.$dataIncolumnFormat=e)):(t&&e.length!=this.shape[0]&&Lr.throwRowLengthError(this,e.length),n&&e.forEach((function(t){t.length!=r.shape[1]&&Lr.throwColumnLengthError(r,e.length)})),this.$data=e,this.$dtypes=Gr.inferDtype(e),this.$config.isLowMemoryMode||(this.$dataIncolumnFormat=Gr.transposeArray(e)))},Object.defineProperty(Wr.prototype,"getColumnData",{get:function(){return this.config.isLowMemoryMode?Gr.transposeArray(this.values):this.$dataIncolumnFormat},enumerable:!1,configurable:!0}),Object.defineProperty(Wr.prototype,"size",{get:function(){return this.shape[0]*this.shape[1]},enumerable:!1,configurable:!0}),Wr.prototype.toCSV=function(e){throw new Error("`toCSV` function is deprecated. Use `toCSV` function directly instead. e.g. `dfd.toCSV(df)`")},Wr.prototype.toJSON=function(e){throw new Error("`toJSON` function is deprecated. Use `toJSON` function directly instead. e.g. `dfd.toJSON(df, { format: 'row' })`")},Wr.prototype.toExcel=function(e){throw new Error("Deprecated. Use `toExcel` function directly instead. e.g. `dfd.toExcel(df, {filePath: 'path/to/file.xlsx'})`")},Wr.prototype.print=function(){};Zn=Wr,Ae=n(99),Ae=n.n(Ae);var Kr={epsilon:1e-12,matrix:"Matrix",number:"number",precision:64,predictable:!1,randomSeed:null};function Yr(e){return"number"==typeof e}function Xr(e){return!(!e||"object"!=typeof e||"function"!=typeof e.constructor)&&(!0===e.isBigNumber&&"object"==typeof e.constructor.prototype&&!0===e.constructor.prototype.isBigNumber||"function"==typeof e.constructor.isDecimal&&!0===e.constructor.isDecimal(e))}function Jr(e){return e&&"object"==typeof e&&!0===Object.getPrototypeOf(e).isComplex||!1}function Zr(e){return e&&"object"==typeof e&&!0===Object.getPrototypeOf(e).isFraction||!1}function ei(e){return e&&!0===e.constructor.prototype.isUnit||!1}function ti(e){return"string"==typeof e}var ni=Array.isArray;function ri(e){return e&&!0===e.constructor.prototype.isMatrix||!1}function ii(e){return Array.isArray(e)||ri(e)}function oi(e){return e&&e.isDenseMatrix&&!0===e.constructor.prototype.isMatrix||!1}function ai(e){return e&&e.isSparseMatrix&&!0===e.constructor.prototype.isMatrix||!1}function si(e){return e&&!0===e.constructor.prototype.isRange||!1}function ui(e){return e&&!0===e.constructor.prototype.isIndex||!1}function ci(e){return"boolean"==typeof e}function li(e){return e&&!0===e.constructor.prototype.isResultSet||!1}function hi(e){return e&&!0===e.constructor.prototype.isHelp||!1}function fi(e){return"function"==typeof e}function di(e){return e instanceof Date}function pi(e){return e instanceof RegExp}function mi(e){return!(!e||"object"!=typeof e||e.constructor!==Object||Jr(e)||Zr(e))}function gi(e){return null===e}function Ai(e){return void 0===e}function vi(e){return e&&!0===e.isAccessorNode&&!0===e.constructor.prototype.isNode||!1}function bi(e){return e&&!0===e.isArrayNode&&!0===e.constructor.prototype.isNode||!1}function yi(e){return e&&!0===e.isAssignmentNode&&!0===e.constructor.prototype.isNode||!1}function wi(e){return e&&!0===e.isBlockNode&&!0===e.constructor.prototype.isNode||!1}function xi(e){return e&&!0===e.isConditionalNode&&!0===e.constructor.prototype.isNode||!1}function Ci(e){return e&&!0===e.isConstantNode&&!0===e.constructor.prototype.isNode||!1}function ki(e){return e&&!0===e.isFunctionAssignmentNode&&!0===e.constructor.prototype.isNode||!1}function Ei(e){return e&&!0===e.isFunctionNode&&!0===e.constructor.prototype.isNode||!1}function Si(e){return e&&!0===e.isIndexNode&&!0===e.constructor.prototype.isNode||!1}function _i(e){return e&&!0===e.isNode&&!0===e.constructor.prototype.isNode||!1}function Oi(e){return e&&!0===e.isObjectNode&&!0===e.constructor.prototype.isNode||!1}function Ti(e){return e&&!0===e.isOperatorNode&&!0===e.constructor.prototype.isNode||!1}function Di(e){return e&&!0===e.isParenthesisNode&&!0===e.constructor.prototype.isNode||!1}function Bi(e){return e&&!0===e.isRangeNode&&!0===e.constructor.prototype.isNode||!1}function Ii(e){return e&&!0===e.isRelationalNode&&!0===e.constructor.prototype.isNode||!1}function Mi(e){return e&&!0===e.isSymbolNode&&!0===e.constructor.prototype.isNode||!1}function ji(e){return e&&!0===e.constructor.prototype.isChain||!1}function Ni(e){var t=typeof e;return"object"==t?null===e?"null":Xr(e)?"BigNumber":e.constructor&&e.constructor.name?e.constructor.name:"Object":t}function Fi(e){var t=typeof e;if("number"==t||"string"==t||"boolean"==t||null==e)return e;if("function"==typeof e.clone)return e.clone();if(Array.isArray(e))return e.map(Fi);if(e instanceof Date)return new Date(e.valueOf());if(Xr(e))return e;if(e instanceof RegExp)throw new TypeError("Cannot clone "+e);return function(e,t){var n,r={};for(n in e)Li(e,n)&&(r[n]=t(e[n]));return r}(e,Fi)}function Ri(e,t){for(var n in t)Li(t,n)&&(e[n]=t[n]);return e}function Pi(e,t){var n,r,i;if(Array.isArray(e)){if(Array.isArray(t)&&e.length===t.length){for(r=0,i=e.length;r<i;r++)if(!Pi(e[r],t[r]))return;return 1}}else{if("function"==typeof e)return e===t;if(!(e instanceof Object))return e===t;if(!Array.isArray(t)&&t instanceof Object){for(n in e)if(!(n in t)||!Pi(e[n],t[n]))return;for(n in t)if(!(n in e))return;return 1}}}function Li(e,t){return e&&Object.hasOwnProperty.call(e,t)}var Ui=["Matrix","Array"],zi=["number","BigNumber","Fraction"];function Hi(e){if(e)throw new Error("The global config is readonly. \nPlease create a mathjs instance if you want to change the default configuration. \nExample:\n\n  import { create, all } from 'mathjs';\n  const mathjs = create(all);\n  mathjs.config({ number: 'BigNumber' });\n");return Object.freeze(Kr)}Ae()(Hi,Kr,{MATRIX_OPTIONS:Ui,NUMBER_OPTIONS:zi});Ae=n(125);var $i=n.n(Ae);function Qi(e){return"boolean"==typeof e||!!isFinite(e)&&e===Math.round(e)}function Vi(e,t,n){var r={2:"0b",8:"0o",16:"0x"}[t],i="";if(n){if(n<1)throw new Error("size must be in greater than 0");if(!Qi(n))throw new Error("size must be an integer");if(2**(n-1)-1<e||e<-(2**(n-1)))throw new Error("Value must be in range [-2^".concat(n-1,", 2^").concat(n-1,"-1]"));if(!Qi(e))throw new Error("Value must be an integer");e<0&&(e+=2**n),i="i".concat(n)}return n="",e<0&&(e=-e,n="-"),"".concat(n).concat(r).concat(e.toString(t)).concat(i)}function qi(e,t){if("function"==typeof t)return t(e);if(e===1/0)return"Infinity";if(e===-1/0)return"-Infinity";if(isNaN(e))return"NaN";var n,r,i="auto";if(t&&(t.notation&&(i=t.notation),Yr(t)?n=t:Yr(t.precision)&&(n=t.precision),t.wordSize&&"number"!=typeof(r=t.wordSize)))throw new Error('Option "wordSize" must be a number');switch(i){case"fixed":return function(e,t){var n,r;return isNaN(e)||!isFinite(e)?String(e):(e=Gi(e),n=(e="number"==typeof t?Ki(e,e.exponent+1+t):e).coefficients,r=e.exponent+1,n.length<(t=r+(t||0))&&(n=n.concat(Yi(t-n.length))),r<0&&(n=Yi(1-r).concat(n),r=1),r<n.length&&n.splice(r,0,0===r?"0.":"."),e.sign+n.join(""))}(e,n);case"exponential":return Wi(e,n);case"engineering":var o=e,a=n;if(isNaN(o)||!isFinite(o))return String(o);var s=(o=Ki(Gi(o),a)).exponent,u=o.coefficients,c=s%3==0?s:s<0?s-3-s%3:s-s%3;if(Yr(a))for(;a>u.length||s-c+1>u.length;)u.push(0);else for(var l=Math.abs(s-c)-(u.length-1),h=0;h<l;h++)u.push(0);for(var f=Math.abs(s-c),d=1;0<f;)d++,f--;var p=u.slice(d).join("");p=Yr(a)&&p.length||p.match(/[1-9]/)?"."+p:"",p=u.slice(0,d).join("")+p+"e"+(0<=s?"+":"")+c.toString();return o.sign+p;case"bin":return Vi(e,2,r);case"oct":return Vi(e,8,r);case"hex":return Vi(e,16,r);case"auto":return function(e,t,n){if(isNaN(e)||!isFinite(e))return String(e);var r=n&&void 0!==n.lowerExp?n.lowerExp:-3,i=(n=n&&void 0!==n.upperExp?n.upperExp:5,Gi(e));return(i=t?Ki(i,t):i).exponent<r||i.exponent>=n?Wi(e,t):(r=i.coefficients,n=i.exponent,r=(r=r.length<t?r.concat(Yi(t-r.length)):r).concat(Yi(n-r.length+1+(r.length<t?t-r.length:0))),(e=0<n?n:0)<(r=Yi(-n).concat(r)).length-1&&r.splice(e+1,0,"."),i.sign+r.join(""))}(e,n,t).replace(/((\.\d*?)(0+))($|e)/,(function(){var e=arguments[2],t=arguments[4];return"."!==e?e+t:t}));default:throw new Error('Unknown notation "'+i+'". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.')}}function Gi(e){var t,n,r,i=String(e).toLowerCase().match(/^(-?)(\d+\.?\d*)(e([+-]?\d+))?$/);if(i)return t=i[1],n=i[2],r=parseFloat(i[4]||"0"),i=n.indexOf("."),r+=-1!==i?i-1:n.length-1,0===(i=n.replace(".","").replace(/^0*/,(function(e){return r-=e.length,""})).replace(/0*$/,"").split("").map((function(e){return parseInt(e)}))).length&&(i.push(0),r++),{sign:t,coefficients:i,exponent:r};throw new SyntaxError("Invalid number "+e)}function Wi(e,t){var n,r;return isNaN(e)||!isFinite(e)?String(e):(e=Gi(e),n=(e=t?Ki(e,t):e).coefficients,r=e.exponent,t=(n=n.length<t?n.concat(Yi(t-n.length)):n).shift(),e.sign+t+(0<n.length?"."+n.join(""):"")+"e"+(0<=r?"+":"")+r)}function Ki(e,t){for(var n={sign:e.sign,coefficients:e.coefficients,exponent:e.exponent},r=n.coefficients;t<=0;)r.unshift(0),n.exponent++,t++;if(r.length>t&&5<=r.splice(t,r.length-t)[0]){var i=t-1;for(r[i]++;10===r[i];)r.pop(),0===i&&(r.unshift(0),n.exponent++,i++),r[--i]++}return n}function Yi(e){for(var t=[],n=0;n<e;n++)t.push(0);return t}Math.sign,Math.log2,Math.log10,Math.log1p,Math.cbrt,Math.expm1;var Xi=Number.EPSILON||2220446049250313e-31;function Ji(e,t,n){var r;return null==n?e===t:e===t||!isNaN(e)&&!isNaN(t)&&!(!isFinite(e)||!isFinite(t))&&((r=Math.abs(e-t))<Xi||r<=Math.max(Math.abs(e),Math.abs(t))*n)}function Zi(e,t,n){var r=new e.constructor(2),i="";if(n){if(n<1)throw new Error("size must be in greater than 0");if(!Qi(n))throw new Error("size must be an integer");if(e.greaterThan(r.pow(n-1).sub(1))||e.lessThan(r.pow(n-1).mul(-1)))throw new Error("Value must be in range [-2^".concat(n-1,", 2^").concat(n-1,"-1]"));if(!e.isInteger())throw new Error("Value must be an integer");e.lessThan(0)&&(e=e.add(r.pow(n))),i="i".concat(n)}switch(t){case 2:return"".concat(e.toBinary()).concat(i);case 8:return"".concat(e.toOctal()).concat(i);case 16:return"".concat(e.toHexadecimal()).concat(i);default:throw new Error("Base ".concat(t," not supported "))}}function eo(e,t){return void 0!==t?e.toExponential(t-1):e.toExponential()}function to(e,t){return e=function(e,t){return"number"==typeof e?qi(e,t):Xr(e)?function(e,t){if("function"==typeof t)return t(e);if(!e.isFinite())return e.isNaN()?"NaN":e.gt(0)?"Infinity":"-Infinity";var n,r,i="auto";if(void 0!==t&&(t.notation&&(i=t.notation),"number"==typeof t?n=t:t.precision&&(n=t.precision),t.wordSize&&"number"!=typeof(r=t.wordSize)))throw new Error('Option "wordSize" must be a number');switch(i){case"fixed":return o=n,e.toFixed(o);case"exponential":return eo(e,n);case"engineering":var o=n,a=(c=(u=e).e)%3==0?c:c<0?c-3-c%3:c-c%3;return(o=-1!==(o=(u=u.mul(Math.pow(10,-a))).toPrecision(o)).indexOf("e")?u.toString():o)+"e"+(0<=c?"+":"")+a.toString();case"bin":return Zi(e,2,r);case"oct":return Zi(e,8,r);case"hex":return Zi(e,16,r);case"auto":var s,u=t&&void 0!==t.lowerExp?t.lowerExp:-3,c=t&&void 0!==t.upperExp?t.upperExp:5;return e.isZero()?"0":(u<=(s=(a=e.toSignificantDigits(n)).e)&&s<c?a.toFixed():eo(e,n)).replace(/((\.\d*?)(0+))($|e)/,(function(){var e=arguments[2],t=arguments[4];return"."!==e?e+t:t}));default:throw new Error('Unknown notation "'+i+'". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.')}}(e,t):function(e){return e&&"object"==typeof e&&"number"==typeof e.s&&"number"==typeof e.n&&"number"==typeof e.d}(e)?t&&"decimal"===t.fraction?e.toString():e.s*e.n+"/"+e.d:Array.isArray(e)?function e(t,n){if(Array.isArray(t)){for(var r="[",i=t.length,o=0;o<i;o++)0!==o&&(r+=", "),r+=e(t[o],n);return r+"]"}return to(t,n)}(e,t):ti(e)?'"'+e+'"':"function"==typeof e?e.syntax?String(e.syntax):"function":e&&"object"==typeof e?"function"==typeof e.format?e.format(t):e&&e.toString(t)!=={}.toString()?e.toString(t):"{"+Object.keys(e).map(n=>'"'+n+'": '+to(e[n],t)).join(", ")+"}":String(e)}(e,t),t&&"object"==typeof t&&"truncate"in t&&e.length>t.truncate?e.substring(0,t.truncate-3)+"...":e}function no(e,t,n){if(!(this instanceof no))throw new SyntaxError("Constructor must be called with the new operator");this.actual=e,this.expected=t,this.relation=n,this.message="Dimension mismatch ("+(Array.isArray(e)?"["+e.join(", ")+"]":e)+" "+(this.relation||"!=")+" "+(Array.isArray(t)?"["+t.join(", ")+"]":t)+")",this.stack=(new Error).stack}function ro(e,t,n){if(!(this instanceof ro))throw new SyntaxError("Constructor must be called with the new operator");this.index=e,arguments.length<3?(this.min=0,this.max=t):(this.min=t,this.max=n),void 0!==this.min&&this.index<this.min?this.message="Index out of range ("+this.index+" < "+this.min+")":void 0!==this.max&&this.index>=this.max?this.message="Index out of range ("+this.index+" > "+(this.max-1)+")":this.message="Index out of range ("+this.index+")",this.stack=(new Error).stack}function io(e){for(var t=[];Array.isArray(e);)t.push(e.length),e=e[0];return t}function oo(e,t){if(0===t.length){if(Array.isArray(e))throw new no(e.length,0)}else!function e(t,n,r){var i=t.length;if(i!==n[r])throw new no(i,n[r]);if(r<n.length-1)for(var o=r+1,a=0;a<i;a++){var s=t[a];if(!Array.isArray(s))throw new no(n.length-1,n.length,"<");e(t[a],n,o)}else for(a=0;a<i;a++)if(Array.isArray(t[a]))throw new no(n.length+1,n.length,">")}(e,t,0)}function ao(e,t){if(!Yr(e)||!Qi(e))throw new TypeError("Index must be an integer (value: "+e+")");if(e<0||"number"==typeof t&&t<=e)throw new ro(e,t)}function so(e,t,n){if(!Array.isArray(e)||!Array.isArray(t))throw new TypeError("Array expected");if(0===t.length)throw new Error("Resizing to scalar is not supported");return t.forEach((function(e){if(!Yr(e)||!Qi(e)||e<0)throw new TypeError("Invalid size, must contain positive integers (size: "+to(t)+")")})),function e(t,n,r,i){var o,a,s=t.length,u=n[r],c=Math.min(s,u);if(t.length=u,r<n.length-1){var l=r+1;for(o=0;o<c;o++)a=t[o],Array.isArray(a)||(a=[a],t[o]=a),e(a,n,l,i);for(o=c;o<u;o++)a=[],t[o]=a,e(a,n,l,i)}else{for(o=0;o<c;o++)for(;Array.isArray(t[o]);)t[o]=t[o][0];for(o=c;o<u;o++)t[o]=i}}(e,t,0,void 0!==n?n:0),e}function uo(e,t){var n=co(e),r=e.slice(),i=e.indexOf(-1);if(0<=e.indexOf(-1,i+1))throw new Error("More than one wildcard in sizes");if(0<=i){if(t%n!=0)throw new Error("Could not replace wildcard, since "+t+" is no multiple of "+-n);r[i]=-t/n}return r}function co(e){return e.reduce((e,t)=>e*t,1)}function lo(e,t,n,r){var i=r||io(e);if(n)for(var o=0;o<n;o++)e=[e],i.unshift(1);for(e=function e(t,n,r){var i,o;if(Array.isArray(t)){var a=r+1;for(i=0,o=t.length;i<o;i++)t[i]=e(t[i],n,a)}else for(var s=r;s<n;s++)t=[t];return t}(e,t,0);i.length<t;)i.push(1);return e}function ho(e){var t;return Array.isArray(e)?(t=[],e.forEach((function e(n){Array.isArray(n)?n.forEach(e):t.push(n)})),t):e}function fo(e,t){for(var n,r=0,i=0;i<e.length;i++){var o=e[i],a=Array.isArray(o);if(0===i&&a&&(r=o.length),a&&o.length!==r)return;if(a=a?fo(o,t):t(o),void 0===n)n=a;else if(n!==a)return"mixed"}return n}function po(e,t,n,r){function i(r){var i=function(e,t){for(var n={},r=0;r<t.length;r++){var i=t[r],o=e[i];void 0!==o&&(n[i]=o)}return n}(r,t.map(mo)),o=e,a=t,s=r;if(a.filter(e=>!(e&&"?"===e[0])).every(e=>void 0!==s[e]))return n(i);throw a=a.filter(e=>void 0===s[e]),new Error('Cannot create function "'.concat(o,'", ')+"some dependencies are missing: ".concat(a.map(e=>'"'.concat(e,'"')).join(", "),"."))}return i.isFactory=!0,i.fn=e,i.dependencies=t.slice().sort(),r&&(i.meta=r),i}function mo(e){return e&&"?"===e[0]?e.slice(1):e}Math.acosh,Math.asinh,Math.atanh,Math.cosh,Math.sinh,Math.tanh,(no.prototype=new RangeError).constructor=RangeError,no.prototype.name="DimensionError",no.prototype.isDimensionError=!0,(ro.prototype=new RangeError).constructor=RangeError,ro.prototype.name="IndexError";Ui=po("BigNumber",["?on","config"],e=>{var{on:e,config:t}=e,n=$i.a.clone({precision:t.precision,modulo:$i.a.EUCLID});return n.prototype=Object.create(n.prototype),n.prototype.type="BigNumber",n.prototype.isBigNumber=!0,n.prototype.toJSON=function(){return{mathjs:"BigNumber",value:this.toString()}},n.fromJSON=function(e){return new n(e.value)},e&&e("config",(function(e,t){e.precision!==t.precision&&n.config({precision:e.precision})})),n},{isClass:ro.prototype.isIndexError=!0}),zi=n(56);var go=n.n(zi);Ae=po("Complex",[],()=>(Object.defineProperty(go.a,"name",{value:"Complex"}),go.a.prototype.constructor=go.a,go.a.prototype.type="Complex",go.a.prototype.isComplex=!0,go.a.prototype.toJSON=function(){return{mathjs:"Complex",re:this.re,im:this.im}},go.a.prototype.toPolar=function(){return{r:this.abs(),phi:this.arg()}},go.a.prototype.format=function(e){var t=this.im,n=this.re,r=qi(this.re,e),i=qi(this.im,e);return null!==(e=Yr(e)?e:e?e.precision:null)&&(e=Math.pow(10,-e),Math.abs(n/t)<e&&(n=0),Math.abs(t/n)<e&&(t=0)),0===t?r:0===n?1===t?"i":-1===t?"-i":i+"i":t<0?-1===t?r+" - i":r+" - "+i.substring(1)+"i":1===t?r+" + i":r+" + "+i+"i"},go.a.fromPolar=function(e){switch(arguments.length){case 1:if("object"==typeof(t=e))return go()(t);throw new TypeError("Input has to be an object with r and phi keys.");case 2:var t,n=arguments[1];if(Yr(t=e)){if(Yr(n=ei(n)&&n.hasBase("ANGLE")?n.toNumber("rad"):n))return new go.a({r:t,phi:n});throw new TypeError("Phi is not a number nor an angle unit.")}throw new TypeError("Radius r is not a number.");default:throw new SyntaxError("Wrong number of arguments in function fromPolar")}},go.a.prototype.valueOf=go.a.prototype.toString,go.a.fromJSON=function(e){return new go.a(e)},go.a.compare=function(e,t){return e.re>t.re?1:e.re<t.re?-1:e.im>t.im?1:e.im<t.im?-1:0},go.a),{isClass:!0});function Ao(e){function t(e){var t=o[e];if(t&&(delete i[t],delete o[e],--n,r===t))if(n)for(;!hasOwnProperty.call(i,++r););else a=0,r=1}var n=0,r=1,i=Object.create(null),o=Object.create(null),a=0;return e=Math.abs(e),{hit:function(s){var u=o[s],c=++a;if(i[c]=s,o[s]=c,!u)return++n<=e?void 0:(t(s=i[r]),s);if(delete i[u],r===u)for(;!hasOwnProperty.call(i,++r););},delete:t,clear:function(){n=a=0,r=1,i=Object.create(null),o=Object.create(null)}}}function vo(e,t){var{hasher:n,limit:r}=1<arguments.length&&void 0!==t?t:{},r=null==r?Number.POSITIVE_INFINITY:r,n=null==n?JSON.stringify:n;return function t(){"object"!=typeof t.cache&&(t.cache={values:new Map,lru:Ao(r||Number.POSITIVE_INFINITY)});for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];var a,s=n(i);return t.cache.values.has(s)?(t.cache.lru.hit(s),t.cache.values.get(s)):(a=e.apply(e,i),t.cache.values.set(s,a),t.cache.values.delete(t.cache.lru.hit(s)),a)}}function bo(e){return Object.keys(e.signatures||{}).reduce((function(e,t){return t=(t.match(/,/g)||[]).length+1,Math.max(e,t)}),-1)}vo((function(e){return new e(1).exp()}),{hasher:wo}),vo((function(e){return new e(1).plus(new e(5).sqrt()).div(2)}),{hasher:wo});var yo=vo((function(e){return e.acos(-1)}),{hasher:wo});function wo(e){return e[0].precision}function xo(e,t){return po(e,["config","BigNumber"],e=>{var{config:e,BigNumber:n}=e;return"BigNumber"===e.number?new n(t):t})}vo((function(e){return yo(e).times(2)}),{hasher:wo}),Math.PI,Math.PI,Math.E,xo("fineStructure",.0072973525693),xo("weakMixingAngle",.2229),xo("efimovFactor",22.7),xo("sackurTetrode",-1.16487052358);zi=n(96);var Co=n.n(zi),ko=(zi=po("Fraction",[],()=>(Object.defineProperty(Co.a,"name",{value:"Fraction"}),Co.a.prototype.constructor=Co.a,Co.a.prototype.type="Fraction",Co.a.prototype.isFraction=!0,Co.a.prototype.toJSON=function(){return{mathjs:"Fraction",n:this.s*this.n,d:this.d}},Co.a.fromJSON=function(e){return new Co.a(e)},Co.a),{isClass:!0}),po("Matrix",[],()=>{function e(){if(!(this instanceof e))throw new SyntaxError("Constructor must be called with the new operator")}return e.prototype.type="Matrix",e.prototype.isMatrix=!0,e.prototype.storage=function(){throw new Error("Cannot invoke storage on a Matrix interface")},e.prototype.datatype=function(){throw new Error("Cannot invoke datatype on a Matrix interface")},e.prototype.create=function(e,t){throw new Error("Cannot invoke create on a Matrix interface")},e.prototype.subset=function(e,t,n){throw new Error("Cannot invoke subset on a Matrix interface")},e.prototype.get=function(e){throw new Error("Cannot invoke get on a Matrix interface")},e.prototype.set=function(e,t,n){throw new Error("Cannot invoke set on a Matrix interface")},e.prototype.resize=function(e,t){throw new Error("Cannot invoke resize on a Matrix interface")},e.prototype.reshape=function(e,t){throw new Error("Cannot invoke reshape on a Matrix interface")},e.prototype.clone=function(){throw new Error("Cannot invoke clone on a Matrix interface")},e.prototype.size=function(){throw new Error("Cannot invoke size on a Matrix interface")},e.prototype.map=function(e,t){throw new Error("Cannot invoke map on a Matrix interface")},e.prototype.forEach=function(e){throw new Error("Cannot invoke forEach on a Matrix interface")},e.prototype[Symbol.iterator]=function(){throw new Error("Cannot iterate a Matrix interface")},e.prototype.toArray=function(){throw new Error("Cannot invoke toArray on a Matrix interface")},e.prototype.valueOf=function(){throw new Error("Cannot invoke valueOf on a Matrix interface")},e.prototype.format=function(e){throw new Error("Cannot invoke format on a Matrix interface")},e.prototype.toString=function(){throw new Error("Cannot invoke toString on a Matrix interface")},e},{isClass:!0})),Eo=po("DenseMatrix",["Matrix"],e=>{function t(e,n){if(!(this instanceof t))throw new SyntaxError("Constructor must be called with the new operator");if(n&&!ti(n))throw new Error("Invalid datatype: "+n);if(ri(e))"DenseMatrix"===e.type?(this._data=Fi(e._data),this._size=Fi(e._size)):(this._data=e.toArray(),this._size=e.size()),this._datatype=n||e._datatype;else if(e&&ni(e.data)&&ni(e.size))this._data=e.data,this._size=e.size,oo(this._data,this._size),this._datatype=n||e.datatype;else{if(ni(e))this._data=function e(t){for(var n=0,r=t.length;n<r;n++){var i=t[n];ni(i)?t[n]=e(i):i&&!0===i.isMatrix&&(t[n]=e(i.valueOf()))}return t}(e),this._size=io(this._data),oo(this._data,this._size);else{if(e)throw new TypeError("Unsupported type of data ("+Ni(e)+")");this._data=[],this._size=[0]}this._datatype=n}}function n(e,t,n){if(0!==t.length)return e._size=t.slice(0),e._data=so(e._data,e._size,n),e;for(var r=e._data;ni(r);)r=r[0];return r}function r(e,t,r){for(var i=e._size.slice(0),o=!1;i.length<t.length;)i.push(0),o=!0;for(var a=0,s=t.length;a<s;a++)t[a]>i[a]&&(i[a]=t[a],o=!0);o&&n(e,i,r)}return e=e.Matrix,(t.prototype=new e).createDenseMatrix=function(e,n){return new t(e,n)},Object.defineProperty(t,"name",{value:"DenseMatrix"}),(t.prototype.constructor=t).prototype.type="DenseMatrix",t.prototype.isDenseMatrix=!0,t.prototype.getDataType=function(){return fo(this._data,Ni)},t.prototype.storage=function(){return"dense"},t.prototype.datatype=function(){return this._datatype},t.prototype.create=function(e,n){return new t(e,n)},t.prototype.subset=function(e,n,i){switch(arguments.length){case 1:var o=this;if(!ui(h=e))throw new TypeError("Invalid index");if(h.isScalar())return o.get(h.min());if((l=h.size()).length!==o._size.length)throw new no(l.length,o._size.length);for(var a=h.min(),s=h.max(),u=0,c=o._size.length;u<c;u++)ao(a[u],o._size[u]),ao(s[u],o._size[u]);return new t(function e(t,n,r,i){var o=i===r-1,a=n.dimension(i);return(o?a.map((function(e){return ao(e,t.length),t[e]})):a.map((function(o){return ao(o,t.length),o=t[o],e(o,n,r,i+1)}))).valueOf()}(o._data,h,l.length,0),o._datatype);case 2:case 3:var l,h=this,f=n,d=i;if(!(l=e)||!0!==l.isIndex)throw new TypeError("Invalid index");var p,m=l.size(),g=l.isScalar();if(ri(f)?(p=f.size(),f=f.valueOf()):p=io(f),g){if(0!==p.length)throw new TypeError("Scalar expected");h.set(l.min(),f,d)}else{if(m.length<h._size.length)throw new no(m.length,h._size.length,"<");if(p.length<m.length){for(var A=0,v=0;1===m[A]&&1===p[A];)A++;for(;1===m[A];)v++,A++;f=lo(f,m.length,v,p)}if(!Pi(m,p))throw new no(m,p,">");r(h,g=l.max().map((function(e){return e+1})),d),g=m.length,function e(t,n,r,i,o){var a=o===i-1,s=n.dimension(o);a?s.forEach((function(e,n){ao(e),t[e]=r[n[0]]})):s.forEach((function(a,s){ao(a),e(t[a],n,r[s[0]],i,o+1)}))}(h._data,l,f,g,0)}return h;default:throw new SyntaxError("Wrong number of arguments")}},t.prototype.get=function(e){if(!ni(e))throw new TypeError("Array expected");if(e.length!==this._size.length)throw new no(e.length,this._size.length);for(var t=0;t<e.length;t++)ao(e[t],this._size[t]);for(var n=this._data,r=0,i=e.length;r<i;r++){var o=e[r];ao(o,n.length),n=n[o]}return n},t.prototype.set=function(e,t,n){if(!ni(e))throw new TypeError("Array expected");if(e.length<this._size.length)throw new no(e.length,this._size.length,"<");r(this,e.map((function(e){return e+1})),n);for(var i,o=this._data,a=0,s=e.length-1;a<s;a++)ao(i=e[a],o.length),o=o[i];return ao(i=e[e.length-1],o.length),o[i]=t,this},t.prototype.resize=function(e,t,r){if(ii(e))return e=e.valueOf().map(e=>Array.isArray(e)&&1===e.length?e[0]:e),n(r?this.clone():this,e,t);throw new TypeError("Array or Matrix expected")},t.prototype.reshape=function(e,t){var n=((t=t?this.clone():this)._data=function(e,t){var n=ho(e),r=n.length;if(!Array.isArray(e)||!Array.isArray(t))throw new TypeError("Array expected");if(0===t.length)throw new no(0,r,"!=");if(r!==(e=co(t=uo(t,r))))throw new no(e,r,"!=");try{for(var i,o=t,a=n,s=o.length-1;0<s;s--){for(var u=o[s],c=(i=[],a.length/u),l=0;l<c;l++)i.push(a.slice(l*u,(l+1)*u));a=i}return a}catch(t){if(t instanceof no)throw new no(e,r,"!=");throw t}}(t._data,e),t._size.reduce((e,t)=>e*t));return t._size=uo(e,n),t},t.prototype.clone=function(){return new t({data:Fi(this._data),size:Fi(this._size),datatype:this._datatype})},t.prototype.size=function(){return this._size.slice(0)},t.prototype.map=function(e){var n=this,r=bo(e),i=function t(i,o){return ni(i)?i.map((function(e,n){return t(e,o.concat(n))})):1===r?e(i):2===r?e(i,o):e(i,o,n)}(this._data,[]);return new t(i,void 0!==this._datatype?fo(i,Ni):void 0)},t.prototype.forEach=function(e){var t=this;!function n(r,i){ni(r)?r.forEach((function(e,t){n(e,i.concat(t))})):e(r,i,t)}(this._data,[])},t.prototype[Symbol.iterator]=function*(){yield*function*e(t,n){if(ni(t))for(var r=0;r<t.length;r++)yield*e(t[r],n.concat(r));else yield{value:t,index:n}}(this._data,[])},t.prototype.rows=function(){var e,n=[];if(2!==this.size().length)throw new TypeError("Rows can only be returned for a 2D matrix.");for(e of this._data)n.push(new t([e],this._datatype));return n},t.prototype.columns=function(){var e=this,n=[],r=this.size();if(2!==r.length)throw new TypeError("Rows can only be returned for a 2D matrix.");for(var i=this._data,o=0;o<r[1];o++)!function(r){var o=i.map(e=>[e[r]]);n.push(new t(o,e._datatype))}(o);return n},t.prototype.toArray=function(){return Fi(this._data)},t.prototype.valueOf=function(){return this._data},t.prototype.format=function(e){return to(this._data,e)},t.prototype.toString=function(){return to(this._data)},t.prototype.toJSON=function(){return{mathjs:"DenseMatrix",data:this._data,size:this._size,datatype:this._datatype}},t.prototype.diagonal=function(e){if(e){if(!Yr(e=Xr(e)?e.toNumber():e)||!Qi(e))throw new TypeError("The parameter k must be an integer number")}else e=0;for(var n=0<e?e:0,r=e<0?-e:0,i=(e=this._size[0],this._size[1]),o=Math.min(e-r,i-n),a=[],s=0;s<o;s++)a[s]=this._data[s+r][s+n];return new t({data:a,size:[o],datatype:this._datatype})},t.diagonal=function(e,n,r,i){if(!ni(e))throw new TypeError("Array expected, size parameter");if(2!==e.length)throw new Error("Only two dimensions matrix are supported");if(e=e.map((function(e){if(!Yr(e=Xr(e)?e.toNumber():e)||!Qi(e)||e<1)throw new Error("Size values must be positive integers");return e})),r){if(!Yr(r=Xr(r)?r.toNumber():r)||!Qi(r))throw new TypeError("The parameter k must be an integer number")}else r=0;var o,a=0<r?r:0,s=r<0?-r:0,u=(r=e[0],e[1]),c=Math.min(r-s,u-a);if(ni(n)){if(n.length!==c)throw new Error("Invalid value array length");o=function(e){return n[e]}}else if(ri(n)){var l=n.size();if(1!==l.length||l[0]!==c)throw new Error("Invalid matrix length");o=function(e){return n.get([e])}}else o=function(){return n};i=i||(Xr(o(0))?o(0).mul(0):0);var h=[];if(0<e.length){h=so(h,e,i);for(var f=0;f<c;f++)h[f+s][f+a]=o(f)}return new t({data:h,size:[r,u]})},t.fromJSON=function(e){return new t(e)},t.prototype.swapRows=function(e,n){if(!(Yr(e)&&Qi(e)&&Yr(n)&&Qi(n)))throw new Error("Row index must be positive integers");if(2!==this._size.length)throw new Error("Only two dimensional matrix is supported");return ao(e,this._size[0]),ao(n,this._size[0]),t._swapRows(e,n,this._data),this},t._swapRows=function(e,t,n){var r=n[e];n[e]=n[t],n[t]=r},t},{isClass:!0}),So=n(226),_o=n.n(So);function Oo(e){return!!e&&(e instanceof Map||"function"==typeof e.set&&"function"==typeof e.get&&"function"==typeof e.keys&&"function"==typeof e.has)}var To=function(){return To=_o.a.create,_o.a};So=po("typed",["?BigNumber","?Complex","?DenseMatrix","?Fraction"],(function(e){var{BigNumber:t,Complex:n,DenseMatrix:r,Fraction:i}=e,o=To();return o.clear(),o.addTypes([{name:"number",test:Yr},{name:"Complex",test:Jr},{name:"BigNumber",test:Xr},{name:"Fraction",test:Zr},{name:"Unit",test:ei},{name:"identifier",test:e=>/^(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])(?:[0-9A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])*$/.test(e)},{name:"string",test:ti},{name:"Chain",test:ji},{name:"Array",test:ni},{name:"Matrix",test:ri},{name:"DenseMatrix",test:oi},{name:"SparseMatrix",test:ai},{name:"Range",test:si},{name:"Index",test:ui},{name:"boolean",test:ci},{name:"ResultSet",test:li},{name:"Help",test:hi},{name:"function",test:fi},{name:"Date",test:di},{name:"RegExp",test:pi},{name:"null",test:gi},{name:"undefined",test:Ai},{name:"AccessorNode",test:vi},{name:"ArrayNode",test:bi},{name:"AssignmentNode",test:yi},{name:"BlockNode",test:wi},{name:"ConditionalNode",test:xi},{name:"ConstantNode",test:Ci},{name:"FunctionNode",test:Ei},{name:"FunctionAssignmentNode",test:ki},{name:"IndexNode",test:Si},{name:"Node",test:_i},{name:"ObjectNode",test:Oi},{name:"OperatorNode",test:Ti},{name:"ParenthesisNode",test:Di},{name:"RangeNode",test:Bi},{name:"RelationalNode",test:Ii},{name:"SymbolNode",test:Mi},{name:"Map",test:Oo},{name:"Object",test:mi}]),o.addConversions([{from:"number",to:"BigNumber",convert:function(e){if(t||Do(e),15<e.toExponential().replace(/e.*$/,"").replace(/^0\.?0*|\./,"").length)throw new TypeError("Cannot implicitly convert a number with >15 significant digits to BigNumber (value: "+e+"). Use function bignumber(x) to convert to BigNumber.");return new t(e)}},{from:"number",to:"Complex",convert:function(e){return n||Bo(e),new n(e,0)}},{from:"BigNumber",to:"Complex",convert:function(e){return n||Bo(e),new n(e.toNumber(),0)}},{from:"Fraction",to:"BigNumber",convert:function(e){throw new TypeError("Cannot implicitly convert a Fraction to BigNumber or vice versa. Use function bignumber(x) to convert to BigNumber or fraction(x) to convert to Fraction.")}},{from:"Fraction",to:"Complex",convert:function(e){return n||Bo(e),new n(e.valueOf(),0)}},{from:"number",to:"Fraction",convert:function(e){i||Io(e);var t=new i(e);if(t.valueOf()!==e)throw new TypeError("Cannot implicitly convert a number to a Fraction when there will be a loss of precision (value: "+e+"). Use function fraction(x) to convert to Fraction.");return t}},{from:"string",to:"number",convert:function(e){var t=Number(e);if(isNaN(t))throw new Error('Cannot convert "'+e+'" to a number');return t}},{from:"string",to:"BigNumber",convert:function(e){t||Do(e);try{return new t(e)}catch(t){throw new Error('Cannot convert "'+e+'" to BigNumber')}}},{from:"string",to:"Fraction",convert:function(e){i||Io(e);try{return new i(e)}catch(t){throw new Error('Cannot convert "'+e+'" to Fraction')}}},{from:"string",to:"Complex",convert:function(e){n||Bo(e);try{return new n(e)}catch(t){throw new Error('Cannot convert "'+e+'" to Complex')}}},{from:"boolean",to:"number",convert:function(e){return+e}},{from:"boolean",to:"BigNumber",convert:function(e){return t||Do(e),new t(+e)}},{from:"boolean",to:"Fraction",convert:function(e){return i||Io(e),new i(+e)}},{from:"boolean",to:"string",convert:function(e){return String(e)}},{from:"Array",to:"Matrix",convert:function(e){if(r)return new r(e);throw new Error("Cannot convert array into a Matrix: no class 'DenseMatrix' provided")}},{from:"Matrix",to:"Array",convert:function(e){return e.valueOf()}}]),o.onMismatch=(e,t,n)=>{var r=o.createError(e,t,n);if(["wrongType","mismatch"].includes(r.data.category)&&1===t.length&&ii(t[0])&&n.some(e=>!e.params.includes(",")))throw(t=new TypeError("Function '".concat(e,"' doesn't apply to matrices. To call it ")+"elementwise on a matrix 'M', try 'map(M, ".concat(e,")'."))).data=r.data,t;throw r},o.onMismatch=(e,t,n)=>{var r=o.createError(e,t,n);if(["wrongType","mismatch"].includes(r.data.category)&&1===t.length&&ii(t[0])&&n.some(e=>!e.params.includes(",")))throw(t=new TypeError("Function '".concat(e,"' doesn't apply to matrices. To call it ")+"elementwise on a matrix 'M', try 'map(M, ".concat(e,")'."))).data=r.data,t;throw r},o}));function Do(e){throw new Error("Cannot convert value ".concat(e," into a BigNumber: no class 'BigNumber' provided"))}function Bo(e){throw new Error("Cannot convert value ".concat(e," into a Complex number: no class 'Complex' provided"))}function Io(e){throw new Error("Cannot convert value ".concat(e," into a Fraction, no class 'Fraction' provided."))}function Mo(e){for(var t=0;t<e.length;t++)if(ii(e[t]))return 1}function jo(e,t){for(var n=0,r=(e=ri(e)?e.valueOf():e).length;n<r;n++){var i=e[n];Array.isArray(i)?jo(i,t):t(i)}}function No(e,t,n){return e&&"function"==typeof e.map?e.map((function(e){return No(e,t,n)})):t(e)}function Fo(e,t,n){var r,i,o,a;if(t<=0){if(Array.isArray(e[0])){for(a=function(e){for(var t=e.length,n=e[0].length,r=[],i=0;i<n;i++){for(var o=[],a=0;a<t;a++)o.push(e[a][i]);r.push(o)}return r}(e),i=[],r=0;r<a.length;r++)i[r]=Fo(a[r],t-1,n);return i}for(o=e[0],r=1;r<e.length;r++)o=n(o,e[r]);return o}for(i=[],r=0;r<e.length;r++)i[r]=Fo(e[r],t-1,n);return i}var Ro="number",Po="number, number";function Lo(e){return Math.abs(e)}function Uo(e,t){return e+t}function zo(e,t){return e*t}function Ho(e){return-e}Lo.signature=Ro,zo.signature=Uo.signature=Po,Ho.signature=Ro,Po=po("abs",["typed"],e=>(e=e.typed)("abs",{number:Lo,"Complex | BigNumber | Fraction | Unit":e=>e.abs(),"Array | Matrix":e.referToSelf(e=>t=>No(t,e,!0))}));Ro=po("addScalar",["typed"],e=>{var t=e.typed;return t("addScalar",{"number, number":Uo,"Complex, Complex":function(e,t){return e.add(t)},"BigNumber, BigNumber":function(e,t){return e.plus(t)},"Fraction, Fraction":function(e,t){return e.add(t)},"Unit, Unit":t.referToSelf(e=>(n,r)=>{if(null===n.value||void 0===n.value)throw new Error("Parameter x contains a unit with undefined value");if(null===r.value||void 0===r.value)throw new Error("Parameter y contains a unit with undefined value");if(n.equalBase(r))return(n=n.clone()).value=t.find(e,[n.valueType(),r.valueType()])(n.value,r.value),n.fixPrefix=!1,n;throw new Error("Units do not match")})})});var $o=po("bignumber",["typed","BigNumber"],e=>{var{typed:e,BigNumber:t}=e;return e("bignumber",{"":function(){return new t(0)},number:function(e){return new t(e+"")},string:function(e){if(r=e.match(/(0[box][0-9a-fA-F]*)i([0-9]*)/)){var n=r[2],r=t(r[1]),i=new t(2).pow(Number(n));if(r.gt(i.sub(1)))throw new SyntaxError('String "'.concat(e,'" is out of range'));return n=new t(2).pow(Number(n)-1),r.gte(n)?r.sub(i):r}return new t(e)},BigNumber:function(e){return e},Fraction:function(e){return new t(e.n).div(e.d).times(e.s)},null:function(e){return new t(0)},"Array | Matrix":e.referToSelf(e=>t=>No(t,e))})}),Qo=po("conj",["typed"],e=>(e=e.typed)("conj",{"number | BigNumber | Fraction":e=>e,Complex:e=>e.conjugate(),"Array | Matrix":e.referToSelf(e=>t=>No(t,e))}));function Vo(e,t,n){var r;return null==n?e.eq(t):!!e.eq(t)||!e.isNaN()&&!t.isNaN()&&!(!e.isFinite()||!t.isFinite())&&(!!(r=e.minus(t).abs()).isZero()||(e=e.constructor.max(e.abs(),t.abs()),r.lte(e.times(n))))}var qo=po("compareUnits",["typed"],e=>{var t=e.typed;return{"Unit, Unit":t.referToSelf(e=>(n,r)=>{if(n.equalBase(r))return t.find(e,[n.valueType(),r.valueType()])(n.value,r.value);throw new Error("Cannot compare units with different base")})}}),Go="equalScalar",Wo=po(Go,["typed","config"],e=>{var{typed:e,config:t}=e,n=qo({typed:e});return e(Go,{"boolean, boolean":function(e,t){return e===t},"number, number":function(e,n){return Ji(e,n,t.epsilon)},"BigNumber, BigNumber":function(e,n){return e.eq(n)||Vo(e,n,t.epsilon)},"Fraction, Fraction":function(e,t){return e.equals(t)},"Complex, Complex":function(e,n){return e=e,n=n,r=t.epsilon,Ji(e.re,n.re,r)&&Ji(e.im,n.im,r);var r}},n)});po(Go,["typed","config"],e=>{var{typed:e,config:t}=e;return e(Go,{"number, number":function(e,n){return Ji(e,n,t.epsilon)}})}),Math.pow(2,53),po("hex",["typed","format"],e=>{var{typed:e,format:t}=e;return e("hex",{"number | BigNumber":function(e){return t(e,{notation:"hex"})},"number | BigNumber, number":function(e,n){return t(e,{notation:"hex",wordSize:n})}})});var Ko=po("isInteger",["typed"],e=>(e=e.typed)("isInteger",{number:Qi,BigNumber:function(e){return e.isInt()},Fraction:function(e){return 1===e.d&&isFinite(e.n)},"Array | Matrix":e.referToSelf(e=>t=>No(t,e))})),Yo="number";function Xo(e){return 0===e}function Jo(e){return Number.isNaN(e)}Jo.signature=Xo.signature=Qi.signature=Yo,Yo=po("isZero",["typed"],e=>{var t=e.typed;return t("isZero",{number:Xo,BigNumber:function(e){return e.isZero()},Complex:function(e){return 0===e.re&&0===e.im},Fraction:function(e){return 1===e.d&&0===e.n},Unit:t.referToSelf(e=>n=>t.find(e,n.valueType())(n.value)),"Array | Matrix":t.referToSelf(e=>t=>No(t,e))})});var Zo=po("map",["typed"],e=>(e=e.typed)("map",{"Array, function":ea,"Matrix, function":function(e,t){return e.map(t)}}));function ea(e,t){var n=bo(t);return function r(i,o){if(Array.isArray(i))return i.map((function(e,t){return r(e,o.concat(t))}));try{return 1===n?t(i):2===n?t(i,o):t(i,o,e)}catch(t){var a;if(t instanceof TypeError&&"data"in t&&"wrongType"===t.data.category)throw i="map attempted to call '".concat(t.data.fn,"(").concat(i),a=JSON.stringify(o),2===n?i+=","+a:1!==n&&(i+=",".concat(a,",").concat(e)),i=(i=(i+=")' but argument ".concat(t.data.index+1," of type "))+"".concat(t.data.actual," does not match expected type "))+t.data.expected.join(" or "),new TypeError(i);throw t}}(e,[])}var ta=po("multiplyScalar",["typed"],e=>(e=e.typed)("multiplyScalar",{"number, number":zo,"Complex, Complex":function(e,t){return e.mul(t)},"BigNumber, BigNumber":function(e,t){return e.times(t)},"Fraction, Fraction":function(e,t){return e.mul(t)},"number | Fraction | BigNumber | Complex, Unit":(e,t)=>t.multiply(e),"Unit, number | Fraction | BigNumber | Complex | Unit":(e,t)=>e.multiply(t)})),na=po("number",["typed"],e=>((e=(e=e.typed)("number",{"":function(){return 0},number:function(e){return e},string:function(e){if("NaN"===e)return NaN;if(o=(n=(o=e).match(/(0[box])([0-9a-fA-F]*)\.([0-9a-fA-F]*)/))?{input:o,radix:{"0b":2,"0o":8,"0x":16}[n[1]],integerPart:n[2],fractionalPart:n[3]}:null){for(var t=o,n=parseInt(t.integerPart,t.radix),r=0,i=0;i<t.fractionalPart.length;i++)r+=parseInt(t.fractionalPart[i],t.radix)/Math.pow(t.radix,i+1);if(n+=r,isNaN(n))throw new SyntaxError('String "'+t.input+'" is no valid number');return n}var o=0,a=((n=e.match(/(0[box][0-9a-fA-F]*)i([0-9]*)/))&&(o=Number(n[2]),e=n[1]),Number(e));if(isNaN(a))throw new SyntaxError('String "'+e+'" is no valid number');if(n){if(2**o-1<a)throw new SyntaxError('String "'.concat(e,'" is out of range'));2**(o-1)<=a&&(a-=2**o)}return a},BigNumber:function(e){return e.toNumber()},Fraction:function(e){return e.valueOf()},Unit:function(e){throw new Error("Second argument with valueless unit expected")},null:function(e){return 0},"Unit, string | Unit":function(e,t){return e.toNumber(t)},"Array | Matrix":e.referToSelf(e=>t=>No(t,e))})).fromJSON=function(e){return parseFloat(e.value)},e)),ra=(po("oct",["typed","format"],e=>{var{typed:e,format:t}=e;return e("oct",{"number | BigNumber":function(e){return t(e,{notation:"oct"})},"number | BigNumber, number":function(e,n){return t(e,{notation:"oct",wordSize:n})}})}),n(73));Date.now();ra=po("SparseMatrix",["typed","equalScalar","Matrix"],e=>{var{typed:t,equalScalar:n,Matrix:e}=e;function r(e,t){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");if(t&&!ti(t))throw new Error("Invalid datatype: "+t);if(ri(e))n=this,a=t,"SparseMatrix"===(o=e).type?(n._values=o._values?Fi(o._values):void 0,n._index=Fi(o._index),n._ptr=Fi(o._ptr),n._size=Fi(o._size),n._datatype=a||o._datatype):i(n,o.valueOf(),a||o._datatype);else if(e&&ni(e.index)&&ni(e.ptr)&&ni(e.size))this._values=e.values,this._index=e.index,this._ptr=e.ptr,this._size=e.size,this._datatype=t||e.datatype;else if(ni(e))i(this,e,t);else{if(e)throw new TypeError("Unsupported type of data ("+Ni(e)+")");this._values=[],this._index=[],this._ptr=[0],this._size=[0,0],this._datatype=t}var n,o,a}function i(e,r,i){e._values=[],e._index=[],e._ptr=[],e._datatype=i;var o=r.length,a=0,s=n,u=0;if(ti(i)&&(s=t.find(n,[i,i])||n,u=t.convert(0,i)),0<o){var c=0;do{e._ptr.push(e._index.length);for(var l=0;l<o;l++){var h,f=r[l];ni(f)?(0===c&&a<f.length&&(a=f.length),c<f.length&&(s(h=f[c],u)||(e._values.push(h),e._index.push(l)))):(0===c&&a<1&&(a=1),s(f,u)||(e._values.push(f),e._index.push(l)))}}while(++c<a)}e._ptr.push(e._index.length),e._size=[o,a]}function o(e,t,n,r){if(n-t==0)return n;for(var i=t;i<n;i++)if(r[i]===e)return i;return t}function a(e,t,n,r,i,o,a){i.splice(e,0,r),o.splice(e,0,t);for(var s=n+1;s<a.length;s++)a[s]++}function s(e,r,i,o){var a=o||0,s=(o=n,0),u=(ti(e._datatype)&&(o=t.find(n,[e._datatype,e._datatype])||n,s=t.convert(0,e._datatype),a=t.convert(a,e._datatype)),!o(a,s)),c=e._size[0],l=e._size[1];if(l<i){for(f=l;f<i;f++)if(e._ptr[f]=e._values.length,u)for(m=0;m<c;m++)e._values.push(a),e._index.push(m);e._ptr[i]=e._values.length}else i<l&&(e._ptr.splice(i+1,l-i),e._values.splice(e._ptr[i],e._values.length),e._index.splice(e._ptr[i],e._index.length));if(l=i,c<r){if(u){for(var h=0,f=0;f<l;f++){e._ptr[f]=e._ptr[f]+h;for(var d=e._ptr[f+1]+h,p=0,m=c;m<r;m++,p++)e._values.splice(d+p,0,a),e._index.splice(d+p,0,m),h++}e._ptr[l]=e._values.length}}else if(r<c){var g=0;for(f=0;f<l;f++){e._ptr[f]=e._ptr[f]-g;var A=e._ptr[f],v=e._ptr[f+1]-g;for(d=A;d<v;d++)r-1<(m=e._index[d])&&(e._values.splice(d,1),e._index.splice(d,1),g++)}e._ptr[f]=e._values.length}return e._size[0]=r,e._size[1]=i,e}function u(e,t,n,r,i){for(var o,a=r[0],s=r[1],u=[],c=0;c<a;c++)for(u[c]=[],o=0;o<s;o++)u[c][o]=0;for(o=0;o<s;o++)for(var l=n[o],h=n[o+1],f=l;f<h;f++)u[c=t[f]][o]=e?i?Fi(e[f]):e[f]:1;return u}return(r.prototype=new e).createSparseMatrix=function(e,t){return new r(e,t)},Object.defineProperty(r,"name",{value:"SparseMatrix"}),(r.prototype.constructor=r).prototype.type="SparseMatrix",r.prototype.isSparseMatrix=!0,r.prototype.getDataType=function(){return fo(this._values,Ni)},r.prototype.storage=function(){return"sparse"},r.prototype.datatype=function(){return this._datatype},r.prototype.create=function(e,t){return new r(e,t)},r.prototype.density=function(){var e=this._size[0],t=this._size[1];return 0!==e&&0!==t?this._index.length/(e*t):0},r.prototype.subset=function(e,t,n){if(!this._values)throw new Error("Cannot invoke subset on a Pattern only matrix");switch(arguments.length){case 1:var i=this;if(!ui(g=e))throw new TypeError("Invalid index");if(g.isScalar())return i.get(g.min());var o,a,s,u,c=g.size();if(c.length!==i._size.length)throw new no(c.length,i._size.length);var l=g.min(),h=g.max();for(o=0,a=i._size.length;o<a;o++)ao(l[o],i._size[o]),ao(h[o],i._size[o]);var f=i._values,d=i._index,p=i._ptr,m=g.dimension(0),g=g.dimension(1),A=[],v=[],b=(m.forEach((function(e,t){v[e]=t[0],A[e]=!0})),f?[]:void 0),y=[],w=[];return g.forEach((function(e){for(w.push(y.length),s=p[e],u=p[e+1];s<u;s++)o=d[s],!0===A[o]&&(y.push(v[o]),b&&b.push(f[s]))})),w.push(y.length),new r({values:b,index:y,ptr:w,size:c,datatype:i._datatype});case 2:case 3:var x=this,C=t,k=n;if(!(m=e)||!0!==m.isIndex)throw new TypeError("Invalid index");var E,S,_=m.size();g=m.isScalar();if(ri(C)?(E=C.size(),C=C.toArray()):E=io(C),g){if(0!==E.length)throw new TypeError("Scalar expected");x.set(m.min(),C,k)}else{if(1!==_.length&&2!==_.length)throw new no(_.length,x._size.length,"<");if(E.length<_.length){for(var O=0,T=0;1===_[O]&&1===E[O];)O++;for(;1===_[O];)T++,O++;C=lo(C,_.length,T,E)}if(!Pi(_,E))throw new no(_,E,">");1===_.length?m.dimension(0).forEach((function(e,t){ao(e),x.set([e,0],C[t[0]],k)})):(g=m.dimension(0),S=m.dimension(1),g.forEach((function(e,t){ao(e),S.forEach((function(n,r){ao(n),x.set([e,n],C[t[0]][r[0]],k)}))})))}return x;default:throw new SyntaxError("Wrong number of arguments")}},r.prototype.get=function(e){if(!ni(e))throw new TypeError("Array expected");if(e.length!==this._size.length)throw new no(e.length,this._size.length);var t,n;if(this._values)return t=e[0],e=e[1],ao(t,this._size[0]),ao(e,this._size[1]),(n=o(t,this._ptr[e],this._ptr[e+1],this._index))<this._ptr[e+1]&&this._index[n]===t?this._values[n]:0;throw new Error("Cannot invoke get on a Pattern only matrix")},r.prototype.set=function(e,r,i){if(!ni(e))throw new TypeError("Array expected");if(e.length!==this._size.length)throw new no(e.length,this._size.length);if(!this._values)throw new Error("Cannot invoke set on a Pattern only matrix");var u=e[0],c=(e=e[1],this._size[0]),l=this._size[1],h=n,f=0;if((i=(ti(this._datatype)&&(h=t.find(n,[this._datatype,this._datatype])||n,f=t.convert(0,this._datatype)),(c-1<u||l-1<e)&&(s(this,Math.max(u+1,c),Math.max(e+1,l),i),c=this._size[0],l=this._size[1]),ao(u,c),ao(e,l),o(u,this._ptr[e],this._ptr[e+1],this._index)))<this._ptr[e+1]&&this._index[i]===u)if(h(r,f)){c=i,l=e;var d=this._values,p=this._index,m=this._ptr;d.splice(c,1),p.splice(c,1);for(var g=l+1;g<m.length;g++)m[g]--}else this._values[i]=r;else h(r,f)||a(i,u,e,r,this._values,this._index,this._ptr);return this},r.prototype.resize=function(e,t,n){if(!ii(e))throw new TypeError("Array or Matrix expected");var r=e.valueOf().map(e=>Array.isArray(e)&&1===e.length?e[0]:e);if(2!==r.length)throw new Error("Only two dimensions matrix are supported");return r.forEach((function(e){if(!Yr(e)||!Qi(e)||e<0)throw new TypeError("Invalid size, must contain positive integers (size: "+to(r)+")")})),s(n?this.clone():this,r[0],r[1],t)},r.prototype.reshape=function(e,t){if(!ni(e))throw new TypeError("Array expected");if(2!==e.length)throw new Error("Sparse matrices can only be reshaped in two dimensions");e.forEach((function(t){if(!Yr(t)||!Qi(t)||t<=-2||0===t)throw new TypeError("Invalid size, must contain positive integers or -1 (size: "+to(e)+")")}));var n=this._size[0]*this._size[1];if(n!=(e=uo(e,n))[0]*e[1])throw new Error("Reshaping sparse matrix will result in the wrong number of elements");var r=t?this.clone():this;if(this._size[0]!==e[0]||this._size[1]!==e[1]){for(var i=[],s=0;s<r._ptr.length;s++)for(var u=0;u<r._ptr[s+1]-r._ptr[s];u++)i.push(s);for(var c=r._values.slice(),l=r._index.slice(),h=0;h<r._index.length;h++){var f=l[h],d=i[h];f=f*r._size[1]+d;i[h]=f%e[1],l[h]=Math.floor(f/e[1])}r._values.length=0,r._index.length=0,r._ptr.length=e[1]+1,r._size=e.slice();for(var p=0;p<r._ptr.length;p++)r._ptr[p]=0;for(var m=0;m<c.length;m++){var g=l[m],A=i[m],v=c[m];a(o(g,r._ptr[A],r._ptr[A+1],r._index),g,A,v,r._values,r._index,r._ptr)}}return r},r.prototype.clone=function(){return new r({values:this._values?Fi(this._values):void 0,index:Fi(this._index),ptr:Fi(this._ptr),size:Fi(this._size),datatype:this._datatype})},r.prototype.size=function(){return this._size.slice(0)},r.prototype.map=function(e,i){if(this._values){var o=this,a=this._size[0],s=this._size[1],u=bo(e),c=this,l=a-1,h=s-1,f=i,d=[],p=[],m=[],g=n,A=0;ti(c._datatype)&&(g=t.find(n,[c._datatype,c._datatype])||n,A=t.convert(0,c._datatype));for(var v=function(t,n,r){t=function(t,n,r){return 1===u?e(t):2===u?e(t,[n,r]):e(t,[n,r],o)}(t,n,r),g(t,A)||(d.push(t),p.push(n))},b=0;b<=h;b++){m.push(d.length);var y=c._ptr[b],w=c._ptr[b+1];if(f)for(var x=y;x<w;x++){var C=c._index[x];0<=C&&C<=l&&v(c._values[x],C-0,b-0)}else{for(var k={},E=y;E<w;E++){k[c._index[E]]=c._values[E]}for(var S=0;S<=l;S++){v(S in k?k[S]:0,S-0,b-0)}}}return m.push(d.length),new r({values:d,index:p,ptr:m,size:[l-0+1,h-0+1]})}throw new Error("Cannot invoke map on a Pattern only matrix")},r.prototype.forEach=function(e,t){if(!this._values)throw new Error("Cannot invoke forEach on a Pattern only matrix");for(var n=this._size[0],r=this._size[1],i=0;i<r;i++){var o=this._ptr[i],a=this._ptr[i+1];if(t)for(var s=o;s<a;s++){var u=this._index[s];e(this._values[s],[u,i],this)}else{for(var c={},l=o;l<a;l++)c[this._index[l]]=this._values[l];for(var h=0;h<n;h++)e(h in c?c[h]:0,[h,i],this)}}},r.prototype[Symbol.iterator]=function*(){if(!this._values)throw new Error("Cannot iterate a Pattern only matrix");for(var e=this._size[1],t=0;t<e;t++)for(var n=this._ptr[t],r=this._ptr[t+1],i=n;i<r;i++){var o=this._index[i];yield{value:this._values[i],index:[o,t]}}},r.prototype.toArray=function(){return u(this._values,this._index,this._ptr,this._size,!0)},r.prototype.valueOf=function(){return u(this._values,this._index,this._ptr,this._size,!1)},r.prototype.format=function(e){for(var t=this._size[0],n=this._size[1],r=this.density(),i="Sparse Matrix ["+to(t,e)+" x "+to(n,e)+"] density: "+to(r,e)+"\n",o=0;o<n;o++)for(var a=this._ptr[o],s=this._ptr[o+1],u=a;u<s;u++)i+="\n    ("+to(this._index[u],e)+", "+to(o,e)+") ==> "+(this._values?to(this._values[u],e):"X");return i},r.prototype.toString=function(){return to(this.toArray())},r.prototype.toJSON=function(){return{mathjs:"SparseMatrix",values:this._values,index:this._index,ptr:this._ptr,size:this._size,datatype:this._datatype}},r.prototype.diagonal=function(e){if(e){if(!Yr(e=Xr(e)?e.toNumber():e)||!Qi(e))throw new TypeError("The parameter k must be an integer number")}else e=0;var t=0<e?e:0,n=e<0?-e:0,i=(e=this._size[0],this._size[1]),o=Math.min(e-n,i-t),a=[],s=[];(e=[])[0]=0;for(var u=t;u<i&&a.length<o;u++)for(var c=this._ptr[u],l=this._ptr[u+1],h=c;h<l;h++){var f=this._index[h];if(f===u-t+n){a.push(this._values[h]),s[a.length-1]=f-n;break}}return e.push(a.length),new r({values:a,index:s,ptr:e,size:[o,1]})},r.fromJSON=function(e){return new r(e)},r.diagonal=function(e,i,o,a,s){if(!ni(e))throw new TypeError("Array expected, size parameter");if(2!==e.length)throw new Error("Only two dimensions matrix are supported");if(e=e.map((function(e){if(!Yr(e=Xr(e)?e.toNumber():e)||!Qi(e)||e<1)throw new Error("Size values must be positive integers");return e})),o){if(!Yr(o=Xr(o)?o.toNumber():o)||!Qi(o))throw new TypeError("The parameter k must be an integer number")}else o=0;var u,c=n,l=0,h=(ti(s)&&(c=t.find(n,[s,s])||n,l=t.convert(0,s)),0<o?o:0),f=o<0?-o:0,d=(s=e[0],e[1]),p=Math.min(s-f,d-h);if(ni(i)){if(i.length!==p)throw new Error("Invalid value array length");u=function(e){return i[e]}}else if(ri(i)){if(1!==(o=i.size()).length||o[0]!==p)throw new Error("Invalid matrix length");u=function(e){return i.get([e])}}else u=function(){return i};for(var m=[],g=[],A=[],v=0;v<d;v++){A.push(m.length);var b,y=v-h;0<=y&&y<p&&(c(b=u(y),l)||(g.push(y+f),m.push(b)))}return A.push(m.length),new r({values:m,index:g,ptr:A,size:[s,d]})},r.prototype.swapRows=function(e,t){if(!(Yr(e)&&Qi(e)&&Yr(t)&&Qi(t)))throw new Error("Row index must be positive integers");if(2!==this._size.length)throw new Error("Only two dimensional matrix is supported");return ao(e,this._size[0]),ao(t,this._size[0]),r._swapRows(e,t,this._size[1],this._values,this._index,this._ptr),this},r._forEachRow=function(e,t,n,r,i){for(var o=r[e],a=r[e+1],s=o;s<a;s++)i(n[s],t[s])},r._swapRows=function(e,t,n,r,i,a){for(var s=0;s<n;s++){var u,c=a[s],l=a[s+1],h=o(e,c,l,i);c=o(t,c,l,i);h<l&&c<l&&i[h]===e&&i[c]===t?r&&(u=r[h],r[h]=r[c],r[c]=u):h<l&&i[h]===e&&(l<=c||i[c]!==t)?(u=r?r[h]:void 0,i.splice(c,0,t),r&&r.splice(c,0,u),i.splice(c<=h?h+1:h,1),r&&r.splice(c<=h?h+1:h,1)):c<l&&i[c]===t&&(l<=h||i[h]!==e)&&(l=r?r[c]:void 0,i.splice(h,0,e),r&&r.splice(h,0,l),i.splice(h<=c?c+1:c,1),r&&r.splice(h<=c?c+1:c,1))}},r},{isClass:!0});var ia=po("apply",["typed","isInteger"],e=>{var{typed:e,isInteger:t}=e;return e("apply",{"Array | Matrix, number | BigNumber, function":function(e,n,r){if(!t(n))throw new TypeError("Integer number expected for dimension");var i=Array.isArray(e)?io(e):e.size();if(n<0||n>=i.length)throw new ro(n,i.length);return ri(e)?e.create(oa(e.valueOf(),n,r)):oa(e,n,r)}})});function oa(e,t,n){var r,i,o;if(t<=0){if(Array.isArray(e[0])){for(o=function(e){var t,n,r=e.length,i=e[0].length,o=[];for(n=0;n<i;n++){var a=[];for(t=0;t<r;t++)a.push(e[t][n]);o.push(a)}return o}(e),i=[],r=0;r<o.length;r++)i[r]=oa(o[r],t-1,n);return i}return n(e)}for(i=[],r=0;r<e.length;r++)i[r]=oa(e[r],t-1,n);return i}po("bin",["typed","format"],e=>{var{typed:e,format:t}=e;return e("bin",{"number | BigNumber":function(e){return t(e,{notation:"bin"})},"number | BigNumber, number":function(e,n){return t(e,{notation:"bin",wordSize:n})}})});var aa=po("isNaN",["typed"],e=>(e=e.typed)("isNaN",{number:Jo,BigNumber:function(e){return e.isNaN()},Fraction:function(e){return!1},Complex:function(e){return e.isNaN()},Unit:function(e){return Number.isNaN(e.value)},"Array | Matrix":function(e){return No(e,Number.isNaN)}})),sa=po("sqrt",["config","typed","Complex"],e=>{var{config:t,typed:e,Complex:n}=e;return e("sqrt",{number:r,Complex:function(e){return e.sqrt()},BigNumber:function(e){return!e.isNegative()||t.predictable?e.sqrt():r(e.toNumber())},Unit:function(e){return e.pow(.5)}});function r(e){return isNaN(e)?NaN:0<=e||t.predictable?Math.sqrt(e):new n(e,0).sqrt()}}),ua="unaryMinus",ca=po(ua,["typed"],e=>{var t=e.typed;return t(ua,{number:Ho,"Complex | BigNumber | Fraction":e=>e.neg(),Unit:t.referToSelf(e=>n=>{var r=n.clone();return r.value=t.find(e,r.valueType())(n.value),r}),"Array | Matrix":t.referToSelf(e=>t=>No(t,e,!0))})}),la=po("fraction",["typed","Fraction"],e=>{var{typed:e,Fraction:t}=e;return e("fraction",{number:function(e){if(!isFinite(e)||isNaN(e))throw new Error(e+" cannot be represented as a fraction");return new t(e)},string:function(e){return new t(e)},"number, number":function(e,n){return new t(e,n)},null:function(e){return new t(0)},BigNumber:function(e){return new t(e.toString())},Fraction:function(e){return e},Object:function(e){return new t(e)},"Array | Matrix":e.referToSelf(e=>t=>No(t,e))})}),ha=po("isNumeric",["typed"],e=>(e=e.typed)("isNumeric",{"number | BigNumber | Fraction | boolean":()=>!0,"Complex | Unit | string | null | undefined | Node":()=>!1,"Array | Matrix":e.referToSelf(e=>t=>No(t,e))})),fa=po("matrix",["typed","Matrix","DenseMatrix","SparseMatrix"],e=>{var{typed:e,DenseMatrix:t,SparseMatrix:n}=e;return e("matrix",{"":function(){return r([])},string:function(e){return r([],e)},"string, string":function(e,t){return r([],e,t)},Array:function(e){return r(e)},Matrix:function(e){return r(e,e.storage())},"Array | Matrix, string":r,"Array | Matrix, string, string":r});function r(e,r,i){if("dense"===r||"default"===r||void 0===r)return new t(e,i);if("sparse"===r)return new n(e,i);throw new TypeError("Unknown matrix type "+JSON.stringify(r)+".")}}),da=po("matAlgo03xDSf",["typed"],e=>{var t=e.typed;return function(e,n,r,i){var o=e._data,a=e._size,s=e._datatype,u=n._values,c=n._index,l=n._ptr,h=n._size;n=n._datatype;if(a.length!==h.length)throw new no(a.length,h.length);if(a[0]!==h[0]||a[1]!==h[1])throw new RangeError("Dimension mismatch. Matrix A ("+a+") must match Matrix B ("+h+")");if(!u)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");for(var f,d=a[0],p=a[1],m=0,g=r,A=("string"==typeof s&&s===n&&(m=t.convert(0,f=s),g=t.find(r,[f,f])),[]),v=0;v<d;v++)A[v]=[];for(var b=[],y=[],w=0;w<p;w++){for(var x=w+1,C=l[w],k=l[w+1],E=C;E<k;E++){var S=c[E];b[S]=i?g(u[E],o[S][w]):g(o[S][w],u[E]),y[S]=x}for(var _=0;_<d;_++)y[_]===x?A[_][w]=b[_]:A[_][w]=i?g(m,o[_][w]):g(o[_][w],m)}return e.createDenseMatrix({data:A,size:[d,p],datatype:f})}}),pa=po("matAlgo05xSfSf",["typed","equalScalar"],e=>{var{typed:t,equalScalar:n}=e;return function(e,r,i){var o=e._values,a=e._index,s=e._ptr,u=e._size,c=e._datatype,l=r._values,h=r._index,f=r._ptr,d=r._size;r=r._datatype;if(u.length!==d.length)throw new no(u.length,d.length);if(u[0]!==d[0]||u[1]!==d[1])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+d+")");d=u[0];for(var p,m=u[1],g=n,A=0,v=i,b=("string"==typeof c&&c===r&&(g=t.find(n,[p=c,p]),A=t.convert(0,p),v=t.find(i,[p,p])),o&&l?[]:void 0),y=[],w=[],x=b?[]:void 0,C=b?[]:void 0,k=[],E=[],S=0;S<m;S++){w[S]=y.length;for(var _=S+1,O=s[S],T=s[S+1];O<T;O++)D=a[O],y.push(D),k[D]=_,x&&(x[D]=o[O]);for(O=f[S],T=f[S+1];O<T;O++)k[D=h[O]]!==_&&y.push(D),E[D]=_,C&&(C[D]=l[O]);if(b)for(O=w[S];O<y.length;){var D,B=k[D=y[O]],I=E[D];B!==_&&I!==_||(g(B=v(B===_?x[D]:A,I===_?C[D]:A),A)?y.splice(O,1):(b.push(B),O++))}}return w[m]=y.length,e.createSparseMatrix({values:b,index:y,ptr:w,size:[d,m],datatype:p})}}),ma=po("matAlgo11xS0s",["typed","equalScalar"],e=>{var{typed:t,equalScalar:n}=e;return function(e,r,i,o){var a=e._values,s=e._index,u=e._ptr,c=e._size,l=e._datatype;if(!a)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");for(var h,f=c[0],d=c[1],p=n,m=0,g=i,A=("string"==typeof l&&(p=t.find(n,[h=l,h]),m=t.convert(0,h),r=t.convert(r,h),g=t.find(i,[h,h])),[]),v=[],b=[],y=0;y<d;y++){b[y]=v.length;for(var w=u[y],x=u[y+1],C=w;C<x;C++){var k=s[C],E=o?g(r,a[C]):g(a[C],r);p(E,m)||(v.push(k),A.push(E))}}return b[d]=v.length,e.createSparseMatrix({values:A,index:v,ptr:b,size:[f,d],datatype:h})}}),ga=po("matAlgo12xSfs",["typed","DenseMatrix"],e=>{var{typed:t,DenseMatrix:n}=e;return function(e,r,i,o){var a=e._values,s=e._index,u=e._ptr,c=e._size;e=e._datatype;if(!a)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");for(var l,h=c[0],f=c[1],d=i,p=("string"==typeof e&&(r=t.convert(r,l=e),d=t.find(i,[l,l])),[]),m=[],g=[],A=0;A<f;A++){for(var v=A+1,b=u[A],y=u[A+1],w=b;w<y;w++){var x=s[w];m[x]=a[w],g[x]=v}for(var C=0;C<h;C++)0===A&&(p[C]=[]),g[C]===v?p[C][A]=o?d(r,m[C]):d(m[C],r):p[C][A]=o?d(r,0):d(0,r)}return new n({data:p,size:[h,f],datatype:l})}}),Aa=po("matAlgo13xDD",["typed"],e=>{var t=e.typed;return function(e,n,r){var i=e._data,o=e._size,a=e._datatype,s=n._data,u=n._size,c=(n=n._datatype,[]);if(o.length!==u.length)throw new no(o.length,u.length);for(var l,h=0;h<o.length;h++){if(o[h]!==u[h])throw new RangeError("Dimension mismatch. Matrix A ("+o+") must match Matrix B ("+u+")");c[h]=o[h]}var f=r;"string"==typeof a&&a===n&&(f=t.find(r,[l=a,l])),n=0<c.length?function e(t,n,r,i,o,a){var s=[];if(n===r.length-1)for(var u=0;u<i;u++)s[u]=t(o[u],a[u]);else for(var c=0;c<i;c++)s[c]=e(t,n+1,r,r[n+1],o[c],a[c]);return s}(f,0,c,c[0],i,s):[];return e.createDenseMatrix({data:n,size:c,datatype:l})}}),va=po("matAlgo14xDs",["typed"],e=>{var t=e.typed;return function(e,n,r,i){var o,a=e._data,s=e._size,u=r,c=("string"==typeof(c=e._datatype)&&(n=t.convert(n,o=c),u=t.find(r,[o,o])),0<s.length?function e(t,n,r,i,o,a,s){var u=[];if(n===r.length-1)for(var c=0;c<i;c++)u[c]=s?t(a,o[c]):t(o[c],a);else for(var l=0;l<i;l++)u[l]=e(t,n+1,r,r[n+1],o[l],a,s);return u}(u,0,s,s[0],a,n,i):[]);return e.createDenseMatrix({data:c,size:Fi(s),datatype:o})}}),ba=po("matrixAlgorithmSuite",["typed","matrix"],e=>{var{typed:t,matrix:n}=e,r=Aa({typed:t}),i=va({typed:t});return function(e){var o,a=e.elop,s=e.SD||e.DS,u=(a?(o={"DenseMatrix, DenseMatrix":(e,t)=>r(e,t,a),"Array, Array":(e,t)=>r(n(e),n(t),a).valueOf(),"Array, DenseMatrix":(e,t)=>r(n(e),t,a),"DenseMatrix, Array":(e,t)=>r(e,n(t),a)},e.SS&&(o["SparseMatrix, SparseMatrix"]=(t,n)=>e.SS(t,n,a,!1)),e.DS&&(o["DenseMatrix, SparseMatrix"]=(t,n)=>e.DS(t,n,a,!1),o["Array, SparseMatrix"]=(t,r)=>e.DS(n(t),r,a,!1)),s&&(o["SparseMatrix, DenseMatrix"]=(e,t)=>s(t,e,a,!0),o["SparseMatrix, Array"]=(e,t)=>s(n(t),e,a,!0))):(o={"DenseMatrix, DenseMatrix":t.referToSelf(e=>(t,n)=>r(t,n,e)),"Array, Array":t.referToSelf(e=>(t,i)=>r(n(t),n(i),e).valueOf()),"Array, DenseMatrix":t.referToSelf(e=>(t,i)=>r(n(t),i,e)),"DenseMatrix, Array":t.referToSelf(e=>(t,i)=>r(t,n(i),e))},e.SS&&(o["SparseMatrix, SparseMatrix"]=t.referToSelf(t=>(n,r)=>e.SS(n,r,t,!1))),e.DS&&(o["DenseMatrix, SparseMatrix"]=t.referToSelf(t=>(n,r)=>e.DS(n,r,t,!1)),o["Array, SparseMatrix"]=t.referToSelf(t=>(r,i)=>e.DS(n(r),i,t,!1))),s&&(o["SparseMatrix, DenseMatrix"]=t.referToSelf(e=>(t,n)=>s(n,t,e,!0)),o["SparseMatrix, Array"]=t.referToSelf(e=>(t,r)=>s(n(r),t,e,!0)))),e.scalar||"any"),c=((e.Ds||e.Ss)&&(a?(o["DenseMatrix,"+u]=(e,t)=>i(e,t,a,!1),o[u+", DenseMatrix"]=(e,t)=>i(t,e,a,!0),o["Array,"+u]=(e,t)=>i(n(e),t,a,!1).valueOf(),o[u+", Array"]=(e,t)=>i(n(t),e,a,!0).valueOf()):(o["DenseMatrix,"+u]=t.referToSelf(e=>(t,n)=>i(t,n,e,!1)),o[u+", DenseMatrix"]=t.referToSelf(e=>(t,n)=>i(n,t,e,!0)),o["Array,"+u]=t.referToSelf(e=>(t,r)=>i(n(t),r,e,!1).valueOf()),o[u+", Array"]=t.referToSelf(e=>(t,r)=>i(n(r),t,e,!0).valueOf()))),void 0!==e.sS?e.sS:e.Ss);return a?(e.Ss&&(o["SparseMatrix,"+u]=(t,n)=>e.Ss(t,n,a,!1)),c&&(o[u+", SparseMatrix"]=(e,t)=>c(t,e,a,!0))):(e.Ss&&(o["SparseMatrix,"+u]=t.referToSelf(t=>(n,r)=>e.Ss(n,r,t,!1))),c&&(o[u+", SparseMatrix"]=t.referToSelf(e=>(t,n)=>c(n,t,e,!0)))),a&&a.signatures&&Ri(o,a.signatures),o}}),ya=po("matAlgo01xDSid",["typed"],e=>{var t=e.typed;return function(e,n,r,i){var o=e._data,a=e._size,s=e._datatype,u=n._values,c=n._index,l=n._ptr,h=n._size;n=n._datatype;if(a.length!==h.length)throw new no(a.length,h.length);if(a[0]!==h[0]||a[1]!==h[1])throw new RangeError("Dimension mismatch. Matrix A ("+a+") must match Matrix B ("+h+")");if(!u)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");for(var f=a[0],d=a[1],p=(h="string"==typeof s&&s===n?s:void 0)?t.find(r,[h,h]):r,m=[],g=0;g<f;g++)m[g]=[];for(var A=[],v=[],b=0;b<d;b++){for(var y=b+1,w=l[b],x=l[b+1],C=w;C<x;C++)A[g=c[C]]=i?p(u[C],o[g][b]):p(o[g][b],u[C]),v[g]=y;for(g=0;g<f;g++)v[g]===y?m[g][b]=A[g]:m[g][b]=o[g][b]}return e.createDenseMatrix({data:m,size:[f,d],datatype:h})}});function wa(){throw new Error('No "bignumber" implementation available')}function xa(){throw new Error('No "fraction" implementation available')}var Ca=po("numeric",["number","?bignumber","?fraction"],e=>{var{number:t,bignumber:n,fraction:r}=e,i={string:!0,number:!0,BigNumber:!0,Fraction:!0},o={number:e=>t(e),BigNumber:n?e=>n(e):wa,Fraction:r?e=>r(e):xa};return function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"number";if(void 0!==(2<arguments.length?arguments[2]:void 0))throw new SyntaxError("numeric() takes one or two arguments");var n=Ni(e);if(!(n in i))throw new TypeError("Cannot convert "+e+' of type "'+n+'"; valid input types are '+Object.keys(i).join(", "));if(t in o)return t===n?e:o[t](e);throw new TypeError("Cannot convert "+e+' to type "'+t+'"; valid output types are '+Object.keys(o).join(", "))}});function ka(e,t,n){var r;return-1!==String(e).indexOf("Unexpected type")?(r=2<arguments.length?" (type: "+Ni(n)+", value: "+JSON.stringify(n)+")":" (type: "+e.data.actual+")",new TypeError("Cannot calculate "+t+", unexpected type of argument"+r)):-1!==String(e).indexOf("complex numbers")?(r=2<arguments.length?" (type: "+Ni(n)+", value: "+JSON.stringify(n)+")":"",new TypeError("Cannot calculate "+t+", no ordering relation is defined for complex numbers"+r)):e}var Ea=po("size",["typed","config","?matrix"],e=>{var{typed:e,config:t,matrix:n}=e;return e("size",{Matrix:function(e){return e.create(e.size())},Array:io,string:function(e){return"Array"===t.matrix?[e.length]:n([e.length])},"number | Complex | BigNumber | Unit | boolean | null":function(e){return"Array"===t.matrix?[]:n?n([]):function(){throw new Error('No "matrix" implementation available')}()}})}),Sa=po("matAlgo10xSids",["typed","DenseMatrix"],e=>{var{typed:t,DenseMatrix:n}=e;return function(e,r,i,o){var a=e._values,s=e._index,u=e._ptr,c=e._size;e=e._datatype;if(!a)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");for(var l,h=c[0],f=c[1],d=i,p=("string"==typeof e&&(r=t.convert(r,l=e),d=t.find(i,[l,l])),[]),m=[],g=[],A=0;A<f;A++){for(var v=A+1,b=u[A],y=u[A+1],w=b;w<y;w++){var x=s[w];m[x]=a[w],g[x]=v}for(var C=0;C<h;C++)0===A&&(p[C]=[]),g[C]===v?p[C][A]=o?d(r,m[C]):d(m[C],r):p[C][A]=r}return new n({data:p,size:[h,f],datatype:l})}}),_a=po("subtract",["typed","matrix","equalScalar","addScalar","unaryMinus","DenseMatrix"],e=>{var{typed:t,matrix:e,equalScalar:n,DenseMatrix:r}=e,i=ya({typed:t}),o=da({typed:t}),n=pa({typed:t,equalScalar:n}),a=Sa({typed:t,DenseMatrix:r}),r=ga({typed:t,DenseMatrix:r});e=ba({typed:t,matrix:e});return t("subtract",{"number, number":(e,t)=>e-t,"Complex, Complex":(e,t)=>e.sub(t),"BigNumber, BigNumber":(e,t)=>e.minus(t),"Fraction, Fraction":(e,t)=>e.sub(t),"Unit, Unit":t.referToSelf(e=>(n,r)=>{if(null===n.value)throw new Error("Parameter x contains a unit with undefined value");if(null===r.value)throw new Error("Parameter y contains a unit with undefined value");if(n.equalBase(r))return(n=n.clone()).value=t.find(e,[n.valueType(),r.valueType()])(n.value,r.value),n.fixPrefix=!1,n;throw new Error("Units do not match")})},e({SS:n,DS:i,SD:o,Ss:r,sS:a}))}),Oa="compare",Ta=po(Oa,["typed","config","matrix","equalScalar","BigNumber","Fraction","DenseMatrix"],e=>{var{typed:e,config:t,equalScalar:n,matrix:r,BigNumber:i,Fraction:o,DenseMatrix:a}=e,s=da({typed:e}),n=pa({typed:e,equalScalar:n}),a=ga({typed:e,DenseMatrix:a}),r=ba({typed:e,matrix:r}),u=qo({typed:e});return e(Oa,Da({typed:e,config:t}),{"boolean, boolean":function(e,t){return e===t?0:t<e?1:-1},"BigNumber, BigNumber":function(e,n){return Vo(e,n,t.epsilon)?new i(0):new i(e.cmp(n))},"Fraction, Fraction":function(e,t){return new o(e.compare(t))},"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")}},u,r({SS:n,DS:s,Ss:a}))}),Da=po(Oa,["typed","config"],e=>{var{typed:e,config:t}=e;return e(Oa,{"number, number":function(e,n){return Ji(e,n,t.epsilon)?0:n<e?1:-1}})}),Ba="divideScalar",Ia=po(Ba,["typed","numeric"],e=>(e=e.typed)(Ba,{"number, number":function(e,t){return e/t},"Complex, Complex":function(e,t){return e.div(t)},"BigNumber, BigNumber":function(e,t){return e.div(t)},"Fraction, Fraction":function(e,t){return e.div(t)},"Unit, number | Complex | Fraction | BigNumber | Unit":(e,t)=>e.divide(t),"number | Fraction | Complex | BigNumber, Unit":(e,t)=>t.divideInto(e)})),Ma=(po("equal",["typed","equalScalar"],e=>{var{typed:e,equalScalar:t}=e;return e("equal",{"any, any":function(e,n){return null===e?null===n:null===n?null===e:void 0===e?void 0===n:void 0===n?void 0===e:t(e,n)}})}),po("matAlgo04xSidSid",["typed","equalScalar"],e=>{var{typed:t,equalScalar:n}=e;return function(e,r,i){var o=e._values,a=e._index,s=e._ptr,u=e._size,c=e._datatype,l=r._values,h=r._index,f=r._ptr,d=r._size;r=r._datatype;if(u.length!==d.length)throw new no(u.length,d.length);if(u[0]!==d[0]||u[1]!==d[1])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+d+")");d=u[0];for(var p,m=u[1],g=n,A=0,v=i,b=("string"==typeof c&&c===r&&(g=t.find(n,[p=c,p]),A=t.convert(0,p),v=t.find(i,[p,p])),o&&l?[]:void 0),y=[],w=[],x=o&&l?[]:void 0,C=o&&l?[]:void 0,k=[],E=[],S=0;S<m;S++){w[S]=y.length;for(var _,O,T=S+1,D=s[S],B=s[S+1],I=D;I<B;I++)O=a[I],y.push(O),k[O]=T,x&&(x[O]=o[I]);for(D=f[S],B=f[S+1],I=D;I<B;I++)k[O=h[I]]===T?x&&(g(_=v(x[O],l[I]),A)?k[O]=null:x[O]=_):(y.push(O),E[O]=T,C&&(C[O]=l[I]));if(x&&C)for(I=w[S];I<y.length;)k[O=y[I]]===T?(b[I]=x[O],I++):E[O]===T?(b[I]=C[O],I++):y.splice(I,1)}return w[m]=y.length,e.createSparseMatrix({values:b,index:y,ptr:w,size:[d,m],datatype:p})}})),ja=po("mode",["typed","isNaN","isNumeric"],e=>{var{typed:e,isNaN:t,isNumeric:n}=e;return e("mode",{"Array | Matrix":r,"...":r});function r(e){if(0===(e=ho(e.valueOf())).length)throw new Error("Cannot calculate mode of an empty array");for(var r={},i=[],o=0,a=0;a<e.length;a++){var s=e[a];if(n(s)&&t(s))throw new Error("Cannot calculate mode of an array containing NaN values");s in r||(r[s]=0),r[s]++,r[s]===o?i.push(s):r[s]>o&&(o=r[s],i=[s])}return i}}),Na="partitionSelect",Fa=po(Na,["typed","isNumeric","isNaN","compare"],e=>{var{typed:e,isNumeric:t,isNaN:n,compare:r}=e,i=r,o=(e,t)=>-r(e,t);return e(Na,{"Array | Matrix, number":function(e,t){return a(e,t,i)},"Array | Matrix, number, string":function(e,t,n){if("asc"===n)return a(e,t,i);if("desc"===n)return a(e,t,o);throw new Error('Compare string must be "asc" or "desc"')},"Array | Matrix, number, function":a});function a(e,t,n){if(!Qi(t)||t<0)throw new Error("k must be a non-negative integer");if(ri(e)){if(1<e.size().length)throw new Error("Only one dimensional matrices supported");return s(e.valueOf(),t,n)}if(Array.isArray(e))return s(e,t,n)}function s(e,r,i){if(r>=e.length)throw new Error("k out of bounds");for(var o=0;o<e.length;o++)if(t(e[o])&&n(e[o]))return e[o];for(var a=0,s=e.length-1;a<s;){for(var u,c=a,l=s,h=e[Math.floor(Math.random()*(s-a+1))+a];c<l;)0<=i(e[c],h)?(u=e[l],e[l]=e[c],e[c]=u,--l):++c;0<i(e[c],h)&&--c,r<=c?s=c:a=c+1}return e[r]}});(new Error).constructor=Error;var Ra="unequal",Pa=(po(Ra,["typed","equalScalar"],e=>{var{typed:e,equalScalar:t}=e;return e(Ra,{"any, any":function(e,n){return null===e?null!==n:null===n?null!==e:void 0===e?void 0!==n:void 0===n?void 0!==e:!t(e,n)}})}),po("add",["typed","matrix","addScalar","equalScalar","DenseMatrix","SparseMatrix"],e=>{var{typed:e,matrix:t,addScalar:n,equalScalar:r,DenseMatrix:i}=e,o=ya({typed:e}),r=Ma({typed:e,equalScalar:r}),i=Sa({typed:e,DenseMatrix:i}),t=ba({typed:e,matrix:t});return e("add",{"any, any":n,"any, any, ...any":e.referToSelf(e=>(t,n,r)=>{for(var i=e(t,n),o=0;o<r.length;o++)i=e(i,r[o]);return i})},t({elop:n,DS:o,SS:r,Ss:i}))}));n(127);var La=po("dot",["typed","addScalar","multiplyScalar","conj","size"],e=>{var{typed:t,addScalar:n,multiplyScalar:r,conj:i,size:o}=e;return t("dot",{"Array | DenseMatrix, Array | DenseMatrix":function(e,o){var u=a(e,o),c=ri(e)?e._data:e,l=ri(e)?e._datatype:void 0,h=ri(o)?o._data:o,f=ri(o)?o._datatype:void 0,d=(e=2===s(e).length,o=2===s(o).length,n),p=r;if(l&&f&&l===f&&"string"==typeof l&&(f=l,d=t.find(n,[f,f]),p=t.find(r,[f,f])),!e&&!o){for(var m=p(i(c[0]),h[0]),g=1;g<u;g++)m=d(m,p(i(c[g]),h[g]));return m}if(!e&&o){for(var A=p(i(c[0]),h[0][0]),v=1;v<u;v++)A=d(A,p(i(c[v]),h[v][0]));return A}if(e&&!o){for(var b=p(i(c[0][0]),h[0]),y=1;y<u;y++)b=d(b,p(i(c[y][0]),h[y]));return b}if(e&&o){for(var w=p(i(c[0][0]),h[0][0]),x=1;x<u;x++)w=d(w,p(i(c[x][0]),h[x][0]));return w}},"SparseMatrix, SparseMatrix":function(e,t){a(e,t);for(var i=e._index,o=e._values,s=t._index,u=t._values,c=0,l=n,h=r,f=0,d=0;f<i.length&&d<s.length;){var p=i[f],m=s[d];p<m?f++:m<p?d++:p===m&&(c=l(c,h(o[f],u[d])),f++,d++)}return c}});function a(e,t){e=s(e),t=s(t);if(1!==e.length&&(2!==e.length||1!==e[1]))throw new RangeError("Expected a column vector, instead got a matrix of size ("+e.join(", ")+")");if(e=e[0],1!==t.length&&(2!==t.length||1!==t[1]))throw new RangeError("Expected a column vector, instead got a matrix of size ("+t.join(", ")+")");if(e!==(t=t[0]))throw new RangeError("Vectors must have equal length ("+e+" != "+t+")");if(0===e)throw new RangeError("Cannot calculate the dot product of empty vectors");return e}function s(e){return ri(e)?e.size():o(e)}}),Ua=po("identity",["typed","config","matrix","BigNumber","DenseMatrix","SparseMatrix"],e=>{var{typed:e,config:t,matrix:n,BigNumber:r,DenseMatrix:i,SparseMatrix:o}=e;return e("identity",{"":function(){return"Matrix"===t.matrix?n([]):[]},string:function(e){return n(e)},"number | BigNumber":function(e){return s(e,e,"Matrix"===t.matrix?"dense":void 0)},"number | BigNumber, string":function(e,t){return s(e,e,t)},"number | BigNumber, number | BigNumber":function(e,n){return s(e,n,"Matrix"===t.matrix?"dense":void 0)},"number | BigNumber, number | BigNumber, string":s,Array:function(e){return a(e)},"Array, string":a,Matrix:function(e){return a(e.valueOf(),e.storage())},"Matrix, string":function(e,t){return a(e.valueOf(),t)}});function a(e,t){switch(e.length){case 0:return t?n(t):[];case 1:return s(e[0],e[0],t);case 2:return s(e[0],e[1],t);default:throw new Error("Vector containing two values expected")}}function s(e,t,n){var a=Xr(e)||Xr(t)?r:null;if(Xr(e)&&(e=e.toNumber()),Xr(t)&&(t=t.toNumber()),!Qi(e)||e<1)throw new Error("Parameters in function identity must be positive integers");if(!Qi(t)||t<1)throw new Error("Parameters in function identity must be positive integers");var s=a?new r(1):1,u=(a=a?new a(0):0,[e,t]);if(n){if("sparse"===n)return o.diagonal(u,s,0,a);if("dense"===n)return i.diagonal(u,s,0,a);throw new TypeError('Unknown matrix type "'.concat(n,'"'))}for(var c=so([],u,a),l=e<t?e:t,h=0;h<l;h++)c[h][h]=s;return c}}),za=po("multiply",["typed","matrix","addScalar","multiplyScalar","equalScalar","dot"],e=>{var{typed:t,matrix:n,addScalar:r,multiplyScalar:i,equalScalar:o,dot:a}=e,s=ma({typed:t,equalScalar:o}),u=va({typed:t});function c(e,t){switch(e.length){case 1:switch(t.length){case 1:if(e[0]!==t[0])throw new RangeError("Dimension mismatch in multiplication. Vectors must have the same length");break;case 2:if(e[0]!==t[0])throw new RangeError("Dimension mismatch in multiplication. Vector length ("+e[0]+") must match Matrix rows ("+t[0]+")");break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix B has "+t.length+" dimensions)")}break;case 2:switch(t.length){case 1:if(e[1]!==t[0])throw new RangeError("Dimension mismatch in multiplication. Matrix columns ("+e[1]+") must match Vector length ("+t[0]+")");break;case 2:if(e[1]!==t[0])throw new RangeError("Dimension mismatch in multiplication. Matrix A columns ("+e[1]+") must match Matrix B rows ("+t[0]+")");break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix B has "+t.length+" dimensions)")}break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix A has "+e.length+" dimensions)")}}var l=t("_multiplyMatrixVector",{"DenseMatrix, any":function(e,n){var o,a=e._data,s=e._size,u=e._datatype,c=n._data,l=(n=n._datatype,s[0]),h=s[1],f=r,d=i;u&&n&&u===n&&"string"==typeof u&&(o=u,f=t.find(r,[o,o]),d=t.find(i,[o,o]));for(var p=[],m=0;m<l;m++){for(var g=a[m],A=d(g[0],c[0]),v=1;v<h;v++)A=f(A,d(g[v],c[v]));p[m]=A}return e.createDenseMatrix({data:p,size:[l],datatype:o})},"SparseMatrix, any":function(e,n){var a=e._values,s=e._index,u=e._ptr,c=e._datatype;if(!a)throw new Error("Cannot multiply Pattern only Matrix times Dense Matrix");var l,h=n._data,f=n._datatype,d=e._size[0],p=n._size[0],m=[],g=[],A=(n=[],r),v=i,b=o,y=0;c&&f&&c===f&&"string"==typeof c&&(l=c,A=t.find(r,[l,l]),v=t.find(i,[l,l]),b=t.find(o,[l,l]),y=t.convert(0,l));for(var w=[],x=[],C=n[0]=0;C<p;C++){var k=h[C];if(!b(k,y))for(var E=u[C],S=u[C+1],_=E;_<S;_++){var O=s[_];x[O]?w[O]=A(w[O],v(k,a[_])):(x[O]=!0,g.push(O),w[O]=v(k,a[_]))}}for(var T=g.length,D=0;D<T;D++){var B=g[D];m[D]=w[B]}return n[1]=g.length,e.createSparseMatrix({values:m,index:g,ptr:n,size:[d,1],datatype:l})}}),h=t("_multiplyMatrixMatrix",{"DenseMatrix, DenseMatrix":function(e,n){var o,a=e._data,s=e._size,u=e._datatype,c=n._data,l=n._size,h=(n=n._datatype,s[0]),f=s[1],d=l[1],p=r,m=i;u&&n&&u===n&&"string"==typeof u&&(o=u,p=t.find(r,[o,o]),m=t.find(i,[o,o]));for(var g=[],A=0;A<h;A++){var v=a[A];g[A]=[];for(var b=0;b<d;b++){for(var y=m(v[0],c[0][b]),w=1;w<f;w++)y=p(y,m(v[w],c[w][b]));g[A][b]=y}}return e.createDenseMatrix({data:g,size:[h,d],datatype:o})},"DenseMatrix, SparseMatrix":function(e,n){var a=e._data,s=e._size,u=(e=e._datatype,n._values),c=n._index,l=n._ptr,h=n._size,f=n._datatype;if(!u)throw new Error("Cannot multiply Dense Matrix times Pattern only Matrix");var d,p=s[0],m=h[1],g=r,A=i,v=o,b=0;e&&f&&e===f&&"string"==typeof e&&(d=e,g=t.find(r,[d,d]),A=t.find(i,[d,d]),v=t.find(o,[d,d]),b=t.convert(0,d));for(var y=[],w=[],x=[],C=(s=n.createSparseMatrix({values:y,index:w,ptr:x,size:[p,m],datatype:d}),0);C<m;C++){x[C]=w.length;var k=l[C],E=l[C+1];if(k<E)for(var S=0,_=0;_<p;_++){for(var O=_+1,T=void 0,D=k;D<E;D++){var B=c[D];S!==O?(T=A(a[_][B],u[D]),S=O):T=g(T,A(a[_][B],u[D]))}S!==O||v(T,b)||(w.push(_),y.push(T))}}return x[m]=w.length,s},"SparseMatrix, DenseMatrix":function(e,n){var a=e._values,s=e._index,u=e._ptr,c=e._datatype;if(!a)throw new Error("Cannot multiply Pattern only Matrix times Dense Matrix");var l,h=n._data,f=n._datatype,d=e._size[0],p=n._size[0],m=n._size[1],g=r,A=i,v=o,b=0;c&&f&&c===f&&"string"==typeof c&&(l=c,g=t.find(r,[l,l]),A=t.find(i,[l,l]),v=t.find(o,[l,l]),b=t.convert(0,l));for(var y=[],w=[],x=[],C=(n=e.createSparseMatrix({values:y,index:w,ptr:x,size:[d,m],datatype:l}),[]),k=[],E=0;E<m;E++){x[E]=w.length;for(var S=E+1,_=0;_<p;_++){var O=h[_][E];if(!v(O,b))for(var T=u[_],D=u[_+1],B=T;B<D;B++){var I=s[B];k[I]!==S?(k[I]=S,w.push(I),C[I]=A(O,a[B])):C[I]=g(C[I],A(O,a[B]))}}for(var M=x[E],j=w.length,N=M;N<j;N++){var F=w[N];y[N]=C[F]}}return x[m]=w.length,n},"SparseMatrix, SparseMatrix":function(e,n){var o,a=e._values,s=e._index,u=e._ptr,c=e._datatype,l=n._values,h=n._index,f=n._ptr,d=n._datatype,p=e._size[0],m=n._size[1],g=a&&l,A=r,v=i;c&&d&&c===d&&"string"==typeof c&&(o=c,A=t.find(r,[o,o]),v=t.find(i,[o,o]));for(var b,y,w,x,C,k,E,S=g?[]:void 0,_=[],O=[],T=(n=e.createSparseMatrix({values:S,index:_,ptr:O,size:[p,m],datatype:o}),g?[]:void 0),D=[],B=0;B<m;B++){O[B]=_.length;var I=B+1;for(M=f[B],C=f[B+1],x=M;x<C;x++)if(E=h[x],g)for(y=u[E],w=u[E+1],b=y;b<w;b++)D[k=s[b]]!==I?(D[k]=I,_.push(k),T[k]=v(l[x],a[b])):T[k]=A(T[k],v(l[x],a[b]));else for(y=u[E],w=u[E+1],b=y;b<w;b++)D[k=s[b]]!==I&&(D[k]=I,_.push(k));if(g)for(var M=O[B],j=_.length,N=M;N<j;N++){var F=_[N];S[N]=T[F]}}return O[m]=_.length,n}});return t("multiply",i,{"Array, Array":t.referTo("Matrix, Matrix",e=>(t,r)=>(c(io(t),io(r)),ri(t=e(n(t),n(r)))?t.valueOf():t)),"Matrix, Matrix":function(e,n){var o=e.size(),s=n.size();if(c(o,s),1!==o.length)return(1===s.length?l:h)(e,n);if(1!==s.length)return function(e,n){if("dense"!==n.storage())throw new Error("Support for SparseMatrix not implemented");var o,a=e._data,s=e._size,u=e._datatype,c=n._data,l=n._size,h=(n=n._datatype,s[0]),f=l[1],d=r,p=i;u&&n&&u===n&&"string"==typeof u&&(o=u,d=t.find(r,[o,o]),p=t.find(i,[o,o]));for(var m=[],g=0;g<f;g++){for(var A=p(a[0],c[0][g]),v=1;v<h;v++)A=d(A,p(a[v],c[v][g]));m[g]=A}return e.createDenseMatrix({data:m,size:[f],datatype:o})}(e,n);if(s=e,e=n,0===o[0])throw new Error("Cannot multiply two empty vectors");return a(s,e)},"Matrix, Array":t.referTo("Matrix,Matrix",e=>(t,r)=>e(t,n(r))),"Array, Matrix":t.referToSelf(e=>(t,r)=>e(n(t,r.storage()),r)),"SparseMatrix, any":function(e,t){return s(e,t,i,!1)},"DenseMatrix, any":function(e,t){return u(e,t,i,!1)},"any, SparseMatrix":function(e,t){return s(t,e,i,!0)},"any, DenseMatrix":function(e,t){return u(t,e,i,!0)},"Array, any":function(e,t){return u(n(e),t,i,!1).valueOf()},"any, Array":function(e,t){return u(n(t),e,i,!0).valueOf()},"any, any":i,"any, any, ...any":t.referToSelf(e=>(t,n,r)=>{for(var i=e(t,n),o=0;o<r.length;o++)i=e(i,r[o]);return i})})}),Ha=po("det",["typed","matrix","subtract","multiply","divideScalar","isZero","unaryMinus"],e=>{var{typed:e,matrix:t,subtract:n,multiply:r,divideScalar:i,isZero:o,unaryMinus:a}=e;return e("det",{any:Fi,"Array | Matrix":function(e){var s=ri(e)?e.size():Array.isArray(e)?(e=t(e)).size():[];switch(s.length){case 0:return Fi(e);case 1:if(1===s[0])return Fi(e.valueOf()[0]);throw new RangeError("Matrix must be square (size: "+to(s)+")");case 2:var u=s[0],c=s[1];if(u!==c)throw new RangeError("Matrix must be square (size: "+to(s)+")");var l=e.clone().valueOf(),h=u;if(1===h)return Fi(l[0][0]);if(2===h)return n(r(l[0][0],l[1][1]),r(l[1][0],l[0][1]));for(var f=!1,d=new Array(h).fill(0).map((e,t)=>t),p=0;p<h;p++){var m=d[p];if(o(l[m][p])){var g=void 0;for(g=p+1;g<h;g++)if(!o(l[d[g]][p])){m=d[g],d[g]=d[p],d[p]=m,f=!f;break}if(g===h)return l[m][p]}for(var A=l[m][p],v=0===p?1:l[d[p-1]][p-1],b=p+1;b<h;b++)for(var y=d[b],w=p+1;w<h;w++)l[y][w]=i(n(r(l[y][w],A),r(l[y][p],l[m][w])),v)}return c=l[d[h-1]][h-1],f?a(c):c;default:throw new RangeError("Matrix must be two dimensional (size: "+to(s)+")")}}})}),$a=po("inv",["typed","matrix","divideScalar","addScalar","multiply","unaryMinus","det","identity","abs"],e=>{var{typed:e,matrix:t,divideScalar:n,addScalar:r,multiply:i,unaryMinus:o,det:a,identity:s,abs:u}=e;return e("inv",{"Array | Matrix":function(e){var r=ri(e)?e.size():io(e);switch(r.length){case 1:if(1===r[0])return ri(e)?t([n(1,e.valueOf()[0])]):[n(1,e[0])];throw new RangeError("Matrix must be square (size: "+to(r)+")");case 2:var i=r[0],o=r[1];if(i===o)return ri(e)?t(c(e.valueOf(),i,o),e.storage()):c(e,i,o);throw new RangeError("Matrix must be square (size: "+to(r)+")");default:throw new RangeError("Matrix must be two dimensional (size: "+to(r)+")")}},any:function(e){return n(1,e)}});function c(e,t,c){var l,h,f;if(1===t){if(0===(d=e[0][0]))throw Error("Cannot calculate inverse, determinant is zero");return[[n(1,d)]]}if(2===t){var d=a(e);if(0===d)throw Error("Cannot calculate inverse, determinant is zero");return[[n(e[1][1],d),n(o(e[0][1]),d)],[n(o(e[1][0]),d),n(e[0][0],d)]]}var p=e.concat();for(b=0;b<t;b++)p[b]=p[b].concat();for(var m=s(t).valueOf(),g=0;g<c;g++){for(var A=u(p[g][g]),v=g,b=g+1;b<t;)u(p[b][g])>A&&(A=u(p[b][g]),v=b),b++;if(0===A)throw Error("Cannot calculate inverse, determinant is zero");(b=v)!==g&&(f=p[g],p[g]=p[b],p[b]=f,f=m[g],m[g]=m[b],m[b]=f);var y=p[g],w=m[g];for(b=0;b<t;b++){var x=p[b],C=m[b];if(b!==g){if(0!==x[g]){for(h=n(o(x[g]),y[g]),l=g;l<c;l++)x[l]=r(x[l],i(h,y[l]));for(l=0;l<c;l++)C[l]=r(C[l],i(h,w[l]))}}else{for(h=y[g],l=g;l<c;l++)x[l]=n(x[l],h);for(l=0;l<c;l++)C[l]=n(C[l],h)}}}return m}});n(304);var Qa=po("divide",["typed","matrix","multiply","equalScalar","divideScalar","inv"],e=>{var{typed:e,matrix:t,multiply:n,equalScalar:r,divideScalar:i,inv:o}=e,a=ma({typed:e,equalScalar:r}),s=va({typed:e});return e("divide",Ri({"Array | Matrix, Array | Matrix":function(e,t){return n(e,o(t))},"DenseMatrix, any":function(e,t){return s(e,t,i,!1)},"SparseMatrix, any":function(e,t){return a(e,t,i,!1)},"Array, any":function(e,n){return s(t(e),n,i,!1).valueOf()},"any, Array | Matrix":function(e,t){return n(e,o(t))}},i.signatures))}),Va=po("mean",["typed","add","divide"],e=>{var{typed:e,add:t,divide:n}=e;return e("mean",{"Array | Matrix":r,"Array | Matrix, number | BigNumber":function(e,r){try{var i=function(e,t,n){var r=Array.isArray(e)?io(e):e.size();if(t<0||t>=r.length)throw new ro(t,r.length);return ri(e)?e.create(Fo(e.valueOf(),t,n)):Fo(e,t,n)}(e,r,t),o=Array.isArray(e)?io(e):e.size();return n(i,o[r])}catch(e){throw ka(e,"mean")}},"...":function(e){if(Mo(e))throw new TypeError("Scalar values expected in function mean");return r(e)}});function r(e){var r,i=0;if(jo(e,(function(e){try{r=void 0===r?e:t(r,e),i++}catch(t){throw ka(t,"mean",e)}})),0===i)throw new Error("Cannot calculate the mean of an empty array");return n(r,i)}}),qa="unbiased",Ga=po("variance",["typed","add","subtract","multiply","divide","apply","isNaN"],e=>{var{typed:e,add:t,subtract:n,multiply:r,divide:i,apply:o,isNaN:a}=e;return e("variance",{"Array | Matrix":function(e){return s(e,qa)},"Array | Matrix, string":s,"Array | Matrix, number | BigNumber":function(e,t){return u(e,t,qa)},"Array | Matrix, number | BigNumber, string":u,"...":function(e){return s(e,qa)}});function s(e,o){var s=0;if(0===e.length)throw new SyntaxError("Function variance requires one or more parameters (0 provided)");if(jo(e,(function(e){try{c=void 0===c?e:t(c,e),s++}catch(t){throw ka(t,"variance",e)}})),0===s)throw new Error("Cannot calculate variance of an empty array");var u=i(c,s),c=void 0;if(jo(e,(function(e){e=n(e,u),c=void 0===c?r(e,e):t(c,r(e,e))})),a(c))return c;switch(o){case"uncorrected":return i(c,s);case"biased":return i(c,s+1);case"unbiased":var l=Xr(c)?c.mul(0):0;return 1===s?l:i(c,s-1);default:throw new Error('Unknown normalization "'+o+'". Choose "unbiased" (default), "uncorrected", or "biased".')}}function u(e,t,n){try{if(0===e.length)throw new SyntaxError("Function variance requires one or more parameters (0 provided)");return o(e,t,e=>s(e,n))}catch(e){throw ka(e,"variance")}}}),Wa=po("median",["typed","add","divide","compare","partitionSelect"],e=>{var{typed:e,add:t,divide:n,compare:r,partitionSelect:i}=e;function o(e){try{var t,n=(e=ho(e.valueOf())).length;if(0===n)throw new Error("Cannot calculate median of an empty array");if(n%2!=0)return t=i(e,(n-1)/2),a(t);for(var o=n/2-1,u=i(e,1+o),c=e[o],l=0;l<o;++l)0<r(e[l],c)&&(c=e[l]);return s(c,u)}catch(e){throw ka(e,"median")}}var a=e({"number | BigNumber | Complex | Unit":function(e){return e}}),s=e({"number | BigNumber | Complex | Unit, number | BigNumber | Complex | Unit":function(e,r){return n(t(e,r),2)}});return e("median",{"Array | Matrix":o,"Array | Matrix, number | BigNumber":function(e,t){throw new Error("median(A, dim) is not yet supported")},"...":function(e){if(Mo(e))throw new TypeError("Scalar values expected in function median");return o(e)}})}),Ka=po("std",["typed","map","sqrt","variance"],e=>{var{typed:e,map:t,sqrt:n,variance:r}=e;return e("std",{"Array | Matrix":i,"Array | Matrix, string":i,"Array | Matrix, number | BigNumber":i,"Array | Matrix, number | BigNumber, string":i,"...":function(e){return i(e)}});function i(e,i){if(0===e.length)throw new SyntaxError("Function std requires one or more parameters (0 provided)");try{var o=r.apply(null,arguments);return ii(o)?t(o,n):n(o)}catch(e){throw e instanceof TypeError&&-1!==e.message.indexOf(" variance")?new TypeError(e.message.replace(" variance"," std")):e}}}),Ya=(Ui=Ui({config:Hi}),Ae=Ae({}),zi=zi({}),Po=Po({typed:So=So({BigNumber:Ui,Complex:Ae,DenseMatrix:Eo=Eo({Matrix:ko=ko({})}),Fraction:zi})}),Ro=Ro({typed:So}),$o=$o({BigNumber:Ui,typed:So}),Qo=Qo({typed:So}),Wo=Wo({config:Hi,typed:So}),Ko=Ko({typed:So}),Yo=Yo({typed:So}),Zo=Zo({typed:So}),ta=ta({typed:So}),na=na({typed:So}),ra=ra({Matrix:ko,equalScalar:Wo,typed:So}),aa=aa({typed:So}),sa=sa({Complex:Ae,config:Hi,typed:So}),Ae=ca({typed:So}),ca=la({Fraction:zi,typed:So}),la=ha({typed:So}),ha=fa({DenseMatrix:Eo,Matrix:ko,SparseMatrix:ra,typed:So}),fa=Ca({bignumber:$o,fraction:ca,number:na}),ko=Ea({matrix:ha,config:Hi,typed:So}),Ca=_a({DenseMatrix:Eo,addScalar:Ro,equalScalar:Wo,matrix:ha,typed:So,unaryMinus:Ae}),$o=Ta({BigNumber:Ui,DenseMatrix:Eo,Fraction:zi,config:Hi,equalScalar:Wo,matrix:ha,typed:So}),ca=Ia({numeric:fa,typed:So}),ja({isNaN:aa,isNumeric:la,typed:So})),Xa=(na=Fa({compare:$o,isNaN:aa,isNumeric:la,typed:So}),Ea=Pa({DenseMatrix:Eo,SparseMatrix:ra,addScalar:Ro,equalScalar:Wo,matrix:ha,typed:So}),_a=La({addScalar:Ro,conj:Qo,multiplyScalar:ta,size:ko,typed:So}),Ta=Ua({BigNumber:Ui,DenseMatrix:Eo,SparseMatrix:ra,config:Hi,matrix:ha,typed:So}),Va({add:Ea,divide:fa=Qa({divideScalar:ca,equalScalar:Wo,inv:Ia=$a({abs:Po,addScalar:Ro,det:Ha({divideScalar:ca,isZero:Yo,matrix:ha,multiply:zi=za({addScalar:Ro,dot:_a,equalScalar:Wo,matrix:ha,multiplyScalar:ta,typed:So}),subtract:Ca,typed:So,unaryMinus:Ae}),divideScalar:ca,identity:Ta,matrix:ha,multiply:zi,typed:So,unaryMinus:Ae}),matrix:ha,multiply:zi,typed:So}),typed:So})),Ja=Ga({add:Ea,apply:ia({isInteger:Ko,typed:So}),divide:fa,isNaN:aa,multiply:zi,subtract:Ca,typed:So}),Za=Wa({add:Ea,compare:$o,divide:fa,partitionSelect:na,typed:So}),es=Ka({map:Zo,sqrt:sa,typed:So,variance:Ja});var ts=function(e){var t=e.dfList;if(1!==(e=e.axis))return function(e){for(var t={},n=0,r=0;r<e.length;r++)!function(r){var i,o,a=e[r],s=a.columns,u=a instanceof ms?a.getColumnData:[a.values];if(0===r)for(var c=0;c<s.length;c++){var l=s[c],h=u[c];t[l]=h}else{var f=Object.keys(t).filter((function(e){return!s.includes(e)}));for(c=0;c<s.length;c++)l=s[c],h=u[c],Object.keys(t).includes(l)?(i=t[l]).push.apply(i,h):((p=new Array(n).fill(NaN)).push.apply(p,h),t[l]=p);if(0<f.length){var d=u[0].length;for(c=0;c<f.length;c++){l=f[c];var p=new Array(d).fill(NaN);(o=t[l]).push.apply(o,p)}}}n+=u[0].length}(r);return 1===Object.keys(t).length?new Fs(Object.values(t)[0]):new ms(t)}(t);for(var n=t,r={},i={},o=0,a=0;a<n.length;a++)for(var s=n[a],u=s instanceof ms?s.getColumnData:[s.values],c=s.columns,l=0;l<c.length;l++){var h=c[l],f=u[l];f.length>o&&(o=f.length),h in r?(i[h]+=1,h+=i[h],r[h]=f):(r[h]=f,i[h]=0)}return Object.keys(r).forEach((function(e){var t=r[e].length;t<o&&(t=new Array(o-t).fill(NaN),(e=r[e]).push.apply(e,t))})),new ms(r)},ns=function(){return(ns=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},rs=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||((r=r||Array.prototype.slice.call(t,0,i))[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))};function is(e,t,n,r,i){this.colDict={},this.keyToValue={},this.keyCol=e,this.data=t,this.columnName=n,this.colDtype=r,this.colIndex=i}is.prototype.group=function(){var e=this,t={},n=null==(n=this.data)?void 0:n.reduce((function(n,r){var i=[];for(u in e.colIndex){var o=e.colIndex[u];i.push(r[o])}var a=i.join("-");if(t[a]||(t[a]=i),n[a]){var s=n[a];for(u in e.columnName)s[c=e.columnName[u]].push(r[u])}else for(var u in n[a]={},e.columnName){var c=e.columnName[u];n[a][c]=[r[u]]}return n}),{});return this.colDict=n,this.keyToValue=t,this},is.prototype.col=function(e){for(var t=this,n=(void 0===e&&(e=this.columnName.filter((function(e,n){return!t.colIndex.includes(n)}))),this),r=(e.forEach((function(e){if(!n.columnName.includes(e))throw new Error("Column "+e+" does not exist in groups")})),ns({},this.colDict)),i=0,o=Object.entries(r);i<o.length;i++){var a,s=(u=o[i])[0],u=u[1],c={},l=ns({},u);for(a in e){var h=e[a];c[h]=l[h]}r[s]=c}var f=new is(this.keyCol,null,this.columnName,this.colDtype,this.colIndex);return f.colDict=r,f.groupColNames=e,f.keyToValue=this.keyToValue,f},is.prototype.arithemetic=function(e){var t=["mean","sum","count","mode","std","var","cumsum","cumprod","cummax","cummin","median","min","max"];if("string"==typeof e){if(!t.includes(e))throw new Error("group operation: "+e+" is not valid")}else Object.keys(e).forEach((function(n){var r=e[n];if(Array.isArray(r))for(var i=0,o=r;i<o.length;i++){var a=o[i];if(!t.includes(a))throw new Error("group operation: "+a+" for column "+n+" is not valid")}else if(!t.includes(r))throw new Error("group operation: "+r+" for column "+n+" is not valid")}));for(var n=ns({},this.colDict),r=0,i=Object.entries(n);r<i.length;r++){for(var o=(a=i[r])[0],a=a[1],s={},u=ns({},a),c=this.groupColNames,l=0;l<c.length;l++){var h=c[l],f=this.columnName.indexOf(h),d=(f=this.colDtype[f],"string"==typeof e?e:e[h]);if("string"===f&&"count"!==d)throw new Error("Can't perform math operation on column "+h);if("string"==typeof e)s[h+"_"+e]=this.groupMathLog(u[h],e);else if(Array.isArray(e[h]))for(var p,m=0,g=e[h];m<g.length;m++)s[h+"_"+(p=g[m])]=this.groupMathLog(u[h],p);else s[h+"_"+(p=e[h])]=this.groupMathLog(u[h],p)}n[o]=s}return n},is.prototype.groupMathLog=function(e,t){var n=[];switch(t){case"max":var r=e.reduce((function(e,t){return t<e?e:t}));n.push(r);break;case"min":r=e.reduce((function(e,t){return e<t?e:t})),n.push(r);break;case"sum":r=e.reduce((function(e,t){return e+t})),n.push(r);break;case"count":n.push(e.length);break;case"mean":r=e.reduce((function(e,t){return e+t})),n.push(r/e.length);break;case"std":n.push(es(e));break;case"var":n.push(Ja(e));break;case"median":n.push(Za(e));break;case"mode":n.push(Ya(e));break;case"cumsum":e.reduce((function(e,t){return e+=t,n.push(e),e}),0);break;case"cummin":n=[e[0]],e.slice(1).reduce((function(e,t){return e<t?(n.push(e),e):(n.push(t),t)}),n[0]);break;case"cummax":n=[e[0]],e.slice(1).reduce((function(e,t){return t<e?(n.push(e),e):(n.push(t),t)}),n[0]);break;case"cumprod":e.reduce((function(e,t){return e*=t,n.push(e),e}),1)}return n},is.prototype.toDataFrame=function(e){for(var t={},n=0,r=this.colKeyDict(e);n<r.length;n++){var i,o=r[n],a=e[o],s={},u=Object.values(a)[0].length;for(i in this.keyCol){var c=this.keyCol[i],l=this.keyToValue[o][i];s[c]=Array(u).fill(l)}var h=ns(ns({},s),a);if(Object.keys(t).length<1)t=h;else for(var f=0,d=Object.keys(t);f<d.length;f++){var p=d[f],m=h[p];t[p]=rs(rs([],t[p],!0),m,!0)}}return new ms(t)},is.prototype.operations=function(e){var t;return this.groupColNames?(t=this.arithemetic(e),this.toDataFrame(t)):(e=(t=this.col(void 0)).arithemetic(e),t.toDataFrame(e))},is.prototype.count=function(){return this.operations("count")},is.prototype.sum=function(){return this.operations("sum")},is.prototype.std=function(){return this.operations("std")},is.prototype.var=function(){return this.operations("var")},is.prototype.mean=function(){return this.operations("mean")},is.prototype.cumSum=function(){return this.operations("cumsum")},is.prototype.cumMax=function(){return this.operations("cummax")},is.prototype.cumProd=function(){return this.operations("cumprod")},is.prototype.cumMin=function(){return this.operations("cummin")},is.prototype.max=function(){return this.operations("max")},is.prototype.min=function(){return this.operations("min")},is.prototype.getGroup=function(e){var t={};return t[e=e.join("-")]=ns({},this.colDict[e]),this.toDataFrame(t)},is.prototype.agg=function(e){var t=Object.keys(e);e=(t=this.col(t)).arithemetic(e);return t.toDataFrame(e)},is.prototype.apply=function(e){for(var t={},n=0,r=this.colKeyDict(this.colDict);n<r.length;n++){var i=r[n],o=new ms(this.colDict[i]);t[i]=e(o)}return this.concatGroups(t)},is.prototype.concatGroups=function(e){for(var t=[],n=0,r=Object.entries(e);n<r.length;n++){var i,o,a=(o=r[n])[0],s=void 0,u=(s=(o=o[1])instanceof ms?o.copy():(i=1<(i=o.index).length?i:["applyOps"],new ms([o.values],{columns:i}))).shape[0],c=void 0;for(c in this.keyCol){var l=this.keyCol[c],h=this.keyToValue[a][c],f=(h=Array(u).fill(h),parseInt(c));this.groupColNames?s.addColumn(l,h,{inplace:!0,atIndex:f}):s.addColumn(l+"_Group",h,{inplace:!0,atIndex:f})}t.push(s)}return ts({dfList:t,axis:0})},Object.defineProperty(is.prototype,"ngroups",{get:function(){return Object.keys(this.colDict).length},enumerable:!1,configurable:!0}),Object.defineProperty(is.prototype,"groups",{get:function(){return this.colDict},enumerable:!1,configurable:!0}),is.prototype.first=function(){return this.apply((function(e){return e.head(1)}))},is.prototype.last=function(){return this.apply((function(e){return e.tail(1)}))},is.prototype.size=function(){return this.apply((function(e){return new Fs([e.shape[0]])}))},is.prototype.colKeyDict=function(e){for(var t={},n=0,r=Object.keys(e);n<r.length;n++){var i=(u=r[n]).split("-")[0];i in t?t[i].push(u):t[i]=[u]}for(var o=[],a=0,s=Object.keys(t);a<s.length;a++){var u=s[a];o.push.apply(o,t[u])}return o};var os=is,as=new Bt;
/**
*  @license
* Copyright 2022 JsData. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.

* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ==========================================================================
*/function ss(e){var t,n,r=e.ndFrame,i=e.rows,o=e.columns,a=r.values,s=r.index;if(void 0!==(i=i instanceof Fs?i.values:i)&&!Array.isArray(i))throw new Error('rows parameter must be an Array. For example: rows: [1,2] or rows: ["0:10"]');if(void 0!==o&&!Array.isArray(o))throw new Error('columns parameter must be an Array. For example: columns: [1,2] or columns: ["0:10"]');if(i)if(1==i.length&&"string"==typeof i[0]){if(2!=(e=i[0].split(":")).length)throw new Error('Invalid row split parameter: If using row split string, it must be of the form; rows: ["start:end"]');if(isNaN(parseInt(e[0]))&&""!=e[0])throw new Error("Invalid row split parameter. Split parameter must be a number");if(isNaN(parseInt(e[1]))&&""!=e[1])throw new Error("Invalid row split parameter. Split parameter must be a number");var u=""==e[0]?0:parseInt(e[0]),c=""==e[1]?r.shape[0]:parseInt(e[1]);if(u<0)throw new Error("row slice [start] index cannot be less than 0");if(c>r.shape[0])throw new Error("row slice [end] index cannot be bigger than "+r.shape[0]);t=as.range(u,c-1)}else{for(var l=[],h=0;h<i.length;h++){if((f=i[h])>r.shape[0])throw new Error("Invalid row parameter: Specified index "+f+" cannot be bigger than index length "+r.shape[0]);if("number"!=typeof f&&"boolean"!=typeof f)throw new Error("Invalid row parameter: row index "+f+" must be a number or boolean");"boolean"==typeof f&&!0===f&&l.push(s[h]),"number"==typeof f&&l.push(f)}t=l}else t=as.range(0,r.shape[0]-1);if(o)if(1==o.length&&"string"==typeof o[0]){if(2!=(e=o[0].split(":")).length)throw new Error('Invalid column split parameter: If using column split string, it must be of the form; columns: ["start:end"]');if(isNaN(parseInt(e[0]))&&""!=e[0])throw new Error("Invalid column split parameter. Split parameter must be a number");if(isNaN(parseInt(e[1]))&&""!=e[1])throw new Error("Invalid column split parameter. Split parameter must be a number");if(u=""==e[0]?0:parseInt(e[0]),c=""==e[1]?r.shape[1]:parseInt(e[1]),u<0)throw new Error("column slice [start] index cannot be less than 0");if(c>r.shape[1])throw new Error("column slice [end] index cannot be bigger than "+r.shape[1]);n=as.range(u,c-1)}else{var f;for(h=0;h<o.length;h++){if((f=o[h])>r.shape[1])throw new Error("Invalid column parameter: Specified index "+f+" cannot be bigger than index length "+r.shape[1]);if("number"!=typeof f)throw new Error("Invalid column parameter: column index "+f+" must be a number")}n=o}else n=as.range(0,r.shape[1]-1);if(r instanceof Fs){var d=[],p=[];for(h=0;h<t.length;h++){var m=t[h];d.push(a[m]),p.push(s[m])}return new Fs(d,{index:p,columns:r.columns,dtypes:r.dtypes,config:r.config})}d=[],p=[];var g=[],A=[];for(h=0;h<t.length;h++){for(var v=a[m=t[h]],b=[],y=0;y<n.length;y++){var w=n[y];b.push(v[w])}d.push(b),p.push(s[m])}for(h=0;h<n.length;h++)w=n[h],g.push(r.columns[w]),A.push(r.dtypes[w]);return new ms(d,{index:p,columns:g,dtypes:A,config:r.config})}function us(e){var t,n,r=e.ndFrame,i=e.rows,o=e.columns,a=r.values,s=r.index;if(void 0!==(i=i instanceof Fs?i.values:i)&&!Array.isArray(i))throw new Error('rows parameter must be an Array. For example: rows: [1,2] or rows: ["0:10"]');if(void 0!==o&&!Array.isArray(o))throw new Error('columns parameter must be an Array. For example: columns: ["a","b"] or columns: ["a:c"]');if(i)if(1==i.length&&"string"==typeof i[0])if(-1===i[0].indexOf(":")){if(e=void 0,-1===(e=i[0].startsWith('"')||i[0].startsWith("'")||i[0].startsWith("`")?s.indexOf(i[0].replace(/['"`]/g,"")):s.indexOf(Number(i[0]))))throw new Error("IndexError: Specified index ("+i[0]+") not found");t=[e]}else{if(2!=(e=i[0].split(":")).length)throw new Error('Invalid row split parameter: If using row split string, it must be of the form; rows: ["start:end"]');var u=void 0,c=void 0;if(u=""===e[0]?s.indexOf(s[0]):e[0].startsWith('"')||e[0].startsWith("'")||e[0].startsWith("`")?s.indexOf(e[0].replace(/['"`]/g,"")):s.indexOf(Number(e[0])),c=""===e[1]?s.indexOf(s[s.length-1])+1:e[0].startsWith('"')||e[0].startsWith("'")||e[0].startsWith("`")?s.indexOf(e[1].replace(/['"`]/g,"")):s.indexOf(Number(e[1])),-1===u)throw new Error("IndexError: Specified start index not found");if(-1===c)throw new Error("IndexError: Specified end index not found");t=s.slice(u,c).map((function(e){return s.indexOf(e)}))}else{for(var l=[],h=0;h<i.length;h++){var f="boolean"==typeof i[h];if(f&&i[h]&&l.push(s.indexOf(s[h])),!f){if(-1===(f=s.indexOf(i[h])))throw new Error("IndexError: Specified index ("+i[h]+") not found");l.push(f)}}t=l}else t=s.map((function(e){return s.indexOf(e)}));var d=r.columns;if(o)if(1==o.length){if("string"!=typeof o[0])throw new Error('ColumnIndexError: columns parameter must be an array of a string name. For example: columns: ["b"]');if(-1==o[0].indexOf(":"))n=[d.indexOf(o[0])];else{if(2!=(e=o[0].split(":")).length)throw new Error('ColumnIndexError: Invalid row split parameter. If using row split string, it must be of the form; rows: ["start:end"]');if(u=""==e[0]?d.indexOf(d[0]):d.indexOf(e[0]),c=""==e[1]?d.indexOf(d[d.length-1]):d.indexOf(e[1]),-1===u)throw new Error("ColumnIndexError: Specified start index not found");if(-1===c)throw new Error("ColumnIndexError: Specified end index not found");(n=d.slice(u,c+1).map((function(e){return d.indexOf(e)}))).pop()}}else{for(h=0;h<o.length;h++)if(-1===d.indexOf(o[h]))throw new Error("ColumnIndexError: Specified column ("+o[h]+") not found");n=o.map((function(e){return d.indexOf(e)}))}else n=d.map((function(e){return d.indexOf(e)}));if(r instanceof Fs){var p=[],m=[];for(h=0;h<t.length;h++){var g=t[h];p.push(a[g]),m.push(s[g])}return new Fs(p,{index:m,columns:r.columns,dtypes:r.dtypes,config:r.config})}p=[],m=[];var A=[],v=[];for(h=0;h<t.length;h++){for(var b=a[g=t[h]],y=[],w=0;w<n.length;w++){var x=n[w];y.push(b[x])}p.push(y),m.push(s[g])}for(h=0;h<n.length;h++)x=n[h],A.push(r.columns[x]),v.push(r.dtypes[x]);return new ms(p,{index:m,columns:A,dtypes:v,config:r.config})}cs=function(e,t){return(cs=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};ja=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}cs(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)};var cs,ls,hs=function(){return(hs=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},fs=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||((r=r||Array.prototype.slice.call(t,0,i))[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},ds=new Bt;function ps(e,t){var n=this,r=(t=void 0===t?{}:t).index,i=t.columns,o=t.dtypes;t=t.config;return(n=ls.call(this,{data:e,index:r,columns:i,dtypes:o,config:t,isSeries:!1})||this).$setInternalColumnDataProperty(),n}ja(ps,ls=Zn),ps.prototype.$setInternalColumnDataProperty=function(e){var t=this;if(e&&"string"==typeof e)Object.defineProperty(t,e,{get:function(){return t.$getColumnData(e)},set:function(n){t.$setColumnData(e,n)}});else for(var n=this.columns,r=this,i=0;i<n.length;i++)!function(e){var i=n[e];Object.defineProperty(r,i,{get:function(){return t.$getColumnData(i)},set:function(e){t.$setColumnData(i,e)}})}(i)},ps.prototype.$getColumnData=function(e,t){void 0===t&&(t=!0);var n=this.columns.indexOf(e),r=(-1==n&&Lr.throwColumnNotFoundError(this),[this.$dtypes[n]]),i=fs([],this.$index,!0),o=(e=[e],hs({},this.$config));if(this.$config.isLowMemoryMode)for(var a=[],s=0;s<this.values.length;s++){var u=this.values[s];a.push(u[n])}else a=this.$dataIncolumnFormat[n];return t?new Fs(a,{dtypes:r,index:i,columns:e,config:o}):a},ps.prototype.$setColumnData=function(e,t){var n,r=this.$columns.indexOf(e);if(-1==r)throw new Error("ParamError: column "+e+" not found in "+this.$columns+". If you need to add a new column, use the df.addColumn method. ");if(t instanceof Fs)n=t.values;else{if(!Array.isArray(t))throw new Error("ParamError: specified value not supported. It must either be an Array or a Series of the same length");n=t}if(n.length!==this.shape[0]&&Lr.throwColumnLengthError(this,n.length),this.$config.isLowMemoryMode)for(var i=0;i<this.$data.length;i++)this.$data[i][r]=n[i];else{for(i=0;i<this.values.length;i++)this.$data[i][r]=n[i];this.$dataIncolumnFormat[r]=t}this.$dtypes[r]=ds.inferDtype(n)[0]},ps.prototype.$getDataByAxisWithMissingValuesRemoved=function(e){for(var t=this.$getDataArraysByAxis(e),n=[],r=0;r<t.length;r++){var i=t[r];n.push(ds.removeMissingValuesFromArray(i))}return n},ps.prototype.$getDataArraysByAxis=function(e){return 1===e?this.values:this.config.isLowMemoryMode?ds.transposeArray(this.values):this.$dataIncolumnFormat},ps.prototype.$frameIsNotCompactibleForArithmeticOperation=function(){return this.dtypes.some((function(e){return"string"==e}))},ps.prototype.$getTensorsForArithmeticOperationByAxis=function(e,t){if("number"==typeof e)return[this.tensor,Vr.scalar(e)];if(e instanceof ps)return[this.tensor,e.tensor];if(e instanceof Fs)return 0===t?[this.tensor,Vr.tensor2d(e.values,[e.shape[0],1])]:[this.tensor,Vr.tensor2d(e.values,[e.shape[0],1]).transpose()];if(Array.isArray(e))return 0===t?[this.tensor,Vr.tensor2d(e,[e.length,1])]:[this.tensor,Vr.tensor2d(e,[e.length,1]).transpose()];throw new Error("ParamError: Invalid type for other parameter. other must be one of Series, DataFrame or number.")},ps.prototype.$getColumnDtype=function(e){var t=this.columns.indexOf(e);if(-1===t)throw Error('ColumnNameError: Column "'+e+'" does not exist');return this.dtypes[t]},ps.prototype.$logicalOps=function(e,t){var n=[];switch(t){case"gt":n=e[0].greater(e[1]).arraySync();break;case"lt":n=e[0].less(e[1]).arraySync();break;case"ge":n=e[0].greaterEqual(e[1]).arraySync();break;case"le":n=e[0].lessEqual(e[1]).arraySync();break;case"eq":n=e[0].equal(e[1]).arraySync();break;case"ne":n=e[0].notEqual(e[1]).arraySync()}return new ps(ds.mapIntegersToBooleans(n,2),{index:fs([],this.index,!0),columns:fs([],this.columns,!0),dtypes:fs([],this.dtypes,!0),config:hs({},this.config)})},ps.prototype.$MathOps=function(e,t,n){var r;switch(t){case"add":r=e[0].add(e[1]);break;case"sub":r=e[0].sub(e[1]);break;case"pow":r=e[0].pow(e[1]);break;case"div":r=e[0].div(e[1]);break;case"divNoNan":r=e[0].divNoNan(e[1]);break;case"mul":r=e[0].mul(e[1]);break;case"mod":r=e[0].mod(e[1])}if(!n)return new ps(r,{index:fs([],this.index,!0),columns:fs([],this.columns,!0),dtypes:fs([],this.dtypes,!0),config:hs({},this.config)});t=null==r?void 0:r.arraySync(),this.$setValues(t)},ps.prototype.iloc=function(e){return ss({ndFrame:this,rows:e.rows,columns:e.columns})},ps.prototype.loc=function(e){return us({ndFrame:this,rows:e.rows,columns:e.columns})},ps.prototype.toString=function(){var e=this.config.getMaxRow,t=this.config.getTableMaxColInConsole,n=[],r=this.columns.length,i=[];if(t<r){t=this.columns.slice(0,4);for(var o,a=this.columns.slice(r-3),s=(i=fs(fs(fs([""],t,!0),["..."],!1),a,!0),void 0),u=void 0,c=(t=this.values.length>e?(o=this.iloc({rows:["0:"+e],columns:["0:4"]}),this.iloc({rows:["0:"+e],columns:[r-3+":"]})):(o=this.iloc({columns:["0:4"]}),this.iloc({columns:[r-3+":"]})),s=this.index.slice(0,e),u=o.values,t.values),l=0;l<s.length;l++){var h=s[l],f=fs(fs(fs([h],u[l],!0),["..."],!1),c[l],!0);n.push(f)}}else{i=fs([""],this.columns,!0);s=void 0;var d=void 0;for(this.values.length>e?(s=(a=this.iloc({rows:["0:"+e]})).index,d=a.values):(d=this.values,s=this.index),l=0;l<s.length;l++)h=s[l],f=fs([h],d[l],!0),n.push(f)}for(var p={0:{width:10}},m=1;m<i.length;m++)p[m]={width:17,truncate:16};return fs([i],n,!0).toString()},ps.prototype.head=function(e){if((e=void 0===e?5:e)<=0)throw new Error("ParamError: Number of rows cannot be less than 1");if(this.shape[0]<=e)return this.copy();if(this.shape[0]-e<0)throw new Error("ParamError: Number of rows cannot be greater than available rows in data");return this.iloc({rows:["0:"+e]})},ps.prototype.tail=function(e){if((e=void 0===e?5:e)<=0)throw new Error("ParamError: Number of rows cannot be less than 1");if(this.shape[0]<=e)return this.copy();if(this.shape[0]-e<0)throw new Error("ParamError: Number of rows cannot be greater than available rows in data");return e=this.shape[0]-e,this.iloc({rows:[e+":"]})},ps.prototype.sample=function(e,t){return void 0===e&&(e=5),function(e,t,n,r){return new(n=n||Promise)((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}(this,void 0,void 0,(function(){var n;return function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a={next:s(0),throw:s(1),return:s(2)};return"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){var u=[a,s];if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&u[0]?r.return:u[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,u[1])).done)return i;switch(r=0,(u=i?[2&u[0],i.value]:u)[0]){case 0:case 1:i=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,r=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(!(i=0<(i=o.trys).length&&i[i.length-1])&&(6===u[0]||2===u[0])){o=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3]))o.label=u[1];else if(6===u[0]&&o.label<i[1])o.label=i[1],i=u;else{if(!(i&&o.label<i[2])){i[2]&&o.ops.pop(),o.trys.pop();continue}o.label=i[2],o.ops.push(u)}}u=t.call(e,o)}catch(s){u=[6,s],r=0}finally{n=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}(this,(function(r){switch(r.label){case 0:if(n=hs({seed:1},t).seed,e>this.shape[0])throw new Error("ParamError: Sample size cannot be bigger than number of rows");if(e<=0)throw new Error("ParamError: Sample size cannot be less than 1");return[4,Vr.data.array(this.index).shuffle(e,""+n).take(e).toArray()];case 1:return n=r.sent(),[2,this.iloc({rows:n})]}}))}))},ps.prototype.add=function(e,t){var n=(t=hs({inplace:!1,axis:1},t)).inplace;t=t.axis;if(this.$frameIsNotCompactibleForArithmeticOperation())throw Error("TypeError: add operation is not supported for string dtypes");if(-1===[0,1].indexOf(t))throw Error("ParamError: Axis must be 0 or 1");return e=this.$getTensorsForArithmeticOperationByAxis(e,t),this.$MathOps(e,"add",n)},ps.prototype.sub=function(e,t){var n=(t=hs({inplace:!1,axis:1},t)).inplace;t=t.axis;if(this.$frameIsNotCompactibleForArithmeticOperation())throw Error("TypeError: sub operation is not supported for string dtypes");if(-1===[0,1].indexOf(t))throw Error("ParamError: Axis must be 0 or 1");return e=this.$getTensorsForArithmeticOperationByAxis(e,t),this.$MathOps(e,"sub",n)},ps.prototype.mul=function(e,t){var n=(t=hs({inplace:!1,axis:1},t)).inplace;t=t.axis;if(this.$frameIsNotCompactibleForArithmeticOperation())throw Error("TypeError: mul operation is not supported for string dtypes");if(-1===[0,1].indexOf(t))throw Error("ParamError: Axis must be 0 or 1");return e=this.$getTensorsForArithmeticOperationByAxis(e,t),this.$MathOps(e,"mul",n)},ps.prototype.div=function(e,t){var n=(t=hs({inplace:!1,axis:1},t)).inplace;t=t.axis;if(this.$frameIsNotCompactibleForArithmeticOperation())throw Error("TypeError: div operation is not supported for string dtypes");if(-1===[0,1].indexOf(t))throw Error("ParamError: Axis must be 0 or 1");return e=this.$getTensorsForArithmeticOperationByAxis(e,t),this.$MathOps(e,"div",n)},ps.prototype.divNoNan=function(e,t){var n=(t=hs({inplace:!1,axis:1},t)).inplace;t=t.axis;if(this.$frameIsNotCompactibleForArithmeticOperation())throw Error("TypeError: div operation is not supported for string dtypes");if(-1===[0,1].indexOf(t))throw Error("ParamError: Axis must be 0 or 1");return e=this.$getTensorsForArithmeticOperationByAxis(e,t),this.$MathOps(e,"divNoNan",n)},ps.prototype.pow=function(e,t){var n=(t=hs({inplace:!1,axis:1},t)).inplace;t=t.axis;if(this.$frameIsNotCompactibleForArithmeticOperation())throw Error("TypeError: pow operation is not supported for string dtypes");if(-1===[0,1].indexOf(t))throw Error("ParamError: Axis must be 0 or 1");return e=this.$getTensorsForArithmeticOperationByAxis(e,t),this.$MathOps(e,"pow",n)},ps.prototype.mod=function(e,t){var n=(t=hs({inplace:!1,axis:1},t)).inplace;t=t.axis;if(this.$frameIsNotCompactibleForArithmeticOperation())throw Error("TypeError: mod operation is not supported for string dtypes");if(-1===[0,1].indexOf(t))throw Error("ParamError: Axis must be 0 or 1");return e=this.$getTensorsForArithmeticOperationByAxis(e,t),this.$MathOps(e,"mod",n)},ps.prototype.mean=function(e){if(e=hs({axis:1},e).axis,this.$frameIsNotCompactibleForArithmeticOperation())throw Error("TypeError: mean operation is not supported for string dtypes");if(-1===[0,1].indexOf(e))throw Error("ParamError: Axis must be 0 or 1");var t=this.$getDataByAxisWithMissingValuesRemoved(e).map((function(e){return e.reduce((function(e,t){return e+t}),0)/e.length}));return new Fs(t,0===e?{index:this.columns}:{index:this.index})},ps.prototype.median=function(e){if(e=hs({axis:1},e).axis,this.$frameIsNotCompactibleForArithmeticOperation())throw Error("TypeError: median operation is not supported for string dtypes");if(-1===[0,1].indexOf(e))throw Error("ParamError: Axis must be 0 or 1");var t=this.$getDataByAxisWithMissingValuesRemoved(e).map((function(e){return Za(e)}));return new Fs(t,0===e?{index:this.columns}:{index:this.index})},ps.prototype.mode=function(e){var t=(e=hs({axis:1,keep:0},e)).axis,n=e.keep;if(this.$frameIsNotCompactibleForArithmeticOperation())throw Error("TypeError: mode operation is not supported for string dtypes");if(-1===[0,1].indexOf(t))throw Error("ParamError: Axis must be 0 or 1");return e=this.$getDataByAxisWithMissingValuesRemoved(t).map((function(e){return 1===(e=Ya(e)).length?e[0]:e[n]})),new Fs(e,0===t?{index:this.columns}:{index:this.index})},ps.prototype.min=function(e){if(e=hs({axis:1},e).axis,this.$frameIsNotCompactibleForArithmeticOperation())throw Error("TypeError: min operation is not supported for string dtypes");if(-1===[0,1].indexOf(e))throw Error("ParamError: Axis must be 0 or 1");var t=this.$getDataByAxisWithMissingValuesRemoved(e).map((function(e){for(var t=e[0],n=0;n<e.length;n++)t=t<e[n]?t:e[n];return t}));return new Fs(t,0===e?{index:this.columns}:{index:this.index})},ps.prototype.max=function(e){if(e=hs({axis:1},e).axis,this.$frameIsNotCompactibleForArithmeticOperation())throw Error("TypeError: max operation is not supported for string dtypes");if(-1===[0,1].indexOf(e))throw Error("ParamError: Axis must be 0 or 1");var t=this.$getDataByAxisWithMissingValuesRemoved(e).map((function(e){for(var t=e[0],n=0;n<e.length;n++)t=t>e[n]?t:e[n];return t}));return new Fs(t,0===e?{index:this.columns}:{index:this.index})},ps.prototype.std=function(e){if(e=hs({axis:1},e).axis,this.$frameIsNotCompactibleForArithmeticOperation())throw Error("TypeError: std operation is not supported for string dtypes");if(-1===[0,1].indexOf(e))throw Error("ParamError: Axis must be 0 or 1");var t=this.$getDataByAxisWithMissingValuesRemoved(e).map((function(e){return es(e)}));return new Fs(t,0===e?{index:this.columns}:{index:this.index})},ps.prototype.var=function(e){if(e=hs({axis:1},e).axis,this.$frameIsNotCompactibleForArithmeticOperation())throw Error("TypeError: var operation is not supported for string dtypes");if(-1===[0,1].indexOf(e))throw Error("ParamError: Axis must be 0 or 1");var t=this.$getDataByAxisWithMissingValuesRemoved(e).map((function(e){return Ja(e)}));return new Fs(t,0===e?{index:this.columns}:{index:this.index})},ps.prototype.lt=function(e,t){if(t=hs({axis:1},t).axis,this.$frameIsNotCompactibleForArithmeticOperation())throw Error("TypeError: lt operation is not supported for string dtypes");if(-1===[0,1].indexOf(t))throw Error("ParamError: Axis must be 0 or 1");return e=this.$getTensorsForArithmeticOperationByAxis(e,t),this.$logicalOps(e,"lt")},ps.prototype.gt=function(e,t){if(t=hs({axis:1},t).axis,this.$frameIsNotCompactibleForArithmeticOperation())throw Error("TypeError: gt operation is not supported for string dtypes");if(-1===[0,1].indexOf(t))throw Error("ParamError: Axis must be 0 or 1");return e=this.$getTensorsForArithmeticOperationByAxis(e,t),this.$logicalOps(e,"gt")},ps.prototype.eq=function(e,t){if(t=hs({axis:1},t).axis,this.$frameIsNotCompactibleForArithmeticOperation())throw Error("TypeError: eq operation is not supported for string dtypes");if(-1===[0,1].indexOf(t))throw Error("ParamError: Axis must be 0 or 1");return e=this.$getTensorsForArithmeticOperationByAxis(e,t),this.$logicalOps(e,"eq")},ps.prototype.ne=function(e,t){if(t=hs({axis:1},t).axis,this.$frameIsNotCompactibleForArithmeticOperation())throw Error("TypeError: ne operation is not supported for string dtypes");if(-1===[0,1].indexOf(t))throw Error("ParamError: Axis must be 0 or 1");return e=this.$getTensorsForArithmeticOperationByAxis(e,t),this.$logicalOps(e,"ne")},ps.prototype.le=function(e,t){if(t=hs({axis:1},t).axis,this.$frameIsNotCompactibleForArithmeticOperation())throw Error("TypeError: le operation is not supported for string dtypes");if(-1===[0,1].indexOf(t))throw Error("ParamError: Axis must be 0 or 1");return e=this.$getTensorsForArithmeticOperationByAxis(e,t),this.$logicalOps(e,"le")},ps.prototype.ge=function(e,t){if(t=hs({axis:1},t).axis,this.$frameIsNotCompactibleForArithmeticOperation())throw Error("TypeError: ge operation is not supported for string dtypes");if(-1===[0,1].indexOf(t))throw Error("ParamError: Axis must be 0 or 1");return e=this.$getTensorsForArithmeticOperationByAxis(e,t),this.$logicalOps(e,"ge")},ps.prototype.count=function(e){if(e=hs({axis:1},e).axis,-1===[0,1].indexOf(e))throw Error("ParamError: Axis must be 0 or 1");var t=this.$getDataByAxisWithMissingValuesRemoved(e).map((function(e){return e.length}));return new Fs(t,0===e?{index:this.columns}:{index:this.index})},ps.prototype.sum=function(e){if(e=hs({axis:1},e).axis,-1===[0,1].indexOf(e))throw Error("ParamError: Axis must be 0 or 1");var t=this.$getDataByAxisWithMissingValuesRemoved(e).map((function(e){return e.reduce((function(e,t){return Number(e)+Number(t)}),0)}));return new Fs(t,0===e?{index:fs([],this.columns,!0)}:{index:fs([],this.index,!0)})},ps.prototype.pctChange=function(e,t){var n=(t=hs({inplace:!1,axis:1},t)).inplace;t=t.axis;if(this.$frameIsNotCompactibleForArithmeticOperation())throw Error("TypeError: pctChange operation is not supported for string dtypes");if(-1===[0,1].indexOf(t))throw Error("ParamError: Axis must be 0 or 1");if(0===e)return this;if("number"!=typeof e)return e instanceof ps||e instanceof Fs?(r=this.$getTensorsForArithmeticOperationByAxis(e,t),this.$MathOps(r,"divNoNan",n).sub(1)):void 0;var r=this.copy(),i=(r=(r=0===t?r.T:r).tensor.clone(),new Array(r.shape[r.rank-1]).fill(NaN)),o=r.arraySync();if(0<e)for(var a=0;a<e;a++)o.unshift(i),o.pop();else if(e<0)for(a=0;e<a;a--)o.push(i),o.shift();var s=Vr.tensor2d(o,r.shape);r=this.$MathOps([r,s],"divNoNan",n).sub(1);return 0===t?r.T:r},ps.prototype.diff=function(e,t){var n=(t=hs({inplace:!1,axis:1},t)).inplace;t=t.axis;if(this.$frameIsNotCompactibleForArithmeticOperation())throw Error("TypeError: diff operation is not supported for string dtypes");if(-1===[0,1].indexOf(t))throw Error("ParamError: Axis must be 0 or 1");if(0===e)return this;if("number"!=typeof e)return e instanceof ps||e instanceof Fs?(r=this.$getTensorsForArithmeticOperationByAxis(e,t),this.$MathOps(r,"sub",n)):void 0;var r=this.copy(),i=(r=(r=0===t?r.T:r).tensor.clone(),new Array(r.shape[r.rank-1]).fill(NaN)),o=r.arraySync();if(0<e)for(var a=0;a<e;a++)o.unshift(i),o.pop();else if(e<0)for(a=0;e<a;a--)o.push(i),o.shift();var s=Vr.tensor2d(o,r.shape);r=this.$MathOps([r,s],"sub",n);return 0===t?r.T:r},ps.prototype.abs=function(e){e=hs({inplace:!1},e).inplace;var t=this.values.map((function(e){return e.map((function(e){return Math.abs(e)}))}));if(!e)return new ps(t,{index:fs([],this.index,!0),columns:fs([],this.columns,!0),dtypes:fs([],this.dtypes,!0),config:hs({},this.config)});this.$setValues(t)},ps.prototype.round=function(e,t){if(void 0===e&&(e=1),t=hs({inplace:!1},t).inplace,this.$frameIsNotCompactibleForArithmeticOperation())throw Error("TypeError: round operation is not supported for string dtypes");if("number"!=typeof e)throw Error("ParamError: dp must be a number");if(e=ds.round(this.values,e,!1),!t)return new ps(e,{index:fs([],this.index,!0),columns:fs([],this.columns,!0),config:hs({},this.config)});this.$setValues(e)},ps.prototype.cumProd=function(e){var t=(e=hs({axis:1,inplace:!1},e)).axis;e=e.inplace;return this.cumOps("prod",t,e)},ps.prototype.cumSum=function(e){var t=(e=hs({axis:1,inplace:!1},e)).axis;e=e.inplace;return this.cumOps("sum",t,e)},ps.prototype.cumMin=function(e){var t=(e=hs({axis:1,inplace:!1},e)).axis;e=e.inplace;return this.cumOps("min",t,e)},ps.prototype.cumMax=function(e){var t=(e=hs({axis:1,inplace:!1},e)).axis;e=e.inplace;return this.cumOps("max",t,e)},ps.prototype.cumOps=function(e,t,n){this.dtypes.includes("string")&&Lr.throwStringDtypeOperationError(e);var r=this.$getDataByAxisWithMissingValuesRemoved(t).map((function(t){for(var n=t[0],r=[n],i=1;i<t.length;i++){var o=t[i];switch(e){case"max":n<o?(r.push(o),n=o):r.push(n);break;case"min":o<n?(r.push(o),n=o):r.push(n);break;case"sum":n+=o,r.push(n);break;case"prod":n*=o,r.push(n)}}return r}));if(0===t&&(r=ds.transposeArray(r)),!n)return new ps(r,{index:fs([],this.index,!0),columns:fs([],this.columns,!0),dtypes:fs([],this.dtypes,!0),config:hs({},this.config)});this.$setValues(r)},ps.prototype.describe=function(){for(var e=this,t=this.columns.filter((function(t){return"string"!==e.$getColumnDtype(t)})),n={},r=0;r<t.length;r++){var i=t[r],o=this.$getColumnData(i).count(),a=Xa(this.$getColumnData(i,!1)),s=es(this.$getColumnData(i,!1)),u=this.$getColumnData(i).min(),c=Za(this.$getColumnData(i,!1)),l=this.$getColumnData(i).max(),h=Ja(this.$getColumnData(i,!1));n[i]=[o,a,s,u,c,l,h]}return new ps(n,{index:["count","mean","std","min","median","max","variance"]})},ps.prototype.dropNa=function(e){var t=(e=hs({axis:1,inplace:!1},e)).axis;e=e.inplace;if(-1===[0,1].indexOf(t))throw Error("ParamError: Axis must be 0 or 1");var n=[];if(1==t){for(var r=[],i=this.values,o=0;o<i.length;o++)(a=i[o]).includes(NaN)||a.includes(void 0)||a.includes(null)||(r.push(a),n.push(this.index[o]));if(!e)return new ps(r,{index:n,columns:fs([],this.columns,!0),dtypes:fs([],this.dtypes,!0),config:hs({},this.config)});this.$setValues(r,!1),this.$setIndex(n)}else{var a,s=[],u=[],c=(i=[],i=this.config.isLowMemoryMode?ds.transposeArray(this.values):this.$dataIncolumnFormat,[]);for(o=0;o<i.length;o++)(a=i[o]).includes(NaN)||(c.push(a),s.push(this.columns[o]),u.push(this.dtypes[o]));if(r=ds.transposeArray(c),!e)return new ps(r,{index:fs([],this.index,!0),columns:s,dtypes:u,config:hs({},this.config)});this.$setValues(r,!1,!1),this.$setColumnNames(s),this.$setDtypes(u)}},ps.prototype.addColumn=function(e,t,n){var r=(n=hs({inplace:!1,atIndex:this.columns.length},n)).inplace,i=n.atIndex;if("string"==typeof i){if(!this.columns.includes(i))throw new Error(i+" not a column");i=this.columns.indexOf(i)}if(!e)throw new Error("ParamError: column must be specified");if(!t)throw new Error("ParamError: values must be specified");if(-1===this.$columns.indexOf(e)){var o=void 0;if(t instanceof Fs)o=t.values;else{if(!Array.isArray(t))throw new Error("ParamError: specified value not supported. It must either be an Array or a Series of the same length");o=t}o.length!==this.shape[0]&&Lr.throwColumnLengthError(this,o.length);for(var a,s=[],u=this.$data,c=0;c<u.length;c++){var l=fs([],u[c],!0);l.splice(i,0,o[c]),s.push(l)}if(!r)return(a=fs([],this.columns,!0)).splice(i,0,e),new ps(s,{index:fs([],this.index,!0),columns:a,dtypes:fs(fs([],this.dtypes,!0),[ds.inferDtype(o)[0]],!1),config:hs({},this.$config)});this.$setValues(s,!0,!1),(a=fs([],this.columns,!0)).splice(i,0,e),this.$setColumnNames(a),this.$setInternalColumnDataProperty(e)}else this.$setColumnData(e,t)},ps.prototype.copy=function(){return new ps(fs([],this.$data,!0),{columns:fs([],this.columns,!0),index:fs([],this.index,!0),dtypes:fs([],this.dtypes,!0),config:hs({},this.$config)})},ps.prototype.isNa=function(){for(var e=[],t=0;t<this.values.length;t++){var n=this.values[t].map((function(e){return!!ds.isEmpty(e)}));e.push(n)}return new ps(e,{index:fs([],this.index,!0),columns:fs([],this.columns,!0),config:hs({},this.config)})},ps.prototype.fillNa=function(e,t){var n=this,r=(t=hs({inplace:!1},t)).columns;t=t.inplace;if(!e&&"boolean"!=typeof e&&"number"!=typeof e&&"string"!=typeof e)throw Error("ParamError: value must be specified");if(Array.isArray(e)){if(!Array.isArray(r))throw Error("ParamError: value is an array, hence columns must also be an array of same length");if(e.length!==r.length)throw Error("ParamError: specified column and values must have the same length");r.forEach((function(e){if(!n.columns.includes(e))throw Error('ValueError: Specified column "'+e+'" must be one of '+n.columns)}))}var i=[],o=fs([],this.values,!0);if(r)for(var a=fs([],this.values,!0),s=0;s<a.length;s++){for(var u=a[s],c=0;c<r.length;c++){var l=this.columns.indexOf(r[c]),h=Array.isArray(e)?e[c]:e;u[l]=ds.isEmpty(u[l])?h:u[l]}i.push(u)}else for(s=0;s<o.length;s++)!function(t){var n=fs([],o[t],!0).map((function(n){return ds.isEmpty(n)?Array.isArray(e)?e[t]:e:n}));i.push(n)}(s);if(!t)return new ps(i,{index:fs([],this.index,!0),columns:fs([],this.columns,!0),dtypes:fs([],this.dtypes,!0),config:hs({},this.config)});this.$setValues(i)},ps.prototype.drop=function(e){var t=(e=hs({inplace:!1},e)).columns,n=e.index;e=e.inplace;if(!t&&!n)throw Error("ParamError: Must specify one of columns or index");if(t&&n)throw Error("ParamError: Can only specify one of columns or index");if(t){var r=[];if("string"==typeof t)r.push(this.columns.indexOf(t));else{if(!Array.isArray(t))throw Error("ParamError: columns must be an array of column names or a string of column name");for(var i=0,o=t;i<o.length;i++){var a=o[i];if(-1===this.columns.indexOf(a))throw Error('ParamError: specified column "'+a+'" not found in columns');r.push(this.columns.indexOf(a))}}for(var s=[],u=[],c=[],l=0;l<this.values.length;l++){for(var h=[],f=this.values[l],d=0;d<f.length;d++)r.includes(d)||h.push(f[d]);s.push(h)}for(l=0;l<this.columns.length;l++){var p=this.columns[l];t.includes(p)||(u.push(p),c.push(this.dtypes[l]))}if(!e)return new ps(s,{index:fs([],this.index,!0),columns:u,dtypes:c,config:hs({},this.config)});this.$setValues(s,!0,!1),this.$setColumnNames(u)}if(n){var m=[];if("string"==typeof n||"number"==typeof n||"boolean"==typeof n)m.push(this.index.indexOf(n));else{if(!Array.isArray(n))throw Error("ParamError: index must be an array of indices or a scalar index");for(var g=0,A=n;g<A.length;g++){var v=A[g];if(-1===this.index.indexOf(v))throw Error('ParamError: specified index "'+v+'" not found in indices');m.push(this.index.indexOf(v))}}s=[];var b=[];for(l=0;l<this.values.length;l++)f=this.values[l],m.includes(l)||s.push(f);for(l=0;l<this.index.length;l++)v=this.index[l],n.includes(v)||b.push(v);if(!e)return new ps(s,{index:b,columns:fs([],this.columns,!0),dtypes:fs([],this.dtypes,!0),config:hs({},this.config)});this.$setValues(s,!1),this.$setIndex(b)}},ps.prototype.sortValues=function(e,t){var n=(t=hs({ascending:!0,inplace:!1},t)).ascending;t=t.inplace;if(!e)throw Error("ParamError: must specify a column to sort by");if(-1===this.columns.indexOf(e))throw Error('ParamError: specified column "'+e+'" not found in columns');e=this.$getColumnData(e,!1);var r=fs([],this.index,!0);e=e.map((function(e,t){return{index:r[t],value:e}})),e=us({ndFrame:this,rows:ds.sortObj(e,n).map((function(e){return e.index}))});if(!t)return e;this.$setValues(e.values),this.$setIndex(e.index)},ps.prototype.setIndex=function(e){var t=(e=hs({drop:!1,inplace:!1},e)).index,n=e.column,r=e.drop;e=e.inplace;if(!t&&!n)throw new Error("ParamError: must specify either index or column");var i=[];if(t){if(!Array.isArray(t))throw Error("ParamError: index must be an array");if(t.length!==this.values.length)throw Error("ParamError: index must be the same length as the number of rows");i=t}if(n){if(-1===this.columns.indexOf(n))throw Error("ParamError: column not found in column names");i=this.$getColumnData(n,!1)}if(r){if(r=null==(t=this.drop({columns:[n]}))?void 0:t.values,n=null==t?void 0:t.columns,t=null==t?void 0:t.dtypes,!e)return new ps(r,{index:i,columns:n,dtypes:t,config:hs({},this.config)});this.$setValues(r,!0,!1),this.$setIndex(i),this.$setColumnNames(n)}else{if(!e)return new ps(this.values,{index:i,columns:fs([],this.columns,!0),dtypes:fs([],this.dtypes,!0),config:hs({},this.config)});this.$setIndex(i)}},ps.prototype.resetIndex=function(e){if(!hs({inplace:!1},e).inplace)return new ps(this.values,{index:this.index.map((function(e,t){return t})),columns:fs([],this.columns,!0),dtypes:fs([],this.dtypes,!0),config:hs({},this.config)});this.$resetIndex()},ps.prototype.apply=function(e,t){if(t=hs({axis:1},t).axis,-1===[0,1].indexOf(t))throw Error("ParamError: axis must be 0 or 1");var n=this.$getDataByAxisWithMissingValuesRemoved(t).map((function(t){return e(t)}));return 0===t?ds.is1DArray(n)?new Fs(n,{index:fs([],this.columns,!0)}):new ps(n,{index:fs([],this.columns,!0),columns:fs([],this.columns,!0),dtypes:fs([],this.dtypes,!0),config:hs({},this.config)}):ds.is1DArray(n)?new Fs(n,{index:fs([],this.index,!0)}):new ps(n,{index:fs([],this.index,!0),columns:fs([],this.columns,!0),dtypes:fs([],this.dtypes,!0),config:hs({},this.config)})},ps.prototype.applyMap=function(e,t){t=hs({inplace:!1},t).inplace;var n=this.values.map((function(t){return t.map((function(t){return e(t)}))}));if(!t)return new ps(n,{index:fs([],this.index,!0),columns:fs([],this.columns,!0),dtypes:fs([],this.dtypes,!0),config:hs({},this.config)});this.$setValues(n)},ps.prototype.column=function(e){return this.$getColumnData(e)},ps.prototype.selectDtypes=function(e){var t=["float32","int32","string","boolean","undefined"];if(!1===Array.isArray(e))throw Error("ParamError: include must be an array");e.forEach((function(e){if(-1===t.indexOf(e))throw Error("ParamError: include must be an array of valid dtypes")}));for(var n=[],r=0;r<this.dtypes.length;r++)e.includes(this.dtypes[r])&&n.push(this.columns[r]);return this.loc({columns:n})},ps.prototype.transpose=function(e){e=hs({inplace:!1},e).inplace;var t=ds.transposeArray(this.values),n=fs([],this.index.map((function(e){return e.toString()})),!0);if(!e)return new ps(t,{index:fs([],this.columns,!0),columns:n,config:hs({},this.config)});this.$setValues(t,!1,!1),this.$setIndex(fs([],this.columns,!0)),this.$setColumnNames(n)},Object.defineProperty(ps.prototype,"T",{get:function(){return new ps(ds.transposeArray(this.values),{index:fs([],this.columns,!0),columns:fs([],this.index.map((function(e){return e.toString()})),!0),config:hs({},this.config)})},enumerable:!1,configurable:!0}),ps.prototype.replace=function(e,t,n){var r=this,i=(n=hs({inplace:!1},n)).columns;n=n.inplace;if(!e&&"boolean"!=typeof e)throw Error("Params Error: Must specify param 'oldValue' to replace");if(!t&&"boolean"!=typeof t)throw Error("Params Error: Must specify param 'newValue' to replace with");var o=[];if(i){if(!Array.isArray(i))throw Error("Params Error: column must be an array of column(s)");var a=[];i.forEach((function(e){if(-1===(e=r.columns.indexOf(e)))throw Error("Params Error: column not found in columns");a.push(e)})),o=this.values.map((function(n){for(var r=n.slice(0),i=0,o=a;i<o.length;i++){var s=o[i];r[s]===e&&(r[s]=t)}return r}))}else o=this.values.map((function(n){return n.slice(0).map((function(n){return n===e?t:n}))}));if(!n)return new ps(o,{index:fs([],this.index,!0),columns:fs([],this.columns,!0),dtypes:fs([],this.dtypes,!0),config:hs({},this.config)});this.$setValues(o)},ps.prototype.asType=function(e,t,n){n=hs({inplace:!1},n).inplace;var r=this.columns.indexOf(e);if(-1===r)throw Error("Params Error: column not found in columns");if(!Nr.includes(t))throw Error("dtype "+t+" not supported. dtype must be one of "+Nr);if(e=this.values.map((function(e){return"float32"===t?(e[r]=Number(e[r]),e):"int32"===t?(e[r]=parseInt(e[r]),e):"string"===t?(e[r]=e[r].toString(),e):"boolean"===t?(e[r]=Boolean(e[r]),e):void 0})),!n)return(n=fs([],this.dtypes,!0))[r]=t,new ps(e,{index:fs([],this.index,!0),columns:fs([],this.columns,!0),dtypes:n,config:hs({},this.config)});this.$setValues(e)},ps.prototype.nUnique=function(e){if(-1===[0,1].indexOf(e=void 0===e?1:e))throw Error("ParamError: axis must be 0 or 1");var t=this.$getDataArraysByAxis(e).map((function(e){return new Set(e).size}));return new Fs(t,0===e?{index:fs([],this.columns,!0),dtypes:["int32"]}:{index:fs([],this.index,!0),dtypes:["int32"]})},ps.prototype.rename=function(e,t){var n=(t=hs({axis:1,inplace:!1},t)).axis;t=t.inplace;if(-1===[0,1].indexOf(n))throw Error("ParamError: axis must be 0 or 1");if(1===n){var r=[];n=this.columns.map((function(t){var n;return void 0!==e[t]?(n=""+e[t],r.push(n),n):t}));if(!t)return new ps(fs([],this.values,!0),{index:fs([],this.index,!0),columns:n,dtypes:fs([],this.dtypes,!0),config:hs({},this.config)});this.$setColumnNames(n);for(var i=0,o=r;i<o.length;i++){var a=o[i];this.$setInternalColumnDataProperty(a)}}else{if(n=this.index.map((function(t){return void 0!==e[t]?e[t]:t})),!t)return new ps(fs([],this.values,!0),{index:n,columns:fs([],this.columns,!0),dtypes:fs([],this.dtypes,!0),config:hs({},this.config)});this.$setIndex(n)}},ps.prototype.sortIndex=function(e){var t=this,n=(e=hs({ascending:!0,inplace:!1},e)).ascending,r=(e=e.inplace,ds.range(0,this.index.length-1)),i=fs([],this.index,!0),o=i.map((function(e,t){return{index:r[t],value:e}}));n=(o=ds.sortObj(o,n).map((function(e){return e.index}))).map((function(e){return t.values[e]})),o=o.map((function(e){return i[e]}));if(!e)return new ps(n,{index:o,columns:fs([],this.columns,!0),dtypes:fs([],this.dtypes,!0),config:hs({},this.config)});this.$setValues(n),this.$setIndex(o)},ps.prototype.append=function(e,t,n){if(n=hs({inplace:!1},n).inplace,!e)throw Error("ParamError: newValues must be a Series, DataFrame or Array");if(!t)throw Error("ParamError: index must be specified");var r=[];if(e instanceof Fs){if(e.values.length!==this.shape[1])throw Error("ValueError: length of newValues must be the same as the number of columns.");r=[e.values]}else if(e instanceof ps){if(e.shape[1]!==this.shape[1])throw Error("ValueError: length of newValues must be the same as the number of columns.");r=e.values}else{if(!Array.isArray(e))throw Error("ValueError: newValues must be a Series, DataFrame or Array");if((r=ds.is1DArray(e)?[e]:e)[0].length!==this.shape[1])throw Error("ValueError: length of newValues must be the same as the number of columns.")}var i=Array.isArray(t)?t:[t];if(r.length!==i.length)throw Error("ParamError: index must contain the same number of values as newValues");var o=fs([],this.values,!0),a=fs([],this.index,!0);if(r.forEach((function(e,t){o.push(e),a.push(i[t])})),!n)return new ps(o,{index:a,columns:fs([],this.columns,!0),dtypes:fs([],this.dtypes,!0),config:hs({},this.config)});this.$setValues(o),this.$setIndex(a)},ps.prototype.query=function(e,t){if(t=hs({inplace:!1},t).inplace,!e)throw new Error("ParamError: condition must be specified");if(e=ss({ndFrame:this,rows:e}),!t)return e;this.$setValues(e.values,!1,!1),this.$setIndex(e.index)},Object.defineProperty(ps.prototype,"ctypes",{get:function(){return new Fs(this.dtypes,{index:this.columns})},enumerable:!1,configurable:!0}),ps.prototype.getDummies=function(e){var t=hs({inplace:!1},e).inplace;e=bs(this,e);if(!t)return e;this.$setValues(e.values,!1,!1),this.$setColumnNames(e.columns)},ps.prototype.groupby=function(e){var t=this.columns,n=e.map((function(e){return t.indexOf(e)})),r=this.dtypes;return new os(e,this.values,t,r,n).group()},ps.prototype.iat=function(e,t){if("string"==typeof e||"string"==typeof t)throw new Error("ParamError: row and column index must be an integer. Use .at to get a row or column by label.");return this.values[e][t]},ps.prototype.at=function(e,t){if("string"!=typeof t)throw new Error("ParamError: column index must be a string. Use .iat to get a row or column by index.");return this.values[this.index.indexOf(e)][this.columns.indexOf(t)]};var ms=ps,gs=function(){return(gs=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},As=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||((r=r||Array.prototype.slice.call(t,0,i))[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},vs=new Bt,bs=function(e,t){var n,r=(t=gs({columns:null,prefix:null,prefixSeparator:"_"},t)).columns,i=t.prefix,o=t.prefixSeparator;if(!e)throw new Error("ParamError: data must be one of Array, Series or DataFrame");if(!(e instanceof Fs||e instanceof ms))throw new Error("ParamError: data must be one of Array, Series or DataFrame");if(r||(n=[],e.dtypes.forEach((function(t,r){"string"===t&&n.push(e.columns[r])})),r=n),"string"==typeof r){if(r=[r],!Array.isArray(i)||1!==i.length){if("string"!=typeof i)throw new Error("ParamError: prefix must be a string, or an array of same length as columns");i=[i]}if(!Array.isArray(o)||1!==o.length){if("string"!=typeof o)throw new Error("ParamError: prefix must be a string, or an array of same length as columns");o=[o]}}else{if(!Array.isArray(r))throw new Error("ParamError: columns must be a string or an array of strings");if(i){if(Array.isArray(i)&&i.length!==r.length)throw new Error('ParamError: prefix and data array must be of the same length. If you need to use the same prefix, then pass a string param instead. e.g {prefix: "'+i+'"}');"string"==typeof i&&(i=r.map((function(e){return i})))}if(o){if(Array.isArray(o)&&o.length!==r.length)throw new Error('ParamError: prefixSeparator and data array must be of the same length. If you need to use the same prefix separator, then pass a string param instead. e.g {prefixSeparator: "'+o+'"}');"string"==typeof o&&(o=r.map((function(e){return o})))}}if(e instanceof Fs){for(var a=e.values,s=[],u=Array.from(new Set(a)),c=vs.zeros(a.length,u.length),l=0;l<a.length;l++){var h=u.indexOf(a[l]);c[l][h]=1}for(l=0;l<u.length;l++){var f=i?i[0]:l;s.push(""+f+o[0]+u[l])}return new ms(c,{columns:s})}var d=null==(t=e.drop({columns:r}))?void 0:t.values;for(s=null==t?void 0:t.columns,l=0;l<r.length;l++){for(var p=r[l],m=(a=e.column(p).values,u=Array.from(new Set(a)),c=vs.zeros(a.length,u.length),0);m<a.length;m++){h=u.indexOf(a[m]),c[m][h]=1;var g=""+(f=i?i[l]:p)+o[l]+a[m];s.includes(g)||s.push(g)}for(var A=0;A<d.length;A++)d[A]=As(As([],d[A],!0),c[A],!0)}return new ms(d,{columns:s})},ys=new Bt;
/**
*  @license
* Copyright 2022 JsData. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.

* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ==========================================================================
*/
function ws(e){var t=e.ndFrame,n=e.other,r=e.operation;if("number"==typeof n)switch(r){case"add":return t.values.map((function(e){return e+n}));case"sub":return t.values.map((function(e){return e-n}));case"mul":return t.values.map((function(e){return e*n}));case"div":return t.values.map((function(e){return e/n}));case"mod":return t.values.map((function(e){return e%n}));case"pow":return t.values.map((function(e){return Math.pow(e,n)}));case"minimum":return t.values.map((function(e){return Math.min(e,n)}));case"maximum":return t.values.map((function(e){return Math.max(e,n)}));default:throw new Error(r+" is not implemented")}else if(n instanceof Fs)switch(ys.checkSeriesOpCompactibility({firstSeries:t,secondSeries:n,operation:r}),r){case"add":return t.values.map((function(e,t){return e+n.values[t]}));case"sub":return t.values.map((function(e,t){return e-n.values[t]}));case"mul":return t.values.map((function(e,t){return e*n.values[t]}));case"div":return t.values.map((function(e,t){return e/n.values[t]}));case"mod":return t.values.map((function(e,t){return e%n.values[t]}));case"pow":return t.values.map((function(e,t){return Math.pow(e,n.values[t])}));case"minimum":return t.values.map((function(e,t){return Math.min(e,n.values[t])}));case"maximum":return t.values.map((function(e,t){return Math.max(e,n.values[t])}));default:throw new Error(r+" is not implemented")}else{if(!Array.isArray(n))throw new Error("ParamError: value for other not supported. It must be either a scalar, Array or Series");if(n.length!==t.values.length)throw new Error("ParamError: Length of array must be equal to length of Series");switch(r){case"add":return t.values.map((function(e,t){return e+n[t]}));case"sub":return t.values.map((function(e,t){return e-n[t]}));case"mul":return t.values.map((function(e,t){return e*n[t]}));case"div":return t.values.map((function(e,t){return e/n[t]}));case"mod":return t.values.map((function(e,t){return e%n[t]}));case"pow":return t.values.map((function(e,t){return Math.pow(e,n[t])}));case"minimum":return t.values.map((function(e,t){return Math.min(e,n[t])}));case"maximum":return t.values.map((function(e,t){return Math.max(e,n[t])}))}}}var xs=function(){return(xs=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},Cs=new Bt;function ks(e){this.series=e,this.values=e.values}ks.prototype.toLowerCase=function(e){e=xs({inplace:!1},e).inplace;var t=[];if(this.values.map((function(e){Cs.isEmpty(e)?t.push(NaN):t.push((""+e).toLowerCase())})),!e)return(e=this.series.copy()).$setValues(t),e;this.series.$setValues(t),this.series.print()},ks.prototype.toUpperCase=function(e){e=xs({inplace:!1},e).inplace;var t=[];if(this.values.map((function(e){Cs.isEmpty(e)?t.push(NaN):t.push((""+e).toUpperCase())})),!e)return(e=this.series.copy()).$setValues(t),e;this.series.$setValues(t),this.series.print()},ks.prototype.capitalize=function(e){e=xs({inplace:!1},e).inplace;var t=[];if(this.values.map((function(e){var n;Cs.isEmpty(e)?t.push(NaN):(n=(""+e).slice(0,1),e=(""+e).slice(1),n=""+n.toUpperCase()+e.toLowerCase(),t.push(n))})),!e)return(e=this.series.copy()).$setValues(t),e;this.series.$setValues(t),this.series.print()},ks.prototype.charAt=function(e,t){void 0===e&&(e=0);t=xs({inplace:!1},t).inplace;var n=[];if(this.values.map((function(t){Cs.isEmpty(t)?n.push(NaN):n.push((""+t).charAt(e))})),!t)return(t=this.series.copy()).$setValues(n),t;this.series.$setValues(n),this.series.print()},ks.prototype.concat=function(e,t,n){void 0===t&&(t=1);n=xs({inplace:!1},n).inplace;var r=[];if(Array.isArray(e))for(var i=0;i<e.length;i++){var o=""+this.values[i],a=""+e[i];1==t?r.push(o.concat(a)):r.push(a.concat(o))}else this.values.map((function(n){1==t?Cs.isEmpty(n)?r.push(NaN):r.push((""+n).concat(""+e)):Cs.isEmpty(n)?r.push(NaN):r.push(e.concat(""+n))}));if(!n)return(n=this.series.copy()).$setValues(r),n;this.series.$setValues(r),this.series.print()},ks.prototype.startsWith=function(e,t){void 0===e&&(e="");t=xs({inplace:!1},t).inplace;var n=[];if(this.values.forEach((function(t){Cs.isEmpty(t)?n.push(NaN):n.push((""+t).startsWith(e))})),!t)return(t=this.series.copy()).$setValues(n),t;this.series.$setValues(n),this.series.print()},ks.prototype.endsWith=function(e,t){void 0===e&&(e="");t=xs({inplace:!1},t).inplace;var n=[];if(this.values.map((function(t){Cs.isEmpty(t)?n.push(NaN):n.push((""+t).endsWith(e))})),!t)return(t=this.series.copy()).$setValues(n),t;this.series.$setValues(n),this.series.print()},ks.prototype.includes=function(e,t){void 0===e&&(e="");t=xs({inplace:!1},t).inplace;var n=[];if(this.values.map((function(t){Cs.isEmpty(t)?n.push(NaN):n.push((""+t).includes(e))})),!t)return(t=this.series.copy()).$setValues(n),t;this.series.$setValues(n),this.series.print()},ks.prototype.indexOf=function(e,t){void 0===e&&(e="");t=xs({inplace:!1},t).inplace;var n=[];if(this.values.map((function(t){Cs.isEmpty(t)?n.push(NaN):n.push((""+t).indexOf(e))})),!t)return(t=this.series.copy()).$setValues(n),t;this.series.$setValues(n),this.series.print()},ks.prototype.lastIndexOf=function(e,t){void 0===e&&(e="");t=xs({inplace:!1},t).inplace;var n=[];if(this.values.map((function(t){Cs.isEmpty(t)?n.push(NaN):n.push((""+t).lastIndexOf(e))})),!t)return(t=this.series.copy()).$setValues(n),t;this.series.$setValues(n),this.series.print()},ks.prototype.replace=function(e,t,n){void 0===e&&(e=""),void 0===t&&(t="");n=xs({inplace:!1},n).inplace;var r=[];if(this.values.map((function(n){Cs.isEmpty(n)?r.push(NaN):r.push((""+n).replace(e,t))})),!n)return(n=this.series.copy()).$setValues(r),n;this.series.$setValues(r),this.series.print()},ks.prototype.repeat=function(e,t){void 0===e&&(e=1);t=xs({inplace:!1},t).inplace;var n=[];if(this.values.map((function(t){Cs.isEmpty(t)?n.push(NaN):n.push((""+t).repeat(e))})),!t)return(t=this.series.copy()).$setValues(n),t;this.series.$setValues(n),this.series.print()},ks.prototype.search=function(e,t){void 0===e&&(e="");t=xs({inplace:!1},t).inplace;var n=[];if(this.values.map((function(t){Cs.isEmpty(t)?n.push(NaN):n.push((""+t).search(e))})),!t)return(t=this.series.copy()).$setValues(n),t;this.series.$setValues(n),this.series.print()},ks.prototype.slice=function(e,t,n){void 0===e&&(e=0),void 0===t&&(t=1);n=xs({inplace:!1},n).inplace;var r=[];if(this.values.map((function(n){Cs.isEmpty(n)?r.push(NaN):r.push((""+n).slice(e,t))})),!n)return(n=this.series.copy()).$setValues(r),n;this.series.$setValues(r),this.series.print()},ks.prototype.split=function(e,t){void 0===e&&(e=" ");t=xs({inplace:!1},t).inplace;var n=[];if(this.values.map((function(t){Cs.isEmpty(t)?n.push(NaN):n.push(""+String(t).split(e))})),!t)return(t=this.series.copy()).$setValues(n),t;this.series.$setValues(n),this.series.print()},ks.prototype.substr=function(e,t,n){void 0===e&&(e=0),void 0===t&&(t=1);n=xs({inplace:!1},n).inplace;var r=[];if(this.values.map((function(n){Cs.isEmpty(n)?r.push(NaN):r.push(""+String(n).substr(e,t))})),!n)return(n=this.series.copy()).$setValues(r),n;this.series.$setValues(r),this.series.print()},ks.prototype.substring=function(e,t,n){void 0===e&&(e=0),void 0===t&&(t=1);n=xs({inplace:!1},n).inplace;var r=[];if(this.values.map((function(n){Cs.isEmpty(n)?r.push(NaN):r.push(""+String(n).substring(e,t))})),!n)return(n=this.series.copy()).$setValues(r),n;this.series.$setValues(r),this.series.print()},ks.prototype.trim=function(e){e=xs({inplace:!1},e).inplace;var t=[];if(this.values.map((function(e){Cs.isEmpty(e)?t.push(NaN):t.push((""+e).trim())})),!e)return(e=this.series.copy()).$setValues(t),e;this.series.$setValues(t),this.series.print()},ks.prototype.join=function(e,t,n){void 0===e&&(e=""),void 0===t&&(t=" ");n=xs({inplace:!1},n).inplace;var r=[];if(this.values.map((function(n){Cs.isEmpty(n)?r.push(NaN):(n=""+n+t+e,r.push(n))})),!n)return(n=this.series.copy()).$setValues(r),n;this.series.$setValues(r),this.series.print()},ks.prototype.len=function(e){e=xs({inplace:!1},e).inplace;var t=[];if(this.values.map((function(e){Cs.isEmpty(e)?t.push(NaN):t.push((""+e).length)})),!e)return(e=this.series.copy()).$setValues(t),e;this.series.$setValues(t),this.series.print()};var Es=ks,Ss=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],_s=["January","February","March","April","May","June","July","August","September","October","November","December"];function Os(e){this.$dateObjectArray=e instanceof Fs?this.processData(e.values):this.processData(e)}var Ts,Ds,Bs=Fa=(Os.prototype.processData=function(e){return e.map((function(e){return new Date(""+e)}))},Os.prototype.month=function(){var e=this.$dateObjectArray.map((function(e){return e.getMonth()}));return new Fs(e)},Os.prototype.dayOfWeek=function(){var e=this.$dateObjectArray.map((function(e){return e.getDay()}));return new Fs(e)},Os.prototype.year=function(){var e=this.$dateObjectArray.map((function(e){return e.getFullYear()}));return new Fs(e)},Os.prototype.monthName=function(){var e=this.$dateObjectArray.map((function(e){return _s[e.getMonth()]}));return new Fs(e)},Os.prototype.dayOfWeekName=function(){var e=this.$dateObjectArray.map((function(e){return Ss[e.getDay()]}));return new Fs(e)},Os.prototype.dayOfMonth=function(){var e=this.$dateObjectArray.map((function(e){return e.getDate()}));return new Fs(e)},Os.prototype.hours=function(){var e=this.$dateObjectArray.map((function(e){return e.getHours()}));return new Fs(e)},Os.prototype.seconds=function(){var e=this.$dateObjectArray.map((function(e){return e.getSeconds()}));return new Fs(e)},Os.prototype.minutes=function(){var e=this.$dateObjectArray.map((function(e){return e.getMinutes()}));return new Fs(e)},Os.prototype.date=function(){var e=this.$dateObjectArray.map((function(e){return e.toLocaleString()}));return new Fs(e)},Os),Is=(la=(Ts=function(e,t){return(Ts=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Ts(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),function(){return(Is=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)}),Ms=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||((r=r||Array.prototype.slice.call(t,0,i))[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))},js=new Bt;function Ns(e,t){void 0===e&&(e=[]);var n=(t=void 0===t?{}:t).index,r=t.columns,i=t.dtypes;t=t.config;return(Array.isArray(e[0])||js.isObject(e[0]))&&(e=js.convert2DArrayToSeriesArray(e)),Ds.call(this,{data:e,index:n,columns:r,dtypes:i,config:t,isSeries:!0})||this}la(Ns,Ds=Zn),Ns.prototype.iloc=function(e){return ss({ndFrame:this,rows:e})},Ns.prototype.loc=function(e){return us({ndFrame:this,rows:e})},Ns.prototype.head=function(e){if((e=void 0===e?5:e)<=0)throw new Error("ParamError: Number of rows cannot be less than 1");if(this.shape[0]<=e)return this.copy();if(this.shape[0]-e<0)throw new Error("ParamError: Number of rows cannot be greater than available rows in data");return this.iloc(["0:"+e])},Ns.prototype.tail=function(e){if((e=void 0===e?5:e)<=0)throw new Error("ParamError: Number of rows cannot be less than 1");if(this.shape[0]<=e)return this.copy();if(this.shape[0]-e<0)throw new Error("ParamError: Number of rows cannot be greater than available rows in data");return e=this.shape[0]-e,this.iloc([e+":"])},Ns.prototype.sample=function(e,t){return void 0===e&&(e=5),function(e,t,n,r){return new(n=n||Promise)((function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):((t=e.value)instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}(this,void 0,void 0,(function(){var n;return function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a={next:s(0),throw:s(1),return:s(2)};return"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){var u=[a,s];if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,r&&(i=2&u[0]?r.return:u[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,u[1])).done)return i;switch(r=0,(u=i?[2&u[0],i.value]:u)[0]){case 0:case 1:i=u;break;case 4:return o.label++,{value:u[1],done:!1};case 5:o.label++,r=u[1],u=[0];continue;case 7:u=o.ops.pop(),o.trys.pop();continue;default:if(!(i=0<(i=o.trys).length&&i[i.length-1])&&(6===u[0]||2===u[0])){o=0;continue}if(3===u[0]&&(!i||u[1]>i[0]&&u[1]<i[3]))o.label=u[1];else if(6===u[0]&&o.label<i[1])o.label=i[1],i=u;else{if(!(i&&o.label<i[2])){i[2]&&o.ops.pop(),o.trys.pop();continue}o.label=i[2],o.ops.push(u)}}u=t.call(e,o)}catch(s){u=[6,s],r=0}finally{n=i=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}}(this,(function(r){switch(r.label){case 0:if(n=Is({seed:1},t).seed,e>this.shape[0])throw new Error("Sample size n cannot be bigger than size of dataset");if(e<-1||0==e)throw new Error("Sample size cannot be less than -1 or be equal to 0");return e=-1===e?this.shape[0]:e,[4,Vr.data.array(this.index).shuffle(e,""+n).take(e).toArray()];case 1:return n=r.sent(),[2,this.iloc(n)]}}))}))},Ns.prototype.add=function(e,t){if(t=Is({inplace:!1},t).inplace,"string"==this.dtypes[0]&&Lr.throwStringDtypeOperationError("add"),e=ws({ndFrame:this,other:e,operation:"add"}),!t)return js.createNdframeFromNewDataWithOldProps({ndFrame:this,newData:e,isSeries:!0});this.$setValues(e)},Ns.prototype.sub=function(e,t){if(t=Is({inplace:!1},t).inplace,"string"==this.dtypes[0]&&Lr.throwStringDtypeOperationError("sub"),e=ws({ndFrame:this,other:e,operation:"sub"}),!t)return js.createNdframeFromNewDataWithOldProps({ndFrame:this,newData:e,isSeries:!0});this.$setValues(e)},Ns.prototype.mul=function(e,t){if(t=Is({inplace:!1},t).inplace,"string"==this.dtypes[0]&&Lr.throwStringDtypeOperationError("mul"),e=ws({ndFrame:this,other:e,operation:"mul"}),!t)return js.createNdframeFromNewDataWithOldProps({ndFrame:this,newData:e,isSeries:!0});this.$setValues(e)},Ns.prototype.div=function(e,t){if(t=Is({inplace:!1},t).inplace,"string"==this.dtypes[0]&&Lr.throwStringDtypeOperationError("div"),e=ws({ndFrame:this,other:e,operation:"div"}),!t)return js.createNdframeFromNewDataWithOldProps({ndFrame:this,newData:e,isSeries:!0});this.$setValues(e)},Ns.prototype.pow=function(e,t){if(t=Is({inplace:!1},t).inplace,"string"==this.dtypes[0]&&Lr.throwStringDtypeOperationError("pow"),e=ws({ndFrame:this,other:e,operation:"pow"}),!t)return js.createNdframeFromNewDataWithOldProps({ndFrame:this,newData:e,isSeries:!0});this.$setValues(e)},Ns.prototype.mod=function(e,t){if(t=Is({inplace:!1},t).inplace,"string"==this.dtypes[0]&&Lr.throwStringDtypeOperationError("mod"),e=ws({ndFrame:this,other:e,operation:"mod"}),!t)return js.createNdframeFromNewDataWithOldProps({ndFrame:this,newData:e,isSeries:!0});this.$setValues(e)},Ns.prototype.$checkAndCleanValues=function(e,t){return"string"==this.dtypes[0]&&Lr.throwStringDtypeOperationError(t),e=js.removeMissingValuesFromArray(e),"boolean"==this.dtypes[0]?js.mapBooleansToIntegers(e,1):e},Ns.prototype.mean=function(){var e=this.$checkAndCleanValues(this.values,"mean");return e.reduce((function(e,t){return e+t}))/e.length},Ns.prototype.median=function(){var e=this.$checkAndCleanValues(this.values,"median");return Za(e)},Ns.prototype.mode=function(){var e=this.$checkAndCleanValues(this.values,"mode");return Ya(e)},Ns.prototype.min=function(){for(var e=this.$checkAndCleanValues(this.values,"min"),t=e[0],n=0;n<e.length;n++)t=t<e[n]?t:e[n];return t},Ns.prototype.max=function(){for(var e=this.$checkAndCleanValues(this.values,"max"),t=e[0],n=0;n<e.length;n++)t=t>e[n]?t:e[n];return t},Ns.prototype.sum=function(){return this.$checkAndCleanValues(this.values,"sum").reduce((function(e,t){return e+t}),0)},Ns.prototype.count=function(){return js.removeMissingValuesFromArray(this.values).length},Ns.prototype.maximum=function(e){return"string"==this.dtypes[0]&&Lr.throwStringDtypeOperationError("maximum"),new Ns(ws({ndFrame:this,other:e,operation:"maximum"}),{columns:this.columns,index:this.index})},Ns.prototype.minimum=function(e){return"string"==this.dtypes[0]&&Lr.throwStringDtypeOperationError("maximum"),new Ns(ws({ndFrame:this,other:e,operation:"minimum"}),{columns:this.columns,index:this.index})},Ns.prototype.round=function(e,t){if(void 0===e&&(e=1),t=Is({inplace:!1},t).inplace,e=js.round(this.values,e=void 0===e?1:e,!0),!t)return js.createNdframeFromNewDataWithOldProps({ndFrame:this,newData:e,isSeries:!0});this.$setValues(e)},Ns.prototype.std=function(){var e=this.$checkAndCleanValues(this.values,"max");return es(e)},Ns.prototype.var=function(){var e=this.$checkAndCleanValues(this.values,"max");return Ja(e)},Ns.prototype.isNa=function(){return new Ns(this.values.map((function(e){return!!js.isEmpty(e)})),{index:this.index,dtypes:["boolean"],config:this.config})},Ns.prototype.fillNa=function(e,t){if(t=Is({inplace:!1},t).inplace,!e&&"boolean"!=typeof e&&"number"!=typeof e)throw Error("ParamError: value must be specified");var n=[];if(this.values.forEach((function(t){js.isEmpty(t)?n.push(e):n.push(t)})),!t)return js.createNdframeFromNewDataWithOldProps({ndFrame:this,newData:n,isSeries:!0});this.$setValues(n)},Ns.prototype.sortValues=function(e){for(var t=(e=Is({ascending:!0,inplace:!1},e)).ascending,n=(e=e.inplace,[]),r=[],i=js.range(0,this.index.length-1),o=0,a=js.sortArrayByIndex(i,this.values,this.dtypes[0]);o<a.length;o++){var s=a[o];n.push(this.values[s]),r.push(this.index[s])}if(t&&(n=n.reverse(),r=r.reverse()),!e)return new Ns(n,{index:r,dtypes:this.dtypes,config:this.config});this.$setValues(n),this.$setIndex(r)},Ns.prototype.copy=function(){return new Ns(Ms([],this.values,!0),{columns:Ms([],this.columns,!0),index:Ms([],this.index,!0),dtypes:Ms([],this.dtypes,!0),config:Is({},this.config)})},Ns.prototype.describe=function(){if("string"==this.dtypes[0])throw new Error("DType Error: Cannot generate descriptive statistics for Series with string dtype");return new Ns([this.count(),this.mean(),this.std(),this.min(),this.median(),this.max(),this.var()],{index:["count","mean","std","min","median","max","variance"]})},Ns.prototype.resetIndex=function(e){if(!Is({inplace:!1},e).inplace)return(e=this.copy()).$resetIndex(),e;this.$resetIndex()},Ns.prototype.setIndex=function(e,t){t=Is({inplace:!1},t).inplace;if(!e)throw Error("Param Error: Must specify index array");if(!t)return(t=this.copy()).$setIndex(e),t;this.$setIndex(e)},Ns.prototype.map=function(e,t){t=Is({inplace:!1},t).inplace;var n=js.isFunction(e),r=this.values.map((function(t,r){if(n)return e(t,r);if(js.isObject(e))return t in e?e[t]:t;throw new Error("Param Error: callable must either be a function or an object")}));if(!t)return(t=this.copy()).$setValues(r),t;this.$setValues(r)},Ns.prototype.apply=function(e,t){if(t=Is({inplace:!1},t).inplace,!js.isFunction(e))throw new Error("Param Error: callable must be a function");var n=this.values.map((function(t){return e(t)}));if(!t)return(t=this.copy()).$setValues(n),t;this.$setValues(n)},Ns.prototype.unique=function(){var e=new Set(this.values);return new Ns(Array.from(e))},Ns.prototype.nUnique=function(){return new Set(this.values).size},Ns.prototype.valueCounts=function(){for(var e=this.values,t={},n=0;n<e.length;n++){var r=e[n];t[""+r]=""+r in t?t[""+r]+1:1}var i=Object.keys(t).map((function(e){return parseInt(e)?parseInt(e):e}));return new Ns(Object.values(t),{index:i})},Ns.prototype.abs=function(e){var t;e=Is({inplace:!1},e).inplace;if("string"==this.dtypes[0]&&Lr.throwStringDtypeOperationError("abs"),t=this.values.map((function(e){return Math.abs(e)})),!e)return(e=this.copy()).$setValues(t),e;this.$setValues(t)},Ns.prototype.cumSum=function(e){return e=Is({inplace:!1},e),this.cumOps("sum",e)},Ns.prototype.cumMin=function(e){return e=Is({inplace:!1},e),this.cumOps("min",e)},Ns.prototype.cumMax=function(e){return e=Is({inplace:!1},e),this.cumOps("max",e)},Ns.prototype.cumProd=function(e){return e=Is({inplace:!1},e),this.cumOps("prod",e)},Ns.prototype.cumOps=function(e,t){"string"==this.dtypes[0]&&Lr.throwStringDtypeOperationError(e);t=t.inplace;for(var n=this.values,r=n[0],i=[r],o=1;o<n.length;o++){var a=n[o];switch(e){case"max":r<a?(i.push(a),r=a):i.push(r);break;case"min":a<r?(i.push(a),r=a):i.push(r);break;case"sum":r+=a,i.push(r);break;case"prod":r*=a,i.push(r)}}if(!t)return new Ns(i,{index:this.index,config:Is({},this.config)});this.$setValues(i)},Ns.prototype.lt=function(e){return this.boolOps(e,"lt")},Ns.prototype.gt=function(e){return this.boolOps(e,"gt")},Ns.prototype.le=function(e){return this.boolOps(e,"le")},Ns.prototype.ge=function(e){return this.boolOps(e,"ge")},Ns.prototype.ne=function(e){return this.boolOps(e,"ne")},Ns.prototype.eq=function(e){return this.boolOps(e,"eq")},Ns.prototype.boolOps=function(e,t){var n,r=[],i=this.values;if("number"==typeof e)n=Array(this.values.length).fill(e);else if("string"==typeof e&&["eq","ne"].includes(t))n=Array(this.values.length).fill(e);else if(e instanceof Ns)n=e.values;else{if(!Array.isArray(e))throw new Error("ParamError: value for other not supported. It must be either a scalar, Array or Series");n=e}if(i.length!==n.length)throw new Error("LengthError: length of other must be equal to length of Series");for(var o=0;o<i.length;o++){var a=i[o],s=n[o];switch(t){case"lt":r.push(a<s);break;case"gt":r.push(s<a);break;case"le":r.push(a<=s);break;case"ge":r.push(s<=a);break;case"ne":r.push(a!==s);break;case"eq":r.push(a===s)}}return new Ns(r,{index:this.index,config:Is({},this.config)})},Ns.prototype.replace=function(e,t,n){if(n=Is({inplace:!1},n).inplace,!e&&"boolean"!=typeof e)throw Error("Params Error: Must specify param 'oldValue' to replace");if(!t&&"boolean"!=typeof t)throw Error("Params Error: Must specify param 'newValue' to replace with");var r=Ms([],this.values,!0).map((function(n){return n===e?t:n}));if(!n)return(n=this.copy()).$setValues(r),n;this.$setValues(r)},Ns.prototype.dropNa=function(e){e=Is({inplace:!1},e).inplace;var t=this.values,n=this.index,r=[],i=[];if(this.isNa().values.forEach((function(e,o){e||(r.push(t[o]),i.push(n[o]))})),!e)return(e=this.copy()).$setValues(r,!1),e.$setIndex(i),e;this.$setValues(r,!1),this.$setIndex(i)},Ns.prototype.argSort=function(e){return e=Is({ascending:!0},e).ascending,new Ns(this.sortValues({ascending:e}).index)},Ns.prototype.argMax=function(){return this.tensor.argMax().arraySync()},Ns.prototype.argMin=function(){return this.tensor.argMin().arraySync()},Ns.prototype.dropDuplicates=function(e){var t=(e=Is({keep:"first",inplace:!1},e)).keep;e=e.inplace;if(!["first","last"].includes(t))throw Error("Params Error: Keep must be one of 'first' or 'last'");var n,r=[],i=[],o="last"===t?(n=this.values.reverse(),this.index.reverse()):(n=this.values,this.index);if(n.forEach((function(e,t){r.includes(e)||(i.push(o[t]),r.push(e))})),"last"===t&&(r=r.reverse(),i=i.reverse()),!e)return(n=this.copy()).$setValues(r,!1),n.$setIndex(i),n;this.$setValues(r,!1),this.$setIndex(i)},Ns.prototype.asType=function(e,t){if(t=Is({inplace:!1},t).inplace,!e)throw Error("Param Error: Please specify dtype to cast to");if(!Nr.includes(e))throw Error("dtype "+e+" not supported. dtype must be one of "+Nr);var n=Ms([],this.values,!0),r=[];switch(e){case"float32":n.forEach((function(e){r.push(Number(e))}));break;case"int32":n.forEach((function(e){r.push(parseInt(e))}));break;case"string":n.forEach((function(e){r.push(String(e))}));break;case"boolean":n.forEach((function(e){r.push(Boolean(e))}));break;case"undefined":n.forEach((function(e){r.push(NaN)}))}if(!t)return(t=this.copy()).$setValues(r,!1),t.$setDtypes([e]),t;this.$setValues(r,!1),this.$setDtypes([e])},Ns.prototype.append=function(e,t,n){if(n=Is({inplace:!1},n).inplace,!e&&"boolean"!=typeof e&&"number"!=typeof e)throw Error("Param Error: newValue cannot be null or undefined");if(!t)throw Error("Param Error: index cannot be null or undefined");var r=Ms([],this.values,!0),i=Ms([],this.index,!0);if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)throw Error("Param Error: Length of new values and index must be the same");e.forEach((function(e,n){r.push(e),i.push(t[n])}))}else if(e instanceof Ns){var o=e.values;if(!Array.isArray(t))throw Error("Param Error: index must be an array");if(t.length!==o.length)throw Error("Param Error: Length of new values and index must be the same");o.forEach((function(e,n){r.push(e),i.push(t[n])}))}else r.push(e),i.push(t);if(!n)return new Ns(r,{index:i,columns:this.columns,dtypes:this.dtypes,config:this.config});this.$setValues(r,!1),this.$setIndex(i)},Object.defineProperty(Ns.prototype,"dtype",{get:function(){return this.dtypes[0]},enumerable:!1,configurable:!0}),Object.defineProperty(Ns.prototype,"str",{get:function(){if("string"==this.dtypes[0])return new Es(this);throw new Error("Cannot call accessor str on non-string type")},enumerable:!1,configurable:!0}),Object.defineProperty(Ns.prototype,"dt",{get:function(){if("string"==this.dtypes[0])return new Bs(this);throw new Error("Cannot call accessor dt on non-string type")},enumerable:!1,configurable:!0}),Ns.prototype.toString=function(){var e,t=this.$config.getMaxRow;return(this.shape[0]>t?(t=this.iloc(["0:"+t]),e=t.index,t):(e=this.index,this)).values.map((function(t,n){return[e[n],t]}))},Ns.prototype.and=function(e){if(void 0===e)throw new Error("Param Error: other cannot be undefined");var t=[];if(e instanceof Ns){if(this.dtypes[0]!==e.dtypes[0])throw new Error("Param Error: Series must be of same dtype");if(this.shape[0]!==e.shape[0])throw new Error("Param Error: Series must be of same shape");this.values.forEach((function(n,r){t.push(Boolean(n)&&Boolean(e.values[r]))}))}else if("boolean"==typeof e)this.values.forEach((function(n){t.push(Boolean(n)&&Boolean(e))}));else{if(!Array.isArray(e))throw new Error("Param Error: other must be a Series, Scalar, or Array of Scalars");this.values.forEach((function(n,r){t.push(Boolean(n)&&Boolean(e[r]))}))}return new Ns(t,{index:this.index,config:Is({},this.config)})},Ns.prototype.or=function(e){if(void 0===e)throw new Error("Param Error: other cannot be undefined");var t=[];if(e instanceof Ns){if(this.dtypes[0]!==e.dtypes[0])throw new Error("Param Error: Series must be of same dtype");if(this.shape[0]!==e.shape[0])throw new Error("Param Error: Series must be of same shape");this.values.forEach((function(n,r){t.push(Boolean(n)||Boolean(e.values[r]))}))}else if("boolean"==typeof e)this.values.forEach((function(n){t.push(Boolean(n)||Boolean(e))}));else{if(!Array.isArray(e))throw new Error("Param Error: other must be a Series, Scalar, or Array of Scalars");this.values.forEach((function(n,r){t.push(Boolean(n)||Boolean(e[r]))}))}return new Ns(t,{index:this.index,config:Is({},this.config)})},Ns.prototype.getDummies=function(e){return bs(this,e)},Ns.prototype.iat=function(e){if("string"==typeof e)throw new Error("ParamError: row index must be an integer. Use .at to get a row by label.");return this.values[e]},Ns.prototype.at=function(e){if("string"!=typeof e)throw new Error("ParamError: row index must be a string. Use .iat to get a row by index.");return this.values[this.index.indexOf(e)]};var Fs=Ns;
/**
*  @license
* Copyright 2022 JsData. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.

* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ==========================================================================
*/new Bt,new Bt;
/**
*  @license
* Copyright 2022 JsData. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.

* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ==========================================================================
*/
var Rs=new Bt;
/**
*  @license
* Copyright 2022 JsData. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.

* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ==========================================================================
*/function Ps(){this.$labels={}}Ps.prototype.$getData=function(e){var t;if(e instanceof Array){if(!Rs.is1DArray(e))throw new Error("ValueError: data must be a 1D array.");t=e}else if(e instanceof Fs)t=e.values;else{if(!(e instanceof Vr.Tensor))throw new Error("ParamError: data must be one of Array, 1d Tensor or Series.");t=e.arraySync()}return t},Ps.prototype.fit=function(e){e=this.$getData(e),e=Array.from(new Set(e));var t={};return e.forEach((function(e,n){t[e]=n})),this.$labels=t,this},Ps.prototype.transform=function(e){var t=this,n=this.$getData(e).map((function(e){return void 0!==t.$labels[e]?t.$labels[e]:-1}));return e instanceof Array?n:e instanceof Fs?new Fs(n):Vr.tensor1d(n)},Ps.prototype.fitTransform=function(e){return this.fit(e),this.transform(e)},Ps.prototype.inverseTransform=function(e){var t=this,n=this.$getData(e).map((function(e){return Object.keys(t.$labels).find((function(n){return t.$labels[n]===e}))})).map((function(e){return isNaN(parseInt(e))?e:Number(e)}));return e instanceof Array?n:e instanceof Fs?new Fs(n):Vr.tensor1d(n)},Object.defineProperty(Ps.prototype,"nClasses",{get:function(){return Object.keys(this.$labels).length},enumerable:!1,configurable:!0}),Object.defineProperty(Ps.prototype,"classes",{get:function(){return this.$labels},enumerable:!1,configurable:!0}),new Bt,
/**
*  @license
* Copyright 2022 JsData. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.

* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ==========================================================================
*/
new Bt,
/**
*  @license
* Copyright 2022 JsData. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.

* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ==========================================================================
*/
/**
*  @license
* Copyright 2022 JsData. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.

* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ==========================================================================
*/
new Bt,
/**
*  @license
* Copyright 2022 JsData. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.

* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ==========================================================================
*/
Ls=function(e,t){return(Ls=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};var Ls,Us,zs=$s;if("function"!=typeof(Pa=Us=ms)&&null!==Pa)throw new TypeError("Class extends value "+String(Pa)+" is not a constructor or null");function Hs(){this.constructor=zs}function $s(e,t){return Us.call(this,e,t=void 0===t?{}:t)||this}Ls(zs,Pa),zs.prototype=null===Pa?Object.create(Pa):(Hs.prototype=Pa.prototype,new Hs);var Qs,Vs,qs=$s;function Gs(e,t){return Vs.call(this,e,t=void 0===t?{}:t)||this}Qs=function(e,t){return(Qs=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};var Ws=Gs;if("function"!=typeof(La=Vs=Fs)&&null!==La)throw new TypeError("Class extends value "+String(La)+" is not a constructor or null");function Ks(){this.constructor=Ws}Qs(Ws,La),Ws.prototype=null===La?Object.create(La):(Ks.prototype=La.prototype,new Ks);var Ys=Gs,Xs=n(115);
/**
*  @license
* Copyright 2022 JsData. All rights reserved.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.

* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ==========================================================================
*/function Js(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Zs(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}var eu=function(e,t,n){return t&&Js(e.prototype,t),n&&Js(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function")}));function tu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function nu(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}Zs(eu,"And",1),Zs(eu,"Or",2),Zs(eu,"Not",3);var ru=function(e,t,n){return t&&tu(e.prototype,t),n&&tu(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function")}));function iu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ou(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function au(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function su(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}nu(ru,"Date",1),nu(ru,"Number",2),nu(ru,"String",3),ou(Qo=function(e,t,n){return t&&iu(e.prototype,t),n&&iu(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function")})),"Match",1),ou(Qo,"Contain",2),ou(Qo,"Null",3),ou(Qo,"StartWith",4),ou(Qo,"EndWith",5),ou(Qo,"NoMatch",6),ou(Qo,"NoContain",7),ou(Qo,"NoNull",8),ou(Qo,"NoStartWith",9),ou(Qo,"NoEndWith",10);ko=Qo.Match,Ua=Qo.NoMatch,Ui=Qo.Contain,Eo=Qo.NoContain,ra=Qo.Null,za=Qo.NoNull,_a=Qo.StartWith,ta=Qo.NoStartWith,$a=Qo.EndWith,Po=Qo.NoEndWith;var uu=function(e,t,n){return t&&au(e.prototype,t),n&&au(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function")}));function cu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function lu(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function hu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function fu(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}su(uu,ko,(function(e,t,n){return 1==n&&(t=t.toUpperCase()),e=e.$data.map((function(e){return(e=1==n?String(e).toUpperCase():e)==t})),new Ys(e)})),su(uu,Ua,(function(e,t,n){return 1==n&&(t=t.toUpperCase()),e=e.$data.map((function(e){return!((e=1==n?String(e).toUpperCase():e)==t)})),new Ys(e)})),su(uu,Ui,(function(e,t,n){return 1==n&&(t=t.toUpperCase()),e=e.$data.map((function(e){return e=String(e),(e=1==n?e.toUpperCase():e).includes(t)})),new Ys(e)})),su(uu,Eo,(function(e,t,n){return 1==n&&(t=t.toUpperCase()),e=e.$data.map((function(e){return e=String(e),1==n&&(e=e.toUpperCase()),r=t,-1==e.search(r);var r})),new Ys(e)})),su(uu,ra,(function(e,t,n){return e=e.$data.map((function(e){return 1==n&&(e=String(e).toUpperCase()),!Boolean(e)})),new Ys(e)})),su(uu,za,(function(e,t,n){return e=e.$data.map((function(e){return 1==n&&(e=String(e).toUpperCase()),Boolean(e)})),new Ys(e)})),su(uu,_a,(function(e,t,n){return 1==n&&(t=t.toUpperCase()),e=e.$data.map((function(e){return e=String(e),(e=1==n?e.toUpperCase():e).startsWith(t)})),new Ys(e)})),su(uu,ta,(function(e,t,n){return 1==n&&(t=t.toUpperCase()),e=e.$data.map((function(e){return e=String(e),!(e=1==n?e.toUpperCase():e).startsWith(t)})),new Ys(e)})),su(uu,$a,(function(e,t,n){return 1==n&&(t=t.toUpperCase()),e=e.$data.map((function(e){return e=String(e),(e=1==n?e.toUpperCase():e).endsWith(t)})),new Ys(e)})),su(uu,Po,(function(e,t,n){return 1==n&&(t=t.toUpperCase()),e=e.$data.map((function(e){return e=String(e),!(e=1==n?e.toUpperCase():e).endsWith(t)})),new Ys(e)})),lu(Ro=function(e,t,n){return t&&cu(e.prototype,t),n&&cu(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function")})),"Equal",1),lu(Ro,"NoEqual",2),lu(Ro,"GreaterThan",3),lu(Ro,"GreaterEqual",4),lu(Ro,"LessThan",5),lu(Ro,"LessEqual",6),lu(Ro,"NoNull",8),lu(Ro,"Null",7);Ha=Ro.Equal,Yo=Ro.NoEqual,Ta=Ro.GreaterThan,Ae=Ro.GreaterEqual,Qa=Ro.LessThan,ca=Ro.LessEqual,Wo=Ro.NoNull,Ia=Ro.Null;var du=function(e,t,n){return t&&hu(e.prototype,t),n&&hu(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function")}));fu(du,Ha,(function(e,t){return e=e.$data.map((function(e){return Number(e)==t})),new Ys(e)})),fu(du,Yo,(function(e,t){return e=e.$data.map((function(e){return Number(e)!=t})),new Ys(e)})),fu(du,Ta,(function(e,t){return e=e.$data.map((function(e){return Number(e)>t})),new Ys(e)})),fu(du,Ae,(function(e,t){return e=e.$data.map((function(e){return Number(e)>=t})),new Ys(e)})),fu(du,Qa,(function(e,t){return e=e.$data.map((function(e){return Number(e)<t})),new Ys(e)})),fu(du,ca,(function(e,t){return e=e.$data.map((function(e){return Number(e)<=t})),new Ys(e)})),fu(du,Wo,(function(e,t){return e=e.$data.map((function(e){return!!Number(e)})),new Ys(e)})),fu(du,Ia,(function(e,t){return e=e.$data.map((function(e){return!Number(e)})),new Ys(e)}));var pu=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"];function mu(e){for(var t="",n=e;n>=pu.length;)n/=pu.length,--n,t+=pu[parseInt(n,10)%pu.length];return t+pu[e%=pu.length]}function gu(e){var t="",n="";try{for(var r=0;r<e.length;r+=1)"0"<=e.charAt(r)&&e.charAt(r)<="9"?n+=e.charAt(r):t+=e.charAt(r)}catch(e){}return[function(e){for(var t=0,n=0;n!==e.length;++n)t=26*t+e.charCodeAt(n)-64;return t-1}(t),parseInt(n,10)-1]}function Au(e,t){return"".concat(mu(e)).concat(t+1)}function vu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function bu(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function yu(){var e=new Date;return e.setHours(0,0,0,0),e}function wu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function xu(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}bu(ha=function(e,t,n){return t&&vu(e.prototype,t),n&&vu(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function")})),"今日","$(1)"),bu(ha,"本月初","$(2)"),bu(ha,"本年初","$(3)"),bu(ha,"本季度初","$(4)"),bu(ha,"本周一","$(5)"),bu(ha,"本月末","$(6)"),bu(ha,"本年末","$(7)"),bu(ha,"本季度末","$(8)"),bu(ha,"本周末","$(9)"),bu(ha,"昨日","$(11)"),bu(ha,"前天","$(12)"),bu(ha,"去年今日","$(13)"),bu(ha,"上月今日","$(14)"),bu(ha,"上月初","$(21)"),bu(ha,"去年本月初","$(22)"),bu(ha,"上年初","$(31)"),bu(ha,"前年初","$(32)"),bu(ha,"上季度初","$(41)"),bu(ha,"去年本季度初","$(42)"),bu(ha,"上周一","$(43)"),bu(ha,"明年初","$(51)"),bu(ha,"后年初","$(61)");Va=ha["今日"],Ga=ha["本月初"],ia=ha["本年初"],Ko=ha["本季度初"],aa=ha["本月末"],zi=ha["本周一"],Ca=ha["本月末"],Wa=ha["本年末"],Ea=ha["本季度末"],$o=ha["本周末"],fa=ha["昨日"],na=ha["前天"],Ka=ha["去年今日"],Zo=ha["上月今日"],sa=ha["上月初"],So=ha["去年本月初"],ja=ha["上年初"],Fa=ha["前年初"],la=ha["上季度初"],Zn=ha["去年本季度初"],Bt=ha["上周一"],Pa=ha["明年初"],La=ha["后年初"];var Cu=function(e,t,n){return t&&wu(e.prototype,t),n&&wu(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function")}));function ku(e,t){var n,r,i,o,a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(a)return r=!(n=!0),{s:function(){a=a.call(e)},n:function(){var e=a.next();return n=e.done,e},e:function(e){r=!0,i=e},f:function(){try{n||null==a.return||a.return()}finally{if(r)throw i}}};if(Array.isArray(e)||(a=function(e,t){var n;if(e)return"string"==typeof e?Eu(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Eu(e,t):void 0}(e))||t&&e&&"number"==typeof e.length)return a&&(e=a),o=0,{s:t=function(){},n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Eu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Su(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function _u(e,t,n,r){var i,o=[],a=ku(e);try{for(a.s();!(i=a.n()).done;)i.value,o.push(n)}catch(e){a.e(e)}finally{a.f()}return r?o:new Ys(o)}function Ou(e){if(e<200){if((e-=100)in du)return du[e]}else if((e-=200)in uu)return uu[e];return _u}function Tu(e,t,n,r){return Ou(t+200)(e,n,r)}function Du(e,t,n,r){return Ou(t+100)(e,n,r)}function Bu(e,t,n,r){var i,o="logic"in t?t.logic:1,a=null,s=ku(t.params);try{for(s.s();!(i=s.n()).done;){var u=i.value,c=("params"in u?Bu:Nu)(e,u,n);a=a?ju(a.$data,o,c.$data):c}}catch(e){s.e(e)}finally{s.f()}return a||_u(e.$index,0,1==o)}function Iu(e,t,n,r){r=(r?Mu:Bu)(e,t,n);try{var i=[];if(r.$data.forEach((function(e,t){e&&i.push(t)})),i.length<1)return new qs([],{columns:e.$columns});e=e.iloc({rows:i}),e=new qs(e.$data,{columns:e.$columns})}catch(e){}return e}function Mu(e,t,n){for(var r=(t=t.params).length,i=null,o=0;o<r;o++){var a=t[o].params,s="logic"in(s=t[o])?s.logic:1,u=null;if(1<a.length)for(var c=0;c<a.length;c++){var l,h=a[c];u=0==c?Nu(e,h,n):(l=a[c-1],h=Nu(e,h,n),l="logic"in l?l.logic:1,ju(u.$data,l,h.$data))}else u=Nu(e,a[0],n);i=i?ju(i.$data,s,u.$data):u}return i}xu(Cu,Va,(function(){var e=new Date;return e.setHours(0,0,0,0),e.getTime()})),xu(Cu,Ga,(function(){var e=new Date;return e.setDate(1),e.setHours(0,0,0,0),e.getTime()})),xu(Cu,ia,(function(){var e=new Date;return e.setMonth(0),e.setDate(1),e.setHours(0,0,0,0),e.getTime()})),xu(Cu,Ko,(function(){var e=new Date,t=e.getMonth();t=3*(Math.floor((t+3)/3)-1);return new Date(e.getFullYear(),t,1).getTime()})),xu(Cu,aa,(function(){var e=new Date;return 11===e.getMonth()?e.setMonth(0):e.setMonth(e.getMonth()+1),e.setDate(1),e.setHours(0,0,0,0),e.getTime()})),xu(Cu,zi,(function(){var e=new Date,t=0===(t=(e.setHours(0,0,0,0),e.getDay()))?-6:1-t,n=new Date(e);return n.setDate(e.getDate()+t),n.getTime()})),xu(Cu,Ca,(function(){var e,t=yu();return e=(t=t).getFullYear(),t=t.getMonth(),e=new Date(e,t+1,1),(t=new Date(e)).setDate(e.getDate()-1),t.getTime()})),xu(Cu,Wa,(function(){var e,t=yu();return t=(t=t).getFullYear(),t=new Date(t+1,0,1),(e=new Date(t)).setDate(t.getDate()-1),e.getTime()})),xu(Cu,Ea,(function(){return function(e){var t,n=e.getFullYear(),r=(e=e.getMonth(),n%4==0&&n%100!=0||n%400==0);switch(e=3*Math.floor(e/3)+2){case 2:t=r?29:28;break;case 5:case 8:case 10:t=30;break;default:t=31}return new Date(n,e,t)}(yu()).getTime()})),xu(Cu,$o,(function(){var e,t,n,r,i,o=yu();return e=(o=o).getFullYear(),t=o.getMonth(),n=o.getDate(),i=[],0==(r=o.getDay())?(i.push(o),i.push(new Date(e,t,n+1))):6==r?(i.push(new Date(e,t,n-1)),i.push(o)):(r=1+(o=6-r),i.push(new Date(e,t,n+o)),i.push(new Date(e,t,n+r))),i[1].getTime()})),xu(Cu,fa,(function(){return t=(e=yu()).getDate(),e.setDate(t-1),e.getTime();var e,t})),xu(Cu,na,(function(){return t=(e=yu()).getDate(),e.setDate(t-2),e.getTime();var e,t})),xu(Cu,Ka,(function(){return e=(n=yu()).getFullYear(),t=n.getMonth(),n=n.getDate(),new Date(e-1,t,n).getTime();var e,t,n})),xu(Cu,Zo,(function(){return e=(n=yu()).getFullYear(),t=n.getMonth(),n=n.getDate(),new Date(0===t?e-1:e,0===t?11:t-1,n).getTime();var e,t,n})),xu(Cu,sa,(function(){return e=(t=yu()).getFullYear(),t=t.getMonth(),new Date(0===t?e-1:e,0===t?11:t-1,1).getTime();var e,t})),xu(Cu,So,(function(){return e=(t=yu()).getFullYear(),t=t.getMonth(),new Date(e-1,t,1).getTime();var e,t})),xu(Cu,ja,(function(){var e=yu();return e=(e=e).getFullYear(),new Date(e-1,1,1).getTime()})),xu(Cu,Fa,(function(){var e=yu();return e=(e=e).getFullYear(),new Date(e-2,1,1).getTime()})),xu(Cu,la,(function(){return e=(t=new Date).getFullYear(),(t=t.getMonth()-3)<0&&(t+=12,--e),t=3*Math.floor(t/3),new Date(e,t,1).getTime();var e,t})),xu(Cu,Zn,(function(){return e=(t=new Date).getFullYear(),t=t.getMonth(),t=Math.floor((t+3)/3),new Date(e-1,3*(t-1),1).getTime();var e,t})),xu(Cu,Bt,(function(){return getLastWeekStart().getTime()})),xu(Cu,Pa,(function(){return e=yu().getFullYear(),new Date(e+1,1,1).getTime();var e})),xu(Cu,La,(function(){return e=yu().getFullYear(),new Date(e+2,1,1).getTime();var e}));var ju=function(e,t,n){Su(r={},eu.And,(function(e,t){return Xs.tensor1d(e,"bool").logicalAnd(Xs.tensor1d(t,"bool"))})),Su(r,eu.Or,(function(e,t){return Xs.tensor1d(e,"bool").logicalOr(Xs.tensor1d(t,"bool"))})),Su(r,eu.Not,(function(e,t){return Xs.tensor1d(e,"bool").logicalNot(Xs.tensor1d(t,"bool"))}));var r=(r=r[t](e,n).arraySync()).map((function(e){return Boolean(e)}));return new Ys(r)},Nu=function(e,t,n){var r=_u(e.$index,0,!0);try{for(var i in n){var o=n[i],a=t.column;if(i==(a=a.includes(".")?a.split(".")[1]:a)){var s=e[o.name],u=t.value,c=Number(t.type),l=("data_type"in t?t:o).data_type,h=t.date_value_type;r=(l==ru.String?(u=String(u),Tu):(l==ru.Number?u=Number(u):l==ru.Date&&(u=2==h?Cu[u]():new Date(u).getTime()-288e5),Du))(s,c,u);break}}return r}catch(e){return r}},Fu=function(e,t,n,r,i,o,a,s){if(r=function(e,t,n,r,i){if(e=e.params){var o=e.length,a=null;if(o)for(var s=0;s<o;s++){var u=e[s].params,c="logic"in(c=e[s])?c.logic:1,l=null;if(1<u.length)for(var h=0;h<u.length;h++){var f,d=u[h];0==h?l=Ru(d,t,n,r,i):(f=u[h-1],d.column&&(d=Ru(d,t,n,r,i),f="logic"in f?f.logic:1,l=ju(l.$data,f,d.$data)))}else l=Ru(u[0],t,n,r,i);a=a?ju(a.$data,c,l.$data):l}return a}}(r,n,s,t,a)){var u,c=!0,l=ku(r.$data);try{for(l.s();!(u=l.n()).done;)if(!u.value){c=!1;break}}catch(e){l.e(e)}finally{l.f()}if(c)return o}return null},Ru=function(e,t,n,r,i){var o;Array.isArray(r[0])?(o=r.map((function(e){return new Array(e.length).fill(!0)})),new Ys(o)):new Ys([!0]);try{for(var a,s,u,c,l,h=e.cname,f=-1,d=0;d<t.$columns.length;d++)if(function(e){if(e){var t=e.split("_");e="";for(var n=0;n<t.length;n++){var r=t[n];if(n===t.length-1)break;e+=0===n?r:"_".concat(r)}}return e}(t.$columns[d])==h){f=d;break}return-1!=f?(a={$data:Array.isArray(r[0])?r.map((function(e){return e[f]})):[r[f]]},s=e.value,u=e.type,((c="data_type"in e?e.data_type:3)==ru.String?(s=String(s),Tu):(c==ru.Number?s=Number(s):c==ru.Date&&(s=new Date(s).getTime()-288e5),Du))(a,u,s)):Array.isArray(r[0])?(l=r.map((function(e){return new Array(e.length).fill(!1)})),new Ys(l)):new Ys([!1])}catch(e){return Array.isArray(r[0])?(o=r.map((function(e){return new Array(e.length).fill(!1)})),new Ys(o)):new Ys([!1])}},Pu={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Lu;const Uu=new Uint8Array(16),zu=[];for(let e=0;e<256;++e)zu.push((e+256).toString(16).slice(1));var Hu=function(e,t,n){if(Pu.randomUUID&&!t&&!e)return Pu.randomUUID();const r=(e=e||{}).random||(e.rng||function(){if(Lu=Lu||"undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto))return Lu(Uu);throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported")})();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return function(e,t=0){return zu[e[t+0]]+zu[e[t+1]]+zu[e[t+2]]+zu[e[t+3]]+"-"+zu[e[t+4]]+zu[e[t+5]]+"-"+zu[e[t+6]]+zu[e[t+7]]+"-"+zu[e[t+8]]+zu[e[t+9]]+"-"+zu[e[t+10]]+zu[e[t+11]]+zu[e[t+12]]+zu[e[t+13]]+zu[e[t+14]]+zu[e[t+15]]}(r)};function $u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Qu(e,t){var n,r=null,i=!1,o=(Array.isArray(e)?r=new qs(e):e.columns?(i=!0,n=[],e.columns=e.columns.map((function(e){return n.includes(e)?Hu():(n.push(e),e)})),r=new qs(e.data,{columns:e.columns})):e.data&&(r=new qs(e.data)),[]);if(t.forEach((function(e){r.$columns.includes(e.name)&&o.push(e)})),o.length<1)return i?qu(r):e.data||e;a={logic:1,params:[]},o.forEach((function(e){var t,n=Number(e.valueType),r=1;if(e.conditionType&&(r=e.conditionType),e.rangeType)if(Array.isArray(e.value))e.value.forEach((function(t,r){var i;t&&(0==r?((i=1)==e.rangeType||2==e.rangeType?i=4:3!=e.rangeType&&4!=e.rangeType||(i=3),a.params.push({column:e.name,data_type:n,type:i,value:t})):1==r&&((i=1)==e.rangeType?i=6:2==e.rangeType?i=5:3==e.rangeType?i=6:4==e.rangeType&&(i=5),a.params.push({column:e.name,data_type:n,type:i,value:t,ignoreCase:e.ignoreCase})))}));else for(var i in e.value){var o;(i=e.value[i])&&("start"==e.key?((o=1)==e.rangeType||2==e.rangeType?o=4:3!=e.rangeType&&4!=e.rangeType||(o=3),a.params.push({column:e.name,data_type:n,type:o,value:i})):"end"==e.key&&((o=1)==e.rangeType?o=6:2==e.rangeType?o=5:3==e.rangeType?o=6:4==e.rangeType&&(o=5),a.params.push({column:e.name,data_type:n,type:o,value:i,ignoreCase:e.ignoreCase})))}else Array.isArray(e.value)?(t={logic:2,params:[]},e.value.forEach((function(i){t.params.push({column:e.name,data_type:n,type:r,value:i})})),a.params.push(t)):a.params.push({column:e.name,data_type:n,type:r,value:e.value,ignoreCase:e.ignoreCase})}));var a;t=r,i=o=a,e=r.$columns;i=Vu(t,i,e);try{var s=[];if(i.$data.forEach((function(e,t){e&&s.push(t)})),s.length<1)return new qs([],{columns:t.$columns});t=t.iloc({rows:s}),t=new qs(t.$data,{columns:t.$columns})}catch(e){}return qu(t)}var Vu=function e(t,n,r){var i,o="logic"in n?n.logic:1,a=null,s=function(e,t){var n,r,i,o,a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(a)return r=!(n=!0),{s:function(){a=a.call(e)},n:function(){var e=a.next();return n=e.done,e},e:function(e){r=!0,i=e},f:function(){try{n||null==a.return||a.return()}finally{if(r)throw i}}};if(Array.isArray(e)||(a=function(e,t){var n;if(e)return"string"==typeof e?$u(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$u(e,t):void 0}(e))||t&&e&&"number"==typeof e.length)return a&&(e=a),o=0,{s:t=function(){},n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(n.params);try{for(s.s();!(i=s.n()).done;){var u=i.value,c="params"in u?e(t,u,r):function(e,t){var n=_u(e.$index,0,!0);try{var r,i,o,a,s=e[t.column];return s&&(r=t.value,i=Number(t.type),o=t.data_type,a=t.ignoreCase,n=(o==ru.String?(r=String(r),Tu):(o==ru.Number?r=Number(r):o==ru.Date&&(r=new Date(r).getTime()),Du))(s,i,r,a)),n}catch(e){return n}}(t,u);a=a?ju(a.$data,o,c.$data):c}}catch(e){s.e(e)}finally{s.f()}return a||_u(t.$index,0,1==o)},qu=function(e){var t=e.$columns,n=(e=e.$data,[]);return t?(e.forEach((function(e){var r={};t.forEach((function(t,n){r[t]=e[n]})),n.push(r)})),n):e};function Gu(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Wu(e,t){return e=e||{},t=t||{},Object.assign({},e,t)}function Ku(e){var t=e.params,n=e.body,r={method:e.method,url:e.url,headers:e.headers,responseType:"json"};return"GET"==e.method?r.params=t:(e.params=t,r.data=n),Mr(r)}function Yu(e,t,n){var r=e.params,i={},o=[];r.forEach((function(e){var t=e.value;Array.isArray(e.value)&&(t=e.value.join()),i[e.name]=t,o.push({name:e.name,value:t})})),n&&(i={params:o,names:[]}),r={method:e.method,url:e.url,headers:e.headers};return"GET"==e.method?r.params=i:r.data=i,Mr(r).then((function(e){return e=e.data,e=qu({$data:e.data,$columns:e.columns}),{name:t,response_data:e}})).catch((function(e){}))}function Xu(e){return Promise.all(e)}function Ju(e){return Object.assign({row_offset:0,col_offset:0,r_i:0,c_i:0,parent:null,detail:!1,p_r_kvmap:{},p_c_kvmap:{},G_in:0,danfoDF:null},e)}function Zu(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1;return e.includes(".")?e.split(".")[t]:e}new RegExp(/\.{1}[A-Za-z]+\([^\(]*\)/g);var ec=function(e){return!(!e||e.length<1||(!1,(e=e[0]).response_data&&Array.isArray(e.response_data)))},tc=function(e,t){var n,r=[],i=function(e,t){var n,r,i,o,a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(a)return r=!(n=!0),{s:function(){a=a.call(e)},n:function(){var e=a.next();return n=e.done,e},e:function(e){r=!0,i=e},f:function(){try{n||null==a.return||a.return()}finally{if(r)throw i}}};if(Array.isArray(e)||(a=function(e,t){var n;if(e)return"string"==typeof e?Gu(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Gu(e,t):void 0}(e))||t&&e&&"number"==typeof e.length)return a&&(e=a),o=0,{s:t=function(){},n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(t);try{for(i.s();!(n=i.n()).done;){var o=n.value;if(o.name==e){r=o.response_data;break}}}catch(e){i.e(e)}finally{i.f()}return r};function nc(e,t){var n,r=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)),r}function rc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nc(Object(n),!0).forEach((function(t){var r,i;r=e,i=n[t=t],t in r?Object.defineProperty(r,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[t]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ic(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var oc={type:"text",placeholder:"请输入内容"},ac=function(){function e(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"",r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:function(){},o=4<arguments.length&&void 0!==arguments[4]?arguments[4]:function(){},a=5<arguments.length&&void 0!==arguments[5]?arguments[5]:function(){},s=6<arguments.length&&void 0!==arguments[6]?arguments[6]:function(){},u=7<arguments.length?arguments[7]:void 0,c=8<arguments.length?arguments[8]:void 0,l=this,h=e;if(!(l instanceof h))throw new TypeError("Cannot call a class as a function");this.options=Wu(oc,t),this.value=n,this.icon=u,this.change=i,this.input=o,this.blur=a,this.click=s,this.parentClick=c,this.style=r,this.inputEl=null,this.inputInnerStyle={},this.initStyle(this.style),this.el=this.init(),this.options.disabled?this.disable():this.enable()}var t,n;return t=e,(n=[{key:"init",value:function(){var e=this,t=(this.inputEl=s("input","".concat(pe,"-input__inner")),s("div","".concat(pe,"-input")).css(this.style).children(this.inputEl.css(this.inputInnerStyle).attr(rc(rc({},this.options),{},{value:this.value})).on("change",(function(t){e.change(t)})).on("input",(function(t){e.value=t.target.value,e.input(e.value)})).on("blur",(function(t){e.blur(t.target.value)})).on("click",(function(t){"file"!=e.options.type&&(t.stopPropagation(),t.preventDefault()),e.click(t)}))));return this.parentClick&&t.on("click",(function(t){t.stopPropagation(),e.parentClick(t)})),this.icon&&t.children(s("div").children(s("div").css({width:"14px",height:"14px"}).innerHTML(this.icon)).css({position:"absolute",height:"100%",right:"5px",top:"0",display:"flex","align-items":"center"})),t}},{key:"setStyle",value:function(e){"width"in e&&(this.el.el.style.width=e.width),"cursor"in e&&(this.inputEl.el.style.cursor=e.cursor),"height"in e&&(this.inputEl.el.style.height=e.height,this.el.el.style.height=e.height),"max-width"in e&&(this.el.el.style.maxWidth=e["max-width"])}},{key:"disable",value:function(){var e=ve()(this.el.el);e.find("input").attr("disabled","disabled"),e.addClass("is-disabled")}},{key:"enable",value:function(){var e=ve()(this.el.el);e.find("input").removeAttr("disabled"),e.removeClass("is-disabled")}},{key:"onBlur",value:function(e){this.inputEl.on("blur",(function(t){e(t)}))}},{key:"initStyle",value:function(e){"height"in e&&(this.inputInnerStyle.height=e.height,delete e.height),"padding"in e&&(this.inputInnerStyle.padding=e.padding,delete e.padding),"textAlign"in e&&(this.inputInnerStyle.textAlign=e.textAlign,delete e.textAlign),"cursor"in e&&(this.inputInnerStyle.cursor=e.cursor,delete e.cursor)}},{key:"getValue",value:function(){return this.value}},{key:"setValue",value:function(e){ve()(this.el.el).find("input").val(e),this.value=e}},{key:"show",value:function(){this.el.show()}},{key:"hide",value:function(){this.el.hide()}}])&&ic(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function sc(e){return function(e){if(Array.isArray(e))return uc(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){var n;if(e)return"string"==typeof e?uc(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?uc(e,t):void 0}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function uc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function cc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function lc(){var e=this;be(window,"keydown",(function(t){(function(e){var t=e.keyCode;e.altKey,"none"!=this.el.el.style.display&&(e.stopImmediatePropagation(),13===t&&(t=e.target.parentNode.getAttribute("data-key"),e=e.target.value,this.itemClick(t,e)))}).call(e,t)}))}var hc=[{key:"copy",title:z("contextmenu.copy"),label:"Ctrl+C"},{key:"cut",title:z("contextmenu.cut"),label:"Ctrl+X"},{key:"paste",title:z("contextmenu.paste"),label:"Ctrl+V"},{key:"paste-value",title:z("contextmenu.pasteValue"),label:"Ctrl+Shift+V"},{key:"paste-format",title:z("contextmenu.pasteFormat"),label:"Ctrl+Alt+V"},{key:"divider"},{key:"insert-row",title:z("contextmenu.insertRow")},{key:"insert-column-left",title:z("contextmenu.insertColumnLeft")},{key:"insert-column-right",title:z("contextmenu.insertColumnRight")},{key:"delete-row",title:z("contextmenu.deleteRow")},{key:"delete-column",title:z("contextmenu.deleteColumn")},{key:"delete-cell-text",title:z("contextmenu.deleteCellText")},{key:"hide",title:z("contextmenu.hide")},{key:"unhide",title:function(){return"取消隐藏"}},{key:"adjustHeightOrWight",title:function(){return"row"===this.mode?"行高":"列宽"}},{key:"divider"},{key:"validation",title:z("contextmenu.validation")},{key:"divider"},{key:"cell-printable",title:z("contextmenu.cellprintable")},{key:"cell-non-printable",title:z("contextmenu.cellnonprintable")},{key:"divider"},{key:"cell-editable",title:z("contextmenu.celleditable")},{key:"cell-non-editable",title:z("contextmenu.cellnoneditable")}],fc={"insert-column-left":"icLeftEl","insert-column-right":"icRightEl"};function dc(){var e=this;return hc.map((function(t){return function(e){var t=this;return"divider"===e.key?s("div","".concat(pe,"-item divider")):"insert-column-left"===e.key||"insert-column-right"===e.key?(this[fc[e.key]]=new ac({placeholder:""},1,{width:"50px",height:"20px"}),this[fc[e.key]].el.attr("data-key",e.key),s("div","".concat(pe,"-item")).on("click",(function(){var n=t[fc[e.key]].getValue();t.itemClick(e.key,n)})).children(e.title(),s("div","label").css("opacity","1").children(this[fc[e.key]].el))):s("div","".concat(pe,"-item")).on("click",(function(){t.itemClick(e.key),t.hide()})).children(e.title(),s("div","label").child(e.label||""))}.call(e,t)}))}var pc=function(){function e(t){var n=1<arguments.length&&void 0!==arguments[1]&&arguments[1],r=2<arguments.length?arguments[2]:void 0,i=this,o=e;if(!(i instanceof o))throw new TypeError("Cannot call a class as a function");this.mode="row",this.menuItems=dc.call(this),this.selector=r,this.el=(i=s("div","".concat(pe,"-contextmenu"))).children.apply(i,sc(this.menuItems)).hide(),this.viewFn=t,this.itemClick=function(){},this.isHide=n,this.setMode("range"),lc.call(this)}var t,n;return t=e,(n=[{key:"setModeVal",value:function(e){this.mode=e,this.setMode(this.mode)}},{key:"setMode",value:function(e){var t=this.menuItems[13],n=this.menuItems[14],r=this.menuItems[15],i="";"col"==e?this.hideOrShow(!(i="列宽")):"row"==e&&(i="行高",this.hideOrShow(!0)),"col"===e||"row"===e?(t.show(),n.show(),r.show(),n.innerHTML(i)):(t.hide(),n.hide(),r.hide(),this.hideOrShow())}},{key:"hideOrShow",value:function(e){var t=this.menuItems[6],n=this.menuItems[7],r=this.menuItems[8],i=this.menuItems[9],o=this.menuItems[10];0==e?(t.hide(),i.hide(),n.show(),r.show(),o.show()):(1==e?(t.show(),i.show()):(t.hide(),i.hide()),n.hide(),r.hide(),o.hide())}},{key:"hide",value:function(){var e=this.el;e.hide(),we(e)}},{key:"show",value:function(){var e=(e=this.selector.range).eci-e.sci+1;this.icLeftEl.setValue(e),this.icRightEl.setValue(e),this.el.show()}},{key:"setPosition",value:function(e,t){var n,r,i,o;this.isHide||(n=this.el,this.show(),r=n.offset().width,o=(i=this.viewFn()).height/2,i.width-(e=e)<=r&&(e-=r),n.css("left","".concat(e,"px")),o<t?n.css("bottom","".concat(i.height-t,"px")).css("max-height","".concat(t-180,"px")).css("top","auto"):n.css("top","".concat(t,"px")).css("max-height","".concat(i.height-t,"px")).css("bottom","auto"),xe(n))}}])&&cc(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function mc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var gc=function(){function e(t,n,r,i){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.tip=U("toolbar.".concat(t.replace(/-[a-z]/g,(function(e){return e[1].toUpperCase()})))),n&&(this.tip+=" (".concat(n,")")),this.tag=t,this.shortcut=n,this.value=r,this.el=this.element(),this.change=function(){}}var t,n;return t=e,(n=[{key:"element",value:function(){var e=s("div","".concat(pe,"-toolbar-item"));return"bgcolor"!=this.tag&&"color"!=this.tag||e.attr({id:"".concat(pe,"-").concat(this.tag)}),e}},{key:"setState",value:function(){}}])&&mc(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Ac(e){return(Ac="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function vc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function bc(){return(bc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=xc(e)););return e}(e,t);if(r)return(r=Object.getOwnPropertyDescriptor(r,t)).get?r.get.call(arguments.length<3?e:n):r.value}).apply(this,arguments)}function wc(e,t){return(wc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function xc(e){return(xc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Cc=function(){var e=r,t=gc;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&wc(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=xc(e);n=t?(n=xc(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===Ac(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){var e=this,t=r;if(e instanceof t)return n.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return e=r,(t=[{key:"dropdown",value:function(){}},{key:"getValue",value:function(e){return e}},{key:"element",value:function(){var e=this,t=this.tag;return this.dd=this.dropdown(),this.dd.change=function(n){return e.change(t,e.getValue(n))},bc(xc(r.prototype),"element",this).call(this).child(this.dd)}},{key:"setState",value:function(e){if(e){this.value=e,this.dd.setTitle(e);try{"valign"!=this.className&&"align"!=this.className||this.classValue==e&&this.el.active(!0)}catch(e){}}}},{key:"active",value:function(){return this.el.hasClass("active")}}])&&vc(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),r}();function kc(e){return(kc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ec(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Sc(e,t){return(Sc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function _c(e){return(_c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Oc=function(){var e=r,t=a;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Sc(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=_c(e);n=t?(n=_c(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===kc(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(e,t,i,o){var a=this,u=r;if(!(a instanceof u))throw new TypeError("Cannot call a class as a function");(a=n.call(this,"div","".concat(pe,"-dropdown ").concat(o))).title=e,a.change=function(){},a.headerClick=function(){},"string"==typeof e?a.title=s("div","".concat(pe,"-dropdown-title")).child(e):i&&a.title.addClass("arrow-left"),a.headerEl=s("div","".concat(pe,"-dropdown-header")),a.headerEl.css("display","flex");for(var c=arguments.length,l=new Array(4<c?c-4:0),h=4;h<c;h++)l[h-4]=arguments[h];return a.setContentChildren.apply(a,l),a.children(a.headerEl),a}return e=r,(t=[{key:"setContentChildren",value:function(){var e;this.headerEl.html(""),0<arguments.length&&(e=this.headerEl).children.apply(e,arguments)}},{key:"setTitle",value:function(e){this.title.html(e),this.hide()}},{key:"show",value:function(){var e=this;this.contentEl.show(),this.parent().active(),xe(this.parent(),(function(){e.hide()}))}},{key:"hide",value:function(){this.parent().active(!1),we(this.parent())}}])&&Ec(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),r}();function Tc(e){return(Tc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Dc(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Bc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ic(e,t){return(Ic=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Mc(e){return(Mc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function jc(e){return s("div","".concat(pe,"-item1")).child(new ct(e))}var Nc=function(){var e=r,t=Oc;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ic(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Mc(e);n=t?(n=Mc(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===Tc(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(e,t,i){var o,a;if(this instanceof r)return e=i?(a=new ct(i),e.map((function(e){return jc(i).on("click",(function(){o.mySetTitle(e),o.change(t)}))}))):(a=new ct("align-".concat(t)),e.map((function(e){return jc("align-".concat(e)).on("click",(function(){o.setTitle(e),o.change(e)}))}))),o=n.call.apply(n,[this,a,"auto",!0,{dropdownClass:"bottom-left"}].concat(function(e){return function(e){if(Array.isArray(e))return Dc(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){var n;if(e)return"string"==typeof e?Dc(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Dc(e,t):void 0}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e)));throw new TypeError("Cannot call a class as a function")}return e=r,(t=[{key:"mySetTitle",value:function(e){this.title.setName("".concat(e)),this.hide()}},{key:"setTitle",value:function(e){this.title.setName("align-".concat(e)),this.hide()}}])&&Bc(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),r}();function Fc(e){return(Fc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Rc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Pc(e,t){return(Pc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Lc(e){return(Lc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Uc=function(){var e=r,t=Cc;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Pc(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Lc(e);n=t?(n=Lc(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===Fc(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(e){if(this instanceof r)return(e=n.call(this,"align","",e,"alignLeft")).className="align",e.classValue="left",e;throw new TypeError("Cannot call a class as a function")}return e=r,(t=[{key:"dropdown",value:function(){var e=this.value;return new Nc(["left"],e)}}])&&Rc(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),r}();function zc(e){return(zc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Hc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function $c(e,t){return($c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Qc(e){return(Qc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Vc=function(){var e=r,t=Cc;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$c(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Qc(e);n=t?(n=Qc(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===zc(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(e){if(this instanceof r)return(e=n.call(this,"valign","",e,"valignTop")).className="valign",e.classValue="top",e;throw new TypeError("Cannot call a class as a function")}return e=r,(t=[{key:"dropdown",value:function(){var e=this.value;return new Nc(["top"],e)}}])&&Hc(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),r}();function qc(e){return(qc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Gc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Wc(){return(Wc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Yc(e)););return e}(e,t);if(r)return(r=Object.getOwnPropertyDescriptor(r,t)).get?r.get.call(arguments.length<3?e:n):r.value}).apply(this,arguments)}function Kc(e,t){return(Kc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Yc(e){return(Yc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Xc=function(){var e=r,t=gc;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Kc(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Yc(e);n=t?(n=Yc(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===qc(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){var e=this,t=r;if(e instanceof t)return n.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return e=r,(t=[{key:"element",value:function(){var e=this;return Wc(Yc(r.prototype),"element",this).call(this).child(new ct(this.tag)).on("click",(function(){return e.click()}))}},{key:"click",value:function(){var e=parseInt(this.el.attr("click-count"))||0;"indent"===this.tag?(this.el.attr("click-count",e+=1),this.change(this.tag,e),this.change("indentIsAdd",!0)):"indentReduce"===this.tag?(this.change(this.tag,e=--e<0?0:e),this.change("indentIsAdd",!1)):this.change(this.tag,this.toggle())}},{key:"setState",value:function(e,t){void 0===e?this.el.active(!1):("add"==t?this.el.active(e):"reduce"==t&&this.el.active(!e),t||this.el.active(e))}},{key:"toggle",value:function(){return this.el.toggle()}},{key:"getParentdElement",value:function(e,t){for(var n=e.childNodes,r="",i=0;i<n.length;i++){var o=n[i];if(-1!=o.className.indexOf(t)){r=o;break}}return r}},{key:"active",value:function(){return this.el.hasClass("active")}},{key:"removeClass",value:function(e,t,n){for(var r=(n=n||e.getAttribute("class")).split(" "),i=0;i<r.length;i++)r[i]==t&&(r.splice(i,1),i--);n=r.join(" "),e.setAttribute("class",n)}}])&&Gc(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),r}();function Jc(e){return(Jc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Zc(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function el(e,t){return(el=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function tl(e){return(tl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var nl=function(){var e=r,t=Xc;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&el(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=tl(e);n=t?(n=tl(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===Jc(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){if(this instanceof r)return n.call(this,"autofilter");throw new TypeError("Cannot call a class as a function")}return e=r,(t=[{key:"setState",value:function(){}}])&&Zc(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),r}();function rl(e){return(rl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function il(e,t){return(il=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ol(e){return(ol=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var al=function(){var e=r,t=Xc;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&il(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ol(e);n=t?(n=ol(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===rl(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){if(this instanceof r)return n.call(this,"font-bold","Ctrl+B");throw new TypeError("Cannot call a class as a function")}return e=r,Object.defineProperty(e,"prototype",{writable:!1}),e}();function sl(e){return(sl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ul(e,t){return(ul=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function cl(e){return(cl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ll=function(){var e=r,t=Xc;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ul(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=cl(e);n=t?(n=cl(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===sl(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){if(this instanceof r)return n.call(this,"font-italic","Ctrl+I");throw new TypeError("Cannot call a class as a function")}return e=r,Object.defineProperty(e,"prototype",{writable:!1}),e}();function hl(e){return(hl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fl(e,t){return(fl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function dl(e){return(dl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var pl=function(){var e=r,t=Xc;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&fl(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=dl(e);n=t?(n=dl(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===hl(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){if(this instanceof r)return n.call(this,"strike","Ctrl+U");throw new TypeError("Cannot call a class as a function")}return e=r,Object.defineProperty(e,"prototype",{writable:!1}),e}();function ml(e){return(ml="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function gl(e,t){return(gl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Al(e){return(Al=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var vl=function(){var e=r,t=Xc;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&gl(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Al(e);n=t?(n=Al(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===ml(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){if(this instanceof r)return n.call(this,"underline","Ctrl+U");throw new TypeError("Cannot call a class as a function")}return e=r,Object.defineProperty(e,"prototype",{writable:!1}),e}();function bl(e){return(bl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function yl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function wl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function xl(e,t){return(xl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Cl(e){return(Cl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var kl=function(){var e=r,t=a;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xl(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Cl(e);n=t?(n=Cl(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===bl(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(e,t,i,o){if(!((a=this)instanceof(u=r)))throw new TypeError("Cannot call a class as a function");var a=o.noOverflow,u=o.dropdownClass||"",c=o.arrowClass||"",l=o.titleClass||"",h=o.showTitle,f=o.headerClass||"",d=(o.contentClass,o.addContent),p=o.isDropdown,m=o.isZindex,g=o.id,A=(o.iconName,n.call(this,"div","".concat(pe,"-dropdown ").concat(u)));g&&A.attr({id:g}),A.noOverflow=a,A.title=e,A.iszindex=m,A.change=function(){},A.headerClick=function(){},A.width=t,o=p?"":"".concat(pe,"-select-dropdown");A.contentEl=s("div","".concat(pe,"-dropdown-content ").concat(o)).hide(),a&&A.contentEl.css({overflow:"visible"}),m?A.contentEl.css({width:t,"z-index":1e3}):A.contentEl.css({width:t});for(var v=arguments.length,b=new Array(4<v?v-4:0),y=4;y<v;y++)b[y-4]=arguments[y];return A.setContentChildren.apply(A,b),A.headerEl=s("div","".concat(pe,"-dropdown-header ").concat(f)),"string"==typeof e?(A.title=s("div","".concat(pe,"-dropdown-title ").concat(l)).child(e),"Arial"==e?(A.title.css({width:"110px","text-align":"left","background-color":"#fff"}),A.headerEl.css({border:"1px solid #e1e2e4",borderRight:"none"})):"10"==e&&(A.title.css({width:"54px","text-align":"left","background-color":"#fff"}),A.headerEl.css({border:"1px solid #e1e2e4"}))):i&&A.title.addClass("arrow-left"),A.headerEl.on("click",(function(){"block"!==A.contentEl.css("display")?A.show():A.hide()})).children(A.title,i?s("div","".concat(pe,"-icon arrow-right ").concat(c)).child(s("div","".concat(pe,"-icon-img arrow-down ").concat(c))):""),h&&A.children(s("div","").css("padding","4px 4px 4px 0px").innerHTML(h)),A.children(A.headerEl),A.isDropdown=p,(0<[].concat(b).length||d)&&(p?A.children(A.contentEl):(document.body.appendChild(A.contentEl.el),A.resetOffsetDropdown())),A}return e=r,(t=[{key:"setContentChildren",value:function(){var e;this.contentEl.html(""),0<arguments.length&&(e=this.contentEl).children.apply(e,arguments)}},{key:"resetOffsetDropdown",value:function(){var e=this.headerEl.el.getBoundingClientRect(),t=ve()(this.headerEl.el).height();this.contentEl.css({width:this.width,position:"absolute",top:e.top+t+"px",left:e.left+"px"})}},{key:"createOptions",value:function(e){var t=this;e=e.map((function(e){return s("div","".concat(pe,"-item")).on("click",(function(){t.setTitle(e.title),t.change(e)})).child(e.title)}));this.setContentChildren.apply(this,function(e){return function(e){if(Array.isArray(e))return yl(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){var n;if(e)return"string"==typeof e?yl(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?yl(e,t):void 0}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e))}},{key:"setTitle",value:function(e){this.title.html(e),this.hide()}},{key:"show",value:function(){var e=this;this.contentEl.show(),this.isDropdown||this.resetOffsetDropdown(),xe(this.parent(),(function(t){e.hide()}),this.noOverflow)}},{key:"hide",value:function(){this.contentEl.hide(),we(this.parent())}}])&&wl(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),r}(),El=n(155),Sl=["#ffffff","#000100","#e7e5e6","#445569","#5b9cd6","#ed7d31","#a5a5a5","#ffc001","#4371c6","#71ae47"].concat(["#f2f2f2","#7f7f7f","#d0cecf","#d5dce4","#deeaf6","#fce5d5","#ededed","#fff2cd","#d9e2f3","#e3efd9","#d8d8d8","#595959","#afabac","#adb8ca","#bdd7ee","#f7ccac","#dbdbdb","#ffe59a","#b3c6e7","#c5e0b3","#bfbfbf","#3f3f3f"]).concat(["#c00000","#fe0000","#fdc101","#ffff01","#93d051","#00b04e","#01b0f1","#0170c1","#012060","#7030a0"]);function _l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Ol=function(){function e(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0],n=this,r=e;if(!(n instanceof r))throw new TypeError("Cannot call a class as a function");this.el=s("div","".concat(pe,"-color-palette")),this.change=function(){},this.picker=this.createColorPicker(),this.defalutHide=t}var t,n;return t=e,(n=[{key:"hide",value:function(){this.el.hide()}},{key:"show",value:function(){this.el.show()}},{key:"createColorPicker",value:function(){try{var e=this,t=new El.ColorPicker({position:"inline",container:this.el.el,color:"white",outputFormat:"hex",hideDelay:0,onConfirm:function(t){e.change(t),setTimeout((function(){e.defalutHide&&e.hide()}))},onCancel:function(){setTimeout((function(){e.hide()}))}});return t.setColorsInPalette(Sl),t}catch(t){}}}])&&_l(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Tl(e){return(Tl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Dl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Bl(e,t){return(Bl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Il(e){return(Il=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ml={color:'<svg id="font-color" width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M8.45114 2.26479L8.45673 2.27646L12.9527 11.2926C13.0085 11.4092 13.0152 11.5424 12.9715 11.6637C12.9277 11.785 12.837 11.8849 12.7187 11.942C12.6004 11.9991 12.4639 12.0089 12.3382 11.9693C12.2126 11.9297 12.1078 11.8439 12.0463 11.7301L12.0431 11.7223L10.4677 8.56538H5.53454L3.96074 11.7223C3.90284 11.8386 3.80036 11.928 3.67537 11.9714C3.55038 12.0148 3.41289 12.0086 3.29253 11.9542L3.28454 11.9503C3.16529 11.8938 3.07359 11.794 3.02919 11.6723C2.98479 11.5506 2.99124 11.4168 3.04715 11.2997L3.05114 11.2919L7.54635 2.27724C7.58735 2.19512 7.65099 2.12571 7.73015 2.07676C7.80931 2.02782 7.90088 2.00125 7.99465 2.00004C8.08841 1.99883 8.18068 2.02302 8.26114 2.06991C8.34161 2.11679 8.40711 2.18453 8.45034 2.26556L8.45114 2.26479ZM8.00194 3.61908L6.0261 7.58079H9.97698L8.00194 3.61908Z" fill="#2C3E50"/>\n<rect  x="2" y="13" width="12" height="1.5" rx="0.75" fill="#000"/>\n</svg>',bgcolor:'<svg id="bg-color" width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M1.5 9C1.18906 8.64759 1.18906 8.07796 1.5 7.72555L12 7.99999C12.0008 8.23073 11.9223 8.46146 11.7676 8.63721L7.28118 13.735C6.97024 14.0883 6.46973 14.0883 6.15958 13.735L1.5 9Z" fill="#FFF"/>\n<path d="M7.33826 2.5413L12.0489 7.42806L6.66531 13.0118L1.95374 8.12602L7.33826 2.5413ZM6.66531 1.84334L1.27984 7.42806C0.90672 7.81406 0.90672 8.43799 1.27984 8.82399L5.99141 13.7098C6.36358 14.0967 6.96419 14.0967 7.33731 13.7098L12.7209 8.12602C13.093 7.74002 13.093 7.11609 12.7209 6.73009L8.0112 1.84334C7.63904 1.45733 7.03653 1.45733 6.66531 1.84334ZM1.27984 8.82399L5.99141 13.7098C6.36358 14.0967 6.96419 14.0967 7.33731 13.7098L12.7209 8.12602C12.9065 7.93352 13.0007 7.68079 12.9998 7.42806L6.66531 13.0118L1.27984 7.42806C0.907672 7.81307 0.907672 8.43799 1.27984 8.82399ZM2.62573 1.14438C2.44012 1.33788 2.44012 1.64984 2.62573 1.84235L7.00131 6.38061C7.18692 6.57312 7.48865 6.57312 7.67425 6.38061C7.85986 6.1881 7.85986 5.87515 7.67425 5.68265L3.29868 1.14438C3.11307 0.951873 2.81229 0.951873 2.62573 1.14438Z" fill="#2C3E50"/>\n<path d="M14.0083 14C13.0229 14 11.7664 13.7742 12.0374 11.854C12.3084 9.93391 14.0083 8 14.0083 8C14.0083 8 15.787 9.92422 15.9792 11.854C16.1714 13.7839 14.9938 14 14.0083 14Z" fill="#FFF"/>\n</svg>\n'},jl=function(){var e=r,t=kl;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Bl(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Il(e);n=t?(n=Il(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===Tl(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(e,t,i){var o,a,u,c,l;if(this instanceof r)return null,a="color"===e||"bgcolor"===e?s("div","".concat(pe,"-icon ").concat(pe,"-icon_size--14")).innerHTML(Ml[e]):new ct(e,"".concat(pe,"-base--hover")).css("height","16px").css("width","16px").css("padding","1px").css("margin","0"),(u=new Ol).change=function(e){e?(o.setTitle(e),o.change(e)):o.hide()},c="line-color"!==e,l="border-color-palette","color"!=e&&"bgcolor"!=e||(l="".concat(pe,"-icon-").concat(e)),(o=n.call(this,a,"auto",c,{dropdownClass:"".concat(pe,"-hover"),arrowClass:"".concat(pe,"-margin--0"),headerClass:"".concat(pe,"-icon-margin"),isZindex:!0,id:l,isDropdown:!0},u.el)).iconName=e,o.colorPalette=u,o;throw new TypeError("Cannot call a class as a function")}return e=r,(t=[{key:"setTitle",value:function(e){"color"==this.iconName?this.title.el.childNodes[0].children[1]&&this.title.el.childNodes[0].children[1].setAttribute("fill",e):"bgcolor"==this.iconName?this.title.el.childNodes[0].children[0]&&this.title.el.childNodes[0].children[2]&&(this.title.el.childNodes[0].children[0].setAttribute("fill",e),this.title.el.childNodes[0].children[2].setAttribute("fill",e)):this.title.css("border-color",e),this.colorPalette.picker.initColor(e),this.hide()}}])&&Dl(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),r}();function Nl(e){return(Nl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Fl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Rl(e,t){return(Rl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Pl(e){return(Pl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ll=[["thin",'<svg xmlns="http://www.w3.org/2000/svg" width="50" height="1" style="user-select: none;"><line x1="0" y1="0.5" x2="50" y2="0.5" stroke-width="1" stroke="black" style="user-select: none;"></line></svg>'],["medium",'<svg xmlns="http://www.w3.org/2000/svg" width="50" height="2" style="user-select: none;"><line x1="0" y1="1.0" x2="50" y2="1.0" stroke-width="2" stroke="black" style="user-select: none;"></line></svg>'],["thick",'<svg xmlns="http://www.w3.org/2000/svg" width="50" height="3" style="user-select: none;"><line x1="0" y1="1.5" x2="50" y2="1.5" stroke-width="3" stroke="black" style="user-select: none;"></line></svg>'],["dashed",'<svg xmlns="http://www.w3.org/2000/svg" width="50" height="1" style="user-select: none;"><line x1="0" y1="0.5" x2="50" y2="0.5" stroke-width="1" stroke="black" stroke-dasharray="2" style="user-select: none;"></line></svg>'],["dotted",'<svg xmlns="http://www.w3.org/2000/svg" width="50" height="1" style="user-select: none;"><line x1="0" y1="0.5" x2="50" y2="0.5" stroke-width="1" stroke="black" stroke-dasharray="1" style="user-select: none;"></line></svg>']],Ul=function(){var e=r,t=kl;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Rl(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Pl(e);n=t?(n=Pl(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===Nl(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(e){var t,i,o,a;if(this instanceof r)return i=new ct("line-type","".concat(pe,"-icon_size--16 ").concat(pe,"-margin--0 ").concat(pe,"-base--hover")),o=0,a=Ll.map((function(n,r){return s("div","".concat(pe,"-item state ").concat(e===n[0]?"checked":"")).on("click",(function(){a[o].toggle("checked"),a[r].toggle("checked"),o=r,t.hide(),t.change(n)})).child(s("div","".concat(pe,"-line-type")).html(n[1]))})),t=n.call.apply(n,[this,i,"auto",!1,{dropdownClass:"bottom-left",isZindex:!0,id:"border-line-palette"}].concat(function(e){return function(e){if(Array.isArray(e))return Fl(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){var n;if(e)return"string"==typeof e?Fl(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Fl(e,t):void 0}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(a)));throw new TypeError("Cannot call a class as a function")}return e=r,Object.defineProperty(e,"prototype",{writable:!1}),e}();function zl(e){return function(e){if(Array.isArray(e))return $l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Hl(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Hl(e,t){var n;if(e)return"string"==typeof e?$l(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$l(e,t):void 0}function $l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ql(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Vl(){var e;return s("table","").child((e=s("tbody","")).children.apply(e,arguments))}function ql(e){var t=this;return s("td","").child(s("div","".concat(pe,"-border-palette-cell ").concat(pe,"-flex--center")).child(new ct("border-".concat(e),"".concat(pe,"-icon_size--14 ").concat(pe,"-margin--0"))).on("click",(function(){t.mode=e;var n=t.mode,r=t.style,i=t.color;t.change({mode:n,style:r,color:i})})))}var Gl=function(e,t,n){return t&&Ql(e.prototype,t),n&&Ql(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(){var t=this;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.color="#000",this.style="thin",this.mode="all",this.change=function(){},this.ddColor=new jl("line-color",this.color),this.ddColor.change=function(e){t.color=e},this.ddType=new Ul(this.style),this.ddType.change=function(e){e=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(e,t)||Hl(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e,1)[0],t.style=e},this.el=s("div","".concat(pe,"-border-palette"));var n=Vl(s("tr","").children(s("td","".concat(pe,"-border-palette-left")).child(Vl((n=s("tr","")).children.apply(n,zl(["all","inside","horizontal","vertical","outside"].map((function(e){return ql.call(t,e)})))),(n=s("tr","")).children.apply(n,zl(["left","top","right","bottom","none"].map((function(e){return ql.call(t,e)})))))),s("td","".concat(pe,"-border-palette-right")).children(s("div","".concat(pe,"-toolbar-item")).child(this.ddColor.el),s("div","".concat(pe,"-toolbar-item")).child(this.ddType.el))));this.el.child(n)}));function Wl(e){return(Wl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Kl(e,t){return(Kl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Yl(e){return(Yl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Xl=function(){var e=r,t=kl;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Kl(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Yl(e);n=t?(n=Yl(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===Wl(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){var e,t,i;if(this instanceof r)return t=new ct("border-all","".concat(pe,"-icon_size--14")),(i=new Gl).change=function(t){e.change(t),e.hide()},e=n.call(this,t,"auto",!0,{dropdownClass:"".concat(pe,"-hover"),arrowClass:"".concat(pe,"-margin--0"),headerClass:"".concat(pe,"-icon-margin"),noOverflow:!0,isDropdown:!0},i.el);throw new TypeError("Cannot call a class as a function")}return e=r,Object.defineProperty(e,"prototype",{writable:!1}),e}();function Jl(e){return(Jl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Zl(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function eh(e,t){return(eh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function th(e){return(th=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var nh=function(){var e=r,t=Cc;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&eh(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=th(e);n=t?(n=th(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===Jl(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){if(this instanceof r)return n.call(this,"border");throw new TypeError("Cannot call a class as a function")}return e=r,(t=[{key:"dropdown",value:function(){return new Xl}}])&&Zl(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),r}();function rh(e){return(rh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ih(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function oh(){return(oh="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=sh(e)););return e}(e,t);if(r)return(r=Object.getOwnPropertyDescriptor(r,t)).get?r.get.call(arguments.length<3?e:n):r.value}).apply(this,arguments)}function ah(e,t){return(ah=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function sh(e){return(sh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var uh=function(){var e=r,t=gc;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ah(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=sh(e);n=t?(n=sh(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===rh(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){var e=this,t=r;if(e instanceof t)return n.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return e=r,(t=[{key:"element",value:function(){var e,t,n=this;return((e=oh(sh(r.prototype),"element",this).call(this)).flag?(t=s("div","".concat(pe,"-toolbar-item")).child(new ct(this.tag)),e.el.child(t),e.el.child(s("div","".concat(pe,"-fontTip1")).innerHTML(e.value))):"Redo"==e.value||"Undo"==e.value||"撤销"==e.value||"恢复"==e.value?(t=s("div","".concat(pe,"-toolbar-item")).child(new ct(this.tag)),e.el.child(t)):"importXlsx"==e.value?(t=s("div","".concat(pe,"-toolbar-item")).innerHTML("导入"),e.el.child(t)):oh(sh(r.prototype),"element",this).call(this).child(new ct(this.tag))).on("click",(function(){return n.change(n.tag)}))}},{key:"setState",value:function(e){this.el.disabled(e)}}])&&ih(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),r}();function ch(e){return(ch="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function lh(e,t){return(lh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function hh(e){return(hh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var fh=function(){var e=r,t=uh;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&lh(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=hh(e);n=t?(n=hh(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===ch(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){if(this instanceof r)return n.call(this,"clearformat");throw new TypeError("Cannot call a class as a function")}return e=r,Object.defineProperty(e,"prototype",{writable:!1}),e}();function dh(e){return(dh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ph(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function mh(e,t){return(mh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function gh(e){return(gh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ah=function(){var e=r,t=Xc;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&mh(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=gh(e);n=t?(n=gh(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===dh(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){if(this instanceof r)return n.call(this,"paintformat");throw new TypeError("Cannot call a class as a function")}return e=r,(t=[{key:"setState",value:function(){}}])&&ph(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),r}();function vh(e){return(vh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function bh(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function yh(e,t){return(yh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function wh(e){return(wh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var xh=function(){var e=r,t=Cc;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&yh(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=wh(e);n=t?(n=wh(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===vh(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(e){if(this instanceof r)return n.call(this,"color",void 0,e);throw new TypeError("Cannot call a class as a function")}return e=r,(t=[{key:"dropdown",value:function(){var e=this.tag,t=this.value;return new jl(e,t)}}])&&bh(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),r}();function Ch(e){return(Ch="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function kh(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Eh(e,t){return(Eh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Sh(e){return(Sh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var _h=function(){var e=r,t=Cc;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Eh(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Sh(e);n=t?(n=Sh(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===Ch(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(e){if(this instanceof r)return n.call(this,"bgcolor",void 0,e);throw new TypeError("Cannot call a class as a function")}return e=r,(t=[{key:"dropdown",value:function(){var e=this.tag,t=this.value;return new jl(e,t)}}])&&kh(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),r}();function Oh(e){return(Oh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Th(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Dh(e,t){return(Dh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Bh(e){return(Bh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ih=function(){var e=r,t=kl;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Dh(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Bh(e);n=t?(n=Bh(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===Oh(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){var e,t;if(this instanceof r)return t=Se.map((function(t){return s("div","".concat(pe,"-item")).on("click",(function(){e.setTitle("".concat(t.pt)),e.change(t)})).child("".concat(t.pt))})),e=n.call.apply(n,[this,"10","100px",!0,{dropdownClass:"bottom-left"}].concat(function(e){return function(e){if(Array.isArray(e))return Th(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){var n;if(e)return"string"==typeof e?Th(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Th(e,t):void 0}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t)));throw new TypeError("Cannot call a class as a function")}return e=r,Object.defineProperty(e,"prototype",{writable:!1}),e}();function Mh(e){return(Mh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function jh(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Nh(e,t){return(Nh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Fh(e){return(Fh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Rh=function(){var e=r,t=Cc;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Nh(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Fh(e);n=t?(n=Fh(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===Mh(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){if(this instanceof r)return n.call(this,"font-size");throw new TypeError("Cannot call a class as a function")}return e=r,(t=[{key:"getValue",value:function(e){return e.pt}},{key:"dropdown",value:function(){return new Ih}}])&&jh(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),r}();function Ph(e){return(Ph="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Lh(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Uh(e,t){return(Uh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function zh(e){return(zh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Hh=function(){var e=r,t=kl;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Uh(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=zh(e);n=t?(n=zh(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===Ph(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){var e,t;if(this instanceof r)return t=Ee.map((function(t){return s("div","".concat(pe,"-item")).on("click",(function(){e.setTitle(t.title),e.change(t)})).child(t.title)})),e=n.call.apply(n,[this,Ee[0].title,"160px",!0,{dropdownClass:"bottom-left"}].concat(function(e){return function(e){if(Array.isArray(e))return Lh(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){var n;if(e)return"string"==typeof e?Lh(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Lh(e,t):void 0}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t)));throw new TypeError("Cannot call a class as a function")}return e=r,Object.defineProperty(e,"prototype",{writable:!1}),e}();function $h(e){return($h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Qh(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Vh(e,t){return(Vh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function qh(e){return(qh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Gh=function(){var e=r,t=Cc;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vh(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=qh(e);n=t?(n=qh(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===$h(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){if(this instanceof r)return n.call(this,"font-name");throw new TypeError("Cannot call a class as a function")}return e=r,(t=[{key:"getValue",value:function(e){return e.key}},{key:"dropdown",value:function(){return new Hh}}])&&Qh(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),r}();function Wh(e){return(Wh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Kh(e,t){return(Kh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Yh(e){return(Yh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Xh=function(){var e=r,t=Xc;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Kh(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Yh(e);n=t?(n=Yh(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===Wh(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){if(this instanceof r)return n.call(this,"freeze");throw new TypeError("Cannot call a class as a function")}return e=r,Object.defineProperty(e,"prototype",{writable:!1}),e}();function Jh(e){return(Jh="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Zh(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ef(e,t){return(ef=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function tf(e){return(tf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var nf=function(){var e=r,t=Xc;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ef(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=tf(e);n=t?(n=tf(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===Jh(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){if(this instanceof r)return n.call(this,"merge");throw new TypeError("Cannot call a class as a function")}return e=r,(t=[{key:"setState",value:function(e,t){this.el.active(e).disabled(t)}}])&&Zh(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),r}();function rf(e){return(rf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function of(e,t){return(of=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function af(e){return(af=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var sf=function(){var e=r,t=uh;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&of(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=af(e);n=t?(n=af(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===rf(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){if(this instanceof r)return n.call(this,"redo");throw new TypeError("Cannot call a class as a function")}return e=r,Object.defineProperty(e,"prototype",{writable:!1}),e}();function uf(e){return(uf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function cf(e,t){return(cf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function lf(e){return(lf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var hf=function(){var e=r,t=uh;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cf(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=lf(e);n=t?(n=lf(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===uf(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){if(this instanceof r)return n.call(this,"undo");throw new TypeError("Cannot call a class as a function")}return e=r,Object.defineProperty(e,"prototype",{writable:!1}),e}();function ff(e){return(ff="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function df(e,t){return(df=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function pf(e){return(pf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var mf=function(){var e=r,t=Xc;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&df(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=pf(e);n=t?(n=pf(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===ff(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){if(this instanceof r)return n.call(this,"textwrap");throw new TypeError("Cannot call a class as a function")}return e=r,Object.defineProperty(e,"prototype",{writable:!1}),e}();function gf(e){return(gf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Af(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function vf(e,t){return(vf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function bf(e){return(bf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var yf=function(){var e=r,t=Cc;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vf(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=bf(e);n=t?(n=bf(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===gf(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(e){if(this instanceof r)return(e=n.call(this,"align","",e,"alignRight")).className="align",e.classValue="right",e;throw new TypeError("Cannot call a class as a function")}return e=r,(t=[{key:"dropdown",value:function(){var e=this.value;return new Nc(["right"],e)}}])&&Af(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),r}();function wf(e){return(wf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function xf(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Cf(e,t){return(Cf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function kf(e){return(kf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Ef=function(){var e=r,t=Cc;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Cf(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=kf(e);n=t?(n=kf(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===wf(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(e){if(this instanceof r)return(e=n.call(this,"align","",e,"alignCenter")).className="align",e.classValue="center",e;throw new TypeError("Cannot call a class as a function")}return e=r,(t=[{key:"dropdown",value:function(){var e=this.value;return new Nc(["center"],e)}}])&&xf(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),r}();function Sf(e){return(Sf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _f(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Of(e,t){return(Of=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Tf(e){return(Tf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Df=function(){var e=r,t=Cc;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Of(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Tf(e);n=t?(n=Tf(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===Sf(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(e){if(this instanceof r)return(e=n.call(this,"valign","",e,"valignMiddle")).className="valign",e.classValue="middle",e;throw new TypeError("Cannot call a class as a function")}return e=r,(t=[{key:"dropdown",value:function(){var e=this.value;return new Nc(["middle"],e)}}])&&_f(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),r}();function Bf(e){return(Bf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function If(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Mf(e,t){return(Mf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function jf(e){return(jf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Nf=function(){var e=r,t=Cc;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Mf(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=jf(e);n=t?(n=jf(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===Bf(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(e){if(this instanceof r)return(e=n.call(this,"valign","",e,"valignBottom")).className="valign",e.classValue="bottom",e;throw new TypeError("Cannot call a class as a function")}return e=r,(t=[{key:"dropdown",value:function(){var e=this.value;return new Nc(["bottom"],e)}}])&&If(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),r}();function Ff(e){return(Ff="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Rf(e,t){return(Rf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Pf(e){return(Pf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Lf=function(){var e=r,t=Xc;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Rf(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Pf(e);n=t?(n=Pf(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===Ff(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){if(this instanceof r)return n.call(this,"indent");throw new TypeError("Cannot call a class as a function")}return e=r,Object.defineProperty(e,"prototype",{writable:!1}),e}();function Uf(e){return(Uf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function zf(e,t){return(zf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Hf(e){return(Hf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var $f=function(){var e=r,t=Xc;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&zf(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Hf(e);n=t?(n=Hf(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===Uf(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){if(this instanceof r)return n.call(this,"indentReduce");throw new TypeError("Cannot call a class as a function")}return e=r,Object.defineProperty(e,"prototype",{writable:!1}),e}();function Qf(e){return(Qf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Vf(e,t){return(Vf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function qf(e){return(qf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Gf=function(){var e=r,t=uh;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vf(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=qf(e);n=t?(n=qf(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===Qf(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){if(this instanceof r)return n.call(this,"copy","Ctrl+C");throw new TypeError("Cannot call a class as a function")}return e=r,Object.defineProperty(e,"prototype",{writable:!1}),e}();function Wf(e){return(Wf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Kf(e,t){return(Kf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Yf(e){return(Yf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Xf=function(){var e=r,t=uh;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Kf(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Yf(e);n=t?(n=Yf(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===Wf(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){if(this instanceof r)return n.call(this,"cut","Ctrl+X");throw new TypeError("Cannot call a class as a function")}return e=r,Object.defineProperty(e,"prototype",{writable:!1}),e}();function Jf(e){return(Jf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Zf(e,t){return(Zf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function ed(e){return(ed=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var td=function(){var e=r,t=uh;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Zf(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ed(e);n=t?(n=ed(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===Jf(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){if(this instanceof r)return n.call(this,"paste","Ctrl+V");throw new TypeError("Cannot call a class as a function")}return e=r,Object.defineProperty(e,"prototype",{writable:!1}),e}();function nd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function rd(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(e,t)||function(e,t){var n;if(e)return"string"==typeof e?id(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?id(e,t):void 0}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function id(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function od(){var e=this.el,t=this.btns,n=this.FunDomain,r=this.btns2,i=this.FunDomain2,o=this.distance,a=this.distance2,s=this.widthFn(),u=(this.widthFn()<1030&&(s=1030),e.css("width","".concat(s,"px")),t.css("width","330px"),n.css("width","170px"),o.css("width","220px"),e.box(),[]),c=[],l=[];r.forEach((function(e,t){var n=(e=rd(e,2))[0];e=e[1];u.push(n)})),i.forEach((function(e,t){var n=(e=rd(e,2))[0];e=e[1];c.push(n)})),a.forEach((function(e,t){var n=(e=rd(e,2))[0];e=e[1];l.push(n)})),(s=t.html("")).children.apply(s,u),(e=n.html("")).children.apply(e,c),(r=o.html("")).children.apply(r,l)}var ad=function(){function e(t,n){var r=this,i=2<arguments.length&&void 0!==arguments[2]&&arguments[2],o=this,a=e;if(!(o instanceof a))throw new TypeError("Cannot call a class as a function");this.data=t,this.change=function(){},this.widthFn=n,this.isHide=i,o=t.defaultStyle(),this.items1=[[this.clearformatEl=new fh,this.paintformatEl=new Ah,this.undoEl=new hf,this.redoEl=new sf,this.copyEl=new Gf,this.pasteEl=new td,this.cutEl=new Xf,this.freezeEl=new Xh],s("div","".concat(pe,"-toolbar-divider"))],this.items=[[this.fontEl=new Gh,this.fontSizeEl=new Rh],[this.boldEl=new al,this.italicEl=new ll,this.underlineEl=new vl,this.strikeEl=new pl,this.textColorEl=new xh(o.color)],[this.fillColorEl=new _h(o.bgcolor),this.borderEl=new nh,this.mergeEl=new nf,this.textwrapEl=new mf],s("div","".concat(pe,"-toolbar-divider1")),s("div","".concat(pe,"-toolbar-divider2"))],this.items_distance=[[this.alignEl=new Uc(o.align),this.alignCenterEl=new Ef(o.align),this.alignRightEl=new yf(o.align),this.indentLeftEl=new Lf,this.indentRightEl=new $f],[this.valignEl=new Vc(o.valign),this.valignMiddleEl=new Df(o.valign),this.valignBottomEl=new Nf(o.valign),this.autofilterEl=new nl]],this.el=s("div","".concat(pe,"-toolbar")),this.btns=s("div","".concat(pe,"-toolbar-btns")),this.FunDomain=s("div","".concat(pe,"-toolbar-fun")),this.distance=s("div","".concat(pe,"-toolbar-distance")),this.items1.forEach((function(e){Array.isArray(e)?e.forEach((function(e){r.FunDomain.child(e.el),e.change=function(){r.change.apply(r,arguments)}})):r.FunDomain.child(e.el)})),this.items.forEach((function(e){Array.isArray(e)?e.forEach((function(e){r.btns.child(e.el),e.change=function(){r.change.apply(r,arguments)}})):r.btns.child(e.el)})),this.items_distance.forEach((function(e){Array.isArray(e)?e.forEach((function(e){r.distance.child(e.el),e.change=function(){r.change.apply(r,arguments)}})):r.distance.child(e.el)})),this.el.child(this.FunDomain),this.el.child(this.btns),this.el.child(this.distance),i?this.el.hide():(this.reset(),setTimeout((function(){(function(){var e=this;this.btns2=[],this.FunDomain2=[],this.distance2=[],this.items.forEach((function(t){var n,r,i;Array.isArray(t)?t.forEach((function(t){var n=(t=t.el).box(),r=(i=t.computedStyle()).marginLeft,i=i.marginRight;e.btns2.push([t,n.width+parseInt(r,10)+parseInt(i,10)])})):(n=t.box(),r=(i=t.computedStyle()).marginLeft,i=i.marginRight,e.btns2.push([t,n.width+parseInt(r,10)+parseInt(i,10)]))})),this.items1.forEach((function(t){var n,r,i;Array.isArray(t)?t.forEach((function(t){var n=(t=t.el).box(),r=(i=t.computedStyle()).marginLeft,i=i.marginRight;e.FunDomain2.push([t,n.width+parseInt(r,10)+parseInt(i,10)])})):(n=t.box(),r=(i=t.computedStyle()).marginLeft,i=i.marginRight,e.FunDomain2.push([t,n.width+parseInt(r,10)+parseInt(i,10)]))})),this.items_distance.forEach((function(t){var n,r,i;Array.isArray(t)?t.forEach((function(t){var n=(t=t.el).box(),r=(i=t.computedStyle()).marginLeft,i=i.marginRight;e.distance2.push([t,n.width+parseInt(r,10)+parseInt(i,10)])})):(n=t.box(),r=(i=t.computedStyle()).marginLeft,i=i.marginRight,e.distance2.push([t,n.width+parseInt(r,10)+parseInt(i,10)]))}))}).call(r),od.call(r)}),0),be(window,"resize",(function(){od.call(r)})))}var t,n;return t=e,(n=[{key:"childNode",value:function(){}},{key:"paintformatActive",value:function(){return this.paintformatEl.active()}},{key:"paintformatToggle",value:function(){this.paintformatEl.toggle()}},{key:"trigger",value:function(e){this["".concat(e,"El")].click()}},{key:"resetData",value:function(e){this.data=e,this.reset()}},{key:"reset",value:function(){var e,t,n;this.isHide||(t=(e=this.data).getSelectedCellStyle(),e.getSelectedCell(),this.mergeEl.setState(e.canUnmerge(),!e.selector.multiple()),this.autofilterEl.setState(!e.canAutofilter()),n=t.font,this.fontEl.setState(n.name),this.fontSizeEl.setState(n.size),this.boldEl.setState(n.bold),this.italicEl.setState(n.italic),this.underlineEl.setState(t.underline),this.strikeEl.setState(t.strike),this.textColorEl.setState(t.color),this.fillColorEl.setState(t.bgcolor),this.valignEl.setState(t.valign),this.valignMiddleEl.setState(t.valign),this.valignBottomEl.setState(t.valign),this.alignEl.setState(t.align),this.alignRightEl.setState(t.align),this.alignCenterEl.setState(t.align),this.textwrapEl.setState(t.textwrap),this.indentLeftEl.el.attr("click-count",t.indent),this.indentRightEl.el.attr("click-count",t.indent),this.freezeEl.setState(e.freezeIsActive()))}}])&&nd(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function sd(e){return function(e){if(Array.isArray(e))return ud(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){var n;if(e)return"string"==typeof e?ud(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ud(e,t):void 0}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ud(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function cd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var ld=function(){function e(t,n){var r=this,i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"600px",o=this,a=e;if(!(o instanceof a))throw new TypeError("Cannot call a class as a function");this.title=t,this.el=s("div","".concat(pe,"-modal")).css("width",i).children(s("div","".concat(pe,"-modal-header")).children(new ct("close").on("click.stop",(function(){return r.hide()})),this.title),(o=s("div","".concat(pe,"-modal-content"))).children.apply(o,sd(n))).hide()}var t,n;return t=e,(n=[{key:"show",value:function(){var e=this,t=(n=(this.dimmer=s("div","".concat(pe,"-dimmer active")),document.body.appendChild(this.dimmer.el),this.el.show().box())).width,n=n.height,r=(i=document.documentElement).clientHeight,i=i.clientWidth;this.el.offset({left:(i-t)/2,top:(r-n)/3}),window.xkeydownEsc=function(t){27===t.keyCode&&e.hide()},be(window,"keydown",window.xkeydownEsc)}},{key:"hide",value:function(){this.el.hide(),document.body.removeChild(this.dimmer.el),ye(window,"keydown",window.xkeydownEsc),delete window.xkeydownEsc}}])&&cd(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function hd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var fd=function(){function e(t,n){var r=this;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.vchange=function(){},this.el=s("div","".concat(pe,"-form-input")),this.input=s("input","").css("width",t).on("input",(function(e){return r.vchange(e)})).attr("placeholder",n),this.el.child(this.input)}var t,n;return t=e,(n=[{key:"focus",value:function(){var e=this;setTimeout((function(){e.input.el.focus()}),10)}},{key:"hint",value:function(e){this.input.attr("placeholder",e)}},{key:"val",value:function(e){return this.input.val(e)}}])&&hd(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function dd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var pd=function(){function e(t,n,r){var i=this,o=3<arguments.length&&void 0!==arguments[3]?arguments[3]:function(e){return e},a=4<arguments.length&&void 0!==arguments[4]?arguments[4]:function(){},u=this,c=e;if(!(u instanceof c))throw new TypeError("Cannot call a class as a function");this.key=t,this.getTitle=o,this.vchange=function(){},this.el=s("div","".concat(pe,"-form-select")),this.suggest=new Re(n.map((function(e){return{key:e,title:i.getTitle(e)}})),(function(e){i.itemClick(e.key),a(e.key),i.vchange(e.key)}),r,this.el),this.el.children(this.itemEl=s("div","input-text").html(this.getTitle(t)),this.suggest.el).on("click",(function(){return i.show()}))}var t,n;return t=e,(n=[{key:"show",value:function(){this.suggest.search("")}},{key:"itemClick",value:function(e){this.key=e,this.itemEl.html(this.getTitle(e))}},{key:"val",value:function(e){return void 0!==e?(this.key=e,this.itemEl.html(this.getTitle(e)),this):this.key}}])&&dd(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function md(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var gd={number:/(^\d+$)|(^\d+(\.\d{0,4})?$)/,date:/^\d{4}-\d{1,2}-\d{1,2}$/},Ad=function(){function e(t,n,r,i){var o=this;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.label="",this.rule=n,r&&(this.label=s("label","label").css("width","".concat(i,"px")).html(r)),this.tip=s("div","tip").child("tip").hide(),this.input=t,this.input.vchange=function(){return o.validate()},this.el=s("div","".concat(pe,"-form-field")).children(this.label,t.el,this.tip)}var t,n;return t=e,(n=[{key:"isShow",value:function(){return"none"!==this.el.css("display")}},{key:"show",value:function(){this.el.show()}},{key:"hide",value:function(){return this.el.hide(),this}},{key:"val",value:function(e){return this.input.val(e)}},{key:"hint",value:function(e){this.input.hint(e)}},{key:"validate",value:function(){var e=this.input,t=this.rule,n=this.tip,r=this.el;e=e.val();return t.required&&/^\s*$/.test(e)?(n.html(U("validation.required")),r.addClass("error"),!1):!t.type&&!t.pattern||(t.pattern||gd[t.type]).test(e)?(r.removeClass("error"),!0):(n.html(U("validation.notMatch")),r.addClass("error"),!1)}}])&&md(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function vd(e){return(vd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function bd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function yd(e,t){return(yd=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function wd(e){return(wd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var xd=function(){var e=r,t=ld;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&yd(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=wd(e);n=t?(n=wd(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===vd(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){var e,t,i,o,a,u,c,l,h;if(this instanceof r)return e=new Ad(new pd("cell",["cell"],"100%",(function(e){return U("dataValidation.modeType.".concat(e))})),{required:!0},"".concat(U("dataValidation.range"),":"),100),t=new Ad(new fd("120px","E3 or E3:F12"),{required:!0,pattern:/^([A-Z]{1,2}[1-9]\d*)(:[A-Z]{1,2}[1-9]\d*)?$/}),i=new Ad(new pd("list",["list","number","date","phone","email"],"100%",(function(e){return U("dataValidation.type.".concat(e))}),(function(e){return h.criteriaSelected(e)})),{required:!0},"".concat(U("dataValidation.criteria"),":"),100),o=new Ad(new pd("be",["be","nbe","eq","neq","lt","lte","gt","gte"],"160px",(function(e){return U("dataValidation.operator.".concat(e))}),(function(e){return h.criteriaOperatorSelected(e)})),{required:!0}).hide(),a=new Ad(new fd("70px","10"),{required:!0}).hide(),u=new Ad(new fd("70px","100"),{required:!0,type:"number"}).hide(),c=new Ad(new fd("120px","a,b,c"),{required:!0}),l=new Ad(new fd("70px","10"),{required:!0,type:"number"}).hide(),(h=n.call(this,U("contextmenu.validation"),[s("div","".concat(pe,"-form-fields")).children(e.el,t.el),s("div","".concat(pe,"-form-fields")).children(i.el,o.el,a.el,u.el,l.el,c.el),s("div","".concat(pe,"-buttons")).children(new St("cancel").on("click",(function(){return h.btnClick("cancel")})),new St("remove").on("click",(function(){return h.btnClick("remove")})),new St("save","primary").on("click",(function(){return h.btnClick("save")})))])).mf=e,h.rf=t,h.cf=i,h.of=o,h.minvf=a,h.maxvf=u,h.vf=l,h.svf=c,h.change=function(){},h;throw new TypeError("Cannot call a class as a function")}return e=r,(t=[{key:"showVf",value:function(e){var t=this.vf;t.input.hint("date"===e?"2018-11-12":"10"),t.show()}},{key:"criteriaSelected",value:function(e){var t=this.of,n=this.minvf,r=this.maxvf,i=this.vf,o=this.svf;("date"===e||"number"===e?(t.show(),n.rule.type=e,"date"===(r.rule.type=e)?(n.hint("2018-11-12"),r.hint("2019-11-12")):(n.hint("10"),r.hint("100")),n.show(),r.show(),i.hide(),o):("list"===e?o.show():o.hide(),i.hide(),t.hide(),n.hide(),r)).hide()}},{key:"criteriaOperatorSelected",value:function(e){var t,n,r;e&&(t=this.minvf,n=this.maxvf,r=this.vf,("be"===e||"nbe"===e?(t.show(),n.show(),r):(e=this.cf.val(),"date"===(r.rule.type=e)?r.hint("2018-11-12"):r.hint("10"),r.show(),t.hide(),n)).hide())}},{key:"btnClick",value:function(e){if("cancel"===e)this.hide();else if("remove"===e)this.change("remove"),this.hide();else if("save"===e){for(var t=["mf","rf","cf","of","svf","vf","minvf","maxvf"],n=0;n<t.length;n+=1){var r=this[t[n]];if(r.isShow()&&!r.validate())return}e=this.mf.val();var i=this.rf.val(),o=this.cf.val(),a=this.of.val(),s=this.svf.val();"number"!==o&&"date"!==o||(s="be"===a||"nbe"===a?[this.minvf.val(),this.maxvf.val()]:this.vf.val()),this.change("save",e,i,{type:o,operator:a,required:!1,value:s}),this.hide()}}},{key:"setValue",value:function(e){var t,n,r,i,o,a,s,u,c,l,h,f;e&&(t=this.mf,n=this.rf,r=this.cf,i=this.of,o=this.svf,a=this.vf,s=this.minvf,u=this.maxvf,c=e.mode,l=e.ref,h=(e=e.validator||{type:"list"}).type,f=e.operator,e=e.value,t.val(c||"cell"),n.val(l),r.val(h),i.val(f),Array.isArray(e)?(s.val(e[0]),u.val(e[1])):(o.val(e||""),a.val(e||"")),this.criteriaSelected(h),this.criteriaOperatorSelected(f)),this.show()}}])&&bd(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),r}();function Cd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function kd(e){return s("div","".concat(pe,"-item ").concat(e))}function Ed(e){var t=this;return kd("state").child(U("sort.".concat(e))).on("click.stop",(function(){return t.itemClick(e)}))}function Sd(){var e=this.filterhEl,t=this.filterValues,n=this.values;e.html("".concat(t.length," / ").concat(n.length)),e.checked(t.length===n.length)}var _d=function(){function e(){var t=this;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.filterbEl=s("div","".concat(pe,"-body")),this.filterhEl=s("div","".concat(pe,"-header state")).on("click.stop",(function(){return t.filterClick(0,"all")})),this.el=s("div","".concat(pe,"-sort-filter")).children(this.sortAscEl=Ed.call(this,"asc"),this.sortDescEl=Ed.call(this,"desc"),kd("divider"),s("div","".concat(pe,"-filter")).children(this.filterhEl,this.filterbEl),s("div","".concat(pe,"-buttons")).children(new St("cancel").on("click",(function(){return t.btnClick("cancel")})),new St("ok","primary").on("click",(function(){return t.btnClick("ok")})))).hide(),this.ci=null,this.sortDesc=null,this.values=null,this.filterValues=[]}var t,n;return t=e,(n=[{key:"btnClick",value:function(e){var t,n;"ok"===e&&(e=this.ci,t=this.sort,n=this.filterValues,this.ok&&this.ok(e,t,"in",n)),this.hide()}},{key:"itemClick",value:function(e){this.sort=e;var t=this.sortAscEl,n=this.sortDescEl;t.checked("asc"===e),n.checked("desc"===e)}},{key:"filterClick",value:function(e,t){var n=this.filterbEl,r=this.filterValues,i=this.values;n=n.children();"all"===t?n.length===r.length?(this.filterValues=[],n.forEach((function(e){return s(e).checked(!1)}))):(this.filterValues=Array.from(i),n.forEach((function(e){return s(e).checked(!0)}))):s(n[e]).toggle("checked")?r.push(t):r.splice(r.findIndex((function(e){return e===t})),1),Sd.call(this)}},{key:"set",value:function(e,t,n,r){this.ci=e;e=this.sortAscEl;var i=this.sortDescEl;null!==r?(this.sort=r.order,e.checked(r.asc()),i.checked(r.desc())):(this.sortDesc=null,e.checked(!1),i.checked(!1)),this.values=Object.keys(t),this.filterValues=n?Array.from(n.value):Object.keys(t),function(e){var t=this,n=this.filterbEl,r=this.filterValues;n.html(""),Object.keys(e).forEach((function(i,o){var a=e[i],u=r.includes(i)?"checked":"";n.child(s("div","".concat(pe,"-item state ").concat(u)).on("click.stop",(function(){return t.filterClick(o,i)})).children(""===i?U("filter.empty"):i,s("div","label").html("(".concat(a,")"))))}))}.call(this,t,n),Sd.call(this)}},{key:"setOffset",value:function(e){var t=this,n=(this.el.offset(e).show(),1);xe(this.el,(function(){n<=0&&t.hide(),--n}))}},{key:"show",value:function(){this.el.show()}},{key:"hide",value:function(){this.el.hide(),we(this.el)}}])&&Cd(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Od(e){return(Od="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Td(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(e,t)||Bd(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Dd(e,t){var n,r,i,o,a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(a)return r=!(n=!0),{s:function(){a=a.call(e)},n:function(){var e=a.next();return n=e.done,e},e:function(e){r=!0,i=e},f:function(){try{n||null==a.return||a.return()}finally{if(r)throw i}}};if(Array.isArray(e)||(a=Bd(e))||t&&e&&"number"==typeof e.length)return a&&(e=a),o=0,{s:t=function(){},n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Bd(e,t){var n;if(e)return"string"==typeof e?Id(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Id(e,t):void 0}function Id(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Md(e,t){e.SheetData.name=e.name;var n,r={};for(n in e=e.SheetData){var i=e[n];Ld[n]?Ld[n](r,i,t):r[n]=i}return r}var jd={column:"Column",row:"Row",value:"Value",styleIndex:"StyleIndex",editable:"Editable",expansion:"Expansion",valueType:"ValueType",scaleType:"scaleType",columnSpan:"ColumnSpan",rowSpan:"RowSpan",dataConfig:"DataConfig",warn:"Warn",order:"Order",dataType:"dataType",type:"type",customIcon:"customIcon",collapsible:"collapsible",placeholder:"placeholder",controlType:"controlType",btnText:"btnText",btnStyle:"btnStyle",clickType:"clickType",script:"script",barCodeType:"barCodeType",slash:"slash",links:"links",barCodeValue:"barCodeValue",wrapType:"wrapType",waterMaskImageConfig:"waterMaskImageConfig"},Nd={value:"value",type:"data_type",merge:"Merge",axisType:"AxisType",order:"Order",aggregate:"Aggregate",sortParam:"sortParam",dataList:"dataList",data_type:"data_type"},Fd={value:"value",type:"data_type",merge:"merge",axisType:"axisType",order:"order",aggregate:"aggregate",sortParam:"sortParam",dataList:"dataList",data_type:"data_type"},Rd=function(e,t){try{e=e.split(":");var n=Td(Object(u.b)(e[0]),2),r=n[0],i=n[1],o=Td(Object(u.b)(e[1]),2),a=o[0],s=o[1],c=i,l=r,h=s,f=a}catch(e){l=c=0,h=t.RowHead.length-1,f=t.ColumnHead.length-1}return{sri:c,sci:l,eri:h,eci:f}},Pd=function(){return{isRepeat:!1,repeatKey:"",repeatValue:""}},Ld={columnHead:function(e,t){e.ColumnHead=t},rowHead:function(e,t){e.RowHead=t},freeze:function(e,t){e.freeze=t},cellConfig:function(e,t,n){var r,i=[],o=Dd(t);try{for(o.s();!(r=o.n()).done;){var a,s=r.value,u={};for(a in s){var c=s[a];if(u[jd[a]]=c,"dataConfig"==a){var l,h=Nd,f=(n&&(h=Fd),{});for(l in c){var d=c[l];f[h[l]]=d}u.DataConfig=f}}i.push(u)}}catch(e){o.e(e)}finally{o.f()}e.CellConfig=i},groupConfig:function(e,t){try{!function e(t,n){var r,i=Dd(t);try{for(i.s();!(r=i.n()).done;){var o=r.value,a=(o.no_agg=o.noagg||!1,o.repeat=o.repeat&&"object"==Od(o.repeat)?o.repeat:Pd(),Rd(o.position,n)),s=a.sri,u=a.sci,c=a.eri,l=a.eci;o.sri=s,o.sci=u,o.eri=c,o.eci=l,o.children&&e(o.children,n),delete o.position}}catch(t){i.e(t)}finally{i.f()}}(t)}catch(e){}e.GroupConfig=t},print:function(e,t){e.print=t},filter:function(e,t){e.filter=t},stylesConfig:function(e,t){e.StylesConfig=t},collapse:function(e,t){e.collapse=t},pageFreezeConfig:function(e,t){e.pageFreezeConfig=t},waterMaskImageConfig:function(e,t){e.waterMaskImageConfig=t},waterMask:function(e,t){e.waterMask=t},toolbarButtonList:function(e,t){e.toolbarButtonList=t},sheetPaging:function(e,t){e._sheetPaging=t},paramsConfig:function(e,t){e.paramsConfig=t},apiConfig:function(e,t){e.apiConfig=t},dataConfig:function(e,t){e.dataConfig=t},thirdDatasetConfig:function(e,t){e.thirdDatasetConfig=t}},Ud=function(e,t,n){var r=n.data.rows.get(e),i={};if(r.cells)for(var o in r.cells)(o=r.cells[o]).bindObj&&o.bindObj.value&&(i[o.bindObj.value]=o.text);return t.PenetrateDict?_.merge(i,t.PenetrateDict):i},zd=function(e,t,n,r,i){var o,a,s,u;e&&(e.url||e.reportId)&&(2==e.type?(o=e.url,e.params&&0<e.params.length&&e.params.forEach((function(e,i){(e.key||e.value)&&(o+=0==i?"?":"&",2==e.type?o+="".concat(e.key,"=").concat(e.value):1==e.type&&t.bindObj&&t.bindObj.value&&(null!=(i=function(e,t){for(var n in t.includes(".")||(t="数据表."+t),e)if(n==t)return e[n]}(i=Ud(r,t,n),e.value))&&(o+="".concat(e.key,"=").concat(i))))})),1==e.openType?window.open(o,"_blank"):2==e.openType&&window.open(o,"_self")):3==e.type?(s=e.url)!=n.data.name&&(null!=(a=function(e,t){for(var n=null,r=0;r<e.length;r++)if(e[r]==t){n=r;break}return n}(a=(u=n.$parent.bottombar).dataNames,s))&&(s=u.items[a],ve()(s.el).click())):(u=Ud(r,t,n),n.trigger(e.event,e,u)))};function Hd(e,t){var n=s("div","".concat(pe,"-toast")),r=s("div","".concat(pe,"-dimmer active")).on("click.stop",(function(){return i()})),i=function(){document.body.removeChild(n.el),document.body.removeChild(r.el)},o=(t=(e=(n.children(s("div","".concat(pe,"-toast-header")).children(new ct("close").css({width:"18px",height:"18px",cursor:"pointer"}).on("click.stop",(function(){return i()})),e),s("div","".concat(pe,"-toast-content")).html(t)),document.body.appendChild(n.el),document.body.appendChild(r.el),n.box())).width,e=e.height,(a=document.documentElement).clientHeight),a=a.clientWidth;n.offset({left:(a-t)/2,top:(o-e)/3})}function $d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}n(382),n(383);var Qd={isborder:!0,disabled:!1,type:"",clickEvent:function(){}},Vd=function(){function e(t){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},r=this,i=e;if(!(r instanceof i))throw new TypeError("Cannot call a class as a function");this.title=t,this.options=Wu(Qd,n),this.el=this.init(),this.options.disabled?this.disable():this.enable()}var t,n;return t=e,(n=[{key:"init",value:function(){var e=this,t=this.title,n="primary"==this.options.type?"".concat(pe,"-button-primary"):"".concat(pe,"-color_4E89FB");return s("button","".concat(pe,"-dialog_button ").concat(n)).children(s("div","".concat(pe,"-height_14 ").concat(pe,"-flex-center")).children(s("span").innerHTML("".concat(t)))).on("click",(function(t){e.options.clickEvent(t)}))}},{key:"disable",value:function(){var e=ve()(this.el.el);e.find("button").prop("disabled","disabled"),e.addClass("is-disabled")}},{key:"enable",value:function(){var e=ve()(this.el.el);e.find("button").removeProp("disabled"),e.removeClass("is-disabled")}}])&&$d(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function qd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}n(384);var Gd=function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.el=this.element(),t&&this.el.css(t)}var t,n;return t=e,(n=[{key:"element",value:function(){return s("div","".concat(pe,"-divider--vertical"))}},{key:"show",value:function(){this.el.show()}},{key:"hide",value:function(){this.el.hide()}}])&&qd(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Wd(e){return(Wd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Kd(e,t){var n,r,i,o,a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(a)return r=!(n=!0),{s:function(){a=a.call(e)},n:function(){var e=a.next();return n=e.done,e},e:function(e){r=!0,i=e},f:function(){try{n||null==a.return||a.return()}finally{if(r)throw i}}};if(Array.isArray(e)||(a=function(e,t){var n;if(e)return"string"==typeof e?Yd(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Yd(e,t):void 0}(e))||t&&e&&"number"==typeof e.length)return a&&(e=a),o=0,{s:t=function(){},n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Yd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Xd(e,t,n,r,i,o,a){var s;o&&e&&("height"in(e=_.cloneDeep(e))&&(t=Number(t),s=Number(e.height),n[t]?n[t].height=s:n[t]={cells:{},height:s}),"width"in e&&(n=Number(r),t=Number(e.width),i[n]?i[n].width=t:i[n]={width:t}),delete e.height,delete e.width,(s=null)!=(s="style"in o?(r=_.cloneDeep(a[o.style]),e.font&&(r.font||(r.font={}),Object.assign(r.font,e.font)),e.format&&(r.format||(r.format={}),Object.assign(r.format,e.format)),Object.assign(r,e),Jd(r,a)):Jd(e,a))&&(o.style=s))}n(268),n(269);var Jd=function(e,t){for(var n=0;n<t.length;n+=1){var r=t[n];if(D.a.equals(r,e))return n}return t.push(e),t.length-1},Zd=function(e,t){for(var n=0;n<e.length;n++){var r,i=e[n],o=(i.or,i.oc,i.styles),a=(i.cols.len,i.rows.len,i.rows),s=i.cols;for(r in a){if("object"!=Wd(a[r]))return;var u,c=a[r].cells;for(u in c){var l=c[u];try{if(l&&"warnStyle"in l){var h,f=Kd(l.warnStyle);try{for(f.s();!(h=f.n()).done;){var d=h.value;if(1==d.act_on)Xd(d.stylesConfig,r,a,u,s,l,o);else if(4==d.act_on||2==d.act_on){var p=a[Number(r)].cells;if(p)for(var m in p){var g=p[Number(m)];Xd(d.stylesConfig,r,a,m,s,g,o)}}else if(5==d.act_on)for(var A in a){var v=a[A];if("object"!=Wd(v))return;var b=v.cells[u];Xd(d.stylesConfig,A,a,u,s,b,o)}}}catch(e){f.e(e)}finally{f.f()}}}catch(e){}}}}};function ep(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function tp(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(e,t)||function(e,t){var n;if(e)return"string"==typeof e?np(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?np(e,t):void 0}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function np(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function rp(e,t,n,r){return e=Au(e,t),"".concat(e,":").concat(Au(n,r))}var ip=function(){function e(t,n,r,i){var o,a,s=this;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");a=function(e,t){return 0===(e=s.sheetValueArr[e][t])||e?e:""},(o="getCellTextOrDefault")in(u=this)?Object.defineProperty(u,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):u[o]=a,this.data=t,this.$parent=n,this.buttonList=t.toolbarButtonList,this.wrapperEl=null,this.show=r,this.onQueryPlan=i,this.pageConfig=null,this.pageDataCount=0,this.totalRowCount=0,this.sheetPage=[],this.pageEndIndex=0,this.pageIndexList=[],this.jumpPageNumber=1,this.$$totalPage=1,this.pageMergeMap=[],this.pageMergeCache=[],this.pivotData=null,this.sheetValueArr=[],this.currentTabSheet=null,this.$$parent=null,this.el=this.init(),this.createToolbarList(),this.buttonListEl=[],this.inputEl=null;var u=[];try{u=n.reportConfig[0].SheetData.paramsConfig}catch(t){}this.xzSearchPanelEl=new xzSearchPanel(u,[],i),"function"==typeof i&&i().then((function(e){s.xzSearchPanelEl.setQueryPlan(e)})).catch((function(e){})),this.xzSearchPanelEl.on("submit",(function(e){s.$parent.commitUpdate(e)})),this.xzSearchPanelEl.on("query-plan",(function(e,t,n){s.$parent.sheet.trigger("query-plan",e,t,n)}))}var t,n;return t=e,(n=[{key:"sheetResetData",value:function(e){var t=this;Zd(e),this.$$parent.datas.forEach((function(n,r){n.name==e[0].name&&(n.setData(e[0]),t.$$parent.sheet.resetData(n,!0))}))}},{key:"pagingMerge",value:function(e,t,n,r,i,o,a){var s,u=this.pageMergeMap[this.currentTabSheet],c=[];for(s in u){var l=(d=u[s]).sri,h=d.eri,f=d.sci,d=d.eci;if(p=t,m=l,!(h<e||p<m)){var p=a.rows[l].cells[f],m=(l<=e&&t<=h?(l=e,h=t):l<=e?l=e:t<=h&&(h=t),f<=n&&r<=d?(f=n,d=r):f<=n?f=n:r<=d&&(d=r),"");if(2==this.pageConfig.mode){var g=i.rows[l].cells,A=[h-l,d-f],v=o[f];g[v]?g[v].merge=A:g[v]={text:p.text,merge:A,style:p.style},m=rp(o[f],l,o[d],h)}else try{var b=o[l],y=i.rows[b].cells,w=[h-l,d-f];y[f]?y[f].merge=w:y[f]={text:p.text,merge:w,style:p.style},m=rp(f,o[l],d,o[h])}catch(e){}c.push(m)}}return c}},{key:"createpageIndexList",value:function(e,t,n,r,i,o){for(var a=[],s=1;s<=r;s++){var u=1==s?0:2==s?i-n:a[s-2]+(i-t-n);a.push(u)}(this.pageIndexList=a)[a.length-1]+(i-t-n)<e&&(o.page=o.page+1,this.createpageIndexList(e,t,n,o.page,i,o))}},{key:"formulaCell",value:function(e){for(var t in e)if(e[t]&&e[t].cells){var n,r=e[t].cells;for(n in r){var i,o=r[n];o&&"string"==typeof o.text&&"="===o.text[0]&&(i=this.$$parent.sheet.table.cacheCellResult(o.text,this.getCellTextOrDefault,t,n),o.cacheResult=i)}}}},{key:"rowPaging",value:function(){var e=this.pivotData[this.currentTabSheet],t=this.jumpPageNumber,n=(n=Number(this.pageDataCount))>e.rows.len?e.rows.len:n;if(this.totalRowCount=e.rows.len,n>=e.rows.len)return this.$$totalPage=1,this.sheetPage[this.currentTabSheet]=this.$$totalPage,[e];var r={},i={};if(this.pageConfig.repeat&&0<this.pageConfig.repeat.checkGroup.length)try{if(-1!=(y=(C=this.pageConfig.repeat).checkGroup).indexOf("head")){var o=C.hs,a=C.he;if(o&&a){var s,u=null,c=null,l=(o=parseInt(o)-1,a=parseInt(a)-1,e.or);for(s in l)null==u&&o==l[s]&&(u=parseInt(s)),a==l[s]&&(c=parseInt(s));null==u&&null!=c?u=c-(a-o):null!=u&&null==c?c=u+(a-o):null==u&&null==c&&(u=o,c=a);for(var h=u;h<=c;h++)r[h]=_.cloneDeep(e.rows[h])}}if(-1!=y.indexOf("foot")){var f=C.fs,d=C.fe;if(f&&d){var p,m=null,g=null,A=(f=parseInt(f)-1,d=parseInt(d)-1,e.or);for(p in A)null==m&&f==A[p]&&(m=parseInt(p)),d==A[p]&&(g=parseInt(p));null==m&&null!=g?m=g-(d-f):null!=m&&null==g?g=m+(d-f):null==m&&null==g&&(m=f,g=d);for(var v=m;v<=g;v++)i[v]=_.cloneDeep(e.rows[v])}}}catch(e){}var b,y=(t-1)*n,w=t*n,x={},C=Math.ceil(e.rows.len/n),k=Object.keys(r).length,E=Object.keys(i).length,S=(T=n,S=e.rows.len,Math.ceil((S+(C-1)*(k+E))/T));for(b in this.$$totalPage=S,e){var O=e[b];"rows"!=b&&(x[b]=_.cloneDeep(O))}var T,D={},B=0,I={},M=((0<k||0<E)&&(T={page:S},createpageIndexList(e.rows.len,k,E,S,n,T),this.$$totalPage=T.page,1==t?w-=E:w=t==this.$$totalPage?(y=this.pageIndexList[t-1])+n-1:(y=this.pageIndexList[t-1])+(n-k-E)),this.sheetPage[this.currentTabSheet]=this.$$totalPage,this.$$totalPage<this.jumpPageNumber&&(y=((t=this.jumpPageNumber=1)-1)*n,w=t*n,(0<k||0<E)&&(w-=E)),[]),j=0,N=null;if(0<k&&1!=t)for(var F in r){if(F=_.cloneDeep(r[F]),(D[B]=F)&&F.cells){var R,P=F.cells;for(R in P){var L,U=P[R];U.merge&&(L=B+U.merge[0],U=parseInt(R)+U.merge[1],M.push(rp(parseInt(R),B,U,L)))}}B+=1}for(var z=y;z<w;z++){var H=_.cloneDeep(e.rows[z]);D[B]=H,I[z]=B,B+=1,void 0===H&&(j+=1,null==N&&(N=z))}if(0<E&&t!=this.$$totalPage)for(var $ in i){if($=_.cloneDeep(i[$]),(D[B]=$)&&$.cells){var Q,V=$.cells;for(Q in V){var q,G=V[Q];G.merge&&(q=B+G.merge[0],G=parseInt(Q)+G.merge[1],M.push(rp(parseInt(Q),B,G,q)))}}B+=1}if(this.formulaCell(D),this.pageConfig.fill&&this.jumpPageNumber==this.$$totalPage&&0<j){var W=_.cloneDeep(e.rows[e.rows.len-1]);if(W&&W.cells)for(var K in W.cells)(K=W.cells[K])&&(K.text=null,K.penetrate=-1);for(var Y=N;Y<n;Y++)D[Y]=W}return D.len=n,x.rows=D,S=this.pagingMerge(y,w-1,0,e.cols.len,x,I,e),x.merges=S.concat(M),[x]}},{key:"groupPaging",value:function(){}},{key:"colPaging",value:function(){}},{key:"jumpPaging",value:function(e,t){e=e||this.$$totalPage,((e=t?Number(this.jumpPageNumber):e)>this.$$totalPage||e<1)&&(e=1),this.jumpPageNumber!==e&&(this.jumpPageNumber=e,t=this.createPaging(),this.sheetResetData(t))}},{key:"createPaging",value:function(){return 1==this.pageConfig.mode?this.rowPaging():3==this.pageConfig.mode?this.groupPaging():2==this.pageConfig.mode?this.colPaging():void 0}},{key:"mergeBottomBarEventFn",value:function(e,t,n){e!=this.currentTabSheet&&this.pageConfig&&(this.currentTabSheet=e,this.jumpPageNumber=1,this.sheetPage[e]?this.$$totalPage=this.sheetPage[e]:this.$$totalPage=1,(e=this.createPaging())&&this.sheetResetData(e),n.setpageDom("".concat(this.jumpPageNumber,"/").concat(this.$$totalPage)))}},{key:"mergeBottomBarEvent",value:function(e,t){var n=this;e.onInterceptSheet("clickSheet",(function(r,i){n.mergeBottomBarEventFn(i,e,t)})),e.onInterceptSheet("dropdownSelectSheet",(function(r,i,o){i!=n.currentTabSheet&&n.mergeBottomBarEventFn(i,e,t)}))}},{key:"getParams",value:function(){return this.xzSearchPanelEl.getData()}},{key:"paramsUpdate",value:function(e){this.xzSearchPanelEl.setData(e)}},{key:"setSheetData",value:function(e){this.xzSearchPanelEl.setSheetData(e)}},{key:"init",value:function(){return this.wrapperEl=s("div","".concat(pe,"-toolbar_wrapper")),s("div","".concat(pe,"-toolbar_panel")).children(this.wrapperEl).css("display","".concat(this.show?"block":"none"))}},{key:"setpageDom",value:function(e,t){var n;this.inputEl&&(n=null,this.buttonList.forEach((function(e,t){3==e.type&&e.show&&(n=t)})),this.inputEl.setValue(e),this.buttonListEl[n].el.childNodes[1].innerHTML="/".concat(t))}},{key:"isHide",value:function(){var e=!1;return this.buttonList.forEach((function(t){t.show&&(e=!0)})),e}},{key:"dealPagingMerge",value:function(e,t){e=e.merges;var n={};0<e.length&&e.forEach((function(e,t){var r,i,o;n[t]=(r=(e=tp(gu((t=(t=e).split(":"))[0]),2))[0],i=e=e[1],o=r,1<t.length&&(o=(t=tp(gu(t[1]),2))[0],i=t[1]),{sci:r,sri:e,eci:o,eri:i})})),this.pageMergeMap[t]=n}},{key:"initPaging",value:function(e,t,n){if(!this.$$parent||!this.pivotData||null==this.currentTabSheet){this.$$parent=n,this.pivotData=e.map((function(e){return e.getData()}));for(var r=0;r<e.length;r++)if(e[r].name==t.name){this.currentTabSheet=r;break}for(var i=0;i<this.pivotData.length;i++){var o=this.pivotData[i];this.dealPagingMerge(o,i)}}}},{key:"getPivotData",value:function(){return this.pivotData}},{key:"createPageConfig",value:function(e){var t={mode:0};1==e.type?(t.mode=1,t.content=Number(e.count),t.repeat=e.repeat,t.fill=e.tailFill):2==e.type?t.mode=2:3==e.type&&(t.mode=3),this.pageConfig=t,this.pageDataCount=Number(t.content)}},{key:"getConfig",value:function(){return{pageConfig:this.pageConfig,pageDataCount:this.pageDataCount,totalRowCount:this.totalRowCount,sheetPage:this.sheetPage,pageEndIndex:this.pageEndIndex,pageIndexList:this.pageIndexList,jumpPageNumber:this.jumpPageNumber,$$totalPage:this.$$totalPage,pageMergeMap:this.pageMergeMap,pivotData:this.pivotData,sheetValueArr:this.sheetValueArr,currentTabSheet:this.currentTabSheet,$$parent:this.$$parent}}},{key:"render",value:function(e){var t;this.data=e,this.buttonList=e.toolbarButtonList,this.resetPaging(),this.createToolbarList(),this.isHide()?(e._sheetPaging&&0!=e._sheetPaging.type||this.setpageDom(1,1),this.initPaging(this.$parent.datas,this.data,this.$parent),this.mergeBottomBarEvent(this.$parent,this),e._sheetPaging?(this.createPageConfig(_.cloneDeep(e._sheetPaging)),(e=this.createPaging())&&this.sheetResetData(e),t=(e=this.getConfig()).jumpPageNumber,e=e.$$totalPage,this.setpageDom(t,e)):this.buttonListEl.forEach((function(e){var t=e.attr("data-type");1!=t&&2!=t&&3!=t&&4!=t&&5!=t||e.addClass("".concat(pe,"-disabled"))}))):this.el.hide()}},{key:"resetPaging",value:function(){this.pageConfig=null,this.pageDataCount=0,this.totalRowCount=0,this.sheetPage=[],this.pageEndIndex=0,this.pageIndexList=[],this.jumpPageNumber=1,this.$$totalPage=1,this.pageMergeMap=[],this.pageMergeCache=[],this.pivotData=null,this.sheetValueArr=[],this.currentTabSheet=null}},{key:"createToolbarList",value:function(){var e=this;this.wrapperEl.innerHTML(""),this.buttonListEl=[],this.buttonList.forEach((function(t,n){e.createToolbarItem(t),n!=e.buttonList.length-1&&t.show&&e.wrapperEl.children(new Gd({height:"20px",margin:"0px 4px"}).el)})),this.data.paramsConfig&&(0!=this.buttonListEl.length&&this.wrapperEl.children(new Gd({height:"20px",margin:"0px 4px"}).el),this.createToolbarItem({type:10,show:!0}))}},{key:"createToolbarItem",value:function(e){var t,n,r=this,i=this;e.show&&(n=null,3!=e.type&&10!=e.type?(n=s("span","".concat(pe,"-toolbar_item")).children(s("i","".concat(e.icon)).css({color:e.color,marginRight:"5px",display:"".concat(e.showIcon?"block":"none")}),s("span").innerHTML(e.text).css({display:"".concat(e.showText?"block":"none")})).attr({"data-type":e.type}),this.addEvent(n,e.type,e)):3==e.type?(t=new ac({placeholder:""},"",{height:"18px",width:"42px",marginRight:"5px",padding:"0px 4px",textAlign:"center"},(function(){})),n=s("span","".concat(pe,"-toolbar_item_page")).children(t.el,s("span").innerHTML("/1").css({display:"".concat(e.showText?"block":"none")})).attr({"data-type":e.type}),this.inputEl=t,this.inputEl.onBlur((function(e){var n=Number(t.getValue()),r=(n=(i.jumpPaging(n),i.getConfig())).jumpPageNumber;n=n.$$totalPage;i.setpageDom(r,n)}))):10==e.type&&((e=new Vd("查询")).el.css({color:"#fff",padding:"5px"}),e.el.on("click",(function(){r.xzSearchPanelEl.show()})),n=s("span","".concat(pe,"-toolbar_item_params")).children(e.el)),this.buttonListEl.push(n),this.wrapperEl.children(n))}},{key:"nextPaging",value:function(){var e=Number(this.jumpPageNumber);e<this.$$totalPage&&(this.jumpPageNumber=e+1,e=this.createPaging(),this.sheetResetData(e))}},{key:"addEvent",value:function(e,t,n){var r=this,i=function(){},o=this;1==t?i=function(e){o.jumpPaging(e);var t=(e=o.getConfig()).jumpPageNumber;e=e.$$totalPage;o.setpageDom(t,e)}:2==t?i=function(){o.lastPaging();var e=(t=o.getConfig()).jumpPageNumber,t=t.$$totalPage;o.setpageDom(e,t)}:3!=t&&(4==t?i=function(){o.nextPaging();var e=(t=o.getConfig()).jumpPageNumber,t=t.$$totalPage;o.setpageDom(e,t)}:5==t?i=function(e){o.jumpPaging(e);var t=(e=o.getConfig()).jumpPageNumber;e=e.$$totalPage;o.setpageDom(t,e)}:6==t?i=this.$parent.print:7==t?i=this.$parent.exportExcel:8==t&&(i=function(e){var t="";1==e.eventType?t=window.location.origin+e.reportId:2==e.eventType&&(t=e.customUrl),1==e.isOpen?window.open(t,"_blank "):window.location.href=t})),e.on("click",(function(){6==t||7==t?i.call(r.$parent):1==t?i(1):8==t?i(n):i()}))}},{key:"lastPaging",value:function(){var e=Number(this.jumpPageNumber);1<e&&(this.jumpPageNumber=e-1,e=this.createPaging(),this.sheetResetData(e))}}])&&ep(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function op(e,t){return function(n){n&&(e[t]=n)}}function ap(e,t,n){return function(r){r&&(e[t][n]=r)}}function sp(e,t){return function(n){var r=n.prototype;e.forEach((function(e){t(r,e)}))}}var up="undefined",cp=typeof window!==up,lp=typeof document!==up&&document,hp=[{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:'\\"',close:'\\"'},{open:"\\'",close:"\\'"}],fp=1e-7,dp={cm:function(e){return 96*e/2.54},mm:function(e){return 96*e/254},in:function(e){return 96*e},pt:function(e){return 96*e/72},pc:function(e){return 96*e/6},"%":function(e,t){return e*t/100},vw:function(e,t){return e/100*(void 0===t?window.innerWidth:t)},vh:function(e,t){return e/100*(void 0===t?window.innerHeight:t)},vmax:function(e,t){return e/100*(void 0===t?Math.max(window.innerWidth,window.innerHeight):t)},vmin:function(e,t){return e/100*(void 0===t?Math.min(window.innerWidth,window.innerHeight):t)}};function pp(e,t,n,r){return(e*r+t*n)/(n+r)}function mp(e){return typeof e===up}function gp(e){return e&&"object"==typeof e}function Ap(e){return Array.isArray(e)}function vp(e){return"string"==typeof e}function bp(e){return"number"==typeof e}function yp(e){return"function"==typeof e}function wp(e,t,n){return e.ignore?(t=t.slice(Math.max(n-3,0),n+3).join(""),new RegExp(e.ignore).exec(t)):null}function xp(e,t){var n=void 0===(s=(t=vp(t)?{separator:t}:t).separator)?",":s,r=t.isSeparateFirst,i=t.isSeparateOnlyOpenClose,o=void 0===(s=t.isSeparateOpenClose)?i:s,a=void 0===(s=t.openCloseCharacters)?hp:s,s=(t=a.map((function(e){var t=e.open;return t===(e=e.close)?t:t+"|"+e})).join("|"),new RegExp("(\\s*"+n+"\\s*|"+t+"|\\s+)","g")),u=e.split(s).filter((function(e){return e&&"undefined"!==e})),c=u.length,l=[],h=[];function f(){return h.length&&(l.push(h.join("")),h=[])}for(var d,p=function(t){var s=u[t].trim(),p=t,m=Bp(a,(function(e){return e.open===s})),g=Bp(a,(function(e){return e.close===s}));if(m){if(-1!==(p=function e(t,n,r,i,o){if(wp(t,n,r))return r;for(var a,s=t,u=n,c=i,l=o,h=r+1;h<c;++h){var f=function(t){var n,r,i=u[t].trim();return i!==s.close||wp(s,u,t)?(n=t,-1===(n=(r=Bp(l,(function(e){return e.open===i})))?e(r,u,t,c,l):n)?(a=t,"break"):void(a=t=n)):{value:t}}(h);if(h=a,"object"==typeof f)return f.value;if("break"===f)break}return-1}(m,u,t,c,a))&&o)return f()&&r||(l.push(u.slice(t,p+1).join("")),t=p,r)?(d=t,"break"):(d=t,"continue")}else{if(g&&!wp(g,u,t))return(m=
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

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

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}(a)).splice(a.indexOf(g),1),{value:xp(e,{separator:n,isSeparateFirst:r,isSeparateOnlyOpenClose:i,isSeparateOpenClose:o,openCloseCharacters:m})};if(g=s,!((""!==(m=n)&&" "!=m||""!==g&&" "!=g)&&g!==m||i))return f(),r?(d=t,"break"):(d=t,"continue")}h.push(u.slice(t,(p=-1===p?c-1:p)+1).join("")),d=t=p},m=0;m<c;++m){var g=p(m);m=d;if("object"==typeof g)return g.value;if("break"===g)break}return h.length&&l.push(h.join("")),l}function Cp(e){return xp(e,"")}function kp(e){return xp(e,",")}function Ep(e){return!(e=/([^(]*)\(([\s\S]*)\)([\s\S]*)/g.exec(e))||e.length<4?{}:{prefix:e[1],value:e[2],suffix:e[3]}}function Sp(e){var t,n;return(e=/^([^\d|e|\-|\+]*)((?:\d|\.|-|e-|e\+)+)(\S*)$/g.exec(e))?(t=e[1],n=e[2],{prefix:t,unit:e[3],value:parseFloat(n)}):{prefix:"",unit:"",value:NaN}}function _p(e){return e.replace(/[\s-_]+([^\s-_])/g,(function(e,t){return t.toUpperCase()}))}function Op(e,t){return void 0===t&&(t="-"),e.replace(/([a-z])([A-Z])/g,(function(e,n,r){return""+n+t+r.toLowerCase()}))}function Tp(){return Date.now?Date.now():(new Date).getTime()}function Dp(e,t,n){void 0===n&&(n=-1);for(var r=e.length,i=0;i<r;++i)if(t(e[i],i,e))return i;return n}function Bp(e,t,n){return-1<(t=Dp(e,t))?e[t]:n}var Ip=function(){var e=Tp(),t=cp&&(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.msRequestAnimationFrame);return t?t.bind(window):function(t){var n=Tp();return setTimeout((function(){t(n-e)}),1e3/60)}}(),Mp=function(){var e=cp&&(window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.msCancelAnimationFrame);return e?e.bind(window):function(e){clearTimeout(e)}}();function jp(e){return Object.keys(e)}function Np(e,t){var n=(e=Sp(e)).value;e=e.unit;if(gp(t)){var r=t[e];if(r){if(yp(r))return r(n);if(dp[e])return dp[e](n,r)}}else if("%"===e)return n*t/100;return dp[e]?dp[e](n):n}function Fp(e,t,n){return Math.max(t,Math.min(e,n))}function Rp(e,t,n,r){return void 0===r&&(r=e[0]/e[1]),[[$p(t[0],fp),$p(t[0]/r,fp)],[$p(t[1]*r,fp),$p(t[1],fp)]].filter((function(e){return e.every((function(e,r){var i=$p(r=t[r],fp);return n?e<=r||e<=i:r<=e||i<=e}))}))[0]||e}function Pp(e,t,n,r){var i,o,a,s,u;return r?(i=e[0],o=e[1],a=(s=Rp(e,t,!1,r=!0===r?i/o:r))[0],s=s[1],u=(r=Rp(e,n,!0,r))[0],r=r[1],i<a||o<s?(i=a,o=s):(u<i||r<o)&&(i=u,o=r),[i,o]):e.map((function(e,r){return Fp(e,t[r],n[r])}))}function Lp(e){for(var t=e.length,n=0,r=t-1;0<=r;--r)n+=e[r];return t?n/t:0}function Up(e,t){var n=t[0]-e[0];t=t[1]-e[1];return 0<=(e=Math.atan2(t,n))?e:e+2*Math.PI}function zp(e){t=e;var t,n,r=Up(n=[0,1].map((function(e){return Lp(t.map((function(t){return t[e]})))})),e[0]);return r<(n=Up(n,e[1]))&&n-r<Math.PI||n<r&&n-r<-Math.PI?1:-1}function Hp(e,t){return Math.sqrt(Math.pow((t?t[0]:0)-e[0],2)+Math.pow((t?t[1]:0)-e[1],2))}function $p(e,t){var n;return t?(n=1/t,Math.round(e/t)/n):e}function Qp(e,t){e.forEach((function(n,r){e[r]=$p(e[r],t)}))}function Vp(e,t){-1===e.indexOf(t)&&e.push(t)}function qp(e,t){return e.classList?e.classList.contains(t):!!e.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}function Gp(e,t){e.classList?e.classList.add(t):e.className+=" "+t}function Wp(e,t){e.classList?e.classList.remove(t):(t=new RegExp("(\\s|^)"+t+"(\\s|$)"),e.className=e.className.replace(t," "))}function Kp(e,t,n,r){e.addEventListener(t,n,r)}function Yp(e,t,n,r){e.removeEventListener(t,n,r)}function Xp(e){return(null==e?void 0:e.ownerDocument)||lp}function Jp(e){return Xp(e).documentElement}function Zp(e){return Xp(e).body}function em(e){return(null==(e=null==e?void 0:e.ownerDocument)?void 0:e.defaultView)||window}function tm(e){return e&&"postMessage"in e&&"blur"in e&&"self"in e}function nm(e){return gp(e)&&e.nodeName&&e.nodeType&&"ownerDocument"in e}var rm=function(){function e(){this.keys=[],this.values=[]}var t=e.prototype;return t.get=function(e){return this.values[this.keys.indexOf(e)]},t.set=function(e,t){var n=this.keys,r=this.values,i=n.indexOf(e);n[i=-1===i?n.length:i]=e,r[i]=t},e}(),im=function(){function e(){this.object={}}var t=e.prototype;return t.get=function(e){return this.object[e]},t.set=function(e,t){this.object[e]=t},e}(),om="function"==typeof Map,am=function(){function e(){}var t=e.prototype;return t.connect=function(e,t){this.prev=e,this.next=t,e&&(e.next=this),t&&(t.prev=this)},t.disconnect=function(){var e=this.prev,t=this.next;e&&(e.next=t),t&&(t.prev=e)},t.getIndex=function(){for(var e=this,t=-1;e;)e=e.prev,++t;return t},e}(),sm=function(){function e(e,t,n,r,i,o,a,s){this.prevList=e,this.list=t,this.added=n,this.removed=r,this.changed=i,this.maintained=o,this.changedBeforeAdded=a,this.fixed=s}var t=e.prototype;return Object.defineProperty(t,"ordered",{get:function(){return this.cacheOrdered||this.caculateOrdered(),this.cacheOrdered},enumerable:!0,configurable:!0}),Object.defineProperty(t,"pureChanged",{get:function(){return this.cachePureChanged||this.caculateOrdered(),this.cachePureChanged},enumerable:!0,configurable:!0}),t.caculateOrdered=function(){r=this.changedBeforeAdded,e=this.fixed,t=[],n=[],r.forEach((function(e){var r=e[0],i=(e=e[1],new am);t[r]=i,n[e]=i})),t.forEach((function(e,n){e.connect(t[n-1])}));var e,t,n,r=r.filter((function(t,n){return!e[n]})).map((function(e,r){var i,o=e[0];return o===(e=e[1])?[0,0]:(o=t[o],e=n[e-1],i=o.getIndex(),o.disconnect(),e?o.connect(e,e.next):o.connect(void 0,t[0]),[i,o.getIndex()])})),i=this.changed,o=[];this.cacheOrdered=r.filter((function(e,t){var n=e[0],r=(e=e[1],(t=i[t])[0]);t=t[1];if(n!==e)return o.push([r,t]),!0})),this.cachePureChanged=o},e}();function um(e,t,n){var r=om?Map:n?im:rm,i=(n=n||function(e){return e},[]),o=[],a=[],s=e.map(n),u=(n=t.map(n),new r),c=new r,l=[],h=[],f={},d=[],p=0,m=0;return s.forEach((function(e,t){u.set(e,t)})),n.forEach((function(e,t){c.set(e,t)})),s.forEach((function(e,t){void 0===(e=c.get(e))?(++m,o.push(t)):f[e]=m})),n.forEach((function(e,t){void 0===(e=u.get(e))?(i.push(t),++p):(a.push([e,t]),m=f[t]||0,l.push([e-m,t-p]),h.push(t===e),e!==t&&d.push([e,t]))})),o.reverse(),new sm(e,t,i,o,d,a,l,h)}Qo=function(){function e(e,t){void 0===e&&(e=[]),this.findKeyCallback=t,this.list=[].slice.call(e)}return e.prototype.update=function(e){e=[].slice.call(e);var t=um(this.list,e,this.findKeyCallback);return this.list=e,t},e}();var lm=function(e,t){return(lm=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function hm(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}lm(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var fm=function(){return(fm=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function dm(e,t){var n={};for(i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]]);return n}function pm(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||((r=r||Array.prototype.slice.call(t,0,i))[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function mm(e){var t=0;return e.map((function(e){return null==e?"$compat".concat(++t):"".concat(e)}))}function gm(e,t){if(t)for(var n in t)mp(e[n])&&(e[n]=t[n]);return e}function Am(e,t){if(e!==t){for(var n in e)if(!(n in t))return!0;for(var n in t)if(e[n]!==t[n])return!0}return!1}function vm(e){var t=e.className;e=dm(e,["className"]);return null!=t&&(e.class=t),delete e.style,delete e.children,e}function bm(e){var t,n={},r={};for(t in e)0===t.indexOf("on")?r[t]=e[t]:n[t]=e[t];return[n,r]}function ym(e){var t;return e?nm(t=e.b)?t:ym(e.c):null}function wm(e){var t=e.parentNode;t&&t.removeChild(e)}function xm(e){e.forEach((function(e){e()}))}function Cm(){return this.constructor(this.props,this.context)}var km=0;ko=function(){function e(e,t,n,r,i,o,a){void 0===a&&(a={}),this.t=e,this.d=t,this.k=n,this.i=r,this.c=i,this.ref=o,this.ps=a,this.typ="prov",this._ps=[],this._cs={},this._hyd=null,this._sel=!1}var t=e.prototype;return t.s=function(){return!0},t.u=function(e,t,n,r,i){var o,a=this,s=a.d,u=function e(t){var n=[];return t.forEach((function(t){n=n.concat(Ap(t)?e(t):t)})),n}(jp(o=t).map((function(e){return o[e]})).filter((function(e){return e.$_req})).map((function(e){return e.$_subs}))),c=Bp(u,(function(e){return e.d===s}));return!a.b||vp(n)||i||a.s(n.props,r)||c?(a.o=n,a.ss(r),i=a.ps,vp(n)||(a.ps=n.props,a.ref=n.ref),Sm(this),a.r(e,t,a.b?i:{},r),!0):(u.reduce((function(e,t){var n=t.d;return e[0]?e[0].d===n&&e.push(t):s<n&&e.push(t),e}),[]).forEach((function(n){Rm(n,n._ps,[n.o],e,t,!0)})),!1)},t.md=function(){this.rr()},t.ss=function(){},t.ud=function(){this.rr()},t.rr=function(){var e=this.ref,t=this.fr;e&&e(t?t.current:this.b)},e}();function Em(){return Object.__CROACT_CURRENT_INSTNACE__}function Sm(e){Object.__CROACT_CURRENT_INSTNACE__=e,km=0}var _m=function(){function e(e,t){this.props=e=void 0===e?{}:e,this.context=t,this.state={},this.$_timer=0,this.$_state={},this.$_subs=[],this.$_cs={}}var t=e.prototype;return t.render=function(){return null},t.shouldComponentUpdate=function(e,t){return this.props!==e||this.state!==t},t.setState=function(e,t,n){var r=this;r.$_timer||(r.$_state={}),clearTimeout(r.$_timer),r.$_timer=0,r.$_state=fm(fm({},r.$_state),e),n?r.$_setState(t,n):r.$_timer=window.setTimeout((function(){r.$_timer=0,r.$_setState(t,n)}))},t.forceUpdate=function(e){this.setState({},e,!0)},t.componentDidMount=function(){},t.componentDidUpdate=function(e,t){},t.componentWillUnmount=function(){},t.$_setState=function(e,t){var n=[],r=this.$_p;Rm(r.c,[r],[r.o],n,r._cs,fm(fm({},this.state),this.$_state),t)&&(e&&n.push(e),xm(n),Sm(null))},e}();Ua=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return hm(t,e),t.prototype.shouldComponentUpdate=function(e,t){return Am(this.props,e)||Am(this.state,t)},t}(_m);function Om(e){function t(e){t.current=e}return t.current=e,t}var Tm=function(e){function t(t,n,r,i,o,a,s){return(n=e.call(this,t,n,r,i,o,a,gm(s=void 0===s?{}:s,t.defaultProps))||this).typ="comp",n._usefs=[],n._uefs=[],n._defs=[],n}hm(t,e);var n=t.prototype;return n.s=function(e,t){var n=this.b;return!1!==n.shouldComponentUpdate(gm(e,this.t.defaultProps),t||n.state)},n.r=function(e,t,n){var r=this,i=r.t,o=(r.ps=gm(r.ps,r.t.defaultProps),r.ps),a=!r.b,s=i.contextType,u=r.b,c=null==s?void 0:s.get(r),l=(r._cs=t,a?(u=function(e,t,n,r){var i,o;return null!=(i=null==e?void 0:e.prototype)&&i.render?o=new e(t,n):((o=new _m(t,n)).constructor=e)._fr?(r.fr=Om(),o.render=function(){return this.constructor(this.props,r.fr)}):o.render=Cm,o.$_p=r,o}(i,o,c,r),r.b=u):(u.props=o,u.context=c),u.state);0===(null==(c=null==(o=null==(i=(r._usefs=[],r._uefs=[],u.render()))?void 0:i.props)?void 0:o.children)?void 0:c.length)&&(i.props.children=r.ps.children),o=fm(fm({},t),u.$_cs);Rm(r,r._ps,i?[i]:[],e,o),a?r._uefs.push((function(){null!=s&&s.register(r),u.componentDidMount()})):r._uefs.push((function(){u.componentDidUpdate(n,l)})),e.push((function(){r._usefs.forEach((function(e){e()})),a?r.md():r.ud(),r._defs=r._uefs.map((function(e){return e()}))}))},n.ss=function(e){var t=this.b;t&&e&&(t.state=e)},n.un=function(){var e;this._ps.forEach((function(e){e.un()})),null!=(e=this.t.contextType)&&e.unregister(this),clearTimeout(this.b.$_timer),this._defs.forEach((function(e){e&&e()})),this.b.componentWillUnmount()},t}(ko);function Dm(e,t){var n=jp(e),r=jp(t),i=um(n,r,(function(e){return e})),o={},a={},s={};return i.added.forEach((function(e){e=r[e],o[e]=t[e]})),i.removed.forEach((function(t){t=n[t],a[t]=e[t]})),i.maintained.forEach((function(r){r=r[0],r=n[r];var i=[e[r],t[r]];e[r]!==t[r]&&(s[r]=i)})),{added:o,removed:a,changed:s}}var Bm=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.typ="elem",t._es={},t._svg=!1,t}hm(t,e);var n=t.prototype;return n.e=function(e,t){var n=this,r=n._es,i=n.b,o=e.replace(/^on/g,"").toLowerCase();t?(Yp(i,o,r[e]),delete r[e]):(r[e]=function(t){var r,i;null!=(i=(r=n.ps)[e])&&i.call(r,t)},Kp(i,o,r[e]))},n.s=function(e){return Am(this.ps,e)},n.r=function(e,t,n){var r,i,o,a=this,s=!a.b,u=a.ps,c=(s&&(f=ym(a.c),c=!1,c=!(!a._svg&&"svg"!==a.t)||f&&f.ownerSVGElement,a._svg=c,h=null==(h=a._hyd)?void 0:h.splice(0,1)[0],l=a.t,h?a._hyd=[].slice.call(h.children||[]):(f=Xp(f),h=c?f.createElementNS("http://www.w3.org/2000/svg",l):f.createElement(l)),a.b=h),Rm(a,a._ps,u.children,e,t),a.b),l=(f=bm(n))[0],h=f[1],f=(t=bm(u))[0],d=(t=t[1],c),p=(l=Dm(vm(l),vm(f))).added,m=(f=l.removed,l.changed);for(r in p)d.setAttribute(r,p[r]);for(i in m)d.setAttribute(i,m[i][1]);for(o in f)d.removeAttribute(o);var g,A,v=h,b=a;t=(v=Dm(h,t=t)).added;for(g in v.removed)b.e(g,!0);for(A in t)b.e(A);v=n.style||{},t=u.style||{};var y,w=(n=c).style,x=(n=Dm(v,t)).added,C=(v=n.removed,n.changed);for(y in x){var k=Op(y,"-");w.setProperty(k,x[y])}for(y in C){var E=Op(y,"-");w.setProperty(E,C[y][1])}for(y in v){var S=Op(y,"-");w.removeProperty(S)}return e.push((function(){s?a.md():a.ud()})),!0},n.un=function(){var e,t=this._es,n=this.b;for(e in t)Yp(n,e,t[e]);this._ps.forEach((function(e){e.un()})),this._es={},this._sel||wm(n)},t}(ko);function Im(e){return!e||nm(e)?e:(e=e.$_p._ps).length?Im(e[0].b):null}function Mm(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=(t=t||{}).key,o=t.ref;t=dm(t,["key","ref"]);return{type:e,key:i,ref:o,props:fm(fm({},t),{children:n.reduce((function(e,t){return e.concat(t)}),[]).filter((function(e){return null!=e&&!1!==e}))})}}var jm=function(e){function t(t,n){return(n=e.call(this,"container",n=void 0===n?0:n,"container",0,null)||this).typ="container",n.b=t,n}hm(t,e);var n=t.prototype;return n.r=function(){return!0},n.un=function(){},t}(ko),Nm=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.typ="text",t}hm(t,e);var n=t.prototype;return n.r=function(e){var t,n,r=this,i=!r.b;return i&&(t=ym(r.c),n=null==(n=r._hyd)?void 0:n.splice(0,1)[0],r.b=n||Xp(t).createTextNode(r.t.replace("text_",""))),e.push((function(){i?r.md():r.ud()})),!0},n.un=function(){wm(this.b)},t}(ko);function Fm(e,t,n,r){var i,o=r.d+1;return vp(e)||bp(e)?new Nm("text_".concat(e),o,t,n,r,null,{}):new("string"==typeof(i=e.type)?Bm:Tm)(i,o,t,n,r,e.ref,e.props)}function Rm(e,t,n,r,i,o,a){s=e,u=t,l=(c=n).map((function(e){return vp(e)?null:e.key})),(h=um(mm(u.map((function(e){return e.k}))),mm(l),(function(e){return e}))).removed.forEach((function(e){u.splice(e,1)[0].un()})),h.ordered.forEach((function(e){var t=e[0];e=e[1],t=u.splice(t,1)[0],u.splice(e,0,t),t=Im(t.b),e=Im(u[e+1]&&u[e+1].b);t&&t.parentNode.insertBefore(t,e)})),h.added.forEach((function(e){u.splice(e,0,Fm(c[e],l[e],e,s))})),d=h.maintained.filter((function(e){e[0];e=e[1];var t=c[e],n=u[e];return(vp(t)?"text_".concat(t):t.type)!==n.t?(n.un(),u.splice(e,1,Fm(t,l[e],e,s)),!0):(n.i=e,!1)}));var s,u,c,l,h=pm(pm([],h.added,!0),d.map((function(e){return e[0],e[1]})),!0),f=e._hyd,d=t.filter((function(e,t){return e._hyd=f,e.u(r,i,n[t],o,a)})),p=("container"===e.typ&&e._sel&&t.forEach((function(e){(e=function e(t){if(t)return t.b&&nm(t.b)?t:(t=t._ps).length?e(t[0]):null}(e))&&(e._sel=!0)})),e._hyd=null,ym(e));return p&&h.reverse().forEach((function(n){var r=Im((n=t[n]).b);r&&p!==r&&!r.parentNode&&(n=function(e,t){for(var n=e._ps,r=n.length,i=t.i+1;i<r;++i){var o=Im(n[i].b);if(o)return o}return null}(e,n),p.insertBefore(r,n))})),0<d.length}function Pm(e,t,n){return!n&&e&&((n=new jm(t.parentElement))._hyd=[t],n._sel=!0),function(e,t,n,r){void 0===r&&(r={});var i=!!(n=void 0===n?t.__CROACT__:n),o=[];Rm(n=n||new jm(t),n._ps,e?[e]:[],o,r,void 0,void 0),xm(o),Sm(null),i||(t.__CROACT__=n)}(e,t,n),n}function Lm(e){var t=(t=Em())._hs||(t._hs=[]),n=km,r=t[n];if(km=n+1,r){if(!Am(r.deps,e.deps))return r.updated=!1,r;t[n]=e}else t.push(e);return e.value=e.func(),e.updated=!0,e}function Um(e,t,n){var r=Em(),i=Lm({func:function(){return e},deps:t});t=n?r._usefs:r._uefs;i.updated?t.push((function(){return i.effect&&i.effect(),i.effect=e(),i.effect})):t.push((function(){return i.effect}))}function zm(e,t){for(var n=e.length,r=0;r<n;++r)if(t(e[r],r))return!0;return!1}function Hm(e,t){for(var n=e.length,r=0;r<n;++r)if(t(e[r],r))return e[r];return null}function $m(e){if(void 0===e){if("undefined"==typeof navigator||!navigator)return"";e=navigator.userAgent||""}return e.toLowerCase()}function Qm(e,t){try{return new RegExp(e,"g").exec(t)}catch(e){return null}}function Vm(e){return e.replace(/_/g,".")}function qm(e,t){var n=null,r="-1";return zm(e,(function(e){var i=Qm("("+e.test+")((?:\\/|\\s|:)([0-9|\\.|_]+))?",t);return i&&!e.brand&&(n=e,r=i[3]||"-1",e.versionAlias?r=e.versionAlias:e.versionTest&&(i=e.versionTest.toLowerCase(),r=((i=Qm("("+i+")((?:\\/|\\s|:)([0-9|\\.|_]+))",t))?i[3]:"")||r),r=Vm(r),1)})),{preset:n,version:r}}function Gm(e,t){var n={brand:"",version:"-1"};return zm(e,(function(e){var r=Wm(t,e);return r&&(n.brand=e.id,n.version=e.versionAlias||r.version,"-1"!==n.version)})),n}function Wm(e,t){return Hm(e,(function(e){return e=e.brand,Qm(""+t.test,e.toLowerCase())}))}var Km=[{test:"phantomjs",id:"phantomjs"},{test:"whale",id:"whale"},{test:"edgios|edge|edg",id:"edge"},{test:"msie|trident|windows phone",id:"ie",versionTest:"iemobile|msie|rv"},{test:"miuibrowser",id:"miui browser"},{test:"samsungbrowser",id:"samsung internet"},{test:"samsung",id:"samsung internet",versionTest:"version"},{test:"chrome|crios",id:"chrome"},{test:"firefox|fxios",id:"firefox"},{test:"android",id:"android browser",versionTest:"version"},{test:"safari|iphone|ipad|ipod",id:"safari",versionTest:"version"}],Ym=[{test:"(?=.*applewebkit/(53[0-7]|5[0-2]|[0-4]))(?=.*\\schrome)",id:"chrome",versionTest:"chrome"},{test:"chromium",id:"chrome"},{test:"whale",id:"chrome",versionAlias:"-1",brand:!0}],Xm=[{test:"applewebkit",id:"webkit",versionTest:"applewebkit|safari"}],Jm=[{test:"(?=(iphone|ipad))(?!(.*version))",id:"webview"},{test:"(?=(android|iphone|ipad))(?=.*(naver|daum|; wv))",id:"webview"},{test:"webview",id:"webview"}],Zm=[{test:"windows phone",id:"windows phone"},{test:"windows 2000",id:"window",versionAlias:"5.0"},{test:"windows nt",id:"window"},{test:"win32|windows",id:"window"},{test:"iphone|ipad|ipod",id:"ios",versionTest:"iphone os|cpu os"},{test:"macos|macintel|mac os x",id:"mac"},{test:"android|linux armv81",id:"android"},{test:"tizen",id:"tizen"},{test:"webos|web0s",id:"webos"}];function eg(e){return!!qm(Jm,e).preset}function tg(e,t,n){void 0===n&&(n=Math.sqrt(e.length));for(var r=e.slice(),i=0;i<n;++i)r[i*n+t-1]=0,r[(t-1)*n+i]=0;return r[(t-1)*(n+1)]=1,r}function ng(e,t){void 0===t&&(t=Math.sqrt(e.length));for(var n=e.slice(),r=yg(t),i=0;i<t;++i){var o=t*i+i;if(!$p(n[o],fp))for(var a=i+1;a<t;++a)if(n[t*i+a]){g=m=p=d=f=u=s=void 0;for(var s=n,u=r,c=i,l=a,h=t,f=0;f<h;++f){var d=c+f*h,p=l+f*h,m=s[d],g=u[d];s[d]=s[p],s[p]=m,u[d]=u[p],u[p]=g}break}if(!$p(n[o],fp))return[];C=x=v=A=void 0;for(var A=n,v=r,b=i,y=t,w=n[o],x=0;x<y;++x){var C=b+x*y;A[C]/=w,v[C]/=w}for(a=0;a<t;++a){var k=a,E=n[a+i*t];if($p(E,fp)&&i!==a){j=M=I=_=S=void 0;for(var S=n,_=r,O=k,T=i,D=t,B=-E,I=0;I<D;++I){var M=O+I*D,j=T+I*D;S[M]+=S[j]*B,_[M]+=_[j]*B}}}}return r}function rg(e,t){for(var n=[],r=e[(t=void 0===t?Math.sqrt(e.length):t)*t-1],i=0;i<t-1;++i)n[i]=e[t*(t-1)+i]/r;return n[t-1]=0,n}function ig(e,t){for(var n=e.slice(),r=e.length;r<t-1;++r)n[r]=0;return n[t-1]=1,n}function og(e,t,n){if((t=void 0===t?Math.sqrt(e.length):t)===n)return e;for(var r=yg(n),i=Math.min(t,n),o=0;o<i-1;++o){for(var a=0;a<i-1;++a)r[o*n+a]=e[o*t+a];r[(o+1)*n-1]=e[(o+1)*t-1],r[(n-1)*n+o]=e[(t-1)*t+o]}return r[n*n-1]=e[t*t-1],r}function ag(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=yg(e);return t.forEach((function(t){r=sg(r,t,e)})),r}function sg(e,t,n){void 0===n&&(n=Math.sqrt(e.length));var r=[],i=e.length/n,o=t.length/i;if(!i)return t;if(!o)return e;for(var a=0;a<n;++a)for(var s=0;s<o;++s)for(var u=r[s*n+a]=0;u<i;++u)r[s*n+a]+=e[u*n+a]*t[s*i+u];return r}function ug(e,t){for(var n=Math.min(e.length,t.length),r=e.slice(),i=0;i<n;++i)r[i]=r[i]+t[i];return r}function cg(e,t){for(var n=Math.min(e.length,t.length),r=e.slice(),i=0;i<n;++i)r[i]=r[i]-t[i];return r}function lg(e,t){return(t=void 0===t?9===e.length:t)?[e[0],e[1],e[3],e[4],e[6],e[7]]:e}function hg(e,t,n){var r=(e=sg(e,t,n=void 0===n?t.length:n))[n-1];return e.map((function(e){return e/r}))}function fg(e,t){return sg(e,[1,0,0,0,0,Math.cos(t),Math.sin(t),0,0,-Math.sin(t),Math.cos(t),0,0,0,0,1],4)}function dg(e,t){return sg(e,[Math.cos(t),0,-Math.sin(t),0,0,1,0,0,Math.sin(t),0,Math.cos(t),0,0,0,0,1],4)}function pg(e,t){return sg(e,bg(t,4))}function mg(e,t){var n=t[0],r=t[1];return sg(e,[void 0===n?1:n,0,0,0,0,void 0===r?1:r,0,0,0,0,void 0===(t=t[2])?1:t,0,0,0,0,1],4)}function gg(e,t){return hg(bg(t,3),ig(e,3))}function Ag(e,t){var n=t[0],r=t[1];return sg(e,[1,0,0,0,0,1,0,0,0,0,1,0,void 0===n?0:n,void 0===r?0:r,void 0===(t=t[2])?0:t,1],4)}function vg(e,t){return sg(e,t,4)}function bg(e,t){var n=Math.cos(e),r=(e=Math.sin(e),yg(t));return r[0]=n,r[1]=e,r[t]=-e,r[t+1]=n,r}function yg(e){for(var t=e*e,n=[],r=0;r<t;++r)n[r]=r%(e+1)?0:1;return n}function wg(e,t){for(var n=yg(t),r=Math.min(e.length,t-1),i=0;i<r;++i)n[(t+1)*i]=e[i];return n}function xg(e,t){for(var n=yg(t),r=Math.min(e.length,t-1),i=0;i<r;++i)n[t*(t-1)+i]=e[i];return n}function Cg(e,t,n,r,i,o,a,s){var u=e[0],c=(e=e[1],t[0]),l=(t=t[1],n[0]),h=(n=n[1],r[0]),f=(r=r[1],i[0]),d=(i=i[1],o[0]),p=(o=o[1],a[0]),m=(a=a[1],s[0]);return(u=ng([u,0,c,0,l,0,h,0,e,0,t,0,n,0,r,0,1,0,1,0,1,0,1,0,0,u,0,c,0,l,0,h,0,e,0,t,0,n,0,r,0,1,0,1,0,1,0,1,-f*u,-i*u,-d*c,-o*c,-p*l,-a*l,-m*h,-(s=s[1])*h,-f*e,-i*e,-d*t,-o*t,-p*n,-a*n,-m*r,-s*r],8)).length?((c=sg(u,[f,i,d,o,p,a,m,s],8))[8]=1,og(function(e,t){void 0===t&&(t=Math.sqrt(e.length));for(var n=[],r=0;r<t;++r)for(var i=0;i<t;++i)n[i*t+r]=e[t*r+i];return n}(c),3,4)):[]}Ui=function(e){return void 0===e&&function(){var e;if("undefined"!=typeof navigator&&navigator&&navigator.userAgentData)return(e=(e=navigator.userAgentData).brands||e.uaList)&&e.length}()?function(e){var t=((a=navigator.userAgentData).uaList||a.brands).slice(),n=e&&e.fullVersionList,r=a.mobile||!1,i=t[0],o=(e&&e.platform||a.platform||navigator.platform).toLowerCase(),a={name:i.brand,version:i.version,majorVersion:-1,webkit:!1,webkitVersion:"-1",chromium:!1,chromiumVersion:"-1",webview:!!Gm(Jm,t).brand||eg($m())},s=(i={name:"unknown",version:"-1",majorVersion:-1},a.webkit=!a.chromium&&zm(Xm,(function(e){return Wm(t,e)})),Gm(Ym,t));return a.chromium=!!s.brand,a.chromiumVersion=s.version,a.chromium||(s=Gm(Xm,t),a.webkit=!!s.brand,a.webkitVersion=s.version),s=Hm(Zm,(function(e){return new RegExp(""+e.test,"g").exec(o)})),i.name=s?s.id:"",e&&(i.version=e.platformVersion),n&&n.length?(s=Gm(Km,n),a.name=s.brand||a.name,a.version=s.version||a.version):(n=Gm(Km,t),a.name=n.brand||a.name,a.version=n.brand&&e?e.uaFullVersion:n.version),a.webkit&&(i.name=r?"ios":"mac"),"ios"===i.name&&a.webview&&(a.version="-1"),i.version=Vm(i.version),a.version=Vm(a.version),i.majorVersion=parseInt(i.version,10),a.majorVersion=parseInt(a.version,10),{browser:a,os:i,isMobile:r,isHints:!0}}():(e=$m(e=e),t=!!/mobi/g.exec(e),n={name:"unknown",version:"-1",majorVersion:-1,webview:eg(e),chromium:!1,chromiumVersion:"-1",webkit:!1,webkitVersion:"-1"},r={name:"unknown",version:"-1",majorVersion:-1},i=(o=qm(Km,e)).preset,o=o.version,a=(s=qm(Zm,e)).preset,s=s.version,u=qm(Ym,e),n.chromium=!!u.preset,n.chromiumVersion=u.version,n.chromium||(u=qm(Xm,e),n.webkit=!!u.preset,n.webkitVersion=u.version),a&&(r.name=a.id,r.version=s,r.majorVersion=parseInt(s,10)),i&&(n.name=i.id,n.version=o,n.webview&&"ios"===r.name&&"safari"!==n.name&&(n.webview=!1)),n.majorVersion=parseInt(n.version,10),{browser:n,os:r,isMobile:t,isHints:!1});var t,n,r,i,o,a,s,u};var kg=function(){return(kg=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function Eg(e,t){return _g(Og(e,t=void 0===t?0:t))}function Sg(e,t){return t=(e=hg(e,[t[0],t[1]||0,t[2]||0,1],4))[3]||1,[e[0]/t,e[1]/t,e[2]/t]}function _g(e){var t=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return e.forEach((function(e){var n=e.matrixFunction;e=e.functionValue;n&&(t=n(t,e))})),t}function Og(e,t){return void 0===t&&(t=0),(Ap(e)?e:Cp(e)).map((function(e){var n,r,i,o,a=(e=Ep(e)).prefix,s=(e=e.value,null),u=a,c="";return"translate"===a||"translateX"===a||"translate3d"===a?(n=gp(t)?kg(kg({},t),{"o%":t["%"]}):{"%":t,"o%":t},s=Ag,c=[(o=kp(e).map((function(e,r){return n["%"]=0===r&&"x%"in n?t["x%"]:1===r&&"y%"in n?t["y%"]:t["o%"],Np(e,n)})))[0],void 0===(r=o[1])?0:r,void 0===(r=o[2])?0:r]):"translateY"===a?(s=Ag,c=[0,Np(e,gp(t)?kg({"%":t["y%"]},t):{"%":t}),0]):"translateZ"===a?(s=Ag,c=[0,0,parseFloat(e)]):"scale"===a||"scale3d"===a?(s=mg,c=[i=(o=kp(e).map((function(e){return parseFloat(e)})))[0],void 0===(r=o[1])?i:r,void 0===(r=o[2])?1:r]):"scaleX"===a?(s=mg,c=[i=parseFloat(e),1,1]):"scaleY"===a?(s=mg,c=[1,parseFloat(e),1]):"scaleZ"===a?(s=mg,c=[1,1,parseFloat(e)]):"rotate"===a||"rotateZ"===a||"rotateX"===a||"rotateY"===a?(r=(o=Sp(e)).unit,i=o.value,"rotate"===a||"rotateZ"===a?(u="rotateZ",s=pg):"rotateX"===a?s=fg:"rotateY"===a&&(s=dg),c="rad"===r?i:i*Math.PI/180):"matrix3d"===a?(s=vg,c=kp(e).map((function(e){return parseFloat(e)}))):"matrix"===a?(s=vg,c=[(o=kp(e).map((function(e){return parseFloat(e)})))[0],o[1],0,0,o[2],o[3],0,0,0,0,1,0,o[4],o[5],0,1]):u="",{name:a,functionName:u,value:e,matrixFunction:s,functionValue:c}}))}
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0

THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.

See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */var Tg,Dg=function(e,t){return(Dg=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},Bg="function"==typeof Map?void 0:(Tg=0,function(e){return e.__DIFF_KEY__||(e.__DIFF_KEY__=++Tg)});function Ig(e,t){return um(e,t,Bg)}var Mg=function(e){function t(){this.constructor=n}var n,r;function i(t){return e.call(this,t=void 0===t?[]:t,Bg)||this}return Dg(n=i,r=e),n.prototype=null===r?Object.create(r):(t.prototype=r.prototype,new t),i}(Qo),jg=function(){return(jg=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},Ng=function(){function e(){this._events={}}var t=e.prototype;return t.on=function(e,t){if(gp(e))for(var n in e)this.on(n,e[n]);else this._addEvent(e,t,{});return this},t.off=function(e,t){if(e)if(gp(e))for(var n in e)this.off(n);else{var r,i;t?(r=this._events[e])&&-1<(i=Dp(r,(function(e){return e.listener===t})))&&r.splice(i,1):this._events[e]=[]}else this._events={};return this},t.once=function(e,t){var n=this;return t&&this._addEvent(e,t,{once:!0}),new Promise((function(t){n._addEvent(e,t,{once:!0})}))},t.emit=function(e,t){var n,r=this,i=(void 0===t&&(t={}),this._events[e]);return!e||!i||(n=!1,t.eventType=e,t.stop=function(){n=!0},t.currentTarget=this,function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}(i).forEach((function(n){n.listener(t),n.once&&r.off(e,n.listener)})),!n)},t.trigger=function(e,t){return this.emit(e,t=void 0===t?{}:t)},t._addEvent=function(e,t,n){var r=this._events;r[e]=r[e]||[],r[e].push(jg({listener:t},n))},e}(),Fg=function(e,t){return(Fg=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},Rg=function(){return(Rg=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

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

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */function Pg(e){return(e=e.container)===document.body?[e.scrollLeft||document.documentElement.scrollLeft,e.scrollTop||document.documentElement.scrollTop]:[e.scrollLeft,e.scrollTop]}function Lg(e,t){return e.addEventListener("scroll",t),function(){e.removeEventListener("scroll",t)}}function Ug(e){return e?vp(e)?document.querySelector(e):yp(e)?e():e instanceof Element?e:"current"in e?e.current:"value"in e?e.value:void 0:null}var zg=function(e){function t(){this.constructor=n}var n;function r(){var t=null!==e&&e.apply(this,arguments)||this;return t._startRect=null,t._startPos=[],t._prevTime=0,t._timer=0,t._prevScrollPos=[0,0],t._isWait=!1,t._flag=!1,t._currentOptions=null,t._lock=!1,t._unregister=null,t._onScroll=function(){var e=t._currentOptions;!t._lock&&e&&t.emit("scrollDrag",{next:function(n){t.checkScroll({container:e.container,inputEvent:n})}})},t}Fg(n=r,i=e),n.prototype=null===i?Object.create(i):(t.prototype=i.prototype,new t);var i=r.prototype;return i.dragStart=function(e,t){var n,r,i,o,a=Ug(t.container);a?(i=r=n=0,o=a===document.body?(i=window.innerWidth,window.innerHeight):(n=(a=a.getBoundingClientRect()).top,r=a.left,i=a.width,a.height),this._flag=!0,this._startPos=[e.clientX,e.clientY],this._startRect={top:n,left:r,width:i,height:o},this._prevScrollPos=this._getScrollPosition([0,0],t),this._currentOptions=t,this._registerScrollEvent(t)):this._flag=!1},i.drag=function(e,t){var n,r,i,o,a,s;if(clearTimeout(this._timer),this._flag)return n=e.clientX,r=e.clientY,i=void 0===(i=t.threshold)?0:i,o=this._startRect,a=this._startPos,this._currentOptions=t,s=[0,0],o.top>r-i?(a[1]>o.top||r<a[1])&&(s[1]=-1):o.top+o.height<r+i&&(a[1]<o.top+o.height||r>a[1])&&(s[1]=1),o.left>n-i?(a[0]>o.left||n<a[0])&&(s[0]=-1):o.left+o.width<n+i&&(a[0]<o.left+o.width||n>a[0])&&(s[0]=1),!(!s[0]&&!s[1])&&this._continueDrag(Rg(Rg({},t),{direction:s,inputEvent:e,isDrag:!0}))},i.checkScroll=function(e){var t,n,r,i,o,a,s,u=this;return!(this._isWait||(a=void 0===(a=e.prevScrollPos)?this._prevScrollPos:a,s=e.direction,t=void 0===(t=e.throttleTime)?0:t,n=e.inputEvent,r=e.isDrag,o=(i=this._getScrollPosition(s||[0,0],e))[0]-a[0],a=i[1]-a[1],s=s||[o?Math.abs(o)/o:0,a?Math.abs(a)/a:0],this._prevScrollPos=i,this._lock=!1,!o&&!a||(this.emit("move",{offsetX:s[0]?o:0,offsetY:s[1]?a:0,inputEvent:n}),t&&r&&(clearTimeout(this._timer),this._timer=window.setTimeout((function(){u._continueDrag(e)}),t)),0)))},i.dragEnd=function(){this._flag=!1,this._lock=!1,clearTimeout(this._timer),this._unregisterScrollEvent()},i._getScrollPosition=function(e,t){var n=t.container;return(void 0===(t=t.getScrollPosition)?Pg:t)({container:Ug(n),direction:e})},i._continueDrag=function(e){var t=this,n=e.container,r=e.direction,i=e.throttleTime,o=e.useScroll,a=e.isDrag,s=e.inputEvent;if(!(!this._flag||a&&this._isWait)){var u=Tp();return 0<(i=Math.max(i+this._prevTime-u,0))?(clearTimeout(this._timer),this._timer=window.setTimeout((function(){t._continueDrag(e)}),i),!1):(this._prevTime=u,i=this._getScrollPosition(r,e),this._prevScrollPos=i,a&&(this._isWait=!0),o||(this._lock=!0),u={container:Ug(n),direction:r,inputEvent:s},null!=(a=e.requestScroll)&&a.call(e,u),this.emit("scroll",u),this._isWait=!1,o||this.checkScroll(Rg(Rg({},e),{prevScrollPos:i,direction:r,inputEvent:s})))}},i._registerScrollEvent=function(e){this._unregisterScrollEvent();var t,n=e.checkScrollEvent;n&&(t=!0===n?Lg:n,e=Ug(e.container),!0!==n||e!==document.body&&e!==document.documentElement?this._unregister=t(e,this._onScroll):this._unregister=Lg(window,this._onScroll))},i._unregisterScrollEvent=function(){var e;null!=(e=this._unregister)&&e.call(this),this._unregister=null},r}(Ng);
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

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

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */function Hg(e){return $p(e,fp)}function $g(e){return e.length<3?0:Math.abs(function(e){for(var t=0,n=e.length-1;0<=n;--n)t+=e[n];return t}(e.map((function(t,n){return n=e[n+1]||e[0],t[0]*n[1]-n[0]*t[1]}))))/2}function Qg(e,t){var n=t.width,r=t.height,i=t.left,o=t.top,a=(t=Vg(e)).minX,s=t.minY,u=t.maxX,c=(t=t.maxY,n/(u-a)),l=r/(t-s);return e.map((function(e){return[i+(e[0]-a)*c,o+(e[1]-s)*l]}))}function Vg(e){var t=e.map((function(e){return e[0]}));e=e.map((function(e){return e[1]}));return{minX:Math.min.apply(Math,t),minY:Math.min.apply(Math,e),maxX:Math.max.apply(Math,t),maxY:Math.max.apply(Math,e)}}function qg(e,t,n){var r,i,o=e[0],a=e[1],s=(u=Vg(t)).minX,u=u.maxX,c=[[s,a],[u,a]],l=Gg(c[0],c[1]),h=(s=Yg(t),[]);return s.forEach((function(t){var n,r=Gg(t[0],t[1]),i=t[0];n=r,l.every((function(e,t){return 0===Hg(e-n[t])}))?h.push({pos:e,line:t,type:"line"}):Kg(Wg(l,r),[c,t]).forEach((function(e){t.some((function(t){return n=e,!Hg((t=t)[0]-n[0])&&!Hg(t[1]-n[1]);var n}))?h.push({pos:e,line:t,type:"point"}):0!==Hg(i[1]-a)&&h.push({pos:e,line:t,type:"intersection"})}))})),!(n||!Bp(h,(function(e){return e[0]===o})))||(r=0,i={},h.forEach((function(e){var t=e.pos,n=e.type;e=e.line;t[0]>o||("intersection"===n?++r:"line"!==n&&"point"===n&&(n=Bp(e,(function(e){return e[1]!==a})),e=i[t[0]],n=n[1]>a?1:-1,e?e!==n&&++r:i[t[0]]=n))})),r%2==1)}function Gg(e,t){var n=e[0],r=(e=e[1],t[0]-n),i=(t=t[1]-e,Math.abs(r)<fp&&(r=0),Math.abs(t)<fp&&(t=0),0),o=0,a=0;return r?a=t?(o=1,-(i=-t/r)*n-e):(o=1,-e):t&&(i=-1,a=n),[i,o,a]}function Wg(e,t){var n,r,i=e[0],o=e[1],a=(e=e[2],t[0]),s=t[1],u=(t=t[2],0===i&&0===a),c=0===o&&0===s;return u&&c?[]:u?(u=-e/o)!=-t/s?[]:[[-1/0,u],[1/0,u]]:c?(u=-e/i)!=-t/a?[]:[[u,-1/0],[u,1/0]]:(0===i?[[n=-(s*(r=-e/o)+t)/a,r]]:0===a?[[n=-(o*(r=-t/s)+e)/i,r]]:0===o?[[n=-e/i,r=-(a*n+t)/s]]:0===s?[[n=-t/a,r=-(i*n+e)/o]]:[[n=(o*t-s*e)/(s*i-o*a),r=-(i*n+e)/o]]).map((function(e){return[e[0],e[1]]}))}function Kg(e,t){var n=t.map((function(e){return[0,1].map((function(t){return[Math.min(e[0][t],e[1][t]),Math.max(e[0][t],e[1][t])]}))}));t=[];if(2===e.length){var r=(i=e[0])[0],i=i[1];if(Hg(r-e[1][0])){if(!Hg(i-e[1][1])){var o=Math.max.apply(Math,n.map((function(e){return e[0][0]}))),a=Math.min.apply(Math,n.map((function(e){return e[0][1]})));if(0<Hg(o-a))return[];t=[[o,i],[a,i]]}}else{if(0<Hg((o=Math.max.apply(Math,n.map((function(e){return e[1][0]}))))-(a=Math.min.apply(Math,n.map((function(e){return e[1][1]}))))))return[];t=[[r,o],[r,a]]}}return(t=t.length?t:e.filter((function(e){var t=e[0],r=e[1];return n.every((function(e){return 0<=Hg(t-e[0][0])&&0<=Hg(e[0][1]-t)&&0<=Hg(r-e[1][0])&&0<=Hg(e[1][1]-r)}))}))).map((function(e){return[Hg(e[0]),Hg(e[1])]}))}function Yg(e){return function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,s=o.length;a<s;a++,i++)r[i]=o[a];return r}(e.slice(1),[e[0]]).map((function(t,n){return[e[n],t]}))}function Xg(e,t){return function(e,t){var n=e.slice(),r=t.slice(),i=(-1===zp(n)&&n.reverse(),-1===zp(r)&&r.reverse(),Yg(n)),o=Yg(r),a=(e=i.map((function(e){return Gg(e[0],e[1])})),o.map((function(e){return Gg(e[0],e[1])}))),s=[],u=(e.forEach((function(e,t){var n=i[t],u=[];a.forEach((function(r,i){r=Kg(Wg(e,r),[n,o[i]]),u.push.apply(u,r.map((function(e){return{index1:t,index2:i,pos:e,type:"intersection"}})))})),u.sort((function(e,t){return Hp(n[0],e.pos)-Hp(n[0],t.pos)})),s.push.apply(s,u),qg(n[1],r)&&s.push({index1:t,index2:-1,pos:n[1],type:"inside"})})),o.forEach((function(e,t){var r,i;qg(e[1],n)&&(r=!1,-1===(i=Dp(s,(function(e){if(e.index2!==t)return!!r;r=!0})))&&(r=!1,i=Dp(s,(function(e){var n=e.index1;e=e.index2;if(-1!==n||e+1!==t)return!!r;r=!0}))),-1===i?s.push({index1:-1,index2:t,pos:e[1],type:"inside"}):s.splice(i,0,{index1:-1,index2:t,pos:e[1],type:"inside"}))})),{});return s.filter((function(e){return e=(e=e.pos)[0]+"x"+e[1],!u[e]&&(u[e]=!0)}))}(e,t).map((function(e){return e.pos}))}
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

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

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */var Jg=function(e,t){return(Jg=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},Zg=function(){return(Zg=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function eA(e){return 180*(t=[e[0].clientX,e[0].clientY],n=(e=[e[1].clientX,e[1].clientY])[0]-t[0],e=e[1]-t[1],(0<=(t=Math.atan2(e,n))?t:t+2*Math.PI)/Math.PI);var t,n}function tA(e){if(!e)return[];if(e.touches){for(var t=e.touches,n=Math.min(t.length,2),r=[],i=0;i<n;++i)r.push(iA(t[i]));return r}return[iA(e)]}function nA(e,t,n){var r=n.length,i=(e=oA(e,r)).clientX,o=e.clientY;return{clientX:e.originalClientX,clientY:e=e.originalClientY,deltaX:i-(t=oA(t,r)).clientX,deltaY:o-(t=t.clientY),distX:i-(n=oA(n,r)).clientX,distY:o-n.clientY}}function rA(e){return Math.sqrt(Math.pow(e[0].clientX-e[1].clientX,2)+Math.pow(e[0].clientY-e[1].clientY,2))}function iA(e){return{clientX:e.clientX,clientY:e.clientY}}function oA(e,t){void 0===t&&(t=e.length);for(var n={clientX:0,clientY:0,originalClientX:0,originalClientY:0},r=0;r<t;++r){var i=e[r];n.originalClientX+="originalClientX"in i?i.originalClientX:i.clientX,n.originalClientY+="originalClientY"in i?i.originalClientY:i.clientY,n.clientX+=i.clientX,n.clientY+=i.clientY}return t?{clientX:n.clientX/t,clientY:n.clientY/t,originalClientX:n.originalClientX/t,originalClientY:n.originalClientY/t}:n}var aA=function(){function e(e){this.prevClients=[],this.startClients=[],this.movement=0,this.length=0,this.startClients=e,this.prevClients=e,this.length=e.length}return e.prototype.getAngle=function(e){return eA(e=void 0===e?this.prevClients:e)},e.prototype.getRotation=function(e){return eA(e=void 0===e?this.prevClients:e)-eA(this.startClients)},e.prototype.getPosition=function(e,t){var n=nA((e=void 0===e?this.prevClients:e)||this.prevClients,this.prevClients,this.startClients),r=n.deltaX,i=n.deltaY;return this.movement+=Math.sqrt(r*r+i*i),this.prevClients=e,n},e.prototype.getPositions=function(e){void 0===e&&(e=this.prevClients);var t=this.prevClients;return this.startClients.map((function(n,r){return nA([e[r]],[t[r]],[n])}))},e.prototype.getMovement=function(e){var t,n,r=this.movement;return e?(e=oA(e,this.length),t=oA(this.prevClients,this.length),n=e.clientX-t.clientX,e=e.clientY-t.clientY,Math.sqrt(n*n+e*e)+r):r},e.prototype.getDistance=function(e){return rA(e=void 0===e?this.prevClients:e)},e.prototype.getScale=function(e){return rA(e=void 0===e?this.prevClients:e)/rA(this.startClients)},e.prototype.move=function(e,t){this.startClients.forEach((function(n){n.clientX-=e,n.clientY-=t})),this.prevClients.forEach((function(n){n.clientX-=e,n.clientY-=t}))},e}(),sA=["textarea","input"],uA=function(e){function t(){this.constructor=n}var n,r;function i(t,n){void 0===n&&(n={});var r,i=e.call(this)||this,o=(t=(i.options={},i.flag=!1,i.pinchFlag=!1,i.data={},i.isDrag=!1,i.isPinch=!1,i.clientStores=[],i.targets=[],i.prevTime=0,i.doubleFlag=!1,i._useMouse=!1,i._useTouch=!1,i._useDrag=!1,i._dragFlag=!1,i._isTrusted=!1,i._isMouseEvent=!1,i._isSecondaryButton=!1,i._preventMouseEvent=!1,i._prevInputEvent=null,i._isDragAPI=!1,i._isIdle=!0,i._window=window,i.onDragStart=function(e,t){if(void 0===t&&(t=!0),i.flag||!1!==e.cancelable){var n=-1<=e.type.indexOf("drag");if(!i.flag||!n){i._isDragAPI=!0;var r=(n=i.options).container,o=n.pinchOutside,a=n.preventWheelClick,s=n.preventRightClick,u=n.preventDefault,c=n.checkInput,l=n.dragFocusedInput,h=n.preventClickEventOnDragStart,f=n.preventClickEventOnDrag,d=(n=n.preventClickEventByCondition,i._useTouch),p=!i.flag;if(i._isSecondaryButton=3===e.which||2===e.button,a&&(2===e.which||1===e.button)||s&&(3===e.which||2===e.button))return i.stop(),!1;if(p){if(a=i._window.document.activeElement,s=e.target){var m=s.tagName.toLowerCase(),g=(m=-1<sA.indexOf(m),s.isContentEditable);if(m||g){if(c||!l&&a===s)return!1;if(a&&(a===s||g&&a.isContentEditable&&a.contains(s))){if(!l)return!1;s.blur()}}else(u||"touchstart"===e.type)&&a&&(m=a.tagName.toLowerCase(),(a.isContentEditable||-1<sA.indexOf(m))&&a.blur());(h||f||n)&&Kp(i._window,"click",i._onClick,!0)}i.clientStores=[new aA(tA(e))],i._isIdle=!1,i.flag=!0,i.isDrag=!1,i._isTrusted=t,i._dragFlag=!0,i._prevInputEvent=e,i.data={},i.doubleFlag=Tp()-i.prevTime<200,i._isMouseEvent=(c=e)&&(-1<c.type.indexOf("mouse")||"button"in c),!i._isMouseEvent&&i._preventMouseEvent&&(i._preventMouseEvent=!1),!1===(i._preventMouseEvent||i.emit("dragStart",Zg(Zg({data:i.data,datas:i.data,inputEvent:e,isMouseEvent:i._isMouseEvent,isSecondaryButton:i._isSecondaryButton,isTrusted:t,isDouble:i.doubleFlag},i.getCurrentStore().getPosition()),{preventDefault:function(){e.preventDefault()},preventDrag:function(){i._dragFlag=!1}})))&&i.stop(),i._isMouseEvent&&i.flag&&u&&e.preventDefault()}if(!i.flag)return!1;g=0,p?(i._attchDragEvent(),d&&o&&(g=setTimeout((function(){Kp(r,"touchstart",i.onDragStart,{passive:!1})})))):d&&o&&Yp(r,"touchstart",i.onDragStart),i.flag&&(l=e).touches&&2<=l.touches.length&&(clearTimeout(g),p&&e.touches.length!==e.changedTouches.length||i.pinchFlag||i.onPinchStart(e))}}},i.onDrag=function(e,t){if(i.flag){var n=i.options.preventDefault,r=(n=(!i._isMouseEvent&&n&&e.preventDefault(),tA(i._prevInputEvent=e)),i.moveClients(n,e,!1));if(i._dragFlag){if((i.pinchFlag||r.deltaX||r.deltaY)&&!1===(i._preventMouseEvent||i.emit("drag",Zg(Zg({},r),{isScroll:!!t,inputEvent:e}))))return void i.stop();i.pinchFlag&&i.onPinch(e,n)}i.getCurrentStore().getPosition(n,!0)}},i.onDragEnd=function(e){var t,n,r,o,a,s;i.flag&&(s=(r=i.options).pinchOutside,t=r.container,a=r.preventClickEventOnDrag,o=r.preventClickEventOnDragStart,r=r.preventClickEventByCondition,n=i.isDrag,(a||o||r)&&requestAnimationFrame((function(){i._allowClickEvent()})),r||o||!a||n||i._allowClickEvent(),i._useTouch&&s&&Yp(t,"touchstart",i.onDragStart),i.pinchFlag&&i.onPinchEnd(e),0!==(r=null!=e&&e.touches?tA(e):[]).length&&i.options.keepDragging?i._addStore(new aA(r)):i.flag=!1,o=i._getPosition(),a=Tp(),s=!n&&i.doubleFlag,i._prevInputEvent=null,i.prevTime=n||s?0:a,i.flag||(i._dettachDragEvent(),i._preventMouseEvent||i.emit("dragEnd",Zg({data:i.data,datas:i.data,isDouble:s,isDrag:n,isClick:!n,isMouseEvent:i._isMouseEvent,isSecondaryButton:i._isSecondaryButton,inputEvent:e,isTrusted:i._isTrusted},o)),i.clientStores=[],i._isMouseEvent||(i._preventMouseEvent=!0,requestAnimationFrame((function(){requestAnimationFrame((function(){i._preventMouseEvent=!1}))}))),i._isIdle=!0))},i.onBlur=function(){i.onDragEnd()},i._allowClickEvent=function(){Yp(i._window,"click",i._onClick,!0)},i._onClick=function(e){i._allowClickEvent(),i._preventMouseEvent=!1;var t=i.options.preventClickEventByCondition;null!=t&&t(e)||(e.stopPropagation(),e.preventDefault())},i._onContextMenu=function(e){i.options.preventRightClick?i.onDragEnd(e):e.preventDefault()},i._passCallback=function(){},[].concat(t)))[0],a=(n=(o=(i._window=tm(o)?o:em(o),i.options=Zg({checkInput:!1,container:!o||"document"in o?o:em(o),preventRightClick:!0,preventWheelClick:!0,preventClickEventOnDragStart:!1,preventClickEventOnDrag:!1,preventClickEventByCondition:null,preventDefault:!0,checkWindowBlur:!1,keepDragging:!1,pinchThreshold:0,events:["touch","mouse"]},n),i.options)).container,o.events);o=o.checkWindowBlur;return i._useDrag=-1<a.indexOf("drag"),i._useTouch=-1<a.indexOf("touch"),i._useMouse=-1<a.indexOf("mouse"),i.targets=t,i._useDrag&&t.forEach((function(e){Kp(e,"dragstart",i.onDragStart)})),i._useMouse&&(t.forEach((function(e){Kp(e,"mousedown",i.onDragStart),Kp(e,"mousemove",i._passCallback)})),Kp(n,"contextmenu",i._onContextMenu)),o&&Kp(em(),"blur",i.onBlur),i._useTouch&&(r={passive:!1},t.forEach((function(e){Kp(e,"touchstart",i.onDragStart,r),Kp(e,"touchmove",i._passCallback,r)}))),i}return Jg(n=i,r=e),n.prototype=null===r?Object.create(r):(t.prototype=r.prototype,new t),i.prototype.stop=function(){this.isDrag=!1,this.data={},this.clientStores=[],this.pinchFlag=!1,this.doubleFlag=!1,this.prevTime=0,this.flag=!1,this._isIdle=!0,this._allowClickEvent(),this._dettachDragEvent(),this._isDragAPI=!1},i.prototype.getMovement=function(e){return this.getCurrentStore().getMovement(e)+this.clientStores.slice(1).reduce((function(e,t){return e+t.movement}),0)},i.prototype.isDragging=function(){return this.isDrag},i.prototype.isIdle=function(){return this._isIdle},i.prototype.isFlag=function(){return this.flag},i.prototype.isPinchFlag=function(){return this.pinchFlag},i.prototype.isDoubleFlag=function(){return this.doubleFlag},i.prototype.isPinching=function(){return this.isPinch},i.prototype.scrollBy=function(e,t,n,r){void 0===r&&(r=!0),this.flag&&(this.clientStores[0].move(e,t),r&&this.onDrag(n,!0))},i.prototype.move=function(e,t){var n=e[0],r=e[1];e=this.getCurrentStore().prevClients;return this.moveClients(e.map((function(e){var t=e.clientX;e=e.clientY;return{clientX:t+n,clientY:e+r,originalClientX:t,originalClientY:e}})),t,!0)},i.prototype.triggerDragStart=function(e){this.onDragStart(e,!1)},i.prototype.setEventData=function(e){var t,n=this.data;for(t in e)n[t]=e[t];return this},i.prototype.setEventDatas=function(e){return this.setEventData(e)},i.prototype.getCurrentEvent=function(e){return void 0===e&&(e=this._prevInputEvent),Zg(Zg({data:this.data,datas:this.data},this._getPosition()),{movement:this.getMovement(),isDrag:this.isDrag,isPinch:this.isPinch,isScroll:!1,inputEvent:e})},i.prototype.getEventData=function(){return this.data},i.prototype.getEventDatas=function(){return this.data},i.prototype.unset=function(){var e=this,t=this.targets,n=this.options.container;this.off(),Yp(this._window,"blur",this.onBlur),this._useDrag&&t.forEach((function(t){Yp(t,"dragstart",e.onDragStart)})),this._useMouse&&(t.forEach((function(t){Yp(t,"mousedown",e.onDragStart)})),Yp(n,"contextmenu",this._onContextMenu)),this._useTouch&&(t.forEach((function(t){Yp(t,"touchstart",e.onDragStart)})),Yp(n,"touchstart",this.onDragStart)),this._prevInputEvent=null,this._allowClickEvent(),this._dettachDragEvent()},i.prototype.onPinchStart=function(e){var t=this,n=this.options.pinchThreshold;this.isDrag&&this.getMovement()>n||(n=new aA(tA(e)),this.pinchFlag=!0,this._addStore(n),!1===this.emit("pinchStart",Zg(Zg({data:this.data,datas:this.data,angle:n.getAngle(),touches:this.getCurrentStore().getPositions()},n.getPosition()),{inputEvent:e,isTrusted:this._isTrusted,preventDefault:function(){e.preventDefault()},preventDrag:function(){t._dragFlag=!1}}))&&(this.pinchFlag=!1))},i.prototype.onPinch=function(e,t){var n;!this.flag||!this.pinchFlag||t.length<2||(n=this.getCurrentStore(),this.isPinch=!0,this.emit("pinch",Zg(Zg({data:this.data,datas:this.data,movement:this.getMovement(t),angle:n.getAngle(t),rotation:n.getRotation(t),touches:n.getPositions(t),scale:n.getScale(t),distance:n.getDistance(t)},n.getPosition(t)),{inputEvent:e,isTrusted:this._isTrusted})))},i.prototype.onPinchEnd=function(e){var t,n;this.pinchFlag&&(t=this.isPinch,this.isPinch=!1,this.pinchFlag=!1,n=this.getCurrentStore(),this.emit("pinchEnd",Zg(Zg({data:this.data,datas:this.data,isPinch:t,touches:n.getPositions()},n.getPosition()),{inputEvent:e})))},i.prototype.getCurrentStore=function(){return this.clientStores[0]},i.prototype.moveClients=function(e,t,n){n=this._getPosition(e,n);var r=this.isDrag,i=((n.deltaX||n.deltaY)&&(this.isDrag=!0),!1);return!r&&this.isDrag&&(i=!0),Zg(Zg({data:this.data,datas:this.data},n),{movement:this.getMovement(e),isDrag:this.isDrag,isPinch:this.isPinch,isScroll:!1,isMouseEvent:this._isMouseEvent,isSecondaryButton:this._isSecondaryButton,inputEvent:t,isTrusted:this._isTrusted,isFirstDrag:i})},i.prototype._addStore=function(e){this.clientStores.splice(0,0,e)},i.prototype._getPosition=function(e,t){e=this.getCurrentStore().getPosition(e,t);var n=(t=this.clientStores.slice(1).reduce((function(e,t){return t=t.getPosition(),e.distX+=t.distX,e.distY+=t.distY,e}),e)).distX;t=t.distY;return Zg(Zg({},e),{distX:n,distY:t})},i.prototype._attchDragEvent=function(){var e=this._window,t=this.options.container,n={passive:!1};this._isDragAPI&&(Kp(t,"dragover",this.onDrag,n),Kp(e,"dragend",this.onDragEnd)),this._useMouse&&(Kp(t,"mousemove",this.onDrag),Kp(e,"mouseup",this.onDragEnd)),this._useTouch&&(Kp(t,"touchmove",this.onDrag,n),Kp(e,"touchend",this.onDragEnd,n),Kp(e,"touchcancel",this.onDragEnd,n))},i.prototype._dettachDragEvent=function(){var e=this._window,t=this.options.container;this._isDragAPI&&(Yp(t,"dragover",this.onDrag),Yp(e,"dragend",this.onDragEnd)),this._useMouse&&(Yp(t,"mousemove",this.onDrag),Yp(e,"mouseup",this.onDragEnd)),this._useTouch&&(Yp(t,"touchstart",this.onDragStart),Yp(t,"touchmove",this.onDrag),Yp(e,"touchend",this.onDragEnd),Yp(e,"touchcancel",this.onDragEnd))},i}(Ng);var cA=function(e){var t="rCS"+function(e){for(var t=5381,n=e.length;n;)t=33*t^e.charCodeAt(--n);return t>>>0}(e).toString(36);return{className:t,inject:function(n,r){void 0===r&&(r={});var i,o=function(e){if(e&&e.getRootNode&&11===(e=e.getRootNode()).nodeType)return e}(n),a=(o||n.ownerDocument||document).querySelector('style[data-styled-id="'.concat(t,'"]'));return a?(i=parseFloat(a.getAttribute("data-styled-count"))||0,a.setAttribute("data-styled-count","".concat(i+1))):a=function(e,t,n,r,i){var o,a=(r=Xp(r)).createElement("style");return a.setAttribute("type","text/css"),a.setAttribute("data-styled-id",e),a.setAttribute("data-styled-count","1"),n.nonce&&a.setAttribute("nonce",n.nonce),a.innerHTML=(o=e,e=t,n.original?e:e.replace(/([^};{\s}][^};{]*|^\s*){/gm,(function(e,t){return((t=t.trim())?kp(t):[""]).map((function(e){return 0===(e=e.trim()).indexOf("@")?e:-1<e.indexOf(":global")?e.replace(/\:global/g,""):-1<e.indexOf(":host")?"".concat(e.replace(/\:host/g,".".concat(o))):e?".".concat(o," ").concat(e):".".concat(o)})).join(", ")+" {"}))),(i||r.head||r.body).appendChild(a),a}(t,e,r,n,o),{destroy:function(){var e,t=parseFloat(a.getAttribute("data-styled-count"))||0;t<=1?(a.remove?a.remove():null!=(e=a.parentNode)&&e.removeChild(a),a=null):a.setAttribute("data-styled-count","".concat(t-1))}}}}},lA=function(){return(lA=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function hA(e,t){var n=cA(t),r=n.className;return(t=function(t,i){var o,a,s=void 0===(s=t.className)?"":s,u=(t.cspNonce,function(e,t){var n={};for(i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]]);return n}(t,["className","cspNonce"])),c=function(e){return Lm({func:function(){return Om(e)},deps:[]}).value}();return o=i,a=function(){return c.current},Um((function(){null!=o&&o(a())}),[],!0),Um((function(){var e=n.inject(c.current,{nonce:t.cspNonce});return function(){e.destroy()}}),[]),Mm(e,lA({ref:c,"data-styled-id":r,className:"".concat(s," ").concat(r)},u))})._fr=!0,t}var fA=function(e,t){return(fA=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function dA(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}fA(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var pA=function(){return(pA=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function mA(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||0<t--)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function gA(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||((r=r||Array.prototype.slice.call(t,0,i))[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function AA(e,t){return pA({events:[],props:[],name:e},t)}var vA=["n","w","s","e"],bA=["n","w","s","e","nw","ne","sw","se"],yA=(Eo=Ui()).browser.webkit,wA=yA&&(ra="undefined"==typeof window?{userAgent:""}:window.navigator,!!(ra=/applewebkit\/([^\s]+)/g.exec(ra.userAgent.toLowerCase()))&&parseFloat(ra[1])<605),xA=(za=Eo.browser.name,_a=parseInt(Eo.browser.version,10),ta="chrome"===za,$a=Eo.browser.chromium,Po=parseInt(Eo.browser.chromiumVersion,10)||0,ta&&109<=_a||$a&&109<=Po),CA="firefox"===za,kA=612<=parseInt(Eo.browser.webkitVersion,10)||15<=_a,EA="moveable-",SA=(Ro=bA.map((function(e){var t="",n="",r="center",i="center",o="calc(var(--moveable-control-padding, 20) * -1px)";return-1<e.indexOf("n")&&(t="top: ".concat(o,";"),i="bottom"),-1<e.indexOf("s")&&(t="top: 0px;",i="top"),-1<e.indexOf("w")&&(n="left: ".concat(o,";"),r="right"),-1<e.indexOf("e")&&(n="left: 0px;",r="left"),'.around-control[data-direction*="'.concat(e,'"] {\n        ').concat(n).concat(t,"\n        transform-origin: ").concat(r," ").concat(i,";\n    }")})).join("\n"),"\n{\nposition: absolute;\nwidth: 1px;\nheight: 1px;\nleft: 0;\ntop: 0;\nz-index: 3000;\n--moveable-color: #4af;\n--zoom: 1;\n--zoompx: 1px;\n--moveable-line-padding: 0;\n--moveable-control-padding: 0;\nwill-change: transform;\noutline: 1px solid transparent;\n}\n.control-box {\nz-index: 0;\n}\n.line, .control {\nposition: absolute;\nleft: 0;\ntop: 0;\nwill-change: transform;\n}\n.control {\nwidth: 14px;\nheight: 14px;\nborder-radius: 50%;\nborder: 2px solid #fff;\nbox-sizing: border-box;\nbackground: #4af;\nbackground: var(--moveable-color);\nmargin-top: -7px;\nmargin-left: -7px;\nborder: 2px solid #fff;\nz-index: 10;\n}\n.around-control {\nposition: absolute;\nwill-change: transform;\nwidth: calc(var(--moveable-control-padding, 20) * 1px);\nheight: calc(var(--moveable-control-padding, 20) * 1px);\nleft: calc(var(--moveable-control-padding, 20) * -0.5px);\ntop: calc(var(--moveable-control-padding, 20) * -0.5px);\nbox-sizing: border-box;\nbackground: transparent;\nz-index: 8;\ncursor: alias;\ntransform-origin: center center;\n}\n".concat(Ro,"\n.padding {\nposition: absolute;\ntop: 0px;\nleft: 0px;\nwidth: 100px;\nheight: 100px;\ntransform-origin: 0 0;\n}\n.line {\nwidth: 1px;\nheight: 1px;\nbackground: #4af;\nbackground: var(--moveable-color);\ntransform-origin: 0px 50%;\n}\n.line.edge {\nz-index: 1;\nbackground: transparent;\n}\n.line.dashed {\nbox-sizing: border-box;\nbackground: transparent;\n}\n.line.dashed.horizontal {\nborder-top: 1px dashed #4af;\nborder-top-color: #4af;\nborder-top-color: var(--moveable-color);\n}\n.line.dashed.vertical {\nborder-left: 1px dashed #4af;\nborder-left-color: #4af;\nborder-left-color: var(--moveable-color);\n}\n.line.vertical {\ntransform: translateX(-50%);\n}\n.line.horizontal {\ntransform: translateY(-50%);\n}\n.line.vertical.bold {\nwidth: 2px;\n}\n.line.horizontal.bold {\nheight: 2px;\n}\n\n.control.origin {\nborder-color: #f55;\nbackground: #fff;\nwidth: 12px;\nheight: 12px;\nmargin-top: -6px;\nmargin-left: -6px;\npointer-events: none;\n}\n").concat([0,15,30,45,60,75,90,105,120,135,150,165].map((function(e){return'\n.direction[data-rotation="'.concat(e,'"], :global .view-control-rotation').concat(e," {\n").concat((n=e=e,t='data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="'.concat(32*(t=1),'px" height="').concat(32*t,'px" viewBox="0 0 32 32" ><path d="M 16,5 L 12,10 L 14.5,10 L 14.5,22 L 12,22 L 16,27 L 20,22 L 17.5,22 L 17.5,10 L 20, 10 L 16,5 Z" stroke-linejoin="round" stroke-width="1.2" fill="black" stroke="white" style="transform:rotate(').concat(n,'deg);transform-origin: 16px 16px"></path></svg>'),n=45*Math.round(e/45)%180,e="ns-resize",135==n?e="nwse-resize":45==n?e="nesw-resize":90==n&&(e="ew-resize"),"cursor:".concat(e,";cursor: url('").concat(t,"') 16 16, ").concat(e,";")),"\n}\n");var t,n})).join("\n"),'\n\n.line.direction:before {\ncontent: "";\nposition: absolute;\nwidth: 100%;\nheight: calc(var(--moveable-line-padding, 0) * 1px);\nbottom: 0;\nleft: 0;\n}\n.group {\nz-index: -1;\n}\n.area {\nposition: absolute;\n}\n.area-pieces {\nposition: absolute;\ntop: 0;\nleft: 0;\ndisplay: none;\n}\n.area.avoid, .area.pass {\npointer-events: none;\n}\n.area.avoid+.area-pieces {\ndisplay: block;\n}\n.area-piece {\nposition: absolute;\n}\n\n').concat(wA?':global svg *:before {\ncontent:"";\ntransform-origin: inherit;\n}':"","\n")),_A=[[0,1,2],[1,0,3],[2,0,3],[3,1,2]],OA=1e-4,TA=1e-7,DA=Math.pow(10,10),BA=-DA,IA={n:[0,-1],e:[1,0],s:[0,1],w:[-1,0],nw:[-1,-1],ne:[1,-1],sw:[-1,1],se:[1,1]},MA={n:[0,1],e:[1,3],s:[3,2],w:[2,0],nw:[0],ne:[1],sw:[2],se:[3]},jA={n:0,s:180,w:270,e:90,nw:315,ne:45,sw:225,se:135},NA=["isMoveableElement","updateRect","updateTarget","destroy","dragStart","isInside","hitTest","setState","getRect","request","isDragging","getManager","forceUpdate","waitToChangeTarget","updateSelectors","getTargets","stopDrag","getControlBoxElement","getMoveables","getDragElement"];function FA(e,t,n,r,i,o){n=null!=(a=null==(a=t.gestos[o=void 0===o?"draggable":o])?void 0:a.move(n,e.inputEvent))?a:{};var a=(a=n.originalDatas||n.datas)[o]||(a[o]={});return pA(pA({},i?xy(t,n):n),{isPinch:!!r,parentEvent:!0,datas:a,originalDatas:e.originalDatas})}var RA=function(){function e(e){var t;this.ableName=e=void 0===e?"draggable":e,this.prevX=0,this.prevY=0,this.startX=0,this.startY=0,this.isDrag=!1,this.isFlag=!1,this.datas={draggable:{}},this.datas=((t={})[e]={},t)}return e.prototype.dragStart=function(e,t){this.isDrag=!1,this.isFlag=!1;var n=t.originalDatas;return(this.datas=n)[this.ableName]||(n[this.ableName]={}),pA(pA({},this.move(e,t.inputEvent)),{type:"dragstart"})},e.prototype.drag=function(e,t){return this.move([e[0]-this.prevX,e[1]-this.prevY],t)},e.prototype.move=function(e,t){var n,r,i,o=!1;return this.isFlag?(n=this.isDrag,r=this.prevX+e[0],i=this.prevY+e[1],(e[0]||e[1])&&(this.isDrag=!0),!n&&this.isDrag&&(o=!0)):(this.prevX=e[0],this.prevY=e[1],this.startX=e[0],this.startY=e[1],r=e[0],i=e[1],this.isFlag=!0),{type:"drag",clientX:this.prevX=r,clientY:this.prevY=i,inputEvent:t,isFirstDrag:o,isDrag:this.isDrag,distX:r-this.startX,distY:i-this.startY,deltaX:e[0],deltaY:e[1],datas:this.datas[this.ableName],originalDatas:this.datas,parentEvent:!0,parentGesto:this}},e}();function PA(e,t,n,r){var i=16===e.length?4:3,o=(n=mA(Qb(e,n,r,i),4),(r=mA(n[0],2))[0]),a=(r=r[1],(s=mA(n[1],2))[0]),s=s[1],u=(c=mA(n[2],2))[0],c=c[1],l=(n=mA(n[3],2))[0],h=(n=n[1],(t=mA($b(e,t,i),2))[0]),f=(t=t[1],Math.min(o,a,u,l)),d=Math.min(r,s,c,n);return{left:f,top:d,right:Math.max(o,a,u,l),bottom:Math.max(r,s,c,n),origin:[h-f||0,t-d||0],pos1:[o-f||0,r-d||0],pos2:[a-f||0,s-d||0],pos3:[u-f||0,c-d||0],pos4:[l-f||0,n-d||0],direction:Ny(e[0]*e[1+i])}}function LA(e,t){var n=t.clientX,r=t.clientY,i=(t=t.datas,(e=e.state).moveableClientRect),o=e.rootMatrix,a=e.is3d;e=e.pos1,o=mA(cg(wy(o,[n-i.left,r-i.top],a?4:3),e),2);return[(n=mA(VA({datas:t,distX:o[0],distY:o[1]}),2))[0],n[1]]}function UA(e,t){t=t.datas;var n=(e=e.state).allMatrix,r=e.beforeMatrix,i=e.is3d,o=e.left,a=e.top,s=e.origin,u=e.offsetMatrix,c=e.targetMatrix,l=(e=e.transformOrigin,i?4:3);t.is3d=i,t.matrix=n,t.targetMatrix=c,t.beforeMatrix=r,t.offsetMatrix=u,t.transformOrigin=e,t.inverseMatrix=ng(n,l),t.inverseBeforeMatrix=ng(r,l),t.absoluteOrigin=ig(ug([o,a],s),l),t.startDragBeforeDist=hg(t.inverseBeforeMatrix,t.absoluteOrigin,l),t.startDragDist=hg(t.inverseMatrix,t.absoluteOrigin,l)}function zA(e,t,n){var r,i,o,a,s,u,c,l,h,f,d,p,m,g,A=t.datas,v=(t=t.originalDatas.beforeRenderable,A.transformIndex),b=(g=t.nextTransforms).length,y=t.nextTransformAppendedIndexes,w=-1,x=(g=(-1===v?("translate"===n?w=0:"rotate"===n&&(w=Dp(g,(function(e){return e.match(/scale\(/g)}))),-1===w&&(w=g.length),A.transformIndex=w):w=Bp(y,(function(e){return e.index===v&&e.functionName===n}))?v:v+y.filter((function(e){return e.index<v})).length,g=g,r=e.state,e=w,i=Og(g,{"x%":function(e){return e/100*r.offsetWidth},"y%":function(e){return e/100*r.offsetHeight}}),o=g.slice(0,e<0?void 0:e),a=g.slice(0,e<0?void 0:e+1),s=g[e]||"",u=e<0?[]:g.slice(e),c=e<0?[]:g.slice(e+1),l=i.slice(0,e<0?void 0:e),h=i.slice(0,e<0?void 0:e+1),x=null!=(x=i[e])?x:Og([""])[0],f=e<0?[]:i.slice(e),i=e<0?[]:i.slice(e+1),e=x?[x]:[],x=_g(l),C=_g(h),d=_g(f),p=_g(i),m=sg(x,d,4),{transforms:g,beforeFunctionMatrix:x,beforeFunctionMatrix2:C,targetFunctionMatrix:_g(e),afterFunctionMatrix:d,afterFunctionMatrix2:p,allFunctionMatrix:m,beforeFunctions:l,beforeFunctions2:h,targetFunction:e[0],afterFunctions:f,afterFunctions2:i,beforeFunctionTexts:o,beforeFunctionTexts2:a,targetFunctionText:s,afterFunctionTexts:u,afterFunctionTexts2:c})).targetFunction,C="rotate"===n?"rotateZ":n;A.beforeFunctionTexts=g.beforeFunctionTexts,A.afterFunctionTexts=g.afterFunctionTexts,A.beforeTransform=g.beforeFunctionMatrix,A.beforeTransform2=g.beforeFunctionMatrix2,A.targetTansform=g.targetFunctionMatrix,A.afterTransform=g.afterFunctionMatrix,A.afterTransform2=g.afterFunctionMatrix2,A.targetAllTransform=g.allFunctionMatrix,x.functionName===C?(A.afterFunctionTexts.splice(0,1),A.isAppendTransform=!1):w<b&&(A.isAppendTransform=!0,t.nextTransformAppendedIndexes=gA(gA([],mA(y),!1),[{functionName:n,index:w,isAppend:!0}],!1))}function HA(e,t,n){return"".concat(e.beforeFunctionTexts.join(" ")," ").concat(e.isAppendTransform?n:t," ").concat(e.afterFunctionTexts.join(" "))}function $A(e,t,n){var r=e.beforeTransform,i=e.afterTransform,o=e.beforeTransform2,a=e.afterTransform2;e=e.targetAllTransform,t=n?sg(e,t,4):sg(t,e,4),e=sg(ng(n?o:r,4),t,4);return sg(e,ng(n?a:i,4),4)}function QA(e){var t=e.datas,n=e.distX,r=(e=e.distY,t.inverseBeforeMatrix),i=t.is3d,o=t.startDragBeforeDist;i=i?4:3;return cg(hg(r,ug(t.absoluteOrigin,[n,e]),i),o)}function VA(e,t){var n=e.datas,r=e.distX,i=(e=e.distY,n.inverseBeforeMatrix),o=n.inverseMatrix,a=n.is3d,s=n.startDragBeforeDist,u=n.startDragDist;a=a?4:3;return cg(hg(t?i:o,ug(n.absoluteOrigin,[r,e]),a),t?s:u)}function qA(e){var t=[];return 0<=e[1]&&(0<=e[0]&&t.push(3),e[0]<=0&&t.push(2)),e[1]<=0&&(0<=e[0]&&t.push(1),e[0]<=0&&t.push(0)),t}function GA(e,t){var n=(t[0]+1)/2,r=(t=(t[1]+1)/2,[pp(e[0][0],e[1][0],n,1-n),pp(e[0][1],e[1][1],n,1-n)]);e=[pp(e[2][0],e[3][0],n,1-n),pp(e[2][1],e[3][1],n,1-n)];return[pp(r[0],e[0],t,1-t),pp(r[1],e[1],t,1-t)]}function WA(e,t,n,r){return sg(e,Nb(t,r,n),r)}function KA(e,t){var n=ZA(t);return{setTransform:function(r,i){void 0===i&&(i=-1),n.startTransforms=Ap(r)?r:Cp(r),XA(e,t,i)},setTransformIndex:function(n){XA(e,t,n)}}}function YA(e,t,n){XA(e,t,Dp(ZA(t).startTransforms,(function(e){return 0===e.indexOf("".concat(n,"("))})))}function XA(e,t,n){var r,i=ZA(t);-1!==((t=t.datas).transformIndex=n)&&(i=i.startTransforms[n])&&(r=e.state,n=Og([i],{"x%":function(e){return e/100*r.offsetWidth},"y%":function(e){return e/100*r.offsetHeight}}),t.startValue=n[0].functionValue)}function JA(e,t){ZA(e).nextTransforms=Cp(t)}function ZA(e){return e.originalDatas.beforeRenderable}function ev(e){return e.originalDatas.beforeRenderable.nextTransforms}function tv(e){return(ev(e)||[]).join(" ")}function nv(e){return ZA(e).nextStyle}function rv(e,t,n,r,i){return JA(i,t),n=(e=ib.drag(e,FA(i,e.state,n,r,!1)))?e.transform:t,pA(pA({transform:t,drag:e},cy({transform:n},i)),{afterTransform:n})}function iv(e,t,n,r,i,o){i=i,t=t,o=o,u=(a=e.state).transformOrigin,s=a.offsetMatrix,a=a.is3d?4:3;var a,s,u;o=WA(s,vp(t)?(s=i.beforeTransform,i=i.afterTransform,og(o?Eg(t):sg(sg(s,Eg([t]),4),i,4),4,a)):t,u,a);return s=e,void 0===(i=o)&&(i=s.state.allMatrix),t=(s=s.state).width,u=s.height,s=s.is3d?4:3,$b(i,t=[t/2*(1+n[0])+r[0],u/2*(1+n[1])+r[1]],s)}function ov(e,t,n,r,i,o,a){return t=iv(e,t,n,i,o,a),i=(n=e.state).left,o=n.top,n=(a=e.props.groupable)?i:0,e=a?o:0,i=cg(r,t),cg(i,[n,e])}function av(e,t,n,r,i,o){var a=e.props.groupable,s=(e=e.state).transformOrigin,u=e.offsetMatrix,c=e.is3d,l=e.width,h=e.height,f=e.left,d=e.top,p=o.fixedDirection;o=o.nextTargetMatrix||e.targetMatrix,e=c?4:3;m=t,g=n,void 0===(A=l)&&(A=m),void 0===(v=h)&&(v=g),void 0===(b=s)&&(b=[0,0]);var m,g,A,v,b;c=a?f:0,l=a?d:0;return f=r,a=p,d=GA(Qb(d=s=WA(u,o,(h=i)?h.map((function(e,t){var n=(r=Sp(e)).value,r=r.unit,i=t?v:A,o=t?g:m;return"%"===e||isNaN(n)?o*(i?b[t]/i:0):"%"!==r?n:o*n/100})):b,e),t,n,e),a),cg([f[0]-d[0],f[1]-d[1]],[c,l])}function sv(e,t,n){for(var r,i,o,a=e,s=[],u=Jp(e)||Zp(e),c=!n&&e===t||e===u,l=c,h=!1,f=3,d=!1,p=Pb(t,t,!0).offsetParent,m=1;a&&!l;){l=c;var g=(N=fv(a))("position"),A=Rb(a),v="fixed"===g,b=(y=x=w=void 0,w=(b=N)("scale"),x=b("rotate"),y=[],(b=b("translate"))&&"0px"!==b&&"none"!==b&&y.push("translate(".concat(b.split(/\s+/).join(","),")")),x&&"1"!==x&&"none"!==x&&y.push("rotate(".concat(x,")")),w&&"1"!==w&&"none"!==w&&y.push("scale(".concat(w.split(/\s+/).join(","),")")),y),y=(x=function(e){return e&&"none"!==e?gp(e)?e:Eg(e):[1,0,0,1,0,0]}(A),(w=(w=void 0)===w?6===x.length:w)?[x[0],x[1],0,x[2],x[3],0,x[4],x[5],1]:x),w=(A=void 0,!1),x=!1,C=0,k=0,E=0,S=0,_={hasTransform:!1,fixedContainer:null},O=(v&&(d=!0,p=(_=function(e){for(var t=e.parentElement,n=!1,r=Zp(e);t;){var i=my(t).transform;if(i&&"none"!==i){n=!0;break}if(t===r)break;t=t.parentElement}return{fixedContainer:t||r,hasTransform:n}}(a)).fixedContainer),y.length),T=(O=(h||16!==O&&!b.length||(h=!0,f=4,Ub(s),o=o&&og(o,3,4)),h&&9===O&&(y=og(y,3,4)),function(e,t){var n,r,i=e.tagName.toLowerCase(),o=e.offsetLeft,a=e.offsetTop,s=fv(e),u=mp(o),c=!u;return c||"svg"===i?r=(n=Fb(s("transformOrigin")).map((function(e){return parseFloat(e)}))).slice():(r=(n=wA?function(e){return function(e){return Fb(e.transformOrigin)}(my(e,":before")).map((function(t,n){var r=(t=Sp(t)).value;t=t.unit;return r*(r=e,n=0===n,"%"!==t?1:Hb(r.ownerSVGElement)[n?"width":"height"]/100)}))}(e):Fb(s("transformOrigin")).map((function(e){return parseFloat(e)}))).slice(),c=!0,o=(s=mA(function(e,t,n){if(!e.getBBox||!n&&"g"===e.tagName.toLowerCase())return[0,0,0,0];n=e.getBBox(),e=Hb(e.ownerSVGElement);var r=n.x-e.x;return[r,n=n.y-e.y,t[0]-r,t[1]-n]}(e,n,e===t&&"g"===t.tagName.toLowerCase()),4))[0],a=s[1],n[0]=s[2],n[1]=s[3]),{tagName:i,isSVG:u,hasOffset:c,offset:[o||0,a||0],origin:n,targetOrigin:r}}(a,e))).tagName,D=O.hasOffset,B=O.isSVG,I=O.origin,M=O.targetOrigin,j=(O=mA(O.offset,2))[0];O=O[1],T=("svg"===T&&o&&(s.push({type:"target",target:a,matrix:function(e,t){var n,r,i=(n=Hb(e)).width,o=n.height,a=n.clientWidth,s=a/i,u=(n=n.clientHeight)/o,c=(e=e.preserveAspectRatio.baseVal).align,l=(e=e.meetOrSlice,[0,0]),h=[s,u],f=[0,0];return 1!==c&&(r=(c-2)%3,c=Math.floor((c-2)/3),l[0]=i*r/2,l[1]=o*c/2,e=2===e?Math.max(u,s):Math.min(s,u),h[0]=e,h[1]=e,f[0]=(a-i)/2*r,f[1]=(n-o)/2*c),s=wg(h,t),u=mA(f,2),s[t*(t-1)]=u[0],s[t*(t-1)+1]=u[1],Nb(s,t,l)}(a,f)}),s.push({type:"offset",target:a,matrix:yg(f)})),parseFloat(N("zoom"))||1);if(v)A=_.fixedContainer,w=!0;else{var N,F=(N=Pb(a,t,!1,!0,N)).offsetZoom;A=N.offsetParent,w=N.isEnd,x=N.isStatic;if(m*=F,(N.isCustomElement||1!==F)&&x)j-=A.offsetLeft,O-=A.offsetTop;else if((CA||xA)&&N.parentSlotElement){for(var R=A,P=0,L=0;R&&function(e){if(e&&e.getRootNode&&11===(e=e.getRootNode()).nodeType)return e}(R);)P+=R.offsetLeft,L+=R.offsetTop,R=R.offsetParent;j-=P,O-=L}}if(!yA||kA||!D||B||!x||"relative"!==g&&"static"!==g||(j-=A.offsetLeft,O-=A.offsetTop,c=c||w),v?D&&_.hasTransform&&(E=A.clientLeft,S=A.clientTop):(D&&p!==A&&(C=A.clientLeft,k=A.clientTop),D&&A===u&&(j+=(F=Lb(a,!1))[0],O+=F[1])),s.push({type:"target",target:a,matrix:Nb(y,f,I)}),b.length&&(s.push({type:"offset",target:a,matrix:yg(f)}),s.push({type:"target",target:a,matrix:Nb(Eg(b),f,I)})),D?(B=(N=a===e)?0:a.scrollLeft,x=N?0:a.scrollTop,s.push({type:"offset",target:a,matrix:xg([j-B+C-E,O-x+k-S],f)})):s.push({type:"offset",target:a,origin:I}),1!==T&&s.push({type:"zoom",target:a,matrix:Nb(wg([T,T],f),f,[0,0])}),o=o||y,r=r||I,i=i||M,l||v)break;a=A,c=w,n&&a!==u||(l=c)}return{zoom:m,offsetContainer:p,matrixes:s,targetMatrix:o=o||yg(f),transformOrigin:r=r||[0,0],targetOrigin:i=i||[0,0],is3d:h,hasFixed:d}}var uv=null,cv=null,lv=null;function hv(e){e?(window.Map&&(uv=new Map,cv=new Map),lv=[]):cv=lv=uv=null}function fv(e){var t=null==uv?void 0:uv.get(e);if(!t){var n=em(e).getComputedStyle(e);if(!uv)return function(e){return n[e]};uv.set(e,t={style:n,cached:{}})}var r=t.cached,i=t.style;return function(e){return e in r||(r[e]=i[e]),r[e]}}function dv(e,t,n){var r,i=((r=((r=n.originalDatas).groupable=r.groupable||{},r.groupable)).childDatas=r.childDatas||[],r.childDatas);return e.moveables.map((function(e,r){return i[r]=i[r]||{},i[r][t]=i[r][t]||{},pA(pA({},n),{isRequestChild:!0,datas:i[r][t],originalDatas:i[r]})}))}function pv(e,t,n,r,i,o,a){var s=!!n.match(/Start$/g),u=!!n.match(/End$/g),c=i.isPinch,l=i.datas,h=(i=dv(e,t.name,i),e.moveables);e=i.map((function(e,i){var f=h[i],d=f.state,p=d.gestos,m=e;if(s)m=new RA(a).dragStart(r,e);else{if(p[a]||(p[a]=l.childGestos[i]),!p[a])return;m=FA(e,d,r,c,o,a)}return i=t[n](f,pA(pA({},m),{parentFlag:!0})),u&&(p[a]=null),i}));return s&&(l.childGestos=h.map((function(e){return e.state.gestos[a]}))),e}function mv(e,t,n,r,i,o){void 0===i&&(i=function(e,t){return t});var a=!!n.match(/End$/g),s=(r=dv(e,t.name,r),e.moveables);return r.map((function(e,r){var u=s[r],c=i(u,e);return(c=t[n](u,pA(pA({},c),{parentFlag:!0})))&&o&&o(u,e,c,r),a&&(u.state.gestos={}),c}))}function gv(e,t,n,r){var i=n.fixedDirection;n=n.fixedPosition,t=GA(r.datas.startPositions||ay(t.state),i),e=(i=mA(hg(bg(-e.rotation/180*Math.PI,3),[t[0]-n[0],t[1]-n[1],1],3),2))[0],t=i[1];return r.datas.originalX=e,r.datas.originalY=t,r}function Av(e,t,n,r){var i=(a=e.getState()).renderPoses,o=a.rotation,a=a.direction,s=Xb(e.props,t).zoom,u=Sb(o/Math.PI*180),c={},l=((e=e.renderState).renderDirectionMap||(e.renderDirectionMap={}),e.renderDirectionMap),h=(n.forEach((function(e){e=e.dir,c[e]=!0})),Ny(a));return n.map((function(e){var n=e.data,a=e.classNames,f=(e=e.dir,MA[e]);if(!f||!c[e])return null;l[e]=!0;var d=($p(u,15)+h*jA[e]+720)%180,p={};return jp(n).forEach((function(e){p["data-".concat(e)]=n[e]})),r.createElement("div",pA({className:Mb.apply(void 0,gA(["control","direction",e,t],mA(a),!1)),"data-rotation":d,"data-direction":e},p,{key:"direction-".concat(e),style:Yb.apply(void 0,gA([o,s],mA(f.map((function(e){return i[e]}))),!1))}))}))}function vv(e,t,n,r){var i=Xb(e.props,n),o=(t=void 0===(o=i.renderDirections)?t:o,i.displayAroundControls);return t?(i=!0===t?bA:t,gA(gA([],mA(o?Cv(e,r,n,i):[]),!1),mA(Av(e,n,i.map((function(e){return{data:{},classNames:[],dir:e}})),r)),!1)):[]}function bv(e,t,n,r,i,o){for(var a=[],s=6;s<arguments.length;s++)a[s-6]=arguments[s];var u=Up(n,r),c=t?$p(u/Math.PI*180,15)%180:-1;return e.createElement("div",{key:"line-".concat(o),className:Mb.apply(void 0,gA(["line","direction",t?"edge":"",t],mA(a),!1)),"data-rotation":c,"data-line-key":o,"data-direction":t,style:Kb(n,r,i,u)})}function yv(e,t,n,r,i){return(!0===n?vA:n).map((function(n,o){var a,s=(a=mA(MA[n],2))[0];if(null!=(a=a[1]))return bv(e,n,r[s],r[a],i,"".concat(t,"Edge").concat(o),t)})).filter(Boolean)}function wv(e){return function(t,n){var r=Xb(t.props,e).edge;return r&&(!0===r||r.length)?gA(gA([],mA(yv(n,e,r,t.getState().renderPoses,t.props.zoom)),!1),mA(vv(t,["nw","ne","sw","se"],e,n)),!1):xv(t,e,n)}}function xv(e,t,n){return vv(e,bA,t,n)}function Cv(e,t,n,r){var i=(a=((s=e.renderState).renderDirectionMap||(s.renderDirectionMap={}),e.getState())).renderPoses,o=a.rotation,a=a.direction,s=s.renderDirectionMap,u=e.props.zoom,c=Ny(a),l=o/Math.PI*180;return(r||jp(s)).map((function(e){var r,a,s=MA[e];return s?(r=($p(l,15)+c*jA[e]+720)%180,a=["around-control"],n&&a.push("direction",n),t.createElement("div",{className:Mb.apply(void 0,gA([],mA(a),!1)),"data-rotation":r,"data-direction":e,key:"direction-around-".concat(e),style:Yb.apply(void 0,gA([o,u],mA(s.map((function(e){return i[e]}))),!1))})):null}))}function kv(e,t,n){var r=(e=e||{}).position,i=e.left,o=e.top,a=e.right;return{vertical:Sv(r={position:void 0===r?"client":r,left:void 0===i?-1/0:i,top:void 0===o?-1/0:o,right:void 0===a?1/0:a,bottom:void 0===(e=e.bottom)?1/0:e},t,!0),horizontal:Sv(r,n,!1)}}function Ev(e,t){var n=(o=(c=e.state).containerClientRect).clientHeight,r=o.clientWidth,i=o.clientLeft,o=o.clientTop,a=(c=c.snapOffset).left,s=c.top,u=c.right,c=c.bottom,l=(e="css"===((t=t||e.props.bounds||{}).position||"client"),t.left),h=t.top,f=void 0===(f=t.right)?e?-1/0:1/0:f;t=void 0===(t=t.bottom)?e?-1/0:1/0:t;return e&&(f=r+u-a-f,t=n+c-s-t),{left:(void 0===l?-1/0:l)+a-i,right:f+a-i,top:(void 0===h?-1/0:h)+s-o,bottom:t+s-o}}function Sv(e,t,n){var r=e[n?"left":"top"],i=(e=e[n?"right":"bottom"],n=Math.min.apply(Math,gA([],mA(t),!1)),t=Math.max.apply(Math,gA([],mA(t),!1)),[]);return n<r+1&&i.push({direction:"start",isBound:!0,offset:n-r,pos:r}),e-1<t&&i.push({direction:"end",isBound:!0,offset:t-e,pos:e}),i.length||i.push({isBound:!1,offset:0,pos:0}),i.sort((function(e,t){return Fy(t.offset)-Fy(e.offset)}))}function _v(e,t,n){return(n?e.map((function(e){return gg(e,n)})):e).some((function(e){return e[0]<t.left&&.1<Fy(e[0]-t.left)||e[0]>t.right&&.1<Fy(e[0]-t.right)||e[1]<t.top&&.1<Fy(e[1]-t.top)||e[1]>t.bottom&&.1<Fy(e[1]-t.bottom)}))}var Ov=["left","right","center"],Tv=["top","bottom","middle"],Dv={left:"start",right:"end",center:"center",top:"start",bottom:"end",middle:"center"},Bv={start:"left",end:"right",center:"center"},Iv={start:"top",end:"bottom",center:"middle"};function Mv(e,t){var n=(u=e.props).snappable,r=u.bounds,i=u.innerBounds,o=u.verticalGuidelines,a=u.horizontalGuidelines,s=u.snapGridWidth,u=u.snapGridHeight,c=(e=e.state).guidelines;e=e.enableSnap;return n&&e&&!(t&&!0!==n&&n.indexOf(t)<0)&&!!(s||u||r||i||c&&c.length||o&&o.length||a&&a.length)}function jv(e){return!1===e?{}:!0!==e&&e?e:{left:!0,right:!0,top:!0,bottom:!0}}function Nv(e,t){var n=function(e,t){var n,r=jv(e),i={};for(n in r)n in t&&r[n]&&(i[n]=t[n]);return i}(e,t);return{horizontalNames:e=Tv.filter((function(e){return e in n})),verticalNames:t=Ov.filter((function(e){return e in n})),horizontal:e.map((function(e){return n[e]})),vertical:t.map((function(e){return n[e]}))}}function Fv(e,t,n,r,i,o){return void 0===r&&(r=[]),void 0===i&&(i=[]),o=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=e.length-1,r=0;r<n;++r){var i=e[r];if(!mp(i))return i}return e[n]}(o,e.props.snapThreshold,5),Rv(e.state.guidelines,t,n,r,i,o)}function Rv(e,t,n,r,i,o){return{vertical:zv(e,"vertical",t,o,r),horizontal:zv(e,"horizontal",n,o,i)}}function Pv(e){var t="";return-1===e||"top"===e||"left"===e?t="start":0===e||"center"===e||"middle"===e?t="center":1!==e&&"right"!==e&&"bottom"!==e||(t="end"),t}function Lv(e,t,n){return e=Fv(e,(t=Nv(e.props.snapDirections,t)).vertical,t.horizontal,t.verticalNames.map(Pv),t.horizontalNames.map(Pv),n),n=Pv(t.horizontalNames[e.horizontal.index]),t=Pv(t.verticalNames[e.vertical.index]),{vertical:pA(pA({},e.vertical),{direction:t}),horizontal:pA(pA({},e.horizontal),{direction:n})}}function Uv(e){var t,n,r,i=e.isSnap;return i?(t=(r=(e=e.posInfos[0]).guidelineInfos[0]).offset,n=r.dist,r=r.guideline,{isSnap:i,offset:t,dist:n,pos:e.pos,guideline:r}):{isSnap:!1,offset:0,dist:-1,pos:0,guideline:null}}function zv(e,t,n,r,i){var o,a;return void 0===i&&(i=[]),e&&e.length?(o="vertical"===t?0:1,{isSnap:a=0<(n=n.map((function(n,a){var s=i[a]||"",u=e.map((function(e){var t=e.pos;return{offset:t=n-t[o],dist:Fy(t),guideline:e,direction:s}})).filter((function(e){var n=e.guideline;e=e.dist;return!(n.type!==t||r<e)})).sort((function(e,t){return e.dist-t.dist}));return{pos:n,index:a,guidelineInfos:u,direction:s}})).filter((function(e){return 0<e.guidelineInfos.length})).sort((function(e,t){return e.guidelineInfos[0].dist-t.guidelineInfos[0].dist}))).length,index:a?n[0].index:-1,direction:null!=(a=null==(a=n[0])?void 0:a.direction)?a:"",posInfos:n}):{isSnap:!1,index:-1,direction:"",posInfos:[]}}function Hv(e,t){var n=Fy(e.offset),r=Fy(t.offset);return e.isBound&&t.isBound?r-n:e.isBound?-1:t.isBound?1:e.isSnap&&t.isSnap?r-n:e.isSnap?-1:t.isSnap||n<TA?1:r<TA?-1:n-r}function $v(e,t){return e.slice().sort((function(e,n){var r=e.sign[t],i=n.sign[t],o=e.offset[t],a=n.offset[t];return r?i?Hv({isBound:e.isBound,isSnap:e.isSnap,offset:o},{isBound:n.isBound,isSnap:n.isSnap,offset:a}):-1:1}))[0]}function Qv(e,t){var n=Lp([t[0][0],t[1][0]]);t=Lp([t[0][1],t[1][1]]);return{vertical:n<=e[0],horizontal:t<=e[1]}}function Vv(e,t){var n,r=(t=mA(t,2))[0],i=(t=t[1])[0]-r[0];t=t[1]-r[1];return Fy(i)<TA&&(i=0),Fy(t)<TA&&(t=0),t=i?(n=t?t/i*(e[0]-r[0])+r[1]:r[1],e[1]):(n=r[0],e[0]),n-t}function qv(e,t,n,r){return void 0===r&&(r=TA),e.every((function(e){return(e=Vv(e,t))<=0===n||Fy(e)<=r}))}function Gv(e,t,n,r,i){return void 0===i&&(i=0),r&&t-i<=e||!r&&e<=n+i?{isBound:!0,offset:r?t-e:n-e}:{isBound:!1,offset:0}}function Wv(e,t,n,r,i,o){var a,s,u=(t=mA(t,2))[0],c=(t=t[1],e=e[0],n[0]),l=Ey((n=n[1])[1]-c[1]),h=t,f=u;u=-u/t;return Ey(n[0]-c[0])?l||o&&!h?{isBound:!1,offset:0}:f?Gv((c[1]-e[1])/u+e[0],c[0],n[0],r,i):{isBound:s=Fy(a=c[1]-e[1])<=(i||0),offset:s?a:0}:o&&!f?{isBound:!1,offset:0}:h?Gv(u*(c[0]-e[0])+e[1],c[1],n[1],r,i):{isBound:s=Fy(a=c[0]-e[0])<=(i||0),offset:s?a:0}}function Kv(e,t,n){return t.map((function(t){p=e,s=(r=t).line,u=r.centerSign,c=r.verticalSign,l=r.horizontalSign,r=r.lineConstants;var r,i,o,a,s,u,c,l=!(p=p.props.innerBounds)||(h=p.left,d=p.top,f=p.width,g=[[h,d],[h,d+(p=p.height)]],i=[[h,d],[h+f,d]],a=[[h+f,d],[h+f,d+p]],o=[[h,d+p],[h+f,d+p]],qv([[h,d],[h+f,d],[h,d+p],[h+f,d+p]],s,u))?{isAllBound:!1,isBound:!1,isVerticalBound:!1,isHorizontalBound:!1,offset:[0,0]}:(h=Wv(s,r,i,c),f=Wv(s,r,o,c),d=Wv(s,r,g,l),p=Wv(s,r,a,l),u=h.isBound&&f.isBound,i=h.isBound||f.isBound,o=d.isBound&&p.isBound,c=d.isBound||p.isBound,g=yy(h.offset,f.offset),r=!(s=[0,0]),{isAllBound:Fy(a=yy(d.offset,p.offset))<Fy(g)?(s=[g,0],r=i,u):(s=[0,a],r=c,o),isVerticalBound:i,isHorizontalBound:c,isBound:r,offset:s}),h=l.isBound,f=l.offset,d=l.isVerticalBound,p=l.isHorizontalBound,m=t.multiple,g=VA({datas:n,distX:f[0],distY:f[1]}).map((function(e,t){return e*(m[t]?2/m[t]:0)}));return{sign:m,isBound:h,isVerticalBound:d,isHorizontalBound:p,isSnap:!1,offset:g}}))}function Yv(e,t,n,r){var i,o,a=Qb((e=e.state).allMatrix,100,100,e.is3d?4:3),s=GA(a,[0,0]);return e=r,r=[],i=(n=n)[0],o=n[1],i&&o?r.push([[0,2*o],n,[-i,o]],[[2*i,0],n,[i,-o]]):i?(r.push([[2*i,0],[i,1],[i,-1]]),e&&r.push([[0,-1],[i,-1],[-i,-1]],[[0,1],[i,1],[-i,1]])):o?(r.push([[0,2*o],[1,o],[-1,o]]),e&&r.push([[-1,0],[-1,o],[-1,-o]],[[1,0],[1,o],[1,-o]])):r.push([[-1,0],[-1,-1],[-1,1]],[[1,0],[1,-1],[1,1]],[[0,-1],[-1,-1],[1,-1]],[[0,1],[-1,1],[1,1]]),r.map((function(e){var n,r,i=(e=mA(e,3))[0],o=e[1],u=(e=e[2],[GA(a,o),GA(a,e)]),c=(h=(c=mA(c=u,2))[0],l=(c=c[1])[0]-h[0],c=c[1]-h[1],Math.abs(l)<fp&&(l=0),Math.abs(c)<fp&&(c=0),r=n=f=0,r=l?c?(f=-c/l)*h[0]-h[n=1]:-h[n=1]:(f=-1,h[0]),[f,n,r].map((function(e){return $p(e,fp)}))),l=Qv(s,u),h=l.vertical,f=l.horizontal;return{multiple:i,centerSign:Vv(s,u)<=0,verticalSign:h,horizontalSign:f,lineConstants:c,line:[GA(t,o),GA(t,e)]}}))}function Xv(e,t,n,r){return[[(e=r?e.map((function(e){return gg(e,r)})):e)[0],e[1]],[e[1],e[3]],[e[3],e[2]],[e[2],e[0]]].some((function(e){var r=Vv(n,e)<=0;return!qv(t,e,r)}))}function Jv(e,t,n,r,i){u=e,n=n,r=r,o=(s=t)[0]-u[0],a=s[1]-u[1],Fy(o)<fp&&(o=0),Fy(a)<fp&&(a=0);var o,a,s,u=o?a?(o=u[1]-(a/=o)*u[0],r?[n,a*(s[0]+n)+o-s[1]]:[(s[1]+n-o)/a-s[0],n]):r?[n,0]:[0,0]:r?[0,0]:[0,n];return u?(o=Hp(e,t),a=Hp(u,e),s=Hp(u,t),r=o<a||o<s,{offset:[(n=mA(VA({datas:i,distX:u[0],distY:u[1]}),2))[0],n[1]],isOutside:r}):{isOutside:!1,offset:[0,0]}}function Zv(e,t){return e.isBound?e.offset:t.isSnap?Uv(t).offset:0}function eb(e,t,n,r,i,o){var a,s,u,c,l,h,f,d,p;return Mv(e,"draggable")?(p=(a=Vb(s=oy(o.absolutePoses,[t,n]))).left,u=a.right,d=a.top,a=a.bottom,c={horizontal:s.map((function(e){return e[1]})),vertical:s.map((function(e){return e[0]}))},p=(i=tb(e,i,Nv(jv(e.props.snapDirections),{left:p,right:u,top:d,bottom:a,center:(p+u)/2,middle:(d+a)/2}),c)).vertical,u=i.horizontal,a=(d=function(e,t,n){t=$v(e=Kv(e,Yv(e,t,[0,0],!1).map((function(e){return pA(pA({},e),{multiple:e.multiple.map((function(e){return 2*Fy(e)}))})})),n),0),e=$v(e,1);var r,i,o,a,s=0,u=0,c=t.isVerticalBound||e.isVerticalBound,l=t.isHorizontalBound||e.isHorizontalBound;return(c||l)&&(s=(r=mA((n={datas:n,distX:-t.offset[0],distY:-e.offset[1]},t=n.datas,e=n.distX,n=n.distY,r=t.beforeMatrix,i=t.matrix,o=t.is3d,t.startDragBeforeDist,a=t.startDragDist,t=t.absoluteOrigin,o=o?4:3,cg(hg(i,ug(a,[e,n]),o),t)),2))[0],u=r[1]),{vertical:{isBound:c,offset:s},horizontal:{isBound:l,offset:u}}}(e,s,o)).vertical,c=d.horizontal,i=p.isSnap,e=u.isSnap,s=p.isBound||a.isBound,o=u.isBound||c.isBound,d=yy(p.offset,a.offset),p=yy(u.offset,c.offset),[{isBound:s,isSnap:i,offset:(n=mA((a=r,u=[s,o],c=[i,e],r=[d,p],h=(s=mA(s=[t,n],2))[0],f=s[1],u=(s=mA(u,2))[0],s=s[1],i=(c=mA(c,2))[0],c=c[1],d=(r=mA(r,2))[0],r=r[1],p=-d,t=-r,a&&h&&f?(t=p=0,n=[],u&&s?n.push([0,r],[d,0]):u?n.push([d,0]):s?n.push([0,r]):i&&c?n.push([0,r],[d,0]):i?n.push([d,0]):c&&n.push([0,r]),n.length&&(n.sort((function(e,t){return Gb(cg([h,f],e))-Gb(cg([h,f],t))})),(i=n[0])[0]&&Fy(h)>fp?(p=-i[0],t=f*Fy(h+p)/Fy(h)-f):i[1]&&Fy(f)>fp&&(c=f,t=-i[1],p=h*Fy(f+t)/Fy(c)-h),a&&s&&u&&(Fy(p)>fp&&Fy(p)<Fy(d)?(p*=l=Fy(d)/Fy(p),t*=l):Fy(t)>fp&&Fy(t)<Fy(r)?(p*=l=Fy(r)/Fy(t),t*=l):(p=yy(-d,p),t=yy(-r,t))))):(p=h||u?-d:0,t=f||s?-r:0),[p,t]),2))[0]},{isBound:o,isSnap:e,offset:n[1]}]):[{isSnap:!1,isBound:!1,offset:0},{isSnap:!1,isBound:!1,offset:0}]}function tb(e,t,n,r){var i=(r=kv(Ev(e),(r=void 0===r?n:r).vertical,r.horizontal)).horizontal,o=(r=r.vertical,e=(t=t?{horizontal:{isSnap:!1,index:-1},vertical:{isSnap:!1,index:-1}}:Fv(e,n.vertical,n.horizontal)).horizontal,n=t.vertical,t=Zv(i[0],e),Zv(r[0],n)),a=Fy(t),s=Fy(o);return{horizontal:{isBound:i[0].isBound,isSnap:e.isSnap,snapIndex:e.index,offset:t,dist:a,bounds:i,snap:e},vertical:{isBound:r[0].isBound,isSnap:n.isSnap,snapIndex:n.index,offset:o,dist:s,bounds:r,snap:n}}}function nb(e,t,n,r,i){var o=(t=kv(t,n,r)).horizontal,a=(t=t.vertical,n=(e=Rv(e,n,r,[],[],i)).horizontal,r=e.vertical,i=Zv(o[0],n),e=Zv(t[0],r),Fy(i)),s=Fy(e);return{horizontal:{isBound:o[0].isBound,isSnap:n.isSnap,snapIndex:n.index,offset:i,dist:a,bounds:o,snap:n},vertical:{isBound:t[0].isBound,isSnap:r.isSnap,snapIndex:r.index,offset:e,dist:s,bounds:t,snap:r}}}function rb(e,t){return e.isBound?e.offset:t.isSnap?t.offset:0}var ib={name:"draggable",props:["draggable","throttleDrag","throttleDragRotate","hideThrottleDragRotateLine","startDragRotate","edgeDraggable"],events:["dragStart","drag","dragEnd","dragGroupStart","dragGroup","dragGroupEnd"],requestStyle:function(){return["left","top","right","bottom"]},requestChildStyle:function(){return["left","top","right","bottom"]},render:function(e,t){var n=(i=e.props).hideThrottleDragRotateLine,r=i.throttleDragRotate,i=i.zoom,o=(e=e.getState()).dragInfo;e=e.beforeOrigin;return!n&&r&&o&&((n=o.dist)[0]||n[1])?(r=Gb(n),o=Up(n,[0,0]),[t.createElement("div",{className:Mb("line","horizontal","dragline","dashed"),key:"dragRotateGuideline",style:{width:"".concat(r,"px"),transform:"translate(".concat(e[0],"px, ").concat(e[1],"px) rotate(").concat(o,"rad) scaleY(").concat(i,")")}})]):[]},dragStart:function(e,t){var n=t.datas,r=t.parentEvent,i=t.parentGesto,o=(a=e.state).gestos,a=a.style;return!o.draggable&&(o.draggable=i||e.targetGesto,n.datas={},n.left=parseFloat(a.left||"")||0,n.top=parseFloat(a.top||"")||0,n.bottom=parseFloat(a.bottom||"")||0,n.right=parseFloat(a.right||"")||0,n.startValue=[0,0],UA(e,t),YA(e,t,"translate"),n.absolutePoses=ay(e.state),n.prevDist=[0,0],n.prevBeforeDist=[0,0],n.isDrag=!1,n.deltaOffset=[0,0],i=hy(e,t,pA({set:function(e){n.startValue=e}},KA(e,t))),!1!==(r||py(e,"onDragStart",i))?(n.isDrag=!0,e.state.dragInfo={startRect:e.getRect(),dist:[0,0]}):(o.draggable=null,n.isPinch=!1),!!n.isDrag&&i)},drag:function(e,t){if(t){zA(e,t,"translate");var n=t.datas,r=t.parentEvent,i=t.parentFlag,o=t.isPinch,a=t.deltaOffset,s=t.useSnap,u=t.isRequest,c=t.distX,l=t.distY,h=n.isDrag,f=n.prevDist,d=n.prevBeforeDist,p=n.startValue;if(h){a&&(c+=a[0],l+=a[1]);var m=(h=e.props).parentMoveable,g=!r&&h.throttleDrag||0,A=!r&&h.throttleDragRotate||0,v=0,b=!1,y=!1,w=!1,x=!1,C=(i=(!r&&0<A&&(c||l)&&(h=$p((h=h.startDragRotate||0)+180*Up([0,0],[c,l])/Math.PI,A)-h,C=l*Math.abs(Math.cos((h-90)/180*Math.PI)),C=Gb([c*Math.abs(Math.cos(h/180*Math.PI)),C]),v=h*Math.PI/180,c=C*Math.cos(v),l=C*Math.sin(v)),o||r||i||(C=(h=mA(eb(e,c,l,A,!s&&u||a,n),2))[0],v=h[1],b=C.isSnap,y=C.isBound,w=v.isSnap,x=v.isBound,c+=C.offset,l+=v.offset),ug(QA({datas:n,distX:c,distY:l}),p)),u=(Qp(s=ug(function(e){var t=e.datas;return hg($A(t,function(e,t){for(var n=yg(4),r=0;r<3;++r)n[12+r]=e[r]||0;return n}([(e=mA(QA({datas:t,distX:e.distX,distY:e.distY}),2))[0],e[1]])),ig([0,0,0],4),4)}({datas:n,distX:c,distY:l}),p),TA),Qp(i,TA),A||(b||y||(s[0]=$p(s[0],g),i[0]=$p(i[0],g)),w||x||(s[1]=$p(s[1],g),i[1]=$p(i[1],g))),cg(i,p)),a=cg(s,p),h=cg(a,f),cg(u,d));v=(n.prevDist=a,n.prevBeforeDist=u,n.passDelta=h,n.passDist=a,n.left+u[0]),c=n.top+u[1],l=n.right-u[0],A=n.bottom-u[1];if(JA(t,b=HA(n,"translate(".concat(s[0],"px, ").concat(s[1],"px)"),"translate(".concat(a[0],"px, ").concat(a[1],"px)"))),e.state.dragInfo.dist=r?[0,0]:a,r||m||!h.every((function(e){return!e}))||!C.some((function(e){return!e})))return w=(y=e.state).width,x=y.height,g=hy(e,t,pA({transform:b,dist:a,delta:h,translate:s,beforeDist:u,beforeDelta:C,beforeTranslate:i,left:v,top:c,right:l,bottom:A,width:w,height:x,isPinch:o},cy({transform:b},t))),r||py(e,"onDrag",g),g}}},dragAfter:function(e,t){var n=t.datas,r=n.deltaOffset;return!(!r[0]&&!r[1])&&(n.deltaOffset=[0,0],this.drag(e,pA(pA({},t),{deltaOffset:r})))},dragEnd:function(e,t){var n=t.parentEvent,r=t.datas;if(e.state.dragInfo=null,r.isDrag)return r.isDrag=!1,r=fy(e,t,{}),n||py(e,"onDragEnd",r),r},dragGroupStart:function(e,t){var n=t.datas,r=t.clientX,i=t.clientY,o=this.dragStart(e,t);return!!o&&(r=pv(e,this,"dragStart",[r||0,i||0],t,!1,"draggable"),i=py(e,"onDragGroupStart",pA(pA({},o),{targets:e.props.targets,events:r})),n.isDrag=!1!==i,!!n.isDrag&&o)},dragGroup:function(e,t){if(t.datas.isDrag){var n=this.drag(e,t);t=pv(e,this,"drag",t.datas.passDelta,t,!1,"draggable");if(n)return py(e,"onDragGroup",e=pA({targets:e.props.targets,events:t},n)),e}},dragGroupEnd:function(e,t){var n,r=t.isDrag;if(t.datas.isDrag)return this.dragEnd(e,t),n=pv(e,this,"dragEnd",[0,0],t,!1,"draggable"),py(e,"onDragGroupEnd",fy(e,t,{targets:e.props.targets,events:n})),r},request:function(e){var t={},n=e.getRect(),r=0,i=0,o=!1;return{isControl:!1,requestStart:function(e){return o=e.useSnap,{datas:t,useSnap:o}},request:function(e){return"x"in e?r=e.x-n.left:"deltaX"in e&&(r+=e.deltaX),"y"in e?i=e.y-n.top:"deltaY"in e&&(i+=e.deltaY),{datas:t,distX:r,distY:i,useSnap:o}},requestEnd:function(){return{datas:t,isDrag:!0,useSnap:o}}}},unset:function(e){e.state.gestos.draggable=null,e.state.dragInfo=null}};function ob(e,t){return{fixedPosition:GA(e,t),fixedDirection:t,fixedOffset:[0,0]}}function ab(e,t){var n,r,i=e.allMatrix,o=e.is3d,a=e.width,s=(n=t,r=e=e.height,[(s=a)?n[0]/(s/2)-1:0,r?n[1]/(r/2)-1:0]);return{fixedPosition:$b(i,t,o?4:3),fixedDirection:s,fixedOffset:[a?0:t[0],e?0:t[1]]}}Ha=_y("resizable");var sb={name:"resizable",ableGroup:"size",canPinch:!0,props:["resizable","throttleResize","renderDirections","displayAroundControls","keepRatio","resizeFormat","keepRatioFinally","edge","checkResizableError"],events:["resizeStart","beforeResize","resize","resizeEnd","resizeGroupStart","beforeResizeGroup","resizeGroup","resizeGroupEnd"],render:wv("resizable"),dragControlCondition:Ha,viewClassName:Sy("resizable"),dragControlStart:function(e,t){var n=t.inputEvent,r=t.isPinch,i=t.isGroup,o=t.parentDirection,a=t.parentGesto,s=t.datas,u=t.parentFixedDirection,c=t.parentEvent,l=(o=ry(o,r,n,s),(n=e.state).target),h=n.width,f=n.height,d=n.gestos;if(!o||!l)return!1;if(d.resizable)return!1;function p(e){s.ratio=e&&isFinite(e)?e:0}function m(e){e=ob(s.startPositions,e),s.fixedDirection=e.fixedDirection,s.fixedPosition=e.fixedPosition,s.fixedOffset=e.fixedOffset}function g(t){t=ab(e.state,t),s.fixedDirection=t.fixedDirection,s.fixedPosition=t.fixedPosition,s.fixedOffset=t.fixedOffset}function A(e){s.minSize=[Np("".concat(e[0]),0)||0,Np("".concat(e[1]),0)||0]}function v(e){bp((e=[e[0]||1/0,e[1]||1/0])[0])&&!isFinite(e[0])||(e[0]=Np("".concat(e[0]),0)||1/0),bp(e[1])&&!isFinite(e[1])||(e[1]=Np("".concat(e[1]),0)||1/0),s.maxSize=e}return d.resizable=a||e.controlGesto,r||UA(e,t),s.datas={},s.direction=o,s.startOffsetWidth=h,s.startOffsetHeight=f,s.prevWidth=0,s.prevHeight=0,s.minSize=[0,0],s.startWidth=n.inlineCSSWidth||n.cssWidth,s.startHeight=n.inlineCSSHeight||n.cssHeight,s.maxSize=[1/0,1/0],i||(s.minSize=[n.minOffsetWidth,n.minOffsetHeight],s.maxSize=[n.maxOffsetWidth,n.maxOffsetHeight]),l=e.props.transformOrigin||"% %",s.transformOrigin=l&&vp(l)?l.split(" "):l,s.startOffsetMatrix=n.offsetMatrix,s.startTransformOrigin=n.transformOrigin,s.isWidth=null!=(d=null==t?void 0:t.parentIsWidth)?d:!o[0]&&!o[1]||o[0]||!o[1],s.startPositions=ay(e.state),p(h/f),m(u||[-o[0],-o[1]]),s.setFixedDirection=m,s.setFixedPosition=g,s.setMin=A,s.setMax=v,a=hy(e,t,{direction:o,startRatio:s.ratio,set:function(e){var t=(e=mA(e,2))[0];e=e[1];s.startWidth=t,s.startHeight=e},setMin:A,setMax:v,setRatio:p,setFixedDirection:m,setFixedPosition:g,setOrigin:function(e){s.transformOrigin=e},dragStart:ib.dragStart(e,(new RA).dragStart([0,0],t))}),r=c||py(e,"onResizeStart",a),s.startFixedDirection=s.fixedDirection,s.startFixedPosition=s.fixedPosition,!1!==r&&(s.isResize=!0,e.state.snapRenderInfo={request:t.isRequest,direction:o}),!!s.isResize&&a},dragControl:function(e,t){var n=t.datas,r=t.parentFlag,i=t.isPinch,o=t.parentKeepRatio,a=t.dragClient,s=t.parentDist,u=t.useSnap,c=t.isRequest,l=t.isGroup,h=t.parentEvent,f=t.resolveMatrix,d=n.isResize,p=n.transformOrigin,m=n.startWidth,g=n.startHeight,A=n.prevWidth,v=n.prevHeight,b=n.minSize,y=n.maxSize,w=n.ratio,x=n.startOffsetWidth,C=n.startOffsetHeight,k=n.isWidth;if(d){f&&(d=e.state.is3d,f=n.startOffsetMatrix,M=n.startTransformOrigin,d=d?4:3,F=Eg(ev(t)),M=Qb(f=WA(f,F=d!==(f=Math.sqrt(F.length))?og(F,f,d):F,M,d),x,C,d),n.startPositions=M,n.nextTargetMatrix=F,n.nextAllMatrix=f);var E,S,_,O,T,D,B,I,M,j=(d=Xb(e.props,"resizable")).resizeFormat,N=void 0===(M=d.throttleResize)?r?0:1:M,F=d.parentMoveable,R=(f=d.keepRatioFinally,M=n.direction),P=0,L=0,U=(M[0]||M[1]||(R=[1,1]),w&&(null!=o?o:d.keepRatio)||!1),z=(o=mA($(),2))[0],H=o[1];d=(h||(n.setFixedDirection(n.fixedDirection),py(e,"onBeforeResize",hy(e,t,{startFixedDirection:n.startFixedDirection,startFixedPosition:n.startFixedPosition,setFixedDirection:function(e){return n.setFixedDirection(e),e=mA($(),2),z=e[0],H=e[1],[z,H]},setFixedPosition:function(e){return n.setFixedPosition(e),e=mA($(),2),z=e[0],H=e[1],[z,H]},boundingWidth:z,boundingHeight:H,setSize:function(e){e=mA(e,2),z=e[0],H=e[1]}},!0))),a),a=(a||(d=!r&&i?(o=[0,0],GA(ay(e.state),o)):n.fixedPosition),[0,0]),r=(i||(E=z,S=H,r=M,_=d,o=!u&&c,u=n,a=Mv(c=e,"resizable")?(O=u.fixedDirection,T=u.nextAllMatrix,I=c.state,D=I.allMatrix,B=I.is3d,Eb(c,(function(e,t){return xb(T||D,E+e,S+t,O,_,B)}),E,S,r,_,o,u)):[0,0]),s&&(s[0]||(a[0]=0),s[1]||(a[1]=0)),U?(R[0]&&R[1]&&a[0]&&a[1]&&(Fy(a[0])>Fy(a[1])?a[1]=0:a[0]=0),(I=!a[0]&&!a[1])&&Q(),R[0]&&!R[1]||a[0]&&!a[1]||I&&k?(z+=a[0],H=z/w):(!R[0]&&R[1]||!a[0]&&a[1]||I&&!k)&&(H+=a[1],z=H*w)):(z+=a[0],H+=a[1],z=Math.max(0,z),H=Math.max(0,H)),c=mA(Pp([z,H],b,y,!!U&&w),2),z=c[0],H=c[1],Q(),U&&(l||f)&&(k?H=z/w:z=H*w),[(P=z-x)-A,(L=H-C)-v]),o=(n.prevWidth=P,n.prevHeight=L,av(e,z,H,d,p,n));if(F||!r.every((function(e){return!e}))||!o.every((function(e){return!e})))return s=(u=ib.drag(e,FA(t,e.state,o,!!i,!1,"draggable"))).transform,y=hy(e,t,pA({width:a=m+P,height:b=g+L,offsetWidth:Math.round(z),offsetHeight:Math.round(H),startRatio:w,boundingWidth:z,boundingHeight:H,direction:M,dist:[P,L],delta:r,isPinch:!!i,drag:u},ly({style:{width:"".concat(a,"px"),height:"".concat(b,"px")},transform:s},u,t))),h||py(e,"onResize",y),y}function $(){var e=n.fixedDirection,r=Iy(R,U,n,t);P=r.distWidth,L=r.distHeight,r=R[0]-e[0]||U?Math.max(x+P,TA):x,e=R[1]-e[1]||U?Math.max(C+L,TA):C;return U&&x&&C&&(k?e=r/w:r=e*w),[r,e]}function Q(){var e;j&&(e=mA(j([z,H]),2),z=e[0],H=e[1]),z=$p(z,N),H=$p(H,N)}},dragControlAfter:function(e,t){var n=t.datas,r=n.isResize,i=n.startOffsetWidth,o=n.startOffsetHeight,a=n.prevWidth,s=n.prevHeight;if(r&&!1!==e.props.checkResizableError)return i=(r=e.state).width-(i+a),a=r.height-(o+s),r=3<Fy(i),o=3<Fy(a),r&&(n.startWidth+=i,n.startOffsetWidth+=i,n.prevWidth+=i),o&&(n.startHeight+=a,n.startOffsetHeight+=a,n.prevHeight+=a),r||o?this.dragControl(e,t):void 0},dragControlEnd:function(e,t){var n=t.datas,r=t.parentEvent;if(n.isResize)return n.isResize=!1,n=fy(e,t,{}),r||py(e,"onResizeEnd",n),n},dragGroupControlCondition:Ha,dragGroupControlStart:function(e,t){var n,r,i,o,a=t.datas,s=this.dragControlStart(e,pA(pA({},t),{isGroup:!0}));return!!s&&(n=dv(e,"resizable",t),r=a.startOffsetWidth,i=a.startOffsetHeight,o=mv(e,this,"dragControlStart",t,(function(t,n){return gv(e,t,a,n)})),u(),c(),a.setFixedDirection=t=function(t){s.setFixedDirection(t),o.forEach((function(r,i){r.setFixedDirection(t),gv(e,r.moveable,a,n[i])}))},t=pA(pA({},s),{targets:e.props.targets,events:o.map((function(e){return pA(pA({},e),{setMin:function(t){e.setMin(t),u()},setMax:function(t){e.setMax(t),c()}})})),setFixedDirection:t,setMin:function(e){s.setMin(e),u()},setMax:function(e){s.setMax(e),c()}}),t=py(e,"onResizeGroupStart",t),a.isResize=!1!==t,!!a.isResize&&s);function u(){var e=a.minSize;n.forEach((function(t){var n=(t=t.datas).minSize,o=t.startOffsetWidth;t=t.startOffsetHeight,o=r*(o?n[0]/o:0),n=i*(t?n[1]/t:0);e[0]=Math.max(e[0],o),e[1]=Math.max(e[1],n)}))}function c(){var e=a.maxSize;n.forEach((function(t){var n=(t=t.datas).maxSize,o=t.startOffsetWidth;t=t.startOffsetHeight,o=r*(o?n[0]/o:0),n=i*(t?n[1]/t:0);e[0]=Math.min(e[0],o),e[1]=Math.min(e[1],n)}))}},dragGroupControl:function(e,t){var n=t.datas;if(n.isResize){var r,i,o,a,s,u,c=Xb(e.props,"resizable"),l=(dy(e,"onBeforeResize",(function(n){py(e,"onBeforeResizeGroup",hy(e,t,pA(pA({},n),{targets:c.targets}),!0))})),this.dragControl(e,pA(pA({},t),{isGroup:!0})));if(l)return s=l.boundingWidth,u=l.boundingHeight,r=l.dist,i=c.keepRatio,o=[s/(s-r[0]),u/(u-r[1])],a=n.fixedPosition,s=mv(e,this,"dragControl",t,(function(t,n){var r=(s=mA(hg(bg(e.rotation/180*Math.PI,3),[n.datas.originalX*o[0],n.datas.originalY*o[1],1],3),2))[0],s=s[1];return pA(pA({},n),{parentDist:null,parentScale:o,dragClient:ug(a,[r,s]),parentKeepRatio:i})})),u=pA({targets:c.targets,events:s},l),py(e,"onResizeGroup",u),u}},dragGroupControlEnd:function(e,t){var n,r=t.isDrag;if(t.datas.isResize)return this.dragControlEnd(e,t),n=mv(e,this,"dragControlEnd",t),py(e,"onResizeGroupEnd",fy(e,t,{targets:e.props.targets,events:n})),r},request:function(e){var t={},n=0,r=0,i=!1,o=e.getRect();return{isControl:!0,requestStart:function(e){return i=e.useSnap,{datas:t,parentDirection:e.direction||[1,1],parentIsWidth:null==(e=null==e?void 0:e.horizontal)||e,useSnap:i}},request:function(e){return"offsetWidth"in e?n=e.offsetWidth-o.offsetWidth:"deltaWidth"in e&&(n+=e.deltaWidth),"offsetHeight"in e?r=e.offsetHeight-o.offsetHeight:"deltaHeight"in e&&(r+=e.deltaHeight),{datas:t,parentDist:[n,r],parentKeepRatio:e.keepRatio,useSnap:i}},requestEnd:function(){return{datas:t,isDrag:!0,useSnap:i}}}},unset:function(e){e.state.gestos.resizable=null}};function ub(e,t,n,r,i){var o=e.props.groupable,a=e.state,s=a.is3d?4:3,u=t.origin;e=$b(e.state.rootMatrix,cg([u[0],u[1]],o?[0,0]:[a.left,a.top]),s),u=ug([i.left,i.top],e);t.startAbsoluteOrigin=u,t.prevDeg=Up(u,[n,r])/Math.PI*180,t.defaultDeg=t.prevDeg,t.prevSnapDeg=0,t.loop=0,t.startDist=Hp(u,[n,r])}function cb(e,t,n){var r=n.defaultDeg,i=(o=n.prevDeg)%360,o=Math.floor(o/360);i<0&&(i+=360),e<i&&270<i&&e<90?++o:i<e&&i<90&&270<e&&--o,i=t*(360*o+e-r);return n.prevDeg=r+i,i}function lb(e,t,n,r){return cb(Up(r.startAbsoluteOrigin,[e,t])/Math.PI*180,n,r)}function hb(e,t,n,r,i,o){var a=void 0===(a=e.props.throttleRotate)?0:a,s=n.prevSnapDeg,u=0,c=!1;o&&(c=(o=function(e,t,n,r){var i=null!=(i=(o=e.props)[Bb])?i:5,o=o[Ib];if(Mv(e,"rotatable")){var a=t.pos1,s=t.pos2,u=t.pos3,c=t.pos4,l=t.origin,h=n*Math.PI/180;a=(t=[a,s,u,c].map((function(e){return cg(e,l)}))).map((function(e){return gg(e,h)})),s=gA(gA([],mA(function(e,t,n,r,i){var o,a,s,u,c;return e.props.bounds&&(o=i*Math.PI/180,e=(i=Ev(e)).left,s=i.top,a=i.right,i=i.bottom,e-=r[0],a-=r[0],s-=r[1],i-=r[1],_v(n,u={left:e,top:s,right:a,bottom:i},0))?(c=[],[[e,0],[a,0],[s,1],[i,1]].forEach((function(e){var r=(e=mA(e,2))[0],i=e[1];n.forEach((function(e){var n,a,s,l=Up([0,0],e);c.push.apply(c,gA([],mA((a=r,s=i,e=Gb(n=e),[e=Math.sqrt(e*e-a*a)||0,-e].sort((function(e,t){return Fy(e-n[s?0:1])-Fy(t-n[s?0:1])})).map((function(e){return Up([0,0],s?[e,a]:[a,e])})).map((function(e){return o+e-l})).filter((function(e){return!_v(t,u,e)})).map((function(e){return $p(180*e/Math.PI,TA)})))),!1))}))})),c):[]}(e,t,a,l,n)),!1),mA(function(e,t,n,r,i){e=e.props.innerBounds;var o,a,s,u,c,l,h,f=i*Math.PI/180;return e&&(i=e.left,s=e.top,a=e.width,e=e.height,o=i-r[0],i=i+a-r[0],a=s-r[1],s=s+e-r[1],u=[[o,a],[i,a],[o,s],[i,s]],c=GA(n,[0,0]),Xv(n,u,c,0))?(l=[],h=u.map((function(e){return[Gb(e),Up([0,0],e)]})),[[n[0],n[1]],[n[1],n[3]],[n[3],n[2]],[n[2],n[0]]].forEach((function(e){var n,r,i,o=Up([0,0],(i=(r=mA(r=e,2))[0],n=(r=r[1])[0]-i[0],r=r[1]-i[1],n?r?[-(n=-(r/=n)*i[0]+i[1])/(r+1/r),n/(r*r+1)]:[0,i[1]]:[i[0],0])),a=(r=(n=mA(n=e,2))[0],i=(n=n[1])[0]-r[0],n=n[1]-r[1],Fy(i?n?(-(n/=i)*r[0]+r[1])/Math.sqrt(Math.pow(n,2)+1):r[1]:r[0]));l.push.apply(l,gA([],mA(h.filter((function(e){return(e=mA(e,1)[0])&&a<=e})).map((function(e){var t=(e=mA(e,2))[0];e=e[1],t=Math.acos(t?a/t:0);return[f+(e+t)-o,f+(e-t)-o]})).reduce((function(e,t){return e.push.apply(e,gA([],mA(t),!1)),e}),[]).filter((function(e){return!Xv(t,u,c,e)})).map((function(e){return $p(180*e/Math.PI,TA)}))),!1))})),l):[]}(e,t,a,l,n)),!1);if(u=(s.sort((function(e,t){return Fy(e-n)-Fy(t-n)})),0<s.length))return{isSnap:u,dist:u?s[0]:n}}return null!=o&&o.length&&i&&(c=o.slice().sort((function(e,t){return _b(e,r)-_b(t,r)}))[0],_b(c,r)<=i)?{isSnap:!0,dist:n+function(e,t){t=Sb(t);var n=360*(r=Math.floor(e/360))+360-t,r=360*r+t;return Fy(e-n)<Fy(e-r)?n:r}(r,c)-r}:{isSnap:!1,dist:n}}(e,t,r,i+r)).isSnap,u=i+o.dist),e=(u=c?u:$p(i+r,a))-i;return[(n.prevSnapDeg=e)-s,e,u]}function fb(e,t){var n;return t.isRequest?"rotatable"===t.requestAble:!!(qp(n=t.inputEvent.target,Mb("rotation-control"))||e.props.rotateAroundControls&&qp(n,Mb("around-control"))||qp(n,Mb("control"))&&qp(n,Mb("rotatable")))||!!(t=e.props.rotationTarget)&&Ty(t,!0).some((function(e){return!!e&&(n===e||n.contains(e))}))}function db(e,t){return t=t,n=(e=pA(pA({},e),{classNames:gA([Mb("line","guideline",e.direction)],mA(e.classNames),!1).filter((function(e){return e})),size:e.size||"".concat(e.sizeValue,"px"),pos:e.pos||e.posValue.map((function(e){return"".concat($p(e,.1),"px")}))})).direction,r=e.classNames,i=e.size,o=e.pos,a=e.zoom,e=e.key,s=(n="horizontal"===n)?"Y":"X",t.createElement("div",{key:e,className:r.join(" "),style:((t={})[n?"width":"height"]="".concat(i),t.transform="translate(".concat(o[0],", ").concat(o[1],") translate").concat(s,"(-50%) scale").concat(s,"(").concat(a,")"),t)});var n,r,i,o,a,s}function pb(e,t,n,r,i,o,a,s){var u=e.props.zoom;return n.map((function(e,n){var c=e.type,l=(e=e.pos,[0,0]);return l[a]=r,l[a?0:1]=-i+e,db({key:"".concat(t,"TargetGuideline").concat(n),classNames:[Mb("target","bold",c)],posValue:l,sizeValue:o,zoom:u,direction:t},s)}))}function mb(e,t,n,r,i,o){var a=(e=e.props).zoom,s=e.isDisplayInnerSnapDigit,u="horizontal"===t?Bv:Iv,c=i[u.start],l=i[u.end];return n.filter((function(e){var t=e.hide;e=e.elementRect;return!t&&!(s&&e&&(t=e.rect)[u.start]<=c&&l<=t[u.end])})).map((function(e,n){var i=e.pos,s=e.size,u=e.element;e=e.className,i=[-r[0]+i[0],-r[1]+i[1]];return db({key:"".concat(t,"-default-guideline-").concat(n),classNames:u?[Mb("bold"),e]:[Mb("normal"),e],direction:t,posValue:i,sizeValue:s,zoom:a},o)}))}function gb(e,t,n,r,i,o,a,s){var u=void 0===(u=(e=e.props).snapDigit)?0:u,c=void 0===(c=e.isDisplaySnapDigit)||c,l=void 0===(l=e.snapDistFormat)?function(e,t){return e}:l,h=(e=e.zoom,"horizontal"===t?"X":"Y"),f="vertical"===t?"height":"width";i=Math.abs(i),c=c?parseFloat(i.toFixed(u)):0;return s.createElement("div",{key:"".concat(t,"-").concat(n,"-guideline-").concat(r),className:Mb("guideline-group",t),style:((u={left:"".concat(o[0],"px"),top:"".concat(o[1],"px")})[f]="".concat(i,"px"),u)},db({direction:t,classNames:[Mb(n),a],size:"100%",posValue:[0,0],sizeValue:i,zoom:e},s),s.createElement("div",{className:Mb("size-value","gap"),style:{transform:"translate".concat(h,"(-50%) scale(").concat(e,")")}},0<c?l(c,t):""))}function Ab(e){var t,n,r,i,o,a,s,u,c,l,h,f,d,p=e.state,m=p.containerClientRect,g=p.hasFixed,A=m.overflow,v=m.scrollHeight,b=m.scrollWidth,y=m.clientHeight,w=m.clientWidth,x=m.clientLeft,C=m.clientTop,k=void 0===(k=(d=e.props).snapGap)||k,E=d.verticalGuidelines,S=d.horizontalGuidelines,_=void 0===(_=d.snapThreshold)?5:_,O=void 0===(O=d.snapGridWidth)?0:O,T=void 0===(T=d.snapGridHeight)?0:T,D=void 0===(B=d.maxSnapElementGuidelineDistance)?1/0:B,B=d.isDisplayGridGuidelines,I=(d=Vb(ay(e.state))).top,M=d.left,j={top:I,left:M,bottom:N=d.bottom,right:d=d.right,center:(M+d)/2,middle:(I+N)/2},N=(I=(d=(M=e).state,(I=void 0===(I=M.props.elementGuidelines)?[]:I).length?(t=(d.elementRects||[]).filter((function(e){return!e.refresh})),n=I.map((function(e){return gp(e)&&"element"in e?pA(pA({},e),{element:Oy(e.element,!0)}):{element:Oy(e,!0)}})).filter((function(e){return e.element})),N=(I=Ig(t.map((function(e){return e.element})),n.map((function(e){return e.element})))).maintained,r=I.added,i=[],N.forEach((function(e){var n=(e=mA(e,2))[0];e=e[1];i[e]=t[n]})),function(e,t){var n,r,i,o,a,s,u,c,l;return t.length?(n=e.props.groupable,a=(e=e.state).containerClientRect,r=e.rootMatrix,i=e.is3d,e=e.offsetDelta,a=mA(function(e,t,n){return e=$b(e,[t.clientLeft,t.clientTop],n),[t.left+e[0],t.top+e[1]]}(r,a,o=i?4:3),2),s=a[0],u=a[1],c=n?0:e[0],l=n?0:e[1],t.map((function(e){var t=(i=e.element.getBoundingClientRect()).left-s-c,n=(a=i.top-u-l)+i.height,i=t+i.width,a=(t=mA(wy(r,[t,a],o),2))[0];t=t[1],n=(i=mA(wy(r,[i,n],o),2))[0],i=i[1];return pA(pA({},e),{rect:{left:a,right:n,top:t,bottom:i,center:(a+n)/2,middle:(t+i)/2}})}))):[]}(M,r.map((function(e){return n[e]}))).map((function(e,t){i[r[t]]=e})),d.elementRects=i,o=jv(M.props.elementSnapDirections),a=[],i.forEach((function(e){var t=e.element,n=void 0===(n=e.top)?o.top:n,r=void 0===(r=e.left)?o.left:r,i=void 0===(i=e.right)?o.right:i,s=void 0===(s=e.bottom)?o.bottom:s,u=void 0===(u=e.center)?o.center:u,c=void 0===(c=e.middle)?o.middle:c,l=e.className,h=e.rect,f=(i=(n=Nv({top:n,right:i,left:r,bottom:s,center:u,middle:c},h)).horizontal,r=n.vertical,n.horizontalNames),d=n.verticalNames,p=h.top,m=h.left,g=h.right-m,A=h.bottom-p,v=[g,A];r.forEach((function(n,r){a.push({type:"vertical",element:t,pos:[$p(n,.1),p],size:A,sizes:v,className:l,elementRect:e,elementDirection:Dv[d[r]]||d[r],direction:""})})),i.forEach((function(n,r){a.push({type:"horizontal",element:t,pos:[m,$p(n,.1)],size:g,sizes:v,className:l,elementRect:e,elementDirection:Dv[f[r]]||f[r],direction:""})}))})),a):(d.elementRects=[],[])),gA([],mA(I),!1));k&&N.push.apply(N,gA([],mA((s=j,u=_,d=(M=e.props).maxSnapElementGuidelineDistance,c=void 0===d?1/0:d,d=M.maxSnapElementGapDistance,l=void 0===d?1/0:d,h=e.state.elementRects,f=[],[["vertical",Bv,Iv],["horizontal",Iv,Bv]].forEach((function(e){var t=(e=mA(e,3))[0],n=e[1],r=e[2],i=s[n.start],o=s[n.end],a=s[n.center],d=s[r.start],p=s[r.end];function m(e){return(e=e.rect)[n.end]<i+u?i-e[n.end]:o-u<e[n.start]?e[n.start]-o:-1}var g=h.filter((function(e){var t=e.rect;return!(t[r.start]>p||t[r.end]<d)&&0<m(e)})).sort((function(e,t){return m(e)-m(t)})),A=[];g.forEach((function(e){g.forEach((function(t){var n,i,o,a;e!==t&&(o=e.rect,n=t.rect,i=o[r.start],o=o[r.end],a=n[r.start],n[r.end]<i||o<a||A.push([e,t]))}))})),A.forEach((function(e){var r=(e=mA(e,2))[0],h=(e=e[1],r.rect),d=e.rect,p=h[n.start],m=(h=h[n.end],d[n.start]),g=d[n.end],A=0,v=0,b=!1,y=!1,w=!1;if(h<=i&&o<=m){if(y=!0,Fy((v=h+(A=(m-h-(o-i))/2)+(o-i)/2)-a)>u)return}else if(h<m&&g<i+u){if(b=!0,Fy((v=g+(A=m-h))-i)>u)return}else{if(!(h<m&&o-u<p))return;if(w=!0,Fy((v=p-(A=m-h))-o)>u)return}!A||!vb(s,d,t,c)||l<A||f.push({type:t,pos:"vertical"===t?[v,0]:[0,v],element:e.element,size:0,className:e.className,isStart:b,isCenter:y,isEnd:w,gap:A,hide:!0,gapRects:[r,e],direction:"",elementDirection:""})}))})),f)),!1)),I=pA({},p.snapOffset||{left:0,top:0,bottom:0,right:0});return N.push.apply(N,gA([],mA(function(e,t,n,r,i,o,a,s){void 0===i&&(i=0),void 0===o&&(o=0);var u=[],c=a.left,l=a.top;if(t)for(var h=0;h<=r;h+=t)u.push({type:"horizontal",pos:[c,$p(h-o+l,.1)],className:Mb("grid-guideline"),size:n,hide:!s,direction:""});if(e)for(h=0;h<=n;h+=e)u.push({type:"vertical",pos:[$p(h-i+c,.1),l],className:Mb("grid-guideline"),size:r,hide:!s,direction:""});return u}(O,T,A?b:w,A?v:y,x,C,I,B)),!1)),g&&(k=m.left,_=m.top,I.left+=k,I.top+=_,I.right+=k,I.bottom+=_),N.push.apply(N,gA([],mA(yb(S||!1,E||!1,A?b:w,A?v:y,x,C,I)),!1)),N.filter((function(e){var t=e.element,n=e.elementRect;e=e.type;return!t||!n||(t=n.rect,vb(j,t,e,D))}))}function vb(e,t,n,r){return"horizontal"===n?Fy(e.right-t.left)<=r||Fy(e.left-t.right)<=r||e.left<=t.right&&t.left<=e.right:"vertical"!==n||Fy(e.bottom-t.top)<=r||Fy(e.top-t.bottom)<=r||e.top<=t.bottom&&t.top<=e.bottom}function bb(e,t){return e?e.map((function(e){var n=(e=gp(e)?e:{pos:e}).pos;return bp(n)?e:pA(pA({},e),{pos:Np(n,t)})})):[]}function yb(e,t,n,r,i,o,a){void 0===i&&(i=0),void 0===o&&(o=0);var s=[],u=(a=void 0===a?{left:0,top:0,right:0,bottom:0}:a).left,c=a.top,l=a.bottom,h=n+a.right-u,f=r+l-c;return bb(e,f).forEach((function(e){s.push({type:"horizontal",pos:[u,$p(e.pos-o+c,.1)],size:h,className:e.className,direction:""})})),bb(t,h).forEach((function(e){s.push({type:"vertical",pos:[$p(e.pos-i+u,.1),c],size:f,className:e.className,direction:""})})),s}function wb(e){var t,n,r,i=e.state,o=i.container,a=e.props.snapContainer||o;if(i.snapContainer!==a||!i.guidelines||!i.guidelines.length)return t=i.containerClientRect,n={left:0,top:0,bottom:0,right:0},o!==a&&(o=Oy(a,!0))&&(r=Dy(i,[(o=ny(o)).left-t.left,o.top-t.top]),o=Dy(i,[o.right-t.right,o.bottom-t.bottom]),n.left=$p(r[0],1e-5),n.top=$p(r[1],1e-5),n.right=$p(o[0],1e-5),n.bottom=$p(o[1],1e-5)),i.snapContainer=a,i.snapOffset=n,i.guidelines=Ab(e),i.enableSnap=!0}function xb(e,t,n,r,i,o){return oy(e=Qb(e,t,n,o?4:3),cg(i,GA(e,r)))}function Cb(e){return e?e/Fy(e):0}function kb(e,t,n,r,i,o){var a,s,u,c,l=o.fixedDirection;a=n,s=l,c=[],r?(1!==Fy(s[0])||1!==Fy(s[1])?c.push([s,[-1,-1]],[s,[-1,1]],[s,[1,-1]],[s,[1,1]]):c.push([s,[a[0],-a[1]]],[s,[-a[0],a[1]]]),c.push([s,a])):a[0]&&a[1]||!a[0]&&!a[1]?(u=a[0]?a:[1,1],[1,-1].forEach((function(e){[1,-1].forEach((function(t){t=[e*u[0],t*u[1]],s[0]===t[0]&&s[1]===t[1]||c.push([s,t])}))}))):a[0]?(1===Fy(s[0])?[1]:[1,-1]).forEach((function(e){c.push([[s[0],-1],[e*a[0],-1]],[[s[0],0],[e*a[0],0]],[[s[0],1],[e*a[0],1]])})):a[1]&&(1===Fy(s[1])?[1]:[1,-1]).forEach((function(e){c.push([[-1,s[1]],[-1,e*a[1]]],[[0,s[1]],[0,e*a[1]]],[[1,s[1]],[1,e*a[1]]])})),l=c,n=Yv(e,t,n,r),l=$v(t=gA(gA([],mA(function(e,t,n,r,i,o){return n.map((function(n){var a,s,u,c,l,h,f,d,p,m=(n=mA(n,2))[0],g=(n=n[1],GA(t,m)),A=GA(t,n),v=r?(k=i,x=function(e,t,n){var r,i,o=(e=Ev(e)).left,a=e.top,s=e.right,u=(e=e.bottom,(c=mA(n,2))[0]),c=c[1],l=(t=mA(cg(n,t),2))[0],h=(t=t[1],Fy(l)<TA&&(l=0),0<(t=Fy(t)<TA?0:t)),f=0<l,d={isBound:!1,offset:0,pos:0},p={isBound:!1,offset:0,pos:0};return 0===l&&0===t||(0===l?h?e<c&&(p.pos=e,p.offset=c-e):c<a&&(p.pos=a,p.offset=c-a):0===t?f?s<u&&(d.pos=s,d.offset=u-s):u<o&&(d.pos=o,d.offset=u-o):(t=n[1]-(n=t/l)*u,r=l=0,i=!1,f&&s<=u?(l=n*s+t,r=s,i=!0):!f&&u<=o&&(l=n*o+t,r=o,i=!0),(i=(!i||!(l<a||e<l))&&i)||(h&&e<=c?(r=((l=e)-t)/n,i=!0):!h&&c<=a&&(r=((l=a)-t)/n,i=!0)),i&&(d.isBound=!0,d.pos=r,d.offset=u-r,p.isBound=!0,p.pos=l,p.offset=c-l))),{vertical:d,horizontal:p}}(b=e,C=g,y=A),v=x.horizontal,x=x.vertical,k=k?{horizontal:{isSnap:!1},vertical:{isSnap:!1}}:function(e,t,n){var r,i,o,a,s,u=(c=mA(n,2))[0],c=c[1],l=(p=mA(t,2))[0],h=p[1],f=(t=(p=mA(cg(n,t),2))[0],0<(p=p[1])),d=0<t,p=(t=Ey(t),Ey(p)),m={isSnap:!1,offset:0,pos:0},g={isSnap:!1,offset:0,pos:0};return 0===t&&0===p||(a=(e=Fv(e,t?[u]:[],p?[c]:[])).vertical,e=e.horizontal,a.posInfos.filter((function(e){return e=e.pos,d?l<=e:e<=l})),e.posInfos.filter((function(e){return e=e.pos,f?h<=e:e<=h})),a.isSnap=0<a.posInfos.length,e.isSnap=0<e.posInfos.length,r=(a=Uv(a)).isSnap,a=a.guideline,i=(e=Uv(e)).isSnap,e=e.guideline,o=i?e.pos[1]:0,a=r?a.pos[0]:0,0===t?i&&(g.isSnap=!0,g.pos=e.pos[1],g.offset=c-g.pos):0===p?r&&(m.isSnap=!0,m.pos=a,m.offset=u-a):(n=n[1]-(e=p/t)*u,t=p=0,s=!1,r?(p=e*(t=a)+n,s=!0):i&&(t=((p=o)-n)/e,s=!0),s&&(m.isSnap=!0,m.pos=t,m.offset=u-t,g.isSnap=!0,g.pos=p,g.offset=c-p))),{vertical:m,horizontal:g}}(b,C,y),b=k.horizontal,C=k.vertical,y=rb(v,b),k=rb(x,C),w=Fy(y),E=Fy(k),{horizontal:{isBound:v.isBound,isSnap:b.isSnap,offset:y,dist:w},vertical:{isBound:x.isBound,isSnap:C.isSnap,offset:k,dist:E}}):tb(e,i,{vertical:[A[0]],horizontal:[A[1]]}),b=v.horizontal,y=b.offset,w=b.isBound,x=b.isSnap,C=v.vertical,k=C.offset,E=C.isBound,S=C.isSnap,_=cg(n,m);return k||y?(s=v,u=r,a=Up(a=g,d=A)/Math.PI*180,p=(d=s.vertical).isBound,c=d.isSnap,d=d.dist,l=(s=s.horizontal).isBound,h=s.isSnap,f=(a%=180)<3||177<a,a=87<a&&a<93,(s=s.dist<d&&(p||c&&!a&&(!u||!f))?"vertical":!l&&(!h||f||u&&a)?"":"horizontal")?(d="vertical"==s,p=[0,0],p=(p=r||1!==Fy(n[0])||1!==Fy(n[1])||m[0]===n[0]||m[1]===n[1]?Jv(g,A,-(d?k:y),d,o).offset:VA({datas:o,distX:-k,distY:-y})).map((function(e,t){return e*(_[t]?2/_[t]:0)})),{sign:_,isBound:d?E:w,isSnap:d?S:x,offset:p}):{sign:_,isBound:!1,isSnap:!1,offset:[0,0]}):{isBound:E||w,isSnap:S||x,sign:_,offset:[0,0]}}))}(e,t,l,r,i,o)),!1),mA(Kv(e,n,o)),!1),0),r=$v(t,1);return{width:{isBound:l.isBound,offset:l.offset[0]},height:{isBound:r.isBound,offset:r.offset[1]}}}function Eb(e,t,n,r,i,o,a,s){for(var u,c,l,h,f,d,p,m,g,A,v,b,y,w,x,C,k,E,S,_=ay(e.state),O=e.props.keepRatio,T=0,D=0,B=0;B<2;++B){var I=(M=kb(e,t(T,D),i,O,a,s)).width,M=M.height,j=I.isBound,N=M.isBound,F=I.offset,R=M.offset;if(1===B&&(j||(F=0),N||(R=0)),0===B&&a&&!j&&!N)return[0,0];O&&(I=Fy(F)*(n?1/n:1),M=Fy(R)*(r?1/r:1),(j&&N?I<M:N||!j&&I<M)?F=n*R/r:R=r*F/n),T+=F,D+=R}return!O&&i[0]&&i[1]&&(p=e,m=_,g=o,A=s,x=[-(_=i)[0],-_[1]],C=(o=p.state).width,k=o.height,o=p.props.bounds,S=E=1/0,o&&(p=[[_[0],-_[1]],[-_[0],_[1]]],_=o.left,v=void 0===_?-1/0:_,_=o.top,b=void 0===_?-1/0:_,_=o.right,y=void 0===_?1/0:_,_=o.bottom,w=void 0===_?1/0:_,p.forEach((function(e){var t,n,r=e[0]!==x[0],i=e[1]!==x[1],o=(e=GA(m,e),360*Up(g,e)/Math.PI);i&&(t=e.slice(),(Fy(o-360)<2||Fy(o-180)<2)&&(t[1]=g[1]),n=mA((i=Jv(g,t,(g[1]<e[1]?w:b)-e[1],!1,A)).offset,2)[1],i=i.isOutside,isNaN(n)||(S=k+(i?1:-1)*Fy(n))),r&&(t=e.slice(),(Fy(o-90)<2||Fy(o-270)<2)&&(t[0]=g[0]),n=mA((i=Jv(g,t,(g[0]<e[0]?y:v)-e[0],!0,A)).offset,1)[0],r=i.isOutside,isNaN(n)||(E=C+(r?1:-1)*Fy(n)))}))),_=(o={maxWidth:E,maxHeight:S}).maxWidth,p=o.maxHeight,T+=F=(f=mA((o=e,u=t(T,D).map((function(e){return e.map((function(e){return $p(e,OA)}))})),c=n+T,l=r+D,_=_,p=p,f=a,d=s,u=GA(u,h=i),f=(o=tb(o,f,{vertical:[u[0]],horizontal:[u[1]]})).horizontal.offset,$p(u=o.vertical.offset,OA)||$p(f,OA)?(d=(o=mA(VA({datas:d,distX:-u,distY:-f}),2))[0],u=o[1],[Math.min(_||1/0,c+h[0]*d)-c,Math.min(p||1/0,l+h[1]*u)-l]):[0,0]),2))[0],D+=R=f[1]),[T,D]}function Sb(e){return e<0&&(e=e%360+360),e%360}function _b(e,t){return e=Sb(e),t=Sb(t),e=Sb(e-t),Math.min(e,360-e)}function Ob(e){var t=[];return e.forEach((function(e){e.guidelineInfos.forEach((function(n){var r=n.guideline;Bp(t,(function(e){return e.guideline===r}))||(r.direction="",t.push({guideline:r,posInfo:e}))}))})),t.map((function(e){var t=e.guideline;e=e.posInfo;return pA(pA({},t),{direction:e.direction})}))}function Tb(e,t,n,r,i,o){t=(o=kv(Ev(e,o),t,n)).vertical,n=o.horizontal;var a,s,u,c,l,h,f,d,p,m,g,A,v={left:!1,top:!1,right:!1,bottom:!1};o=(e=(t.forEach((function(e){e.isBound&&("start"===e.direction&&(v.left=!0),"end"===e.direction&&(v.right=!0),r.push({type:"bounds",pos:e.pos}))})),n.forEach((function(e){e.isBound&&("start"===e.direction&&(v.top=!0),"end"===e.direction&&(v.bottom=!0),i.push({type:"bounds",pos:e.pos}))})),t=(o=e).props.innerBounds,A={left:!1,top:!1,right:!1,bottom:!1},t?(n=[(n=o.getRect()).pos1,n.pos2,n.pos3,n.pos4],a=GA(n,[0,0]),s=t.left,u=t.top,c=t.width,l=t.height,h=[[s,u],[s,u+l]],f=[[s,u],[s+c,u]],d=[[s+c,u],[s+c,u+l]],t=Yv(o,n,[0,0],!(p=[[s,u+l],[s+c,u+l]])),m=[],g=[],t.forEach((function(e){var t=e.line,n=(e=e.lineConstants,(r=Qv(a,t)).horizontal),r=r.vertical,i=Wv(t,e,f,r,1,!0),o=(r=Wv(t,e,p,r,1,!0),Wv(t,e,h,n,1,!0));t=Wv(t,e,d,n,1,!0);i.isBound&&!A.top&&(m.push(u),A.top=!0),r.isBound&&!A.bottom&&(m.push(u+l),A.bottom=!0),o.isBound&&!A.left&&(g.push(s),A.left=!0),t.isBound&&!A.right&&(g.push(s+c),A.right=!0)})),{boundMap:A,horizontal:m,vertical:g}):{boundMap:A,vertical:[],horizontal:[]})).boundMap,n=e.vertical,t=e.horizontal;return n.forEach((function(e){0<=Dp(r,(function(t){var n=t.type;t=t.pos;return"bounds"===n&&t===e}))||r.push({type:"bounds",pos:e})})),t.forEach((function(e){0<=Dp(i,(function(t){var n=t.type;t=t.pos;return"bounds"===n&&t===e}))||i.push({type:"bounds",pos:e})})),{boundMap:v,innerBoundMap:o}}Yo={name:"rotatable",canPinch:!0,props:["rotatable","rotationPosition","throttleRotate","renderDirections","rotationTarget","rotateAroundControls","edge","resolveAblesWithRotatable","displayAroundControls"],events:["rotateStart","beforeRotate","rotate","rotateEnd","rotateGroupStart","beforeRotateGroup","rotateGroup","rotateGroupEnd"],css:[".rotation {\nposition: absolute;\nheight: 40px;\nwidth: 1px;\ntransform-origin: 50% 100%;\nheight: calc(40px * var(--zoom));\ntop: auto;\nleft: 0;\nbottom: 100%;\nwill-change: transform;\n}\n.rotation .rotation-line {\ndisplay: block;\nwidth: 100%;\nheight: 100%;\ntransform-origin: 50% 50%;\n}\n.rotation .rotation-control {\nborder-color: #4af;\nborder-color: var(--moveable-color);\nbackground:#fff;\ncursor: alias;\n}\n:global .view-rotation-dragging, .rotatable.direction.control {\ncursor: alias;\n}\n.rotatable.direction.control.move {\ncursor: move;\n}\n"],viewClassName:function(e){return e.isDragging("rotatable")?Mb("view-rotation-dragging"):""},render:function(e,t){var n,r,i=(h=Xb(e.props,"rotatable")).rotatable,o=h.rotationPosition,a=h.zoom,s=h.renderDirections,u=h.rotateAroundControls,c=h.resolveAblesWithRotatable,l=(h=e.getState()).renderPoses,h=h.direction;return i?(i=function e(t,n,r){var i,o,a,s=(n=mA(n,4))[0],u=n[1],c=n[2],l=n[3];return"none"===t?[]:Ap(t)?t.map((function(t){return e(t,[s,u,c,l],r)[0]})):(t=(n=mA((t||"top").split("-"),2))[0],n=n[1],o=[s,u],"left"===t?o=[c,s]:"right"===t?o=[u,l]:"bottom"===t&&(o=[l,c]),a=[(o[0][0]+o[1][0])/2,(o[0][1]+o[1][1])/2],i=Zb(o,r),n&&(t="bottom"===t||"left"===t,a=o[(o="top"===n||"left"===n)&&!t||!o&&t?0:1]),[[a,i]])}(o,l,h),n=[],i.forEach((function(e,r){var i=(e=mA(e,2))[0];e=e[1];n.push(t.createElement("div",{key:"rotation".concat(r),className:Mb("rotation"),style:{transform:"translate(-50%) translate(".concat(i[0],"px, ").concat(i[1],"px) rotate(").concat(e,"rad)")}},t.createElement("div",{className:Mb("line rotation-line"),style:{transform:"scaleX(".concat(a,")")}}),t.createElement("div",{className:Mb("control rotation-control"),style:{transform:"translate(0.5px) scale(".concat(a,")")}})))})),s&&(o=jp(c||{}),r={},o.forEach((function(e){c[e].forEach((function(t){r[t]=e}))})),l=[],Ap(s)&&(l=s.map((function(e){var t=r[e];return{data:t?{resolve:t}:{},classNames:t?["move"]:[],dir:e}}))),n.push.apply(n,gA([],mA(Av(e,"rotatable",l,t)),!1))),u&&n.push.apply(n,gA([],mA(Cv(e,t)),!1)),n):null},dragControlCondition:fb,dragControlStart:function(e,t){var n,r,i,o,a,s,u,c,l,h=t.datas,f=t.clientX,d=t.clientY,p=t.parentRotate,m=t.parentFlag,g=t.isPinch,A=t.isRequest,v=e.state,b=v.target,y=v.left,w=v.top,x=v.direction,C=v.beforeDirection,k=v.targetTransform,E=v.moveableClientRect,S=v.offsetMatrix,_=v.targetMatrix,O=v.allMatrix,T=v.width,D=v.height;return!(!A&&!b)&&(b=e.getRect(),h.rect=b,h.transform=k,h.left=y,h.top=w,o=function(t){var n=ab(e.state,t);h.fixedDirection=n.fixedDirection,h.fixedOffset=n.fixedOffset,h.fixedPosition=n.fixedPosition,l&&l.setFixedPosition(t)},k=function(t){r=t,a=(n=e.state).allMatrix,i=n.is3d,o=n.width,n=n.height;var n,r,i,o,a={fixedPosition:$b(a,[o/2*(1+r[0]),n/2*(1+r[1])],i?4:3),fixedDirection:r,fixedOffset:[0,0]};h.fixedDirection=a.fixedDirection,h.fixedOffset=a.fixedOffset,h.fixedPosition=a.fixedPosition,l&&l.setFixedDirection(t)},n=f,r=d,A||g||m?(h.beforeInfo={origin:b.beforeOrigin,prevDeg:y=p||0,defaultDeg:y,prevSnapDeg:0,startDist:0},h.afterInfo=pA(pA({},h.beforeInfo),{origin:b.origin}),h.absoluteInfo=pA(pA({},h.beforeInfo),{origin:b.origin,startValue:y})):((f=null==(w=t.inputEvent)?void 0:w.target)&&(d=f.getAttribute("data-direction")||"",(A=IA[d])&&(h.isControl=!0,h.isAroundControl=qp(f,Mb("around-control")),h.controlDirection=A,(g=f.getAttribute("data-resolve"))&&(h.resolveAble=g),a=v.rootMatrix,m=v.renderPoses,p=E,s=16===a.length?4:3,m=m.map((function(e){return $b(a,e,s)})),u=p.left,c=p.top,n=(y=mA(GA(m.map((function(e){return[e[0]+u,e[1]+c]})),A),2))[0],r=y[1])),h.beforeInfo={origin:b.beforeOrigin},h.afterInfo={origin:b.origin},h.absoluteInfo={origin:b.origin,startValue:b.rotation},i=o,o=function(t){var o=v.is3d?4:3,a=(s=mA(ug(rg(_,o),t),2))[0],s=s[1];a=hg(S,ig([a,s],o)),s=hg(O,ig([t[0],t[1]],o)),i(t),o=v.posDelta;h.beforeInfo.origin=cg(a,o),h.afterInfo.origin=cg(s,o),h.absoluteInfo.origin=cg(s,o),ub(e,h.beforeInfo,n,r,E),ub(e,h.afterInfo,n,r,E),ub(e,h.absoluteInfo,n,r,E)},k=function(e){e=GA([[0,0],[T,0],[0,D],[T,D]],e),o(e)}),h.startClientX=n,h.startClientY=r,h.direction=x,h.beforeDirection=C,h.startValue=0,h.datas={},YA(e,t,"rotate"),l=w=!1,(l=h.isControl&&h.resolveAble&&"resizable"===h.resolveAble?sb.dragControlStart(e,pA(pA({},new RA("resizable").dragStart([0,0],t)),{parentPosition:h.controlPosition,parentFixedPosition:h.fixedPosition})):l)||(w=ib.dragStart(e,(new RA).dragStart([0,0],t))),o(function(e){var t=(n=e.props).groupable,n=n.svgOrigin,r=(e=e.getState()).offsetWidth,i=e.offsetHeight,o=e.svg;e=e.transformOrigin;return!t&&o&&n?My(n,r,i):e}(e)),d=hy(e,t,pA(pA({set:function(e){h.startValue=e*Math.PI/180},setFixedDirection:k,setFixedPosition:o},KA(e,t)),{dragStart:w,resizeStart:l})),f=py(e,"onRotateStart",d),h.isRotate=!1!==f,v.snapRenderInfo={request:t.isRequest},!!h.isRotate&&d)},dragControl:function(e,t){var n=t.datas,r=t.clientDistX,i=t.clientDistY,o=t.parentRotate,a=t.parentFlag,s=t.isPinch,u=t.groupDelta,c=t.resolveMatrix,l=n.beforeDirection,h=n.beforeInfo,f=n.afterInfo,d=n.absoluteInfo,p=n.isRotate,m=n.startValue,g=n.rect,A=n.startClientX,v=n.startClientY;if(p){zA(e,t,"rotate");p=l*PA(t.datas.beforeTransform,[50,50],100,100).direction;var b,y,w,x=e.props.parentMoveable,C=180/Math.PI*m,k=(m=d.startValue,!1);A=A+r,r=v+i;if(!a&&"parentDist"in t?(v=t.parentDist,w=y=b=v):s||a?(b=cb(o,l,h),y=cb(o,p,f),w=cb(o,p,d)):(b=lb(A,r,l,h),y=lb(A,r,p,f),w=lb(A,r,p,d),k=!0),py(e,"onBeforeRotate",hy(e,t,{beforeRotation:C+b,rotation:C+y,absoluteRotation:m+w,setRotation:function(e){w=b=y=e-C}},!0)),v=(i=mA(hb(e,g,h,b,C,k),3))[0],b=i[1],a=i[2],l=(o=mA(hb(e,g,f,y,C,k),3))[0],y=o[1],p=o[2],i=(h=mA(hb(e,g,d,w,m,k),3))[0],w=h[1],f=h[2],i||l||v||x||c)return o=HA(n,"rotate(".concat(p,"deg)"),"rotate(".concat(y,"deg)")),c&&(n.fixedPosition=iv(e,n.targetAllTransform,n.fixedDirection,n.fixedOffset,n)),g=y,k=(m=n).fixedDirection,h=m.fixedPosition,x=m.fixedOffset,u=cg(ug(u||[0,0],c=ov(e,"rotate(".concat(g,"deg)"),k,h,x,m)),n.prevInverseDist||[0,0]),n.prevInverseDist=c,n.requestValue=null,k=g=rv(e,o,u,s,t),h=Hp([A,r],d.startAbsoluteOrigin)-d.startDist,x=void 0,"resizable"===n.resolveAble&&(m=sb.dragControl(e,pA(pA({},FA(t,e.state,[t.deltaX,t.deltaY],!!s,!1,"resizable")),{resolveMatrix:!0,parentDistance:h})))&&(k=ly(k,x=m,t)),py(e,"onRotate",c=hy(e,t,pA(pA({delta:l,dist:y,rotate:p,rotation:p,beforeDist:b,beforeDelta:v,beforeRotate:a,beforeRotation:a,absoluteDist:w,absoluteDelta:i,absoluteRotate:f,absoluteRotation:f,isPinch:!!s,resize:x},g),k))),c}},dragControlEnd:function(e,t){var n=t.datas;if(n.isRotate)return n.isRotate=!1,py(e,"onRotateEnd",n=fy(e,t,{})),n},dragGroupControlCondition:fb,dragGroupControlStart:function(e,t){var n,r=t.datas,i=(n=e.state).left,o=n.top,a=n.beforeOrigin;return!!(n=this.dragControlStart(e,t))&&(n.set(r.beforeDirection*e.rotation),t=mv(e,this,"dragControlStart",t,(function(e,t){var n=(e=e.state).left,r=e.top;e=e.beforeOrigin,n=ug(cg([n,r],[i,o]),cg(e,a));return t.datas.startGroupClient=n,t.datas.groupClient=n,pA(pA({},t),{parentRotate:0})})),e=py(e,"onRotateGroupStart",pA(pA({},n),{targets:e.props.targets,events:t})),r.isRotate=!1!==e,!!r.isRotate&&n)},dragGroupControl:function(e,t){var n=t.datas;if(n.isRotate){dy(e,"onBeforeRotate",(function(n){py(e,"onBeforeRotateGroup",hy(e,t,pA(pA({},n),{targets:e.props.targets}),!0))}));var r,i,o,a=this.dragControl(e,t);if(a)return r=n.beforeDirection,i=a.beforeDist,o=i/180*Math.PI,n=mv(e,this,"dragControl",t,(function(e,t){var n=t.datas.startGroupClient,a=(s=mA(t.datas.groupClient,2))[0],s=s[1],u=(n=mA(gg(n,o*r),2))[0];a=[u-a,(n=n[1])-s];return t.datas.groupClient=[u,n],pA(pA({},t),{parentRotate:i,groupDelta:a})})),e.rotation=r*a.beforeRotation,n=pA({targets:e.props.targets,events:n,set:function(t){e.rotation=t},setGroupRotation:function(t){e.rotation=t}},a),py(e,"onRotateGroup",n),n}},dragGroupControlEnd:function(e,t){var n,r=t.isDrag;if(t.datas.isRotate)return this.dragControlEnd(e,t),n=mv(e,this,"dragControlEnd",t),py(e,"onRotateGroupEnd",fy(e,t,{targets:e.props.targets,events:n})),r},request:function(e){var t={},n=0,r=e.getRotation();return{isControl:!0,requestStart:function(){return{datas:t}},request:function(e){return"deltaRotate"in e?n+=e.deltaRotate:"rotate"in e&&(n=e.rotate-r),{datas:t,parentDist:n}},requestEnd:function(){return{datas:t,isDrag:!0}}}}};var Db=_y("",["resizable","scalable"]),Bb="snapRotationThreshold",Ib="snapRotationDegrees";Ta={name:"snappable",dragRelation:"strong",props:["snappable","snapContainer","snapDirections","elementSnapDirections","snapGap","snapGridWidth","snapGridHeight","isDisplaySnapDigit","isDisplayInnerSnapDigit","isDisplayGridGuidelines","snapDigit","snapThreshold","snapRenderThreshold",Bb,Ib,"horizontalGuidelines","verticalGuidelines","elementGuidelines","bounds","innerBounds","snapDistFormat","maxSnapElementGuidelineDistance","maxSnapElementGapDistance"],events:["snap","bound"],css:[":host {\n--bounds-color: #d66;\n}\n.guideline {\npointer-events: none;\nz-index: 2;\n}\n.guideline.bounds {\nbackground: #d66;\nbackground: var(--bounds-color);\n}\n.guideline-group {\nposition: absolute;\ntop: 0;\nleft: 0;\n}\n.guideline-group .size-value {\nposition: absolute;\ncolor: #f55;\nfont-size: 12px;\nfont-size: calc(12px * var(--zoom));\nfont-weight: bold;\n}\n.guideline-group.horizontal .size-value {\ntransform-origin: 50% 100%;\ntransform: translateX(-50%);\nleft: 50%;\nbottom: 5px;\nbottom: calc(2px + 3px * var(--zoom));\n}\n.guideline-group.vertical .size-value {\ntransform-origin: 0% 50%;\ntop: 50%;\ntransform: translateY(-50%);\nleft: 5px;\nleft: calc(2px + 3px * var(--zoom));\n}\n.guideline.gap {\nbackground: #f55;\n}\n.size-value.gap {\ncolor: #f55;\n}\n"],render:function(e,t){var n=(g=e.state).top,r=g.left,i=g.pos1,o=g.pos2,a=g.pos3,s=g.pos4,u=g.snapRenderInfo,c=void 0===(c=e.props.snapRenderThreshold)?1:c;if(!u||!u.render||!Mv(e,""))return jy(e,"boundMap",{left:!1,top:!1,right:!1,bottom:!1},(function(e){return JSON.stringify(e)})),jy(e,"innerBoundMap",{left:!1,top:!1,right:!1,bottom:!1},(function(e){return JSON.stringify(e)})),[];g.guidelines=Ab(e);var l,h,f,d,p,m,g=Math.min(i[0],o[0],a[0],s[0]),A=(i=Math.min(i[1],o[1],a[1],s[1]),o=u.externalPoses||[],a=ay(e.state),[]),v=[],b=[],y=[],w=(s=[],(O=Vb(a)).width),x=O.height,C=O.top,k=O.left,E=O.bottom,S={left:k,right:O=O.right,top:C,bottom:E,center:(k+O)/2,middle:(C+E)/2},_=0<o.length,O=(o=_?Vb(o):{},c=(a=(u.request||(u.direction&&s.push(function(e,t,n,r){void 0===r&&(r=1);var i,o=[];return e=Fv(e,(n=(n[0]&&n[1]?o=[n,[-n[0],n[1]],[n[0],-n[1]]]:n[0]||n[1]?e.props.keepRatio?o.push([-1,-1],[-1,1],[1,-1],[1,1],n):(o.push.apply(o,gA([],mA((i=[[-1,-1],[1,-1],[-1,-1],[1,1]],qA(n).map((function(e){return i[e]})))),!1)),1<o.length&&o.push([(o[0][0]+o[1][0])/2,(o[0][1]+o[1][1])/2])):[[-1,-1],[1,-1],[1,1],[-1,1]].forEach((function(e,t,n){t=n[t+1]||n[0],o.push(e),o.push([(e[0]+t[0])/2,(e[1]+t[1])/2])})),o.map((function(e){return GA(t,e)})))).map((function(e){return e[0]})),n.map((function(e){return e[1]})),o.map((function(e){return Pv(e[0])})),o.map((function(e){return Pv(e[1])})),r),n=Pv(o.map((function(e){return e[0]}))[e.vertical.index]),r=Pv(o.map((function(e){return e[1]}))[e.horizontal.index]),{vertical:pA(pA({},e.vertical),{direction:n}),horizontal:pA(pA({},e.horizontal),{direction:r})}}(e,a,u.direction,c)),u.snap&&(a=Vb(a),u.center&&(a.middle=(a.top+a.bottom)/2,a.center=(a.left+a.right)/2),s.push(Lv(e,a,c))),_&&(u.center&&(o.middle=(o.top+o.bottom)/2,o.center=(o.left+o.right)/2),s.push(Lv(e,o,c))),s.forEach((function(e){var t=e.vertical.posInfos;e=e.horizontal.posInfos;A.push.apply(A,gA([],mA(t.filter((function(e){return e.guidelineInfos.some((function(e){return!e.guideline.hide}))})).map((function(e){return{type:"snap",pos:e.pos}}))),!1)),v.push.apply(v,gA([],mA(e.filter((function(e){return e.guidelineInfos.some((function(e){return!e.guideline.hide}))})).map((function(e){return{type:"snap",pos:e.pos}}))),!1)),b.push.apply(b,gA([],mA(Ob(t)),!1)),y.push.apply(y,gA([],mA(Ob(e)),!1))}))),Tb(e,[k,O],[C,E],A,v))).boundMap,s=a.innerBoundMap,(k=(_&&Tb(e,[o.left,o.right],[o.top,o.bottom],A,v,u.externalBounds),gA(gA([],mA(b),!1),mA(y),!1))).filter((function(e){return e.element&&!e.gapRects})));C=k.filter((function(e){return e.gapRects})).sort((function(e,t){return e.gap-t.gap})),py(e,"onSnap",{guidelines:k.filter((function(e){return!e.element})),elements:O,gaps:C},!0),E=jy(e,"boundMap",c,(function(e){return JSON.stringify(e)}),{left:!1,top:!1,right:!1,bottom:!1}),a=jy(e,"innerBoundMap",s,(function(e){return JSON.stringify(e)}),{left:!1,top:!1,right:!1,bottom:!1});return c!==E&&s!==a||py(e,"onBound",{bounds:c,innerBounds:s},!0),gA(gA(gA(gA(gA(gA([],mA(function(e,t,n,r,i){var o=e.props.isDisplayInnerSnapDigit,a=[];return["vertical","horizontal"].forEach((function(s){var u,c,l,h,f,d,p,m=t.filter((function(e){return e.type===s})),g="vertical"===s?1:0,A=g?0:1,v=(m=(c=o,h="vertical"===(u=s)?1:0,d=r[(f=(l="vertical"===u?0:1)?Bv:Iv).start],p=r[f.end],vy(m,(function(e){return e.pos[l]})).map((function(e){var t=[],n=[];return e.forEach((function(e){var r,i,o,a=e.element,s=e.elementRect.rect;s[f.end]<d?t.push(e):p<s[f.start]?n.push(e):s[f.start]<=d&&p<=s[f.end]&&c&&(r=e.pos,i={element:a,rect:pA(pA({},s),((i={})[f.end]=s[f.start],i))},s={element:a,rect:pA(pA({},s),((a={})[f.start]=s[f.end],a))},a=[0,0],(o=[0,0])[l]=r[l],o[h]=r[h],a[l]=r[l],a[h]=r[h]+e.size,t.push({type:u,pos:o,size:0,elementRect:i,direction:"",elementDirection:"end"}),n.push({type:u,pos:a,size:0,elementRect:s,direction:"",elementDirection:"start"}))})),t.sort((function(e,t){return t.pos[h]-e.pos[h]})),n.sort((function(e,t){return e.pos[h]-t.pos[h]})),{total:e,start:t,end:n,inner:[]}}))),g?Iv:Bv),b=g?Bv:Iv,y=r[v.start],w=r[v.end];m.forEach((function(t){var o=t.total,u=t.start,c=t.end,l=(t=t.inner,n[A]+o[0].pos[A]-r[b.start]),h=r;u.forEach((function(t){var r,o=t.elementRect.rect,u=h[v.start]-o[v.end];0<u&&((r=[0,0])[g]=n[g]+h[v.start]-y-u,r[A]=l,a.push(gb(e,s,"dashed",a.length,u,r,t.className,i))),h=o})),h=r,c.forEach((function(t){var r,o=t.elementRect.rect,u=o[v.start]-h[v.end];0<u&&((r=[0,0])[g]=n[g]+h[v.end]-y,r[A]=l,a.push(gb(e,s,"dashed",a.length,u,r,t.className,i))),h=o})),t.forEach((function(t){var r=t.elementRect.rect,o=y-r[v.start],u=(r=r[v.end]-w,[0,0]),c=[0,0];u[g]=n[g]-o,u[A]=l,c[g]=n[g]+w-y,c[A]=l,a.push(gb(e,s,"dashed",a.length,o,u,t.className,i)),a.push(gb(e,s,"dashed",a.length,r,c,t.className,i))}))}))})),a}(e,O,[g,i],S,t)),!1),mA((l=e,h=C,f=[g,i],d=S,p=t,m=[],["horizontal","vertical"].forEach((function(e){var t=h.filter((function(t){return t.type===e})).slice(0,1),n="vertical"===e?0:1,r=n?0:1,i=n?Iv:Bv,o=n?Bv:Iv,a=d[i.start],s=d[i.end],u=d[o.start],c=d[o.end];t.forEach((function(e){var t=e.gap,h=(e=e.gapRects,Math.max.apply(Math,gA([u],mA(e.map((function(e){return e.rect[o.start]}))),!1))),d=Math.min.apply(Math,gA([c],mA(e.map((function(e){return e.rect[o.end]}))),!1)),g=(h+d)/2;h!==d&&g!=(u+c)/2&&e.forEach((function(e){var o=e.rect,c=(e=e.className,[f[0],f[1]]);if(o[i.end]<a)c[n]+=o[i.end]-a;else{if(!(s<o[i.start]))return;c[n]+=o[i.start]-a-t}c[r]+=g-u,m.push(gb(l,n?"vertical":"horizontal","gap",m.length,t,c,e,p))}))}))})),m)),!1),mA(mb(e,"horizontal",y,[r,n],S,t)),!1),mA(mb(e,"vertical",b,[r,n],S,t)),!1),mA(pb(e,"horizontal",v,g,n,w,0,t)),!1),mA(pb(e,"vertical",A,i,r,x,1,t)),!1)},dragStart:function(e,t){e.state.snapRenderInfo={request:t.isRequest,snap:!0,center:!0},wb(e)},drag:function(e){var t=e.state;wb(e)||(t.guidelines=Ab(e)),t.snapRenderInfo&&(t.snapRenderInfo.render=!0)},pinchStart:function(e){this.unset(e)},dragEnd:function(e){this.unset(e)},dragControlCondition:function(e,t){return!(!Db(e,t)&&!fb(e,t))||(!t.isRequest&&t.inputEvent?qp(t.inputEvent.target,Mb("snap-control")):void 0)},dragControlStart:function(e){e.state.snapRenderInfo=null,wb(e)},dragControl:function(e){this.drag(e)},dragControlEnd:function(e){this.unset(e)},dragGroupStart:function(e,t){this.dragStart(e,t)},dragGroup:function(e){this.drag(e)},dragGroupEnd:function(e){this.unset(e)},dragGroupControlStart:function(e){e.state.snapRenderInfo=null,wb(e)},dragGroupControl:function(e){this.drag(e)},dragGroupControlEnd:function(e){this.unset(e)},unset:function(e){(e=e.state).enableSnap=!1,e.guidelines=[],e.snapRenderInfo=null,e.elementRects=[]}};function Mb(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.map((function(t){return t.split(" ").map((function(t){return t?""+e+t:""})).join(" ")})).join(" ")}.apply(void 0,gA([EA],mA(e),!1))}function jb(e){e()}function Nb(e,t,n){return ag(t,xg(n,t),e,xg(n.map((function(e){return-e})),t))}function Fb(e){return e?e.split(" "):["0","0"]}function Rb(e){var t=fv(e)("transform");if(t&&"none"!==t)return t;if("transform"in e){var n=e.transform.baseVal;if(!n)return"";var r=n.length;if(!r)return"";for(var i=[],o=0;o<r;++o)!function(e){var t=n[e].matrix;i.push("matrix(".concat(["a","b","c","d","e","f"].map((function(e){return t[e]})).join(", "),")"))}(o);return i.join(" ")}return""}function Pb(e,t,n,r,i){for(var o,a,s,u,c=Jp(e)||Zp(e),l=!1,h=(u=!e||n?e:(a=null==(a=null==e?void 0:e.assignedSlot)?void 0:a.parentElement,s=e.parentElement,a?(l=!0,o=s,a):s),!1),f=e===t||u===t,d="relative",p=1,m=parseFloat(null==i?void 0:i("zoom"))||1,g=null==i?void 0:i("position");u&&u!==c;){t===u&&(f=!0);var A=fv(u),v=u.tagName.toLowerCase(),b=Rb(u),y=A("willChange"),w=parseFloat(A("zoom"))||1;d=A("position");if(r&&1!==w){p=w;break}if(!n&&r&&1!==m&&g&&"absolute"!==g||"svg"===v||"static"!==d||b&&"none"!==b||"transform"===y)break;if(w=null==(A=null==e?void 0:e.assignedSlot)?void 0:A.parentNode,v=u.parentNode,w&&(l=!0,o=v),(b=v)&&11===b.nodeType){h=!0,d=fv(u=b.host)("position");break}u=b,d="relative"}return{offsetZoom:p,hasSlot:l,parentSlotElement:o,isCustomElement:h,isStatic:"static"===d,isEnd:f||!u||u===c,offsetParent:u||c}}function Lb(e,t){var n=fv(e),r=(e=fv(Zp(e)))("position");return t||r&&"static"!==r?(t=parseInt(e("marginLeft"),10),r=parseInt(e("marginTop"),10),"absolute"===n("position")&&("auto"===n("top")&&"auto"===n("bottom")||(r=0),"auto"===n("left")&&"auto"===n("right")||(t=0)),[t,r]):[0,0]}function Ub(e){e.forEach((function(e){var t=e.matrix;t&&(e.matrix=og(t,3,4))}))}function zb(e,t){return void 0===t&&(t=9<e.length),"".concat(t?"matrix3d":"matrix","(").concat(lg(e,!t).join(","),")")}function Hb(e){var t=e.clientWidth,n=e.clientHeight;return e?{x:(e=(e=e.viewBox)&&e.baseVal||{x:0,y:0,width:0,height:0}).x,y:e.y,width:e.width||t,height:e.height||n,clientWidth:t,clientHeight:n}:{x:0,y:0,width:0,height:0,clientWidth:t,clientHeight:n}}function $b(e,t,n){return hg(e,ig(t,n),n)}function Qb(e,t,n,r){return[[0,0],[t,0],[0,n],[t,n]].map((function(t){return $b(e,t,r)}))}function Vb(e){var t=e.map((function(e){return e[0]})),n=(e=e.map((function(e){return e[1]})),Math.min.apply(Math,gA([],mA(t),!1))),r=Math.min.apply(Math,gA([],mA(e),!1));return{left:n,top:r,right:t=Math.max.apply(Math,gA([],mA(t),!1)),bottom:e=Math.max.apply(Math,gA([],mA(e),!1)),width:t-n,height:e-r}}function qb(e,t,n,r){return Vb(Qb(e,t,n,r))}function Gb(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function Wb(e,t){return Gb([t[0]-e[0],t[1]-e[1]])}function Kb(e,t,n,r){return void 0===n&&(n=1),void 0===r&&(r=Up(e,t)),t=Wb(e,t),{transform:"translateY(-50%) translate(".concat(e[0],"px, ").concat(e[1],"px) rotate(").concat(r,"rad) scaleY(").concat(n,")"),width:"".concat(t,"px")}}function Yb(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=n.length,o=n.reduce((function(e,t){return e+t[0]}),0)/i;i=n.reduce((function(e,t){return e+t[1]}),0)/i;return{transform:"translateZ(0px) translate(".concat(o,"px, ").concat(i,"px) rotate(").concat(e,"rad) scale(").concat(t,")")}}function Xb(e,t){return gp(t=e[t])?pA(pA({},e),t):e}function Jb(e){var t,n,r,i,o,a,s,u,c,l,h=e&&!mp(e.offsetWidth),f=0,d=0,p=0,m=0,g=0,A=0,v=0,b=0,y=0,w=0,x=0,C=0,k=1/0,E=1/0,S=1/0,_=1/0,O=0,T=0,D=!1;return e&&(m=h||"svg"===e.tagName.toLowerCase()?(h=fv(e),t=e.style,n="border-box"===h("boxSizing"),o=parseFloat(h("borderLeftWidth"))||0,i=parseFloat(h("borderRightWidth"))||0,a=parseFloat(h("borderTopWidth"))||0,s=parseFloat(h("borderBottomWidth"))||0,o=(r=(parseFloat(h("paddingLeft"))||0)+(parseFloat(h("paddingRight"))||0))+(o+i),a=(i=(parseFloat(h("paddingTop"))||0)+(parseFloat(h("paddingBottom"))||0))+(a+s),s=h("position"),c=u=0,"clientLeft"in e&&(l=null,(l="absolute"===s?Pb(e,Zp(e)).offsetParent:e.parentElement)&&(s=fv(l),u=parseFloat(s("width")),c=parseFloat(s("height")))),y=Math.max(r,Np(h("minWidth"),u)||0),w=Math.max(i,Np(h("minHeight"),c)||0),k=Np(h("maxWidth"),u),E=Np(h("maxHeight"),c),isNaN(k)&&(k=1/0),isNaN(E)&&(E=1/0),O=Np(t.width,0)||0,T=Np(t.height,0)||0,g=parseFloat(h("width"))||0,A=parseFloat(h("height"))||0,p=f=v=Fy(g-O)<1?Fp(y,O||g,k):g,m=d=b=Fy(A-T)<1?Fp(w,T||A,E):A,n?(S=k,_=E,x=y,C=w,v=f-o,b=d-a):(S=k+o,_=E+a,x=y+o,C=w+a,f=v+o,d=b+a),p=v+r,b+i):(D=!0,g=f=(l=e.getBBox()).width,A=d=l.height,p=v=f,b=d)),{svg:D,offsetWidth:f,offsetHeight:d,clientWidth:p,clientHeight:m,contentWidth:v,contentHeight:b,inlineCSSWidth:O,inlineCSSHeight:T,cssWidth:g,cssHeight:A,minWidth:y,minHeight:w,maxWidth:k,maxHeight:E,minOffsetWidth:x,minOffsetHeight:C,maxOffsetWidth:S,maxOffsetHeight:_}}function Zb(e,t){return Up(0<t?e[0]:e[1],0<t?e[1]:e[0])}function ey(e,t){var n=e===Zp(e)||e===Jp(e),r={clientLeft:e.clientLeft,clientTop:e.clientTop,clientWidth:e.clientWidth,clientHeight:e.clientHeight,scrollWidth:e.scrollWidth,scrollHeight:e.scrollHeight,overflow:!1};return n&&(r.clientHeight=Math.max(t.height,r.clientHeight),r.scrollHeight=Math.max(t.height,r.scrollHeight)),r.overflow="visible"!==fv(e)("overflow"),pA(pA({},t),r)}function ty(e,t,n,r){var i=e.left,o=e.right,a=e.top,s=(e=e.bottom,t.top);t={left:(t=t.left)+i,top:s+a,right:t+o,bottom:s+e,width:o-i,height:e-a};return n&&r?ey(n,t):t}function ny(e,t){var n=0,r=0,i=0,o=0,a=(e&&(n=(a=e.getBoundingClientRect()).left,r=a.top,i=a.width,o=a.height),{left:n,top:r,width:i,height:o,right:n+i,bottom:r+o});return e&&t?ey(e,a):a}function ry(e,t,n,r){return e||(t?[0,0]:iy(n.target,r))}function iy(e,t){if(e){var n=e.getAttribute("data-rotation")||"";e=e.getAttribute("data-direction");if(t.deg=n,e)return t=[0,0],-1<e.indexOf("w")&&(t[0]=-1),-1<e.indexOf("e")&&(t[0]=1),-1<e.indexOf("n")&&(t[1]=-1),-1<e.indexOf("s")&&(t[1]=1),t}}function oy(e,t){return[ug(t,e[0]),ug(t,e[1]),ug(t,e[2]),ug(t,e[3])]}function ay(e){var t=e.left,n=e.top;return oy([e.pos1,e.pos2,e.pos3,e.pos4],[t,n])}function sy(e,t){e[t?"controlAbles":"targetAbles"].forEach((function(t){t.unset&&t.unset(e)}))}function uy(e,t){var n=t?"controlGesto":"targetGesto",r=e[n];!1===(null==r?void 0:r.isIdle())&&sy(e,t),null!=r&&r.unset(),e[n]=null}function cy(e,t){return t&&((t=ZA(t)).nextStyle=pA(pA({},t.nextStyle),e)),{style:e,cssText:jp(e).map((function(t){return"".concat(Op(t,"-"),": ").concat(e[t],";")})).join("")}}function ly(e,t,n){var r=t.afterTransform||t.transform;return pA(pA({},cy(pA(pA(pA({},e.style),t.style),{transform:r}),n)),{afterTransform:r,transform:e.transform})}function hy(e,t,n,r){var i=t.datas;i.datas||(i.datas={}),n=pA(pA({},n),{target:e.state.target,clientX:t.clientX,clientY:t.clientY,inputEvent:t.inputEvent,currentTarget:e,moveable:e,datas:i.datas,isRequest:t.isRequest,isRequestChild:t.isRequestChild,isFirstDrag:!!t.isFirstDrag,isTrusted:!1!==t.isTrusted,stopAble:function(){i.isEventStart=!1},stopDrag:function(){var e;null!=(e=t.stop)&&e.call(t)}});return i.isStartEvent?r||(i.lastEvent=n):i.isStartEvent=!0,n}function fy(e,t,n){var r=t.datas,i=("isDrag"in n?n:t).isDrag;return r.datas||(r.datas={}),pA(pA({isDrag:i},n),{moveable:e,target:e.state.target,clientX:t.clientX,clientY:t.clientY,inputEvent:t.inputEvent,currentTarget:e,lastEvent:r.lastEvent,isDouble:t.isDouble,datas:r.datas,isFirstDrag:!!t.isFirstDrag})}function dy(e,t,n){e._emitter.on(t,n)}function py(e,t,n,r,i){return e.triggerEvent(t,n,r,i)}function my(e,t){return em(e).getComputedStyle(e,t)}function gy(e,t,n){var r={},i={};return e.filter((function(e){var o=e.name;if(r[o]||!t.some((function(t){return e[t]})))return!1;if(!n&&e.ableGroup){if(i[e.ableGroup])return!1;i[e.ableGroup]=!0}return r[o]=!0}))}function Ay(e,t){return e===t||null==e&&null==t}function vy(e,t){var n=[],r=[];return e.forEach((function(i,o){o=t(i,o,e);var a=r.indexOf(o),s=n[a]||[];-1===a&&(r.push(o),n.push(s)),s.push(i)})),n}function by(e){return e.reduce((function(e,t){return e.concat(t)}),[])}function yy(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.sort((function(e,t){return Fy(t)-Fy(e)})),e[0]}function wy(e,t,n){return hg(ng(e,n),ig(t,n),n)}function xy(e,t){var n=e.is3d;e=mA(wy(e.rootMatrix,[t.distX,t.distY],n?4:3),2);return t.distX=e[0],t.distY=e[1],t}function Cy(e,t,n,r){var i,o;return n[0]||n[1]?(i=$b(e,[Cb(n[0]),0],r),o=$b(e,[0,Cb(n[1])],r),ug(t,$b(e,[n[0]/Gb(i),n[1]/Gb(o)],r))):t}function ky(e,t,n){return n?"".concat(e/t*100,"%"):"".concat(e,"px")}function Ey(e){return Fy(e)<=TA?0:e}function Sy(e){return function(t){if(!t.isDragging(e))return"";n=e,i=(t=t).targetGesto,t=t.controlGesto;var n,r,i=((r=!(r=null!=i&&i.isFlag()?i.getEventData()[n]:r)&&null!=t&&t.isFlag()?t.getEventData()[n]:r)||{}).deg;return i?Mb("view-control-rotation".concat(i)):""}}function _y(e,t){return void 0===t&&(t=[e]),function(n,r){var i;return r.isRequest?!!t.some((function(e){return r.requestAble===e}))&&r.parentDirection:qp(i=r.inputEvent.target,Mb("direction"))&&(!e||qp(i,Mb(e)))}}function Oy(e,t){return e?nm(e)?e:vp(e)?t?document.querySelector(e):e:yp(e)?e():!tm(e)&&"current"in e?e.current:e:null}function Ty(e,t){var n;return e?((n=e)&&gp(n)&&!nm(n)&&(Ap(n)||"length"in n)?[].slice.call(e):[e]).reduce((function(e,n){return vp(n)&&t?gA(gA([],mA(e),!1),mA([].slice.call(document.querySelectorAll(n))),!1):(Ap(n)?e.push(Ty(n,t)):e.push(Oy(n,t)),e)}),[]):[]}function Dy(e,t){var n=ng(n=e.rootMatrix,(e=e.is3d)?4:3);return(n=e?n:og(n,3,4))[12]=0,n[13]=0,n[14]=0,Sg(n,t)}function By(e,t,n,r,i){var o,a,s,u=(e=mA(e,2))[0],c=(e=e[1],0),l=0;return i&&u&&e?(i=Up([0,0],t),o=Up([0,0],r),a=Gb(t),i=Math.cos(i-o)*a,r[0]?r[1]?(o=r[0]*u,a=r[1]*e,u=Math.atan2(o+t[0],a+t[1]),e=Math.atan2(o,a),u<0&&(u+=2*Math.PI),e<0&&(e+=2*Math.PI),s=0,(s=Fy(u-e)<Math.PI/2||Fy(u-e)>Math.PI/2*3?u-e:u-(e+=Math.PI))>2*Math.PI?s-=2*Math.PI:s>Math.PI?s=2*Math.PI-s:s<-Math.PI&&(s=-2*Math.PI-s),c=(u=Gb([o+t[0],a+t[1]])*Math.cos(s))*Math.sin(e)-o,l=u*Math.cos(e)-a,r[0]<0&&(c*=-1),r[1]<0&&(l*=-1)):l=(c=i)/n:c=(l=i)*n):(c=r[0]*t[0],l=r[1]*t[1]),[c,l]}function Iy(e,t,n,r){var i,o=n.ratio,a=n.startOffsetWidth,s=n.startOffsetHeight,u=0,c=0,l=r.distX,h=r.distY,f=r.pinchScale,d=r.parentDistance,p=r.parentDist,m=(r=r.parentScale,n.fixedDirection),g=[0,1].map((function(t){return Fy(e[t]-m[t])})),A=[0,1].map((function(e){return 0!==(e=g[e])?2/e:e}));return p?(u=p[0],c=p[1],t&&(u?c=c||u/o:u=c*o)):c=bp(f)?(u=(f-1)*a,(f-1)*s):r?(u=(r[0]-1)*a,(r[1]-1)*s):d?(u=d/(r=Gb([p=a*g[0],f=s*g[1]]))*p*A[0],d/r*f*A[1]):(i=VA({datas:n,distX:l,distY:h}),u=(p=mA(By([a,s],i=A.map((function(e,t){return i[t]*e})),o,e,t),2))[0],p[1]),{distWidth:u,distHeight:c}}function My(e,t,n){var r=(e=function e(t,n){var r,i;return n?"left"===t?{x:"0%",y:"50%"}:"top"===t||"center"===t?{x:"50%",y:"50%"}:"right"===t?{x:"100%",y:"50%"}:"bottom"===t?{x:"50%",y:"100%"}:(r=(n=mA(t.split(" "),2))[0],n=n[1],r=e(r||""),n=e(n||""),i={x:"50%",y:"50%"},(r=pA(pA({},r),n)).x&&(i.x=r.x),r.y&&(i.y=r.y),r.value&&(r.x&&!r.y&&(i.y=r.value),!r.x&&r.y&&(i.x=r.value)),i):"left"===t?{x:"0%"}:"right"===t?{x:"100%"}:"top"===t?{y:"0%"}:"bottom"===t?{y:"100%"}:t?"center"===t?{value:"50%"}:{value:t}:{}}(e,!0)).x;e=e.y;return[Np(r,t)||0,Np(e,n)||0]}function jy(e,t,n,r,i){var o=(e=e._store)[t];if(!(t in e)){if(null==i)return e[t]=n;o=e[t]=i}return o===n||r(o)===r(n)?o:e[t]=n}function Ny(e){return 0<=e?1:-1}function Fy(e){return Math.abs(e)}function Ry(e,t){return function(e){for(var t=[],n=0;n<e;++n)t.push(n);return t}(e).map((function(e){return t(e)}))}function Py(e){return bp(e)?{top:e,left:e,right:e,bottom:e}:{left:e.left||0,top:e.top||0,right:e.right||0,bottom:e.bottom||0}}function Ly(e,t){return e.map((function(e,n){return pp(e,t[n],1,2)}))}function Uy(e,t,n){return t=Up(e,t),0<=(e=Up(e,n)-t)?e:e+2*Math.PI}Ae=AA("pinchable",{props:["pinchable"],events:["pinchStart","pinch","pinchEnd","pinchGroupStart","pinchGroup","pinchGroupEnd"],dragStart:function(){return!0},pinchStart:function(e,t){var n,r,i,o=t.datas,a=t.targets,s=t.angle,u=t.originalDatas,c=(l=e.props).pinchable,l=l.ables;return!!c&&(i="onPinch".concat(a?"Group":"","Start"),n="drag".concat(a?"Group":"","ControlStart"),l=(!0===c?e.controlAbles:l.filter((function(e){return-1<c.indexOf(e.name)}))).filter((function(e){return e.canPinch&&e[n]})),r=hy(e,t,{}),a&&(r.targets=a),a=py(e,i,r),o.isPinch=!1!==a,o.ables=l,!!(i=o.isPinch)&&(l.forEach((function(r){var i;u[r.name]=u[r.name]||{},r[n]&&(i=pA(pA({},t),{datas:u[r.name],parentRotate:s,isPinch:!0}),r[n](e,i))})),e.state.snapRenderInfo={request:t.isRequest,direction:[0,0]},i))},pinch:function(e,t){var n,r,i,o=t.datas,a=t.scale,s=t.distance,u=t.originalDatas,c=t.inputEvent,l=t.targets,h=t.angle;if(o.isPinch)return n=s*(1-1/a),s=hy(e,t,{}),l&&(s.targets=l),r="onPinch".concat(l?"Group":""),py(e,r,s),r=o.ables,i="drag".concat(l?"Group":"","Control"),r.forEach((function(r){r[i]&&r[i](e,pA(pA({},t),{datas:u[r.name],inputEvent:c,resolveMatrix:!0,pinchScale:a,parentDistance:n,parentRotate:h,isPinch:!0}))})),s},pinchEnd:function(e,t){var n,r,i,o=t.datas,a=t.isPinch,s=t.inputEvent,u=t.targets,c=t.originalDatas;if(o.isPinch)return r="onPinch".concat(u?"Group":"","End"),n=fy(e,t,{isDrag:a}),u&&(n.targets=u),py(e,r,n),r=o.ables,i="drag".concat(u?"Group":"","ControlEnd"),r.forEach((function(n){n[i]&&n[i](e,pA(pA({},t),{isDrag:a,datas:c[n.name],inputEvent:s,isPinch:!0}))})),a},pinchGroupStart:function(e,t){return this.pinchStart(e,pA(pA({},t),{targets:e.props.targets}))},pinchGroup:function(e,t){return this.pinch(e,pA(pA({},t),{targets:e.props.targets}))},pinchGroupEnd:function(e,t){return this.pinchEnd(e,pA(pA({},t),{targets:e.props.targets}))}}),Qa=_y("scalable"),ca={name:"scalable",ableGroup:"size",canPinch:!0,props:["scalable","throttleScale","renderDirections","keepRatio","edge","displayAroundControls"],events:["scaleStart","beforeScale","scale","scaleEnd","scaleGroupStart","beforeScaleGroup","scaleGroup","scaleGroupEnd"],render:wv("scalable"),dragControlCondition:Qa,viewClassName:Sy("scalable"),dragControlStart:function(e,t){var n=t.datas,r=t.isPinch,i=t.inputEvent,o=(i=ry(t.parentDirection,r,i,n),(h=e.state).width),a=h.height,s=h.targetTransform,u=h.target,c=h.pos1,l=h.pos2,h=h.pos4;if(!i||!u)return!1;function f(e){n.ratio=e&&isFinite(e)?e:0}function d(e){e=ob(n.startPositions,e),n.fixedDirection=e.fixedDirection,n.fixedPosition=e.fixedPosition,n.fixedOffset=e.fixedOffset}function p(e){n.minScaleSize=e}function m(e){n.maxScaleSize=e}return r||UA(e,t),n.datas={},n.transform=s,n.prevDist=[1,1],n.direction=i,n.startOffsetWidth=o,n.startOffsetHeight=a,n.startValue=[1,1],u=!i[0]&&!i[1]||i[0]||!i[1],YA(e,t,"scale"),n.isWidth=u,n.startPositions=ay(e.state),n.setFixedDirection=d,f(Hp(c,l)/Hp(l,h)),d([-i[0],-i[1]]),p([-1/0,-1/0]),m([1/0,1/0]),s=py(e,"onScaleStart",r=hy(e,t,pA(pA({direction:i,set:function(e){n.startValue=e},setRatio:f,setFixedDirection:d,setMinScaleSize:p,setMaxScaleSize:m},KA(e,t)),{dragStart:ib.dragStart(e,(new RA).dragStart([0,0],t))}))),n.startFixedDirection=n.fixedDirection,!1!==s&&(n.isScale=!0,e.state.snapRenderInfo={request:t.isRequest,direction:i}),!!n.isScale&&r},dragControl:function(e,t){zA(e,t,"scale");var n,r,i,o,a,s,u,c,l,h=t.datas,f=t.parentKeepRatio,d=t.parentFlag,p=t.isPinch,m=t.dragClient,g=t.isRequest,A=t.useSnap,v=t.resolveMatrix,b=h.prevDist,y=h.direction,w=h.startOffsetWidth,x=h.startOffsetHeight,C=h.isScale,k=h.startValue,E=h.isWidth,S=h.ratio;return!!C&&(l=(C=e.props).throttleScale,n=C.parentMoveable,(r=y)[0]||y[1]||(r=[1,1]),i=S&&(null!=f?f:C.keepRatio)||!1,f=e.state,o=[k[0],k[1]],u=_(),!p&&e.props.groupable&&Ap(C=(f.snapRenderInfo||{}).direction)&&(C[0]||C[1])&&(f.snapRenderInfo={direction:y,request:t.isRequest}),py(e,"onBeforeScale",hy(e,t,{scale:u,setFixedDirection:function(e){return h.setFixedDirection(e),u=_()},startFixedDirection:h.startFixedDirection,setScale:function(e){u=e}},!0)),c=[u[0]/o[0],u[1]/o[1]],C=[0,0],(d=!(f=m)&&!d&&p)||v?f=iv(e,h.targetAllTransform,[0,0],[0,0],h):m||(f=h.fixedPosition),p||(C=function(e,t,n,r,i){var o,a,s,u,c;return Mv(e,"scalable")?(o=i.startOffsetWidth,a=i.startOffsetHeight,s=i.fixedPosition,u=i.fixedDirection,c=i.is3d,[(e=Eb(e,(function(e,n){return xb((r=i,e=ug(t,[e/o,n/a]),n=r.transformOrigin,l=r.offsetMatrix,h=r.is3d,f=r.targetMatrix,h=h?4:3,WA(l,sg(r.targetAllTransform||f,wg(e,h),h),n,h)),o,a,u,s,c);var r,l,h,f}),o,a,n,s,r,i))[0]/o,e[1]/a]):[0,0]}(e,c,y,!A&&g,h)),i?(r[0]&&r[1]&&C[0]&&C[1]&&(Math.abs(C[0]*w)>Math.abs(C[1]*x)?C[1]=0:C[0]=0),(v=!C[0]&&!C[1])&&(E?c[0]=$p(c[0]*o[0],l)/o[0]:c[1]=$p(c[1]*o[1],l)/o[1]),r[0]&&!r[1]||C[0]&&!C[1]||v&&E?(c[0]+=C[0],m=w*c[0]*o[0]/S,c[1]=m/x/o[1]):(!r[0]&&r[1]||!C[0]&&C[1]||v&&!E)&&(c[1]+=C[1],A=x*c[1]*o[1]*S,c[0]=A/w/o[0])):(c[0]+=C[0],c[1]+=C[1],C[0]||(c[0]=$p(c[0]*o[0],l)/o[0]),C[1]||(c[1]=$p(c[1]*o[1],l)/o[1])),0===c[0]&&(c[0]=1e-9*Ny(b[0])),0===c[1]&&(c[1]=1e-9*Ny(b[1])),g=c,m=[o[0],o[1]],u=[g[0]*m[0],g[1]*m[1]],a=[w,x],s=Pp(s=[w*u[0],x*u[1]],h.minScaleSize,h.maxScaleSize,!!i&&S),u=Ry(2,(function(e){return a[e]?s[e]/a[e]:s[e]})),c=Ry(2,(function(e){return u[e]/o[e]})),v=Ry(2,(function(e){return b[e]?c[e]/b[e]:c[e]})),E="scale(".concat(c.join(", "),")"),A="scale(".concat(u.join(", "),")"),C=HA(h,A,E),g=ov(e,(l=!k[0]||!k[1])?A:E,h.fixedDirection,f,h.fixedOffset,h,l),m=d?g:cg(g,h.prevInverseDist||[0,0]),h.prevDist=c,h.prevInverseDist=g,!(u[0]===b[0]&&u[1]===b[1]&&m.every((function(e){return!e}))&&!n&&!d)&&(py(e,"onScale",S=hy(e,t,pA({offsetWidth:w,offsetHeight:x,direction:y,scale:u,dist:c,delta:v,isPinch:!!p},rv(e,C,m,p,t)))),S));function _(){var e=(n=Iy(r,i,h,t)).distWidth,n=n.distHeight,a=w?(w+e)/w:1,s=x?(x+n)/x:1;k[0]||(o[0]=e/w),k[1]||(o[1]=n/x),e=(r[0]||i?a:1)*o[0],n=(r[1]||i?s:1)*o[1];return[e=0===e?1e-9*Ny(b[0]):e,n=0===n?1e-9*Ny(b[1]):n]}},dragControlEnd:function(e,t){var n=t.datas;return!!n.isScale&&(n.isScale=!1,py(e,"onScaleEnd",n=fy(e,t,{})),n)},dragGroupControlCondition:Qa,dragGroupControlStart:function(e,t){var n,r,i,o=t.datas,a=this.dragControlStart(e,t);return!!a&&(n=dv(e,"resizable",t),o.moveableScale=e.scale,r=mv(e,this,"dragControlStart",t,(function(t,n){return gv(e,t,o,n)})),o.setFixedDirection=t=function(t){a.setFixedDirection(t),r.forEach((function(r,i){r.setFixedDirection(t),gv(e,r.moveable,o,n[i])}))},t=pA(pA({},a),{targets:e.props.targets,events:r,setFixedDirection:t}),i=py(e,"onScaleGroupStart",t),o.isScale=!1!==i,!!o.isScale&&t)},dragGroupControl:function(e,t){var n=t.datas;if(n.isScale){dy(e,"onBeforeScale",(function(n){py(e,"onBeforeScaleGroup",hy(e,t,pA(pA({},n),{targets:e.props.targets}),!0))}));var r,i,o,a,s=this.dragControl(e,t);if(s)return r=s.dist,a=n.moveableScale,e.scale=[r[0]*a[0],r[1]*a[1]],i=e.props.keepRatio,o=n.fixedPosition,a=mv(e,this,"dragControl",t,(function(t,n){var a=(s=mA(hg(bg(e.rotation/180*Math.PI,3),[n.datas.originalX*r[0],n.datas.originalY*r[1],1],3),2))[0],s=s[1];return pA(pA({},n),{parentDist:null,parentScale:r,parentKeepRatio:i,dragClient:ug(o,[a,s])})})),n=pA({targets:e.props.targets,events:a},s),py(e,"onScaleGroup",n),n}},dragGroupControlEnd:function(e,t){var n,r=t.isDrag;if(t.datas.isScale)return this.dragControlEnd(e,t),n=mv(e,this,"dragControlEnd",t),py(e,"onScaleGroupEnd",fy(e,t,{targets:e.props.targets,events:n})),r},request:function(){var e={},t=0,n=0,r=!1;return{isControl:!0,requestStart:function(t){return r=t.useSnap,{datas:e,parentDirection:t.direction||[1,1],useSnap:r}},request:function(i){return t+=i.deltaWidth,n+=i.deltaHeight,{datas:e,parentDist:[t,n],parentKeepRatio:i.keepRatio,useSnap:r}},requestEnd:function(){return{datas:e,isDrag:!0,useSnap:r}}}}};Wo={name:"warpable",ableGroup:"size",props:["warpable","renderDirections","edge","displayAroundControls"],events:["warpStart","warp","warpEnd"],viewClassName:Sy("warpable"),render:function(e,t){var n,r,i,o,a,s,u=(h=e.props).resizable,c=h.scalable,l=h.warpable,h=h.zoom;return u||c||!l?[]:(c=(u=e.state).pos1,l=u.pos2,a=u.pos3,u=u.pos4,n=Ly(c,l),r=Ly(l,c),i=Ly(c,a),c=Ly(a,c),o=Ly(a,u),a=Ly(u,a),s=Ly(l,u),u=Ly(u,l),gA([t.createElement("div",{className:Mb("line"),key:"middeLine1",style:Kb(n,o,h)}),t.createElement("div",{className:Mb("line"),key:"middeLine2",style:Kb(r,a,h)}),t.createElement("div",{className:Mb("line"),key:"middeLine3",style:Kb(i,s,h)}),t.createElement("div",{className:Mb("line"),key:"middeLine4",style:Kb(c,u,h)})],mA(xv(e,"warpable",t)),!1))},dragControlCondition:function(e,t){return!t.isRequest&&qp(t=t.inputEvent.target,Mb("direction"))&&qp(t,Mb("warpable"))},dragControlStart:function(e,t){var n,r,i,o,a,s,u,c,l=t.datas,h=t.inputEvent,f=e.props.target;return!(!(h=iy(h.target,l))||!f)&&(f=e.state,n=f.transformOrigin,r=f.is3d,i=f.targetTransform,o=f.targetMatrix,a=f.width,s=f.height,u=f.left,c=f.top,l.datas={},l.targetTransform=i,l.warpTargetMatrix=r?o:og(o,3,4),l.targetInverseMatrix=tg(ng(l.warpTargetMatrix,4),3,4),l.direction=h,l.left=u,l.top=c,l.poses=[[0,0],[a,0],[0,s],[a,s]].map((function(e){return cg(e,n)})),l.nextPoses=l.poses.map((function(e){var t=(e=mA(e,2))[0];e=e[1];return hg(l.warpTargetMatrix,[t,e,0,1],4)})),l.startValue=yg(4),l.prevMatrix=yg(4),l.absolutePoses=ay(f),l.posIndexes=qA(h),UA(e,t),YA(e,t,"matrix3d"),!(f.snapRenderInfo={request:t.isRequest,direction:h})!==py(e,"onWarpStart",hy(e,t,pA({set:function(e){l.startValue=e}},KA(e,t))))&&(l.isWarp=!0),l.isWarp)},dragControl:function(e,t){var n=t.datas,r=t.isRequest,i=t.distX,o=t.distY,a=n.targetInverseMatrix,s=n.prevMatrix,u=n.isWarp,c=n.startValue,l=n.poses,h=n.posIndexes,f=n.absolutePoses;if(!u)return!1;zA(e,t,"matrix3d"),Mv(e,"warpable")&&(1<(u=h.map((function(e){return f[e]}))).length&&u.push([(u[0][0]+u[1][0])/2,(u[0][1]+u[1][1])/2]),u=(r=tb(e,r,{horizontal:u.map((function(e){return e[1]+o})),vertical:u.map((function(e){return e[0]+i}))})).horizontal,r=r.vertical,o-=u.offset,i-=r.offset);var d=VA({datas:n,distX:i,distY:o},!0),p=n.nextPoses.slice();return h.forEach((function(e){p[e]=ug(p[e],d)})),!!_A.every((function(e){return t=e.map((function(e){return l[e]})),e=e.map((function(e){return p[e]})),t=Uy(t[0],t[1],t[2]),e=Uy(e[0],e[1],e[2]),!((n=Math.PI)<=t&&e<=n||t<=n&&n<=e);var t,n}))&&!!(u=Cg(l[0],l[2],l[1],l[3],p[0],p[2],p[1],p[3])).length&&(r=$A(n,sg(a,u,4),!0),h=sg(ng(s,4),r,4),a=sg(c,n.prevMatrix=r,4),JA(t,u=HA(n,"matrix3d(".concat(a.join(", "),")"),"matrix3d(".concat(r.join(", "),")"))),py(e,"onWarp",hy(e,t,pA({delta:h,matrix:a,dist:r,multiply:sg,transform:u},cy({transform:u},t)))),!0)},dragControlEnd:function(e,t){var n=t.datas,r=t.isDrag;return!!n.isWarp&&(n.isWarp=!1,py(e,"onWarpEnd",fy(e,t,{})),r)}};var zy=Mb("area-pieces"),Hy=Mb("area-piece"),$y=Mb("avoid"),Qy=Mb("view-dragging");function Vy(e){var t,n=e.areaElement;n&&(t=(e=e.state).width,e=e.height,Wp(n,$y),n.style.cssText+="left: 0px; top: 0px; width: ".concat(t,"px; height: ").concat(e,"px"))}function qy(e){return e.createElement("div",{key:"area_pieces",className:zy},e.createElement("div",{className:Hy}),e.createElement("div",{className:Hy}),e.createElement("div",{className:Hy}),e.createElement("div",{className:Hy}))}var Gy={name:"dragArea",props:["dragArea","passDragArea"],events:["click","clickGroup"],render:function(e,t){var n=(o=e.props).target,r=o.dragArea,i=o.groupable,o=o.passDragArea,a=(u=e.getState()).width,s=u.height,u=u.renderPoses;o=o?Mb("area","pass"):Mb("area");return i?[t.createElement("div",{key:"area",ref:op(e,"areaElement"),className:o}),qy(t)]:n&&r?(n=(i=Cg([0,0],[a,0],[0,s],[a,s],u[0],u[1],u[2],u[3])).length?zb(i,!0):"none",[t.createElement("div",{key:"area",ref:op(e,"areaElement"),className:o,style:{top:"0px",left:"0px",width:"".concat(a,"px"),height:"".concat(s,"px"),transformOrigin:"0 0",transform:n}}),qy(t)]):[]},dragStart:function(e,t){var n=t.datas,r=t.clientX,i=t.clientY;if(!t.inputEvent)return!1;n.isDragArea=!1;t=e.areaElement,e=(n=e.state).moveableClientRect;var o=n.renderPoses,a=n.rootMatrix,s=n.is3d,u=e.left,c=(e=e.top,(o=Vb(o)).left),l=o.top,h=o.width,f=(o=o.height,r=(a=mA(wy(a,[r-u,i-e],s?4:3),2))[0],u=a[1],i=[{left:c,top:l,width:h,height:(u-=l)-10},{left:c,top:l,width:(r-=c)-10,height:o},{left:c,top:l+u+10,width:h,height:o-u-10},{left:c+r+10,top:l,width:h-r-10,height:o}],[].slice.call(t.nextElementSibling.children));i.forEach((function(e,t){f[t].style.cssText="left: ".concat(e.left,"px;top: ").concat(e.top,"px; width: ").concat(e.width,"px; height: ").concat(e.height,"px;")})),Gp(t,$y),n.disableNativeEvent=!0},drag:function(e,t){var n=t.datas;t=t.inputEvent;if(this.enableNativeEvent(e),!t)return!1;n.isDragArea||(n.isDragArea=!0,Vy(e))},dragEnd:function(e,t){this.enableNativeEvent(e);var n=t.inputEvent;t=t.datas;if(!n)return!1;t.isDragArea||Vy(e)},dragGroupStart:function(e,t){return this.dragStart(e,t)},dragGroup:function(e,t){return this.drag(e,t)},dragGroupEnd:function(e,t){return this.dragEnd(e,t)},unset:function(e){Vy(e),e.state.disableNativeEvent=!1},enableNativeEvent:function(e){var t=e.state;t.disableNativeEvent&&Ip((function(){t.disableNativeEvent=!1}))}};Ia=AA("origin",{props:["origin","svgOrigin"],render:function(e,t){var n=(i=e.props).zoom,r=i.svgOrigin,i=i.groupable,o=(e=e.getState()).beforeOrigin,a=e.rotation,s=e.svg,u=e.allMatrix,c=e.is3d,l=e.left,h=e.top,f=e.offsetWidth;e=e.offsetHeight;return n=Yb(a,n,!i&&s&&r?cg($b(u,[(a=mA(My(r,f,e),2))[0],a[1]],c?4:3),[l,h]):o),[t.createElement("div",{className:Mb("control","origin"),style:n,key:"beforeOrigin"})]}});function Wy(e){return[(e=e.scrollContainer).scrollLeft,e.scrollTop]}ha={name:"scrollable",canPinch:!0,props:["scrollable","scrollContainer","scrollThreshold","scrollThrottleTime","getScrollPosition","scrollOptions"],events:["scroll","scrollGroup"],dragRelation:"strong",dragStart:function(e,t){var n=void 0===(n=(r=e.props).scrollContainer)?e.getContainer():n,r=r.scrollOptions,i=new zg,o=(n=Oy(n,!0),t.datas.dragScroll=i,e.state.dragScroll=i,t.isControl?"controlGesto":"targetGesto"),a=t.targets;i.on("scroll",(function(n){var r=n.container;n=n.direction,r=hy(e,t,{scrollContainer:r,direction:n}),n=a?"onScrollGroup":"onScroll";a&&(r.targets=a),py(e,n,r)})).on("move",(function(t){var n=t.offsetX,r=t.offsetY;t=t.inputEvent;e[o].scrollBy(n,r,t.inputEvent,!0)})).on("scrollDrag",(function(t){(0,t.next)(e[o].getCurrentEvent())})),i.dragStart(t,pA({container:n},r))},checkScroll:function(e,t){var n,r,i,o,a,s=t.datas.dragScroll;if(s)return e=void 0===(r=(n=e.props).scrollContainer)?e.getContainer():r,r=n.scrollThreshold,i=n.scrollThrottleTime,a=n.getScrollPosition,o=void 0===a?Wy:a,a=n.scrollOptions,s.drag(t,pA({container:e,threshold:void 0===r?0:r,throttleTime:void 0===i?0:i,getScrollPosition:function(e){return o({scrollContainer:e.container,direction:e.direction})}},a)),!0},drag:function(e,t){return this.checkScroll(e,t)},dragEnd:function(e,t){t.datas.dragScroll.dragEnd(),t.datas.dragScroll=null},dragControlStart:function(e,t){return this.dragStart(e,pA(pA({},t),{isControl:!0}))},dragControl:function(e,t){return this.drag(e,t)},dragControlEnd:function(e,t){return this.dragEnd(e,t)},dragGroupStart:function(e,t){return this.dragStart(e,pA(pA({},t),{targets:e.props.targets}))},dragGroup:function(e,t){return this.drag(e,pA(pA({},t),{targets:e.props.targets}))},dragGroupEnd:function(e,t){return this.dragEnd(e,pA(pA({},t),{targets:e.props.targets}))},dragGroupControlStart:function(e,t){return this.dragStart(e,pA(pA({},t),{targets:e.props.targets,isControl:!0}))},dragGroupControl:function(e,t){return this.drag(e,pA(pA({},t),{targets:e.props.targets}))},dragGroupControEnd:function(e,t){return this.dragEnd(e,pA(pA({},t),{targets:e.props.targets}))},unset:function(e){var t;null!=(t=(e=e.state).dragScroll)&&t.dragEnd(),e.dragScroll=null}};var Ky={name:"",props:["target","dragTargetSelf","dragTarget","dragContainer","container","warpSelf","rootContainer","useResizeObserver","useMutationObserver","zoom","dragFocusedInput","transformOrigin","ables","className","pinchThreshold","pinchOutside","triggerAblesSimultaneously","checkInput","cspNonce","translateZ","hideDefaultLines","props","flushSync","stopPropagation","preventClickEventOnDrag","preventClickDefault","viewContainer","persistData","useAccuratePosition","firstRenderState","linePadding","controlPadding","preventDefault","requestStyles"],events:["changeTargets"]},Yy=(Va=AA("padding",{props:["padding"],render:function(e,t){var n,r,i,o,a,s=e.props;return s.dragArea?[]:(n=(s=Py(s.padding||{})).left,r=s.top,i=s.right,s=s.bottom,e=e.getState(),o=e.renderPoses,a=[e.pos1,e.pos2,e.pos3,e.pos4],e=[],0<n&&e.push([0,2]),0<r&&e.push([0,1]),0<i&&e.push([1,3]),0<s&&e.push([2,3]),e.map((function(e,n){var r=(e=mA(e,2))[0];e=e[1];if((r=Cg([0,0],[100,0],[0,100],[100,100],a[r],a[e],o[r],o[e])).length)return t.createElement("div",{key:"padding".concat(n),className:Mb("padding"),style:{transform:zb(r,!0)}})})))}}),["nw","ne","se","sw"]);function Xy(e,t){var n=t<(n=e[0]+e[1])?t/n:1;return e[0]*=n,e[1]=t-e[1]*n,e}var Jy=[1,2,5,6],Zy=[0,3,4,7],ew=[1,-1,-1,1],tw=[1,1,-1,-1];function nw(e,t,n,r,i,o,a,s){void 0===i&&(i=0),void 0===o&&(o=0),void 0===a&&(a=n),void 0===s&&(s=r);var u=[],c=!1,l=(e=e.filter((function(e){return!e.virtual}))).map((function(e){var l,h=e.horizontal,f=e.vertical;e=e.pos;return f&&!c&&(c=!0,u.push("/")),c?(l=Math.max(0,1===f?e[1]-o:s-e[1]),u.push(ky(l,r,t))):(l=Math.max(0,1===h?e[0]-i:a-e[0]),u.push(ky(l,n,t))),l}));return{radiusPoses:e,styles:u,raws:l}}function rw(e){for(var t=[0,0],n=[0,0],r=e.length,i=0;i<r;++i){var o=e[i];o.sub&&(o.horizontal&&(0===t[1]&&(t[0]=i),t[1]=i-t[0]+1,n[0]=i+1),o.vertical&&(0===n[1]&&(n[0]=i),n[1]=i-n[0]+1))}return{horizontalRange:t,verticalRange:n}}function iw(e,t,n,r,i,o,a){void 0===o&&(o=[0,0]),void 0===a&&(a=!1);var s=(-1<(s=e.indexOf("/"))?e.slice(0,s):e).length,u=e.slice(0,s),c=(e=e.slice(s+1),u.length),l=e.length,h=(s=0<l,void 0===(h=(u=mA(u,4))[0])?"0px":h),f=void 0===(f=u[1])?h:f,d=void 0===(d=u[2])?h:d,p=(u=void 0===(u=u[3])?f:u,void 0===(p=(e=mA(e,4))[0])?h:p),m=void 0===(m=e[1])?s?p:f:m,g=void 0===(g=e[2])?s?p:d:g,A=(s=void 0===(e=e[3])?s?m:u:e,[h,f,d,u].map((function(e){return Np(e,t)}))),v=[p,m,g,s].map((function(e){return Np(e,n)}));e=A.slice(),h=v.slice(),f=mA(Xy([e[0],e[1]],t),2),e[0]=f[0],e[1]=f[1],d=mA(Xy([e[3],e[2]],t),2),e[3]=d[0],e[2]=d[1],u=mA(Xy([h[0],h[3]],n),2),h[0]=u[0],h[3]=u[1],p=mA(Xy([h[1],h[2]],n),2),h[1]=p[0],h[2]=p[1],m=a?e:e.slice(0,Math.max(o[0],c)),g=a?h:h.slice(0,Math.max(o[1],l));return gA(gA([],mA(m.map((function(e,t){var o=Yy[t];return{virtual:c<=t,horizontal:ew[t],vertical:0,pos:[r+e,i+(-1===tw[t]?n:0)],sub:!0,raw:A[t],direction:o}}))),!1),mA(g.map((function(e,n){var o=Yy[n];return{virtual:l<=n,horizontal:0,vertical:tw[n],pos:[r+(-1===ew[n]?t:0),i+e],sub:!0,raw:v[n],direction:o}}))),!1)}var ow=[[0,-1,"n"],[1,0,"e"]],aw=[[-1,-1,"nw"],[0,-1,"n"],[1,-1,"ne"],[1,0,"e"],[1,1,"se"],[0,1,"s"],[-1,1,"sw"],[-1,0,"w"]];function sw(e,t,n){var r,i,o,a,s,u,c=e.props.clipRelative,l=(e=e.state).width,h=e.height,f=(e=t.type,t=t.poses,"rect"===e),d="circle"===e;return"polygon"===e?n.map((function(e){return"".concat(ky(e[0],l,c)," ").concat(ky(e[1],h,c))})):f||"inset"===e?(r=n[1][1],i=n[3][0],o=n[7][0],a=n[5][1],f?[r,i,a,o].map((function(e){return"".concat(e,"px")})):(u=[r,l-i,h-a,o].map((function(e,t){return ky(e,t%2?l:h,c)})),8<n.length&&(s=(f=mA(cg(n[4],n[0]),2))[0],f=f[1],u.push.apply(u,gA(["round"],mA(nw(t.slice(8).map((function(e,t){return pA(pA({},e),{pos:n[t]})})),c,s,f,o,r,i,a).styles),!1))),u)):d||"ellipse"===e?(t=n[0],s=ky(Fy(n[1][1]-t[1]),d?Math.sqrt((l*l+h*h)/2):h,c),(u=d?[s]:[ky(Fy(n[2][0]-t[0]),l,c),s]).push("at",ky(t[0],l,c),ky(t[1],h,c)),u):void 0}function uw(e,t,n,r){var i=[r,(r+t)/2,t],o=[e,(e+n)/2,n];return aw.map((function(e){var t=(e=mA(e,3))[0],n=e[1],r=(e=e[2],i[t+1]),a=o[n+1];return{vertical:Fy(n),horizontal:Fy(t),direction:e,pos:[r,a]}}))}function cw(e){var t=[1/0,-1/0],n=[1/0,-1/0];return e.forEach((function(e){e=e.pos,t[0]=Math.min(t[0],e[0]),t[1]=Math.max(t[1],e[0]),n[0]=Math.min(n[0],e[1]),n[1]=Math.max(n[1],e[1])})),[Fy(t[1]-t[0]),Fy(n[1]-n[0])]}function lw(e,t,n,r,i){var o,a,s,u,c,l,h,f,d,p,m,g,A,v,b,y;if(e&&((i=i||("none"!==(o=(e=fv(e))("clipPath"))?o:e("clip")))&&"none"!==i&&"auto"!==i||(i=r)))return e=(o=Ep(i)).prefix,o=void 0===(r=o.value)?"":r,e="circle"===(r=void 0===e?i:e),a=" ","polygon"===r?(a=",",g=Vg((y=(m=kp(o||"0% 0%, 100% 0%, 100% 100%, 0% 100%")).map((function(e){var r=(e=mA(e.split(" "),2))[0];e=e[1];return{vertical:1,horizontal:1,pos:[Np(r,t),Np(e,n)]}}))).map((function(e){return e.pos}))),{type:r,clipText:i,poses:y,splitter:a,left:g.minX,right:g.maxX,top:g.minY,bottom:g.maxY}):e||"ellipse"===r?(p=g="",s=0,m=Cp(o),u=e?(l=(d=mA(m,4))[0],g=void 0===(f=d[2])?"50%":f,p=void 0===(f=d[3])?"50%":f,s=Np(void 0===l?"50%":l,Math.sqrt((t*t+n*n)/2))):(d="",l=(f=mA(m,5))[0],d=void 0===(h=f[1])?"50%":h,g=void 0===(h=f[3])?"50%":h,p=void 0===(h=f[4])?"50%":h,s=Np(void 0===l?"50%":l,t),Np(d,n)),y=gA([{vertical:1,horizontal:1,pos:c=[Np(g,t),Np(p,n)],direction:"nesw"}],mA(ow.slice(0,e?1:2).map((function(e){return{vertical:Fy(e[1]),horizontal:e[0],direction:e[2],sub:!0,pos:[c[0]+e[0]*s,c[1]+e[1]*u]}}))),!1),{type:r,clipText:i,radiusX:s,radiusY:u,left:c[0]-s,top:c[1]-u,right:c[0]+s,bottom:c[1]+u,poses:y,splitter:a}):"inset"===r?(h=(-1<(f=(m=Cp(o||"0 0 0 0")).indexOf("round"))?m.slice(0,f):m).length,l=m.slice(h+1),g=(d=mA(m.slice(0,h),4))[0],e=void 0===(p=d[1])?g:p,f=d[2],p=void 0===(h=d[3])?e:h,h=(d=mA([g,void 0===f?g:f].map((function(e){return Np(e,n)})),2))[0],v=d[1],b=(g=mA([p,e].map((function(e){return Np(e,t)})),2))[0],A=g[1],p=iw(l,(f=t-A)-b,(d=n-v)-h,b,h),{type:"inset",clipText:i,poses:y=gA(gA([],mA(uw(h,f,d,b)),!1),mA(p),!1),top:h,left:b,right:f,bottom:d,radius:l,splitter:a}):"rect"===r?(a=",",{type:"rect",clipText:i,poses:y=uw(g=(e=mA((m=kp(o||"0px, ".concat(t,"px, ").concat(n,"px, 0px"))).map((function(e){return Sp(e).value})),4))[0],A=e[1],v=e[2],b=e[3]),top:g,right:A,bottom:v,left:b,values:m,splitter:a}):void 0}function hw(e,t,n,r,i){return void 0===r&&(r=[0,0]),iw(e&&"0px"!==e?Cp(e):[],t,n,0,0,r,i)}function fw(e,t,n,r,i){var o,a,s=(a=e.state).width,u=a.height,c=(i=nw(i,e.props.roundRelative,s,u)).raws,l=i.styles;i=(c=(i=i=i.radiusPoses,void 0===(o=c)&&(o=i.map((function(e){return e.raw}))),{horizontals:i.map((function(e,t){return e.horizontal?o[t]:null})).filter((function(e){return null!=e})),verticals:i.map((function(e,t){return e.vertical?o[t]:null})).filter((function(e){return null!=e}))})).horizontals,c=c.verticals,l=l.join(" ");return py(e,"onRound",a=(a.borderRadiusState=l,hy(e,t,pA({horizontals:i,verticals:c,borderRadius:l,width:s,height:u,delta:r,dist:n},cy({borderRadius:l},t))))),a}function dw(e){var t,n,r=e.getState().style,i=r.borderRadius||"";return!i&&e.props.groupable&&(t=e.moveables[0],(n=e.getTargets()[0])&&(i=(null==t?void 0:t.props.target)===n?null!=(e=null==(t=e.moveables[0])?void 0:t.state.style.borderRadius)?e:"":my(n).borderRadius,r.borderRadius=i)),i}Ga={name:"clippable",props:["clippable","defaultClipPath","customClipPath","keepRatio","clipRelative","clipArea","dragWithClip","clipTargetBounds","clipVerticalGuidelines","clipHorizontalGuidelines","clipSnapThreshold"],events:["clipStart","clip","clipEnd"],css:[".control.clip-control {\nbackground: #6d6;\ncursor: pointer;\n}\n.control.clip-control.clip-radius {\nbackground: #d66;\n}\n.line.clip-line {\nbackground: #6e6;\ncursor: move;\nz-index: 1;\n}\n.clip-area {\nposition: absolute;\ntop: 0;\nleft: 0;\n}\n.clip-ellipse {\nposition: absolute;\ncursor: move;\nborder: 1px solid #6d6;\nborder: var(--zoompx) solid #6d6;\nborder-radius: 50%;\ntransform-origin: 0px 0px;\n}",":host {\n--bounds-color: #d66;\n}",".guideline {\npointer-events: none;\nz-index: 2;\n}",".line.guideline.bounds {\nbackground: #d66;\nbackground: var(--bounds-color);\n}"],render:function(e,t){var n=(a=e.props).customClipPath,r=a.defaultClipPath,i=a.clipArea,o=a.zoom,a=a.groupable,s=(e=e.getState()).target,u=e.width,c=e.height,l=e.allMatrix,h=e.is3d,f=e.left,d=e.top,p=e.pos1,m=e.pos2,g=e.pos3,A=e.pos4,v=e.clipPathState,b=e.snapBoundInfos,y=e.rotation;if(!s||a)return[];if(!(e=lw(s,u,c,r||"inset",v||n)))return[];var w,x,C,k=h?4:3,E=(a=e.type,s=e.poses.map((function(e){return[(e=$b(l,e.pos,k))[0]-f,e[1]-d]})),r=[],[]);n="inset"===a,h="polygon"===a;if(((v="rect"===a)||n||h)&&(w=n?s.slice(0,8):s,E=w.map((function(e,n){var r=0===n?w[w.length-1]:w[n-1],i=Up(r,e);e=Wb(r,e);return t.createElement("div",{key:"clipLine".concat(n),className:Mb("line","clip-line","snap-control"),"data-clip-index":n,style:{width:"".concat(e,"px"),transform:"translate(".concat(r[0],"px, ").concat(r[1],"px) rotate(").concat(i,"rad) scaleY(").concat(o,")")}})}))),r=s.map((function(e,n){return t.createElement("div",{key:"clipControl".concat(n),className:Mb("control","clip-control","snap-control"),"data-clip-index":n,style:{transform:"translate(".concat(e[0],"px, ").concat(e[1],"px) rotate(").concat(y,"rad) scale(").concat(o,")")}})})),n&&r.push.apply(r,gA([],mA(s.slice(8).map((function(e,n){return t.createElement("div",{key:"clipRadiusControl".concat(n),className:Mb("control","clip-control","clip-radius","snap-control"),"data-clip-index":8+n,style:{transform:"translate(".concat(e[0],"px, ").concat(e[1],"px) rotate(").concat(y,"rad) scale(").concat(o,")")}})}))),!1)),"circle"===a||"ellipse"===a){a=e.left;var S=e.top,_=e.radiusX,O=e.radiusY;a=(e=mA(cg($b(l,[a,S],k),$b(l,[0,0],k)),2))[0],S=e[1],e="none";if(!i){for(var T=Math.max(10,_/5,O/5),D=[],B=0;B<=T;++B){var I=2*Math.PI/T*B;D.push([_+(_-o)*Math.cos(I),O+(O-o)*Math.sin(I)])}D.push([_,-2]),D.push([-2,-2]),D.push([-2,2*O+2]),D.push([2*_+2,2*O+2]),D.push([2*_+2,-2]),D.push([_,-2]),e="polygon(".concat(D.map((function(e){return"".concat(e[0],"px ").concat(e[1],"px")})).join(", "),")")}r.push(t.createElement("div",{key:"clipEllipse",className:Mb("clip-ellipse","snap-control"),style:{width:"".concat(2*_,"px"),height:"".concat(2*O,"px"),clipPath:e,transform:"translate(".concat(-f+a,"px, ").concat(-d+S,"px) ").concat(zb(l))}}))}return i&&(a=(e=Vb(gA([p,m,g,A],mA(s),!1))).width,S=e.height,x=e.left,C=e.top,(h||v||n)&&(D=n?s.slice(0,8):s,r.push(t.createElement("div",{key:"clipArea",className:Mb("clip-area","snap-control"),style:{width:"".concat(a,"px"),height:"".concat(S,"px"),transform:"translate(".concat(x,"px, ").concat(C,"px)"),clipPath:"polygon(".concat(D.map((function(e){return"".concat(e[0]-x,"px ").concat(e[1]-C,"px")})).join(", "),")")}})))),b&&["vertical","horizontal"].forEach((function(e){var n=b[e],r="horizontal"===e;n.isSnap&&E.push.apply(E,gA([],mA(n.snap.posInfos.map((function(n,i){n=n.pos;var a=cg($b(l,r?[0,n]:[n,0],k),[f,d]);n=cg($b(l,r?[u,n]:[n,c],k),[f,d]);return bv(t,"",a,n,o,"clip".concat(e,"snap").concat(i),"guideline")}))),!1)),n.isBound&&E.push.apply(E,gA([],mA(n.bounds.map((function(n,i){n=n.pos;var a=cg($b(l,r?[0,n]:[n,0],k),[f,d]);n=cg($b(l,r?[u,n]:[n,c],k),[f,d]);return bv(t,"",a,n,o,"clip".concat(e,"bounds").concat(i),"guideline","bounds","bold")}))),!1))})),gA(gA([],mA(r),!1),mA(E),!1)},dragControlCondition:function(e,t){return t.inputEvent&&-1<(t.inputEvent.target.getAttribute("class")||"").indexOf("clip")},dragStart:function(e,t){var n=e.props.dragWithClip;return void 0!==n&&!n&&this.dragControlStart(e,t)},drag:function(e,t){return this.dragControl(e,pA(pA({},t),{isDragTarget:!0}))},dragEnd:function(e,t){return this.dragControlEnd(e,t)},dragControlStart:function(e,t){var n=e.state,r=(i=e.props).defaultClipPath,i=i.customClipPath,o=n.target,a=n.width,s=n.height,u=t.inputEvent?t.inputEvent.target:null,c=u&&u.getAttribute("class")||"",l=t.datas;return!!(o=lw(o,a,s,r||"inset",i))&&(a=o.clipText,!1===py(e,"onClipStart",hy(e,t,{clipType:o.type,clipStyle:a,poses:o.poses.map((function(e){return e.pos}))}))?l.isClipStart=!1:(l.isControl=c&&-1<c.indexOf("clip-control"),l.isLine=-1<c.indexOf("clip-line"),l.isArea=-1<c.indexOf("clip-area")||-1<c.indexOf("clip-ellipse"),l.clipIndex=u?parseInt(u.getAttribute("data-clip-index"),10):-1,l.clipPath=o,l.isClipStart=!0,n.clipPathState=a,UA(e,t),!0))},dragControl:function(e,t){var n,r,i,o,a,s,u,c,l,h,f,d,p,m,g,A,v,b,y,w,x,C,k,E,S,_,O,T,D,B,I,M,j,N,F,R,P,L,U,z,H,$,Q,V,q,G=t.datas,W=t.originalDatas,K=t.isDragTarget;return!!G.isClipStart&&(F=G.isControl,l=G.isLine,z=G.isArea,q=G.clipIndex,!!(G=G.clipPath)&&(N=(n=Xb(e.props,"clippable")).keepRatio,o=r=0,W=W.draggable,i=VA(t),o=(K&&W?(a=mA(W.prevBeforeDist,2),r=a[0],a):(a=mA(i,2),r=a[0],a))[1],a=[r,o],s=e.state,u=s.width,c=s.height,z=!z&&!F&&!l,l=G.type,V=G.poses,h=G.splitter,Q=V.map((function(e){return e.pos})),z&&(r=-r,o=-o),z=!F||"nesw"===V[q].direction,f="inset"===l||"rect"===l,d=V.map((function(){return[0,0]})),F&&!z?(k=(x=V[q]).horizontal,x=x.vertical,k=[r*Fy(k),o*Fy(x)],m=k,x=f,k=N,O=(T=(p=V)[B=q]).direction,T=T.sub,b=p.map((function(){return[0,0]})),D=O?O.split(""):[],x&&B<8?(x=D.filter((function(e){return"w"===e||"e"===e})),C=D.filter((function(e){return"n"===e||"s"===e})),g=x[0],A=C[0],b[B]=m,C=(x=mA(cw(p),2))[0],x=x[1],(y=C&&x?C/x:0)&&k?(k=p[(B+4)%8].pos,w=[0,0],-1<O.indexOf("w")?w[0]=-1:-1<O.indexOf("e")&&(w[0]=1),-1<O.indexOf("n")?w[1]=-1:-1<O.indexOf("s")&&(w[1]=1),y=C+(C=By([C,x],m,y,w,!0))[0],x+=C[1],C=k[1],E=k[1],S=k[0],k=k[0],-1===w[0]?S=k-y:1===w[0]?k=S+y:(S-=y/2,k+=y/2),-1===w[1]?C=E-x:E=1===w[1]?C+x:(C=E-x/2)+x,v=uw(C,k,E,S),p.forEach((function(e,t){b[t][0]=v[t].pos[0]-e.pos[0],b[t][1]=v[t].pos[1]-e.pos[1]}))):(p.forEach((function(e,t){(e=e.direction)&&(-1<e.indexOf(g)&&(b[t][0]=m[0]),-1<e.indexOf(A)&&(b[t][1]=m[1]))})),g&&(b[1][0]=m[0]/2,b[5][0]=m[0]/2),A&&(b[3][1]=m[1]/2,b[7][1]=m[1]/2))):O&&!T?D.forEach((function(e){var t="n"===e||"s"===e;p.forEach((function(n,r){var i=n.direction,o=n.horizontal;n=n.vertical;i&&-1!==i.indexOf(e)&&(b[r]=[t||!o?0:m[0],t&&n?m[1]:0])}))})):b[B]=m,d=b):z&&(d=Q.map((function(){return[r,o]}))),w=gA([],mA(y=Q.map((function(e,t){return ug(e,d[t])}))),!1),s.snapBoundInfos=null,x="circle"===G.type,C="ellipse"===G.type,(x||C)&&(k=Fy((j=Vb(y)).bottom-j.top),E=Fy(C?j.right-j.left:k),R=y[0][1]+k,P=y[0][0]-E,L=y[0][0]+E,x&&(w.push([L,j.bottom]),d.push([1,0])),w.push([j.left,R]),d.push([0,1]),w.push([P,j.bottom]),d.push([1,0])),S=yb((n.clipHorizontalGuidelines||[]).map((function(e){return Np("".concat(e),c)})),(n.clipVerticalGuidelines||[]).map((function(e){return Np("".concat(e),u)})),u,c),O=[],T=[],T=x||C?(O=[w[4][0],w[2][0]],[w[1][1],w[3][1]]):f?($=[w[0],w[2],w[4],w[6]],_=[d[0],d[2],d[4],d[6]],O=$.filter((function(e,t){return _[t][0]})).map((function(e){return e[0]})),$.filter((function(e,t){return _[t][1]})).map((function(e){return e[1]}))):(O=w.filter((function(e,t){return d[t][0]})).map((function(e){return e[0]})),w.filter((function(e,t){return d[t][1]})).map((function(e){return e[1]}))),D=[0,0],z=(B=nb(S,n.clipTargetBounds&&{left:0,top:0,right:u,bottom:c},O,T,5)).horizontal,Q=B.vertical,I=z.offset,M=Q.offset,z.isBound&&(D[1]+=I),Q.isBound&&(D[0]+=M),(C||x)&&0===d[0][0]&&0===d[0][1]?(H=(j=Vb(y)).bottom-j.top,j=C?j.right-j.left:H,j-=Q.isBound?Fy(M):0===Q.snapIndex?-M:M,H-=z.isBound?Fy(I):0===z.snapIndex?-I:I,x&&(j=H=0<Hv(Q,z)?H:j),Q=w[0],w[1][1]=Q[1]-H,w[2][0]=Q[0]+j,w[3][1]=Q[1]+H,w[4][0]=Q[0]-j):f&&N&&F?(H=(z=mA(cw(V),2))[0],Q=z[1],j=H&&Q?H/Q:0,N=V[q].direction||"",F=w[1][1],R=w[5][1],P=w[7][0],L=w[3][0],Fy(I)<=Fy(M)?I=Ny(I)*Fy(M)/j:M=Ny(M)*Fy(I)*j,-1<N.indexOf("w")?P-=M:-1<N.indexOf("e")?L-=M:(P+=M/2,L-=M/2),-1<N.indexOf("n")?F-=I:-1<N.indexOf("s")?R-=I:(F+=I/2,R-=I/2),U=uw(F,L,R,P),w.forEach((function(e,t){t=mA(U[t].pos,2),e[0]=t[0],e[1]=t[1]}))):w.forEach((function(e,t){(t=d[t])[0]&&(e[0]-=M),t[1]&&(e[1]-=I)})),z=sw(e,G,y),H="".concat(l,"(").concat(z.join(h),")"),s.clipPathState=H,T=x||C?(O=[w[4][0],w[2][0]],[w[1][1],w[3][1]]):f?(O=($=[w[0],w[2],w[4],w[6]]).map((function(e){return e[0]})),$.map((function(e){return e[1]}))):(O=w.map((function(e){return e[0]})),w.map((function(e){return e[1]}))),s.snapBoundInfos=nb(S,n.clipTargetBounds&&{left:0,top:0,right:u,bottom:c},O,T,1),W&&(Q=s.is3d,V=s.allMatrix,q=D,K&&(q=[a[0]+D[0]-i[0],a[1]+D[1]-i[1]]),W.deltaOffset=sg(V,[q[0],q[1],0,0],Q?4:3)),py(e,"onClip",hy(e,t,pA({clipEventType:"changed",clipType:l,poses:y,clipStyle:H,clipStyles:z,distX:r,distY:o},cy(((j={})["rect"===l?"clip":"clipPath"]=H,j),t)))),!0))},dragControlEnd:function(e,t){this.unset(e);var n=t.isDrag,r=t.datas,i=t.isDouble,o=r.isLine,a=r.isClipStart;r=r.isControl;return!!a&&(py(e,"onClipEnd",fy(e,t,{})),i&&(r?function(e,t){var n=(r=t.datas).clipPath,r=r.clipIndex,i=n.type,o=n.poses,a=n.splitter,s=o.map((function(e){return e.pos})),u=s.length;if("polygon"===i)o.splice(r,1),s.splice(r,1);else{if("inset"!==i)return;if(r<8)return;if(function(e,t,n,r,i){void 0===i&&(i=t.length);var o=(a=rw(e.slice(r))).horizontalRange,a=a.verticalRange,s=0;if(0==(r=n-r))s=i;else if(0<r&&r<o[1])s=o[1]-r;else{if(!(r>=a[0]))return;s=a[0]+a[1]-r}e.splice(n,s),t.splice(n,s)}(o,s,r,8,u),u===o.length)return}r=sw(e,n,s),u="".concat(i,"(").concat(r.join(a),")"),py(e,"onClip",hy(e,t,pA({clipEventType:"removed",clipType:i,poses:s,clipStyles:r,clipStyle:u,distX:0,distY:0},cy({clipPath:u},t))))}(e,t):o&&function(e,t){var n=(r=mA(LA(e,t),2))[0],r=r[1],i=(o=t.datas).clipPath,o=o.clipIndex,a=i.type,s=i.poses,u=i.splitter,c=s.map((function(e){return e.pos}));if("polygon"===a)c.splice(o,0,[n,r]);else{if("inset"!==a)return;var l=Jy.indexOf(o),h=(o=Zy.indexOf(o),s.length),f=s,d=c,p=l,m=o,g=n,A=r,v=c[4][0],b=c[4][1],y=c[0][0],w=c[0][1];o=(void 0===y&&(y=0),void 0===w&&(w=0),(l=rw(f.slice(8))).horizontalRange),l=l.verticalRange;if(-1<p)for(var x=1===ew[p]?g-y:v-g,C=o[1];C<=p;++C){var k=1===tw[C]?w:b,E=0;if(p===C?E=g:0===C?E=y+x:-1===ew[C]&&(E=v-(d[8][0]-y)),f.splice(8+C,0,{horizontal:ew[C],vertical:0,pos:[E,k]}),d.splice(8+C,0,[E,k]),0===C)break}else if(-1<m){var S=1===tw[m]?A-w:b-A,_=(0===o[1]&&0===l[1]&&(f.push({horizontal:ew[0],vertical:0,pos:o=[y+S,w]}),d.push(o)),l[0]);for(C=l[1];C<=m&&(E=1===ew[C]?y:v,k=0,m===C?k=A:0===C?k=w+S:1===tw[C]?k=d[8+_][1]:-1===tw[C]&&(k=b-(d[8+_][1]-w)),f.push({horizontal:0,vertical:tw[C],pos:[E,k]}),d.push([E,k]),0!==C);++C);}if(h===s.length)return}n=sw(e,i,c),r="".concat(a,"(").concat(n.join(u),")"),py(e,"onClip",hy(e,t,pA({clipEventType:"added",clipType:a,poses:c,clipStyles:n,clipStyle:r,distX:0,distY:0},cy({clipPath:r},t))))}(e,t)),i||n)},unset:function(e){e.state.clipPathState="",e.state.snapBoundInfos=null}},ia={name:"originDraggable",props:["originDraggable","originRelative"],events:["dragOriginStart","dragOrigin","dragOriginEnd"],css:[":host[data-able-origindraggable] .control.origin {\npointer-events: auto;\n}"],dragControlCondition:function(e,t){return t.isRequest?"originDraggable"===t.requestAble:qp(t.inputEvent.target,Mb("origin"))},dragControlStart:function(e,t){var n=t.datas,r=py(e,"onDragOriginStart",t=(UA(e,t),hy(e,t,{dragStart:ib.dragStart(e,(new RA).dragStart([0,0],t))})));return n.startOrigin=e.state.transformOrigin,n.startTargetOrigin=e.state.targetOrigin,n.prevOrigin=[0,0],!(n.isDragOrigin=!0)===r?n.isDragOrigin=!1:t},dragControl:function(e,t){var n,r,i,o,a,s,u,c,l,h=t.datas,f=t.isPinch,d=t.isRequest;return!!h.isDragOrigin&&(o=(a=mA(VA(t),2))[0],a=a[1],n=(u=e.state).width,r=u.height,l=u.offsetMatrix,c=u.targetMatrix,u=u.is3d,i=void 0===(i=e.props.originRelative)||i,u=u?4:3,o=[o,a],d&&((a=t.distOrigin)[0]||a[1])&&(o=a),d=ug(h.startOrigin,o),a=ug(h.startTargetOrigin,o),s=cg(o,h.prevOrigin),l=WA(l,c,d,u),c=e.getRect(),l=Vb(Qb(l,n,r,u)),u=[c.left-l.left,c.top-l.top],h.prevOrigin=o,c=[ky(a[0],n,i),ky(a[1],r,i)].join(" "),l=ib.drag(e,FA(t,e.state,u,!!f,!1)),py(e,"onDragOrigin",h=hy(e,t,pA(pA({width:n,height:r,origin:d,dist:o,delta:s,transformOrigin:c,drag:l},cy({transformOrigin:c,transform:l.transform},t)),{afterTransform:l.transform}))),h)},dragControlEnd:function(e,t){return!!t.datas.isDragOrigin&&(py(e,"onDragOriginEnd",fy(e,t,{})),!0)},dragGroupControlCondition:function(e,t){return this.dragControlCondition(e,t)},dragGroupControlStart:function(e,t){return!!this.dragControlStart(e,t)},dragGroupControl:function(e,t){return!!(t=this.dragControl(e,t))&&(e.transformOrigin=t.transformOrigin,!0)},request:function(e){var t={},n=e.getRect(),r=0,i=0,o=n.transformOrigin,a=[0,0];return{isControl:!0,requestStart:function(){return{datas:t}},request:function(e){return"deltaOrigin"in e?(a[0]+=e.deltaOrigin[0],a[1]+=e.deltaOrigin[1]):"origin"in e?(a[0]=e.origin[0]-o[0],a[1]=e.origin[1]-o[1]):("x"in e?r=e.x-n.left:"deltaX"in e&&(r+=e.deltaX),"y"in e?i=e.y-n.top:"deltaY"in e&&(i+=e.deltaY)),{datas:t,distX:r,distY:i,distOrigin:a}},requestEnd:function(){return{datas:t,isDrag:!0}}}}},Ko={name:"roundable",props:["roundable","roundRelative","minRoundControls","maxRoundControls","roundClickable","roundPadding","isDisplayShadowRoundControls"],events:["roundStart","round","roundEnd","roundGroupStart","roundGroup","roundGroupEnd"],css:[".control.border-radius {\nbackground: #d66;\ncursor: pointer;\nz-index: 3;\n}",".control.border-radius.vertical {\nbackground: #d6d;\nz-index: 2;\n}",".control.border-radius.virtual {\nopacity: 0.5;\nz-index: 1;\n}",":host.round-line-clickable .line.direction {\ncursor: pointer;\n}"],className:function(e){return!0===(e=e.props.roundClickable)||"line"===e?Mb("round-line-clickable"):""},requestStyle:function(){return["borderRadius"]},requestChildStyle:function(){return["borderRadius"]},render:function(e,t){var n,r,i,o,a=(d=e.getState()).target,s=d.width,u=d.height,c=d.allMatrix,l=d.is3d,h=d.left,f=d.top,d=d.borderRadiusState,p=e.props,m=void 0===(m=p.minRoundControls)?[0,0]:m,g=void 0===(y=p.maxRoundControls)?[4,4]:y,A=p.zoom,v=void 0===(y=p.roundPadding)?0:y,b=p.isDisplayShadowRoundControls,y=p.groupable;return a&&(p=d||dw(e),n=l?4:3,a=hw(p,s,u,m,!0))?(i=r=0,o=y?[0,0]:[h,f],a.map((function(e,a){var s=e.horizontal,u=e.vertical,l=e.direction||"",h=gA([],mA(e.pos),!1);i+=Math.abs(s),r+=Math.abs(u),s&&-1<l.indexOf("n")&&(h[1]-=v),u&&-1<l.indexOf("w")&&(h[0]-=v),s&&-1<l.indexOf("s")&&(h[1]+=v),u&&-1<l.indexOf("e")&&(h[0]+=v),s=cg($b(c,h,n),o),u=e.vertical?r<=g[1]&&(b||!e.virtual):i<=g[0]&&(b||!e.virtual);return t.createElement("div",{key:"borderRadiusControl".concat(a),className:Mb("control","border-radius",e.vertical?"vertical":"",e.virtual?"virtual":""),"data-radius-index":a,style:{display:u?"block":"none",transform:"translate(".concat(s[0],"px, ").concat(s[1],"px) scale(").concat(A,")")}})}))):null},dragControlCondition:function(e,t){return!(!t.inputEvent||t.isRequest)&&(-1<(t=t.inputEvent.target.getAttribute("class")||"").indexOf("border-radius")||-1<t.indexOf("moveable-line")&&-1<t.indexOf("moveable-direction"))},dragGroupControlCondition:function(e,t){return this.dragControlCondition(e,t)},dragControlStart:function(e,t){var n=t.inputEvent,r=t.datas,i=-1<(o=(n=n.target).getAttribute("class")||"").indexOf("border-radius"),o=-1<o.indexOf("moveable-line")&&-1<o.indexOf("moveable-direction"),a=i?parseInt(n.getAttribute("data-radius-index"),10):-1,s=-1;return!o||(n=n.getAttribute("data-line-key")||"")&&(s=parseInt(n.replace(/render-line-/g,""),10),isNaN(s)&&(s=-1)),!(!i&&!o)&&(!1!==py(e,"onRoundStart",n=hy(e,t,{}))&&(r.lineIndex=s,r.controlIndex=a,r.isControl=i,r.isLine=o,UA(e,t),a=(s=e.props).roundRelative,o=void 0===(i=s.minRoundControls)?[0,0]:i,s=(t=e.state).width,i=t.height,r.isRound=!0,r.prevDist=[0,0],e=hw(dw(e)||"",s,i,o,!0)||[],r.controlPoses=e,t.borderRadiusState=nw(e,a,s,i).styles.join(" "),n))},dragControl:function(e,t){var n,r,i,o,a,s,u,c,l,h,f,d,p=t.datas,m=p.controlPoses;return!!(p.isRound&&p.isControl&&m.length)&&(n=p.controlIndex,r=(i=mA(VA(t),2))[0],i=i[1],a=cg(o=[r,i],p.prevDist),d=e.props.maxRoundControls,s=void 0===d?[4,4]:d,d=e.state,u=d.width,c=d.height,d=m[n],l=d.vertical,h=d.horizontal,(f=m.map((function(e){var t=e.horizontal,n=(e=e.vertical,[t*h*o[0],e*l*o[1]]);if(t){if(1===s[0])return n;if(s[0]<4&&t!==h)return n}else{if(0===s[1])return n[1]=e*h*o[0]/u*c,n;if(l){if(1===s[1])return n;if(s[1]<4&&e!==l)return n}}return[0,0]})))[n]=o,d=m.map((function(e,t){return pA(pA({},e),{pos:ug(e.pos,f[t])})})),n<4?d.slice(0,n+1).forEach((function(e){e.virtual=!1})):d.slice(4,n+1).forEach((function(e){e.virtual=!1})),p.prevDist=[r,i],fw(e,t,o,a,d))},dragControlEnd:function(e,t){var n,r,i,o,a,s,u,c,l=e.state,h=(l.borderRadiusState="",t.datas),f=t.isDouble;return!!h.isRound&&(s=h.isControl,n=h.controlIndex,o=h.isLine,i=h.lineIndex,r=(h=h.controlPoses).filter((function(e){return e.virtual})).length,u=void 0===(u=e.props.roundClickable)||u,f&&u&&(!s||!0!==u&&"control"!==u?!o||!0!==u&&"line"!==u||(s=(f=mA(LA(e,t),2))[0],o=f[1],u=i,f=s,i=o,o=(s=h).filter((function(e){var t=e.virtual;return e.horizontal&&!t})).length,c=s.filter((function(e){var t=e.virtual;return e.vertical&&!t})).length,a=-1,0===u&&(0===o?a=0:1===o&&(a=1)),2===u&&(o<=2?a=2:o<=3&&(a=3)),3===u&&(0===c?a=4:c<4&&(a=7)),1===u&&(c<=1?a=5:c<=2&&(a=6)),-1!==a&&s[a].virtual&&(o=s[a],u=s,(c=a)<4?u.slice(0,c+1).forEach((function(e){e.virtual=!1})):(u[0].virtual&&(u[0].virtual=!1),u.slice(4,c+1).forEach((function(e){e.virtual=!1}))),a<4?o.pos[0]=f:o.pos[1]=i)):(s=h,(u=n)<4?s.slice(u,4).forEach((function(e){e.virtual=!0})):s.slice(u).forEach((function(e){e.virtual=!0}))),r!==h.filter((function(e){return e.virtual})).length&&fw(e,t,[0,0],[0,0],h)),py(e,"onRoundEnd",c=fy(e,t,{})),l.borderRadiusState="",c)},dragGroupControlStart:function(e,t){var n,r,i=this.dragControlStart(e,t);return!!i&&(n=e.moveables,r=e.props.targets,t=dv(e,"roundable",t),py(e,"onRoundGroupStart",pA({targets:e.props.targets,events:t.map((function(e,t){return pA(pA({},e),{target:r[t],moveable:n[t],currentTarget:n[t]})}))},i)),i)},dragGroupControl:function(e,t){var n,r,i=this.dragControl(e,t);return!!i&&(n=e.moveables,r=e.props.targets,t=dv(e,"roundable",t),py(e,"onRoundGroup",e=pA({targets:e.props.targets,events:t.map((function(e,t){return pA(pA(pA({},e),{target:r[t],moveable:n[t],currentTarget:n[t]}),cy({borderRadius:i.borderRadius},e))}))},i)),e)},dragGroupControlEnd:function(e,t){var n=e.moveables,r=e.props.targets,i=dv(e,"roundable",t);return!!(t=(dy(e,"onRound",(function(t){var o=pA({targets:e.props.targets,events:i.map((function(e,i){return pA(pA(pA({},e),{target:r[i],moveable:n[i],currentTarget:n[i]}),cy({borderRadius:t.borderRadius},e))}))},t);py(e,"onRoundGroup",o)})),this.dragControlEnd(e,t)))&&(t=pA({targets:e.props.targets,events:i.map((function(e,t){return pA(pA({},e),{target:r[t],moveable:n[t],currentTarget:n[t],lastEvent:null==(t=e.datas)?void 0:t.lastEvent})}))},t),py(e,"onRoundGroupEnd",t),t)},unset:function(e){e.state.borderRadiusState=""}};var pw={isPinch:!0,name:"beforeRenderable",props:[],events:["beforeRenderStart","beforeRender","beforeRenderEnd","beforeRenderGroupStart","beforeRenderGroup","beforeRenderGroupEnd"],dragRelation:"weak",setTransform:function(e,t){var n=(e=e.state).is3d,r=e.targetMatrix;e=e.inlineTransform,r=n?"matrix3d(".concat(r.join(","),")"):"matrix(".concat(lg(r,!0),")"),e=e&&"none"!==e?e:r;t.datas.startTransforms=(r=e,n=yg((t=n)?4:3),r==="matrix".concat(t?"3d":"","(").concat(n.join(","),")")||"matrix(1,0,0,1,0,0)"===r?[]:Cp(e))},resetStyle:function(e){var t=e.datas;t.nextStyle={},t.nextTransforms=e.datas.startTransforms,t.nextTransformAppendedIndexes=[]},fillDragStartParams:function(e,t){return hy(e,t,{setTransform:function(e){t.datas.startTransforms=Ap(e)?e:Cp(e)},isPinch:!!t.isPinch})},fillDragParams:function(e,t){return hy(e,t,{isPinch:!!t.isPinch})},dragStart:function(e,t){this.setTransform(e,t),this.resetStyle(t),py(e,"onBeforeRenderStart",this.fillDragStartParams(e,t))},drag:function(e,t){t.datas.startTransforms||this.setTransform(e,t),this.resetStyle(t),py(e,"onBeforeRender",hy(e,t,{isPinch:!!t.isPinch}))},dragEnd:function(e,t){t.datas.startTransforms||(this.setTransform(e,t),this.resetStyle(t)),py(e,"onBeforeRenderEnd",hy(e,t,{isPinch:!!t.isPinch,isDrag:t.isDrag}))},dragGroupStart:function(e,t){var n=this,r=(this.dragStart(e,t),dv(e,"beforeRenderable",t)),i=e.moveables;r=r.map((function(e,t){return t=i[t],n.setTransform(t,e),n.resetStyle(e),n.fillDragStartParams(t,e)}));py(e,"onBeforeRenderGroupStart",hy(e,t,{isPinch:!!t.isPinch,targets:e.props.targets,setTransform:function(){},events:r}))},dragGroup:function(e,t){var n=this,r=(this.drag(e,t),dv(e,"beforeRenderable",t)),i=e.moveables;r=r.map((function(e,t){return t=i[t],n.resetStyle(e),n.fillDragParams(t,e)}));py(e,"onBeforeRenderGroup",hy(e,t,{isPinch:!!t.isPinch,targets:e.props.targets,events:r}))},dragGroupEnd:function(e,t){this.dragEnd(e,t),py(e,"onBeforeRenderGroupEnd",hy(e,t,{isPinch:!!t.isPinch,isDrag:t.isDrag,targets:e.props.targets}))},dragControlStart:function(e,t){return this.dragStart(e,t)},dragControl:function(e,t){return this.drag(e,t)},dragControlEnd:function(e,t){return this.dragEnd(e,t)},dragGroupControlStart:function(e,t){return this.dragGroupStart(e,t)},dragGroupControl:function(e,t){return this.dragGroup(e,t)},dragGroupControlEnd:function(e,t){return this.dragGroupEnd(e,t)}},mw={name:"renderable",props:[],events:["renderStart","render","renderEnd","renderGroupStart","renderGroup","renderGroupEnd"],dragRelation:"weak",dragStart:function(e,t){py(e,"onRenderStart",hy(e,t,{isPinch:!!t.isPinch}))},drag:function(e,t){py(e,"onRender",this.fillDragParams(e,t))},dragAfter:function(e,t){return this.drag(e,t)},dragEnd:function(e,t){py(e,"onRenderEnd",this.fillDragEndParams(e,t))},dragGroupStart:function(e,t){py(e,"onRenderGroupStart",hy(e,t,{isPinch:!!t.isPinch,targets:e.props.targets}))},dragGroup:function(e,t){var n=this,r=dv(e,"beforeRenderable",t),i=e.moveables;r=r.map((function(e,t){return t=i[t],n.fillDragParams(t,e)}));py(e,"onRenderGroup",hy(e,t,pA(pA({isPinch:!!t.isPinch,targets:e.props.targets,transform:tv(t),transformObject:{}},cy(nv(t))),{events:r})))},dragGroupEnd:function(e,t){var n=this,r=dv(e,"beforeRenderable",t),i=e.moveables;r=r.map((function(e,t){return t=i[t],n.fillDragEndParams(t,e)}));py(e,"onRenderGroupEnd",hy(e,t,pA({isPinch:!!t.isPinch,isDrag:t.isDrag,targets:e.props.targets,events:r,transformObject:{},transform:tv(t)},cy(nv(t)))))},dragControlStart:function(e,t){return this.dragStart(e,t)},dragControl:function(e,t){return this.drag(e,t)},dragControlAfter:function(e,t){return this.dragAfter(e,t)},dragControlEnd:function(e,t){return this.dragEnd(e,t)},dragGroupControlStart:function(e,t){return this.dragGroupStart(e,t)},dragGroupControl:function(e,t){return this.dragGroup(e,t)},dragGroupControlEnd:function(e,t){return this.dragGroupEnd(e,t)},fillDragParams:function(e,t){var n={};return Og(ev(t)||[]).forEach((function(e){n[e.name]=e.functionValue})),hy(e,t,pA({isPinch:!!t.isPinch,transformObject:n,transform:tv(t)},cy(nv(t))))},fillDragEndParams:function(e,t){var n={};return Og(ev(t)||[]).forEach((function(e){n[e.name]=e.functionValue})),hy(e,t,pA({isPinch:!!t.isPinch,isDrag:t.isDrag,transformObject:n,transform:tv(t)},cy(nv(t))))}};function gw(e,t,n,r,i,o,a){o.clientDistX=o.distX,o.clientDistY=o.distY;var s,u,c,l,h,f,d,p,m,g,A,v="Start"===i,b="End"===i,y="After"===i,w=e.state.target,x=o.isRequest,C=-1<r.indexOf("Control");return!(!w||v&&C&&!x&&e.areaElement===o.inputEvent.target||(s=gA([],mA(t),!1),x&&(u=o.requestAble,s.some((function(e){return e.name===u}))||s.push.apply(s,gA([],mA(e.props.ables.filter((function(e){return e.name===u}))),!1))),!s.length||s.every((function(e){return e.dragRelation}))||(w=o.inputEvent,b&&w&&(c=document.elementFromPoint(o.clientX,o.clientY)||w.target),l=!1,h=function(){var e;l=!0,null!=(e=o.stop)&&e.call(o)},(w=!(!v||e.targetGesto&&e.controlGesto&&e.targetGesto.isFlag()&&e.controlGesto.isFlag()))&&e.updateRect(i,!0,!1),f=o.datas,p=e[d=C?"controlGesto":"targetGesto"],m=function(t,n,r){var i;return n in t&&p===e[d]&&(i=t.name,i=f[i]||(f[i]={}),v&&(i.isEventStart=!r||!t[r]||t[r](e,o)),!!i.isEventStart&&(r=t[n](e,pA(pA({},o),{stop:h,datas:i,originalDatas:f,inputTarget:c})),e._emitter.off(),v&&!1===r&&(i.isEventStart=!1),r))},w&&s.forEach((function(t){t.unset&&t.unset(e)})),m(pw,"drag".concat(r).concat(i)),A=g=0,n.forEach((function(t){if(l)return!1;var n="".concat(t).concat(r).concat(i),a="".concat(t).concat(r,"Condition"),u=(""!==i||x||xy(e.state,o),s.filter((function(e){return e[n]})));t=(u=u.filter((function(e,t){return e.name&&u.indexOf(e)===t}))).filter((function(e){return m(e,n,a)})).length;l&&++g,t&&++A,!l&&v&&u.length&&!t&&(g+=u.filter((function(e){var t=e.name;return!!f[t].isEventStart&&"strong"!==e.dragRelation})).length?1:0)})),y&&!A||m(mw,"drag".concat(r).concat(i)),C=p!==e[d]||g===n.length,(b||l||C)&&(e.state.gestos={},e.moveables&&e.moveables.forEach((function(e){e.state.gestos={}})),s.forEach((function(t){t.unset&&t.unset(e)}))),v&&!C&&!x&&A&&e.props.preventDefault&&null!=o&&o.preventDefault(),e.isUnmounted||C||((!v&&A&&!a||b)&&(e.props.flushSync||jb)((function(){e.updateRect(b?i:"",!0,!1),e.forceUpdate()})),v||b||y||!A||a||gw(e,t,n,r,i+"After",o),0))))}function Aw(e){return function(t){t=t.inputEvent.target;var n,r=e.areaElement,i=e._dragTarget;return!(!i||null!=(n=e.controlGesto)&&n.isFlag())&&(t===i||i.contains(t)||t===r||!e.isMoveableElement(t)&&!e.controlBox.contains(t)||qp(t,"moveable-area")||qp(t,"moveable-padding")||qp(t,"moveable-edgeDraggable"))}}function vw(e,t,n){var r=e.controlBox,i=[],o=e.props,a=o.dragArea,s=e.state.target,u=o.dragTarget;return i.push(r),a&&!u||i.push(t),!a&&u&&s&&t!==s&&o.dragTargetSelf&&i.push(s),bw(e,i,"targetAbles",n,{dragStart:Aw(e),pinchStart:Aw(e)})}function bw(e,t,n,r,i){void 0===i&&(i={});var o="targetAbles"===n,a=e.props,s=a.pinchOutside,u=a.pinchThreshold,c=a.preventClickEventOnDrag,l=a.preventClickDefault,h=a.checkInput,f=a.dragFocusedInput,d={preventDefault:void 0===(d=a.preventDefault)||d,preventRightClick:!0,preventWheelClick:!0,container:Oy(a.dragContainer,!0)||em(e.getControlBoxElement()),pinchThreshold:u,pinchOutside:s,preventClickEventOnDrag:o&&c,preventClickEventOnDragStart:o&&l,preventClickEventByCondition:o?null:function(t){return e.controlBox.contains(t.target)},checkInput:o&&h,dragFocusedInput:f},p=new uA(t,d),m="Control"===r;return["drag","pinch"].forEach((function(t){["Start","","End"].forEach((function(o){p.on("".concat(t).concat(o),(function(a){var s=a.eventType,u="drag"===t&&a.isPinch;i[s]&&!i[s](a)?a.stop():u||(s="drag"===t?[t]:["drag",t],u=gA([],mA(e[n]),!1),gw(e,u,s,r,o,a)?(e.props.stopPropagation||"Start"===o&&m)&&null!=(u=null==a?void 0:a.inputEvent)&&u.stopPropagation():a.stop())}))}))})),p}var yw=function(){function e(e,t,n){var r=this;this.target=e,this.moveable=t,this.eventName=n,this.ables=[],this._onEvent=function(e){var t=r.eventName,n=r.moveable;n.state.disableNativeEvent||r.ables.forEach((function(r){r[t](n,{inputEvent:e})}))},e.addEventListener(n.toLowerCase(),this._onEvent)}return e.prototype.setAbles=function(e){this.ables=e},e.prototype.destroy=function(){this.target.removeEventListener(this.eventName.toLowerCase(),this._onEvent),this.target=null,this.moveable=null},e}();function ww(e,t,n,r){void 0===n&&(n=t);var i=0,o=0,a=0,s={},u=Jb(e);e&&(i=u.offsetWidth,o=u.offsetHeight),e&&(t=PA((e=function(e,t,n,r){void 0===n&&(n=t);var i=(t=sv(e,t)).matrixes,o=t.is3d,a=t.targetMatrix,s=t.transformOrigin,u=t.targetOrigin,c=t.offsetContainer,l=t.hasFixed,h=(t=t.zoom,(p=function(e,t){if(lv){var n=Bp(lv,(function(n){return n[0][0]==e&&n[0][1]==t}));if(n)return n[1]}return n=sv(e,t,!0),lv&&lv.push([[e,t],n]),n}(c,n)).matrixes),f=p.is3d,d=p.offsetContainer,p=p.zoom,m=(r=r||f||o)?4:3,g="svg"!==e.tagName.toLowerCase()&&"ownerSVGElement"in e,A=yg(m),v=yg(m),b=yg(m),y=yg(m),w=i.length,x=(h=h.map((function(e){return pA(pA({},e),{matrix:e.matrix?gA([],mA(e.matrix),!1):void 0})})).reverse(),f=(i.reverse(),!o&&r&&(a=og(a,3,4),Ub(i)),!f&&r&&Ub(h),h.forEach((function(e){v=sg(v,e.matrix,m)})),n||Zp(e)),(null==(n=h[0])?void 0:n.target)||Pb(f,f,!0).offsetParent),C=h.slice(1).reduce((function(e,t){return sg(e,t.matrix,m)}),yg(m));return i.forEach((function(e,t){w-2===t&&(b=A.slice()),w-1===t&&(y=A.slice()),e.matrix||(t=function(e,t,n,r,i){var o=e.target,a=(e=e.origin,t.matrix),s=(t=Jb(o)).offsetWidth,u=t.offsetHeight,c=(t=n.getBoundingClientRect(),[0,0]);n===Zp(n)&&(c=Lb(o,!0));for(var l=(o=o.getBoundingClientRect()).left-t.left+n.scrollLeft-(n.clientLeft||0)+c[0],h=o.top-t.top+n.scrollTop-(n.clientTop||0)+c[1],f=(t=o.width,n=o.height,(o=qb(c=ag(r,i,a),s,u,r)).left),d=o.top,p=o.width,m=(o=o.height,$b(c,e,r)),g=[l+(c=cg(m,[f,d]))[0]*t/p,h+c[1]*n/o],A=[0,0],v=0;++v<10;){var b=mA(cg($b(b=ng(i,r),g,r),$b(b,m,r)),2);A[0]=b[0],A[1]=b[1];var y=(b=qb(ag(r,i,xg(A,r),a),s,u,r)).left-l;b=b.top-h;if(Fy(y)<2&&Fy(b)<2)break;g[0]-=y,g[1]-=b}return A.map((function(e){return Math.round(e)}))}(e,i[t+1],x,m,sg(C,A,m)),e.matrix=xg(t,m)),A=sg(A,e.matrix,m)})),n=!g&&o,a=a||yg(n?4:3),f=zb(g&&16===a.length?og(a,4,3):a,n),h=v,v=tg(v,m,m),{hasZoom:1!==t||1!==p,hasFixed:l,matrixes:i,rootMatrix:v,originalRootMatrix:h,beforeMatrix:b,offsetMatrix:y,allMatrix:A,targetMatrix:a,targetTransform:f,inlineTransform:e.style.transform,transformOrigin:s,targetOrigin:u,is3d:r,offsetContainer:c,offsetRootContainer:d}}(e,t,n,r)).allMatrix,e.transformOrigin,i,o),s=pA(pA({},e),t),a=Zb([(n=PA(e.allMatrix,[50,50],100,100)).pos1,n.pos2],n.direction)),t=r?4:3;return pA(pA(pA({hasZoom:!1,width:i,height:o,rotation:a},u),{originalRootMatrix:yg(t),rootMatrix:yg(t),beforeMatrix:yg(t),offsetMatrix:yg(t),allMatrix:yg(t),targetMatrix:yg(t),targetTransform:"",inlineTransform:"",transformOrigin:[0,0],targetOrigin:[0,0],is3d:!!r,left:0,top:0,right:0,bottom:0,origin:[0,0],pos1:[0,0],pos2:[0,0],pos3:[0,0],pos4:[0,0],direction:1,hasFixed:!1,offsetContainer:null,offsetRootContainer:null,matrixes:[]}),s)}function xw(e,t,n,r,i,o){void 0===o&&(o=[]);var a,s=1,u=[0,0],c={left:0,top:0,width:0,height:0,right:0,bottom:0,clientLeft:0,clientTop:0,clientWidth:0,clientHeight:0,scrollWidth:0,scrollHeight:0},l={left:0,top:0,width:0,height:0,right:0,bottom:0,clientLeft:0,clientTop:0,clientWidth:0,clientHeight:0,scrollWidth:0,scrollHeight:0},h={left:0,top:0,width:0,height:0,right:0,bottom:0,clientLeft:0,clientTop:0,clientWidth:0,clientHeight:0,scrollWidth:0,scrollHeight:0},f={left:0,top:0,width:0,height:0,right:0,bottom:0,clientLeft:0,clientTop:0,clientWidth:0,clientHeight:0,scrollWidth:0,scrollHeight:0},d=[0,0],p={};n=ww(t,n,i,!0);return t&&(a=fv(t),o.forEach((function(e){p[e]=a(e)})),i=n.is3d?4:3,s=(o=PA(n.offsetMatrix,ug(n.transformOrigin,rg(n.targetMatrix,i)),n.width,n.height)).direction,u=ug(o.origin,[o.left-n.left,o.top-n.top]),f=ny(n.offsetRootContainer),i=Pb(r,r,!0).offsetParent||n.offsetRootContainer,n.hasZoom?(o=PA(sg(n.originalRootMatrix,n.allMatrix),n.transformOrigin,n.width,n.height),r=PA(n.originalRootMatrix,Fb(fv(i)("transformOrigin")).map((function(e){return parseFloat(e)})),i.offsetWidth,i.offsetHeight),c=ty(o,f),h=ty(r,f,i,!0),e&&(l=ty({left:o.left,top:r=o.top,bottom:r,right:r},f))):(c=ny(t),o=i,h=(r=null==cv?void 0:cv.get(o))||(r=ny(o,!0),cv&&cv.set(o,r),r),e&&(l=ny(e)),i=h.left,o=h.top,r=h.clientLeft,e=h.clientTop,i=[c.left-i,c.top-o],d=cg(wy(n.rootMatrix,i,4),[r+n.left,e+n.top]))),pA({targetClientRect:c,containerClientRect:h,moveableClientRect:l,rootContainerClientRect:f,beforeDirection:s,beforeOrigin:u,originalBeforeOrigin:u,target:t,style:p,offsetDelta:d},n)}function Cw(e){var t,n,r=e.pos1,i=e.pos2,o=e.pos3,a=e.pos4;return r&&i&&o&&a?(t=[(t=Vg([r,i,o,a])).minX,t.minY],n=cg(e.origin,t),r=cg(r,t),i=cg(i,t),o=cg(o,t),a=cg(a,t),pA(pA({},e),{left:e.left,top:e.top,posDelta:t,pos1:r,pos2:i,pos3:o,pos4:a,origin:n,beforeOrigin:n,isPersisted:!0})):null}var kw=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state=pA({container:null,gestos:{},renderPoses:[[0,0],[0,0],[0,0],[0,0]],disableNativeEvent:!1,posDelta:[0,0]},xw(null)),t.renderState={},t.enabledAbles=[],t.targetAbles=[],t.controlAbles=[],t.rotation=0,t.scale=[1,1],t.isMoveableMounted=!1,t.isUnmounted=!1,t.events={mouseEnter:null,mouseLeave:null},t._emitter=new Ng,t._prevOriginalDragTarget=null,t._originalDragTarget=null,t._prevDragTarget=null,t._dragTarget=null,t._prevPropTarget=null,t._propTarget=null,t._prevDragArea=!1,t._isPropTargetChanged=!1,t._hasFirstTarget=!1,t._reiszeObserver=null,t._observerId=0,t._mutationObserver=null,t._rootContainer=null,t._viewContainer=null,t._viewClassNames=[],t._store={},t.checkUpdateRect=function(){var e;t.isDragging()||((e=t.props.parentMoveable)?e.checkUpdateRect():(Mp(t._observerId),t._observerId=Ip((function(){t.isDragging()||t.updateRect()}))))},t._onPreventClick=function(e){e.stopPropagation(),e.preventDefault()},t}return dA(t,e),t.prototype.render=function(){var e=this.props,t=this.getState(),n=e.parentPosition,r=e.className,i=e.target,o=e.zoom,a=e.cspNonce,s=e.translateZ,u=e.cssStyled,c=e.groupable,l=e.linePadding,h=e.controlPadding,f=(n=(this._checkUpdateRootContainer(),this.checkUpdate(),this.updateRenderPoses(),mA(n||[0,0],2)))[0],d=(n=n[1],t.left),p=t.top,m=t.target,g=t.direction,A=t.hasFixed,v=(t=t.offsetDelta,e.targets),b=this.isDragging(),y={},w=(this.getEnabledAbles().forEach((function(e){y["data-able-".concat(e.name.toLowerCase())]=!0})),this._getAbleClassName());v=v&&v.length&&(m||c)||i||!this._hasFirstTarget&&this.state.isPersisted,m=this.controlBox||this.props.firstRenderState||this.props.persistData,i=[d-f,p-n],!c&&e.useAccuratePosition&&(i[0]+=t[0],i[1]+=t[1]),d={position:A?"fixed":"absolute",display:v?"block":"none",visibility:m?"visible":"hidden",transform:"translate3d(".concat(i[0],"px, ").concat(i[1],"px, ").concat(s,")"),"--zoom":o,"--zoompx":"".concat(o,"px")};return l&&(d["--moveable-line-padding"]=l),h&&(d["--moveable-control-padding"]=h),Mm(u,pA({cspNonce:a,ref:op(this,"controlBox"),className:"".concat(Mb("control-box",-1===g?"reverse":"",b?"dragging":"")," ").concat(w," ").concat(r)},y,{onClick:this._onPreventClick,style:d}),this.renderAbles(),this._renderLines())},t.prototype.componentDidMount=function(){this.isMoveableMounted=!0,this.isUnmounted=!1;var e=(t=this.props).parentMoveable,t=t.container;this._checkUpdateRootContainer(),this._checkUpdateViewContainer(),this._updateTargets(),this._updateNativeEvents(),this._updateEvents(),this.updateCheckInput(),this._updateObserver(this.props),t||e||this.state.isPersisted||(this.updateRect("",!1,!1),this.forceUpdate())},t.prototype.componentDidUpdate=function(e){this._checkUpdateRootContainer(),this._checkUpdateViewContainer(),this._updateNativeEvents(),this._updateTargets(),this._updateEvents(),this.updateCheckInput(),this._updateObserver(e)},t.prototype.componentWillUnmount=function(){var e;this.isMoveableMounted=!1,this.isUnmounted=!0,this._emitter.off(),null!=(e=this._reiszeObserver)&&e.disconnect(),null!=(e=this._mutationObserver)&&e.disconnect(),this._viewContainer&&this._changeAbleViewClassNames([]),uy(this,!1),uy(this,!0);var t,n=this.events;for(t in n){var r=n[t];r&&r.destroy()}},t.prototype.getTargets=function(){var e=this.props.target;return e?[e]:[]},t.prototype.getAble=function(e){return Bp(this.props.ables||[],(function(t){return t.name===e}))},t.prototype.getContainer=function(){var e=this.props,t=e.parentMoveable,n=e.wrapperMoveable;return e.container||n&&n.getContainer()||t&&t.getContainer()||this.controlBox.parentElement},t.prototype.getControlBoxElement=function(){return this.controlBox},t.prototype.getDragElement=function(){return this._dragTarget},t.prototype.isMoveableElement=function(e){var t;return e&&-1<((null==(t=e.getAttribute)?void 0:t.call(e,"class"))||"").indexOf(EA)},t.prototype.dragStart=function(e){var t=this.targetGesto,n=this.controlGesto;return t&&Aw(this)({inputEvent:e})?t.isFlag()||t.triggerDragStart(e):n&&this.isMoveableElement(e.target)&&(n.isFlag()||n.triggerDragStart(e)),this},t.prototype.hitTest=function(e){var t,n,r=(u=this.state).target,i=u.pos1,o=u.pos2,a=u.pos3,s=u.pos4,u=u.targetClientRect;return r&&(e=(r=nm(e)?{left:(r=e.getBoundingClientRect()).left,top:r.top,width:r.width,height:r.height}:pA({width:0,height:0},e)).left,t=r.top,n=r.width,r=r.height,o=$g(Xg(i=Qg([i,o,s,a],u),[[e,t],[e+n,t],[e+n,t+r],[e,t+r]])),s=$g(i),o&&s)?Math.min(100,o/s*100):0},t.prototype.isInside=function(e,t){var n=(s=this.state).target,r=s.pos1,i=s.pos2,o=s.pos3,a=s.pos4,s=s.targetClientRect;return!!n&&qg([e,t],Qg([r,i,a,o],s))},t.prototype.updateRect=function(e,t,n){void 0===n&&(n=!0);var r=this.props,i=!r.parentPosition&&!r.wrapperMoveable,o=(i&&hv(!0),r.parentMoveable),a=this.state.target||r.target,s=this.getContainer(),u=(o||this)._rootContainer,c=xw(this.controlBox,a,s,s,u||s,this._getRequestStyles());if(!a&&this._hasFirstTarget&&r.persistData){var l,h=Cw(r.persistData);for(l in h)c[l]=h[l]}i&&hv(),this.updateState(c,!o&&n)},t.prototype.isDragging=function(e){var t=this.targetGesto,n=this.controlGesto;return null!=t&&t.isFlag()?!e||!(null==(t=t.getEventData()[e])||!t.isEventStart):!(null==n||!n.isFlag()||e&&(null==(t=n.getEventData()[e])||!t.isEventStart))},t.prototype.updateTarget=function(e){this.updateRect(e,!0)},t.prototype.getRect=function(){var e=this.state,t=(i=mA(o=ay(this.state),4))[0],n=i[1],r=i[2],i=i[3],o=Vb(o),a=e.width,s=e.height,u=o.width,c=o.height,l=o.left,h=(o=o.top,[e.left,e.top]),f=ug(h,e.origin);return{width:u,height:c,left:l,top:o,pos1:t,pos2:n,pos3:r,pos4:i,offsetWidth:a,offsetHeight:s,beforeOrigin:ug(h,e.beforeOrigin),origin:f,transformOrigin:e.transformOrigin,rotation:this.getRotation()}},t.prototype.getManager=function(){return this},t.prototype.stopDrag=function(e){var t;e&&"target"!==e||(!1===(null==(t=this.targetGesto)?void 0:t.isIdle())&&sy(this,!1),null!=t&&t.stop()),e&&"control"!==e||(!1===(null==(t=this.controlGesto)?void 0:t.isIdle())&&sy(this,!0),null!=t&&t.stop())},t.prototype.getRotation=function(){var e,t=(e=this.state).pos1,n=e.pos2;return e=e=e.direction,t=Up(t=t,n)/Math.PI*180,0<=(t=0<=e?t:180-t)?t:360+t},t.prototype.request=function(e,t,n){void 0===t&&(t={});var r,i,o,a,s,u=this,c=(h=u.props).parentMoveable||h.wrapperMoveable||u,l=c.props.ables,h=h.groupable;l=Bp(l,(function(t){return t.name===e}));return!this.isDragging()&&l&&l.request?(r=l.request(u),i=n||t.isInstant,l=r.isControl?"controlAbles":"targetAbles",o="".concat(h?"Group":"").concat(r.isControl?"Control":""),a=gA([],mA(c[l]),!1),s={request:function(t){return gw(u,a,["drag"],o,"",pA(pA({},r.request(t)),{requestAble:e,isRequest:!0}),i),s},requestEnd:function(){return gw(u,a,["drag"],o,"End",pA(pA({},r.requestEnd()),{requestAble:e,isRequest:!0}),i),s}},gw(u,a,["drag"],o,"Start",pA(pA({},r.requestStart(t)),{requestAble:e,isRequest:!0}),i),i?s.request(t).requestEnd():s):{request:function(){return this},requestEnd:function(){return this}}},t.prototype.getMoveables=function(){return[this]},t.prototype.destroy=function(){this.componentWillUnmount()},t.prototype.updateRenderPoses=function(){var e,t,n,r=this.getState(),i=this.props,o=i.padding,a=r.originalBeforeOrigin,s=r.transformOrigin,u=r.allMatrix,c=r.is3d,l=r.pos1,h=r.pos2,f=r.pos3,d=r.pos4,p=r.left,m=r.top,g=r.isPersisted;o?(e=(o=Py(o)).left,t=o.top,n=o.bottom,o=o.right,g=ag(c=c?4:3,xg((g?s:this.controlBox&&i.groupable?a:ug(a,[p,m])).map((function(e){return-e})),c),u,xg(s,c)),r.renderPoses=[Cy(g,l,[-e,-t],c),Cy(g,h,[o,-t],c),Cy(g,f,[-e,n],c),Cy(g,d,[o,n],c)]):r.renderPoses=[l,h,f,d]},t.prototype.checkUpdate=function(){this._isPropTargetChanged=!1;var e=(n=this.props).target,t=n.container,n=n.parentMoveable,r=(i=this.state).target,i=i.container;(r||e)&&(this.updateAbles(),!(r=!Ay(r,e))&&Ay(i,t)||((i=t||this.controlBox)&&this.unsetAbles(),this.updateState({target:e,container:t}),!n&&i&&this.updateRect("End",!1,!1),this._isPropTargetChanged=r))},t.prototype.waitToChangeTarget=function(){return new Promise((function(){}))},t.prototype.triggerEvent=function(e,t){var n=this.props;return this._emitter.trigger(e,t),n.parentMoveable&&t.isRequest&&!t.isRequestChild?n.parentMoveable.triggerEvent(e,t,!0):(n=n[e])&&n(t)},t.prototype.useCSS=function(e,t){var n=this.props.customStyledMap,r=e+t;return n[r]||(n[r]=hA(e,t)),n[r]},t.prototype.getState=function(){var e,t=(((e=this.props).target||null!=(t=e.targets)&&t.length)&&(this._hasFirstTarget=!0),this.controlBox),n=e.persistData;return(e=e.firstRenderState)&&!t?e:!this._hasFirstTarget&&n&&(t=Cw(n))?(this.updateState(t,!1),this.state):(this.state.isPersisted=!1,this.state)},t.prototype.updateSelectors=function(){},t.prototype.unsetAbles=function(){var e=this;this.targetAbles.forEach((function(t){t.unset&&t.unset(e)}))},t.prototype.updateAbles=function(e,t){void 0===e&&(e=this.props.ables),void 0===t&&(t="");var n=this.props.triggerAblesSimultaneously,r=(e=this.getEnabledAbles(e),"drag".concat(t,"Start")),i="pinch".concat(t,"Start");t="drag".concat(t,"ControlStart"),r=gy(e,[r,i],n),i=gy(e,[t],n);this.enabledAbles=e,this.targetAbles=r,this.controlAbles=i},t.prototype.updateState=function(e,t){if(t)this.isUnmounted||this.setState(e);else{var n,r=this.state;for(n in e)r[n]=e[n]}},t.prototype.getEnabledAbles=function(e){void 0===e&&(e=this.props.ables);var t=this.props;return e.filter((function(e){return e&&(e.always&&!1!==t[e.name]||t[e.name])}))},t.prototype.renderAbles=function(){var e,t,n,r,i=this,o=this.props.triggerAblesSimultaneously,a={createElement:Mm};return this.renderState={},e=by(gy(this.getEnabledAbles(),["render"],o).map((function(e){return(0,e.render)(i,a)||[]}))).filter((function(e){return e})),t=function(e){return e.key},n=[],r={},e.forEach((function(e,i){i=t(e);var o=r[i];o||(r[i]=o=[],n.push(o)),o.push(e)})),n.map((function(e){return e[0]}))},t.prototype.updateCheckInput=function(){this.targetGesto&&(this.targetGesto.options.checkInput=this.props.checkInput)},t.prototype._getRequestStyles=function(){return this.getEnabledAbles().reduce((function(e,t){var n;t=null!=(n=null==(n=t.requestStyle)?void 0:n.call(t))?n:[];return gA(gA([],mA(e),!1),mA(t),!1)}),gA([],mA(this.props.requestStyles||[]),!1))},t.prototype._updateObserver=function(e){this._updateResizeObserver(e),this._updateMutationObserver(e)},t.prototype._updateEvents=function(){var e=this.controlBox,t=this.targetAbles.length,n=this.controlAbles.length,r=this._dragTarget;(!t&&this.targetGesto||this._isTargetChanged(!0))&&(uy(this,!1),this.updateState({gestos:{}})),n||uy(this,!0),r&&t&&!this.targetGesto&&(this.targetGesto=vw(this,r,"")),!this.controlGesto&&n&&(this.controlGesto=bw(this,e,"controlAbles","Control"))},t.prototype._updateTargets=function(){var e=this.props;this._prevPropTarget=this._propTarget,this._prevDragTarget=this._dragTarget,this._prevOriginalDragTarget=this._originalDragTarget,this._prevDragArea=e.dragArea,this._propTarget=e.target,this._originalDragTarget=e.dragTarget||e.target,this._dragTarget=Oy(this._originalDragTarget,!0)},t.prototype._renderLines=function(){var e,t,n=(o=this.props).zoom,r=o.hideDefaultLines,i=o.hideChildMoveableDefaultLines,o=o.parentMoveable;return r||o&&i?[]:(e=this.getState().renderPoses,t={createElement:Mm},[[0,1],[1,3],[3,2],[2,0]].map((function(r,i){var o=(r=mA(r,2))[0];r=r[1];return bv(t,"",e[o],e[r],n,"render-line-".concat(i))})))},t.prototype._isTargetChanged=function(e){var t,n=(t=this.props).dragTarget||t.target,r=this._prevOriginalDragTarget,i=this._prevDragArea;return!(t=t.dragArea)&&r!==n||(e||t)&&i!==t||this._prevPropTarget!=this._propTarget},t.prototype._updateNativeEvents=function(){var e,t=this,n=this.props.dragArea?this.areaElement:this.state.target,r=this.events,i=jp(r);if(this._isTargetChanged())for(var o in r){var a=r[o];a&&a.destroy(),r[o]=null}n&&(e=this.enabledAbles,i.forEach((function(i){var o=gy(e,[i]),a=0<o.length,s=r[i];a?(s||(s=new yw(n,t,i),r[i]=s),s.setAbles(o)):s&&(s.destroy(),r[i]=null)})))},t.prototype._checkUpdateRootContainer=function(){var e=this.props.rootContainer;!this._rootContainer&&e&&(this._rootContainer=Oy(e,!0))},t.prototype._checkUpdateViewContainer=function(){var e=this.props.viewContainer;!this._viewContainer&&e&&(this._viewContainer=Oy(e,!0)),this._viewContainer&&this._changeAbleViewClassNames(gA(gA([],mA(this._getAbleViewClassNames()),!1),[this.isDragging()?Qy:""],!1))},t.prototype._changeAbleViewClassNames=function(e){var t=this._viewContainer,n=vy(e.filter(Boolean),(function(e){return e})).map((function(e){return mA(e,1)[0]})),r=this._viewClassNames,i=(e=um(r,n)).removed;e=e.added;i.forEach((function(e){Wp(t,r[e])})),e.forEach((function(e){Gp(t,n[e])})),this._viewClassNames=n},t.prototype._getAbleViewClassNames=function(){var e=this;return(this.getEnabledAbles().map((function(t){var n;return(null==(n=t.viewClassName)?void 0:n.call(t,e))||""})).join(" ")+" ".concat(this._getAbleClassName("-view"))).split(/\s+/g)},t.prototype._getAbleClassName=function(e){var t=this,n=(void 0===e&&(e=""),this.getEnabledAbles()),r=this.targetGesto,i=this.controlGesto,o=null!=r&&r.isFlag()?r.getEventData():{},a=null!=i&&i.isFlag()?i.getEventData():{};return n.map((function(n){var r=n.name,i=(null==(i=n.className)?void 0:i.call(n,t))||"";return(null!=(n=o[r])&&n.isEventStart||null!=(n=a[r])&&n.isEventStart)&&(i+=" ".concat(Mb("".concat(r).concat(e,"-dragging")))),i.trim()})).filter(Boolean).join(" ")},t.prototype._updateResizeObserver=function(e){var t=this.props,n=t.target,r=em(this.getControlBoxElement());r.ResizeObserver&&n&&t.useResizeObserver?e.target===n&&this._reiszeObserver||((t=new r.ResizeObserver(this.checkUpdateRect)).observe(n,{box:"border-box"}),this._reiszeObserver=t):null!=(e=this._reiszeObserver)&&e.disconnect()},t.prototype._updateMutationObserver=function(e){var t=this,n=this.props,r=n.target,i=em(this.getControlBoxElement());i.MutationObserver&&r&&n.useMutationObserver?e.target===r&&this._mutationObserver||((n=new i.MutationObserver((function(e){var n,r;try{for(var i=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&r>=e.length?void 0:e)&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),o=i.next();!o.done;o=i.next()){var a=o.value;"attributes"===a.type&&"style"===a.attributeName&&t.checkUpdateRect()}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}))).observe(r,{attributes:!0}),this._mutationObserver=n):null!=(e=this._mutationObserver)&&e.disconnect()},t.defaultProps={dragTargetSelf:!1,target:null,dragTarget:null,container:null,rootContainer:null,origin:!0,parentMoveable:null,wrapperMoveable:null,isWrapperMounted:!1,parentPosition:null,warpSelf:!1,svgOrigin:"",dragContainer:null,useResizeObserver:!1,useMutationObserver:!1,preventDefault:!0,linePadding:0,controlPadding:0,ables:[],pinchThreshold:20,dragArea:!1,passDragArea:!1,transformOrigin:"",className:"",zoom:1,triggerAblesSimultaneously:!1,padding:{},pinchOutside:!0,checkInput:!1,dragFocusedInput:!1,groupable:!1,hideDefaultLines:!1,cspNonce:"",translateZ:0,cssStyled:null,customStyledMap:{},props:{},stopPropagation:!1,preventClickDefault:!1,preventClickEventOnDrag:!0,flushSync:jb,firstRenderState:null,persistData:null,viewContainer:null,requestStyles:[],useAccuratePosition:!1},t}(Ua),Ew={name:"groupable",props:["defaultGroupRotate","useDefaultGroupRotate","defaultGroupOrigin","groupable","groupableProps","targetGroups","hideChildMoveableDefaultLines"],events:[],render:function(e,t){var n,r=e.props,i=r.targets||[],o=(s=e.getState()).left,a=s.top,s=s.isPersisted,u=r.zoom||1,c=e.renderGroupRects,l=(null==(n=r.persistData)?void 0:n.children)||[],h=(s?i=l.map((function(){return null})):l=[],jy(e,"parentPosition",[o,a],(function(e){return e.join(",")}))),f=jy(e,"requestStyles",e.getRequestChildStyles(),(function(e){return e.join(",")}));return e.moveables=e.moveables.slice(0,i.length),gA(gA([],mA(i.map((function(n,i){return t.createElement(kw,{key:"moveable"+i,ref:ap(e,"moveables",i),target:n,origin:!1,requestStyles:f,cssStyled:r.cssStyled,customStyledMap:r.customStyledMap,useResizeObserver:r.useResizeObserver,useMutationObserver:r.useMutationObserver,hideChildMoveableDefaultLines:r.hideChildMoveableDefaultLines,parentMoveable:e,parentPosition:[o,a],persistData:l[i],zoom:u})}))),!1),mA(by(c.map((function(e,n){var r=[e.pos1,e.pos2,e.pos3,e.pos4];return[[0,1],[1,3],[3,2],[2,0]].map((function(e,i){var o=(e=mA(e,2))[0];e=e[1];return bv(t,"",cg(r[o],h),cg(r[e],h),u,"group-rect-".concat(n,"-").concat(i))}))})))),!1)}};aa=AA("clickable",{props:["clickable"],events:["click","clickGroup"],always:!0,dragRelation:"weak",dragStart:function(){},dragControlStart:function(){},dragGroupStart:function(e,t){t.datas.inputTarget=t.inputEvent&&t.inputEvent.target},dragEnd:function(e,t){var n=e.props.target,r=t.inputEvent,i=t.inputTarget,o=!e.isMoveableElement(i)&&e.controlBox.contains(i);!r||!i||t.isDrag||e.isMoveableElement(i)||o||(r=n.contains(i),py(e,"onClick",hy(e,t,{isDouble:t.isDouble,inputTarget:i,isTarget:n===i,moveableTarget:e.props.target,containsTarget:r})))},dragGroupEnd:function(e,t){var n,r,i,o=t.inputEvent,a=t.inputTarget;o&&a&&!t.isDrag&&!e.isMoveableElement(a)&&t.datas.inputTarget!==a&&(r=-1<(n=(o=e.props.targets).indexOf(a)),i=!1,-1===n&&(i=-1<(n=Dp(o,(function(e){return e.contains(a)})))),py(e,"onClickGroup",hy(e,t,{isDouble:t.isDouble,targets:o,inputTarget:a,targetIndex:n,isTarget:r,containsTarget:i,moveableTarget:o[n]})))},dragControlEnd:function(e,t){this.dragEnd(e,t)},dragGroupControlEnd:function(e,t){this.dragEnd(e,t)}});function Sw(e){var t=e.originalDatas.draggable;return t||(e.originalDatas.draggable={},t=e.originalDatas.draggable),pA(pA({},e),{datas:t})}zi=AA("edgeDraggable",{css:[".edge.edgeDraggable.line {\ncursor: move;\n}"],render:function(e,t){var n=e.props,r=n.edgeDraggable;return r?yv(t,"edgeDraggable",r,e.getState().renderPoses,n.zoom):[]},dragCondition:function(e,t){return e=e.props,t=null==(t=t.inputEvent)?void 0:t.target,!(!e.edgeDraggable||!t)&&!e.draggable&&qp(t,Mb("direction"))&&qp(t,Mb("edge"))&&qp(t,Mb("edgeDraggable"))},dragStart:function(e,t){return ib.dragStart(e,Sw(t))},drag:function(e,t){return ib.drag(e,Sw(t))},dragEnd:function(e,t){return ib.dragEnd(e,Sw(t))},dragGroupCondition:function(e,t){return e=e.props,t=null==(t=t.inputEvent)?void 0:t.target,!(!e.edgeDraggable||!t)&&!e.draggable&&qp(t,Mb("direction"))&&qp(t,Mb("line"))},dragGroupStart:function(e,t){return ib.dragGroupStart(e,Sw(t))},dragGroup:function(e,t){return ib.dragGroup(e,Sw(t))},dragGroupEnd:function(e,t){return ib.dragGroupEnd(e,Sw(t))},unset:function(e){return ib.unset(e)}});var _w={name:"individualGroupable",props:["individualGroupable","individualGroupableProps"],events:[]},Ow=[pw,Ky,Ta,Ae,ib,zi,sb,ca,Wo,Yo,ha,Va,Ia,ia,Ga,Ko,Ew,_w,aa,Gy,mw];Ca=Ow.reduce((function(e,t){return(t.events||[]).forEach((function(t){Vp(e,t)})),e}),[]),Wa=Ow.reduce((function(e,t){return(t.props||[]).forEach((function(t){Vp(e,t)})),e}),[]);function Tw(e,t){var n=(e=mA(e,3))[0],r=e[1];e=e[2];return(n*t[0]+r*t[1]+e)/Math.sqrt(n*n+r*r)}function Dw(e,t){var n=(e=mA(e,2))[0];e=e[1];return-n*t[0]-e*t[1]}function Bw(e,t){return Math.max.apply(Math,gA([],mA(e.map((function(e){var n=(e=mA(e,4))[0],r=e[1],i=e[2];e=e[3];return Math.max(n[t],r[t],i[t],e[t])}))),!1))}function Iw(e,t){return Math.min.apply(Math,gA([],mA(e.map((function(e){var n=(e=mA(e,4))[0],r=e[1],i=e[2];e=e[3];return Math.min(n[t],r[t],i[t],e[t])}))),!1))}var Mw=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.differ=new Mg,t.moveables=[],t.transformOrigin="50% 50%",t.renderGroupRects=[],t._targetGroups=[],t._hasFirstTargets=!1,t}return dA(t,e),t.prototype.componentDidMount=function(){e.prototype.componentDidMount.call(this)},t.prototype.checkUpdate=function(){this._isPropTargetChanged=!1,this.updateAbles()},t.prototype.getTargets=function(){return this.props.targets},t.prototype.updateRect=function(e,t,n){void 0===n&&(n=!0);var r,i,o,a,s,u,c,l,h,f,d,p,m,g,A,v,b,y,w=this.state;this.controlBox&&!w.isPersisted&&(hv(!0),this.moveables.forEach((function(t){t.updateRect(e,!1,!1)})),y=this.props,c=this.moveables,r=w.target||y.target,p=function e(t,n){return 1===(n=n.map((function(n){var r,i;return Ap(n)?1<(i=(r=e(t,n)).length)?r:1===i?r[0]:null:(i=Bp(t,(function(e){return e.manager.props.target===n})))?(i.finded=!0,i.manager):null})).filter(Boolean)).length&&Ap(n[0])?n[0]:n}(c=c.map((function(e){return{finded:!1,manager:e}})),g=this.props.targetGroups||[]),i=y.useDefaultGroupRotate,p.push.apply(p,gA([],mA(c.filter((function(e){return!e.finded})).map((function(e){return e.manager}))),!1)),o=[],a=!t||""!==e&&y.updateGroup,s=y.defaultGroupRotate||0,this._hasFirstTargets||null!=(t=null==(c=y.persistData)?void 0:c.rotation)&&(s=t),c=function e(t,n,r){var u,c,l,h,f,d,p,m,g,A,v,b,y,w,x,C=0,k=(E=(t=t.map((function(t){var r,i;return Ap(t)?(i=[(r=e(t,n)).pos1,r.pos2,r.pos3,r.pos4],o.push(r),{poses:i,rotation:r.rotation}):{poses:ay(t.state),rotation:t.getRotation()}}))).map((function(e){return e.rotation})))[0],E=E.every((function(e){return Math.abs(k-e)<.1}));C=a?!i&&E?k:s:i||r||!E?n:k,r=t.map((function(e){return e.poses}));return E=C,t=[0,0],C=[0,0],b=[0,0],y=[0,0],x=w=0,r.length?((u=$p(E,TA))%90?(g=u/180*Math.PI,c=Math.tan(g),l=-1/c,h=[DA,BA],f=[[0,0],[0,0]],d=[DA,BA],p=[[0,0],[0,0]],r.forEach((function(e){e.forEach((function(e){var t=Tw([-c,1,0],e),n=Tw([-l,1,0],e);h[0]>t&&(f[0]=e,h[0]=t),h[1]<t&&(f[1]=e,h[1]=t),d[0]>n&&(p[0]=e,d[0]=n),d[1]<n&&(p[1]=e,d[1]=n)}))})),A=(g=mA(f,2))[0],g=g[1],m=(v=mA(p,2))[0],v=v[1],A=[-c,1,Dw([-c,1],A)],g=[-c,1,Dw([-c,1],g)],t=(v=mA([[A,m=[-l,1,Dw([-l,1],m)]],[A,A=[-l,1,Dw([-l,1],v)]],[g,m],[g,A]].map((function(e){return Wg((e=mA(e,2))[0],e[1])[0]})),4))[0],C=v[1],b=v[2],y=v[3],w=d[1]-d[0],x=h[1]-h[0]):(t=[m=Iw(r,0),g=Iw(r,1)],C=[A=Bw(r,0),g],b=[m,v=Bw(r,1)],y=[A,v],w=A-m,x=v-g,u%180&&(t=(r=mA([b,t,y,C],4))[0],C=r[1],b=r[2],y=r[3],w=v-g,x=A-m)),180<u%360&&(t=(r=mA([y,b,C,t],4))[0],C=r[1],b=r[2],y=r[3]),{pos1:t,pos2:C,pos3:b,pos4:y,width:w,height:x,minX:(v=Vg([t,C,b,y])).minX,minY:v.minY,maxX:v.maxX,maxY:v.maxY,rotation:E}):{pos1:t,pos2:C,pos3:b,pos4:y,minX:0,minY:0,maxX:0,maxY:0,width:w,height:x,rotation:E}}(p,this.rotation,!0),a&&(this.rotation=c.rotation,this.transformOrigin=y.defaultGroupOrigin||"50% 50%",this.scale=[1,1]),this._targetGroups=g,this.renderGroupRects=o,t=this.transformOrigin,p=this.rotation,y=this.scale,g=c.width,A=c.height,u=c.minX,c=c.minY,d=[[0,0],[g,0],[0,A],[g,A]],l=My(t,g,A),h=this.rotation/180*Math.PI,f=(d=d.map((function(e){return cg(e,l)}))).map((function(e){return gg(e,h)})),f=(d=Vg(f.map((function(e){return ug(e,l)})))).minX,d=d.minY,p=" rotate(".concat(p,"deg)")+" scale(".concat(Ny(y[0]),", ").concat(Ny(y[1]),")"),m="translate(".concat(-f,"px, ").concat(-d,"px)").concat(p),this.controlBox.style.transform="translate3d(".concat(u,"px, ").concat(c,"px, ").concat(this.props.translateZ||0,")"),r.style.cssText+="left:0px;top:0px;"+"transform-origin:".concat(t,";")+"width:".concat(g,"px;height:").concat(A,"px;")+"transform: ".concat(m),w.width=g,w.height=A,t=this.getContainer(),g=[(m=xw(this.controlBox,r,this.controlBox,this.getContainer(),this._rootContainer||t,[])).left,m.top],b=[(b=Vg([A=(w=mA(ay(m),4))[0],t=w[1],v=w[2],w=w[3]])).minX,b.minY],y=Ny(y[0]*y[1]),m.pos1=cg(A,b),m.pos2=cg(t,b),m.pos3=cg(v,b),m.pos4=cg(w,b),m.left=u-m.left+b[0],m.top=c-m.top+b[1],m.origin=cg(ug(g,m.origin),b),m.beforeOrigin=cg(ug(g,m.beforeOrigin),b),m.originalBeforeOrigin=ug(g,m.originalBeforeOrigin),m.transformOrigin=cg(ug(g,m.transformOrigin),b),r.style.transform="translate(".concat(-f-b[0],"px, ").concat(-d-b[1],"px)")+p,hv(),this.updateState(pA(pA({},m),{posDelta:b,direction:y,beforeDirection:y}),n))},t.prototype.getRect=function(){return pA(pA({},e.prototype.getRect.call(this)),{children:this.moveables.map((function(e){return e.getRect()}))})},t.prototype.triggerEvent=function(t,n,r){if(r||-1<t.indexOf("Group"))return e.prototype.triggerEvent.call(this,t,n);this._emitter.trigger(t,n)},t.prototype.getRequestChildStyles=function(){return this.getEnabledAbles().reduce((function(e,t){var n;t=null!=(n=null==(n=t.requestChildStyle)?void 0:n.call(t))?n:[];return gA(gA([],mA(e),!1),mA(t),!1)}),[])},t.prototype.getMoveables=function(){return gA([],mA(this.moveables),!1)},t.prototype.updateAbles=function(){e.prototype.updateAbles.call(this,gA(gA([],mA(this.props.ables),!1),[Ew],!1),"Group")},t.prototype._updateTargets=function(){e.prototype._updateTargets.call(this),this._originalDragTarget=this.props.dragTarget||this.areaElement,this._dragTarget=Oy(this._originalDragTarget,!0)},t.prototype._updateEvents=function(){var e=this.state,t=this.props,n=this._prevDragTarget,r=t.dragTarget||this.areaElement,i=t.targets,o=(s=this.differ.update(i)).added,a=s.changed,s=s.removed;(s=(!(o=o.length||s.length)&&this._prevOriginalDragTarget===this._originalDragTarget||(uy(this,!1),uy(this,!0),this.updateState({gestos:{}})),n!==r&&(e.target=null),e.target||(e.target=this.areaElement,this.controlBox.style.display="block"),e.target&&(this.targetGesto||(this.targetGesto=vw(this,this._dragTarget,"Group")),this.controlGesto||(this.controlGesto=bw(this,this.controlBox,"controlAbles","GroupControl"))),!Ay(e.container,t.container)))&&(e.container=t.container),(s||o||this.transformOrigin!==(t.defaultGroupOrigin||"50% 50%")||a.length||i.length&&!function e(t,n){return t.length===n.length&&t.every((function(t,r){r=n[r];var i=Ap(t),o=Ap(r);return i&&o?e(t,r):!i&&!o&&t===r}))}(this._targetGroups,t.targetGroups||[]))&&(this.updateRect(),this._hasFirstTargets=!0),this._isPropTargetChanged=!!o},t.prototype._updateObserver=function(){},t.defaultProps=pA(pA({},kw.defaultProps),{transformOrigin:["50%","50%"],groupable:!0,dragArea:!0,keepRatio:!0,targets:[],defaultGroupRotate:0,defaultGroupOrigin:"50% 50%"}),t}(kw),jw=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.moveables=[],t}return dA(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.cspNonce,r=t.cssStyled,i=t.persistData,o=t.targets||[],a=o.length,s=this.isUnmounted||!a,u=null!=(i=null==i?void 0:i.children)?i:[];return s&&!a&&u.length?o=u.map((function(){return null})):s||(u=[]),Mm(r,{cspNonce:n,ref:op(this,"controlBox"),className:Mb("control-box")},o.map((function(n,r){var i=null!=(i=null==(i=t.individualGroupableProps)?void 0:i.call(t,n,r))?i:{};return Mm(kw,pA({key:"moveable"+r,ref:ap(e,"moveables",r)},t,i,{target:n,wrapperMoveable:e,isWrapperMounted:e.isMoveableMounted,persistData:u[r]}))})))},t.prototype.componentDidMount=function(){},t.prototype.componentDidUpdate=function(){},t.prototype.getTargets=function(){return this.props.targets},t.prototype.updateRect=function(e,t,n){void 0===n&&(n=!0),hv(!0),this.moveables.forEach((function(r){r.updateRect(e,t,n)})),hv()},t.prototype.getRect=function(){return pA(pA({},e.prototype.getRect.call(this)),{children:this.moveables.map((function(e){return e.getRect()}))})},t.prototype.request=function(e,t,n){void 0===t&&(t={});var r=this.moveables.map((function(n){return n.request(e,pA(pA({},t),{isInstant:!1}),!1)})),i={request:function(e){return r.forEach((function(t){return t.request(e)})),this},requestEnd:function(){return r.forEach((function(e){return e.requestEnd()})),this}};return n||t.isInstant?i.request(t).requestEnd():i},t.prototype.dragStart=function(e){var t=e.target,n=Bp(this.moveables,(function(e){var n=e.getTargets()[0],r=e.getControlBoxElement();e=e.getDragElement();return!(!n||!e)&&(e===t||e.contains(t)||e!==n&&n===t||n.contains(t)||r===t||r.contains(t))}));return n&&n.dragStart(e),this},t.prototype.hitTest=function(){return 0},t.prototype.isInside=function(){return!1},t.prototype.isDragging=function(){return!1},t.prototype.getDragElement=function(){return null},t.prototype.getMoveables=function(){return gA([],mA(this.moveables),!1)},t.prototype.updateRenderPoses=function(){},t.prototype.checkUpdate=function(){},t.prototype.triggerEvent=function(){},t.prototype.updateAbles=function(){},t.prototype._updateEvents=function(){},t.prototype._updateObserver=function(){},t}(kw),Nw=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return dA(t,e),t.defaultAbles=Ow,t}(Ea=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.refTargets=[],t.selectorMap={},t._differ=new Mg,t._elementTargets=[],t._tmpRefTargets=[],t._tmpSelectorMap={},t._onChangeTargets=null,t}var n,r;return dA(t,e),t.makeStyled=function(){var e={},t=(this.getTotalAbles().forEach((function(t){(t=t.css)&&t.forEach((function(t){e[t]=!0}))})),jp(e).join("\n"));this.defaultStyled=hA("div",(EA,(SA+t).replace(/([^}{]*){/gm,(function(e,t){return t.replace(/\.([^{,\s\d.]+)/g,".moveable-$1")+"{"}))))},t.getTotalAbles=function(){return gA([Ky,Ew,_w,Gy],mA(this.defaultAbles),!1)},t.prototype.render=function(){var e,t,n=(i=((u=this.constructor).defaultStyled||u.makeStyled(),this.props)).ables,r=i.props,i=function(e,t){var n={};for(i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]]);return n}(i,["ables","props"]),o=(t=mA(this._updateRefs(!0),2))[0],a=function e(t,n){var r=[];return t.forEach((function(t){t&&(vp(t)?n[t]&&r.push.apply(r,gA([],mA(n[t]),!1)):Ap(t)?r.push.apply(r,gA([],mA(e(t,n)),!1)):r.push(t))})),r}(o,t=t[1]),s=1<a.length,u=(n=gA(gA([],mA(u.getTotalAbles()),!1),mA(n||[]),!1),r=pA(pA(pA({},i),r||{}),{ables:n,cssStyled:u.defaultStyled,customStyledMap:u.customStyledMap}),n=(this._elementTargets=a,null),this.moveable),c=i.persistData;return null!=c&&c.children&&(s=!0),i.individualGroupable?Mm(jw,pA({key:"individual-group",ref:op(this,"moveable")},r,{target:null,targets:a})):s?(c=function e(t,n){var r=[];return t.forEach((function(t){t&&(vp(t)?n[t]&&r.push.apply(r,gA([],mA(n[t]),!1)):Ap(t)?r.push(e(t,n)):r.push(t))})),r}(o,t),!u||u.props.groupable||u.props.individualGroupable||(s=u.props.target)&&-1<a.indexOf(s)&&(n=pA({},u.state)),Mm(Mw,pA({key:"group",ref:op(this,"moveable")},r,null!=(o=i.groupableProps)?o:{},{target:null,targets:a,targetGroups:c,firstRenderState:n}))):(e=a[0],u&&(u.props.groupable||u.props.individualGroupable)&&(t=Bp(u.moveables||[],(function(t){return t.props.target===e})))&&(n=pA({},t.state)),Mm(kw,pA({key:"single",ref:op(this,"moveable")},r,{target:e,firstRenderState:n})))},t.prototype.componentDidMount=function(){this._checkChangeTargets()},t.prototype.componentDidUpdate=function(){this._checkChangeTargets()},t.prototype.componentWillUnmount=function(){this.selectorMap={},this.refTargets=[]},t.prototype.getTargets=function(){var e;return null!=(e=null==(e=this.moveable)?void 0:e.getTargets())?e:[]},t.prototype.updateSelectors=function(){this.selectorMap={},this._updateRefs()},t.prototype.waitToChangeTarget=function(){var e,t=this;return this._onChangeTargets=function(){t._onChangeTargets=null,e()},new Promise((function(t){e=t}))},t.prototype.waitToChangeTargets=function(){return this.waitToChangeTarget()},t.prototype.getManager=function(){return this.moveable},t.prototype.getMoveables=function(){return this.moveable.getMoveables()},t.prototype.getDragElement=function(){return this.moveable.getDragElement()},t.prototype._updateRefs=function(e){var t=this.refTargets,n=Ty(this.props.target||this.props.targets),r="undefined"!=typeof document,i=function e(t,n){return t.length!==n.length||t.some((function(t,r){return r=n[r],!(!t&&!r)&&t!=r&&(!Ap(t)||!Ap(r)||e(t,r))}))}(t,n),o=this.selectorMap,a={};return this.refTargets.forEach((function e(t){vp(t)?o[t]?a[t]=o[t]:r&&(i=!0,a[t]=[].slice.call(document.querySelectorAll(t))):Ap(t)&&t.forEach(e)})),[this._tmpRefTargets=n,this._tmpSelectorMap=a,!e&&i]},t.prototype._checkChangeTargets=function(){this.refTargets=this._tmpRefTargets,this.selectorMap=this._tmpSelectorMap;var e=(t=this._differ.update(this._elementTargets)).added,t=t.removed,n=(t=(e=((e.length||t.length)&&(null!=(t=(e=this.props).onChangeTargets)&&t.call(e,{moveable:this.moveable,targets:this._elementTargets}),null!=(t=this._onChangeTargets)&&t.call(this)),mA(this._updateRefs(),3)))[0],e[1]);e=e[2];this.refTargets=t,this.selectorMap=n,e&&this.forceUpdate()},t.defaultAbles=[],t.customStyledMap={},t.defaultStyled=null,function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;0<=s;s--)(i=e[s])&&(a=(o<3?i(a):3<o?i(t,n,a):i(t,n))||a);3<o&&a&&Object.defineProperty(t,n,a)}([(n=NA,void 0===r&&(r={}),function(e,t){n.forEach((function(n){var i=r[n]||n;i in e||(e[i]=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var i=(i=this[t])[n].apply(i,e);return i===this[t]?this:i})}))})],t.prototype,"moveable",void 0),t}(Ua)),Fw=function(e,t){return(Fw=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function Rw(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Fw(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Pw=function(){return(Pw=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},Lw=function(e){function t(t){return(t=e.call(this,t)||this).state={},t.state=t.props,t}return Rw(t,e),t.prototype.render=function(){return Mm(Nw,Pw({ref:op(this,"moveable")},this.state))},t}(_m),Uw=Wa,zw=NA,Hw=Ca,$w=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Rw(t,e),t}(function(e){function t(t,n){void 0===n&&(n={});var r,i=e.call(this)||this,o=(i.containerProvider=null,i.selfElement=null,i._warp=!1,Pw({},n)),a={};return Ap(n=(Hw.forEach((function(e){a[_p("on ".concat(e))]=function(t){return i.trigger(e,t)}})),n.warpSelf?(delete n.warpSelf,i._warp=!0,r=t):(r=Xp(t).createElement("div"),t.appendChild(r)),i.containerProvider=Pm(Mm(Lw,Pw({ref:op(i,"innerMoveable")},o,a)),r),i.selfElement=r,o.target))&&1<n.length&&i.updateRect(),i}Rw(t,e);var n=t.prototype;return n.setState=function(e,t){this.innerMoveable.setState(e,t)},n.forceUpdate=function(e){this.innerMoveable.forceUpdate(e)},n.dragStart=function(e){this.innerMoveable.$_timer&&this.forceUpdate(),this.getMoveable().dragStart(e)},n.destroy=function(){var e,t=this.selfElement;Pm(null,t,this.containerProvider),this._warp||null!=(e=null==t?void 0:t.parentElement)&&e.removeChild(t),this.containerProvider=null,this.off(),this.selfElement=null,this.innerMoveable=null},n.getMoveable=function(){return this.innerMoveable.moveable},function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;0<=s;s--)(i=e[s])&&(a=(o<3?i(a):3<o?i(t,n,a):i(t,n))||a);return 3<o&&a&&Object.defineProperty(t,n,a),a}([sp(zw,(function(e,t){e[t]||(e[t]=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=this.getMoveable();if(r&&r[t])return r[t].apply(r,e)})})),sp(Uw,(function(e,t){Object.defineProperty(e,t,{get:function(){return this.getMoveable().props[t]},set:function(e){var n;this.setState(((n={})[t]=e,n))},enumerable:!0,configurable:!0})}))],t)}(Ng)),Qw=($o=n(32),n.n($o));function Vw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var qw={draggable:!0,resizable:!0,scalable:!1,rotatable:!1,warpable:!1,pinchable:!1,origin:!1,position:"absolute",snappable:!1,keepRatio:!1,edge:!1,zIndex:99,throttleResize:1,renderDirections:["nw","n","ne","w","e","sw","s","se"]},Gw=function(){function e(t,n,r,i){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.options=t=t||qw,this.moveable=null,this.data=r,this.$parent=i,this.init(n)}var t,n;return t=e,(n=[{key:"init",value:function(e){var t=this;setTimeout((function(){var n;(n=((n=Qw.a.cloneDeep(t.options)).container=e,n.target=[],new $w(e,n))).selfElement.classList.add("".concat(pe,"-moveable_zindex")),(t.moveable=n).on("drag",(function(e){var n,r=e.target,i=e.left;e=e.top;(n=(0==(n=t.data.scroll).x&&i<0&&(i=0),0==n.y&&e<0&&(e=0),t.$parent.getSelectedChart()))&&(n.charts.position.x=i,n.charts.position.y=e),r.style.left="".concat(i,"px"),r.style.top="".concat(e,"px")})).on("dragEnd",(function(e){e.target,e.isDrag,e.clientX,e.clientY})).on("dragStart",(function(e){e.target,e.clientX,e.clientY})),n.on("resizeStart",(function(e){e.target,e.clientX,e.clientY})).on("resize",(function(e){var n=e.target,r=e.width,i=e.height,o=(e.dist,e.delta);(e=(e.clientX,e.clientY,o[0]&&(n.style.width="".concat(r,"px")),o[1]&&(n.style.height="".concat(i,"px")),t.$parent.getSelectedChart()))&&(n=e.charts.chartEl.el,i-=40,e.charts.position.w=r-=40,e.charts.position.h=i,e.charts.isSelector()&&(i-=35),o[0]&&(n.style.width=r+"px"),o[1]&&(n.style.height=i+"px"))})).on("resizeEnd",(function(e){e.target,e.isDrag,e.clientX,e.clientY,(e=t.$parent.getSelectedChart())&&e.charts.resize()}))}))}}])&&Vw(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),Ww=function(e,t){return(Ww=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function Kw(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Ww(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}Object.create,Object.create;var Yw=n(26),Xw=n(1),Jw=function(e,t){return(Jw=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function Zw(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Jw(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function ex(e,t){return[e=null==e?0:e,t=null==t?0:t]}function tx(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e}function nx(e,t,n){e[0]=t[0]*n,e[1]=t[1]*n}function rx(e,t){return Math.sqrt((e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1]))}Object.create,Object.create;var ix=rx,ox=function(e,t){return(e[0]-t[0])*(e[0]-t[0])+(e[1]-t[1])*(e[1]-t[1])};function ax(e,t,n,r){return e[0]=t[0]+r*(n[0]-t[0]),e[1]=t[1]+r*(n[1]-t[1]),e}function sx(e,t,n){var r=t[0];t=t[1];return e[0]=n[0]*r+n[2]*t+n[4],e[1]=n[1]*r+n[3]*t+n[5],e}function ux(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e}function cx(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e}var lx=function(e,t){this.target=e,this.topTarget=t&&t.topTarget};function hx(e){(this.handler=e).on("mousedown",this._dragStart,this),e.on("mousemove",this._drag,this),e.on("mouseup",this._dragEnd,this)}hx.prototype._dragStart=function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent||t.__hostTarget;t&&((this._draggingTarget=t).dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new lx(t,e),"dragstart",e.event))},hx.prototype._drag=function(e){var t,n,r,i,o=this._draggingTarget;o&&(t=e.offsetX,n=e.offsetY,r=t-this._x,i=n-this._y,this._x=t,this._y=n,o.drift(r,i,e),this.handler.dispatchToElement(new lx(o,e),"drag",e.event),r=this.handler.findHover(t,n,o).target,i=this._dropTarget,o!==(this._dropTarget=r)&&(i&&r!==i&&this.handler.dispatchToElement(new lx(i,e),"dragleave",e.event),r&&r!==i&&this.handler.dispatchToElement(new lx(r,e),"dragenter",e.event)))},hx.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new lx(t,e),"dragend",e.event),this._dropTarget&&this.handler.dispatchToElement(new lx(this._dropTarget,e),"drop",e.event),this._draggingTarget=null,this._dropTarget=null};var fx=hx;function dx(e){e&&(this._$eventProcessor=e)}dx.prototype.on=function(e,t,n,r){this._$handlers||(this._$handlers={});var i=this._$handlers;if("function"==typeof t&&(r=n,n=t,t=null),n&&e){var o=this._$eventProcessor;null!=t&&o&&o.normalizeQuery&&(t=o.normalizeQuery(t)),i[e]||(i[e]=[]);for(var a=0;a<i[e].length;a++)if(i[e][a].h===n)return this;o={h:n,query:t,ctx:r||this,callAtLast:n.zrEventfulCallAtLast},t=i[e].length-1,(r=i[e][t])&&r.callAtLast?i[e].splice(t,0,o):i[e].push(o)}return this},dx.prototype.isSilent=function(e){var t=this._$handlers;return!t||!t[e]||!t[e].length},dx.prototype.off=function(e,t){var n=this._$handlers;if(n)if(e)if(t){if(n[e]){for(var r=[],i=0,o=n[e].length;i<o;i++)n[e][i].h!==t&&r.push(n[e][i]);n[e]=r}n[e]&&0===n[e].length&&delete n[e]}else delete n[e];else this._$handlers={};return this},dx.prototype.trigger=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(this._$handlers){var r=this._$handlers[e],i=this._$eventProcessor;if(r)for(var o=t.length,a=r.length,s=0;s<a;s++){var u=r[s];if(!i||!i.filter||null==u.query||i.filter(e,u.query))switch(o){case 0:u.h.call(u.ctx);break;case 1:u.h.call(u.ctx,t[0]);break;case 2:u.h.call(u.ctx,t[0],t[1]);break;default:u.h.apply(u.ctx,t)}}i&&i.afterTrigger&&i.afterTrigger(e)}return this},dx.prototype.triggerWithContext=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(this._$handlers){var r=this._$handlers[e],i=this._$eventProcessor;if(r)for(var o=t.length,a=t[o-1],s=r.length,u=0;u<s;u++){var c=r[u];if(!i||!i.filter||null==c.query||i.filter(e,c.query))switch(o){case 0:c.h.call(a);break;case 1:c.h.call(a,t[0]);break;case 2:c.h.call(a,t[0],t[1]);break;default:c.h.apply(a,t.slice(1,o-1))}}i&&i.afterTrigger&&i.afterTrigger(e)}return this};var px=dx,mx=Math.log(2);function gx(e,t,n,r,i,o){var a,s=r+"-"+i,u=e.length;if(o.hasOwnProperty(s))return o[s];if(1===t)return a=Math.round(Math.log((1<<u)-1&~i)/mx),e[n][a];for(var c=r|1<<n,l=n+1;r&1<<l;)l++;for(var h=0,f=0,d=0;f<u;f++){var p=1<<f;p&i||(h+=(d%2?-1:1)*e[n][f]*gx(e,t-1,l,c,i|p,o),d++)}return o[s]=h}function Ax(e,t){var n=[[e[0],e[1],1,0,0,0,-t[0]*e[0],-t[0]*e[1]],[0,0,0,e[0],e[1],1,-t[1]*e[0],-t[1]*e[1]],[e[2],e[3],1,0,0,0,-t[2]*e[2],-t[2]*e[3]],[0,0,0,e[2],e[3],1,-t[3]*e[2],-t[3]*e[3]],[e[4],e[5],1,0,0,0,-t[4]*e[4],-t[4]*e[5]],[0,0,0,e[4],e[5],1,-t[5]*e[4],-t[5]*e[5]],[e[6],e[7],1,0,0,0,-t[6]*e[6],-t[6]*e[7]],[0,0,0,e[6],e[7],1,-t[7]*e[6],-t[7]*e[7]]],r={},i=gx(n,8,0,0,0,r);if(0!==i){for(var o=[],a=0;a<8;a++)for(var s=0;s<8;s++)null==o[s]&&(o[s]=0),o[s]+=((a+s)%2?-1:1)*gx(n,7,0===a?1:0,1<<a,1<<s,r)/i*t[a];return function(e,t,n){var r=t*o[6]+n*o[7]+1;e[0]=(t*o[0]+n*o[1]+o[2])/r,e[1]=(t*o[3]+n*o[4]+o[5])/r}}}var vx="___zrEVENTSAVED",bx=[];function yx(e,t,n,r,i){if(t.getBoundingClientRect&&Yw.a.domSupported&&!wx(t)){var o=t[vx]||(t[vx]={});if(t=function(e,t,n){for(var r=n?"invTrans":"trans",i=t[r],o=t.srcCoords,a=[],s=[],u=!0,c=0;c<4;c++){var l=2*c,h=(f=e[c].getBoundingClientRect()).left,f=f.top;a.push(h,f),u=u&&o&&h===o[l]&&f===o[1+l],s.push(e[c].offsetLeft,e[c].offsetTop)}return u&&i?i:(t.srcCoords=a,t[r]=n?Ax(s,a):Ax(a,s))}(function(e,t){var n=t.markers;if(!n){n=t.markers=[];for(var r=["left","right"],i=["top","bottom"],o=0;o<4;o++){var a=document.createElement("div"),s=o%2,u=(o>>1)%2;a.style.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",r[s]+":0",i[u]+":0",r[1-s]+":auto",i[1-u]+":auto",""].join("!important;"),e.appendChild(a),n.push(a)}}return n}(t,o),o,i))return t(e,n,r),!0}return!1}function wx(e){return"CANVAS"===e.nodeName.toUpperCase()}var xx=/([&<>"'])/g,Cx={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function kx(e){return null==e?"":(e+"").replace(xx,(function(e,t){return Cx[t]}))}var Ex=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Sx=[],_x=Yw.a.browser.firefox&&+Yw.a.browser.version.split(".")[0]<39;function Ox(e,t,n,r){return n=n||{},r?Tx(e,t,n):_x&&null!=t.layerX&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):null!=t.offsetX?(n.zrX=t.offsetX,n.zrY=t.offsetY):Tx(e,t,n),n}function Tx(e,t,n){if(Yw.a.domSupported&&e.getBoundingClientRect){var r,i=t.clientX;t=t.clientY;if(wx(e))return r=e.getBoundingClientRect(),n.zrX=i-r.left,void(n.zrY=t-r.top);if(yx(Sx,e,i,t))return n.zrX=Sx[0],void(n.zrY=Sx[1])}n.zrX=n.zrY=0}function Dx(e){return e||window.event}function Bx(e,t,n){var r;return null==(t=Dx(t)).zrX&&((r=t.type)&&0<=r.indexOf("touch")?(r=("touchend"!==r?t.targetTouches:t.changedTouches)[0])&&Ox(e,r,t,n):(Ox(e,t,t,n),r=function(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX;e=e.deltaY;return null!=n&&null!=e?3*(0!==e?Math.abs(e):Math.abs(n))*(0<e||!(e<0)&&0<n?-1:1):t}(t),t.zrDelta=r?r/120:-(t.detail||0)/3),e=t.button,null==t.which&&void 0!==e&&Ex.test(t.type)&&(t.which=1&e?1:2&e?3:4&e?2:0)),t}var Ix=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};jx.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},jx.prototype.clear=function(){return this._track.length=0,this},jx.prototype._doTrack=function(e,t,n){var r=e.touches;if(r){for(var i={points:[],touches:[],target:t,event:e},o=0,a=r.length;o<a;o++){var s=r[o],u=Ox(n,s,{});i.points.push([u.zrX,u.zrY]),i.touches.push(s)}this._track.push(i)}},jx.prototype._recognize=function(e){for(var t in Fx)if(Fx.hasOwnProperty(t)&&(t=Fx[t](this._track,e)))return t};var Mx=jx;function jx(){this._track=[]}function Nx(e){var t=e[1][0]-e[0][0];e=e[1][1]-e[0][1];return Math.sqrt(t*t+e*e)}var Fx={pinch:function(e,t){var n,r=e.length;if(r)return n=(e[r-1]||{}).points,(r=(e[r-2]||{}).points||n)&&1<r.length&&n&&1<n.length?(r=Nx(n)/Nx(r),isFinite(r)||(r=1),t.pinchScale=r,r=[(n[0][0]+n[1][0])/2,(n[0][1]+n[1][1])/2],t.pinchX=r[0],t.pinchY=r[1],{type:"pinch",target:e[0].target,event:t}):void 0}};function Rx(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function Px(e,t,n){var r=t[0]*n[0]+t[2]*n[1],i=t[1]*n[0]+t[3]*n[1],o=t[0]*n[2]+t[2]*n[3],a=t[1]*n[2]+t[3]*n[3],s=t[0]*n[4]+t[2]*n[5]+t[4];n=t[1]*n[4]+t[3]*n[5]+t[5];return e[0]=r,e[1]=i,e[2]=o,e[3]=a,e[4]=s,e[5]=n,e}function Lx(e,t,n){e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+n[0],e[5]=t[5]+n[1]}function Ux(e,t,n){var r=t[0],i=t[2],o=t[4],a=t[1],s=t[3],u=(t=t[5],Math.sin(n));n=Math.cos(n);e[0]=r*n+a*u,e[1]=-r*u+a*n,e[2]=i*n+s*u,e[3]=-i*u+n*s,e[4]=n*o+u*t,e[5]=n*t-u*o}function zx(e,t){var n=t[0],r=t[2],i=t[4],o=t[1],a=t[3],s=(t=t[5],n*a-o*r);return s?(e[0]=a*(s=1/s),e[1]=-o*s,e[2]=-r*s,e[3]=n*s,e[4]=(r*t-a*i)*s,e[5]=(o*i-n*t)*s,e):null}function Hx(e,t){this.x=e||0,this.y=t||0}Hx.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},Hx.prototype.clone=function(){return new Hx(this.x,this.y)},Hx.prototype.set=function(e,t){return this.x=e,this.y=t,this},Hx.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},Hx.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},Hx.prototype.scale=function(e){this.x*=e,this.y*=e},Hx.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},Hx.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},Hx.prototype.dot=function(e){return this.x*e.x+this.y*e.y},Hx.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},Hx.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},Hx.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},Hx.prototype.distance=function(e){var t=this.x-e.x;e=this.y-e.y;return Math.sqrt(t*t+e*e)},Hx.prototype.distanceSquare=function(e){var t=this.x-e.x;return t*t+(e=this.y-e.y)*e},Hx.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},Hx.prototype.transform=function(e){var t,n;if(e)return t=this.x,n=this.y,this.x=e[0]*t+e[2]*n+e[4],this.y=e[1]*t+e[3]*n+e[5],this},Hx.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},Hx.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},Hx.set=function(e,t,n){e.x=t,e.y=n},Hx.copy=function(e,t){e.x=t.x,e.y=t.y},Hx.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},Hx.lenSquare=function(e){return e.x*e.x+e.y*e.y},Hx.dot=function(e,t){return e.x*t.x+e.y*t.y},Hx.add=function(e,t,n){e.x=t.x+n.x,e.y=t.y+n.y},Hx.sub=function(e,t,n){e.x=t.x-n.x,e.y=t.y-n.y},Hx.scale=function(e,t,n){e.x=t.x*n,e.y=t.y*n},Hx.scaleAndAdd=function(e,t,n,r){e.x=t.x+n.x*r,e.y=t.y+n.y*r},Hx.lerp=function(e,t,n,r){var i=1-r;e.x=i*t.x+r*n.x,e.y=i*t.y+r*n.y};var $x=Hx,Qx=Math.min,Vx=Math.max,qx=new $x,Gx=new $x,Wx=new $x,Kx=new $x,Yx=new $x,Xx=new $x;function Jx(e,t,n,r){n<0&&(e+=n,n=-n),r<0&&(t+=r,r=-r),this.x=e,this.y=t,this.width=n,this.height=r}Jx.prototype.union=function(e){var t=Qx(e.x,this.x),n=Qx(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Vx(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=Vx(e.y+e.height,this.y+this.height)-n:this.height=e.height,this.x=t,this.y=n},Jx.prototype.applyTransform=function(e){Jx.applyTransform(this,this,e)},Jx.prototype.calculateTransform=function(e){var t,n,r=e.width/this.width,i=e.height/this.height,o=[1,0,0,1,0,0];return Lx(o,o,[-this.x,-this.y]),n=t=o,i=(r=[r,i])[0],r=r[1],t[0]=n[0]*i,t[1]=n[1]*r,t[2]=n[2]*i,t[3]=n[3]*r,t[4]=n[4]*i,t[5]=n[5]*r,Lx(o,o,[e.x,e.y]),o},Jx.prototype.intersect=function(e,t){if(!e)return!1;e instanceof Jx||(e=Jx.create(e));var n,r,i,o,a,s,u,c,l=this.x,h=this.x+this.width,f=this.y,d=this.y+this.height,p=e.x,m=e.x+e.width,g=e.y,A=(e=e.y+e.height,!(h<p||m<l||d<g||e<f));return t&&(n=1/0,r=0,i=Math.abs(h-p),o=Math.abs(m-l),a=Math.abs(d-g),s=Math.abs(e-f),u=Math.min(i,o),c=Math.min(a,s),h<p||m<l?r<u&&(r=u,i<o?$x.set(Xx,-i,0):$x.set(Xx,o,0)):u<n&&(n=u,i<o?$x.set(Yx,i,0):$x.set(Yx,-o,0)),d<g||e<f?r<c&&(r=c,a<s?$x.set(Xx,0,-a):$x.set(Xx,0,s)):u<n&&(n=u,a<s?$x.set(Yx,0,a):$x.set(Yx,0,-s))),t&&$x.copy(t,A?Yx:Xx),A},Jx.prototype.contain=function(e,t){return e>=this.x&&e<=this.x+this.width&&t>=this.y&&t<=this.y+this.height},Jx.prototype.clone=function(){return new Jx(this.x,this.y,this.width,this.height)},Jx.prototype.copy=function(e){Jx.copy(this,e)},Jx.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},Jx.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},Jx.prototype.isZero=function(){return 0===this.width||0===this.height},Jx.create=function(e){return new Jx(e.x,e.y,e.width,e.height)},Jx.copy=function(e,t){e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height},Jx.applyTransform=function(e,t,n){var r,i,o,a;n?n[1]<1e-5&&-1e-5<n[1]&&n[2]<1e-5&&-1e-5<n[2]?(r=n[0],i=n[3],o=n[4],a=n[5],e.x=t.x*r+o,e.y=t.y*i+a,e.width=t.width*r,e.height=t.height*i,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height)):(qx.x=Wx.x=t.x,qx.y=Kx.y=t.y,Gx.x=Kx.x=t.x+t.width,Gx.y=Wx.y=t.y+t.height,qx.transform(n),Kx.transform(n),Gx.transform(n),Wx.transform(n),e.x=Qx(qx.x,Gx.x,Wx.x,Kx.x),e.y=Qx(qx.y,Gx.y,Wx.y,Kx.y),o=Vx(qx.x,Gx.x,Wx.x,Kx.x),a=Vx(qx.y,Gx.y,Wx.y,Kx.y),e.width=o-e.x,e.height=a-e.y):e!==t&&Jx.copy(e,t)};var Zx=Jx;function eC(){Ix(this.event)}Zw(rC,tC=px),rC.prototype.dispose=function(){},rC.prototype.setCursor=function(){};var tC,nC=rC;function rC(){var e=null!==tC&&tC.apply(this,arguments)||this;return e.handler=null,e}var iC,oC=function(e,t){this.x=e,this.y=t},aC=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],sC=new Zx(0,0,0,0),uC=(Zw(cC,iC=px),cC.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(Xw.k(aC,(function(t){e.on&&e.on(t,this[t],this)}),this),e.handler=this),this.proxy=e},cC.prototype.mousemove=function(e){var t,n=hC(this,o=e.zrX,t=e.zrY),r=this._hovered,i=r.target,o=(n=(i&&!i.__zr&&(i=(r=this.findHover(r.x,r.y)).target),this._hovered=n?new oC(o,t):this.findHover(o,t))).target;(t=this.proxy).setCursor&&t.setCursor(o?o.cursor:"default"),i&&o!==i&&this.dispatchToElement(r,"mouseout",e),this.dispatchToElement(n,"mousemove",e),o&&o!==i&&this.dispatchToElement(n,"mouseover",e)},cC.prototype.mouseout=function(e){var t=e.zrEventControl;"only_globalout"!==t&&this.dispatchToElement(this._hovered,"mouseout",e),"no_globalout"!==t&&this.trigger("globalout",{type:"globalout",event:e})},cC.prototype.resize=function(){this._hovered=new oC(0,0)},cC.prototype.dispatch=function(e,t){(e=this[e])&&e.call(this,t)},cC.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},cC.prototype.setCursorStyle=function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},cC.prototype.dispatchToElement=function(e,t,n){var r=(e=e||{}).target;if(!r||!r.silent){for(var i="on"+t,o={type:t,event:n,target:(e=e).target,topTarget:e.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:eC};r&&(r[i]&&(o.cancelBubble=!!r[i].call(r,o)),r.trigger(t,o),r=r.__hostTarget||r.parent,!o.cancelBubble););o.cancelBubble||(this.trigger(t,o),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer((function(e){"function"==typeof e[i]&&e[i].call(e,o),e.trigger&&e.trigger(t,o)})))}},cC.prototype.findHover=function(e,t,n){var r=this.storage.getDisplayList(),i=new oC(e,t);if(lC(r,i,e,t,n),this._pointerSize&&!i.target){for(var o=[],a=this._pointerSize,s=a/2,u=new Zx(e-s,t-s,a,a),c=r.length-1;0<=c;c--){var l=r[c];l===n||l.ignore||l.ignoreCoarsePointer||l.parent&&l.parent.ignoreCoarsePointer||(sC.copy(l.getBoundingRect()),l.transform&&sC.applyTransform(l.transform),sC.intersect(u)&&o.push(l))}if(o.length)for(var h=Math.PI/12,f=2*Math.PI,d=0;d<s;d+=4)for(var p=0;p<f;p+=h)if(lC(o,i,e+d*Math.cos(p),t+d*Math.sin(p),n),i.target)return i}return i},cC.prototype.processGesture=function(e,t){this._gestureMgr||(this._gestureMgr=new Mx);var n=this._gestureMgr,r=("start"===t&&n.clear(),n.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom));"end"===t&&n.clear(),r&&(t=r.type,e.gestureEvent=t,(n=new oC).target=r.target,this.dispatchToElement(n,t,r.event))},cC);function cC(e,t,n,r,i){var o=iC.call(this)||this;return o._hovered=new oC(0,0),o.storage=e,o.painter=t,o.painterRoot=r,o._pointerSize=i,n=n||new nC,o.proxy=null,o.setHandlerProxy(n),o._draggingMgr=new fx(o),o}function lC(e,t,n,r,i){for(var o=e.length-1;0<=o;o--){var a=e[o],s=void 0;if(a!==i&&!a.ignore&&(s=function(e,t,n){if(e[e.rectHover?"rectContain":"contain"](t,n)){for(var r=e,i=void 0,o=!1;r;){if(!(o=!!r.ignoreClip||o)){var a=r.getClipPath();if(a&&!a.contain(t,n))return!1;r.silent&&(i=!0)}r=(a=r.__hostTarget)||r.parent}return!i||"silent"}return!1}(a,n,r))&&(t.topTarget||(t.topTarget=a),"silent"!==s)){t.target=a;break}}}function hC(e,t,n){return e=e.painter,t<0||t>e.getWidth()||n<0||n>e.getHeight()}Xw.k(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],(function(e){uC.prototype[e]=function(t){var n,r,i=t.zrX,o=t.zrY,a=hC(this,i,o);if("mouseup"===e&&a||(r=(n=this.findHover(i,o)).target),"mousedown"===e)this._downEl=r,this._downPoint=[t.zrX,t.zrY],this._upEl=r;else if("mouseup"===e)this._upEl=r;else if("click"===e){if(this._downEl!==this._upEl||!this._downPoint||4<ix(this._downPoint,[t.zrX,t.zrY]))return;this._downPoint=null}this.dispatchToElement(n,e,t)}}));var fC=uC;function dC(e,t,n,r){var i=t+1;if(i===n)return 1;if(r(e[i++],e[t])<0){for(;i<n&&r(e[i],e[i-1])<0;)i++;var o=e,a=t,s=i;for(s--;a<s;){var u=o[a];o[a++]=o[s],o[s--]=u}}else for(;i<n&&0<=r(e[i],e[i-1]);)i++;return i-t}function pC(e,t,n,r,i){for(r===t&&r++;r<n;r++){for(var o,a=e[r],s=t,u=r;s<u;)i(a,e[o=s+u>>>1])<0?u=o:s=1+o;var c=r-s;switch(c){case 3:e[s+3]=e[s+2];case 2:e[s+2]=e[s+1];case 1:e[s+1]=e[s];break;default:for(;0<c;)e[s+c]=e[s+c-1],c--}e[s]=a}}function mC(e,t,n,r,i,o){var a=0,s=0,u=1;if(0<o(e,t[n+i])){for(s=r-i;u<s&&0<o(e,t[n+i+u]);)(u=1+((a=u)<<1))<=0&&(u=s);s<u&&(u=s),a+=i,u+=i}else{for(s=i+1;u<s&&o(e,t[n+i-u])<=0;)(u=1+((a=u)<<1))<=0&&(u=s);r=a,a=i-(u=s<u?s:u),u=i-r}for(a++;a<u;){var c=a+(u-a>>>1);0<o(e,t[n+c])?a=c+1:u=c}return u}function gC(e,t,n,r,i,o){var a=0,s=0,u=1;if(o(e,t[n+i])<0){for(s=i+1;u<s&&o(e,t[n+i-u])<0;)(u=1+((a=u)<<1))<=0&&(u=s);var c=a;a=i-(u=s<u?s:u),u=i-c}else{for(s=r-i;u<s&&0<=o(e,t[n+i+u]);)(u=1+((a=u)<<1))<=0&&(u=s);s<u&&(u=s),a+=i,u+=i}for(a++;a<u;){var l=a+(u-a>>>1);o(e,t[n+l])<0?u=l:a=l+1}return u}function AC(e,t,n,r){var i=(r=r||e.length)-(n=n||0);if(!(i<2)){var o=0;if(i<32)pC(e,n,r,n+(o=dC(e,n,r,t)),t);else{var a,s=function(e,t){var n,r,i=7,o=0,a=(e.length,[]);function s(s){var u=n[s],c=r[s],l=n[s+1],h=r[s+1];if(u+=s=(r[s]=c+h,s===o-3&&(n[s+1]=n[s+2],r[s+1]=r[s+2]),o--,gC(e[l],e,u,c,0,t)),0!=(c-=s)&&0!==(h=mC(e[u+c-1],e,l,h,h-1,t)))if(c<=h){var f=u,d=c,p=(s=l,h),m=0;for(m=0;m<d;m++)a[m]=e[f+m];var g=0,A=s,v=f;if(e[v++]=e[A++],0==--p)for(m=0;m<d;m++)e[v+m]=a[g+m];else if(1===d){for(m=0;m<p;m++)e[v+m]=e[A+m];e[v+p]=a[g]}else{for(var b,y,w,x=i;;){y=b=0,w=!1;do{if(t(e[A],a[g])<0){if(e[v++]=e[A++],y++,(b=0)==--p){w=!0;break}}else if(e[v++]=a[g++],b++,y=0,1==--d){w=!0;break}}while((b|y)<x);if(w)break;do{if(0!==(b=gC(e[A],a,g,d,0,t))){for(m=0;m<b;m++)e[v+m]=a[g+m];if(v+=b,g+=b,(d-=b)<=1){w=!0;break}}if(e[v++]=e[A++],0==--p){w=!0;break}if(0!==(y=mC(a[g],e,A,p,0,t))){for(m=0;m<y;m++)e[v+m]=e[A+m];if(v+=y,A+=y,0==(p-=y)){w=!0;break}}if(e[v++]=a[g++],1==--d){w=!0;break}}while(x--,7<=b||7<=y);if(w)break;x<0&&(x=0),x+=2}if((i=x)<1&&(i=1),1===d){for(m=0;m<p;m++)e[v+m]=e[A+m];e[v+p]=a[g]}else{if(0===d)throw new Error;for(m=0;m<d;m++)e[v+m]=a[g+m]}}}else{var C=u,k=c,E=l,S=h,_=0;for(_=0;_<S;_++)a[_]=e[E+_];var O=C+k-1,T=S-1,D=E+S-1,B=0,I=0;if(e[D--]=e[O--],0==--k)for(B=D-(S-1),_=0;_<S;_++)e[B+_]=a[_];else if(1===S){for(I=1+(D-=k),B=1+(O-=k),_=k-1;0<=_;_--)e[I+_]=e[B+_];e[D]=a[T]}else{for(var M=i;;){var j=0,N=0,F=!1;do{if(t(a[T],e[O])<0){if(e[D--]=e[O--],j++,(N=0)==--k){F=!0;break}}else if(e[D--]=a[T--],N++,j=0,1==--S){F=!0;break}}while((j|N)<M);if(F)break;do{if(0!=(j=k-gC(a[T],e,C,k,k-1,t))){for(k-=j,I=1+(D-=j),B=1+(O-=j),_=j-1;0<=_;_--)e[I+_]=e[B+_];if(0===k){F=!0;break}}if(e[D--]=a[T--],1==--S){F=!0;break}if(0!=(N=S-mC(e[O],a,0,S,S-1,t))){for(S-=N,I=1+(D-=N),B=1+(T-=N),_=0;_<N;_++)e[I+_]=a[B+_];if(S<=1){F=!0;break}}if(e[D--]=e[O--],0==--k){F=!0;break}}while(M--,7<=j||7<=N);if(F)break;M<0&&(M=0),M+=2}if((i=M)<1&&(i=1),1===S){for(I=1+(D-=k),B=1+(O-=k),_=k-1;0<=_;_--)e[I+_]=e[B+_];e[D]=a[T]}else{if(0===S)throw new Error;for(B=D-(S-1),_=0;_<S;_++)e[B+_]=a[_]}}}}return n=[],r=[],{mergeRuns:function(){for(;1<o;){var e=o-2;if(1<=e&&r[e-1]<=r[e]+r[e+1]||2<=e&&r[e-2]<=r[e]+r[e-1])r[e-1]<r[e+1]&&e--;else if(r[e]>r[e+1])break;s(e)}},forceMergeRuns:function(){for(;1<o;){var e=o-2;0<e&&r[e-1]<r[e+1]&&e--,s(e)}},pushRun:function(e,t){n[o]=e,r[o]=t,o+=1}}}(e,t),u=function(e){for(var t=0;32<=e;)t|=1&e,e>>=1;return e+t}(i);do{}while((o=dC(e,n,r,t))<u&&(pC(e,n,n+(a=u<(a=i)?u:i),n+o,t),o=a),s.pushRun(n,o),s.mergeRuns(),n+=o,0!=(i-=o));s.forceMergeRuns()}}}function vC(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}function bC(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=vC}bC.prototype.traverse=function(e,t){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(e,t)},bC.prototype.getDisplayList=function(e,t){t=t||!1;var n=this._displayList;return!e&&n.length||this.updateDisplayList(t),n},bC.prototype.updateDisplayList=function(e){this._displayListLen=0;for(var t=this._roots,n=this._displayList,r=0,i=t.length;r<i;r++)this._updateAndAddDisplayable(t[r],null,e);n.length=this._displayListLen,AC(n,vC)},bC.prototype._updateAndAddDisplayable=function(e,t,n){if(!e.ignore||n){e.beforeUpdate(),e.update(),e.afterUpdate();var r=e.getClipPath();if(e.ignoreClip)t=null;else if(r){t=t?t.slice():[];for(var i=r,o=e;i;)i.parent=o,i.updateTransform(),t.push(i),i=(o=i).getClipPath()}if(e.childrenRef){for(var a=e.childrenRef(),s=0;s<a.length;s++){var u=a[s];e.__dirty&&(u.__dirty|=1),this._updateAndAddDisplayable(u,t,n)}e.__dirty=0}else r=e,t&&t.length?r.__clipPaths=t:r.__clipPaths&&0<r.__clipPaths.length&&(r.__clipPaths=[]),isNaN(r.z)&&(r.z=0),isNaN(r.z2)&&(r.z2=0),isNaN(r.zlevel)&&(r.zlevel=0),this._displayList[this._displayListLen++]=r;(r=e.getDecalElement&&e.getDecalElement())&&this._updateAndAddDisplayable(r,t,n),(r=e.getTextGuideLine())&&this._updateAndAddDisplayable(r,t,n),(r=e.getTextContent())&&this._updateAndAddDisplayable(r,t,n)}},bC.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},bC.prototype.delRoot=function(e){if(e instanceof Array)for(var t=0,n=e.length;t<n;t++)this.delRoot(e[t]);else{var r=Xw.q(this._roots,e);0<=r&&this._roots.splice(r,1)}},bC.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},bC.prototype.getRoots=function(){return this._roots},bC.prototype.dispose=function(){this._displayList=null,this._roots=null};var yC=bC,wC=Yw.a.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)},xC={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return.5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return 0===e?0:Math.pow(1024,e-1)},exponentialOut:function(e){return 1===e?1:1-Math.pow(2,-10*e)},exponentialInOut:function(e){return 0===e?0:1===e?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(2-Math.pow(2,-10*(e-1)))},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,n=.1;return 0===e?0:1===e?1:(t=!n||n<1?(n=1,.1):.4*Math.asin(1/n)/(2*Math.PI),-n*Math.pow(2,10*--e)*Math.sin((e-t)*(2*Math.PI)/.4))},elasticOut:function(e){var t,n=.1;return 0===e?0:1===e?1:(t=!n||n<1?(n=1,.1):.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/.4)+1)},elasticInOut:function(e){var t,n=.1;return 0===e?0:1===e?1:(t=!n||n<1?(n=1,.1):.4*Math.asin(1/n)/(2*Math.PI),(e*=2)<1?n*Math.pow(2,10*--e)*Math.sin((e-t)*(2*Math.PI)/.4)*-.5:n*Math.pow(2,-10*--e)*Math.sin((e-t)*(2*Math.PI)/.4)*.5+1)},backIn:function(e){return e*e*(2.70158*e-1.70158)},backOut:function(e){return--e*e*(2.70158*e+1.70158)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?e*e*((1+t)*e-t)*.5:.5*((e-=2)*e*((1+t)*e+t)+2)},bounceIn:function(e){return 1-xC.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?.5*xC.bounceIn(2*e):.5*xC.bounceOut(2*e-1)+.5}},CC=xC,kC=Math.pow,EC=Math.sqrt,SC=EC(3),_C=ex(),OC=ex(),TC=ex();function DC(e){return-1e-8<e&&e<1e-8}function BC(e){return 1e-8<e||e<-1e-8}function IC(e,t,n,r,i){var o=1-i;return o*o*(o*e+3*i*t)+i*i*(i*r+3*o*n)}function MC(e,t,n,r,i){var o=1-i;return 3*(((t-e)*o+2*(n-t)*i)*o+(r-n)*i*i)}function jC(e,t,n,r,i,o){r=r+3*(t-n)-e;var a,s,u=(n=3*(n-2*t+e))*(t=3*(t-e))-9*r*(e=e-i),c=(e=t*t-3*n*e,0);return DC(i=n*n-3*r*t)&&DC(u)?DC(n)?o[0]=0:0<=(a=-t/n)&&a<=1&&(o[c++]=a):DC(t=u*u-4*i*e)?(s=-(e=u/i)/2,0<=(a=-n/r+e)&&a<=1&&(o[c++]=a),0<=s&&s<=1&&(o[c++]=s)):0<t?(t=i*n+1.5*r*(-u-(e=EC(t))),0<=(a=(-n-((e=(e=i*n+1.5*r*(-u+e))<0?-kC(-e,1/3):kC(e,1/3))+(t=t<0?-kC(-t,1/3):kC(t,1/3))))/(3*r))&&a<=1&&(o[c++]=a)):(e=(2*i*n-3*r*u)/(2*EC(i*i*i)),t=Math.acos(e)/3,a=(-n-2*(u=EC(i))*(e=Math.cos(t)))/(3*r),s=(-n+u*(e+SC*Math.sin(t)))/(3*r),i=(-n+u*(e-SC*Math.sin(t)))/(3*r),0<=a&&a<=1&&(o[c++]=a),0<=s&&s<=1&&(o[c++]=s),0<=i&&i<=1&&(o[c++]=i)),c}function NC(e,t,n,r,i){var o,a=6*n-12*t+6*e;r=9*t+3*r-3*e-9*n,n=3*t-3*e,t=0;return DC(r)?BC(a)&&0<=(o=-n/a)&&o<=1&&(i[t++]=o):DC(e=a*a-4*r*n)?i[0]=-a/(2*r):0<e&&(e=(-a-(n=EC(e)))/(2*r),0<=(o=(-a+n)/(2*r))&&o<=1&&(i[t++]=o),0<=e&&e<=1&&(i[t++]=e)),t}function FC(e,t,n,r,i,o){var a=(t-e)*i+e,s=((t=(n-t)*i+t)-a)*i+a;i=((t=((n=(r-n)*i+n)-t)*i+t)-s)*i+s;o[0]=e,o[1]=a,o[2]=s,o[3]=i,o[4]=i,o[5]=t,o[6]=n,o[7]=r}function RC(e,t,n,r,i,o,a,s,u,c,l){var h,f,d,p,m=.005,g=1/0;_C[0]=u,_C[1]=c;for(var A=0;A<1;A+=.05)OC[0]=IC(e,n,i,a,A),OC[1]=IC(t,r,o,s,A),(d=ox(_C,OC))<g&&(h=A,g=d);g=1/0;for(var v=0;v<32&&!(m<1e-4);v++)f=h+m,OC[0]=IC(e,n,i,a,p=h-m),OC[1]=IC(t,r,o,s,p),d=ox(OC,_C),0<=p&&d<g?(h=p,g=d):(TC[0]=IC(e,n,i,a,f),TC[1]=IC(t,r,o,s,f),p=ox(TC,_C),f<=1&&p<g?(h=f,g=p):m*=.5);return l&&(l[0]=IC(e,n,i,a,h),l[1]=IC(t,r,o,s,h)),EC(g)}function PC(e,t,n,r){var i=1-r;return i*(i*e+2*r*t)+r*r*n}function LC(e,t,n,r){return 2*((1-r)*(t-e)+r*(n-t))}function UC(e,t,n){return 0==(n=e+n-2*t)?.5:(e-t)/n}function zC(e,t,n,r,i){var o=(t-e)*r+e;r=((t=(n-t)*r+t)-o)*r+o;i[0]=e,i[1]=o,i[2]=r,i[3]=r,i[4]=t,i[5]=n}function HC(e,t,n,r,i,o,a,s,u){var c,l=.005,h=1/0;_C[0]=a,_C[1]=s;for(var f=0;f<1;f+=.05)OC[0]=PC(e,n,i,f),OC[1]=PC(t,r,o,f),(g=ox(_C,OC))<h&&(c=f,h=g);h=1/0;for(var d=0;d<32&&!(l<1e-4);d++){var p=c-l,m=c+l,g=(OC[0]=PC(e,n,i,p),OC[1]=PC(t,r,o,p),ox(OC,_C));0<=p&&g<h?(c=p,h=g):(TC[0]=PC(e,n,i,m),TC[1]=PC(t,r,o,m),p=ox(TC,_C),m<=1&&p<h?(c=m,h=p):l*=.5)}return u&&(u[0]=PC(e,n,i,c),u[1]=PC(t,r,o,c)),EC(h)}var $C=/cubic-bezier\(([0-9,\.e ]+)\)/;function QC(e){if(e=e&&$C.exec(e)){e=e[1].split(",");var t,n=+Object(Xw.R)(e[0]),r=+Object(Xw.R)(e[1]),i=+Object(Xw.R)(e[2]),o=+Object(Xw.R)(e[3]);if(!isNaN(n+r+i+o))return t=[],function(e){return e<=0?0:1<=e?1:jC(0,n,i,1,e,t)&&IC(0,r,o,1,t[0])}}}function VC(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||Xw.J,this.ondestroy=e.ondestroy||Xw.J,this.onrestart=e.onrestart||Xw.J,e.easing&&this.setEasing(e.easing)}VC.prototype.step=function(e,t){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),!this._paused){var n=this._life,r=e-this._startTime-this._pausedTime,i=r/n,o=(o=(i<0&&(i=0),i=Math.min(i,1),this.easingFunc))?o(i):i;if(this.onframe(o),1===i){if(!this.loop)return!0;this._startTime=e-r%n,this._pausedTime=0,this.onrestart()}return!1}this._pausedTime+=t},VC.prototype.pause=function(){this._paused=!0},VC.prototype.resume=function(){this._paused=!1},VC.prototype.setEasing=function(e){this.easing=e,this.easingFunc=Object(Xw.v)(e)?e:CC[e]||QC(e)};var qC=VC,GC=n(46),WC=n(227),KC=Array.prototype.slice;function YC(e,t,n){return(t-e)*n+e}function XC(e,t,n,r){for(var i=t.length,o=0;o<i;o++)e[o]=YC(t[o],n[o],r);return e}function JC(e,t,n,r){for(var i=t.length,o=0;o<i;o++)e[o]=t[o]+n[o]*r;return e}function ZC(e,t,n,r){for(var i=t.length,o=i&&t[0].length,a=0;a<i;a++){e[a]||(e[a]=[]);for(var s=0;s<o;s++)e[a][s]=t[a][s]+n[a][s]*r}return e}function ek(e){if(Object(Xw.t)(e)){var t=e.length;if(Object(Xw.t)(e[0])){for(var n=[],r=0;r<t;r++)n.push(KC.call(e[r]));return n}return KC.call(e)}return e}function tk(e){return e[0]=Math.floor(e[0])||0,e[1]=Math.floor(e[1])||0,e[2]=Math.floor(e[2])||0,e[3]=null==e[3]?1:e[3],"rgba("+e.join(",")+")"}function nk(e){return 4===e||5===e}function rk(e){return 1===e||2===e}var ik=[0,0,0,0],ok=(ak.prototype.isFinished=function(){return this._finished},ak.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},ak.prototype.needsAnimate=function(){return 1<=this.keyframes.length},ak.prototype.getAdditiveTrack=function(){return this._additiveTrack},ak.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var r,i=this.keyframes,o=i.length,a=!1,s=6,u=t,c=(Object(Xw.t)(t)?(r=t,(1==(s=r=Object(Xw.t)(r&&r[0])?2:1)&&!Object(Xw.y)(t[0])||2==r&&!Object(Xw.y)(t[0][0]))&&(a=!0)):Object(Xw.y)(t)&&!Object(Xw.l)(t)?s=0:Object(Xw.B)(t)?isNaN(+t)?(r=GC.d(t))&&(u=r,s=3):s=0:Object(Xw.w)(t)&&((c=Object(Xw.m)({},u)).colorStops=Object(Xw.G)(t.colorStops,(function(e){return{offset:e.offset,color:GC.d(e.color)}})),Object(WC.a)(t)?s=4:Object(WC.b)(t)&&(s=5),u=c),0===o?this.valType=s:s===this.valType&&6!==s||(a=!0),this.discrete=this.discrete||a,{time:e,value:u,rawValue:t,percent:0});return n&&(c.easing=n,c.easingFunc=Object(Xw.v)(n)?n:CC[n]||QC(n)),i.push(c),c},ak.prototype.prepare=function(e,t){for(var n=this.keyframes,r=(this._needsSort&&n.sort((function(e,t){return e.time-t.time})),this.valType),i=n.length,o=n[i-1],a=this.discrete,s=rk(r),u=nk(r),c=0;c<i;c++){var l=(m=n[c]).value,h=o.value;if(m.percent=m.time/e,!a)if(s&&c!==i-1){b=v=A=g=m=d=y=m=void 0;var f=r,d=m=l,p=y=h;if(d.push&&p.push){var m=d.length,g=p.length;if(m!==g)if(g<m)d.length=g;else for(var A=m;A<g;A++)d.push(1===f?p[A]:KC.call(p[A]));var v=d[0]&&d[0].length;for(A=0;A<d.length;A++)if(1===f)isNaN(d[A])&&(d[A]=p[A]);else for(var b=0;b<v;b++)isNaN(d[A][b])&&(d[A][b]=p[A][b])}}else if(u){E=k=m=C=m=y=void 0;for(var y=l.colorStops,w=(m=h.colorStops,y.length),x=m.length,C=x<w?m:y,k=C[(m=Math.min(w,x))-1]||{color:[0,0,0,0],offset:0},E=m;E<Math.max(w,x);E++)C.push({offset:k.offset,color:k.color.slice()})}}if(!a&&5!==r&&t&&this.needsAnimate()&&t.needsAnimate()&&r===t.valType&&!t._finished){this._additiveTrack=t;var S=n[0].value;for(c=0;c<i;c++)0===r?n[c].additiveValue=n[c].value-S:3===r?n[c].additiveValue=JC([],n[c].value,S,-1):rk(r)&&(n[c].additiveValue=(1===r?JC:ZC)([],n[c].value,S,-1))}},ak.prototype.step=function(e,t){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n,r,i,o,a=null!=this._additiveTrack,s=a?"additiveValue":"value",u=this.valType,c=this.keyframes,l=c.length,h=this.propName,f=3===u,d=this._lastFr,p=Math.min;if(1===l)n=r=c[0];else{if(t<0)m=0;else if(t<this._lastFrP){for(var m=p(d+1,l-1);0<=m&&!(c[m].percent<=t);m--);m=p(m,l-2)}else{for(m=d;m<l&&!(c[m].percent>t);m++);m=p(m-1,l-2)}r=c[m+1],n=c[m]}n&&r&&(this._lastFr=m,this._lastFrP=t,d=r.percent-n.percent,i=0==d?1:p((t-n.percent)/d,1),r.easingFunc&&(i=r.easingFunc(i)),p=a?this._additiveValue:f?ik:e[h],!rk(u)&&!f||p||(p=this._additiveValue=[]),this.discrete?e[h]=(i<1?n:r).rawValue:rk(u)?(1===u?XC:function(e,t,n,r){for(var i=t.length,o=i&&t[0].length,a=0;a<i;a++){e[a]||(e[a]=[]);for(var s=0;s<o;s++)e[a][s]=YC(t[a][s],n[a][s],r)}})(p,n[s],r[s],i):nk(u)?(d=n[s],o=r[s],e[h]={type:(u=4===u)?"linear":"radial",x:YC(d.x,o.x,i),y:YC(d.y,o.y,i),colorStops:Object(Xw.G)(d.colorStops,(function(e,t){return t=o.colorStops[t],{offset:YC(e.offset,t.offset,i),color:tk(XC([],e.color,t.color,i))}})),global:o.global},u?(e[h].x2=YC(d.x2,o.x2,i),e[h].y2=YC(d.y2,o.y2,i)):e[h].r=YC(d.r,o.r,i)):f?(XC(p,n[s],r[s],i),a||(e[h]=tk(p))):(u=YC(n[s],r[s],i),a?this._additiveValue=u:e[h]=u),a&&this._addToTarget(e))}},ak.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,r=this._additiveValue;0===t?e[n]=e[n]+r:3===t?(GC.d(e[n],ik),JC(ik,ik,r,1),e[n]=tk(ik)):1===t?JC(e[n],e[n],r,1):2===t&&ZC(e[n],e[n],r,1)},ak);function ak(e){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=e}function sk(e,t,n,r){this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,(this._loop=t)&&r?Object(Xw.F)("Can' use additive animation on looped animation."):(this._additiveAnimators=r,this._allowDiscrete=n)}sk.prototype.getMaxTime=function(){return this._maxTime},sk.prototype.getDelay=function(){return this._delay},sk.prototype.getLoop=function(){return this._loop},sk.prototype.getTarget=function(){return this._target},sk.prototype.changeTarget=function(e){this._target=e},sk.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,Object(Xw.E)(t),n)},sk.prototype.whenWithKeys=function(e,t,n,r){for(var i=this._tracks,o=0;o<n.length;o++){var a=n[o];if(!(u=i[a])){var s,u=i[a]=new ok(a),c=void 0,l=this._getAdditiveTrack(a);if(l?(c=(s=(s=l.keyframes)[s.length-1])&&s.value,3===l.valType&&c&&(c=tk(c))):c=this._target[a],null==c)continue;0<e&&u.addKeyframe(0,ek(c),r),this._trackKeys.push(a)}u.addKeyframe(e,ek(t[a]),r)}return this._maxTime=Math.max(this._maxTime,e),this},sk.prototype.pause=function(){this._clip.pause(),this._paused=!0},sk.prototype.resume=function(){this._clip.resume(),this._paused=!1},sk.prototype.isPaused=function(){return!!this._paused},sk.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},sk.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n<t;n++)e[n].call(this)},sk.prototype._abortedCallback=function(){this._setTracksFinished();var e=this.animation,t=this._abortedCbs;if(e&&e.removeClip(this._clip),this._clip=null,t)for(var n=0;n<t.length;n++)t[n].call(this)},sk.prototype._setTracksFinished=function(){for(var e=this._tracks,t=this._trackKeys,n=0;n<t.length;n++)e[t[n]].setFinished()},sk.prototype._getAdditiveTrack=function(e){var t,n=this._additiveAnimators;if(n)for(var r=0;r<n.length;r++){var i=n[r].getTrack(e);i&&(t=i)}return t},sk.prototype.start=function(e){if(!(0<this._started)){this._started=1;for(var t,n=this,r=[],i=this._maxTime||0,o=0;o<this._trackKeys.length;o++){var a=this._trackKeys[o],s=this._tracks[a],u=(a=this._getAdditiveTrack(a),s.keyframes),c=u.length;s.prepare(i,a),s.needsAnimate()&&(!this._allowDiscrete&&s.discrete?((a=u[c-1])&&(n._target[s.propName]=a.rawValue),s.setFinished()):r.push(s))}return r.length||this._force?(t=new qC({life:i,loop:this._loop,delay:this._delay||0,onframe:function(e){n._started=2;var t=n._additiveAnimators;if(t){for(var i=!1,o=0;o<t.length;o++)if(t[o]._clip){i=!0;break}i||(n._additiveAnimators=null)}for(o=0;o<r.length;o++)r[o].step(n._target,e);var a=n._onframeCbs;if(a)for(o=0;o<a.length;o++)a[o](n._target,e)},ondestroy:function(){n._doneCallback()}}),this._clip=t,this.animation&&this.animation.addClip(t),e&&t.setEasing(e)):this._doneCallback(),this}},sk.prototype.stop=function(e){var t;this._clip&&(t=this._clip,e&&t.onframe(1),this._abortedCallback())},sk.prototype.delay=function(e){return this._delay=e,this},sk.prototype.during=function(e){return e&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(e)),this},sk.prototype.done=function(e){return e&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(e)),this},sk.prototype.aborted=function(e){return e&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(e)),this},sk.prototype.getClip=function(){return this._clip},sk.prototype.getTrack=function(e){return this._tracks[e]},sk.prototype.getTracks=function(){var e=this;return Object(Xw.G)(this._trackKeys,(function(t){return e._tracks[t]}))},sk.prototype.stopTracks=function(e,t){if(!e.length||!this._clip)return!0;for(var n=this._tracks,r=this._trackKeys,i=0;i<e.length;i++){var o=n[e[i]];o&&!o.isFinished()&&(t?o.step(this._target,1):1===this._started&&o.step(this._target,0),o.setFinished())}var a=!0;for(i=0;i<r.length;i++)if(!n[r[i]].isFinished()){a=!1;break}return a&&this._abortedCallback(),a},sk.prototype.saveTo=function(e,t,n){if(e){t=t||this._trackKeys;for(var r=0;r<t.length;r++){var i=t[r],o=this._tracks[i];o&&!o.isFinished()&&(o=(o=o.keyframes)[n?0:o.length-1])&&(e[i]=ek(o.rawValue))}}},sk.prototype.__changeFinalValue=function(e,t){t=t||Object(Xw.E)(e);for(var n=0;n<t.length;n++){var r,i=t[n],o=this._tracks[i];o&&1<(r=o.keyframes).length&&(r=r.pop(),o.addKeyframe(r.time,e[i]),o.prepare(this._maxTime,o.getAdditiveTrack()))}};var uk,ck=sk;function lk(){return(new Date).getTime()}function hk(e){var t=uk.call(this)||this;return t._running=!1,t._time=0,t._pausedTime=0,t._pauseStart=0,t._paused=!1,t.stage=(e=e||{}).stage||{},t}Zw(hk,uk=px),hk.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?((this._tail.next=e).prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},hk.prototype.addAnimator=function(e){e.animation=this,(e=e.getClip())&&this.addClip(e)},hk.prototype.removeClip=function(e){var t,n;e.animation&&(t=e.prev,n=e.next,t?t.next=n:this._head=n,n?n.prev=t:this._tail=t,e.next=e.prev=e.animation=null)},hk.prototype.removeAnimator=function(e){var t=e.getClip();t&&this.removeClip(t),e.animation=null},hk.prototype.update=function(e){for(var t=lk()-this._pausedTime,n=t-this._time,r=this._head;r;){var i=r.next;r=(r.step(t,n)&&(r.ondestroy(),this.removeClip(r)),i)}this._time=t,e||(this.trigger("frame",n),this.stage.update&&this.stage.update())},hk.prototype._startLoop=function(){var e=this;this._running=!0,wC((function t(){e._running&&(wC(t),e._paused||e.update())}))},hk.prototype.start=function(){this._running||(this._time=lk(),this._pausedTime=0,this._startLoop())},hk.prototype.stop=function(){this._running=!1},hk.prototype.pause=function(){this._paused||(this._pauseStart=lk(),this._paused=!0)},hk.prototype.resume=function(){this._paused&&(this._pausedTime+=lk()-this._pauseStart,this._paused=!1)},hk.prototype.clear=function(){for(var e=this._head;e;){var t=e.next;e.prev=e.next=e.animation=null,e=t}this._head=this._tail=null},hk.prototype.isFinished=function(){return null==this._head},hk.prototype.animate=function(e,t){return t=t||{},this.start(),e=new ck(e,t.loop),this.addAnimator(e),e};var fk,dk=hk,pk=Yw.a.domSupported,mk=(fk={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},{mouse:fa=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],touch:["touchstart","touchend","touchmove"],pointer:Xw.G(fa,(function(e){var t=e.replace("mouse","pointer");return fk.hasOwnProperty(t)?t:e}))}),gk=["mousemove","mouseup"],Ak=["pointermove","pointerup"],vk=!1;function bk(e){return"pen"===(e=e.pointerType)||"touch"===e}function yk(e){e&&(e.zrByTouch=!0)}function wk(e,t){for(var n=t,r=!1;n&&9!==n.nodeType&&!(r=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return r}var xk=function(e,t){this.stopPropagation=Xw.J,this.stopImmediatePropagation=Xw.J,this.preventDefault=Xw.J,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY},Ck={mousedown:function(e){e=Bx(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger("mousedown",e)},mousemove:function(e){e=Bx(this.dom,e);var t=this.__mayPointerCapture;!t||e.zrX===t[0]&&e.zrY===t[1]||this.__togglePointerCapture(!0),this.trigger("mousemove",e)},mouseup:function(e){e=Bx(this.dom,e),this.__togglePointerCapture(!1),this.trigger("mouseup",e)},mouseout:function(e){wk(this,(e=Bx(this.dom,e)).toElement||e.relatedTarget)||(this.__pointerCapturing&&(e.zrEventControl="no_globalout"),this.trigger("mouseout",e))},wheel:function(e){vk=!0,e=Bx(this.dom,e),this.trigger("mousewheel",e)},mousewheel:function(e){vk||(e=Bx(this.dom,e),this.trigger("mousewheel",e))},touchstart:function(e){yk(e=Bx(this.dom,e)),this.__lastTouchMoment=new Date,this.handler.processGesture(e,"start"),Ck.mousemove.call(this,e),Ck.mousedown.call(this,e)},touchmove:function(e){yk(e=Bx(this.dom,e)),this.handler.processGesture(e,"change"),Ck.mousemove.call(this,e)},touchend:function(e){yk(e=Bx(this.dom,e)),this.handler.processGesture(e,"end"),Ck.mouseup.call(this,e),+new Date-+this.__lastTouchMoment<300&&Ck.click.call(this,e)},pointerdown:function(e){Ck.mousedown.call(this,e)},pointermove:function(e){bk(e)||Ck.mousemove.call(this,e)},pointerup:function(e){Ck.mouseup.call(this,e)},pointerout:function(e){bk(e)||Ck.mouseout.call(this,e)}},kk=(Xw.k(["click","dblclick","contextmenu"],(function(e){Ck[e]=function(t){t=Bx(this.dom,t),this.trigger(e,t)}})),{pointermove:function(e){bk(e)||kk.mousemove.call(this,e)},pointerup:function(e){kk.mouseup.call(this,e)},mousemove:function(e){this.trigger("mousemove",e)},mouseup:function(e){var t=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",e),t&&(e.zrEventControl="only_globalout",this.trigger("mouseout",e))}});function Ek(e,t,n,r){e.mounted[t]=n,e.listenerOpts[t]=r,e.domTarget.addEventListener(t,n,r)}function Sk(e){var t,n,r,i,o,a=e.mounted;for(t in a)a.hasOwnProperty(t)&&(n=e.domTarget,i=a[r=t],o=e.listenerOpts[t],n.removeEventListener(r,i,o));e.mounted={}}var _k,Ok=function(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t};function Tk(e,t){var n=_k.call(this)||this;return n.__pointerCapturing=!1,n.dom=e,n.painterRoot=t,n._localHandlerScope=new Ok(e,Ck),pk&&(n._globalHandlerScope=new Ok(document,kk)),function(e,t){var n=t.domHandlers;Yw.a.pointerEventsSupported?Xw.k(mk.pointer,(function(r){Ek(t,r,(function(t){n[r].call(e,t)}))})):(Yw.a.touchEventsSupported&&Xw.k(mk.touch,(function(r){Ek(t,r,(function(i){var o;n[r].call(e,i),(o=t).touching=!0,null!=o.touchTimer&&(clearTimeout(o.touchTimer),o.touchTimer=null),o.touchTimer=setTimeout((function(){o.touching=!1,o.touchTimer=null}),700)}))})),Xw.k(mk.mouse,(function(r){Ek(t,r,(function(i){i=Dx(i),t.touching||n[r].call(e,i)}))})))}(n,n._localHandlerScope),n}Zw(Tk,_k=px),Tk.prototype.dispose=function(){Sk(this._localHandlerScope),pk&&Sk(this._globalHandlerScope)},Tk.prototype.setCursor=function(e){this.dom.style&&(this.dom.style.cursor=e||"default")},Tk.prototype.__togglePointerCapture=function(e){var t;this.__mayPointerCapture=null,pk&&+this.__pointerCapturing^+e&&(this.__pointerCapturing=e,t=this._globalHandlerScope,e?function(e,t){function n(n){Ek(t,n,(function(r){var i;r=Dx(r),wk(e,r.target)||(i=r,r=Bx(e.dom,new xk(e,i),!0),t.domHandlers[n].call(e,r))}),{capture:!0})}Yw.a.pointerEventsSupported?Xw.k(Ak,n):Yw.a.touchEventsSupported||Xw.k(gk,n)}(this,t):Sk(t))};var Dk=Tk,Bk=(na=1,na=Yw.a.hasGlobalWindow?Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1):na),Ik=Rx;function Mk(e){return 5e-5<e||e<-5e-5}var jk=[],Nk=[],Fk=[1,0,0,1,0,0],Rk=Math.abs;function Pk(){}Pk.prototype.getLocalTransform=function(e){return Pk.getLocalTransform(this,e)},Pk.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},Pk.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},Pk.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},Pk.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},Pk.prototype.needLocalTransform=function(){return Mk(this.rotation)||Mk(this.x)||Mk(this.y)||Mk(this.scaleX-1)||Mk(this.scaleY-1)||Mk(this.skewX)||Mk(this.skewY)},Pk.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;t||e?(n=n||[1,0,0,1,0,0],t?this.getLocalTransform(n):Ik(n),e&&(t?Px(n,e,n):function(e,t){e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5]}(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n)):n&&(Ik(n),this.invTransform=null)},Pk.prototype._resolveGlobalScaleRatio=function(e){var t,n,r=this.globalScaleRatio;null!=r&&1!==r&&(this.getGlobalScale(jk),n=((jk[1]-(n=jk[1]<0?-1:1))*r+n)/jk[1]||0,e[0]*=r=((jk[0]-(t=jk[0]<0?-1:1))*r+t)/jk[0]||0,e[1]*=r,e[2]*=n,e[3]*=n),this.invTransform=this.invTransform||[1,0,0,1,0,0],zx(this.invTransform,e)},Pk.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},Pk.prototype.setLocalTransform=function(e){var t,n,r,i;e&&(i=e[0]*e[0]+e[1]*e[1],r=e[2]*e[2]+e[3]*e[3],t=Math.atan2(e[1],e[0]),n=Math.PI/2+t-Math.atan2(e[3],e[2]),r=Math.sqrt(r)*Math.cos(n),i=Math.sqrt(i),this.skewX=n,this.skewY=0,this.rotation=-t,this.x=+e[4],this.y=+e[5],this.scaleX=i,this.scaleY=r,this.originX=0,this.originY=0)},Pk.prototype.decomposeTransform=function(){var e,t,n;this.transform&&(t=this.parent,e=this.transform,t&&t.transform&&(Px(Nk,t.invTransform,e),e=Nk),t=this.originX,n=this.originY,(t||n)&&(Fk[4]=t,Fk[5]=n,Px(Nk,e,Fk),Nk[4]-=t,Nk[5]-=n,e=Nk),this.setLocalTransform(e))},Pk.prototype.getGlobalScale=function(e){var t=this.transform;return e=e||[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1])):(e[0]=1,e[1]=1),e},Pk.prototype.transformCoordToLocal=function(e,t){return e=[e,t],(t=this.invTransform)&&sx(e,e,t),e},Pk.prototype.transformCoordToGlobal=function(e,t){return e=[e,t],(t=this.transform)&&sx(e,e,t),e},Pk.prototype.getLineScale=function(){var e=this.transform;return e&&1e-10<Rk(e[0]-1)&&1e-10<Rk(e[3]-1)?Math.sqrt(Rk(e[0]*e[3]-e[2]*e[1])):1},Pk.prototype.copyTransform=function(e){for(var t=e,n=0;n<Lk.length;n++){var r=Lk[n];this[r]=t[r]}},Pk.getLocalTransform=function(e,t){t=t||[];var n=e.originX||0,r=e.originY||0,i=e.scaleX,o=e.scaleY,a=e.anchorX,s=e.anchorY,u=e.rotation||0,c=e.x,l=e.y,h=e.skewX?Math.tan(e.skewX):0;e=e.skewY?Math.tan(-e.skewY):0;return n||r||a||s?(t[4]=-(a=n+a)*i-h*(s=r+s)*o,t[5]=-s*o-e*a*i):t[4]=t[5]=0,t[0]=i,t[3]=o,t[1]=e*i,t[2]=h*o,u&&Ux(t,t,u),t[4]+=n+c,t[5]+=r+l,t},Pk.initDefaultProps=((Ka=Pk.prototype).scaleX=Ka.scaleY=Ka.globalScaleRatio=1,void(Ka.x=Ka.y=Ka.originX=Ka.originY=Ka.skewX=Ka.skewY=Ka.rotation=Ka.anchorX=Ka.anchorY=0));var Lk=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"],Uk=Pk,zk=n(95),Hk=n(45),$k={};function Qk(e,t){t=t||Hk.a;var n=$k[t],r=(n=n||($k[t]=new zk.a(500))).get(e);return null==r&&(r=Hk.c.measureText(e,t).width,n.put(e,r)),r}function Vk(e,t,n,r){return e=Qk(e,t),t=Kk(t),n=Gk(0,e,n),r=Wk(0,t,r),new Zx(n,r,e,t)}function qk(e,t,n,r){var i=((e||"")+"").split("\n");if(1===i.length)return Vk(i[0],t,n,r);for(var o=new Zx(0,0,0,0),a=0;a<i.length;a++){var s=Vk(i[a],t,n,r);0===a?o.copy(s):o.union(s)}return o}function Gk(e,t,n){return"right"===n?e-=t:"center"===n&&(e-=t/2),e}function Wk(e,t,n){return"middle"===n?e-=t/2:"bottom"===n&&(e-=t),e}function Kk(e){return Qk("国",e)}function Yk(e,t){return"string"==typeof e?0<=e.lastIndexOf("%")?parseFloat(e)/100*t:parseFloat(e):e}function Xk(e,t,n){var r=t.position||"inside",i=null!=t.distance?t.distance:5,o=n.height,a=n.width,s=o/2,u=n.x,c=n.y,l="left",h="top";if(r instanceof Array)u+=Yk(r[0],n.width),c+=Yk(r[1],n.height),h=l=null;else switch(r){case"left":u-=i,c+=s,l="right",h="middle";break;case"right":u+=i+a,c+=s,h="middle";break;case"top":u+=a/2,c-=i,l="center",h="bottom";break;case"bottom":u+=a/2,c+=o+i,l="center";break;case"inside":u+=a/2,c+=s,l="center",h="middle";break;case"insideLeft":u+=i,c+=s,h="middle";break;case"insideRight":u+=a-i,c+=s,l="right",h="middle";break;case"insideTop":u+=a/2,c+=i,l="center";break;case"insideBottom":u+=a/2,c+=o-i,l="center",h="bottom";break;case"insideTopLeft":u+=i,c+=i;break;case"insideTopRight":u+=a-i,c+=i,l="right";break;case"insideBottomLeft":u+=i,c+=o-i,h="bottom";break;case"insideBottomRight":u+=a-i,c+=o-i,l="right",h="bottom"}return(e=e||{}).x=u,e.y=c,e.align=l,e.verticalAlign=h,e}var Jk,Zk="__zr_normal__",eE=Lk.concat(["ignore"]),tE=Object(Xw.L)(Lk,(function(e,t){return e[t]=!0,e}),{ignore:!1}),nE={},rE=new Zx(0,0,0,0);iE.prototype._init=function(e){this.attr(e)},iE.prototype.drift=function(e,t,n){switch(this.draggable){case"horizontal":t=0;break;case"vertical":e=0}var r=this.transform;(r=r||(this.transform=[1,0,0,1,0,0]))[4]+=e,r[5]+=t,this.decomposeTransform(),this.markRedraw()},iE.prototype.beforeUpdate=function(){},iE.prototype.afterUpdate=function(){},iE.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},iE.prototype.updateInnerText=function(e){var t,n,r,i,o,a,s,u,c,l,h=this._textContent;!h||h.ignore&&!e||(this.textConfig||(this.textConfig={}),u=(e=this.textConfig).local,r=n=void 0,i=!1,(t=h.innerTransformable).parent=u?this:null,l=!1,t.copyTransform(h),null!=e.position&&(c=rE,e.layoutRect?c.copy(e.layoutRect):c.copy(this.getBoundingRect()),u||c.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(nE,e,c):Xk(nE,e,c),t.x=nE.x,t.y=nE.y,n=nE.align,r=nE.verticalAlign,(o=e.origin)&&null!=e.rotation&&(s=a=void 0,s="center"===o?(a=.5*c.width,.5*c.height):(a=Yk(o[0],c.width),Yk(o[1],c.height)),l=!0,t.originX=-t.x+a+(u?0:c.x),t.originY=-t.y+s+(u?0:c.y))),null!=e.rotation&&(t.rotation=e.rotation),(o=e.offset)&&(t.x+=o[0],t.y+=o[1],l||(t.originX=-o[0],t.originY=-o[1])),a=null==e.inside?"string"==typeof e.position&&0<=e.position.indexOf("inside"):e.inside,s=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),l=c=u=void 0,a&&this.canBeInsideText()?(u=e.insideFill,c=e.insideStroke,null!=u&&"auto"!==u||(u=this.getInsideTextFill()),null!=c&&"auto"!==c||(c=this.getInsideTextStroke(u),l=!0)):(u=e.outsideFill,c=e.outsideStroke,null!=u&&"auto"!==u||(u=this.getOutsideFill()),null!=c&&"auto"!==c||(c=this.getOutsideStroke(u),l=!0)),(u=u||"#000")===s.fill&&c===s.stroke&&l===s.autoStroke&&n===s.align&&r===s.verticalAlign||(i=!0,s.fill=u,s.stroke=c,s.autoStroke=l,s.align=n,s.verticalAlign=r,h.setDefaultTextStyle(s)),h.__dirty|=1,i&&h.dirtyStyle(!0))},iE.prototype.canBeInsideText=function(){return!0},iE.prototype.getInsideTextFill=function(){return"#fff"},iE.prototype.getInsideTextStroke=function(e){return"#000"},iE.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?"#ccc":"#333"},iE.prototype.getOutsideStroke=function(e){for(var t=this.__zr&&this.__zr.getBackgroundColor(),n="string"==typeof t&&Object(GC.d)(t),r=(n=n||[255,255,255,1])[3],i=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*r+(i?0:255)*(1-r);return n[3]=1,Object(GC.e)(n,"rgba")},iE.prototype.traverse=function(e,t){},iE.prototype.attrKV=function(e,t){"textConfig"===e?this.setTextConfig(t):"textContent"===e?this.setTextContent(t):"clipPath"===e?this.setClipPath(t):"extra"===e?(this.extra=this.extra||{},Object(Xw.m)(this.extra,t)):this[e]=t},iE.prototype.hide=function(){this.ignore=!0,this.markRedraw()},iE.prototype.show=function(){this.ignore=!1,this.markRedraw()},iE.prototype.attr=function(e,t){if("string"==typeof e)this.attrKV(e,t);else if(Object(Xw.z)(e)){t=e;for(var n=Object(Xw.E)(t),r=0;r<n.length;r++){var i=n[r];this.attrKV(i,e[i])}}return this.markRedraw(),this},iE.prototype.saveCurrentToNormalState=function(e){this._innerSaveToNormal(e);for(var t=this._normalState,n=0;n<this.animators.length;n++){var r=this.animators[n],i=r.__fromStateTransition;r.getLoop()||i&&i!==Zk||(i=(i=r.targetName)?t[i]:t,r.saveTo(i))}},iE.prototype._innerSaveToNormal=function(e){var t=(t=this._normalState)||(this._normalState={});e.textConfig&&!t.textConfig&&(t.textConfig=this.textConfig),this._savePrimaryToNormal(e,t,eE)},iE.prototype._savePrimaryToNormal=function(e,t,n){for(var r=0;r<n.length;r++){var i=n[r];null==e[i]||i in t||(t[i]=this[i])}},iE.prototype.hasState=function(){return 0<this.currentStates.length},iE.prototype.getState=function(e){return this.states[e]},iE.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},iE.prototype.clearStates=function(e){this.useState(Zk,!1,e)},iE.prototype.useState=function(e,t,n,r){var i=e===Zk;if((a=this.hasState())||!i){var o,a=this.currentStates,s=this.stateTransition;if(!(0<=Object(Xw.q)(a,e))||!t&&1!==a.length){if((o=(o=this.stateProxy&&!i?this.stateProxy(e):o)||this.states&&this.states[e])||i)return i||this.saveCurrentToNormalState(o),(a=!!(o&&o.hoverLayer||r))&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,o,this._normalState,t,!n&&!this.__inHover&&s&&0<s.duration,s),r=this._textContent,s=this._textGuide,r&&r.useState(e,t,n,a),s&&s.useState(e,t,n,a),i?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!a&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2),o;Object(Xw.F)("State "+e+" not exists.")}}},iE.prototype.useStates=function(e,t,n){if(e.length){var r=[],i=this.currentStates,o=e.length,a=o===i.length;if(a)for(var s=0;s<o;s++)if(e[s]!==i[s]){a=!1;break}if(!a){for(s=0;s<o;s++){var u=e[s],c=void 0;(c=(c=this.stateProxy?this.stateProxy(u,e):c)||this.states[u])&&r.push(c)}n=((l=!!((l=r[o-1])&&l.hoverLayer||n))&&this._toggleHoverLayerFlag(!0),this._mergeStates(r));var l,h=this.stateTransition;n=(this.saveCurrentToNormalState(n),this._applyStateObj(e.join(","),n,this._normalState,!1,!t&&!this.__inHover&&h&&0<h.duration,h),this._textContent),h=this._textGuide;n&&n.useStates(e,t,l),h&&h.useStates(e,t,l),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!l&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2)}}else this.clearStates()},iE.prototype._updateAnimationTargets=function(){for(var e=0;e<this.animators.length;e++){var t=this.animators[e];t.targetName&&t.changeTarget(this[t.targetName])}},iE.prototype.removeState=function(e){var t;0<=(e=Object(Xw.q)(this.currentStates,e))&&((t=this.currentStates.slice()).splice(e,1),this.useStates(t))},iE.prototype.replaceState=function(e,t,n){var r=this.currentStates.slice(),i=(e=Object(Xw.q)(r,e),0<=Object(Xw.q)(r,t));0<=e?i?r.splice(e,1):r[e]=t:n&&!i&&r.push(t),this.useStates(r)},iE.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},iE.prototype._mergeStates=function(e){for(var t,n={},r=0;r<e.length;r++){var i=e[r];Object(Xw.m)(n,i),i.textConfig&&(t=t||{},Object(Xw.m)(t,i.textConfig))}return t&&(n.textConfig=t),n},iE.prototype._applyStateObj=function(e,t,n,r,i,o){for(var a=!(t&&r),s=(t&&t.textConfig?(this.textConfig=Object(Xw.m)({},(r?this:n).textConfig),Object(Xw.m)(this.textConfig,t.textConfig)):a&&n.textConfig&&(this.textConfig=n.textConfig),{}),u=!1,c=0;c<eE.length;c++){var l=eE[c],h=i&&tE[l];t&&null!=t[l]?h?(u=!0,s[l]=t[l]):this[l]=t[l]:a&&null!=n[l]&&(h?(u=!0,s[l]=n[l]):this[l]=n[l])}if(!i)for(c=0;c<this.animators.length;c++){var f=this.animators[c],d=f.targetName;f.getLoop()||f.__changeFinalValue(d?(t||n)[d]:t||n)}u&&this._transitionState(e,s,o)},iE.prototype._attachComponent=function(e){var t;e.__zr&&!e.__hostTarget||e!==this&&((t=this.__zr)&&e.addSelfToZr(t),e.__zr=t,e.__hostTarget=this)},iE.prototype._detachComponent=function(e){e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__hostTarget=null},iE.prototype.getClipPath=function(){return this._clipPath},iE.prototype.setClipPath=function(e){this._clipPath&&this._clipPath!==e&&this.removeClipPath(),this._attachComponent(e),this._clipPath=e,this.markRedraw()},iE.prototype.removeClipPath=function(){var e=this._clipPath;e&&(this._detachComponent(e),this._clipPath=null,this.markRedraw())},iE.prototype.getTextContent=function(){return this._textContent},iE.prototype.setTextContent=function(e){var t=this._textContent;t!==e&&(t&&t!==e&&this.removeTextContent(),e.innerTransformable=new Uk,this._attachComponent(e),this._textContent=e,this.markRedraw())},iE.prototype.setTextConfig=function(e){this.textConfig||(this.textConfig={}),Object(Xw.m)(this.textConfig,e),this.markRedraw()},iE.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},iE.prototype.removeTextContent=function(){var e=this._textContent;e&&(e.innerTransformable=null,this._detachComponent(e),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},iE.prototype.getTextGuideLine=function(){return this._textGuide},iE.prototype.setTextGuideLine=function(e){this._textGuide&&this._textGuide!==e&&this.removeTextGuideLine(),this._attachComponent(e),this._textGuide=e,this.markRedraw()},iE.prototype.removeTextGuideLine=function(){var e=this._textGuide;e&&(this._detachComponent(e),this._textGuide=null,this.markRedraw())},iE.prototype.markRedraw=function(){this.__dirty|=1;var e=this.__zr;e&&(this.__inHover?e.refreshHover():e.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},iE.prototype.dirty=function(){this.markRedraw()},iE.prototype._toggleHoverLayerFlag=function(e){this.__inHover=e;var t=this._textContent,n=this._textGuide;t&&(t.__inHover=e),n&&(n.__inHover=e)},iE.prototype.addSelfToZr=function(e){if(this.__zr!==e){this.__zr=e;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.addAnimator(t[n]);this._clipPath&&this._clipPath.addSelfToZr(e),this._textContent&&this._textContent.addSelfToZr(e),this._textGuide&&this._textGuide.addSelfToZr(e)}},iE.prototype.removeSelfFromZr=function(e){if(this.__zr){this.__zr=null;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.removeAnimator(t[n]);this._clipPath&&this._clipPath.removeSelfFromZr(e),this._textContent&&this._textContent.removeSelfFromZr(e),this._textGuide&&this._textGuide.removeSelfFromZr(e)}},iE.prototype.animate=function(e,t,n){var r=e?this[e]:this;r=new ck(r,t,n);return e&&(r.targetName=e),this.addAnimator(r,e),r},iE.prototype.addAnimator=function(e,t){var n=this.__zr,r=this;e.during((function(){r.updateDuringAnimation(t)})).done((function(){var t=r.animators,n=Object(Xw.q)(t,e);0<=n&&t.splice(n,1)})),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},iE.prototype.updateDuringAnimation=function(e){this.markRedraw()},iE.prototype.stopAnimation=function(e,t){for(var n=this.animators,r=n.length,i=[],o=0;o<r;o++){var a=n[o];e&&e!==a.scope?i.push(a):a.stop(t)}return this.animators=i,this},iE.prototype.animateTo=function(e,t,n){oE(this,e,t,n)},iE.prototype.animateFrom=function(e,t,n){oE(this,e,t,n,!0)},iE.prototype._transitionState=function(e,t,n,r){for(var i=oE(this,t,n,r),o=0;o<i.length;o++)i[o].__fromStateTransition=e},iE.prototype.getBoundingRect=function(){return null},iE.prototype.getPaintRect=function(){return null},iE.initDefaultProps=function(){var e=iE.prototype;function t(t,n,r,i){function o(e,t){Object.defineProperty(t,0,{get:function(){return e[r]},set:function(t){e[r]=t}}),Object.defineProperty(t,1,{get:function(){return e[i]},set:function(t){e[i]=t}})}Object.defineProperty(e,t,{get:function(){return this[n]||o(this,this[n]=[]),this[n]},set:function(e){this[r]=e[0],this[i]=e[1],this[n]=e,o(this,e)}})}e.type="element",e.name="",e.ignore=e.silent=e.isGroup=e.draggable=e.dragging=e.ignoreClip=e.__inHover=!1,e.__dirty=1,Object.defineProperty&&(t("position","_legacyPos","x","y"),t("scale","_legacyScale","scaleX","scaleY"),t("origin","_legacyOrigin","originX","originY"))}(),Zo=iE;function iE(e){this.id=Object(Xw.o)(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}function oE(e,t,n,r,i){function o(){c=!0,--u<=0&&(c?l&&l():h&&h())}function a(){--u<=0&&(c?l&&l():h&&h())}var s=[],u=(function e(t,n,r,i,o,a,s,u){for(var c=Object(Xw.E)(i),l=o.duration,h=o.delay,f=o.additive,d=o.setToFinal,p=!Object(Xw.z)(a),m=t.animators,g=[],A=0;A<c.length;A++){var v=c[A],b=i[v];null!=b&&null!=r[v]&&(p||a[v])?!Object(Xw.z)(b)||Object(Xw.t)(b)||Object(Xw.w)(b)?g.push(v):n?u||(r[v]=b,t.updateDuringAnimation(n)):e(t,v,r[v],b,o,a&&a[v],s,u):u||(r[v]=b,t.updateDuringAnimation(n),g.push(v))}var y=g.length;if(!f&&y)for(var w,x=0;x<m.length;x++)(C=m[x]).targetName!==n||C.stopTracks(g)&&(w=Object(Xw.q)(m,C),m.splice(w,1));if(o.force||(y=(g=Object(Xw.n)(g,(function(e){return!function(e,t){return e===t||Object(Xw.t)(e)&&Object(Xw.t)(t)&&function(e,t){var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;r++)if(e[r]!==t[r])return!1;return!0}(e,t)}(i[e],r[e])}))).length),0<y||o.force&&!s.length){var C,k=void 0,E=void 0,S=void 0;if(u)for(E={},d&&(k={}),x=0;x<y;x++)E[v=g[x]]=r[v],d?k[v]=i[v]:r[v]=i[v];else if(d)for(S={},x=0;x<y;x++)S[v=g[x]]=ek(r[v]),sE(r,i,v);(C=new ck(r,!1,!1,f?Object(Xw.n)(m,(function(e){return e.targetName===n})):null)).targetName=n,o.scope&&(C.scope=o.scope),d&&k&&C.whenWithKeys(0,k,g),S&&C.whenWithKeys(0,S,g),C.whenWithKeys(null==l?500:l,u?E:i,g).delay(h||0),t.addAnimator(C,n),s.push(C)}}(e,"",e,t,n=n||{},r,s,i),s.length),c=!1,l=n.done,h=n.aborted;u||l&&l(),0<s.length&&n.during&&s[0].during((function(e,t){n.during(t)}));for(var f=0;f<s.length;f++){var d=s[f];d.done(o),d.aborted(a),n.force&&d.duration(n.duration),d.start(n.easing)}return s}function aE(e,t,n){for(var r=0;r<n;r++)e[r]=t[r]}function sE(e,t,n){if(Object(Xw.t)(t[n]))if(Object(Xw.t)(e[n])||(e[n]=[]),Object(Xw.D)(t[n])){var r=t[n].length;e[n].length!==r&&(e[n]=new t[n].constructor(r),aE(e[n],t[n],r))}else{var i=t[n],o=e[n],a=i.length;if(r=i,Object(Xw.t)(r[0]))for(var s=i[0].length,u=0;u<a;u++)o[u]?aE(o[u],i[u],s):o[u]=Array.prototype.slice.call(i[u]);else aE(o,i,a);o.length=i.length}else e[n]=t[n]}function uE(e){var t=Jk.call(this)||this;return t.isGroup=!0,t._children=[],t.attr(e),t}Object(Xw.I)(Zo,px),Object(Xw.I)(Zo,Uk),(So=(Zw(uE,Jk=sa=Zo),uE.prototype.childrenRef=function(){return this._children},uE.prototype.children=function(){return this._children.slice()},uE.prototype.childAt=function(e){return this._children[e]},uE.prototype.childOfName=function(e){for(var t=this._children,n=0;n<t.length;n++)if(t[n].name===e)return t[n]},uE.prototype.childCount=function(){return this._children.length},uE.prototype.add=function(e){return e&&e!==this&&e.parent!==this&&(this._children.push(e),this._doAdd(e)),this},uE.prototype.addBefore=function(e,t){var n;return e&&e!==this&&e.parent!==this&&t&&t.parent===this&&0<=(t=(n=this._children).indexOf(t))&&(n.splice(t,0,e),this._doAdd(e)),this},uE.prototype.replace=function(e,t){return 0<=(e=Xw.q(this._children,e))&&this.replaceAt(t,e),this},uE.prototype.replaceAt=function(e,t){var n=this._children,r=n[t];return e&&e!==this&&e.parent!==this&&e!==r&&(n[t]=e,r.parent=null,(n=this.__zr)&&r.removeSelfFromZr(n),this._doAdd(e)),this},uE.prototype._doAdd=function(e){e.parent&&e.parent.remove(e);var t=(e.parent=this).__zr;t&&t!==e.__zr&&e.addSelfToZr(t),t&&t.refresh()},uE.prototype.remove=function(e){var t=this.__zr,n=this._children,r=Xw.q(n,e);return r<0||(n.splice(r,1),e.parent=null,t&&e.removeSelfFromZr(t),t&&t.refresh()),this},uE.prototype.removeAll=function(){for(var e=this._children,t=this.__zr,n=0;n<e.length;n++){var r=e[n];t&&r.removeSelfFromZr(t),r.parent=null}return e.length=0,this},uE.prototype.eachChild=function(e,t){for(var n=this._children,r=0;r<n.length;r++){var i=n[r];e.call(t,i,r)}return this},uE.prototype.traverse=function(e,t){for(var n=0;n<this._children.length;n++){var r=this._children[n],i=e.call(t,r);r.isGroup&&!i&&r.traverse(e,t)}return this},uE.prototype.addSelfToZr=function(e){Jk.prototype.addSelfToZr.call(this,e);for(var t=0;t<this._children.length;t++)this._children[t].addSelfToZr(e)},uE.prototype.removeSelfFromZr=function(e){Jk.prototype.removeSelfFromZr.call(this,e);for(var t=0;t<this._children.length;t++)this._children[t].removeSelfFromZr(e)},uE.prototype.getBoundingRect=function(e){for(var t=new Zx(0,0,0,0),n=e||this._children,r=[],i=null,o=0;o<n.length;o++){var a,s=n[o];s.ignore||s.invisible||(a=s.getBoundingRect(),(s=s.getLocalTransform(r))?(Zx.applyTransform(t,a,s),(i=i||t.clone()).union(t)):(i=i||a.clone()).union(a))}return i||t},uE)).prototype.type="group";var cE=So,lE={},hE={};
/*!
* ZRender, a high performance 2d drawing library.
*
* Copyright (c) 2013, Baidu Inc.
* All rights reserved.
*
* LICENSE
* https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
*/dE.prototype.add=function(e){e&&(this.storage.addRoot(e),e.addSelfToZr(this),this.refresh())},dE.prototype.remove=function(e){e&&(this.storage.delRoot(e),e.removeSelfFromZr(this),this.refresh())},dE.prototype.configLayer=function(e,t){this.painter.configLayer&&this.painter.configLayer(e,t),this.refresh()},dE.prototype.setBackgroundColor=function(e){this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this.refresh(),this._backgroundColor=e,this._darkMode=function(e){if(e){if("string"==typeof e)return Object(GC.c)(e,1)<.4;if(e.colorStops){for(var t=e.colorStops,n=0,r=t.length,i=0;i<r;i++)n+=Object(GC.c)(t[i].color,1);return(n/=r)<.4}}return!1}(e)},dE.prototype.getBackgroundColor=function(){return this._backgroundColor},dE.prototype.setDarkMode=function(e){this._darkMode=e},dE.prototype.isDarkMode=function(){return this._darkMode},dE.prototype.refreshImmediately=function(e){e||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1},dE.prototype.refresh=function(){this._needsRefresh=!0,this.animation.start()},dE.prototype.flush=function(){this._flush(!1)},dE.prototype._flush=function(e){var t,n=lk();this._needsRefresh&&(t=!0,this.refreshImmediately(e)),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately()),e=lk();t?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:e-n})):0<this._sleepAfterStill&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},dE.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},dE.prototype.wakeUp=function(){this.animation.start(),this._stillFrameAccum=0},dE.prototype.refreshHover=function(){this._needsRefreshHover=!0},dE.prototype.refreshHoverImmediately=function(){this._needsRefreshHover=!1,this.painter.refreshHover&&"canvas"===this.painter.getType()&&this.painter.refreshHover()},dE.prototype.resize=function(e){this.painter.resize((e=e||{}).width,e.height),this.handler.resize()},dE.prototype.clearAnimation=function(){this.animation.clear()},dE.prototype.getWidth=function(){return this.painter.getWidth()},dE.prototype.getHeight=function(){return this.painter.getHeight()},dE.prototype.setCursorStyle=function(e){this.handler.setCursorStyle(e)},dE.prototype.findHover=function(e,t){return this.handler.findHover(e,t)},dE.prototype.on=function(e,t,n){return this.handler.on(e,t,n),this},dE.prototype.off=function(e,t){this.handler.off(e,t)},dE.prototype.trigger=function(e,t){this.handler.trigger(e,t)},dE.prototype.clear=function(){for(var e=this.storage.getRoots(),t=0;t<e.length;t++)e[t]instanceof cE&&e[t].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()},dE.prototype.dispose=function(){var e;this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,e=this.id,delete hE[e]};var fE=dE;function dE(e,t,n){var r,i=this,o=(this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,n=n||{},this.dom=t,this.id=e,new yC),a=n.renderer||"canvas",s=(a=(lE[a]||(a=Xw.E(lE)[0]),n.useDirtyRect=null!=n.useDirtyRect&&n.useDirtyRect,new lE[a](t,o,n,e)),t=n.ssr||a.ssrOnly,e=(this.storage=o,this.painter=a,Yw.a.node||Yw.a.worker||t?null:new Dk(a.getViewportRoot(),a.root)),n.useCoarsePointer);(null==s||"auto"===s?Yw.a.touchEventsSupported:!!s)&&(r=Xw.N(n.pointerSize,44)),this.handler=new fC(o,a,e,a.root,r),this.animation=new dk({stage:{update:t?null:function(){return i._flush(!0)}}}),t||this.animation.start()}function pE(e,t){return e=new fE(Xw.o(),e,t),hE[e.id]=e}function mE(e,t,n,r){var i=t[0],o=(t=t[1],n[0]),a=t-i,s=(n=n[1])-o;if(0==a)return 0==s?o:(o+n)/2;if(r)if(0<a){if(e<=i)return o;if(t<=e)return n}else{if(i<=e)return o;if(e<=t)return n}else{if(e===i)return o;if(e===t)return n}return(e-i)/a*s+o}function gE(e,t){switch(e){case"center":case"middle":e="50%";break;case"left":case"top":e="0%";break;case"right":case"bottom":e="100%"}return Xw.B(e)?e.replace(/^\s+|\s+$/g,"").match(/%$/)?parseFloat(e)/100*t:parseFloat(e):null==e?NaN:+e}function AE(e,t,n){return null==t&&(t=10),t=Math.min(Math.max(0,t),20),e=(+e).toFixed(t),n?e:+e}function vE(e){if(e=+e,isNaN(e))return 0;if(1e-14<e)for(var t=1,n=0;n<15;n++,t*=10)if(Math.round(e*t)/t===e)return n;return o=0<(i=(r=(r=e).toString().toLowerCase()).indexOf("e"))?+r.slice(i+1):0,i=0<i?i:r.length,i=(r=r.indexOf("."))<0?0:i-1-r,Math.max(0,i-o);var r,i,o}function bE(e){var t=2*Math.PI;return(e%t+t)%t}function yE(e){return-1e-4<e&&e<1e-4}var wE=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function xE(e){var t,n;return e instanceof Date?e:Xw.B(e)?(t=wE.exec(e))?t[8]?(n=+t[4]||0,"Z"!==t[8].toUpperCase()&&(n-=+t[8].slice(0,3)),new Date(Date.UTC(+t[1],+(t[2]||1)-1,+t[3]||1,n,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0))):new Date(+t[1],+(t[2]||1)-1,+t[3]||1,+t[4]||0,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0):new Date(NaN):null==e?new Date(NaN):new Date(Math.round(e))}function CE(e){var t;return 0===e?0:(t=Math.floor(Math.log(e)/Math.LN10),10<=e/Math.pow(10,t)&&t++,t)}function kE(e,t){var n=CE(e),r=Math.pow(10,n),i=e/r;return e=(t=t?i<1.5?1:i<2.5?2:i<4?3:i<7?5:10:i<1?1:i<2?2:i<3?3:i<5?5:10)*r,-20<=n?+e.toFixed(n<0?-n:0):e}function EE(e){var t=parseFloat(e);return t==e&&(0!==t||!Xw.B(e)||e.indexOf("x")<=0)?t:NaN}function SE(){return Math.round(9*Math.random())}function _E(e,t){return null==e?t:null==t?e:e*t/function e(t,n){return 0===n?t:e(n,t%n)}(e,t)}function OE(e,t,n){return(t-e)*n+e}var TE="series\0";function DE(e){return e instanceof Array?e:null==e?[]:[e]}function BE(e,t,n){if(e){e[t]=e[t]||{},e.emphasis=e.emphasis||{},e.emphasis[t]=e.emphasis[t]||{};for(var r=0,i=n.length;r<i;r++){var o=n[r];!e.emphasis[t].hasOwnProperty(o)&&e[t].hasOwnProperty(o)&&(e.emphasis[t][o]=e[t][o])}}}var IE=["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"];function ME(e){return!Object(Xw.z)(e)||Object(Xw.s)(e)||e instanceof Date?e:e.value}function jE(e,t,n){return t=FE(t[e],null),n=FE(n[e],null),null!=t&&null!=n&&t===n}function NE(e){return FE(e,"")}function FE(e,t){return null==e?t:Object(Xw.B)(e)?e:Object(Xw.y)(e)||Object(Xw.C)(e)?e+"":t}function RE(e){return!(!(e=e.name)||!e.indexOf(TE))}function PE(e){return e&&null!=e.id&&0===NE(e.id).indexOf("\0_ec_\0")}function LE(e,t){return null!=t.dataIndexInside?t.dataIndexInside:null!=t.dataIndex?Object(Xw.s)(t.dataIndex)?Object(Xw.G)(t.dataIndex,(function(t){return e.indexOfRawIndex(t)})):e.indexOfRawIndex(t.dataIndex):null!=t.name?Object(Xw.s)(t.name)?Object(Xw.G)(t.name,(function(t){return e.indexOfName(t)})):e.indexOfName(t.name):void 0}function UE(){var e="__ec_inner_"+zE++;return function(t){return t[e]||(t[e]={})}}var zE=SE();function HE(e,t,n){var r=(t=$E(t,n)).mainTypeSpecified,i=t.queryOptionMap,o=t.others,a=n?n.defaultMainType:null;return!r&&a&&i.set(a,{}),i.each((function(t,r){t=VE(e,r,t,{useDefault:a===r,enableAll:!n||null==n.enableAll||n.enableAll,enableNone:!n||null==n.enableNone||n.enableNone}),o[r+"Models"]=t.models,o[r+"Model"]=t.models[0]})),o}function $E(e,t){var n=Object(Xw.B)(e)?((n={})[e+"Index"]=0,n):e,r=Object(Xw.f)(),i={},o=!1;return Object(Xw.k)(n,(function(e,n){var a;"dataIndex"===n||"dataIndexInside"===n?i[n]=e:(a=(n=n.match(/^(\w+)(Index|Id|Name)$/)||[])[1],n=(n[2]||"").toLowerCase(),!a||!n||t&&t.includeMainTypes&&Object(Xw.q)(t.includeMainTypes,a)<0||(o=o||!!a,(r.get(a)||r.set(a,{}))[n]=e))})),{mainTypeSpecified:o,queryOptionMap:r,others:i}}var QE={useDefault:!0,enableAll:!1,enableNone:!1};function VE(e,t,n,r){r=r||QE;var i=n.index,o=n.id,a=(n=n.name,{models:null,specified:null!=i||null!=o||null!=n});return a.specified?"none"===i||!1===i?(Object(Xw.b)(r.enableNone,'`"none"` or `false` is not a valid value on index option.'),a.models=[]):("all"===i&&(Object(Xw.b)(r.enableAll,'`"all"` is not a valid value on index option.'),i=o=n=null),a.models=e.queryComponents({mainType:t,index:i,id:o,name:n})):(i=void 0,a.models=r.useDefault&&(i=e.getComponent(t))?[i]:[]),a}function qE(e,t,n){e.setAttribute?e.setAttribute(t,n):e[t]=n}function GE(e,t,n,r,i){var o=null==t||"auto"===t;if(null==r)return r;if(Object(Xw.y)(r))return AE(f=OE(n||0,r,i),o?Math.max(vE(n||0),vE(r)):t);if(Object(Xw.B)(r))return i<1?n:r;for(var a=[],s=n,u=r,c=Math.max(s?s.length:0,u.length),l=0;l<c;++l){var h,f,d=e.getDimensionInfo(l);d&&"ordinal"===d.type?a[l]=(i<1&&s?s:u)[l]:(f=OE(d=s&&s[l]?s[l]:0,h=u[l],i),a[l]=AE(f,o?Math.max(vE(d),vE(h)):t))}return a}var WE="___EC__COMPONENT__CONTAINER___",KE="___EC__EXTENDED_CLASS___";function YE(e){var t={main:"",sub:""};return e&&(e=e.split("."),t.main=e[0]||"",t.sub=e[1]||""),t}function XE(e){(e.$constructor=e).extend=function(e){var t,n,r,i=this;function o(){return n.apply(this,arguments)||this}return r=i,Xw.v(r)&&/^class\s/.test(Function.prototype.toString.call(r))?(Kw(o,n=i),t=o):Xw.r(t=function(){(e.$constructor||i).apply(this,arguments)},this),Xw.m(t.prototype,e),t[KE]=!0,t.extend=this.extend,t.superCall=ZE,t.superApply=eS,t.superClass=i,t}}function JE(e,t){e.extend=t.extend}function ZE(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return this.superClass.prototype[t].apply(e,n)}function eS(e,t,n){return this.superClass.prototype[t].apply(e,n)}function tS(e){var t={};e.registerClass=function(e){var n,r=e.type||e.prototype.type;return r&&(n=r,Xw.b(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(n),'componentType "'+n+'" illegal'),(n=YE(e.prototype.type=r)).sub?n.sub!==WE&&((function(e){var n=t[e.main];return n&&n[WE]||(n=t[e.main]={___EC__COMPONENT__CONTAINER___:!0}),n}(n))[n.sub]=e):t[n.main]=e),e},e.getClass=function(e,n,r){var i=t[e];if(i&&i[WE]&&(i=n?i[n]:null),r&&!i)throw new Error(n?"Component "+e+"."+(n||"")+" is used but not imported.":e+".type should be specified.");return i},e.getClassesByMainType=function(e){e=YE(e);var n=[];return(e=t[e.main])&&e[WE]?Xw.k(e,(function(e,t){t!==WE&&n.push(e)})):n.push(e),n},e.hasClass=function(e){return e=YE(e),!!t[e.main]},e.getAllClassMainTypes=function(){var e=[];return Xw.k(t,(function(t,n){e.push(n)})),e},e.hasSubTypes=function(e){return e=YE(e),(e=t[e.main])&&e[WE]}}function nS(e,t){for(var n=0;n<e.length;n++)e[n][1]||(e[n][1]=e[n][0]);return t=t||!1,function(n,r,i){for(var o={},a=0;a<e.length;a++){var s=e[a][1];r&&0<=Xw.q(r,s)||i&&Xw.q(i,s)<0||null!=(s=n.getShallow(s,t))&&(o[e[a][0]]=s)}return o}}ja=Math.round(10*Math.random());var rS=nS([["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]]);iS.prototype.getAreaStyle=function(e,t){return rS(this,e,t)},Fa=iS;function iS(){}var oS=new zk.a(50);function aS(e,t,n,r,i){return e?"string"==typeof e?(t&&t.__zrImageSrc===e||!n||(n={hostEl:n,cb:r,cbPayload:i},(r=oS.get(e))?uS(t=r.image)||r.pending.push(n):((t=Hk.c.loadImage(e,sS,sS)).__zrImageSrc=e,oS.put(e,t.__cachedImgObj={image:t,pending:[n]}))),t):e:t}function sS(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t<e.pending.length;t++){var n=e.pending[t],r=n.cb;r&&r(this,n.cbPayload),n.hostEl.dirty()}e.pending.length=0}function uS(e){return e&&e.width&&e.height}var cS=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function lS(e,t,n,r){r=r||{};for(var i=Object(Xw.m)({},r),o=(i.font=t,n=Object(Xw.N)(n,"..."),i.maxIterations=Object(Xw.N)(r.maxIterations,2),i.minChar=Object(Xw.N)(r.minChar,0)),a=(i.cnCharWidth=Qk("国",t),i.ascCharWidth=Qk("a",t)),s=(i.placeholder=Object(Xw.N)(r.placeholder,""),e=Math.max(0,e-1)),u=0;u<o&&a<=s;u++)s-=a;return s<(r=Qk(n,t))&&(n="",r=0),s=e-r,i.ellipsis=n,i.ellipsisWidth=r,i.contentWidth=s,i.containerWidth=e,i}function hS(e,t){var n=t.containerWidth,r=t.font,i=t.contentWidth;if(!n)return"";if(!((s=Qk(e,r))<=n)){for(var o=0;;o++){if(s<=i||o>=t.maxIterations){e+=t.ellipsis;break}var a=0===o?function(e,t,n,r){for(var i=0,o=0,a=e.length;o<a&&i<t;o++){var s=e.charCodeAt(o);i+=0<=s&&s<=127?n:r}return o}(e,i,t.ascCharWidth,t.cnCharWidth):0<s?Math.floor(e.length*i/s):0,s=Qk(e=e.substr(0,a),r)}""===e&&(e=t.placeholder)}return e}var fS=function(){},dS=function(e){this.tokens=[],e&&(this.tokens=e)},pS=function(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[]};function mS(e,t,n,r,i){var o,a,s=""===t,u=i&&n.rich[i]||{},c=e.lines,l=u.font||n.font,h=!1;r?(n=(e=u.padding)?e[1]+e[3]:0,null!=u.width&&"auto"!==u.width?(e=Yk(u.width,r.width)+n,0<c.length&&e+r.accumWidth>r.width&&(o=t.split("\n"),h=!0),r.accumWidth=e):(e=AS(t,l,r.width,r.breakAll,r.accumWidth),r.accumWidth=e.accumWidth+n,a=e.linesWidths,o=e.lines)):o=t.split("\n");for(var f=0;f<o.length;f++){var d,p,m=o[f],g=new fS;g.styleName=i,g.text=m,g.isLineHolder=!m&&!s,"number"==typeof u.width?g.width=u.width:g.width=a?a[f]:Qk(m,l),f||h?c.push(new dS([g])):1===(p=(d=(c[c.length-1]||(c[0]=new dS)).tokens).length)&&d[0].isLineHolder?d[0]=g:!m&&p&&!s||d.push(g)}}var gS=Object(Xw.L)(",&?/;] ".split(""),(function(e,t){return e[t]=!0,e}),{});function AS(e,t,n,r,i){for(var o,a=[],s=[],u="",c="",l=0,h=0,f=0;f<e.length;f++){var d,p,m=e.charAt(f);"\n"===m?(c&&(u+=c,h+=l),a.push(u),s.push(h),c=u="",h=l=0):(d=Qk(m,t),p=!(r||(p=void 0,!(32<=(p=(p=o=m).charCodeAt(0))&&p<=591||880<=p&&p<=4351||4608<=p&&p<=5119||7680<=p&&p<=8303)||gS[o])),(a.length?n<h+d:n<i+h+d)?h?(u||c)&&(h=p?(u||(u=c,c="",h=l=0),a.push(u),s.push(h-l),c+=m,u="",l+=d):(c&&(u+=c,c="",l=0),a.push(u),s.push(h),u=m,d)):p?(a.push(c),s.push(l),c=m,l=d):(a.push(m),s.push(d)):(h+=d,p?(c+=m,l+=d):(c&&(u+=c,c="",l=0),u+=m)))}return a.length||u||(u=e,c="",l=0),c&&(u+=c),u&&(a.push(u),s.push(h)),1===a.length&&(h+=i),{accumWidth:h,lines:a,linesWidths:s}}var vS,bS="__zr_style_"+Math.round(10*Math.random()),yS={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},wS={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}},xS=(yS[bS]=!0,["z","z2","invisible"]),CS=["invisible"];Zw(kS,vS=sa),kS.prototype._init=function(e){for(var t=Object(Xw.E)(e),n=0;n<t.length;n++){var r=t[n];"style"===r?this.useStyle(e[r]):vS.prototype.attrKV.call(this,r,e[r])}this.style||this.useStyle({})},kS.prototype.beforeBrush=function(){},kS.prototype.afterBrush=function(){},kS.prototype.innerBeforeBrush=function(){},kS.prototype.innerAfterBrush=function(){},kS.prototype.shouldBePainted=function(e,t,n,r){var i=this.transform;if(this.ignore||this.invisible||0===this.style.opacity||this.culling&&function(e,t,n){return ES.copy(e.getBoundingRect()),e.transform&&ES.applyTransform(e.transform),SS.width=t,SS.height=n,!ES.intersect(SS)}(this,e,t)||i&&!i[0]&&!i[3])return!1;if(n&&this.__clipPaths)for(var o=0;o<this.__clipPaths.length;++o)if(this.__clipPaths[o].isZeroArea())return!1;if(r&&this.parent)for(var a=this.parent;a;){if(a.ignore)return!1;a=a.parent}return!0},kS.prototype.contain=function(e,t){return this.rectContain(e,t)},kS.prototype.traverse=function(e,t){e.call(t,this)},kS.prototype.rectContain=function(e,t){return e=this.transformCoordToLocal(e,t),this.getBoundingRect().contain(e[0],e[1])},kS.prototype.getPaintRect=function(){var e,t,n,r,i,o=this._paintRect;return this._paintRect&&!this.__dirty||(i=this.transform,e=this.getBoundingRect(),t=(r=this.style).shadowBlur||0,n=r.shadowOffsetX||0,r=r.shadowOffsetY||0,o=this._paintRect||(this._paintRect=new Zx(0,0,0,0)),i?Zx.applyTransform(o,e,i):o.copy(e),(t||n||r)&&(o.width+=2*t+Math.abs(n),o.height+=2*t+Math.abs(r),o.x=Math.min(o.x,o.x+n-t),o.y=Math.min(o.y,o.y+r-t)),i=this.dirtyRectTolerance,o.isZero()||(o.x=Math.floor(o.x-i),o.y=Math.floor(o.y-i),o.width=Math.ceil(o.width+1+2*i),o.height=Math.ceil(o.height+1+2*i))),o},kS.prototype.setPrevPaintRect=function(e){e?(this._prevPaintRect=this._prevPaintRect||new Zx(0,0,0,0),this._prevPaintRect.copy(e)):this._prevPaintRect=null},kS.prototype.getPrevPaintRect=function(){return this._prevPaintRect},kS.prototype.animateStyle=function(e){return this.animate("style",e)},kS.prototype.updateDuringAnimation=function(e){"style"===e?this.dirtyStyle():this.markRedraw()},kS.prototype.attrKV=function(e,t){"style"!==e?vS.prototype.attrKV.call(this,e,t):this.style?this.setStyle(t):this.useStyle(t)},kS.prototype.setStyle=function(e,t){return"string"==typeof e?this.style[e]=t:Object(Xw.m)(this.style,e),this.dirtyStyle(),this},kS.prototype.dirtyStyle=function(e){e||this.markRedraw(),this.__dirty|=2,this._rect&&(this._rect=null)},kS.prototype.dirty=function(){this.dirtyStyle()},kS.prototype.styleChanged=function(){return!!(2&this.__dirty)},kS.prototype.styleUpdated=function(){this.__dirty&=-3},kS.prototype.createStyle=function(e){return Object(Xw.g)(yS,e)},kS.prototype.useStyle=function(e){e[bS]||(e=this.createStyle(e)),this.__inHover?this.__hoverStyle=e:this.style=e,this.dirtyStyle()},kS.prototype.isStyleObject=function(e){return e[bS]},kS.prototype._innerSaveToNormal=function(e){vS.prototype._innerSaveToNormal.call(this,e);var t=this._normalState;e.style&&!t.style&&(t.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(e,t,xS)},kS.prototype._applyStateObj=function(e,t,n,r,i,o){vS.prototype._applyStateObj.call(this,e,t,n,r,i,o);var a,s=!(t&&r);if(t&&t.style?i?r?a=t.style:(a=this._mergeStyle(this.createStyle(),n.style),this._mergeStyle(a,t.style)):(a=this._mergeStyle(this.createStyle(),(r?this:n).style),this._mergeStyle(a,t.style)):s&&(a=n.style),a)if(i){var u=this.style;if(this.style=this.createStyle(s?{}:u),s)for(var c=Object(Xw.E)(u),l=0;l<c.length;l++)(f=c[l])in a&&(a[f]=a[f],this.style[f]=u[f]);var h=Object(Xw.E)(a);for(l=0;l<h.length;l++){var f=h[l];this.style[f]=this.style[f]}this._transitionState(e,{style:a},o,this.getAnimationStyleProps())}else this.useStyle(a);var d=this.__inHover?CS:xS;for(l=0;l<d.length;l++)f=d[l],t&&null!=t[f]?this[f]=t[f]:s&&null!=n[f]&&(this[f]=n[f])},kS.prototype._mergeStates=function(e){for(var t,n=vS.prototype._mergeStates.call(this,e),r=0;r<e.length;r++){var i=e[r];i.style&&this._mergeStyle(t=t||{},i.style)}return t&&(n.style=t),n},kS.prototype._mergeStyle=function(e,t){return Object(Xw.m)(e,t),e},kS.prototype.getAnimationStyleProps=function(){return wS},kS.initDefaultProps=((la=kS.prototype).type="displayable",la.invisible=!1,la.z=0,la.z2=0,la.zlevel=0,la.culling=!1,la.cursor="pointer",la.rectHover=!1,la.incremental=!1,la._rect=null,la.dirtyRectTolerance=0,void(la.__dirty=3)),Zn=kS;function kS(e){return vS.call(this,e)||this}var ES=new Zx(0,0,0,0),SS=new Zx(0,0,0,0),_S=Zn,OS=Math.min,TS=Math.max,DS=Math.sin,BS=Math.cos,IS=2*Math.PI,MS=ex(),jS=ex(),NS=ex();function FS(e,t,n){if(0!==e.length){for(var r=e[0],i=r[0],o=r[0],a=r[1],s=r[1],u=1;u<e.length;u++)r=e[u],i=OS(i,r[0]),o=TS(o,r[0]),a=OS(a,r[1]),s=TS(s,r[1]);t[0]=i,t[1]=a,n[0]=o,n[1]=s}}function RS(e,t,n,r,i,o){i[0]=OS(e,n),i[1]=OS(t,r),o[0]=TS(e,n),o[1]=TS(t,r)}var PS=[],LS=[],US={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},zS=[],HS=[],$S=[],QS=[],VS=[],qS=[],GS=Math.min,WS=Math.max,KS=Math.cos,YS=Math.sin,XS=Math.abs,JS=Math.PI,ZS=2*JS,e_="undefined"!=typeof Float32Array,t_=[];function n_(e){return Math.round(e/JS*1e8)/1e8%2*JS}function r_(e){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,e&&(this._saveData=!1),this._saveData&&(this.data=[])}r_.prototype.increaseVersion=function(){this._version++},r_.prototype.getVersion=function(){return this._version},r_.prototype.setScale=function(e,t,n){0<(n=n||0)&&(this._ux=XS(n/Bk/e)||0,this._uy=XS(n/Bk/t)||0)},r_.prototype.setDPR=function(e){this.dpr=e},r_.prototype.setContext=function(e){this._ctx=e},r_.prototype.getContext=function(){return this._ctx},r_.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},r_.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},r_.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(US.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},r_.prototype.lineTo=function(e,t){var n=XS(e-this._xi),r=XS(t-this._yi),i=n>this._ux||r>this._uy;return this.addData(US.L,e,t),this._ctx&&i&&this._ctx.lineTo(e,t),i?(this._xi=e,this._yi=t,this._pendingPtDist=0):(i=n*n+r*r)>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=i),this},r_.prototype.bezierCurveTo=function(e,t,n,r,i,o){return this._drawPendingPt(),this.addData(US.C,e,t,n,r,i,o),this._ctx&&this._ctx.bezierCurveTo(e,t,n,r,i,o),this._xi=i,this._yi=o,this},r_.prototype.quadraticCurveTo=function(e,t,n,r){return this._drawPendingPt(),this.addData(US.Q,e,t,n,r),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,r),this._xi=n,this._yi=r,this},r_.prototype.arc=function(e,t,n,r,i,o){this._drawPendingPt(),t_[0]=r,t_[1]=i,s=o,(u=n_((a=t_)[0]))<0&&(u+=ZS),l=u-a[0],c=a[1],c+=l,!s&&ZS<=c-u?c=u+ZS:s&&ZS<=u-c?c=u-ZS:!s&&c<u?c=u+(ZS-n_(u-c)):s&&u<c&&(c=u-(ZS-n_(c-u))),a[0]=u,a[1]=c,r=t_[0];var a,s,u,c,l=(i=t_[1])-r;return this.addData(US.A,e,t,n,n,r,l,0,o?0:1),this._ctx&&this._ctx.arc(e,t,n,r,i,o),this._xi=KS(i)*n+e,this._yi=YS(i)*n+t,this},r_.prototype.arcTo=function(e,t,n,r,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,r,i),this},r_.prototype.rect=function(e,t,n,r){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,r),this.addData(US.R,e,t,n,r),this},r_.prototype.closePath=function(){this._drawPendingPt(),this.addData(US.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&e.closePath(),this._xi=t,this._yi=n,this},r_.prototype.fill=function(e){e&&e.fill(),this.toStatic()},r_.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},r_.prototype.len=function(){return this._len},r_.prototype.setData=function(e){var t=e.length;this.data&&this.data.length===t||!e_||(this.data=new Float32Array(t));for(var n=0;n<t;n++)this.data[n]=e[n];this._len=t},r_.prototype.appendPath=function(e){for(var t=(e=e instanceof Array?e:[e]).length,n=0,r=this._len,i=0;i<t;i++)n+=e[i].len();for(e_&&this.data instanceof Float32Array&&(this.data=new Float32Array(r+n)),i=0;i<t;i++)for(var o=e[i].data,a=0;a<o.length;a++)this.data[r++]=o[a];this._len=r},r_.prototype.addData=function(e,t,n,r,i,o,a,s,u){if(this._saveData){var c=this.data;this._len+arguments.length>c.length&&(this._expandData(),c=this.data);for(var l=0;l<arguments.length;l++)c[this._len++]=arguments[l]}},r_.prototype._drawPendingPt=function(){0<this._pendingPtDist&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},r_.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t<this._len;t++)e[t]=this.data[t];this.data=e}},r_.prototype.toStatic=function(){var e;this._saveData&&(this._drawPendingPt(),(e=this.data)instanceof Array&&(e.length=this._len,e_&&11<this._len&&(this.data=new Float32Array(e))))},r_.prototype.getBoundingRect=function(){$S[0]=$S[1]=VS[0]=VS[1]=Number.MAX_VALUE,QS[0]=QS[1]=qS[0]=qS[1]=-Number.MAX_VALUE;for(var e,t=this.data,n=0,r=0,i=0,o=0,a=0;a<this._len;){var s=t[a++],u=1===a;switch(u&&(i=n=t[a],o=r=t[a+1]),s){case US.M:n=i=t[a++],r=o=t[a++],VS[0]=i,VS[1]=o,qS[0]=i,qS[1]=o;break;case US.L:RS(n,r,t[a],t[a+1],VS,qS),n=t[a++],r=t[a++];break;case US.C:k=C=x=w=y=b=v=A=void 0;var c=n,l=r,h=t[a++],f=t[a++],d=t[a++],p=t[a++],m=t[a],g=t[a+1],A=VS,v=qS,b=NC,y=IC,w=b(c,h,d,m,PS);A[0]=1/0,A[1]=1/0,v[0]=-1/0,v[1]=-1/0;for(var x=0;x<w;x++){var C=y(c,h,d,m,PS[x]);A[0]=OS(C,A[0]),v[0]=TS(C,v[0])}for(w=b(l,f,p,g,LS),x=0;x<w;x++){var k=y(l,f,p,g,LS[x]);A[1]=OS(k,A[1]),v[1]=TS(k,v[1])}A[0]=OS(c,A[0]),v[0]=TS(c,v[0]),A[0]=OS(m,A[0]),v[0]=TS(m,v[0]),A[1]=OS(l,A[1]),v[1]=TS(l,v[1]),A[1]=OS(g,A[1]),v[1]=TS(g,v[1]),n=t[a++],r=t[a++];break;case US.Q:b=n,L=r,B=t[a++],_=t[a++],D=t[a],E=t[a+1],T=VS,I=qS,e=O=e=S=void 0,S=PC,e=TS(OS((O=UC)(b,B,D),1),0),O=TS(OS(O(L,_,E),1),0),B=S(b,B,D,e),e=S(L,_,E,O),T[0]=OS(b,D,B),T[1]=OS(L,E,e),I[0]=TS(b,D,B),I[1]=TS(L,E,e),n=t[a++],r=t[a++];break;case US.A:var E,S=t[a++],_=t[a++],O=t[a++],T=t[a++],D=t[a++],B=t[a++]+D,I=(a+=1,!t[a++]),M=(u&&(i=KS(D)*O+S,o=YS(D)*T+_),Q=E=E=$=H=z=U=L=P=R=M=void 0,S),j=_,N=O,F=T,R=D,P=B,L=I,U=VS,z=qS,H=ux,$=cx;if((E=Math.abs(R-P))%IS<1e-4&&1e-4<E)U[0]=M-N,U[1]=j-F,z[0]=M+N,z[1]=j+F;else{MS[0]=BS(R)*N+M,MS[1]=DS(R)*F+j,jS[0]=BS(P)*N+M,jS[1]=DS(P)*F+j,H(U,MS,jS),$(z,MS,jS),(R%=IS)<0&&(R+=IS),(P%=IS)<0&&(P+=IS),P<R&&!L?P+=IS:R<P&&L&&(R+=IS),L&&(E=P,P=R,R=E);for(var Q=0;Q<P;Q+=Math.PI/2)R<Q&&(NS[0]=BS(Q)*N+M,NS[1]=DS(Q)*F+j,H(U,NS,U),$(z,NS,z))}n=KS(B)*O+S,r=YS(B)*T+_;break;case US.R:RS(i=n=t[a++],o=r=t[a++],i+t[a++],o+t[a++],VS,qS);break;case US.Z:n=i,r=o}ux($S,$S,VS),cx(QS,QS,qS)}return 0===a&&($S[0]=$S[1]=QS[0]=QS[1]=0),new Zx($S[0],$S[1],QS[0]-$S[0],QS[1]-$S[1])},r_.prototype._calculateLength=function(){for(var e=this.data,t=this._len,n=this._ux,r=this._uy,i=0,o=0,a=0,s=0,u=(this._pathSegLen||(this._pathSegLen=[]),this._pathSegLen),c=0,l=0,h=0;h<t;){var f=e[h++],d=1===h,p=(d&&(a=i=e[h],s=o=e[h+1]),-1);switch(f){case US.M:i=a=e[h++],o=s=e[h++];break;case US.L:var m=e[h++],g=(b=e[h++])-o;(XS(_=m-i)>n||XS(g)>r||h===t-1)&&(p=Math.sqrt(_*_+g*g),i=m,o=b);break;case US.C:var A=e[h++],v=e[h++],b=(m=e[h++],e[h++]);p=function(e,t,n,r,i,o,a,s,u){for(var c=e,l=t,h=0,f=1;f<=10;f++){var d,p=IC(e,n,i,a,d=.1*f),m=p-c,g=(d=IC(t,r,o,s,d))-l;h+=Math.sqrt(m*m+g*g),c=p,l=d}return h}(i,o,A,v,m,b,y=e[h++],w=e[h++]),i=y,o=w;break;case US.Q:p=function(e,t,n,r,i,o,a){for(var s=e,u=t,c=0,l=1;l<=10;l++){var h,f=PC(e,n,i,h=.1*l),d=f-s,p=(h=PC(t,r,o,h))-u;c+=Math.sqrt(d*d+p*p),s=f,u=h}return c}(i,o,A=e[h++],v=e[h++],m=e[h++],b=e[h++]),i=m,o=b;break;case US.A:var y=e[h++],w=e[h++],x=e[h++],C=e[h++],k=e[h++],E=e[h++],S=E+k;h+=1,e[h++],d&&(a=KS(k)*x+y,s=YS(k)*C+w),p=WS(x,C)*GS(ZS,Math.abs(E)),i=KS(S)*x+y,o=YS(S)*C+w;break;case US.R:a=i=e[h++],s=o=e[h++],p=2*e[h++]+2*e[h++];break;case US.Z:var _=a-i;g=s-o;p=Math.sqrt(_*_+g*g),i=a,o=s}0<=p&&(c+=u[l++]=p)}return this._pathLen=c},r_.prototype.rebuildPath=function(e,t){var n,r,i,o,a,s,u,c,l=this.data,h=this._ux,f=this._uy,d=this._len,p=t<1,m=0,g=0,A=0;if(!p||(this._pathSegLen||this._calculateLength(),a=this._pathSegLen,s=t*this._pathLen))e:for(var v=0;v<d;){var b=l[v++],y=1===v;switch(y&&(n=i=l[v],r=o=l[v+1]),b!==US.L&&0<A&&(e.lineTo(u,c),A=0),b){case US.M:n=i=l[v++],r=o=l[v++],e.moveTo(i,o);break;case US.L:var w=l[v++],x=l[v++],C=XS(w-i),k=XS(x-o);if(h<C||f<k){if(p){if(s<m+(H=a[g++])){var E=(s-m)/H;e.lineTo(i*(1-E)+w*E,o*(1-E)+x*E);break e}m+=H}e.lineTo(w,x),i=w,o=x,A=0}else A<(C=C*C+k*k)&&(u=w,c=x,A=C);break;case US.C:var S=l[v++],_=l[v++],O=l[v++],T=l[v++];k=l[v++],C=l[v++];if(p){if(s<m+(H=a[g++])){FC(i,S,O,k,E=(s-m)/H,zS),FC(o,_,T,C,E,HS),e.bezierCurveTo(zS[1],HS[1],zS[2],HS[2],zS[3],HS[3]);break e}m+=H}e.bezierCurveTo(S,_,O,T,k,C),i=k,o=C;break;case US.Q:if(S=l[v++],_=l[v++],O=l[v++],T=l[v++],p){if(s<m+(H=a[g++])){zC(i,S,O,E=(s-m)/H,zS),zC(o,_,T,E,HS),e.quadraticCurveTo(zS[1],HS[1],zS[2],HS[2]);break e}m+=H}e.quadraticCurveTo(S,_,O,T),i=O,o=T;break;case US.A:var D=l[v++],B=l[v++],I=l[v++],M=l[v++],j=l[v++],N=l[v++],F=l[v++],R=!l[v++],P=M<I?I:M,L=.001<XS(I-M),U=j+N,z=!1;if(p&&(s<m+(H=a[g++])&&(U=j+N*(s-m)/H,z=!0),m+=H),L&&e.ellipse?e.ellipse(D,B,I,M,F,j,U,R):e.arc(D,B,P,j,U,R),z)break e;y&&(n=KS(j)*I+D,r=YS(j)*M+B),i=KS(U)*I+D,o=YS(U)*M+B;break;case US.R:n=i=l[v],r=o=l[v+1],w=l[v++],x=l[v++];var H;N=l[v++],L=l[v++];if(p){if(s<m+(H=a[g++])){F=s-m,e.moveTo(w,x),e.lineTo(w+GS(F,N),x),0<(F-=N)&&e.lineTo(w+N,x+GS(F,L)),0<(F-=L)&&e.lineTo(w+WS(N-F,0),x+L),0<(F-=N)&&e.lineTo(w,x+WS(L-F,0));break e}m+=H}e.rect(w,x,N,L);break;case US.Z:if(p){if(s<m+(H=a[g++])){E=(s-m)/H,e.lineTo(i*(1-E)+n*E,o*(1-E)+r*E);break e}m+=H}e.closePath(),i=n,o=r}}},r_.prototype.clone=function(){var e=new r_,t=this.data;return e.data=t.slice?t.slice():Array.prototype.slice.call(t),e._len=this._len,e},r_.CMD=US,r_.initDefaultProps=((Bt=r_.prototype)._saveData=!0,Bt._ux=0,Bt._uy=0,Bt._pendingPtDist=0,void(Bt._version=0));var i_=r_;function o_(e,t,n,r,i,o,a){var s;if(0!==i)return s=0,!(t+(i=i)<a&&r+i<a||a<t-i&&a<r-i||e+i<o&&n+i<o||o<e-i&&o<n-i)&&(e===n?Math.abs(o-e)<=i/2:(o=(s=(t-r)/(e-n))*o-a+(e*r-n*t)/(e-n))*o/(s*s+1)<=i/2*i/2)}var a_=2*Math.PI;function s_(e){return(e%=a_)<0&&(e+=a_),e}var u_=2*Math.PI;function c_(e,t,n,r,i,o){return t<o&&r<o||o<t&&o<r||r===t?0:(n=(o=(o-t)/(r-t))*(n-e)+e)===i?1/0:i<n?1!=o&&0!=o?r<t?1:-1:r<t?.5:-.5:0}var l_=i_.CMD,h_=2*Math.PI,f_=[-1,-1,-1],d_=[-1,-1];function p_(e,t,n,r,i,o,a,s,u,c){if(t<c&&r<c&&o<c&&s<c||c<t&&c<r&&c<o&&c<s)return 0;var l=jC(t,r,o,s,c,f_);if(0===l)return 0;for(var h,f=0,d=-1,p=void 0,m=void 0,g=0;g<l;g++){var A=f_[g],v=0===A||1===A?.5:1;IC(e,n,i,a,A)<u||(d<0&&(d=NC(t,r,o,s,d_),d_[1]<d_[0]&&1<d&&(void 0,h=d_[0],d_[0]=d_[1],d_[1]=h),p=IC(t,r,o,s,d_[0]),1<d&&(m=IC(t,r,o,s,d_[1]))),2===d?A<d_[0]?f+=p<t?v:-v:A<d_[1]?f+=m<p?v:-v:f+=s<m?v:-v:A<d_[0]?f+=p<t?v:-v:f+=s<p?v:-v)}return f}function m_(e,t,n,r,i,o,a,s){if(t<s&&r<s&&o<s||s<t&&s<r&&s<o)return 0;h=f_,l=(u=t)-2*(c=r)+(l=o),c=2*(c-u),u-=s=s,s=0,DC(l)?BC(c)&&0<=(f=-u/c)&&f<=1&&(h[s++]=f):DC(u=c*c-4*l*u)?0<=(f=-c/(2*l))&&f<=1&&(h[s++]=f):0<u&&(d=(-c-(u=EC(u)))/(2*l),0<=(f=(-c+u)/(2*l))&&f<=1&&(h[s++]=f),0<=d&&d<=1&&(h[s++]=d));var u,c,l,h,f,d,p=s;if(0===p)return 0;var m=UC(t,r,o);if(0<=m&&m<=1){for(var g=0,A=PC(t,r,o,m),v=0;v<p;v++){var b=0===f_[v]||1===f_[v]?.5:1;PC(e,n,i,f_[v])<a||(f_[v]<m?g+=A<t?b:-b:g+=o<A?b:-b)}return g}return b=0===f_[0]||1===f_[0]?.5:1,PC(e,n,i,f_[0])<a?0:o<t?b:-b}function g_(e,t,n,r,i){for(var o,a=e.data,s=e.len(),u=0,c=0,l=0,h=0,f=0,d=0;d<s;){var p=a[d++],m=1===d;switch(p===l_.M&&1<d&&(n||(u+=c_(c,l,h,f,r,i))),m&&(h=c=a[d],f=l=a[d+1]),p){case l_.M:c=h=a[d++],l=f=a[d++];break;case l_.L:if(n){if(o_(c,l,a[d],a[d+1],t,r,i))return!0}else u+=c_(c,l,a[d],a[d+1],r,i)||0;c=a[d++],l=a[d++];break;case l_.C:if(n){if(function(e,t,n,r,i,o,a,s,u,c,l){if(0!==u)return!(t+(u=u)<l&&r+u<l&&o+u<l&&s+u<l||l<t-u&&l<r-u&&l<o-u&&l<s-u||e+u<c&&n+u<c&&i+u<c&&a+u<c||c<e-u&&c<n-u&&c<i-u&&c<a-u)&&RC(e,t,n,r,i,o,a,s,c,l,null)<=u/2}(c,l,a[d++],a[d++],a[d++],a[d++],a[d],a[d+1],t,r,i))return!0}else u+=p_(c,l,a[d++],a[d++],a[d++],a[d++],a[d],a[d+1],r,i)||0;c=a[d++],l=a[d++];break;case l_.Q:if(n){if(function(e,t,n,r,i,o,a,s,u){if(0!==a)return!(t+(a=a)<u&&r+a<u&&o+a<u||u<t-a&&u<r-a&&u<o-a||e+a<s&&n+a<s&&i+a<s||s<e-a&&s<n-a&&s<i-a)&&HC(e,t,n,r,i,o,s,u,null)<=a/2}(c,l,a[d++],a[d++],a[d],a[d+1],t,r,i))return!0}else u+=m_(c,l,a[d++],a[d++],a[d],a[d+1],r,i)||0;c=a[d++],l=a[d++];break;case l_.A:var g=a[d++],A=a[d++],v=a[d++],b=a[d++],y=a[d++],w=a[d++],x=(d+=1,!!(1-a[d++])),C=Math.cos(y)*v+g,k=Math.sin(y)*b+A,E=(m?(h=C,f=k):u+=c_(c,l,C,k,r,i),(r-g)*b/v+g);if(n){if(function(e,t,n,r,i,o,a,s,u){if(0!==a)return a=a,s-=e,u-=t,!(n<(e=Math.sqrt(s*s+u*u))-a||e+a<n)&&(Math.abs(r-i)%u_<1e-4||((i=o?(t=r,r=s_(i),s_(t)):(r=s_(r),s_(i)))<r&&(i+=u_),(e=Math.atan2(u,s))<0&&(e+=u_),r<=e&&e<=i||r<=e+u_&&e+u_<=i))}(g,A,b,y,y+w,x,t,E,i))return!0}else u+=function(e,t,n,r,i,o,a,s){if(n<(s-=t)||s<-n)return 0;t=Math.sqrt(n*n-s*s);if(f_[0]=-t,f_[1]=t,(n=Math.abs(r-i))<1e-4)return 0;if(h_-1e-4<=n)return i=h_,l=o?1:-1,a>=f_[r=0]+e&&a<=f_[1]+e?l:0;i<r&&(t=r,r=i,i=t),r<0&&(r+=h_,i+=h_);for(var u=0,c=0;c<2;c++){var l,h=f_[c];a<h+e&&(l=o?1:-1,(r<=(h=(h=Math.atan2(s,h))<0?h_+h:h)&&h<=i||r<=h+h_&&h+h_<=i)&&(u+=l=h>Math.PI/2&&h<1.5*Math.PI?-l:l))}return u}(g,A,b,y,y+w,x,E,i);c=Math.cos(y+w)*v+g,l=Math.sin(y+w)*b+A;break;case l_.R:if(h=c=a[d++],f=l=a[d++],C=h+a[d++],k=f+a[d++],n){if(o_(h,f,C,f,t,r,i)||o_(C,f,C,k,t,r,i)||o_(C,k,h,k,t,r,i)||o_(h,k,h,f,t,r,i))return!0}else u=(u+=c_(C,f,C,k,r,i))+c_(h,k,h,f,r,i);break;case l_.Z:if(n){if(o_(c,l,h,f,t,r,i))return!0}else u+=c_(c,l,h,f,r,i);c=h,l=f}}return n||(e=l,o=f,Math.abs(e-o)<1e-4)||(u+=c_(c,l,h,f,r,i)||0),0!==u}var A_,v_=Object(Xw.i)({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},yS),b_={style:Object(Xw.i)({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},wS.style)},y_=Lk.concat(["invisible","culling","z","z2","zlevel","parent"]);function w_(e){return A_.call(this,e)||this}Zw(w_,A_=_S),w_.prototype.update=function(){var e=this,t=(A_.prototype.update.call(this),this.style);if(t.decal){var n,r=this._decalEl=this._decalEl||new w_,i=(r.buildPath===w_.prototype.buildPath&&(r.buildPath=function(t){e.buildPath(t,e.shape)}),r.silent=!0,r.style);for(n in t)i[n]!==t[n]&&(i[n]=t[n]);i.fill=t.fill?t.decal:null,i.decal=null,i.shadowColor=null,t.strokeFirst&&(i.stroke=null);for(var o=0;o<y_.length;++o)r[y_[o]]=this[y_[o]];r.__dirty|=1}else this._decalEl&&(this._decalEl=null)},w_.prototype.getDecalElement=function(){return this._decalEl},w_.prototype._init=function(e){var t=Object(Xw.E)(e),n=(this.shape=this.getDefaultShape(),this.getDefaultStyle());n&&this.useStyle(n);for(var r=0;r<t.length;r++){var i=t[r],o=e[i];"style"===i?this.style?Object(Xw.m)(this.style,o):this.useStyle(o):"shape"===i?Object(Xw.m)(this.shape,o):A_.prototype.attrKV.call(this,i,o)}this.style||this.useStyle({})},w_.prototype.getDefaultStyle=function(){return null},w_.prototype.getDefaultShape=function(){return{}},w_.prototype.canBeInsideText=function(){return this.hasFill()},w_.prototype.getInsideTextFill=function(){var e,t=this.style.fill;if("none"!==t){if(Object(Xw.B)(t))return.5<(e=Object(GC.c)(t,0))?"#333":.2<e?"#eee":"#ccc";if(t)return"#ccc"}return"#333"},w_.prototype.getInsideTextStroke=function(e){var t=this.style.fill;if(Object(Xw.B)(t)){var n=this.__zr;if(!(!n||!n.isDarkMode())==Object(GC.c)(e,0)<.4)return t}},w_.prototype.buildPath=function(e,t,n){},w_.prototype.pathUpdated=function(){this.__dirty&=-5},w_.prototype.getUpdatedPathProxy=function(e){return this.path||this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,e),this.path},w_.prototype.createPathProxy=function(){this.path=new i_(!1)},w_.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return!(null==t||"none"===t||!(0<e.lineWidth))},w_.prototype.hasFill=function(){var e=this.style.fill;return null!=e&&"none"!==e},w_.prototype.getBoundingRect=function(){var e,t,n=this._rect,r=this.style,i=!n;return i&&(e=!1,this.path||(e=!0,this.createPathProxy()),t=this.path,(e||4&this.__dirty)&&(t.beginPath(),this.buildPath(t,this.shape,!1),this.pathUpdated()),n=t.getBoundingRect()),this._rect=n,this.hasStroke()&&this.path&&0<this.path.len()?(e=this._rectStroke||(this._rectStroke=n.clone()),(this.__dirty||i)&&(e.copy(n),t=r.strokeNoScale?this.getLineScale():1,i=r.lineWidth,this.hasFill()||(r=this.strokeContainThreshold,i=Math.max(i,null==r?4:r)),1e-10<t&&(e.width+=i/t,e.height+=i/t,e.x-=i/t/2,e.y-=i/t/2)),e):n},w_.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect(),i=this.style;if(e=n[0],t=n[1],r.contain(e,t)){if(n=this.path,this.hasStroke()&&(r=i.lineWidth,1e-10<(i=i.strokeNoScale?this.getLineScale():1)&&(this.hasFill()||(r=Math.max(r,this.strokeContainThreshold)),g_(n,r/i,!0,e,t))))return!0;if(this.hasFill())return g_(n,0,!1,e,t)}return!1},w_.prototype.dirtyShape=function(){this.__dirty|=4,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},w_.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},w_.prototype.animateShape=function(e){return this.animate("shape",e)},w_.prototype.updateDuringAnimation=function(e){"style"===e?this.dirtyStyle():"shape"===e?this.dirtyShape():this.markRedraw()},w_.prototype.attrKV=function(e,t){"shape"===e?this.setShape(t):A_.prototype.attrKV.call(this,e,t)},w_.prototype.setShape=function(e,t){var n=(n=this.shape)||(this.shape={});return"string"==typeof e?n[e]=t:Object(Xw.m)(n,e),this.dirtyShape(),this},w_.prototype.shapeChanged=function(){return!!(4&this.__dirty)},w_.prototype.createStyle=function(e){return Object(Xw.g)(v_,e)},w_.prototype._innerSaveToNormal=function(e){A_.prototype._innerSaveToNormal.call(this,e);var t=this._normalState;e.shape&&!t.shape&&(t.shape=Object(Xw.m)({},this.shape))},w_.prototype._applyStateObj=function(e,t,n,r,i,o){A_.prototype._applyStateObj.call(this,e,t,n,r,i,o);var a,s=!(t&&r);if(t&&t.shape?i?r?a=t.shape:(a=Object(Xw.m)({},n.shape),Object(Xw.m)(a,t.shape)):(a=Object(Xw.m)({},(r?this:n).shape),Object(Xw.m)(a,t.shape)):s&&(a=n.shape),a)if(i){this.shape=Object(Xw.m)({},this.shape);for(var u={},c=Object(Xw.E)(a),l=0;l<c.length;l++){var h=c[l];"object"==typeof a[h]?this.shape[h]=a[h]:u[h]=a[h]}this._transitionState(e,{shape:u},o)}else this.shape=a,this.dirtyShape()},w_.prototype._mergeStates=function(e){for(var t,n=A_.prototype._mergeStates.call(this,e),r=0;r<e.length;r++){var i=e[r];i.shape&&this._mergeStyle(t=t||{},i.shape)}return t&&(n.shape=t),n},w_.prototype.getAnimationStyleProps=function(){return b_},w_.prototype.isZeroArea=function(){return!1},w_.extend=function(e){Zw(i,t=w_),i.prototype.getDefaultStyle=function(){return Object(Xw.d)(e.style)},i.prototype.getDefaultShape=function(){return Object(Xw.d)(e.shape)};var t,n,r=i;function i(n){var r=t.call(this,n)||this;return e.init&&e.init.call(r,n),r}for(n in e)"function"==typeof e[n]&&(r.prototype[n]=e[n]);return r},w_.initDefaultProps=((Pa=w_.prototype).type="path",Pa.strokeContainThreshold=5,Pa.segmentIgnoreThreshold=0,Pa.subPixelOptimize=!1,Pa.autoBatch=!1,void(Pa.__dirty=7));var x_,C_=w_,k_=Object(Xw.i)({strokeFirst:!0,font:Hk.a,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},v_);function E_(){return null!==x_&&x_.apply(this,arguments)||this}(La=(Zw(E_,x_=_S),E_.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return null!=t&&"none"!==t&&0<e.lineWidth},E_.prototype.hasFill=function(){var e=this.style.fill;return null!=e&&"none"!==e},E_.prototype.createStyle=function(e){return Object(Xw.g)(k_,e)},E_.prototype.setBoundingRect=function(e){this._rect=e},E_.prototype.getBoundingRect=function(){var e,t=this.style;return this._rect||(null!=(e=t.text)?e+="":e="",(e=qk(e,t.font,t.textAlign,t.textBaseline)).x+=t.x||0,e.y+=t.y||0,this.hasStroke()&&(t=t.lineWidth,e.x-=t/2,e.y-=t/2,e.width+=t,e.height+=t),this._rect=e),this._rect},E_.initDefaultProps=void(E_.prototype.dirtyRectTolerance=10),E_)).prototype.type="tspan";var S_,__=La,O_=Object(Xw.i)({x:0,y:0},yS),T_={style:Object(Xw.i)({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},wS.style)};function D_(){return null!==S_&&S_.apply(this,arguments)||this}Zw(D_,S_=_S),D_.prototype.createStyle=function(e){return Object(Xw.g)(O_,e)},D_.prototype._getSize=function(e){var t,n=this.style,r=n[e];return null!=r?r:(r=(r=n.image)&&"string"!=typeof r&&r.width&&r.height?n.image:this.__image)?null==(t=n[n="width"===e?"height":"width"])?r[e]:r[e]/r[n]*t:0},D_.prototype.getWidth=function(){return this._getSize("width")},D_.prototype.getHeight=function(){return this._getSize("height")},D_.prototype.getAnimationStyleProps=function(){return T_},D_.prototype.getBoundingRect=function(){var e=this.style;return this._rect||(this._rect=new Zx(e.x||0,e.y||0,this.getWidth(),this.getHeight())),this._rect},(ko=D_).prototype.type="image";var B_=ko,I_=Math.round;function M_(e,t,n){var r,i,o;if(t)return r=t.x1,i=t.x2,o=t.y1,t=t.y2,e.x1=r,e.x2=i,e.y1=o,e.y2=t,(n=n&&n.lineWidth)&&(I_(2*r)===I_(2*i)&&(e.x1=e.x2=N_(r,n,!0)),I_(2*o)===I_(2*t)&&(e.y1=e.y2=N_(o,n,!0))),e}function j_(e,t,n){var r,i,o;if(t)return r=t.x,i=t.y,o=t.width,t=t.height,e.x=r,e.y=i,e.width=o,e.height=t,(n=n&&n.lineWidth)&&(e.x=N_(r,n,!0),e.y=N_(i,n,!0),e.width=Math.max(N_(r+o,n,!1)-e.x,0===o?0:1),e.height=Math.max(N_(i+t,n,!1)-e.y,0===t?0:1)),e}function N_(e,t,n){var r;return t?((r=I_(2*e))+I_(t))%2==0?r/2:(r+(n?1:-1))/2:e}var F_,R_=function(){this.x=0,this.y=0,this.width=0,this.height=0},P_={};function L_(e){return F_.call(this,e)||this}(Qo=(Zw(L_,F_=C_),L_.prototype.getDefaultShape=function(){return new R_},L_.prototype.buildPath=function(e,t){var n,r,i,o,a,s,u,c,l,h,f,d,p,m;this.subPixelOptimize?(n=(a=j_(P_,t,this.style)).x,r=a.y,i=a.width,o=a.height,a.r=t.r,t=a):(n=t.x,r=t.y,i=t.width,o=t.height),t.r?(a=e,f=(t=t).x,d=t.y,(p=t.width)<0&&(f+=p,p=-p),(m=t.height)<0&&(d+=m,m=-m),"number"==typeof(t=t.r)?s=u=c=l=t:t instanceof Array?1===t.length?s=u=c=l=t[0]:2===t.length?(s=c=t[0],u=l=t[1]):3===t.length?(s=t[0],u=l=t[1],c=t[2]):(s=t[0],u=t[1],c=t[2],l=t[3]):s=u=c=l=0,p<s+u&&(s*=p/(h=s+u),u*=p/h),p<c+l&&(c*=p/(h=c+l),l*=p/h),m<u+c&&(u*=m/(h=u+c),c*=m/h),m<s+l&&(s*=m/(h=s+l),l*=m/h),a.moveTo(f+s,d),a.lineTo(f+p-u,d),0!==u&&a.arc(f+p-u,d+u,u,-Math.PI/2,0),a.lineTo(f+p,d+m-c),0!==c&&a.arc(f+p-c,d+m-c,c,0,Math.PI/2),a.lineTo(f+l,d+m),0!==l&&a.arc(f+l,d+m-l,l,Math.PI/2,Math.PI),a.lineTo(f,d+s),0!==s&&a.arc(f+s,d+s,s,Math.PI,1.5*Math.PI)):e.rect(n,r,i,o)},L_.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},L_)).prototype.type="rect";var U_,z_=Qo,H_={fill:"#000"},$_={style:Object(Xw.i)({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},wS.style)},Q_=(Zw(V_,U_=_S),V_.prototype.childrenRef=function(){return this._children},V_.prototype.update=function(){U_.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var e=0;e<this._children.length;e++){var t=this._children[e];t.zlevel=this.zlevel,t.z=this.z,t.z2=this.z2,t.culling=this.culling,t.cursor=this.cursor,t.invisible=this.invisible}},V_.prototype.updateTransform=function(){var e=this.innerTransformable;e?(e.updateTransform(),e.transform&&(this.transform=e.transform)):U_.prototype.updateTransform.call(this)},V_.prototype.getLocalTransform=function(e){var t=this.innerTransformable;return t?t.getLocalTransform(e):U_.prototype.getLocalTransform.call(this,e)},V_.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),U_.prototype.getComputedTransform.call(this)},V_.prototype._updateSubTexts=function(){var e;this._childCursor=0,Y_(e=this.style),Object(Xw.k)(e.rich,Y_),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},V_.prototype.addSelfToZr=function(e){U_.prototype.addSelfToZr.call(this,e);for(var t=0;t<this._children.length;t++)this._children[t].__zr=e},V_.prototype.removeSelfFromZr=function(e){U_.prototype.removeSelfFromZr.call(this,e);for(var t=0;t<this._children.length;t++)this._children[t].__zr=null},V_.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var e=new Zx(0,0,0,0),t=this._children,n=[],r=null,i=0;i<t.length;i++){var o,a=(o=t[i]).getBoundingRect();(o=o.getLocalTransform(n))?(e.copy(a),e.applyTransform(o),(r=r||e.clone()).union(e)):(r=r||a.clone()).union(a)}this._rect=r||e}return this._rect},V_.prototype.setDefaultTextStyle=function(e){this._defaultStyle=e||H_},V_.prototype.setTextContent=function(e){},V_.prototype._mergeStyle=function(e,t){var n,r;return t&&(n=t.rich,r=e.rich||n&&{},Object(Xw.m)(e,t),n&&r?(this._mergeRich(r,n),e.rich=r):r&&(e.rich=r)),e},V_.prototype._mergeRich=function(e,t){for(var n=Object(Xw.E)(t),r=0;r<n.length;r++){var i=n[r];e[i]=e[i]||{},Object(Xw.m)(e[i],t[i])}},V_.prototype.getAnimationStyleProps=function(){return $_},V_.prototype._getOrCreateChild=function(e){var t=this._children[this._childCursor];return t&&t instanceof e||(t=new e),(this._children[this._childCursor++]=t).__zr=this.__zr,t.parent=this,t},V_.prototype._updatePlainTexts=function(){for(var e,t=this.style,n=t.font||Hk.a,r=t.padding,i=function(e,t){null!=e&&(e+="");var n,r=t.overflow,i=t.padding,o=t.font,a="truncate"===r,s=Kk(o),u=Object(Xw.N)(t.lineHeight,s),c=!!t.backgroundColor,l="truncate"===t.lineOverflow,h=t.width,f=(r=(n=null==h||"break"!==r&&"breakAll"!==r?e?e.split("\n"):[]:e?AS(e,t.font,h,"breakAll"===r,0).lines:[]).length*u,Object(Xw.N)(t.height,r));if(f<r&&l&&(l=Math.floor(f/u),n=n.slice(0,l)),e&&a&&null!=h)for(var d=lS(h,o,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),p=0;p<n.length;p++)n[p]=hS(n[p],d);l=f;var m=0;for(p=0;p<n.length;p++)m=Math.max(Qk(n[p],o),m);return null==h&&(h=m),e=m,i&&(l+=i[0]+i[2],e+=i[1]+i[3],h+=i[1]+i[3]),{lines:n,height:f,outerWidth:e=c?h:e,outerHeight:l,lineHeight:u,calculatedLineHeight:s,contentWidth:m,contentHeight:r,width:h}}(eO(t),t),o=tO(t),a=!!t.backgroundColor,s=i.outerHeight,u=i.outerWidth,c=i.contentWidth,l=i.lines,h=i.lineHeight,f=this._defaultStyle,d=t.x||0,p=t.y||0,m=t.align||f.align||"left",g=t.verticalAlign||f.verticalAlign||"top",A=d,v=Wk(p,i.contentHeight,g),b=((o||r)&&(e=Gk(d,u,m),p=Wk(p,s,g),o&&this._renderBackground(t,t,e,p,u,s)),v+=h/2,r&&(A=Z_(d,m,r),"top"===g?v+=r[0]:"bottom"===g&&(v-=r[2])),0),y=(o=!1,J_(("fill"in t?t:(o=!0,f)).fill)),w=(X_("stroke"in t?t.stroke:a||f.autoStroke&&!o?null:(b=2,f.stroke))),x=0<t.textShadowBlur,C=null!=t.width&&("truncate"===t.overflow||"break"===t.overflow||"breakAll"===t.overflow),k=i.calculatedLineHeight,E=0;E<l.length;E++){var S=this._getOrCreateChild(__),_=S.createStyle();S.useStyle(_),_.text=l[E],_.x=A,_.y=v,m&&(_.textAlign=m),_.textBaseline="middle",_.opacity=t.opacity,_.strokeFirst=!0,x&&(_.shadowBlur=t.textShadowBlur||0,_.shadowColor=t.textShadowColor||"transparent",_.shadowOffsetX=t.textShadowOffsetX||0,_.shadowOffsetY=t.textShadowOffsetY||0),_.stroke=w,_.fill=y,w&&(_.lineWidth=t.lineWidth||b,_.lineDash=t.lineDash,_.lineDashOffset=t.lineDashOffset||0),_.font=n,K_(_,t),v+=h,C&&S.setBoundingRect(new Zx(Gk(_.x,t.width,_.textAlign),Wk(_.y,k,_.textBaseline),c,k))}},V_.prototype._updateRichTexts=function(){for(var e=this.style,t=function(e,t){var n=new pS;if(null!=e&&(e+=""),e){for(var r,i=t.width,o=t.height,a=t.overflow,s="break"!==a&&"breakAll"!==a||null==i?null:{width:i,accumWidth:0,breakAll:"breakAll"===a},u=cS.lastIndex=0;null!=(r=cS.exec(e));){var c=r.index;u<c&&mS(n,e.substring(u,c),t,s),mS(n,r[2],t,s,r[1]),u=cS.lastIndex}u<e.length&&mS(n,e.substring(u,e.length),t,s);var l,h=[],f=0,d=0,p=t.padding,m="truncate"===a,g="truncate"===t.lineOverflow;e:for(var A=0;A<n.lines.length;A++){for(var v=n.lines[A],b=0,y=0,w=0;w<v.tokens.length;w++){var x=(T=v.tokens[w]).styleName&&t.rich[T.styleName]||{},C=(_=T.textPadding=x.padding)?_[1]+_[3]:0,k=T.font=x.font||t.font,E=(T.contentHeight=Kk(k),Object(Xw.N)(x.height,T.contentHeight));if(T.innerHeight=E,_&&(E+=_[0]+_[2]),T.height=E,T.lineHeight=Object(Xw.O)(x.lineHeight,t.lineHeight,E),T.align=x&&x.align||t.align,T.verticalAlign=x&&x.verticalAlign||"middle",g&&null!=o&&f+T.lineHeight>o){0<w?(v.tokens=v.tokens.slice(0,w),B(v,y,b),n.lines=n.lines.slice(0,A+1)):n.lines=n.lines.slice(0,A);break e}var S,_,O=null==(_=x.width)||"auto"===_;"string"==typeof _&&"%"===_.charAt(_.length-1)?(T.percentWidth=_,h.push(T),T.contentWidth=Qk(T.text,k)):(O&&(_=(_=x.backgroundColor)&&_.image)&&(S=void 0,uS(_="string"==typeof(l=_)?(S=oS.get(l))&&S.image:l)&&(T.width=Math.max(T.width,_.width*E/_.height))),null!=(S=m&&null!=i?i-y:null)&&S<T.width?!O||S<C?(T.text="",T.width=T.contentWidth=0):(T.text=function(e,t,n,r,i){if(!t)return"";var o=(e+"").split("\n");i=lS(t,n,r,i);for(var a=0,s=o.length;a<s;a++)o[a]=hS(o[a],i);return o.join("\n")}(T.text,S-C,k,t.ellipsis,{minChar:t.truncateMinChar}),T.width=T.contentWidth=Qk(T.text,k)):T.contentWidth=Qk(T.text,k)),T.width+=C,y+=T.width,x&&(b=Math.max(b,T.lineHeight))}B(v,y,b)}for(n.outerWidth=n.width=Object(Xw.N)(i,d),n.outerHeight=n.height=Object(Xw.N)(o,f),n.contentHeight=f,n.contentWidth=d,p&&(n.outerWidth+=p[1]+p[3],n.outerHeight+=p[0]+p[2]),A=0;A<h.length;A++){var T,D=(T=h[A]).percentWidth;T.width=parseInt(D,10)/100*n.width}}return n;function B(e,t,n){e.width=t,e.lineHeight=n,f+=n,d=Math.max(d,t)}}(eO(e),e),n=t.width,r=t.outerWidth,i=t.outerHeight,o=e.padding,a=e.x||0,s=e.y||0,u=this._defaultStyle,c=e.align||u.align,l=(u=e.verticalAlign||u.verticalAlign,a=Gk(a,r,c)),h=c=Wk(s,i,u),f=(o&&(l+=o[3],h+=o[0]),l+n),d=(tO(e)&&this._renderBackground(e,e,a,c,r,i),!!e.backgroundColor),p=0;p<t.lines.length;p++){for(var m=t.lines[p],g=m.tokens,A=g.length,v=m.lineHeight,b=m.width,y=0,w=l,x=f,C=A-1,k=void 0;y<A&&(!(k=g[y]).align||"left"===k.align);)this._placeToken(k,e,v,h,w,"left",d),b-=k.width,w+=k.width,y++;for(;0<=C&&"right"===(k=g[C]).align;)this._placeToken(k,e,v,h,x,"right",d),b-=k.width,x-=k.width,C--;for(w+=(n-(w-l)-(f-x)-b)/2;y<=C;)k=g[y],this._placeToken(k,e,v,h,w+k.width/2,"center",d),w+=k.width,y++;h+=v}},V_.prototype._placeToken=function(e,t,n,r,i,o,a){var s=t.rich[e.styleName]||{},u=r+n/2;"top"===(c=(s.text=e.text,e.verticalAlign))?u=r+e.height/2:"bottom"===c&&(u=r+n-e.height/2),!e.isLineHolder&&tO(s)&&this._renderBackground(s,t,"right"===o?i-e.width:"center"===o?i-e.width/2:i,u-e.height/2,e.width,e.height);var c=!!s.backgroundColor,l=(r=(n=((r=e.textPadding)&&(i=Z_(i,o,r),u-=e.height/2-r[0]-e.innerHeight/2),this._getOrCreateChild(__))).createStyle(),n.useStyle(r),this._defaultStyle),h=!1,f=0,d=J_(("fill"in s?s:"fill"in t?t:(h=!0,l)).fill);c=X_("stroke"in s?s.stroke:"stroke"in t?t.stroke:c||a||l.autoStroke&&!h?null:(f=2,l.stroke)),a=0<s.textShadowBlur||0<t.textShadowBlur,r.text=e.text,r.x=i,r.y=u,a&&(r.shadowBlur=s.textShadowBlur||t.textShadowBlur||0,r.shadowColor=s.textShadowColor||t.textShadowColor||"transparent",r.shadowOffsetX=s.textShadowOffsetX||t.textShadowOffsetX||0,r.shadowOffsetY=s.textShadowOffsetY||t.textShadowOffsetY||0),r.textAlign=o,r.textBaseline="middle",r.font=e.font||Hk.a,r.opacity=Object(Xw.O)(s.opacity,t.opacity,1),K_(r,s),c&&(r.lineWidth=Object(Xw.O)(s.lineWidth,t.lineWidth,f),r.lineDash=Object(Xw.N)(s.lineDash,t.lineDash),r.lineDashOffset=t.lineDashOffset||0,r.stroke=c),d&&(r.fill=d),h=e.contentWidth,l=e.contentHeight;n.setBoundingRect(new Zx(Gk(r.x,h,r.textAlign),Wk(r.y,l,r.textBaseline),h,l))},V_.prototype._renderBackground=function(e,t,n,r,i,o){var a,s,u,c,l=e.backgroundColor,h=e.borderWidth,f=e.borderColor,d=l&&l.image,p=l&&!d,m=e.borderRadius,g=this;(m=((p||e.lineHeight||h&&f)&&((a=this._getOrCreateChild(z_)).useStyle(a.createStyle()),a.style.fill=null,(u=a.shape).x=n,u.y=r,u.width=i,u.height=o,u.r=m,a.dirtyShape()),p?((c=a.style).fill=l||null,c.fillOpacity=Object(Xw.N)(e.fillOpacity,1)):d&&((s=this._getOrCreateChild(B_)).onload=function(){g.dirtyStyle()},(u=s.style).image=l.image,u.x=n,u.y=r,u.width=i,u.height=o),h&&f&&((c=a.style).lineWidth=h,c.stroke=f,c.strokeOpacity=Object(Xw.N)(e.strokeOpacity,1),c.lineDash=e.borderDash,c.lineDashOffset=e.borderDashOffset||0,a.strokeContainThreshold=0,a.hasFill()&&a.hasStroke()&&(c.strokeFirst=!0,c.lineWidth*=2)),(a||s).style)).shadowBlur=e.shadowBlur||0,m.shadowColor=e.shadowColor||"transparent",m.shadowOffsetX=e.shadowOffsetX||0,m.shadowOffsetY=e.shadowOffsetY||0,m.opacity=Object(Xw.O)(e.opacity,t.opacity,1)},V_.makeFont=function(e){var t,n="";return(n=null!=(t=e).fontSize||t.fontFamily||t.fontWeight?[e.fontStyle,e.fontWeight,"string"!=typeof(t=e.fontSize)||-1===t.indexOf("px")&&-1===t.indexOf("rem")&&-1===t.indexOf("em")?isNaN(+t)?Hk.b+"px":t+"px":t,e.fontFamily||"sans-serif"].join(" "):n)&&Object(Xw.R)(n)||e.textFont||e.font},V_);function V_(e){var t=U_.call(this)||this;return t.type="text",t._children=[],t._defaultStyle=H_,t.attr(e),t}var q_={left:!0,right:1,center:1},G_={top:1,bottom:1,middle:1},W_=["fontStyle","fontWeight","fontSize","fontFamily"];function K_(e,t){for(var n=0;n<W_.length;n++){var r=W_[n],i=t[r];null!=i&&(e[r]=i)}}function Y_(e){var t;e&&(e.font=Q_.makeFont(e),t=e.align,e.align=null==(t="middle"===t?"center":t)||q_[t]?t:"left",t=e.verticalAlign,e.verticalAlign=null==(t="center"===t?"middle":t)||G_[t]?t:"top",e.padding&&(e.padding=Object(Xw.K)(e.padding)))}function X_(e,t){return null==e||t<=0||"transparent"===e||"none"===e?null:e.image||e.colorStops?"#000":e}function J_(e){return null==e||"none"===e?null:e.image||e.colorStops?"#000":e}function Z_(e,t,n){return"right"===t?e-n[1]:"center"===t?e+n[3]/2-n[1]/2:e+n[3]}function eO(e){return null!=(e=e.text)&&(e+=""),e}function tO(e){return!!(e.backgroundColor||e.lineHeight||e.borderWidth&&e.borderColor)}var nO=Q_,rO=UE(),iO=1,oO={},aO=UE(),sO=UE(),uO=["emphasis","blur","select"],cO=["normal","emphasis","blur","select"],lO="highlight",hO="downplay",fO="select",dO="unselect",pO="toggleSelect";function mO(e){return null!=e&&"none"!==e}var gO=new zk.a(100);function AO(e){var t;return Object(Xw.B)(e)?((t=gO.get(e))||(t=GC.b(e,-.1),gO.put(e,t)),t):Object(Xw.w)(e)?((t=Object(Xw.m)({},e)).colorStops=Object(Xw.G)(e.colorStops,(function(e){return{offset:e.offset,color:GC.b(e.color,-.1)}})),t):e}function vO(e,t,n){e.onHoverStateChange&&(e.hoverState||0)!==n&&e.onHoverStateChange(t),e.hoverState=n}function bO(e){vO(e,"emphasis",2)}function yO(e){2===e.hoverState&&vO(e,"normal",0)}function wO(e){vO(e,"blur",1)}function xO(e){1===e.hoverState&&vO(e,"normal",0)}function CO(e){e.selected=!0}function kO(e){e.selected=!1}function EO(e,t,n){t(e,n)}function SO(e,t,n){EO(e,t,n),e.isGroup&&e.traverse((function(e){EO(e,t,n)}))}function _O(e,t){switch(t){case"emphasis":e.hoverState=2;break;case"normal":e.hoverState=0;break;case"blur":e.hoverState=1;break;case"select":e.selected=!0}}function OO(e,t){var n,r,i,o,a,s=this.states[e];if(this.style){if("emphasis"===e)return n=this,r=s,t=(t=t)&&0<=Object(Xw.q)(t,"select"),a=!1,n instanceof C_&&(i=aO(n),o=t&&i.selectFill||i.normalFill,t=t&&i.selectStroke||i.normalStroke,(mO(o)||mO(t))&&("inherit"===(i=(r=r||{}).style||{}).fill?(a=!0,r=Object(Xw.m)({},r),(i=Object(Xw.m)({},i)).fill=o):!mO(i.fill)&&mO(o)?(a=!0,r=Object(Xw.m)({},r),(i=Object(Xw.m)({},i)).fill=AO(o)):!mO(i.stroke)&&mO(t)&&(a||(r=Object(Xw.m)({},r),i=Object(Xw.m)({},i)),i.stroke=AO(t)),r.style=i)),r&&null==r.z2&&(a||(r=Object(Xw.m)({},r)),o=n.z2EmphasisLift,r.z2=n.z2+(null!=o?o:10)),r;if("blur"===e)return function(e,t,n){var r=0<=Object(Xw.q)(e.currentStates,t),i=e.style.opacity;return e=r?null:function(e,t,n,r){for(var i=e.style,o={},a=0;a<t.length;a++){var s=t[a],u=i[s];o[s]=null==u?r&&r[s]:u}for(a=0;a<e.animators.length;a++){var c=e.animators[a];c.__fromStateTransition&&c.__fromStateTransition.indexOf(n)<0&&"style"===c.targetName&&c.saveTo(o,t)}return o}(e,["opacity"],t,{opacity:1}),null==(t=(n=n||{}).style||{}).opacity&&(n=Object(Xw.m)({},n),t=Object(Xw.m)({opacity:r?i:.1*e.opacity},t),n.style=t),n}(this,e,s);if("select"===e)return t=this,(i=s)&&null==i.z2&&(i=Object(Xw.m)({},i),a=t.z2SelectLift,i.z2=t.z2+(null!=a?a:9)),i}return s}function TO(e){e.stateProxy=OO;var t=e.getTextContent();e=e.getTextGuideLine();t&&(t.stateProxy=OO),e&&(e.stateProxy=OO)}function DO(e,t){RO(e,t)||e.__highByOuter||SO(e,bO)}function BO(e,t){RO(e,t)||e.__highByOuter||SO(e,yO)}function IO(e,t){e.__highByOuter|=1<<(t||0),SO(e,bO)}function MO(e,t){(e.__highByOuter&=~(1<<(t||0)))||SO(e,yO)}function jO(e){SO(e,xO)}function NO(e){SO(e,CO)}function FO(e){SO(e,kO)}function RO(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function PO(e){var t=e.getModel(),n=[],r=[];t.eachComponent((function(t,i){var o=sO(i),a=(t="series"===t)?e.getViewOfSeriesModel(i):e.getViewOfComponentModel(i);t||r.push(a),o.isBlured&&(a.group.traverse((function(e){xO(e)})),t&&n.push(i)),o.isBlured=!1})),Object(Xw.k)(r,(function(e){e&&e.toggleBlurSeries&&e.toggleBlurSeries(n,!1,t)}))}function LO(e,t,n,r){var i,o,a,s=r.getModel();function u(e,t){for(var n=0;n<t.length;n++){var r=e.getItemGraphicEl(t[n]);r&&jO(r)}}n=n||"coordinateSystem",null!=e&&t&&"none"!==t&&(i=s.getSeriesByIndex(e),(o=i.coordinateSystem)&&o.master&&(o=o.master),a=[],s.eachSeries((function(e){var s=i===e,c=(c=(c=e.coordinateSystem)&&c.master?c.master:c)&&o?c===o:s;if(!("series"===n&&!s||"coordinateSystem"===n&&!c||"series"===t&&s)){if(r.getViewOfSeriesModel(e).group.traverse((function(e){e.__highByOuter&&s&&"self"===t||wO(e)})),Object(Xw.t)(t))u(e.getData(),t);else if(Object(Xw.z)(t))for(var l=Object(Xw.E)(t),h=0;h<l.length;h++)u(e.getData(l[h]),t[l[h]]);a.push(e),sO(e).isBlured=!0}})),s.eachComponent((function(e,t){"series"!==e&&(e=r.getViewOfComponentModel(t))&&e.toggleBlurSeries&&e.toggleBlurSeries(a,!0,s)})))}function UO(e,t,n){null!=e&&null!=t&&(e=n.getModel().getComponent(e,t))&&(sO(e).isBlured=!0,(t=n.getViewOfComponentModel(e))&&t.focusBlurEnabled&&t.group.traverse((function(e){wO(e)})))}function zO(e,t,n,r){var i={focusSelf:!1,dispatchers:null};if(null==e||"series"===e||null==t||null==n)return i;if(!(e=r.getModel().getComponent(e,t)))return i;if(!(t=r.getViewOfComponentModel(e))||!t.findHighDownDispatchers)return i;for(var o,a=t.findHighDownDispatchers(n),s=0;s<a.length;s++)if("self"===rO(a[s]).focus){o=!0;break}return{focusSelf:o,dispatchers:a}}function HO(e){var t=e.getAllData();Object(Xw.k)(t,(function(t){var n=t.data,r=t.type;n.eachItemGraphicEl((function(t,n){(e.isSelected(n,r)?NO:FO)(t)}))}))}function $O(e,t,n){WO(e,!0),SO(e,TO),e=rO(e),null!=t?(e.focus=t,e.blurScope=n):e.focus&&(e.focus=null)}function QO(e,t,n,r){r?WO(e,!1):$O(e,t,n)}var VO=["emphasis","blur","select"],qO={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function GO(e,t,n,r){n=n||"itemStyle";for(var i=0;i<VO.length;i++){var o=VO[i],a=t.getModel([o,n]);e.ensureState(o).style=r?r(a):a[qO[n]]()}}function WO(e,t){t=!1===t;var n=e;e.highDownSilentOnTouch&&(n.__highDownSilentOnTouch=e.highDownSilentOnTouch),t&&!n.__highDownDispatcher||(n.__highByOuter=n.__highByOuter||0,n.__highDownDispatcher=!t)}function KO(e){return!(!e||!e.__highDownDispatcher)}function YO(e){return(e=e.type)===fO||e===dO||e===pO}function XO(e){return(e=e.type)===lO||e===hO}var JO=UE();function ZO(e,t,n,r,i){var o;t&&t.ecModel&&(o=(o=t.ecModel.getUpdatePayload())&&o.animation);var a,s,u;e="update"===e;return t&&t.isAnimationEnabled()?(u=s=a=void 0,u=r?(a=Object(Xw.N)(r.duration,200),s=Object(Xw.N)(r.easing,"cubicOut"),0):(a=t.getShallow(e?"animationDurationUpdate":"animationDuration"),s=t.getShallow(e?"animationEasingUpdate":"animationEasing"),t.getShallow(e?"animationDelayUpdate":"animationDelay")),o&&(null!=o.duration&&(a=o.duration),null!=o.easing&&(s=o.easing),null!=o.delay&&(u=o.delay)),Object(Xw.v)(u)&&(u=u(n,i)),{duration:(a=Object(Xw.v)(a)?a(n):a)||0,delay:u,easing:s}):null}function eT(e,t,n,r,i,o,a){var s=!1,u=(Object(Xw.v)(i)?(a=o,o=i,i=null):Object(Xw.z)(i)&&(o=i.cb,a=i.during,s=i.isFrom,c=i.removeOpt,i=i.dataIndex),"leave"===e),c=(u||t.stopAnimation("leave"),ZO(e,r,i,u?c||{}:null,r&&r.getAnimationDelayParams?r.getAnimationDelayParams(t,i):null));c&&0<c.duration?(r={duration:c.duration,delay:c.delay||0,easing:c.easing,done:o,force:!!o||!!a,setToFinal:!u,scope:e,during:a},s?t.animateFrom(n,r):t.animateTo(n,r)):(t.stopAnimation(),s||t.attr(n),a&&a(1),o&&o())}function tT(e,t,n,r,i,o){eT("update",e,t,n,r,i,o)}function nT(e,t,n,r,i,o){eT("enter",e,t,n,r,i,o)}function rT(e){if(!e.__zr)return!0;for(var t=0;t<e.animators.length;t++)if("leave"===e.animators[t].scope)return!0;return!1}function iT(e,t,n,r,i,o){rT(e)||eT("leave",e,t,n,r,i,o)}function oT(e,t,n,r){e.removeTextContent(),e.removeTextGuideLine(),iT(e,{style:{opacity:0}},t,n,r)}function aT(e,t,n){function r(){e.parent&&e.parent.remove(e)}e.isGroup?e.traverse((function(e){e.isGroup||oT(e,t,n,r)})):oT(e,t,n,r)}function sT(e){JO(e).oldStyle=e.style}var uT={};function cT(e,t){for(var n=0;n<uO.length;n++){var r,i=t[r=uO[n]];(r=e.ensureState(r)).style=r.style||{},r.style.text=i}var o=e.currentStates.slice();e.clearStates(!0),e.setStyle({text:t.normal}),e.useStates(o,!0)}function lT(e,t,n){for(var r,i=e.labelFetcher,o=e.labelDataIndex,a=e.labelDimIndex,s=t.normal,u={normal:r=null==(r=i?i.getFormattedLabel(o,"normal",null,a,s&&s.get("formatter"),null!=n?{interpolatedValue:n}:null):r)?Object(Xw.v)(e.defaultText)?e.defaultText(o,e,n):e.defaultText:r},c=0;c<uO.length;c++){var l=uO[c],h=t[l];u[l]=Object(Xw.N)(i?i.getFormattedLabel(o,l,null,a,h&&h.get("formatter")):null,r)}return u}function hT(e,t,n,r){n=n||uT;for(var i=e instanceof nO,o=!1,a=0;a<cO.length;a++)if((f=t[cO[a]])&&f.getShallow("show")){o=!0;break}var s=i?e:e.getTextContent();if(o){i||(s||(s=new nO,e.setTextContent(s)),e.stateProxy&&(s.stateProxy=e.stateProxy));var u=lT(n,t),c=t.normal,l=!!c.getShallow("show"),h=dT(c,r&&r.normal,n,!1,!i);for(h.text=u.normal,i||e.setTextConfig(pT(c,n,!1)),a=0;a<uO.length;a++){var f,d,p,m=uO[a];(f=t[m])&&(d=s.ensureState(m),(p=!!Object(Xw.N)(f.getShallow("show"),l))!=l&&(d.ignore=!p),d.style=dT(f,r&&r[m],n,!0,!i),d.style.text=u[m],i||(e.ensureState(m).textConfig=pT(f,n,!0)))}s.silent=!!c.getShallow("silent"),null!=s.style.x&&(h.x=s.style.x),null!=s.style.y&&(h.y=s.style.y),s.ignore=!l,s.useStyle(h),s.dirty(),n.enableTextSetter&&(bT(s).setLabelText=function(e){e=lT(n,t,e),cT(s,e)})}else s&&(s.ignore=!0);e.dirty()}function fT(e,t){for(var n={normal:e.getModel(t=t||"label")},r=0;r<uO.length;r++){var i=uO[r];n[i]=e.getModel([i,t])}return n}function dT(e,t,n,r,i){var o,a={},s=a,u=e,c=n,l=r,h=i;c=c||uT;var f,d=(e=u.ecModel)&&e.option.textStyle,p=function(e){for(var t;e&&e!==e.ecModel;){var n=(e.option||uT).rich;if(n){t=t||{};for(var r=Object(Xw.E)(n),i=0;i<r.length;i++){t[r[i]]=1}}e=e.parentModel}return t}(u);if(p)for(var m in f={},p)p.hasOwnProperty(m)&&(o=u.getModel(["rich",m]),vT(f[m]={},o,d,c,l,h,!1,!0));return f&&(s.rich=f),(e=u.get("overflow"))&&(s.overflow=e),null!=(e=u.get("minMargin"))&&(s.margin=e),vT(s,u,d,c,l,h,!0,!1),t&&Object(Xw.m)(a,t),a}function pT(e,t,n){t=t||{};var r={},i=e.getShallow("rotate"),o=Object(Xw.N)(e.getShallow("distance"),n?null:5),a=e.getShallow("offset");return null!=(n="outside"===(n=e.getShallow("position")||(n?null:"inside"))?t.defaultOutsidePosition||"top":n)&&(r.position=n),null!=a&&(r.offset=a),null!=i&&(i*=Math.PI/180,r.rotation=i),null!=o&&(r.distance=o),r.outsideFill="inherit"===e.get("color")?t.inheritColor||null:"auto",r}var mT=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],gT=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],AT=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function vT(e,t,n,r,i,o,a,s){n=!i&&n||uT;var u=r&&r.inheritColor,c=t.getShallow("color"),l=t.getShallow("textBorderColor"),h=Object(Xw.N)(t.getShallow("opacity"),n.opacity);"inherit"!==c&&"auto"!==c||(c=u||null),"inherit"!==l&&"auto"!==l||(l=u||null),o||(c=c||n.color,l=l||n.textBorderColor),null!=c&&(e.fill=c),null!=l&&(e.stroke=l),c=Object(Xw.N)(t.getShallow("textBorderWidth"),n.textBorderWidth);null!=(c=(null!=(l=(null!=c&&(e.lineWidth=c),Object(Xw.N)(t.getShallow("textBorderType"),n.textBorderType)))&&(e.lineDash=l),Object(Xw.N)(t.getShallow("textBorderDashOffset"),n.textBorderDashOffset)))&&(e.lineDashOffset=c),null!=(h=i||null!=h||s?h:r&&r.defaultOpacity)&&(e.opacity=h),i||o||null==e.fill&&r.inheritColor&&(e.fill=r.inheritColor);for(var f=0;f<mT.length;f++){var d=mT[f];null!=(p=Object(Xw.N)(t.getShallow(d),n[d]))&&(e[d]=p)}for(f=0;f<gT.length;f++)d=gT[f],null!=(p=t.getShallow(d))&&(e[d]=p);if(null!=e.verticalAlign||null!=(l=t.getShallow("baseline"))&&(e.verticalAlign=l),!a||!r.disableBox){for(f=0;f<AT.length;f++){var p;d=AT[f];null!=(p=t.getShallow(d))&&(e[d]=p)}null!=(c=t.getShallow("borderType"))&&(e.borderDash=c),"auto"!==e.backgroundColor&&"inherit"!==e.backgroundColor||!u||(e.backgroundColor=u),"auto"!==e.borderColor&&"inherit"!==e.borderColor||!u||(e.borderColor=u)}}var bT=UE();var yT=["textStyle","color"],wT=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],xT=new nO;function CT(){}CT.prototype.getTextColor=function(e){var t=this.ecModel;return this.getShallow("color")||(!e&&t?t.get(yT):null)},CT.prototype.getFont=function(){return e={fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},t=(t=this.ecModel)&&t.getModel("textStyle"),Object(Xw.R)([e.fontStyle||t&&t.getShallow("fontStyle")||"",e.fontWeight||t&&t.getShallow("fontWeight")||"",(e.fontSize||t&&t.getShallow("fontSize")||12)+"px",e.fontFamily||t&&t.getShallow("fontFamily")||"sans-serif"].join(" "));var e,t},CT.prototype.getTextRect=function(e){for(var t={text:e,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},n=0;n<wT.length;n++)t[wT[n]]=this.getShallow(wT[n]);return xT.useStyle(t),xT.update(),xT.getBoundingRect()};Ui=CT;var kT=nS(ra=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]]);ET.prototype.getLineStyle=function(e){return kT(this,e)},ta=ET;function ET(){}var ST,_T=nS($a=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]]);OT.prototype.getItemStyle=function(e,t){return _T(this,e,t)},Po=OT;function OT(){}function TT(e,t,n){this.parentModel=t,this.ecModel=n,this.option=e}TT.prototype.init=function(e,t,n){for(var r=[],i=3;i<arguments.length;i++)r[i-3]=arguments[i]},TT.prototype.mergeOption=function(e,t){Object(Xw.H)(this.option,e,!0)},TT.prototype.get=function(e,t){return null==e?this.option:this._doGet(this.parsePath(e),!t&&this.parentModel)},TT.prototype.getShallow=function(e,t){var n;return null!=(n=null==(n=this.option)?n:n[e])||t||(t=this.parentModel)&&(n=t.getShallow(e)),n},TT.prototype.getModel=function(e,t){var n=null!=e;e=n?this.parsePath(e):null;return new TT(n?this._doGet(e):this.option,t=t||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(e)),this.ecModel)},TT.prototype.isEmpty=function(){return null==this.option},TT.prototype.restoreData=function(){},TT.prototype.clone=function(){return new this.constructor(Object(Xw.d)(this.option))},TT.prototype.parsePath=function(e){return"string"==typeof e?e.split("."):e},TT.prototype.resolveParentPath=function(e){return e},TT.prototype.isAnimationEnabled=function(){if(!Yw.a.node&&this.option)return null!=this.option.animation?!!this.option.animation:this.parentModel?this.parentModel.isAnimationEnabled():void 0},TT.prototype._doGet=function(e,t){var n=this.option;if(e){for(var r=0;r<e.length&&(!e[r]||null!=(n=n&&"object"==typeof n?n[e[r]]:null));r++);null==n&&t&&(n=t._doGet(this.resolveParentPath(e),t.parentModel))}return n},XE(za=TT),Eo=za,ST=["__\0is_clz",ja++].join("_"),Eo.prototype[ST]=!0,Eo.isInstance=function(e){return!(!e||!e[ST])},Object(Xw.I)(za,ta),Object(Xw.I)(za,Po),Object(Xw.I)(za,Fa),Object(Xw.I)(za,Ui);var DT=za,BT=Math.round(10*Math.random());function IT(e){return[e||"",BT++].join("_")}function MT(e,t){return Xw.H(Xw.H({},e,!0),t,!0)}var jT={},NT={},FT=Yw.a.domSupported&&-1<(document.documentElement.lang||navigator.language||navigator.browserLanguage).toUpperCase().indexOf("ZH")?"ZH":"EN";function RT(e,t){e=e.toUpperCase(),NT[e]=new DT(t),jT[e]=t}RT("EN",{time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}}),RT("ZH",{time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表，"},series:{single:{prefix:"",withName:"图表类型是{seriesType}，表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType}，",withoutName:"第{seriesId}个系列是一个{seriesType}，",separator:{middle:"；",end:"。"}}},data:{allData:"其数据是——",partialData:"其中，前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:"，",end:""}}}});var PT=36e5,LT=24*PT,UT=(_a=365*LT,{year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"}),zT={year:"{yyyy}",month:"{yyyy}-{MM}",day:Ro="{yyyy}-{MM}-{dd}",hour:Ro+" "+UT.hour,minute:Ro+" "+UT.minute,second:Ro+" "+UT.second,millisecond:UT.none},HT=["year","month","day","hour","minute","second","millisecond"],$T=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function QT(e,t){return"0000".substr(0,t-(e+="").length)+e}function VT(e){switch(e){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return e}}function qT(e,t,n,r){var i=(e=xE(e))[KT(n)](),o=e[YT(n)]()+1,a=Math.floor((o-1)/3)+1,s=e[XT(n)](),u=e["get"+(n?"UTC":"")+"Day"](),c=e[JT(n)](),l=(c-1)%12+1,h=e[ZT(n)](),f=e[eD(n)](),d=(e=e[tD(n)](),r=(n=(r instanceof DT?r:NT[r||FT]||NT.EN).getModel("time")).get("month"),n.get("monthAbbr")),p=n.get("dayOfWeek");n=n.get("dayOfWeekAbbr");return(t||"").replace(/{yyyy}/g,i+"").replace(/{yy}/g,QT(i%100+"",2)).replace(/{Q}/g,a+"").replace(/{MMMM}/g,r[o-1]).replace(/{MMM}/g,d[o-1]).replace(/{MM}/g,QT(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,QT(s,2)).replace(/{d}/g,s+"").replace(/{eeee}/g,p[u]).replace(/{ee}/g,n[u]).replace(/{e}/g,u+"").replace(/{HH}/g,QT(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,QT(l+"",2)).replace(/{h}/g,l+"").replace(/{mm}/g,QT(h,2)).replace(/{m}/g,h+"").replace(/{ss}/g,QT(f,2)).replace(/{s}/g,f+"").replace(/{SSS}/g,QT(e,3)).replace(/{S}/g,e+"")}function GT(e,t){var n=(e=xE(e))[YT(t)]()+1,r=e[XT(t)](),i=e[JT(t)](),o=e[ZT(t)](),a=e[eD(t)]();return(i=(o=(a=(t=(e=0===e[tD(t)]())&&0===a)&&0===o)&&0===i)&&1===r)&&1===n?"year":i?"month":o?"day":a?"hour":t?"minute":e?"second":"millisecond"}function WT(e,t,n){var r=Xw.y(e)?xE(e):e;switch(t=t||GT(e,n)){case"year":return r[KT(n)]();case"half-year":return 6<=r[YT(n)]()?1:0;case"quarter":return Math.floor((r[YT(n)]()+1)/4);case"month":return r[YT(n)]();case"day":return r[XT(n)]();case"half-day":return r[JT(n)]()/24;case"hour":return r[JT(n)]();case"minute":return r[ZT(n)]();case"second":return r[eD(n)]();case"millisecond":return r[tD(n)]()}}function KT(e){return e?"getUTCFullYear":"getFullYear"}function YT(e){return e?"getUTCMonth":"getMonth"}function XT(e){return e?"getUTCDate":"getDate"}function JT(e){return e?"getUTCHours":"getHours"}function ZT(e){return e?"getUTCMinutes":"getMinutes"}function eD(e){return e?"getUTCSeconds":"getSeconds"}function tD(e){return e?"getUTCMilliseconds":"getMilliseconds"}function nD(e){return e?"setUTCMonth":"setMonth"}function rD(e){return e?"setUTCDate":"setDate"}function iD(e){return e?"setUTCHours":"setHours"}function oD(e){return e?"setUTCMinutes":"setMinutes"}function aD(e){return e?"setUTCSeconds":"setSeconds"}function sD(e){return e?"setUTCMilliseconds":"setMilliseconds"}function uD(e){var t;return function(e){return!isNaN(EE(e))}(e)?(t=(e+"").split("."))[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(1<t.length?"."+t[1]:""):Xw.B(e)?e:"-"}function cD(e,t){return e=(e||"").toLowerCase().replace(/-(.)/g,(function(e,t){return t.toUpperCase()})),t&&e?e.charAt(0).toUpperCase()+e.slice(1):e}var lD=Xw.K;function hD(e,t,n){function r(e){return e&&Xw.R(e)?e:"-"}function i(e){return null!=e&&!isNaN(e)&&isFinite(e)}var o="time"===t,a=e instanceof Date;if(o||a){o=o?xE(e):e;if(!isNaN(+o))return qT(o,"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}",n);if(a)return"-"}return"ordinal"===t?Xw.C(e)?r(e):Xw.y(e)&&i(e)?e+"":"-":i(o=EE(e))?uD(o):Xw.C(e)?r(e):"boolean"==typeof e?e+"":"-"}function fD(e,t){return"{"+e+(null==t?"":t)+"}"}var dD=["a","b","c","d","e","f","g"];function pD(e,t,n){var r=(t=Xw.s(t)?t:[t]).length;if(!r)return"";for(var i=t[0].$vars||[],o=0;o<i.length;o++){var a=dD[o];e=e.replace(fD(a),fD(a,0))}for(var s=0;s<r;s++)for(var u=0;u<i.length;u++){var c=t[s][i[u]];e=e.replace(fD(dD[u],s),n?kx(c):c)}return e}function mD(e,t){return t=t||"transparent",Xw.B(e)?e:Xw.z(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}function gD(e,t){var n;"_blank"===t||"blank"===t?((n=window.open()).opener=null,n.location.href=e):window.open(e,t)}var AD=Xw.k,vD=["left","right","top","bottom","width","height"],bD=[["width","left","right"],["height","top","bottom"]];function yD(e,t,n,r,i){var o=0,a=0,s=(null==r&&(r=1/0),null==i&&(i=1/0),0);t.eachChild((function(u,c){var l,h,f,d=u.getBoundingRect();c=(c=t.childAt(c+1))&&c.getBoundingRect();s="horizontal"===e?(h=d.width+(c?-c.x+d.x:0),r<(l=o+h)||u.newline?(o=0,l=h,a+=s+n,d.height):Math.max(s,d.height)):(h=d.height+(c?-c.y+d.y:0),i<(f=a+h)||u.newline?(o+=s+n,a=0,f=h,d.width):Math.max(s,d.width)),u.newline||(u.x=o,u.y=a,u.markRedraw(),"horizontal"===e?o=l+n:a=f+n)}))}var wD=yD;function xD(e,t,n){n=lD(n||0);var r=t.width,i=t.height,o=gE(e.left,r),a=gE(e.top,i),s=(t=gE(e.right,r),gE(e.bottom,i)),u=gE(e.width,r),c=gE(e.height,i),l=n[2]+n[0],h=n[1]+n[3],f=e.aspect;switch(isNaN(u)&&(u=r-t-h-o),isNaN(c)&&(c=i-s-l-a),null!=f&&(isNaN(u)&&isNaN(c)&&(r/i<f?u=.8*r:c=.8*i),isNaN(u)&&(u=f*c),isNaN(c)&&(c=u/f)),isNaN(o)&&(o=r-t-u-h),isNaN(a)&&(a=i-s-c-l),e.left||e.right){case"center":o=r/2-u/2-n[3];break;case"right":o=r-u-h}switch(e.top||e.bottom){case"middle":case"center":a=i/2-c/2-n[0];break;case"bottom":a=i-c-l}return o=o||0,a=a||0,isNaN(u)&&(u=r-h-o-(t||0)),isNaN(c)&&(c=i-l-a-(s||0)),(f=new Zx(o+n[3],a+n[0],u,c)).margin=n,f}function CD(e){return e=e.layoutMode||e.constructor.layoutMode,Xw.z(e)?e:e?{type:e}:null}function kD(e,t,n){var r=n&&n.ignoreSize,i=(n=(Xw.s(r)||(r=[r,r]),o(bD[0],0)),o(bD[1],1));function o(n,i){var o={},u=0,c={},l=0;if(AD(n,(function(t){c[t]=e[t]})),AD(n,(function(e){a(t,e)&&(o[e]=c[e]=t[e]),s(o,e)&&u++,s(c,e)&&l++})),r[i])s(t,n[1])?c[n[2]]=null:s(t,n[2])&&(c[n[1]]=null);else if(2!==l&&u){if(!(2<=u))for(var h=0;h<n.length;h++){var f=n[h];if(!a(o,f)&&a(e,f)){o[f]=e[f];break}}return o}return c}function a(e,t){return e.hasOwnProperty(t)}function s(e,t){return null!=e[t]&&"auto"!==e[t]}function u(e,t,n){AD(e,(function(e){t[e]=n[e]}))}u(bD[0],e,n),u(bD[1],e,i)}function ED(e){return t={},(n=e)&&t&&AD(vD,(function(e){n.hasOwnProperty(e)&&(t[e]=n[e])})),t;var t,n}Xw.h(yD,"vertical"),Xw.h(yD,"horizontal");var SD,_D,OD,TD,DD=UE(),BD=(Kw(ID,SD=DT),ID.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},ID.prototype.mergeDefaultAndTheme=function(e,t){var n=CD(this),r=n?ED(e):{};t=t.getTheme();Xw.H(e,t.get(this.mainType)),Xw.H(e,this.getDefaultOption()),n&&kD(e,r,n)},ID.prototype.mergeOption=function(e,t){Xw.H(this.option,e,!0);var n=CD(this);n&&kD(this.option,e,n)},ID.prototype.optionUpdated=function(e,t){},ID.prototype.getDefaultOption=function(){var e=this.constructor;if(!(t=e)||!t[KE])return e.defaultOption;var t=DD(this);if(!t.defaultOption){for(var n=[],r=e;r;){var i=r.prototype.defaultOption;i&&n.push(i),r=r.superClass}for(var o={},a=n.length-1;0<=a;a--)o=Xw.H(o,n[a],!0);t.defaultOption=o}return t.defaultOption},ID.prototype.getReferringComponents=function(e,t){var n=e+"Id";return VE(this.ecModel,e,{index:this.get(e+"Index",!0),id:this.get(n,!0)},t)},ID.prototype.getBoxLayoutParams=function(){return{left:this.get("left"),top:this.get("top"),right:this.get("right"),bottom:this.get("bottom"),width:this.get("width"),height:this.get("height")}},ID.prototype.getZLevelKey=function(){return""},ID.prototype.setZLevel=function(e){this.option.zlevel=e},ID.protoInitialize=((Ha=ID.prototype).type="component",Ha.id="",Ha.name="",Ha.mainType="",Ha.subType="",void(Ha.componentIndex=0)),ID);function ID(e,t,n){return(e=SD.call(this,e,t,n)||this).uid=IT("ec_cpt_model"),e}function MD(e,t){return e[t]||(e[t]={predecessor:[],successor:[]}),e[t]}JE(BD,DT),tS(BD),OD={},(_D=BD).registerSubTypeDefaulter=function(e,t){e=YE(e),OD[e.main]=t},_D.determineSubType=function(e,t){var n,r=t.type;return r||(n=YE(e).main,_D.hasSubTypes(e)&&OD[n]&&(r=OD[n](t))),r},TD=function(e){var t=[];return Xw.k(BD.getClassesByMainType(e),(function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])})),t=Xw.G(t,(function(e){return YE(e).main})),"dataset"!==e&&Xw.q(t,"dataset")<=0&&t.unshift("dataset"),t},BD.topologicalTravel=function(e,t,n,r){if(e.length){i=t,o={},a=[],Xw.k(i,(function(e){var t,n,r=MD(o,e),s=r.originalDeps=TD(e);t=i,n=[],Xw.k(s,(function(e){0<=Xw.q(t,e)&&n.push(e)})),s=n;r.entryCount=s.length,0===r.entryCount&&a.push(e),Xw.k(s,(function(t){Xw.q(r.predecessor,t)<0&&r.predecessor.push(t);var n=MD(o,t);Xw.q(n.successor,t)<0&&n.successor.push(e)}))}));var i,o,a,s=(t={graph:o,noEntryList:a}).graph,u=t.noEntryList,c={};for(Xw.k(e,(function(e){c[e]=!0}));u.length;){var l=u.pop(),h=s[l],f=!!c[l];f&&(n.call(r,l,h.originalDeps.slice()),delete c[l]),Xw.k(h.successor,f?p:d)}Xw.k(c,(function(){throw new Error("")}))}function d(e){s[e].entryCount--,0===s[e].entryCount&&u.push(e)}function p(e){c[e]=!0,d(e)}};var jD=BD,ND=(Qa="",{darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:Ta=("undefined"!=typeof navigator&&(Qa=navigator.platform||""),"rgba(0, 0, 0, 0.2)"),dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Ta,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Ta,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Ta,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Ta,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Ta,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:Qa.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1}),FD=Object(Xw.f)(["tooltip","label","itemName","itemId","itemGroupId","seriesName"]),RD="original",PD="arrayRows",LD="objectRows",UD="keyedColumns",zD="typedArray",HD="unknown",$D="column",QD="row",VD=1,qD=2,GD=3,WD=UE();function KD(e,t,n){var r,i,o,a,s,u={},c=XD(t);return c&&e&&(r=[],i=[],t=t.ecModel,t=WD(t).datasetMap,c=c.uid+"_"+n.seriesLayoutBy,e=e.slice(),Object(Xw.k)(e,(function(t,n){"ordinal"===(t=Object(Xw.z)(t)?t:e[n]={name:t}).type&&null==o&&(o=n,a=h(t)),u[t.name]=[]})),s=t.get(c)||t.set(c,{categoryWayDim:a,valueWayDim:0}),Object(Xw.k)(e,(function(e,t){var n,a=e.name;e=h(e);null==o?(n=s.valueWayDim,l(u[a],n,e),l(i,n,e),s.valueWayDim+=e):o===t?(l(u[a],0,e),l(r,0,e)):(n=s.categoryWayDim,l(u[a],n,e),l(i,n,e),s.categoryWayDim+=e)})),r.length&&(u.itemName=r),i.length&&(u.seriesName=i)),u;function l(e,t,n){for(var r=0;r<n;r++)e.push(t+r)}function h(e){return(e=e.dimsDef)?e.length:1}}function YD(e,t,n){var r,i,o,a={};return XD(e)&&(r=t.sourceFormat,i=t.dimensionsDefine,r!==LD&&r!==UD||Object(Xw.k)(i,(function(e,t){"name"===(Object(Xw.z)(e)?e.name:e)&&(o=t)})),(e=function(){for(var e={},a={},s=[],u=0,c=Math.min(5,n);u<c;u++){var l=ZD(t.data,r,t.seriesLayoutBy,i,t.startIndex,u),h=(s.push(l),l===GD);if(h&&null==e.v&&u!==o&&(e.v=u),null!=e.n&&e.n!==e.v&&(h||s[e.n]!==GD)||(e.n=u),f(e)&&s[e.n]!==GD)return e;h||(l===qD&&null==a.v&&u!==o&&(a.v=u),null!=a.n&&a.n!==a.v||(a.n=u))}function f(e){return null!=e.v&&null!=e.n}return f(e)?e:f(a)?a:null}())&&(a.value=[e.v],e=null!=o?o:e.n,a.itemName=[e],a.seriesName=[e])),a}function XD(e){if(!e.get("data",!0))return VE(e.ecModel,"dataset",{index:e.get("datasetIndex",!0),id:e.get("datasetId",!0)},QE).models[0]}function JD(e,t){return ZD(e.data,e.sourceFormat,e.seriesLayoutBy,e.dimensionsDefine,e.startIndex,t)}function ZD(e,t,n,r,i,o){var a,s,u;if(!Object(Xw.D)(e)){if(r&&(r=r[o],Object(Xw.z)(r)?(s=r.name,u=r.type):Object(Xw.B)(r)&&(s=r)),null!=u)return"ordinal"===u?VD:GD;if(t===PD){var c=e;if(n===QD){for(var l=c[o],h=0;h<(l||[]).length&&h<5;h++)if(null!=(a=A(l[i+h])))return a}else for(h=0;h<c.length&&h<5;h++){var f=c[i+h];if(f&&null!=(a=A(f[o])))return a}}else if(t===LD){var d=e;if(!s)return GD;for(h=0;h<d.length&&h<5;h++)if((m=d[h])&&null!=(a=A(m[s])))return a}else if(t===UD){if(!s)return GD;if(!(l=e[s])||Object(Xw.D)(l))return GD;for(h=0;h<l.length&&h<5;h++)if(null!=(a=A(l[h])))return a}else if(t===RD){var p=e;for(h=0;h<p.length&&h<5;h++){var m,g=ME(m=p[h]);if(!Object(Xw.s)(g))return GD;if(null!=(a=A(g[o])))return a}}}return GD;function A(e){var t=Object(Xw.B)(e);return null!=e&&isFinite(e)&&""!==e?t?qD:GD:t&&"-"!==e?VD:void 0}}var eB,tB,nB,rB=Object(Xw.f)(),iB=UE(),oB=(UE(),aB.prototype.getColorFromPalette=function(e,t,n){var r=DE(this.get("color",!0)),i=this.get("colorLayer",!0);return function(e,t,n,r,i,o,a){return t=t(o=o||e),e=t.paletteIdx||0,(o=t.paletteNameMap=t.paletteNameMap||{}).hasOwnProperty(i)?o[i]:(r=(r=null!=a&&r?function(e,t){for(var n=e.length,r=0;r<n;r++)if(e[r].length>t)return e[r];return e[n-1]}(r,a):n)||n)&&r.length?(a=r[e],i&&(o[i]=a),t.paletteIdx=(e+1)%r.length,a):void 0}(this,iB,r,i,e,t,n)},aB.prototype.clearColorPalette=function(){var e;(e=iB)(this).paletteIdx=0,e(this).paletteNameMap={}},aB);function aB(){}function sB(e){throw new Error(e)}var uB="\0_ec_inner";Kw(lB,cB=DT),lB.prototype.init=function(e,t,n,r,i,o){r=r||{},this.option=null,this._theme=new DT(r),this._locale=new DT(i),this._optionManager=o},lB.prototype.setOption=function(e,t,n){t=dB(t),this._optionManager.setOption(e,n,t),this._resetOption(null,t)},lB.prototype.resetOption=function(e,t){return this._resetOption(e,dB(t))},lB.prototype._resetOption=function(e,t){var n,r=!1,i=this._optionManager;return e&&"recreate"!==e||(n=i.mountOption("recreate"===e),this.option&&"recreate"!==e?(this.restoreData(),this._mergeOption(n,t)):nB(this,n),r=!0),"timeline"!==e&&"media"!==e||this.restoreData(),e&&"recreate"!==e&&"timeline"!==e||(n=i.getTimelineOption(this))&&(r=!0,this._mergeOption(n,t)),e&&"recreate"!==e&&"media"!==e||(n=i.getMediaOption(this)).length&&Object(Xw.k)(n,(function(e){r=!0,this._mergeOption(e,t)}),this),r},lB.prototype.mergeOption=function(e){this._mergeOption(e,null)},lB.prototype._mergeOption=function(e,t){var n=this.option,r=this._componentsMap,i=this._componentsCount,o=[],a=Object(Xw.f)(),s=t&&t.replaceMergeMainTypeMap;WD(this).datasetMap=Object(Xw.f)(),Object(Xw.k)(e,(function(e,t){null!=e&&(jD.hasClass(t)?t&&(o.push(t),a.set(t,!0)):n[t]=null==n[t]?Object(Xw.d)(e):Object(Xw.H)(n[t],e,!0))})),s&&s.each((function(e,t){jD.hasClass(t)&&!a.get(t)&&(o.push(t),a.set(t,!0))})),jD.topologicalTravel(o,jD.getAllClassMainTypes(),(function(t){var o,a,u=function(e,t,n){return(t=(t=rB.get(t))&&t(e))?n.concat(t):n}(this,t,DE(e[t])),c=(function(e,t,n){Object(Xw.k)(e,(function(e){var r,i,o=e.newOption;Object(Xw.z)(o)&&(e.keyInfo.mainType=t,e.keyInfo.subType=(r=t,o=o,e=e.existing,i=n,o.type||(e?e.subType:i.determineSubType(r,o))))}))}(a=function(e,t,n){var r,i,o,a,s,u,c,l,h,f,d="normalMerge"===n,p="replaceMerge"===n,m="replaceAll"===n,g=(e=e||[],t=(t||[]).slice(),Object(Xw.f)());return Object(Xw.k)(t,(function(e,n){Object(Xw.z)(e)||(t[n]=null)})),n=function(e,t,n){var r=[];if("replaceAll"!==n)for(var i=0;i<e.length;i++){var o=e[i];o&&null!=o.id&&t.set(o.id,i),r.push({existing:"replaceMerge"===n||PE(o)?null:o,newOption:null,keyInfo:null,brandNew:null})}return r}(e,g,n),(d||p)&&(r=n,i=e,o=g,a=t,Object(Xw.k)(a,(function(e,t){var n,s,u;e&&null!=e.id&&(n=NE(e.id),null!=(s=o.get(n))&&(u=r[s],Object(Xw.b)(!u.newOption,'Duplicated option on id "'+n+'".'),u.newOption=e,u.existing=i[s],a[t]=null))}))),d&&(s=n,u=t,Object(Xw.k)(u,(function(e,t){if(e&&null!=e.name)for(var n=0;n<s.length;n++){var r=s[n].existing;if(!s[n].newOption&&r&&(null==r.id||null==e.id)&&!PE(e)&&!PE(r)&&jE("name",r,e))return s[n].newOption=e,void(u[t]=null)}}))),d||p?(l=n,e=t,h=p,Object(Xw.k)(e,(function(e){if(e){for(var t,n=0;(t=l[n])&&(t.newOption||PE(t.existing)||t.existing&&null!=e.id&&!jE("id",e,t.existing));)n++;t?(t.newOption=e,t.brandNew=h):l.push({newOption:e,brandNew:h,existing:null,keyInfo:null}),n++}}))):m&&(c=n,g=t,Object(Xw.k)(g,(function(e){c.push({newOption:e,brandNew:!0,existing:null,keyInfo:null})}))),d=n,f=Object(Xw.f)(),Object(Xw.k)(d,(function(e){var t=e.existing;t&&f.set(t.id,e)})),Object(Xw.k)(d,(function(e){var t=e.newOption;Object(Xw.b)(!t||null==t.id||!f.get(t.id)||f.get(t.id)===e,"id duplicates: "+(t&&t.id)),t&&null!=t.id&&f.set(t.id,e),e.keyInfo||(e.keyInfo={})})),Object(Xw.k)(d,(function(e,t){var n=e.existing,r=e.newOption,i=e.keyInfo;if(Object(Xw.z)(r)){if(i.name=null!=r.name?NE(r.name):n?n.name:TE+t,n)i.id=NE(n.id);else if(null!=r.id)i.id=NE(r.id);else for(var o=0;i.id="\0"+i.name+"\0"+o++,f.get(i.id););f.set(i.id,e)}})),n}(a=r.get(t),u,a?s&&s.get(t)?"replaceMerge":"normalMerge":"replaceAll"),t,jD),n[t]=null,r.set(t,null),i.set(t,0),[]),l=[],h=0;Object(Xw.k)(a,(function(e,n){var r=e.existing,i=e.newOption;if(i){var a=jD.getClass(t,e.keyInfo.subType,!("series"===t));if(!a)return;if("tooltip"===t){if(o)return;o=!0}r&&r.constructor===a?(r.name=e.keyInfo.name,r.mergeOption(i,this),r.optionUpdated(i,!1)):(r=new a(i,this,this,a=Object(Xw.m)({componentIndex:n},e.keyInfo)),Object(Xw.m)(r,a),e.brandNew&&(r.__requireNewView=!0),r.init(i,this,this),r.optionUpdated(null,!0))}else r&&(r.mergeOption({},this),r.optionUpdated({},!1));r?(c.push(r.option),l.push(r),h++):(c.push(void 0),l.push(void 0))}),this),n[t]=c,r.set(t,l),i.set(t,h),"series"===t&&eB(this)}),this),this._seriesIndices||eB(this)},lB.prototype.getOption=function(){var e=Object(Xw.d)(this.option);return Object(Xw.k)(e,(function(t,n){if(jD.hasClass(n)){for(var r=DE(t),i=r.length,o=!1,a=i-1;0<=a;a--)r[a]&&!PE(r[a])?o=!0:(r[a]=null,o||i--);r.length=i,e[n]=r}})),delete e[uB],e},lB.prototype.getTheme=function(){return this._theme},lB.prototype.getLocaleModel=function(){return this._locale},lB.prototype.setUpdatePayload=function(e){this._payload=e},lB.prototype.getUpdatePayload=function(){return this._payload},lB.prototype.getComponent=function(e,t){var n=this._componentsMap.get(e);if(n){if(e=n[t||0])return e;if(null==t)for(var r=0;r<n.length;r++)if(n[r])return n[r]}},lB.prototype.queryComponents=function(e){var t,n,r,i,o,a=e.mainType;return a&&(t=e.index,n=e.id,r=e.name,(i=this._componentsMap.get(a))&&i.length)?(null!=t?(o=[],Object(Xw.k)(DE(t),(function(e){i[e]&&o.push(i[e])}))):o=null!=n?hB("id",n,i):null!=r?hB("name",r,i):Object(Xw.n)(i,(function(e){return!!e})),fB(o,e)):[]},lB.prototype.findComponents=function(e){var t,n=e.query,r=e.mainType,i=(i=r+"Index",o=r+"Id",t=r+"Name",!(n=n)||null==n[i]&&null==n[o]&&null==n[t]?null:{mainType:r,index:n[i],id:n[o],name:n[t]}),o=i?this.queryComponents(i):Object(Xw.n)(this._componentsMap.get(r),(function(e){return!!e}));return n=fB(o,e),e.filter?Object(Xw.n)(n,e.filter):n},lB.prototype.eachComponent=function(e,t,n){var r=this._componentsMap;if(Object(Xw.v)(e)){var i=t,o=e;r.each((function(e,t){for(var n=0;e&&n<e.length;n++){var r=e[n];r&&o.call(i,t,r,r.componentIndex)}}))}else for(var a=Object(Xw.B)(e)?r.get(e):Object(Xw.z)(e)?this.findComponents(e):null,s=0;a&&s<a.length;s++){var u=a[s];u&&t.call(n,u,u.componentIndex)}},lB.prototype.getSeriesByName=function(e){var t=FE(e,null);return Object(Xw.n)(this._componentsMap.get("series"),(function(e){return!!e&&null!=t&&e.name===t}))},lB.prototype.getSeriesByIndex=function(e){return this._componentsMap.get("series")[e]},lB.prototype.getSeriesByType=function(e){return Object(Xw.n)(this._componentsMap.get("series"),(function(t){return!!t&&t.subType===e}))},lB.prototype.getSeries=function(){return Object(Xw.n)(this._componentsMap.get("series"),(function(e){return!!e}))},lB.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},lB.prototype.eachSeries=function(e,t){tB(this),Object(Xw.k)(this._seriesIndices,(function(n){var r=this._componentsMap.get("series")[n];e.call(t,r,n)}),this)},lB.prototype.eachRawSeries=function(e,t){Object(Xw.k)(this._componentsMap.get("series"),(function(n){n&&e.call(t,n,n.componentIndex)}))},lB.prototype.eachSeriesByType=function(e,t,n){tB(this),Object(Xw.k)(this._seriesIndices,(function(r){var i=this._componentsMap.get("series")[r];i.subType===e&&t.call(n,i,r)}),this)},lB.prototype.eachRawSeriesByType=function(e,t,n){return Object(Xw.k)(this.getSeriesByType(e),t,n)},lB.prototype.isSeriesFiltered=function(e){return tB(this),null==this._seriesIndicesMap.get(e.componentIndex)},lB.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},lB.prototype.filterSeries=function(e,t){tB(this);var n=[];Object(Xw.k)(this._seriesIndices,(function(r){var i=this._componentsMap.get("series")[r];e.call(t,i,r)&&n.push(r)}),this),this._seriesIndices=n,this._seriesIndicesMap=Object(Xw.f)(n)},lB.prototype.restoreData=function(e){eB(this);var t=this._componentsMap,n=[];t.each((function(e,t){jD.hasClass(t)&&n.push(t)})),jD.topologicalTravel(n,jD.getAllClassMainTypes(),(function(n){Object(Xw.k)(t.get(n),(function(t){!t||"series"===n&&function(e,t){var n,r;if(t)return n=t.seriesIndex,r=t.seriesId,t=t.seriesName,null!=n&&e.componentIndex!==n||null!=r&&e.id!==r||null!=t&&e.name!==t}(t,e)||t.restoreData()}))}))},lB.internalField=(eB=function(e){var t=e._seriesIndices=[];Object(Xw.k)(e._componentsMap.get("series"),(function(e){e&&t.push(e.componentIndex)})),e._seriesIndicesMap=Object(Xw.f)(t)},tB=function(e){},void(nB=function(e,t){e.option={},e.option[uB]=1,e._componentsMap=Object(Xw.f)({series:[]}),e._componentsCount=Object(Xw.f)();var n,r,i=t.aria;Object(Xw.z)(i)&&null==i.enabled&&(i.enabled=!0),n=t,i=e._theme.option,r=n.color&&!n.colorLayer,Object(Xw.k)(i,(function(e,t){"colorLayer"===t&&r||jD.hasClass(t)||("object"==typeof e?n[t]=n[t]?Object(Xw.H)(n[t],e,!1):Object(Xw.d)(e):null==n[t]&&(n[t]=e))})),Object(Xw.H)(t,ND,!1),e._mergeOption(t,null)}));var cB;Ae=lB;function lB(){return null!==cB&&cB.apply(this,arguments)||this}function hB(e,t,n){var r,i;return Object(Xw.s)(t)?(r=Object(Xw.f)(),Object(Xw.k)(t,(function(e){null!=e&&null!=FE(e,null)&&r.set(e,!0)})),Object(Xw.n)(n,(function(t){return t&&r.get(t[e])}))):(i=FE(t,null),Object(Xw.n)(n,(function(t){return t&&null!=i&&t[e]===i})))}function fB(e,t){return t.hasOwnProperty("subType")?Object(Xw.n)(e,(function(e){return e&&e.subType===t.subType})):e}function dB(e){var t=Object(Xw.f)();return e&&Object(Xw.k)(DE(e.replaceMerge),(function(e){t.set(e,!0)})),{replaceMergeMainTypeMap:t}}function pB(e){Xw.k(gB,(function(t){this[t]=Xw.c(e[t],e)}),this)}Object(Xw.I)(Ae,oB);var mB=Ae,gB=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],AB={};function vB(){this._coordinateSystems=[]}vB.prototype.create=function(e,t){var n=[];Xw.k(AB,(function(r,i){r=r.create(e,t),n=n.concat(r||[])})),this._coordinateSystems=n},vB.prototype.update=function(e,t){Xw.k(this._coordinateSystems,(function(n){n.update&&n.update(e,t)}))},vB.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},vB.register=function(e,t){AB[e]=t},vB.get=function(e){return AB[e]};var bB=vB,yB=/^(min|max)?(.+)$/;function wB(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}wB.prototype.setOption=function(e,t,n){e&&(Object(Xw.k)(DE(e.series),(function(e){e&&e.data&&Object(Xw.D)(e.data)&&Object(Xw.P)(e.data)})),Object(Xw.k)(DE(e.dataset),(function(e){e&&e.source&&Object(Xw.D)(e.source)&&Object(Xw.P)(e.source)}))),e=Object(Xw.d)(e);var r=this._optionBackup;e=function(e,t,n){var r,i,o=[],a=e.baseOption,s=e.timeline,u=e.options,c=e.media,l=!!e.media,h=!!(u||s||a&&a.timeline);function f(e){Object(Xw.k)(t,(function(t){t(e,n)}))}return a?(i=a).timeline||(i.timeline=s):((h||l)&&(e.options=e.media=null),i=e),l&&Object(Xw.s)(c)&&Object(Xw.k)(c,(function(e){e&&e.option&&(e.query?o.push(e):r=r||e)})),f(i),Object(Xw.k)(u,f),Object(Xw.k)(o,(function(e){return f(e.option)})),{baseOption:i,timelineOptions:u||[],mediaDefault:r,mediaList:o}}(e,t,!r);this._newBaseOption=e.baseOption,r?(e.timelineOptions.length&&(r.timelineOptions=e.timelineOptions),e.mediaList.length&&(r.mediaList=e.mediaList),e.mediaDefault&&(r.mediaDefault=e.mediaDefault)):this._optionBackup=e},wB.prototype.mountOption=function(e){var t=this._optionBackup;return this._timelineOptions=t.timelineOptions,this._mediaList=t.mediaList,this._mediaDefault=t.mediaDefault,this._currentMediaIndices=[],Object(Xw.d)(e?t.baseOption:this._newBaseOption)},wB.prototype.getTimelineOption=function(e){var t,n=this._timelineOptions;return n.length&&(e=e.getComponent("timeline"))?Object(Xw.d)(n[e.getCurrentIndex()]):t},wB.prototype.getMediaOption=function(e){var t=this._api.getWidth(),n=this._api.getHeight(),r=this._mediaList,i=this._mediaDefault,o=[],a=[];if(r.length||i){for(var s,u,c=0,l=r.length;c<l;c++)!function(e,t,n){var r={width:t,height:n,aspectratio:t/n},i=!0;return Object(Xw.k)(e,(function(e,t){var n;(t=t.match(yB))&&t[1]&&t[2]&&(n=t[1],t=t[2].toLowerCase(),t=r[t],e=e,("min"===(n=n)?e<=t:"max"===n?t<=e:t===e)||(i=!1))})),i}(r[c].query,t,n)||o.push(c);(o=!o.length&&i?[-1]:o).length&&(s=o,u=this._currentMediaIndices,s.join(",")!==u.join(","))&&(a=Object(Xw.G)(o,(function(e){return Object(Xw.d)((-1===e?i:r[e]).option)}))),this._currentMediaIndices=o}return a};var xB=wB,CB=Xw.k,kB=Xw.z,EB=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function SB(e){var t=e&&e.itemStyle;if(t)for(var n=0,r=EB.length;n<r;n++){var i=EB[n],o=t.normal,a=t.emphasis;o&&o[i]&&(e[i]=e[i]||{},e[i].normal?Xw.H(e[i].normal,o[i]):e[i].normal=o[i],o[i]=null),a&&a[i]&&(e[i]=e[i]||{},e[i].emphasis?Xw.H(e[i].emphasis,a[i]):e[i].emphasis=a[i],a[i]=null)}}function _B(e,t,n){var r,i;e&&e[t]&&(e[t].normal||e[t].emphasis)&&(r=e[t].normal,i=e[t].emphasis,r&&(n?(e[t].normal=e[t].emphasis=null,Xw.i(e[t],r)):e[t]=r),i&&(e.emphasis=e.emphasis||{},(e.emphasis[t]=i).focus&&(e.emphasis.focus=i.focus),i.blurScope&&(e.emphasis.blurScope=i.blurScope)))}function OB(e){_B(e,"itemStyle"),_B(e,"lineStyle"),_B(e,"areaStyle"),_B(e,"label"),_B(e,"labelLine"),_B(e,"upperLabel"),_B(e,"edgeLabel")}function TB(e,t){var n=kB(e)&&e[t],r=kB(n)&&n.textStyle;if(r)for(var i=0,o=IE.length;i<o;i++){var a=IE[i];r.hasOwnProperty(a)&&(n[a]=r[a])}}function DB(e){e&&(OB(e),TB(e,"label"),e.emphasis&&TB(e.emphasis,"label"))}function BB(e){return Xw.s(e)?e:e?[e]:[]}function IB(e){return(Xw.s(e)?e[0]:e)||{}}function MB(e){e&&Object(Xw.k)(jB,(function(t){t[0]in e&&!(t[1]in e)&&(e[t[1]]=e[t[0]])}))}var jB=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],NB=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],FB=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function RB(e){var t=e&&e.itemStyle;if(t)for(var n=0;n<FB.length;n++){var r=FB[n][1],i=FB[n][0];null!=t[r]&&(t[i]=t[r])}}function PB(e){e&&"edge"===e.alignTo&&null!=e.margin&&null==e.edgeDistance&&(e.edgeDistance=e.margin)}function LB(e){e&&e.downplay&&!e.blur&&(e.blur=e.downplay)}function UB(e,t){(function(e,t){CB(BB(e.series),(function(e){if(kB(e)&&kB(e)){SB(e),OB(e),TB(e,"label"),TB(e,"upperLabel"),TB(e,"edgeLabel"),e.emphasis&&(TB(e.emphasis,"label"),TB(e.emphasis,"upperLabel"),TB(e.emphasis,"edgeLabel"));var t=e.markPoint,n=(t&&(SB(t),DB(t)),e.markLine),r=(n&&(SB(n),DB(n)),e.markArea),i=(r&&DB(r),e.data);if("graph"===e.type){i=i||e.nodes;var o=e.links||e.edges;if(o&&!Xw.D(o))for(var a=0;a<o.length;a++)DB(o[a]);Xw.k(e.categories,(function(e){OB(e)}))}if(i&&!Xw.D(i))for(a=0;a<i.length;a++)DB(i[a]);if((t=e.markPoint)&&t.data){var s=t.data;for(a=0;a<s.length;a++)DB(s[a])}if((n=e.markLine)&&n.data){var u=n.data;for(a=0;a<u.length;a++)Xw.s(u[a])?(DB(u[a][0]),DB(u[a][1])):DB(u[a])}"gauge"===e.type?(TB(e,"axisLabel"),TB(e,"title"),TB(e,"detail")):"treemap"===e.type?(_B(e.breadcrumb,"itemStyle"),Xw.k(e.levels,(function(e){OB(e)}))):"tree"===e.type&&OB(e.leaves)}}));var n=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&n.push("valueAxis","categoryAxis","logAxis","timeAxis"),CB(n,(function(t){CB(BB(e[t]),(function(e){e&&(TB(e,"axisLabel"),TB(e.axisPointer,"label"))}))})),CB(BB(e.parallel),(function(e){TB(e=e&&e.parallelAxisDefault,"axisLabel"),TB(e&&e.axisPointer,"label")})),CB(BB(e.calendar),(function(e){_B(e,"itemStyle"),TB(e,"dayLabel"),TB(e,"monthLabel"),TB(e,"yearLabel")})),CB(BB(e.radar),(function(e){TB(e,"name"),e.name&&null==e.axisName&&(e.axisName=e.name,delete e.name),null!=e.nameGap&&null==e.axisNameGap&&(e.axisNameGap=e.nameGap,delete e.nameGap)})),CB(BB(e.geo),(function(e){kB(e)&&(DB(e),CB(BB(e.regions),(function(e){DB(e)})))})),CB(BB(e.timeline),(function(e){DB(e),_B(e,"label"),_B(e,"itemStyle"),_B(e,"controlStyle",!0),e=e.data,Xw.s(e)&&Xw.k(e,(function(e){Xw.z(e)&&(_B(e,"label"),_B(e,"itemStyle"))}))})),CB(BB(e.toolbox),(function(e){_B(e,"iconStyle"),CB(e.feature,(function(e){_B(e,"iconStyle")}))})),TB(IB(e.axisPointer),"label"),TB(IB(e.tooltip).axisPointer,"label")})(e,t),e.series=DE(e.series),Object(Xw.k)(e.series,(function(e){if(Object(Xw.z)(e)){var t,n=e.type;if("line"===n)null!=e.clipOverflow&&(e.clip=e.clipOverflow);else if("pie"===n||"gauge"===n){if(null!=e.clockWise&&(e.clockwise=e.clockWise),PB(e.label),(t=e.data)&&!Object(Xw.D)(t))for(var r=0;r<t.length;r++)PB(t[r]);null!=e.hoverOffset&&(e.emphasis=e.emphasis||{},(e.emphasis.scaleSize=null)&&(e.emphasis.scaleSize=e.hoverOffset))}else if("gauge"===n){var i=function(e,t){for(var n="pointer.color".split(","),r=e,i=0;i<n.length&&null!=(r=r&&r[n[i]]);i++);return r}(e);if(null!=i){for(var o,a=e,s="itemStyle.color",u=s.split(","),c=a,l=0;l<u.length-1;l++)null==c[o=u[l]]&&(c[o]={}),c=c[o];null!=c[u[l]]||(c[u[l]]=i)}}else if("bar"===n){if(RB(e),RB(e.backgroundStyle),RB(e.emphasis),(t=e.data)&&!Object(Xw.D)(t))for(r=0;r<t.length;r++)"object"==typeof t[r]&&(RB(t[r]),RB(t[r]&&t[r].emphasis))}else"sunburst"===n?((s=e.highlightPolicy)&&(e.emphasis=e.emphasis||{},e.emphasis.focus||(e.emphasis.focus=s)),LB(e),function e(t,n){if(t)for(var r=0;r<t.length;r++)n(t[r]),t[r]&&e(t[r].children,n)}(e.data,LB)):"graph"===n||"sankey"===n?(a=e)&&null!=a.focusNodeAdjacency&&(a.emphasis=a.emphasis||{},null==a.emphasis.focus&&(a.emphasis.focus="adjacency")):"map"===n&&(e.mapType&&!e.map&&(e.map=e.mapType),e.mapLocation&&Object(Xw.i)(e,e.mapLocation));null!=e.hoverAnimation&&(e.emphasis=e.emphasis||{},e.emphasis&&null==e.emphasis.scale&&(e.emphasis.scale=e.hoverAnimation)),MB(e)}})),e.dataRange&&(e.visualMap=e.dataRange),Object(Xw.k)(NB,(function(t){(t=e[t])&&(Object(Xw.s)(t)||(t=[t]),Object(Xw.k)(t,(function(e){MB(e)})))}))}function zB(e){Object(Xw.k)(e,(function(t,n){var r=[],i=[NaN,NaN],o=[t.stackResultDimension,t.stackedOverDimension],a=t.data,s=t.isStackedByIndex,u=t.seriesModel.get("stackStrategy")||"samesign";a.modify(o,(function(o,c,l){var h,f,d=a.get(t.stackedDimension,l);if(isNaN(d))return i;s?f=a.getRawIndex(l):h=a.get(t.stackedByDimension,l);for(var p,m,g,A=NaN,v=n-1;0<=v;v--){var b=e[v];if(0<=(f=s?f:b.data.rawIndexOf(b.stackedByDimension,h))&&(b=b.data.getByRawIndex(b.stackResultDimension,f),"all"===u||"positive"===u&&0<b||"negative"===u&&b<0||"samesign"===u&&0<=d&&0<b||"samesign"===u&&d<=0&&b<0)){p=d,m=b,void 0,g=Math.max(vE(p),vE(m)),p+=m,d=20<g?p:AE(p,g),A=b;break}}return r[0]=d,r[1]=A,r}))}))}var HB,$B,QB=function(e){this.data=e.data||(e.sourceFormat===UD?{}:[]),this.sourceFormat=e.sourceFormat||HD,this.seriesLayoutBy=e.seriesLayoutBy||$D,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var n=0;n<t.length;n++){var r=t[n];null==r.type&&JD(this,n)===VD&&(r.type="ordinal")}};function VB(e){return e instanceof QB}function qB(e,t,n){n=n||WB(e);var r=t.seriesLayoutBy,i=function(e,t,n,r,i){var o,a,s;return e?(t===PD?(s=e,"auto"===r||null==r?YB((function(e){null!=e&&"-"!==e&&(Object(Xw.B)(e)?null==a&&(a=1):a=0)}),n,s,10):a=Object(Xw.y)(r)?r:r?1:0,i||1!==a||(i=[],YB((function(e,t){i[t]=null!=e?e+"":""}),n,s,1/0)),o=i?i.length:n===QD?s.length:s[0]?s[0].length:null):t===LD?i=i||function(e){for(var t,n=0;n<e.length&&!(t=e[n++]););if(t)return Object(Xw.E)(t)}(e):t===UD?i||(i=[],Object(Xw.k)(e,(function(e,t){i.push(t)}))):t===RD&&(r=ME(e[0]),o=Object(Xw.s)(r)&&r.length||1),{startIndex:a,dimensionsDefine:KB(i),dimensionsDetectedCount:o}):{dimensionsDefine:KB(i),startIndex:a,dimensionsDetectedCount:o}}(e,n,r,t.sourceHeader,t.dimensions);return new QB({data:e,sourceFormat:n,seriesLayoutBy:r,dimensionsDefine:i.dimensionsDefine,startIndex:i.startIndex,dimensionsDetectedCount:i.dimensionsDetectedCount,metaRawOption:Object(Xw.d)(t)})}function GB(e){return new QB({data:e,sourceFormat:Object(Xw.D)(e)?zD:RD})}function WB(e){var t=HD;if(Object(Xw.D)(e))t=zD;else if(Object(Xw.s)(e)){0===e.length&&(t=PD);for(var n=0,r=e.length;n<r;n++){var i=e[n];if(null!=i){if(Object(Xw.s)(i)){t=PD;break}if(Object(Xw.z)(i)){t=LD;break}}}}else if(Object(Xw.z)(e))for(var o in e)if(Object(Xw.p)(e,o)&&Object(Xw.t)(e[o])){t=UD;break}return t}function KB(e){var t;if(e)return t=Object(Xw.f)(),Object(Xw.G)(e,(function(e,n){var r;return null!=(e={name:(e=Object(Xw.z)(e)?e:{name:e}).name,displayName:e.displayName,type:e.type}).name&&(e.name+="",null==e.displayName&&(e.displayName=e.name),(r=t.get(e.name))?e.name+="-"+r.count++:t.set(e.name,{count:1})),e}))}function YB(e,t,n,r){if(t===QD)for(var i=0;i<n.length&&i<r;i++)e(n[i]?n[i][0]:null,i);else{var o=n[0]||[];for(i=0;i<o.length&&i<r;i++)e(o[i],i)}}function XB(e){return(e=e.sourceFormat)===LD||e===UD}nI.prototype.getSource=function(){return this._source},nI.prototype.count=function(){return 0},nI.prototype.getItem=function(e,t){},nI.prototype.appendData=function(e){},nI.prototype.clean=function(){},nI.protoInitialize=((zi=nI.prototype).pure=!1,void(zi.persistent=!0)),nI.internalField=($B=function(e,t,n){var r=n.sourceFormat,i=n.seriesLayoutBy,o=n.startIndex,a=(n=n.dimensionsDefine,HB[dI(r,i)]);Object(Xw.m)(e,a),r===zD?(e.getItem=JB,e.count=eI,e.fillStorage=ZB):(a=aI(r,i),e.getItem=Object(Xw.c)(a,null,t,o,n),a=cI(r,i),e.count=Object(Xw.c)(a,null,t,o,n))},JB=function(e,t){e-=this._offset,t=t||[];for(var n=this._data,r=this._dimSize,i=r*e,o=0;o<r;o++)t[o]=n[i+o];return t},ZB=function(e,t,n,r){for(var i=this._data,o=this._dimSize,a=0;a<o;a++){for(var s=r[a],u=null==s[0]?1/0:s[0],c=null==s[1]?-1/0:s[1],l=t-e,h=n[a],f=0;f<l;f++){var d=i[f*o+a];(h[e+f]=d)<u&&(u=d),c<d&&(c=d)}s[0]=u,s[1]=c}},eI=function(){return this._data?this._data.length/this._dimSize:0},(zi={})[PD+"_"+$D]={pure:!0,appendData:rI},zi[PD+"_"+QD]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},zi[LD]={pure:!0,appendData:rI},zi[UD]={pure:!0,appendData:function(e){var t=this._data;Object(Xw.k)(e,(function(e,n){for(var r=t[n]||(t[n]=[]),i=0;i<(e||[]).length;i++)r.push(e[i])}))}},zi[RD]={appendData:rI},zi[zD]={persistent:!1,pure:!0,appendData:function(e){this._data=e},clean:function(){this._offset+=this.count(),this._data=null}},void(HB=zi));var JB,ZB,eI,tI=nI;function nI(e,t){e=VB(e)?e:GB(e);var n=(this._source=e,this._data=e.data);e.sourceFormat===zD&&(this._offset=0,this._dimSize=t,this._data=n),$B(this,n,e)}function rI(e){for(var t=0;t<e.length;t++)this._data.push(e[t])}function iI(e,t,n,r){return e[r]}(ca={})[PD+"_"+$D]=function(e,t,n,r){return e[r+t]},ca[PD+"_"+QD]=function(e,t,n,r,i){r+=t;for(var o=i||[],a=e,s=0;s<a.length;s++){var u=a[s];o[s]=u?u[r]:null}return o},ca[LD]=iI,ca[UD]=function(e,t,n,r,i){for(var o=i||[],a=0;a<n.length;a++){var s=e[n[a].name];o[a]=s?s[r]:null}return o},ca[RD]=iI;var oI=ca;function aI(e,t){return oI[dI(e,t)]}function sI(e,t,n){return e.length}(Wo={})[PD+"_"+$D]=function(e,t,n){return Math.max(0,e.length-t)},Wo[PD+"_"+QD]=function(e,t,n){return(e=e[0])?Math.max(0,e.length-t):0},Wo[LD]=sI,Wo[UD]=function(e,t,n){return(e=e[n[0].name])?e.length:0},Wo[RD]=sI;var uI=Wo;function cI(e,t){return uI[dI(e,t)]}function lI(e,t,n){return e[t]}(Yo={})[PD]=lI,Yo[LD]=function(e,t,n){return e[n]},Yo[UD]=lI,Yo[RD]=function(e,t,n){return(e=ME(e))instanceof Array?e[t]:e},Yo[zD]=lI;var hI=Yo;function fI(e){return hI[e]}function dI(e,t){return e===PD?e+"_"+t:e}function pI(e,t,n){var r,i;if(e&&null!=(t=e.getRawDataItem(t)))return r=(i=e.getStore()).getSource().sourceFormat,null!=n?(e=e.getDimensionIndex(n),n=i.getDimensionProperty(e),fI(r)(t,e,n)):(i=t,r===RD?ME(t):i)}var mI=/\{@(.+?)\}/g;gI.prototype.getDataParams=function(e,t){var n=this.getData(t),r=this.getRawValue(e,t),i=n.getRawIndex(e),o=n.getName(e),a=n.getRawDataItem(e),s=(e=(s=n.getItemVisual(e,"style"))&&s[n.getItemVisual(e,"drawType")||"fill"],s&&s.stroke),u=this.mainType,c="series"===u;n=n.userOutput&&n.userOutput.get();return{componentType:u,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:c?this.subType:null,seriesIndex:this.seriesIndex,seriesId:c?this.id:null,seriesName:c?this.name:null,name:o,dataIndex:i,data:a,dataType:t,value:r,color:e,borderColor:s,dimensionNames:n?n.fullDimensions:null,encode:n?n.encode:null,$vars:["seriesName","name","value"]}},gI.prototype.getFormattedLabel=function(e,t,n,r,i,o){t=t||"normal";var a=this.getData(n);n=this.getDataParams(e,n);return o&&(n.value=o.interpolatedValue),null!=r&&Xw.s(n.value)&&(n.value=n.value[r]),i=i||a.getItemModel(e).get("normal"===t?["label","formatter"]:[t,"label","formatter"]),Xw.v(i)?(n.status=t,n.dimensionIndex=r,i(n)):Xw.B(i)?pD(i,n).replace(mI,(function(t,n){var r=n.length;"["===n.charAt(0)&&"]"===n.charAt(r-1)&&(n=+n.slice(1,r-1)),r=pI(a,e,n);return o&&Xw.s(o.interpolatedValue)&&0<=(n=a.getDimensionIndex(n))&&(r=o.interpolatedValue[n]),null!=r?r+"":""})):void 0},gI.prototype.getRawValue=function(e,t){return pI(this.getData(t),e)},gI.prototype.formatTooltip=function(e,t,n){},ha=gI;function gI(){}function AI(e){var t,n;return Xw.z(e)?e.type&&(n=e):t=e,{text:t,frag:n}}function vI(e){return new bI(e)}yI.prototype.perform=function(e){var t,n,r=this._upstream,i=e&&e.skip,o=(this._dirty&&r&&((o=this.context).data=o.outputData=r.context.outputData),this.__pipeline&&(this.__pipeline.currentTask=this),this._plan&&!i&&(t=this._plan(this.context)),c(this._modBy)),a=this._modDataCount||0,s=c(e&&e.modBy),u=e&&e.modDataCount||0;function c(e){return 1<=e?e:1}if(o===s&&a===u||(t="reset"),!this._dirty&&"reset"!==t||(this._dirty=!1,n=this._doReset(i)),this._modBy=s,this._modDataCount=u,o=e&&e.step,this._dueEnd=r?r._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var l=this._dueIndex,h=Math.min(null!=o?this._dueIndex+o:1/0,this._dueEnd);if(!i&&(n||l<h)){var f=this._progress;if(Object(Xw.s)(f))for(var d=0;d<f.length;d++)this._doProgress(f[d],l,h,s,u);else this._doProgress(f,l,h,s,u)}this._dueIndex=h,a=null!=this._settedOutputEnd?this._settedOutputEnd:h,this._outputDueEnd=a}else this._dueIndex=this._outputDueEnd=null!=this._settedOutputEnd?this._settedOutputEnd:this._dueEnd;return this.unfinished()},yI.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},yI.prototype._doProgress=function(e,t,n,r,i){_I.reset(t,n,r,i),this._callingProgress=e,this._callingProgress({start:t,end:n,count:n-t,next:_I.next},this.context)},yI.prototype._doReset=function(e){var t,n;return this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null,!e&&this._reset&&((t=this._reset(this.context))&&t.progress&&(n=t.forceFirstProgress,t=t.progress),Object(Xw.s)(t)&&!t.length&&(t=null)),this._progress=t,this._modBy=this._modDataCount=null,(e=this._downstream)&&e.dirty(),n},yI.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},yI.prototype.pipe=function(e){this._downstream===e&&!this._dirty||((this._downstream=e)._upstream=this,e.dirty())},yI.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},yI.prototype.getUpstream=function(){return this._upstream},yI.prototype.getDownstream=function(){return this._downstream},yI.prototype.setOutputEnd=function(e){this._outputDueEnd=this._settedOutputEnd=e};var bI=yI;function yI(e){this._reset=(e=e||{}).reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}var wI,xI,CI,kI,EI,SI,_I=SI={reset:function(e,t,n,r){xI=e,wI=t,CI=n,kI=r,EI=Math.ceil(kI/CI),SI.next=1<CI&&0<kI?TI:OI}};function OI(){return xI<wI?xI++:null}function TI(){var e=xI%EI*CI+Math.ceil(xI/EI);e=wI<=xI?null:e<kI?e:xI;return xI++,e}function DI(e,t){return"ordinal"===(t=t&&t.type)?e:null==(e="time"!==t||Object(Xw.y)(e)||null==e||"-"===e?e:+xE(e))||""===e?NaN:+e}var BI=Object(Xw.f)({number:function(e){return parseFloat(e)},time:function(e){return+xE(e)},trim:function(e){return Object(Xw.B)(e)?Object(Xw.R)(e):e}});function II(e){return BI.get(e)}var MI={lt:function(e,t){return e<t},lte:function(e,t){return e<=t},gt:function(e,t){return t<e},gte:function(e,t){return t<=e}},jI=(NI.prototype.evaluate=function(e){return Object(Xw.y)(e)?this._opFn(e,this._rvalFloat):this._opFn(EE(e),this._rvalFloat)},NI);function NI(e,t){Object(Xw.y)(t)||sB(""),this._opFn=MI[e],this._rvalFloat=EE(t)}RI.prototype.evaluate=function(e,t){var n=Object(Xw.y)(e)?e:EE(e),r=Object(Xw.y)(t)?t:EE(t),i=isNaN(n),o=isNaN(r);return i&&(n=this._incomparable),o&&(r=this._incomparable),i&&o&&(i=Object(Xw.B)(e),o=Object(Xw.B)(t),i&&(n=o?e:0),o&&(r=i?t:0)),n<r?this._resultLT:r<n?-this._resultLT:0};var FI=RI;function RI(e,t){e="desc"===e,this._resultLT=e?1:-1,this._incomparable="min"===(t=null==t?e?"min":"max":t)?-1/0:1/0}LI.prototype.evaluate=function(e){var t,n=e===this._rval;return n||(t=typeof e)===this._rvalTypeof||"number"!=t&&"number"!==this._rvalTypeof||(n=EE(e)===this._rvalFloat),this._isEQ?n:!n};var PI=LI;function LI(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=EE(t)}zI.prototype.getRawData=function(){throw new Error("not supported")},zI.prototype.getRawDataItem=function(e){throw new Error("not supported")},zI.prototype.cloneRawData=function(){},zI.prototype.getDimensionInfo=function(e){},zI.prototype.cloneAllDimensionInfo=function(){},zI.prototype.count=function(){},zI.prototype.retrieveValue=function(e,t){},zI.prototype.retrieveValueFromItem=function(e,t){},zI.prototype.convertValue=DI;var UI=zI;function zI(){}function HI(e){return GI(e.sourceFormat)||sB(""),e.data}function $I(e){var t=e.sourceFormat,n=e.data;if(GI(t)||sB(""),t===PD){for(var r=[],i=0,o=n.length;i<o;i++)r.push(n[i].slice());return r}if(t===LD){for(r=[],i=0,o=n.length;i<o;i++)r.push(Object(Xw.m)({},n[i]));return r}}function QI(e,t,n){if(null!=n)return Object(Xw.y)(n)||!isNaN(n)&&!Object(Xw.p)(t,n)?e[n]:Object(Xw.p)(t,n)?t[n]:void 0}function VI(e){return Object(Xw.d)(e)}var qI=Object(Xw.f)();function GI(e){return e===PD||e===LD}Va="undefined";var WI,KI=typeof Uint32Array==Va?Array:Uint32Array,YI=typeof Uint16Array==Va?Array:Uint16Array,XI=typeof Int32Array==Va?Array:Int32Array,JI={float:Ia=typeof Float64Array==Va?Array:Float64Array,int:XI,ordinal:Array,number:Array,time:Ia};function ZI(e){return 65535<e?KI:YI}function eM(e,t,n,r,i){if(n=JI[n||"float"],i){var o=e[t],a=o&&o.length;if(a!==r){for(var s=new n(r),u=0;u<a;u++)s[u]=o[u];e[t]=s}}else e[t]=new n(r)}function tM(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=Object(Xw.f)()}function nM(e,t,n,r){return DI(e[r],this._dimensions[r])}tM.prototype.initData=function(e,t,n){this._provider=e,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var r=e.getSource(),i=this.defaultDimValueGetter=WI[r.sourceFormat];this._dimValueGetter=n||i,this._rawExtent=[],XB(r),this._dimensions=Object(Xw.G)(t,(function(e){return{type:e.type,property:e.property}})),this._initDataFromProvider(0,e.count())},tM.prototype.getProvider=function(){return this._provider},tM.prototype.getSource=function(){return this._provider.getSource()},tM.prototype.ensureCalculationDimension=function(e,t){var n=this._calcDimNameToIdx,r=this._dimensions,i=n.get(e);if(null!=i){if(r[i].type===t)return i}else i=r.length;return r[i]={type:t},n.set(e,i),this._chunks[i]=new JI[t||"float"](this._rawCount),this._rawExtent[i]=[1/0,-1/0],i},tM.prototype.collectOrdinalMeta=function(e,t){for(var n=this._chunks[e],r=this._dimensions[e],i=this._rawExtent,o=r.ordinalOffset||0,a=n.length,s=(0===o&&(i[e]=[1/0,-1/0]),i[e]),u=o;u<a;u++){var c=n[u]=t.parseAndCollect(n[u]);isNaN(c)||(s[0]=Math.min(c,s[0]),s[1]=Math.max(c,s[1]))}r.ordinalMeta=t,r.ordinalOffset=a,r.type="ordinal"},tM.prototype.getOrdinalMeta=function(e){return this._dimensions[e].ordinalMeta},tM.prototype.getDimensionProperty=function(e){return(e=this._dimensions[e])&&e.property},tM.prototype.appendData=function(e){var t=this._provider,n=this.count();t.appendData(e),e=t.count();return t.persistent||(e+=n),n<e&&this._initDataFromProvider(n,e,!0),[n,e]},tM.prototype.appendValues=function(e,t){for(var n=this._chunks,r=this._dimensions,i=r.length,o=this._rawExtent,a=this.count(),s=a+Math.max(e.length,t||0),u=0;u<i;u++)eM(n,u,(d=r[u]).type,s,!0);for(var c=[],l=a;l<s;l++)for(var h=l-a,f=0;f<i;f++){var d=r[f],p=WI.arrayRows.call(this,e[h]||c,d.property,h,f),m=(n[f][l]=p,o[f]);p<m[0]&&(m[0]=p),p>m[1]&&(m[1]=p)}return{start:a,end:this._rawCount=this._count=s}},tM.prototype._initDataFromProvider=function(e,t,n){for(var r=this._provider,i=this._chunks,o=this._dimensions,a=o.length,s=this._rawExtent,u=Object(Xw.G)(o,(function(e){return e.property})),c=0;c<a;c++){var l=o[c];s[c]||(s[c]=[1/0,-1/0]),eM(i,c,l.type,t,n)}if(r.fillStorage)r.fillStorage(e,t,i,s);else for(var h=[],f=e;f<t;f++){h=r.getItem(f,h);for(var d=0;d<a;d++){var p=i[d],m=this._dimValueGetter(h,u[d],f,d);m<(p=(p[f]=m,s[d]))[0]&&(p[0]=m),m>p[1]&&(p[1]=m)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=t,this._extent=[]},tM.prototype.count=function(){return this._count},tM.prototype.get=function(e,t){return 0<=t&&t<this._count&&(e=this._chunks[e])?e[this.getRawIndex(t)]:NaN},tM.prototype.getValues=function(e,t){var n=[],r=[];if(null==t){t=e,e=[];for(var i=0;i<this._dimensions.length;i++)r.push(i)}else r=e;i=0;for(var o=r.length;i<o;i++)n.push(this.get(r[i],t));return n},tM.prototype.getByRawIndex=function(e,t){return 0<=t&&t<this._rawCount&&(e=this._chunks[e])?e[t]:NaN},tM.prototype.getSum=function(e){var t=0;if(this._chunks[e])for(var n=0,r=this.count();n<r;n++){var i=this.get(e,n);isNaN(i)||(t+=i)}return t},tM.prototype.getMedian=function(e){var t=[],n=(e=(this.each([e],(function(e){isNaN(e)||t.push(e)})),t.sort((function(e,t){return e-t}))),this.count());return 0===n?0:n%2==1?e[(n-1)/2]:(e[n/2]+e[n/2-1])/2},tM.prototype.indexOfRawIndex=function(e){if(!(e>=this._rawCount||e<0)){if(!this._indices)return e;var t=this._indices,n=t[e];if(null!=n&&n<this._count&&n===e)return e;for(var r=0,i=this._count-1;r<=i;){var o=(r+i)/2|0;if(t[o]<e)r=1+o;else{if(!(t[o]>e))return o;i=o-1}}}return-1},tM.prototype.indicesOfNearest=function(e,t,n){var r=this._chunks[e],i=[];if(r){null==n&&(n=1/0);for(var o=1/0,a=-1,s=0,u=0,c=this.count();u<c;u++){var l=t-r[this.getRawIndex(u)],h=Math.abs(l);h<=n&&((h<o||h===o&&0<=l&&a<0)&&(o=h,a=l,s=0),l===a&&(i[s++]=u))}i.length=s}return i},tM.prototype.getIndices=function(){var e=this._indices;if(e){var t=e.constructor,n=this._count;if(t===Array)for(var r=new t(n),i=0;i<n;i++)r[i]=e[i];else r=new t(e.buffer,0,n)}else for(r=new(t=ZI(this._rawCount))(this.count()),i=0;i<r.length;i++)r[i]=i;return r},tM.prototype.filter=function(e,t){if(!this._count)return this;for(var n=this.clone(),r=n.count(),i=new(ZI(n._rawCount))(r),o=[],a=e.length,s=0,u=e[0],c=n._chunks,l=0;l<r;l++){var h=void 0,f=n.getRawIndex(l);if(0===a)h=t(l);else if(1===a)h=t(c[u][f],l);else{for(var d=0;d<a;d++)o[d]=c[e[d]][f];o[d]=l,h=t.apply(null,o)}h&&(i[s++]=f)}return s<r&&(n._indices=i),n._count=s,n._extent=[],n._updateGetRawIdx(),n},tM.prototype.selectRange=function(e){var t=this.clone(),n=t._count;if(!n)return this;var r=Object(Xw.E)(e),i=r.length;if(!i)return this;var o=t.count(),a=new(ZI(t._rawCount))(o),s=0,u=e[h=r[0]][0],c=e[h][1],l=t._chunks,h=!1;if(!t._indices){var f=0;if(1===i){for(var d=l[r[0]],p=0;p<n;p++)(u<=(v=d[p])&&v<=c||isNaN(v))&&(a[s++]=f),f++;h=!0}else if(2===i){d=l[r[0]];var m=l[r[1]],g=e[r[1]][0],A=e[r[1]][1];for(p=0;p<n;p++){var v=d[p],b=m[p];(u<=v&&v<=c||isNaN(v))&&(g<=b&&b<=A||isNaN(b))&&(a[s++]=f),f++}h=!0}}if(!h)if(1===i)for(p=0;p<o;p++){var y=t.getRawIndex(p);(u<=(v=l[r[0]][y])&&v<=c||isNaN(v))&&(a[s++]=y)}else for(p=0;p<o;p++){for(var w=!0,x=(y=t.getRawIndex(p),0);x<i;x++){var C=r[x];((v=l[C][y])<e[C][0]||v>e[C][1])&&(w=!1)}w&&(a[s++]=t.getRawIndex(p))}return s<o&&(t._indices=a),t._count=s,t._extent=[],t._updateGetRawIdx(),t},tM.prototype.map=function(e,t){var n=this.clone(e);return this._updateDims(n,e,t),n},tM.prototype.modify=function(e,t){this._updateDims(this,e,t)},tM.prototype._updateDims=function(e,t,n){for(var r=e._chunks,i=[],o=t.length,a=e.count(),s=[],u=e._rawExtent,c=0;c<t.length;c++)u[t[c]]=[1/0,-1/0];for(var l=0;l<a;l++){for(var h=e.getRawIndex(l),f=0;f<o;f++)s[f]=r[t[f]][h];s[o]=l;var d=n&&n.apply(null,s);if(null!=d)for("object"!=typeof d&&(i[0]=d,d=i),c=0;c<d.length;c++){var p=t[c],m=d[c],g=u[p];(p=r[p])&&(p[h]=m),m<g[0]&&(g[0]=m),m>g[1]&&(g[1]=m)}}},tM.prototype.lttbDownSample=function(e,t){var n,r=this.clone([e],!0),i=r._chunks[e],o=this.count(),a=0,s=Math.floor(1/t),u=this.getRawIndex(0),c=new(ZI(this._rawCount))(Math.min(2*(Math.ceil(o/s)+2),o));c[a++]=u;for(var l=1;l<o-1;l+=s){for(var h=Math.min(l+s,o-1),f=Math.min(l+2*s,o),d=(f+h)/2,p=0,m=h;m<f;m++){var g=i[k=this.getRawIndex(m)];isNaN(g)||(p+=g)}p/=f-h;h=l;var A=Math.min(l+s,o),v=l-1,b=i[u],y=-1,w=h,x=-1,C=0;for(m=h;m<A;m++){var k;g=i[k=this.getRawIndex(m)];isNaN(g)?(C++,x<0&&(x=k)):y<(n=Math.abs((v-d)*(g-b)-(v-m)*(p-b)))&&(y=n,w=k)}0<C&&C<A-h&&(c[a++]=Math.min(x,w),w=Math.max(x,w)),u=c[a++]=w}return c[a++]=this.getRawIndex(o-1),r._count=a,r._indices=c,r.getRawIndex=this._getRawIdx,r},tM.prototype.downSample=function(e,t,n,r){for(var i=this.clone([e],!0),o=i._chunks,a=[],s=Math.floor(1/t),u=o[e],c=this.count(),l=i._rawExtent[e]=[1/0,-1/0],h=new(ZI(this._rawCount))(Math.ceil(c/s)),f=0,d=0;d<c;d+=s){c-d<s&&(a.length=s=c-d);for(var p=0;p<s;p++){var m=this.getRawIndex(d+p);a[p]=u[m]}var g=n(a),A=this.getRawIndex(Math.min(d+r(a,g)||0,c-1));(u[A]=g)<l[0]&&(l[0]=g),g>l[1]&&(l[1]=g),h[f++]=A}return i._count=f,i._indices=h,i._updateGetRawIdx(),i},tM.prototype.each=function(e,t){if(this._count)for(var n=e.length,r=this._chunks,i=0,o=this.count();i<o;i++){var a=this.getRawIndex(i);switch(n){case 0:t(i);break;case 1:t(r[e[0]][a],i);break;case 2:t(r[e[0]][a],r[e[1]][a],i);break;default:for(var s=0,u=[];s<n;s++)u[s]=r[e[s]][a];u[s]=i,t.apply(null,u)}}},tM.prototype.getDataExtent=function(e){var t=this._chunks[e],n=[1/0,-1/0];if(!t)return n;var r=this.count();if(!this._indices)return this._rawExtent[e].slice();if(i=this._extent[e])return i.slice();for(var i,o=(i=n)[0],a=i[1],s=0;s<r;s++){var u=t[this.getRawIndex(s)];u<o&&(o=u),a<u&&(a=u)}return this._extent[e]=[o,a]},tM.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var n=[],r=this._chunks,i=0;i<r.length;i++)n.push(r[i][t]);return n},tM.prototype.clone=function(e,t){var n,r,i=new tM,o=this._chunks,a=e&&Object(Xw.L)(e,(function(e,t){return e[t]=!0,e}),{});if(a)for(var s=0;s<o.length;s++)i._chunks[s]=a[s]?(r=void 0,(r=(n=o[s]).constructor)===Array?n.slice():new r(n)):o[s];else i._chunks=o;return this._copyCommonProps(i),t||(i._indices=this._cloneIndices()),i._updateGetRawIdx(),i},tM.prototype._copyCommonProps=function(e){e._count=this._count,e._rawCount=this._rawCount,e._provider=this._provider,e._dimensions=this._dimensions,e._extent=Object(Xw.d)(this._extent),e._rawExtent=Object(Xw.d)(this._rawExtent)},tM.prototype._cloneIndices=function(){if(this._indices){var e=this._indices.constructor,t=void 0;if(e===Array)for(var n=this._indices.length,r=(t=new e(n),0);r<n;r++)t[r]=this._indices[r];else t=new e(this._indices);return t}return null},tM.prototype._getRawIdxIdentity=function(e){return e},tM.prototype._getRawIdx=function(e){return e<this._count&&0<=e?this._indices[e]:-1},tM.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},tM.internalField=void(WI={arrayRows:nM,objectRows:function(e,t,n,r){return DI(e[t],this._dimensions[r])},keyedColumns:nM,original:function(e,t,n,r){return DI((e=e&&(null==e.value?e:e.value))instanceof Array?e[r]:e,this._dimensions[r])},typedArray:function(e,t,n,r){return e[r]}});var rM=tM,iM=(oM.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},oM.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,9e10<this._versionSignBase&&(this._versionSignBase=0)},oM.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},oM.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},oM.prototype._createSource=function(){this._setLocalSource([],[]);var e,t,n,r,i,o,a,s=this._sourceHost,u=this._getUpstreamSourceManagers(),c=!!u.length;sM(s)?(r=s,i=e=o=void 0,t=c?((t=u[0]).prepareSource(),o=(i=t.getSource()).data,e=i.sourceFormat,[t._getVersionSign()]):(o=r.get("data",!0),e=Object(Xw.D)(o)?zD:RD,[]),r=this._getSourceMetaRawOption()||{},i=i&&i.metaRawOption||{},a=Object(Xw.N)(r.seriesLayoutBy,i.seriesLayoutBy)||null,n=Object(Xw.N)(r.sourceHeader,i.sourceHeader),r=Object(Xw.N)(r.dimensions,i.dimensions),i=a!==i.seriesLayoutBy||!!n!=!!i.sourceHeader||r?[qB(o,{seriesLayoutBy:a,sourceHeader:n,dimensions:r},e)]:[]):(o=s,t=c?(i=(a=this._applyTransform(u)).sourceList,a.upstreamSignList):(i=[qB(o.get("source",!0),this._getSourceMetaRawOption(),null)],[])),this._setLocalSource(i,t)},oM.prototype._applyTransform=function(e){var t,n=this._sourceHost,r=n.get("transform",!0),i=n.get("fromTransformResult",!0),o=(null!=i&&1!==e.length&&uM(""),[]),a=[];return Object(Xw.k)(e,(function(e){e.prepareSource();var t=e.getSource(i||0);null==i||t||uM(""),o.push(t),a.push(e._getVersionSign())})),r?t=function(e,t){var n=DE(e);(e=n.length)||sB("");for(var r=0,i=e;r<i;r++)t=function(e,t){t.length||sB(""),Object(Xw.z)(e)||sB("");var n=e.type,r=qI.get(n);return r||sB(""),n=Object(Xw.G)(t,(function(e){var t=e,n=(e=r,new UI),i=t.data,o=n.sourceFormat=t.sourceFormat,a=t.startIndex,s=(t.seriesLayoutBy!==$D&&sB(""),[]),u={};if(h=t.dimensionsDefine)Object(Xw.k)(h,(function(e,t){var n=e.name;t={index:t,name:n,displayName:e.displayName};s.push(t),null!=n&&(Object(Xw.p)(u,n)&&sB(""),u[n]=t)}));else for(var c=0;c<t.dimensionsDetectedCount;c++)s.push({index:c});var l=aI(o,$D),h=(e.__isBuiltIn&&(n.getRawDataItem=function(e){return l(i,a,s,e)},n.getRawData=Object(Xw.c)(HI,null,t)),n.cloneRawData=Object(Xw.c)($I,null,t),cI(o,$D)),f=(n.count=Object(Xw.c)(h,null,i,a,s),fI(o)),d=(n.retrieveValue=function(e,t){return e=l(i,a,s,e),d(e,t)},n.retrieveValueFromItem=function(e,t){var n;return null!=e&&(n=s[t])?f(e,t,n.name):void 0});return n.getDimensionInfo=Object(Xw.c)(QI,null,s,u),n.cloneAllDimensionInfo=Object(Xw.c)(VI,null,s),n})),n=DE(r.transform({upstream:n[0],upstreamList:n,config:Object(Xw.d)(e.config)})),Object(Xw.G)(n,(function(e,n){Object(Xw.z)(e)||sB(""),e.data||sB(""),GI(WB(e.data))||sB("");var r=t[0];n=r&&0===n&&!e.dimensions?((n=r.startIndex)&&(e.data=r.data.slice(0,n).concat(e.data)),{seriesLayoutBy:$D,sourceHeader:n,dimensions:r.metaRawOption.dimensions}):{seriesLayoutBy:$D,sourceHeader:0,dimensions:e.dimensions};return qB(e.data,n,null)}))}(n[r],t),r!==i-1&&(t.length=Math.max(t.length,1));return t}(r,o,n.componentIndex):null!=i&&(t=[(e=o[0],new QB({data:e.data,sourceFormat:e.sourceFormat,seriesLayoutBy:e.seriesLayoutBy,dimensionsDefine:Object(Xw.d)(e.dimensionsDefine),startIndex:e.startIndex,dimensionsDetectedCount:e.dimensionsDetectedCount}))]),{sourceList:t,upstreamSignList:a}},oM.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t<e.length;t++){var n=e[t];if(n._isDirty()||this._upstreamSignList[t]!==n._getVersionSign())return!0}},oM.prototype.getSource=function(e){var t=this._sourceList[e=e||0];return t||(t=this._getUpstreamSourceManagers())[0]&&t[0].getSource(e)},oM.prototype.getSharedDataStore=function(e){var t=e.makeStoreSchema();return this._innerGetDataStore(t.dimensions,e.source,t.hash)},oM.prototype._innerGetDataStore=function(e,t,n){var r,i,o=(i=this._storeList)[0];return(i=(o=o||(i[0]={}))[n])||(r=this._getUpstreamSourceManagers()[0],sM(this._sourceHost)&&r?i=r._innerGetDataStore(e,t,n):(i=new rM).initData(new tI(t,e.length),e),o[n]=i),i},oM.prototype._getUpstreamSourceManagers=function(){var e,t=this._sourceHost;return sM(t)?(e=XD(t))?[e.getSourceManager()]:[]:Object(Xw.G)((e=t).get("transform",!0)||e.get("fromTransformResult",!0)?VE(e.ecModel,"dataset",{index:e.get("fromDatasetIndex",!0),id:e.get("fromDatasetId",!0)},QE).models:[],(function(e){return e.getSourceManager()}))},oM.prototype._getSourceMetaRawOption=function(){var e,t,n,r=this._sourceHost;return sM(r)?(e=r.get("seriesLayoutBy",!0),t=r.get("sourceHeader",!0),n=r.get("dimensions",!0)):this._getUpstreamSourceManagers().length||(e=(r=r).get("seriesLayoutBy",!0),t=r.get("sourceHeader",!0),n=r.get("dimensions",!0)),{seriesLayoutBy:e,sourceHeader:t,dimensions:n}},oM);function oM(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}function aM(e){e.option.transform&&Object(Xw.P)(e.option.transform)}function sM(e){return"series"===e.mainType}function uM(e){throw new Error(e)}var cM="line-height:1";function lM(e,t){var n=e.color||"#6e7079",r=e.fontSize||12,i=e.fontWeight||"400",o=e.color||"#464646",a=e.fontSize||14;e=e.fontWeight||"900";return"html"===t?{nameStyle:"font-size:"+kx(r+"")+"px;color:"+kx(n)+";font-weight:"+kx(i+""),valueStyle:"font-size:"+kx(a+"")+"px;color:"+kx(o)+";font-weight:"+kx(e+"")}:{nameStyle:{fontSize:r,fill:n,fontWeight:i},valueStyle:{fontSize:a,fill:o,fontWeight:e}}}var hM=[0,10,20,30],fM=["","\n","\n\n","\n\n\n"];function dM(e,t){return t.type=e,t}function pM(e){return"section"===e.type}function mM(e){return pM(e)?gM:AM}function gM(e,t,n,r){var i,o=t.noHeader,a=(u=function e(t){var n,r,i;return pM(t)?(n=0,r=t.blocks.length,i=1<r||0<r&&!t.noHeader,Object(Xw.k)(t.blocks,(function(t){var r=e(t);n<=r&&(n=r+ +(i&&(!r||pM(t)&&!t.noHeader)))})),n):0}(t),{html:hM[u],richText:fM[u]}),s=[],u=t.blocks||[],c=(Object(Xw.b)(!u||Object(Xw.s)(u)),u=u||[],e.orderMode),l=(t.sortBlocks&&c&&(u=u.slice(),l={valueAsc:"asc",valueDesc:"desc"},Object(Xw.p)(l,c)?(i=new FI(l[c],null),u.sort((function(e,t){return i.evaluate(e.sortParam,t.sortParam)}))):"seriesDesc"===c&&u.reverse()),Object(Xw.k)(u,(function(n,i){var o=t.valueFormatter;null!=(o=mM(n)(o?Object(Xw.m)(Object(Xw.m)({},e),{valueFormatter:o}):e,n,0<i?a.html:0,r))&&s.push(o)})),"richText"===e.renderMode?s.join(a.richText):bM(s.join(""),o?n:a.html));return o?l:(c=hD(t.header,"ordinal",e.useUTC),u=lM(r,e.renderMode).nameStyle,"richText"===e.renderMode?yM(e,c,u)+a.richText+l:bM('<div style="'+u+";"+cM+';">'+kx(c)+"</div>"+l,n))}function AM(e,t,n,r){var i,o,a,s,u=e.renderMode,c=t.noName,l=t.noValue,h=!t.markerType,f=t.name,d=e.useUTC,p=t.valueFormatter||e.valueFormatter||function(e){return e=Object(Xw.s)(e)?e:[e],Object(Xw.G)(e,(function(e,t){return hD(e,Object(Xw.s)(o)?o[t]:o,d)}))};if(!c||!l)return i=h?"":e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||"#333",u),f=c?"":hD(f,"ordinal",d),o=t.valueType,p=l?[]:p(t.value),t=!h||!c,a=!h&&c,s=(r=lM(r,u)).nameStyle,r=r.valueStyle,"richText"===u?(h?"":i)+(c?"":yM(e,f,s))+(l?"":function(e,t,n,r,i){return i=[i],r=r?10:20,n&&i.push({padding:[0,0,0,r],align:"right"}),e.markupStyleCreator.wrapRichTextStyle(Object(Xw.s)(t)?t.join("  "):t,i)}(e,p,t,a,r)):bM((h?"":i)+(c?"":'<span style="'+s+";"+(h?"":"margin-left:2px")+'">'+kx(f)+"</span>")+(l?"":function(e,t,n,r){return n=n?"10px":"20px",t=t?"float:right;margin-left:"+n:"",e=Object(Xw.s)(e)?e:[e],'<span style="'+t+";"+r+'">'+Object(Xw.G)(e,kx).join("&nbsp;&nbsp;")+"</span>"}(p,t,a,r)),n)}function vM(e,t,n,r,i,o){if(e)return mM(e)({useUTC:i,renderMode:n,orderMode:r,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,o)}function bM(e,t){return'<div style="margin: '+t+"px 0 0;"+cM+';">'+e+'<div style="clear:both"></div></div>'}function yM(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function wM(e,t){return null!=(e=e.get("padding"))?e:"richText"===t?[8,10]:10}CM.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},CM.prototype.makeTooltipMarker=function(e,t,n){var r,i="richText"===n?this._generateStyleName():null,o=(t={color:t,type:e,renderMode:n,markerId:i},e=(t=Xw.B(t)?{color:t,extraCssText:o}:t||{}).color,n=t.type,o=t.extraCssText,r=t.renderMode||"html",e?"html"===r?"subItem"===n?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+kx(e)+";"+(o||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+kx(e)+";"+(o||"")+'"></span>':{renderMode:r,content:"{"+(t.markerId||"markerX")+"|}  ",style:"subItem"===n?{width:4,height:4,borderRadius:2,backgroundColor:e}:{width:10,height:10,borderRadius:5,backgroundColor:e}}:"");return Object(Xw.B)(o)?o:(this.richTextStyles[i]=o.style,o.content)},CM.prototype.wrapRichTextStyle=function(e,t){var n={};Object(Xw.s)(t)?Object(Xw.k)(t,(function(e){return Object(Xw.m)(n,e)})):Object(Xw.m)(n,t),t=this._generateStyleName();return this.richTextStyles[t]=n,"{"+t+"|"+e+"}"};var xM=CM;function CM(){this.richTextStyles={},this._nextStyleNameId=SE()}var kM=UE();function EM(e,t){return e.getName(t)||e.getId(t)}var SM,_M="__universalTransitionEnabled";Kw(OM,SM=jD),OM.prototype.init=function(e,t,n){this.seriesIndex=this.componentIndex,this.dataTask=vI({count:DM,reset:BM}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(kM(this).sourceManager=new iM(this)).prepareSource(),MM(e=this.getInitialData(e,n),this),this.dataTask.context.data=e,kM(this).dataBeforeProcessed=e,TM(this),this._initSelectedMapFromData(e)},OM.prototype.mergeDefaultAndTheme=function(e,t){var n=CD(this),r=n?ED(e):{},i=this.subType;jD.hasClass(i),Xw.H(e,t.getTheme().get(this.subType)),Xw.H(e,this.getDefaultOption()),BE(e,"label",["show"]),this.fillDataTextStyle(e.data),n&&kD(e,r,n)},OM.prototype.mergeOption=function(e,t){var n;e=Xw.H(this.option,e,!0),this.fillDataTextStyle(e.data),MM(n=((n=((n=CD(this))&&kD(this.option,e,n),kM(this).sourceManager)).dirty(),n.prepareSource(),this.getInitialData(e,t)),this),this.dataTask.dirty(),this.dataTask.context.data=n,kM(this).dataBeforeProcessed=n,TM(this),this._initSelectedMapFromData(n)},OM.prototype.fillDataTextStyle=function(e){if(e&&!Xw.D(e))for(var t=["show"],n=0;n<e.length;n++)e[n]&&e[n].label&&BE(e[n],"label",t)},OM.prototype.getInitialData=function(e,t){},OM.prototype.appendData=function(e){this.getRawData().appendData(e.data)},OM.prototype.getData=function(e){var t=NM(this);return t?(t=t.context.data,null==e?t:t.getLinkedData(e)):kM(this).data},OM.prototype.getAllData=function(){var e=this.getData();return e&&e.getLinkedDataAll?e.getLinkedDataAll():[{data:e}]},OM.prototype.setData=function(e){var t,n=NM(this);n&&((t=n.context).outputData=e,n!==this.dataTask&&(t.data=e)),kM(this).data=e},OM.prototype.getEncode=function(){var e=this.get("encode",!0);if(e)return Xw.f(e)},OM.prototype.getSourceManager=function(){return kM(this).sourceManager},OM.prototype.getSource=function(){return this.getSourceManager().getSource()},OM.prototype.getRawData=function(){return kM(this).dataBeforeProcessed},OM.prototype.getColorBy=function(){return this.get("colorBy")||"series"},OM.prototype.isColorBySeries=function(){return"series"===this.getColorBy()},OM.prototype.getBaseAxis=function(){var e=this.coordinateSystem;return e&&e.getBaseAxis&&e.getBaseAxis()},OM.prototype.formatTooltip=function(e,t,n){return function(e){var t,n,r,i,o,a,s,u,c,l,h,f=e.series,d=e.dataIndex,p=(e=e.multipleSeries,f.getData()),m=(y=p.mapDimensionsAll("defaultedTooltip")).length,g=f.getRawValue(d),A=Object(Xw.s)(g),v=(v=d,mD((w=f).getData().getItemVisual(v,"style")[w.visualDrawType]));function b(e,t){(t=s.getDimensionInfo(t))&&!1!==t.otherDims.tooltip&&(u?h.push(dM("nameValue",{markerType:"subItem",markerColor:a,name:t.displayName,value:e,valueType:t.type})):(c.push(e),l.push(t.type)))}1<m||A&&!m?(w=g,i=d,o=y,a=v,s=f.getData(),u=Object(Xw.L)(w,(function(e,t,n){return n=s.getDimensionInfo(n),e||n&&!1!==n.tooltip&&null!=n.displayName}),!1),c=[],l=[],h=[],o.length?Object(Xw.k)(o,(function(e){b(pI(s,i,e),e)})):Object(Xw.k)(w,b),t=(o={inlineValues:c,inlineValueTypes:l,blocks:h}).inlineValueTypes,n=o.blocks,r=(o=o.inlineValues)[0]):m?(w=p.getDimensionInfo(y[0]),r=o=pI(p,d,y[0]),t=w.type):r=o=A?g[0]:g;var y=(m=RE(f))&&f.name||"",w=p.getName(d);return dM("section",{header:y,noHeader:e||!m,sortParam:r,blocks:[dM("nameValue",{markerType:"item",markerColor:v,name:A=e?y:w,noName:!Object(Xw.R)(A),value:o,valueType:t})].concat(n||[])})}({series:this,dataIndex:e,multipleSeries:t})},OM.prototype.isAnimationEnabled=function(){var e=this.ecModel;return!!(!Yw.a.node||e&&e.ssr)&&!!(e=!((e=this.getShallow("animation"))&&this.getData().count()>this.getShallow("animationThreshold"))&&e)},OM.prototype.restoreData=function(){this.dataTask.dirty()},OM.prototype.getColorFromPalette=function(e,t,n){var r=this.ecModel;return oB.prototype.getColorFromPalette.call(this,e,t,n)||r.getColorFromPalette(e,t,n)},OM.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},OM.prototype.getProgressive=function(){return this.get("progressive")},OM.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},OM.prototype.select=function(e,t){this._innerSelect(this.getData(t),e)},OM.prototype.unselect=function(e,t){var n=this.option.selectedMap;if(n){var r=this.option.selectedMode,i=this.getData(t);if("series"===r||"all"===n)this.option.selectedMap={},this._selectedDataIndicesMap={};else for(var o=0;o<e.length;o++){var a=EM(i,e[o]);n[a]=!1,this._selectedDataIndicesMap[a]=-1}}},OM.prototype.toggleSelect=function(e,t){for(var n=[],r=0;r<e.length;r++)n[0]=e[r],this.isSelected(e[r],t)?this.unselect(n,t):this.select(n,t)},OM.prototype.getSelectedDataIndices=function(){if("all"===this.option.selectedMap)return[].slice.call(this.getData().getIndices());for(var e=this._selectedDataIndicesMap,t=Xw.E(e),n=[],r=0;r<t.length;r++){var i=e[t[r]];0<=i&&n.push(i)}return n},OM.prototype.isSelected=function(e,t){var n=this.option.selectedMap;return!!n&&(t=this.getData(t),("all"===n||n[EM(t,e)])&&!t.getItemModel(e).get(["select","disabled"]))},OM.prototype.isUniversalTransitionEnabled=function(){var e;return!!this[_M]||!!(e=this.option.universalTransition)&&(!0===e||e&&e.enabled)},OM.prototype._innerSelect=function(e,t){var n=this.option,r=n.selectedMode,i=t.length;if(r&&i)if("series"===r)n.selectedMap="all";else if("multiple"===r){Xw.z(n.selectedMap)||(n.selectedMap={});for(var o=n.selectedMap,a=0;a<i;a++){var s,u=t[a];o[s=EM(e,u)]=!0,this._selectedDataIndicesMap[s]=e.getRawIndex(u)}}else"single"!==r&&!0!==r||(s=EM(e,r=t[i-1]),n.selectedMap=((n={})[s]=!0,n),this._selectedDataIndicesMap=((n={})[s]=e.getRawIndex(r),n))},OM.prototype._initSelectedMapFromData=function(e){var t;this.option.selectedMap||(t=[],e.hasItemOption&&e.each((function(n){var r=e.getRawDataItem(n);r&&r.selected&&t.push(n)})),0<t.length&&this._innerSelect(e,t))},OM.registerClass=function(e){return jD.registerClass(e)},OM.protoInitialize=((ia=OM.prototype).type="series.__base__",ia.seriesIndex=0,ia.ignoreStyleOnData=!1,ia.hasSymbolVisual=!1,ia.defaultSymbol="circle",ia.visualStyleAccessPath="itemStyle",void(ia.visualDrawType="fill")),Ga=OM;function OM(){var e=null!==SM&&SM.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}function TM(e){var t,n,r=e.name;RE(e)||(e.name=(e=(t=(e=e).getRawData()).mapDimensionsAll("seriesName"),n=[],Xw.k(e,(function(e){(e=t.getDimensionInfo(e)).displayName&&n.push(e.displayName)})),n.join(" ")||r))}function DM(e){return e.model.getRawData().count()}function BM(e){return(e=e.model).setData(e.getRawData().cloneShallow()),IM}function IM(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function MM(e,t){Xw.k(Xw.e(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),(function(n){e.wrapMethod(n,Xw.h(jM,t))}))}function jM(e,t){return(e=NM(e))&&e.setOutputEnd((t||this).count()),t}function NM(e){var t,n;if(n=(n=(e.ecModel||{}).scheduler)&&n.getPipeline(e.uid))return(n=n.currentTask)&&(t=n.agentStubMap)?t.get(e.uid):n}Xw.I(Ga,ha),Xw.I(Ga,oB),JE(Ga,jD);var FM=Ga;function RM(){this.group=new cE,this.uid=IT("viewComponent")}XE(Ko=(RM.prototype.init=function(e,t){},RM.prototype.render=function(e,t,n,r){},RM.prototype.dispose=function(e,t){},RM.prototype.updateView=function(e,t,n,r){},RM.prototype.updateLayout=function(e,t,n,r){},RM.prototype.updateVisual=function(e,t,n,r){},RM.prototype.toggleBlurSeries=function(e,t,n){},RM.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},RM)),tS(Ko);var PM=Ko;function LM(){var e=UE();return function(t){var n=e(t),r=(t=t.pipelineContext,!!n.large),i=!!n.progressiveRender,o=n.large=!(!t||!t.large);n=n.progressiveRender=!(!t||!t.progressiveRender);return!(r==o&&i==n)&&"reset"}}var UM=i_.CMD,zM=[[],[],[]],HM=Math.sqrt,$M=Math.atan2;function QM(e,t){if(t){for(var n,r,i,o,a=e.data,s=e.len(),u=UM.M,c=UM.C,l=UM.L,h=UM.R,f=UM.A,d=UM.Q,p=0,m=0;p<s;){switch(n=a[p++],m=p,r=0,n){case u:case l:r=1;break;case c:r=3;break;case d:r=2;break;case f:var g=t[4],A=t[5],v=HM(t[0]*t[0]+t[1]*t[1]),b=HM(t[2]*t[2]+t[3]*t[3]),y=$M(-t[1]/b,t[0]/v);a[p]*=v,a[p++]+=g,a[p]*=b,a[p++]+=A,a[p++]*=v,a[p++]*=b,a[p++]+=y,a[p++]+=y,m=p+=2;break;case h:o[0]=a[p++],o[1]=a[p++],sx(o,o,t),a[m++]=o[0],a[m++]=o[1],o[0]+=a[p++],o[1]+=a[p++],sx(o,o,t),a[m++]=o[0],a[m++]=o[1]}for(i=0;i<r;i++){var w=zM[i];w[0]=a[p++],w[1]=a[p++],sx(w,w,t),a[m++]=w[0],a[m++]=w[1]}}e.increaseVersion()}}var VM=Math.sqrt,qM=Math.sin,GM=Math.cos,WM=Math.PI;function KM(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function YM(e,t){return(e[0]*t[0]+e[1]*t[1])/(KM(e)*KM(t))}function XM(e,t){return(e[0]*t[1]<e[1]*t[0]?-1:1)*Math.acos(YM(e,t))}function JM(e,t,n,r,i,o,a,s,u,c,l){var h=GM(u=u*(WM/180))*(e-n)/2+qM(u)*(t-r)/2,f=-1*qM(u)*(e-n)/2+GM(u)*(t-r)/2,d=(i=(d=(1<(d=h*h/(a*a)+f*f/(s*s))&&(a*=VM(d),s*=VM(d)),(i===o?-1:1)*VM((a*a*(s*s)-a*a*(f*f)-s*s*(h*h))/(a*a*(f*f)+s*s*(h*h)))||0))*a*f/s,d*-s*h/a);e=(e+n)/2+GM(u)*i-qM(u)*d,n=(t+r)/2+qM(u)*i+GM(u)*d,t=XM([1,0],[(h-i)/a,(f-d)/s]),i=XM(r=[(h-i)/a,(f-d)/s],h=[(-1*h-i)/a,(-1*f-d)/s]);YM(r,h)<=-1&&(i=WM),(i=1<=YM(r,h)?0:i)<0&&(f=Math.round(i/WM*1e6)/1e6,i=2*WM+f%2*WM),l.addData(c,e,n,a,s,t,i,u,o)}var ZM=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,ej=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;Zw(rj,tj=C_),rj.prototype.applyTransform=function(e){};var tj,nj=rj;function rj(){return null!==tj&&tj.apply(this,arguments)||this}function ij(e){return null!=e.setData}function oj(e,t){var n=function(e){var t=new i_;if(e){var n,r=0,i=0,o=r,a=i,s=i_.CMD,u=e.match(ZM);if(u){for(var c=0;c<u.length;c++){for(var l=u[c],h=l.charAt(0),f=void 0,d=l.match(ej)||[],p=d.length,m=0;m<p;m++)d[m]=parseFloat(d[m]);for(var g=0;g<p;){var A=void 0,v=void 0,b=void 0,y=void 0,w=void 0,x=void 0,C=void 0,k=r,E=i,S=void 0,_=void 0;switch(h){case"l":r+=d[g++],i+=d[g++],f=s.L,t.addData(f,r,i);break;case"L":r=d[g++],i=d[g++],f=s.L,t.addData(f,r,i);break;case"m":r+=d[g++],i+=d[g++],f=s.M,t.addData(f,r,i),o=r,a=i,h="l";break;case"M":r=d[g++],i=d[g++],f=s.M,t.addData(f,r,i),o=r,a=i,h="L";break;case"h":r+=d[g++],f=s.L,t.addData(f,r,i);break;case"H":r=d[g++],f=s.L,t.addData(f,r,i);break;case"v":i+=d[g++],f=s.L,t.addData(f,r,i);break;case"V":i=d[g++],f=s.L,t.addData(f,r,i);break;case"C":f=s.C,t.addData(f,d[g++],d[g++],d[g++],d[g++],d[g++],d[g++]),r=d[g-2],i=d[g-1];break;case"c":f=s.C,t.addData(f,d[g++]+r,d[g++]+i,d[g++]+r,d[g++]+i,d[g++]+r,d[g++]+i),r+=d[g-2],i+=d[g-1];break;case"S":A=r,v=i,S=t.len(),_=t.data,n===s.C&&(A+=r-_[S-4],v+=i-_[S-3]),f=s.C,k=d[g++],E=d[g++],r=d[g++],i=d[g++],t.addData(f,A,v,k,E,r,i);break;case"s":A=r,v=i,S=t.len(),_=t.data,n===s.C&&(A+=r-_[S-4],v+=i-_[S-3]),f=s.C,k=r+d[g++],E=i+d[g++],r+=d[g++],i+=d[g++],t.addData(f,A,v,k,E,r,i);break;case"Q":k=d[g++],E=d[g++],r=d[g++],i=d[g++],f=s.Q,t.addData(f,k,E,r,i);break;case"q":k=d[g++]+r,E=d[g++]+i,r+=d[g++],i+=d[g++],f=s.Q,t.addData(f,k,E,r,i);break;case"T":A=r,v=i,S=t.len(),_=t.data,n===s.Q&&(A+=r-_[S-4],v+=i-_[S-3]),r=d[g++],i=d[g++],f=s.Q,t.addData(f,A,v,r,i);break;case"t":A=r,v=i,S=t.len(),_=t.data,n===s.Q&&(A+=r-_[S-4],v+=i-_[S-3]),r+=d[g++],i+=d[g++],f=s.Q,t.addData(f,A,v,r,i);break;case"A":b=d[g++],y=d[g++],w=d[g++],x=d[g++],C=d[g++],JM(k=r,E=i,r=d[g++],i=d[g++],x,C,b,y,w,f=s.A,t);break;case"a":b=d[g++],y=d[g++],w=d[g++],x=d[g++],C=d[g++],JM(k=r,E=i,r+=d[g++],i+=d[g++],x,C,b,y,w,f=s.A,t)}}"z"!==h&&"Z"!==h||(f=s.Z,t.addData(f),r=o,i=a),n=f}t.toStatic()}}return t}(e);return(e=Object(Xw.m)({},t)).buildPath=function(e){var t;ij(e)?(e.setData(n.data),(t=e.getContext())&&e.rebuildPath(t,1)):n.rebuildPath(t=e,1)},e.applyTransform=function(e){QM(n,e),this.dirtyShape()},e}function aj(e,t){t=t||{};var n=new C_;return e.shape&&n.setShape(e.shape),n.setStyle(e.style),t.bakeTransform?QM(n.path,e.getComputedTransform()):t.toLocal?n.setLocalTransform(e.getComputedTransform()):n.copyTransform(e),n.buildPath=e.buildPath,n.applyTransform=n.applyTransform,n.z=e.z,n.z2=e.z2,n.zlevel=e.zlevel,n}var sj,uj=function(){this.cx=0,this.cy=0,this.r=0};function cj(e){return sj.call(this,e)||this}(aa=(Zw(cj,sj=C_),cj.prototype.getDefaultShape=function(){return new uj},cj.prototype.buildPath=function(e,t){e.moveTo(t.cx+t.r,t.cy),e.arc(t.cx,t.cy,t.r,0,2*Math.PI)},cj)).prototype.type="circle";var lj,hj=aa,fj=function(){this.cx=0,this.cy=0,this.rx=0,this.ry=0};function dj(e){return lj.call(this,e)||this}(Ua=(Zw(dj,lj=C_),dj.prototype.getDefaultShape=function(){return new fj},dj.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=t.rx,o=.5522848*i,a=.5522848*(t=t.ry);e.moveTo(n-i,r),e.bezierCurveTo(n-i,r-a,n-o,r-t,n,r-t),e.bezierCurveTo(n+o,r-t,n+i,r-a,n+i,r),e.bezierCurveTo(n+i,r+a,n+o,r+t,n,r+t),e.bezierCurveTo(n-o,r+t,n-i,r+a,n-i,r),e.closePath()},dj)).prototype.type="ellipse";var pj=Ua,mj=Math.PI,gj=2*mj,Aj=Math.sin,vj=Math.cos,bj=Math.acos,yj=Math.atan2,wj=Math.abs,xj=Math.sqrt,Cj=Math.max,kj=Math.min,Ej=1e-4;function Sj(e,t,n,r,i,o,a){var s,u,c=(a=(a?o:-o)/xj((l=e-n)*l+(c=t-r)*c))*c,l=(a=-a*l,e+c),h=(e=t+a,t=n+c,n=r+a,r=(l+t)/2,(e+n)/2),f=t-l,d=(t=((l=l*n-t*e)*(s=n-e)-f*(n=(s<0?-1:1)*xj(Cj(0,(o=i-o)*o*(u=f*f+s*s)-l*l))))/u,e=(-l*f-s*n)/u,(l*s+f*n)/u);l=(-l*f+s*n)/u;return(n=d-r)*n+(u=l-h)*u<(f=t-r)*f+(s=e-h)*s&&(t=d,e=l),{cx:t,cy:e,x0:-c,y0:-a,x1:t*(i/o-1),y1:e*(i/o-1)}}var _j,Oj=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0,this.cornerRadius=0};function Tj(e){return _j.call(this,e)||this}(Ea=(Zw(Tj,_j=C_),Tj.prototype.getDefaultShape=function(){return new Oj},Tj.prototype.buildPath=function(e,t){!function(e,t){var n,r,i,o,a,s,u,c,l,h,f,d,p,m,g,A,v,b,y,w,x,C,k,E,S,_,O,T,D,B,I=Cj(t.r,0),M=Cj(t.r0||0,0),j=0<I;(j||0<M)&&(j||(I=M,M=0),I<M&&(j=I,I=M,M=j),j=t.startAngle,n=t.endAngle,isNaN(j)||isNaN(n)||(r=t.cx,i=t.cy,o=!!t.clockwise,A=wj(n-j),Ej<(a=gj<A&&A%gj)&&(A=a),Ej<I?gj-Ej<A?(e.moveTo(r+I*vj(j),i+I*Aj(j)),e.arc(r,i,I,j,n,!o),Ej<M&&(e.moveTo(r+M*vj(n),i+M*Aj(n)),e.arc(r,i,M,n,j,o))):(C=x=w=y=b=v=h=l=_=S=E=k=c=u=s=a=void 0,f=I*vj(j),d=I*Aj(j),p=M*vj(n),m=M*Aj(n),(g=Ej<A)&&((t=t.cornerRadius)&&(a=(t=function(e){if(Object(Xw.s)(e)){var t=e.length;if(!t)return e;t=1===t?[e[0],e[0],0,0]:2===t?[e[0],e[0],e[1],e[1]]:3===t?e.concat(e[2]):e}else t=[e,e,e,e];return t}(t))[0],s=t[1],u=t[2],c=t[3]),t=wj(I-M)/2,k=kj(t,u),E=kj(t,c),S=kj(t,a),_=kj(t,s),v=l=Cj(k,E),b=h=Cj(S,_),(Ej<l||Ej<h)&&(y=I*vj(n),w=I*Aj(n),x=M*vj(j),C=M*Aj(j),A<mj&&(t=function(e,t,n,r,i,o,a,s){var u=(s-=o)*(n-=e)-(a-=i)*(r-=t);if(!(u*u<Ej))return[e+(u=(a*(t-o)-s*(e-i))/u)*n,t+u*r]}(f,d,x,C,y,w,p,m))&&(k=f-t[0],E=d-t[1],S=y-t[0],_=w-t[1],A=1/Aj(bj((k*S+E*_)/(xj(k*k+E*E)*xj(S*S+_*_)))/2),k=xj(t[0]*t[0]+t[1]*t[1]),v=kj(l,(I-k)/(1+A)),b=kj(h,(M-k)/(A-1))))),g?Ej<v?(O=kj(u,v),T=kj(c,v),D=Sj(x,C,f,d,I,O,o),B=Sj(y,w,p,m,I,T,o),e.moveTo(r+D.cx+D.x0,i+D.cy+D.y0),v<l&&O===T?e.arc(r+D.cx,i+D.cy,v,yj(D.y0,D.x0),yj(B.y0,B.x0),!o):(0<O&&e.arc(r+D.cx,i+D.cy,O,yj(D.y0,D.x0),yj(D.y1,D.x1),!o),e.arc(r,i,I,yj(D.cy+D.y1,D.cx+D.x1),yj(B.cy+B.y1,B.cx+B.x1),!o),0<T&&e.arc(r+B.cx,i+B.cy,T,yj(B.y1,B.x1),yj(B.y0,B.x0),!o))):(e.moveTo(r+f,i+d),e.arc(r,i,I,j,n,!o)):e.moveTo(r+f,i+d),Ej<M&&g?Ej<b?(O=kj(a,b),D=Sj(p,m,y,w,M,-(T=kj(s,b)),o),B=Sj(f,d,x,C,M,-O,o),e.lineTo(r+D.cx+D.x0,i+D.cy+D.y0),b<h&&O===T?e.arc(r+D.cx,i+D.cy,b,yj(D.y0,D.x0),yj(B.y0,B.x0),!o):(0<T&&e.arc(r+D.cx,i+D.cy,T,yj(D.y0,D.x0),yj(D.y1,D.x1),!o),e.arc(r,i,M,yj(D.cy+D.y1,D.cx+D.x1),yj(B.cy+B.y1,B.cx+B.x1),o),0<O&&e.arc(r+B.cx,i+B.cy,O,yj(B.y1,B.x1),yj(B.y0,B.x0),!o))):(e.lineTo(r+p,i+m),e.arc(r,i,M,n,j,o)):e.lineTo(r+p,i+m)):e.moveTo(r,i),e.closePath()))}(e,t)},Tj.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},Tj)).prototype.type="sector";var Dj,Bj=Ea,Ij=function(){this.cx=0,this.cy=0,this.r=0,this.r0=0};function Mj(e){return Dj.call(this,e)||this}(Wa=(Zw(Mj,Dj=C_),Mj.prototype.getDefaultShape=function(){return new Ij},Mj.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=2*Math.PI;e.moveTo(n+t.r,r),e.arc(n,r,t.r,0,i,!1),e.moveTo(n+t.r0,r),e.arc(n,r,t.r0,0,i,!0)},Mj)).prototype.type="ring";var jj=Wa;function Nj(e,t,n){var r=t.smooth,i=t.points;if(i&&2<=i.length){if(r)for(var o=function(e,t,n,r){var i,o,a=[],s=[],u=[],c=[];if(r){for(var l=[1/0,1/0],h=[-1/0,-1/0],f=0,d=e.length;f<d;f++)ux(l,l,e[f]),cx(h,h,e[f]);ux(l,l,r[0]),cx(h,h,r[1])}var p;for(f=0,d=e.length;f<d;f++){var m=e[f];if(n)i=e[f?f-1:d-1],o=e[(f+1)%d];else{if(0===f||f===d-1){a.push([(p=e[f])[0],p[1]]);continue}i=e[f-1],o=e[f+1]}A=i,(g=s)[0]=(p=o)[0]-A[0],g[1]=p[1]-A[1],nx(s,s,t);var g=rx(m,i),A=rx(m,o),v=(0!==(v=g+A)&&(g/=v,A/=v),nx(u,s,-g),nx(c,s,A),tx([],m,u));g=tx([],m,c);r&&(cx(v,v,l),ux(v,v,h),cx(g,g,l),ux(g,g,h)),a.push(v),a.push(g)}return n&&a.push(a.shift()),a}(i,r,n,t.smoothConstraint),a=(e.moveTo(i[0][0],i[0][1]),i.length),s=0;s<(n?a:a-1);s++){var u=o[2*s],c=o[2*s+1],l=i[(s+1)%a];e.bezierCurveTo(u[0],u[1],c[0],c[1],l[0],l[1])}else{e.moveTo(i[0][0],i[0][1]);s=1;for(var h=i.length;s<h;s++)e.lineTo(i[s][0],i[s][1])}n&&e.closePath()}}var Fj,Rj=function(){this.points=null,this.smooth=0,this.smoothConstraint=null};function Pj(e){return Fj.call(this,e)||this}(Ca=(Zw(Pj,Fj=C_),Pj.prototype.getDefaultShape=function(){return new Rj},Pj.prototype.buildPath=function(e,t){Nj(e,t,!0)},Pj)).prototype.type="polygon";var Lj,Uj=Ca,zj=function(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null};function Hj(e){return Lj.call(this,e)||this}($o=(Zw(Hj,Lj=C_),Hj.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},Hj.prototype.getDefaultShape=function(){return new zj},Hj.prototype.buildPath=function(e,t){Nj(e,t,!1)},Hj)).prototype.type="polyline";var $j,Qj=$o,Vj={},qj=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1};function Gj(e){return $j.call(this,e)||this}(fa=(Zw(Gj,$j=C_),Gj.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},Gj.prototype.getDefaultShape=function(){return new qj},Gj.prototype.buildPath=function(e,t){var n,r,i,o;o=(this.subPixelOptimize?(n=(o=M_(Vj,t,this.style)).x1,r=o.y1,i=o.x2,o):(n=t.x1,r=t.y1,i=t.x2,t)).y2,0!==(t=t.percent)&&(e.moveTo(n,r),t<1&&(i=n*(1-t)+i*t,o=r*(1-t)+o*t),e.lineTo(i,o))},Gj.prototype.pointAt=function(e){var t=this.shape;return[t.x1*(1-e)+t.x2*e,t.y1*(1-e)+t.y2*e]},Gj)).prototype.type="line";var Wj,Kj=fa,Yj=[],Xj=function(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1};function Jj(e,t,n){var r=e.cpx2,i=e.cpy2;return null!=r||null!=i?[(n?MC:IC)(e.x1,e.cpx1,e.cpx2,e.x2,t),(n?MC:IC)(e.y1,e.cpy1,e.cpy2,e.y2,t)]:[(n?LC:PC)(e.x1,e.cpx1,e.x2,t),(n?LC:PC)(e.y1,e.cpy1,e.y2,t)]}function Zj(e){return Wj.call(this,e)||this}Zw(Zj,Wj=C_),Zj.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},Zj.prototype.getDefaultShape=function(){return new Xj},Zj.prototype.buildPath=function(e,t){var n=t.x1,r=t.y1,i=t.x2,o=t.y2,a=t.cpx1,s=t.cpy1,u=t.cpx2,c=t.cpy2;0!==(t=t.percent)&&(e.moveTo(n,r),null==u||null==c?(t<1&&(zC(n,a,i,t,Yj),a=Yj[1],i=Yj[2],zC(r,s,o,t,Yj),s=Yj[1],o=Yj[2]),e.quadraticCurveTo(a,s,i,o)):(t<1&&(FC(n,a,u,i,t,Yj),a=Yj[1],u=Yj[2],i=Yj[3],FC(r,s,c,o,t,Yj),s=Yj[1],c=Yj[2],o=Yj[3]),e.bezierCurveTo(a,s,u,c,i,o)))},Zj.prototype.pointAt=function(e){return Jj(this.shape,e,!1)},Zj.prototype.tangentAt=function(e){var t,n;return 0===(n=function(e){return Math.sqrt(function(e){return e[0]*e[0]+e[1]*e[1]}(e))}(t=e=e=Jj(this.shape,e,!0)))?(e[0]=0,e[1]=0):(e[0]=t[0]/n,e[1]=t[1]/n),e},(na=Zj).prototype.type="bezier-curve";var eN,tN=na,nN=function(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0};function rN(e){return eN.call(this,e)||this}(Ka=(Zw(rN,eN=C_),rN.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},rN.prototype.getDefaultShape=function(){return new nN},rN.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.max(t.r,0),o=t.startAngle,a=t.endAngle,s=(t=t.clockwise,Math.cos(o)),u=Math.sin(o);e.moveTo(s*i+n,u*i+r),e.arc(n,r,i,o,a,!t)},rN)).prototype.type="arc";var iN,oN=Ka;function aN(){var e=null!==iN&&iN.apply(this,arguments)||this;return e.type="compound",e}Zw(aN,iN=C_),aN.prototype._updatePathDirty=function(){for(var e=this.shape.paths,t=this.shapeChanged(),n=0;n<e.length;n++)t=t||e[n].shapeChanged();t&&this.dirtyShape()},aN.prototype.beforeBrush=function(){this._updatePathDirty();for(var e=this.shape.paths||[],t=this.getGlobalScale(),n=0;n<e.length;n++)e[n].path||e[n].createPathProxy(),e[n].path.setScale(t[0],t[1],e[n].segmentIgnoreThreshold)},aN.prototype.buildPath=function(e,t){for(var n=t.paths||[],r=0;r<n.length;r++)n[r].buildPath(e,n[r].shape,!0)},aN.prototype.afterBrush=function(){for(var e=this.shape.paths||[],t=0;t<e.length;t++)e[t].pathUpdated()},aN.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),C_.prototype.getBoundingRect.call(this)};var sN,uN=aN;function cN(e){this.colorStops=e||[]}function lN(e,t,n,r,i,o){return(i=sN.call(this,i)||this).x=null==e?0:e,i.y=null==t?0:t,i.x2=null==n?1:n,i.y2=null==r?0:r,i.type="linear",i.global=o||!1,i}cN.prototype.addColorStop=function(e,t){this.colorStops.push({offset:e,color:t})},Zw(lN,sN=Zo=cN);var hN,fN=lN;function dN(e,t,n,r,i){return(r=hN.call(this,r)||this).x=null==e?.5:e,r.y=null==t?.5:t,r.r=null==n?.5:n,r.type="radial",r.global=i||!1,r}Zw(dN,hN=Zo);var pN=dN,mN=[0,0],gN=[0,0],AN=new $x,vN=new $x;function bN(e,t){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new $x;for(n=0;n<2;n++)this._axes[n]=new $x;e&&this.fromBoundingRect(e,t)}bN.prototype.fromBoundingRect=function(e,t){var n=this._corners,r=this._axes,i=e.x,o=e.y,a=i+e.width;e=o+e.height;if(n[0].set(i,o),n[1].set(a,o),n[2].set(a,e),n[3].set(i,e),t)for(var s=0;s<4;s++)n[s].transform(t);for($x.sub(r[0],n[1],n[0]),$x.sub(r[1],n[3],n[0]),r[0].normalize(),r[1].normalize(),s=0;s<2;s++)this._origin[s]=r[s].dot(n[0])},bN.prototype.intersect=function(e,t){var n=!0,r=!t;return AN.set(1/0,1/0),vN.set(0,0),!this._intersectCheckOneSide(this,e,AN,vN,r,1)&&(n=!1,r)||!this._intersectCheckOneSide(e,this,AN,vN,r,-1)&&(n=!1,r)||r||$x.copy(t,n?AN:vN),n},bN.prototype._intersectCheckOneSide=function(e,t,n,r,i,o){for(var a=!0,s=0;s<2;s++){var u=this._axes[s];if(this._getProjMinMaxOnAxis(s,e._corners,mN),this._getProjMinMaxOnAxis(s,t._corners,gN),mN[1]<gN[0]||gN[1]<mN[0]){if(a=!1,i)return a;var c=Math.abs(gN[0]-mN[1]),l=Math.abs(mN[0]-gN[1]);Math.min(c,l)>r.len()&&(c<l?$x.scale(r,u,-c*o):$x.scale(r,u,l*o))}else n&&(c=Math.abs(gN[0]-mN[1]),l=Math.abs(mN[0]-gN[1]),Math.min(c,l)<n.len()&&(c<l?$x.scale(n,u,c*o):$x.scale(n,u,-l*o)))}return a},bN.prototype._getProjMinMaxOnAxis=function(e,t,n){for(var r=this._axes[e],i=this._origin,o=t[0].dot(r)+i[e],a=o,s=o,u=1;u<t.length;u++){var c=t[u].dot(r)+i[e];a=Math.min(c,a),s=Math.max(c,s)}n[0]=a,n[1]=s};var yN,wN=bN,xN=[];function CN(){var e=null!==yN&&yN.apply(this,arguments)||this;return e.notClear=!0,e.incremental=!0,e._displayables=[],e._temporaryDisplayables=[],e._cursor=0,e}Zw(CN,yN=_S),CN.prototype.traverse=function(e,t){e.call(t,this)},CN.prototype.useStyle=function(){this.style={}},CN.prototype.getCursor=function(){return this._cursor},CN.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},CN.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},CN.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},CN.prototype.addDisplayable=function(e,t){(t?this._temporaryDisplayables:this._displayables).push(e),this.markRedraw()},CN.prototype.addDisplayables=function(e,t){t=t||!1;for(var n=0;n<e.length;n++)this.addDisplayable(e[n],t)},CN.prototype.getDisplayables=function(){return this._displayables},CN.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},CN.prototype.eachPendingDisplayable=function(e){for(var t=this._cursor;t<this._displayables.length;t++)e&&e(this._displayables[t]);for(t=0;t<this._temporaryDisplayables.length;t++)e&&e(this._temporaryDisplayables[t])},CN.prototype.update=function(){this.updateTransform();for(var e=this._cursor;e<this._displayables.length;e++)(t=this._displayables[e]).parent=this,t.update(),t.parent=null;var t;for(e=0;e<this._temporaryDisplayables.length;e++)(t=this._temporaryDisplayables[e]).parent=this,t.update(),t.parent=null},CN.prototype.getBoundingRect=function(){if(!this._rect){for(var e=new Zx(1/0,1/0,-1/0,-1/0),t=0;t<this._displayables.length;t++){var n=this._displayables[t],r=n.getBoundingRect().clone();n.needLocalTransform()&&r.applyTransform(n.getLocalTransform(xN)),e.union(r)}this._rect=e}return this._rect},CN.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t);if(this.getBoundingRect().contain(n[0],n[1]))for(var r=0;r<this._displayables.length;r++)if(this._displayables[r].contain(e,t))return!0;return!1};var kN=CN,EN=Math.max,SN=Math.min,_N={};function ON(e){return C_.extend(e)}function TN(e,t){return function(e,t){var n,r=oj(e,t);function i(e){return(e=n.call(this,e)||this).applyTransform=r.applyTransform,e.buildPath=r.buildPath,e}return Zw(i,n=nj),i}(e,t)}function DN(e,t){_N[e]=t}function BN(e){if(_N.hasOwnProperty(e))return _N[e]}function IN(e,t,n,r){return e=new nj(oj(e,t)),n&&("center"===r&&(n=jN(n,e.getBoundingRect())),FN(e,n)),e}function MN(e,t,n){var r=new B_({style:{image:e,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(e){"center"===n&&(e={width:e.width,height:e.height},r.setStyle(jN(t,e)))}});return r}function jN(e,t){t=t.width/t.height;var n=e.height*t;t=n<=e.width?e.height:(n=e.width)/t;return{x:e.x+e.width/2-n/2,y:e.y+e.height/2-t/2,width:n,height:t}}var NN=function(e,t){for(var n=[],r=e.length,i=0;i<r;i++){var o=e[i];n.push(o.getUpdatedPathProxy(!0))}return(t=new C_(t)).createPathProxy(),t.buildPath=function(e){var t;ij(e)&&(e.appendPath(n),(t=e.getContext())&&e.rebuildPath(t,1))},t};function FN(e,t){e.applyTransform&&(t=e.getBoundingRect().calculateTransform(t),e.applyTransform(t))}function RN(e,t){return M_(e,e,{lineWidth:t}),e}function PN(e){return j_(e.shape,e.shape,e.style),e}var LN=N_;function UN(e,t){for(var n=Rx([]);e&&e!==t;)Px(n,e.getLocalTransform(),n),e=e.parent;return n}function zN(e,t,n){return t&&!Object(Xw.t)(t)&&(t=Uk.getLocalTransform(t)),sx([],e,t=n?zx([],t):t)}function HN(e,t,n){var r=0===t[4]||0===t[5]||0===t[0]?1:Math.abs(2*t[4]/t[0]),i=0===t[4]||0===t[5]||0===t[2]?1:Math.abs(2*t[4]/t[2]);r=zN(["left"===e?-r:"right"===e?r:0,"top"===e?-i:"bottom"===e?i:0],t,n);return Math.abs(r[0])>Math.abs(r[1])?0<r[0]?"right":"left":0<r[1]?"bottom":"top"}function $N(e){return!e.isGroup}function QN(e,t,n){var r,i;function o(e){var t={x:e.x,y:e.y,rotation:e.rotation};return null!=e.shape&&(t.shape=Object(Xw.m)({},e.shape)),t}e&&t&&(i={},e.traverse((function(e){$N(e)&&e.anid&&(i[e.anid]=e)})),r=i,t.traverse((function(e){var t,i;$N(e)&&e.anid&&(t=r[e.anid])&&(i=o(e),e.attr(o(t)),tT(e,i,n,rO(e).dataIndex))})))}function VN(e,t){return Object(Xw.G)(e,(function(e){var n=e[0];n=EN(n,t.x),n=SN(n,t.x+t.width),e=e[1],e=EN(e,t.y);return[n,SN(e,t.y+t.height)]}))}function qN(e,t){var n=EN(e.x,t.x),r=SN(e.x+e.width,t.x+t.width),i=EN(e.y,t.y);e=SN(e.y+e.height,t.y+t.height);if(n<=r&&i<=e)return{x:n,y:i,width:r-n,height:e-i}}function GN(e,t,n){var r=(t=Object(Xw.m)({rectHover:!0},t)).style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},e)return 0===e.indexOf("image://")?(r.image=e.slice(8),Object(Xw.i)(r,n),new B_(t)):IN(e.replace("path://",""),t,n,"center")}function WN(e,t,n,r,i){for(var o=0,a=i[i.length-1];o<i.length;o++){var s=i[o];if(KN(e,t,n,r,s[0],s[1],a[0],a[1]))return!0;a=s}}function KN(e,t,n,r,i,o,a,s){var u,c=(a=a-i)*(r=r-t)-(n=n-e)*(s=s-o);return!((u=c)<=1e-6&&-1e-6<=u||(i=((u=e-i)*r-n*(e=t-o))/c)<0||1<i||(r=(u*s-a*e)/c)<0||1<r)}function YN(e){var t=e.itemTooltipOption,n=e.componentModel,r=e.itemName,i=(t=Object(Xw.B)(t)?{formatter:t}:t,n.mainType),o=(n=n.componentIndex,{componentType:i,name:r,$vars:["name"]}),a=(o[i+"Index"]=n,e.formatterParamsExtra);(e=(a&&Object(Xw.k)(Object(Xw.E)(a),(function(e){Object(Xw.p)(o,e)||(o[e]=a[e],o.$vars.push(e))})),rO(e.el))).componentMainType=i,e.componentIndex=n,e.tooltipConfig={name:r,option:Object(Xw.i)({content:r,formatterParams:o},t)}}function XN(e,t){var n;(n=e.isGroup?t(e):n)||e.traverse(t)}function JN(e,t){if(e)if(Object(Xw.s)(e))for(var n=0;n<e.length;n++)XN(e[n],t);else XN(e,t)}DN("circle",hj),DN("ellipse",pj),DN("sector",Bj),DN("ring",jj),DN("polygon",Uj),DN("polyline",Qj),DN("rect",z_),DN("line",Kj),DN("bezierCurve",tN),DN("arc",oN);var ZN=UE(),eF=LM();function tF(){this.group=new cE,this.uid=IT("viewChart"),this.renderTask=vI({plan:iF,reset:oF}),this.renderTask.context={view:this}}function nF(e,t,n){e&&KO(e)&&("emphasis"===t?IO:MO)(e,n)}function rF(e,t,n){var r,i=LE(e,t),o=t&&null!=t.highlightKey?(t=t.highlightKey,r=null==(r=oO[t])&&iO<=32?oO[t]=iO++:r):null;null!=i?Object(Xw.k)(DE(i),(function(t){nF(e.getItemGraphicEl(t),n,o)})):e.eachItemGraphicEl((function(e){nF(e,n,o)}))}function iF(e){return eF(e.model)}function oF(e){var t=e.model,n=e.ecModel,r=e.api,i=e.payload,o=t.pipelineContext.progressiveRender,a=(e=e.view,i&&ZN(i).updateMethod);return"render"!==(o=o?"incrementalPrepareRender":a&&e[a]?a:"render")&&e[o](t,n,r,i),aF[o]}XE(So=(tF.prototype.init=function(e,t){},tF.prototype.render=function(e,t,n,r){},tF.prototype.highlight=function(e,t,n,r){(e=e.getData(r&&r.dataType))&&rF(e,r,"emphasis")},tF.prototype.downplay=function(e,t,n,r){(e=e.getData(r&&r.dataType))&&rF(e,r,"normal")},tF.prototype.remove=function(e,t){this.group.removeAll()},tF.prototype.dispose=function(e,t){},tF.prototype.updateView=function(e,t,n,r){this.render(e,t,n,r)},tF.prototype.updateLayout=function(e,t,n,r){this.render(e,t,n,r)},tF.prototype.updateVisual=function(e,t,n,r){this.render(e,t,n,r)},tF.prototype.eachRendered=function(e){JN(this.group,e)},tF.markUpdateMethod=function(e,t){ZN(e).updateMethod=t},tF.protoInitialize=void(tF.prototype.type="chart"),tF)),tS(So);var aF={incrementalPrepareRender:{progress:function(e,t){t.view.incrementalRender(e,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(e,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}},sF=So,uF="\0__throttleOriginMethod",cF="\0__throttleRate",lF="\0__throttleType";function hF(e,t,n){var r,i,o,a,s,u=0,c=0,l=null;function h(){c=(new Date).getTime(),l=null,e.apply(o,a||[])}function f(){for(var e=[],f=0;f<arguments.length;f++)e[f]=arguments[f];r=(new Date).getTime(),o=this,a=e;var d=s||t,p=s||n;s=null,i=r-(p?u:c)-d,clearTimeout(l),p?l=setTimeout(h,d):0<=i?h():l=setTimeout(h,-i),u=r}return t=t||0,f.clear=function(){l&&(clearTimeout(l),l=null)},f.debounceNextCall=function(e){s=e},f}function fF(e,t,n,r){var i=e[t];if(i){var o=i[uF]||i,a=i[lF];if(i[cF]!==n||a!==r){if(null==n||!r)return e[t]=o;(i=e[t]=hF(o,n,"debounce"===r))[uF]=o,i[lF]=r,i[cF]=n}}}function dF(e,t){var n=e[t];n&&n[uF]&&(n.clear&&n.clear(),e[t]=n[uF])}var pF=UE(),mF={itemStyle:nS($a,!0),lineStyle:nS(ra,!0)},gF={lineStyle:"stroke",itemStyle:"fill"};function AF(e,t){return(e=e.visualStyleMapper||mF[t])||mF.itemStyle}function vF(e,t){return(e=e.visualDrawType||gF[t])||"fill"}sa={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),r=e.visualStyleAccessPath||"itemStyle",i=e.getModel(r),o=AF(e,r)(i),a=((i=i.getShallow("decal"))&&(n.setVisual("decal",i),i.dirty=!0),vF(e,r)),s=(i=o[a],Object(Xw.v)(i)?i:null);r="auto"===o.fill||"auto"===o.stroke;if(o[a]&&!s&&!r||(i=e.getColorFromPalette(e.name,null,t.getSeriesCount()),o[a]||(o[a]=i,n.setVisual("colorFromPalette",!0)),o.fill="auto"===o.fill||Object(Xw.v)(o.fill)?i:o.fill,o.stroke="auto"===o.stroke||Object(Xw.v)(o.stroke)?i:o.stroke),n.setVisual("style",o),n.setVisual("drawType",a),!t.isSeriesFiltered(e)&&s)return n.setVisual("colorFromPalette",!1),{dataEach:function(t,n){var r=e.getDataParams(n),i=Object(Xw.m)({},o);i[a]=s(r),t.setItemVisual(n,"style",i)}}}};var bF=new DT,yF=(la={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n,r,i;if(!e.ignoreStyleOnData&&!t.isSeriesFiltered(e))return t=e.getData(),n=e.visualStyleAccessPath||"itemStyle",r=AF(e,n),i=t.getVisual("drawType"),{dataEach:t.hasItemOption?function(e,t){var o,a=e.getRawDataItem(t);a&&a[n]&&(bF.option=a[n],a=r(bF),o=e.ensureUniqueItemVisual(t,"style"),Object(Xw.m)(o,a),bF.option.decal&&(e.setItemVisual(t,"decal",bF.option.decal),bF.option.decal.dirty=!0),i in a&&e.setItemVisual(t,"colorFromPalette",!1))}:null}}},Zn={performRawSeries:!0,overallReset:function(e){var t=Object(Xw.f)();e.eachSeries((function(e){var n,r=e.getColorBy();e.isColorBySeries()||(r=e.type+"-"+r,(n=t.get(r))||t.set(r,n={}),pF(e).scope=n)})),e.eachSeries((function(t){var n,r,i,o,a,s;t.isColorBySeries()||e.isSeriesFiltered(t)||(n=t.getRawData(),r={},i=t.getData(),o=pF(t).scope,a=t.visualStyleAccessPath||"itemStyle",s=vF(t,a),i.each((function(e){var t=i.getRawIndex(e);r[t]=e})),n.each((function(e){var a,u=r[e];i.getItemVisual(u,"colorFromPalette")&&(u=i.ensureUniqueItemVisual(u,"style"),e=n.getName(e)||e+"",a=n.count(),u[s]=t.getColorFromPalette(e,o,a))})))}))}},Math.PI);function wF(e,t,n,r){this._stageTaskMap=Object(Xw.f)(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=n.concat(r)}function xF(e){e.overallReset(e.ecModel,e.api,e.payload)}function CF(e){return e.overallProgress&&kF}function kF(){this.agent.dirty(),this.getDownstream().dirty()}function EF(){this.agent&&this.agent.dirty()}function SF(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function _F(e){return e.useClearVisual&&e.data.clearAllVisual(),1<(e=e.resetDefines=DE(e.reset(e.model,e.ecModel,e.api,e.payload))).length?Object(Xw.G)(e,(function(e,t){return TF(t)})):OF}wF.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each((function(e){(e=e.overallTask)&&e.dirty()}))},wF.prototype.getPerformArgs=function(e,t){var n,r;if(e.__pipeline)return r=(n=this._pipelineMap.get(e.__pipeline.id)).context,{step:t=!t&&n.progressiveEnabled&&(!r||r.progressiveRender)&&e.__idxInPipeline>n.blockIndex?n.step:null,modBy:null!=(e=r&&r.modDataCount)?Math.ceil(e/t):null,modDataCount:e}},wF.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},wF.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid),r=e.getData().count(),i=(t=n.progressiveEnabled&&t.incrementalPrepareRender&&r>=n.threshold,e.get("large")&&r>=e.get("largeThreshold"));r="mod"===e.get("progressiveChunkMode")?r:null;e.pipelineContext=n.context={progressiveRender:t,modDataCount:r,large:i}},wF.prototype.restorePipelines=function(e){var t=this,n=t._pipelineMap=Object(Xw.f)();e.eachSeries((function(e){var r=e.getProgressive(),i=e.uid;n.set(i,{id:i,head:null,tail:null,threshold:e.getProgressiveThreshold(),progressiveEnabled:r&&!(e.preventIncremental&&e.preventIncremental()),blockIndex:-1,step:Math.round(r||700),count:0}),t._pipe(e,e.dataTask)}))},wF.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;Object(Xw.k)(this._allHandlers,(function(r){var i=e.get(r.uid)||e.set(r.uid,{});Object(Xw.b)(!(r.reset&&r.overallReset),""),r.reset&&this._createSeriesStageTask(r,i,t,n),r.overallReset&&this._createOverallStageTask(r,i,t,n)}),this)},wF.prototype.prepareView=function(e,t,n,r){var i=e.renderTask,o=i.context;o.model=t,o.ecModel=n,o.api=r,i.__block=!e.incrementalPrepareRender,this._pipe(t,i)},wF.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},wF.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},wF.prototype._performStageTasks=function(e,t,n,r){r=r||{};var i=!1,o=this;function a(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}Object(Xw.k)(e,(function(e,s){var u,c,l,h,f;r.visualType&&r.visualType!==e.visualType||(u=(c=o._stageTaskMap.get(e.uid)).seriesTaskMap,(c=c.overallTask)?((h=c.agentStubMap).each((function(e){a(r,e)&&(e.dirty(),l=!0)})),l&&c.dirty(),o.updatePayload(c,n),f=o.getPerformArgs(c,r.block),h.each((function(e){e.perform(f)})),c.perform(f)&&(i=!0)):u&&u.each((function(s,u){a(r,s)&&s.dirty();var c=o.getPerformArgs(s,r.block);c.skip=!e.performRawSeries&&t.isSeriesFiltered(s.context.model),o.updatePayload(s,n),s.perform(c)&&(i=!0)})))})),this.unfinished=i||this.unfinished},wF.prototype.performSeriesTasks=function(e){var t;e.eachSeries((function(e){t=e.dataTask.perform()||t})),this.unfinished=t||this.unfinished},wF.prototype.plan=function(){this._pipelineMap.each((function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}}while(t=t.getUpstream())}))},wF.prototype.updatePayload=function(e,t){"remain"!==t&&(e.context.payload=t)},wF.prototype._createSeriesStageTask=function(e,t,n,r){var i=this,o=t.seriesTaskMap,a=t.seriesTaskMap=Object(Xw.f)(),s=(t=e.seriesType,e.getTargetSeries);function u(t){var s=t.uid;(s=a.set(s,o&&o.get(s)||vI({plan:SF,reset:_F,count:DF}))).context={model:t,ecModel:n,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(t,s)}e.createOnAllSeries?n.eachRawSeries(u):t?n.eachRawSeriesByType(t,u):s&&s(n,r).each(u)},wF.prototype._createOverallStageTask=function(e,t,n,r){var i=this,o=t.overallTask=t.overallTask||vI({reset:xF}),a=(o.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:i},o.agentStubMap),s=o.agentStubMap=Object(Xw.f)(),u=(t=e.seriesType,e.getTargetSeries),c=!0,l=!1;function h(e){var t=e.uid;(t=s.set(t,a&&a.get(t)||(l=!0,vI({reset:CF,onDirty:EF})))).context={model:e,overallProgress:c},t.agent=o,t.__block=c,i._pipe(e,t)}Object(Xw.b)(!e.createOnAllSeries,""),t?n.eachRawSeriesByType(t,h):u?u(n,r).each(h):(c=!1,Object(Xw.k)(n.getSeries(),h)),l&&o.dirty()},wF.prototype._pipe=function(e,t){e=e.uid,(e=this._pipelineMap.get(e)).head||(e.head=t),e.tail&&e.tail.pipe(t),(e.tail=t).__idxInPipeline=e.count++,t.__pipeline=e},wF.wrapStageHandler=function(e,t){return(e=Object(Xw.v)(e)?{overallReset:e,seriesType:function(e){BF=null;try{e(IF,MF)}catch(e){}return BF}(e)}:e).uid=IT("stageHandler"),t&&(e.visualType=t),e},Bt=wF;var OF=TF(0);function TF(e){return function(t,n){var r=n.data,i=n.resetDefines[e];if(i&&i.dataEach)for(var o=t.start;o<t.end;o++)i.dataEach(r,o);else i&&i.progress&&i.progress(t,r)}}function DF(e){return e.data.count()}var BF,IF={},MF={};function jF(e,t){for(var n in t.prototype)e[n]=Xw.J}function NF(){return{axisLine:{lineStyle:{color:RF}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}}jF(IF,mB),jF(MF,pB),IF.eachSeriesByType=IF.eachRawSeriesByType=function(e){BF=e},IF.eachComponent=function(e){"series"===e.mainType&&e.subType&&(BF=e.subType)};var FF=Bt,RF=(La={color:Pa=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"],colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],Pa]},"#B9B8CE"),PF=(ja=((Qo={darkMode:!0,color:ko=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],backgroundColor:"#100C2A",axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:RF}},textStyle:{color:RF},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:RF}},dataZoom:{borderColor:"#71708A",textStyle:{color:RF},brushStyle:{color:"rgba(135,163,206,0.3)"},handleStyle:{color:"#353450",borderColor:"#C5CBE3"},moveHandleStyle:{color:"#B0B6C3",opacity:.3},fillerColor:"rgba(135,163,206,0.2)",emphasis:{handleStyle:{borderColor:"#91B7F2",color:"#4D587D"},moveHandleStyle:{color:"#636D9A",opacity:.7}},dataBackground:{lineStyle:{color:"#71708A",width:1},areaStyle:{color:"#71708A"}},selectedDataBackground:{lineStyle:{color:"#87A3CE"},areaStyle:{color:"#87A3CE"}}},visualMap:{textStyle:{color:RF}},timeline:{lineStyle:{color:RF},label:{color:RF},controlStyle:{color:RF,borderColor:RF}},calendar:{itemStyle:{color:"#100C2A"},dayLabel:{color:RF},monthLabel:{color:RF},yearLabel:{color:RF}},timeAxis:NF(),logAxis:NF(),valueAxis:NF(),categoryAxis:NF(),line:{symbol:"circle"},graph:{color:ko},gauge:{title:{color:RF},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:RF},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}}}).categoryAxis.splitLine.show=!1,Qo),LF.prototype.normalizeQuery=function(e){var t,n,r,i={},o={},a={};return Xw.B(e)?(t=YE(e),i.mainType=t.main||null,i.subType=t.sub||null):(n=["Index","Name","Id"],r={name:1,dataIndex:1,dataType:1},Xw.k(e,(function(e,t){for(var s=!1,u=0;u<n.length;u++){var c=n[u],l=t.lastIndexOf(c);0<l&&l===t.length-c.length&&"data"!==(l=t.slice(0,l))&&(i.mainType=l,i[c.toLowerCase()]=e,s=!0)}r.hasOwnProperty(t)&&(o[t]=e,s=!0),s||(a[t]=e)}))),{cptQuery:i,dataQuery:o,otherQuery:a}},LF.prototype.filter=function(e,t){var n,r,i,o,a,s=this.eventInfo;return!s||(n=s.targetEl,r=s.packedEvent,i=s.model,s=s.view,!i||!s||(o=t.cptQuery,a=t.dataQuery,u(o,i,"mainType")&&u(o,i,"subType")&&u(o,i,"index","componentIndex")&&u(o,i,"name")&&u(o,i,"id")&&u(a,r,"name")&&u(a,r,"dataIndex")&&u(a,r,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(e,t.otherQuery,n,r))));function u(e,t,n,r){return null==e[n]||t[r||n]===e[n]}},LF.prototype.afterTrigger=function(){this.eventInfo=null},LF);function LF(){}var UF=["symbol","symbolSize","symbolRotate","symbolOffset"],zF=UF.concat(["symbolKeepAspect"]);Eo={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData();if(e.legendIcon&&n.setVisual("legendIcon",e.legendIcon),e.hasSymbolVisual){for(var r,i={},o={},a=!1,s=0;s<UF.length;s++){var u=UF[s],c=e.get(u);Object(Xw.v)(c)?(a=!0,o[u]=c):i[u]=c}if(i.symbol=i.symbol||e.defaultSymbol,n.setVisual(Object(Xw.m)({legendIcon:e.legendIcon||i.symbol,symbolKeepAspect:e.get("symbolKeepAspect")},i)),!t.isSeriesFiltered(e))return r=Object(Xw.E)(o),{dataEach:a?function(t,n){for(var i=e.getRawValue(n),a=e.getDataParams(n),s=0;s<r.length;s++){var u=r[s];t.setItemVisual(n,u,o[u](i,a))}}:null}}}},ta={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){if(e.hasSymbolVisual&&!t.isSeriesFiltered(e))return{dataEach:e.getData().hasItemOption?function(e,t){for(var n=e.getItemModel(t),r=0;r<zF.length;r++){var i=zF[r],o=n.getShallow(i,!0);null!=o&&e.setItemVisual(t,i,o)}}:null}}};function HF(e,t,n,r,i){var o=e+t;n.isSilent(o)||r.eachComponent({mainType:"series",subType:"pie"},(function(e){for(var t,r,a=e.seriesIndex,s=e.option.selectedMap,u=i.selected,c=0;c<u.length;c++)u[c].seriesIndex===a&&(r=LE(t=e.getData(),i.fromActionPayload),n.trigger(o,{type:o,seriesId:e.id,name:Object(Xw.s)(r)?t.getName(r[0]):t.getName(r),selected:Object(Xw.B)(s)?s:Object(Xw.m)({},s)}))}))}function $F(e,t,n){for(var r;e&&(!t(e)||(r=e,!n));)e=e.__hostTarget||e.parent;return r}var QF=Math.round(9*Math.random()),VF="function"==typeof Object.defineProperty;function qF(){this._id="__ec_inner_"+QF++}qF.prototype.get=function(e){return this._guard(e)[this._id]},qF.prototype.set=function(e,t){return e=this._guard(e),VF?Object.defineProperty(e,this._id,{value:t,enumerable:!1,configurable:!0}):e[this._id]=t,this},qF.prototype.delete=function(e){return!!this.has(e)&&(delete this._guard(e)[this._id],!0)},qF.prototype.has=function(e){return!!this._guard(e)[this._id]},qF.prototype._guard=function(e){if(e!==Object(e))throw TypeError("Value of WeakMap is not a non-null object.");return e};Po=qF,Fa=C_.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2;t=t.height/2;e.moveTo(n,r-t),e.lineTo(n+i,r+t),e.lineTo(n-i,r+t),e.closePath()}}),Ui=C_.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2;t=t.height/2;e.moveTo(n,r-t),e.lineTo(n+i,r),e.lineTo(n,r+t),e.lineTo(n-i,r),e.closePath()}}),za=C_.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.x,r=t.y,i=t.width/5*3,o=(t=Math.max(i,t.height),(i=i/2)*i/(t-i)),a=(t=r-t+i+o,Math.asin(o/i)),s=Math.cos(a)*i,u=Math.sin(a),c=Math.cos(a),l=.6*i,h=.7*i;e.moveTo(n-s,t+o),e.arc(n,t,i,Math.PI-a,2*Math.PI+a),e.bezierCurveTo(n+s-u*l,t+o+c*l,n,r-h,n,r),e.bezierCurveTo(n,r-h,n-s+u*l,t+o+c*l,n-s,t+o),e.closePath()}}),Ro=C_.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.height,r=t.width,i=t.x;t=t.y,r=r/3*2;e.moveTo(i,t),e.lineTo(i+r,t+n),e.lineTo(i,t+n/4*3),e.lineTo(i-r,t+n),e.lineTo(i,t),e.closePath()}}),Ha={line:Kj,rect:z_,roundRect:z_,square:z_,circle:hj,diamond:Ui,pin:za,arrow:Ro,triangle:Fa};var GF={line:function(e,t,n,r,i){i.x1=e,i.y1=t+r/2,i.x2=e+n,i.y2=t+r/2},rect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r},roundRect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r,i.r=Math.min(n,r)/4},square:function(e,t,n,r,i){n=Math.min(n,r),i.x=e,i.y=t,i.width=n,i.height=n},circle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.r=Math.min(n,r)/2},diamond:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r},pin:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},arrow:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},triangle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r}},WF={},KF=(Object(Xw.k)(Ha,(function(e,t){WF[t]=new e})),C_.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,n){e=Xk(e,t,n);var r=this.shape;return r&&"pin"===r.symbolType&&"inside"===t.position&&(e.y=n.y+.4*n.height),e},buildPath:function(e,t,n){var r,i=t.symbolType;"none"!==i&&(r=(r=WF[i])||WF[i="rect"],GF[i](t.x,t.y,t.width,t.height,r.shape),r.buildPath(e,r.shape,n))}}));function YF(e,t){var n;"image"!==this.type&&(n=this.style,this.__isEmptyBrush?(n.stroke=e,n.fill=t||"#fff",n.lineWidth=2):"line"===this.shape.symbolType?n.stroke=e:n.fill=e,this.markRedraw())}function XF(e,t,n,r,i,o,a){var s=0===e.indexOf("empty");return(a=0===(e=s?e.substr(5,1).toLowerCase()+e.substr(6):e).indexOf("image://")?MN(e.slice(8),new Zx(t,n,r,i),a?"center":"cover"):0===e.indexOf("path://")?IN(e.slice(7),{},new Zx(t,n,r,i),a?"center":"cover"):new KF({shape:{symbolType:e,x:t,y:n,width:r,height:i}})).__isEmptyBrush=s,a.setColor=YF,o&&a.setColor(o),a}function JF(e,t){if(null!=e)return[gE((e=Object(Xw.s)(e)?e:[e,e])[0],t[0])||0,gE(Object(Xw.N)(e[1],e[0]),t[1])||0]}function ZF(e){return isFinite(e)}function eR(e,t,n){for(var r,i,o,a,s,u,c,l,h,f="radial"===t.type?(r=e,i=t,a=(o=n).width,s=o.height,u=Math.min(a,s),c=null==i.x?.5:i.x,l=null==i.y?.5:i.y,h=null==i.r?.5:i.r,i.global||(c=c*a+o.x,l=l*s+o.y,h*=u),c=ZF(c)?c:.5,l=ZF(l)?l:.5,h=0<=h&&ZF(h)?h:.5,r.createRadialGradient(c,l,0,c,l,h)):(i=e,a=n,o=null==(s=t).x?0:s.x,u=null==s.x2?1:s.x2,r=null==s.y?0:s.y,c=null==s.y2?0:s.y2,s.global||(o=o*a.width+a.x,u=u*a.width+a.x,r=r*a.height+a.y,c=c*a.height+a.y),o=ZF(o)?o:0,u=ZF(u)?u:1,r=ZF(r)?r:0,c=ZF(c)?c:0,i.createLinearGradient(o,r,u,c)),d=t.colorStops,p=0;p<d.length;p++)f.addColorStop(d[p].offset,d[p].color);return f}function tR(e){return parseInt(e,10)}function nR(e,t,n){var r=["width","height"][t],i=["clientWidth","clientHeight"][t],o=["paddingLeft","paddingTop"][t];t=["paddingRight","paddingBottom"][t];return null!=n[r]&&"auto"!==n[r]?parseFloat(n[r]):(n=document.defaultView.getComputedStyle(e),(e[i]||tR(n[r])||tR(e.style[r]))-(tR(n[o])||0)-(tR(n[t])||0)|0)}function rR(e){var t,n=e.style,r=n.lineDash&&0<n.lineWidth&&(i=n.lineDash,r=n.lineWidth,i&&"solid"!==i&&0<r?"dashed"===i?[4*r,2*r]:"dotted"===i?[r]:Object(Xw.y)(i)?[i]:Object(Xw.s)(i)?i:null:null),i=n.lineDashOffset;return r&&(t=n.strokeNoScale&&e.getLineScale?e.getLineScale():1)&&1!==t&&(r=Object(Xw.G)(r,(function(e){return e/t})),i/=t),[r,i]}var iR=new i_(!0);function oR(e){var t=e.stroke;return!(null==t||"none"===t||!(0<e.lineWidth))}function aR(e){return"string"==typeof e&&"none"!==e}function sR(e){return null!=(e=e.fill)&&"none"!==e}function uR(e,t){var n;null!=t.fillOpacity&&1!==t.fillOpacity?(n=e.globalAlpha,e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=n):e.fill()}function cR(e,t){var n;null!=t.strokeOpacity&&1!==t.strokeOpacity?(n=e.globalAlpha,e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=n):e.stroke()}function lR(e,t,n){if(uS(n=aS(t.image,t.__image,n)))return e=e.createPattern(n,t.repeat||"repeat"),"function"==typeof DOMMatrix&&e&&e.setTransform&&((n=new DOMMatrix).translateSelf(t.x||0,t.y||0),n.rotateSelf(0,0,(t.rotation||0)*Xw.a),n.scaleSelf(t.scaleX||1,t.scaleY||1),e.setTransform(n)),e}var hR=["shadowBlur","shadowOffsetX","shadowOffsetY"],fR=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function dR(e,t,n,r,i){var o,a=!1;if(!r&&t===(n=n||{}))return!1;!r&&t.opacity===n.opacity||(gR(e,i),a=!0,o=Math.max(Math.min(t.opacity,1),0),e.globalAlpha=isNaN(o)?yS.opacity:o),!r&&t.blend===n.blend||(a||(gR(e,i),a=!0),e.globalCompositeOperation=t.blend||yS.blend);for(var s=0;s<hR.length;s++){var u=hR[s];!r&&t[u]===n[u]||(a||(gR(e,i),a=!0),e[u]=e.dpr*(t[u]||0))}return!r&&t.shadowColor===n.shadowColor||(a||(gR(e,i),a=!0),e.shadowColor=t.shadowColor||yS.shadowColor),a}function pR(e,t,n,r,i){var o=AR(t,i.inHover),a=r?null:n&&AR(n,i.inHover)||{};if(o!==a){var s=dR(e,o,a,r,i);!r&&o.fill===a.fill||(s||(gR(e,i),s=!0),aR(o.fill)&&(e.fillStyle=o.fill)),!r&&o.stroke===a.stroke||(s||(gR(e,i),s=!0),aR(o.stroke)&&(e.strokeStyle=o.stroke)),!r&&o.opacity===a.opacity||(s||(gR(e,i),s=!0),e.globalAlpha=null==o.opacity?1:o.opacity),t.hasStroke()&&(n=o.lineWidth/(o.strokeNoScale&&t.getLineScale?t.getLineScale():1),e.lineWidth!==n&&(s||(gR(e,i),s=!0),e.lineWidth=n));for(var u=0;u<fR.length;u++){var c=fR[u],l=c[0];!r&&o[l]===a[l]||(s||(gR(e,i),s=!0),e[l]=o[l]||c[1])}}}function mR(e,t){t=t.transform;var n=e.dpr||1;t?e.setTransform(n*t[0],n*t[1],n*t[2],n*t[3],n*t[4],n*t[5]):e.setTransform(n,0,0,n,0,0)}function gR(e,t){t.batchFill&&e.fill(),t.batchStroke&&e.stroke(),t.batchFill="",t.batchStroke=""}function AR(e,t){return t&&e.__hoverStyle||e.style}function vR(e,t){bR(e,t,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function bR(e,t,n,r){var i=t.transform;if(t.shouldBePainted(n.viewWidth,n.viewHeight,!1,!1)){var o=t.__clipPaths,a=!1,s=!1;if(!(l=n.prevElClipPaths)||function(e,t){if(e!==t&&(e||t)){if(!e||!t||e.length!==t.length)return 1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return 1}}(o,l)){if(l&&l.length&&(gR(e,n),e.restore(),s=a=!0,n.prevElClipPaths=null,n.allClipped=!1,n.prevEl=null),o&&o.length){gR(e,n),e.save();for(var u=o,c=e,l=n,h=!1,f=0;f<u.length;f++){var d=u[f];h=h||d.isZeroArea();mR(c,d),c.beginPath(),d.buildPath(c,d.shape),c.clip()}l.allClipped=h,a=!0}n.prevElClipPaths=o}if(n.allClipped)t.__isRendered=!1;else{t.beforeBrush&&t.beforeBrush(),t.innerBeforeBrush();var p,m,g,A,v,b,y,w,x,C,k,E,S,_,O,T,D,B,I,M,j,N,F,R=((l=n.prevEl)||(s=a=!0),t instanceof C_&&t.autoBatch&&(R=sR(o=t.style),p=oR(o),!(o.lineDash||!(+R^+p)||R&&"string"!=typeof o.fill||p&&"string"!=typeof o.stroke||o.strokePercent<1||o.strokeOpacity<1||o.fillOpacity<1)));a=(a||(p=i,o=l.transform,p&&o?p[0]!==o[0]||p[1]!==o[1]||p[2]!==o[2]||p[3]!==o[3]||p[4]!==o[4]||p[5]!==o[5]:p||o)?(gR(e,n),mR(e,t)):R||gR(e,n),AR(t,n.inHover));if(t instanceof C_)1!==n.lastDrawType&&(s=!0,n.lastDrawType=1),pR(e,t,l,s,n),R&&(n.batchFill||n.batchStroke)||e.beginPath(),i=e,o=t,H=R,O=oR(A=a),T=sR(A),B=(D=A.strokePercent)<1,I=!o.path,o.silent&&!B||!I||o.createPathProxy(),M=o.path||iR,j=o.__dirty,H||(v=A.fill,F=A.stroke,b=T&&!!v.colorStops,y=O&&!!F.colorStops,w=T&&!!v.image,x=O&&!!F.image,N=S=E=k=C=void 0,(b||y)&&(N=o.getBoundingRect()),b&&(C=j?eR(i,v,N):o.__canvasFillGradient,o.__canvasFillGradient=C),y&&(k=j?eR(i,F,N):o.__canvasStrokeGradient,o.__canvasStrokeGradient=k),w&&(E=j||!o.__canvasFillPattern?lR(i,v,o):o.__canvasFillPattern,o.__canvasFillPattern=E),x&&(S=j||!o.__canvasStrokePattern?lR(i,F,o):o.__canvasStrokePattern,o.__canvasStrokePattern=E),b?i.fillStyle=C:w&&(E?i.fillStyle=E:T=!1),y?i.strokeStyle=k:x&&(S?i.strokeStyle=S:O=!1)),N=o.getGlobalScale(),M.setScale(N[0],N[1],o.segmentIgnoreThreshold),i.setLineDash&&A.lineDash&&(_=(v=rR(o))[0],z=v[1]),F=!0,(I||4&j)&&(M.setDPR(i.dpr),B?M.setContext(null):(M.setContext(i),F=!1),M.reset(),o.buildPath(M,o.shape,H),M.toStatic(),o.pathUpdated()),F&&M.rebuildPath(i,B?D:1),_&&(i.setLineDash(_),i.lineDashOffset=z),H||(A.strokeFirst?(O&&cR(i,A),T&&uR(i,A)):(T&&uR(i,A),O&&cR(i,A))),_&&i.setLineDash([]),R&&(n.batchFill=a.fill||"",n.batchStroke=a.stroke||"");else if(t instanceof __)3!==n.lastDrawType&&(s=!0,n.lastDrawType=3),pR(e,t,l,s,n),b=e,C=t,null!=(E=(w=a).text)&&(E+=""),E&&(b.font=w.font||Hk.a,b.textAlign=w.textAlign,b.textBaseline=w.textBaseline,k=y=void 0,b.setLineDash&&w.lineDash&&(y=(C=rR(C))[0],k=C[1]),y&&(b.setLineDash(y),b.lineDashOffset=k),w.strokeFirst?(oR(w)&&b.strokeText(E,w.x,w.y),sR(w)&&b.fillText(E,w.x,w.y)):(sR(w)&&b.fillText(E,w.x,w.y),oR(w)&&b.strokeText(E,w.x,w.y)),y&&b.setLineDash([]));else if(t instanceof B_)2!==n.lastDrawType&&(s=!0,n.lastDrawType=2),x=l,S=s,dR(e,AR(t,(N=n).inHover),x&&AR(x,N.inHover),S,N),v=e,I=a,(o=(j=t).__image=aS(I.image,j.__image,j,j.onload))&&uS(o)&&(F=I.x||0,M=I.y||0,B=j.getWidth(),j=j.getHeight(),D=o.width/o.height,null==B&&null!=j?B=j*D:null==j&&null!=B?j=B/D:null==B&&null==j&&(B=o.width,j=o.height),I.sWidth&&I.sHeight?(m=I.sx||0,g=I.sy||0,v.drawImage(o,m,g,I.sWidth,I.sHeight,F,M,B,j)):I.sx&&I.sy?(m=I.sx,g=I.sy,v.drawImage(o,m,g,B-m,j-g,F,M,B,j)):v.drawImage(o,F,M,B,j));else if(t.getTemporalDisplayables){4!==n.lastDrawType&&(s=!0,n.lastDrawType=4);var P,L,U=e,z=t,H=n,$=z.getDisplayables(),Q=z.getTemporalDisplayables(),V=(U.save(),{prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:H.viewWidth,viewHeight:H.viewHeight,inHover:H.inHover});for(P=z.getCursor(),L=$.length;P<L;P++)(q=$[P]).beforeBrush&&q.beforeBrush(),q.innerBeforeBrush(),bR(U,q,V,P===L-1),q.innerAfterBrush(),q.afterBrush&&q.afterBrush(),V.prevEl=q;for(var q,G=0,W=Q.length;G<W;G++)(q=Q[G]).beforeBrush&&q.beforeBrush(),q.innerBeforeBrush(),bR(U,q,V,G===W-1),q.innerAfterBrush(),q.afterBrush&&q.afterBrush(),V.prevEl=q;z.clearTemporalDisplayables(),z.notClear=!0,U.restore()}R&&r&&gR(e,n),t.innerAfterBrush(),t.afterBrush&&t.afterBrush(),(n.prevEl=t).__dirty=0,t.__isRendered=!0}}else t.__dirty&=-2,t.__isRendered=!1}var yR=new Po,wR=new zk.a(100),xR=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function CR(e,t){if("none"===e)return null;var n=t.getDevicePixelRatio(),r=t.getZr(),i="svg"===r.painter.type;if(t=(e.dirty&&yR.delete(e),yR.get(e)))return t;for(var o,a=Object(Xw.i)(e,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512}),s=t=("none"===a.backgroundColor&&(a.backgroundColor=null),{repeat:"repeat"}),u=[n],c=!0,l=0;l<xR.length;++l){var h=a[xR[l]];if(null!=h&&!Object(Xw.s)(h)&&!Object(Xw.B)(h)&&!Object(Xw.y)(h)&&"boolean"!=typeof h){c=!1;break}u.push(h)}c&&(o=u.join(",")+(i?"-svg":""),(v=wR.get(o))&&(i?s.svgElement=v:s.image=v));var f,d=function e(t){if(!t||0===t.length)return[[0,0]];if(Object(Xw.y)(t))return[[o=Math.ceil(t),o]];for(var n=!0,r=0;r<t.length;++r)if(!Object(Xw.y)(t[r])){n=!1;break}if(n)return e([t]);var i=[];for(r=0;r<t.length;++r){var o;Object(Xw.y)(t[r])?(o=Math.ceil(t[r]),i.push([o,o])):(o=Object(Xw.G)(t[r],(function(e){return Math.ceil(e)}))).length%2==1?i.push(o.concat(o)):i.push(o)}return i}(a.dashArrayX),p=function(e){if(!e||"object"==typeof e&&0===e.length)return[0,0];if(Object(Xw.y)(e))return[t=Math.ceil(e),t];var t=Object(Xw.G)(e,(function(e){return Math.ceil(e)}));return e.length%2?t.concat(t):t}(a.dashArrayY),m=function e(t){if(!t||0===t.length)return[["rect"]];if(Object(Xw.B)(t))return[[t]];for(var n=!0,r=0;r<t.length;++r)if(!Object(Xw.B)(t[r])){n=!1;break}if(n)return e([t]);var i=[];for(r=0;r<t.length;++r)Object(Xw.B)(t[r])?i.push([t[r]]):i.push(t[r]);return i}(a.symbol),g=function(e){return Object(Xw.G)(e,kR)}(d),A=kR(p),v=!i&&Hk.c.createCanvas(),b=i&&{tag:"g",attrs:{},key:"dcl",children:[]},y=function(){for(var e=1,t=0,n=g.length;t<n;++t)e=_E(e,g[t]);var r=1;for(t=0,n=m.length;t<n;++t)r=_E(r,m[t].length);e*=r;var i=A*g.length*m.length;return{width:Math.max(1,Math.min(e,a.maxTileWidth)),height:Math.max(1,Math.min(i,a.maxTileHeight))}}();v&&(v.width=y.width*n,v.height=y.height*n,f=v.getContext("2d")),f&&(f.clearRect(0,0,v.width,v.height),a.backgroundColor&&(f.fillStyle=a.backgroundColor,f.fillRect(0,0,v.width,v.height)));for(var w=0,x=0;x<p.length;++x)w+=p[x];if(!(w<=0))for(var C=-A,k=0,E=0,S=0;C<y.height;){if(k%2==0){for(var _=E/2%m.length,O=0,T=0,D=0;O<2*y.width;){var B,I,M,j,N,F=0;for(x=0;x<d[S].length;++x)F+=d[S][x];if(F<=0)break;T%2==0&&(I=.5*(1-a.symbolSize),B=O+d[S][T]*I,I=C+p[k]*I,M=d[S][T]*a.symbolSize,j=p[k]*a.symbolSize,N=D/2%m[_].length,function(e,t,o,s,u){var c=i?1:n;u=XF(u,e*c,t*c,o*c,s*c,a.color,a.symbolKeepAspect);i?(e=r.painter.renderOneToVNode(u))&&b.children.push(e):vR(f,u)}(B,I,M,j,m[_][N])),O+=d[S][T],++D,++T===d[S].length&&(T=0)}++S===d.length&&(S=0)}C+=p[k],++E,++k===p.length&&(k=0)}return c&&wR.put(o,v||b),s.image=v,s.svgElement=b,s.svgWidth=y.width,s.svgHeight=y.height,t.rotation=a.rotation,t.scaleX=t.scaleY=i?1:1/n,yR.set(e,t),e.dirty=!1,t}function kR(e){for(var t=0,n=0;n<e.length;++n)t+=e[n];return e.length%2==1?2*t:t}var ER=new px,SR={},_R=(Ta={PROCESSOR:{FILTER:1e3,SERIES_FILTER:800,STATISTIC:5e3},VISUAL:{LAYOUT:1e3,PROGRESSIVE_LAYOUT:1100,GLOBAL:2e3,CHART:3e3,POST_CHART_LAYOUT:4600,COMPONENT:4e3,BRUSH:5e3,CHART_ITEM:4500,ARIA:6e3,DECAL:7e3}},"__flagInMainProcess"),OR="__pendingUpdate",TR="__needsUpdateStatus",DR=/^[a-zA-Z0-9_]+$/,BR="__connectUpdateStatus";function IR(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(!this.isDisposed())return jR(this,e,t);this.id}}function MR(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return jR(this,e,t)}}function jR(e,t,n){return n[0]=n[0]&&n[0].toLowerCase(),px.prototype[t].apply(e,n)}Kw(RR,NR=px);var NR,FR=RR;function RR(){return null!==NR&&NR.apply(this,arguments)||this}var PR,LR,UR,zR,HR,$R,QR,VR,qR,GR,WR,KR,YR,XR,JR,ZR,eP,tP,nP,rP=((Qa=FR.prototype).on=MR("on"),Qa.off=MR("off"),Kw(iP,nP=px),iP.prototype._onframe=function(){if(!this._disposed){tP(this);var e=this._scheduler;if(this[OR]){var t=this[OR].silent;this[_R]=!0;try{PR(this),zR.update.call(this,null,this[OR].updateParams)}catch(e){throw this[_R]=!1,this[OR]=null,e}this._zr.flush(),this[_R]=!1,this[OR]=null,VR.call(this,t),qR.call(this,t)}else if(e.unfinished){var n=1,r=this._model,i=this._api;e.unfinished=!1;do{var o=+new Date}while(e.performSeriesTasks(r),e.performDataProcessorTasks(r),$R(this,r),e.performVisualTasks(r),XR(this,this._model,i,"remain",{}),0<(n-=+new Date-o)&&e.unfinished);e.unfinished||this._zr.flush()}}},iP.prototype.getDom=function(){return this._dom},iP.prototype.getId=function(){return this.id},iP.prototype.getZr=function(){return this._zr},iP.prototype.isSSR=function(){return this._ssr},iP.prototype.setOption=function(e,t,n){if(!this[_R])if(this._disposed)this.id;else{Object(Xw.z)(t)&&(n=t.lazyUpdate,r=t.silent,i=t.replaceMerge,o=t.transition,t=t.notMerge),this[_R]=!0,this._model&&!t||(t=new xB(this._api),a=this._theme,(s=this._model=new mB).scheduler=this._scheduler,s.ssr=this._ssr,s.init(null,null,null,a,this._locale,t)),this._model.setOption(e,{replaceMerge:i},pP);var r,i,o,a,s={seriesTransition:o,optionChanged:!0};if(n)this[OR]={silent:r,updateParams:s},this[_R]=!1,this.getZr().wakeUp();else{try{PR(this),zR.update.call(this,null,s)}catch(e){throw this[OR]=null,this[_R]=!1,e}this._ssr||this._zr.flush(),this[OR]=null,this[_R]=!1,VR.call(this,r),qR.call(this,r)}}},iP.prototype.setTheme=function(){},iP.prototype.getModel=function(){return this._model},iP.prototype.getOption=function(){return this._model&&this._model.getOption()},iP.prototype.getWidth=function(){return this._zr.getWidth()},iP.prototype.getHeight=function(){return this._zr.getHeight()},iP.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Yw.a.hasGlobalWindow&&window.devicePixelRatio||1},iP.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},iP.prototype.renderToCanvas=function(e){return this._zr.painter.getRenderedCanvas({backgroundColor:(e=e||{}).backgroundColor||this._model.get("backgroundColor"),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},iP.prototype.renderToSVGString=function(e){return this._zr.painter.renderToString({useViewBox:(e=e||{}).useViewBox})},iP.prototype.getSvgDataURL=function(){var e,t;if(Yw.a.svgSupported)return t=(e=this._zr).storage.getDisplayList(),Object(Xw.k)(t,(function(e){e.stopAnimation(null,!0)})),e.painter.toDataURL()},iP.prototype.getDataURL=function(e){var t,n,r,i;if(!this._disposed)return i=(e=e||{}).excludeComponents,t=this._model,n=[],r=this,Object(Xw.k)(i,(function(e){t.eachComponent({mainType:e},(function(e){(e=r._componentsMap[e.__viewId]).group.ignore||(n.push(e),e.group.ignore=!0)}))})),i="svg"===this._zr.painter.getType()?this.getSvgDataURL():this.renderToCanvas(e).toDataURL("image/"+(e&&e.type||"png")),Object(Xw.k)(n,(function(e){e.group.ignore=!1})),i;this.id},iP.prototype.getConnectedDataURL=function(e){var t,n,r,i,o,a,s,u,c,l,h,f,d,p,m;if(!this._disposed)return t="svg"===e.type,n=this.group,r=Math.min,i=Math.max,bP[n]?(a=o=1/0,u=s=-1/0,c=[],l=e&&e.pixelRatio||this.getDevicePixelRatio(),Object(Xw.k)(vP,(function(l,h){var f;l.group===n&&(f=t?l.getZr().painter.getSvgDom().innerHTML:l.renderToCanvas(Object(Xw.d)(e)),l=l.getDom().getBoundingClientRect(),o=r(l.left,o),a=r(l.top,a),s=i(l.right,s),u=i(l.bottom,u),c.push({dom:f,left:l.left,top:l.top}))})),h=(s*=l)-(o*=l),f=(u*=l)-(a*=l),d=Hk.c.createCanvas(),(p=pE(d,{renderer:t?"svg":"canvas"})).resize({width:h,height:f}),t?(m="",Object(Xw.k)(c,(function(e){var t=e.left-o,n=e.top-a;m+='<g transform="translate('+t+","+n+')">'+e.dom+"</g>"})),p.painter.getSvgRoot().innerHTML=m,e.connectedBackgroundColor&&p.painter.setBackgroundColor(e.connectedBackgroundColor),p.refreshImmediately(),p.painter.toDataURL()):(e.connectedBackgroundColor&&p.add(new z_({shape:{x:0,y:0,width:h,height:f},style:{fill:e.connectedBackgroundColor}})),Object(Xw.k)(c,(function(e){e=new B_({style:{x:e.left*l-o,y:e.top*l-a,image:e.dom}}),p.add(e)})),p.refreshImmediately(),d.toDataURL("image/"+(e&&e.type||"png")))):this.getDataURL(e);this.id},iP.prototype.convertToPixel=function(e,t){return HR(this,"convertToPixel",e,t)},iP.prototype.convertFromPixel=function(e,t){return HR(this,"convertFromPixel",e,t)},iP.prototype.containPixel=function(e,t){var n;if(!this._disposed)return e=HE(this._model,e),Object(Xw.k)(e,(function(e,r){0<=r.indexOf("Models")&&Object(Xw.k)(e,(function(e){var i=e.coordinateSystem;i&&i.containPoint?n=n||!!i.containPoint(t):"seriesModels"===r&&(i=this._chartsMap[e.__viewId])&&i.containPoint&&(n=n||i.containPoint(t,e))}),this)}),this),!!n;this.id},iP.prototype.getVisual=function(e,t){var n=(e=HE(this._model,e,{defaultMainType:"series"})).seriesModel.getData();if(null!=(e=e.hasOwnProperty("dataIndexInside")?e.dataIndexInside:e.hasOwnProperty("dataIndex")?n.indexOfRawIndex(e.dataIndex):null)){var r=n,i=e,o=t;switch(o){case"color":return r.getItemVisual(i,"style")[r.getVisual("drawType")];case"opacity":return r.getItemVisual(i,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return r.getItemVisual(i,o)}}else{var a=n,s=t;switch(s){case"color":return a.getVisual("style")[a.getVisual("drawType")];case"opacity":return a.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return a.getVisual(s)}}},iP.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},iP.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},iP.prototype._initEvents=function(){var e,t,n,r=this;Object(Xw.k)(lP,(function(e){function t(t){var n,i,o,a=r.getModel(),s=t.target;"globalout"===e?n={}:s&&$F(s,(function(e){var t;return(e=rO(e))&&null!=e.dataIndex?(t=e.dataModel||a.getSeriesByIndex(e.seriesIndex),n=t&&t.getDataParams(e.dataIndex,e.dataType,s)||{},1):e.eventData&&(n=Object(Xw.m)({},e.eventData),1)}),!0),n&&(i=n.componentType,o=n.componentIndex,"markLine"!==i&&"markPoint"!==i&&"markArea"!==i||(i="series",o=n.seriesIndex),o=(i=i&&null!=o&&a.getComponent(i,o))&&r["series"===i.mainType?"_chartsMap":"_componentsMap"][i.__viewId],n.event=t,n.type=e,r._$eventProcessor.eventInfo={targetEl:s,packedEvent:n,model:i,view:o},r.trigger(e,n))}t.zrEventfulCallAtLast=!0,r._zr.on(e,t,r)})),Object(Xw.k)(fP,(function(e,t){r._messageCenter.on(t,(function(e){this.trigger(t,e)}),r)})),Object(Xw.k)(["selectchanged"],(function(e){r._messageCenter.on(e,(function(t){this.trigger(e,t)}),r)})),e=this._messageCenter,n=(t=this)._api,e.on("selectchanged",(function(e){var r=n.getModel();e.isFromClick?(HF("map","selectchanged",t,r,e),HF("pie","selectchanged",t,r,e)):"select"===e.fromAction?(HF("map","selected",t,r,e),HF("pie","selected",t,r,e)):"unselect"===e.fromAction&&(HF("map","unselected",t,r,e),HF("pie","unselected",t,r,e))}))},iP.prototype.isDisposed=function(){return this._disposed},iP.prototype.clear=function(){this._disposed?this.id:this.setOption({series:[]},!0)},iP.prototype.dispose=function(){var e,t,n;this._disposed?this.id:(this._disposed=!0,this.getDom()&&qE(this.getDom(),wP,""),t=(e=this)._api,n=e._model,Object(Xw.k)(e._componentsViews,(function(e){e.dispose(n,t)})),Object(Xw.k)(e._chartsViews,(function(e){e.dispose(n,t)})),e._zr.dispose(),e._dom=e._model=e._chartsMap=e._componentsMap=e._chartsViews=e._componentsViews=e._scheduler=e._api=e._zr=e._throttledZrFlush=e._theme=e._coordSysMgr=e._messageCenter=null,delete vP[e.id])},iP.prototype.resize=function(e){if(!this[_R])if(this._disposed)this.id;else{this._zr.resize(e);var t=this._model;if(this._loadingFX&&this._loadingFX.resize(),t){t=t.resetOption("media");var n=e&&e.silent;this[OR]&&(null==n&&(n=this[OR].silent),t=!0,this[OR]=null),this[_R]=!0;try{t&&PR(this),zR.update.call(this,{type:"resize",animation:Object(Xw.m)({duration:0},e&&e.animation)})}catch(e){throw this[_R]=!1,e}this[_R]=!1,VR.call(this,n),qR.call(this,n)}}},iP.prototype.showLoading=function(e,t){this._disposed?this.id:(Object(Xw.z)(e)&&(t=e,e=""),e=e||"default",this.hideLoading(),AP[e]&&(e=AP[e](this._api,t),t=this._zr,this._loadingFX=e,t.add(e)))},iP.prototype.hideLoading=function(){this._disposed?this.id:(this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null)},iP.prototype.makeActionFromEvent=function(e){var t=Object(Xw.m)({},e);return t.type=fP[e.type],t},iP.prototype.dispatchAction=function(e,t){var n;this._disposed?this.id:(Object(Xw.z)(t)||(t={silent:!!t}),hP[e.type]&&this._model&&(this[_R]?this._pendingActions.push(e):(n=t.silent,QR.call(this,e,n),(e=t.flush)?this._zr.flush():!1!==e&&Yw.a.browser.weChat&&this._throttledZrFlush(),VR.call(this,n),qR.call(this,n))))},iP.prototype.updateLabelLayout=function(){ER.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},iP.prototype.appendData=function(e){var t;this._disposed?this.id:(t=e.seriesIndex,this.getModel().getSeriesByIndex(t).appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp())},iP.internalField=(PR=function(e){var t=e._scheduler;t.restorePipelines(e._model),t.prepareStageTasks(),LR(e,!0),LR(e,!1),t.plan()},LR=function(e,t){for(var n=e._model,r=e._scheduler,i=t?e._componentsViews:e._chartsViews,o=t?e._componentsMap:e._chartsMap,a=e._zr,s=e._api,u=0;u<i.length;u++)i[u].__alive=!1;function c(e){var u,c=e.__requireNewView,l=(e.__requireNewView=!1,"_ec_"+e.id+"_"+e.type);(c=!c&&o[l])||(u=YE(e.type),(c=new(t?PM.getClass(u.main,u.sub):sF.getClass(u.sub))).init(n,s),o[l]=c,i.push(c),a.add(c.group)),e.__viewId=c.__id=l,c.__alive=!0,c.__model=e,c.group.__ecComponentInfo={mainType:e.mainType,index:e.componentIndex},t||r.prepareView(c,e,n,s)}for(t?n.eachComponent((function(e,t){"series"!==e&&c(t)})):n.eachSeries(c),u=0;u<i.length;){var l=i[u];l.__alive?u++:(t||l.renderTask.dispose(),a.remove(l.group),l.dispose(n,s),i.splice(u,1),o[l.__id]===l&&delete o[l.__id],l.__id=l.group.__ecComponentInfo=null)}},UR=function(e,t,n,r,i){var o,a,s=e._model;function u(r){r&&r.__alive&&r[t]&&r[t](r.__model,s,e._api,n)}s.setUpdatePayload(n),r?((o={})[r+"Id"]=n[r+"Id"],o[r+"Index"]=n[r+"Index"],o[r+"Name"]=n[r+"Name"],o={mainType:r,query:o},i&&(o.subType=i),null!=(i=n.excludeSeriesId)&&(a=Object(Xw.f)(),Object(Xw.k)(DE(i),(function(e){null!=(e=FE(e,null))&&a.set(e,!0)}))),s&&s.eachComponent(o,(function(t){var r,i;if(!(o=a&&null!=a.get(t.id)))if(XO(n))if(t instanceof FM){if(n.type===lO&&!n.notBlur&&!t.get(["emphasis","disabled"])){var o=t,s=n,u=e._api,c=o.seriesIndex,l=o.getData(s.dataType);if(l){s=LE(l,s),s=(Object(Xw.s)(s)?s[0]:s)||0;var h=l.getItemGraphicEl(s);if(!h)for(var f=l.count(),d=0;!h&&d<f;)h=l.getItemGraphicEl(d++);h?LO(c,(s=rO(h)).focus,s.blurScope,u):(s=o.get(["emphasis","focus"]),o=o.get(["emphasis","blurScope"]),null!=s&&LO(c,s,o,u))}}}else s=(c=zO(t.mainType,t.componentIndex,n.name,e._api)).focusSelf,o=c.dispatchers,n.type===lO&&s&&!n.notBlur&&UO(t.mainType,t.componentIndex,e._api),o&&Object(Xw.k)(o,(function(e){(n.type===lO?IO:MO)(e)}));else YO(n)&&t instanceof FM&&(u=t,o=n,e._api,YO(o)&&(r=o.dataType,i=LE(u.getData(r),o),Object(Xw.s)(i)||(i=[i]),u[o.type===pO?"toggleSelect":o.type===fO?"select":"unselect"](i,r)),HO(t),eP(e))}),e),s&&s.eachComponent(o,(function(t){a&&null!=a.get(t.id)||u(e["series"===r?"_chartsMap":"_componentsMap"][t.__viewId])}),e)):Object(Xw.k)([].concat(e._componentsViews).concat(e._chartsViews),u)},zR={prepareAndUpdate:function(e){PR(this),zR.update.call(this,e,{optionChanged:null!=e.newOption})},update:function(e,t){var n=this._model,r=this._api,i=this._zr,o=this._coordSysMgr,a=this._scheduler;n&&(n.setUpdatePayload(e),a.restoreData(n,e),a.performSeriesTasks(n),o.create(n,r),a.performDataProcessorTasks(n,e),$R(this,n),o.update(n,r),oP(n),a.performVisualTasks(n,e),KR(this,n,r,e,t),o=n.get("backgroundColor")||"transparent",a=n.get("darkMode"),i.setBackgroundColor(o),null!=a&&"auto"!==a&&i.setDarkMode(a),ER.trigger("afterupdate",n,r))},updateTransform:function(e){var t,n,r=this,i=this._model,o=this._api;i&&(i.setUpdatePayload(e),t=[],i.eachComponent((function(n,a){"series"!==n&&(n=r.getViewOfComponentModel(a))&&n.__alive&&(!n.updateTransform||(a=n.updateTransform(a,i,o,e))&&a.update)&&t.push(n)})),n=Object(Xw.f)(),i.eachSeries((function(t){var a=r._chartsMap[t.__viewId];(!a.updateTransform||(a=a.updateTransform(t,i,o,e))&&a.update)&&n.set(t.uid,1)})),oP(i),this._scheduler.performVisualTasks(i,e,{setDirty:!0,dirtyMap:n}),XR(this,i,o,e,{},n),ER.trigger("afterupdate",i,o))},updateView:function(e){var t=this._model;t&&(t.setUpdatePayload(e),sF.markUpdateMethod(e,"updateView"),oP(t),this._scheduler.performVisualTasks(t,e,{setDirty:!0}),KR(this,t,this._api,e,{}),ER.trigger("afterupdate",t,this._api))},updateVisual:function(e){var t=this,n=this._model;n&&(n.setUpdatePayload(e),n.eachSeries((function(e){e.getData().clearAllVisual()})),sF.markUpdateMethod(e,"updateVisual"),oP(n),this._scheduler.performVisualTasks(n,e,{visualType:"visual",setDirty:!0}),n.eachComponent((function(r,i){"series"!==r&&(r=t.getViewOfComponentModel(i))&&r.__alive&&r.updateVisual(i,n,t._api,e)})),n.eachSeries((function(r){t._chartsMap[r.__viewId].updateVisual(r,n,t._api,e)})),ER.trigger("afterupdate",n,this._api))},updateLayout:function(e){zR.update.call(this,e)}},HR=function(e,t,n,r){if(e._disposed)e.id;else for(var i=e._model,o=e._coordSysMgr.getCoordinateSystems(),a=HE(i,n),s=0;s<o.length;s++){var u=o[s];if(u[t]&&null!=(u=u[t](i,a,r)))return u}},$R=function(e,t){var n=e._chartsMap,r=e._scheduler;t.eachSeries((function(e){r.updateStreamModes(e,n[e.__viewId])}))},QR=function(e,t){var n,r,i=this,o=this.getModel(),a=e.type,s=e.escapeConnect,u=hP[a],c=u.actionInfo,l=(f=(c.update||"update").split(":")).pop(),h=null!=f[0]&&YE(f[0]),f=(this[_R]=!0,[e]),d=!1,p=(e.batch&&(d=!0,f=Object(Xw.G)(e.batch,(function(t){return(t=Object(Xw.i)(Object(Xw.m)({},t),e)).batch=null,t}))),[]),m=YO(e),g=XO(e);if(g&&PO(this._api),Object(Xw.k)(f,(function(t){var r,o;(n=(n=u.action(t,i._model,i._api))||Object(Xw.m)({},t)).type=c.event||n.type,p.push(n),g?(r=(o=$E(e)).queryOptionMap,o=o.mainTypeSpecified?r.keys()[0]:"series",UR(i,l,t,o),eP(i)):m?(UR(i,l,t,"series"),eP(i)):h&&UR(i,l,t,h.main,h.sub)})),"none"!==l&&!g&&!m&&!h)try{this[OR]?(PR(this),zR.update.call(this,e),this[OR]=null):zR[l].call(this,e)}catch(t){throw this[_R]=!1,t}n=d?{type:c.event||a,escapeConnect:s,batch:p}:p[0],this[_R]=!1,t||((f=this._messageCenter).trigger(n.type,n),m&&(d={type:"selectchanged",escapeConnect:s,selected:(r=[],o.eachSeries((function(e){var t=e.getAllData();Object(Xw.k)(t,(function(t){t.data;t=t.type;var n=e.getSelectedDataIndices();0<n.length&&(n={dataIndex:n,seriesIndex:e.seriesIndex},null!=t&&(n.dataType=t),r.push(n))}))})),r),isFromClick:e.isFromClick||!1,fromAction:e.type,fromActionPayload:e},f.trigger(d.type,d)))},VR=function(e){for(var t=this._pendingActions;t.length;){var n=t.shift();QR.call(this,n,e)}},qR=function(e){e||this.trigger("updated")},GR=function(e,t){e.on("rendered",(function(n){t.trigger("rendered",n),!e.animation.isFinished()||t[OR]||t._scheduler.unfinished||t._pendingActions.length||t.trigger("finished")}))},WR=function(e,t){e.on("mouseover",(function(e){var n,r,i,o,a=$F(e.target,KO);a&&(a=a,n=e,e=t._api,i=(o=zO((r=rO(a)).componentMainType,r.componentIndex,r.componentHighDownName,e)).dispatchers,o=o.focusSelf,i?(o&&UO(r.componentMainType,r.componentIndex,e),Object(Xw.k)(i,(function(e){return DO(e,n)}))):(LO(r.seriesIndex,r.focus,r.blurScope,e),"self"===r.focus&&UO(r.componentMainType,r.componentIndex,e),DO(a,n)),eP(t))})).on("mouseout",(function(e){var n,r,i=$F(e.target,KO);i&&(i=i,n=e,PO(e=t._api),(r=zO((r=rO(i)).componentMainType,r.componentIndex,r.componentHighDownName,e).dispatchers)?Object(Xw.k)(r,(function(e){return BO(e,n)})):BO(i,n),eP(t))})).on("click",(function(e){var n;(e=$F(e.target,(function(e){return null!=rO(e).dataIndex}),!0))&&(n=e.selected?"unselect":"select",e=rO(e),t._api.dispatchAction({type:n,dataType:e.dataType,dataIndexInside:e.dataIndex,seriesIndex:e.seriesIndex,isFromClick:!0}))}))},KR=function(e,t,n,r,i){var o,a,s,u,c,l,h;c=[],h=!(l=[]),(o=t).eachComponent((function(e,t){var n=t.get("zlevel")||0,r=t.get("z")||0,i=t.getZLevelKey();h=h||!!i,("series"===e?l:c).push({zlevel:n,z:r,idx:t.componentIndex,type:e,key:i})})),h&&(AC(a=c.concat(l),(function(e,t){return e.zlevel===t.zlevel?e.z-t.z:e.zlevel-t.zlevel})),Object(Xw.k)(a,(function(e){var t=o.getComponent(e.type,e.idx),n=e.zlevel;e=e.key;null!=s&&(n=Math.max(s,n)),e?(n===s&&e!==u&&n++,u=e):u&&(n===s&&n++,u=""),s=n,t.setZLevel(n)}))),YR(e,t,n,r,i),Object(Xw.k)(e._chartsViews,(function(e){e.__alive=!1})),XR(e,t,n,r,i),Object(Xw.k)(e._chartsViews,(function(e){e.__alive||e.remove(t,n)}))},YR=function(e,t,n,r,i,o){Object(Xw.k)(o||e._componentsViews,(function(e){var i=e.__model;uP(0,e),e.render(i,t,n,r),sP(i,e),cP(i,e)}))},XR=function(e,t,n,r,i,o){var a,s,u,c,l=e._scheduler,h=(i=Object(Xw.m)(i||{},{updatedSeries:t.getSeries()}),ER.trigger("series:beforeupdate",t,n,i),!1);t.eachSeries((function(t){var n,i=e._chartsMap[t.__viewId],a=(i.__alive=!0,i.renderTask);l.updatePayload(a,r),uP(0,i),o&&o.get(t.uid)&&a.dirty(),a.perform(l.getPerformArgs(a))&&(h=!0),i.group.silent=!!t.get("silent"),a=i,n=t.get("blendMode")||null,a.eachRendered((function(e){e.isGroup||(e.style.blend=n)})),HO(t)})),l.unfinished=h||l.unfinished,ER.trigger("series:layoutlabels",t,n,i),ER.trigger("series:transition",t,n,i),t.eachSeries((function(t){var n=e._chartsMap[t.__viewId];sP(t,n),cP(t,n)})),s=t,u=(a=e)._zr.storage,c=0,u.traverse((function(e){e.isGroup||c++})),c>s.get("hoverLayerThreshold")&&!Yw.a.node&&!Yw.a.worker&&s.eachSeries((function(e){e.preventUsingHoverLayer||(e=a._chartsMap[e.__viewId]).__alive&&e.eachRendered((function(e){e.states.emphasis&&(e.states.emphasis.hoverLayer=!0)}))})),ER.trigger("series:afterupdate",t,n,i)},eP=function(e){e[TR]=!0,e.getZr().wakeUp()},tP=function(e){e[TR]&&(e.getZr().storage.traverse((function(e){rT(e)||aP(e)})),e[TR]=!1)},JR=function(e){return Kw(t,n=pB),t.prototype.getCoordinateSystems=function(){return e._coordSysMgr.getCoordinateSystems()},t.prototype.getComponentByElement=function(t){for(;t;){var n=t.__ecComponentInfo;if(null!=n)return e._model.getComponent(n.mainType,n.index);t=t.parent}},t.prototype.enterEmphasis=function(t,n){IO(t,n),eP(e)},t.prototype.leaveEmphasis=function(t,n){MO(t,n),eP(e)},t.prototype.enterBlur=function(t){SO(t,wO),eP(e)},t.prototype.leaveBlur=function(t){jO(t),eP(e)},t.prototype.enterSelect=function(t){NO(t),eP(e)},t.prototype.leaveSelect=function(t){FO(t),eP(e)},t.prototype.getModel=function(){return e.getModel()},t.prototype.getViewOfComponentModel=function(t){return e.getViewOfComponentModel(t)},t.prototype.getViewOfSeriesModel=function(t){return e.getViewOfSeriesModel(t)},new t(e);function t(){return null!==n&&n.apply(this,arguments)||this}var n},void(ZR=function(e){function t(e,t){for(var n=0;n<e.length;n++)e[n][BR]=t}Object(Xw.k)(fP,(function(n,r){e._messageCenter.on(r,(function(n){var r,i;!bP[e.group]||0===e[BR]||n&&n.escapeConnect||(r=e.makeActionFromEvent(n),i=[],Object(Xw.k)(vP,(function(t){t!==e&&t.group===e.group&&i.push(t)})),t(i,0),Object(Xw.k)(i,(function(e){1!==e[BR]&&e.dispatchAction(r)})),t(i,2))}))}))})),iP);function iP(e,t,n){var r=nP.call(this,new PF)||this;r._chartsViews=[],r._chartsMap={},r._componentsViews=[],r._componentsMap={},r._pendingActions=[],n=n||{},Object(Xw.B)(t)&&(t=gP[t]),r._dom=e,e=r._zr=pE(e,{renderer:n.renderer||"canvas",devicePixelRatio:n.devicePixelRatio,width:n.width,height:n.height,ssr:n.ssr,useDirtyRect:Object(Xw.N)(n.useDirtyRect,!1),useCoarsePointer:Object(Xw.N)(n.useCoarsePointer,"auto"),pointerSize:n.pointerSize}),r._ssr=n.ssr,r._throttledZrFlush=hF(Object(Xw.c)(e.flush,e),17),(t=Object(Xw.d)(t))&&UB(t,!0),r._theme=t,r._locale=(t=n.locale||FT,Object(Xw.B)(t)?(n=jT[t.toUpperCase()]||{},"ZH"===t||"EN"===t?Object(Xw.d)(n):Object(Xw.H)(Object(Xw.d)(n),Object(Xw.d)(jT.EN),!1)):Object(Xw.H)(Object(Xw.d)(t),Object(Xw.d)(jT.EN),!1)),r._coordSysMgr=new bB,n=r._api=JR(r);function i(e,t){return e.__prio-t.__prio}return AC(mP,i),AC(dP,i),r._scheduler=new FF(r,n,dP,mP),r._messageCenter=new FR,r._initEvents(),r.resize=Object(Xw.c)(r.resize,r),e.animation.on("frame",r._onframe,r),GR(e,r),WR(e,r),Object(Xw.P)(r),r}function oP(e){e.clearColorPalette(),e.eachSeries((function(e){e.clearColorPalette()}))}function aP(e){for(var t=[],n=e.currentStates,r=0;r<n.length;r++){var i=n[r];"emphasis"!==i&&"blur"!==i&&"select"!==i&&t.push(i)}e.selected&&e.states.select&&t.push("select"),2===e.hoverState&&e.states.emphasis?t.push("emphasis"):1===e.hoverState&&e.states.blur&&t.push("blur"),e.useStates(t)}function sP(e,t){var n,r;e.preventAutoZ||(n=e.get("z")||0,r=e.get("zlevel")||0,t.eachRendered((function(e){return function e(t,n,r,i){var o=t.getTextContent(),a=t.getTextGuideLine(),s=t.isGroup;if(s)for(var u=t.childrenRef(),c=0;c<u.length;c++)i=Math.max(e(u[c],n,r,i),i);else t.z=n,t.zlevel=r,i=Math.max(t.z2,i);return o&&(o.z=n,o.zlevel=r,isFinite(i)&&(o.z2=i+2)),a&&(s=t.textGuideLineConfig,a.z=n,a.zlevel=r,isFinite(i)&&(a.z2=i+(s&&s.showAbove?1:-1))),i}(e,n,r,-1/0),!0})))}function uP(e,t){t.eachRendered((function(e){var t,n;rT(e)||(t=e.getTextContent(),n=e.getTextGuideLine(),e.stateTransition&&(e.stateTransition=null),t&&t.stateTransition&&(t.stateTransition=null),n&&n.stateTransition&&(n.stateTransition=null),e.hasState()?(e.prevStates=e.currentStates,e.clearStates()):e.prevStates&&(e.prevStates=null))}))}function cP(e,t){var n=e.getModel("stateAnimation"),r=e.isAnimationEnabled(),i=0<(e=n.get("duration"))?{duration:e,delay:n.get("delay"),easing:n.get("easing")}:null;t.eachRendered((function(e){var t,n,o;e.states&&e.states.emphasis&&(rT(e)||(e instanceof C_&&((o=aO(n=e)).normalFill=n.style.fill,o.normalStroke=n.style.stroke,n=n.states.select||{},o.selectFill=n.style&&n.style.fill||null,o.selectStroke=n.style&&n.style.stroke||null),e.__dirty&&(o=e.prevStates)&&e.useStates(o),r&&(e.stateTransition=i,n=e.getTextContent(),t=e.getTextGuideLine(),n&&(n.stateTransition=i),t&&(t.stateTransition=i)),e.__dirty&&aP(e)))}))}var lP=((Ae=rP.prototype).on=IR("on"),Ae.off=IR("off"),Ae.one=function(e,t,n){var r=this;this.on.call(this,e,(function n(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];t&&t.apply&&t.apply(this,i),r.off(e,n)}),n)},["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"]);var hP={},fP={},dP=[],pP=[],mP=[],gP={},AP={},vP={},bP={},yP=+new Date,wP=(new Date,"_echarts_instance_");function xP(e,t){gP[e]=t}function CP(e){Object(Xw.q)(pP,e)<0&&pP.push(e)}function kP(e,t){TP(dP,e,t,2e3)}function EP(e,t){ER.on(e,t)}function SP(e,t,n){Object(Xw.v)(t)&&(n=t,t="");var r=Object(Xw.z)(e)?e.type:[e,e={event:t}][0];e.event=(e.event||r).toLowerCase(),t=e.event,fP[t]||(Object(Xw.b)(DR.test(r)&&DR.test(t)),hP[r]||(hP[r]={action:n,actionInfo:e}),fP[t]=r)}function _P(e,t){TP(mP,e,t,3e3,"visual")}var OP=[];function TP(e,t,n,r,i){(Object(Xw.v)(t)||Object(Xw.z)(t))&&(n=t,t=r),0<=Object(Xw.q)(OP,n)||(OP.push(n),(r=FF.wrapStageHandler(n,i)).__prio=t,r.__raw=n,e.push(r))}function DP(e,t){AP[e]=t}_P(2e3,sa),_P(4500,la),_P(4500,Zn),_P(2e3,Eo),_P(4500,ta),_P(7e3,(function(e,t){e.eachRawSeries((function(n){var r;e.isSeriesFiltered(n)||((r=n.getData()).hasItemVisual()&&r.each((function(e){var n=r.getItemVisual(e,"decal");n&&(r.ensureUniqueItemVisual(e,"style").decal=CR(n,t))})),(n=r.getVisual("decal"))&&(r.getVisual("style").decal=CR(n,t)))}))})),CP(UB),kP(900,(function(e){var t=Object(Xw.f)();e.eachSeries((function(e){var n,r=e.get("stack");r&&(r=t.get(r)||t.set(r,[]),(e={stackResultDimension:(n=e.getData()).getCalculationInfo("stackResultDimension"),stackedOverDimension:n.getCalculationInfo("stackedOverDimension"),stackedDimension:n.getCalculationInfo("stackedDimension"),stackedByDimension:n.getCalculationInfo("stackedByDimension"),isStackedByIndex:n.getCalculationInfo("isStackedByIndex"),data:n,seriesModel:e}).stackedDimension&&(e.isStackedByIndex||e.stackedByDimension)&&(r.length&&n.setCalculationInfo("stackedOnSeries",r[r.length-1].seriesModel),r.push(e)))})),t.each(zB)})),DP("default",(function(e,t){t=t||{},Xw.i(t,{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var n,r=new cE,i=new z_({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4}),o=(r.add(i),new nO({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001})),a=new z_({style:{fill:"none"},textContent:o,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});return r.add(a),t.showSpinner&&((n=new oN({shape:{startAngle:-yF/2,endAngle:-yF/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001})).animateShape(!0).when(1e3,{endAngle:3*yF/2}).start("circularInOut"),n.animateShape(!0).when(1e3,{startAngle:3*yF/2}).delay(300).start("circularInOut"),r.add(n)),r.resize=function(){var r=o.getBoundingRect().width,s=t.showSpinner?t.spinnerRadius:0,u=(r=(e.getWidth()-2*s-(t.showSpinner&&r?10:0)-r)/2-(t.showSpinner&&r?0:5+r/2)+(t.showSpinner?0:r/2)+(r?0:s),e.getHeight()/2);t.showSpinner&&n.setShape({cx:r,cy:u}),a.setShape({x:r-s,y:u-s,width:2*s,height:2*s}),i.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},r.resize(),r})),SP({type:lO,event:lO,update:lO},Xw.J),SP({type:hO,event:hO,update:hO},Xw.J),SP({type:fO,event:fO,update:fO},Xw.J),SP({type:dO,event:dO,update:dO},Xw.J),SP({type:pO,event:pO,update:pO},Xw.J),xP("light",La),xP("dark",ja);var BP=[],IP={registerPreprocessor:CP,registerProcessor:kP,registerPostInit:function(e){EP("afterinit",e)},registerPostUpdate:function(e){EP("afterupdate",e)},registerUpdateLifecycle:EP,registerAction:SP,registerCoordinateSystem:function(e,t){bB.register(e,t)},registerLayout:function(e,t){TP(mP,e,t,1e3,"layout")},registerVisual:_P,registerTransform:function(e){var t=(e=Object(Xw.d)(e)).type,n=(t||sB(""),t.split(":")),r=(2!==n.length&&sB(""),!1);"echarts"===n[0]&&(t=n[1],r=!0),e.__isBuiltIn=r,qI.set(t,e)},registerLoading:DP,registerMap:function(e,t,n){var r=SR.registerMap;r&&r(e,t,n)},registerImpl:function(e,t){SR[e]=t},PRIORITY:Ta,ComponentModel:jD,ComponentView:PM,SeriesModel:FM,ChartView:sF,registerComponentModel:function(e){jD.registerClass(e)},registerComponentView:function(e){PM.registerClass(e)},registerSeriesModel:function(e){FM.registerClass(e)},registerChartView:function(e){sF.registerClass(e)},registerSubTypeDefaulter:function(e,t){jD.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){lE[e]=t}};function MP(e){Object(Xw.s)(e)?Object(Xw.k)(e,(function(e){MP(e)})):0<=Object(Xw.q)(BP,e)||(BP.push(e),(e=Object(Xw.v)(e)?{install:e}:e).install(IP))}var jP=UE(),NP={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},FP=(RP.prototype.isDimensionOmitted=function(){return this._dimOmitted},RP.prototype._updateDimOmitted=function(e){(this._dimOmitted=e)&&!this._dimNameMap&&(this._dimNameMap=UP(this.source))},RP.prototype.getSourceDimensionIndex=function(e){return Object(Xw.N)(this._dimNameMap.get(e),-1)},RP.prototype.getSourceDimension=function(e){var t=this.source.dimensionsDefine;if(t)return t[e]},RP.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,t=XB(this.source),n=!(30<e),r="",i=[],o=0,a=0;o<e;o++){var s,u=void 0,c=void 0,l=void 0,h=this.dimensions[a];h&&h.storeDimIndex===o?(u=t?h.name:null,c=h.type,l=h.ordinalMeta,a++):(s=this.getSourceDimension(o))&&(u=t?s.name:null,c=s.type),i.push({property:u,type:c,ordinalMeta:l}),!t||null==u||h&&h.isCalculationCoord||(r+=n?u.replace(/\`/g,"`1").replace(/\$/g,"`2"):u),r=r+"$"+(NP[c]||"f"),l&&(r+=l.uid),r+="$"}var f=this.source;return{dimensions:i,hash:[f.seriesLayoutBy,f.startIndex,r].join("$$")}},RP.prototype.makeOutputDimensionNames=function(){for(var e=[],t=0,n=0;t<this._fullDimCount;t++){var r=void 0,i=this.dimensions[n];i&&i.storeDimIndex===t?(i.isCalculationCoord||(r=i.name),n++):(i=this.getSourceDimension(t))&&(r=i.name),e.push(r)}return e},RP.prototype.appendCalculationDimension=function(e){this.dimensions.push(e),e.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},RP);function RP(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}function PP(e){return e instanceof FP}function LP(e){for(var t=Object(Xw.f)(),n=0;n<(e||[]).length;n++){var r=e[n];null!=(r=Object(Xw.z)(r)?r.name:r)&&null==t.get(r)&&t.set(r,n)}return t}function UP(e){var t=jP(e);return t.dimNameMap||(t.dimNameMap=LP(e.dimensionsDefine))}function zP(e,t){return!!t&&t===e.getCalculationInfo("stackedDimension")}var HP="undefined"!=typeof Float32Array,$P=HP?Float32Array:Array;function QP(e){return Object(Xw.s)(e)?HP?new Float32Array(e):e:new $P(e)}function VP(e){return e.get("stack")||"__ec_stack_"+e.seriesIndex}function qP(e){return e.dim+e.index}function GP(e,t){var n=[];return t.eachSeriesByType(e,(function(e){YP(e)&&n.push(e)})),n}function WP(e){var t=function(e){var t,n={},r=(Object(Xw.k)(e,(function(e){var t=e.coordinateSystem.getBaseAxis();if("time"===t.type||"value"===t.type){e=e.getData();for(var r=t.dim+"_"+t.index,i=e.getDimensionIndex(e.mapDimension(t.dim)),o=e.getStore(),a=0,s=o.count();a<s;++a){var u=o.get(i,a);n[r]?n[r].push(u):n[r]=[u]}}})),{});for(t in n)if(n.hasOwnProperty(t)){var i=n[t];if(i){i.sort((function(e,t){return e-t}));for(var o=null,a=1;a<i.length;++a){var s=i[a]-i[a-1];0<s&&(o=null===o?s:Math.min(o,s))}r[t]=o}}return r}(e),n=[];return Object(Xw.k)(e,(function(e){var r,i=e.coordinateSystem.getBaseAxis(),o=i.getExtent(),a=(r="category"===i.type?i.getBandWidth():"value"===i.type||"time"===i.type?(r=i.dim+"_"+i.index,r=t[r],a=Math.abs(o[1]-o[0]),s=i.scale.getExtent(),s=Math.abs(s[1]-s[0]),r?a/s*r:a):(s=e.getData(),Math.abs(o[1]-o[0])/s.count()),gE(e.get("barWidth"),r)),s=(o=gE(e.get("barMaxWidth"),r),gE(e.get("barMinWidth")||(XP(e)?.5:1),r)),u=e.get("barGap"),c=e.get("barCategoryGap");n.push({bandWidth:r,barWidth:a,barMaxWidth:o,barMinWidth:s,barGap:u,barCategoryGap:c,axisKey:qP(i),stackId:VP(e)})})),function(e){var t={},n=(Object(Xw.k)(e,(function(e,n){var r,i=e.axisKey,o=e.bandWidth,a=((a=((a=((r=(o=t[i]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}}).stacks)[i=(t[i]=o,e.stackId)]||o.autoWidthCount++,r[i]=r[i]||{width:0,maxWidth:0},e.barWidth))&&!r[i].width&&(r[i].width=a,a=Math.min(o.remainedWidth,a),o.remainedWidth-=a),e.barMaxWidth))&&(r[i].maxWidth=a),e.barMinWidth);null!=(i=(null!=(r=(a&&(r[i].minWidth=a),e.barGap))&&(o.gap=r),e.barCategoryGap))&&(o.categoryGap=i)})),{});return Object(Xw.k)(t,(function(e,t){n[t]={};var r,i=e.stacks,o=e.bandWidth,a=e.categoryGap,s=(null==a&&(s=Object(Xw.E)(i).length,a=Math.max(35-4*s,15)+"%"),gE(a,o)),u=gE(e.gap,1),c=e.remainedWidth,l=e.autoWidthCount,h=(c-s)/(l+(l-1)*u),f=(h=Math.max(h,0),Object(Xw.k)(i,(function(e){var t,n=e.maxWidth,r=e.minWidth;e.width?(t=e.width,n&&(t=Math.min(t,n)),r&&(t=Math.max(t,r)),e.width=t,c-=t+u*t,l--):(t=h,n&&n<t&&(t=Math.min(n,c)),(t=r&&t<r?r:t)!==h&&(e.width=t,c-=t+u*t,l--))})),h=(c-s)/(l+(l-1)*u),h=Math.max(h,0),0),d=(Object(Xw.k)(i,(function(e,t){e.width||(e.width=h),f+=(r=e).width*(1+u)})),r&&(f-=r.width*u),-f/2);Object(Xw.k)(i,(function(e,r){n[t][r]=n[t][r]||{bandWidth:o,offset:d,width:e.width},d+=e.width*(1+u)}))})),n}(n)}function KP(e,t){var n=WP(e=GP(e,t));Object(Xw.k)(e,(function(e){var t=e.getData(),r=e.coordinateSystem.getBaseAxis(),i=(e=VP(e),e=(r=n[qP(r)][e]).offset,r.width);t.setLayout({bandWidth:r.bandWidth,offset:e,size:i})}))}function YP(e){return e.coordinateSystem&&"cartesian2d"===e.coordinateSystem.type}function XP(e){return e.pipelineContext&&e.pipelineContext.large}var JP={average:function(e){for(var t=0,n=0,r=0;r<e.length;r++)isNaN(e[r])||(t+=e[r],n++);return 0===n?NaN:t/n},sum:function(e){for(var t=0,n=0;n<e.length;n++)t+=e[n]||0;return t},max:function(e){for(var t=-1/0,n=0;n<e.length;n++)e[n]>t&&(t=e[n]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,n=0;n<e.length;n++)e[n]<t&&(t=e[n]);return isFinite(t)?t:NaN},nearest:function(e){return e[0]}},ZP=function(e){return Math.round(e.length/2)};function eL(e){return{seriesType:e,reset:function(e,t,n){var r,i=e.getData(),o=e.get("sampling"),a=e.coordinateSystem,s=i.count();10<s&&"cartesian2d"===a.type&&o&&(r=a.getBaseAxis(),a=a.getOtherAxis(r),r=r.getExtent(),n=n.getDevicePixelRatio(),r=Math.abs(r[1]-r[0])*(n||1),n=Math.round(s/r),isFinite(n)&&1<n&&("lttb"===o&&e.setData(i.lttbDownSample(i.mapDimension(a.dim),1/n)),s=void 0,Object(Xw.B)(o)?s=JP[o]:Object(Xw.v)(o)&&(s=o),s&&e.setData(i.downSample(i.mapDimension(a.dim),1/n,s,ZP))))}}}function tL(e){return null==e?0:e.length||1}function nL(e){return e}function rL(e,t,n,r,i,o){this._old=e,this._new=t,this._oldKeyGetter=n||nL,this._newKeyGetter=r||nL,this.context=i,this._diffModeMultiple="multiple"===o}rL.prototype.add=function(e){return this._add=e,this},rL.prototype.update=function(e){return this._update=e,this},rL.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},rL.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},rL.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},rL.prototype.remove=function(e){return this._remove=e,this},rL.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},rL.prototype._executeOneToOne=function(){var e=this._old,t=this._new,n={},r=new Array(e.length),i=new Array(t.length);this._initIndexMap(e,null,r,"_oldKeyGetter"),this._initIndexMap(t,n,i,"_newKeyGetter");for(var o=0;o<e.length;o++){var a,s=r[o],u=n[s],c=tL(u);1<c?(a=u.shift(),1===u.length&&(n[s]=u[0]),this._update&&this._update(a,o)):1===c?(n[s]=null,this._update&&this._update(u,o)):this._remove&&this._remove(o)}this._performRestAdd(i,n)},rL.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},r={},i=[],o=[];this._initIndexMap(e,n,i,"_oldKeyGetter"),this._initIndexMap(t,r,o,"_newKeyGetter");for(var a=0;a<i.length;a++){var s=i[a],u=n[s],c=r[s],l=tL(u),h=tL(c);if(1<l&&1===h)this._updateManyToOne&&this._updateManyToOne(c,u),r[s]=null;else if(1===l&&1<h)this._updateOneToMany&&this._updateOneToMany(c,u),r[s]=null;else if(1===l&&1===h)this._update&&this._update(c,u),r[s]=null;else if(1<l&&1<h)this._updateManyToMany&&this._updateManyToMany(c,u),r[s]=null;else if(1<l)for(var f=0;f<l;f++)this._remove&&this._remove(u[f]);else this._remove&&this._remove(u)}this._performRestAdd(o,r)},rL.prototype._performRestAdd=function(e,t){for(var n=0;n<e.length;n++){var r=e[n],i=t[r],o=tL(i);if(1<o)for(var a=0;a<o;a++)this._add&&this._add(i[a]);else 1===o&&this._add&&this._add(i);t[r]=null}},rL.prototype._initIndexMap=function(e,t,n,r){for(var i=this._diffModeMultiple,o=0;o<e.length;o++){var a,s,u="_ec_"+this[r](e[o],o);i||(n[o]=u),t&&(0===(s=tL(a=t[u]))?(t[u]=o,i&&n.push(u)):1===s?t[u]=[a,o]:a.push(o))}};var iL=rL,oL=(aL.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},aL.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},aL);function aL(e,t){this._encode=e,this._schema=t}function sL(e,t){return e.hasOwnProperty(t)||(e[t]=[]),e[t]}var uL,cL,lL,hL,fL,dL,pL,mL=function(e){this.otherDims={},null!=e&&Xw.m(this,e)},gL=Xw.z,AL=Xw.G,vL="undefined"==typeof Int32Array?Array:Int32Array,bL=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],yL=["_approximateExtent"];function wL(e,t){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"];for(var n,r,i=!(this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"]),o=(PP(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(i=!0,n=e),n=n||["x","y"],{}),a=[],s={},u=!1,c={},l=0;l<n.length;l++){var h=n[l],f=(h=Xw.B(h)?new mL({name:h}):h instanceof mL?h:new mL(h)).name,d=(h.type=h.type||"float",h.coordDim||(h.coordDim=f,h.coordDimIndex=0),h.otherDims=h.otherDims||{});a.push(f),o[f]=h,null!=c[f]&&(u=!0),h.createInvertedIndices&&(s[f]=[]),0===d.itemName&&(this._nameDimIdx=l),0===d.itemId&&(this._idDimIdx=l),i&&(h.storeDimIndex=l)}this.dimensions=a,this._dimInfos=o,this._initGetDimensionInfo(u),this.hostModel=t,this._invertedIndicesMap=s,this._dimOmitted&&(r=this._dimIdxToName=Xw.f(),Xw.k(a,(function(e){r.set(o[e].storeDimIndex,e)})))}wL.prototype.getDimension=function(e){var t;return null==(t=this._recognizeDimIndex(e))?e:(t=e,this._dimOmitted?null!=(e=this._dimIdxToName.get(t))?e:(e=this._schema.getSourceDimension(t))?e.name:void 0:this.dimensions[t])},wL.prototype.getDimensionIndex=function(e){var t=this._recognizeDimIndex(e);return null!=t?t:null==e?-1:(t=this._getDimInfo(e))?t.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(e):-1},wL.prototype._recognizeDimIndex=function(e){if(Xw.y(e)||null!=e&&!isNaN(e)&&!this._getDimInfo(e)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(e)<0))return+e},wL.prototype._getStoreDimIndex=function(e){return this.getDimensionIndex(e)},wL.prototype.getDimensionInfo=function(e){return this._getDimInfo(this.getDimension(e))},wL.prototype._initGetDimensionInfo=function(e){var t=this._dimInfos;this._getDimInfo=e?function(e){return t.hasOwnProperty(e)?t[e]:void 0}:function(e){return t[e]}},wL.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},wL.prototype.mapDimension=function(e,t){var n=this._dimSummary;return null==t?n.encodeFirstDimNotExtra[e]:(n=n.encode[e])?n[t]:null},wL.prototype.mapDimensionsAll=function(e){return(this._dimSummary.encode[e]||[]).slice()},wL.prototype.getStore=function(){return this._store},wL.prototype.initData=function(e,t,n){var r,i,o=this;(r=e instanceof rM?e:r)||(i=this.dimensions,e=VB(e)||Xw.t(e)?new tI(e,i.length):e,r=new rM,i=AL(i,(function(e){return{type:o._dimInfos[e].type,property:e}})),r.initData(e,i,n)),this._store=r,this._nameList=(t||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,r.count()),this._dimSummary=function(e,t){var n,r={},i=r.encode={},o=Object(Xw.f)(),a=[],s=[],u={},c=(Object(Xw.k)(e.dimensions,(function(t){var n,r,c=e.getDimensionInfo(t),l=c.coordDim;l&&(n=c.coordDimIndex,sL(i,l)[n]=t,c.isExtraCoord||(o.set(l,1),"ordinal"!==(r=c.type)&&"time"!==r&&(a[0]=t),sL(u,l)[n]=e.getDimensionIndex(c.name)),c.defaultTooltip&&s.push(t)),FD.each((function(e,t){var n=sL(i,t);null!=(t=c.otherDims[t])&&!1!==t&&(n[t]=c.name)}))})),[]),l={};return(n=((n=(o.each((function(e,t){var n=i[t];l[t]=n[0],c=c.concat(n)})),r.dataDimsOnCoord=c,r.dataDimIndicesOnCoord=Object(Xw.G)(c,(function(t){return e.getDimensionInfo(t).storeDimIndex})),r.encodeFirstDimNotExtra=l,i.label))&&n.length&&(a=n.slice()),i.tooltip))&&n.length?s=n.slice():s.length||(s=a.slice()),i.defaultedLabel=a,i.defaultedTooltip=s,r.userOutput=new oL(u,t),r}(this,this._schema),this.userOutput=this._dimSummary.userOutput},wL.prototype.appendData=function(e){e=this._store.appendData(e),this._doInit(e[0],e[1])},wL.prototype.appendValues=function(e,t){var n=(e=this._store.appendValues(e,t.length)).start,r=e.end,i=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),t)for(var o=n;o<r;o++)this._nameList[o]=t[o-n],i&&pL(this,o)},wL.prototype._updateOrdinalMeta=function(){for(var e=this._store,t=this.dimensions,n=0;n<t.length;n++){var r=this._dimInfos[t[n]];r.ordinalMeta&&e.collectOrdinalMeta(r.storeDimIndex,r.ordinalMeta)}},wL.prototype._shouldMakeIdFromName=function(){var e=this._store.getProvider();return null==this._idDimIdx&&e.getSource().sourceFormat!==zD&&!e.fillStorage},wL.prototype._doInit=function(e,t){if(!(t<=e)){var n=this._store.getProvider(),r=(this._updateOrdinalMeta(),this._nameList),i=this._idList;if(n.getSource().sourceFormat===RD&&!n.pure)for(var o=[],a=e;a<t;a++){var s,u=n.getItem(a,o);this.hasItemOption||(s=u,!Object(Xw.z)(s)||s instanceof Array)||(this.hasItemOption=!0),u&&(s=u.name,null==r[a]&&null!=s&&(r[a]=FE(s,null)),u=u.id,null==i[a]&&null!=u&&(i[a]=FE(u,null)))}if(this._shouldMakeIdFromName())for(a=e;a<t;a++)pL(this,a);uL(this)}},wL.prototype.getApproximateExtent=function(e){return this._approximateExtent[e]||this._store.getDataExtent(this._getStoreDimIndex(e))},wL.prototype.setApproximateExtent=function(e,t){t=this.getDimension(t),this._approximateExtent[t]=e.slice()},wL.prototype.getCalculationInfo=function(e){return this._calculationInfo[e]},wL.prototype.setCalculationInfo=function(e,t){gL(e)?Xw.m(this._calculationInfo,e):this._calculationInfo[e]=t},wL.prototype.getName=function(e){e=this.getRawIndex(e);var t=this._nameList[e];return null==(t=null==t&&null!=this._nameDimIdx?lL(this,this._nameDimIdx,e):t)?"":t},wL.prototype._getCategory=function(e,t){return t=this._store.get(e,t),(e=this._store.getOrdinalMeta(e))?e.categories[t]:t},wL.prototype.getId=function(e){return cL(this,this.getRawIndex(e))},wL.prototype.count=function(){return this._store.count()},wL.prototype.get=function(e,t){var n=this._store;if(e=this._dimInfos[e])return n.get(e.storeDimIndex,t)},wL.prototype.getByRawIndex=function(e,t){var n=this._store;if(e=this._dimInfos[e])return n.getByRawIndex(e.storeDimIndex,t)},wL.prototype.getIndices=function(){return this._store.getIndices()},wL.prototype.getDataExtent=function(e){return this._store.getDataExtent(this._getStoreDimIndex(e))},wL.prototype.getSum=function(e){return this._store.getSum(this._getStoreDimIndex(e))},wL.prototype.getMedian=function(e){return this._store.getMedian(this._getStoreDimIndex(e))},wL.prototype.getValues=function(e,t){var n=this,r=this._store;return Xw.s(e)?r.getValues(AL(e,(function(e){return n._getStoreDimIndex(e)})),t):r.getValues(e)},wL.prototype.hasValue=function(e){for(var t=this._dimSummary.dataDimIndicesOnCoord,n=0,r=t.length;n<r;n++)if(isNaN(this._store.get(t[n],e)))return!1;return!0},wL.prototype.indexOfName=function(e){for(var t=0,n=this._store.count();t<n;t++)if(this.getName(t)===e)return t;return-1},wL.prototype.getRawIndex=function(e){return this._store.getRawIndex(e)},wL.prototype.indexOfRawIndex=function(e){return this._store.indexOfRawIndex(e)},wL.prototype.rawIndexOf=function(e,t){return null==(e=(e&&this._invertedIndicesMap[e])[t])||isNaN(e)?-1:e},wL.prototype.indicesOfNearest=function(e,t,n){return this._store.indicesOfNearest(this._getStoreDimIndex(e),t,n)},wL.prototype.each=function(e,t,n){Xw.v(e)&&(n=t,t=e,e=[]),n=n||this,e=AL(hL(e),this._getStoreDimIndex,this),this._store.each(e,n?Xw.c(t,n):t)},wL.prototype.filterSelf=function(e,t,n){return Xw.v(e)&&(n=t,t=e,e=[]),n=n||this,e=AL(hL(e),this._getStoreDimIndex,this),this._store=this._store.filter(e,n?Xw.c(t,n):t),this},wL.prototype.selectRange=function(e){var t=this,n={},r=Xw.E(e),i=[];return Xw.k(r,(function(r){var o=t._getStoreDimIndex(r);n[o]=e[r],i.push(o)})),this._store=this._store.selectRange(n),this},wL.prototype.mapArray=function(e,t,n){Xw.v(e)&&(n=t,t=e,e=[]);var r=[];return this.each(e,(function(){r.push(t&&t.apply(this,arguments))}),n=n||this),r},wL.prototype.map=function(e,t,n,r){return n=n||r||this,r=AL(hL(e),this._getStoreDimIndex,this),(e=dL(this))._store=this._store.map(r,n?Xw.c(t,n):t),e},wL.prototype.modify=function(e,t,n,r){n=n||r||this,r=AL(hL(e),this._getStoreDimIndex,this),this._store.modify(r,n?Xw.c(t,n):t)},wL.prototype.downSample=function(e,t,n,r){var i=dL(this);return i._store=this._store.downSample(this._getStoreDimIndex(e),t,n,r),i},wL.prototype.lttbDownSample=function(e,t){var n=dL(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(e),t),n},wL.prototype.getRawDataItem=function(e){return this._store.getRawDataItem(e)},wL.prototype.getItemModel=function(e){var t=this.hostModel;e=this.getRawDataItem(e);return new DT(e,t,t&&t.ecModel)},wL.prototype.diff=function(e){var t=this;return new iL(e?e.getStore().getIndices():[],this.getStore().getIndices(),(function(t){return cL(e,t)}),(function(e){return cL(t,e)}))},wL.prototype.getVisual=function(e){var t=this._visual;return t&&t[e]},wL.prototype.setVisual=function(e,t){this._visual=this._visual||{},gL(e)?Xw.m(this._visual,e):this._visual[e]=t},wL.prototype.getItemVisual=function(e,t){return null==(e=(e=this._itemVisuals[e])&&e[t])?this.getVisual(t):e},wL.prototype.hasItemVisual=function(){return 0<this._itemVisuals.length},wL.prototype.ensureUniqueItemVisual=function(e,t){var n,r=(n=this._itemVisuals)[e];return null==(n=(r=r||(n[e]={}))[t])&&(n=this.getVisual(t),Xw.s(n)?n=n.slice():gL(n)&&(n=Xw.m({},n)),r[t]=n),n},wL.prototype.setItemVisual=function(e,t,n){var r=this._itemVisuals[e]||{};this._itemVisuals[e]=r,gL(t)?Xw.m(r,t):r[t]=n},wL.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},wL.prototype.setLayout=function(e,t){gL(e)?Xw.m(this._layout,e):this._layout[e]=t},wL.prototype.getLayout=function(e){return this._layout[e]},wL.prototype.getItemLayout=function(e){return this._itemLayouts[e]},wL.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?Xw.m(this._itemLayouts[e]||{},t):t},wL.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},wL.prototype.setItemGraphicEl=function(e,t){var n,r,i,o,a=this.hostModel&&this.hostModel.seriesIndex;n=a,r=this.dataType,i=e,(a=t)&&((o=rO(a)).dataIndex=i,o.dataType=r,o.seriesIndex=n,"group"===a.type&&a.traverse((function(e){(e=rO(e)).seriesIndex=n,e.dataIndex=i,e.dataType=r}))),this._graphicEls[e]=t},wL.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},wL.prototype.eachItemGraphicEl=function(e,t){Xw.k(this._graphicEls,(function(n,r){n&&e&&e.call(t,n,r)}))},wL.prototype.cloneShallow=function(e){return e=e||new wL(this._schema||AL(this.dimensions,this._getDimInfo,this),this.hostModel),fL(e,this),e._store=this._store,e},wL.prototype.wrapMethod=function(e,t){var n=this[e];Xw.v(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(Xw.Q(arguments)))})},wL.internalField=(uL=function(e){var t=e._invertedIndicesMap;Xw.k(t,(function(n,r){var i=e._dimInfos[r],o=i.ordinalMeta,a=e._store;if(o){n=t[r]=new vL(o.categories.length);for(var s=0;s<n.length;s++)n[s]=-1;for(s=0;s<a.count();s++)n[a.get(i.storeDimIndex,s)]=s}}))},lL=function(e,t,n){return FE(e._getCategory(t,n),null)},cL=function(e,t){var n=e._idList[t];return null==(n=null==n&&null!=e._idDimIdx?lL(e,e._idDimIdx,t):n)?"e\0\0"+t:n},hL=function(e){return Xw.s(e)?e:null!=e?[e]:[]},dL=function(e){var t=new wL(e._schema||AL(e.dimensions,e._getDimInfo,e),e.hostModel);return fL(t,e),t},fL=function(e,t){Xw.k(bL.concat(t.__wrappedMethods||[]),(function(n){t.hasOwnProperty(n)&&(e[n]=t[n])})),e.__wrappedMethods=t.__wrappedMethods,Xw.k(yL,(function(n){e[n]=Xw.d(t[n])})),e._calculationInfo=Xw.m({},t._calculationInfo)},void(pL=function(e,t){var n=e._nameList,r=e._idList,i=e._nameDimIdx,o=e._idDimIdx,a=n[t],s=r[t];null==a&&null!=i&&(n[t]=a=lL(e,i,t)),null==s&&null!=o&&(r[t]=s=lL(e,o,t)),null==s&&null!=a&&(s=a,1<(i=(n=e._nameRepeatCount)[a]=(n[a]||0)+1)&&(s+="__ec__"+i),r[t]=s)}));var xL=wL;function CL(e,t){VB(e)||(e=GB(e));for(var n,r,i=(t=t||{}).coordDimensions||[],o=t.dimensionsDefine||e.dimensionsDefine||[],a=Object(Xw.f)(),s=[],u=(c=e,n=i,f=t.dimensionsCount,r=Math.max(c.dimensionsDetectedCount||1,n.length,o.length,f||0),Object(Xw.k)(n,(function(e){Object(Xw.z)(e)&&(e=e.dimsDef)&&(r=Math.max(r,e.length))})),r),c=t.canOmitUnusedDimensions&&30<u,l=o===e.dimensionsDefine,h=l?UP(e):LP(o),f=t.encodeDefine,d=(!f&&t.encodeDefaulter&&(f=t.encodeDefaulter(e,u)),Object(Xw.f)(f)),p=new XI(u),m=0;m<p.length;m++)p[m]=-1;function g(e){var t,n,r,i=p[e];return i<0?(t=o[e],t=Object(Xw.z)(t)?t:{name:t},n=new mL,null!=(r=t.name)&&null!=h.get(r)&&(n.name=n.displayName=r),null!=t.type&&(n.type=t.type),null!=t.displayName&&(n.displayName=t.displayName),r=s.length,p[e]=r,n.storeDimIndex=e,s.push(n),n):s[i]}if(!c)for(m=0;m<u;m++)g(m);d.each((function(e,t){var n;1===(e=DE(e).slice()).length&&!Object(Xw.B)(e[0])&&e[0]<0?d.set(t,!1):(n=d.set(t,[]),Object(Xw.k)(e,(function(e,r){null!=(e=Object(Xw.B)(e)?h.get(e):e)&&e<u&&v(g(n[r]=e),t,r)})))}));var A=0;function v(e,t,n){null!=FD.get(t)?e.otherDims[t]=n:(e.coordDim=t,e.coordDimIndex=n,a.set(t,!0))}Object(Xw.k)(i,(function(e){Object(Xw.B)(e)?(i=e,r={}):(i=(r=e).name,e=r.ordinalMeta,r.ordinalMeta=null,(r=Object(Xw.m)({},r)).ordinalMeta=e,t=r.dimsDef,n=r.otherDims,r.name=r.coordDim=r.coordDimIndex=r.dimsDef=r.otherDims=null);var t,n,r,i,o=d.get(i);if(!1!==o){if(!(o=DE(o)).length)for(var a=0;a<(t&&t.length||1);a++){for(;A<u&&null!=g(A).coordDim;)A++;A<u&&o.push(A++)}Object(Xw.k)(o,(function(e,o){e=g(e),l&&null!=r.type&&(e.type=r.type),v(Object(Xw.i)(e,r),i,o),null==e.name&&t&&(o=t[o],Object(Xw.z)(o)||(o={name:o}),e.name=e.displayName=o.name,e.defaultTooltip=o.defaultTooltip),n&&Object(Xw.i)(e.otherDims,n)}))}}));var b=t.generateCoord,y=null!=(w=t.generateCoordCount),w=b?w||1:0,x=b||"value";function C(e){null==e.name&&(e.name=e.coordDim)}if(c)Object(Xw.k)(s,(function(e){C(e)})),s.sort((function(e,t){return e.storeDimIndex-t.storeDimIndex}));else for(var k=0;k<u;k++){var E=g(k);null==E.coordDim&&(E.coordDim=function(e,t,n){if(n||t.hasKey(e)){for(var r=0;t.hasKey(e+r);)r++;e+=r}return t.set(e,!0),e}(x,a,y),E.coordDimIndex=0,(!b||w<=0)&&(E.isExtraCoord=!0),w--),C(E),null!=E.type||JD(e,k)!==VD&&(!E.isExtraCoord||null==E.otherDims.itemName&&null==E.otherDims.seriesName)||(E.type="ordinal")}for(var S=s,_=Object(Xw.f)(),O=0;O<S.length;O++){var T=S[O],D=T.name,B=_.get(D)||0;0<B&&(T.name=D+(B-1)),B++,_.set(D,B)}return new FP({source:e,dimensions:s,fullDimensionCount:u,dimensionOmitted:c})}var kL=function(e){this.coordSysDims=[],this.axisMap=Object(Xw.f)(),this.categoryAxisMap=Object(Xw.f)(),this.coordSysName=e},EL={cartesian2d:function(e,t,n,r){var i=e.getReferringComponents("xAxis",QE).models[0];e=e.getReferringComponents("yAxis",QE).models[0];t.coordSysDims=["x","y"],n.set("x",i),n.set("y",e),SL(i)&&(r.set("x",i),t.firstCategoryDimIndex=0),SL(e)&&(r.set("y",e),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=1))},singleAxis:function(e,t,n,r){e=e.getReferringComponents("singleAxis",QE).models[0],t.coordSysDims=["single"],n.set("single",e),SL(e)&&(r.set("single",e),t.firstCategoryDimIndex=0)},polar:function(e,t,n,r){var i=(e=e.getReferringComponents("polar",QE).models[0]).findAxisModel("radiusAxis");e=e.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],n.set("radius",i),n.set("angle",e),SL(i)&&(r.set("radius",i),t.firstCategoryDimIndex=0),SL(e)&&(r.set("angle",e),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=1))},geo:function(e,t,n,r){t.coordSysDims=["lng","lat"]},parallel:function(e,t,n,r){var i=e.ecModel,o=(e=i.getComponent("parallel",e.get("parallelIndex")),t.coordSysDims=e.dimensions.slice());Object(Xw.k)(e.parallelAxisIndex,(function(e,a){e=i.getComponent("parallelAxis",e);var s=o[a];n.set(s,e),SL(e)&&(r.set(s,e),null==t.firstCategoryDimIndex&&(t.firstCategoryDimIndex=a))}))}};function SL(e){return"category"===e.get("type")}var _L,OL,TL=function(e,t,n){n=n||{};var r,i,o,a,s,u,c=t.getSourceManager(),l=!1,h=(e=(e?(l=!0,r=GB(e)):l=(r=c.getSource()).sourceFormat===RD,function(e){var t=e.get("coordinateSystem"),n=new kL(t);if(t=EL[t])return t(e,n,n.axisMap,n.categoryAxisMap),n}(t)),i=e,h=(h=t).get("coordinateSystem"),h=bB.get(h),f=(f=i&&i.coordSysDims?Xw.G(i.coordSysDims,(function(e){var t={name:e};return(e=i.axisMap.get(e))&&(e=e.get("type"),t.type="category"===(e=e)?"ordinal":"time"===e?"time":"float"),t})):f)||h&&(h.getDimensionsInfo?h.getDimensionsInfo():h.dimensions.slice())||["x","y"]),f=n.useEncodeDefaulter,d=(f=Xw.v(f)?f:f?Xw.h(KD,h,t):null,f=(h=CL(r,{coordDimensions:h,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:f,canOmitUnusedDimensions:!l})).dimensions,o=n.createInvertedIndices,(a=e)&&Xw.k(f,(function(e,t){var n=e.coordDim;(n=a.categoryAxisMap.get(n))&&(null==s&&(s=t),e.ordinalMeta=n.getOrdinalMeta(),o&&(e.createInvertedIndices=!0)),null!=e.otherDims.itemName&&(u=!0)})),u||null==s||(f[s].otherDims.itemName=0),s);e=function(e,t,n){var r,i,o,a,s,u,c,l,h,f=(n=n||{}).byIndex,d=n.stackedCoordDimension,p=(PP(t.schema)?(i=t.schema,r=i.dimensions,o=t.store):r=t,!(!e||!e.get("stack")));return Object(Xw.k)(r,(function(e,t){Object(Xw.B)(e)&&(r[t]=e={name:e}),p&&!e.isExtraCoord&&(f||a||!e.ordinalMeta||(a=e),s||"ordinal"===e.type||"time"===e.type||d&&d!==e.coordDim||(s=e))})),!s||f||a||(f=!0),s&&(u="__\0ecstackresult_"+e.id,c="__\0ecstackedover_"+e.id,a&&(a.createInvertedIndices=!0),l=s.coordDim,n=s.type,h=0,Object(Xw.k)(r,(function(e){e.coordDim===l&&h++})),t={name:u,coordDim:l,coordDimIndex:h,type:n,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:r.length},e={name:c,coordDim:c,coordDimIndex:h+1,type:n,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:r.length+1},i?(o&&(t.storeDimIndex=o.ensureCalculationDimension(c,n),e.storeDimIndex=o.ensureCalculationDimension(u,n)),i.appendCalculationDimension(t),i.appendCalculationDimension(e)):(r.push(t),r.push(e))),{stackedDimension:s&&s.name,stackedByDimension:a&&a.name,isStackedByIndex:f,stackedOverDimension:c,stackResultDimension:u}}(t,{schema:h,store:n=l?null:c.getSharedDataStore(h)}),(f=new xL(h,t)).setCalculationInfo(e),c=null!=d&&function(e){if(e.sourceFormat===RD)return e=function(e){for(var t=0;t<e.length&&null==e[t];)t++;return e[t]}(e.data||[]),!Xw.s(ME(e))}(r)?function(e,t,n,r){return r===d?n:this.defaultDimValueGetter(e,t,n,r)}:null;return f.hasItemOption=!1,f.initData(l?r:n,null,c),f};Kw(DL,_L=FM),DL.prototype.getInitialData=function(e,t){return TL(null,this,{useEncodeDefaulter:!0})},DL.prototype.getMarkerPosition=function(e,t,n){var r,i,o=this.coordinateSystem;return o&&o.clampData?(r=o.clampData(e),i=o.dataToPoint(r),n?Object(Xw.k)(o.getAxes(),(function(e,n){if("category"===e.type&&null!=t){var o=e.getTicksCoords(),a=r[n],s="x1"===t[n]||"y1"===t[n];if(s&&(a+=1),!(o.length<2))if(2===o.length)i[n]=e.toGlobalCoord(e.getExtent()[s?1:0]);else{for(var u=void 0,c=void 0,l=1,h=0;h<o.length;h++){var f=o[h].coord,d=h===o.length-1?o[h-1].tickValue+l:o[h].tickValue;if(d===a){c=f;break}if(d<a)u=f;else if(null!=u&&a<d){c=(f+u)/2;break}1===h&&(l=d-o[0].tickValue)}null==c&&(c=(u?o[o.length-1]:o[0]).coord),i[n]=e.toGlobalCoord(c)}}})):(n=(e=this.getData()).getLayout("offset"),e=e.getLayout("size"),o=o.getBaseAxis().isHorizontal()?0:1,i[o]+=n+e/2),i):[NaN,NaN]},DL.type="series.__base_bar__",DL.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},zi=DL;function DL(){var e=null!==_L&&_L.apply(this,arguments)||this;return e.type=DL.type,e}function BL(){var e=null!==OL&&OL.apply(this,arguments)||this;return e.type=BL.type,e}FM.registerClass(zi),Kw(BL,OL=ca=zi),BL.prototype.getInitialData=function(){return TL(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},BL.prototype.getProgressive=function(){return!!this.get("large")&&this.get("progressive")},BL.prototype.getProgressiveThreshold=function(){var e=this.get("progressiveThreshold"),t=this.get("largeThreshold");return e<t?t:e},BL.prototype.brushSelector=function(e,t,n){return n.rect(t.getItemLayout(e))},BL.type="series.bar",BL.dependencies=["grid","polar"],BL.defaultOption=MT(ca.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1});var IL=BL;function ML(e,t,n,r,i){var o=(u=e.getArea()).x,a=u.y,s=u.width,u=u.height,c=n.get(["lineStyle","width"])||2,l=(o-=c/2,a-=c/2,s+=c,u+=c,o=Math.floor(o),s=Math.round(s),new z_({shape:{x:o,y:a,width:s,height:u}}));return t&&(t=(c=e.getBaseAxis()).isHorizontal(),e=c.inverse,t?(e&&(l.shape.x+=s),l.shape.width=0):(e||(l.shape.y+=u),l.shape.height=0),c=Object(Xw.v)(i)?function(e){i(e,l)}:null,nT(l,{shape:{width:s,height:u,x:o,y:a}},n,null,r,c)),l}function jL(e,t,n){var r=e.getArea(),i=AE(r.r0,1),o=AE(r.r,1),a=new Bj({shape:{cx:AE(e.cx,1),cy:AE(e.cy,1),r0:i,r:o,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}});return t&&("angle"===e.getBaseAxis().dim?a.shape.endAngle=r.startAngle:a.shape.r=i,nT(a,{shape:{endAngle:r.endAngle,r:o}},n)),a}var NL,FL=function(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=2*Math.PI,this.clockwise=!0};function RL(e){return(e=NL.call(this,e)||this).type="sausage",e}Kw(RL,NL=C_),RL.prototype.getDefaultShape=function(){return new FL},RL.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.max(t.r0||0,0),o=Math.max(t.r,0),a=.5*(o-i),s=i+a,u=t.startAngle,c=t.endAngle,l=(t=t.clockwise,2*Math.PI),h=t?c-u<l:u-c<l,f=(l=(h||(u=c-(t?l:-l)),Math.cos(u)),Math.sin(u)),d=Math.cos(c),p=Math.sin(c);h?(e.moveTo(l*i+n,f*i+r),e.arc(l*s+n,f*s+r,a,-Math.PI+u,u,!t)):e.moveTo(l*o+n,f*o+r),e.arc(n,r,o,u,c,!t),e.arc(d*s+n,p*s+r,a,c-2*Math.PI,c-Math.PI,!t),0!==i&&e.arc(n,r,i,c,u,t)};var PL=RL;function LL(e,t){return e.type===t}function UL(e,t){var n,r=e.mapDimensionsAll("defaultedLabel"),i=r.length;if(1===i)return null!=(n=pI(e,t,r[0]))?n+"":null;if(i){for(var o=[],a=0;a<r.length;a++)o.push(pI(e,t,r[a]));return o.join(" ")}}function zL(e,t){var n=e.mapDimensionsAll("defaultedLabel");if(!Object(Xw.s)(t))return t+"";for(var r=[],i=0;i<n.length;i++){var o=e.getDimensionIndex(n[i]);0<=o&&r.push(t[o])}return r.join(" ")}function HL(e,t,n){return t*Math.sin(e)*(n?-1:1)}function $L(e,t,n){return t*Math.cos(e)*(n?1:-1)}function QL(e,t,n){if(null==(e=e.get("borderRadius")))return n?{cornerRadius:0}:null;Object(Xw.s)(e)||(e=[e,e,e,e]);var r=Math.abs(t.r||0-t.r0||0);return{cornerRadius:Object(Xw.G)(e,(function(e){return Yk(e,r)}))}}var VL=Math.max,qL=Math.min;Kw(WL,GL=sF),WL.prototype.render=function(e,t,n,r){this._model=e,this._removeOnRenderedListener(n),this._updateDrawMode(e);var i=e.get("coordinateSystem");"cartesian2d"!==i&&"polar"!==i||(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(e,t,n):this._renderNormal(e,t,n,r))},WL.prototype.incrementalPrepareRender=function(e){this._clear(),this._updateDrawMode(e),this._updateLargeClip(e)},WL.prototype.incrementalRender=function(e,t){this._progressiveEls=[],this._incrementalRenderLarge(e,t)},WL.prototype.eachRendered=function(e){JN(this._progressiveEls||this.group,e)},WL.prototype._updateDrawMode=function(e){e=e.pipelineContext.large,null!=this._isLargeDraw&&e===this._isLargeDraw||(this._isLargeDraw=e,this._clear())},WL.prototype._renderNormal=function(e,t,n,r){var i,o,a,s=this.group,u=e.getData(),c=this._data,l=e.coordinateSystem,h=l.getBaseAxis(),f=("cartesian2d"===l.type?i=h.isHorizontal():"polar"===l.type&&(i="angle"===h.dim),e.isAnimationEnabled()?e:null),d=function(e,t){e=e.get("realtimeSort",!0);var n=t.getBaseAxis();if(e&&"category"===n.type&&"cartesian2d"===t.type)return{baseAxis:n,otherAxis:t.getOtherAxis(n)}}(e,l),p=(d&&this._enableRealtimeSort(d,u,n),e.get("clip",!0)||d),m=(n=u,a=(o=l).getArea&&o.getArea(),!LL(o,"cartesian2d")||"category"===(o=o.getBaseAxis()).type&&o.onBand||(n=n.getLayout("bandWidth"),o.isHorizontal()?(a.x-=n,a.width+=2*n):(a.y-=n,a.height+=2*n)),a),g=(s.removeClipPath(),e.get("roundCap",!0)),A=e.get("showBackground",!0),v=e.getModel("backgroundStyle"),b=v.get("borderRadius")||0,y=[],w=this._backgroundEls,x=r&&r.isInitSort,C=r&&"changeAxisOrder"===r.type;function k(e){var t=nU[l.type](u,e),n=(n=i,new("polar"===l.type?Bj:z_)({shape:hU(n,t,l),silent:!0,z2:0}));return n.useStyle(v.getItemStyle()),"cartesian2d"===l.type?n.setShape("r",b):n.setShape("cornerRadius",b),y[e]=n}u.diff(c).add((function(t){var n,r,o=u.getItemModel(t),a=nU[l.type](u,t,o);A&&k(t),u.hasValue(t)&&tU[l.type](a)&&(n=!1,p&&(n=KL[l.type](m,a)),r=YL[l.type](e,u,t,a,i,f,h.model,!1,g),d&&(r.forceLabelAnimation=!0),iU(r,u,t,o,a,e,i,"polar"===l.type),x?r.attr({shape:a}):d?XL(d,f,r,a,t,i,!1,!1):nT(r,{shape:a},e,t),u.setItemGraphicEl(t,r),s.add(r),r.ignore=n)})).update((function(t,n){var r,o=u.getItemModel(t),a=nU[l.type](u,t,o),E=(A&&(E=void 0,0===w.length?E=k(n):((E=w[n]).useStyle(v.getItemStyle()),"cartesian2d"===l.type?E.setShape("r",b):E.setShape("cornerRadius",b),y[t]=E),r=nU[l.type](u,t),tT(E,{shape:hU(i,r,l)},f,t)),c.getItemGraphicEl(n));u.hasValue(t)&&tU[l.type](a)?(r=!1,p&&(r=KL[l.type](m,a))&&s.remove(E),E?sT(E):E=YL[l.type](e,u,t,a,i,f,h.model,!!E,g),d&&(E.forceLabelAnimation=!0),C?(n=E.getTextContent())&&null!=(n=bT(n)).prevValue&&(n.prevValue=n.value):iU(E,u,t,o,a,e,i,"polar"===l.type),x?E.attr({shape:a}):d?XL(d,f,E,a,t,i,!0,C):tT(E,{shape:a},e,t,null),u.setItemGraphicEl(t,E),E.ignore=r,s.add(E)):s.remove(E)})).remove((function(t){var n=c.getItemGraphicEl(t);n&&aT(n,e,t)})).execute();var E=this._backgroundGroup||(this._backgroundGroup=new cE);E.removeAll();for(var S=0;S<y.length;++S)E.add(y[S]);s.add(E),this._backgroundEls=y,this._data=u},WL.prototype._renderLarge=function(e,t,n){this._clear(),cU(e,this.group),this._updateLargeClip(e)},WL.prototype._incrementalRenderLarge=function(e,t){this._removeBackground(),cU(t,this.group,this._progressiveEls,!0)},WL.prototype._updateLargeClip=function(e){var t=e.get("clip",!0)&&(t=e.coordinateSystem,n=!1,e=e,t?"polar"===t.type?jL(t,n,e):"cartesian2d"===t.type?ML(t,n,e,void 0,void 0):null:null),n=this.group;t?n.setClipPath(t):n.removeClipPath()},WL.prototype._enableRealtimeSort=function(e,t,n){var r,i,o=this;t.count()&&(r=e.baseAxis,this._isFirstFrame?(this._dispatchInitSort(t,e,n),this._isFirstFrame=!1):(i=function(e){return(e=(e=t.getItemGraphicEl(e))&&e.shape)&&Math.abs(r.isHorizontal()?e.height:e.width)||0},this._onRendered=function(){o._updateSortWithinSameData(t,i,r,n)},n.getZr().on("rendered",this._onRendered)))},WL.prototype._dataSort=function(e,t,n){var r=[];return e.each(e.mapDimension(t.dim),(function(e,t){var i=null==(i=n(t))?NaN:i;r.push({dataIndex:t,mappedValue:i,ordinalNumber:e})})),r.sort((function(e,t){return t.mappedValue-e.mappedValue})),{ordinalNumbers:Object(Xw.G)(r,(function(e){return e.ordinalNumber}))}},WL.prototype._isOrderChangedWithinSameData=function(e,t,n){for(var r=n.scale,i=e.mapDimension(n.dim),o=Number.MAX_VALUE,a=0,s=r.getOrdinalMeta().categories.length;a<s;++a){var u;if(o<(u=(u=e.rawIndexOf(i,r.getRawOrdinalNumber(a)))<0?Number.MIN_VALUE:t(e.indexOfRawIndex(u))))return!0;o=u}return!1},WL.prototype._isOrderDifferentInView=function(e,t){for(var n=t.scale,r=(t=n.getExtent(),Math.max(0,t[0])),i=Math.min(t[1],n.getOrdinalMeta().categories.length-1);r<=i;++r)if(e.ordinalNumbers[r]!==n.getRawOrdinalNumber(r))return!0},WL.prototype._updateSortWithinSameData=function(e,t,n,r){this._isOrderChangedWithinSameData(e,t,n)&&(e=this._dataSort(e,n,t),this._isOrderDifferentInView(e,n)&&(this._removeOnRenderedListener(r),r.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:e})))},WL.prototype._dispatchInitSort=function(e,t,n){var r=t.baseAxis,i=this._dataSort(e,r,(function(n){return e.get(e.mapDimension(t.otherAxis.dim),n)}));n.dispatchAction({type:"changeAxisOrder",componentType:r.dim+"Axis",isInitSort:!0,axisId:r.index,sortInfo:i})},WL.prototype.remove=function(e,t){this._clear(this._model),this._removeOnRenderedListener(t)},WL.prototype.dispose=function(e,t){this._removeOnRenderedListener(t)},WL.prototype._removeOnRenderedListener=function(e){this._onRendered&&(e.getZr().off("rendered",this._onRendered),this._onRendered=null)},WL.prototype._clear=function(e){var t=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl((function(t){aT(t,e,rO(t).dataIndex)}))):t.removeAll(),this._data=null,this._isFirstFrame=!0},WL.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},WL.type="bar";var GL;Wo=WL;function WL(){var e=GL.call(this)||this;return e.type=WL.type,e._isFirstFrame=!0,e}var KL={cartesian2d:function(e,t){var n=t.width<0?-1:1,r=t.height<0?-1:1,i=(n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height),e.x+e.width),o=e.y+e.height,a=VL(t.x,e.x),s=qL(t.x+t.width,i),u=(e=VL(t.y,e.y),qL(t.y+t.height,o)),c=s<a,l=u<e;return t.x=c&&i<a?s:a,t.y=l&&o<e?u:e,t.width=c?0:s-a,t.height=l?0:u-e,n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height),c||l},polar:function(e,t){var n,r=t.r0<=t.r?1:-1,i=(r<0&&(n=t.r,t.r=t.r0,t.r0=n),qL(t.r,e.r));e=VL(t.r0,e.r0),i=(t.r=i)-(t.r0=e)<0;return r<0&&(n=t.r,t.r=t.r0,t.r0=n),i}},YL={cartesian2d:function(e,t,n,r,i,o,a,s,u){return(r=new z_({shape:Object(Xw.m)({},r),z2:1})).__dataIndex=n,r.name="item",o&&(r.shape[i?"height":"width"]=0),r},polar:function(e,t,n,r,i,o,a,s,u){var c,l,h=new(u=!i&&u?PL:Bj)({shape:r,z2:1}),f=(h.name="item",rU(i));return h.calculateTextPosition=(c=f,l=({isRoundCap:u===PL}||{}).isRoundCap,function(e,t,n){if(!(r=t.position)||r instanceof Array)return Xk(e,t,n);var r=c(r),i=null!=t.distance?t.distance:5,o=this.shape,a=o.cx,s=o.cy,u=o.r,h=o.r0,f=(u+h)/2,d=o.startAngle,p=o.endAngle,m=(d+p)/2,g=l?Math.abs(u-h)/2:0,A=Math.cos,v=Math.sin,b=a+u*A(d),y=s+u*v(d),w="left",x="top";switch(r){case"startArc":b=a+(h-i)*A(m),y=s+(h-i)*v(m),w="center",x="top";break;case"insideStartArc":b=a+(h+i)*A(m),y=s+(h+i)*v(m),w="center",x="bottom";break;case"startAngle":b=a+f*A(d)+HL(d,i+g,!1),y=s+f*v(d)+$L(d,i+g,!1),w="right",x="middle";break;case"insideStartAngle":b=a+f*A(d)+HL(d,g-i,!1),y=s+f*v(d)+$L(d,g-i,!1),w="left",x="middle";break;case"middle":b=a+f*A(m),y=s+f*v(m),w="center",x="middle";break;case"endArc":b=a+(u+i)*A(m),y=s+(u+i)*v(m),w="center",x="bottom";break;case"insideEndArc":b=a+(u-i)*A(m),y=s+(u-i)*v(m),w="center",x="top";break;case"endAngle":b=a+f*A(p)+HL(p,i+g,!0),y=s+f*v(p)+$L(p,i+g,!0),w="left",x="middle";break;case"insideEndAngle":b=a+f*A(p)+HL(p,g-i,!0),y=s+f*v(p)+$L(p,g-i,!0),w="right",x="middle";break;default:return Xk(e,t,n)}return(e=e||{}).x=b,e.y=y,e.align=w,e.verticalAlign=x,e}),o&&(f={},h.shape[u=i?"r":"endAngle"]=i?r.r0:r.startAngle,f[u]=r[u],(s?tT:nT)(h,{shape:f},o)),h}};function XL(e,t,n,r,i,o,a,s){var u;o=o?(u={x:r.x,width:r.width},{y:r.y,height:r.height}):(u={y:r.y,height:r.height},{x:r.x,width:r.width});s||(a?tT:nT)(n,{shape:o},t,i,null),(a?tT:nT)(n,{shape:u},t?e.baseAxis.model:null,i)}function JL(e,t){for(var n=0;n<t.length;n++)if(!isFinite(e[t[n]]))return 1}var ZL=["x","y","width","height"],eU=["cx","cy","r","startAngle","endAngle"],tU={cartesian2d:function(e){return!JL(e,ZL)},polar:function(e){return!JL(e,eU)}},nU={cartesian2d:function(e,t,n){e=e.getItemLayout(t);var r=n&&(t=e,(r=(n=n).get(["itemStyle","borderColor"]))&&"none"!==r)?(r=n.get(["itemStyle","borderWidth"])||0,n=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),t=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height),Math.min(r,n,t)):0;n=0<e.width?1:-1,t=0<e.height?1:-1;return{x:e.x+n*r/2,y:e.y+t*r/2,width:e.width-n*r,height:e.height-t*r}},polar:function(e,t,n){return{cx:(e=e.getItemLayout(t)).cx,cy:e.cy,r0:e.r0,r:e.r,startAngle:e.startAngle,endAngle:e.endAngle,clockwise:e.clockwise}}};function rU(e){return t=e?"Arc":"Angle",function(e){switch(e){case"start":case"insideStart":case"end":case"insideEnd":return e+t;default:return e}};var t}function iU(e,t,n,r,i,o,a,s){var u=t.getItemVisual(n,"style"),c=((l=(s?o.get("roundCap")||(l=e.shape,c=QL(r.getModel("itemStyle"),l,!0),Object(Xw.m)(l,c),e.setShape(l)):(c=r.get(["itemStyle","borderRadius"])||0,e.setShape("r",c)),e.useStyle(u),r.getShallow("cursor")))&&e.attr("cursor",l),s?a?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":a?0<=i.height?"bottom":"top":0<=i.width?"right":"left"),l=(u=(hT(e,l=fT(r),{labelFetcher:o,labelDataIndex:n,defaultText:UL(o.getData(),n),inheritColor:u.fill,defaultOpacity:u.opacity,defaultOutsidePosition:c}),e.getTextContent()),s&&u&&(s=r.get(["label","position"]),e.textConfig.inside="middle"===s||null,function(e,t,n,r){if(Object(Xw.y)(r))e.setTextConfig({rotation:r});else if(Object(Xw.s)(t))e.setTextConfig({rotation:0});else{var i,o=(r=e.shape).clockwise?r.startAngle:r.endAngle,a=r.clockwise?r.endAngle:r.startAngle,s=(o+a)/2;switch(r=n(t)){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":i=s;break;case"startAngle":case"insideStartAngle":i=o;break;case"endAngle":case"insideEndAngle":i=a;break;default:return e.setTextConfig({rotation:0})}n=1.5*Math.PI-i,"middle"===r&&n>Math.PI/2&&n<1.5*Math.PI&&(n-=Math.PI),e.setTextConfig({rotation:n})}}(e,"outside"===s?c:s,rU(a),r.get(["label","rotate"]))),c=u,s=l,a=o.getRawValue(n),u=function(e){return zL(t,e)},c&&((c=bT(c)).prevValue=c.value,c.value=a,a=s.normal,c.valueAnimation=a.get("valueAnimation"),c.valueAnimation&&(c.precision=a.get("precision"),c.defaultInterpolatedText=u,c.statesModels=s)),r.getModel(["emphasis"]));QO(e,l.get("focus"),l.get("blurScope"),l.get("disabled")),GO(e,r),null!=(o=i).startAngle&&null!=o.endAngle&&o.startAngle===o.endAngle&&(e.style.fill="none",e.style.stroke="none",Object(Xw.k)(e.states,(function(e){e.style&&(e.style.fill=e.style.stroke="none")})))}var oU,aU=function(){},sU=(Kw(uU,oU=C_),uU.prototype.getDefaultShape=function(){return new aU},uU.prototype.buildPath=function(e,t){for(var n=t.points,r=this.baseDimIdx,i=1-this.baseDimIdx,o=[],a=[],s=this.barWidth,u=0;u<n.length;u+=3)a[r]=s,a[i]=n[u+2],o[r]=n[u+r],o[i]=n[u+i],e.rect(o[0],o[1],a[0],a[1])},uU);function uU(e){return(e=oU.call(this,e)||this).type="largeBar",e}function cU(e,t,n,r){var i=e.getData(),o=i.getLayout("valueAxisHorizontal")?1:0,a=i.getLayout("largeDataIndices"),s=i.getLayout("size"),u=e.getModel("backgroundStyle"),c=i.getLayout("largeBackgroundPoints");(u=(c&&((c=new sU({shape:{points:c},incremental:!!r,silent:!0,z2:0})).baseDimIdx=o,c.largeDataIndices=a,c.barWidth=s,c.useStyle(u.getItemStyle()),t.add(c),n&&n.push(c)),new sU({shape:{points:i.getLayout("largePoints")},incremental:!!r,ignoreCoarsePointer:!0,z2:1}))).baseDimIdx=o,u.largeDataIndices=a,u.barWidth=s,t.add(u),u.useStyle(i.getVisual("style")),rO(u).seriesIndex=e.seriesIndex,e.get("silent")||(u.on("mousedown",lU),u.on("mousemove",lU)),n&&n.push(u)}var lU=hF((function(e){e=function(e,t,n){for(var r=e.baseDimIdx,i=1-r,o=e.shape.points,a=e.largeDataIndices,s=[],u=[],c=e.barWidth,l=0,h=o.length/3;l<h;l++){var f=3*l;if(u[r]=c,u[i]=o[2+f],s[r]=o[f+r],s[i]=o[f+i],u[i]<0&&(s[i]+=u[i],u[i]=-u[i]),t>=s[0]&&t<=s[0]+u[0]&&n>=s[1]&&n<=s[1]+u[1])return a[l]}return-1}(this,e.offsetX,e.offsetY),rO(this).dataIndex=0<=e?e:null}),30,!1);function hU(e,t,n){var r,i;return LL(n,"cartesian2d")?(r=t,i=n.getArea(),{x:(e?r:i).x,y:(e?i:r).y,width:(e?r:i).width,height:(e?i:r).height}):{cx:(i=n.getArea()).cx,cy:i.cy,r0:(e?i:t).r0,r:(e?i:t).r,startAngle:e?t.startAngle:0,endAngle:e?t.endAngle:2*Math.PI}}var fU,dU=Wo;function pU(){var e=null!==fU&&fU.apply(this,arguments)||this;return e.type=pU.type,e.hasSymbolVisual=!0,e}Kw(pU,fU=FM),pU.prototype.getInitialData=function(e){return TL(null,this,{useEncodeDefaulter:!0})},pU.prototype.getLegendIcon=function(e){var t=new cE,n=XF("line",0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1),r=(n=(t.add(n),n.setStyle(e.lineStyle),this.getData().getVisual("symbol")),this.getData().getVisual("symbolRotate")),i=(n="none"===n?"circle":n,.8*e.itemHeight);i=XF(n,(e.itemWidth-i)/2,(e.itemHeight-i)/2,i,i,e.itemStyle.fill),t.add(i),i.setStyle(e.itemStyle),r="inherit"===e.iconRotate?r:e.iconRotate||0;return i.rotation=r*Math.PI/180,i.setOrigin([e.itemWidth/2,e.itemHeight/2]),-1<n.indexOf("empty")&&(i.style.stroke=i.style.fill,i.style.fill="#fff",i.style.lineWidth=2),t},pU.type="series.line",pU.dependencies=["grid","polar"],pU.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1};var mU,gU=pU;function AU(e,t,n,r){var i=mU.call(this)||this;return i.updateData(e,t,n,r),i}function vU(e,t){this.parent.drift(e,t)}Kw(AU,mU=cE),AU.prototype._createSymbol=function(e,t,n,r,i){this.removeAll(),(i=XF(e,-1,-1,2,2,null,i)).attr({z2:100,culling:!0,scaleX:r[0]/2,scaleY:r[1]/2}),i.drift=vU,this._symbolType=e,this.add(i)},AU.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},AU.prototype.getSymbolType=function(){return this._symbolType},AU.prototype.getSymbolPath=function(){return this.childAt(0)},AU.prototype.highlight=function(){IO(this.childAt(0))},AU.prototype.downplay=function(){MO(this.childAt(0))},AU.prototype.setZ=function(e,t){var n=this.childAt(0);n.zlevel=e,n.z=t},AU.prototype.setDraggable=function(e,t){var n=this.childAt(0);n.draggable=e,n.cursor=!t&&e?"move":n.cursor},AU.prototype.updateData=function(e,t,n,r){this.silent=!1;var i,o,a,s=e.getItemVisual(t,"symbol")||"circle",u=e.hostModel,c=AU.getSymbolSize(e,t),l=s!==this._symbolType,h=r&&r.disableAnimation;l?(i=e.getItemVisual(t,"symbolKeepAspect"),this._createSymbol(s,e,t,c,i)):((o=this.childAt(0)).silent=!1,a={scaleX:c[0]/2,scaleY:c[1]/2},h?o.attr(a):tT(o,a,u,t),sT(o)),this._updateCommon(e,t,c,n,r),l&&(o=this.childAt(0),h||(a={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:o.style.opacity}},o.scaleX=o.scaleY=0,o.style.opacity=0,nT(o,a,u,t))),h&&this.childAt(0).stopAnimation("leave")},AU.prototype._updateCommon=function(e,t,n,r,i){var o,a,s,u,c,l,h,f,d=this.childAt(0),p=e.hostModel,m=(r&&(o=r.emphasisItemStyle,s=r.blurItemStyle,a=r.selectItemStyle,u=r.focus,c=r.blurScope,h=r.labelStatesModels,f=r.hoverScale,g=r.cursorStyle,l=r.emphasisDisabled),r&&!e.hasItemOption||(o=(m=(r=r&&r.itemModel?r.itemModel:e.getItemModel(t)).getModel("emphasis")).getModel("itemStyle").getItemStyle(),a=r.getModel(["select","itemStyle"]).getItemStyle(),s=r.getModel(["blur","itemStyle"]).getItemStyle(),u=m.get("focus"),c=m.get("blurScope"),l=m.get("disabled"),h=fT(r),f=m.getShallow("scale"),g=r.getShallow("cursor")),e.getItemVisual(t,"symbolRotate")),g=(r=(m=((r=(d.attr("rotation",(m||0)*Math.PI/180||0),JF(e.getItemVisual(t,"symbolOffset"),n)))&&(d.x=r[0],d.y=r[1]),g&&d.attr("cursor",g),e.getItemVisual(t,"style"))).fill,d instanceof B_?(g=d.style,d.useStyle(Object(Xw.m)({image:g.image,x:g.x,y:g.y,width:g.width,height:g.height},m))):(d.__isEmptyBrush?d.useStyle(Object(Xw.m)({},m)):d.useStyle(m),d.style.decal=null,d.setColor(r,i&&i.symbolInnerColor),d.style.strokeNoScale=!0),e.getItemVisual(t,"liftZ")),A=this._z2,v=(null!=g?null==A&&(this._z2=d.z2,d.z2+=g):null!=A&&(d.z2=A,this._z2=null),i&&i.useNameLabel);hT(d,h,{labelFetcher:p,labelDataIndex:t,defaultText:function(t){return v?e.getName(t):UL(e,t)},inheritColor:r,defaultOpacity:m.opacity}),this._sizeX=n[0]/2,this._sizeY=n[1]/2,(g=d.ensureState("emphasis")).style=o,d.ensureState("select").style=a,d.ensureState("blur").style=s,A=null==f||!0===f?Math.max(1.1,3/this._sizeY):isFinite(f)&&0<f?+f:1,g.scaleX=this._sizeX*A,g.scaleY=this._sizeY*A,this.setSymbolScale(1),QO(this,u,c,l)},AU.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},AU.prototype.fadeOut=function(e,t,n){var r=this.childAt(0),i=rO(this).dataIndex,o=n&&n.animation;this.silent=r.silent=!0,n&&n.fadeLabel?(n=r.getTextContent())&&iT(n,{style:{opacity:0}},t,{dataIndex:i,removeOpt:o,cb:function(){r.removeTextContent()}}):r.removeTextContent(),iT(r,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:i,cb:e,removeOpt:o})},AU.getSymbolSize=function(e,t){return e=e.getItemVisual(t,"symbolSize"),[(e=Object(Xw.s)(e)?e:[+e,+e])[0]||0,e[1]||0]};var bU=AU;function yU(e,t,n,r){return t&&!isNaN(t[0])&&!isNaN(t[1])&&(!r.isIgnore||!r.isIgnore(n))&&(!r.clipShape||r.clipShape.contain(t[0],t[1]))&&"none"!==e.getItemVisual(n,"symbol")}function wU(e){return(e=null==e||Object(Xw.z)(e)?e:{isIgnore:e})||{}}function xU(e){var t=(e=e.hostModel).getModel("emphasis");return{emphasisItemStyle:t.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:t.get("focus"),blurScope:t.get("blurScope"),emphasisDisabled:t.get("disabled"),hoverScale:t.get("scale"),labelStatesModels:fT(e),cursorStyle:e.get("cursor")}}function CU(e){this.group=new cE,this._SymbolCtor=e||bU}CU.prototype.updateData=function(e,t){this._progressiveEls=null,t=wU(t);var n=this.group,r=e.hostModel,i=this._data,o=this._SymbolCtor,a=t.disableAnimation,s=xU(e),u={disableAnimation:a},c=t.getSymbolPoint||function(t){return e.getItemLayout(t)};i||n.removeAll(),e.diff(i).add((function(r){var i,a=c(r);yU(e,a,r,t)&&((i=new o(e,r,s,u)).setPosition(a),e.setItemGraphicEl(r,i),n.add(i))})).update((function(l,h){h=i.getItemGraphicEl(h);var f,d,p=c(l);yU(e,p,l,t)?(f=e.getItemVisual(l,"symbol")||"circle",d=h&&h.getSymbolType&&h.getSymbolType(),!h||d&&d!==f?(n.remove(h),(h=new o(e,l,s,u)).setPosition(p)):(h.updateData(e,l,s,u),d={x:p[0],y:p[1]},a?h.attr(d):tT(h,d,r)),n.add(h),e.setItemGraphicEl(l,h)):n.remove(h)})).remove((function(e){var t=i.getItemGraphicEl(e);t&&t.fadeOut((function(){n.remove(t)}),r)})).execute(),this._getSymbolPoint=c,this._data=e},CU.prototype.updateLayout=function(){var e=this,t=this._data;t&&t.eachItemGraphicEl((function(t,n){n=e._getSymbolPoint(n),t.setPosition(n),t.markRedraw()}))},CU.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=xU(e),this._data=null,this.group.removeAll()},CU.prototype.incrementalUpdate=function(e,t,n){function r(e){e.isGroup||(e.incremental=!0,e.ensureState("emphasis").hoverLayer=!0)}this._progressiveEls=[],n=wU(n);for(var i=e.start;i<e.end;i++){var o,a=t.getItemLayout(i);yU(t,a,i,n)&&((o=new this._SymbolCtor(t,i,this._seriesScope)).traverse(r),o.setPosition(a),this.group.add(o),t.setItemGraphicEl(i,o),this._progressiveEls.push(o))}},CU.prototype.eachRendered=function(e){JN(this._progressiveEls||this.group,e)},CU.prototype.remove=function(e){var t=this.group,n=this._data;n&&e?n.eachItemGraphicEl((function(e){e.fadeOut((function(){t.remove(e)}),n.hostModel)})):t.removeAll()};var kU=CU;function EU(e,t,n){var r=e.getBaseAxis(),i=(n=function(e,t){var n=0;e=e.scale.getExtent();return"start"===t?n=e[0]:"end"===t?n=e[1]:Object(Xw.y)(t)&&!isNaN(t)?n=t:0<e[0]?n=e[0]:e[1]<0&&(n=e[1]),n}(i=e.getOtherAxis(r),n),r=r.dim,i.dim),o=t.mapDimension(i),a=t.mapDimension(r),s="x"===i||"radius"===i?1:0,u=(e=Object(Xw.G)(e.dimensions,(function(e){return t.mapDimension(e)})),!1),c=t.getCalculationInfo("stackResultDimension");return zP(t,e[0])&&(u=!0,e[0]=c),zP(t,e[1])&&(u=!0,e[1]=c),{dataDimsForPoint:e,valueStart:n,valueAxisDim:i,baseAxisDim:r,stacked:!!u,valueDim:o,baseDim:a,baseDataOffset:s,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}}function SU(e,t,n,r){var i=NaN,o=(e.stacked&&(i=n.get(n.getCalculationInfo("stackedOverDimension"),r)),isNaN(i)&&(i=e.valueStart),e.baseDataOffset),a=[];return a[o]=n.get(e.baseDim,r),a[1-o]=i,t.dataToPoint(a)}var _U=Math.min,OU=Math.max;function TU(e,t){return isNaN(e)||isNaN(t)}function DU(e,t,n,r,i,o,a,s,u){for(var c,l,h,f,d=n,p=0;p<r;p++){var m=t[2*d],g=t[2*d+1];if(i<=d||d<0)break;if(TU(m,g)){if(u){d+=o;continue}break}if(d===n)e[0<o?"moveTo":"lineTo"](m,g),h=m,f=g;else{if((D=m-c)*D+(B=g-l)*B<.5){d+=o;continue}if(0<a){for(var A=d+o,v=t[2*A],b=t[2*A+1];v===m&&b===g&&p<r;)p++,d+=o,v=t[2*(A+=o)],b=t[2*A+1],m=t[2*d],g=t[2*d+1];var y=p+1;if(u)for(;TU(v,b)&&y<r;)y++,v=t[2*(A+=o)],b=t[2*A+1];var w,x,C,k,E,S,_,O,T,D=0,B=0,I=void 0,M=void 0;r<=y||TU(v,b)?(_=m,O=g):(D=v-c,B=b-l,w=m-c,x=v-m,C=g-l,k=b-g,S=E=void 0,M="x"===s?(_=m-(T=0<D?1:-1)*(E=Math.abs(w))*a,O=g,I=m+T*(S=Math.abs(x))*a,g):"y"===s?(O=g-(T=0<B?1:-1)*(E=Math.abs(C))*a,I=_=m,g+T*(S=Math.abs(k))*a):(E=Math.sqrt(w*w+C*C),_=m-D*a*(1-(w=(S=Math.sqrt(x*x+k*k))/(S+E))),O=g-B*a*(1-w),M=g+B*a*w,I=_U(I=m+D*a*w,OU(v,m)),M=_U(M,OU(b,g)),I=OU(I,_U(v,m)),O=g-(B=(M=OU(M,_U(b,g)))-g)*E/S,_=_U(_=m-(D=I-m)*E/S,OU(c,m)),O=_U(O,OU(l,g)),I=m+(D=m-(_=OU(_,_U(c,m))))*S/E,g+(B=g-(O=OU(O,_U(l,g))))*S/E)),e.bezierCurveTo(h,f,_,O,m,g),h=I,f=M}else e.lineTo(m,g)}c=m,l=g,d+=o}return p}var BU,IU=function(){this.smooth=0,this.smoothConstraint=!0},MU=(Kw(jU,BU=C_),jU.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},jU.prototype.getDefaultShape=function(){return new IU},jU.prototype.buildPath=function(e,t){var n=t.points,r=0,i=n.length/2;if(t.connectNulls){for(;0<i&&TU(n[2*i-2],n[2*i-1]);i--);for(;r<i&&TU(n[2*r],n[2*r+1]);r++);}for(;r<i;)r+=DU(e,n,r,i,i,1,t.smooth,t.smoothMonotone,t.connectNulls)+1},jU.prototype.getPointOn=function(e,t){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var n,r,i=this.path.data,o=i_.CMD,a="x"===t,s=[],u=0;u<i.length;){var c=void 0,l=void 0;switch(i[u++]){case o.M:n=i[u++],r=i[u++];break;case o.L:var h;c=i[u++],l=i[u++];if((h=a?(e-n)/(c-n):(e-r)/(l-r))<=1&&0<=h)return v=a?(l-r)*h+r:(c-n)*h+n,a?[e,v]:[v,e];n=c,r=l;break;case o.C:c=i[u++],l=i[u++];var f=i[u++],d=i[u++],p=i[u++],m=i[u++],g=a?jC(n,c,f,p,e,s):jC(r,l,d,m,e,s);if(0<g)for(var A=0;A<g;A++){var v,b=s[A];if(b<=1&&0<=b)return v=a?IC(r,l,d,m,b):IC(n,c,f,p,b),a?[e,v]:[v,e]}n=p,r=m}}},jU);function jU(e){return(e=BU.call(this,e)||this).type="ec-polyline",e}Kw(RU,NU=IU);var NU,FU=RU;function RU(){return null!==NU&&NU.apply(this,arguments)||this}Kw(zU,PU=C_),zU.prototype.getDefaultShape=function(){return new FU},zU.prototype.buildPath=function(e,t){var n=t.points,r=t.stackedOnPoints,i=0,o=n.length/2,a=t.smoothMonotone;if(t.connectNulls){for(;0<o&&TU(n[2*o-2],n[2*o-1]);o--);for(;i<o&&TU(n[2*i],n[2*i+1]);i++);}for(;i<o;){var s=DU(e,n,i,o,o,1,t.smooth,a,t.connectNulls);DU(e,r,i+s-1,s,o,-1,t.stackedOnSmooth,a,t.connectNulls),i+=s+1,e.closePath()}};var PU,LU,UU=zU;function zU(e){return(e=PU.call(this,e)||this).type="ec-polygon",e}function HU(e,t){if(e.length===t.length){for(var n=0;n<e.length;n++)if(e[n]!==t[n])return;return 1}}function $U(e){for(var t=1/0,n=1/0,r=-1/0,i=-1/0,o=0;o<e.length;){var a=e[o++],s=e[o++];isNaN(a)||(t=Math.min(a,t),r=Math.max(a,r)),isNaN(s)||(n=Math.min(s,n),i=Math.max(s,i))}return[[t,n],[r,i]]}function QU(e,t){var n=(e=$U(e))[0],r=(e=e[1],(t=$U(t))[0]);t=t[1];return Math.max(Math.abs(n[0]-r[0]),Math.abs(n[1]-r[1]),Math.abs(e[0]-t[0]),Math.abs(e[1]-t[1]))}function VU(e){return Xw.y(e)?e:e?.5:0}function qU(e,t,n,r){var i="x"===(t=t.getBaseAxis()).dim||"radius"===t.dim?0:1,o=[],a=0,s=[],u=[],c=[],l=[];if(r){for(a=0;a<e.length;a+=2)isNaN(e[a])||isNaN(e[a+1])||l.push(e[a],e[a+1]);e=l}for(a=0;a<e.length-2;a+=2)switch(c[0]=e[a+2],c[1]=e[a+3],u[0]=e[a],u[1]=e[a+1],o.push(u[0],u[1]),n){case"end":s[i]=c[i],s[1-i]=u[1-i],o.push(s[0],s[1]);break;case"middle":var h=(u[i]+c[i])/2,f=[];s[i]=f[i]=h,s[1-i]=u[1-i],f[1-i]=c[1-i],o.push(s[0],s[1]),o.push(f[0],f[1]);break;default:s[i]=u[i],s[1-i]=c[1-i],o.push(s[0],s[1])}return o.push(e[a++],e[a++]),o}function GU(e,t){return[e[2*t],e[2*t+1]]}function WU(e){if(e.get(["endLabel","show"]))return 1;for(var t=0;t<uO.length;t++)if(e.get([uO[t],"endLabel","show"]))return 1}function KU(e,t,n,r){var i,o,a,s,u,c,l,h,f;return LL(t,"cartesian2d")?(i=r.getModel("endLabel"),o=i.get("valueAnimation"),a=r.getData(),s={lastFrameIndex:0},u=WU(r)?function(n,r){e._endLabelOnDuring(n,r,a,s,o,i,t)}:null,c=t.getBaseAxis().isHorizontal(),l=ML(t,n,r,(function(){var t=e._endLabel;t&&n&&null!=s.originalX&&t.attr({x:s.originalX,y:s.originalY})}),u),r.get("clip",!0)||(h=l.shape,f=Math.max(h.width,h.height),c?(h.y-=f,h.height+=2*f):(h.x-=f,h.width+=2*f)),u&&u(1,l),l):jL(t,n,r)}function YU(){return null!==LU&&LU.apply(this,arguments)||this}Kw(YU,LU=sF),YU.prototype.init=function(){var e=new cE,t=new kU;this.group.add(t.group),this._symbolDraw=t,this._lineGroup=e},YU.prototype.render=function(e,t,n){function r(e){o._changePolyState(e)}var i,o=this,a=e.coordinateSystem,s=this.group,u=e.getData(),c=e.getModel("lineStyle"),l=e.getModel("areaStyle"),h=u.getLayout("points")||[],f="polar"===a.type,d=this._coordSys,p=this._symbolDraw,m=this._polyline,g=this._polygon,A=this._lineGroup,v=(t=!t.ssr&&e.isAnimationEnabled(),!l.isEmpty()),b=l.get("origin"),y=EU(a,u,b),w=(y=v&&function(e,t,n){if(!n.valueDim)return[];for(var r=t.count(),i=QP(2*r),o=0;o<r;o++){var a=SU(n,e,t,o);i[2*o]=a[0],i[2*o+1]=a[1]}return i}(a,u,y),e.get("showSymbol")),x=e.get("connectNulls"),C=w&&!f&&function(e,t,n){var r="auto"===(e=e.get("showAllSymbol"));if(!e||r){var i,o,a=n.getAxesByScale("ordinal")[0];if(a&&(!r||!function(e,t){for(var n=e.getExtent(),r=Math.abs(n[1]-n[0])/e.scale.count(),i=(isNaN(r)&&(r=0),t.count()),o=Math.max(1,Math.round(i/5)),a=0;a<i;a+=o)if(1.5*bU.getSymbolSize(t,a)[e.isHorizontal()?1:0]>r)return;return 1}(a,t)))return i=t.mapDimension(a.dim),o={},Xw.k(a.getViewLabels(),(function(e){e=a.scale.getRawOrdinalNumber(e.tickValue),o[e]=1})),function(e){return!o.hasOwnProperty(t.get(i,e))}}}(e,u,a),k=this._data,E=(k&&k.eachItemGraphicEl((function(e,t){e.__temp&&(s.remove(e),k.setItemGraphicEl(t,null))})),w||p.remove(),s.add(A),!f&&e.get("step")),S=(a&&a.getArea&&e.get("clip",!0)&&(null!=(i=a.getArea()).width?(i.x-=.1,i.y-=.1,i.width+=.2,i.height+=.2):i.r0&&(i.r0-=.5,i.r+=.5)),this._clipShapeForSymbol=i,function(e,t,n){var r=e.getVisual("visualMeta");if(r&&r.length&&e.count()&&"cartesian2d"===t.type){for(var i,o=r.length-1;0<=o;o--){var a,s=e.getDimensionInfo(r[o].dimension);if("x"===(a=s&&s.coordDim)||"y"===a){i=r[o];break}}if(i){var u=t.getAxis(a),c=(t=Xw.G(i.stops,(function(e){return{coord:u.toGlobalCoord(u.dataToCoord(e.value)),color:e.color}}))).length,l=i.outerColors.slice(),h=(n=(c&&t[0].coord>t[c-1].coord&&(t.reverse(),l.reverse()),function(e,t){var n,r,i=[],o=e.length;function a(e,t,n){var r=(n-(r=e.coord))/(t.coord-r);return{coord:n,color:Object(GC.a)(r,[e.color,t.color])}}for(var s=0;s<o;s++){var u=e[s],c=u.coord;if(c<0)n=u;else{if(t<c){r?i.push(a(r,u,t)):n&&i.push(a(n,u,0),a(n,u,t));break}n&&(i.push(a(n,u,0)),n=null),i.push(u),r=u}}return i}(t,"x"===a?n.getWidth():n.getHeight()))).length;if(!h&&c)return t[0].coord<0?l[1]||t[c-1].color:l[0]||t[0].color;var f=n[0].coord-10,d=(c=n[h-1].coord+10)-f;return d<.001?"transparent":(Xw.k(n,(function(e){e.offset=(e.coord-f)/d})),n.push({offset:h?n[h-1].offset:.5,color:l[1]||"transparent"}),n.unshift({offset:h?n[0].offset:.5,color:l[0]||"transparent"}),(t=new fN(0,0,0,0,n,!0))[a]=f,t[a+"2"]=c,t)}}}(u,a,n)||u.getVisual("style")[u.getVisual("drawType")]);n=(d=(m&&d.type===a.type&&E===this._step?(v&&!g?g=this._newPolygon(h,y):g&&!v&&(A.remove(g),g=this._polygon=null),f||this._initOrUpdateEndLabel(e,a,mD(S)),(d=A.getClipPath())?nT(d,{shape:KU(this,a,!1,e).shape},e):A.setClipPath(KU(this,a,!0,e)),w&&p.updateData(u,{isIgnore:C,clipShape:i,disableAnimation:!0,getSymbolPoint:function(e){return[h[2*e],h[2*e+1]]}}),HU(this._stackedOnPoints,y)&&HU(this._points,h)||(t?this._doUpdateAnimation(u,y,a,n,E,b,x):(E&&(h=qU(h,a,E,x),y=y&&qU(y,a,E,x)),m.setShape({points:h}),g&&g.setShape({points:h,stackedOnPoints:y})))):(w&&p.updateData(u,{isIgnore:C,clipShape:i,disableAnimation:!0,getSymbolPoint:function(e){return[h[2*e],h[2*e+1]]}}),t&&this._initSymbolLabelAnimation(u,a,i),E&&(h=qU(h,a,E,x),y=y&&qU(y,a,E,x)),m=this._newPolyline(h),v?g=this._newPolygon(h,y):g&&(A.remove(g),g=this._polygon=null),f||this._initOrUpdateEndLabel(e,a,mD(S)),A.setClipPath(KU(this,a,!0,e))),e.getModel("emphasis"))).get("focus"),w=d.get("blurScope"),p=d.get("disabled"),m.useStyle(Xw.i(c.getLineStyle(),{fill:"none",stroke:S,lineJoin:"bevel"})),GO(m,e,"lineStyle"),0<m.style.lineWidth&&"bolder"===e.get(["emphasis","lineStyle","width"])&&(m.getState("emphasis").style.lineWidth=+m.style.lineWidth+1),rO(m).seriesIndex=e.seriesIndex,QO(m,n,w,p),C=VU(e.get("smooth")),t=e.get("smoothMonotone");m.setShape({smooth:C,smoothMonotone:t,connectNulls:x}),g&&(i=u.getCalculationInfo("stackedOnSeries"),v=0,g.useStyle(Xw.i(l.getAreaStyle(),{fill:S,opacity:.7,lineJoin:"bevel",decal:u.getVisual("style").decal})),i&&(v=VU(i.get("smooth"))),g.setShape({smooth:C,stackedOnSmooth:v,smoothMonotone:t,connectNulls:x}),GO(g,e,"areaStyle"),rO(g).seriesIndex=e.seriesIndex,QO(g,n,w,p)),u.eachItemGraphicEl((function(e){e&&(e.onHoverStateChange=r)})),this._polyline.onHoverStateChange=r,this._data=u,this._coordSys=a,this._stackedOnPoints=y,this._points=h,this._step=E,this._valueOrigin=b,e.get("triggerLineEvent")&&(this.packEventData(e,m),g&&this.packEventData(e,g))},YU.prototype.packEventData=function(e,t){rO(t).eventData={componentType:"series",componentSubType:"line",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"line"}},YU.prototype.highlight=function(e,t,n,r){var i=e.getData(),o=LE(i,r);if(this._changePolyState("emphasis"),!(o instanceof Array)&&null!=o&&0<=o){var a=i.getLayout("points");if(!(u=i.getItemGraphicEl(o))){var s=a[2*o];a=a[2*o+1];if(isNaN(s)||isNaN(a))return;if(this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(s,a))return;var u,c=e.get("zlevel")||0,l=e.get("z")||0;(s=((u=new bU(i,o)).x=s,u.y=a,u.setZ(c,l),u.getSymbolPath().getTextContent()))&&(s.zlevel=c,s.z=l,s.z2=this._polyline.z2+1),u.__temp=!0,i.setItemGraphicEl(o,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else sF.prototype.highlight.call(this,e,t,n,r)},YU.prototype.downplay=function(e,t,n,r){var i,o=e.getData(),a=LE(o,r);this._changePolyState("normal"),null!=a&&0<=a?(i=o.getItemGraphicEl(a))&&(i.__temp?(o.setItemGraphicEl(a,null),this.group.remove(i)):i.downplay()):sF.prototype.downplay.call(this,e,t,n,r)},YU.prototype._changePolyState=function(e){var t=this._polygon;_O(this._polyline,e),t&&_O(t,e)},YU.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new MU({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(t),this._polyline=t},YU.prototype._newPolygon=function(e,t){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new UU({shape:{points:e,stackedOnPoints:t},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n},YU.prototype._initSymbolLabelAnimation=function(e,t,n){var r,i,o,a=(o=t.getBaseAxis()).inverse,s=(o=("cartesian2d"===t.type?(r=o.isHorizontal(),i=!1):"polar"===t.type&&(r="angle"===o.dim,i=!0),e.hostModel)).get("animationDuration"),u=(Xw.v(s)&&(s=s(null)),o.get("animationDelay")||0),c=Xw.v(u)?u(null):u;e.eachItemGraphicEl((function(e,o){var l,h,f,d,p,m=e;m&&(d=[e.x,e.y],p=h=l=void 0,n&&(p=i?(f=n,d=t.pointToCoord(d),r?(l=f.startAngle,h=f.endAngle,-d[1]/180*Math.PI):(l=f.r0,h=f.r,d[0])):r?(l=n.x,h=n.x+n.width,e.x):(l=n.y+n.height,h=n.y,e.y)),f=h===l?0:(p-l)/(h-l),a&&(f=1-f),d=Xw.v(u)?u(o):s*f+c,p=(e=m.getSymbolPath()).getTextContent(),m.attr({scaleX:0,scaleY:0}),m.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:d}),p&&p.animateFrom({style:{opacity:0}},{duration:300,delay:d}),e.disableLabelAnimation=!0)}))},YU.prototype._initOrUpdateEndLabel=function(e,t,n){var r,i,o,a=e.getModel("endLabel");WU(e)?(r=e.getData(),i=this._polyline,(o=r.getLayout("points"))?(this._endLabel||((this._endLabel=new nO({z2:200})).ignoreClip=!0,i.setTextContent(this._endLabel),i.disableLabelAnimation=!0),0<=(o=function(e){for(var t,n,r=e.length/2;0<r&&(t=e[2*r-2],n=e[2*r-1],isNaN(t)||isNaN(n));r--);return r-1}(o))&&(hT(i,fT(e,"endLabel"),{inheritColor:n,labelFetcher:e,labelDataIndex:o,defaultText:function(e,t,n){return null!=n?zL(r,n):UL(r,e)},enableTextSetter:!0},(n=a,o=(e=(e=t).getBaseAxis()).isHorizontal(),e=e.inverse,a=o?e?"right":"left":"center",o=o?"middle":e?"top":"bottom",{normal:{align:n.get("align")||a,verticalAlign:n.get("verticalAlign")||o}})),i.textConfig.position=null)):(i.removeTextContent(),this._endLabel=null)):this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},YU.prototype._endLabelOnDuring=function(e,t,n,r,i,o,a){var s,u,c,l,h,f,d,p,m,g,A=this._endLabel,v=this._polyline;A&&(e<1&&null==r.originalX&&(r.originalX=A.x,r.originalY=A.y),s=n.getLayout("points"),m=(u=n.hostModel).get("connectNulls"),c=o.get("precision"),o=o.get("distance")||0,h=(a=a.getBaseAxis()).isHorizontal(),a=a.inverse,t=t.shape,l=(h?o:0)*(a?-1:1),o=(h?0:-o)*(a?-1:1),d=void 0,1<=(p=(f=(h=function(e,t,n){for(var r,i,o=e.length/2,a="x"===n?0:1,s=0,u=-1,c=0;c<o;c++)if(i=e[2*c+a],!isNaN(i)&&!isNaN(e[2*c+1-a])){if(0!==c){if(r<=t&&t<=i||t<=r&&i<=t){u=c;break}s=c}r=i}return{range:[s,u],t:(t-r)/(i-r)}}(s,a=a?h?t.x:t.y+t.height:h?t.x+t.width:t.y,t=h?"x":"y")).range)[1]-f[0])?(1<p&&!m?(g=GU(s,f[0]),A.attr({x:g[0]+l,y:g[1]+o}),i&&(d=u.getRawValue(f[0]))):((g=v.getPointOn(a,t))&&A.attr({x:g[0]+l,y:g[1]+o}),p=u.getRawValue(f[0]),m=u.getRawValue(f[1]),i&&(d=GE(n,c,p,m,h.t))),r.lastFrameIndex=f[0]):(g=GU(s,v=1===e||0<r.lastFrameIndex?f[0]:0),i&&(d=u.getRawValue(v)),A.attr({x:g[0]+l,y:g[1]+o})),i&&"function"==typeof(a=bT(A)).setLabelText&&a.setLabelText(d))},YU.prototype._doUpdateAnimation=function(e,t,n,r,i,o,a){var s=this._polyline,u=this._polygon,c=e.hostModel,l=(t=function(e,t,n,r,i,o){a=[],t.diff(e).add((function(e){a.push({cmd:"+",idx:e})})).update((function(e,t){a.push({cmd:"=",idx:t,idx1:e})})).remove((function(e){a.push({cmd:"-",idx:e})})).execute();for(var a,s=a,u=[],c=[],l=[],h=[],f=[],d=[],p=[],m=EU(i,t,o),g=e.getLayout("points")||[],A=t.getLayout("points")||[],v=0;v<s.length;v++){var b=s[v],y=!0,w=void 0;switch(b.cmd){case"=":var x=2*b.idx,C=(w=2*b.idx1,g[x]),k=g[1+x],E=A[w],S=A[w+1];(isNaN(C)||isNaN(k))&&(C=E,k=S),u.push(C,k),c.push(E,S),l.push(n[x],n[1+x]),h.push(r[w],r[w+1]),p.push(t.getRawIndex(b.idx1));break;case"+":C=b.idx,k=m.dataDimsForPoint,E=i.dataToPoint([t.get(k[0],C),t.get(k[1],C)]),w=2*C,u.push(E[0],E[1]),c.push(A[w],A[w+1]),S=SU(m,i,t,C),l.push(S[0],S[1]),h.push(r[w],r[w+1]),p.push(t.getRawIndex(C));break;case"-":y=!1}y&&(f.push(b),d.push(d.length))}d.sort((function(e,t){return p[e]-p[t]}));var _=QP(o=u.length),O=QP(o),T=QP(o),D=QP(o),B=[];for(v=0;v<d.length;v++){var I=d[v],M=2*v,j=2*I;_[M]=u[j],_[1+M]=u[1+j],O[M]=c[j],O[1+M]=c[1+j],T[M]=l[j],T[1+M]=l[1+j],D[M]=h[j],D[1+M]=h[1+j],B[v]=f[I]}return{current:_,next:O,stackedOnCurrent:T,stackedOnNext:D,status:B}}(this._data,e,this._stackedOnPoints,t,this._coordSys,this._valueOrigin)).current,h=t.stackedOnCurrent,f=t.next,d=t.stackedOnNext;if(i&&(l=qU(t.current,n,i,a),h=qU(t.stackedOnCurrent,n,i,a),f=qU(t.next,n,i,a),d=qU(t.stackedOnNext,n,i,a)),3e3<QU(l,f)||u&&3e3<QU(h,d))s.stopAnimation(),s.setShape({points:f}),u&&(u.stopAnimation(),u.setShape({points:f,stackedOnPoints:d}));else{s.shape.__points=t.current,s.shape.points=l;n={shape:{points:f}};for(var p,m=(t.current!==l&&(n.shape.__points=t.next),s.stopAnimation(),tT(s,n,c),u&&(u.setShape({points:l,stackedOnPoints:h}),u.stopAnimation(),tT(u,{shape:{stackedOnPoints:d}},c),s.shape.points!==u.shape.points&&(u.shape.points=s.shape.points)),[]),g=t.status,A=0;A<g.length;A++)"="!==g[A].cmd||(p=e.getItemGraphicEl(g[A].idx1))&&m.push({el:p,ptIdx:A});s.animators&&s.animators.length&&s.animators[0].during((function(){u&&u.dirtyShape();for(var e=s.shape.__points,t=0;t<m.length;t++){var n=m[t].el,r=2*m[t].ptIdx;n.x=e[r],n.y=e[1+r],n.markRedraw()}}))}},YU.prototype.remove=function(e){var t=this.group,n=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),n&&n.eachItemGraphicEl((function(e,r){e.__temp&&(t.remove(e),n.setItemGraphicEl(r,null))})),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},YU.type="line";var XU=YU,JU=2*Math.PI,ZU=Math.PI/180;function ez(e,t){return xD(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()})}function tz(e,t){var n,r=ez(e,t),i=e.get("center"),o=e.get("radius"),a=(Xw.s(o)||(o=[0,o]),gE(r.width,t.getWidth())),s=(t=gE(r.height,t.getHeight()),Math.min(a,t)),u=gE(o[0],s/2);o=gE(o[1],s/2);return s=(s=e.coordinateSystem)?(n=(e=s.dataToPoint(i))[0]||0,e[1]||0):(n=gE((i=Xw.s(i)?i:[i,i])[0],a)+r.x,gE(i[1],t)+r.y),{cx:n,cy:s,r0:u,r:o}}function nz(e,t,n){t.eachSeriesByType(e,(function(e){var t,r=e.getData(),i=r.mapDimension("value"),o=ez(e,n),a=tz(e,n),s=a.cx,u=a.cy,c=a.r,l=a.r0,h=-e.get("startAngle")*ZU,f=e.get("minAngle")*ZU,d=0,p=(r.each(i,(function(e){isNaN(e)||d++})),r.getSum(i)),m=Math.PI/(p||d)*2,g=e.get("clockwise"),A=e.get("roseType"),v=e.get("stillShowZeroSum"),b=r.getDataExtent(i),y=(b[0]=0,JU),w=0,x=h,C=g?1:-1;r.setLayout({viewRect:o,r:c}),r.each(i,(function(e,t){var n,i;isNaN(e)?r.setItemLayout(t,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:g,cx:s,cy:u,r0:l,r:A?NaN:c}):((n="area"!==A?0===p&&v?m:e*m:JU/d)<f?y-=n=f:w+=e,i=x+C*n,r.setItemLayout(t,{angle:n,startAngle:x,endAngle:i,clockwise:g,cx:s,cy:u,r0:l,r:A?mE(e,b,[l,c]):c}),x=i)})),y<JU&&d&&(y<=.001?(t=JU/d,r.each(i,(function(e,n){isNaN(e)||((e=r.getItemLayout(n)).angle=t,e.startAngle=h+C*n*t,e.endAngle=h+C*(n+1)*t)}))):(m=y/w,x=h,r.each(i,(function(e,t){isNaN(e)||(e=(t=r.getItemLayout(t)).angle===f?f:e*m,t.startAngle=x,t.endAngle=x+C*e,x+=C*e)}))))}))}var rz=2*Math.PI,iz=i_.CMD,oz=["top","right","bottom","left"];function az(e,t,n,r,i,o,a,s){var u=i-e,c=o-t,l=(n=n-e,r=r-t,Math.sqrt(n*n+r*r));u=(u*(n/=l)+c*(r/=l))/l,s&&(u=Math.min(Math.max(u,0),1)),c=a[0]=e+(u*=l)*n,s=a[1]=t+u*r;return Math.sqrt((c-i)*(c-i)+(s-o)*(s-o))}function sz(e,t,n,r,i,o,a){return n<0&&(e+=n,n=-n),r<0&&(t+=r,r=-r),n=e+n,r=t+r,e=a[0]=Math.min(Math.max(i,e),n),n=a[1]=Math.min(Math.max(o,t),r),Math.sqrt((e-i)*(e-i)+(n-o)*(n-o))}var uz=[];function cz(e,t,n){for(var r,i,o,a,s,u,c,l,h,f=0,d=0,p=0,m=0,g=1/0,A=t.data,v=e.x,b=e.y,y=0;y<A.length;){var w=A[y++],x=(1===y&&(p=f=A[y],m=d=A[y+1]),g);switch(w){case iz.M:f=p=A[y++],d=m=A[y++];break;case iz.L:x=az(f,d,A[y],A[y+1],v,b,uz,!0),f=A[y++],d=A[y++];break;case iz.C:x=RC(f,d,A[y++],A[y++],A[y++],A[y++],A[y],A[y+1],v,b,uz),f=A[y++],d=A[y++];break;case iz.Q:x=HC(f,d,A[y++],A[y++],A[y],A[y+1],v,b,uz),f=A[y++],d=A[y++];break;case iz.A:var C=A[y++],k=A[y++],E=A[y++],S=A[y++],_=A[y++],O=A[y++],T=(y+=1,!!(1-A[y++])),D=Math.cos(_)*E+C,B=Math.sin(_)*S+k;y<=1&&(p=D,m=B),B=(D=_)+O,T=T,a=(v-C)*(o=S)/E+C,s=b,u=uz,h=l=c=void 0,a-=r=C,s-=i=k,l=(a/=c=Math.sqrt(a*a+s*s))*o+r,h=(s/=c)*o+i,x=Math.abs(D-B)%rz<1e-4||((B=T?(T=D,D=s_(B),s_(T)):(D=s_(D),s_(B)))<D&&(B+=rz),(T=Math.atan2(s,a))<0&&(T+=rz),D<=T&&T<=B||D<=T+rz&&T+rz<=B)?(u[0]=l,u[1]=h,c-o):(h=((T=o*Math.cos(D)+r)-a)*(T-a)+((l=o*Math.sin(D)+i)-s)*(l-s))<(r=((c=o*Math.cos(B)+r)-a)*(c-a)+((D=o*Math.sin(B)+i)-s)*(D-s))?(u[0]=T,u[1]=l,Math.sqrt(h)):(u[0]=c,u[1]=D,Math.sqrt(r)),f=Math.cos(_+O)*E+C,d=Math.sin(_+O)*S+k;break;case iz.R:x=sz(p=f=A[y++],m=d=A[y++],A[y++],A[y++],v,b,uz);break;case iz.Z:x=az(f,d,p,m,v,b,uz,!0),f=p,d=m}x<g&&(g=x,n.set(uz[0],uz[1]))}return g}var lz=new $x,hz=new $x,fz=new $x,dz=new $x,pz=new $x;function mz(e,t){if(e){var n=e.getTextGuideLine(),r=e.getTextContent();if(r&&n){var i=e.textGuideLineConfig||{},o=[[0,0],[0,0],[0,0]],a=i.candidates||oz,s=r.getBoundingRect().clone(),u=(s.applyTransform(r.getComputedTransform()),1/0),c=i.anchor,l=e.getComputedTransform(),h=l&&zx([],l),f=t.get("length2")||0;c&&fz.copy(c);for(var d,p=0;p<a.length;p++){var m=a[p],g=(b=v=g=void 0,m),A=s,v=lz,b=dz,y=A.width,w=A.height;switch(g){case"top":v.set(A.x+y/2,A.y-0),b.set(0,-1);break;case"bottom":v.set(A.x+y/2,A.y+w+0),b.set(0,1);break;case"left":v.set(A.x-0,A.y+w/2),b.set(-1,0);break;case"right":v.set(A.x+y+0,A.y+w/2),b.set(1,0)}$x.scaleAndAdd(hz,lz,dz,f),hz.transform(h),m=e.getBoundingRect(),(m=c?c.distance(hz):e instanceof C_?cz(hz,e.path,fz):(g=fz,d=sz((d=m).x,m.y,m.width,m.height,hz.x,hz.y,uz),g.set(uz[0],uz[1]),d))<u&&(u=m,hz.transform(l),fz.transform(l),fz.toArray(o[0]),hz.toArray(o[1]),lz.toArray(o[2]))}vz(o,t.get("minTurnAngle")),n.setShape({points:o})}}}var gz=[],Az=new $x;function vz(e,t){var n,r;t<=180&&0<t&&(t=t/180*Math.PI,lz.fromArray(e[0]),hz.fromArray(e[1]),fz.fromArray(e[2]),$x.sub(dz,lz,hz),$x.sub(pz,fz,hz),r=dz.len(),n=pz.len(),r<.001||n<.001||(dz.scale(1/r),pz.scale(1/n),r=dz.dot(pz),Math.cos(t)<r&&(n=az(hz.x,hz.y,fz.x,fz.y,lz.x,lz.y,gz,!1),Az.fromArray(gz),Az.scaleAndAdd(pz,n/Math.tan(Math.PI-t)),r=fz.x!==hz.x?(Az.x-hz.x)/(fz.x-hz.x):(Az.y-hz.y)/(fz.y-hz.y),isNaN(r)||(r<0?$x.copy(Az,hz):1<r&&$x.copy(Az,fz),Az.toArray(e[1])))))}function bz(e,t,n,r){var i="normal"===n;(t=((n=i?e:e.ensureState(n)).ignore=t,r.get("smooth")))&&!0===t&&(t=.3),n.shape=n.shape||{},0<t&&(n.shape.smooth=t),t=r.getModel("lineStyle").getLineStyle();i?e.useStyle(t):n.style=t}function yz(e,t){var n=t.smooth,r=t.points;if(r)if(e.moveTo(r[0][0],r[0][1]),0<n&&3<=r.length){t=ix(r[0],r[1]);var i=ix(r[1],r[2]);t&&i?(n=Math.min(t,i)*n,t=ax([],r[1],r[0],n/t),n=ax([],r[1],r[2],n/i),i=ax([],t,n,.5),e.bezierCurveTo(t[0],t[1],t[0],t[1],i[0],i[1]),e.bezierCurveTo(n[0],n[1],n[0],n[1],r[2][0],r[2][1])):(e.lineTo(r[1][0],r[1][1]),e.lineTo(r[2][0],r[2][1]))}else for(var o=1;o<r.length;o++)e.lineTo(r[o][0],r[o][1])}function wz(e,t,n){var r=e.getTextGuideLine(),i=e.getTextContent();if(i){for(var o=t.normal,a=o.get("show"),s=i.ignore,u=0;u<cO.length;u++){var c,l=cO[u],h=t[l],f="normal"===l;h&&(c=h.get("show"),(f?s:Object(Xw.N)(i.states[l]&&i.states[l].ignore,s))||!Object(Xw.N)(c,a)?(c=f?r:r&&r.states[l])&&(c.ignore=!0):(r||(r=new Qj,e.setTextGuideLine(r),f||!s&&a||bz(r,!0,"normal",t.normal),e.stateProxy&&(r.stateProxy=e.stateProxy)),bz(r,!1,l,h)))}r&&(Object(Xw.i)(r.style,n),r.style.fill=null,n=o.get("showAbove"),(e.textGuideLineConfig=e.textGuideLineConfig||{}).showAbove=n||!1,r.buildPath=yz)}else r&&e.removeTextGuideLine()}function xz(e,t){for(var n={normal:e.getModel(t=t||"labelLine")},r=0;r<uO.length;r++){var i=uO[r];n[i]=e.getModel([i,t])}return n}function Cz(e){for(var t=[],n=0;n<e.length;n++){var r,i,o,a,s,u,c=e[n];c.defaultAttr.ignore||(i=(r=c.label).getComputedTransform(),o=r.getBoundingRect(),a=!i||i[1]<1e-5&&i[2]<1e-5,u=r.style.margin||0,(s=o.clone()).applyTransform(i),s.x-=u/2,s.y-=u/2,s.width+=u,s.height+=u,u=a?new wN(o,i):null,t.push({label:r,labelLine:c.labelLine,rect:s,localRect:o,obb:u,priority:c.priority,defaultAttr:c.defaultAttr,layoutOption:c.computedLayoutOption,axisAligned:a,transform:i}))}return t}function kz(e,t,n,r,i,o){var a=e.length;if(!(a<2)){e.sort((function(e,n){return e.rect[t]-n.rect[t]}));for(var s=0,u=!1,c=[],l=0,h=0;h<a;h++){var f,d=(p=e[h]).rect,p=((f=d[t]-s)<0&&(d[t]-=f,p.label[t]-=f,u=!0),Math.max(-f,0));c.push(p),l+=p,s=d[t]+d[n]}0<l&&o&&w(-l/a,0,a);var m,g,A=e[0],v=e[a-1];return b(),m<0&&x(-m,.8),g<0&&x(g,.8),b(),y(m,g,1),y(g,m,-1),b(),m<0&&C(-m),g<0&&C(g),u}function b(){m=A.rect[t]-r,g=i-v.rect[t]-v.rect[n]}function y(e,t,n){e<0&&(0<(t=Math.min(t,-e))?(w(t*n,0,a),(t+=e)<0&&x(-t*n,1)):x(-e*n,1))}function w(n,r,i){0!==n&&(u=!0);for(var o=r;o<i;o++){var a=e[o];a.rect[t]+=n,a.label[t]+=n}}function x(r,i){for(var o=[],s=0,u=1;u<a;u++){var c=e[u-1].rect;c=Math.max(e[u].rect[t]-c[t]-c[n],0);o.push(c),s+=c}if(s){var l=Math.min(Math.abs(r)/s,i);if(0<r)for(u=0;u<a-1;u++)w(o[u]*l,0,u+1);else for(u=a-1;0<u;u--)w(-o[u-1]*l,u,a)}}function C(e){for(var t=e<0?-1:1,n=(e=Math.abs(e),Math.ceil(e/(a-1))),r=0;r<a-1;r++)if(0<t?w(n,0,r+1):w(-n,a-r-1,a),(e-=n)<=0)return}}function Ez(e,t,n,r){return kz(e,"y","height",t,n,r)}function Sz(e){var t=[],n=(e.sort((function(e,t){return t.priority-e.priority})),new Zx(0,0,0,0));function r(e){var t;e.ignore||null==(t=e.ensureState("emphasis")).ignore&&(t.ignore=!1),e.ignore=!0}for(var i=0;i<e.length;i++){for(var o=e[i],a=o.axisAligned,s=o.localRect,u=o.transform,c=o.label,l=o.labelLine,h=(n.copy(o.rect),n.width-=.1,n.height-=.1,n.x+=.05,n.y+=.05,o.obb),f=!1,d=0;d<t.length;d++){var p=t[d];if(n.intersect(p.rect)){if(a&&p.axisAligned){f=!0;break}if(p.obb||(p.obb=new wN(p.localRect,p.transform)),(h=h||new wN(s,u)).intersect(p.obb)){f=!0;break}}}f?(r(c),l&&r(l)):(c.attr("ignore",o.defaultAttr.ignore),l&&l.attr("ignore",o.defaultAttr.labelGuideIgnore),t.push(o))}}var _z=Math.PI/180;function Oz(e,t,n,r,i,o,a,s,u,c){if(!(e.length<2)){for(var l,h=e.length,f=0;f<h;f++)"outer"===e[f].position&&"labelLine"===e[f].labelAlignTo&&(l=e[f].label.x-c,e[f].linePoints[1][0]+=l,e[f].label.x=c);if(Ez(e,u,u+a)){for(var d,p,m,g,A,v=e,b={list:[],maxY:0},y={list:[],maxY:0},w=0;w<v.length;w++)"none"===v[w].labelAlignTo&&(p=(d=v[w]).label.y>n?y:b,(m=Math.abs(d.label.y-n))>=p.maxY&&(A=d.label.x-t-d.len2*i,g=r+d.len,A=Math.abs(A)<g?Math.sqrt(m*m/(1-A*A/g/g)):g,p.rB=A,p.maxY=m),p.list.push(d));x(b),x(y)}}function x(e){for(var o=e.rB,a=o*o,s=0;s<e.list.length;s++){var u=e.list[s],c=Math.abs(u.label.y-n),l=(l=r+u.len)*l;c=Math.sqrt((1-Math.abs(c*c/a))*l),c=(l=t+(c+u.len2)*i)-u.label.x;Tz(u,u.targetTextWidth-c*i,!0),u.label.x=l}}}function Tz(e,t,n){var r,i,o,a,s,u,c;void 0===n&&(n=!1),null==e.labelStyleWidth&&(s=(r=e.label).style,i=e.rect,u=s.backgroundColor,c=(c=s.padding)?c[1]+c[3]:0,s=s.overflow,(t<(o=i.width+(u?0:c))||n)&&(a=i.height,s&&s.match("break")?(r.setStyle("backgroundColor",null),r.setStyle("width",t-c),s=r.getBoundingRect(),r.setStyle("width",Math.ceil(s.width)),r.setStyle("backgroundColor",u)):(s=t-c,u=t<o||n&&!(s>e.unconstrainedWidth)?s:null,r.setStyle("width",u)),c=r.getBoundingRect(),i.width=c.width,t=(r.style.margin||0)+2.1,i.height=c.height+t,i.y-=(i.height-a)/2))}function Dz(e){return"center"===e.position}Kw(jz,Bz=Bj),jz.prototype.updateData=function(e,t,n,r){var i=this,o=e.hostModel,a=e.getItemModel(t),s=a.getModel("emphasis"),u=e.getItemLayout(t),c=Object(Xw.m)(QL(a.getModel("itemStyle"),u,!0),u);isNaN(c.startAngle)?i.setShape(c):(r?(i.setShape(c),r=o.getShallow("animationType"),o.ecModel.ssr?(nT(i,{scaleX:0,scaleY:0},o,{dataIndex:t,isFrom:!0}),i.originX=c.cx,i.originY=c.cy):"scale"===r?(i.shape.r=u.r0,nT(i,{shape:{r:u.r}},o,t)):null!=n?(i.setShape({startAngle:n,endAngle:n}),nT(i,{shape:{startAngle:u.startAngle,endAngle:u.endAngle}},o,t)):(i.shape.endAngle=u.startAngle,tT(i,{shape:{endAngle:u.endAngle}},o,t))):(sT(i),tT(i,{shape:c},o,t)),i.useStyle(e.getItemVisual(t,"style")),GO(i,a),r=(u.startAngle+u.endAngle)/2,n=o.get("selectedOffset"),c=Math.cos(r)*n,r=Math.sin(r)*n,(n=a.getShallow("cursor"))&&i.attr("cursor",n),this._updateLabel(o,e,t),i.ensureState("emphasis").shape=Object(Xw.m)({r:u.r+(s.get("scale")&&s.get("scaleSize")||0)},QL(s.getModel("itemStyle"),u)),Object(Xw.m)(i.ensureState("select"),{x:c,y:r,shape:QL(a.getModel(["select","itemStyle"]),u)}),Object(Xw.m)(i.ensureState("blur"),{shape:QL(a.getModel(["blur","itemStyle"]),u)}),n=i.getTextGuideLine(),o=i.getTextContent(),n&&Object(Xw.m)(n.ensureState("select"),{x:c,y:r}),Object(Xw.m)(o.ensureState("select"),{x:c,y:r}),QO(this,s.get("focus"),s.get("blurScope"),s.get("disabled")))},jz.prototype._updateLabel=function(e,t,n){var r=t.getItemModel(n),i=r.getModel("labelLine"),o=(a=t.getItemVisual(n,"style"))&&a.fill,a=a&&a.opacity;hT(this,fT(r),{labelFetcher:t.hostModel,labelDataIndex:n,inheritColor:o,defaultOpacity:a,defaultText:e.getFormattedLabel(n,"normal")||t.getName(n)}),t=this.getTextContent();"outside"!==(n=(this.setTextConfig({position:null,rotation:null}),t.attr({z2:10}),e.get(["label","position"])))&&"outer"!==n?this.removeTextGuideLine():(this.getTextGuideLine()||(t=new Qj,this.setTextGuideLine(t)),wz(this,xz(r),{stroke:o,opacity:Object(Xw.O)(i.get(["lineStyle","opacity"]),a,1)}))};var Bz,Iz,Mz=jz;function jz(e,t,n){var r=Bz.call(this)||this,i=(r.z2=2,new nO);return r.setTextContent(i),r.updateData(e,t,n,!0),r}function Nz(){var e=null!==Iz&&Iz.apply(this,arguments)||this;return e.ignoreLabelLineUpdate=!0,e}Kw(Nz,Iz=sF),Nz.prototype.render=function(e,t,n,r){var i,o=e.getData(),a=this._data,s=this.group;if(!a&&0<o.count()){for(var u=o.getItemLayout(0),c=1;isNaN(u&&u.startAngle)&&c<o.count();++c)u=o.getItemLayout(c);u&&(i=u.startAngle)}this._emptyCircleSector&&s.remove(this._emptyCircleSector),0===o.count()&&e.get("showEmptyCircle")&&((n=new Bj({shape:tz(e,n)})).useStyle(e.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=n,s.add(n)),o.diff(a).add((function(e){var t=new Mz(o,e,i);o.setItemGraphicEl(e,t),s.add(t)})).update((function(e,t){(t=a.getItemGraphicEl(t)).updateData(o,e,i),t.off("click"),s.add(t),o.setItemGraphicEl(e,t)})).remove((function(t){aT(a.getItemGraphicEl(t),e,t)})).execute(),function(e){var t,n,r=e.getData(),i=[],o=!1,a=(e.get("minShowLabelAngle")||0)*_z,s=r.getLayout("viewRect"),u=r.getLayout("r"),c=s.width,l=s.x,h=s.y;function f(e){e.ignore=!0}if(s=s.height,r.each((function(e){var s,h,d,p,m,g,A,v,b,y,w=r.getItemGraphicEl(e),x=w.shape,C=w.getTextContent(),k=w.getTextGuideLine(),E=(e=r.getItemModel(e)).getModel("label"),S=E.get("position")||e.get(["emphasis","label","position"]),_=E.get("distanceToLabelLine"),O=E.get("alignTo"),T=gE(E.get("edgeDistance"),c),D=E.get("bleedMargin"),B=gE((e=e.getModel("labelLine")).get("length"),c),I=gE(e.get("length2"),c);Math.abs(x.endAngle-x.startAngle)<a?(Object(Xw.k)(C.states,f),C.ignore=!0,k&&(Object(Xw.k)(k.states,f),k.ignore=!0)):function(e){if(!e.ignore)return 1;for(var t in e.states)if(!1===e.states[t].ignore)return 1}(C)&&(y=(x.startAngle+x.endAngle)/2,s=Math.cos(y),h=Math.sin(y),t=x.cx,n=x.cy,d="inside"===S||"inner"===S,A="center"===S?(p=x.cx,m=x.cy,"center"):(p=(A=(d?(x.r+x.r0)/2*s:x.r*s)+t)+3*s,m=(v=(d?(x.r+x.r0)/2*h:x.r*h)+n)+3*h,d||(g=A+s*(B+u-x.r),x=v+h*(B+u-x.r),b=g+(s<0?-1:1)*I,p="edge"===O?s<0?l+T:l+c-T:b+(s<0?-_:_),g=[[A,v],[g,m=x],[b,x]]),d?"center":"edge"===O?0<s?"right":"left":0<s?"left":"right"),v=Math.PI,b=0,x=E.get("rotate"),Object(Xw.y)(x)?b=x*(v/180):"center"===S?b=0:"radial"===x||!0===x?b=s<0?-y+v:-y:"tangential"===x&&"outside"!==S&&"outer"!==S&&((E=Math.atan2(s,h))<0&&(E=2*v+E),b=(E=0<h?v+E:E)-v),o=!!b,C.x=p,C.y=m,C.rotation=b,C.setStyle({verticalAlign:"middle"}),d?(C.setStyle({align:A}),(y=C.states.select)&&(y.x+=C.x,y.y+=C.y)):((x=C.getBoundingRect().clone()).applyTransform(C.getComputedTransform()),E=(C.style.margin||0)+2.1,x.y-=E/2,x.height+=E,i.push({label:C,labelLine:k,position:S,len:B,len2:I,minTurnAngle:e.get("minTurnAngle"),maxSurfaceAngle:e.get("maxSurfaceAngle"),surfaceNormal:new $x(s,h),linePoints:g,textAlign:A,labelDistance:_,labelAlignTo:O,edgeDistance:T,bleedMargin:D,rect:x,unconstrainedWidth:x.width,labelStyleWidth:C.style.width})),w.setTextConfig({inside:d}))})),!o&&e.get("avoidLabelOverlap")){for(var d=i,p=t,m=(e=n,u),g=c,A=l,v=[],b=[],y=Number.MAX_VALUE,w=-Number.MAX_VALUE,x=0;x<d.length;x++){var C=d[x].label;Dz(d[x])||(C.x<p?(y=Math.min(y,C.x),v):(w=Math.max(w,C.x),b)).push(d[x])}var k;for(x=0;x<d.length;x++)!Dz(E=d[x])&&E.linePoints&&null==E.labelStyleWidth&&(C=E.label,S=E.linePoints,void 0,k="edge"===E.labelAlignTo?C.x<p?S[2][0]-E.labelDistance-A-E.edgeDistance:A+g-E.edgeDistance-S[2][0]-E.labelDistance:"labelLine"===E.labelAlignTo?C.x<p?y-A-E.bleedMargin:A+g-w-E.bleedMargin:C.x<p?C.x-A-E.bleedMargin:A+g-C.x-E.bleedMargin,E.targetTextWidth=k,Tz(E,k));Oz(b,p,e,m,1,0,s,0,h,w),Oz(v,p,e,m,-1,0,s,0,h,y);var E,S,_,O,T;for(x=0;x<d.length;x++)!Dz(E=d[x])&&E.linePoints&&(C=E.label,S=E.linePoints,_="edge"===E.labelAlignTo,O=(O=C.style.padding)?O[1]+O[3]:0,O=C.style.backgroundColor?0:O,O=E.rect.width+O,T=S[1][0]-S[2][0],_?C.x<p?S[2][0]=A+E.edgeDistance+O+E.labelDistance:S[2][0]=A+g-E.edgeDistance-O-E.labelDistance:(C.x<p?S[2][0]=C.x+E.labelDistance:S[2][0]=C.x-E.labelDistance,S[1][0]=S[2][0]+T),S[1][1]=S[2][1]=C.y)}for(var D=0;D<i.length;D++){var B,I=i[D],M=I.label,j=I.labelLine,N=isNaN(M.x)||isNaN(M.y);M&&(M.setStyle({align:I.textAlign}),N&&(Object(Xw.k)(M.states,f),M.ignore=!0),(B=M.states.select)&&(B.x+=M.x,B.y+=M.y)),j&&(B=I.linePoints,N||!B?(Object(Xw.k)(j.states,f),j.ignore=!0):(vz(B,I.minTurnAngle),function(e,t,n){if(n<=180&&0<n){n=n/180*Math.PI,lz.fromArray(e[0]),hz.fromArray(e[1]),fz.fromArray(e[2]),$x.sub(dz,hz,lz),$x.sub(pz,fz,hz);var r=dz.len(),i=pz.len();if(!(r<.001||i<.001)&&(dz.scale(1/r),pz.scale(1/i),dz.dot(t)<Math.cos(n))){if(r=az(hz.x,hz.y,fz.x,fz.y,lz.x,lz.y,gz,!1),Az.fromArray(gz),(i=Math.PI/2)<=(t=i+Math.acos(pz.dot(t))-n))$x.copy(Az,fz);else{if(Az.scaleAndAdd(pz,r/Math.tan(Math.PI/2-t)),n=fz.x!==hz.x?(Az.x-hz.x)/(fz.x-hz.x):(Az.y-hz.y)/(fz.y-hz.y),isNaN(n))return;n<0?$x.copy(Az,hz):1<n&&$x.copy(Az,fz)}Az.toArray(e[1])}}}(B,I.surfaceNormal,I.maxSurfaceAngle),j.setShape({points:B}),M.__hostTarget.textGuideLineConfig={anchor:new $x(B[0][0],B[0][1])}))}}(e),"expansion"!==e.get("animationTypeUpdate")&&(this._data=o)},Nz.prototype.dispose=function(){},Nz.prototype.containPoint=function(e,t){var n;if(t=t.getData().getItemLayout(0))return n=e[0]-t.cx,e=e[1]-t.cy,(n=Math.sqrt(n*n+e*e))<=t.r&&n>=t.r0},Nz.type="pie";var Fz=Nz;function Rz(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}Rz.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},Rz.prototype.containName=function(e){return 0<=this._getRawData().indexOfName(e)},Rz.prototype.indexOfName=function(e){return this._getDataWithEncodedVisual().indexOfName(e)},Rz.prototype.getItemVisual=function(e,t){return this._getDataWithEncodedVisual().getItemVisual(e,t)};var Pz,Lz=Rz,Uz=UE();function zz(){return null!==Pz&&Pz.apply(this,arguments)||this}Kw(zz,Pz=FM),zz.prototype.init=function(e){Pz.prototype.init.apply(this,arguments),this.legendVisualProvider=new Lz(Xw.c(this.getData,this),Xw.c(this.getRawData,this)),this._defaultLabelLine(e)},zz.prototype.mergeOption=function(){Pz.prototype.mergeOption.apply(this,arguments)},zz.prototype.getInitialData=function(){return e=this,t={coordDimensions:["value"],encodeDefaulter:Xw.h(YD,this)},t=Object(Xw.s)(t)?{coordDimensions:t}:Object(Xw.m)({encodeDefine:e.getEncode()},t),t=CL(n=e.getSource(),t).dimensions,(t=new xL(t,e)).initData(n,void 0),t;var e,t,n},zz.prototype.getDataParams=function(e){var t,n,r=this.getData(),i=(n=Uz(r)).seats;return(n=(i||(t=[],r.each(r.mapDimension("value"),(function(e){t.push(e)})),i=n.seats=function(e,t){var n=Xw.L(e,(function(e,t){return e+(isNaN(t)?0:t)}),0);if(0===n)return[];for(var r=Math.pow(10,t),i=(t=Xw.G(e,(function(e){return(isNaN(e)?0:e)/n*r*100})),100*r),o=Xw.G(t,(function(e){return Math.floor(e)})),a=Xw.L(o,(function(e,t){return e+t}),0),s=Xw.G(t,(function(e,t){return e-o[t]}));a<i;){for(var u=Number.NEGATIVE_INFINITY,c=null,l=0,h=s.length;l<h;++l)s[l]>u&&(u=s[l],c=l);++o[c],s[c]=0,++a}return Xw.G(o,(function(e){return e/r}))}(t,r.hostModel.get("percentPrecision"))),Pz.prototype.getDataParams.call(this,e))).percent=i[e]||0,n.$vars.push("percent"),n},zz.prototype._defaultLabelLine=function(e){BE(e,"labelLine",["show"]);var t=e.labelLine,n=e.emphasis.labelLine;t.show=t.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},zz.type="series.pie",zz.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"};var Hz=zz;Kw(Vz,$z=jD),Vz.type="title",Vz.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}};var $z,Qz=Vz;function Vz(){var e=null!==$z&&$z.apply(this,arguments)||this;return e.type=Vz.type,e.layoutMode={type:"box",ignoreSize:!0},e}Kw(Wz,qz=PM),Wz.prototype.render=function(e,t,n){var r,i,o,a,s,u,c,l,h;this.group.removeAll(),e.get("show")&&(r=this.group,c=e.getModel("textStyle"),i=e.getModel("subtextStyle"),l=e.get("textAlign"),h=Xw.N(e.get("textBaseline"),e.get("textVerticalAlign")),s=(c=new nO({style:dT(c,{text:e.get("text"),fill:c.getTextColor()},{disableBox:!0}),z2:10})).getBoundingRect(),u=e.get("subtext"),i=new nO({style:dT(i,{text:u,fill:i.getTextColor(),y:s.height+e.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),o=e.get("link"),a=e.get("sublink"),s=e.get("triggerEvent",!0),c.silent=!o&&!s,i.silent=!a&&!s,o&&c.on("click",(function(){gD(o,"_"+e.get("target"))})),a&&i.on("click",(function(){gD(a,"_"+e.get("subtarget"))})),rO(c).eventData=rO(i).eventData=s?{componentType:"title",componentIndex:e.componentIndex}:null,r.add(c),u&&r.add(i),s=r.getBoundingRect(),(u=e.getBoxLayoutParams()).width=s.width,u.height=s.height,u=xD(u,{width:n.getWidth(),height:n.getHeight()},e.get("padding")),l||("right"===(l="middle"===(l=e.get("left")||e.get("right"))?"center":l)?u.x+=u.width:"center"===l&&(u.x+=u.width/2)),h||("bottom"===(h="center"===(h=e.get("top")||e.get("bottom"))?"middle":h)?u.y+=u.height:"middle"===h&&(u.y+=u.height/2),h=h||"top"),r.x=u.x,r.y=u.y,r.markRedraw(),c.setStyle(n={align:l,verticalAlign:h}),i.setStyle(n),s=r.getBoundingRect(),c=u.margin,(l=e.getItemStyle(["color","opacity"])).fill=e.get("backgroundColor"),h=new z_({shape:{x:s.x-c[3],y:s.y-c[0],width:s.width+c[1]+c[3],height:s.height+c[0]+c[2],r:e.get("borderRadius")},style:l,subPixelOptimize:!0,silent:!0}),r.add(h))},Wz.type="title";var qz,Gz=Wz;function Wz(){var e=null!==qz&&qz.apply(this,arguments)||this;return e.type=Wz.type,e}function Kz(e,t){return"all"===e||Object(Xw.s)(e)&&0<=Object(Xw.q)(e,t)||e===t}function Yz(e){var t=(e.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[Jz(e)]}function Xz(e){return!!e.get(["handle","show"])}function Jz(e){return e.type+"||"+e.id}var Zz,eH={};function tH(){var e=null!==Zz&&Zz.apply(this,arguments)||this;return e.type=tH.type,e}Kw(tH,Zz=PM),tH.prototype.render=function(e,t,n,r){var i,o,a,s,u,c;this.axisPointerClass&&(i=Yz(i=e))&&(u=i.axisPointerModel,o=i.axis.scale,a=u.option,c=u.get("status"),null!=(s=u.get("value"))&&(s=o.parse(s)),u=Xz(u),null==c&&(a.status=u?"show":"hide"),(c=o.getExtent().slice())[0]>c[1]&&c.reverse(),(s=null==s||s>c[1]?c[1]:s)<c[0]&&(s=c[0]),a.value=s,u&&(a.status=i.axis.scale.isBlank()?"hide":"show")),Zz.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(e,n,!0)},tH.prototype.updateAxisPointer=function(e,t,n,r){this._doUpdateAxisPointerClass(e,n,!1)},tH.prototype.remove=function(e,t){var n=this._axisPointer;n&&n.remove(t)},tH.prototype.dispose=function(e,t){this._disposeAxisPointer(t),Zz.prototype.dispose.apply(this,arguments)},tH.prototype._doUpdateAxisPointerClass=function(e,t,n){var r,i=tH.getAxisPointerClass(this.axisPointerClass);i&&((r=(r=Yz(r=e))&&r.axisPointerModel)?(this._axisPointer||(this._axisPointer=new i)).render(e,r,t,n):this._disposeAxisPointer(t))},tH.prototype._disposeAxisPointer=function(e){this._axisPointer&&this._axisPointer.dispose(e),this._axisPointer=null},tH.registerAxisPointerClass=function(e,t){eH[e]=t},tH.getAxisPointerClass=function(e){return e&&eH[e]},tH.type="axis";var nH=tH,rH=UE(),iH=Xw.d,oH=Xw.c;function aH(){this._dragging=!1,this.animationThreshold=15}function sH(e,t,n,r){!function e(t,n){var r;return Xw.z(t)&&Xw.z(n)?(r=!0,Xw.k(n,(function(n,i){r=r&&e(t[i],n)})),!!r):t===n}(rH(n).lastProp,r)&&(rH(n).lastProp=r,t?tT(n,r,e):(n.stopAnimation(),n.attr(r)))}function uH(e,t){e[t.get(["label","show"])?"show":"hide"]()}function cH(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function lH(e,t,n){var r=t.get("z"),i=t.get("zlevel");e&&e.traverse((function(e){"group"!==e.type&&(null!=r&&(e.z=r),null!=i&&(e.zlevel=i),e.silent=n)}))}function hH(e){this._setting=e||{},this._extent=[1/0,-1/0]}aH.prototype.render=function(e,t,n,r){var i,o,a=t.get("value"),s=t.get("status");this._axisModel=e,this._axisPointerModel=t,this._api=n,!r&&this._lastValue===a&&this._lastStatus===s||(this._lastValue=a,this._lastStatus=s,r=this._group,i=this._handle,s&&"hide"!==s?(r&&r.show(),i&&i.show(),this.makeElOption(s={},a,e,t,n),(o=s.graphicKey)!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=o,o=this._moveAnimation=this.determineAnimation(e,t),r?(o=Xw.h(sH,t,o),this.updatePointerEl(r,s,o),this.updateLabelEl(r,s,o,t)):(r=this._group=new cE,this.createPointerEl(r,s,e,t),this.createLabelEl(r,s,e,t),n.getZr().add(r)),lH(r,t,!0),this._renderHandle(a)):(r&&r.hide(),i&&i.hide()))},aH.prototype.remove=function(e){this.clear(e)},aH.prototype.dispose=function(e){this.clear(e)},aH.prototype.determineAnimation=function(e,t){var n,r=t.get("animation"),i=e.axis,o="category"===i.type;return!(!(t=t.get("snap"))&&!o)&&("auto"===r||null==r?(n=this.animationThreshold,o&&i.getBandWidth()>n||!!t&&(o=Yz(e).seriesDataCount,t=i.getExtent(),Math.abs(t[0]-t[1])/o>n)):!0===r)},aH.prototype.makeElOption=function(e,t,n,r,i){},aH.prototype.createPointerEl=function(e,t,n,i){var o=t.pointer;o&&(o=rH(e).pointerEl=new r[o.type](iH(t.pointer)),e.add(o))},aH.prototype.createLabelEl=function(e,t,n,r){t.label&&(t=rH(e).labelEl=new nO(iH(t.label)),e.add(t),uH(t,r))},aH.prototype.updatePointerEl=function(e,t,n){(e=rH(e).pointerEl)&&t.pointer&&(e.setStyle(t.pointer.style),n(e,{shape:t.pointer.shape}))},aH.prototype.updateLabelEl=function(e,t,n,r){(e=rH(e).labelEl)&&(e.setStyle(t.label.style),n(e,{x:t.label.x,y:t.label.y}),uH(e,r))},aH.prototype._renderHandle=function(e){var t,n,r,i,o,a;!this._dragging&&this.updateHandleTransform&&(t=this._axisPointerModel,n=this._api.getZr(),r=this._handle,i=t.getModel("handle"),a=t.get("status"),i.get("show")&&a&&"hide"!==a?(this._handle||(o=!0,r=this._handle=GN(i.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(e){Ix(e.event)},onmousedown:oH(this._onHandleDragMove,this,0,0),drift:oH(this._onHandleDragMove,this),ondragend:oH(this._onHandleDragEnd,this)}),n.add(r)),lH(r,t,!1),r.setStyle(i.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"])),a=i.get("size"),Xw.s(a)||(a=[a,a]),r.scaleX=a[0]/2,r.scaleY=a[1]/2,fF(this,"_doDispatchAxisPointer",i.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,o)):(r&&n.remove(r),this._handle=null))},aH.prototype._moveHandleToValue=function(e,t){sH(this._axisPointerModel,!t&&this._moveAnimation,this._handle,cH(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},aH.prototype._onHandleDragMove=function(e,t){var n=this._handle;n&&(this._dragging=!0,e=this.updateHandleTransform(cH(n),[e,t],this._axisModel,this._axisPointerModel),this._payloadInfo=e,n.stopAnimation(),n.attr(cH(e)),rH(n).lastProp=null,this._doDispatchAxisPointer())},aH.prototype._doDispatchAxisPointer=function(){var e,t;this._handle&&(e=this._payloadInfo,t=this._axisModel,this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:t.axis.dim,axisIndex:t.componentIndex}]}))},aH.prototype._onHandleDragEnd=function(){var e;this._dragging=!1,this._handle&&(e=this._axisPointerModel.get("value"),this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"}))},aH.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;e=e.getZr();var t=this._group,n=this._handle;e&&t&&(this._lastGraphicKey=null,t&&e.remove(t),n&&e.remove(n),this._group=null,this._handle=null,this._payloadInfo=null),dF(this,"_doDispatchAxisPointer")},aH.prototype.doClear=function(){},aH.prototype.buildLabel=function(e,t,n){return{x:e[n=n||0],y:e[1-n],width:t[n],height:t[1-n]}},Yo=aH,hH.prototype.getSetting=function(e){return this._setting[e]},hH.prototype.unionExtent=function(e){var t=this._extent;e[0]<t[0]&&(t[0]=e[0]),e[1]>t[1]&&(t[1]=e[1])},hH.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},hH.prototype.getExtent=function(){return this._extent.slice()},hH.prototype.setExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(t)||(n[1]=t)},hH.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},hH.prototype.isBlank=function(){return this._isBlank},hH.prototype.setBlank=function(e){this._isBlank=e},tS(Va=hH);var fH=Va,dH=0;function pH(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++dH}function mH(e){return Object(Xw.z)(e)&&null!=e.value?e.value:e+""}pH.createByAxisModel=function(e){var t;return new pH({categories:t=(t=(e=e.option).data)&&Object(Xw.G)(t,mH),needCollect:!t,deduplication:!1!==e.dedplication})},pH.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},pH.prototype.parseAndCollect=function(e){var t,n,r=this._needCollect;return Object(Xw.B)(e)||r?(r&&!this._deduplication?(n=this.categories.length,this.categories[n]=e):null==(n=(t=this._getOrCreateMap()).get(e))&&(r?(n=this.categories.length,this.categories[n]=e,t.set(e,n)):n=NaN),n):e},pH.prototype._getOrCreateMap=function(){return this._map||(this._map=Object(Xw.f)(this.categories))};var gH=pH;function AH(e){return"interval"===e.type||"log"===e.type}function vH(e){var t=Math.pow(10,CE(e));return(e=e/t)?2===e?e=3:3===e?e=5:e*=2:e=1,AE(e*t)}function bH(e){return vE(e)+2}function yH(e,t,n){e[t]=Math.max(Math.min(e[t],n[1]),n[0])}function wH(e,t){return e>=t[0]&&e<=t[1]}function xH(e,t){return t[1]===t[0]?.5:(e-t[0])/(t[1]-t[0])}function CH(e,t){return e*(t[1]-t[0])+t[0]}Kw(EH,kH=fH),EH.prototype.parse=function(e){return null==e?NaN:Object(Xw.B)(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},EH.prototype.contain=function(e){return wH(e=this.parse(e),this._extent)&&null!=this._ordinalMeta.categories[e]},EH.prototype.normalize=function(e){return xH(e=this._getTickNumber(this.parse(e)),this._extent)},EH.prototype.scale=function(e){return e=Math.round(CH(e,this._extent)),this.getRawOrdinalNumber(e)},EH.prototype.getTicks=function(){for(var e=[],t=this._extent,n=t[0];n<=t[1];)e.push({value:n}),n++;return e},EH.prototype.getMinorTicks=function(e){},EH.prototype.setSortInfo=function(e){if(null==e)this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;else{for(var t=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],r=this._ticksByOrdinalNumber=[],i=0,o=this._ordinalMeta.categories.length,a=Math.min(o,t.length);i<a;++i){var s=t[i];r[n[i]=s]=i}for(var u=0;i<o;++i){for(;null!=r[u];)u++;n.push(u),r[u]=i}}},EH.prototype._getTickNumber=function(e){var t=this._ticksByOrdinalNumber;return t&&0<=e&&e<t.length?t[e]:e},EH.prototype.getRawOrdinalNumber=function(e){var t=this._ordinalNumbersByTick;return t&&0<=e&&e<t.length?t[e]:e},EH.prototype.getLabel=function(e){if(!this.isBlank())return e=this.getRawOrdinalNumber(e.value),null==(e=this._ordinalMeta.categories[e])?"":e+""},EH.prototype.count=function(){return this._extent[1]-this._extent[0]+1},EH.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},EH.prototype.isInExtentRange=function(e){return e=this._getTickNumber(e),this._extent[0]<=e&&this._extent[1]>=e},EH.prototype.getOrdinalMeta=function(){return this._ordinalMeta},EH.prototype.calcNiceTicks=function(){},EH.prototype.calcNiceExtent=function(){},EH.type="ordinal";var kH;Ia=EH;function EH(e){(e=kH.call(this,e)||this).type="ordinal";var t=(t=e.getSetting("ordinalMeta"))||new gH({});return Object(Xw.s)(t)&&(t=new gH({categories:Object(Xw.G)(t,(function(e){return Object(Xw.z)(e)?e.value:e}))})),e._ordinalMeta=t,e._extent=e.getSetting("extent")||[0,t.categories.length-1],e}fH.registerClass(Ia);var SH,_H=Ia,OH=AE;Kw(TH,SH=fH),TH.prototype.parse=function(e){return e},TH.prototype.contain=function(e){return wH(e,this._extent)},TH.prototype.normalize=function(e){return xH(e,this._extent)},TH.prototype.scale=function(e){return CH(e,this._extent)},TH.prototype.setExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=parseFloat(e)),isNaN(t)||(n[1]=parseFloat(t))},TH.prototype.unionExtent=function(e){var t=this._extent;e[0]<t[0]&&(t[0]=e[0]),e[1]>t[1]&&(t[1]=e[1]),this.setExtent(t[0],t[1])},TH.prototype.getInterval=function(){return this._interval},TH.prototype.setInterval=function(e){this._interval=e,this._niceExtent=this._extent.slice(),this._intervalPrecision=bH(e)},TH.prototype.getTicks=function(e){var t=this._interval,n=this._extent,r=this._niceExtent,i=this._intervalPrecision,o=[];if(t){n[0]<r[0]&&(e?o.push({value:OH(r[0]-t,i)}):o.push({value:n[0]}));for(var a=r[0];a<=r[1]&&(o.push({value:a}),(a=OH(a+t,i))!==o[o.length-1].value);)if(1e4<o.length)return[];var s=o.length?o[o.length-1].value:r[1];n[1]>s&&(e?o.push({value:OH(s+t,i)}):o.push({value:n[1]}))}return o},TH.prototype.getMinorTicks=function(e){for(var t=this.getTicks(!0),n=[],r=this.getExtent(),i=1;i<t.length;i++){for(var o=t[i],a=t[i-1],s=0,u=[],c=(o.value-a.value)/e;s<e-1;){var l=OH(a.value+(s+1)*c);l>r[0]&&l<r[1]&&u.push(l),s++}n.push(u)}return n},TH.prototype.getLabel=function(e,t){return null==e?"":(null==(t=t&&t.precision)?t=vE(e.value)||0:"auto"===t&&(t=this._intervalPrecision),uD(OH(e.value,t,!0)))},TH.prototype.calcNiceTicks=function(e,t,n){e=e||5;var r=this._extent,i=r[1]-r[0];isFinite(i)&&(i<0&&r.reverse(),i=function(e,t,n,r){var i={},o=e[1]-e[0];return o=i.interval=kE(o/t,!0),null!=n&&o<n&&(o=i.interval=n),null!=r&&r<o&&(o=i.interval=r),t=i.intervalPrecision=bH(o),r=n=i.niceTickExtent=[AE(Math.ceil(e[0]/o)*o,t),AE(Math.floor(e[1]/o)*o,t)],o=e,isFinite(r[0])||(r[0]=o[0]),isFinite(r[1])||(r[1]=o[1]),yH(r,0,o),yH(r,1,o),r[0]>r[1]&&(r[0]=r[1]),i}(r,e,t,n),this._intervalPrecision=i.intervalPrecision,this._interval=i.interval,this._niceExtent=i.niceTickExtent)},TH.prototype.calcNiceExtent=function(e){var t=this._extent,n=(t[0]===t[1]&&(0!==t[0]?(n=Math.abs(t[0]),e.fixMax||(t[1]+=n/2),t[0]-=n/2):t[1]=1),t[1]-t[0]);isFinite(n)||(t[0]=0,t[1]=1),this.calcNiceTicks(e.splitNumber,e.minInterval,e.maxInterval),n=this._interval;e.fixMin||(t[0]=OH(Math.floor(t[0]/n)*n)),e.fixMax||(t[1]=OH(Math.ceil(t[1]/n)*n))},TH.prototype.setNiceExtent=function(e,t){this._niceExtent=[e,t]},TH.type="interval",ia=TH;function TH(){var e=null!==SH&&SH.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalPrecision=2,e}fH.registerClass(ia);var DH,BH=ia;Kw(IH,DH=BH),IH.prototype.getLabel=function(e){var t=this.getSetting("useUTC");return qT(e.value,zT[function(e){switch(e){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}(VT(this._minLevelUnit))]||zT.second,t,this.getSetting("locale"))},IH.prototype.getFormattedLabel=function(e,t,n){var r=this.getSetting("useUTC"),i=this.getSetting("locale"),o=null;if(Xw.B(n))o=n;else if(Xw.v(n))o=n(e.value,t,{level:e.level});else{var a=Xw.m({},UT);if(0<e.level)for(var s=0;s<HT.length;++s)a[HT[s]]="{primary|"+a[HT[s]]+"}";var u=n?!1===n.inherit?n:Xw.i(n,a):a,c=GT(e.value,r);if(u[c])o=u[c];else if(u.inherit){for(s=$T.indexOf(c)-1;0<=s;--s)if(u[c]){o=u[c];break}o=o||a.none}Xw.s(o)&&(t=null==e.level?0:0<=e.level?e.level:o.length+e.level,o=o[t=Math.min(t,o.length-1)])}return qT(new Date(e.value),o,r,i)},IH.prototype.getTicks=function(){var e=this._interval,t=this._extent,n=[];return e&&(n.push({value:t[0],level:0}),e=this.getSetting("useUTC"),e=function(e,t,n,r){var i=$T,o=0;function a(e,i,o){var a=[],s=!i.length;if(!function(e,t,n,r){function i(e){return WT(h,e,r)===WT(f,e,r)}function o(){return i("year")}function a(){return o()&&i("month")}function s(){return a()&&i("day")}function u(){return s()&&i("hour")}function c(){return u()&&i("minute")}function l(){return c()&&i("second")}var h=xE(t),f=xE(n);switch(e){case"year":return o();case"month":return a();case"day":return s();case"hour":return u();case"minute":return c();case"second":return l();case"millisecond":return l()&&i("millisecond")}}(VT(e),r[0],r[1],n)){s&&(i=[{value:function(e,t,n){var r=new Date(e);switch(VT(t)){case"year":case"month":r[nD(n)](0);case"day":r[rD(n)](1);case"hour":r[iD(n)](0);case"minute":r[oD(n)](0);case"second":r[aD(n)](0),r[sD(n)](0)}return r.getTime()}(new Date(r[0]),e,n)},{value:r[1]}]);for(var u,c,l=0;l<i.length-1;l++){var h=i[l].value,f=i[l+1].value;if(h!==f){var d=void 0,p=void 0,m=void 0;switch(e){case"year":d=Math.max(1,Math.round(t/LT/365)),p=KT(n),m=n?"setUTCFullYear":"setFullYear";break;case"half-year":case"quarter":case"month":c=t,d=6<(c/=30*LT)?6:3<c?3:2<c?2:1,p=YT(n),m=nD(n);break;case"week":case"half-week":case"day":c=t,d=16<(c/=LT)?16:7.5<c?7:3.5<c?4:1.5<c?2:1,p=XT(n),m=rD(n);break;case"half-day":case"quarter-day":case"hour":u=t,d=12<(u/=PT)?12:6<u?6:3.5<u?4:2<u?2:1,p=JT(n),m=iD(n);break;case"minute":d=jH(t,!0),p=ZT(n),m=oD(n);break;case"second":d=jH(t,!1),p=eD(n),m=aD(n);break;case"millisecond":d=kE(t,!0),p=tD(n),m=sD(n)}k=C=x=w=void 0;for(var g=d,A=h,v=f,b=p,y=m,w=a,x=new Date(A),C=A,k=x[b]();C<v&&C<=r[1];)w.push({value:C}),x[y](k+=g),C=x.getTime();w.push({value:C,notAdd:!0}),"year"===e&&1<o.length&&0===l&&o.unshift({value:o[0].value-d})}}for(l=0;l<a.length;l++)o.push(a[l])}}for(var s=[],u=[],c=0,l=0,h=0;h<i.length&&o++<1e4;++h){var f=VT(i[h]);if(function(e){return e===VT(e)}(i[h]))if(a(i[h],s[s.length-1]||[],u),f!==(i[h+1]?VT(i[h+1]):null)){if(u.length){l=c,u.sort((function(e,t){return e.value-t.value}));for(var d=[],p=0;p<u.length;++p){var m=u[p].value;0!==p&&u[p-1].value===m||(d.push(u[p]),m>=r[0]&&m<=r[1]&&c++)}if(1.5*(f=(r[1]-r[0])/t)<c&&f/1.5<l)break;if(s.push(d),f<c||e===i[h])break}u=[]}}var g=Object(Xw.n)(Object(Xw.G)(s,(function(e){return Object(Xw.n)(e,(function(e){return e.value>=r[0]&&e.value<=r[1]&&!e.notAdd}))})),(function(e){return 0<e.length})),A=[],v=g.length-1;for(h=0;h<g.length;++h)for(var b=g[h],y=0;y<b.length;++y)A.push({value:b[y].value,level:v-h});A.sort((function(e,t){return e.value-t.value}));var w=[];for(h=0;h<A.length;++h)0!==h&&A[h].value===A[h-1].value||w.push(A[h]);return w}(this._minLevelUnit,this._approxInterval,e,t),(n=n.concat(e)).push({value:t[1],level:0})),n},IH.prototype.calcNiceExtent=function(e){var t,n=this._extent;n[0]===n[1]&&(n[0]-=LT,n[1]+=LT),n[1]===-1/0&&n[0]===1/0&&(t=new Date,n[1]=+new Date(t.getFullYear(),t.getMonth(),t.getDate()),n[0]=n[1]-LT),this.calcNiceTicks(e.splitNumber,e.minInterval,e.maxInterval)},IH.prototype.calcNiceTicks=function(e,t,n){var r=(r=this._extent)[1]-r[0];this._approxInterval=r/(e=e||10),null!=t&&this._approxInterval<t&&(this._approxInterval=t),null!=n&&this._approxInterval>n&&(this._approxInterval=n),r=MH.length,e=Math.min(function(e,t,n,r){for(;n<r;){var i=n+r>>>1;e[i][1]<t?n=1+i:r=i}return n}(MH,this._approxInterval,0,r),r-1);this._interval=MH[e][1],this._minLevelUnit=MH[Math.max(e-1,0)][0]},IH.prototype.parse=function(e){return Object(Xw.y)(e)?e:+xE(e)},IH.prototype.contain=function(e){return wH(this.parse(e),this._extent)},IH.prototype.normalize=function(e){return xH(this.parse(e),this._extent)},IH.prototype.scale=function(e){return CH(e,this._extent)},IH.type="time",ha=IH;function IH(e){return(e=DH.call(this,e)||this).type="time",e}var MH=[["second",1e3],["minute",6e4],["hour",PT],["quarter-day",6*PT],["half-day",12*PT],["day",1.2*LT],["half-week",3.5*LT],["week",7*LT],["month",31*LT],["quarter",95*LT],["half-year",_a/2],["year",_a]];function jH(e,t){return 30<(e/=t?6e4:1e3)?30:20<e?20:15<e?15:10<e?10:5<e?5:2<e?2:1}fH.registerClass(ha);var NH,FH=ha,RH=fH.prototype,PH=BH.prototype,LH=AE,UH=Math.floor,zH=Math.ceil,HH=Math.pow,$H=Math.log;function QH(){var e=null!==NH&&NH.apply(this,arguments)||this;return e.type="log",e.base=10,e._originalScale=new BH,e._interval=0,e}function VH(e,t){return LH(e,vE(t))}(Ko=(Ga=(Kw(QH,NH=fH),QH.prototype.getTicks=function(e){var t=this._originalScale,n=this._extent,r=t.getExtent();t=PH.getTicks.call(this,e);return Xw.G(t,(function(e){e=e.value;var t=AE(HH(this.base,e));t=e===n[0]&&this._fixMin?VH(t,r[0]):t;return{value:t=e===n[1]&&this._fixMax?VH(t,r[1]):t}}),this)},QH.prototype.setExtent=function(e,t){var n=$H(this.base);e=$H(Math.max(0,e))/n,t=$H(Math.max(0,t))/n,PH.setExtent.call(this,e,t)},QH.prototype.getExtent=function(){var e=this.base,t=RH.getExtent.call(this);return t[0]=HH(e,t[0]),t[1]=HH(e,t[1]),e=this._originalScale.getExtent(),this._fixMin&&(t[0]=VH(t[0],e[0])),this._fixMax&&(t[1]=VH(t[1],e[1])),t},QH.prototype.unionExtent=function(e){this._originalScale.unionExtent(e);var t=this.base;e[0]=$H(e[0])/$H(t),e[1]=$H(e[1])/$H(t),RH.unionExtent.call(this,e)},QH.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},QH.prototype.calcNiceTicks=function(e){e=e||10;var t=this._extent,n=t[1]-t[0];if(!(n==1/0||n<=0)){var r=Math.pow(10,CE(n));for(e/n*r<=.5&&(r*=10);!isNaN(r)&&Math.abs(r)<1&&0<Math.abs(r);)r*=10;e=[AE(zH(t[0]/r)*r),AE(UH(t[1]/r)*r)],this._interval=r,this._niceExtent=e}},QH.prototype.calcNiceExtent=function(e){PH.calcNiceExtent.call(this,e),this._fixMin=e.fixMin,this._fixMax=e.fixMax},QH.prototype.parse=function(e){return e},QH.prototype.contain=function(e){return wH(e=$H(e)/$H(this.base),this._extent)},QH.prototype.normalize=function(e){return xH(e=$H(e)/$H(this.base),this._extent)},QH.prototype.scale=function(e){return e=CH(e,this._extent),HH(this.base,e)},QH.type="log",QH)).prototype).getMinorTicks=PH.getMinorTicks,Ko.getLabel=PH.getLabel,fH.registerClass(Ga);var qH=Ga,GH=(WH.prototype._prepareParams=function(e,t,n){n[1]<n[0]&&(n=[NaN,NaN]),this._dataMin=n[0],this._dataMax=n[1];var r=this._isOrdinal="ordinal"===e.type,i=(this._needCrossZero="interval"===e.type&&t.getNeedCrossZero&&t.getNeedCrossZero(),this._modelMinRaw=t.get("min",!0));Object(Xw.v)(i)?this._modelMinNum=XH(e,i({min:n[0],max:n[1]})):"dataMin"!==i&&(this._modelMinNum=XH(e,i)),i=this._modelMaxRaw=t.get("max",!0);Object(Xw.v)(i)?this._modelMaxNum=XH(e,i({min:n[0],max:n[1]})):"dataMax"!==i&&(this._modelMaxNum=XH(e,i)),r?this._axisDataLen=t.getCategories().length:(n=t.get("boundaryGap"),"boolean"==typeof(e=Object(Xw.s)(n)?n:[n||0,n||0])[0]||"boolean"==typeof e[1]?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[Yk(e[0],1),Yk(e[1],1)])},WH.prototype.calculate=function(){var e=this._isOrdinal,t=this._dataMin,n=this._dataMax,r=this._axisDataLen,i=this._boundaryGapInner,o=e?null:n-t||Math.abs(t),a="dataMin"===this._modelMinRaw?t:this._modelMinNum,s="dataMax"===this._modelMaxRaw?n:this._modelMaxNum,u=null!=a,c=null!=s;null==a&&(a=e?r?0:NaN:t-i[0]*o),null==s&&(s=e?r?r-1:NaN:n+i[1]*o),null!=a&&isFinite(a)||(a=NaN),null!=s&&isFinite(s)||(s=NaN),t=Object(Xw.l)(a)||Object(Xw.l)(s)||e&&!r;return null!=(n=(this._needCrossZero&&(a=0<a&&0<s&&!u?0:a)<0&&s<0&&!c&&(s=0),this._determinedMin))&&(a=n,u=!0),null!=(i=this._determinedMax)&&(s=i,c=!0),{min:a,max:s,minFixed:u,maxFixed:c,isBlank:t}},WH.prototype.modifyDataMinMax=function(e,t){this[YH[e]]=t},WH.prototype.setDeterminedMinMax=function(e,t){this[KH[e]]=t},WH.prototype.freeze=function(){this.frozen=!0},WH);function WH(e,t,n){this._prepareParams(e,t,n)}var KH={min:"_determinedMin",max:"_determinedMax"},YH={min:"_dataMin",max:"_dataMax"};function XH(e,t){return null==t?null:Object(Xw.l)(t)?NaN:e.parse(t)}function JH(e,t){var n,r,i,o,a,s=e.type,u=(u=t,c=(l=e).getExtent(),(h=l.rawExtentInfo)||(h=new GH(l,u,c),l.rawExtentInfo=h),h.calculate()),c=(e.setBlank(u.isBlank),u.min),l=u.max,h=t.ecModel;return h&&"time"===s&&(e=GP("bar",h),n=!1,Xw.k(e,(function(e){n=n||e.getBaseAxis()===t.axis})),n&&(s=WP(e),h=c,e=l,s=s,a=(a=(r=t).axis.getExtent())[1]-a[0],void 0!==(s=function(e,t,n){if(e&&t)return e=e[qP(t)]}(s,r.axis))&&(i=1/0,Xw.k(s,(function(e){i=Math.min(e.offset,i)})),o=-1/0,Xw.k(s,(function(e){o=Math.max(e.offset+e.width,o)})),i=Math.abs(i),e+=(o=Math.abs(o))/(r=i+o)*(a=(s=e-h)/(1-(i+o)/a)-s),h-=i/r*a),c=(s={min:h,max:e}).min,l=s.max)),{extent:[c,l],fixMin:u.minFixed,fixMax:u.maxFixed}}function ZH(e,t){var n=JH(e,t),r=n.extent,i=t.get("splitNumber"),o=(e instanceof qH&&(e.base=t.get("logBase")),e.type),a=t.get("interval");o="interval"===o||"time"===o;e.setExtent(r[0],r[1]),e.calcNiceExtent({splitNumber:i,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:o?t.get("minInterval"):null,maxInterval:o?t.get("maxInterval"):null}),null!=a&&e.setInterval&&e.setInterval(a)}function e$(e){var t,n,r,i=e.getLabelModel().get("formatter"),o="category"===e.type?e.scale.getExtent()[0]:null;return"time"===e.scale.type?(r=i,function(t,n){return e.scale.getFormattedLabel(t,n,r)}):Xw.B(i)?(n=i,function(t){return t=e.scale.getLabel(t),n.replace("{value}",null!=t?t:"")}):Xw.v(i)?(t=i,function(n,r){return null!=o&&(r=n.value-o),t(t$(e,n),r,null!=n.level?{level:n.level}:null)}):function(t){return e.scale.getLabel(t)}}function t$(e,t){return"category"===e.type?e.scale.getLabel(t):t.value}function n$(e){return null==(e=e.get("interval"))?"auto":e}function r$(e){return"category"===e.type&&0===n$(e.getLabelModel())}var i$=Math.PI,o$=(a$.prototype.hasBuilder=function(e){return!!s$[e]},a$.prototype.add=function(e){s$[e](this.opt,this.axisModel,this.group,this._transformGroup)},a$.prototype.getGroup=function(){return this.group},a$.innerTextLayout=function(e,t,n){var r;return{rotation:t=bE(t-e),textAlign:e=yE(t)?(r=0<n?"top":"bottom","center"):yE(t-i$)?(r=0<n?"bottom":"top","center"):(r="middle",0<t&&t<i$?0<n?"right":"left":0<n?"left":"right"),textVerticalAlign:r}},a$.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},a$.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)},a$);function a$(e,t){this.group=new cE,this.opt=t,this.axisModel=e,Object(Xw.i)(t,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}}),(e=new cE({x:t.position[0],y:t.position[1],rotation:t.rotation})).updateTransform(),this._transformGroup=e}var s$={axisLine:function(e,t,n,r){var i,o,a,s,u,c,l,h=t.get(["axisLine","show"]);(h="auto"===h&&e.handleAutoShown?e.handleAutoShown("axisLine"):h)&&(h=t.axis.getExtent(),r=r.transform,i=[h[0],0],o=[h[1],0],a=o[0]<i[0],r&&(sx(i,i,r),sx(o,o,r)),s=Object(Xw.m)({lineCap:"round"},t.getModel(["axisLine","lineStyle"]).getLineStyle()),RN((h=new Kj({shape:{x1:i[0],y1:i[1],x2:o[0],y2:o[1]},style:s,strokeContainThreshold:e.strokeContainThreshold||5,silent:!0,z2:1})).shape,h.style.lineWidth),h.anid="line",n.add(h),null!=(u=t.get(["axisLine","symbol"]))&&(r=t.get(["axisLine","symbolSize"]),Object(Xw.B)(u)&&(u=[u,u]),(Object(Xw.B)(r)||Object(Xw.y)(r))&&(r=[r,r]),h=JF(t.get(["axisLine","symbolOffset"])||0,r),c=r[0],l=r[1],Object(Xw.k)([{rotate:e.rotation+Math.PI/2,offset:h[0],r:0},{rotate:e.rotation-Math.PI/2,offset:h[1],r:Math.sqrt((i[0]-o[0])*(i[0]-o[0])+(i[1]-o[1])*(i[1]-o[1]))}],(function(t,r){var h;"none"!==u[r]&&null!=u[r]&&(r=XF(u[r],-c/2,-l/2,c,l,s.stroke,!0),h=t.r+t.offset,r.attr({rotation:t.rotate,x:(t=a?o:i)[0]+h*Math.cos(e.rotation),y:t[1]-h*Math.sin(e.rotation),silent:!0,z2:11}),n.add(r))}))))},axisTickLabel:function(e,t,n,r){var i,o,a,s,u,c=function(e,t,n,r){var i=n.axis,o=n.getModel("axisTick");if("auto"===(a=o.get("show"))&&r.handleAutoShown&&(a=r.handleAutoShown("axisTick")),a&&!i.scale.isBlank()){for(var a=o.getModel("lineStyle"),s=(r=r.tickDirection*o.get("length"),h$(i.getTicksCoords(),t.transform,r,Object(Xw.i)(a.getLineStyle(),{stroke:n.get(["axisLine","lineStyle","color"])}),"ticks")),u=0;u<s.length;u++)e.add(s[u]);return s}}(n,r,t,e),l=function(e,t,n,r){var i,o,a,s,u,c,l,h,f=n.axis,d=Object(Xw.M)(r.axisLabelShow,n.get(["axisLabel","show"]));if(d&&!f.scale.isBlank())return i=n.getModel("axisLabel"),o=i.get("margin"),d=f.getViewLabels(),a=(Object(Xw.M)(r.labelRotate,i.get("rotate"))||0)*i$/180,s=o$.innerTextLayout(r.rotation,a,r.labelDirection),u=n.getCategories&&n.getCategories(!0),c=[],l=o$.isLabelSilent(n),h=n.get("triggerEvent"),Object(Xw.k)(d,(function(a,d){var p="ordinal"===f.scale.type?f.scale.getRawOrdinalNumber(a.tickValue):a.tickValue,m=a.formattedLabel,g=a.rawLabel,A=i,v=(u&&u[p]&&(v=u[p],Object(Xw.z)(v)&&v.textStyle&&(A=new DT(v.textStyle,i,n.ecModel))),A.getTextColor()||n.get(["axisLine","lineStyle","color"])),b=f.dataToCoord(p);(b=new nO({x:b,y:r.labelOffset+r.labelDirection*o,rotation:s.rotation,silent:l,z2:10+(a.level||0),style:dT(A,{text:m,align:A.getShallow("align",!0)||s.textAlign,verticalAlign:A.getShallow("verticalAlign",!0)||A.getShallow("baseline",!0)||s.textVerticalAlign,fill:Object(Xw.v)(v)?v("category"===f.type?g:"value"===f.type?p+"":p,d):v})})).anid="label_"+p,h&&((a=o$.makeAxisEventDataBase(n)).targetType="axisLabel",a.value=g,a.tickIndex=d,"category"===f.type&&(a.dataIndex=p),rO(b).eventData=a),t.add(b),b.updateTransform(),c.push(b),e.add(b),b.decomposeTransform()})),c}(n,r,t,e),h=(o=l,c=c,r$((i=t).axis)||(d=i.get(["axisLabel","showMinLabel"]),i=i.get(["axisLabel","showMaxLabel"]),c=c||[],g=(o=o||[])[0],p=o[1],a=o[o.length-1],o=o[o.length-2],s=c[0],m=c[1],u=c[c.length-1],c=c[c.length-2],!1===d?(u$(g),u$(s)):c$(g,p)&&(d?(u$(p),u$(m)):(u$(g),u$(s))),!1===i?(u$(a),u$(u)):c$(o,a)&&(i?(u$(o),u$(c)):(u$(a),u$(u)))),n),f=r,d=t,p=e.tickDirection,m=d.axis,g=d.getModel("minorTick");if(g.get("show")&&!m.scale.isBlank()){var A=m.getMinorTicksCoords();if(A.length){m=g.getModel("lineStyle");for(var v=p*g.get("length"),b=Object(Xw.i)(m.getLineStyle(),Object(Xw.i)(d.getModel("axisTick").getLineStyle(),{stroke:d.get(["axisLine","lineStyle","color"])})),y=0;y<A.length;y++)for(var w=h$(A[y],f.transform,v,b,"minorticks_"+y),x=0;x<w.length;x++)h.add(w[x])}}t.get(["axisLabel","hideOverlap"])&&Sz(Cz(Object(Xw.G)(l,(function(e){return{label:e,priority:e.z2,defaultAttr:{ignore:e.ignore}}}))))},axisName:function(e,t,n,r){var i,o,a,s,u,c,l,h,f=Object(Xw.M)(e.axisName,t.get("name"));f&&(h=t.get("nameLocation"),u=e.nameDirection,i=t.getModel("nameTextStyle"),c=t.get("nameGap")||0,o=(l=t.axis.getExtent())[0]>l[1]?-1:1,o=["start"===h?l[0]-o*c:"end"===h?l[1]+o*c:(l[0]+l[1])/2,l$(h)?e.labelOffset+u*c:0],null!=(c=t.get("nameRotate"))&&(c=c*i$/180),l$(h)?a=o$.innerTextLayout(e.rotation,null!=c?c:e.rotation,u):(a=function(e,t,n,r){var i;n=bE(n-e),e=r[0]>r[1],r="start"===t&&!e||"start"!==t&&e;return{rotation:n,textAlign:t=yE(n-i$/2)?(i=r?"bottom":"top","center"):yE(n-1.5*i$)?(i=r?"top":"bottom","center"):(i="middle",n<1.5*i$&&i$/2<n?r?"left":"right":r?"right":"left"),textVerticalAlign:i}}(e.rotation,h,c||0,l),null!=(s=e.axisNameAvailableWidth)&&(s=Math.abs(s/Math.sin(a.rotation)),isFinite(s)||(s=null))),u=i.getFont(),c=(h=t.get("nameTruncate",!0)||{}).ellipsis,l=Object(Xw.M)(e.nameTruncateMaxWidth,h.maxWidth,s),YN({el:e=new nO({x:o[0],y:o[1],rotation:a.rotation,silent:o$.isLabelSilent(t),style:dT(i,{text:f,font:u,overflow:"truncate",width:l,ellipsis:c,fill:i.getTextColor()||t.get(["axisLine","lineStyle","color"]),align:i.get("align")||a.textAlign,verticalAlign:i.get("verticalAlign")||a.textVerticalAlign}),z2:1}),componentModel:t,itemName:f}),e.__fullText=f,e.anid="name",t.get("triggerEvent")&&((h=o$.makeAxisEventDataBase(t)).targetType="axisName",h.name=f,rO(e).eventData=h),r.add(e),e.updateTransform(),n.add(e),e.decomposeTransform())}};function u$(e){e&&(e.ignore=!0)}function c$(e,t){var n,r=e&&e.getBoundingRect().clone(),i=t&&t.getBoundingRect().clone();if(r&&i)return Ux(n=Rx([]),n,-e.rotation),r.applyTransform(Px([],n,e.getLocalTransform())),i.applyTransform(Px([],n,t.getLocalTransform())),r.intersect(i)}function l$(e){return"middle"===e||"center"===e}function h$(e,t,n,r,i){for(var o=[],a=[],s=[],u=0;u<e.length;u++){var c=e[u].coord;RN((c=(a[0]=c,s[a[1]=0]=c,s[1]=n,t&&(sx(a,a,t),sx(s,s,t)),new Kj({shape:{x1:a[0],y1:a[1],x2:s[0],y2:s[1]},style:r,z2:2,autoBatch:!0,silent:!0}))).shape,c.style.lineWidth),c.anid=i+"_"+e[u].tickValue,o.push(c)}return o}var f$,d$=o$;function p$(e,t,n,r,i){e=t.scale.parse(e);var o,a=t.scale.getLabel({value:e},{precision:i.precision});return(i=i.formatter)&&(o={value:t$(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]},Xw.k(r,(function(e){var t=n.getSeriesByIndex(e.seriesIndex);e=e.dataIndexInside;(t=t&&t.getDataParams(e))&&o.seriesData.push(t)})),Xw.B(i)?a=i.replace("{value}",a):Xw.v(i)&&(a=i(o))),a}function m$(e,t,n){var r=[1,0,0,1,0,0];return Ux(r,r,n.rotation),Lx(r,r,n.position),zN([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}function g$(e,t,n){n=n||{};e=e.coordinateSystem;var r={},i=(s=t.axis).getAxesOnZeroOf()[0],o=s.position,a=i?"onZero":o,s=s.dim,u=(e=[(e=e.getRect()).x,e.x+e.width,e.y,e.y+e.height],{left:0,right:1,top:0,bottom:1,onZero:2}),c=t.get("offset")||0,l=(c="x"===s?[e[2]-c,e[3]+c]:[e[0]-c,e[1]+c],i&&(l=i.toGlobalCoord(i.dataToCoord(0)),c[u.onZero]=Math.max(Math.min(l,c[1]),c[0])),r.position=["y"===s?c[u[a]]:e[0],"x"===s?c[u[a]]:e[3]],r.rotation=Math.PI/2*("x"===s?0:1),r.labelDirection=r.tickDirection=r.nameDirection={top:-1,bottom:1,left:-1,right:1}[o],r.labelOffset=i?c[u[o]]-c[u.onZero]:0,t.get(["axisTick","inside"])&&(r.tickDirection=-r.tickDirection),Xw.M(n.labelInside,t.get(["axisLabel","inside"]))&&(r.labelDirection=-r.labelDirection),t.get(["axisLabel","rotate"]));return r.labelRotate="top"===a?-l:l,r.z2=1,r}function A$(e){return"cartesian2d"===e.get("coordinateSystem")}function v$(e){var t={xAxisModel:null,yAxisModel:null};return Xw.k(t,(function(n,r){var i=r.replace(/Model$/,"");i=e.getReferringComponents(i,QE).models[0];t[r]=i})),t}function b$(){return null!==f$&&f$.apply(this,arguments)||this}function y$(e,t){var n={};return n[t.dim+"AxisIndex"]=t.index,e.getCartesian(n)}Kw(b$,f$=Yo),b$.prototype.makeElOption=function(e,t,n,r,i){var o,a,s=n.axis,u=s.grid,c=r.get("type"),l=y$(u,s).getOtherAxis(s).getGlobalExtent(),h=s.toGlobalCoord(s.dataToCoord(t,!0)),f=(c&&"none"!==c&&(o=(a=r).get("type"),a=a.getModel(o+"Style"),"line"===o?(f=a.getLineStyle()).fill=null:"shadow"===o&&((f=a.getAreaStyle()).stroke=null),o=f,(a=w$[c](s,h,l)).style=o,e.graphicKey=a.type,e.pointer=a),g$(u.model,n));c=t,s=e,h=f,l=n,o=r,a=i,u=d$.innerTextLayout(h.rotation,0,h.labelDirection),h.labelMargin=o.get(["label","margin"]),function(e,t,n,r,i){var o,a=p$(n.get("value"),t.axis,t.ecModel,n.get("seriesDataIndices"),{precision:n.get(["label","precision"]),formatter:n.get(["label","formatter"])}),s=(n=n.getModel("label"),lD(n.get("padding")||0)),u=n.getFont(),c=qk(a,u),l=i.position,h=c.width+s[1]+s[3];c=c.height+s[0]+s[2],(r=("bottom"===(o=("right"===(o=i.align)&&(l[0]-=h),"center"===o&&(l[0]-=h/2),i.verticalAlign))&&(l[1]-=c),"middle"===o&&(l[1]-=c/2),i=l,o=h,h=c,r=(c=r).getWidth(),c=c.getHeight(),i[0]=Math.min(i[0]+o,r)-o,i[1]=Math.min(i[1]+h,c)-h,i[0]=Math.max(i[0],0),i[1]=Math.max(i[1],0),n.get("backgroundColor")))&&"auto"!==r||(r=t.get(["axisLine","lineStyle","color"])),e.label={x:l[0],y:l[1],style:dT(n,{text:a,font:u,fill:n.getTextColor(),padding:s,backgroundColor:r}),z2:10}}(s,l,o,a,{position:m$(l.axis,c,h),align:u.textAlign,verticalAlign:u.textVerticalAlign})},b$.prototype.getHandleTransform=function(e,t,n){var r=g$(t.axis.grid.model,t,{labelInside:!1});return{x:(n=(r.labelMargin=n.get(["handle","margin"]),m$(t.axis,e,r)))[0],y:n[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},b$.prototype.updateHandleTransform=function(e,t,n,r){var i=(n=n.axis).grid,o=n.getGlobalExtent(!0),a=(i=y$(i,n).getOtherAxis(n).getGlobalExtent(),n="x"===n.dim?0:1,[e.x,e.y]);return(o=[t=(a[n]+=t[n],a[n]=Math.min(o[1],a[n]),a[n]=Math.max(o[0],a[n]),(i[1]+i[0])/2),t])[n]=a[n],{x:a[0],y:a[1],rotation:e.rotation,cursorPoint:o,tooltipOption:[{verticalAlign:"middle"},{align:"center"}][n]}};var w$={line:function(e,t,n){var r;return r=[t,n[0]],t=[t,n[1]],{type:"Line",subPixelOptimize:!0,shape:{x1:r[n=(n=x$(e))||0],y1:r[1-n],x2:t[n],y2:t[1-n]}}},shadow:function(e,t,n){var r=Math.max(1,e.getBandWidth()),i=n[1]-n[0];return{type:"Rect",shape:(t=[t-r/2,n[0]],n=[r,i],r=x$(e),{x:t[r=r||0],y:t[1-r],width:n[r],height:n[1-r]})}}};function x$(e){return"x"===e.dim?0:1}var C$,k$=b$;function E$(){var e=null!==C$&&C$.apply(this,arguments)||this;return e.type=E$.type,e}Kw(E$,C$=jD),E$.type="axisPointer",E$.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}};var S$,_$=E$,O$=UE(),T$=Xw.k;function D$(e,t,n){var r,i,o;function a(e,t){i.on(e,(function(e){n=o;var n,r,a={dispatchAction:function e(t){var i=r[t.type];i?i.push(t):(t.dispatchAction=e,n.dispatchAction(t))},pendings:r={showTip:[],hideTip:[]}};T$(O$(i).records,(function(n){n&&t(n,e,a.dispatchAction)}));var s,u=a.pendings,c=o,l=u.showTip.length,h=u.hideTip.length;l?s=u.showTip[l-1]:h&&(s=u.hideTip[h-1]),s&&(s.dispatchAction=null,c.dispatchAction(s))}))}Yw.a.node||(r=t.getZr(),O$(r).records||(O$(r).records={}),o=t,O$(i=r).initialized||(O$(i).initialized=!0,a("click",Xw.h(I$,"click")),a("mousemove",Xw.h(I$,"mousemove")),a("globalout",B$)),(O$(r).records[e]||(O$(r).records[e]={})).handler=n)}function B$(e,t,n){e.handler("leave",null,n)}function I$(e,t,n,r){t.handler(e,n,r)}function M$(e,t){Yw.a.node||(t=t.getZr(),(O$(t).records||{})[e]&&(O$(t).records[e]=null))}function j$(){var e=null!==S$&&S$.apply(this,arguments)||this;return e.type=j$.type,e}Kw(j$,S$=PM),j$.prototype.render=function(e,t,n){t=t.getComponent("tooltip");var r=e.get("triggerOn")||t&&t.get("triggerOn")||"mousemove|click";D$("axisPointer",n,(function(e,t,n){"none"!==r&&("leave"===e||0<=r.indexOf(e))&&n({type:"updateAxisPointer",currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})}))},j$.prototype.remove=function(e,t){M$("axisPointer",t)},j$.prototype.dispose=function(e,t){M$("axisPointer",t)},j$.type="axisPointer";var N$=j$;function F$(e,t){var n,r,i,o,a=[],s=e.seriesIndex;return null==s||!(t=t.getSeriesByIndex(s))||null==(s=LE(n=t.getData(),e))||s<0||Xw.s(s)?{point:[]}:(r=n.getItemGraphicEl(s),i=t.coordinateSystem,t.getTooltipPosition?a=t.getTooltipPosition(s)||[]:i&&i.dataToPoint?a=e.isStacked?(t=i.getBaseAxis(),e=i.getOtherAxis(t).dim,t=t.dim,e="x"===e||"radius"===e?1:0,t=n.mapDimension(t),(o=[])[e]=n.get(t,s),o[1-e]=n.get(n.getCalculationInfo("stackResultDimension"),s),i.dataToPoint(o)||[]):i.dataToPoint(n.getValues(Xw.G(i.dimensions,(function(e){return n.mapDimension(e)})),s))||[]:r&&((t=r.getBoundingRect().clone()).applyTransform(r.transform),a=[t.x+t.width/2,t.y+t.height/2]),{point:a,el:r})}var R$,P$=UE();function L$(e,t,n){var r,i,o,a,s,u,c,l,h,f,d,p,m,g,A=e.currTrigger,v=[e.x,e.y],b=e,y=e.dispatchAction||Object(Xw.c)(n.dispatchAction,n),w=t.getComponent("axisPointer").coordSysAxesInfo;if(w)return Q$(v)&&(v=F$({seriesIndex:b.seriesIndex,dataIndex:b.dataIndex},t).point),r=Q$(v),i=b.axesInfo,o=w.axesInfo,a="leave"===A||Q$(v),s={},u={},t={list:[],map:{}},c={showPointer:Object(Xw.h)(z$,u),showTooltip:Object(Xw.h)(H$,t)},Object(Xw.k)(w.coordSysMap,(function(e,t){var n=r||e.containPoint(v);Object(Xw.k)(w.coordSysAxesInfo[t],(function(e,t){var o=e.axis,u=function(e,t){for(var n=0;n<(e||[]).length;n++){var r=e[n];if(t.axis.dim===r.axisDim&&t.axis.model.componentIndex===r.axisIndex)return r}}(i,e);a||!n||i&&!u||null!=(u=null!=(u=u&&u.value)||r?u:o.pointToData(v))&&U$(e,u,c,!1,s)}))})),l={},Object(Xw.k)(o,(function(e,t){var n=e.linkGroup;n&&!u[t]&&Object(Xw.k)(n.axesInfo,(function(t,r){r=u[r];t!==e&&r&&(r=r.value,n.mapper&&(r=e.axis.scale.parse(n.mapper(r,$$(t),$$(e)))),l[e.key]=r)}))})),Object(Xw.k)(l,(function(e,t){U$(o[t],e,c,!0,s)})),h=u,b=o,f=s.axesInfo=[],Object(Xw.k)(b,(function(e,t){var n=e.axisPointerModel.option;(t=h[t])?(e.useHandle||(n.status="show"),n.value=t.value,n.seriesDataIndices=(t.payloadBatch||[]).slice()):e.useHandle||(n.status="hide"),"show"===n.status&&f.push({axisDim:e.axis.dim,axisIndex:e.axis.model.componentIndex,value:n.value})})),A=t,b=e,t=y,Q$(e=v)||!A.list.length?t({type:"hideTip"}):(y=((A.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{},t({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:b.tooltipOption,position:b.position,dataIndexInside:y.dataIndexInside,dataIndex:y.dataIndex,seriesIndex:y.seriesIndex,dataByCoordSys:A.list})),t=o,b=(e=n).getZr(),y="axisPointerLastHighlights",d=P$(b)[y]||{},p=P$(b)[y]={},Object(Xw.k)(t,(function(e,t){var n=e.axisPointerModel.option;"show"===n.status&&e.triggerEmphasis&&Object(Xw.k)(n.seriesDataIndices,(function(e){var t=e.seriesIndex+" | "+e.dataIndex;p[t]=e}))})),m=[],g=[],Object(Xw.k)(d,(function(e,t){p[t]||g.push(e)})),Object(Xw.k)(p,(function(e,t){d[t]||m.push(e)})),g.length&&e.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:g}),m.length&&e.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:m}),s}function U$(e,t,n,r,i){var o,a,s,u,c,l,h,f,d,p,m=e.axis;!m.scale.isBlank()&&m.containData(t)&&(e.involveSeries?(o=t,s=(a=e).axis,u=s.dim,c=o,l=[],h=Number.MAX_VALUE,f=-1,Object(Xw.k)(a.seriesModels,(function(e,t){var n,r=e.getData().mapDimensionsAll(u);if(e.getAxisTooltipData)var i=(a=e.getAxisTooltipData(r,o,s)).dataIndices,a=a.nestestValue;else{if(!(i=e.getData().indicesOfNearest(r[0],o,"category"===s.type?.5:null)).length)return;a=e.getData().get(r[0],i[0])}null!=a&&isFinite(a)&&(r=o-a,(n=Math.abs(r))<=h&&((n<h||0<=r&&f<0)&&(h=n,f=r,c=a,l.length=0),Object(Xw.k)(i,(function(t){l.push({seriesIndex:e.seriesIndex,dataIndexInside:t,dataIndex:e.getData().getRawIndex(t)})}))))})),p=(a={payloadBatch:l,snapToValue:c}).snapToValue,(d=a.payloadBatch)[0]&&null==i.seriesIndex&&Object(Xw.m)(i,d[0]),!r&&e.snap&&m.containData(p)&&null!=p&&(t=p),n.showPointer(e,t,d),n.showTooltip(e,a,p)):n.showPointer(e,t))}function z$(e,t,n,r){e[t.key]={value:n,payloadBatch:r}}function H$(e,t,n,r){n=n.payloadBatch;var i,o,a=t.axis,s=a.model,u=t.axisPointerModel;t.triggerTooltip&&n.length&&(i=Jz(t=t.coordSys.model),(o=e.map[i])||(o=e.map[i]={coordSysId:t.id,coordSysIndex:t.componentIndex,coordSysType:t.type,coordSysMainType:t.mainType,dataByAxis:[]},e.list.push(o)),o.dataByAxis.push({axisDim:a.dim,axisIndex:s.componentIndex,axisType:s.type,axisId:s.id,value:r,valueLabelOpt:{precision:u.get(["label","precision"]),formatter:u.get(["label","formatter"])},seriesDataIndices:n.slice()}))}function $$(e){var t=e.axis.model,n={};e=n.axisDim=e.axis.dim;return n.axisIndex=n[e+"AxisIndex"]=t.componentIndex,n.axisName=n[e+"AxisName"]=t.name,n.axisId=n[e+"AxisId"]=t.id,n}function Q$(e){return!e||null==e[0]||isNaN(e[0])||null==e[1]||isNaN(e[1])}function V$(e){nH.registerAxisPointerClass("CartesianAxisPointer",k$),e.registerComponentModel(_$),e.registerComponentView(N$),e.registerPreprocessor((function(e){var t;e&&(e.axisPointer&&0!==e.axisPointer.length||(e.axisPointer={}),(t=e.axisPointer.link)&&!Object(Xw.s)(t)&&(e.axisPointer.link=[t]))})),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,(function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=function(e,t){var n,r,i,o,a,s,u,c={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return n=c,t=t,i=(r=e).getComponent("tooltip"),o=r.getComponent("axisPointer"),a=o.get("link",!0)||[],s=[],Object(Xw.k)(t.getCoordinateSystems(),(function(e){var t,u,c,l,h;function f(i,c,l){var h,f,d=l.model.getModel("axisPointer",o),p=d.get("show");p&&("auto"!==p||i||Xz(d))&&(null==c&&(c=d.get("triggerTooltip")),p=(d=i?function(e,t,n,r,i,o){var a=t.getModel("axisPointer"),s={};return Object(Xw.k)(["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],(function(e){s[e]=Object(Xw.d)(a.get(e))})),s.snap="category"!==e.type&&!!o,"cross"===a.get("type")&&(s.type="line"),null==(t=s.label||(s.label={})).show&&(t.show=!1),"cross"===i&&(i=a.get(["label","show"]),t.show=null==i||i,o||(i=s.lineStyle=a.get("crossStyle"))&&Object(Xw.i)(t,i.textStyle)),e.model.getModel("axisPointer",new DT(s,n,r))}(l,u,o,r,i,c):d).get("snap"),i=d.get("triggerEmphasis"),h=Jz(l.model),f=c||p||"category"===l.type,c=n.axesInfo[h]={key:h,axis:l,coordSys:e,axisPointerModel:d,triggerTooltip:c,triggerEmphasis:i,involveSeries:f,snap:p,useHandle:Xz(d),seriesModels:[],linkGroup:null},t[h]=c,n.seriesInvolved=n.seriesInvolved||f,null!=(i=function(e,t){for(var n=t.model,r=t.dim,i=0;i<e.length;i++){var o=e[i]||{};if(Kz(o[r+"AxisId"],n.id)||Kz(o[r+"AxisIndex"],n.componentIndex)||Kz(o[r+"AxisName"],n.name))return i}}(a,l))&&((p=s[i]||(s[i]={axesInfo:{}})).axesInfo[h]=c,p.mapper=a[i].mapper,c.linkGroup=p))}e.axisPointerEnabled&&(c=Jz(e.model),t=n.coordSysAxesInfo[c]={},u=(n.coordSysMap[c]=e).model.getModel("tooltip",i),Object(Xw.k)(e.getAxes(),Object(Xw.h)(f,!1,null)),e.getTooltipAxes&&i&&u.get("show")&&(c="axis"===u.get("trigger"),l="cross"===u.get(["axisPointer","type"]),h=e.getTooltipAxes(u.get(["axisPointer","axis"])),(c||l)&&Object(Xw.k)(h.baseAxes,Object(Xw.h)(f,!l||"cross",c)),l&&Object(Xw.k)(h.otherAxes,Object(Xw.h)(f,"cross",!1))))})),c.seriesInvolved&&(u=c,e.eachSeries((function(e){var t=e.coordinateSystem,n=e.get(["tooltip","trigger"],!0),r=e.get(["tooltip","show"],!0);t&&"none"!==n&&!1!==n&&"item"!==n&&!1!==r&&!1!==e.get(["axisPointer","show"],!0)&&Object(Xw.k)(u.coordSysAxesInfo[Jz(t.model)],(function(n){var r=n.axis;t.getAxis(r.dim)===r&&(n.seriesModels.push(e),null==n.seriesDataCount&&(n.seriesDataCount=0),n.seriesDataCount+=e.getData().count())}))}))),c}(e,t)})),e.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},L$)}function q$(){var e=null!==R$&&R$.apply(this,arguments)||this;return e.type=q$.type,e}Kw(q$,R$=jD),q$.type="tooltip",q$.dependencies=["axisPointer"],q$.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}};var G$=q$;function W$(e){var t=e.get("confine");return null!=t?t:"richText"===e.get("renderMode")}function K$(e){if(Yw.a.domSupported)for(var t=document.documentElement.style,n=0,r=e.length;n<r;n++)if(e[n]in t)return e[n]}var Y$=K$(["transform","webkitTransform","OTransform","MozTransform","msTransform"]);function X$(e,t){if(!e)return t;t=cD(t,!0);var n=e.indexOf(t);return(e=-1===n?t:"-"+e.slice(0,n)+"-"+t).toLowerCase()}var J$=X$(K$(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),"transition"),Z$=X$(Y$,"transform"),eQ="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(Yw.a.transform3dSupported?"will-change:transform;":"");function tQ(e,t,n){var r;e=e.toFixed(0)+"px",t=t.toFixed(0)+"px";return Yw.a.transformSupported?(r="translate"+((r=Yw.a.transform3dSupported)?"3d":"")+"("+e+","+t+(r?",0":"")+")",n?"top:0;left:0;"+Z$+":"+r+";":[["top",0],["left",0],[Y$,r]]):n?"top:"+t+";left:"+e+";":[["top",t],["left",e]]}function nQ(e,t,n,r,i){var o,a,s=t&&t.painter;n?(n=s&&s.getViewportRoot())&&(o=e,a=document.body,yx(bx,n,r,i,!0)&&yx(o,a,bx[0],bx[1])):(e[0]=r,e[1]=i,(n=s&&s.getViewportRootOffset())&&(e[0]+=n.offsetLeft,e[1]+=n.offsetTop)),e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}function rQ(e,t,n){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,Yw.a.wxa)return null;var r=document.createElement("div"),i=(r.domBelongToZr=!0,this.el=r,this._zr=t.getZr()),o=(n=this._appendToBody=n&&n.appendToBody,nQ(this._styleCoord,i,n,t.getWidth()/2,t.getHeight()/2),(n?document.body:e).appendChild(r),this._container=e,this);r.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},r.onmousemove=function(e){var t;e=e||window.event,o._enterable||(t=i.handler,Bx(i.painter.getViewportRoot(),e,!0),t.dispatch("mousemove",e))},r.onmouseleave=function(){o._inContent=!1,o._enterable&&o._show&&o.hideLater(o._hideDelay)}}rQ.prototype.update=function(e){var t,n=(n="position",(r=(r=t=this._container).currentStyle||document.defaultView&&document.defaultView.getComputedStyle(r))?n?r[n]:r:null),r=t.style;(t=("absolute"!==r.position&&"absolute"!==n&&(r.position="relative"),e.get("alwaysShowContent")))&&this._moveIfResized(),this._alwaysShowContent=t,this.el.className=e.get("className")||""},rQ.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,r=n.style,i=this._styleCoord;n.innerHTML?r.cssText=eQ+function(e,t,n){var r,i,o=[],a=e.get("transitionDuration"),s=e.get("backgroundColor"),u=e.get("shadowBlur"),c=e.get("shadowColor"),l=e.get("shadowOffsetX"),h=e.get("shadowOffsetY"),f=e.getModel("textStyle"),d=wM(e,"html");return o.push("box-shadow:"+l+"px "+h+"px "+u+"px "+c),t&&a&&o.push((c="opacity"+(u=" "+(l=a)/2+"s "+(h="cubic-bezier(0.23,1,0.32,1)"))+",visibility"+u,n||(u=" "+l+"s "+h,c+=Yw.a.transformSupported?","+Z$+u:",left"+u+",top"+u),J$+":"+c)),s&&o.push("background-color:"+s),Object(Xw.k)(["width","color","radius"],(function(t){var n="border-"+t,r=cD(n);null!=(r=e.get(r))&&o.push(n+":"+r+("color"===t?"":"px"))})),o.push((i=[],t=(r=f).get("fontSize"),(a=r.getTextColor())&&i.push("color:"+a),i.push("font:"+r.getFont()),t&&i.push("line-height:"+Math.round(3*t/2)+"px"),a=r.get("textShadowColor"),t=r.get("textShadowBlur")||0,n=r.get("textShadowOffsetX")||0,l=r.get("textShadowOffsetY")||0,a&&t&&i.push("text-shadow:"+n+"px "+l+"px "+t+"px "+a),Object(Xw.k)(["decoration","align"],(function(e){var t=r.get(e);t&&i.push("text-"+e+":"+t)})),i.join(";"))),null!=d&&o.push("padding:"+lD(d).join("px ")+"px"),o.join(";")+";"}(e,!this._firstShow,this._longHide)+tQ(i[0],i[1],!0)+"border-color:"+mD(t)+";"+(e.get("extraCssText")||"")+";pointer-events:"+(this._enterable?"auto":"none"):r.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},rQ.prototype.setContent=function(e,t,n,r,i){var o=this.el;if(null==e)o.innerHTML="";else{var a,s,u,c,l,h="";if(Object(Xw.B)(i)&&"item"===n.get("trigger")&&!W$(n)&&(n=n,r=r,i=i,h=Object(Xw.B)(i)&&"inside"!==i?(a=n.get("backgroundColor"),n=n.get("borderWidth"),r=mD(r),i=i="left"===(i=i)?"right":"right"===i?"left":"top"===i?"bottom":"top",f=Math.max(1.5*Math.round(n),6),s="",u=Z$+":",-1<Object(Xw.q)(["left","right"],i)?(s+="top:50%",u+="translateY(-50%) rotate("+(l="left"==i?-225:-45)+"deg)"):(s+="left:50%",u+="translateX(-50%) rotate("+(l="top"==i?225:45)+"deg)"),l=l*Math.PI/180,l=(c=f+n)*Math.abs(Math.cos(l))+c*Math.abs(Math.sin(l)),r=r+" solid "+n+"px;",'<div style="'+["position:absolute;width:"+f+"px;height:"+f+"px;z-index:-1;",(s+=";"+i+":-"+Math.round(100*((l-Math.SQRT2*n)/2+Math.SQRT2*n-(l-c)/2))/100+"px")+";"+u+";","border-bottom:"+r,"border-right:"+r,"background-color:"+a+";"].join("")+'"></div>'):""),Object(Xw.B)(e))o.innerHTML=e+h;else if(e){o.innerHTML="",Object(Xw.s)(e)||(e=[e]);for(var f,d=0;d<e.length;d++)Object(Xw.u)(e[d])&&e[d].parentNode!==o&&o.appendChild(e[d]);h&&o.childNodes.length&&((f=document.createElement("div")).innerHTML=h,o.appendChild(f))}}},rQ.prototype.setEnterable=function(e){this._enterable=e},rQ.prototype.getSize=function(){var e=this.el;return[e.offsetWidth,e.offsetHeight]},rQ.prototype.moveTo=function(e,t){var n,r=this._styleCoord;nQ(r,this._zr,this._appendToBody,e,t),null!=r[0]&&null!=r[1]&&(n=this.el.style,e=tQ(r[0],r[1]),Object(Xw.k)(e,(function(e){n[e[0]]=e[1]})))},rQ.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},rQ.prototype.hide=function(){var e=this,t=this.el.style;t.visibility="hidden",t.opacity="0",Yw.a.transform3dSupported&&(t.willChange=""),this._show=!1,this._longHideTimeout=setTimeout((function(){return e._longHide=!0}),500)},rQ.prototype.hideLater=function(e){!this._show||this._inContent&&this._enterable||this._alwaysShowContent||(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(Object(Xw.c)(this.hide,this),e)):this.hide())},rQ.prototype.isShow=function(){return this._show},rQ.prototype.dispose=function(){this.el.parentNode.removeChild(this.el)};var iQ=rQ;function oQ(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),uQ(this._styleCoord,this._zr,e.getWidth()/2,e.getHeight()/2)}function aQ(e){return Math.max(0,e)}function sQ(e){var t=aQ(e.shadowBlur||0),n=aQ(e.shadowOffsetX||0);e=aQ(e.shadowOffsetY||0);return{left:aQ(t-n),right:aQ(t+n),top:aQ(t-e),bottom:aQ(t+e)}}function uQ(e,t,n,r){e[0]=n,e[1]=r,e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}oQ.prototype.update=function(e){(e=e.get("alwaysShowContent"))&&this._moveIfResized(),this._alwaysShowContent=e},oQ.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},oQ.prototype.setContent=function(e,t,n,r,i){var o=this,a=(Xw.z(e)&&sB(""),this.el&&this._zr.remove(this.el),n.getModel("textStyle")),s=(this.el=new nO({style:{rich:t.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:r,textShadowColor:a.get("textShadowColor"),fill:n.get(["textStyle","color"]),padding:wM(n,"richText"),verticalAlign:"top",align:"left"},z:n.get("z")}),Xw.k(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],(function(e){o.el.style[e]=n.get(e)})),Xw.k(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],(function(e){o.el.style[e]=a.get(e)||0})),this._zr.add(this.el),this);this.el.on("mouseover",(function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0})),this.el.on("mouseout",(function(){s._enterable&&s._show&&s.hideLater(s._hideDelay),s._inContent=!1}))},oQ.prototype.setEnterable=function(e){this._enterable=e},oQ.prototype.getSize=function(){var e=this.el,t=this.el.getBoundingRect();e=sQ(e.style);return[t.width+e.left+e.right,t.height+e.top+e.bottom]},oQ.prototype.moveTo=function(e,t){var n,r,i=this.el;i&&(uQ(r=this._styleCoord,this._zr,e,t),e=r[0],t=r[1],n=aQ((r=i.style).borderWidth||0),r=sQ(r),i.x=e+n+r.left,i.y=t+n+r.top,i.markRedraw())},oQ.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},oQ.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},oQ.prototype.hideLater=function(e){!this._show||this._inContent&&this._enterable||this._alwaysShowContent||(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(Xw.c(this.hide,this),e)):this.hide())},oQ.prototype.isShow=function(){return this._show},oQ.prototype.dispose=function(){this._zr.remove(this.el)};var cQ,lQ=oQ,hQ=new z_({shape:{x:-1,y:-1,width:2,height:2}});function fQ(){var e=null!==cQ&&cQ.apply(this,arguments)||this;return e.type=fQ.type,e}function dQ(e,t,n){for(var r=t.ecModel,i=n?(i=new DT(n,r,r),new DT(t.option,i,r)):t,o=e.length-1;0<=o;o--){var a=e[o];a&&(a instanceof DT&&(a=a.get("tooltip",!0)),(a=Object(Xw.B)(a)?{formatter:a}:a)&&(i=new DT(a,i,r)))}return i}function pQ(e,t){return e.dispatchAction||Object(Xw.c)(t.dispatchAction,t)}function mQ(e){return"center"===e||"middle"===e}Kw(fQ,cQ=PM),fQ.prototype.init=function(e,t){var n;!Yw.a.node&&t.getDom()&&(e=e.getComponent("tooltip"),n=this._renderMode="auto"===(n=e.get("renderMode"))?Yw.a.domSupported?"html":"richText":n||"html",this._tooltipContent="richText"===n?new lQ(t):new iQ(t.getDom(),t,{appendToBody:e.get("appendToBody",!0)}))},fQ.prototype.render=function(e,t,n){!Yw.a.node&&n.getDom()&&(this.group.removeAll(),this._tooltipModel=e,this._ecModel=t,this._api=n,(t=this._tooltipContent).update(e),t.setEnterable(e.get("enterable")),this._initGlobalListener(),this._keepShow(),"richText"!==this._renderMode&&e.get("transitionDuration")?fF(this,"_updatePosition",50,"fixRate"):dF(this,"_updatePosition"))},fQ.prototype._initGlobalListener=function(){var e=this._tooltipModel.get("triggerOn");D$("itemTooltip",this._api,Object(Xw.c)((function(t,n,r){"none"!==e&&(0<=e.indexOf(t)?this._tryShow(n,r):"leave"===t&&this._hide(r))}),this))},fQ.prototype._keepShow=function(){var e,t=this._tooltipModel,n=this._ecModel,r=this._api,i=t.get("triggerOn");null!=this._lastX&&null!=this._lastY&&"none"!==i&&"click"!==i&&(e=this,clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout((function(){r.isDisposed()||e.manuallyShowTip(t,n,r,{x:e._lastX,y:e._lastY,dataByCoordSys:e._lastDataByCoordSys})})))},fQ.prototype.manuallyShowTip=function(e,t,n,r){var i,o,a,s;r.from!==this.uid&&!Yw.a.node&&n.getDom()&&(i=pQ(r,n),this._ticket="",s=r.dataByCoordSys,(o=function(e,t,n){var r,i=$E(e).queryOptionMap,o=i.keys()[0];if(o&&"series"!==o&&((t=VE(t,o,i.get(o),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0])&&(n.getViewOfComponentModel(t).group.traverse((function(t){var n=rO(t).tooltipConfig;if(n&&n.name===e.name)return r=t,!0})),r)))return{componentMainType:o,componentIndex:t.componentIndex,el:r}}(r,t,n))?((a=o.el.getBoundingRect().clone()).applyTransform(o.el.transform),this._tryShow({offsetX:a.x+a.width/2,offsetY:a.y+a.height/2,target:o.el,position:r.position,positionDefault:"bottom"},i)):r.tooltip&&null!=r.x&&null!=r.y?((a=hQ).x=r.x,a.y=r.y,a.update(),rO(a).tooltipConfig={name:null,option:r.tooltip},this._tryShow({offsetX:r.x,offsetY:r.y,target:a},i)):s?this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,dataByCoordSys:s,tooltipOption:r.tooltipOption},i):null!=r.seriesIndex?this._manuallyAxisShowTip(e,t,n,r)||(a=(o=F$(r,t)).point[0],s=o.point[1],null!=a&&null!=s&&this._tryShow({offsetX:a,offsetY:s,target:o.el,position:r.position,positionDefault:"bottom"},i)):null!=r.x&&null!=r.y&&(n.dispatchAction({type:"updateAxisPointer",x:r.x,y:r.y}),this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,target:n.getZr().findHover(r.x,r.y).target},i)))},fQ.prototype.manuallyHideTip=function(e,t,n,r){var i=this._tooltipContent;this._tooltipModel&&i.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,r.from!==this.uid&&this._hide(pQ(r,n))},fQ.prototype._manuallyAxisShowTip=function(e,t,n,r){var i=r.seriesIndex,o=r.dataIndex,a=t.getComponent("axisPointer").coordSysAxesInfo;if(null!=i&&null!=o&&null!=a&&(a=t.getSeriesByIndex(i))&&"axis"===(t=dQ([a.getData().getItemModel(o),a,(a.coordinateSystem||{}).model],this._tooltipModel)).get("trigger"))return n.dispatchAction({type:"updateAxisPointer",seriesIndex:i,dataIndex:o,position:r.position}),!0},fQ.prototype._tryShow=function(e,t){var n,r,i,o=e.target;this._tooltipModel&&(this._lastX=e.offsetX,this._lastY=e.offsetY,(n=e.dataByCoordSys)&&n.length?this._showAxisTooltip(n,e):o?($F(o,(function(e){return null!=rO(e).dataIndex?(r=e,1):null!=rO(e).tooltipConfig&&(i=e,1)}),!(this._lastDataByCoordSys=null)),r?this._showSeriesItemTooltip(e,r,t):i?this._showComponentItemTooltip(e,i,t):this._hide(t)):(this._lastDataByCoordSys=null,this._hide(t)))},fQ.prototype._showOrMove=function(e,t){e=e.get("showDelay"),t=Object(Xw.c)(t,this),clearTimeout(this._showTimout),0<e?this._showTimout=setTimeout(t,e):t()},fQ.prototype._showAxisTooltip=function(e,t){var n=this._ecModel,r=this._tooltipModel,i=[t.offsetX,t.offsetY],o=dQ([t.tooltipOption],r),a=this._renderMode,s=[],u=dM("section",{blocks:[],noHeader:!0}),c=[],l=new xM,h=(Object(Xw.k)(e,(function(e){Object(Xw.k)(e.dataByAxis,(function(e){var t,i,o=n.getComponent(e.axisDim+"Axis",e.axisIndex),h=e.value;o&&null!=h&&(t=p$(h,o.axis,n,e.seriesDataIndices,e.valueLabelOpt),i=dM("section",{header:t,noHeader:!Object(Xw.R)(t),sortBlocks:!0,blocks:[]}),u.blocks.push(i),Object(Xw.k)(e.seriesDataIndices,(function(u){var f,d=n.getSeriesByIndex(u.seriesIndex),p=(u=u.dataIndexInside,d.getDataParams(u));p.dataIndex<0||(p.axisDim=e.axisDim,p.axisIndex=e.axisIndex,p.axisType=e.axisType,p.axisId=e.axisId,p.axisValue=t$(o.axis,{value:h}),p.axisValueLabel=t,p.marker=l.makeTooltipMarker("item",mD(p.color),a),(f=(u=AI(d.formatTooltip(u,!0,null))).frag)&&(d=dQ([d],r).get("valueFormatter"),i.blocks.push(d?Object(Xw.m)({valueFormatter:d},f):f)),u.text&&c.push(u.text),s.push(p))})))}))})),u.blocks.reverse(),c.reverse(),t.position),f=(t=o.get("order"),t=((t=vM(u,l,a,t,n.get("useUTC"),o.get("textStyle")))&&c.unshift(t),"richText"===a?"\n\n":"<br/>"),c.join(t));this._showOrMove(o,(function(){this._updateContentNotChangedOnAxis(e,s)?this._updatePosition(o,h,i[0],i[1],this._tooltipContent,s):this._showTooltipContent(o,f,s,Math.random()+"",i[0],i[1],h,null,l)}))},fQ.prototype._showSeriesItemTooltip=function(e,t,n){var r,i,o,a,s,u=this._ecModel,c=(t=rO(t)).seriesIndex,l=u.getSeriesByIndex(c),h=t.dataModel||l,f=t.dataIndex,d=(t=t.dataType,h.getData(t)),p=this._renderMode,m=e.positionDefault,g=dQ([d.getItemModel(f),h,l&&(l.coordinateSystem||{}).model],this._tooltipModel,m?{position:m}:null);null!=(l=g.get("trigger"))&&"item"!==l||(r=h.getDataParams(f,t),i=new xM,r.marker=i.makeTooltipMarker("item",mD(r.color),p),m=AI(h.formatTooltip(f,!1,t)),l=g.get("order"),t=g.get("valueFormatter"),o=m.frag,a=o?vM(t?Object(Xw.m)({valueFormatter:t},o):o,i,p,l,u.get("useUTC"),g.get("textStyle")):m.text,s="item_"+h.name+"_"+f,this._showOrMove(g,(function(){this._showTooltipContent(g,a,r,s,e.offsetX,e.offsetY,e.position,e.target,i)})),n({type:"showTip",dataIndexInside:f,dataIndex:d.getRawIndex(f),seriesIndex:c,from:this.uid}))},fQ.prototype._showComponentItemTooltip=function(e,t,n){var r=(o=rO(t)).tooltipConfig.option||{},i=[r=Object(Xw.B)(r)?{content:r,formatter:r}:r],o=((o=this._ecModel.getComponent(o.componentMainType,o.componentIndex))&&i.push(o),i.push({formatter:r.content}),e.positionDefault),a=dQ(i,this._tooltipModel,o?{position:o}:null),s=a.get("content"),u=Math.random()+"",c=new xM;this._showOrMove(a,(function(){var n=Object(Xw.d)(a.get("formatterParams")||{});this._showTooltipContent(a,s,n,u,e.offsetX,e.offsetY,e.position,t,c)})),n({type:"showTip",from:this.uid})},fQ.prototype._showTooltipContent=function(e,t,n,r,i,o,a,s,u){var c,l,h,f,d;this._ticket="",e.get("showContent")&&e.get("show")&&((c=this._tooltipContent).setEnterable(e.get("enterable")),l=e.get("formatter"),a=a||e.get("position"),t=t,h=this._getNearestPoint([i,o],n,e.get("trigger"),e.get("borderColor")).color,l&&(t=Object(Xw.B)(l)?(f=e.ecModel.get("useUTC"),t=l,pD(t=(d=Object(Xw.s)(n)?n[0]:n)&&d.axisType&&0<=d.axisType.indexOf("time")?qT(d.axisValue,t,f):t,n,!0)):Object(Xw.v)(l)?(d=Object(Xw.c)((function(t,r){t===this._ticket&&(c.setContent(r,u,e,h,a),this._updatePosition(e,a,i,o,c,n,s))}),this),this._ticket=r,l(n,r,d)):l),c.setContent(t,u,e,h,a),c.show(e,h),this._updatePosition(e,a,i,o,c,n,s))},fQ.prototype._getNearestPoint=function(e,t,n,r){return"axis"===n||Object(Xw.s)(t)?{color:r||("html"===this._renderMode?"#fff":"none")}:Object(Xw.s)(t)?void 0:{color:r||t.color||t.borderColor}},fQ.prototype._updatePosition=function(e,t,n,r,i,o,a){var s,u=this._api.getWidth(),c=this._api.getHeight(),l=(t=t||e.get("position"),i.getSize()),h=e.get("align"),f=e.get("verticalAlign"),d=a&&a.getBoundingRect().clone();a&&d.applyTransform(a.transform),Object(Xw.v)(t)&&(t=t([n,r],o,i.el,d,{viewSize:[u,c],contentSize:l.slice()})),Object(Xw.s)(t)?(n=gE(t[0],u),r=gE(t[1],c)):Object(Xw.z)(t)?((o=t).width=l[0],o.height=l[1],n=(o=xD(o,{width:u,height:c})).x,r=o.y,f=h=null):(n=(s=Object(Xw.B)(t)&&a?function(e,t,n,r){var i=n[0],o=n[1],a=Math.ceil(Math.SQRT2*r)+8,s=0,u=0,c=t.width,l=t.height;switch(e){case"inside":s=t.x+c/2-i/2,u=t.y+l/2-o/2;break;case"top":s=t.x+c/2-i/2,u=t.y-o-a;break;case"bottom":s=t.x+c/2-i/2,u=t.y+l+a;break;case"left":s=t.x-i-a,u=t.y+l/2-o/2;break;case"right":s=t.x+c+a,u=t.y+l/2-o/2}return[s,u]}(t,d,l,e.get("borderWidth")):function(e,t,n,r,i,o,a){var s=(n=n.getSize())[0];n=n[1];return null!=o&&(r<e+s+o+2?e-=s+o:e+=o),null!=a&&(i<t+n+a?t-=n+a:t+=a),[e,t]}(n,r,i,u,c,h?null:20,f?null:20))[0],r=s[1]),h&&(n-=mQ(h)?l[0]/2:"right"===h?l[0]:0),f&&(r-=mQ(f)?l[1]/2:"bottom"===f?l[1]:0),W$(e)&&(o=n,a=r,t=u,d=c,f=(h=(h=i).getSize())[0],h=h[1],o=Math.min(o+f,t)-f,a=Math.min(a+h,d)-h,n=(s=[o=Math.max(o,0),a=Math.max(a,0)])[0],r=s[1]),i.moveTo(n,r)},fQ.prototype._updateContentNotChangedOnAxis=function(e,t){var n=this._lastDataByCoordSys,r=this._cbParamsList,i=!!n&&n.length===e.length;return i&&Object(Xw.k)(n,(function(n,o){n=n.dataByAxis||[];var a=(e[o]||{}).dataByAxis||[];(i=i&&n.length===a.length)&&Object(Xw.k)(n,(function(e,n){n=a[n]||{};var o=e.seriesDataIndices||[],s=n.seriesDataIndices||[];(i=i&&e.value===n.value&&e.axisType===n.axisType&&e.axisId===n.axisId&&o.length===s.length)&&Object(Xw.k)(o,(function(e,t){t=s[t],i=i&&e.seriesIndex===t.seriesIndex&&e.dataIndex===t.dataIndex})),r&&Object(Xw.k)(e.seriesDataIndices,(function(e){e=e.seriesIndex;var n=t[e];e=r[e];n&&e&&e.data!==n.data&&(i=!1)}))}))})),this._lastDataByCoordSys=e,this._cbParamsList=t,!!i},fQ.prototype._hide=function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},fQ.prototype.dispose=function(e,t){!Yw.a.node&&t.getDom()&&(dF(this,"_updatePosition"),this._tooltipContent.dispose(),M$("itemTooltip",t))},fQ.type="tooltip";var gQ,AQ=fQ;function vQ(){return null!==gQ&&gQ.apply(this,arguments)||this}Kw(vQ,gQ=jD),vQ.type="grid",vQ.dependencies=["xAxis","yAxis"],vQ.layoutMode="box",vQ.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"};var bQ=vQ;yQ.prototype.getNeedCrossZero=function(){return!this.option.scale},yQ.prototype.getCoordSysModel=function(){},aa=yQ;function yQ(){}Kw(CQ,wQ=jD),CQ.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",QE).models[0]},CQ.type="cartesian2dAxis";var wQ,xQ=CQ;function CQ(){return null!==wQ&&wQ.apply(this,arguments)||this}Xw.I(xQ,aa);Ua={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}};var kQ={category:Ea=Xw.H({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},Ua),value:Wa=Xw.H({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},Ua),time:Xw.H({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},Wa),log:Xw.i({logBase:10},Wa)},EQ={value:1,category:1,time:1,log:1};function SQ(e,t,n,r){Object(Xw.k)(EQ,(function(i,o){var a,s=Object(Xw.H)(Object(Xw.H)({},kQ[o],!0),r,!0);Kw(u,a=n),u.prototype.mergeDefaultAndTheme=function(e,t){var n=CD(this),r=n?ED(e):{};t=t.getTheme();Object(Xw.H)(e,t.get(o+"Axis")),Object(Xw.H)(e,this.getDefaultOption()),e.type=_Q(e),n&&kD(e,r,n)},u.prototype.optionUpdated=function(){"category"===this.option.type&&(this.__ordinalMeta=gH.createByAxisModel(this))},u.prototype.getCategories=function(e){var t=this.option;if("category"===t.type)return e?t.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.type=t+"Axis."+o,u.defaultOption=s,s=u;function u(){var e=null!==a&&a.apply(this,arguments)||this;return e.type=t+"Axis."+o,e}e.registerComponentModel(s)})),e.registerSubTypeDefaulter(t+"Axis",_Q)}function _Q(e){return e.type||(e.data?"category":"value")}function OQ(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}OQ.prototype.getAxis=function(e){return this._axes[e]},OQ.prototype.getAxes=function(){return Xw.G(this._dimList,(function(e){return this._axes[e]}),this)},OQ.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),Xw.n(this.getAxes(),(function(t){return t.scale.type===e}))},OQ.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)};var TQ,DQ=["x","y"];function BQ(e){return"interval"===e.type||"time"===e.type}function IQ(){var e=null!==TQ&&TQ.apply(this,arguments)||this;return e.type="cartesian2d",e.dimensions=DQ,e}Kw(IQ,TQ=OQ),IQ.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e,t,n,r,i=this.getAxis("x").scale,o=this.getAxis("y").scale;BQ(i)&&BQ(o)&&(i=i.getExtent(),o=o.getExtent(),r=this.dataToPoint([i[0],o[0]]),t=this.dataToPoint([i[1],o[1]]),e=i[1]-i[0],n=o[1]-o[0],e&&n&&(e=(t[0]-r[0])/e,t=(t[1]-r[1])/n,n=r[0]-i[0]*e,i=r[1]-o[0]*t,r=this._transform=[e,0,0,t,n,i],this._invTransform=zx([],r)))},IQ.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},IQ.prototype.containPoint=function(e){var t=this.getAxis("x"),n=this.getAxis("y");return t.contain(t.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},IQ.prototype.containData=function(e){return this.getAxis("x").containData(e[0])&&this.getAxis("y").containData(e[1])},IQ.prototype.containZone=function(e,t){e=this.dataToPoint(e),t=this.dataToPoint(t);var n=this.getArea();t=new Zx(e[0],e[1],t[0]-e[0],t[1]-e[1]);return n.intersect(t)},IQ.prototype.dataToPoint=function(e,t,n){n=n||[];var r,i=e[0],o=e[1];return this._transform&&null!=i&&isFinite(i)&&null!=o&&isFinite(o)?sx(n,e,this._transform):(e=this.getAxis("x"),r=this.getAxis("y"),n[0]=e.toGlobalCoord(e.dataToCoord(i,t)),n[1]=r.toGlobalCoord(r.dataToCoord(o,t)),n)},IQ.prototype.clampData=function(e,t){var n=this.getAxis("x").scale,r=this.getAxis("y").scale,i=n.getExtent(),o=r.getExtent();n=n.parse(e[0]),r=r.parse(e[1]);return(t=t||[])[0]=Math.min(Math.max(Math.min(i[0],i[1]),n),Math.max(i[0],i[1])),t[1]=Math.min(Math.max(Math.min(o[0],o[1]),r),Math.max(o[0],o[1])),t},IQ.prototype.pointToData=function(e,t){var n,r,i=[];return this._invTransform?sx(i,e,this._invTransform):(n=this.getAxis("x"),r=this.getAxis("y"),i[0]=n.coordToData(n.toLocalCoord(e[0]),t),i[1]=r.coordToData(r.toLocalCoord(e[1]),t),i)},IQ.prototype.getOtherAxis=function(e){return this.getAxis("x"===e.dim?"y":"x")},IQ.prototype.getArea=function(){var e=this.getAxis("x").getGlobalExtent(),t=this.getAxis("y").getGlobalExtent(),n=Math.min(e[0],e[1]),r=Math.min(t[0],t[1]);e=Math.max(e[0],e[1])-n,t=Math.max(t[0],t[1])-r;return new Zx(n,r,e,t)};var MQ=IQ,jQ=UE();function NQ(e,t){var n,r=FQ(e,"labels"),i=RQ(r,t=n$(t));return i||PQ(r,t,{labels:Xw.v(t)?UQ(e,t):LQ(e,n="auto"===t?null!=(r=jQ(i=e).autoInterval)?r:jQ(i).autoInterval=i.calculateCategoryInterval():t),labelCategoryInterval:n})}function FQ(e,t){return jQ(e)[t]||(jQ(e)[t]=[])}function RQ(e,t){for(var n=0;n<e.length;n++)if(e[n].key===t)return e[n].value}function PQ(e,t,n){return e.push({key:t,value:n}),n}function LQ(e,t,n){for(var r=e$(e),i=e.scale,o=i.getExtent(),a=e.getLabelModel(),s=[],u=Math.max((t||0)+1,1),c=(t=o[0],i.count()),l=(c=(0!==t&&1<u&&2<c/u&&(t=Math.round(Math.ceil(t/u)*u)),r$(e)),e=a.get("showMinLabel")||c,a=a.get("showMaxLabel")||c,e&&t!==o[0]&&h(o[0]),t);l<=o[1];l+=u)h(l);function h(e){var t={value:e};s.push(n?e:{formattedLabel:r(t),rawLabel:i.getLabel(t),tickValue:e})}return a&&l-u!==o[1]&&h(o[1]),s}function UQ(e,t,n){var r=e.scale,i=e$(e),o=[];return Xw.k(r.getTicks(),(function(e){var a=r.getLabel(e),s=e.value;t(e.value,a)&&o.push(n?s:{formattedLabel:i(e),rawLabel:a,tickValue:s})})),o}var zQ,HQ=[0,1];function $Q(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}function QQ(e,t){t=(e[1]-e[0])/t/2,e[0]+=t,e[1]-=t}function VQ(e,t,n,r,i){return(e=zQ.call(this,e,t,n)||this).index=0,e.type=r||"value",e.position=i||"bottom",e}$Q.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]);t=Math.max(t[0],t[1]);return n<=e&&e<=t},$Q.prototype.containData=function(e){return this.scale.contain(e)},$Q.prototype.getExtent=function(){return this._extent.slice()},$Q.prototype.getPixelPrecision=function(e){return e=e||this.scale.getExtent(),t=this._extent,n=Math.log,r=Math.LN10,e=Math.floor(n(e[1]-e[0])/r),n=Math.round(n(Math.abs(t[1]-t[0]))/r),t=Math.min(Math.max(-e+n,0),20),isFinite(t)?t:20;var t,n,r},$Q.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},$Q.prototype.dataToCoord=function(e,t){var n=this._extent,r=this.scale;return e=r.normalize(e),this.onBand&&"ordinal"===r.type&&QQ(n=n.slice(),r.count()),mE(e,HQ,n,t)},$Q.prototype.coordToData=function(e,t){var n=this._extent,r=this.scale;this.onBand&&"ordinal"===r.type&&QQ(n=n.slice(),r.count()),r=mE(e,n,HQ,t);return this.scale.scale(r)},$Q.prototype.pointToData=function(e,t){},$Q.prototype.getTicksCoords=function(e){var t,n,r,i,o,a,s,u,c=function(e,t){var n,r,i,o,a;return"category"===e.type?(t=t,(a=RQ(i=FQ(n=e,"ticks"),o=n$(t)))||(t.get("show")&&!n.scale.isBlank()||[],PQ(i,o,{ticks:Xw.v(o)?UQ(n,o,!0):"auto"===o?(r=(a=NQ(n,n.getLabelModel())).labelCategoryInterval,Xw.G(a.labels,(function(e){return e.tickValue}))):LQ(n,r=o,!0),tickCategoryInterval:r}))):{ticks:Xw.G(e.scale.getTicks(),(function(e){return e.value}))}}(this,u=(e=e||{}).tickModel||this.getTickModel()).ticks;function l(e,t){return e=AE(e),t=AE(t),a?t<e:e<t}return t=this,n=c=Object(Xw.G)(c,(function(e){return{coord:this.dataToCoord("ordinal"===this.scale.type?this.scale.getRawOrdinalNumber(e):e),tickValue:e}}),this),u=u=u.get("alignWithLabel"),e=e.clamp,s=n.length,t.onBand&&!u&&s&&(u=t.getExtent(),1===s?(n[0].coord=u[0],r=n[1]={coord:u[1]}):(o=n[s-1].tickValue-n[0].tickValue,i=(n[s-1].coord-n[0].coord)/o,Object(Xw.k)(n,(function(e){e.coord-=i/2})),t=1+(o=t.scale.getExtent())[1]-n[s-1].tickValue,r={coord:n[s-1].coord+i*t},n.push(r)),a=u[0]>u[1],l(n[0].coord,u[0])&&(e?n[0].coord=u[0]:n.shift()),e&&l(u[0],n[0].coord)&&n.unshift({coord:u[0]}),l(u[1],r.coord)&&(e?r.coord=u[1]:n.pop()),e&&l(r.coord,u[1])&&n.push({coord:u[1]})),c},$Q.prototype.getMinorTicksCoords=function(){var e;return"ordinal"===this.scale.type?[]:(e=this.model.getModel("minorTick").get("splitNumber"),e=this.scale.getMinorTicks(e=0<e&&e<100?e:5),Object(Xw.G)(e,(function(e){return Object(Xw.G)(e,(function(e){return{coord:this.dataToCoord(e),tickValue:e}}),this)}),this))},$Q.prototype.getViewLabels=function(){return function(e){return"category"===e.type?(i=(r=e).getLabelModel(),o=NQ(r,i),!i.get("show")||r.scale.isBlank()?{labels:[],labelCategoryInterval:o.labelCategoryInterval}:o):(i=(t=e).scale.getTicks(),n=e$(t),{labels:Xw.G(i,(function(e,r){return{level:e.level,formattedLabel:n(e,r),rawLabel:t.scale.getLabel(e),tickValue:e.value}}))});var t,n,r,i,o}(this).labels},$Q.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},$Q.prototype.getTickModel=function(){return this.model.getModel("axisTick")},$Q.prototype.getBandWidth=function(){var e,t=this._extent;0===(e=(e=this.scale.getExtent())[1]-e[0]+(this.onBand?1:0))&&(e=1),t=Math.abs(t[1]-t[0]);return Math.abs(t)/e},$Q.prototype.calculateCategoryInterval=function(){i=(n=d=this).getLabelModel();var e={axisRotate:n.getRotate?n.getRotate():n.isHorizontal&&!n.isHorizontal()?90:0,labelRotate:i.get("rotate")||0,font:i.getFont()},t=e$(d),n=(e.axisRotate-e.labelRotate)/180*Math.PI,r=(i=d.scale).getExtent(),i=i.count();if(r[1]-r[0]<1)return 0;for(var o=1,a=(40<i&&(o=Math.max(1,Math.floor(i/40))),r[0]),s=d.dataToCoord(a+1)-d.dataToCoord(a),u=Math.abs(s*Math.cos(n)),c=(s=Math.abs(s*Math.sin(n)),0),l=0;a<=r[1];a+=o){var h=1.3*(f=qk(t({value:a}),e.font,"center","top")).width,f=1.3*f.height;c=Math.max(c,h,7),l=Math.max(l,f,7)}n=c/u,u=l/s,isNaN(n)&&(n=1/0),isNaN(u)&&(u=1/0),s=Math.max(0,Math.floor(Math.min(n,u))),n=jQ(d.model),u=d.getExtent();var d=n.lastAutoInterval,p=n.lastTickCount;return null!=d&&null!=p&&Math.abs(d-s)<=1&&Math.abs(p-i)<=1&&s<d&&n.axisExtent0===u[0]&&n.axisExtent1===u[1]?s=d:(n.lastTickCount=i,n.lastAutoInterval=s,n.axisExtent0=u[0],n.axisExtent1=u[1]),s},Kw(VQ,zQ=$Q),VQ.prototype.isHorizontal=function(){var e=this.position;return"top"===e||"bottom"===e},VQ.prototype.getGlobalExtent=function(e){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),e&&t[0]>t[1]&&t.reverse(),t},VQ.prototype.pointToData=function(e,t){return this.coordToData(this.toLocalCoord(e["x"===this.dim?0:1]),t)},VQ.prototype.setCategorySortInfo=function(e){if("category"!==this.type)return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)};var qQ=VQ,GQ=Math.log;function WQ(e,t,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=DQ,this._initCartesian(e,t,n),this.model=e}function KQ(e,t){return e.getCoordSysModel()===t}function YQ(e,t,n,r){n.getAxesOnZeroOf=function(){return i?[i]:[]};var i,o=e[t];t=(e=n.model).get(["axisLine","onZero"]),n=e.get(["axisLine","onZeroAxisIndex"]);if(t){if(null!=n)XQ(o[n])&&(i=o[n]);else for(var a in o)if(o.hasOwnProperty(a)&&XQ(o[a])&&!r[s(o[a])]){i=o[a];break}i&&(r[s(i)]=!0)}function s(e){return e.dim+"_"+e.index}}function XQ(e){return e&&"category"!==e.type&&"time"!==e.type&&(t=(e=(e=e).scale.getExtent())[0],e=e[1],!(0<t&&0<e||t<0&&e<0));var t}WQ.prototype.getRect=function(){return this._rect},WQ.prototype.update=function(e,t){var n=this._axesMap;function r(e){var t,n=Object(Xw.E)(e),r=n.length;if(r){for(var i=[],o=r-1;0<=o;o--){var a=e[+n[o]],s=a.model,u=a.scale;AH(u)&&s.get("alignTicks")&&null==s.get("interval")?i.push(a):(ZH(u,s),AH(u)&&(t=a))}i.length&&(t||ZH((t=i.pop()).scale,t.model),Object(Xw.k)(i,(function(e){var n=e.scale,r=(e=e.model,t.scale),i=BH.prototype,o=i.getTicks.call(r),a=i.getTicks.call(r,!0),s=o.length-1,u=(r=i.getInterval.call(r),(e=JH(n,e)).extent),c=e.fixMin,l=(e=e.fixMax,"log"===n.type&&(l=GQ(n.base),u=[GQ(u[0])/l,GQ(u[1])/l]),n.setExtent(u[0],u[1]),n.calcNiceExtent({splitNumber:s,fixMin:c,fixMax:e}),i.getExtent.call(n)),h=(c&&(u[0]=l[0]),e&&(u[1]=l[1]),i.getInterval.call(n)),f=u[0],d=u[1];if(c&&e)h=(d-f)/s;else if(c)for(d=u[0]+h*s;d<u[1]&&isFinite(d)&&isFinite(u[1]);)h=vH(h),d=u[0]+h*s;else if(e)for(f=u[1]-h*s;f>u[0]&&isFinite(f)&&isFinite(u[0]);)h=vH(h),f=u[1]-h*s;else l=(h=s<n.getTicks().length-1?vH(h):h)*s,(f=AE((d=Math.ceil(u[1]/h)*h)-l))<0&&0<=u[0]?(f=0,d=AE(l)):0<d&&u[1]<=0&&(d=0,f=-AE(l));c=(o[0].value-a[0].value)/r,e=(o[s].value-a[s].value)/r,i.setExtent.call(n,f+h*c,d+h*e),i.setInterval.call(n,h),(c||e)&&i.setNiceExtent.call(n,f+h,d-h)})))}}this._updateScale(e,this.model),r(n.x),r(n.y);var i={};Object(Xw.k)(n.x,(function(e){YQ(n,"y",e,i)})),Object(Xw.k)(n.y,(function(e){YQ(n,"x",e,i)})),this.resize(this.model,t)},WQ.prototype.resize=function(e,t,n){var r=e.getBoxLayoutParams(),i=(n=!n&&e.get("containLabel"),xD(r,{width:t.getWidth(),height:t.getHeight()})),o=(this._rect=i,this._axesList);function a(){Object(Xw.k)(o,(function(e){var t,n,r=e.isHorizontal(),o=r?[0,i.width]:[0,i.height],a=e.inverse?1:0;e.setExtent(o[a],o[1-a]),o=e,t=r?i.x:i.y,a=o.getExtent(),n=a[0]+a[1],o.toGlobalCoord="x"===o.dim?function(e){return e+t}:function(e){return n-e+t},o.toLocalCoord="x"===o.dim?function(e){return e-t}:function(e){return n-e+t}}))}a(),n&&(Object(Xw.k)(o,(function(e){var t,n,r;e.model.get(["axisLabel","inside"])||(t=function(e){var t=e.model,n=e.scale;if(t.get(["axisLabel","show"])&&!n.isBlank()){var r,i,o=n.getExtent(),a=n instanceof _H?n.count():(r=n.getTicks()).length,s=e.getLabelModel(),u=e$(e),c=1;40<a&&(c=Math.ceil(a/40));for(var l,h,f,d=0;d<a;d+=c){var p=u(r?r[d]:{value:o[0]+d},d),m=(p=p=s.getTextRect(p),h=m=h=void 0,l=(l=s.get("rotate")||0)*Math.PI/180,h=p.width,m=p.height,f=h*Math.abs(Math.cos(l))+Math.abs(m*Math.sin(l)),h=h*Math.abs(Math.sin(l))+Math.abs(m*Math.cos(l)),new Zx(p.x,p.y,f,h));i?i.union(m):i=m}return i}}(e))&&(n=e.isHorizontal()?"height":"width",r=e.model.get(["axisLabel","margin"]),i[n]-=t[n]+r,"top"===e.position?i.y+=t.height+r:"left"===e.position&&(i.x+=t.width+r))})),a()),Object(Xw.k)(this._coordsList,(function(e){e.calcAffineTransform()}))},WQ.prototype.getAxis=function(e,t){if(null!=(e=this._axesMap[e]))return e[t||0]},WQ.prototype.getAxes=function(){return this._axesList.slice()},WQ.prototype.getCartesian=function(e,t){if(null!=e&&null!=t)return this._coordsMap["x"+e+"y"+t];Object(Xw.z)(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var n=0,r=this._coordsList;n<r.length;n++)if(r[n].getAxis("x").index===e||r[n].getAxis("y").index===t)return r[n]},WQ.prototype.getCartesians=function(){return this._coordsList.slice()},WQ.prototype.convertToPixel=function(e,t,n){return(t=this._findConvertTarget(t)).cartesian?t.cartesian.dataToPoint(n):t.axis?t.axis.toGlobalCoord(t.axis.dataToCoord(n)):null},WQ.prototype.convertFromPixel=function(e,t,n){return(t=this._findConvertTarget(t)).cartesian?t.cartesian.pointToData(n):t.axis?t.axis.coordToData(t.axis.toLocalCoord(n)):null},WQ.prototype._findConvertTarget=function(e){var t,n,r=e.seriesModel,i=e.xAxisModel||r&&r.getReferringComponents("xAxis",QE).models[0],o=e.yAxisModel||r&&r.getReferringComponents("yAxis",QE).models[0],a=(e=e.gridModel,this._coordsList);return r?(t=r.coordinateSystem,Object(Xw.q)(a,t)<0&&(t=null)):i&&o?t=this.getCartesian(i.componentIndex,o.componentIndex):i?n=this.getAxis("x",i.componentIndex):o?n=this.getAxis("y",o.componentIndex):e&&e.coordinateSystem===this&&(t=this._coordsList[0]),{cartesian:t,axis:n}},WQ.prototype.containPoint=function(e){var t=this._coordsList[0];if(t)return t.containPoint(e)},WQ.prototype._initCartesian=function(e,t,n){var r=this,i=this,o={left:!1,right:!1,top:!1,bottom:!1},a={x:{},y:{}},s={x:0,y:0};function u(t){return function(n,r){var u,c;KQ(n,e)&&(u=n.get("position"),"x"===t?"top"!==u&&"bottom"!==u&&(u=o.bottom?"top":"bottom"):"left"!==u&&"right"!==u&&(u=o.left?"right":"left"),o[u]=!0,c="category"===(u=new qQ(t,function(e,t){if(t=t||e.get("type"))switch(t){case"category":return new _H({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:[1/0,-1/0]});case"time":return new FH({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get("useUTC")});default:return new(fH.getClass(t)||BH)}}(n),[0,0],n.get("type"),u)).type,u.onBand=c&&n.get("boundaryGap"),u.inverse=n.get("inverse"),(n.axis=u).model=n,u.grid=i,u.index=r,i._axesList.push(u),a[t][r]=u,s[t]++)}}t.eachComponent("xAxis",u("x"),this),t.eachComponent("yAxis",u("y"),this),s.x&&s.y?(this._axesMap=a,Object(Xw.k)(a.x,(function(t,n){Object(Xw.k)(a.y,(function(i,o){var a=new MQ(o="x"+n+"y"+o);a.master=r,a.model=e,r._coordsMap[o]=a,r._coordsList.push(a),a.addAxis(t),a.addAxis(i)}))}))):(this._axesMap={},this._axesList=[])},WQ.prototype._updateScale=function(e,t){function n(e,t){Object(Xw.k)(function(e,t){var n={};return Xw.k(e.mapDimensionsAll(t),(function(t){var r;n[zP(r=e,t=t)?r.getCalculationInfo("stackResultDimension"):t]=!0})),Xw.E(n)}(e,t.dim),(function(n){t.scale.unionExtentFromData(e,n)}))}Object(Xw.k)(this._axesList,(function(e){var t;e.scale.setExtent(1/0,-1/0),"category"===e.type&&(t=e.model.get("categorySortInfo"),e.scale.setSortInfo(t))})),e.eachSeries((function(e){var r,i;A$(e)&&(i=(r=v$(e)).xAxisModel,r=r.yAxisModel,KQ(i,t)&&KQ(r,t)&&(i=this.getCartesian(i.componentIndex,r.componentIndex),r=e.getData(),e=i.getAxis("x"),i=i.getAxis("y"),n(r,e),n(r,i)))}),this)},WQ.prototype.getTooltipAxes=function(e){var t=[],n=[];return Object(Xw.k)(this.getCartesians(),(function(r){var i=null!=e&&"auto"!==e?r.getAxis(e):r.getBaseAxis();r=r.getOtherAxis(i);Object(Xw.q)(t,i)<0&&t.push(i),Object(Xw.q)(n,r)<0&&n.push(r)})),{baseAxes:t,otherAxes:n}},WQ.create=function(e,t){var n=[];return e.eachComponent("grid",(function(r,i){var o=new WQ(r,e,t);o.name="grid_"+i,o.resize(r,t,!0),r.coordinateSystem=o,n.push(o)})),e.eachSeries((function(e){var t,n,r;A$(e)&&(t=(n=v$(e)).xAxisModel,n=n.yAxisModel,r=t.getCoordSysModel().coordinateSystem,e.coordinateSystem=r.getCartesian(t.componentIndex,n.componentIndex))})),n},WQ.dimensions=DQ;var JQ,ZQ=WQ,eV=UE(),tV=["axisLine","axisTickLabel","axisName"],nV=["splitArea","splitLine","minorSplitLine"];Kw(rV,JQ=nH),rV.prototype.render=function(e,t,n,r){this.group.removeAll();var i,o,a=this._axisGroup;this._axisGroup=new cE,this.group.add(this._axisGroup),e.get("show")&&(o=g$(i=e.getCoordSysModel(),e),o=new d$(e,Xw.m({handleAutoShown:function(t){for(var n=i.coordinateSystem.getCartesians(),r=0;r<n.length;r++)if(AH(n[r].getOtherAxis(e.axis).scale))return!0;return!1}},o)),Xw.k(tV,o.add,o),this._axisGroup.add(o.getGroup()),Xw.k(nV,(function(t){e.get([t,"show"])&&oV[t](this,this._axisGroup,e,i)}),this),r&&"changeAxisOrder"===r.type&&r.isInitSort||QN(a,this._axisGroup,e),JQ.prototype.render.call(this,e,t,n,r))},rV.prototype.remove=function(){eV(this).splitAreaColors=null},rV.type="cartesianAxis",Ca=rV;function rV(){var e=null!==JQ&&JQ.apply(this,arguments)||this;return e.type=rV.type,e.axisPointerClass="CartesianAxisPointer",e}var iV,oV={splitLine:function(e,t,n,r){var i=n.axis;if(!i.scale.isBlank())for(var o=(n=n.getModel("splitLine")).getModel("lineStyle"),a=o.get("color"),s=(a=Xw.s(a)?a:[a],r.coordinateSystem.getRect()),u=i.isHorizontal(),c=0,l=i.getTicksCoords({tickModel:n}),h=[],f=[],d=o.getLineStyle(),p=0;p<l.length;p++){var m=i.toGlobalCoord(l[p].coord),g=(m=(u?(h[0]=m,h[1]=s.y,f[0]=m,f[1]=s.y+s.height):(h[0]=s.x,h[1]=m,f[0]=s.x+s.width,f[1]=m),c++%a.length),l[p].tickValue);RN((g=new Kj({anid:null!=g?"line_"+l[p].tickValue:null,autoBatch:!0,shape:{x1:h[0],y1:h[1],x2:f[0],y2:f[1]},style:Xw.i({stroke:a[m]},d),silent:!0})).shape,d.lineWidth),t.add(g)}},minorSplitLine:function(e,t,n,r){var i=n.axis,o=(n=n.getModel("minorSplitLine").getModel("lineStyle"),r.coordinateSystem.getRect()),a=i.isHorizontal(),s=i.getMinorTicksCoords();if(s.length)for(var u=[],c=[],l=n.getLineStyle(),h=0;h<s.length;h++)for(var f=0;f<s[h].length;f++){var d=i.toGlobalCoord(s[h][f].coord);RN((d=(a?(u[0]=d,u[1]=o.y,c[0]=d,c[1]=o.y+o.height):(u[0]=o.x,u[1]=d,c[0]=o.x+o.width,c[1]=d),new Kj({anid:"minor_line_"+s[h][f].tickValue,autoBatch:!0,shape:{x1:u[0],y1:u[1],x2:c[0],y2:c[1]},style:l,silent:!0}))).shape,l.lineWidth),t.add(d)}},splitArea:function(e,t,n,r){var i=t,o=(t=r,(r=n).axis);if(!o.scale.isBlank()){var a=(n=(r=r.getModel("splitArea")).getModel("areaStyle")).get("color"),s=t.coordinateSystem.getRect(),u=o.getTicksCoords({tickModel:r,clamp:!0});if(u.length){var c=a.length,l=eV(e).splitAreaColors,h=Xw.f(),f=0;if(l)for(var d=0;d<u.length;d++){var p=l.get(u[d].tickValue);if(null!=p){f=(p+(c-1)*d)%c;break}}var m=o.toGlobalCoord(u[0].coord),g=n.getAreaStyle();for(a=Xw.s(a)?a:[a],d=1;d<u.length;d++){var A=o.toGlobalCoord(u[d].coord),v=void 0,b=void 0,y=void 0,w=void 0;m=o.isHorizontal()?(v=m,b=s.y,w=s.height,v+(y=A-v)):(v=s.x,b=m,y=s.width,b+(w=A-b));null!=(A=u[d-1].tickValue)&&h.set(A,f),i.add(new z_({anid:null!=A?"area_"+A:null,shape:{x:v,y:b,width:y,height:w},style:Xw.i({fill:a[f]},g),autoBatch:!0,silent:!0})),f=(f+1)%c}eV(e).splitAreaColors=h}}}},aV=(Kw(sV,iV=Ca),sV.type="xAxis",sV);function sV(){var e=null!==iV&&iV.apply(this,arguments)||this;return e.type=sV.type,e}Kw(lV,uV=Ca),lV.type="yAxis";var uV,cV=lV;function lV(){var e=null!==uV&&uV.apply(this,arguments)||this;return e.type=aV.type,e}Kw(dV,hV=PM),dV.prototype.render=function(e,t){this.group.removeAll(),e.get("show")&&this.group.add(new z_({shape:e.coordinateSystem.getRect(),style:Object(Xw.i)({fill:e.get("backgroundColor")},e.getItemStyle()),silent:!0,z2:-1}))},dV.type="grid";var hV,fV=dV;function dV(){var e=null!==hV&&hV.apply(this,arguments)||this;return e.type="grid",e}var pV={offset:0};function mV(e){e.registerComponentView(fV),e.registerComponentModel(bQ),e.registerCoordinateSystem("cartesian2d",ZQ),SQ(e,"x",xQ,pV),SQ(e,"y",xQ,pV),e.registerComponentView(aV),e.registerComponentView(cV),e.registerPreprocessor((function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})}))}Kw(vV,gV=jD),vV.prototype.init=function(e,t,n){gV.prototype.init.call(this,e,t,n),this._sourceManager=new iM(this),aM(this)},vV.prototype.mergeOption=function(e,t){gV.prototype.mergeOption.call(this,e,t),aM(this)},vV.prototype.optionUpdated=function(){this._sourceManager.dirty()},vV.prototype.getSourceManager=function(){return this._sourceManager},vV.type="dataset",vV.defaultOption={seriesLayoutBy:$D};var gV,AV=vV;function vV(){var e=null!==gV&&gV.apply(this,arguments)||this;return e.type="dataset",e}Kw(wV,bV=PM),wV.type="dataset";var bV,yV=wV;function wV(){var e=null!==bV&&bV.apply(this,arguments)||this;return e.type="dataset",e}var xV={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},CV=(kV.prototype.evaluate=function(e){var t=typeof e;return Object(Xw.B)(t)?this._condVal.test(e):!!Object(Xw.y)(t)&&this._condVal.test(e+"")},kV);function kV(e){null==(this._condVal=Object(Xw.B)(e)?new RegExp(e):Object(Xw.A)(e)?e:null)&&sB("")}SV.prototype.evaluate=function(){return this.value};var EV=SV;function SV(){}OV.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(!e[t].evaluate())return!1;return!0};var _V=OV;function OV(){}DV.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(e[t].evaluate())return!0;return!1};var TV=DV;function DV(){}IV.prototype.evaluate=function(){return!this.child.evaluate()};var BV=IV;function IV(){}jV.prototype.evaluate=function(){for(var e=!!this.valueParser,t=(0,this.getValue)(this.valueGetterParam),n=e?this.valueParser(t):null,r=0;r<this.subCondList.length;r++)if(!this.subCondList[r].evaluate(e?n:t))return!1;return!0};var MV=jV;function jV(){}function NV(e,t){if(!0===e||!1===e)return(n=new EV).value=e,n;var n;if(RV(e)||sB(""),e.and)return FV("and",e,t);if(e.or)return FV("or",e,t);if(e.not)return n=t,RV(o=(o=e).not)||sB(""),(u=new BV).child=NV(o,n),u.child||sB(""),u;for(var r=e,i=t,o=i.prepareGetValue(r),a=[],s=Object(Xw.E)(r),u=r.parser,c=u?II(u):null,l=0;l<s.length;l++){var h,f=s[l];"parser"===f||i.valueGetterAttrMap.get(f)||(h=Object(Xw.p)(xV,f)?xV[f]:f,f=r[f],(h=function(e,t){return"eq"===e||"ne"===e?new PI("eq"===e,t):Object(Xw.p)(MI,e)?new jI(e,t):null}(h,f=c?c(f):f)||"reg"===h&&new CV(f))||sB(""),a.push(h))}return a.length||sB(""),(u=new MV).valueGetterParam=o,u.valueParser=c,u.getValue=i.getValue,u.subCondList=a,u}function FV(e,t,n){return t=t[e],Object(Xw.s)(t)||sB(""),t.length||sB(""),(e=new("and"===e?_V:TV)).children=Object(Xw.G)(t,(function(e){return NV(e,n)})),e.children.length||sB(""),e}function RV(e){return Object(Xw.z)(e)&&!Object(Xw.t)(e)}LV.prototype.evaluate=function(){return this._cond.evaluate()};var PV=LV;function LV(e,t){this._cond=NV(e,t)}var UV,zV={type:"echarts:filter",transform:function(e){for(var t,n,r=e.upstream,i=(e=e.config,n={valueGetterAttrMap:Object(Xw.f)({dimension:!0}),prepareGetValue:function(e){var t=e.dimension;return(e=(Object(Xw.p)(e,"dimension")||sB(""),r.getDimensionInfo(t)))||sB(""),{dimIdx:e.index}},getValue:function(e){return r.retrieveValueFromItem(t,e.dimIdx)}},new PV(e,n)),o=[],a=0,s=r.count();a<s;a++)t=r.getRawDataItem(a),i.evaluate()&&o.push(t);return{data:o}}},HV={type:"echarts:sort",transform:function(e){for(var t=e.upstream,n=((e=DE(e=e.config)).length||sB(""),[]),r=((e=(Object(Xw.k)(e,(function(e){var r=e.dimension,i=e.order,o=e.parser,a=(e=e.incomparable,(r=(null==r&&sB(""),"asc"!==i&&"desc"!==i&&sB(""),e&&"min"!==e&&"max"!==e&&sB(""),"asc"!==i&&"desc"!==i&&sB(""),t.getDimensionInfo(r)))||sB(""),o?II(o):null);o&&!a&&sB(""),n.push({dimIdx:r.index,parser:a,comparator:new FI(i,e)})})),t.sourceFormat))!==PD&&e!==LD&&sB(""),[]),i=0,o=t.count();i<o;i++)r.push(t.getRawDataItem(i));return r.sort((function(e,r){for(var i=0;i<n.length;i++){var o=n[i],a=t.retrieveValueFromItem(e,o.dimIdx),s=t.retrieveValueFromItem(r,o.dimIdx);if(0!==(o=(o.parser&&(a=o.parser(a),s=o.parser(s)),o.comparator.evaluate(a,s))))return o}return 0})),{data:r}}};function $V(){var e=null!==UV&&UV.apply(this,arguments)||this;return e.type=$V.type,e.layoutMode={type:"box",ignoreSize:!0},e}Kw($V,UV=jD),$V.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},$V.prototype.mergeOption=function(e,t){UV.prototype.mergeOption.call(this,e,t),this._updateSelector(e)},$V.prototype._updateSelector=function(e){var t=e.selector,n=this.ecModel;!0===t&&(t=e.selector=["all","inverse"]),Xw.s(t)&&Xw.k(t,(function(e,r){Xw.B(e)&&(e={type:e}),t[r]=Xw.H(e,(r=n,"all"===(e=e.type)?{type:"all",title:r.getLocaleModel().get(["legend","selector","all"])}:"inverse"===e?{type:"inverse",title:r.getLocaleModel().get(["legend","selector","inverse"])}:void 0))}))},$V.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&"single"===this.get("selectedMode")){for(var t=!1,n=0;n<e.length;n++){var r=e[n].get("name");if(this.isSelected(r)){this.select(r),t=!0;break}}t||this.select(e[0].get("name"))}},$V.prototype._updateData=function(e){var t=[],n=[],r=(e.eachRawSeries((function(r){var i,o=r.name;n.push(o),r.legendVisualProvider&&(o=r.legendVisualProvider.getAllNames(),e.isSeriesFiltered(r)||(n=n.concat(o)),o.length)?t=t.concat(o):i=!0,i&&RE(r)&&t.push(r.name)})),this._availableNames=n,this.get("data")||t),i=Xw.f();r=Xw.G(r,(function(e){return(Xw.B(e)||Xw.y(e))&&(e={name:e}),i.get(e.name)?null:(i.set(e.name,!0),new DT(e,this,this.ecModel))}),this);this._data=Xw.n(r,(function(e){return!!e}))},$V.prototype.getData=function(){return this._data},$V.prototype.select=function(e){var t,n=this.option.selected;"single"===this.get("selectedMode")&&(t=this._data,Xw.k(t,(function(e){n[e.get("name")]=!1}))),n[e]=!0},$V.prototype.unSelect=function(e){"single"!==this.get("selectedMode")&&(this.option.selected[e]=!1)},$V.prototype.toggleSelected=function(e){var t=this.option.selected;t.hasOwnProperty(e)||(t[e]=!0),this[t[e]?"unSelect":"select"](e)},$V.prototype.allSelect=function(){var e=this._data,t=this.option.selected;Xw.k(e,(function(e){t[e.get("name",!0)]=!0}))},$V.prototype.inverseSelect=function(){var e=this._data,t=this.option.selected;Xw.k(e,(function(e){e=e.get("name",!0),t.hasOwnProperty(e)||(t[e]=!0),t[e]=!t[e]}))},$V.prototype.isSelected=function(e){var t=this.option.selected;return!(t.hasOwnProperty(e)&&!t[e])&&0<=Xw.q(this._availableNames,e)},$V.prototype.getOrient=function(){return"vertical"===this.get("orient")?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},$V.type="legend.plain",$V.dependencies=["series"],$V.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}};var QV,VV=$V,qV=Xw.h,GV=Xw.k,WV=cE;function KV(){var e=null!==QV&&QV.apply(this,arguments)||this;return e.type=KV.type,e.newlineDisabled=!1,e}function YV(e,t,n,r){ZV(e,t,n,r),n.dispatchAction({type:"legendToggleSelect",name:null!=e?e:t}),JV(e,t,n,r)}function XV(e){for(var t,n=e.getZr().storage.getDisplayList(),r=0,i=n.length;r<i&&!(t=n[r].states.emphasis);)r++;return t&&t.hoverLayer}function JV(e,t,n,r){XV(n)||n.dispatchAction({type:"highlight",seriesName:e,name:t,excludeSeriesId:r})}function ZV(e,t,n,r){XV(n)||n.dispatchAction({type:"downplay",seriesName:e,name:t,excludeSeriesId:r})}Kw(KV,QV=PM),KV.prototype.init=function(){this.group.add(this._contentGroup=new WV),this.group.add(this._selectorGroup=new WV),this._isFirstRender=!0},KV.prototype.getContentGroup=function(){return this._contentGroup},KV.prototype.getSelectorGroup=function(){return this._selectorGroup},KV.prototype.render=function(e,t,n){var r,i,o,a,s,u=this._isFirstRender;this._isFirstRender=!1,this.resetInner(),e.get("show",!0)&&(i=e.get("align"),r=e.get("orient"),i&&"auto"!==i||(i="right"===e.get("left")&&"vertical"===r?"right":"left"),a=e.get("selector",!0),s=e.get("selectorPosition",!0),this.renderInner(i,e,t,n,a,r,s=!a||s&&"auto"!==s?s:"horizontal"===r?"end":"start"),o=xD(t=e.getBoxLayoutParams(),r={width:n.getWidth(),height:n.getHeight()},n=e.get("padding")),i=this.layoutInner(e,i,o,u,a,s),o=xD(Xw.i({width:i.width,height:i.height},t),r,n),this.group.x=o.x-i.x,this.group.y=o.y-i.y,this.group.markRedraw(),this.group.add(this._backgroundEl=(u=i,s=lD((a=e).get("padding")),(t=a.getItemStyle(["color","opacity"])).fill=a.get("backgroundColor"),u=new z_({shape:{x:u.x-s[3],y:u.y-s[0],width:u.width+s[1]+s[3],height:u.height+s[0]+s[2],r:a.get("borderRadius")},style:t,silent:!0,z2:-1}))))},KV.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},KV.prototype.renderInner=function(e,t,n,r,i,o,a){var s=this.getContentGroup(),u=Xw.f(),c=t.get("selectedMode"),l=[];n.eachRawSeries((function(e){e.get("legendHoverLink")||l.push(e.id)})),GV(t.getData(),(function(i,o){var a,h,f,d,p=i.get("name");this.newlineDisabled||""!==p&&"\n"!==p?(a=n.getSeriesByName(p)[0],u.get(p)||(a?(h=(d=a.getData()).getVisual("legendLineStyle")||{},f=d.getVisual("legendIcon"),d=d.getVisual("style"),this._createItem(a,p,o,i,t,e,h,d,f,c,r).on("click",qV(YV,p,null,r,l)).on("mouseover",qV(JV,a.name,null,r,l)).on("mouseout",qV(ZV,a.name,null,r,l)),u.set(p,!0)):n.eachRawSeries((function(n){var a,s,h;!u.get(p)&&n.legendVisualProvider&&(s=n.legendVisualProvider).containName(p)&&(h=s.indexOfName(p),a=s.getItemVisual(h,"style"),s=s.getItemVisual(h,"legendIcon"),(h=Object(GC.d)(a.fill))&&0===h[3]&&(h[3]=.2,a=Xw.m(Xw.m({},a),{fill:Object(GC.e)(h,"rgba")})),this._createItem(n,p,o,i,t,e,{},a,s,c,r).on("click",qV(YV,null,p,r,l)).on("mouseover",qV(JV,null,p,r,l)).on("mouseout",qV(ZV,null,p,r,l)),u.set(p,!0))}),this))):((h=new WV).newline=!0,s.add(h))}),this),i&&this._createSelector(i,t,r,o,a)},KV.prototype._createSelector=function(e,t,n,r,i){var o=this.getSelectorGroup();GV(e,(function(e){var r=e.type,i=new nO({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:"all"===r?"legendAllSelect":"legendInverseSelect"})}});o.add(i),hT(i,{normal:t.getModel("selectorLabel"),emphasis:t.getModel(["emphasis","selectorLabel"])},{defaultText:e.title}),$O(i)}))},KV.prototype._createItem=function(e,t,n,r,i,o,a,s,u,c,l){var h=e.visualDrawType,f=i.get("itemWidth"),d=i.get("itemHeight"),p=i.isSelected(t),m=r.get("symbolRotate"),g=r.get("symbolKeepAspect"),A=(a=function(e,t,n,r,i,o,a){function s(e,t){"auto"===e.lineWidth&&(e.lineWidth=0<t.lineWidth?2:0),GV(e,(function(n,r){"inherit"===e[r]&&(e[r]=t[r])}))}var u=(c=t.getModel("itemStyle")).getItemStyle(),c=(e=0===e.lastIndexOf("empty",0)?"fill":"stroke",c.getShallow("decal"));return u.decal=c&&"inherit"!==c?CR(c,a):r.decal,"inherit"===u.fill&&(u.fill=r[i]),"inherit"===u.stroke&&(u.stroke=r[e]),"inherit"===u.opacity&&(u.opacity=("fill"===i?r:n).opacity),s(u,r),s(a=(c=t.getModel("lineStyle")).getLineStyle(),n),"auto"===u.fill&&(u.fill=r.fill),"auto"===u.stroke&&(u.stroke=r.fill),"auto"===a.stroke&&(a.stroke=r.fill),o||(i=t.get("inactiveBorderWidth"),n=u[e],u.lineWidth="auto"===i?0<r.lineWidth&&n?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),a.stroke=c.get("inactiveColor"),a.lineWidth=c.get("inactiveWidth")),{itemStyle:u,lineStyle:a}}(u=(A=r.get("icon"))||u||"roundRect",r,a,s,h,p,l),s=new WV,h=r.getModel("textStyle"),!Xw.v(e.getLegendIcon)||A&&"inherit"!==A?(l="inherit"===A&&e.getData().getVisual("symbol")?"inherit"===m?e.getData().getVisual("symbolRotate"):m:0,s.add(function(e){var t=e.icon||"roundRect",n=XF(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);return n.setStyle(e.itemStyle),n.rotation=(e.iconRotate||0)*Math.PI/180,n.setOrigin([e.itemWidth/2,e.itemHeight/2]),-1<t.indexOf("empty")&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2),n}({itemWidth:f,itemHeight:d,icon:u,iconRotate:l,itemStyle:a.itemStyle,lineStyle:a.lineStyle,symbolKeepAspect:g}))):s.add(e.getLegendIcon({itemWidth:f,itemHeight:d,icon:u,iconRotate:m,itemStyle:a.itemStyle,lineStyle:a.lineStyle,symbolKeepAspect:g})),"left"===o?f+5:-5);l=o,e=i.get("formatter"),u=t,Xw.B(e)&&e?u=e.replace("{name}",null!=t?t:""):Xw.v(e)&&(u=e(t)),m=p?h.getTextColor():r.get("inactiveColor"),s.add(new nO({style:dT(h,{text:u,x:A,y:d/2,fill:m,align:l,verticalAlign:"middle"},{inheritColor:m})})),a=new z_({shape:s.getBoundingRect(),invisible:!0});return(g=r.getModel("tooltip")).get("show")&&YN({el:a,componentModel:i,itemName:t,itemTooltipOption:g.option}),s.add(a),s.eachChild((function(e){e.silent=!0})),a.silent=!c,this.getContentGroup().add(s),$O(s),s.__legendDataIndex=n,s},KV.prototype.layoutInner=function(e,t,n,r,i,o){var a,s,u,c,l,h=this.getContentGroup(),f=this.getSelectorGroup(),d=[-(n=(wD(e.get("orient"),h,e.get("itemGap"),n.width,n.height),h.getBoundingRect())).x,-n.y];return f.markRedraw(),h.markRedraw(),i?(wD("horizontal",f,e.get("selectorItemGap",!0)),a=[-(i=f.getBoundingRect()).x,-i.y],s=e.get("selectorButtonGap",!0),u=0===(e=e.getOrient().index)?"width":"height",c=0===e?"height":"width",l=0===e?"y":"x","end"===o?a[e]+=n[u]+s:d[e]+=i[u]+s,a[1-e]+=n[c]/2-i[c]/2,f.x=a[0],f.y=a[1],h.x=d[0],h.y=d[1],(o={x:0,y:0})[u]=n[u]+s+i[u],o[c]=Math.max(n[c],i[c]),o[l]=Math.min(0,i[l]+a[1-e]),o):(h.x=d[0],h.y=d[1],this.group.getBoundingRect())},KV.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},KV.type="legend.plain";var eq,tq=KV;function nq(e){var t=e.findComponents({mainType:"legend"});t&&t.length&&e.filterSeries((function(e){for(var n=0;n<t.length;n++)if(!t[n].isSelected(e.name))return!1;return!0}))}function rq(e,t,n){var r,i={},o="toggleSelected"===e;return n.eachComponent("legend",(function(n){o&&null!=r?n[r?"select":"unSelect"](t.name):"allSelect"===e||"inverseSelect"===e?n[e]():(n[e](t.name),r=n.isSelected(t.name));var a=n.getData();Object(Xw.k)(a,(function(e){var t;"\n"!==(e=e.get("name"))&&""!==e&&(t=n.isSelected(e),i.hasOwnProperty(e)?i[e]=i[e]&&t:i[e]=t)}))})),"allSelect"===e||"inverseSelect"===e?{selected:i}:{name:t.name,selected:i}}function iq(e){e.registerComponentModel(VV),e.registerComponentView(tq),e.registerProcessor(e.PRIORITY.PROCESSOR.SERIES_FILTER,nq),e.registerSubTypeDefaulter("legend",(function(){return"plain"})),(e=e).registerAction("legendToggleSelect","legendselectchanged",Object(Xw.h)(rq,"toggleSelected")),e.registerAction("legendAllSelect","legendselectall",Object(Xw.h)(rq,"allSelect")),e.registerAction("legendInverseSelect","legendinverseselect",Object(Xw.h)(rq,"inverseSelect")),e.registerAction("legendSelect","legendselected",Object(Xw.h)(rq,"select")),e.registerAction("legendUnSelect","legendunselected",Object(Xw.h)(rq,"unSelect"))}function oq(){var e=null!==eq&&eq.apply(this,arguments)||this;return e.type=oq.type,e}function aq(e,t,n){var r=[1,1];r[e.getOrient().index]=0,kD(t,n,{type:"box",ignoreSize:!!r})}Kw(oq,eq=VV),oq.prototype.setScrollDataIndex=function(e){this.option.scrollDataIndex=e},oq.prototype.init=function(e,t,n){var r=ED(e);eq.prototype.init.call(this,e,t,n),aq(this,e,r)},oq.prototype.mergeOption=function(e,t){eq.prototype.mergeOption.call(this,e,t),aq(this,this.option,e)},oq.type="legend.scroll",oq.defaultOption=MT(VV.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800});var sq,uq=oq,cq=cE,lq=["width","height"],hq=["x","y"];function fq(){var e=null!==sq&&sq.apply(this,arguments)||this;return e.type=fq.type,e.newlineDisabled=!0,e._currentIndex=0,e}Kw(fq,sq=tq),fq.prototype.init=function(){sq.prototype.init.call(this),this.group.add(this._containerGroup=new cq),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new cq)},fq.prototype.resetInner=function(){sq.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},fq.prototype.renderInner=function(e,t,n,r,i,o,a){var s=this,u=(sq.prototype.renderInner.call(this,e,t,n,r,i,o,a),this._controllerGroup),c=(e=t.get("pageIconSize",!0),Xw.s(e)?e:[e,e]);l("pagePrev",0),n=t.getModel("pageTextStyle");function l(e,n){var i=e+"DataIndex";(n=GN(t.get("pageIcons",!0)[t.getOrient().name][n],{onclick:Xw.c(s._pageGo,s,i,t,r)},{x:-c[0]/2,y:-c[1]/2,width:c[0],height:c[1]})).name=e,u.add(n)}u.add(new nO({name:"pageText",style:{text:"xx/xx",fill:n.getTextColor(),font:n.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),l("pageNext",1)},fq.prototype.layoutInner=function(e,t,n,r,i,o){var a=this.getSelectorGroup(),s=e.getOrient().index,u=lq[s],c=hq[s],l=lq[1-s],h=hq[1-s],f=(i&&wD("horizontal",a,e.get("selectorItemGap",!0)),e.get("selectorButtonGap",!0)),d=a.getBoundingRect(),p=[-d.x,-d.y],m=Xw.d(n);i&&(m[u]=n[u]-d[u]-f),n=this._layoutContentAndController(e,r,m,s,u,l,h,c);return i&&("end"===o?p[s]+=n[u]+f:(e=d[u]+f,p[s]-=e,n[c]-=e),n[u]+=d[u]+f,p[1-s]+=n[h]+n[l]/2-d[l]/2,n[l]=Math.max(n[l],d[l]),n[h]=Math.min(n[h],d[h]+p[1-s]),a.x=p[0],a.y=p[1],a.markRedraw()),n},fq.prototype._layoutContentAndController=function(e,t,n,r,i,o,a,s){var u=this.getContentGroup(),c=this._containerGroup,l=this._controllerGroup,h=(wD(e.get("orient"),u,e.get("itemGap"),r?n.width:null,r?null:n.height),wD("horizontal",l,e.get("pageButtonItemGap",!0)),u.getBoundingRect()),f=l.getBoundingRect(),d=this._showController=h[i]>n[i],p=[-h.x,-h.y],m=(t=(t||(p[r]=u[s]),[0,0]),s=[-f.x,-f.y],Xw.N(e.get("pageButtonGap",!0),e.get("itemGap",!0)));return null!=(h=((p=(d&&("end"===e.get("pageButtonPosition",!0)?s[r]+=n[i]-f[i]:t[r]+=f[i]+m),s[1-r]+=h[o]/2-f[o]/2,u.setPosition(p),c.setPosition(t),l.setPosition(s),{x:0,y:0}))[i]=(d?n:h)[i],p[o]=Math.max(h[o],f[o]),p[a]=Math.min(0,f[a]+s[1-r]),c.__rectSize=n[i],d?((t={x:0,y:0})[i]=Math.max(n[i]-f[i]-m,0),t[o]=p[o],c.setClipPath(new z_({shape:t})),c.__rectSize=t[i]):l.eachChild((function(e){e.attr({invisible:!0,silent:!0})})),this._getPageInfo(e))).pageIndex&&tT(u,{x:h.contentPosition[0],y:h.contentPosition[1]},d?e:null),this._updatePageInfoView(e,h),p},fq.prototype._pageGo=function(e,t,n){null!=(e=this._getPageInfo(t)[e])&&n.dispatchAction({type:"legendScroll",scrollDataIndex:e,legendId:t.id})},fq.prototype._updatePageInfoView=function(e,t){var n=this._controllerGroup,r=(Xw.k(["pagePrev","pageNext"],(function(r){var i=null!=t[r+"DataIndex"];(r=n.childOfName(r))&&(r.setStyle("fill",i?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),r.cursor=i?"pointer":"default")})),n.childOfName("pageText")),i=e.get("pageFormatter"),o=null!=(o=t.pageIndex)?o+1:0,a=t.pageCount;r&&i&&r.setStyle("text",Xw.B(i)?i.replace("{current}",null==o?"":o+"").replace("{total}",null==a?"":a+""):i({current:o,total:a}))},fq.prototype._getPageInfo=function(e){var t=e.get("scrollDataIndex",!0),n=this.getContentGroup(),r=this._containerGroup.__rectSize,i=(e=e.getOrient().index,lq[e]),o=hq[e],a=(t=this._findTargetItemIndex(t),n.children()),s=a[t],u=a.length,c=u?1:0,l={contentPosition:[n.x,n.y],pageCount:c,pageIndex:c-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(s){n=m(s),l.contentPosition[e]=-n.s;for(var h=t+1,f=n,d=n,p=null;h<=u;++h)(!(p=m(a[h]))&&d.e>f.s+r||p&&!g(p,f.s))&&(f=d.i>f.i?d:p)&&(null==l.pageNextDataIndex&&(l.pageNextDataIndex=f.i),++l.pageCount),d=p;for(h=t-1,f=n,d=n,p=null;-1<=h;--h)(p=m(a[h]))&&g(d,p.s)||!(f.i<d.i)||(d=f,null==l.pagePrevDataIndex&&(l.pagePrevDataIndex=f.i),++l.pageCount,++l.pageIndex),f=p}return l;function m(e){var t,n;if(e)return{s:n=(t=e.getBoundingRect())[o]+e[o],e:n+t[i],i:e.__legendDataIndex}}function g(e,t){return e.e>=t&&e.s<=t+r}},fq.prototype._findTargetItemIndex=function(e){var t,n;return this._showController?(this.getContentGroup().eachChild((function(r,i){r=r.__legendDataIndex,null==n&&null!=r&&(n=i),r===e&&(t=i)})),null!=t?t:n):0},fq.type="legend.scroll";var dq=fq;function pq(e){MP(iq),e.registerComponentModel(uq),e.registerComponentView(dq),e.registerAction("legendScroll","legendscroll",(function(e,t){var n=e.scrollDataIndex;null!=n&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},(function(e){e.setScrollDataIndex(n)}))}))}function mq(e,t){var n=e.label;t=t&&t.getTextGuideLine();return{dataIndex:e.dataIndex,dataType:e.dataType,seriesIndex:e.seriesModel.seriesIndex,text:e.label.style.text,rect:e.hostRect,labelRect:e.rect,align:n.style.align,verticalAlign:n.style.verticalAlign,labelLinePoints:function(e){if(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n].slice());return t}}(t&&t.shape.points)}}var gq=["align","verticalAlign","width","height","fontSize"],Aq=new Uk,vq=UE(),bq=UE();function yq(e,t,n){for(var r=0;r<n.length;r++){var i=n[r];null!=t[i]&&(e[i]=t[i])}}var wq=["x","y","rotation"];function xq(){this._labelList=[],this._chartViewList=[]}xq.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},xq.prototype._addLabel=function(e,t,n,r,i){var o,a=r.style,s=r.__hostTarget.textConfig||{},u=r.getComputedTransform(),c=r.getBoundingRect().plain(),l=((u=(Zx.applyTransform(c,c,u),u?Aq.setLocalTransform(u):(Aq.x=Aq.y=Aq.rotation=Aq.originX=Aq.originY=0,Aq.scaleX=Aq.scaleY=1),Aq.rotation=s_(Aq.rotation),r.__hostTarget))&&(o=u.getBoundingRect().plain(),l=u.getComputedTransform(),Zx.applyTransform(o,o,l)),o&&u.getTextGuideLine());this._labelList.push({label:r,labelLine:l,seriesModel:n,dataIndex:e,dataType:t,layoutOption:i,computedLayoutOption:null,rect:c,hostRect:o,priority:o?o.width*o.height:0,defaultAttr:{ignore:r.ignore,labelGuideIgnore:l&&l.ignore,x:Aq.x,y:Aq.y,scaleX:Aq.scaleX,scaleY:Aq.scaleY,rotation:Aq.rotation,style:{x:a.x,y:a.y,align:a.align,verticalAlign:a.verticalAlign,width:a.width,height:a.height,fontSize:a.fontSize},cursor:r.cursor,attachedPos:s.position,attachedRot:s.rotation}})},xq.prototype.addLabelsOfSeries=function(e){var t=this,n=(this._chartViewList.push(e),e.__model),r=n.get("labelLayout");(Object(Xw.v)(r)||Object(Xw.E)(r).length)&&e.group.traverse((function(e){if(e.ignore)return!0;var i=e.getTextContent();e=rO(e);i&&!i.disableLabelLayout&&t._addLabel(e.dataIndex,e.dataType,n,i,r)}))},xq.prototype.updateLayoutConfig=function(e){for(var t=e.getWidth(),n=e.getHeight(),r=0;r<this._labelList.length;r++){var i=this._labelList[r],o=i.label,a=o.__hostTarget,s=i.defaultAttr,u=void 0,c=(u=Object(Xw.v)(i.layoutOption)?i.layoutOption(mq(i,a)):i.layoutOption,i.computedLayoutOption=u=u||{},Math.PI/180),l=(a&&a.setTextConfig({local:!1,position:null!=u.x||null!=u.y?null:s.attachedPos,rotation:null!=u.rotate?u.rotate*c:s.attachedRot,offset:[u.dx||0,u.dy||0]}),!1);null!=u.x?(o.x=gE(u.x,t),o.setStyle("x",0),l=!0):(o.x=s.x,o.setStyle("x",s.style.x)),null!=u.y?(o.y=gE(u.y,n),o.setStyle("y",0),l=!0):(o.y=s.y,o.setStyle("y",s.style.y)),!u.labelLinePoints||(h=a.getTextGuideLine())&&(h.setShape({points:u.labelLinePoints}),l=!1),vq(o).needsUpdateLabelLine=l,o.rotation=null!=u.rotate?u.rotate*c:s.rotation,o.scaleX=s.scaleX,o.scaleY=s.scaleY;for(var h,f=0;f<gq.length;f++){var d=gq[f];o.setStyle(d,(null!=u[d]?u:s.style)[d])}u.draggable?(o.draggable=!0,o.cursor="move",a&&(h=i.seriesModel,null!=i.dataIndex&&(h=i.seriesModel.getData(i.dataType).getItemModel(i.dataIndex)),o.on("drag",function(e,t){return function(){mz(e,t)}}(a,h.getModel("labelLine"))))):(o.off("drag"),o.cursor=s.cursor)}},xq.prototype.layout=function(e){var t=e.getWidth(),n=(e=e.getHeight(),Cz(this._labelList)),r=Object(Xw.n)(n,(function(e){return"shiftX"===e.layoutOption.moveOverlap})),i=Object(Xw.n)(n,(function(e){return"shiftY"===e.layoutOption.moveOverlap}));kz(r,"x","width",0,t,void 0),Ez(i,0,e),Sz(Object(Xw.n)(n,(function(e){return e.layoutOption.hideOverlap})))},xq.prototype.processLabelsOverall=function(){var e=this;Object(Xw.k)(this._chartViewList,(function(t){var n=t.__model,r=t.ignoreLabelLineUpdate,i=n.isAnimationEnabled();t.group.traverse((function(t){if(t.ignore&&!t.forceLabelAnimation)return!0;var o=!r,a=t.getTextContent();(o=!o&&a?vq(a).needsUpdateLabelLine:o)&&e._updateLabelLine(t,n),i&&e._animateLabels(t,n)}))}))},xq.prototype._updateLabelLine=function(e,t){var n=e.getTextContent(),r=rO(e),i=r.dataIndex;n&&null!=i&&(t=(n=t.getData(r.dataType)).getItemModel(i),r={},(i=n.getItemVisual(i,"style"))&&(n=n.getVisual("drawType"),r.stroke=i[n]),i=t.getModel("labelLine"),wz(e,xz(t),r),mz(e,i))},xq.prototype._animateLabels=function(e,t){var n,r,i,o,a,s=e.getTextContent(),u=e.getTextGuideLine();!s||!e.forceLabelAnimation&&(s.ignore||s.invisible||e.disableLabelAnimation||rT(e))||(o=(i=vq(s)).oldLayout,n=(r=rO(e)).dataIndex,a={x:s.x,y:s.y,rotation:s.rotation},r=t.getData(r.dataType),o?(s.attr(o),(e=e.prevStates)&&(0<=Object(Xw.q)(e,"select")&&s.attr(i.oldLayoutSelect),0<=Object(Xw.q)(e,"emphasis")&&s.attr(i.oldLayoutEmphasis)),tT(s,a,t,n)):(s.attr(a),bT(s).valueAnimation||(e=Object(Xw.N)(s.style.opacity,1),s.style.opacity=0,nT(s,{style:{opacity:e}},t,n))),i.oldLayout=a,s.states.select&&(yq(e=i.oldLayoutSelect={},a,wq),yq(e,s.states.select,wq)),s.states.emphasis&&(yq(e=i.oldLayoutEmphasis={},a,wq),yq(e,s.states.emphasis,wq)),function(e,t,n,r,i){var o,a,s,u=bT(e);u.valueAnimation&&u.prevValue!==u.value&&(o=u.defaultInterpolatedText,a=Object(Xw.N)(u.interpolatedValue,u.prevValue),s=u.value,e.percent=0,(null==u.prevValue?nT:tT)(e,{percent:1},r,t,null,(function(r){var c=GE(n,u.precision,a,s,r);u.interpolatedValue=1===r?null:c,r=lT({labelDataIndex:t,labelFetcher:i,defaultText:o?o(c):c+""},u.statesModels,c);cT(e,r)})))}(s,n,r,t,t)),!u||u.ignore||u.invisible||(o=(i=bq(u)).oldLayout,a={points:u.shape.points},o?(u.attr({shape:o}),tT(u,{shape:a},t)):(u.setShape(a),u.style.strokePercent=0,nT(u,{style:{strokePercent:1}},t)),i.oldLayout=a)};var Cq=xq,kq=UE(),Eq=i_.CMD;function Sq(e,t){return Math.abs(e-t)<1e-5}function _q(e){var t,n,r=e.data,i=e.len(),o=[],a=0,s=0,u=0,c=0;function l(e,n){t&&2<t.length&&o.push(t),t=[e,n]}function h(e,n,r,i){Sq(e,r)&&Sq(n,i)||t.push(e,n,r,i,r,i)}for(var f,d,p,m,g,A,v,b,y,w,x,C,k=0;k<i;){var E=r[k++],S=1===k;switch(S&&(u=a=r[k],c=s=r[k+1],E!==Eq.L&&E!==Eq.C&&E!==Eq.Q||(t=[u,c])),E){case Eq.M:a=u=r[k++],s=c=r[k++],l(u,c);break;case Eq.L:h(a,s,j=r[k++],N=r[k++]),a=j,s=N;break;case Eq.C:t.push(r[k++],r[k++],r[k++],r[k++],a=r[k++],s=r[k++]);break;case Eq.Q:j=r[k++],N=r[k++],B=r[k++],n=r[k++],t.push(a+2/3*(j-a),s+2/3*(N-s),B+2/3*(j-B),n+2/3*(N-n),B,n),a=B,s=n;break;case Eq.A:var _=r[k++],O=r[k++],T=r[k++],D=r[k++],B=r[k++],I=r[k++]+B,M=(k+=1,!r[k++]),j=Math.cos(B)*T+_,N=Math.sin(B)*D+O;S?l(u=j,c=N):h(a,s,j,N);a=Math.cos(I)*T+_,s=Math.sin(I)*D+O;for(var F=(M?-1:1)*Math.PI/2,R=B;M?I<R:R<I;R+=F){var P=M?Math.max(R+F,I):Math.min(R+F,I);f=R,P=P,d=_,p=O,m=T,g=D,A=A=void 0,A=Math.abs(P-f),A=4*Math.tan(A/4)/3,v=P<f?-1:1,b=Math.cos(f),f=Math.sin(f),w=(y=Math.cos(P))*m+d,x=(P=Math.sin(P))*g+p,C=m*A*v,A=g*A*v,t.push(b*m+d-C*f,f*g+p+A*b,w+C*P,x-A*y,w,x)}break;case Eq.R:u=a=r[k++],c=s=r[k++],j=u+r[k++],N=c+r[k++],l(j,c),h(j,c,j,N),h(j,N,u,N),h(u,N,u,c),h(u,c,j,c);break;case Eq.Z:t&&h(a,s,u,c),a=u,s=c}}return t&&2<t.length&&o.push(t),o}function Oq(e,t,n){for(var r=e[t],i=(e=e[1-t],t=Math.abs(r/e),Math.ceil(Math.sqrt(t*n))),o=Math.floor(n/i),a=(0===o&&(o=1,i=n),[]),s=0;s<i;s++)a.push(o);var u=n-i*o;if(0<u)for(s=0;s<u;s++)a[s%i]+=1;return a}function Tq(e,t,n){for(var r=e.r0,i=e.r,o=e.startAngle,a=e.endAngle,s=Math.abs(a-o),u=i-r,c=(a=s*i)>Math.abs(u),l=Oq([a,u],c?0:1,t),h=(c?s:u)/l.length,f=0;f<l.length;f++)for(var d=(c?u:s)/l[f],p=0;p<l[f];p++){var m={};c?(m.startAngle=o+h*f,m.endAngle=o+h*(f+1),m.r0=r+d*p,m.r=r+d*(p+1)):(m.startAngle=o+d*p,m.endAngle=o+d*(p+1),m.r0=r+h*f,m.r=r+h*(f+1)),m.clockwise=e.clockwise,m.cx=e.cx,m.cy=e.cy,n.push(m)}}function Dq(e,t){var n=e[e.length-1];n&&n[0]===t[0]&&n[1]===t[1]||e.push(t)}function Bq(e){var t=(i=(FS(e=e.points,t=[],i=[]),new Zx(t[0],t[1],i[0]-t[0],i[1]-t[1]))).width,n=i.height,r=i.x,i=i.y,o=new $x,a=new $x;return n<t?(o.x=a.x=r+t/2,o.y=i,a.y=i+n):(o.y=a.y=i+n/2,o.x=r,a.x=r+t),function(e,t,n){for(var r,i,o,a,s,u,c=e.length,l=[],h=0;h<c;h++){var f=e[h],d=e[(h+1)%c],p=(r=f[0],f=f[1],i=d[0],d=d[1],o=t.x,a=t.y,s=n.x,p=n.y,u=void 0,u=(s-=o)*(d-=f)-(i-=r)*(p-=a),Math.abs(u)<1e-6||(o=((r-o)*p-s*(f-a))/u)<0||1<o?null:new $x(o*i+r,o*d+f));p&&l.push({projPt:(s=p,a=t,u=n,i=void 0,i=new $x,$x.sub(i,u,a),i.normalize(),u=new $x,$x.sub(u,s,a),u.dot(i)),pt:p,idx:h})}if(l.length<2)return[{points:e},{points:e}];l.sort((function(e,t){return e.projPt-t.projPt}));var m=l[0],g=l[l.length-1],A=(g.idx<m.idx&&(A=m,m=g,g=A),[m.pt.x,m.pt.y]),v=[g.pt.x,g.pt.y],b=[A],y=[v];for(h=m.idx+1;h<=g.idx;h++)Dq(b,e[h].slice());for(Dq(b,v),Dq(b,A),h=g.idx+1;h<=m.idx+c;h++)Dq(y,e[h%c].slice());return Dq(y,A),Dq(y,v),[{points:b},{points:y}]}(e,o,a)}function Iq(e,t,n,r){var i;1===n?r.push(t):(i=Math.floor(n/2),t=e(t),Iq(e,t[0],i,r),Iq(e,t[1],n-i,r))}function Mq(e,t){var n,r=[],i=e.shape;switch(e.type){case"rect":for(var o=i,a=t,s=r,u=o.width,c=(y=o.height)<u,l=Oq([u,y],c?0:1,a),h=c?"width":"height",f=c?"height":"width",d=c?"x":"y",p=c?"y":"x",m=o[h]/l.length,g=0;g<l.length;g++)for(var A=o[f]/l[g],v=0;v<l[g];v++){var b={};b[d]=g*m,b[p]=v*A,b[h]=m,b[f]=A,b.x+=o.x,b.y+=o.y,s.push(b)}n=z_;break;case"sector":Tq(i,t,r),n=Bj;break;case"circle":Tq({r0:0,r:i.r,startAngle:0,endAngle:2*Math.PI,cx:i.cx,cy:i.cy},t,r),n=Bj;break;default:var y=(u=e.getComputedTransform())?Math.sqrt(Math.max(u[0]*u[0]+u[1]*u[1],u[2]*u[2]+u[3]*u[3])):1,w=Object(Xw.G)(function(e,t){var n=_q(e),r=[];t=t||1;for(var i=0;i<n.length;i++){var o=n[i],a=[],s=o[0],u=o[1];a.push(s,u);for(var c=2;c<o.length;){var l=o[c++],h=o[c++],f=o[c++],d=o[c++],p=o[c++],m=o[c++];!function e(t,n,r,i,o,a,s,u,c,l){var h,f,d,p,m,g,A,v,b;Sq(t,r)&&Sq(n,i)&&Sq(o,s)&&Sq(a,u)||(h=(h=2/l)*h,v=s-t,f=u-n,v/=A=Math.sqrt(v*v+f*f),f/=A,m=(A=o-s)*A+(g=a-u)*g,(b=(d=r-t)*d+(p=i-n)*p)<h&&m<h||(A=-v*A-f*g,b-(g=v*d+f*p)*g<h&&0<=g&&m-A*A<h&&0<=A))?c.push(s,u):(b=[],FC(t,r,o,s,.5,v=[]),FC(n,i,a,u,.5,b),e(v[0],b[0],v[1],b[1],v[2],b[2],v[3],b[3],c,l),e(v[4],b[4],v[5],b[5],v[6],b[6],v[7],b[7],c,l))}(s,u,l,h,f,d,p,m,a,t),s=p,u=m}r.push(a)}return r}(e.getUpdatedPathProxy(),y),(function(e){for(var t=e,n=[],r=0;r<t.length;)n.push([t[r++],t[r++]]);return n})),x=w.length;if(0===x)Iq(Bq,{points:w[0]},t,r);else if(x===t)for(var C=0;C<x;C++)r.push({points:w[C]});else{var k=0,E=Object(Xw.G)(w,(function(e){var t=[],n=(FS(e,t,n=[]),(n[1]-t[1])*(n[0]-t[0]));return k+=n,{poly:e,area:n}})),S=(E.sort((function(e,t){return t.area-e.area})),t);for(C=0;C<x;C++){var _=E[C];if(S<=0)break;var O=C===x-1?S:Math.ceil(_.area/k*t);O<0||(Iq(Bq,{points:_.poly},O,r),S-=O)}}n=Uj}if(!n){for(var T=e,D=t,B=[],I=0;I<D;I++)B.push(aj(T));return B}var M,j,N=[];for(C=0;C<r.length;C++){var F=new n;F.setShape(r[C]),M=e,(j=F).setStyle(M.style),j.z=M.z,j.z2=M.z2,j.zlevel=M.zlevel,N.push(F)}return N}function jq(e,t){for(var n=e.length,r=e[n-2],i=e[n-1],o=[],a=0;a<t.length;)o[a++]=r,o[a++]=i;return o}function Nq(e){for(var t=0,n=0,r=0,i=e.length,o=0,a=i-2;o<i;a=o,o+=2){var s=e[a],u=e[a+1],c=e[o],l=e[o+1],h=s*l-c*u;t+=h,n+=(s+c)*h,r+=(u+l)*h}return 0===t?[e[0]||0,e[1]||0]:[n/t/3,r/t/3,t]}function Fq(e){return e.__isCombineMorphing}var Rq="__mOriginal_";function Pq(e,t,n){var r=Rq+t,i=e[r]||e[t],o=(e[r]||(e[r]=e[t]),n.replace),a=n.after,s=n.before;e[t]=function(){var e,t=arguments;return s&&s.apply(this,t),e=(o||i).apply(this,t),a&&a.apply(this,t),e}}function Lq(e,t){var n=Rq+t;e[n]&&(e[t]=e[n],e[n]=null)}function Uq(e,t){for(var n=0;n<e.length;n++)for(var r=e[n],i=0;i<r.length;){var o=r[i],a=r[i+1];r[i++]=t[0]*o+t[2]*a+t[4],r[i++]=t[1]*o+t[3]*a+t[5]}}function zq(e,t){var n=e.getUpdatedPathProxy(),r=t.getUpdatedPathProxy(),i=(r=(n=function(e,t){for(var n,r,i=[],o=[],a=0;a<Math.max(e.length,t.length);a++){var s=e[a],u=t[a],c=void 0,l=void 0;s?u?(n=c=(r=function(e,t){var n=e.length;if(n===(s=t.length))return[e,t];for(var r=[],i=[],o=n<s?e:t,a=Math.min(n,s),s=Math.abs(s-n)/6,u=Math.ceil(s/((a-2)/6))+1,c=[o[0],o[1]],l=s,h=2;h<a;){var f=o[h-2],d=o[h-1],p=o[h++],m=o[h++],g=o[h++],A=o[h++],v=o[h++],b=o[h++];if(l<=0)c.push(p,m,g,A,v,b);else{for(var y=Math.min(l,u-1)+1,w=1;w<=y;w++){var x=w/y;FC(f,p,g,v,x,r),FC(d,m,A,b,x,i),c.push(r[1],i[1],r[2],i[2],f=r[3],d=i[3]),p=r[5],m=i[5],g=r[6],A=i[6]}l-=y-1}}return o===e?[c,t]:[e,c]}(s,u))[0],r=l=r[1]):(l=jq(r||s,s),c=s):(c=jq(n||u,u),l=u),i.push(c),o.push(l)}return[i,o]}(_q(n),_q(r)))[0],n=n[1],e=e.getComputedTransform(),t.getComputedTransform());e&&Uq(r,e),i&&Uq(n,i),Pq(t,"updateTransform",{replace:function(){this.transform=null}}),t.transform=null;var o=function(e,t,n,r){for(var i,o=[],a=0;a<e.length;a++){for(var s=e[a],u=t[a],c=Nq(s),l=Nq(u),h=(null==i&&(i=c[2]<0!=l[2]<0),[]),f=[],d=0,p=1/0,m=[],g=s.length,A=6*function(e,t,n,r){for(var i=(e.length-2)/6,o=1/0,a=0,s=e.length,u=s-2,c=0;c<i;c++){for(var l=6*c,h=0,f=0;f<s;f+=2){var d=e[p=0===f?l:(l+f-2)%u+2]-n[0],p=e[1+p]-n[1];h+=(d=t[f]-r[0]-d)*d+(p=t[f+1]-r[1]-p)*p}h<o&&(o=h,a=c)}return a}(s=i?function(e){for(var t=[],n=e.length,r=0;r<n;r+=2)t[r]=e[n-r-2],t[r+1]=e[n-r-1];return t}(s):s,u,c,l),v=g-2,b=0;b<v;b+=2){var y=(A+b)%v+2;h[b+2]=s[y]-c[0],h[b+3]=s[1+y]-c[1]}if(h[0]=s[A]-c[0],h[1]=s[1+A]-c[1],0<n)for(var w=r/n,x=-r/2;x<=r/2;x+=w){var C=Math.sin(x),k=Math.cos(x),E=0;for(b=0;b<s.length;b+=2){var S,_=h[b],O=h[b+1],T=(D=u[b]-l[0])*k-(S=u[b+1]-l[1])*C,D=D*C+S*k;E+=(S=(m[b]=T)-_)*S+(T=(m[b+1]=D)-O)*T}if(E<p){p=E,d=x;for(var B=0;B<m.length;B++)f[B]=m[B]}}else for(var I=0;I<g;I+=2)f[I]=u[I]-l[0],f[I+1]=u[I+1]-l[1];o.push({from:h,to:f,fromCp:c,toCp:l,rotation:-d})}return o}(r,n,10,Math.PI),a=[];Pq(t,"buildPath",{replace:function(e){for(var n=t.__morphT,r=1-n,i=[],s=0;s<o.length;s++){var u=(f=o[s]).from,c=f.to,l=f.rotation*n,h=f.fromCp,f=f.toCp,d=Math.sin(l),p=Math.cos(l);ax(i,h,f,n);for(var m=0;m<u.length;m+=2){var g=u[m],A=u[m+1];g=g*r+(y=c[m])*n,A=A*r+(w=c[m+1])*n;a[m]=g*p-A*d+i[0],a[m+1]=g*d+A*p+i[1]}var v=a[0],b=a[1];for(e.moveTo(v,b),m=2;m<u.length;){var y=a[m++],w=a[m++],x=a[m++],C=a[m++],k=a[m++],E=a[m++];v===y&&b===w&&x===k&&C===E?e.lineTo(k,E):e.bezierCurveTo(y,w,x,C,k,E),v=k,b=E}}}})}function Hq(e,t,n){var r,i;e&&t&&(r=n.done,i=n.during,zq(e,t),t.__morphT=0,t.animateTo({__morphT:1},Object(Xw.i)({during:function(e){t.dirtyShape(),i&&i(e)},done:function(){Lq(t,"buildPath"),Lq(t,"updateTransform"),t.__morphT=-1,t.createPathProxy(),t.dirtyShape(),r&&r()}},n)))}function $q(e){var t=1/0,n=1/0,r=-1/0,i=-1/0,o=Object(Xw.G)(e,(function(e){var o=e.getBoundingRect(),a=(e=e.getComputedTransform(),o.x+o.width/2+(e?e[4]:0));o=o.y+o.height/2+(e?e[5]:0);return t=Math.min(a,t),n=Math.min(o,n),r=Math.max(a,r),i=Math.max(o,i),[a,o]}));return Object(Xw.G)(o,(function(o,a){return{cp:o,z:function(e,t,n,r,i,o){e=i===n?0:Math.round(32767*(e-n)/(i-n)),t=o===r?0:Math.round(32767*(t-r)/(o-r));for(var a=0,s=32768;0<s;s/=2){var u=0,c=0;a+=s*s*(3*(u=0<(e&s)?1:u)^(c=0<(t&s)?1:c)),0===c&&(1===u&&(e=s-1-e,t=s-1-t),c=e,e=t,t=c)}return a}(o[0],o[1],t,n,r,i),path:e[a]}})).sort((function(e,t){return e.z-t.z})).map((function(e){return e.path}))}function Qq(e){return Mq(e.path,e.count)}function Vq(e,t,n){var r=[];!function e(t){for(var n=0;n<t.length;n++){var i=t[n];Fq(i)?e(i.childrenRef()):i instanceof C_&&r.push(i)}}(e);var i=r.length;if(!i)return{fromIndividuals:[],toIndividuals:[],count:0};var o=n.dividePath||Qq;if((a=o({path:t,count:i})).length!==i)return{fromIndividuals:[],toIndividuals:[],count:0};r=$q(r);for(var a=$q(a),s=n.done,u=n.during,c=n.individualDelay,l=new Uk,h=0;h<i;h++){var f=r[h],d=a[h];d.parent=t,d.copyTransform(l),c||zq(f,d)}function p(e){for(var t=0;t<a.length;t++)a[t].addSelfToZr(e)}function m(){t.__isCombineMorphing=!1,t.__morphT=-1,t.childrenRef=null,Lq(t,"addSelfToZr"),Lq(t,"removeSelfFromZr")}t.__isCombineMorphing=!0,t.childrenRef=function(){return a},Pq(t,"addSelfToZr",{after:function(e){p(e)}}),Pq(t,"removeSelfFromZr",{after:function(e){for(var t=0;t<a.length;t++)a[t].removeSelfFromZr(e)}});var g=a.length;if(c){var A=g,v=function(){0==--A&&(m(),s&&s())};for(h=0;h<g;h++){var b=c?Object(Xw.i)({delay:(n.delay||0)+c(h,g,r[h],a[h]),done:v},n):n;Hq(r[h],a[h],b)}}else t.__morphT=0,t.animateTo({__morphT:1},Object(Xw.i)({during:function(e){for(var n=0;n<g;n++){var r=a[n];r.__morphT=t.__morphT,r.dirtyShape()}u&&u(e)},done:function(){m();for(var t=0;t<e.length;t++)Lq(e[t],"updateTransform");s&&s()}},n));return t.__zr&&p(t.__zr),{fromIndividuals:r,toIndividuals:a,count:g}}function qq(e,t,n){var r=t.length,i=[],o=n.dividePath||Qq;if(Fq(e)){!function e(t){for(var n=0;n<t.length;n++){var r=t[n];Fq(r)?e(r.childrenRef()):r instanceof C_&&i.push(r)}}(e.childrenRef());var a=i.length;if(a<r)for(var s=0,u=a;u<r;u++)i.push(aj(i[s++%a]));i.length=r}else{i=o({path:e,count:r});var c=e.getComputedTransform();for(u=0;u<i.length;u++)i[u].setLocalTransform(c);if(i.length!==r)return{fromIndividuals:[],toIndividuals:[],count:0}}i=$q(i),t=$q(t);var l=n.individualDelay;for(u=0;u<r;u++){var h=l?Object(Xw.i)({delay:(n.delay||0)+l(u,r,i[u],t[u])},n):n;Hq(i[u],t[u],h)}return{fromIndividuals:i,toIndividuals:t,count:t.length}}function Gq(e){return Object(Xw.s)(e[0])}function Wq(e,t){for(var n=[],r=e.length,i=0;i<r;i++)n.push({one:e[i],many:[]});for(i=0;i<t.length;i++){var o=t[i].length,a=void 0;for(a=0;a<o;a++)n[a%r].many.push(t[i][a])}var s=0;for(i=r-1;0<=i;i--)if(!n[i].many.length){var u=n[s].many;if(u.length<=1){if(!s)return n;s=0}o=u.length;var c=Math.ceil(o/2);n[i].many=u.slice(c,o),n[s].many=u.slice(0,c),s++}return n}var Kq={clone:function(e){for(var t=[],n=1-Math.pow(1-e.path.style.opacity,1/e.count),r=0;r<e.count;r++){var i=aj(e.path);i.setStyle("opacity",n),t.push(i)}return t},split:null};function Yq(e,t,n,r,i,o){if(e.length&&t.length&&(i=ZO("update",r,i))&&0<i.duration){for(var a,s,u=r.getModel("universalTransition").get("delay"),c=Object.assign({setToFinal:!0},i),l=(Gq(e)&&(a=e,s=t),Gq(t)&&(a=t,s=e),a?a===e:e.length>t.length),h=a?Wq(s,a):Wq(l?t:e,[l?e:t]),f=0,d=0;d<h.length;d++)f+=h[d].many.length;var p=0;for(d=0;d<h.length;d++)!function e(t,r,i,a,s){var l=t.many,h=t.one;if(1!==l.length||s){s=Object(Xw.i)({dividePath:Kq[n],individualDelay:u&&function(e,t,n,r){return u(e+i,a)}},c);for(var f=(s=r?Vq(l,h,s):qq(h,l,s)).fromIndividuals,d=s.toIndividuals,p=f.length,m=0;m<p;m++)g=u?Object(Xw.i)({delay:u(m,p)},c):c,o(f[m],d[m],r?l[m]:t.one,r?t.one:l[m],g)}else{var g;s=r?l[0]:h,h=r?h:l[0];Fq(s)?e({many:[s],one:h},!0,i,a,!0):(Hq(s,h,g=u?Object(Xw.i)({delay:u(i,a)},c):c),o(s,h,s,h,g))}}(h[d],l,p,f),p+=h[d].many.length}}function Xq(e){if(!e)return[];if(Object(Xw.s)(e)){for(var t=[],n=0;n<e.length;n++)t.push(Xq(e[n]));return t}var r=[];return e.traverse((function(e){e instanceof C_&&!e.disableMorphing&&!e.invisible&&!e.ignore&&r.push(e)})),r}var Jq,Zq=UE();function eG(e){var t=[];return Object(Xw.k)(e,(function(e){var n=e.data;if(!(n.count()>1e4))for(var r=n.getIndices(),i=function(e){for(var t=e.dimensions,n=0;n<t.length;n++){var r=e.getDimensionInfo(t[n]);if(r&&0===r.otherDims.itemGroupId)return t[n]}}(n),o=0;o<r.length;o++)t.push({dataGroupId:e.dataGroupId,data:n,dim:e.dim||i,divide:e.divide,dataIndex:o})})),t}function tG(e,t,n){e.traverse((function(e){e instanceof C_&&nT(e,{style:{opacity:0}},t,{dataIndex:n,isFrom:!0})}))}function nG(e){var t;e.parent&&(t=e.getComputedTransform(),e.setLocalTransform(t),e.parent.remove(e))}function rG(e){e.stopAnimation(),e.isGroup&&e.traverse((function(e){e.stopAnimation()}))}function iG(e,t,n){var r=eG(e),i=eG(t);function o(e,t,n,r,i){(n||e)&&t.animateFrom({style:n&&n!==e?Object(Xw.m)(Object(Xw.m)({},n.style),e.style):e.style},i)}function a(e){for(var t=0;t<e.length;t++)if(e[t].dim)return e[t].dim}var s=a(r),u=a(i),c=!1;function l(e,t){return function(n){var r,i,o=n.data,a=n.dataIndex;return t?o.getId(a):(n=n.dataGroupId,i=(r=(r=e?s||u:u||s)&&o.getDimensionInfo(r))&&r.ordinalMeta,r?(r=o.get(r.name,a),i&&i.categories[r]||r+""):(i=o.getRawDataItem(a))&&i.groupId?i.groupId+"":n||o.getId(a))}}e=function(e,t){var n=e.length;if(n!==t.length)return!1;for(var r=0;r<n;r++){var i=e[r],o=t[r];if(i.data.getId(i.dataIndex)!==o.data.getId(o.dataIndex))return!1}return!0}(r,i);var h={};if(!e)for(var f=0;f<i.length;f++){var d;(d=(d=i[f]).data.getItemGraphicEl(d.dataIndex))&&(h[d.id]=!0)}function p(e,t){t=r[t];var n=i[e],a=n.data.hostModel,s=(t=t.data.getItemGraphicEl(t.dataIndex),n.data.getItemGraphicEl(n.dataIndex));t===s?s&&function(e,t,n){var r=ZO("update",n,t);r&&e.traverse((function(e){var t;e instanceof _S&&(t=JO(e).oldStyle)&&e.animateFrom({style:t},r)}))}(s,n.dataIndex,a):t&&h[t.id]||s&&(rG(s),t?(rG(t),nG(t),c=!0,Yq(Xq(t),Xq(s),n.divide,a,e,o)):tG(s,a,e))}new iL(r,i,l(!0,e),l(!1,e),null,"multiple").update(p).updateManyToOne((function(e,t){var n=i[e],a=(u=n.data).hostModel,s=u.getItemGraphicEl(n.dataIndex),u=Object(Xw.n)(Object(Xw.G)(t,(function(e){return r[e].data.getItemGraphicEl(r[e].dataIndex)})),(function(e){return e&&e!==s&&!h[e.id]}));s&&(rG(s),u.length?(Object(Xw.k)(u,(function(e){rG(e),nG(e)})),c=!0,Yq(Xq(u),Xq(s),n.divide,a,e,o)):tG(s,a,n.dataIndex))})).updateOneToMany((function(e,t){var n,a,s=(t=r[t]).data.getItemGraphicEl(t.dataIndex);s&&h[s.id]||(n=Object(Xw.n)(Object(Xw.G)(e,(function(e){return i[e].data.getItemGraphicEl(i[e].dataIndex)})),(function(e){return e&&e!==s})),a=i[e[0]].data.hostModel,n.length&&(Object(Xw.k)(n,rG),s?(rG(s),nG(s),c=!0,Yq(Xq(s),Xq(n),t.divide,a,e[0],o)):Object(Xw.k)(n,(function(t){return tG(t,a,e[0])}))))})).updateManyToMany((function(e,t){new iL(t,e,(function(e){return r[e].data.getId(r[e].dataIndex)}),(function(e){return i[e].data.getId(i[e].dataIndex)})).update((function(n,r){p(e[n],t[r])})).execute()})).execute(),c&&Object(Xw.k)(t,(function(e){var t=(e=e.data.hostModel)&&n.getViewOfSeriesModel(e),r=ZO("update",e,0);t&&e.isAnimationEnabled()&&r&&0<r.duration&&t.group.traverse((function(e){e instanceof C_&&!e.animators.length&&e.animateFrom({style:{opacity:0}},r)}))}))}function oG(e){return e.getModel("universalTransition").get("seriesKey")||e.id}function aG(e){return Object(Xw.s)(e)?e.sort().join(","):e}function sG(e){if(e.hostModel)return e.hostModel.getModel("universalTransition").get("divideShape")}function uG(e,t){for(var n=0;n<e.length;n++)if(null!=t.seriesIndex&&t.seriesIndex===e[n].seriesIndex||null!=t.seriesId&&t.seriesId===e[n].id)return n}function cG(e,t,n){var r=Hk.c.createCanvas(),i=t.getWidth(),o=(t=t.getHeight(),r.style);return o&&(o.position="absolute",o.left="0",o.top="0",o.width=i+"px",o.height=t+"px",r.setAttribute("data-zr-dom-id",e)),r.width=i*n,r.height=t*n,r}function lG(e,t,n){var r,i=Jq.call(this)||this;return(e=(i.motionBlur=!1,i.lastFrameAlpha=.7,i.dpr=1,i.virtual=!1,i.config={},i.incremental=!1,i.zlevel=0,i.maxRepaintRectCount=5,i.__dirty=!0,i.__firstTimePaint=!0,i.__used=!1,i.__drawIndex=0,i.__startIndex=0,i.__endIndex=0,i.__prevStartIndex=null,i.__prevEndIndex=null,n=n||Bk,"string"==typeof e?r=cG(e,t,n):Xw.z(e)&&(e=(r=e).id),i.id=e,(i.dom=r).style))&&(Xw.j(r),r.onselectstart=function(){return!1},e.padding="0",e.margin="0",e.borderWidth="0"),i.painter=t,i.dpr=n,i}Zw(lG,Jq=px),lG.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},lG.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},lG.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},lG.prototype.setUnpainted=function(){this.__firstTimePaint=!0},lG.prototype.createBackBuffer=function(){var e=this.dpr;this.domBack=cG("back-"+this.id,this.painter,e),this.ctxBack=this.domBack.getContext("2d"),1!==e&&this.ctxBack.scale(e,e)},lG.prototype.createRepaintRects=function(e,t,n,r){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var i=[],o=this.maxRepaintRectCount,a=!1,s=new Zx(0,0,0,0);function u(e){if(e.isFinite()&&!e.isZero())if(0===i.length)(t=new Zx(0,0,0,0)).copy(e),i.push(t);else{for(var t,n=!1,r=1/0,u=0,c=0;c<i.length;++c){var l=i[c];if(l.intersect(e)){var h=new Zx(0,0,0,0);h.copy(l),h.union(e),i[c]=h,n=!0;break}a&&(s.copy(e),s.union(l),h=e.width*e.height,l=l.width*l.height,(l=s.width*s.height-h-l)<r&&(r=l,u=c))}a&&(i[u].union(e),n=!0),n||((t=new Zx(0,0,0,0)).copy(e),i.push(t)),a=a||i.length>=o}}for(var c,l=this.__startIndex;l<this.__endIndex;++l)(h=e[l])&&(d=h.shouldBePainted(n,r,!0,!0),(f=h.__isRendered&&(1&h.__dirty||!d)?h.getPrevPaintRect():null)&&u(f),(c=d&&(1&h.__dirty||!h.__isRendered)?h.getPaintRect():null)&&u(c));for(l=this.__prevStartIndex;l<this.__prevEndIndex;++l){var h,f,d=(h=t[l]).shouldBePainted(n,r,!0,!0);!h||d&&h.__zr||!h.__isRendered||(f=h.getPrevPaintRect())&&u(f)}do{var p=!1;for(l=0;l<i.length;)if(i[l].isZero())i.splice(l,1);else{for(var m=l+1;m<i.length;)i[l].intersect(i[m])?(p=!0,i[l].union(i[m]),i.splice(m,1)):m++;l++}}while(p);return this._paintRects=i},lG.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},lG.prototype.resize=function(e,t){var n=this.dpr,r=this.dom,i=r.style,o=this.domBack;i&&(i.width=e+"px",i.height=t+"px"),r.width=e*n,r.height=t*n,o&&(o.width=e*n,o.height=t*n,1!==n&&this.ctxBack.scale(n,n))},lG.prototype.clear=function(e,t,n){var r=this.dom,i=this.ctx,o=r.width,a=r.height,s=(t=t||this.clearColor,this.motionBlur&&!e),u=this.lastFrameAlpha,c=this.dpr,l=this,h=(s&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(r,0,0,o/c,a/c)),this.domBack);function f(e,n,r,o){var a;i.clearRect(e,n,r,o),t&&"transparent"!==t&&(a=void 0,Xw.w(t)?(a=(t.global||t.__width===r&&t.__height===o)&&t.__canvasGradient||eR(i,t,{x:0,y:0,width:r,height:o}),t.__canvasGradient=a,t.__width=r,t.__height=o):Xw.x(t)&&(t.scaleX=t.scaleX||c,t.scaleY=t.scaleY||c,a=lR(i,t,{dirty:function(){l.setUnpainted(),l.__painter.refresh()}})),i.save(),i.fillStyle=a||t,i.fillRect(e,n,r,o),i.restore()),s&&(i.save(),i.globalAlpha=u,i.drawImage(h,e,n,r,o),i.restore())}!n||s?f(0,0,o,a):n.length&&Xw.k(n,(function(e){f(e.x*c,e.y*c,e.width*c,e.height*c)}))};var hG=lG,fG=314159;function dG(e,t,n,r){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var i=!e.nodeName||"CANVAS"===e.nodeName.toUpperCase();this._opts=n=Xw.m({},n||{}),this.dpr=n.devicePixelRatio||Bk,this._singleCanvas=i,(this.root=e).style&&(Xw.j(e),e.innerHTML=""),this.storage=t;t=this._zlevelList;var o,a,s=(this._prevDisplayList=[],this._layers);i?(o=(i=e).width,a=i.height,null!=n.width&&(o=n.width),null!=n.height&&(a=n.height),this.dpr=n.devicePixelRatio||1,i.width=o*this.dpr,i.height=a*this.dpr,this._width=o,this._height=a,(o=new hG(i,this,this.dpr)).__builtin__=!0,o.initContext(),(s[fG]=o).zlevel=fG,t.push(fG),this._domRoot=e):(this._width=nR(e,0,n),this._height=nR(e,1,n),o=this._domRoot=(a=this._width,i=this._height,(s=document.createElement("div")).style.cssText=["position:relative","width:"+a+"px","height:"+i+"px","padding:0","margin:0","border-width:0"].join(";")+";",s),e.appendChild(o))}dG.prototype.getType=function(){return"canvas"},dG.prototype.isSingleCanvas=function(){return this._singleCanvas},dG.prototype.getViewportRoot=function(){return this._domRoot},dG.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},dG.prototype.refresh=function(e){var t=this.storage.getDisplayList(!0),n=this._prevDisplayList,r=this._zlevelList;this._redrawId=Math.random(),this._paintList(t,n,e,this._redrawId);for(var i=0;i<r.length;i++){var o,a=r[i];!(a=this._layers[a]).__builtin__&&a.refresh&&(o=0===i?this._backgroundColor:null,a.refresh(o))}return this._opts.useDirtyRect&&(this._prevDisplayList=t.slice()),this},dG.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},dG.prototype._paintHoverList=function(e){var t=e.length,n=this._hoverlayer;if(n&&n.clear(),t){for(var r,i={inHover:!0,viewWidth:this._width,viewHeight:this._height},o=0;o<t;o++){var a=e[o];a.__inHover&&(n=n||(this._hoverlayer=this.getLayer(1e5)),r||(r=n.ctx).save(),bR(r,a,i,o===t-1))}r&&r.restore()}},dG.prototype.getHoverLayer=function(){return this.getLayer(1e5)},dG.prototype.paintOne=function(e,t){vR(e,t)},dG.prototype._paintList=function(e,t,n,r){var i,o,a;this._redrawId===r&&(n=n||!1,this._updateLayerStatus(e),i=(o=this._doPaintList(e,t,n)).finished,o=o.needsRefreshHover,this._needsManuallyCompositing&&this._compositeManually(),o&&this._paintHoverList(e),i?this.eachLayer((function(e){e.afterBrush&&e.afterBrush()})):(a=this,wC((function(){a._paintList(e,t,n,r)}))))},dG.prototype._compositeManually=function(){var e=this.getLayer(fG).ctx,t=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,t,n),this.eachBuiltinLayer((function(r){r.virtual&&e.drawImage(r.dom,0,0,t,n)}))},dG.prototype._doPaintList=function(e,t,n){for(var r=this,i=[],o=this._opts.useDirtyRect,a=0;a<this._zlevelList.length;a++){var s=this._zlevelList[a];(s=this._layers[s]).__builtin__&&s!==this._hoverlayer&&(s.__dirty||n)&&i.push(s)}for(var u=!0,c=!1,l=function(a){function s(t){var n={inHover:!1,allClipped:!1,prevEl:null,viewWidth:r._width,viewHeight:r._height};for(f=g;f<d.__endIndex;f++){var i=e[f];if(i.__inHover&&(c=!0),r._doPaintEl(i,d,o,t,n,f===d.__endIndex-1),A&&15<Date.now()-v)break}n.prevElClipPaths&&p.restore()}var l,f,d=i[a],p=d.ctx,m=o&&d.createRepaintRects(e,t,h._width,h._height),g=n?d.__startIndex:d.__drawIndex,A=!n&&d.incremental&&Date.now,v=A&&Date.now();a=d.zlevel===h._zlevelList[0]?h._backgroundColor:null;if(d.__startIndex!==d.__endIndex&&(g!==d.__startIndex||(l=e[g]).incremental&&l.notClear&&!n)||d.clear(!1,a,m),-1===g&&(g=d.__startIndex),m)if(0===m.length)f=d.__endIndex;else for(var b=h.dpr,y=0;y<m.length;++y){var w=m[y];p.save(),p.beginPath(),p.rect(w.x*b,w.y*b,w.width*b,w.height*b),p.clip(),s(w),p.restore()}else p.save(),s(),p.restore();d.__drawIndex=f,d.__drawIndex<d.__endIndex&&(u=!1)},h=this,f=0;f<i.length;f++)l(f);return Yw.a.wxa&&Xw.k(this._layers,(function(e){e&&e.ctx&&e.ctx.draw&&e.ctx.draw()})),{finished:u,needsRefreshHover:c}},dG.prototype._doPaintEl=function(e,t,n,r,i,o){t=t.ctx,n?(n=e.getPaintRect(),(!r||n&&n.intersect(r))&&(bR(t,e,i,o),e.setPrevPaintRect(n))):bR(t,e,i,o)},dG.prototype.getLayer=function(e,t){this._singleCanvas&&!this._needsManuallyCompositing&&(e=fG);var n=this._layers[e];return n||((n=new hG("zr_"+e,this,this.dpr)).zlevel=e,n.__builtin__=!0,this._layerConfig[e]?Xw.H(n,this._layerConfig[e],!0):this._layerConfig[e-.01]&&Xw.H(n,this._layerConfig[e-.01],!0),t&&(n.virtual=t),this.insertLayer(e,n),n.initContext()),n},dG.prototype.insertLayer=function(e,t){var n,r=this._layers,i=this._zlevelList,o=i.length,a=this._domRoot,s=null,u=-1;if(!r[e]&&(n=t)&&(n.__builtin__||"function"==typeof n.resize&&"function"==typeof n.refresh)){if(0<o&&e>i[0]){for(u=0;u<o-1&&!(i[u]<e&&i[u+1]>e);u++);s=r[i[u]]}i.splice(u+1,0,e),(r[e]=t).virtual||(s?(n=s.dom).nextSibling?a.insertBefore(t.dom,n.nextSibling):a.appendChild(t.dom):a.firstChild?a.insertBefore(t.dom,a.firstChild):a.appendChild(t.dom)),t.__painter=this}},dG.prototype.eachLayer=function(e,t){for(var n=this._zlevelList,r=0;r<n.length;r++){var i=n[r];e.call(t,this._layers[i],i)}},dG.prototype.eachBuiltinLayer=function(e,t){for(var n=this._zlevelList,r=0;r<n.length;r++){var i=n[r],o=this._layers[i];o.__builtin__&&e.call(t,o,i)}},dG.prototype.eachOtherLayer=function(e,t){for(var n=this._zlevelList,r=0;r<n.length;r++){var i=n[r],o=this._layers[i];o.__builtin__||e.call(t,o,i)}},dG.prototype.getLayers=function(){return this._layers},dG.prototype._updateLayerStatus=function(e){function t(e){i&&(i.__endIndex!==e&&(i.__dirty=!0),i.__endIndex=e)}if(this.eachBuiltinLayer((function(e,t){e.__dirty=e.__used=!1})),this._singleCanvas)for(var n=1;n<e.length;n++)if((s=e[n]).zlevel!==e[n-1].zlevel||s.incremental){this._needsManuallyCompositing=!0;break}for(var r,i=null,o=0,a=0;a<e.length;a++){var s,u=(s=e[a]).zlevel,c=void 0;r!==u&&(r=u,o=0),s.incremental?((c=this.getLayer(u+.001,this._needsManuallyCompositing)).incremental=!0,o=1):c=this.getLayer(u+(0<o?.01:0),this._needsManuallyCompositing),c.__builtin__||Xw.F("ZLevel "+u+" has been used by unkown layer "+c.id),c!==i&&(c.__used=!0,c.__startIndex!==a&&(c.__dirty=!0),c.__startIndex=a,c.incremental?c.__drawIndex=-1:c.__drawIndex=a,t(a),i=c),1&s.__dirty&&!s.__inHover&&(c.__dirty=!0,c.incremental&&c.__drawIndex<0&&(c.__drawIndex=a))}t(a),this.eachBuiltinLayer((function(e,t){!e.__used&&0<e.getElementCount()&&(e.__dirty=!0,e.__startIndex=e.__endIndex=e.__drawIndex=0),e.__dirty&&e.__drawIndex<0&&(e.__drawIndex=e.__startIndex)}))},dG.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},dG.prototype._clearLayer=function(e){e.clear()},dG.prototype.setBackgroundColor=function(e){this._backgroundColor=e,Xw.k(this._layers,(function(e){e.setUnpainted()}))},dG.prototype.configLayer=function(e,t){if(t){var n=this._layerConfig;n[e]?Xw.H(n[e],t,!0):n[e]=t;for(var r=0;r<this._zlevelList.length;r++){var i=this._zlevelList[r];i!==e&&i!==e+.01||(i=this._layers[i],Xw.H(i,n[e],!0))}}},dG.prototype.delLayer=function(e){var t=this._layers,n=this._zlevelList,r=t[e];r&&(r.dom.parentNode.removeChild(r.dom),delete t[e],n.splice(Xw.q(n,e),1))},dG.prototype.resize=function(e,t){if(this._domRoot.style){var n=this._domRoot,r=(n.style.display="none",this._opts),i=this.root;if(null!=e&&(r.width=e),null!=t&&(r.height=t),e=nR(i,0,r),t=nR(i,1,r),n.style.display="",this._width!==e||t!==this._height){for(var o in n.style.width=e+"px",n.style.height=t+"px",this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(e,t);this.refresh(!0)}this._width=e,this._height=t}else{if(null==e||null==t)return;this._width=e,this._height=t,this.getLayer(fG).resize(e,t)}return this},dG.prototype.clearLayer=function(e){(e=this._layers[e])&&e.clear()},dG.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},dG.prototype.getRenderedCanvas=function(e){if(this._singleCanvas&&!this._compositeManually)return this._layers[fG].dom;var t=new hG("image",this,(e=e||{}).pixelRatio||this.dpr),n=(t.initContext(),t.clear(!1,e.backgroundColor||this._backgroundColor),t.ctx);if(e.pixelRatio<=this.dpr){this.refresh();var r=t.dom.width,i=t.dom.height;this.eachLayer((function(e){e.__builtin__?n.drawImage(e.dom,0,0,r,i):e.renderToCanvas&&(n.save(),e.renderToCanvas(n),n.restore())}))}else for(var o={inHover:!1,viewWidth:this._width,viewHeight:this._height},a=this.storage.getDisplayList(!0),s=0,u=a.length;s<u;s++){var c=a[s];bR(n,c,o,s===u-1)}return t.dom},dG.prototype.getWidth=function(){return this._width},dG.prototype.getHeight=function(){return this._height};var pG=dG;function mG(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}n(385);var gG=function(){function e(t,n){var r=2<arguments.length&&void 0!==arguments[2]&&arguments[2],i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{},o=4<arguments.length&&void 0!==arguments[4]?arguments[4]:null,a=5<arguments.length&&void 0!==arguments[5]?arguments[5]:null,s=6<arguments.length&&void 0!==arguments[6]?arguments[6]:function(){},u=this,c=e;if(!(u instanceof c))throw new TypeError("Cannot call a class as a function");this.name=t,this.value=n,this.style=i,this.renderFn=o,this.changeFn=s,this.el=this.init(),this.checked=r,this.checkClassName="is-checked",this.render(),a&&this.initLabelStyle(a),this.checked?this.check():this.cancelCheck()}var t,n;return t=e,(n=[{key:"init",value:function(){var e=this,t=this,n=s("span","".concat(pe,"-checkbox__label")).innerHTML(t.name),r=s("label","".concat(pe,"-checkbox")).css(this.style).children(s("span","".concat(pe,"-checkbox__input")).children(s("span","".concat(pe,"-checkbox__inner")).on("click",(function(n){t.isCheck()?t.cancelCheck():t.check(),e.changeFn(e.checked)})),s("input","".concat(pe,"-checkbox__original")).attr({name:t.name,value:t.value,type:"checkbox"})),n);return this.renderFn||n.on("click",(function(n){t.isCheck()?t.cancelCheck():t.check(),e.changeFn(e.checked)})),r}},{key:"initLabelStyle",value:function(e){ve()(this.el.el).find(".".concat(pe,"-checkbox__label")).css(e)}},{key:"render",value:function(){var e,t;this.renderFn&&(e=this.renderFn(),(t=ve()(this.el.el).find(".".concat(pe,"-checkbox__label"))).length&&(t[0].innerHTML="",t.append(e.el)))}},{key:"setCheck",value:function(e){e?this.check():this.cancelCheck()}},{key:"cancelCheck",value:function(){var e=this.el.el;ve()(e).removeClass(this.checkClassName),ve()(e).find(".".concat(pe,"-checkbox__input")).removeClass(this.checkClassName),this.checked=!1}},{key:"check",value:function(){var e=this.el.el;ve()(e).addClass(this.checkClassName),ve()(e).find(".".concat(pe,"-checkbox__input")).addClass(this.checkClassName),this.checked=!0}},{key:"isCheck",value:function(){var e=this.el.el;return!!ve()(e).attr("class").includes(this.checkClassName)}}])&&mG(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function AG(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function vG(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var bG=function(){function e(t){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],r=2<arguments.length?arguments[2]:void 0,i=this,o=e;if(!(i instanceof o))throw new TypeError("Cannot call a class as a function");this.columns=this.createColumns(n),this.cvalue=t,this.$parent=r,this.el=null,this.childCheckEl=[],this.checkBoxAllEl=null,this.init(),this.initColumns(),this.hide()}var t,n;return t=e,(n=[{key:"createColumns",value:function(e){var t=[];return e.forEach((function(e){t.push({label:e,value:!0})})),t}},{key:"init",value:function(){var e=this,t=s("div","".concat(pe,"-filter_drop-main"));this.el=t,this.checkBoxEl=s("div","check-list-main"),this.canelButtonEl=s("button","".concat(pe,"-dialog_button el-button-default")).children(s("span","").innerHTML("取消")).on("click",(function(e){setTimeout((function(){t.hide()}))})),this.confirmButtonEl=s("button","".concat(pe,"-dialog_button el-button-primary")).children(s("span","").innerHTML("确认")).on("click",(function(n){setTimeout((function(){e.$parent.filterByCondition(),t.hide()}))})),this.el.children(s("div","columns_main").children(this.checkBoxEl),s("div","footer").children(this.confirmButtonEl.el,this.canelButtonEl.el))}},{key:"initColumns",value:function(){var e=this,t=(this.checkBoxEl.innerHTML(""),this.childCheckEl=[],new gG("全选",!1,!0,{},null,null,(function(t){e.childCheckEl.forEach((function(e){e.setCheck(t)})),e.columns.forEach((function(e){e.value=t}))})));this.checkBoxEl.children(t.el),this.checkBoxAllEl=t,this.columns.forEach((function(t){e.createColumnsEl(t)}))}},{key:"isCheckAll",value:function(){var e,t=!0,n=function(e,t){var n,r,i,o,a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(a)return r=!(n=!0),{s:function(){a=a.call(e)},n:function(){var e=a.next();return n=e.done,e},e:function(e){r=!0,i=e},f:function(){try{n||null==a.return||a.return()}finally{if(r)throw i}}};if(Array.isArray(e)||(a=function(e,t){var n;if(e)return"string"==typeof e?AG(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?AG(e,t):void 0}(e))||t&&e&&"number"==typeof e.length)return a&&(e=a),o=0,{s:t=function(){},n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(this.columns);try{for(n.s();!(e=n.n()).done;)if(!e.value.value){t=!1;break}}catch(e){n.e(e)}finally{n.f()}this.checkBoxAllEl.setCheck(t)}},{key:"createColumnsEl",value:function(e){var t=this,n=new gG(e.label,!0,e.value,{},null,null,(function(n){e.value=n,setTimeout((function(){t.isCheckAll()}))}));this.checkBoxEl.children(n.el),this.childCheckEl.push(n)}},{key:"getCheckValue",value:function(){var e=[];return this.childCheckEl.forEach((function(t){t.checked&&e.push(t.name)})),e}},{key:"show",value:function(){var e=this;this.$parent.hideFilterDrop(),xe(this.el.parent(),(function(t){e.el.hide()})),this.el.show()}},{key:"hide",value:function(){this.el.hide(),we(this.el.parent())}}])&&vG(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function yG(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var wG=function(){function e(t,n,r){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.options=t,this.$parent=n,this.columnsData=r,this.filtersEl=[],this.el=null,this.mainEl=null,this.init(t),this.createFilter()}var t,n;return t=e,(n=[{key:"init",value:function(){this.mainEl=s("div","".concat(pe,"-selector-content")),this.el=s("div","".concat(pe,"-selector-main")).children(this.mainEl)}},{key:"filterByCondition",value:function(){this.$parent.filterRenderChart()}},{key:"getCheckColumns",value:function(){var e={};return this.filtersEl.forEach((function(t){e[t.cvalue]=t.getCheckValue()})),e}},{key:"createFilter",value:function(){var e=this;this.mainEl.innerHTML(""),this.filtersEl=[],this.options.forEach((function(t,n){e.createFilterItem(t,n)}))}},{key:"getColumns",value:function(e){return Array.from(this.columnsData[e]||[])}},{key:"hideFilterDrop",value:function(){this.filtersEl.forEach((function(e){e.hide()}))}},{key:"createFilterItem",value:function(e,t){var n=this,r=new bG(e,this.getColumns(e),this),i=new ac({disabled:!0},e,{},(function(){}),(function(){}),(function(){}),(function(){}),'<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" data-v-ea893728=""><path fill="#c0c4cc" d="M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"></path></svg>',(function(e){r.show()}));i.el.children(r.el),this.mainEl.children(i.el),this.filtersEl.push(r),setTimeout((function(){var e=Math.ceil(ve()(n.el.el).width()/n.options.length);i.setStyle({width:e+"px",height:"30px",cursor:"auto","max-width":"150px"})}))}}])&&yG(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function xG(e,t){var n,r,i,o,a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(a)return r=!(n=!0),{s:function(){a=a.call(e)},n:function(){var e=a.next();return n=e.done,e},e:function(e){r=!0,i=e},f:function(){try{n||null==a.return||a.return()}finally{if(r)throw i}}};if(Array.isArray(e)||(a=function(e,t){var n;if(e)return"string"==typeof e?CG(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?CG(e,t):void 0}(e))||t&&e&&"number"==typeof e.length)return a&&(e=a),o=0,{s:t=function(){},n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function CG(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function kG(e,t,n,r,i){e=i[a=0<e.length?e[e.length-1]:t[t.length-1]];var o,a,s=(r.xAxis.data=e,r.xAxis.name=a,[]),u=0,c=xG(n);try{for(c.s();!(o=c.n()).done;){var l=o.value,h=_.cloneDeep(r.series[0]);h.data=i[l]||[],h.name=l,u=h.data.length,s.push(h)}}catch(e){c.e(e)}finally{c.f()}return r.series=s,[r,u]}function EG(e){if(e){var t=e.split(".");if(!(t.length<2)){e="";for(var n=0;n<t.length;n++){var r=t[n];0!=n&&(e+=1===n?r:".".concat(r))}}}return e}function SG(e){e.forEach((function(t,n){e[n]=EG(t)}))}function _G(e){for(var t in e)e[EG(t)]=e[t],delete e[t]}function OG(e,t,n,r,i){for(var o,a=i[o=0<e.length?e[e.length-1]:t[t.length-1]],s=i[n[0]],u=[],c=0;c<a.length;c++){var l=a[c],h=s[c];u.push({name:l,value:h})}return r.series[0].name=o,r.series[0].data=u,[r,u.length]}function TG(e){return DG.includes(e)}n(386);var DG=["1-1","2-1"];function BG(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(e,t)||IG(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function IG(e,t){var n;if(e)return"string"==typeof e?MG(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?MG(e,t):void 0}function MG(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function jG(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}MP([function(e){e.registerComponentModel(Qz),e.registerComponentView(Gz)},function(e){MP(V$),e.registerComponentModel(G$),e.registerComponentView(AQ),e.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Xw.J),e.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Xw.J)},function(e){MP(mV),MP(V$)},function(e){e.registerComponentModel(AV),e.registerComponentView(yV)},function(e){e.registerTransform(zV),e.registerTransform(HV)},function(e){e.registerChartView(dU),e.registerSeriesModel(IL),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,Xw.h(KP,"bar")),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,{seriesType:"bar",plan:LM(),reset:function(e){var t,n,r,i,o,a,s,u,c,l,h,f,d,p,m,g;if(YP(e))return t=e.getData(),s=(n=e.coordinateSystem).getBaseAxis(),r=n.getOtherAxis(s),i=t.getDimensionIndex(t.mapDimension(r.dim)),o=t.getDimensionIndex(t.mapDimension(s.dim)),a=e.get("showBackground",!0),s=t.mapDimension(r.dim),u=t.getCalculationInfo("stackResultDimension"),c=zP(t,s)&&!!t.getCalculationInfo("stackedOnSeries"),l=r.isHorizontal(),h=r.toGlobalCoord(r.dataToCoord("log"===r.type?1:0)),f=XP(e),d=e.get("barMinHeight")||0,p=u&&t.getDimensionIndex(u),m=t.getLayout("size"),g=t.getLayout("offset"),{progress:function(e,t){for(var r,s=e.count,u=f&&QP(3*s),A=f&&a&&QP(3*s),v=f&&QP(s),b=n.master.getRect(),y=l?b.width:b.height,w=t.getStore(),x=0;null!=(r=e.next());){var C,k=w.get(c?p:i,r),E=w.get(o,r),S=h,_=void 0,O=void(c&&(_=+k-w.get(i,r))),T=void 0,D=void 0,B=void 0;l?(C=n.dataToPoint([k,E]),O=S=c?n.dataToPoint([_,E])[0]:S,T=C[1]+g,D=C[0]-S,B=m,Math.abs(D)<d&&(D=(D<0?-1:1)*d)):(C=n.dataToPoint([E,k]),c&&(S=n.dataToPoint([E,_])[1]),O=C[0]+g,T=S,D=m,B=C[1]-S,Math.abs(B)<d&&(B=(B<=0?-1:1)*d)),f?(u[x]=O,u[x+1]=T,u[x+2]=l?D:B,A&&(A[x]=l?b.x:O,A[x+1]=l?T:b.y,A[x+2]=y),v[r]=r):t.setItemLayout(r,{x:O,y:T,width:D,height:B}),x+=3}f&&t.setLayout({largePoints:u,largeDataIndices:v,largeBackgroundPoints:A,valueAxisHorizontal:l})}}}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,eL("bar")),e.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},(function(e,t){var n=e.componentType||"series";t.eachComponent({mainType:n,query:e},(function(t){e.sortInfo&&t.axis.setCategorySortInfo(e.sortInfo)}))}))},function(e){e.registerUpdateLifecycle("series:beforeupdate",(function(e,t,n){(kq(t).labelManager||(kq(t).labelManager=new Cq)).clearLabels()})),e.registerUpdateLifecycle("series:layoutlabels",(function(e,t,n){var r=kq(t).labelManager;n.updatedSeries.forEach((function(e){r.addLabelsOfSeries(t.getViewOfSeriesModel(e))})),r.updateLayoutConfig(t),r.layout(t),r.processLabelsOverall()}))},function(e){e.registerUpdateLifecycle("series:beforeupdate",(function(e,t,n){Object(Xw.k)(DE(n.seriesTransition),(function(e){Object(Xw.k)(DE(e.to),(function(e){for(var t=n.updatedSeries,r=0;r<t.length;r++)(null!=e.seriesIndex&&e.seriesIndex===t[r].seriesIndex||null!=e.seriesId&&e.seriesId===t[r].id)&&(t[r][_M]=!0)}))}))})),e.registerUpdateLifecycle("series:transition",(function(e,t,n){for(var r,i,o=Zq(t),a=(o.oldSeries&&n.updatedSeries&&n.optionChanged&&((r=n.seriesTransition)?Object(Xw.k)(DE(r),(function(e){var r,i,a,s,u;e=e,r=o,i=n,a=t,s=[],u=[],Object(Xw.k)(DE(e.from),(function(e){var t=uG(r.oldSeries,e);0<=t&&s.push({dataGroupId:r.oldDataGroupIds[t],data:r.oldData[t],divide:sG(r.oldData[t]),dim:e.dimension})})),Object(Xw.k)(DE(e.to),(function(e){var t,n=uG(i.updatedSeries,e);0<=n&&(t=i.updatedSeries[n].getData(),u.push({dataGroupId:r.oldDataGroupIds[n],data:t,divide:sG(t),dim:e.dimension}))})),0<s.length&&0<u.length&&iG(s,u,a)})):(i=function(e,t){var n=Object(Xw.f)(),r=Object(Xw.f)(),i=Object(Xw.f)();return Object(Xw.k)(e.oldSeries,(function(t,n){var o=e.oldDataGroupIds[n],a=e.oldData[n],s=aG(n=oG(t));r.set(s,{dataGroupId:o,data:a}),Object(Xw.s)(n)&&Object(Xw.k)(n,(function(e){i.set(e,{key:s,dataGroupId:o,data:a})}))})),Object(Xw.k)(t.updatedSeries,(function(e){var t,o,a,s,u;e.isUniversalTransitionEnabled()&&e.isAnimationEnabled()&&(t=e.get("dataGroupId"),o=e.getData(),u=aG(e=oG(e)),(s=r.get(u))?n.set(u,{oldSeries:[{dataGroupId:s.dataGroupId,divide:sG(s.data),data:s.data}],newSeries:[{dataGroupId:t,divide:sG(o),data:o}]}):Object(Xw.s)(e)?(a=[],Object(Xw.k)(e,(function(e){(e=r.get(e)).data&&a.push({dataGroupId:e.dataGroupId,divide:sG(e.data),data:e.data})})),a.length&&n.set(u,{oldSeries:a,newSeries:[{dataGroupId:t,data:o,divide:sG(o)}]})):(s=i.get(e))&&((u=n.get(s.key))||(u={oldSeries:[{dataGroupId:s.dataGroupId,data:s.data,divide:sG(s.data)}],newSeries:[]},n.set(s.key,u)),u.newSeries.push({dataGroupId:t,data:o,divide:sG(o)})))})),n}(o,n),Object(Xw.k)(i.keys(),(function(e){iG((e=i.get(e)).oldSeries,e.newSeries,t)}))),Object(Xw.k)(n.updatedSeries,(function(e){e[_M]&&(e[_M]=!1)}))),e.getSeries()),s=o.oldSeries=[],u=o.oldDataGroupIds=[],c=o.oldData=[],l=0;l<a.length;l++){var h=a[l].getData();h.count()<1e4&&(s.push(a[l]),u.push(a[l].get("dataGroupId")),c.push(h))}}))},function(e){e.registerPainter("canvas",pG)},function(e){e.registerChartView(XU),e.registerSeriesModel(gU),e.registerLayout((!0,{seriesType:"line",plan:LM(),reset:function(e){var t,n,r,i,o,a=e.getData(),s=e.coordinateSystem;e=e.pipelineContext;if(s)return e=Object(Xw.G)(s.dimensions,(function(e){return a.mapDimension(e)})).slice(0,2),t=e.length,n=a.getCalculationInfo("stackResultDimension"),zP(a,e[0])&&(e[0]=n),zP(a,e[1])&&(e[1]=n),r=a.getStore(),i=a.getDimensionIndex(e[0]),o=a.getDimensionIndex(e[1]),t&&{progress:function(e,n){for(var a=QP((e.end-e.start)*t),u=[],c=[],l=e.start,h=0;l<e.end;l++){var f,d=void 0;d=1===t?(f=r.get(i,l),s.dataToPoint(f,null,c)):(u[0]=r.get(i,l),u[1]=r.get(o,l),s.dataToPoint(u,null,c)),a[h++]=d[0],a[h++]=d[1]}n.setLayout("points",a)}}}})),e.registerVisual({seriesType:"line",reset:function(e){var t=e.getData();(e=e.getModel("lineStyle").getLineStyle())&&!e.stroke&&(e.stroke=t.getVisual("style").fill),t.setVisual("legendLineStyle",e)}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,eL("line"))},function(e){e.registerChartView(Fz),e.registerSeriesModel(Hz),function(e,t){Object(Xw.k)([[e+"ToggleSelect","toggleSelect"],[e+"Select","select"],[e+"UnSelect","unselect"]],(function(n){t(n[0],(function(t,r,i){var o;t=Object(Xw.m)({},t),i.dispatchAction(Object(Xw.m)(t,{type:n[1],seriesIndex:(i=t,o=[],r.eachComponent({mainType:"series",subType:e,query:i},(function(e){o.push(e.seriesIndex)})),o)}))}))}))}("pie",e.registerAction),e.registerLayout(Object(Xw.h)(nz,"pie")),e.registerProcessor({seriesType:"pie",reset:function(e,t){var n,r=t.findComponents({mainType:"legend"});r&&r.length&&(n=e.getData()).filterSelf((function(e){for(var t=n.getName(e),i=0;i<r.length;i++)if(!r[i].isSelected(t))return!1;return!0}))}}),e.registerProcessor({seriesType:"pie",reset:function(e,t){var n=e.getData();n.filterSelf((function(e){var t=n.mapDimension("value");t=n.get(t,e);return!(Object(Xw.y)(t)&&!isNaN(t)&&t<0)}))}})},function(e){MP(iq),MP(pq)}]);var NG={x:0,y:0,w:400,h:500},FG=function(){function e(t,n,r,i,o){var a=5<arguments.length&&void 0!==arguments[5]?arguments[5]:{},u=6<arguments.length?arguments[6]:void 0,c=7<arguments.length?arguments[7]:void 0,l=this,h=e;if(!(l instanceof h))throw new TypeError("Cannot call a class as a function");this.type=c,this.chartEl=null,this.$parent=t,this.position=Object.assign({},NG,a),this.group=o,this.chartID=i,this.chartOption=n,this.selectorOption=null,this.el=this.init(r),this.chart=null,this.selectorEl=null,this.emptyContentEl=s("span").innerHTML(""),this.emptyEl=s("div","".concat(pe,"-chart-empty")).children(this.emptyContentEl),this.gdata=[],this.datalen=0,this.columnsData={},this.nopivotColumns=[],this.initChart(n,u),this.isSelector()&&(this.chartEl.css({height:"".concat(this.position.h-35,"px"),width:"".concat(this.position.w,"px")}),this.selectorEl=new wG(this.selectorOption,this,this.columnsData),this.el.children(this.selectorEl.el))}var t,n;return t=e,(n=[{key:"isSelector",value:function(){return this.selectorOption&&0<this.selectorOption.length}},{key:"init",value:function(e){var t=s("div","".concat(pe,"-charts")),n=s("div","".concat(pe,"-charts-main ").concat(pe,"-chart-").concat(this.chartID)).children(t).attr({id:this.chartID}),r={};return r.width="".concat(this.position.w+40,"px"),r.left="".concat(this.position.x,"px"),r.top="".concat(this.position.y,"px"),r.height="".concat(this.position.h+40,"px"),n.css(r),t.css({width:"".concat(this.position.w,"px"),height:"".concat(this.position.h,"px")}),this.chartEl=t,e.children(n),n}},{key:"logicAnd",value:function(e,t){return e=new Set(e),t=new Set(t),Array.from(new Set(function(e){return function(e){if(Array.isArray(e))return MG(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||IG(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e).filter((function(e){return t.has(e)}))))}},{key:"filterRenderChart",value:function(){var e,t=this,n=this.selectorEl.getCheckColumns(),r=new Array(this.datalen).fill(1).map((function(e,t){return t}));for(e in n)!function(e){var i=n[e],o=(e=t.gdata[e],[]);e.forEach((function(e,t){i.includes(e)&&o.push(t)})),r=t.logicAnd(r,o)}(e);var i,o={};for(i in this.gdata)!function(e){var n=t.gdata[e];o[e]=[],n.forEach((function(t,n){r.includes(n)&&o[e].push(t)}))}(i);var a=this.chartOption,s=(c=this.$parent.data.PivotConfig[[this.group]]).indexs,u=c.columns,c=c.values,l=null;"3-1"===this.type?l=BG(OG(s,u,c,a,o),1)[0]:TG(this.type)&&(l=BG(kG(s,u,c,a,o),1)[0]),this.renderChart(l)}},{key:"isEmptyGroup",value:function(){return this.$parent.data.PivotConfig[this.group]}},{key:"includes",value:function(e,t,n){return t<=e&&e<n+1}},{key:"gtRange",value:function(e,t){return t<e}},{key:"getChartGroupData",value:function(e,t){var n,r=e.s_r+e.expand_rows,i=e.s_c+e.expand_cols,o=this.$parent.data.rows._,a={},s={};for(n in this.nopivotColumns=[],o){var u=Number(n),c=o[n];if(!isNaN(u)&&this.includes(u,e.s_r,r)&&c&&c.cells){if(this.gtRange(u,r))break;var l,h=c.cells;for(l in h){var f=Number(l);if(!isNaN(f)&&this.includes(f,e.s_c,i)){if(this.gtRange(f,i))break;var d=h[l];if(d&&d.bindObj){var p=d.bindObj.value;if(p){if(f=d.expansion,d.merge&&0!=f){var m=2==f?d.merge[1]+1:d.merge[0]+1;if(t){a[p]||(a[p]=[]);for(var g=0;g<m;g++)a[p].push(d.text)}else{a[p]||(a[p]={type:d.bindObj.data_type,data:[]});for(var A=0;A<m;A++)a[p].data.push(d.text)}}else(t?(a[p]||(a[p]=[]),a[p]):(a[p]||(a[p]={type:d.bindObj.data_type,data:[]}),a[p].data)).push(d.text);this.nopivotColumns.includes(p)||this.nopivotColumns.push(p),s[p]||(s[p]=new Set),s[p].add(d.text)}}}}}}return _G(s),this.columnsData=s,a}},{key:"isPivotReport",value:function(e){return!!(e.values&&0<e.values.length)}},{key:"renderChart",value:function(e){var t=this;setTimeout((function(){var n=function(e,t,n){var r=function(e){return vP[(t=wP,(e=e).getAttribute?e.getAttribute(t):e[t])];var t}(e);return r||((r=new rP(e,void 0,n)).id="ec_"+yP++,vP[r.id]=r,qE(e,wP,r.id),ZR(r),ER.trigger("afterinit",r),r)}(t.chartEl.el);n.setOption(e),t.chart=n}))}},{key:"initChart",value:function(e,t){if(t)this.renderChart(this.chartOption);else if(t=this.isEmptyGroup())if(this.isPivotReport(t)){var n=t.indexs,r=t.columns,i=t.values;_G(l=(SG(n),SG(r),SG(i),this.getChartGroupData(t,!0))),this.gdata=l,this.selectorOption=n.concat(r);var o=null;"3-1"===this.type?(f=(h=BG(OG(n,r,i,Qw.a.cloneDeep(e),l),2))[0],o=h[1]):TG(this.type)&&(f=(h=BG(kG(n,r,i,Qw.a.cloneDeep(e),l),2))[0],o=h[1]),this.datalen=o,this.renderChart(f)}else{for(var a=this.getChartGroupData(t,!1),s=(n=(_G(a),SG(this.nopivotColumns),this.nopivotColumns.length-1),[]),u=n;0<=u;u--){var c=this.nopivotColumns[u];if(2!=a[c].type)break;s.push(c)}if(r=this.nopivotColumns.filter((function(e){return!s.includes(e)})),i=null,"3-1"===this.type){for(var l=a,h=r,f=(o=s,Qw.a.cloneDeep(e)),d=(h=h[0],o=o[0],l[h]),p=l[o],m=[],g=0;g<d.length;g++){var A=d[g],v=p[g];m.push({name:A,value:v})}f.series[0].name=h,f.series[0].data=m}else TG(this.type)&&(i=function(e,t,n,r){var i,o=[];for(i in e)t.includes(i)&&(o=0<o.length?_.zipWith(o,e[i].data,(function(e,t){return(e=null==e?"":e)+"\n\t\n"+t})):_.cloneDeep(e[i].data));r.xAxis.axisLabel={interval:0,rotate:"45"},r.xAxis.data=o;var a,s=[],u=xG(n);try{for(u.s();!(a=u.n()).done;){var c=a.value,l=_.cloneDeep(r.series[0]);l.data=e[c].data,l.name=c,s.push(l)}}catch(e){u.e(e)}finally{u.f()}return r.series=s,r}(a,r,s,Qw.a.cloneDeep(e)));this.renderChart(i)}else this.chartEl.innerHTML(""),this.chartEl.children(this.emptyEl),this.emptyContentEl.innerHTML("分组数据不存在")}},{key:"getReportData",value:function(e){e||this.group}},{key:"resize",value:function(){this.chart.resize()}},{key:"resetOption",value:function(e){this.chart.setOption(e)}}])&&jG(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),RG=function(e,t){return(RG=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};!function(e,t){function n(e){var t;return"number"==typeof(e=e&&"object"==typeof e&&(t=e.which||e.keyCode||e.charCode)?t:e)?s[e]:(t=String(e),r[t.toLowerCase()]||i[t.toLowerCase()]||(1===t.length?t.charCodeAt(0):void 0))}n.isEventKey=function(e,t){if(e&&"object"==typeof e){if(null!=(e=e.which||e.keyCode||e.charCode))if("string"==typeof t){var n=r[t.toLowerCase()];if(n)return n===e;if(n=i[t.toLowerCase()])return n===e}else if("number"==typeof t)return t===e;return!1}};
/*!
 * Programatically add the following
 */
for(var r=(t=e.exports=n).code=t.codes={backspace:8,tab:9,enter:13,shift:16,ctrl:17,alt:18,"pause/break":19,"caps lock":20,esc:27,space:32,"page up":33,"page down":34,end:35,home:36,left:37,up:38,right:39,down:40,insert:45,delete:46,command:91,"left command":91,"right command":93,"numpad *":106,"numpad +":107,"numpad -":109,"numpad .":110,"numpad /":111,"num lock":144,"scroll lock":145,"my computer":182,"my calculator":183,";":186,"=":187,",":188,"-":189,".":190,"/":191,"`":192,"[":219,"\\":220,"]":221,"'":222},i=t.aliases={windows:91,"⇧":16,"⌥":18,"⌃":17,"⌘":91,ctl:17,control:17,option:18,pause:19,break:19,caps:20,return:13,escape:27,spc:32,spacebar:32,pgup:33,pgdn:34,ins:45,del:46,cmd:91},o=97;o<123;o++)r[String.fromCharCode(o)]=o-32;for(o=48;o<58;o++)r[o-48]=o;for(o=1;o<13;o++)r["f"+o]=o+111;for(o=0;o<10;o++)r["numpad "+o]=o+96;var a,s=t.names=t.title={};for(o in r)s[r[o]]=o;for(a in i)r[a]=i[a]}($o={exports:{}},$o.exports);var PG,LG=((fa=$o.exports).code,fa.codes,fa.aliases,fa.names),UG=(fa.title,{"+":"plus","left command":"meta","right command":"meta"}),zG={shift:1,ctrl:2,alt:3,meta:4};function HG(e,t){var n,r=(LG[e]||t||"").toLowerCase();for(n in UG)r=r.replace(n,UG[n]);return r.replace(/\s/g,"")}function $G(e,t){return void 0===t&&(t=HG(e.keyCode,e.key)),-1===(e=[e.shiftKey&&"shift",e.ctrlKey&&"ctrl",e.altKey&&"alt",e.metaKey&&"meta"].filter(Boolean)).indexOf(t)&&e.push(t),e.filter(Boolean)}function QG(e){return(e=e.slice()).sort((function(e,t){return(zG[e]||5)-(zG[t]||5)})),e}
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

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

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
var VG=na=function(e){var t=i,n=e;if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}function i(t){void 0===t&&(t=window);var n=e.call(this)||this;return n.container=t,n.ctrlKey=!1,n.altKey=!1,n.shiftKey=!1,n.metaKey=!1,n.clear=function(){return n.ctrlKey=!1,n.altKey=!1,n.shiftKey=!1,n.metaKey=!1,n},n.keydownEvent=function(e){n.triggerEvent("keydown",e)},n.keyupEvent=function(e){n.triggerEvent("keyup",e)},n.blur=function(){n.clear(),n.trigger("blur")},Kp(t,"blur",n.blur),Kp(t,"keydown",n.keydownEvent),Kp(t,"keyup",n.keyupEvent),n}return RG(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r),n=i.prototype,Object.defineProperty(i,"global",{get:function(){return PG=PG||new i},enumerable:!1,configurable:!0}),i.setGlobal=function(){return this.global},n.destroy=function(){var e=this.container;this.clear(),this.off(),Yp(e,"blur",this.blur),Yp(e,"keydown",this.keydownEvent),Yp(e,"keyup",this.keyupEvent)},n.keydown=function(e,t){return this.addEvent("keydown",e,t)},n.offKeydown=function(e,t){return this.removeEvent("keydown",e,t)},n.offKeyup=function(e,t){return this.removeEvent("keyup",e,t)},n.keyup=function(e,t){return this.addEvent("keyup",e,t)},n.addEvent=function(e,t,n){return Ap(t)?this.on("".concat(e,".").concat(QG(t).join(".")),n):vp(t)?this.on("".concat(e,".").concat(t),n):this.on(e,t),this},n.removeEvent=function(e,t,n){return Ap(t)?this.off("".concat(e,".").concat(QG(t).join(".")),n):vp(t)?this.off("".concat(e,".").concat(t),n):this.off(e,t),this},n.triggerEvent=function(e,t){this.ctrlKey=t.ctrlKey,this.shiftKey=t.shiftKey,this.altKey=t.altKey,this.metaKey=t.metaKey;var n=HG(t.keyCode,t.key),r={key:n,isToggle:"ctrl"===n||"shift"===n||"meta"===n||"alt"===n,inputEvent:t,keyCode:t.keyCode,ctrlKey:t.ctrlKey,altKey:t.altKey,shiftKey:t.shiftKey,metaKey:t.metaKey};1<(t=(this.trigger(e,r),this.trigger("".concat(e,".").concat(n),r),$G(t,n))).length&&this.trigger("".concat(e,".").concat(t.join(".")),r)},i}(Ng),qG=function(e,t){return(qG=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function GG(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}qG(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var WG=function(){return(WG=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function KG(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||((r=r||Array.prototype.slice.call(t,0,i))[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}function YG(e,t,n){e!==t&&n(e,t)}function XG(e,t,n){void 0===n&&(n=e.data.boundArea);var r=void 0===(r=e.distX)?0:r,i=void 0===(i=e.distY)?0:i,o=(e=e.data).startX;e=e.startY;0<t&&(r=(0<=r?1:-1)*(t*(a=Math.sqrt((r*r+i*i)/(1+t*t)))),i=(0<=i?1:-1)*a),r=(0<=r?1:-1)*(n=(a=Pp([Math.abs(r),Math.abs(i)],[0,0],[r<0?o-n.left:n.right-o,i<0?e-n.top:n.bottom-e],!!t))[0]),i=(0<=i?1:-1)*(t=a[1]);var a=o+Math.min(0,r);return{left:a,top:o=e+Math.min(0,i),right:a+n,bottom:o+t,width:n,height:t}}function JG(e){var t=(e=e.getBoundingClientRect()).left,n=e.top,r=e.width;return{pos1:[t,n],pos2:[t+r,n],pos3:[t,n+(e=e.height)],pos4:[t+r,n+e]}}function ZG(e,t,n){var r=(e=Ig(e,t)).list,i=e.prevList,o=(t=e.added,e.removed);e=e.maintained;return KG(KG(KG([],t.map((function(e){return r[e]})),!0),o.map((function(e){return i[e]})),!0),n?e.map((function(e){return e=e[1],r[e]})):[],!0)}function eW(e){for(var t=0,n=e.length,r=1;r<n;++r)t=Math.max(Hp(e[r],e[r-1]),t);return t}var tW=cA("\n:host {\n    position: fixed;\n    display: none;\n    border: 1px solid #4af;\n    background: rgba(68, 170, 255, 0.5);\n    pointer-events: none;\n    will-change: transform;\n    z-index: 100;\n}\n"),nW="selecto-selection ".concat(tW.className),rW=["className","boundContainer","selectableTargets","selectByClick","selectFromInside","continueSelect","continueSelectWithoutDeselect","toggleContinueSelect","toggleContinueSelectWithoutDeselect","keyContainer","hitRate","scrollOptions","checkInput","preventDefault","ratio","getElementRect","preventDragFromInside","rootContainer","dragCondition","clickBySelectEnd","checkOverflow","innerScrollOptions"],iW=(KG(["dragContainer","cspNonce","preventClickEventOnDrag","preventClickEventOnDragStart","preventRightClick"],rW,!0),Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,Boolean,function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return GG(t,e),t}(function(e){function t(t){void 0===t&&(t={});var n=e.call(this)||this,r=(n.selectedTargets=[],n.dragScroll=new zg,n._onDragStart=function(e,t){var r=e.data,i=e.clientX,o=e.clientY,a=e.inputEvent,s=(d=n.options).selectFromInside,u=d.selectByClick,c=d.rootContainer,l=d.boundContainer,h=void 0===(h=d.preventDragFromInside)||h,f=d.clickBySelectEnd;if(!(d=d.dragCondition)||d(e)){r.data={};var d=em(n.container),p=(r.innerWidth=d.innerWidth,r.innerHeight=d.innerHeight,n.findSelectableTargets(r),r.startSelectedTargets=n.selectedTargets,r.scaleMatrix=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],r.containerX=0,r.containerY=0,n.container),m=(d={left:-1/0,top:-1/0,right:1/0,bottom:1/0},c&&(m=n.container.getBoundingClientRect(),r.containerX=m.left,r.containerY=m.top,r.scaleMatrix=function(e,t){void 0===t&&(t=document.body);for(var n=e,r=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];n&&(r=vg(Eg(getComputedStyle(n).transform),r),n!==t);)n=n.parentElement;return(r=ng(r,4))[12]=0,r[13]=0,r[14]=0,r}(n.container,c)),l&&(l=(m=gp(l)&&"element"in l?WG({left:!0,top:!0,bottom:!0,right:!0},l):{element:l,left:!0,top:!0,bottom:!0,right:!0}).element)&&(l=(vp(l)?Xp(p).querySelector(l):!0===l?n.container:l).getBoundingClientRect(),m.left&&(d.left=l.left),m.top&&(d.top=l.top),m.right&&(d.right=l.right),m.bottom&&(d.bottom=l.bottom)),r.boundArea=d,{left:i,top:o,right:i,bottom:o,width:0,height:0});l=[],t=0<(l=!s||u&&!f?(d=n._findElement(t||a.target,r.selectableTargets))?[d]:[]:l).length;if((d=!s&&t)&&!u)return e.stop(),!1;if(s=a.type,!(e.isClick||"mousedown"!==s&&"touchstart"!==s||n.emit("dragStart",WG(WG({},e),{data:r.data}))))return e.stop(),!1;if(n.continueSelect?(l=ZG(n.selectedTargets,l,n.continueSelectWithoutDeselect),r.startPassedTargets=n.selectedTargets):r.startPassedTargets=[],n._select(l,m,e,!0,d&&u&&!f&&h),r.startX=i,r.startY=o,r.selectFlag=!1,r.preventDragFromInside=!1,a.target&&(t=Sg(r.scaleMatrix,[i-r.containerX,o-r.containerY]),n.target.style.cssText+="position: ".concat(c?"absolute":"fixed",";")+"left:0px;top:0px;"+"transform: translate(".concat(t[0],"px, ").concat(t[1],"px)")),d&&u&&!f)a.preventDefault(),h&&(n._selectEnd(r.startSelectedTargets,r.startPassedTargets,m,e,!0),r.preventDragFromInside=!0);else{if(r.selectFlag=!0,l=(s=n.options).scrollOptions,o=!1,i=s.innerScrollOptions){for(var g=null,A=e.inputEvent.target;A&&A!==Xp(p).body;){if("visible"!==getComputedStyle(A).overflow){g=A;break}A=A.parentElement}g&&(r.innerScrollOptions=WG({container:g,checkScrollEvent:!0},!0===i?{}:i),n.dragScroll.dragStart(e,r.innerScrollOptions),o=!0)}!o&&l&&l.container&&n.dragScroll.dragStart(e,l),f&&(r.selectFlag=!1,e.preventDrag())}return!0}e.stop()},n._onDrag=function(e){if(e.data.selectFlag){var t=n.scrollOptions,r=e.data.innerScrollOptions;if((r||(null==t?void 0:t.container))&&!e.isScroll&&n.dragScroll.drag(e,r||t))return}n._checkSelected(e)},n._onDragEnd=function(e){var t=e.data,r=e.inputEvent,i=XG(e,n.options.ratio),o=t.selectFlag,a=n.container;r&&n.emit("dragEnd",WG(WG({isDouble:!!e.isDouble,isClick:!!e.isClick,isDrag:!1,isSelect:o},e),{data:t.data,rect:i})),n.target.style.cssText+="display: none;",o?(t.selectFlag=!1,n.dragScroll.dragEnd()):n.selectByClick&&n.clickBySelectEnd&&(o=n._findElement((null==r?void 0:r.target)||(o=a,r=e.clientX,a=e.clientY,(o=Xp(o)).elementFromPoint&&o.elementFromPoint(r,a)||null),t.selectableTargets),n._select(o?[o]:[],i,e)),t.preventDragFromInside||n._selectEnd(t.startSelectedTargets,t.startPassedTargets,i,e)},n._onKeyDown=function(e){var t,r=n.options,i=!1;n._keydownContinueSelect||(t=n._sameCombiKey(e,r.toggleContinueSelect),n._keydownContinueSelect=t,i=i||t),n._keydownContinueSelectWithoutDeselection||(t=n._sameCombiKey(e,r.toggleContinueSelectWithoutDeselect),n._keydownContinueSelectWithoutDeselection=t,i=i||t),i&&n.emit("keydown",{keydownContinueSelect:n._keydownContinueSelect,keydownContinueSelectWithoutDeselection:n._keydownContinueSelectWithoutDeselection})},n._onKeyUp=function(e){var t,r=n.options,i=!1;n._keydownContinueSelect&&(t=n._sameCombiKey(e,r.toggleContinueSelect,!0),n._keydownContinueSelect=!t,i=i||t),n._keydownContinueSelectWithoutDeselection&&(t=n._sameCombiKey(e,r.toggleContinueSelectWithoutDeselect,!0),n._keydownContinueSelectWithoutDeselection=!t,i=i||t),i&&n.emit("keyup",{keydownContinueSelect:n._keydownContinueSelect,keydownContinueSelectWithoutDeselection:n._keydownContinueSelectWithoutDeselection})},n._onBlur=function(){(n._keydownContinueSelect||n._keydownContinueSelectWithoutDeselection)&&(n._keydownContinueSelect=!1,n._keydownContinueSelectWithoutDeselection=!1,n.emit("keyup",{keydownContinueSelect:n._keydownContinueSelect,keydownContinueSelectWithoutDeselection:n._keydownContinueSelectWithoutDeselection}))},n._onDocumentSelectStart=function(e){var t,r,i=Xp(n.container);n.gesto.isFlag()&&(i=nm(t=(t=n.dragContainer)===em(n.container)?i.documentElement:t)?[t]:[].slice.call(t),r=e.target,i.some((function(t){if(t===r||t.contains(r))return e.preventDefault(),!0})))},n.target=t.portalContainer,t.container);return(t=(n.options=WG({className:"",portalContainer:null,container:null,dragContainer:null,selectableTargets:[],selectByClick:!0,selectFromInside:!0,clickBySelectEnd:!1,hitRate:100,continueSelect:!1,continueSelectWithoutDeselect:!1,toggleContinueSelect:null,toggleContinueSelectWithoutDeselect:null,keyContainer:null,scrollOptions:void 0,checkInput:!1,preventDefault:!1,boundContainer:!1,preventDragFromInside:!0,dragCondition:null,rootContainer:null,checkOverflow:!1,innerScrollOptions:!1,getElementRect:JG,cspNonce:"",ratio:0},t),n.options.portalContainer))&&(r=t.parentElement),n.container=r||document.body,n.initElement(),n.initDragScroll(),n.setKeyController(),n}GG(t,e);var n=t.prototype;return n.setSelectedTargets=function(e){var t=this.selectedTargets,n=Ig(t,e),r=n.added,i=n.removed,o=n.prevList,a=n.list;return this.selectedTargets=e,{added:r.map((function(e){return a[e]})),removed:i.map((function(e){return o[e]})),beforeSelected:t,selected:e}},n.setSelectedTargetsByPoints=function(e,t){var n=Math.min(e[0],t[0]),r=Math.min(e[1],t[1]),i=(t={left:n,top:r,right:i=Math.max(e[0],t[0]),bottom:e=Math.max(e[1],t[1]),width:i-n,height:e-r},{ignoreClick:!0});this.findSelectableTargets(i),n=this.hitTest(t,i),e=this.setSelectedTargets(n);return WG(WG({},e),{rect:t})},n.selectTargetsByPoints=function(e,t){e=new MouseEvent("mousedown",{clientX:e[0],clientY:e[1],cancelable:!0,bubbles:!0});var n=new MouseEvent("mousemove",{clientX:t[0],clientY:t[1],cancelable:!0,bubbles:!0}),r=(t=new MouseEvent("mousemove",{clientX:t[0],clientY:t[1],cancelable:!0,bubbles:!0}),this.gesto);!1!==r.onDragStart(e)&&(r.onDrag(n),r.onDragEnd(t))},n.getSelectedTargets=function(){return this.selectedTargets},n.triggerDragStart=function(e){return this.gesto.triggerDragStart(e),this},n.destroy=function(){var e;this.off(),this.keycon&&this.keycon.destroy(),this.gesto.unset(),this.injectResult.destroy(),this.dragScroll.dragEnd(),Yp(document,"selectstart",this._onDocumentSelectStart),this.options.portalContainer||null!=(e=this.target.parentElement)&&e.removeChild(this.target),this.keycon=null,this.gesto=null,this.injectResult=null,this.target=null,this.container=null,this.options=null},n.getElementPoints=function(e){var t=this.getElementRect||JG,n=[(n=t(e)).pos1,n.pos2,n.pos4,n.pos3];return t!==JG?Qg(n,e.getBoundingClientRect()):n},n.getSelectableElements=function(){var e=this.container,t=[];return this.options.selectableTargets.forEach((function(n){var r;yp(n)?(r=n())&&t.push.apply(t,[].slice.call(r)):nm(n)?t.push(n):gp(n)?t.push(n.value||n.current):(r=[].slice.call(Xp(e).querySelectorAll(n)),t.push.apply(t,r))})),t},n.checkScroll=function(){var e,t;this.gesto.isFlag()&&(e=this.scrollOptions,((t=this.gesto.getEventData().innerScrollOptions)||(null==e?void 0:e.container))&&this.dragScroll.checkScroll(WG({inputEvent:this.gesto.getCurrentEvent()},t||e)))},n.findSelectableTargets=function(e){var t,n=this,r=(void 0===e&&(e=this.gesto.getEventData()),this.getSelectableElements()),i=r.map((function(e){return n.getElementPoints(e)})),o=(i=(e.selectableTargets=r,e.selectablePoints=i,e.selectableParentMap=null,this.options)).checkOverflow||i.innerScrollOptions,a=Xp(this.container);return o&&(t=new Map,e.selectableInnerScrollParentMap=t,e.selectableInnerScrollPathsList=r.map((function(e,n){for(var r=e.parentElement,i=[],o=[];r&&r!==a.body;)!function(){var e,a=t.get(r);a||"visible"!==getComputedStyle(r).overflow&&(e=JG(r),a={parentElement:r,indexes:[],points:[e.pos1,e.pos2,e.pos4,e.pos3],paths:KG([],o,!0)},i.push(r),i.forEach((function(e){t.set(e,a)})),i=[]),(a?(r=a.parentElement,t.get(r).indexes.push(n),o):i).push(r),r=r.parentElement}();return o}))),i.checkOverflow||(e.selectableInners=r.map((function(){return!0}))),this._refreshGroups(e),r},n.clickTarget=function(e,t){var n="touches"in(r=e)?{clientX:(n=r.touches[0]||r.changedTouches[0]).clientX,clientY:n.clientY}:{clientX:r.clientX,clientY:r.clientY},r={data:{selectFlag:!1},clientX:n.clientX,clientY:n.clientY,inputEvent:e,isClick:!0,isTrusted:!1,stop:function(){return!1}};return this._onDragStart(r,t)&&this._onDragEnd(r),this},n.setKeyController=function(){var e=(n=this.options).keyContainer,t=n.toggleContinueSelect,n=n.toggleContinueSelectWithoutDeselect;this.keycon&&(this.keycon.destroy(),this.keycon=null),(t||n)&&(this.keycon=new VG(e||em(this.container)),this.keycon.keydown(this._onKeyDown).keyup(this._onKeyUp).on("blur",this._onBlur))},n.setClassName=function(e){this.options.className=e,this.target.setAttribute("class","".concat(nW," ").concat(e||""))},n.setKeyEvent=function(){var e=(t=this.options).toggleContinueSelect,t=t.toggleContinueSelectWithoutDeselect;!e&&!t||this.keycon||this.setKeyController()},n.setKeyContainer=function(e){var t=this,n=this.options;YG(n.keyContainer,e,(function(){n.keyContainer=e,t.setKeyController()}))},n.getContinueSelect=function(){var e=this.options,t=e.continueSelect;return e.toggleContinueSelect&&this._keydownContinueSelect?!t:t},n.getContinueSelectWithoutDeselect=function(){var e=this.options,t=e.continueSelectWithoutDeselect;return e.toggleContinueSelectWithoutDeselect&&this._keydownContinueSelectWithoutDeselection?!t:t},n.setToggleContinueSelect=function(e){var t=this,n=this.options;YG(n.toggleContinueSelect,e,(function(){n.toggleContinueSelect=e,t.setKeyEvent()}))},n.setToggleContinueSelectWithoutDeselect=function(e){var t=this,n=this.options;YG(n.toggleContinueSelectWithoutDeselect,e,(function(){n.toggleContinueSelectWithoutDeselect=e,t.setKeyEvent()}))},n.setPreventDefault=function(e){this.gesto.options.preventDefault=e},n.setCheckInput=function(e){this.gesto.options.checkInput=e},n.initElement=function(){var e=(s=this.options).dragContainer,t=s.checkInput,n=s.preventDefault,r=s.preventClickEventOnDragStart,i=s.preventClickEventOnDrag,o=s.preventClickEventByCondition,a=void 0===(a=s.preventRightClick)||a,s=s.className,u=this.container;this.target=function e(t,n,r){var i=t.tag,o=t.children,a=t.attributes,s=t.className,u=t.style,c=n||Xp(r).createElement(i);for(h in a)c.setAttribute(h,a[h]);var l=c.children;if(o.forEach((function(t,n){e(t,l[n],c)})),s&&s.split(/\s+/g).forEach((function(e){e&&!qp(c,e)&&Gp(c,e)})),u){var h,f=c.style;for(h in u)f[h]=u[h]}return!n&&r&&r.appendChild(c),c}(function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];var i=(t=t||{}).className,o=t.style;return{tag:e,className:void 0===i?"":i,style:void 0===o?{}:o,attributes:function(e,t){var n={};for(i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]]);return n}(t,["className","style"]),children:n}}("div",{className:"".concat(nW," ").concat(s||"")}),this.target,u),s=this.target;this.dragContainer="string"==typeof e?[].slice.call(Xp(u).querySelectorAll(e)):e||this.target.parentNode,this.gesto=new uA(this.dragContainer,{checkWindowBlur:!0,container:em(u),checkInput:t,preventDefault:n,preventClickEventOnDragStart:r,preventClickEventOnDrag:i,preventClickEventByCondition:o,preventRightClick:a}).on({dragStart:this._onDragStart,drag:this._onDrag,dragEnd:this._onDragEnd}),Kp(document,"selectstart",this._onDocumentSelectStart),this.injectResult=tW.inject(s,{nonce:this.options.cspNonce})},n.hitTest=function(e,t,n){function r(e,t){t=Sp("".concat("function"==typeof i?i(t):i));var n,r,a=!p&&qg([f,d],e);return!(!o||!a)||!!(a=Xg(m,e)).length&&((r=0)===(n=$g(a))&&0===$g(e)?(r=eW(e),n=eW(a)):r=$g(e),"px"===t.unit?n>=t.value:Fp(Math.round(n/r*100),0,100)>=Math.min(100,t.value))}var i=(a=this.options).hitRate,o=a.selectByClick,a=e.left,s=e.top,u=e.right,c=(e=e.bottom,t.innerGroups),l=t.innerWidth,h=t.innerHeight,f=null==n?void 0:n.clientX,d=null==n?void 0:n.clientY,p=t.ignoreClick,m=[[a,s],[u,s],[u,e],[a,e]],g=t.selectableTargets,A=t.selectablePoints,v=t.selectableInners;if(!c)return g.filter((function(e,t){return!!v[t]&&r(A[t],g[t])}));for(var b,y,w=[],x=(n=Math.floor(a/l),Math.floor(u/l)),C=Math.floor(s/h),k=Math.floor(e/h),E=n;E<=x;++E){var S=c[E];if(S)for(var _=C;_<=k;++_){var O=S[_];O&&O.forEach((function(e){var t=A[e],n=v[e];e=g[e];n&&r(t,e)&&w.push(e)}))}}return b=w,"undefined"==typeof Map?b.filter((function(e,t){return b.indexOf(e)===t})):(y=new Map,b.filter((function(e){return!y.has(e)&&(y.set(e,!0),!0)})))},n.initDragScroll=function(){var e=this;this.dragScroll.on("scrollDrag",(function(t){(0,t.next)(e.gesto.getCurrentEvent())})).on("scroll",(function(t){var n=t.container;t=t.direction;e.gesto.getEventData().innerScrollOptions?e.emit("innerScroll",{container:n,direction:t}):e.emit("scroll",{container:n,direction:t})})).on("move",(function(t){var n,r,i,o,a=t.offsetX,s=t.offsetY,u=(t=t.inputEvent,e.gesto);u&&u.isFlag()&&(u=(n=e.gesto.getEventData()).boundArea,n.startX-=a,n.startY-=s,r=!1,(o=null==(o=e.gesto.getEventData().innerScrollOptions)?void 0:o.container)&&(o=(i=n.selectableInnerScrollParentMap).get(o))&&(o.paths.forEach((function(e){i.get(e).points.forEach((function(e){e[0]-=a,e[1]-=s}))})),o.indexes.forEach((function(e){n.selectablePoints[e].forEach((function(e){e[0]-=a,e[1]-=s}))})),r=!0),r||n.selectablePoints.forEach((function(e){e.forEach((function(e){e[0]-=a,e[1]-=s}))})),e._refreshGroups(n),u.left-=a,u.right-=a,u.top-=s,u.bottom-=s,e.gesto.scrollBy(a,s,t.inputEvent),e._checkSelected(e.gesto.getCurrentEvent()))}))},n._select=function(e,t,n,r,i){void 0===i&&(i=!1);var o=n.inputEvent,a=n.data,s=this.setSelectedTargets(e),u=(e=Ig(a.startSelectedTargets,e)).added,c=e.removed,l=e.prevList,h=e.list;e={startSelected:l,startAdded:u.map((function(e){return h[e]})),startRemoved:c.map((function(e){return l[e]}))};r&&this.emit("selectStart",WG(WG(WG({},s),e),{rect:t,inputEvent:o,data:a.data,isTrusted:n.isTrusted,isDragStartEnd:i})),(s.added.length||s.removed.length)&&this.emit("select",WG(WG(WG({},s),e),{rect:t,inputEvent:o,data:a.data,isTrusted:n.isTrusted,isDragStartEnd:i}))},n._selectEnd=function(e,t,n,r,i){void 0===i&&(i=!1);var o,a=r.inputEvent,s=r.isDouble,u=r.data,c="mousedown"===(c=a&&a.type)||"touchstart"===c,l=(o=Ig(e,this.selectedTargets)).added,h=o.removed,f=o.prevList,d=o.list,p=(o=Ig(t,this.selectedTargets)).added,m=o.removed,g=o.prevList,A=o.list;this.emit("selectEnd",{startSelected:e,beforeSelected:t,selected:this.selectedTargets,added:l.map((function(e){return d[e]})),removed:h.map((function(e){return f[e]})),afterAdded:p.map((function(e){return A[e]})),afterRemoved:m.map((function(e){return g[e]})),isDragStart:c&&i,isDragStartEnd:c&&i,isClick:!!r.isClick,isDouble:!!s,rect:n,inputEvent:a,data:u.data,isTrusted:r.isTrusted})},n._checkSelected=function(e,t){void 0===t&&(t=XG(e,this.options.ratio));var n=e.data,r=t.top,i=t.left,o=t.width,a=t.height,s=n.selectFlag,u=n.containerX,c=n.containerY,l=n.scaleMatrix;i=Sg(l,[i-u,r-c]),u=Sg(l,[o,a]),r=[];s&&(this.target.style.cssText+="display: block;left:0px;top:0px;"+"transform: translate(".concat(i[0],"px, ").concat(i[1],"px);")+"width:".concat(u[0],"px;height:").concat(u[1],"px;"),c=this.hitTest(t,n,e),r=ZG(n.startPassedTargets,c,this.continueSelect&&this.continueSelectWithoutDeselect)),!1===this.emit("drag",WG(WG({},e),{data:n.data,isSelect:s,rect:t}))?(this.target.style.cssText+="display: none;",e.stop()):s&&this._select(r,t,e)},n._sameCombiKey=function(e,t,n){var r,i;return!!t&&(r=$G(e.inputEvent,e.key),t=Ap((t=[].concat(t))[0])?t:[t],n?(i=e.key,t.some((function(e){return e.some((function(e){return e===i}))}))):t.some((function(e){return e.every((function(e){return-1<r.indexOf(e)}))})))},n._findElement=function(e,t){for(var n=e;n&&!(-1<t.indexOf(n));)n=n.parentElement;return n},n._refreshGroups=function(e){var t,n,r,i,o=e.innerWidth,a=e.innerHeight,s=e.selectablePoints;this.options.checkOverflow&&(t=null==(r=this.gesto.getEventData().innerScrollOptions)?void 0:r.container,n=e.selectableInnerScrollParentMap,r=e.selectableInnerScrollPathsList,e.selectableInners=r.map((function(e,r){var i=!1;return e.every((function(e){if(!i){if(e===t)return i=!0;if((e=n.get(e))&&!Xg(s[r],e.points).length)return!1}return!0}))}))),o&&a?(r=e.selectablePoints,i={},r.forEach((function(e,t){var n=1/0,r=-1/0,s=1/0,u=-1/0;e.forEach((function(e){var t=Math.floor(e[0]/o);e=Math.floor(e[1]/a);n=Math.min(t,n),r=Math.max(t,r),s=Math.min(e,s),u=Math.max(e,u)}));for(var c=n;c<=r;++c)for(var l=s;l<=u;++l)i[c]=i[c]||{},i[c][l]=i[c][l]||[],i[c][l].push(t)})),e.innerGroups=i):e.innerGroups=null},function(e,t,n,r){var i,o=arguments.length,a=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;0<=s;s--)(i=e[s])&&(a=(o<3?i(a):3<o?i(t,n,a):i(t,n))||a);return 3<o&&a&&Object.defineProperty(t,n,a),a}([sp(rW,(function(e,t){var n={enumerable:!0,configurable:!0,get:function(){return this.options[t]}},r=_p("get ".concat(t)),i=(e[r]?n.get=function(){return this[r]()}:n.get=function(){return this.options[t]},_p("set ".concat(t)));e[i]?n.set=function(e){this[i](e)}:n.set=function(e){this.options[t]=e},Object.defineProperty(e,t,n)}))],t)}(Ng)));function oW(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var aW=function(){function e(t,n,r){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.container=t,this.$parent=r,this.init(),this.moveable=n,this.targets=[]}var t,n;return t=e,(n=[{key:"init",value:function(){var e=this;setTimeout((function(){var t=e.moveable.moveable,n=new iW({container:e.container,dragContainer:e.$parent.moveablelayerEl.el,selectableTargets:[".".concat(pe,"-moveablelayer .").concat(pe,"-charts-main")],selectByClick:!0,groupable:!1});n.on("select",(function(n){t.target=e.getTargets(n.selected),e.targets=e.getTargets(n.selected)})),n.on("dragStart",(function(n){var r={};(function e(t,n){!function(e,t){for(var n=!1,r=0;r<e.length;r++)if(e[r]==t){n=!0;break}return n}(t.classList,"".concat(pe,"-charts-main"))?e(t.parentElement,n):n.selected=t})(n.inputEvent.target,r),t.target=e.getTargets([r.selected]),e.targets=e.getTargets([r.selected]),n.stop()})),n.on("selectEnd",(function(n){t.target=e.getTargets(n.selected),e.targets=e.getTargets(n.selected)})),e.selecto=n}))}},{key:"getTargets",value:function(e){return e.filter((function(e,t){if(0==t)return e}))}}])&&oW(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function sW(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function uW(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cW(e){return function(e){if(Array.isArray(e))return fW(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||hW(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function lW(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(e,t)||hW(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function hW(e,t){var n;if(e)return"string"==typeof e?fW(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?fW(e,t):void 0}function fW(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function dW(e,t,n){var r,i,o,a,s,u,c=!(3<arguments.length&&void 0!==arguments[3])||arguments[3],l=4<arguments.length&&void 0!==arguments[4]&&arguments[4];-1===t&&-1===n||(r=this.table,i=this.selector,o=this.toolbar,a=this.data,s=null,(u=this.contextMenu).setModeVal(s=-1===t?"col":-1===n?"row":"range"),u.setMode(s),this.adjustRC=s,this.unSelectedChart(),u=a.getCell(t,n),e?(i.setEnd(t,n,l),this.Groupmanagement=i.range):(u&&u.customIcon&&a.settings.isNoSelector||i.set(t,n,c),this.Groupmanagement={sri:t,sci:n,eri:t,eci:n}),o.reset(),r.render())}function pW(e,t){var n,r,i,o;-1===e&&-1===t||(this.table,n=this.selector,this.toolbar,o=this.data,this.contextMenu,r=o.getCell(e,t),o=function(e,t){return!(!(t=t.getCell(e.sri,e.sci))||!t.merge||(t=t.merge,e.eri-e.sri!=t[0]||e.eci-e.sci!=t[1]))}(i=n.range,o),i.sri==i.eri&&i.sci==i.eci||o?this.trigger("cell-selected",r,e,t):this.trigger("cells-selected",r,n.range))}function mW(e,t){var n,r=this.selector,i=(o=this.data).rows,o=o.cols,a=(s=lW(r.indexes,2))[0],s=s[1],u=(c=r.range).eri,c=c.eci;e&&(a=(n=lW(r.moveIndexes,2))[0],s=n[1]),"left"===t?0<s&&--s:"right"===t?(s=c!==s?c:s)<o.len-1&&(s+=1):"up"===t?0<a&&--a:"down"===t?(a=u!==a?u:a)<i.len-1&&(a+=1):"row-first"===t?s=0:"row-last"===t?s=o.len-1:"col-first"===t?a=0:"col-last"===t&&(a=i.len-1),e&&(r.moveIndexes=[a,s]),dW.call(this,e,a,s),function(){var e=this.data,t=this.verticalScrollbar,n=this.horizontalScrollbar,r=(u=e.getSelectedRect()).l,i=u.t,o=u.left,a=u.top,s=u.width,u=u.height,c=this.getTableOffset();Math.abs(o)+s>c.width?n.move({left:r+s-c.width}):o<(s=e.freezeTotalWidth())&&n.move({left:r-1-s}),Math.abs(a)+u>c.height?t.move({top:i+u-c.height-1}):a<(o=e.freezeTotalHeight())&&t.move({top:i-1-o})}.call(this)}function gW(e){function t(e){var t;0<e?(e=i.scroll.ri+1)<s.len&&(e=h(e,(function(e){return s.getHeight(e)})),n.move({top:o+e-1})):0<=(e=i.scroll.ri-1)&&(t=h(e,(function(e){return s.getHeight(e)})),n.move({top:0==e?0:o-t}))}var n=this.verticalScrollbar,r=this.horizontalScrollbar,i=this.data,o=n.scroll().top,a=r.scroll().left,s=i.rows,u=i.cols,c=e.deltaY,l=e.deltaX,h=function(e,t){for(var n=e,r=0;r=t(n),n+=1,r<=0;);return r},f=Math.abs(c),d=Math.abs(l),p=Math.max(f,d);/Firefox/i.test(window.navigator.userAgent)&&t(e.detail),p===d&&(0<(e=l)?(e=i.scroll.ci+1)<u.len&&(e=h(e,(function(e){return u.getWidth(e)})),r.move({left:a+e-1})):0<=(e=i.scroll.ci-1)&&(d=h(e,(function(e){return u.getWidth(e)})),r.move({left:0==e?0:a-d}))),p===f&&t(c)}function AW(){var e=this.data,t=this.verticalScrollbar,n=this.sheetScale,r=e.exceptRowTotalHeight(0,-1);e=this.scrollTableOffset(e.rows.totalHeight()-r,"height");t.set(e,n)}function vW(){var e=this.data,t=this.horizontalScrollbar,n=this.sheetScale,r=this.scrollTableOffset(e.cols.totalWidth(),"width");e&&t.set(r,n)}function bW(){this.tableEl;var e=this.overlayerEl,t=this.overlayerCEl,n=this.toolbar,r=this.selector,i=this.el,o=this.verticalScrollbar,a=this.horizontalScrollbar,s=this.data,u=this.table,c=this.sheetScale,l=this.moveablelayerEl,h=(s.sheetScale=c,this.getTableOffset()),f=this.getRect(),d=this.getORect();this.tableElOffset(f),e.offset(f),l.offset(h),t.offset(h),i.attr(d),i.css("width","".concat(d.width,"px")),i.css("height","".concat(d.height,"px")),AW.call(this),vW.call(this),function(){var e=this.selector,t=this.data,n=this.editor,r=t.freeze,i=(r=lW(r=t.settings.disableFreeze?[0,0]:r,2))[0];r=r[1];(0<i||0<r)&&(i=t.freezeTotalWidth(),r=t.freezeTotalHeight(),n.setFreezeLengths(i,r)),e.resetAreaOffset()}.call(this),c>window.devicePixelRatio&&(window.tizdata_dpr_param=c),"none"===o.el.el.style.display&&s.scrolly(0,(function(){})),"none"===a.el.el.style.display&&s.scrollx(0,(function(){})),r.reset(),n.reset(),u.render()}function yW(){var e=this.data,t=this.selector;e.clearClipboard(),t.hideClipboard()}function wW(){var e=this.data,t=this.selector,n=e.settings.showClipboard;e.copy(),e.copyToSystemClipboard(),n&&t.showClipboard()}function xW(){var e=this.data,t=this.selector;e.cut(),t.showClipboard()}function CW(e,t){var n=this.data;"read"!==n.settings.mode&&(n.paste(e,(function(e){return Hd("Tip",e)}))?bW.call(this):t&&"body"==t.target.localName&&(n=t.clipboardData.getData("text/plain"),this.data.pasteFromText(n),bW.call(this)))}function kW(e,t){this.data.unhideRowsOrCols(e,t),bW.call(this)}function EW(){this.data.autofilter(),bW.call(this)}function SW(e){var t,n,r,i,o,a=this,s=this.selector,u=this.data,c=this.table,l=this.sortFilter,h=this.toolbar,f=(this.el,this.sheet_globaltime),d=e.layerX,p=e.layerY,m=e.target.className==="".concat(pe,"-selector-corner"),g=u.getCellRectByXY(d,p),A=g.left,v=g.top,b=g.width,y=g.height,w=g.ri,x=g.ci,C=u.getCell(w,x),k=(C&&C.fold&&(g=C.fold.isOpen,t=c.draw,n={x:A,y:v},k={offsetX:d,offsetY:p},r=i=0,o=u.scroll,C.merge&&(i=25,r=60),i-=o.y,o={left:A+10+(r-=o.x),right:A+19+r,top:v+4+i,bottom:v+19+i},C.fold.row&&_W(k,o,u.rows.cellFold,[C,w,t,n,!g,u.rows]),C.fold.col&&_W(k,o,u.cols.cellFold,[C,x,t,n,!g,u.cols]),this.reload()),!u.settings.disableRunScript&&C&&C.links&&(1<(r=C.links.length)?(i=C.links.map((function(e){return{name:e.linkName||e.reportName||"",value:e.url,data:e}})),this.linkSelectShow(i),function(e,t){var n=this.linkSelect,r=(e=this.data.getSelectedRect({sri:e,eri:e,sci:t,eci:t}),t=this.getTableOffset(),"top");e.top>t.height/2&&(r="bottom"),n.setOffset((uW(t={},r,e.top+e.height),uW(t,"left",e.left),t))}.call(this,w,x)):1==r&&zd(C.links[0],C,this,w)),C&&10==C.type&&(1==C.controlType?C.isChecked=!C.isChecked:2==C.controlType&&C.script&&!u.settings.disableRunScript&&1==C.clickType&&new Function("sheet",C.script)(this)),u.autoFilter);if(k.includes(w,x)&&A+b-20<d&&v+y-20<p)return o=k.items(x,(function(e,t){return u.rows.getCell(e,t)})),l.set(x,o,k.getFilter(x),k.getSort(x)),void l.setOffset({left:A,top:v+y+2});e.shiftKey||(m?s.showAutofill(w,x):dW.call(this,!1,w,x),Ce(window,(function(e){var t=e.layerX,n=e.layerY;t=u.getCellRectByXY(t,n);w=t.ri,x=t.ci,m?s.showAutofill(w,x):1!==e.buttons||e.shiftKey||dW.call(a,!0,w,x,!0,!0),f&&clearInterval(f),C&&-1<C.penetrate||(f=setInterval((function(){(function(e){for(var t=this.my_evt,n=t.clientX,r=t.offsetY,i=(this.data,this.verticalScrollbar),o=this.horizontalScrollbar,a=this.el.el.offsetWidth,s=this.el.el.offsetHeight;a-80<n;){o.el.el.scrollLeft+=50;break}for(;n<120;){o.el.el.scrollLeft-=50;break}for(;s-70<r;){i.el.el.scrollTop+=15;break}for(;r<50;){i.el.el.scrollTop-=15;break}}).call(a,a.evt)}),100))}),(function(e){m&&s.arange&&"read"!==u.settings.mode&&u.autofill(s.arange,"all",(function(e){return Hd("Tip",e)}))&&c.render();var t=s.range,n=(t=(w<0&&x<0?a.trigger("selected-no"):w<0?t.sci===t.eci&&a.trigger("selected-col",x):x<0&&t.sri===t.eri&&a.trigger("selected-row",w),f&&clearInterval(f),s.hideAutofill(),h.paintformatActive()||a.data.paintformat),function(e){var t=this.toolbar;e&&(CW.call(this,"format"),yW.call(this),t.paintformatToggle())}.call(a,t),t&&dW.call(a,!1,w,x),e.layerX);e=e.layerY,n=u.getCellRectByXY(n,e);pW.call(a,n.ri,n.ci),t&&(a.data.paintformat=!1)}))),m||1!==e.buttons||e.shiftKey&&dW.call(this,!0,w,x)}function _W(e,t,n,r,i,o){r=3<arguments.length&&void 0!==r?r:[],i=4<arguments.length?i:void 0,o=5<arguments.length&&void 0!==o?o:[];var a=e.offsetX,s=(e=e.offsetY,t.left),u=t.right,c=t.top;t=t.bottom;s<=a&&a<u&&c<=e&&e<t?n&&n.apply(void 0,cW(r)):i&&i.apply(void 0,cW(o))}function OW(e,t){var n=e.el;e.isChangeMouseStatus=!!t,n.el.style.cursor=t}function TW(){var e=this.editor,t=this.data.getSelectedRect(),n=this.getTableOffset(),r="top";t.top>n.height/2&&(r="bottom"),e.setOffset(t,r)}function DW(){var e,t,n,r=this.editor,i=this.data,o=i.settings.mode;"read"!==o&&(e=i.getSelectedCell(),t=(n=i.selector).ri,n=n.ci,e&&2==e.valueType||"edit"===o&&e&&"editable"in e&&!1===e.editable||(TW.call(this),this.trigger("cell-editing",e,t,n),r.setCell(i.getSelectedCell(),i.getSelectedValidator()),yW.call(this)))}function BW(e){var t,n,r,i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"finished",o=this.data,a=this.table,s=o.settings.mode;"read"!==s&&(t=(n=o.selector).ri,n=n.ci,r=o.getCell(t,n),"edit"===s&&r&&"editable"in r&&!1===r.editable||(o.setSelectedCellText(e,i),"finished"===i?(this.trigger("cell-edited",r,t,n),a.render()):this.trigger("cell-editing",r,t,n)))}function IW(e,t){var n,r=this.data;"insert-row"===e?r.insert("row"):"delete-row"===e?r.delete("row"):"insert-column-left"===e?(n=parseInt(t),isNaN(n)?this.contextMenu.icLeftEl.setValue(""):(r.insert("column",n),this.contextMenu.hide())):"insert-column-right"===e?(n=parseInt(t),isNaN(n)?this.contextMenu.icRightEl.setValue(""):(r.insertCR(n),this.contextMenu.hide())):"delete-column"===e?r.delete("column"):"delete-cell"===e?r.deleteCell():"delete-cell-format"===e?r.deleteCell("format"):"delete-cell-text"===e?r.deleteCell("text"):"cell-printable"===e?r.setSelectedCellAttr("printable",!0):"cell-non-printable"===e?r.setSelectedCellAttr("printable",!1):"cell-editable"===e?r.setSelectedCellAttr("editable",!0):"cell-non-editable"===e&&r.setSelectedCellAttr("editable",!1),yW.call(this),bW.call(this)}function MW(){var e,t,n,r,i,o=this,a=this.selector,s=this.overlayerEl,u=this.rowResizer,c=this.colResizer,l=this.verticalScrollbar,h=this.horizontalScrollbar,f=this.editor,d=this.contextMenu,p=this.toolbar,m=this.modalValidation,g=this.sortFilter,A=this.data,v=(d.itemClick=function(e,t){"validation"===e?m.setValue(o.data.getSelectedValidation()):"copy"===e?wW.call(o):"cut"===e?xW.call(o):"paste"===e?CW.call(o,"all"):"paste-value"===e?CW.call(o,"text"):"paste-format"===e?CW.call(o,"format"):"hide"===e?function(){this.data.hideRowsOrCols(),bW.call(this)}.call(o):"unhide"===e?function(){this.data.my_unhideRowsOrCols(),bW.call(this)}.call(o):"adjustHeightOrWight"===e?o.buildDialog():IW.call(o,e,t)},s.on("mousemove",(function(e){(function(e){var t,n,r,i,o,a,s,u,c,l,h,f,d;0===e.buttons&&e.target.className!=="".concat(pe,"-resizer-hover")&&(t=e.layerX,e=e.layerY,n=this.rowResizer,r=this.colResizer,i=this.tableEl,f=this.data,this.el,o=this.isChangeMouseStatus,a=f.rows,s=f.cols,u=f.settings,c=f.getCellRectByXY(t,e),(h=f.getCell(c.ri,c.ci))&&h.fold?(d=l=0,f=f.scroll,h.merge&&(l=25,d=60),l-=f.y,d-=f.x,_W({offsetX:t,offsetY:e},{left:c.left+10+d,right:c.left+19+d,top:c.top+4+l,bottom:c.top+19+l},OW,[this,"pointer"],OW,[this,""])):o&&OW(this,""),h=u.hideRowCol?0:s.indexWidth,f=u.hideRowCol?0:a.height,h<t&&f<e?(n.hide(),r.hide()):(d=i.box(),0<=c.ri&&-1===c.ci?(c.width=h,n.show(c,{width:d.width}),a.isHide(c.ri-1)?n.showUnhide(c.ri):n.hideUnhide()):n.hide(),-1===c.ri&&0<=c.ci?(c.height=f,r.show(c,{height:d.height}),s.isHide(c.ci-1)?r.showUnhide(c.ci):r.hideUnhide()):r.hide()))}).call(o,e),o.my_evt=e})).on("mousedown",(function(e){f.clear(),d.hide();var t=e.layerX,n=e.layerY;2===e.buttons?(o.data.xyInSelectedRect(t,n),d.setPosition(t,n),e.stopPropagation()):2===e.detail?(function(e){this.editor;var t=this.data,n=e.layerX;e=e.layerY,e=(n=t.getCellRectByXY(n,e)).ri,n=n.ci,t=t.getCell(e,n);this.trigger("dbclick",t,e,n)}.call(o,e),DW.call(o)):SW.call(o,e)})).on("mousewheel.stop",(function(e){e.preventDefault(),gW.call(o,e)})).on("mouseout",(function(e){var t=e.offsetX;e.offsetY<=0&&c.hide(),t<=0&&u.hide()})),a.inputChange=function(e){BW.call(o,e,"input"),DW.call(o)},a=s.el,t=(e={move:function(e,t){(function(e,t){var n=this.verticalScrollbar,r=this.horizontalScrollbar,i=n.scroll().top,o=r.scroll().left;"left"===e||"right"===e?r.move({left:o-t}):"up"!==e&&"down"!==e||n.move({top:i-t})}).call(o,e,t)}}).move,n=e.end,i=r=0,be(a,"touchstart",(function(e){var t=(e=e.touches[0]).pageX;e=e.pageY;r=t,i=e})),be(a,"touchmove",(function(e){var n,o,a,s;t&&(n=(o=e.changedTouches[0]).pageX,o=o.pageY,a=n-r,s=o-i,(10<Math.abs(a)||10<Math.abs(s))&&(ke(a,s,e,t),r=n,i=o),e.preventDefault())})),be(a,"touchend",(function(e){var t,o;n&&(t=(o=e.changedTouches[0]).pageX,o=o.pageY,ke(t-r,o-i,e,n))})),p.change=function(e,t){return function(e,t){var n,r,i=this.data;"undo"===e?this.undo():"redo"===e?this.redo():"print"===e?this.print.preview():"copy"===e?wW.call(this):"paste"===e?CW.call(this,"all"):"cut"===e?xW.call(this):"paintformat"===e?!0===t?(wW.call(this),i.paintformat=!0):yW.call(this):"clearformat"===e?IW.call(this,"delete-cell-format"):"link"!==e&&"chart"!==e&&("autofilter"===e?EW.call(this):"freeze"===e?t?(n=(r=i.selector).ri,r=r.ci,this.freeze(n,r)):this.freeze(0,0):"indent"===e||"indentIsAdd"===e?(i.setSelectedCellAttr(e,t),bW.call(this)):"indentReduce"===e?(i.setSelectedCellAttr("indent",t),bW.call(this)):"group"==e?this.trigger("groupment"):"importXlsx"==e?this.trigger("importXlsx"):(i.setSelectedCellAttr(e,t),"formula"!==e||i.selector.multiple()||DW.call(this),bW.call(this)))}.call(o,e,t)},g.ok=function(e,t,n,r){return function(e,t,n,r){this.data.setAutoFilter(e,t,n,r),bW.call(this)}.call(o,e,t,n,r)},u.finishedFn=function(e,t){(function(e,t){e=e.ri;var n=this.table,r=this.selector,i=this.data;i.rows.setAuto(e,!1),i.rows.setHeight(e,t),n.render(),r.resetAreaOffset(),AW.call(this),TW.call(this)}).call(o,e,t)},c.finishedFn=function(e,t){(function(e,t){var n=e.ci,r=(e=(e.ri,this.table),this.selector);this.data.cols.setWidth(n,t),e.render(),r.resetAreaOffset(),vW.call(this),TW.call(this)}).call(o,e,t)},u.unhideFn=function(e){kW.call(o,"row",e)},c.unhideFn=function(e){kW.call(o,"col",e)},0),b=(l.moveFn=function(e,t){(function(e){var t=this,n=this.data,r=this.table,i=this.selector;n.fbi_vtotalDis?n.setFbiVDistance(e-n.fbi_vtotalDis,e):n.setFbiVDistance(e,e),n.scrolly(e,(function(){i.resetBRLAreaOffset(),TW.call(t),r.render()}))}).call(o,e,t);var n,r=o.data.scroll.YDirection,i=o.charts[o.data.name];for(n in i){var a=(s=i[n]).charts,s=s.moveable,u=Math.abs(e-v),c=a.el.el.style.top,l=a.el.el.style.left;c=c?parseFloat(c):0,l=l?parseFloat(l):0;(u=(0<r?c-=u:c+=u,ve()(a.el.el).css("top",c+"px"),o.selecto.targets[0]))&&n==u.id&&ve()(s.moveable.selfElement).css({transform:"translate3d(".concat(l,"px, ").concat(c,"px, 0px)")})}v=e},0);h.moveFn=function(e,t){(function(e){var t=this,n=this.data,r=this.table,i=this.selector;n.fbi_htotalDis?n.setFbiHDistance(e-n.fbi_htotalDis,e):n.setFbiHDistance(e,e),n.scrollx(e,(function(){i.resetBRTAreaOffset(),TW.call(t),r.render()}))}).call(o,e,t);var n,r=o.data.scroll.XDirection,i=o.charts[o.data.name];for(n in i){var a=(s=i[n]).charts,s=s.moveable,u=Math.abs(e-b),c=a.el.el.style.left,l=(l=a.el.el.style.top)?parseFloat(l):0;c=c?parseFloat(c):0;(u=(0<r?c-=u:c+=u,ve()(a.el.el).css("left",c+"px"),o.selecto.targets[0]))&&n==u.id&&ve()(s.moveable.selfElement).css({transform:"translate3d(".concat(c,"px, ").concat(l,"px, 0px)")})}b=e},f.change=function(e,t){"placeholder"===e?function(e){var t,n,r=this.data;this.table,"read"!==r.settings.mode&&(t=(n=r.selector).ri,n=n.ci,r.setCellPlaceholder(t,n,e,"finished"))}.call(o,t):BW.call(o,t,e)},m.change=function(e){if("save"===e){for(var t=arguments.length,n=new Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];(e=o.data).addValidation.apply(e,n)}else o.data.removeValidation()},be(window,"resize",(function(){o.reload()})),be(window,"click",(function(e){window.spreadsheetFocusing=s.contains(e.target)})),be(window,"paste",(function(e){CW.call(o,"all",e)})),be(window,"keydown",(function(e){var t,n=e.keyCode||e.which,r=e.key,i=e.ctrlKey,a=e.shiftKey,s=e.metaKey,u=!1;if(i||s||8!==n&&"Delete"!==r||(t=o.getSelectedChart())&&(o.deleteSelectedChart(t),u=!0),window.spreadsheetFocusing)if(i||s)switch(n){case 90:o.undo(),e.preventDefault();break;case 89:o.redo(),e.preventDefault();break;case 67:wW.call(o),e.preventDefault();break;case 88:xW.call(o),e.preventDefault();break;case 85:p.trigger("underline"),e.preventDefault();break;case 86:break;case 37:mW.call(o,a,"row-first"),e.preventDefault();break;case 38:mW.call(o,a,"col-first"),e.preventDefault();break;case 39:mW.call(o,a,"row-last"),e.preventDefault();break;case 40:mW.call(o,a,"col-last"),e.preventDefault();break;case 32:dW.call(o,!1,-1,o.data.selector.ci,!1),e.preventDefault();break;case 66:p.trigger("bold");break;case 73:p.trigger("italic")}else{switch(n){case 32:a&&dW.call(o,!1,o.data.selector.ri,-1,!1);break;case 27:d.hide(),yW.call(o);break;case 37:mW.call(o,a,"left"),e.preventDefault();break;case 38:mW.call(o,a,"up"),e.preventDefault();break;case 39:mW.call(o,a,"right"),e.preventDefault();break;case 40:mW.call(o,a,"down"),e.preventDefault();break;case 9:f.clear(),mW.call(o,!1,a?"left":"right"),e.preventDefault();break;case 13:f.clear(),mW.call(o,!1,a?"up":"down"),e.preventDefault();break;case 8:u||IW.call(o,"delete-cell-text"),e.preventDefault()}"Delete"===r?(u||IW.call(o,"delete-cell-text"),e.preventDefault()):65<=n&&n<=90||48<=n&&n<=57||96<=n&&n<=105||"="===e.key||"$"===e.key?((t=A.selector).ri,t.ci,BW.call(o,e.key,"input"),DW.call(o)):113===n&&DW.call(o)}}))}function jW(e,t,n,r,i,o,a){NW(a,i,n.getAutoHeight(e,0,n,r,i,o)||25,o)}function NW(e,t,n,r){e.setAuto(t,r),e.setHeight(t,n)}var FW=function(){function e(t,n,r,i){var o=this;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.limitUse=i,this.eventMap=new Map;var a=(i=n.settings).view,u=i.showToolbar,c=i.showBottombar,l=i.showContextmenu,h=i.showPreviewToolbar;i=i.onQueryPlan;this.my_evt=null,this.tableEl=s("div","".concat(pe,"-table_transform")).child(s("canvas","".concat(pe,"-table"))),this.dialogR=new Be("row"),this.dialogC=new Be("col"),this.$parent=r,this.adjustRC=null,this.sheetScale=1,this.isShowRC=!0,this.isChangeMouseStatus=!1,this.sheet_globaltime=null,this.rowResizer=new Le(!1,n.rows.minHeight),this.colResizer=new Le(!0,n.cols.minWidth),this.verticalScrollbar=new ze(!0,c),this.horizontalScrollbar=new ze(!1,c),this.editor=new xt(Mt,(function(){return o.getTableOffset()}),n.rows.height,n),this.modalValidation=new xd,this.selector=new it(n),this.contextMenu=new pc((function(){return o.getRect()}),!l,this.selector),this.toolbar=new ad(n,a.width,!u,this.selector),this.previewToolbar=new ip(n,r,h,i),this.el=s("div","".concat(pe,"-sheet")),this.table=new On(this.tableEl.el.children[0],n,AW,TW,this),this.print=new Ln(n,this.table),t.children(this.el),this.data=n,this.overlayerCEl=s("div","".concat(pe,"-overlayer-content")).children(this.editor.el,this.selector.el),this.overlayerEl=s("div","".concat(pe,"-overlayer")).child(this.overlayerCEl),this.selectolayerEl=s("div","".concat(pe,"-selectolayer")),this.moveablelayerEl=s("div","".concat(pe,"-moveablelayer")).children(this.selectolayerEl),this.showMoveablelayerEl=s("div","".concat(pe,"-moveablelayer")).css({width:"100%",height:"100%"}),this.showMoveablelayerEl.hide(),this.charts={},this.moveable=new Gw(null,this.moveablelayerEl.el,this.data,this),this.selecto=new aW(this.selectolayerEl.el,this.moveable,this),this.sortFilter=new _d,this.linkSelect=new Re([],(function(e){(function(e){var t=(n=this.selector.range).sri,n=n.sci,r=this.data.getCell(t,n);zd(e.data,r,this,t)}).call(o,e)})),this.el.children(this.tableEl,this.overlayerEl.el,this.showMoveablelayerEl.el,this.moveablelayerEl.el,this.rowResizer.el,this.colResizer.el,this.verticalScrollbar.el,this.horizontalScrollbar.el,this.contextMenu.el,this.modalValidation.el,this.sortFilter.el,this.dialogR.el,this.dialogC.el,this.linkSelect.el),this.data.settings.showSelect&&dW.call(this,!1,0,0),MW.call(this,n),bW.call(this)}var t,n;return t=e,(n=[{key:"getPivotData",value:function(){return this.previewToolbar.getPivotData()}},{key:"initChart",value:function(e,t,n){var r,i,o,a,s,u,c=this;this.limitUse||(r=e.position,i=e.chartOption,o=e.group,a=e.type,s=t,null,u=n?(this.moveablelayerEl.show(),this.showMoveablelayerEl.hide(),this.moveablelayerEl):(this.moveablelayerEl.hide(),this.showMoveablelayerEl.show(),this.showMoveablelayerEl),setTimeout((function(){var e=new FG(c,i,u,s,o,r,n,a);c.charts[c.data.name]?c.charts[c.data.name][s]={charts:e,moveable:c.moveable}:c.charts[c.data.name]=uW({},s,{charts:e,moveable:c.moveable})})))}},{key:"createChart",value:function(e,t,n){var r,i,o=this;this.limitUse||(r="".concat(pe,"-").concat((new Date).getTime()),i=new FG(this,e.option,this.moveablelayerEl,r,t,{},n,e.type),this.charts[this.data.name]?this.charts[this.data.name][r]={charts:i,moveable:this.moveable}:this.charts[this.data.name]=uW({},r,{charts:i,moveable:this.moveable}),setTimeout((function(){o.moveable.moveable.target=[i.el.el]})))}},{key:"getSelectedChart",value:function(){var e=null,t=this.charts[this.data.name];if(t)for(var n in t){var r=this.selecto.targets[0];if(r&&r.id==n){e=t[n];break}}return e}},{key:"deleteSelectedChart",value:function(e){e.charts.el.el.remove(),delete this.charts[this.data.name][e.charts.chartID],this.unSelectedChart()}},{key:"unSelectedChart",value:function(){this.moveable&&this.moveable.moveable&&(this.moveable.moveable.target=[])}},{key:"offSheetGlobalTime",value:function(){this.sheet_globaltime=null}},{key:"linkSelectShow",value:function(e){var t=this.linkSelect;t.setItems(e),t.addItem()}},{key:"hidePrintLine",value:function(){this.table.printConfig=!1,this.table.render()}},{key:"showPrintLine",value:function(e){this.table.printConfig=e,this.table.render()}},{key:"createData",value:function(e,t,n){return(e=new de(e,0,n)).setData(t),e}},{key:"tableElOffset",value:function(e){var t=this.isShowRC,n=this.tableEl,r=this.sheetScale,i=this.table,o=(this.data,0),a=0;t||n.css({position:"absolute",left:-(o=60*r)+"px",top:-(a=25*r)+"px"}),1!==r?(t={width:e.width/r+o,height:e.height/r+a},n.css({width:t.width+"px",height:t.height+"px"}),n.css({"transform-origin":"left top",transform:"scale(".concat(r,")")}),i.draw.setScale(t)):(r=e.width+o,t=e.height+a,n.css({width:e.width+o+"px",height:e.height+a+"px"}),0!=o&&0!=a&&i.draw.setScale({width:r,height:t}))}},{key:"on",value:function(e,t){return this.eventMap.set(e,t),this}},{key:"flexSet",value:function(){this.table.isRender=!0,this.table.render(),this.table.isRender=!1,this.selector.resetAreaOffset(),AW.call(this),TW.call(this)}},{key:"trigger",value:function(e){var t=this.eventMap;if(t.has(e)){for(var n=arguments.length,r=new Array(1<n?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];(t=t.get(e)).call.apply(t,[this].concat(r))}}},{key:"toolbarChange",value:function(e,t){var n,r,i=this.data;"undo"===e?this.undo():"redo"===e?this.redo():"print"===e?this.print.preview():"copy"===e?wW.call(this):"paste"===e?CW.call(this,"all"):"cut"===e?xW.call(this):"paintformat"===e?(!0===t?(this.data.paintformat=!0,wW):yW).call(this):"clearformat"===e?IW.call(this,"delete-cell-format"):"link"!==e&&"chart"!==e&&("autofilter"===e?EW.call(this):"freeze"===e?t?(n=(r=i.selector).ri,r=r.ci,this.freeze(n,r)):this.freeze(0,0):"indent"===e||"indentIsAdd"===e?(i.setSelectedCellAttr(e,t),bW.call(this)):"indentReduce"===e?(i.setSelectedCellAttr("indent",t),bW.call(this)):"group"==e?this.trigger("groupment"):"importXlsx"==e?this.trigger("importXlsx"):(i.setSelectedCellAttr(e,t),"formula"!==e||i.selector.multiple()||DW.call(this),bW.call(this)))}},{key:"buildDialog",value:function(){var e,t,n;"row"==this.adjustRC?(e=!(n=25),(t=this.data.rows.get(this.selector.range.eri))&&(t.height&&(n=t.height),e=t.auto),this.dialogR.el.show(),this.dialogC.el.hide(),this.dialogR.setShowVal(n,e),this.dialogR.setCb(this.selector.range,this.autoRowResizerFinished,this.table,this.selector,this.data,this)):"col"==this.adjustRC?(n=!(t=100),(e=this.data.cols.get(this.selector.range.eci))&&(e.width&&(t=e.width),n=e.auto),this.dialogR.el.hide(),this.dialogC.el.show(),this.dialogC.setShowVal(t,n),this.dialogC.setCb(this.selector.range,this.autoColResizerFinished,this.table,this.selector,this.data,this,t)):(this.dialogR.el.hide(),this.dialogC.el.hide())}},{key:"resetScrollXY",value:function(){var e=this.data,t=this.verticalScrollbar,n=this.horizontalScrollbar;e.scroll&&(e.scroll.x=0,e.scroll.y=0,e.scroll.ri=0,e.scroll.ci=0,e.scrolly(0,(function(){})),e.scrollx(0,(function(){})),t.el.el.scrollTop=0,n.el.el.scrollLeft=0)}},{key:"autoRowResizerFinished",value:function(e,t,n,r,i,o,a){var s=i.rows;if(a){var u=document.createElement("canvas"),c=new _t.a(u,100,100);if(Array.isArray(e))for(var l=(u=lW(e,2))[0],h=u[1],f=l;f<=h;f++)jW(i,0,n,c,f,a,s);else jW(i,0,n,c,e,a,s)}else if(Array.isArray(e)){l=(u=lW(e,2))[0];for(var d=u[1],p=l;p<=d;p++)NW(s,p,t,a)}else NW(s,e,t,a);o.rowResizerFinished(n,r,o,!0)}},{key:"rowResizerFinished",value:function(e,t,n,r){e.render(!1,!1,r),t.resetAreaOffset(),AW.call(n),TW.call(n)}},{key:"autoColResizerFinished",value:function(e,t,n,r,i,o,a){if(Array.isArray(e))for(var s=lW(e,2),u=s[0],c=s[1],l=u;l<=c;l++)i.cols.setWidth(l,t);else i.cols.setWidth(e,t);o.colResizerFinished(n,r,o)}},{key:"colResizerFinished",value:function(e,t,n){e.render(),t.resetAreaOffset(),vW.call(n),TW.call(n)}},{key:"verticalScrollbarSet",value:function(e){var t=this.data,n=this.verticalScrollbar,r=this.sheetScale,i=t.exceptRowTotalHeight(0,-1);t=this.scrollTableOffset(t.rows.totalHeight()-i,"height");n.set(t,r)}},{key:"resetData",value:function(e,t){if(this.editor.clear(),e.name!=this.data.name){var n,r,i=[],o=[];for(n in this.charts)for(r in this.charts[n])(n!=e.name?i:o).push(r);i.forEach((function(e){document.getElementById(e).style.display="none"})),o.forEach((function(e){document.getElementById(e).style.display="block"})),this.unSelectedChart()}this.data=e,AW.call(this),vW.call(this),this.print.resetData(e),this.selector.resetData(e),this.toolbar.resetData(e);var a=e.settings.showPreviewToolbar;"design"!=this.$parent.sheetType&&a&&!t&&this.previewToolbar.render(e),this.table.resetData(e)}},{key:"loadData",value:function(e){return this.data.setData(e),bW.call(this),this}},{key:"sheetReset",value:function(e,t){bW.call(this)}},{key:"freeze",value:function(e,t){return this.data.setFreeze(e,t),bW.call(this),this}},{key:"undo",value:function(){this.data.undo(),bW.call(this)}},{key:"redo",value:function(){this.data.redo(),bW.call(this)}},{key:"reload",value:function(){return bW.call(this),this}},{key:"setSheetScale",value:function(e){void 0!==e&&(this.sheetScale=e,this.data.sheetScale=e)}},{key:"setSheetIsShowRC",value:function(e){void 0!==e&&(this.isShowRC=!e)}},{key:"getRect",value:function(){var e=this.data;return{width:e.viewWidth(),height:e.viewHeight()}}},{key:"getORect",value:function(){var e=this.data;return{width:e.viewWidth(!0),height:e.viewHeight(!0)}}},{key:"getTableOffset",value:function(e){var t=(r=this.data).rows,n=r.cols,r=r.settings,i=this.sheetScale,o=(e=e?this.getORect():this.getRect()).width;e=e.height;return{width:o-(n=r.hideRowCol?0:n.indexWidth)*i,height:e-(r=r.hideRowCol?0:t.height)*i,left:n,top:r}}},{key:"scrollTableOffset",value:function(e,t){var n,r=(o=this.data).rows,i=o.cols,o=o.settings,a=!1,s=e,u=this.sheetScale,c=this.isShowRC,l=(s*=u,this.getORect());i=o.hideRowCol?0:i.indexWidth,o=o.hideRowCol?0:r.height,r=c?(n=i*u,o*u):n=0,c=l.width-n,i=l.height-r;return{flag:a=s>l[t]||a,oWidth:c,oHeight:i,total:e}}},{key:"editorSet",value:function(e){"hide"==this.editor.status&&(this.editorSetOffset(),this.editor.show()),this.editor.setText(e)}},{key:"editorSetOffset",value:function(){var e=this.editor,t=this.data.getSelectedRect(),n=this.getTableOffset(),r="top";t.top>n.height/2&&(r="bottom"),e.setOffset(t,r)}}])&&sW(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function RW(e){return(RW="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function PW(e){return function(e){if(Array.isArray(e))return UW(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||LW(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function LW(e,t){var n;if(e)return"string"==typeof e?UW(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?UW(e,t):void 0}function UW(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function zW(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function HW(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function $W(e,t,n){t&&HW(e.prototype,t),n&&HW(e,n),Object.defineProperty(e,"prototype",{writable:!1})}function QW(e,t){return(QW=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function VW(e){return(VW=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var qW=function(){var e=r,t=kl;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&QW(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=VW(e);n=t?(n=VW(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===RW(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(e){zW(this,r);var t=new ct("ellipsis");return(t=n.call(this,t,"auto",!1,{dropdownClass:"top-left",addContent:!0,isDropdown:!0})).contentClick=e,t}return $W(r,[{key:"reset",value:function(e){var t=this;e=e.map((function(e,n){return s("div","".concat(pe,"-item")).css("width","150px").css("font-weight","normal").on("click",(function(){t.contentClick(n),t.hide()})).child(e)}));this.setContentChildren.apply(this,PW(e))}},{key:"setOffset",value:function(e){this.contentEl.offset(e)}},{key:"setTitle",value:function(){}}]),r}(),GW=[{key:"delete",title:z("contextmenu.deleteSheet")},{key:"copy",title:z("contextmenu.copySheet")},{key:"merge",title:z("contextmenu.mergeSheet")}];function WW(){var e=this;return GW.map((function(t){return function(e){var t=this;return s("div","".concat(pe,"-item")).child(e.title()).on("click",(function(){t.itemClick(e.key),t.hide()}))}.call(e,t)}))}function KW(e){var t,n,r=Math.max(Math.min(parseInt(e[0],10)/255,1),0),i=Math.max(Math.min(parseInt(e[1],10)/255,1),0),o=(e=Math.max(Math.min(parseInt(e[2],10)/255,1),0),Math.max(r,i,e)),a=Math.min(r,i,e),s=(o+a)/2;return o!==a?(t=o-a,n=.5<s?t/(2-o-a):t/(o+a),t=o===r?(i-e)/t+(i<e?6:0):o===i?(e-r)/t+2:(r-i)/t+4,t/=6):t=n=0,[Math.round(360*t),Math.round(100*n),Math.round(100*s)]}function YW(e){var t,n,r,i,o,a=Math.max(Math.min(parseInt(e[0],10),360),0)/360,s=Math.max(Math.min(parseInt(e[1],10),100),0)/100,u=(e=Math.max(Math.min(parseInt(e[2],10),100),0)/100)<=.5?e*(1+s):e+s-e*s;if(0===u)return[0,0,0];switch(n=u*((u-(t=2*e-u))/u)*((a*=6)-(s=Math.floor(a))),s){case 1:r=u-n,i=u,o=t;break;case 2:i=u,o=(r=t)+n;break;case 3:r=t,i=u-n,o=u;break;case 4:r=t+n,i=t,o=u;break;case 5:i=t,o=(r=u)-n;break;default:r=u,i=t+n,o=t}return[Math.round(255*r),Math.round(255*i),Math.round(255*o)]}function XW(e){if(e.length<2||6<e.length)return!1;var t,n,r,i=e.split("");if(2===e.length)r=n=t=parseInt(i[0].toString()+i[1].toString(),16);else if(3===e.length)t=parseInt(i[0].toString()+i[0].toString(),16),n=parseInt(i[1].toString()+i[1].toString(),16),r=parseInt(i[2].toString()+i[2].toString(),16);else{if(6!==e.length)return!1;t=parseInt(i[0].toString()+i[1].toString(),16),n=parseInt(i[2].toString()+i[3].toString(),16),r=parseInt(i[4].toString()+i[5].toString(),16)}return[t,n,r]}function JW(e){var t=Math.max(Math.min(parseInt(e[0],10),255),0),n=Math.max(Math.min(parseInt(e[1],10),255),0);e=Math.max(Math.min(parseInt(e[2],10),255),0);return(t=15<t?t.toString(16):"0"+t.toString(16))+(n=15<n?n.toString(16):"0"+n.toString(16))+(15<e?e.toString(16):"0"+e.toString(16))}var ZW=function(){function e(){var t;zW(this,e),this.el=(t=s("div","".concat(pe,"-contextmenu")).css("width","160px")).children.apply(t,PW(WW.call(this))).hide(),this.itemClick=function(){}}return $W(e,[{key:"hide",value:function(){var e=this.el;e.hide(),we(e)}},{key:"setOffset",value:function(e){var t=this.el;t.offset(e),t.show(),xe(t)}}]),e}(),eK=function(){function e(){zW(this,e),this.el=s("div","".concat(pe,"-dragflag")),this.dragElWidth=10,this.height=40}return $W(e,[{key:"hide",value:function(){this.el.hide()}},{key:"show",value:function(){this.el.show()}},{key:"getElWidth",value:function(){var e=this.el;return null!=e.el.style.width&&0<e.el.style.width.length?e.el.style.width||0:e.el.currentStyle?e.el.currentStyle.width||0:window.getComputedStyle?parseInt(document.defaultView.getComputedStyle(e.el,null).width):0}},{key:"setOffset",value:function(e){var t=this.el;t.offset(e),t.show()}}]),e}(),tK=function(){function e(){var t=this,n=0<arguments.length&&void 0!==arguments[0]?arguments[0]:function(){},r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:function(){},i=2<arguments.length&&void 0!==arguments[2]?arguments[2]:function(){},o=3<arguments.length&&void 0!==arguments[3]?arguments[3]:function(){},a=4<arguments.length&&void 0!==arguments[4]?arguments[4]:function(){};zW(this,e),this.swapFunc=r,this.eventMap=new Map,this.updateFunc=o,this.changeSheetFunc=a,this.dataNames=[],this.activeEl=null,this.deleteEl=null,this.items=[],this.moreEl=new qW((function(e){t.clickSwap2(t.items[e],!0)})),this.direction=1,this.moreEl.setOffset({bottom:30}),this.oChangeIndex=null,this.nChangeIndex=null,this.changeNodeName=null,this.dragImg=new Image,this.dragImg.src=me,this.contextMenu=new ZW,this.contextMenu.itemClick=i,this.dragFlagEl=new eK,this.showBottombarMenu=!0,this.interceptMap=new Map,this.menuEl=s("ul","".concat(pe,"-menu")).child(s("li","").children(new ct("add").on("click",(function(){n()})),s("span","").child(this.moreEl))),this.bottombarEl=s("div","".concat(pe,"-bottombar-menu")),this.el=s("div","".concat(pe,"-bottombar")).children(this.contextMenu.el,this.menuEl.el,this.bottombarEl,this.dragFlagEl.el),this.el.on("dragover",(function(e){e.preventDefault()})).on("drop",(function(e){t.changeSheet(),t.dragFlagEl.hide()})).on("dragenter",(function(e){e.preventDefault(),e.srcElement.className==="".concat(pe,"-bottombar-menu")?(t.dragFlagEl.setOffset({left:e.x-t.dragFlagEl.dragElWidth/2,bottom:t.dragFlagEl.height+1}),t.nChangeIndex=t.items.length-1):e.srcElement.className!=="".concat(pe,"-bottombar")&&e.srcElement.parentNode.className!=="".concat(pe,"-bottombar")||(t.nChangeIndex=0)}))}return $W(e,[{key:"hideMenu",value:function(){this.contextMenu.hide(),this.menuEl.hide(),this.showBottombarMenu=!1}},{key:"trigger",value:function(e){var t=this.eventMap;if(t.has(e)){for(var n=arguments.length,r=new Array(1<n?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];(t=t.get(e)).call.apply(t,[this].concat(r))}}},{key:"on",value:function(e,t){return this.eventMap.set(e,t),this}},{key:"interceptTrigger",value:function(e){var t=this.interceptMap;if(t.has(e)){for(var n=arguments.length,r=new Array(1<n?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];(t=t.get(e)).call.apply(t,[this].concat(r))}}},{key:"onIntercept",value:function(e,t){return this.interceptMap.set(e,t),this}},{key:"getElWidth",value:function(e){return null!=e.style.width&&0<e.style.width.length?e.style.width||0:e.currentStyle?e.currentStyle.width||0:window.getComputedStyle?parseInt(document.defaultView.getComputedStyle(e,null).width):0}},{key:"addItem",value:function(e,t,n){var r=this,i=this,o=(this.dataNames.push(e),0),a=s("li",t?"active":"").child(e);a.el.draggable=!0,a.on("click",(function(){r.clickSwap2(a);var t=r.items.findIndex((function(e){return e===a}));i.trigger("clickSheet",e,t),i.interceptTrigger("clickSheet",e,t)})).on("contextmenu",(function(e){var t,n;r.showBottombarMenu&&(t=(n=a.el.getBoundingClientRect()).left,n=n.height,r.contextMenu.setOffset({left:t,bottom:n+1}),r.deleteEl=a)})).on("dragstart",(function(e){o=e.x,r.changeNodeName=a.el.innerHTML;var t=a.el.getBoundingClientRect(),n=t.left,i=t.height;t.right,e.dataTransfer.setDragImage(r.dragImg,13,13),r.dragFlagEl.setOffset({left:n-r.dragFlagEl.dragElWidth/2,bottom:i+1})})).on("drag",(function(e){e.preventDefault();var t=r.items[r.items.length-1].el.getBoundingClientRect().right;e.x<=t&&(o>e.x?r.direction=-1:r.direction=1,(t=r.getItemsOffset(e.x,r.direction))&&(r.nChangeIndex=t.index,r.dragFlagEl.setOffset({left:t.x-r.dragFlagEl.dragElWidth/2,bottom:t.height+1})))})).on("drop",(function(e){r.changeSheet(),r.dragFlagEl.hide(),o=0})),n||a.on("dblclick",(function(e){var t;r.showBottombarMenu&&(e.preventDefault(),a.el.draggable=!1,t=a.html(),(e=new fd("auto","")).val(t),e.input.on("blur",(function(e){e=e.target.value;var n=r.dataNames.findIndex((function(e){return e===t}));r.renameItem(n,e),a.el.draggable=!0})),a.html("").child(e.el),e.focus())})),t&&this.clickSwap(a),this.items.push(a),this.bottombarEl.child(a),this.moreEl.reset(this.dataNames)}},{key:"changeData",value:function(e,t,n){var r=e[t],i=e[n];e[t]=i,e[n]=r}},{key:"changeSheet",value:function(){var e=this;this.oChangeIndex=this.dataNames.findIndex((function(t){return t===e.changeNodeName})),this.changeData(this.items,this.oChangeIndex,this.nChangeIndex),this.changeData(this.dataNames,this.oChangeIndex,this.nChangeIndex),this.moreEl.reset(this.dataNames),this.exchange(this.items[this.oChangeIndex].el,this.items[this.nChangeIndex].el),this.changeSheetFunc(this.oChangeIndex,this.nChangeIndex)}},{key:"exchange",value:function(e,t){var n=e.parentNode,r=t.parentNode,i=Array.prototype.indexOf.call(n.children,e),o=Array.prototype.indexOf.call(r.children,t);this.nChangeIndex>this.oChangeIndex?(r.insertBefore(e,r.children[o]),this.insertAfter(t,n.children[i])):(r.insertBefore(t,r.children[i]),this.insertAfter(e,n.children[o]))}},{key:"insertAfter",value:function(e,t){t.parentNode.insertBefore(e,t.nextSibling)}},{key:"renameItem",value:function(e,t){var n=_.cloneDeep(this.dataNames),r=this.dataNames.splice(e,1,t),i=!1;n.forEach((function(e){e===t&&(i=!0)})),(i=r[0]!==t&&i)?(Hd("提示","已存在相同名称"),this.items[e].html("").child(r[0]),this.dataNames=n,this.updateFunc(e,r[0])):(this.moreEl.reset(this.dataNames),this.items[e].html("").child(t),this.updateFunc(e,t))}},{key:"getSheetIndex",value:function(e){return e=e||this.deleteEl,this.items.findIndex((function(t){return t===e}))}},{key:"getItemsOffset",value:function(e,t){for(var n=null,r=null,i=null,o=0;o<this.items.length;o++){var a=(u=this.items[o].el.getBoundingClientRect()).left,s=u.height,u=u.right;if(e<(0<t?87+a:u)){n=a,r=0<t&&0!=o?o-1:o,i=s;break}}if(null!=n)return{index:r,x:n,height:i}}},{key:"getSheetName",value:function(){return this.dataNames[this.getSheetIndex(this.deleteEl)]}},{key:"clear",value:function(){var e=this;this.items.forEach((function(t){e.bottombarEl.removeChild(t.el)})),this.items=[],this.dataNames=[],this.moreEl.reset(this.dataNames)}},{key:"deleteItem",value:function(){var e,t=this.activeEl,n=this.deleteEl;return 1<this.items.length?(e=this.items.findIndex((function(e){return e===n})),this.items.splice(e,1),this.dataNames.splice(e,1),this.bottombarEl.removeChild(n.el),this.moreEl.reset(this.dataNames),t===n?(t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(e,t)||LW(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(this.items,1)[0],this.activeEl=t,this.activeEl.toggle(),[e,0]):[e,-1]):[-1]}},{key:"clickSwap2",value:function(e,t){var n=this.items.findIndex((function(t){return t===e}));this.clickSwap(e),this.activeEl.toggle(),this.swapFunc(n),t&&this.interceptTrigger("dropdownSelectSheet",this.dataNames[n],n,e)}},{key:"swapByIndex",value:function(e){var t=this.items;this.clickSwap(t[e]),this.activeEl.toggle()}},{key:"clickSwap",value:function(e){null!==this.activeEl&&this.activeEl.toggle(),this.activeEl=e}},{key:"hide",value:function(){this.el.hide()}},{key:"show",value:function(){this.el.show()}}]),e}(),nK=(Ka=(n(270),n(271),n(272),n(387),n(218)),n.n(Ka));function rK(e){return(rK="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function iK(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function oK(e,t){e=e[0];var n=new FileReader;n.onload=function(e){e=e.target.result;var n=new nK.a.Workbook;n.xlsx.load(e).then((function(){!function(e,t){var n=(e=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(e,t)||function(e,t){var n;if(e)return"string"==typeof e?iK(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?iK(e,t):void 0}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(lK(e),3))[0];e[1],e[2],t.loadData(n),t.sheet.table.render()}(n,t)}))},n.readAsArrayBuffer(e)}function aK(e,t){var n={};if("font"==t){for(var r in e)n[r]=e[r];return n}if("border"==t){var i,o={left:[],right:[],top:[],bottom:[]};for(i in e)try{e[i].hasOwnProperty("style")?o[i].push(e[i].style):e[i].hasOwnProperty("color")&&o[i].push(e[i].color)}catch(e){}return o}}function sK(e,t){var n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(var r=0;r<n.length;r+=1){var i=n[r],o=e[i],a=t[i];if(void 0===a)return!1;if("string"==typeof o||"number"==typeof o||"boolean"==typeof o){if(o!==a)return!1}else if(Array.isArray(o)){if(o.length!==a.length)return!1;for(var s=0;s<o.length;s+=1)if(!sK(o[s],a[s]))return!1}else if("function"!=typeof o&&!Array.isArray(o)&&o instanceof Object&&!sK(o,a))return!1}return!0}function uK(e){return null!=(e=0===e?e.toString():e)&&"null"!=e&&null!=e&&"undefined"!=e&&""!=e}var cK="",lK=function(e){var t=[];if(e._themes)for(var n in e._themes)t=function(e){var t=[];try{var n,r,i=(new DOMParser).parseFromString(e,"text/xml").getElementsByTagName("a:clrScheme")[0],o=i.getElementsByTagName("a:sysClr"),a=i.getElementsByTagName("a:srgbClr");for(n in o){var s,u=o[n];for(s in u.attributes){var c=u.attributes[s];"lastClr"==c.name&&t.push(c.value)}}for(r in a){var l,h=a[r];for(l in h.attributes){var f=h.attributes[l];"val"==f.name&&-1==h.parentNode.nodeName.indexOf("link")&&t.push(f.value)}}}catch(e){}return t}(e._themes[n]);var r,i,o,a=[],s=(e.worksheets.forEach((function(e){var n={name:e.name,rows:{},styles:[],cols:{},merges:[]};try{var r=e.views[0].topLeftCell;"frozen"==e.views[0].state&&r&&(n.freeze=r)}catch(r){}r=e._rows;var i,o=e._merges;for(i in e._merges)n.merges.push(e._merges[i].shortRange);100<e.columnCount?n.cols.len=e.columnCount:n.cols.len=100;var s=0;r.forEach((function(r,i){var a={},u=r._cells,c=0;u.forEach((function(r,i){r._row.height?(c=r._row.height*(5/9),e.views&&(c*=2)):c=25,n.cols[i]||(r._column.width?n.cols[i]={width:8*r._column.width}:n.cols[i]={width:100});var s,l,h=r.formula?"="+r.formula:6==r.type?r.result:r.value&&"object"==rK(r.value)?r.text:r.value,f={};r.fill&&r.fill.hasOwnProperty("fgColor")&&((l=r.fill.fgColor).argb?(s=l.argb.substr(0,2),f.bgcolor="#"+l.argb.substr(2)+s):isNaN(l.indexed)?isNaN(l.theme)||isNaN(l.tint)||(s=t[l.theme])&&(s=KW(XW(s)),l.tint<0?s[2]=s[2]*(1+l.tint):s[2]=(240-s[2])*l.tint,f.bgcolor="#"+JW(YW(s))):(s=t[l.indexed])&&(f.bgcolor="#"+s)),r.font&&r.font.hasOwnProperty("color")&&((l=r.font.color).argb?(s=l.argb.substr(0,2),f.color="#"+l.argb.substr(2)+s):isNaN(l.indexed)?isNaN(l.theme)||isNaN(l.tint)||(s=t[l.theme])&&(s=KW(XW(s)),l.tint<0?s[2]=s[2]*(1+l.tint):s[2]=(240-s[2])*l.tint,f.color="#"+JW(YW(s))):(s=t[l.indexed])&&(f.color="#"+s)),r.font&&(f.font=aK(r.font,"font"),f.font.size||(f.font.size=10)),r.border&&0!=Object.keys(r.border).length&&(f.border=aK(r.border,"border")),r.alignment&&(r.alignment.horizontal&&(f.align=r.alignment.horizontal),r.alignment.vertical&&(f.valign=r.alignment.vertical),r.alignment.wrapText&&(f.textwrap=r.alignment.wrapText)),a[i]={},1==r.isMerged&&o[r.address]&&(l=o[r.address].model,s=Math.abs(l.right-l.left),l=Math.abs(l.bottom-l.top),a[i].merge=[l,s]),1==r.isMerged&&cK==h||(r.__mergeCount&&u[r.__mergeCount-1].address,cK=h,a[i].text=h,a[i].style=function(e,t){for(var n=0;n<e.length;n+=1){if(sK(e[n],t))return n}return e.push(t),e.length-1}(n.styles,f))})),s<i&&(s=i),n.rows[i]={height:c,cells:a}})),n.rows.len=s,a.push(n)})),100<a[0].rows.len?a[0].rows.len:100),u=50<a[0].cols.len?a[0].cols.len:50;return[(i=[],o=[],(r=a).forEach((function(e){var t,n=e.rows,r=e.styles,a=0,s=0,u=0;for(t in n){var c=n[t].cells,l=!1;if(u<s&&(u=s),s=0,c){for(var h in c){var f=c[h];(f.text||uK(r[f.style])&&uK(r[f.style].bgcolor))&&(l=!0,s=h)}l&&(a=t),l=!1}else a=t}i.push(a),o.push(u),e.rows.len=200<=a-1?a-1:200})),r.forEach((function(e,t){var n=i[t]+1,r=o[t]+1,a=e.rows;if(!(n<1))for(var s in a)if(parseInt(s)>n)delete a[s];else{var u=a[s].cells;if(u)for(var c in u)parseInt(c)-1>r&&delete u[c]}})),r),s,u]},hK=n(126);function fK(e,t){var n;if(e)return"string"==typeof e?dK(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?dK(e,t):void 0}function dK(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function pK(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function mK(e,t,n){var r=e;if(t.has(r))throw new TypeError("Cannot initialize the same private elements twice on an object");t.set(e,n)}function gK(e,t){return(t=vK(e,t,"get")).get?t.get.call(e):t.value}function AK(e,t,n){if((t=vK(e,t,"set")).set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}function vK(e,t,n){if(t.has(e))return t.get(e);throw new TypeError("attempted to "+n+" private field on non-instance")}n(273),n(274);var bK,yK,wK,xK,CK,kK,EK,SK,_K,OK,TK,DK,BK,IK,MK,jK,NK,FK,RK,PK,LK,UK,zK,HK,$K,QK,VK,qK,GK,WK,KK,YK,XK,JK,ZK,eY,tY,nY,rY,iY,oY,aY,sY,uY,cY,lY,hY,fY,dY,pY,mY,gY=new WeakMap,AY=new WeakMap,vY=Zo=function(){function e(t){var n=this,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},i=2<arguments.length?arguments[2]:void 0,o=3<arguments.length?arguments[3]:void 0,a=this,u=e;if(!(a instanceof u))throw new TypeError("Cannot call a class as a function");mK(this,gY,{writable:!0,value:!1}),mK(this,AY,{writable:!0,value:null}),a=t,this.options=r,this.sheetType="design",this.sheetIndex=0,AK(this,gY,i),AK(this,AY,o),this.datas=[],"string"==typeof t&&(a=document.querySelector(t)),this.bottombar=new tK((function(){var e;n.options.showEditSheetName||(e=n.addSheet()),n.sheet.resetData(e)}),(function(e){e=n.datas[e],n.sheet.resetData(e)}),(function(e){switch(e){case"delete":n.deleteSheet();break;case"copy":n.copySheet();break;case"merge":n.mergeSheet()}}),(function(e,t){n.datas[e].name=t}),(function(e,t){n.changeSheet(e,t)})),this.data=this.addSheet(),u=s("div","".concat(pe)).on("contextmenu",(function(e){return e.preventDefault()})),a.appendChild(u.el),this.sheet=new FW(u,this.data,this),this.config={},this.data.settings.showBottombar&&u.child(this.bottombar.el)}var t,n,r;return t=e,r=[{key:"locale",value:function(e,t){H(e,t)}}],(n=[{key:"gs",value:function(){return gK(this,gY)}},{key:"gsd",value:function(){return gK(this,AY)}},{key:"addSheet",value:function(e){var t=this,n=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],r=2<arguments.length?arguments[2]:void 0,i=3<arguments.length?arguments[3]:void 0,o=this.sheetIndex;i=i?Object.assign(this.options,i):this.options,e=this.checkName(e);return(o=new de(e,o,i)).change=function(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];(e=t.sheet).trigger.apply(e,["change"].concat(r))},this.datas.push(o),this.bottombar.addItem(e,n,r),this.sheetIndex+=1,o}},{key:"createColorPicker",value:function(e,t,n){try{var r=new El.ColorPicker({position:"inline",container:e,color:"white",outputFormat:"hex",hideDelay:0,onConfirm:function(e){t(e)},onCancel:function(){n()}});return r.setColorsInPalette(Sl),r}catch(e){}}},{key:"checkName",value:function(e,t){return e||(e=this.bottombar.dataNames,this.loopName(e,e={name:"sheet1"}),e.name)}},{key:"loopName",value:function(e,t){for(var n=0;n<e.length;n++)if(e[n]===t.name){t.name="sheet"+(Number(t.name.split("sheet")[1])+1),this.loopName(e,t);break}}},{key:"getCurrentSheet",value:function(){return this.sheet.data}},{key:"deleteSheet",value:function(){var e=(t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(e,t)||fK(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(this.bottombar.deleteItem(),2))[0],t=t[1];0<=e&&(this.datas.splice(e,1),0<=t&&this.sheet.resetData(this.datas[t]))}},{key:"changeSheet",value:function(e,t){this.bottombar.changeData(this.datas,e,t)}},{key:"copySheet",value:function(){for(var e=this.bottombar.getSheetName()+"_复制",t=this.bottombar.getSheetIndex(),n=(t=_.cloneDeep(this.datas[t]),this.datas.push(t),t._index=this.datas.length-1,!0),r=this.bottombar.dataNames;n;){n=!1;for(var i=0;i<r.length;i++)r[i]===e&&(e+="_复制",n=!0)}t.name=e,this.bottombar.addItem(e,!1,this.options.showEditSheetName),this.sheetIndex+=1}},{key:"mergeSheet",value:function(){this.sheet.trigger("mergeSheet",(function(){}))}},{key:"render",value:function(){this.sheet.table.render()}},{key:"loadData",value:function(e,t){var n=Array.isArray(e)?e:[e];if(this.bottombar.clear(),this.datas=[],0<n.length)for(var r=0;r<n.length;r+=1){var i=n[r],o=void 0;this.options.showEditSheetName?(o=this.addSheet(i.name,0===r,this.options.showEditSheetName,t),this.sheetIndex=1):(this.sheetIndex=1,o=this.addSheet(i.name,0===r,!1,t)),o.setData(i),0===r&&(this.sheet.resetData(o),t&&"hideRowCol"in t&&(bW.call(this.sheet),this.sheet.table.render()))}return this}},{key:"createData",value:function(e,t){return(e=new de(e,0,this.options)).setData(t),e}},{key:"getData",value:function(){return this.datas.map((function(e){return e.getData()}))}},{key:"on",value:function(e,t){return this.sheet.on(e,t),this}},{key:"onRender",value:function(e,t){return this.sheet.table.on(e,t),this}},{key:"onSelectEditor",value:function(e,t){return this.sheet.editor.on(e,t),this}},{key:"onSelectSheet",value:function(e,t){this.bottombar.on(e,t)}},{key:"validate",value:function(){return this.data.validations.errors.size<=0}},{key:"change",value:function(e){return this.sheet.on("change",e),this}},{key:"mock",value:function(){hK&&this.loadData(hK)}},{key:"changeSetting",value:function(e){this.sheet.data.settings=Object.assign(this.sheet.data.settings,e),this.sheet.sheetReset(),this.sheet.table.resetData(this.sheet.data)}},{key:"designData",value:function(e,t){var n,r=[],i={},o=function(e,t){var n,r,i,o,a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(a)return r=!(n=!0),{s:function(){a=a.call(e)},n:function(){var e=a.next();return n=e.done,e},e:function(e){r=!0,i=e},f:function(){try{n||null==a.return||a.return()}finally{if(r)throw i}}};if(Array.isArray(e)||(a=fK(e))||t&&e&&"number"==typeof e.length)return a&&(e=a),o=0,{s:t=function(){},n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(e);try{for(o.s();!(n=o.n()).done;){var a=n.value,s=a.SheetData.charts,u=nn([(i[a.name]=s,Md(a,!0))],t);u[0][0].name=a.name,r.push(u[0][0])}}catch(e){o.e(e)}finally{o.f()}if(!(r.length<1)){if(i[r[0].name]){var c=i[r[0].name];if(c)for(var l in c){var h=c[l];h&&this.sheet.initChart(h,l,!0)}}this.loadData(r)}}},{key:"importExcel",value:function(e){oK(e,this)}},{key:"helper",value:function(){return{stringAt:u.d,indexAt:u.c,expr2xy:u.b,xy2expr:u.e,expr2expr:u.a}}}])&&pK(t.prototype,n),r&&pK(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function bY(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}dY=ve.a,pY=window,mY=document,dY.site=dY.fn.site=function(e){var t,n=(new Date).getTime(),r=[],i=e,o="string"==typeof i,a=[].slice.call(arguments,1),s=dY.isPlainObject(e)?dY.extend(!0,{},dY.site.settings,e):dY.extend({},dY.site.settings),u=s.namespace,c=s.error,l="module-"+u,h=dY(mY),f=this,d=h.data(l),p={initialize:function(){p.instantiate()},instantiate:function(){p.verbose("Storing instance of site",p),d=p,h.data(l,p)},normalize:function(){p.fix.console(),p.fix.requestAnimationFrame()},fix:{console:function(){p.debug("Normalizing window.console"),void 0!==console&&void 0!==console.log||(p.verbose("Console not available, normalizing events"),p.disable.console()),void 0!==console.group&&void 0!==console.groupEnd&&void 0!==console.groupCollapsed||(p.verbose("Console group not available, normalizing events"),pY.console.group=function(){},pY.console.groupEnd=function(){},pY.console.groupCollapsed=function(){}),void 0===console.markTimeline&&(p.verbose("Mark timeline not available, normalizing events"),pY.console.markTimeline=function(){})},consoleClear:function(){p.debug("Disabling programmatic console clearing"),pY.console.clear=function(){}},requestAnimationFrame:function(){p.debug("Normalizing requestAnimationFrame"),void 0===pY.requestAnimationFrame&&(p.debug("RequestAnimationFrame not available, normalizing event"),pY.requestAnimationFrame=pY.requestAnimationFrame||pY.mozRequestAnimationFrame||pY.webkitRequestAnimationFrame||pY.msRequestAnimationFrame||function(e){setTimeout(e,0)})}},moduleExists:function(e){return void 0!==dY.fn[e]&&void 0!==dY.fn[e].settings},enabled:{modules:function(e){var t=[];return e=e||s.modules,dY.each(e,(function(e,n){p.moduleExists(n)&&t.push(n)})),t}},disabled:{modules:function(e){var t=[];return e=e||s.modules,dY.each(e,(function(e,n){p.moduleExists(n)||t.push(n)})),t}},change:{setting:function(e,t,n,r){n="string"==typeof n?"all"===n?s.modules:[n]:n||s.modules,r=void 0===r||r,dY.each(n,(function(n,i){var o=!p.moduleExists(i)||dY.fn[i].settings.namespace||!1;p.moduleExists(i)&&(p.verbose("Changing default setting",e,t,i),dY.fn[i].settings[e]=t,r&&o&&0<(o=dY(":data(module-"+o+")")).length&&(p.verbose("Modifying existing settings",o),o[i]("setting",e,t)))}))},settings:function(e,t,n){t="string"==typeof t?[t]:t||s.modules,n=void 0===n||n,dY.each(t,(function(t,r){var i;p.moduleExists(r)&&(p.verbose("Changing default setting",e,r),dY.extend(!0,dY.fn[r].settings,e),n&&u&&0<(i=dY(":data(module-"+u+")")).length&&(p.verbose("Modifying existing settings",i),i[r]("setting",e)))}))}},enable:{console:function(){p.console(!0)},debug:function(e,t){e=e||s.modules,p.debug("Enabling debug for modules",e),p.change.setting("debug",!0,e,t)},verbose:function(e,t){e=e||s.modules,p.debug("Enabling verbose debug for modules",e),p.change.setting("verbose",!0,e,t)}},disable:{console:function(){p.console(!1)},debug:function(e,t){e=e||s.modules,p.debug("Disabling debug for modules",e),p.change.setting("debug",!1,e,t)},verbose:function(e,t){e=e||s.modules,p.debug("Disabling verbose debug for modules",e),p.change.setting("verbose",!1,e,t)}},console:function(e){e?void 0===d.cache.console?p.error(c.console):(p.debug("Restoring console function"),pY.console=d.cache.console):(p.debug("Disabling console function"),d.cache.console=pY.console,pY.console={clear:function(){},error:function(){},group:function(){},groupCollapsed:function(){},groupEnd:function(){},info:function(){},log:function(){},markTimeline:function(){},warn:function(){}})},destroy:function(){p.verbose("Destroying previous site for",h),h.removeData(l)},cache:{},setting:function(e,t){if(dY.isPlainObject(e))dY.extend(!0,s,e);else{if(void 0===t)return s[e];s[e]=t}},internal:function(e,t){if(dY.isPlainObject(e))dY.extend(!0,p,e);else{if(void 0===t)return p[e];p[e]=t}},debug:function(){s.debug&&(s.performance?p.performance.log(arguments):(p.debug=Function.prototype.bind.call(console.info,console,s.name+":"),p.debug.apply(console,arguments)))},verbose:function(){s.verbose&&s.debug&&(s.performance?p.performance.log(arguments):(p.verbose=Function.prototype.bind.call(console.info,console,s.name+":"),p.verbose.apply(console,arguments)))},error:function(){p.error=Function.prototype.bind.call(console.error,console,s.name+":"),p.error.apply(console,arguments)},performance:{log:function(e){var t,i;s.performance&&(i=(t=(new Date).getTime())-(n||t),n=t,r.push({Element:f,Name:e[0],Arguments:[].slice.call(e,1)||"","Execution Time":i})),clearTimeout(p.performance.timer),p.performance.timer=setTimeout(p.performance.display,500)},display:function(){s.name,n=!1,clearTimeout(p.performance.timer),dY.each(r,(function(e,t){t["Execution Time"]})),(void 0!==console.group||void 0!==console.table)&&0<r.length&&!console.table&&dY.each(r,(function(e,t){t.Name,t["Execution Time"]})),r=[]}},invoke:function(e,n,r){var i,o,s,u=d;return n=n||a,r=f||r,"string"==typeof e&&void 0!==u&&(e=e.split(/[\. ]/),i=e.length-1,dY.each(e,(function(t,n){var r=t!=i?n+e[t+1].charAt(0).toUpperCase()+e[t+1].slice(1):e;if(!dY.isPlainObject(u[r])||t==i)return void 0!==u[r]?(o=u[r],!1):dY.isPlainObject(u[n])&&t!=i?void(u=u[n]):(void 0!==u[n]?o=u[n]:p.error(c.method,e),!1);u=u[r]}))),dY.isFunction(o)?s=o.apply(r,n):void 0!==o&&(s=o),dY.isArray(t)?t.push(s):void 0!==t?t=[t,s]:void 0!==s&&(t=s),o}};return o?(void 0===d&&p.initialize(),p.invoke(i)):(void 0!==d&&p.destroy(),p.initialize()),void 0!==t?t:this},dY.site.settings={name:"Site",namespace:"site",error:{console:"Console cannot be restored, most likely it was overwritten outside of module",method:"The method you called is not defined."},debug:!1,verbose:!1,performance:!0,modules:["accordion","api","checkbox","dimmer","dropdown","embed","form","modal","nag","popup","rating","shape","sidebar","state","sticky","tab","transition","visit","visibility"],siteNamespace:"site",namespaceStub:{cache:{},config:{},sections:{},section:{},utilities:{}}},dY.extend(dY.expr[":"],{data:dY.expr.createPseudo?dY.expr.createPseudo((function(e){return function(t){return!!dY.data(t,e)}})):function(e,t,n){return!!dY.data(e,n[3])}}),hY=ve.a,So=window,fY=document,So=void 0!==So&&So.Math==Math?So:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),hY.fn.form=function(e){var t,n=hY(this),r=(n.selector,(new Date).getTime()),i=[],o=e,a=arguments[1],s="string"==typeof o,u=[].slice.call(arguments,1);return n.each((function(){var c,l,h,f,d,p,m,g,A,v,b,y,w,x,C,k,E=hY(this),S=this,_=[],O=!1;(k={initialize:function(){k.get.settings(),s?(void 0===C&&k.instantiate(),k.invoke(o)):(void 0!==C&&C.invoke("destroy"),k.verbose("Initializing form validation",E,d),k.bindEvents(),k.set.defaults(),k.instantiate())},instantiate:function(){k.verbose("Storing instance of module",k),C=k,E.data(w,k)},destroy:function(){k.verbose("Destroying previous module",C),k.removeEvents(),E.removeData(w)},refresh:function(){k.verbose("Refreshing selector cache"),c=E.find(g.field),l=E.find(g.group),h=E.find(g.message),E.find(g.prompt),f=E.find(g.submit),E.find(g.clear),E.find(g.reset)},submit:function(){k.verbose("Submitting form",E),E.submit()},attachEvents:function(e,t){t=t||"submit",hY(e).on("click"+x,(function(e){k[t](),e.preventDefault()}))},bindEvents:function(){k.verbose("Attaching form events"),E.on("submit"+x,k.validate.form).on("blur"+x,g.field,k.event.field.blur).on("click"+x,g.submit,k.submit).on("click"+x,g.reset,k.reset).on("click"+x,g.clear,k.clear),d.keyboardShortcuts&&E.on("keydown"+x,g.field,k.event.field.keydown),c.each((function(){var e=hY(this),t=e.prop("type");t=k.get.changeEvent(t,e);hY(this).on(t+x,k.event.field.change)}))},clear:function(){c.each((function(){var e=hY(this),t=e.parent(),n=e.closest(l),r=n.find(g.prompt),i=e.data(m.defaultValue)||"",o=t.is(g.uiCheckbox),a=t.is(g.uiDropdown);n.hasClass(A.error)&&(k.verbose("Resetting error on field",n),n.removeClass(A.error),r.remove()),a?(k.verbose("Resetting dropdown value",t,i),t.dropdown("clear")):o?e.prop("checked",!1):(k.verbose("Resetting field value",e,i),e.val(""))}))},reset:function(){c.each((function(){var e=hY(this),t=e.parent(),n=e.closest(l),r=n.find(g.prompt),i=e.data(m.defaultValue),o=t.is(g.uiCheckbox),a=t.is(g.uiDropdown),s=n.hasClass(A.error);void 0!==i&&(s&&(k.verbose("Resetting error on field",n),n.removeClass(A.error),r.remove()),a?(k.verbose("Resetting dropdown value",t,i),t.dropdown("restore defaults")):o?(k.verbose("Resetting checkbox value",t,i),e.prop("checked",i)):(k.verbose("Resetting field value",e,i),e.val(i)))}))},determine:{isValid:function(){var e=!0;return hY.each(p,(function(t,n){k.validate.field(n,t,!0)||(e=!1)})),e}},is:{bracketedRule:function(e){return e.type&&e.type.match(d.regExp.bracket)},shorthandFields:function(e){return e=e[Object.keys(e)[0]],k.is.shorthandRules(e)},shorthandRules:function(e){return"string"==typeof e||hY.isArray(e)},empty:function(e){return!e||0===e.length||(e.is('input[type="checkbox"]')?!e.is(":checked"):k.is.blank(e))},blank:function(e){return""===hY.trim(e.val())},valid:function(e){var t=!0;return e?(k.verbose("Checking if field is valid",e),k.validate.field(p[e],e,!1)):(k.verbose("Checking if form is valid"),hY.each(p,(function(e,n){k.is.valid(e)||(t=!1)})),t)}},removeEvents:function(){E.off(x),c.off(x),f.off(x),c.off(x)},event:{field:{keydown:function(e){var t=hY(this),n=e.which,r=t.is(g.input),i=t.is(g.checkbox),o=0<t.closest(g.uiDropdown).length;27==n&&(k.verbose("Escape key pressed blurring field"),t.blur()),e.ctrlKey||13!=n||!r||o||i||(O||(t.one("keyup"+x,k.event.field.keyup),k.submit(),k.debug("Enter pressed on input submitting form")),O=!0)},keyup:function(){O=!1},blur:function(e){var t=hY(this),n=t.closest(l),r=k.get.validation(t);n.hasClass(A.error)?(k.debug("Revalidating field",t,r),r&&k.validate.field(r)):"blur"==d.on&&r&&k.validate.field(r)},change:function(e){var t=hY(this),n=t.closest(l),r=k.get.validation(t);r&&("change"==d.on||n.hasClass(A.error)&&d.revalidate)&&(clearTimeout(k.timer),k.timer=setTimeout((function(){k.debug("Revalidating field",t,k.get.validation(t)),k.validate.field(r)}),d.delay))}}},get:{ancillaryValue:function(e){return!(!e.type||!e.value&&!k.is.bracketedRule(e))&&(void 0!==e.value?e.value:e.type.match(d.regExp.bracket)[1]+"")},ruleName:function(e){return k.is.bracketedRule(e)?e.type.replace(e.type.match(d.regExp.bracket)[0],""):e.type},changeEvent:function(e,t){return"checkbox"==e||"radio"==e||"hidden"==e||t.is("select")?"change":k.get.inputEvent()},inputEvent:function(){return void 0!==fY.createElement("input").oninput?"input":void 0!==fY.createElement("input").onpropertychange?"propertychange":"keyup"},fieldsFromShorthand:function(e){var t={};return hY.each(e,(function(e,n){"string"==typeof n&&(n=[n]),t[e]={rules:[]},hY.each(n,(function(n,r){t[e].rules.push({type:r})}))})),t},prompt:function(e,t){var n=k.get.ruleName(e),r=k.get.ancillaryValue(e),i=k.get.field(t.identifier),o=i.val(),a=-1!==(o=hY.isFunction(e.prompt)?e.prompt(o):e.prompt||d.prompt[n]||d.text.unspecifiedRule).search("{value}"),s=-1!==o.search("{name}");return a&&(o=o.replace("{value}",i.val())),s&&(s=1==(a=i.closest(g.group).find("label").eq(0)).length?a.text():i.prop("placeholder")||d.text.unspecifiedField,o=o.replace("{name}",s)),o=(o=o.replace("{identifier}",t.identifier)).replace("{ruleValue}",r),e.prompt||k.verbose("Using default validation prompt for type",o,n),o},settings:function(){var t;hY.isPlainObject(e)?0<(t=Object.keys(e)).length&&void 0!==e[t[0]].identifier&&void 0!==e[t[0]].rules?(d=hY.extend(!0,{},hY.fn.form.settings,a),p=hY.extend({},hY.fn.form.settings.defaults,e),k.error(d.error.oldSyntax,S),k.verbose("Extending settings from legacy parameters",p,d)):(e.fields&&k.is.shorthandFields(e.fields)&&(e.fields=k.get.fieldsFromShorthand(e.fields)),d=hY.extend(!0,{},hY.fn.form.settings,e),p=hY.extend({},hY.fn.form.settings.defaults,d.fields),k.verbose("Extending settings",p,d)):(d=hY.fn.form.settings,p=hY.fn.form.settings.defaults,k.verbose("Using default form validation",p,d)),y=d.namespace,m=d.metadata,g=d.selector,A=d.className,v=d.regExp,b=d.error,w="module-"+y,x="."+y,C=E.data(w),k.refresh()},field:function(e){return k.verbose("Finding field with identifier",e),e=k.escape.string(e),0<c.filter("#"+e).length?c.filter("#"+e):0<c.filter('[name="'+e+'"]').length?c.filter('[name="'+e+'"]'):0<c.filter('[name="'+e+'[]"]').length?c.filter('[name="'+e+'[]"]'):0<c.filter("[data-"+m.validate+'="'+e+'"]').length?c.filter("[data-"+m.validate+'="'+e+'"]'):hY("<input/>")},fields:function(e){var t=hY();return hY.each(e,(function(e,n){t=t.add(k.get.field(n))})),t},validation:function(e){var t,n;return!!p&&(hY.each(p,(function(r,i){n=i.identifier||r,k.get.field(n)[0]==e[0]&&(i.identifier=n,t=i)})),t||!1)},value:function(e){var t=[];return t.push(e),k.get.values.call(S,t)[e]},values:function(e){e=hY.isArray(e)?k.get.fields(e):c;var t={};return e.each((function(e,n){var r=((n=hY(n)).prop("type"),n.prop("name")),i=n.val(),o=n.is(g.checkbox),a=n.is(g.radio),s=-1!==r.indexOf("[]");n=!!o&&n.is(":checked");r&&(s?(r=r.replace("[]",""),t[r]||(t[r]=[]),o?n?t[r].push(i||!0):t[r].push(!1):t[r].push(i)):a?void 0!==t[r]&&0!=t[r]||(t[r]=!!n&&(i||!0)):t[r]=o?!!n&&(i||!0):i)})),t}},has:{field:function(e){return k.verbose("Checking for existence of a field with identifier",e),"string"!=typeof(e=k.escape.string(e))&&k.error(b.identifier,e),0<c.filter("#"+e).length||0<c.filter('[name="'+e+'"]').length||0<c.filter("[data-"+m.validate+'="'+e+'"]').length}},escape:{string:function(e){return(e=String(e)).replace(v.escape,"\\$&")}},add:{rule:function(e,t){k.add.field(e,t)},field:function(e,t){var n={};k.is.shorthandRules(t)?(t=hY.isArray(t)?t:[t],n[e]={rules:[]},hY.each(t,(function(t,r){n[e].rules.push({type:r})}))):n[e]=t,p=hY.extend({},p,n),k.debug("Adding rules",n,p)},fields:function(e){e=e&&k.is.shorthandFields(e)?k.get.fieldsFromShorthand(e):e,p=hY.extend({},p,e)},prompt:function(e,t){var n=k.get.field(e).closest(l),r=n.children(g.prompt),i=0!==r.length;t="string"==typeof t?[t]:t,k.verbose("Adding field error state",e),n.addClass(A.error),d.inline&&(i||(r=d.templates.prompt(t)).appendTo(n),r.html(t[0]),i?k.verbose("Inline errors are disabled, no inline error added",e):d.transition&&void 0!==hY.fn.transition&&E.transition("is supported")?(k.verbose("Displaying error with css transition",d.transition),r.transition(d.transition+" in",d.duration)):(k.verbose("Displaying error with fallback javascript animation"),r.fadeIn(d.duration)))},errors:function(e){k.debug("Adding form error messages",e),k.set.error(),h.html(d.templates.error(e))}},remove:{rule:function(e,t){var n=hY.isArray(t)?t:[t];null==t?(k.debug("Removed all rules"),p[e].rules=[]):null!=p[e]&&hY.isArray(p[e].rules)&&hY.each(p[e].rules,(function(t,r){-1!==n.indexOf(r.type)&&(k.debug("Removed rule",r.type),p[e].rules.splice(t,1))}))},field:function(e){e=hY.isArray(e)?e:[e],hY.each(e,(function(e,t){k.remove.rule(t)}))},rules:function(e,t){hY.isArray(e)?hY.each(fields,(function(e,n){k.remove.rule(n,t)})):k.remove.rule(e,t)},fields:function(e){k.remove.field(e)},prompt:function(e){var t=k.get.field(e).closest(l),n=t.children(g.prompt);t.removeClass(A.error),d.inline&&n.is(":visible")&&(k.verbose("Removing prompt for field",e),d.transition&&void 0!==hY.fn.transition&&E.transition("is supported")?n.transition(d.transition+" out",d.duration,(function(){n.remove()})):n.fadeOut(d.duration,(function(){n.remove()})))}},set:{success:function(){E.removeClass(A.error).addClass(A.success)},defaults:function(){c.each((function(){var e=hY(this),t=0<e.filter(g.checkbox).length?e.is(":checked"):e.val();e.data(m.defaultValue,t)}))},error:function(){E.removeClass(A.success).addClass(A.error)},value:function(e,t){var n={};return n[e]=t,k.set.values.call(S,n)},values:function(e){hY.isEmptyObject(e)||hY.each(e,(function(e,t){var n,r=k.get.field(e),i=r.parent(),o=(e=hY.isArray(t),i.is(g.uiCheckbox)),a=i.is(g.uiDropdown),s=r.is(g.radio)&&o;0<r.length&&(e&&o?(k.verbose("Selecting multiple",t,r),i.checkbox("uncheck"),hY.each(t,(function(e,t){n=r.filter('[value="'+t+'"]'),i=n.parent(),0<n.length&&i.checkbox("check")}))):s?(k.verbose("Selecting radio value",t,r),r.filter('[value="'+t+'"]').parent(g.uiCheckbox).checkbox("check")):o?(k.verbose("Setting checkbox value",t,i),!0===t?i.checkbox("check"):i.checkbox("uncheck")):a?(k.verbose("Setting dropdown value",t,i),i.dropdown("set selected",t)):(k.verbose("Setting field value",t,r),r.val(t)))}))}},validate:{form:function(e,t){var n=k.get.values();if(O)return!1;if(_=[],k.determine.isValid()){if(k.debug("Form has no validation errors, submitting"),k.set.success(),!0!==t)return d.onSuccess.call(S,e,n)}else if(k.debug("Form has errors"),k.set.error(),d.inline||k.add.errors(_),void 0!==E.data("moduleApi")&&e.stopImmediatePropagation(),!0!==t)return d.onFailure.call(S,_,n)},field:function(e,t,n){n=void 0===n||n,"string"==typeof e&&(k.verbose("Validating field",e),e=p[t=e]);var r=e.identifier||t,i=(t=k.get.field(r),!!e.depends&&k.get.field(e.depends)),o=!0,a=[];return e.identifier||(k.debug("Using field name as identifier",r),e.identifier=r),t.prop("disabled")?(k.debug("Field is disabled. Skipping",r),o=!0):e.optional&&k.is.blank(t)?(k.debug("Field is optional and blank. Skipping",r),o=!0):e.depends&&k.is.empty(i)?(k.debug("Field depends on another value that is not present or empty. Skipping",i),o=!0):void 0!==e.rules&&hY.each(e.rules,(function(t,n){k.has.field(r)&&!k.validate.rule(e,n)&&(k.debug("Field is invalid",r,n.type),a.push(k.get.prompt(n,e)),o=!1)})),o?(n&&(k.remove.prompt(r,a),d.onValid.call(t)),!0):(n&&(_=_.concat(a),k.add.prompt(r,a),d.onInvalid.call(t,a)),!1)},rule:function(e,t){e=k.get.field(e.identifier);var n=(t.type,e.val()),r=k.get.ancillaryValue(t),i=(t=k.get.ruleName(t),d.rules[t]);if(hY.isFunction(i))return n=void 0===n||""===n||null===n?"":hY.trim(n+""),i.call(e,n,r);k.error(b.noRule,t)}},setting:function(e,t){if(hY.isPlainObject(e))hY.extend(!0,d,e);else{if(void 0===t)return d[e];d[e]=t}},internal:function(e,t){if(hY.isPlainObject(e))hY.extend(!0,k,e);else{if(void 0===t)return k[e];k[e]=t}},debug:function(){!d.silent&&d.debug&&(d.performance?k.performance.log(arguments):(k.debug=Function.prototype.bind.call(console.info,console,d.name+":"),k.debug.apply(console,arguments)))},verbose:function(){!d.silent&&d.verbose&&d.debug&&(d.performance?k.performance.log(arguments):(k.verbose=Function.prototype.bind.call(console.info,console,d.name+":"),k.verbose.apply(console,arguments)))},error:function(){d.silent||(k.error=Function.prototype.bind.call(console.error,console,d.name+":"),k.error.apply(console,arguments))},performance:{log:function(e){var t,n;d.performance&&(n=(t=(new Date).getTime())-(r||t),r=t,i.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:S,"Execution Time":n})),clearTimeout(k.performance.timer),k.performance.timer=setTimeout(k.performance.display,500)},display:function(){d.name,r=!1,clearTimeout(k.performance.timer),hY.each(i,(function(e,t){t["Execution Time"]})),1<n.length&&n.length,(void 0!==console.group||void 0!==console.table)&&0<i.length&&!console.table&&hY.each(i,(function(e,t){t.Name,t["Execution Time"]})),i=[]}},invoke:function(e,n,r){var i,o,a,s=C;return n=n||u,r=S||r,"string"==typeof e&&void 0!==s&&(e=e.split(/[\. ]/),i=e.length-1,hY.each(e,(function(t,n){var r=t!=i?n+e[t+1].charAt(0).toUpperCase()+e[t+1].slice(1):e;if(!hY.isPlainObject(s[r])||t==i)return void 0!==s[r]?(o=s[r],!1):hY.isPlainObject(s[n])&&t!=i?void(s=s[n]):void 0!==s[n]&&(o=s[n],!1);s=s[r]}))),hY.isFunction(o)?a=o.apply(r,n):void 0!==o&&(a=o),hY.isArray(t)?t.push(a):void 0!==t?t=[t,a]:void 0!==a&&(t=a),o}}).initialize()})),void 0!==t?t:this},hY.fn.form.settings={name:"Form",namespace:"form",debug:!1,verbose:!1,performance:!0,fields:!1,keyboardShortcuts:!0,on:"submit",inline:!1,delay:200,revalidate:!0,transition:"scale",duration:200,onValid:function(){},onInvalid:function(){},onSuccess:function(){return!0},onFailure:function(){return!1},metadata:{defaultValue:"default",validate:"validate"},regExp:{htmlID:/^[a-zA-Z][\w:.-]*$/g,bracket:/\[(.*)\]/i,decimal:/^\d+\.?\d*$/,email:/^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,escape:/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,flags:/^\/(.*)\/(.*)?/,integer:/^\-?\d+$/,number:/^\-?\d*(\.\d+)?$/,url:/(https?:\/\/(?:www\.|(?!www))[^\s\.]+\.[^\s]{2,}|www\.[^\s]+\.[^\s]{2,})/i},text:{unspecifiedRule:"Please enter a valid value",unspecifiedField:"This field"},prompt:{empty:"{name} must have a value",checked:"{name} must be checked",email:"{name} must be a valid e-mail",url:"{name} must be a valid url",regExp:"{name} is not formatted correctly",integer:"{name} must be an integer",decimal:"{name} must be a decimal number",number:"{name} must be set to a number",is:'{name} must be "{ruleValue}"',isExactly:'{name} must be exactly "{ruleValue}"',not:'{name} cannot be set to "{ruleValue}"',notExactly:'{name} cannot be set to exactly "{ruleValue}"',contain:'{name} must contain "{ruleValue}"',containExactly:'{name} must contain exactly "{ruleValue}"',doesntContain:'{name} cannot contain  "{ruleValue}"',doesntContainExactly:'{name} cannot contain exactly "{ruleValue}"',minLength:"{name} must be at least {ruleValue} characters",length:"{name} must be at least {ruleValue} characters",exactLength:"{name} must be exactly {ruleValue} characters",maxLength:"{name} cannot be longer than {ruleValue} characters",match:"{name} must match {ruleValue} field",different:"{name} must have a different value than {ruleValue} field",creditCard:"{name} must be a valid credit card number",minCount:"{name} must have at least {ruleValue} choices",exactCount:"{name} must have exactly {ruleValue} choices",maxCount:"{name} must have {ruleValue} or less choices"},selector:{checkbox:'input[type="checkbox"], input[type="radio"]',clear:".clear",field:"input, textarea, select",group:".field",input:"input",message:".error.message",prompt:".prompt.label",radio:'input[type="radio"]',reset:'.reset:not([type="reset"])',submit:'.submit:not([type="submit"])',uiCheckbox:".ui.checkbox",uiDropdown:".ui.dropdown"},className:{error:"error",label:"ui prompt label",pressed:"down",success:"success"},error:{identifier:"You must specify a string identifier for each field",method:"The method you called is not defined.",noRule:"There is no rule matching the one you specified",oldSyntax:"Starting in 2.0 forms now only take a single settings object. Validation settings converted to new syntax automatically."},templates:{error:function(e){var t='<ul class="list">';return hY.each(e,(function(e,n){t+="<li>"+n+"</li>"})),hY(t+="</ul>")},prompt:function(e){return hY("<div/>").addClass("ui basic red pointing prompt label").html(e[0])}},rules:{empty:function(e){return!(void 0===e||""===e||hY.isArray(e)&&0===e.length)},checked:function(){return 0<hY(this).filter(":checked").length},email:function(e){return hY.fn.form.settings.regExp.email.test(e)},url:function(e){return hY.fn.form.settings.regExp.url.test(e)},regExp:function(e,t){var n,r;return t instanceof RegExp?e.match(t):((r=t.match(hY.fn.form.settings.regExp.flags))&&(t=2<=r.length?r[1]:t,n=3<=r.length?r[2]:""),e.match(new RegExp(t,n)))},integer:function(e,t){var n,r,i=hY.fn.form.settings.regExp.integer;return t&&-1===["",".."].indexOf(t)&&(-1==t.indexOf("..")?i.test(t)&&(n=r=+t):(t=t.split("..",2),i.test(t[0])&&(n=+t[0]),i.test(t[1])&&(r=+t[1]))),i.test(e)&&(void 0===n||n<=e)&&(void 0===r||e<=r)},decimal:function(e){return hY.fn.form.settings.regExp.decimal.test(e)},number:function(e){return hY.fn.form.settings.regExp.number.test(e)},is:function(e,t){return t="string"==typeof t?t.toLowerCase():t,(e="string"==typeof e?e.toLowerCase():e)==t},isExactly:function(e,t){return e==t},not:function(e,t){return(e="string"==typeof e?e.toLowerCase():e)!=("string"==typeof t?t.toLowerCase():t)},notExactly:function(e,t){return e!=t},contains:function(e,t){return t=t.replace(hY.fn.form.settings.regExp.escape,"\\$&"),-1!==e.search(new RegExp(t,"i"))},containsExactly:function(e,t){return t=t.replace(hY.fn.form.settings.regExp.escape,"\\$&"),-1!==e.search(new RegExp(t))},doesntContain:function(e,t){return t=t.replace(hY.fn.form.settings.regExp.escape,"\\$&"),-1===e.search(new RegExp(t,"i"))},doesntContainExactly:function(e,t){return t=t.replace(hY.fn.form.settings.regExp.escape,"\\$&"),-1===e.search(new RegExp(t))},minLength:function(e,t){return void 0!==e&&e.length>=t},length:function(e,t){return void 0!==e&&e.length>=t},exactLength:function(e,t){return void 0!==e&&e.length==t},maxLength:function(e,t){return void 0!==e&&e.length<=t},match:function(e,t){var n;return hY(this),0<hY('[data-validate="'+t+'"]').length?n=hY('[data-validate="'+t+'"]').val():0<hY("#"+t).length?n=hY("#"+t).val():0<hY('[name="'+t+'"]').length?n=hY('[name="'+t+'"]').val():0<hY('[name="'+t+'[]"]').length&&(n=hY('[name="'+t+'[]"]')),void 0!==n&&e.toString()==n.toString()},different:function(e,t){var n;return hY(this),0<hY('[data-validate="'+t+'"]').length?n=hY('[data-validate="'+t+'"]').val():0<hY("#"+t).length?n=hY("#"+t).val():0<hY('[name="'+t+'"]').length?n=hY('[name="'+t+'"]').val():0<hY('[name="'+t+'[]"]').length&&(n=hY('[name="'+t+'[]"]')),void 0!==n&&e.toString()!==n.toString()},creditCard:function(e,t){var n,r={visa:{pattern:/^4/,length:[16]},amex:{pattern:/^3[47]/,length:[15]},mastercard:{pattern:/^5[1-5]/,length:[16]},discover:{pattern:/^(6011|622(12[6-9]|1[3-9][0-9]|[2-8][0-9]{2}|9[0-1][0-9]|92[0-5]|64[4-9])|65)/,length:[16]},unionPay:{pattern:/^(62|88)/,length:[16,17,18,19]},jcb:{pattern:/^35(2[89]|[3-8][0-9])/,length:[16]},maestro:{pattern:/^(5018|5020|5038|6304|6759|676[1-3])/,length:[12,13,14,15,16,17,18,19]},dinersClub:{pattern:/^(30[0-5]|^36)/,length:[14]},laser:{pattern:/^(6304|670[69]|6771)/,length:[16,17,18,19]},visaElectron:{pattern:/^(4026|417500|4508|4844|491(3|7))/,length:[16]}},i={},o=!1;t="string"==typeof t&&t.split(",");if("string"==typeof e&&0!==e.length){if(e=e.replace(/[\-]/g,""),t&&(hY.each(t,(function(t,a){(n=r[a])&&(i={length:-1!==hY.inArray(e.length,n.length),pattern:-1!==e.search(n.pattern)}).length&&i.pattern&&(o=!0)})),!o))return!1;if((t={number:-1!==hY.inArray(e.length,r.unionPay.length),pattern:-1!==e.search(r.unionPay.pattern)}).number&&t.pattern)return!0;for(var a=e.length,s=0,u=[[0,1,2,3,4,5,6,7,8,9],[0,2,4,6,8,1,3,5,7,9]],c=0;a--;)c+=u[s][parseInt(e.charAt(a),10)],s^=1;return c%10==0&&0<c}},minCount:function(e,t){return 0==t||(1==t?""!==e:e.split(",").length>=t)},exactCount:function(e,t){return 0==t?""===e:1==t?""!==e&&-1===e.search(","):e.split(",").length==t},maxCount:function(e,t){return 0!=t&&(1==t?-1===e.search(","):e.split(",").length<=t)}}},cY=ve.a,lY=window,document,lY=void 0!==lY&&lY.Math==Math?lY:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),cY.fn.accordion=function(e){var t,n=cY(this),r=(new Date).getTime(),i=[],o=e,a="string"==typeof o,s=[].slice.call(arguments,1);return lY.requestAnimationFrame||lY.mozRequestAnimationFrame||lY.webkitRequestAnimationFrame||lY.msRequestAnimationFrame,n.each((function(){var u,c=cY.isPlainObject(e)?cY.extend(!0,{},cY.fn.accordion.settings,e):cY.extend({},cY.fn.accordion.settings),l=c.className,h=c.namespace,f=c.selector,d=c.error,p="."+h,m="module-"+h,g=(n.selector,cY(this)),A=g.find(f.title),v=g.find(f.content),b=this,y=g.data(m),w={initialize:function(){w.debug("Initializing",g),w.bind.events(),c.observeChanges&&w.observeChanges(),w.instantiate()},instantiate:function(){y=w,g.data(m,w)},destroy:function(){w.debug("Destroying previous instance",g),g.off(p).removeData(m)},refresh:function(){A=g.find(f.title),v=g.find(f.content)},observeChanges:function(){"MutationObserver"in lY&&((u=new MutationObserver((function(e){w.debug("DOM tree modified, updating selector cache"),w.refresh()}))).observe(b,{childList:!0,subtree:!0}),w.debug("Setting up mutation observer",u))},bind:{events:function(){w.debug("Binding delegated events"),g.on(c.on+p,f.trigger,w.event.click)}},event:{click:function(){w.toggle.call(this)}},toggle:function(e){var t=(r=(e=void 0!==e?"number"==typeof e?A.eq(e):cY(e).closest(f.title):cY(this).closest(f.title)).next(v)).hasClass(l.animating),n=(r=r.hasClass(l.active))&&!t,r=!r&&t;w.debug("Toggling visibility of content",e),n||r?c.collapsible?w.close.call(e):w.debug("Cannot close accordion content collapsing is disabled"):w.open.call(e)},open:function(e){var t=(e=void 0!==e?"number"==typeof e?A.eq(e):cY(e).closest(f.title):cY(this).closest(f.title)).next(v),n=t.hasClass(l.animating);t.hasClass(l.active)||n?w.debug("Accordion already open, skipping",t):(w.debug("Opening accordion content",e),c.onOpening.call(t),c.onChanging.call(t),c.exclusive&&w.closeOthers.call(e),e.addClass(l.active),t.stop(!0,!0).addClass(l.animating),c.animateChildren&&(void 0!==cY.fn.transition&&g.transition("is supported")?t.children().transition({animation:"fade in",queue:!1,useFailSafe:!0,debug:c.debug,verbose:c.verbose,duration:c.duration}):t.children().stop(!0,!0).animate({opacity:1},c.duration,w.resetOpacity)),t.slideDown(c.duration,c.easing,(function(){t.removeClass(l.animating).addClass(l.active),w.reset.display.call(this),c.onOpen.call(this),c.onChange.call(this)})))},close:function(e){var t=(e=void 0!==e?"number"==typeof e?A.eq(e):cY(e).closest(f.title):cY(this).closest(f.title)).next(v),n=t.hasClass(l.animating),r=t.hasClass(l.active);!r&&(r||!n)||r&&n||(w.debug("Closing accordion content",t),c.onClosing.call(t),c.onChanging.call(t),e.removeClass(l.active),t.stop(!0,!0).addClass(l.animating),c.animateChildren&&(void 0!==cY.fn.transition&&g.transition("is supported")?t.children().transition({animation:"fade out",queue:!1,useFailSafe:!0,debug:c.debug,verbose:c.verbose,duration:c.duration}):t.children().stop(!0,!0).animate({opacity:0},c.duration,w.resetOpacity)),t.slideUp(c.duration,c.easing,(function(){t.removeClass(l.animating).removeClass(l.active),w.reset.display.call(this),c.onClose.call(this),c.onChange.call(this)})))},closeOthers:function(e){var t,n=(e=void 0!==e?A.eq(e):cY(this).closest(f.title)).parents(f.content).prev(f.title),r=(e=e.closest(f.accordion),f.title+"."+l.active+":visible"),i=f.content+"."+l.active+":visible";i=(t=c.closeNested?e.find(r).not(n):(t=e.find(r).not(n),e=e.find(i).find(r).not(n),t.not(e))).next(v);0<t.length&&(w.debug("Exclusive enabled, closing other content",t),t.removeClass(l.active),i.removeClass(l.animating).stop(!0,!0),c.animateChildren&&(void 0!==cY.fn.transition&&g.transition("is supported")?i.children().transition({animation:"fade out",useFailSafe:!0,debug:c.debug,verbose:c.verbose,duration:c.duration}):i.children().stop(!0,!0).animate({opacity:0},c.duration,w.resetOpacity)),i.slideUp(c.duration,c.easing,(function(){cY(this).removeClass(l.active),w.reset.display.call(this)})))},reset:{display:function(){w.verbose("Removing inline display from element",this),cY(this).css("display",""),""===cY(this).attr("style")&&cY(this).attr("style","").removeAttr("style")},opacity:function(){w.verbose("Removing inline opacity from element",this),cY(this).css("opacity",""),""===cY(this).attr("style")&&cY(this).attr("style","").removeAttr("style")}},setting:function(e,t){if(w.debug("Changing setting",e,t),cY.isPlainObject(e))cY.extend(!0,c,e);else{if(void 0===t)return c[e];cY.isPlainObject(c[e])?cY.extend(!0,c[e],t):c[e]=t}},internal:function(e,t){if(w.debug("Changing internal",e,t),void 0===t)return w[e];cY.isPlainObject(e)?cY.extend(!0,w,e):w[e]=t},debug:function(){!c.silent&&c.debug&&(c.performance?w.performance.log(arguments):(w.debug=Function.prototype.bind.call(console.info,console,c.name+":"),w.debug.apply(console,arguments)))},verbose:function(){!c.silent&&c.verbose&&c.debug&&(c.performance?w.performance.log(arguments):(w.verbose=Function.prototype.bind.call(console.info,console,c.name+":"),w.verbose.apply(console,arguments)))},error:function(){c.silent||(w.error=Function.prototype.bind.call(console.error,console,c.name+":"),w.error.apply(console,arguments))},performance:{log:function(e){var t,n;c.performance&&(n=(t=(new Date).getTime())-(r||t),r=t,i.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:b,"Execution Time":n})),clearTimeout(w.performance.timer),w.performance.timer=setTimeout(w.performance.display,500)},display:function(){c.name,r=!1,clearTimeout(w.performance.timer),cY.each(i,(function(e,t){t["Execution Time"]})),(void 0!==console.group||void 0!==console.table)&&0<i.length&&!console.table&&cY.each(i,(function(e,t){t.Name,t["Execution Time"]})),i=[]}},invoke:function(e,n,r){var i,o,a,u=y;return n=n||s,r=b||r,"string"==typeof e&&void 0!==u&&(e=e.split(/[\. ]/),i=e.length-1,cY.each(e,(function(t,n){var r=t!=i?n+e[t+1].charAt(0).toUpperCase()+e[t+1].slice(1):e;if(!cY.isPlainObject(u[r])||t==i)return void 0!==u[r]?(o=u[r],!1):cY.isPlainObject(u[n])&&t!=i?void(u=u[n]):(void 0!==u[n]?o=u[n]:w.error(d.method,e),!1);u=u[r]}))),cY.isFunction(o)?a=o.apply(r,n):void 0!==o&&(a=o),cY.isArray(t)?t.push(a):void 0!==t?t=[t,a]:void 0!==a&&(t=a),o}};a?(void 0===y&&w.initialize(),w.invoke(o)):(void 0!==y&&y.invoke("destroy"),w.initialize())})),void 0!==t?t:this},cY.fn.accordion.settings={name:"Accordion",namespace:"accordion",silent:!1,debug:!1,verbose:!1,performance:!0,on:"click",observeChanges:!0,exclusive:!0,collapsible:!0,closeNested:!1,animateChildren:!0,duration:350,easing:"easeOutQuad",onOpening:function(){},onClosing:function(){},onChanging:function(){},onOpen:function(){},onClose:function(){},onChange:function(){},error:{method:"The method you called is not defined"},className:{active:"active",animating:"animating"},selector:{accordion:".accordion",title:".title",trigger:".title",content:".content"}},cY.extend(cY.easing,{easeOutQuad:function(e,t,n,r,i){return-r*(t/=i)*(t-2)+n}}),aY=ve.a,sY=window,uY=document,sY=void 0!==sY&&sY.Math==Math?sY:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),aY.fn.checkbox=function(e){var t,n=aY(this),r=(n.selector,(new Date).getTime()),i=[],o=e,a="string"==typeof o,s=[].slice.call(arguments,1);return n.each((function(){var n,u=aY.extend(!0,{},aY.fn.checkbox.settings,e),c=u.className,l=u.namespace,h=u.selector,f=u.error,d="."+l,p="module-"+l,m=aY(this),g=aY(this).children(h.label),A=aY(this).children(h.input),v=A[0],b=!1,y=!1,w=m.data(p),x=this,C={initialize:function(){C.verbose("Initializing checkbox",u),C.create.label(),C.bind.events(),C.set.tabbable(),C.hide.input(),C.observeChanges(),C.instantiate(),C.setup()},instantiate:function(){C.verbose("Storing instance of module",C),w=C,m.data(p,C)},destroy:function(){C.verbose("Destroying module"),C.unbind.events(),C.show.input(),m.removeData(p)},fix:{reference:function(){m.is(h.input)&&(C.debug("Behavior called on <input> adjusting invoked element"),m=m.closest(h.checkbox),C.refresh())}},setup:function(){C.set.initialLoad(),C.is.indeterminate()?(C.debug("Initial value is indeterminate"),C.indeterminate()):C.is.checked()?(C.debug("Initial value is checked"),C.check()):(C.debug("Initial value is unchecked"),C.uncheck()),C.remove.initialLoad()},refresh:function(){g=m.children(h.label),A=m.children(h.input),v=A[0]},hide:{input:function(){C.verbose("Modifying <input> z-index to be unselectable"),A.addClass(c.hidden)}},show:{input:function(){C.verbose("Modifying <input> z-index to be selectable"),A.removeClass(c.hidden)}},observeChanges:function(){"MutationObserver"in sY&&((n=new MutationObserver((function(e){C.debug("DOM tree modified, updating selector cache"),C.refresh()}))).observe(x,{childList:!0,subtree:!0}),C.debug("Setting up mutation observer",n))},attachEvents:function(e,t){var n=aY(e);t=aY.isFunction(C[t])?C[t]:C.toggle,0<n.length?(C.debug("Attaching checkbox events to element",e,t),n.on("click"+d,t)):C.error(f.notFound)},event:{click:function(e){var t=aY(e.target);t.is(h.input)?C.verbose("Using default check action on initialized checkbox"):t.is(h.link)?C.debug("Clicking link inside checkbox, skipping toggle"):(C.toggle(),A.focus(),e.preventDefault())},keydown:function(e){var t=e.which;y=27==t?(C.verbose("Escape key pressed blurring field"),A.blur(),!0):!(e.ctrlKey||32!=t&&13!=t||(C.verbose("Enter/space key pressed, toggling checkbox"),C.toggle(),0))},keyup:function(e){y&&e.preventDefault()}},check:function(){C.should.allowCheck()&&(C.debug("Checking checkbox",A),C.set.checked(),C.should.ignoreCallbacks()||(u.onChecked.call(v),u.onChange.call(v)))},uncheck:function(){C.should.allowUncheck()&&(C.debug("Unchecking checkbox"),C.set.unchecked(),C.should.ignoreCallbacks()||(u.onUnchecked.call(v),u.onChange.call(v)))},indeterminate:function(){C.should.allowIndeterminate()?C.debug("Checkbox is already indeterminate"):(C.debug("Making checkbox indeterminate"),C.set.indeterminate(),C.should.ignoreCallbacks()||(u.onIndeterminate.call(v),u.onChange.call(v)))},determinate:function(){C.should.allowDeterminate()?C.debug("Checkbox is already determinate"):(C.debug("Making checkbox determinate"),C.set.determinate(),C.should.ignoreCallbacks()||(u.onDeterminate.call(v),u.onChange.call(v)))},enable:function(){C.is.enabled()?C.debug("Checkbox is already enabled"):(C.debug("Enabling checkbox"),C.set.enabled(),u.onEnable.call(v),u.onEnabled.call(v))},disable:function(){C.is.disabled()?C.debug("Checkbox is already disabled"):(C.debug("Disabling checkbox"),C.set.disabled(),u.onDisable.call(v),u.onDisabled.call(v))},get:{radios:function(){var e=C.get.name();return aY('input[name="'+e+'"]').closest(h.checkbox)},otherRadios:function(){return C.get.radios().not(m)},name:function(){return A.attr("name")}},is:{initialLoad:function(){return b},radio:function(){return A.hasClass(c.radio)||"radio"==A.attr("type")},indeterminate:function(){return void 0!==A.prop("indeterminate")&&A.prop("indeterminate")},checked:function(){return void 0!==A.prop("checked")&&A.prop("checked")},disabled:function(){return void 0!==A.prop("disabled")&&A.prop("disabled")},enabled:function(){return!C.is.disabled()},determinate:function(){return!C.is.indeterminate()},unchecked:function(){return!C.is.checked()}},should:{allowCheck:function(){return C.is.determinate()&&C.is.checked()&&!C.should.forceCallbacks()?(C.debug("Should not allow check, checkbox is already checked"),!1):!1!==u.beforeChecked.apply(v)||(C.debug("Should not allow check, beforeChecked cancelled"),!1)},allowUncheck:function(){return C.is.determinate()&&C.is.unchecked()&&!C.should.forceCallbacks()?(C.debug("Should not allow uncheck, checkbox is already unchecked"),!1):!1!==u.beforeUnchecked.apply(v)||(C.debug("Should not allow uncheck, beforeUnchecked cancelled"),!1)},allowIndeterminate:function(){return C.is.indeterminate()&&!C.should.forceCallbacks()?(C.debug("Should not allow indeterminate, checkbox is already indeterminate"),!1):!1!==u.beforeIndeterminate.apply(v)||(C.debug("Should not allow indeterminate, beforeIndeterminate cancelled"),!1)},allowDeterminate:function(){return C.is.determinate()&&!C.should.forceCallbacks()?(C.debug("Should not allow determinate, checkbox is already determinate"),!1):!1!==u.beforeDeterminate.apply(v)||(C.debug("Should not allow determinate, beforeDeterminate cancelled"),!1)},forceCallbacks:function(){return C.is.initialLoad()&&u.fireOnInit},ignoreCallbacks:function(){return b&&!u.fireOnInit}},can:{change:function(){return!(m.hasClass(c.disabled)||m.hasClass(c.readOnly)||A.prop("disabled")||A.prop("readonly"))},uncheck:function(){return"boolean"==typeof u.uncheckable?u.uncheckable:!C.is.radio()}},set:{initialLoad:function(){b=!0},checked:function(){C.verbose("Setting class to checked"),m.removeClass(c.indeterminate).addClass(c.checked),C.is.radio()&&C.uncheckOthers(),C.is.indeterminate()||!C.is.checked()?(C.verbose("Setting state to checked",v),A.prop("indeterminate",!1).prop("checked",!0),C.trigger.change()):C.debug("Input is already checked, skipping input property change")},unchecked:function(){C.verbose("Removing checked class"),m.removeClass(c.indeterminate).removeClass(c.checked),C.is.indeterminate()||!C.is.unchecked()?(C.debug("Setting state to unchecked"),A.prop("indeterminate",!1).prop("checked",!1),C.trigger.change()):C.debug("Input is already unchecked")},indeterminate:function(){C.verbose("Setting class to indeterminate"),m.addClass(c.indeterminate),C.is.indeterminate()?C.debug("Input is already indeterminate, skipping input property change"):(C.debug("Setting state to indeterminate"),A.prop("indeterminate",!0),C.trigger.change())},determinate:function(){C.verbose("Removing indeterminate class"),m.removeClass(c.indeterminate),C.is.determinate()?C.debug("Input is already determinate, skipping input property change"):(C.debug("Setting state to determinate"),A.prop("indeterminate",!1))},disabled:function(){C.verbose("Setting class to disabled"),m.addClass(c.disabled),C.is.disabled()?C.debug("Input is already disabled, skipping input property change"):(C.debug("Setting state to disabled"),A.prop("disabled","disabled"),C.trigger.change())},enabled:function(){C.verbose("Removing disabled class"),m.removeClass(c.disabled),C.is.enabled()?C.debug("Input is already enabled, skipping input property change"):(C.debug("Setting state to enabled"),A.prop("disabled",!1),C.trigger.change())},tabbable:function(){C.verbose("Adding tabindex to checkbox"),void 0===A.attr("tabindex")&&A.attr("tabindex",0)}},remove:{initialLoad:function(){b=!1}},trigger:{change:function(){var e=uY.createEvent("HTMLEvents"),t=A[0];t&&(C.verbose("Triggering native change event"),e.initEvent("change",!0,!1),t.dispatchEvent(e))}},create:{label:function(){0<A.prevAll(h.label).length?(A.prev(h.label).detach().insertAfter(A),C.debug("Moving existing label",g)):C.has.label()||(g=aY("<label>").insertAfter(A),C.debug("Creating label",g))}},has:{label:function(){return 0<g.length}},bind:{events:function(){C.verbose("Attaching checkbox events"),m.on("click"+d,C.event.click).on("keydown"+d,h.input,C.event.keydown).on("keyup"+d,h.input,C.event.keyup)}},unbind:{events:function(){C.debug("Removing events"),m.off(d)}},uncheckOthers:function(){var e=C.get.otherRadios();C.debug("Unchecking other radios",e),e.removeClass(c.checked)},toggle:function(){C.can.change()?C.is.indeterminate()||C.is.unchecked()?(C.debug("Currently unchecked"),C.check()):C.is.checked()&&C.can.uncheck()&&(C.debug("Currently checked"),C.uncheck()):C.is.radio()||C.debug("Checkbox is read-only or disabled, ignoring toggle")},setting:function(e,t){if(C.debug("Changing setting",e,t),aY.isPlainObject(e))aY.extend(!0,u,e);else{if(void 0===t)return u[e];aY.isPlainObject(u[e])?aY.extend(!0,u[e],t):u[e]=t}},internal:function(e,t){if(aY.isPlainObject(e))aY.extend(!0,C,e);else{if(void 0===t)return C[e];C[e]=t}},debug:function(){!u.silent&&u.debug&&(u.performance?C.performance.log(arguments):(C.debug=Function.prototype.bind.call(console.info,console,u.name+":"),C.debug.apply(console,arguments)))},verbose:function(){!u.silent&&u.verbose&&u.debug&&(u.performance?C.performance.log(arguments):(C.verbose=Function.prototype.bind.call(console.info,console,u.name+":"),C.verbose.apply(console,arguments)))},error:function(){u.silent||(C.error=Function.prototype.bind.call(console.error,console,u.name+":"),C.error.apply(console,arguments))},performance:{log:function(e){var t,n;u.performance&&(n=(t=(new Date).getTime())-(r||t),r=t,i.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:x,"Execution Time":n})),clearTimeout(C.performance.timer),C.performance.timer=setTimeout(C.performance.display,500)},display:function(){u.name,r=!1,clearTimeout(C.performance.timer),aY.each(i,(function(e,t){t["Execution Time"]})),(void 0!==console.group||void 0!==console.table)&&0<i.length&&!console.table&&aY.each(i,(function(e,t){t.Name,t["Execution Time"]})),i=[]}},invoke:function(e,n,r){var i,o,a,u=w;return n=n||s,r=x||r,"string"==typeof e&&void 0!==u&&(e=e.split(/[\. ]/),i=e.length-1,aY.each(e,(function(t,n){var r=t!=i?n+e[t+1].charAt(0).toUpperCase()+e[t+1].slice(1):e;if(!aY.isPlainObject(u[r])||t==i)return void 0!==u[r]?(o=u[r],!1):aY.isPlainObject(u[n])&&t!=i?void(u=u[n]):(void 0!==u[n]?o=u[n]:C.error(f.method,e),!1);u=u[r]}))),aY.isFunction(o)?a=o.apply(r,n):void 0!==o&&(a=o),aY.isArray(t)?t.push(a):void 0!==t?t=[t,a]:void 0!==a&&(t=a),o}};a?(void 0===w&&C.initialize(),C.invoke(o)):(void 0!==w&&w.invoke("destroy"),C.initialize())})),void 0!==t?t:this},aY.fn.checkbox.settings={name:"Checkbox",namespace:"checkbox",silent:!1,debug:!1,verbose:!0,performance:!0,uncheckable:"auto",fireOnInit:!1,onChange:function(){},beforeChecked:function(){},beforeUnchecked:function(){},beforeDeterminate:function(){},beforeIndeterminate:function(){},onChecked:function(){},onUnchecked:function(){},onDeterminate:function(){},onIndeterminate:function(){},onEnable:function(){},onDisable:function(){},onEnabled:function(){},onDisabled:function(){},className:{checked:"checked",indeterminate:"indeterminate",disabled:"disabled",hidden:"hidden",radio:"radio",readOnly:"read-only"},error:{method:"The method you called is not defined"},selector:{checkbox:".ui.checkbox",label:"label, .box",input:'input[type="checkbox"], input[type="radio"]',link:"a[href]"}},iY=ve.a,$a=window,oY=document,$a=void 0!==$a&&$a.Math==Math?$a:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),iY.fn.dimmer=function(e){var t,n=iY(this),r=(new Date).getTime(),i=[],o=e,a="string"==typeof o,s=[].slice.call(arguments,1);return n.each((function(){var u,c,l,h=iY.isPlainObject(e)?iY.extend(!0,{},iY.fn.dimmer.settings,e):iY.extend({},iY.fn.dimmer.settings),f=h.selector,d=h.namespace,p=h.className,m=h.error,g="."+d,A="module-"+d,v=(n.selector,"ontouchstart"in oY.documentElement?"touchstart":"click"),b=iY(this),y=this,w=b.data(A);(l={preinitialize:function(){u=l.is.dimmer()?(c=b.parent(),b):(c=b,l.has.dimmer()?h.dimmerName?c.find(f.dimmer).filter("."+h.dimmerName):c.find(f.dimmer):l.create())},initialize:function(){l.debug("Initializing dimmer",h),l.bind.events(),l.set.dimmable(),l.instantiate()},instantiate:function(){l.verbose("Storing instance of module",l),w=l,b.data(A,w)},destroy:function(){l.verbose("Destroying previous module",u),l.unbind.events(),l.remove.variation(),c.off(g)},bind:{events:function(){"hover"==h.on?c.on("mouseenter"+g,l.show).on("mouseleave"+g,l.hide):"click"==h.on&&c.on(v+g,l.toggle),l.is.page()&&(l.debug("Setting as a page dimmer",c),l.set.pageDimmer()),l.is.closable()&&(l.verbose("Adding dimmer close event",u),c.on(v+g,f.dimmer,l.event.click))}},unbind:{events:function(){b.removeData(A),c.off(g)}},event:{click:function(e){l.verbose("Determining if event occurred on dimmer",e),0!==u.find(e.target).length&&!iY(e.target).is(f.content)||(l.hide(),e.stopImmediatePropagation())}},addContent:function(e){e=iY(e),l.debug("Add content to dimmer",e),e.parent()[0]!==u[0]&&e.detach().appendTo(u)},create:function(){var e=iY(h.template.dimmer());return h.dimmerName&&(l.debug("Creating named dimmer",h.dimmerName),e.addClass(h.dimmerName)),e.appendTo(c),e},show:function(e){e=iY.isFunction(e)?e:function(){},l.debug("Showing dimmer",u,h),l.set.variation(),l.is.dimmed()&&!l.is.animating()||!l.is.enabled()?l.debug("Dimmer is already shown or disabled"):(l.animate.show(e),h.onShow.call(y),h.onChange.call(y))},hide:function(e){e=iY.isFunction(e)?e:function(){},l.is.dimmed()||l.is.animating()?(l.debug("Hiding dimmer",u),l.animate.hide(e),h.onHide.call(y),h.onChange.call(y)):l.debug("Dimmer is not visible")},toggle:function(){l.verbose("Toggling dimmer visibility",u),l.is.dimmed()?l.hide():l.show()},animate:{show:function(e){e=iY.isFunction(e)?e:function(){},h.useCSS&&void 0!==iY.fn.transition&&u.transition("is supported")?((h.useFlex?(l.debug("Using flex dimmer"),l.remove):(l.debug("Using legacy non-flex dimmer"),l.set)).legacy(),"auto"!==h.opacity&&l.set.opacity(),u.transition({displayType:h.useFlex?"flex":"block",animation:h.transition+" in",queue:!1,duration:l.get.duration(),useFailSafe:!0,onStart:function(){l.set.dimmed()},onComplete:function(){l.set.active(),e()}})):(l.verbose("Showing dimmer animation with javascript"),l.set.dimmed(),"auto"==h.opacity&&(h.opacity=.8),u.stop().css({opacity:0,width:"100%",height:"100%"}).fadeTo(l.get.duration(),h.opacity,(function(){u.removeAttr("style"),l.set.active(),e()})))},hide:function(e){e=iY.isFunction(e)?e:function(){},h.useCSS&&void 0!==iY.fn.transition&&u.transition("is supported")?(l.verbose("Hiding dimmer with css"),u.transition({displayType:h.useFlex?"flex":"block",animation:h.transition+" out",queue:!1,duration:l.get.duration(),useFailSafe:!0,onStart:function(){l.remove.dimmed()},onComplete:function(){l.remove.variation(),l.remove.active(),e()}})):(l.verbose("Hiding dimmer with javascript"),l.remove.dimmed(),u.stop().fadeOut(l.get.duration(),(function(){l.remove.active(),u.removeAttr("style"),e()})))}},get:{dimmer:function(){return u},duration:function(){return"object"==typeof h.duration?l.is.active()?h.duration.hide:h.duration.show:h.duration}},has:{dimmer:function(){return h.dimmerName?0<b.find(f.dimmer).filter("."+h.dimmerName).length:0<b.find(f.dimmer).length}},is:{active:function(){return u.hasClass(p.active)},animating:function(){return u.is(":animated")||u.hasClass(p.animating)},closable:function(){return"auto"==h.closable?"hover"!=h.on:h.closable},dimmer:function(){return b.hasClass(p.dimmer)},dimmable:function(){return b.hasClass(p.dimmable)},dimmed:function(){return c.hasClass(p.dimmed)},disabled:function(){return c.hasClass(p.disabled)},enabled:function(){return!l.is.disabled()},page:function(){return c.is("body")},pageDimmer:function(){return u.hasClass(p.pageDimmer)}},can:{show:function(){return!u.hasClass(p.disabled)}},set:{opacity:function(e){var t=u.css("background-color"),n=t.split(","),r=n&&3==n.length,i=n&&4==n.length;e=0===h.opacity?0:h.opacity||e,t=r||i?(n[3]=e+")",n.join(",")):"rgba(0, 0, 0, "+e+")",l.debug("Setting opacity to",e),u.css("background-color",t)},legacy:function(){u.addClass(p.legacy)},active:function(){u.addClass(p.active)},dimmable:function(){c.addClass(p.dimmable)},dimmed:function(){c.addClass(p.dimmed)},pageDimmer:function(){u.addClass(p.pageDimmer)},disabled:function(){u.addClass(p.disabled)},variation:function(e){(e=e||h.variation)&&u.addClass(e)}},remove:{active:function(){u.removeClass(p.active)},legacy:function(){u.removeClass(p.legacy)},dimmed:function(){c.removeClass(p.dimmed)},disabled:function(){u.removeClass(p.disabled)},variation:function(e){(e=e||h.variation)&&u.removeClass(e)}},setting:function(e,t){if(l.debug("Changing setting",e,t),iY.isPlainObject(e))iY.extend(!0,h,e);else{if(void 0===t)return h[e];iY.isPlainObject(h[e])?iY.extend(!0,h[e],t):h[e]=t}},internal:function(e,t){if(iY.isPlainObject(e))iY.extend(!0,l,e);else{if(void 0===t)return l[e];l[e]=t}},debug:function(){!h.silent&&h.debug&&(h.performance?l.performance.log(arguments):(l.debug=Function.prototype.bind.call(console.info,console,h.name+":"),l.debug.apply(console,arguments)))},verbose:function(){!h.silent&&h.verbose&&h.debug&&(h.performance?l.performance.log(arguments):(l.verbose=Function.prototype.bind.call(console.info,console,h.name+":"),l.verbose.apply(console,arguments)))},error:function(){h.silent||(l.error=Function.prototype.bind.call(console.error,console,h.name+":"),l.error.apply(console,arguments))},performance:{log:function(e){var t,n;h.performance&&(n=(t=(new Date).getTime())-(r||t),r=t,i.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:y,"Execution Time":n})),clearTimeout(l.performance.timer),l.performance.timer=setTimeout(l.performance.display,500)},display:function(){h.name,r=!1,clearTimeout(l.performance.timer),iY.each(i,(function(e,t){t["Execution Time"]})),1<n.length&&n.length,(void 0!==console.group||void 0!==console.table)&&0<i.length&&!console.table&&iY.each(i,(function(e,t){t.Name,t["Execution Time"]})),i=[]}},invoke:function(e,n,r){var i,o,a,u=w;return n=n||s,r=y||r,"string"==typeof e&&void 0!==u&&(e=e.split(/[\. ]/),i=e.length-1,iY.each(e,(function(t,n){var r=t!=i?n+e[t+1].charAt(0).toUpperCase()+e[t+1].slice(1):e;if(!iY.isPlainObject(u[r])||t==i)return void 0!==u[r]?(o=u[r],!1):iY.isPlainObject(u[n])&&t!=i?void(u=u[n]):(void 0!==u[n]?o=u[n]:l.error(m.method,e),!1);u=u[r]}))),iY.isFunction(o)?a=o.apply(r,n):void 0!==o&&(a=o),iY.isArray(t)?t.push(a):void 0!==t?t=[t,a]:void 0!==a&&(t=a),o}}).preinitialize(),a?(void 0===w&&l.initialize(),l.invoke(o)):(void 0!==w&&w.invoke("destroy"),l.initialize())})),void 0!==t?t:this},iY.fn.dimmer.settings={name:"Dimmer",namespace:"dimmer",silent:!1,debug:!1,verbose:!1,performance:!0,useFlex:!0,dimmerName:!1,variation:!1,closable:"auto",useCSS:!0,transition:"fade",on:!1,opacity:"auto",duration:{show:500,hide:500},onChange:function(){},onShow:function(){},onHide:function(){},error:{method:"The method you called is not defined."},className:{active:"active",animating:"animating",dimmable:"dimmable",dimmed:"dimmed",dimmer:"dimmer",disabled:"disabled",hide:"hide",legacy:"legacy",pageDimmer:"page",show:"show"},selector:{dimmer:"> .ui.dimmer",content:".ui.dimmer > .content, .ui.dimmer > .content > .center"},template:{dimmer:function(){return iY("<div />").attr("class","ui dimmer")}}},tY=ve.a,nY=window,rY=document,nY=void 0!==nY&&nY.Math==Math?nY:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),tY.fn.dropdown=function(e){var t,n=tY(this),r=tY(rY),i=(n.selector,"ontouchstart"in rY.documentElement),o=(new Date).getTime(),a=[],s=e,u="string"==typeof s,c=[].slice.call(arguments,1);return n.each((function(l){var h,f,d,p,m,g,A,v=tY.isPlainObject(e)?tY.extend(!0,{},tY.fn.dropdown.settings,e):tY.extend({},tY.fn.dropdown.settings),b=v.className,y=v.message,w=v.fields,x=v.keys,C=v.metadata,k=v.namespace,E=v.regExp,S=v.selector,_=v.error,O=v.templates,T="."+k,D="module-"+k,B=tY(this),I=tY(v.context),M=B.find(S.text),j=B.find(S.search),N=B.find(S.sizer),F=B.find(S.input),R=B.find(S.icon),P=0<B.prev().find(S.text).length?B.prev().find(S.text):B.prev(),L=B.children(S.menu),U=L.find(S.item),z=!1,H=!1,$=!1,Q=this,V=B.data(D),q={initialize:function(){q.debug("Initializing dropdown",v),q.is.alreadySetup()?q.setup.reference():(q.setup.layout(),v.values&&q.change.values(v.values),q.refreshData(),q.save.defaults(),q.restore.selected(),q.create.id(),q.bind.events(),q.observeChanges(),q.instantiate())},instantiate:function(){q.verbose("Storing instance of dropdown",q),V=q,B.data(D,q)},destroy:function(){q.verbose("Destroying previous dropdown",B),q.remove.tabbable(),B.off(T).removeData(D),L.off(T),r.off(p),q.disconnect.menuObserver(),q.disconnect.selectObserver()},observeChanges:function(){"MutationObserver"in nY&&(g=new MutationObserver(q.event.select.mutation),A=new MutationObserver(q.event.menu.mutation),q.debug("Setting up mutation observer",g,A),q.observe.select(),q.observe.menu())},disconnect:{menuObserver:function(){A&&A.disconnect()},selectObserver:function(){g&&g.disconnect()}},observe:{select:function(){q.has.input()&&g.observe(B[0],{childList:!0,subtree:!0})},menu:function(){q.has.menu()&&A.observe(L[0],{childList:!0,subtree:!0})}},create:{id:function(){m=(Math.random().toString(16)+"000000000").substr(2,8),p="."+m,q.verbose("Creating unique id for element",m)},userChoice:function(e){var t,n;return!!(e=e||q.get.userValues())&&(e=tY.isArray(e)?e:[e],tY.each(e,(function(e,r){!1===q.get.item(r)&&(n=v.templates.addition(q.add.variables(y.addResult,r)),n=tY("<div />").html(n).attr("data-"+C.value,r).attr("data-"+C.text,r).addClass(b.addition).addClass(b.item),v.hideAdditions&&n.addClass(b.hidden),t=void 0===t?n:t.add(n),q.verbose("Creating user choices for value",r,n))})),t)},userLabels:function(e){var t=q.get.userValues();t&&(q.debug("Adding user labels",t),tY.each(t,(function(e,t){q.verbose("Adding custom user value"),q.add.label(t,t)})))},menu:function(){L=tY("<div />").addClass(b.menu).appendTo(B)},sizer:function(){N=tY("<span />").addClass(b.sizer).insertAfter(j)}},search:function(e){e=void 0!==e?e:q.get.query(),q.verbose("Searching for query",e),q.has.minCharacters(e)?q.filter(e):q.hide()},select:{firstUnfiltered:function(){q.verbose("Selecting first non-filtered element"),q.remove.selectedItem(),U.not(S.unselectable).not(S.addition+S.hidden).eq(0).addClass(b.selected)},nextAvailable:function(e){var t=(e=e.eq(0)).nextAll(S.item).not(S.unselectable).eq(0);e=e.prevAll(S.item).not(S.unselectable).eq(0);(0<t.length?(q.verbose("Moving selection to",t),t):(q.verbose("Moving selection to",e),e)).addClass(b.selected)}},setup:{api:function(){var e={debug:v.debug,urlData:{value:q.get.value(),query:q.get.query()},on:!1};q.verbose("First request, initializing API"),B.api(e)},layout:function(){B.is("select")&&(q.setup.select(),q.setup.returnedObject()),q.has.menu()||q.create.menu(),q.is.search()&&!q.has.search()&&(q.verbose("Adding search input"),j=tY("<input />").addClass(b.search).prop("autocomplete","off").insertBefore(M)),q.is.multiple()&&q.is.searchSelection()&&!q.has.sizer()&&q.create.sizer(),v.allowTab&&q.set.tabbable()},select:function(){var e=q.get.selectValues();q.debug("Dropdown initialized on a select",e),0<(F=B.is("select")?B:F).parent(S.dropdown).length?(q.debug("UI dropdown already exists. Creating dropdown menu only"),B=F.closest(S.dropdown),q.has.menu()||q.create.menu(),L=B.children(S.menu),q.setup.menu(e)):(q.debug("Creating entire dropdown from select"),B=tY("<div />").attr("class",F.attr("class")).addClass(b.selection).addClass(b.dropdown).html(O.dropdown(e)).insertBefore(F),F.hasClass(b.multiple)&&!1===F.prop("multiple")&&(q.error(_.missingMultiple),F.prop("multiple",!0)),F.is("[multiple]")&&q.set.multiple(),F.prop("disabled")&&(q.debug("Disabling dropdown"),B.addClass(b.disabled)),F.removeAttr("class").detach().prependTo(B)),q.refresh()},menu:function(e){L.html(O.menu(e,w)),U=L.find(S.item)},reference:function(){q.debug("Dropdown behavior was called on select, replacing with closest dropdown"),B=B.parent(S.dropdown),V=B.data(D),Q=B.get(0),q.refresh(),q.setup.returnedObject()},returnedObject:function(){var e=n.slice(0,l),t=n.slice(l+1);n=e.add(B).add(t)}},refresh:function(){q.refreshSelectors(),q.refreshData()},refreshItems:function(){U=L.find(S.item)},refreshSelectors:function(){q.verbose("Refreshing selector cache"),M=B.find(S.text),j=B.find(S.search),F=B.find(S.input),R=B.find(S.icon),P=0<B.prev().find(S.text).length?B.prev().find(S.text):B.prev(),L=B.children(S.menu),U=L.find(S.item)},refreshData:function(){q.verbose("Refreshing cached metadata"),U.removeData(C.text).removeData(C.value)},clearData:function(){q.verbose("Clearing metadata"),U.removeData(C.text).removeData(C.value),B.removeData(C.defaultText).removeData(C.defaultValue).removeData(C.placeholderText)},toggle:function(){q.verbose("Toggling menu visibility"),q.is.active()?q.hide():q.show()},show:function(e){if(e=tY.isFunction(e)?e:function(){},!q.can.show()&&q.is.remote()&&(q.debug("No API results retrieved, searching before show"),q.queryRemote(q.get.query(),q.show)),q.can.show()&&!q.is.active()){if(q.debug("Showing dropdown"),!q.has.message()||q.has.maxSelections()||q.has.allResultsFiltered()||q.remove.message(),q.is.allFiltered())return!0;!1!==v.onShow.call(Q)&&q.animate.show((function(){q.can.click()&&q.bind.intent(),q.has.menuSearch()&&q.focusSearch(),q.set.visible(),e.call(Q)}))}},hide:function(e){e=tY.isFunction(e)?e:function(){},q.is.active()&&!q.is.animatingOutward()&&(q.debug("Hiding dropdown"),!1!==v.onHide.call(Q)&&q.animate.hide((function(){q.remove.visible(),e.call(Q)})))},hideOthers:function(){q.verbose("Finding other dropdowns to hide"),n.not(B).has(S.menu+"."+b.visible).dropdown("hide")},hideMenu:function(){q.verbose("Hiding menu  instantaneously"),q.remove.active(),q.remove.visible(),L.transition("hide")},hideSubMenus:function(){var e=L.children(S.item).find(S.menu);q.verbose("Hiding sub menus",e),e.transition("hide")},bind:{events:function(){i&&q.bind.touchEvents(),q.bind.keyboardEvents(),q.bind.inputEvents(),q.bind.mouseEvents()},touchEvents:function(){q.debug("Touch device detected binding additional touch events"),q.is.searchSelection()||q.is.single()&&B.on("touchstart"+T,q.event.test.toggle),L.on("touchstart"+T,S.item,q.event.item.mouseenter)},keyboardEvents:function(){q.verbose("Binding keyboard events"),B.on("keydown"+T,q.event.keydown),q.has.search()&&B.on(q.get.inputEvent()+T,S.search,q.event.input),q.is.multiple()&&r.on("keydown"+p,q.event.document.keydown)},inputEvents:function(){q.verbose("Binding input change events"),B.on("change"+T,S.input,q.event.change)},mouseEvents:function(){q.verbose("Binding mouse events"),q.is.multiple()&&B.on("click"+T,S.label,q.event.label.click).on("click"+T,S.remove,q.event.remove.click),q.is.searchSelection()?(B.on("mousedown"+T,q.event.mousedown).on("mouseup"+T,q.event.mouseup).on("mousedown"+T,S.menu,q.event.menu.mousedown).on("mouseup"+T,S.menu,q.event.menu.mouseup).on("click"+T,S.icon,q.event.icon.click).on("focus"+T,S.search,q.event.search.focus).on("click"+T,S.search,q.event.search.focus).on("blur"+T,S.search,q.event.search.blur).on("click"+T,S.text,q.event.text.focus),q.is.multiple()&&B.on("click"+T,q.event.click)):("click"==v.on?B.on("click"+T,q.event.test.toggle):"hover"==v.on?B.on("mouseenter"+T,q.delay.show).on("mouseleave"+T,q.delay.hide):B.on(v.on+T,q.toggle),B.on("click"+T,S.icon,q.event.icon.click).on("mousedown"+T,q.event.mousedown).on("mouseup"+T,q.event.mouseup).on("focus"+T,q.event.focus),q.has.menuSearch()?B.on("blur"+T,S.search,q.event.search.blur):B.on("blur"+T,q.event.blur)),L.on("mouseenter"+T,S.item,q.event.item.mouseenter).on("mouseleave"+T,S.item,q.event.item.mouseleave).on("click"+T,S.item,q.event.item.click)},intent:function(){q.verbose("Binding hide intent event to document"),i&&r.on("touchstart"+p,q.event.test.touch).on("touchmove"+p,q.event.test.touch),r.on("click"+p,q.event.test.hide)}},unbind:{intent:function(){q.verbose("Removing hide intent event from document"),i&&r.off("touchstart"+p).off("touchmove"+p),r.off("click"+p)}},filter:function(e){function t(){q.is.multiple()&&q.filterActive(),(e||!e&&0==q.get.activeItem().length)&&q.select.firstUnfiltered(),q.has.allResultsFiltered()?v.onNoResults.call(Q,n)?v.allowAdditions?v.hideAdditions&&(q.verbose("User addition with no menu, setting empty style"),q.set.empty(),q.hideMenu()):(q.verbose("All items filtered, showing message",n),q.add.message(y.noResults)):(q.verbose("All items filtered, hiding dropdown",n),q.hideMenu()):(q.remove.empty(),q.remove.message()),v.allowAdditions&&q.add.userSuggestion(e),q.is.searchSelection()&&q.can.show()&&q.is.focusedOnSearch()&&q.show()}var n=void 0!==e?e:q.get.query();v.useLabels&&q.has.maxSelections()||(v.apiSettings?q.can.useAPI()?q.queryRemote(n,(function(){v.filterRemoteData&&q.filterItems(n),t()})):q.error(_.noAPI):(q.filterItems(n),t()))},queryRemote:function(e,t){e={errorDuration:!1,cache:"local",throttle:v.throttle,urlData:{query:e},onError:function(){q.add.message(y.serverError),t()},onFailure:function(){q.add.message(y.serverError),t()},onSuccess:function(e){var n=e[w.remoteValues];tY.isArray(n)&&0<n.length?(q.remove.message(),q.setup.menu({values:e[w.remoteValues]})):q.add.message(y.noResults),t()}},B.api("get request")||q.setup.api(),e=tY.extend(!0,{},e,v.apiSettings),B.api("setting",e).api("query")},filterItems:function(e){var t=void 0!==e?e:q.get.query(),n=null,r=(e=q.escape.string(t),new RegExp("^"+e,"igm"));q.has.query()&&(n=[],q.verbose("Searching for matching values",t),U.each((function(){var e,i=tY(this);if("both"==v.match||"text"==v.match){if(-1!==(e=String(q.get.choiceText(i,!1))).search(r))return n.push(this),!0;if("exact"===v.fullTextSearch&&q.exactSearch(t,e))return n.push(this),!0;if(!0===v.fullTextSearch&&q.fuzzySearch(t,e))return n.push(this),!0}return"both"!=v.match&&"value"!=v.match||!(-1!==(i=String(q.get.choiceValue(i,e))).search(r)||"exact"===v.fullTextSearch&&q.exactSearch(t,i)||!0===v.fullTextSearch&&q.fuzzySearch(t,i))?void 0:(n.push(this),!0)}))),q.debug("Showing only matched items",t),q.remove.filteredItem(),n&&U.not(n).addClass(b.filtered)},fuzzySearch:function(e,t){var n=t.length,r=e.length;if(e=e.toLowerCase(),t=t.toLowerCase(),n<r)return!1;if(r===n)return e===t;e:for(var i=0,o=0;i<r;i++){for(var a=e.charCodeAt(i);o<n;)if(t.charCodeAt(o++)===a)continue e;return!1}return!0},exactSearch:function(e,t){return e=e.toLowerCase(),-1<(t=t.toLowerCase()).indexOf(e)},filterActive:function(){v.useLabels&&U.filter("."+b.active).addClass(b.filtered)},focusSearch:function(e){q.has.search()&&!q.is.focusedOnSearch()&&(e?(B.off("focus"+T,S.search),j.focus(),B.on("focus"+T,S.search,q.event.search.focus)):j.focus())},forceSelection:function(){var e=U.not(b.filtered).filter("."+b.selected).eq(0),t=U.not(b.filtered).filter("."+b.active).eq(0);0<(e=0<e.length?e:t).length&&!q.is.multiple()?(q.debug("Forcing partial selection to selected item",e),q.event.item.click.call(e,{},!0)):(v.allowAdditions&&q.set.selected(q.get.query()),q.remove.searchTerm())},change:{values:function(e){v.allowAdditions||q.clear(),q.debug("Creating dropdown with specified values",e),q.setup.menu({values:e}),tY.each(e,(function(e,t){if(1==t.selected)return q.debug("Setting initial selection to",t.value),q.set.selected(t.value),!0}))}},event:{change:function(){$||(q.debug("Input changed, updating selection"),q.set.selected())},focus:function(){v.showOnFocus&&!z&&q.is.hidden()&&!f&&q.show()},blur:function(e){f=rY.activeElement===this,z||f||(q.remove.activeLabel(),q.hide())},mousedown:function(){q.is.searchSelection()?d=!0:z=!0},mouseup:function(){q.is.searchSelection()?d=!1:z=!1},click:function(e){tY(e.target).is(B)&&(q.is.focusedOnSearch()?q.show():q.focusSearch())},search:{focus:function(){z=!0,q.is.multiple()&&q.remove.activeLabel(),v.showOnFocus&&q.search()},blur:function(e){f=rY.activeElement===this,!q.is.searchSelection()||d||H||f||(v.forceSelection&&q.forceSelection(),q.hide()),d=!1}},icon:{click:function(e){R.hasClass(b.clear)?q.clear():q.can.click()&&q.toggle()}},text:{focus:function(e){z=!0,q.focusSearch()}},input:function(e){(q.is.multiple()||q.is.searchSelection())&&q.set.filtered(),clearTimeout(q.timer),q.timer=setTimeout(q.search,v.delay.search)},label:{click:function(e){var t=tY(this),n=B.find(S.label),r=n.filter("."+b.active),i=t.nextAll("."+b.active),o=t.prevAll("."+b.active);i=(0<i.length?t.nextUntil(i):t.prevUntil(o)).add(r).add(t);e.shiftKey?(r.removeClass(b.active),i.addClass(b.active)):e.ctrlKey?t.toggleClass(b.active):(r.removeClass(b.active),t.addClass(b.active)),v.onLabelSelect.apply(this,n.filter("."+b.active))}},remove:{click:function(){var e=tY(this).parent();e.hasClass(b.active)?q.remove.activeLabels():q.remove.activeLabels(e)}},test:{toggle:function(e){var t=q.is.multiple()?q.show:q.toggle;q.is.bubbledLabelClick(e)||q.is.bubbledIconClick(e)||q.determine.eventOnElement(e,t)&&e.preventDefault()},touch:function(e){q.determine.eventOnElement(e,(function(){"touchstart"==e.type?q.timer=setTimeout((function(){q.hide()}),v.delay.touch):"touchmove"==e.type&&clearTimeout(q.timer)})),e.stopPropagation()},hide:function(e){q.determine.eventInModule(e,q.hide)}},select:{mutation:function(e){q.debug("<select> modified, recreating menu");var t=!1;tY.each(e,(function(e,n){if(tY(n.target).is("select")||tY(n.addedNodes).is("select"))return t=!0})),t&&(q.disconnect.selectObserver(),q.refresh(),q.setup.select(),q.set.selected(),q.observe.select())}},menu:{mutation:function(e){var t=(e=e[0]).addedNodes?tY(e.addedNodes[0]):tY(!1);e=e.removedNodes?tY(e.removedNodes[0]):tY(!1),e=(t=t.add(e)).is(S.addition)||0<t.closest(S.addition).length,t=t.is(S.message)||0<t.closest(S.message).length;e||t?(q.debug("Updating item selector cache"),q.refreshItems()):(q.debug("Menu modified, updating selector cache"),q.refresh())},mousedown:function(){H=!0},mouseup:function(){H=!1}},item:{mouseenter:function(e){var t=tY(e.target),n=(i=tY(this)).children(S.menu),r=i.siblings(S.item).children(S.menu),i=0<n.length;0<n.find(t).length||!i||(clearTimeout(q.itemTimer),q.itemTimer=setTimeout((function(){q.verbose("Showing sub-menu",n),tY.each(r,(function(){q.animate.hide(!1,tY(this))})),q.animate.show(!1,n)}),v.delay.show),e.preventDefault())},mouseleave:function(e){var t=tY(this).children(S.menu);0<t.length&&(clearTimeout(q.itemTimer),q.itemTimer=setTimeout((function(){q.verbose("Hiding sub-menu",t),q.animate.hide(!1,t)}),v.delay.hide))},click:function(e,t){var n=tY(this),r=(e=tY(e?e.target:""),n.find(S.menu)),i=q.get.choiceText(n),o=q.get.choiceValue(n,i),a=0<r.length;r=0<r.find(e).length;q.has.menuSearch()&&tY(rY.activeElement).blur(),r||a&&!v.allowCategorySelection||(q.is.searchSelection()&&(v.allowAdditions&&q.remove.userAddition(),q.remove.searchTerm(),q.is.focusedOnSearch()||1==t||q.focusSearch(!0)),v.useLabels||(q.remove.filteredItem(),q.set.scrollPosition(n)),q.determine.selectAction.call(this,i,o))}},document:{keydown:function(e){var t,n,r,i,o,a,s,u,c,l,h=e.which;q.is.inObject(h,x)&&((n=(t=B.find(S.label)).filter("."+b.active)).data(C.value),a=t.index(n),s=t.length,r=0<n.length,i=1<n.length,o=0===a,a=a+1==s,s=q.is.searchSelection(),u=q.is.focusedOnSearch(),c=q.is.focused(),l=u&&0===q.get.caretPosition(),s&&!r&&!u||(h==x.leftArrow?!c&&!l||r?r&&(e.shiftKey?q.verbose("Adding previous label to selection"):(q.verbose("Selecting previous label"),t.removeClass(b.active)),o&&!i?n.addClass(b.active):n.prev(S.siblingLabel).addClass(b.active).end(),e.preventDefault()):(q.verbose("Selecting previous label"),t.last().addClass(b.active)):h==x.rightArrow?(c&&!r&&t.first().addClass(b.active),r&&(e.shiftKey?q.verbose("Adding next label to selection"):(q.verbose("Selecting next label"),t.removeClass(b.active)),a?s?u?t.removeClass(b.active):q.focusSearch():(i?n.next(S.siblingLabel):n).addClass(b.active):n.next(S.siblingLabel).addClass(b.active),e.preventDefault())):h==x.deleteKey||h==x.backspace?r?(q.verbose("Removing active labels"),a&&s&&!u&&q.focusSearch(),n.last().next(S.siblingLabel).addClass(b.active),q.remove.activeLabels(n),e.preventDefault()):l&&!r&&h==x.backspace&&(q.verbose("Removing last label on input backspace"),n=t.last().addClass(b.active),q.remove.activeLabels(n)):n.removeClass(b.active)))}},keydown:function(e){var t=e.which;if(q.is.inObject(t,x)){var n,r=U.not(S.unselectable).filter("."+b.selected).eq(0),i=L.children("."+b.active).eq(0),o=(i=0<(r=0<r.length?r:i).length?r.siblings(":not(."+b.filtered+")").addBack():L.children(":not(."+b.filtered+")"),r.children(S.menu)),a=r.closest(S.menu),s=a.hasClass(b.visible)||a.hasClass(b.animating)||0<a.parent(S.menu).length,u=0<o.length,c=0<r.length,l=0<r.not(S.unselectable).length,h=t==x.delimiter&&v.allowAdditions&&q.is.multiple();if(v.allowAdditions&&v.hideAdditions&&(t==x.enter||h)&&l&&(q.verbose("Selecting item from keyboard shortcut",r),q.event.item.click.call(r,e),q.is.searchSelection()&&q.remove.searchTerm()),q.is.visible()){if(t!=x.enter&&!h||(t==x.enter&&c&&u&&!v.allowCategorySelection?(q.verbose("Pressed enter on unselectable category, opening sub menu"),t=x.rightArrow):l&&(q.verbose("Selecting item from keyboard shortcut",r),q.event.item.click.call(r,e),q.is.searchSelection()&&q.remove.searchTerm()),e.preventDefault()),c&&(t==x.leftArrow&&a[0]!==L[0]&&(q.verbose("Left key pressed, closing sub-menu"),q.animate.hide(!1,a),r.removeClass(b.selected),a.closest(S.item).addClass(b.selected),e.preventDefault()),t==x.rightArrow&&u&&(q.verbose("Right key pressed, opening sub-menu"),q.animate.show(!1,o),r.removeClass(b.selected),o.find(S.item).eq(0).addClass(b.selected),e.preventDefault())),t==x.upArrow){if(n=(c&&s?r.prevAll(S.item+":not("+S.unselectable+")"):U).eq(0),i.index(n)<0)return q.verbose("Up key pressed but reached top of current menu"),void e.preventDefault();q.verbose("Up key pressed, changing active item"),r.removeClass(b.selected),n.addClass(b.selected),q.set.scrollPosition(n),v.selectOnKeydown&&q.is.single()&&q.set.selectedItem(n),e.preventDefault()}if(t==x.downArrow){if(0===(n=(c&&s?r.nextAll(S.item+":not("+S.unselectable+")"):U).eq(0)).length)return q.verbose("Down key pressed but reached bottom of current menu"),void e.preventDefault();q.verbose("Down key pressed, changing active item"),U.removeClass(b.selected),n.addClass(b.selected),q.set.scrollPosition(n),v.selectOnKeydown&&q.is.single()&&q.set.selectedItem(n),e.preventDefault()}t==x.pageUp&&(q.scrollPage("up"),e.preventDefault()),t==x.pageDown&&(q.scrollPage("down"),e.preventDefault()),t==x.escape&&(q.verbose("Escape key pressed, closing dropdown"),q.hide())}else h&&e.preventDefault(),t!=x.downArrow||q.is.visible()||(q.verbose("Down key pressed, showing dropdown"),q.show(),e.preventDefault())}else q.has.search()||q.set.selectedLetter(String.fromCharCode(t))}},trigger:{change:function(){var e=rY.createEvent("HTMLEvents"),t=F[0];t&&(q.verbose("Triggering native change event"),e.initEvent("change",!0,!1),t.dispatchEvent(e))}},determine:{selectAction:function(e,t){q.verbose("Determining action",v.action),tY.isFunction(q.action[v.action])?(q.verbose("Triggering preset action",v.action,e,t),q.action[v.action].call(Q,e,t,this)):tY.isFunction(v.action)?(q.verbose("Triggering user action",v.action,e,t),v.action.call(Q,e,t,this)):q.error(_.action,v.action)},eventInModule:function(e,t){var n=0<(e=tY(e.target)).closest(rY.documentElement).length;e=0<e.closest(B).length;return t=tY.isFunction(t)?t:function(){},n&&!e?(q.verbose("Triggering event",t),t(),!0):(q.verbose("Event occurred in dropdown, canceling callback"),!1)},eventOnElement:function(e,t){var n=(r=tY(e.target)).closest(S.siblingLabel),r=(e=rY.body.contains(e.target),n=0===B.find(n).length,0===r.closest(L).length);return t=tY.isFunction(t)?t:function(){},e&&n&&r?(q.verbose("Triggering event",t),t(),!0):(q.verbose("Event occurred in dropdown menu, canceling callback"),!1)}},action:{nothing:function(){},activate:function(e,t,n){t=void 0!==t?t:e,q.can.activate(tY(n))&&(q.set.selected(t,tY(n)),q.is.multiple()&&!q.is.allFiltered()||q.hideAndClear())},select:function(e,t,n){t=void 0!==t?t:e,q.can.activate(tY(n))&&(q.set.value(t,e,tY(n)),q.is.multiple()&&!q.is.allFiltered()||q.hideAndClear())},combo:function(e,t,n){q.set.selected(t=void 0!==t?t:e,tY(n)),q.hideAndClear()},hide:function(e,t,n){q.set.value(t,e,tY(n)),q.hideAndClear()}},get:{id:function(){return m},defaultText:function(){return B.data(C.defaultText)},defaultValue:function(){return B.data(C.defaultValue)},placeholderText:function(){return"auto"!=v.placeholder&&"string"==typeof v.placeholder?v.placeholder:B.data(C.placeholderText)||""},text:function(){return M.text()},query:function(){return tY.trim(j.val())},searchWidth:function(e){return e=void 0!==e?e:j.val(),N.text(e),Math.ceil(N.width()+1)},selectionCount:function(){var e=q.get.values();return q.is.multiple()?tY.isArray(e)?e.length:0:""!==q.get.value()?1:0},transition:function(e){return"auto"==v.transition?q.is.upward(e)?"slide up":"slide down":v.transition},userValues:function(){var e=q.get.values();return!!e&&(e=tY.isArray(e)?e:[e],tY.grep(e,(function(e){return!1===q.get.item(e)})))},uniqueArray:function(e){return tY.grep(e,(function(t,n){return tY.inArray(t,e)===n}))},caretPosition:function(){var e,t,n=j.get(0);return"selectionStart"in n?n.selectionStart:rY.selection?(n.focus(),t=(e=rY.selection.createRange()).text.length,e.moveStart("character",-n.value.length),e.text.length-t):void 0},value:function(){var e=0<F.length?F.val():B.data(C.value),t=tY.isArray(e)&&1===e.length&&""===e[0];return void 0===e||t?"":e},values:function(){var e=q.get.value();return""===e?"":!q.has.selectInput()&&q.is.multiple()?"string"==typeof e?e.split(v.delimiter):"":e},remoteValues:function(){var e=q.get.values(),t=!1;return e&&tY.each(e="string"==typeof e?[e]:e,(function(e,n){var r=q.read.remoteData(n);q.verbose("Restoring value from session data",r,n),r&&((t=t||{})[n]=r)})),t},choiceText:function(e,t){if(t=void 0!==t?t:v.preserveHTML,e)return 0<e.find(S.menu).length&&(q.verbose("Retrieving text of element with sub-menu"),(e=e.clone()).find(S.menu).remove(),e.find(S.menuIcon).remove()),void 0!==e.data(C.text)?e.data(C.text):t?tY.trim(e.html()):tY.trim(e.text())},choiceValue:function(e,t){return t=t||q.get.choiceText(e),!!e&&(void 0!==e.data(C.value)?String(e.data(C.value)):"string"==typeof t?tY.trim(t.toLowerCase()):String(t))},inputEvent:function(){var e=j[0];return!!e&&(void 0!==e.oninput?"input":void 0!==e.onpropertychange?"propertychange":"keyup")},selectValues:function(){var e={values:[]};return B.find("option").each((function(){var t=(r=tY(this)).html(),n=r.attr("disabled"),r=void 0!==r.attr("value")?r.attr("value"):t;"auto"===v.placeholder&&""===r?e.placeholder=t:e.values.push({name:t,value:r,disabled:n})})),v.placeholder&&"auto"!==v.placeholder&&(q.debug("Setting placeholder value to",v.placeholder),e.placeholder=v.placeholder),v.sortSelect?(e.values.sort((function(e,t){return e.name>t.name?1:-1})),q.debug("Retrieved and sorted values from select",e)):q.debug("Retrieved values from select",e),e},activeItem:function(){return U.filter("."+b.active)},selectedItem:function(){var e=U.not(S.unselectable).filter("."+b.selected);return 0<e.length?e:U.eq(0)},itemWithAdditions:function(e){var t=q.get.item(e);return(e=q.create.userChoice(e))&&0<e.length?0<t.length?t.add(e):e:t},item:function(e,t){var n=!1,r=null!=(e=void 0!==e?e:void 0!==q.get.values()?q.get.values():q.get.text()),i=q.is.multiple()&&tY.isArray(e);return t=""===e||0===e||t||!1,r&&U.each((function(){var r=tY(this),o=q.get.choiceText(r),a=q.get.choiceValue(r,o);if(null!=a)if(i)-1===tY.inArray(String(a),e)&&-1===tY.inArray(o,e)||(n=n?n.add(r):r);else if(t){if(q.verbose("Ambiguous dropdown value using strict type check",r,e),a===e||o===e)return n=r,!0}else if(String(a)==String(e)||o==e)return q.verbose("Found select item by value",a,e),n=r,!0})),n}},check:{maxSelections:function(e){return!v.maxSelections||((e=void 0!==e?e:q.get.selectionCount())>=v.maxSelections?(q.debug("Maximum selection count reached"),v.useLabels&&(U.addClass(b.filtered),q.add.message(y.maxSelections)),!0):(q.verbose("No longer at maximum selection count"),q.remove.message(),q.remove.filteredItem(),q.is.searchSelection()&&q.filterItems(),!1))}},restore:{defaults:function(){q.clear(),q.restore.defaultText(),q.restore.defaultValue()},defaultText:function(){var e=q.get.defaultText();e===q.get.placeholderText?(q.debug("Restoring default placeholder text",e),q.set.placeholderText(e)):(q.debug("Restoring default text",e),q.set.text(e))},placeholderText:function(){q.set.placeholderText()},defaultValue:function(){var e=q.get.defaultValue();void 0!==e&&(q.debug("Restoring default value",e),""!==e?(q.set.value(e),q.set.selected()):(q.remove.activeItem(),q.remove.selectedItem()))},labels:function(){v.allowAdditions&&(v.useLabels||(q.error(_.labels),v.useLabels=!0),q.debug("Restoring selected values"),q.create.userLabels()),q.check.maxSelections()},selected:function(){q.restore.values(),q.is.multiple()?(q.debug("Restoring previously selected values and labels"),q.restore.labels()):q.debug("Restoring previously selected values")},values:function(){q.set.initialLoad(),v.apiSettings&&v.saveRemoteData&&q.get.remoteValues()?q.restore.remoteValues():q.set.selected(),q.remove.initialLoad()},remoteValues:function(){var e=q.get.remoteValues();q.debug("Recreating selected from session data",e),e&&(q.is.single()?tY.each(e,(function(e,t){q.set.text(t)})):tY.each(e,(function(e,t){q.add.label(e,t)})))}},read:{remoteData:function(e){if(void 0!==nY.Storage)return void 0!==(e=sessionStorage.getItem(e))&&e;q.error(_.noStorage)}},save:{defaults:function(){q.save.defaultText(),q.save.placeholderText(),q.save.defaultValue()},defaultValue:function(){var e=q.get.value();q.verbose("Saving default value as",e),B.data(C.defaultValue,e)},defaultText:function(){var e=q.get.text();q.verbose("Saving default text as",e),B.data(C.defaultText,e)},placeholderText:function(){var e;!1!==v.placeholder&&M.hasClass(b.placeholder)&&(e=q.get.text(),q.verbose("Saving placeholder text as",e),B.data(C.placeholderText,e))},remoteData:function(e,t){void 0!==nY.Storage?(q.verbose("Saving remote data to session storage",t,e),sessionStorage.setItem(t,e)):q.error(_.noStorage)}},clear:function(){q.is.multiple()&&v.useLabels?q.remove.labels():(q.remove.activeItem(),q.remove.selectedItem()),q.set.placeholderText(),q.clearValue()},clearValue:function(){q.set.value("")},scrollPage:function(e,t){var n=(t=t||q.get.selectedItem()).closest(S.menu),r=n.outerHeight(),i=n.scrollTop(),o=U.eq(0).outerHeight();r=Math.floor(r/o),n.prop("scrollHeight"),i="up"==e?i-o*r:i+o*r,o=U.not(S.unselectable),r="up"==e?o.index(t)-r:o.index(t)+r;0<(r=("up"==e?0<=r:r<o.length)?o.eq(r):"up"==e?o.first():o.last()).length&&(q.debug("Scrolling page",e,r),t.removeClass(b.selected),r.addClass(b.selected),v.selectOnKeydown&&q.is.single()&&q.set.selectedItem(r),n.scrollTop(i))},set:{filtered:function(){var e=q.is.multiple(),t=q.is.searchSelection(),n=e&&t,r="string"==typeof(t=t?q.get.query():"")&&0<t.length,i=q.get.searchWidth();t=""!==t;e&&r&&(q.verbose("Adjusting input width",i,v.glyphWidth),j.css("width",i)),r||n&&t?(q.verbose("Hiding placeholder text"),M.addClass(b.filtered)):e&&(!n||t)||(q.verbose("Showing placeholder text"),M.removeClass(b.filtered))},empty:function(){B.addClass(b.empty)},loading:function(){B.addClass(b.loading)},placeholderText:function(e){e=e||q.get.placeholderText(),q.debug("Setting placeholder text",e),q.set.text(e),M.addClass(b.placeholder)},tabbable:function(){q.is.searchSelection()?(q.debug("Added tabindex to searchable dropdown"),j.val("").attr("tabindex",0),L.attr("tabindex",-1)):(q.debug("Added tabindex to dropdown"),void 0===B.attr("tabindex")&&(B.attr("tabindex",0),L.attr("tabindex",-1)))},initialLoad:function(){q.verbose("Setting initial load"),h=!0},activeItem:function(e){v.allowAdditions&&0<e.filter(S.addition).length?e.addClass(b.filtered):e.addClass(b.active)},partialSearch:function(e){var t=q.get.query().length;j.val(e.substr(0,t))},scrollPosition:function(e,t){var n,r,i=(e=e||q.get.selectedItem()).closest(S.menu),o=e&&0<e.length;t=void 0!==t&&t,e&&0<i.length&&o&&(e.position().top,i.addClass(b.loading),e=(o=i.scrollTop())-i.offset().top+e.offset().top,t||(r=o+i.height()<e+5,n=e-5<o),q.debug("Scrolling to active item",e),(t||n||r)&&i.scrollTop(e),i.removeClass(b.loading))},text:function(e){"select"!==v.action&&("combo"==v.action?(q.debug("Changing combo button text",e,P),v.preserveHTML?P.html(e):P.text(e)):(e!==q.get.placeholderText()&&M.removeClass(b.placeholder),q.debug("Changing text",e,M),M.removeClass(b.filtered),v.preserveHTML?M.html(e):M.text(e)))},selectedItem:function(e){var t=q.get.choiceValue(e),n=q.get.choiceText(e,!1),r=q.get.choiceText(e,!0);q.debug("Setting user selection to item",e),q.remove.activeItem(),q.set.partialSearch(n),q.set.activeItem(e),q.set.selected(t,e),q.set.text(r)},selectedLetter:function(e){var t=U.filter("."+b.selected),n=0<t.length&&q.has.firstLetter(t,e),r=!1;n&&(n=t.nextAll(U).eq(0),q.has.firstLetter(n,e)&&(r=n)),r||U.each((function(){if(q.has.firstLetter(tY(this),e))return r=tY(this),!1})),r&&(q.verbose("Scrolling to next value with letter",e),q.set.scrollPosition(r),t.removeClass(b.selected),r.addClass(b.selected),v.selectOnKeydown&&q.is.single()&&q.set.selectedItem(r))},direction:function(e){"auto"==v.direction?(q.remove.upward(),(q.can.openDownward(e)?q.remove:q.set).upward(e),q.is.leftward(e)||q.can.openRightward(e)||q.set.leftward(e)):"upward"==v.direction&&q.set.upward(e)},upward:function(e){(e||B).addClass(b.upward)},leftward:function(e){(e||L).addClass(b.leftward)},value:function(e,t,n){var r=q.escape.value(e),i=0<F.length,o=q.get.values(),a=void 0!==e?String(e):e;if(i){if(!v.allowReselection&&a==o&&(q.verbose("Skipping value update already same value",e,o),!q.is.initialLoad()))return;q.is.single()&&q.has.selectInput()&&q.can.extendSelect()&&(q.debug("Adding user option",e),q.add.optionValue(e)),q.debug("Updating input value",r,o),$=!0,F.val(r),!1===v.fireOnInit&&q.is.initialLoad()?q.debug("Input native change event ignored on initial load"):q.trigger.change(),$=!1}else q.verbose("Storing value in metadata",r,F),r!==o&&B.data(C.value,a);q.is.single()&&v.clearable&&(r?q.set:q.remove).clearable(),!1===v.fireOnInit&&q.is.initialLoad()?q.verbose("No callback on initial load",v.onChange):v.onChange.call(Q,e,t,n)},active:function(){B.addClass(b.active)},multiple:function(){B.addClass(b.multiple)},visible:function(){B.addClass(b.visible)},exactly:function(e,t){q.debug("Setting selected to exact values"),q.clear(),q.set.selected(e,t)},selected:function(e,t){var n=q.is.multiple();(t=v.allowAdditions?t||q.get.itemWithAdditions(e):t||q.get.item(e))&&(q.debug("Setting selected menu item to",t),q.is.multiple()&&q.remove.searchWidth(),q.is.single()?(q.remove.activeItem(),q.remove.selectedItem()):v.useLabels&&q.remove.selectedItem(),t.each((function(){var e=tY(this),r=q.get.choiceText(e),i=q.get.choiceValue(e,r),o=e.hasClass(b.filtered),a=e.hasClass(b.active),s=e.hasClass(b.addition),u=n&&1==t.length;n?!a||s?(v.apiSettings&&v.saveRemoteData&&q.save.remoteData(r,i),v.useLabels?(q.add.label(i,r,u),q.add.value(i,r,e),q.set.activeItem(e),q.filterActive(),q.select.nextAvailable(t)):(q.add.value(i,r,e),q.set.text(q.add.variables(y.count)),q.set.activeItem(e))):o||(q.debug("Selected active value, removing label"),q.remove.selected(i)):(v.apiSettings&&v.saveRemoteData&&q.save.remoteData(r,i),q.set.text(r),q.set.value(i,r,e),e.addClass(b.active).addClass(b.selected))})))},clearable:function(){R.addClass(b.clear)}},add:{label:function(e,t,n){var r,i=q.is.searchSelection()?j:M,o=q.escape.value(e);v.ignoreCase&&(o=o.toLowerCase()),r=tY("<a />").addClass(b.label).attr("data-"+C.value,o).html(O.label(o,t)),r=v.onLabelCreate.call(r,o,t),q.has.label(e)?q.debug("User selection already exists, skipping",o):(v.label.variation&&r.addClass(v.label.variation),!0===n?(q.debug("Animating in label",r),r.addClass(b.hidden).insertBefore(i).transition(v.label.transition,v.label.duration)):(q.debug("Adding selection label",r),r.insertBefore(i)))},message:function(e){var t=L.children(S.message);e=v.templates.message(q.add.variables(e));0<t.length?t.html(e):tY("<div/>").html(e).addClass(b.message).appendTo(L)},optionValue:function(e){var t=q.escape.value(e);0<F.find('option[value="'+q.escape.string(t)+'"]').length||(q.disconnect.selectObserver(),q.is.single()&&(q.verbose("Removing previous user addition"),F.find("option."+b.addition).remove()),tY("<option/>").prop("value",t).addClass(b.addition).html(e).appendTo(F),q.verbose("Adding user addition as an <option>",e),q.observe.select())},userSuggestion:function(e){var t=L.children(S.addition),n=(n=q.get.item(e))&&n.not(S.addition).length,r=0<t.length;v.useLabels&&q.has.maxSelections()||(""===e||n?t.remove():(r?(t.data(C.value,e).data(C.text,e).attr("data-"+C.value,e).attr("data-"+C.text,e).removeClass(b.filtered),v.hideAdditions||(n=v.templates.addition(q.add.variables(y.addResult,e)),t.html(n)),q.verbose("Replacing user suggestion with new value",t)):((t=q.create.userChoice(e)).prependTo(L),q.verbose("Adding item choice to menu corresponding with user choice addition",t)),v.hideAdditions&&!q.is.allFiltered()||t.addClass(b.selected).siblings().removeClass(b.selected),q.refreshItems()))},variables:function(e,t){var n,r=-1!==e.search("{count}"),i=-1!==e.search("{maxCount}"),o=-1!==e.search("{term}");return q.verbose("Adding templated variables to message",e),r&&(n=q.get.selectionCount(),e=e.replace("{count}",n)),i&&(n=q.get.selectionCount(),e=e.replace("{maxCount}",v.maxSelections)),o&&(r=t||q.get.query(),e=e.replace("{term}",r)),e},value:function(e,t,n){var r,i=q.get.values();q.has.value(e)?q.debug("Value already selected"):""!==e?(r=tY.isArray(i)?(r=i.concat([e]),q.get.uniqueArray(r)):[e],q.has.selectInput()?q.can.extendSelect()&&(q.debug("Adding value to select",e,r,F),q.add.optionValue(e)):(r=r.join(v.delimiter),q.debug("Setting hidden input to delimited value",r,F)),!1===v.fireOnInit&&q.is.initialLoad()?q.verbose("Skipping onadd callback on initial load",v.onAdd):v.onAdd.call(Q,e,t,n),q.set.value(r,e,t,n),q.check.maxSelections()):q.debug("Cannot select blank values from multiselect")}},remove:{active:function(){B.removeClass(b.active)},activeLabel:function(){B.find(S.label).removeClass(b.active)},empty:function(){B.removeClass(b.empty)},loading:function(){B.removeClass(b.loading)},initialLoad:function(){h=!1},upward:function(e){(e||B).removeClass(b.upward)},leftward:function(e){(e||L).removeClass(b.leftward)},visible:function(){B.removeClass(b.visible)},activeItem:function(){U.removeClass(b.active)},filteredItem:function(){v.useLabels&&q.has.maxSelections()||((v.useLabels&&q.is.multiple()?U.not("."+b.active):U).removeClass(b.filtered),q.remove.empty())},optionValue:function(e){e=q.escape.value(e);var t=F.find('option[value="'+q.escape.string(e)+'"]');0<t.length&&t.hasClass(b.addition)&&(g&&(g.disconnect(),q.verbose("Temporarily disconnecting mutation observer")),t.remove(),q.verbose("Removing user addition as an <option>",e),g&&g.observe(F[0],{childList:!0,subtree:!0}))},message:function(){L.children(S.message).remove()},searchWidth:function(){j.css("width","")},searchTerm:function(){q.verbose("Cleared search term"),j.val(""),q.set.filtered()},userAddition:function(){U.filter(S.addition).remove()},selected:function(e,t){if(!(t=v.allowAdditions?t||q.get.itemWithAdditions(e):t||q.get.item(e)))return!1;t.each((function(){var e=tY(this),t=q.get.choiceText(e),n=q.get.choiceValue(e,t);q.is.multiple()?v.useLabels?(q.remove.value(n,t,e),q.remove.label(n)):(q.remove.value(n,t,e),0===q.get.selectionCount()?q.set.placeholderText():q.set.text(q.add.variables(y.count))):q.remove.value(n,t,e),e.removeClass(b.filtered).removeClass(b.active),v.useLabels&&e.removeClass(b.selected)}))},selectedItem:function(){U.removeClass(b.selected)},value:function(e,t,n){var r,i=q.get.values();q.has.selectInput()?(q.verbose("Input is <select> removing selected option",e),r=q.remove.arrayValue(e,i),q.remove.optionValue(e)):(q.verbose("Removing from delimited values",e),r=(r=q.remove.arrayValue(e,i)).join(v.delimiter)),!1===v.fireOnInit&&q.is.initialLoad()?q.verbose("No callback on initial load",v.onRemove):v.onRemove.call(Q,e,t,n),q.set.value(r,t,n),q.check.maxSelections()},arrayValue:function(e,t){return tY.isArray(t)||(t=[t]),t=tY.grep(t,(function(t){return e!=t})),q.verbose("Removed value from delimited string",e,t),t},label:function(e,t){e=B.find(S.label).filter("[data-"+C.value+'="'+q.escape.string(e)+'"]'),q.verbose("Removing label",e),e.remove()},activeLabels:function(e){e=e||B.find(S.label).filter("."+b.active),q.verbose("Removing active label selections",e),q.remove.labels(e)},labels:function(e){e=e||B.find(S.label),q.verbose("Removing labels",e),e.each((function(){var e=tY(this),t=e.data(C.value),n=void 0!==t?String(t):t,r=q.is.userValue(n);!1!==v.onLabelRemove.call(e,t)?(q.remove.message(),r?(q.remove.value(n),q.remove.label(n)):q.remove.selected(n)):q.debug("Label remove callback cancelled removal")}))},tabbable:function(){(q.is.searchSelection()?(q.debug("Searchable dropdown initialized"),j):(q.debug("Simple selection dropdown initialized"),B)).removeAttr("tabindex"),L.removeAttr("tabindex")},clearable:function(){R.removeClass(b.clear)}},has:{menuSearch:function(){return q.has.search()&&0<j.closest(L).length},search:function(){return 0<j.length},sizer:function(){return 0<N.length},selectInput:function(){return F.is("select")},minCharacters:function(e){return!v.minCharacters||(e=String(void 0!==e?e:q.get.query())).length>=v.minCharacters},firstLetter:function(e,t){return!(!e||0===e.length||"string"!=typeof t)&&(e=q.get.choiceText(e,!1),(t=t.toLowerCase())==String(e).charAt(0).toLowerCase())},input:function(){return 0<F.length},items:function(){return 0<U.length},menu:function(){return 0<L.length},message:function(){return 0!==L.children(S.message).length},label:function(e){e=q.escape.value(e);var t=B.find(S.label);return v.ignoreCase&&(e=e.toLowerCase()),0<t.filter("[data-"+C.value+'="'+q.escape.string(e)+'"]').length},maxSelections:function(){return v.maxSelections&&q.get.selectionCount()>=v.maxSelections},allResultsFiltered:function(){var e=U.not(S.addition);return e.filter(S.unselectable).length===e.length},userSuggestion:function(){return 0<L.children(S.addition).length},query:function(){return""!==q.get.query()},value:function(e){return v.ignoreCase?q.has.valueIgnoringCase(e):q.has.valueMatchingCase(e)},valueMatchingCase:function(e){var t=q.get.values();return!!(tY.isArray(t)?t&&-1!==tY.inArray(e,t):t==e)},valueIgnoringCase:function(e){var t=q.get.values(),n=!1;return tY.isArray(t)||(t=[t]),tY.each(t,(function(t,r){if(String(e).toLowerCase()==String(r).toLowerCase())return!(n=!0)})),n}},is:{active:function(){return B.hasClass(b.active)},animatingInward:function(){return L.transition("is inward")},animatingOutward:function(){return L.transition("is outward")},bubbledLabelClick:function(e){return tY(e.target).is("select, input")&&0<B.closest("label").length},bubbledIconClick:function(e){return 0<tY(e.target).closest(R).length},alreadySetup:function(){return B.is("select")&&void 0!==B.parent(S.dropdown).data(D)&&0===B.prev().length},animating:function(e){return e?e.transition&&e.transition("is animating"):L.transition&&L.transition("is animating")},leftward:function(e){return(e||L).hasClass(b.leftward)},disabled:function(){return B.hasClass(b.disabled)},focused:function(){return rY.activeElement===B[0]},focusedOnSearch:function(){return rY.activeElement===j[0]},allFiltered:function(){return(q.is.multiple()||q.has.search())&&!(0==v.hideAdditions&&q.has.userSuggestion())&&!q.has.message()&&q.has.allResultsFiltered()},hidden:function(e){return!q.is.visible(e)},initialLoad:function(){return h},inObject:function(e,t){var n=!1;return tY.each(t,(function(t,r){if(r==e)return n=!0})),n},multiple:function(){return B.hasClass(b.multiple)},remote:function(){return v.apiSettings&&q.can.useAPI()},single:function(){return!q.is.multiple()},selectMutation:function(e){var t=!1;return tY.each(e,(function(e,n){if(n.target&&tY(n.target).is("select"))return t=!0})),t},search:function(){return B.hasClass(b.search)},searchSelection:function(){return q.has.search()&&1===j.parent(S.dropdown).length},selection:function(){return B.hasClass(b.selection)},userValue:function(e){return-1!==tY.inArray(e,q.get.userValues())},upward:function(e){return(e||B).hasClass(b.upward)},visible:function(e){return(e||L).hasClass(b.visible)},verticallyScrollableContext:function(){var e=I.get(0)!==nY&&I.css("overflow-y");return"auto"==e||"scroll"==e},horizontallyScrollableContext:function(){var e=I.get(0)!==nY&&I.css("overflow-X");return"auto"==e||"scroll"==e}},can:{activate:function(e){return!!v.useLabels||!q.has.maxSelections()||!(!q.has.maxSelections()||!e.hasClass(b.active))},openDownward:function(e){var t,n;return(e=e||L).addClass(b.loading),t={context:{offset:I.get(0)===nY?{top:0,left:0}:I.offset(),scrollTop:I.scrollTop(),height:I.outerHeight()},menu:{offset:e.offset(),height:e.outerHeight()}},q.is.verticallyScrollableContext()&&(t.menu.offset.top+=t.context.scrollTop),n=(t={above:t.context.scrollTop<=t.menu.offset.top-t.context.offset.top-t.menu.height,below:t.context.scrollTop+t.context.height>=t.menu.offset.top-t.context.offset.top+t.menu.height}).below?(q.verbose("Dropdown can fit in context downward",t),!0):t.below||t.above?(q.verbose("Dropdown cannot fit below, opening upward",t),!1):(q.verbose("Dropdown cannot fit in either direction, favoring downward",t),!0),e.removeClass(b.loading),n},openRightward:function(e){var t,n=!0;return(e=e||L).addClass(b.loading),t={context:{offset:I.get(0)===nY?{top:0,left:0}:I.offset(),scrollLeft:I.scrollLeft(),width:I.outerWidth()},menu:{offset:e.offset(),width:e.outerWidth()}},q.is.horizontallyScrollableContext()&&(t.menu.offset.left+=t.context.scrollLeft),(t=t.menu.offset.left-t.context.offset.left+t.menu.width>=t.context.scrollLeft+t.context.width)&&(q.verbose("Dropdown cannot fit in context rightward",t),n=!1),e.removeClass(b.loading),n},click:function(){return i||"click"==v.on},extendSelect:function(){return v.allowAdditions||v.apiSettings},show:function(){return!q.is.disabled()&&(q.has.items()||q.has.message())},useAPI:function(){return void 0!==tY.fn.api}},animate:{show:function(e,t){var n=t||L,r=t?function(){}:function(){q.hideSubMenus(),q.hideOthers(),q.set.active()};e=tY.isFunction(e)?e:function(){},q.verbose("Doing menu show animation",n),q.set.direction(t),t=q.get.transition(t),q.is.selection()&&q.set.scrollPosition(q.get.selectedItem(),!0),(q.is.hidden(n)||q.is.animating(n))&&("none"==t?(r(),n.transition("show"),e.call(Q)):void 0!==tY.fn.transition&&B.transition("is supported")?n.transition({animation:t+" in",debug:v.debug,verbose:v.verbose,duration:v.duration,queue:!0,onStart:r,onComplete:function(){e.call(Q)}}):q.error(_.noTransition,t))},hide:function(e,t){var n=t||L,r=(v.duration,t?function(){}:function(){q.can.click()&&q.unbind.intent(),q.remove.active()});t=q.get.transition(t);e=tY.isFunction(e)?e:function(){},(q.is.visible(n)||q.is.animating(n))&&(q.verbose("Doing menu hide animation",n),"none"==t?(r(),n.transition("hide"),e.call(Q)):void 0!==tY.fn.transition&&B.transition("is supported")?n.transition({animation:t+" out",duration:v.duration,debug:v.debug,verbose:v.verbose,queue:!1,onStart:r,onComplete:function(){e.call(Q)}}):q.error(_.transition))}},hideAndClear:function(){q.remove.searchTerm(),q.has.maxSelections()||(q.has.search()?q.hide((function(){q.remove.filteredItem()})):q.hide())},delay:{show:function(){q.verbose("Delaying show event to ensure user intent"),clearTimeout(q.timer),q.timer=setTimeout(q.show,v.delay.show)},hide:function(){q.verbose("Delaying hide event to ensure user intent"),clearTimeout(q.timer),q.timer=setTimeout(q.hide,v.delay.hide)}},escape:{value:function(e){var t=tY.isArray(e),n=!(r="string"==typeof e)&&!t,r=r&&-1!==e.search(E.quote),i=[];return n||!r?e:(q.debug("Encoding quote values for use in select",e),t?(tY.each(e,(function(e,t){i.push(t.replace(E.quote,"&quot;"))})),i):e.replace(E.quote,"&quot;"))},string:function(e){return(e=String(e)).replace(E.escape,"\\$&")}},setting:function(e,t){if(q.debug("Changing setting",e,t),tY.isPlainObject(e))tY.extend(!0,v,e);else{if(void 0===t)return v[e];tY.isPlainObject(v[e])?tY.extend(!0,v[e],t):v[e]=t}},internal:function(e,t){if(tY.isPlainObject(e))tY.extend(!0,q,e);else{if(void 0===t)return q[e];q[e]=t}},debug:function(){!v.silent&&v.debug&&(v.performance?q.performance.log(arguments):(q.debug=Function.prototype.bind.call(console.info,console,v.name+":"),q.debug.apply(console,arguments)))},verbose:function(){!v.silent&&v.verbose&&v.debug&&(v.performance?q.performance.log(arguments):(q.verbose=Function.prototype.bind.call(console.info,console,v.name+":"),q.verbose.apply(console,arguments)))},error:function(){v.silent||(q.error=Function.prototype.bind.call(console.error,console,v.name+":"),q.error.apply(console,arguments))},performance:{log:function(e){var t,n;v.performance&&(n=(t=(new Date).getTime())-(o||t),o=t,a.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:Q,"Execution Time":n})),clearTimeout(q.performance.timer),q.performance.timer=setTimeout(q.performance.display,500)},display:function(){v.name,o=!1,clearTimeout(q.performance.timer),tY.each(a,(function(e,t){t["Execution Time"]})),(void 0!==console.group||void 0!==console.table)&&0<a.length&&!console.table&&tY.each(a,(function(e,t){t.Name,t["Execution Time"]})),a=[]}},invoke:function(e,n,r){var i,o,a,s=V;return n=n||c,r=Q||r,"string"==typeof e&&void 0!==s&&(e=e.split(/[\. ]/),i=e.length-1,tY.each(e,(function(t,n){var r=t!=i?n+e[t+1].charAt(0).toUpperCase()+e[t+1].slice(1):e;if(!tY.isPlainObject(s[r])||t==i)return void 0!==s[r]?(o=s[r],!1):tY.isPlainObject(s[n])&&t!=i?void(s=s[n]):(void 0!==s[n]?o=s[n]:q.error(_.method,e),!1);s=s[r]}))),tY.isFunction(o)?a=o.apply(r,n):void 0!==o&&(a=o),tY.isArray(t)?t.push(a):void 0!==t?t=[t,a]:void 0!==a&&(t=a),o}};u?(void 0===V&&q.initialize(),q.invoke(s)):(void 0!==V&&V.invoke("destroy"),q.initialize())})),void 0!==t?t:n},tY.fn.dropdown.settings={silent:!1,debug:!1,verbose:!1,performance:!0,on:"click",action:"activate",values:!1,clearable:!1,apiSettings:!1,selectOnKeydown:!0,minCharacters:0,filterRemoteData:!1,saveRemoteData:!0,throttle:200,context:nY,direction:"auto",keepOnScreen:!0,match:"both",fullTextSearch:!1,placeholder:"auto",preserveHTML:!0,sortSelect:!1,forceSelection:!0,allowAdditions:!1,ignoreCase:!1,hideAdditions:!0,maxSelections:!1,useLabels:!0,delimiter:",",showOnFocus:!0,allowReselection:!1,allowTab:!0,allowCategorySelection:!1,fireOnInit:!1,transition:"auto",duration:200,glyphWidth:1.037,label:{transition:"scale",duration:200,variation:!1},delay:{hide:300,show:200,search:20,touch:50},onChange:function(e,t,n){},onAdd:function(e,t,n){},onRemove:function(e,t,n){},onLabelSelect:function(e){},onLabelCreate:function(e,t){return tY(this)},onLabelRemove:function(e){return!0},onNoResults:function(e){return!0},onShow:function(){},onHide:function(){},name:"Dropdown",namespace:"dropdown",message:{addResult:"Add <b>{term}</b>",count:"{count} selected",maxSelections:"Max {maxCount} selections",noResults:"No results found.",serverError:"There was an error contacting the server"},error:{action:"You called a dropdown action that was not defined",alreadySetup:"Once a select has been initialized behaviors must be called on the created ui dropdown",labels:"Allowing user additions currently requires the use of labels.",missingMultiple:"<select> requires multiple property to be set to correctly preserve multiple values",method:"The method you called is not defined.",noAPI:"The API module is required to load resources remotely",noStorage:"Saving remote data requires session storage",noTransition:"This module requires ui transitions <https://github.com/Semantic-Org/UI-Transition>"},regExp:{escape:/[-[\]{}()*+?.,\\^$|#\s]/g,quote:/"/g},metadata:{defaultText:"defaultText",defaultValue:"defaultValue",placeholderText:"placeholder",text:"text",value:"value"},fields:{remoteValues:"results",values:"values",disabled:"disabled",name:"name",value:"value",text:"text"},keys:{backspace:8,delimiter:188,deleteKey:46,enter:13,escape:27,pageUp:33,pageDown:34,leftArrow:37,upArrow:38,rightArrow:39,downArrow:40},selector:{addition:".addition",dropdown:".ui.dropdown",hidden:".hidden",icon:"> .dropdown.icon",input:'> input[type="hidden"], > select',item:".item",label:"> .label",remove:"> .label > .delete.icon",siblingLabel:".label",menu:".menu",message:".message",menuIcon:".dropdown.icon",search:"input.search, .menu > .search > input, .menu input.search",sizer:"> input.sizer",text:"> .text:not(.icon)",unselectable:".disabled, .filtered"},className:{active:"active",addition:"addition",animating:"animating",clear:"clear",disabled:"disabled",empty:"empty",dropdown:"ui dropdown",filtered:"filtered",hidden:"hidden transition",item:"item",label:"ui label",loading:"loading",menu:"menu",message:"message",multiple:"multiple",placeholder:"default",sizer:"sizer",search:"search",selected:"selected",selection:"selection",upward:"upward",leftward:"left",visible:"visible"}},tY.fn.dropdown.settings.templates={dropdown:function(e){var t=e.placeholder||!1,n=(e.values,"");return n+='<i class="dropdown icon"></i>',e.placeholder?n+='<div class="default text">'+t+"</div>":n+='<div class="text"></div>',n+='<div class="menu">',tY.each(e.values,(function(e,t){n+=t.disabled?'<div class="disabled item" data-value="'+t.value+'">'+t.name+"</div>":'<div class="item" data-value="'+t.value+'">'+t.name+"</div>"})),n+="</div>"},menu:function(e,t){e=e[t.values]||{};var n="";return tY.each(e,(function(e,r){var i=r[t.text]?'data-text="'+r[t.text]+'"':"",o=r[t.disabled]?"disabled ":"";n=(n+='<div class="'+o+'item" data-value="'+r[t.value]+'"'+i+">")+r[t.name]+"</div>"})),n},label:function(e,t){return t+'<i class="delete icon"></i>'},message:function(e){return e},addition:function(e){return e}},ZK=ve.a,eY=window,document,eY=void 0!==eY&&eY.Math==Math?eY:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),ZK.fn.embed=function(e){var t,n=ZK(this),r=(n.selector,(new Date).getTime()),i=[],o=e,a="string"==typeof o,s=[].slice.call(arguments,1);return n.each((function(){var u=ZK.isPlainObject(e)?ZK.extend(!0,{},ZK.fn.embed.settings,e):ZK.extend({},ZK.fn.embed.settings),c=u.selector,l=u.className,h=u.sources,f=u.error,d=u.metadata,p=u.namespace,m=u.templates,g="."+p,A="module-"+p,v=(ZK(eY),ZK(this)),b=(v.find(c.placeholder),v.find(c.icon),v.find(c.embed)),y=this,w=v.data(A),x={initialize:function(){x.debug("Initializing embed"),x.determine.autoplay(),x.create(),x.bind.events(),x.instantiate()},instantiate:function(){x.verbose("Storing instance of module",x),w=x,v.data(A,x)},destroy:function(){x.verbose("Destroying previous instance of embed"),x.reset(),v.removeData(A).off(g)},refresh:function(){x.verbose("Refreshing selector cache"),v.find(c.placeholder),v.find(c.icon),b=v.find(c.embed)},bind:{events:function(){x.has.placeholder()&&(x.debug("Adding placeholder events"),v.on("click"+g,c.placeholder,x.createAndShow).on("click"+g,c.icon,x.createAndShow))}},create:function(){x.get.placeholder()?x.createPlaceholder():x.createAndShow()},createPlaceholder:function(e){var t=x.get.icon(),n=x.get.url();x.generate.embed(n),e=e||x.get.placeholder(),v.html(m.placeholder(e,t)),x.debug("Creating placeholder for embed",e,t)},createEmbed:function(e){x.refresh(),e=e||x.get.url(),b=ZK("<div/>").addClass(l.embed).html(x.generate.embed(e)).appendTo(v),u.onCreate.call(y,e),x.debug("Creating embed object",b)},changeEmbed:function(e){b.html(x.generate.embed(e))},createAndShow:function(){x.createEmbed(),x.show()},change:function(e,t,n){x.debug("Changing video to ",e,t,n),v.data(d.source,e).data(d.id,t),n?v.data(d.url,n):v.removeData(d.url),x.has.embed()?x.changeEmbed():x.create()},reset:function(){x.debug("Clearing embed and showing placeholder"),x.remove.data(),x.remove.active(),x.remove.embed(),x.showPlaceholder(),u.onReset.call(y)},show:function(){x.debug("Showing embed"),x.set.active(),u.onDisplay.call(y)},hide:function(){x.debug("Hiding embed"),x.showPlaceholder()},showPlaceholder:function(){x.debug("Showing placeholder image"),x.remove.active(),u.onPlaceholderDisplay.call(y)},get:{id:function(){return u.id||v.data(d.id)},placeholder:function(){return u.placeholder||v.data(d.placeholder)},icon:function(){return u.icon||(void 0!==v.data(d.icon)?v.data(d.icon):x.determine.icon())},source:function(e){return u.source||(void 0!==v.data(d.source)?v.data(d.source):x.determine.source())},type:function(){var e=x.get.source();return void 0!==h[e]&&h[e].type},url:function(){return u.url||(void 0!==v.data(d.url)?v.data(d.url):x.determine.url())}},determine:{autoplay:function(){x.should.autoplay()&&(u.autoplay=!0)},source:function(e){var t=!1;return(e=e||x.get.url())&&ZK.each(h,(function(n,r){if(-1!==e.search(r.domain))return t=n,!1})),t},icon:function(){var e=x.get.source();return void 0!==h[e]&&h[e].icon},url:function(){var e=u.id||v.data(d.id),t=u.source||v.data(d.source);return(t=void 0!==h[t]&&h[t].url.replace("{id}",e))&&v.data(d.url,t),t}},set:{active:function(){v.addClass(l.active)}},remove:{data:function(){v.removeData(d.id).removeData(d.icon).removeData(d.placeholder).removeData(d.source).removeData(d.url)},active:function(){v.removeClass(l.active)},embed:function(){b.empty()}},encode:{parameters:function(e){var t,n=[];for(t in e)n.push(encodeURIComponent(t)+"="+encodeURIComponent(e[t]));return n.join("&amp;")}},generate:{embed:function(e){x.debug("Generating embed html");var t,n=x.get.source();return(e=x.get.url(e))?(n=x.generate.parameters(n),t=m.iframe(e,n)):x.error(f.noURL,v),t},parameters:function(e,t){return e=h[e]&&void 0!==h[e].parameters?h[e].parameters(u):{},(t=t||u.parameters)&&(e=ZK.extend({},e,t)),e=u.onEmbed(e),x.encode.parameters(e)}},has:{embed:function(){return 0<b.length},placeholder:function(){return u.placeholder||v.data(d.placeholder)}},should:{autoplay:function(){return"auto"===u.autoplay?u.placeholder||void 0!==v.data(d.placeholder):u.autoplay}},is:{video:function(){return"video"==x.get.type()}},setting:function(e,t){if(x.debug("Changing setting",e,t),ZK.isPlainObject(e))ZK.extend(!0,u,e);else{if(void 0===t)return u[e];ZK.isPlainObject(u[e])?ZK.extend(!0,u[e],t):u[e]=t}},internal:function(e,t){if(ZK.isPlainObject(e))ZK.extend(!0,x,e);else{if(void 0===t)return x[e];x[e]=t}},debug:function(){!u.silent&&u.debug&&(u.performance?x.performance.log(arguments):(x.debug=Function.prototype.bind.call(console.info,console,u.name+":"),x.debug.apply(console,arguments)))},verbose:function(){!u.silent&&u.verbose&&u.debug&&(u.performance?x.performance.log(arguments):(x.verbose=Function.prototype.bind.call(console.info,console,u.name+":"),x.verbose.apply(console,arguments)))},error:function(){u.silent||(x.error=Function.prototype.bind.call(console.error,console,u.name+":"),x.error.apply(console,arguments))},performance:{log:function(e){var t,n;u.performance&&(n=(t=(new Date).getTime())-(r||t),r=t,i.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:y,"Execution Time":n})),clearTimeout(x.performance.timer),x.performance.timer=setTimeout(x.performance.display,500)},display:function(){u.name,r=!1,clearTimeout(x.performance.timer),ZK.each(i,(function(e,t){t["Execution Time"]})),1<n.length&&n.length,(void 0!==console.group||void 0!==console.table)&&0<i.length&&!console.table&&ZK.each(i,(function(e,t){t.Name,t["Execution Time"]})),i=[]}},invoke:function(e,n,r){var i,o,a,u=w;return n=n||s,r=y||r,"string"==typeof e&&void 0!==u&&(e=e.split(/[\. ]/),i=e.length-1,ZK.each(e,(function(t,n){var r=t!=i?n+e[t+1].charAt(0).toUpperCase()+e[t+1].slice(1):e;if(!ZK.isPlainObject(u[r])||t==i)return void 0!==u[r]?(o=u[r],!1):ZK.isPlainObject(u[n])&&t!=i?void(u=u[n]):(void 0!==u[n]?o=u[n]:x.error(f.method,e),!1);u=u[r]}))),ZK.isFunction(o)?a=o.apply(r,n):void 0!==o&&(a=o),ZK.isArray(t)?t.push(a):void 0!==t?t=[t,a]:void 0!==a&&(t=a),o}};a?(void 0===w&&x.initialize(),x.invoke(o)):(void 0!==w&&w.invoke("destroy"),x.initialize())})),void 0!==t?t:this},ZK.fn.embed.settings={name:"Embed",namespace:"embed",silent:!1,debug:!1,verbose:!1,performance:!0,icon:!1,source:!1,url:!1,id:!1,autoplay:"auto",color:"#444444",hd:!0,brandedUI:!1,parameters:!1,onDisplay:function(){},onPlaceholderDisplay:function(){},onReset:function(){},onCreate:function(e){},onEmbed:function(e){return e},metadata:{id:"id",icon:"icon",placeholder:"placeholder",source:"source",url:"url"},error:{noURL:"No URL specified",method:"The method you called is not defined"},className:{active:"active",embed:"embed"},selector:{embed:".embed",placeholder:".placeholder",icon:".icon"},sources:{youtube:{name:"youtube",type:"video",icon:"video play",domain:"youtube.com",url:"//www.youtube.com/embed/{id}",parameters:function(e){return{autohide:!e.brandedUI,autoplay:e.autoplay,color:e.color||void 0,hq:e.hd,jsapi:e.api,modestbranding:!e.brandedUI}}},vimeo:{name:"vimeo",type:"video",icon:"video play",domain:"vimeo.com",url:"//player.vimeo.com/video/{id}",parameters:function(e){return{api:e.api,autoplay:e.autoplay,byline:e.brandedUI,color:e.color||void 0,portrait:e.brandedUI,title:e.brandedUI}}}},templates:{iframe:function(e,t){return t&&(e+="?"+t),'<iframe src="'+e+'" width="100%" height="100%" frameborder="0" scrolling="no" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>'},placeholder:function(e,t){var n="";return t&&(n+='<i class="'+t+' icon"></i>'),e&&(n+='<img class="placeholder" src="'+e+'">'),n}},api:!1,onPause:function(){},onPlay:function(){},onStop:function(){}},YK=ve.a,XK=window,JK=document,XK=void 0!==XK&&XK.Math==Math?XK:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),YK.fn.modal=function(e){var t,n=YK(this),r=YK(XK),i=YK(JK),o=YK("body"),a=(n.selector,(new Date).getTime()),s=[],u=e,c="string"==typeof u,l=[].slice.call(arguments,1),h=XK.requestAnimationFrame||XK.mozRequestAnimationFrame||XK.webkitRequestAnimationFrame||XK.msRequestAnimationFrame||function(e){setTimeout(e,0)};return n.each((function(){var n,f,d,p,m,g,A,v,b=YK.isPlainObject(e)?YK.extend(!0,{},YK.fn.modal.settings,e):YK.extend({},YK.fn.modal.settings),y=b.selector,w=b.className,x=b.namespace,C=b.error,k="."+x,E="module-"+x,S=YK(this),_=YK(b.context),O=S.find(y.close),T=this,D=S.data(E),B=!1,I={initialize:function(){I.verbose("Initializing dimmer",_),I.create.id(),I.create.dimmer(),I.refreshModals(),I.bind.events(),b.observeChanges&&I.observeChanges(),I.instantiate()},instantiate:function(){I.verbose("Storing instance of modal"),D=I,S.data(E,D)},create:{dimmer:function(){var e={debug:b.debug,variation:!b.centered&&"top aligned",dimmerName:"modals"};e=YK.extend(!0,e,b.dimmerSettings);void 0!==YK.fn.dimmer?(I.debug("Creating dimmer"),p=_.dimmer(e),b.detachable?(I.verbose("Modal is detachable, moving content into dimmer"),p.dimmer("add content",S)):I.set.undetached(),m=p.dimmer("get dimmer")):I.error(C.dimmer)},id:function(){A=(Math.random().toString(16)+"000000000").substr(2,8),g="."+A,I.verbose("Creating unique id for element",A)}},destroy:function(){v&&v.disconnect(),I.verbose("Destroying previous modal"),S.removeData(E).off(k),r.off(g),m.off(g),O.off(k),_.dimmer("destroy")},observeChanges:function(){"MutationObserver"in XK&&((v=new MutationObserver((function(e){I.debug("DOM tree modified, refreshing"),I.refresh()}))).observe(T,{childList:!0,subtree:!0}),I.debug("Setting up mutation observer",v))},refresh:function(){I.remove.scrolling(),I.cacheSizes(),I.can.useFlex()||I.set.modalOffset(),I.set.screenHeight(),I.set.type()},refreshModals:function(){f=S.siblings(y.modal),n=f.add(S)},attachEvents:function(e,t){var n=YK(e);t=YK.isFunction(I[t])?I[t]:I.toggle,0<n.length?(I.debug("Attaching modal events to element",e,t),n.off(k).on("click"+k,t)):I.error(C.notFound,e)},bind:{events:function(){I.verbose("Attaching events"),S.on("click"+k,y.close,I.event.close).on("click"+k,y.approve,I.event.approve).on("click"+k,y.deny,I.event.deny),r.on("resize"+g,I.event.resize)},scrollLock:function(){p.get(0).addEventListener("touchmove",I.event.preventScroll,{passive:!1})}},unbind:{scrollLock:function(){p.get(0).removeEventListener("touchmove",I.event.preventScroll,{passive:!1})}},get:{id:function(){return(Math.random().toString(16)+"000000000").substr(2,8)}},event:{approve:function(){B||!1===b.onApprove.call(T,YK(this))?I.verbose("Approve callback returned false cancelling hide"):(B=!0,I.hide((function(){B=!1})))},preventScroll:function(e){e.preventDefault()},deny:function(){B||!1===b.onDeny.call(T,YK(this))?I.verbose("Deny callback returned false cancelling hide"):(B=!0,I.hide((function(){B=!1})))},close:function(){I.hide()},click:function(e){var t;b.closable?(t=0<YK(e.target).closest(y.modal).length,e=YK.contains(JK.documentElement,e.target),!t&&e&&I.is.active()&&(I.debug("Dimmer clicked, hiding all modals"),I.remove.clickaway(),b.allowMultiple?I.hide():I.hideAll())):I.verbose("Dimmer clicked but closable setting is disabled")},debounce:function(e,t){clearTimeout(I.timer),I.timer=setTimeout(e,t)},keyboard:function(e){27==e.which&&(b.closable?(I.debug("Escape key pressed hiding modal"),I.hide()):I.debug("Escape key pressed, but closable is set to false"),e.preventDefault())},resize:function(){p.dimmer("is active")&&(I.is.animating()||I.is.active())&&h(I.refresh)}},toggle:function(){I.is.active()||I.is.animating()?I.hide():I.show()},show:function(e){e=YK.isFunction(e)?e:function(){},I.refreshModals(),I.set.dimmerSettings(),I.set.dimmerStyles(),I.showModal(e)},hide:function(e){e=YK.isFunction(e)?e:function(){},I.refreshModals(),I.hideModal(e)},showModal:function(e){e=YK.isFunction(e)?e:function(){},I.is.animating()||!I.is.active()?(I.showDimmer(),I.cacheSizes(),I.can.useFlex()?I.remove.legacy():(I.set.legacy(),I.set.modalOffset(),I.debug("Using non-flex legacy modal positioning.")),I.set.screenHeight(),I.set.type(),I.set.clickaway(),!b.allowMultiple&&I.others.active()?I.hideOthers(I.showModal):(b.allowMultiple&&b.detachable&&S.detach().appendTo(m),b.onShow.call(T),b.transition&&void 0!==YK.fn.transition&&S.transition("is supported")?(I.debug("Showing modal with css animations"),S.transition({debug:b.debug,animation:b.transition+" in",queue:b.queue,duration:b.duration,useFailSafe:!0,onComplete:function(){b.onVisible.apply(T),b.keyboardShortcuts&&I.add.keyboardShortcuts(),I.save.focus(),I.set.active(),b.autofocus&&I.set.autofocus(),e()}})):I.error(C.noTransition))):I.debug("Modal is already visible")},hideModal:function(e,t){e=YK.isFunction(e)?e:function(){},I.debug("Hiding modal"),!1!==b.onHide.call(T,YK(this))?(I.is.animating()||I.is.active())&&(b.transition&&void 0!==YK.fn.transition&&S.transition("is supported")?(I.remove.active(),S.transition({debug:b.debug,animation:b.transition+" out",queue:b.queue,duration:b.duration,useFailSafe:!0,onStart:function(){I.others.active()||t||I.hideDimmer(),b.keyboardShortcuts&&I.remove.keyboardShortcuts()},onComplete:function(){b.onHidden.call(T),I.remove.dimmerStyles(),I.restore.focus(),e()}})):I.error(C.noTransition)):I.verbose("Hide callback returned false cancelling hide")},showDimmer:function(){p.dimmer("is animating")||!p.dimmer("is active")?(I.debug("Showing dimmer"),p.dimmer("show")):I.debug("Dimmer already visible")},hideDimmer:function(){p.dimmer("is animating")||p.dimmer("is active")?(I.unbind.scrollLock(),p.dimmer("hide",(function(){I.remove.clickaway(),I.remove.screenHeight()}))):I.debug("Dimmer is not visible cannot hide")},hideAll:function(e){var t=n.filter("."+w.active+", ."+w.animating);e=YK.isFunction(e)?e:function(){},0<t.length&&(I.debug("Hiding all visible modals"),I.hideDimmer(),t.modal("hide modal",e))},hideOthers:function(e){var t=f.filter("."+w.active+", ."+w.animating);e=YK.isFunction(e)?e:function(){},0<t.length&&(I.debug("Hiding other modals",f),t.modal("hide modal",e,!0))},others:{active:function(){return 0<f.filter("."+w.active).length},animating:function(){return 0<f.filter("."+w.animating).length}},add:{keyboardShortcuts:function(){I.verbose("Adding keyboard shortcuts"),i.on("keyup"+k,I.event.keyboard)}},save:{focus:function(){0<YK(JK.activeElement).closest(S).length||(d=YK(JK.activeElement).blur())}},restore:{focus:function(){d&&0<d.length&&d.focus()}},remove:{active:function(){S.removeClass(w.active)},legacy:function(){S.removeClass(w.legacy)},clickaway:function(){m.off("click"+g)},dimmerStyles:function(){m.removeClass(w.inverted),p.removeClass(w.blurring)},bodyStyle:function(){""===o.attr("style")&&(I.verbose("Removing style attribute"),o.removeAttr("style"))},screenHeight:function(){I.debug("Removing page height"),o.css("height","")},keyboardShortcuts:function(){I.verbose("Removing keyboard shortcuts"),i.off("keyup"+k)},scrolling:function(){p.removeClass(w.scrolling),S.removeClass(w.scrolling)}},cacheSizes:function(){S.addClass(w.loading);var e=S.prop("scrollHeight"),t=S.outerWidth(),n=S.outerHeight();void 0!==I.cache&&0===n||(I.cache={pageHeight:YK(JK).outerHeight(),width:t,height:n+b.offset,scrollHeight:e+b.offset,contextHeight:("body"==b.context?YK(XK):p).height()},I.cache.topOffset=-I.cache.height/2),S.removeClass(w.loading),I.debug("Caching modal and container sizes",I.cache)},can:{useFlex:function(){return"auto"==b.useFlex?b.detachable&&!I.is.ie():b.useFlex},fit:function(){var e=I.cache.contextHeight,t=I.cache.contextHeight/2,n=I.cache.topOffset,r=I.cache.scrollHeight,i=I.cache.height,o=b.padding;return i<r?t+n+r+o<e:i+2*o<e}},is:{active:function(){return S.hasClass(w.active)},ie:function(){return!XK.ActiveXObject&&"ActiveXObject"in XK||"ActiveXObject"in XK},animating:function(){return S.transition("is supported")?S.transition("is animating"):S.is(":visible")},scrolling:function(){return p.hasClass(w.scrolling)},modernBrowser:function(){return!(XK.ActiveXObject||"ActiveXObject"in XK)}},set:{autofocus:function(){var e,t=S.find("[tabindex], :input").filter(":visible");0<(e=(0<(e=t.filter("[autofocus]")).length?e:t).first()).length&&e.focus()},clickaway:function(){m.on("click"+g,I.event.click)},dimmerSettings:function(){var e;void 0!==YK.fn.dimmer?(e={debug:b.debug,dimmerName:"modals",closable:"auto",useFlex:I.can.useFlex(),variation:!b.centered&&"top aligned",duration:{show:b.duration,hide:b.duration}},e=YK.extend(!0,e,b.dimmerSettings),b.inverted&&(e.variation=void 0!==e.variation?e.variation+" inverted":"inverted"),_.dimmer("setting",e)):I.error(C.dimmer)},dimmerStyles:function(){b.inverted?m.addClass(w.inverted):m.removeClass(w.inverted),b.blurring?p.addClass(w.blurring):p.removeClass(w.blurring)},modalOffset:function(){var e=I.cache.width,t=I.cache.height;S.css({marginTop:b.centered&&I.can.fit()?-t/2:0,marginLeft:-e/2}),I.verbose("Setting modal offset for legacy mode")},screenHeight:function(){I.can.fit()?o.css("height",""):(I.debug("Modal is taller than page content, resizing page height"),o.css("height",I.cache.height+2*b.padding))},active:function(){S.addClass(w.active)},scrolling:function(){p.addClass(w.scrolling),S.addClass(w.scrolling),I.unbind.scrollLock()},legacy:function(){S.addClass(w.legacy)},type:function(){I.can.fit()?(I.verbose("Modal fits on screen"),I.others.active()||I.others.animating()||(I.remove.scrolling(),I.bind.scrollLock())):(I.verbose("Modal cannot fit on screen setting to scrolling"),I.set.scrolling())},undetached:function(){p.addClass(w.undetached)}},setting:function(e,t){if(I.debug("Changing setting",e,t),YK.isPlainObject(e))YK.extend(!0,b,e);else{if(void 0===t)return b[e];YK.isPlainObject(b[e])?YK.extend(!0,b[e],t):b[e]=t}},internal:function(e,t){if(YK.isPlainObject(e))YK.extend(!0,I,e);else{if(void 0===t)return I[e];I[e]=t}},debug:function(){!b.silent&&b.debug&&(b.performance?I.performance.log(arguments):(I.debug=Function.prototype.bind.call(console.info,console,b.name+":"),I.debug.apply(console,arguments)))},verbose:function(){!b.silent&&b.verbose&&b.debug&&(b.performance?I.performance.log(arguments):(I.verbose=Function.prototype.bind.call(console.info,console,b.name+":"),I.verbose.apply(console,arguments)))},error:function(){b.silent||(I.error=Function.prototype.bind.call(console.error,console,b.name+":"),I.error.apply(console,arguments))},performance:{log:function(e){var t,n;b.performance&&(n=(t=(new Date).getTime())-(a||t),a=t,s.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:T,"Execution Time":n})),clearTimeout(I.performance.timer),I.performance.timer=setTimeout(I.performance.display,500)},display:function(){b.name,a=!1,clearTimeout(I.performance.timer),YK.each(s,(function(e,t){t["Execution Time"]})),(void 0!==console.group||void 0!==console.table)&&0<s.length&&!console.table&&YK.each(s,(function(e,t){t.Name,t["Execution Time"]})),s=[]}},invoke:function(e,n,r){var i,o,a,s=D;return n=n||l,r=T||r,"string"==typeof e&&void 0!==s&&(e=e.split(/[\. ]/),i=e.length-1,YK.each(e,(function(t,n){var r=t!=i?n+e[t+1].charAt(0).toUpperCase()+e[t+1].slice(1):e;if(!YK.isPlainObject(s[r])||t==i)return void 0!==s[r]?(o=s[r],!1):YK.isPlainObject(s[n])&&t!=i?void(s=s[n]):void 0!==s[n]&&(o=s[n],!1);s=s[r]}))),YK.isFunction(o)?a=o.apply(r,n):void 0!==o&&(a=o),YK.isArray(t)?t.push(a):void 0!==t?t=[t,a]:void 0!==a&&(t=a),o}};c?(void 0===D&&I.initialize(),I.invoke(u)):(void 0!==D&&D.invoke("destroy"),I.initialize())})),void 0!==t?t:this},YK.fn.modal.settings={name:"Modal",namespace:"modal",useFlex:"auto",offset:0,silent:!1,debug:!1,verbose:!1,performance:!0,observeChanges:!1,allowMultiple:!1,detachable:!0,closable:!0,autofocus:!0,inverted:!1,blurring:!1,centered:!0,dimmerSettings:{closable:!1,useCSS:!0},keyboardShortcuts:!0,context:"body",queue:!1,duration:500,transition:"scale",padding:50,onShow:function(){},onVisible:function(){},onHide:function(){return!0},onHidden:function(){},onApprove:function(){return!0},onDeny:function(){return!0},selector:{close:"> .close",approve:".actions .positive, .actions .approve, .actions .ok",deny:".actions .negative, .actions .deny, .actions .cancel",modal:".ui.modal"},error:{dimmer:"UI Dimmer, a required component is not included in this page",method:"The method you called is not defined.",notFound:"The element you specified could not be found"},className:{active:"active",animating:"animating",blurring:"blurring",inverted:"inverted",legacy:"legacy",loading:"loading",scrolling:"scrolling",undetached:"undetached"}},WK=ve.a,KK=window,document,KK=void 0!==KK&&KK.Math==Math?KK:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),WK.fn.nag=function(e){var t,n=WK(this),r=(n.selector,(new Date).getTime()),i=[],o=e,a="string"==typeof o,s=[].slice.call(arguments,1);return n.each((function(){var n,u=WK.isPlainObject(e)?WK.extend(!0,{},WK.fn.nag.settings,e):WK.extend({},WK.fn.nag.settings),c=(u.className,u.selector),l=u.error,h=u.namespace,f="."+h,d=h+"-module",p=WK(this),m=(p.find(c.close),u.context?WK(u.context):WK("body")),g=this,A=p.data(d);KK.requestAnimationFrame||KK.mozRequestAnimationFrame||KK.webkitRequestAnimationFrame||KK.msRequestAnimationFrame,n={initialize:function(){n.verbose("Initializing element"),p.on("click"+f,c.close,n.dismiss).data(d,n),u.detachable&&p.parent()[0]!==m[0]&&p.detach().prependTo(m),0<u.displayTime&&setTimeout(n.hide,u.displayTime),n.show()},destroy:function(){n.verbose("Destroying instance"),p.removeData(d).off(f)},show:function(){n.should.show()&&!p.is(":visible")&&(n.debug("Showing nag",u.animation.show),"fade"==u.animation.show?p.fadeIn(u.duration,u.easing):p.slideDown(u.duration,u.easing))},hide:function(){n.debug("Showing nag",u.animation.hide),"fade"==u.animation.show?p.fadeIn(u.duration,u.easing):p.slideUp(u.duration,u.easing)},onHide:function(){n.debug("Removing nag",u.animation.hide),p.remove(),u.onHide&&u.onHide()},dismiss:function(e){u.storageMethod&&n.storage.set(u.key,u.value),n.hide(),e.stopImmediatePropagation(),e.preventDefault()},should:{show:function(){return u.persist?(n.debug("Persistent nag is set, can show nag"),!0):n.storage.get(u.key)!=u.value.toString()?(n.debug("Stored value is not set, can show nag",n.storage.get(u.key)),!0):(n.debug("Stored value is set, cannot show nag",n.storage.get(u.key)),!1)}},get:{storageOptions:function(){var e={};return u.expires&&(e.expires=u.expires),u.domain&&(e.domain=u.domain),u.path&&(e.path=u.path),e}},clear:function(){n.storage.remove(u.key)},storage:{set:function(e,t){var r=n.get.storageOptions();"localstorage"==u.storageMethod&&void 0!==KK.localStorage?(KK.localStorage.setItem(e,t),n.debug("Value stored using local storage",e,t)):"sessionstorage"==u.storageMethod&&void 0!==KK.sessionStorage?(KK.sessionStorage.setItem(e,t),n.debug("Value stored using session storage",e,t)):void 0===WK.cookie?n.error(l.noCookieStorage):(WK.cookie(e,t,r),n.debug("Value stored using cookie",e,t,r))},get:function(e,t){var r;return"localstorage"==u.storageMethod&&void 0!==KK.localStorage?r=KK.localStorage.getItem(e):"sessionstorage"==u.storageMethod&&void 0!==KK.sessionStorage?r=KK.sessionStorage.getItem(e):void 0!==WK.cookie?r=WK.cookie(e):n.error(l.noCookieStorage),"undefined"!=r&&"null"!=r&&null!=r?r:void 0},remove:function(e){var t=n.get.storageOptions();"localstorage"==u.storageMethod&&void 0!==KK.localStorage?KK.localStorage.removeItem(e):"sessionstorage"==u.storageMethod&&void 0!==KK.sessionStorage?KK.sessionStorage.removeItem(e):void 0!==WK.cookie?WK.removeCookie(e,t):n.error(l.noStorage)}},setting:function(e,t){if(n.debug("Changing setting",e,t),WK.isPlainObject(e))WK.extend(!0,u,e);else{if(void 0===t)return u[e];WK.isPlainObject(u[e])?WK.extend(!0,u[e],t):u[e]=t}},internal:function(e,t){if(WK.isPlainObject(e))WK.extend(!0,n,e);else{if(void 0===t)return n[e];n[e]=t}},debug:function(){!u.silent&&u.debug&&(u.performance?n.performance.log(arguments):(n.debug=Function.prototype.bind.call(console.info,console,u.name+":"),n.debug.apply(console,arguments)))},verbose:function(){!u.silent&&u.verbose&&u.debug&&(u.performance?n.performance.log(arguments):(n.verbose=Function.prototype.bind.call(console.info,console,u.name+":"),n.verbose.apply(console,arguments)))},error:function(){u.silent||(n.error=Function.prototype.bind.call(console.error,console,u.name+":"),n.error.apply(console,arguments))},performance:{log:function(e){var t,o;u.performance&&(o=(t=(new Date).getTime())-(r||t),r=t,i.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:g,"Execution Time":o})),clearTimeout(n.performance.timer),n.performance.timer=setTimeout(n.performance.display,500)},display:function(){u.name,r=!1,clearTimeout(n.performance.timer),WK.each(i,(function(e,t){t["Execution Time"]})),(void 0!==console.group||void 0!==console.table)&&0<i.length&&!console.table&&WK.each(i,(function(e,t){t.Name,t["Execution Time"]})),i=[]}},invoke:function(e,r,i){var o,a,u,c=A;return r=r||s,i=g||i,"string"==typeof e&&void 0!==c&&(e=e.split(/[\. ]/),o=e.length-1,WK.each(e,(function(t,r){var i=t!=o?r+e[t+1].charAt(0).toUpperCase()+e[t+1].slice(1):e;if(!WK.isPlainObject(c[i])||t==o)return void 0!==c[i]?(a=c[i],!1):WK.isPlainObject(c[r])&&t!=o?void(c=c[r]):(void 0!==c[r]?a=c[r]:n.error(l.method,e),!1);c=c[i]}))),WK.isFunction(a)?u=a.apply(i,r):void 0!==a&&(u=a),WK.isArray(t)?t.push(u):void 0!==t?t=[t,u]:void 0!==u&&(t=u),a}},a?(void 0===A&&n.initialize(),n.invoke(o)):(void 0!==A&&A.invoke("destroy"),n.initialize())})),void 0!==t?t:this},WK.fn.nag.settings={name:"Nag",silent:!1,debug:!1,verbose:!1,performance:!0,namespace:"Nag",persist:!1,displayTime:0,animation:{show:"slide",hide:"slide"},context:!1,detachable:!1,expires:30,domain:!1,path:"/",storageMethod:"cookie",key:"nag",value:"dismiss",error:{noCookieStorage:"$.cookie is not included. A storage solution is required.",noStorage:"Neither $.cookie or store is defined. A storage solution is required for storing state",method:"The method you called is not defined."},className:{bottom:"bottom",fixed:"fixed"},selector:{close:".close.icon"},speed:500,easing:"easeOutQuad",onHide:function(){}},WK.extend(WK.easing,{easeOutQuad:function(e,t,n,r,i){return-r*(t/=i)*(t-2)+n}}),VK=ve.a,qK=window,GK=document,qK=void 0!==qK&&qK.Math==Math?qK:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),VK.fn.popup=function(e){var t,n=VK(this),r=VK(GK),i=VK(qK),o=VK("body"),a=(n.selector,(new Date).getTime()),s=[],u=e,c="string"==typeof u,l=[].slice.call(arguments,1);return n.each((function(){var n,h,f,d,p,m=VK.isPlainObject(e)?VK.extend(!0,{},VK.fn.popup.settings,e):VK.extend({},VK.fn.popup.settings),g=m.selector,A=m.className,v=m.error,b=m.metadata,y=m.namespace,w="."+m.namespace,x="module-"+y,C=VK(this),k=VK(m.context),E=VK(m.scrollContext),S=VK(m.boundary),_=m.target?VK(m.target):C,O=0,T=!1,D=!1,B=this,I=C.data(x),M={initialize:function(){M.debug("Initializing",C),M.createID(),M.bind.events(),!M.exists()&&m.preserve&&M.create(),m.observeChanges&&M.observeChanges(),M.instantiate()},instantiate:function(){M.verbose("Storing instance",M),I=M,C.data(x,I)},observeChanges:function(){"MutationObserver"in qK&&((f=new MutationObserver(M.event.documentChanged)).observe(GK,{childList:!0,subtree:!0}),M.debug("Setting up mutation observer",f))},refresh:function(){m.popup?n=VK(m.popup).eq(0):m.inline&&(n=_.nextAll(g.popup).eq(0),m.popup=n),m.popup?(n.addClass(A.loading),h=M.get.offsetParent(),n.removeClass(A.loading),m.movePopup&&M.has.popup()&&M.get.offsetParent(n)[0]!==h[0]&&(M.debug("Moving popup to the same offset parent as target"),n.detach().appendTo(h))):h=m.inline?M.get.offsetParent(_):M.has.popup()?M.get.offsetParent(n):o,h.is("html")&&h[0]!==o[0]&&(M.debug("Setting page as offset parent"),h=o),M.get.variation()&&M.set.variation()},reposition:function(){M.refresh(),M.set.position()},destroy:function(){M.debug("Destroying previous module"),f&&f.disconnect(),n&&!m.preserve&&M.removePopup(),clearTimeout(M.hideTimer),clearTimeout(M.showTimer),M.unbind.close(),M.unbind.events(),C.removeData(x)},event:{start:function(e){var t=VK.isPlainObject(m.delay)?m.delay.show:m.delay;clearTimeout(M.hideTimer),D||(M.showTimer=setTimeout(M.show,t))},end:function(){var e=VK.isPlainObject(m.delay)?m.delay.hide:m.delay;clearTimeout(M.showTimer),M.hideTimer=setTimeout(M.hide,e)},touchstart:function(e){D=!0,M.show()},resize:function(){M.is.visible()&&M.set.position()},documentChanged:function(e){[].forEach.call(e,(function(e){e.removedNodes&&[].forEach.call(e.removedNodes,(function(e){(e==B||0<VK(e).find(B).length)&&(M.debug("Element removed from DOM, tearing down events"),M.destroy())}))}))},hideGracefully:function(e){var t=VK(e.target),n=VK.contains(GK.documentElement,e.target);t=0<t.closest(g.popup).length;e&&!t&&n?(M.debug("Click occurred outside popup hiding popup"),M.hide()):M.debug("Click was inside popup, keeping popup open")}},create:function(){var e=M.get.html(),t=M.get.title(),r=M.get.content();e||r||t?(M.debug("Creating pop-up html"),e=e||m.templates.popup({title:t,content:r}),n=VK("<div/>").addClass(A.popup).data(b.activator,C).html(e),m.inline?(M.verbose("Inserting popup element inline",n),n.insertAfter(C)):(M.verbose("Appending popup element to body",n),n.appendTo(k)),M.refresh(),M.set.variation(),m.hoverable&&M.bind.popup(),m.onCreate.call(n,B)):0!==_.next(g.popup).length?(M.verbose("Pre-existing popup found"),m.inline=!0,m.popup=_.next(g.popup).data(b.activator,C),M.refresh(),m.hoverable&&M.bind.popup()):m.popup?(VK(m.popup).data(b.activator,C),M.verbose("Used popup specified in settings"),M.refresh(),m.hoverable&&M.bind.popup()):M.debug("No content specified skipping display",B)},createID:function(){p=(Math.random().toString(16)+"000000000").substr(2,8),d="."+p,M.verbose("Creating unique id for element",p)},toggle:function(){M.debug("Toggling pop-up"),M.is.hidden()?(M.debug("Popup is hidden, showing pop-up"),M.unbind.close(),M.show()):(M.debug("Popup is visible, hiding pop-up"),M.hide())},show:function(e){e=e||function(){},M.debug("Showing pop-up",m.transition),!M.is.hidden()||M.is.active()&&M.is.dropdown()||(M.exists()||M.create(),!1===m.onShow.call(n,B)?M.debug("onShow callback returned false, cancelling popup animation"):(m.preserve||m.popup||M.refresh(),n&&M.set.position()&&(M.save.conditions(),m.exclusive&&M.hideAll(),M.animate.show(e))))},hide:function(e){e=e||function(){},(M.is.visible()||M.is.animating())&&(!1===m.onHide.call(n,B)?M.debug("onHide callback returned false, cancelling popup animation"):(M.remove.visible(),M.unbind.close(),M.restore.conditions(),M.animate.hide(e)))},hideAll:function(){VK(g.popup).filter("."+A.popupVisible).each((function(){VK(this).data(b.activator).popup("hide")}))},exists:function(){return!!n&&(m.inline||m.popup?M.has.popup():1<=n.closest(k).length)},removePopup:function(){M.has.popup()&&!m.popup&&(M.debug("Removing popup",n),n.remove(),n=void 0,m.onRemove.call(n,B))},save:{conditions:function(){M.cache={title:C.attr("title")},M.cache.title&&C.removeAttr("title"),M.verbose("Saving original attributes",M.cache.title)}},restore:{conditions:function(){return M.cache&&M.cache.title&&(C.attr("title",M.cache.title),M.verbose("Restoring original attributes",M.cache.title)),!0}},supports:{svg:function(){return"undefined"==typeof SVGGraphicsElement}},animate:{show:function(e){e=VK.isFunction(e)?e:function(){},m.transition&&void 0!==VK.fn.transition&&C.transition("is supported")?(M.set.visible(),n.transition({animation:m.transition+" in",queue:!1,debug:m.debug,verbose:m.verbose,duration:m.duration,onComplete:function(){M.bind.close(),e.call(n,B),m.onVisible.call(n,B)}})):M.error(v.noTransition)},hide:function(e){e=VK.isFunction(e)?e:function(){},M.debug("Hiding pop-up"),!1!==m.onHide.call(n,B)?m.transition&&void 0!==VK.fn.transition&&C.transition("is supported")?n.transition({animation:m.transition+" out",queue:!1,duration:m.duration,debug:m.debug,verbose:m.verbose,onComplete:function(){M.reset(),e.call(n,B),m.onHidden.call(n,B)}}):M.error(v.noTransition):M.debug("onHide callback returned false, cancelling popup animation")}},change:{content:function(e){n.html(e)}},get:{html:function(){return C.removeData(b.html),C.data(b.html)||m.html},title:function(){return C.removeData(b.title),C.data(b.title)||m.title},content:function(){return C.removeData(b.content),C.data(b.content)||m.content||C.attr("title")},variation:function(){return C.removeData(b.variation),C.data(b.variation)||m.variation},popup:function(){return n},popupOffset:function(){return n.offset()},calculations:function(){var e=M.get.offsetParent(n),t=_[0],r=S[0]==qK,o=m.inline||m.popup&&m.movePopup?_.position():_.offset(),a=r?{top:0,left:0}:S.offset(),s={};r=r?{top:i.scrollTop(),left:i.scrollLeft()}:{top:0,left:0},s={target:{element:_[0],width:_.outerWidth(),height:_.outerHeight(),top:o.top,left:o.left,margin:{}},popup:{width:n.outerWidth(),height:n.outerHeight()},parent:{width:h.outerWidth(),height:h.outerHeight()},screen:{top:a.top,left:a.left,scroll:{top:r.top,left:r.left},width:S.width(),height:S.height()}};return e.get(0)!==h.get(0)&&(o=e.offset(),s.target.top-=o.top,s.target.left-=o.left,s.parent.width=e.outerWidth(),s.parent.height=e.outerHeight()),m.setFluidWidth&&M.is.fluid()&&(s.container={width:n.parent().outerWidth()},s.popup.width=s.container.width),s.target.margin.top=m.inline?parseInt(qK.getComputedStyle(t).getPropertyValue("margin-top"),10):0,s.target.margin.left=m.inline?M.is.rtl()?parseInt(qK.getComputedStyle(t).getPropertyValue("margin-right"),10):parseInt(qK.getComputedStyle(t).getPropertyValue("margin-left"),10):0,a=s.screen,s.boundary={top:a.top+a.scroll.top,bottom:a.top+a.scroll.top+a.height,left:a.left+a.scroll.left,right:a.left+a.scroll.left+a.width},s},id:function(){return p},startEvent:function(){return"hover"==m.on?"mouseenter":"focus"==m.on&&"focus"},scrollEvent:function(){return"scroll"},endEvent:function(){return"hover"==m.on?"mouseleave":"focus"==m.on&&"blur"},distanceFromBoundary:function(e,t){var n={},r=(t=t||M.get.calculations()).popup;t=t.boundary;return e&&(n={top:e.top-t.top,left:e.left-t.left,right:t.right-(e.left+r.width),bottom:t.bottom-(e.top+r.height)},M.verbose("Distance from boundaries determined",e,n)),n},offsetParent:function(e){var t=(void 0!==e?e:_)[0].parentNode,n=VK(t);if(t)for(var r="none"===n.css("transform"),i="static"===n.css("position"),o=n.is("body");t&&!o&&i&&r;)t=t.parentNode,r="none"===(n=VK(t)).css("transform"),i="static"===n.css("position"),o=n.is("body");return n&&0<n.length?n:VK()},positions:function(){return{"top left":!1,"top center":!1,"top right":!1,"bottom left":!1,"bottom center":!1,"bottom right":!1,"left center":!1,"right center":!1}},nextPosition:function(e){var t=(n=e.split(" "))[0],n=n[1],r="top"==t||"bottom"==t,i=!1,o=!1,a=!1;return T||(M.verbose("All available positions available"),T=M.get.positions()),M.debug("Recording last position tried",e),T[e]=!0,"opposite"===m.prefer&&(a=(a=[{top:"bottom",bottom:"top",left:"right",right:"left"}[t],n]).join(" "),i=!0===T[a],M.debug("Trying opposite strategy",a)),"adjacent"===m.prefer&&r&&(a=(a=[t,{left:"center",center:"right",right:"left"}[n]]).join(" "),o=!0===T[a],M.debug("Trying adjacent strategy",a)),(o||i)&&(M.debug("Using backup position",a),a={"top left":"top center","top center":"top right","top right":"right center","right center":"bottom right","bottom right":"bottom center","bottom center":"bottom left","bottom left":"left center","left center":"top left"}[e]),a}},set:{position:function(e,t){if(0!==_.length&&0!==n.length){var r,i,o,a,s,u,c;if(t=t||M.get.calculations(),e=e||C.data(b.position)||m.position,r=C.data(b.offset)||m.offset,i=m.distanceAway,o=t.target,a=t.popup,s=t.parent,M.should.centerArrow(t)&&(M.verbose("Adjusting offset to center arrow on small target element"),"top left"!=e&&"bottom left"!=e||(r=(r+=o.width/2)-m.arrowPixelsFromEdge),"top right"!=e&&"bottom right"!=e||(r=(r-=o.width/2)+m.arrowPixelsFromEdge)),0===o.width&&0===o.height&&!M.is.svg(o.element))return M.debug("Popup target is hidden, no action taken"),!1;switch(m.inline&&(M.debug("Adding margin to calculation",o.margin),"left center"==e||"right center"==e?(r+=o.margin.top,i+=-o.margin.left):"top left"==e||"top center"==e||"top right"==e?(r+=o.margin.left,i-=o.margin.top):(r+=o.margin.left,i+=o.margin.top)),M.debug("Determining popup position from calculations",e,t),M.is.rtl()&&(e=e.replace(/left|right/g,(function(e){return"left"==e?"right":"left"})),M.debug("RTL: Popup position updated",e)),e=O==m.maxSearchDepth&&"string"==typeof m.lastResort?m.lastResort:e){case"top left":u={top:"auto",bottom:s.height-o.top+i,left:o.left+r,right:"auto"};break;case"top center":u={bottom:s.height-o.top+i,left:o.left+o.width/2-a.width/2+r,top:"auto",right:"auto"};break;case"top right":u={bottom:s.height-o.top+i,right:s.width-o.left-o.width-r,top:"auto",left:"auto"};break;case"left center":u={top:o.top+o.height/2-a.height/2+r,right:s.width-o.left+i,left:"auto",bottom:"auto"};break;case"right center":u={top:o.top+o.height/2-a.height/2+r,left:o.left+o.width+i,bottom:"auto",right:"auto"};break;case"bottom left":u={top:o.top+o.height+i,left:o.left+r,bottom:"auto",right:"auto"};break;case"bottom center":u={top:o.top+o.height+i,left:o.left+o.width/2-a.width/2+r,bottom:"auto",right:"auto"};break;case"bottom right":u={top:o.top+o.height+i,right:s.width-o.left-o.width-r,left:"auto",bottom:"auto"}}if(void 0===u&&M.error(v.invalidPosition,e),M.debug("Calculated popup positioning values",u),n.css(u).removeClass(A.position).addClass(e).addClass(A.loading),c=M.get.popupOffset(),c=M.get.distanceFromBoundary(c,t),M.is.offstage(c,e)){if(M.debug("Position is outside viewport",e),O<m.maxSearchDepth)return O++,e=M.get.nextPosition(e),M.debug("Trying new position",e),!!n&&M.set.position(e,t);if(!m.lastResort)return M.debug("Popup could not find a position to display",n),M.error(v.cannotPlace,B),M.remove.attempts(),M.remove.loading(),M.reset(),m.onUnplaceable.call(n,B),!1;M.debug("No position found, showing with last position")}return M.debug("Position is on stage",e),M.remove.attempts(),M.remove.loading(),m.setFluidWidth&&M.is.fluid()&&M.set.fluidWidth(t),!0}M.error(v.notFound)},fluidWidth:function(e){e=e||M.get.calculations(),M.debug("Automatically setting element width to parent width",e.parent.width),n.css("width",e.container.width)},variation:function(e){(e=e||M.get.variation())&&M.has.popup()&&(M.verbose("Adding variation to popup",e),n.addClass(e))},visible:function(){C.addClass(A.visible)}},remove:{loading:function(){n.removeClass(A.loading)},variation:function(e){(e=e||M.get.variation())&&(M.verbose("Removing variation",e),n.removeClass(e))},visible:function(){C.removeClass(A.visible)},attempts:function(){M.verbose("Resetting all searched positions"),O=0,T=!1}},bind:{events:function(){M.debug("Binding popup events to module"),"click"==m.on&&C.on("click"+w,M.toggle),"hover"==m.on&&C.on("touchstart"+w,M.event.touchstart),M.get.startEvent()&&C.on(M.get.startEvent()+w,M.event.start).on(M.get.endEvent()+w,M.event.end),m.target&&M.debug("Target set to element",_),i.on("resize"+d,M.event.resize)},popup:function(){M.verbose("Allowing hover events on popup to prevent closing"),n&&M.has.popup()&&n.on("mouseenter"+w,M.event.start).on("mouseleave"+w,M.event.end)},close:function(){(!0===m.hideOnScroll||"auto"==m.hideOnScroll&&"click"!=m.on)&&M.bind.closeOnScroll(),M.is.closable()?M.bind.clickaway():"hover"==m.on&&D&&M.bind.touchClose()},closeOnScroll:function(){M.verbose("Binding scroll close event to document"),E.one(M.get.scrollEvent()+d,M.event.hideGracefully)},touchClose:function(){M.verbose("Binding popup touchclose event to document"),r.on("touchstart"+d,(function(e){M.verbose("Touched away from popup"),M.event.hideGracefully.call(B,e)}))},clickaway:function(){M.verbose("Binding popup close event to document"),r.on("click"+d,(function(e){M.verbose("Clicked away from popup"),M.event.hideGracefully.call(B,e)}))}},unbind:{events:function(){i.off(d),C.off(w)},close:function(){r.off(d),E.off(d)}},has:{popup:function(){return n&&0<n.length}},should:{centerArrow:function(e){return!M.is.basic()&&e.target.width<=2*m.arrowPixelsFromEdge}},is:{closable:function(){return"auto"==m.closable?"hover"!=m.on:m.closable},offstage:function(e,t){var n=[];return VK.each(e,(function(e,r){r<-m.jitter&&(M.debug("Position exceeds allowable distance from edge",e,r,t),n.push(e))})),0<n.length},svg:function(e){return M.supports.svg()&&e instanceof SVGGraphicsElement},basic:function(){return C.hasClass(A.basic)},active:function(){return C.hasClass(A.active)},animating:function(){return void 0!==n&&n.hasClass(A.animating)},fluid:function(){return void 0!==n&&n.hasClass(A.fluid)},visible:function(){return void 0!==n&&n.hasClass(A.popupVisible)},dropdown:function(){return C.hasClass(A.dropdown)},hidden:function(){return!M.is.visible()},rtl:function(){return"rtl"==C.css("direction")}},reset:function(){M.remove.visible(),m.preserve?void 0!==VK.fn.transition&&n.transition("remove transition"):M.removePopup()},setting:function(e,t){if(VK.isPlainObject(e))VK.extend(!0,m,e);else{if(void 0===t)return m[e];m[e]=t}},internal:function(e,t){if(VK.isPlainObject(e))VK.extend(!0,M,e);else{if(void 0===t)return M[e];M[e]=t}},debug:function(){!m.silent&&m.debug&&(m.performance?M.performance.log(arguments):(M.debug=Function.prototype.bind.call(console.info,console,m.name+":"),M.debug.apply(console,arguments)))},verbose:function(){!m.silent&&m.verbose&&m.debug&&(m.performance?M.performance.log(arguments):(M.verbose=Function.prototype.bind.call(console.info,console,m.name+":"),M.verbose.apply(console,arguments)))},error:function(){m.silent||(M.error=Function.prototype.bind.call(console.error,console,m.name+":"),M.error.apply(console,arguments))},performance:{log:function(e){var t,n;m.performance&&(n=(t=(new Date).getTime())-(a||t),a=t,s.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:B,"Execution Time":n})),clearTimeout(M.performance.timer),M.performance.timer=setTimeout(M.performance.display,500)},display:function(){m.name,a=!1,clearTimeout(M.performance.timer),VK.each(s,(function(e,t){t["Execution Time"]})),(void 0!==console.group||void 0!==console.table)&&0<s.length&&!console.table&&VK.each(s,(function(e,t){t.Name,t["Execution Time"]})),s=[]}},invoke:function(e,n,r){var i,o,a,s=I;return n=n||l,r=B||r,"string"==typeof e&&void 0!==s&&(e=e.split(/[\. ]/),i=e.length-1,VK.each(e,(function(t,n){var r=t!=i?n+e[t+1].charAt(0).toUpperCase()+e[t+1].slice(1):e;if(!VK.isPlainObject(s[r])||t==i)return void 0!==s[r]?(o=s[r],!1):VK.isPlainObject(s[n])&&t!=i?void(s=s[n]):void 0!==s[n]&&(o=s[n],!1);s=s[r]}))),VK.isFunction(o)?a=o.apply(r,n):void 0!==o&&(a=o),VK.isArray(t)?t.push(a):void 0!==t?t=[t,a]:void 0!==a&&(t=a),o}};c?(void 0===I&&M.initialize(),M.invoke(u)):(void 0!==I&&I.invoke("destroy"),M.initialize())})),void 0!==t?t:this},VK.fn.popup.settings={name:"Popup",silent:!1,debug:!1,verbose:!1,performance:!0,namespace:"popup",observeChanges:!0,onCreate:function(){},onRemove:function(){},onShow:function(){},onVisible:function(){},onHide:function(){},onUnplaceable:function(){},onHidden:function(){},on:"hover",boundary:qK,addTouchEvents:!0,position:"top left",variation:"",movePopup:!0,target:!1,popup:!1,inline:!1,preserve:!1,hoverable:!1,content:!1,html:!1,title:!1,closable:!0,hideOnScroll:"auto",exclusive:!1,context:"body",scrollContext:qK,prefer:"opposite",lastResort:!1,arrowPixelsFromEdge:20,delay:{show:50,hide:70},setFluidWidth:!0,duration:200,transition:"scale",distanceAway:0,jitter:2,offset:0,maxSearchDepth:15,error:{invalidPosition:"The position you specified is not a valid position",cannotPlace:"Popup does not fit within the boundaries of the viewport",method:"The method you called is not defined.",noTransition:"This module requires ui transitions <https://github.com/Semantic-Org/UI-Transition>",notFound:"The target or popup you specified does not exist on the page"},metadata:{activator:"activator",content:"content",html:"html",offset:"offset",position:"position",title:"title",variation:"variation"},className:{active:"active",basic:"basic",animating:"animating",dropdown:"dropdown",fluid:"fluid",loading:"loading",popup:"ui popup",position:"top left center bottom right",visible:"visible",popupVisible:"visible"},selector:{popup:".ui.popup"},templates:{escape:function(e){var t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"};return/[&<>"'`]/.test(e)?e.replace(/[&<>"'`]/g,(function(e){return t[e]})):e},popup:function(e){var t="",n=VK.fn.popup.settings.templates.escape;return e.title,e.title&&(e.title=n(e.title),t+='<div class="header">'+e.title+"</div>"),e.content,e.content&&(e.content=n(e.content),t+='<div class="content">'+e.content+"</div>"),t}}},$K=ve.a,ra=window,QK=document,void 0!==(ra=void 0!==ra&&ra.Math==Math?ra:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")())&&ra.Math==Math||"undefined"!=typeof self&&self.Math==Math||Function("return this")(),$K.fn.progress=function(e){var t,n=$K(this),r=(n.selector,(new Date).getTime()),i=[],o=e,a="string"==typeof o,s=[].slice.call(arguments,1);return n.each((function(){var n=$K.isPlainObject(e)?$K.extend(!0,{},$K.fn.progress.settings,e):$K.extend({},$K.fn.progress.settings),u=n.className,c=n.metadata,l=n.namespace,h=n.selector,f=n.error,d="."+l,p="module-"+l,m=$K(this),g=$K(this).find(h.bar),A=$K(this).find(h.progress),v=$K(this).find(h.label),b=this,y=m.data(p),w=!1,x={initialize:function(){x.debug("Initializing progress bar",n),x.set.duration(),x.set.transitionEvent(),x.read.metadata(),x.read.settings(),x.instantiate()},instantiate:function(){x.verbose("Storing instance of progress",x),y=x,m.data(p,x)},destroy:function(){x.verbose("Destroying previous progress for",m),clearInterval(y.interval),x.remove.state(),m.removeData(p),y=void 0},reset:function(){x.remove.nextValue(),x.update.progress(0)},complete:function(){(void 0===x.percent||x.percent<100)&&(x.remove.progressPoll(),x.set.percent(100))},read:{metadata:function(){var e={percent:m.data(c.percent),total:m.data(c.total),value:m.data(c.value)};e.percent&&(x.debug("Current percent value set from metadata",e.percent),x.set.percent(e.percent)),e.total&&(x.debug("Total value set from metadata",e.total),x.set.total(e.total)),e.value&&(x.debug("Current value set from metadata",e.value),x.set.value(e.value),x.set.progress(e.value))},settings:function(){!1!==n.total&&(x.debug("Current total set in settings",n.total),x.set.total(n.total)),!1!==n.value&&(x.debug("Current value set in settings",n.value),x.set.value(n.value),x.set.progress(x.value)),!1!==n.percent&&(x.debug("Current percent set in settings",n.percent),x.set.percent(n.percent))}},bind:{transitionEnd:function(e){var t=x.get.transitionEnd();g.one(t+d,(function(t){clearTimeout(x.failSafeTimer),e.call(this,t)})),x.failSafeTimer=setTimeout((function(){g.triggerHandler(t)}),n.duration+n.failSafeDelay),x.verbose("Adding fail safe timer",x.timer)}},increment:function(e){var t,n;x.has.total()?n=(t=x.get.value())+(e=e||1):(n=(t=x.get.percent())+(e=e||x.get.randomValue()),x.debug("Incrementing percentage by",t,n)),n=x.get.normalizedValue(n),x.set.progress(n)},decrement:function(e){var t,n;x.get.total()?(n=(t=x.get.value())-(e=e||1),x.debug("Decrementing value by",e,t)):(n=(t=x.get.percent())-(e=e||x.get.randomValue()),x.debug("Decrementing percentage by",e,t)),n=x.get.normalizedValue(n),x.set.progress(n)},has:{progressPoll:function(){return x.progressPoll},total:function(){return!1!==x.get.total()}},get:{text:function(e){var t=x.value||0,n=x.total||0,r=w?x.get.displayPercent():x.percent||0,i=0<x.total?n-t:100-r;return e=(e=e||"").replace("{value}",t).replace("{total}",n).replace("{left}",i).replace("{percent}",r),x.verbose("Adding variables to progress bar text",e),e},normalizedValue:function(e){if(e<0)return x.debug("Value cannot decrement below 0"),0;if(x.has.total()){if(e>x.total)return x.debug("Value cannot increment above total",x.total),x.total}else if(100<e)return x.debug("Value cannot increment above 100 percent"),100;return e},updateInterval:function(){return"auto"==n.updateInterval?n.duration:n.updateInterval},randomValue:function(){return x.debug("Generating random increment percentage"),Math.floor(Math.random()*n.random.max+n.random.min)},numericValue:function(e){return"string"==typeof e?""!==e.replace(/[^\d.]/g,"")&&+e.replace(/[^\d.]/g,""):e},transitionEnd:function(){var e,t=QK.createElement("element"),n={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in n)if(void 0!==t.style[e])return n[e]},displayPercent:function(){var e=g.width(),t=m.width();e=e>parseInt(g.css("min-width"),10)?e/t*100:x.percent;return 0<n.precision?Math.round(e*(10*n.precision))/(10*n.precision):Math.round(e)},percent:function(){return x.percent||0},value:function(){return x.nextValue||x.value||0},total:function(){return x.total||!1}},create:{progressPoll:function(){x.progressPoll=setTimeout((function(){x.update.toNextValue(),x.remove.progressPoll()}),x.get.updateInterval())}},is:{complete:function(){return x.is.success()||x.is.warning()||x.is.error()},success:function(){return m.hasClass(u.success)},warning:function(){return m.hasClass(u.warning)},error:function(){return m.hasClass(u.error)},active:function(){return m.hasClass(u.active)},visible:function(){return m.is(":visible")}},remove:{progressPoll:function(){x.verbose("Removing progress poll timer"),x.progressPoll&&(clearTimeout(x.progressPoll),delete x.progressPoll)},nextValue:function(){x.verbose("Removing progress value stored for next update"),delete x.nextValue},state:function(){x.verbose("Removing stored state"),delete x.total,delete x.percent,delete x.value},active:function(){x.verbose("Removing active state"),m.removeClass(u.active)},success:function(){x.verbose("Removing success state"),m.removeClass(u.success)},warning:function(){x.verbose("Removing warning state"),m.removeClass(u.warning)},error:function(){x.verbose("Removing error state"),m.removeClass(u.error)}},set:{barWidth:function(e){100<e?x.error(f.tooHigh,e):e<0?x.error(f.tooLow,e):(g.css("width",e+"%"),m.attr("data-percent",parseInt(e,10)))},duration:function(e){e="number"==typeof(e=e||n.duration)?e+"ms":e,x.verbose("Setting progress bar transition duration",e),g.css({"transition-duration":e})},percent:function(e){e="string"==typeof e?+e.replace("%",""):e,e=0<n.precision?Math.round(e*(10*n.precision))/(10*n.precision):Math.round(e),x.percent=e,x.has.total()||(x.value=0<n.precision?Math.round(e/100*x.total*(10*n.precision))/(10*n.precision):Math.round(e/100*x.total*10)/10,n.limitValues&&(x.value=100<x.value?100:x.value<0?0:x.value)),x.set.barWidth(e),x.set.labelInterval(),x.set.labels(),n.onChange.call(b,e,x.value,x.total)},labelInterval:function(){clearInterval(x.interval),x.bind.transitionEnd((function(){x.verbose("Bar finished animating, removing continuous label updates"),clearInterval(x.interval),w=!1,x.set.labels()})),w=!0,x.interval=setInterval((function(){$K.contains(QK.documentElement,b)||(clearInterval(x.interval),w=!1),x.set.labels()}),n.framerate)},labels:function(){x.verbose("Setting both bar progress and outer label text"),x.set.barLabel(),x.set.state()},label:function(e){(e=e||"")&&(e=x.get.text(e),x.verbose("Setting label to text",e),v.text(e))},state:function(e){100===(e=void 0!==e?e:x.percent)?n.autoSuccess&&!(x.is.warning()||x.is.error()||x.is.success())?(x.set.success(),x.debug("Automatically triggering success at 100%")):(x.verbose("Reached 100% removing active state"),x.remove.active(),x.remove.progressPoll()):0<e?(x.verbose("Adjusting active progress bar label",e),x.set.active()):(x.remove.active(),x.set.label(n.text.active))},barLabel:function(e){void 0!==e?A.text(x.get.text(e)):"ratio"==n.label&&x.total?(x.verbose("Adding ratio to bar label"),A.text(x.get.text(n.text.ratio))):"percent"==n.label&&(x.verbose("Adding percentage to bar label"),A.text(x.get.text(n.text.percent)))},active:function(e){e=e||n.text.active,x.debug("Setting active state"),n.showActivity&&!x.is.active()&&m.addClass(u.active),x.remove.warning(),x.remove.error(),x.remove.success(),(e=n.onLabelUpdate("active",e,x.value,x.total))&&x.set.label(e),x.bind.transitionEnd((function(){n.onActive.call(b,x.value,x.total)}))},success:function(e){e=e||n.text.success||n.text.active,x.debug("Setting success state"),m.addClass(u.success),x.remove.active(),x.remove.warning(),x.remove.error(),x.complete(),e=n.text.success?n.onLabelUpdate("success",e,x.value,x.total):n.onLabelUpdate("active",e,x.value,x.total),x.set.label(e),x.bind.transitionEnd((function(){n.onSuccess.call(b,x.total)}))},warning:function(e){e=e||n.text.warning,x.debug("Setting warning state"),m.addClass(u.warning),x.remove.active(),x.remove.success(),x.remove.error(),x.complete(),(e=n.onLabelUpdate("warning",e,x.value,x.total))&&x.set.label(e),x.bind.transitionEnd((function(){n.onWarning.call(b,x.value,x.total)}))},error:function(e){e=e||n.text.error,x.debug("Setting error state"),m.addClass(u.error),x.remove.active(),x.remove.success(),x.remove.warning(),x.complete(),(e=n.onLabelUpdate("error",e,x.value,x.total))&&x.set.label(e),x.bind.transitionEnd((function(){n.onError.call(b,x.value,x.total)}))},transitionEvent:function(){x.get.transitionEnd()},total:function(e){x.total=e},value:function(e){x.value=e},progress:function(e){x.has.progressPoll()?(x.debug("Updated within interval, setting next update to use new value",e),x.set.nextValue(e)):(x.debug("First update in progress update interval, immediately updating",e),x.update.progress(e),x.create.progressPoll())},nextValue:function(e){x.nextValue=e}},update:{toNextValue:function(){var e=x.nextValue;e&&(x.debug("Update interval complete using last updated value",e),x.update.progress(e),x.remove.nextValue())},progress:function(e){var t;!1===(e=x.get.numericValue(e))&&x.error(f.nonNumeric,e),e=x.get.normalizedValue(e),x.has.total()?(x.set.value(e),t=e/x.total*100,x.debug("Calculating percent complete from total",t)):(t=e,x.debug("Setting value to exact percentage value",t)),x.set.percent(t)}},setting:function(e,t){if(x.debug("Changing setting",e,t),$K.isPlainObject(e))$K.extend(!0,n,e);else{if(void 0===t)return n[e];$K.isPlainObject(n[e])?$K.extend(!0,n[e],t):n[e]=t}},internal:function(e,t){if($K.isPlainObject(e))$K.extend(!0,x,e);else{if(void 0===t)return x[e];x[e]=t}},debug:function(){!n.silent&&n.debug&&(n.performance?x.performance.log(arguments):(x.debug=Function.prototype.bind.call(console.info,console,n.name+":"),x.debug.apply(console,arguments)))},verbose:function(){!n.silent&&n.verbose&&n.debug&&(n.performance?x.performance.log(arguments):(x.verbose=Function.prototype.bind.call(console.info,console,n.name+":"),x.verbose.apply(console,arguments)))},error:function(){n.silent||(x.error=Function.prototype.bind.call(console.error,console,n.name+":"),x.error.apply(console,arguments))},performance:{log:function(e){var t,o;n.performance&&(o=(t=(new Date).getTime())-(r||t),r=t,i.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:b,"Execution Time":o})),clearTimeout(x.performance.timer),x.performance.timer=setTimeout(x.performance.display,500)},display:function(){n.name,r=!1,clearTimeout(x.performance.timer),$K.each(i,(function(e,t){t["Execution Time"]})),(void 0!==console.group||void 0!==console.table)&&0<i.length&&!console.table&&$K.each(i,(function(e,t){t.Name,t["Execution Time"]})),i=[]}},invoke:function(e,n,r){var i,o,a,u=y;return n=n||s,r=b||r,"string"==typeof e&&void 0!==u&&(e=e.split(/[\. ]/),i=e.length-1,$K.each(e,(function(t,n){var r=t!=i?n+e[t+1].charAt(0).toUpperCase()+e[t+1].slice(1):e;if(!$K.isPlainObject(u[r])||t==i)return void 0!==u[r]?(o=u[r],!1):$K.isPlainObject(u[n])&&t!=i?void(u=u[n]):(void 0!==u[n]?o=u[n]:x.error(f.method,e),!1);u=u[r]}))),$K.isFunction(o)?a=o.apply(r,n):void 0!==o&&(a=o),$K.isArray(t)?t.push(a):void 0!==t?t=[t,a]:void 0!==a&&(t=a),o}};a?(void 0===y&&x.initialize(),x.invoke(o)):(void 0!==y&&y.invoke("destroy"),x.initialize())})),void 0!==t?t:this},$K.fn.progress.settings={name:"Progress",namespace:"progress",silent:!1,debug:!1,verbose:!1,performance:!0,random:{min:2,max:5},duration:300,updateInterval:"auto",autoSuccess:!0,showActivity:!0,limitValues:!0,label:"percent",precision:0,framerate:1e3/30,percent:!1,total:!1,value:!1,failSafeDelay:100,onLabelUpdate:function(e,t,n,r){return t},onChange:function(e,t,n){},onSuccess:function(e){},onActive:function(e,t){},onError:function(e,t){},onWarning:function(e,t){},error:{method:"The method you called is not defined.",nonNumeric:"Progress value is non numeric",tooHigh:"Value specified is above 100%",tooLow:"Value specified is below 0%"},regExp:{variable:/\{\$*[A-z0-9]+\}/g},metadata:{percent:"percent",total:"total",value:"value"},selector:{bar:"> .bar",label:"> .label",progress:".bar > .progress"},text:{active:!1,error:!1,success:!1,warning:!1,percent:"{percent}%",ratio:"{value} of {total}"},className:{active:"active",error:"error",success:"success",warning:"warning"}},HK=ve.a,Bt=window,document,Bt=void 0!==Bt&&Bt.Math==Math?Bt:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),HK.fn.rating=function(e){var t,n=HK(this),r=(n.selector,(new Date).getTime()),i=[],o=e,a="string"==typeof o,s=[].slice.call(arguments,1);return n.each((function(){var u,c=HK.isPlainObject(e)?HK.extend(!0,{},HK.fn.rating.settings,e):HK.extend({},HK.fn.rating.settings),l=c.namespace,h=c.className,f=c.metadata,d=c.selector,p=(c.error,"."+l),m="module-"+l,g=this,A=HK(this).data(m),v=HK(this),b=v.find(d.icon),y={initialize:function(){y.verbose("Initializing rating module",c),0===b.length&&y.setup.layout(),c.interactive?y.enable():y.disable(),y.set.initialLoad(),y.set.rating(y.get.initialRating()),y.remove.initialLoad(),y.instantiate()},instantiate:function(){y.verbose("Instantiating module",c),A=y,v.data(m,y)},destroy:function(){y.verbose("Destroying previous instance",A),y.remove.events(),v.removeData(m)},refresh:function(){b=v.find(d.icon)},setup:{layout:function(){var e=y.get.maxRating();e=HK.fn.rating.settings.templates.icon(e);y.debug("Generating icon html dynamically"),v.html(e),y.refresh()}},event:{mouseenter:function(){var e=HK(this);e.nextAll().removeClass(h.selected),v.addClass(h.selected),e.addClass(h.selected).prevAll().addClass(h.selected)},mouseleave:function(){v.removeClass(h.selected),b.removeClass(h.selected)},click:function(){var e=HK(this),t=y.get.rating();e=b.index(e)+1;("auto"==c.clearable?1===b.length:c.clearable)&&t==e?y.clearRating():y.set.rating(e)}},clearRating:function(){y.debug("Clearing current rating"),y.set.rating(0)},bind:{events:function(){y.verbose("Binding events"),v.on("mouseenter"+p,d.icon,y.event.mouseenter).on("mouseleave"+p,d.icon,y.event.mouseleave).on("click"+p,d.icon,y.event.click)}},remove:{events:function(){y.verbose("Removing events"),v.off(p)},initialLoad:function(){u=!1}},enable:function(){y.debug("Setting rating to interactive mode"),y.bind.events(),v.removeClass(h.disabled)},disable:function(){y.debug("Setting rating to read-only mode"),y.remove.events(),v.addClass(h.disabled)},is:{initialLoad:function(){return u}},get:{initialRating:function(){return void 0!==v.data(f.rating)?(v.removeData(f.rating),v.data(f.rating)):c.initialRating},maxRating:function(){return void 0!==v.data(f.maxRating)?(v.removeData(f.maxRating),v.data(f.maxRating)):c.maxRating},rating:function(){var e=b.filter("."+h.active).length;return y.verbose("Current rating retrieved",e),e}},set:{rating:function(e){var t=b.eq(0<=e-1?e-1:0);v.removeClass(h.selected),b.removeClass(h.selected).removeClass(h.active),0<e&&(y.verbose("Setting current rating to",e),t.prevAll().addBack().addClass(h.active)),y.is.initialLoad()||c.onRate.call(g,e)},initialLoad:function(){u=!0}},setting:function(e,t){if(y.debug("Changing setting",e,t),HK.isPlainObject(e))HK.extend(!0,c,e);else{if(void 0===t)return c[e];HK.isPlainObject(c[e])?HK.extend(!0,c[e],t):c[e]=t}},internal:function(e,t){if(HK.isPlainObject(e))HK.extend(!0,y,e);else{if(void 0===t)return y[e];y[e]=t}},debug:function(){!c.silent&&c.debug&&(c.performance?y.performance.log(arguments):(y.debug=Function.prototype.bind.call(console.info,console,c.name+":"),y.debug.apply(console,arguments)))},verbose:function(){!c.silent&&c.verbose&&c.debug&&(c.performance?y.performance.log(arguments):(y.verbose=Function.prototype.bind.call(console.info,console,c.name+":"),y.verbose.apply(console,arguments)))},error:function(){c.silent||(y.error=Function.prototype.bind.call(console.error,console,c.name+":"),y.error.apply(console,arguments))},performance:{log:function(e){var t,n;c.performance&&(n=(t=(new Date).getTime())-(r||t),r=t,i.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:g,"Execution Time":n})),clearTimeout(y.performance.timer),y.performance.timer=setTimeout(y.performance.display,500)},display:function(){c.name,r=!1,clearTimeout(y.performance.timer),HK.each(i,(function(e,t){t["Execution Time"]})),1<n.length&&n.length,(void 0!==console.group||void 0!==console.table)&&0<i.length&&!console.table&&HK.each(i,(function(e,t){t.Name,t["Execution Time"]})),i=[]}},invoke:function(e,n,r){var i,o,a,u=A;return n=n||s,r=g||r,"string"==typeof e&&void 0!==u&&(e=e.split(/[\. ]/),i=e.length-1,HK.each(e,(function(t,n){var r=t!=i?n+e[t+1].charAt(0).toUpperCase()+e[t+1].slice(1):e;if(!HK.isPlainObject(u[r])||t==i)return void 0!==u[r]?(o=u[r],!1):HK.isPlainObject(u[n])&&t!=i?void(u=u[n]):void 0!==u[n]&&(o=u[n],!1);u=u[r]}))),HK.isFunction(o)?a=o.apply(r,n):void 0!==o&&(a=o),HK.isArray(t)?t.push(a):void 0!==t?t=[t,a]:void 0!==a&&(t=a),o}};a?(void 0===A&&y.initialize(),y.invoke(o)):(void 0!==A&&A.invoke("destroy"),y.initialize())})),void 0!==t?t:this},HK.fn.rating.settings={name:"Rating",namespace:"rating",slent:!1,debug:!1,verbose:!1,performance:!0,initialRating:0,interactive:!0,maxRating:4,clearable:"auto",fireOnInit:!1,onRate:function(e){},error:{method:"The method you called is not defined",noMaximum:"No maximum rating specified. Cannot generate HTML automatically"},metadata:{rating:"rating",maxRating:"maxRating"},className:{active:"active",disabled:"disabled",selected:"selected",loading:"loading"},selector:{icon:".icon"},templates:{icon:function(e){for(var t=1,n="";t<=e;)n+='<i class="icon"></i>',t++;return n}}},LK=ve.a,UK=window,zK=document,UK=void 0!==UK&&UK.Math==Math?UK:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),LK.fn.search=function(e){var t,n=LK(this),r=(n.selector,(new Date).getTime()),i=[],o=e,a="string"==typeof o,s=[].slice.call(arguments,1);return LK(this).each((function(){var u=LK.isPlainObject(e)?LK.extend(!0,{},LK.fn.search.settings,e):LK.extend({},LK.fn.search.settings),c=u.className,l=u.metadata,h=u.regExp,f=u.fields,d=u.selector,p=u.error,m=u.namespace,g="."+m,A=m+"-module",v=LK(this),b=v.find(d.prompt),y=v.find(d.searchButton),w=v.find(d.results),x=v.find(d.result),C=(v.find(d.category),this),k=v.data(A),E=!1,S=!1,_={initialize:function(){_.verbose("Initializing module"),_.get.settings(),_.determine.searchFields(),_.bind.events(),_.set.type(),_.create.results(),_.instantiate()},instantiate:function(){_.verbose("Storing instance of module",_),k=_,v.data(A,_)},destroy:function(){_.verbose("Destroying instance"),v.off(g).removeData(A)},refresh:function(){_.debug("Refreshing selector cache"),b=v.find(d.prompt),y=v.find(d.searchButton),v.find(d.category),w=v.find(d.results),x=v.find(d.result)},refreshResults:function(){w=v.find(d.results),x=v.find(d.result)},bind:{events:function(){_.verbose("Binding events to search"),u.automatic&&(v.on(_.get.inputEvent()+g,d.prompt,_.event.input),b.attr("autocomplete","off")),v.on("focus"+g,d.prompt,_.event.focus).on("blur"+g,d.prompt,_.event.blur).on("keydown"+g,d.prompt,_.handleKeyboard).on("click"+g,d.searchButton,_.query).on("mousedown"+g,d.results,_.event.result.mousedown).on("mouseup"+g,d.results,_.event.result.mouseup).on("click"+g,d.result,_.event.result.click)}},determine:{searchFields:function(){e&&void 0!==e.searchFields&&(u.searchFields=e.searchFields)}},event:{input:function(){u.searchDelay?(clearTimeout(_.timer),_.timer=setTimeout((function(){_.is.focused()&&_.query()}),u.searchDelay)):_.query()},focus:function(){_.set.focus(),u.searchOnFocus&&_.has.minimumCharacters()&&_.query((function(){_.can.show()&&_.showResults()}))},blur:function(e){function t(){_.cancel.query(),_.remove.focus(),_.timer=setTimeout(_.hideResults,u.hideDelay)}zK.activeElement===this||(S=!1,_.resultsClicked?(_.debug("Determining if user action caused search to close"),v.one("click.close"+g,d.results,(function(e){_.is.inMessage(e)||E?b.focus():(E=!1,_.is.animating()||_.is.hidden()||t())}))):(_.debug("Input blurred without user action, closing results"),t()))},result:{mousedown:function(){_.resultsClicked=!0},mouseup:function(){_.resultsClicked=!1},click:function(e){_.debug("Search result selected");var t=(a=LK(this)).find(d.title).eq(0),n=a.is("a[href]")?a:a.find("a[href]").eq(0),r=n.attr("href")||!1,i=n.attr("target")||!1,o=(t=(t.html(),0<t.length&&t.text()),_.get.results()),a=a.data(l.result)||_.get.result(t,o);LK.isFunction(u.onSelect)&&!1===u.onSelect.call(C,a,o)?(_.debug("Custom onSelect callback cancelled default select action"),E=!0):(_.hideResults(),t&&_.set.value(t),r&&(_.verbose("Opening search link found in result",n),"_blank"==i||e.ctrlKey?UK.open(r):UK.location.href=r))}}},handleKeyboard:function(e){var t,n=v.find(d.result),r=v.find(d.category),i=n.filter("."+c.active),o=n.index(i),a=n.length,s=(i=0<i.length,e.which);if(27==s&&(_.verbose("Escape key pressed, blurring search field"),_.hideResults(),S=!0),_.is.visible())if(13==s){if(_.verbose("Enter key pressed, selecting active result"),0<n.filter("."+c.active).length)return _.event.result.click.call(n.filter("."+c.active),e),e.preventDefault(),!1}else 38==s&&i?(_.verbose("Up key pressed, changing active result"),t=o-1<0?o:o-1,r.removeClass(c.active),n.removeClass(c.active).eq(t).addClass(c.active).closest(r).addClass(c.active),e.preventDefault()):40==s&&(_.verbose("Down key pressed, changing active result"),t=a<=o+1?o:o+1,r.removeClass(c.active),n.removeClass(c.active).eq(t).addClass(c.active).closest(r).addClass(c.active),e.preventDefault());else 13==s&&(_.verbose("Enter key pressed, executing query"),_.query(),_.set.buttonPressed(),b.one("keyup",_.remove.buttonFocus))},setup:{api:function(e,t){var n={debug:u.debug,on:!1,cache:u.cache,action:"search",urlData:{query:e},onSuccess:function(n){_.parse.response.call(C,n,e),t()},onFailure:function(){_.displayMessage(p.serverError),t()},onAbort:function(e){},onError:_.error};LK.extend(!0,n,u.apiSettings),_.verbose("Setting up API request",n),v.api(n)}},can:{useAPI:function(){return void 0!==LK.fn.api},show:function(){return _.is.focused()&&!_.is.visible()&&!_.is.empty()},transition:function(){return u.transition&&void 0!==LK.fn.transition&&v.transition("is supported")}},is:{animating:function(){return w.hasClass(c.animating)},hidden:function(){return w.hasClass(c.hidden)},inMessage:function(e){var t;if(e.target)return t=LK(e.target),LK.contains(zK.documentElement,e.target)&&0<t.closest(d.message).length},empty:function(){return""===w.html()},visible:function(){return 0<w.filter(":visible").length},focused:function(){return 0<b.filter(":focus").length}},get:{settings:function(){LK.isPlainObject(e)&&e.searchFullText&&(u.fullTextSearch=e.searchFullText,_.error(u.error.oldSearchSyntax,C))},inputEvent:function(){var e=b[0];return void 0!==e&&void 0!==e.oninput?"input":void 0!==e&&void 0!==e.onpropertychange?"propertychange":"keyup"},value:function(){return b.val()},results:function(){return v.data(l.results)},result:function(e,t){var n=["title","id"],r=!1;return e=void 0!==e?e:_.get.value(),t=void 0!==t?t:_.get.results(),"category"===u.type?(_.debug("Finding result that matches",e),LK.each(t,(function(t,i){if(LK.isArray(i.results)&&(r=_.search.object(e,i.results,n)[0]))return!1}))):(_.debug("Finding result in results object",e),r=_.search.object(e,t,n)[0]),r||!1}},select:{firstResult:function(){_.verbose("Selecting first result"),x.first().addClass(c.active)}},set:{focus:function(){v.addClass(c.focus)},loading:function(){v.addClass(c.loading)},value:function(e){_.verbose("Setting search input value",e),b.val(e)},type:function(e){e=e||u.type,"category"==u.type&&v.addClass(u.type)},buttonPressed:function(){y.addClass(c.pressed)}},remove:{loading:function(){v.removeClass(c.loading)},focus:function(){v.removeClass(c.focus)},buttonPressed:function(){y.removeClass(c.pressed)}},query:function(e){e=LK.isFunction(e)?e:function(){};var t=_.get.value(),n=_.read.cache(t);e=e||function(){},_.has.minimumCharacters()?(n?(_.debug("Reading result from cache",t),_.save.results(n.results),_.addResults(n.html),_.inject.id(n.results),e()):(_.debug("Querying for",t),LK.isPlainObject(u.source)||LK.isArray(u.source)?(_.search.local(t),e()):_.can.useAPI()?_.search.remote(t,e):(_.error(p.source),e())),u.onSearchQuery.call(C,t)):_.hideResults()},search:{local:function(e){var t,n=_.search.object(e,u.content);_.set.loading(),_.save.results(n),_.debug("Returned full local search results",n),0<u.maxResults&&(_.debug("Using specified max results",n),n=n.slice(0,u.maxResults)),"category"==u.type&&(n=_.create.categoryResults(n)),t=_.generateResults({results:n}),_.remove.loading(),_.addResults(t),_.inject.id(n),_.write.cache(e,{html:t,results:n})},remote:function(e,t){t=LK.isFunction(t)?t:function(){},v.api("is loading")&&v.api("abort"),_.setup.api(e,t),v.api("query")},object:function(e,t,n){function r(e,t){var n=-1==LK.inArray(t,i),r=-1==LK.inArray(t,a),s=-1==LK.inArray(t,o);n&&r&&s&&e.push(t)}var i=[],o=[],a=[],s=e.toString().replace(h.escape,"\\$&"),c=new RegExp(h.beginsWith+s,"i");return t=t||u.source,n=void 0!==n?n:u.searchFields,LK.isArray(n)||(n=[n]),void 0===t||!1===t?(_.error(p.source),[]):(LK.each(n,(function(n,s){LK.each(t,(function(t,n){"string"==typeof n[s]&&(-1!==n[s].search(c)?r(i,n):"exact"===u.fullTextSearch&&_.exactSearch(e,n[s])?r(o,n):1==u.fullTextSearch&&_.fuzzySearch(e,n[s])&&r(a,n))}))})),LK.merge(o,a),LK.merge(i,o),i)}},exactSearch:function(e,t){return e=e.toLowerCase(),-1<(t=t.toLowerCase()).indexOf(e)},fuzzySearch:function(e,t){var n=t.length,r=e.length;if("string"!=typeof e)return!1;if(e=e.toLowerCase(),t=t.toLowerCase(),n<r)return!1;if(r===n)return e===t;e:for(var i=0,o=0;i<r;i++){for(var a=e.charCodeAt(i);o<n;)if(t.charCodeAt(o++)===a)continue e;return!1}return!0},parse:{response:function(e,t){var n=_.generateResults(e);_.verbose("Parsing server response",e),void 0!==e&&void 0!==t&&void 0!==e[f.results]&&(_.addResults(n),_.inject.id(e[f.results]),_.write.cache(t,{html:n,results:e[f.results]}),_.save.results(e[f.results]))}},cancel:{query:function(){_.can.useAPI()&&v.api("abort")}},has:{minimumCharacters:function(){return _.get.value().length>=u.minCharacters},results:function(){return 0!==w.length&&""!=w.html()}},clear:{cache:function(e){var t=v.data(l.cache);e?t&&t[e]&&(_.debug("Removing value from cache",e),delete t[e],v.data(l.cache,t)):(_.debug("Clearing cache",e),v.removeData(l.cache))}},read:{cache:function(e){var t=v.data(l.cache);return!!u.cache&&(_.verbose("Checking cache for generated html for query",e),"object"==typeof t&&void 0!==t[e]&&t[e])}},create:{categoryResults:function(e){var t={};return LK.each(e,(function(e,n){n.category&&(void 0===t[n.category]?(_.verbose("Creating new category of results",n.category),t[n.category]={name:n.category,results:[n]}):t[n.category].results.push(n))})),t},id:function(e,t){var n;e+=1;return void 0!==t?(n=String.fromCharCode(97+t)+e,_.verbose("Creating category result id",n)):_.verbose("Creating result id",n=e),n},results:function(){0===w.length&&(w=LK("<div />").addClass(c.results).appendTo(v))}},inject:{result:function(e,t,n){_.verbose("Injecting result into results"),n=(void 0!==n?w.children().eq(n).children(d.results).first():w).children(d.result).eq(t),_.verbose("Injecting results metadata",n),n.data(l.result,e)},id:function(e){_.debug("Injecting unique ids into results");var t=0,n=0;return"category"===u.type?LK.each(e,(function(e,r){n=0,LK.each(r.results,(function(e,i){void 0===(e=r.results[e]).id&&(e.id=_.create.id(n,t)),_.inject.result(e,n,t),n++})),t++})):LK.each(e,(function(t,r){void 0===(t=e[t]).id&&(t.id=_.create.id(n)),_.inject.result(t,n),n++})),e}},save:{results:function(e){_.verbose("Saving current search results to metadata",e),v.data(l.results,e)}},write:{cache:function(e,t){var n=void 0!==v.data(l.cache)?v.data(l.cache):{};u.cache&&(_.verbose("Writing generated html to cache",e,t),n[e]=t,v.data(l.cache,n))}},addResults:function(e){if(LK.isFunction(u.onResultsAdd)&&!1===u.onResultsAdd.call(w,e))return _.debug("onResultsAdd callback cancelled default action"),!1;e?(w.html(e),_.refreshResults(),u.selectFirstResult&&_.select.firstResult(),_.showResults()):_.hideResults((function(){w.empty()}))},showResults:function(e){e=LK.isFunction(e)?e:function(){},S||!_.is.visible()&&_.has.results()&&(_.can.transition()?(_.debug("Showing results with css animations"),w.transition({animation:u.transition+" in",debug:u.debug,verbose:u.verbose,duration:u.duration,onComplete:function(){e()},queue:!0})):(_.debug("Showing results with javascript"),w.stop().fadeIn(u.duration,u.easing)),u.onResultsOpen.call(w))},hideResults:function(e){e=LK.isFunction(e)?e:function(){},_.is.visible()&&(_.can.transition()?(_.debug("Hiding results with css animations"),w.transition({animation:u.transition+" out",debug:u.debug,verbose:u.verbose,duration:u.duration,onComplete:function(){e()},queue:!0})):(_.debug("Hiding results with javascript"),w.stop().fadeOut(u.duration,u.easing)),u.onResultsClose.call(w))},generateResults:function(e){_.debug("Generating html from response",e);var t=u.templates[u.type],n=LK.isPlainObject(e[f.results])&&!LK.isEmptyObject(e[f.results]),r=LK.isArray(e[f.results])&&0<e[f.results].length,i="";return n||r?(0<u.maxResults&&(n?"standard"==u.type&&_.error(p.maxResults):e[f.results]=e[f.results].slice(0,u.maxResults)),LK.isFunction(t)?i=t(e,f):_.error(p.noTemplate,!1)):u.showNoResults&&(i=_.displayMessage(p.noResults,"empty")),u.onResults.call(C,e),i},displayMessage:function(e,t){return _.debug("Displaying message",e,t=t||"standard"),_.addResults(u.templates.message(e,t)),u.templates.message(e,t)},setting:function(e,t){if(LK.isPlainObject(e))LK.extend(!0,u,e);else{if(void 0===t)return u[e];u[e]=t}},internal:function(e,t){if(LK.isPlainObject(e))LK.extend(!0,_,e);else{if(void 0===t)return _[e];_[e]=t}},debug:function(){!u.silent&&u.debug&&(u.performance?_.performance.log(arguments):(_.debug=Function.prototype.bind.call(console.info,console,u.name+":"),_.debug.apply(console,arguments)))},verbose:function(){!u.silent&&u.verbose&&u.debug&&(u.performance?_.performance.log(arguments):(_.verbose=Function.prototype.bind.call(console.info,console,u.name+":"),_.verbose.apply(console,arguments)))},error:function(){u.silent||(_.error=Function.prototype.bind.call(console.error,console,u.name+":"),_.error.apply(console,arguments))},performance:{log:function(e){var t,n;u.performance&&(n=(t=(new Date).getTime())-(r||t),r=t,i.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:C,"Execution Time":n})),clearTimeout(_.performance.timer),_.performance.timer=setTimeout(_.performance.display,500)},display:function(){u.name,r=!1,clearTimeout(_.performance.timer),LK.each(i,(function(e,t){t["Execution Time"]})),1<n.length&&n.length,(void 0!==console.group||void 0!==console.table)&&0<i.length&&!console.table&&LK.each(i,(function(e,t){t.Name,t["Execution Time"]})),i=[]}},invoke:function(e,n,r){var i,o,a,u=k;return n=n||s,r=C||r,"string"==typeof e&&void 0!==u&&(e=e.split(/[\. ]/),i=e.length-1,LK.each(e,(function(t,n){var r=t!=i?n+e[t+1].charAt(0).toUpperCase()+e[t+1].slice(1):e;if(!LK.isPlainObject(u[r])||t==i)return void 0!==u[r]?(o=u[r],!1):LK.isPlainObject(u[n])&&t!=i?void(u=u[n]):void 0!==u[n]&&(o=u[n],!1);u=u[r]}))),LK.isFunction(o)?a=o.apply(r,n):void 0!==o&&(a=o),LK.isArray(t)?t.push(a):void 0!==t?t=[t,a]:void 0!==a&&(t=a),o}};a?(void 0===k&&_.initialize(),_.invoke(o)):(void 0!==k&&k.invoke("destroy"),_.initialize())})),void 0!==t?t:this},LK.fn.search.settings={name:"Search",namespace:"search",silent:!1,debug:!1,verbose:!1,performance:!0,type:"standard",minCharacters:1,selectFirstResult:!1,apiSettings:!1,source:!1,searchOnFocus:!0,searchFields:["title","description"],displayField:"",fullTextSearch:"exact",automatic:!0,hideDelay:0,searchDelay:200,maxResults:7,cache:!0,showNoResults:!0,transition:"scale",duration:200,easing:"easeOutExpo",onSelect:!1,onResultsAdd:!1,onSearchQuery:function(e){},onResults:function(e){},onResultsOpen:function(){},onResultsClose:function(){},className:{animating:"animating",active:"active",empty:"empty",focus:"focus",hidden:"hidden",loading:"loading",results:"results",pressed:"down"},error:{source:"Cannot search. No source used, and Semantic API module was not included",noResults:"Your search returned no results",logging:"Error in debug logging, exiting.",noEndpoint:"No search endpoint was specified",noTemplate:"A valid template name was not specified.",oldSearchSyntax:"searchFullText setting has been renamed fullTextSearch for consistency, please adjust your settings.",serverError:"There was an issue querying the server.",maxResults:"Results must be an array to use maxResults setting",method:"The method you called is not defined."},metadata:{cache:"cache",results:"results",result:"result"},regExp:{escape:/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,beginsWith:"(?:s|^)"},fields:{categories:"results",categoryName:"name",categoryResults:"results",description:"description",image:"image",price:"price",results:"results",title:"title",url:"url",action:"action",actionText:"text",actionURL:"url"},selector:{prompt:".prompt",searchButton:".search.button",results:".results",message:".results > .message",category:".category",result:".result",title:".title, .name"},templates:{escape:function(e){var t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"};return/[&<>"'`]/.test(e)?e.replace(/[&<>"'`]/g,(function(e){return t[e]})):e},message:function(e,t){var n="";return void 0!==e&&void 0!==t?(n+='<div class="message '+t+'">')+("empty"==t?'<div class="header">No Results</div class="header"><div class="description">'+e+'</div class="description">':' <div class="description">'+e+"</div>")+"</div>":n},category:function(e,t){var n="";return LK.fn.search.settings.templates.escape,void 0!==e[t.categoryResults]&&(LK.each(e[t.categoryResults],(function(e,r){void 0!==r[t.results]&&0<r.results.length&&(n+='<div class="category">',void 0!==r[t.categoryName]&&(n+='<div class="name">'+r[t.categoryName]+"</div>"),n+='<div class="results">',LK.each(r.results,(function(e,r){r[t.url]?n+='<a class="result" href="'+r[t.url]+'">':n+='<a class="result">',void 0!==r[t.image]&&(n+='<div class="image"> <img src="'+r[t.image]+'"></div>'),n+='<div class="content">',void 0!==r[t.price]&&(n+='<div class="price">'+r[t.price]+"</div>"),void 0!==r[t.title]&&(n+='<div class="title">'+r[t.title]+"</div>"),void 0!==r[t.description]&&(n+='<div class="description">'+r[t.description]+"</div>"),n+="</div></a>"})),n+="</div></div>")})),e[t.action]&&(n+='<a href="'+e[t.action][t.actionURL]+'" class="action">'+e[t.action][t.actionText]+"</a>"),n)},standard:function(e,t){var n="";return void 0!==e[t.results]&&(LK.each(e[t.results],(function(e,r){r[t.url]?n+='<a class="result" href="'+r[t.url]+'">':n+='<a class="result">',void 0!==r[t.image]&&(n+='<div class="image"> <img src="'+r[t.image]+'"></div>'),n+='<div class="content">',void 0!==r[t.price]&&(n+='<div class="price">'+r[t.price]+"</div>"),void 0!==r[t.title]&&(n+='<div class="title">'+r[t.title]+"</div>"),void 0!==r[t.description]&&(n+='<div class="description">'+r[t.description]+"</div>"),n+="</div></a>"})),e[t.action]&&(n+='<a href="'+e[t.action][t.actionURL]+'" class="action">'+e[t.action][t.actionText]+"</a>"),n)}}},FK=ve.a,RK=window,PK=document,RK=void 0!==RK&&RK.Math==Math?RK:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),FK.fn.shape=function(e){var t,n=FK(this),r=(FK("body"),(new Date).getTime()),i=[],o=e,a="string"==typeof o,s=[].slice.call(arguments,1),u=RK.requestAnimationFrame||RK.mozRequestAnimationFrame||RK.webkitRequestAnimationFrame||RK.msRequestAnimationFrame||function(e){setTimeout(e,0)};return n.each((function(){n.selector;var c,l,h=FK.isPlainObject(e)?FK.extend(!0,{},FK.fn.shape.settings,e):FK.extend({},FK.fn.shape.settings),f=h.namespace,d=h.selector,p=h.error,m=h.className,g="."+f,A="module-"+f,v=FK(this),b=v.find(d.sides),y=v.find(d.side),w=!1,x=this,C=v.data(A),k={initialize:function(){k.verbose("Initializing module for",x),k.set.defaultSide(),k.instantiate()},instantiate:function(){k.verbose("Storing instance of module",k),C=k,v.data(A,C)},destroy:function(){k.verbose("Destroying previous module for",x),v.removeData(A).off(g)},refresh:function(){k.verbose("Refreshing selector cache for",x),v=FK(x),b=FK(this).find(d.shape),y=FK(this).find(d.side)},repaint:function(){k.verbose("Forcing repaint event"),(b[0]||PK.createElement("div")).offsetWidth},animate:function(e,t){k.verbose("Animating box with properties",e),t=t||function(e){k.verbose("Executing animation callback"),void 0!==e&&e.stopPropagation(),k.reset(),k.set.active()},h.beforeChange.call(l[0]),k.get.transitionEvent()?(k.verbose("Starting CSS animation"),v.addClass(m.animating),b.css(e).one(k.get.transitionEvent(),t),k.set.duration(h.duration),u((function(){v.addClass(m.animating),c.addClass(m.hidden)}))):t()},queue:function(e){k.debug("Queueing animation of",e),b.one(k.get.transitionEvent(),(function(){k.debug("Executing queued animation"),setTimeout((function(){v.shape(e)}),0)}))},reset:function(){k.verbose("Animating states reset"),v.removeClass(m.animating).attr("style","").removeAttr("style"),b.attr("style","").removeAttr("style"),y.attr("style","").removeAttr("style").removeClass(m.hidden),l.removeClass(m.animating).attr("style","").removeAttr("style")},is:{complete:function(){return y.filter("."+m.active)[0]==l[0]},animating:function(){return v.hasClass(m.animating)}},set:{defaultSide:function(){c=v.find("."+h.className.active),l=0<c.next(d.side).length?c.next(d.side):v.find(d.side).first(),w=!1,k.verbose("Active side set to",c),k.verbose("Next side set to",l)},duration:function(e){e="number"==typeof(e=e||h.duration)?e+"ms":e,k.verbose("Setting animation duration",e),!h.duration&&0!==h.duration||b.add(y).css({"-webkit-transition-duration":e,"-moz-transition-duration":e,"-ms-transition-duration":e,"-o-transition-duration":e,"transition-duration":e})},currentStageSize:function(){var e=(t=v.find("."+h.className.active)).outerWidth(!0),t=t.outerHeight(!0);v.css({width:e,height:t})},stageSize:function(){var e=v.clone().addClass(m.loading),t=e.find("."+h.className.active),n=w?e.find(d.side).eq(w):0<t.next(d.side).length?t.next(d.side):e.find(d.side).first(),r="next"==h.width?n.outerWidth(!0):"initial"==h.width?v.width():h.width,i="next"==h.height?n.outerHeight(!0):"initial"==h.height?v.height():h.height;t.removeClass(m.active),n.addClass(m.active),e.insertAfter(v),e.remove(),"auto"!=h.width&&(v.css("width",r+h.jitter),k.verbose("Specifying width during animation",r)),"auto"!=h.height&&(v.css("height",i+h.jitter),k.verbose("Specifying height during animation",i))},nextSide:function(e){w=e,l=y.filter(e),w=y.index(l),0===l.length&&(k.set.defaultSide(),k.error(p.side)),k.verbose("Next side manually set to",l)},active:function(){k.verbose("Setting new side to active",l),y.removeClass(m.active),l.addClass(m.active),h.onChange.call(l[0]),k.set.defaultSide()}},flip:{up:function(){var e;!k.is.complete()||k.is.animating()||h.allowRepeats?k.is.animating()?k.queue("flip up"):(k.debug("Flipping up",l),e=k.get.transform.up(),k.set.stageSize(),k.stage.above(),k.animate(e)):k.debug("Side already visible",l)},down:function(){var e;!k.is.complete()||k.is.animating()||h.allowRepeats?k.is.animating()?k.queue("flip down"):(k.debug("Flipping down",l),e=k.get.transform.down(),k.set.stageSize(),k.stage.below(),k.animate(e)):k.debug("Side already visible",l)},left:function(){var e;!k.is.complete()||k.is.animating()||h.allowRepeats?k.is.animating()?k.queue("flip left"):(k.debug("Flipping left",l),e=k.get.transform.left(),k.set.stageSize(),k.stage.left(),k.animate(e)):k.debug("Side already visible",l)},right:function(){var e;!k.is.complete()||k.is.animating()||h.allowRepeats?k.is.animating()?k.queue("flip right"):(k.debug("Flipping right",l),e=k.get.transform.right(),k.set.stageSize(),k.stage.right(),k.animate(e)):k.debug("Side already visible",l)},over:function(){!k.is.complete()||k.is.animating()||h.allowRepeats?k.is.animating()?k.queue("flip over"):(k.debug("Flipping over",l),k.set.stageSize(),k.stage.behind(),k.animate(k.get.transform.over())):k.debug("Side already visible",l)},back:function(){!k.is.complete()||k.is.animating()||h.allowRepeats?k.is.animating()?k.queue("flip back"):(k.debug("Flipping back",l),k.set.stageSize(),k.stage.behind(),k.animate(k.get.transform.back())):k.debug("Side already visible",l)}},get:{transform:{up:function(){return{transform:"translateY("+-(c.outerHeight(!0)-l.outerHeight(!0))/2+"px) translateZ("+-c.outerHeight(!0)/2+"px) rotateX(-90deg)"}},down:function(){return{transform:"translateY("+-(c.outerHeight(!0)-l.outerHeight(!0))/2+"px) translateZ("+-c.outerHeight(!0)/2+"px) rotateX(90deg)"}},left:function(){return{transform:"translateX("+-(c.outerWidth(!0)-l.outerWidth(!0))/2+"px) translateZ("+-c.outerWidth(!0)/2+"px) rotateY(90deg)"}},right:function(){return{transform:"translateX("+-(c.outerWidth(!0)-l.outerWidth(!0))/2+"px) translateZ("+-c.outerWidth(!0)/2+"px) rotateY(-90deg)"}},over:function(){return{transform:"translateX("+-(c.outerWidth(!0)-l.outerWidth(!0))/2+"px) rotateY(180deg)"}},back:function(){return{transform:"translateX("+-(c.outerWidth(!0)-l.outerWidth(!0))/2+"px) rotateY(-180deg)"}}},transitionEvent:function(){var e,t=PK.createElement("element"),n={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in n)if(void 0!==t.style[e])return n[e]},nextSide:function(){return 0<c.next(d.side).length?c.next(d.side):v.find(d.side).first()}},stage:{above:function(){var e={origin:(c.outerHeight(!0)-l.outerHeight(!0))/2,depth:{active:l.outerHeight(!0)/2,next:c.outerHeight(!0)/2}};k.verbose("Setting the initial animation position as above",l,e),b.css({transform:"translateZ(-"+e.depth.active+"px)"}),c.css({transform:"rotateY(0deg) translateZ("+e.depth.active+"px)"}),l.addClass(m.animating).css({top:e.origin+"px",transform:"rotateX(90deg) translateZ("+e.depth.next+"px)"})},below:function(){var e={origin:(c.outerHeight(!0)-l.outerHeight(!0))/2,depth:{active:l.outerHeight(!0)/2,next:c.outerHeight(!0)/2}};k.verbose("Setting the initial animation position as below",l,e),b.css({transform:"translateZ(-"+e.depth.active+"px)"}),c.css({transform:"rotateY(0deg) translateZ("+e.depth.active+"px)"}),l.addClass(m.animating).css({top:e.origin+"px",transform:"rotateX(-90deg) translateZ("+e.depth.next+"px)"})},left:function(){var e=c.outerWidth(!0),t={origin:(e-(t=l.outerWidth(!0)))/2,depth:{active:t/2,next:e/2}};k.verbose("Setting the initial animation position as left",l,t),b.css({transform:"translateZ(-"+t.depth.active+"px)"}),c.css({transform:"rotateY(0deg) translateZ("+t.depth.active+"px)"}),l.addClass(m.animating).css({left:t.origin+"px",transform:"rotateY(-90deg) translateZ("+t.depth.next+"px)"})},right:function(){var e=c.outerWidth(!0),t={origin:(e-(t=l.outerWidth(!0)))/2,depth:{active:t/2,next:e/2}};k.verbose("Setting the initial animation position as left",l,t),b.css({transform:"translateZ(-"+t.depth.active+"px)"}),c.css({transform:"rotateY(0deg) translateZ("+t.depth.active+"px)"}),l.addClass(m.animating).css({left:t.origin+"px",transform:"rotateY(90deg) translateZ("+t.depth.next+"px)"})},behind:function(){var e=c.outerWidth(!0),t={origin:(e-(t=l.outerWidth(!0)))/2,depth:{active:t/2,next:e/2}};k.verbose("Setting the initial animation position as behind",l,t),c.css({transform:"rotateY(0deg)"}),l.addClass(m.animating).css({left:t.origin+"px",transform:"rotateY(-180deg)"})}},setting:function(e,t){if(k.debug("Changing setting",e,t),FK.isPlainObject(e))FK.extend(!0,h,e);else{if(void 0===t)return h[e];FK.isPlainObject(h[e])?FK.extend(!0,h[e],t):h[e]=t}},internal:function(e,t){if(FK.isPlainObject(e))FK.extend(!0,k,e);else{if(void 0===t)return k[e];k[e]=t}},debug:function(){!h.silent&&h.debug&&(h.performance?k.performance.log(arguments):(k.debug=Function.prototype.bind.call(console.info,console,h.name+":"),k.debug.apply(console,arguments)))},verbose:function(){!h.silent&&h.verbose&&h.debug&&(h.performance?k.performance.log(arguments):(k.verbose=Function.prototype.bind.call(console.info,console,h.name+":"),k.verbose.apply(console,arguments)))},error:function(){h.silent||(k.error=Function.prototype.bind.call(console.error,console,h.name+":"),k.error.apply(console,arguments))},performance:{log:function(e){var t,n;h.performance&&(n=(t=(new Date).getTime())-(r||t),r=t,i.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:x,"Execution Time":n})),clearTimeout(k.performance.timer),k.performance.timer=setTimeout(k.performance.display,500)},display:function(){h.name,r=!1,clearTimeout(k.performance.timer),FK.each(i,(function(e,t){t["Execution Time"]})),1<n.length&&n.length,(void 0!==console.group||void 0!==console.table)&&0<i.length&&!console.table&&FK.each(i,(function(e,t){t.Name,t["Execution Time"]})),i=[]}},invoke:function(e,n,r){var i,o,a,u=C;return n=n||s,r=x||r,"string"==typeof e&&void 0!==u&&(e=e.split(/[\. ]/),i=e.length-1,FK.each(e,(function(t,n){var r=t!=i?n+e[t+1].charAt(0).toUpperCase()+e[t+1].slice(1):e;if(!FK.isPlainObject(u[r])||t==i)return void 0!==u[r]?(o=u[r],!1):FK.isPlainObject(u[n])&&t!=i?void(u=u[n]):void 0!==u[n]&&(o=u[n],!1);u=u[r]}))),FK.isFunction(o)?a=o.apply(r,n):void 0!==o&&(a=o),FK.isArray(t)?t.push(a):void 0!==t?t=[t,a]:void 0!==a&&(t=a),o}};a?(void 0===C&&k.initialize(),k.invoke(o)):(void 0!==C&&C.invoke("destroy"),k.initialize())})),void 0!==t?t:this},FK.fn.shape.settings={name:"Shape",silent:!1,debug:!1,verbose:!1,jitter:0,performance:!0,namespace:"shape",width:"initial",height:"initial",beforeChange:function(){},onChange:function(){},allowRepeats:!1,duration:!1,error:{side:"You tried to switch to a side that does not exist.",method:"The method you called is not defined"},className:{animating:"animating",hidden:"hidden",loading:"loading",active:"active"},selector:{sides:".sides",side:".side"}},MK=ve.a,jK=window,NK=document,jK=void 0!==jK&&jK.Math==Math?jK:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),MK.fn.sidebar=function(e){var t,n=MK(this),r=MK(jK),i=MK(NK),o=MK("html"),a=MK("head"),s=(n.selector,(new Date).getTime()),u=[],c=e,l="string"==typeof c,h=[].slice.call(arguments,1),f=jK.requestAnimationFrame||jK.mozRequestAnimationFrame||jK.webkitRequestAnimationFrame||jK.msRequestAnimationFrame||function(e){setTimeout(e,0)};return n.each((function(){var n,d,p,m,g,A=MK.isPlainObject(e)?MK.extend(!0,{},MK.fn.sidebar.settings,e):MK.extend({},MK.fn.sidebar.settings),v=A.selector,b=A.className,y=A.namespace,w=A.regExp,x=A.error,C="."+y,k="module-"+y,E=MK(this),S=MK(A.context),_=E.children(v.sidebar),O=(S.children(v.fixed),S.children(v.pusher)),T=this,D=E.data(k),B={initialize:function(){B.debug("Initializing sidebar",e),B.create.id(),g=B.get.transitionEvent(),A.delaySetup?f(B.setup.layout):B.setup.layout(),f((function(){B.setup.cache()})),B.instantiate()},instantiate:function(){B.verbose("Storing instance of module",B),D=B,E.data(k,B)},create:{id:function(){p=(Math.random().toString(16)+"000000000").substr(2,8),d="."+p,B.verbose("Creating unique id for element",p)}},destroy:function(){B.verbose("Destroying previous module for",E),E.off(C).removeData(k),B.is.ios()&&B.remove.ios(),S.off(d),r.off(d),i.off(d)},event:{clickaway:function(e){var t=0<O.find(e.target).length||O.is(e.target);e=S.is(e.target);t&&(B.verbose("User clicked on dimmed page"),B.hide()),e&&(B.verbose("User clicked on dimmable context (scaled out page)"),B.hide())},touch:function(e){},containScroll:function(e){T.scrollTop<=0&&(T.scrollTop=1),T.scrollTop+T.offsetHeight>=T.scrollHeight&&(T.scrollTop=T.scrollHeight-T.offsetHeight-1)},scroll:function(e){0===MK(e.target).closest(v.sidebar).length&&e.preventDefault()}},bind:{clickaway:function(){B.verbose("Adding clickaway events to context",S),A.closable&&S.on("click"+d,B.event.clickaway).on("touchend"+d,B.event.clickaway)},scrollLock:function(){A.scrollLock&&(B.debug("Disabling page scroll"),r.on("DOMMouseScroll"+d,B.event.scroll)),B.verbose("Adding events to contain sidebar scroll"),i.on("touchmove"+d,B.event.touch),E.on("scroll"+C,B.event.containScroll)}},unbind:{clickaway:function(){B.verbose("Removing clickaway events from context",S),S.off(d)},scrollLock:function(){B.verbose("Removing scroll lock from page"),i.off(d),r.off(d),E.off("scroll"+C)}},add:{inlineCSS:function(){var e=B.cache.width||E.outerWidth(),t=B.cache.height||E.outerHeight(),r=B.is.rtl(),i=B.get.direction();t={left:e,right:-e,top:t,bottom:-t};r&&(B.verbose("RTL detected, flipping widths"),t.left=-e,t.right=e),r="<style>","left"===i||"right"===i?(B.debug("Adding CSS rules for animation distance",e),r+=" .ui.visible."+i+".sidebar ~ .fixed, .ui.visible."+i+".sidebar ~ .pusher {   -webkit-transform: translate3d("+t[i]+"px, 0, 0);           transform: translate3d("+t[i]+"px, 0, 0); }"):"top"!==i&&"bottom"!=i||(r+=" .ui.visible."+i+".sidebar ~ .fixed, .ui.visible."+i+".sidebar ~ .pusher {   -webkit-transform: translate3d(0, "+t[i]+"px, 0);           transform: translate3d(0, "+t[i]+"px, 0); }"),B.is.ie()&&("left"===i||"right"===i?(B.debug("Adding CSS rules for animation distance",e),r+=" body.pushable > .ui.visible."+i+".sidebar ~ .pusher:after {   -webkit-transform: translate3d("+t[i]+"px, 0, 0);           transform: translate3d("+t[i]+"px, 0, 0); }"):"top"!==i&&"bottom"!=i||(r+=" body.pushable > .ui.visible."+i+".sidebar ~ .pusher:after {   -webkit-transform: translate3d(0, "+t[i]+"px, 0);           transform: translate3d(0, "+t[i]+"px, 0); }"),r+=" body.pushable > .ui.visible.left.sidebar ~ .ui.visible.right.sidebar ~ .pusher:after, body.pushable > .ui.visible.right.sidebar ~ .ui.visible.left.sidebar ~ .pusher:after {   -webkit-transform: translate3d(0px, 0, 0);           transform: translate3d(0px, 0, 0); }"),n=MK(r+="</style>").appendTo(a),B.debug("Adding sizing css to head",n)}},refresh:function(){B.verbose("Refreshing selector cache"),S=MK(A.context),_=S.children(v.sidebar),O=S.children(v.pusher),S.children(v.fixed),B.clear.cache()},refreshSidebars:function(){B.verbose("Refreshing other sidebars"),_=S.children(v.sidebar)},repaint:function(){B.verbose("Forcing repaint event"),T.style.display="none",T.offsetHeight,T.scrollTop=T.scrollTop,T.style.display=""},setup:{cache:function(){B.cache={width:E.outerWidth(),height:E.outerHeight(),rtl:"rtl"==E.css("direction")}},layout:function(){0===S.children(v.pusher).length&&(B.debug("Adding wrapper element for sidebar"),B.error(x.pusher),O=MK('<div class="pusher" />'),S.children().not(v.omitted).not(_).wrapAll(O),B.refresh()),0!==E.nextAll(v.pusher).length&&E.nextAll(v.pusher)[0]===O[0]||(B.debug("Moved sidebar to correct parent element"),B.error(x.movedSidebar,T),E.detach().prependTo(S),B.refresh()),B.clear.cache(),B.set.pushable(),B.set.direction()}},attachEvents:function(e,t){var n=MK(e);t=MK.isFunction(B[t])?B[t]:B.toggle,0<n.length?(B.debug("Attaching sidebar events to element",e,t),n.on("click"+C,t)):B.error(x.notFound,e)},show:function(e){if(e=MK.isFunction(e)?e:function(){},B.is.hidden()){if(B.refreshSidebars(),A.overlay&&(B.error(x.overlay),A.transition="overlay"),B.refresh(),B.othersActive())if(B.debug("Other sidebars currently visible"),A.exclusive){if("overlay"!=A.transition)return void B.hideOthers(B.show);B.hideOthers()}else A.transition="overlay";B.pushPage((function(){e.call(T),A.onShow.call(T)})),A.onChange.call(T),A.onVisible.call(T)}else B.debug("Sidebar is already visible")},hide:function(e){e=MK.isFunction(e)?e:function(){},(B.is.visible()||B.is.animating())&&(B.debug("Hiding sidebar",e),B.refreshSidebars(),B.pullPage((function(){e.call(T),A.onHidden.call(T)})),A.onChange.call(T),A.onHide.call(T))},othersAnimating:function(){return 0<_.not(E).filter("."+b.animating).length},othersVisible:function(){return 0<_.not(E).filter("."+b.visible).length},othersActive:function(){return B.othersVisible()||B.othersAnimating()},hideOthers:function(e){var t=_.not(E).filter("."+b.visible),n=t.length,r=0;e=e||function(){},t.sidebar("hide",(function(){++r==n&&e()}))},toggle:function(){B.verbose("Determining toggled direction"),B.is.hidden()?B.show():B.hide()},pushPage:function(e){var t,n,r=B.get.transition(),i="overlay"===r||B.othersActive()?E:O;e=MK.isFunction(e)?e:function(){},"scale down"==A.transition&&B.scrollToTop(),B.set.transition(r),B.repaint(),r=function(){B.bind.clickaway(),B.add.inlineCSS(),B.set.animating(),B.set.visible()},t=function(){B.set.dimmed()},n=function(t){t.target==i[0]&&(i.off(g+d,n),B.remove.animating(),B.bind.scrollLock(),e.call(T))},i.off(g+d),i.on(g+d,n),f(r),A.dimPage&&!B.othersVisible()&&f(t)},pullPage:function(e){var t,n,r=B.get.transition(),i="overlay"==r||B.othersActive()?E:O;e=MK.isFunction(e)?e:function(){},B.verbose("Removing context push state",B.get.direction()),B.unbind.clickaway(),B.unbind.scrollLock(),t=function(){B.set.transition(r),B.set.animating(),B.remove.visible(),A.dimPage&&!B.othersVisible()&&O.removeClass(b.dimmed)},n=function(t){t.target==i[0]&&(i.off(g+d,n),B.remove.animating(),B.remove.transition(),B.remove.inlineCSS(),("scale down"==r||A.returnScroll&&B.is.mobile())&&B.scrollBack(),e.call(T))},i.off(g+d),i.on(g+d,n),f(t)},scrollToTop:function(){B.verbose("Scrolling to top of page to avoid animation issues"),m=MK(jK).scrollTop(),E.scrollTop(0),jK.scrollTo(0,0)},scrollBack:function(){B.verbose("Scrolling back to original page position"),jK.scrollTo(0,m)},clear:{cache:function(){B.verbose("Clearing cached dimensions"),B.cache={}}},set:{ios:function(){o.addClass(b.ios)},pushed:function(){S.addClass(b.pushed)},pushable:function(){S.addClass(b.pushable)},dimmed:function(){O.addClass(b.dimmed)},active:function(){E.addClass(b.active)},animating:function(){E.addClass(b.animating)},transition:function(e){e=e||B.get.transition(),E.addClass(e)},direction:function(e){e=e||B.get.direction(),E.addClass(b[e])},visible:function(){E.addClass(b.visible)},overlay:function(){E.addClass(b.overlay)}},remove:{inlineCSS:function(){B.debug("Removing inline css styles",n),n&&0<n.length&&n.remove()},ios:function(){o.removeClass(b.ios)},pushed:function(){S.removeClass(b.pushed)},pushable:function(){S.removeClass(b.pushable)},active:function(){E.removeClass(b.active)},animating:function(){E.removeClass(b.animating)},transition:function(e){e=e||B.get.transition(),E.removeClass(e)},direction:function(e){e=e||B.get.direction(),E.removeClass(b[e])},visible:function(){E.removeClass(b.visible)},overlay:function(){E.removeClass(b.overlay)}},get:{direction:function(){return E.hasClass(b.top)?b.top:E.hasClass(b.right)?b.right:E.hasClass(b.bottom)?b.bottom:b.left},transition:function(){var e=B.get.direction();e=B.is.mobile()?"auto"==A.mobileTransition?A.defaultTransition.mobile[e]:A.mobileTransition:"auto"==A.transition?A.defaultTransition.computer[e]:A.transition;return B.verbose("Determined transition",e),e},transitionEvent:function(){var e,t=NK.createElement("element"),n={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(e in n)if(void 0!==t.style[e])return n[e]}},is:{ie:function(){return!jK.ActiveXObject&&"ActiveXObject"in jK||"ActiveXObject"in jK},ios:function(){var e=navigator.userAgent,t=e.match(w.ios),n=e.match(w.mobileChrome);return!(!t||n||(B.verbose("Browser was found to be iOS",e),0))},mobile:function(){var e=navigator.userAgent;return e.match(w.mobile)?(B.verbose("Browser was found to be mobile",e),!0):(B.verbose("Browser is not mobile, using regular transition",e),!1)},hidden:function(){return!B.is.visible()},visible:function(){return E.hasClass(b.visible)},open:function(){return B.is.visible()},closed:function(){return B.is.hidden()},vertical:function(){return E.hasClass(b.top)},animating:function(){return S.hasClass(b.animating)},rtl:function(){return void 0===B.cache.rtl&&(B.cache.rtl="rtl"==E.css("direction")),B.cache.rtl}},setting:function(e,t){if(B.debug("Changing setting",e,t),MK.isPlainObject(e))MK.extend(!0,A,e);else{if(void 0===t)return A[e];MK.isPlainObject(A[e])?MK.extend(!0,A[e],t):A[e]=t}},internal:function(e,t){if(MK.isPlainObject(e))MK.extend(!0,B,e);else{if(void 0===t)return B[e];B[e]=t}},debug:function(){!A.silent&&A.debug&&(A.performance?B.performance.log(arguments):(B.debug=Function.prototype.bind.call(console.info,console,A.name+":"),B.debug.apply(console,arguments)))},verbose:function(){!A.silent&&A.verbose&&A.debug&&(A.performance?B.performance.log(arguments):(B.verbose=Function.prototype.bind.call(console.info,console,A.name+":"),B.verbose.apply(console,arguments)))},error:function(){A.silent||(B.error=Function.prototype.bind.call(console.error,console,A.name+":"),B.error.apply(console,arguments))},performance:{log:function(e){var t,n;A.performance&&(n=(t=(new Date).getTime())-(s||t),s=t,u.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:T,"Execution Time":n})),clearTimeout(B.performance.timer),B.performance.timer=setTimeout(B.performance.display,500)},display:function(){A.name,s=!1,clearTimeout(B.performance.timer),MK.each(u,(function(e,t){t["Execution Time"]})),(void 0!==console.group||void 0!==console.table)&&0<u.length&&!console.table&&MK.each(u,(function(e,t){t.Name,t["Execution Time"]})),u=[]}},invoke:function(e,n,r){var i,o,a,s=D;return n=n||h,r=T||r,"string"==typeof e&&void 0!==s&&(e=e.split(/[\. ]/),i=e.length-1,MK.each(e,(function(t,n){var r=t!=i?n+e[t+1].charAt(0).toUpperCase()+e[t+1].slice(1):e;if(!MK.isPlainObject(s[r])||t==i)return void 0!==s[r]?(o=s[r],!1):MK.isPlainObject(s[n])&&t!=i?void(s=s[n]):(void 0!==s[n]?o=s[n]:B.error(x.method,e),!1);s=s[r]}))),MK.isFunction(o)?a=o.apply(r,n):void 0!==o&&(a=o),MK.isArray(t)?t.push(a):void 0!==t?t=[t,a]:void 0!==a&&(t=a),o}};l?(void 0===D&&B.initialize(),B.invoke(c)):(void 0!==D&&B.invoke("destroy"),B.initialize())})),void 0!==t?t:this},MK.fn.sidebar.settings={name:"Sidebar",namespace:"sidebar",silent:!1,debug:!1,verbose:!1,performance:!0,transition:"auto",mobileTransition:"auto",defaultTransition:{computer:{left:"uncover",right:"uncover",top:"overlay",bottom:"overlay"},mobile:{left:"uncover",right:"uncover",top:"overlay",bottom:"overlay"}},context:"body",exclusive:!1,closable:!0,dimPage:!0,scrollLock:!1,returnScroll:!1,delaySetup:!1,duration:500,onChange:function(){},onShow:function(){},onHide:function(){},onHidden:function(){},onVisible:function(){},className:{active:"active",animating:"animating",dimmed:"dimmed",ios:"ios",pushable:"pushable",pushed:"pushed",right:"right",top:"top",left:"left",bottom:"bottom",visible:"visible"},selector:{fixed:".fixed",omitted:"script, link, style, .ui.modal, .ui.dimmer, .ui.nag, .ui.fixed",pusher:".pusher",sidebar:".ui.sidebar"},regExp:{ios:/(iPad|iPhone|iPod)/g,mobileChrome:/(CriOS)/g,mobile:/Mobile|iP(hone|od|ad)|Android|BlackBerry|IEMobile|Kindle|NetFront|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune/g},error:{method:"The method you called is not defined.",pusher:"Had to add pusher element. For optimal performance make sure body content is inside a pusher element",movedSidebar:"Had to move sidebar. For optimal performance make sure sidebar and pusher are direct children of your body tag",overlay:"The overlay setting is no longer supported, use animation: overlay",notFound:"There were no elements that matched the specified selector"}},DK=ve.a,BK=window,IK=document,BK=void 0!==BK&&BK.Math==Math?BK:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),DK.fn.sticky=function(e){var t,n=DK(this),r=(n.selector,(new Date).getTime()),i=[],o=e,a="string"==typeof o,s=[].slice.call(arguments,1);return n.each((function(){var n,u,c,l,h=DK.isPlainObject(e)?DK.extend(!0,{},DK.fn.sticky.settings,e):DK.extend({},DK.fn.sticky.settings),f=h.className,d=h.namespace,p=h.error,m="."+d,g="module-"+d,A=DK(this),v=DK(BK),b=DK(h.scrollContext),y=(A.selector,A.data(g)),w=BK.requestAnimationFrame||BK.mozRequestAnimationFrame||BK.webkitRequestAnimationFrame||BK.msRequestAnimationFrame||function(e){setTimeout(e,0)},x=this,C={initialize:function(){C.determineContainer(),C.determineContext(),C.verbose("Initializing sticky",h,n),C.save.positions(),C.checkErrors(),C.bind.events(),h.observeChanges&&C.observeChanges(),C.instantiate()},instantiate:function(){C.verbose("Storing instance of module",C),y=C,A.data(g,C)},destroy:function(){C.verbose("Destroying previous instance"),C.reset(),c&&c.disconnect(),l&&l.disconnect(),v.off("load"+m,C.event.load).off("resize"+m,C.event.resize),b.off("scrollchange"+m,C.event.scrollchange),A.removeData(g)},observeChanges:function(){"MutationObserver"in BK&&(c=new MutationObserver(C.event.documentChanged),l=new MutationObserver(C.event.changed),c.observe(IK,{childList:!0,subtree:!0}),l.observe(x,{childList:!0,subtree:!0}),l.observe(u[0],{childList:!0,subtree:!0}),C.debug("Setting up mutation observer",l))},determineContainer:function(){n=h.container?DK(h.container):A.offsetParent()},determineContext:function(){0===(u=h.context?DK(h.context):n).length&&C.error(p.invalidContext,h.context,A)},checkErrors:function(){C.is.hidden()&&C.error(p.visible,A),C.cache.element.height>C.cache.context.height&&(C.reset(),C.error(p.elementSize,A))},bind:{events:function(){v.on("load"+m,C.event.load).on("resize"+m,C.event.resize),b.off("scroll"+m).on("scroll"+m,C.event.scroll).on("scrollchange"+m,C.event.scrollchange)}},event:{changed:function(e){clearTimeout(C.timer),C.timer=setTimeout((function(){C.verbose("DOM tree modified, updating sticky menu",e),C.refresh()}),100)},documentChanged:function(e){[].forEach.call(e,(function(e){e.removedNodes&&[].forEach.call(e.removedNodes,(function(e){(e==x||0<DK(e).find(x).length)&&(C.debug("Element removed from DOM, tearing down events"),C.destroy())}))}))},load:function(){C.verbose("Page contents finished loading"),w(C.refresh)},resize:function(){C.verbose("Window resized"),w(C.refresh)},scroll:function(){w((function(){b.triggerHandler("scrollchange"+m,b.scrollTop())}))},scrollchange:function(e,t){C.stick(t),h.onScroll.call(x)}},refresh:function(e){C.reset(),h.context||C.determineContext(),e&&C.determineContainer(),C.save.positions(),C.stick(),h.onReposition.call(x)},supports:{sticky:function(){var e=DK("<div/>");return e[0],e.addClass(f.supported),e.css("position").match("sticky")}},save:{lastScroll:function(e){C.lastScroll=e},elementScroll:function(e){C.elementScroll=e},positions:function(){var e={height:b.height()},t={margin:{top:parseInt(A.css("margin-top"),10),bottom:parseInt(A.css("margin-bottom"),10)},offset:A.offset(),width:A.outerWidth(),height:A.outerHeight()},r={offset:u.offset(),height:u.outerHeight()};n.outerHeight(),C.is.standardScroll()||(C.debug("Non-standard scroll. Removing scroll offset from element offset"),e.top=b.scrollTop(),e.left=b.scrollLeft(),t.offset.top+=e.top,r.offset.top+=e.top,t.offset.left+=e.left,r.offset.left+=e.left),C.cache={fits:t.height+h.offset<=e.height,sameHeight:t.height==r.height,scrollContext:{height:e.height},element:{margin:t.margin,top:t.offset.top-t.margin.top,left:t.offset.left,width:t.width,height:t.height,bottom:t.offset.top+t.height},context:{top:r.offset.top,height:r.height,bottom:r.offset.top+r.height}},C.set.containerSize(),C.stick(),C.debug("Caching element positions",C.cache)}},get:{direction:function(e){var t="down";return e=e||b.scrollTop(),void 0!==C.lastScroll&&(C.lastScroll<e?t="down":C.lastScroll>e&&(t="up")),t},scrollChange:function(e){return e=e||b.scrollTop(),C.lastScroll?e-C.lastScroll:0},currentElementScroll:function(){return C.elementScroll||(C.is.top()?Math.abs(parseInt(A.css("top"),10))||0:Math.abs(parseInt(A.css("bottom"),10))||0)},elementScroll:function(e){e=e||b.scrollTop();var t=C.cache.element,n=C.cache.scrollContext;e=C.get.scrollChange(e),t=t.height-n.height+h.offset,n=(n=C.get.currentElementScroll())+e;return C.cache.fits||n<0?0:t<n?t:n}},remove:{lastScroll:function(){delete C.lastScroll},elementScroll:function(e){delete C.elementScroll},minimumSize:function(){n.css("min-height","")},offset:function(){A.css("margin-top","")}},set:{offset:function(){C.verbose("Setting offset on element",h.offset),A.css("margin-top",h.offset)},containerSize:function(){var e=n.get(0).tagName;"HTML"===e||"body"==e?C.determineContainer():((e=Math.max(C.cache.context.height,C.cache.element.height))-n.outerHeight()>h.jitter?(C.debug("Context is taller than container. Specifying exact height for container",C.cache.context.height),n.css({height:e})):n.css({height:""}),Math.abs(n.outerHeight()-C.cache.context.height)>h.jitter&&(C.debug("Context has padding, specifying exact height for container",C.cache.context.height),n.css({height:C.cache.context.height})))},minimumSize:function(){var e=C.cache.element;n.css("min-height",e.height)},scroll:function(e){C.debug("Setting scroll on element",e),C.elementScroll!=e&&(C.is.top()&&A.css("bottom","").css("top",-e),C.is.bottom()&&A.css("top","").css("bottom",e))},size:function(){0!==C.cache.element.height&&0!==C.cache.element.width&&(x.style.setProperty("width",C.cache.element.width+"px","important"),x.style.setProperty("height",C.cache.element.height+"px","important"))}},is:{standardScroll:function(){return b[0]==BK},top:function(){return A.hasClass(f.top)},bottom:function(){return A.hasClass(f.bottom)},initialPosition:function(){return!C.is.fixed()&&!C.is.bound()},hidden:function(){return!A.is(":visible")},bound:function(){return A.hasClass(f.bound)},fixed:function(){return A.hasClass(f.fixed)}},stick:function(e){var t=e||b.scrollTop(),n=(a=C.cache).fits,r=a.sameHeight,i=a.element,o=a.scrollContext,a=a.context,s=(t=(e={top:t+(s=C.is.bottom()&&h.pushing?h.bottomOffset:h.offset),bottom:t+s+o.height},C.get.direction(e.top),n?0:C.get.elementScroll(e.top)),!n);0===i.height||r||(C.is.initialPosition()?e.top>=a.bottom?(C.debug("Initial element position is bottom of container"),C.bindBottom()):e.top>i.top&&(i.height+e.top-t>=a.bottom&&i.height<a.height?(C.debug("Initial element position is bottom of container"),C.bindBottom()):(C.debug("Initial element position is fixed"),C.fixTop())):C.is.fixed()?C.is.top()?e.top<=i.top?(C.debug("Fixed element reached top of container"),C.setInitialPosition()):i.height+e.top-t>=a.bottom?(C.debug("Fixed element reached bottom of container"),C.bindBottom()):s&&(C.set.scroll(t),C.save.lastScroll(e.top),C.save.elementScroll(t)):C.is.bottom()&&(e.bottom-i.height<=i.top?(C.debug("Bottom fixed rail has reached top of container"),C.setInitialPosition()):e.bottom>=a.bottom?(C.debug("Bottom fixed rail has reached bottom of container"),C.bindBottom()):s&&(C.set.scroll(t),C.save.lastScroll(e.top),C.save.elementScroll(t))):C.is.bottom()&&(e.top<=i.top?(C.debug("Jumped from bottom fixed to top fixed, most likely used home/end button"),C.setInitialPosition()):h.pushing?C.is.bound()&&e.bottom<=a.bottom&&(C.debug("Fixing bottom attached element to bottom of browser."),C.fixBottom()):C.is.bound()&&e.top<=a.bottom-i.height&&(C.debug("Fixing bottom attached element to top of browser."),C.fixTop())))},bindTop:function(){C.debug("Binding element to top of parent container"),C.remove.offset(),h.setSize&&C.set.size(),A.css({left:"",top:"",marginBottom:""}).removeClass(f.fixed).removeClass(f.bottom).addClass(f.bound).addClass(f.top),h.onTop.call(x),h.onUnstick.call(x)},bindBottom:function(){C.debug("Binding element to bottom of parent container"),C.remove.offset(),h.setSize&&C.set.size(),A.css({left:"",top:""}).removeClass(f.fixed).removeClass(f.top).addClass(f.bound).addClass(f.bottom),h.onBottom.call(x),h.onUnstick.call(x)},setInitialPosition:function(){C.debug("Returning to initial position"),C.unfix(),C.unbind()},fixTop:function(){C.debug("Fixing element to top of page"),h.setSize&&C.set.size(),C.set.minimumSize(),C.set.offset(),A.css({left:C.cache.element.left,bottom:"",marginBottom:""}).removeClass(f.bound).removeClass(f.bottom).addClass(f.fixed).addClass(f.top),h.onStick.call(x)},fixBottom:function(){C.debug("Sticking element to bottom of page"),h.setSize&&C.set.size(),C.set.minimumSize(),C.set.offset(),A.css({left:C.cache.element.left,bottom:"",marginBottom:""}).removeClass(f.bound).removeClass(f.top).addClass(f.fixed).addClass(f.bottom),h.onStick.call(x)},unbind:function(){C.is.bound()&&(C.debug("Removing container bound position on element"),C.remove.offset(),A.removeClass(f.bound).removeClass(f.top).removeClass(f.bottom))},unfix:function(){C.is.fixed()&&(C.debug("Removing fixed position on element"),C.remove.minimumSize(),C.remove.offset(),A.removeClass(f.fixed).removeClass(f.top).removeClass(f.bottom),h.onUnstick.call(x))},reset:function(){C.debug("Resetting elements position"),C.unbind(),C.unfix(),C.resetCSS(),C.remove.offset(),C.remove.lastScroll()},resetCSS:function(){A.css({width:"",height:""}),n.css({height:""})},setting:function(e,t){if(DK.isPlainObject(e))DK.extend(!0,h,e);else{if(void 0===t)return h[e];h[e]=t}},internal:function(e,t){if(DK.isPlainObject(e))DK.extend(!0,C,e);else{if(void 0===t)return C[e];C[e]=t}},debug:function(){!h.silent&&h.debug&&(h.performance?C.performance.log(arguments):(C.debug=Function.prototype.bind.call(console.info,console,h.name+":"),C.debug.apply(console,arguments)))},verbose:function(){!h.silent&&h.verbose&&h.debug&&(h.performance?C.performance.log(arguments):(C.verbose=Function.prototype.bind.call(console.info,console,h.name+":"),C.verbose.apply(console,arguments)))},error:function(){h.silent||(C.error=Function.prototype.bind.call(console.error,console,h.name+":"),C.error.apply(console,arguments))},performance:{log:function(e){var t,n;h.performance&&(n=(t=(new Date).getTime())-(r||t),r=t,i.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:x,"Execution Time":n})),clearTimeout(C.performance.timer),C.performance.timer=setTimeout(C.performance.display,0)},display:function(){h.name,r=!1,clearTimeout(C.performance.timer),DK.each(i,(function(e,t){t["Execution Time"]})),(void 0!==console.group||void 0!==console.table)&&0<i.length&&!console.table&&DK.each(i,(function(e,t){t.Name,t["Execution Time"]})),i=[]}},invoke:function(e,n,r){var i,o,a,u=y;return n=n||s,r=x||r,"string"==typeof e&&void 0!==u&&(e=e.split(/[\. ]/),i=e.length-1,DK.each(e,(function(t,n){var r=t!=i?n+e[t+1].charAt(0).toUpperCase()+e[t+1].slice(1):e;if(!DK.isPlainObject(u[r])||t==i)return void 0!==u[r]?(o=u[r],!1):DK.isPlainObject(u[n])&&t!=i?void(u=u[n]):void 0!==u[n]&&(o=u[n],!1);u=u[r]}))),DK.isFunction(o)?a=o.apply(r,n):void 0!==o&&(a=o),DK.isArray(t)?t.push(a):void 0!==t?t=[t,a]:void 0!==a&&(t=a),o}};a?(void 0===y&&C.initialize(),C.invoke(o)):(void 0!==y&&y.invoke("destroy"),C.initialize())})),void 0!==t?t:this},DK.fn.sticky.settings={name:"Sticky",namespace:"sticky",silent:!1,debug:!1,verbose:!0,performance:!0,pushing:!1,context:!1,container:!1,scrollContext:BK,offset:0,bottomOffset:0,jitter:5,setSize:!0,observeChanges:!1,onReposition:function(){},onScroll:function(){},onStick:function(){},onUnstick:function(){},onTop:function(){},onBottom:function(){},error:{container:"Sticky element must be inside a relative container",visible:"Element is hidden, you must call refresh after element becomes visible. Use silent setting to surpress this warning in production.",method:"The method you called is not defined.",invalidContext:"Context specified does not exist",elementSize:"Sticky element is larger than its container, cannot create sticky."},className:{bound:"bound",fixed:"fixed",supported:"native",top:"top",bottom:"bottom"}},_K=ve.a,OK=window,TK=document,OK=void 0!==OK&&OK.Math==Math?OK:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),_K.fn.tab=function(e){var t,n=_K.isFunction(this)?_K(OK):_K(this),r=(n.selector,(new Date).getTime()),i=[],o=e,a="string"==typeof o,s=[].slice.call(arguments,1),u=!1;return n.each((function(){var c,l,h,f,d,p=_K.isPlainObject(e)?_K.extend(!0,{},_K.fn.tab.settings,e):_K.extend({},_K.fn.tab.settings),m=p.className,g=p.metadata,A=p.selector,v=p.error,b="."+p.namespace,y="module-"+p.namespace,w=_K(this),x={},C=!0,k=0,E=this,S=w.data(y),_={initialize:function(){_.debug("Initializing tab menu item",w),_.fix.callbacks(),_.determineTabs(),_.debug("Determining tabs",p.context,l),p.auto&&_.set.auto(),_.bind.events(),p.history&&!u&&(_.initializeHistory(),u=!0),_.instantiate()},instantiate:function(){_.verbose("Storing instance of module",_),S=_,w.data(y,_)},destroy:function(){_.debug("Destroying tabs",w),w.removeData(y).off(b)},bind:{events:function(){_K.isWindow(E)||(_.debug("Attaching tab activation events to element",w),w.on("click"+b,_.event.click))}},determineTabs:function(){var e;"parent"===p.context?(0<w.closest(A.ui).length?(e=w.closest(A.ui),_.verbose("Using closest UI element as parent",e)):e=w,c=e.parent(),_.verbose("Determined parent element for creating context",c)):p.context?(c=_K(p.context),_.verbose("Using selector for tab context",p.context,c)):c=_K("body"),p.childrenOnly?(l=c.children(A.tabs),_.debug("Searching tab context children for tabs",c,l)):(l=c.find(A.tabs),_.debug("Searching tab context for tabs",c,l))},fix:{callbacks:function(){_K.isPlainObject(e)&&(e.onTabLoad||e.onTabInit)&&(e.onTabLoad&&(e.onLoad=e.onTabLoad,delete e.onTabLoad,_.error(v.legacyLoad,e.onLoad)),e.onTabInit&&(e.onFirstLoad=e.onTabInit,delete e.onTabInit,_.error(v.legacyInit,e.onFirstLoad)),p=_K.extend(!0,{},_K.fn.tab.settings,e))}},initializeHistory:function(){if(_.debug("Initializing page state"),void 0===_K.address)return _.error(v.state),!1;if("state"==p.historyType){if(_.debug("Using HTML5 to manage state"),!1===p.path)return _.error(v.path),!1;_K.address.history(!0).state(p.path)}_K.address.bind("change",_.event.history.change)},event:{click:function(e){var t=_K(this).data(g.tab);void 0!==t?(p.history?(_.verbose("Updating page state",e),_K.address.value(t)):(_.verbose("Changing tab",e),_.changeTab(t)),e.preventDefault()):_.debug("No tab specified")},history:{change:function(e){var t=e.pathNames.join("/")||_.get.initialPath(),n=p.templates.determineTitle(t)||!1;_.performance.display(),_.debug("History change event",t,e),d=e,void 0!==t&&_.changeTab(t),n&&_K.address.title(n)}}},refresh:function(){h&&(_.debug("Refreshing tab",h),_.changeTab(h))},cache:{read:function(e){return void 0!==e&&x[e]},add:function(e,t){e=e||h,_.debug("Adding cached content for",e),x[e]=t},remove:function(e){e=e||h,_.debug("Removing cached content for",e),delete x[e]}},set:{auto:function(){var e="string"==typeof p.path?p.path.replace(/\/$/,"")+"/{$tab}":"/{$tab}";_.verbose("Setting up automatic tab retrieval from server",e),_K.isPlainObject(p.apiSettings)?p.apiSettings.url=e:p.apiSettings={url:e}},loading:function(e){var t=_.get.tabElement(e);t.hasClass(m.loading)||(_.verbose("Setting loading state for",t),t.addClass(m.loading).siblings(l).removeClass(m.active+" "+m.loading),0<t.length&&p.onRequest.call(t[0],e))},state:function(e){_K.address.value(e)}},changeTab:function(e){var t=OK.history&&OK.history.pushState&&p.ignoreFirstLoad&&C,n=p.auto||_K.isPlainObject(p.apiSettings),r=n&&!t?_.utilities.pathToArray(e):_.get.defaultPathArray(e);e=_.utilities.arrayToPath(r),_K.each(r,(function(i,o){var a,s,u=r.slice(0,i+1),l=_.utilities.arrayToPath(u),A=_.is.tab(l),b=i+1==r.length,y=_.get.tabElement(l);return _.verbose("Looking for tab",o),A?(_.verbose("Tab was found",o),h=l,f=_.utilities.filterArray(r,u),b?s=!0:(A=r.slice(0,i+2),o=_.utilities.arrayToPath(A),(s=!_.is.tab(o))&&_.verbose("Tab parameters found",A)),s&&n?(t?(_.debug("Ignoring remote content on first tab load",l),C=!1,_.cache.add(e,y.html()),_.activate.all(l),p.onFirstLoad.call(y[0],l,f,d),p.onLoad.call(y[0],l,f,d)):(_.activate.navigation(l),_.fetch.content(l,e)),!1):(_.debug("Opened local tab",l),_.activate.all(l),_.cache.read(l)||(_.cache.add(l,!0),_.debug("First time tab loaded calling tab init"),p.onFirstLoad.call(y[0],l,f,d)),void p.onLoad.call(y[0],l,f,d))):-1!=e.search("/")||""===e?(_.error(v.missingTab,w,c,l),!1):(l=(a=_K("#"+e+', a[name="'+e+'"]')).closest("[data-tab]").data(g.tab),y=_.get.tabElement(l),a&&0<a.length&&l?(_.debug("Anchor link used, opening parent tab",y,a),y.hasClass(m.active)||setTimeout((function(){_.scrollTo(a)}),0),_.activate.all(l),_.cache.read(l)||(_.cache.add(l,!0),_.debug("First time tab loaded calling tab init"),p.onFirstLoad.call(y[0],l,f,d)),p.onLoad.call(y[0],l,f,d),!1):void 0)}))},scrollTo:function(e){var t=!!(e&&0<e.length)&&e.offset().top;!1!==t&&(_.debug("Forcing scroll to an in-page link in a hidden tab",t,e),_K(TK).scrollTop(t))},update:{content:function(e,t,n){var r=_.get.tabElement(e),i=r[0];n=void 0!==n?n:p.evaluateScripts,"string"==typeof p.cacheType&&"dom"==p.cacheType.toLowerCase()&&"string"!=typeof t?r.empty().append(_K(t).clone(!0)):n?(_.debug("Updating HTML and evaluating inline scripts",e,t),r.html(t)):(_.debug("Updating HTML",e,t),i.innerHTML=t)}},fetch:{content:function(e,t){var n,r=_.get.tabElement(e),i={dataType:"html",encodeParameters:!1,on:"now",cache:p.alwaysRefresh,headers:{"X-Remote":!0},onSuccess:function(n){"response"==p.cacheType&&_.cache.add(t,n),_.update.content(e,n),e==h?(_.debug("Content loaded",e),_.activate.tab(e)):_.debug("Content loaded in background",e),p.onFirstLoad.call(r[0],e,f,d),p.onLoad.call(r[0],e,f,d),p.loadOnce?_.cache.add(t,!0):"string"==typeof p.cacheType&&"dom"==p.cacheType.toLowerCase()&&0<r.children().length?setTimeout((function(){var e=(e=r.children().clone(!0)).not("script");_.cache.add(t,e)}),0):_.cache.add(t,r.html())},urlData:{tab:t}},o=(o=r.api("get request")||!1)&&"pending"===o.state();t=t||e,n=_.cache.read(t),p.cache&&n?(_.activate.tab(e),_.debug("Adding cached content",t),p.loadOnce||("once"==p.evaluateScripts?_.update.content(e,n,!1):_.update.content(e,n)),p.onLoad.call(r[0],e,f,d)):o?(_.set.loading(e),_.debug("Content is already loading",t)):void 0!==_K.api?(n=_K.extend(!0,{},p.apiSettings,i),_.debug("Retrieving remote content",t,n),_.set.loading(e),r.api(n)):_.error(v.api)}},activate:{all:function(e){_.activate.tab(e),_.activate.navigation(e)},tab:function(e){var t=_.get.tabElement(e),n="siblings"==p.deactivate?t.siblings(l):l.not(t),r=t.hasClass(m.active);_.verbose("Showing tab content for",t),r||(t.addClass(m.active),n.removeClass(m.active+" "+m.loading),0<t.length&&p.onVisible.call(t[0],e))},navigation:function(e){var t=_.get.navElement(e),r="siblings"==p.deactivate?t.siblings(n):n.not(t),i=t.hasClass(m.active);_.verbose("Activating tab navigation for",t,e),i||(t.addClass(m.active),r.removeClass(m.active+" "+m.loading))}},deactivate:{all:function(){_.deactivate.navigation(),_.deactivate.tabs()},navigation:function(){n.removeClass(m.active)},tabs:function(){l.removeClass(m.active+" "+m.loading)}},is:{tab:function(e){return void 0!==e&&0<_.get.tabElement(e).length}},get:{initialPath:function(){return n.eq(0).data(g.tab)||l.eq(0).data(g.tab)},path:function(){return _K.address.value()},defaultPathArray:function(e){return _.utilities.pathToArray(_.get.defaultPath(e))},defaultPath:function(e){var t=n.filter("[data-"+g.tab+'^="'+e+'/"]').eq(0).data(g.tab)||!1;if(t){if(_.debug("Found default tab",t),k<p.maxDepth)return k++,_.get.defaultPath(t);_.error(v.recursion)}else _.debug("No default tabs found for",e,l);return k=0,e},navElement:function(e){return e=e||h,n.filter("[data-"+g.tab+'="'+e+'"]')},tabElement:function(e){var t;return e=e||h,t=_.utilities.pathToArray(e),t=_.utilities.last(t),e=l.filter("[data-"+g.tab+'="'+e+'"]'),t=l.filter("[data-"+g.tab+'="'+t+'"]'),0<e.length?e:t},tab:function(){return h}},utilities:{filterArray:function(e,t){return _K.grep(e,(function(e){return-1==_K.inArray(e,t)}))},last:function(e){return!!_K.isArray(e)&&e[e.length-1]},pathToArray:function(e){return"string"==typeof(e=void 0===e?h:e)?e.split("/"):[e]},arrayToPath:function(e){return!!_K.isArray(e)&&e.join("/")}},setting:function(e,t){if(_.debug("Changing setting",e,t),_K.isPlainObject(e))_K.extend(!0,p,e);else{if(void 0===t)return p[e];_K.isPlainObject(p[e])?_K.extend(!0,p[e],t):p[e]=t}},internal:function(e,t){if(_K.isPlainObject(e))_K.extend(!0,_,e);else{if(void 0===t)return _[e];_[e]=t}},debug:function(){!p.silent&&p.debug&&(p.performance?_.performance.log(arguments):(_.debug=Function.prototype.bind.call(console.info,console,p.name+":"),_.debug.apply(console,arguments)))},verbose:function(){!p.silent&&p.verbose&&p.debug&&(p.performance?_.performance.log(arguments):(_.verbose=Function.prototype.bind.call(console.info,console,p.name+":"),_.verbose.apply(console,arguments)))},error:function(){p.silent||(_.error=Function.prototype.bind.call(console.error,console,p.name+":"),_.error.apply(console,arguments))},performance:{log:function(e){var t,n;p.performance&&(n=(t=(new Date).getTime())-(r||t),r=t,i.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:E,"Execution Time":n})),clearTimeout(_.performance.timer),_.performance.timer=setTimeout(_.performance.display,500)},display:function(){p.name,r=!1,clearTimeout(_.performance.timer),_K.each(i,(function(e,t){t["Execution Time"]})),(void 0!==console.group||void 0!==console.table)&&0<i.length&&!console.table&&_K.each(i,(function(e,t){t.Name,t["Execution Time"]})),i=[]}},invoke:function(e,n,r){var i,o,a,u=S;return n=n||s,r=E||r,"string"==typeof e&&void 0!==u&&(e=e.split(/[\. ]/),i=e.length-1,_K.each(e,(function(t,n){var r=t!=i?n+e[t+1].charAt(0).toUpperCase()+e[t+1].slice(1):e;if(!_K.isPlainObject(u[r])||t==i)return void 0!==u[r]?(o=u[r],!1):_K.isPlainObject(u[n])&&t!=i?void(u=u[n]):(void 0!==u[n]?o=u[n]:_.error(v.method,e),!1);u=u[r]}))),_K.isFunction(o)?a=o.apply(r,n):void 0!==o&&(a=o),_K.isArray(t)?t.push(a):void 0!==t?t=[t,a]:void 0!==a&&(t=a),o}};a?(void 0===S&&_.initialize(),_.invoke(o)):(void 0!==S&&S.invoke("destroy"),_.initialize())})),void 0!==t?t:this},_K.tab=function(){_K(OK).tab.apply(this,arguments)},_K.fn.tab.settings={name:"Tab",namespace:"tab",silent:!1,debug:!1,verbose:!1,performance:!0,auto:!1,history:!1,historyType:"hash",path:!1,context:!1,childrenOnly:!1,maxDepth:25,deactivate:"siblings",alwaysRefresh:!1,cache:!0,loadOnce:!1,cacheType:"response",ignoreFirstLoad:!1,apiSettings:!1,evaluateScripts:"once",onFirstLoad:function(e,t,n){},onLoad:function(e,t,n){},onVisible:function(e,t,n){},onRequest:function(e,t,n){},templates:{determineTitle:function(e){}},error:{api:"You attempted to load content without API module",method:"The method you called is not defined",missingTab:"Activated tab cannot be found. Tabs are case-sensitive.",noContent:"The tab you specified is missing a content url.",path:"History enabled, but no path was specified",recursion:"Max recursive depth reached",legacyInit:"onTabInit has been renamed to onFirstLoad in 2.0, please adjust your code.",legacyLoad:"onTabLoad has been renamed to onLoad in 2.0. Please adjust your code",state:"History requires Asual's Address library <https://github.com/asual/jquery-address>"},metadata:{tab:"tab",loaded:"loaded",promise:"promise"},className:{loading:"loading",active:"active"},selector:{tabs:".ui.tab",ui:".ui"}},kK=ve.a,EK=window,SK=document,EK=void 0!==EK&&EK.Math==Math?EK:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),kK.fn.transition=function(){var e,t=kK(this),n=(t.selector,(new Date).getTime()),r=[],i=arguments,o=i[0],a=[].slice.call(arguments,1),s="string"==typeof o;return EK.requestAnimationFrame||EK.mozRequestAnimationFrame||EK.webkitRequestAnimationFrame||EK.msRequestAnimationFrame,t.each((function(u){var c,l,h,f,d,p,m,g,A,v=kK(this),b=this;(A={initialize:function(){c=A.get.settings.apply(b,i),f=c.className,h=c.error,d=c.metadata,g="."+c.namespace,m="module-"+c.namespace,l=v.data(m)||A,p=A.get.animationEndEvent(),!1===(s=s&&A.invoke(o))&&(A.verbose("Converted arguments into settings object",c),c.interval?A.delay(c.animate):A.animate(),A.instantiate())},instantiate:function(){A.verbose("Storing instance of module",A),l=A,v.data(m,l)},destroy:function(){A.verbose("Destroying previous module for",b),v.removeData(m)},refresh:function(){A.verbose("Refreshing display type on next animation"),delete A.displayType},forceRepaint:function(){A.verbose("Forcing element repaint");var e=v.parent(),t=v.next();0===t.length?v.detach().appendTo(e):v.detach().insertBefore(t)},repaint:function(){A.verbose("Repainting element"),b.offsetWidth},delay:function(e){var n=(n=A.get.animationDirection())||(A.can.transition()?A.get.direction():"static");e=void 0!==e?e:c.interval,e="auto"==c.reverse&&n==f.outward||1==c.reverse?(t.length-u)*c.interval:u*c.interval,A.debug("Delaying animation by",e),setTimeout(A.animate,e)},animate:function(e){if(c=e||c,!A.is.supported())return A.error(h.support),!1;if(A.debug("Preparing animation",c.animation),A.is.animating()){if(c.queue)return!c.allowRepeats&&A.has.direction()&&A.is.occurring()&&!0!==A.queuing?A.debug("Animation is currently occurring, preventing queueing same animation",c.animation):A.queue(c.animation),!1;if(!c.allowRepeats&&A.is.occurring())return A.debug("Animation is already occurring, will not execute repeated animation",c.animation),!1;A.debug("New animation started, completing previous early",c.animation),l.complete()}A.can.animate()?A.set.animating(c.animation):A.error(h.noAnimation,c.animation,b)},reset:function(){A.debug("Resetting animation to beginning conditions"),A.remove.animationCallbacks(),A.restore.conditions(),A.remove.animating()},queue:function(e){A.debug("Queueing animation of",e),A.queuing=!0,v.one(p+".queue"+g,(function(){A.queuing=!1,A.repaint(),A.animate.apply(this,c)}))},complete:function(e){A.debug("Animation complete",c.animation),A.remove.completeCallback(),A.remove.failSafe(),A.is.looping()||(A.is.outward()?(A.verbose("Animation is outward, hiding element"),A.restore.conditions(),A.hide()):A.is.inward()?(A.verbose("Animation is outward, showing element"),A.restore.conditions(),A.show()):(A.verbose("Static animation completed"),A.restore.conditions(),c.onComplete.call(b)))},force:{visible:function(){var e=v.attr("style"),t=A.get.userStyle(),n=A.get.displayType();t=t+"display: "+n+" !important;",e=void 0===e||""===e;v.css("display")!==n?(A.verbose("Overriding default display to show element",n),v.attr("style",t)):e&&v.removeAttr("style")},hidden:function(){var e=void 0===(e=v.attr("style"))||""===e;"none"===v.css("display")||A.is.hidden()?e&&v.removeAttr("style"):(A.verbose("Overriding default display to hide element"),v.css("display","none"))}},has:{direction:function(e){var t=!1;return"string"==typeof(e=e||c.animation)&&(e=e.split(" "),kK.each(e,(function(e,n){n!==f.inward&&n!==f.outward||(t=!0)}))),t},inlineDisplay:function(){var e=v.attr("style")||"";return kK.isArray(e.match(/display.*?;/,""))}},set:{animating:function(e){A.remove.completeCallback(),e=e||c.animation,e=A.get.animationClass(e),A.save.animation(e),A.force.visible(),A.remove.hidden(),A.remove.direction(),A.start.animation(e)},duration:function(e,t){!(t="number"==typeof(t=t||c.duration)?t+"ms":t)&&0!==t||(A.verbose("Setting animation duration",t),v.css({"animation-duration":t}))},direction:function(e){(e=e||A.get.direction())==f.inward?A.set.inward():A.set.outward()},looping:function(){A.debug("Transition set to loop"),v.addClass(f.looping)},hidden:function(){v.addClass(f.transition).addClass(f.hidden)},inward:function(){A.debug("Setting direction to inward"),v.removeClass(f.outward).addClass(f.inward)},outward:function(){A.debug("Setting direction to outward"),v.removeClass(f.inward).addClass(f.outward)},visible:function(){v.addClass(f.transition).addClass(f.visible)}},start:{animation:function(e){e=e||A.get.animationClass(),A.debug("Starting tween",e),v.addClass(e).one(p+".complete"+g,A.complete),c.useFailSafe&&A.add.failSafe(),A.set.duration(c.duration),c.onStart.call(b)}},save:{animation:function(e){A.cache||(A.cache={}),A.cache.animation=e},displayType:function(e){"none"!==e&&v.data(d.displayType,e)},transitionExists:function(e,t){kK.fn.transition.exists[e]=t,A.verbose("Saving existence of transition",e,t)}},restore:{conditions:function(){var e=A.get.currentAnimation();e&&(v.removeClass(e),A.verbose("Removing animation class",A.cache)),A.remove.duration()}},add:{failSafe:function(){var e=A.get.duration();A.timer=setTimeout((function(){v.triggerHandler(p)}),e+c.failSafeDelay),A.verbose("Adding fail safe timer",A.timer)}},remove:{animating:function(){v.removeClass(f.animating)},animationCallbacks:function(){A.remove.queueCallback(),A.remove.completeCallback()},queueCallback:function(){v.off(".queue"+g)},completeCallback:function(){v.off(".complete"+g)},display:function(){v.css("display","")},direction:function(){v.removeClass(f.inward).removeClass(f.outward)},duration:function(){v.css("animation-duration","")},failSafe:function(){A.verbose("Removing fail safe timer",A.timer),A.timer&&clearTimeout(A.timer)},hidden:function(){v.removeClass(f.hidden)},visible:function(){v.removeClass(f.visible)},looping:function(){A.debug("Transitions are no longer looping"),A.is.looping()&&(A.reset(),v.removeClass(f.looping))},transition:function(){v.removeClass(f.visible).removeClass(f.hidden)}},get:{settings:function(e,t,n){return"object"==typeof e?kK.extend(!0,{},kK.fn.transition.settings,e):"function"==typeof n?kK.extend({},kK.fn.transition.settings,{animation:e,onComplete:n,duration:t}):"string"==typeof t||"number"==typeof t?kK.extend({},kK.fn.transition.settings,{animation:e,duration:t}):"object"==typeof t?kK.extend({},kK.fn.transition.settings,t,{animation:e}):"function"==typeof t?kK.extend({},kK.fn.transition.settings,{animation:e,onComplete:t}):kK.extend({},kK.fn.transition.settings,{animation:e})},animationClass:function(e){e=e||c.animation;var t=A.can.transition()&&!A.has.direction()?A.get.direction()+" ":"";return f.animating+" "+f.transition+" "+t+e},currentAnimation:function(){return!(!A.cache||void 0===A.cache.animation)&&A.cache.animation},currentDirection:function(){return A.is.inward()?f.inward:f.outward},direction:function(){return A.is.hidden()||!A.is.visible()?f.inward:f.outward},animationDirection:function(e){var t;return"string"==typeof(e=e||c.animation)&&(e=e.split(" "),kK.each(e,(function(e,n){n===f.inward?t=f.inward:n===f.outward&&(t=f.outward)}))),t||!1},duration:function(e){return"string"==typeof(e=!1===(e=e||c.duration)?v.css("animation-duration")||0:e)?-1<e.indexOf("ms")?parseFloat(e):1e3*parseFloat(e):e},displayType:function(e){return e=void 0===e||e,c.displayType||(e&&void 0===v.data(d.displayType)&&A.can.transition(!0),v.data(d.displayType))},userStyle:function(e){return(e=e||v.attr("style")||"").replace(/display.*?;/,"")},transitionExists:function(e){return kK.fn.transition.exists[e]},animationStartEvent:function(){var e,t=SK.createElement("div"),n={animation:"animationstart",OAnimation:"oAnimationStart",MozAnimation:"mozAnimationStart",WebkitAnimation:"webkitAnimationStart"};for(e in n)if(void 0!==t.style[e])return n[e];return!1},animationEndEvent:function(){var e,t=SK.createElement("div"),n={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"mozAnimationEnd",WebkitAnimation:"webkitAnimationEnd"};for(e in n)if(void 0!==t.style[e])return n[e];return!1}},can:{transition:function(e){var t,n,r,i,o=c.animation,a=A.get.transitionExists(o),s=A.get.displayType(!1);if(void 0===a||e){if(A.verbose("Determining whether animation exists"),e=v.attr("class"),t=v.prop("tagName"),n=(t=kK("<"+t+" />").addClass(e).insertAfter(v)).addClass(o).removeClass(f.inward).removeClass(f.outward).addClass(f.animating).addClass(f.transition).css("animationName"),r=t.addClass(f.inward).css("animationName"),s||(s=t.attr("class",e).removeAttr("style").removeClass(f.hidden).removeClass(f.visible).show().css("display"),A.verbose("Determining final display state",s),A.save.displayType(s)),t.remove(),n!=r)A.debug("Direction exists for animation",o),i=!0;else{if("none"==n||!n)return void A.debug("No animation defined in css",o);A.debug("Static animation found",o,s),i=!1}A.save.transitionExists(o,i)}return void 0!==a?a:i},animate:function(){return void 0!==A.can.transition()}},is:{animating:function(){return v.hasClass(f.animating)},inward:function(){return v.hasClass(f.inward)},outward:function(){return v.hasClass(f.outward)},looping:function(){return v.hasClass(f.looping)},occurring:function(e){return e="."+(e=e||c.animation).replace(" ","."),0<v.filter(e).length},visible:function(){return v.is(":visible")},hidden:function(){return"hidden"===v.css("visibility")},supported:function(){return!1!==p}},hide:function(){A.verbose("Hiding element"),A.is.animating()&&A.reset(),b.blur(),A.remove.display(),A.remove.visible(),A.set.hidden(),A.force.hidden(),c.onHide.call(b),c.onComplete.call(b)},show:function(e){A.verbose("Showing element",e),A.remove.hidden(),A.set.visible(),A.force.visible(),c.onShow.call(b),c.onComplete.call(b)},toggle:function(){A.is.visible()?A.hide():A.show()},stop:function(){A.debug("Stopping current animation"),v.triggerHandler(p)},stopAll:function(){A.debug("Stopping all animation"),A.remove.queueCallback(),v.triggerHandler(p)},clear:{queue:function(){A.debug("Clearing animation queue"),A.remove.queueCallback()}},enable:function(){A.verbose("Starting animation"),v.removeClass(f.disabled)},disable:function(){A.debug("Stopping animation"),v.addClass(f.disabled)},setting:function(e,t){if(A.debug("Changing setting",e,t),kK.isPlainObject(e))kK.extend(!0,c,e);else{if(void 0===t)return c[e];kK.isPlainObject(c[e])?kK.extend(!0,c[e],t):c[e]=t}},internal:function(e,t){if(kK.isPlainObject(e))kK.extend(!0,A,e);else{if(void 0===t)return A[e];A[e]=t}},debug:function(){!c.silent&&c.debug&&(c.performance?A.performance.log(arguments):(A.debug=Function.prototype.bind.call(console.info,console,c.name+":"),A.debug.apply(console,arguments)))},verbose:function(){!c.silent&&c.verbose&&c.debug&&(c.performance?A.performance.log(arguments):(A.verbose=Function.prototype.bind.call(console.info,console,c.name+":"),A.verbose.apply(console,arguments)))},error:function(){c.silent||(A.error=Function.prototype.bind.call(console.error,console,c.name+":"),A.error.apply(console,arguments))},performance:{log:function(e){var t,i;c.performance&&(i=(t=(new Date).getTime())-(n||t),n=t,r.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:b,"Execution Time":i})),clearTimeout(A.performance.timer),A.performance.timer=setTimeout(A.performance.display,500)},display:function(){c.name,n=!1,clearTimeout(A.performance.timer),kK.each(r,(function(e,t){t["Execution Time"]})),1<t.length&&t.length,(void 0!==console.group||void 0!==console.table)&&0<r.length&&!console.table&&kK.each(r,(function(e,t){t.Name,t["Execution Time"]})),r=[]}},invoke:function(t,n,r){var i,o,s,u=l;return n=n||a,r=b||r,"string"==typeof t&&void 0!==u&&(t=t.split(/[\. ]/),i=t.length-1,kK.each(t,(function(e,n){var r=e!=i?n+t[e+1].charAt(0).toUpperCase()+t[e+1].slice(1):t;if(!kK.isPlainObject(u[r])||e==i)return void 0!==u[r]?(o=u[r],!1):kK.isPlainObject(u[n])&&e!=i?void(u=u[n]):void 0!==u[n]&&(o=u[n],!1);u=u[r]}))),kK.isFunction(o)?s=o.apply(r,n):void 0!==o&&(s=o),kK.isArray(e)?e.push(s):void 0!==e?e=[e,s]:void 0!==s&&(e=s),void 0!==o&&o}}).initialize()})),void 0!==e?e:this},kK.fn.transition.exists={},kK.fn.transition.settings={name:"Transition",silent:!1,debug:!1,verbose:!1,performance:!0,namespace:"transition",interval:0,reverse:"auto",onStart:function(){},onComplete:function(){},onShow:function(){},onHide:function(){},useFailSafe:!0,failSafeDelay:100,allowRepeats:!1,displayType:!1,animation:"fade",duration:!1,queue:!0,metadata:{displayType:"display"},className:{animating:"animating",disabled:"disabled",hidden:"hidden",inward:"in",loading:"loading",looping:"looping",outward:"out",transition:"transition",visible:"visible"},error:{noAnimation:"Element is no longer attached to DOM. Unable to animate.  Use silent setting to surpress this warning in production.",repeated:"That animation is already occurring, cancelling repeated animation",method:"The method you called is not defined",support:"This browser does not support CSS animations"}},xK=ve.a,CK=window,document,CK=void 0!==CK&&CK.Math==Math?CK:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),xK.api=xK.fn.api=function(e){var t,n=xK.isFunction(this)?xK(CK):xK(this),r=(n.selector,(new Date).getTime()),i=[],o=e,a="string"==typeof o,s=[].slice.call(arguments,1);return n.each((function(){var n,u,c,l,h=xK.isPlainObject(e)?xK.extend(!0,{},xK.fn.api.settings,e):xK.extend({},xK.fn.api.settings),f=h.namespace,d=h.metadata,p=h.selector,m=h.error,g=h.className,A="."+f,v="module-"+f,b=xK(this),y=b.closest(p.form),w=h.stateContext?xK(h.stateContext):b,x=this,C=w[0],k=b.data(v),E={initialize:function(){a||E.bind.events(),E.instantiate()},instantiate:function(){E.verbose("Storing instance of module",E),k=E,b.data(v,k)},destroy:function(){E.verbose("Destroying previous module for",x),b.removeData(v).off(A)},bind:{events:function(){var e=E.get.event();e?(E.verbose("Attaching API events to element",e),b.on(e+A,E.event.trigger)):"now"==h.on&&(E.debug("Querying API endpoint immediately"),E.query())}},decode:{json:function(e){if(void 0!==e&&"string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}},read:{cachedResponse:function(e){var t;if(void 0!==CK.Storage)return t=sessionStorage.getItem(e),E.debug("Using cached response",e,t),E.decode.json(t);E.error(m.noStorage)}},write:{cachedResponse:function(e,t){t&&""===t?E.debug("Response empty, not caching",t):void 0!==CK.Storage?(xK.isPlainObject(t)&&(t=JSON.stringify(t)),sessionStorage.setItem(e,t),E.verbose("Storing cached response for url",e,t)):E.error(m.noStorage)}},query:function(){if(E.is.disabled())E.debug("Element is disabled API request aborted");else{if(E.is.loading()){if(!h.interruptRequests)return void E.debug("Cancelling request, previous request is still pending");E.debug("Interrupting previous request"),E.abort()}h.defaultData&&xK.extend(!0,h.urlData,E.get.defaultData()),h.serializeForm&&(h.data=E.add.formData(h.data)),!1===(u=E.get.settings())?(E.cancelled=!0,E.error(m.beforeSend)):(E.cancelled=!1,(c=E.get.templatedURL())||E.is.mocked()?((c=E.add.urlData(c))||E.is.mocked())&&(u.url=h.base+c,n=xK.extend(!0,{},h,{type:h.method||h.type,data:void 0,url:h.base+c,beforeSend:h.beforeXHR,success:function(){},failure:function(){},complete:function(){}}),E.debug("Querying URL",n.url),E.verbose("Using AJAX settings",n),"local"===h.cache&&E.read.cachedResponse(c)?(E.debug("Response returned from local cache"),E.request=E.create.request(),E.request.resolveWith(C,[E.read.cachedResponse(c)])):h.throttle?h.throttleFirstRequest||E.timer?(E.debug("Throttling request",h.throttle),clearTimeout(E.timer),E.timer=setTimeout((function(){E.timer&&delete E.timer,E.debug("Sending throttled request",void 0,n.method),E.send.request()}),h.throttle)):(E.debug("Sending request",void 0,n.method),E.send.request(),E.timer=setTimeout((function(){}),h.throttle)):(E.debug("Sending request",void 0,n.method),E.send.request())):E.error(m.missingURL))}},should:{removeError:function(){return!0===h.hideError||"auto"===h.hideError&&!E.is.form()}},is:{disabled:function(){return 0<b.filter(p.disabled).length},expectingJSON:function(){return"json"===h.dataType||"jsonp"===h.dataType},form:function(){return b.is("form")||w.is("form")},mocked:function(){return h.mockResponse||h.mockResponseAsync||h.response||h.responseAsync},input:function(){return b.is("input")},loading:function(){return!!E.request&&"pending"==E.request.state()},abortedRequest:function(e){return e&&void 0!==e.readyState&&0===e.readyState?(E.verbose("XHR request determined to be aborted"),!0):(E.verbose("XHR request was not aborted"),!1)},validResponse:function(e){return E.is.expectingJSON()&&xK.isFunction(h.successTest)?(E.debug("Checking JSON returned success",h.successTest,e),h.successTest(e)?(E.debug("Response passed success test",e),!0):(E.debug("Response failed success test",e),!1)):(E.verbose("Response is not JSON, skipping validation",h.successTest,e),!0)}},was:{cancelled:function(){return E.cancelled||!1},succesful:function(){return E.request&&"resolved"==E.request.state()},failure:function(){return E.request&&"rejected"==E.request.state()},complete:function(){return E.request&&("resolved"==E.request.state()||"rejected"==E.request.state())}},add:{urlData:function(e,t){var n,r;return e&&(n=e.match(h.regExp.required),r=e.match(h.regExp.optional),t=t||h.urlData,n&&(E.debug("Looking for required URL variables",n),xK.each(n,(function(n,r){var i=-1!==r.indexOf("$")?r.substr(2,r.length-3):r.substr(1,r.length-2),o=xK.isPlainObject(t)&&void 0!==t[i]?t[i]:void 0!==b.data(i)?b.data(i):void 0!==w.data(i)?w.data(i):t[i];if(void 0===o)return E.error(m.requiredParameter,i,e),e=!1;E.verbose("Found required variable",i,o),o=h.encodeParameters?E.get.urlEncodedValue(o):o,e=e.replace(r,o)}))),r&&(E.debug("Looking for optional URL variables",n),xK.each(r,(function(n,r){var i=-1!==r.indexOf("$")?r.substr(3,r.length-4):r.substr(2,r.length-3),o=xK.isPlainObject(t)&&void 0!==t[i]?t[i]:void 0!==b.data(i)?b.data(i):void 0!==w.data(i)?w.data(i):t[i];e=void 0!==o?(E.verbose("Optional variable Found",i,o),e.replace(r,o)):(E.verbose("Optional variable not found",i),-1!==e.indexOf("/"+r)?e.replace("/"+r,""):e.replace(r,""))})))),e},formData:function(e){var t=void 0!==xK.fn.serializeObject,n=t?y.serializeObject():y.serialize();return e=e||h.data,xK.isPlainObject(e)?t?(E.debug("Extending existing data with form data",e,n),xK.extend(!0,{},e,n)):(E.error(m.missingSerialize),E.debug("Cant extend data. Replacing data with form data",e,n),n):(E.debug("Adding form data",n),n)}},send:{request:function(){E.set.loading(),E.request=E.create.request(),E.is.mocked()?E.mockedXHR=E.create.mockedXHR():E.xhr=E.create.xhr(),h.onRequest.call(C,E.request,E.xhr)}},event:{trigger:function(e){E.query(),"submit"!=e.type&&"click"!=e.type||e.preventDefault()},xhr:{always:function(){},done:function(e,t,n){var r=this,i=(new Date).getTime()-l,o=(i=h.loadingDuration-i,!!xK.isFunction(h.onResponse)&&(E.is.expectingJSON()?h.onResponse.call(r,xK.extend(!0,{},e)):h.onResponse.call(r,e)));i=0<i?i:0;o&&(E.debug("Modified API response in onResponse callback",h.onResponse,o,e),e=o),0<i&&E.debug("Response completed early delaying state change by",i),setTimeout((function(){E.is.validResponse(e)?E.request.resolveWith(r,[e,n]):E.request.rejectWith(r,[n,"invalid"])}),i)},fail:function(e,t,n){var r=this,i=(new Date).getTime()-l;0<(i=0<(i=h.loadingDuration-i)?i:0)&&E.debug("Response completed early delaying state change by",i),setTimeout((function(){E.is.abortedRequest(e)?E.request.rejectWith(r,[e,"aborted",n]):E.request.rejectWith(r,[e,"error",t,n])}),i)}},request:{done:function(e,t){E.debug("Successful API Response",e),"local"===h.cache&&c&&(E.write.cachedResponse(c,e),E.debug("Saving server response locally",E.cache)),h.onSuccess.call(C,e,b,t)},complete:function(e,t){var n,r;E.was.succesful()?(r=e,n=t):r=E.get.responseFromXHR(n=e),E.remove.loading(),h.onComplete.call(C,r,b,n)},fail:function(e,t,r){var i=E.get.responseFromXHR(e),o=E.get.errorFromRequest(i,t,r);if("aborted"==t)return E.debug("XHR Aborted (Most likely caused by page navigation or CORS Policy)",t,r),h.onAbort.call(C,t,b,e),!0;"invalid"==t?E.debug("JSON did not pass success test. A server-side error has most likely occurred",i):"error"==t&&void 0!==e&&(E.debug("XHR produced a server error",t,r),200!=e.status&&void 0!==r&&""!==r&&E.error(m.statusMessage+r,n.url),h.onError.call(C,o,b,e)),h.errorDuration&&"aborted"!==t&&(E.debug("Adding error state"),E.set.error(),E.should.removeError()&&setTimeout(E.remove.error,h.errorDuration)),E.debug("API Request failed",o,e),h.onFailure.call(C,i,b,e)}}},create:{request:function(){return xK.Deferred().always(E.event.request.complete).done(E.event.request.done).fail(E.event.request.fail)},mockedXHR:function(){var e=h.mockResponse||h.response,t=h.mockResponseAsync||h.responseAsync,n=xK.Deferred().always(E.event.xhr.complete).done(E.event.xhr.done).fail(E.event.xhr.fail);return e?(e=xK.isFunction(e)?(E.debug("Using specified synchronous callback",e),e.call(C,u)):(E.debug("Using settings specified response",e),e),n.resolveWith(C,[e,!1,{responseText:e}])):xK.isFunction(t)&&(e=function(e){E.debug("Async callback returned response",e),e?n.resolveWith(C,[e,!1,{responseText:e}]):n.rejectWith(C,[{responseText:e},!1,!1])},E.debug("Using specified async response callback",t),t.call(C,u,e)),n},xhr:function(){var e=xK.ajax(n).always(E.event.xhr.always).done(E.event.xhr.done).fail(E.event.xhr.fail);return E.verbose("Created server request",e,n),e}},set:{error:function(){E.verbose("Adding error state to element",w),w.addClass(g.error)},loading:function(){E.verbose("Adding loading state to element",w),w.addClass(g.loading),l=(new Date).getTime()}},remove:{error:function(){E.verbose("Removing error state from element",w),w.removeClass(g.error)},loading:function(){E.verbose("Removing loading state from element",w),w.removeClass(g.loading)}},get:{responseFromXHR:function(e){return!!xK.isPlainObject(e)&&(E.is.expectingJSON()?E.decode.json(e.responseText):e.responseText)},errorFromRequest:function(e,t,n){return xK.isPlainObject(e)&&void 0!==e.error?e.error:void 0!==h.error[t]?h.error[t]:n},request:function(){return E.request||!1},xhr:function(){return E.xhr||!1},settings:function(){var e;return(e=h.beforeSend.call(C,h))&&(void 0!==e.success&&(E.debug("Legacy success callback detected",e),E.error(m.legacyParameters,e.success),e.onSuccess=e.success),void 0!==e.failure&&(E.debug("Legacy failure callback detected",e),E.error(m.legacyParameters,e.failure),e.onFailure=e.failure),void 0!==e.complete&&(E.debug("Legacy complete callback detected",e),E.error(m.legacyParameters,e.complete),e.onComplete=e.complete)),void 0===e&&E.error(m.noReturnedValue),!1===e?e:void 0!==e?xK.extend(!0,{},e):xK.extend(!0,{},h)},urlEncodedValue:function(e){var t=CK.decodeURIComponent(e),n=CK.encodeURIComponent(e);return t!==e?(E.debug("URL value is already encoded, avoiding double encoding",e),e):(E.verbose("Encoding value using encodeURIComponent",e,n),n)},defaultData:function(){var e={};return xK.isWindow(x)||(E.is.input()?e.value=b.val():E.is.form()||(e.text=b.text())),e},event:function(){return xK.isWindow(x)||"now"==h.on?(E.debug("API called without element, no events attached"),!1):"auto"==h.on?b.is("input")?void 0!==x.oninput?"input":void 0!==x.onpropertychange?"propertychange":"keyup":b.is("form")?"submit":"click":h.on},templatedURL:function(e){if(e=e||b.data(d.action)||h.action||!1,c=b.data(d.url)||h.url||!1)E.debug("Using specified url",c);else if(e){if(E.debug("Looking up url for action",e,h.api),void 0===h.api[e]&&!E.is.mocked())return void E.error(m.missingAction,h.action,h.api);c=h.api[e]}else E.is.form()&&(c=b.attr("action")||w.attr("action")||!1,E.debug("No url or action specified, defaulting to form action",c));return c}},abort:function(){var e=E.get.xhr();e&&"resolved"!==e.state()&&(E.debug("Cancelling API request"),e.abort())},reset:function(){E.remove.error(),E.remove.loading()},setting:function(e,t){if(E.debug("Changing setting",e,t),xK.isPlainObject(e))xK.extend(!0,h,e);else{if(void 0===t)return h[e];xK.isPlainObject(h[e])?xK.extend(!0,h[e],t):h[e]=t}},internal:function(e,t){if(xK.isPlainObject(e))xK.extend(!0,E,e);else{if(void 0===t)return E[e];E[e]=t}},debug:function(){!h.silent&&h.debug&&(h.performance?E.performance.log(arguments):(E.debug=Function.prototype.bind.call(console.info,console,h.name+":"),E.debug.apply(console,arguments)))},verbose:function(){!h.silent&&h.verbose&&h.debug&&(h.performance?E.performance.log(arguments):(E.verbose=Function.prototype.bind.call(console.info,console,h.name+":"),E.verbose.apply(console,arguments)))},error:function(){h.silent||(E.error=Function.prototype.bind.call(console.error,console,h.name+":"),E.error.apply(console,arguments))},performance:{log:function(e){var t,n;h.performance&&(n=(t=(new Date).getTime())-(r||t),r=t,i.push({Name:e[0],Arguments:[].slice.call(e,1)||"","Execution Time":n})),clearTimeout(E.performance.timer),E.performance.timer=setTimeout(E.performance.display,500)},display:function(){h.name,r=!1,clearTimeout(E.performance.timer),xK.each(i,(function(e,t){t["Execution Time"]})),(void 0!==console.group||void 0!==console.table)&&0<i.length&&!console.table&&xK.each(i,(function(e,t){t.Name,t["Execution Time"]})),i=[]}},invoke:function(e,n,r){var i,o,a,u=k;return n=n||s,r=x||r,"string"==typeof e&&void 0!==u&&(e=e.split(/[\. ]/),i=e.length-1,xK.each(e,(function(t,n){var r=t!=i?n+e[t+1].charAt(0).toUpperCase()+e[t+1].slice(1):e;if(!xK.isPlainObject(u[r])||t==i)return void 0!==u[r]?(o=u[r],!1):xK.isPlainObject(u[n])&&t!=i?void(u=u[n]):(void 0!==u[n]?o=u[n]:E.error(m.method,e),!1);u=u[r]}))),xK.isFunction(o)?a=o.apply(r,n):void 0!==o&&(a=o),xK.isArray(t)?t.push(a):void 0!==t?t=[t,a]:void 0!==a&&(t=a),o}};a?(void 0===k&&E.initialize(),E.invoke(o)):(void 0!==k&&k.invoke("destroy"),E.initialize())})),void 0!==t?t:this},xK.api.settings={name:"API",namespace:"api",debug:!1,verbose:!1,performance:!0,api:{},cache:!0,interruptRequests:!0,on:"auto",stateContext:!1,loadingDuration:0,hideError:"auto",errorDuration:2e3,encodeParameters:!0,action:!1,url:!1,base:"",urlData:{},defaultData:!0,serializeForm:!1,throttle:0,throttleFirstRequest:!0,method:"get",data:{},dataType:"json",mockResponse:!1,mockResponseAsync:!1,response:!1,responseAsync:!1,beforeSend:function(e){return e},beforeXHR:function(e){},onRequest:function(e,t){},onResponse:!1,onSuccess:function(e,t){},onComplete:function(e,t){},onFailure:function(e,t){},onError:function(e,t){},onAbort:function(e,t){},successTest:!1,error:{beforeSend:"The before send function has aborted the request",error:"There was an error with your request",exitConditions:"API Request Aborted. Exit conditions met",JSONParse:"JSON could not be parsed during error handling",legacyParameters:"You are using legacy API success callback names",method:"The method you called is not defined",missingAction:"API action used but no url was defined",missingSerialize:"jquery-serialize-object is required to add form data to an existing data object",missingURL:"No URL specified for api event",noReturnedValue:"The beforeSend callback must return a settings object, beforeSend ignored.",noStorage:"Caching responses locally requires session storage",parseError:"There was an error parsing your request",requiredParameter:"Missing a required URL parameter: ",statusMessage:"Server gave an error: ",timeout:"Your request timed out"},regExp:{required:/\{\$*[A-z0-9]+\}/g,optional:/\{\/\$*[A-z0-9]+\}/g},className:{loading:"loading",error:"error"},selector:{disabled:".disabled",form:"form"},metadata:{action:"action",url:"url"}},bK=ve.a,yK=window,wK=document,yK=void 0!==yK&&yK.Math==Math?yK:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),bK.fn.visibility=function(e){var t,n=bK(this),r=(n.selector,(new Date).getTime()),i=[],o=e,a="string"==typeof o,s=[].slice.call(arguments,1),u=n.length,c=0;return n.each((function(){var n,l,h,f=bK.isPlainObject(e)?bK.extend(!0,{},bK.fn.visibility.settings,e):bK.extend({},bK.fn.visibility.settings),d=f.className,p=f.namespace,m=f.error,g=f.metadata,A="."+p,v="module-"+p,b=bK(yK),y=bK(this),w=bK(f.context),x=(y.selector,y.data(v)),C=yK.requestAnimationFrame||yK.mozRequestAnimationFrame||yK.webkitRequestAnimationFrame||yK.msRequestAnimationFrame||function(e){setTimeout(e,0)},k=this,E=!1,S={initialize:function(){S.debug("Initializing",f),S.setup.cache(),S.should.trackChanges()&&("image"==f.type&&S.setup.image(),"fixed"==f.type&&S.setup.fixed(),f.observeChanges&&S.observeChanges(),S.bind.events()),S.save.position(),S.is.visible()||S.error(m.visible,y),f.initialCheck&&S.checkVisibility(),S.instantiate()},instantiate:function(){S.debug("Storing instance",S),y.data(v,S),x=S},destroy:function(){S.verbose("Destroying previous module"),h&&h.disconnect(),l&&l.disconnect(),b.off("load"+A,S.event.load).off("resize"+A,S.event.resize),w.off("scroll"+A,S.event.scroll).off("scrollchange"+A,S.event.scrollchange),"fixed"==f.type&&(S.resetFixed(),S.remove.placeholder()),y.off(A).removeData(v)},observeChanges:function(){"MutationObserver"in yK&&(l=new MutationObserver(S.event.contextChanged),h=new MutationObserver(S.event.changed),l.observe(wK,{childList:!0,subtree:!0}),h.observe(k,{childList:!0,subtree:!0}),S.debug("Setting up mutation observer",h))},bind:{events:function(){S.verbose("Binding visibility events to scroll and resize"),f.refreshOnLoad&&b.on("load"+A,S.event.load),b.on("resize"+A,S.event.resize),w.off("scroll"+A).on("scroll"+A,S.event.scroll).on("scrollchange"+A,S.event.scrollchange)}},event:{changed:function(e){S.verbose("DOM tree modified, updating visibility calculations"),S.timer=setTimeout((function(){S.verbose("DOM tree modified, updating sticky menu"),S.refresh()}),100)},contextChanged:function(e){[].forEach.call(e,(function(e){e.removedNodes&&[].forEach.call(e.removedNodes,(function(e){(e==k||0<bK(e).find(k).length)&&(S.debug("Element removed from DOM, tearing down events"),S.destroy())}))}))},resize:function(){S.debug("Window resized"),f.refreshOnResize&&C(S.refresh)},load:function(){S.debug("Page finished loading"),C(S.refresh)},scroll:function(){f.throttle?(clearTimeout(S.timer),S.timer=setTimeout((function(){w.triggerHandler("scrollchange"+A,[w.scrollTop()])}),f.throttle)):C((function(){w.triggerHandler("scrollchange"+A,[w.scrollTop()])}))},scrollchange:function(e,t){S.checkVisibility(t)}},precache:function(e,t){for(var n=(e=e instanceof Array?e:[e]).length,r=0,i=[],o=wK.createElement("img"),a=function(){++r>=e.length&&bK.isFunction(t)&&t()};n--;)(o=wK.createElement("img")).onload=a,o.onerror=a,o.src=e[n],i.push(o)},enableCallbacks:function(){S.debug("Allowing callbacks to occur"),E=!1},disableCallbacks:function(){S.debug("Disabling all callbacks temporarily"),E=!0},should:{trackChanges:function(){return a?(S.debug("One time query, no need to bind events"),!1):(S.debug("Callbacks being attached"),!0)}},setup:{cache:function(){S.cache={occurred:{},screen:{},element:{}}},image:function(){var e=y.data(g.src);e&&(S.verbose("Lazy loading image",e),f.once=!0,f.observeChanges=!1,f.onOnScreen=function(){S.debug("Image on screen",k),S.precache(e,(function(){S.set.image(e,(function(){++c==u&&f.onAllLoaded.call(this),f.onLoad.call(this)}))}))})},fixed:function(){S.debug("Setting up fixed"),f.once=!1,f.observeChanges=!1,f.initialCheck=!0,f.refreshOnLoad=!0,e.transition||(f.transition=!1),S.create.placeholder(),S.debug("Added placeholder",n),f.onTopPassed=function(){S.debug("Element passed, adding fixed position",y),S.show.placeholder(),S.set.fixed(),f.transition&&void 0!==bK.fn.transition&&y.transition(f.transition,f.duration)},f.onTopPassedReverse=function(){S.debug("Element returned to position, removing fixed",y),S.hide.placeholder(),S.remove.fixed()}}},create:{placeholder:function(){S.verbose("Creating fixed position placeholder"),n=y.clone(!1).css("display","none").addClass(d.placeholder).insertAfter(y)}},show:{placeholder:function(){S.verbose("Showing placeholder"),n.css("display","block").css("visibility","hidden")}},hide:{placeholder:function(){S.verbose("Hiding placeholder"),n.css("display","none").css("visibility","")}},set:{fixed:function(){S.verbose("Setting element to fixed position"),y.addClass(d.fixed).css({position:"fixed",top:f.offset+"px",left:"auto",zIndex:f.zIndex}),f.onFixed.call(k)},image:function(e,t){y.attr("src",e),f.transition?void 0!==bK.fn.transition?y.hasClass(d.visible)?S.debug("Transition already occurred on this image, skipping animation"):y.transition(f.transition,f.duration,t):y.fadeIn(f.duration,t):y.show()}},is:{onScreen:function(){return S.get.elementCalculations().onScreen},offScreen:function(){return S.get.elementCalculations().offScreen},visible:function(){return!(!S.cache||!S.cache.element||0===S.cache.element.width&&0===S.cache.element.offset.top)},verticallyScrollableContext:function(){var e=w.get(0)!==yK&&w.css("overflow-y");return"auto"==e||"scroll"==e},horizontallyScrollableContext:function(){var e=w.get(0)!==yK&&w.css("overflow-x");return"auto"==e||"scroll"==e}},refresh:function(){S.debug("Refreshing constants (width/height)"),"fixed"==f.type&&S.resetFixed(),S.reset(),S.save.position(),f.checkOnRefresh&&S.checkVisibility(),f.onRefresh.call(k)},resetFixed:function(){S.remove.fixed(),S.remove.occurred()},reset:function(){S.verbose("Resetting all cached values"),bK.isPlainObject(S.cache)&&(S.cache.screen={},S.cache.element={})},checkVisibility:function(e){S.verbose("Checking visibility of element",S.cache.element),!E&&S.is.visible()&&(S.save.scroll(e),S.save.calculations(),S.passed(),S.passingReverse(),S.topVisibleReverse(),S.bottomVisibleReverse(),S.topPassedReverse(),S.bottomPassedReverse(),S.onScreen(),S.offScreen(),S.passing(),S.topVisible(),S.bottomVisible(),S.topPassed(),S.bottomPassed(),f.onUpdate&&f.onUpdate.call(k,S.get.elementCalculations()))},passed:function(e,t){var n=S.get.elementCalculations();if(e&&t)f.onPassed[e]=t;else{if(void 0!==e)return S.get.pixelsPassed(e)>n.pixelsPassed;n.passing&&bK.each(f.onPassed,(function(e,t){n.bottomVisible||n.pixelsPassed>S.get.pixelsPassed(e)?S.execute(t,e):f.once||S.remove.occurred(t)}))}},onScreen:function(e){var t=S.get.elementCalculations(),n=e||f.onOnScreen;if(e&&(S.debug("Adding callback for onScreen",e),f.onOnScreen=e),t.onScreen?S.execute(n,"onScreen"):f.once||S.remove.occurred("onScreen"),void 0!==e)return t.onOnScreen},offScreen:function(e){var t=S.get.elementCalculations(),n=e||f.onOffScreen;if(e&&(S.debug("Adding callback for offScreen",e),f.onOffScreen=e),t.offScreen?S.execute(n,"offScreen"):f.once||S.remove.occurred("offScreen"),void 0!==e)return t.onOffScreen},passing:function(e){var t=S.get.elementCalculations(),n=e||f.onPassing;if(e&&(S.debug("Adding callback for passing",e),f.onPassing=e),t.passing?S.execute(n,"passing"):f.once||S.remove.occurred("passing"),void 0!==e)return t.passing},topVisible:function(e){var t=S.get.elementCalculations(),n=e||f.onTopVisible;if(e&&(S.debug("Adding callback for top visible",e),f.onTopVisible=e),t.topVisible?S.execute(n,"topVisible"):f.once||S.remove.occurred("topVisible"),void 0===e)return t.topVisible},bottomVisible:function(e){var t=S.get.elementCalculations(),n=e||f.onBottomVisible;if(e&&(S.debug("Adding callback for bottom visible",e),f.onBottomVisible=e),t.bottomVisible?S.execute(n,"bottomVisible"):f.once||S.remove.occurred("bottomVisible"),void 0===e)return t.bottomVisible},topPassed:function(e){var t=S.get.elementCalculations(),n=e||f.onTopPassed;if(e&&(S.debug("Adding callback for top passed",e),f.onTopPassed=e),t.topPassed?S.execute(n,"topPassed"):f.once||S.remove.occurred("topPassed"),void 0===e)return t.topPassed},bottomPassed:function(e){var t=S.get.elementCalculations(),n=e||f.onBottomPassed;if(e&&(S.debug("Adding callback for bottom passed",e),f.onBottomPassed=e),t.bottomPassed?S.execute(n,"bottomPassed"):f.once||S.remove.occurred("bottomPassed"),void 0===e)return t.bottomPassed},passingReverse:function(e){var t=S.get.elementCalculations(),n=e||f.onPassingReverse;if(e&&(S.debug("Adding callback for passing reverse",e),f.onPassingReverse=e),t.passing?f.once||S.remove.occurred("passingReverse"):S.get.occurred("passing")&&S.execute(n,"passingReverse"),void 0!==e)return!t.passing},topVisibleReverse:function(e){var t=S.get.elementCalculations(),n=e||f.onTopVisibleReverse;if(e&&(S.debug("Adding callback for top visible reverse",e),f.onTopVisibleReverse=e),t.topVisible?f.once||S.remove.occurred("topVisibleReverse"):S.get.occurred("topVisible")&&S.execute(n,"topVisibleReverse"),void 0===e)return!t.topVisible},bottomVisibleReverse:function(e){var t=S.get.elementCalculations(),n=e||f.onBottomVisibleReverse;if(e&&(S.debug("Adding callback for bottom visible reverse",e),f.onBottomVisibleReverse=e),t.bottomVisible?f.once||S.remove.occurred("bottomVisibleReverse"):S.get.occurred("bottomVisible")&&S.execute(n,"bottomVisibleReverse"),void 0===e)return!t.bottomVisible},topPassedReverse:function(e){var t=S.get.elementCalculations(),n=e||f.onTopPassedReverse;if(e&&(S.debug("Adding callback for top passed reverse",e),f.onTopPassedReverse=e),t.topPassed?f.once||S.remove.occurred("topPassedReverse"):S.get.occurred("topPassed")&&S.execute(n,"topPassedReverse"),void 0===e)return!t.onTopPassed},bottomPassedReverse:function(e){var t=S.get.elementCalculations(),n=e||f.onBottomPassedReverse;if(e&&(S.debug("Adding callback for bottom passed reverse",e),f.onBottomPassedReverse=e),t.bottomPassed?f.once||S.remove.occurred("bottomPassedReverse"):S.get.occurred("bottomPassed")&&S.execute(n,"bottomPassedReverse"),void 0===e)return!t.bottomPassed},execute:function(e,t){var n=S.get.elementCalculations(),r=S.get.screenCalculations();(e=e||!1)&&(f.continuous?(S.debug("Callback being called continuously",t,n),e.call(k,n,r)):S.get.occurred(t)||(S.debug("Conditions met",t,n),e.call(k,n,r))),S.save.occurred(t)},remove:{fixed:function(){S.debug("Removing fixed position"),y.removeClass(d.fixed).css({position:"",top:"",left:"",zIndex:""}),f.onUnfixed.call(k)},placeholder:function(){S.debug("Removing placeholder content"),n&&n.remove()},occurred:function(e){var t;e?void 0!==(t=S.cache.occurred)[e]&&!0===t[e]&&(S.debug("Callback can now be called again",e),S.cache.occurred[e]=!1):S.cache.occurred={}}},save:{calculations:function(){S.verbose("Saving all calculations necessary to determine positioning"),S.save.direction(),S.save.screenCalculations(),S.save.elementCalculations()},occurred:function(e){!e||void 0!==S.cache.occurred[e]&&!0===S.cache.occurred[e]||(S.verbose("Saving callback occurred",e),S.cache.occurred[e]=!0)},scroll:function(e){e=e+f.offset||w.scrollTop()+f.offset,S.cache.scroll=e},direction:function(){var e=S.get.scroll(),t=S.get.lastScroll();return S.cache.direction=t<e&&t?"down":e<t&&t?"up":"static",S.cache.direction},elementPosition:function(){var e=S.cache.element,t=S.get.screenSize();return S.verbose("Saving element position"),e.fits=e.height<t.height,e.offset=y.offset(),e.width=y.outerWidth(),e.height=y.outerHeight(),S.is.verticallyScrollableContext()&&(e.offset.top+=w.scrollTop()-w.offset().top),S.is.horizontallyScrollableContext()&&(e.offset.left+=w.scrollLeft-w.offset().left),S.cache.element=e},elementCalculations:function(){var e=S.get.screenCalculations(),t=S.get.elementPosition();return f.includeMargin?(t.margin={},t.margin.top=parseInt(y.css("margin-top"),10),t.margin.bottom=parseInt(y.css("margin-bottom"),10),t.top=t.offset.top-t.margin.top,t.bottom=t.offset.top+t.height+t.margin.bottom):(t.top=t.offset.top,t.bottom=t.offset.top+t.height),t.topPassed=e.top>=t.top,t.bottomPassed=e.top>=t.bottom,t.topVisible=e.bottom>=t.top&&!t.topPassed,t.bottomVisible=e.bottom>=t.bottom&&!t.bottomPassed,t.pixelsPassed=0,t.percentagePassed=0,t.onScreen=(t.topVisible||t.passing)&&!t.bottomPassed,t.passing=t.topPassed&&!t.bottomPassed,t.offScreen=!t.onScreen,t.passing&&(t.pixelsPassed=e.top-t.top,t.percentagePassed=(e.top-t.top)/t.height),S.cache.element=t,S.verbose("Updated element calculations",t),t},screenCalculations:function(){var e=S.get.scroll();return S.save.direction(),S.cache.screen.top=e,S.cache.screen.bottom=e+S.cache.screen.height,S.cache.screen},screenSize:function(){S.verbose("Saving window position"),S.cache.screen={height:w.height()}},position:function(){S.save.screenSize(),S.save.elementPosition()}},get:{pixelsPassed:function(e){var t=S.get.elementCalculations();return-1<e.search("%")?t.height*(parseInt(e,10)/100):parseInt(e,10)},occurred:function(e){return void 0!==S.cache.occurred&&S.cache.occurred[e]||!1},direction:function(){return void 0===S.cache.direction&&S.save.direction(),S.cache.direction},elementPosition:function(){return void 0===S.cache.element&&S.save.elementPosition(),S.cache.element},elementCalculations:function(){return void 0===S.cache.element&&S.save.elementCalculations(),S.cache.element},screenCalculations:function(){return void 0===S.cache.screen&&S.save.screenCalculations(),S.cache.screen},screenSize:function(){return void 0===S.cache.screen&&S.save.screenSize(),S.cache.screen},scroll:function(){return void 0===S.cache.scroll&&S.save.scroll(),S.cache.scroll},lastScroll:function(){return void 0===S.cache.screen?(S.debug("First scroll event, no last scroll could be found"),!1):S.cache.screen.top}},setting:function(e,t){if(bK.isPlainObject(e))bK.extend(!0,f,e);else{if(void 0===t)return f[e];f[e]=t}},internal:function(e,t){if(bK.isPlainObject(e))bK.extend(!0,S,e);else{if(void 0===t)return S[e];S[e]=t}},debug:function(){!f.silent&&f.debug&&(f.performance?S.performance.log(arguments):(S.debug=Function.prototype.bind.call(console.info,console,f.name+":"),S.debug.apply(console,arguments)))},verbose:function(){!f.silent&&f.verbose&&f.debug&&(f.performance?S.performance.log(arguments):(S.verbose=Function.prototype.bind.call(console.info,console,f.name+":"),S.verbose.apply(console,arguments)))},error:function(){f.silent||(S.error=Function.prototype.bind.call(console.error,console,f.name+":"),S.error.apply(console,arguments))},performance:{log:function(e){var t,n;f.performance&&(n=(t=(new Date).getTime())-(r||t),r=t,i.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:k,"Execution Time":n})),clearTimeout(S.performance.timer),S.performance.timer=setTimeout(S.performance.display,500)},display:function(){f.name,r=!1,clearTimeout(S.performance.timer),bK.each(i,(function(e,t){t["Execution Time"]})),(void 0!==console.group||void 0!==console.table)&&0<i.length&&!console.table&&bK.each(i,(function(e,t){t.Name,t["Execution Time"]})),i=[]}},invoke:function(e,n,r){var i,o,a,u=x;return n=n||s,r=k||r,"string"==typeof e&&void 0!==u&&(e=e.split(/[\. ]/),i=e.length-1,bK.each(e,(function(t,n){var r=t!=i?n+e[t+1].charAt(0).toUpperCase()+e[t+1].slice(1):e;if(!bK.isPlainObject(u[r])||t==i)return void 0!==u[r]?(o=u[r],!1):bK.isPlainObject(u[n])&&t!=i?void(u=u[n]):(void 0!==u[n]?o=u[n]:S.error(m.method,e),!1);u=u[r]}))),bK.isFunction(o)?a=o.apply(r,n):void 0!==o&&(a=o),bK.isArray(t)?t.push(a):void 0!==t?t=[t,a]:void 0!==a&&(t=a),o}};a?(void 0===x&&S.initialize(),x.save.scroll(),x.save.calculations(),S.invoke(o)):(void 0!==x&&x.invoke("destroy"),S.initialize())})),void 0!==t?t:this},bK.fn.visibility.settings={name:"Visibility",namespace:"visibility",debug:!1,verbose:!1,performance:!0,observeChanges:!0,initialCheck:!0,refreshOnLoad:!0,refreshOnResize:!0,checkOnRefresh:!0,once:!0,continuous:!1,offset:0,includeMargin:!1,context:yK,throttle:!1,type:!1,zIndex:"10",transition:"fade in",duration:1e3,onPassed:{},onOnScreen:!1,onOffScreen:!1,onPassing:!1,onTopVisible:!1,onBottomVisible:!1,onTopPassed:!1,onBottomPassed:!1,onPassingReverse:!1,onTopVisibleReverse:!1,onBottomVisibleReverse:!1,onTopPassedReverse:!1,onBottomPassedReverse:!1,onLoad:function(){},onAllLoaded:function(){},onFixed:function(){},onUnfixed:function(){},onUpdate:!1,onRefresh:function(){},metadata:{src:"src"},className:{fixed:"fixed",placeholder:"placeholder",visible:"visible"},error:{method:"The method you called is not defined.",visible:"Element is hidden, you must call refresh after element becomes visible"}},n(388),n(275),n(389);var yY=function(){function e(t,n,r,i){var o=4<arguments.length&&void 0!==arguments[4]?arguments[4]:{},a=this,s=e;if(!(a instanceof s))throw new TypeError("Cannot call a class as a function");this.tag=t,this.shortcut=n,this.tip=i?U("toolbar.".concat(i.replace(/-[a-z]/g,(function(e){return e[1].toUpperCase()})))):this.tag,this.classes=o,n&&(this.tip+=" (".concat(n,")")),this.value=r,this.change=function(){},this.el=this.element()}var t,n;return t=e,(n=[{key:"element",value:function(){var e=this.classes.btnClass||"";e=s("div","".concat(pe,"-toolbar-item ").concat(e));return"color"!=this.tag&&"bgcolor"!=this.tag||e.attr({id:"".concat(pe,"-").concat(this.tag)}),e}},{key:"setState",value:function(){}}])&&bY(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function wY(e){return(wY="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function xY(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function CY(){return(CY="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=EY(e)););return e}(e,t);if(r)return(r=Object.getOwnPropertyDescriptor(r,t)).get?r.get.call(arguments.length<3?e:n):r.value}).apply(this,arguments)}function kY(e,t){return(kY=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function EY(e){return(EY=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var SY=function(){var e=r,t=yY;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&kY(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=EY(e);n=t?(n=EY(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===wY(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){var e=this,t=r;if(e instanceof t)return n.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return e=r,(t=[{key:"element",value:function(e){var t=this,n=CY(EY(r.prototype),"element",this).call(this),i=this.classes.baseClass||"",o=(i=s("div","".concat(pe,"-base_item ").concat(i)),z("toolbar.".concat(this.tag))()),a=(this.iconEl=new ct(this.tag,this.classes.iconClass),this.titleEl=s("span","".concat(pe,"-item_title")).html(o),i.child(this.iconEl),i.child(this.titleEl),this);return this.uploadInput=new ac({placeholder:"",type:"file"},"",{},(function(e){t.change(t.tag,e.target.files)})),this.uploadInput.hide(),"import"==this.tag?(i.on("click",(function(){ve()(a.uploadInput.el.el).find("input").click()})),n.child(i,this.uploadInput)):e?n.child(i):n.child(i).on("click",(function(){return t.change(t.tag)})),n}},{key:"titleHide",value:function(){this.titleEl.hide()}},{key:"setState",value:function(e){this.el.disabled(e)}}])&&xY(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),r}();function _Y(e){return(_Y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function OY(e,t){return(OY=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function TY(e){return(TY=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var DY=function(){var e=r,t=SY;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&OY(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=TY(e);n=t?(n=TY(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===_Y(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){if(this instanceof r)return n.call(this,"paste","Ctrl+V");throw new TypeError("Cannot call a class as a function")}return e=r,Object.defineProperty(e,"prototype",{writable:!1}),e}();function BY(e){return(BY="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function IY(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function MY(){return(MY="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=NY(e)););return e}(e,t);if(r)return(r=Object.getOwnPropertyDescriptor(r,t)).get?r.get.call(arguments.length<3?e:n):r.value}).apply(this,arguments)}function jY(e,t){return(jY=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function NY(e){return(NY=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var FY=function(){var e=r,t=yY;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&jY(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=NY(e);n=t?(n=NY(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===BY(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){var e=this,t=r;if(e instanceof t)return n.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return e=r,(t=[{key:"element",value:function(){var e=this,t=MY(NY(r.prototype),"element",this).call(this),n=s("div","".concat(pe,"-suffix_item")),i=z("toolbar.".concat(this.tag))(),o=new ct(this.tag,this.classes.iconClass);i=s("span","".concat(pe,"-item_title")).html(i);return n.child(o),n.child(i),t.child(n).on("click",(function(){return e.change(e.tag)}))}},{key:"setState",value:function(e){this.el.disabled(e)}}])&&IY(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),r}();function RY(e){return(RY="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function PY(e,t){return(PY=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function LY(e){return(LY=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var UY=function(){var e=r,t=FY;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&PY(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=LY(e);n=t?(n=LY(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===RY(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){if(this instanceof r)return n.call(this,"cut","Ctrl+X",null,null,{iconClass:"".concat(pe,"-icon_size")});throw new TypeError("Cannot call a class as a function")}return e=r,Object.defineProperty(e,"prototype",{writable:!1}),e}();function zY(e){return(zY="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function HY(e,t){return(HY=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function $Y(e){return($Y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var QY=function(){var e=r,t=FY;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&HY(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=$Y(e);n=t?(n=$Y(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===zY(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){if(this instanceof r)return n.call(this,"copy","Ctrl+C",null,null,{iconClass:"".concat(pe,"-icon_size")});throw new TypeError("Cannot call a class as a function")}return e=r,Object.defineProperty(e,"prototype",{writable:!1}),e}();function VY(e){return(VY="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function qY(e,t){return(qY=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function GY(e){return(GY=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var WY=function(){var e=r,t=FY;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&qY(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=GY(e);n=t?(n=GY(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===VY(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){if(this instanceof r)return n.call(this,"redo","Ctrl+Z",null,null,{iconClass:"".concat(pe,"-icon_size")});throw new TypeError("Cannot call a class as a function")}return e=r,Object.defineProperty(e,"prototype",{writable:!1}),e}();function KY(e){return(KY="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function YY(e,t){return(YY=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function XY(e){return(XY=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var JY=function(){var e=r,t=FY;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&YY(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=XY(e);n=t?(n=XY(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===KY(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){if(this instanceof r)return n.call(this,"undo","Ctrl+Y",null,null,{iconClass:"".concat(pe,"-icon_size")});throw new TypeError("Cannot call a class as a function")}return e=r,Object.defineProperty(e,"prototype",{writable:!1}),e}();function ZY(e){return(ZY="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function eX(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function tX(){return(tX="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=rX(e)););return e}(e,t);if(r)return(r=Object.getOwnPropertyDescriptor(r,t)).get?r.get.call(arguments.length<3?e:n):r.value}).apply(this,arguments)}function nX(e,t){return(nX=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function rX(e){return(rX=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var iX=["align-left","align-right","align-center","align-top","align-middle","align-bottom"],oX={"align-left":"left","align-right":"right","align-center":"center","align-top":"top","align-middle":"middle","align-bottom":"bottom"},aX=["align-top","align-middle","align-bottom"],sX=["align-left","align-right","align-center"],uX={"align-top":"top","align-middle":"middle","align-bottom":"bottom"},cX={"align-left":"left","align-right":"right","align-center":"center"},lX=function(){var e=r,t=SY;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&nX(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=rX(e);n=t?(n=rX(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===ZY(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){var e=this,t=r;if(e instanceof t)return n.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return e=r,(t=[{key:"element",value:function(){var e=this;return tX(rX(r.prototype),"element",this).call(this,!0).on("click",(function(){return e.click()}))}},{key:"click",value:function(){var e=this.ivalue||0;"indent"===this.tag?(this.change(this.tag,e+=1),this.change("indentIsAdd",!0),this.ivalue=e):"indentReduce"===this.tag?(this.change(this.tag,e=--e<0?0:e),this.change("indentIsAdd",!1),this.ivalue=e):aX.includes(this.tag)?(this.addActive(!0),this.change("valign",uX[this.tag])):sX.includes(this.tag)?(this.addActive(!0),this.change("align",cX[this.tag])):"slash"===this.tag?this.change(this.tag):this.change(this.tag,this.toggle())}},{key:"setValue",value:function(e){this.ivalue=e}},{key:"setState",value:function(e,t){void 0===e?this.addActive(!1):("add"!=t&&"reduce"!=t||this.addActive(e),iX.includes(this.tag)?oX[this.tag]===e&&this.addActive(!0):t||this.addActive(e))}},{key:"addActive",value:function(){var e=!(0<arguments.length&&void 0!==arguments[0])||arguments[0],t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"active",n=2<arguments.length?arguments[2]:void 0;e?this.addClass(t,n):this.nremoveClass(t,n)}},{key:"addClass",value:function(e,t){(t||this.el.el).childNodes[0].classList.add(e)}},{key:"nremoveClass",value:function(e,t){(t||this.el.el).childNodes[0].classList.remove(e)}},{key:"toggleClass",value:function(){return this.el.el.childNodes[0].classList.toggle("active")}},{key:"toggle",value:function(){return this.toggleClass()}},{key:"getParentdElement",value:function(e,t){for(var n=e.childNodes,r="",i=0;i<n.length;i++){var o=n[i];if(-1!=o.className.indexOf(t)){r=o;break}}return r}},{key:"active",value:function(){return this.el.hasClass("active")}},{key:"removeClass",value:function(e,t,n){for(var r=(n=n||e.getAttribute("class")).split(" "),i=0;i<r.length;i++)r[i]==t&&(r.splice(i,1),i--);n=r.join(" "),e.setAttribute("class",n)}}])&&eX(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),r}();function hX(e){return(hX="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fX(e,t){return(fX=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function dX(e){return(dX=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var pX=function(){var e=r,t=lX;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&fX(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=dX(e);n=t?(n=dX(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===hX(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){if(this instanceof r)return n.call(this,"paintformat");throw new TypeError("Cannot call a class as a function")}return e=r,Object.defineProperty(e,"prototype",{writable:!1}),e}();function mX(e){return(mX="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function gX(e,t){return(gX=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function AX(e){return(AX=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var vX=function(){var e=r,t=SY;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&gX(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=AX(e);n=t?(n=AX(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===mX(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){if(this instanceof r)return n.call(this,"clearformat");throw new TypeError("Cannot call a class as a function")}return e=r,Object.defineProperty(e,"prototype",{writable:!1}),e}();function bX(e){return(bX="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function yX(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function wX(){return(wX="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=CX(e)););return e}(e,t);if(r)return(r=Object.getOwnPropertyDescriptor(r,t)).get?r.get.call(arguments.length<3?e:n):r.value}).apply(this,arguments)}function xX(e,t){return(xX=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function CX(e){return(CX=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var kX=function(){var e=r,t=yY;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xX(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=CX(e);n=t?(n=CX(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===bX(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){var e=this,t=r;if(e instanceof t)return n.apply(this,arguments);throw new TypeError("Cannot call a class as a function")}return e=r,(t=[{key:"dropdown",value:function(){}},{key:"getValue",value:function(e){return e}},{key:"element",value:function(){var e=this,t=this.tag;return this.dd=this.dropdown(),this.dd.change=function(n){return e.change(t,e.getValue(n))},wX(CX(r.prototype),"element",this).call(this).child(this.dd)}},{key:"setTitle",value:function(e){this.dd.setTitle(e)}},{key:"getTitle",value:function(){return this.dd.title.el.innerHTML}},{key:"createOptions",value:function(e){this.dd.createOptions(e)}},{key:"setState",value:function(e){if(e){this.value=e,this.dd.setTitle(e);try{"valign"!=this.className&&"align"!=this.className||this.classValue==e&&this.el.active(!0)}catch(e){}}}},{key:"active",value:function(){return this.el.hasClass("active")}}])&&yX(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),r}();function EX(e){return(EX="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function SX(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _X(e,t){return(_X=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function OX(e){return(OX=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var TX=function(){var e=r,t=kX;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_X(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=OX(e);n=t?(n=OX(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===EX(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){if(this instanceof r)return n.call(this,"font-name",null,null,null,{btnClass:"".concat(pe,"-font_item")});throw new TypeError("Cannot call a class as a function")}return e=r,(t=[{key:"getValue",value:function(e){return e.key}},{key:"dropdown",value:function(){return new Hh}}])&&SX(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),r}();function DX(e){return(DX="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function BX(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function IX(e,t){return(IX=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function MX(e){return(MX=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var jX=function(){var e=r,t=kX;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&IX(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=MX(e);n=t?(n=MX(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===DX(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){if(this instanceof r)return n.call(this,"font-size",null,null,null,{btnClass:"".concat(pe,"-font_item")});throw new TypeError("Cannot call a class as a function")}return e=r,(t=[{key:"getValue",value:function(e){return e.pt}},{key:"dropdown",value:function(){return new Ih}}])&&BX(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),r}();function NX(e){return(NX="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function FX(e,t){return(FX=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function RX(e){return(RX=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var PX=function(){var e=r,t=lX;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&FX(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=RX(e);n=t?(n=RX(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===NX(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){if(this instanceof r)return n.call(this,"font-bold","Ctrl+B",null,null,{iconClass:"".concat(pe,"-icon_size--14"),btnClass:"".concat(pe,"-padding--0"),baseClass:"".concat(pe,"-base_item--felx")});throw new TypeError("Cannot call a class as a function")}return e=r,Object.defineProperty(e,"prototype",{writable:!1}),e}();function LX(e){return(LX="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function UX(e,t){return(UX=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function zX(e){return(zX=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var HX=function(){var e=r,t=lX;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&UX(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=zX(e);n=t?(n=zX(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===LX(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){if(this instanceof r)return n.call(this,"font-italic","Ctrl+I",null,null,{iconClass:"".concat(pe,"-icon_size--14"),btnClass:"".concat(pe,"-padding--0"),baseClass:"".concat(pe,"-base_item--felx")});throw new TypeError("Cannot call a class as a function")}return e=r,Object.defineProperty(e,"prototype",{writable:!1}),e}();function $X(e){return($X="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function QX(e,t){return(QX=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function VX(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function qX(){return(qX="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=GX(e)););return e}(e,t);if(r)return(r=Object.getOwnPropertyDescriptor(r,t)).get?r.get.call(arguments.length<3?e:n):r.value}).apply(this,arguments)}function GX(e){return(GX=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var WX=function(){var e=r,t=lX;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&QX(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=GX(e);n=t?(n=GX(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===$X(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return VX(r)}}(r);function r(){var e,t;if(this instanceof r)return qX((e=VX(t=n.call(this,"strike",null,null,null,{iconClass:"".concat(pe,"-icon_size--14"),btnClass:"".concat(pe,"-padding--0"),baseClass:"".concat(pe,"-base_item--felx")})),GX(r.prototype)),"titleHide",e).call(e),t;throw new TypeError("Cannot call a class as a function")}return e=r,Object.defineProperty(e,"prototype",{writable:!1}),e}();function KX(e){return(KX="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function YX(e,t){return(YX=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function XX(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function JX(){return(JX="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=ZX(e)););return e}(e,t);if(r)return(r=Object.getOwnPropertyDescriptor(r,t)).get?r.get.call(arguments.length<3?e:n):r.value}).apply(this,arguments)}function ZX(e){return(ZX=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var eJ=function(){var e=r,t=lX;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&YX(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ZX(e);n=t?(n=ZX(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===KX(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return XX(r)}}(r);function r(){var e,t;if(this instanceof r)return JX((e=XX(t=n.call(this,"underline",null,null,null,{iconClass:"".concat(pe,"-icon_size--14"),btnClass:"".concat(pe,"-padding--0"),baseClass:"".concat(pe,"-base_item--felx")})),ZX(r.prototype)),"titleHide",e).call(e),t;throw new TypeError("Cannot call a class as a function")}return e=r,Object.defineProperty(e,"prototype",{writable:!1}),e}();function tJ(e){return(tJ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function nJ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function rJ(e,t){return(rJ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function iJ(e){return(iJ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var oJ=function(){var e=r,t=kX;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&rJ(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=iJ(e);n=t?(n=iJ(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===tJ(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(e){if(this instanceof r)return n.call(this,"color",void 0,e);throw new TypeError("Cannot call a class as a function")}return e=r,(t=[{key:"dropdown",value:function(){var e=this.tag,t=this.value;return new jl(e,t)}}])&&nJ(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),r}();function aJ(e){return(aJ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function sJ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function uJ(e,t){return(uJ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function cJ(e){return(cJ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var lJ=function(){var e=r,t=kX;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&uJ(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=cJ(e);n=t?(n=cJ(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===aJ(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){if(this instanceof r)return n.call(this,"border");throw new TypeError("Cannot call a class as a function")}return e=r,(t=[{key:"dropdown",value:function(){return new Xl}}])&&sJ(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),r}();function hJ(e){return(hJ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fJ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function dJ(e,t){return(dJ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function pJ(e){return(pJ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var mJ=function(){var e=r,t=kX;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&dJ(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=pJ(e);n=t?(n=pJ(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===hJ(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(e){if(this instanceof r)return n.call(this,"bgcolor",void 0,e);throw new TypeError("Cannot call a class as a function")}return e=r,(t=[{key:"dropdown",value:function(){var e=this.tag,t=this.value;return new jl(e,t,!0)}}])&&fJ(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),r}();function gJ(e){return(gJ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function AJ(e,t){return(AJ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function vJ(e){return(vJ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var bJ=function(){var e=r,t=lX;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&AJ(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=vJ(e);n=t?(n=vJ(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===gJ(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){if(this instanceof r)return n.call(this,"slash",void 0,null,null,{iconClass:"".concat(pe,"-icon_size--14"),btnClass:"".concat(pe,"-padding--0"),baseClass:"".concat(pe,"-base_item--felx")});throw new TypeError("Cannot call a class as a function")}return e=r,Object.defineProperty(e,"prototype",{writable:!1}),e}();function yJ(e){return(yJ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function wJ(e,t){return(wJ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function xJ(e){return(xJ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var CJ=function(){var e=r,t=lX;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&wJ(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=xJ(e);n=t?(n=xJ(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===yJ(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){if(this instanceof r)return n.call(this,"align-left",null,null,null,{iconClass:"".concat(pe,"-icon_size--21"),btnClass:"".concat(pe,"-padding--0"),baseClass:"".concat(pe,"-base_item--felx ").concat(pe,"-base_item--21")});throw new TypeError("Cannot call a class as a function")}return e=r,Object.defineProperty(e,"prototype",{writable:!1}),e}();function kJ(e){return(kJ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function EJ(e,t){return(EJ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function SJ(e){return(SJ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var _J=function(){var e=r,t=lX;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&EJ(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=SJ(e);n=t?(n=SJ(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===kJ(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){if(this instanceof r)return n.call(this,"align-top",null,null,null,{iconClass:"".concat(pe,"-icon_size--21"),btnClass:"".concat(pe,"-padding--0"),baseClass:"".concat(pe,"-base_item--felx ").concat(pe,"-base_item--21")});throw new TypeError("Cannot call a class as a function")}return e=r,Object.defineProperty(e,"prototype",{writable:!1}),e}();function OJ(e){return(OJ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function TJ(e,t){return(TJ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function DJ(e){return(DJ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var BJ=function(){var e=r,t=lX;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&TJ(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=DJ(e);n=t?(n=DJ(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===OJ(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){if(this instanceof r)return n.call(this,"align-middle",null,null,null,{iconClass:"".concat(pe,"-icon_size--21"),btnClass:"".concat(pe,"-padding--0"),baseClass:"".concat(pe,"-base_item--felx ").concat(pe,"-base_item--21")});throw new TypeError("Cannot call a class as a function")}return e=r,Object.defineProperty(e,"prototype",{writable:!1}),e}();function IJ(e){return(IJ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function MJ(e,t){return(MJ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function jJ(e){return(jJ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var NJ=function(){var e=r,t=lX;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&MJ(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=jJ(e);n=t?(n=jJ(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===IJ(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){if(this instanceof r)return n.call(this,"align-bottom",null,null,null,{iconClass:"".concat(pe,"-icon_size--21"),btnClass:"".concat(pe,"-padding--0"),baseClass:"".concat(pe,"-base_item--felx ").concat(pe,"-base_item--21")});throw new TypeError("Cannot call a class as a function")}return e=r,Object.defineProperty(e,"prototype",{writable:!1}),e}();function FJ(e){return(FJ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function RJ(e,t){return(RJ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function PJ(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function LJ(){return(LJ="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=UJ(e)););return e}(e,t);if(r)return(r=Object.getOwnPropertyDescriptor(r,t)).get?r.get.call(arguments.length<3?e:n):r.value}).apply(this,arguments)}function UJ(e){return(UJ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var zJ=function(){var e=r,t=lX;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&RJ(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=UJ(e);n=t?(n=UJ(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===FJ(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return PJ(r)}}(r);function r(){var e,t;if(this instanceof r)return LJ((e=PJ(t=n.call(this,"indent",null,null,null,{iconClass:"".concat(pe,"-icon_size--21"),btnClass:"".concat(pe,"-padding--0"),baseClass:"".concat(pe,"-base_item--felx ").concat(pe,"-base_item--21")})),UJ(r.prototype)),"titleHide",e).call(e),t;throw new TypeError("Cannot call a class as a function")}return e=r,Object.defineProperty(e,"prototype",{writable:!1}),e}();function HJ(e){return(HJ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function $J(e,t){return($J=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function QJ(e){return(QJ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var VJ=function(){var e=r,t=lX;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$J(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=QJ(e);n=t?(n=QJ(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===HJ(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){if(this instanceof r)return n.call(this,"align-center",null,null,null,{iconClass:"".concat(pe,"-icon_size--21"),btnClass:"".concat(pe,"-padding--0"),baseClass:"".concat(pe,"-base_item--felx ").concat(pe,"-base_item--21")});throw new TypeError("Cannot call a class as a function")}return e=r,Object.defineProperty(e,"prototype",{writable:!1}),e}();function qJ(e){return(qJ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function GJ(e,t){return(GJ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function WJ(e){return(WJ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var KJ=function(){var e=r,t=lX;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&GJ(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=WJ(e);n=t?(n=WJ(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===qJ(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){if(this instanceof r)return n.call(this,"align-right",null,null,null,{iconClass:"".concat(pe,"-icon_size--21"),btnClass:"".concat(pe,"-padding--0"),baseClass:"".concat(pe,"-base_item--felx ").concat(pe,"-base_item--21")});throw new TypeError("Cannot call a class as a function")}return e=r,Object.defineProperty(e,"prototype",{writable:!1}),e}();function YJ(e){return(YJ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function XJ(e,t){return(XJ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function JJ(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ZJ(){return(ZJ="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=eZ(e)););return e}(e,t);if(r)return(r=Object.getOwnPropertyDescriptor(r,t)).get?r.get.call(arguments.length<3?e:n):r.value}).apply(this,arguments)}function eZ(e){return(eZ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var tZ=function(){var e=r,t=lX;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&XJ(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=eZ(e);n=t?(n=eZ(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===YJ(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return JJ(r)}}(r);function r(){var e,t;if(this instanceof r)return ZJ((e=JJ(t=n.call(this,"indentReduce",null,null,null,{iconClass:"".concat(pe,"-icon_size--21"),btnClass:"".concat(pe,"-padding--0"),baseClass:"".concat(pe,"-base_item--felx ").concat(pe,"-base_item--21")})),eZ(r.prototype)),"titleHide",e).call(e),t;throw new TypeError("Cannot call a class as a function")}return e=r,Object.defineProperty(e,"prototype",{writable:!1}),e}();function nZ(e){return(nZ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function rZ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function iZ(e,t){return(iZ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function oZ(e){return(oZ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var aZ=function(){var e=r,t=lX;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&iZ(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=oZ(e);n=t?(n=oZ(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===nZ(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){if(this instanceof r)return n.call(this,"merge");throw new TypeError("Cannot call a class as a function")}return e=r,(t=[{key:"setState",value:function(e,t){this.el.disabled(t),t=this.el.el,this.addActive(e,"active",t)}}])&&rZ(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),r}();function sZ(e){return(sZ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function uZ(e,t){return(uZ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function cZ(e){return(cZ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var lZ=function(){var e=r,t=kl;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&uZ(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=cZ(e);n=t?(n=cZ(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===sZ(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){if(this instanceof r)return n.call(this,"普通单元格","160px",!1,{dropdownClass:"".concat(pe,"-dropdown--felx"),titleClass:"".concat(pe,"-data_type--input"),showTitle:"类型"});throw new TypeError("Cannot call a class as a function")}return e=r,Object.defineProperty(e,"prototype",{writable:!1}),e}();function hZ(e){return(hZ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function fZ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function dZ(e,t){return(dZ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function pZ(e){return(pZ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var mZ=function(){var e=r,t=kX;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&dZ(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=pZ(e);n=t?(n=pZ(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===hZ(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){if(this instanceof r)return n.call(this,"data-type",null,null,null,{btnClass:"".concat(pe,"-font_item")});throw new TypeError("Cannot call a class as a function")}return e=r,(t=[{key:"getValue",value:function(e){return e.key}},{key:"dropdown",value:function(){return new lZ}}])&&fZ(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),r}();function gZ(e){return(gZ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function AZ(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function vZ(e,t){return(vZ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function bZ(e){return(bZ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var yZ=function(){var e=r,t=kl;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vZ(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=bZ(e);n=t?(n=bZ(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===gZ(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){var e,t;if(this instanceof r)return t=Oe.map((function(t){return s("div","".concat(pe,"-item")).on("click",(function(){"设置显示格式"!==t.title?e.setTitle(t.title):e.hide(),e.change(t)})).child(t.title)})),e=n.call.apply(n,[this,Oe[0].title,"160px",!0,{dropdownClass:"".concat(pe,"-dropdown--felx"),titleClass:"".concat(pe,"-data_type--input"),showTitle:"元素",headerClass:"".concat(pe,"-position--relative"),arrowClass:"".concat(pe,"-valuetype_arrowright"),contentClass:"".concat(pe,"-valuetype_content")}].concat(function(e){return function(e){if(Array.isArray(e))return AZ(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){var n;if(e)return"string"==typeof e?AZ(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?AZ(e,t):void 0}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t)));throw new TypeError("Cannot call a class as a function")}return e=r,Object.defineProperty(e,"prototype",{writable:!1}),e}();function wZ(e){return(wZ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function xZ(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function CZ(e,t){return(CZ=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function kZ(e){return(kZ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var EZ=function(){var e=r,t=kX;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&CZ(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=kZ(e);n=t?(n=kZ(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===wZ(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){if(this instanceof r)return n.call(this,"value-type",null,null,null,{btnClass:"".concat(pe,"-font_item")});throw new TypeError("Cannot call a class as a function")}return e=r,(t=[{key:"getValue",value:function(e){return e.key}},{key:"dropdown",value:function(){return new yZ}}])&&xZ(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),r}();function SZ(e){return(SZ="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _Z(e,t){return(_Z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function OZ(e){return(OZ=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var TZ=function(){var e=r,t=SY;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_Z(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=OZ(e);n=t?(n=OZ(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===SZ(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){if(this instanceof r)return n.call(this,"sheetSetting");throw new TypeError("Cannot call a class as a function")}return e=r,Object.defineProperty(e,"prototype",{writable:!1}),e}(),DZ=[{name:"SUM(求和)",value:1},{name:"AVG(求平均)",value:5},{name:"COUNT(计数)",value:2},{name:"DCOUNT(去重计数)",value:6},{name:"MAX(最大值)",value:4},{name:"MIN(最小值)",value:3}],BZ=[{name:"COUNT(计数)",value:2},{name:"DCOUNT(去重计数)",value:6},{name:"MAX(最大值)",value:4},{name:"MIN(最小值)",value:3}],IZ={10:"控件单元格",2:"数据单元格",5:"公式单元格",6:"普通单元格"},MZ={0:"不扩展",1:"向下扩展",2:"向右扩展",3:"双向扩展"},jZ={"不扩展":0,"向下扩展":1,"向右扩展":2,"双向扩展":3},NZ={1:"日期",2:"数值",3:"文本"},FZ={"日期":1,"数值":2,"文本":3},RZ={1:"文本",2:"图片",3:"二维码",4:"Html",12:"条形码",10:"占位"},PZ={"文本":1,"图片":2,"二维码":3,Html:4,"条形码":12,"占位":10},LZ=[{value:"thin",name:"细"},{value:"medium",name:"中"},{value:"thick",name:"粗"}],UZ=[{value:"thin",name:"thin"},{value:"medium",name:"medium"},{value:"thick",name:"thick"},{value:"dashed",name:"dashed"},{value:"dotted",name:"dotted"}],zZ=[{value:"left",name:"左对齐"},{value:"center",name:"水平居中"},{value:"right",name:"右对齐"}],HZ=[{value:"top",name:"顶部对齐"},{value:"middle",name:"垂直居中"},{value:"bottom",name:"底部对齐"}],$Z=[{name:"默认",value:0},{name:"千分位",value:1},{name:"万分位",value:2}],QZ=[{name:"默认",value:0},{name:"%",value:5},{name:"千",value:1},{name:"万",value:2},{name:"百万",value:3},{name:"亿",value:4}],VZ=[{name:"默认",value:0},{name:"0位",value:5},{name:"1位",value:1},{name:"2位",value:2},{name:"3位",value:3},{name:"4位",value:4},{name:"5位",value:15},{name:"6位",value:16}],qZ=[{name:"yyyy-MM-dd",value:"yyyy-MM-dd"},{name:"yyyy-M-d",value:"yyyy-M-d"},{name:"yyyy-MM-dd HH:mm:ss",value:"yyyy-MM-dd HH:mm:ss"},{name:"yyyy-M-d H:mm",value:"yyyy-M-d H:mm"},{name:"yyyy-M-d h:mm",value:"yyyy-M-d h:mm"},{name:"yyyy/MM/dd",value:"yyyy/MM/dd"},{name:"yyyy/M/d",value:"yyyy/M/d"},{name:"yyyy/MM/dd HH:mm:ss",value:"yyyy/MM/dd HH:mm:ss"},{name:"yyyy/MM/dd hh:mm:ss",value:"yyyy/MM/dd hh:mm:ss"},{name:"yyyy/M/d H:mm",value:"yyyy/M/d H:mm"},{name:"yyyy/M/d h:mm",value:"yyyy/M/d h:mm"},{name:"yyyy年MM月dd日",value:"yyyy年MM月dd日"},{name:"yyyy年M月d日",value:"yyyy年M月d日"},{name:"yyyy-MM",value:"yyyy-MM"},{name:"yyyy/MM",value:"yyyy/MM"},{name:"yyyy年MM月",value:"yyyy年MM月"},{name:"MM/dd/yyyy",value:"MM/dd/yyyy"},{name:"M/d/yyyy",value:"M/d/yyyy"},{name:"MM/dd/yyyy HH:mm:ss",value:"MM/dd/yyyy HH:mm:ss"},{name:"MM/dd/yyyy hh:mm:ss",value:"MM/dd/yyyy hh:mm:ss"},{name:"MM/dd/yyyy H:mm",value:"MM/dd/yyyy H:mm"},{name:"MM/dd/yyyy h:mm",value:"MM/dd/yyyy h:mm"},{name:"MM.dd.yyyy",value:"MM.dd.yyyy"},{name:"MM.d.yyyy",value:"MM.d.yyyy"},{name:"MM-yy",value:"MM-yy"},{name:"M-d-yy",value:"M-d-yy"},{name:"yyyy",value:"yyyy"},{name:"HH:mm:ss",value:"HH:mm:ss"},{name:"H:mm:ss",value:"H:mm:ss"},{name:"HH:mm",value:"HH:mm"},{name:"H:mm",value:"H:mm"},{name:"hh:mm:ss",value:"hh:mm:ss"},{name:"h:mm:ss",value:"h:mm:ss"},{name:"hh:mm",value:"hh:mm"},{name:"h:mm",value:"h:mm"},{name:"mm:ss",value:"mm:ss"}],GZ=[{value:1,name:"CODE128"},{value:2,name:"CODE128A"},{value:3,name:"CODE128B"},{value:4,name:"CODE128C"},{value:5,name:"EAN13"},{value:6,name:"EAN8"},{value:7,name:"EAN5"},{value:8,name:"EAN2"},{value:9,name:"UPC"},{value:10,name:"CODE39"},{value:11,name:"CODE39 CHECK"},{value:12,name:"ITF14"},{value:13,name:"MSI"},{value:14,name:"MSI10"},{value:15,name:"MSI11"},{value:16,name:"MSI1010"},{value:17,name:"MSI1110"},{value:18,name:"PHARMACODE"},{value:19,name:"CODABAR"}],WZ=[{value:1,name:"QRcode"},{value:2,name:"Data Matrix"},{value:3,name:"Data Matrix Rectangular"},{value:4,name:"Data Matrix Rectangular Extension"},{value:5,name:"DotCode"},{value:6,name:"Han Xin Code"},{value:7,name:"MaxiCode"},{value:8,name:"MicroPDF417"},{value:9,name:"Micro QR Code"}],KZ=[{name:"拉伸",value:"1"},{name:"平铺",value:"2"},{name:"自适应-裁剪",value:"3"},{name:"自适应-填充",value:"4"}],YZ=[{name:"合并单元格",value:1},{name:"不合并单元格",value:0}],XZ=[{value:3,name:"大于"},{value:4,name:"大于等于"},{value:1,name:"等于"},{value:5,name:"小于"},{value:6,name:"小于等于"},{value:2,name:"不等于"},{value:7,name:"等于空"},{value:8,name:"不等于空"}],JZ=[{value:1,name:"匹配"},{value:2,name:"包含"},{value:3,name:"为空"},{value:4,name:"开头是"},{value:5,name:"结尾是"},{value:6,name:"不匹配"},{value:7,name:"不包含"},{value:8,name:"不为空"},{value:9,name:"开头不是"},{value:10,name:"结尾不是"}],ZZ=[{value:1,name:"日期"},{value:2,name:"数值"},{value:3,name:"文本"}],e1=["文本","数值","日期"],t1={paper:{type:2,params:{unit:2,width:"8.27",height:"11.69"}},repeat:{repeatRowHead:{start:"",end:""},repeatColHead:{start:"",end:""},repeatRowFoot:{start:"",end:""},repeatColFoot:{start:"",end:""}},params:{autoFill:!1,padding:{top:{unit:1,value:0},bottom:{unit:1,value:0},left:{unit:1,value:0},right:{unit:1,value:0}},direction:2}},n1=[{key:"分组",title:"分组"},{key:"汇总",title:"汇总"},{key:"列表",title:"列表"}],r1=[{key:"默认",title:"默认"}],i1=[{name:"且",value:1},{name:"或",value:2}],o1=["rgba(255, 115, 191)","rgba(224, 115, 255)","rgba(255, 123, 88)","rgba(115, 234, 255)","rgba(255, 186, 88)","rgba(115, 187, 255)","rgba(94, 255, 215)","rgba(255, 212, 80)"],a1=["rgba(255, 115, 191,0.5)","rgba(224, 115, 255,0.5)","rgba(255, 123, 88,0.5)","rgba(115, 234, 255,0.5)","rgba(255, 186, 88,0.5)","rgba(115, 187, 255,0.5)","rgba(94, 255, 215,0.5)","rgba(255, 212, 80,0.5)"];function s1(e){return(s1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function u1(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function c1(e,t){return(c1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function l1(e){return(l1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var h1=function(){var e=r,t=kl;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c1(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=l1(e);n=t?(n=l1(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===s1(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){var e,t;if(this instanceof r)return t=r1.map((function(t){return s("div","".concat(pe,"-item")).on("click",(function(){e.setTitle(t.title),e.change(t)})).child(t.title)})),e=n.call.apply(n,[this,r1[0].title,"160px",!0,{titleClass:"".concat(pe,"-data_type--input"),headerClass:"".concat(pe,"-position--relative"),arrowClass:"".concat(pe,"-valuetype_arrowright")}].concat(function(e){return function(e){if(Array.isArray(e))return u1(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){var n;if(e)return"string"==typeof e?u1(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u1(e,t):void 0}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t)));throw new TypeError("Cannot call a class as a function")}return e=r,Object.defineProperty(e,"prototype",{writable:!1}),e}();function f1(e){return(f1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function d1(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p1(e,t){return(p1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function m1(e){return(m1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var g1=function(){var e=r,t=kX;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p1(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m1(e);n=t?(n=m1(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===f1(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){if(this instanceof r)return n.call(this,"data-cell-type",null,null,null,{btnClass:"".concat(pe,"-font_item")});throw new TypeError("Cannot call a class as a function")}return e=r,(t=[{key:"getValue",value:function(e){return e.key}},{key:"dropdown",value:function(){return new h1}}])&&d1(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),r}();function A1(e){return(A1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function v1(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function b1(e,t){return(b1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function y1(e){return(y1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var w1=[{key:"不扩展",title:"不扩展"},{key:"向下扩展",title:"向下扩展"},{key:"向右扩展",title:"向右扩展"},{key:"双向扩展",title:"双向扩展"}],x1=function(){var e=r,t=kl;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&b1(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y1(e);n=t?(n=y1(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===A1(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){var e,t;if(this instanceof r)return t=w1.map((function(t){return s("div","".concat(pe,"-item")).on("click",(function(){e.setTitle(t.title),e.change(t)})).child(t.title)})),e=n.call.apply(n,[this,w1[0].title,"160px",!0,{titleClass:"".concat(pe,"-data_type--input"),headerClass:"".concat(pe,"-position--relative"),arrowClass:"".concat(pe,"-valuetype_arrowright")}].concat(function(e){return function(e){if(Array.isArray(e))return v1(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){var n;if(e)return"string"==typeof e?v1(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?v1(e,t):void 0}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t)));throw new TypeError("Cannot call a class as a function")}return e=r,Object.defineProperty(e,"prototype",{writable:!1}),e}();function C1(e){return(C1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function k1(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function E1(e,t){return(E1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function S1(e){return(S1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var _1=function(){var e=r,t=kX;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&E1(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=S1(e);n=t?(n=S1(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===C1(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){if(this instanceof r)return n.call(this,"expansion",null,null,null,{btnClass:"".concat(pe,"-font_item")});throw new TypeError("Cannot call a class as a function")}return e=r,(t=[{key:"getValue",value:function(e){return e.key}},{key:"dropdown",value:function(){return new x1}}])&&k1(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),r}();function O1(e){return(O1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function T1(e,t){return(T1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function D1(e){return(D1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var B1=function(){var e=r,t=SY;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&T1(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=D1(e);n=t?(n=D1(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===O1(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){if(this instanceof r)return n.call(this,"filter");throw new TypeError("Cannot call a class as a function")}return e=r,Object.defineProperty(e,"prototype",{writable:!1}),e}();function I1(e){return(I1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function M1(e,t){return(M1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function j1(e){return(j1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var N1=function(){var e=r,t=SY;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&M1(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=j1(e);n=t?(n=j1(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===I1(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){if(this instanceof r)return n.call(this,"warn");throw new TypeError("Cannot call a class as a function")}return e=r,Object.defineProperty(e,"prototype",{writable:!1}),e}();function F1(e){return(F1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function R1(e,t){return(R1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function P1(e){return(P1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var L1=function(){var e=r,t=SY;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&R1(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=P1(e);n=t?(n=P1(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===F1(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){if(this instanceof r)return n.call(this,"hyperlink");throw new TypeError("Cannot call a class as a function")}return e=r,Object.defineProperty(e,"prototype",{writable:!1}),e}();function U1(e){return(U1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function z1(e,t){return(z1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function H1(e){return(H1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var $1=function(){var e=r,t=SY;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&z1(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=H1(e);n=t?(n=H1(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===U1(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){if(this instanceof r)return n.call(this,"headerSetting");throw new TypeError("Cannot call a class as a function")}return e=r,Object.defineProperty(e,"prototype",{writable:!1}),e}();function Q1(e){return(Q1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function V1(e,t){return(V1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function q1(e){return(q1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var G1=function(){var e=r,t=SY;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&V1(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=q1(e);n=t?(n=q1(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===Q1(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){if(this instanceof r)return n.call(this,"reportSetting");throw new TypeError("Cannot call a class as a function")}return e=r,Object.defineProperty(e,"prototype",{writable:!1}),e}();function W1(e){return(W1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function K1(e,t){return(K1=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function Y1(e){return(Y1=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var X1=function(){var e=r,t=SY;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&K1(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Y1(e);n=t?(n=Y1(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===W1(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){if(this instanceof r)return n.call(this,"printSetting");throw new TypeError("Cannot call a class as a function")}return e=r,Object.defineProperty(e,"prototype",{writable:!1}),e}();function J1(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Z1=function(){function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.change=function(){},this.el=this.element()}var t,n;return t=e,(n=[{key:"element",value:function(){var e=this,t=new gG("数据面板",null,!1,{width:"90px"},null,null,(function(t){e.change("dataPanel",t)})),n=new gG("打印参考图",null,!1,{width:"90px"},null,null,(function(t){e.change("printImg",t)})),r=new gG("打印辅助线",null,!1,{width:"90px"},null,null,(function(t){e.change("printLine",t)})),i=new gG("分组管理",null,!1,{width:"90px"},null,null,(function(t){e.change("groupConfig",t)})),o=new gG("报表工具栏",null,!1,{width:"90px"},null,null,(function(t){e.change("toolbarButtons",t)})),a=new gG("查询面板",null,!1,{width:"90px"},null,null,(function(t){e.change("paramsPanel",t)}));return s("div").children(t.el,n.el,r.el,i.el,o.el,a.el).css({width:"270px",display:"flex",flexWrap:"wrap","flex-shrink":0})}}])&&J1(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function e0(e){return(e0="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function t0(e,t){return(t0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function n0(e){return(n0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var r0=function(){var e=r,t=SY;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&t0(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=n0(e);n=t?(n=n0(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===e0(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){if(this instanceof r)return n.call(this,"import");throw new TypeError("Cannot call a class as a function")}return e=r,Object.defineProperty(e,"prototype",{writable:!1}),e}();function i0(e){return(i0="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o0(e,t){return(o0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function a0(e){return(a0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var s0=function(){var e=r,t=SY;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&o0(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=a0(e);n=t?(n=a0(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===i0(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){if(this instanceof r)return n.call(this,"group");throw new TypeError("Cannot call a class as a function")}return e=r,Object.defineProperty(e,"prototype",{writable:!1}),e}();function u0(e){return(u0="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c0(e,t){return(c0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function l0(e){return(l0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var h0=function(){var e=r,t=SY;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c0(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=l0(e);n=t?(n=l0(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===u0(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){if(this instanceof r)return n.call(this,"chart");throw new TypeError("Cannot call a class as a function")}return e=r,Object.defineProperty(e,"prototype",{writable:!1}),e}();function f0(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}n(390);var d0=function(){function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.change=function(){},this.tag="模板中心",this.el=this.element()}var t,n;return t=e,(n=[{key:"element",value:function(){var e=this,t=new Vd(this.tag,{type:"primary"}),n=s("div","".concat(pe,"-template_buton")).children(t.el);return t.el.on("click",(function(){e.change(e.tag)})),n}}])&&f0(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function p0(e){return(p0="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function m0(e,t){return(m0=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function g0(e){return(g0=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var A0=function(){var e=r,t=SY;if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&m0(e,t);var n=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=g0(e);n=t?(n=g0(this).constructor,Reflect.construct(r,arguments,n)):r.apply(this,arguments),r=this;if(n&&("object"===p0(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");if(void 0!==r)return r;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}}(r);function r(){if(this instanceof r)return n.call(this,"insertImage");throw new TypeError("Cannot call a class as a function")}return e=r,Object.defineProperty(e,"prototype",{writable:!1}),e}();function v0(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var b0=[1,2],y0=function(){function e(t,n){var r=this,i=2<arguments.length&&void 0!==arguments[2]&&arguments[2],o=4<arguments.length?arguments[4]:void 0,a=5<arguments.length?arguments[5]:void 0,u=this,c=e;if(!(u instanceof c))throw new TypeError("Cannot call a class as a function");this.data=t,this.spreadSheet=o,this.change=function(){},this.widthFn=n,this.width=n(),this.isHide=i,this.totalWidth=1797,this.options=a,this.options.templateCenter&&(this.totalWidth=1900),t.defaultStyle(),this.items=[[this.pasteEl=new DY],[this.cutEl=new UY,this.copyEl=new QY],[this.redoEl=new WY,this.undoEl=new JY],[this.paintFormatEl=new pX],[this.clearFormatEl=new vX],this.d1El=new Gd,[this.fontEl=new TX,this.fontSizeEl=new jX,this.boldEl=new PX,this.italicEl=new HX,this.strikeEl=new WX,this.underlineEl=new eJ,this.borderEl=new lJ,this.fillColorEl=new mJ,this.textColorEl=new oJ,this.slashEl=new bJ],this.d2El=new Gd,[this.valignTopEl=new _J,this.valignMiddleEl=new BJ,this.valignBottomEl=new NJ,this.indentEl=new zJ,this.alignLeftEl=new CJ,this.alignCenterEl=new VJ,this.alignRightEl=new KJ,this.indentREl=new tZ],[this.mergeEl=new aZ],this.d3El=new Gd,[this.dataTypeEl=new mZ,this.valueTypeEl=new EZ],[this.sheetSettingEl=new TZ],[this.dataCellTypeEl=new g1,this.expansionEl=new _1],[this.filterEl=new B1],[this.warnEl=new N1],[this.hyperlinkEl=new L1],this.d4El=new Gd,[this.headerSettingEl=new $1],[this.reportSettingEl=new G1],[this.printSettingEl=new X1],[this.importEl=new r0,this.groupEl=new s0,this.waterMaskImageEl=new A0,this.chartEl=new h0],this.d5El=new Gd,[this.checksEl=new Z1]],this.options.templateCenter&&this.items.push([this.templateCenter=new d0]),this.step=this.widthFn()-40,this.tel=s("div","".concat(pe,"-toolbar")),this.srightEl=s("div","".concat(pe,"-scroll_right")).children(s("div").css({display:"flex",height:"100%"}).innerHTML('<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M340.864 149.312a30.592 30.592 0 0 0 0 42.752L652.736 512 340.864 831.872a30.592 30.592 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"></path></svg>')).on("click",(function(){var e=r.widthFn(),t=ve()(r.tel.el).css("left"),n=parseInt(t);(n=(t=Math.abs(n))+e)<r.totalWidth&&(n=(n=r.totalWidth-n)<r.step?t+n:t+r.step,ve()(r.tel.el).animate({left:-n+"px"},"normal","swing"),n+e<r.totalWidth?r.sleftEl.show():n+e==r.totalWidth&&(r.srightEl.hide(),r.sleftEl.show()))})),this.sleftEl=s("div","".concat(pe,"-scroll_left")).children(s("div").css({display:"flex",height:"100%"}).innerHTML('<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M609.408 149.376 277.76 489.6a32 32 0 0 0 0 44.672l331.648 340.352a29.12 29.12 0 0 0 41.728 0 30.592 30.592 0 0 0 0-42.752L339.264 511.936l311.872-319.872a30.592 30.592 0 0 0 0-42.688 29.12 29.12 0 0 0-41.728 0z"></path></svg>')).on("click",(function(){var e,t=r.widthFn(),n=ve()(r.tel.el).css("left"),i=parseInt(n);(i=n=Math.abs(i))<r.totalWidth&&(e=0,e=i>=r.step?n-r.step:n-i,ve()(r.tel.el).animate({left:-e+"px"},"normal","swing"),0==(e=Math.abs(e))?(r.sleftEl.hide(),r.srightEl.show()):e+t<r.totalWidth&&r.srightEl.show())})),this.el=s("div","".concat(pe,"-toolbar-scroll")).children(this.sleftEl,this.tel,this.srightEl),function(){var e=this;this.items.forEach((function(t,n){var r,i;Array.isArray(t)?(r=e.tel,b0.includes(n)?(i=s("div","".concat(pe,"-direction-column_item")),r.child(i.el),r=i):6==n?(i=s("div","".concat(pe,"-cell-config_item")),r.child(i.el),r=i):8==n?(i=s("div","".concat(pe,"-cell-config_item ").concat(pe,"-width--91")),r.child(i.el),r=i):11==n?(i=s("div","".concat(pe,"-cell-config_item ").concat(pe,"-width--150")),r.child(i.el),r=i):13==n&&(i=s("div","".concat(pe,"-cell-config_item ").concat(pe,"-width--121")),r.child(i.el),r=i),t.forEach((function(t){r.child(t.el),t.change=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=(o=[].concat(n))[0],o=o[1];"indent"==i?e.indentREl.setValue(o):"indentReduce"==i?e.indentEl.setValue(o):"align"==i&&"left"==o?(e.alignRightEl.addActive(!1),e.alignCenterEl.addActive(!1)):"align"==i&&"right"==o?(e.alignLeftEl.addActive(!1),e.alignCenterEl.addActive(!1)):"align"==i&&"center"==o?(e.alignLeftEl.addActive(!1),e.alignRightEl.addActive(!1)):"valign"==i&&"top"==o?(e.valignBottomEl.addActive(!1),e.valignMiddleEl.addActive(!1)):"valign"==i&&"middle"==o?(e.valignTopEl.addActive(!1),e.valignBottomEl.addActive(!1)):"valign"==i&&"bottom"==o&&(e.valignTopEl.addActive(!1),e.valignMiddleEl.addActive(!1)),e.change.apply(e,n)}}))):e.tel.child(t.el)}))}.call(this),this.redoEl.el.hide(),this.undoEl.el.hide(),i?this.el.hide():this.reset(),this.sleftEl.hide(),this.srightEl.hide(),this.widthFn()<this.totalWidth&&this.srightEl.show()}var t,n;return t=e,(n=[{key:"setDataType",value:function(e){}},{key:"childNode",value:function(){}},{key:"paintformatActive",value:function(){return this.paintFormatEl.active()}},{key:"paintformatToggle",value:function(){this.paintFormatEl.toggle()}},{key:"trigger",value:function(e){this["".concat(e,"El")].click()}},{key:"resetData",value:function(e){this.data=e,this.reset()}},{key:"reset",value:function(){var e,t;this.isHide||(t=this.data,e=(t=this.spreadSheet.sheet.data).getSelectedCellStyle(),this.mergeEl.setState(t.canUnmerge(),!t.selector.multiple()),t=e.font,this.fontEl.setState(t.name),this.fontSizeEl.setState(t.size),this.boldEl.setState(t.bold),this.italicEl.setState(t.italic),this.underlineEl.setState(e.underline),this.strikeEl.setState(e.strike),this.textColorEl.setState(e.color),this.fillColorEl.setState(e.bgcolor),"top"==e.valign?(this.valignTopEl.addActive(!0),this.valignBottomEl.addActive(!1),this.valignMiddleEl.addActive(!1)):"middle"==e.valign?(this.valignTopEl.addActive(!1),this.valignBottomEl.addActive(!1),this.valignMiddleEl.addActive(!0)):"bottom"==e.valign&&(this.valignTopEl.addActive(!1),this.valignBottomEl.addActive(!0),this.valignMiddleEl.addActive(!1)),"left"==e.align?(this.alignRightEl.addActive(!1),this.alignCenterEl.addActive(!1),this.alignLeftEl.addActive(!0)):"right"==e.align?(this.alignRightEl.addActive(!0),this.alignCenterEl.addActive(!1),this.alignLeftEl.addActive(!1)):"center"==e.align&&(this.alignRightEl.addActive(!1),this.alignCenterEl.addActive(!0),this.alignLeftEl.addActive(!1)))}}])&&v0(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function w0(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}n(391),n(392),n(393),n(394);var x0={success:'<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896zm-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.272 38.272 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336L456.192 600.384z"></path></svg>',error:'<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896zm0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336L512 457.664z"></path></svg>',info:'<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M512 64a448 448 0 1 1 0 896.064A448 448 0 0 1 512 64zm67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344zM590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.992 12.992 0 0 1-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 0 1 7.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z"></path></svg>',warning:'<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896zm0 192a58.432 58.432 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.432 58.432 0 0 0 512 256zm0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4z"></path></svg>'},C0={duration:3e3,type:"error",message:"错了哦，这是一条错误消息"},k0=("".concat(pe,"-message--error"),"".concat(pe,"-message--info"),"".concat(pe,"-message--success"),"".concat(pe,"-message--warning"),function(){function e(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},n=this,r=e;if(!(n instanceof r))throw new TypeError("Cannot call a class as a function");n=document.body,this.parent=n,this.options=Wu(C0,t),this.el=this.init(),this.parent.appendChild(this.el.el),r=this.options.duration,this.initStyle(),r&&this.durationDestory()}var t,n;return t=e,(n=[{key:"init",value:function(){return s("div","".concat(pe,"-message")).children(s("i","".concat(pe,"-message__icon")).innerHTML(x0[this.options.type]),s("p","".concat(pe,"-message__content")).innerHTML(this.options.message))}},{key:"initStyle",value:function(){var e=this.options.type,t="".concat(pe,"-message--").concat(e),n=(e="".concat(pe,"-icon-").concat(e),ve()(this.el.el));n.addClass(t),n.find(".".concat(pe,"-message__icon")).addClass(e)}},{key:"durationDestory",value:function(){var e=this;setTimeout((function(){e.destory()}),this.options.duration)}},{key:"destory",value:function(){this.parent.removeChild(this.el.el)}}])&&w0(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}());function E0(e,t){var n,r,i,o,a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(a)return r=!(n=!0),{s:function(){a=a.call(e)},n:function(){var e=a.next();return n=e.done,e},e:function(e){r=!0,i=e},f:function(){try{n||null==a.return||a.return()}finally{if(r)throw i}}};if(Array.isArray(e)||(a=function(e,t){var n;if(e)return"string"==typeof e?S0(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?S0(e,t):void 0}(e))||t&&e&&"number"==typeof e.length)return a&&(e=a),o=0,{s:t=function(){},n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function S0(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _0(e,t,n){var r=e.getCurrentSheet(),i=null,o=(n=(o=i=function(e){return e=e.getData().rows,!(Object.keys(e).length<1)}(r)?r.contentRange():{sri:0,sci:0,eri:0,eci:0,h:0,w:0},(n=n)&&n.config&&(n=n.config,B0(n.repeatRowHead,o),B0(n.repeatRowFoot,o)),[]),{sri:i.sri,sci:i.sci,eri:i.eri-1,eci:i.eci-1,children:[]});e=function(e,t){for(var n=!1,r=t.sheet.data,i=(t=e.sri,e.sci),o=e.eri,a=e.eci,s=t;s<=o;s++)for(var u=i;u<=a;u++){var c=r.getCell(s,u);if(c&&c.bindObj&&c.bindObj.dataList){n=!0;break}}return n}(i,e);return o.noagg=e,t&&t["系统自动分组"]&&(o.filter=t["系统自动分组"]),n.push(o),eachData(r,i,n,e),function e(t,n,r){var i,o=E0(t);try{for(o.s();!(i=o.n()).done;){var a=i.value;if(I0(a))try{a.sri=0,a.sci=0;var s=M0(r),u=s.ri,c=s.ci;a.eri=u,a.eci=c}catch(t){}a.position="".concat(n(a.sci,a.sri),":").concat(n(a.eci,a.eri)),delete a.sri,delete a.eri,delete a.sci,delete a.eci,a.children&&e(a.children,n)}}catch(t){o.e(t)}finally{o.f()}}(n,u.e),n}function O0(e){return 0<(e=T0(e))?e-.5:.5}function T0(e){return parseInt(e*j0(),10)}function D0(e,t){if(0!=e.length){for(var n,r,i,o,a,s,u,c,l,h,f,d=0;d<e.length;d++)r=t,u=void 0,i=(n=e[d]).sri,o=n.sci,a=n.eri,s=n.eci,n.borderColor&&n.bgColor||(u=Math.floor(Math.random()*o1.length),n.borderColor=o1[u],n.bgColor=a1[u]),u=r.sheet.data,c=r.sheet.table.draw,l={ri:n.sri,ci:n.eci},h={ri:n.eri,ci:n.sci},(f=u.viewRange()).sri<=0?(f.sci>=o||(N0(c,u,i,o,"leftTop",n.borderColor,r),N0(c,u,h.ri+1,h.ci,"leftBottom",n.borderColor,r)),f.sci>s||(N0(c,u,a+1,s+1,"rightBottom",n.borderColor,r),N0(c,u,l.ri,l.ci+1,"rightTop",n.borderColor,r))):(f.sri>=i||(N0(c,u,i,o,"leftTop",n.borderColor,r),N0(c,u,l.ri,l.ci+1,"rightTop",n.borderColor,r)),f.sri>a||(N0(c,u,a+1,s+1,"rightBottom",n.borderColor,r),N0(c,u,h.ri+1,h.ci,"leftBottom",n.borderColor,r))),e[d].children&&D0(e[d].children,t);return e}}var B0=function(e,t){var n,r;e&&e.enable&&(n=e.end,r=e.start,isNaN(n)||1!=e.type||(t.sri=Number(n)),isNaN(r)||3!=e.type||(t.eri=Number(r)-1))},I0=function(e){for(var t=0,n=["sri","sci","eri","eci"];t<n.length;t++){var r=e[n[t]];if(isNaN(r)||null==r)return!0}return!1},M0=function(e){var t,n=1;for(t in e.cols._){var r=Number(t);n<r&&(n=r)}var i,o=1;for(i in e.rows._){var a=Number(i);o<a&&(o=a)}return{ri:o,ci:n}},j0=function(){return window.tizdata_dpr_param},N0=function(e,t,n,r,i,o,a){t.cols.indexWidth,t.rows.height,a=a.sheet.table.getDrawBox(t,n,r,0),e.ctx.save(),e.ctx.beginPath(),function(e,t,n,r,i){var o,a,s,u,c,l;"leftTop"==e&&(o=t,a=(s=n).x,s=s.y,o.ctx.moveTo(O0(a),O0(s-1)),o.ctx.lineTo(O0(a)+T0(20),O0(s-1)),o.ctx.moveTo(O0(a),O0(s-1)),o.ctx.lineTo(O0(a),O0(s-1)+T0(20))),"rightTop"==e&&(o=t,s=(a=n).x,a=a.y,o.ctx.moveTo(O0(s),O0(a-1)),o.ctx.lineTo(O0(s)-T0(20),O0(a-1)),o.ctx.moveTo(O0(s),O0(a-1)),o.ctx.lineTo(O0(s),O0(a-1)+T0(20))),"leftBottom"==e&&(u=t,c=(l=n).x,l=l.y,u.ctx.moveTo(O0(c),O0(l)),u.ctx.lineTo(O0(c)+T0(20),O0(l)),u.ctx.moveTo(O0(c),O0(l)),u.ctx.lineTo(O0(c),O0(l)-T0(20))),"rightBottom"==e&&(u=t,l=(c=n).x,c=c.y,u.ctx.moveTo(O0(l),O0(c)),u.ctx.lineTo(O0(l)-T0(20),O0(c)),u.ctx.moveTo(O0(l),O0(c)),u.ctx.lineTo(O0(l),O0(c)-T0(20)))}(i,e,a),e.ctx.lineWidth=T0(1),e.ctx.strokeStyle=o,e.ctx.lineCap="round",e.ctx.stroke(),e.ctx.restore()},F0=function(e,t){return e.sri==t.sri&&e.sci==t.sci&&e.eri==t.eri&&e.eci==t.eci},R0=function(e,t){return e.sci<=t.sci&&e.eci>=t.eci&&e.sri<=t.sri&&e.eri>=t.eri?0:e.sci>=t.sci&&e.eci<=t.eci&&e.sri>=t.sri&&e.eri<=t.eri?1:e.sci>t.eci||e.eci<t.sci||e.sri>t.eri||e.eri<t.sri?2:3};function P0(e,t){var n,r,i,o,a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(a)return r=!(n=!0),{s:function(){a=a.call(e)},n:function(){var e=a.next();return n=e.done,e},e:function(e){r=!0,i=e},f:function(){try{n||null==a.return||a.return()}finally{if(r)throw i}}};if(Array.isArray(e)||(a=function(e,t){var n;if(e)return"string"==typeof e?L0(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?L0(e,t):void 0}(e))||t&&e&&"number"==typeof e.length)return a&&(e=a),o=0,{s:t=function(){},n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function L0(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function U0(e,t,n,r){for(var i=e.sri,o=e.sci,a=e.eri,s=e.eci,u=t.styles,c=i;c<=a;c++)for(var l=o;l<=s;l++){var h,f,d,p,m=q0(n),g=t.getCell(c,l);for(p in m.bindObj&&(d=m.bindObj,g&&g.bindObj&&("aggregate"in d&&r&&(h=g.bindObj.data_type||3,d.aggregate=2==h?1:4),2!=d.changeType&&delete g.bindObj.aggregate,d=function(e,t){return e=e.bindObj,"merge"in t?(delete e.aggregate,delete e.dataList):"aggregate"in t?(delete e.merge,delete e.dataList):"dataList"in t&&(delete e.merge,delete e.aggregate),Object.assign(e,t)}(g,d),t.setCellConfig(c,l,"bindObj",d))),g&&g.bindObj||2!=m.valueType||(h=m.text||"",t.setCellConfig(c,l,"text",h),delete m.text),m.slash&&(m.editable=!0,t.setCellConfig(c,l,"bindObj",null),t.setCellConfig(c,l,"text","")),m.style&&(d=null,f=_.cloneDeep(m.style),g&&null!=g.style&&(g=_.cloneDeep(u[g.style]))&&(f=Object.assign(g,f)),null!=(d=t.addStyle(f))?m.style=d:delete m.style),m)"bindObj"!=p&&t.setCellConfig(c,l,p,m[p])}}function z0(e,t){for(var n=null,r=ve()(e).find("input[name^=".concat(t,"]")),i=0;i<r.length;i++){var o=r[i];if(o.checked){n=o.value;break}}return n}function H0(e,t,n){for(var r=ve()(e).find("input[name^=".concat(t,"]")),i=0;i<r.length;i++){var o=r[i];o.value==n?ve()(o).prop("checked","checked"):ve()(o).removeProp("checked")}}function $0(e,t){e=e.spreadSheet;var n=(e=J0(e)).range,r=(e=e.dataProxy,n.sri);n=n.sci,r=e.getCell(r,n),n=e.styles,e={};return r?(-1!=e1.indexOf(t)?r&&"style"in r&&(e=n[r.style].format||{}):"条形码"==t?r&&12==r.valueType&&(e={barCodeType:r.barCodeType||1}):"二维码"==t?r&&3==r.valueType&&(e={codeType:r.codeType||1}):"图片"==t&&(r.bindObj?e.imgUrlType=1:e.imgUrlType=2,e.text=r.text),e):null}function Q0(e,t){var n,r;e.style&&(n=(r=J0(t)).range,r=r.dataProxy,e.name in FZ?t.sheet.data.setSelectedCellFormat(e.style,FZ[e.name]):"条形码"==e.name?U0(n,r,t={valueType:12,barCodeType:e.style.barCodeType||1},!0):"二维码"==e.name?U0(n,r,t={valueType:3,codeType:e.style.codeType||1},!0):"图片"==e.name&&U0(n,r,t={valueType:2,scaleType:e.style.scaleType,text:e.style.text},!0))}function V0(){for(var e=[],t=3;t<=42;t++)e.push({value:t,name:t+"px"});return e}var q0=function(e){return JSON.parse(JSON.stringify(e))},G0={text:"value",valueType:"valueType",wrapType:"wrapType",Expansion:"expansion",placeholder:"placeholder",collapsible:"collapsible",style:"styleIndex",penetrate:"penetrate",editable:"editable",scaleType:"scaleType",warn:"warn",customIcon:"customIcon",slash:"slash",bindObj:"dataConfig",PenetrateDict:"PenetrateDict",type:"type",controlType:"controlType",btnText:"btnText",btnStyle:"btnStyle",clickType:"clickType",script:"script",barCodeType:"barCodeType",barCodeValue:"barCodeValue",dataCellMerge:"dataCellMerge",dataType:"dataType",links:"links",waterMaskImageConfig:"waterMaskImageConfig"};function W0(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function K0(e){var t,n,r,i=!1;return e&&(t=(e=e.sheet.selector.range).sri,n=e.eri,r=e.sci,e=e.eci,i=t!=n||r!=e),i}function Y0(e){var t,n=e.sheet.selector.range,r=(e=e.sheet.data,n.sri),i=n.sci,o=n.eri;n=n.eci;return!(!(e=e.getCell(r,i))||!e.merge)&&(t=(e=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(e,t)||function(e,t){var n;if(e)return"string"==typeof e?W0(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?W0(e,t):void 0}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e.merge,2))[0],e=e[1],r+t==o&&i+e==n)}function X0(e){if(e){if(2==e.type)return 1;if(e.bindObj)return 1}}var J0=function(e){return{range:e.sheet.selector.range,dataProxy:e.sheet.data}};function Z0(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}n(395),n(396);var e2=function(){function e(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],n=1<arguments.length?arguments[1]:void 0,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},i=3<arguments.length&&void 0!==arguments[3]&&arguments[3],o=4<arguments.length&&void 0!==arguments[4]?arguments[4]:{},a=5<arguments.length?arguments[5]:void 0,s=this,u=e;if(!(s instanceof u))throw new TypeError("Cannot call a class as a function");this.style=r,this.options=t,this.el=this.init(),this.value=n,this.selectizeEl=null,this.$select=null,this.disabled=i,this.event=o,this.render=a}var t,n;return t=e,(n=[{key:"getValue",value:function(){return this.selectizeEl.getValue()}},{key:"setValue",value:function(e){this.selectizeEl&&this.selectizeEl.setValue(e)}},{key:"enable",value:function(){this.selectizeEl&&this.selectizeEl.enable()}},{key:"refreshItems",value:function(){this.selectizeEl&&this.selectizeEl.refreshItems()}},{key:"refreshOptions",value:function(e){this.selectizeEl&&this.selectizeEl.refreshOptions(e)}},{key:"clearOptions",value:function(e){this.selectizeEl&&this.selectizeEl.clearOptions(e)}},{key:"updateOption",value:function(e,t){this.selectizeEl&&this.selectizeEl.updateOption(e,t),this.addOptionsTitle()}},{key:"disable",value:function(){this.selectizeEl&&this.selectizeEl.disable()}},{key:"addOption",value:function(e){this.selectizeEl&&this.selectizeEl.addOption(e),this.addOptionsTitle()}},{key:"refreshState",value:function(){this.selectizeEl&&this.selectizeEl.refreshState()}},{key:"resetOptions",value:function(e,t){this.setValue(""),this.clearOptions(!1),this.addOption(e),this.setValue(t)}},{key:"addOptionsTitle",value:function(){try{var e=this.$select;setTimeout((function(){var t;e&&e[0]&&(t=e[0]).selectize&&t.selectize.$dropdown_content&&(t=t.selectize.$dropdown_content,ve.a.each(t,(function(e,t){t=ve()(t).find(".option"),ve.a.each(t,(function(e,t){var n=ve()(t).html();ve()(t).attr({title:n})}))})))}))}catch(e){}}},{key:"setup",value:function(e){var t=this,n=Wu(n={options:this.options,valueField:"value",labelField:"name",searchField:"name"},this.event);this.render&&(n.render=this.render),e=e||this.style,n=ve()(this.el.el).selectize(n);(n=(this.$select=n,this.selectizeEl=n[0].selectize,null!=this.value&&null!=this.value&&this.setValue(this.value),e&&this.initHeight(e),this.disabled?this.disable():this.enable(),ve()(this.$select.next().find(".selectize-input")[0])))&&n.on("click",(function(){setTimeout((function(){t.addOptionsTitle()}))}))}},{key:"initHeight",value:function(e){delete(e=e||this.style).display,this.$select.next().css(e),this.$select.next().find(".selectize-input").css(e)}},{key:"selectInputInitStyle",value:function(e){ve()(this.$select.next().find(".selectize-input")[0]).css(e)}},{key:"init",value:function(){return s("select","".concat(pe,"-select")).css(this.style)}},{key:"removeAll",value:function(){this.el.el.options.length=0}},{key:"remove",value:function(e){this.el.el.remove(e)}},{key:"getCurrentIndex",value:function(){return this.el.el.selectedIndex}},{key:"currentSelect",value:function(){var e=this.getCurrentIndex();return dom.options[e]}},{key:"getCurrentValue",value:function(){return this.currentSelect().value}},{key:"getCurrentLabel",value:function(){return this.currentSelect().text}},{key:"changeOption",value:function(e,t){var n=this.el.el,r=t.name;t=t.value;n.options[e]=new Option(r,t)}},{key:"hide",value:function(){this.el.hide()}},{key:"show",value:function(){this.el.show()}}])&&Z0(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function t2(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var n2=function(){function e(t){var n=this;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.$parent=t,this.sheetSlash={text:"",type:0,lineStyle:"thin",lineColor:"#000"},this.textInputEl=s("input","".concat(pe,"-ui-input")).attr({is:"ui-input",width:"100%"}).on("input",(function(e){n.sheetSlash.text=e.target.value})),this.textEl=s("div","".concat(pe,"-ui-form-item")).children(s("label","".concat(pe,"-ui-form-item__label ").concat(pe,"-label-font--14")).html("斜线文字：").css("width","70px"),s("div","".concat(pe,"-ui-form-item__content")).children(this.textInputEl,s("span","".concat(pe,"-slash-tip")).html("提示：输入斜线文字，以‘|’分割，例如 部门|业务员"))),this.typeRadioEl=s("div","".concat(pe,"-flex--center")).children(s("input").attr({type:"radio",id:"r1",name:"type",value:0}),s("label").attr({for:"r1"}).html("从左上到右下发散").css("marginRight","10px"),s("input").attr({type:"radio",id:"r2",name:"type",value:1}),s("label").attr({for:"r2"}).html("从左下到右上发散")),this.typeEl=s("div","".concat(pe,"-ui-form-item")).children(s("label","".concat(pe,"-ui-form-item__label ").concat(pe,"-label-font--14")).html("斜线方式：").css("width","70px"),this.typeRadioEl),H0(this.typeRadioEl.el,"type",this.sheetSlash.type),this.lineStyleSelectEl=new e2(LZ,this.sheetSlash.lineStyle,{width:"215px",height:"30px"},!1,{onChange:function(e){n.sheetSlash.lineStyle=e}}),this.lineStyleEl=s("div","".concat(pe,"-ui-form-item")).children(s("label","".concat(pe,"-ui-form-item__label ").concat(pe,"-label-font--14")).html("斜线样式：").css("width","70px"),this.lineStyleSelectEl.el),this.colorPalette=new Ol,this.colorPalette.change=function(e){n.sheetSlash.lineColor=e,n.color_inner.css("background",n.sheetSlash.lineColor)},this.color_inner=s("div","".concat(pe,"-picker_color-inner")),this.colorEl=s("div","".concat(pe,"-picker_trigger")).children(this.color_inner.css("background",this.sheetSlash.lineColor).children(s("div","".concat(pe,"-picker_show")),this.colorPalette.el).on("click",(function(e){e.preventDefault(),n.colorPalette.show()}))),this.colorPalette.el.hide(),this.lineColorEl=s("div","".concat(pe,"-ui-form-item")).children(s("label","".concat(pe,"-ui-form-item__label ").concat(pe,"-label-font--14")).html("斜线颜色：").css("width","70px"),this.colorEl.el),this.contentEl=s("div","").children(this.textEl,this.typeEl,this.lineStyleEl,this.lineColorEl);var r=this;this.el=new Dialog({title:"斜线",content:this.contentEl.el,buttons:[{value:"取消",type:" ",className:"".concat(pe,"-slash_button"),events:function(){r.hide()}},{value:"确定",type:"primary",className:"".concat(pe,"-slash_button"),events:function(){r.submit(),r.hide()}}],width:"440px",height:"317px"}),this.el.element.title.classList.add("".concat(pe,"-dialog_title")),this.lineStyleSelectEl.setup(),this.hide()}var t,n;return t=e,(n=[{key:"show",value:function(){var e,t,n=this.$parent.spreadSheet,r=(i=J0(n)).range,i=i.dataProxy;(n=(t=!Y0(n)&&K0(n)?(n=Object(u.e)(r.sci,r.sri),e=Object(u.e)(r.eci,r.eri),"".concat(n,"-").concat(e)):Object(u.e)(r.sci,r.sri),this.setTitle(t),i.getCell(r.sri,r.sci)))&&n.slash?this.setSheetSlash(n.slash):this.setSheetSlash({text:"",type:0,lineStyle:"thin",lineColor:"#000"}),this.el.show()}},{key:"hide",value:function(){this.el.hide(),this.reset()}},{key:"reset",value:function(){this.sheetSlash={text:"",type:0,lineStyle:"thin",lineColor:"#000"}}},{key:"submit",value:function(){var e=this.$parent.spreadSheet;U0((e=J0(e)).range,e=e.dataProxy,{slash:q0(this.sheetSlash)}),this.$parent.sheetRender()}},{key:"setTitle",value:function(e){this.el.params.title="斜线【".concat(e,"】")}},{key:"setSheetSlash",value:function(e){this.sheetSlash=e,ve()(this.textInputEl.el).val(this.sheetSlash.text),H0(this.typeRadioEl.el,"type",this.sheetSlash.type),this.lineStyleSelectEl.setValue(this.sheetSlash.lineStyle),this.color_inner.css("background",this.sheetSlash.lineColor),this.colorPalette.picker.initColor(this.sheetSlash.lineColor)}}])&&t2(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function r2(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i2=function(){function e(t){var n=this;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.$parent=t,this.formats={addPreText:"",addNextText:"",removePreText:"",removeNextText:"",replaceNullText:{type:0,value:""}},this.addPreInputEl=s("input","".concat(pe,"-ui-input")).attr({is:"ui-input",width:"100%",placeholder:"请输入"}).on("input",(function(e){n.formats.addPreText=e.target.value})),this.addPreEl=s("div","".concat(pe,"-ui-form-item")).children(s("label","".concat(pe,"-ui-form-item__label ").concat(pe,"-label-font--14")).html("添加前缀：").css("width","85px"),s("div","".concat(pe,"-ui-form-item__content")).children(this.addPreInputEl)).css("marginTop","10px"),this.addNextInputEl=s("input","".concat(pe,"-ui-input")).attr({is:"ui-input",width:"100%",placeholder:"请输入"}).on("input",(function(e){n.formats.addNextText=e.target.value})),this.addNextEl=s("div","".concat(pe,"-ui-form-item")).children(s("label","".concat(pe,"-ui-form-item__label ").concat(pe,"-label-font--14")).html("添加后缀：").css("width","85px"),s("div","".concat(pe,"-ui-form-item__content")).children(this.addNextInputEl)).css("marginTop","10px"),this.removePreInputEl=s("input","".concat(pe,"-ui-input")).attr({is:"ui-input",width:"100%",placeholder:"请输入"}).on("input",(function(e){n.formats.removePreText=e.target.value})),this.removePreEl=s("div","".concat(pe,"-ui-form-item")).children(s("label","".concat(pe,"-ui-form-item__label ").concat(pe,"-label-font--14")).html("去除前缀：").css("width","85px"),s("div","".concat(pe,"-ui-form-item__content")).children(this.removePreInputEl)).css("marginTop","10px"),this.removeNextInputEl=s("input","".concat(pe,"-ui-input")).attr({is:"ui-input",width:"100%",placeholder:"请输入"}).on("input",(function(e){n.formats.removeNextText=e.target.value})),this.removeNextEl=s("div","".concat(pe,"-ui-form-item")).children(s("label","".concat(pe,"-ui-form-item__label ").concat(pe,"-label-font--14")).html("去除前缀：").css("width","85px"),s("div","".concat(pe,"-ui-form-item__content")).children(this.removeNextInputEl)).css("marginTop","10px"),this.replaceNullInputEl=s("input","".concat(pe,"-ui-input")).attr({is:"ui-input",width:"100%",placeholder:"请输入"}).on("input",(function(e){n.formats.replaceNullText.value=e.target.value})),this.replaceNullInputEl.hide(),this.replaceNullSwitchEl=s("input","".concat(pe,"-strf-switch")).attr({is:"ui-switch",type:"checkbox"}).css("height","20px").on("change",(function(e){(e=e.target.checked)?n.replaceNullInputEl.show():n.replaceNullInputEl.hide(),n.formats.replaceNullText.type=Number(e)})),this.replaceNullEl=s("div","".concat(pe,"-ui-form-item")).children(s("label","".concat(pe,"-ui-form-item__label ").concat(pe,"-label-font--14")).html("空值替换：").css("width","85px"),s("div","".concat(pe,"-ui-form-item__content")).children(this.replaceNullSwitchEl,this.replaceNullInputEl).css("flex-wrap","nowrap")).css("marginTop","10px"),this.contentEl=s("div","").children(s("span").html("说明：将单元格中的内容按文本字符串进行显示。").css("marginBottom","10px"),this.addPreEl,this.addNextEl,this.removePreEl,this.removeNextEl,this.replaceNullEl);var r=this;this.el=new Dialog({title:"【文本】-元素格式设置",content:this.contentEl.el,buttons:[{value:"取消",type:" ",className:"".concat(pe,"-slash_button"),events:function(){r.hide()}},{value:"确定",type:"primary",className:"".concat(pe,"-slash_button"),events:function(){r.save(),r.hide()}}],width:"500px",height:"357px"}),this.el.element.title.classList.add("".concat(pe,"-dialog_title")),this.hide()}var t,n;return t=e,(n=[{key:"show",value:function(){var e=this.$parent.toolbar.valueTypeEl.getTitle();(e=(e=$0(this.$parent,e))||{addPreText:"",addNextText:"",removePreText:"",removeNextText:"",replaceNullText:{type:0,value:""}})&&(this.setValue(e),this.el.show())}},{key:"hide",value:function(){this.el.hide(),this.reset()}},{key:"save",value:function(){Q0({name:"文本",style:this.formats},this.$parent.spreadSheet),this.$parent.sheetRender()}},{key:"reset",value:function(){this.formats={addPreText:"",addNextText:"",removePreText:"",removeNextText:"",replaceNullText:{type:0,value:""}}}},{key:"setValue",value:function(e){this.formats=Object.assign({addPreText:"",addNextText:"",removePreText:"",removeNextText:"",replaceNullText:{type:0,value:""}},e),ve()(this.addPreInputEl.el).val(this.formats.addPreText),ve()(this.addNextInputEl.el).val(this.formats.addNextText),ve()(this.removePreInputEl.el).val(this.formats.removePreText),ve()(this.removeNextInputEl.el).val(this.formats.removeNextText),ve()(this.replaceNullInputEl.el).val(this.formats.replaceNullText.value),this.replaceNullSwitchEl.el.checked=this.formats.replaceNullText.type}}])&&r2(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function o2(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var a2=function(){function e(t){var n=this;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.$parent=t,this.formats={quantile:0,multiplying:0,decimal:0,minus:0,addPreText:"",addNextText:"",replaceNullText:{type:0,value:""}},this.quantileRadioEl=s("div","".concat(pe,"-flex--center")).children(s("input").attr({type:"radio",id:"r1",name:"quantile",value:0}),s("label").attr({for:"r1"}).html("默认").css("marginRight","32px"),s("input").attr({type:"radio",id:"r2",name:"quantile",value:1}),s("label").attr({for:"r2"}).html("千分位").css("marginRight","32px"),s("input").attr({type:"radio",id:"r3",name:"quantile",value:1}),s("label").attr({for:"r3"}).html("万分位")),this.quantileEl=s("div","".concat(pe,"-ui-form-item")).children(s("label","".concat(pe,"-ui-form-item__label ").concat(pe,"-label-font--14")).html("分位：").css("width","85px"),this.quantileRadioEl).css("marginTop","10px"),H0(this.quantileRadioEl.el,"quantile",this.formats.quantile),this.mulSelectEl=new e2(QZ,this.formats.multiplying,{width:"100%",height:"30px"},!1,{onChange:function(e){n.formats.multiplying=e}}),this.mulEl=s("div","".concat(pe,"-ui-form-item")).children(s("label","".concat(pe,"-ui-form-item__label ").concat(pe,"-label-font--14")).html("倍率：").css("width","85px"),this.mulSelectEl.el),this.decimalSelectEl=new e2(VZ,this.formats.decimal,{width:"100%",height:"30px"},!1,{onChange:function(e){n.formats.decimal=e}}),this.decimalEl=s("div","".concat(pe,"-ui-form-item")).children(s("label","".concat(pe,"-ui-form-item__label ").concat(pe,"-label-font--14")).html("小数位：").css("width","85px"),this.decimalSelectEl.el),this.minusRadioEl=s("div","".concat(pe,"-flex--center")).children(s("input").attr({type:"radio",id:"r1",name:"minus",value:0}),s("label").attr({for:"r1"}).html("默认").css("marginRight","32px"),s("input").attr({type:"radio",id:"r2",name:"minus",value:1}),s("label").attr({for:"r2"}).html("加()")),this.minusEl=s("div","".concat(pe,"-ui-form-item")).children(s("label","".concat(pe,"-ui-form-item__label ").concat(pe,"-label-font--14")).html("负数样式：").css("width","85px"),this.minusRadioEl.el),H0(this.minusRadioEl.el,"minus",this.formats.minus),this.addPreInputEl=s("input","".concat(pe,"-ui-input")).attr({is:"ui-input",width:"100%",placeholder:"请输入"}).on("input",(function(e){n.formats.addPreText=e.target.value})),this.addPreEl=s("div","".concat(pe,"-ui-form-item")).children(s("label","".concat(pe,"-ui-form-item__label ").concat(pe,"-label-font--14")).html("添加前缀：").css("width","85px"),s("div","".concat(pe,"-ui-form-item__content")).children(this.addPreInputEl)),this.addNextInputEl=s("input","".concat(pe,"-ui-input")).attr({is:"ui-input",width:"100%",placeholder:"请输入"}).on("input",(function(e){n.formats.addNextText=e.target.value})),this.addNextEl=s("div","".concat(pe,"-ui-form-item")).children(s("label","".concat(pe,"-ui-form-item__label ").concat(pe,"-label-font--14")).html("添加后缀：").css("width","85px"),s("div","".concat(pe,"-ui-form-item__content")).children(this.addNextInputEl)),this.replaceNullInputEl=s("input","".concat(pe,"-ui-input")).attr({is:"ui-input",width:"100%",placeholder:"请输入"}).on("input",(function(e){n.formats.replaceNullText.value=e.target.value})),this.replaceNullInputEl.hide(),this.replaceNullSwitchEl=s("input","".concat(pe,"-strf-switch")).attr({is:"ui-switch",type:"checkbox"}).css("height","20px").on("change",(function(e){(e=e.target.checked)?n.replaceNullInputEl.show():n.replaceNullInputEl.hide(),n.formats.replaceNullText.type=Number(e)})),this.replaceNullEl=s("div","".concat(pe,"-ui-form-item")).children(s("label","".concat(pe,"-ui-form-item__label ").concat(pe,"-label-font--14")).html("空值替换：").css("width","85px"),s("div","".concat(pe,"-ui-form-item__content")).children(this.replaceNullSwitchEl,this.replaceNullInputEl).css("flex-wrap","nowrap")).css("marginTop","10px"),this.contentEl=s("div","").children(s("span").html("说明：将单元格中的内容按数值进行显示。").css("marginBottom","10px"),this.quantileEl,this.mulEl,this.decimalEl,this.minusEl,this.addPreEl,this.addNextEl,this.replaceNullEl);var r=this;this.el=new Dialog({title:"【数值】-元素格式设置",content:this.contentEl.el,buttons:[{value:"取消",type:" ",className:"".concat(pe,"-slash_button"),events:function(){r.hide()}},{value:"确定",type:"primary",className:"".concat(pe,"-slash_button"),events:function(){r.save(),r.hide()}}],width:"500px"}),this.el.element.title.classList.add("".concat(pe,"-dialog_title")),this.mulSelectEl.setup(),this.decimalSelectEl.setup(),this.hide()}var t,n;return t=e,(n=[{key:"hide",value:function(){this.el.hide(),this.reset()}},{key:"show",value:function(){var e=this.$parent.toolbar.valueTypeEl.getTitle();(e=(e=$0(this.$parent,e))||{quantile:0,multiplying:0,decimal:0,minus:0,addPreText:"",addNextText:"",replaceNullText:{type:0,value:""}})&&(this.setValue(e),this.el.show())}},{key:"reset",value:function(){this.formats={quantile:0,multiplying:0,decimal:0,minus:0,addPreText:"",addNextText:"",replaceNullText:{type:0,value:""}}}},{key:"save",value:function(){this.formats.multiplying=Number(this.formats.multiplying),this.formats.decimal=Number(this.formats.decimal),this.formats.quantile=Number(this.formats.quantile),this.formats.minus=Number(this.formats.minus),Q0({name:"数值",style:this.formats},this.$parent.spreadSheet),this.$parent.sheetRender()}},{key:"setValue",value:function(e){this.formats=Object.assign({quantile:0,multiplying:0,decimal:0,minus:0,addPreText:"",addNextText:"",replaceNullText:{type:0,value:""}},e),H0(this.quantileRadioEl.el,"quantile",this.formats.quantile),this.mulSelectEl.setValue(this.formats.multiplying),this.decimalSelectEl.setValue(this.formats.decimal),H0(this.minusRadioEl.el,"minus",this.formats.minus),ve()(this.addPreInputEl.el).val(this.formats.addPreText),ve()(this.addNextInputEl.el).val(this.formats.addNextText),ve()(this.replaceNullInputEl.el).val(this.formats.replaceNullText.value),this.replaceNullSwitchEl.el.checked=this.formats.replaceNullText.type}}])&&o2(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function s2(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var u2=function(){function e(t){var n=this;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.$parent=t,this.formats={date:"yyyy-mm-dd",addPreText:"",addNextText:"",removePreText:"",removeNextText:"",replaceNullText:{type:0,value:""}},this.dateSelectEl=new e2(qZ,this.formats.date,{width:"100%",height:"30px"},!1,{onChange:function(e){n.formats.date=e}}),this.dateEl=s("div","".concat(pe,"-ui-form-item")).children(s("label","".concat(pe,"-ui-form-item__label ").concat(pe,"-label-font--14")).html("日期格式：").css("width","85px"),this.dateSelectEl.el).css("marginTop","10px"),this.addPreInputEl=s("input","".concat(pe,"-ui-input")).attr({is:"ui-input",width:"100%",placeholder:"请输入"}).on("input",(function(e){n.formats.addPreText=e.target.value})),this.addPreEl=s("div","".concat(pe,"-ui-form-item")).children(s("label","".concat(pe,"-ui-form-item__label ").concat(pe,"-label-font--14")).html("添加前缀：").css("width","85px"),s("div","".concat(pe,"-ui-form-item__content")).children(this.addPreInputEl)).css("marginTop","10px"),this.addNextInputEl=s("input","".concat(pe,"-ui-input")).attr({is:"ui-input",width:"100%",placeholder:"请输入"}).on("input",(function(e){n.formats.addNextText=e.target.value})),this.addNextEl=s("div","".concat(pe,"-ui-form-item")).children(s("label","".concat(pe,"-ui-form-item__label ").concat(pe,"-label-font--14")).html("添加后缀：").css("width","85px"),s("div","".concat(pe,"-ui-form-item__content")).children(this.addNextInputEl)).css("marginTop","10px"),this.removePreInputEl=s("input","".concat(pe,"-ui-input")).attr({is:"ui-input",width:"100%",placeholder:"请输入"}).on("input",(function(e){n.formats.removePreText=e.target.value})),this.removePreEl=s("div","".concat(pe,"-ui-form-item")).children(s("label","".concat(pe,"-ui-form-item__label ").concat(pe,"-label-font--14")).html("去除前缀：").css("width","85px"),s("div","".concat(pe,"-ui-form-item__content")).children(this.removePreInputEl)).css("marginTop","10px"),this.removeNextInputEl=s("input","".concat(pe,"-ui-input")).attr({is:"ui-input",width:"100%",placeholder:"请输入"}).on("input",(function(e){n.formats.removeNextText=e.target.value})),this.removeNextEl=s("div","".concat(pe,"-ui-form-item")).children(s("label","".concat(pe,"-ui-form-item__label ").concat(pe,"-label-font--14")).html("去除前缀：").css("width","85px"),s("div","".concat(pe,"-ui-form-item__content")).children(this.removeNextInputEl)).css("marginTop","10px"),this.replaceNullInputEl=s("input","".concat(pe,"-ui-input")).attr({is:"ui-input",width:"100%",placeholder:"请输入"}).on("input",(function(e){n.formats.replaceNullText.value=e.target.value})),this.replaceNullInputEl.hide(),this.replaceNullSwitchEl=s("input","".concat(pe,"-strf-switch")).attr({is:"ui-switch",type:"checkbox"}).css("height","20px").on("change",(function(e){(e=e.target.checked)?n.replaceNullInputEl.show():n.replaceNullInputEl.hide(),n.formats.replaceNullText.type=Number(e)})),this.replaceNullEl=s("div","".concat(pe,"-ui-form-item")).children(s("label","".concat(pe,"-ui-form-item__label ").concat(pe,"-label-font--14")).html("空值替换：").css("width","85px"),s("div","".concat(pe,"-ui-form-item__content")).children(this.replaceNullSwitchEl,this.replaceNullInputEl).css("flex-wrap","nowrap")).css("marginTop","10px"),this.contentEl=s("div","").children(s("span").html("说明：将单元格中的内容按日期进行显示。").css("marginBottom","10px"),this.dateEl,this.addPreEl,this.addNextEl,this.removePreEl,this.removeNextEl,this.replaceNullEl);var r=this;this.el=new Dialog({title:"【日期】-元素格式设置",content:this.contentEl.el,buttons:[{value:"取消",type:" ",className:"".concat(pe,"-slash_button"),events:function(){r.hide()}},{value:"确定",type:"primary",className:"".concat(pe,"-slash_button"),events:function(){r.save(),r.hide()}}],width:"500px"}),this.el.element.title.classList.add("".concat(pe,"-dialog_title")),this.dateSelectEl.setup(),this.hide()}var t,n;return t=e,(n=[{key:"show",value:function(){var e=this.$parent.toolbar.valueTypeEl.getTitle();(e=(e=$0(this.$parent,e))||{date:"yyyy-MM-dd",addPreText:"",addNextText:"",removePreText:"",removeNextText:"",replaceNullText:{type:0,value:""}})&&(this.setValue(e),this.el.show())}},{key:"hide",value:function(){this.el.hide(),this.reset()}},{key:"save",value:function(){Q0({name:"日期",style:this.formats},this.$parent.spreadSheet),this.$parent.sheetRender()}},{key:"reset",value:function(){this.formats={date:"yyyy-MM-dd",addPreText:"",addNextText:"",removePreText:"",removeNextText:"",replaceNullText:{type:0,value:""}}}},{key:"setValue",value:function(e){this.dateSelectEl.setValue(this.formats.date),this.formats=Object.assign({date:"yyyy-MM-dd",addPreText:"",addNextText:"",removePreText:"",removeNextText:"",replaceNullText:{type:0,value:""}},e),ve()(this.addPreInputEl.el).val(this.formats.addPreText),ve()(this.addNextInputEl.el).val(this.formats.addNextText),ve()(this.removePreInputEl.el).val(this.formats.removePreText),ve()(this.removeNextInputEl.el).val(this.formats.removeNextText),ve()(this.replaceNullInputEl.el).val(this.formats.replaceNullText.value),this.replaceNullSwitchEl.el.checked=this.formats.replaceNullText.type}}])&&s2(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function c2(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var l2=function(){function e(t){var n=this;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.$parent=t,this.formats={imgUrlType:2,scaleType:1,text:""},this.imgUrlTypeRadioEl=s("div","".concat(pe,"-flex--center")).children(s("input").attr({type:"radio",id:"r1",name:"imgUrlType",value:2}),s("label").attr({for:"r1"}).html("图片来源")),this.imgUrlTypeEl=s("div","".concat(pe,"-ui-form-item")).children(s("label","".concat(pe,"-ui-form-item__label ").concat(pe,"-label-font--14")).html("图片来源：").css("width","85px"),this.imgUrlTypeRadioEl).css("marginTop","10px"),H0(this.imgUrlTypeRadioEl.el,"imgUrlType",this.formats.imgUrlType),this.srcInputEl=s("input","".concat(pe,"-ui-input")).attr({is:"ui-input",width:"100%",placeholder:"请输入"}).on("input",(function(e){n.formats.text=e.target.value})),this.srcEl=s("div","".concat(pe,"-ui-form-item")).children(s("label","".concat(pe,"-ui-form-item__label ").concat(pe,"-label-font--14")).html("图片路径：").css("width","85px"),this.srcInputEl).css("marginTop","10px"),this.scaleSelectEl=new e2(KZ,this.formats.scaleType,{width:"100%",height:"30px"},!1,{onChange:function(e){n.formats.scaleType=e}}),this.scaleEl=s("div","".concat(pe,"-ui-form-item")).children(s("label","".concat(pe,"-ui-form-item__label ").concat(pe,"-label-font--14")).html("显示方式：").css("width","85px"),this.scaleSelectEl.el),this.contentEl=s("div","").children(s("span").html("说明：将单元格中的内容按图片进行显示。").css("marginBottom","10px"),this.imgUrlTypeEl,this.srcEl,this.scaleEl);var r=this;this.el=new Dialog({title:"【图片】-元素格式设置",content:this.contentEl.el,buttons:[{value:"取消",type:" ",className:"".concat(pe,"-slash_button"),events:function(){r.hide()}},{value:"确定",type:"primary",className:"".concat(pe,"-slash_button"),events:function(){r.save(),r.hide()}}],width:"500px"}),this.el.element.title.classList.add("".concat(pe,"-dialog_title")),this.scaleSelectEl.setup(),this.hide()}var t,n;return t=e,(n=[{key:"hide",value:function(){this.el.hide(),this.reset()}},{key:"show",value:function(){var e=this.$parent.toolbar.valueTypeEl.getTitle();(e=(e=$0(this.$parent,e))||{imgUrlType:2,scaleType:1,text:""})&&(this.setValue(e),this.el.show())}},{key:"reset",value:function(){this.formats={imgUrlType:2,scaleType:1,text:""}}},{key:"save",value:function(){this.formats.imgUrlType=Number(this.formats.imgUrlType),this.formats.scaleType=Number(this.formats.scaleType),1===this.formats.imgUrlType&&delete this.formats.text,Q0({name:"图片",style:this.formats},this.$parent.spreadSheet),this.$parent.sheetRender()}},{key:"setValue",value:function(e){this.formats=Object.assign({imgUrlType:2,scaleType:1,text:""},e),2===this.formats.imgUrlType?(this.imgUrlTypeRadioEl.html(""),this.imgUrlTypeRadioEl.children(s("input").attr({type:"radio",id:"r1",name:"imgUrlType",value:2}),s("label").attr({for:"r1"}).html("图片来源")),ve()(this.srcInputEl.el).val(this.formats.text)):(this.imgUrlTypeRadioEl.html(""),this.imgUrlTypeRadioEl.children(s("input").attr({type:"radio",id:"r1",name:"imgUrlType",value:1}),s("label").attr({for:"r1"}).html("单元格数据")),this.srcEl.hide()),H0(this.imgUrlTypeRadioEl.el,"imgUrlType",this.formats.imgUrlType),this.scaleSelectEl.setValue(this.formats.scaleType)}}])&&c2(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function h2(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var f2=function(){function e(t){var n=this;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.$parent=t,this.formats={barCodeType:1},this.typeSelectEl=new e2(GZ,this.formats.barCodeType,{width:"100%",height:"30px"},!1,{onChange:function(e){n.formats.barCodeType=e}}),this.typeEl=s("div","".concat(pe,"-ui-form-item")).children(s("label","".concat(pe,"-ui-form-item__label ").concat(pe,"-label-font--14")).html("类型设置：").css("width","85px"),this.typeSelectEl.el).css("marginTop","20px"),this.contentEl=s("div","").children(s("span").html("说明：将单元格中的内容按条形码进行显示。"),this.typeEl).css("marginTop","10px"),this.headTitleEl=s("span").innerHTML("【条形码】-元素格式设置"),this.headEl=s("div","".concat(pe,"-table-config_dialog__header")).children(this.headTitleEl,s("div").children(s("i","x icon ".concat(pe,"-xIcon")).on("click",(function(){n.hide()})).css({cursor:"pointer"}))),this.footerEl=s("div","".concat(pe,"-table-config_dialog__footer")).children(s("div").children(s("button","ui primary button").innerHTML("确 定").on("click",(function(){n.save(),n.hide()})),s("button","ui basic button").innerHTML("取 消").on("click",(function(){n.hide()})))),this.el=s("div","".concat(pe,"-table-config_dialog ui modal")).children(this.headEl,s("div","".concat(pe,"-table-config_dialog__body")).child(this.contentEl),this.footerEl),ve()(this.el.el).modal({closable:!1,autofocus:!1,allowMultiple:!0}),this.typeSelectEl.setup(),this.hide()}var t,n;return t=e,(n=[{key:"hide",value:function(){ve()(this.el.el).modal("hide"),this.reset()}},{key:"show",value:function(){var e=this.$parent.toolbar.valueTypeEl.getTitle();(e=(e=$0(this.$parent,e))||{barCodeType:1})&&(this.setValue(e),ve()(this.el.el).modal("show"))}},{key:"reset",value:function(){this.formats={barCodeType:1}}},{key:"save",value:function(){this.formats.barCodeType=Number(this.formats.barCodeType),Q0({name:"条形码",style:this.formats},this.$parent.spreadSheet),this.$parent.sheetRender()}},{key:"setValue",value:function(e){this.formats=Object.assign({barCodeType:1},e),this.typeSelectEl.setValue(this.formats.barCodeType)}}])&&h2(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function d2(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var p2=function(){function e(t){var n=this;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.$parent=t,this.formats={dataType:1,merge:0,aggregate:1,order:0,expansion:0,wrap:1},this.mergeSelectEl=new e2(YZ,this.formats.merge,{width:"130px",height:"24px"},!1),this.computeSelectEl=new e2(DZ,this.formats.aggregate,{width:"130px",height:"24px"},!1),this.dataConfigRadioEl=s("span","".concat(pe,"-table-config_type_main")).children(s("span","".concat(pe,"-table-config_type_item")).children(s("input","".concat(pe,"-table_config_radio")).attr({type:"radio",id:"r1",name:"dataType",value:1}),s("label").attr({for:"r1"}).html("分组（将数据列中相同值进行分组展现）")),s("span","".concat(pe,"-table-config_type_item")).children(s("input","".concat(pe,"-table_config_radio")).attr({type:"radio",id:"r2",name:"dataType",value:2}),s("label").attr({for:"r2"}).html("汇总（将数据列中数据进行聚合后展现）"),this.computeSelectEl.el),s("span","".concat(pe,"-table-config_type_item")).children(s("input","".concat(pe,"-table_config_radio")).attr({type:"radio",id:"r3",name:"dataType",value:3}),s("label").attr({for:"r3"}).html("列表（将数据列中所有数据记录，以明细列表的形式展现出来）"))),H0(this.dataConfigRadioEl.el,"dataType",this.formats.dataType),this.dataOrderEl=s("span","".concat(pe,"-table-config_type_main")).children(s("span","".concat(pe,"-table-config_type_item")).children(s("input","".concat(pe,"-table_config_radio")).attr({type:"radio",id:"r4",name:"order",value:0}),s("label").attr({for:"r4"}).html("默认").css("marginRight","16px"),s("input","".concat(pe,"-table_config_radio")).attr({type:"radio",id:"r5",name:"order",value:1}),s("label").attr({for:"r5"}).html("升序").css("marginRight","16px"),s("input","".concat(pe,"-table_config_radio")).attr({type:"radio",id:"r6",name:"order",value:2}),s("label").attr({for:"r6"}).html("降序"))),H0(this.dataOrderEl.el,"order",this.formats.order),this.dataConfigEl=s("div","".concat(pe,"-table-config_item")).children(s("span","".concat(pe,"-table-config_item_title")).html("数据设置"),s("div","".concat(pe,"-table-config_item_main")).children(s("div","".concat(pe,"-table-config_data_type")).children(s("span","".concat(pe,"-set_name")).html("数据展示："),this.dataConfigRadioEl),s("div","".concat(pe,"-table-config_data_order")).children(s("span","".concat(pe,"-set_name")).html("数据排序："),this.dataOrderEl),s("div","".concat(pe,"-table-config_data_order")).children(s("span","".concat(pe,"-set_name")).html("相同值合并："),this.mergeSelectEl.el))),this.expansionRadioEl=s("span","".concat(pe,"-table-config_type_item")).children(s("input","".concat(pe,"-table_config_radio")).attr({type:"radio",id:"r7",name:"expansion",value:0}),s("label").attr({for:"r7"}).html("默认").css("marginRight","16px"),s("input","".concat(pe,"-table_config_radio")).attr({type:"radio",id:"r8",name:"expansion",value:1}),s("label").attr({for:"r8"}).html("向下扩展").css("marginRight","16px"),s("input","".concat(pe,"-table_config_radio")).attr({type:"radio",id:"r9",name:"expansion",value:2}),s("label").attr({for:"r9"}).html("向右扩展").css("marginRight","16px"),s("input","".concat(pe,"-table_config_radio")).attr({type:"radio",id:"r10",name:"expansion",value:3}),s("label").attr({for:"r10"}).html("双向扩展")),H0(this.expansionRadioEl.el,"expansion",this.formats.expansion),this.wrapRadioEl=s("span","".concat(pe,"-table-config_type_main")).children(s("span","".concat(pe,"-table-config_type_item")).children(s("input","".concat(pe,"-table_config_radio")).attr({type:"radio",id:"r11",name:"wrap",value:1}),s("label").attr({for:"r11"}).html("默认").css("marginRight","16px"),s("input","".concat(pe,"-table_config_radio")).attr({type:"radio",id:"r12",name:"wrap",value:2}),s("label").attr({for:"r12"}).html("自动换行").css("marginRight","16px"),s("input","".concat(pe,"-table_config_radio")).attr({type:"radio",id:"r13",name:"wrap",value:3}),s("label").attr({for:"r13"}).html("缩小文字"))),H0(this.wrapRadioEl.el,"wrap",this.formats.wrap),this.expandConfigEl=s("div","".concat(pe,"-table-config_item")).children(s("span","".concat(pe,"-table-config_item_title")).html("扩展设置"),s("div","".concat(pe,"-table-config_item_main")).children(s("div","".concat(pe,"-table-config_data_type")).children(s("span","".concat(pe,"-set_name")).html("扩展方向："),s("span","".concat(pe,"-table-config_type_main")).children(this.expansionRadioEl)),s("div","".concat(pe,"-table-config_data_order")).children(s("span","".concat(pe,"-set_name")).html("显示效果："),this.wrapRadioEl))),this.contentEl=s("div","".concat(pe,"-table-config_main")).children(this.dataConfigEl,this.expandConfigEl),this.headTitleEl=s("span").innerHTML(""),this.headEl=s("div","".concat(pe,"-table-config_dialog__header")).children(this.headTitleEl,s("div").children(s("i","x icon ".concat(pe,"-xIcon")).on("click",(function(){n.hide()})).css({cursor:"pointer"}))),this.footerEl=s("div","".concat(pe,"-table-config_dialog__footer")).children(s("div").children(s("button","ui primary button").innerHTML("确 定").on("click",(function(){n.save(),n.hide()})),s("button","ui basic button").innerHTML("取 消").on("click",(function(){n.hide()})))),this.el=s("div","".concat(pe,"-table-config_dialog ui modal")).children(this.headEl,s("div","".concat(pe,"-table-config_dialog__body")).child(this.contentEl),this.footerEl),this.isDataCell=!1,ve()(this.el.el).modal({closable:!1,autofocus:!1,allowMultiple:!0}),this.mergeSelectEl.setup(),this.computeSelectEl.setup(),this.hide()}var t,n;return t=e,(n=[{key:"hide",value:function(){ve()(this.el.el).modal("hide")}},{key:"show",value:function(){var e,t,n=this.$parent.spreadSheet,r=(i=J0(n)).range,i=i.dataProxy,o=(t=!Y0(n)&&K0(n)?(o=Object(u.e)(r.sci,r.sri),e=Object(u.e)(r.eci,r.eri),"".concat(o,"-").concat(e)):Object(u.e)(r.sci,r.sri),this.setTitle(t),function(e){var t=!0;if(e){var n=e.sheet.selector.range,r=n.sri,i=n.sci,o=n.eri,a=n.eci,s=e.sheet.data;if(Y0(e))t=!!X0(n=s.getCell(r,i));else if(K0(e))for(var u=r;u<=o;u++)for(var c=i;c<=a;c++){if(!X0(s.getCell(u,c))){t=!1;break}}else t=!!X0(n=s.getCell(r,i))}return t}(n));o?this.dataConfigEl.show():this.dataConfigEl.hide(),this.isDataCell=o,this.showConfig(i,r,o),ve()(this.el.el).modal("show")}},{key:"showConfig",value:function(e,t,n){var r;(e=e.getCell(t.sri,t.sci))&&(n&&e.bindObj&&(t=e.bindObj,n=DZ,r=1,2==t.data_type?(n=DZ,r=1):(r=4,n=BZ),t.dataList&&1==t.dataList?H0(this.dataConfigRadioEl.el,"dataType",3):2==t.axisType?(r=t.aggregate,H0(this.dataConfigRadioEl.el,"dataType",2)):H0(this.dataConfigRadioEl.el,"dataType",1),this.mergeSelectEl.setValue(t.merge||0),this.computeSelectEl.setValue(r),this.computeSelectEl.clearOptions(!1),this.computeSelectEl.addOption(n),this.computeSelectEl.setValue(r),t.order?H0(this.dataOrderEl.el,"order",t.order):H0(this.dataOrderEl.el,"order",0)),n=e.Expansion||0,r=e.wrapType||1,H0(this.expansionRadioEl.el,"expansion",n),H0(this.wrapRadioEl.el,"wrap",r))}},{key:"save",value:function(){var e={},t=this.$parent.spreadSheet,n=(this.isDataCell&&(i={},1==(r=z0(this.dataConfigRadioEl.el,"dataType"))?i.axisType=1:2==r?(n=this.computeSelectEl.getValue(),i.aggregate=Number(n),i.axisType=2):3==r&&(i.dataList=!0),i.merge=Number(this.mergeSelectEl.getValue()),i.order=Number(z0(this.dataOrderEl.el,"order")),e.bindObj=i),z0(this.expansionRadioEl.el,"expansion")),r=(e.Expansion=Number(n),z0(this.wrapRadioEl.el,"wrap")),i=(e.wrapType=Number(r),J0(t));U0(n=i.range,r=i.dataProxy,e),this.$parent.sheetRender(),this.hide()}},{key:"setTitle",value:function(e){this.headTitleEl.innerHTML("表格设置【".concat(e,"】"))}}])&&d2(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function m2(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var g2=function(){function e(t){var n=this,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"添加数据过滤",i=2<arguments.length?arguments[2]:void 0,o=this,a=e;if(!(o instanceof a))throw new TypeError("Cannot call a class as a function");this.$parent=t,this.columnList=[],this.groupList=[{name:"系统自动分组",value:"系统自动分组"}],this.groupSelectEl=new e2(this.groupList,"系统自动分组",{width:"214px",height:"32px"},!1),this.groupEl=s("div","".concat(pe,"-fcondition-item")).children(s("span").html("作用分组："),this.groupSelectEl.el),this.addButtonEl=s("button","ui-button").attr({type:"primary"}).on("click",(function(e){n.conditionList.push({logic:1,params:[{column:"",data_type:2,logic:1,type:1,value:"",cname:""}]}),n.conditionDomList=[];var t=s("div","".concat(pe,"-condition_main"));n.conditionList.forEach((function(e,r){e=n.createCondition(e,r),t.children(e.el),n.conditionDomList.push(e)})),ve()(n.conditionEl.el).replaceWith(t.el),n.conditionEl=t,n.conditionDomList[0]&&n.conditionDomList[0].logicEl.hide()})).html("添加组合条件").css({padding:"8px 15px",lineHeight:"14px"}),this.removeButtonEl=s("button","ui-button").attr({type:"normal"}).on("click",(function(e){n.conditionEl.html(""),n.conditionList=[],n.conditionDomList=[]})).html("清空所有条件").css({padding:"8px 15px",lineHeight:"14px",marginLeft:"12px"}),this.buttonEl=s("div","".concat(pe,"-fcondition-item")).children(this.addButtonEl,this.removeButtonEl),this.conditionList=[{logic:1,params:[{column:"",data_type:2,logic:1,type:1,value:"",cname:""}]}],this.conditionDomList=[],this.columnsDict={},this.conditionEl=s("div","".concat(pe,"-condition_main")),this.conditionList.forEach((function(e,t){e=n.createCondition(e,t),n.conditionEl.children(e.el),n.conditionDomList.push(e)})),this.conditionDomList[0]&&this.conditionDomList[0].logicEl.hide(),this.contentEl=s("div","".concat(pe,"-fcondition_main")).children(this.groupEl,this.buttonEl,this.conditionEl),(this.showGroupList=i)&&this.groupEl.hide();var u=this;this.el=new Dialog({title:r,content:this.contentEl.el,buttons:[{value:"取消",type:" ",className:"".concat(pe,"-slash_button"),events:function(){u.hide()}},{value:"确定",type:"primary",className:"".concat(pe,"-slash_button"),events:function(){u.save()}}],width:"700px"}),this.el.element.title.classList.add("".concat(pe,"-dialog_title")),this.groupSelectEl.setup()}var t,n;return t=e,(n=[{key:"show",value:function(e){this.conditionList=e=e||[{logic:1,params:[{column:"",data_type:2,logic:1,type:1,value:"",cname:""}]}],this.resetConditionEl(),this.el.show()}},{key:"hide",value:function(){this.el.hide()}},{key:"resetConditionEl",value:function(){var e=this,t=(this.conditionDomList=[],s("div","".concat(pe,"-condition_main")));this.conditionList.forEach((function(n,r){n=e.createCondition(n,r),t.children(n.el),e.conditionDomList.push(n)})),ve()(this.conditionEl.el).replaceWith(t.el),this.conditionEl=t,this.conditionDomList[0]&&this.conditionDomList[0].logicEl.hide()}},{key:"createCondition",value:function(e,t){var n=this,r={},i=new e2(i1,e.logic,{width:"65px",height:"24px"},!1,{onChange:function(t){e.logic=Number(t)}}),o=s("div","".concat(pe,"-condition_logic")).children(i.el),a=s("div","".concat(pe,"-condition_params_main")),u=s("div","".concat(pe,"-condition_item")).children(o,a),c=[];return e.params.forEach((function(r,i){r=n.createConditionItem(r,e.params,i,t),a.child(r.el),c.push(r)})),i.setup(),r.el=u,r.logicSelectEl=i,r.logicEl=o,r.paramsVm=c,r.paramsEl=a,r}},{key:"createConditionItem",value:function(e,t,n,r){var i=this,o={},a=new e2(this.columnList,e.column,{width:"105px",height:"24px"},!1,{onChange:function(t){var n=null;i.columnList.forEach((function(e){t==e.value&&(e.data_type,n=e.label)})),e.column=t,e.cname=n}}),u=s("div"),c=[],l=(c=3==e.data_type?JZ:XZ,c=new e2(c,e.type,{width:"105px",height:"24px"},!1,{onChange:function(t){e.type=Number(t)}}),s("div","")),h=s("input","".concat(pe,"-ui-input__24")).attr({is:"ui-input"}).css("width","105px").on("input",(function(t){e.value=t.target.value})),f=(ve()(h.el).val(e.value),l.children(h),new e2(i1,e.logic,{width:"65px",height:"24px"},!1,{onChange:function(t){e.logic=Number(t)}})),d=s("div","".concat(pe,"-icon-img-condition_add")).css({width:"16px",height:"16px"}).on("click",(function(){t.splice(n+1,0,{column:"",data_type:2,logic:1,type:1,value:""});var e=i.createCondition(i.conditionList[r],r);ve()(i.conditionDomList[r].el.el).replaceWith(e.el.el),i.conditionDomList[r]=e,i.conditionDomList[0]&&i.conditionDomList[0].logicEl.hide()})),p=s("div","".concat(pe,"-icon-img-condition_delete")).css({width:"16px",height:"16px"}).on("click",(function(){t.splice(n,1);var e=!1;t.length<1&&(e=!0,i.conditionList.splice(r,1)),e?i.resetConditionEl():(e=i.createCondition(i.conditionList[r],r),ve()(i.conditionDomList[r].el.el).replaceWith(e.el.el),i.conditionDomList[r]=e,i.conditionDomList[0]&&i.conditionDomList[0].logicEl.hide())})),m=s("div","".concat(pe,"-condition_params_item")).children(a.el,u,c.el,l,f.el,d,p);a.setup(),c.setup(),f.setup(),o.el=m,o.columnselectEl=a,o.conditionEl=c,o.valueEl=l,o.logicSelectEl=f,o.addEl=d,o.deleteEl=p,o.valueInputEl=h,m=new e2(ZZ,e.data_type,{width:"105px",height:"24px"},!1,{onChange:function(t){e.data_type!=t&&(o.conditionEl.setValue(0),o.conditionEl.clearOptions(!1),3==t?o.conditionEl.addOption(JZ):o.conditionEl.addOption(XZ),o.conditionEl.setValue(1),e.data_type=Number(t))}});return o.typeSelectEl=m,(o.typeEl=u).children(m.el),m.setup(),o}},{key:"show_logic",value:function(e){return 2==e?"or":"and"}},{key:"show_type",value:function(e,t){var n="";return(3==t?JZ:XZ).forEach((function(t){t.value==e&&(n=t.name)})),n}},{key:"createFilterDescribe",value:function(e){var t=this,n=(e=e||this.conditionList,"");return e.forEach((function(e,r){var i="",o=e.params;0!=r&&(i+=" \n ".concat(t.show_logic(e.logic)," ")),i+="(",o.forEach((function(n,r){var o="(字段：".concat(n.column,")");t.showGroupList&&(o="(字段：".concat(t.columnsDict[n.column],") ")),i+="".concat(o," ").concat(t.show_type(n.type,n.data_type)," ").concat(n.value),r!=e.params.length-1&&(i+=" ".concat(t.show_logic(n.logic)," "))})),n+=i+=")"})),n}},{key:"save",value:function(){for(var e=0;e<this.conditionList.length;e++)for(var t=this.conditionList[e].params,n=0;n<t.length;n++)if(!t[n].column)return void new k0({message:"没有选择字段",duration:1e3});var r={name:this.groupSelectEl.getValue(),filter:{logic:1,params:this.conditionList},describeStr:this.createFilterDescribe(this.conditionList)};this.$parent.saveChange(r),this.hide()}},{key:"setGroupList",value:function(e){this.groupList=e,e=0<this.groupList.length?this.groupList[0].value:"",this.groupSelectEl.resetOptions(this.groupList,e)}},{key:"setColumnList",value:function(e){var t=this;this.columnList=e,this.conditionDomList.forEach((function(e){e.paramsVm.forEach((function(e){var n=e.columnselectEl.getValue();e.columnselectEl.resetOptions(t.columnList,n)}))}))}},{key:"setColumnListDict",value:function(e){this.columnsDict=e}}])&&m2(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function A2(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var v2=function(){function e(t){var n=this;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.$parent=t;var r=this;this.mode="add",this.editIndex=0,this.filters=[],this.filterCondCompEl=new g2(this),this.filterCondCompEl.hide(),this.addButtonEl=s("button","ui-button").attr({type:"primary"}).on("click",(function(e){n.mode="add",n.filterCondCompEl.show()})).html("添加数据过滤").css({padding:"8px 15px",lineHeight:"14px"}),this.removeButtonEl=s("button","ui-button").attr({type:"normal"}).on("click",(function(e){n.filters=[],n.resetFilterEl()})).html("清空所有过滤").css({padding:"8px 15px",lineHeight:"14px",marginLeft:"12px"}),this.noFilterEl=s("div","".concat(pe,"-no_filter")).children(s("span").html("当前无过滤条件，点击按钮进行添加")),this.filterEl=s("div","".concat(pe,"-design_filter")),this.mainEl=s("div"),this.filterDomEL=[],this.resetFilterEl(),this.contentEl=s("div","".concat(pe,"-dfilter_main")).children(s("div","").children(this.addButtonEl,this.removeButtonEl,this.mainEl)),this.el=new Dialog({title:"数据过滤",content:this.contentEl.el,buttons:[{value:"取消",type:" ",className:"".concat(pe,"-slash_button"),events:function(){r.hide()}},{value:"确定",type:"primary",className:"".concat(pe,"-slash_button"),events:function(){r.save(),r.hide()}}],width:"700px"}),this.el.element.title.classList.add("".concat(pe,"-dialog_title")),this.hide()}var t,n;return t=e,(n=[{key:"hide",value:function(){this.el.hide()}},{key:"show",value:function(){var e=this,t=this.$parent.spreadSheet.sheet.data,n=(this.setTitle(t.name),t.groupConfig),r=[],i=function(e){var t,n=[],r=P0(e);try{for(r.s();!(t=r.n()).done;)!function(){var e=t.value,r=e.name;if(e.columns&&0<e.columns.length)n=n.concat(e.columns.map((function(e){return{name:"".concat(r,".").concat(e.name),value:"".concat(r,".").concat(e.value),data_type:e.data_type}})));else{var i,o=e.response_data[0];for(i in o){var a=i,s=3;a=("number"!=typeof o[i]&&"boolean"!=typeof o[i]||(s=2),{name:"".concat(r,".").concat(a),value:"".concat(r,".").concat(a),data_type:s});n.push(a)}}}()}catch(e){r.e(e)}finally{r.f()}return n}(i=(n.forEach((function(e){r.push({name:e.label,value:e.label})})),n=r,this.$parent.getJsonData())),o=(this.filterCondCompEl.setGroupList(n),this.filterCondCompEl.setColumnList(i),[]);(n=this.$parent.getSheetFilter(t.name))&&(n.forEach((function(t){t.filter&&o.push({name:t.name,filter:t.filter,describeStr:e.filterCondCompEl.createFilterDescribe(t.filter.params)})})),this.filters=o,this.resetFilterEl(),this.el.show())}},{key:"resetFilterEl",value:function(){var e=this;this.filterDomEL=[],this.mainEl.html(""),this.filters.length<1?this.mainEl.children(this.noFilterEl):(this.filterEl.html(""),this.filters.forEach((function(t,n){t=e.createFilterEl(t,n),e.filterDomEL.push(t),e.filterEl.children(t.el)})),this.mainEl.children(this.filterEl))}},{key:"createFilterEl",value:function(e,t){var n=this,r={},i=s("div","".concat(pe,"-design_filter_item")),o=s("div","".concat(pe,"-icon-img-condition_edit")).css({width:"16px",height:"16px",marginLeft:"10px"}).on("click",(function(){n.mode="edit",n.editIndex=t;var e=n.filters[t].filter.params;n.filterCondCompEl.show(e)})),a=s("div","".concat(pe,"-icon-img-condition_delete")).css({width:"16px",height:"16px",marginLeft:"10px"}).on("click",(function(){n.filters.splice(t,1),n.resetFilterEl()})),u=s("textarea").attr({is:"ui-textarea",rows:4,disabled:"disabled"}).css({width:"calc(100% - 100px)",background:"#f5f7fa",color:"#a8abb2",cursor:"not-allowed"});ve()(u.el).val(e.describeStr),e=s("div","".concat(pe,"-filter_item")).children(s("div","".concat(pe,"-filter_name")).children(s("span","name").html("作用分组："),s("span","value").html(e.name)),s("div","".concat(pe,"-filter_condition")).children(s("span").html("过滤条件："),u));return i.children(e,a,o),r.el=i,r}},{key:"save",value:function(){var e=this.$parent.spreadSheet.sheet.data.name;this.$parent.setSheetFilter(e,this.filters),this.hide()}},{key:"saveChange",value:function(e){"add"==this.mode?this.filters.push(e):this.filters[this.editIndex]=e,this.resetFilterEl()}},{key:"setTitle",value:function(e){this.el.params.title="数据过滤【".concat(e,"】")}}])&&A2(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function b2(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(e,t)||function(e,t){var n;if(e)return"string"==typeof e?y2(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?y2(e,t):void 0}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y2(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function w2(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var x2=function(){function e(t){var n=this;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.$parent=t,this.styleConfig={height:{isopen:!1,value:"",name:"行高"},width:{isopen:!1,name:"列宽",value:""},border_style:{isopen:!1,name:"边框样式",value:"thin"},border_color:{name:"边框颜色",isopen:!1,value:"#000000"},bgcolor:{isopen:!1,name:"背景色",value:"#000000"},align:{isopen:!1,name:"水平对齐",value:"left"},valign:{isopen:!1,name:"垂直对齐",value:"middle"},color:{name:"文字颜色",isopen:!1,value:"#000000"},size:{isopen:!1,name:"文字大小",value:12},bold:{isopen:!1,name:"文字加粗",value:!1},italic:{name:"文字斜体",isopen:!1,value:!1},underline:{name:"文字下划线",isopen:!1,value:!1},indent:{isopen:!1,name:"文字缩进",value:""},quantile:{isopen:!1,name:"分位",value:0},replaceNullText:{isopen:!1,name:"空值替换",value:""},multiplying:{isopen:!1,name:"倍率",value:0},decimal:{isopen:!1,name:"小数位",value:0},addPreText:{isopen:!1,name:"添加前缀",value:""},addNextText:{isopen:!1,name:"添加后缀",value:""}},this.fontsizeDict=V0(),this.rowCheckEl=new gG("行高",null,!1,{width:"80px"},null,null,(function(e){n.styleConfig.height.isopen=e})),this.rowInputEl=s("input","".concat(pe,"-ui-input")).attr({is:"ui-input"}).css("width","100px").on("input",(function(e){e=e.target.value,n.styleConfig.height.value=Number(e)})),this.rowEl=s("div","".concat(pe,"-warn-style")).children(this.rowCheckEl.el,this.rowInputEl).css("marginRight","35px"),this.colCheckEl=new gG("列宽",null,!1,{width:"80px"},null,null,(function(e){n.styleConfig.width.isopen=e})),this.colInputEl=s("input","".concat(pe,"-ui-input")).attr({is:"ui-input"}).css("width","100px").on("input",(function(e){e=e.target.value,n.styleConfig.width.value=Number(e)})),this.colEl=s("div","".concat(pe,"-warn-style")).children(this.colCheckEl.el,this.colInputEl),this.bStyleCheckEl=new gG("边框样式",null,!1,{width:"80px"},null,null,(function(e){n.styleConfig.border_style.isopen=e})),this.bStyleSelectEl=new e2(UZ,"thin",{width:"100px",height:"32px"},!1,{onChange:function(e){n.styleConfig.border_style.value=e}}),this.bStyleEl=s("div","".concat(pe,"-warn-style")).children(this.bStyleCheckEl.el,this.bStyleSelectEl.el).css("marginRight","35px"),this.bColorCheckEl=new gG("边框颜色",null,!1,{width:"80px"},null,null,(function(e){n.styleConfig.border_color.isopen=e})),this.bColorPalette=new Ol(!0),this.bColorPalette.change=function(e){n.styleConfig.border_color.value=e,n.bcolor_inner.css("background",e)},this.bColorPalette.hide(),this.bcolor_inner=s("div","".concat(pe,"-picker_color-inner")),this.borderColorEl=s("div","".concat(pe,"-picker_trigger")).children(this.bcolor_inner.css("background","#000").children(s("div","".concat(pe,"-picker_show")),this.bColorPalette.el).on("click",(function(e){e.preventDefault(),n.bColorPalette.show()}))),this.bColorEl=s("div","".concat(pe,"-warn-style")).children(this.bColorCheckEl.el,this.borderColorEl),this.bgColorCheckEl=new gG("背景色",null,!1,{width:"80px"},null,null,(function(e){n.styleConfig.bgcolor.isopen=e})),this.bgColorPalette=new Ol(!0),this.bgColorPalette.change=function(e){n.styleConfig.bgcolor.value=e,n.bgcolor_inner.css("background",e)},this.bgColorPalette.hide(),this.bgcolor_inner=s("div","".concat(pe,"-picker_color-inner")),this.bgColorEl=s("div","".concat(pe,"-picker_trigger")).children(this.bgcolor_inner.css("background","#000").children(s("div","".concat(pe,"-picker_show")),this.bgColorPalette.el).on("click",(function(e){e.preventDefault(),n.bgColorPalette.show()}))),this.bgEl=s("div","".concat(pe,"-warn-style")).children(this.bgColorCheckEl.el,this.bgColorEl).css("marginRight","107px"),this.alignCheckEl=new gG("水平对齐",null,!1,{width:"80px"},null,null,(function(e){n.styleConfig.align.isopen=e})),this.alignSelectEl=new e2(zZ,"left",{width:"100px",height:"32px"},!1,{onChange:function(e){n.styleConfig.align.value=e}}),this.alignEl=s("div","".concat(pe,"-warn-style")).children(this.alignCheckEl.el,this.alignSelectEl.el),this.valignCheckEl=new gG("垂直对齐",null,!1,{width:"80px"},null,null,(function(e){n.styleConfig.valign.isopen=e})),this.valignSelectEl=new e2(HZ,"middle",{width:"100px",height:"32px"},!1,{onChange:function(e){n.styleConfig.valign.value=e}}),this.valignEl=s("div","".concat(pe,"-warn-style")).children(this.valignCheckEl.el,this.valignSelectEl.el).css("marginRight","35px"),this.colorCheckEl=new gG("文字颜色",null,!1,{width:"80px"},null,null,(function(e){n.styleConfig.color.isopen=e})),this.colorPalette=new Ol(!0),this.colorPalette.change=function(e){n.styleConfig.color.value=e,n.color_inner.css("background",e)},this.colorPalette.hide(),this.color_inner=s("div","".concat(pe,"-picker_color-inner")),this.colorEl=s("div","".concat(pe,"-picker_trigger")).children(this.color_inner.css("background","#000").children(s("div","".concat(pe,"-picker_show")),this.colorPalette.el).on("click",(function(e){e.preventDefault(),n.colorPalette.show()}))),this.colorWarnEl=s("div","".concat(pe,"-warn-style")).children(this.colorCheckEl.el,this.colorEl),this.fontsizeCheckEl=new gG("文字大小",null,!1,{width:"80px"},null,null,(function(e){n.styleConfig.size.isopen=Number(e)})),this.fontsizeSelectEl=new e2(this.fontsizeDict,12,{width:"100px",height:"32px"},!1,{onChange:function(e){n.styleConfig.size.value=Number(e)}}),this.fontsizeEl=s("div","".concat(pe,"-warn-style")).children(this.fontsizeCheckEl.el,this.fontsizeSelectEl.el).css("marginRight","35px"),this.boldCheckEl=new gG("文字加粗",null,!1,{width:"80px"},null,null,(function(e){n.styleConfig.bold.isopen=e,n.styleConfig.bold.value=e})),this.italicCheckEl=new gG("文字斜体",null,!1,{width:"80px"},null,null,(function(e){n.styleConfig.italic.isopen=e,n.styleConfig.italic.value=e})),this.italicCheckEl.el.css("marginRight","135px"),this.underlineCheckEl=new gG("文字下划线",null,!1,{width:"80px"},null,null,(function(e){n.styleConfig.underline.isopen=e,n.styleConfig.underline.value=e})),this.indentCheckEl=new gG("文字缩进",null,!1,{width:"80px"},null,null,(function(e){n.styleConfig.indent.isopen=e})),this.indentInputEl=s("input","".concat(pe,"-ui-input")).attr({is:"ui-input"}).css("width","100px").on("input",(function(e){e=e.target.value,n.styleConfig.indent.value=Number(e)})),this.indentEl=s("div","".concat(pe,"-warn-style")).children(this.indentCheckEl.el,this.indentInputEl).css("marginRight","35px"),this.quantileCheckEl=new gG("分位",null,!1,{width:"80px"},null,null,(function(e){n.styleConfig.quantile.isopen=e})),this.quantileSelectEl=new e2($Z,0,{width:"100px",height:"32px"},!1,{onChange:function(e){n.styleConfig.quantile.value=Number(e)}}),this.quantileEl=s("div","".concat(pe,"-warn-style")).children(this.quantileCheckEl.el,this.quantileSelectEl.el),this.replaceCheckEl=new gG("空值替换",null,!1,{width:"80px"},null,null,(function(e){n.styleConfig.replaceNullText.isopen=e})),this.replaceInputEl=s("input","".concat(pe,"-ui-input")).attr({is:"ui-input"}).css("width","100px").on("input",(function(e){n.styleConfig.replaceNullText.value=e.target.value})),this.replaceEl=s("div","".concat(pe,"-warn-style")).children(this.replaceCheckEl.el,this.replaceInputEl).css("marginRight","35px"),this.multiplyingCheckEl=new gG("倍率",null,!1,{width:"80px"},null,null,(function(e){n.styleConfig.multiplying.isopen=e})),this.multiplyingSelectEl=new e2(QZ,0,{width:"100px",height:"32px"},!1,{onChange:function(e){n.styleConfig.multiplying.value=Number(e)}}),this.multiplyingEl=s("div","".concat(pe,"-warn-style")).children(this.multiplyingCheckEl.el,this.multiplyingSelectEl.el),this.decimalCheckEl=new gG("小数位",null,!1,{width:"80px"},null,null,(function(e){n.styleConfig.decimal.isopen=e})),this.decimalSelectEl=new e2(VZ,0,{width:"100px",height:"32px"},!1,{onChange:function(e){n.styleConfig.decimal.value=Number(e)}}),this.decimalEl=s("div","".concat(pe,"-warn-style")).children(this.decimalCheckEl.el,this.decimalSelectEl.el).css("marginRight","35px"),this.addTextCheckEl=new gG("添加前缀",null,!1,{width:"80px"},null,null,(function(e){n.styleConfig.addPreText.isopen=e})),this.addTextInputEl=s("input","".concat(pe,"-ui-input")).attr({is:"ui-input"}).css("width","100px").on("input",(function(e){n.styleConfig.addNextText.value=e.target.value})),this.addTextEl=s("div","".concat(pe,"-warn-style")).children(this.addTextCheckEl.el,this.addTextInputEl),this.removeTextCheckEl=new gG("添加后缀",null,!1,{width:"80px"},null,null,(function(e){n.styleConfig.addNextText.isopen=e})),this.removeTextInputEl=s("input","".concat(pe,"-ui-input")).attr({is:"ui-input"}).css("width","100px").on("input",(function(e){n.styleConfig.addNextText.value=e.target.value})),this.removeTextEl=s("div","".concat(pe,"-warn-style")).children(this.removeTextCheckEl.el,this.removeTextInputEl),this.contentEl=s("div","".concat(pe,"-warn-style_main")).children(s("div","".concat(pe,"-warn-style_item")).children(this.rowEl,this.colEl),s("div","".concat(pe,"-warn-style_item")).children(this.bStyleEl,this.bColorEl),s("div","".concat(pe,"-warn-style_item")).children(this.bgEl,this.alignEl),s("div","".concat(pe,"-warn-style_item")).children(this.valignEl,this.colorWarnEl),s("div","".concat(pe,"-warn-style_item")).children(this.fontsizeEl,this.boldCheckEl.el),s("div","".concat(pe,"-warn-style_item")).children(this.italicCheckEl.el,this.underlineCheckEl.el),s("div","".concat(pe,"-warn-style_item")).children(this.indentEl.el,this.quantileEl.el),s("div","".concat(pe,"-warn-style_item")).children(this.replaceEl.el,this.multiplyingEl.el),s("div","".concat(pe,"-warn-style_item")).children(this.decimalEl.el,this.addTextEl.el),s("div","".concat(pe,"-warn-style_item")).children(this.removeTextEl.el));var r=this;this.el=new Dialog({title:"编辑条件样式效果",content:this.contentEl.el,buttons:[{value:"取消",type:" ",className:"".concat(pe,"-slash_button"),events:function(){r.hide()}},{value:"确定",type:"primary",className:"".concat(pe,"-slash_button"),events:function(){r.save()}}],width:"510px"}),this.el.element.title.classList.add("".concat(pe,"-dialog_title")),this.bStyleSelectEl.setup(),this.alignSelectEl.setup(),this.valignSelectEl.setup(),this.fontsizeSelectEl.setup(),this.quantileSelectEl.setup(),this.multiplyingSelectEl.setup(),this.decimalSelectEl.setup(),this.inputElDict={height:{check:this.rowCheckEl,value:this.rowInputEl},width:{check:this.colCheckEl,value:this.colInputEl},indent:{check:this.indentCheckEl,value:this.indentInputEl},replaceNullText:{check:this.replaceCheckEl,value:this.replaceInputEl},addPreText:{check:this.addTextCheckEl,value:this.addTextInputEl},addNextText:{check:this.removeTextCheckEl,value:this.removeTextInputEl}},this.colorElDict={border_color:{check:this.bColorCheckEl,value:this.bColorPalette,inner:this.bcolor_inner},bgcolor:{check:this.bgColorCheckEl,value:this.bgColorPalette,inner:this.bgcolor_inner},color:{check:this.colorCheckEl,value:this.colorPalette,inner:this.color_inner}},this.selectElDict={border_style:{check:this.bStyleCheckEl,value:this.bStyleSelectEl},align:{check:this.alignCheckEl,value:this.alignSelectEl},valign:{check:this.valignCheckEl,value:this.valignSelectEl},size:{check:this.fontsizeCheckEl,value:this.fontsizeSelectEl},quantile:{check:this.quantileCheckEl,value:this.quantileSelectEl},multiplying:{check:this.multiplyingCheckEl,value:this.multiplyingSelectEl},decimal:{check:this.decimalCheckEl,value:this.decimalSelectEl}}}var t,n;return t=e,(n=[{key:"show",value:function(){var e=(e=this.$parent.getCurrentWarn()).stylesConfig;this.resetStyleConfig(),this.createStyleConfig(e),this.showStyleConfig(),this.el.show()}},{key:"hide",value:function(){this.el.hide()}},{key:"save",value:function(){var e,t="",n={},r={},i={};for(e in this.styleConfig){var o,a,s=this.styleConfig[e];s.isopen&&(["bold","italic","underline"].includes(e)?t+="".concat(s.name,"； "):t+="".concat(s.name,"：").concat(s.value,"； "),["height","width","bgcolor","align","valign","color","indent"].includes(e)&&(n[e]=s.value),["underline","strike","textwrap"].includes(e)&&(n[e]=s.value),["border_color","border_style"].includes(e)&&(a=o="","border_style"==e&&(o=s.value),"border_color"==e&&(a=s.value),n.border={left:[o,a],top:[o,a],right:[o,a],bottom:[o,a]}),["size"].includes(e)&&(i[e]=s.value,n.font=i),["bold","italic"].includes(e)&&(i[e]=s.value,n.font=i),["quantile","multiplying","decimal","replaceNullText","addPreText","addNextText"].includes(e)&&(r[e]="replaceNullText"==e?{type:1,value:s.value}:s.value,n.format=r))}var u=this.$parent.getCurrentWarn();u.stylesConfig=n,u.style_str=t,this.$parent.setWarnStyleTextDomValue(u),this.hide()}},{key:"showStyleConfig",value:function(){this.showInputStyle(),this.showSelectStyle(),this.showColorStyle()}},{key:"showInputStyle",value:function(){for(var e in this.inputElDict){var t=this.inputElDict[e];this.styleConfig[e]&&(e=this.styleConfig[e],t.check.setCheck(e.isopen),ve()(t.value.el).val(e.value))}}},{key:"showColorStyle",value:function(){for(var e in this.colorElDict){var t=this.colorElDict[e];this.styleConfig[e]&&(e=this.styleConfig[e],t.check.setCheck(e.isopen),t.inner.css("background",e.value),t.value.picker.initColor(e.value))}}},{key:"showSelectStyle",value:function(){for(var e in this.selectElDict){var t=this.selectElDict[e];this.styleConfig[e]&&(e=this.styleConfig[e],t.check.setCheck(e.isopen),t.value.setValue(e.value))}}},{key:"createStyleConfig",value:function(e){if(e){var t,n=["height","width","bgcolor","align","valign","color","indent","underline","textwrap","strike"];for(t in e){var r=e[t];if(n.includes(t)){var i=this.styleConfig[t];i.isopen=!0,i.value=r}else if("border"==t&&r)for(var o=["left","right","bottom","top"],a=0;a<o.length;a++){if(r[u=o[a]]){var s=(u=b2(r[u],2))[0],u=u[1];this.styleConfig.border_color.isopen=!0,this.styleConfig.border_color.value=s,this.styleConfig.border_style.isopen=!0,this.styleConfig.border_style.value=u;break}}else if("font"==t&&r){var c,l=r[t];for(c in l){var h=l[c];h&&this.styleConfig[c]&&(this.styleConfig[c].isopen=!0,this.styleConfig[c].value=h)}}else if("format"==t&&r){var f,d=r[t];for(f in d){var p=d[f];this.styleConfig[f]&&("replaceNullText"===f?(this.styleConfig[f].isopen=Boolean(p.type),this.styleConfig[f].value=p.value):(this.styleConfig[f].isopen=!0,this.styleConfig[f].value=p))}}}}}},{key:"resetStyleConfig",value:function(){this.styleConfig={height:{isopen:!1,value:"",name:"行高"},width:{isopen:!1,name:"列宽",value:""},border_style:{isopen:!1,name:"边框样式",value:"thin"},border_color:{name:"边框颜色",isopen:!1,value:"#000000"},bgcolor:{isopen:!1,name:"背景色",value:"#000000"},align:{isopen:!1,name:"水平对齐",value:"left"},valign:{isopen:!1,name:"垂直对齐",value:"middle"},color:{name:"文字颜色",isopen:!1,value:"#000000"},size:{isopen:!1,name:"文字大小",value:12},bold:{isopen:!1,name:"文字加粗",value:!1},italic:{name:"文字斜体",isopen:!1,value:!1},underline:{name:"文字下划线",isopen:!1,value:!1},indent:{isopen:!1,name:"文字缩进",value:""},quantile:{isopen:!1,name:"分位",value:0},replaceNullText:{isopen:!1,name:"空值替换",value:""},multiplying:{isopen:!1,name:"倍率",value:0},decimal:{isopen:!1,name:"小数位",value:0},addPreText:{isopen:!1,name:"添加前缀",value:""},addNextText:{isopen:!1,name:"添加后缀",value:""}}}}])&&w2(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function C2(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var k2=function(){function e(t){var n=this;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.$parent=t;var r=this;this.currentIndex=0,this.warnsList=[],this.addButtonEl=s("button","ui-button").attr({type:"primary"}).on("click",(function(e){var t="条件".concat(n.warnsList.length+1);n.warnsList.push({name:t,act_on:1,cond_str:"",filter:{logic:1,params:[{logic:1,params:[{column:"",data_type:3,logic:1,type:1,value:""}]}]},style_str:"",stylesConfig:{}}),t=n.warnsList.length;n.currentIndex=t-1,n.resetWarnFilterDom(t),n.resetWarnListDom(t),n.setWarnFilterDomValue(n.warnsList[t-1])})).html("添加条件").css({padding:"8px 15px",lineHeight:"14px"}),this.removeButtonEl=s("button","ui-button").attr({type:"normal"}).on("click",(function(e){n.warnsList=[],n.resetNowarnEl()})).html("清除所有条件").css({padding:"8px 15px",lineHeight:"14px",marginLeft:"12px"}),this.filterEl=new g2(this,"添加条件",!0),this.filterEl.hide(),this.warnStyleCompEl=new x2(this),this.warnStyleCompEl.hide(),this.noWarnEl=s("div","".concat(pe,"-no_warn")).children(s("span").html("当前无条件，点击按钮进行添加")),this.warnEl=s("div","".concat(pe,"-design_warn")),this.warnListEl=s("div","".concat(pe,"-warn-list_main")),this.warnRangeEl=s("div","".concat(pe,"-flex--center")).children(s("input").attr({type:"radio",id:"r1",name:"act_on",value:1}).css({"margin-right":"8px"}),s("label").attr({for:"r1"}).html("单元格").css({marginRight:"16px","line-height":"0px"}),s("input").attr({type:"radio",id:"r2",name:"act_on",value:2}).css({"margin-right":"8px"}),s("label").attr({for:"r2"}).html("整行").css({marginRight:"16px","line-height":"0px"}),s("input").attr({type:"radio",id:"r3",name:"act_on",value:3}).css({"margin-right":"8px"}),s("label").attr({for:"r3"}).html("整列").css({marginRight:"16px","line-height":"0px"})),this.warnTypeEl=s("div","".concat(pe,"-ui-form-item")).children(s("label","".concat(pe,"-ui-form-item__label ").concat(pe,"-label-font--14")).html("作用范围：").css("width","70px"),this.warnRangeEl),H0(this.warnRangeEl.el,"act_on",1),ve()(this.warnRangeEl.el).find("input[name^=act_on]").on("change",(function(){var e=z0(n.warnRangeEl.el,"act_on");n.warnsList[n.currentIndex].act_on=Number(e)})),this.warnStyleTextEl=s("textarea").attr({is:"ui-textarea",rows:5,disabled:"disabled"}).css({width:"408px",background:"#f5f7fa",color:"#a8abb2",cursor:"not-allowed",borderColor:"#e4e7ed"}),this.warnStyleEditEl=s("div","".concat(pe,"-icon-img-warn_edit")).css({width:"16px",height:"16px",marginRight:"2px",cursor:"pointer"}).on("click",(function(){n.warnStyleCompEl.show()})),this.warnStyleEl=s("div","".concat(pe,"-ui-form-item")).children(s("label","".concat(pe,"-ui-form-item__label ").concat(pe,"-label-font--14")).html("样式效果：").css("width","70px"),s("div","".concat(pe,"-warn-style_mian")).children(this.warnStyleTextEl,s("div","".concat(pe,"-condition-button_mian")).children(this.warnStyleEditEl,s("span").html("编辑").css("cursor","pointer").on("click",(function(){n.warnStyleCompEl.show()}))))),this.warnFilterTextEl=s("textarea").attr({is:"ui-textarea",rows:5,disabled:"disabled"}).css({width:"408px",background:"#f5f7fa",color:"#a8abb2",cursor:"not-allowed",borderColor:"#e4e7ed"}),this.warnFilterEditEl=s("div","".concat(pe,"-icon-img-warn_edit")).css({width:"16px",height:"16px",marginRight:"2px",cursor:"pointer"}).on("click",(function(){var e=n.warnsList[n.currentIndex];n.filterEl.show(e.filter.params)})),this.warnFilterEl=s("div","".concat(pe,"-ui-form-item")).children(s("label","".concat(pe,"-ui-form-item__label ").concat(pe,"-label-font--14")).html("数据条件：").css("width","70px"),s("div","".concat(pe,"-warn-style_mian")).children(this.warnFilterTextEl,s("div","".concat(pe,"-condition-button_mian")).children(this.warnFilterEditEl,s("span").html("编辑").css("cursor","pointer").on("click",(function(){var e=n.warnsList[n.currentIndex];n.filterEl.show(e.filter.params)}))))),this.warnConditionEl=s("div","".concat(pe,"-warn-condition_main")).children(this.warnTypeEl,this.warnStyleEl,this.warnFilterEl),this.resetWarnListDom(),this.warnEl.children(this.warnListEl,this.warnConditionEl),this.mainEl=s("div"),this.warnConditionList=[],this.warnsList.length<1?this.mainEl.children(this.noWarnEl):this.mainEl.children(this.warnEl),this.contentEl=s("div","".concat(pe,"-dwarn_main")).children(s("div","").children(this.addButtonEl,this.removeButtonEl,this.mainEl)),this.el=new Dialog({title:"条件格式",content:this.contentEl.el,buttons:[{value:"取消",type:" ",className:"".concat(pe,"-slash_button"),events:function(){r.hide()}},{value:"确定",type:"primary",className:"".concat(pe,"-slash_button"),events:function(){r.save()}}],width:"720px"}),this.el.element.title.classList.add("".concat(pe,"-dialog_title")),this.hide()}var t,n;return t=e,(n=[{key:"setTitle",value:function(e){this.el.params.title="条件格式【".concat(e,"】")}},{key:"selectWarn",value:function(e){--e,this.warnListDom.forEach((function(t,n){e==n?ve()(t.el.el).addClass("active"):ve()(t.el.el).removeClass("active")}))}},{key:"resetWarnListDom",value:function(e){var t=this;this.warnListDom=[],this.warnListEl.html(""),this.warnsList.forEach((function(e,n){e=t.createWarnList(e,n),t.warnListEl.children(e.el),t.warnListDom.push(e)})),this.selectWarn(e)}},{key:"setWarnFilterDomValue",value:function(e){H0(this.warnRangeEl.el,"act_on",e.act_on),this.setWarnStyleTextDomValue(e),this.setWarnFilterTextDomValue(e)}},{key:"setWarnStyleTextDomValue",value:function(e){ve()(this.warnStyleTextEl.el).val(e.style_str)}},{key:"setWarnFilterTextDomValue",value:function(e){ve()(this.warnFilterTextEl.el).val(e.cond_str)}},{key:"resetWarnFilterDom",value:function(){this.mainEl.html(""),this.mainEl.children(this.warnEl)}},{key:"resetNowarnEl",value:function(){this.mainEl.html(""),this.mainEl.children(this.noWarnEl)}},{key:"createWarnList",value:function(e,t){var n=this,r={},i=s("div").css({width:"12px",height:"12px"}).innerHTML('<svg viewBox="0 0 1024 1024"\nxmlns="http://www.w3.org/2000/svg">\n<path fill="currentColor" d="M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"></path>\n</svg>').on("click",(function(e){e.stopPropagation(),n.warnsList.splice(t,1),(e=n.warnsList.length)<1?n.resetNowarnEl():(e-1<(n.currentIndex=t)&&(n.currentIndex=e-1),n.resetWarnListDom(e),n.setWarnFilterDomValue(n.warnsList[n.currentIndex]),n.selectWarn(n.currentIndex+1))}));e=s("div","".concat(pe,"-warn-list_item")).children(s("span").html(e.name),i).on("click",(function(){n.selectWarn(t+1),n.currentIndex=t,n.setWarnFilterDomValue(n.warnsList[n.currentIndex])}));return r.el=e,r.closeEl=i,r}},{key:"show",value:function(){var e=null,t=this.$parent.spreadSheet,n=(r=J0(t)).range,r=r.dataProxy,i=((t=(e=!Y0(t)&&K0(t)?(t=Object(u.e)(n.sci,n.sri),i=Object(u.e)(n.eci,n.eri),"".concat(t,"-").concat(i)):Object(u.e)(n.sci,n.sri),this.setTitle(e),r.getCell(n.sri,n.sci)))&&t.warn?(this.warnsList=t.warn,this.resetWarnFilterDom(1),this.resetWarnListDom(1),this.setWarnFilterDomValue(this.warnsList[0])):(this.warnsList=[],this.resetNowarnEl()),function(e){var t,n=e.rows._,r=[];for(t in n){var i=n[t];if(i&&i.cells){var o,a=i.cells;for(o in a){var s,u,c=a[o];c&&c.bindObj&&0!=Object.keys(c.bindObj).length&&((s=c.bindObj.value).includes(".")||(u=null,u=c.bindObj.sheetName,s="".concat(u,".").concat(s)),u=c.bindObj.type||c.bindObj.data_type,c={label:s,value:"".concat(t,":").concat(o),data_type:Number(u),name:s},r.push(c))}}}return r}(this.$parent.spreadSheet.sheet.data));e=function(e){var t,n={},r=P0(e);try{for(r.s();!(t=r.n()).done;){var i=t.value;n[i.value]=i.label}}catch(e){r.e(e)}finally{r.f()}return n}(i);this.filterEl.setColumnListDict(e),this.filterEl.setColumnList(i),this.el.show()}},{key:"hide",value:function(){this.el.hide()}},{key:"getCurrentWarn",value:function(){return this.warnsList[this.currentIndex]}},{key:"saveChange",value:function(e){var t=this.warnsList[this.currentIndex];t.filter=e.filter,t.cond_str=e.describeStr,this.setWarnFilterTextDomValue(t)}},{key:"save",value:function(){var e=this.$parent.spreadSheet,t=(e=J0(e)).range;e=e.dataProxy;U0(t={sri:t.sri,sci:t.sci,eri:t.sri,eci:t.sci},e,{warn:this.warnsList}),this.hide()}}])&&C2(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function E2(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var S2=[{name:"传递动态字段值",value:1},{name:"传递固定值",value:2}],_2=function(){function e(t){var n=this;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.$parent=t;var r=this;this.columnsList=[],this.custom={type:2,url:"",openType:1,params:[],linkName:""},this.params={key:"",type:1,value:""},this.linkNameInputEl=s("input","".concat(pe,"-ui-input")).attr({is:"ui-input",width:"190px"}).on("input",(function(e){n.custom.linkName=e.target.value})),this.linkNameEl=s("div","".concat(pe,"-ui-form-item")).children(s("label","".concat(pe,"-ui-form-item__label ").concat(pe,"-label-font--14")).html("页面名称：").css("width","90px"),s("div","".concat(pe,"-ui-form-item__content")).children(this.linkNameInputEl)),this.linkUrlInputEl=s("input","".concat(pe,"-ui-input")).attr({is:"ui-input",width:"190px"}).on("input",(function(e){n.custom.url=e.target.value})),this.linkUrlEl=s("div","".concat(pe,"-ui-form-item")).children(s("label","".concat(pe,"-ui-form-item__label ").concat(pe,"-label-font--14")).html("页面地址：").css("width","90px"),s("div","".concat(pe,"-ui-form-item__content")).children(this.linkUrlInputEl)),this.linkOpenTypeRadioEl=s("div","".concat(pe,"-flex--center")).children(s("input").attr({type:"radio",id:"r1",name:"openType",value:1}).css("marginRight","8px"),s("label").attr({for:"r1"}).html("浏览器新窗口").css({marginRight:"16px","line-height":0}),s("input").attr({type:"radio",id:"r2",name:"openType",value:2}).css({marginRight:"8px"}),s("label").attr({for:"r2"}).html("浏览器当前窗口").css({"line-height":0})),this.linkOpenTypeEl=s("div","".concat(pe,"-ui-form-item")).children(s("label","".concat(pe,"-ui-form-item__label ").concat(pe,"-label-font--14")).html("链接打开：").css("width","90px"),this.linkOpenTypeRadioEl),H0(this.linkOpenTypeRadioEl.el,"openType",this.custom.openType),this.addButtonEl=s("div","".concat(pe,"-ui-form-item ").concat(pe,"-link-add_param")).children(s("div").css({width:"14px",height:"14px"}).innerHTML('<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M480 480V128a32 32 0 0 1 64 0v352h352a32 32 0 1 1 0 64H544v352a32 32 0 1 1-64 0V544H128a32 32 0 0 1 0-64h352z"></path></svg>'),s("div").html("添加参数").css("marginLeft","6px")).on("click",(function(){n.custom.params.push({key:"",type:1,value:""}),n.createParamsDom()})).css({width:"100px","line-height":"0"}),this.mainEl=s("div","".concat(pe,"-params_main")),this.paramsDomList=[],this.createParamsDom(),this.contentEl=s("div","".concat(pe,"-design-cusom_link")).children(this.linkNameEl,this.linkUrlEl,this.linkOpenTypeEl,this.addButtonEl,this.mainEl),this.el=new Dialog({title:"跳转到自定义页面",content:this.contentEl.el,buttons:[{value:"取消",type:" ",className:"".concat(pe,"-slash_button"),events:function(){r.hide()}},{value:"确定",type:"primary",className:"".concat(pe,"-slash_button"),events:function(){r.save()}}],width:"600px"}),this.el.element.title.classList.add("".concat(pe,"-dialog_title")),this.el.hide()}var t,n;return t=e,(n=[{key:"hide",value:function(){this.el.hide()}},{key:"show",value:function(e){e?this.custom=e:this.resetCustom(),this.columnsList=this.$parent.getColumnsList(),this.resetCustomDom(this.custom),this.createParamsDom(),this.el.show()}},{key:"resetCustomDom",value:function(e){ve()(this.linkNameInputEl.el).val(e.linkName),ve()(this.linkUrlInputEl.el).val(e.url),H0(this.linkOpenTypeRadioEl.el,"openType",e.openType)}},{key:"createParamsDom",value:function(){var e=this,t=this.custom.params;this.mainEl.html(""),this.paramsDomList=[],0<t.length&&t.forEach((function(t,n){t=e.createParamsItemDom(t,n),e.paramsDomList.push(t),e.mainEl.children(t.el)}))}},{key:"createParamsItemDom",value:function(e,t){var n=this,r={},i=s("input","".concat(pe,"-ui-input__24")).attr({is:"ui-input",placeholder:"参数key"}).css("width","150px").on("input",(function(t){t=t.target.value,e.key=t})),o=(ve()(i.el).val(e.key),function(t){e.value=t}),a=s("div"),u=null,c=(1==e.type?(u=new e2(this.columnsList,e.value,{width:"150px",height:"24px"},!1,{onChange:o}),a.children(u.el),u.setup()):(u=s("input","".concat(pe,"-ui-input__24")).attr({is:"ui-input",placeholder:"参数value"}).css("width","150px").on("input",(function(t){t=t.target.value,e.value=t})),ve()(u.el).val(e.value),a.children(u)),new e2(S2,e.type,{width:"150px",height:"24px"},!1,{onChange:function(t){(t=Number(t))!=e.type&&(a.html(""),1==t?(u=new e2(n.columnsList,"",{width:"150px",height:"24px"},!1,{onChange:o}),a.children(u.el),u.setup()):(u=s("input","".concat(pe,"-ui-input__24")).attr({is:"ui-input",placeholder:"参数value"}).css("width","150px").on("input",(function(t){t=t.target.value,e.value=t})),a.children(u)),e.type=t)}})),l=(i=s("div","".concat(pe,"-params_content")).children(i,c.el,a).css({height:"40px","margin-top":"10px"}),s("div").css({width:"14px",height:"14px",cursor:"pointer"}).innerHTML('<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" class="p_remove"><path fill="currentColor" d="M352 480h320a32 32 0 1 1 0 64H352a32 32 0 0 1 0-64z"></path><path fill="currentColor" d="M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768zm0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896z"></path></svg>').on("click",(function(){n.custom.params.splice(t,1),n.createParamsDom()})));i=s("div","".concat(pe,"-params_item")).children(i,l);return c.setup(),r.el=i,r}},{key:"save",value:function(){this.custom.openType=z0(this.linkOpenTypeRadioEl.el,"openType"),this.$parent.setLink(this.custom),this.hide()}},{key:"resetCustom",value:function(){this.custom={type:2,url:"",openType:1,params:[],linkName:""}}}])&&E2(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function O2(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var T2=function(){function e(t){var n=this;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.$parent=t;var r=this;this.sheet={type:3,url:"",openType:1,params:[],linkName:""},this.linkNameInputEl=s("input","".concat(pe,"-ui-input")).attr({is:"ui-input",width:"190px"}).on("input",(function(e){n.sheet.linkName=e.target.value})),this.linkNameEl=s("div","".concat(pe,"-ui-form-item")).children(s("label","".concat(pe,"-ui-form-item__label ").concat(pe,"-label-font--14")).html("页面名称：").css("width","90px"),s("div","".concat(pe,"-ui-form-item__content")).children(this.linkNameInputEl)),this.linkUrlSelectEl=new e2([],"",{width:"190px",height:"30px"},!1,{onChange:function(e){n.sheet.url=e}}),this.linkUrlEl=s("div","".concat(pe,"-ui-form-item")).children(s("label","".concat(pe,"-ui-form-item__label ").concat(pe,"-label-font--14")).html("选择页签：").css("width","90px"),s("div","".concat(pe,"-ui-form-item__content")).children(this.linkUrlSelectEl.el)),this.linkUrlSelectEl.setup(),this.contentEl=s("div","".concat(pe,"-design-sheet_link")).children(this.linkNameEl,this.linkUrlEl),this.el=new Dialog({title:"跳转到页签",content:this.contentEl.el,buttons:[{value:"取消",type:" ",className:"".concat(pe,"-slash_button"),events:function(){r.hide()}},{value:"确定",type:"primary",className:"".concat(pe,"-slash_button"),events:function(){r.save()}}],width:"600px"}),this.el.element.title.classList.add("".concat(pe,"-dialog_title")),this.el.hide()}var t,n;return t=e,(n=[{key:"show",value:function(e){e?this.sheet=e:this.resetSheet(),this.resetDom(this.sheet),this.el.show()}},{key:"resetDom",value:function(e){ve()(this.linkNameInputEl.el).val(e.linkName);var t=this.$parent.getSheetList();this.linkUrlSelectEl.resetOptions(t,e.url)}},{key:"hide",value:function(){this.el.hide()}},{key:"save",value:function(){this.$parent.setLink(this.sheet),this.hide()}},{key:"resetSheet",value:function(){this.sheet={type:3,url:"",openType:1,params:[],linkName:""}}}])&&O2(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function D2(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function B2(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var I2={2:"跳转到自定义页面",3:"跳转到页签"},M2=[{id:2,value:"跳转到自定义页面"},{id:3,value:"跳转到页签"}],j2=function(){function e(t){var n=this;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.$parent=t;var r=this;if(t=(this.linksList=[],this.links={},this.mode="add",this.editIndex=0,this.$parent.options.hyperlink)){var i,o=[],a=function(e,t){var n,r,i,o,a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(a)return r=!(n=!0),{s:function(){a=a.call(e)},n:function(){var e=a.next();return n=e.done,e},e:function(e){r=!0,i=e},f:function(){try{n||null==a.return||a.return()}finally{if(r)throw i}}};if(Array.isArray(e)||(a=function(e,t){var n;if(e)return"string"==typeof e?D2(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?D2(e,t):void 0}(e))||t&&e&&"number"==typeof e.length)return a&&(e=a),o=0,{s:t=function(){},n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(t);try{for(a.s();!(i=a.n()).done;){var u=i.value;this.links[u.value]=u.name,o.push({id:u.value,value:u.name,event:u.event})}}catch(t){a.e(t)}finally{a.f()}t=o}else t=M2,this.links=I2;this.customLinkCompEl=new _2(this),this.sheetLinkCompEl=new T2(this),this.addButtonEl=s("button","ui-button").attr({type:"primary"}).html("添加链接").css({padding:"8px 15px",lineHeight:"14px"}),this.dropEl=new Drop(this.addButtonEl.el).list(t,{onSelect:function(e){r.mode="add",2==e.id?r.customLinkCompEl.show():3==e.id?r.sheetLinkCompEl.show():(e.columnsList=r.getColumnsList(),e.mode="add",r.$parent.trigger(e.event,e))},width:150,selector:"button"}),this.removeButtonEl=s("button","ui-button").attr({type:"normal"}).html("清空所有链接").css({padding:"8px 15px",lineHeight:"14px",marginLeft:"12px"}).on("click",(function(){n.linksList=[],n.resetLinkEl()})),this.noLinkEl=s("div","".concat(pe,"-no_link")).children(s("span").html("当前无链接，点击按钮进行添加")),this.linkEl=s("div","".concat(pe,"-link_main")),this.mainEl=s("div"),this.linkDomEL=[],this.resetLinkEl(),this.contentEl=s("div","".concat(pe,"-design-link")).children(s("div","").children(this.addButtonEl,this.removeButtonEl,this.mainEl)),this.el=new Dialog({title:"超级链接",content:this.contentEl.el,buttons:[{value:"取消",type:" ",className:"".concat(pe,"-slash_button"),events:function(){r.hide()}},{value:"确定",type:"primary",className:"".concat(pe,"-slash_button"),events:function(){r.save()}}],width:"600px"}),this.el.element.title.classList.add("".concat(pe,"-dialog_title")),this.el.hide()}var t,n;return t=e,(n=[{key:"getColumnsList",value:function(){for(var e=this.$parent.spreadSheet,t=((e=J0(e)).range,e.dataProxy),n=[],r=(e=t.contentRange()).sri,i=e.sci,o=e.eri,a=e.eci,s=r;s<o;s++){var u=t.rows._[s];if(u)for(var c=i;c<a;c++){var l=u.cells[c];l&&l.bindObj&&2==l.type&&null!=l.bindObj.value&&null!=l.bindObj.value&&n.push({value:l.bindObj.value,name:l.bindObj.value})}}return n}},{key:"show",value:function(e){var t,n,r=this.$parent.spreadSheet,i=(o=J0(r)).range,o=o.dataProxy;(r=(n=!Y0(r)&&K0(r)?(r=Object(u.e)(i.sci,i.sri),t=Object(u.e)(i.eci,i.eri),"".concat(r,"-").concat(t)):Object(u.e)(i.sci,i.sri),this.setTitle(n),o.getCell(i.sri,i.sci)))&&r.links?this.linksList=r.links:this.linksList=[],this.resetLinkEl(),e||this.el.show()}},{key:"hide",value:function(){this.el.hide()}},{key:"save",value:function(){var e,t,n,r,i;e=this.$parent.spreadSheet,t=this.linksList,r=(n=J0(e)).range,n=n.dataProxy,i={},t.length<1?(i.underline=!1,i.color="#000"):(i.underline=!0,i.color="#0170c1"),U0(r,n,{links:t,style:i}),e.sheet.table.render(),this.hide()}},{key:"resetLinkEl",value:function(){var e=this;this.linkDomEL=[],this.mainEl.html(""),this.linksList.length<1?this.mainEl.children(this.noLinkEl):(this.linkEl.html(""),this.linksList.forEach((function(t,n){t=e.createLinkEl(t,n),e.linkDomEL.push(t),e.linkEl.children(t.el)})),this.mainEl.children(this.linkEl))}},{key:"getSheetList",value:function(){var e=this.$parent.spreadSheet.datas,t=[];return e.forEach((function(e){t.push({name:e.name,value:e.name})})),t}},{key:"createLinkEl",value:function(e,t){var n=this,r={},i=s("div","".concat(pe,"-link_item")),o=s("div","".concat(pe,"-icon-img-condition_edit")).css({width:"16px",height:"16px",marginLeft:"10px"}).on("click",(function(){n.mode="edit",n.editIndex=t;var e=n.linksList[t];2==e.type?n.customLinkCompEl.show(e):3==e.type?n.sheetLinkCompEl.show(e):(e.columnsList=n.getColumnsList(),e.mode="edit",e.index=t,n.$parent.trigger(e.event,e))})),a=s("div","".concat(pe,"-icon-img-condition_delete")).css({width:"16px",height:"16px",marginLeft:"10px"}).on("click",(function(){n.linksList.splice(t,1),n.resetLinkEl()}));e=s("div","".concat(pe,"-link_item_content")).children(s("div","".concat(pe,"-link_item_type")).html(this.links[e.type]),s("div","".concat(pe,"-link_item_url")).html(e.linkName||e.reportName)).css("height","48px");return i.children(e,a,o),r.el=i,r}},{key:"setTitle",value:function(e){this.el.params.title="超级链接【".concat(e,"】")}},{key:"setLink",value:function(e){"add"==this.mode?this.linksList.push(e):this.linksList[this.editIndex]=e,this.resetLinkEl()}}])&&B2(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function N2(e,t){var n,r,i,o,a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(a)return r=!(n=!0),{s:function(){a=a.call(e)},n:function(){var e=a.next();return n=e.done,e},e:function(e){r=!0,i=e},f:function(){try{n||null==a.return||a.return()}finally{if(r)throw i}}};if(Array.isArray(e)||(a=function(e,t){var n;if(e)return"string"==typeof e?F2(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?F2(e,t):void 0}(e))||t&&e&&"number"==typeof e.length)return a&&(e=a),o=0,{s:t=function(){},n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function F2(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function R2(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}n(397);var P2=function(){function e(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"",i=this,o=e;if(!(i instanceof o))throw new TypeError("Cannot call a class as a function");this.list=t,this.checkList=n,this.nodeList=[],this.el=this.init(),this.create(),this.addClass(r)}var t,n;return t=e,(n=[{key:"addClass",value:function(e){if(e){var t,n=N2(e.split(" "));try{for(n.s();!(t=n.n()).done;){var r=t.value;this.el.addClass(r)}}catch(e){n.e(e)}finally{n.f()}}}},{key:"removeClass",value:function(e){this.el.removeClass(e)}},{key:"init",value:function(){return s("div","".concat(pe,"-checkbox-group"))}},{key:"create",value:function(){for(var e=this.list,t=this.checkList,n=0;n<e.length;n++){var r=e[n],i=!!t.includes(r.value);i=new gG(r.name,r.value,i,{},r.render,r.labelStyle);this.nodeList.push(i),this.el.child(i.el.el)}}},{key:"getChecked",value:function(){var e,t=[],n=N2(this.nodeList);try{for(n.s();!(e=n.n()).done;){var r=e.value;r.checked&&t.push(r.value)}}catch(e){n.e(e)}finally{n.f()}return t}},{key:"getCheckEl",value:function(e){var t,n=N2(this.nodeList);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(r.value==e)return r}}catch(e){n.e(e)}finally{n.f()}}},{key:"setChecked",value:function(e){var t,n=this.nodeList,r=(this.checkList=e,N2(n));try{for(r.s();!(t=r.n()).done;){var i=t.value;e.includes(i.value)&&i.check()}}catch(e){r.e(e)}finally{r.f()}}}])&&R2(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function L2(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}n(398);var U2={min:0,max:1e5,step:1},z2=function(){function e(t){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},i=this,o=e;if(!(i instanceof o))throw new TypeError("Cannot call a class as a function");this.options=Wu(U2,t),i=Number(n)<this.options.min?this.options.min:Number(n),this.events=r,this.inputEl=new ac(this.options,i,{},(function(e){e=e.target.value,(e=Number(e))<this.options.min?(e=this.options.min,this.setValue(this.options.min)):e>this.options.max&&(e=this.options.max,this.setValue(this.options.max)),r.onChange&&r.onChange(e)}),(function(e){(e=Number(e))<this.options.min?(e=this.options.min,this.setValue(this.options.min)):e>this.options.max&&(e=this.options.max,this.setValue(this.options.max)),r.onInput&&r.onInput(e)}),(function(e){(e=Number(e))<this.options.min?(e=this.options.min,this.setValue(this.options.min)):e>this.options.max&&(e=this.options.max,this.setValue(this.options.max)),r.onInput&&r.onInput(e)})),this.el=this.init()}var t,n;return t=e,(n=[{key:"init",value:function(){var e=this;return s("div","".concat(pe,"-input-number is-controls-right")).children(s("span","".concat(pe,"-input-number__decrease")).children(s("i","icon-arrow-up")).attr("role","button").on("click",(function(){var t=e.inputEl.getValue(),n=(t=Number(t),(i=e.options).step),r=i.min,i=i.max;(t-=n)<=r&&(t=r,ve()(e.el.el).find(".".concat(pe,"-input-number__decrease")).addClass("is-disabled")),t<i&&ve()(e.el.el).find(".".concat(pe,"-input-number__increase")).removeClass("is-disabled"),e.inputEl.setValue(t),e.events.onInput&&e.events.onInput(t),e.events.onChange&&e.events.onChange(t)})),s("span","".concat(pe,"-input-number__increase")).children(s("i","icon-arrow-up")).attr("role","button").on("click",(function(){var t=e.inputEl.getValue(),n=(t=Number(t),(i=e.options).step),r=i.max,i=i.min;r<=(t+=n)&&(t=r,ve()(e.el.el).find(".".concat(pe,"-input-number__increase")).addClass("is-disabled")),i<t&&ve()(e.el.el).find(".".concat(pe,"-input-number__decrease")).removeClass("is-disabled"),e.inputEl.setValue(t),e.events.onInput&&e.events.onInput(t),e.events.onChange&&e.events.onChange(t)})),this.inputEl.el)}},{key:"setValue",value:function(e){this.inputEl.setValue(e)}},{key:"getValue",value:function(){return this.inputEl.getValue()}}])&&L2(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function H2(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var $2=function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");function n(e){a.config.repeatRowHead.start=e}function r(e){a.config.repeatRowHead.end=e}function i(e){a.config.repeatColHead.start=e}function o(e){a.config.repeatColHead.end=e}this.$parent=t,this.config={repeatRowHead:{start:1,end:1,type:1,enable:!1},repeatColHead:{start:1,end:1,type:2,enable:!1}};var a=this,u=(t=(this.configDom={1:{sEl:null,eEl:null},2:{sEl:null,eEl:null}},{paddingLeft:"6px"}),this.headerCheckBoxGroup=new P2([{name:"重复标题行",value:1,render:function(){var e=new z2({},0,{onInput:n}),t=e.el,i=new z2({},0,{onInput:r}),o=i.el;return a.configDom[1].sEl=e,a.configDom[1].eEl=i,s("div","").children(s("span").css("marginRight","40px").innerHTML("标题行"),s("span").css("marginRight","4px").innerHTML("从第"),t.el,s("span").css({paddingLeft:"4px",paddingRight:"4px"}).innerHTML("行至第"),o.el,s("span").css("paddingLeft","5px").innerHTML("行"))},labelStyle:t},{name:"重复标题列",value:2,render:function(){var e=new z2({},0,{onInput:i}),t=e.el,n=new z2({},0,{onInput:o}),r=n.el;return a.configDom[2].sEl=e,a.configDom[2].eEl=n,s("div","").children(s("span").css("marginRight","40px").innerHTML("标题列"),s("span").css("marginRight","4px").innerHTML("从第"),t.el,s("span").css({paddingLeft:"4px",paddingRight:"4px"}).innerHTML("列至第"),r.el,s("span").css("paddingLeft","5px").innerHTML("列"))},labelStyle:t}],[],"".concat(pe,"-checkbox-group_list")),s("div","".concat(pe,"-design-table-header_item")).children(s("div","".concat(pe,"-header_title")).html("表头"),s("div","".concat(pe,"-header_main")).children(this.headerCheckBoxGroup.el))),c=(this.freezeCheckGroup=new P2([{name:"冻结标题行",value:1,labelStyle:t},{name:"冻结标题列",value:2,labelStyle:t}]),s("div","".concat(pe,"-design-table-header_item")).children(s("div","".concat(pe,"-header_title")).html("冻结"),s("div","".concat(pe,"-header_main")).children(this.freezeCheckGroup.el)));this.repeatCheckGroup=new P2([{name:"重复标题行",value:1,labelStyle:t},{name:"重复标题列",value:2,labelStyle:t},{name:"重复结尾行",value:3,labelStyle:t},{name:"重复结尾列",value:4,labelStyle:t}]),s("div","".concat(pe,"-design-table-header_item")).children(s("div","".concat(pe,"-header_title")).html("重复"),s("div","".concat(pe,"-header_main")).children(this.repeatCheckGroup.el)),this.contentEl=s("div","".concat(pe,"-design-table-header")).children(u,c),this.el=new Dialog({title:"表头设置",content:this.contentEl.el,buttons:[{value:"取消",type:" ",className:"".concat(pe,"-slash_button"),events:function(){a.hide()}},{value:"确定",type:"primary",className:"".concat(pe,"-slash_button"),events:function(){a.save()}}],width:"450px"}),this.el.element.title.classList.add("".concat(pe,"-dialog_title")),this.hide()}var t,n;return t=e,(n=[{key:"hide",value:function(){this.el.hide()}},{key:"show",value:function(){var e,t=this.$parent.getCurrentSheetFreezeConfig(),n=[];for(e in(t=t||{config:{},freeze:[]}).config){var r=t.config[e];n.push(r.type)}this.headerCheckBoxGroup.setChecked(n),this.config=_.merge({repeatRowHead:{start:1,end:1,type:1,enable:!1},repeatColHead:{start:1,end:1,type:2,enable:!1}},t.config);var i=t.freeze;this.setConfigDomValue(),this.freezeCheckGroup.setChecked(i),i=this.$parent.spreadSheet.sheet.data.name;this.setTitle(i),this.el.show()}},{key:"setConfigDomValue",value:function(){var e,t=this.config;for(e in t){var n=t[e],r=this.configDom[n.type];r.sEl.setValue(n.start),r.eEl.setValue(n.end)}}},{key:"save",value:function(){var e=this.headerCheckBoxGroup.getChecked(),t=this.$parent.spreadSheet,n=this.config,r={},i=(0<(e=(e.forEach((function(e){for(var t in n){var i=n[t];i.enable=!0,i.type==e&&(r[t]=i)}})),this.freezeCheckGroup.getChecked())).length&&(i=o=0,o=[o=-1!=e.indexOf(1)?Number(n.repeatRowHead.end):o,i=-1!=e.indexOf(3)?Number(n.repeatColHead.end):i],t.sheet.data.freeze=o,t.sheet.table.render()),t.sheet.data.name),o={config:r,freeze:e};this.$parent.setSheetFreezeConfig(i,o),this.hide()}},{key:"resetConfig",value:function(){this.config={repeatRowHead:{start:1,end:1,type:1},repeatColHead:{start:1,end:1,type:2}}}},{key:"setTitle",value:function(e){this.el.params.title="表头设置【".concat(e,"】")}}])&&H2(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Q2(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function V2(e,t,n){t&&(t.sheet.table.sheetPrintOptions=n||X2,t.sheet.table.showPrintLine=e)}function q2(e,t,n){t&&(t.sheet.table._showPrintBgUrl=e,n?t.sheet.table.printBgUrl=n:t.sheet.data.printOptions&&(e=t.sheet.data.printOptions.params.imgUrl)&&(t.sheet.table.printBgUrl=e))}var G2='<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" data-v-ea893728=""><path fill="currentColor" d="M512 64a448 448 0 1 1 0 896.064A448 448 0 0 1 512 64zm67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344zM590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.992 12.992 0 0 1-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 0 1 7.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z"></path></svg>',W2=[{name:"加粗",value:"bold"},{name:"斜体",value:"italic"},{name:"下划线",value:"underline"}],K2=[{name:"不分页",value:0},{name:"按行分页",value:1}],Y2=function(){function e(t){var n=this;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.$parent=t;var r=this,i=(t=(this.waterMaskConfig={text:"",fontsize:12,color:"#D8D8D8",offsetX:200,offsetY:100,rotate:-20,fontstyle:[],open:0},this.sheetPaging={type:0,count:20,tailFill:0},this.fontsizeDict=V0(),this.openRadioEl=s("div","".concat(pe,"-flex--center")).children(s("input").attr({type:"radio",id:"r1",name:"open",value:1}).css("marginRight","8px"),s("label").attr({for:"r1"}).html("是").css("marginRight","16px"),s("input").attr({type:"radio",id:"r2",name:"open",value:0}).css("marginRight","8px"),s("label").attr({for:"r2"}).html("否")),ve()(this.openRadioEl.el).find("input[name^=open]").on("change",(function(){var e=z0(n.openRadioEl.el,"open");n.waterMaskConfig.open=Number(e)})),this.openEl=s("div","watermask_config_item").children(s("span","watermask_config_name").innerHTML("启用："),this.openRadioEl),this.textInputEl=s("input","".concat(pe,"-ui-input input-width")).attr({is:"ui-input",width:"104px",placeholder:"请输入"}).on("input",(function(e){n.waterMaskConfig.text=e.target.value})),this.textTip=s("i","ui-tips water_tip").innerHTML(G2).attr({title:"支持文字、公式。公式不支持单元格"}),this.textEl=s("div","watermask_config_item").children(s("span","watermask_config_name").innerHTML("水印内容："),this.textInputEl,this.textTip),this.offsetXInputEl=s("input","".concat(pe,"-ui-input input-width")).attr({is:"ui-input",width:"104px",placeholder:"请输入"}).on("input",(function(e){n.waterMaskConfig.offsetX=Number(e.target.value)})),this.offsetXEl=s("div","watermask_config_item").children(s("span","watermask_config_name").innerHTML("横向间距："),this.offsetXInputEl),this.fontsizeSelectEl=new e2(this.fontsizeDict,this.waterMaskConfig.fontsize,{width:"104px",height:"30px"},!1,{onChange:function(e){n.waterMaskConfig.fontsize=e}}),this.fontsizeEl=s("div","watermask_config_item").children(s("span","watermask_config_name").innerHTML("字体大小："),this.fontsizeSelectEl.el),this.offsetYInputEl=s("input","".concat(pe,"-ui-input input-width")).attr({is:"ui-input",width:"104px",placeholder:"请输入"}).on("input",(function(e){n.waterMaskConfig.offsetY=Number(e.target.value)})),this.offsetYEl=s("div","watermask_config_item").children(s("span","watermask_config_name").innerHTML("纵向间距："),this.offsetYInputEl),this.bColorPalette=new Ol(!0),this.bColorPalette.change=function(e){n.waterMaskConfig.color=e,n.bcolor_inner.css("background",e)},this.bColorPalette.hide(),this.bcolor_inner=s("div","".concat(pe,"-picker_color-inner")),this.borderColorEl=s("div","".concat(pe,"-picker_trigger")).children(this.bcolor_inner.css("background","".concat(this.waterMaskConfig.color)).children(s("div","".concat(pe,"-picker_show")),this.bColorPalette.el).on("click",(function(e){e.preventDefault(),n.bColorPalette.show()}))),this.colorEl=s("div","watermask_config_item").children(s("span","watermask_config_name").innerHTML("字体颜色："),this.borderColorEl),this.rotateTip=s("i","ui-tips water_tip").innerHTML(G2).attr({title:"[-180,180]"}),this.rotateInputEl=s("input","".concat(pe,"-ui-input input-width")).attr({is:"ui-input",width:"104px",placeholder:"请输入"}).on("input",(function(e){n.waterMaskConfig.rotate=Number(e.target.value)})),this.rotateEl=s("div","watermask_config_item").children(s("span","watermask_config_name").innerHTML("水印角度："),this.rotateInputEl,this.rotateTip),this.checkBoxGroup=new P2(W2,[],"group-list"),this.fontstyleEl=s("div","watermask_config_item").children(s("span","watermask_config_name").innerHTML("字体样式："),this.checkBoxGroup.el),this.waterstyleEl=s("div","".concat(pe,"-watermask_fontstyle")).children(this.fontstyleEl),this.mainEl=s("div","".concat(pe,"-design-watermask-main")).children(s("div","watermask_item").children(this.openEl),s("div","watermask_item").children(this.textEl,this.offsetXEl,this.fontsizeEl,this.offsetYEl,this.colorEl,this.rotateEl),this.waterstyleEl),this.pageTypeEl=new e2(K2,this.sheetPaging.type,{width:"200px"},!1,{onChange:function(e){0!=e?n.fillEl.show():n.fillEl.hide(),1==e?n.countEl.show():n.countEl.hide(),n.sheetPaging.type=e}}),this.countInputEl=s("input","".concat(pe,"-ui-input")).attr({is:"ui-input",placeholder:"请输入行数"}).on("input",(function(e){n.sheetPaging.count=e.target.value})).css("width","200px"),this.countEl=s("div","watermask_item").children(s("div","watermask_config_item").children(s("span","watermask_config_name").innerHTML("每页行数："),this.countInputEl)).hide().css("gridTemplateColumns","auto"),1==this.sheetPaging.type&&this.countEl.show(),this.fillRadioEl=s("div","".concat(pe,"-flex--center")).children(s("input").attr({type:"radio",id:"f1",name:"tailFill",value:0}).css("marginRight","8px"),s("label").attr({for:"f1"}).html("忽略").css("marginRight","16px"),s("input").attr({type:"radio",id:"f2",name:"tailFill",value:1}).css("marginRight","8px"),s("label").attr({for:"f2"}).html("补足")),ve()(this.fillRadioEl.el).find("input[name^=tailFill]").on("change",(function(){var e=z0(n.fillRadioEl.el,"tailFill");n.sheetPaging.tailFill=Number(e)})),H0(this.fillRadioEl.el,"tailFill",this.sheetPaging.tailFill),this.fillEl=s("div","watermask_item").children(s("div","watermask_config_item").children(s("span","watermask_config_name").innerHTML("尾页空行："),this.fillRadioEl)).css("gridTemplateColumns","auto"),0==this.sheetPaging.type&&this.fillEl.hide(),this.baseMainEl=s("div","".concat(pe,"-design-watermask-main")).children(s("div","watermask_item").children(s("div","watermask_config_item").children(s("span","watermask_config_name").innerHTML("分页方式："),this.pageTypeEl.el)).css("gridTemplateColumns","auto"),this.countEl,this.fillEl),s("div","ui-tab-tabs").children(s("ui-tab","ui-tab-tab").attr({target:"tt2",open:!0,name:"rel"}).innerHTML("分页设置").css({fontSize:"14px"}),s("ui-tab","ui-tab-tab").attr({target:"tt1",name:"rel"}).innerHTML("水印设置").css({fontSize:"14px"}))),s("div","ui-tab-content active").attr({id:"tt2"})),o=s("div","ui-tab-content").attr({id:"tt1"}),a=s("div","".concat(pe,"-design-table-header_item")).children(s("div","".concat(pe,"-header_main")).children(this.baseMainEl)),u=s("div","".concat(pe,"-design-table-header_item")).children(s("div","".concat(pe,"-header_main")).children(this.mainEl));i.children(a),o.children(u),this.setWaterMaskValue(),this.contentEl=s("div","".concat(pe,"-design-table-header")).children(t,i,o),this.el=new Dialog({title:"报表设置",content:this.contentEl.el,buttons:[{value:"取消",type:" ",className:"".concat(pe,"-slash_button"),events:function(){r.hide()}},{value:"确定",type:"primary",className:"".concat(pe,"-slash_button"),events:function(){r.save()}}],width:"500px"}),this.el.element.title.classList.add("".concat(pe,"-dialog_title")),this.fontsizeSelectEl.setup(),this.pageTypeEl.setup(),this.hide()}var t,n;return t=e,(n=[{key:"setWaterMaskValue",value:function(){H0(this.openRadioEl.el,"open",this.waterMaskConfig.open),ve()(this.textInputEl.el).val(this.waterMaskConfig.text),ve()(this.offsetXInputEl.el).val(this.waterMaskConfig.offsetX),this.fontsizeSelectEl.setValue(this.waterMaskConfig.fontsize),ve()(this.offsetYInputEl.el).val(this.waterMaskConfig.offsetY),this.bColorPalette.picker.initColor(this.waterMaskConfig.color),ve()(this.rotateInputEl.el).val(this.waterMaskConfig.rotate),this.checkBoxGroup.setChecked(this.waterMaskConfig.fontstyle)}},{key:"setSheetPageValue",value:function(){this.pageTypeEl.setValue(this.sheetPaging.type);var e=this.sheetPaging.type;0!=e?this.fillEl.show():this.fillEl.hide(),1==e?this.countEl.show():this.countEl.hide(),H0(this.fillRadioEl.el,"tailFill",this.sheetPaging.tailFill),ve()(this.countInputEl.el).val(this.sheetPaging.count)}},{key:"hide",value:function(){this.el.hide()}},{key:"show",value:function(){var e=this.$parent.spreadSheet.sheet.data.name;(e=((e=(this.setTitle(e),this.$parent.spreadSheet.sheet.data.waterMask))?this.waterMaskConfig=e:this.resetWaterMask(),this.$parent.getSheetPageConfig()))?this.sheetPaging=e:this.resetPaging(),this.setWaterMaskValue(),this.setSheetPageValue(),this.el.show()}},{key:"resetWaterMask",value:function(){this.waterMaskConfig={text:"",fontsize:12,color:"#D8D8D8",offsetX:200,offsetY:100,rotate:-20,fontstyle:[],open:0}}},{key:"resetPaging",value:function(){this.sheetPaging={type:0,count:20,tailFill:0}}},{key:"changeGroupConfig",value:function(){var e=this.$parent.spreadSheet;0==this.groupConfig.type&&(e=_0(e),this.groupConfig.autoPosition=e)}},{key:"resetGroupConfig",value:function(){this.groupConfig={type:0,autoPosition:[],handlePosition:[]}}},{key:"save",value:function(){var e=this.$parent.spreadSheet.sheet.data.name;this.waterMaskConfig.fontstyle=this.checkBoxGroup.getChecked(),this.$parent.setWaterMask(this.waterMaskConfig),this.$parent.spreadSheet.sheet.data.waterMask=this.waterMaskConfig,this.$parent.spreadSheet.sheet.table.render(),this.$parent.setSheetPageConfig(e,this.sheetPaging),this.hide()}},{key:"setTitle",value:function(e){this.el.params.title="报表设置【".concat(e,"】")}}])&&Q2(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),X2={paper:{type:2,params:{unit:2,width:"8.27",height:"11.69"}},repeat:{repeatRowHead:{start:"",end:""},repeatColHead:{start:"",end:""},repeatRowFoot:{start:"",end:""},repeatColFoot:{start:"",end:""}},params:{autoFill:!1,padding:{top:{unit:1,value:0},bottom:{unit:1,value:0},left:{unit:1,value:0},right:{unit:1,value:0}},direction:2}},J2={1:{top:{unit:3,value:0},bottom:{unit:3,value:0},left:{unit:3,value:0},right:{unit:3,value:0}},2:{top:{unit:3,value:2.54},bottom:{unit:3,value:2.54},left:{unit:3,value:3.18},right:{unit:3,value:3.18}},3:{top:{unit:3,value:1.5},bottom:{unit:3,value:1.5},left:{unit:3,value:2},right:{unit:3,value:2}},4:{top:{unit:3,value:1.27},bottom:{unit:3,value:1.27},left:{unit:3,value:1.27},right:{unit:3,value:1.27}},5:{top:{unit:3,value:2.54},bottom:{unit:3,value:2.54},left:{unit:3,value:5.08},right:{unit:3,value:5.08}},6:{top:{unit:3,value:2.54},bottom:{unit:3,value:2.54},left:{unit:3,value:3.18},right:{unit:3,value:3.18}}};function Z2(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var e3=function(){function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");function t(e){l.config.repeatRowHead.start=e}function n(e){l.config.repeatRowHead.end=e}function r(e){l.config.repeatColHead.start=e}function i(e){l.config.repeatColHead.end=e}function o(e){l.config.repeatRowFoot.start=e}function a(e){l.config.repeatRowFoot.end=e}function u(e){l.config.repeatColFoot.start=e}function c(e){l.config.repeatColFoot.end=e}this.config={repeatRowHead:{start:1,end:1,type:1},repeatColHead:{start:1,end:1,type:2},repeatRowFoot:{start:1,end:1,type:3},repeatColFoot:{start:1,end:1,type:4}},this.configDom={1:{sEl:null,eEl:null},2:{sEl:null,eEl:null},3:{sEl:null,eEl:null},4:{sEl:null,eEl:null}};var l=this,h={paddingLeft:"6px"};this.headerCheckBoxGroup=new P2([{name:"重复标题行",value:1,render:function(){var e=new z2({},0,{onInput:t}),r=e.el,i=new z2({},0,{onInput:n}),o=i.el;return l.configDom[1].sEl=e,l.configDom[1].eEl=i,s("div","").children(s("span").css("marginRight","40px").innerHTML("标题行"),s("span").css("marginRight","4px").innerHTML("从第"),r.el,s("span").css({paddingLeft:"4px",paddingRight:"4px"}).innerHTML("行至第"),o.el,s("span").css("paddingLeft","5px").innerHTML("行")).css({cursor:"auto",color:"#58657D"})},labelStyle:h},{name:"重复标题列",value:2,render:function(){var e=new z2({},0,{onInput:r}),t=e.el,n=new z2({},0,{onInput:i}),o=n.el;return l.configDom[2].sEl=e,l.configDom[2].eEl=n,s("div","").children(s("span").css("marginRight","40px").innerHTML("标题列"),s("span").css("marginRight","4px").innerHTML("从第"),t.el,s("span").css({paddingLeft:"4px",paddingRight:"4px"}).innerHTML("列至第"),o.el,s("span").css("paddingLeft","5px").innerHTML("列")).css({cursor:"auto",color:"#58657D"})},labelStyle:h},{name:"重复结尾行",value:3,render:function(){var e=new z2({},0,{onInput:o}),t=e.el,n=new z2({},0,{onInput:a}),r=n.el;return l.configDom[3].sEl=e,l.configDom[3].eEl=n,s("div","").children(s("span").css("marginRight","40px").innerHTML("结尾行"),s("span").css("marginRight","4px").innerHTML("从第"),t.el,s("span").css({paddingLeft:"4px",paddingRight:"4px"}).innerHTML("行至第"),r.el,s("span").css("paddingLeft","5px").innerHTML("行")).css({cursor:"auto",color:"#58657D"})},labelStyle:h},{name:"重复结尾列",value:4,render:function(){var e=new z2({},0,{onInput:u}),t=e.el,n=new z2({},0,{onInput:c}),r=n.el;return l.configDom[4].sEl=e,l.configDom[4].eEl=n,s("div","").children(s("span").css("marginRight","40px").innerHTML("结尾列"),s("span").css("marginRight","4px").innerHTML("从第"),t.el,s("span").css({paddingLeft:"4px",paddingRight:"4px"}).innerHTML("列至第"),r.el,s("span").css("paddingLeft","5px").innerHTML("列")).css({cursor:"auto",color:"#58657D"})},labelStyle:h}],[],"".concat(pe,"-checkbox-group_list")),this.el=this.headerCheckBoxGroup}var t,n;return t=e,(n=[{key:"init",value:function(){}},{key:"hide",value:function(){this.el.hide()}},{key:"show",value:function(){this.el.show()}},{key:"getValue",value:function(){var e=this.headerCheckBoxGroup.getChecked(),t={},n=this.config;return e.forEach((function(e){for(var r in n){var i=n[r];e==i.type&&((i=_.cloneDeep(i)).checked=!0,t[r]=i)}})),t}},{key:"setValue",value:function(e){this.config=_.merge({repeatRowHead:{start:1,end:1,type:1},repeatColHead:{start:1,end:1,type:2},repeatRowFoot:{start:1,end:1,type:3},repeatColFoot:{start:1,end:1,type:4}},e);var t,n=[];for(t in this.config){var r=this.config[t];r.checked&&n.push(r.type)}this.setConfigDomValue(),this.headerCheckBoxGroup.setChecked(n)}},{key:"setConfigDomValue",value:function(){var e,t=this.config;for(e in t){var n=t[e],r=this.configDom[n.type];r.sEl.setValue(n.start),r.eEl.setValue(n.end)}}}])&&Z2(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function t3(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}n(399);var n3={width:"200px",height:"30px",marginRight:"8px"},r3={width:"92px",height:"30px"},i3=[{name:"px",value:"1"},{name:"厘米",value:"3"},{name:"英寸",value:"2"}],o3=function(){function e(t){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},r=2<arguments.length?arguments[2]:void 0,i=this,o=e;if(!(i instanceof o))throw new TypeError("Cannot call a class as a function");this.custom=n,this.parent=t,this.flag=r,this.topInput=new ac({placeholder:""},this.custom.top.value,n3),this.topSelect=new e2(i3,this.custom.top.unit,r3),this.bottomInput=new ac({placeholder:""},this.custom.bottom.value,n3),this.bottomSelect=new e2(i3,this.custom.bottom.unit,r3),this.leftInput=new ac({placeholder:""},this.custom.left.value,n3),this.leftSelect=new e2(i3,this.custom.left.unit,r3),this.rightInput=new ac({placeholder:""},this.custom.right.value,n3),this.rightSelect=new e2(i3,this.custom.right.unit,r3),this.el=this.init(),this.topSelect.setup(),this.bottomSelect.setup(),this.leftSelect.setup(),this.rightSelect.setup()}var t,n;return t=e,(n=[{key:"init",value:function(){var e=this;return s("div","".concat(pe,"-dialog_wrapper")).css("z-index","2328").children(s("div","".concat(pe,"-dialog")).css({marginTop:"20vh",left:"0",width:"500px",height:"auto"}).children(s("div","".concat(pe,"-dialog_header")).children(s("span","".concat(pe,"-dialog_title")).innerHTML("自定义边距"),s("button","".concat(pe,"-dialog__headerbtn")).attr("type","button").children(s("i","".concat(pe,"-dialog__close"))).on("click",(function(){e.destory()}))),s("div","".concat(pe,"-dialog__body")).children(s("div").children(s("div","".concat(pe,"-custom-padding_item")).children(s("span").innerHTML("上边距"),s("div","".concat(pe,"-custom-padding_content")).children(this.topInput.el,this.topSelect.el)),s("div","".concat(pe,"-custom-padding_item")).children(s("span").innerHTML("下边距"),s("div","".concat(pe,"-custom-padding_content")).children(this.bottomInput.el,this.bottomSelect.el)),s("div","".concat(pe,"-custom-padding_item")).children(s("span").innerHTML("左边距"),s("div","".concat(pe,"-custom-padding_content")).children(this.leftInput.el,this.leftSelect.el)),s("div","".concat(pe,"-custom-padding_item")).children(s("span").innerHTML("右边距"),s("div","".concat(pe,"-custom-padding_content")).children(this.rightInput.el,this.rightSelect.el)))).css({height:"auto",border:"none"}),s("div","".concat(pe,"-dialog__footer")).css("padding-bottom","20px").css("margin-top","30px").children(s("span","dialog-footer").children(s("button","".concat(pe,"-dialog_button el-button-default")).children(s("span","").innerHTML("取消")).on("click",(function(){e.destory()})),s("button","".concat(pe,"-dialog_button el-button-primary")).children(s("span","").innerHTML("确认")).on("click",(function(){e.sumbmit.call(e),e.destory.call(e)}))))))}},{key:"sumbmit",value:function(){var e,t=this.custom;for(e in t){var n=t[e],r=e+"Select",i=this[e+"Input"].getValue();r=this[r].getValue();n.value=i,n.unit=r}}},{key:"hide",value:function(){this.el.hide(),this.destory()}},{key:"destory",value:function(){(this.flag?this.parent.rootEl:this.parent.el).el.removeChild(this.el.el)}},{key:"show",value:function(){this.el.show()}}])&&t3(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function a3(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var s3={1:{width:"11.69",height:"16.54"},2:{width:"8.27",height:"11.69"},3:{width:"5.83",height:"8.27"},4:{width:"9.84",height:"13.9"},5:{width:"6.93",height:"9.84"},6:{width:"0",height:"0"}},u3=[{value:"1",name:'A3 (11.69" x 16.54")'},{value:"2",name:'A4 (8.27" x 11.69")'},{value:"3",name:'A5 (5.83" x 8.27")'},{value:"4",name:'B4 (9.84" x 13.9")'},{value:"5",name:'B5 (6.93" x 9.84")'},{value:"6",name:"自定义纸张"}],c3=function(){function e(t){var n=this;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.$parent=t,this.pagePadding=J2,this.select=new e2(u3,"2",{width:"300px",height:"32px"},!1,{onChange:function(e){6==e?(n.paperWidthInput.enable(),n.paperWidthSelect.enable(),n.paperHeightInput.enable(),n.paperHeightSelect.enable()):(n.paperWidthInput.disable(),n.paperWidthSelect.disable(),n.paperHeightInput.disable(),n.paperHeightSelect.disable()),n.paperWidthInput.setValue(s3[e].width),n.paperHeightInput.setValue(s3[e].height),n.paperWidthSelect.setValue("2"),n.paperHeightSelect.setValue("2")}});t=s("div","".concat(pe,"-ui-form-item")).children(s("label","".concat(pe,"-ui-form-item__label ").concat(pe,"-label-font--14")).html("纸张设置：").css("width","85px"),this.select.el);var r=(this.paperWidthInput=new ac({placeholder:"",disabled:!0},s3[1].width,{width:"200px",height:"32px"}),this.paperWidthSelect=new e2([{name:"px",value:"1"},{name:"厘米",value:"3"},{name:"英寸",value:"2"}],"2",{width:"92px",marginLeft:"6px",height:"32px"},!0),s("div","".concat(pe,"-ui-form-item")).children(s("label","".concat(pe,"-ui-form-item__label ").concat(pe,"-label-font--14")).html("纸张宽度：").css("width","85px"),this.paperWidthInput.el,this.paperWidthSelect.el)),i=(this.paperWidthSelect.setup(),this.paperHeightInput=new ac({placeholder:"",disabled:!0},s3[1].height,{width:"200px",height:"32px"}),this.paperHeightSelect=new e2([{name:"px",value:"1"},{name:"厘米",value:"3"},{name:"英寸",value:"2"}],"2",{width:"92px",marginLeft:"6px",height:"32px"},!0),s("div","".concat(pe,"-ui-form-item")).children(s("label","".concat(pe,"-ui-form-item__label ").concat(pe,"-label-font--14")).html("纸张高度：").css("width","85px"),this.paperHeightInput.el,this.paperHeightSelect.el)),o=(t=(this.paperHeightSelect.setup(),s("div","".concat(pe,"-design-table-header_item")).children(s("div","".concat(pe,"-header_title")).html("打印纸张设置"),s("div","".concat(pe,"-header_main")).children(t,r,i))),this.img=null,this.imgName=null,this),a=this,u=(r=(this.noUploadEl=s("span").innerHTML("未上传").on("click",(function(){ve()(o.uploadInput.el.el).find("input").click()})),this.uploadEl=s("span").hide().on("click",(function(){ve()(o.uploadInput.el.el).find("input").click()})),this.uploadInput=new ac({placeholder:"",type:"file"},"",{},(function(e){var t=e.target.files[0],r=((e=new FileReader).readAsDataURL(t),n);e.onload=function(e){r.imgName=t.name,r.img=e.target.result,r.noUploadEl.hide(),r.uploadEl.show(),r.uploadEl.innerHTML(t.name)}})),this.uploadInput.hide(),s("div","".concat(pe,"-ui-form-item")).children(s("label","".concat(pe,"-ui-form-item__label ").concat(pe,"-label-font--14")).html("打印参考图：").css("width","85px"),this.uploadEl.el,this.noUploadEl.el,this.uploadInput.el)),i=(this.orientationSelect=new e2([{name:"横向打印",value:"1"},{name:"纵向打印",value:"2"}],2,{width:"300px",height:"32px"}),s("div","".concat(pe,"-ui-form-item")).children(s("label","".concat(pe,"-ui-form-item__label ").concat(pe,"-label-font--14")).html("打印方向：").css("width","85px"),this.orientationSelect.el)),this.orientationSelect.setup(),this.paddingSelect=new e2([{name:"无",value:1},{name:"普通",value:2},{name:"适中",value:3},{name:"窄",value:4},{name:"宽",value:5},{name:"自定义",value:6},{name:"设置自定义边距",value:7}],1,{width:"300px",height:"27px"},!1,{onChange:function(e){7==e&&(e=new o3(n.$parent,n.pagePadding[6],!0),a.$parent.rootEl.child(e.el),a.paddingSelect.setValue(6),a.paddingSelect.updateOption(6,{name:"自定义",value:6}))}},{option:function(e,t){return 7==e.value?"<div class='".concat(pe,"-padding_item ").concat(pe,"-padding_button'>").concat(e.name,"</div>"):"<div class=".concat(pe,"-padding_item ><div>\n            <span>").concat(e.name,"</span>\n            <div class=").concat(pe,"-padding_content >\n              <span>上:").concat(J2[e.value].top.value,"cm</span>\n              <span>下:").concat(J2[e.value].bottom.value,"cm</span>\n              <span>左:").concat(J2[e.value].left.value,"cm</span>\n              <span>右:").concat(J2[e.value].right.value,"cm</span>\n            </div>\n          </div>\n        </div>")}}),s("div","".concat(pe,"-ui-form-item")).children(s("label","".concat(pe,"-ui-form-item__label ").concat(pe,"-label-font--14")).html("页边距：").css("width","85px"),this.paddingSelect.el)),c=(this.paddingSelect.setup(),this.printRepeat=new e3,s("div","".concat(pe,"-ui-form-item")).children(s("label","".concat(pe,"-ui-form-item__label ").concat(pe,"-label-font--14")).html("打印重复：").css("width","85px"),this.printRepeat.el.el).css("align-items","baseline")),l=(this.autoFillCheckGroup=new P2([{name:"用空行自动填充",value:1}],[]),s("div","".concat(pe,"-ui-form-item")).children(s("label","".concat(pe,"-ui-form-item__label ").concat(pe,"-label-font--14")).html("打印尾页：").css("width","85px"),this.autoFillCheckGroup.el));r=s("div","".concat(pe,"-design-table-header_item")).children(s("div","".concat(pe,"-header_title")).html("打印参数设置"),s("div","".concat(pe,"-header_main")).children(r,i,u,c,l));this.select.setup(),this.contentEl=s("div","".concat(pe,"-design-print")).children(t,r),this.el=new Dialog({title:"打印设置",content:this.contentEl.el,buttons:[{value:"取消",type:" ",className:"".concat(pe,"-slash_button"),events:function(){a.hide()}},{value:"确定",type:"primary",className:"".concat(pe,"-slash_button"),events:function(){a.save()}}],width:"500px"}),this.el.element.title.classList.add("".concat(pe,"-dialog_title")),this.hide()}var t,n;return t=e,(n=[{key:"hide",value:function(){this.el.hide()}},{key:"show",value:function(){var e=this.$parent.spreadSheet.sheet.data.name;(e=(this.setTitle(e),this.$parent.getSheetPrintConfig()))&&this.setPrintConfig(e),this.el.show()}},{key:"setPrintConfig",value:function(e){var t=e.paper||{},n={type:2,params:{unit:2,width:s3[2].width,height:s3[2].height}};t=Object.assign(n,t),this.setPaperConfig(t),n=e.repeat||{},n=(t=(this.printRepeat.setValue(n),e.params||{})).direction||2,7==(e=(this.orientationSelect.setValue(n),t.paddingType||"1"))&&(this.pagePadding[e]=t.padding),this.paddingSelect.setValue(e),n=Number(t.autoFill)||0;this.autoFillCheckGroup.setChecked([n])}},{key:"setPaperConfig",value:function(e){var t=e.type,n=(e=e.params).width,r=e.height;e=e.unit;6==t?(this.paperWidthInput.enable(),this.paperWidthSelect.enable(),this.paperHeightInput.enable(),this.paperHeightSelect.enable()):(this.paperWidthInput.disable(),this.paperWidthSelect.disable(),this.paperHeightInput.disable(),this.paperHeightSelect.disable()),this.select.setValue(t),this.paperWidthInput.setValue(n),this.paperHeightInput.setValue(r),this.paperWidthSelect.setValue(e),this.paperHeightSelect.setValue(e)}},{key:"getPrintConfig",value:function(){var e={},t={},n=this.select.getValue(),r=(n=(t.type=n,this.paperWidthInput.getValue()),this.paperHeightInput.getValue()),i=this.paperWidthSelect.getValue();t.params={unit:i,width:n,height:r},e.paper=t,i=this.printRepeat.getValue(),(n=(e.repeat=i,{})).direction=this.orientationSelect.getValue(),r=this.paddingSelect.getValue(),t=this.pagePadding[r];return n.padding=t,n.paddingType=r,this.autoFillCheckGroup.getChecked().includes(1)?n.autoFill=!0:n.autoFill=!1,e.params=n,e}},{key:"save",value:function(){var e=this.getPrintConfig(),t=this.$parent.spreadSheet,n=t.sheet.data.name;t.sheet.data.printOptions=e,t.sheet.table.sheetPrintOptions=e,this.$parent.setSheetPrintConfig(n,e),this.$parent.setImgUrl(this.img),this.$parent.printBgChange(),this.$parent.printLineChange(),this.hide()}},{key:"setTitle",value:function(e){this.el.params.title="打印设置【".concat(e,"】")}}])&&a3(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function l3(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var h3=function(){function e(t){var n=this;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.$parent=t,this.list=[],this.addButtonEl=s("button","ui-button").attr({type:"primary"}).html("添加参数").css({padding:"8px 15px",lineHeight:"14px",marginBottom:"10px"}).on("click",(function(){n.list.push({value:"",name:""}),n.createList()})),this.noDataEl=s("div","".concat(pe,"-no_data")).children(s("span").html("暂无数据")),this.wrapperEl=s("div","".concat(pe,"-http-table-wrapper")),this.createList(),this.tableEl=s("div","".concat(pe,"-http-table")).children(s("div","".concat(pe,"-http-table_item thead")).children(s("div","column  padding--12").html("字段名"),s("div","value  padding--12").html("字段值"),s("div","handle  padding--12").html("操作")),this.wrapperEl),this.el=s("div","".concat(pe,"-http-params")).children(this.addButtonEl,this.tableEl)}var t,n;return t=e,(n=[{key:"show",value:function(e){e||(this.list=[]),this.list=this.changeList(e),this.createList(),this.el.show()}},{key:"changeList",value:function(e){var t,n=[];for(t in e){var r=e[t];n.push({name:t,value:r})}return n}},{key:"hide",value:function(){this.el.hide()}},{key:"createList",value:function(){var e=this;this.wrapperEl.html(""),this.list.length<1?this.wrapperEl.children(this.noDataEl):this.list.forEach((function(t,n){t=e.createListItem(t,n),e.wrapperEl.children(t.el)}))}},{key:"createListItem",value:function(e,t){var n={},r=this,i=s("input","".concat(pe,"-ui-input")).attr({is:"ui-input",placeholder:"字段名"}).css("width","100%").on("input",(function(t){t=t.target.value,e.name=t})),o=(ve()(i.el).val(e.name),s("input","".concat(pe,"-ui-input")).attr({is:"ui-input",placeholder:"字段值"}).css("width","100%").on("input",(function(t){t=t.target.value,e.value=t}))),a=(ve()(o.el).val(e.value),s("div","delete").html("删除").on("click",(function(){r.list.splice(t,1),r.createList()})));i=s("div","".concat(pe,"-http-table_item hover")).children(s("div","column padding--12").children(i),s("div","value padding--12").children(o),s("div","handle padding--12").children(a));return n.el=i,n}},{key:"getData",value:function(){var e={};return this.list.forEach((function(t){e[t.name]=t.value})),e}}])&&l3(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),f3=(Pa=n(219),n.n(Pa));function d3(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var p3=function(){function e(t){var n=this;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.$parent=t,this.form={name:"",response_data:"[]",method:"GET",url:"",xpath:"",headers:{},type:2,params:{}},this.mode="add",this.currentIndex=0,this.nameInputEl=s("input","".concat(pe,"-ui-input")).attr({is:"ui-input"}).css("width","192px").on("input",(function(e){n.nameInputEl.removeAttr("is-error"),e=e.target.value,n.form.name=e}));var r=this,i=(t=s("div","".concat(pe,"-ui-form-item")).children(s("label","".concat(pe,"-ui-form-item__label ").concat(pe,"-label-font--14")).html("数据集名称").css("width","100px"),this.nameInputEl),this.requestMethodRadioEl=s("div","".concat(pe,"-flex--center")).children(s("input").attr({type:"radio",id:"r1",name:"method",value:"GET"}),s("label").attr({for:"r1"}).html("GET").css("marginRight","10px"),s("input").attr({type:"radio",id:"r2",name:"method",value:"POST"}),s("label").attr({for:"r2"}).html("POST")),this.requestMethodEl=s("div","".concat(pe,"-ui-form-item")).children(s("label","".concat(pe,"-ui-form-item__label ").concat(pe,"-label-font--14")).html("接口请求方式").css("width","100px"),this.requestMethodRadioEl),H0(this.requestMethodRadioEl.el,"method",this.form.method),ve()(this.requestMethodRadioEl.el).find("input[name^=method]").on("change",(function(){var e=z0(n.requestMethodRadioEl.el,"method");n.form.method=e,n.showBodyEl()})),this.HttpUrlInputEl=s("textarea").attr({is:"ui-textarea"}).css({rows:2,width:"calc(100% - 100px)"}).on("input",(function(e){n.HttpUrlInputEl.removeAttr("is-error"),e=e.target.value,n.form.url=e})),this.HttpUrlEl=s("div","".concat(pe,"-ui-form-item")).children(s("label","".concat(pe,"-ui-form-item__label ").concat(pe,"-label-font--14")).html("接口URL地址").css("width","100px"),this.HttpUrlInputEl),this.xpathInputEl=s("input","".concat(pe,"-ui-input")).attr({is:"ui-input"}).css("width","192px").on("input",(function(e){e=e.target.value,n.form.xpath=e})),s("div","".concat(pe,"-ui-form-item")).children(s("label","".concat(pe,"-ui-form-item__label ").concat(pe,"-label-font--14")).html("数据XPath").css("width","100px"),this.xpathInputEl)),o=(this.headersContentEl=new h3(this),s("div","".concat(pe,"-ui-form-item")).children(s("label","".concat(pe,"-ui-form-item__label ").concat(pe,"-label-font--14")).html("headers参数").css("width","100px"),this.headersContentEl.el)),a=(this.bodyContentEl=new h3(this),this.bodyEl=s("div","".concat(pe,"-ui-form-item")).children(s("label","".concat(pe,"-ui-form-item__label ").concat(pe,"-label-font--14")).html("body参数").css("width","100px"),this.bodyContentEl.el),this.bodyMainEl=s("div").children(this.bodyEl),this.queryContentEl=new h3(this),s("div","".concat(pe,"-ui-form-item")).children(s("label","".concat(pe,"-ui-form-item__label ").concat(pe,"-label-font--14")).html("query参数").css("width","100px"),this.queryContentEl.el));this.showBodyEl(),t=s("div","".concat(pe,"-header_main ").concat(pe,"-header_main_max-height")).children(t,this.requestMethodEl,this.HttpUrlEl,i,o,this.bodyMainEl,a);this.contentEl=s("div","".concat(pe,"-design-table-header")).children(t),this.el=new Dialog({title:"添加JSON数据集",content:this.contentEl.el,buttons:[{value:"取消",type:" ",className:"".concat(pe,"-slash_button"),events:function(){r.hide()}},{value:"确定",type:"primary",className:"".concat(pe,"-slash_button"),events:function(){r.save()}}],width:"600px",height:"762px"}),this.el.element.title.classList.add("".concat(pe,"-dialog_title")),this.hide()}var t,n;return t=e,(n=[{key:"showBodyEl",value:function(){"POST"===this.form.method?this.bodyMainEl.show():this.bodyMainEl.hide()}},{key:"hide",value:function(){this.el.hide()}},{key:"show",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"add",n=2<arguments.length?arguments[2]:void 0;e=e||this.resetForm(),this.mode=t,this.currentIndex=n,this.form=e,"edit"==t?ve()(this.nameInputEl.el).attr("disabled","disabled"):ve()(this.nameInputEl.el).removeAttr("disabled"),ve()(this.nameInputEl.el).val(this.form.name),H0(this.requestMethodRadioEl.el,"method",this.form.method),ve()(this.HttpUrlInputEl.el).val(this.form.url),ve()(this.xpathInputEl.el).val(this.form.xpath),this.headersContentEl.show(this.form.headers),this.queryContentEl.show(this.form.params),"POST"===this.form.method&&this.bodyEl.show(this.form.body||{}),this.el.show()}},{key:"resetForm",value:function(){return{name:"",response_data:"[]",method:"GET",url:"",xpath:"",headers:{},params:{},type:2}}},{key:"save",value:function(){var e,t=this;this.form.name&&this.form.url?(this.loading(),e=Qw.a.cloneDeep(this.form),"POST"===this.form.method&&(e.body=this.bodyContentEl.getData()),e.headers=this.headersContentEl.getData(),e.params=this.queryContentEl.getData(),Ku(e).then((function(n){var r=n.data;t.form.xpath&&(r=f3.a.query(n.data,t.form.xpath)[0]||[]),e.response_data=r,"add"==t.mode?t.$parent.setData(e):t.$parent.editData(e,t.currentIndex),n=t.$parent.dataPaneCompEl.getJsonColumns();t.$parent.xzDesignParamsEl.setDatasetParams(n),t.hide(),t.unLoading()})).catch((function(e){new k0({message:"数据获取失败！"})}))):(this.form.name||this.nameInputEl.attr("is-error",!0),this.form.url||this.HttpUrlInputEl.attr("is-error",!0))}},{key:"loading",value:function(){this.el.loading()}},{key:"unLoading",value:function(){this.el.content=this.contentEl.el}}])&&d3(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function m3(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var g3={add:"添加",edit:"编辑"},A3=function(){function e(t){var n=this;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.$parent=t;var r=this,i=(t=(this.mode="add",this.currentIndex=0,this.nameInputEl=s("input","".concat(pe,"-ui-input")).attr({is:"ui-input"}).css("width","192px").on("click",(function(){n.nameInputEl.removeAttr("is-error")})),s("div","".concat(pe,"-ui-form-item")).children(s("label","".concat(pe,"-ui-form-item__label ").concat(pe,"-label-font--14")).html("数据集名称").css("width","100px"),this.nameInputEl)),this.jsonInputEl=s("textarea").attr({is:"ui-textarea"}).css({width:"calc(100% - 100px)",height:"200px"}),ve()(this.jsonInputEl.el).val("[]"),s("div","".concat(pe,"-ui-form-item")).children(s("label","".concat(pe,"-ui-form-item__label ").concat(pe,"-label-font--14")).html("数据Json").css("width","100px"),this.jsonInputEl));t=s("div","".concat(pe,"-header_main")).children(t,i);this.contentEl=s("div","".concat(pe,"-design-table-header")).children(t),this.el=new Dialog({title:"添加JSON数据集",content:this.contentEl.el,buttons:[{value:"取消",type:" ",className:"".concat(pe,"-slash_button"),events:function(){r.hide()}},{value:"确定",type:"primary",className:"".concat(pe,"-slash_button"),events:function(){r.save()}}],width:"600px"}),this.el.element.title.classList.add("".concat(pe,"-dialog_title")),this.hide()}var t,n;return t=e,(n=[{key:"hide",value:function(){this.el.hide()}},{key:"show",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"add",n=2<arguments.length?arguments[2]:void 0,r=e.name||"";e=e.response_data?JSON.stringify(e.response_data):"[]";this.mode=t,this.currentIndex=n,"edit"==t?ve()(this.nameInputEl.el).attr("disabled","disabled"):ve()(this.nameInputEl.el).removeAttr("disabled"),ve()(this.nameInputEl.el).val(r),ve()(this.jsonInputEl.el).val(e),this.setTitle(g3[t]),this.el.show()}},{key:"save",value:function(){var e={type:1};if(e.name=ve()(this.nameInputEl.el).val(),e.name){var t=ve()(this.jsonInputEl.el).val();try{e.response_data=JSON.parse(t)}catch(e){return void new k0({message:"json数据错误，请核对",duration:1e3})}"add"==this.mode?this.$parent.setData(e):this.$parent.editData(e,this.currentIndex),t=this.$parent.getJsonColumns(),this.$parent.$parent.xzDesignParamsEl.setColumns(t),this.hide()}else this.nameInputEl.attr("is-error",!0)}},{key:"setTitle",value:function(e){this.el.params.title="".concat(e,"JSON数据集")}}])&&m3(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function v3(e){return(v3="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function b3(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var y3={1:"date",2:"number",3:"string"},w3='<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M340.864 149.312a30.592 30.592 0 0 0 0 42.752L652.736 512 340.864 831.872a30.592 30.592 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"></path></svg>',x3=function(){function e(t,n){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.$parent=t,this.datasetList=n,this.jsonDataCompEl=new A3(this),this.httpDataCompEl=new p3(this),t=s("button","ui-button").attr({type:"primary"}).html("添加数据集").css({padding:"8px 15px",lineHeight:"14px"}),this.mode="add",this.addButtonEl=t,this.dropEl=this.initDropEl(),n=s("div","".concat(pe,"-move_position")).children(s("span").html("数据面板")),this.listEl=s("div","".concat(pe,"-data-list_main")),t=s("div","".concat(pe,"-dataPanel_main")).children(s("div","".concat(pe,"-dataPanel_toolbar")).children(t,s("div","".concat(pe,"-refresh")).children(s("div").css({width:"14px",height:"14px"}).innerHTML('<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" data-v-ea893728=""><path fill="currentColor" d="M771.776 794.88A384 384 0 0 1 128 512h64a320 320 0 0 0 555.712 216.448H654.72a32 32 0 1 1 0-64h149.056a32 32 0 0 1 32 32v148.928a32 32 0 1 1-64 0v-50.56zM276.288 295.616h92.992a32 32 0 0 1 0 64H220.16a32 32 0 0 1-32-32V178.56a32 32 0 0 1 64 0v50.56A384 384 0 0 1 896.128 512h-64a320 320 0 0 0-555.776-216.384z"></path></svg>'),s("span").html("刷新"))),this.listEl),this.jsonData=[],this.initList(),this.el=s("div","".concat(pe,"-design-dataPanel")).children(n,t).css({top:"88px"}),this.hide()}var t,n;return t=e,(n=[{key:"initDropEl",value:function(){var e=this;return 1<this.datasetList.length?new Drop(this.addButtonEl.el).list(this.datasetList,{onSelect:function(t){e.mode="add",2==t.id?e.httpDataCompEl.show():1==t.id?e.jsonDataCompEl.show({}):3==t.id?e.$parent.xzAddApiDatasetEl.show():4==t.id&&e.$parent.xzDatasetEl.show()},width:140,selector:"button"}):(this.addButtonEl.on("click",(function(){e.$parent.xzDatasetEl.show()})),null)}},{key:"hide",value:function(){this.el.hide()}},{key:"show",value:function(){this.el.show()}},{key:"getJsonData",value:function(){return this.jsonData}},{key:"editData",value:function(e,t){this.jsonData[t]=e,this.initList()}},{key:"setData",value:function(e){this.jsonData.push(e),this.initList()}},{key:"initData",value:function(e){e&&Array.isArray(e)&&(this.jsonData=e,this.initList())}},{key:"createColumns",value:function(e,t){var n=[];if(Array.isArray(e)){var r,i=e[0];for(r in i){var o=3;o={name:r,data_type:o="number"!=typeof i[r]&&"boolean"!=typeof i[r]?o:2,axis_type:1,sheetname:t};n.push(o)}}else v3(e);return n}},{key:"deleteApiData",value:function(e){e=e||[1,2,4],this.jsonData=this.jsonData.filter((function(t){if(e.includes(t.type))return t})),this.initList()}},{key:"initList",value:function(){var e=this;this.listEl.html(""),this.jsonData.forEach((function(t,n){t=e.createList(t,n),e.listEl.children(t)}))}},{key:"addListItem",value:function(e,t){this.jsonData.push(e),e=this.createList(e,this.jsonData.length-1,t),this.listEl.child(e)}},{key:"createList",value:function(e,t,n){var r,i,o=this,a=null,u=(n?a=n:1==e.type||2==e.type?a=this.createColumns(e.response_data,e.name):3!=e.type&&4!=e.type||(n=e.columns,r=e.name,i=[],n.forEach((function(e){e={name:e.name,data_type:e.data_type,axis_type:1,sheetname:r},i.push(e)})),a=i),s("div").css({width:"14px",height:"14px",display:"flex"}).innerHTML(w3)),c=(n=s("div").css({width:"14px",height:"14px"}).innerHTML('<svg width="16" height="16" viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg">\n<path d="M9 13C9 13.5522 8.55228 14 8 14C7.44772 14 7 13.5522 7 13C7 12.4478 7.44772 12 8 12C8.55228 12 9 12.4478 9 13Z" fill="#8390A1"/>\n<path d="M8 9C8.55228 9 9 8.55225 9 8C9 7.44775 8.55228 7 8 7C7.44772 7 7 7.44775 7 8C7 8.55225 7.44772 9 8 9Z" fill="#8390A1"/>\n<path d="M8 4C8.55228 4 9 3.55225 9 3C9 2.44775 8.55228 2 8 2C7.44772 2 7 2.44775 7 3C7 3.55225 7.44772 4 8 4Z" fill="#8390A1"/>\n</svg>\n'),new Drop(n.el).list([{id:1,value:"编辑"},{id:2,value:"删除"}],{onSelect:function(e){var n;o.mode="edit",1==e.id?2==(n=o.jsonData[t]).type?o.httpDataCompEl.show(n,"edit",t):1==n.type?o.jsonDataCompEl.show(n,"edit",t):4==n.type&&o.$parent.trigger("dataset-edited",n):2==e.id&&(o.jsonData.splice(t,1),o.initList())},width:100,eventType:"hover",selector:"div"}),s("div","".concat(pe,"-collapse-main")));c.hide(),e=s("div","".concat(pe,"-collapse-head")).children(s("div","".concat(pe,"-title_main")).children(u,s("span","".concat(pe,"-title")).html(e.name)).on("click",(function(){var e=ve()(c.el),t=e.css("display");u.html(""),"none"==t?u.innerHTML('<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" class="arrow_svg"><path fill="currentColor" d="M831.872 340.864 512 652.672 192.128 340.864a30.592 30.592 0 0 0-42.752 0 29.12 29.12 0 0 0 0 41.6L489.664 714.24a32 32 0 0 0 44.672 0l340.288-331.712a29.12 29.12 0 0 0 0-41.728 30.592 30.592 0 0 0-42.752 0z"></path></svg>'):u.innerHTML(w3),e.toggle()})),n);return this.createListColumnsDom(a,c),s("div","".concat(pe,"-data-list_item")).children(e,c)}},{key:"createListColumnsDom",value:function(e,t){var n=this;t.html(""),e.forEach((function(e,r){e=n.createColumnsDom(e,r),t.children(e)}))}},{key:"createColumnsDom",value:function(e){var t=this,n=s("div","".concat(pe,"-columns_img")).css({width:"16px",height:"16px"}),r=e.data_type;ve()(n.el).addClass(y3[r]),r=s("div","".concat(pe,"-columns_main ")).children(n,s("span").html(e.name)).attr({"data-value":e.name,"data-type":e.data_type,"data-axistype":e.axis_type,"data-sheetname":e.sheetname,draggable:!0}).on("drag",(function(e){e.preventDefault(),t.$parent.dragEvent(e.clientX,e.clientY)})).on("dragstart",(function(e){e.dataTransfer.setData("Text",e.srcElement.innerText);var n,r={};(e.path?(n=e.path[0].dataset,e.path[4].children[0]):e.toElement?(n=e.toElement.dataset,e.toElement):(n=e.originalTarget.dataset,e.originalTarget)).innerText,r.value="".concat(n.sheetname,".").concat(n.value),r.show=!0,r.type=n.type,t.$parent.dropEnd(r,n.axistype)})).on("dragover",(function(e){e.preventDefault()})).on("dragend",(function(e){e.preventDefault(),t.$parent.dropHide()}));return s("div","".concat(pe,"-collapse-item")).children(r)}},{key:"getJsonColumns",value:function(){var e=this,t=[];return this.jsonData.forEach((function(n){var r=[];1==n.type||2==n.type?r=e.createColumns(n.response_data,n.name):3!=n.type&&4!=n.type||(r=n.columns),t=t.concat(r)})),t.filter((function(e,t,n){return n.findIndex((function(t){return t.name===e.name}))===t})).map((function(e){return e.value=e.name,e}))}},{key:"getApiColumns",value:function(){var e=[];return this.jsonData.forEach((function(t){3!=t.type&&4!=t.type||(e=e.concat(t.params))})),e.filter((function(e,t,n){return n.findIndex((function(t){return t.name===e.name}))===t})).map((function(e){return e.value=e.name,e}))}}])&&b3(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function C3(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var k3=function(){function e(t){var n=this;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.$parent=t,this.formats={codeType:1},this.typeSelectEl=new e2(WZ,this.formats.codeType,{width:"100%",height:"30px"},!1,{onChange:function(e){n.formats.codeType=e}}),this.typeEl=s("div","".concat(pe,"-ui-form-item")).children(s("label","".concat(pe,"-ui-form-item__label ").concat(pe,"-label-font--14")).html("类型设置：").css("width","85px"),this.typeSelectEl.el).css("marginTop","20px"),this.contentEl=s("div","").children(s("span").html("说明：将单元格中的内容按二维码进行显示。"),this.typeEl).css("marginTop","20px"),this.headTitleEl=s("span").innerHTML("【二维码】-元素格式设置"),this.headEl=s("div","".concat(pe,"-table-config_dialog__header")).children(this.headTitleEl,s("div").children(s("i","x icon ".concat(pe,"-xIcon")).on("click",(function(){n.hide()})).css({cursor:"pointer"}))),this.footerEl=s("div","".concat(pe,"-table-config_dialog__footer")).children(s("div").children(s("button","ui primary button").innerHTML("确 定").on("click",(function(){n.save(),n.hide()})),s("button","ui basic button").innerHTML("取 消").on("click",(function(){n.hide()})))),this.el=s("div","".concat(pe,"-table-config_dialog ui modal")).children(this.headEl,s("div","".concat(pe,"-table-config_dialog__body")).child(this.contentEl),this.footerEl),ve()(this.el.el).modal({closable:!1,autofocus:!1,allowMultiple:!0}),this.typeSelectEl.setup(),this.hide()}var t,n;return t=e,(n=[{key:"hide",value:function(){ve()(this.el.el).modal("hide"),this.reset()}},{key:"show",value:function(){var e=this.$parent.toolbar.valueTypeEl.getTitle();(e=(e=$0(this.$parent,e))||{codeType:1})&&(this.setValue(e),ve()(this.el.el).modal("show"))}},{key:"reset",value:function(){this.formats={codeType:1}}},{key:"save",value:function(){this.formats.codeType=Number(this.formats.codeType),Q0({name:"二维码",style:this.formats},this.$parent.spreadSheet),this.$parent.sheetRender()}},{key:"setValue",value:function(e){this.formats=Object.assign({codeType:1},e),this.typeSelectEl.setValue(this.formats.codeType)}}])&&C3(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function E3(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function S3(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _3(e,t,n){t&&S3(e.prototype,t),n&&S3(e,n),Object.defineProperty(e,"prototype",{writable:!1})}n(400);var O3=function(){function e(t,n){E3(this,e),this.icon=t,this.tip=n,this.el=this.init()}return _3(e,[{key:"init",value:function(){var e=!1,t=s("i").css({"line-height":"16px"}).innerHTML(this.tip),n=s("i").css({width:"16px",height:"16px"}).innerHTML(this.icon),r=s("div").css({cursor:"pointer",paddingLeft:"5px",display:"flex"}).children(n.el);return r.on("mousemove",(function(n){e||(e=!0,r.children(t))})).on("mouseout",(function(n){e=!1,ve()(t.el).remove()})),r}},{key:"show",value:function(){this.el.show()}},{key:"hide",value:function(){this.el.hide()}}]),e}(),T3=function(){function e(t){var n=this,r=(E3(this,e),this.$parent=t,this);this.repeat={isRepeat:!1,repeatKey:"",repeatValue:""},this.data=null,this.openRepeatSwtichEl=s("input").attr({is:"ui-switch",type:"checkbox"}).on("change",(function(e){e.target.checked?(r.repeat.isRepeat=!0,r.openMainEl.show()):(r.repeat.isRepeat=!1,r.openMainEl.hide())})),t=new O3('<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" data-v-ea893728=""><path fill="#a9acae" d="M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896zm23.744 191.488c-52.096 0-92.928 14.784-123.2 44.352-30.976 29.568-45.76 70.4-45.76 122.496h80.256c0-29.568 5.632-52.8 17.6-68.992 13.376-19.712 35.2-28.864 66.176-28.864 23.936 0 42.944 6.336 56.32 19.712 12.672 13.376 19.712 31.68 19.712 54.912 0 17.6-6.336 34.496-19.008 49.984l-8.448 9.856c-45.76 40.832-73.216 70.4-82.368 89.408-9.856 19.008-14.08 42.24-14.08 68.992v9.856h80.96v-9.856c0-16.896 3.52-31.68 10.56-45.76 6.336-12.672 15.488-24.64 28.16-35.2 33.792-29.568 54.208-48.576 60.544-55.616 16.896-22.528 26.048-51.392 26.048-86.592 0-42.944-14.08-76.736-42.24-101.376-28.16-25.344-65.472-37.312-111.232-37.312zm-12.672 406.208a54.272 54.272 0 0 0-38.72 14.784 49.408 49.408 0 0 0-15.488 38.016c0 15.488 4.928 28.16 15.488 38.016A54.848 54.848 0 0 0 523.072 768c15.488 0 28.16-4.928 38.72-14.784a51.52 51.52 0 0 0 16.192-38.72 51.968 51.968 0 0 0-15.488-38.016 55.936 55.936 0 0 0-39.424-14.784z"></path></svg>',"开启后分组将按指定字段向下平铺展示"),this.openRepeatEl=s("div","".concat(pe,"-ui-form-item")).children(s("label","".concat(pe,"-ui-form-item__label ").concat(pe,"-label-font--14")).html("分组平铺：").css("width","85px"),this.openRepeatSwtichEl,t.el),this.repeatKeyInputEl=s("input","".concat(pe,"-ui-input")).attr({is:"ui-input"}).on("input",(function(e){n.repeat.repeatKey=e.target.value})),this.repeatKeyEl=s("div","".concat(pe,"-ui-form-item")).children(s("label","".concat(pe,"-ui-form-item__label ").concat(pe,"-label-font--14")).html("平铺字段：").css("width","85px"),this.repeatKeyInputEl),this.repeatValueInputEl=s("input","".concat(pe,"-ui-input")).attr({is:"ui-input",placeholder:"请输入"}).on("input",(function(e){n.repeat.repeatValue=e.target.value})),t=new O3('<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" data-v-ea893728=""><path fill="#a9acae" d="M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896zm0 192a58.432 58.432 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.432 58.432 0 0 0 512 256zm0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4z"></path></svg>',"多个值用英文逗号隔开"),this.repeatValueEl=s("div","".concat(pe,"-ui-form-item")).children(s("label","".concat(pe,"-ui-form-item__label ").concat(pe,"-label-font--14")).html("平铺字段值：").css("width","85px"),this.repeatValueInputEl,t.el),this.openMainEl=s("div").children(this.repeatKeyEl,this.repeatValueEl),this.openMainEl.hide(),this.mainEl=s("div","".concat(pe,"-design-group-main")),this.mainEl.children(this.openRepeatEl,this.openMainEl),t=s("div","".concat(pe,"-design-table-header_item")).children(s("div","".concat(pe,"-header_title")).html("布局"),s("div","".concat(pe,"-header_main")).children(this.mainEl));this.contentEl=s("div","".concat(pe,"-design-table-header")).children(t),this.el=new Dialog({title:"分组管理",content:this.contentEl.el,buttons:[{value:"取消",type:" ",className:"".concat(pe,"-slash_button"),events:function(){r.hide()}},{value:"确定",type:"primary",className:"".concat(pe,"-slash_button"),events:function(){r.save()}}],width:"540px"}),this.el.element.title.classList.add("".concat(pe,"-dialog_title")),this.hide()}return _3(e,[{key:"openSwtichStatus",value:function(){var e=this.repeat.isRepeat;e?this.openMainEl.show():this.openMainEl.hide(),this.openRepeatSwtichEl.el.checked=e}},{key:"hide",value:function(){this.el.hide()}},{key:"reset",value:function(){this.openSwtichStatus(),ve()(this.repeatValueEl.el).val(this.repeat.repeatValue),ve()(this.repeatKeyEl.el).val(this.repeat.repeatKey)}},{key:"show",value:function(e){(this.data=e)?(e.repeat?this.repeat=e.repeat:this.repeat={isRepeat:!1,repeatKey:"",repeatValue:""},this.setTitle(e.label)):this.repeat={isRepeat:!1,repeatKey:"",repeatValue:""},this.reset(),this.el.show()}},{key:"save",value:function(){this.data.repeat=this.repeat,this.hide()}},{key:"setTitle",value:function(e){this.el.params.title="分组管理【".concat(e,"】")}}]),e}();function D3(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var B3=function(){function e(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],n=1<arguments.length?arguments[1]:void 0,r=this,i=e;if(!(r instanceof i))throw new TypeError("Cannot call a class as a function");this.data=t,this.treeNodeList=[],this.$parent=n,this.layoutComp=new T3,this.el=this.init(),this.initDom()}var t,n;return t=e,(n=[{key:"init",value:function(){return s("div","".concat(pe,"-tree"))}},{key:"hide",value:function(){this.el.hide()}},{key:"show",value:function(){this.el.show()}},{key:"setData",value:function(e){this.data=e,this.initDom()}},{key:"initDom",value:function(){this.el.html(""),0<this.data.length?this.createTreeDom(this.data,this.el,0):this.emptyDom()}},{key:"createTreeDom",value:function(e,t){var n=this,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0;e.forEach((function(i,o){o=n.createTreeNode(i,o,t,r,e),i.children&&0<i.children.length&&n.createTreeDom(i.children,o,r+1,!0)}))}},{key:"createTreeNode",value:function(e,t,n,r,i){var o=this,a=this,u=s("div","".concat(pe,"-tree-node")).on("click",(function(t){t.stopPropagation(),a.$parent.trigger("node-click",e)})),c=s("i","".concat(pe,"-tree-icon ").concat(pe,"-tree-node__expand-icon ").concat(!e.children||e.children.length<1?"is-leaf":""," expanded")).innerHTML('<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M384 192v640l384-320.064z"></path></svg>'),l=(c.on("click",(function(e){ve()(u.el).find(".".concat(pe,"-tree-node")).toggle(100),ve()(c.el).hasClass("expanded")?ve()(c.el).removeClass("expanded"):ve()(c.el).addClass("expanded")})),s("span","hover").css({width:"14px",display:"flex"}).innerHTML('<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" data-v-69f52bff=""><path fill="currentColor" d="M160 256H96a32 32 0 0 1 0-64h256V95.936a32 32 0 0 1 32-32h256a32 32 0 0 1 32 32V192h256a32 32 0 1 1 0 64h-64v672a32 32 0 0 1-32 32H192a32 32 0 0 1-32-32V256zm448-64v-64H416v64h192zM224 896h576V256H224v640zm192-128a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32zm192 0a32 32 0 0 1-32-32V416a32 32 0 0 1 64 0v320a32 32 0 0 1-32 32z"></path></svg>').on("click",(function(n){n.stopPropagation(),i.splice(t,1),o.el.html(""),o.createTreeDom(o.data,o.el,0),a.$parent.trigger("node-delete",e)}))),h=s("span","hover").css({width:"14px",marginRight:"10px",display:"flex"}).innerHTML('<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" data-v-ea893728=""><path d="m199.04 672.64 193.984 112 224-387.968-193.92-112-224 388.032zm-23.872 60.16 32.896 148.288 144.896-45.696L175.168 732.8zM455.04 229.248l193.92 112 56.704-98.112-193.984-112-56.64 98.112zM104.32 708.8l384-665.024 304.768 175.936L409.152 884.8h.064l-248.448 78.336L104.32 708.8zm384 254.272v-64h448v64h-448z" fill="currentColor"></path></svg>').on("click",(function(){o.layoutComp.show(e)})),f=s("span","".concat(pe,"-tree-custom-node")).children(s("span","".concat(pe,"-tree-custom-node_span")).innerHTML(e.label),s("span","".concat(pe,"-tree_node_bgColor")).css({backgroundColor:e.borderColor,marginRight:"10px"}));0==r&&f.children(h),f.children(l),h=s("div","".concat(pe,"-tree-node__content is-focusable")).css({paddingLeft:"".concat(18*r,"px")}).children(c,f).attr({tabIndex:r});return u.children(h),n.children(u),u}},{key:"emptyDom",value:function(){var e=s("div","".concat(pe,"-tree__empty-block")).children(s("span","".concat(pe,"-tree__empty-text")).html("暂无数据"));this.el.children(e)}},{key:"getData",value:function(){return this.data}}])&&D3(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function I3(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var M3=function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.$parent=t,t=s("div","".concat(pe,"-move_position")).children(s("span").html("分组管理")),this.treeEl=new B3([],this),this.el=s("div","".concat(pe,"-design-dataPanel")).children(t,s("div","".concat(pe,"-tree-group")).children(this.treeEl.el)).css({top:"88px"}),this.eventMap=new Map,this.hide()}var t,n;return t=e,(n=[{key:"hide",value:function(){this.el.hide()}},{key:"show",value:function(){var e=this.$parent.spreadSheet.sheet.data.name;e=(e=this.$parent.getSheetGroupConfig(e))||[];this.setData(e),this.el.show()}},{key:"setData",value:function(e){this.treeEl.setData(e)}},{key:"on",value:function(e,t){return this.eventMap.set(e,t),this}},{key:"trigger",value:function(e){var t=this.eventMap;if(t.has(e)){for(var n=arguments.length,r=new Array(1<n?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];(t=t.get(e)).call.apply(t,[this].concat(r))}}},{key:"render",value:function(){this.treeEl.initDom()}}])&&I3(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),j3=(ko=n(74),n.n(ko)),N3=(Qo=n(305),n.n(Qo));function F3(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var R3=function(e){for(var t,n=(e=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(e,t)||function(e,t){var n;if(e)return"string"==typeof e?F3(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?F3(e,t):void 0}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e.split("&"),2))[0],r=e[1],i=function(e){for(var t=0,n=0;n<e.length;n++){var r=e.charCodeAt(n);97<=r&&r<=122&&t++}return t}(e=n.substring(0,16)),o=(t=r,i=i=n.substring(16+i,16+i+16),e=e,i=j3.a.enc.Utf8.parse(i),e=j3.a.enc.Utf8.parse(e),r=(r=j3.a.AES.decrypt(t,i,{iv:e,mode:j3.a.mode.CBC}).toString(j3.a.enc.Utf8).toString()).split("\n"),0),a=0;a<r.length;a++)if(r[a].includes("--")){o=a+1;break}return t=r=(r=r.slice(o,-1)).join("\n"),i=n,(e=new N3.a).setPrivateKey(t),e.decrypt(i)};function P3(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}n(278);var L3=function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.$parent=t,this.currentTemplate=null,this.mainEl=s("div","".concat(pe,"-useTemplate_main")),this.contentEl=s("div","".concat(pe,"-table-config_main")).children(this.mainEl),this.el=new Dialog({title:"模板中心",content:this.contentEl.el,buttons:[],width:"1090px"}),ve()(this.el).addClass("".concat(pe,"-zindex_2020")),this.el.element.title.classList.add("".concat(pe,"-dialog_title")),this.hide()}var t,n;return t=e,(n=[{key:"setTemplate",value:function(e){this.currentTemplate=e}},{key:"createCategoryEl",value:function(e){var t=s("div","category");return e.forEach((function(e){t.children(s("div","main").children(s("span").innerHTML(e)))})),t}},{key:"createMainEl",value:function(e){this.mainEl.html("");var t=s("div","template_img").children(s("img").attr({src:e.image})),n=e.categories,r=e.name,i=e.usage,o=e.type,a=e.update_time,u=(e=e.description,i=i.view_count,this),c=new Vd("使用模板",{type:"primary",clickEvent:function(){u.$parent.useTemp({config:u.currentTemplate.config.cellConfig,data:u.currentTemplate.data}),u.hide()}});n=this.createCategoryEl(n),r=s("div","template_explain").children(s("div","title").children(s("span").innerHTML(r)),s("div","use_main").children(c.el,s("div","use_count").children(s("img","").attr({src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAFfSURBVHgBzZdBjkFBEIZ/E/YW1izsSbC3eAdwAwsXEEfgJpyEGzxO8JwAa4ueqZHOjOjq7iqVPF9SkXipru9Vt+7WcD+gRr5QM3KB6xWWyAWOR2AyAc5nWKDrAEkUhYmErgMEFTeQ0AtYSTgp/b5zzeZzjMdOi6wDh0P4bakrmw1UiHQXi9e399HpOHe5OCn5AtstX9zHev2cU5bJYfMEqio896m1MBo9ct8SyC3uY7//ywt1RSQgLe4L0lrwebQ21AKxRRebBopQV0QClCQtzsVqxZbh94HdDmacTuwjXqAsYUZVsY8av/MQotWCKfd78OsPvhG12zAjMhYv0O3CjOEQcoHpFGYMBpALzGYwY7mEXIA6YNGF+Rzo9fjnLobmLPgflJu4I6RPQzrTNRKUkziK8wQ0nSiKrOL5Ah66FdHgscKRky8EvxXH8H9O6PN2e/zOaaEpNi+dgCG1nwXfRyka4r6YFjEAAAAASUVORK5CYII="}),s("span").innerHTML("热度： ".concat(i)))),s("div","template_type").children(s("span","type").innerHTML("类型："),s("span","type_value").innerHTML(o)),s("div","template_type").children(s("span","type").innerHTML("描述："),s("span","type_value").innerHTML(e)),s("div","template_type").children(s("span","type").innerHTML("上架时间："),s("span","type_value").innerHTML(a)),n);this.mainEl.children(t,r)}},{key:"hide",value:function(){this.el.hide()}},{key:"getTemplateInfo",value:function(e){this.loading();var t=this;this.$parent.$parent.trigger("get-template-by-id",e,(function(e){t.currentTemplate=e,t.createMainEl(t.currentTemplate),t.unLoading()}))}},{key:"loading",value:function(){this.el.loading()}},{key:"unLoading",value:function(){this.el.content=this.contentEl.el}},{key:"show",value:function(e){null!=e&&this.getTemplateInfo(e),this.el.show()}},{key:"setTitle",value:function(e){this.el.params.title=e}}])&&P3(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function U3(e){return(U3="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function z3(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */z3=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=(d="function"==typeof Symbol?Symbol:{}).iterator||"@@iterator",i=d.asyncIterator||"@@asyncIterator",o=d.toStringTag||"@@toStringTag";function a(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{a({},"")}catch(t){a=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var i,o,a,s;t=t&&t.prototype instanceof l?t:l,t=Object.create(t.prototype),r=new y(r||[]);return t._invoke=(i=e,o=n,a=r,s="suspendedStart",function(e,t){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===e)throw t;return{value:void 0,done:!0}}for(a.method=e,a.arg=t;;){var n=a.delegate;if(n&&(n=function e(t,n){var r=t.iterator[n.method];if(void 0===r){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=void 0,e(t,n),"throw"===n.method))return c;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}return"throw"===(r=u(r,t.iterator,n.arg)).type?(n.method="throw",n.arg=r.arg,n.delegate=null,c):(r=r.arg)?r.done?(n[t.resultName]=r.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,c):r:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,c)}(n,a))){if(n===c)continue;return n}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===s)throw s="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);if(s="executing","normal"===(n=u(i,o,a)).type){if(s=a.done?"completed":"suspendedYield",n.arg===c)continue;return{value:n.arg,done:a.done}}"throw"===n.type&&(s="completed",a.method="throw",a.arg=n.arg)}}),t}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var c={};function l(){}function h(){}function f(){}var d,p,m=((p=(p=(a(d={},r,(function(){return this})),Object.getPrototypeOf))&&p(p(w([]))))&&p!==t&&n.call(p,r)&&(d=p),f.prototype=l.prototype=Object.create(d));function g(e){["next","throw","return"].forEach((function(t){a(e,t,(function(e){return this._invoke(t,e)}))}))}function A(e,t){var r;this._invoke=function(i,o){function a(){return new t((function(r,a){!function r(i,o,a,s){var c;if("throw"!==(i=u(e[i],e,o)).type)return(o=(c=i.arg).value)&&"object"==U3(o)&&n.call(o,"__await")?t.resolve(o.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(o).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,s)}));s(i.arg)}(i,o,r,a)}))}return r=r?r.then(a,a):a()}}function v(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function b(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function y(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(v,this),this.reset(!0)}function w(e){if(e){var t,i=e[r];if(i)return i.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return t=-1,(i=function r(){for(;++t<e.length;)if(n.call(e,t))return r.value=e[t],r.done=!1,r;return r.value=void 0,r.done=!0,r}).next=i}return{next:x}}function x(){return{value:void 0,done:!0}}return a(m,"constructor",h.prototype=f),a(f,"constructor",h),h.displayName=a(f,o,"GeneratorFunction"),e.isGeneratorFunction=function(e){return!!(e="function"==typeof e&&e.constructor)&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,a(e,o,"GeneratorFunction")),e.prototype=Object.create(m),e},e.awrap=function(e){return{__await:e}},g(A.prototype),a(A.prototype,i,(function(){return this})),e.AsyncIterator=A,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new A(s(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},g(m),a(m,o,"Generator"),a(m,r,(function(){return this})),a(m,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t,n=[];for(t in e)n.push(t);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=w,y.prototype={constructor:y,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(b),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;0<=i;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;0<=r;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}var a=(o=o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc?null:o)?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),c},finish:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),b(n),c}},catch:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var n,r,i=this.tryEntries[t];if(i.tryLoc===e)return"throw"===(n=i.completion).type&&(r=n.arg,b(i)),r}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:w(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},e}function H3(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function $3(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Q3(e,t,n,r){for(var i=ve()(e.el).find(t),o=0;o<i.length;o++){var a=i[o];a.textContent==r?ve()(a).addClass(n):ve()(a).removeClass(n)}}function V3(e,t,n,r,i,o){e=e.selectIds;for(var a=ve()(t.el).find(n),s=0;s<a.length;s++){var u=a[s],c=u.textContent;c!=r&&(e.includes(c)?(ve()(u).addClass(i),ve()(ve()(u)[0].children[1]).addClass(o)):(ve()(u).removeClass(i),ve()(ve()(u)[0].children[1]).removeClass(o)))}}function q3(e){if((e=new Date(e).getTime())<Date.now())throw new Error(String.fromCharCode(25480,26435,30721,38169,35823,25110,24050,36807,26399));return 1}function G3(){return window.location.host.split(":")[0].toLocaleLowerCase()}function W3(e){for(var t=G3(),n=!1,r=0;r<e.length;r++)if(e[r].includes(t)){n=!0;break}return n}function K3(){var e=G3();return!!Z3.includes(e)}function Y3(e,t){return!(!e||!t||!e.includes("-1,-1,-1,-1")||"FastBI"!=t)}var X3={name:"类型",content:[{name:"常见表样模板",value:"常见表样模板"},{name:"单据打印模板",value:"单据打印模板"},{name:"分析报表模板",value:"分析报表模板"}],activeClass:"active"},J3=function(){function e(t){var n=this;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");var r=this;this.selectIds=[],this.data=[],this.$parent=t,this.selectType="",this.searchName="",this.conditionEl=s("div","".concat(pe,"-template-condition")),this.typeTemplateEl=s("div","".concat(pe,"-template-condition-item")),this.categoryTemplateEl=s("div","".concat(pe,"-template-condition-item")),this.tempalteListEl=s("div","list"),this.searchEl=s("input").attr({type:"search",placeholder:"搜索模板"}).css({"border-radius":"25px"}).on("input",(function(e){n.searchName=e.target.value})),this.searchEl.el.addEventListener("input",(function(){""===this.value&&r.getCategoryList()})),this.templateMainEl=s("div","".concat(pe,"-template-main")).children(s("div","toolbar").children(s("div","sort-main"),s("span","ui-input ui-input-search").children(this.searchEl.on("keydown",(function(e){13===e.keyCode&&n.getCategoryList()})),s("input","ui-icon-search").attr({type:"submit",value:"搜索"}).on("click",(function(){n.getCategoryList()}))).attr({align:"end"})),this.tempalteListEl),this.contentEl=s("div","".concat(pe,"-table-config_main")).children(this.conditionEl,this.templateMainEl),this.createListEl(),this.el=new Dialog({title:"模板中心",content:this.contentEl.el,buttons:[],width:"1000px"}),this.el.element.title.classList.add("".concat(pe,"-dialog_title")),this.useTemplate=new L3(this),this.hide()}var t,n,r,i;return t=e,(n=[{key:"createListEl",value:function(){var e=this;this.tempalteListEl.html(""),this.data.forEach((function(t){t=e.createListItemEl(t),e.tempalteListEl.children(t)}))}},{key:"useTemp",value:function(e){this.$parent.loadData(e),this.hide()}},{key:"createListItemEl",value:function(e){var t=this;return s("div","list-item").children(s("img","template_img").attr({src:e.image}),s("div","template_name").children(s("span").innerHTML(e.name)),s("div","template_preview_button").children(s("div","template_button").children(s("span").innerHTML("预览并使用").on("click",(function(){t.useTemplate.show(e.id)})))))}},{key:"loading",value:function(){this.el.loading()}},{key:"unLoading",value:function(){this.el.content=this.contentEl.el}},{key:"createCondition",value:function(e){for(var t=this,n=s("span").innerHTML(e.name),r=(t.typeTemplateEl.innerHTML(""),s("div","".concat(pe,"-item-list")).children(s("div","".concat(pe,"-condition ").concat(e.activeClass)).innerHTML("全部").on("click",(function(){t.selectType="",Q3(r,".".concat(pe,"-condition"),e.activeClass,"全部"),t.getCategoryList()})))),i=e.content,o=0;o<i.length;o++)!function(n){var o=i[n];n=s("div","".concat(pe,"-condition")).innerHTML(o.value).on("click",(function(n){t.selectType=o.value,Q3(r,".".concat(pe,"-condition"),e.activeClass,o.value),t.getCategoryList()}));r.children(n)}(o);return t.typeTemplateEl.children(n,r)}},{key:"createMulCondition",value:function(e){for(var t=this,n=this,r=s("span").innerHTML(e.name),i=(n.categoryTemplateEl.innerHTML(""),s("div","".concat(pe,"-item-list")).children(s("div","".concat(pe,"-condition active")).innerHTML("全部").on("click",(function(){n.selectIds=[];for(var e=i,t=".".concat(pe,"-condition"),r=ve()(e.el).find(t),o=0;o<r.length;o++){var a=r[o];"全部"!=a.textContent&&(ve()(a).removeClass("mul-active"),ve()(ve()(a)[0].children[1]).removeClass("hover-delete"))}Q3(i,".".concat(pe,"-condition"),"active","全部"),n.getCategoryList()})))),o=e.content,a=function(e){var r=o[e];e=s("div","".concat(pe,"-condition")).children(s("span","mul-span").innerHTML(r.value),s("img","delete-img").attr({src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAABYlAAAWJQFJUiTwAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAF9SURBVHgB7ZaxLwRBFMa/2ZmVaNhKKZqrKFxI+AMUInGhoxR/ACpBfRGV6IlWuRSiEqWOQqcRpeoUItzujnliL3czl+zN3g2R2y/Z7ObN5H2/nfdmd4BC/S7WLji//z7mc3GqBichEaBLSSCsJ9HW1c7gUyYAmQ9wcdcLY021zyQq6xCePsv3xKEDc1JAq6oHDQC1JEtwJCZVSbMAHCv4awD8b4DKlIfqCsfIkDlGsd1ljsVpu3eymj0+yjChruqqaIGgZ4rNlBhmS8wmpR3AyXWMl1dlOIwGRGpOMRo7uoxtUkLYTCaDvbNIlUE0IEipOY3R3UbWTdhsRMbdmOcC+JbsMOYCQK+53hNOAXRzWvbmcuSBsALYWOBGzfWeWJ/jNintdsHto8TbB3D8sx1TpRAE+PBs1wzGV6NyUM/ZTp3pYttv8Sx+RiYAQw2/KPNElOAeriSTc2QCyGjNySqonJ5MNpEFEKpTqxdHZdWqIXpkLCVuKGfY5lheqNAXoy+Oyg0pMRQAAAAASUVORK5CYII="}).on("click",(function(e){var o,a;e.stopPropagation(),e=n,o=r.value,a=e.selectIds.filter((function(e){if(e!=o)return e})),e.selectIds=a,V3(n,i,".".concat(pe,"-condition"),"全部","mul-active","hover-delete"),t.selectIds.length<1&&Q3(i,".".concat(pe,"-condition"),"active","全部"),n.getCategoryList()}))).on("click",(function(e){n.selectIds.push(r.value);for(var t=i,o=".".concat(pe,"-condition"),a=ve()(t.el).find(o),s=0;s<a.length;s++){var u=a[s];"全部"==u.textContent&&ve()(u).removeClass("active")}V3(n,i,".".concat(pe,"-condition"),"全部","mul-active","hover-delete"),n.getCategoryList()}));i.children(e)},u=0;u<o.length;u++)a(u);return n.categoryTemplateEl.children(r,i)}},{key:"hide",value:function(){this.el.hide()}},{key:"getType",value:function(){return"全部"==this.selectType?"":this.selectType}},{key:"getCategory",value:function(){return this.selectIds.join(",")}},{key:"getCategoryList",value:function(){var e=this,t=this.getType(),n=this.getCategory(),r=this.searchName;this.$parent.trigger("get-template-list",t,n,r,(function(t){e.data=t,e.createListEl(),e.unLoading()}))}},{key:"show",value:(r=z3().mark((function e(){return z3().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.loading(),this.el.show(),this.conditionEl.children(this.createCondition(X3)),this.getCategoryList();case 4:case"end":return e.stop()}}),e,this)})),i=function(){var e=this,t=arguments;return new Promise((function(n,i){var o=r.apply(e,t);function a(e){H3(o,n,i,a,s,"next",e)}function s(e){H3(o,n,i,a,s,"throw",e)}a(void 0)}))},function(){return i.apply(this,arguments)})}])&&$3(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),Z3=["127.0.0.1","localhost"];
/**!
 * Sortable 1.15.0
 * @author	RubaXa   <trash@rubaxa.org>
 * @author	owenm    <owen23355@gmail.com>
 * @license MIT
 */function e4(e,t){var n,r=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)),r}function t4(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?e4(Object(n),!0).forEach((function(t){var r,i;r=e,i=n[t=t],t in r?Object.defineProperty(r,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[t]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):e4(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function n4(e){return(n4="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r4(){return(r4=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function i4(e,t){if(null==e)return{};var n,r=function(e,t){if(null==e)return{};for(var n,r={},i=Object.keys(e),o=0;o<i.length;o++)n=i[o],0<=t.indexOf(n)||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols)for(var i=Object.getOwnPropertySymbols(e),o=0;o<i.length;o++)n=i[o],0<=t.indexOf(n)||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n]);return r}function o4(e){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(e)}var a4=o4(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),s4=o4(/Edge/i),u4=o4(/firefox/i),c4=o4(/safari/i)&&!o4(/chrome/i)&&!o4(/android/i),l4=(Ui=o4(/iP(ad|od|hone)/i),za=o4(/chrome/i)&&o4(/android/i),{capture:!1,passive:!1});function h4(e,t,n){e.addEventListener(t,n,!a4&&l4)}function f4(e,t,n){e.removeEventListener(t,n,!a4&&l4)}function d4(e,t){if(t&&(">"===t[0]&&(t=t.substring(1)),e))try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(e){return}}function p4(e,t,n,r){if(e){n=n||document;do{if(null!=t&&(">"!==t[0]||e.parentNode===n)&&d4(e,t)||r&&e===n)return e}while(e!==n&&(e=(i=e).host&&i!==document&&i.host.nodeType?i.host:i.parentNode))}var i;return null}var m4,g4=/\s+/g;function A4(e,t,n){var r;e&&t&&(e.classList?e.classList[n?"add":"remove"](t):(r=(" "+e.className+" ").replace(g4," ").replace(" "+t+" "," "),e.className=(r+(n?" "+t:"")).replace(g4," ")))}function v4(e,t,n){var r=e&&e.style;if(r){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),void 0===t?n:n[t];r[t=t in r||-1!==t.indexOf("webkit")?t:"-webkit-"+t]=n+("string"==typeof n?"":"px")}}function b4(e,t){var n="";if("string"==typeof e)n=e;else do{var r=v4(e,"transform")}while(r&&"none"!==r&&(n=r+" "+n),!t&&(e=e.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function y4(e,t,n){if(e){var r=e.getElementsByTagName(t),i=0,o=r.length;if(n)for(;i<o;i++)n(r[i],i);return r}return[]}function w4(){return document.scrollingElement||document.documentElement}function x4(e,t,n,r,i){if(e.getBoundingClientRect||e===window){var o,a,s,u,c,l,h=e!==window&&e.parentNode&&e!==w4()?(a=(o=e.getBoundingClientRect()).top,s=o.left,u=o.bottom,c=o.right,l=o.height,o.width):(s=a=0,u=window.innerHeight,c=window.innerWidth,l=window.innerHeight,window.innerWidth);if((t||n)&&e!==window&&(i=i||e.parentNode,!a4))do{if(i&&i.getBoundingClientRect&&("none"!==v4(i,"transform")||n&&"static"!==v4(i,"position"))){var f=i.getBoundingClientRect();a-=f.top+parseInt(v4(i,"border-top-width")),s-=f.left+parseInt(v4(i,"border-left-width")),u=a+o.height,c=s+o.width;break}}while(i=i.parentNode);return r&&e!==window&&(r=(t=b4(i||e))&&t.a,e=t&&t.d,t&&(u=(a/=e)+(l/=e),c=(s/=r)+(h/=r))),{top:a,left:s,bottom:u,right:c,width:h,height:l}}}function C4(e,t,n){for(var r=O4(e,!0),i=x4(e)[t];r;){var o=x4(r)[n];if(!("top"===n||"left"===n?o<=i:i<=o))return r;if(r===w4())break;r=O4(r,!1)}return!1}function k4(e,t,n,r){for(var i=0,o=0,a=e.children;o<a.length;){if("none"!==a[o].style.display&&a[o]!==D5.ghost&&(r||a[o]!==D5.dragged)&&p4(a[o],n.draggable,e,!1)){if(i===t)return a[o];i++}o++}return null}function E4(e,t){for(var n=e.lastElementChild;n&&(n===D5.ghost||"none"===v4(n,"display")||t&&!d4(n,t));)n=n.previousElementSibling;return n||null}function S4(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)"TEMPLATE"===e.nodeName.toUpperCase()||e===D5.clone||t&&!d4(e,t)||n++;return n}function _4(e){var t=0,n=0,r=w4();if(e)do{var i=(o=b4(e)).a,o=o.d}while(t+=e.scrollLeft*i,n+=e.scrollTop*o,e!==r&&(e=e.parentNode));return[t,n]}function O4(e,t){if(e&&e.getBoundingClientRect){var n=e,r=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=v4(n);if(n.clientWidth<n.scrollWidth&&("auto"==i.overflowX||"scroll"==i.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==i.overflowY||"scroll"==i.overflowY)){if(!n.getBoundingClientRect||n===document.body)return w4();if(r||t)return n;r=!0}}}while(n=n.parentNode)}return w4()}function T4(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}function D4(e,t){return function(){var n;m4||(1===(n=arguments).length?e.call(this,n[0]):e.apply(this,n),m4=setTimeout((function(){m4=void 0}),t))}}function B4(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function I4(e){var t=window.Polymer,n=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):n?n(e).clone(!0)[0]:e.cloneNode(!0)}var M4="Sortable"+(new Date).getTime();var j4=[],N4={initializeByDefault:!0},F4={mount:function(e){for(var t in N4)!N4.hasOwnProperty(t)||t in e||(e[t]=N4[t]);j4.forEach((function(t){if(t.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")})),j4.push(e)},pluginEvent:function(e,t,n){var r=this,i=(this.eventCanceled=!1,n.cancel=function(){r.eventCanceled=!0},e+"Global");j4.forEach((function(r){t[r.pluginName]&&(t[r.pluginName][i]&&t[r.pluginName][i](t4({sortable:t},n)),t.options[r.pluginName]&&t[r.pluginName][e]&&t[r.pluginName][e](t4({sortable:t},n)))}))},initializePlugins:function(e,t,n,r){for(var i in j4.forEach((function(r){var i=r.pluginName;(e.options[i]||r.initializeByDefault)&&((r=new r(e,t,e.options)).sortable=e,r.options=e.options,e[i]=r,r4(n,r.defaults))})),e.options){var o;e.options.hasOwnProperty(i)&&void 0!==(o=this.modifyOption(e,i,e.options[i]))&&(e.options[i]=o)}},getEventProperties:function(e,t){var n={};return j4.forEach((function(r){"function"==typeof r.eventProperties&&r4(n,r.eventProperties.call(t[r.pluginName],e))})),n},modifyOption:function(e,t,n){var r;return j4.forEach((function(i){e[i.pluginName]&&i.optionListeners&&"function"==typeof i.optionListeners[t]&&(r=i.optionListeners[t].call(e[i.pluginName],n))})),r}};function R4(e,t){var n=(r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{}).evt,r=i4(r,P4);F4.pluginEvent.bind(D5)(e,t,t4({dragEl:q4,parentEl:G4,ghostEl:W4,rootEl:K4,nextEl:Y4,lastDownEl:X4,cloneEl:J4,cloneHidden:Z4,dragStarted:f5,putSortable:o5,activeSortable:D5.active,originalEvent:n,oldIndex:e5,oldDraggableIndex:n5,newIndex:t5,newDraggableIndex:r5,hideGhostForTarget:H4,unhideGhostForTarget:$4,cloneNowHidden:function(){Z4=!0},cloneNowShown:function(){Z4=!1},dispatchSortableEvent:function(e){L4({sortable:t,name:e,originalEvent:n})}},r))}var P4=["evt"];function L4(e){!function(e){var t=e.sortable,n=e.rootEl,r=e.name,i=e.targetEl,o=e.cloneEl,a=e.toEl,s=e.fromEl,u=e.oldIndex,c=e.newIndex,l=e.oldDraggableIndex,h=e.newDraggableIndex,f=e.originalEvent,d=e.putSortable;if(e=e.extraEventProperties,t=t||n&&n[M4]){var p,m,g=t.options,A="on"+r.charAt(0).toUpperCase()+r.substr(1),v=(!window.CustomEvent||a4||s4?(p=document.createEvent("Event")).initEvent(r,!0,!0):p=new CustomEvent(r,{bubbles:!0,cancelable:!0}),p.to=a||n,p.from=s||n,p.item=i||n,p.clone=o,p.oldIndex=u,p.newIndex=c,p.oldDraggableIndex=l,p.newDraggableIndex=h,p.originalEvent=f,p.pullMode=d?d.lastPutMode:void 0,t4(t4({},e),F4.getEventProperties(r,t)));for(m in v)p[m]=v[m];n&&n.dispatchEvent(p),g[A]&&g[A].call(t,p)}}(t4({putSortable:o5,cloneEl:J4,targetEl:q4,rootEl:K4,oldIndex:e5,oldDraggableIndex:n5,newIndex:t5,newDraggableIndex:r5},e))}function U4(e,t){var n,r=v4(e),i=parseInt(r.width)-parseInt(r.paddingLeft)-parseInt(r.paddingRight)-parseInt(r.borderLeftWidth)-parseInt(r.borderRightWidth),o=k4(e,0,t),a=(e=k4(e,1,t),t=o&&v4(o),e&&v4(e)),s=t&&parseInt(t.marginLeft)+parseInt(t.marginRight)+x4(o).width,u=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+x4(e).width;return"flex"===r.display?"column"===r.flexDirection||"column-reverse"===r.flexDirection?"vertical":"horizontal":"grid"===r.display?r.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal":o&&t.float&&"none"!==t.float?(n="left"===t.float?"left":"right",!e||"both"!==a.clear&&a.clear!==n?"horizontal":"vertical"):o&&("block"===t.display||"flex"===t.display||"table"===t.display||"grid"===t.display||i<=s&&"none"===r[_5]||e&&"none"===r[_5]&&i<s+u)?"vertical":"horizontal"}function z4(e){function t(e,n){return function(r,i,o,a){var s=r.options.group.name&&i.options.group.name&&r.options.group.name===i.options.group.name;return!(null!=e||!n&&!s)||null!=e&&!1!==e&&(n&&"clone"===e?e:"function"==typeof e?t(e(r,i,o,a),n)(r,i,o,a):(s=(n?r:i).options.group.name,!0===e||"string"==typeof e&&e===s||e.join&&-1<e.indexOf(s)))}}var n={},r=e.group;r&&"object"==n4(r)||(r={name:r}),n.name=r.name,n.checkPull=t(r.pull,!0),n.checkPut=t(r.put),n.revertClone=r.revertClone,e.group=n}function H4(){!T5&&W4&&v4(W4,"display","none")}function $4(){!T5&&W4&&v4(W4,"display","")}function Q4(e){if(q4){e=e.touches?e.touches[0]:e,i=e.clientX,o=e.clientY,b5.some((function(e){var t,n,r=e[M4].options.emptyInsertThreshold;if(r&&!E4(e))return n=x4(e),t=i>=n.left-r&&i<=n.right+r,n=o>=n.top-r&&o<=n.bottom+r,t&&n?a=e:void 0}));var t=a;if(t){var n,r={};for(n in e)e.hasOwnProperty(n)&&(r[n]=e[n]);r.target=r.rootEl=t,r.preventDefault=void 0,r.stopPropagation=void 0,t[M4]._onDragOver(r)}}var i,o,a}function V4(e){q4&&q4.parentNode[M4]._isOutsideThisEl(e.target)}var q4,G4,W4,K4,Y4,X4,J4,Z4,e5,t5,n5,r5,i5,o5,a5,s5,u5,c5,l5,h5,f5,d5,p5,m5,g5,A5=!1,v5=!1,b5=[],y5=!1,w5=!1,x5=[],C5=!1,k5=[],E5="undefined"!=typeof document,S5=Ui,_5=s4||a4?"cssFloat":"float",O5=E5&&!za&&!Ui&&"draggable"in document.createElement("div"),T5=function(){var e;if(E5)return!a4&&((e=document.createElement("x")).style.cssText="pointer-events:auto","auto"===e.style.pointerEvents)}();function D5(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=r4({},t),e[M4]=this;var n,r,i={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return U4(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==D5.supportPointer&&"PointerEvent"in window&&!c4,emptyInsertThreshold:5};for(n in F4.initializePlugins(this,e,i),i)n in t||(t[n]=i[n]);for(r in z4(t),this)"_"===r.charAt(0)&&"function"==typeof this[r]&&(this[r]=this[r].bind(this));this.nativeDraggable=!t.forceFallback&&O5,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?h4(e,"pointerdown",this._onTapStart):(h4(e,"mousedown",this._onTapStart),h4(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(h4(e,"dragover",this),h4(e,"dragenter",this)),b5.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),r4(this,function(){var e,t=[];return{captureAnimationState:function(){t=[],this.options.animation&&[].slice.call(this.el.children).forEach((function(e){var n,r;"none"!==v4(e,"display")&&e!==D5.ghost&&(t.push({target:e,rect:x4(e)}),n=t4({},t[t.length-1].rect),e.thisAnimationDuration&&(r=b4(e,!0))&&(n.top-=r.f,n.left-=r.e),e.fromRect=n)}))},addAnimationState:function(e){t.push(e)},removeAnimationState:function(e){t.splice(function(e,t){for(var n in e)if(e.hasOwnProperty(n))for(var r in t)if(t.hasOwnProperty(r)&&t[r]===e[n][r])return Number(n);return-1}(t,{target:e}),1)},animateAll:function(n){var r,i,o=this;this.options.animation?(r=!1,i=0,t.forEach((function(e){var t,n=0,a=e.target,s=a.fromRect,u=x4(a),c=a.prevFromRect,l=a.prevToRect,h=(e=e.rect,b4(a,!0));h&&(u.top-=h.f,u.left-=h.e),a.toRect=u,a.thisAnimationDuration&&T4(c,u)&&!T4(s,u)&&(e.top-u.top)/(e.left-u.left)==(s.top-u.top)/(s.left-u.left)&&(h=e,c=c,l=l,t=o.options,n=Math.sqrt(Math.pow(c.top-h.top,2)+Math.pow(c.left-h.left,2))/Math.sqrt(Math.pow(c.top-l.top,2)+Math.pow(c.left-l.left,2))*t.animation),T4(u,s)||(a.prevFromRect=s,a.prevToRect=u,n=n||o.options.animation,o.animate(a,e,u,n)),n&&(r=!0,i=Math.max(i,n),clearTimeout(a.animationResetTimer),a.animationResetTimer=setTimeout((function(){a.animationTime=0,a.prevFromRect=null,a.fromRect=null,a.prevToRect=null,a.thisAnimationDuration=null}),n),a.thisAnimationDuration=n)})),clearTimeout(e),r?e=setTimeout((function(){"function"==typeof n&&n()}),i):"function"==typeof n&&n(),t=[]):(clearTimeout(e),"function"==typeof n&&n())},animate:function(e,t,n,r){var i,o;r&&(v4(e,"transition",""),v4(e,"transform",""),o=(i=b4(this.el))&&i.a,i=i&&i.d,o=(t.left-n.left)/(o||1),t=(t.top-n.top)/(i||1),e.animatingX=!!o,e.animatingY=!!t,v4(e,"transform","translate3d("+o+"px,"+t+"px,0)"),this.forRepaintDummy=e.offsetWidth,v4(e,"transition","transform "+r+"ms"+(this.options.easing?" "+this.options.easing:"")),v4(e,"transform","translate3d(0,0,0)"),"number"==typeof e.animated&&clearTimeout(e.animated),e.animated=setTimeout((function(){v4(e,"transition",""),v4(e,"transform",""),e.animated=!1,e.animatingX=!1,e.animatingY=!1}),r))}}}())}function B5(e,t,n,r,i,o,a,s){var u,c,l=e[M4],h=l.options.onMove;return!window.CustomEvent||a4||s4?(u=document.createEvent("Event")).initEvent("move",!0,!0):u=new CustomEvent("move",{bubbles:!0,cancelable:!0}),u.to=t,u.from=e,u.dragged=n,u.draggedRect=r,u.related=i||t,u.relatedRect=o||x4(t),u.willInsertAfter=s,u.originalEvent=a,e.dispatchEvent(u),h?h.call(l,u,a):c}function I5(e){e.draggable=!1}function M5(){C5=!1}function j5(e){return setTimeout(e,0)}function N5(e){return clearTimeout(e)}E5&&!za&&document.addEventListener("click",(function(e){if(v5)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),v5=!1}),!0),D5.prototype={constructor:D5,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(d5=null)},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,q4):this.options.direction},_onTapStart:function(e){if(e.cancelable){for(var t=this,n=this.el,r=this.options,i=r.preventOnFilter,o=e.type,a=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,s=(a||e).target,u=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||s,c=r.filter,l=n,h=(k5.length=0,l.getElementsByTagName("input")),f=h.length;f--;){var d=h[f];d.checked&&k5.push(d)}if(!q4&&!(/mousedown|pointerdown/.test(o)&&0!==e.button||r.disabled)&&!u.isContentEditable&&(this.nativeDraggable||!c4||!s||"SELECT"!==s.tagName.toUpperCase())&&!((s=p4(s,r.draggable,n,!1))&&s.animated||X4===s)){if(e5=S4(s),n5=S4(s,r.draggable),"function"==typeof c){if(c.call(this,e,s,this))return L4({sortable:t,rootEl:u,name:"filter",targetEl:s,toEl:n,fromEl:n}),R4("filter",t,{evt:e}),void(i&&e.cancelable&&e.preventDefault())}else if(c=c&&c.split(",").some((function(r){if(r=p4(u,r.trim(),n,!1))return L4({sortable:t,rootEl:r,name:"filter",targetEl:s,fromEl:n,toEl:n}),R4("filter",t,{evt:e}),!0})))return void(i&&e.cancelable&&e.preventDefault());r.handle&&!p4(u,r.handle,n,!1)||this._prepareDragStart(e,a,s)}}},_prepareDragStart:function(e,t,n){var r,i=this,o=i.el,a=i.options,s=o.ownerDocument;n&&!q4&&n.parentNode===o&&(r=x4(n),K4=o,G4=(q4=n).parentNode,Y4=q4.nextSibling,X4=n,i5=a.group,a5={target:D5.dragged=q4,clientX:(t||e).clientX,clientY:(t||e).clientY},l5=a5.clientX-r.left,h5=a5.clientY-r.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,q4.style["will-change"]="all",o=function(){R4("delayEnded",i,{evt:e}),D5.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!u4&&i.nativeDraggable&&(q4.draggable=!0),i._triggerDragStart(e,t),L4({sortable:i,name:"choose",originalEvent:e}),A4(q4,a.chosenClass,!0))},a.ignore.split(",").forEach((function(e){y4(q4,e.trim(),I5)})),h4(s,"dragover",Q4),h4(s,"mousemove",Q4),h4(s,"touchmove",Q4),h4(s,"mouseup",i._onDrop),h4(s,"touchend",i._onDrop),h4(s,"touchcancel",i._onDrop),u4&&this.nativeDraggable&&(this.options.touchStartThreshold=4,q4.draggable=!0),R4("delayStart",this,{evt:e}),!a.delay||a.delayOnTouchOnly&&!t||this.nativeDraggable&&(s4||a4)?o():D5.eventCanceled?this._onDrop():(h4(s,"mouseup",i._disableDelayedDrag),h4(s,"touchend",i._disableDelayedDrag),h4(s,"touchcancel",i._disableDelayedDrag),h4(s,"mousemove",i._delayedDragTouchMoveHandler),h4(s,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&h4(s,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(o,a.delay)))},_delayedDragTouchMoveHandler:function(e){e=e.touches?e.touches[0]:e,Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){q4&&I5(q4),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;f4(e,"mouseup",this._disableDelayedDrag),f4(e,"touchend",this._disableDelayedDrag),f4(e,"touchcancel",this._disableDelayedDrag),f4(e,"mousemove",this._delayedDragTouchMoveHandler),f4(e,"touchmove",this._delayedDragTouchMoveHandler),f4(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?h4(document,"pointermove",this._onTouchMove):h4(document,t?"touchmove":"mousemove",this._onTouchMove):(h4(q4,"dragend",this),h4(K4,"dragstart",this._onDragStart));try{document.selection?j5((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function(e,t){var n;A5=!1,K4&&q4?(R4("dragStarted",this,{evt:t}),this.nativeDraggable&&h4(document,"dragover",V4),n=this.options,e||A4(q4,n.dragClass,!1),A4(q4,n.ghostClass,!0),D5.active=this,e&&this._appendGhost(),L4({sortable:this,name:"start",originalEvent:t})):this._nulling()},_emulateDragOver:function(){if(s5){this._lastX=s5.clientX,this._lastY=s5.clientY,H4();for(var e=document.elementFromPoint(s5.clientX,s5.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(s5.clientX,s5.clientY))!==t;)t=e;if(q4.parentNode[M4]._isOutsideThisEl(e),t)do{if(t[M4]&&t[M4]._onDragOver({clientX:s5.clientX,clientY:s5.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break}while(t=(e=t).parentNode);$4()}},_onTouchMove:function(e){if(a5){var t=(n=this.options).fallbackTolerance,n=n.fallbackOffset,r=e.touches?e.touches[0]:e,i=W4&&b4(W4,!0),o=W4&&i&&i.a,a=W4&&i&&i.d,s=S5&&g5&&_4(g5);o=(r.clientX-a5.clientX+n.x)/(o||1)+(s?s[0]-x5[0]:0)/(o||1),n=(r.clientY-a5.clientY+n.y)/(a||1)+(s?s[1]-x5[1]:0)/(a||1);if(!D5.active&&!A5){if(t&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))<t)return;this._onDragStart(e,!0)}W4&&(i?(i.e+=o-(u5||0),i.f+=n-(c5||0)):i={a:1,b:0,c:0,d:1,e:o,f:n},s="matrix(".concat(i.a,",").concat(i.b,",").concat(i.c,",").concat(i.d,",").concat(i.e,",").concat(i.f,")"),v4(W4,"webkitTransform",s),v4(W4,"mozTransform",s),v4(W4,"msTransform",s),v4(W4,"transform",s),u5=o,c5=n,s5=r),e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!W4){var e=this.options.fallbackOnBody?document.body:K4,t=x4(q4,!0,S5,!0,e),n=this.options;if(S5){for(g5=e;"static"===v4(g5,"position")&&"none"===v4(g5,"transform")&&g5!==document;)g5=g5.parentNode;g5!==document.body&&g5!==document.documentElement?(g5===document&&(g5=w4()),t.top+=g5.scrollTop,t.left+=g5.scrollLeft):g5=w4(),x5=_4(g5)}A4(W4=q4.cloneNode(!0),n.ghostClass,!1),A4(W4,n.fallbackClass,!0),A4(W4,n.dragClass,!0),v4(W4,"transition",""),v4(W4,"transform",""),v4(W4,"box-sizing","border-box"),v4(W4,"margin",0),v4(W4,"top",t.top),v4(W4,"left",t.left),v4(W4,"width",t.width),v4(W4,"height",t.height),v4(W4,"opacity","0.8"),v4(W4,"position",S5?"absolute":"fixed"),v4(W4,"zIndex","100000"),v4(W4,"pointerEvents","none"),D5.ghost=W4,e.appendChild(W4),v4(W4,"transform-origin",l5/parseInt(W4.style.width)*100+"% "+h5/parseInt(W4.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,r=e.dataTransfer,i=n.options;R4("dragStart",this,{evt:e}),D5.eventCanceled?this._onDrop():(R4("setupClone",this),D5.eventCanceled||((J4=I4(q4)).removeAttribute("id"),J4.draggable=!1,J4.style["will-change"]="",this._hideClone(),A4(J4,this.options.chosenClass,!1),D5.clone=J4),n.cloneId=j5((function(){R4("clone",n),D5.eventCanceled||(n.options.removeCloneOnHide||K4.insertBefore(J4,q4),n._hideClone(),L4({sortable:n,name:"clone"}))})),t||A4(q4,i.dragClass,!0),t?(v5=!0,n._loopId=setInterval(n._emulateDragOver,50)):(f4(document,"mouseup",n._onDrop),f4(document,"touchend",n._onDrop),f4(document,"touchcancel",n._onDrop),r&&(r.effectAllowed="move",i.setData&&i.setData.call(n,r,q4)),h4(document,"drop",n),v4(q4,"transform","translateZ(0)")),A5=!0,n._dragStartId=j5(n._dragStarted.bind(n,t,e)),h4(document,"selectstart",n),f5=!0,c4&&v4(document.body,"user-select","none"))},_onDragOver:function(e){var t,n,r,i=this.el,o=e.target,a=this.options,s=a.group,u=D5.active,c=i5===s,l=a.sort,h=o5||u,f=this,d=!1;if(!C5){if(void 0!==e.preventDefault&&e.cancelable&&e.preventDefault(),o=p4(o,a.draggable,i,!0),S("dragOver"),D5.eventCanceled)return d;if(q4.contains(e.target)||o.animated&&o.animatingX&&o.animatingY||f._ignoreWhileAnimating===o)return O(!1);if(v5=!1,u&&!a.disabled&&(c?l||(n=G4!==K4):o5===this||(this.lastPutMode=i5.checkPull(this,u,q4,e))&&s.checkPut(this,u,q4,e))){if(r="vertical"===this._getDirection(e,o),t=x4(q4),S("dragOverValid"),D5.eventCanceled)return d;if(n)return G4=K4,_(),this._hideClone(),S("revert"),D5.eventCanceled||(Y4?K4.insertBefore(q4,Y4):K4.appendChild(q4)),O(!0);if(!(s=E4(i,a.draggable))||function(e,t,n){return n=x4(E4(n.el,n.options.draggable)),t?e.clientX>n.right+10||e.clientX<=n.right&&e.clientY>n.bottom&&e.clientX>=n.left:e.clientX>n.right&&e.clientY>n.top||e.clientX<=n.right&&e.clientY>n.bottom+10}(e,r,this)&&!s.animated){if(s===q4)return O(!1);if((o=s&&i===e.target?s:o)&&(A=x4(o)),!1!==B5(K4,i,q4,t,o,A,e,!!o))return _(),s&&s.nextSibling?i.insertBefore(q4,s.nextSibling):i.appendChild(q4),G4=i,T(),O(!0)}else if(s&&function(e,t,n){return n=x4(k4(n.el,0,n.options,!0)),t?e.clientX<n.left-10||e.clientY<n.top&&e.clientX<n.right:e.clientY<n.top-10||e.clientY<n.bottom&&e.clientX<n.left}(e,r,this)){if((s=k4(i,0,a,!0))===q4)return O(!1);if(A=x4(o=s),!1!==B5(K4,i,q4,t,o,A,e,!1))return _(),i.insertBefore(q4,s),G4=i,T(),O(!0)}else if(o.parentNode===i){var p,m,g,A=x4(o),v=(s=q4.parentNode!==i,C=q4.animated&&q4.toRect||t,v=o.animated&&o.toRect||A,w=(E=r)?C.left:C.top,b=E?C.right:C.bottom,C=E?C.width:C.height,k=E?v.left:v.top,y=E?v.right:v.bottom,E=E?v.width:v.height,!(w===k||b===y||w+C/2===k+E/2)),b=r?"top":"left",y=C4(o,"top","top")||C4(q4,"top","top"),w=y?y.scrollTop:void 0;if(d5!==o&&(m=A[b],y5=!1,w5=!v&&a.invertSwap||s),0!==(p=function(e,t,n,r,i,o,a,s){e=r?e.clientY:e.clientX;var u=r?n.height:n.width,c=r?n.top:n.left;r=r?n.bottom:n.right,n=!1;if(!a)if(s&&m5<u*i){if(y5=!y5&&(1===p5?c+u*o/2<e:e<r-u*o/2)||y5)n=!0;else if(1===p5?e<c+m5:r-m5<e)return-p5}else if(c+u*(1-i)/2<e&&e<r-u*(1-i)/2)return function(e){return S4(q4)<S4(e)?1:-1}(t);return(n=n||a)&&(e<c+u*o/2||r-u*o/2<e)?c+u/2<e?1:-1:0}(e,o,A,r,v?1:a.swapThreshold,null==a.invertedSwapThreshold?a.swapThreshold:a.invertedSwapThreshold,w5,d5===o)))for(var x=S4(q4);(g=G4.children[x-=p])&&("none"===v4(g,"display")||g===W4););if(0===p||g===o)return O(!1);p5=p;var C=(d5=o).nextElementSibling,k=!1,E=B5(K4,i,q4,t,o,A,e,k=1===p);if(!1!==E)return 1!==E&&-1!==E||(k=1===E),C5=!0,setTimeout(M5,30),_(),k&&!C?i.appendChild(q4):o.parentNode.insertBefore(q4,k?C:o),y&&B4(y,0,w-y.scrollTop),G4=q4.parentNode,void 0===m||w5||(m5=Math.abs(m-x4(o)[b])),T(),O(!0)}if(i.contains(q4))return O(!1)}return!1}function S(a,s){R4(a,f,t4({evt:e,isOwner:c,axis:r?"vertical":"horizontal",revert:n,dragRect:t,targetRect:A,canSort:l,fromSortable:h,target:o,completed:O,onMove:function(n,r){return B5(K4,i,q4,t,n,x4(n),e,r)},changed:T},s))}function _(){S("dragOverAnimationCapture"),f.captureAnimationState(),f!==h&&h.captureAnimationState()}function O(t){return S("dragOverCompleted",{insertion:t}),t&&(c?u._hideClone():u._showClone(f),f!==h&&(A4(q4,(o5||u).options.ghostClass,!1),A4(q4,a.ghostClass,!0)),o5!==f&&f!==D5.active?o5=f:f===D5.active&&o5&&(o5=null),h===f&&(f._ignoreWhileAnimating=o),f.animateAll((function(){S("dragOverAnimationComplete"),f._ignoreWhileAnimating=null})),f!==h&&(h.animateAll(),h._ignoreWhileAnimating=null)),(o===q4&&!q4.animated||o===i&&!o.animated)&&(d5=null),a.dragoverBubble||e.rootEl||o===document||(q4.parentNode[M4]._isOutsideThisEl(e.target),t||Q4(e)),!a.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),d=!0}function T(){t5=S4(q4),r5=S4(q4,a.draggable),L4({sortable:f,name:"change",toEl:i,newIndex:t5,newDraggableIndex:r5,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){f4(document,"mousemove",this._onTouchMove),f4(document,"touchmove",this._onTouchMove),f4(document,"pointermove",this._onTouchMove),f4(document,"dragover",Q4),f4(document,"mousemove",Q4),f4(document,"touchmove",Q4)},_offUpEvents:function(){var e=this.el.ownerDocument;f4(e,"mouseup",this._onDrop),f4(e,"touchend",this._onDrop),f4(e,"pointerup",this._onDrop),f4(e,"touchcancel",this._onDrop),f4(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;t5=S4(q4),r5=S4(q4,n.draggable),R4("drop",this,{evt:e}),G4=q4&&q4.parentNode,t5=S4(q4),r5=S4(q4,n.draggable),D5.eventCanceled||(y5=w5=A5=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),N5(this.cloneId),N5(this._dragStartId),this.nativeDraggable&&(f4(document,"drop",this),f4(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),c4&&v4(document.body,"user-select",""),v4(q4,"transform",""),e&&(f5&&(e.cancelable&&e.preventDefault(),n.dropBubble||e.stopPropagation()),W4&&W4.parentNode&&W4.parentNode.removeChild(W4),(K4===G4||o5&&"clone"!==o5.lastPutMode)&&J4&&J4.parentNode&&J4.parentNode.removeChild(J4),q4&&(this.nativeDraggable&&f4(q4,"dragend",this),I5(q4),q4.style["will-change"]="",f5&&!A5&&A4(q4,(o5||this).options.ghostClass,!1),A4(q4,this.options.chosenClass,!1),L4({sortable:this,name:"unchoose",toEl:G4,newIndex:null,newDraggableIndex:null,originalEvent:e}),K4!==G4?(0<=t5&&(L4({rootEl:G4,name:"add",toEl:G4,fromEl:K4,originalEvent:e}),L4({sortable:this,name:"remove",toEl:G4,originalEvent:e}),L4({rootEl:G4,name:"sort",toEl:G4,fromEl:K4,originalEvent:e}),L4({sortable:this,name:"sort",toEl:G4,originalEvent:e})),o5&&o5.save()):t5!==e5&&0<=t5&&(L4({sortable:this,name:"update",toEl:G4,originalEvent:e}),L4({sortable:this,name:"sort",toEl:G4,originalEvent:e})),D5.active&&(null!=t5&&-1!==t5||(t5=e5,r5=n5),L4({sortable:this,name:"end",toEl:G4,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){R4("nulling",this),K4=q4=G4=W4=Y4=J4=X4=Z4=a5=s5=f5=t5=r5=e5=n5=d5=p5=o5=i5=D5.dragged=D5.ghost=D5.clone=D5.active=null,k5.forEach((function(e){e.checked=!0})),k5.length=u5=c5=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":var t;q4&&(this._onDragOver(e),(t=e).dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault());break;case"selectstart":e.preventDefault()}},toArray:function(){for(var e,t=[],n=this.el.children,r=0,i=n.length,o=this.options;r<i;r++)p4(e=n[r],o.draggable,this.el,!1)&&t.push(e.getAttribute(o.dataIdAttr)||function(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,r=0;n--;)r+=t.charCodeAt(n);return r.toString(36)}(e));return t},sort:function(e,t){var n={},r=this.el;this.toArray().forEach((function(e,t){p4(t=r.children[t],this.options.draggable,r,!1)&&(n[e]=t)}),this),t&&this.captureAnimationState(),e.forEach((function(e){n[e]&&(r.removeChild(n[e]),r.appendChild(n[e]))})),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return p4(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(void 0===t)return n[e];var r=F4.modifyOption(this,e,t);n[e]=void 0!==r?r:t,"group"===e&&z4(n)},destroy:function(){R4("destroy",this);var e=this.el;e[M4]=null,f4(e,"mousedown",this._onTapStart),f4(e,"touchstart",this._onTapStart),f4(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(f4(e,"dragover",this),f4(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),(function(e){e.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),b5.splice(b5.indexOf(this.el),1),this.el=e=null},_hideClone:function(){Z4||(R4("hideClone",this),D5.eventCanceled||(v4(J4,"display","none"),this.options.removeCloneOnHide&&J4.parentNode&&J4.parentNode.removeChild(J4),Z4=!0))},_showClone:function(e){"clone"!==e.lastPutMode?this._hideClone():Z4&&(R4("showClone",this),D5.eventCanceled||(q4.parentNode!=K4||this.options.group.revertClone?Y4?K4.insertBefore(J4,Y4):K4.appendChild(J4):K4.insertBefore(J4,q4),this.options.group.revertClone&&this.animate(q4,J4),v4(J4,"display",""),Z4=!1))}},E5&&h4(document,"touchmove",(function(e){(D5.active||A5)&&e.cancelable&&e.preventDefault()})),D5.utils={on:h4,off:f4,css:v4,find:y4,is:function(e,t){return!!p4(e,t,e,!1)},extend:function(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},throttle:D4,closest:p4,toggleClass:A4,clone:I4,index:S4,nextTick:j5,cancelNextTick:N5,detectDirection:U4,getChild:k4},D5.get=function(e){return e[M4]},D5.mount=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];(t=t[0].constructor===Array?t[0]:t).forEach((function(e){if(!e.prototype||!e.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(e));e.utils&&(D5.utils=t4(t4({},D5.utils),e.utils)),F4.mount(e)}))},D5.create=function(e,t){return new D5(e,t)};var F5,R5,P5,L5,U5,z5,H5=[],$5=!(D5.version="1.15.0");function Q5(){H5.forEach((function(e){clearInterval(e.pid)})),H5=[]}function V5(){clearInterval(z5)}function q5(e){var t=e.originalEvent,n=e.putSortable,r=e.dragEl,i=e.activeSortable,o=e.dispatchSortableEvent,a=e.hideGhostForTarget;e=e.unhideGhostForTarget;t&&(i=n||i,a(),a=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,t=document.elementFromPoint(a.clientX,a.clientY),e(),i&&!i.el.contains(t)&&(o("spill"),this.onSpill({dragEl:r,putSortable:n})))}var G5=D4((function(e,t,n,r){if(t.scroll){var i,o=(e.touches?e.touches[0]:e).clientX,a=(e.touches?e.touches[0]:e).clientY,s=t.scrollSensitivity,u=t.scrollSpeed,c=w4(),l=!1,h=(R5!==n&&(R5=n,Q5(),F5=t.scroll,i=t.scrollFn,!0===F5&&(F5=O4(n,!0))),0),f=F5;do{var d=f,p=(b=x4(d)).top,m=b.bottom,g=b.left,A=b.right,v=b.width,b=b.height,y=void 0,w=d.scrollWidth,x=d.scrollHeight,C=v4(d),k=d.scrollLeft,E=d.scrollTop,S=d===c?(y=v<w&&("auto"===C.overflowX||"scroll"===C.overflowX||"visible"===C.overflowX),b<x&&("auto"===C.overflowY||"scroll"===C.overflowY||"visible"===C.overflowY)):(y=v<w&&("auto"===C.overflowX||"scroll"===C.overflowX),b<x&&("auto"===C.overflowY||"scroll"===C.overflowY));C=y&&(Math.abs(A-o)<=s&&k+v<w)-(Math.abs(g-o)<=s&&!!k),y=S&&(Math.abs(m-a)<=s&&E+b<x)-(Math.abs(p-a)<=s&&!!E);if(!H5[h])for(var _=0;_<=h;_++)H5[_]||(H5[_]={});H5[h].vx==C&&H5[h].vy==y&&H5[h].el===d||(H5[h].el=d,H5[h].vx=C,H5[h].vy=y,clearInterval(H5[h].pid),0==C&&0==y||(l=!0,H5[h].pid=setInterval(function(){r&&0===this.layer&&D5.active._onTouchMove(U5);var t=H5[this.layer].vy?H5[this.layer].vy*u:0,n=H5[this.layer].vx?H5[this.layer].vx*u:0;"function"==typeof i&&"continue"!==i.call(D5.dragged.parentNode[M4],n,t,e,U5,H5[this.layer].el)||B4(H5[this.layer].el,n,t)}.bind({layer:h}),24))),h++}while(t.bubbleScroll&&f!==c&&(f=O4(f,!1)));$5=l}}),30);function W5(){}function K5(){}W5.prototype={startIndex:null,dragStart:function(e){e=e.oldDraggableIndex,this.startIndex=e},onSpill:function(e){var t=e.dragEl,n=(e=e.putSortable,this.sortable.captureAnimationState(),e&&e.captureAnimationState(),k4(this.sortable.el,this.startIndex,this.options));n?this.sortable.el.insertBefore(t,n):this.sortable.el.appendChild(t),this.sortable.animateAll(),e&&e.animateAll()},drop:q5},r4(W5,{pluginName:"revertOnSpill"}),K5.prototype={onSpill:function(e){var t=e.dragEl;(e=e.putSortable||this.sortable).captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),e.animateAll()},drop:q5},r4(K5,{pluginName:"removeOnSpill"}),D5.mount(new function(){function e(){for(var e in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this))}return e.prototype={dragStarted:function(e){e=e.originalEvent,this.sortable.nativeDraggable?h4(document,"dragover",this._handleAutoScroll):this.options.supportPointer?h4(document,"pointermove",this._handleFallbackAutoScroll):e.touches?h4(document,"touchmove",this._handleFallbackAutoScroll):h4(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){e=e.originalEvent,this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?f4(document,"dragover",this._handleAutoScroll):(f4(document,"pointermove",this._handleFallbackAutoScroll),f4(document,"touchmove",this._handleFallbackAutoScroll),f4(document,"mousemove",this._handleFallbackAutoScroll)),V5(),Q5(),clearTimeout(m4),m4=void 0},nulling:function(){U5=R5=F5=$5=z5=P5=L5=null,H5.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,t){var n,r=this,i=(e.touches?e.touches[0]:e).clientX,o=(e.touches?e.touches[0]:e).clientY,a=document.elementFromPoint(i,o);U5=e,t||this.options.forceAutoScrollFallback||s4||a4||c4?(G5(e,this.options,a,t),n=O4(a,!0),!$5||z5&&i===P5&&o===L5||(z5&&V5(),z5=setInterval((function(){var a=O4(document.elementFromPoint(i,o),!0);a!==n&&(n=a,Q5()),G5(e,r.options,a,t)}),10),P5=i,L5=o)):this.options.bubbleScroll&&O4(a,!0)!==w4()?G5(e,this.options,O4(a,!1),!1):Q5()}},r4(e,{pluginName:"scroll",initializeByDefault:!0})}),D5.mount(K5,W5);var Y5=D5;function X5(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function J5(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var Z5=function(){function e(t){var n=this;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");function r(e){try{n.selectButtonIcon.eventType=Number(e),2==e?(n.customUrlEl.show(),n.reportSelect.hide()):(n.customUrlEl.hide(),n.reportSelect.show())}catch(e){}}this.$parent=t;var i=this;t=s("div","".concat(pe,"-move_position")).children(s("span").html("报表工具栏"));this.selectButtonIcon=null,this.selectIndex=0,this.data=D.a.defaultToolbarButtons,this.previewButtonsEl=s("div","preview"),this.buttonMainEl=s("div","toolbar_button_main"),this.createButtonList(),this.configRightEl=s("div","config_right"),this.emptyContentEl=s("p").innerHTML("没有选择图标"),this.emptyEl=s("div","".concat(pe,"-empty")).children(s("div","empty-image").innerHTML('<svg viewBox="0 0 79 86" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><linearGradient id="linearGradient-1-1" x1="38.8503086%" y1="0%" x2="61.1496914%" y2="100%"><stop stop-color="#fcfcfd" offset="0%"></stop><stop stop-color="#eeeff3" offset="100%"></stop></linearGradient><linearGradient id="linearGradient-2-1" x1="0%" y1="9.5%" x2="100%" y2="90.5%"><stop stop-color="#fcfcfd" offset="0%"></stop><stop stop-color="#e9ebef" offset="100%"></stop></linearGradient><rect id="path-3-1" x="0" y="0" width="17" height="36"></rect></defs><g id="Illustrations" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="B-type" transform="translate(-1268.000000, -535.000000)"><g id="Group-2" transform="translate(1268.000000, 535.000000)"><path id="Oval-Copy-2" d="M39.5,86 C61.3152476,86 79,83.9106622 79,81.3333333 C79,78.7560045 57.3152476,78 35.5,78 C13.6847524,78 0,78.7560045 0,81.3333333 C0,83.9106622 17.6847524,86 39.5,86 Z" fill="#f7f8fc"></path><polygon id="Rectangle-Copy-14" fill="#e5e7e9" transform="translate(27.500000, 51.500000) scale(1, -1) translate(-27.500000, -51.500000) " points="13 58 53 58 42 45 2 45"></polygon><g id="Group-Copy" transform="translate(34.500000, 31.500000) scale(-1, 1) rotate(-25.000000) translate(-34.500000, -31.500000) translate(7.000000, 10.000000)"><polygon id="Rectangle-Copy-10" fill="#e5e7e9" transform="translate(11.500000, 5.000000) scale(1, -1) translate(-11.500000, -5.000000) " points="2.84078316e-14 3 18 3 23 7 5 7"></polygon><polygon id="Rectangle-Copy-11" fill="#edeef2" points="-3.69149156e-15 7 38 7 38 43 -3.69149156e-15 43"></polygon><rect id="Rectangle-Copy-12" fill="url(#linearGradient-1-1)" transform="translate(46.500000, 25.000000) scale(-1, 1) translate(-46.500000, -25.000000) " x="38" y="7" width="17" height="36"></rect><polygon id="Rectangle-Copy-13" fill="#f8f9fb" transform="translate(39.500000, 3.500000) scale(-1, 1) translate(-39.500000, -3.500000) " points="24 7 41 7 55 -3.63806207e-12 38 -3.63806207e-12"></polygon></g><rect id="Rectangle-Copy-15" fill="url(#linearGradient-2-1)" x="13" y="45" width="40" height="36"></rect><g id="Rectangle-Copy-17" transform="translate(53.000000, 45.000000)"><use id="Mask" fill="#e0e3e9" transform="translate(8.500000, 18.000000) scale(-1, 1) translate(-8.500000, -18.000000) " xlink:href="#path-3-1"></use><polygon id="Rectangle-Copy" fill="#d5d7de" mask="url(#mask-4-1)" transform="translate(12.000000, 9.000000) scale(-1, 1) translate(-12.000000, -9.000000) " points="7 0 24 0 20 18 7 16.5"></polygon></g><polygon id="Rectangle-Copy-18" fill="#f8f9fb" transform="translate(66.000000, 51.500000) scale(-1, 1) translate(-66.000000, -51.500000) " points="62 45 79 45 70 58 53 58"></polygon></g></g></g></svg>'),s("div","empty-description").children(this.emptyContentEl)),this.iconsEl=s("div","icon_group ui-tab-content active").attr({id:"".concat(pe,"-icons")}),this.copyData=[],this.customInputEl=new ac({placeholder:""},"",{height:"32px"},(function(){}),(function(e){n.selectButtonIcon.icon=e})),this.customIconEl=s("div","custom_icon_main ui-tab-content").children(s("span").css({display:"block",marginBottom:"5px",marginTop:"10px"}).innerHTML("Font Awesome图标库"),s("span").css({display:"block",marginBottom:"5px",fontSize:"12px"}).innerHTML("例如：fa fa-arrow-down"),this.customInputEl.el).attr({id:"".concat(pe,"-custom—icon")}),this.createIconGroup(),this.tabsEl=s("div","ui-tab-tabs").children(s("button","ui-tab-tab").attr({"data-target":"".concat(pe,"-icons"),name:"tab_group","is-tab":!0,open:!0}).innerHTML("图标").css({fontSize:"14px"}),s("button","ui-tab-tab").attr({"data-target":"".concat(pe,"-custom—icon"),name:"tab_group","is-tab":!0}).innerHTML("自定义图标").css({fontSize:"14px",marginRight:"0px"})),this.popperEl=s("div","popper").children(this.tabsEl,this.iconsEl,this.customIconEl),this.popperHide(),this.iTriggerEl=s("i"),this.iconTriggerEl=s("div","el-color-picker__trigger").children(this.iTriggerEl).on("click",(function(){n.popperShow()})),this.iconCheckbox=new gG("显示按钮图标",!1,!1,{},null,null,(function(e){n.selectButtonIcon.showIcon=e,n.resetSelectDom({showIcon:e})})),this.textCheckbox=new gG("显示按钮文字",!1,!1,{},null,null,(function(e){n.selectButtonIcon.showText=e,n.resetSelectDom({showText:e})})),this.colorTriggerEl=s("div","el-color-picker__trigger").css({marginLeft:"10px"}),this.bColorPalette=new Ol(!0),this.bColorPalette.hide(),this.bColorPalette.change=function(e){n.selectButtonIcon.color=e,n.resetPreviewIcon({color:e}),n.resetSelectDom({color:e}),n.colorTriggerEl.css("backgroundColor",e)},this.colorTriggerEl.children(this.bColorPalette.el).on("click",(function(e){e.preventDefault(),n.bColorPalette.show()})),this.inputEl=new ac({placeholder:""},"",{width:"140px",height:"27px"},(function(){}),(function(e){n.selectButtonIcon.text=e,n.resetSelectDom({text:e})})),this.eventSelectEl=new e2([{name:"跳转到自定义页面",value:"2"}],"2",{width:"140px",height:"27px"},!1,{onChange:r}),r(2),this.eventType=s("div").children(s("div","form_item").children(s("span","title").innerHTML("事件类型"),this.eventSelectEl.el)),this.eventSelectEl.setup(),this.reportSelectEl=new e2([],null,{width:"140px",height:"27px"},!1,{onChange:function(e){try{n.selectButtonIcon.reportId=e}catch(e){}}}),this.reportSelect=s("div").children(s("div","form_item").children(s("span","title").innerHTML("选择报表"),this.reportSelectEl.el)),this.reportSelectEl.setup(),this.openWindowRadioEl=s("div","".concat(pe,"-flex--center")).children(s("input").attr({type:"radio",id:"r1",name:"isOpen",value:1}).css("marginRight","8px"),s("label").attr({for:"r1"}).html("是").css("marginRight","16px"),s("input").attr({type:"radio",id:"r2",name:"isOpen",value:2}).css("marginRight","8px"),s("label").attr({for:"r2"}).html("否").css("marginRight","16px")),this.openWindowEl=s("div").children(s("div","form_item").children(s("span","title").innerHTML("新窗口打开"),this.openWindowRadioEl)),ve()(this.openWindowRadioEl.el).find("input[name^=isOpen]").on("change",(function(){var e=z0(n.openWindowRadioEl.el,"isOpen");n.selectButtonIcon.isOpen=Number(e)})),this.customUrlInputEl=new ac({placeholder:""},"",{width:"140px",height:"27px"},(function(){}),(function(e){n.selectButtonIcon.customUrl=e})),this.customUrlEl=s("div").children(s("div","form_item").children(s("span","title").innerHTML("自定义页面"),this.customUrlInputEl.el)),this.customButtonConfig(!1),this.iconContentEl=s("div").children(s("div","title").innerHTML("按钮属性"),s("div","config_form").children(s("div","form_item").children(this.iconCheckbox.el),s("div","form_item").children(this.textCheckbox.el),s("div","form_item").children(s("span","title").innerHTML("按钮文字"),this.inputEl.el),s("div","form_item").children(s("span","title").innerHTML("按钮图标"),s("div","icon_main").children(this.iconTriggerEl,this.popperEl,this.colorTriggerEl)),this.eventType,this.reportSelect,this.customUrlEl,this.openWindowEl)),this.configRightEl.children(this.emptyEl),this.el=s("div","".concat(pe,"-design-toolbar_buttons")).children(t,s("div","".concat(pe,"-report_toolbar_main")).children(s("div","".concat(pe,"-toolbar_config_main")).children(s("div","title").children(s("div").children(s("span").innerHTML("已选按钮列表").css("marginRight","10px"),s("i","ui-tips preview_tip").innerHTML('<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" data-v-ea893728=""><path fill="currentColor" d="M512 64a448 448 0 1 1 0 896.064A448 448 0 0 1 512 64zm67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344zM590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.992 12.992 0 0 1-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 0 1 7.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z"></path></svg>').attr({title:"拖动图标可改变顺序"})).css({display:"flex","align-items":"center"}),s("i","preview_tip").innerHTML('<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" data-v-69f52bff=""><path fill="currentColor" d="M600.704 64a32 32 0 0 1 30.464 22.208l35.2 109.376c14.784 7.232 28.928 15.36 42.432 24.512l112.384-24.192a32 32 0 0 1 34.432 15.36L944.32 364.8a32 32 0 0 1-4.032 37.504l-77.12 85.12a357.12 357.12 0 0 1 0 49.024l77.12 85.248a32 32 0 0 1 4.032 37.504l-88.704 153.6a32 32 0 0 1-34.432 15.296L708.8 803.904c-13.44 9.088-27.648 17.28-42.368 24.512l-35.264 109.376A32 32 0 0 1 600.704 960H423.296a32 32 0 0 1-30.464-22.208L357.696 828.48a351.616 351.616 0 0 1-42.56-24.64l-112.32 24.256a32 32 0 0 1-34.432-15.36L79.68 659.2a32 32 0 0 1 4.032-37.504l77.12-85.248a357.12 357.12 0 0 1 0-48.896l-77.12-85.248A32 32 0 0 1 79.68 364.8l88.704-153.6a32 32 0 0 1 34.432-15.296l112.32 24.256c13.568-9.152 27.776-17.408 42.56-24.64l35.2-109.312A32 32 0 0 1 423.232 64H600.64zm-23.424 64H446.72l-36.352 113.088-24.512 11.968a294.113 294.113 0 0 0-34.816 20.096l-22.656 15.36-116.224-25.088-65.28 113.152 79.68 88.192-1.92 27.136a293.12 293.12 0 0 0 0 40.192l1.92 27.136-79.808 88.192 65.344 113.152 116.224-25.024 22.656 15.296a294.113 294.113 0 0 0 34.816 20.096l24.512 11.968L446.72 896h130.688l36.48-113.152 24.448-11.904a288.282 288.282 0 0 0 34.752-20.096l22.592-15.296 116.288 25.024 65.28-113.152-79.744-88.192 1.92-27.136a293.12 293.12 0 0 0 0-40.256l-1.92-27.136 79.808-88.128-65.344-113.152-116.288 24.96-22.592-15.232a287.616 287.616 0 0 0-34.752-20.096l-24.448-11.904L577.344 128zM512 320a192 192 0 1 1 0 384 192 192 0 0 1 0-384zm0 64a128 128 0 1 0 0 256 128 128 0 0 0 0-256z"></path></svg>').on("click",(function(){n.dialogShow()}))),s("div","config_main").children(s("div","config_left").children(this.buttonMainEl),this.configRightEl)))).css({top:"88px"}),this.eventMap=new Map,new Y5(this.buttonMainEl.el,{animation:150,ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",onEnd:function(e){var t=e.oldIndex,r=(e=e.newIndex,Qw.a.cloneDeep(n.data));D.a.swapArrayLocs(r,t,e),n.data=r,n.createButtonList(),n.setBgStyle()}}),this.checkBoxList=[],this.buttonListMain=s("div","checkbox_list"),this.addbuttonCount=1,this.isAllChecked=!1,this.allCheckBoxEl=new gG("全选",!1,!1,{},null,null,(function(e){n.copyData.forEach((function(t,r){!e||t.showText||t.showIcon||(t.showText=e,t.showIcon=e),t.show=e,t=n.checkBoxList[r],e?t.check():t.cancelCheck()})),n.isAllChecked=e})),this.contentEl=s("div","".concat(pe,"-buttons_list_main")).children(s("div","add_button").children(s("i").innerHTML('<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" data-v-69f52bff=""><path fill="currentColor" d="M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896zm-38.4 409.6H326.4a38.4 38.4 0 1 0 0 76.8h147.2v147.2a38.4 38.4 0 0 0 76.8 0V550.4h147.2a38.4 38.4 0 0 0 0-76.8H550.4V326.4a38.4 38.4 0 1 0-76.8 0v147.2z"></path></svg>').css({height:"1em",width:"1em",lineHeight:"1em",display:"inline-flex",justifyContent:"center",position:"relative",fill:"currentColor",cursor:"pointer",color:"#409eff"}).on("click",(function(){n.copyData.push({showIcon:!0,showText:!0,text:"自定义按钮_".concat(n.addbuttonCount),icon:"fa fa-edit",color:"#2c3e50",show:!0,id:(new Date).getTime(),type:8,eventType:2,reportId:"",isOpen:1,customUrl:""}),n.addbuttonCount+=1,n.createButtonListDialog()}))),s("div","checkbox_list").children(this.allCheckBoxEl.el),this.buttonListMain),this.buttonListEl=new Dialog({title:"按钮列表",content:this.contentEl.el,buttons:[{value:"取消",type:" ",className:"".concat(pe,"-slash_button"),events:function(){i.dialogHide()}},{value:"确定",type:"primary",className:"".concat(pe,"-slash_button"),events:function(){i.dialogSave()}}],width:"400px"}),this.buttonListEl.element.title.classList.add("".concat(pe,"-dialog_title")),this.dialogHide(),this.hide()}var t,n;return t=e,(n=[{key:"dialogSave",value:function(){this.data=Qw.a.cloneDeep(this.copyData),this.createButtonList(),this.selectButtonIcon=null,this.selectIndex=0,this.configRightEl.innerHTML(""),this.emptyContentEl.innerHTML(""),this.emptyContentEl.innerHTML("没有选择图标"),this.configRightEl.children(this.emptyEl),this.dialogHide()}},{key:"dialogShow",value:function(){this.copyData=Qw.a.cloneDeep(this.data),this.createButtonListDialog(),this.isAllSelect(),this.buttonListEl.show()}},{key:"dialogHide",value:function(){this.buttonListEl.hide()}},{key:"hide",value:function(){this.el.hide()}},{key:"isAllSelect",value:function(){var e,t=!0,n=function(e,t){var n,r,i,o,a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(a)return r=!(n=!0),{s:function(){a=a.call(e)},n:function(){var e=a.next();return n=e.done,e},e:function(e){r=!0,i=e},f:function(){try{n||null==a.return||a.return()}finally{if(r)throw i}}};if(Array.isArray(e)||(a=function(e,t){var n;if(e)return"string"==typeof e?X5(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?X5(e,t):void 0}(e))||t&&e&&"number"==typeof e.length)return a&&(e=a),o=0,{s:t=function(){},n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(this.copyData);try{for(n.s();!(e=n.n()).done;)if(!e.value.show){t=!1;break}}catch(e){n.e(e)}finally{n.f()}this.isAllChecked=t,this.isAllChecked?this.allCheckBoxEl.check():this.allCheckBoxEl.cancelCheck()}},{key:"show",value:function(){var e=this.$parent.spreadSheet.sheet.data;this.data=e.toolbarButtonList,this.createButtonList(),this.el.show()}},{key:"createButtonListDialog",value:function(){var e=this;this.buttonListMain.innerHTML(""),this.checkBoxList=[],this.copyData.forEach((function(t){e.createButtonListItem(t)}))}},{key:"createButtonListItem",value:function(e){var t=this,n=new gG(e.text,!1,e.show,{},null,null,(function(n){!n||e.showText||e.showIcon||(e.showText=n,e.showIcon=n),e.show=n,t.isAllSelect()})),r=s("div").children(n.el).css("padding","3px 0px");this.checkBoxList.push(n),this.buttonListMain.children(r)}},{key:"getData",value:function(){return this.data}},{key:"popperShow",value:function(){var e=this;this.popperEl.show(),xe(this.popperEl.parent(),(function(t){e.popperEl.hide(),e.selectButtonIcon&&(e.iTriggerEl.el.className=e.selectButtonIcon.icon,e.resetSelectDom(e.selectButtonIcon),e.resetPreviewIcon(e.selectButtonIcon))}))}},{key:"popperHide",value:function(){this.popperEl.hide(),this.selectButtonIcon&&(this.iTriggerEl.el.className=this.selectButtonIcon.icon,this.resetSelectDom(this.selectButtonIcon),this.resetPreviewIcon(this.selectButtonIcon)),we(this.popperEl.parent())}},{key:"createPreviewList",value:function(){var e=this;this.previewButtonsEl.innerHTML(""),this.data.forEach((function(t){e.createPreviewItem(t)}))}},{key:"createPreviewItem",value:function(e){e=s("i","".concat(e.icon)).css({display:"".concat(e.show?"block":"none"),color:"".concat(e.color)}),e=s("div").children(s("div","preview_item").children(e)),this.previewButtonsEl.children(e)}},{key:"createButtonList",value:function(){var e=this;this.buttonMainEl.innerHTML(""),this.data.forEach((function(t,n){e.createButtonItem(t,n)}))}},{key:"setBgStyle",value:function(){if(this.selectButtonIcon){for(var e=JSON.stringify(this.selectButtonIcon),t=0,n=0;n<this.data.length;n++){var r=this.data[n];if(e===JSON.stringify(r)){t=n;break}}this.selectIndex=t;var i=this.buttonMainEl.el.children;this.removeStyle(i),i[t].classList.add("active")}}},{key:"setIconContent",value:function(){var e=this.selectButtonIcon;e.showIcon?this.iconCheckbox.check():this.iconCheckbox.cancelCheck(),e.showText?this.textCheckbox.check():this.textCheckbox.cancelCheck(),this.iTriggerEl.css({fontSize:"16px",width:"20px"}),this.iTriggerEl.el.className=e.icon,this.inputEl.setValue(e.text),this.bColorPalette.picker.initColor(e.color),this.colorTriggerEl.css("backgroundColor",e.color)}},{key:"setCustomButtonConfig",value:function(e){this.reportSelectEl.setValue(e.reportId),this.eventSelectEl.setValue(e.eventType),H0(this.openWindowRadioEl.el,"isOpen",e.isOpen),this.customUrlInputEl.setValue(e.customUrl)}},{key:"customButtonConfig",value:function(e){e?(this.eventType.show(),this.reportSelect.show(),this.openWindowEl.show(),this.customUrlEl.show()):(this.eventType.hide(),this.reportSelect.hide(),this.openWindowEl.hide(),this.customUrlEl.hide())}},{key:"createButtonItem",value:function(e,t){var n=this,r=s("div").children(s("div","toolbar_button_item").children(s("i","".concat(e.icon)).css({color:"".concat(e.color)}),s("span").innerHTML(e.text)).css("marginBottom","3px")).css({display:e.show?"block":"none"});r.on("click",(function(){n.selectButtonIcon=e,n.selectIndex=t;var i=r.el.parentElement.children;n.removeStyle(i),r.el.classList.add("active"),n.configRightEl.innerHTML(""),8==e.type?(n.customButtonConfig(!0),n.setCustomButtonConfig(e),2==e.eventType?(n.customUrlEl.show(),n.reportSelect.hide()):(n.customUrlEl.hide(),n.reportSelect.show()),n.configRightEl.children(n.iconContentEl),n.setIconContent()):3==e.type?(n.configRightEl.innerHTML(""),n.emptyContentEl.innerHTML(""),n.emptyContentEl.innerHTML("没有配置项"),n.configRightEl.children(n.emptyEl)):(n.configRightEl.children(n.iconContentEl),n.setIconContent(),n.customButtonConfig(!1))})),this.buttonMainEl.children(r)}},{key:"removeStyle",value:function(e){for(var t=0;t<e.length;t++)e[t].classList.remove("active")}},{key:"createIconGroup",value:function(){var e=this;this.iconsEl.innerHTML(""),D.a.buttonIconsList.forEach((function(t){e.creeatIconGroupItem(t)}))}},{key:"resetPreviewIcon",value:function(e){var t=this.selectIndex;(t=this.previewButtonsEl.el.children[t])&&(t=ve()(t).find("i")[0],e.color&&(t.style.color=e.color),e.icon&&(t.className=e.icon))}},{key:"resetSelectDom",value:function(e){var t,n,r=this.selectIndex;(r=this.buttonMainEl.el.children[r])&&(t=ve()(r).find("span")[0],n=ve()(r).find("i")[0],e.color&&(n.style.color=e.color),e.text&&(t.innerHTML=e.text),e.icon&&(n.className=e.icon),"showIcon"in e&&(n.style.display=e.showIcon?"block":"none"),"showText"in e&&(t.style.display=e.showText?"block":"none"),this.selectButtonIcon.showIcon||this.selectButtonIcon.showText?ve()(r).show():(this.selectButtonIcon.show=!1,ve()(r).hide(),this.configRightEl.innerHTML(""),this.emptyContentEl.innerHTML(""),this.emptyContentEl.innerHTML("没有配置项"),this.configRightEl.children(this.emptyEl),this.selectIndex=null,this.selectButtonIcon=null))}},{key:"creeatIconGroupItem",value:function(e){var t=this,n=s("i","".concat(e)).css({width:"20px",height:"20px",cursor:"pointer"}).on("click",(function(){t.selectButtonIcon.icon=e,t.popperHide()}));this.iconsEl.children(n)}},{key:"on",value:function(e,t){return this.eventMap.set(e,t),this}},{key:"trigger",value:function(e){var t=this.eventMap;if(t.has(e)){for(var n=arguments.length,r=new Array(1<n?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];(t=t.get(e)).call.apply(t,[this].concat(r))}}}])&&J5(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function e6(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var t6=[{name:"柱状图",type:0},{name:"折线图",type:1},{name:"饼图",type:2}],n6={0:[{name:"基础柱状图",type:"1-1",src:"data:image/png;base64,[encoded data, 11404 characters]",option:{tooltip:{trigger:"item"},xAxis:{type:"category",data:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]},yAxis:{type:"value"},series:[{data:[120,200,150,80,70,110,130],type:"bar"}]}}],1:[{name:"基础折线图",type:"2-1",src:"data:image/png;base64,[encoded data, 28340 characters]",option:{tooltip:{trigger:"item"},xAxis:{type:"category",data:["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]},yAxis:{type:"value"},series:[{data:[150,230,224,218,135,147,260],type:"line"}]}}],2:[{name:"基础饼图",type:"3-1",src:"data:image/png;base64,[encoded data, 33652 characters]",option:{tooltip:{trigger:"item"},legend:{orient:"vertical",left:"left"},series:[{name:"Access From",type:"pie",radius:"50%",data:[{value:1048,name:"Search Engine"},{value:735,name:"Direct"},{value:580,name:"Email"},{value:484,name:"Union Ads"},{value:300,name:"Video Ads"}],emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}}}]}}]},r6=function(){function e(t){var n=this;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.$parent=t,this.selectIndex=null,this.selectItem={},this.listMainEl=s("div","list_main"),this.listRightMainEl=s("div","list_main"),this.groupList=[{name:"系统自动分组",value:"系统自动分组"}],this.selectChartList=[],this.groupSelectEl=new e2(this.groupList,"系统自动分组",{width:"214px",height:"32px"},!1),this.groupEl=s("div","".concat(pe,"-chart-dialog-select_group")).children(s("span").html("作用分组："),this.groupSelectEl.el),this.cancelButtonEl=s("button","ui-button").attr({type:"normal"}).on("click",(function(){n.hide(),n.selectIndex=null,n.selectItem={}})).innerHTML("取消").css({height:"32px","line-height":"1px","min-width":"60px"}),this.confirmButtonEl=s("button","ui-button").attr({type:"primary"}).on("click",(function(){n.confirmChart()})).innerHTML("确定").css({height:"32px","line-height":"1px","min-width":"60px","margin-left":"12px"}),this.buttonGroupEl=s("div","".concat(pe,"-button_group")).children(s("div","".concat(pe,"-button_group_main")).children(this.cancelButtonEl,this.confirmButtonEl)),this.contentEl=s("div").children(s("div","".concat(pe,"-chart_dialog")).children(s("div","left").children(this.listMainEl),s("div","right").children(this.groupEl,this.listRightMainEl,this.buttonGroupEl))),this.el=new Dialog({title:"插入图表",content:this.contentEl.el,buttons:[],width:"692px"}),this.el.element.title.classList.add("".concat(pe,"-dialog_title")),this.el.element.body.classList.add("".concat(pe,"-dialog_body_padding")),this.el.element.footer.style.display="none",this.hide(),this.groupSelectEl.setup()}var t,n;return t=e,(n=[{key:"hide",value:function(){this.el.hide()}},{key:"createChartTypeList",value:function(){var e=this;this.listMainEl.innerHTML(""),null==this.selectIndex&&(this.selectIndex=0),t6.forEach((function(t,n){e.createChartTypeItem(t,n)}))}},{key:"removeStyle",value:function(e){for(var t=0;t<e.length;t++)e[t].classList.remove("active")}},{key:"createChartTypeItem",value:function(e,t){var n=this,r="".concat(pe,0==t?"-list_item active":"-list_item"),i=s("div",r).innerHTML(e.name);i.on("click",(function(){n.selectIndex=t,n.removeStyle(n.listMainEl.el.children),i.el.classList.add("active"),n.createChartList()})),this.listMainEl.children(i)}},{key:"setGroupList",value:function(e){this.groupList=e;var t=0<this.groupList.length?this.groupList[0].value:"";this.groupSelectEl.resetOptions(e,t)}},{key:"createChartList",value:function(){var e=this,t=(this.listRightMainEl.innerHTML(""),n6[this.selectIndex]);t&&t.forEach((function(t){e.createChartItem(t)}))}},{key:"confirmChart",value:function(){this.hide(),this.selectIndex=null,this.selectItem.name&&(this.$parent.spreadSheet.sheet.createChart(this.selectItem,this.groupSelectEl.getValue(),!0),this.selectItem={})}},{key:"createChartItem",value:function(e){var t=this,n=this.selectItem.name==e.name?"".concat(pe,"-list_item active"):"".concat(pe,"-list_item");n=s("div",n).children(s("img").attr("src",e.src),s("div","title").innerHTML(e.name),s("div","model")).on("click",(function(){t.selectItem=e,t.createChartList()}));this.listRightMainEl.children(n)}},{key:"show",value:function(){var e=this.$parent.spreadSheet.sheet.data.groupConfig,t=[];e.forEach((function(e){t.push({name:e.label,value:e.label})})),this.setGroupList(t),this.createChartTypeList(),this.createChartList(),this.el.show()}}])&&e6(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),i6=n(306);function o6(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a6(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}var s6=function(e,t,n){return t&&o6(e.prototype,t),n&&o6(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(t){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1,r=this,i=e;if(!(r instanceof i))throw new TypeError("Cannot call a class as a function");this.old=t,this.new=t,this.expand=1,this.type=n}));function u6(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c6(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function l6(e){try{var t=e.toString().split(".")[1];t&&6<t.length&&(e=Number(e.toFixed(6)))}catch(e){}return e}a6(s6,"ROW_EXPAND",1),a6(s6,"COL_EXPAND",2);var h6=function(e,t,n){return t&&u6(e.prototype,t),n&&u6(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function")}));function f6(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d6(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}c6(h6,"sum",(function(e){return e.map((function(e){return l6(Qw.a.sum(e))}))})),c6(h6,"count",(function(e){return e.map((function(e){var t=0;return e.forEach((function(e){null==e&&""==e||(t+=1)})),t}))})),c6(h6,"min",(function(e){return e.map((function(e){return Qw.a.min(e)}))})),c6(h6,"max",(function(e){return e.map((function(e){return Qw.a.max(e)}))})),c6(h6,"mean",(function(e){return e.map((function(e){return l6(Qw.a.mean(e))}))})),c6(h6,"dcount",(function(e){return e=e.map((function(e){return Qw.a.uniq(e)})),h6.count(e)})),c6(h6,"head",(function(e){return[e[0][0]]})),c6(h6,"tail",(function(e){return[e[0][e[0].length-1]]}));var p6=function(e,t,n){return t&&f6(e.prototype,t),n&&f6(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.start=0,this.end=0,this.text="",this.row=0,this.col=0,this.type=0,this.direction=e.F_DIRECT_AUTO,this.n_value=null,this.values=null}));function m6(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function g6(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function A6(e){return!!/^[\u4E00-\u9FA5]+/.test(e)}function v6(e){return e===b6.POSITION_TYPE_BACK||e===b6.POSITION_TYPE_SELF||e===b6.POSITION_TYPE_NO_OFFSET}d6(p6,"F_TYPE_N",0),d6(p6,"F_TYPE_SUM",1),d6(p6,"F_TYPE_COUNT",2),d6(p6,"F_TYPE_MIN",3),d6(p6,"F_TYPE_MAX",4),d6(p6,"F_TYPE_AVG",5),d6(p6,"F_TYPE_HEAD",6),d6(p6,"F_TYPE_TAIL",7),d6(p6,"F_TYPE_DCOUNT",8),d6(p6,"F_DIRECT_AUTO",0),d6(p6,"F_DIRECT_X",1),d6(p6,"F_DIRECT_Y",2),d6(p6,"F_DIRECT_XY",3),d6(p6,"AU",(d6(Ro={},p6.F_TYPE_SUM,h6.sum),d6(Ro,p6.F_TYPE_COUNT,h6.count),d6(Ro,p6.F_TYPE_DCOUNT,h6.dcount),d6(Ro,p6.F_TYPE_MIN,h6.min),d6(Ro,p6.F_TYPE_MAX,h6.max),d6(Ro,p6.F_TYPE_AVG,h6.mean),d6(Ro,p6.F_TYPE_HEAD,h6.head),d6(Ro,p6.F_TYPE_TAIL,h6.tail),Ro)),d6(p6,"formulaList",{".sum(":p6.F_TYPE_SUM,".count(":p6.F_TYPE_COUNT,".dcount(":p6.F_TYPE_DCOUNT,".min(":p6.F_TYPE_MIN,".max(":p6.F_TYPE_MAX,".head(":p6.F_TYPE_HEAD,".tail(":p6.F_TYPE_TAIL,".avg(":p6.F_TYPE_AVG});var b6=function(e,t,n){return t&&m6(e.prototype,t),n&&m6(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.g_index=null,this.type=1,this.x=null,this.y=null,this.start=null,this.end=null,this.resultCell=null,this.values=null,this.direction=0,this.filter=null,this.index=0,this.str=null})),y6=(g6(b6,"POSITION_TYPE_UP",1),g6(b6,"POSITION_TYPE_DOWN",2),g6(b6,"POSITION_TYPE_BACK",3),g6(b6,"POSITION_TYPE_SELF",4),g6(b6,"POSITION_TYPE_NO_OFFSET",5),g6(b6,"POSITION_TYPE_N",0),g6(b6,"F_DIRECT_AUTO",0),g6(b6,"F_DIRECT_X",1),g6(b6,"F_DIRECT_Y",2),g6(b6,"F_DIRECT_XY",3),{same:function(e,t){for(var n=[],r=0,i=0,o=e.length,a=t.length;r<o&&i<a;)e[r]<t[i]?r+=1:(e[r]==t[i]&&(n.push(e[r]),r+=1),i+=1);return n},eq:function(e){return Array.from(new Set(e))},takeIndex:function(e,t){return e.map((function(e){return t[e]}))},findIndex:function(e,t){for(var n=0;n<e.length;n++)if(e[n]==t)return n;return-1},uniq:function(e){return Array.from(new Set(e))}});function w6(e,t){var n,r,i,o,a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(a)return r=!(n=!0),{s:function(){a=a.call(e)},n:function(){var e=a.next();return n=e.done,e},e:function(e){r=!0,i=e},f:function(){try{n||null==a.return||a.return()}finally{if(r)throw i}}};if(Array.isArray(e)||(a=function(e,t){var n;if(e)return"string"==typeof e?x6(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x6(e,t):void 0}(e))||t&&e&&"number"==typeof e.length)return a&&(e=a),o=0,{s:t=function(){},n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function x6(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function C6(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function k6(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}function E6(e){var t=(n=e.split(":"))[0],n=n[1],r=b6.POSITION_TYPE_N;return n?(r=n.includes("!-")?b6.POSITION_TYPE_BACK:n.includes("+")?b6.POSITION_TYPE_DOWN:n.includes("-")?b6.POSITION_TYPE_UP:b6.POSITION_TYPE_SELF,n=(n=n.match(D6))&&n[0]):t&&(r=b6.POSITION_TYPE_NO_OFFSET),{str:e,cell:t=t.trim(),type:r,position:n}}var S6=/[\&|\$]?[a-zA-Z]+[0-9]+/g,_6=/[\$]+[a-zA-Z]+[0-9]+/g,O6=/[a-zA-Z]+[0-9]+/g,T6=/\[(.+?)\](\{(.+?)\})?/g,D6=/[0-9]+/g,B6=/[^>(<=)=(>=)<(!=)]+/g,I6=/[>(<=)=(>=)<(!=)]+/g,M6=/[^(&&)(||)]+/g,j6={"=":1,"!=":2,">":3,">=":4,"<":5,"<=":6},N6={"&&":1,"||":2},F6=function(){function e(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null,n=2<arguments.length&&void 0!==arguments[2]&&arguments[2],r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:[],i=this,o=e;if(!(i instanceof o))throw new TypeError("Cannot call a class as a function");this.rowspan=1,this.colspan=1,this.row=1,this.col=1,this.value=null,this.type=e.E_CELL,this.count=null,this.expansion=e.EXPAND_NONE,this.axis_type=2,this.aggregate=null,this.order=null,this.in_group=!1,this.merge=!1,this.agg_f=!1,this.penetrate=!1,this.collapsible=!1,this.all_count=0,this.column_name=null,this.group_index=0,this.expand_count=0,this.kvmap=null,t&&(i=t.DataConfig,this.rowspan=this.gen_rowspan(t),this.colspan=this.gen_colspan(t),this.row=t.Row,this.col=t.Column,this.cell_info=t,this.cell_info.RowSpan=this.rowspan,this.cell_info.ColumnSpan=this.colspan,this.cell_info.o_r=this.row,this.cell_info.o_c=this.col,this.penetrate=!0,"collapsible"in t&&t.collapsible&&(this.collapsible=!0),"Value"in t&&(this.value=t.Value),this.type=e.N_CELL,i&&"value"in i?(this.type=e.D_CELL,this.config=i,this.value=i.DataColumn,this.expansion=e.EXPAND_DOWN,"AxisType"in i&&(this.axis_type=i.AxisType),n&&0<r.length&&!ec(r)&&(null==(o=i.value)||o.includes(".")||(n=r[0].name,i.value="".concat(n,".").concat(o))),this.column_name=i.value,1==this.axis_type&&("Merge"in i&&1==i.Merge||1<this.rowspan||1<this.colspan)&&(this.merge=!0),"Aggregate"in i&&(this.aggregate=i.Aggregate,this.aggregate<=0&&(this.aggregate=null)),"Order"in i&&(r=i.Order,this.order=r<=0?null:1==r)):"Value"in t&&String(t.Value).startsWith("=")?(n=String(t.Value),0<(o=P6(n)).length&&(this.agg_f=!0,this.type=e.F_CELL,this.f_cells=o,this.expansion=e.EXPAND_NONE)):"ValueType"in t&&10==t.ValueType?this.type=e.D_CELL:(!1 in t||!t.Value)&&!1 in t&&(this.type=e.E_CELL),"Expansion"in t&&(0<=(i=Number(t.Expansion))&&i<=3&&(this.expansion=i),t.expansion=t.Expansion,delete t.Expansion))}var t,n;return t=e,(n=[{key:"gen_rowspan",value:function(e){var t=1;return"RowSpan"in e&&0<e.RowSpan?e.RowSpan:t}},{key:"gen_colspan",value:function(e){var t=1;return"ColumnSpan"in e&&0<e.ColumnSpan?e.ColumnSpan:t}}])&&C6(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),R6=(k6(F6,"N_CELL",0),k6(F6,"D_CELL",1),k6(F6,"F_CELL",2),k6(F6,"E_CELL",-1),k6(F6,"EXPAND_NONE",0),k6(F6,"EXPAND_DOWN",1),k6(F6,"EXPAND_RIGHT",2),k6(F6,"EXPAND_BOTH",3),function(e,t){var n=new b6;n.start=e.index,n.end=e.index+e[0].length,n.resultCell=e[0],n.str=e[0],n.resultCell.includes("$")?(n.type=5,n.resultCell=n.resultCell.match(O6)[0]):n.resultCell.includes("&")?(n.type=4,n.resultCell=n.resultCell.match(O6)[0]):n.type=6,t.push(n)}),P6=function(e){var t=e,n=[],r=T6;if(!(e=t.matchAll(S6)))return null;var i,o=[],a=w6(e);try{for(a.s();!(i=a.n()).done;){var s,u=i.value,c=!1;if(s=t.matchAll(r)){var l,h=w6(s);try{for(h.s();!(l=h.n()).done;){var f,d,p,m,g,A,v,b,y,w=l.value,x=u[0];x&&(f=x.length,u.index+f==w.index&&(d=w[0],p=w[1],c=!0,m=w[1],"!0"===p?((g={}).resultCell=x,g.start=u.index,g.end=u.index+d.length+f,g.type=3,g.str=x+d,w[3]&&(g.filter=function(e){var t,n=[],r=w6(e.matchAll(M6));try{for(r.s();!(t=r.n()).done;){var i=t.value,o=i[0],a=i.index+o.length,s=e.substring(a,a+2),u=N6[s]||1,c=o.match(B6),l=c[0].trim(),h=c[1].trim(),f=j6[o.substring(c[0].length,c[0].length+2).match(I6)[0]]||1;n.push({logic:u,left:l,right:h,type:f})}}catch(e){r.e(e)}finally{r.f()}return n}(w[3])),n.push(g)):m&&(A={},v=null,m.includes(",")?(v=m.split(","),A.type=2):(A.type=1,v=m.split(";")),b=v[0],y=v[1],b&&(A.x=E6(b)),y&&(A.y=E6(y)),A.resultCell=x,A.start=u.index,A.end=u.index+d.length+f,A.str=x+d,n.push(A))))}}catch(e){h.e(e)}finally{h.f()}}c||o.push(u)}}catch(e){a.e(e)}finally{a.f()}return function(e,t){var n,r=[],i=w6(t);try{for(i.s();!(n=i.n()).done;){var o=n.value,a=!1;if(0<e.length){var s,u=w6(e);try{for(u.s();!(s=u.n()).done;){var c=s.value;if(c.start<=o.index&&o.index<=c.end){a=!0;break}}}catch(e){u.e(e)}finally{u.f()}}a||R6(o,r)}}catch(e){i.e(e)}finally{i.f()}return e=e.concat(r),L6(e)}(n,o)},L6=function(e){return(e=e.map((function(e){return e.resultCell=e.resultCell.toUpperCase(),e}))).sort((function(e,t){return e.start-t.start}))};function U6(e,t){var n,r,i,o,a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(a)return r=!(n=!0),{s:function(){a=a.call(e)},n:function(){var e=a.next();return n=e.done,e},e:function(e){r=!0,i=e},f:function(){try{n||null==a.return||a.return()}finally{if(r)throw i}}};if(Array.isArray(e)||(a=function(e,t){var n;if(e)return"string"==typeof e?z6(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?z6(e,t):void 0}(e))||t&&e&&"number"==typeof e.length)return a&&(e=a),o=0,{s:t=function(){},n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function z6(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function H6(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function $6(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}var Q6=function(){function e(t,n){var r=!(2<arguments.length&&void 0!==arguments[2])||arguments[2],i=3<arguments.length?arguments[3]:void 0,o=4<arguments.length?arguments[4]:void 0,a=this,s=e;if(!(a instanceof s))throw new TypeError("Cannot call a class as a function");if(this.s_c=t.sci,this.s_r=t.sri,this.e_c=t.eci,this.e_r=t.eri,this.width=this.e_c-this.s_c+1,this.height=this.e_r-this.s_r+1,this.indexs=[],this.columns=[],this.values=[],this.cells=[],this.child=null,this.uid=(a=Date.now(),Math.floor(100*Math.random())+String(a)),this.expand_cells=[],this.merge_config=[],this.all_cells=n,this.type=0,this.filter=null,this.isEmpty=!1,this.no_agg=!1,this.pCells=i,this.parent=o,this.dataIndexsMap={},this.dataColumnsMap={},this.dataValuesMap={},this.pivotData=[],this.pivot_cells_map={},this.table_id=null,"filter"in t&&(this.filter=t.filter),"MergeConfig"in t&&(this.merge_config=t.MergeConfig),"no_agg"in t&&(this.no_agg=t.no_agg),"repeat"in t&&t.repeat.isRepeat&&(this.type=1,this.repeatInfo=t.repeat),1==this.type)for(var u=0;u<this.height;u++){var c=[];this.cells.push(c);for(var l=0;l<this.width;l++){var h=n[u+this.s_r][l+this.s_c];c.push(h)}}else{if(this.pCells||(this.pCells=this.cells),"children"in t){var f,d=U6(t.children);try{for(d.s();!(f=d.n()).done;){var p=new e(f.value,n,!1,this.pCells,this);p.no_dimension?p.child&&(this.child=p.child):this.child=p;break}}catch(t){d.e(t)}finally{d.f()}}for(var m=this.top=null,g=0;g<this.height;g++){for(var A=!1,v=null,b=0;b<this.width;b++){var y=n[g+this.s_r][b+this.s_c];if(y){if(y.in_group||y.type==F6.D_CELL&&(1!=y.axis_type||y.expansion!=F6.EXPAND_RIGHT)){this.top=g,v=b;break}(y.type==F6.D_CELL||y.type==F6.F_CELL&&y.agg_f)&&(A=!0)}}if(null!=this.top)break;m=A?null:m||v}if(null==this.top&&(this.top=m),null==this.top&&(this.top=this.height),this.top==this.height)this.bottom=0;else{m=this.bottom=null;for(var w=0;w<this.height;w++){for(var x=!1,C=null,k=0;k<this.width;k++){var E=n[this.height-w-1+this.s_r][k+this.s_c];if(E){if(E.in_group||E.type==F6.D_CELL&&(1!=E.axis_type||E.expansion!=F6.EXPAND_RIGHT)){this.bottom=w-E.rowspan+1,C=E;break}(E.type==F6.D_CELL||E.type==F6.F_CELL&&E.agg_f)&&(x=!0)}}if(null!=this.bottom)break;m=x?null:m||(C?w-C.rowspan+1:w)}null==this.bottom&&(this.bottom=m),null==this.bottom&&(this.bottom=this.height)}m=this.left=null;for(var S=0;S<this.width;S++){for(var _=!1,O=0;O<this.height;O++){var T=n[O+this.s_r][S+this.s_c];if(T){if(T.in_group||T.type==F6.D_CELL&&(1!=T.axis_type||T.expansion!=F6.EXPAND_DOWN)){this.left=S;break}(T.type==F6.D_CELL||T.type==F6.F_CELL&&T.agg_f)&&(_=!0)}}if(null!=this.left)break;m=_?null:m||S}if(null==this.left&&(this.left=m),null==this.left&&(this.left=this.width),this.left==this.width)this.right=0;else{m=this.right=null;for(var D=0;D<this.width;D++){for(var B=!1,I=null,M=m=0;M<this.height;M++){var j=n[M+this.s_r][this.width-D-1+this.s_c];if(j){if(j.in_group||j.type==F6.F_CELL&&!j.agg_f||j.type==F6.D_CELL){this.right=D-j.colspan+1,I=j;break}(j.type==F6.D_CELL||j.type==F6.F_CELL&&j.agg_f)&&(B=!0)}}if(null!=this.right)break;m=B?null:m||(I?D-I.colspan+1:D)}null==this.right&&(this.right=m),null==this.right&&(this.right=this.width)}for(var N=0;N<this.height;N++){var F=[];this.cells.push(F);for(var R=0;R<this.width;R++){var P=n[N+this.s_r][R+this.s_c];if(F.push(P),P&&!P.in_group&&P.type==F6.D_CELL)try{this.table_id||(this.table_id=P.config.TableID),(P.expansion==F6.EXPAND_DOWN&&1==P.axis_type?R<this.left?this.indexs:(P.axis_type=2,this.values):P.expansion==F6.EXPAND_RIGHT&&1==P.axis_type?N<this.top?this.columns:(P.axis_type=2,this.values):this.values).push(P)}catch(t){}}}if(this.indexs.length+this.columns.length==0?this.no_dimension=!0:this.no_dimension=!1,r||!this.no_dimension)for(var L=0;L<this.height;L++)for(var U=0;U<this.width;U++){var z=n[L+this.s_r][U+this.s_c];z&&(z.in_group=!0)}this.expand_width=this.width,this.expand_height=this.height,this.total_top=this.top,this.total_left=this.left,this.total_right=this.right,this.total_bottom=this.bottom,this.child&&(this.total_top=this.total_top+this.child.total_top,this.total_left=this.total_left+this.child.total_left,this.total_right=this.total_right+this.child.total_right,this.total_bottom=this.total_bottom+this.child.total_bottom,this.value_order=null),r&&(this.value_order=this.get_value_order())}}var t,n;return t=e,(n=[{key:"include",value:function(){return row>=this.s_r&&row<=this.e_r&&col>=this.s_c&&col<=this.e_c}},{key:"get_value_order",value:function(){for(var e=this.width-this.total_right-this.total_left,t=this.height-this.total_bottom-this.total_top,n=null,r=null,i=0;i<t;i++)for(var o=0;o<e;o++){var a=this.cells[i+this.total_top];if(a&&(a=a[o+this.total_left])&&a.type==F6.D_CELL&&null!=a.order){n=a.order,r=a;break}}return[n,r]}}])&&H6(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function V6(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}$6(Q6,"G_TYPE_EXPAND",0),$6(Q6,"G_TYPE_REPEAT",1);var q6=function(e,t,n){return t&&V6(e.prototype,t),n&&V6(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:1,o=4<arguments.length&&void 0!==arguments[4]?arguments[4]:null,a=this,s=e;if(!(a instanceof s))throw new TypeError("Cannot call a class as a function");this.value=t,this.name=n,this.count=i,this.index=r,this.expand=0,this.initial=!0,a={},(this.expand_map=null)!=this.name&&(a[this.name]=this.value),this.kvmap=Wu(o,a)}));function G6(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function W6(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function K6(e,t,n){t&&W6(e.prototype,t),n&&W6(e,n),Object.defineProperty(e,"prototype",{writable:!1})}function Y6(e){try{return!e.startsWith("$$",0)}catch(e){return 1}}function X6(e,t){for(var n={},r=0;r<t.length;r++){var i=t[r];i in e&&(n[i]={asce:e[i],index:r})}return n}function J6(e,t,n,r,i){-1!=e.indexOf(n)&&(t.push(r),i.push(n))}function Z6(e,t,n,r,i,o){var a,s;a=t,s=[],r.forEach((function(e){void 0!==a[e]&&s.push(a[e])})),function e(t,n,r,i,o,a){var s;r>n.length-1||(null==t[s=n[r]]&&(t[s]=new t8,t.setIndex(i),t.setPath(a[r])),t[s].setData(o),t[s].setRows(i),null!=t.$$orderRows$$[s]?t.$$orderRows$$[s].push(i):t.$$orderRows$$[s]=[i],t.addOrder(s),t.$$orderData$$.push(s),e(t[s],n,r+=1,i,o,a))}(e,s,0,n,i,o)}function e8(e,t){if(e instanceof t8){var n,r,i=e.getPath();for(r in i in t&&(i=t[i].asce,o=e.$$orderData$$,a=e,function(e,t){e.sort((function(e,n){return A6(e)&&A6(n)?t?e.localeCompare(n,"zh-CN"):n.localeCompare(e,"zh-CN"):n<e?t?1:-1:e<n?t?-1:1:0}))}(o,i),a.setOrder(o),a.setOrderData(o),i=e.ordertoArray(),n=[],i.forEach((function(t,r){t=e.$$orderRows$$[t],n=n.concat(t)})),e.$$rows$$=new Set(n)),e)e8(e[r],t)}var o,a}var t8=function(){function e(){G6(this,e),this.$$rows$$=new Set,this.$$order$$=new Set,this.$$data$$=null,this.$$path$$=void 0,this.$$index$$=null,this.$$orderData$$=[],this.$$orderRows$$={}}return K6(e,[{key:"findDfoDataRows",value:function(e,t){var n,r=[];for(n in e){var i=e[n];-1!==Qw.a.indexOf(t,n)&&r.push(i)}return this.getDataRows(this,r)}},{key:"getDataRows",value:function(t,n){for(var r=0;r<n.length;r++){var i=n[r];if(!t)break;t=t[i]}return t instanceof e?Array.from(t.getRows()):[]}},{key:"setIndex",value:function(e){this.$$index$$=e}},{key:"getIndex",value:function(){return this.$$index$$}},{key:"setPath",value:function(e){this.$$path$$=e}},{key:"setOrderData",value:function(e){this.$$orderData$$=e}},{key:"getPath",value:function(){return this.$$path$$}},{key:"setData",value:function(e){this.$$data$$=e}},{key:"getData",value:function(){return this.$$data$$}},{key:"setRows",value:function(e){this.$$rows$$.add(e)}},{key:"getRows",value:function(){return Array.from(this.$$rows$$)}},{key:"setOrder",value:function(e){this.$$order$$=new Set(e)}},{key:"addOrder",value:function(e){this.$$order$$.add(e)}},{key:"sort",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:function(e,t){return 0};this.ordertoArray().sort(e)}},{key:"ordertoArray",value:function(){return Array.from(this.$$order$$)}}]),e}(),n8=function(){function e(t,n,r,i,o,a){G6(this,e),this.$$indexs$$=t,this.$$indexField$$=i,this.$$columnsField$$=o,this.$$columns$$=n,this.$$data$$=r,(this.$$grpColumns$$=a)&&(t=this.getValuesIndex(a,i,o),this.$$valuesIndex$$=t.values,this.$$valuesField$$=t.vfield,this.$$fieldIndex$$=t.vIndexs,this.$$indexsIndex$$=t.indexs,this.$$columnsIndex$$=t.columns)}return K6(e,[{key:"getIndex",value:function(){return this.$$indexs$$}},{key:"eachIndexs",value:function(e){var t,n=this.getIndex();for(t in n)Y6(t)&&e(n[t])}},{key:"getColumn",value:function(){return this.$$columns$$}},{key:"eachColumns",value:function(e){var t,n=this.getColumn();for(t in n)Y6(t)&&e(n[t])}},{key:"getKeys",value:function(){return Object.keys(this).filter((function(e){if(Y6(e))return e}))}},{key:"getValuesIndex",value:function(e,t,n){var r,i,o,a,s;if(t&&t)return r={},i={},o={},a=[],s=[],e.forEach((function(e,u){t.includes(e)&&(i[u]=e),n.includes(e)&&(o[u]=e),t.includes(e)||n.includes(e)||(r[u]=e,s.push(e),a.push(u))})),{values:r,vIndexs:a,indexs:i,columns:o,vfield:s}}},{key:"icRows",value:function(e,t,n){function r(r){var i,o=[];for(i in e[r].forEach((function(e){o=o.concat(e.getRows())})),o=Qw.a.uniq(o),t)!function(e){var r=[];t[e].forEach((function(e){r=r.concat(e.getRows())})),r=Qw.a.uniq(r),n=n.concat(y6.same(o,r))}(i)}for(var i in e)r(i);return n}},{key:"iRows",value:function(e,t){for(var n in e)!function(n){var r=[];e[n].forEach((function(e){r=r.concat(e.getRows())})),t=t.concat(Qw.a.uniq(r))}(n);return t}},{key:"cRows",value:function(e,t){for(var n in e)!function(n){var r=[];e[n].forEach((function(e){r=r.concat(e.getRows())})),t=t.concat(Qw.a.uniq(r))}(n);return t}},{key:"getDataRows",value:function(e,t){for(var n=0;n<t.length;n++){var r=t[n];if(!e)break;e=e[r]}return e instanceof t8?e.getRows():[]}},{key:"completPath",value:function(e,t,n){var r=this;e.ordertoArray&&e.ordertoArray().forEach((function(i){r.completPath(e[i],t,n),Qw.a.indexOf(t,i)===t.length-1&&(n[i]?n[i].push(e[i]):n[i]=[e[i]])}))}},{key:"createRows",value:function(e,t){return e=Array.from(e),t=Array.from(t),y6.same(e,t)}},{key:"findDfoDataRows",value:function(e){var t,n=[],r=[];for(t in e){var i=e[t];-1!==Qw.a.indexOf(this.$$indexField$$,t)?n.push(i):-1!==Qw.a.indexOf(this.$$columnsField$$,t)&&r.push(i)}var o=this.getDataRows(this.$$indexs$$,n),a=this.getDataRows(this.$$columns$$,r);return this.createRows(o,a)}},{key:"findRowsData",value:function(e){return e=this.findDfoDataRows(e),y6.takeIndex(e,this.$$data$$)}},{key:"findDfoDataValue",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:1,n=1===t?this.$$fieldIndex$$:2===t?this.$$indexsIndex$$:this.$$columnsIndex$$;return this.findRowsData(e).map((function(e,t){return e.filter((function(e,t){if(n.includes(t))return e}))}))}}]),e}();function r8(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i8=function(e,t,n){return t&&r8(e.prototype,t),n&&r8(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.sizes=[],this.frames=[],this.sub_maps=[]}));function o8(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a8(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}var s8=function(e,t,n){return t&&o8(e.prototype,t),n&&o8(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function")}));function u8(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c8(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}a8(s8,"sum",1),a8(s8,"count",2),a8(s8,"min",3),a8(s8,"max",4),a8(s8,"mean",5),a8(s8,"dcount",6);Fa=s8.sum,Ha=s8.count,Po=s8.min,Qa=s8.max,Ae=s8.mean,sa=s8.dcount;var l8=function(e,t,n){return t&&u8(e.prototype,t),n&&u8(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function")})),h8=(c8(l8,Fa,(function(e,t){return t?l8.customCellAgg(e,t,h6.sum):h6.sum(e?[e.$data]:[[]])})),c8(l8,Ha,(function(e,t){return t?l8.customCellAgg(e,t,h6.count):h6.count(e?[e.$data]:[[]])})),c8(l8,Po,(function(e,t){return t?l8.customCellAgg(e,t,h6.min):h6.min(e?[e.$data]:[[]])})),c8(l8,Qa,(function(e,t){return t?l8.customCellAgg(e,t,h6.max):h6.max(e?[e.$data]:[[]])})),c8(l8,Ae,(function(e,t){return t?l8.customCellAgg(e,t,h6.mean):h6.mean(e?[e.$data]:[[]])})),c8(l8,sa,(function(e,t){return t?l8.customCellAgg(e,t,h6.dcount):h6.dcount(e?[e.$data]:[[]])})),c8(l8,"customCellAgg",(function(e,t,n){var r,i=e.colDict,o=[];for(r in i){var a=i[r];o.push(n([a[t]]))}return o})),c8(l8,"agg",(function(e,t){var n,r=e.keyCol,i=e.keyToValue;i=h8(i);if(r.length<1)return new qs(e.data,{columns:e.columnName});for(n in t){var o=t[n],a=l8[s8[o]](e,n);r.push(n+"_"+o),f8(i,a)}return new qs(i,{columns:r})})),c8(l8,"seriesAgg",(function(e,t){return l8[s8[t]](e)})),function(e){var t,n=[];for(t in e){var r=e[t];n.push(r)}return n}),f8=function(e,t){for(var n=0;n<e.length;n++){var r=e[n],i=t[n];r.push(i[0])}};function d8(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function p8(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}var m8=function(e,t,n){return t&&d8(e.prototype,t),n&&d8(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}((function e(){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function")}));function g8(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */g8=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=(d="function"==typeof Symbol?Symbol:{}).iterator||"@@iterator",i=d.asyncIterator||"@@asyncIterator",o=d.toStringTag||"@@toStringTag";function a(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{a({},"")}catch(t){a=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var i,o,a,s;t=t&&t.prototype instanceof l?t:l,t=Object.create(t.prototype),r=new y(r||[]);return t._invoke=(i=e,o=n,a=r,s="suspendedStart",function(e,t){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===e)throw t;return{value:void 0,done:!0}}for(a.method=e,a.arg=t;;){var n=a.delegate;if(n&&(n=function e(t,n){var r=t.iterator[n.method];if(void 0===r){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=void 0,e(t,n),"throw"===n.method))return c;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}return"throw"===(r=u(r,t.iterator,n.arg)).type?(n.method="throw",n.arg=r.arg,n.delegate=null,c):(r=r.arg)?r.done?(n[t.resultName]=r.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,c):r:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,c)}(n,a))){if(n===c)continue;return n}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===s)throw s="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);if(s="executing","normal"===(n=u(i,o,a)).type){if(s=a.done?"completed":"suspendedYield",n.arg===c)continue;return{value:n.arg,done:a.done}}"throw"===n.type&&(s="completed",a.method="throw",a.arg=n.arg)}}),t}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var c={};function l(){}function h(){}function f(){}var d,p,m=((p=(p=(a(d={},r,(function(){return this})),Object.getPrototypeOf))&&p(p(w([]))))&&p!==t&&n.call(p,r)&&(d=p),f.prototype=l.prototype=Object.create(d));function g(e){["next","throw","return"].forEach((function(t){a(e,t,(function(e){return this._invoke(t,e)}))}))}function A(e,t){var r;this._invoke=function(i,o){function a(){return new t((function(r,a){!function r(i,o,a,s){var c;if("throw"!==(i=u(e[i],e,o)).type)return(o=(c=i.arg).value)&&"object"==v8(o)&&n.call(o,"__await")?t.resolve(o.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(o).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,s)}));s(i.arg)}(i,o,r,a)}))}return r=r?r.then(a,a):a()}}function v(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function b(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function y(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(v,this),this.reset(!0)}function w(e){if(e){var t,i=e[r];if(i)return i.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return t=-1,(i=function r(){for(;++t<e.length;)if(n.call(e,t))return r.value=e[t],r.done=!1,r;return r.value=void 0,r.done=!0,r}).next=i}return{next:x}}function x(){return{value:void 0,done:!0}}return a(m,"constructor",h.prototype=f),a(f,"constructor",h),h.displayName=a(f,o,"GeneratorFunction"),e.isGeneratorFunction=function(e){return!!(e="function"==typeof e&&e.constructor)&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,a(e,o,"GeneratorFunction")),e.prototype=Object.create(m),e},e.awrap=function(e){return{__await:e}},g(A.prototype),a(A.prototype,i,(function(){return this})),e.AsyncIterator=A,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new A(s(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},g(m),a(m,o,"Generator"),a(m,r,(function(){return this})),a(m,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t,n=[];for(t in e)n.push(t);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=w,y.prototype={constructor:y,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(b),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;0<=i;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;0<=r;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}var a=(o=o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc?null:o)?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),c},finish:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),b(n),c}},catch:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var n,r,i=this.tryEntries[t];if(i.tryLoc===e)return"throw"===(n=i.completion).type&&(r=n.arg,b(i)),r}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:w(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},e}function A8(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function v8(e){return(v8="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function b8(e,t){var n,r=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)),r}function y8(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b8(Object(n),!0).forEach((function(t){x8(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b8(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function w8(e){return function(e){if(Array.isArray(e))return S8(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||E8(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function x8(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function C8(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(e,t)||E8(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k8(e,t){var n,r,i,o,a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(a)return r=!(n=!0),{s:function(){a=a.call(e)},n:function(){var e=a.next();return n=e.done,e},e:function(e){r=!0,i=e},f:function(){try{n||null==a.return||a.return()}finally{if(r)throw i}}};if(Array.isArray(e)||(a=E8(e))||t&&e&&"number"==typeof e.length)return a&&(e=a),o=0,{s:t=function(){},n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function E8(e,t){var n;if(e)return"string"==typeof e?S8(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?S8(e,t):void 0}function S8(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _8(e,t,n,r){for(var i=[],o=[],a=e.length,s=0;s<a;s++){for(var u=e[s],c=u.getPath(),l=0,h=u.ordertoArray(),f=t?t[s].kvmap:null,d=0;d<h.length;d++){var p=h[d],m=u[p],g=(l+=1,function(e,t){var n,r=null;for(n in t)if(t[n].includes(e)){r=n;break}return r}(c,r));o.push(new q6(p,c,d,1,f,g)),i.push(m)}t&&(t[s].count=l)}return[i,o]}function O8(e,t){var n,r={};for(n in e)for(var i in t)if(t[i].includes(n)){r[i.trim()]=e[n];break}return r}function T8(e,t,n,r,i){for(var o=5<arguments.length&&void 0!==arguments[5]?arguments[5]:null,a=!(6<arguments.length&&void 0!==arguments[6])||arguments[6],s=7<arguments.length&&void 0!==arguments[7]?arguments[7]:null,u=8<arguments.length?arguments[8]:void 0,c=9<arguments.length?arguments[9]:void 0,l=10<arguments.length?arguments[10]:void 0,h=11<arguments.length?arguments[11]:void 0,f="",d=0,p=0,m=(p=0==i?(f="Row",d=e.s_r+e.total_top,e.e_r-e.bottom):(f="Column",d=e.s_c+e.total_left,e.e_c-e.right),[]),g=r.cell_info,A=0;A<n.length;A++){var v,b,y,w=n[A],x=(_=C8(D8([w],e,i),4))[0],C=_[1],k=_[2],E=_[3],S=h7(g),_=(S.Axis=i,Wu(o,w.kvmap));if(r.collapsible&&(v=O8(_,u),S.CollapseKey=JSON.stringify(v)),r.penetrate){var O,T=O8(_,u);for(O in S.PenetrateDict=T){var D=T[O];e.pivot_cells_map[O]?e.pivot_cells_map[O][D]?e.pivot_cells_map[O][D].push(S):e.pivot_cells_map[O][D]=[S]:e.pivot_cells_map[O]=x8({},D,[S])}}if(a?(S.Value=v7(w.value),S&&(S.Warn||S.warn)&&(v=w.name,b=l,_=y=null,h.$$columnsField$$.includes(v)?_=h.$$columns$$:h.$$indexField$$.includes(v)&&(_=h.$$indexs$$),_&&(y=x7(_,v))&&y[w.value]&&function(){y=y[w.value];var e=[],t=Array.from(y.$$rows$$);h.$$data$$.forEach((function(n,r){t.includes(r)&&e.push(n)})),b=e}(),J8(S,b,c,e.all_cells))):null!=s&&(S.Value=v7(s[A]),J8(S,l,c,e.all_cells)),r.merge)S[f+"Span"]=S[f+"Span"]+x,S[f]=S[f]+t,m.push(S),t=t+x+k;else{var B=S[f]+S[f+"Span"]-1;if(S[f]<d){for(var I=d-S[f],M=0;M<I;M++){var j=h7(S);j[f]=j[f]+t-M,j[f+"Span"]=1,m.push(j)}S[f]=d,S[f+"Span"]=S[f+"Span"]-(d-S[f])}S[f+"Span"]>E&&(S[f+"Span"]=E);var N,F=k8(C);try{for(F.s();!(N=F.n()).done;){var R,P,L=N.value;-1==L?((R=h7(S))[f]=R[f]+t,t+=E,m.push(R)):(L<=B&&((P=h7(S))[f]=P[f]+t,m.push(P)),t+=1)}}catch(e){F.e(e)}finally{F.f()}}}if(!r.merge){var U=h7(g);if(r.penetrate){var z,H=O8(Wu(o,{}),u);for(z in U.PenetrateDict=H){var $=H[z];e.pivot_cells_map[z]?e.pivot_cells_map[z][$]?e.pivot_cells_map[z][$].push(U):e.pivot_cells_map[z][$]=[U]:e.pivot_cells_map[z]=x8({},$,[U])}}var Q=U[f]+U[f+"Span"]-1;if(p<Q)for(var V=Q-p,q=0;q<V;q++){var G=h7(U);G[f]=G[f]+t+q,G[f+"Span"]=1,m.push(G)}}return m}function D8(e,t){var n,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,i=0,o=[],a=k8(e);try{for(a.s();!(n=a.n()).done;){var s=n.value;if(null==s.expand_map)for(var u=0;u<s.count;u++)o.push(-1);else o=(o=o.concat(b7(s.expand_map))).concat(s.expand_map.frames)}}catch(e){a.e(e)}finally{a.f()}var c,l=0,h=(e=0,e=0==r?(l=t.height-t.total_top-t.total_bottom,t.height-t.total_top-t.bottom):(l=t.width-t.total_left-t.total_right,t.width-t.total_left-t.right),i=0,k8(o));try{for(h.s();!(c=h.n()).done;)i+=-1==c.value?l:1}catch(e){h.e(e)}finally{h.f()}return[i-=e,o,e,l]}function B8(e,t,n){var r,i=k8(e.ordertoArray());try{for(i.s();!(r=i.n()).done;){var o=e[r.value];o instanceof t8&&(o.$$path$$!=t?B8(o,t,n):n.rows=n.rows.concat(Array.from(o.$$rows$$)))}}catch(e){i.e(e)}finally{i.f()}}function I8(e,t,n){if(e.ordertoArray){var r=e.ordertoArray();if(r.length<1)t.push(d7(e.$$rows$$,n));else{var i,o=k8(r);try{for(o.s();!(i=o.n()).done;){var a=e[i.value];a instanceof t8&&(0===a.$$order$$.size?t.push(d7(a.$$rows$$,n)):I8(a,t,n))}}catch(e){o.e(e)}finally{o.f()}}}}function M8(e,t,n,r){var i=e.column_name;e.column_name=i+"_"+mu(e.col)+String(e.row+1),r||(null==e.order||null==e.order?t[e.column_name]=!0:t[e.column_name]=e.order,n[i=Zu(i=e.config.value)]?n[i].push(e.column_name):n[i]=[e.column_name])}function j8(e,t,n,r){var i,o=[],a=[],s=[],u=[],c=k8(e.indexs);try{for(c.s();!(i=c.n()).done;){var l=i.value;M8(l,t,n),r?a.push(l.cell_info.Value):a.push(l.column_name)}}catch(e){c.e(e)}finally{c.f()}var h,f=k8(e.columns);try{for(f.s();!(h=f.n()).done;){var d=h.value;M8(d,t,n),r?o.push(d.cell_info.Value):o.push(d.column_name)}}catch(e){f.e(e)}finally{f.f()}var p,m,g,A=k8(e.values);try{for(A.s();!(p=A.n()).done;){var v=p.value;M8(v,t,n),s.push(v),r?u.push(v.cell_info.Value):u.push(v.column_name)}}catch(e){A.e(e)}finally{A.f()}return e.child&&(m=(e=C8(j8(e.child,t,n,r),3))[0],g=e[1],e=e[2],o=o.concat(m),a=a.concat(g),s=s.concat(e)),[o,a,s,u]}function N8(e,t,n,r){var i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,o=7<arguments.length?arguments[7]:void 0,a=9<arguments.length?arguments[9]:void 0,s=10<arguments.length?arguments[10]:void 0,u=11<arguments.length?arguments[11]:void 0,c=12<arguments.length?arguments[12]:void 0,l="",h=0,f=0,d=!1,p=a,m=(p=1==a.length?(a=[],[]):(a=a[a.length-1]||[],2<=p.length?p[p.length-2]:[]),d=0==i?(l="Row",h=n.s_r+n.height-n.total_bottom,f=n.height-n.total_top-n.total_bottom,r.row<h):(l="Column",h=n.s_c+n.width-n.total_right,f=n.width-n.total_left-n.total_right,r.col<h),i=!1,"Column"!=l&&r.type!=F6.F_CELL&&null==r.column_name&&(Q8(n.all_cells[r.row])||$8(n.all_cells[r.row]))&&(i=!0),[]),g=0,A=[];if(d){for(var v=0,b=0;b<e.length;b++)if(-1!=e[b])g+=1;else{var y=h7(t),w=(y[l]=y[l]+g,r.type,F6.F_CELL,g+=f,a[b]);if(0!=a.length&&w&&1<e.length){y.expand_count=w.index;var x=p[0];if(x){var C,k=w.kvmap[x.name],E=(y.kvmap={name:x.name,value:k},y.kvmaps=w.kvmap,w.kvmap);for(C in E){var S=y7(C),_=(S=w7(S),E[C]);n.pivot_cells_map[S]?n.pivot_cells_map[S][_]?n.pivot_cells_map[S][_].push(y):n.pivot_cells_map[S][_]=[y]:n.pivot_cells_map[S]=x8({},_,[y])}}y.expand_index=b}else y.expand_count=v;v+=1,o&&(o[r.row]?o[r.row].add(y.Row):o[r.row]=new Set([y.Row])),A.push(Au(y.Column,y.Row)),J8(y,u,c,n.all_cells),m.push(y)}m.forEach((function(e){e.all_count=v})),i&&(m=m[0])}else{g-=f;var O,T=k8(e);try{for(T.s();!(O=T.n()).done;){var D,B=O.value;-1==B?g+=f:(B==r.cell_info[l]&&((D=h7(t))[l]=D[l]+g-(r.cell_info[l]-h),D.expand_count=0,J8(D,u,c,n.all_cells),m.push(D),A.push(Au(D.Column,D.Row))),g+=1)}}catch(e){T.e(e)}finally{T.f()}}return s[Au(t.o_c,t.o_r)]=A,m}function F8(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,r=e.length;if(0!=r){var i=e[n];if(n<r-1)F8(e,i,n+1);else{var o,a=k8(i);try{for(a.s();!(o=a.n()).done;){var s=o.value;s.expand=s.count}}catch(e){a.e(e)}finally{a.f()}}if(t)for(var u in t)for(var c=t[u],l=0;l<c.count;l++)c.expand=c.expand+i[0+l].expand;if(t){var h,f=0;for(h in t){var d=t[h],p=new i8;d.expand_map=p;for(var m=0;m<d.count;m++){var g=i[f+m];p.sizes.push(g.count),p.sub_maps.push(g.expand_map)}f+=d.count}}}}function R8(e,t,n,r){for(var i in e){var o=e[i];if(o instanceof t8&&e.$$path$$ in t&&t[e.$$path$$]==i){0==--n?r.push(o):R8(o,t,n,r);break}}}function P8(e,t,n){return Array.from(e.$$rows$$).map((function(e,t){return t+1}))}function L8(e,t,n,r,i,o,a){o[e.uid]=e;var s=r.row_offset,u=r.col_offset,c=r.r_i,l=r.c_i,h=r.parent,f=r.detail,d=r.p_r_kvmap,p=r.p_c_kvmap,m=r.G_in,g=r.danfoDF,A=r.expandRowDict,v=r.expandColDict;if(!n||0==n.length)return[[],0,0,[],[]];var b,y,w=[],x=[];e.df_row_maps=w,e.df_col_maps=x;var C=[r=g.getIndex()],k=(e.no_agg&&"_$此乃唯一序号"===r.getPath()&&(W=[],g.eachIndexs((function(e){W.push(e)})),C=W),e.pivotData.push(g),null),E=Wu(p,d);0==e.indexs.length?w.push([new q6]):e.indexs.forEach((function(t){t=Au(t.col,t.row);var n=C8(_8(C,k),2);C=n[0],k=n[1],e.dataIndexsMap[t]=k,w.push(k)})),k=null;var S=[r=g.getColumn()],_=(e.no_agg&&"_$此乃唯一序号"===r.getPath()&&(b=[],g.eachColumns((function(e){b.push(e)})),S=b),0==e.columns.length?x.push([new q6]):e.columns.forEach((function(t){var n=C8(_8(S,k),2);S=n[0],k=n[1],n=Au(t.col,t.row);e.dataColumnsMap[n]=k,x.push(k)})),0),O=[],T=[],D=[],B=0,I=0,M=s,j=0,N=k8(C);try{for(N.s();!(y=N.n()).done;){var F,R=y.value,P=u,L=0,U=0,z=k8(S);try{for(z.s();!(F=z.n()).done;){var H,$,Q,V,q,G,W,K,Y,X,J,Z=F.value,ee=[],te=[],ne=[],re=0,ie=0,oe=w[w.length-1][_],ae=x[x.length-1][U],se=d7(R.$$rows$$,Z.$$rows$$);null==e.child||f?(ne=(H=C8(function(e,t,n,r){for(var i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,o=5<arguments.length&&void 0!==arguments[5]?arguments[5]:0,a=6<arguments.length&&void 0!==arguments[6]&&arguments[6],s=7<arguments.length&&void 0!==arguments[7]?arguments[7]:0,u=8<arguments.length&&void 0!==arguments[8]?arguments[8]:null,c=11<arguments.length?arguments[11]:void 0,l=13<arguments.length?arguments[13]:void 0,h=14<arguments.length?arguments[14]:void 0,f=[],d=e.width-e.right-e.left,p=e.height-e.bottom-e.top,m=[],g=[],A=null!=r&&a?r.length:1,v=0==s&&a?p:0,b=0!=s&&a?d:0,y=0;y<A;y++)for(var w,x=0;x<p;x++){0==o&&((w=h7(t.RowHead[x+e.top+e.s_r])).Row=w.Row+i+y*v,m.push(w));for(var C=0;C<d;C++){0==i&&((k=h7(t.ColumnHead[C+e.left+e.s_c])).Column=k.Column+o+y*b,g.push(k));var k=null;if(null!=(k=(O=e.cells[x+e.top])?O[C+e.left]:k)){var E=h7(k.cell_info);if(k.penetrate&&(E.PenetrateDict=O8(Wu(u,{}),c)),E.Row=E.Row+i+y*v,E.Column=E.Column+o+y*b,E.group_index=e.pivotData.length-1,E.expand_count=l,k.type==F6.D_CELL&&(k.column_name&&k.column_name in n?r.length<1?E.Value=null:(O=n.$columns.indexOf(k.column_name),E.Value=n.$data[r[y]][O],J8(E,n.$data[r[y]],n,e.all_cells)):10==E.ValueType?E.Value=E.Value:E.Value=null,O=Au(k.col,k.row),e.dataColumnsMap[O]?e.dataColumnsMap[O][y]||(e.dataColumnsMap[O][y]=[]):(e.dataColumnsMap[O]=[],e.dataColumnsMap[O][y]=[]),e.dataColumnsMap[O][y].push({name:k.column_name,value:E.Value,count:1}),k.penetrate&&k.config))try{E.PenetrateDict[k.config.value.trim()]=E.Value}catch(e){E.PenetrateDict[k.config.value]=E.Value}if(k.type==F6.F_CELL){if(E.f_cells=h7(k.f_cells),E.f_cells){var S,_=k8(E.f_cells);try{for(_.s();!(S=_.n()).done;)S.value.g_index=e.uid}catch(e){_.e(e)}finally{_.f()}}var O=Au(E.o_c,E.o_r),T=Au(E.Column,E.Row);if(h[O]?h[O].push(T):h[O]=[T],E.PenetrateDict){var D,B=E.PenetrateDict;for(D in B){var I=B[D];e.pivot_cells_map[D]?e.pivot_cells_map[D][I]?e.pivot_cells_map[D][I].push(E):e.pivot_cells_map[D][I]=[E]:e.pivot_cells_map[D]=x8({},I,[E])}}J8(E,n.$data[r[y]],n,e.all_cells)}f.push(E)}}}return[f,p+(A-1)*v,d+(A-1)*b,m,g]}(e,t,n,se,M,P,f,0,Wu(E,Wu(oe.kvmap,ae.kvmap)),C.length,S.length,i,o,j,a),5))[0],re=H[1],ie=H[2],ee=H[3],te=H[4],j+=1):($=Wu(oe.kvmap,d),Q=Wu(ae.kvmap,p),V=g.getIndex(),q=g.getColumn(),0<(G=Object.keys(oe.kvmap).length)&&(W=[],R8(V,oe.kvmap,G,W),V=W[0]),0<(K=Object.keys(ae.kvmap).length)&&(Y=[],R8(q,ae.kvmap,K,Y),q=Y[0]),V&&q&&((X=new n8(V,q)).$$grpColumns$$=g.$$grpColumns$$,X.$$data$$=g.$$data$$,X.$$indexField$$=g.$$indexField$$,X.$$columnsField$$=g.$$columnsField$$,ne=(J=C8(L8(e.child,t,n,y8(y8({},Ju()),{},{row_offset:M,col_offset:P,r_i:_,c_i:U,parent:e,p_r_kvmap:$,p_c_kvmap:Q,G_in:m+1,danfoDF:X,expandRowDict:A,expandColDict:v}),i,o,a),5))[0],re=J[1],ie=J[2],ee=J[3],te=J[4])),f&&(w[0][0].count=se.length),T.push.apply(T,w8(ee)),D.push.apply(D,w8(te)),O.push.apply(O,w8(ne)),0==_&&(I+=ie),L<re&&(L=re),P+=ie,U+=1}}catch(t){z.e(t)}finally{z.f()}M+=L,B+=L,_+=1}}catch(t){N.e(t)}finally{N.f()}var ue=(r=C8(function(e,t,n,r,i){var o=5<arguments.length&&void 0!==arguments[5]?arguments[5]:0,a=6<arguments.length&&void 0!==arguments[6]?arguments[6]:0,s=e.height-e.total_top-e.bottom,u=e.width-e.total_left-e.right,c=r-s+o,l=i-u+a,h=[],f=[];if(0==a)for(var d=0;d<e.bottom;d++){var p=h7(t.RowHead[e.s_r+d+e.total_top+s]);p.Row=p.Row+c,h.push(p)}if(0==o)for(var m=0;m<e.right;m++){var g=h7(t.ColumnHead[e.s_c+m+e.total_left+u]);g.Column=g.Column+l,f.push(g)}return[h,f]}(e,t,n,B,I,s,u),2))[0],ce=(r=r[1],T.push.apply(T,w8(ue)),D.push.apply(D,w8(r)),[]),le=[];C.forEach((function(e){e&&(ce=ce.concat(Array.from(e.$$rows$$)))})),S.forEach((function(e){e&&(le=le.concat(Array.from(e.$$rows$$)))})),ue=d7(new Set(ce),new Set(le)),r=function(e,t,n,r){var i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,o=5<arguments.length&&void 0!==arguments[5]?arguments[5]:0,a=6<arguments.length&&void 0!==arguments[6]?arguments[6]:{},s=7<arguments.length&&void 0!==arguments[7]?arguments[7]:{},u=8<arguments.length?arguments[8]:void 0,c=9<arguments.length?arguments[9]:void 0,l=10<arguments.length?arguments[10]:void 0,h=11<arguments.length?arguments[11]:void 0,f=12<arguments.length?arguments[12]:void 0,d=13<arguments.length?arguments[13]:void 0,p=(F8(n),F8(r),[]),m=d.map((function(e){return t.$data[e]}));if(0==o)for(var g=0;g<e.indexs.length;g++)p=p.concat(T8(e,i,n[g],e.indexs[g],0,a,!0,null,c,t,m,u));if(0==i)for(var A=0;A<e.columns.length;A++)p=p.concat(T8(e,o,r[A],e.columns[A],1,s,!0,null,c,t,m,u));var v,b=Wu(a,s),y=(v=C8(D8(n[n.length-1],e),3))[0],w=v[1],x=(v=(v[2],C8(D8(r[r.length-1],e,1),3)))[0],C=v[1],k=(v[2],e.height),E=e.width;for(g=0;g<k;g++)for(var S=0;S<E;S++){var _=e.cells[g][S];if(null!=_&&_.type!=F6.D_CELL){M=S,H=z=void 0,H=z=1,(O=g)<(R=e).top?z=0:O>R.height-R.bottom-1&&(z=2),M<R.left?H=0:M>R.width-R.right-1&&(H=2),O<R.total_top&&M<R.total_left?z=H=0:(O>R.height-R.bottom-1&&M>R.width-R.total_right-1||O>R.height-R.total_bottom-1&&M>R.width-R.right-1)&&(z=H=2);var O=3*z+H;if(4!=O&&!(0<i&&O<3||0<o&&(0==O||3==O||6==O))){var T=h7(_.cell_info);if(_.penetrate&&(T.PenetrateDict=O8(Wu(b,{}),c)),T.Row=T.Row+i,T.Column=T.Column+o,T.group_index=e.pivotData.length-1,6!=O&&8!=O&&7!=O||(T.Row=T.Row+y),2!=O&&8!=O&&5!=O||(T.Column=T.Column+x),5==O||3==O){if(_.type==F6.F_CELL&&(T.danfoDF=u,T.df=t,_.f_cells&&(T.f_cells=h7(_.f_cells),T.f_cells))){var D,B=k8(T.f_cells);try{for(B.s();!(D=B.n()).done;){var I=D.value;I.g_index=e.uid,I.direction=b6.F_DIRECT_X}}catch(e){B.e(e)}finally{B.f()}}var M=N8(w,T,e,_,0,i,o,l,h,n,f,m,t);p=p.concat(M)}else if(7==O||1==O){if(_.type==F6.F_CELL&&(T.danfoDF=u,T.df=t,T.f_cells=h7(_.f_cells),T.f_cells)){var j,N=k8(T.f_cells);try{for(N.s();!(j=N.n()).done;){var F=j.value;F.g_index=e.uid,F.direction=b6.F_DIRECT_Y}}catch(e){N.e(e)}finally{N.f()}}var R=N8(C,T,e,_,1,i,o,l,h,n,f,m,t);p=p.concat(R)}else if(4!=O){if(_.type==F6.F_CELL){if(T.f_cells=h7(_.f_cells),T.f_cells){var P,L=k8(T.f_cells);try{for(L.s();!(P=L.n()).done;){var U=P.value;U.g_index=e.uid,U.direction=b6.F_DIRECT_XY}}catch(e){L.e(e)}finally{L.f()}}var z=Au(T.o_c,T.o_r),H=Au(T.Column,T.Row);f[z]=H}if(J8(T,d,t,e.all_cells),8==O)if(M=l[_.row],R=h[_.col],M&&1<M.size)for(var $=0,Q=z=Array.from(M);$<Q.length;$++){var V=Q[$],q=h7(T);q.Row=V,p.push(q)}else if(R&&1<R.size)for(var G=0,W=Array.from(R);G<W.length;G++){var K=W[G],Y=h7(T);Y.Column=K,p.push(Y)}else p.push(T);else p.push(T);if(T.PenetrateDict){var X,J=T.PenetrateDict;for(X in J){var Z=J[X];e.pivot_cells_map[X]?e.pivot_cells_map[X][Z]?e.pivot_cells_map[X][Z].push(T):e.pivot_cells_map[X][Z]=[T]:e.pivot_cells_map[X]=x8({},Z,[T])}}}else J8(T,d,t,e.all_cells),p.push(T)}}}return p}(e,n,w,x,s,u,d,p,g,i,A,v,a,ue);if(B+=e.bottom,I+=e.right,h){if(0<h.df_row_maps.length){for(var he=((s=h.df_row_maps[h.df_row_maps.length-1][c]).count=C.length,new i8),fe=0;fe<e.bottom;fe++)he.frames.push(e.e_r-fe);var de,pe=k8(w[w.length-1]);try{for(pe.s();!(de=pe.n()).done;){var me=de.value;he.sizes.push(me.count),he.sub_maps.push(me.expand_map)}}catch(t){pe.e(t)}finally{pe.f()}s.expand_map=he}if(0<h.df_col_maps.length){for(var ge=((ue=h.df_col_maps[h.df_col_maps.length-1][l]).count=S.length,new i8),Ae=0;Ae<e.right;Ae++)ge.frames.push(e.e_c-Ae);var ve,be=k8(x[x.length-1]);try{for(be.s();!(ve=be.n()).done;){var ye=ve.value;ge.sizes.push(ye.count),ge.sub_maps.push(ye.expand_map)}}catch(t){be.e(t)}finally{be.f()}ue.expand_map=ge}}else B+=e.total_top,I+=e.total_left;return[O=O.concat(r),B,I,T,D]}function U8(e,t,n,r,i,o,a){var s=[],u=[],c=[],l=t.repeatInfo.repeatValue.split(","),h=t.repeatInfo.repeatKey;0==l.length&&(l=[null]);var f,d=(p=C8(function(e,t){var n=null,r=[],i={columns:[]};if(c7)return[r=t,i];for(var o=0;o<e.cells.length;o++){var a,s=k8(e.cells[o]);try{for(s.s();!(a=s.n()).done;){var u=a.value;if(null!=u&&u.type==F6.D_CELL&&!u.in_group&&u.config){n=u.config.TableID;break}}}catch(e){s.e(e)}finally{s.f()}}return!t||Object.keys(t).length<1||!n?[[],{columns:[]}]:(r=(t=t[n]).data,i.columns=t.columns,[r,i])}(t,s7),2))[0],p=p[1],m=null,g=(m=1==l7?new qs(d):new qs(d,p),p=(d=G8(u7)).ishasDate,d=d.dateColumns,p&&(m=W8(m.$columns,m,d)),t.filter&&(m=Iu(m,t.filter,u7,c7)),t.repeatInfo.repeatValue||(l=m.$columns.includes(h)?y6.eq(m[h].$data):[null]),k8(t.cells));try{for(g.s();!(f=g.n()).done;){var A,v=k8(f.value);try{for(v.s();!(A=v.n()).done;){var b=A.value;null==b||b.type!=F6.D_CELL||b.in_group||M8(b,null,null,!0)}}catch(e){v.e(e)}finally{v.f()}}}catch(e){g.e(e)}finally{g.f()}for(var y=0;y<l.length;y++)!function(e){var r,i=h7(t.cells),o=i.length,a=i[0].length,u=((E=C8(g7(o,a),3))[0],E[1]),f=E[2],d=l[e],p=null,g=k8(i);try{for(g.s();!(r=g.n()).done;){var A,v=k8(r.value);try{for(v.s();!(A=v.n()).done;){var b=A.value;if(null!=b&&b.type==F6.D_CELL&&!b.in_group){var y,w=m.$columns,x=k8(w);try{for(x.s();!(y=x.n()).done;){var C=y.value;if(h==C&&"break"===function(){p=m[h],"string"==typeof d&&(d=d.trim());var e=[],t=(p.$data.map((function(t,n){n=p.$index[n],t===d&&e.push(n)})),m.iloc({rows:e}).$data);return p=new qs(t,{columns:w}),"break"}())break}}catch(e){x.e(e)}finally{x.f()}"filter"in b.config&&b.config.filter&&(p=Iu(p,b.config.filter,u7,c7)),b.data=(p||m)[b.config.value].$data}}}catch(e){v.e(e)}finally{v.f()}}}catch(e){g.e(e)}finally{g.f()}if(0<p.$data.length){B7(u,f,i,[],t.s_r,t.s_c);var k,E,S=(E=C8(j7(u,f,[],n,t.s_r,t.s_c),2))[0],_=(E[1],c.length),O=k8(S);try{for(O.s();!(k=O.n()).done;){var T=k.value;(T=0!=e?h7(T):T).Row=T.Row+_,c.push(T)}}catch(e){O.e(e)}finally{O.f()}var D,B=k8(N7(o,a,i,u,f,t.s_r,t.s_c,!0));try{for(B.s();!(D=B.n()).done;){var I=D.value,M=(I.Row=I.Row+_,s.push(I),0),j=0;if("f_cells"in I){M=I.row_offset,j=I.col_offset,delete I.row_offset,delete I.col_offset;var N,F=k8(I.f_cells);try{for(F.s();!(N=F.n()).done;){var R=N.value;try{i[R.row-t.s_r][R.col-t.s_c].type==F6.N_CELL&&(j=M=0),R.row=u[R.row-t.s_r].new+_+t.s_r+M,R.col=f[R.col-t.s_c].new+t.s_c+j}catch(e){}}}catch(e){F.e(e)}finally{F.f()}}}}catch(e){B.e(e)}finally{B.f()}}}(y);var w,x=k8(t.cells);try{for(x.s();!(w=x.n()).done;){var C,k=k8(w.value);try{for(k.s();!(C=k.n()).done;){var E=C.value;null!=E&&(E.in_group=!0)}}catch(e){k.e(e)}finally{k.f()}}}catch(e){x.e(e)}finally{x.f()}return[s,c.length,u.length,c,u]}function z8(e,t){var n,r=[],i=k8(e.cells);try{for(i.s();!(n=i.n()).done;){var o,a=k8(n.value);try{for(a.s();!(o=a.n()).done;){var s,u=o.value;u&&(s=h7(u.cell_info),u.type!=F6.D_CELL&&u.type!=F6.F_CELL||(s.Value=""),r.push(s))}}catch(e){a.e(e)}finally{a.f()}}}catch(e){i.e(e)}finally{i.f()}for(var c=e.height,l=e.width,h=[],f=[],d=0;d<c;d++){var p=h7(t.RowHead[e.s_r+d]);h.push(p)}for(var m=0;m<c;m++){var g=h7(t.ColumnHead[e.s_c+m]);f.push(g)}return e.isEmpty=!0,[r,c,l,h,f]}function H8(e){var t=(n=e.config).Aggregate,n=n.DataColumn;n=u7[n]?u7[n].data_type:e.config.type||2;return t||(2==n?1:4)}function $8(e){if(e){var t,n=k8(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(r&&2==r.expansion)return 1}}catch(e){n.e(e)}finally{n.f()}}}function Q8(e){if(e){var t,n=k8(e);try{for(n.s();!(t=n.n()).done;){var r=t.value;if(r&&null!=r.column_name)return}}catch(e){n.e(e)}finally{n.f()}}return 1}function V8(e){var t=null;return e.includes(".")?t=e.split(".")[0]:0<s7.length&&(t=s7[0].name),t}function q8(e,t){i=e,r=new Set;var n,r=(i=C8(c7&&ec(s7)||(function e(t,n){var r=t.indexs,i=t.values,o=t.columns;if(c7){for(var a=0;a<r.length;a++){var s=V8(s=r[a].config.value);n.add(s)}for(var u=0;u<i.length;u++){var c=V8(c=i[u].config.value);n.add(c)}for(var l=0;l<o.length;l++){var h=V8(h=o[l].config.value);n.add(h)}}else{for(var f=0;f<r.length;f++){var d=r[f];n.add(d.config.TableID)}for(var p=0;p<i.length;p++){var m=i[p];n.add(m.config.TableID)}for(var g=0;g<o.length;g++){var A=o[g];n.add(A.config.TableID)}}t.child&&e(t.child,n)}(i,r),!(1<r.size))?[!1,r]:[!0,r],2))[0],i=i[1];return r?(function e(t,n,r,i){var o,a=t.indexs,s=t.values,u=t.columns,c=k8(a);try{for(c.s();!(o=c.n()).done;){var l=o.value;E7(l,n,r,i)}}catch(t){c.e(t)}finally{c.f()}var h,f=k8(u);try{for(f.s();!(h=f.n()).done;){var d=h.value;E7(d,n,r,i)}}catch(t){f.e(t)}finally{f.f()}var p,m=k8(s);try{for(m.s();!(p=m.n()).done;){var g=p.value;E7(g,n,r,i)}}catch(t){m.e(t)}finally{m.f()}t.child&&e(t.child,n,r,i)}(e,t,r=[],n=new Set),[r,{columns:Array.from(n)}]):function(e,t,n){var r=null,i=e;e={columns:[]};if(c7)return[t=s7.length<1||ec(s7)?s7:(n=Array.from(n)[0],tc(n,s7)),e];for(;!r&&i;)i.table_id?r=i.table_id:i=i.child;return!t||Object.keys(t).length<1||!r?[[],{columns:[]}]:(n=(t=t[r]).data,e.columns=t.columns,[n,e])}(e,t,i)}function G8(e){var t,n=[],r=!1;for(t in e){var i=e[t];1===i.data_type&&(r=!0,n.push(i.name))}return{ishasDate:r,dateColumns:n}}function W8(e,t,n){var r,i={},o=k8(e);try{for(o.s();!(r=o.n()).done;){var a=r.value,s=t[a].$data;n.includes(a)&&(s=S7(s)),i[a]=s}}catch(e){o.e(e)}finally{o.f()}return new qs(i)}function K8(e,t,n,r,i){return n=m8[n](e,t),1==i?new Set(d7(r,n)):2==i?(e=r,t=n,e=Array.from(e),t=Array.from(t),e=e.concat(t),new Set(e)):new Set}function Y8(e,t,n,r,i,o,a,s,u,c,l){var h,f=t,d=new Set(f.map((function(e,t){return t}))),p=k8(e);try{for(p.s();!(h=p.n()).done;){var m=h.value,g=m.right,A=m.right.match(_6),v=C8(gu(m.left),2),b=v[0],y=v[1],w=P7(b,y,c),x=[],C=(r7(w)?x=i["_".concat(m.left)]:w&&null!=w.value&&(x=[w.value]),m.logic);if(A&&0<A.length){var k,E,S=C8(gu(k=(A=A[0]).match(/[a-zA-Z]+[0-9]+/g)[0]),2),_=S[0],O=S[1],T=(k=P7(_,O,c),_7(k.column_name),!1);for(E in r.kvmaps)if(E==k.column_name){g=r.kvmaps[E],T=!0;break}T||(r7(k)?(g=t7(l[n.g_index],_,O,k,r,i,n),Array.isArray(g)&&(g=g[0])):k&&k.Value&&(g=k.Value))}x&&(d=K8(x,g,m.type,d,C))}}catch(e){p.e(e)}finally{p.f()}return d=Array.from(d),f=d.map((function(e){return f[e]}))}function X8(e,t){var n,r=e.ordertoArray(),i=(e.$$path$$&&(t[e.$$path$$]?e.$$orderData$$.forEach((function(n){t[e.$$path$$].push(n)})):t[e.$$path$$]=e.$$orderData$$),k8(r));try{for(i.s();!(n=i.n()).done;){var o=n.value,a=e[o];a instanceof t8&&X8(a,t)}}catch(n){i.e(n)}finally{i.f()}}function J8(e,t,n,r){if(e&&(e.Warn||e.warn)){var i,o=[],a=k8(e.Warn||e.warn);try{for(a.s();!(i=a.n()).done;){var s=i.value,u=Fu(e,t,n,s.filter,s.act_on,s.stylesConfig,r);u&&o.push({act_on:s.act_on,stylesConfig:u})}}catch(e){a.e(e)}finally{a.f()}e.warnStyle=o,delete e.Warn,delete e.warn}}function Z8(e,t,n,r,i,o,a,s,u){var c=(l=C8(q8(t,s7),2))[0],l=(l[1],null);try{if(1==l7&&t.no_agg&&!function(e){return!(!e[0]||!("_$此乃唯一序号"in e[0]))}(c)){var h=c,f=t;try{var d=null;0<f.indexs.length?d=f.indexs[0].column_name:0<f.columns.length&&(d=f.columns[0].column_name);for(var p=0;p<h.length;p++){var m=h[p];m["_$此乃唯一序号"]=m[d]+"$$"+p}}catch(e){}}l=new qs(c)}catch(e){return z8(t,n)}c7&&(u7=function(e){var t,n={},r=k8(e);try{for(r.s();!(t=r.n()).done;){var i=t.value.response_data;if(Array.isArray(i)){var o,a=i[0];for(o in a){var s=o,u=3,c={name:s,data_type:u="number"!=typeof a[o]&&"boolean"!=typeof a[o]?u:2,axis_type:1};n[s]=c}}else v8(i)}}catch(e){r.e(e)}finally{r.f()}return n}(s7));c=(f=G8(u7)).ishasDate;var g=f.dateColumns;c&&(l=W8(l.$columns,l,g)),t.filter&&(l=Iu(l,t.filter,u7,c7));var A=C8(j8(t,c={},g={}),4),v=A[0],b=A[1],y=A[2];if(A[3],0<l.size&&(l=function(e,t){try{var n,r=e.$columns;for(n in t){var i=t[n],o=i[0],a=(e.rename(x8({},n,o),{inplace:!0}),r.indexOf(n));if(-1!=a&&r.splice(a,1),i.shift(),0<i.length){var s,u=k8(i);try{for(u.s();!(s=u.n()).done;){var c=s.value;l=e[o].$data,e.addColumn(c,l,{inplace:!0})}}catch(e){u.e(e)}finally{u.f()}}}e.drop({columns:r,inplace:!0})}catch(e){}var l;return e}(l,h7(g)),t.no_agg||0<y.length&&(l=function(e,t,n){var r={},i={};if(t.map((function(e){var t,n=H8(e);n in k7&&(t=e.column_name+"_".concat(n=k7[n]),r[e.column_name]=n,i[t]=e.column_name)})),!(Object.keys(r).length<1)){e=l8.agg(e,r);try{e=e.rename(i)}catch(e){}}return e}(l=l.groupby(b.concat(v)),y))),t.no_agg)try{var w,x=null,C=1,k=null,E=null,S=(0<t.indexs.length?(k=t.indexs,E=b):0<t.columns.length&&(E=v,k=t.columns),k8(k));try{for(S.s();!(w=S.n()).done;){var _=w.value;if(_.config&&0!=_.config.Order){x=_.column_name,C=_.config.Order;break}}}catch(e){S.e(e)}finally{S.f()}var O,T=l[x=null==x?E[1]:x].$data.map((function(e,t){return[e,t]})),D=(function(e,t){var n=1==t;e.sort((function(e,t){return e=e[0],t=t[0],A6(e)&&A6(t)?n?e.localeCompare(t,"zh-CN"):t.localeCompare(e,"zh-CN"):t<e?n?1:-1:e<t?n?-1:1:0}))}(T,C),T.map((function(e){return e[1]}))),B=[],I=l.$data,M=k8(D);try{for(M.s();!(O=M.n()).done;){var j=O.value;B.push(I[j])}}catch(e){M.e(e)}finally{M.f()}l=new qs(B,{columns:l.$columns})}catch(e){}return function(e,t){var n,r=e.getIndex(),i=e.getColumn(),o=e.$$valuesField$$;if(X8(r,t),X8(i,t),0<o.length){o=e;var a=e.$$valuesIndex$$,s=(e=r,r=i,t),u=(i=o.$$indexField$$,o.$$columnsField$$),c=o.$$data$$,l=[];o={rows:l};if(0<u.length)B8(r,u=u[u.length-1],o),l=o.rows;else if(0<i.length)B8(e,i=i[i.length-1],o),l=o.rows;else for(var h=0;h<c.length;h++)l.push(h);for(var f=0;f<l.length;f++){var d,p=c[l[f]];for(d in a){var m=a[d],g=p[Number(d)];s[m]?s[m].push(g):s[m]=[g]}}}for(n in t){var A=t[n];t[n.match(f7)]=A,delete t[n]}}(A=function(e,t,n,r,i){o=n,a=r,s=[],u=[],c=[],l=[],t.forEach((function(e,t){J6(o,s,e,t,c),J6(a,u,e,t,l)}));var o,a,s,u,c,l,h=(n={indexs_index:s,columns_index:u,nfields:c,ncolumns:l}).indexs_index,f=n.columns_index,d=n.nfields,p=n.ncolumns,m=new t8,g=new t8;return m.setData(e),g.setData(e),r=X6(i,d),n=X6(i,p),e.forEach((function(t,n){Z6(m,t,n,h,e,d),m.setRows(n),Z6(g,t,n,f,e,p),g.setRows(n)})),0<Object.keys(r).length&&e8(m,r),0<Object.keys(n).length&&e8(g,n),i=new n8(m,g,e,d,p,t),{dfofields:m,dfocolumn:g,danfoDF:i}}(l.values,l.columns,b,v,c).danfoDF,a),y=null,l&&0!=l.size?v.length+b.length==0?L8(t,n,l,y8(y8({},Ju()),{},{danfoDF:A,detail:!0}),g,o,s):(y=L8(t,n,l,Ju({danfoDF:A,expandRowDict:{},expandColDict:{}}),g,o,s),l=null,y):z8(t,n)}function e7(e,t,n,r,i,o,a,s,u){var c=null;if(t+=1,r=parseInt(r),!isNaN(r)){for(var l=0,h=0,f=null,d=0;d<e.length;d++){var p=e[d];if(t<=(l+=p.count)){l-=(f=p).count,h=d;break}}var m=null;if(1==n?m=e[h-r]:2==n?m=e[h+r]:3==n&&(m=f),m){i.$$indexField$$.includes(m.name)?i=i.$$indexs$$:i.$$columnsField$$.includes(m.name)&&(i=i.$$columns$$);var g=t-1-l,A=null,v=[];s=((m=function(e,t,n){var r,i=k8(t);try{for(i.s();!(r=i.n()).done;){var o=r.value;if(null!=e[o]){if(!(n=x7(n,o)))break;n=n[e[o]]}}}catch(e){i.e(e)}finally{i.f()}return n}(m.kvmap,s,i))&&(A=m.getRows(),v=m.$$data$$),u.indexOf(a.column_name));if(A&&-1!=s&&(c=3==n?v[A[A.length-r]]:v[A[g]]))return c[s]}}return c}function t7(e,t,n,r,i,o,a){var s=null,u=O7(e,t,n),c=e;if(u||(c=L7(t,n,e)),r.expansion==F6.EXPAND_BOTH){t=i.f_cells[0]?i.f_cells[0].direction:p6.F_DIRECT_Y,n=[];void 0===(s=(n=i.df?F7(t,i.danfoDF,i.df,r.column_name):(e=i.group_index,M=(t=c.pivotData)[e].$$grpColumns$$,t=t[e].$$indexs$$,C7(t,r,M))).length>i.all_count||n.length<i.all_count?n:i.expand_index>i.expand_count?n[i.expand_index]:n[i.expand_count])&&(s=n),1==r.config.Merge&&Array.isArray(s)&&(s=y6.uniq(s))}else{var l,h=_7(r.column_name),f=null,d=c.pivotData,p=c.indexs,m=!1;for(l in i.PenetrateDict){for(var g=h+"."+l,A=0;A<p.length;A++)if(g==p[A].config.value){m=!0,f=g,i.PenetrateDict[l];break}if(m)break}if(f){e=i.group_index;for(var v=(d=d[e=u?e:0],f+="_"+a.resultCell,null),b=i.PenetrateDict,y=d.$$grpColumns$$,w=null,x=0;x<y.length;x++){var C=y[x],k=y7(C);null!=b[k=w7(k)]&&(d.$$indexField$$.includes(C)?v=x7(d.$$indexs$$,C):d.$$columnsField$$.includes(C)&&(v=x7(d.$$columns$$,C)),v=v[b[k]],w=w?new Set(d7(w,v.$$rows$$)):v.$$rows$$)}var E,S=y6.findIndex(d.$$grpColumns$$,r.column_name),_=[],O=k8(w=Array.from(w));try{for(O.s();!(E=O.n()).done;){var T=E.value,D=d.$$data$$[T];null!=D&&_.push(D[S])}}catch(e){O.e(e)}finally{O.f()}s=_,1==r.config.Merge&&Array.isArray(s)&&(s=y6.uniq(s))}else if(u){var B=(d=d[i.group_index]).$$indexs$$;if(I=i.kvmaps){var I=h7(I),M=(t=d.$$indexField$$,d.$$columnsField$$),j=null;if(0<t.length){B=d.$$indexs$$;var N,F=k8(t);try{for(F.s();!(N=F.n()).done;){var R=N.value,P=j||B;j=P;if(R===r.column_name)break;j=(j=x7(P,R))&&j[I[R]]}}catch(e){F.e(e)}finally{F.f()}B=j}else if(0<M.length){B=d.$$columns$$;var L,U=k8(M);try{for(U.s();!(L=U.n()).done;){var z=L.value,H=j||B;if(j=H,z===r.column_name)break;j=(j=x7(H,z))&&j[I[z]]}}catch(e){U.e(e)}finally{U.f()}B=j}}else if(0<Object.keys(i.PenetrateDict).length){var $=null;if(0<d.$$columnsField$$.length){for(var Q in B=d.$$columns$$,i.PenetrateDict){var V=$||B,q=i.PenetrateDict[Q];if(!($=x7(V,Q,!0))){$=V;break}$=$[q]}B=$}}if(!B)return s;n=d.$$grpColumns$$,s=(c=C7(B,r,n)).length>i.all_count||c.length<i.all_count?c:i.expand_index>i.expand_count?c[i.expand_index]:c[i.expand_count],1==r.config.Merge&&Array.isArray(s)&&(s=y6.uniq(s))}else s=o["_".concat(a.resultCell)]}return s}function n7(e,t,n){var r,i=null;return e.direction==b6.F_DIRECT_Y?(r=t.expand_count,i=U7(n,e.resultCell,r)):e.direction==b6.F_DIRECT_X?(r=R7(t),i=U7(n,e.resultCell,r)):e.direction!=b6.F_DIRECT_XY&&e.direction!=b6.F_DIRECT_AUTO||(i=n["_".concat(e.resultCell)]),i}function r7(e){return!(!e||e.type!==F6.D_CELL)}function i7(e,t,n,r){return(e=e[t.resultCell])&&e[r]?(t=e[r])!=Au(n.Column,n.Row)&&t||0:null}function o7(e,t,n,r,i,o,a,s){n=parseInt(n);var u=e;return u&&!Array.isArray(u[0])&&"object"===v8(e=function(){for(var e=0,c=0;c<u.length;c++)u[c].value==r&&(e=c);var l,h,f,d=null,p=(1==t?d=e-n:2==t?d=e+n:3==t?d=u.length-n:4==t?d=n-1:5==t&&(d=e),l=u[d]?u[d].value:null,null);for(h in o){var m,g=o[h];h==i&&(g=l),a[h]&&a[h][g]?(m=a[h][g],null===p?p=m:function(){var e=[];m.forEach((function(t){p.forEach((function(n){t.Row==n.Row&&t.Column==n.Column&&e.push(n)}))})),p=e}()):p=[]}return!p||p.length<1?{v:0}:(f=[],p.forEach((function(e){var t=Au(e.Column,e.Row);s.Row==e.Row&&s.Column==e.Column&&(t=0),f.push(t)})),{v:f})}())?e.v:0}function a7(e,t,n){try{!function(e,t,n){e=c7?e:e.SheetData;var r=(m7(e),e.RowHead.length),i=e.ColumnHead.length,o=(s=C8(g7(r,i),3))[0],a=s[1],s=s[2],u={},c=o,l=(A7(o,e,r,i),p7(o,e)),h={},f={},d={};T7("",l,e,t,n,h,f,d,u),I7("",o,t,n,h,u),B7(a,s,o,l),M7(a,s,l),n=(t=C8(j7(a,s,l,e),2))[0],t=t[1];var p,m=k8(l);try{for(m.s();!(p=m.n()).done;){var g=p.value;g.expand_cells=H7(g.expand_cells)}}catch(e){m.e(e)}finally{m.f()}$7(a,s,l,f,c,h),z7(a,s,l,f,c,h,d);var A,v=[],b=!1,y=k8(l);try{for(y.s();!(A=y.n()).done;){var w=A.value;v=v.concat(w.expand_cells),b=b||w.isEmpty}}catch(e){y.e(e)}finally{y.f()}v=v.concat(N7(r,i,o,a,s)),e.PivotConfig=Q7(l),e.RowHead=n,e.ColumnHead=t,e.CellConfig=v,e.WarnMap=u}(e,null,null)}catch(e){}return e}p8(m8,1,(function(e,t){var n=[];return e.forEach((function(e,r){e==t&&n.push(r)})),new Set(n)})),p8(m8,2,(function(e,t){var n=[];return e.forEach((function(e,r){e!=t&&n.push(r)})),new Set(n)})),p8(m8,3,(function(e,t){var n=[];return e.forEach((function(e,r){t<e&&n.push(r)})),new Set(n)})),p8(m8,4,(function(e,t){var n=[];return e.forEach((function(e,r){t<=e&&n.push(r)})),new Set(n)})),p8(m8,5,(function(e,t){var n=[];return e.forEach((function(e,r){e<t&&n.push(r)})),new Set(n)})),p8(m8,6,(function(e,t){var n=[];return e.forEach((function(e,r){e<=t&&n.push(r)})),new Set(n)}));var s7=[],u7={},c7=!1,l7=2,h7=function(e){return Qw.a.cloneDeep(e)},f7=/_[a-zA-Z]+[0-9]+/g,d7=function(e,t){var n=[];if(!e)return Array.from(t);if(!t)return Array.from(e);if(e.size>t.size){var r,i=k8(t);try{for(i.s();!(r=i.n()).done;){var o=r.value;e.has(o)&&n.push(o)}}catch(e){i.e(e)}finally{i.f()}}else{var a,s=k8(e);try{for(s.s();!(a=s.n()).done;){var u=a.value;t.has(u)&&n.push(u)}}catch(e){s.e(e)}finally{s.f()}}return n},p7=function(e,t){for(var n=[],r=0;r<t.GroupConfig.length;r++){var i=t.GroupConfig[r];try{i=new Q6(i,e,!0),n.push(i)}catch(e){}}return n},m7=function(e){!1 in e&&(e.RowHead=[]),!1 in e&&(e.ColumnHead=[]);for(var t=e.RowHead,n=e.ColumnHead,r=Qw.a.maxBy(t,(function(e){return e.Row})).Row,i=Qw.a.maxBy(n,(function(e){return e.Column})).Column,o=("GroupConfig"in e&&e.GroupConfig.forEach((function(e){r>e.eri||(r=e.eri),i>e.eci||(i=e.eci)})),[]),a=0;a<=r;a++)o.push({Row:a});for(var s=0;s<t.length;s++){var u=t[s];o[u.Row]=u}e.RowHead=o;for(var c=[],l=0;l<=i;l++)c.push({Column:l});for(var h=0;h<n.length;h++){var f=n[h];c[f.Column]=f}e.ColumnHead=c},g7=function(e,t){for(var n=[],r=[],i=[],o=0;o<e;o++){n.push(new s6(o));var a=[];i.push(a);for(var s=0;s<t;s++)a.push(null)}for(var u=0;u<t;u++)r.push(new s6(u,s6.COL_EXPAND));return[i,n,r]},A7=function(e,t,n,r){for(var i=0;i<t.CellConfig.length;i++){var o=t.CellConfig[i];try{t.CellConfig[i]=new F6(o,t,c7,s7),(o=t.CellConfig[i]).type!=F6.E_CELL&&(e[o.row][o.col]=o)}catch(e){}}for(var a=0;a<n;a++)for(var s=0;s<r;s++){var u=e[a][s];if(u&&(1<u.colspan||1<u.rowspan))for(var c=0;c<u.rowspan;c++)for(var l=0;l<u.colspan;l++)if(c+l!=0)try{e[a+c][s+l]=null}catch(e){}}},v7=function(e){return e},b7=function e(t){for(var n=[],r=t.sizes.length,i=0;i<r;i++){var o=t.sizes[i],a=t.sub_maps[i];if(null==a)for(var s=0;s<o;s++)n.push(-1);else n=(n=n.concat(e(a))).concat(a.frames)}return n},y7=function(e){if(e){var t=e.split(".");e="";for(var n=0;n<t.length;n++){var r=t[n];0!=n&&(e+=1===n?r:".".concat(r))}}return e},w7=function(e){if(e){var t=e.split("_");e="";for(var n=0;n<t.length;n++){var r=t[n];if(n===t.length-1)break;e+=0===n?r:"_".concat(r)}}return e},x7=function e(t,n,r){var i=t.$$path$$;if(r&&(i=w7(i),i=y7(i)),t instanceof t8&&i==n)return t;var o,a=k8(t.ordertoArray());try{for(a.s();!(o=a.n()).done;){var s=t[o.value];if(s instanceof t8){if(w7(s.$$path$$)==n)return t;e(s,n,r)}}}catch(e){a.e(e)}finally{a.f()}},C7=function(e,t,n){return e?function(e,t,n,r){for(var i=n.indexOf(t.column_name),o=[],a=0;a<e.length;a++){var s=e[a];o.push(r[s][i])}return o}(Array.from(e.$$rows$$),t,n,e=e.$$data$$):[]},k7={1:"sum",2:"count",3:"min",4:"max",5:"mean",6:"dcount"},E7=function(e,t,n,r){var i,o,a,s,u,c;c7?(a=e.config.value,r.has(a)||(o=Zu(a,0),i=Zu(a,1),0<(a=tc(o,s7)).length&&(a.forEach((function(e,t){n[t]||(n[t]={}),n[t][i]=e[i]})),r.add(e.config.value)))):(o=e.config.TableID,a=e.config.value,c=(u=e).config.sheetName+"&"+u.config.value,u.config.value=c,u.column_name=c,c=(u=t[o]).columns,t=u.data,s=c.indexOf(a),r.has(e.config.value)||-1!=s&&(t.forEach((function(e,t){n[t]||(n[t]=[]),n[t].push(e[s])})),r.add(e.config.value)))},S7=function(e){try{e=e.map((function(e){return e&&new Date(e).getTime()}))}catch(e){}return e},_7=function(e){return(e=e.split("."))[0]},O7=function(e,t,n){var r,i=k8(e.cells);try{for(i.s();!(r=i.n()).done;){var o,a=k8(r.value);try{for(a.s();!(o=a.n()).done;){var s=o.value;if(s&&s.cell_info&&s.cell_info.o_r===n&&s.cell_info.o_c===t)return!0}}catch(e){a.e(e)}finally{a.f()}}}catch(e){i.e(e)}finally{i.f()}return!1},T7=function(e,t,n,r,i,o,a,s,u){for(var c in t){var l,h,f,d,p,m;m=((c=t[c]).type==Q6.G_TYPE_EXPAND?(h=(l=C8(Z8(0,c,n,0,0,a,o,s),5))[0],f=l[1],d=l[2],p=l[3],l):(h=(l=C8(U8(0,c,n),5))[0],f=l[1],d=l[2],p=l[3],l))[4],c.expand_cells=h,c.expand_rows=f,c.expand_cols=d,c.row_heads=p,c.col_heads=m}},D7=function e(t,n){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,i=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0,o=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0;if(null==t)return 0;if(3<o)return 0;if(null!=t.count)return t.count;if(t.type==F6.N_CELL)return 1;if(t.type==F6.D_CELL)return t.in_group?1:t.expansion==F6.EXPAND_NONE?0<t.data.length?1:0:t.data.length;var a,s=1,u=(o+=1,k8(t.f_cells));try{for(u.s();!(a=u.n()).done;){var c=a.value,l=null;try{l=n[c.row-r][c.col-i]}catch(e){return 1}var h=e(l,n,r,i,o);s<h&&(s=h)}}catch(e){u.e(e)}finally{u.f()}return s},B7=function(e,t,n,r){var i,o=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,a=5<arguments.length&&void 0!==arguments[5]?arguments[5]:0,s=k8(n);try{for(s.s();!(i=s.n()).done;){var u,c=k8(i.value);try{for(c.s();!(u=c.n()).done;){var l=u.value;if(l&&!l.in_group){var h=null,f=null;l.count=D7(l,n,o,a),l.count<=0&&(l.count=0),f=l.expansion==F6.EXPAND_RIGHT?(h=t[l.col-a],l.colspan):(h=e[l.row-o],l.rowspan);try{var d=h.expand,p=l.count*f-f+1;d<p&&(h.expand=p)}catch(e){}}}}catch(e){c.e(e)}finally{c.f()}}}catch(e){s.e(e)}finally{s.f()}var m,g=k8(r);try{for(g.s();!(m=g.n()).done;){for(var A=m.value,v=0,b=A.s_r;b<=A.e_r;b++)v+=e[b].expand;v<A.expand_rows&&(e[A.e_r].expand=e[A.e_r].expand+A.expand_rows-v);for(var y=0,w=A.s_c;w<=A.e_c;w++)y+=t[w].expand;y<A.expand_cols&&(t[A.e_c].expand=t[A.e_c].expand+A.expand_cols-y)}}catch(e){g.e(e)}finally{g.f()}for(var x=0,C=e.length,k=0;k<C;k++){var E=e[k];E.new=x,x+=E.expand}x=0;for(var S=t.length,_=0;_<S;_++){var O=t[_];O.new=x,x+=O.expand}},I7=function(e,t,n,r,i){var o,a=k8(t);try{for(a.s();!(o=a.n()).done;){var s,u=k8(o.value);try{for(u.s();!(s=u.n()).done;){var c=s.value;null==c||c.type!=F6.D_CELL||c.in_group||(c.data=function(e,t,n,r,i){if(e.config){var o,a,s=e.config.TableID,u=e.config.value,c=(M8(e,null,null,!0),[]),l=[];try{l=c7?(a=[],Array.isArray(s7)?(a=ec(s7)?s7:(h=null,(h=u.includes(".")?u.split(".")[0]:h)?tc(h,s7):s7[0].response_data)).length<1?new qs(a,{columns:[]}):(c=function(e){var t,n=[];for(t in e[0]){var r=t;n.push(r)}return n}(a),new qs(a,{columns:c})):new qs(s7)):(c=s7[s]?s7[s].columns:[],o=s7[s]?s7[s].data:[],new qs(o,{columns:c}))}catch(e){return[]}"filter"in e.config&&e.config.filter&&(l=Iu(l,e.config.filter,u7,c7));var h=[];u=Zu(u);if(e.aggregate)try{h=l8.seriesAgg(l[u],k7[H8(e)])}catch(e){}else l[u]&&(h=l[u].$data);return i[Au(e.col,e.row)]=h}return i[Au(e.col,e.row)]=[],[]}(c,0,0,0,i))}}catch(e){u.e(e)}finally{u.f()}}}catch(e){a.e(e)}finally{a.f()}},M7=function(e,t,n){var r,i=k8(n);try{for(i.s();!(r=i.n()).done;){var o,a=r.value,s=e[a.s_r],u=s.new-s.old,c=(s=t[a.s_c]).new-s.old,l=k8(a.row_heads);try{for(l.s();!(o=l.n()).done;){var h=o.value;h&&(h.Row=h.Row+u)}}catch(e){l.e(e)}finally{l.f()}var f,d=k8(a.col_heads);try{for(d.s();!(f=d.n()).done;){var p=f.value;p&&(p.Column=p.Column+c)}}catch(e){d.e(e)}finally{d.f()}var m,g=k8(a.expand_cells);try{for(g.s();!(m=g.n()).done;){var A=m.value;A&&(A.Row=A.Row+u,A.Column=A.Column+c)}}catch(e){g.e(e)}finally{g.f()}}}catch(e){i.e(e)}finally{i.f()}},j7=function(e,t,n,r){for(var i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,o=5<arguments.length&&void 0!==arguments[5]?arguments[5]:0,a=[],s=[],u=e.length,c=t.length,l=n.length,h=0;h<u;h++)for(var f=e[h],d=0;d<f.expand;d++){var p=h7(r.RowHead[h+i]);p&&(p.Row=d+f.new+i,a.push(p))}for(var m=0;m<c;m++)for(var g=t[m],A=0;A<g.expand;A++){var v=h7(r.ColumnHead[m+o]);v&&(v.Column=A+g.new+o,s.push(v))}for(var b=0;b<l;b++){var y,w=n[l-b-1],x=k8(w.row_heads);try{for(x.s();!(y=x.n()).done;){var C=y.value;try{C&&(a[C.Row]=C)}catch(e){}}}catch(e){x.e(e)}finally{x.f()}var k,E=k8(w.col_heads);try{for(E.s();!(k=E.n()).done;){var S=k.value;try{S&&(s[S.Column]=S)}catch(e){}}}catch(e){E.e(e)}finally{E.f()}}return[a,s]},N7=function(e,t,n,r,i){for(var o=5<arguments.length&&void 0!==arguments[5]?arguments[5]:0,a=6<arguments.length&&void 0!==arguments[6]?arguments[6]:0,s=7<arguments.length&&void 0!==arguments[7]&&arguments[7],u=[],c=0;c<e;c++)for(var l=r[c],h=0;h<t;h++){var f=i[h],d=n[c][h];if(null!=d&&!d.in_group)if(d.type==F6.N_CELL){var p=h7(d.cell_info);if(d.expansion!=F6.EXPAND_NONE){if(p.RowSpan=0,p.ColumnSpan=0,d.expansion==F6.EXPAND_BOTH||d.expansion==F6.EXPAND_DOWN)for(var m=0;m<d.rowspan;m++){var g=r[c+m];p.RowSpan=p.RowSpan+g.expand}if(d.expansion==F6.EXPAND_BOTH||d.expansion==F6.EXPAND_RIGHT)for(var A=0;A<d.colspan;A++)cm=i[h+A],p.ColumnSpan=p.ColumnSpan+cm.expand;p.ColumnSpan=0==p.ColumnSpan?1:p.ColumnSpan,p.RowSpan=0==p.RowSpan?1:p.RowSpan}else p.RowSpan=d.rowspan,p.ColumnSpan=d.colspan;p.Row=l.new+o,p.Column=f.new+a,u.push(p)}else{var v=d.expansion!=F6.EXPAND_RIGHT,b=d.expansion==F6.EXPAND_NONE&&0<d.count?1:d.count;if(0==b){var y=h7(d.cell_info);u.push(y),y.Value="",y.Row=l.new+o,y.Column=f.new+a}else if(d.type==F6.D_CELL&&d.merge)for(var w="",x=null,C=0;C<b;C++){var k=v7(d.data[C]),E=JSON.stringify(k);null==x||w!=E?(x=h7(d.cell_info),u.push(x),w=E,x.Value=k,x.Row=l.new+o,x.Column=f.new+a,v?x.Row=x.Row+C*d.rowspan:x.Column=x.Column+C*d.colspan):v?x.RowSpan=x.RowSpan+d.rowspan:x.ColumnSpan=x.ColumnSpan+d.colspan}else for(var S=0;S<b;S++){var _=h7(d.cell_info);if(u.push(_),d.type==F6.D_CELL){if(_.Value=v7(d.data[S]),d.penetrate&&d.cell_info)try{_.PenetrateDict=x8({},d.cell_info.Value.trim(),_.Value)}catch(e){_.PenetrateDict=x8({},d.cell_info.Value,_.Value)}}else{var O=v?0:S;s&&(_.row_offset=v?S:0,_.col_offset=O,_.f_cells=h7(d.f_cells))}_.Row=l.new+o,_.Column=f.new+a,v?_.Row=_.Row+S*d.rowspan:_.Column=_.Column+S*d.colspan}}}return u},F7=function(e,t,n,r){var i=[];if(e==p6.F_DIRECT_Y)for(var o=[],a=t.getIndex().$$rows$$,s=(I8(p=t.getColumn(),o,a),n.$columns.indexOf(r)),u=0,c=o;u<c.length;u++){var l,h=[],f=k8(c[u]);try{for(f.s();!(l=f.n()).done;){var d=l.value;h.push(n.$data[d][s])}}catch(e){f.e(e)}finally{f.f()}i.push(h)}else if(e==p6.F_DIRECT_X)for(var p=[],m=(a=t.getColumn().$$rows$$,I8(o=t.getIndex(),p,a),n.$columns.indexOf(r)),g=0,A=p;g<A.length;g++){var v,b=[],y=k8(A[g]);try{for(y.s();!(v=y.n()).done;){var w=v.value;b.push(n.$data[w][m])}}catch(e){y.e(e)}finally{y.f()}i.push(b)}else if(e==p6.F_DIRECT_XY){o=t.getIndex().$$rows$$,a=t.getColumn().$$rows$$,p=[d7(a,o)];for(var x=n.$columns.indexOf(r),C=0,k=p;C<k.length;C++){var E,S=[],_=k8(k[C]);try{for(_.s();!(E=_.n()).done;){var O=E.value;S.push(n.$data[O][x])}}catch(e){_.e(e)}finally{_.f()}i.push(S)}}return i},R7=function(e){return e.Column-e.o_c-(e.ColumnSpan-1)},P7=function(e,t,n){var r,i=k8(n);try{for(i.s();!(r=i.n()).done;){var o,a=k8(r.value);try{for(a.s();!(o=a.n()).done;){var s=o.value;if(s&&s.col===e&&s.row===t)return s}}catch(e){a.e(e)}finally{a.f()}}}catch(e){i.e(e)}finally{i.f()}},L7=function e(t,n,r){var i=r.cells;return P7(t,n,i)?r:r.parent?e(t,n,r.parent):null},U7=function(e,t,n){return(e=e["_".concat(t)])?e[n]:""},z7=function(e,t,n,r,i,o,a){var s,u=k8(n);try{for(u.s();!(s=u.n()).done;){var c,l=k8(s.value.expand_cells);try{for(l.s();!(c=l.n()).done;){var h=c.value;if(h&&"f_cells"in h&&h.f_cells)try{var f,d=h.Value,p="",m=0,g=k8(h.f_cells);try{for(g.s();!(f=g.n()).done;){var A=f.value;if(A&&A.resultCell){var v,b,y,w,x,C,k,E,S,_,O,T,D=C8(gu(A.resultCell),2),B=D[0],I=D[1],M=(P7(B,I,i),r[A.g_index]),j=0;if(P7(B,I,M.pCells))if(1==A.type)if(A.x&&!A.y){var N=C8(gu(A.x.cell),2),F=N[0],R=N[1],P=L7(F,R,M);if(P){var L=P.dataIndexsMap[A.x.cell],U=P.pivot_cells_map,z=P.pivotData[h.group_index],H=A.x.type,$=A.x.position;if(A.x.str,L&&L[0]){var Q=h.PenetrateDict,V=P7(F,R,i),q=V.config.value,G=y7(q);if(0<Object.keys(Q).length){var W=Q[G];j=null!=W&&U[G]&&U[G][W]?o7(L,H,$,W,G,Q,U,h):i7(a,A,h,h.expand_count)}else{var K=h.kvmaps,Y=h.kvmap;if(K&&Y){var X,J=V.column_name==Y.name,Z=z.$$indexField$$,ee=z.$$indexs$$,te=null,ne=k8(Z);try{for(ne.s();!(X=ne.n()).done;){var re=X.value,ie=te||ee;if(J&&re===Y.name){te=ie;break}if(te=(te=x7(ie,re))&&te[K[re]],!J&&re===Y.name)break}}catch(i){ne.e(i)}finally{ne.f()}if(te){h.expand_count;var oe=te.ordertoArray();if(!(oe.length<1)){var ae=0,se=J?y6.findIndex(oe,Y.value):h.expand_count,ue=(1==H?ae=se-$:2==H?ae=se+$:3==H?ae=L.length-$:4==H?ae=$-1:5==H&&(ae=se),oe[ae]);if(void 0===ue)j=0;else{for(var ce=te.$$path$$,le=!1,he=(Z[0]==ce&&(le=!0),h7(K)),fe=(delete he[ce],U[G][ue]),de=[],pe=0;pe<fe.length;pe++){var me=fe[pe];if(me.o_c===B&&me.o_r===I){var ge=!0;if(!le){var Ae,ve=me.kvmaps;for(Ae in he){var be=he[Ae];if(null!=ve[Ae]&&be!=ve[Ae]){ge=!1;break}}}ge&&de.push(Au(me.Column,me.Row))}}j=de}}}}else j=i7(a,A,h,h.expand_count)}}else j=i7(a,A,h,h.expand_count)}else j=i7(a,A,h,h.expand_count)}else!A.x&&A.y?(b=(v=C8(gu(A.y.cell),2))[0],y=v[1],j=(w=L7(b,y,M))&&(x=w.dataColumnsMap[A.y.cell],C=w.pivot_cells_map,k=A.y.type,E=A.y.position,A.y.str,x&&x[0]&&(S=h.PenetrateDict,_=P7(b,y,i).config.value,T=S[O=y7(_)],h.expand_count,null!=T&&C[O]&&C[O][T]))?o7(x,k,E,T,O,S,C,h):i7(a,A,h,h.expand_count)):A.x&&A.y&&(j=i7(a,A,h,h.expand_count));else if(2==A.type)if(A.x&&A.y){var ye=C8(gu(A.x.cell),2),we=ye[0],xe=ye[1],Ce=C8(gu(A.y.cell),2),ke=Ce[0],Ee=Ce[1],Se=L7(B,I,M),_e=A.x.type,Oe=A.y.type,Te=A.x.position,De=A.y.position;if(Se){var Be=Se.pivot_cells_map,Ie=Se.dataIndexsMap[A.x.cell],Me=Se.dataIndexsMap[A.y.cell];if(Ie&&Ie[0]){var je=h.PenetrateDict,Ne=P7(we,xe,i).config.value,Fe=y7(Ne),Re=P7(ke,Ee,i).config.value,Pe=y7(Re);if(0<Object.keys(je).length){var Le,Ue=o7(Ie,_e,Te,je[Fe],Fe,je,Be,h);j=Ue&&(Array.isArray(Ue)||(Ue=[Ue]),Le=o7(Me,Oe,De,je[Pe],Pe,je,Be,h))?(Array.isArray(Le)||(Le=[Le]),d7(new Set(Le),new Set(Ue))):0}else{for(var ze=h.kvmaps,He=null,$e=0;$e<Ie.length;$e++){var Qe,Ve=Ie[$e].kvmap,qe=!0;for(Qe in Ve){var Ge=Ve[Qe];if(null!=ze[Qe]&&Ge!=ze[Qe]){qe=!1;break}}qe&&(He=$e)}if(He){var We=null,Ke=He,Ye=(1==_e?We=Ke-Te:2==_e?We=Ke+Te:3==_e?We=Ie.length-Te:4==_e?We=Te-1:5==_e&&(We=Ke),Ie[We]);if(Ye){var Xe=Ye.value,Je=Ye.kvmap,Ze=Be[Fe][Xe];if(Ze){for(var et=[],tt=0;tt<Ze.length;tt++){var nt=Ze[tt],rt=nt.kvmaps;if(nt.o_c===B&&nt.o_r===I){var it,ot=!0;for(it in Je){var at=Je[it];if(null!=rt[it]&&at!=rt[it]){ot=!1;break}}ot&&et.push(Au(nt.Column,nt.Row))}}for(var st=null,ut=0;ut<Me.length;ut++){var ct,lt=Me[ut].kvmap,ht=!0;for(ct in lt){var ft=lt[ct];if(null!=Je[ct]&&ft!=Je[ct]){ht=!1;break}}ht&&(st?st.push(Me[ut]):st=[Me[ut]])}if(st){var dt;if(null==(dt=3==Oe?st.length-De:4==Oe?De-1:null))j=0;else{var pt=st[dt];if(pt){var mt=pt.value,gt=pt.kvmap,At=Be[Pe][mt];if(At){for(var vt=[],bt=0;bt<At.length;bt++){var yt=At[bt],wt=yt.kvmaps;if(yt.o_c===B&&yt.o_r===I){var xt,Ct=!0;for(xt in gt){var kt=gt[xt];if(null!=wt[xt]&&kt!=wt[xt]){Ct=!1;break}}Ct&&vt.push(Au(yt.Column,yt.Row))}}j=d7(new Set(vt),new Set(et))}else j=0}else j=0}}else j=0}else j=0}else j=0}else j=0}}else j=i7(a,A,h,h.expand_count)}}else j=i7(a,A,h,h.expand_count);else j=4==A.type?h.expand_count+1:(5!=A.type&&A.type,B==h.o_r&&I==h.o_c?0:i7(a,A,h,h.expand_count));else j=function(e,t,n){if(r=e[t.resultCell])for(var r=Qw.a.cloneDeep(r),i=Au(n.o_c,n.o_r),o=0;o<r.length;o++)if(r[o]==i){r[o]=0;break}return r}(a,A,h);(j=null==j?0:j).length,p=p+d.substring(m,A.start)+JSON.stringify(j),m=A.end}}}catch(i){g.e(i)}finally{g.f()}p+=d.substring(m),h.Value=p}catch(i){}}}catch(i){l.e(i)}finally{l.f()}}}catch(i){u.e(i)}finally{u.f()}},H7=function(e){return Qw.a.uniqWith(e,(function(e,t){return e.Column==t.Column&&e.Row==t.Row}))},$7=function(e,t,n,r,i,o){var a,s,u,c,l,h=k8(n);try{for(h.s();!(a=h.n()).done;){var f,d=k8(a.value.expand_cells);try{for(d.s();!(f=d.n()).done;){var p=f.value;if(p){var m=!1,g=null;if("f_cells"in p&&p.f_cells){try{var A,v=p.Value,b="",y=0,w=k8(p.f_cells);try{for(w.s();!(A=w.n()).done;){var x=A.value;if(x&&x.resultCell){g=x.g_index;var C,k,E,S,_,O,T,D,B,I,M,j,N,F=C8(gu(x.resultCell),2),R=F[0],P=F[1],L=P7(R,P,i),U=r[x.g_index],z="",H=(x.start,x.end,!1);if(r7(L))if(P7(R,P,U.pCells))if(1==x.type){if(x.x&&!x.y){var $=C8(gu(x.x.cell),2),Q=$[0],V=$[1],q=L7(Q,V,U),G=p.expand_count;if(q){var W=q.dataIndexsMap[x.x.cell],K=q.pivotData[p.group_index],Y=(K.$$valuesField$$,K.$$indexField$$),X=(K.$$columnsField$$,K.$$grpColumns$$),J=x.x.type,Z=x.x.position;if(x.x.str,W&&W[0])if(v6(x.x.type))if(x.x.type===b6.POSITION_TYPE_NO_OFFSET)z=n7(x,p,o);else{var ee=0,te=p.kvmaps,ne=p.kvmap;if(te&&ne){var re,ie,oe,ae=K.$$indexField$$,se=K.$$indexs$$,ue=null,ce=k8(ae);try{for(ce.s();!(re=ce.n()).done;){var le=re.value;if(ue=(ue=x7(ue||se,le))&&ue[te[le]],le===ne.name)break}}catch(i){ce.e(i)}finally{ce.f()}z=ue?(ie=ue.ordertoArray()).length<1?"":(x.x.type===b6.POSITION_TYPE_BACK?ee=ie.length-Z:x.x.type===b6.POSITION_TYPE_SELF&&(ee=Z-1),ue=ue[ie[ee]],oe=K.$$grpColumns$$,C7(ue,L,oe)):n7(x,p,o)}else z=n7(x,p,o)}else z=function(e,t,n,r,i,o,a,s,u,c,l,h){var f=null,d=0;r=parseInt(r);var p=(m=C8(gu(c.x.cell),2))[0],m=m[1],g=(p=P7(p,m,h),o.kvmaps),A=o.kvmap;if(g&&A){var v,b=p.column_name==A.name,y=(m=i.$$indexField$$,i.$$indexs$$),w=null,x=k8(m);try{for(x.s();!(v=x.n()).done;){var C=v.value,k=w||y;if(b&&C===A.name){w=k;break}if(w=(w=x7(k,C))&&w[g[C]],!b&&C===A.name)break}}catch(e){x.e(e)}finally{x.f()}w?(h=o.expand_count,(p=w.ordertoArray()).length<1?f="":(m=0,m=b?y6.findIndex(p,A.value):o.expand_count,1==n?d=m-r:2==n?d=m+r:3==n&&(d=m),w=w[p[d]],m=i.$$grpColumns$$,(f=C7(w,a,m)).length<=o.all_count&&(f=f[h]||f))):f=n7(c,o,l)}else f=e7(e,t,n,r,i,0,a,s,u);return f}(W,G,J,Z,K,p,L,Y,X,x,o,i);else z=n7(x,p,o)}else z=n7(x,p,o)}else if(!x.x&&x.y){var he,fe,de,pe=C8(gu(x.y.cell),2),me=pe[0],ge=pe[1],Ae=L7(me,ge,U),ve=R7(p),be=(c=p).Row-c.o_r-(c.RowSpan-1);z=Ae&&(he=Ae.dataColumnsMap[x.y.cell],Ae.pivotData,fe=x.y.type,de=x.y.position,x.y.str,he&&he[0])?function(e,t,n,r,i,o){return o=parseInt(o),(e=e[t])?Array.isArray(e[0])?(t=e[n])?1==i?t[n=r-o]?t[n].value:"":2==i?t[n=r+o]?t[n].value:"":3==i?t[t.length-o]?t[t.length-o].value:"":void 0:"":1==i?e[n=r-o]?e[n].value:"":2==i?e[t=r+o]?e[t].value:"":3==i?e[e.length-o]?e[e.length-o].value:"":4==i?e[o-=1]?e[o].value:"":void 0:""}(Ae.dataColumnsMap,x.resultCell,be,ve,fe,de):U7(o,x.resultCell,ve)}else if(x.x&&x.y){var ye=x.x,we=x.y;if(s=ye,u=we,L.expansion!=F6.EXPAND_BOTH||(s.type!=b6.POSITION_TYPE_SELF&&s.type!=b6.POSITION_TYPE_BACK||u.type==b6.POSITION_TYPE_N)&&(s.type==b6.POSITION_TYPE_N||u.type!=b6.POSITION_TYPE_SELF&&u.type!=b6.POSITION_TYPE_BACK))z=n7(x,p,o);else{var xe=(xe=U.pivotData)[p.group_index],Ce=C8(gu(x.x.cell),2),ke=Ce[0],Ee=Ce[1],Se=P7(ke,Ee,i),_e=C8(gu(x.y.cell),2),Oe=_e[0],Te=_e[1],De=P7(Oe,Te,i);if(ye.type==b6.POSITION_TYPE_SELF||ye.type==b6.POSITION_TYPE_BACK){var Be=Se.column_name,Ie=De.column_name;if(xe.$$indexField$$.includes(Be)&&xe.$$columnsField$$.includes(Ie)){var Me=x7(xe.$$indexs$$,Be),je=x7(xe.$$columns$$,Ie),Ne=parseInt(we.position),Fe=parseInt(ye.position),Re=Me.ordertoArray(),Pe=Me[Be=ye.type==b6.POSITION_TYPE_SELF?Re[Fe-1]:Re[Re.length-Fe]].$$rows$$,Le=je.ordertoArray();if(x.direction===b6.F_DIRECT_XY&&we.type!==b6.POSITION_TYPE_BACK)for(var Ue=0,ze=(we.type==b6.POSITION_TYPE_SELF?Ue=Ne-1:we.type==b6.POSITION_TYPE_DOWN?Ue+=Ne:we.type==b6.POSITION_TYPE_UP?Ue-=Ne:(we.type,b6.POSITION_TYPE_NO_OFFSET),L.column_name),He=xe.$$grpColumns$$,$e=y6.findIndex(He,ze),Qe=xe.$$data$$,Ve=[],qe=0;qe<Le.length;qe++){var Ge,We,Ke,Ye=Le[Ue];Ue+=1,null!=Ye&&(Ge=je[Ye].$$rows$$,null!=(We=d7(Ge,Pe))[0]&&null!=(Ke=Qe[We[0]])&&Ve.push(Ke[$e]))}else{var Xe,Je,Ze,et,tt,nt=R7(p);we.type==b6.POSITION_TYPE_SELF?Ie=Le[Ne-1]:we.type==b6.POSITION_TYPE_BACK?Ie=Le[Le.length-Ne]:we.type==b6.POSITION_TYPE_DOWN?Ie=Le[nt+Ne]:we.type==b6.POSITION_TYPE_UP?Ie=Le[nt-Ne]:we.type==b6.POSITION_TYPE_NO_OFFSET&&(Ie=Le[nt]),Ie&&(Le=je[Ie].$$rows$$,null!=(Xe=d7(Le,Pe))[0]&&null!=(Je=xe.$$data$$[Xe[0]])&&(Ze=L.column_name,et=xe.$$grpColumns$$,tt=y6.findIndex(et,Ze),z=Je[tt]))}}else z=n7(x,p,o)}else if(we.type==b6.POSITION_TYPE_SELF||we.type==b6.POSITION_TYPE_BACK){var rt=Se.column_name,it=De.column_name;if(xe.$$indexField$$.includes(rt)&&xe.$$columnsField$$.includes(it)){var ot=x7(xe.$$indexs$$,rt),at=x7(xe.$$columns$$,it),st=parseInt(we.position),ut=parseInt(ye.position),ct=at.ordertoArray(),lt=at[it=we.type==b6.POSITION_TYPE_SELF?ct[st-1]:ct[ct.length-st]].$$rows$$,ht=ot.ordertoArray();if(x.direction===b6.F_DIRECT_XY&&ye.type!==b6.POSITION_TYPE_BACK){for(var ft=0,dt=(ye.type==b6.POSITION_TYPE_SELF?ft=ut-1:ye.type==b6.POSITION_TYPE_DOWN?ft+=ut:ye.type==b6.POSITION_TYPE_UP?ft-=ut:(ye.type,b6.POSITION_TYPE_NO_OFFSET),L.column_name),pt=xe.$$grpColumns$$,mt=y6.findIndex(pt,dt),gt=xe.$$data$$,At=[],vt=0;vt<ht.length;vt++){var bt,yt,wt,xt=ht[ft];ft+=1,null!=xt&&(bt=ot[xt].$$rows$$,null!=(yt=d7(bt,lt))[0]&&null!=(wt=gt[yt[0]])&&At.push(wt[mt]))}z=At}else{var Ct,kt,Et,St,_t,Ot=p.expand_count;ye.type==b6.POSITION_TYPE_SELF?rt=ht[ut-1]:ye.type==b6.POSITION_TYPE_BACK?rt=ht[ht.length-ut]:ye.type==b6.POSITION_TYPE_DOWN?rt=ht[Ot+ut]:ye.type==b6.POSITION_TYPE_UP?rt=ht[Ot-ut]:ye.type==b6.POSITION_TYPE_NO_OFFSET&&(rt=ht[Ot]),rt&&(ht=ot[rt].$$rows$$,null!=(Ct=d7(ht,lt))[0]&&null!=(kt=xe.$$data$$[Ct[0]])&&(Et=L.column_name,St=xe.$$grpColumns$$,_t=y6.findIndex(St,Et),z=kt[_t]))}}else z=n7(x,p,o)}}}}else 2==x.type?x.x&&x.y&&v6(x.x.type)&&v6(x.y.type)&&(x.x,x.y,U.pivotData,k=(C=C8(gu(x.x.cell),2))[0],E=C[1],P7(k,E,i),_=(S=C8(gu(x.y.cell),2))[0],O=S[1],T=P7(_,O,i),(D=L7(k,E,U))&&(B=D.dataIndexsMap[x.x.cell],(I=D.pivotData[p.group_index]).$$valuesField$$,M=I.$$indexField$$,j=I.$$columnsField$$,N=x.x.position,B&&B[0]&&x.x.type!==b6.POSITION_TYPE_NO_OFFSET)?function(){var e,t,n,r,i,a,s,u=0,c=(x.x.type===b6.POSITION_TYPE_BACK?u=B.length-N:x.x.type===b6.POSITION_TYPE_SELF&&(u=N-1),u=B[u],y6.findIndex(I.$$grpColumns$$,L.column_name)),l=I.$$data$$;u&&(t=u.name,u=u.value,e=null,M.includes(t)?e=I.$$indexs$$:j.includes(t)&&(e=I.$$columns$$),e=x7(e,t))?(e=(t=e[u]).$$rows$$,u=x.y.position,M.includes(T.column_name)?(n=(t=x7(t,T.column_name)).ordertoArray()[u-1],(t=t[n])?(n=t.$$rows$$,t=d7(n,e),x.direction==b6.F_DIRECT_X?(n=p.expand_count,n=function(e,t,n){if(t+=1,n=parseInt(n),isNaN(n))return null;for(var r=0,i=null,o=(n=0,0);o<e.length;o++){var a=e[o];if(t<=(r+=a.count)){r-=(i=a).count;break}}return i?t-1-r:n}(yc,n,N),r=I.$$data$$,i=[],t.forEach((function(e){r[e]&&i.push(r[e][c])})),z=i[n]):x.direction!=b6.F_DIRECT_XY&&x.direction!=b6.F_DIRECT_AUTO&&x.direction!=b6.F_DIRECT_Y||(a=I.$$data$$,s=[],t.forEach((function(e){a[e]&&s.push(a[e][c])})),z=s)):z=n7(x,p,o)):(e=e[u],z=l[e][c])):z=n7(x,p,o)}():z=n7(x,p,o)):3==x.type?(z=o["_".concat(x.resultCell)],x.filter&&(z=Y8(x.filter,z,x,p,o,0,0,0,0,i,r))):4==x.type?z=function(e,t,n,r,i,o){var a,s=null,u=O7(e,t,n),c=e,l=(u||(c=L7(t,n,e)),_7(r.column_name)),h=null,f=null,d=(t=c.pivotData,c.indexs),p=!1;for(a in i.PenetrateDict){for(var m=l+"."+a,g=0;g<d.length;g++)if(m==d[g].config.value){p=!0,h=m,f=i.PenetrateDict[a];break}if(p)break}if(h)n=i.group_index,t=t[n=u?n:0],h+="_"+o.resultCell,e=null,t.$$indexField$$.includes(h)?e=x7(t.$$indexs$$,h):t.$$columnsField$$.includes(column_name)&&(e=x7(t.$$columns$$,h)),t.$$grpColumns$$,s=e&&e[f]?(e=e[f],i.o_r===r.row||i.o_c===r.col?i.expand_count+1:P8(e)):null;else if(u){var A=(t=t[i.group_index]).$$indexs$$;if(b=i.kvmaps){var v,b=h7(b),y=(c=t.$$indexField$$,t.$$columnsField$$,null),w=k8(c);try{for(w.s();!(v=w.n()).done;){var x=v.value,C=y||A;y=C;if(x==r.column_name)break;y=(y=x7(C,x))&&y[b[x]]}}catch(e){w.e(e)}finally{w.f()}A=y}if(!A)return s;b=i.kvmap,t.$$grpColumns$$,s=i.o_r===r.row||i.o_c===r.col?b&&b.name==r.column_name?y6.findIndex(A.ordertoArray(),b.value)+1:i.expand_count+1:P8(A=A[b.value])}else s=null;return s}(U,R,P,L,p,x):5!=x.type&&6!=x.type||(z=t7(U,R,P,L,p,o,x));else z=o["_".concat(x.resultCell)];else z=L.value,(l=L)&&l.type===F6.F_CELL&&(H=m=!0,z=x.str);(z=null==z?"":z).length,H||(z=JSON.stringify(z)),b=b+v.substring(y,x.start)+z,y=x.end}}}catch(i){w.e(i)}finally{w.f()}b+=v.substring(y),p.Value=b}catch(i){}}if(m){var Tt,Dt=P6(p.Value),Bt=k8(Dt);try{for(Bt.s();!(Tt=Bt.n()).done;)Tt.value.g_index=g}catch(i){Bt.e(i)}finally{Bt.f()}p.f_cells=Dt}else p.f_cells=null}}}catch(i){d.e(i)}finally{d.f()}}}catch(i){h.e(i)}finally{h.f()}},Q7=function(e){var t={};return e.forEach((function(e){var n=e.s_c,r=e.s_r,i=e.e_c,o=e.e_r,a=e.expand_cols,s=e.expand_rows,u=Au(n,r)+"-"+Au(i,o),c=(e=C8(j8(e,{},{},!0),4))[0],l=e[1];e[2],e=e[3];t[u]={indexs:l,columns:c,values:e,s_c:n,s_r:r,e_c:i,e_r:o,expand_cols:a,expand_rows:s}})),t},V7=function(){e=g8().mark((function e(t,n,r){var i;return g8().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(c7=!0,s7=n,u7=r||{},Array.isArray(n)?l7=1:"object"==v8(n)&&(l7=2),ec(s7)){e.next=9;break}return i=[],s7.forEach((function(e,t){var n;2==e.type?i.push(Ku(e).then((function(n){return n=f3.a.query(n,e.xpath)[0]||[],Promise.resolve({data:n,index:t})}))):3!=e.type&&(n=new Promise((function(n,r){n({data:e.response_data,index:t})})),i.push(n))})),e.next=9,Xu(i).then((function(e){var t,n=k8(e);try{for(n.s();!(t=n.n()).done;){var r=t.value,i=r.data,o=r.index;s7[o].response_data=i}}catch(e){n.e(e)}finally{n.f()}}));case 9:return e.abrupt("return",a7(t));case 10:case"end":return e.stop()}}),e)}));var e,t=function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){A8(o,r,i,a,s,"next",e)}function s(e){A8(o,r,i,a,s,"throw",e)}a(void 0)}))};return function(e,n,r){return t.apply(this,arguments)}}();function q7(e){return(q7="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function G7(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(e,t)||e9(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function W7(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function K7(e,t,n){var r=e;if(t.has(r))throw new TypeError("Cannot initialize the same private elements twice on an object");t.set(e,n)}function Y7(e,t){return(t=J7(e,t,"get")).get?t.get.call(e):t.value}function X7(e,t,n){if((t=J7(e,t,"set")).set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}function J7(e,t,n){if(t.has(e))return t.get(e);throw new TypeError("attempted to "+n+" private field on non-instance")}function Z7(e,t){var n,r,i,o,a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(a)return r=!(n=!0),{s:function(){a=a.call(e)},n:function(){var e=a.next();return n=e.done,e},e:function(e){r=!0,i=e},f:function(){try{n||null==a.return||a.return()}finally{if(r)throw i}}};if(Array.isArray(e)||(a=e9(e))||t&&e&&"number"==typeof e.length)return a&&(e=a),o=0,{s:t=function(){},n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function e9(e,t){var n;if(e)return"string"==typeof e?t9(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?t9(e,t):void 0}function t9(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function n9(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */n9=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=(d="function"==typeof Symbol?Symbol:{}).iterator||"@@iterator",i=d.asyncIterator||"@@asyncIterator",o=d.toStringTag||"@@toStringTag";function a(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{a({},"")}catch(t){a=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var i,o,a,s;t=t&&t.prototype instanceof l?t:l,t=Object.create(t.prototype),r=new y(r||[]);return t._invoke=(i=e,o=n,a=r,s="suspendedStart",function(e,t){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===e)throw t;return{value:void 0,done:!0}}for(a.method=e,a.arg=t;;){var n=a.delegate;if(n&&(n=function e(t,n){var r=t.iterator[n.method];if(void 0===r){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=void 0,e(t,n),"throw"===n.method))return c;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}return"throw"===(r=u(r,t.iterator,n.arg)).type?(n.method="throw",n.arg=r.arg,n.delegate=null,c):(r=r.arg)?r.done?(n[t.resultName]=r.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=void 0),n.delegate=null,c):r:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,c)}(n,a))){if(n===c)continue;return n}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if("suspendedStart"===s)throw s="completed",a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);if(s="executing","normal"===(n=u(i,o,a)).type){if(s=a.done?"completed":"suspendedYield",n.arg===c)continue;return{value:n.arg,done:a.done}}"throw"===n.type&&(s="completed",a.method="throw",a.arg=n.arg)}}),t}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var c={};function l(){}function h(){}function f(){}var d,p,m=((p=(p=(a(d={},r,(function(){return this})),Object.getPrototypeOf))&&p(p(w([]))))&&p!==t&&n.call(p,r)&&(d=p),f.prototype=l.prototype=Object.create(d));function g(e){["next","throw","return"].forEach((function(t){a(e,t,(function(e){return this._invoke(t,e)}))}))}function A(e,t){var r;this._invoke=function(i,o){function a(){return new t((function(r,a){!function r(i,o,a,s){var c;if("throw"!==(i=u(e[i],e,o)).type)return(o=(c=i.arg).value)&&"object"==q7(o)&&n.call(o,"__await")?t.resolve(o.__await).then((function(e){r("next",e,a,s)}),(function(e){r("throw",e,a,s)})):t.resolve(o).then((function(e){c.value=e,a(c)}),(function(e){return r("throw",e,a,s)}));s(i.arg)}(i,o,r,a)}))}return r=r?r.then(a,a):a()}}function v(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function b(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function y(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(v,this),this.reset(!0)}function w(e){if(e){var t,i=e[r];if(i)return i.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return t=-1,(i=function r(){for(;++t<e.length;)if(n.call(e,t))return r.value=e[t],r.done=!1,r;return r.value=void 0,r.done=!0,r}).next=i}return{next:x}}function x(){return{value:void 0,done:!0}}return a(m,"constructor",h.prototype=f),a(f,"constructor",h),h.displayName=a(f,o,"GeneratorFunction"),e.isGeneratorFunction=function(e){return!!(e="function"==typeof e&&e.constructor)&&(e===h||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,a(e,o,"GeneratorFunction")),e.prototype=Object.create(m),e},e.awrap=function(e){return{__await:e}},g(A.prototype),a(A.prototype,i,(function(){return this})),e.AsyncIterator=A,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new A(s(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},g(m),a(m,o,"Generator"),a(m,r,(function(){return this})),a(m,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t,n=[];for(t in e)n.push(t);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=w,y.prototype={constructor:y,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(b),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;0<=i;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(s&&u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;0<=r;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}var a=(o=o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc?null:o)?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,c):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),c},finish:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),b(n),c}},catch:function(e){for(var t=this.tryEntries.length-1;0<=t;--t){var n,r,i=this.tryEntries[t];if(i.tryLoc===e)return"throw"===(n=i.completion).type&&(r=n.arg,b(i)),r}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:w(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},e}function r9(e,t,n,r,i,o,a){try{var s=e[o](a),u=s.value}catch(e){return void n(e)}s.done?t(u):Promise.resolve(u).then(r,i)}function i9(e){return function(){var t=this,n=arguments;return new Promise((function(r,i){var o=e.apply(t,n);function a(e){r9(o,r,i,a,s,"next",e)}function s(e){r9(o,r,i,a,s,"throw",e)}a(void 0)}))}}var o9=function(){var e=i9(n9().mark((function e(t){var n,r,i,o;return n9().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n="".concat(t.url).concat("/s/public/auth/api/"),i="ApiToken ".concat(t.key,";").concat(t.secret),(r=new Headers).append("Authorization",i),i=new Request(n),o=[],e.next=8,fetch(i,{method:"GET",headers:r,mode:"cors",cache:"default"}).then((function(e){return e.json()})).then((function(e){o=e.results})).catch((function(e){}));case 8:return e.abrupt("return",o);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),a9=function(){var e=i9(n9().mark((function e(t,n,r){var i,o,a,s,u,c,l,h,f,d,p,m;return n9().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=[],t&&0<t.length)return o=[],a="ApiToken ".concat((l=r).key,";").concat(l.secret),e.next=8,o9(l).then((function(e){o=e})).catch((function(e){}));e.next=49;break;case 8:s={},u=[],c=Z7(t),e.prev=12,c.s();case 14:if((l=c.n()).done){e.next=38;break}h=l.value,f=Z7(o),e.prev=17,f.s();case 19:if((d=f.n()).done)e.next=27;else{if((d=d.value).name==h.name)return h.request_method=d.request_method,h.path=d.path,e.abrupt("break",27);e.next=25}break;case 25:e.next=19;break;case 27:e.next=32;break;case 29:e.prev=29,e.t0=e.catch(17),f.e(e.t0);case 32:return e.prev=32,f.f(),e.finish(32);case 35:s[h.path]=Yu({params:n,headers:{Authorization:a},url:"".concat(r.url,"/s/public/api/").concat(h.path),method:0==h.request_method?"GET":"POST"},h.name);case 36:e.next=14;break;case 38:e.next=43;break;case 40:e.prev=40,e.t1=e.catch(12),c.e(e.t1);case 43:return e.prev=43,c.f(),e.finish(43);case 46:for(p in s)m=s[p],u.push(m);return e.next=49,Xu(u).then((function(e){i=e}));case 49:return e.abrupt("return",i);case 50:case"end":return e.stop()}}),e,null,[[12,40,43,46],[17,29,32,35]])})));return function(t,n,r){return e.apply(this,arguments)}}(),s9=new WeakMap,u9=new WeakMap,c9=function(){function e(t){var n=this,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},i=2<arguments.length?arguments[2]:void 0,o=3<arguments.length?arguments[3]:void 0,a=4<arguments.length?arguments[4]:void 0,u=5<arguments.length&&void 0!==arguments[5]?arguments[5]:[],c=6<arguments.length&&void 0!==arguments[6]?arguments[6]:[{name:"",response_data:[]}],l=this,h=e;if(!(l instanceof h))throw new TypeError("Cannot call a class as a function");K7(this,s9,{writable:!0,value:!1}),K7(this,u9,{writable:!0,value:null}),l=t,this.options=r,this.sheetIndex=0,this.sheetType="preview",this.datas=[],X7(this,s9,i),X7(this,u9,o),this.jsonDataConfig=c,this.reportConfig=u,"string"==typeof t&&(l=document.querySelector(t)),this.bottombar=new tK((function(){var e;n.options.showEditSheetName||(e=n.addSheet()),n.sheet.resetData(e)}),(function(e){e=n.datas[e],n.sheet.resetData(e)}),(function(e){switch(e){case"delete":n.deleteSheet();break;case"copy":n.copySheet();break;case"merge":n.mergeSheet()}}),(function(e,t){n.datas[e].name=t}),(function(e,t){n.changeSheet(e,t)})),this.data=this.addSheet(),h=s("div","".concat(pe)).on("contextmenu",(function(e){return e.preventDefault()})),l.appendChild(h.el),this.rootEl=h,this.sheet=new FW(h,this.data,this,a),this.config={},h.child(this.bottombar.el),this.cacheDatas={},this.data.settings.showBottombar?this.bottombar.show():this.bottombar.hide(),this._update(),this.data.settings.showBottombarMenu||this.bottombar.hideMenu()}var t,n,r,i,o,a,c,l;return t=e,n=[{key:"commitUpdate",value:function(e){var t=this;try{setTimeout((function(){t.requestData(e,!1)}))}catch(e){}}},{key:"update",value:(l=i9(n9().mark((function e(t,n){var r,i,o,a,s,u,c,l,h,f,d,p,m,g,A,v,b=this;return n9().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t&&(this.reportConfig=t),n&&(this.jsonDataConfig=n),r={},e.prev=3,this.sheet.previewToolbar.paramsUpdate(t[0].SheetData.paramsConfig),!(0<(i=(i=t[0].SheetData.paramsConfig).filter((function(e){if(2==e.optionsType)return e}))).length)){e.next=93;break}s=t[0].SheetData.dataConfig||[],o=t[0].SheetData.apiConfig||[],a=s.filter((function(e){if(3==e.type)return e})),s=s.filter((function(e){if(4==e.type)return e})),u=[],c=Z7(i),e.prev=14,c.s();case 16:if((l=c.n()).done){e.next=38;break}l=l.value,h=Z7(a),e.prev=19,h.s();case 21:if((p=h.n()).done)e.next=28;else{if(p=p.value,l.linkSheet==p.name)return u.push(p),e.abrupt("break",28);e.next=26}break;case 26:e.next=21;break;case 28:e.next=33;break;case 30:e.prev=30,e.t0=e.catch(19),h.e(e.t0);case 33:return e.prev=33,h.f(),e.finish(33);case 36:e.next=16;break;case 38:e.next=43;break;case 40:e.prev=40,e.t1=e.catch(14),c.e(e.t1);case 43:return e.prev=43,c.f(),e.finish(43);case 46:a=u,f=[],d=Z7(i),e.prev=49,d.s();case 51:if((p=d.n()).done){e.next=73;break}m=p.value,g=Z7(s),e.prev=54,g.s();case 56:if((v=g.n()).done)e.next=63;else{if(v=v.value,m.linkSheet==v.name)return f.push(v),e.abrupt("break",63);e.next=61}break;case 61:e.next=56;break;case 63:e.next=68;break;case 65:e.prev=65,e.t2=e.catch(54),g.e(e.t2);case 68:return e.prev=68,g.f(),e.finish(68);case 71:e.next=51;break;case 73:e.next=78;break;case 75:e.prev=75,e.t3=e.catch(49),d.e(e.t3);case 78:return e.prev=78,d.f(),e.finish(78);case 81:return s=f,A=[],e.next=85,a9(a,[],o).then((function(e){e.forEach((function(e){return A.push(e)}))})).catch((function(e){}));case 85:if("function"==typeof(v=this.data.settings.onUpdateData))return e.next=89,v(s,[],"params").then((function(e){e.forEach((function(e){var t=e.response_data||[];e.response_data=Qu(t,[])||[],A.push(e)}))})).catch((function(e){}));e.next=89;break;case 89:this.sheet.previewToolbar.setSheetData(A),setTimeout((function(){r=b.sheet.previewToolbar.getParams(),b.requestData(r,!1)})),e.next=94;break;case 93:setTimeout((function(){r=b.sheet.previewToolbar.getParams(),b.requestData(r,!1)}));case 94:e.next=99;break;case 96:e.prev=96,e.t4=e.catch(3);case 99:case"end":return e.stop()}}),e,this,[[3,96],[14,40,43,46],[19,30,33,36],[49,75,78,81],[54,65,68,71]])}))),function(e,t){return l.apply(this,arguments)})},{key:"_update",value:(c=i9(n9().mark((function e(){var t,n,r,i,o,a,s,u,c,l,h,f,d,p,m,g,A=this;return n9().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t={},!(r=this.reportConfig)||!r[0]){e.next=95;break}if(r[0].SheetData.paramsConfig||(r[0].SheetData.paramsConfig=[]),this.sheet.previewToolbar.paramsUpdate(r[0].SheetData.paramsConfig),!(0<(n=(n=r[0].SheetData.paramsConfig).filter((function(e){if(2==e.optionsType)return e}))).length)){e.next=94;break}o=r[0].SheetData.dataConfig||[],r=r[0].SheetData.apiConfig||[],i=o.filter((function(e){if(3==e.type)return e})),o=o.filter((function(e){if(4==e.type)return e})),a=[],s=Z7(n),e.prev=15,s.s();case 17:if((u=s.n()).done){e.next=39;break}u=u.value,c=Z7(i),e.prev=20,c.s();case 22:if((f=c.n()).done)e.next=29;else{if(f=f.value,u.linkSheet==f.name)return a.push(f),e.abrupt("break",29);e.next=27}break;case 27:e.next=22;break;case 29:e.next=34;break;case 31:e.prev=31,e.t0=e.catch(20),c.e(e.t0);case 34:return e.prev=34,c.f(),e.finish(34);case 37:e.next=17;break;case 39:e.next=44;break;case 41:e.prev=41,e.t1=e.catch(15),s.e(e.t1);case 44:return e.prev=44,s.f(),e.finish(44);case 47:i=a,l=[],h=Z7(n),e.prev=50,h.s();case 52:if((f=h.n()).done){e.next=74;break}d=f.value,p=Z7(o),e.prev=55,p.s();case 57:if((g=p.n()).done)e.next=64;else{if(g=g.value,d.linkSheet==g.name)return l.push(g),e.abrupt("break",64);e.next=62}break;case 62:e.next=57;break;case 64:e.next=69;break;case 66:e.prev=66,e.t2=e.catch(55),p.e(e.t2);case 69:return e.prev=69,p.f(),e.finish(69);case 72:e.next=52;break;case 74:e.next=79;break;case 76:e.prev=76,e.t3=e.catch(50),h.e(e.t3);case 79:return e.prev=79,h.f(),e.finish(79);case 82:return o=l,m=[],e.next=86,a9(i,[],r).then((function(e){e.forEach((function(e){return m.push(e)}))})).catch((function(e){}));case 86:if("function"==typeof(g=this.data.settings.onUpdateData))return e.next=90,g(o,[],"params").then((function(e){e.forEach((function(e){var t=e.response_data||[];e.response_data=Qu(t,[])||[],m.push(e)}))})).catch((function(e){}));e.next=90;break;case 90:this.sheet.previewToolbar.setSheetData(m),setTimeout((function(){t=A.sheet.previewToolbar.getParams(),A.requestData(t,!0)})),e.next=95;break;case 94:setTimeout((function(){t=A.sheet.previewToolbar.getParams(),A.requestData(t,!0)}));case 95:case"end":return e.stop()}}),e,this,[[15,41,44,47],[20,31,34,37],[50,76,79,82],[55,66,69,72]])}))),function(){return c.apply(this,arguments)})},{key:"getRequestParams",value:function(){var e=[],t=[];return(0<arguments.length&&void 0!==arguments[0]?arguments[0]:[]).forEach((function(n){1==n.type?null!=n.value&&null!=n.value&&e.push(n):2==n.type&&t.push({name:n.name,value:n.value})})),{jsonParams:e,apiParams:t}}},{key:"requestData",value:(a=i9(n9().mark((function e(t,n){var r,i,o,a,s,u,c;return n9().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.jsonDataConfig,this.reportConfig[0]){e.next=3;break}return e.abrupt("return");case 3:return u=this.reportConfig[0].SheetData.dataConfig||[],i=this.reportConfig[0].SheetData.apiConfig||[],a=this.getRequestParams(t),o=a.jsonParams,a=a.apiParams,s=[],c=u.filter((function(e){if(3==e.type)return e})),u=u.filter((function(e){if(4==e.type)return e})),e.next=11,a9(c,a,i).then((function(e){e.forEach((function(e){return s.push(e)}))})).catch((function(e){}));case 11:if("function"==typeof(c=this.data.settings.onUpdateData))return e.next=15,c(u,a,"draw").then((function(e){e.forEach((function(e){var t=e.response_data||[];e.response_data=Qu(t,[])||[],s.push(e)}))})).catch((function(e){}));e.next=15;break;case 15:r=r.concat(s),r=this.filterData(r,o),this._pivotData(r,n);case 18:case"end":return e.stop()}}),e,this)}))),function(e,t){return a.apply(this,arguments)})},{key:"filterData",value:function(e,t){var n=[];return e.forEach((function(e){var r=Qu(e.response_data,t);n.push({name:e.name,response_data:r})})),n}},{key:"gs",value:function(){return Y7(this,s9)}},{key:"gsd",value:function(){return Y7(this,u9)}},{key:"addSheet",value:function(e){var t=this,n=!(1<arguments.length&&void 0!==arguments[1])||arguments[1],r=2<arguments.length?arguments[2]:void 0,i=3<arguments.length?arguments[3]:void 0,o=this.sheetIndex;i=i?Object.assign(this.options,i):this.options,e=this.checkName(e);return(o=new de(e,o,i)).change=function(){for(var e,n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];(e=t.sheet).trigger.apply(e,["change"].concat(r))},this.datas.push(o),this.bottombar.addItem(e,n,r),this.sheetIndex+=1,o}},{key:"createColorPicker",value:function(e,t,n){try{var r=new El.ColorPicker({position:"inline",container:e,color:"white",outputFormat:"hex",hideDelay:0,onConfirm:function(e){t(e)},onCancel:function(){n()}});return r.setColorsInPalette(Sl),r}catch(e){}}},{key:"checkName",value:function(e,t){return e||(e=this.bottombar.dataNames,this.loopName(e,e={name:"sheet1"}),e.name)}},{key:"loopName",value:function(e,t){for(var n=0;n<e.length;n++)if(e[n]===t.name){t.name="sheet"+(Number(t.name.split("sheet")[1])+1),this.loopName(e,t);break}}},{key:"getCurrentSheet",value:function(){return this.sheet.data}},{key:"deleteSheet",value:function(){var e=(t=G7(this.bottombar.deleteItem(),2))[0],t=t[1];0<=e&&(this.datas.splice(e,1),0<=t&&this.sheet.resetData(this.datas[t]))}},{key:"changeSheet",value:function(e,t){this.bottombar.changeData(this.datas,e,t)}},{key:"copySheet",value:function(){for(var e=this.bottombar.getSheetName()+"_复制",t=this.bottombar.getSheetIndex(),n=(t=_.cloneDeep(this.datas[t]),this.datas.push(t),t._index=this.datas.length-1,!0),r=this.bottombar.dataNames;n;){n=!1;for(var i=0;i<r.length;i++)r[i]===e&&(e+="_复制",n=!0)}t.name=e,this.bottombar.addItem(e,!1,this.options.showEditSheetName),this.sheetIndex+=1}},{key:"mergeSheet",value:function(){this.sheet.trigger("mergeSheet",(function(){}))}},{key:"render",value:function(){this.sheet.table.render()}},{key:"loadData",value:function(e,t,n){var r=Array.isArray(e)?e:[e];if(this.bottombar.clear(),this.datas=[],0<r.length){for(var i=[],o=0;o<r.length;o+=1){var a=r[o],s=void 0;this.options.showEditSheetName?(s=this.addSheet(a.name,0===o,this.options.showEditSheetName,t),this.sheetIndex=1):(this.sheetIndex=1,s=this.addSheet(a.name,0===o,!1,t)),s.setData(a),i.push(s)}this.sheet.resetData(i[n=null!=n?n:0]),this.bottombar.swapByIndex(n),t&&"hideRowCol"in t&&(bW.call(this.sheet),this.sheet.table.render()),t&&"showBottombar"in t&&(t.showBottombar?this.bottombar.show():this.bottombar.hide())}return this}},{key:"createData",value:function(e,t){return(e=new de(e,0,this.options)).setData(t),e}},{key:"getData",value:function(){return this.datas.map((function(e){return e.getData()}))}},{key:"_getData",value:function(){var e=this.getData();try{var t=this.sheet.getPivotData();if(t&&Array.isArray(t))return t}catch(e){}return e}},{key:"on",value:function(e,t){return this.sheet.on(e,t),this}},{key:"onRender",value:function(e,t){return this.sheet.table.on(e,t),this}},{key:"onSelectEditor",value:function(e,t){return this.sheet.editor.on(e,t),this}},{key:"onSelectSheet",value:function(e,t){this.bottombar.on(e,t)}},{key:"onInterceptSheet",value:function(e,t){this.bottombar.onIntercept(e,t)}},{key:"validate",value:function(){return this.data.validations.errors.size<=0}},{key:"change",value:function(e){return this.sheet.on("change",e),this}},{key:"mock",value:function(){hK&&this.loadData(hK),this.sheet.print.mockData=this.datas}},{key:"implicitTemplatePrint",value:function(e,t,n){if(!t)throw new Error("数据不存在");if(!Array.isArray(t))throw new Error("必须为数组");Array.isArray(t[0])||(t=[t]);var r,i=[],o=Z7(e);try{for(o.s();!(r=o.n()).done;){var a,s=Md(r.value),u=Z7(t);try{for(u.s();!(a=u.n()).done;){var c=a.value,l=V7(s,c);i.push(l)}}catch(e){u.e(e)}finally{u.f()}}}catch(e){o.e(e)}finally{o.f()}var h=this;Promise.all(i).then((function(e){var t,r=(e=G7(nn(e,null,h.sheetType),3))[0],i=(e[1],e[2]&&Zd(r),[]),o=Z7(r);try{for(o.s();!(t=o.n()).done;){var a=t.value,s=h.createData("sheet",a,{});i.push(s)}}catch(e){o.e(e)}finally{o.f()}print=print||i[0].printOptions||an,e="print",r="pdf",n&&(e=n.mode,r=n.filename),h.sheet.print.preview(print,i,e,r,!0,!0)}))}},{key:"previewImplicitPrint",value:function(e,t,n){var r,i=[],o=Z7(e);try{for(o.s();!(r=o.n()).done;){var a=r.value,s=this.createData("sheet",a,{});i.push(s)}}catch(e){o.e(e)}finally{o.f()}e="print";var u="pdf";t&&(e=t.mode,u=t.filename),print=n||i[0].printOptions||an,this.sheet.print.preview(print,i,e,u,!0,!0)}},{key:"implicitPrint",value:(o=i9(n9().mark((function e(t,n,r,i){var o,a,s,u,c,l,h;return n9().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n){e.next=2;break}throw new Error("数据不存在");case 2:if(Array.isArray(n)){e.next=4;break}throw new Error("必须为数组");case 4:Array.isArray(n[0])||(n=[n]),o=this,a=[],s=0;case 9:if(!(s<t.length)){e.next=24;break}u=Md(u=t[s]),c=0;case 13:if(c<n.length)return h=n[c],l=_.cloneDeep(u),e.next=18,V7(l,h).then((function(e){var t,n=(e=G7(nn([e],null,o.sheetType),3))[0],r=(e[1],e[2]&&Zd(n),Z7(n));try{for(r.s();!(t=r.n()).done;){var i=t.value,s=o.createData("sheet",i,{});a.push(s)}}catch(e){r.e(e)}finally{r.f()}}));e.next=21;break;case 18:c++,e.next=13;break;case 21:s++,e.next=9;break;case 24:i=i||(a[0]?a[0].printOptions:an),l="print",h="pdf",r&&(l=r.mode,h=r.filename),o.sheet.print.preview(i,a,l,h,!0,!0);case 29:case"end":return e.stop()}}),e,this)}))),function(e,t,n,r){return o.apply(this,arguments)})},{key:"_pivotData",value:function(e,t){var n,r=[],i={},o=Z7(_.cloneDeep(this.reportConfig));try{for(o.s();!(n=o.n()).done;){var a=n.value,s=(i[a.name]=a.SheetData.charts,Md(a)),u=(c7=!void 0,s7=e,u7={},l7=1,a7(s));r.push(u)}}catch(e){o.e(e)}finally{o.f()}var c=(l=G7(nn(r,null,this.sheetType),3))[0],l=(l[1],l[2]),h={},f=c[0].sheetPageBase,d=(f&&f.showConfig&&(-1!=f.showConfig.indexOf(0)?h.hideRowCol=!1:h.hideRowCol=!0,-1!=f.showConfig.indexOf(1)?h.showBottombar=!0:h.showBottombar=!1),l&&Zd(c),0);if(!t)for(var p=0;p<this.datas.length;p++)if(this.datas[p].name==this.sheet.data.name){d=p;break}if(this.loadData(c,h,d),i[c[0].name]){var m=i[c[0].name];if(m)for(var g in m){var A=m[g];A&&this.sheet.initChart(A,g,!1)}}}},{key:"pivotData",value:(i=i9(n9().mark((function e(t,n,r){var i,o,a,s,u,c,l,h,f,d,p;return n9().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=[],o={},a=Z7(t),e.prev=3,a.s();case 5:if((s=a.n()).done){e.next=13;break}return s=s.value,o[s.name]=s.SheetData.charts,s=Md(s),e.next=11,V7(s,n).then((function(e){i.push(e)}));case 11:e.next=5;break;case 13:e.next=18;break;case 15:e.prev=15,e.t0=e.catch(3),a.e(e.t0);case 18:return e.prev=18,a.f(),e.finish(18);case 21:if(s=nn(i,r,this.sheetType),c=G7(s,3),u=c[0],c[1],c=c[2],l={},(h=u[0].sheetPageBase)&&h.showConfig&&(-1!=h.showConfig.indexOf(0)?l.hideRowCol=!1:l.hideRowCol=!0,-1!=h.showConfig.indexOf(1)?l.showBottombar=!0:l.showBottombar=!1),c&&Zd(u),this.loadData(u,l),o[u[0].name]&&(f=o[u[0].name]))for(d in f)(p=f[d])&&this.sheet.initChart(p,d,!1);case 29:case"end":return e.stop()}}),e,this,[[3,15,18,21]])}))),function(e,t,n){return i.apply(this,arguments)})},{key:"changeSetting",value:function(e){var t=this.sheet.data;null!=(e=(t.settings=Object.assign(this.sheet.data.settings,e),t.settings.showBottombar))&&(e?this.bottombar.show():this.bottombar.hide()),this.sheet.sheetReset(),this.sheet.table.resetData(this.sheet.data)}},{key:"designData",value:function(e,t){var n,r=[],i={},o=Z7(e);try{for(o.s();!(n=o.n()).done;){var a=n.value,s=a.SheetData.charts,u=nn([(i[a.name]=s,Md(a,!0))],t,this.sheetType);u[0][0].name=a.name,r.push(u[0][0])}}catch(e){o.e(e)}finally{o.f()}if(!(r.length<1)){if(i[r[0].name]){var c=i[r[0].name];if(c)for(var l in c){var h=c[l];h&&this.sheet.initChart(h,l,!0)}}this.loadData(r)}}},{key:"exportExcel",value:function(e){Object(i6.a)(this,e)}},{key:"importExcel",value:function(e){oK(e,this)}},{key:"print",value:function(e){var t=this,n="print",r="pdf";e&&(n=e.mode,r=e.filename),setTimeout((function(){var e=t.sheet.data.printOptions||an,i=t.datas;try{var o=t.sheet.getPivotData();o&&Array.isArray(o)&&(i=o.map((function(e){return t.createData(e.name,e)})))}catch(e){}t.sheet.print.preview(e,i,n,r,!0)}))}},{key:"helper",value:function(){return{stringAt:u.d,indexAt:u.c,expr2xy:u.b,xy2expr:u.e,expr2expr:u.a}}}],r=[{key:"locale",value:function(e,t){H(e,t)}}],n&&W7(t.prototype,n),r&&W7(t,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function l9(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function h9(e,t){var n,r=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)),r}function f9(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h9(Object(n),!0).forEach((function(t){var r,i;r=e,i=n[t=t],t in r?Object.defineProperty(r,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[t]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h9(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function d9(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var p9=function(){function e(t,n){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.title="按模板打印",this.options=this.createSelectOptions(t),this.select=new e2(this.options,null,{width:"260px",height:"27px"}),this.el=this.init(),this.parent=n,this.select.setup()}var t,n;return t=e,(n=[{key:"createSelectOptions",value:function(e){return e.map((function(e){return f9(f9({},e),{},{value:e.name})}))}},{key:"init",value:function(){var e=this;return s("div","".concat(pe,"-dialog ").concat(pe,"-dialog--left ").concat(pe,"-dialog--size")).css("margin-top","30vh").children(s("div","".concat(pe,"-print-dialog_header")).children(s("span","".concat(pe,"-dialog_title ").concat(pe,"-color_2C2C2C")).innerHTML("".concat(e.title)),s("button","".concat(pe,"-dialog__headerbtn ").concat(pe,"-dialog__headerbtn--top")).attr("type","button").children(s("i","".concat(pe,"-dialog__close"))).on("click",(function(){e.hide()}))),s("div","".concat(pe,"-print-dialog_body")).children(s("div","".concat(pe,"-dialog_body_item")).children(s("span","".concat(pe,"-dialog_body_span ").concat(pe,"-color_2C2C2C ").concat(pe,"-margin-right_17")).innerHTML("打印模板"),this.select.el)),s("div","".concat(pe,"-dialog__footer ").concat(pe,"-padding-top_22 ").concat(pe,"-padding-bottom_20")).children(s("span","dialog-footer").children(s("button","".concat(pe,"-dialog_button ").concat(pe,"-bg-color_E7E7E7")).children(s("span","".concat(pe,"-color_8F8F8F")).innerHTML("取消")).on("click",(function(){e.hide()})),s("button","".concat(pe,"-dialog_button el-button-primary")).children(s("span","").innerHTML("确认")).on("click",(function(){e.submit()})))))}},{key:"submit",value:function(){var e,t=this.select.selectizeEl.getValue(),n=null,r=function(e,t){var n,r,i,o,a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(a)return r=!(n=!0),{s:function(){a=a.call(e)},n:function(){var e=a.next();return n=e.done,e},e:function(e){r=!0,i=e},f:function(){try{n||null==a.return||a.return()}finally{if(r)throw i}}};if(Array.isArray(e)||(a=function(e,t){var n;if(e)return"string"==typeof e?l9(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l9(e,t):void 0}(e))||t&&e&&"number"==typeof e.length)return a&&(e=a),o=0,{s:t=function(){},n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(this.options);try{for(r.s();!(e=r.n()).done;){var i=e.value;if(i.value==t){n=i.print;break}}}catch(e){r.e(e)}finally{r.f()}n?(this.parent.implicitPrint(n),this.hide()):new k0({message:"没有选择打印模板"})}},{key:"hide",value:function(){this.parent.hide(),this.el.hide()}},{key:"show",value:function(){this.parent.show(),this.el.show()}}])&&d9(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),m9='<svg width="17" height="16" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M7.6901 12.6673C10.8197 12.6673 13.3568 10.1303 13.3568 7.00065C13.3568 3.87105 10.8197 1.33398 7.6901 1.33398C4.5605 1.33398 2.02344 3.87105 2.02344 7.00065C2.02344 10.1303 4.5605 12.6673 7.6901 12.6673Z" stroke="white" stroke-linejoin="round"/>\n<path d="M9.57543 4.78103C9.09287 4.29847 8.4262 4 7.6898 4C6.95343 4 6.28677 4.29847 5.8042 4.78103" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M11.7637 11.0742L14.5921 13.9027" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>\n</svg>',g9='<svg width="17" height="16" viewBox="0 0 17 16" fill="none" xmlns="http://www.w3.org/2000/svg">\n<path d="M12.643 10.666H3.97632V14.666H12.643V10.666Z" stroke="white" stroke-linejoin="round"/>\n<path fill-rule="evenodd" clip-rule="evenodd" d="M1.64307 6.66602H14.9764V12.666H12.6488V10.666H3.9699V12.666H1.64307V6.66602Z" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>\n<path d="M12.9764 1.33398H3.64307V6.66732H12.9764V1.33398Z" stroke="white" stroke-linejoin="round"/>\n</svg>';function A9(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function v9(e,t){var n,r=Object.keys(e);return Object.getOwnPropertySymbols&&(n=Object.getOwnPropertySymbols(e),t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)),r}function b9(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v9(Object(n),!0).forEach((function(t){var r,i;r=e,i=n[t=t],t in r?Object.defineProperty(r,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[t]=i})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v9(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function y9(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var w9=[{name:"显示行号列标",value:1},{name:"显示底部页签栏",value:4},{name:"显示打印参考图",value:2},{name:"显示打印辅助线",value:3}],x9=function(){function e(t,n){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"vertical",i=this,o=e;if(!(i instanceof o))throw new TypeError("Cannot call a class as a function");this.title="按模板预览",this.options=this.createSelectOptions(t),this.select=new e2(this.options,null,{width:"266px",height:"27px"}),this.checkBoxGroup=new P2(w9,[1,2,3],"".concat(pe,"-checkbox-group_list")),this.previewEl=null,this.contentEl=null,this.previewConfigEl=null,this.buttonEl=null,this.parent=n,this.render=n.render,this.mode=r,this.el=this.init(),"horizontal"==this.mode&&this.setHorizontal(),this.select.setup(),this.spreadSheet=[]}var t,n;return t=e,(n=[{key:"createSelectOptions",value:function(e){return e.map((function(e){return b9(b9({},e),{},{value:e.name})}))}},{key:"changeMode",value:function(e){"horizontal"==(this.mode=e)?this.setHorizontal():"vertical"==e&&this.setVertical()}},{key:"setHorizontal",value:function(){this.contentEl.attr("class","".concat(pe,"-preview_content_h")),this.checkBoxGroup.removeClass("".concat(pe,"-checkbox-group_list")),this.checkBoxGroup.addClass("".concat(pe,"-checkbox-group_list_horizontal")),this.buttonEl.removeClass("".concat(pe,"-preview-button-group")),this.buttonEl.addClass("".concat(pe,"-preview-button-group_h")),this.previewEl.attr("class","".concat(pe,"-preview_sheet_h"))}},{key:"setVertical",value:function(){this.contentEl.attr("class","".concat(pe,"-preview_content")),this.checkBoxGroup.removeClass("".concat(pe,"-checkbox-group_list_horizontal")),this.checkBoxGroup.addClass("".concat(pe,"-checkbox-group_list")),this.buttonEl.removeClass("".concat(pe,"-preview-button-group_h")),this.buttonEl.addClass("".concat(pe,"-preview-button-group")),this.previewEl.attr("class","".concat(pe,"-preview_sheet"))}},{key:"setSelectOptions",value:function(e){this.options=this.createSelectOptions(e),this.select.resetOptions(this.options)}},{key:"init",value:function(){var e=this,t=(this.previewEl=s("div","".concat(pe,"-preview_sheet")),this.contentEl=s("div","".concat(pe,"-preview_content")),this.buttonEl=s("div","".concat(pe,"-preview-button-group ").concat(pe,"-preview-button-group")),s("div","".concat(pe,"-preview_config")));return this.previewConfigEl=t,this.render&&"[object Function]"===Object.prototype.toString.call(this.render)&&t.child(s(this.render())),s("div"," ".concat(pe,"-dialog ").concat(pe,"-dialog--left ").concat(pe,"-preview-dialog_size")).children(s("div","".concat(pe,"-preview_dialog__header ").concat(pe,"-print-dialog_header")).children(s("span","".concat(pe,"-dialog_title ").concat(pe,"-color_2C2C2C")).innerHTML("".concat(e.title)),s("button","".concat(pe,"-preview_dialog__headerbtn ").concat(pe,"-dialog__headerbtn  ").concat(pe,"-dialog__headerbtn--top")).attr("type","button").children(s("i","".concat(pe,"-dialog__close"))).on("click",(function(){e.hide()}))),s("div","".concat(pe,"-preview_dialog__body")).children(this.contentEl.children(t.children(s("div","".concat(pe,"-dialog_body_item ").concat(pe,"-padding-bottom_12")).children(s("span","".concat(pe,"-dialog_body_span ").concat(pe,"-color_2C2C2C ").concat(pe,"-margin-right_8")).innerHTML("打印模板"),this.select.el),s("div","".concat(pe,"-dialog_body_item ").concat(pe,"-padding-bottom_12")).children(s("span","".concat(pe,"-dialog_body_span ").concat(pe,"-color_2C2C2C ").concat(pe,"-margin-right_22")).innerHTML("预览时"),this.checkBoxGroup.el).addClass("".concat(pe,"-item_flex")),this.buttonEl.children(s("button","".concat(pe,"-dialog_button ").concat(pe,"-button-width ").concat(pe,"-color_4E89FB ").concat(pe,"-color_fff")).children(s("div","".concat(pe,"-height_14 ").concat(pe,"-flex-center")).children(s("span","".concat(pe,"-svg ").concat(pe,"-margin-right_4")).innerHTML(g9),s("span").innerHTML("打印"))).on("click",(function(){e.print()})),s("button","".concat(pe,"-dialog_button ").concat(pe,"-button-width ").concat(pe,"-color_4E89FB ").concat(pe,"-color_fff")).children(s("div","".concat(pe,"-height_14 ").concat(pe,"-flex-center")).children(s("span","".concat(pe,"-svg ").concat(pe,"-margin-right_4")).innerHTML(m9),s("span").innerHTML("预览"))).on("click",(function(){e.preview()})))),this.previewEl.attr("id","".concat(pe,"-preview_sheet")))))}},{key:"hide",value:function(){this.parent.hide(),this.el.hide()}},{key:"show",value:function(){this.parent.show(),this.el.show()}},{key:"getSelectPrintConfig",value:function(){var e,t=this.select.selectizeEl.getValue(),n=null,r=function(e,t){var n,r,i,o,a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(a)return r=!(n=!0),{s:function(){a=a.call(e)},n:function(){var e=a.next();return n=e.done,e},e:function(e){r=!0,i=e},f:function(){try{n||null==a.return||a.return()}finally{if(r)throw i}}};if(Array.isArray(e)||(a=function(e,t){var n;if(e)return"string"==typeof e?A9(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?A9(e,t):void 0}(e))||t&&e&&"number"==typeof e.length)return a&&(e=a),o=0,{s:t=function(){},n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(this.options);try{for(r.s();!(e=r.n()).done;){var i=e.value;if(i.value==t){n=i.print;break}}}catch(e){r.e(e)}finally{r.f()}return n}},{key:"preview",value:function(){var e,t,n=this,r={view:{height:function(){return ve()(n.previewEl.el).height()},width:function(){return ve()(n.previewEl.el).width()}},renderArrow:!1,showSelect:!1,showFreeze:!1,showGrid:!1,mode:"print",showToolbar:!1,showBottombarMenu:!1,showPreviewToolbar:!1,showBottombar:!1},i=this.checkBoxGroup.getChecked(),o=(i.includes(1)?r.hideRowCol=!1:r.hideRowCol=!0,i.includes(4)?r.showBottombar=!0:r.showBottombar=!1,this.getSelectPrintConfig());o?(0<this.spreadSheet.length?this.spreadSheet.forEach((function(e){e.changeSetting(r)})):(this.previewEl.css("background","#fff"),this.parent.sheetData.forEach((function(e){var t=_.uniqueId();t=s("div","#".concat(pe,"-preview_sheet_").concat(t)),n.previewEl.children(t),t=XZReport(t.el,r);n.spreadSheet.push(t),t.pivotData(o,e)}))),e=!!i.includes(3),t=!!i.includes(2),this.spreadSheet.forEach((function(n,r){V2(e,n,o[0].SheetData.print),q2(t,n),n.sheet.table.render()}))):new k0({message:"没有选择打印模板",duration:3e3})}},{key:"print",value:function(){var e,t,n,r;(e=this.getSelectPrintConfig())?(0<this.spreadSheet.length?(t=this.spreadSheet[0],n=this.spreadSheet.map((function(e){return e.getData()})),r=[],n.forEach((function(e){e.forEach((function(e){r.push(e)}))})),t.previewImplicitPrint(r)):this.parent.implicitPrint(e),this.hide()):new k0({message:"没有选择打印模板",duration:3e3})}}])&&y9(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function C9(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function k9(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}n(426);var E9=["repeatRowHead","repeatColHead","repeatRowFoot","repeatColFoot"],S9=function(){function e(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"",r=this,i=e;if(!(r instanceof i))throw new TypeError("Cannot call a class as a function");this.options=t,this.className=n,r={paddingLeft:"6px"},this.checkBoxGroup=new P2([{name:"重复标题行",value:1,render:function(){var e=(new z2).el.attr("id","_start"),t=(new z2).el.attr("id","_end");return s("div","").children(s("span").css("marginRight","4px").innerHTML("重复标题行从第"),e.el,s("span").css({paddingLeft:"4px",paddingRight:"4px"}).innerHTML("行至第"),t.el,s("span").css("paddingLeft","5px").innerHTML("行"))},labelStyle:r},{name:"重复标题列",value:2,render:function(){var e=(new z2).el.attr("id","_start"),t=(new z2).el.attr("id","_end");return s("div","").children(s("span").css("marginRight","4px").innerHTML("重复标题列从第"),e.el,s("span").css({paddingLeft:"4px",paddingRight:"4px"}).innerHTML("列至第"),t.el,s("span").css("paddingLeft","5px").innerHTML("列"))},labelStyle:r},{name:"重复结尾行",value:3,render:function(){var e=(new z2).el.attr("id","_start"),t=(new z2).el.attr("id","_end");return s("div","").children(s("span").css("marginRight","4px").innerHTML("重复结尾行从第"),e.el,s("span").css({paddingLeft:"4px",paddingRight:"4px"}).innerHTML("行至第"),t.el,s("span").css("paddingLeft","5px").innerHTML("行"))},labelStyle:r},{name:"重复结尾列",value:4,render:function(){var e=(new z2).el.attr("id","_start"),t=(new z2).el.attr("id","_end");return s("div","").children(s("span").css("marginRight","4px").innerHTML("重复结尾列从第"),e.el,s("span").css({paddingLeft:"4px",paddingRight:"4px"}).innerHTML("列至第"),t.el,s("span").css("paddingLeft","5px").innerHTML("列"))},labelStyle:r}],[],"".concat(pe,"-checkbox-group_list ").concat(pe,"-height_120")),this.el=this.init()}var t,n;return t=e,(n=[{key:"init",value:function(){var e=s("div","".concat(pe,"-dialog_body_item ").concat(pe,"-padding-bottom_12")).children(s("span","".concat(pe,"-dialog_body_span ").concat(pe,"-color_2C2C2C ").concat(pe,"-margin-right_8")).innerHTML("打印重复"),this.checkBoxGroup.el);return this.className&&e.addClass(this.className),e}},{key:"getValue",value:function(){var e,t={},n=function(e,t){var n,r,i,o,a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(a)return r=!(n=!0),{s:function(){a=a.call(e)},n:function(){var e=a.next();return n=e.done,e},e:function(e){r=!0,i=e},f:function(){try{n||null==a.return||a.return()}finally{if(r)throw i}}};if(Array.isArray(e)||(a=function(e,t){var n;if(e)return"string"==typeof e?C9(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?C9(e,t):void 0}(e))||t&&e&&"number"==typeof e.length)return a&&(e=a),o=0,{s:t=function(){},n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(this.checkBoxGroup.getChecked());try{for(n.s();!(e=n.n()).done;){var r=e.value,i=this.checkBoxGroup.getCheckEl(r),o=ve()(i.el.el),a=o.find("#_start input").val(),s=o.find("#_end input").val();t[E9[r]]={start:a,end:s}}}catch(e){n.e(e)}finally{n.f()}return t}}])&&k9(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function _9(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var O9={1:{width:"11.69",height:"16.54"},2:{width:"8.27",height:"11.69"},3:{width:"5.83",height:"8.27"},4:{width:"9.84",height:"13.9"},5:{width:"6.93",height:"9.84"},6:{width:"0",height:"0"}},T9=[{value:"1",name:'A3 (11.69" x 16.54")'},{value:"2",name:'A4 (8.27" x 11.69")'},{value:"3",name:'A5 (5.83" x 8.27")'},{value:"4",name:'B4 (9.84" x 13.9")'},{value:"5",name:'B5 (6.93" x 9.84")'},{value:"6",name:"自定义纸张"}],D9=function(){function e(t,n,r){var i=this;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");function o(e){6==e?(i.paperWidthInput.enable(),i.paperWidthSelect.enable(),i.paperHeightInput.enable(),i.paperHeightSelect.enable()):(i.paperWidthInput.disable(),i.paperWidthSelect.disable(),i.paperHeightInput.disable(),i.paperHeightSelect.disable()),i.paperWidthInput.setValue(O9[e].width),i.paperHeightInput.setValue(O9[e].height),i.paperWidthSelect.setValue("2"),i.paperHeightSelect.setValue("2")}this.title="自定义打印",this.template=r,this.paperWidthSelectChange=o,this.img=null,this.imgName=null;var a=this;this.noUploadEl=s("span").innerHTML("未上传").on("click",(function(){ve()(a.uploadInput.el.el).find("input").click()})),this.uploadEl=s("span").hide().on("click",(function(){ve()(a.uploadInput.el.el).find("input").click()})),this.uploadInput=new ac({placeholder:"",type:"file"},"",{},(function(e){var t=e.target.files[0],n=((e=new FileReader).readAsDataURL(t),i);e.onload=function(e){n.imgName=t.name,n.img=e.target.result,n.noUploadEl.hide(),n.uploadEl.show(),n.uploadEl.innerHTML(t.name)}})),this.uploadInput.hide(),this.select=new e2(T9,"2",{width:"266px",height:"27px"},!1,{onChange:o}),this.checkBoxGroup=new P2([{name:"显示行号列标",value:1},{name:"显示底部页签栏",value:4},{name:"显示打印参考图",value:2},{name:"显示打印辅助线",value:3}],[],"".concat(pe,"-checkbox-group_list")),this.paperWidthInput=new ac({placeholder:"",disabled:!0},O9[1].width,{width:"194px",height:"27px"}),this.paperWidthSelect=new e2([{name:"px",value:"1"},{name:"厘米",value:"3"},{name:"英寸",value:"2"}],"2",{width:"66px",marginLeft:"6px",height:"27px"},!0),this.paperHeightInput=new ac({placeholder:"",disabled:!0},O9[1].height,{width:"194px",height:"27px"}),this.paperHeightSelect=new e2([{name:"px",value:"1"},{name:"厘米",value:"3"},{name:"英寸",value:"2"}],"2",{width:"66px",marginLeft:"6px",height:"27px"},!0),this.orientationSelect=new e2([{name:"横向打印",value:"1"},{name:"纵向打印",value:"2"}],2,{width:"266px",height:"27px"}),this.pagePadding=J2,this.paddingSelect=new e2([{name:"无",value:1},{name:"普通",value:2},{name:"适中",value:3},{name:"窄",value:4},{name:"宽",value:5},{name:"自定义",value:6},{name:"设置自定义边距",value:7}],1,{width:"266px",height:"27px"},!1,{onChange:function(e){7==e&&(e=new o3(i,i.pagePadding[6]),i.el.child(e.el.el),i.paddingSelect.setValue(6),i.paddingSelect.updateOption(6,{name:"自定义",value:6}))}},{option:function(e,t){return 7==e.value?"<div class='".concat(pe,"-padding_item ").concat(pe,"-padding_button'>").concat(e.name,"</div>"):"<div class=".concat(pe,"-padding_item ><div>\n            <span>").concat(e.name,"</span>\n            <div class=").concat(pe,"-padding_content >\n              <span>上:").concat(J2[e.value].top.value,"cm</span>\n              <span>下:").concat(J2[e.value].bottom.value,"cm</span>\n              <span>左:").concat(J2[e.value].left.value,"cm</span>\n              <span>右:").concat(J2[e.value].right.value,"cm</span>\n            </div>\n          </div>\n        </div>")}}),this.scaleCheckGroup=new P2([{name:"缩放以适应纸张大小(仅限宽度)",value:1}],[]),this.printRepeat=new S9({},"".concat(pe,"-item_flex")),this.autoFillCheckGroup=new P2([{name:"用空行自动填充",value:1}],[]),this.previewEl=null,this.el=this.init(),this.parent=n,this.spreadSheet=[],this.select.setup(),this.paperWidthSelect.setup(),this.paperHeightSelect.setup(),this.orientationSelect.setup(),this.paddingSelect.setup()}var t,n;return t=e,(n=[{key:"init",value:function(){var e=this,t=this;return this.previewEl=s("div","".concat(pe,"-preview_sheet")),s("div","".concat(pe,"-dialog ").concat(pe,"-dialog--left ").concat(pe,"-preview-dialog_size")).children(s("div","".concat(pe,"-preview_dialog__header ").concat(pe,"-print-dialog_header")).children(s("span","".concat(pe,"-dialog_title ").concat(pe,"-color_2C2C2C")).innerHTML("".concat(t.title)),s("button","".concat(pe,"-preview_dialog__headerbtn ").concat(pe,"-dialog__headerbtn  ").concat(pe,"-dialog__headerbtn--top")).attr("type","button").children(s("i","".concat(pe,"-dialog__close"))).on("click",(function(){t.hide()}))),s("div","".concat(pe,"-preview_dialog__body")).children(s("div","".concat(pe,"-preview_content")).children(s("div","".concat(pe,"-preview_config")).children(s("div","".concat(pe,"-dialog_body_item ").concat(pe,"-padding-bottom_12")).children(s("span","".concat(pe,"-dialog_body_span ").concat(pe,"-color_2C2C2C ").concat(pe,"-margin-right_8")).innerHTML("纸张型号"),this.select.el),s("div","".concat(pe,"-dialog_body_item ").concat(pe,"-padding-bottom_12")).children(s("span","".concat(pe,"-dialog_body_span ").concat(pe,"-color_2C2C2C ").concat(pe,"-margin-right_8")).innerHTML("纸张宽度"),this.paperWidthInput.el,this.paperWidthSelect.el),s("div","".concat(pe,"-dialog_body_item ").concat(pe,"-padding-bottom_12")).children(s("span","".concat(pe,"-dialog_body_span ").concat(pe,"-color_2C2C2C ").concat(pe,"-margin-right_8")).innerHTML("纸张高度"),this.paperHeightInput.el,this.paperHeightSelect.el),s("div","".concat(pe,"-split-line ").concat(pe,"-line-margin")),s("div","".concat(pe,"-dialog_body_item ").concat(pe,"-padding-bottom_12")).children(s("span","".concat(pe,"-dialog_body_span ").concat(pe,"-color_2C2C2C ").concat(pe,"-margin-right_8")).innerHTML("打印参考图"),s("span","".concat(pe,"-up__image")).children(this.uploadEl.el,this.noUploadEl.el,this.uploadInput.el)),s("div","".concat(pe,"-dialog_body_item ").concat(pe,"-padding-bottom_12")).children(s("span","".concat(pe,"-dialog_body_span ").concat(pe,"-color_2C2C2C ").concat(pe,"-margin-right_8")).innerHTML("打印方向"),this.orientationSelect.el),s("div","".concat(pe,"-dialog_body_item ").concat(pe,"-padding-bottom_4")).children(s("span","".concat(pe,"-dialog_body_span ").concat(pe,"-color_2C2C2C ").concat(pe,"-margin-right_22")).innerHTML("页边距"),this.paddingSelect.el),s("div","".concat(pe,"-dialog_body_item ").concat(pe,"-padding-bottom_12")).children(s("span","".concat(pe,"-dialog_body_span ").concat(pe,"-color_2C2C2C ").concat(pe,"-margin-right_64")).innerHTML(""),this.scaleCheckGroup.el),this.printRepeat.el,s("div","".concat(pe,"-dialog_body_item ").concat(pe,"-padding-bottom_12")).children(s("span","".concat(pe,"-dialog_body_span ").concat(pe,"-color_2C2C2C ").concat(pe,"-margin-right_8")).innerHTML("打印尾页"),this.autoFillCheckGroup.el),s("div","".concat(pe,"-split-line ").concat(pe,"-line-margin")),s("div","".concat(pe,"-dialog_body_item ").concat(pe,"-padding-bottom_12")).children(s("span","".concat(pe,"-dialog_body_span ").concat(pe,"-color_2C2C2C ").concat(pe,"-margin-right_22")).innerHTML("预览时"),this.checkBoxGroup.el).addClass("".concat(pe,"-item_flex")),s("div","".concat(pe,"-preview-button-group ")).css({marginTop:"10px"}).children(s("button","".concat(pe,"-dialog_button ").concat(pe,"-button-width ").concat(pe,"-color_4E89FB ").concat(pe,"-color_fff ").concat(pe,"-border_none")).children(s("div","".concat(pe,"-height_14 ").concat(pe,"-flex-center")).children(s("span","".concat(pe,"-svg ").concat(pe,"-margin-right_4")).innerHTML(g9),s("span").innerHTML("打印"))).on("click",(function(){t.print.call(e)})),s("button","".concat(pe,"-dialog_button ").concat(pe,"-button-width ").concat(pe,"-color_4E89FB ").concat(pe,"-color_fff ").concat(pe,"-border_none")).children(s("div","".concat(pe,"-height_14 ").concat(pe,"-flex-center")).children(s("span","".concat(pe,"-svg ").concat(pe,"-margin-right_4")).innerHTML(m9),s("span").innerHTML("预览"))).on("click",(function(){t.preview.call(e)})))),this.previewEl.attr("id","".concat(pe,"-preview_sheet")))))}},{key:"getPrintConfig",value:function(){var e={},t={},n=this.select.getValue(),r=(n=(t.type=n,this.paperWidthInput.getValue()),this.paperHeightInput.getValue()),i=this.paperWidthSelect.getValue();t.params={unit:i,width:n,height:r},e.paper=t,i=this.printRepeat.getValue(),(n=(e.repeat=i,{})).direction=this.orientationSelect.getValue(),r=this.paddingSelect.getValue(),t=this.pagePadding[r];return n.padding=t,this.autoFillCheckGroup.getChecked().includes(1)?n.autoFill=!0:n.autoFill=!1,e.params=n,e}},{key:"print",value:function(){var e,t,n,r=this.getPrintConfig();0<this.spreadSheet.length?(e=this.spreadSheet[0],t=this.spreadSheet.map((function(e){return e.getData()})),n=[],t.forEach((function(e){e.forEach((function(e){n.push(e)}))})),e.previewImplicitPrint(n,null,r)):this.parent.implicitPrint(this.template.print,r),this.hide()}},{key:"preview",value:function(){var e=this,t={view:{height:function(){return 597},width:function(){return 808}},renderArrow:!1,showSelect:!1,showFreeze:!1,showGrid:!1,mode:"print",showToolbar:!1,showBottombarMenu:!1,showPreviewToolbar:!1},n=this.checkBoxGroup.getChecked();if(n.includes(1)?t.hideRowCol=!1:t.hideRowCol=!0,n.includes(4)?t.showBottombar=!0:t.showBottombar=!1,0<this.spreadSheet.length)this.spreadSheet.forEach((function(e){e.changeSetting(t)}));else{ve()("#".concat(pe,"-preview_sheet")).css("background","#fff");var r=this.template.print;if(!r)throw new Error("模板错误");this.parent.sheetData.forEach((function(n){var i=_.uniqueId();i=s("div","#".concat(pe,"-preview_sheet_").concat(i)),e.previewEl.children(i),i=XZReport(i.el,t);e.spreadSheet.push(i),i.pivotData(r,n)}))}var i=!!n.includes(3),o=!!n.includes(2),a=this.getPrintConfig();this.spreadSheet.forEach((function(t){V2(i,t,a),q2(o,t,e.img),t.sheet.table.render()}))}},{key:"hide",value:function(){this.parent.hide(),this.el.hide()}},{key:"show",value:function(){this.parent.show(),this.el.show()}}])&&_9(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function B9(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function I9(e,t,n){var r=e;if(t.has(r))throw new TypeError("Cannot initialize the same private elements twice on an object");t.set(e,n)}function M9(e,t){return(t=N9(e,t,"get")).get?t.get.call(e):t.value}function j9(e,t,n){if((t=N9(e,t,"set")).set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}function N9(e,t,n){if(t.has(e))return t.get(e);throw new TypeError("attempted to "+n+" private field on non-instance")}var F9=new WeakMap,R9=function(){function e(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},n=1<arguments.length?arguments[1]:void 0,r=this,i=e;if(!(r instanceof i))throw new TypeError("Cannot call a class as a function");I9(this,F9,{writable:!0,value:!1}),r=document.body,j9(this,F9,n),this.options=t.template,this.render=t.render,this.mode=t.mode,this.el=this.init().hide(),this.sheetData=[],r.appendChild(this.el.el),this.renderEl=this.hideRenderEl(),r.appendChild(this.renderEl.el),this.dialog=null}var t,n;return t=e,(n=[{key:"init",value:function(){return s("div","".concat(pe,"-dialog_wrapper")).css("z-index","2010")}},{key:"setTemplate",value:function(e){this.options=e,this.dialog&&this.dialog.setSelectOptions&&this.dialog.setSelectOptions(e)}},{key:"setMode",value:function(e){this.mode=e,this.dialog&&this.dialog.changeMode&&this.dialog.changeMode(e)}},{key:"hideRenderEl",value:function(){return s("div","").attr("id","".concat(pe,"-hideRender")).hide()}},{key:"hide",value:function(){this.el.hide(),this.remove()}},{key:"show",value:function(){this.el.show()}},{key:"remove",value:function(){ve()(this.el.el).children().remove()}},{key:"addChild",value:function(e){this.el.child(e)}},{key:"implicitPrint",value:function(e,t){XZReport("#".concat(pe,"-hideRender"),{renderArrow:!1}).implicitPrint(e,this.sheetData,null,t)}},{key:"quickPrint",value:function(e,t){if(!M9(this,F9))throw new Error("授权码错误");if(!e)throw new Error("数据不存在");if(!Array.isArray(e))throw new Error("必须为数组");Array.isArray(e[0])||(e=[e]),this.remove(),this.sheetData=e,this.implicitPrint(t)}},{key:"print",value:function(e){if(!M9(this,F9))throw new Error("授权码错误");if(!e)throw new Error("数据不存在");if(!Array.isArray(e))throw new Error("必须为数组");Array.isArray(e[0])||(e=[e]),this.remove(),this.sheetData=e,this.options.length<=1?this.implicitPrint(this.options[0].print):(this.dialog=new p9(this.options,this),this.addChild(this.dialog.el),this.el.show())}},{key:"previewPrint",value:function(e){if(!M9(this,F9))throw new Error("授权码错误");if(!e)throw new Error("数据不存在");if(!Array.isArray(e))throw new Error("必须为数组");Array.isArray(e[0])||(e=[e]),this.remove(),this.sheetData=e,this.dialog=new x9(this.options,this,this.mode),this.addChild(this.dialog.el),this.el.show()}},{key:"customPrint",value:function(e,t){if(!M9(this,F9))throw new Error("授权码错误");if(!e)throw new Error("数据不存在");if(!Array.isArray(e))throw new Error("必须为数组");if(Array.isArray(e[0])||(e=[e]),!t)throw new Error("必须传入一个模板");this.remove(),this.sheetData=e,this.dialog=new D9([],this,t),this.addChild(this.dialog.el),this.el.show()}},{key:"destory",value:function(){}}])&&B9(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function P9(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function L9(e,t,n){var r=e;if(t.has(r))throw new TypeError("Cannot initialize the same private elements twice on an object");t.set(e,n)}function U9(e,t){return(t=H9(e,t,"get")).get?t.get.call(e):t.value}function z9(e,t,n){if((t=H9(e,t,"set")).set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}function H9(e,t,n){if(t.has(e))return t.get(e);throw new TypeError("attempted to "+n+" private field on non-instance")}n(427);var $9=!1,Q9=null,V9=[1,2],q9=[2],G9=new WeakMap,W9=new WeakMap,K9=function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");L9(this,G9,{writable:!0,value:!1}),L9(this,W9,{writable:!0,value:null}),this.init(t)}var t,n;return t=e,(n=[{key:"init",value:function(e){var t,n;(e=R3(e))&&(e=JSON.parse(e),z9(this,W9,e),t=U9(this,W9).expire_date,n=U9(this,W9).auth_domain,V9.includes(e.version)&&(Y3(n,U9(this,W9).dev_name)||K3()||W3(n)&&q3(t)))?z9(this,G9,!0):z9(this,G9,!1)}},{key:"getStatus",value:function(){return U9(this,G9)}},{key:"getAuthInfo",value:function(){return U9(this,W9)}}])&&P9(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Y9(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}window&&(window.XZReport=function(e){var t,n,r,i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},o=2<arguments.length?arguments[2]:void 0,a=3<arguments.length?arguments[3]:void 0;if(i.showBottombarMenu=!1,$9=!!K3()||$9)return t=!1,n={height:function(){return document.documentElement.clientHeight},width:function(){return document.documentElement.clientWidth}},r=null,Q9&&10===Q9.version&&(t=!0,r=Object(_t.d)(Q9.dev_name||"小智报表工具",n)),new c9(e,i,t,r,!1,o,a);throw new Error(String.fromCharCode(25480,26435,30721,38169,35823))},window.XZReportPrint=function(){return new R9(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},$9)},window.XZReportPrint.version=ge,window.XZReport.locale=H,window.XZReport.setKey=function(e){try{var t=new K9(e);$9=t.getStatus(),Q9=t.getAuthInfo()}catch(e){$9=!1}},window.XZReport.version=ge);var X9=[{name:"拉伸",value:1},{name:"平铺",value:2},{name:"自适应-裁剪",value:3},{name:"自适应-填充",value:4}],J9=[{name:"前景图",value:2},{name:"背景图",value:1}],Z9=function(){function e(t){var n=this;if(!(this instanceof e))throw new TypeError("Cannot call a class as a function");this.$parent=t;var r=this;this.imageConfig={url:"",w:100,h:100,cell:"",x:0,y:0,angle:0,display:1,layer:1},this.uploadInput=new ac({placeholder:"",type:"file"},"",{},(function(e){n.$parent.trigger("upload",e.target.files,(function(t){r.url=t,ve()(r.urlInputEl.el).val(t),e.srcElement.value=""}))})),this.uploadInput.hide(),this.urlInputEl=s("input","".concat(pe,"-ui-input")).attr({is:"ui-input"}),this.uploadEl=s("button","ui-button").attr({type:"primary"}).html("上传").css({padding:"5px","margin-left":"10px"}).on("click",(function(){ve()(r.uploadInput.el.el).find("input").click()})),this.urlEl=s("div","watermask_config_item").children(s("span","watermask_config_name").innerHTML("图片地址：").css("margin-right","30px"),this.urlInputEl,this.uploadEl,this.uploadInput.el).css("margin-bottom","10px"),this.wInputEl=s("input","".concat(pe,"-ui-input")).attr({is:"ui-input"}).css({width:"125px","margin-right":"14px"}),this.hInputEl=s("input","".concat(pe,"-ui-input")).attr({is:"ui-input"}).css({width:"125px"}),this.sizeEl=s("div","watermask_config_item").children(s("span","watermask_config_name").innerHTML("图片宽高：").css("margin-right","30px"),this.wInputEl,this.hInputEl).css("margin-bottom","10px"),this.cellInputEl=s("input","".concat(pe,"-ui-input")).attr({is:"ui-input",placeholder:"输入将图片插入单元格的位置例：B2"}).css("width","264px"),this.cellEl=s("div","watermask_config_item").children(s("span","watermask_config_name").innerHTML("单元格位置：").css("margin-right","16px"),this.cellInputEl).css("margin-bottom","10px"),this.xyTip=s("i","water_tip").innerHTML(G2).attr({title:"偏移单元格的角度，以单元格左上角为基点"}),this.xEl=s("input","".concat(pe,"-ui-input")).attr({is:"ui-input",type:"number"}).css("width","100px"),this.yEl=s("input","".concat(pe,"-ui-input")).attr({is:"ui-input",type:"number"}).css("width","100px"),this.xyEl=s("div","watermask_config_item").children(s("span","watermask_config_name").innerHTML("偏移位置：").css("margin-right","30px"),s("span","watermask_config_name").innerHTML("X轴").css("padding-right","5px"),this.xEl.css("margin-right","6px"),s("span","watermask_config_name").innerHTML("Y轴").css("padding-right","5px"),this.yEl,this.xyTip).css({display:"flex","align-items":"center","margin-bottom":"10px"}),this.angleTip=s("i","water_tip").innerHTML(G2).attr({title:"-180到180"}),this.angleInputEl=s("input","".concat(pe,"-ui-input")).attr({is:"ui-input",type:"number",max:"180",min:"-180"}).css("width","264px"),this.angleEl=s("div","watermask_config_item").children(s("span","watermask_config_name").innerHTML("旋转角度：").css("margin-right","30px"),this.angleInputEl,this.angleTip).css({display:"flex","align-items":"center","margin-bottom":"10px"}),this.displaySelectEl=new e2(X9,1,{width:"264px",height:"30px"},!1),this.displayEl=s("div","watermask_config_item").children(s("span","watermask_config_name").innerHTML("显示方式：").css("margin-right","30px"),this.displaySelectEl.el).css("margin-bottom","10px"),this.layerSelectEl=new e2(J9,2,{width:"264px",height:"30px"},!1),this.layerEl=s("div","watermask_config_item").children(s("span","watermask_config_name").innerHTML("图层位置：").css("margin-right","30px"),this.layerSelectEl.el),this.mainEl=s("div","".concat(pe,"-design-watermask-main")).children(this.urlEl,this.sizeEl,this.cellEl,this.xyEl,this.angleEl,this.displayEl,this.layerEl),this.contentEl=s("div","".concat(pe,"-design-table-header")).children(s("div","".concat(pe,"-design-table-header_item")).children(s("div","".concat(pe,"-header_main")).children(this.mainEl)).css({marginBottom:"10px"})),this.el=new Dialog({title:"插入图片",content:this.contentEl.el,buttons:[{value:"取消",type:" ",className:"".concat(pe,"-slash_button"),events:function(){r.hide()}},{value:"确定",type:"primary",className:"".concat(pe,"-slash_button"),events:function(){r.save()}}],width:"500px"}).hide(),ve()(this.el).css({"overflow-x":"hidden"}),this.el.element.title.classList.add("".concat(pe,"-dialog_title")),this.displaySelectEl.setup(),this.layerSelectEl.setup(),setTimeout((function(){n.displaySelectEl.selectizeEl.$wrapper.css({display:"inline"}),n.layerSelectEl.selectizeEl.$wrapper.css({display:"inline"})}))}var t,n;return t=e,(n=[{key:"save",value:function(){this.imageConfig.url=ve()(this.urlInputEl.el).val(),this.imageConfig.w=ve()(this.wInputEl.el).val(),this.imageConfig.h=ve()(this.hInputEl.el).val(),this.imageConfig.cell=ve()(this.cellInputEl.el).val(),this.imageConfig.x=ve()(this.xEl.el).val(),this.imageConfig.y=ve()(this.yEl.el).val(),this.imageConfig.angle=ve()(this.angleInputEl.el).val(),this.imageConfig.display=this.displaySelectEl.getValue(),this.imageConfig.layer=this.layerSelectEl.getValue();var e=this.$parent.spreadSheet,t=(e=J0(e)).range;e=e.dataProxy;U0(t={sri:t.sri,sci:t.sci,eri:t.sri,eci:t.sci},e,{waterMaskImageConfig:this.imageConfig}),this.hide()}},{key:"setTitle",value:function(e){this.el.params.title="插入图片 【".concat(e,"】")}},{key:"resetConfig",value:function(){return{url:"",w:100,h:100,cell:"",x:"",y:"",angle:"",display:1}}},{key:"hide",value:function(){this.imageConfig=this.resetConfig(),this.el.hide()}},{key:"show",value:function(){var e=this.$parent.spreadSheet,t=(e=J0(e)).range,n=(e=e.dataProxy,Object(u.e)(t.sci,t.sri)),r=(e=(t=((e=(this.setTitle(n),e.getCell(t.sri,t.sci)))&&e.waterMaskImageConfig?this.imageConfig=_.merge(this.imageConfig,e.waterMaskImageConfig):(this.imageConfig={url:"",w:100,h:100,cell:"",x:0,y:0,angle:0,display:1,layer:1},this.imageConfig.cell=n),this.imageConfig)).url,n=t.w,t.h),i=t.cell,o=t.x,a=t.y,s=t.angle,c=t.display;t=t.layer;ve()(this.urlInputEl.el).val(e),ve()(this.wInputEl.el).val(n),ve()(this.hInputEl.el).val(r),ve()(this.cellInputEl.el).val(i),ve()(this.xEl.el).val(o),ve()(this.yEl.el).val(a),ve()(this.angleInputEl.el).val(s),this.displaySelectEl.setValue(c),this.layerSelectEl.setValue(t),this.el.show()}}])&&Y9(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function eee(e,t){return(t=nee(e,t,"get")).get?t.get.call(e):t.value}function tee(e,t,n){if((t=nee(e,t,"set")).set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}function nee(e,t,n){if(t.has(e))return t.get(e);throw new TypeError("attempted to "+n+" private field on non-instance")}function ree(e,t){var n,r,i,o,a="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(a)return r=!(n=!0),{s:function(){a=a.call(e)},n:function(){var e=a.next();return n=e.done,e},e:function(e){r=!0,i=e},f:function(){try{n||null==a.return||a.return()}finally{if(r)throw i}}};if(Array.isArray(e)||(a=oee(e))||t&&e&&"number"==typeof e.length)return a&&(e=a),o=0,{s:t=function(){},n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:t};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function iee(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(e,t)||oee(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function oee(e,t){var n;if(e)return"string"==typeof e?aee(e,t):"Map"===(n="Object"===(n=Object.prototype.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?aee(e,t):void 0}function aee(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function see(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function uee(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function cee(e,t,n){t&&uee(e.prototype,t),n&&uee(e,n),Object.defineProperty(e,"prototype",{writable:!1})}function lee(e,t,n){var r=e;if(t.has(r))throw new TypeError("Cannot initialize the same private elements twice on an object");t.set(e,n)}var hee={showToolbar:!0,width:null,height:function(){return 800},row:100,col:25,templateCenter:!1,dataset:[{id:4,value:"自定义数据集"}]},fee=null,dee=null;function pee(e){var t,n,r=this.spreadSheet,i=(s=(r=J0(r=r)).range,r=r.dataProxy,i=s.sri,o=s.sci,s.eri,s.eci,s=3,a=6,u=0,n=t=null,(r=r.getCell(i,o))&&(r.Expansion&&(u=r.Expansion),null!=r.dataType&&(s=r.dataType),r.bindObj&&(t=r.bindObj,s=r.bindObj.data_type),null!=r.type?a=r.type:r.bindObj&&(a=2),r.valueType&&1!=r.valueType&&(s=null,n=r.valueType)),{type:a,dataType:s,expansion:u,bindObj:t,valueType:n}),o=i.type,a=(r=i.dataType,i.expansion),s=i.bindObj,u=i.valueType;6==o&&e&&e.text&&"="===String(e.text).trim()[0]&&(o=5),this.toolbar.dataTypeEl.setTitle(IZ[o]),null!=u&&1!=u?this.toolbar.valueTypeEl.setTitle(RZ[u]):this.toolbar.valueTypeEl.setTitle(NZ[r=r||3]),2===o?(this.toolbar.dataCellTypeEl.createOptions(n1),s&&(r?s.dataList&&1==s.dataList?this.toolbar.dataCellTypeEl.setTitle("列表"):2==s.axisType?this.toolbar.dataCellTypeEl.setTitle("汇总"):1==s.axisType&&this.toolbar.dataCellTypeEl.setTitle("分组"):this.toolbar.dataCellTypeEl.setTitle("分组"))):(this.toolbar.dataCellTypeEl.createOptions(r1),this.toolbar.dataCellTypeEl.setTitle("默认")),this.toolbar.expansionEl.setTitle(MZ[a])}function mee(e,t){var n=[];return e.forEach((function(e){e={name:e.name,data_type:e.data_type||3,axis_type:1,sheetname:t},n.push(e)})),n}var gee=function(e){var t=e.sheet.Groupmanagement,n=e.sheet.data.groupConfig;if(function e(t,n){for(var r=0;r<t.length;r++)F0(t[r],n)?n.flag=!0:t[r].children&&e(t[r].children,n);return n.flag}(n,t))new k0({message:"已存在相同分组",type:"error"});else{var r,i=t,o=(t=e.sheet.data,{label:Object(u.d)(i.sci)+(i.sri+1)+"-"+(Object(u.d)(i.eci)+(i.eri+1))});for(r in i)"w"!=r&&"h"!=r&&(o[r]=i[r]);0==t.groupConfig.length?(new k0({message:"添加分组成功",type:"success",duration:500}),t.groupConfig.push(o)):function e(t,n,r){for(var i=!1,o=0;o<t.length;o++){var a=t[o],s=R0(n,a);if(0==s){n.children=[a];for(var u=0;u<t.length;u++)if(t[u]==a){t[u]=n,new k0({message:"添加分组成功",type:"success",duration:500});break}i=!0}else{if(1==s){a.children?e(a.children,n):(a.children=[],a.children.push(n),new k0({message:"添加分组成功",type:"success",duration:500})),i=!0;break}if(2!=s&&3==s){new k0({message:"与现有分组存在交叉情况，不符合分组数据逻辑，请重新配置",type:"error"}),i=!0;break}}}if(!i){if(!r&&1<=t.length)return void new k0({message:"同一父节点下只能有一个子节点",type:"error"});new k0({message:"添加分组成功",type:"success",duration:500}),t.push(n)}return t}(t.groupConfig,o,!0),D0(n,e)}};function Aee(e){var t=Math.max.apply(Math,[Number(ve()(this.groupPanelCompEl.el.el).css("zIndex")),Number(ve()(this.toolbarButtonsCompEl.el.el).css("zIndex")),Number(ve()(this.dataPaneCompEl.el.el).css("zIndex")),ve()(this.xzDesignParamsEl.panelEl.el.el).css("zIndex")]);e.css("zIndex",t+1)}function vee(e,t){var n,r=this.spreadSheet,i=r.sheet,o=i.data;"copy"===e?wW.call(i):"paste"===e?CW.call(i,"all"):"undo"===e?i.undo():"redo"===e?i.redo():"cut"===e?xW.call(i):"paintformat"===e?!0===t?(wW.call(i),o.paintformat=!0):yW.call(i):"clearformat"===e?IW.call(i,"delete-cell-format"):"indent"===e||"indentIsAdd"===e?(o.setSelectedCellAttr(e,t),bW.call(i)):"indentReduce"===e?(o.setSelectedCellAttr("indent",t),bW.call(i)):"value-type"===e?function(e){var t;"设置显示格式"===e?"文本"==(t=this.toolbar.valueTypeEl.getTitle())?this.stringFormatCompEl.show():"数值"==t?this.numberFormatCompEl.show():"日期"==t?this.dateFormatCompEl.show():"图片"==t?this.imgFormatCompEl.show():"条形码"==t?this.barcodeTypeCompEl.show():"二维码"==t&&this.codeTypeCompEl.show():(t={},e in FZ?(t.dataType=FZ[e],t.bindObj={},t.bindObj.data_type=FZ[e],t.bindObj.changeType=2==FZ[e]?2:1,t.valueType=1):e in PZ&&(t.valueType=PZ[e],12==t.valueType&&(t.barCodeType=1)),(e=this.spreadSheet)&&U0((e=J0(e)).range,e=e.dataProxy,t,!0))}.call(this,t):"sheetSetting"===e?this.tableSettingEl.show():"data-cell-type"===e?function(e){var t=null;switch(e){case"分组":(t={bindObj:{}}).bindObj.merge=1,t.bindObj.axisType=1;break;case"汇总":(t={bindObj:{}}).bindObj.aggregate=0,t.bindObj.axisType=2;break;case"列表":(t={bindObj:{}}).bindObj.dataList=1}t&&this&&U0((e=J0(this)).range,e=e.dataProxy,t,!0)}.call(r,t):"expansion"===e?function(e){var t={};t.Expansion=jZ[e],this&&(U0((e=J0(this)).range,e=e.dataProxy,t),function(){this.sheet.table.render()}.call(this))}.call(r,t):"filter"===e?this.designFilterEl.show():"warn"===e?this.designWarnCompEl.show():"hyperlink"===e?this.linkCompEl.show():"headerSetting"===e?this.tableHeaderCompEl.show():"reportSetting"===e?this.reportSheetCompEl.show():"printSetting"===e?this.printConfigCompEl.show():"insertImage"===e?this.insertImageCompEl.show():"import"===e?this.spreadSheet.importExcel(t):"slash"===e?this.slashCompEl.show():"printLine"==e?(this.printLineShow=t,this.printLineChange()):"printImg"==e?(this.printImgShow=t,this.printBgChange()):"paramsPanel"==e?t?(Aee.call(this,ve()(this.xzDesignParamsEl.panelEl.el.el)),(r=this.getJsonData()).filter((function(e){if(3==e.type||4==e.type)return e.value=e.name,e})),this.xzDesignParamsEl.setSheetList(r),this.xzDesignParamsEl.show()):(ve()(this.xzDesignParamsEl.panelEl.el.el).css("zIndex",1e3),this.xzDesignParamsEl.hide()):"dataPanel"==e?t?(Aee.call(this,ve()(this.dataPaneCompEl.el.el)),this.dataPaneCompEl.show()):(ve()(this.dataPaneCompEl.el.el).css("zIndex",1e3),this.dataPaneCompEl.hide()):"toolbarButtons"==e?t?(Aee.call(this,ve()(this.toolbarButtonsCompEl.el.el)),this.toolbarButtonsCompEl.show()):(ve()(this.toolbarButtonsCompEl.el.el).css("zIndex",1e3),this.toolbarButtonsCompEl.hide()):"group"==e?(r=this.spreadSheet.sheet.data.groupConfig,gee(this.spreadSheet),n=this.spreadSheet.sheet.data.name,this.groupPanelCompEl.setData(r),this.setSheetGroupConfig(n,r)):"chart"==e?this.chartCompEl.show():"groupConfig"==e?t?(Aee.call(this,ve()(this.groupPanelCompEl.el.el)),this.groupPanelCompEl.show()):(ve()(this.groupPanelCompEl.el.el).css("zIndex",1e3),this.groupPanelCompEl.hide()):"模板中心"===e?this.templateCenterComp.show():(o.setSelectedCellAttr(e,t),"formula"!==e||o.selector.multiple()||DW.call(i),bW.call(i))}var bee=function(e,t,n,r,i,o,a){var s=e.exceptRowSet,u=e.exceptRowTotalHeight(i.sri,i.eri);t.save(),t.translate(0,-u),t.restore(),function(e,t,n){var r=4<arguments.length?arguments[4]:void 0,i=5<arguments.length?arguments[5]:void 0,o=e.sri,a=e.sci,s=e.eri,u=(e=e.eci,n.viewRange());u.sci>=a&&(a=u.sci),u.sri>=o&&(o=u.sri),yee(t,n,o,a,r,[s-o,e-a],i)}(i,t,e,(function(n){return n=n,(r=s.has(n))&&(n=e.rows.getHeight(n),t.translate(0,-n)),!r;var r}),o,a)},yee=function(e,t,n,r,i,o,a){(a=a.sheet.table.getDrawBoxBG(o,t,n,r,0)).bgcolor=i,e.rectCellBg(a,!0)},wee=new WeakMap,xee=function(){function e(t,n){var r=this;if(see(this,e),lee(this,wee,{writable:!0,value:!1}),!(fee=!!K3()||fee))throw new Error(String.fromCharCode(25480,26435,30721,38169,35823));var i=!1,o=null,a=(this.options=D.a.merge(hee,n||{}),this.eventMap=new Map,t),u=(n=("string"==typeof t&&(a=document.querySelector(t)),this.xzDesignParamsEl=new xzSearchManage(a,{top:"88px"}),this.xzAddApiDatasetEl=new xzApiDataset,this.xzAddApiDatasetEl.on("submit",(function(e){r.updateParams(e)})),this.xzAddApiDatasetEl.on("updated",(function(e){setTimeout((function(){r.updateParams(e)}))})),s("div","".concat(pe,"-design"))),t=s("div","".concat(pe,"-design_sheet")),this.sheetDropEl=s("div","".concat(pe,"-design_sheet_drop")).on("drop",(function(e){r.drop(e)})).on("dragenter",(function(e){e.preventDefault()})).on("dragover",(function(e){e.preventDefault()})).css({width:"100%",height:"calc(100% - 100px)",position:"absolute",zIndex:"999",top:"60px"}),this),c=(this.rootEl=n,this.sheetDropEl.hide(),this.options.showToolbar?60:0),l=(this.initToolbarHeight=c,{height:function(){return ve()(a).height()-c},width:function(){return ve()(a).width()}}),h={len:1,height:25,minHeight:0},f={len:1,width:100,indexWidth:60,minWidth:0};h=(l=(this.options.row&&(h.len=this.options.row),this.options.col&&(f.len=this.options.col),this.options.height?l.height=function(){return r.options.height()-c}:this.options.height=l.height,this.options.width?l.width=this.options.width:this.options.width=l.width,dee&&10===dee.version&&(i=!0,o=Object(_t.d)(dee.dev_name||"小智报表工具",this.options)),this.spreadSheet=new vY(t.el,{showToolbar:!1,hideRowCol:!1,showContextmenu:!0,renderFormularText:!1,disableRunScript:!0,view:l,row:h,col:f,showPreviewToolbar:!1},i,o),this.spreadSheet.sheet.data)).settings.view,f=this.spreadSheet.sheet.selector;this.toolbar=new y0(l,h.width,!this.options.showToolbar,f,this.spreadSheet,this.options),this.toolbar.change=function(e,t){return vee.call(r,e,t)},n.child(this.toolbar.el),n.child(t),n.child(this.sheetDropEl.el),a.appendChild(n.el),this.setTimeoutor=null,this.resObj={},this.axisType="",this.sheetMount(),this.reportList=[],this.slashCompEl=new n2(this),this.stringFormatCompEl=new i2(this),this.numberFormatCompEl=new a2(this),this.dateFormatCompEl=new u2(this),this.imgFormatCompEl=new l2(this),this.barcodeTypeCompEl=new f2(this),this.codeTypeCompEl=new k3(this),this.tableSettingEl=new p2(this),this.designFilterEl=new v2(this),this.sheetFilter={},this.designWarnCompEl=new k2(this),this.linkCompEl=new j2(this),this.tableHeaderCompEl=new $2(this),this.sheetFreezeConfig={},this.reportSheetCompEl=new Y2(this),this.sheetGroupConfig={},this.printConfigCompEl=new c3(this),this.insertImageCompEl=new Z9(this),this.sheetPrintConfig={},this.sheetPagingConfig={},this.waterMaskConfig={text:"",fontsize:12,color:"#D8D8D8",offsetX:200,offsetY:100,rotate:-20,fontstyle:[],open:0},this.printLineShow=!1,this.printImgShow=!1,this.xzDatasetEl=xzDataset(),this.xzDatasetEl.el.el.parentElement.style.zIndex="2000",this.xzDatasetEl.on("refresh",(function(e){e=e.map((function(e){return e.name})),r.getThirdDataseList(e)})),this.xzDatasetEl.on("submit",(function(e){u.xzDatasetSubmit(e)})),this.dataPaneCompEl=new x3(this,this.options.dataset),this.toolbarButtonsCompEl=new Z5(this),n.child(this.toolbarButtonsCompEl.el.el),n.child(this.dataPaneCompEl.el.el),this.groupPanelCompEl=new M3(this),this.groupPanelCompEl.on("node-click",(function(e){var t,n,i;e=e,(t=r.spreadSheet).sheet.table.render(),n=t.sheet.data,i=t.sheet.table.draw,n.cols.indexWidth,n.rows.height,bee(n,i,0,0,e,e.bgColor,t)})),this.chartCompEl=new r6(this),this.templateCenterComp=new J3(this),this.groupPanelCompEl.on("node-delete",(function(e){var t,n;(function e(t,n){for(var r=0;r<t.length;r++){if(F0(t[r],n)){t.splice(r,1);break}t[r].children&&e(t[r].children,n)}return!1})(n=(t=u.spreadSheet).sheet.data.groupConfig,e),t.sheet.data.groupConfig=n,u.groupPanelCompEl.setData(u.spreadSheet.sheet.data.groupConfig),u.spreadSheet.sheet.table.render(),new k0({type:"success",message:"删除成功",duration:500})})),n.child(this.groupPanelCompEl.el.el),this.imgurl="",this.isLoadedThirdDataset=!0,this.thirdDatasetList=[],this.getThirdDataseList()}return cee(e,[{key:"getThirdDataseList",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],t=this,n=this.options.onUpdateDatasetList;n&&"function"==typeof n&&(this.isLoadedThirdDataset=!1,(n=n()).then&&"function"==typeof n.then?n.then((function(n){t.updateThirdDatasetList({dataList:n,select:e}),t.isLoadedThirdDataset=!0,t.thirdDatasetList=n})).catch((function(e){})):this.isLoadedThirdDataset=!0)}},{key:"updateThirdDatasetList",value:function(e){this.xzDatasetEl.update(e)}},{key:"xzDatasetSubmit",value:function(e){this.updateParams1(e)}},{key:"setReportList",value:function(e){this.reportList=e}},{key:"updateParams1",value:function(e){var t=this,n=(e=(this.dataPaneCompEl.deleteApiData([1,2,3]),e.forEach((function(e){var n={name:e.name,type:4,response_data:[],columns:[],params:[],path:e.id,id:e.id},r=mee(e.columns,e.name);e=mee(e.params||[],e.name);n.columns=r,n.params=e,t.dataPaneCompEl.addListItem(n,r)})),this.dataPaneCompEl.getJsonColumns()),this.dataPaneCompEl.getApiColumns());this.xzDesignParamsEl.dialogEl.setDatasetParams(n),this.xzDesignParamsEl.dialogEl.setColumns(e)}},{key:"updateParams",value:function(e){var t=this,n=(e=(this.dataPaneCompEl.deleteApiData(),e.forEach((function(e){var n={name:(e=e.val).name,type:3,response_data:[],columns:[],params:[],path:e.path,request_method:e.request_method},r=mee(e.columns,e.name);e=mee(e.params,e.name);n.columns=r,n.params=e,t.dataPaneCompEl.addListItem(n,r)})),this.dataPaneCompEl.getJsonColumns()),this.dataPaneCompEl.getApiColumns());this.xzDesignParamsEl.dialogEl.setDatasetParams(n),this.xzDesignParamsEl.dialogEl.setColumns(e)}},{key:"setImgUrl",value:function(e){this.imgurl=e}},{key:"getJsonData",value:function(){return this.dataPaneCompEl.getJsonData()}},{key:"drop",value:function(e){var t,n=this.resObj.value,r=(i=(this.dropHide(),this.spreadSheet)).sheet.data,i=i.sheet,o=this.initToolbarHeight,a=0,s=(u=(o+=(u=ve()(this.rootEl.el)).offset().top,a+=u.offset().left,r.scroll)).x,u=u.y,c=(u=he.call(r,e.clientY+u,-o),o=fe.call(r,e.clientX+s,-a),e=null,s=(e=u.ri<0?0:u.ri,o.ci),a=!1,o=(u=iee(r.selector.size(),2))[0],u=u[1],null),l=(1<o||1<u?(a=!0,h=(t=r.selector.range).sri,t=t.sci,(l=r.getCell(e=h,s=t))&&(c=l.style),r.rows.deleteCells(r.selector.range),i.selector.set(h,t,!0)):i.selector.set(e,s,!0),this.resObj),h=(2==l.type?(l.aggregate=1,l.axisType=2):(l.merge=1,l.axisType=1),l.data_type=l.type,l.order=0,r.getCell(e,s));r.setCellBindObj(e,s,l),r.setCellExpansion(e,s,1),r.setCellConfig(e,s,"type",2),h&&h.bindObj||(h=r.getCell(e,s),null!=c&&(h.style=c)),a&&(r.rows.getCellOrNew(e,s).merge=[o-1,u-1]),h&&"editable"in h&&(h.editable=!0),1==l.data_type&&this.cellFormat({name:"date",value:"yyyy-MM-dd"},"date",h),i.editor.change("finished",n),h.editable=!1,h.type=2,h.valueType=1,h.scaleType=1,i.selector.set(e,s),i.table.render()}},{key:"cellFormat",value:function(e,t,n){var r,i=this.spreadSheet.sheet.data.styles,o={format:{}},a=o.format[t]=e;"style"in n?((r=_.cloneDeep(i[n.style])).format?r.format[t]=e:r.format=o.format,i.push(r)):i.push(o),a=i.length-1;n.style=a}},{key:"dragEvent",value:function(e,t){var n=this;this.setTimeoutor||(this.setTimeoutor=setTimeout((function(){var r,i,o,a,s,u,c;s=-1<(u=navigator.userAgent).indexOf("Opera"),r=-1<u.indexOf("compatible")&&-1<u.indexOf("MSIE")&&!s,i=-1<u.indexOf("Windows NT 6.1; Trident/7.0;")&&!r,a=-1<u.indexOf("Firefox"),o=-1<u.indexOf("Safari")&&-1==u.indexOf("Chrome"),c=-1<u.indexOf("Chrome")&&-1<u.indexOf("Safari"),"FF"!=(r?(new RegExp("MSIE (\\d+\\.\\d+);").test(u),{name:"IE",num:parseFloat(RegExp.$1)}):a?{name:"FF",num:"FF"}:s?{name:"Opera",num:"Opera"}:o?{name:"Safari",num:"Safari"}:c?{name:"Chrome",num:"Chrome"}:i?{name:"Edge",num:"Edge"}:void 0).name&&(a=(u=(r=n.spreadSheet.sheet).selector).tl,s=u.t,o=u.l,u=u.br,a.hide(),s.hide(),o.hide(),u.hide(),c=n.initToolbarHeight,i=0,c+=(a=ve()(n.rootEl.el)).offset().top,i+=a.offset().left,o=(s=r.data.scroll).x,u=s.y,a=he.call(r.data,t+u,-c),s=fe.call(r.data,e+o,-i),u=null,u=a.ri<0?0:a.ri,c=s.ci,r.selector.set(u,c),n.setTimeoutor=null)}),100))}},{key:"dropHide",value:function(){this.sheetDropEl.hide()}},{key:"dropShow",value:function(){this.sheetDropEl.show()}},{key:"dropEnd",value:function(e,t){var n={};n.value=e.value,n.type=e.type,this.resObj=n,this.axisType=t,this.dropShow()}},{key:"sheetMount",value:function(){var e=this;this.spreadSheet.on("cell-selected",(function(t,n,r){e.toolbar.reset(),e.spreadSheet.sheet.data.paintformat&&e.toolbar.paintformatToggle(),e.trigger("cell-selected"),-1<n&&-1<r&&pee.call(e,t)})),this.spreadSheet.on("cells-selected",(function(){e.toolbar.reset(),e.spreadSheet.sheet.data.paintformat&&e.toolbar.paintformatToggle(),e.trigger("cells-selected")})),this.spreadSheet.on("dbclick",(function(t,n,r){e.trigger("dbclick"),t&&2==t.type&&e.tableSettingEl.show()})),this.spreadSheet.on("cell-editing",(function(t,n,r){-1<n&&-1<r&&t&&(t.text&&"="===t.text.trim()[0]?t.type=5:t.type=6,n=IZ[t.type],e.toolbar.dataTypeEl.setTitle(n))})),this.spreadSheet.onRender("tableRender",(function(){var t,n,r,i,o,a=e.spreadSheet.sheet.data.groupConfig;n=(t=e.spreadSheet).sheet.data,t=t.sheet.table.draw,i=(r=n.scroll).x,r=r.y,o=n.cols.indexWidth||60,n=n.rows.height||25,t.save(),t.translate(o,n).translate(-i,-r),D0(a,e.spreadSheet)}))}},{key:"setHyperlink",value:function(e,t,n){var r,i=(r=J0(this.spreadSheet)).range,o=(r=r.dataProxy).getCell(i.sri,i.sci);"edit"==t?o.links[n]=e:(t={underline:!0,color:"#0170c1"},n=null,o&&o.links?o.links&&(n=o.links):n=[],n.push(e),U0(i,r,{links:n,style:t})),this.linkCompEl.show(!0),this.spreadSheet.sheet.table.render()}},{key:"sheetRender",value:function(){this.spreadSheet.sheet.table.render()}},{key:"setSheetFilter",value:function(e,t){this.sheetFilter[e]=t}},{key:"getSheetFilter",value:function(e){return this.sheetFilter[e]}},{key:"setSheetFreezeConfig",value:function(e,t){this.sheetFreezeConfig[e]=t}},{key:"setSheetGroupConfig",value:function(e,t){this.sheetGroupConfig[e]=t}},{key:"getSheetGroupConfig",value:function(){var e=this.spreadSheet.sheet.data.name;return this.sheetGroupConfig[e]}},{key:"setSheetPrintConfig",value:function(e,t){this.sheetPrintConfig[e]=t}},{key:"setSheetPageConfig",value:function(e,t){this.sheetPagingConfig[e]=t}},{key:"getSheetPageConfig",value:function(){var e=this.spreadSheet.sheet.data.name;return this.sheetPagingConfig[e]}},{key:"setWaterMask",value:function(e){this.waterMaskConfig=e}},{key:"getSheetPrintConfig",value:function(){var e=this.spreadSheet.sheet.data.name;return this.sheetPrintConfig[e]}},{key:"getCurrentSheetFreezeConfig",value:function(){var e=this.spreadSheet.sheet.data.name;return this.sheetFreezeConfig[e]}},{key:"loadData",value:function(e){var t=this,n=this;if(e){var r={row:this.options.row,col:this.options.col},i=[];if(e.config){var o,a=e.config[0].SheetData.dataConfig,s=(this.sheetFreezeConfig={},this.sheetGroupConfig={},this.sheetPrintConfig={},this.sheetPagingConfig={},ree(e.config));try{for(s.s();!(o=s.n()).done;){var u=o.value;u&&function(){var e=u.name,n=u.SheetData,r=(t.setSheetGroupConfig(e,n.groupConfig),t.setSheetFreezeConfig(e,n.pageFreezeConfig),t.setSheetPrintConfig(e,n.print),t.setSheetPageConfig(e,n._sheetPaging),[]);n.groupConfig.forEach((function(e){e.filter&&r.push({name:e.label,filter:e.filter})})),t.setSheetFilter(e,r)}()}}catch(e){s.e(e)}finally{s.f()}this.spreadSheet.designData(e.config,r);r=((r=e.config[0].SheetData.paramsConfig)&&this.xzDesignParamsEl.setData(r),e.config[0].SheetData.apiConfig);var c,l=[],h=[];0<(h=a?(i=a).filter((function(e){if(4==e.type)return l.push(e.name),e})):h).length&&(c=setInterval((function(){var e;t.isLoadedThirdDataset&&(clearInterval(c),n.updateThirdDatasetList({select:l}),e=[],h.forEach((function(n){var r,i=ree(t.thirdDatasetList);try{for(i.s();!(r=i.n()).done;){var o=r.value;o.name==n.name&&(n.columns=o.columns,n.params=o.params,e.push(n))}}catch(n){i.e(n)}finally{i.f()}})),n.xzDatasetSubmit(e))}),40)),r&&this.xzAddApiDatasetEl.update({apiConfig:r,select:l})}e.data&&(i=i.concat(e.data)),this.dataPaneCompEl.initData(i),a=this.dataPaneCompEl.getJsonColumns(),this.xzDesignParamsEl.dialogEl.setColumns(a)}}},{key:"on",value:function(e,t){return this.eventMap.set(e,t),this}},{key:"trigger",value:function(e){var t=this.eventMap;if(t.has(e)){for(var n=arguments.length,r=new Array(1<n?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];(t=t.get(e)).call.apply(t,[this].concat(r))}}},{key:"onSelectSheet",value:function(e,t){this.spreadSheet.bottombar.on(e,t)}},{key:"printBgChange",value:function(){var e=this.printImgShow,t=this.spreadSheet;t&&(t.sheet.table._showPrintBgUrl=e,t.sheet.data.printOptions&&this.imgurl&&(t.sheet.table.printBgUrl=this.imgurl,t.sheet.table.render()))}},{key:"printLineChange",value:function(){var e=this.printLineShow,t=this.spreadSheet;t&&(t.sheet.data.printOptions?t.sheet.table.sheetPrintOptions=t.sheet.data.printOptions:t.sheet.table.sheetPrintOptions=t1,t.sheet.table.showPrintLine=e,t.sheet.table.render())}},{key:"getChart",value:function(){return this.spreadSheet.sheet.charts}},{key:"getData",value:function(){var e,t=this,n=this.spreadSheet,r=(o=iee(function(e,t){var n=[],r={};return e.forEach((function(e,i){var o={},a=e.name,s=(r[a]=i,e.rows),u=e.cols,c=(i=(e.merges,e.styles),e.groupConfig),l=e.pageFreezeConfig,h=e.toolbarButtonList,f=(o.name=a,o.SheetData={},e.freeze&&(o.SheetData.freeze=e.freeze),function(e){var t,n=0,r=0;for(t in e)if("len"!=t){parseInt(t)>n&&(n=parseInt(t));var i,o=e[t];if(o.cells)for(i in o.cells)parseInt(i)>r&&(r=parseInt(i))}return{maxRow:n,maxCol:r}}(s)),d=f.maxRow,p=f.maxCol;o.SheetData.columnHead=[],o.SheetData.rowHead=[],o.SheetData.stylesConfig=i,o.SheetData.cellConfig=[],o.SheetData.groupConfig=c,o.SheetData.collapse=e.collapse,o.SheetData.waterMask=e.waterMask,o.SheetData.pageFreezeConfig=l,o.SheetData.toolbarButtonList=h,o.SheetData.charts=function(e){if(e){var t,n={};for(t in e){var r=e[t].charts;n[t]={position:r.position,chartOption:r.chartOption,group:r.group,type:r.type}}return n}}(t[a]),"printParams"in e&&e.printParams&&(o.SheetData.printParams=e.printParams),"printRepeat"in e&&e.printRepeat&&(o.SheetData.printRepeat=e.printRepeat);for(var m=0;m<=d;m++){var g={};if(s[g.Row=m]){s[m].height&&(g.height=s[m].height),!0===s[m].hide&&(g.hide=!0),!0===s[m].auto&&(g.auto=!0);var A,v=s[m].cells;for(A in v)if(0<=parseInt(A)){var b={},y=parseInt(A),w=(b.column=y,b.row=m,G0);if(v[A]){var x,C=v[A];for(x in w)x in C&&(b[w[x]]=C[x]);C.bindObj&&(b.dataType=C.bindObj.data_type),C.merge&&(b.columnSpan=C.merge[1]+1,b.rowSpan=C.merge[0]+1)}o.SheetData.cellConfig.push(b)}}o.SheetData.rowHead.push(g)}for(var k=0;k<=p;k++){var E={};u[k]&&(u[k].width&&(E.Width=u[k].width),!0===u[k].hide&&(E.hide=!0)),E.Column=k,o.SheetData.columnHead.push(E)}n.push(o)})),[n,r]}(o=this.spreadSheet.getData(),r=this.getChart()),2))[0],i=(o[1],n.datas,this.xzDesignParamsEl.panelEl.getData()),o=this.getJsonData(),a=this.xzAddApiDatasetEl.dialogEl.authDialogEl.getFormFieldValue(),s=o.filter((function(e){if(3==e.type||4==e.type)return e})),u=(o=o.filter((function(e){if(1==e.type||2==e.type)return e})),ree(r));try{var c=function(){var n=e.value,r=n.name,o=t.sheetPrintConfig[r],u=t.sheetFreezeConfig[r],c=t.sheetPagingConfig[r],l=(n.SheetData.print=o,n.SheetData.pageFreezeConfig=u,n.SheetData.paramsConfig=i,n.SheetData.dataConfig=s,n.SheetData.apiConfig=a,n.SheetData._sheetPaging=c,t.sheetFilter[r]);n.SheetData.groupConfig&&0<n.SheetData.groupConfig.length&&(l&&0<l.length?(l=function(e){var t={};if(e){var n,r=P0(e=q0(e));try{for(r.s();!(n=r.n()).done;){var i=n.value;t[i.name]=i.filter}}catch(e){r.e(e)}finally{r.f()}}return t}(l),n.SheetData.groupConfig.forEach((function(e){l[e.label]&&(e.filter=l[e.label])}))):n.SheetData.groupConfig.forEach((function(e){e.filter=null}))),n.SheetData.toolbarButtonList=t.toolbarButtonsCompEl.getData()};for(u.s();!(e=u.n()).done;)c()}catch(n){u.e(n)}finally{u.f()}return{config:r,data:o}}}]),e}(),Cee=(la=ge,(Zn="version")in(Eo=xee)?Object.defineProperty(Eo,Zn,{value:la,enumerable:!0,configurable:!0,writable:!0}):Eo[Zn]=la,new WeakMap),kee=new WeakMap,Eee=function(){function e(t){see(this,e),lee(this,Cee,{writable:!0,value:!0}),lee(this,kee,{writable:!0,value:null}),this.init(t)}return cee(e,[{key:"init",value:function(e){var t,n;(e=R3(e))&&(e=JSON.parse(e),tee(this,kee,e),t=eee(this,kee).expire_date,n=eee(this,kee).auth_domain,q9.includes(e.version)&&(Y3(n,eee(this,kee).dev_name)||K3()||W3(n)&&q3(t)))?tee(this,Cee,!0):tee(this,Cee,!1)}},{key:"getStatus",value:function(){return eee(this,Cee)}},{key:"getAuthInfo",value:function(){return eee(this,kee)}}]),e}();window&&(window.XZReportDesigner=function(e){return new xee(e,1<arguments.length&&void 0!==arguments[1]?arguments[1]:{})},window.XZReportDesigner.locale=H,window.XZReportDesigner.setKey=function(e){try{var t=new Eee(e);fee=t.getStatus(),dee=t.getAuthInfo()}catch(e){fee=!1}},window.XZReportDesigner.version=ge),t.default=xee}]);